/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3.0 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be ** met: http://www.gnu.org/copyleft/gpl.html. ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QIOSGLOBAL_H #define QIOSGLOBAL_H #import #include @class QIOSViewController; QT_BEGIN_NAMESPACE class QPlatformScreen; bool isQtApplication(); QIOSViewController *qiosViewController(); CGRect toCGRect(const QRect &rect); QRect fromCGRect(const CGRect &rect); CGPoint toCGPoint(const QPoint &point); QPoint fromCGPoint(const CGPoint &point); Qt::ScreenOrientation toQtScreenOrientation(UIDeviceOrientation uiDeviceOrientation); UIDeviceOrientation fromQtScreenOrientation(Qt::ScreenOrientation qtOrientation); QRect fromPortraitToPrimary(const QRect &rect, QPlatformScreen *screen); QT_END_NAMESPACE #endif // QIOSGLOBAL_H n> Vendor branch of Chromium. This is a submodule of qtwebengine - no point in cloning it separately.
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-08 14:30:41 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-12 13:49:54 +0200
commitab0a50979b9eb4dfa3320eff7e187e41efedf7a9 (patch)
tree498dfb8a97ff3361a9f7486863a52bb4e26bb898
parent4ce69f7403811819800e7c5ae1318b2647e778d1 (diff)
Update Chromium to beta version 37.0.2062.68
Change-Id: I188e3b5aff1bec75566014291b654eb19f5bc8ca Reviewed-by: Andras Becsi <andras.becsi@digia.com>
-rw-r--r--chromium/.gitattributes7
-rw-r--r--chromium/.gn2
-rw-r--r--chromium/AUTHORS106
-rw-r--r--chromium/Android.mk69
-rw-r--r--chromium/BUILD.gn160
-rw-r--r--chromium/DEPS1464
-rw-r--r--chromium/LICENSE2
-rw-r--r--chromium/OWNERS5
-rw-r--r--chromium/PRESUBMIT.py476
-rwxr-xr-xchromium/PRESUBMIT_test.py252
-rw-r--r--chromium/WATCHLISTS232
-rw-r--r--chromium/android_webview/all_webview.gyp33
-rw-r--r--chromium/android_webview/android_webview.gyp151
-rw-r--r--chromium/android_webview/android_webview_tests.gypi31
-rw-r--r--chromium/android_webview/build/jarjar_resources.gypi50
-rw-r--r--chromium/android_webview/native/webview_native.gyp60
-rw-r--r--chromium/apps/app_shim/app_shim.gypi2
-rw-r--r--chromium/apps/apps.gypi99
-rw-r--r--chromium/apps/common/api/api.gyp36
-rw-r--r--chromium/apps/shell/app_shell.gyp214
-rw-r--r--chromium/apps/shell/common/api/api.gyp36
-rw-r--r--chromium/ash/DEPS17
-rw-r--r--chromium/ash/OWNERS11
-rw-r--r--chromium/ash/PRESUBMIT.py12
-rw-r--r--chromium/ash/accelerators/accelerator_commands.cc53
-rw-r--r--chromium/ash/accelerators/accelerator_commands.h31
-rw-r--r--chromium/ash/accelerators/accelerator_commands_unittest.cc38
-rw-r--r--chromium/ash/accelerators/accelerator_controller.cc1215
-rw-r--r--chromium/ash/accelerators/accelerator_controller.h180
-rw-r--r--chromium/ash/accelerators/accelerator_controller_unittest.cc1392
-rw-r--r--chromium/ash/accelerators/accelerator_dispatcher.cc139
-rw-r--r--chromium/ash/accelerators/accelerator_dispatcher.h47
-rw-r--r--chromium/ash/accelerators/accelerator_filter.cc137
-rw-r--r--chromium/ash/accelerators/accelerator_filter.h33
-rw-r--r--chromium/ash/accelerators/accelerator_filter_unittest.cc123
-rw-r--r--chromium/ash/accelerators/accelerator_table.cc434
-rw-r--r--chromium/ash/accelerators/accelerator_table.h202
-rw-r--r--chromium/ash/accelerators/accelerator_table_unittest.cc79
-rw-r--r--chromium/ash/accelerators/debug_commands.cc66
-rw-r--r--chromium/ash/accelerators/debug_commands.h22
-rw-r--r--chromium/ash/accelerators/exit_warning_handler.cc204
-rw-r--r--chromium/ash/accelerators/exit_warning_handler.h87
-rw-r--r--chromium/ash/accelerators/focus_manager_factory.cc41
-rw-r--r--chromium/ash/accelerators/focus_manager_factory.h43
-rw-r--r--chromium/ash/accelerators/nested_dispatcher_controller.cc36
-rw-r--r--chromium/ash/accelerators/nested_dispatcher_controller.h35
-rw-r--r--chromium/ash/accelerators/nested_dispatcher_controller_unittest.cc161
-rw-r--r--chromium/ash/accessibility_delegate.h91
-rw-r--r--chromium/ash/ash.gyp597
-rw-r--r--chromium/ash/ash_chromeos_strings.grdp313
-rw-r--r--chromium/ash/ash_constants.cc21
-rw-r--r--chromium/ash/ash_constants.h38
-rw-r--r--chromium/ash/ash_export.h32
-rw-r--r--chromium/ash/ash_resources.gyp25
-rw-r--r--chromium/ash/ash_resources.gypi29
-rw-r--r--chromium/ash/ash_strings.grd596
-rw-r--r--chromium/ash/ash_strings.gyp17
-rw-r--r--chromium/ash/ash_switches.cc270
-rw-r--r--chromium/ash/ash_switches.h118
-rw-r--r--chromium/ash/autoclick/autoclick_controller.cc209
-rw-r--r--chromium/ash/autoclick/autoclick_controller.h44
-rw-r--r--chromium/ash/autoclick/autoclick_unittest.cc289
-rw-r--r--chromium/ash/cancel_mode.cc22
-rw-r--r--chromium/ash/cancel_mode.h15
-rw-r--r--chromium/ash/caps_lock_delegate.h33
-rw-r--r--chromium/ash/caps_lock_delegate_stub.cc26
-rw-r--r--chromium/ash/caps_lock_delegate_stub.h34
-rw-r--r--chromium/ash/debug.cc61
-rw-r--r--chromium/ash/debug.h22
-rw-r--r--chromium/ash/default_accessibility_delegate.cc105
-rw-r--r--chromium/ash/default_accessibility_delegate.h56
-rw-r--r--chromium/ash/default_user_wallpaper_delegate.cc41
-rw-r--r--chromium/ash/default_user_wallpaper_delegate.h36
-rw-r--r--chromium/ash/desktop_background/OWNERS2
-rw-r--r--chromium/ash/desktop_background/desktop_background_controller.cc463
-rw-r--r--chromium/ash/desktop_background/desktop_background_controller.h227
-rw-r--r--chromium/ash/desktop_background/desktop_background_controller_observer.h23
-rw-r--r--chromium/ash/desktop_background/desktop_background_controller_unittest.cc668
-rw-r--r--chromium/ash/desktop_background/desktop_background_view.cc221
-rw-r--r--chromium/ash/desktop_background/desktop_background_view.h37
-rw-r--r--chromium/ash/desktop_background/desktop_background_widget_controller.cc148
-rw-r--r--chromium/ash/desktop_background/desktop_background_widget_controller.h95
-rw-r--r--chromium/ash/desktop_background/user_wallpaper_delegate.h49
-rw-r--r--chromium/ash/desktop_background/wallpaper_resizer.cc158
-rw-r--r--chromium/ash/desktop_background/wallpaper_resizer.h78
-rw-r--r--chromium/ash/desktop_background/wallpaper_resizer_observer.h23
-rw-r--r--chromium/ash/desktop_background/wallpaper_resizer_unittest.cc161
-rw-r--r--chromium/ash/dip_unittest.cc111
-rw-r--r--chromium/ash/display/OWNERS1
-rw-r--r--chromium/ash/display/display_change_observer_chromeos.cc189
-rw-r--r--chromium/ash/display/display_change_observer_chromeos.h54
-rw-r--r--chromium/ash/display/display_change_observer_chromeos_unittest.cc71
-rw-r--r--chromium/ash/display/display_controller.cc809
-rw-r--r--chromium/ash/display/display_controller.h233
-rw-r--r--chromium/ash/display/display_controller_unittest.cc1294
-rw-r--r--chromium/ash/display/display_error_observer_chromeos.cc73
-rw-r--r--chromium/ash/display/display_error_observer_chromeos.h39
-rw-r--r--chromium/ash/display/display_error_observer_chromeos_unittest.cc85
-rw-r--r--chromium/ash/display/display_info.cc264
-rw-r--r--chromium/ash/display/display_info.h198
-rw-r--r--chromium/ash/display/display_info_unittest.cc57
-rw-r--r--chromium/ash/display/display_layout.cc152
-rw-r--r--chromium/ash/display/display_layout.h71
-rw-r--r--chromium/ash/display/display_layout_store.cc94
-rw-r--r--chromium/ash/display/display_layout_store.h69
-rw-r--r--chromium/ash/display/display_manager.cc1048
-rw-r--r--chromium/ash/display/display_manager.h350
-rw-r--r--chromium/ash/display/display_manager_unittest.cc1138
-rw-r--r--chromium/ash/display/display_pref_util.h59
-rw-r--r--chromium/ash/display/event_transformation_handler.cc95
-rw-r--r--chromium/ash/display/event_transformation_handler.h49
-rw-r--r--chromium/ash/display/mirror_window_controller.cc349
-rw-r--r--chromium/ash/display/mirror_window_controller.h87
-rw-r--r--chromium/ash/display/mirror_window_controller_unittest.cc291
-rw-r--r--chromium/ash/display/mouse_cursor_event_filter.cc255
-rw-r--r--chromium/ash/display/mouse_cursor_event_filter.h105
-rw-r--r--chromium/ash/display/mouse_cursor_event_filter_unittest.cc380
-rw-r--r--chromium/ash/display/output_configurator_animation.cc229
-rw-r--r--chromium/ash/display/output_configurator_animation.h67
-rw-r--r--chromium/ash/display/resolution_notification_controller.cc305
-rw-r--r--chromium/ash/display/resolution_notification_controller.h99
-rw-r--r--chromium/ash/display/resolution_notification_controller_unittest.cc314
-rw-r--r--chromium/ash/display/root_window_transformers.cc285
-rw-r--r--chromium/ash/display/root_window_transformers.h40
-rw-r--r--chromium/ash/display/root_window_transformers_unittest.cc414
-rw-r--r--chromium/ash/display/screen_position_controller.cc218
-rw-r--r--chromium/ash/display/screen_position_controller.h37
-rw-r--r--chromium/ash/display/screen_position_controller_unittest.cc280
-rw-r--r--chromium/ash/display/shared_display_edge_indicator.cc117
-rw-r--r--chromium/ash/display/shared_display_edge_indicator.h59
-rw-r--r--chromium/ash/display/virtual_keyboard_window_controller.cc102
-rw-r--r--chromium/ash/display/virtual_keyboard_window_controller.h61
-rw-r--r--chromium/ash/display/virtual_keyboard_window_controller_unittest.cc66
-rw-r--r--chromium/ash/drag_drop/OWNERS1
-rw-r--r--chromium/ash/drag_drop/drag_drop_controller.cc566
-rw-r--r--chromium/ash/drag_drop/drag_drop_controller.h142
-rw-r--r--chromium/ash/drag_drop/drag_drop_controller_unittest.cc1083
-rw-r--r--chromium/ash/drag_drop/drag_drop_interactive_uitest.cc165
-rw-r--r--chromium/ash/drag_drop/drag_drop_tracker.cc81
-rw-r--r--chromium/ash/drag_drop/drag_drop_tracker.h59
-rw-r--r--chromium/ash/drag_drop/drag_drop_tracker_unittest.cc202
-rw-r--r--chromium/ash/drag_drop/drag_image_view.cc175
-rw-r--r--chromium/ash/drag_drop/drag_image_view.h78
-rw-r--r--chromium/ash/event_rewriter_delegate.h34
-rw-r--r--chromium/ash/extended_desktop_unittest.cc847
-rw-r--r--chromium/ash/first_run/desktop_cleaner.cc118
-rw-r--r--chromium/ash/first_run/desktop_cleaner.h46
-rw-r--r--chromium/ash/first_run/first_run_helper.cc21
-rw-r--r--chromium/ash/first_run/first_run_helper.h85
-rw-r--r--chromium/ash/first_run/first_run_helper_impl.cc123
-rw-r--r--chromium/ash/first_run/first_run_helper_impl.h51
-rw-r--r--chromium/ash/first_run/first_run_helper_unittest.cc147
-rw-r--r--chromium/ash/focus_cycler.cc115
-rw-r--r--chromium/ash/focus_cycler.h61
-rw-r--r--chromium/ash/focus_cycler_unittest.cc402
-rw-r--r--chromium/ash/high_contrast/high_contrast_controller.cc36
-rw-r--r--chromium/ash/high_contrast/high_contrast_controller.h42
-rw-r--r--chromium/ash/host/root_window_host_factory.cc31
-rw-r--r--chromium/ash/host/root_window_host_factory.h33
-rw-r--r--chromium/ash/host/root_window_host_factory_win.cc40
-rw-r--r--chromium/ash/ime_control_delegate.h32
-rw-r--r--chromium/ash/keyboard_overlay/keyboard_overlay_delegate.cc149
-rw-r--r--chromium/ash/keyboard_overlay/keyboard_overlay_delegate.h66
-rw-r--r--chromium/ash/keyboard_overlay/keyboard_overlay_delegate_unittest.cc68
-rw-r--r--chromium/ash/keyboard_overlay/keyboard_overlay_view.cc95
-rw-r--r--chromium/ash/keyboard_overlay/keyboard_overlay_view.h68
-rw-r--r--chromium/ash/keyboard_overlay/keyboard_overlay_view_unittest.cc78
-rw-r--r--chromium/ash/keyboard_uma_event_filter.cc51
-rw-r--r--chromium/ash/keyboard_uma_event_filter.h36
-rw-r--r--chromium/ash/launcher/OWNERS2
-rw-r--r--chromium/ash/launcher/launcher.cc198
-rw-r--r--chromium/ash/launcher/launcher.h132
-rw-r--r--chromium/ash/launcher/launcher_types.cc32
-rw-r--r--chromium/ash/launcher/launcher_types.h111
-rw-r--r--chromium/ash/launcher/launcher_unittest.cc166
-rw-r--r--chromium/ash/magnifier/magnification_controller.cc634
-rw-r--r--chromium/ash/magnifier/magnification_controller.h61
-rw-r--r--chromium/ash/magnifier/magnification_controller_unittest.cc442
-rw-r--r--chromium/ash/magnifier/magnifier_constants.h27
-rw-r--r--chromium/ash/magnifier/partial_magnification_controller.cc211
-rw-r--r--chromium/ash/magnifier/partial_magnification_controller.h91
-rw-r--r--chromium/ash/media_delegate.h27
-rw-r--r--chromium/ash/metrics/user_metrics_recorder.cc415
-rw-r--r--chromium/ash/metrics/user_metrics_recorder.h129
-rw-r--r--chromium/ash/multi_profile_uma.cc57
-rw-r--r--chromium/ash/multi_profile_uma.h84
-rw-r--r--chromium/ash/new_window_delegate.h43
-rw-r--r--chromium/ash/popup_message.cc225
-rw-r--r--chromium/ash/popup_message.h84
-rw-r--r--chromium/ash/resources/OWNERS1
-rw-r--r--chromium/ash/resources/PRESUBMIT.py47
-rw-r--r--chromium/ash/resources/ash_resources.grd262
-rw-r--r--chromium/ash/resources/default_100_percent/common/alert_small.pngbin494 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/launcher_background.pngbin118 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/launcher_underline_active.pngbin75 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/launcher_underline_running.pngbin78 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_app_menu_icon.pngbin224 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_guest_icon.pngbin209 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_icon_background_normal.pngbin128 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_icon_background_onblack_normal.pngbin179 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_icon_background_pressed.pngbin376 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_notification_icon.pngbin231 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_center.pngbin87 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_left.pngbin97 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_onblack_center.pngbin106 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_onblack_left.pngbin127 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_onblack_right.pngbin124 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_right.pngbin104 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_pressed_center.pngbin146 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_pressed_left.pngbin226 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_pressed_right.pngbin235 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_bottom.pngbin103 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_center.pngbin86 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_onblack_bottom.pngbin103 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_onblack_center.pngbin93 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_onblack_top.pngbin102 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_top.pngbin94 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_pressed_bottom.pngbin162 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_pressed_center.pngbin105 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_pressed_top.pngbin132 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_appmenu.pngbin346 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_appmenu_hover.pngbin327 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_appmenu_pressed.pngbin314 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_background.pngbin125 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_background_left.pngbin118 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_background_right.pngbin119 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_corner.pngbin244 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_dimming.pngbin99 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_dimming_left.pngbin99 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_dimming_right.pngbin96 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_overflow.pngbin177 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_bottom_active.pngbin105 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_bottom_hover.pngbin105 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_bottom_running.pngbin117 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_left_active.pngbin241 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_left_hover.pngbin241 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_left_running.pngbin228 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_right_active.pngbin246 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_right_hover.pngbin246 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_right_running.pngbin229 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/task_manager.pngbin530 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/window_switcher_icon_incognito.pngbin133 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/launcher/window_switcher_icon_normal.pngbin117 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/multi_window_resize_horizontal.pngbin159 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/multi_window_resize_vertical.pngbin157 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/resize_shadow_bottom.pngbin68 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/resize_shadow_bottom_left.pngbin76 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/resize_shadow_bottom_right.pngbin76 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/resize_shadow_left.pngbin68 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/resize_shadow_right.pngbin68 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/resize_shadow_top.pngbin68 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/resize_shadow_top_left.pngbin80 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/resize_shadow_top_right.pngbin81 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/tray_popup_label_button_border.pngbin67 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/tray_popup_label_button_hover_background.pngbin70 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/tray_popup_label_button_normal_background.pngbin68 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/tray_popup_public_account_logout_button_border.pngbin70 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_button_separator.pngbin86 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_close_short_black_hover.pngbin143 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_close_short_black_normal.pngbin178 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_close_short_black_pressed.pngbin162 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_close_short_hover.pngbin552 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_close_short_normal.pngbin503 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_close_short_pressed.pngbin630 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_close_tall_hover.pngbin572 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_close_tall_normal.pngbin530 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_close_tall_pressed.pngbin634 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_header_base_active.pngbin85 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_header_base_inactive.pngbin85 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_header_base_incognito_active.pngbin85 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_header_base_incognito_inactive.pngbin85 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_header_base_minimal.pngbin70 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_minimize_short_hover.pngbin422 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_minimize_short_normal.pngbin365 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_minimize_short_pressed.pngbin591 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_position_left_hover.pngbin271 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_position_left_hover_restore.pngbin344 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_position_left_normal.pngbin112 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_position_left_normal_restore.pngbin190 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_position_left_pressed.pngbin363 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_position_left_pressed_restore.pngbin476 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_position_middle_hover.pngbin276 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_position_middle_normal.pngbin113 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_position_middle_pressed.pngbin365 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_position_right_hover.pngbin273 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_position_right_hover_restore.pngbin355 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_position_right_normal.pngbin112 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_position_right_normal_restore.pngbin189 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_position_right_pressed.pngbin372 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_position_right_pressed_restore.pngbin511 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_size_short_black_hover.pngbin116 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_size_short_black_normal.pngbin154 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_size_short_black_pressed.pngbin141 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_size_short_hover.pngbin499 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_size_short_normal.pngbin457 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_size_short_pressed.pngbin649 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_size_tall_hover.pngbin536 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_size_tall_normal.pngbin486 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/common/window_size_tall_pressed.pngbin690 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/common/default_throbber.pngbin6686 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/notification_3g.pngbin1170 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/notification_lte.pngbin909 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/status_cellular_disabled.pngbin267 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/status_cellular_disabled_hover.pngbin274 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/status_cellular_enabled.pngbin155 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/status_cellular_enabled_hover.pngbin157 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/status_cellular_failed.pngbin729 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/status_data_low.pngbin247 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/status_data_none.pngbin867 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/status_network_failed.pngbin978 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/status_network_info.pngbin491 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/status_network_info_hover.pngbin489 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/status_wifi_disabled.pngbin389 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/status_wifi_disabled_hover.pngbin398 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/status_wifi_enabled.pngbin367 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/status_wifi_enabled_hover.pngbin369 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_1x.pngbin103 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_1x_error.pngbin104 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_1x_unknown.pngbin99 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_3g_dark.pngbin180 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_3g_error.pngbin104 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_3g_light.pngbin241 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_3g_unknown.pngbin97 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_4g_dark.pngbin179 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_4g_light.pngbin233 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_arcs_dark.pngbin1170 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_arcs_light.pngbin1198 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_bars_dark.pngbin335 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_bars_light.pngbin488 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_edge_dark.pngbin103 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_edge_light.pngbin146 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_evdo_dark.pngbin158 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_evdo_light.pngbin209 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_gprs_dark.pngbin113 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_gprs_light.pngbin93 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_hspa_dark.pngbin108 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_hspa_light.pngbin97 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_hspa_plus_dark.pngbin125 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_hspa_plus_light.pngbin102 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_lte_advanced_dark.pngbin157 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_lte_advanced_light.pngbin113 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_lte_dark.pngbin133 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_lte_light.pngbin107 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_roaming_dark.pngbin217 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_roaming_light.pngbin213 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_secure_dark.pngbin184 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_secure_light.pngbin183 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_network_vpn_badge.pngbin135 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_vpn_dark.pngbin199 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/network/statusbar_wired.pngbin219 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/notification/notification_low_power_charger.pngbin248 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/multiprofiles_add.pngbin91 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_accessibility_dark.pngbin399 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_accessibility_mode.pngbin451 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_audio_device_bluetooth.pngbin316 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_audio_device_hdmi.pngbin281 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_audio_device_headphones.pngbin530 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_audio_device_usb.pngbin296 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_bluetooth.pngbin624 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_bluetooth_disabled.pngbin576 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_bluetooth_disabled_hover.pngbin585 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_bluetooth_enabled.pngbin615 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_bluetooth_enabled_hover.pngbin627 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_brightness.pngbin356 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_capslock.pngbin281 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_capslock_dark.pngbin259 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_display_dark.pngbin247 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_drive.pngbin503 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_drive_item_cancel.pngbin146 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_drive_item_cancel_hover.pngbin237 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_drive_item_done.pngbin164 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_drive_item_failed.pngbin217 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_drive_light.pngbin517 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_guest_icon.pngbin143 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_help.pngbin213 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_help_hover.pngbin217 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_ime.pngbin195 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_less.pngbin140 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_locale.pngbin1254 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_lockscreen.pngbin242 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_lockscreen_hover.pngbin248 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_bottom.pngbin88 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_bottom_left.pngbin125 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_bottom_right.pngbin135 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_center.pngbin74 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_left.pngbin86 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_right.pngbin89 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_top.pngbin92 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_top_left.pngbin118 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_top_right.pngbin117 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_bottom.pngbin88 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_bottom_left.pngbin125 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_bottom_right.pngbin135 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_center.pngbin74 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_left.pngbin86 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_right.pngbin89 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_top.pngbin92 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_top_left.pngbin118 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_top_right.pngbin125 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_managed.pngbin413 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_managed_mode_user.pngbin341 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_managed_tray.pngbin374 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_more.pngbin220 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_power_small_all.pngbin2819 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_dark.pngbin3158 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_dark_discharging.pngbin1172 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_dark_fluctuating.pngbin908 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_discharging.pngbin889 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_fluctuating.pngbin718 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_screenshare.pngbin227 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_screenshare_dark.pngbin174 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_session_length_limit_timer.pngbin612 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_settings.pngbin366 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_shutdown.pngbin336 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_shutdown_hover.pngbin343 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_sms.pngbin685 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_tracing.pngbin252 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_update.pngbin294 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_update_dark.pngbin287 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_update_dark_green.pngbin526 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_update_dark_orange.pngbin482 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_update_dark_red.pngbin502 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_update_green.pngbin485 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_update_orange.pngbin440 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_update_red.pngbin449 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_volume_dark.pngbin1000 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_100_percent/cros/status/status_volume_mute.pngbin418 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alert_small.pngbin1066 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/launcher_background.pngbin148 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/launcher_underline_active.pngbin98 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/launcher_underline_running.pngbin97 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_app_menu_icon.pngbin307 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_guest_icon.pngbin356 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_icon_background_normal.pngbin189 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_icon_background_onblack_normal.pngbin279 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_icon_background_pressed.pngbin769 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_notification_icon.pngbin324 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_center.pngbin90 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_left.pngbin123 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_onblack_center.pngbin121 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_onblack_left.pngbin175 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_onblack_right.pngbin165 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_right.pngbin124 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_pressed_center.pngbin177 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_pressed_left.pngbin408 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_pressed_right.pngbin431 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_bottom.pngbin127 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_center.pngbin91 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_onblack_bottom.pngbin125 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_onblack_center.pngbin96 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_onblack_top.pngbin147 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_top.pngbin123 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_pressed_bottom.pngbin345 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_pressed_center.pngbin129 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_pressed_top.pngbin264 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_appmenu.pngbin662 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_appmenu_hover.pngbin574 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_appmenu_pressed.pngbin545 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_background.pngbin152 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_background_left.pngbin146 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_background_right.pngbin145 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_corner.pngbin210 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_dimming.pngbin106 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_dimming_left.pngbin109 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_dimming_right.pngbin111 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_overflow.pngbin314 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_bottom_active.pngbin141 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_bottom_hover.pngbin141 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_bottom_running.pngbin168 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_left_active.pngbin413 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_left_hover.pngbin413 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_left_running.pngbin340 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_right_active.pngbin410 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_right_hover.pngbin410 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_right_running.pngbin345 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/task_manager.pngbin1288 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/window_switcher_icon_incognito.pngbin245 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/launcher/window_switcher_icon_normal.pngbin157 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/multi_window_resize_vertical.pngbin353 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/tray_popup_label_button_border.pngbin71 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/tray_popup_label_button_hover_background.pngbin73 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/tray_popup_label_button_normal_background.pngbin68 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/tray_popup_public_account_logout_button_border.pngbin73 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_close_short_black_hover.pngbin293 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_close_short_black_normal.pngbin502 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_close_short_black_pressed.pngbin374 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_close_short_hover.pngbin1247 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_close_short_normal.pngbin1186 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_close_short_pressed.pngbin1298 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_close_tall_hover.pngbin1320 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_close_tall_normal.pngbin1325 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_close_tall_pressed.pngbin1399 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_header_base_active.pngbin90 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_header_base_inactive.pngbin90 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_header_base_incognito_active.pngbin90 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_header_base_incognito_inactive.pngbin90 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_header_base_minimal.pngbin75 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_minimize_short_hover.pngbin771 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_minimize_short_normal.pngbin617 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_minimize_short_pressed.pngbin1042 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_position_left_hover.pngbin370 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_position_left_hover_restore.pngbin724 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_position_left_normal.pngbin140 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_position_left_normal_restore.pngbin410 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_position_left_pressed.pngbin686 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_position_left_pressed_restore.pngbin1059 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_position_middle_hover.pngbin321 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_position_middle_normal.pngbin148 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_position_middle_pressed.pngbin658 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_position_right_hover.pngbin364 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_position_right_hover_restore.pngbin743 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_position_right_normal.pngbin146 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_position_right_normal_restore.pngbin406 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_position_right_pressed.pngbin690 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_position_right_pressed_restore.pngbin1085 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_size_short_black_hover.pngbin143 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_size_short_black_normal.pngbin183 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_size_short_black_pressed.pngbin172 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_size_short_hover.pngbin869 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_size_short_normal.pngbin736 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_size_short_pressed.pngbin1191 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_size_tall_hover.pngbin972 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_size_tall_normal.pngbin894 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/common/window_size_tall_pressed.pngbin1343 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/common/default_throbber.pngbin16231 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/notification_3g.pngbin2540 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/notification_lte.pngbin1584 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/status_cellular_disabled.pngbin373 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/status_cellular_disabled_hover.pngbin377 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/status_cellular_enabled.pngbin225 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/status_cellular_enabled_hover.pngbin226 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/status_cellular_failed.pngbin1465 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/status_data_low.pngbin333 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/status_data_none.pngbin1667 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/status_network_failed.pngbin1954 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/status_network_info.pngbin1190 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/status_network_info_hover.pngbin1203 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/status_wifi_disabled.pngbin728 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/status_wifi_disabled_hover.pngbin740 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/status_wifi_enabled.pngbin680 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/status_wifi_enabled_hover.pngbin683 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_3g_dark.pngbin437 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_3g_light.pngbin530 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_4g_dark.pngbin400 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_4g_light.pngbin508 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_arcs_dark.pngbin3092 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_arcs_light.pngbin2348 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_bars_dark.pngbin628 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_bars_light.pngbin749 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_edge_dark.pngbin178 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_edge_light.pngbin225 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_evdo_dark.pngbin311 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_evdo_light.pngbin365 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_gprs_dark.pngbin145 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_gprs_light.pngbin106 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_hspa_dark.pngbin143 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_hspa_light.pngbin106 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_hspa_plus_dark.pngbin169 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_hspa_plus_light.pngbin121 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_lte_advanced_dark.pngbin198 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_lte_advanced_light.pngbin139 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_lte_dark.pngbin174 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_lte_light.pngbin128 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_roaming_dark.pngbin369 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_roaming_light.pngbin332 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_secure_dark.pngbin310 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_secure_light.pngbin290 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_network_vpn_badge.pngbin253 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_vpn_dark.pngbin350 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/network/statusbar_wired.pngbin278 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/notification/notification_low_power_charger.pngbin445 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/multiprofiles_add.pngbin113 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_accessibility_dark.pngbin886 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_audio_device_bluetooth.pngbin546 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_audio_device_hdmi.pngbin463 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_audio_device_headphones.pngbin1150 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_audio_device_usb.pngbin314 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_bluetooth.pngbin1322 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_bluetooth_disabled.pngbin1106 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_bluetooth_disabled_hover.pngbin1130 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_bluetooth_enabled.pngbin1159 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_bluetooth_enabled_hover.pngbin1186 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_brightness.pngbin830 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_capslock.pngbin430 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_capslock_dark.pngbin432 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_display_dark.pngbin385 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_drive.pngbin1302 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_drive_item_cancel.pngbin303 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_drive_item_cancel_hover.pngbin466 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_drive_item_done.pngbin282 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_drive_item_failed.pngbin200 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_drive_light.pngbin1094 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_guest_icon.pngbin194 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_help.pngbin441 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_help_hover.pngbin457 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_ime.pngbin293 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_less.pngbin294 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_locale.pngbin3100 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_lockscreen.pngbin437 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_lockscreen_hover.pngbin448 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_bottom.pngbin104 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_bottom_left.pngbin249 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_bottom_right.pngbin247 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_center.pngbin91 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_left.pngbin112 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_right.pngbin121 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_top.pngbin102 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_top_left.pngbin212 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_top_right.pngbin236 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_bottom.pngbin104 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_bottom_left.pngbin240 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_bottom_right.pngbin241 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_center.pngbin91 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_left.pngbin116 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_right.pngbin125 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_top.pngbin99 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_top_left.pngbin201 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_top_right.pngbin228 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_managed.pngbin775 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_managed_mode_user.pngbin625 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_managed_tray.pngbin665 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_more.pngbin262 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_power_small_all.pngbin6038 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_dark.pngbin6766 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_dark_discharging.pngbin3440 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_dark_fluctuating.pngbin2787 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_discharging.pngbin2818 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_fluctuating.pngbin2301 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_screenshare.pngbin473 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_screenshare_dark.pngbin435 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_session_length_limit_timer.pngbin1221 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_settings.pngbin714 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_shutdown.pngbin725 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_shutdown_hover.pngbin731 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_sms.pngbin1534 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_tracing.pngbin432 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_update.pngbin484 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_update_dark.pngbin542 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_update_dark_green.pngbin1105 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_update_dark_orange.pngbin974 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_update_dark_red.pngbin983 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_update_green.pngbin963 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_update_orange.pngbin822 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_update_red.pngbin821 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_volume_dark.pngbin2585 -> 0 bytes
-rw-r--r--chromium/ash/resources/default_200_percent/cros/status/status_volume_mute.pngbin775 -> 0 bytes
-rw-r--r--chromium/ash/resources/wallpaper/default_large.jpgbin18866 -> 0 bytes
-rw-r--r--chromium/ash/resources/wallpaper/default_small.jpgbin16154 -> 0 bytes
-rw-r--r--chromium/ash/root_window_controller.cc952
-rw-r--r--chromium/ash/root_window_controller.h329
-rw-r--r--chromium/ash/root_window_controller_unittest.cc665
-rw-r--r--chromium/ash/root_window_settings.cc39
-rw-r--r--chromium/ash/root_window_settings.h48
-rw-r--r--chromium/ash/rotator/screen_rotation.cc132
-rw-r--r--chromium/ash/rotator/screen_rotation.h64
-rw-r--r--chromium/ash/scoped_target_root_window.cc21
-rw-r--r--chromium/ash/scoped_target_root_window.h34
-rw-r--r--chromium/ash/screen_ash.cc168
-rw-r--r--chromium/ash/screen_ash.h91
-rw-r--r--chromium/ash/screen_ash_unittest.cc116
-rw-r--r--chromium/ash/screensaver/DEPS3
-rw-r--r--chromium/ash/screensaver/OWNERS1
-rw-r--r--chromium/ash/screensaver/screensaver_view.cc170
-rw-r--r--chromium/ash/screensaver/screensaver_view.h94
-rw-r--r--chromium/ash/screensaver/screensaver_view_unittest.cc81
-rw-r--r--chromium/ash/screenshot_delegate.h37
-rw-r--r--chromium/ash/session_state_delegate.h123
-rw-r--r--chromium/ash/session_state_delegate_stub.cc102
-rw-r--r--chromium/ash/session_state_delegate_stub.h61
-rw-r--r--chromium/ash/session_state_observer.cc24
-rw-r--r--chromium/ash/session_state_observer.h42
-rw-r--r--chromium/ash/shelf/alternate_app_list_button.cc174
-rw-r--r--chromium/ash/shelf/alternate_app_list_button.h59
-rw-r--r--chromium/ash/shelf/app_list_button.cc134
-rw-r--r--chromium/ash/shelf/app_list_button.h44
-rw-r--r--chromium/ash/shelf/app_list_shelf_item_delegate.cc59
-rw-r--r--chromium/ash/shelf/app_list_shelf_item_delegate.h37
-rw-r--r--chromium/ash/shelf/background_animator.cc62
-rw-r--r--chromium/ash/shelf/background_animator.h75
-rw-r--r--chromium/ash/shelf/overflow_bubble.cc104
-rw-r--r--chromium/ash/shelf/overflow_bubble.h69
-rw-r--r--chromium/ash/shelf/overflow_bubble_view.cc229
-rw-r--r--chromium/ash/shelf/overflow_bubble_view.h69
-rw-r--r--chromium/ash/shelf/overflow_button.cc175
-rw-r--r--chromium/ash/shelf/overflow_button.h44
-rw-r--r--chromium/ash/shelf/scoped_observer_with_duplicated_sources.h70
-rw-r--r--chromium/ash/shelf/scoped_observer_with_duplicated_sources_unittest.cc82
-rw-r--r--chromium/ash/shelf/shelf_alignment_menu.cc78
-rw-r--r--chromium/ash/shelf/shelf_alignment_menu.h48
-rw-r--r--chromium/ash/shelf/shelf_bezel_event_filter.cc78
-rw-r--r--chromium/ash/shelf/shelf_bezel_event_filter.h39
-rw-r--r--chromium/ash/shelf/shelf_button.cc594
-rw-r--r--chromium/ash/shelf/shelf_button.h160
-rw-r--r--chromium/ash/shelf/shelf_button_host.h67
-rw-r--r--chromium/ash/shelf/shelf_delegate.h52
-rw-r--r--chromium/ash/shelf/shelf_icon_observer.h23
-rw-r--r--chromium/ash/shelf/shelf_item_delegate.h66
-rw-r--r--chromium/ash/shelf/shelf_item_delegate_manager.cc72
-rw-r--r--chromium/ash/shelf/shelf_item_delegate_manager.h67
-rw-r--r--chromium/ash/shelf/shelf_layout_manager.cc1171
-rw-r--r--chromium/ash/shelf/shelf_layout_manager.h415
-rw-r--r--chromium/ash/shelf/shelf_layout_manager_observer.h43
-rw-r--r--chromium/ash/shelf/shelf_layout_manager_unittest.cc1926
-rw-r--r--chromium/ash/shelf/shelf_menu_model.h29
-rw-r--r--chromium/ash/shelf/shelf_model.cc191
-rw-r--r--chromium/ash/shelf/shelf_model.h96
-rw-r--r--chromium/ash/shelf/shelf_model_observer.h41
-rw-r--r--chromium/ash/shelf/shelf_model_unittest.cc405
-rw-r--r--chromium/ash/shelf/shelf_navigator.cc72
-rw-r--r--chromium/ash/shelf/shelf_navigator.h23
-rw-r--r--chromium/ash/shelf/shelf_navigator_unittest.cc195
-rw-r--r--chromium/ash/shelf/shelf_tooltip_manager.cc379
-rw-r--r--chromium/ash/shelf/shelf_tooltip_manager.h121
-rw-r--r--chromium/ash/shelf/shelf_tooltip_manager_unittest.cc286
-rw-r--r--chromium/ash/shelf/shelf_types.h57
-rw-r--r--chromium/ash/shelf/shelf_util.cc50
-rw-r--r--chromium/ash/shelf/shelf_util.h47
-rw-r--r--chromium/ash/shelf/shelf_view.cc2031
-rw-r--r--chromium/ash/shelf/shelf_view.h458
-rw-r--r--chromium/ash/shelf/shelf_view_unittest.cc1782
-rw-r--r--chromium/ash/shelf/shelf_widget.cc721
-rw-r--r--chromium/ash/shelf/shelf_widget.h121
-rw-r--r--chromium/ash/shelf/shelf_widget_unittest.cc194
-rw-r--r--chromium/ash/shelf/shelf_window_watcher.cc224
-rw-r--r--chromium/ash/shelf/shelf_window_watcher.h116
-rw-r--r--chromium/ash/shelf/shelf_window_watcher_item_delegate.cc68
-rw-r--r--chromium/ash/shelf/shelf_window_watcher_item_delegate.h47
-rw-r--r--chromium/ash/shelf/shelf_window_watcher_unittest.cc175
-rw-r--r--chromium/ash/shell.cc1040
-rw-r--r--chromium/ash/shell.h711
-rw-r--r--chromium/ash/shell/DEPS5
-rw-r--r--chromium/ash/shell/app_list.cc359
-rw-r--r--chromium/ash/shell/bubble.cc47
-rw-r--r--chromium/ash/shell/content_client/DEPS4
-rw-r--r--chromium/ash/shell/content_client/shell_browser_main_parts.cc171
-rw-r--r--chromium/ash/shell/content_client/shell_browser_main_parts.h60
-rw-r--r--chromium/ash/shell/content_client/shell_content_browser_client.cc40
-rw-r--r--chromium/ash/shell/content_client/shell_content_browser_client.h47
-rw-r--r--chromium/ash/shell/content_client/shell_main_delegate.cc45
-rw-r--r--chromium/ash/shell/content_client/shell_main_delegate.h45
-rw-r--r--chromium/ash/shell/context_menu.cc70
-rw-r--r--chromium/ash/shell/context_menu.h51
-rw-r--r--chromium/ash/shell/example_factory.h31
-rw-r--r--chromium/ash/shell/keyboard_controller_proxy_stub.cc45
-rw-r--r--chromium/ash/shell/keyboard_controller_proxy_stub.h41
-rw-r--r--chromium/ash/shell/lock_view.cc109
-rw-r--r--chromium/ash/shell/panel_window.cc89
-rw-r--r--chromium/ash/shell/panel_window.h55
-rw-r--r--chromium/ash/shell/shelf_delegate_impl.cc53
-rw-r--r--chromium/ash/shell/shelf_delegate_impl.h47
-rw-r--r--chromium/ash/shell/shell_delegate_impl.cc174
-rw-r--r--chromium/ash/shell/shell_delegate_impl.h75
-rw-r--r--chromium/ash/shell/shell_main.cc38
-rw-r--r--chromium/ash/shell/shell_main_parts.cc21
-rw-r--r--chromium/ash/shell/shell_main_parts.h17
-rw-r--r--chromium/ash/shell/toplevel_window.cc113
-rw-r--r--chromium/ash/shell/toplevel_window.h56
-rw-r--r--chromium/ash/shell/widgets.cc145
-rw-r--r--chromium/ash/shell/window_type_launcher.cc399
-rw-r--r--chromium/ash/shell/window_type_launcher.h84
-rw-r--r--chromium/ash/shell/window_watcher.cc157
-rw-r--r--chromium/ash/shell/window_watcher.h61
-rw-r--r--chromium/ash/shell/window_watcher_shelf_item_delegate.cc57
-rw-r--r--chromium/ash/shell/window_watcher_shelf_item_delegate.h42
-rw-r--r--chromium/ash/shell/window_watcher_unittest.cc40
-rw-r--r--chromium/ash/shell_delegate.h141
-rw-r--r--chromium/ash/shell_factory.h37
-rw-r--r--chromium/ash/shell_observer.h48
-rw-r--r--chromium/ash/shell_unittest.cc538
-rw-r--r--chromium/ash/shell_window_ids.h110
-rw-r--r--chromium/ash/strings/ash_strings_am.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_ar.xtb227
-rw-r--r--chromium/ash/strings/ash_strings_bg.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_bn.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_ca.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_cs.xtb227
-rw-r--r--chromium/ash/strings/ash_strings_da.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_de.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_el.xtb229
-rw-r--r--chromium/ash/strings/ash_strings_en-GB.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_es-419.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_es.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_et.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_fa.xtb228
-rw-r--r--chromium/ash/strings/ash_strings_fi.xtb228
-rw-r--r--chromium/ash/strings/ash_strings_fil.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_fr.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_gu.xtb229
-rw-r--r--chromium/ash/strings/ash_strings_hi.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_hr.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_hu.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_id.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_it.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_iw.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_ja.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_kn.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_ko.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_lt.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_lv.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_ml.xtb229
-rw-r--r--chromium/ash/strings/ash_strings_mr.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_ms.xtb229
-rw-r--r--chromium/ash/strings/ash_strings_nl.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_no.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_pl.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_pt-BR.xtb228
-rw-r--r--chromium/ash/strings/ash_strings_pt-PT.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_ro.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_ru.xtb229
-rw-r--r--chromium/ash/strings/ash_strings_sk.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_sl.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_sr.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_sv.xtb228
-rw-r--r--chromium/ash/strings/ash_strings_sw.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_ta.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_te.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_th.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_tr.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_uk.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_vi.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_zh-CN.xtb230
-rw-r--r--chromium/ash/strings/ash_strings_zh-TW.xtb230
-rw-r--r--chromium/ash/system/DEPS3
-rw-r--r--chromium/ash/system/OWNERS3
-rw-r--r--chromium/ash/system/bluetooth/bluetooth_observer.h20
-rw-r--r--chromium/ash/system/bluetooth/tray_bluetooth.cc469
-rw-r--r--chromium/ash/system/bluetooth/tray_bluetooth.h48
-rw-r--r--chromium/ash/system/brightness_control_delegate.h39
-rw-r--r--chromium/ash/system/chromeos/DEPS3
-rw-r--r--chromium/ash/system/chromeos/audio/tray_audio.cc660
-rw-r--r--chromium/ash/system/chromeos/audio/tray_audio.h61
-rw-r--r--chromium/ash/system/chromeos/brightness/brightness_controller_chromeos.cc49
-rw-r--r--chromium/ash/system/chromeos/brightness/brightness_controller_chromeos.h39
-rw-r--r--chromium/ash/system/chromeos/brightness/tray_brightness.cc232
-rw-r--r--chromium/ash/system/chromeos/brightness/tray_brightness.h74
-rw-r--r--chromium/ash/system/chromeos/enterprise/enterprise_domain_observer.h20
-rw-r--r--chromium/ash/system/chromeos/enterprise/tray_enterprise.cc60
-rw-r--r--chromium/ash/system/chromeos/enterprise/tray_enterprise.h52
-rw-r--r--chromium/ash/system/chromeos/keyboard_brightness_controller.cc40
-rw-r--r--chromium/ash/system/chromeos/keyboard_brightness_controller.h35
-rw-r--r--chromium/ash/system/chromeos/label_tray_view.cc69
-rw-r--r--chromium/ash/system/chromeos/label_tray_view.h37
-rw-r--r--chromium/ash/system/chromeos/managed/tray_locally_managed_user.cc93
-rw-r--r--chromium/ash/system/chromeos/managed/tray_locally_managed_user.h55
-rw-r--r--chromium/ash/system/chromeos/managed/tray_locally_managed_user_unittest.cc89
-rw-r--r--chromium/ash/system/chromeos/network/network_connect.cc579
-rw-r--r--chromium/ash/system/chromeos/network/network_connect.h73
-rw-r--r--chromium/ash/system/chromeos/network/network_detailed_view.h55
-rw-r--r--chromium/ash/system/chromeos/network/network_icon.cc846
-rw-r--r--chromium/ash/system/chromeos/network/network_icon.h76
-rw-r--r--chromium/ash/system/chromeos/network/network_icon_animation.cc61
-rw-r--r--chromium/ash/system/chromeos/network/network_icon_animation.h48
-rw-r--r--chromium/ash/system/chromeos/network/network_icon_animation_observer.h27
-rw-r--r--chromium/ash/system/chromeos/network/network_observer.h26
-rw-r--r--chromium/ash/system/chromeos/network/network_state_list_detailed_view.cc896
-rw-r--r--chromium/ash/system/chromeos/network/network_state_list_detailed_view.h163
-rw-r--r--chromium/ash/system/chromeos/network/network_state_notifier.cc288
-rw-r--r--chromium/ash/system/chromeos/network/network_state_notifier.h92
-rw-r--r--chromium/ash/system/chromeos/network/network_state_notifier_unittest.cc107
-rw-r--r--chromium/ash/system/chromeos/network/tray_network.cc367
-rw-r--r--chromium/ash/system/chromeos/network/tray_network.h71
-rw-r--r--chromium/ash/system/chromeos/network/tray_network_state_observer.cc59
-rw-r--r--chromium/ash/system/chromeos/network/tray_network_state_observer.h53
-rw-r--r--chromium/ash/system/chromeos/network/tray_sms.cc420
-rw-r--r--chromium/ash/system/chromeos/network/tray_sms.h66
-rw-r--r--chromium/ash/system/chromeos/network/tray_vpn.cc180
-rw-r--r--chromium/ash/system/chromeos/network/tray_vpn.h56
-rw-r--r--chromium/ash/system/chromeos/power/power_event_observer.cc84
-rw-r--r--chromium/ash/system/chromeos/power/power_event_observer.h50
-rw-r--r--chromium/ash/system/chromeos/power/power_event_observer_unittest.cc72
-rw-r--r--chromium/ash/system/chromeos/power/power_status.cc301
-rw-r--r--chromium/ash/system/chromeos/power/power_status.h158
-rw-r--r--chromium/ash/system/chromeos/power/power_status_unittest.cc146
-rw-r--r--chromium/ash/system/chromeos/power/power_status_view.cc221
-rw-r--r--chromium/ash/system/chromeos/power/power_status_view.h69
-rw-r--r--chromium/ash/system/chromeos/power/tray_power.cc344
-rw-r--r--chromium/ash/system/chromeos/power/tray_power.h117
-rw-r--r--chromium/ash/system/chromeos/power/tray_power_unittest.cc236
-rw-r--r--chromium/ash/system/chromeos/power/user_activity_notifier.cc61
-rw-r--r--chromium/ash/system/chromeos/power/user_activity_notifier.h40
-rw-r--r--chromium/ash/system/chromeos/power/video_activity_notifier.cc41
-rw-r--r--chromium/ash/system/chromeos/power/video_activity_notifier.h37
-rw-r--r--chromium/ash/system/chromeos/screen_security/screen_capture_observer.h29
-rw-r--r--chromium/ash/system/chromeos/screen_security/screen_capture_tray_item.cc94
-rw-r--r--chromium/ash/system/chromeos/screen_security/screen_capture_tray_item.h47
-rw-r--r--chromium/ash/system/chromeos/screen_security/screen_share_observer.h29
-rw-r--r--chromium/ash/system/chromeos/screen_security/screen_share_tray_item.cc104
-rw-r--r--chromium/ash/system/chromeos/screen_security/screen_share_tray_item.h47
-rw-r--r--chromium/ash/system/chromeos/screen_security/screen_tray_item.cc214
-rw-r--r--chromium/ash/system/chromeos/screen_security/screen_tray_item.h147
-rw-r--r--chromium/ash/system/chromeos/screen_security/screen_tray_item_unittest.cc226
-rw-r--r--chromium/ash/system/chromeos/settings/tray_settings.cc172
-rw-r--r--chromium/ash/system/chromeos/settings/tray_settings.h40
-rw-r--r--chromium/ash/system/chromeos/system_clock_observer.cc36
-rw-r--r--chromium/ash/system/chromeos/system_clock_observer.h34
-rw-r--r--chromium/ash/system/chromeos/tray_display.cc429
-rw-r--r--chromium/ash/system/chromeos/tray_display.h79
-rw-r--r--chromium/ash/system/chromeos/tray_display_unittest.cc555
-rw-r--r--chromium/ash/system/chromeos/tray_tracing.cc113
-rw-r--r--chromium/ash/system/chromeos/tray_tracing.h57
-rw-r--r--chromium/ash/system/date/clock_observer.h23
-rw-r--r--chromium/ash/system/date/date_view.cc309
-rw-r--r--chromium/ash/system/date/date_view.h133
-rw-r--r--chromium/ash/system/date/date_view_unittest.cc66
-rw-r--r--chromium/ash/system/date/tray_date.cc240
-rw-r--r--chromium/ash/system/date/tray_date.h73
-rw-r--r--chromium/ash/system/drive/drive_observer.h22
-rw-r--r--chromium/ash/system/drive/tray_drive.cc517
-rw-r--r--chromium/ash/system/drive/tray_drive.h58
-rw-r--r--chromium/ash/system/ime/ime_observer.h22
-rw-r--r--chromium/ash/system/ime/tray_ime.cc321
-rw-r--r--chromium/ash/system/ime/tray_ime.h70
-rw-r--r--chromium/ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h29
-rw-r--r--chromium/ash/system/locale/locale_notification_controller.cc129
-rw-r--r--chromium/ash/system/locale/locale_notification_controller.h41
-rw-r--r--chromium/ash/system/locale/locale_observer.h32
-rw-r--r--chromium/ash/system/logout_button/logout_button_observer.h22
-rw-r--r--chromium/ash/system/logout_button/logout_button_tray.cc158
-rw-r--r--chromium/ash/system/logout_button/logout_button_tray.h62
-rw-r--r--chromium/ash/system/monitor/tray_monitor.cc100
-rw-r--r--chromium/ash/system/monitor/tray_monitor.h43
-rw-r--r--chromium/ash/system/session_length_limit/session_length_limit_observer.h26
-rw-r--r--chromium/ash/system/session_length_limit/tray_session_length_limit.cc386
-rw-r--r--chromium/ash/system/session_length_limit/tray_session_length_limit.h77
-rw-r--r--chromium/ash/system/session_length_limit/tray_session_length_limit_unittest.cc195
-rw-r--r--chromium/ash/system/status_area_widget.cc152
-rw-r--r--chromium/ash/system/status_area_widget.h88
-rw-r--r--chromium/ash/system/status_area_widget_delegate.cc158
-rw-r--r--chromium/ash/system/status_area_widget_delegate.h70
-rw-r--r--chromium/ash/system/system_notifier.cc79
-rw-r--r--chromium/ash/system/system_notifier.h45
-rw-r--r--chromium/ash/system/tray/actionable_view.cc95
-rw-r--r--chromium/ash/system/tray/actionable_view.h68
-rw-r--r--chromium/ash/system/tray/default_system_tray_delegate.cc279
-rw-r--r--chromium/ash/system/tray/default_system_tray_delegate.h101
-rw-r--r--chromium/ash/system/tray/fixed_sized_image_view.cc27
-rw-r--r--chromium/ash/system/tray/fixed_sized_image_view.h35
-rw-r--r--chromium/ash/system/tray/fixed_sized_scroll_view.cc57
-rw-r--r--chromium/ash/system/tray/fixed_sized_scroll_view.h46
-rw-r--r--chromium/ash/system/tray/hover_highlight_view.cc188
-rw-r--r--chromium/ash/system/tray/hover_highlight_view.h93
-rw-r--r--chromium/ash/system/tray/special_popup_row.cc134
-rw-r--r--chromium/ash/system/tray/special_popup_row.h54
-rw-r--r--chromium/ash/system/tray/system_tray.cc732
-rw-r--r--chromium/ash/system/tray/system_tray.h247
-rw-r--r--chromium/ash/system/tray/system_tray_bubble.cc388
-rw-r--r--chromium/ash/system/tray/system_tray_bubble.h82
-rw-r--r--chromium/ash/system/tray/system_tray_delegate.cc53
-rw-r--r--chromium/ash/system/tray/system_tray_delegate.h321
-rw-r--r--chromium/ash/system/tray/system_tray_item.cc92
-rw-r--r--chromium/ash/system/tray/system_tray_item.h125
-rw-r--r--chromium/ash/system/tray/system_tray_notifier.cc316
-rw-r--r--chromium/ash/system/tray/system_tray_notifier.h156
-rw-r--r--chromium/ash/system/tray/system_tray_unittest.cc421
-rw-r--r--chromium/ash/system/tray/throbber_view.cc110
-rw-r--r--chromium/ash/system/tray/throbber_view.h65
-rw-r--r--chromium/ash/system/tray/tray_background_view.cc634
-rw-r--r--chromium/ash/system/tray/tray_background_view.h189
-rw-r--r--chromium/ash/system/tray/tray_bar_button_with_title.cc113
-rw-r--r--chromium/ash/system/tray/tray_bar_button_with_title.h49
-rw-r--r--chromium/ash/system/tray/tray_bubble_wrapper.cc64
-rw-r--r--chromium/ash/system/tray/tray_bubble_wrapper.h51
-rw-r--r--chromium/ash/system/tray/tray_constants.cc91
-rw-r--r--chromium/ash/system/tray/tray_constants.h80
-rw-r--r--chromium/ash/system/tray/tray_details_view.cc165
-rw-r--r--chromium/ash/system/tray/tray_details_view.h73
-rw-r--r--chromium/ash/system/tray/tray_details_view_unittest.cc149
-rw-r--r--chromium/ash/system/tray/tray_empty.cc68
-rw-r--r--chromium/ash/system/tray/tray_empty.h34
-rw-r--r--chromium/ash/system/tray/tray_event_filter.cc113
-rw-r--r--chromium/ash/system/tray/tray_event_filter.h49
-rw-r--r--chromium/ash/system/tray/tray_image_item.cc93
-rw-r--r--chromium/ash/system/tray/tray_image_item.h56
-rw-r--r--chromium/ash/system/tray/tray_item_more.cc107
-rw-r--r--chromium/ash/system/tray/tray_item_more.h64
-rw-r--r--chromium/ash/system/tray/tray_item_view.cc141
-rw-r--r--chromium/ash/system/tray/tray_item_view.h85
-rw-r--r--chromium/ash/system/tray/tray_notification_view.cc172
-rw-r--r--chromium/ash/system/tray/tray_notification_view.h98
-rw-r--r--chromium/ash/system/tray/tray_popup_header_button.cc70
-rw-r--r--chromium/ash/system/tray/tray_popup_header_button.h45
-rw-r--r--chromium/ash/system/tray/tray_popup_label_button.cc32
-rw-r--r--chromium/ash/system/tray/tray_popup_label_button.h30
-rw-r--r--chromium/ash/system/tray/tray_popup_label_button_border.cc101
-rw-r--r--chromium/ash/system/tray/tray_popup_label_button_border.h32
-rw-r--r--chromium/ash/system/tray/tray_utils.cc66
-rw-r--r--chromium/ash/system/tray/tray_utils.h35
-rw-r--r--chromium/ash/system/tray/view_click_listener.h26
-rw-r--r--chromium/ash/system/tray_accessibility.cc396
-rw-r--r--chromium/ash/system/tray_accessibility.h137
-rw-r--r--chromium/ash/system/tray_caps_lock.cc201
-rw-r--r--chromium/ash/system/tray_caps_lock.h60
-rw-r--r--chromium/ash/system/tray_update.cc205
-rw-r--r--chromium/ash/system/tray_update.h51
-rw-r--r--chromium/ash/system/user/login_status.cc51
-rw-r--r--chromium/ash/system/user/login_status.h31
-rw-r--r--chromium/ash/system/user/tray_user.cc1425
-rw-r--r--chromium/ash/system/user/tray_user.h107
-rw-r--r--chromium/ash/system/user/tray_user_separator.cc48
-rw-r--r--chromium/ash/system/user/tray_user_separator.h47
-rw-r--r--chromium/ash/system/user/tray_user_unittest.cc320
-rw-r--r--chromium/ash/system/user/update_observer.h28
-rw-r--r--chromium/ash/system/user/user_observer.h25
-rw-r--r--chromium/ash/system/web_notification/web_notification_tray.cc624
-rw-r--r--chromium/ash/system/web_notification/web_notification_tray.h187
-rw-r--r--chromium/ash/system/web_notification/web_notification_tray_unittest.cc487
-rw-r--r--chromium/ash/tooltips/tooltip_controller_unittest.cc179
-rw-r--r--chromium/ash/touch/touch_hud_debug.cc490
-rw-r--r--chromium/ash/touch/touch_hud_debug.h87
-rw-r--r--chromium/ash/touch/touch_hud_projection.cc189
-rw-r--r--chromium/ash/touch/touch_hud_projection.h46
-rw-r--r--chromium/ash/touch/touch_observer_hud.cc150
-rw-r--r--chromium/ash/touch/touch_observer_hud.h93
-rw-r--r--chromium/ash/touch/touch_observer_hud_unittest.cc597
-rw-r--r--chromium/ash/touch/touch_uma.cc445
-rw-r--r--chromium/ash/touch/touch_uma.h83
-rw-r--r--chromium/ash/volume_control_delegate.h26
-rw-r--r--chromium/ash/wm/always_on_top_controller.cc72
-rw-r--r--chromium/ash/wm/always_on_top_controller.h51
-rw-r--r--chromium/ash/wm/app_list_controller.cc439
-rw-r--r--chromium/ash/wm/app_list_controller.h145
-rw-r--r--chromium/ash/wm/app_list_controller_unittest.cc45
-rw-r--r--chromium/ash/wm/ash_focus_rules.cc168
-rw-r--r--chromium/ash/wm/ash_focus_rules.h43
-rw-r--r--chromium/ash/wm/ash_native_cursor_manager.cc135
-rw-r--r--chromium/ash/wm/ash_native_cursor_manager.h69
-rw-r--r--chromium/ash/wm/ash_native_cursor_manager_interactive_uitest.cc90
-rw-r--r--chromium/ash/wm/ash_native_cursor_manager_unittest.cc206
-rw-r--r--chromium/ash/wm/base_layout_manager.cc281
-rw-r--r--chromium/ash/wm/base_layout_manager.h128
-rw-r--r--chromium/ash/wm/base_layout_manager_unittest.cc313
-rw-r--r--chromium/ash/wm/boot_splash_screen_chromeos.cc76
-rw-r--r--chromium/ash/wm/boot_splash_screen_chromeos.h53
-rw-r--r--chromium/ash/wm/caption_buttons/alternate_frame_size_button.cc211
-rw-r--r--chromium/ash/wm/caption_buttons/alternate_frame_size_button.h100
-rw-r--r--chromium/ash/wm/caption_buttons/alternate_frame_size_button_delegate.h57
-rw-r--r--chromium/ash/wm/caption_buttons/alternate_frame_size_button_unittest.cc367
-rw-r--r--chromium/ash/wm/caption_buttons/bubble_contents_button_row.cc216
-rw-r--r--chromium/ash/wm/caption_buttons/bubble_contents_button_row.h59
-rw-r--r--chromium/ash/wm/caption_buttons/caption_button_types.h30
-rw-r--r--chromium/ash/wm/caption_buttons/frame_caption_button.cc177
-rw-r--r--chromium/ash/wm/caption_buttons/frame_caption_button.h94
-rw-r--r--chromium/ash/wm/caption_buttons/frame_caption_button_container_view.cc276
-rw-r--r--chromium/ash/wm/caption_buttons/frame_caption_button_container_view.h136
-rw-r--r--chromium/ash/wm/caption_buttons/frame_caption_button_container_view_unittest.cc276
-rw-r--r--chromium/ash/wm/caption_buttons/frame_maximize_button.cc591
-rw-r--r--chromium/ash/wm/caption_buttons/frame_maximize_button.h193
-rw-r--r--chromium/ash/wm/caption_buttons/frame_maximize_button_observer.h26
-rw-r--r--chromium/ash/wm/caption_buttons/frame_maximize_button_unittest.cc878
-rw-r--r--chromium/ash/wm/caption_buttons/maximize_bubble_controller.cc99
-rw-r--r--chromium/ash/wm/caption_buttons/maximize_bubble_controller.h104
-rw-r--r--chromium/ash/wm/caption_buttons/maximize_bubble_controller_bubble.cc498
-rw-r--r--chromium/ash/wm/caption_buttons/maximize_bubble_controller_bubble.h109
-rw-r--r--chromium/ash/wm/coordinate_conversion.cc46
-rw-r--r--chromium/ash/wm/coordinate_conversion.h43
-rw-r--r--chromium/ash/wm/custom_frame_view_ash.cc502
-rw-r--r--chromium/ash/wm/custom_frame_view_ash.h90
-rw-r--r--chromium/ash/wm/default_window_resizer.cc72
-rw-r--r--chromium/ash/wm/default_window_resizer.h55
-rw-r--r--chromium/ash/wm/dock/OWNERS1
-rw-r--r--chromium/ash/wm/dock/dock_types.h55
-rw-r--r--chromium/ash/wm/dock/docked_window_layout_manager.cc1240
-rw-r--r--chromium/ash/wm/dock/docked_window_layout_manager.h309
-rw-r--r--chromium/ash/wm/dock/docked_window_layout_manager_observer.h41
-rw-r--r--chromium/ash/wm/dock/docked_window_layout_manager_unittest.cc819
-rw-r--r--chromium/ash/wm/dock/docked_window_resizer.cc337
-rw-r--r--chromium/ash/wm/dock/docked_window_resizer.h110
-rw-r--r--chromium/ash/wm/dock/docked_window_resizer_unittest.cc1436
-rw-r--r--chromium/ash/wm/drag_window_controller.cc126
-rw-r--r--chromium/ash/wm/drag_window_controller.h97
-rw-r--r--chromium/ash/wm/drag_window_resizer.cc277
-rw-r--r--chromium/ash/wm/drag_window_resizer.h86
-rw-r--r--chromium/ash/wm/drag_window_resizer_unittest.cc674
-rw-r--r--chromium/ash/wm/event_client_impl.cc60
-rw-r--r--chromium/ash/wm/event_client_impl.h33
-rw-r--r--chromium/ash/wm/event_rewriter_event_filter.cc56
-rw-r--r--chromium/ash/wm/event_rewriter_event_filter.h41
-rw-r--r--chromium/ash/wm/frame_border_hit_test_controller.cc109
-rw-r--r--chromium/ash/wm/frame_border_hit_test_controller.h60
-rw-r--r--chromium/ash/wm/gestures/OWNERS1
-rw-r--r--chromium/ash/wm/gestures/long_press_affordance_handler.cc370
-rw-r--r--chromium/ash/wm/gestures/long_press_affordance_handler.h75
-rw-r--r--chromium/ash/wm/gestures/overview_gesture_handler.cc110
-rw-r--r--chromium/ash/wm/gestures/overview_gesture_handler.h51
-rw-r--r--chromium/ash/wm/gestures/overview_gesture_handler_unittest.cc174
-rw-r--r--chromium/ash/wm/gestures/shelf_gesture_handler.cc92
-rw-r--r--chromium/ash/wm/gestures/shelf_gesture_handler.h43
-rw-r--r--chromium/ash/wm/gestures/system_pinch_handler.cc142
-rw-r--r--chromium/ash/wm/gestures/system_pinch_handler.h85
-rw-r--r--chromium/ash/wm/gestures/tray_gesture_handler.cc109
-rw-r--r--chromium/ash/wm/gestures/tray_gesture_handler.h48
-rw-r--r--chromium/ash/wm/gestures/two_finger_drag_handler.cc216
-rw-r--r--chromium/ash/wm/gestures/two_finger_drag_handler.h58
-rw-r--r--chromium/ash/wm/header_painter.cc583
-rw-r--r--chromium/ash/wm/header_painter.h204
-rw-r--r--chromium/ash/wm/header_painter_unittest.cc155
-rw-r--r--chromium/ash/wm/image_cursors.cc152
-rw-r--r--chromium/ash/wm/image_cursors.h63
-rw-r--r--chromium/ash/wm/immersive_fullscreen_controller.cc931
-rw-r--r--chromium/ash/wm/immersive_fullscreen_controller.h298
-rw-r--r--chromium/ash/wm/immersive_fullscreen_controller_unittest.cc958
-rw-r--r--chromium/ash/wm/immersive_revealed_lock.cc21
-rw-r--r--chromium/ash/wm/immersive_revealed_lock.h47
-rw-r--r--chromium/ash/wm/lock_state_controller.cc674
-rw-r--r--chromium/ash/wm/lock_state_controller.h328
-rw-r--r--chromium/ash/wm/lock_state_controller_unittest.cc1056
-rw-r--r--chromium/ash/wm/lock_state_observer.h28
-rw-r--r--chromium/ash/wm/mru_window_tracker.cc198
-rw-r--r--chromium/ash/wm/mru_window_tracker.h89
-rw-r--r--chromium/ash/wm/mru_window_tracker_unittest.cc84
-rw-r--r--chromium/ash/wm/overlay_event_filter.cc74
-rw-r--r--chromium/ash/wm/overlay_event_filter.h71
-rw-r--r--chromium/ash/wm/overview/scoped_transform_overview_window.cc267
-rw-r--r--chromium/ash/wm/overview/scoped_transform_overview_window.h118
-rw-r--r--chromium/ash/wm/overview/scoped_window_copy.cc178
-rw-r--r--chromium/ash/wm/overview/scoped_window_copy.h54
-rw-r--r--chromium/ash/wm/overview/window_overview.cc444
-rw-r--r--chromium/ash/wm/overview/window_overview.h128
-rw-r--r--chromium/ash/wm/overview/window_selector.cc521
-rw-r--r--chromium/ash/wm/overview/window_selector.h145
-rw-r--r--chromium/ash/wm/overview/window_selector_controller.cc97
-rw-r--r--chromium/ash/wm/overview/window_selector_controller.h74
-rw-r--r--chromium/ash/wm/overview/window_selector_delegate.h32
-rw-r--r--chromium/ash/wm/overview/window_selector_item.cc37
-rw-r--r--chromium/ash/wm/overview/window_selector_item.h98
-rw-r--r--chromium/ash/wm/overview/window_selector_panels.cc184
-rw-r--r--chromium/ash/wm/overview/window_selector_panels.h51
-rw-r--r--chromium/ash/wm/overview/window_selector_unittest.cc998
-rw-r--r--chromium/ash/wm/overview/window_selector_window.cc64
-rw-r--r--chromium/ash/wm/overview/window_selector_window.h47
-rw-r--r--chromium/ash/wm/panels/OWNERS2
-rw-r--r--chromium/ash/wm/panels/panel_frame_view.cc148
-rw-r--r--chromium/ash/wm/panels/panel_frame_view.h80
-rw-r--r--chromium/ash/wm/panels/panel_layout_manager.cc895
-rw-r--r--chromium/ash/wm/panels/panel_layout_manager.h196
-rw-r--r--chromium/ash/wm/panels/panel_layout_manager_unittest.cc800
-rw-r--r--chromium/ash/wm/panels/panel_window_event_handler.cc50
-rw-r--r--chromium/ash/wm/panels/panel_window_event_handler.h35
-rw-r--r--chromium/ash/wm/panels/panel_window_resizer.cc241
-rw-r--r--chromium/ash/wm/panels/panel_window_resizer.h94
-rw-r--r--chromium/ash/wm/panels/panel_window_resizer_unittest.cc537
-rw-r--r--chromium/ash/wm/partial_screenshot_view.cc243
-rw-r--r--chromium/ash/wm/partial_screenshot_view.h75
-rw-r--r--chromium/ash/wm/partial_screenshot_view_unittest.cc77
-rw-r--r--chromium/ash/wm/power_button_controller.cc110
-rw-r--r--chromium/ash/wm/power_button_controller.h69
-rw-r--r--chromium/ash/wm/resize_shadow.cc110
-rw-r--r--chromium/ash/wm/resize_shadow.h68
-rw-r--r--chromium/ash/wm/resize_shadow_and_cursor_unittest.cc229
-rw-r--r--chromium/ash/wm/resize_shadow_controller.cc74
-rw-r--r--chromium/ash/wm/resize_shadow_controller.h65
-rw-r--r--chromium/ash/wm/root_window_layout_manager.cc78
-rw-r--r--chromium/ash/wm/root_window_layout_manager.h56
-rw-r--r--chromium/ash/wm/screen_dimmer.cc69
-rw-r--r--chromium/ash/wm/screen_dimmer.h71
-rw-r--r--chromium/ash/wm/screen_dimmer_unittest.cc79
-rw-r--r--chromium/ash/wm/session_state_animator.cc617
-rw-r--r--chromium/ash/wm/session_state_animator.h180
-rw-r--r--chromium/ash/wm/solo_window_tracker.cc210
-rw-r--r--chromium/ash/wm/solo_window_tracker.h81
-rw-r--r--chromium/ash/wm/solo_window_tracker_unittest.cc429
-rw-r--r--chromium/ash/wm/stacking_controller.cc143
-rw-r--r--chromium/ash/wm/stacking_controller.h43
-rw-r--r--chromium/ash/wm/stacking_controller_unittest.cc63
-rw-r--r--chromium/ash/wm/status_area_layout_manager.cc81
-rw-r--r--chromium/ash/wm/status_area_layout_manager.h51
-rw-r--r--chromium/ash/wm/sticky_keys.cc445
-rw-r--r--chromium/ash/wm/sticky_keys.h240
-rw-r--r--chromium/ash/wm/sticky_keys_unittest.cc876
-rw-r--r--chromium/ash/wm/system_background_controller.cc45
-rw-r--r--chromium/ash/wm/system_background_controller.h54
-rw-r--r--chromium/ash/wm/system_gesture_event_filter.cc161
-rw-r--r--chromium/ash/wm/system_gesture_event_filter.h79
-rw-r--r--chromium/ash/wm/system_gesture_event_filter_unittest.cc673
-rw-r--r--chromium/ash/wm/system_modal_container_event_filter.cc36
-rw-r--r--chromium/ash/wm/system_modal_container_event_filter.h37
-rw-r--r--chromium/ash/wm/system_modal_container_event_filter_delegate.h26
-rw-r--r--chromium/ash/wm/system_modal_container_layout_manager.cc224
-rw-r--r--chromium/ash/wm/system_modal_container_layout_manager.h98
-rw-r--r--chromium/ash/wm/system_modal_container_layout_manager_unittest.cc495
-rw-r--r--chromium/ash/wm/toplevel_window_event_handler.cc534
-rw-r--r--chromium/ash/wm/toplevel_window_event_handler.h123
-rw-r--r--chromium/ash/wm/toplevel_window_event_handler_unittest.cc694
-rw-r--r--chromium/ash/wm/user_activity_detector.cc112
-rw-r--r--chromium/ash/wm/user_activity_detector.h81
-rw-r--r--chromium/ash/wm/user_activity_detector_unittest.cc225
-rw-r--r--chromium/ash/wm/user_activity_observer.h35
-rw-r--r--chromium/ash/wm/video_detector.cc135
-rw-r--r--chromium/ash/wm/video_detector.h109
-rw-r--r--chromium/ash/wm/video_detector_unittest.cc295
-rw-r--r--chromium/ash/wm/window_animations.cc551
-rw-r--r--chromium/ash/wm/window_animations.h76
-rw-r--r--chromium/ash/wm/window_animations_unittest.cc243
-rw-r--r--chromium/ash/wm/window_cycle_controller.cc139
-rw-r--r--chromium/ash/wm/window_cycle_controller.h82
-rw-r--r--chromium/ash/wm/window_cycle_controller_unittest.cc446
-rw-r--r--chromium/ash/wm/window_cycle_list.cc85
-rw-r--r--chromium/ash/wm/window_cycle_list.h59
-rw-r--r--chromium/ash/wm/window_manager_unittest.cc815
-rw-r--r--chromium/ash/wm/window_modality_controller_unittest.cc563
-rw-r--r--chromium/ash/wm/window_positioner.cc547
-rw-r--r--chromium/ash/wm/window_positioner.h131
-rw-r--r--chromium/ash/wm/window_positioner_unittest.cc114
-rw-r--r--chromium/ash/wm/window_properties.cc19
-rw-r--r--chromium/ash/wm/window_properties.h46
-rw-r--r--chromium/ash/wm/window_resizer.cc432
-rw-r--r--chromium/ash/wm/window_resizer.h157
-rw-r--r--chromium/ash/wm/window_state.cc344
-rw-r--r--chromium/ash/wm/window_state.h308
-rw-r--r--chromium/ash/wm/window_state_delegate.cc21
-rw-r--r--chromium/ash/wm/window_state_delegate.h35
-rw-r--r--chromium/ash/wm/window_state_observer.h28
-rw-r--r--chromium/ash/wm/window_util.cc145
-rw-r--r--chromium/ash/wm/window_util.h87
-rw-r--r--chromium/ash/wm/window_util_unittest.cc32
-rw-r--r--chromium/ash/wm/wm_types.cc49
-rw-r--r--chromium/ash/wm/wm_types.h52
-rw-r--r--chromium/ash/wm/workspace/magnetism_matcher.cc194
-rw-r--r--chromium/ash/wm/workspace/magnetism_matcher.h191
-rw-r--r--chromium/ash/wm/workspace/magnetism_matcher_unittest.cc171
-rw-r--r--chromium/ash/wm/workspace/multi_window_resize_controller.cc545
-rw-r--r--chromium/ash/wm/workspace/multi_window_resize_controller.h186
-rw-r--r--chromium/ash/wm/workspace/multi_window_resize_controller_unittest.cc258
-rw-r--r--chromium/ash/wm/workspace/phantom_window_controller.cc214
-rw-r--r--chromium/ash/wm/workspace/phantom_window_controller.h103
-rw-r--r--chromium/ash/wm/workspace/snap_sizer.cc292
-rw-r--r--chromium/ash/wm/workspace/snap_sizer.h140
-rw-r--r--chromium/ash/wm/workspace/snap_sizer_unittest.cc393
-rw-r--r--chromium/ash/wm/workspace/snap_types.h23
-rw-r--r--chromium/ash/wm/workspace/workspace_event_handler.cc180
-rw-r--r--chromium/ash/wm/workspace/workspace_event_handler.h51
-rw-r--r--chromium/ash/wm/workspace/workspace_event_handler_test_helper.cc19
-rw-r--r--chromium/ash/wm/workspace/workspace_event_handler_test_helper.h31
-rw-r--r--chromium/ash/wm/workspace/workspace_event_handler_unittest.cc348
-rw-r--r--chromium/ash/wm/workspace/workspace_layout_manager.cc436
-rw-r--r--chromium/ash/wm/workspace/workspace_layout_manager.h115
-rw-r--r--chromium/ash/wm/workspace/workspace_layout_manager_unittest.cc481
-rw-r--r--chromium/ash/wm/workspace/workspace_types.h27
-rw-r--r--chromium/ash/wm/workspace/workspace_window_resizer.cc1051
-rw-r--r--chromium/ash/wm/workspace/workspace_window_resizer.h236
-rw-r--r--chromium/ash/wm/workspace/workspace_window_resizer_unittest.cc2027
-rw-r--r--chromium/ash/wm/workspace_controller.cc145
-rw-r--r--chromium/ash/wm/workspace_controller.h55
-rw-r--r--chromium/ash/wm/workspace_controller_test_helper.cc32
-rw-r--r--chromium/ash/wm/workspace_controller_test_helper.h33
-rw-r--r--chromium/ash/wm/workspace_controller_unittest.cc1316
-rw-r--r--chromium/athena/athena.gyp150
-rw-r--r--chromium/athena/main/athena_main.gyp59
-rw-r--r--chromium/base/BUILD.gn1373
-rw-r--r--chromium/base/DEPS7
-rw-r--r--chromium/base/PRESUBMIT.py14
-rw-r--r--chromium/base/allocator/BUILD.gn248
-rw-r--r--chromium/base/allocator/allocator.gyp34
-rw-r--r--chromium/base/allocator/allocator_shim.cc63
-rw-r--r--chromium/base/allocator/allocator_unittest.cc520
-rw-r--r--chromium/base/allocator/allocator_unittests.cc521
-rwxr-xr-xchromium/base/allocator/prep_libc.py2
-rw-r--r--chromium/base/allocator/type_profiler_map_unittest.cc99
-rw-r--r--chromium/base/allocator/type_profiler_map_unittests.cc99
-rw-r--r--chromium/base/allocator/type_profiler_unittest.cc189
-rw-r--r--chromium/base/allocator/type_profiler_unittests.cc189
-rw-r--r--chromium/base/android/OWNERS2
-rw-r--r--chromium/base/android/activity_state_list.h16
-rw-r--r--chromium/base/android/activity_status.cc66
-rw-r--r--chromium/base/android/activity_status.h98
-rw-r--r--chromium/base/android/activity_status_unittest.cc128
-rw-r--r--chromium/base/android/application_state_list.h17
-rw-r--r--chromium/base/android/application_status_listener.cc74
-rw-r--r--chromium/base/android/application_status_listener.h79
-rw-r--r--chromium/base/android/application_status_listener_unittest.cc130
-rw-r--r--chromium/base/android/build_info.cc3
-rw-r--r--chromium/base/android/build_info.h5
-rw-r--r--chromium/base/android/content_uri_utils.cc7
-rw-r--r--chromium/base/android/content_uri_utils.h3
-rw-r--r--chromium/base/android/context_types.cc26
-rw-r--r--chromium/base/android/context_types.h22
-rw-r--r--chromium/base/android/event_log.cc20
-rw-r--r--chromium/base/android/event_log.h22
-rw-r--r--chromium/base/android/jni_generator/jni_generator.gyp3
-rw-r--r--chromium/base/android/library_loader/library_loader_hooks.cc73
-rw-r--r--chromium/base/android/library_loader/library_loader_hooks.h51
-rw-r--r--chromium/base/android/linker/DEPS4
-rw-r--r--chromium/base/android/path_utils_unittest.cc3
-rw-r--r--chromium/base/android/scoped_java_ref.cc18
-rw-r--r--chromium/base/android/scoped_java_ref.h17
-rw-r--r--chromium/base/android/sys_utils.h2
-rw-r--r--chromium/base/android/trace_event_binding.cc169
-rw-r--r--chromium/base/android/trace_event_binding.h18
-rw-r--r--chromium/base/atomicops.h11
-rw-r--r--chromium/base/atomicops_internals_arm64_gcc.h307
-rw-r--r--chromium/base/atomicops_internals_arm_gcc.h15
-rw-r--r--chromium/base/atomicops_internals_mac.h42
-rw-r--r--chromium/base/atomicops_internals_tsan.h294
-rw-r--r--chromium/base/atomicops_internals_x86_gcc.cc38
-rw-r--r--chromium/base/atomicops_internals_x86_gcc.h27
-rw-r--r--chromium/base/atomicops_internals_x86_msvc.h10
-rw-r--r--chromium/base/atomicops_unittest.cc10
-rw-r--r--chromium/base/base.gyp511
-rw-r--r--chromium/base/base.gypi224
-rw-r--r--chromium/base/base.isolate29
-rw-r--r--chromium/base/base_nacl.gyp71
-rw-r--r--chromium/base/base_paths.cc35
-rw-r--r--chromium/base/base_paths.h4
-rw-r--r--chromium/base/base_paths_android.cc3
-rw-r--r--chromium/base/base_paths_mac.mm3
-rw-r--r--chromium/base/base_paths_posix.cc3
-rw-r--r--chromium/base/base_paths_posix.h2
-rw-r--r--chromium/base/base_paths_win.cc13
-rw-r--r--chromium/base/base_paths_win.h2
-rw-r--r--chromium/base/base_switches.cc9
-rw-r--r--chromium/base/base_switches.h2
-rw-r--r--chromium/base/base_unittests.isolate8
-rw-r--r--chromium/base/base_untrusted.gyp41
-rw-r--r--chromium/base/basictypes.h373
-rw-r--r--chromium/base/big_endian.cc97
-rw-r--r--chromium/base/big_endian.h102
-rw-r--r--chromium/base/big_endian_unittest.cc100
-rw-r--r--chromium/base/bind.h6
-rw-r--r--chromium/base/bind.h.pump4
-rw-r--r--chromium/base/bind_helpers.h2
-rw-r--r--chromium/base/bind_unittest.cc4
-rw-r--r--chromium/base/bind_unittest.nc3
-rw-r--r--chromium/base/callback_list.h30
-rw-r--r--chromium/base/callback_list.h.pump30
-rw-r--r--chromium/base/cancelable_callback_unittest.cc2
-rw-r--r--chromium/base/command_line.cc14
-rw-r--r--chromium/base/command_line.h19
-rw-r--r--chromium/base/command_line_unittest.cc12
-rw-r--r--chromium/base/compiler_specific.h34
-rw-r--r--chromium/base/containers/hash_tables.h4
-rw-r--r--chromium/base/containers/scoped_ptr_hash_map.h42
-rw-r--r--chromium/base/containers/small_map_unittest.cc25
-rw-r--r--chromium/base/containers/stack_container.h7
-rw-r--r--chromium/base/cpu.cc70
-rw-r--r--chromium/base/critical_closure.h53
-rw-r--r--chromium/base/critical_closure_internal_ios.mm17
-rw-r--r--chromium/base/critical_closure_ios.mm49
-rw-r--r--chromium/base/debug/OWNERS2
-rw-r--r--chromium/base/debug/asan_invalid_access.cc94
-rw-r--r--chromium/base/debug/asan_invalid_access.h47
-rw-r--r--chromium/base/debug/debug_on_start_win.cc74
-rw-r--r--chromium/base/debug/debug_on_start_win.h83
-rw-r--r--chromium/base/debug/debugger.h4
-rw-r--r--chromium/base/debug/debugger_posix.cc22
-rw-r--r--chromium/base/debug/debugger_win.cc89
-rw-r--r--chromium/base/debug/dump_without_crashing.cc32
-rw-r--r--chromium/base/debug/dump_without_crashing.h30
-rw-r--r--chromium/base/debug/gdi_debug_util_win.cc129
-rw-r--r--chromium/base/debug/gdi_debug_util_win.h23
-rw-r--r--chromium/base/debug/leak_tracker.h6
-rw-r--r--chromium/base/debug/proc_maps_linux.cc23
-rw-r--r--chromium/base/debug/proc_maps_linux_unittest.cc32
-rw-r--r--chromium/base/debug/sanitizer_options.cc117
-rw-r--r--chromium/base/debug/stack_trace.cc2
-rw-r--r--chromium/base/debug/stack_trace.h13
-rw-r--r--chromium/base/debug/stack_trace_android.cc10
-rw-r--r--chromium/base/debug/stack_trace_ios.mm53
-rw-r--r--chromium/base/debug/stack_trace_posix.cc317
-rw-r--r--chromium/base/debug/stack_trace_unittest.cc4
-rw-r--r--chromium/base/debug/stack_trace_win.cc19
-rw-r--r--chromium/base/debug/trace_event.h51
-rw-r--r--chromium/base/debug/trace_event_android.cc1
-rw-r--r--chromium/base/debug/trace_event_impl.cc254
-rw-r--r--chromium/base/debug/trace_event_impl.h59
-rw-r--r--chromium/base/debug/trace_event_memory.cc4
-rw-r--r--chromium/base/debug/trace_event_memory_unittest.cc4
-rw-r--r--chromium/base/debug/trace_event_synthetic_delay.cc233
-rw-r--r--chromium/base/debug/trace_event_synthetic_delay.h166
-rw-r--r--chromium/base/debug/trace_event_synthetic_delay_unittest.cc156
-rw-r--r--chromium/base/debug/trace_event_unittest.cc337
-rw-r--r--chromium/base/debug/tsan_suppressions.cc297
-rw-r--r--chromium/base/file_descriptor_posix.h17
-rw-r--r--chromium/base/file_util.cc64
-rw-r--r--chromium/base/file_util.h160
-rw-r--r--chromium/base/file_util_linux.cc54
-rw-r--r--chromium/base/file_util_mac.mm19
-rw-r--r--chromium/base/file_util_posix.cc215
-rw-r--r--chromium/base/file_util_unittest.cc464
-rw-r--r--chromium/base/file_util_win.cc273
-rw-r--r--chromium/base/file_version_info_mac.h34
-rw-r--r--chromium/base/file_version_info_mac.mm50
-rw-r--r--chromium/base/file_version_info_win.cc30
-rw-r--r--chromium/base/file_version_info_win.h32
-rw-r--r--chromium/base/files/OWNERS5
-rw-r--r--chromium/base/files/file.cc86
-rw-r--r--chromium/base/files/file.h51
-rw-r--r--chromium/base/files/file_path.cc20
-rw-r--r--chromium/base/files/file_path.h17
-rw-r--r--chromium/base/files/file_path_watcher.cc17
-rw-r--r--chromium/base/files/file_path_watcher.h5
-rw-r--r--chromium/base/files/file_path_watcher_browsertest.cc67
-rw-r--r--chromium/base/files/file_path_watcher_fsevents.cc263
-rw-r--r--chromium/base/files/file_path_watcher_fsevents.h73
-rw-r--r--chromium/base/files/file_path_watcher_kqueue.cc173
-rw-r--r--chromium/base/files/file_path_watcher_kqueue.h132
-rw-r--r--chromium/base/files/file_path_watcher_linux.cc450
-rw-r--r--chromium/base/files/file_path_watcher_mac.cc60
-rw-r--r--chromium/base/files/file_path_watcher_win.cc31
-rw-r--r--chromium/base/files/file_posix.cc190
-rw-r--r--chromium/base/files/file_proxy.cc359
-rw-r--r--chromium/base/files/file_proxy.h142
-rw-r--r--chromium/base/files/file_proxy_unittest.cc370
-rw-r--r--chromium/base/files/file_unittest.cc139
-rw-r--r--chromium/base/files/file_util_proxy.cc331
-rw-r--r--chromium/base/files/file_util_proxy.h143
-rw-r--r--chromium/base/files/file_util_proxy_unittest.cc310
-rw-r--r--chromium/base/files/file_win.cc60
-rw-r--r--chromium/base/files/important_file_writer.cc83
-rw-r--r--chromium/base/files/important_file_writer.h18
-rw-r--r--chromium/base/files/important_file_writer_unittest.cc73
-rw-r--r--chromium/base/files/memory_mapped_file.cc27
-rw-r--r--chromium/base/files/memory_mapped_file.h30
-rw-r--r--chromium/base/files/memory_mapped_file_posix.cc19
-rw-r--r--chromium/base/files/memory_mapped_file_win.cc71
-rw-r--r--chromium/base/files/scoped_file.cc35
-rw-r--r--chromium/base/files/scoped_file.h61
-rw-r--r--chromium/base/files/scoped_temp_dir_unittest.cc16
-rw-r--r--chromium/base/format_macros.h28
-rw-r--r--chromium/base/hash.cc73
-rw-r--r--chromium/base/hash.h25
-rw-r--r--chromium/base/hash_unittest.cc82
-rw-r--r--chromium/base/i18n/break_iterator.cc64
-rw-r--r--chromium/base/i18n/break_iterator.h19
-rw-r--r--chromium/base/i18n/build_utf8_validator_tables.cc466
-rw-r--r--chromium/base/i18n/file_util_icu.cc12
-rw-r--r--chromium/base/i18n/file_util_icu_unittest.cc4
-rw-r--r--chromium/base/i18n/icu_util.cc80
-rw-r--r--chromium/base/i18n/icu_util.h10
-rw-r--r--chromium/base/i18n/rtl.cc39
-rw-r--r--chromium/base/i18n/rtl.h4
-rw-r--r--chromium/base/i18n/rtl_unittest.cc72
-rw-r--r--chromium/base/i18n/streaming_utf8_validator.cc59
-rw-r--r--chromium/base/i18n/streaming_utf8_validator.h63
-rw-r--r--chromium/base/i18n/streaming_utf8_validator_perftest.cc234
-rw-r--r--chromium/base/i18n/streaming_utf8_validator_unittest.cc412
-rw-r--r--chromium/base/i18n/utf8_validator_tables.cc55
-rw-r--r--chromium/base/i18n/utf8_validator_tables.h29
-rw-r--r--chromium/base/id_map.h4
-rw-r--r--chromium/base/id_map_unittest.cc54
-rw-r--r--chromium/base/ios/device_util.h23
-rw-r--r--chromium/base/ios/device_util.mm33
-rw-r--r--chromium/base/ios/device_util_unittest.mm34
-rw-r--r--chromium/base/ios/ios_util.h3
-rw-r--r--chromium/base/ios/ios_util.mm4
-rw-r--r--chromium/base/json/json_file_value_serializer.cc5
-rw-r--r--chromium/base/json/json_string_value_serializer.cc3
-rw-r--r--chromium/base/json/json_value_serializer_unittest.cc7
-rw-r--r--chromium/base/json/json_writer.cc300
-rw-r--r--chromium/base/json/json_writer.h26
-rw-r--r--chromium/base/json/json_writer_unittest.cc137
-rw-r--r--chromium/base/lazy_instance.h4
-rw-r--r--chromium/base/linux_util.cc125
-rw-r--r--chromium/base/linux_util.h9
-rw-r--r--chromium/base/location.cc6
-rw-r--r--chromium/base/logging.cc167
-rw-r--r--chromium/base/logging.h206
-rw-r--r--chromium/base/logging_unittest.cc80
-rw-r--r--chromium/base/logging_win.cc1
-rw-r--r--chromium/base/mac/bind_objc_block.h19
-rw-r--r--chromium/base/mac/bind_objc_block_unittest.mm13
-rw-r--r--chromium/base/mac/cocoa_protocols.h11
-rw-r--r--chromium/base/mac/foundation_util_unittest.mm73
-rw-r--r--chromium/base/mac/launch_services_util.h2
-rw-r--r--chromium/base/mac/mac_logging.h18
-rw-r--r--chromium/base/mac/mac_util.h28
-rw-r--r--chromium/base/mac/mac_util.mm56
-rw-r--r--chromium/base/mac/mac_util_unittest.mm38
-rw-r--r--chromium/base/mac/mach_logging.cc87
-rw-r--r--chromium/base/mac/mach_logging.h167
-rw-r--r--chromium/base/mac/os_crash_dumps.cc9
-rw-r--r--chromium/base/mac/scoped_cftyperef.h85
-rw-r--r--chromium/base/mac/scoped_mach_port.cc25
-rw-r--r--chromium/base/mac/scoped_mach_port.h55
-rw-r--r--chromium/base/mac/scoped_mach_vm.cc33
-rw-r--r--chromium/base/mac/scoped_mach_vm.h93
-rw-r--r--chromium/base/mac/scoped_typeref.h132
-rw-r--r--chromium/base/mac/sdk_forward_declarations.h194
-rw-r--r--chromium/base/mac/sdk_forward_declarations.mm14
-rw-r--r--chromium/base/macros.h313
-rw-r--r--chromium/base/md5.cc16
-rw-r--r--chromium/base/md5.h6
-rw-r--r--chromium/base/md5_unittest.cc45
-rw-r--r--chromium/base/memory/aligned_memory.h10
-rw-r--r--chromium/base/memory/aligned_memory_unittest.cc9
-rw-r--r--chromium/base/memory/discardable_memory.cc86
-rw-r--r--chromium/base/memory/discardable_memory.h78
-rw-r--r--chromium/base/memory/discardable_memory_allocator_android.cc418
-rw-r--r--chromium/base/memory/discardable_memory_allocator_android.h65
-rw-r--r--chromium/base/memory/discardable_memory_allocator_android_unittest.cc232
-rw-r--r--chromium/base/memory/discardable_memory_android.cc299
-rw-r--r--chromium/base/memory/discardable_memory_android.h37
-rw-r--r--chromium/base/memory/discardable_memory_ashmem.cc75
-rw-r--r--chromium/base/memory/discardable_memory_ashmem.h55
-rw-r--r--chromium/base/memory/discardable_memory_ashmem_allocator.cc527
-rw-r--r--chromium/base/memory/discardable_memory_ashmem_allocator.h93
-rw-r--r--chromium/base/memory/discardable_memory_ashmem_allocator_unittest.cc319
-rw-r--r--chromium/base/memory/discardable_memory_emulated.cc79
-rw-r--r--chromium/base/memory/discardable_memory_emulated.h22
-rw-r--r--chromium/base/memory/discardable_memory_linux.cc62
-rw-r--r--chromium/base/memory/discardable_memory_mac.cc226
-rw-r--r--chromium/base/memory/discardable_memory_malloc.cc43
-rw-r--r--chromium/base/memory/discardable_memory_malloc.h35
-rw-r--r--chromium/base/memory/discardable_memory_manager.cc263
-rw-r--r--chromium/base/memory/discardable_memory_manager.h206
-rw-r--r--chromium/base/memory/discardable_memory_manager_unittest.cc505
-rw-r--r--chromium/base/memory/discardable_memory_provider.cc215
-rw-r--r--chromium/base/memory/discardable_memory_provider.h143
-rw-r--r--chromium/base/memory/discardable_memory_provider_unittest.cc406
-rw-r--r--chromium/base/memory/discardable_memory_unittest.cc106
-rw-r--r--chromium/base/memory/discardable_memory_win.cc62
-rw-r--r--chromium/base/memory/ref_counted.cc42
-rw-r--r--chromium/base/memory/ref_counted.h47
-rw-r--r--chromium/base/memory/ref_counted_memory.cc3
-rw-r--r--chromium/base/memory/ref_counted_memory.h16
-rw-r--r--chromium/base/memory/ref_counted_memory_unittest.cc16
-rw-r--r--chromium/base/memory/scoped_handle.h50
-rw-r--r--chromium/base/memory/scoped_ptr.h140
-rw-r--r--chromium/base/memory/scoped_ptr_unittest.cc2
-rw-r--r--chromium/base/memory/shared_memory.h86
-rw-r--r--chromium/base/memory/shared_memory_android.cc2
-rw-r--r--chromium/base/memory/shared_memory_nacl.cc7
-rw-r--r--chromium/base/memory/shared_memory_posix.cc83
-rw-r--r--chromium/base/memory/shared_memory_unittest.cc54
-rw-r--r--chromium/base/memory/shared_memory_win.cc27
-rw-r--r--chromium/base/memory/singleton.cc5
-rw-r--r--chromium/base/memory/singleton.h9
-rw-r--r--chromium/base/memory/weak_ptr.h2
-rw-r--r--chromium/base/memory/weak_ptr_unittest.cc4
-rw-r--r--chromium/base/message_loop/incoming_task_queue.cc25
-rw-r--r--chromium/base/message_loop/incoming_task_queue.h11
-rw-r--r--chromium/base/message_loop/message_loop.cc199
-rw-r--r--chromium/base/message_loop/message_loop.h233
-rw-r--r--chromium/base/message_loop/message_loop_test.cc57
-rw-r--r--chromium/base/message_loop/message_loop_test.h4
-rw-r--r--chromium/base/message_loop/message_loop_unittest.cc165
-rw-r--r--chromium/base/message_loop/message_pump.cc3
-rw-r--r--chromium/base/message_loop/message_pump.h4
-rw-r--r--chromium/base/message_loop/message_pump_android.cc58
-rw-r--r--chromium/base/message_loop/message_pump_dispatcher.h21
-rw-r--r--chromium/base/message_loop/message_pump_glib.cc163
-rw-r--r--chromium/base/message_loop/message_pump_glib.h23
-rw-r--r--chromium/base/message_loop/message_pump_glib_unittest.cc46
-rw-r--r--chromium/base/message_loop/message_pump_gtk.cc120
-rw-r--r--chromium/base/message_loop/message_pump_gtk.h70
-rw-r--r--chromium/base/message_loop/message_pump_io_ios_unittest.cc2
-rw-r--r--chromium/base/message_loop/message_pump_libevent.cc6
-rw-r--r--chromium/base/message_loop/message_pump_libevent_unittest.cc45
-rw-r--r--chromium/base/message_loop/message_pump_mac.h46
-rw-r--r--chromium/base/message_loop/message_pump_mac.mm124
-rw-r--r--chromium/base/message_loop/message_pump_observer.h30
-rw-r--r--chromium/base/message_loop/message_pump_ozone.cc61
-rw-r--r--chromium/base/message_loop/message_pump_ozone.h52
-rw-r--r--chromium/base/message_loop/message_pump_win.cc29
-rw-r--r--chromium/base/message_loop/message_pump_win.h35
-rw-r--r--chromium/base/message_loop/message_pump_x11.cc313
-rw-r--r--chromium/base/message_loop/message_pump_x11.h131
-rw-r--r--chromium/base/message_loop/timer_slack.h22
-rw-r--r--chromium/base/metrics/OWNERS9
-rw-r--r--chromium/base/metrics/field_trial.cc15
-rw-r--r--chromium/base/metrics/field_trial.h14
-rw-r--r--chromium/base/metrics/field_trial_unittest.cc74
-rw-r--r--chromium/base/metrics/histogram.cc22
-rw-r--r--chromium/base/metrics/histogram.h22
-rw-r--r--chromium/base/metrics/histogram_base.cc6
-rw-r--r--chromium/base/metrics/histogram_base.h32
-rw-r--r--chromium/base/metrics/histogram_delta_serialization.cc6
-rw-r--r--chromium/base/metrics/histogram_samples.cc22
-rw-r--r--chromium/base/metrics/histogram_samples.h6
-rw-r--r--chromium/base/metrics/histogram_snapshot_manager.cc11
-rw-r--r--chromium/base/metrics/histogram_snapshot_manager.h10
-rw-r--r--chromium/base/metrics/histogram_snapshot_manager_unittest.cc106
-rw-r--r--chromium/base/metrics/histogram_unittest.cc26
-rw-r--r--chromium/base/metrics/sample_vector.cc15
-rw-r--r--chromium/base/metrics/sample_vector.h6
-rw-r--r--chromium/base/metrics/statistics_recorder.h9
-rw-r--r--chromium/base/metrics/stats_table.cc65
-rw-r--r--chromium/base/metrics/stats_table.h33
-rw-r--r--chromium/base/metrics/stats_table_unittest.cc48
-rw-r--r--chromium/base/metrics/user_metrics.cc74
-rw-r--r--chromium/base/metrics/user_metrics.h60
-rw-r--r--chromium/base/metrics/user_metrics_action.h28
-rw-r--r--chromium/base/native_library.h33
-rw-r--r--chromium/base/native_library_mac.mm7
-rw-r--r--chromium/base/native_library_posix.cc8
-rw-r--r--chromium/base/native_library_win.cc31
-rw-r--r--chromium/base/nix/mime_util_xdg.cc616
-rw-r--r--chromium/base/nix/mime_util_xdg.h11
-rw-r--r--chromium/base/nix/xdg_util.cc13
-rw-r--r--chromium/base/numerics/OWNERS3
-rw-r--r--chromium/base/numerics/safe_conversions.h64
-rw-r--r--chromium/base/numerics/safe_conversions_impl.h217
-rw-r--r--chromium/base/numerics/safe_math.h271
-rw-r--r--chromium/base/numerics/safe_math_impl.h502
-rw-r--r--chromium/base/numerics/safe_numerics_unittest.cc580
-rw-r--r--chromium/base/observer_list_unittest.cc4
-rw-r--r--chromium/base/os_compat_android.cc11
-rw-r--r--chromium/base/path_service.cc17
-rw-r--r--chromium/base/path_service.h14
-rw-r--r--chromium/base/path_service_unittest.cc40
-rw-r--r--chromium/base/pickle.cc41
-rw-r--r--chromium/base/pickle.h29
-rw-r--r--chromium/base/pickle_unittest.cc2
-rw-r--r--chromium/base/platform_file.cc14
-rw-r--r--chromium/base/platform_file.h23
-rw-r--r--chromium/base/platform_file_posix.cc106
-rw-r--r--chromium/base/platform_file_unittest.cc22
-rw-r--r--chromium/base/platform_file_win.cc113
-rw-r--r--chromium/base/port.h20
-rw-r--r--chromium/base/posix/file_descriptor_shuffle.cc12
-rw-r--r--chromium/base/posix/file_descriptor_shuffle.h8
-rw-r--r--chromium/base/posix/global_descriptors.h4
-rw-r--r--chromium/base/posix/unix_domain_socket_linux.cc111
-rw-r--r--chromium/base/posix/unix_domain_socket_linux.h23
-rw-r--r--chromium/base/posix/unix_domain_socket_linux_unittest.cc90
-rw-r--r--chromium/base/power_monitor/power_monitor_device_source_win.cc4
-rw-r--r--chromium/base/prefs/OWNERS1
-rw-r--r--chromium/base/prefs/json_pref_store.cc197
-rw-r--r--chromium/base/prefs/json_pref_store.h72
-rw-r--r--chromium/base/prefs/json_pref_store_unittest.cc435
-rw-r--r--chromium/base/prefs/overlay_user_pref_store_unittest.cc68
-rw-r--r--chromium/base/prefs/persistent_pref_store.h49
-rw-r--r--chromium/base/prefs/pref_filter.h55
-rw-r--r--chromium/base/prefs/pref_notifier_impl_unittest.cc7
-rw-r--r--chromium/base/prefs/pref_registry.cc12
-rw-r--r--chromium/base/prefs/pref_registry_simple.cc13
-rw-r--r--chromium/base/prefs/pref_service.cc18
-rw-r--r--chromium/base/prefs/pref_service_factory.cc4
-rw-r--r--chromium/base/prefs/pref_service_unittest.cc10
-rw-r--r--chromium/base/prefs/pref_store_observer_mock.cc22
-rw-r--r--chromium/base/prefs/pref_store_observer_mock.h20
-rw-r--r--chromium/base/prefs/scoped_user_pref_update.cc2
-rw-r--r--chromium/base/prefs/scoped_user_pref_update_unittest.cc12
-rw-r--r--chromium/base/prefs/testing_pref_store.cc61
-rw-r--r--chromium/base/prefs/testing_pref_store.h28
-rw-r--r--chromium/base/prefs/value_map_pref_store.cc13
-rw-r--r--chromium/base/prefs/value_map_pref_store.h19
-rw-r--r--chromium/base/prefs/writeable_pref_store.h47
-rw-r--r--chromium/base/process/internal_linux.cc13
-rw-r--r--chromium/base/process/internal_linux.h15
-rw-r--r--chromium/base/process/kill_mac.cc11
-rw-r--r--chromium/base/process/kill_posix.cc63
-rw-r--r--chromium/base/process/kill_win.cc10
-rw-r--r--chromium/base/process/launch.cc13
-rw-r--r--chromium/base/process/launch.h48
-rw-r--r--chromium/base/process/launch_mac.cc20
-rw-r--r--chromium/base/process/launch_posix.cc104
-rw-r--r--chromium/base/process/launch_win.cc43
-rw-r--r--chromium/base/process/memory.cc30
-rw-r--r--chromium/base/process/memory.h34
-rw-r--r--chromium/base/process/memory_linux.cc40
-rw-r--r--chromium/base/process/memory_mac.mm53
-rw-r--r--chromium/base/process/memory_unittest.cc96
-rw-r--r--chromium/base/process/memory_win.cc11
-rw-r--r--chromium/base/process/process_handle.h4
-rw-r--r--chromium/base/process/process_handle_freebsd.cc1
-rw-r--r--chromium/base/process/process_handle_linux.cc2
-rw-r--r--chromium/base/process/process_handle_mac.cc9
-rw-r--r--chromium/base/process/process_info_linux.cc4
-rw-r--r--chromium/base/process/process_info_mac.cc2
-rw-r--r--chromium/base/process/process_iterator.h4
-rw-r--r--chromium/base/process/process_iterator_freebsd.cc2
-rw-r--r--chromium/base/process/process_iterator_linux.cc4
-rw-r--r--chromium/base/process/process_iterator_mac.cc1
-rw-r--r--chromium/base/process/process_linux.cc18
-rw-r--r--chromium/base/process/process_metrics.cc8
-rw-r--r--chromium/base/process/process_metrics.h16
-rw-r--r--chromium/base/process/process_metrics_freebsd.cc12
-rw-r--r--chromium/base/process/process_metrics_ios.cc4
-rw-r--r--chromium/base/process/process_metrics_linux.cc28
-rw-r--r--chromium/base/process/process_metrics_mac.cc136
-rw-r--r--chromium/base/process/process_metrics_openbsd.cc17
-rw-r--r--chromium/base/process/process_metrics_posix.cc17
-rw-r--r--chromium/base/process/process_metrics_win.cc15
-rw-r--r--chromium/base/process/process_util_unittest.cc104
-rw-r--r--chromium/base/rand_util.cc10
-rw-r--r--chromium/base/rand_util.h3
-rw-r--r--chromium/base/rand_util_nacl.cc48
-rw-r--r--chromium/base/rand_util_posix.cc21
-rw-r--r--chromium/base/rand_util_unittest.cc22
-rw-r--r--chromium/base/rand_util_win.cc40
-rw-r--r--chromium/base/run_loop.cc12
-rw-r--r--chromium/base/run_loop.h21
-rw-r--r--chromium/base/safe_numerics.h135
-rw-r--r--chromium/base/safe_numerics_unittest.cc151
-rw-r--r--chromium/base/safe_numerics_unittest.nc29
-rw-r--r--chromium/base/scoped_generic.h176
-rw-r--r--chromium/base/scoped_generic_unittest.cc153
-rw-r--r--chromium/base/scoped_observer.h16
-rw-r--r--chromium/base/security_unittest.cc18
-rw-r--r--chromium/base/sequence_checker.h8
-rw-r--r--chromium/base/sequence_checker_unittest.cc9
-rw-r--r--chromium/base/sha1_win.cc10
-rw-r--r--chromium/base/stl_util.h43
-rw-r--r--chromium/base/stl_util_unittest.cc160
-rw-r--r--chromium/base/strings/safe_sprintf_unittest.cc5
-rw-r--r--chromium/base/strings/string16.h5
-rw-r--r--chromium/base/strings/string_number_conversions.cc21
-rw-r--r--chromium/base/strings/string_piece.cc350
-rw-r--r--chromium/base/strings/string_piece.h328
-rw-r--r--chromium/base/strings/string_piece_unittest.cc282
-rw-r--r--chromium/base/strings/string_split.cc197
-rw-r--r--chromium/base/strings/string_split.h21
-rw-r--r--chromium/base/strings/string_split_unittest.cc180
-rw-r--r--chromium/base/strings/string_util.cc145
-rw-r--r--chromium/base/strings/string_util.h77
-rw-r--r--chromium/base/strings/string_util_constants.cc64
-rw-r--r--chromium/base/strings/string_util_posix.h1
-rw-r--r--chromium/base/strings/string_util_unittest.cc56
-rw-r--r--chromium/base/strings/stringprintf.cc10
-rw-r--r--chromium/base/strings/utf_offset_string_conversions.cc300
-rw-r--r--chromium/base/strings/utf_offset_string_conversions.h131
-rw-r--r--chromium/base/strings/utf_offset_string_conversions_unittest.cc178
-rw-r--r--chromium/base/strings/utf_string_conversions.cc5
-rw-r--r--chromium/base/strings/utf_string_conversions.h27
-rw-r--r--chromium/base/supports_user_data.cc5
-rw-r--r--chromium/base/supports_user_data_unittest.cc39
-rw-r--r--chromium/base/sync_socket_posix.cc2
-rw-r--r--chromium/base/synchronization/condition_variable_posix.cc12
-rw-r--r--chromium/base/synchronization/condition_variable_unittest.cc5
-rw-r--r--chromium/base/synchronization/lock.cc21
-rw-r--r--chromium/base/synchronization/lock.h6
-rw-r--r--chromium/base/synchronization/waitable_event_win.cc2
-rw-r--r--chromium/base/sys_byteorder.h59
-rw-r--r--chromium/base/sys_info.h11
-rw-r--r--chromium/base/sys_info_android.cc52
-rw-r--r--chromium/base/sys_info_chromeos.cc3
-rw-r--r--chromium/base/sys_info_ios.mm19
-rw-r--r--chromium/base/sys_info_mac.cc4
-rw-r--r--chromium/base/sys_info_posix.cc20
-rw-r--r--chromium/base/sys_info_unittest.cc2
-rw-r--r--chromium/base/sys_info_win.cc5
-rw-r--r--chromium/base/task/cancelable_task_tracker.cc187
-rw-r--r--chromium/base/task/cancelable_task_tracker.h120
-rw-r--r--chromium/base/task/cancelable_task_tracker_unittest.cc435
-rw-r--r--chromium/base/task_runner_util_unittest.cc10
-rw-r--r--chromium/base/third_party/dmg_fp/dtoa.cc6
-rw-r--r--chromium/base/third_party/dynamic_annotations/BUILD.gn11
-rw-r--r--chromium/base/third_party/nspr/BUILD.gn15
-rw-r--r--chromium/base/third_party/nspr/nspr.gyp41
-rw-r--r--chromium/base/third_party/nspr/prcpucfg.h51
-rw-r--r--chromium/base/third_party/nspr/prcpucfg_freebsd.h337
-rw-r--r--chromium/base/third_party/nspr/prcpucfg_linux.h756
-rw-r--r--chromium/base/third_party/nspr/prcpucfg_mac.h197
-rw-r--r--chromium/base/third_party/nspr/prcpucfg_nacl.h246
-rw-r--r--chromium/base/third_party/nspr/prcpucfg_openbsd.h337
-rw-r--r--chromium/base/third_party/nspr/prcpucfg_solaris.h203
-rw-r--r--chromium/base/third_party/nspr/prcpucfg_win.h256
-rw-r--r--chromium/base/third_party/nspr/prtime.cc120
-rw-r--r--chromium/base/third_party/nspr/prtime.h22
-rw-r--r--chromium/base/third_party/nspr/prtypes.h558
-rw-r--r--chromium/base/third_party/superfasthash/LICENSE27
-rw-r--r--chromium/base/third_party/superfasthash/OWNERS2
-rw-r--r--chromium/base/third_party/superfasthash/README.chromium29
-rw-r--r--chromium/base/third_party/superfasthash/superfasthash.c84
-rw-r--r--chromium/base/third_party/symbolize/BUILD.gn20
-rw-r--r--chromium/base/third_party/symbolize/README.chromium5
-rw-r--r--chromium/base/third_party/symbolize/demangle.cc379
-rw-r--r--chromium/base/third_party/symbolize/symbolize.cc197
-rw-r--r--chromium/base/third_party/symbolize/symbolize.h22
-rw-r--r--chromium/base/third_party/xdg_mime/BUILD.gn28
-rw-r--r--chromium/base/third_party/xdg_user_dirs/BUILD.gn11
-rw-r--r--chromium/base/threading/non_thread_safe.h4
-rw-r--r--chromium/base/threading/platform_thread.h46
-rw-r--r--chromium/base/threading/platform_thread_android.cc19
-rw-r--r--chromium/base/threading/platform_thread_freebsd.cc103
-rw-r--r--chromium/base/threading/platform_thread_linux.cc11
-rw-r--r--chromium/base/threading/platform_thread_mac.mm57
-rw-r--r--chromium/base/threading/platform_thread_posix.cc13
-rw-r--r--chromium/base/threading/platform_thread_win.cc48
-rw-r--r--chromium/base/threading/sequenced_worker_pool.cc17
-rw-r--r--chromium/base/threading/sequenced_worker_pool_unittest.cc12
-rw-r--r--chromium/base/threading/thread.cc2
-rw-r--r--chromium/base/threading/thread.h2
-rw-r--r--chromium/base/threading/thread_checker.h2
-rw-r--r--chromium/base/threading/thread_checker_impl.cc12
-rw-r--r--chromium/base/threading/thread_checker_impl.h2
-rw-r--r--chromium/base/threading/thread_collision_warner.h1
-rw-r--r--chromium/base/threading/thread_local.h6
-rw-r--r--chromium/base/threading/thread_local_android.cc34
-rw-r--r--chromium/base/threading/thread_local_posix.cc4
-rw-r--r--chromium/base/threading/thread_local_storage.cc250
-rw-r--r--chromium/base/threading/thread_local_storage.h71
-rw-r--r--chromium/base/threading/thread_local_storage_posix.cc43
-rw-r--r--chromium/base/threading/thread_local_storage_win.cc202
-rw-r--r--chromium/base/threading/thread_perftest.cc314
-rw-r--r--chromium/base/threading/worker_pool_posix.cc2
-rw-r--r--chromium/base/threading/worker_pool_win.cc4
-rw-r--r--chromium/base/time/pr_time_unittest.cc145
-rw-r--r--chromium/base/time/time.cc50
-rw-r--r--chromium/base/time/time.h76
-rw-r--r--chromium/base/time/time_mac.cc17
-rw-r--r--chromium/base/time/time_posix.cc20
-rw-r--r--chromium/base/time/time_unittest.cc76
-rw-r--r--chromium/base/time/time_win.cc45
-rw-r--r--chromium/base/time/time_win_unittest.cc3
-rw-r--r--chromium/base/timer/elapsed_timer.h3
-rw-r--r--chromium/base/timer/mock_timer.cc63
-rw-r--r--chromium/base/timer/mock_timer.h41
-rw-r--r--chromium/base/timer/mock_timer_unittest.cc82
-rw-r--r--chromium/base/timer/timer.cc8
-rw-r--r--chromium/base/timer/timer.h29
-rw-r--r--chromium/base/timer/timer_unittest.cc16
-rw-r--r--chromium/base/tools_sanity_unittest.cc76
-rw-r--r--chromium/base/tracked_objects.cc5
-rw-r--r--chromium/base/tracked_objects.h1
-rw-r--r--chromium/base/values.cc56
-rw-r--r--chromium/base/values.h27
-rw-r--r--chromium/base/values_unittest.cc304
-rw-r--r--chromium/base/win/OWNERS1
-rw-r--r--chromium/base/win/dllmain.cc6
-rw-r--r--chromium/base/win/event_trace_consumer.h2
-rw-r--r--chromium/base/win/event_trace_consumer_unittest.cc66
-rw-r--r--chromium/base/win/event_trace_controller.cc2
-rw-r--r--chromium/base/win/iat_patch_function.cc20
-rw-r--r--chromium/base/win/iat_patch_function.h2
-rw-r--r--chromium/base/win/message_window.cc4
-rw-r--r--chromium/base/win/metro.cc38
-rw-r--r--chromium/base/win/metro.h11
-rw-r--r--chromium/base/win/object_watcher.cc4
-rw-r--r--chromium/base/win/registry.cc189
-rw-r--r--chromium/base/win/registry.h20
-rw-r--r--chromium/base/win/registry_unittest.cc201
-rw-r--r--chromium/base/win/scoped_com_initializer.h5
-rw-r--r--chromium/base/win/scoped_gdi_object.h2
-rw-r--r--chromium/base/win/scoped_handle.h6
-rw-r--r--chromium/base/win/scoped_process_information_unittest.cc3
-rw-r--r--chromium/base/win/shortcut.cc133
-rw-r--r--chromium/base/win/shortcut.h49
-rw-r--r--chromium/base/win/shortcut_unittest.cc59
-rw-r--r--chromium/base/win/startup_information_unittest.cc2
-rw-r--r--chromium/base/win/text_services_message_filter.cc82
-rw-r--r--chromium/base/win/text_services_message_filter.h48
-rw-r--r--chromium/base/win/win_util.cc82
-rw-r--r--chromium/base/win/win_util.h15
-rw-r--r--chromium/base/x11/edid_parser_x11.cc196
-rw-r--r--chromium/base/x11/edid_parser_x11.h54
-rw-r--r--chromium/base/x11/edid_parser_x11_unittest.cc167
-rw-r--r--chromium/base/x11/x11_error_tracker.cc37
-rw-r--r--chromium/base/x11/x11_error_tracker.h38
-rw-r--r--chromium/base/x11/x11_error_tracker_gtk.cc29
-rw-r--r--chromium/breakpad/breakpad.gyp39
-rw-r--r--chromium/breakpad/breakpad_unittests.isolate14
-rw-r--r--chromium/breakpad/src/build/common.gypi1151
-rw-r--r--chromium/breakpad/src/client/windows/breakpad_client.gyp5
-rw-r--r--chromium/breakpad/src/client/windows/build/common.gypi1330
-rw-r--r--chromium/breakpad/src/client/windows/build/external_code.gypi71
-rw-r--r--chromium/breakpad/src/client/windows/build/internal/release_defaults.gypi15
-rw-r--r--chromium/breakpad/src/client/windows/build/internal/release_impl.gypi3
-rw-r--r--chromium/breakpad/src/client/windows/build/internal/release_impl_official.gypi21
-rw-r--r--chromium/breakpad/src/client/windows/build/release.gypi19
-rw-r--r--chromium/breakpad/src/client/windows/crash_generation/crash_generation.gyp5
-rw-r--r--chromium/breakpad/src/client/windows/handler/exception_handler.gyp5
-rw-r--r--chromium/breakpad/src/client/windows/sender/crash_report_sender.gyp5
-rw-r--r--chromium/breakpad/src/client/windows/tests/crash_generation_app/crash_generation_app.gyp8
-rw-r--r--chromium/breakpad/src/client/windows/unittests/client_tests.gyp5
-rw-r--r--chromium/breakpad/src/client/windows/unittests/testing.gyp5
-rw-r--r--chromium/breakpad/src/common/windows/common_windows.gyp2
-rw-r--r--chromium/breakpad/src/tools/windows/converter/ms_symbol_server_converter.gyp46
-rw-r--r--chromium/breakpad/src/tools/windows/dump_syms/dump_syms.gyp11
-rw-r--r--chromium/breakpad/src/tools/windows/symupload/symupload.gyp4
-rw-r--r--chromium/build/all.gyp439
-rw-r--r--chromium/build/all_android.gyp187
-rw-r--r--chromium/build/android/dex_action.gypi14
-rw-r--r--chromium/build/android/finalize_apk_action.gypi22
-rw-r--r--chromium/build/android/rezip.gyp23
-rw-r--r--chromium/build/apk_fake_jar.gypi10
-rw-r--r--chromium/build/apk_test.gypi5
-rw-r--r--chromium/build/build_config.h35
-rwxr-xr-xchromium/build/check_return_value.py17
-rw-r--r--chromium/build/common.gypi1712
-rw-r--r--chromium/build/compiled_action.gni148
-rwxr-xr-xchromium/build/compiler_version.py138
-rw-r--r--chromium/build/config/BUILD.gn217
-rw-r--r--chromium/build/config/BUILDCONFIG.gn321
-rw-r--r--chromium/build/config/allocator.gni14
-rw-r--r--chromium/build/config/android/BUILD.gn20
-rw-r--r--chromium/build/config/android/config.gni128
-rw-r--r--chromium/build/config/android/internal_rules.gni25
-rw-r--r--chromium/build/config/android/rules.gni240
-rw-r--r--chromium/build/config/arm.gni55
-rw-r--r--chromium/build/config/clang/BUILD.gn40
-rw-r--r--chromium/build/config/clang/clang.gni9
-rw-r--r--chromium/build/config/compiler/BUILD.gn656
-rw-r--r--chromium/build/config/crypto.gni22
-rw-r--r--chromium/build/config/features.gni74
-rw-r--r--chromium/build/config/gcc/BUILD.gn41
-rw-r--r--chromium/build/config/gcc/gcc_version.gni9
-rw-r--r--chromium/build/config/ios/BUILD.gn19
-rw-r--r--chromium/build/config/ios/ios_sdk.gni30
-rw-r--r--chromium/build/config/ios/ios_sdk.py19
-rw-r--r--chromium/build/config/linux/BUILD.gn161
-rw-r--r--chromium/build/config/linux/pkg-config.py123
-rw-r--r--chromium/build/config/linux/pkg_config.gni38
-rw-r--r--chromium/build/config/linux/sysroot.gni27
-rw-r--r--chromium/build/config/linux/sysroot_ld_path.py20
-rw-r--r--chromium/build/config/mac/BUILD.gn25
-rw-r--r--chromium/build/config/mac/mac_sdk.gni34
-rw-r--r--chromium/build/config/sysroot.gni50
-rw-r--r--chromium/build/config/ui.gni63
-rw-r--r--chromium/build/config/win/BUILD.gn120
-rw-r--r--chromium/build/config/win/get_msvc_config.py77
-rw-r--r--chromium/build/config/win/get_msvc_config_real.py575
-rw-r--r--chromium/build/config/win/visual_studio_version.gni40
-rw-r--r--chromium/build/copy_test_data_ios.gypi7
-rwxr-xr-xchromium/build/detect_host_arch.py40
-rwxr-xr-xchromium/build/dir_exists.py10
-rwxr-xr-xchromium/build/download_nacl_toolchains.py37
-rw-r--r--chromium/build/filename_rules.gypi11
-rwxr-xr-xchromium/build/find_isolated_tests.py78
-rwxr-xr-xchromium/build/gdb-add-index36
-rwxr-xr-xchromium/build/get_landmines.py12
-rwxr-xr-xchromium/build/get_syzygy_binaries.py410
-rwxr-xr-xchromium/build/git-hooks/pre-commit30
-rw-r--r--chromium/build/gn_helpers.py39
-rw-r--r--chromium/build/gn_run_binary.py22
-rw-r--r--chromium/build/grit_action.gypi7
-rwxr-xr-xchromium/build/gyp_chromium272
-rw-r--r--chromium/build/gyp_helper.py1
-rw-r--r--chromium/build/gypi_to_gn.py167
-rwxr-xr-xchromium/build/install-build-deps-android.sh82
-rwxr-xr-xchromium/build/install-build-deps.sh142
-rw-r--r--chromium/build/internal/release_impl_official.gypi1
-rwxr-xr-xchromium/build/inverse_depth.py24
-rw-r--r--chromium/build/ios/PRESUBMIT.py9
-rw-r--r--chromium/build/ios/grit_whitelist.txt461
-rw-r--r--chromium/build/isolate.gypi54
-rw-r--r--chromium/build/jar_file_jni_generator.gypi6
-rw-r--r--chromium/build/java.gypi160
-rw-r--r--chromium/build/java_aidl.gypi2
-rw-r--r--chromium/build/java_apk.gypi451
-rw-r--r--chromium/build/java_prebuilt.gypi33
-rw-r--r--chromium/build/java_strings_grd.gypi62
-rw-r--r--chromium/build/jni_generator.gypi13
-rw-r--r--chromium/build/json_schema.gni140
-rw-r--r--chromium/build/json_schema_bundle_compile.gypi6
-rw-r--r--chromium/build/json_schema_compile.gypi15
-rw-r--r--chromium/build/landmine_utils.py4
-rwxr-xr-xchromium/build/landmines.py18
-rw-r--r--chromium/build/linux/bin/eu-strip.sha11
-rwxr-xr-xchromium/build/linux/install-arm-sysroot.py11
-rwxr-xr-xchromium/build/linux/pkg-config-wrapper8
-rwxr-xr-xchromium/build/linux/python_arch.sh43
-rwxr-xr-xchromium/build/linux/sysroot_ld_path.sh22
-rw-r--r--chromium/build/linux/system.gyp531
-rw-r--r--chromium/build/linux/unbundle/harfbuzz.gyp9
-rw-r--r--chromium/build/linux/unbundle/libXNVCtrl.gyp35
-rwxr-xr-xchromium/build/linux/unbundle/replace_gyp_files.py1
-rw-r--r--chromium/build/mac/asan.gyp31
-rwxr-xr-xchromium/build/mac/edit_xibs.sh4
-rwxr-xr-xchromium/build/mac/find_sdk.py7
-rwxr-xr-xchromium/build/mac/tweak_info_plist.py57
-rw-r--r--chromium/build/protoc.gypi1
-rw-r--r--chromium/build/release.gypi12
-rw-r--r--chromium/build/repack_action.gypi30
-rw-r--r--chromium/build/sanitize-win-build-log.sed1
-rw-r--r--chromium/build/secondary/chrome/BUILD.gn299
-rw-r--r--chromium/build/secondary/testing/BUILD.gn11
-rw-r--r--chromium/build/secondary/testing/gmock/BUILD.gn45
-rw-r--r--chromium/build/secondary/testing/gtest/BUILD.gn109
-rw-r--r--chromium/build/secondary/third_party/WebKit/Source/platform/BUILD.gn73
-rw-r--r--chromium/build/secondary/third_party/WebKit/Source/wtf/BUILD.gn364
-rw-r--r--chromium/build/secondary/third_party/android_tools/BUILD.gn17
-rw-r--r--chromium/build/secondary/third_party/angle/BUILD.gn644
-rw-r--r--chromium/build/secondary/third_party/angle/angle_commit.h8
-rw-r--r--chromium/build/secondary/third_party/flac/BUILD.gn76
-rw-r--r--chromium/build/secondary/third_party/freetype/BUILD.gn52
-rw-r--r--chromium/build/secondary/third_party/icu/BUILD.gn444
-rw-r--r--chromium/build/secondary/third_party/leveldatabase/BUILD.gn338
-rw-r--r--chromium/build/secondary/third_party/libjpeg_turbo/BUILD.gn216
-rw-r--r--chromium/build/secondary/third_party/nss/BUILD.gn1159
-rw-r--r--chromium/build/secondary/third_party/ots/BUILD.gn90
-rw-r--r--chromium/build/secondary/third_party/sfntly/BUILD.gn129
-rw-r--r--chromium/build/secondary/third_party/trace-viewer/BUILD.gn320
-rw-r--r--chromium/build/secondary/tools/grit/grit_rule.gni153
-rw-r--r--chromium/build/secondary/ui/BUILD.gn11
-rw-r--r--chromium/build/toolchain/android/BUILD.gn67
-rw-r--r--chromium/build/toolchain/android/find_android_compiler.py41
-rw-r--r--chromium/build/toolchain/clang.gni9
-rw-r--r--chromium/build/toolchain/gcc_toolchain.gni111
-rw-r--r--chromium/build/toolchain/goma.gni31
-rw-r--r--chromium/build/toolchain/linux/BUILD.gn222
-rw-r--r--chromium/build/toolchain/mac/BUILD.gn187
-rw-r--r--chromium/build/toolchain/nacl/BUILD.gn1
-rw-r--r--chromium/build/toolchain/win/BUILD.gn38
-rw-r--r--chromium/build/toolchain/win/midl.gni94
-rw-r--r--chromium/build/toolchain/win/setup_toolchain.py97
-rw-r--r--chromium/build/toolchain_vs2013.hash2
-rw-r--r--chromium/build/uiautomator_test.gypi25
-rw-r--r--chromium/build/util/BUILD.gn31
-rw-r--r--chromium/build/util/LASTCHANGE2
-rw-r--r--chromium/build/util/LASTCHANGE.blink2
-rw-r--r--chromium/build/util/version.gypi20
-rwxr-xr-xchromium/build/util/version.py166
-rw-r--r--chromium/build/vs_toolchain.py173
-rw-r--r--chromium/build/whitespace_file.txt61
-rw-r--r--chromium/build/win/importlibs/create_import_lib.gypi1
-rwxr-xr-xchromium/build/win/reorder-imports.py57
-rw-r--r--chromium/build/win/setup_cygwin_mount.py20
-rw-r--r--chromium/buildtools/LICENSE27
-rw-r--r--chromium/buildtools/README.txt7
-rw-r--r--chromium/buildtools/checkdeps/DEPS (renamed from chromium/tools/checkdeps/DEPS)0
-rw-r--r--chromium/buildtools/checkdeps/OWNERS1
-rw-r--r--chromium/buildtools/checkdeps/PRESUBMIT.py (renamed from chromium/tools/checkdeps/PRESUBMIT.py)0
-rwxr-xr-xchromium/buildtools/checkdeps/builddeps.py375
-rwxr-xr-xchromium/buildtools/checkdeps/checkdeps.py237
-rwxr-xr-xchromium/buildtools/checkdeps/checkdeps_test.py179
-rw-r--r--chromium/buildtools/checkdeps/cpp_checker.py113
-rwxr-xr-xchromium/buildtools/checkdeps/graphdeps.py407
-rw-r--r--chromium/buildtools/checkdeps/java_checker.py107
-rw-r--r--chromium/buildtools/checkdeps/results.py (renamed from chromium/tools/checkdeps/results.py)0
-rw-r--r--chromium/buildtools/checkdeps/rules.py178
-rw-r--r--chromium/buildtools/codereview.settings1
-rw-r--r--chromium/buildtools/linux32/gn.sha11
-rw-r--r--chromium/buildtools/linux32/gn_args.txt2
-rwxr-xr-xchromium/buildtools/linux32/upload_gn2
-rw-r--r--chromium/buildtools/linux64/gn.sha11
-rw-r--r--chromium/buildtools/linux64/gn_args.txt2
-rwxr-xr-xchromium/buildtools/linux64/upload_gn2
-rw-r--r--chromium/buildtools/mac/gn.sha11
-rw-r--r--chromium/buildtools/mac/gn_args.txt2
-rwxr-xr-xchromium/buildtools/mac/upload_gn2
-rw-r--r--chromium/buildtools/win/gn.exe.sha11
-rw-r--r--chromium/buildtools/win/gn_args.txt2
-rwxr-xr-xchromium/buildtools/win/upload.bat1
-rw-r--r--chromium/cc/BUILD.gn789
-rw-r--r--chromium/cc/DEPS8
-rw-r--r--chromium/cc/OWNERS1
-rw-r--r--chromium/cc/PRESUBMIT.py98
-rw-r--r--chromium/cc/animation/animation.cc108
-rw-r--r--chromium/cc/animation/animation.h77
-rw-r--r--chromium/cc/animation/animation_curve.h11
-rw-r--r--chromium/cc/animation/animation_delegate.h4
-rw-r--r--chromium/cc/animation/animation_events.cc2
-rw-r--r--chromium/cc/animation/animation_events.h4
-rw-r--r--chromium/cc/animation/animation_unittest.cc407
-rw-r--r--chromium/cc/animation/keyframed_animation_curve.cc49
-rw-r--r--chromium/cc/animation/keyframed_animation_curve.h4
-rw-r--r--chromium/cc/animation/keyframed_animation_curve_unittest.cc96
-rw-r--r--chromium/cc/animation/layer_animation_controller.cc640
-rw-r--r--chromium/cc/animation/layer_animation_controller.h77
-rw-r--r--chromium/cc/animation/layer_animation_controller_unittest.cc800
-rw-r--r--chromium/cc/animation/layer_animation_value_observer.h2
-rw-r--r--chromium/cc/animation/scroll_offset_animation_curve.cc24
-rw-r--r--chromium/cc/animation/scroll_offset_animation_curve.h9
-rw-r--r--chromium/cc/animation/scrollbar_animation_controller.cc96
-rw-r--r--chromium/cc/animation/scrollbar_animation_controller.h56
-rw-r--r--chromium/cc/animation/scrollbar_animation_controller_linear_fade.cc125
-rw-r--r--chromium/cc/animation/scrollbar_animation_controller_linear_fade.h35
-rw-r--r--chromium/cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc173
-rw-r--r--chromium/cc/animation/scrollbar_animation_controller_thinning.cc129
-rw-r--r--chromium/cc/animation/scrollbar_animation_controller_thinning.h44
-rw-r--r--chromium/cc/animation/scrollbar_animation_controller_thinning_unittest.cc141
-rw-r--r--chromium/cc/animation/timing_function.cc109
-rw-r--r--chromium/cc/animation/timing_function.h7
-rw-r--r--chromium/cc/animation/timing_function_unittest.cc141
-rw-r--r--chromium/cc/animation/transform_operation.cc42
-rw-r--r--chromium/cc/animation/transform_operations.cc101
-rw-r--r--chromium/cc/animation/transform_operations.h19
-rw-r--r--chromium/cc/animation/transform_operations_unittest.cc279
-rw-r--r--chromium/cc/base/completion_event.h10
-rw-r--r--chromium/cc/base/delayed_unique_notifier.cc78
-rw-r--r--chromium/cc/base/delayed_unique_notifier.h61
-rw-r--r--chromium/cc/base/delayed_unique_notifier_unittest.cc266
-rw-r--r--chromium/cc/base/invalidation_region.cc2
-rw-r--r--chromium/cc/base/invalidation_region.h2
-rw-r--r--chromium/cc/base/latency_info_swap_promise.cc4
-rw-r--r--chromium/cc/base/math_util.cc118
-rw-r--r--chromium/cc/base/math_util.h36
-rw-r--r--chromium/cc/base/region.cc16
-rw-r--r--chromium/cc/base/region.h22
-rw-r--r--chromium/cc/base/rolling_time_delta_history.cc63
-rw-r--r--chromium/cc/base/rolling_time_delta_history.h44
-rw-r--r--chromium/cc/base/rolling_time_delta_history_unittest.cc109
-rw-r--r--chromium/cc/base/switches.cc111
-rw-r--r--chromium/cc/base/switches.h24
-rw-r--r--chromium/cc/base/tiling_data.cc398
-rw-r--r--chromium/cc/base/tiling_data.h93
-rw-r--r--chromium/cc/base/tiling_data_unittest.cc3984
-rw-r--r--chromium/cc/base/unique_notifier.cc42
-rw-r--r--chromium/cc/base/unique_notifier.h44
-rw-r--r--chromium/cc/base/unique_notifier_unittest.cc62
-rw-r--r--chromium/cc/cc.gyp97
-rw-r--r--chromium/cc/cc_tests.gyp83
-rw-r--r--chromium/cc/debug/debug_colors.cc48
-rw-r--r--chromium/cc/debug/debug_colors.h16
-rw-r--r--chromium/cc/debug/debug_rect_history.cc132
-rw-r--r--chromium/cc/debug/debug_rect_history.h13
-rw-r--r--chromium/cc/debug/devtools_instrumentation.h40
-rw-r--r--chromium/cc/debug/frame_viewer_instrumentation.h93
-rw-r--r--chromium/cc/debug/invalidation_benchmark.cc139
-rw-r--r--chromium/cc/debug/invalidation_benchmark.h45
-rw-r--r--chromium/cc/debug/lap_timer.cc81
-rw-r--r--chromium/cc/debug/lap_timer.h64
-rw-r--r--chromium/cc/debug/layer_tree_debug_state.cc49
-rw-r--r--chromium/cc/debug/layer_tree_debug_state.h1
-rw-r--r--chromium/cc/debug/micro_benchmark.cc8
-rw-r--r--chromium/cc/debug/micro_benchmark.h5
-rw-r--r--chromium/cc/debug/micro_benchmark_controller.cc34
-rw-r--r--chromium/cc/debug/micro_benchmark_controller.h11
-rw-r--r--chromium/cc/debug/micro_benchmark_controller_unittest.cc69
-rw-r--r--chromium/cc/debug/overdraw_metrics.cc268
-rw-r--r--chromium/cc/debug/overdraw_metrics.h115
-rw-r--r--chromium/cc/debug/picture_record_benchmark.cc6
-rw-r--r--chromium/cc/debug/rasterize_and_record_benchmark.cc79
-rw-r--r--chromium/cc/debug/rasterize_and_record_benchmark.h3
-rw-r--r--chromium/cc/debug/rasterize_and_record_benchmark_impl.cc164
-rw-r--r--chromium/cc/debug/rasterize_and_record_benchmark_impl.h8
-rw-r--r--chromium/cc/debug/rendering_stats.cc30
-rw-r--r--chromium/cc/debug/rendering_stats.h23
-rw-r--r--chromium/cc/debug/rendering_stats_instrumentation.cc65
-rw-r--r--chromium/cc/debug/rendering_stats_instrumentation.h26
-rw-r--r--chromium/cc/debug/traced_picture.cc10
-rw-r--r--chromium/cc/debug/traced_picture.h8
-rw-r--r--chromium/cc/debug/traced_value.cc11
-rw-r--r--chromium/cc/debug/traced_value.h17
-rw-r--r--chromium/cc/debug/unittest_only_benchmark.cc12
-rw-r--r--chromium/cc/debug/unittest_only_benchmark.h2
-rw-r--r--chromium/cc/input/input_handler.h48
-rw-r--r--chromium/cc/input/layer_scroll_offset_delegate.h31
-rw-r--r--chromium/cc/input/page_scale_animation.cc71
-rw-r--r--chromium/cc/input/page_scale_animation.h38
-rw-r--r--chromium/cc/input/scrollbar.h2
-rw-r--r--chromium/cc/input/top_controls_manager.cc2
-rw-r--r--chromium/cc/input/top_controls_manager.h2
-rw-r--r--chromium/cc/input/top_controls_manager_unittest.cc4
-rw-r--r--chromium/cc/layers/append_quads_data.h8
-rw-r--r--chromium/cc/layers/compositing_reasons.h63
-rw-r--r--chromium/cc/layers/content_layer.cc43
-rw-r--r--chromium/cc/layers/content_layer.h4
-rw-r--r--chromium/cc/layers/content_layer_client.h14
-rw-r--r--chromium/cc/layers/content_layer_unittest.cc11
-rw-r--r--chromium/cc/layers/contents_scaling_layer.cc6
-rw-r--r--chromium/cc/layers/contents_scaling_layer.h23
-rw-r--r--chromium/cc/layers/delegated_frame_provider.cc8
-rw-r--r--chromium/cc/layers/delegated_frame_provider_unittest.cc14
-rw-r--r--chromium/cc/layers/delegated_renderer_layer.cc35
-rw-r--r--chromium/cc/layers/delegated_renderer_layer.h10
-rw-r--r--chromium/cc/layers/delegated_renderer_layer_impl.cc95
-rw-r--r--chromium/cc/layers/delegated_renderer_layer_impl.h15
-rw-r--r--chromium/cc/layers/delegated_renderer_layer_impl_unittest.cc503
-rw-r--r--chromium/cc/layers/draw_properties.h35
-rw-r--r--chromium/cc/layers/heads_up_display_layer.cc6
-rw-r--r--chromium/cc/layers/heads_up_display_layer.h4
-rw-r--r--chromium/cc/layers/heads_up_display_layer_impl.cc183
-rw-r--r--chromium/cc/layers/heads_up_display_layer_impl.h23
-rw-r--r--chromium/cc/layers/heads_up_display_layer_impl_unittest.cc13
-rw-r--r--chromium/cc/layers/image_layer.cc3
-rw-r--r--chromium/cc/layers/image_layer.h3
-rw-r--r--chromium/cc/layers/io_surface_layer.cc4
-rw-r--r--chromium/cc/layers/io_surface_layer.h4
-rw-r--r--chromium/cc/layers/io_surface_layer_impl.cc77
-rw-r--r--chromium/cc/layers/io_surface_layer_impl.h7
-rw-r--r--chromium/cc/layers/io_surface_layer_impl_unittest.cc64
-rw-r--r--chromium/cc/layers/layer.cc197
-rw-r--r--chromium/cc/layers/layer.h92
-rw-r--r--chromium/cc/layers/layer_client.h2
-rw-r--r--chromium/cc/layers/layer_impl.cc818
-rw-r--r--chromium/cc/layers/layer_impl.h251
-rw-r--r--chromium/cc/layers/layer_impl_unittest.cc325
-rw-r--r--chromium/cc/layers/layer_iterator.cc130
-rw-r--r--chromium/cc/layers/layer_iterator.h149
-rw-r--r--chromium/cc/layers/layer_iterator_unittest.cc8
-rw-r--r--chromium/cc/layers/layer_lists.h2
-rw-r--r--chromium/cc/layers/layer_perftest.cc16
-rw-r--r--chromium/cc/layers/layer_position_constraint_unittest.cc196
-rw-r--r--chromium/cc/layers/layer_unittest.cc108
-rw-r--r--chromium/cc/layers/layer_utils.cc146
-rw-r--r--chromium/cc/layers/layer_utils.h29
-rw-r--r--chromium/cc/layers/layer_utils_unittest.cc267
-rw-r--r--chromium/cc/layers/nine_patch_layer.cc4
-rw-r--r--chromium/cc/layers/nine_patch_layer.h4
-rw-r--r--chromium/cc/layers/nine_patch_layer_impl.cc294
-rw-r--r--chromium/cc/layers/nine_patch_layer_impl.h4
-rw-r--r--chromium/cc/layers/nine_patch_layer_impl_unittest.cc149
-rw-r--r--chromium/cc/layers/nine_patch_layer_unittest.cc14
-rw-r--r--chromium/cc/layers/painted_scrollbar_layer.cc80
-rw-r--r--chromium/cc/layers/painted_scrollbar_layer.h13
-rw-r--r--chromium/cc/layers/painted_scrollbar_layer_impl.cc28
-rw-r--r--chromium/cc/layers/painted_scrollbar_layer_impl.h1
-rw-r--r--chromium/cc/layers/painted_scrollbar_layer_impl_unittest.cc94
-rw-r--r--chromium/cc/layers/picture_image_layer.cc20
-rw-r--r--chromium/cc/layers/picture_image_layer.h6
-rw-r--r--chromium/cc/layers/picture_image_layer_impl.cc41
-rw-r--r--chromium/cc/layers/picture_image_layer_impl.h15
-rw-r--r--chromium/cc/layers/picture_image_layer_impl_unittest.cc106
-rw-r--r--chromium/cc/layers/picture_layer.cc100
-rw-r--r--chromium/cc/layers/picture_layer.h13
-rw-r--r--chromium/cc/layers/picture_layer_impl.cc1148
-rw-r--r--chromium/cc/layers/picture_layer_impl.h112
-rw-r--r--chromium/cc/layers/picture_layer_impl_perftest.cc114
-rw-r--r--chromium/cc/layers/picture_layer_impl_unittest.cc2061
-rw-r--r--chromium/cc/layers/picture_layer_unittest.cc60
-rw-r--r--chromium/cc/layers/quad_sink.cc55
-rw-r--r--chromium/cc/layers/quad_sink.h47
-rw-r--r--chromium/cc/layers/render_surface.cc4
-rw-r--r--chromium/cc/layers/render_surface.h16
-rw-r--r--chromium/cc/layers/render_surface_impl.cc33
-rw-r--r--chromium/cc/layers/render_surface_impl.h10
-rw-r--r--chromium/cc/layers/render_surface_impl_unittest.cc67
-rw-r--r--chromium/cc/layers/render_surface_unittest.cc20
-rw-r--r--chromium/cc/layers/scrollbar_layer_impl_base.cc87
-rw-r--r--chromium/cc/layers/scrollbar_layer_impl_base.h29
-rw-r--r--chromium/cc/layers/scrollbar_layer_interface.h7
-rw-r--r--chromium/cc/layers/scrollbar_layer_unittest.cc334
-rw-r--r--chromium/cc/layers/scrollbar_theme_painter.h28
-rw-r--r--chromium/cc/layers/solid_color_layer_impl.cc30
-rw-r--r--chromium/cc/layers/solid_color_layer_impl_unittest.cc86
-rw-r--r--chromium/cc/layers/solid_color_scrollbar_layer.cc60
-rw-r--r--chromium/cc/layers/solid_color_scrollbar_layer.h12
-rw-r--r--chromium/cc/layers/solid_color_scrollbar_layer_impl.cc71
-rw-r--r--chromium/cc/layers/solid_color_scrollbar_layer_impl.h10
-rw-r--r--chromium/cc/layers/solid_color_scrollbar_layer_impl_unittest.cc80
-rw-r--r--chromium/cc/layers/surface_layer.cc40
-rw-r--r--chromium/cc/layers/surface_layer.h41
-rw-r--r--chromium/cc/layers/surface_layer_impl.cc75
-rw-r--r--chromium/cc/layers/surface_layer_impl.h47
-rw-r--r--chromium/cc/layers/surface_layer_impl_unittest.cc66
-rw-r--r--chromium/cc/layers/texture_layer.cc187
-rw-r--r--chromium/cc/layers/texture_layer.h61
-rw-r--r--chromium/cc/layers/texture_layer_client.h4
-rw-r--r--chromium/cc/layers/texture_layer_impl.cc219
-rw-r--r--chromium/cc/layers/texture_layer_impl.h44
-rw-r--r--chromium/cc/layers/texture_layer_impl_unittest.cc76
-rw-r--r--chromium/cc/layers/texture_layer_unittest.cc1042
-rw-r--r--chromium/cc/layers/tiled_layer.cc68
-rw-r--r--chromium/cc/layers/tiled_layer.h25
-rw-r--r--chromium/cc/layers/tiled_layer_impl.cc45
-rw-r--r--chromium/cc/layers/tiled_layer_impl.h4
-rw-r--r--chromium/cc/layers/tiled_layer_impl_unittest.cc168
-rw-r--r--chromium/cc/layers/tiled_layer_unittest.cc261
-rw-r--r--chromium/cc/layers/ui_resource_layer.cc3
-rw-r--r--chromium/cc/layers/ui_resource_layer.h2
-rw-r--r--chromium/cc/layers/ui_resource_layer_impl.cc28
-rw-r--r--chromium/cc/layers/ui_resource_layer_impl.h4
-rw-r--r--chromium/cc/layers/ui_resource_layer_impl_unittest.cc94
-rw-r--r--chromium/cc/layers/ui_resource_layer_unittest.cc23
-rw-r--r--chromium/cc/layers/video_frame_provider_client_impl.cc7
-rw-r--r--chromium/cc/layers/video_frame_provider_client_impl.h1
-rw-r--r--chromium/cc/layers/video_layer.cc2
-rw-r--r--chromium/cc/layers/video_layer.h3
-rw-r--r--chromium/cc/layers/video_layer_impl.cc85
-rw-r--r--chromium/cc/layers/video_layer_impl.h2
-rw-r--r--chromium/cc/layers/video_layer_impl_unittest.cc97
-rw-r--r--chromium/cc/output/begin_frame_args.cc37
-rw-r--r--chromium/cc/output/begin_frame_args.h10
-rw-r--r--chromium/cc/output/begin_frame_args_unittest.cc77
-rw-r--r--chromium/cc/output/compositor_frame_metadata.h4
-rw-r--r--chromium/cc/output/context_provider.cc28
-rw-r--r--chromium/cc/output/context_provider.h23
-rw-r--r--chromium/cc/output/copy_output_request.cc11
-rw-r--r--chromium/cc/output/copy_output_request.h6
-rw-r--r--chromium/cc/output/copy_output_result.cc3
-rw-r--r--chromium/cc/output/copy_output_result.h6
-rw-r--r--chromium/cc/output/delegated_frame_data.cc3
-rw-r--r--chromium/cc/output/delegated_frame_data.h3
-rw-r--r--chromium/cc/output/delegating_renderer.cc86
-rw-r--r--chromium/cc/output/delegating_renderer.h24
-rw-r--r--chromium/cc/output/delegating_renderer_unittest.cc19
-rw-r--r--chromium/cc/output/direct_renderer.cc76
-rw-r--r--chromium/cc/output/direct_renderer.h44
-rw-r--r--chromium/cc/output/filter_operation.cc58
-rw-r--r--chromium/cc/output/filter_operation.h43
-rw-r--r--chromium/cc/output/filter_operations.cc4
-rw-r--r--chromium/cc/output/filter_operations_unittest.cc12
-rw-r--r--chromium/cc/output/gl_renderer.cc707
-rw-r--r--chromium/cc/output/gl_renderer.h78
-rw-r--r--chromium/cc/output/gl_renderer_unittest.cc493
-rw-r--r--chromium/cc/output/output_surface.cc238
-rw-r--r--chromium/cc/output/output_surface.h83
-rw-r--r--chromium/cc/output/output_surface_client.h16
-rw-r--r--chromium/cc/output/output_surface_unittest.cc282
-rw-r--r--chromium/cc/output/overlay_candidate.cc42
-rw-r--r--chromium/cc/output/overlay_candidate.h53
-rw-r--r--chromium/cc/output/overlay_candidate_validator.h33
-rw-r--r--chromium/cc/output/overlay_processor.cc45
-rw-r--r--chromium/cc/output/overlay_processor.h51
-rw-r--r--chromium/cc/output/overlay_strategy_single_on_top.cc81
-rw-r--r--chromium/cc/output/overlay_strategy_single_on_top.h33
-rw-r--r--chromium/cc/output/overlay_unittest.cc727
-rw-r--r--chromium/cc/output/render_surface_filters.cc30
-rw-r--r--chromium/cc/output/render_surface_filters.h4
-rw-r--r--chromium/cc/output/renderer.cc29
-rw-r--r--chromium/cc/output/renderer.h47
-rw-r--r--chromium/cc/output/renderer_pixeltest.cc1163
-rw-r--r--chromium/cc/output/renderer_unittest.cc94
-rw-r--r--chromium/cc/output/shader.cc24
-rw-r--r--chromium/cc/output/shader.h20
-rw-r--r--chromium/cc/output/software_frame_data.cc4
-rw-r--r--chromium/cc/output/software_frame_data.h4
-rw-r--r--chromium/cc/output/software_output_device.cc40
-rw-r--r--chromium/cc/output/software_output_device.h15
-rw-r--r--chromium/cc/output/software_renderer.cc153
-rw-r--r--chromium/cc/output/software_renderer.h21
-rw-r--r--chromium/cc/output/software_renderer_unittest.cc289
-rw-r--r--chromium/cc/quads/checkerboard_draw_quad.cc10
-rw-r--r--chromium/cc/quads/checkerboard_draw_quad.h9
-rw-r--r--chromium/cc/quads/content_draw_quad_base.cc16
-rw-r--r--chromium/cc/quads/content_draw_quad_base.h15
-rw-r--r--chromium/cc/quads/debug_border_draw_quad.cc10
-rw-r--r--chromium/cc/quads/debug_border_draw_quad.h9
-rw-r--r--chromium/cc/quads/draw_quad.cc10
-rw-r--r--chromium/cc/quads/draw_quad.h12
-rw-r--r--chromium/cc/quads/draw_quad_unittest.cc174
-rw-r--r--chromium/cc/quads/io_surface_draw_quad.cc16
-rw-r--r--chromium/cc/quads/io_surface_draw_quad.h18
-rw-r--r--chromium/cc/quads/picture_draw_quad.cc36
-rw-r--r--chromium/cc/quads/picture_draw_quad.h19
-rw-r--r--chromium/cc/quads/render_pass.cc34
-rw-r--r--chromium/cc/quads/render_pass.h13
-rw-r--r--chromium/cc/quads/render_pass_draw_quad.cc18
-rw-r--r--chromium/cc/quads/render_pass_draw_quad.h17
-rw-r--r--chromium/cc/quads/render_pass_unittest.cc96
-rw-r--r--chromium/cc/quads/shared_quad_state.cc24
-rw-r--r--chromium/cc/quads/shared_quad_state.h22
-rw-r--r--chromium/cc/quads/solid_color_draw_quad.cc10
-rw-r--r--chromium/cc/quads/solid_color_draw_quad.h9
-rw-r--r--chromium/cc/quads/stream_video_draw_quad.cc12
-rw-r--r--chromium/cc/quads/stream_video_draw_quad.h11
-rw-r--r--chromium/cc/quads/surface_draw_quad.cc54
-rw-r--r--chromium/cc/quads/surface_draw_quad.h45
-rw-r--r--chromium/cc/quads/texture_draw_quad.cc23
-rw-r--r--chromium/cc/quads/texture_draw_quad.h19
-rw-r--r--chromium/cc/quads/tile_draw_quad.cc24
-rw-r--r--chromium/cc/quads/tile_draw_quad.h15
-rw-r--r--chromium/cc/quads/yuv_video_draw_quad.cc30
-rw-r--r--chromium/cc/quads/yuv_video_draw_quad.h30
-rw-r--r--chromium/cc/resources/bitmap_content_layer_updater.cc41
-rw-r--r--chromium/cc/resources/bitmap_content_layer_updater.h18
-rw-r--r--chromium/cc/resources/bitmap_skpicture_content_layer_updater.cc20
-rw-r--r--chromium/cc/resources/bitmap_skpicture_content_layer_updater.h6
-rw-r--r--chromium/cc/resources/caching_bitmap_content_layer_updater.cc61
-rw-r--r--chromium/cc/resources/caching_bitmap_content_layer_updater.h46
-rw-r--r--chromium/cc/resources/content_layer_updater.cc30
-rw-r--r--chromium/cc/resources/content_layer_updater.h17
-rw-r--r--chromium/cc/resources/direct_raster_worker_pool.cc215
-rw-r--r--chromium/cc/resources/direct_raster_worker_pool.h81
-rw-r--r--chromium/cc/resources/etc1_pixel_ref.cc38
-rw-r--r--chromium/cc/resources/etc1_pixel_ref.h44
-rw-r--r--chromium/cc/resources/image_copy_raster_worker_pool.cc260
-rw-r--r--chromium/cc/resources/image_copy_raster_worker_pool.h110
-rw-r--r--chromium/cc/resources/image_layer_updater.cc8
-rw-r--r--chromium/cc/resources/image_layer_updater.h8
-rw-r--r--chromium/cc/resources/image_raster_worker_pool.cc301
-rw-r--r--chromium/cc/resources/image_raster_worker_pool.h74
-rw-r--r--chromium/cc/resources/layer_painter.h2
-rw-r--r--chromium/cc/resources/layer_quad.cc2
-rw-r--r--chromium/cc/resources/layer_quad.h2
-rw-r--r--chromium/cc/resources/layer_tiling_data.cc22
-rw-r--r--chromium/cc/resources/layer_tiling_data.h18
-rw-r--r--chromium/cc/resources/layer_updater.h12
-rw-r--r--chromium/cc/resources/managed_tile_state.cc48
-rw-r--r--chromium/cc/resources/managed_tile_state.h147
-rw-r--r--chromium/cc/resources/picture.cc228
-rw-r--r--chromium/cc/resources/picture.h87
-rw-r--r--chromium/cc/resources/picture_layer_tiling.cc680
-rw-r--r--chromium/cc/resources/picture_layer_tiling.h153
-rw-r--r--chromium/cc/resources/picture_layer_tiling_perftest.cc159
-rw-r--r--chromium/cc/resources/picture_layer_tiling_set.cc65
-rw-r--r--chromium/cc/resources/picture_layer_tiling_set.h32
-rw-r--r--chromium/cc/resources/picture_layer_tiling_set_unittest.cc24
-rw-r--r--chromium/cc/resources/picture_layer_tiling_unittest.cc1109
-rw-r--r--chromium/cc/resources/picture_pile.cc110
-rw-r--r--chromium/cc/resources/picture_pile.h25
-rw-r--r--chromium/cc/resources/picture_pile_base.cc107
-rw-r--r--chromium/cc/resources/picture_pile_base.h41
-rw-r--r--chromium/cc/resources/picture_pile_impl.cc189
-rw-r--r--chromium/cc/resources/picture_pile_impl.h24
-rw-r--r--chromium/cc/resources/picture_pile_impl_perftest.cc89
-rw-r--r--chromium/cc/resources/picture_pile_impl_unittest.cc349
-rw-r--r--chromium/cc/resources/picture_pile_unittest.cc442
-rw-r--r--chromium/cc/resources/picture_unittest.cc297
-rw-r--r--chromium/cc/resources/pixel_buffer_raster_worker_pool.cc865
-rw-r--r--chromium/cc/resources/pixel_buffer_raster_worker_pool.h118
-rw-r--r--chromium/cc/resources/prioritized_resource.cc22
-rw-r--r--chromium/cc/resources/prioritized_resource.h16
-rw-r--r--chromium/cc/resources/prioritized_resource_manager.cc6
-rw-r--r--chromium/cc/resources/prioritized_resource_manager.h4
-rw-r--r--chromium/cc/resources/prioritized_resource_unittest.cc10
-rw-r--r--chromium/cc/resources/prioritized_tile_set.cc13
-rw-r--r--chromium/cc/resources/prioritized_tile_set_unittest.cc34
-rw-r--r--chromium/cc/resources/priority_calculator.cc4
-rw-r--r--chromium/cc/resources/priority_calculator.h4
-rw-r--r--chromium/cc/resources/raster_mode.cc9
-rw-r--r--chromium/cc/resources/raster_mode.h9
-rw-r--r--chromium/cc/resources/raster_worker_pool.cc716
-rw-r--r--chromium/cc/resources/raster_worker_pool.h323
-rw-r--r--chromium/cc/resources/raster_worker_pool_perftest.cc566
-rw-r--r--chromium/cc/resources/raster_worker_pool_unittest.cc409
-rw-r--r--chromium/cc/resources/rasterizer.cc79
-rw-r--r--chromium/cc/resources/rasterizer.h165
-rw-r--r--chromium/cc/resources/release_callback.h3
-rw-r--r--chromium/cc/resources/resource.h7
-rw-r--r--chromium/cc/resources/resource_format.cc8
-rw-r--r--chromium/cc/resources/resource_format.h2
-rw-r--r--chromium/cc/resources/resource_pool.cc22
-rw-r--r--chromium/cc/resources/resource_pool.h13
-rw-r--r--chromium/cc/resources/resource_provider.cc1192
-rw-r--r--chromium/cc/resources/resource_provider.h261
-rw-r--r--chromium/cc/resources/resource_provider_unittest.cc1000
-rw-r--r--chromium/cc/resources/resource_update.cc29
-rw-r--r--chromium/cc/resources/resource_update.h15
-rw-r--r--chromium/cc/resources/resource_update_controller.cc9
-rw-r--r--chromium/cc/resources/resource_update_controller.h1
-rw-r--r--chromium/cc/resources/resource_update_controller_unittest.cc22
-rw-r--r--chromium/cc/resources/scoped_resource.cc10
-rw-r--r--chromium/cc/resources/scoped_resource.h10
-rw-r--r--chromium/cc/resources/scoped_resource_unittest.cc25
-rw-r--r--chromium/cc/resources/shared_bitmap.cc68
-rw-r--r--chromium/cc/resources/shared_bitmap.h25
-rw-r--r--chromium/cc/resources/shared_bitmap_manager.h5
-rw-r--r--chromium/cc/resources/single_release_callback.cc2
-rw-r--r--chromium/cc/resources/single_release_callback.h2
-rw-r--r--chromium/cc/resources/skpicture_content_layer_updater.cc19
-rw-r--r--chromium/cc/resources/skpicture_content_layer_updater.h15
-rw-r--r--chromium/cc/resources/task_graph_runner.cc477
-rw-r--r--chromium/cc/resources/task_graph_runner.h232
-rw-r--r--chromium/cc/resources/task_graph_runner_perftest.cc318
-rw-r--r--chromium/cc/resources/task_graph_runner_unittest.cc331
-rw-r--r--chromium/cc/resources/texture_mailbox.cc93
-rw-r--r--chromium/cc/resources/texture_mailbox.h44
-rw-r--r--chromium/cc/resources/texture_mailbox_deleter.cc12
-rw-r--r--chromium/cc/resources/texture_mailbox_deleter.h15
-rw-r--r--chromium/cc/resources/texture_mailbox_deleter_unittest.cc7
-rw-r--r--chromium/cc/resources/texture_uploader.cc333
-rw-r--r--chromium/cc/resources/texture_uploader.h118
-rw-r--r--chromium/cc/resources/texture_uploader_unittest.cc231
-rw-r--r--chromium/cc/resources/tile.cc48
-rw-r--r--chromium/cc/resources/tile.h66
-rw-r--r--chromium/cc/resources/tile_manager.cc1362
-rw-r--r--chromium/cc/resources/tile_manager.h230
-rw-r--r--chromium/cc/resources/tile_manager_perftest.cc400
-rw-r--r--chromium/cc/resources/tile_manager_unittest.cc833
-rw-r--r--chromium/cc/resources/tile_priority.cc146
-rw-r--r--chromium/cc/resources/tile_priority.h75
-rw-r--r--chromium/cc/resources/tile_priority_unittest.cc76
-rw-r--r--chromium/cc/resources/transferable_resource.cc8
-rw-r--r--chromium/cc/resources/transferable_resource.h7
-rw-r--r--chromium/cc/resources/ui_resource_bitmap.cc32
-rw-r--r--chromium/cc/resources/ui_resource_bitmap.h12
-rw-r--r--chromium/cc/resources/video_resource_updater.cc125
-rw-r--r--chromium/cc/resources/video_resource_updater.h4
-rw-r--r--chromium/cc/resources/video_resource_updater_unittest.cc21
-rw-r--r--chromium/cc/resources/worker_pool.cc433
-rw-r--r--chromium/cc/resources/worker_pool.h143
-rw-r--r--chromium/cc/resources/worker_pool_perftest.cc235
-rw-r--r--chromium/cc/resources/worker_pool_unittest.cc394
-rw-r--r--chromium/cc/scheduler/delay_based_time_source.cc56
-rw-r--r--chromium/cc/scheduler/delay_based_time_source.h36
-rw-r--r--chromium/cc/scheduler/delay_based_time_source_unittest.cc50
-rw-r--r--chromium/cc/scheduler/draw_result.h21
-rw-r--r--chromium/cc/scheduler/frame_rate_controller.cc178
-rw-r--r--chromium/cc/scheduler/frame_rate_controller.h101
-rw-r--r--chromium/cc/scheduler/frame_rate_controller_unittest.cc211
-rw-r--r--chromium/cc/scheduler/rolling_time_delta_history.cc65
-rw-r--r--chromium/cc/scheduler/rolling_time_delta_history.h44
-rw-r--r--chromium/cc/scheduler/rolling_time_delta_history_unittest.cc109
-rw-r--r--chromium/cc/scheduler/scheduler.cc654
-rw-r--r--chromium/cc/scheduler/scheduler.h176
-rw-r--r--chromium/cc/scheduler/scheduler_settings.cc44
-rw-r--r--chromium/cc/scheduler/scheduler_settings.h11
-rw-r--r--chromium/cc/scheduler/scheduler_state_machine.cc653
-rw-r--r--chromium/cc/scheduler/scheduler_state_machine.h113
-rw-r--r--chromium/cc/scheduler/scheduler_state_machine_unittest.cc1387
-rw-r--r--chromium/cc/scheduler/scheduler_unittest.cc1931
-rw-r--r--chromium/cc/scheduler/texture_uploader.cc333
-rw-r--r--chromium/cc/scheduler/texture_uploader.h122
-rw-r--r--chromium/cc/scheduler/texture_uploader_unittest.cc235
-rw-r--r--chromium/cc/scheduler/time_source.h51
-rw-r--r--chromium/cc/surfaces/OWNERS1
-rw-r--r--chromium/cc/surfaces/display.cc163
-rw-r--r--chromium/cc/surfaces/display.h91
-rw-r--r--chromium/cc/surfaces/display_client.h23
-rw-r--r--chromium/cc/surfaces/surface.cc92
-rw-r--r--chromium/cc/surfaces/surface.h75
-rw-r--r--chromium/cc/surfaces/surface_aggregator.cc250
-rw-r--r--chromium/cc/surfaces/surface_aggregator.h70
-rw-r--r--chromium/cc/surfaces/surface_aggregator_test_helpers.cc172
-rw-r--r--chromium/cc/surfaces/surface_aggregator_test_helpers.h95
-rw-r--r--chromium/cc/surfaces/surface_aggregator_unittest.cc708
-rw-r--r--chromium/cc/surfaces/surface_client.h22
-rw-r--r--chromium/cc/surfaces/surface_id.h29
-rw-r--r--chromium/cc/surfaces/surface_manager.cc37
-rw-r--r--chromium/cc/surfaces/surface_manager.h39
-rw-r--r--chromium/cc/surfaces/surface_unittest.cc411
-rw-r--r--chromium/cc/surfaces/surfaces_export.h29
-rw-r--r--chromium/cc/surfaces/surfaces_pixeltest.cc312
-rw-r--r--chromium/cc/trees/blocking_task_runner.cc47
-rw-r--r--chromium/cc/trees/blocking_task_runner.h6
-rw-r--r--chromium/cc/trees/damage_tracker.cc86
-rw-r--r--chromium/cc/trees/damage_tracker.h31
-rw-r--r--chromium/cc/trees/damage_tracker_unittest.cc515
-rw-r--r--chromium/cc/trees/layer_sorter.cc13
-rw-r--r--chromium/cc/trees/layer_sorter.h2
-rw-r--r--chromium/cc/trees/layer_sorter_unittest.cc7
-rw-r--r--chromium/cc/trees/layer_tree_host.cc404
-rw-r--r--chromium/cc/trees/layer_tree_host.h81
-rw-r--r--chromium/cc/trees/layer_tree_host_client.h12
-rw-r--r--chromium/cc/trees/layer_tree_host_common.cc899
-rw-r--r--chromium/cc/trees/layer_tree_host_common.h62
-rw-r--r--chromium/cc/trees/layer_tree_host_common_perftest.cc113
-rw-r--r--chromium/cc/trees/layer_tree_host_common_unittest.cc4895
-rw-r--r--chromium/cc/trees/layer_tree_host_impl.cc1481
-rw-r--r--chromium/cc/trees/layer_tree_host_impl.h249
-rw-r--r--chromium/cc/trees/layer_tree_host_impl_unittest.cc2518
-rw-r--r--chromium/cc/trees/layer_tree_host_perftest.cc88
-rw-r--r--chromium/cc/trees/layer_tree_host_pixeltest_filters.cc13
-rw-r--r--chromium/cc/trees/layer_tree_host_pixeltest_masks.cc39
-rw-r--r--chromium/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc42
-rw-r--r--chromium/cc/trees/layer_tree_host_pixeltest_readback.cc503
-rw-r--r--chromium/cc/trees/layer_tree_host_unittest.cc1863
-rw-r--r--chromium/cc/trees/layer_tree_host_unittest_animation.cc500
-rw-r--r--chromium/cc/trees/layer_tree_host_unittest_context.cc968
-rw-r--r--chromium/cc/trees/layer_tree_host_unittest_copyrequest.cc106
-rw-r--r--chromium/cc/trees/layer_tree_host_unittest_damage.cc169
-rw-r--r--chromium/cc/trees/layer_tree_host_unittest_delegated.cc379
-rw-r--r--chromium/cc/trees/layer_tree_host_unittest_no_message_loop.cc235
-rw-r--r--chromium/cc/trees/layer_tree_host_unittest_occlusion.cc17
-rw-r--r--chromium/cc/trees/layer_tree_host_unittest_proxy.cc135
-rw-r--r--chromium/cc/trees/layer_tree_host_unittest_scroll.cc364
-rw-r--r--chromium/cc/trees/layer_tree_host_unittest_video.cc12
-rw-r--r--chromium/cc/trees/layer_tree_impl.cc885
-rw-r--r--chromium/cc/trees/layer_tree_impl.h75
-rw-r--r--chromium/cc/trees/layer_tree_impl_unittest.cc2074
-rw-r--r--chromium/cc/trees/layer_tree_settings.cc29
-rw-r--r--chromium/cc/trees/layer_tree_settings.h32
-rw-r--r--chromium/cc/trees/occlusion_tracker.cc219
-rw-r--r--chromium/cc/trees/occlusion_tracker.h43
-rw-r--r--chromium/cc/trees/occlusion_tracker_perftest.cc206
-rw-r--r--chromium/cc/trees/occlusion_tracker_unittest.cc584
-rw-r--r--chromium/cc/trees/proxy.cc31
-rw-r--r--chromium/cc/trees/proxy.h26
-rw-r--r--chromium/cc/trees/proxy_timing_history.cc66
-rw-r--r--chromium/cc/trees/proxy_timing_history.h40
-rw-r--r--chromium/cc/trees/quad_culler.cc108
-rw-r--r--chromium/cc/trees/quad_culler.h49
-rw-r--r--chromium/cc/trees/quad_culler_unittest.cc919
-rw-r--r--chromium/cc/trees/single_thread_proxy.cc229
-rw-r--r--chromium/cc/trees/single_thread_proxy.h61
-rw-r--r--chromium/cc/trees/thread_proxy.cc1367
-rw-r--r--chromium/cc/trees/thread_proxy.h327
-rw-r--r--chromium/cc/trees/tree_synchronizer.cc94
-rw-r--r--chromium/cc/trees/tree_synchronizer.h3
-rw-r--r--chromium/cc/trees/tree_synchronizer_unittest.cc84
-rw-r--r--chromium/chrome/VERSION6
-rw-r--r--chromium/chrome/android/java/strings/android_chrome_strings.grd271
-rw-r--r--chromium/chrome/angle.isolate21
-rw-r--r--chromium/chrome/angle_unittests.isolate20
-rw-r--r--chromium/chrome/app/address_input_strings.grd194
-rw-r--r--chromium/chrome/app/address_input_strings.grdp254
-rw-r--r--chromium/chrome/app/bookmarks_strings.grdp211
-rw-r--r--chromium/chrome/app/cf_resources.rc61
-rw-r--r--chromium/chrome/app/chromeos_strings.grdp2105
-rw-r--r--chromium/chrome/app/chromium_strings.grd795
-rw-r--r--chromium/chrome/app/generated_resources.grd13666
-rw-r--r--chromium/chrome/app/google_chrome_strings.grd776
-rw-r--r--chromium/chrome/app/resources/BUILD.gn11
-rw-r--r--chromium/chrome/app/resources/address_input_strings_am.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_ar.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_bg.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_bn.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_ca.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_cs.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_da.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_de.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_el.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_en-GB.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_es-419.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_es.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_et.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_fa.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_fi.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_fil.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_fr.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_gu.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_hi.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_hr.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_hu.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_id.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_it.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_iw.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_ja.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_kn.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_ko.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_lt.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_lv.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_ml.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_mr.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_ms.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_nl.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_no.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_pl.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_pt-BR.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_pt-PT.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_ro.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_ru.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_sk.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_sl.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_sr.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_sv.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_sw.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_ta.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_te.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_th.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_tr.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_uk.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_vi.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_zh-CN.xtb38
-rw-r--r--chromium/chrome/app/resources/address_input_strings_zh-TW.xtb38
-rw-r--r--chromium/chrome/app/resources/chromium_strings_am.xtb83
-rw-r--r--chromium/chrome/app/resources/chromium_strings_ar.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_bg.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_bn.xtb79
-rw-r--r--chromium/chrome/app/resources/chromium_strings_ca.xtb87
-rw-r--r--chromium/chrome/app/resources/chromium_strings_cs.xtb79
-rw-r--r--chromium/chrome/app/resources/chromium_strings_da.xtb79
-rw-r--r--chromium/chrome/app/resources/chromium_strings_de.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_el.xtb87
-rw-r--r--chromium/chrome/app/resources/chromium_strings_en-GB.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_es-419.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_es.xtb81
-rw-r--r--chromium/chrome/app/resources/chromium_strings_et.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_fa.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_fi.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_fil.xtb79
-rw-r--r--chromium/chrome/app/resources/chromium_strings_fr.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_gu.xtb82
-rw-r--r--chromium/chrome/app/resources/chromium_strings_hi.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_hr.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_hu.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_id.xtb81
-rw-r--r--chromium/chrome/app/resources/chromium_strings_it.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_iw.xtb87
-rw-r--r--chromium/chrome/app/resources/chromium_strings_ja.xtb79
-rw-r--r--chromium/chrome/app/resources/chromium_strings_kn.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_ko.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_lt.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_lv.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_ml.xtb79
-rw-r--r--chromium/chrome/app/resources/chromium_strings_mr.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_ms.xtb85
-rw-r--r--chromium/chrome/app/resources/chromium_strings_nl.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_no.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_pl.xtb81
-rw-r--r--chromium/chrome/app/resources/chromium_strings_pt-BR.xtb79
-rw-r--r--chromium/chrome/app/resources/chromium_strings_pt-PT.xtb79
-rw-r--r--chromium/chrome/app/resources/chromium_strings_ro.xtb87
-rw-r--r--chromium/chrome/app/resources/chromium_strings_ru.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_sk.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_sl.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_sr.xtb79
-rw-r--r--chromium/chrome/app/resources/chromium_strings_sv.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_sw.xtb83
-rw-r--r--chromium/chrome/app/resources/chromium_strings_ta.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_te.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_th.xtb81
-rw-r--r--chromium/chrome/app/resources/chromium_strings_tr.xtb79
-rw-r--r--chromium/chrome/app/resources/chromium_strings_uk.xtb77
-rw-r--r--chromium/chrome/app/resources/chromium_strings_vi.xtb121
-rw-r--r--chromium/chrome/app/resources/chromium_strings_zh-CN.xtb79
-rw-r--r--chromium/chrome/app/resources/chromium_strings_zh-TW.xtb79
-rw-r--r--chromium/chrome/app/resources/generated_resources_am.xtb1882
-rw-r--r--chromium/chrome/app/resources/generated_resources_ar.xtb1736
-rw-r--r--chromium/chrome/app/resources/generated_resources_bg.xtb1746
-rw-r--r--chromium/chrome/app/resources/generated_resources_bn.xtb1787
-rw-r--r--chromium/chrome/app/resources/generated_resources_ca.xtb2182
-rw-r--r--chromium/chrome/app/resources/generated_resources_cs.xtb1849
-rw-r--r--chromium/chrome/app/resources/generated_resources_da.xtb1938
-rw-r--r--chromium/chrome/app/resources/generated_resources_de.xtb1784
-rw-r--r--chromium/chrome/app/resources/generated_resources_el.xtb1883
-rw-r--r--chromium/chrome/app/resources/generated_resources_en-GB.xtb1754
-rw-r--r--chromium/chrome/app/resources/generated_resources_es-419.xtb1748
-rw-r--r--chromium/chrome/app/resources/generated_resources_es.xtb1801
-rw-r--r--chromium/chrome/app/resources/generated_resources_et.xtb1833
-rw-r--r--chromium/chrome/app/resources/generated_resources_fa.xtb1759
-rw-r--r--chromium/chrome/app/resources/generated_resources_fi.xtb1791
-rw-r--r--chromium/chrome/app/resources/generated_resources_fil.xtb1785
-rw-r--r--chromium/chrome/app/resources/generated_resources_fr.xtb1826
-rw-r--r--chromium/chrome/app/resources/generated_resources_gu.xtb1758
-rw-r--r--chromium/chrome/app/resources/generated_resources_hi.xtb1844
-rw-r--r--chromium/chrome/app/resources/generated_resources_hr.xtb1737
-rw-r--r--chromium/chrome/app/resources/generated_resources_hu.xtb1837
-rw-r--r--chromium/chrome/app/resources/generated_resources_id.xtb1798
-rw-r--r--chromium/chrome/app/resources/generated_resources_it.xtb1715
-rw-r--r--chromium/chrome/app/resources/generated_resources_iw.xtb1803
-rw-r--r--chromium/chrome/app/resources/generated_resources_ja.xtb1796
-rw-r--r--chromium/chrome/app/resources/generated_resources_kn.xtb1859
-rw-r--r--chromium/chrome/app/resources/generated_resources_ko.xtb1799
-rw-r--r--chromium/chrome/app/resources/generated_resources_lt.xtb1891
-rw-r--r--chromium/chrome/app/resources/generated_resources_lv.xtb1809
-rw-r--r--chromium/chrome/app/resources/generated_resources_ml.xtb1804
-rw-r--r--chromium/chrome/app/resources/generated_resources_mr.xtb1753
-rw-r--r--chromium/chrome/app/resources/generated_resources_ms.xtb1957
-rw-r--r--chromium/chrome/app/resources/generated_resources_nl.xtb1853
-rw-r--r--chromium/chrome/app/resources/generated_resources_no.xtb2073
-rw-r--r--chromium/chrome/app/resources/generated_resources_pl.xtb1844
-rw-r--r--chromium/chrome/app/resources/generated_resources_pt-BR.xtb1798
-rw-r--r--chromium/chrome/app/resources/generated_resources_pt-PT.xtb1889
-rw-r--r--chromium/chrome/app/resources/generated_resources_ro.xtb2745
-rw-r--r--chromium/chrome/app/resources/generated_resources_ru.xtb1762
-rw-r--r--chromium/chrome/app/resources/generated_resources_sk.xtb1897
-rw-r--r--chromium/chrome/app/resources/generated_resources_sl.xtb1764
-rw-r--r--chromium/chrome/app/resources/generated_resources_sr.xtb1945
-rw-r--r--chromium/chrome/app/resources/generated_resources_sv.xtb1774
-rw-r--r--chromium/chrome/app/resources/generated_resources_sw.xtb2029
-rw-r--r--chromium/chrome/app/resources/generated_resources_ta.xtb1852
-rw-r--r--chromium/chrome/app/resources/generated_resources_te.xtb1815
-rw-r--r--chromium/chrome/app/resources/generated_resources_th.xtb1841
-rw-r--r--chromium/chrome/app/resources/generated_resources_tr.xtb1812
-rw-r--r--chromium/chrome/app/resources/generated_resources_uk.xtb1757
-rw-r--r--chromium/chrome/app/resources/generated_resources_vi.xtb2291
-rw-r--r--chromium/chrome/app/resources/generated_resources_zh-CN.xtb1798
-rw-r--r--chromium/chrome/app/resources/generated_resources_zh-TW.xtb1852
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_am.xtb92
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_ar.xtb84
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_bg.xtb84
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_bn.xtb86
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_ca.xtb102
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_cs.xtb86
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_da.xtb86
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_de.xtb90
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_el.xtb94
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_en-GB.xtb84
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_es-419.xtb86
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_es.xtb92
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_et.xtb84
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_fa.xtb84
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_fi.xtb86
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_fil.xtb90
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_fr.xtb86
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_gu.xtb92
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_hi.xtb90
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_hr.xtb84
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_hu.xtb90
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_id.xtb94
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_it.xtb84
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_iw.xtb92
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_ja.xtb86
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_kn.xtb92
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_ko.xtb84
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_lt.xtb84
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_lv.xtb84
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_ml.xtb88
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_mr.xtb84
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_ms.xtb94
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_nl.xtb86
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_no.xtb90
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_pl.xtb86
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_pt-BR.xtb88
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_pt-PT.xtb96
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_ro.xtb132
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_ru.xtb84
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_sk.xtb92
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_sl.xtb84
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_sr.xtb88
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_sv.xtb84
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_sw.xtb96
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_ta.xtb86
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_te.xtb88
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_th.xtb92
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_tr.xtb88
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_uk.xtb84
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_vi.xtb140
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_zh-CN.xtb90
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_zh-TW.xtb88
-rw-r--r--chromium/chrome/app/resources/locale_settings.grd170
-rw-r--r--chromium/chrome/app/resources/locale_settings_chromiumos.grd30
-rw-r--r--chromium/chrome/app/resources/locale_settings_google_chromeos.grd30
-rw-r--r--chromium/chrome/app/resources/locale_settings_linux.grd22
-rw-r--r--chromium/chrome/app/resources/locale_settings_mac.grd4
-rw-r--r--chromium/chrome/app/resources/locale_settings_win.grd5
-rw-r--r--chromium/chrome/app/resources/platform_locale_settings/locale_settings_cros_ja.xtb4
-rw-r--r--chromium/chrome/app/resources/platform_locale_settings/locale_settings_cros_zh-CN.xtb4
-rw-r--r--chromium/chrome/app/resources/platform_locale_settings/locale_settings_cros_zh-TW.xtb4
-rw-r--r--chromium/chrome/app/resources/platform_locale_settings/locale_settings_mac_zh-TW.xtb4
-rw-r--r--chromium/chrome/app/resources/terms/chromeos/terms_en.html2
-rw-r--r--chromium/chrome/app/resources/terms/terms_en.html2
-rw-r--r--chromium/chrome/app/theme/BUILD.gn10
-rw-r--r--chromium/chrome/app/theme/chrome_unscaled_resources.grd111
-rw-r--r--chromium/chrome/app/theme/chromium/BRANDING4
-rw-r--r--chromium/chrome/app/theme/chromium/app_list.icobin26489 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/chromium/linux/app_list_16.pngbin0 -> 270 bytes
-rw-r--r--chromium/chrome/app/theme/chromium/linux/app_list_256.pngbin0 -> 1986 bytes
-rw-r--r--chromium/chrome/app/theme/chromium/linux/app_list_32.pngbin0 -> 418 bytes
-rw-r--r--chromium/chrome/app/theme/chromium/linux/app_list_48.pngbin0 -> 530 bytes
-rw-r--r--chromium/chrome/app/theme/chromium/mac/app.icns (renamed from chromium/chrome/app/theme/chromium/app.icns)bin147653 -> 147653 bytes
-rw-r--r--chromium/chrome/app/theme/chromium/mac/app_list_128.png (renamed from chromium/chrome/app/theme/chromium/app_list_128.png)bin1049 -> 1049 bytes
-rw-r--r--chromium/chrome/app/theme/chromium/mac/app_list_16.png (renamed from chromium/chrome/app/theme/chromium/app_list_16.png)bin227 -> 227 bytes
-rw-r--r--chromium/chrome/app/theme/chromium/mac/app_list_256.png (renamed from chromium/chrome/app/theme/chromium/app_list_256.png)bin1351 -> 1351 bytes
-rw-r--r--chromium/chrome/app/theme/chromium/mac/app_list_32.png (renamed from chromium/chrome/app/theme/chromium/app_list_32.png)bin410 -> 410 bytes
-rw-r--r--chromium/chrome/app/theme/chromium/mac/document.icns (renamed from chromium/chrome/app/theme/chromium/document.icns)bin86929 -> 86929 bytes
-rw-r--r--chromium/chrome/app/theme/chromium/product_logo_name.pngbin2307 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/chromium/win/app_list.icobin0 -> 24494 bytes
-rw-r--r--chromium/chrome/app/theme/chromium/win/chromium.icobin0 -> 48292 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/about_conflicts.pngbin4886 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/accessed_cookies.pngbin909 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/alert_small.pngbin495 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/app_default_icon.pngbin4453 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/app_droparrow.pngbin79 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/app_list_tab_overlay.pngbin183 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/back.pngbin284 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/back_disabled.pngbin273 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/back_hover.pngbin579 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/back_large.pngbin1413 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/back_pressed.pngbin603 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/browser_action.pngbin87 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/browser_action_highlight.pngbin366 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/chromium/ic_gplus_color_16.pngbin231 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/accessed_cookies.pngbin626 -> 909 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/accessibility_icon.pngbin436 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/alert_small.pngbin494 -> 495 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/allowed_mic_only.pngbin236 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_list_mic_hotword_off.pngbin0 -> 324 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_window_close.png (renamed from chromium/chrome/app/theme/default_100_percent/win/app_window_close.png)bin107 -> 107 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_window_close_active.png (renamed from chromium/chrome/app/theme/default_100_percent/win/app_window_close_active.png)bin107 -> 107 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_window_close_hover.png (renamed from chromium/chrome/app/theme/default_100_percent/win/app_window_close_hover.png)bin107 -> 107 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_window_close_unfocused.png (renamed from chromium/chrome/app/theme/default_100_percent/win/app_window_close_unfocused.png)bin107 -> 107 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_window_maximize.png (renamed from chromium/chrome/app/theme/default_100_percent/win/app_window_maximize.png)bin87 -> 87 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_window_maximize_active.png (renamed from chromium/chrome/app/theme/default_100_percent/win/app_window_maximize_active.png)bin98 -> 98 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_window_maximize_disabled.png (renamed from chromium/chrome/app/theme/default_100_percent/win/app_window_maximize_disabled.png)bin87 -> 87 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_window_maximize_hover.png (renamed from chromium/chrome/app/theme/default_100_percent/win/app_window_maximize_hover.png)bin98 -> 98 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_window_maximize_light.pngbin0 -> 87 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_window_minimize.png (renamed from chromium/chrome/app/theme/default_100_percent/win/app_window_minimize.png)bin90 -> 90 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_window_minimize_active.png (renamed from chromium/chrome/app/theme/default_100_percent/win/app_window_minimize_active.png)bin92 -> 92 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_window_minimize_hover.png (renamed from chromium/chrome/app/theme/default_100_percent/win/app_window_minimize_hover.png)bin92 -> 92 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_window_minimize_light.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_window_restore.png (renamed from chromium/chrome/app/theme/default_100_percent/win/app_window_restore.png)bin99 -> 99 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_window_restore_active.png (renamed from chromium/chrome/app/theme/default_100_percent/win/app_window_restore_active.png)bin104 -> 104 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_window_restore_hover.png (renamed from chromium/chrome/app/theme/default_100_percent/win/app_window_restore_hover.png)bin104 -> 104 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/app_window_restore_light.pngbin0 -> 96 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/browser_window_control_background_maximized_hover.pngbin0 -> 87 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/browser_window_control_background_maximized_pressed.pngbin0 -> 87 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/browser_window_control_background_restored_hover.pngbin0 -> 97 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/browser_window_control_background_restored_pressed.pngbin0 -> 97 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/browser_window_control_icon_close.pngbin0 -> 224 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/browser_window_control_icon_left_snapped.pngbin0 -> 188 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/browser_window_control_icon_minimize.pngbin0 -> 103 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/browser_window_control_icon_right_snapped.pngbin0 -> 186 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/browser_window_control_icon_size.pngbin0 -> 187 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/browser_window_header_shade_left.png (renamed from chromium/ash/resources/default_100_percent/common/window_header_shade_left.png)bin93 -> 93 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/browser_window_header_shade_right.png (renamed from chromium/ash/resources/default_100_percent/common/window_header_shade_right.png)bin93 -> 93 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/browser_window_header_shade_top.png (renamed from chromium/ash/resources/default_100_percent/common/window_header_shade_top.png)bin74 -> 74 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/browser_window_header_shade_top_left.png (renamed from chromium/ash/resources/default_100_percent/common/window_header_shade_top_left.png)bin78 -> 78 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/browser_window_header_shade_top_right.png (renamed from chromium/ash/resources/default_100_percent/common/window_header_shade_top_right.png)bin78 -> 78 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/content_top_center.png (renamed from chromium/chrome/app/theme/default_100_percent/cros/content_top_center.png)bin89 -> 89 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/otr_icon.png (renamed from chromium/chrome/app/theme/default_100_percent/cros/otr_icon.png)bin1468 -> 1468 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/theme_default_active.png (renamed from chromium/chrome/app/theme/default_100_percent/cros/theme_default_active.png)bin286 -> 286 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/theme_default_inactive.png (renamed from chromium/chrome/app/theme/default_100_percent/cros/theme_default_inactive.png)bin153 -> 153 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/theme_frame_active.png (renamed from chromium/chrome/app/theme/default_100_percent/cros/theme_frame_active.png)bin87 -> 87 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/theme_frame_inactive.png (renamed from chromium/chrome/app/theme/default_100_percent/cros/theme_frame_inactive.png)bin87 -> 87 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/theme_frame_incognito_active.png (renamed from chromium/chrome/app/theme/default_100_percent/cros/theme_frame_incognito_active.png)bin87 -> 87 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ash/theme_frame_incognito_inactive.png (renamed from chromium/chrome/app/theme/default_100_percent/cros/theme_frame_incognito_inactive.png)bin87 -> 87 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/avatar_button_auth_error.pngbin0 -> 190 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/avatar_menu_auth_error.pngbin0 -> 231 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/avatar_menu_lock.pngbin0 -> 207 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/avatar_menu_profile.pngbin0 -> 188 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/avatar_menu_supervised.pngbin0 -> 715 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/back_large.pngbin1403 -> 1403 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/block_notifier.pngbin0 -> 259 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/blocked_fullscreen.pngbin354 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/blocked_mic_only.pngbin439 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/bookmark_bar_folder_managed.pngbin0 -> 340 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/brightness_icon.pngbin3232 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/broken_image.pngbin448 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/browser_action_highlight.pngbin366 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/browser_tools_badge_aura.pngbin165 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/browser_tools_normal_aura.pngbin304 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/caps_lock_icon.pngbin333 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/carrot_blue.pngbin0 -> 230 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chevron_left.pngbin0 -> 117 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_hover_bottom.pngbin0 -> 110 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_hover_bottom_left.pngbin0 -> 135 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_hover_bottom_right.pngbin0 -> 117 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_hover_center.pngbin0 -> 78 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_hover_left.pngbin0 -> 87 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_hover_right.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_hover_top.pngbin0 -> 247 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_hover_top_left.pngbin0 -> 276 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_hover_top_right.pngbin0 -> 264 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_normal_bottom.pngbin0 -> 107 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_normal_bottom_left.pngbin0 -> 126 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_normal_bottom_right.pngbin0 -> 107 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_normal_center.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_normal_left.pngbin0 -> 86 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_normal_right.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_normal_top.pngbin0 -> 256 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_normal_top_left.pngbin0 -> 270 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_normal_top_right.pngbin0 -> 262 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_pressed_bottom.pngbin0 -> 110 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_pressed_bottom_left.pngbin0 -> 127 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_pressed_bottom_right.pngbin0 -> 113 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_pressed_center.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_pressed_left.pngbin0 -> 86 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_pressed_right.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_pressed_top.pngbin0 -> 251 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_pressed_top_left.pngbin0 -> 282 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_brokenssl_pressed_top_right.pngbin0 -> 258 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_hover_bottom.pngbin0 -> 108 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_hover_bottom_left.pngbin0 -> 136 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_hover_bottom_right.pngbin0 -> 112 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_hover_center.pngbin0 -> 79 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_hover_left.pngbin0 -> 87 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_hover_right.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_hover_top.pngbin0 -> 223 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_hover_top_left.pngbin0 -> 264 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_hover_top_right.pngbin0 -> 249 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_normal_bottom.pngbin0 -> 106 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_normal_bottom_left.pngbin0 -> 128 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_normal_bottom_right.pngbin0 -> 106 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_normal_center.pngbin0 -> 79 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_normal_left.pngbin0 -> 85 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_normal_right.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_normal_top.pngbin0 -> 233 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_normal_top_left.pngbin0 -> 258 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_normal_top_right.pngbin0 -> 245 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_pressed_bottom.pngbin0 -> 107 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_pressed_bottom_left.pngbin0 -> 127 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_pressed_bottom_right.pngbin0 -> 105 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_pressed_center.pngbin0 -> 78 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_pressed_left.pngbin0 -> 86 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_pressed_right.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_pressed_top.pngbin0 -> 232 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_pressed_top_left.pngbin0 -> 267 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_extended_validation_pressed_top_right.pngbin0 -> 242 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_hover_bottom.pngbin0 -> 107 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_hover_bottom_left.pngbin0 -> 136 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_hover_bottom_right.pngbin0 -> 115 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_hover_center.pngbin0 -> 80 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_hover_left.pngbin0 -> 87 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_hover_right.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_hover_top.pngbin0 -> 245 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_hover_top_left.pngbin0 -> 272 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_hover_top_right.pngbin0 -> 261 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_hover_bottom.pngbin0 -> 111 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_hover_bottom_left.pngbin0 -> 137 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_hover_bottom_right.pngbin0 -> 117 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_hover_center.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_hover_left.pngbin0 -> 86 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_hover_right.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_hover_top.pngbin0 -> 253 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_hover_top_left.pngbin0 -> 276 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_hover_top_right.pngbin0 -> 267 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_normal_bottom.pngbin0 -> 108 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_normal_bottom_left.pngbin0 -> 126 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_normal_bottom_right.pngbin0 -> 108 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_normal_center.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_normal_left.pngbin0 -> 86 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_normal_right.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_normal_top.pngbin0 -> 251 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_normal_top_left.pngbin0 -> 275 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_normal_top_right.pngbin0 -> 253 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_pressed_bottom.pngbin0 -> 105 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_pressed_bottom_left.pngbin0 -> 126 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_pressed_bottom_right.pngbin0 -> 111 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_pressed_center.pngbin0 -> 79 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_pressed_left.pngbin0 -> 86 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_pressed_right.pngbin0 -> 79 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_pressed_top.pngbin0 -> 245 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_pressed_top_left.pngbin0 -> 272 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_malware_pressed_top_right.pngbin0 -> 247 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_normal_bottom.pngbin0 -> 111 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_normal_bottom_left.pngbin0 -> 128 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_normal_bottom_right.pngbin0 -> 114 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_normal_center.pngbin0 -> 80 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_normal_left.pngbin0 -> 86 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_normal_right.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_normal_top.pngbin0 -> 255 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_normal_top_left.pngbin0 -> 294 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_normal_top_right.pngbin0 -> 260 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_pressed_bottom.pngbin0 -> 110 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_pressed_bottom_left.pngbin0 -> 129 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_pressed_bottom_right.pngbin0 -> 114 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_pressed_center.pngbin0 -> 80 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_pressed_left.pngbin0 -> 86 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_pressed_right.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_pressed_top.pngbin0 -> 259 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_pressed_top_left.pngbin0 -> 284 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/chip_pressed_top_right.pngbin0 -> 260 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/compact_wrench_button.pngbin222 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/compact_wrench_button_hover.pngbin222 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/compact_wrench_tag_aero.pngbin242 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/compact_wrench_tag_opaque.pngbin159 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/constrained_bottom_center_vista.pngbin124 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/constrained_bottom_left_corner_vista.pngbin113 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/constrained_bottom_right_corner_vista.pngbin100 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/constrained_left_side_vista.pngbin77 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/constrained_right_side_vista.pngbin74 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/constrained_top_center_vista.pngbin789 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/constrained_top_left_corner_vista.pngbin460 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/constrained_top_right_corner_vista.pngbin410 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/controlled_setting_owner.pngbin0 -> 236 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/cookie.pngbin619 -> 618 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/cws_star_empty.pngbin203 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/cws_star_full.pngbin159 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/cws_star_half.pngbin192 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/developer_mode_highlight_bottom.pngbin0 -> 86 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/developer_mode_highlight_bottom_left.pngbin0 -> 132 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/developer_mode_highlight_bottom_right.pngbin0 -> 133 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/developer_mode_highlight_center.pngbin0 -> 72 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/developer_mode_highlight_left.pngbin0 -> 80 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/developer_mode_highlight_right.pngbin0 -> 80 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/developer_mode_highlight_top.pngbin0 -> 89 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/developer_mode_highlight_top_left.pngbin0 -> 189 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/developer_mode_highlight_top_right.pngbin0 -> 199 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/divider_vert.pngbin125 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/dock_tab_high.pngbin419 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/dock_tab_max.pngbin457 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/dock_tab_wide.pngbin422 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/edit_button_hover.pngbin0 -> 149 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/edit_button_pressed.pngbin0 -> 147 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/edit_camera.pngbin0 -> 688 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/enroll_success.pngbin301 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/exstension-features_28.pngbin990 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/extensions_section_small.pngbin681 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/favicon_settings.pngbin290 -> 340 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/feedback.pngbin475 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/feedback_hover.pngbin751 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/feedback_pressed.pngbin781 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/files_app_icon.pngbin315 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/find_box_bg.pngbin113 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/find_box_bg_left.pngbin195 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/find_dlg_middle_bg.pngbin75 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/folder.pngbin0 -> 105 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/forward.pngbin286 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/forward_disabled.pngbin275 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/forward_hover.pngbin572 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/forward_large.pngbin1409 -> 1409 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/forward_pressed.pngbin603 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/help_menu.pngbin208 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/home.pngbin272 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/home_hover.pngbin579 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/home_pressed.pngbin595 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ic_gplus_color_16.pngbin231 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/icon_add_user24.pngbin99 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/icon_add_user24_white.pngbin100 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/icon_add_user_white.pngbin115 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/icon_browse_as_guest_white.pngbin188 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/icon_power24.pngbin216 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/icon_power24_white.pngbin208 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/icon_supervised.pngbin0 -> 509 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/incognito_switch_off.pngbin197 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/incognito_switch_on.pngbin194 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/incompatibility_dot_active.pngbin192 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/incompatibility_dot_inactive.pngbin195 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/info_small.pngbin562 -> 563 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/infobar_3d_blocked.pngbin0 -> 516 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/infobar_alt_nav_url.png (renamed from chromium/chrome/app/theme/default_100_percent/common/infobar_didyoumean.png)bin802 -> 802 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/infobar_autofill_cc.png (renamed from chromium/chrome/app/theme/default_100_percent/common/infobar_autofill.png)bin396 -> 396 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/infobar_incomplete.pngbin364 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/infobar_lock.pngbin390 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/infobar_media_stream_camera.png (renamed from chromium/chrome/app/theme/default_100_percent/common/infobar_camera.png)bin290 -> 290 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/infobar_media_stream_mic.png (renamed from chromium/chrome/app/theme/default_100_percent/common/infobar_microphone.png)bin359 -> 359 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/infobar_plugin_install.png (renamed from chromium/chrome/app/theme/default_100_percent/common/infobar_plugin.png)bin566 -> 566 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/infobar_protected_media_identifier.pngbin175 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/infobar_restore_session.png (renamed from chromium/chrome/app/theme/default_100_percent/common/infobar_restore.png)bin325 -> 325 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/infobar_save_password.png (renamed from chromium/chrome/app/theme/default_100_percent/common/infobar_savepassword.png)bin296 -> 296 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/initializing_video.pngbin919 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/managed_small.pngbin323 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/media_stream_capture_led.pngbin605 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/mirror_flip.pngbin838 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/no_video.pngbin3833 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/notification_gdata.pngbin270 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/notification_menu.pngbin272 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/notification_update.pngbin666 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/notification_wrench.pngbin243 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/notification_wrench_hover.pngbin249 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/notification_wrench_pressed.pngbin249 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/notused.pngbin87 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ntp_background_white.pngbin74 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ntp_google_logo.pngbin0 -> 7891 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ntp_menu_mask.pngbin95 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ntp_option.pngbin187 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ntp_option_hover.pngbin187 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ntp_option_pressed.pngbin178 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ntp_webstore_thumb.pngbin33100 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/ntp_white_google_logo.pngbin0 -> 5954 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/nub.pngbin110 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/nub_mask.pngbin96 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_border.pngbin352 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_border_bottom.pngbin78 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_border_bottom_left.pngbin114 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_border_bottom_right.pngbin114 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_border_center.pngbin70 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_border_left.pngbin78 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_border_right.pngbin76 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_border_top.pngbin79 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_border_top_left.pngbin126 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_border_top_right.pngbin129 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_filling_bottom.pngbin79 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_filling_bottom_left.pngbin93 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_filling_bottom_right.pngbin96 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_filling_left.pngbin78 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_filling_right.pngbin79 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_filling_top.pngbin83 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_filling_top_left.pngbin99 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_filling_top_right.pngbin103 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_https_policy_warning.pngbin602 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_and_shadow_bottom.pngbin0 -> 77 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_and_shadow_bottom_left.pngbin0 -> 93 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_and_shadow_bottom_right.pngbin0 -> 94 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_and_shadow_center.pngbin0 -> 70 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_and_shadow_left.pngbin0 -> 74 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_and_shadow_right.pngbin0 -> 76 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_and_shadow_top.pngbin0 -> 78 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_and_shadow_top_left.pngbin0 -> 111 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_and_shadow_top_right.pngbin0 -> 113 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_bottom.pngbin75 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_bottom_left.pngbin88 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_bottom_right.pngbin89 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_center.pngbin67 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_left.pngbin72 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_right.pngbin72 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_top.pngbin75 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_top_left.pngbin106 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_popup_border_top_right.pngbin109 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_search_button_arrow.pngbin144 -> 175 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/omnibox_search_button_loupe.pngbin228 -> 229 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/pageinfo_bad.pngbin1435 -> 1432 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/payment_checkmark.pngbin143 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/profile_edit.pngbin195 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/profile_edit_hover.pngbin200 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/profile_edit_pressed.pngbin203 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/profile_loading.pngbin1590 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/profile_menu_question_hover.pngbin0 -> 380 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/profile_menu_question_select.pngbin0 -> 385 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/profile_menu_question_stable.pngbin0 -> 375 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/record_video.pngbin1106 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/reload.pngbin414 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/reload_hover.pngbin702 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/reload_pressed.pngbin742 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/save_password.pngbin169 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/save_password_active.pngbin0 -> 164 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/save_password_disabled_active.pngbin0 -> 186 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/save_password_disabled_inactive.pngbin0 -> 170 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/save_password_inactive.pngbin0 -> 151 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/script_bubble.pngbin428 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/sidebar_tab_active.pngbin143 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/sidebar_tab_inactive.pngbin164 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/sidetabs_new_tab.pngbin142 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/small_bubble.pngbin319 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/snapshot_wide_disabled.pngbin672 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/speech_input_mic_empty.pngbin107 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/speech_input_mic_full.pngbin101 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/speech_input_mic_mask.pngbin86 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/speech_input_mic_noise.pngbin102 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/speech_input_spinner.pngbin16546 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/speech_input_tray_linux_mic_empty.pngbin962 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/speech_input_tray_linux_mic_full.pngbin959 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/speech_input_tray_macosx_mic_empty.pngbin877 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/speech_input_tray_macosx_mic_full.pngbin886 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/speech_input_tray_windows_mic_empty.pngbin334 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/speech_input_tray_windows_mic_full.pngbin497 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/spinner.pngbin5711 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/star.pngbin537 -> 537 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/tabpose_close.pngbin603 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/take_photo.pngbin1833 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/textfield_bottom.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/textfield_bottom_left.pngbin0 -> 117 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/textfield_bottom_right.pngbin0 -> 119 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/textfield_center.pngbin0 -> 70 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/textfield_left.pngbin0 -> 79 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/textfield_right.pngbin0 -> 78 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/textfield_top.pngbin0 -> 82 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/textfield_top_left.pngbin0 -> 142 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/textfield_top_right.pngbin0 -> 143 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/throbber_waiting_light.pngbin11251 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_hover_bottom.pngbin88 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_hover_bottom_left.pngbin109 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_hover_bottom_right.pngbin110 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_hover_center.pngbin72 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_hover_left.pngbin85 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_hover_right.pngbin85 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_hover_top.pngbin106 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_hover_top_left.pngbin189 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_hover_top_right.pngbin191 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_pressed_bottom.pngbin85 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_pressed_bottom_left.pngbin108 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_pressed_bottom_right.pngbin108 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_pressed_center.pngbin71 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_pressed_left.pngbin81 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_pressed_right.pngbin79 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_pressed_top.pngbin102 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_pressed_top_left.pngbin153 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_button_pressed_top_right.pngbin153 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_divider.pngbin138 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_shade_bottom_left.pngbin70 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_shade_bottom_right.pngbin70 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/toolbar_shade_line.pngbin67 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/update_badge.pngbin378 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/update_badge2.pngbin365 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/update_badge3.pngbin372 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/update_badge4.pngbin351 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/user_manager_tutorial/complete.pngbin0 -> 3206 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/user_manager_tutorial/family_and_friends.pngbin0 -> 5989 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/user_manager_tutorial/guests.pngbin0 -> 5287 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/user_manager_tutorial/welcome.pngbin0 -> 4227 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/user_manager_tutorial/your_chrome.pngbin0 -> 6579 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/volume_down_icon.pngbin1359 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/volume_up_icon.pngbin2057 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/zoom_minus.pngbin258 -> 264 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/zoom_plus.pngbin263 -> 267 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/common/zoom_reset.pngbin0 -> 276 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/compact_wrench_button.pngbin222 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/compact_wrench_button_hover.pngbin222 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/compact_wrench_tag_aero.pngbin242 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/compact_wrench_tag_opaque.pngbin159 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/content_top_center.pngbin82 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/content_top_left_corner.pngbin144 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/content_top_left_corner_mask.pngbin95 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/content_top_right_corner.pngbin142 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/content_top_right_corner_mask.pngbin93 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/controlled_setting_extension.pngbin531 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/controlled_setting_mandatory.pngbin357 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cookie_storage.pngbin736 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/bluetooth_pairing_keyboard.pngbin0 -> 2912 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/bluetooth_pairing_mouse.pngbin0 -> 3149 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/bluetooth_pairing_tick.pngbin0 -> 3415 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/captive_portal_icon.pngbin0 -> 982 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/choose_file.png (renamed from chromium/chrome/app/theme/default_100_percent/common/choose_file.png)bin780 -> 780 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/controlled_setting_shared.pngbin0 -> 221 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/critical_error.pngbin2436 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/enroll_failure.png (renamed from chromium/chrome/app/theme/default_100_percent/common/enroll_failure.png)bin793 -> 793 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/enroll_success.pngbin0 -> 303 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/archive.pngbin124 -> 119 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/archive_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/archive_white.png)bin114 -> 114 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/audio.pngbin162 -> 150 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/audio_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/audio_white.png)bin122 -> 122 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/chart.pngbin111 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/excel.pngbin231 -> 392 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/excel_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/excel_white.png)bin237 -> 237 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/folder.pngbin105 -> 115 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/folder_shared.pngbin0 -> 155 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/folder_shared_white.pngbin0 -> 149 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/folder_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/folder_white.png)bin101 -> 101 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/form.pngbin118 -> 128 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/form_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/form_white.png)bin115 -> 115 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/gdoc.pngbin99 -> 100 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/gdoc_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/gdoc_white.png)bin99 -> 99 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/gdraw.pngbin158 -> 165 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/gdraw_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/gdraw_white.png)bin137 -> 137 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/generic.pngbin108 -> 104 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/generic_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/generic_white.png)bin101 -> 101 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/glink.pngbin108 -> 104 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/glink_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/glink_white.png)bin101 -> 101 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/gsheet.pngbin106 -> 107 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/gsheet_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/gsheet_white.png)bin104 -> 104 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/gslides.pngbin111 -> 99 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/gslides_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/gslides_white.png)bin99 -> 99 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/gtable.pngbin161 -> 146 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/gtable_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/gtable_white.png)bin123 -> 123 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/image.pngbin171 -> 215 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/image_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/image_white.png)bin155 -> 155 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/pdf.pngbin210 -> 123 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/pdf_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/pdf_white.png)bin113 -> 113 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/ppt.pngbin152 -> 178 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/ppt_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/ppt_white.png)bin144 -> 144 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/script.pngbin183 -> 180 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/script_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/script_white.png)bin151 -> 151 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/sites.pngbin113 -> 105 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/sites_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/sites_white.png)bin105 -> 105 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/thumbnails/folder.pngbin413 -> 412 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/thumbnails/folder_shared.pngbin0 -> 774 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/video.pngbin138 -> 117 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/video_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/video_white.png)bin107 -> 107 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/word.pngbin250 -> 372 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/file_types/word_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/100/word_white.png)bin241 -> 241 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/icon_add_user_white.png (renamed from chromium/chrome/app/theme/default_100_percent/icon_add_user_white.png)bin220 -> 220 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/icon_guest_white.png (renamed from chromium/chrome/app/theme/default_100_percent/icon_guest_white.png)bin302 -> 302 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/icon_power_white.png (renamed from chromium/chrome/app/theme/default_100_percent/icon_power_white.png)bin383 -> 383 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/kiosk_app_user_pod_icon.pngbin0 -> 96 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/login_add_user.pngbin1064 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/login_add_user_hover.pngbin1805 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/login_default.pngbin29683 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/login_default_blue.pngbin35502 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/login_default_green.pngbin25363 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/login_default_red.pngbin34849 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/login_default_yellow.pngbin26536 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/login_guest.pngbin10867 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/login_other.pngbin838 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/managed_mode_icon.pngbin213 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/mirror_flip.pngbin0 -> 837 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/network_show_password_off.pngbin167 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/network_show_password_on.pngbin233 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/notification_3g.pngbin1388 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/notification_bars_critical.pngbin153 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/notification_bars_empty.pngbin177 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/notification_battery_low.pngbin311 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/notification_drive.pngbin1197 -> 2086 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/notification_locale_change.pngbin1480 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/notification_network_failed.pngbin369 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/notification_sms.pngbin1698 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/oobe_progress_dot_current.pngbin184 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/oobe_progress_dot_empty.pngbin250 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/oobe_progress_dot_filled.pngbin188 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/oobe_progress_line.pngbin86 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/oobe_progress_line_left.pngbin133 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/oobe_progress_line_right.pngbin128 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/profile_loading.pngbin0 -> 2632 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/secondary_user_settings.pngbin0 -> 672 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/statusbar_volume_icon1.pngbin447 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cros/take_photo.pngbin0 -> 1832 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cws_star_empty.pngbin203 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cws_star_full.pngbin159 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/cws_star_half.pngbin192 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/discard_wide.pngbin425 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/divider_vert.pngbin125 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/dock_tab_high.pngbin419 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/dock_tab_max.pngbin457 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/dock_tab_wide.pngbin422 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/download_animation_begin.pngbin11355 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/download_progress_background16.pngbin911 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/download_progress_background32.pngbin1071 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/download_progress_foreground16.pngbin1136 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/download_progress_foreground32.pngbin2511 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/extension_command_close.pngbin156 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/extension_default_icon.pngbin3287 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/extensions_rating_star_half_left.pngbin201 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/extensions_rating_star_half_right.pngbin201 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/extensions_rating_star_off.pngbin158 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/extensions_rating_star_on.pngbin186 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/extensions_section.pngbin6166 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/extensions_section_small.pngbin683 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/feedback.pngbin475 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/feedback_hover.pngbin751 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/feedback_pressed.pngbin781 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/forward.pngbin286 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/forward_disabled.pngbin275 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/forward_hover.pngbin572 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/forward_large.pngbin1419 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/forward_pressed.pngbin603 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/frozen_tab.pngbin470 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/fullscreen_menu_button.pngbin111 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/home.pngbin272 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/home_hover.pngbin579 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/home_pressed.pngbin595 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/icon_add_user24.pngbin99 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/icon_power24.pngbin216 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/incognito_switch_off.pngbin197 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/incognito_switch_on.pngbin194 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/info_small.pngbin564 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobar_autofill.pngbin397 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobar_autologin.pngbin296 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobar_cookie.pngbin650 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobar_desktop_notifications.pngbin225 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobar_didyoumean.pngbin802 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobar_geolocation.pngbin756 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobar_incomplete.pngbin364 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobar_lock.pngbin390 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobar_multiple_downloads.pngbin323 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobar_plugin.pngbin566 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobar_plugin_crashed.pngbin621 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobar_protected_media_identifier.pngbin175 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobar_restore.pngbin325 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobar_savepassword.pngbin296 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobar_theme.pngbin818 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobar_translate.pngbin751 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_bottom_hover.pngbin79 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_bottom_left_hover.pngbin100 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_bottom_left_normal.pngbin98 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_bottom_left_pressed.pngbin98 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_bottom_normal.pngbin79 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_bottom_pressed.pngbin81 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_bottom_right_hover.pngbin96 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_bottom_right_normal.pngbin95 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_bottom_right_pressed.pngbin97 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_center_hover.pngbin90 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_center_normal.pngbin90 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_center_pressed.pngbin89 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_left_hover.pngbin92 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_left_normal.pngbin93 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_left_pressed.pngbin92 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_menu_droparrow.pngbin94 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_right_hover.pngbin99 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_right_normal.pngbin99 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_right_pressed.pngbin96 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_top_hover.pngbin81 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_top_left_hover.pngbin100 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_top_left_normal.pngbin100 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_top_left_pressed.pngbin99 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_top_normal.pngbin81 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_top_pressed.pngbin81 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_top_right_hover.pngbin100 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_top_right_normal.pngbin100 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/infobarbutton_top_right_pressed.pngbin99 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/initializing_video.pngbin935 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/keyword_search_magnifier.pngbin172 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/killtab.pngbin238 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/login_default.pngbin29683 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/login_default_blue.pngbin35502 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/login_default_green.pngbin25363 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/login_default_red.pngbin34849 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/login_default_yellow.pngbin26536 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/login_other.pngbin837 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/login_password_capslock.pngbin188 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_arrow.pngbin0 -> 117 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_arrow_hover.pngbin0 -> 115 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_arrow_pressed.pngbin0 -> 115 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_bottom.pngbin0 -> 78 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_bottom_hover.pngbin0 -> 84 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_bottom_left.pngbin0 -> 103 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_bottom_left_hover.pngbin0 -> 108 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_bottom_left_pressed.pngbin0 -> 108 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_bottom_pressed.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_bottom_right.pngbin0 -> 103 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_bottom_right_hover.pngbin0 -> 110 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_bottom_right_pressed.pngbin0 -> 108 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_center.pngbin0 -> 73 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_center_hover.pngbin0 -> 90 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_center_pressed.pngbin0 -> 82 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_left.pngbin0 -> 86 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_left_hover.pngbin0 -> 143 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_left_pressed.pngbin0 -> 113 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_right.pngbin0 -> 86 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_right_hover.pngbin0 -> 147 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_right_pressed.pngbin0 -> 110 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_themed_bottom.pngbin0 -> 78 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_themed_bottom_left.pngbin0 -> 106 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_themed_bottom_right.pngbin0 -> 107 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_themed_center.pngbin0 -> 73 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_themed_left.pngbin0 -> 99 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_themed_right.pngbin0 -> 90 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_themed_top.pngbin0 -> 79 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_themed_top_left.pngbin0 -> 98 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_themed_top_right.pngbin0 -> 100 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_top.pngbin0 -> 79 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_top_hover.pngbin0 -> 82 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_top_left.pngbin0 -> 98 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_top_left_hover.pngbin0 -> 102 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_top_left_pressed.pngbin0 -> 108 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_top_pressed.pngbin0 -> 79 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_top_right.pngbin0 -> 100 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_top_right_hover.pngbin0 -> 101 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/avatar_button/sign_in_button_top_right_pressed.pngbin0 -> 108 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/bookmark_bar_folder_managed.pngbin0 -> 568 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/tabpose_close.pngbin652 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mac/theme_top_shadow.pngbin78 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/managed_small.pngbin323 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/maximize_button_mask.pngbin68 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/metro_pin.pngbin198 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/metro_pinned.pngbin184 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/minimize_button_mask.pngbin86 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/mirror_flip.pngbin838 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/newtab.pngbin309 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/no_video.pngbin3833 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/notification_wrench.pngbin243 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/notification_wrench_hover.pngbin249 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/notification_wrench_pressed.pngbin249 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/pageinfo_bad.pngbin1432 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/pageinfo_good.pngbin1248 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/pageinfo_info.pngbin1109 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/pageinfo_warning_major.pngbin983 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/pageinfo_warning_minor.pngbin1211 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/prerender_succeed_icon.pngbin634 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_alien.pngbin1825 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_alien_mac.pngbin1844 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_awesome.pngbin2191 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_awesome_mac.pngbin2101 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_burger.pngbin2599 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_burger_mac.pngbin2652 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_businessman.pngbin2007 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_businessman_mac.pngbin1862 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_cat.pngbin2236 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_cat_mac.pngbin2163 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_cupcake.pngbin2286 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_cupcake_mac.pngbin2314 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_dog.pngbin2575 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_dog_mac.pngbin2656 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_flower.pngbin2235 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_flower_mac.pngbin2209 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_generic.pngbin1321 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_generic_aqua.pngbin1457 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_generic_aqua_mac.pngbin1501 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_generic_blue.pngbin1441 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_generic_blue_mac.pngbin1478 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_generic_green.pngbin1440 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_generic_green_mac.pngbin1473 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_generic_mac.pngbin1369 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_generic_orange.pngbin1436 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_generic_orange_mac.pngbin1387 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_generic_purple.pngbin1443 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_generic_purple_mac.pngbin1482 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_generic_red.pngbin1435 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_generic_red_mac.pngbin1405 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_generic_yellow.pngbin1426 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_generic_yellow_mac.pngbin1428 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_horse.pngbin2198 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_horse_mac.pngbin2197 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_margarita.pngbin2117 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_margarita_mac.pngbin2118 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_ninja.pngbin1926 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_ninja_mac.pngbin1889 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_note.pngbin1462 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_note_mac.pngbin1462 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_pizza.pngbin2294 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_pizza_mac.pngbin2321 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_secret_agent.pngbin2042 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_secret_agent_mac.pngbin2097 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_soccer.pngbin2380 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_soccer_mac.pngbin2365 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_sun_cloud.pngbin2175 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_sun_cloud_mac.pngbin2173 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_superhero.pngbin1956 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_superhero_mac.pngbin1958 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_volley_ball.pngbin2287 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_avatar_volley_ball_mac.pngbin2321 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/profile_loading.pngbin2677 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/record_video.pngbin1106 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/reload.pngbin414 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/reload_dimmed.pngbin410 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/reload_hover.pngbin702 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/reload_pressed.pngbin742 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/restore_button_mask.pngbin68 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/sadtab.pngbin199 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/safebrowsing_warning.pngbin1062 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/sidebar_tab_active.pngbin143 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/sidebar_tab_inactive.pngbin165 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/snapshot_wide.pngbin1315 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/snapshot_wide_disabled.pngbin672 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/spinner.pngbin5711 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/star.pngbin537 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/star_lit.pngbin828 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/statusbar_volume_icon1.pngbin447 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/stop.pngbin282 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/stop_disabled.pngbin429 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/stop_hover.pngbin600 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/stop_pressed.pngbin642 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/take_photo.pngbin1849 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/theme_tab_background2.pngbin656 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/theme_toolbar_default2.pngbin2759 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/theme_toolbar_default_inactive2.pngbin2491 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/throbber_light.pngbin3603 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/throbber_waiting.pngbin13494 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/throbber_waiting_light.pngbin11251 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/toolbar_divider.pngbin138 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/tools.pngbin159 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/tools_hover.pngbin550 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/tools_pressed.pngbin555 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/touch_newtab.pngbin2769 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/touch_newtab_button_mask.pngbin234 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/touch_newtab_hover.pngbin2771 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/touch_newtab_pressed.pngbin2881 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/update_badge.pngbin378 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/update_badge2.pngbin365 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/update_badge3.pngbin372 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/update_badge4.pngbin351 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/update_uptodate.pngbin787 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/webrtc_macosx_mic.pngbin195 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/webrtc_macosx_webcam.pngbin125 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/webrtc_mic.pngbin380 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/webrtc_webcam.pngbin121 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/website_settings_tab_background.pngbin97 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/win/metro_pin.pngbin197 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/win/metro_pinned.pngbin182 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/zoom_minus.pngbin270 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/zoom_plus.pngbin267 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_100_percent/zoom_reset.pngbin287 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/about_conflicts.pngbin7816 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/accessed_cookies.pngbin2127 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/alert_small.pngbin1066 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/app_default_icon.pngbin15031 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/app_droparrow.pngbin86 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/app_list_tab_overlay.pngbin315 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/back.pngbin492 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/back_disabled.pngbin475 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/back_hover.pngbin1148 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/back_large.pngbin4996 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/back_pressed.pngbin1114 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/browser_action.pngbin89 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/chromium/ic_gplus_color_16.pngbin302 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/allowed_mic_only.pngbin385 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/app_list_mic_hotword_off.pngbin0 -> 602 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/browser_window_control_background_maximized_hover.pngbin0 -> 100 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/browser_window_control_background_maximized_pressed.pngbin0 -> 100 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/browser_window_control_background_restored_hover.pngbin0 -> 100 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/browser_window_control_background_restored_pressed.pngbin0 -> 100 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/browser_window_control_icon_close.pngbin0 -> 483 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/browser_window_control_icon_left_snapped.pngbin0 -> 374 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/browser_window_control_icon_minimize.pngbin0 -> 103 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/browser_window_control_icon_right_snapped.pngbin0 -> 374 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/browser_window_control_icon_size.pngbin0 -> 149 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/browser_window_header_shade_left.png (renamed from chromium/ash/resources/default_200_percent/common/window_header_shade_left.png)bin123 -> 123 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/browser_window_header_shade_right.png (renamed from chromium/ash/resources/default_200_percent/common/window_header_shade_right.png)bin121 -> 121 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/browser_window_header_shade_top.png (renamed from chromium/ash/resources/default_200_percent/common/window_header_shade_top.png)bin81 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/browser_window_header_shade_top_left.png (renamed from chromium/ash/resources/default_200_percent/common/window_header_shade_top_left.png)bin96 -> 96 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/browser_window_header_shade_top_right.png (renamed from chromium/ash/resources/default_200_percent/common/window_header_shade_top_right.png)bin97 -> 97 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/otr_icon.png (renamed from chromium/chrome/app/theme/default_200_percent/cros/otr_icon.png)bin3653 -> 3653 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/theme_default_active.png (renamed from chromium/chrome/app/theme/default_200_percent/cros/theme_default_active.png)bin379 -> 379 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/theme_default_inactive.png (renamed from chromium/chrome/app/theme/default_200_percent/cros/theme_default_inactive.png)bin177 -> 177 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/theme_frame_active.png (renamed from chromium/chrome/app/theme/default_200_percent/cros/theme_frame_active.png)bin96 -> 96 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/theme_frame_inactive.png (renamed from chromium/chrome/app/theme/default_200_percent/cros/theme_frame_inactive.png)bin96 -> 96 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/theme_frame_incognito_active.png (renamed from chromium/chrome/app/theme/default_200_percent/cros/theme_frame_incognito_active.png)bin96 -> 96 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ash/theme_frame_incognito_inactive.png (renamed from chromium/chrome/app/theme/default_200_percent/cros/theme_frame_incognito_inactive.png)bin96 -> 96 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/avatar_button_auth_error.pngbin0 -> 299 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/avatar_menu_auth_error.pngbin0 -> 385 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/avatar_menu_lock.pngbin0 -> 344 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/avatar_menu_profile.pngbin0 -> 280 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/avatar_menu_supervised.pngbin0 -> 1417 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/block_notifier.pngbin0 -> 475 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/blocked_fullscreen.pngbin599 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/blocked_mic_only.pngbin770 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/bookmark_bar_folder_managed.pngbin0 -> 1338 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/broken_image.pngbin814 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/browser_action_highlight.pngbin625 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/browser_tools_badge_aura.pngbin257 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/browser_tools_normal_aura.pngbin540 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/carrot_blue.pngbin0 -> 359 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chevron_left.pngbin0 -> 147 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_hover_bottom.pngbin0 -> 172 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_hover_bottom_left.pngbin0 -> 259 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_hover_bottom_right.pngbin0 -> 174 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_hover_center.pngbin0 -> 105 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_hover_left.pngbin0 -> 119 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_hover_right.pngbin0 -> 110 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_hover_top.pngbin0 -> 625 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_hover_top_left.pngbin0 -> 675 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_hover_top_right.pngbin0 -> 610 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_normal_bottom.pngbin0 -> 170 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_normal_bottom_left.pngbin0 -> 237 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_normal_bottom_right.pngbin0 -> 172 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_normal_center.pngbin0 -> 107 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_normal_left.pngbin0 -> 113 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_normal_right.pngbin0 -> 111 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_normal_top.pngbin0 -> 677 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_normal_top_left.pngbin0 -> 741 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_normal_top_right.pngbin0 -> 664 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_pressed_bottom.pngbin0 -> 168 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_pressed_bottom_left.pngbin0 -> 230 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_pressed_bottom_right.pngbin0 -> 172 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_pressed_center.pngbin0 -> 107 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_pressed_left.pngbin0 -> 111 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_pressed_right.pngbin0 -> 109 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_pressed_top.pngbin0 -> 660 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_pressed_top_left.pngbin0 -> 704 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_brokenssl_pressed_top_right.pngbin0 -> 657 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_hover_bottom.pngbin0 -> 152 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_hover_bottom_left.pngbin0 -> 265 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_hover_bottom_right.pngbin0 -> 166 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_hover_center.pngbin0 -> 103 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_hover_left.pngbin0 -> 117 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_hover_right.pngbin0 -> 106 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_hover_top.pngbin0 -> 544 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_hover_top_left.pngbin0 -> 602 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_hover_top_right.pngbin0 -> 594 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_normal_bottom.pngbin0 -> 163 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_normal_bottom_left.pngbin0 -> 247 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_normal_bottom_right.pngbin0 -> 164 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_normal_center.pngbin0 -> 104 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_normal_left.pngbin0 -> 114 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_normal_right.pngbin0 -> 109 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_normal_top.pngbin0 -> 580 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_normal_top_left.pngbin0 -> 673 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_normal_top_right.pngbin0 -> 577 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_pressed_bottom.pngbin0 -> 158 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_pressed_bottom_left.pngbin0 -> 240 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_pressed_bottom_right.pngbin0 -> 166 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_pressed_center.pngbin0 -> 103 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_pressed_left.pngbin0 -> 116 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_pressed_right.pngbin0 -> 108 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_pressed_top.pngbin0 -> 560 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_pressed_top_left.pngbin0 -> 657 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_extended_validation_pressed_top_right.pngbin0 -> 560 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_hover_bottom.pngbin0 -> 176 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_hover_bottom_left.pngbin0 -> 255 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_hover_bottom_right.pngbin0 -> 181 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_hover_center.pngbin0 -> 98 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_hover_left.pngbin0 -> 115 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_hover_right.pngbin0 -> 102 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_hover_top.pngbin0 -> 624 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_hover_top_left.pngbin0 -> 693 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_hover_top_right.pngbin0 -> 625 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_hover_bottom.pngbin0 -> 175 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_hover_bottom_left.pngbin0 -> 254 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_hover_bottom_right.pngbin0 -> 177 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_hover_center.pngbin0 -> 105 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_hover_left.pngbin0 -> 118 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_hover_right.pngbin0 -> 108 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_hover_top.pngbin0 -> 635 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_hover_top_left.pngbin0 -> 685 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_hover_top_right.pngbin0 -> 625 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_normal_bottom.pngbin0 -> 174 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_normal_bottom_left.pngbin0 -> 248 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_normal_bottom_right.pngbin0 -> 173 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_normal_center.pngbin0 -> 106 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_normal_left.pngbin0 -> 111 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_normal_right.pngbin0 -> 108 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_normal_top.pngbin0 -> 664 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_normal_top_left.pngbin0 -> 759 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_normal_top_right.pngbin0 -> 657 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_pressed_bottom.pngbin0 -> 166 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_pressed_bottom_left.pngbin0 -> 237 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_pressed_bottom_right.pngbin0 -> 166 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_pressed_center.pngbin0 -> 104 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_pressed_left.pngbin0 -> 110 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_pressed_right.pngbin0 -> 106 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_pressed_top.pngbin0 -> 635 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_pressed_top_left.pngbin0 -> 687 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_malware_pressed_top_right.pngbin0 -> 632 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_normal_bottom.pngbin0 -> 182 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_normal_bottom_left.pngbin0 -> 233 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_normal_bottom_right.pngbin0 -> 186 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_normal_center.pngbin0 -> 101 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_normal_left.pngbin0 -> 113 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_normal_right.pngbin0 -> 104 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_normal_top.pngbin0 -> 685 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_normal_top_left.pngbin0 -> 795 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_normal_top_right.pngbin0 -> 679 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_pressed_bottom.pngbin0 -> 175 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_pressed_bottom_left.pngbin0 -> 245 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_pressed_bottom_right.pngbin0 -> 180 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_pressed_center.pngbin0 -> 99 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_pressed_left.pngbin0 -> 117 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_pressed_right.pngbin0 -> 102 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_pressed_top.pngbin0 -> 673 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_pressed_top_left.pngbin0 -> 788 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/chip_pressed_top_right.pngbin0 -> 673 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/choose_file.pngbin1286 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/controlled_setting_owner.pngbin0 -> 462 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/cws_star_empty.pngbin380 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/cws_star_full.pngbin292 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/cws_star_half.pngbin389 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/developer_mode_highlight_bottom.pngbin0 -> 92 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/developer_mode_highlight_bottom_left.pngbin0 -> 196 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/developer_mode_highlight_bottom_right.pngbin0 -> 198 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/developer_mode_highlight_center.pngbin0 -> 75 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/developer_mode_highlight_left.pngbin0 -> 90 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/developer_mode_highlight_right.pngbin0 -> 89 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/developer_mode_highlight_top.pngbin0 -> 106 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/developer_mode_highlight_top_left.pngbin0 -> 283 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/developer_mode_highlight_top_right.pngbin0 -> 303 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/edit_button_hover.pngbin0 -> 188 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/edit_button_pressed.pngbin0 -> 190 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/edit_camera.pngbin0 -> 1362 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/favicon_settings.pngbin671 -> 738 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/feedback.pngbin1099 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/feedback_hover.pngbin1751 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/feedback_pressed.pngbin1774 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/files_app_icon.pngbin612 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/find_box_bg.pngbin151 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/find_box_bg_left.pngbin334 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/find_dlg_middle_bg.pngbin85 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/folder.pngbin0 -> 150 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ic_gplus_color_16.pngbin302 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/icon_add_user_white.pngbin141 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/icon_browse_as_guest_white.pngbin281 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/icon_supervised.pngbin0 -> 1192 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/infobar_3d_blocked.pngbin0 -> 766 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/infobar_alt_nav_url.pngbin0 -> 2110 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/infobar_autofill_cc.png (renamed from chromium/chrome/app/theme/default_200_percent/common/infobar_autofill.png)bin802 -> 802 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/infobar_didyoumean.pngbin2111 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/infobar_incomplete.pngbin682 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/infobar_lock.pngbin903 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/infobar_media_stream_camera.png (renamed from chromium/chrome/app/theme/default_200_percent/common/infobar_camera.png)bin534 -> 534 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/infobar_media_stream_mic.png (renamed from chromium/chrome/app/theme/default_200_percent/common/infobar_microphone.png)bin716 -> 716 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/infobar_plugin_install.png (renamed from chromium/chrome/app/theme/default_200_percent/common/infobar_plugin.png)bin1226 -> 1226 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/infobar_protected_media_identifier.pngbin278 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/infobar_restore_session.png (renamed from chromium/chrome/app/theme/default_200_percent/common/infobar_restore.png)bin581 -> 581 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/infobar_save_password.pngbin0 -> 550 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/infobar_savepassword.pngbin551 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/mirror_flip.pngbin1557 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ntp_google_logo.png (renamed from chromium/chrome/browser/resources/local_ntp/images/2x/ntp_google_logo.png)bin13823 -> 13823 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/ntp_white_google_logo.png (renamed from chromium/chrome/browser/resources/local_ntp/images/2x/ntp_white_google_logo.png)bin6179 -> 6179 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/nub.pngbin169 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_border_bottom.pngbin82 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_border_bottom_left.pngbin156 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_border_bottom_right.pngbin160 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_border_center.pngbin73 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_border_left.pngbin84 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_border_right.pngbin83 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_border_top.pngbin87 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_border_top_left.pngbin168 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_border_top_right.pngbin176 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_filling_bottom.pngbin82 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_filling_bottom_left.pngbin116 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_filling_bottom_right.pngbin120 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_filling_left.pngbin81 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_filling_right.pngbin79 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_filling_top.pngbin82 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_filling_top_left.pngbin134 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_filling_top_right.pngbin146 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_https_policy_warning.pngbin1312 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_and_shadow_bottom.pngbin0 -> 81 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_and_shadow_bottom_left.pngbin0 -> 99 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_and_shadow_bottom_right.pngbin0 -> 101 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_and_shadow_center.pngbin0 -> 74 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_and_shadow_left.pngbin0 -> 83 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_and_shadow_right.pngbin0 -> 84 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_and_shadow_top.pngbin0 -> 85 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_and_shadow_top_left.pngbin0 -> 135 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_and_shadow_top_right.pngbin0 -> 137 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_bottom.pngbin86 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_bottom_left.pngbin100 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_bottom_right.pngbin102 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_left.pngbin85 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_middle.pngbin72 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_right.pngbin84 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_top.pngbin86 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_top_left.pngbin133 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_popup_border_top_right.pngbin136 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_search_button_arrow.pngbin271 -> 300 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/omnibox_search_button_loupe.pngbin358 -> 410 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/payment_checkmark.pngbin228 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/profile_menu_question_hover.pngbin0 -> 851 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/profile_menu_question_select.pngbin0 -> 861 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/profile_menu_question_stable.pngbin0 -> 820 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/record_video.pngbin2050 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/save_password.pngbin410 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/save_password_active.pngbin0 -> 223 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/save_password_disabled_active.pngbin0 -> 298 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/save_password_disabled_inactive.pngbin0 -> 257 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/save_password_inactive.pngbin0 -> 198 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/script_bubble.pngbin896 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/small_bubble.pngbin419 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/snapshot_wide_disabled.pngbin1513 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/speech_input_mic_empty.pngbin152 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/speech_input_mic_full.pngbin136 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/speech_input_mic_mask.pngbin105 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/speech_input_mic_noise.pngbin136 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/speech_input_spinner.pngbin13035 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/speech_input_tray_linux_mic_empty.pngbin743 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/speech_input_tray_linux_mic_full.pngbin726 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/speech_input_tray_macosx_mic_empty.pngbin654 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/speech_input_tray_macosx_mic_full.pngbin690 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/speech_input_tray_windows_mic_empty.pngbin551 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/speech_input_tray_windows_mic_full.pngbin781 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/take_photo.pngbin3809 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/textfield_bottom.pngbin0 -> 85 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/textfield_bottom_left.pngbin0 -> 171 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/textfield_bottom_right.pngbin0 -> 174 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/textfield_center.pngbin0 -> 74 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/textfield_left.pngbin0 -> 87 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/textfield_right.pngbin0 -> 86 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/textfield_top.pngbin0 -> 92 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/textfield_top_left.pngbin0 -> 199 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/textfield_top_right.pngbin0 -> 210 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_hover_bottom.pngbin97 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_hover_bottom_left.pngbin188 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_hover_bottom_right.pngbin196 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_hover_center.pngbin77 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_hover_left.pngbin93 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_hover_right.pngbin91 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_hover_top.pngbin113 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_hover_top_left.pngbin282 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_hover_top_right.pngbin284 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_pressed_bottom.pngbin95 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_pressed_bottom_left.pngbin167 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_pressed_bottom_right.pngbin165 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_pressed_center.pngbin74 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_pressed_left.pngbin89 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_pressed_right.pngbin88 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_pressed_top.pngbin100 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_pressed_top_left.pngbin221 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_button_pressed_top_right.pngbin242 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_shade_bottom_left.pngbin79 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_shade_bottom_right.pngbin78 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/toolbar_shade_line.pngbin76 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/update_badge.pngbin736 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/update_badge2.pngbin618 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/update_badge3.pngbin665 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/update_badge4.pngbin550 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/user_manager_tutorial/complete.pngbin0 -> 7240 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/user_manager_tutorial/family_and_friends.pngbin0 -> 15082 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/user_manager_tutorial/guests.pngbin0 -> 10156 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/user_manager_tutorial/welcome.pngbin0 -> 10029 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/user_manager_tutorial/your_chrome.pngbin0 -> 13406 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/zoom_minus.pngbin822 -> 501 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/zoom_plus.pngbin848 -> 510 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/common/zoom_reset.pngbin0 -> 525 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/controlled_setting_extension.pngbin979 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/controlled_setting_mandatory.pngbin565 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cookie_storage.pngbin1916 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/bluetooth_pairing_keyboard.pngbin0 -> 3122 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/bluetooth_pairing_mouse.pngbin0 -> 3597 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/bluetooth_pairing_tick.pngbin0 -> 4283 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/captive_portal_icon.pngbin0 -> 1999 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/choose_file.pngbin0 -> 1257 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/controlled_setting_shared.pngbin0 -> 364 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/critical_error.pngbin6117 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/archive.pngbin201 -> 164 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/archive_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/archive_white.png)bin164 -> 164 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/audio.pngbin480 -> 221 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/audio_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/audio_white.png)bin166 -> 166 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/chart.pngbin185 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/excel.pngbin566 -> 731 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/excel_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/excel_white.png)bin462 -> 462 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/folder.pngbin151 -> 139 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/folder_shared.pngbin0 -> 223 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/folder_shared_white.pngbin0 -> 229 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/folder_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/folder_white.png)bin132 -> 132 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/form.pngbin153 -> 194 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/form_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/form_white.png)bin152 -> 152 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/gdoc.pngbin129 -> 145 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/gdoc_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/gdoc_white.png)bin124 -> 124 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/gdraw.pngbin208 -> 279 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/gdraw_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/gdraw_white.png)bin209 -> 209 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/generic.pngbin133 -> 130 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/generic_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/generic_white.png)bin122 -> 122 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/glink.pngbin133 -> 129 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/glink_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/glink_white.png)bin122 -> 122 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/gsheet.pngbin130 -> 148 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/gsheet_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/gsheet_white.png)bin128 -> 128 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/gslides.pngbin166 -> 137 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/gslides_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/gslides_white.png)bin119 -> 119 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/gtable.pngbin295 -> 580 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/gtable_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/gtable_white.png)bin371 -> 371 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/image.pngbin235 -> 348 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/image_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/image_white.png)bin245 -> 245 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/pdf.pngbin491 -> 167 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/pdf_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/pdf_white.png)bin142 -> 142 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/ppt.pngbin331 -> 295 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/ppt_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/ppt_white.png)bin224 -> 224 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/script.pngbin394 -> 333 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/script_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/script_white.png)bin269 -> 269 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/sites.pngbin205 -> 149 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/sites_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/sites_white.png)bin127 -> 127 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/thumbnails/folder.pngbin885 -> 869 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/thumbnails/folder_shared.pngbin0 -> 1573 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/video.pngbin290 -> 225 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/video_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/video_white.png)bin169 -> 169 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/word.pngbin602 -> 619 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/file_types/word_white.png (renamed from chromium/chrome/browser/resources/file_manager/common/images/file_types/200/word_white.png)bin406 -> 406 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/icon_add_user_white.pngbin0 -> 242 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/icon_guest_white.png (renamed from chromium/chrome/app/theme/default_200_percent/icon_guest_white.png)bin483 -> 483 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/icon_power_white.pngbin0 -> 842 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/kiosk_app_user_pod_icon.pngbin0 -> 104 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/login_password_capslock.pngbin0 -> 165 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/managed_mode_icon.pngbin341 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/mirror_flip.pngbin0 -> 1547 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/notification_drive.pngbin2719 -> 4851 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/profile_loading.pngbin0 -> 5083 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/secondary_user_settings.pngbin0 -> 1824 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cros/take_photo.pngbin0 -> 3763 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cws_star_empty.pngbin380 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cws_star_full.pngbin292 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/cws_star_half.pngbin389 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/discard_wide.pngbin679 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/download_animation_begin.pngbin10278 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/download_progress_background16.pngbin1374 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/download_progress_background32.pngbin2370 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/download_progress_foreground16.pngbin2303 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/download_progress_foreground32.pngbin3826 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/extension_command_close.pngbin183 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/extension_default_icon.pngbin6910 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/extensions_rating_star_half_left.pngbin632 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/extensions_rating_star_half_right.pngbin626 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/extensions_rating_star_off.pngbin540 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/extensions_rating_star_on.pngbin397 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/extensions_section.pngbin8169 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/feedback.pngbin1099 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/feedback_hover.pngbin1751 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/feedback_pressed.pngbin1774 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/forward.pngbin477 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/forward_disabled.pngbin459 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/forward_hover.pngbin1145 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/forward_large.pngbin5042 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/forward_pressed.pngbin1120 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/frozen_tab.pngbin650 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/fullscreen_menu_button.pngbin147 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/home.pngbin392 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/home_hover.pngbin1150 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/home_pressed.pngbin1039 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/icon_add_user_white.pngbin243 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/icon_power_white.pngbin853 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/info_small.pngbin1253 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/infobar_autofill.pngbin802 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/infobar_autologin.pngbin551 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/infobar_cookie.pngbin1544 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/infobar_desktop_notifications.pngbin417 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/infobar_didyoumean.pngbin2111 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/infobar_geolocation.pngbin1782 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/infobar_incomplete.pngbin682 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/infobar_lock.pngbin903 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/infobar_multiple_downloads.pngbin567 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/infobar_plugin.pngbin1226 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/infobar_plugin_crashed.pngbin1468 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/infobar_protected_media_identifier.pngbin278 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/infobar_restore.pngbin581 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/infobar_savepassword.pngbin551 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/infobar_theme.pngbin1389 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/infobar_translate.pngbin1447 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/keyword_search_magnifier.pngbin246 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_arrow.pngbin0 -> 257 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_arrow_hover.pngbin0 -> 241 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_arrow_pressed.pngbin0 -> 241 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_bottom.pngbin0 -> 85 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_bottom_hover.pngbin0 -> 148 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_bottom_left.pngbin0 -> 169 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_bottom_left_hover.pngbin0 -> 190 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_bottom_left_pressed.pngbin0 -> 150 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_bottom_pressed.pngbin0 -> 89 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_bottom_right.pngbin0 -> 173 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_bottom_right_hover.pngbin0 -> 193 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_bottom_right_pressed.pngbin0 -> 152 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_center.pngbin0 -> 77 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_center_hover.pngbin0 -> 90 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_center_pressed.pngbin0 -> 87 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_left.pngbin0 -> 157 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_left_hover.pngbin0 -> 191 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_left_pressed.pngbin0 -> 123 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_right.pngbin0 -> 152 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_right_hover.pngbin0 -> 185 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_right_pressed.pngbin0 -> 123 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_themed_bottom.pngbin0 -> 86 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_themed_bottom_left.pngbin0 -> 172 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_themed_bottom_right.pngbin0 -> 175 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_themed_center.pngbin0 -> 77 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_themed_left.pngbin0 -> 159 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_themed_right.pngbin0 -> 154 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_themed_top.pngbin0 -> 87 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_themed_top_left.pngbin0 -> 159 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_themed_top_right.pngbin0 -> 160 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_top.pngbin0 -> 86 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_top_hover.pngbin0 -> 91 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_top_left.pngbin0 -> 161 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_top_left_hover.pngbin0 -> 159 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_top_left_pressed.pngbin0 -> 152 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_top_pressed.pngbin0 -> 84 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_top_right.pngbin0 -> 159 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_top_right_hover.pngbin0 -> 160 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/avatar_button/sign_in_button_top_right_pressed.pngbin0 -> 147 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/bookmark_bar_folder_managed.pngbin0 -> 468 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/tabpose_close.pngbin1221 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mac/theme_top_shadow.pngbin85 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/mirror_flip.pngbin1557 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/newtab.pngbin526 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/notification_wrench.pngbin510 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/notification_wrench_hover.pngbin523 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/notification_wrench_pressed.pngbin527 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/pageinfo_bad.pngbin3549 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/pageinfo_good.pngbin2730 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/pageinfo_info.pngbin2938 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/pageinfo_warning_major.pngbin1789 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/pageinfo_warning_minor.pngbin2124 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_alien.pngbin4958 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_alien_mac.pngbin4977 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_awesome.pngbin5720 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_awesome_mac.pngbin5693 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_burger.pngbin6529 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_burger_mac.pngbin6643 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_businessman.pngbin4850 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_businessman_mac.pngbin4910 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_cat.pngbin5690 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_cat_mac.pngbin5727 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_cupcake.pngbin6079 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_cupcake_mac.pngbin6146 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_dog.pngbin6399 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_dog_mac.pngbin6383 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_flower.pngbin6095 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_flower_mac.pngbin6078 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_generic.pngbin3883 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_generic_aqua.pngbin4106 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_generic_aqua_mac.pngbin4051 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_generic_blue.pngbin4073 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_generic_blue_mac.pngbin4030 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_generic_green.pngbin4094 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_generic_green_mac.pngbin4046 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_generic_mac.pngbin3805 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_generic_orange.pngbin4087 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_generic_orange_mac.pngbin4037 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_generic_purple.pngbin4081 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_generic_purple_mac.pngbin4017 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_generic_red.pngbin3998 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_generic_red_mac.pngbin3971 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_generic_yellow.pngbin3652 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_generic_yellow_mac.pngbin3671 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_horse.pngbin5093 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_horse_mac.pngbin5091 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_margarita.pngbin6142 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_margarita_mac.pngbin6262 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_ninja.pngbin4033 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_ninja_mac.pngbin3976 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_note.pngbin3871 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_note_mac.pngbin3871 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_pizza.pngbin7161 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_pizza_mac.pngbin7321 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_secret_agent.pngbin5348 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_secret_agent_mac.pngbin5391 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_soccer.pngbin5820 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_soccer_mac.pngbin5807 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_sun_cloud.pngbin6131 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_sun_cloud_mac.pngbin6294 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_superhero.pngbin5768 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_superhero_mac.pngbin5792 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_volley_ball.pngbin5395 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_avatar_volley_ball_mac.pngbin5403 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/profile_loading.pngbin5142 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/record_video.pngbin2050 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/reload.pngbin888 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/reload_dimmed.pngbin880 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/reload_disabled.pngbin866 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/reload_hover.pngbin1558 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/reload_pressed.pngbin1566 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/sadtab.pngbin236 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/safebrowsing_warning.pngbin1294 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/snapshot_wide.pngbin2192 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/star.pngbin1076 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/star_lit.pngbin1715 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/stop.pngbin456 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/stop_hover.pngbin1209 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/stop_pressed.pngbin1185 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/take_photo.pngbin3809 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/theme_tab_background2.pngbin2111 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/theme_toolbar_default2.pngbin9549 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/theme_toolbar_default_inactive2.pngbin8684 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/throbber_waiting.pngbin32563 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/tools.pngbin284 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/tools_hover.pngbin1095 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/tools_pressed.pngbin1060 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/update_badge.pngbin736 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/update_badge2.pngbin618 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/update_badge3.pngbin665 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/update_badge4.pngbin550 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/update_uptodate.pngbin1307 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/webrtc_macosx_mic.pngbin401 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/webrtc_macosx_webcam.pngbin137 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/webrtc_mic.pngbin919 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/webrtc_webcam.pngbin136 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/website_settings_tab_background.pngbin106 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/win/metro_pin.pngbin214 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/win/metro_pinned.pngbin200 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/zoom_minus.pngbin501 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/zoom_plus.pngbin523 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/default_200_percent/zoom_reset.pngbin535 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/mac/apps_folder_16.pngbin0 -> 642 bytes
-rw-r--r--chromium/chrome/app/theme/mac/apps_folder_32.pngbin0 -> 1483 bytes
-rw-r--r--chromium/chrome/app/theme/mac/apps_folder_overlay_128.pngbin0 -> 2115 bytes
-rw-r--r--chromium/chrome/app/theme/mac/apps_folder_overlay_512.pngbin0 -> 32114 bytes
-rw-r--r--chromium/chrome/app/theme/theme_resources.grd1254
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/about_conflicts_favicon.pngbin530 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/bookmarks_favicon.pngbin530 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_action_hover.pngbin351 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_action_normal.pngbin92 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_action_pressed.pngbin297 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_actions_overflow_hover.pngbin563 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_actions_overflow_normal.pngbin368 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_actions_overflow_pressed.pngbin551 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_back_disabled.pngbin382 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_back_hover.pngbin734 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_back_normal.pngbin432 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_back_pressed.pngbin712 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_forward_disabled.pngbin391 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_forward_hover.pngbin735 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_forward_normal.pngbin427 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_forward_pressed.pngbin718 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_home_hover.pngbin790 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_home_normal.pngbin502 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_home_pressed.pngbin775 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_reload_disabled.pngbin526 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_reload_hover.pngbin888 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_reload_normal.pngbin616 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_reload_pressed.pngbin890 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_stop_disabled.pngbin384 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_stop_hover.pngbin813 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_stop_normal.pngbin435 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_stop_pressed.pngbin777 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_tools_hover.pngbin583 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_tools_normal.pngbin184 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_tools_normal_aura.pngbin313 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/browser_tools_pressed.pngbin536 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/close_1.pngbin214 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/close_1_hover.pngbin668 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/close_1_mask.pngbin136 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/close_1_pressed.pngbin666 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/find_box_bg.pngbin119 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/find_box_bg_left.pngbin199 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/find_dialog_left.pngbin144 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/find_dialog_middle.pngbin117 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/find_dialog_right.pngbin148 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/find_dlg_left_bg.pngbin99 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/find_dlg_middle_bg.pngbin76 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/find_dlg_right_bg.pngbin100 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/find_next.pngbin590 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/find_next_disabled.pngbin552 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/find_next_hover.pngbin574 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/find_next_pressed.pngbin644 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/find_prev.pngbin486 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/find_prev_disabled.pngbin458 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/find_prev_hover.pngbin476 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/find_prev_pressed.pngbin538 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/incognito_switch_off.pngbin169 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/incognito_switch_on.pngbin172 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/newtab_button_mask.pngbin219 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/newtab_hover.pngbin455 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/newtab_normal.pngbin403 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/newtab_pressed.pngbin634 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_border_bottom.pngbin74 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_border_bottom_left.pngbin122 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_border_bottom_right.pngbin122 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_border_center.pngbin70 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_border_left.pngbin78 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_border_right.pngbin76 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_border_top.pngbin74 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_border_top_left.pngbin132 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_border_top_right.pngbin132 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_content_setting_bubble_bottom.pngbin92 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_content_setting_bubble_bottom_left.pngbin121 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_content_setting_bubble_bottom_right.pngbin120 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_content_setting_bubble_center.pngbin72 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_content_setting_bubble_left.pngbin81 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_content_setting_bubble_right.pngbin79 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_content_setting_bubble_top.pngbin131 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_content_setting_bubble_top_left.pngbin176 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_content_setting_bubble_top_right.pngbin185 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_ev_bubble_bottom.pngbin102 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_ev_bubble_bottom_left.pngbin136 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_ev_bubble_bottom_right.pngbin136 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_ev_bubble_center.pngbin72 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_ev_bubble_left.pngbin80 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_ev_bubble_right.pngbin80 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_ev_bubble_top.pngbin133 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_ev_bubble_top_left.pngbin190 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_ev_bubble_top_right.pngbin198 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_filling_bottom.pngbin81 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_filling_bottom_left.pngbin96 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_filling_bottom_right.pngbin99 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_filling_center.pngbin70 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_filling_left.pngbin78 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_filling_right.pngbin79 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_filling_top.pngbin96 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_filling_top_left.pngbin131 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_filling_top_right.pngbin133 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_mic_search.pngbin259 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_popup_border_bottom.pngbin69 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_popup_border_bottom_left.pngbin96 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_popup_border_bottom_right.pngbin98 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_popup_border_center.pngbin69 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_popup_border_left.pngbin74 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_popup_border_right.pngbin74 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_popup_border_top.pngbin69 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_popup_border_top_left.pngbin105 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_popup_border_top_right.pngbin105 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_search.pngbin289 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_search_secured.pngbin428 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_selected_keyword_bubble_bottom.pngbin97 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_selected_keyword_bubble_bottom_left.pngbin118 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_selected_keyword_bubble_bottom_right.pngbin125 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_selected_keyword_bubble_center.pngbin72 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_selected_keyword_bubble_left.pngbin81 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_selected_keyword_bubble_right.pngbin81 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_selected_keyword_bubble_top.pngbin129 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_selected_keyword_bubble_top_left.pngbin184 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/omnibox_selected_keyword_bubble_top_right.pngbin191 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/tab_active_center.pngbin82 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/tab_active_left.pngbin466 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/tab_active_right.pngbin488 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/tab_alpha_left.pngbin211 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/tab_alpha_right.pngbin213 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/tab_inactive_center.pngbin153 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/tab_inactive_left.pngbin773 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/tab_inactive_right.pngbin745 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/toolbar_shade_bottom.pngbin70 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/toolbar_shade_bottom_left.pngbin70 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/toolbar_shade_bottom_right.pngbin70 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/toolbar_shade_left.pngbin70 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/toolbar_shade_line.pngbin67 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/toolbar_shade_right.pngbin70 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/common/toolbar_shade_top.pngbin78 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/content_top_center.pngbin86 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/content_top_left_corner.pngbin177 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/content_top_left_corner_mask.pngbin109 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/content_top_right_corner.pngbin164 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/content_top_right_corner_mask.pngbin104 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/downloads_favicon.pngbin394 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/feedback.pngbin811 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/feedback_hover.pngbin1229 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/feedback_pressed.pngbin1184 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/flags.pngbin596 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/history_favicon.pngbin572 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/infobar_autofill.pngbin721 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/infobar_autologin.pngbin513 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/infobar_cookie.pngbin1095 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/infobar_desktop_notifications.pngbin424 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/infobar_didyoumean.pngbin1399 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/infobar_geolocation.pngbin1266 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/infobar_incomplete.pngbin609 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/infobar_lock.pngbin574 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/infobar_multiple_downloads.pngbin660 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/infobar_plugin.pngbin908 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/infobar_plugin_crashed.pngbin1042 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/infobar_restore.pngbin724 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/infobar_savepassword.pngbin513 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/infobar_theme.pngbin1420 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/infobar_translate.pngbin967 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/infobar_warning.pngbin773 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/keyword_search_magnifier.pngbin245 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/newtab_button_mask.pngbin218 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/newtab_hover.pngbin437 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/newtab_normal.pngbin422 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/newtab_pressed.pngbin446 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/notification_wrench.pngbin397 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/notification_wrench_hover.pngbin413 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/notification_wrench_pressed.pngbin419 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/otr_icon.pngbin1517 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/otr_icon_fullscreen.pngbin2723 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/plugin.pngbin598 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/print_preview_favicon.pngbin482 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/register_protocol_handler.pngbin265 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/sadfavicon.pngbin411 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/settings_favicon.pngbin482 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/tab_drop_down.pngbin473 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/tab_drop_up.pngbin485 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/theme_tab_background2.pngbin991 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/theme_toolbar_default2.pngbin3860 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/theme_toolbar_default_inactive2.pngbin3464 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/win/otr_icon.pngbin1457 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/win/theme_default_active.pngbin263 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/win/theme_default_inactive.pngbin134 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/win/theme_frame_active.pngbin72 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/win/theme_frame_incognito_active.pngbin87 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/zoom_minus.pngbin420 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/touch_100_percent/zoom_plus.pngbin434 -> 0 bytes
-rw-r--r--chromium/chrome/app/theme/win/install_app.icobin0 -> 5430 bytes
-rw-r--r--chromium/chrome/app/version_assembly/chrome_exe_manifest_action.gypi34
-rw-r--r--chromium/chrome/app/version_assembly/version_assembly_manifest_action.gypi37
-rw-r--r--chromium/chrome/browser/browser_resources.grd250
-rw-r--r--chromium/chrome/browser/devtools/devtools_protocol_constants.gyp39
-rw-r--r--chromium/chrome/browser/devtools/frontend/devtools_discovery_page_resources.grd21
-rw-r--r--chromium/chrome/browser/media/desktop_streams_registry.cc11
-rw-r--r--chromium/chrome/browser/media/desktop_streams_registry.h9
-rw-r--r--chromium/chrome/browser/resources/2x/ssl_roadblock_icon.pngbin3761 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/2x/twisty_closed.pngbin198 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/2x/twisty_closed_rtl.pngbin201 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/2x/twisty_open.pngbin188 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/OWNERS2
-rw-r--r--chromium/chrome/browser/resources/PRESUBMIT.py60
-rw-r--r--chromium/chrome/browser/resources/about_conflicts.html22
-rw-r--r--chromium/chrome/browser/resources/about_credits.tmpl10
-rw-r--r--chromium/chrome/browser/resources/about_invalidations.css46
-rw-r--r--chromium/chrome/browser/resources/about_invalidations.html68
-rw-r--r--chromium/chrome/browser/resources/about_invalidations.js213
-rw-r--r--chromium/chrome/browser/resources/about_sys/about_sys.css172
-rw-r--r--chromium/chrome/browser/resources/about_sys/about_sys.html42
-rw-r--r--chromium/chrome/browser/resources/about_sys/about_sys.js192
-rw-r--r--chromium/chrome/browser/resources/about_version.html8
-rw-r--r--chromium/chrome/browser/resources/about_welcome_android/about_welcome_android.css12
-rw-r--r--chromium/chrome/browser/resources/about_welcome_android/about_welcome_android.html2
-rw-r--r--chromium/chrome/browser/resources/ad_networks.dat (renamed from chromium/chrome/browser/resources/web_dev_style/__init__.py)0
-rw-r--r--chromium/chrome/browser/resources/app_list/audio_manager.js37
-rw-r--r--chromium/chrome/browser/resources/app_list/hotword_nacl.nmf (renamed from chromium/chrome/browser/resources/app_list/greconacl.nmf)0
-rw-r--r--chromium/chrome/browser/resources/app_list/plugin_manager.js65
-rw-r--r--chromium/chrome/browser/resources/app_list/speech_manager.js171
-rw-r--r--chromium/chrome/browser/resources/app_list/start_page.css11
-rw-r--r--chromium/chrome/browser/resources/app_list/start_page.html5
-rw-r--r--chromium/chrome/browser/resources/app_list/start_page.js27
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/background.js14
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/css/items.css563
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/css/pack_item_overlay.css22
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/images/2x/search.pngbin421 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/images/2x/search_clear.pngbin278 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/images/2x/search_clear_active.pngbin283 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/images/2x/search_clear_hover.pngbin274 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/images/dev-icon-128.pngbin26647 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/images/dev-icon-16.pngbin932 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/images/search.pngbin196 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/images/search_clear.pngbin183 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/images/search_clear_active.pngbin180 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/images/search_clear_hover.pngbin182 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/js/items.js122
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/js/items_list.js609
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/js/main.js30
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/js/main_scripts.js22
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/js/pack_item_overlay.js140
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/main.html207
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/manifest.json26
-rw-r--r--chromium/chrome/browser/resources/apps_debugger/pack_item_overlay.html26
-rw-r--r--chromium/chrome/browser/resources/backloader/background.html5
-rw-r--r--chromium/chrome/browser/resources/backloader/manifest.json16
-rw-r--r--chromium/chrome/browser/resources/backloader/scripts/background.js145
-rw-r--r--chromium/chrome/browser/resources/backloader/scripts/pages.js13
-rw-r--r--chromium/chrome/browser/resources/backloader/web/cros_validator.js48
-rw-r--r--chromium/chrome/browser/resources/bookmark_manager/css/bmm.css9
-rw-r--r--chromium/chrome/browser/resources/bookmark_manager/images/2x/bookmark_manager_recent.pngbin1641 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/bookmark_manager/images/bookmark_manager_recent.pngbin694 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/bookmark_manager/js/bmm.js39
-rw-r--r--chromium/chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js95
-rw-r--r--chromium/chrome/browser/resources/bookmark_manager/js/bmm_test.html9
-rw-r--r--chromium/chrome/browser/resources/bookmark_manager/js/dnd.js35
-rw-r--r--chromium/chrome/browser/resources/bookmark_manager/js/main.js158
-rw-r--r--chromium/chrome/browser/resources/bookmark_manager/main.html1
-rw-r--r--chromium/chrome/browser/resources/chromeos/about_os_credits.html26445
-rw-r--r--chromium/chrome/browser/resources/chromeos/about_sys.css167
-rw-r--r--chromium/chrome/browser/resources/chromeos/about_sys.html34
-rw-r--r--chromium/chrome/browser/resources/chromeos/about_sys.js185
-rw-r--r--chromium/chrome/browser/resources/chromeos/bluetooth_pair_device.js2
-rw-r--r--chromium/chrome/browser/resources/chromeos/braille_ime/OWNERS4
-rw-r--r--chromium/chrome/browser/resources/chromeos/braille_ime/PRESUBMIT.py25
-rw-r--r--chromium/chrome/browser/resources/chromeos/braille_ime/braille_ime.gyp24
-rw-r--r--chromium/chrome/browser/resources/chromeos/braille_ime/braille_ime.js457
-rw-r--r--chromium/chrome/browser/resources/chromeos/braille_ime/braille_ime_unittest.gtestjs278
-rwxr-xr-xchromium/chrome/browser/resources/chromeos/braille_ime/check_braille_ime.py36
-rw-r--r--chromium/chrome/browser/resources/chromeos/braille_ime/externs.js182
-rw-r--r--chromium/chrome/browser/resources/chromeos/braille_ime/main.js11
-rw-r--r--chromium/chrome/browser/resources/chromeos/braille_ime/manifest.json24
-rw-r--r--chromium/chrome/browser/resources/chromeos/certificate_manager_dialog.html61
-rw-r--r--chromium/chrome/browser/resources/chromeos/certificate_manager_dialog.js65
-rw-r--r--chromium/chrome/browser/resources/chromeos/charger_replacement.html2
-rw-r--r--chromium/chrome/browser/resources/chromeos/charger_replacement.js12
-rw-r--r--chromium/chrome/browser/resources/chromeos/choose_mobile_network.html5
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/OWNERS4
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/PRESUBMIT.py32
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox.gyp207
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/accessibility_api_handler.js747
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.html (renamed from chromium/chrome/third_party/chromevox/chromevox/background/background.html)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js543
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/braille_captions_background.js109
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/alert_modal.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/alert_modal.ogg)bin7046 -> 7046 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/alert_nonmodal.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/alert_nonmodal.ogg)bin11433 -> 11433 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/bullet.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/bullet.ogg)bin5664 -> 5664 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/busy_progress_loop.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/busy_progress_loop.ogg)bin11437 -> 11437 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/busy_working_loop.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/busy_working_loop.ogg)bin10724 -> 10724 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/button.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/button.ogg)bin7550 -> 7550 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/check_off.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/check_off.ogg)bin11421 -> 11421 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/check_on.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/check_on.ogg)bin10344 -> 10344 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/collapsed.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/collapsed.ogg)bin11026 -> 11026 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/editable_text.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/editable_text.ogg)bin5197 -> 5197 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/ellipsis.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/ellipsis.ogg)bin12631 -> 12631 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/expanded.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/expanded.ogg)bin9783 -> 9783 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/font_change.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/font_change.ogg)bin9546 -> 9546 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/invalid_keypress.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/invalid_keypress.ogg)bin5353 -> 5353 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/link.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/link.ogg)bin7508 -> 7508 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/listbox.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/listbox.ogg)bin7396 -> 7396 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/long_desc.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/long_desc.ogg)bin21030 -> 21030 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/new_mail.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/new_mail.ogg)bin21030 -> 21030 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/object_close.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/object_close.ogg)bin9753 -> 9753 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/object_delete.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/object_delete.ogg)bin10443 -> 10443 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/object_deselect.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/object_deselect.ogg)bin10572 -> 10572 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/object_enter.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/object_enter.ogg)bin10748 -> 10748 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/object_exit.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/object_exit.ogg)bin11619 -> 11619 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/object_open.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/object_open.ogg)bin9749 -> 9749 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/object_select.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/object_select.ogg)bin10572 -> 10572 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/paragraph_break.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/paragraph_break.ogg)bin7146 -> 7146 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/search_hit.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/search_hit.ogg)bin8838 -> 8838 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/search_miss.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/search_miss.ogg)bin6765 -> 6765 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/section.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/section.ogg)bin7340 -> 7340 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/selection.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/selection.ogg)bin6323 -> 6323 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/selection_reverse.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/selection_reverse.ogg)bin6263 -> 6263 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/special_content.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/special_content.ogg)bin5262 -> 5262 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/task_success.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/task_success.ogg)bin13721 -> 13721 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/wrap.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/wrap.ogg)bin9382 -> 9382 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/earcons/wrap_edge.ogg (renamed from chromium/chrome/third_party/chromevox/chromevox/background/earcons/wrap_edge.ogg)bin5641 -> 5641 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/externs.js121
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/injected_script_loader.js58
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/kbexplorer.html25
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/kbexplorer.js61
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/kbexplorer_loader.js13
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/keymaps/classic_keymap.json548
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/keymaps/experimental.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/keymaps/experimental.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/keymaps/flat_keymap.json616
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/keymaps/key_map.js453
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/loader.js11
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/functions/algebra.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/functions/algebra.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/functions/elementary.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/functions/elementary.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/functions/hyperbolic.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/functions/hyperbolic.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/functions/trigonometry.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/functions/trigonometry.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/math_map.js188
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/greek-capital.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/greek-capital.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/greek-mathfonts.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/greek-mathfonts.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/greek-scripts.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/greek-scripts.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/greek-small.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/greek-small.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/greek-symbols.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/greek-symbols.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/hebrew_letters.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/hebrew_letters.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/latin-lower-double-accent.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/latin-lower-double-accent.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/latin-lower-normal.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/latin-lower-normal.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/latin-lower-phonetic.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/latin-lower-phonetic.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/latin-lower-single-accent.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/latin-lower-single-accent.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/latin-mathfonts.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/latin-mathfonts.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/latin-rest.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/latin-rest.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/latin-upper-double-accent.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/latin-upper-double-accent.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/latin-upper-normal.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/latin-upper-normal.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/latin-upper-single-accent.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/latin-upper-single-accent.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/math_angles.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/math_angles.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/math_arrows.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/math_arrows.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/math_characters.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/math_characters.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/math_delimiters.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/math_delimiters.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/math_digits.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/math_digits.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/math_geometry.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/math_geometry.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/math_harpoons.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/math_harpoons.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/math_non_characters.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/math_non_characters.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/math_symbols.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/math_symbols.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/math_whitespace.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/math_whitespace.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/mathmaps/symbols/other_stars.json (renamed from chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/symbols/other_stars.json)0
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/options.html111
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/options.js566
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/options_loader.js10
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/prefs.js231
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/chromevox-128.png (renamed from chromium/chrome/third_party/chromevox/chromevox/chromevox-128.png)bin2142 -> 2142 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/chromevox-16.png (renamed from chromium/chrome/third_party/chromevox/chromevox/chromevox-16.png)bin721 -> 721 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/chromevox-19.png (renamed from chromium/chrome/third_party/chromevox/chromevox/chromevox-19.png)bin744 -> 744 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/chromevox-48.png (renamed from chromium/chrome/third_party/chromevox/chromevox/chromevox-48.png)bin1875 -> 1875 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/active_indicator.js993
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/api.js590
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/api_implementation.js439
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/api_util.js90
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/console_tts.js77
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/event_suspender.js77
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/event_watcher.js1565
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/externs.js174
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/history.js405
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/init_document.js84
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/init_globals.js71
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/initial_speech.js85
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/keyboard_handler.js131
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/live_regions.js439
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/live_regions_deprecated.js244
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/loader.js25
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/navigation_history.js185
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/navigation_manager.js1234
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/navigation_shifter.js269
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/navigation_speaker.js140
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/node_breadcrumb.js167
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/pdf_processor.js135
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/script_installer.js79
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/serializer.js38
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/ui/braille_overlay_widget.js184
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/ui/context_menu_widget.js126
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/ui/keyboard_help_widget.js85
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/ui/node_search_widget.js66
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/ui/overlay_widget.js82
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/ui/search_widget.js535
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/ui/select_widget.js82
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/ui/widget.js195
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/user_commands.js821
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/injected/user_event_detail.js171
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/messages/spoken_message.js27
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/messages/spoken_messages.js169
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox_assets.gypi105
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox_tests.gypi209
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/closure/closure_preinit.js94
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common.gypi22
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/aria_util.js988
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/aria_util_test.js142
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/aural_style_util.js209
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/braille_text_handler.js63
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/braille_util.js428
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/braille_util_test.js400
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/buildinfo.js20
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/chrome_extension_externs.js1172
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/chromevox.js263
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/chromevox_json.js370
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/command_store.js785
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/command_store_test.js73
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/composite_tts.js103
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/content_editable_extractor.js235
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/content_editable_extractor_test.js310
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/cursor.js59
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/cursor_selection.js255
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/cursor_selection_test.js97
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/date_widget.js320
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/description_util.js474
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/dom_predicates.js493
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/dom_util.js2552
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/earcon_util.js67
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/editable_text.js1331
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/editable_text_area_shadow.js190
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/editable_text_area_shadow_test.js65
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/editable_text_test.js670
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/externs.js7
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/find_util.js66
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/find_util_test.js51
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/focus_util.js98
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/focuser.js120
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/group_util.js150
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/interframe.js213
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/key_sequence.js627
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/key_sequence_test.js445
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/key_util.js509
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/math_semantic_attr.js1529
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/math_semantic_tree.js1939
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/math_semantic_tree_test.js6188
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/math_semantic_util.js135
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/math_util.js263
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/media_widget.js91
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/nav_braille.js121
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/nav_description.js162
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/nav_math_description.js48
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/node_state.js50
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/page_selection.js107
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/page_selection_test.js143
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/platform_util.js51
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/selection_util.js610
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/selection_util_test.js31
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/spannable.js406
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/spannable_test.js481
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/table_util.js179
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/time_widget.js206
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/traverse_content.js482
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/traverse_math.js446
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/traverse_table.js1312
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/traverse_util.js927
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/common/xpath_util.js152
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/compress_js.gypi42
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/copy_js.gypi43
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/extensions/searchvox/abstract_result.js51
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/extensions/searchvox/constants.js30
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/extensions/searchvox/context_menu.js141
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/extensions/searchvox/loader.js48
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/extensions/searchvox/results.js468
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/extensions/searchvox/search.js439
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/extensions/searchvox/search_tools.js208
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/extensions/searchvox/util.js184
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/generate_deps.gypi43
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/generate_manifest.gypi43
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/chrome/braille.js114
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/chrome/braille_background.js243
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/chrome/braille_display_manager.js380
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/chrome/braille_input_handler.js523
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/chrome/braille_key_types.js133
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/chrome/braille_table.js93
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/chrome/earcons.js68
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/chrome/earcons_background.js81
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/chrome/expanding_braille_translator.js312
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/chrome/extension_bridge.js352
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/chrome/externs.js56
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/chrome/host.js200
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/chrome/mathjax.js282
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/chrome/msgs.js94
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/chrome/tts.js137
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/chrome/tts_background.js712
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/chrome/tts_base.js33
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/interface/abstract_braille.js30
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/interface/abstract_earcons.js422
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/interface/abstract_host.js165
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/interface/abstract_mathjax.js112
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/interface/abstract_msgs.js48
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/interface/abstract_tts.js616
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/interface/braille_interface.js41
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/interface/host_factory.js105
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/interface/mathjax_interface.js77
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/interface/tts_interface.js83
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/testing/earcons.js25
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/testing/host.js25
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/testing/mathjax.js71
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/testing/msgs.js94
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/host/testing/tts.js108
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/liblouis_nacl/externs.js22
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/liblouis_nacl/liblouis.js363
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/manifest.json38
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/manifest.json.jinja260
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/manifest_guest.json39
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/speech_rules/base_rule_store.js426
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/speech_rules/math_simple_store.js181
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/speech_rules/math_store.js268
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/speech_rules/mathml_store.js44
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/speech_rules/mathml_store_rules.js851
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/speech_rules/mathml_store_util.js177
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/speech_rules/speech_rule.js379
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/speech_rules/speech_rule_engine.js371
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/speech_rules/speech_rule_evaluator.js28
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/speech_rules/speech_rule_functions.js137
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/speech_rules/speech_rule_store.js74
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/speech_rules/store_util.js33
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings.grd2422
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_am.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_ar.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_bg.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_bn.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_ca.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_cs.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_da.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_de.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_el.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_en-GB.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_es-419.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_es.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_et.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_fa.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_fi.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_fil.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_fr.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_gu.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_hi.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_hr.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_hu.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_id.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_it.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_iw.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_ja.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_kn.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_ko.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_lt.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_lv.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_ml.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_mr.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_ms.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_nl.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_no.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_pl.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_pt-BR.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_pt-PT.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_ro.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_ru.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_sk.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_sl.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_sr.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_sv.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_sw.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_ta.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_te.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_th.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_tr.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_uk.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_vi.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_zh-CN.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings_zh-TW.xtb708
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test.js73
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/testing/chromevox_unittest_base.js136
-rwxr-xr-xchromium/chrome/browser/resources/chromeos/chromevox/tools/check_chromevox.py129
-rwxr-xr-xchromium/chrome/browser/resources/chromeos/chromevox/tools/find_js_files.py34
-rwxr-xr-xchromium/chrome/browser/resources/chromeos/chromevox/tools/generate_deps.py56
-rwxr-xr-xchromium/chrome/browser/resources/chromeos/chromevox/tools/generate_manifest.py59
-rwxr-xr-xchromium/chrome/browser/resources/chromeos/chromevox/tools/generate_test_messages.py45
-rwxr-xr-xchromium/chrome/browser/resources/chromeos/chromevox/tools/jsbundler.py345
-rwxr-xr-xchromium/chrome/browser/resources/chromeos/chromevox/tools/jscompilerwrapper.py72
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/walkers/abstract_node_walker.js115
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/walkers/abstract_selection_walker.js159
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/walkers/abstract_shifter.js165
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/walkers/abstract_walker.js177
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/walkers/bare_object_walker.js32
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/walkers/character_walker.js44
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/walkers/column_walker.js38
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/walkers/group_walker.js59
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/walkers/layout_line_walker.js246
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/walkers/math_shifter.js167
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/walkers/object_walker.js56
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/walkers/row_walker.js38
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/walkers/sentence_walker.js30
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/walkers/structural_line_walker.js77
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/walkers/table_shifter.js152
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/walkers/table_walker.js421
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/walkers/word_walker.js30
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox2/OWNERS4
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox2/chromevox.gyp82
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs93
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.html8
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.js103
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox2/cvox2/injected/injected.js18
-rw-r--r--chromium/chrome/browser/resources/chromeos/connectivity_diagnostics/manifest.json1
-rw-r--r--chromium/chrome/browser/resources/chromeos/connectivity_diagnostics_launcher/manifest.json1
-rw-r--r--chromium/chrome/browser/resources/chromeos/demo_app/manifest.json15
-rw-r--r--chromium/chrome/browser/resources/chromeos/drive_internals.html84
-rw-r--r--chromium/chrome/browser/resources/chromeos/drive_internals.js32
-rw-r--r--chromium/chrome/browser/resources/chromeos/echo/OWNERS3
-rw-r--r--chromium/chrome/browser/resources/chromeos/echo/manifest.json25
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/background.js5
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/greeting_image_enabled.html2
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/main.html3
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/main.js15
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/app/style.css20
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/first_run.html1
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/help_step.html5
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/preload.css53
-rw-r--r--chromium/chrome/browser/resources/chromeos/first_run/step_bubble.css1
-rw-r--r--chromium/chrome/browser/resources/chromeos/genius_app/manifest.json34
-rw-r--r--chromium/chrome/browser/resources/chromeos/guest_session_tab.html12
-rw-r--r--chromium/chrome/browser/resources/chromeos/images/broken_robot.pngbin5874 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/keyboard_overlay.css2
-rw-r--r--chromium/chrome/browser/resources/chromeos/keyboard_overlay.js29
-rw-r--r--chromium/chrome/browser/resources/chromeos/keyboard_overlay_data.js50
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/accessibility_menu.html12
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/apps_menu.js59
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/bubble.css128
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/bubble.js315
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/display_manager.js866
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/enterprise_info.css16
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/gaia.css54
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/header_bar.css10
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/header_bar.js78
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/login.html2
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/login.js4
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/login_common.js114
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/login_resources.html15
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/login_screens.html4
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/network_dropdown.css24
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe.css245
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe.js55
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen.css19
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_auto_enrollment_check.css16
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_auto_enrollment_check.html9
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_auto_enrollment_check.js15
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_autolaunch.css2
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_autolaunch.html2
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_enable_kiosk.css2
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_enable_kiosk.html2
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_eula.css5
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_eula.html15
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_eula.js15
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.css94
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.html65
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js172
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_network.html4
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_network.js13
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.css127
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.html30
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js271
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_reset.css53
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_reset.html38
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_reset.js113
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_terms_of_service.html2
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_update.html5
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_user_image.css6
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_user_image.html12
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screen_user_image.js45
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/oobe_screens.html6
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/resource_loader.js188
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen.js105
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_account_picker.css50
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_account_picker.html9
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_account_picker.js256
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_app_launch_splash.html2
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_confirm_password.css44
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_confirm_password.html24
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_confirm_password.js29
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_container.css178
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_container.html22
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_context.js46
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_error_message.css60
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_error_message.html57
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_error_message.js118
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_fatal_error.css22
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_fatal_error.html17
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_fatal_error.js71
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_gaia_signin.css44
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_gaia_signin.html13
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_gaia_signin.js199
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.css48
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.html31
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js142
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_message_box.css15
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_message_box.html8
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_message_box.js78
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_password_changed.css2
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_password_changed.html2
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_password_changed.js7
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_tpm_error.html2
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_wrong_hwid.css6
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/screen_wrong_hwid.html2
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/user_pod_row.css502
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/user_pod_row.js1755
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/user_pod_template.html64
-rw-r--r--chromium/chrome/browser/resources/chromeos/login/wallpaper_loader.js223
-rw-r--r--chromium/chrome/browser/resources/chromeos/menu.css97
-rw-r--r--chromium/chrome/browser/resources/chromeos/menu.html20
-rw-r--r--chromium/chrome/browser/resources/chromeos/menu.js670
-rw-r--r--chromium/chrome/browser/resources/chromeos/merge_session_load.html2
-rw-r--r--chromium/chrome/browser/resources/chromeos/mobile_setup.html4
-rw-r--r--chromium/chrome/browser/resources/chromeos/mobile_setup_portal.html4
-rw-r--r--chromium/chrome/browser/resources/chromeos/network.css65
-rw-r--r--chromium/chrome/browser/resources/chromeos/network.html53
-rw-r--r--chromium/chrome/browser/resources/chromeos/network.js180
-rw-r--r--chromium/chrome/browser/resources/chromeos/network/network_config.js123
-rw-r--r--chromium/chrome/browser/resources/chromeos/network_configuration/js/network_status.js4
-rw-r--r--chromium/chrome/browser/resources/chromeos/network_ui/network_ui.css83
-rw-r--r--chromium/chrome/browser/resources/chromeos/network_ui/network_ui.html66
-rw-r--r--chromium/chrome/browser/resources/chromeos/network_ui/network_ui.js320
-rw-r--r--chromium/chrome/browser/resources/chromeos/nfc_debug.css85
-rw-r--r--chromium/chrome/browser/resources/chromeos/nfc_debug.html130
-rw-r--r--chromium/chrome/browser/resources/chromeos/nfc_debug.js375
-rw-r--r--chromium/chrome/browser/resources/chromeos/notification_icon_link.html39
-rw-r--r--chromium/chrome/browser/resources/chromeos/power.css72
-rw-r--r--chromium/chrome/browser/resources/chromeos/power.html81
-rw-r--r--chromium/chrome/browser/resources/chromeos/power.js865
-rw-r--r--chromium/chrome/browser/resources/chromeos/provided_file_systems.css164
-rw-r--r--chromium/chrome/browser/resources/chromeos/provided_file_systems.html128
-rw-r--r--chromium/chrome/browser/resources/chromeos/provided_file_systems.js328
-rw-r--r--chromium/chrome/browser/resources/chromeos/set_time.css45
-rw-r--r--chromium/chrome/browser/resources/chromeos/set_time.html39
-rw-r--r--chromium/chrome/browser/resources/chromeos/set_time.js200
-rw-r--r--chromium/chrome/browser/resources/chromeos/sounds/camera_snap.wavbin0 -> 45004 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/sounds/object_delete.wavbin0 -> 91950 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/sounds/startup2.wavbin0 -> 264724 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/speech_synthesis/manifest.json72
-rw-r--r--chromium/chrome/browser/resources/chromeos/speech_synthesis/manifest_guest.json72
-rw-r--r--chromium/chrome/browser/resources/chromeos/user_images_grid.js53
-rw-r--r--chromium/chrome/browser/resources/chromeos/wallpaper_manager/css/wallpaper_manager.css78
-rw-r--r--chromium/chrome/browser/resources/chromeos/wallpaper_manager/images/ui/2x/spinner.pngbin0 -> 729 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/wallpaper_manager/images/ui/spinner.pngbin0 -> 428 bytes
-rw-r--r--chromium/chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js14
-rw-r--r--chromium/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_images_grid.js114
-rw-r--r--chromium/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js105
-rw-r--r--chromium/chrome/browser/resources/chromeos/wallpaper_manager/main.html6
-rw-r--r--chromium/chrome/browser/resources/chromeos/wallpaper_manager/manifest.json1
-rw-r--r--chromium/chrome/browser/resources/chromeos/wrench_menu.css50
-rw-r--r--chromium/chrome/browser/resources/chromeos/wrench_menu.js311
-rw-r--r--chromium/chrome/browser/resources/component_extension_resources.grd180
-rw-r--r--chromium/chrome/browser/resources/components.css8
-rw-r--r--chromium/chrome/browser/resources/components.html60
-rw-r--r--chromium/chrome/browser/resources/components.js28
-rw-r--r--chromium/chrome/browser/resources/crashes.css4
-rw-r--r--chromium/chrome/browser/resources/crashes.html5
-rw-r--r--chromium/chrome/browser/resources/crashes.js32
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/b64.js88
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/background.js85
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/closeable.js17
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/countdown.js125
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/devicestatuscodes.js51
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/enroller.js557
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/enrollhelper.js52
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/gnubbies.js312
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/gnubby-u2f.js143
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/gnubby.js694
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/gnubbycodetypes.js89
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/gnubbyfactory.js32
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/gnubbymsgtypes.js46
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/llgnubby.js110
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/llhidgnubby.js443
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/llusbgnubby.js475
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/manifest.json59
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/multiplesigner.js271
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/requestqueue.js179
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/sha256.js179
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/signer.js553
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/signhelper.js46
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/singlesigner.js432
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/usbenrollhelper.js441
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/usbgnubbyfactory.js45
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/usbsignhelper.js339
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/util.js157
-rw-r--r--chromium/chrome/browser/resources/cryptotoken/webrequest.js385
-rw-r--r--chromium/chrome/browser/resources/default_apps/external_extensions.json8
-rw-r--r--chromium/chrome/browser/resources/downloads/downloads.js90
-rw-r--r--chromium/chrome/browser/resources/easy_unlock/OWNERS2
-rw-r--r--chromium/chrome/browser/resources/easy_unlock/manifest.json50
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/css/bmm.css381
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/css/bmm.css.js17
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/images/2x/bookmark_manager_recent.pngbin1641 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/images/2x/bookmark_manager_search.pngbin1904 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/images/2x/bookmark_manager_search_rtl.pngbin1888 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/images/2x/bookmarks_section_32.pngbin4772 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/images/bookmark_manager_recent.pngbin694 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/images/bookmark_manager_search.pngbin737 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/images/bookmark_manager_search_rtl.pngbin737 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/images/bookmarks_section_32.pngbin1948 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/js/bmm.js248
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/js/bmm/bookmark_list.js566
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/js/bmm/bookmark_tree.js307
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/js/bmm_test.html117
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/js/dnd.js502
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/js/main.js1308
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/main.html158
-rw-r--r--chromium/chrome/browser/resources/enhanced_bookmark_manager/manifest.json25
-rw-r--r--chromium/chrome/browser/resources/extensions/apps_developer_tools_promo_48.pngbin0 -> 793 bytes
-rw-r--r--chromium/chrome/browser/resources/extensions/chromeos/kiosk_app_list.js26
-rw-r--r--chromium/chrome/browser/resources/extensions/chromeos/kiosk_apps.css7
-rw-r--r--chromium/chrome/browser/resources/extensions/chromeos/kiosk_apps.js8
-rw-r--r--chromium/chrome/browser/resources/extensions/extension_code.js109
-rw-r--r--chromium/chrome/browser/resources/extensions/extension_command_list.js8
-rw-r--r--chromium/chrome/browser/resources/extensions/extension_error.css93
-rw-r--r--chromium/chrome/browser/resources/extensions/extension_error.html27
-rw-r--r--chromium/chrome/browser/resources/extensions/extension_error.js326
-rw-r--r--chromium/chrome/browser/resources/extensions/extension_error_inspect.pngbin304 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/extensions/extension_error_overlay.css59
-rw-r--r--chromium/chrome/browser/resources/extensions/extension_error_overlay.html25
-rw-r--r--chromium/chrome/browser/resources/extensions/extension_error_overlay.js487
-rw-r--r--chromium/chrome/browser/resources/extensions/extension_list.js58
-rw-r--r--chromium/chrome/browser/resources/extensions/extension_load_error.css40
-rw-r--r--chromium/chrome/browser/resources/extensions/extension_load_error.html21
-rw-r--r--chromium/chrome/browser/resources/extensions/extension_loader.js142
-rw-r--r--chromium/chrome/browser/resources/extensions/extensions.css101
-rw-r--r--chromium/chrome/browser/resources/extensions/extensions.html58
-rw-r--r--chromium/chrome/browser/resources/extensions/extensions.js70
-rw-r--r--chromium/chrome/browser/resources/extensions/pack_extension_overlay.css2
-rw-r--r--chromium/chrome/browser/resources/extensions_infobar.css24
-rw-r--r--chromium/chrome/browser/resources/feedback/css/feedback.css4
-rw-r--r--chromium/chrome/browser/resources/feedback/html/default.html4
-rw-r--r--chromium/chrome/browser/resources/feedback/js/event_handler.js15
-rw-r--r--chromium/chrome/browser/resources/feedback/js/feedback.js68
-rw-r--r--chromium/chrome/browser/resources/feedback/js/take_screenshot.js2
-rw-r--r--chromium/chrome/browser/resources/file_manager/OWNERS3
-rw-r--r--chromium/chrome/browser/resources/file_manager/background/js/background.js787
-rw-r--r--chromium/chrome/browser/resources/file_manager/background/js/file_operation_handler.js315
-rw-r--r--chromium/chrome/browser/resources/file_manager/background/js/file_operation_manager.js1400
-rw-r--r--chromium/chrome/browser/resources/file_manager/background/js/progress_center.js452
-rw-r--r--chromium/chrome/browser/resources/file_manager/background/js/test_util.js868
-rw-r--r--chromium/chrome/browser/resources/file_manager/background/js/volume_manager.js727
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/archive.pngbin119 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/audio.pngbin150 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/chart.pngbin106 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/chart_white.pngbin105 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/excel.pngbin392 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/folder.pngbin115 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/form.pngbin128 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/gdoc.pngbin100 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/gdraw.pngbin165 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/generic.pngbin104 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/glink.pngbin104 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/gsheet.pngbin107 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/gslides.pngbin99 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/gtable.pngbin146 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/image.pngbin215 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/pdf.pngbin123 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/ppt.pngbin178 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/script.pngbin180 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/sites.pngbin105 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/video.pngbin117 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/100/word.pngbin372 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/archive.pngbin164 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/audio.pngbin221 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/chart.pngbin146 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/chart_white.pngbin126 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/excel.pngbin731 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/folder.pngbin139 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/form.pngbin194 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/gdoc.pngbin145 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/gdraw.pngbin279 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/generic.pngbin130 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/glink.pngbin129 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/gsheet.pngbin148 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/gslides.pngbin137 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/gtable.pngbin580 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/image.pngbin348 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/pdf.pngbin167 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/ppt.pngbin295 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/script.pngbin333 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/sites.pngbin149 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/video.pngbin225 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/file_types/200/word.pngbin619 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/icon128.pngbin1414 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/icon16.pngbin267 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/icon256.pngbin3169 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/icon32.pngbin400 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/icon48.pngbin562 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/icon64.pngbin711 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/images/icon96.pngbin1018 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/js/async_util.js262
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/js/path_util.js471
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/js/progress_center_common.js149
-rw-r--r--chromium/chrome/browser/resources/file_manager/common/js/util.js1259
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/css/action_choice.css172
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/css/audio_player.css404
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/css/combobutton.css34
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/css/common.css501
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/css/drive_welcome.css188
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/css/file_manager.css2075
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/css/file_types.css477
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/css/gallery.css1374
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/css/list.css73
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/css/media_controls.css605
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/css/menu.css38
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/css/table.css64
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/css/tree.css83
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/css/video_player.css103
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/common/2x/bubble_point_white.pngbin192 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/common/2x/check_no_box.pngbin313 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/common/2x/checkbox_white_checked.pngbin404 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/common/2x/checkbox_white_unchecked.pngbin166 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/common/2x/close_x_gray.pngbin217 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/common/2x/disclosure_arrow_dk_grey.pngbin104 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/common/bubble_point_white.pngbin138 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/common/check_no_box.pngbin191 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/common/checkbox_white_checked.pngbin195 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/common/checkbox_white_unchecked.pngbin95 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/common/close_x_gray.pngbin169 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/common/disclosure_arrow_dk_grey.pngbin91 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/common/spinner.svg13
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/black_folder.pngbin138 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/breadcrumb-separator.pngbin197 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/button_list_view.pngbin99 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/button_list_view_white.pngbin94 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/button_mosaic_view.pngbin99 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/button_mosaic_view_white.pngbin97 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/close_bar.pngbin197 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/drive_logo.pngbin11287 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/eject.pngbin155 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/hashed_bg.gifbin47 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/icon_search.pngbin442 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/offline.pngbin475 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/onbutton_trash.pngbin191 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/process_drawer_button_closed.pngbin121 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/process_drawer_button_closed_hover.pngbin121 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/process_drawer_button_closed_pressed.pngbin121 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/process_drawer_button_opened.pngbin121 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/process_drawer_button_opened_hover.pngbin122 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/process_drawer_button_opened_pressed.pngbin122 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/search_clear.pngbin271 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/search_clear_hover.pngbin272 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/search_clear_pressed.pngbin272 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/search_icon_active.pngbin540 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/search_icon_inactive.pngbin506 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/select_checkbox.pngbin138 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/select_checkbox_checked.pngbin261 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/sort_asc.pngbin103 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/sort_desc.pngbin106 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/vertical_separator.pngbin77 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/warning_icon_square.pngbin1878 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/2x/white_folder.pngbin132 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/black_folder.pngbin103 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/breadcrumb-separator.pngbin134 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/button_list_view.pngbin95 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/button_list_view_white.pngbin83 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/button_mosaic_view.pngbin92 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/button_mosaic_view_white.pngbin88 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/close_bar.pngbin136 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/drive_logo.pngbin5711 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/eject.pngbin129 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/hashed_bg.gifbin1100 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/offline.pngbin255 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/onbutton_trash.pngbin195 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/process_drawer_button_closed.pngbin102 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/process_drawer_button_closed_hover.pngbin102 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/process_drawer_button_closed_pressed.pngbin102 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/process_drawer_button_opened.pngbin104 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/process_drawer_button_opened_hover.pngbin104 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/process_drawer_button_opened_pressed.pngbin104 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/search_clear.pngbin161 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/search_clear_hover.pngbin161 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/search_clear_pressed.pngbin160 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/search_icon_active.pngbin295 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/search_icon_inactive.pngbin278 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/select_checkbox.pngbin109 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/select_checkbox_checked.pngbin174 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/sort_asc.pngbin93 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/sort_desc.pngbin92 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/vertical_separator.pngbin70 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/view_thumbs_black.pngbin91 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/warning_icon_square.pngbin849 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/files/ui/white_folder.pngbin100 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/arrow_left.pngbin3180 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/arrow_right.pngbin3166 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/back_to_files.pngbin1943 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/bubble_point.pngbin135 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/butterbar_close_button.pngbin146 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/cursor_crop.pngbin831 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/cursor_leftright.pngbin801 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/cursor_move.pngbin1217 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/cursor_nwse.pngbin914 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/cursor_swne.pngbin903 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/cursor_updown.pngbin786 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_1up.pngbin253 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_1up_selected.pngbin249 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_autofix.pngbin563 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_autofix_selected.pngbin579 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_brightness.pngbin412 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_brightness_selected.pngbin398 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_contrast.pngbin524 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_crop.pngbin122 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_crop_selected.pngbin125 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_delete.pngbin142 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_delete_selected.pngbin148 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_edit.pngbin230 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_edit_selected.pngbin238 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_mosaic.pngbin166 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_mosaic_selected.pngbin168 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_print.pngbin175 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_print_selected.pngbin184 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_redo.pngbin369 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_redo_selected.pngbin381 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_rotate.pngbin723 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_rotate_left.pngbin721 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_rotate_left_selected.pngbin738 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_rotate_selected.pngbin743 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_share.pngbin261 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_share_selected.pngbin267 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_slideshow.pngbin257 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_slideshow_selected.pngbin256 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_undo.pngbin371 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/icon_undo_selected.pngbin388 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/slider_thumb.pngbin392 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/slideshow-end.pngbin3098 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/slideshow-pause.pngbin1099 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/2x/slideshow-play.pngbin1727 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/arrow_left.pngbin1773 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/arrow_right.pngbin1772 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/back_to_files.pngbin688 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/bubble_point.pngbin102 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/butterbar_close_button.pngbin139 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/cursor_crop.pngbin410 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/cursor_leftright.pngbin373 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/cursor_move.pngbin484 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/cursor_nwse.pngbin459 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/cursor_swne.pngbin454 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/cursor_updown.pngbin366 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_1up.pngbin162 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_1up_selected.pngbin162 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_autofix.pngbin292 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_autofix_selected.pngbin292 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_brightness.pngbin266 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_brightness_selected.pngbin257 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_contrast.pngbin305 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_crop.pngbin102 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_crop_selected.pngbin108 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_delete.pngbin112 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_delete_selected.pngbin119 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_edit.pngbin161 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_edit_selected.pngbin164 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_mosaic.pngbin124 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_mosaic_selected.pngbin126 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_print.pngbin144 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_print_selected.pngbin148 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_redo.pngbin243 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_redo_selected.pngbin245 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_rotate.pngbin367 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_rotate_left.pngbin368 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_rotate_left_selected.pngbin382 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_rotate_selected.pngbin382 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_share.pngbin165 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_share_selected.pngbin170 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_slideshow.pngbin173 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_slideshow_selected.pngbin172 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_undo.pngbin240 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/icon_undo_selected.pngbin243 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/slider_thumb.pngbin221 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/slideshow-end.pngbin1717 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/slideshow-pause.pngbin648 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/gallery/slideshow-play.pngbin1080 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/audio_player.pngbin6721 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/drive.pngbin2756 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/error.pngbin2694 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_close.pngbin151 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_collapse.pngbin115 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_expand.pngbin117 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_fullscreen.pngbin579 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_fullscreen_disabled.pngbin387 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_fullscreen_down.pngbin1790 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_fullscreen_hover.pngbin1726 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_loop.pngbin516 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_loop_down.pngbin2321 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_loop_hover.pngbin2259 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_next.pngbin409 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_next_down.pngbin1905 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_next_hover.pngbin1880 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_pause.pngbin387 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_pause_audio.pngbin148 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_pause_audio_down.pngbin1087 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_pause_audio_hover.pngbin1019 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_pause_down.pngbin1580 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_pause_hover.pngbin1518 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_play.pngbin471 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_play_audio.pngbin364 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_play_audio_down.pngbin1655 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_play_audio_hover.pngbin1642 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_play_disabled.pngbin480 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_play_down.pngbin2071 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_play_hover.pngbin2027 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_previous.pngbin427 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_previous_down.pngbin1917 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_previous_hover.pngbin1864 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_slider_thumb.pngbin1544 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_slider_thumb_down.pngbin2011 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_slider_thumb_hover.pngbin1959 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_sound_disabled.pngbin520 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_sound_disabled_down.pngbin2385 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_sound_disabled_hover.pngbin2357 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_sound_full.pngbin743 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_sound_full_disabled.pngbin739 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_sound_full_down.pngbin2802 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_sound_full_hover.pngbin2779 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_sound_level1.pngbin453 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_sound_level1_down.pngbin1932 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_sound_level1_hover.pngbin1885 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_sound_level2.pngbin575 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_sound_level2_down.pngbin2314 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_sound_level2_hover.pngbin2280 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_volume_slider_thumb.pngbin1394 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_volume_slider_thumb_down.pngbin1795 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/media_volume_slider_thumb_hover.pngbin1782 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/2x/watch.pngbin370 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/audio_player.pngbin3172 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/drive.pngbin1197 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/error.pngbin1026 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_close.pngbin112 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_collapse.pngbin95 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_expand.pngbin97 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_fullscreen.pngbin237 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_fullscreen_disabled.pngbin244 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_fullscreen_down.pngbin890 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_fullscreen_hover.pngbin873 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_loop.pngbin309 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_loop_down.pngbin1147 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_loop_hover.pngbin1178 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_next.pngbin226 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_next_down.pngbin874 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_next_hover.pngbin866 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_pause.pngbin199 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_pause_audio.pngbin132 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_pause_audio_down.pngbin567 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_pause_audio_hover.pngbin555 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_pause_down.pngbin743 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_pause_hover.pngbin742 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_play.pngbin269 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_play_audio.pngbin203 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_play_audio_down.pngbin756 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_play_audio_hover.pngbin771 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_play_disabled.pngbin276 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_play_down.pngbin940 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_play_hover.pngbin952 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_previous.pngbin229 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_previous_down.pngbin883 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_previous_hover.pngbin880 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_slider_thumb.pngbin678 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_slider_thumb_down.pngbin861 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_slider_thumb_hover.pngbin842 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_sound_disabled.pngbin285 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_sound_disabled_down.pngbin1074 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_sound_disabled_hover.pngbin1104 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_sound_full.pngbin380 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_sound_full_disabled.pngbin372 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_sound_full_down.pngbin1278 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_sound_full_hover.pngbin1273 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_sound_level1.pngbin257 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_sound_level1_down.pngbin955 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_sound_level1_hover.pngbin953 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_sound_level2.pngbin313 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_sound_level2_down.pngbin1105 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_sound_level2_hover.pngbin1113 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_volume_slider_thumb.pngbin627 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_volume_slider_thumb_down.pngbin815 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/media_volume_slider_thumb_hover.pngbin806 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/media/watch.pngbin266 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/archive.pngbin156 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/black_archive.pngbin156 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/black_downloads.pngbin200 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/black_drive.pngbin332 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/black_hdd.pngbin203 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/black_offline.pngbin474 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/black_optical.pngbin539 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/black_phone.pngbin141 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/black_recent.pngbin499 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/black_sd.pngbin154 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/black_shared.pngbin535 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/black_trash.pngbin111 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/black_usb.pngbin169 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/device_hd.pngbin203 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/device_optical.pngbin539 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/device_sd.pngbin154 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/device_sd_large.pngbin2304 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/device_usb.pngbin169 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/device_usb_large.pngbin4103 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/downloads.pngbin200 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/drive.pngbin332 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/drive_offline.pngbin474 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/drive_recent.pngbin499 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/drive_shared.pngbin537 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/folder.pngbin138 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/white_archive.pngbin151 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/white_downloads.pngbin193 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/white_drive.pngbin329 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/white_hdd.pngbin174 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/white_offline.pngbin457 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/white_optical.pngbin562 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/white_phone.pngbin139 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/white_recent.pngbin478 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/white_sd.pngbin146 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/white_shared.pngbin498 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/white_trash.pngbin103 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/2x/white_usb.pngbin137 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/black_archive.pngbin108 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/black_downloads.pngbin117 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/black_drive.pngbin182 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/black_folder.pngbin103 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/black_hdd.pngbin116 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/black_offline.pngbin258 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/black_optical.pngbin281 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/black_phone.pngbin112 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/black_recent.pngbin287 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/black_sd.pngbin110 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/black_shared.pngbin289 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/black_trash.pngbin102 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/black_usb.pngbin120 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/device_sd_large.pngbin1117 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/device_usb_large.pngbin1642 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/white_archive.pngbin106 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/white_downloads.pngbin116 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/white_drive.pngbin179 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/white_folder.pngbin100 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/white_hdd.pngbin108 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/white_offline.pngbin248 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/white_optical.pngbin263 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/white_phone.pngbin114 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/white_recent.pngbin268 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/white_sd.pngbin110 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/white_shared.pngbin262 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/white_trash.pngbin101 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/images/volumes/white_usb.pngbin112 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/app_installer.js79
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/combobutton.js154
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/commandbutton.js136
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/cws_container_client.js249
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/default_action_dialog.js157
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/directory_contents.js770
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/directory_model.js1186
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/directory_tree.js676
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/drag_selector.js244
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/drive_banners.js660
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/error_counter.js16
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/error_dialog.js29
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/file_grid.js302
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/file_manager.js3688
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/file_manager_commands.js828
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/file_operation_manager_wrapper.js56
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/file_selection.js360
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/file_table.js1036
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/file_tasks.js834
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/file_transfer_controller.js860
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/file_type.js294
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/file_watcher.js227
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/folder_shortcuts_data_model.js293
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/image_editor/commands.js455
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/image_editor/exif_encoder.js569
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/image_editor/filter.js612
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/image_editor/image_adjust.js248
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/image_editor/image_buffer.js184
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/image_editor/image_editor.js1177
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/image_editor/image_encoder.js228
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/image_editor/image_transform.js493
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/image_editor/image_util.js701
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/image_editor/image_view.js1065
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/image_editor/viewport.js430
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/main.js41
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/main_scripts.js132
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/media/audio_player.js628
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/media/media_controls.js1245
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/media/media_util.js421
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/media/mediaplayer_scripts.js33
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/media/player_testapi.js193
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/media/util.js179
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/media/video_player.js289
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/media/video_player_scripts.js34
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/metadata/byte_reader.js535
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/metadata/exif_parser.js439
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/metadata/function_parallel.js82
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/metadata/function_sequence.js133
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/metadata/id3_parser.js708
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/metadata/image_parsers.js198
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/metadata/metadata_cache.js1042
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/metadata/metadata_dispatcher.js226
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/metadata/metadata_parser.js62
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/metadata/mpeg_parser.js317
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/metrics.js131
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/navigation_list_model.js350
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/photo/gallery.js867
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/photo/gallery_item.js227
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/photo/gallery_scripts.js70
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/photo/mosaic_mode.js2012
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/photo/ribbon.js366
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/photo/slide_mode.js1354
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/scrollbar.js294
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/share_client.js188
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/share_dialog.js314
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/suggest_apps_dialog.js554
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/text_measure.js50
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/tree.css.js59
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/ui/breadcrumbs_controller.js262
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/ui/conflict_dialog.js132
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/ui/file_manager_dialog_base.js122
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/ui/file_manager_ui.js190
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/ui/navigation_list.js386
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/ui/preview_panel.js518
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/ui/progress_center_panel.js329
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/ui/search_box.js202
-rw-r--r--chromium/chrome/browser/resources/file_manager/foreground/js/volume_manager_wrapper.js334
-rw-r--r--chromium/chrome/browser/resources/file_manager/gallery.html79
-rw-r--r--chromium/chrome/browser/resources/file_manager/main.html413
-rw-r--r--chromium/chrome/browser/resources/file_manager/manifest.json231
-rw-r--r--chromium/chrome/browser/resources/file_manager/mediaplayer.html47
-rw-r--r--chromium/chrome/browser/resources/file_manager/video_player.html57
-rw-r--r--chromium/chrome/browser/resources/flags.css2
-rw-r--r--chromium/chrome/browser/resources/flags.html2
-rw-r--r--chromium/chrome/browser/resources/gaia_auth/OWNERS1
-rw-r--r--chromium/chrome/browser/resources/gaia_auth/background.js330
-rw-r--r--chromium/chrome/browser/resources/gaia_auth/inline_injected.js46
-rw-r--r--chromium/chrome/browser/resources/gaia_auth/inline_main.html13
-rw-r--r--chromium/chrome/browser/resources/gaia_auth/main.html4
-rw-r--r--chromium/chrome/browser/resources/gaia_auth/main.js393
-rw-r--r--chromium/chrome/browser/resources/gaia_auth/manifest_inline.json32
-rw-r--r--chromium/chrome/browser/resources/gaia_auth/manifest_saml.json1
-rw-r--r--chromium/chrome/browser/resources/gaia_auth/offline.css18
-rw-r--r--chromium/chrome/browser/resources/gaia_auth/saml_injected.js76
-rw-r--r--chromium/chrome/browser/resources/gaia_auth/util.js21
-rw-r--r--chromium/chrome/browser/resources/gaia_auth_host/gaia_auth_host.js165
-rw-r--r--chromium/chrome/browser/resources/gcm_internals.css39
-rw-r--r--chromium/chrome/browser/resources/gcm_internals.html180
-rw-r--r--chromium/chrome/browser/resources/gcm_internals.js149
-rw-r--r--chromium/chrome/browser/resources/gesture_config.js107
-rw-r--r--chromium/chrome/browser/resources/google_now/OWNERS2
-rw-r--r--chromium/chrome/browser/resources/google_now/background.js1210
-rw-r--r--chromium/chrome/browser/resources/google_now/background_test_util.js7
-rw-r--r--chromium/chrome/browser/resources/google_now/background_unittest.gtestjs1444
-rw-r--r--chromium/chrome/browser/resources/google_now/cards.js160
-rw-r--r--chromium/chrome/browser/resources/google_now/cards_unittest.gtestjs591
-rw-r--r--chromium/chrome/browser/resources/google_now/common_test_util.js149
-rw-r--r--chromium/chrome/browser/resources/google_now/manifest.json9
-rw-r--r--chromium/chrome/browser/resources/google_now/utility.js420
-rw-r--r--chromium/chrome/browser/resources/google_now/utility_test_util.js5
-rw-r--r--chromium/chrome/browser/resources/google_now/utility_unittest.gtestjs93
-rw-r--r--chromium/chrome/browser/resources/hangout_services/OWNERS3
-rw-r--r--chromium/chrome/browser/resources/hangout_services/background.html1
-rw-r--r--chromium/chrome/browser/resources/hangout_services/manifest.json4
-rw-r--r--chromium/chrome/browser/resources/hangout_services/startup.js17
-rw-r--r--chromium/chrome/browser/resources/hangout_services/thunk.js350
-rw-r--r--chromium/chrome/browser/resources/help/help.html30
-rw-r--r--chromium/chrome/browser/resources/help/help.js46
-rw-r--r--chromium/chrome/browser/resources/history/history.css32
-rw-r--r--chromium/chrome/browser/resources/history/history.js18
-rw-r--r--chromium/chrome/browser/resources/history/other_devices.js8
-rw-r--r--chromium/chrome/browser/resources/hotword_helper/audio_client.js387
-rw-r--r--chromium/chrome/browser/resources/hotword_helper/manager.js214
-rw-r--r--chromium/chrome/browser/resources/hotword_helper/manifest.json37
-rw-r--r--chromium/chrome/browser/resources/hotword_helper/optin_client.js99
-rw-r--r--chromium/chrome/browser/resources/http_auth.html125
-rw-r--r--chromium/chrome/browser/resources/identity_scope_approval_dialog/manifest.json9
-rw-r--r--chromium/chrome/browser/resources/identity_scope_approval_dialog/scope_approval_dialog.css15
-rw-r--r--chromium/chrome/browser/resources/identity_scope_approval_dialog/scope_approval_dialog.js15
-rw-r--r--chromium/chrome/browser/resources/image_loader/OWNERS1
-rw-r--r--chromium/chrome/browser/resources/image_loader/background.js8
-rw-r--r--chromium/chrome/browser/resources/image_loader/cache.js410
-rw-r--r--chromium/chrome/browser/resources/image_loader/image_loader.js216
-rw-r--r--chromium/chrome/browser/resources/image_loader/image_loader_client.js366
-rw-r--r--chromium/chrome/browser/resources/image_loader/manifest.json26
-rw-r--r--chromium/chrome/browser/resources/image_loader/request.js438
-rw-r--r--chromium/chrome/browser/resources/image_loader/worker.js166
-rw-r--r--chromium/chrome/browser/resources/inline_login/inline_login.css1
-rw-r--r--chromium/chrome/browser/resources/inline_login/inline_login.html19
-rw-r--r--chromium/chrome/browser/resources/inline_login/inline_login.js29
-rw-r--r--chromium/chrome/browser/resources/inspect/inspect.css55
-rw-r--r--chromium/chrome/browser/resources/inspect/inspect.html24
-rw-r--r--chromium/chrome/browser/resources/inspect/inspect.js299
-rw-r--r--chromium/chrome/browser/resources/invalidations_resources.grd16
-rw-r--r--chromium/chrome/browser/resources/local_discovery/device.pngbin0 -> 191 bytes
-rw-r--r--chromium/chrome/browser/resources/local_discovery/local_discovery.css27
-rw-r--r--chromium/chrome/browser/resources/local_discovery/local_discovery.html16
-rw-r--r--chromium/chrome/browser/resources/local_discovery/local_discovery.js80
-rw-r--r--chromium/chrome/browser/resources/local_ntp/local_ntp.css18
-rw-r--r--chromium/chrome/browser/resources/local_ntp/local_ntp.js30
-rw-r--r--chromium/chrome/browser/resources/local_ntp/most_visited_thumbnail.js98
-rw-r--r--chromium/chrome/browser/resources/local_ntp/most_visited_title.js3
-rw-r--r--chromium/chrome/browser/resources/local_ntp/most_visited_util.js89
-rw-r--r--chromium/chrome/browser/resources/local_ntp/window_disposition_util.js32
-rw-r--r--chromium/chrome/browser/resources/login/OWNERS6
-rw-r--r--chromium/chrome/browser/resources/login/bubble.css128
-rw-r--r--chromium/chrome/browser/resources/login/bubble.js359
-rw-r--r--chromium/chrome/browser/resources/login/display_manager.js1033
-rw-r--r--chromium/chrome/browser/resources/login/oobe.css245
-rw-r--r--chromium/chrome/browser/resources/login/resource_loader.js188
-rw-r--r--chromium/chrome/browser/resources/login/screen.js255
-rw-r--r--chromium/chrome/browser/resources/login/screen_account_picker.css61
-rw-r--r--chromium/chrome/browser/resources/login/screen_account_picker.html9
-rw-r--r--chromium/chrome/browser/resources/login/screen_account_picker.js316
-rw-r--r--chromium/chrome/browser/resources/login/screen_container.css209
-rw-r--r--chromium/chrome/browser/resources/login/user_pod_row.css598
-rw-r--r--chromium/chrome/browser/resources/login/user_pod_row.js2386
-rw-r--r--chromium/chrome/browser/resources/login/user_pod_template.html87
-rw-r--r--chromium/chrome/browser/resources/media/webrtc_logs.js108
-rw-r--r--chromium/chrome/browser/resources/memory_internals/memory_internals.js34
-rw-r--r--chromium/chrome/browser/resources/memory_internals_resources.grd7
-rw-r--r--chromium/chrome/browser/resources/net_export/net_export.css13
-rw-r--r--chromium/chrome/browser/resources/net_export/net_export.html36
-rw-r--r--chromium/chrome/browser/resources/net_export/net_export.js71
-rw-r--r--chromium/chrome/browser/resources/net_internals/OWNERS4
-rw-r--r--chromium/chrome/browser/resources/net_internals/browser_bridge.js23
-rw-r--r--chromium/chrome/browser/resources/net_internals/capture_status_view.js3
-rw-r--r--chromium/chrome/browser/resources/net_internals/events_tracker.js9
-rw-r--r--chromium/chrome/browser/resources/net_internals/events_view.js9
-rw-r--r--chromium/chrome/browser/resources/net_internals/export_view.js4
-rw-r--r--chromium/chrome/browser/resources/net_internals/hsts_view.js88
-rw-r--r--chromium/chrome/browser/resources/net_internals/http_pipeline_view.html59
-rw-r--r--chromium/chrome/browser/resources/net_internals/http_pipeline_view.js61
-rw-r--r--chromium/chrome/browser/resources/net_internals/index.html5
-rw-r--r--chromium/chrome/browser/resources/net_internals/index.js1
-rw-r--r--chromium/chrome/browser/resources/net_internals/log_view_painter.js104
-rw-r--r--chromium/chrome/browser/resources/net_internals/main.js7
-rw-r--r--chromium/chrome/browser/resources/net_internals/modules_view.js5
-rw-r--r--chromium/chrome/browser/resources/net_internals/quic_view.html23
-rw-r--r--chromium/chrome/browser/resources/net_internals/source_entry.js46
-rw-r--r--chromium/chrome/browser/resources/net_internals/source_filter_parser.js7
-rw-r--r--chromium/chrome/browser/resources/net_internals/source_tracker.js24
-rw-r--r--chromium/chrome/browser/resources/net_internals/status_view.html1
-rw-r--r--chromium/chrome/browser/resources/net_internals/time_util.js68
-rw-r--r--chromium/chrome/browser/resources/net_internals/waterfall_row.js61
-rw-r--r--chromium/chrome/browser/resources/net_internals/waterfall_view.js15
-rw-r--r--chromium/chrome/browser/resources/net_internals_resources.grd7
-rw-r--r--chromium/chrome/browser/resources/network_speech_synthesis/tts_extension.js2
-rw-r--r--chromium/chrome/browser/resources/ntp4/apps_page.js7
-rw-r--r--chromium/chrome/browser/resources/ntp4/guest_tab.html26
-rw-r--r--chromium/chrome/browser/resources/ntp4/images/2x/app_promo_button.pngbin2671 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp4/images/2x/incognito_icon.pngbin0 -> 7648 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp4/images/incognito_icon.pngbin0 -> 4262 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp4/incognito_and_guest_tab.css69
-rw-r--r--chromium/chrome/browser/resources/ntp4/incognito_tab.css52
-rw-r--r--chromium/chrome/browser/resources/ntp4/incognito_tab.html18
-rw-r--r--chromium/chrome/browser/resources/ntp4/nav_dot.css3
-rw-r--r--chromium/chrome/browser/resources/ntp4/new_tab.css3
-rw-r--r--chromium/chrome/browser/resources/ntp4/new_tab.js34
-rw-r--r--chromium/chrome/browser/resources/ntp_android/OWNERS3
-rw-r--r--chromium/chrome/browser/resources/ntp_android/bookmarks.css272
-rw-r--r--chromium/chrome/browser/resources/ntp_android/bookmarks_tablet.css18
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/bookmark_bg_hdpi.pngbin521 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/bookmark_bg_mdpi.pngbin298 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/bookmark_bg_tvdpi.pngbin397 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/bookmark_bg_xhdpi.pngbin641 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/bookmark_border_hdpi.pngbin276 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/bookmark_border_mdpi.pngbin220 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/bookmark_border_tvdpi.pngbin307 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/bookmark_border_xhdpi.pngbin451 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/bookmark_folder_hdpi.pngbin324 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/bookmark_folder_mdpi.pngbin267 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/bookmark_folder_tvdpi.pngbin351 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/bookmark_folder_xhdpi.pngbin480 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/breadcrumb_hdpi.pngbin217 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/breadcrumb_mdpi.pngbin160 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/breadcrumb_tvdpi.pngbin206 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/breadcrumb_xhdpi.pngbin239 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/default_thumbnail.pngbin334 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/disclosure_closed_hdpi.pngbin238 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/disclosure_closed_mdpi.pngbin185 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/disclosure_closed_xhdpi.pngbin270 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/disclosure_open_hdpi.pngbin246 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/disclosure_open_mdpi.pngbin179 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/disclosure_open_xhdpi.pngbin306 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/sent_hdpi.pngbin322 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/sent_mdpi.pngbin240 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/sent_xhdpi.pngbin402 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/syncfographic_hdpi.pngbin5858 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/syncfographic_mdpi.pngbin4221 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/syncfographic_sw600dp_hdpi.pngbin12011 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/syncfographic_sw600dp_mdpi.pngbin7881 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/syncfographic_sw600dp_xhdpi.pngbin16453 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/syncfographic_xhdpi.pngbin7687 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/images/welcome_thumb.pngbin10910 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ntp_android/incognito_tab.css29
-rw-r--r--chromium/chrome/browser/resources/ntp_android/mockdata.js1571
-rw-r--r--chromium/chrome/browser/resources/ntp_android/mostvisited.css107
-rw-r--r--chromium/chrome/browser/resources/ntp_android/mostvisited_tablet.css173
-rw-r--r--chromium/chrome/browser/resources/ntp_android/new_tab.html79
-rw-r--r--chromium/chrome/browser/resources/ntp_android/ntp_android.css87
-rw-r--r--chromium/chrome/browser/resources/ntp_android/ntp_android.js2744
-rw-r--r--chromium/chrome/browser/resources/ntp_android/opentabs.css243
-rw-r--r--chromium/chrome/browser/resources/ntp_android/opentabs_tablet.css61
-rw-r--r--chromium/chrome/browser/resources/omnibox/omnibox.html14
-rw-r--r--chromium/chrome/browser/resources/omnibox/omnibox.js136
-rw-r--r--chromium/chrome/browser/resources/options/OWNERS1
-rw-r--r--chromium/chrome/browser/resources/options/arrow_next.pngbin200 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/options/autofill_edit_address_overlay.html50
-rw-r--r--chromium/chrome/browser/resources/options/autofill_edit_address_overlay.js355
-rw-r--r--chromium/chrome/browser/resources/options/autofill_edit_overlay.css53
-rw-r--r--chromium/chrome/browser/resources/options/autofill_options.html3
-rw-r--r--chromium/chrome/browser/resources/options/autofill_options.js13
-rw-r--r--chromium/chrome/browser/resources/options/autofill_options_list.js45
-rw-r--r--chromium/chrome/browser/resources/options/automatic_settings_reset_banner.html15
-rw-r--r--chromium/chrome/browser/resources/options/automatic_settings_reset_banner.js60
-rw-r--r--chromium/chrome/browser/resources/options/browser_options.css34
-rw-r--r--chromium/chrome/browser/resources/options/browser_options.html285
-rw-r--r--chromium/chrome/browser/resources/options/browser_options.js602
-rw-r--r--chromium/chrome/browser/resources/options/browser_options_profile_list.js24
-rw-r--r--chromium/chrome/browser/resources/options/certificate_manager.html11
-rw-r--r--chromium/chrome/browser/resources/options/certificate_manager.js97
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/accounts_options.html28
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/accounts_options.js4
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/bluetooth.css45
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/bluetooth_add_device_overlay.html3
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/bluetooth_add_device_overlay.js32
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/bluetooth_pair_device_overlay.js74
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/change_picture_options.css12
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/change_picture_options.html14
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/change_picture_options.js48
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/display_options.html9
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/display_options.js23
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/internet_detail.html2
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/internet_detail.js11
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/keyboard_overlay.html20
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/keyboard_overlay.js8
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/network_list.js2
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/third_party_ime_confirm_overlay.css8
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/third_party_ime_confirm_overlay.html21
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/third_party_ime_confirm_overlay.js89
-rw-r--r--chromium/chrome/browser/resources/options/clear_browser_data_overlay.html2
-rw-r--r--chromium/chrome/browser/resources/options/clear_browser_data_overlay.js186
-rw-r--r--chromium/chrome/browser/resources/options/confirm_dialog.js19
-rw-r--r--chromium/chrome/browser/resources/options/content_settings.css11
-rw-r--r--chromium/chrome/browser/resources/options/content_settings.html25
-rw-r--r--chromium/chrome/browser/resources/options/content_settings.js79
-rw-r--r--chromium/chrome/browser/resources/options/content_settings2.html13
-rw-r--r--chromium/chrome/browser/resources/options/content_settings2.js88
-rw-r--r--chromium/chrome/browser/resources/options/content_settings_exceptions_area.html15
-rw-r--r--chromium/chrome/browser/resources/options/content_settings_exceptions_area.js28
-rw-r--r--chromium/chrome/browser/resources/options/controlled_setting.css48
-rw-r--r--chromium/chrome/browser/resources/options/controlled_setting.js37
-rw-r--r--chromium/chrome/browser/resources/options/cookies_view.js4
-rw-r--r--chromium/chrome/browser/resources/options/deletable_item_list.js2
-rw-r--r--chromium/chrome/browser/resources/options/do_not_track_confirm_overlay.html26
-rw-r--r--chromium/chrome/browser/resources/options/font_settings.js4
-rw-r--r--chromium/chrome/browser/resources/options/handler_options.html14
-rw-r--r--chromium/chrome/browser/resources/options/handler_options.js2
-rw-r--r--chromium/chrome/browser/resources/options/handler_options_list.js18
-rw-r--r--chromium/chrome/browser/resources/options/home_page_overlay.html2
-rw-r--r--chromium/chrome/browser/resources/options/hotword_confirm_overlay.css12
-rw-r--r--chromium/chrome/browser/resources/options/hotword_confirm_overlay.html38
-rw-r--r--chromium/chrome/browser/resources/options/hotword_search_setting_indicator.css10
-rw-r--r--chromium/chrome/browser/resources/options/hotword_search_setting_indicator.js115
-rw-r--r--chromium/chrome/browser/resources/options/import_data_overlay.html2
-rw-r--r--chromium/chrome/browser/resources/options/import_data_overlay.js11
-rw-r--r--chromium/chrome/browser/resources/options/language_options.css10
-rw-r--r--chromium/chrome/browser/resources/options/language_options.html19
-rw-r--r--chromium/chrome/browser/resources/options/language_options.js129
-rw-r--r--chromium/chrome/browser/resources/options/manage_profile_overlay.css36
-rw-r--r--chromium/chrome/browser/resources/options/manage_profile_overlay.html27
-rw-r--r--chromium/chrome/browser/resources/options/manage_profile_overlay.js270
-rw-r--r--chromium/chrome/browser/resources/options/managed_user_create_confirm.js21
-rw-r--r--chromium/chrome/browser/resources/options/managed_user_import.css7
-rw-r--r--chromium/chrome/browser/resources/options/managed_user_import.html32
-rw-r--r--chromium/chrome/browser/resources/options/managed_user_import.js107
-rw-r--r--chromium/chrome/browser/resources/options/managed_user_list.js3
-rw-r--r--chromium/chrome/browser/resources/options/managed_user_list_data.js152
-rw-r--r--chromium/chrome/browser/resources/options/media_galleries_list.js59
-rw-r--r--chromium/chrome/browser/resources/options/media_galleries_manager_overlay.html19
-rw-r--r--chromium/chrome/browser/resources/options/media_galleries_manager_overlay.js81
-rw-r--r--chromium/chrome/browser/resources/options/options.html36
-rw-r--r--chromium/chrome/browser/resources/options/options.js45
-rw-r--r--chromium/chrome/browser/resources/options/options_bundle.js16
-rw-r--r--chromium/chrome/browser/resources/options/options_page.css40
-rw-r--r--chromium/chrome/browser/resources/options/options_page.js126
-rw-r--r--chromium/chrome/browser/resources/options/options_settings_app.js1
-rw-r--r--chromium/chrome/browser/resources/options/password_manager_list.js1
-rw-r--r--chromium/chrome/browser/resources/options/pref_ui.js5
-rw-r--r--chromium/chrome/browser/resources/options/preferences.js11
-rw-r--r--chromium/chrome/browser/resources/options/profiles_icon_grid.js3
-rw-r--r--chromium/chrome/browser/resources/options/reset_profile_settings_banner.css77
-rw-r--r--chromium/chrome/browser/resources/options/reset_profile_settings_banner.html2
-rw-r--r--chromium/chrome/browser/resources/options/reset_profile_settings_banner.js59
-rw-r--r--chromium/chrome/browser/resources/options/reset_profile_settings_overlay.html4
-rw-r--r--chromium/chrome/browser/resources/options/reset_profile_settings_overlay.js12
-rw-r--r--chromium/chrome/browser/resources/options/search_engine_manager.css8
-rw-r--r--chromium/chrome/browser/resources/options/search_engine_manager_engine_list.js5
-rw-r--r--chromium/chrome/browser/resources/options/search_page.js15
-rw-r--r--chromium/chrome/browser/resources/options/secondary_user_banner.html11
-rw-r--r--chromium/chrome/browser/resources/options/settings_banner.css85
-rw-r--r--chromium/chrome/browser/resources/options/settings_banner.js86
-rw-r--r--chromium/chrome/browser/resources/options/startup_section.html4
-rw-r--r--chromium/chrome/browser/resources/options/subpages_tab_controls.css14
-rw-r--r--chromium/chrome/browser/resources/options/sync_section.html28
-rw-r--r--chromium/chrome/browser/resources/password_manager_internals/OWNERS2
-rw-r--r--chromium/chrome/browser/resources/password_manager_internals/password_manager_internals.html19
-rw-r--r--chromium/chrome/browser/resources/password_manager_internals/password_manager_internals.js13
-rw-r--r--chromium/chrome/browser/resources/password_manager_internals_resources.grd15
-rw-r--r--chromium/chrome/browser/resources/pdf/background.js37
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/OWNERS3
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/codereview.settings7
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-button/img/hiDPI/button_fit_page.pngbin0 -> 1776 bytes
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-button/img/hiDPI/button_fit_width.pngbin0 -> 1268 bytes
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-button/img/hiDPI/button_play.pngbin0 -> 1087 bytes
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-button/img/hiDPI/button_print.pngbin0 -> 904 bytes
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-button/img/hiDPI/button_save.pngbin0 -> 979 bytes
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-button/img/hiDPI/button_zoom_in.pngbin0 -> 1859 bytes
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-button/img/hiDPI/button_zoom_out.pngbin0 -> 1803 bytes
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-button/img/lowDPI/button_fit_page.pngbin0 -> 999 bytes
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-button/img/lowDPI/button_fit_width.pngbin0 -> 696 bytes
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-button/img/lowDPI/button_play.pngbin0 -> 664 bytes
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-button/img/lowDPI/button_print.pngbin0 -> 797 bytes
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-button/img/lowDPI/button_save.pngbin0 -> 695 bytes
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-button/img/lowDPI/button_zoom_in.pngbin0 -> 1115 bytes
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-button/img/lowDPI/button_zoom_out.pngbin0 -> 1079 bytes
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-button/viewer-button.css37
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-button/viewer-button.html7
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-button/viewer-button.js33
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-error-screen/viewer-error-screen.css18
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-error-screen/viewer-error-screen.html7
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-error-screen/viewer-error-screen.js5
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-page-indicator/viewer-page-indicator.css35
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-page-indicator/viewer-page-indicator.html8
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-page-indicator/viewer-page-indicator.js42
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-password-screen/viewer-password-screen.css41
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-password-screen/viewer-password-screen.html14
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-password-screen/viewer-password-screen.js51
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-progress-bar/viewer-progress-bar.css71
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-progress-bar/viewer-progress-bar.html12
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-progress-bar/viewer-progress-bar.js43
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-toolbar/viewer-toolbar.css21
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-toolbar/viewer-toolbar.html9
-rw-r--r--chromium/chrome/browser/resources/pdf/html_office/elements/viewer-toolbar/viewer-toolbar.js57
-rw-r--r--chromium/chrome/browser/resources/pdf/includes.js12
-rw-r--r--chromium/chrome/browser/resources/pdf/index.css44
-rw-r--r--chromium/chrome/browser/resources/pdf/index.html57
-rw-r--r--chromium/chrome/browser/resources/pdf/manifest.json6
-rw-r--r--chromium/chrome/browser/resources/pdf/pdf.html15
-rw-r--r--chromium/chrome/browser/resources/pdf/pdf.js512
-rw-r--r--chromium/chrome/browser/resources/pdf/pdf_extension_test.cc103
-rw-r--r--chromium/chrome/browser/resources/pdf/pdf_scripting_api.js181
-rw-r--r--chromium/chrome/browser/resources/pdf/polymer_loader.js12
-rw-r--r--chromium/chrome/browser/resources/pdf/viewport.js470
-rw-r--r--chromium/chrome/browser/resources/plugin_metadata/plugins_tv.json15
-rw-r--r--chromium/chrome/browser/resources/plugins.css8
-rw-r--r--chromium/chrome/browser/resources/plugins.html4
-rw-r--r--chromium/chrome/browser/resources/predictors/predictors.html4
-rw-r--r--chromium/chrome/browser/resources/predictors/predictors.js1
-rw-r--r--chromium/chrome/browser/resources/predictors/resource_prefetch_predictor.html49
-rw-r--r--chromium/chrome/browser/resources/predictors/resource_prefetch_predictor.js102
-rw-r--r--chromium/chrome/browser/resources/print_preview/cloud_print_interface.js276
-rw-r--r--chromium/chrome/browser/resources/print_preview/data/app_state.js36
-rw-r--r--chromium/chrome/browser/resources/print_preview/data/cloud_parsers.js11
-rw-r--r--chromium/chrome/browser/resources/print_preview/data/destination.js161
-rw-r--r--chromium/chrome/browser/resources/print_preview/data/destination_store.js609
-rw-r--r--chromium/chrome/browser/resources/print_preview/data/local_parsers.js75
-rw-r--r--chromium/chrome/browser/resources/print_preview/data/print_ticket_store.js62
-rw-r--r--chromium/chrome/browser/resources/print_preview/data/ticket_items/collate.js5
-rw-r--r--chromium/chrome/browser/resources/print_preview/data/ticket_items/color.js90
-rw-r--r--chromium/chrome/browser/resources/print_preview/data/ticket_items/copies.js2
-rw-r--r--chromium/chrome/browser/resources/print_preview/data/ticket_items/media_size.js121
-rw-r--r--chromium/chrome/browser/resources/print_preview/data/user_info.js76
-rw-r--r--chromium/chrome/browser/resources/print_preview/metrics.js10
-rw-r--r--chromium/chrome/browser/resources/print_preview/native_layer.js64
-rw-r--r--chromium/chrome/browser/resources/print_preview/preview_generator.js12
-rw-r--r--chromium/chrome/browser/resources/print_preview/previewarea/margin_control.html2
-rw-r--r--chromium/chrome/browser/resources/print_preview/previewarea/margin_control.js104
-rw-r--r--chromium/chrome/browser/resources/print_preview/previewarea/margin_control_container.js5
-rw-r--r--chromium/chrome/browser/resources/print_preview/previewarea/preview_area.css1
-rw-r--r--chromium/chrome/browser/resources/print_preview/previewarea/preview_area.html3
-rw-r--r--chromium/chrome/browser/resources/print_preview/previewarea/preview_area.js219
-rw-r--r--chromium/chrome/browser/resources/print_preview/print_header.js19
-rw-r--r--chromium/chrome/browser/resources/print_preview/print_preview.css6
-rw-r--r--chromium/chrome/browser/resources/print_preview/print_preview.html2
-rw-r--r--chromium/chrome/browser/resources/print_preview/print_preview.js152
-rw-r--r--chromium/chrome/browser/resources/print_preview/print_preview_animations.js17
-rw-r--r--chromium/chrome/browser/resources/print_preview/search/destination_list.css12
-rw-r--r--chromium/chrome/browser/resources/print_preview/search/destination_list.html6
-rw-r--r--chromium/chrome/browser/resources/print_preview/search/destination_list.js34
-rw-r--r--chromium/chrome/browser/resources/print_preview/search/destination_list_item.css27
-rw-r--r--chromium/chrome/browser/resources/print_preview/search/destination_list_item.html16
-rw-r--r--chromium/chrome/browser/resources/print_preview/search/destination_list_item.js84
-rw-r--r--chromium/chrome/browser/resources/print_preview/search/destination_search.css20
-rw-r--r--chromium/chrome/browser/resources/print_preview/search/destination_search.html7
-rw-r--r--chromium/chrome/browser/resources/print_preview/search/destination_search.js226
-rw-r--r--chromium/chrome/browser/resources/print_preview/search/search_box.js4
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/color_settings.html4
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/color_settings.js1
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/copies_settings.css4
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/copies_settings.html2
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/copies_settings.js30
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/destination_settings.css15
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/destination_settings.html1
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/destination_settings.js50
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/layout_settings.html2
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/layout_settings.js1
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/margin_settings.css2
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/margin_settings.html2
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/margin_settings.js1
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/media_size_settings.css8
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/media_size_settings.html6
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/media_size_settings.js122
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/other_options_settings.html2
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/other_options_settings.js21
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/page_settings.css4
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/page_settings.html2
-rw-r--r--chromium/chrome/browser/resources/print_preview/settings/page_settings.js23
-rw-r--r--chromium/chrome/browser/resources/profiler/profiler.js2
-rw-r--r--chromium/chrome/browser/resources/quick_office/OWNERS2
-rw-r--r--chromium/chrome/browser/resources/quick_office/manifest_editor.json92
-rw-r--r--chromium/chrome/browser/resources/quick_office/manifest_viewing.json90
-rw-r--r--chromium/chrome/browser/resources/quota_internals/message_dispatcher.js2
-rw-r--r--chromium/chrome/browser/resources/quota_internals_resources.grd2
-rw-r--r--chromium/chrome/browser/resources/robot.pngbin24510 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/safe_browsing/images/1x/stop_sign.pngbin0 -> 1455 bytes
-rw-r--r--chromium/chrome/browser/resources/safe_browsing/images/2x/stop_sign.pngbin0 -> 2749 bytes
-rw-r--r--chromium/chrome/browser/resources/safe_browsing/safe_browsing_v3.js45
-rw-r--r--chromium/chrome/browser/resources/signin_internals/signin_index.html24
-rw-r--r--chromium/chrome/browser/resources/signin_internals_resources.grd9
-rw-r--r--chromium/chrome/browser/resources/ssl/blocking.html6
-rw-r--r--chromium/chrome/browser/resources/ssl/images/1x/brokenssl_guard.pngbin0 -> 4650 bytes
-rw-r--r--chromium/chrome/browser/resources/ssl/images/1x/brokenssl_red.pngbin0 -> 1959 bytes
-rw-r--r--chromium/chrome/browser/resources/ssl/images/1x/brokenssl_white.pngbin0 -> 1759 bytes
-rw-r--r--chromium/chrome/browser/resources/ssl/images/1x/brokenssl_yellow.pngbin0 -> 1595 bytes
-rw-r--r--chromium/chrome/browser/resources/ssl/images/2x/brokenssl_guard.pngbin0 -> 13108 bytes
-rw-r--r--chromium/chrome/browser/resources/ssl/images/2x/brokenssl_red.pngbin0 -> 3879 bytes
-rw-r--r--chromium/chrome/browser/resources/ssl/images/2x/brokenssl_white.pngbin0 -> 3509 bytes
-rw-r--r--chromium/chrome/browser/resources/ssl/images/2x/brokenssl_yellow.pngbin0 -> 3146 bytes
-rw-r--r--chromium/chrome/browser/resources/ssl/images/lock_red.pngbin0 -> 1818 bytes
-rw-r--r--chromium/chrome/browser/resources/ssl/interstitial_v2.css249
-rw-r--r--chromium/chrome/browser/resources/ssl/interstitial_v2.html41
-rw-r--r--chromium/chrome/browser/resources/ssl/interstitial_v2.js73
-rw-r--r--chromium/chrome/browser/resources/ssl/roadblock.html24
-rw-r--r--chromium/chrome/browser/resources/ssl/roadblock.js28
-rw-r--r--chromium/chrome/browser/resources/ssl/ssl_errors_common.js5
-rw-r--r--chromium/chrome/browser/resources/ssl/twisty_closed.pngbin101 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ssl/twisty_closed_rtl.pngbin91 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/ssl/twisty_open.pngbin95 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/swiftshader.jpgbin9742 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/sync_file_system_internals/main.css22
-rw-r--r--chromium/chrome/browser/resources/sync_file_system_internals/main.html4
-rw-r--r--chromium/chrome/browser/resources/sync_file_system_internals/sync_service.js4
-rw-r--r--chromium/chrome/browser/resources/sync_file_system_internals/task_log.html14
-rw-r--r--chromium/chrome/browser/resources/sync_file_system_internals/task_log.js58
-rw-r--r--chromium/chrome/browser/resources/sync_file_system_internals_resources.grd3
-rw-r--r--chromium/chrome/browser/resources/sync_internals/OWNERS5
-rw-r--r--chromium/chrome/browser/resources/sync_internals/about.css73
-rw-r--r--chromium/chrome/browser/resources/sync_internals/about.html20
-rw-r--r--chromium/chrome/browser/resources/sync_internals/about.js250
-rw-r--r--chromium/chrome/browser/resources/sync_internals/chrome_sync.js269
-rw-r--r--chromium/chrome/browser/resources/sync_internals/data.js63
-rw-r--r--chromium/chrome/browser/resources/sync_internals/node_browser.html96
-rw-r--r--chromium/chrome/browser/resources/sync_internals/node_browser.js6
-rw-r--r--chromium/chrome/browser/resources/sync_internals/notifications.html25
-rw-r--r--chromium/chrome/browser/resources/sync_internals/notifications.js97
-rw-r--r--chromium/chrome/browser/resources/sync_internals/search.html15
-rw-r--r--chromium/chrome/browser/resources/sync_internals/search.js8
-rw-r--r--chromium/chrome/browser/resources/sync_internals/sync_index.html20
-rw-r--r--chromium/chrome/browser/resources/sync_internals/sync_log.js56
-rw-r--r--chromium/chrome/browser/resources/sync_internals/sync_node_browser.css23
-rw-r--r--chromium/chrome/browser/resources/sync_internals/sync_node_browser.js259
-rw-r--r--chromium/chrome/browser/resources/sync_internals/sync_search.css8
-rw-r--r--chromium/chrome/browser/resources/sync_internals/sync_search.js54
-rw-r--r--chromium/chrome/browser/resources/sync_internals/traffic.html8
-rw-r--r--chromium/chrome/browser/resources/sync_internals/traffic.js22
-rw-r--r--chromium/chrome/browser/resources/sync_internals/types.css23
-rw-r--r--chromium/chrome/browser/resources/sync_internals/types.html51
-rw-r--r--chromium/chrome/browser/resources/sync_internals/types.js92
-rw-r--r--chromium/chrome/browser/resources/sync_internals_resources.grd11
-rw-r--r--chromium/chrome/browser/resources/sync_setup_overlay.css19
-rw-r--r--chromium/chrome/browser/resources/sync_setup_overlay.html15
-rw-r--r--chromium/chrome/browser/resources/sync_setup_overlay.js29
-rw-r--r--chromium/chrome/browser/resources/tab_modal_confirm_dialog.html76
-rw-r--r--chromium/chrome/browser/resources/task_manager/OWNERS1
-rw-r--r--chromium/chrome/browser/resources/task_manager/commands.js58
-rw-r--r--chromium/chrome/browser/resources/task_manager/defines.js51
-rw-r--r--chromium/chrome/browser/resources/task_manager/includes.js91
-rw-r--r--chromium/chrome/browser/resources/task_manager/main.html44
-rw-r--r--chromium/chrome/browser/resources/task_manager/main.js696
-rw-r--r--chromium/chrome/browser/resources/task_manager/measure_time.js30
-rw-r--r--chromium/chrome/browser/resources/task_manager/measure_time_end.js5
-rw-r--r--chromium/chrome/browser/resources/task_manager/preload.js76
-rw-r--r--chromium/chrome/browser/resources/task_manager/task_manager.css144
-rwxr-xr-xchromium/chrome/browser/resources/test_presubmit.py628
-rw-r--r--chromium/chrome/browser/resources/translate.js314
-rw-r--r--chromium/chrome/browser/resources/translate_internals/translate_internals.html6
-rw-r--r--chromium/chrome/browser/resources/translate_internals/translate_internals.js8
-rw-r--r--chromium/chrome/browser/resources/translate_internals_resources.grd2
-rw-r--r--chromium/chrome/browser/resources/twisty_closed.pngbin101 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/twisty_closed_rtl.pngbin91 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/twisty_open.pngbin95 -> 0 bytes
-rw-r--r--chromium/chrome/browser/resources/uber/uber.html2
-rw-r--r--chromium/chrome/browser/resources/uber/uber.js124
-rw-r--r--chromium/chrome/browser/resources/uber/uber_frame.css3
-rw-r--r--chromium/chrome/browser/resources/uber/uber_frame.html9
-rw-r--r--chromium/chrome/browser/resources/uber/uber_frame.js28
-rw-r--r--chromium/chrome/browser/resources/uber/uber_shared.css26
-rw-r--r--chromium/chrome/browser/resources/uber/uber_utils.js83
-rw-r--r--chromium/chrome/browser/resources/user_manager/control_bar.css33
-rw-r--r--chromium/chrome/browser/resources/user_manager/control_bar.html3
-rw-r--r--chromium/chrome/browser/resources/user_manager/user_manager.css87
-rw-r--r--chromium/chrome/browser/resources/user_manager/user_manager.html16
-rw-r--r--chromium/chrome/browser/resources/user_manager/user_manager.js37
-rw-r--r--chromium/chrome/browser/resources/user_manager/user_manager_tutorial.css179
-rw-r--r--chromium/chrome/browser/resources/user_manager/user_manager_tutorial.html71
-rw-r--r--chromium/chrome/browser/resources/user_manager/user_manager_tutorial.js130
-rw-r--r--chromium/chrome/browser/resources/web_dev_style/OWNERS2
-rw-r--r--chromium/chrome/browser/resources/web_dev_style/css_checker.py372
-rw-r--r--chromium/chrome/browser/resources/web_dev_style/js_checker.py242
-rw-r--r--chromium/chrome/browser/search_engines/prepopulated_engines.gyp24
-rw-r--r--chromium/chrome/browser/search_engines/prepopulated_engines.json1397
-rw-r--r--chromium/chrome/browser/search_engines/prepopulated_engines_schema.json91
-rw-r--r--chromium/chrome/browser/ui/libgtk2ui/libgtk2ui.gyp40
-rw-r--r--chromium/chrome/browser_tests.isolate63
-rw-r--r--chromium/chrome/chrome.gyp342
-rw-r--r--chromium/chrome/chrome.isolate28
-rw-r--r--chromium/chrome/chrome_android.gypi79
-rw-r--r--chromium/chrome/chrome_android_paks.gypi10
-rw-r--r--chromium/chrome/chrome_browser.gypi1816
-rw-r--r--chromium/chrome/chrome_browser_chromeos.gypi532
-rw-r--r--chromium/chrome/chrome_browser_extensions.gypi459
-rw-r--r--chromium/chrome/chrome_browser_ui.gypi1156
-rw-r--r--chromium/chrome/chrome_browser_ui_views.gyp3
-rw-r--r--chromium/chrome/chrome_common.gypi734
-rw-r--r--chromium/chrome/chrome_debugger.gypi120
-rw-r--r--chromium/chrome/chrome_dll.gypi96
-rw-r--r--chromium/chrome/chrome_dll_bundle.gypi23
-rw-r--r--chromium/chrome/chrome_exe.gypi167
-rw-r--r--chromium/chrome/chrome_installer.gypi197
-rw-r--r--chromium/chrome/chrome_installer_util.gypi13
-rw-r--r--chromium/chrome/chrome_nibs.gyp16
-rw-r--r--chromium/chrome/chrome_nibs.gypi6
-rw-r--r--chromium/chrome/chrome_plugin.gypi26
-rw-r--r--chromium/chrome/chrome_process_finder.gypi8
-rw-r--r--chromium/chrome/chrome_renderer.gypi201
-rw-r--r--chromium/chrome/chrome_repack_chrome.gypi19
-rw-r--r--chromium/chrome/chrome_repack_chrome_100_percent.gypi15
-rw-r--r--chromium/chrome/chrome_repack_chrome_200_percent.gypi15
-rw-r--r--chromium/chrome/chrome_repack_chrome_touch_100_percent.gypi28
-rw-r--r--chromium/chrome/chrome_repack_locales.gypi25
-rw-r--r--chromium/chrome/chrome_repack_pseudo_locales.gypi39
-rw-r--r--chromium/chrome/chrome_repack_resources.gypi22
-rw-r--r--chromium/chrome/chrome_resources.gyp198
-rw-r--r--chromium/chrome/chrome_syzygy.gyp128
-rw-r--r--chromium/chrome/chrome_syzygy.gypi10
-rw-r--r--chromium/chrome/chrome_tests.gypi1308
-rw-r--r--chromium/chrome/chrome_tests_unit.gypi1161
-rw-r--r--chromium/chrome/chrome_utility.gypi166
-rw-r--r--chromium/chrome/chrome_web_ui_mojo_bindings.gyp19
-rw-r--r--chromium/chrome/common/common_resources.grd8
-rw-r--r--chromium/chrome/common/extensions/api/_api_features.json295
-rw-r--r--chromium/chrome/common/extensions/api/_manifest_features.json233
-rw-r--r--chromium/chrome/common/extensions/api/_permission_features.json467
-rw-r--r--chromium/chrome/common/extensions/api/accessibility_features.json48
-rw-r--r--chromium/chrome/common/extensions/api/accessibility_private.json349
-rw-r--r--chromium/chrome/common/extensions/api/activity_log_private.json14
-rw-r--r--chromium/chrome/common/extensions/api/adview.json12
-rw-r--r--chromium/chrome/common/extensions/api/api.gyp328
-rw-r--r--chromium/chrome/common/extensions/api/bluetooth_private.json190
-rw-r--r--chromium/chrome/common/extensions/api/bookmark_manager_private.json157
-rw-r--r--chromium/chrome/common/extensions/api/bookmarks.json93
-rw-r--r--chromium/chrome/common/extensions/api/browser_action.json2
-rw-r--r--chromium/chrome/common/extensions/api/chromeos_info_private.json38
-rw-r--r--chromium/chrome/common/extensions/api/content_settings.json6
-rw-r--r--chromium/chrome/common/extensions/api/context_menus.json87
-rw-r--r--chromium/chrome/common/extensions/api/context_menus_internal.json98
-rw-r--r--chromium/chrome/common/extensions/api/debugger.json20
-rw-r--r--chromium/chrome/common/extensions/api/declarative_content.json2
-rw-r--r--chromium/chrome/common/extensions/api/declarative_web_request.json6
-rw-r--r--chromium/chrome/common/extensions/api/devtools/experimental_audits.json4
-rw-r--r--chromium/chrome/common/extensions/api/devtools/panels.json15
-rw-r--r--chromium/chrome/common/extensions/api/events.json6
-rw-r--r--chromium/chrome/common/extensions/api/experimental_accessibility.json337
-rw-r--r--chromium/chrome/common/extensions/api/extension.json16
-rw-r--r--chromium/chrome/common/extensions/api/gcm.json38
-rw-r--r--chromium/chrome/common/extensions/api/guest_view_internal.json31
-rw-r--r--chromium/chrome/common/extensions/api/history.json2
-rw-r--r--chromium/chrome/common/extensions/api/i18n.json15
-rw-r--r--chromium/chrome/common/extensions/api/input_ime.json12
-rw-r--r--chromium/chrome/common/extensions/api/input_method_private.json49
-rw-r--r--chromium/chrome/common/extensions/api/management.json121
-rw-r--r--chromium/chrome/common/extensions/api/manifest_types.json166
-rw-r--r--chromium/chrome/common/extensions/api/metrics_private.json16
-rw-r--r--chromium/chrome/common/extensions/api/networking_private.json164
-rw-r--r--chromium/chrome/common/extensions/api/page_capture.json2
-rw-r--r--chromium/chrome/common/extensions/api/permissions.json10
-rw-r--r--chromium/chrome/common/extensions/api/preferences_private.json23
-rw-r--r--chromium/chrome/common/extensions/api/privacy.json2
-rw-r--r--chromium/chrome/common/extensions/api/processes.json13
-rw-r--r--chromium/chrome/common/extensions/api/proxy.json4
-rw-r--r--chromium/chrome/common/extensions/api/reading_list_private.json96
-rw-r--r--chromium/chrome/common/extensions/api/runtime.json474
-rw-r--r--chromium/chrome/common/extensions/api/sessions.json28
-rw-r--r--chromium/chrome/common/extensions/api/storage.json219
-rw-r--r--chromium/chrome/common/extensions/api/streams_private.json48
-rw-r--r--chromium/chrome/common/extensions/api/tabs.json69
-rw-r--r--chromium/chrome/common/extensions/api/test.json376
-rw-r--r--chromium/chrome/common/extensions/api/test_presubmit/invalid_json_1.json8
-rw-r--r--chromium/chrome/common/extensions/api/test_presubmit/invalid_json_2.json8
-rw-r--r--chromium/chrome/common/extensions/api/test_presubmit/invalid_json_3.json8
-rw-r--r--chromium/chrome/common/extensions/api/test_presubmit/invalid_json_4.json8
-rw-r--r--chromium/chrome/common/extensions/api/test_presubmit/valid_json.json11
-rw-r--r--chromium/chrome/common/extensions/api/tts.json4
-rw-r--r--chromium/chrome/common/extensions/api/tts_engine.json2
-rw-r--r--chromium/chrome/common/extensions/api/types.json2
-rw-r--r--chromium/chrome/common/extensions/api/virtual_keyboard_private.json41
-rw-r--r--chromium/chrome/common/extensions/api/web_navigation.json6
-rw-r--r--chromium/chrome/common/extensions/api/web_request.json2
-rw-r--r--chromium/chrome/common/extensions/api/web_request_internal.json3
-rw-r--r--chromium/chrome/common/extensions/api/webstore.json36
-rw-r--r--chromium/chrome/common/extensions/api/webstore_private.json45
-rw-r--r--chromium/chrome/common/extensions/api/webview.json476
-rw-r--r--chromium/chrome/common/extensions/api/webview_request.json2
-rw-r--r--chromium/chrome/common/extensions/api/webview_tag.json247
-rw-r--r--chromium/chrome/common/extensions/api/windows.json28
-rw-r--r--chromium/chrome/common/extensions/docs/examples/api/fontSettings/manifest.json2
-rw-r--r--chromium/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/manifest.json5
-rw-r--r--chromium/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/manifest.json27
-rw-r--r--chromium/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/manifest.json7
-rw-r--r--chromium/chrome/common/extensions/docs/examples/apps/calculator/app/manifest.json5
-rw-r--r--chromium/chrome/common/extensions/docs/examples/extensions/benchmark/manifest.json19
-rw-r--r--chromium/chrome/common/extensions/docs/server2/known_broken_links.json41
-rw-r--r--chromium/chrome/common/extensions/docs/server2/test_data/branch_utility/second.json1113
-rw-r--r--chromium/chrome/common/extensions/docs/server2/test_data/file_system/stat_result.json1
-rw-r--r--chromium/chrome/common/extensions/docs/server2/test_data/github_file_system/expected_list.json2
-rw-r--r--chromium/chrome/common/extensions/docs/server2/test_data/test_json/fake_data_source.json112
-rw-r--r--chromium/chrome/common/extensions/docs/templates/json/apps_sidenav.json88
-rw-r--r--chromium/chrome/common/extensions/docs/templates/json/chrome_sidenav.json1085
-rw-r--r--chromium/chrome/common/extensions/docs/templates/json/content_providers.json42
-rw-r--r--chromium/chrome/common/extensions/docs/templates/json/extensions_sidenav.json84
-rw-r--r--chromium/chrome/common/extensions/docs/templates/json/intro_tables.json72
-rw-r--r--chromium/chrome/common/extensions/docs/templates/json/manifest.json27
-rw-r--r--chromium/chrome/common/extensions/docs/templates/json/permissions.json7
-rw-r--r--chromium/chrome/common/extensions/docs/templates/json/whats_new.json367
-rw-r--r--chromium/chrome/common/extensions/docs/templates/public/apps/redirects.json19
-rw-r--r--chromium/chrome/common/extensions/docs/templates/public/extensions/redirects.json17
-rw-r--r--chromium/chrome/common/extensions/docs/templates/public/redirects.json7
-rw-r--r--chromium/chrome/common/extensions_api_resources.grd9
-rw-r--r--chromium/chrome/common/localized_error.cc879
-rw-r--r--chromium/chrome/common/localized_error.h85
-rw-r--r--chromium/chrome/common/net/net_error_info.cc45
-rw-r--r--chromium/chrome/common/net/net_error_info.h94
-rw-r--r--chromium/chrome/common/web_app_schema.json58
-rw-r--r--chromium/chrome/common_constants.gyp18
-rw-r--r--chromium/chrome/content_gl_tests.isolate34
-rw-r--r--chromium/chrome/gl_tests.isolate20
-rw-r--r--chromium/chrome/gles2_conform_test.isolate35
-rw-r--r--chromium/chrome/installer/installer_tools.gyp2
-rw-r--r--chromium/chrome/installer/mini_installer.gyp23
-rw-r--r--chromium/chrome/installer/mini_installer.gypi29
-rw-r--r--chromium/chrome/installer/mini_installer_syzygy.gyp4
-rw-r--r--chromium/chrome/installer/upgrade_test.gyp2
-rw-r--r--chromium/chrome/interactive_ui_tests.isolate15
-rw-r--r--chromium/chrome/js_unittest_rules.gypi5
-rw-r--r--chromium/chrome/policy_templates.gypi5
-rw-r--r--chromium/chrome/renderer/resources/extensions/OWNERS18
-rw-r--r--chromium/chrome/renderer/resources/extensions/ad_view.js498
-rw-r--r--chromium/chrome/renderer/resources/extensions/ad_view_deny.js11
-rw-r--r--chromium/chrome/renderer/resources/extensions/app_custom_bindings.js6
-rw-r--r--chromium/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js56
-rw-r--r--chromium/chrome/renderer/resources/extensions/app_window_custom_bindings.js243
-rw-r--r--chromium/chrome/renderer/resources/extensions/automation/automation_event.js26
-rw-r--r--chromium/chrome/renderer/resources/extensions/automation/automation_node.js400
-rw-r--r--chromium/chrome/renderer/resources/extensions/automation_custom_bindings.js128
-rw-r--r--chromium/chrome/renderer/resources/extensions/binding.js434
-rw-r--r--chromium/chrome/renderer/resources/extensions/bluetooth_custom_bindings.js158
-rw-r--r--chromium/chrome/renderer/resources/extensions/cast_streaming_rtp_stream_custom_bindings.js16
-rw-r--r--chromium/chrome/renderer/resources/extensions/cast_streaming_udp_transport_custom_bindings.js6
-rw-r--r--chromium/chrome/renderer/resources/extensions/context_menus_custom_bindings.js101
-rw-r--r--chromium/chrome/renderer/resources/extensions/developer_private_custom_bindings.js27
-rw-r--r--chromium/chrome/renderer/resources/extensions/enterprise_platform_keys/OWNERS1
-rw-r--r--chromium/chrome/renderer/resources/extensions/enterprise_platform_keys/internal_api.js11
-rw-r--r--chromium/chrome/renderer/resources/extensions/enterprise_platform_keys/key.js75
-rw-r--r--chromium/chrome/renderer/resources/extensions/enterprise_platform_keys/key_pair.js35
-rw-r--r--chromium/chrome/renderer/resources/extensions/enterprise_platform_keys/subtle_crypto.js185
-rw-r--r--chromium/chrome/renderer/resources/extensions/enterprise_platform_keys/token.js19
-rw-r--r--chromium/chrome/renderer/resources/extensions/enterprise_platform_keys/utils.js16
-rw-r--r--chromium/chrome/renderer/resources/extensions/enterprise_platform_keys_custom_bindings.js32
-rw-r--r--chromium/chrome/renderer/resources/extensions/entry_id_manager.js52
-rw-r--r--chromium/chrome/renderer/resources/extensions/event.js513
-rw-r--r--chromium/chrome/renderer/resources/extensions/experimental.offscreenTabs_custom_bindings.js63
-rw-r--r--chromium/chrome/renderer/resources/extensions/extension_custom_bindings.js113
-rw-r--r--chromium/chrome/renderer/resources/extensions/file_browser_private_custom_bindings.js28
-rw-r--r--chromium/chrome/renderer/resources/extensions/file_system_custom_bindings.js29
-rw-r--r--chromium/chrome/renderer/resources/extensions/file_system_provider_custom_bindings.js168
-rw-r--r--chromium/chrome/renderer/resources/extensions/gcm_custom_bindings.js6
-rw-r--r--chromium/chrome/renderer/resources/extensions/greasemonkey_api.js82
-rw-r--r--chromium/chrome/renderer/resources/extensions/i18n_custom_bindings.js36
-rw-r--r--chromium/chrome/renderer/resources/extensions/image_util.js82
-rw-r--r--chromium/chrome/renderer/resources/extensions/inject_app_titlebar.js2
-rw-r--r--chromium/chrome/renderer/resources/extensions/input.ime_custom_bindings.js8
-rw-r--r--chromium/chrome/renderer/resources/extensions/json_schema.js524
-rw-r--r--chromium/chrome/renderer/resources/extensions/last_error.js82
-rw-r--r--chromium/chrome/renderer/resources/extensions/media_galleries_custom_bindings.js105
-rw-r--r--chromium/chrome/renderer/resources/extensions/messaging.js379
-rw-r--r--chromium/chrome/renderer/resources/extensions/messaging_utils.js53
-rw-r--r--chromium/chrome/renderer/resources/extensions/notifications_custom_bindings.gtestjs104
-rw-r--r--chromium/chrome/renderer/resources/extensions/notifications_custom_bindings.js77
-rw-r--r--chromium/chrome/renderer/resources/extensions/notifications_test_util.js53
-rw-r--r--chromium/chrome/renderer/resources/extensions/pepper_request.js54
-rw-r--r--chromium/chrome/renderer/resources/extensions/permissions_custom_bindings.js98
-rw-r--r--chromium/chrome/renderer/resources/extensions/platform_app.css35
-rw-r--r--chromium/chrome/renderer/resources/extensions/platform_app.js138
-rw-r--r--chromium/chrome/renderer/resources/extensions/runtime_custom_bindings.js205
-rw-r--r--chromium/chrome/renderer/resources/extensions/schema_utils.js156
-rw-r--r--chromium/chrome/renderer/resources/extensions/searchbox_api.js26
-rw-r--r--chromium/chrome/renderer/resources/extensions/send_request.js164
-rw-r--r--chromium/chrome/renderer/resources/extensions/set_icon.js131
-rw-r--r--chromium/chrome/renderer/resources/extensions/storage_area.js40
-rw-r--r--chromium/chrome/renderer/resources/extensions/test_custom_bindings.js346
-rw-r--r--chromium/chrome/renderer/resources/extensions/unload_event.js33
-rw-r--r--chromium/chrome/renderer/resources/extensions/utils.js56
-rw-r--r--chromium/chrome/renderer/resources/extensions/web_request_internal_custom_bindings.js102
-rw-r--r--chromium/chrome/renderer/resources/extensions/web_view.js1100
-rw-r--r--chromium/chrome/renderer/resources/extensions/web_view_events.js591
-rw-r--r--chromium/chrome/renderer/resources/extensions/web_view_experimental.js332
-rw-r--r--chromium/chrome/renderer/resources/extensions/webstore_custom_bindings.js57
-rw-r--r--chromium/chrome/renderer/resources/extensions/webview_custom_bindings.js130
-rw-r--r--chromium/chrome/renderer/resources/extensions/window_controls.js2
-rw-r--r--chromium/chrome/renderer/resources/neterror.css77
-rw-r--r--chromium/chrome/renderer/resources/neterror.html32
-rw-r--r--chromium/chrome/renderer/resources/neterror.js53
-rw-r--r--chromium/chrome/renderer/resources/plugin_placeholders.css2
-rw-r--r--chromium/chrome/renderer/resources/renderer_resources.grd57
-rw-r--r--chromium/chrome/sync_integration_tests.isolate5
-rw-r--r--chromium/chrome/tab_capture_end2end_tests.isolate25
-rw-r--r--chromium/chrome/tab_capture_performance_tests.isolate29
-rw-r--r--chromium/chrome/telemetry.isolate40
-rw-r--r--chromium/chrome/telemetry_gpu_test.isolate28
-rw-r--r--chromium/chrome/test/data/nacl/nacl_test_data.gyp696
-rw-r--r--chromium/chrome/test/security_tests/security_tests.gyp22
-rw-r--r--chromium/chrome/third_party/chromevox/README.chromium10
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/am/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/ar/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/bg/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/ca/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/cs/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/da/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/de/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/el/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/en/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/en_GB/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/es/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/es_419/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/et/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/fi/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/fr/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/he/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/hi/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/hr/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/hu/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/id/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/it/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/ja/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/ko/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/lt/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/lv/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/nl/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/pl/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/pt_BR/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/pt_PT/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/ro/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/ru/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/sk/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/sl/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/sr/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/sv/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/sw/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/th/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/tr/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/uk/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/vi/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/zh_CN/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/_locales/zh_TW/messages.json1
-rw-r--r--chromium/chrome/third_party/chromevox/chromeVoxChromeBackgroundScript.js960
-rw-r--r--chromium/chrome/third_party/chromevox/chromeVoxChromeOptionsScript.js900
-rw-r--r--chromium/chrome/third_party/chromevox/chromeVoxChromePageScript.js1109
-rw-r--r--chromium/chrome/third_party/chromevox/chromeVoxKbExplorerScript.js19
-rw-r--r--chromium/chrome/third_party/chromevox/chromevox.gyp127
-rw-r--r--chromium/chrome/third_party/chromevox/chromevox/background/earcons/chalk.oggbin8458 -> 0 bytes
-rw-r--r--chromium/chrome/third_party/chromevox/chromevox/background/earcons/scrolling.oggbin17250 -> 0 bytes
-rw-r--r--chromium/chrome/third_party/chromevox/chromevox/background/earcons/scrolling_reverse.oggbin14727 -> 0 bytes
-rw-r--r--chromium/chrome/third_party/chromevox/chromevox/background/kbexplorer.html22
-rw-r--r--chromium/chrome/third_party/chromevox/chromevox/background/keymaps/classic_keymap.json543
-rw-r--r--chromium/chrome/third_party/chromevox/chromevox/background/keymaps/flat_keymap.json612
-rw-r--r--chromium/chrome/third_party/chromevox/chromevox/background/mathmaps/math_map.js199
-rw-r--r--chromium/chrome/third_party/chromevox/chromevox/background/options.css6
-rw-r--r--chromium/chrome/third_party/chromevox/chromevox/background/options.html108
-rw-r--r--chromium/chrome/third_party/chromevox/chromevox/background/tests.html19
-rw-r--r--chromium/chrome/third_party/chromevox/chromevox/injected/api.js602
-rw-r--r--chromium/chrome/third_party/chromevox/chromevox/injected/api_util.js102
-rw-r--r--chromium/chrome/third_party/chromevox/chromevox/injected/mathjax.js17
-rw-r--r--chromium/chrome/third_party/chromevox/chromevox/injected/mathjax_external_util.js1
-rw-r--r--chromium/chrome/third_party/chromevox/closure/base.js1750
-rw-r--r--chromium/chrome/third_party/chromevox/closure/closure_preinit.js105
-rw-r--r--chromium/chrome/third_party/chromevox/extensions/searchvox/abstract_result.js49
-rw-r--r--chromium/chrome/third_party/chromevox/extensions/searchvox/constants.js28
-rw-r--r--chromium/chrome/third_party/chromevox/extensions/searchvox/context_menu.js139
-rw-r--r--chromium/chrome/third_party/chromevox/extensions/searchvox/results.js466
-rw-r--r--chromium/chrome/third_party/chromevox/extensions/searchvox/search.js437
-rw-r--r--chromium/chrome/third_party/chromevox/extensions/searchvox/search_tools.js206
-rw-r--r--chromium/chrome/third_party/chromevox/extensions/searchvox/util.js181
-rw-r--r--chromium/chrome/third_party/chromevox/third_party/closure-library/LICENSE176
-rw-r--r--chromium/chrome/third_party/chromevox/third_party/closure-library/README.chromium19
-rw-r--r--chromium/chrome/third_party/chromevox/third_party/closure-library/closure/bin/build/depstree.py189
-rw-r--r--chromium/chrome/third_party/chromevox/third_party/closure-library/closure/bin/build/source.py118
-rwxr-xr-xchromium/chrome/third_party/chromevox/third_party/closure-library/closure/bin/build/treescan.py78
-rw-r--r--chromium/chrome/third_party/chromevox/third_party/closure-library/closure/goog/asserts/asserts.js316
-rw-r--r--chromium/chrome/third_party/chromevox/third_party/closure-library/closure/goog/base.js1706
-rw-r--r--chromium/chrome/third_party/chromevox/third_party/closure-library/closure/goog/debug/error.js54
-rw-r--r--chromium/chrome/third_party/chromevox/third_party/closure-library/closure/goog/dom/nodetype.js48
-rw-r--r--chromium/chrome/third_party/chromevox/third_party/closure-library/closure/goog/i18n/messageformat.js764
-rw-r--r--chromium/chrome/third_party/chromevox/third_party/closure-library/closure/goog/i18n/ordinalrules.js733
-rw-r--r--chromium/chrome/third_party/chromevox/third_party/closure-library/closure/goog/i18n/pluralrules.js1100
-rw-r--r--chromium/chrome/third_party/chromevox/third_party/closure-library/closure/goog/object/object.js637
-rw-r--r--chromium/chrome/third_party/chromevox/third_party/closure-library/closure/goog/string/string.js47
-rwxr-xr-xchromium/chrome/tools/build/repack_locales.py51
-rwxr-xr-xchromium/chrome/tools/build/version.py197
-rw-r--r--chromium/chrome/tools/profile_reset/jtl_compiler.gyp2
-rw-r--r--chromium/chrome/unit_tests.isolate20
-rw-r--r--chromium/chrome/version.gypi18
-rw-r--r--chromium/chrome/version_resource_rules.gypi4
-rw-r--r--chromium/chrome_elf/DEPS2
-rw-r--r--chromium/chrome_elf/OWNERS3
-rw-r--r--chromium/chrome_elf/README15
-rw-r--r--chromium/chrome_elf/blacklist.gypi66
-rw-r--r--chromium/chrome_elf/blacklist/OWNERS3
-rw-r--r--chromium/chrome_elf/blacklist/blacklist.cc427
-rw-r--r--chromium/chrome_elf/blacklist/blacklist.h78
-rw-r--r--chromium/chrome_elf/blacklist/blacklist_interceptions.cc276
-rw-r--r--chromium/chrome_elf/blacklist/blacklist_interceptions.h43
-rw-r--r--chromium/chrome_elf/breakpad.cc178
-rw-r--r--chromium/chrome_elf/breakpad.h34
-rw-r--r--chromium/chrome_elf/chrome_elf.def6
-rw-r--r--chromium/chrome_elf/chrome_elf.gyp166
-rw-r--r--chromium/chrome_elf/chrome_elf.ver2
-rw-r--r--chromium/chrome_elf/chrome_elf_constants.cc28
-rw-r--r--chromium/chrome_elf/chrome_elf_constants.h51
-rw-r--r--chromium/chrome_elf/chrome_elf_main.cc19
-rw-r--r--chromium/chrome_elf/chrome_elf_main.h2
-rw-r--r--chromium/chrome_elf/chrome_elf_util.cc209
-rw-r--r--chromium/chrome_elf/chrome_elf_util.h31
-rw-r--r--chromium/chrome_elf/chrome_elf_util_unittest.cc186
-rw-r--r--chromium/chrome_elf/chrome_exe_manifest.template10
-rw-r--r--chromium/chrome_elf/chrome_exe_manifest_action.gypi34
-rw-r--r--chromium/chrome_elf/chrome_redirects.def9
-rw-r--r--chromium/chrome_elf/chrome_redirects_main.cc14
-rw-r--r--chromium/chrome_elf/create_file/chrome_create_file.cc330
-rw-r--r--chromium/chrome_elf/create_file/chrome_create_file.h41
-rw-r--r--chromium/chrome_elf/create_file/chrome_create_file_unittest.cc408
-rw-r--r--chromium/chrome_elf/dll_hash.gypi31
-rw-r--r--chromium/chrome_elf/dll_hash/dll_hash.cc14
-rw-r--r--chromium/chrome_elf/dll_hash/dll_hash.h13
-rw-r--r--chromium/chrome_elf/dll_hash/dll_hash_main.cc28
-rw-r--r--chromium/chrome_elf/elf_imports_unittest.cc101
-rw-r--r--chromium/chrome_elf/ntdll_cache.cc110
-rw-r--r--chromium/chrome_elf/ntdll_cache.h6
-rw-r--r--chromium/chrome_elf/thunk_getter.cc142
-rw-r--r--chromium/chrome_elf/thunk_getter.h16
-rw-r--r--chromium/chrome_elf/version_assembly_manifest.template8
-rw-r--r--chromium/chrome_elf/version_assembly_manifest_action.gypi37
-rw-r--r--chromium/chrome_frame/chrome_frame.gyp942
-rw-r--r--chromium/chrome_frame/chrome_frame_launcher.gyp200
-rw-r--r--chromium/chrome_frame/crash_reporting/crash_reporting.gyp113
-rw-r--r--chromium/chrome_frame/locales/locales.gyp355
-rw-r--r--chromium/chromecast/OWNERS3
-rw-r--r--chromium/chromeos/chromeos.gyp166
-rw-r--r--chromium/chromeos/chromeos_memory.gypi26
-rw-r--r--chromium/cloud_print/cloud_print.gyp2
-rw-r--r--chromium/cloud_print/cloud_print_resources.gyp6
-rw-r--r--chromium/cloud_print/service/service.gyp1
-rw-r--r--chromium/cloud_print/virtual_driver/win/virtual_driver64.gyp2
-rw-r--r--chromium/codereview.settings1
-rw-r--r--chromium/components/DEPS21
-rw-r--r--chromium/components/OWNERS72
-rw-r--r--chromium/components/README35
-rw-r--r--chromium/components/auto_login_parser/OWNERS1
-rw-r--r--chromium/components/auto_login_parser/auto_login_parser.cc82
-rw-r--r--chromium/components/auto_login_parser/auto_login_parser.h50
-rw-r--r--chromium/components/auto_login_parser/auto_login_parser_unittest.cc92
-rw-r--r--chromium/components/autocomplete.gypi22
-rw-r--r--chromium/components/autofill.gypi133
-rw-r--r--chromium/components/autofill/DEPS12
-rw-r--r--chromium/components/autofill/OWNERS8
-rw-r--r--chromium/components/autofill/README23
-rw-r--r--chromium/components/autofill/content/DEPS13
-rw-r--r--chromium/components/autofill/content/browser/DEPS40
-rw-r--r--chromium/components/autofill/content/browser/autofill_driver_impl.cc243
-rw-r--r--chromium/components/autofill/content/browser/autofill_driver_impl.h109
-rw-r--r--chromium/components/autofill/content/browser/autofill_driver_impl_unittest.cc293
-rw-r--r--chromium/components/autofill/content/browser/request_autocomplete_manager.cc80
-rw-r--r--chromium/components/autofill/content/browser/request_autocomplete_manager.h59
-rw-r--r--chromium/components/autofill/content/browser/request_autocomplete_manager_unittest.cc164
-rw-r--r--chromium/components/autofill/content/browser/risk/fingerprint.cc551
-rw-r--r--chromium/components/autofill/content/browser/risk/fingerprint.h67
-rw-r--r--chromium/components/autofill/content/browser/risk/proto/fingerprint.proto224
-rw-r--r--chromium/components/autofill/content/browser/wallet/OWNERS1
-rw-r--r--chromium/components/autofill/content/browser/wallet/form_field_error.cc154
-rw-r--r--chromium/components/autofill/content/browser/wallet/form_field_error.h88
-rw-r--r--chromium/components/autofill/content/browser/wallet/full_wallet.cc323
-rw-r--r--chromium/components/autofill/content/browser/wallet/full_wallet.h151
-rw-r--r--chromium/components/autofill/content/browser/wallet/full_wallet_unittest.cc530
-rw-r--r--chromium/components/autofill/content/browser/wallet/gaia_account.cc85
-rw-r--r--chromium/components/autofill/content/browser/wallet/gaia_account.h59
-rw-r--r--chromium/components/autofill/content/browser/wallet/instrument.cc125
-rw-r--r--chromium/components/autofill/content/browser/wallet/instrument.h104
-rw-r--r--chromium/components/autofill/content/browser/wallet/instrument_unittest.cc66
-rw-r--r--chromium/components/autofill/content/browser/wallet/mock_wallet_client.cc29
-rw-r--r--chromium/components/autofill/content/browser/wallet/mock_wallet_client.h63
-rw-r--r--chromium/components/autofill/content/browser/wallet/required_action.cc66
-rw-r--r--chromium/components/autofill/content/browser/wallet/required_action.h44
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_address.cc359
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_address.h207
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_address_unittest.cc478
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_client.cc815
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_client.h272
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_client_delegate.h85
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_client_unittest.cc1755
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_items.cc594
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_items.h333
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_items_unittest.cc620
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_service_url.cc190
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_service_url.h52
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_service_url_unittest.cc136
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_signin_helper.cc175
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_signin_helper.h83
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_signin_helper_delegate.h35
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_signin_helper_unittest.cc169
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_test_util.cc296
-rw-r--r--chromium/components/autofill/content/browser/wallet/wallet_test_util.h65
-rw-r--r--chromium/components/autofill/content/common/DEPS4
-rw-r--r--chromium/components/autofill/content/common/OWNERS9
-rw-r--r--chromium/components/autofill/content/common/autofill_message_generator.cc39
-rw-r--r--chromium/components/autofill/content/common/autofill_message_generator.h7
-rw-r--r--chromium/components/autofill/content/common/autofill_messages.h262
-rw-r--r--chromium/components/autofill/content/common/autofill_param_traits_macros.h46
-rw-r--r--chromium/components/autofill/content/renderer/DEPS4
-rw-r--r--chromium/components/autofill/content/renderer/autofill_agent.cc652
-rw-r--r--chromium/components/autofill/content/renderer/autofill_agent.h240
-rw-r--r--chromium/components/autofill/content/renderer/form_autofill_util.cc1160
-rw-r--r--chromium/components/autofill/content/renderer/form_autofill_util.h172
-rw-r--r--chromium/components/autofill/content/renderer/form_cache.cc306
-rw-r--r--chromium/components/autofill/content/renderer/form_cache.h77
-rw-r--r--chromium/components/autofill/content/renderer/page_click_listener.h36
-rw-r--r--chromium/components/autofill/content/renderer/page_click_tracker.cc146
-rw-r--r--chromium/components/autofill/content/renderer/page_click_tracker.h71
-rw-r--r--chromium/components/autofill/content/renderer/password_autofill_agent.cc811
-rw-r--r--chromium/components/autofill/content/renderer/password_autofill_agent.h167
-rw-r--r--chromium/components/autofill/content/renderer/password_form_conversion_utils.cc62
-rw-r--r--chromium/components/autofill/content/renderer/password_form_conversion_utils.h27
-rw-r--r--chromium/components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc91
-rw-r--r--chromium/components/autofill/content/renderer/password_generation_agent.cc274
-rw-r--r--chromium/components/autofill/content/renderer/password_generation_agent.h84
-rw-r--r--chromium/components/autofill/content/renderer/test_password_autofill_agent.cc20
-rw-r--r--chromium/components/autofill/content/renderer/test_password_autofill_agent.h27
-rw-r--r--chromium/components/autofill/core/DEPS16
-rw-r--r--chromium/components/autofill/core/browser/DEPS54
-rw-r--r--chromium/components/autofill/core/browser/address.cc216
-rw-r--r--chromium/components/autofill/core/browser/address.h66
-rw-r--r--chromium/components/autofill/core/browser/address_field.cc230
-rw-r--r--chromium/components/autofill/core/browser/address_field.h67
-rw-r--r--chromium/components/autofill/core/browser/address_field_unittest.cc269
-rw-r--r--chromium/components/autofill/core/browser/address_unittest.cc350
-rw-r--r--chromium/components/autofill/core/browser/android/auxiliary_profile_loader_android.cc122
-rw-r--r--chromium/components/autofill/core/browser/android/auxiliary_profile_loader_android.h75
-rw-r--r--chromium/components/autofill/core/browser/android/auxiliary_profile_unittest_android.cc163
-rw-r--r--chromium/components/autofill/core/browser/android/auxiliary_profiles_android.cc122
-rw-r--r--chromium/components/autofill/core/browser/android/auxiliary_profiles_android.h54
-rw-r--r--chromium/components/autofill/core/browser/android/personal_data_manager_android.cc25
-rw-r--r--chromium/components/autofill/core/browser/android/test_auxiliary_profile_loader_android.cc132
-rw-r--r--chromium/components/autofill/core/browser/android/test_auxiliary_profile_loader_android.h74
-rw-r--r--chromium/components/autofill/core/browser/autocomplete_history_manager.cc196
-rw-r--r--chromium/components/autofill/core/browser/autocomplete_history_manager.h97
-rw-r--r--chromium/components/autofill/core/browser/autocomplete_history_manager_unittest.cc235
-rw-r--r--chromium/components/autofill/core/browser/autofill-inl.h39
-rw-r--r--chromium/components/autofill/core/browser/autofill_country.cc1111
-rw-r--r--chromium/components/autofill/core/browser/autofill_country.h110
-rw-r--r--chromium/components/autofill/core/browser/autofill_country_unittest.cc90
-rw-r--r--chromium/components/autofill/core/browser/autofill_data_model.cc29
-rw-r--r--chromium/components/autofill/core/browser/autofill_data_model.h58
-rw-r--r--chromium/components/autofill/core/browser/autofill_data_model_unittest.cc64
-rw-r--r--chromium/components/autofill/core/browser/autofill_download.cc348
-rw-r--r--chromium/components/autofill/core/browser/autofill_download.h174
-rw-r--r--chromium/components/autofill/core/browser/autofill_download_unittest.cc494
-rw-r--r--chromium/components/autofill/core/browser/autofill_download_url.cc47
-rw-r--r--chromium/components/autofill/core/browser/autofill_download_url.h18
-rw-r--r--chromium/components/autofill/core/browser/autofill_download_url_unittest.cc26
-rw-r--r--chromium/components/autofill/core/browser/autofill_driver.h90
-rw-r--r--chromium/components/autofill/core/browser/autofill_external_delegate.cc358
-rw-r--r--chromium/components/autofill/core/browser/autofill_external_delegate.h172
-rw-r--r--chromium/components/autofill/core/browser/autofill_external_delegate_unittest.cc492
-rw-r--r--chromium/components/autofill/core/browser/autofill_field.cc409
-rw-r--r--chromium/components/autofill/core/browser/autofill_field.h111
-rw-r--r--chromium/components/autofill/core/browser/autofill_field_unittest.cc374
-rw-r--r--chromium/components/autofill/core/browser/autofill_ie_toolbar_import_win.cc312
-rw-r--r--chromium/components/autofill/core/browser/autofill_ie_toolbar_import_win.h24
-rw-r--r--chromium/components/autofill/core/browser/autofill_ie_toolbar_import_win_unittest.cc211
-rw-r--r--chromium/components/autofill/core/browser/autofill_manager.cc1114
-rw-r--r--chromium/components/autofill/core/browser/autofill_manager.h372
-rw-r--r--chromium/components/autofill/core/browser/autofill_manager_delegate.h106
-rw-r--r--chromium/components/autofill/core/browser/autofill_manager_test_delegate.h26
-rw-r--r--chromium/components/autofill/core/browser/autofill_manager_unittest.cc2929
-rw-r--r--chromium/components/autofill/core/browser/autofill_merge_unittest.cc252
-rw-r--r--chromium/components/autofill/core/browser/autofill_metrics.cc539
-rw-r--r--chromium/components/autofill/core/browser/autofill_metrics.h454
-rw-r--r--chromium/components/autofill/core/browser/autofill_metrics_unittest.cc1562
-rw-r--r--chromium/components/autofill/core/browser/autofill_popup_delegate.h48
-rw-r--r--chromium/components/autofill/core/browser/autofill_profile.cc847
-rw-r--r--chromium/components/autofill/core/browser/autofill_profile.h195
-rw-r--r--chromium/components/autofill/core/browser/autofill_profile_unittest.cc851
-rw-r--r--chromium/components/autofill/core/browser/autofill_regex_constants.cc.utf8291
-rw-r--r--chromium/components/autofill/core/browser/autofill_regex_constants.h55
-rw-r--r--chromium/components/autofill/core/browser/autofill_regexes.cc84
-rw-r--r--chromium/components/autofill/core/browser/autofill_regexes.h20
-rw-r--r--chromium/components/autofill/core/browser/autofill_regexes_unittest.cc64
-rw-r--r--chromium/components/autofill/core/browser/autofill_scanner.cc58
-rw-r--r--chromium/components/autofill/core/browser/autofill_scanner.h61
-rw-r--r--chromium/components/autofill/core/browser/autofill_server_field_info.h24
-rw-r--r--chromium/components/autofill/core/browser/autofill_test_utils.cc220
-rw-r--r--chromium/components/autofill/core/browser/autofill_test_utils.h101
-rw-r--r--chromium/components/autofill/core/browser/autofill_type.cc663
-rw-r--r--chromium/components/autofill/core/browser/autofill_type.h60
-rw-r--r--chromium/components/autofill/core/browser/autofill_type_unittest.cc91
-rw-r--r--chromium/components/autofill/core/browser/autofill_xml_parser.cc189
-rw-r--r--chromium/components/autofill/core/browser/autofill_xml_parser.h159
-rw-r--r--chromium/components/autofill/core/browser/autofill_xml_parser_unittest.cc258
-rw-r--r--chromium/components/autofill/core/browser/contact_info.cc206
-rw-r--r--chromium/components/autofill/core/browser/contact_info.h101
-rw-r--r--chromium/components/autofill/core/browser/contact_info_unittest.cc105
-rw-r--r--chromium/components/autofill/core/browser/credit_card.cc704
-rw-r--r--chromium/components/autofill/core/browser/credit_card.h168
-rw-r--r--chromium/components/autofill/core/browser/credit_card_field.cc230
-rw-r--r--chromium/components/autofill/core/browser/credit_card_field.h67
-rw-r--r--chromium/components/autofill/core/browser/credit_card_field_unittest.cc348
-rw-r--r--chromium/components/autofill/core/browser/credit_card_unittest.cc527
-rw-r--r--chromium/components/autofill/core/browser/crypto/rc4_decryptor.h110
-rw-r--r--chromium/components/autofill/core/browser/data_driven_test.cc93
-rw-r--r--chromium/components/autofill/core/browser/data_driven_test.h56
-rw-r--r--chromium/components/autofill/core/browser/email_field.cc32
-rw-r--r--chromium/components/autofill/core/browser/email_field.h32
-rw-r--r--chromium/components/autofill/core/browser/field_types.h225
-rw-r--r--chromium/components/autofill/core/browser/form_field.cc192
-rw-r--r--chromium/components/autofill/core/browser/form_field.h129
-rw-r--r--chromium/components/autofill/core/browser/form_field_unittest.cc152
-rw-r--r--chromium/components/autofill/core/browser/form_group.cc51
-rw-r--r--chromium/components/autofill/core/browser/form_group.h68
-rw-r--r--chromium/components/autofill/core/browser/form_structure.cc1214
-rw-r--r--chromium/components/autofill/core/browser/form_structure.h246
-rw-r--r--chromium/components/autofill/core/browser/form_structure_unittest.cc2348
-rw-r--r--chromium/components/autofill/core/browser/name_field.cc217
-rw-r--r--chromium/components/autofill/core/browser/name_field.h46
-rw-r--r--chromium/components/autofill/core/browser/name_field_unittest.cc311
-rw-r--r--chromium/components/autofill/core/browser/password_autofill_manager.cc90
-rw-r--r--chromium/components/autofill/core/browser/password_autofill_manager.h72
-rw-r--r--chromium/components/autofill/core/browser/password_autofill_manager_unittest.cc102
-rw-r--r--chromium/components/autofill/core/browser/password_generator.cc125
-rw-r--r--chromium/components/autofill/core/browser/password_generator.h48
-rw-r--r--chromium/components/autofill/core/browser/password_generator_unittest.cc58
-rw-r--r--chromium/components/autofill/core/browser/personal_data_manager.cc1026
-rw-r--r--chromium/components/autofill/core/browser/personal_data_manager.h330
-rw-r--r--chromium/components/autofill/core/browser/personal_data_manager_mac.mm273
-rw-r--r--chromium/components/autofill/core/browser/personal_data_manager_observer.h25
-rw-r--r--chromium/components/autofill/core/browser/personal_data_manager_unittest.cc2557
-rw-r--r--chromium/components/autofill/core/browser/phone_field.cc276
-rw-r--r--chromium/components/autofill/core/browser/phone_field.h93
-rw-r--r--chromium/components/autofill/core/browser/phone_field_unittest.cc230
-rw-r--r--chromium/components/autofill/core/browser/phone_number.cc240
-rw-r--r--chromium/components/autofill/core/browser/phone_number.h99
-rw-r--r--chromium/components/autofill/core/browser/phone_number_i18n.cc306
-rw-r--r--chromium/components/autofill/core/browser/phone_number_i18n.h113
-rw-r--r--chromium/components/autofill/core/browser/phone_number_i18n_unittest.cc389
-rw-r--r--chromium/components/autofill/core/browser/phone_number_unittest.cc212
-rw-r--r--chromium/components/autofill/core/browser/state_names.cc115
-rw-r--r--chromium/components/autofill/core/browser/state_names.h31
-rw-r--r--chromium/components/autofill/core/browser/test_autofill_driver.cc70
-rw-r--r--chromium/components/autofill/core/browser/test_autofill_driver.h57
-rw-r--r--chromium/components/autofill/core/browser/test_autofill_external_delegate.cc29
-rw-r--r--chromium/components/autofill/core/browser/test_autofill_external_delegate.h21
-rw-r--r--chromium/components/autofill/core/browser/test_autofill_manager_delegate.cc61
-rw-r--r--chromium/components/autofill/core/browser/test_autofill_manager_delegate.h58
-rw-r--r--chromium/components/autofill/core/browser/test_personal_data_manager.cc56
-rw-r--r--chromium/components/autofill/core/browser/test_personal_data_manager.h57
-rw-r--r--chromium/components/autofill/core/browser/validation.cc220
-rw-r--r--chromium/components/autofill/core/browser/validation.h53
-rw-r--r--chromium/components/autofill/core/browser/validation_unittest.cc199
-rw-r--r--chromium/components/autofill/core/browser/webdata/autofill_change.cc39
-rw-r--r--chromium/components/autofill/core/browser/webdata/autofill_change.h76
-rw-r--r--chromium/components/autofill/core/browser/webdata/autofill_entry.cc129
-rw-r--r--chromium/components/autofill/core/browser/webdata/autofill_entry.h75
-rw-r--r--chromium/components/autofill/core/browser/webdata/autofill_entry_unittest.cc82
-rw-r--r--chromium/components/autofill/core/browser/webdata/autofill_table.cc2294
-rw-r--r--chromium/components/autofill/core/browser/webdata/autofill_table.h391
-rw-r--r--chromium/components/autofill/core/browser/webdata/autofill_table_unittest.cc1488
-rw-r--r--chromium/components/autofill/core/browser/webdata/autofill_webdata.h107
-rw-r--r--chromium/components/autofill/core/browser/webdata/autofill_webdata_backend.h43
-rw-r--r--chromium/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.cc389
-rw-r--r--chromium/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.h194
-rw-r--r--chromium/components/autofill/core/browser/webdata/autofill_webdata_service.cc224
-rw-r--r--chromium/components/autofill/core/browser/webdata/autofill_webdata_service.h129
-rw-r--r--chromium/components/autofill/core/browser/webdata/autofill_webdata_service_observer.h37
-rw-r--r--chromium/components/autofill/core/browser/webdata/web_data_service_unittest.cc550
-rw-r--r--chromium/components/autofill/core/common/autofill_constants.cc20
-rw-r--r--chromium/components/autofill/core/common/autofill_constants.h25
-rw-r--r--chromium/components/autofill/core/common/autofill_pref_names.cc25
-rw-r--r--chromium/components/autofill/core/common/autofill_pref_names.h21
-rw-r--r--chromium/components/autofill/core/common/autofill_switches.cc54
-rw-r--r--chromium/components/autofill/core/common/autofill_switches.h28
-rw-r--r--chromium/components/autofill/core/common/form_data.cc133
-rw-r--r--chromium/components/autofill/core/common/form_data.h52
-rw-r--r--chromium/components/autofill/core/common/form_data_predictions.cc35
-rw-r--r--chromium/components/autofill/core/common/form_data_predictions.h38
-rw-r--r--chromium/components/autofill/core/common/form_data_unittest.cc57
-rw-r--r--chromium/components/autofill/core/common/form_field_data.cc179
-rw-r--r--chromium/components/autofill/core/common/form_field_data.h78
-rw-r--r--chromium/components/autofill/core/common/form_field_data_predictions.cc38
-rw-r--r--chromium/components/autofill/core/common/form_field_data_predictions.h34
-rw-r--r--chromium/components/autofill/core/common/form_field_data_unittest.cc43
-rw-r--r--chromium/components/autofill/core/common/forms_seen_state.h24
-rw-r--r--chromium/components/autofill/core/common/password_autofill_util.cc19
-rw-r--r--chromium/components/autofill/core/common/password_autofill_util.h16
-rw-r--r--chromium/components/autofill/core/common/password_form.cc79
-rw-r--r--chromium/components/autofill/core/common/password_form.h211
-rw-r--r--chromium/components/autofill/core/common/password_form_fill_data.cc84
-rw-r--r--chromium/components/autofill/core/common/password_form_fill_data.h87
-rw-r--r--chromium/components/autofill/core/common/password_form_fill_data_unittest.cc168
-rw-r--r--chromium/components/autofill/core/common/password_generation_util.cc62
-rw-r--r--chromium/components/autofill/core/common/password_generation_util.h81
-rw-r--r--chromium/components/autofill/core/common/web_element_descriptor.cc12
-rw-r--r--chromium/components/autofill/core/common/web_element_descriptor.h31
-rw-r--r--chromium/components/autofill_strings.grdp113
-rw-r--r--chromium/components/bookmarks.gypi107
-rw-r--r--chromium/components/breakpad.gypi102
-rw-r--r--chromium/components/breakpad/DEPS3
-rw-r--r--chromium/components/breakpad/OWNERS4
-rw-r--r--chromium/components/breakpad/app/DEPS8
-rw-r--r--chromium/components/breakpad/app/breakpad_client.cc131
-rw-r--r--chromium/components/breakpad/app/breakpad_client.h147
-rw-r--r--chromium/components/breakpad/app/breakpad_linux.cc1523
-rw-r--r--chromium/components/breakpad/app/breakpad_linux.h32
-rw-r--r--chromium/components/breakpad/app/breakpad_linux_impl.h66
-rw-r--r--chromium/components/breakpad/app/breakpad_mac.h27
-rw-r--r--chromium/components/breakpad/app/breakpad_mac.mm279
-rw-r--r--chromium/components/breakpad/app/breakpad_mac_stubs.mm24
-rw-r--r--chromium/components/breakpad/app/breakpad_win.cc764
-rw-r--r--chromium/components/breakpad/app/breakpad_win.h22
-rw-r--r--chromium/components/breakpad/app/hard_error_handler_win.cc118
-rw-r--r--chromium/components/breakpad/app/hard_error_handler_win.h34
-rw-r--r--chromium/components/breakpad/browser/DEPS4
-rw-r--r--chromium/components/breakpad/browser/crash_dump_manager_android.cc173
-rw-r--r--chromium/components/breakpad/browser/crash_dump_manager_android.h84
-rw-r--r--chromium/components/breakpad/browser/crash_handler_host_linux.cc465
-rw-r--r--chromium/components/breakpad/browser/crash_handler_host_linux.h97
-rw-r--r--chromium/components/breakpad/tools/crash_service.cc488
-rw-r--r--chromium/components/breakpad/tools/crash_service.h125
-rwxr-xr-xchromium/components/breakpad/tools/dmp2minidump.py51
-rwxr-xr-xchromium/components/breakpad/tools/generate_breakpad_symbols.py234
-rw-r--r--chromium/components/browser_context_keyed_service.gypi44
-rw-r--r--chromium/components/browser_context_keyed_service/DEPS4
-rw-r--r--chromium/components/browser_context_keyed_service/OWNERS3
-rw-r--r--chromium/components/browser_context_keyed_service/browser_context_dependency_manager.cc179
-rw-r--r--chromium/components/browser_context_keyed_service/browser_context_dependency_manager.h101
-rw-r--r--chromium/components/browser_context_keyed_service/browser_context_dependency_manager_unittest.cc174
-rw-r--r--chromium/components/browser_context_keyed_service/browser_context_keyed_base_factory.cc120
-rw-r--r--chromium/components/browser_context_keyed_service/browser_context_keyed_base_factory.h152
-rw-r--r--chromium/components/browser_context_keyed_service/browser_context_keyed_service.h32
-rw-r--r--chromium/components/browser_context_keyed_service/browser_context_keyed_service_export.h29
-rw-r--r--chromium/components/browser_context_keyed_service/browser_context_keyed_service_factory.cc135
-rw-r--r--chromium/components/browser_context_keyed_service/browser_context_keyed_service_factory.h126
-rw-r--r--chromium/components/browser_context_keyed_service/dependency_graph.cc166
-rw-r--r--chromium/components/browser_context_keyed_service/dependency_graph.h68
-rw-r--r--chromium/components/browser_context_keyed_service/dependency_graph_unittest.cc161
-rw-r--r--chromium/components/browser_context_keyed_service/dependency_node.h16
-rw-r--r--chromium/components/browser_context_keyed_service/refcounted_browser_context_keyed_service.cc34
-rw-r--r--chromium/components/browser_context_keyed_service/refcounted_browser_context_keyed_service.h75
-rw-r--r--chromium/components/browser_context_keyed_service/refcounted_browser_context_keyed_service_factory.cc130
-rw-r--r--chromium/components/browser_context_keyed_service/refcounted_browser_context_keyed_service_factory.h101
-rw-r--r--chromium/components/captive_portal.gypi44
-rw-r--r--chromium/components/cdm.gypi70
-rw-r--r--chromium/components/cloud_devices.gypi33
-rw-r--r--chromium/components/component_strings.grd175
-rw-r--r--chromium/components/component_strings.gyp28
-rw-r--r--chromium/components/components.gyp59
-rw-r--r--chromium/components/components_resources.gyp33
-rw-r--r--chromium/components/components_strings.gyp26
-rw-r--r--chromium/components/components_tests.gyp530
-rw-r--r--chromium/components/components_unittests.isolate6
-rw-r--r--chromium/components/cronet.gypi275
-rw-r--r--chromium/components/data_reduction_proxy.gypi81
-rw-r--r--chromium/components/dom_distiller.gypi118
-rw-r--r--chromium/components/dom_distiller/DEPS18
-rw-r--r--chromium/components/dom_distiller/OWNERS3
-rw-r--r--chromium/components/dom_distiller/README12
-rw-r--r--chromium/components/dom_distiller/content/DEPS7
-rw-r--r--chromium/components/dom_distiller/content/distiller_page_web_contents.cc79
-rw-r--r--chromium/components/dom_distiller/content/distiller_page_web_contents.h74
-rw-r--r--chromium/components/dom_distiller/content/distiller_page_web_contents_browsertest.cc86
-rw-r--r--chromium/components/dom_distiller/core/article_entry.cc69
-rw-r--r--chromium/components/dom_distiller/core/article_entry.h37
-rw-r--r--chromium/components/dom_distiller/core/article_entry_unittest.cc64
-rw-r--r--chromium/components/dom_distiller/core/distiller.cc138
-rw-r--r--chromium/components/dom_distiller/core/distiller.h101
-rw-r--r--chromium/components/dom_distiller/core/distiller_page.cc67
-rw-r--r--chromium/components/dom_distiller/core/distiller_page.h102
-rw-r--r--chromium/components/dom_distiller/core/distiller_unittest.cc167
-rw-r--r--chromium/components/dom_distiller/core/distiller_url_fetcher.cc69
-rw-r--r--chromium/components/dom_distiller/core/distiller_url_fetcher.h62
-rw-r--r--chromium/components/dom_distiller/core/distiller_url_fetcher_unittest.cc70
-rw-r--r--chromium/components/dom_distiller/core/dom_distiller_constants.cc12
-rw-r--r--chromium/components/dom_distiller/core/dom_distiller_constants.h15
-rw-r--r--chromium/components/dom_distiller/core/dom_distiller_database.cc224
-rw-r--r--chromium/components/dom_distiller/core/dom_distiller_database.h124
-rw-r--r--chromium/components/dom_distiller/core/dom_distiller_database_unittest.cc397
-rw-r--r--chromium/components/dom_distiller/core/dom_distiller_model.cc209
-rw-r--r--chromium/components/dom_distiller/core/dom_distiller_model.h90
-rw-r--r--chromium/components/dom_distiller/core/dom_distiller_model_unittest.cc131
-rw-r--r--chromium/components/dom_distiller/core/dom_distiller_observer.h42
-rw-r--r--chromium/components/dom_distiller/core/dom_distiller_service.cc158
-rw-r--r--chromium/components/dom_distiller/core/dom_distiller_service.h89
-rw-r--r--chromium/components/dom_distiller/core/dom_distiller_service_unittest.cc226
-rw-r--r--chromium/components/dom_distiller/core/dom_distiller_store.cc377
-rw-r--r--chromium/components/dom_distiller/core/dom_distiller_store.h161
-rw-r--r--chromium/components/dom_distiller/core/dom_distiller_store_unittest.cc507
-rw-r--r--chromium/components/dom_distiller/core/dom_distiller_test_util.cc103
-rw-r--r--chromium/components/dom_distiller/core/dom_distiller_test_util.h50
-rw-r--r--chromium/components/dom_distiller/core/fake_db.cc79
-rw-r--r--chromium/components/dom_distiller/core/fake_db.h60
-rw-r--r--chromium/components/dom_distiller/core/fake_distiller.cc20
-rw-r--r--chromium/components/dom_distiller/core/fake_distiller.h59
-rw-r--r--chromium/components/dom_distiller/core/proto/distilled_page.proto34
-rw-r--r--chromium/components/dom_distiller/core/task_tracker.cc137
-rw-r--r--chromium/components/dom_distiller/core/task_tracker.h118
-rw-r--r--chromium/components/dom_distiller/core/task_tracker_unittest.cc165
-rw-r--r--chromium/components/dom_distiller/webui/DEPS13
-rw-r--r--chromium/components/dom_distiller/webui/dom_distiller_handler.cc77
-rw-r--r--chromium/components/dom_distiller/webui/dom_distiller_handler.h58
-rw-r--r--chromium/components/dom_distiller/webui/dom_distiller_ui.cc57
-rw-r--r--chromium/components/dom_distiller/webui/dom_distiller_ui.h30
-rw-r--r--chromium/components/dom_distiller/webui/resources/about_dom_distiller.css12
-rw-r--r--chromium/components/dom_distiller/webui/resources/about_dom_distiller.html53
-rw-r--r--chromium/components/dom_distiller/webui/resources/about_dom_distiller.js77
-rw-r--r--chromium/components/dom_distiller_resources.grd18
-rw-r--r--chromium/components/dom_distiller_strings.grdp26
-rw-r--r--chromium/components/domain_reliability.gypi80
-rw-r--r--chromium/components/enhanced_bookmarks.gypi67
-rw-r--r--chromium/components/favicon.gypi25
-rw-r--r--chromium/components/favicon_base.gypi30
-rw-r--r--chromium/components/feedback.gypi66
-rw-r--r--chromium/components/gcm_driver.gypi135
-rw-r--r--chromium/components/google.gypi47
-rw-r--r--chromium/components/history.gypi54
-rw-r--r--chromium/components/infobars.gypi36
-rw-r--r--chromium/components/invalidation.gypi115
-rw-r--r--chromium/components/json_schema.gypi1
-rw-r--r--chromium/components/json_schema/DEPS3
-rw-r--r--chromium/components/json_schema/OWNERS5
-rw-r--r--chromium/components/json_schema/README6
-rw-r--r--chromium/components/json_schema/json_schema_constants.cc38
-rw-r--r--chromium/components/json_schema/json_schema_constants.h42
-rw-r--r--chromium/components/json_schema/json_schema_validator.cc767
-rw-r--r--chromium/components/json_schema/json_schema_validator.h248
-rw-r--r--chromium/components/json_schema/json_schema_validator_unittest.cc146
-rw-r--r--chromium/components/json_schema/json_schema_validator_unittest_base.cc730
-rw-r--r--chromium/components/json_schema/json_schema_validator_unittest_base.h63
-rw-r--r--chromium/components/keyed_service.gypi69
-rw-r--r--chromium/components/language_usage_metrics.gypi22
-rw-r--r--chromium/components/leveldb_proto.gypi44
-rw-r--r--chromium/components/metrics.gypi143
-rw-r--r--chromium/components/nacl.gyp173
-rw-r--r--chromium/components/nacl/OWNERS7
-rw-r--r--chromium/components/nacl/broker/DEPS4
-rw-r--r--chromium/components/nacl/broker/nacl_broker_listener.cc138
-rw-r--r--chromium/components/nacl/broker/nacl_broker_listener.h50
-rw-r--r--chromium/components/nacl/browser/DEPS9
-rw-r--r--chromium/components/nacl/browser/nacl_broker_host_win.cc118
-rw-r--r--chromium/components/nacl/browser/nacl_broker_host_win.h64
-rw-r--r--chromium/components/nacl/browser/nacl_broker_service_win.cc106
-rw-r--r--chromium/components/nacl/browser/nacl_broker_service_win.h70
-rw-r--r--chromium/components/nacl/browser/nacl_browser.cc567
-rw-r--r--chromium/components/nacl/browser/nacl_browser.h188
-rw-r--r--chromium/components/nacl/browser/nacl_browser_delegate.h78
-rw-r--r--chromium/components/nacl/browser/nacl_file_host.cc248
-rw-r--r--chromium/components/nacl/browser/nacl_file_host.h50
-rw-r--r--chromium/components/nacl/browser/nacl_file_host_unittest.cc119
-rw-r--r--chromium/components/nacl/browser/nacl_host_message_filter.cc177
-rw-r--r--chromium/components/nacl/browser/nacl_host_message_filter.h86
-rw-r--r--chromium/components/nacl/browser/nacl_process_host.cc1027
-rw-r--r--chromium/components/nacl/browser/nacl_process_host.h242
-rw-r--r--chromium/components/nacl/browser/nacl_process_host_unittest.cc15
-rw-r--r--chromium/components/nacl/browser/nacl_validation_cache.cc129
-rw-r--r--chromium/components/nacl/browser/nacl_validation_cache.h68
-rw-r--r--chromium/components/nacl/browser/nacl_validation_cache_unittest.cc193
-rw-r--r--chromium/components/nacl/browser/pnacl_host.cc634
-rw-r--r--chromium/components/nacl/browser/pnacl_host.h178
-rw-r--r--chromium/components/nacl/browser/pnacl_host_unittest.cc432
-rw-r--r--chromium/components/nacl/browser/pnacl_translation_cache.cc440
-rw-r--r--chromium/components/nacl/browser/pnacl_translation_cache.h106
-rw-r--r--chromium/components/nacl/browser/pnacl_translation_cache_unittest.cc269
-rw-r--r--chromium/components/nacl/browser/test_nacl_browser_delegate.cc55
-rw-r--r--chromium/components/nacl/browser/test_nacl_browser_delegate.h46
-rw-r--r--chromium/components/nacl/common/DEPS3
-rw-r--r--chromium/components/nacl/common/OWNERS9
-rw-r--r--chromium/components/nacl/common/nacl_cmd_line.cc36
-rw-r--r--chromium/components/nacl/common/nacl_cmd_line.h16
-rw-r--r--chromium/components/nacl/common/nacl_debug_exception_handler_win.cc78
-rw-r--r--chromium/components/nacl/common/nacl_debug_exception_handler_win.h18
-rw-r--r--chromium/components/nacl/common/nacl_host_messages.cc34
-rw-r--r--chromium/components/nacl/common/nacl_host_messages.h101
-rw-r--r--chromium/components/nacl/common/nacl_messages.cc34
-rw-r--r--chromium/components/nacl/common/nacl_messages.h94
-rw-r--r--chromium/components/nacl/common/nacl_paths.cc53
-rw-r--r--chromium/components/nacl/common/nacl_paths.h31
-rw-r--r--chromium/components/nacl/common/nacl_process_type.h18
-rw-r--r--chromium/components/nacl/common/nacl_sandbox_type_mac.h16
-rw-r--r--chromium/components/nacl/common/nacl_switches.cc45
-rw-r--r--chromium/components/nacl/common/nacl_switches.h26
-rw-r--r--chromium/components/nacl/common/nacl_types.cc81
-rw-r--r--chromium/components/nacl/common/nacl_types.h103
-rw-r--r--chromium/components/nacl/common/pnacl_types.cc13
-rw-r--r--chromium/components/nacl/common/pnacl_types.h34
-rw-r--r--chromium/components/nacl/docs/dev/index.html108
-rw-r--r--chromium/components/nacl/loader/DEPS17
-rw-r--r--chromium/components/nacl/loader/OWNERS2
-rw-r--r--chromium/components/nacl/loader/nacl_helper_linux.cc390
-rw-r--r--chromium/components/nacl/loader/nacl_helper_linux.h34
-rw-r--r--chromium/components/nacl/loader/nacl_helper_win_64.cc83
-rw-r--r--chromium/components/nacl/loader/nacl_helper_win_64.h14
-rw-r--r--chromium/components/nacl/loader/nacl_ipc_adapter.cc593
-rw-r--r--chromium/components/nacl/loader/nacl_ipc_adapter.h192
-rw-r--r--chromium/components/nacl/loader/nacl_ipc_adapter_unittest.cc357
-rw-r--r--chromium/components/nacl/loader/nacl_listener.cc336
-rw-r--r--chromium/components/nacl/loader/nacl_listener.h74
-rw-r--r--chromium/components/nacl/loader/nacl_main.cc53
-rw-r--r--chromium/components/nacl/loader/nacl_main_platform_delegate.h26
-rw-r--r--chromium/components/nacl/loader/nacl_main_platform_delegate_linux.cc31
-rw-r--r--chromium/components/nacl/loader/nacl_main_platform_delegate_mac.mm26
-rw-r--r--chromium/components/nacl/loader/nacl_main_platform_delegate_win.cc31
-rw-r--r--chromium/components/nacl/loader/nacl_sandbox_linux.cc162
-rw-r--r--chromium/components/nacl/loader/nacl_sandbox_linux.h10
-rw-r--r--chromium/components/nacl/loader/nacl_validation_db.h28
-rw-r--r--chromium/components/nacl/loader/nacl_validation_query.cc172
-rw-r--r--chromium/components/nacl/loader/nacl_validation_query.h94
-rw-r--r--chromium/components/nacl/loader/nacl_validation_query_unittest.cc283
-rw-r--r--chromium/components/nacl/nacl_defines.gypi56
-rw-r--r--chromium/components/nacl/renderer/DEPS14
-rw-r--r--chromium/components/nacl/renderer/OWNERS5
-rw-r--r--chromium/components/nacl/renderer/pnacl_translation_resource_host.cc168
-rw-r--r--chromium/components/nacl/renderer/pnacl_translation_resource_host.h84
-rw-r--r--chromium/components/nacl/renderer/ppb_nacl_private_impl.cc438
-rw-r--r--chromium/components/nacl/renderer/ppb_nacl_private_impl.h21
-rw-r--r--chromium/components/nacl/zygote/DEPS4
-rw-r--r--chromium/components/nacl/zygote/nacl_fork_delegate_linux.cc351
-rw-r--r--chromium/components/nacl/zygote/nacl_fork_delegate_linux.h56
-rw-r--r--chromium/components/navigation_interception.gypi116
-rw-r--r--chromium/components/navigation_interception/DEPS8
-rw-r--r--chromium/components/navigation_interception/OWNERS1
-rw-r--r--chromium/components/navigation_interception/intercept_navigation_delegate.cc107
-rw-r--r--chromium/components/navigation_interception/intercept_navigation_delegate.h69
-rw-r--r--chromium/components/navigation_interception/intercept_navigation_resource_throttle.cc144
-rw-r--r--chromium/components/navigation_interception/intercept_navigation_resource_throttle.h63
-rw-r--r--chromium/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc476
-rw-r--r--chromium/components/navigation_interception/navigation_params.cc42
-rw-r--r--chromium/components/navigation_interception/navigation_params.h47
-rw-r--r--chromium/components/navigation_interception/navigation_params_android.cc34
-rw-r--r--chromium/components/navigation_interception/navigation_params_android.h22
-rw-r--r--chromium/components/navigation_metrics/navigation_metrics.cc57
-rw-r--r--chromium/components/navigation_metrics/navigation_metrics.h16
-rw-r--r--chromium/components/network_time.gypi24
-rw-r--r--chromium/components/onc/OWNERS5
-rw-r--r--chromium/components/onc/docs/onc_spec.css62
-rw-r--r--chromium/components/onc/docs/onc_spec.html2244
-rw-r--r--chromium/components/onc/docs/onc_spec.js55
-rw-r--r--chromium/components/onc/onc_constants.cc313
-rw-r--r--chromium/components/onc/onc_constants.h337
-rw-r--r--chromium/components/onc/onc_export.h29
-rw-r--r--chromium/components/os_crypt.gypi46
-rw-r--r--chromium/components/password_manager.gypi175
-rw-r--r--chromium/components/plugins.gypi59
-rw-r--r--chromium/components/plugins/OWNERS1
-rw-r--r--chromium/components/plugins/renderer/DEPS13
-rw-r--r--chromium/components/plugins/renderer/mobile_youtube_plugin.cc113
-rw-r--r--chromium/components/plugins/renderer/mobile_youtube_plugin.h41
-rw-r--r--chromium/components/plugins/renderer/plugin_placeholder.cc248
-rw-r--r--chromium/components/plugins/renderer/plugin_placeholder.h115
-rw-r--r--chromium/components/plugins/renderer/webview_plugin.cc225
-rw-r--r--chromium/components/plugins/renderer/webview_plugin.h155
-rw-r--r--chromium/components/policy.gypi268
-rw-r--r--chromium/components/policy/OWNERS7
-rw-r--r--chromium/components/policy/core/DEPS13
-rw-r--r--chromium/components/policy/core/browser/DEPS5
-rw-r--r--chromium/components/policy/core/browser/cloud/message_util.cc127
-rw-r--r--chromium/components/policy/core/browser/cloud/message_util.h33
-rw-r--r--chromium/components/policy/core/browser/configuration_policy_handler.cc298
-rw-r--r--chromium/components/policy/core/browser/configuration_policy_handler.h234
-rw-r--r--chromium/components/policy/core/browser/configuration_policy_handler_list.cc59
-rw-r--r--chromium/components/policy/core/browser/configuration_policy_handler_list.h56
-rw-r--r--chromium/components/policy/core/browser/configuration_policy_pref_store.cc133
-rw-r--r--chromium/components/policy/core/browser/configuration_policy_pref_store.h85
-rw-r--r--chromium/components/policy/core/browser/policy_error_map.cc168
-rw-r--r--chromium/components/policy/core/browser/policy_error_map.h103
-rw-r--r--chromium/components/policy/core/common/DEPS3
-rw-r--r--chromium/components/policy/core/common/async_policy_loader.cc138
-rw-r--r--chromium/components/policy/core/common/async_policy_loader.h122
-rw-r--r--chromium/components/policy/core/common/async_policy_provider.cc134
-rw-r--r--chromium/components/policy/core/common/async_policy_provider.h76
-rw-r--r--chromium/components/policy/core/common/async_policy_provider_unittest.cc227
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_external_data_manager.cc40
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_external_data_manager.h75
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_client.cc458
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_client.h297
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_client_registration_helper.cc300
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_client_registration_helper.h115
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_client_unittest.cc589
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_constants.cc61
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_constants.h119
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_core.cc84
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_core.h118
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_core_unittest.cc138
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_manager.cc149
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_manager.h114
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_manager_unittest.cc354
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc376
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_refresh_scheduler.h156
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc492
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_service.cc160
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_service.h114
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_service_unittest.cc240
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_store.cc68
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_store.h165
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_validator.cc385
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_validator.h310
-rw-r--r--chromium/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc297
-rw-r--r--chromium/components/policy/core/common/cloud/component_cloud_policy_service.cc515
-rw-r--r--chromium/components/policy/core/common/cloud/component_cloud_policy_service.h179
-rw-r--r--chromium/components/policy/core/common/cloud/component_cloud_policy_service_stub.cc56
-rw-r--r--chromium/components/policy/core/common/cloud/component_cloud_policy_service_unittest.cc554
-rw-r--r--chromium/components/policy/core/common/cloud/component_cloud_policy_store.cc361
-rw-r--r--chromium/components/policy/core/common/cloud/component_cloud_policy_store.h145
-rw-r--r--chromium/components/policy/core/common/cloud/component_cloud_policy_store_unittest.cc325
-rw-r--r--chromium/components/policy/core/common/cloud/component_cloud_policy_updater.cc109
-rw-r--r--chromium/components/policy/core/common/cloud/component_cloud_policy_updater.h67
-rw-r--r--chromium/components/policy/core/common/cloud/component_cloud_policy_updater_unittest.cc350
-rw-r--r--chromium/components/policy/core/common/cloud/device_management_service.cc519
-rw-r--r--chromium/components/policy/core/common/cloud/device_management_service.h191
-rw-r--r--chromium/components/policy/core/common/cloud/device_management_service_unittest.cc704
-rw-r--r--chromium/components/policy/core/common/cloud/enterprise_metrics.cc15
-rw-r--r--chromium/components/policy/core/common/cloud/enterprise_metrics.h204
-rw-r--r--chromium/components/policy/core/common/cloud/external_policy_data_fetcher.cc267
-rw-r--r--chromium/components/policy/core/common/cloud/external_policy_data_fetcher.h184
-rw-r--r--chromium/components/policy/core/common/cloud/external_policy_data_fetcher_unittest.cc496
-rw-r--r--chromium/components/policy/core/common/cloud/external_policy_data_updater.cc400
-rw-r--r--chromium/components/policy/core/common/cloud/external_policy_data_updater.h127
-rw-r--r--chromium/components/policy/core/common/cloud/external_policy_data_updater_unittest.cc962
-rw-r--r--chromium/components/policy/core/common/cloud/mock_cloud_external_data_manager.cc27
-rw-r--r--chromium/components/policy/core/common/cloud/mock_cloud_external_data_manager.h45
-rw-r--r--chromium/components/policy/core/common/cloud/mock_cloud_policy_client.cc42
-rw-r--r--chromium/components/policy/core/common/cloud/mock_cloud_policy_client.h77
-rw-r--r--chromium/components/policy/core/common/cloud/mock_cloud_policy_store.cc17
-rw-r--r--chromium/components/policy/core/common/cloud/mock_cloud_policy_store.h48
-rw-r--r--chromium/components/policy/core/common/cloud/mock_device_management_service.cc170
-rw-r--r--chromium/components/policy/core/common/cloud/mock_device_management_service.h81
-rw-r--r--chromium/components/policy/core/common/cloud/mock_user_cloud_policy_store.cc15
-rw-r--r--chromium/components/policy/core/common/cloud/mock_user_cloud_policy_store.h38
-rw-r--r--chromium/components/policy/core/common/cloud/policy_builder.cc241
-rw-r--r--chromium/components/policy/core/common/cloud/policy_builder.h146
-rw-r--r--chromium/components/policy/core/common/cloud/policy_header_io_helper.cc59
-rw-r--r--chromium/components/policy/core/common/cloud/policy_header_io_helper.h62
-rw-r--r--chromium/components/policy/core/common/cloud/policy_header_io_helper_unittest.cc84
-rw-r--r--chromium/components/policy/core/common/cloud/policy_header_service.cc88
-rw-r--r--chromium/components/policy/core/common/cloud/policy_header_service.h68
-rw-r--r--chromium/components/policy/core/common/cloud/policy_header_service_unittest.cc115
-rw-r--r--chromium/components/policy/core/common/cloud/rate_limiter.cc58
-rw-r--r--chromium/components/policy/core/common/cloud/rate_limiter.h60
-rw-r--r--chromium/components/policy/core/common/cloud/rate_limiter_unittest.cc121
-rw-r--r--chromium/components/policy/core/common/cloud/resource_cache.cc241
-rw-r--r--chromium/components/policy/core/common/cloud/resource_cache.h97
-rw-r--r--chromium/components/policy/core/common/cloud/resource_cache_unittest.cc157
-rw-r--r--chromium/components/policy/core/common/cloud/system_policy_request_context.cc67
-rw-r--r--chromium/components/policy/core/common/cloud/system_policy_request_context.h49
-rw-r--r--chromium/components/policy/core/common/cloud/user_cloud_policy_manager.cc101
-rw-r--r--chromium/components/policy/core/common/cloud/user_cloud_policy_manager.h97
-rw-r--r--chromium/components/policy/core/common/cloud/user_cloud_policy_manager_unittest.cc96
-rw-r--r--chromium/components/policy/core/common/cloud/user_cloud_policy_store.cc254
-rw-r--r--chromium/components/policy/core/common/cloud/user_cloud_policy_store.h93
-rw-r--r--chromium/components/policy/core/common/cloud/user_cloud_policy_store_base.cc51
-rw-r--r--chromium/components/policy/core/common/cloud/user_cloud_policy_store_base.h57
-rw-r--r--chromium/components/policy/core/common/cloud/user_cloud_policy_store_unittest.cc367
-rw-r--r--chromium/components/policy/core/common/cloud/user_info_fetcher.cc89
-rw-r--r--chromium/components/policy/core/common/cloud/user_info_fetcher.h64
-rw-r--r--chromium/components/policy/core/common/cloud/user_info_fetcher_unittest.cc80
-rw-r--r--chromium/components/policy/core/common/cloud/user_policy_request_context.cc62
-rw-r--r--chromium/components/policy/core/common/cloud/user_policy_request_context.h51
-rw-r--r--chromium/components/policy/core/common/config_dir_policy_loader.cc232
-rw-r--r--chromium/components/policy/core/common/config_dir_policy_loader.h67
-rw-r--r--chromium/components/policy/core/common/config_dir_policy_loader_unittest.cc236
-rw-r--r--chromium/components/policy/core/common/configuration_policy_provider.cc76
-rw-r--r--chromium/components/policy/core/common/configuration_policy_provider.h103
-rw-r--r--chromium/components/policy/core/common/configuration_policy_provider_test.cc414
-rw-r--r--chromium/components/policy/core/common/configuration_policy_provider_test.h154
-rw-r--r--chromium/components/policy/core/common/external_data_fetcher.cc45
-rw-r--r--chromium/components/policy/core/common/external_data_fetcher.h53
-rw-r--r--chromium/components/policy/core/common/external_data_manager.h36
-rw-r--r--chromium/components/policy/core/common/forwarding_policy_provider.cc96
-rw-r--r--chromium/components/policy/core/common/forwarding_policy_provider.h70
-rw-r--r--chromium/components/policy/core/common/forwarding_policy_provider_unittest.cc213
-rw-r--r--chromium/components/policy/core/common/generate_policy_source_unittest.cc123
-rw-r--r--chromium/components/policy/core/common/mock_configuration_policy_provider.cc47
-rw-r--r--chromium/components/policy/core/common/mock_configuration_policy_provider.h66
-rw-r--r--chromium/components/policy/core/common/mock_policy_service.cc21
-rw-r--r--chromium/components/policy/core/common/mock_policy_service.h39
-rw-r--r--chromium/components/policy/core/common/policy_bundle.cc110
-rw-r--r--chromium/components/policy/core/common/policy_bundle.h73
-rw-r--r--chromium/components/policy/core/common/policy_bundle_unittest.cc260
-rw-r--r--chromium/components/policy/core/common/policy_details.h43
-rw-r--r--chromium/components/policy/core/common/policy_load_status.cc38
-rw-r--r--chromium/components/policy/core/common/policy_load_status.h67
-rw-r--r--chromium/components/policy/core/common/policy_loader_mac.cc234
-rw-r--r--chromium/components/policy/core/common/policy_loader_mac.h83
-rw-r--r--chromium/components/policy/core/common/policy_loader_mac_unittest.cc340
-rw-r--r--chromium/components/policy/core/common/policy_loader_win.cc651
-rw-r--r--chromium/components/policy/core/common/policy_loader_win.h125
-rw-r--r--chromium/components/policy/core/common/policy_loader_win_unittest.cc1186
-rw-r--r--chromium/components/policy/core/common/policy_map.cc207
-rw-r--r--chromium/components/policy/core/common/policy_map.h127
-rw-r--r--chromium/components/policy/core/common/policy_map_unittest.cc289
-rw-r--r--chromium/components/policy/core/common/policy_namespace.cc41
-rw-r--r--chromium/components/policy/core/common/policy_namespace.h52
-rw-r--r--chromium/components/policy/core/common/policy_pref_names.cc20
-rw-r--r--chromium/components/policy/core/common/policy_pref_names.h19
-rw-r--r--chromium/components/policy/core/common/policy_service.cc42
-rw-r--r--chromium/components/policy/core/common/policy_service.h115
-rw-r--r--chromium/components/policy/core/common/policy_service_impl.cc272
-rw-r--r--chromium/components/policy/core/common/policy_service_impl.h103
-rw-r--r--chromium/components/policy/core/common/policy_service_impl_unittest.cc650
-rw-r--r--chromium/components/policy/core/common/policy_service_stub.cc35
-rw-r--r--chromium/components/policy/core/common/policy_service_stub.h42
-rw-r--r--chromium/components/policy/core/common/policy_statistics_collector.cc94
-rw-r--r--chromium/components/policy/core/common/policy_statistics_collector.h69
-rw-r--r--chromium/components/policy/core/common/policy_statistics_collector_unittest.cc191
-rw-r--r--chromium/components/policy/core/common/policy_switches.cc31
-rw-r--r--chromium/components/policy/core/common/policy_switches.h26
-rw-r--r--chromium/components/policy/core/common/policy_test_utils.cc139
-rw-r--r--chromium/components/policy/core/common/policy_test_utils.h60
-rw-r--r--chromium/components/policy/core/common/policy_types.h33
-rw-r--r--chromium/components/policy/core/common/preferences_mac.cc19
-rw-r--r--chromium/components/policy/core/common/preferences_mac.h35
-rw-r--r--chromium/components/policy/core/common/preferences_mock_mac.cc47
-rw-r--r--chromium/components/policy/core/common/preferences_mock_mac.h34
-rw-r--r--chromium/components/policy/core/common/preg_parser_win.cc306
-rw-r--r--chromium/components/policy/core/common/preg_parser_win.h44
-rw-r--r--chromium/components/policy/core/common/preg_parser_win_unittest.cc119
-rw-r--r--chromium/components/policy/core/common/registry_dict_win.cc349
-rw-r--r--chromium/components/policy/core/common/registry_dict_win.h91
-rw-r--r--chromium/components/policy/core/common/registry_dict_win_unittest.cc271
-rw-r--r--chromium/components/policy/core/common/schema.cc587
-rw-r--r--chromium/components/policy/core/common/schema.h127
-rw-r--r--chromium/components/policy/core/common/schema_internal.h80
-rw-r--r--chromium/components/policy/core/common/schema_map.cc105
-rw-r--r--chromium/components/policy/core/common/schema_map.h65
-rw-r--r--chromium/components/policy/core/common/schema_map_unittest.cc313
-rw-r--r--chromium/components/policy/core/common/schema_registry.cc178
-rw-r--r--chromium/components/policy/core/common/schema_registry.h116
-rw-r--r--chromium/components/policy/core/common/schema_registry_unittest.cc242
-rw-r--r--chromium/components/policy/core/common/schema_unittest.cc686
-rw-r--r--chromium/components/policy/policy_browser.gypi65
-rw-r--r--chromium/components/policy/policy_common.gypi215
-rw-r--r--chromium/components/policy/policy_export.h29
-rw-r--r--chromium/components/policy/proto/PRESUBMIT.py67
-rw-r--r--chromium/components/policy/proto/chrome_extension_policy.proto43
-rw-r--r--chromium/components/policy/proto/device_management_backend.proto628
-rw-r--r--chromium/components/policy/proto/device_management_local.proto31
-rw-r--r--chromium/components/policy/resources/OWNERS10
-rw-r--r--chromium/components/policy/resources/PRESUBMIT.py120
-rw-r--r--chromium/components/policy/resources/policy_templates.grd301
-rw-r--r--chromium/components/policy/resources/policy_templates.json5895
-rw-r--r--chromium/components/policy/resources/policy_templates_am.xtb1890
-rw-r--r--chromium/components/policy/resources/policy_templates_ar.xtb1542
-rw-r--r--chromium/components/policy/resources/policy_templates_bg.xtb1581
-rw-r--r--chromium/components/policy/resources/policy_templates_bn.xtb1808
-rw-r--r--chromium/components/policy/resources/policy_templates_ca.xtb1531
-rw-r--r--chromium/components/policy/resources/policy_templates_cs.xtb1873
-rw-r--r--chromium/components/policy/resources/policy_templates_da.xtb1562
-rw-r--r--chromium/components/policy/resources/policy_templates_de.xtb1513
-rw-r--r--chromium/components/policy/resources/policy_templates_el.xtb1856
-rw-r--r--chromium/components/policy/resources/policy_templates_en-GB.xtb1879
-rw-r--r--chromium/components/policy/resources/policy_templates_es-419.xtb1516
-rw-r--r--chromium/components/policy/resources/policy_templates_es.xtb1887
-rw-r--r--chromium/components/policy/resources/policy_templates_et.xtb1841
-rw-r--r--chromium/components/policy/resources/policy_templates_fa.xtb1503
-rw-r--r--chromium/components/policy/resources/policy_templates_fi.xtb1514
-rw-r--r--chromium/components/policy/resources/policy_templates_fil.xtb1853
-rw-r--r--chromium/components/policy/resources/policy_templates_fr.xtb1874
-rw-r--r--chromium/components/policy/resources/policy_templates_gu.xtb1827
-rw-r--r--chromium/components/policy/resources/policy_templates_hi.xtb1721
-rw-r--r--chromium/components/policy/resources/policy_templates_hr.xtb1518
-rw-r--r--chromium/components/policy/resources/policy_templates_hu.xtb1512
-rw-r--r--chromium/components/policy/resources/policy_templates_id.xtb1514
-rw-r--r--chromium/components/policy/resources/policy_templates_it.xtb1577
-rw-r--r--chromium/components/policy/resources/policy_templates_iw.xtb1514
-rw-r--r--chromium/components/policy/resources/policy_templates_ja.xtb1533
-rw-r--r--chromium/components/policy/resources/policy_templates_kn.xtb1544
-rw-r--r--chromium/components/policy/resources/policy_templates_ko.xtb1865
-rw-r--r--chromium/components/policy/resources/policy_templates_lt.xtb1885
-rw-r--r--chromium/components/policy/resources/policy_templates_lv.xtb1874
-rw-r--r--chromium/components/policy/resources/policy_templates_ml.xtb1882
-rw-r--r--chromium/components/policy/resources/policy_templates_mr.xtb1820
-rw-r--r--chromium/components/policy/resources/policy_templates_ms.xtb1876
-rw-r--r--chromium/components/policy/resources/policy_templates_nl.xtb1872
-rw-r--r--chromium/components/policy/resources/policy_templates_no.xtb1758
-rw-r--r--chromium/components/policy/resources/policy_templates_pl.xtb1501
-rw-r--r--chromium/components/policy/resources/policy_templates_pt-BR.xtb1464
-rw-r--r--chromium/components/policy/resources/policy_templates_pt-PT.xtb1524
-rw-r--r--chromium/components/policy/resources/policy_templates_ro.xtb1514
-rw-r--r--chromium/components/policy/resources/policy_templates_ru.xtb1502
-rw-r--r--chromium/components/policy/resources/policy_templates_sk.xtb1856
-rw-r--r--chromium/components/policy/resources/policy_templates_sl.xtb1884
-rw-r--r--chromium/components/policy/resources/policy_templates_sr.xtb1861
-rw-r--r--chromium/components/policy/resources/policy_templates_sv.xtb1879
-rw-r--r--chromium/components/policy/resources/policy_templates_sw.xtb1851
-rw-r--r--chromium/components/policy/resources/policy_templates_ta.xtb1518
-rw-r--r--chromium/components/policy/resources/policy_templates_te.xtb1534
-rw-r--r--chromium/components/policy/resources/policy_templates_th.xtb1499
-rw-r--r--chromium/components/policy/resources/policy_templates_tr.xtb1852
-rw-r--r--chromium/components/policy/resources/policy_templates_uk.xtb1515
-rw-r--r--chromium/components/policy/resources/policy_templates_vi.xtb1825
-rw-r--r--chromium/components/policy/resources/policy_templates_zh-CN.xtb1526
-rw-r--r--chromium/components/policy/resources/policy_templates_zh-TW.xtb1528
-rwxr-xr-xchromium/components/policy/tools/generate_policy_source.py748
-rwxr-xr-xchromium/components/policy/tools/make_policy_zip.py83
-rwxr-xr-xchromium/components/policy/tools/syntax_check_policy_template_json.py501
-rw-r--r--chromium/components/policy_strings.grdp293
-rw-r--r--chromium/components/precache.gypi20
-rw-r--r--chromium/components/precache/DEPS8
-rw-r--r--chromium/components/precache/OWNERS2
-rw-r--r--chromium/components/precache/README11
-rw-r--r--chromium/components/precache/core/DEPS11
-rw-r--r--chromium/components/precache/core/precache_database.cc165
-rw-r--r--chromium/components/precache/core/precache_database.h79
-rw-r--r--chromium/components/precache/core/precache_database_unittest.cc388
-rw-r--r--chromium/components/precache/core/precache_fetcher.cc229
-rw-r--r--chromium/components/precache/core/precache_fetcher.h127
-rw-r--r--chromium/components/precache/core/precache_fetcher_unittest.cc300
-rw-r--r--chromium/components/precache/core/precache_switches.cc17
-rw-r--r--chromium/components/precache/core/precache_switches.h19
-rw-r--r--chromium/components/precache/core/precache_url_table.cc90
-rw-r--r--chromium/components/precache/core/precache_url_table.h61
-rw-r--r--chromium/components/precache/core/precache_url_table_unittest.cc116
-rw-r--r--chromium/components/precache/core/proto/precache.proto36
-rw-r--r--chromium/components/pref_registry.gypi43
-rw-r--r--chromium/components/query_parser.gypi26
-rw-r--r--chromium/components/rappor.gypi45
-rw-r--r--chromium/components/search_engines.gypi28
-rw-r--r--chromium/components/search_engines/prepopulated_engines.gyp24
-rw-r--r--chromium/components/search_provider_logos.gypi32
-rw-r--r--chromium/components/sessions.gypi5
-rw-r--r--chromium/components/sessions/DEPS7
-rw-r--r--chromium/components/sessions/OWNERS2
-rw-r--r--chromium/components/sessions/serialized_navigation_entry.cc488
-rw-r--r--chromium/components/sessions/serialized_navigation_entry.h162
-rw-r--r--chromium/components/sessions/serialized_navigation_entry_test_helper.cc85
-rw-r--r--chromium/components/sessions/serialized_navigation_entry_test_helper.h63
-rw-r--r--chromium/components/sessions/serialized_navigation_entry_unittest.cc299
-rw-r--r--chromium/components/sessions/sessions_export.h29
-rw-r--r--chromium/components/signin.gypi132
-rw-r--r--chromium/components/startup_metric_utils/OWNERS1
-rw-r--r--chromium/components/startup_metric_utils/startup_metric_utils.cc245
-rw-r--r--chromium/components/startup_metric_utils/startup_metric_utils.h75
-rw-r--r--chromium/components/storage_monitor.gypi124
-rw-r--r--chromium/components/strings/component_strings_am.xtb4
-rw-r--r--chromium/components/strings/component_strings_ar.xtb4
-rw-r--r--chromium/components/strings/component_strings_bg.xtb4
-rw-r--r--chromium/components/strings/component_strings_bn.xtb4
-rw-r--r--chromium/components/strings/component_strings_ca.xtb4
-rw-r--r--chromium/components/strings/component_strings_cs.xtb4
-rw-r--r--chromium/components/strings/component_strings_da.xtb4
-rw-r--r--chromium/components/strings/component_strings_de.xtb4
-rw-r--r--chromium/components/strings/component_strings_el.xtb4
-rw-r--r--chromium/components/strings/component_strings_en-GB.xtb4
-rw-r--r--chromium/components/strings/component_strings_es-419.xtb4
-rw-r--r--chromium/components/strings/component_strings_es.xtb4
-rw-r--r--chromium/components/strings/component_strings_et.xtb4
-rw-r--r--chromium/components/strings/component_strings_fa.xtb4
-rw-r--r--chromium/components/strings/component_strings_fi.xtb4
-rw-r--r--chromium/components/strings/component_strings_fil.xtb4
-rw-r--r--chromium/components/strings/component_strings_fr.xtb4
-rw-r--r--chromium/components/strings/component_strings_gu.xtb4
-rw-r--r--chromium/components/strings/component_strings_hi.xtb4
-rw-r--r--chromium/components/strings/component_strings_hr.xtb4
-rw-r--r--chromium/components/strings/component_strings_hu.xtb4
-rw-r--r--chromium/components/strings/component_strings_id.xtb4
-rw-r--r--chromium/components/strings/component_strings_it.xtb4
-rw-r--r--chromium/components/strings/component_strings_iw.xtb4
-rw-r--r--chromium/components/strings/component_strings_ja.xtb4
-rw-r--r--chromium/components/strings/component_strings_kn.xtb4
-rw-r--r--chromium/components/strings/component_strings_ko.xtb4
-rw-r--r--chromium/components/strings/component_strings_lt.xtb4
-rw-r--r--chromium/components/strings/component_strings_lv.xtb4
-rw-r--r--chromium/components/strings/component_strings_ml.xtb4
-rw-r--r--chromium/components/strings/component_strings_mr.xtb4
-rw-r--r--chromium/components/strings/component_strings_ms.xtb4
-rw-r--r--chromium/components/strings/component_strings_nl.xtb4
-rw-r--r--chromium/components/strings/component_strings_no.xtb4
-rw-r--r--chromium/components/strings/component_strings_pl.xtb4
-rw-r--r--chromium/components/strings/component_strings_pt-BR.xtb4
-rw-r--r--chromium/components/strings/component_strings_pt-PT.xtb4
-rw-r--r--chromium/components/strings/component_strings_ro.xtb4
-rw-r--r--chromium/components/strings/component_strings_ru.xtb4
-rw-r--r--chromium/components/strings/component_strings_sk.xtb4
-rw-r--r--chromium/components/strings/component_strings_sl.xtb4
-rw-r--r--chromium/components/strings/component_strings_sr.xtb4
-rw-r--r--chromium/components/strings/component_strings_sv.xtb4
-rw-r--r--chromium/components/strings/component_strings_sw.xtb4
-rw-r--r--chromium/components/strings/component_strings_ta.xtb4
-rw-r--r--chromium/components/strings/component_strings_te.xtb4
-rw-r--r--chromium/components/strings/component_strings_th.xtb4
-rw-r--r--chromium/components/strings/component_strings_tr.xtb4
-rw-r--r--chromium/components/strings/component_strings_uk.xtb4
-rw-r--r--chromium/components/strings/component_strings_vi.xtb4
-rw-r--r--chromium/components/strings/component_strings_zh-CN.xtb4
-rw-r--r--chromium/components/strings/component_strings_zh-TW.xtb4
-rw-r--r--chromium/components/sync_driver.gypi102
-rwxr-xr-xchromium/components/tools/metrics/browser_components_metrics.py65
-rwxr-xr-xchromium/components/tools/metrics/count_ifdefs.py77
-rwxr-xr-xchromium/components/tools/metrics/count_ifdefs_unittest.py30
-rw-r--r--chromium/components/tracing/BUILD.gn17
-rw-r--r--chromium/components/tracing/DEPS4
-rw-r--r--chromium/components/tracing/OWNERS6
-rw-r--r--chromium/components/tracing/child_trace_message_filter.cc25
-rw-r--r--chromium/components/tracing/child_trace_message_filter.h10
-rw-r--r--chromium/components/tracing_nacl.gyp42
-rw-r--r--chromium/components/tracing_untrusted.gyp42
-rw-r--r--chromium/components/translate.gypi127
-rw-r--r--chromium/components/translate/DEPS4
-rw-r--r--chromium/components/translate/OWNERS3
-rw-r--r--chromium/components/translate/README8
-rw-r--r--chromium/components/translate/common/translate_constants.cc11
-rw-r--r--chromium/components/translate/common/translate_constants.h16
-rw-r--r--chromium/components/translate/common/translate_metrics.cc130
-rw-r--r--chromium/components/translate/common/translate_metrics.h104
-rw-r--r--chromium/components/translate/common/translate_metrics_unittest.cc284
-rw-r--r--chromium/components/translate/common/translate_switches.cc14
-rw-r--r--chromium/components/translate/common/translate_switches.h16
-rw-r--r--chromium/components/translate/common/translate_util.cc125
-rw-r--r--chromium/components/translate/common/translate_util.h28
-rw-r--r--chromium/components/translate/common/translate_util_unittest.cc96
-rw-r--r--chromium/components/translate/language_detection/DEPS6
-rw-r--r--chromium/components/translate/language_detection/language_detection_util.cc386
-rw-r--r--chromium/components/translate/language_detection/language_detection_util.h44
-rw-r--r--chromium/components/translate/language_detection/language_detection_util_unittest.cc173
-rw-r--r--chromium/components/url_fixer.gypi25
-rw-r--r--chromium/components/url_matcher.gypi2
-rw-r--r--chromium/components/url_matcher/DEPS3
-rw-r--r--chromium/components/url_matcher/OWNERS1
-rw-r--r--chromium/components/url_matcher/regex_set_matcher.cc113
-rw-r--r--chromium/components/url_matcher/regex_set_matcher.h83
-rw-r--r--chromium/components/url_matcher/regex_set_matcher_unittest.cc62
-rw-r--r--chromium/components/url_matcher/string_pattern.cc20
-rw-r--r--chromium/components/url_matcher/string_pattern.h43
-rw-r--r--chromium/components/url_matcher/string_pattern_unittest.cc25
-rw-r--r--chromium/components/url_matcher/substring_set_matcher.cc272
-rw-r--r--chromium/components/url_matcher/substring_set_matcher.h141
-rw-r--r--chromium/components/url_matcher/substring_set_matcher_unittest.cc170
-rw-r--r--chromium/components/url_matcher/url_matcher.cc880
-rw-r--r--chromium/components/url_matcher/url_matcher.h357
-rw-r--r--chromium/components/url_matcher/url_matcher_constants.cc34
-rw-r--r--chromium/components/url_matcher/url_matcher_constants.h41
-rw-r--r--chromium/components/url_matcher/url_matcher_export.h29
-rw-r--r--chromium/components/url_matcher/url_matcher_factory.cc273
-rw-r--r--chromium/components/url_matcher/url_matcher_factory.h63
-rw-r--r--chromium/components/url_matcher/url_matcher_factory_unittest.cc339
-rw-r--r--chromium/components/url_matcher/url_matcher_helpers.cc31
-rw-r--r--chromium/components/url_matcher/url_matcher_helpers.h27
-rw-r--r--chromium/components/url_matcher/url_matcher_unittest.cc682
-rw-r--r--chromium/components/usb_service.gypi47
-rw-r--r--chromium/components/user_prefs.gypi3
-rw-r--r--chromium/components/user_prefs/DEPS4
-rw-r--r--chromium/components/user_prefs/OWNERS4
-rw-r--r--chromium/components/user_prefs/README8
-rw-r--r--chromium/components/user_prefs/pref_registry_syncable.cc225
-rw-r--r--chromium/components/user_prefs/pref_registry_syncable.h132
-rw-r--r--chromium/components/user_prefs/user_prefs.cc47
-rw-r--r--chromium/components/user_prefs/user_prefs.h48
-rw-r--r--chromium/components/user_prefs/user_prefs_export.h29
-rw-r--r--chromium/components/variations.gypi17
-rw-r--r--chromium/components/variations/OWNERS3
-rw-r--r--chromium/components/variations/entropy_provider.cc119
-rw-r--r--chromium/components/variations/entropy_provider.h94
-rw-r--r--chromium/components/variations/entropy_provider_unittest.cc369
-rw-r--r--chromium/components/variations/metrics_util.cc27
-rw-r--r--chromium/components/variations/metrics_util.h20
-rw-r--r--chromium/components/variations/metrics_util_unittest.cc31
-rw-r--r--chromium/components/variations/processed_study.cc107
-rw-r--r--chromium/components/variations/processed_study.h51
-rw-r--r--chromium/components/variations/proto/study.proto188
-rw-r--r--chromium/components/variations/proto/variations_seed.proto22
-rw-r--r--chromium/components/variations/variations_associated_data.cc236
-rw-r--r--chromium/components/variations/variations_associated_data.h155
-rw-r--r--chromium/components/variations/variations_associated_data_unittest.cc311
-rw-r--r--chromium/components/variations/variations_seed_processor.cc367
-rw-r--r--chromium/components/variations/variations_seed_processor.h138
-rw-r--r--chromium/components/variations/variations_seed_processor_unittest.cc745
-rw-r--r--chromium/components/visitedlink/OWNERS2
-rw-r--r--chromium/components/visitedlink/browser/DEPS3
-rw-r--r--chromium/components/visitedlink/browser/visitedlink_delegate.h51
-rw-r--r--chromium/components/visitedlink/browser/visitedlink_event_listener.cc219
-rw-r--r--chromium/components/visitedlink/browser/visitedlink_event_listener.h70
-rw-r--r--chromium/components/visitedlink/browser/visitedlink_master.cc987
-rw-r--r--chromium/components/visitedlink/browser/visitedlink_master.h445
-rw-r--r--chromium/components/visitedlink/common/DEPS3
-rw-r--r--chromium/components/visitedlink/common/OWNERS8
-rw-r--r--chromium/components/visitedlink/common/visitedlink_common.cc102
-rw-r--r--chromium/components/visitedlink/common/visitedlink_common.h138
-rw-r--r--chromium/components/visitedlink/common/visitedlink_message_generator.cc34
-rw-r--r--chromium/components/visitedlink/common/visitedlink_message_generator.h7
-rw-r--r--chromium/components/visitedlink/common/visitedlink_messages.h29
-rw-r--r--chromium/components/visitedlink/renderer/DEPS5
-rw-r--r--chromium/components/visitedlink/renderer/visitedlink_slave.cc92
-rw-r--r--chromium/components/visitedlink/renderer/visitedlink_slave.h42
-rw-r--r--chromium/components/web_contents_delegate_android.gypi5
-rw-r--r--chromium/components/web_contents_delegate_android/DEPS6
-rw-r--r--chromium/components/web_contents_delegate_android/OWNERS2
-rw-r--r--chromium/components/web_contents_delegate_android/android/DEPS4
-rw-r--r--chromium/components/web_contents_delegate_android/color_chooser_android.cc83
-rw-r--r--chromium/components/web_contents_delegate_android/color_chooser_android.h54
-rw-r--r--chromium/components/web_contents_delegate_android/validation_message_bubble_android.cc70
-rw-r--r--chromium/components/web_contents_delegate_android/validation_message_bubble_android.h44
-rw-r--r--chromium/components/web_contents_delegate_android/web_contents_delegate_android.cc357
-rw-r--r--chromium/components/web_contents_delegate_android/web_contents_delegate_android.h117
-rw-r--r--chromium/components/web_modal.gypi2
-rw-r--r--chromium/components/web_modal/DEPS6
-rw-r--r--chromium/components/web_modal/OWNERS2
-rw-r--r--chromium/components/web_modal/modal_dialog_host.cc15
-rw-r--r--chromium/components/web_modal/modal_dialog_host.h44
-rw-r--r--chromium/components/web_modal/native_web_contents_modal_dialog.h22
-rw-r--r--chromium/components/web_modal/native_web_contents_modal_dialog_manager.h71
-rw-r--r--chromium/components/web_modal/test_web_contents_modal_dialog_host.cc36
-rw-r--r--chromium/components/web_modal/test_web_contents_modal_dialog_host.h42
-rw-r--r--chromium/components/web_modal/test_web_contents_modal_dialog_manager_delegate.cc31
-rw-r--r--chromium/components/web_modal/test_web_contents_modal_dialog_manager_delegate.h49
-rw-r--r--chromium/components/web_modal/web_contents_modal_dialog_host.cc12
-rw-r--r--chromium/components/web_modal/web_contents_modal_dialog_host.h30
-rw-r--r--chromium/components/web_modal/web_contents_modal_dialog_manager.cc187
-rw-r--r--chromium/components/web_modal/web_contents_modal_dialog_manager.h126
-rw-r--r--chromium/components/web_modal/web_contents_modal_dialog_manager_delegate.cc28
-rw-r--r--chromium/components/web_modal/web_contents_modal_dialog_manager_delegate.h42
-rw-r--r--chromium/components/web_modal/web_contents_modal_dialog_manager_unittest.cc299
-rw-r--r--chromium/components/webdata.gypi28
-rw-r--r--chromium/components/webdata/DEPS23
-rw-r--r--chromium/components/webdata/OWNERS5
-rw-r--r--chromium/components/webdata/README5
-rw-r--r--chromium/components/webdata/common/web_data_request_manager.cc145
-rw-r--r--chromium/components/webdata/common/web_data_request_manager.h138
-rw-r--r--chromium/components/webdata/common/web_data_results.h135
-rw-r--r--chromium/components/webdata/common/web_data_service_backend.cc124
-rw-r--r--chromium/components/webdata/common/web_data_service_backend.h130
-rw-r--r--chromium/components/webdata/common/web_data_service_base.cc78
-rw-r--r--chromium/components/webdata/common/web_data_service_base.h103
-rw-r--r--chromium/components/webdata/common/web_data_service_consumer.h26
-rw-r--r--chromium/components/webdata/common/web_data_service_test_util.cc46
-rw-r--r--chromium/components/webdata/common/web_data_service_test_util.h54
-rw-r--r--chromium/components/webdata/common/web_database.cc167
-rw-r--r--chromium/components/webdata/common/web_database.h73
-rw-r--r--chromium/components/webdata/common/web_database_migration_unittest.cc2271
-rw-r--r--chromium/components/webdata/common/web_database_service.cc181
-rw-r--r--chromium/components/webdata/common/web_database_service.h155
-rw-r--r--chromium/components/webdata/common/web_database_table.cc17
-rw-r--r--chromium/components/webdata/common/web_database_table.h66
-rw-r--r--chromium/components/webdata/common/webdata_constants.cc8
-rw-r--r--chromium/components/webdata/common/webdata_constants.h13
-rw-r--r--chromium/components/webdata/common/webdata_export.h29
-rw-r--r--chromium/components/webdata/encryptor/DEPS4
-rw-r--r--chromium/components/webdata/encryptor/OWNERS1
-rw-r--r--chromium/components/webdata/encryptor/README4
-rw-r--r--chromium/components/webdata/encryptor/encryptor.h51
-rw-r--r--chromium/components/webdata/encryptor/encryptor_mac.mm150
-rw-r--r--chromium/components/webdata/encryptor/encryptor_password_mac.h35
-rw-r--r--chromium/components/webdata/encryptor/encryptor_password_mac.mm79
-rw-r--r--chromium/components/webdata/encryptor/encryptor_password_mac_unittest.cc79
-rw-r--r--chromium/components/webdata/encryptor/encryptor_posix.cc139
-rw-r--r--chromium/components/webdata/encryptor/encryptor_unittest.cc143
-rw-r--r--chromium/components/webdata/encryptor/encryptor_win.cc65
-rw-r--r--chromium/components/webdata/encryptor/ie7_password_unittest_win.cc90
-rw-r--r--chromium/components/webdata/encryptor/ie7_password_win.cc148
-rw-r--r--chromium/components/webdata/encryptor/ie7_password_win.h54
-rw-r--r--chromium/components/wifi.gypi34
-rw-r--r--chromium/components/wifi/DEPS4
-rw-r--r--chromium/components/wifi/OWNERS1
-rw-r--r--chromium/components/wifi/fake_wifi_service.cc318
-rw-r--r--chromium/components/wifi/wifi_export.h29
-rw-r--r--chromium/components/wifi/wifi_service.cc113
-rw-r--r--chromium/components/wifi/wifi_service.h161
-rw-r--r--chromium/components/wifi/wifi_service_test.cc146
-rw-r--r--chromium/components/wifi/wifi_service_win.cc1589
-rw-r--r--chromium/components/wifi/wifi_test.cc206
-rw-r--r--chromium/content/BUILD.gn125
-rw-r--r--chromium/content/DEPS10
-rw-r--r--chromium/content/OWNERS9
-rw-r--r--chromium/content/app/BUILD.gn62
-rw-r--r--chromium/content/app/android/child_process_service.cc46
-rw-r--r--chromium/content/app/android/content_main.cc10
-rw-r--r--chromium/content/app/android/library_loader_hooks.cc68
-rw-r--r--chromium/content/app/content_main.cc20
-rw-r--r--chromium/content/app/content_main_runner.cc261
-rw-r--r--chromium/content/app/mojo/mojo_browsertest.cc29
-rw-r--r--chromium/content/app/mojo/mojo_init.cc18
-rw-r--r--chromium/content/app/mojo/mojo_init.h17
-rw-r--r--chromium/content/browser/BUILD.gn370
-rw-r--r--chromium/content/browser/DEPS12
-rw-r--r--chromium/content/browser/accessibility/OWNERS1
-rw-r--r--chromium/content/browser/accessibility/accessibility_mode_browsertest.cc103
-rw-r--r--chromium/content/browser/accessibility/accessibility_mode_helper.cc56
-rw-r--r--chromium/content/browser/accessibility/accessibility_mode_helper.h28
-rw-r--r--chromium/content/browser/accessibility/accessibility_mode_helper_unittest.cc53
-rw-r--r--chromium/content/browser/accessibility/accessibility_tree_formatter.cc23
-rw-r--r--chromium/content/browser/accessibility/accessibility_tree_formatter_android.cc9
-rw-r--r--chromium/content/browser/accessibility/accessibility_tree_formatter_gtk.cc109
-rw-r--r--chromium/content/browser/accessibility/accessibility_tree_formatter_mac.mm81
-rw-r--r--chromium/content/browser/accessibility/accessibility_tree_formatter_utils_win.cc10
-rw-r--r--chromium/content/browser/accessibility/accessibility_tree_formatter_win.cc17
-rw-r--r--chromium/content/browser/accessibility/accessibility_ui.cc72
-rw-r--r--chromium/content/browser/accessibility/accessibility_ui.h1
-rw-r--r--chromium/content/browser/accessibility/accessibility_win_browsertest.cc218
-rw-r--r--chromium/content/browser/accessibility/android_hit_testing_browsertest.cc81
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility.cc482
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility.h185
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_android.cc310
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_android.h8
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_cocoa.h26
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_cocoa.mm689
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_delegate_mac.h27
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_gtk.cc518
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_gtk.h92
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_mac.h14
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_mac.mm36
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_mac_unittest.mm63
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_manager.cc455
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_manager.h128
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_manager_android.cc265
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_manager_android.h34
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_manager_gtk.cc82
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_manager_gtk.h48
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_manager_mac.h13
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_manager_mac.mm120
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_manager_unittest.cc436
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_manager_win.cc297
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_manager_win.h35
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_state_impl.cc100
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_state_impl.h18
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_win.cc789
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_win.h35
-rw-r--r--chromium/content/browser/accessibility/browser_accessibility_win_unittest.cc231
-rw-r--r--chromium/content/browser/accessibility/cross_platform_accessibility_browsertest.cc380
-rw-r--r--chromium/content/browser/accessibility/dump_accessibility_tree_browsertest.cc80
-rw-r--r--chromium/content/browser/android/child_process_launcher_android.cc95
-rw-r--r--chromium/content/browser/android/child_process_launcher_android.h18
-rw-r--r--chromium/content/browser/android/content_readback_handler.cc125
-rw-r--r--chromium/content/browser/android/content_readback_handler.h62
-rw-r--r--chromium/content/browser/android/content_settings.cc2
-rw-r--r--chromium/content/browser/android/content_settings.h4
-rw-r--r--chromium/content/browser/android/content_startup_flags.cc38
-rw-r--r--chromium/content/browser/android/content_video_view.cc83
-rw-r--r--chromium/content/browser/android/content_video_view.h22
-rw-r--r--chromium/content/browser/android/content_view_core_impl.cc964
-rw-r--r--chromium/content/browser/android/content_view_core_impl.h180
-rw-r--r--chromium/content/browser/android/content_view_render_view.cc96
-rw-r--r--chromium/content/browser/android/content_view_render_view.h30
-rw-r--r--chromium/content/browser/android/content_view_statics.cc84
-rw-r--r--chromium/content/browser/android/date_time_chooser_android.cc8
-rw-r--r--chromium/content/browser/android/date_time_chooser_android.h2
-rw-r--r--chromium/content/browser/android/download_controller_android_impl.cc10
-rw-r--r--chromium/content/browser/android/download_controller_android_impl.h2
-rw-r--r--chromium/content/browser/android/edge_effect.cc130
-rw-r--r--chromium/content/browser/android/edge_effect.h9
-rw-r--r--chromium/content/browser/android/gesture_event_type.h19
-rw-r--r--chromium/content/browser/android/gesture_event_type_list.h33
-rw-r--r--chromium/content/browser/android/in_process/synchronous_compositor_factory_impl.cc267
-rw-r--r--chromium/content/browser/android/in_process/synchronous_compositor_factory_impl.h86
-rw-r--r--chromium/content/browser/android/in_process/synchronous_compositor_impl.cc360
-rw-r--r--chromium/content/browser/android/in_process/synchronous_compositor_impl.h35
-rw-r--r--chromium/content/browser/android/in_process/synchronous_compositor_output_surface.cc126
-rw-r--r--chromium/content/browser/android/in_process/synchronous_compositor_output_surface.h29
-rw-r--r--chromium/content/browser/android/in_process/synchronous_input_event_filter.cc11
-rw-r--r--chromium/content/browser/android/in_process/synchronous_input_event_filter.h5
-rw-r--r--chromium/content/browser/android/interstitial_page_delegate_android.h2
-rw-r--r--chromium/content/browser/android/load_url_params.cc2
-rw-r--r--chromium/content/browser/android/overscroll_glow.cc152
-rw-r--r--chromium/content/browser/android/overscroll_glow.h44
-rw-r--r--chromium/content/browser/android/surface_texture_peer_browser_impl.cc56
-rw-r--r--chromium/content/browser/android/surface_texture_peer_browser_impl.h2
-rw-r--r--chromium/content/browser/android/touch_point.cc123
-rw-r--r--chromium/content/browser/android/touch_point.h30
-rw-r--r--chromium/content/browser/android/tracing_controller_android.cc50
-rw-r--r--chromium/content/browser/android/tracing_controller_android.h12
-rw-r--r--chromium/content/browser/android/ui_resource_provider_impl.cc60
-rw-r--r--chromium/content/browser/android/ui_resource_provider_impl.h46
-rw-r--r--chromium/content/browser/android/web_contents_observer_android.cc67
-rw-r--r--chromium/content/browser/android/web_contents_observer_android.h9
-rw-r--r--chromium/content/browser/appcache/appcache_database_unittest.cc1216
-rw-r--r--chromium/content/browser/appcache/appcache_disk_cache_unittest.cc188
-rw-r--r--chromium/content/browser/appcache/appcache_dispatcher_host.cc16
-rw-r--r--chromium/content/browser/appcache/appcache_dispatcher_host.h5
-rw-r--r--chromium/content/browser/appcache/appcache_frontend_proxy.cc14
-rw-r--r--chromium/content/browser/appcache/appcache_frontend_proxy.h9
-rw-r--r--chromium/content/browser/appcache/appcache_group_unittest.cc309
-rw-r--r--chromium/content/browser/appcache/appcache_host_unittest.cc554
-rw-r--r--chromium/content/browser/appcache/appcache_interceptor.cc128
-rw-r--r--chromium/content/browser/appcache/appcache_interceptor.h82
-rw-r--r--chromium/content/browser/appcache/appcache_quota_client_unittest.cc437
-rw-r--r--chromium/content/browser/appcache/appcache_request_handler_unittest.cc1014
-rw-r--r--chromium/content/browser/appcache/appcache_response_unittest.cc722
-rw-r--r--chromium/content/browser/appcache/appcache_service_unittest.cc386
-rw-r--r--chromium/content/browser/appcache/appcache_storage_impl_unittest.cc2050
-rw-r--r--chromium/content/browser/appcache/appcache_storage_unittest.cc171
-rw-r--r--chromium/content/browser/appcache/appcache_unittest.cc719
-rw-r--r--chromium/content/browser/appcache/appcache_update_job_unittest.cc3720
-rw-r--r--chromium/content/browser/appcache/appcache_url_request_job_unittest.cc869
-rw-r--r--chromium/content/browser/appcache/chrome_appcache_service.cc11
-rw-r--r--chromium/content/browser/appcache/chrome_appcache_service.h13
-rw-r--r--chromium/content/browser/appcache/chrome_appcache_service_unittest.cc27
-rw-r--r--chromium/content/browser/appcache/manifest_parser_unittest.cc524
-rw-r--r--chromium/content/browser/appcache/mock_appcache_policy.cc28
-rw-r--r--chromium/content/browser/appcache/mock_appcache_policy.h31
-rw-r--r--chromium/content/browser/appcache/mock_appcache_service.cc27
-rw-r--r--chromium/content/browser/appcache/mock_appcache_service.h50
-rw-r--r--chromium/content/browser/appcache/mock_appcache_storage.cc551
-rw-r--r--chromium/content/browser/appcache/mock_appcache_storage.h254
-rw-r--r--chromium/content/browser/appcache/mock_appcache_storage_unittest.cc646
-rw-r--r--chromium/content/browser/appcache/view_appcache_internals_job.cc681
-rw-r--r--chromium/content/browser/appcache/view_appcache_internals_job.h35
-rw-r--r--chromium/content/browser/aura/browser_compositor_output_surface.cc106
-rw-r--r--chromium/content/browser/aura/browser_compositor_output_surface.h74
-rw-r--r--chromium/content/browser/aura/browser_compositor_output_surface_proxy.cc58
-rw-r--r--chromium/content/browser/aura/browser_compositor_output_surface_proxy.h51
-rw-r--r--chromium/content/browser/aura/compositor_resize_lock.cc65
-rw-r--r--chromium/content/browser/aura/compositor_resize_lock.h46
-rw-r--r--chromium/content/browser/aura/gpu_browser_compositor_output_surface.cc51
-rw-r--r--chromium/content/browser/aura/gpu_browser_compositor_output_surface.h36
-rw-r--r--chromium/content/browser/aura/gpu_process_transport_factory.cc515
-rw-r--r--chromium/content/browser/aura/gpu_process_transport_factory.h99
-rw-r--r--chromium/content/browser/aura/image_transport_factory.cc49
-rw-r--r--chromium/content/browser/aura/image_transport_factory.h106
-rw-r--r--chromium/content/browser/aura/image_transport_factory_browsertest.cc69
-rw-r--r--chromium/content/browser/aura/no_transport_image_transport_factory.cc96
-rw-r--r--chromium/content/browser/aura/no_transport_image_transport_factory.h51
-rw-r--r--chromium/content/browser/aura/owned_mailbox.cc42
-rw-r--r--chromium/content/browser/aura/owned_mailbox.h41
-rw-r--r--chromium/content/browser/aura/reflector_impl.cc182
-rw-r--r--chromium/content/browser/aura/reflector_impl.h125
-rw-r--r--chromium/content/browser/aura/resize_lock.cc35
-rw-r--r--chromium/content/browser/aura/resize_lock.h37
-rw-r--r--chromium/content/browser/aura/software_browser_compositor_output_surface.cc58
-rw-r--r--chromium/content/browser/aura/software_browser_compositor_output_surface.h50
-rw-r--r--chromium/content/browser/aura/software_browser_compositor_output_surface_unittest.cc147
-rw-r--r--chromium/content/browser/aura/software_output_device_ozone.cc73
-rw-r--r--chromium/content/browser/aura/software_output_device_ozone.h41
-rw-r--r--chromium/content/browser/aura/software_output_device_ozone_unittest.cc195
-rw-r--r--chromium/content/browser/aura/software_output_device_win.cc103
-rw-r--r--chromium/content/browser/aura/software_output_device_win.h42
-rw-r--r--chromium/content/browser/aura/software_output_device_x11.cc87
-rw-r--r--chromium/content/browser/aura/software_output_device_x11.h38
-rw-r--r--chromium/content/browser/battery_status/OWNERS1
-rw-r--r--chromium/content/browser/battery_status/battery_status_browsertest.cc167
-rw-r--r--chromium/content/browser/battery_status/battery_status_manager.h57
-rw-r--r--chromium/content/browser/battery_status/battery_status_manager_android.cc56
-rw-r--r--chromium/content/browser/battery_status/battery_status_manager_default.cc31
-rw-r--r--chromium/content/browser/battery_status/battery_status_message_filter.cc56
-rw-r--r--chromium/content/browser/battery_status/battery_status_message_filter.h36
-rw-r--r--chromium/content/browser/battery_status/battery_status_service.cc106
-rw-r--r--chromium/content/browser/battery_status/battery_status_service.h66
-rw-r--r--chromium/content/browser/battery_status/battery_status_service_unittest.cc193
-rw-r--r--chromium/content/browser/bookmarklet_browsertest.cc6
-rw-r--r--chromium/content/browser/bootstrap_sandbox_mac.cc149
-rw-r--r--chromium/content/browser/bootstrap_sandbox_mac.h25
-rw-r--r--chromium/content/browser/browser.gni15
-rw-r--r--chromium/content/browser/browser_child_process_host_impl.cc37
-rw-r--r--chromium/content/browser/browser_child_process_host_impl.h32
-rw-r--r--chromium/content/browser/browser_context.cc48
-rw-r--r--chromium/content/browser/browser_main_loop.cc311
-rw-r--r--chromium/content/browser/browser_main_loop.h28
-rw-r--r--chromium/content/browser/browser_main_runner.cc21
-rw-r--r--chromium/content/browser/browser_plugin/browser_plugin_embedder.cc212
-rw-r--r--chromium/content/browser/browser_plugin/browser_plugin_embedder.h69
-rw-r--r--chromium/content/browser/browser_plugin/browser_plugin_geolocation_permission_context.cc94
-rw-r--r--chromium/content/browser/browser_plugin/browser_plugin_geolocation_permission_context.h44
-rw-r--r--chromium/content/browser/browser_plugin/browser_plugin_guest.cc1312
-rw-r--r--chromium/content/browser/browser_plugin/browser_plugin_guest.h371
-rw-r--r--chromium/content/browser/browser_plugin/browser_plugin_guest_manager.cc244
-rw-r--r--chromium/content/browser/browser_plugin/browser_plugin_guest_manager.h138
-rw-r--r--chromium/content/browser/browser_plugin/browser_plugin_host_browsertest.cc1039
-rw-r--r--chromium/content/browser/browser_plugin/browser_plugin_host_factory.h41
-rw-r--r--chromium/content/browser/browser_plugin/browser_plugin_message_filter.cc69
-rw-r--r--chromium/content/browser/browser_plugin/browser_plugin_message_filter.h13
-rw-r--r--chromium/content/browser/browser_plugin/test_browser_plugin_embedder.cc40
-rw-r--r--chromium/content/browser/browser_plugin/test_browser_plugin_embedder.h47
-rw-r--r--chromium/content/browser/browser_plugin/test_browser_plugin_guest.cc254
-rw-r--r--chromium/content/browser/browser_plugin/test_browser_plugin_guest.h115
-rw-r--r--chromium/content/browser/browser_plugin/test_browser_plugin_guest_delegate.cc68
-rw-r--r--chromium/content/browser/browser_plugin/test_browser_plugin_guest_delegate.h52
-rw-r--r--chromium/content/browser/browser_plugin/test_browser_plugin_guest_manager.cc35
-rw-r--r--chromium/content/browser/browser_plugin/test_browser_plugin_guest_manager.h51
-rw-r--r--chromium/content/browser/browser_thread_impl.cc130
-rw-r--r--chromium/content/browser/browser_url_handler_impl.cc42
-rw-r--r--chromium/content/browser/browsing_instance.cc4
-rw-r--r--chromium/content/browser/browsing_instance.h15
-rw-r--r--chromium/content/browser/byte_stream.cc6
-rw-r--r--chromium/content/browser/child_process_launcher.cc123
-rw-r--r--chromium/content/browser/child_process_launcher.h12
-rw-r--r--chromium/content/browser/child_process_security_policy_browsertest.cc4
-rw-r--r--chromium/content/browser/child_process_security_policy_impl.cc49
-rw-r--r--chromium/content/browser/child_process_security_policy_impl.h7
-rw-r--r--chromium/content/browser/child_process_security_policy_unittest.cc149
-rw-r--r--chromium/content/browser/compositor/OWNERS (renamed from chromium/content/browser/aura/OWNERS)0
-rw-r--r--chromium/content/browser/compositor/browser_compositor_output_surface.cc107
-rw-r--r--chromium/content/browser/compositor/browser_compositor_output_surface.h76
-rw-r--r--chromium/content/browser/compositor/browser_compositor_output_surface_proxy.cc58
-rw-r--r--chromium/content/browser/compositor/browser_compositor_output_surface_proxy.h51
-rw-r--r--chromium/content/browser/compositor/browser_compositor_view_mac.h64
-rw-r--r--chromium/content/browser/compositor/browser_compositor_view_mac.mm256
-rw-r--r--chromium/content/browser/compositor/delegated_frame_host.cc852
-rw-r--r--chromium/content/browser/compositor/delegated_frame_host.h285
-rw-r--r--chromium/content/browser/compositor/gpu_browser_compositor_output_surface.cc52
-rw-r--r--chromium/content/browser/compositor/gpu_browser_compositor_output_surface.h44
-rw-r--r--chromium/content/browser/compositor/gpu_process_transport_factory.cc447
-rw-r--r--chromium/content/browser/compositor/gpu_process_transport_factory.h101
-rw-r--r--chromium/content/browser/compositor/image_transport_factory.cc62
-rw-r--r--chromium/content/browser/compositor/image_transport_factory.h87
-rw-r--r--chromium/content/browser/compositor/image_transport_factory_browsertest.cc110
-rw-r--r--chromium/content/browser/compositor/no_transport_image_transport_factory.cc53
-rw-r--r--chromium/content/browser/compositor/no_transport_image_transport_factory.h46
-rw-r--r--chromium/content/browser/compositor/onscreen_display_client.cc31
-rw-r--r--chromium/content/browser/compositor/onscreen_display_client.h46
-rw-r--r--chromium/content/browser/compositor/overlay_candidate_validator_ozone.cc57
-rw-r--r--chromium/content/browser/compositor/overlay_candidate_validator_ozone.h39
-rw-r--r--chromium/content/browser/compositor/owned_mailbox.cc44
-rw-r--r--chromium/content/browser/compositor/owned_mailbox.h49
-rw-r--r--chromium/content/browser/compositor/reflector_impl.cc245
-rw-r--r--chromium/content/browser/compositor/reflector_impl.h140
-rw-r--r--chromium/content/browser/compositor/resize_lock.cc35
-rw-r--r--chromium/content/browser/compositor/resize_lock.h37
-rw-r--r--chromium/content/browser/compositor/software_browser_compositor_output_surface.cc56
-rw-r--r--chromium/content/browser/compositor/software_browser_compositor_output_surface.h48
-rw-r--r--chromium/content/browser/compositor/software_browser_compositor_output_surface_unittest.cc148
-rw-r--r--chromium/content/browser/compositor/software_output_device_mac.h35
-rw-r--r--chromium/content/browser/compositor/software_output_device_mac.mm30
-rw-r--r--chromium/content/browser/compositor/software_output_device_ozone.cc60
-rw-r--r--chromium/content/browser/compositor/software_output_device_ozone.h43
-rw-r--r--chromium/content/browser/compositor/software_output_device_ozone_unittest.cc195
-rw-r--r--chromium/content/browser/compositor/software_output_device_win.cc107
-rw-r--r--chromium/content/browser/compositor/software_output_device_win.h45
-rw-r--r--chromium/content/browser/compositor/software_output_device_x11.cc138
-rw-r--r--chromium/content/browser/compositor/software_output_device_x11.h38
-rw-r--r--chromium/content/browser/compositor/surface_display_output_surface.cc49
-rw-r--r--chromium/content/browser/compositor/surface_display_output_surface.h41
-rw-r--r--chromium/content/browser/context_factory.cc16
-rw-r--r--chromium/content/browser/cross_site_transfer_browsertest.cc466
-rw-r--r--chromium/content/browser/database_browsertest.cc4
-rw-r--r--chromium/content/browser/database_quota_client_unittest.cc289
-rw-r--r--chromium/content/browser/database_tracker_unittest.cc875
-rw-r--r--chromium/content/browser/database_util_unittest.cc79
-rw-r--r--chromium/content/browser/databases_table_unittest.cc152
-rw-r--r--chromium/content/browser/device_monitor_mac.h12
-rw-r--r--chromium/content/browser/device_monitor_mac.mm246
-rw-r--r--chromium/content/browser/device_orientation/data_fetcher_impl_android.cc274
-rw-r--r--chromium/content/browser/device_orientation/data_fetcher_impl_android.h96
-rw-r--r--chromium/content/browser/device_orientation/data_fetcher_impl_android_unittest.cc147
-rw-r--r--chromium/content/browser/device_orientation/data_fetcher_shared_memory.h66
-rw-r--r--chromium/content/browser/device_orientation/data_fetcher_shared_memory_android.cc53
-rw-r--r--chromium/content/browser/device_orientation/data_fetcher_shared_memory_base.cc245
-rw-r--r--chromium/content/browser/device_orientation/data_fetcher_shared_memory_base.h99
-rw-r--r--chromium/content/browser/device_orientation/data_fetcher_shared_memory_base_unittest.cc404
-rw-r--r--chromium/content/browser/device_orientation/data_fetcher_shared_memory_default.cc76
-rw-r--r--chromium/content/browser/device_orientation/data_fetcher_shared_memory_mac.cc171
-rw-r--r--chromium/content/browser/device_orientation/data_fetcher_shared_memory_win.cc398
-rw-r--r--chromium/content/browser/device_orientation/device_data.h43
-rw-r--r--chromium/content/browser/device_orientation/device_inertial_sensor_browsertest.cc186
-rw-r--r--chromium/content/browser/device_orientation/device_inertial_sensor_service.cc99
-rw-r--r--chromium/content/browser/device_orientation/device_inertial_sensor_service.h72
-rw-r--r--chromium/content/browser/device_orientation/device_motion_message_filter.cc65
-rw-r--r--chromium/content/browser/device_orientation/device_motion_message_filter.h38
-rw-r--r--chromium/content/browser/device_orientation/device_orientation_message_filter.cc66
-rw-r--r--chromium/content/browser/device_orientation/device_orientation_message_filter.h37
-rw-r--r--chromium/content/browser/device_orientation/inertial_sensor_consts.h25
-rw-r--r--chromium/content/browser/device_sensors/DEPS (renamed from chromium/content/browser/device_orientation/DEPS)0
-rw-r--r--chromium/content/browser/device_sensors/OWNERS (renamed from chromium/content/browser/device_orientation/OWNERS)0
-rw-r--r--chromium/content/browser/device_sensors/data_fetcher_shared_memory.h66
-rw-r--r--chromium/content/browser/device_sensors/data_fetcher_shared_memory_android.cc52
-rw-r--r--chromium/content/browser/device_sensors/data_fetcher_shared_memory_base.cc244
-rw-r--r--chromium/content/browser/device_sensors/data_fetcher_shared_memory_base.h98
-rw-r--r--chromium/content/browser/device_sensors/data_fetcher_shared_memory_base_unittest.cc401
-rw-r--r--chromium/content/browser/device_sensors/data_fetcher_shared_memory_default.cc75
-rw-r--r--chromium/content/browser/device_sensors/data_fetcher_shared_memory_mac.cc186
-rw-r--r--chromium/content/browser/device_sensors/data_fetcher_shared_memory_win.cc400
-rw-r--r--chromium/content/browser/device_sensors/device_inertial_sensor_browsertest.cc289
-rw-r--r--chromium/content/browser/device_sensors/device_inertial_sensor_service.cc98
-rw-r--r--chromium/content/browser/device_sensors/device_inertial_sensor_service.h71
-rw-r--r--chromium/content/browser/device_sensors/device_motion_message_filter.cc62
-rw-r--r--chromium/content/browser/device_sensors/device_motion_message_filter.h33
-rw-r--r--chromium/content/browser/device_sensors/device_orientation_message_filter.cc64
-rw-r--r--chromium/content/browser/device_sensors/device_orientation_message_filter.h33
-rw-r--r--chromium/content/browser/device_sensors/inertial_sensor_consts.h25
-rw-r--r--chromium/content/browser/device_sensors/sensor_manager_android.cc276
-rw-r--r--chromium/content/browser/device_sensors/sensor_manager_android.h99
-rw-r--r--chromium/content/browser/device_sensors/sensor_manager_android_unittest.cc148
-rw-r--r--chromium/content/browser/devtools/BUILD.gn71
-rw-r--r--chromium/content/browser/devtools/browser_protocol.json3
-rw-r--r--chromium/content/browser/devtools/devtools_agent_host_impl.cc12
-rw-r--r--chromium/content/browser/devtools/devtools_agent_host_impl.h2
-rw-r--r--chromium/content/browser/devtools/devtools_browser_target.cc53
-rw-r--r--chromium/content/browser/devtools/devtools_browser_target.h8
-rw-r--r--chromium/content/browser/devtools/devtools_external_agent_proxy_impl.cc73
-rw-r--r--chromium/content/browser/devtools/devtools_external_agent_proxy_impl.h35
-rw-r--r--chromium/content/browser/devtools/devtools_http_handler_impl.cc112
-rw-r--r--chromium/content/browser/devtools/devtools_http_handler_impl.h11
-rw-r--r--chromium/content/browser/devtools/devtools_http_handler_unittest.cc50
-rw-r--r--chromium/content/browser/devtools/devtools_manager_impl.cc13
-rw-r--r--chromium/content/browser/devtools/devtools_manager_impl.h9
-rw-r--r--chromium/content/browser/devtools/devtools_manager_unittest.cc10
-rw-r--r--chromium/content/browser/devtools/devtools_netlog_observer.cc134
-rw-r--r--chromium/content/browser/devtools/devtools_netlog_observer.h13
-rw-r--r--chromium/content/browser/devtools/devtools_power_handler.cc83
-rw-r--r--chromium/content/browser/devtools/devtools_power_handler.h38
-rw-r--r--chromium/content/browser/devtools/devtools_protocol.cc43
-rw-r--r--chromium/content/browser/devtools/devtools_protocol.h18
-rw-r--r--chromium/content/browser/devtools/devtools_protocol_constants.cc293
-rw-r--r--chromium/content/browser/devtools/devtools_protocol_constants.h296
-rw-r--r--chromium/content/browser/devtools/devtools_resources.gyp40
-rw-r--r--chromium/content/browser/devtools/devtools_system_info_handler.cc7
-rw-r--r--chromium/content/browser/devtools/devtools_tracing_handler.cc103
-rw-r--r--chromium/content/browser/devtools/devtools_tracing_handler.h23
-rw-r--r--chromium/content/browser/devtools/embedded_worker_devtools_manager.cc379
-rw-r--r--chromium/content/browser/devtools/embedded_worker_devtools_manager.h138
-rw-r--r--chromium/content/browser/devtools/embedded_worker_devtools_manager_unittest.cc272
-rw-r--r--chromium/content/browser/devtools/forwarding_agent_host.cc41
-rw-r--r--chromium/content/browser/devtools/forwarding_agent_host.h39
-rw-r--r--chromium/content/browser/devtools/ipc_devtools_agent_host.cc7
-rw-r--r--chromium/content/browser/devtools/render_view_devtools_agent_host.cc138
-rw-r--r--chromium/content/browser/devtools/render_view_devtools_agent_host.h16
-rw-r--r--chromium/content/browser/devtools/renderer_overrides_handler.cc168
-rw-r--r--chromium/content/browser/devtools/renderer_overrides_handler.h12
-rw-r--r--chromium/content/browser/devtools/renderer_overrides_handler_browsertest.cc11
-rw-r--r--chromium/content/browser/devtools/tethering_handler.cc2
-rw-r--r--chromium/content/browser/devtools/worker_devtools_manager.cc38
-rw-r--r--chromium/content/browser/devtools/worker_devtools_manager.h12
-rw-r--r--chromium/content/browser/devtools/worker_devtools_message_filter.cc11
-rw-r--r--chromium/content/browser/devtools/worker_devtools_message_filter.h3
-rw-r--r--chromium/content/browser/dom_storage/dom_storage_area.cc5
-rw-r--r--chromium/content/browser/dom_storage/dom_storage_area_unittest.cc3
-rw-r--r--chromium/content/browser/dom_storage/dom_storage_browsertest.cc4
-rw-r--r--chromium/content/browser/dom_storage/dom_storage_context_impl.cc11
-rw-r--r--chromium/content/browser/dom_storage/dom_storage_context_impl.h1
-rw-r--r--chromium/content/browser/dom_storage/dom_storage_context_impl_unittest.cc9
-rw-r--r--chromium/content/browser/dom_storage/dom_storage_context_wrapper.cc8
-rw-r--r--chromium/content/browser/dom_storage/dom_storage_context_wrapper.h3
-rw-r--r--chromium/content/browser/dom_storage/dom_storage_database.cc4
-rw-r--r--chromium/content/browser/dom_storage/dom_storage_database_unittest.cc4
-rw-r--r--chromium/content/browser/dom_storage/dom_storage_host.cc24
-rw-r--r--chromium/content/browser/dom_storage/dom_storage_host.h2
-rw-r--r--chromium/content/browser/dom_storage/dom_storage_message_filter.cc14
-rw-r--r--chromium/content/browser/dom_storage/dom_storage_message_filter.h5
-rw-r--r--chromium/content/browser/dom_storage/dom_storage_namespace.cc8
-rw-r--r--chromium/content/browser/dom_storage/session_storage_database.cc76
-rw-r--r--chromium/content/browser/dom_storage/session_storage_database.h11
-rw-r--r--chromium/content/browser/dom_storage/session_storage_database_unittest.cc21
-rw-r--r--chromium/content/browser/download/base_file.cc111
-rw-r--r--chromium/content/browser/download/base_file.h38
-rw-r--r--chromium/content/browser/download/base_file_posix.cc2
-rw-r--r--chromium/content/browser/download/base_file_unittest.cc92
-rw-r--r--chromium/content/browser/download/download_browsertest.cc225
-rw-r--r--chromium/content/browser/download/download_create_info.h6
-rw-r--r--chromium/content/browser/download/download_file_factory.cc8
-rw-r--r--chromium/content/browser/download/download_file_impl.cc11
-rw-r--r--chromium/content/browser/download/download_file_impl.h5
-rw-r--r--chromium/content/browser/download/download_file_unittest.cc10
-rw-r--r--chromium/content/browser/download/download_interrupt_reasons_impl.cc2
-rw-r--r--chromium/content/browser/download/download_item_factory.h2
-rw-r--r--chromium/content/browser/download/download_item_impl.cc94
-rw-r--r--chromium/content/browser/download/download_item_impl.h17
-rw-r--r--chromium/content/browser/download/download_item_impl_unittest.cc31
-rw-r--r--chromium/content/browser/download/download_manager_impl.cc16
-rw-r--r--chromium/content/browser/download/download_manager_impl.h3
-rw-r--r--chromium/content/browser/download/download_manager_impl_unittest.cc23
-rw-r--r--chromium/content/browser/download/download_net_log_parameters.cc6
-rw-r--r--chromium/content/browser/download/download_resource_handler.cc117
-rw-r--r--chromium/content/browser/download/download_resource_handler.h53
-rw-r--r--chromium/content/browser/download/drag_download_file.cc19
-rw-r--r--chromium/content/browser/download/drag_download_file.h14
-rw-r--r--chromium/content/browser/download/drag_download_file_browsertest.cc9
-rw-r--r--chromium/content/browser/download/drag_download_util.cc29
-rw-r--r--chromium/content/browser/download/drag_download_util.h11
-rw-r--r--chromium/content/browser/download/mhtml_generation_browsertest.cc4
-rw-r--r--chromium/content/browser/download/mhtml_generation_manager.cc168
-rw-r--r--chromium/content/browser/download/mhtml_generation_manager.h49
-rw-r--r--chromium/content/browser/download/save_file.cc3
-rw-r--r--chromium/content/browser/download/save_file_manager.cc7
-rw-r--r--chromium/content/browser/download/save_file_resource_handler.cc38
-rw-r--r--chromium/content/browser/download/save_file_resource_handler.h35
-rw-r--r--chromium/content/browser/download/save_package.cc14
-rw-r--r--chromium/content/browser/download/save_package_browsertest.cc4
-rw-r--r--chromium/content/browser/download/save_package_unittest.cc14
-rw-r--r--chromium/content/browser/fileapi/DEPS6
-rw-r--r--chromium/content/browser/fileapi/blob_storage_context_unittest.cc237
-rw-r--r--chromium/content/browser/fileapi/blob_storage_host.cc117
-rw-r--r--chromium/content/browser/fileapi/blob_storage_host.h76
-rw-r--r--chromium/content/browser/fileapi/blob_url_request_job_unittest.cc166
-rw-r--r--chromium/content/browser/fileapi/browser_file_system_helper.cc16
-rw-r--r--chromium/content/browser/fileapi/chrome_blob_storage_context.cc42
-rw-r--r--chromium/content/browser/fileapi/chrome_blob_storage_context.h5
-rw-r--r--chromium/content/browser/fileapi/copy_or_move_file_validator_unittest.cc119
-rw-r--r--chromium/content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc317
-rw-r--r--chromium/content/browser/fileapi/dragged_file_util_unittest.cc139
-rw-r--r--chromium/content/browser/fileapi/external_mount_points_unittest.cc515
-rw-r--r--chromium/content/browser/fileapi/file_system_browsertest.cc4
-rw-r--r--chromium/content/browser/fileapi/file_system_context_unittest.cc112
-rw-r--r--chromium/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc237
-rw-r--r--chromium/content/browser/fileapi/file_system_file_stream_reader_unittest.cc35
-rw-r--r--chromium/content/browser/fileapi/file_system_operation_impl_unittest.cc268
-rw-r--r--chromium/content/browser/fileapi/file_system_operation_impl_write_unittest.cc90
-rw-r--r--chromium/content/browser/fileapi/file_system_operation_runner_unittest.cc48
-rw-r--r--chromium/content/browser/fileapi/file_system_quota_client_unittest.cc51
-rw-r--r--chromium/content/browser/fileapi/file_system_url_request_job_unittest.cc198
-rw-r--r--chromium/content/browser/fileapi/file_system_url_unittest.cc221
-rw-r--r--chromium/content/browser/fileapi/file_system_usage_cache_unittest.cc160
-rw-r--r--chromium/content/browser/fileapi/file_writer_delegate_unittest.cc128
-rw-r--r--chromium/content/browser/fileapi/fileapi_message_filter.cc156
-rw-r--r--chromium/content/browser/fileapi/fileapi_message_filter.h44
-rw-r--r--chromium/content/browser/fileapi/fileapi_message_filter_unittest.cc37
-rw-r--r--chromium/content/browser/fileapi/isolated_context_unittest.cc360
-rw-r--r--chromium/content/browser/fileapi/local_file_stream_reader_unittest.cc258
-rw-r--r--chromium/content/browser/fileapi/local_file_stream_writer_unittest.cc180
-rw-r--r--chromium/content/browser/fileapi/local_file_util_unittest.cc147
-rw-r--r--chromium/content/browser/fileapi/mock_file_change_observer.cc51
-rw-r--r--chromium/content/browser/fileapi/mock_file_change_observer.h103
-rw-r--r--chromium/content/browser/fileapi/mock_url_request_delegate.cc72
-rw-r--r--chromium/content/browser/fileapi/mock_url_request_delegate.h38
-rw-r--r--chromium/content/browser/fileapi/native_file_util_unittest.cc409
-rw-r--r--chromium/content/browser/fileapi/obfuscated_file_util_unittest.cc1212
-rw-r--r--chromium/content/browser/fileapi/plugin_private_file_system_backend_unittest.cc58
-rw-r--r--chromium/content/browser/fileapi/recursive_operation_delegate_unittest.cc51
-rw-r--r--chromium/content/browser/fileapi/sandbox_database_test_helper.cc93
-rw-r--r--chromium/content/browser/fileapi/sandbox_database_test_helper.h28
-rw-r--r--chromium/content/browser/fileapi/sandbox_directory_database_unittest.cc675
-rw-r--r--chromium/content/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc47
-rw-r--r--chromium/content/browser/fileapi/sandbox_file_system_backend_unittest.cc59
-rw-r--r--chromium/content/browser/fileapi/sandbox_isolated_origin_database_unittest.cc43
-rw-r--r--chromium/content/browser/fileapi/sandbox_origin_database_unittest.cc305
-rw-r--r--chromium/content/browser/fileapi/sandbox_prioritized_origin_database_unittest.cc217
-rw-r--r--chromium/content/browser/fileapi/timed_task_helper_unittest.cc85
-rw-r--r--chromium/content/browser/fileapi/transient_file_util_unittest.cc39
-rw-r--r--chromium/content/browser/fileapi/upload_file_system_file_element_reader.cc117
-rw-r--r--chromium/content/browser/fileapi/upload_file_system_file_element_reader.h66
-rw-r--r--chromium/content/browser/fileapi/upload_file_system_file_element_reader_unittest.cc27
-rw-r--r--chromium/content/browser/frame_host/OWNERS2
-rw-r--r--chromium/content/browser/frame_host/cross_process_frame_connector.cc184
-rw-r--r--chromium/content/browser/frame_host/cross_process_frame_connector.h123
-rw-r--r--chromium/content/browser/frame_host/cross_site_transferring_request.cc46
-rw-r--r--chromium/content/browser/frame_host/cross_site_transferring_request.h40
-rw-r--r--chromium/content/browser/frame_host/debug_urls.cc92
-rw-r--r--chromium/content/browser/frame_host/debug_urls.h5
-rw-r--r--chromium/content/browser/frame_host/frame_tree.cc250
-rw-r--r--chromium/content/browser/frame_host/frame_tree.h117
-rw-r--r--chromium/content/browser/frame_host/frame_tree_browsertest.cc158
-rw-r--r--chromium/content/browser/frame_host/frame_tree_node.cc68
-rw-r--r--chromium/content/browser/frame_host/frame_tree_node.h88
-rw-r--r--chromium/content/browser/frame_host/frame_tree_unittest.cc273
-rw-r--r--chromium/content/browser/frame_host/interstitial_page_impl.cc224
-rw-r--r--chromium/content/browser/frame_host/interstitial_page_impl.h43
-rw-r--r--chromium/content/browser/frame_host/interstitial_page_navigator_impl.cc18
-rw-r--r--chromium/content/browser/frame_host/interstitial_page_navigator_impl.h13
-rw-r--r--chromium/content/browser/frame_host/navigation_controller_delegate.h10
-rw-r--r--chromium/content/browser/frame_host/navigation_controller_impl.cc173
-rw-r--r--chromium/content/browser/frame_host/navigation_controller_impl.h48
-rw-r--r--chromium/content/browser/frame_host/navigation_controller_impl_browsertest.cc34
-rw-r--r--chromium/content/browser/frame_host/navigation_controller_impl_unittest.cc769
-rw-r--r--chromium/content/browser/frame_host/navigation_entry_impl.cc15
-rw-r--r--chromium/content/browser/frame_host/navigation_entry_impl.h16
-rw-r--r--chromium/content/browser/frame_host/navigation_entry_impl_unittest.cc5
-rw-r--r--chromium/content/browser/frame_host/navigation_entry_screenshot_manager.cc36
-rw-r--r--chromium/content/browser/frame_host/navigator.cc25
-rw-r--r--chromium/content/browser/frame_host/navigator.h93
-rw-r--r--chromium/content/browser/frame_host/navigator_delegate.cc17
-rw-r--r--chromium/content/browser/frame_host/navigator_delegate.h83
-rw-r--r--chromium/content/browser/frame_host/navigator_impl.cc562
-rw-r--r--chromium/content/browser/frame_host/navigator_impl.h57
-rw-r--r--chromium/content/browser/frame_host/render_frame_host_delegate.cc18
-rw-r--r--chromium/content/browser/frame_host/render_frame_host_delegate.h76
-rw-r--r--chromium/content/browser/frame_host/render_frame_host_impl.cc837
-rw-r--r--chromium/content/browser/frame_host/render_frame_host_impl.h229
-rw-r--r--chromium/content/browser/frame_host/render_frame_host_manager.cc1108
-rw-r--r--chromium/content/browser/frame_host/render_frame_host_manager.h293
-rw-r--r--chromium/content/browser/frame_host/render_frame_host_manager_browsertest.cc472
-rw-r--r--chromium/content/browser/frame_host/render_frame_host_manager_unittest.cc1044
-rw-r--r--chromium/content/browser/frame_host/render_frame_message_filter.cc36
-rw-r--r--chromium/content/browser/frame_host/render_frame_message_filter.h7
-rw-r--r--chromium/content/browser/frame_host/render_frame_proxy_host.cc85
-rw-r--r--chromium/content/browser/frame_host/render_frame_proxy_host.h124
-rw-r--r--chromium/content/browser/frame_host/render_widget_host_view_child_frame.cc339
-rw-r--r--chromium/content/browser/frame_host/render_widget_host_view_child_frame.h174
-rw-r--r--chromium/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc80
-rw-r--r--chromium/content/browser/frame_host/render_widget_host_view_guest.cc557
-rw-r--r--chromium/content/browser/frame_host/render_widget_host_view_guest.h182
-rw-r--r--chromium/content/browser/frame_host/render_widget_host_view_guest_unittest.cc81
-rw-r--r--chromium/content/browser/gamepad/OWNERS1
-rw-r--r--chromium/content/browser/gamepad/canonical_axis_index_list.h16
-rw-r--r--chromium/content/browser/gamepad/canonical_button_index_list.h28
-rw-r--r--chromium/content/browser/gamepad/gamepad_consumer.h29
-rw-r--r--chromium/content/browser/gamepad/gamepad_platform_data_fetcher.h10
-rw-r--r--chromium/content/browser/gamepad/gamepad_platform_data_fetcher_android.cc149
-rw-r--r--chromium/content/browser/gamepad/gamepad_platform_data_fetcher_android.h40
-rw-r--r--chromium/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc16
-rw-r--r--chromium/content/browser/gamepad/gamepad_platform_data_fetcher_mac.h2
-rw-r--r--chromium/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm105
-rw-r--r--chromium/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc340
-rw-r--r--chromium/content/browser/gamepad/gamepad_platform_data_fetcher_win.h28
-rw-r--r--chromium/content/browser/gamepad/gamepad_provider.cc135
-rw-r--r--chromium/content/browser/gamepad/gamepad_provider.h41
-rw-r--r--chromium/content/browser/gamepad/gamepad_provider_unittest.cc12
-rw-r--r--chromium/content/browser/gamepad/gamepad_service.cc100
-rw-r--r--chromium/content/browser/gamepad/gamepad_service.h58
-rw-r--r--chromium/content/browser/gamepad/gamepad_standard_mappings.cc60
-rw-r--r--chromium/content/browser/gamepad/gamepad_standard_mappings.h16
-rw-r--r--chromium/content/browser/gamepad/gamepad_standard_mappings_linux.cc72
-rw-r--r--chromium/content/browser/gamepad/gamepad_standard_mappings_mac.mm106
-rw-r--r--chromium/content/browser/gamepad/gamepad_standard_mappings_win.cc148
-rw-r--r--chromium/content/browser/gamepad/raw_input_data_fetcher_win.cc505
-rw-r--r--chromium/content/browser/gamepad/raw_input_data_fetcher_win.h139
-rw-r--r--chromium/content/browser/gamepad/xbox_data_fetcher_mac.cc278
-rw-r--r--chromium/content/browser/gamepad/xbox_data_fetcher_mac.h27
-rw-r--r--chromium/content/browser/geolocation/geolocation_dispatcher_host.cc397
-rw-r--r--chromium/content/browser/geolocation/geolocation_dispatcher_host.h89
-rw-r--r--chromium/content/browser/geolocation/geolocation_provider_impl.cc128
-rw-r--r--chromium/content/browser/geolocation/geolocation_provider_impl.h37
-rw-r--r--chromium/content/browser/geolocation/geolocation_provider_unittest.cc35
-rw-r--r--chromium/content/browser/geolocation/location_api_adapter_android.h2
-rw-r--r--chromium/content/browser/geolocation/location_arbitrator_impl.h2
-rw-r--r--chromium/content/browser/geolocation/location_provider_base.h2
-rw-r--r--chromium/content/browser/geolocation/network_location_provider.cc2
-rw-r--r--chromium/content/browser/geolocation/network_location_provider_unittest.cc10
-rw-r--r--chromium/content/browser/geolocation/network_location_request.cc2
-rw-r--r--chromium/content/browser/geolocation/wifi_data_provider_chromeos.cc4
-rw-r--r--chromium/content/browser/geolocation/wifi_data_provider_chromeos_unittest.cc3
-rw-r--r--chromium/content/browser/geolocation/wifi_data_provider_common.cc14
-rw-r--r--chromium/content/browser/geolocation/wifi_data_provider_common_unittest.cc4
-rw-r--r--chromium/content/browser/geolocation/wifi_data_provider_common_win.cc6
-rw-r--r--chromium/content/browser/geolocation/wifi_data_provider_linux.cc6
-rw-r--r--chromium/content/browser/geolocation/wifi_data_provider_linux_unittest.cc5
-rw-r--r--chromium/content/browser/geolocation/wifi_data_provider_mac.cc7
-rw-r--r--chromium/content/browser/geolocation/wifi_data_provider_win.cc18
-rw-r--r--chromium/content/browser/gpu/browser_gpu_channel_host_factory.cc252
-rw-r--r--chromium/content/browser/gpu/browser_gpu_channel_host_factory.h99
-rw-r--r--chromium/content/browser/gpu/compositor_util.cc339
-rw-r--r--chromium/content/browser/gpu/compositor_util.h21
-rw-r--r--chromium/content/browser/gpu/compositor_util_browsertest.cc8
-rw-r--r--chromium/content/browser/gpu/gpu_data_manager_impl.cc18
-rw-r--r--chromium/content/browser/gpu/gpu_data_manager_impl.h24
-rw-r--r--chromium/content/browser/gpu/gpu_data_manager_impl_private.cc322
-rw-r--r--chromium/content/browser/gpu/gpu_data_manager_impl_private.h22
-rw-r--r--chromium/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc128
-rw-r--r--chromium/content/browser/gpu/gpu_internals_ui.cc37
-rw-r--r--chromium/content/browser/gpu/gpu_ipc_browsertests.cc80
-rw-r--r--chromium/content/browser/gpu/gpu_process_host.cc377
-rw-r--r--chromium/content/browser/gpu/gpu_process_host.h39
-rw-r--r--chromium/content/browser/gpu/gpu_process_host_ui_shim.cc119
-rw-r--r--chromium/content/browser/gpu/gpu_process_host_ui_shim.h5
-rw-r--r--chromium/content/browser/gpu/gpu_surface_tracker.cc52
-rw-r--r--chromium/content/browser/gpu/shader_disk_cache.cc4
-rw-r--r--chromium/content/browser/gpu/test_support_gpu.gypi7
-rw-r--r--chromium/content/browser/histogram_controller.cc11
-rw-r--r--chromium/content/browser/histogram_internals_request_job.cc5
-rw-r--r--chromium/content/browser/histogram_message_filter.cc10
-rw-r--r--chromium/content/browser/histogram_message_filter.h3
-rw-r--r--chromium/content/browser/host_zoom_map_impl.cc264
-rw-r--r--chromium/content/browser/host_zoom_map_impl.h74
-rw-r--r--chromium/content/browser/host_zoom_map_impl_unittest.cc25
-rw-r--r--chromium/content/browser/indexed_db/OWNERS3
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_active_blob_registry.cc147
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_active_blob_registry.h74
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc274
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_backing_store.cc2688
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_backing_store.h436
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_backing_store_unittest.cc965
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_blob_info.cc93
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_blob_info.h76
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_browsertest.cc296
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_callbacks.cc356
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_callbacks.h32
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_class_factory.cc30
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_class_factory.h36
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc99
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_connection.cc2
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_connection.h2
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_context_impl.cc92
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_context_impl.h16
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_cursor.cc63
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_cursor.h6
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_database.cc877
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_database.h74
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_database_callbacks.h2
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_database_error.h7
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_database_unittest.cc292
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_dispatcher_host.cc235
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_dispatcher_host.h60
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_factory.cc257
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_factory.h57
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_factory_unittest.cc322
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_fake_backing_store.cc177
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_fake_backing_store.h166
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_index_writer.cc67
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_index_writer.h5
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_internals_ui.cc24
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_internals_ui.h6
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_leveldb_coding.cc247
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_leveldb_coding.h67
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc198
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_metadata.h2
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_pending_connection.cc23
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_pending_connection.h36
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_quota_client.h26
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_quota_client_unittest.cc6
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_tracing.h2
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_transaction.cc112
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_transaction.h26
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_transaction_coordinator.cc15
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_transaction_coordinator.h6
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_transaction_unittest.cc296
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_unittest.cc121
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_value.cc20
-rw-r--r--chromium/content/browser/indexed_db/indexed_db_value.h44
-rw-r--r--chromium/content/browser/indexed_db/leveldb/leveldb_comparator.h3
-rw-r--r--chromium/content/browser/indexed_db/leveldb/leveldb_database.cc135
-rw-r--r--chromium/content/browser/indexed_db/leveldb/leveldb_database.h45
-rw-r--r--chromium/content/browser/indexed_db/leveldb/leveldb_iterator.h9
-rw-r--r--chromium/content/browser/indexed_db/leveldb/leveldb_transaction.cc133
-rw-r--r--chromium/content/browser/indexed_db/leveldb/leveldb_transaction.h57
-rw-r--r--chromium/content/browser/indexed_db/leveldb/leveldb_unittest.cc95
-rw-r--r--chromium/content/browser/indexed_db/list_set_unittest.cc32
-rw-r--r--chromium/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc168
-rw-r--r--chromium/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.h52
-rw-r--r--chromium/content/browser/indexed_db/mock_indexed_db_callbacks.cc5
-rw-r--r--chromium/content/browser/indexed_db/mock_indexed_db_callbacks.h8
-rw-r--r--chromium/content/browser/loader/OWNERS3
-rw-r--r--chromium/content/browser/loader/async_resource_handler.cc102
-rw-r--r--chromium/content/browser/loader/async_resource_handler.h37
-rw-r--r--chromium/content/browser/loader/buffered_resource_handler.cc91
-rw-r--r--chromium/content/browser/loader/buffered_resource_handler.h17
-rw-r--r--chromium/content/browser/loader/certificate_resource_handler.cc50
-rw-r--r--chromium/content/browser/loader/certificate_resource_handler.h29
-rw-r--r--chromium/content/browser/loader/cross_site_resource_handler.cc204
-rw-r--r--chromium/content/browser/loader/cross_site_resource_handler.h39
-rw-r--r--chromium/content/browser/loader/detachable_resource_handler.cc57
-rw-r--r--chromium/content/browser/loader/detachable_resource_handler.h23
-rw-r--r--chromium/content/browser/loader/layered_resource_handler.cc42
-rw-r--r--chromium/content/browser/loader/layered_resource_handler.h22
-rw-r--r--chromium/content/browser/loader/offline_policy.cc96
-rw-r--r--chromium/content/browser/loader/offline_policy.h60
-rw-r--r--chromium/content/browser/loader/offline_policy_unittest.cc96
-rw-r--r--chromium/content/browser/loader/redirect_to_file_resource_handler.cc233
-rw-r--r--chromium/content/browser/loader/redirect_to_file_resource_handler.h86
-rw-r--r--chromium/content/browser/loader/resource_dispatcher_host_browsertest.cc16
-rw-r--r--chromium/content/browser/loader/resource_dispatcher_host_impl.cc465
-rw-r--r--chromium/content/browser/loader/resource_dispatcher_host_impl.h52
-rw-r--r--chromium/content/browser/loader/resource_dispatcher_host_unittest.cc820
-rw-r--r--chromium/content/browser/loader/resource_handler.h54
-rw-r--r--chromium/content/browser/loader/resource_loader.cc112
-rw-r--r--chromium/content/browser/loader/resource_loader.h7
-rw-r--r--chromium/content/browser/loader/resource_loader_delegate.h7
-rw-r--r--chromium/content/browser/loader/resource_loader_unittest.cc565
-rw-r--r--chromium/content/browser/loader/resource_message_delegate.h3
-rw-r--r--chromium/content/browser/loader/resource_message_filter.cc13
-rw-r--r--chromium/content/browser/loader/resource_message_filter.h10
-rw-r--r--chromium/content/browser/loader/resource_request_info_impl.cc63
-rw-r--r--chromium/content/browser/loader/resource_request_info_impl.h20
-rw-r--r--chromium/content/browser/loader/resource_scheduler.cc649
-rw-r--r--chromium/content/browser/loader/resource_scheduler.h42
-rw-r--r--chromium/content/browser/loader/resource_scheduler_filter.cc20
-rw-r--r--chromium/content/browser/loader/resource_scheduler_filter.h3
-rw-r--r--chromium/content/browser/loader/resource_scheduler_unittest.cc89
-rw-r--r--chromium/content/browser/loader/stream_resource_handler.cc46
-rw-r--r--chromium/content/browser/loader/stream_resource_handler.h28
-rw-r--r--chromium/content/browser/loader/sync_resource_handler.cc35
-rw-r--r--chromium/content/browser/loader/sync_resource_handler.h28
-rw-r--r--chromium/content/browser/loader/temporary_file_stream.cc63
-rw-r--r--chromium/content/browser/loader/temporary_file_stream.h45
-rw-r--r--chromium/content/browser/loader/temporary_file_stream_unittest.cc120
-rw-r--r--chromium/content/browser/loader/throttling_resource_handler.cc64
-rw-r--r--chromium/content/browser/loader/throttling_resource_handler.h11
-rw-r--r--chromium/content/browser/loader/upload_data_stream_builder.cc7
-rw-r--r--chromium/content/browser/loader/upload_data_stream_builder.h8
-rw-r--r--chromium/content/browser/loader/upload_data_stream_builder_unittest.cc376
-rw-r--r--chromium/content/browser/mach_broker_mac.h7
-rw-r--r--chromium/content/browser/mach_broker_mac.mm109
-rw-r--r--chromium/content/browser/media/OWNERS7
-rw-r--r--chromium/content/browser/media/android/browser_demuxer_android.cc13
-rw-r--r--chromium/content/browser/media/android/browser_demuxer_android.h3
-rw-r--r--chromium/content/browser/media/android/browser_media_player_manager.cc645
-rw-r--r--chromium/content/browser/media/android/browser_media_player_manager.h166
-rw-r--r--chromium/content/browser/media/android/media_drm_credential_manager.cc42
-rw-r--r--chromium/content/browser/media/android/media_drm_credential_manager.h22
-rw-r--r--chromium/content/browser/media/android/media_resource_getter_impl.cc180
-rw-r--r--chromium/content/browser/media/android/media_resource_getter_impl.h19
-rw-r--r--chromium/content/browser/media/capture/DEPS3
-rw-r--r--chromium/content/browser/media/capture/OWNERS4
-rw-r--r--chromium/content/browser/media/capture/audio_mirroring_manager.cc164
-rw-r--r--chromium/content/browser/media/capture/audio_mirroring_manager.h108
-rw-r--r--chromium/content/browser/media/capture/audio_mirroring_manager_unittest.cc233
-rw-r--r--chromium/content/browser/media/capture/content_video_capture_device_core.cc343
-rw-r--r--chromium/content/browser/media/capture/content_video_capture_device_core.h204
-rw-r--r--chromium/content/browser/media/capture/desktop_capture_device.cc533
-rw-r--r--chromium/content/browser/media/capture/desktop_capture_device.h64
-rw-r--r--chromium/content/browser/media/capture/desktop_capture_device_aura.cc541
-rw-r--r--chromium/content/browser/media/capture/desktop_capture_device_aura.h48
-rw-r--r--chromium/content/browser/media/capture/desktop_capture_device_aura_unittest.cc125
-rw-r--r--chromium/content/browser/media/capture/desktop_capture_device_uma_types.cc20
-rw-r--r--chromium/content/browser/media/capture/desktop_capture_device_uma_types.h30
-rw-r--r--chromium/content/browser/media/capture/desktop_capture_device_unittest.cc289
-rw-r--r--chromium/content/browser/media/capture/video_capture_oracle.cc172
-rw-r--r--chromium/content/browser/media/capture/video_capture_oracle.h105
-rw-r--r--chromium/content/browser/media/capture/video_capture_oracle_unittest.cc487
-rw-r--r--chromium/content/browser/media/capture/web_contents_audio_input_stream.cc349
-rw-r--r--chromium/content/browser/media/capture/web_contents_audio_input_stream.h92
-rw-r--r--chromium/content/browser/media/capture/web_contents_audio_input_stream_unittest.cc513
-rw-r--r--chromium/content/browser/media/capture/web_contents_capture_util.cc59
-rw-r--r--chromium/content/browser/media/capture/web_contents_capture_util.h35
-rw-r--r--chromium/content/browser/media/capture/web_contents_tracker.cc102
-rw-r--r--chromium/content/browser/media/capture/web_contents_tracker.h86
-rw-r--r--chromium/content/browser/media/capture/web_contents_video_capture_device.cc822
-rw-r--r--chromium/content/browser/media/capture/web_contents_video_capture_device.h58
-rw-r--r--chromium/content/browser/media/capture/web_contents_video_capture_device_unittest.cc815
-rw-r--r--chromium/content/browser/media/cdm/browser_cdm_manager.cc286
-rw-r--r--chromium/content/browser/media/cdm/browser_cdm_manager.h128
-rw-r--r--chromium/content/browser/media/encrypted_media_browsertest.cc4
-rw-r--r--chromium/content/browser/media/media_browsertest.cc41
-rw-r--r--chromium/content/browser/media/media_browsertest.h4
-rw-r--r--chromium/content/browser/media/media_canplaytype_browsertest.cc1065
-rw-r--r--chromium/content/browser/media/media_devices_monitor.cc28
-rw-r--r--chromium/content/browser/media/media_internals.cc43
-rw-r--r--chromium/content/browser/media/media_internals_handler.cc6
-rw-r--r--chromium/content/browser/media/media_internals_unittest.cc16
-rw-r--r--chromium/content/browser/media/media_source_browsertest.cc10
-rw-r--r--chromium/content/browser/media/media_web_contents_observer.cc206
-rw-r--r--chromium/content/browser/media/media_web_contents_observer.h85
-rw-r--r--chromium/content/browser/media/midi_dispatcher_host.cc123
-rw-r--r--chromium/content/browser/media/midi_dispatcher_host.h60
-rw-r--r--chromium/content/browser/media/midi_host.cc225
-rw-r--r--chromium/content/browser/media/midi_host.h100
-rw-r--r--chromium/content/browser/media/midi_host_unittest.cc91
-rw-r--r--chromium/content/browser/media/webrtc_browsertest.cc678
-rw-r--r--chromium/content/browser/media/webrtc_getusermedia_browsertest.cc607
-rw-r--r--chromium/content/browser/media/webrtc_identity_store_backend.cc74
-rw-r--r--chromium/content/browser/media/webrtc_identity_store_unittest.cc33
-rw-r--r--chromium/content/browser/media/webrtc_internals.cc174
-rw-r--r--chromium/content/browser/media/webrtc_internals.h83
-rw-r--r--chromium/content/browser/media/webrtc_internals_browsertest.cc179
-rw-r--r--chromium/content/browser/media/webrtc_internals_message_handler.cc61
-rw-r--r--chromium/content/browser/media/webrtc_internals_message_handler.h7
-rw-r--r--chromium/content/browser/media/webrtc_internals_ui_observer.h3
-rw-r--r--chromium/content/browser/media/webrtc_internals_unittest.cc202
-rw-r--r--chromium/content/browser/message_port_message_filter.cc26
-rw-r--r--chromium/content/browser/message_port_message_filter.h18
-rw-r--r--chromium/content/browser/mime_registry_message_filter.cc8
-rw-r--r--chromium/content/browser/mime_registry_message_filter.h3
-rw-r--r--chromium/content/browser/mojo/mojo_application_host.cc71
-rw-r--r--chromium/content/browser/mojo/mojo_application_host.h70
-rw-r--r--chromium/content/browser/net/browser_online_state_observer.cc3
-rw-r--r--chromium/content/browser/net/sqlite_persistent_cookie_store.cc130
-rw-r--r--chromium/content/browser/net/sqlite_persistent_cookie_store.h2
-rw-r--r--chromium/content/browser/net/sqlite_persistent_cookie_store_perftest.cc6
-rw-r--r--chromium/content/browser/net/sqlite_persistent_cookie_store_unittest.cc13
-rw-r--r--chromium/content/browser/net/view_blob_internals_job_factory.cc2
-rw-r--r--chromium/content/browser/net/view_http_cache_job_factory.cc2
-rw-r--r--chromium/content/browser/plugin_browsertest.cc12
-rw-r--r--chromium/content/browser/plugin_data_remover_impl.cc4
-rw-r--r--chromium/content/browser/plugin_data_remover_impl_browsertest.cc2
-rw-r--r--chromium/content/browser/plugin_loader_posix.cc77
-rw-r--r--chromium/content/browser/plugin_loader_posix.h25
-rw-r--r--chromium/content/browser/plugin_loader_posix_unittest.cc56
-rw-r--r--chromium/content/browser/plugin_process_host.cc69
-rw-r--r--chromium/content/browser/plugin_process_host.h4
-rw-r--r--chromium/content/browser/plugin_service_impl.cc55
-rw-r--r--chromium/content/browser/plugin_service_impl.h15
-rw-r--r--chromium/content/browser/plugin_service_impl_browsertest.cc4
-rw-r--r--chromium/content/browser/power_monitor_message_broadcaster.h6
-rw-r--r--chromium/content/browser/power_profiler/power_data_provider.h38
-rw-r--r--chromium/content/browser/power_profiler/power_data_provider_dummy.cc13
-rw-r--r--chromium/content/browser/power_profiler/power_data_provider_ia_win.cc100
-rw-r--r--chromium/content/browser/power_profiler/power_data_provider_ia_win.h35
-rw-r--r--chromium/content/browser/power_profiler/power_event.cc17
-rw-r--r--chromium/content/browser/power_profiler/power_event.h42
-rw-r--r--chromium/content/browser/power_profiler/power_profiler_observer.h33
-rw-r--r--chromium/content/browser/power_profiler/power_profiler_service.cc109
-rw-r--r--chromium/content/browser/power_profiler/power_profiler_service.h77
-rw-r--r--chromium/content/browser/power_profiler/power_profiler_service_unittest.cc143
-rw-r--r--chromium/content/browser/power_save_blocker_android.cc2
-rw-r--r--chromium/content/browser/power_save_blocker_win.cc2
-rw-r--r--chromium/content/browser/power_save_blocker_x11.cc8
-rw-r--r--chromium/content/browser/ppapi_plugin_process_host.cc68
-rw-r--r--chromium/content/browser/profiler_controller_impl.cc13
-rw-r--r--chromium/content/browser/profiler_message_filter.cc10
-rw-r--r--chromium/content/browser/profiler_message_filter.h3
-rw-r--r--chromium/content/browser/push_messaging_message_filter.cc97
-rw-r--r--chromium/content/browser/push_messaging_message_filter.h54
-rw-r--r--chromium/content/browser/quota/DEPS4
-rw-r--r--chromium/content/browser/quota/mock_quota_manager.cc147
-rw-r--r--chromium/content/browser/quota/mock_quota_manager.h152
-rw-r--r--chromium/content/browser/quota/mock_quota_manager_proxy.cc61
-rw-r--r--chromium/content/browser/quota/mock_quota_manager_proxy.h87
-rw-r--r--chromium/content/browser/quota/mock_quota_manager_unittest.cc226
-rw-r--r--chromium/content/browser/quota/quota_backend_impl_unittest.cc273
-rw-r--r--chromium/content/browser/quota/quota_database_unittest.cc567
-rw-r--r--chromium/content/browser/quota/quota_manager_unittest.cc2190
-rw-r--r--chromium/content/browser/quota/quota_reservation_manager_unittest.cc367
-rw-r--r--chromium/content/browser/quota/quota_temporary_storage_evictor_unittest.cc414
-rw-r--r--chromium/content/browser/quota/storage_monitor_unittest.cc707
-rw-r--r--chromium/content/browser/quota/usage_tracker_unittest.cc336
-rw-r--r--chromium/content/browser/quota_dispatcher_host.cc132
-rw-r--r--chromium/content/browser/quota_dispatcher_host.h11
-rw-r--r--chromium/content/browser/renderer_data_memoizing_store.h3
-rw-r--r--chromium/content/browser/renderer_host/DEPS18
-rw-r--r--chromium/content/browser/renderer_host/OWNERS6
-rw-r--r--chromium/content/browser/renderer_host/backing_store.cc21
-rw-r--r--chromium/content/browser/renderer_host/backing_store.h93
-rw-r--r--chromium/content/browser/renderer_host/backing_store_aura.cc176
-rw-r--r--chromium/content/browser/renderer_host/backing_store_aura.h66
-rw-r--r--chromium/content/browser/renderer_host/backing_store_gtk.cc692
-rw-r--r--chromium/content/browser/renderer_host/backing_store_gtk.h107
-rw-r--r--chromium/content/browser/renderer_host/backing_store_mac.h76
-rw-r--r--chromium/content/browser/renderer_host/backing_store_mac.mm297
-rw-r--r--chromium/content/browser/renderer_host/backing_store_manager.cc282
-rw-r--r--chromium/content/browser/renderer_host/backing_store_manager.h86
-rw-r--r--chromium/content/browser/renderer_host/backing_store_win.cc186
-rw-r--r--chromium/content/browser/renderer_host/backing_store_win.h60
-rw-r--r--chromium/content/browser/renderer_host/clipboard_message_filter.cc89
-rw-r--r--chromium/content/browser/renderer_host/clipboard_message_filter.h8
-rw-r--r--chromium/content/browser/renderer_host/compositing_iosurface_context_mac.h43
-rw-r--r--chromium/content/browser/renderer_host/compositing_iosurface_context_mac.mm138
-rw-r--r--chromium/content/browser/renderer_host/compositing_iosurface_layer_mac.h55
-rw-r--r--chromium/content/browser/renderer_host/compositing_iosurface_layer_mac.mm237
-rw-r--r--chromium/content/browser/renderer_host/compositing_iosurface_mac.h115
-rw-r--r--chromium/content/browser/renderer_host/compositing_iosurface_mac.mm375
-rw-r--r--chromium/content/browser/renderer_host/compositing_iosurface_shader_programs_mac.cc2
-rw-r--r--chromium/content/browser/renderer_host/compositing_iosurface_transformer_mac_unittest.cc2
-rw-r--r--chromium/content/browser/renderer_host/compositor_impl_android.cc610
-rw-r--r--chromium/content/browser/renderer_host/compositor_impl_android.h139
-rw-r--r--chromium/content/browser/renderer_host/compositor_resize_lock_aura.cc67
-rw-r--r--chromium/content/browser/renderer_host/compositor_resize_lock_aura.h49
-rw-r--r--chromium/content/browser/renderer_host/database_message_filter.cc93
-rw-r--r--chromium/content/browser/renderer_host/database_message_filter.h3
-rw-r--r--chromium/content/browser/renderer_host/delegated_frame_evictor.cc21
-rw-r--r--chromium/content/browser/renderer_host/delegated_frame_evictor.h3
-rw-r--r--chromium/content/browser/renderer_host/dip_util.cc21
-rw-r--r--chromium/content/browser/renderer_host/dip_util.h8
-rw-r--r--chromium/content/browser/renderer_host/display_link_mac.cc160
-rw-r--r--chromium/content/browser/renderer_host/display_link_mac.h76
-rw-r--r--chromium/content/browser/renderer_host/event_with_latency_info.h59
-rw-r--r--chromium/content/browser/renderer_host/file_utilities_message_filter.cc19
-rw-r--r--chromium/content/browser/renderer_host/file_utilities_message_filter.h15
-rw-r--r--chromium/content/browser/renderer_host/gamepad_browser_message_filter.cc51
-rw-r--r--chromium/content/browser/renderer_host/gamepad_browser_message_filter.h16
-rw-r--r--chromium/content/browser/renderer_host/gpu_message_filter.cc86
-rw-r--r--chromium/content/browser/renderer_host/gpu_message_filter.h13
-rw-r--r--chromium/content/browser/renderer_host/gtk_im_context_wrapper.cc665
-rw-r--r--chromium/content/browser/renderer_host/gtk_im_context_wrapper.h201
-rw-r--r--chromium/content/browser/renderer_host/gtk_key_bindings_handler.cc293
-rw-r--r--chromium/content/browser/renderer_host/gtk_key_bindings_handler.h132
-rw-r--r--chromium/content/browser/renderer_host/gtk_key_bindings_handler_unittest.cc226
-rw-r--r--chromium/content/browser/renderer_host/gtk_plugin_container.cc89
-rw-r--r--chromium/content/browser/renderer_host/gtk_plugin_container.h30
-rw-r--r--chromium/content/browser/renderer_host/gtk_plugin_container_manager.cc161
-rw-r--r--chromium/content/browser/renderer_host/gtk_plugin_container_manager.h58
-rw-r--r--chromium/content/browser/renderer_host/gtk_window_utils.cc89
-rw-r--r--chromium/content/browser/renderer_host/gtk_window_utils.h23
-rw-r--r--chromium/content/browser/renderer_host/image_transport_factory_android.cc61
-rw-r--r--chromium/content/browser/renderer_host/image_transport_factory_android.h14
-rw-r--r--chromium/content/browser/renderer_host/ime_adapter_android.cc188
-rw-r--r--chromium/content/browser/renderer_host/ime_adapter_android.h15
-rw-r--r--chromium/content/browser/renderer_host/input/gesture_event_filter.cc373
-rw-r--r--chromium/content/browser/renderer_host/input/gesture_event_filter.h226
-rw-r--r--chromium/content/browser/renderer_host/input/gesture_event_filter_unittest.cc912
-rw-r--r--chromium/content/browser/renderer_host/input/gesture_event_queue.cc378
-rw-r--r--chromium/content/browser/renderer_host/input/gesture_event_queue.h230
-rw-r--r--chromium/content/browser/renderer_host/input/gesture_event_queue_unittest.cc1157
-rw-r--r--chromium/content/browser/renderer_host/input/input_ack_handler.h4
-rw-r--r--chromium/content/browser/renderer_host/input/input_router.h6
-rw-r--r--chromium/content/browser/renderer_host/input/input_router_client.h15
-rw-r--r--chromium/content/browser/renderer_host/input/input_router_config_helper.cc140
-rw-r--r--chromium/content/browser/renderer_host/input/input_router_config_helper.h18
-rw-r--r--chromium/content/browser/renderer_host/input/input_router_impl.cc518
-rw-r--r--chromium/content/browser/renderer_host/input/input_router_impl.h96
-rw-r--r--chromium/content/browser/renderer_host/input/input_router_impl_perftest.cc387
-rw-r--r--chromium/content/browser/renderer_host/input/input_router_impl_unittest.cc1181
-rw-r--r--chromium/content/browser/renderer_host/input/mock_input_ack_handler.cc22
-rw-r--r--chromium/content/browser/renderer_host/input/mock_input_ack_handler.h6
-rw-r--r--chromium/content/browser/renderer_host/input/mock_input_router_client.cc30
-rw-r--r--chromium/content/browser/renderer_host/input/mock_input_router_client.h14
-rw-r--r--chromium/content/browser/renderer_host/input/motion_event_android.cc330
-rw-r--r--chromium/content/browser/renderer_host/input/motion_event_android.h125
-rw-r--r--chromium/content/browser/renderer_host/input/motion_event_web.cc160
-rw-r--r--chromium/content/browser/renderer_host/input/motion_event_web.h57
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_gesture.cc6
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_gesture.h10
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_gesture_controller.cc73
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_gesture_controller.h46
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc705
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_gesture_target.h23
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_gesture_target_android.cc32
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_gesture_target_android.h17
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc80
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_gesture_target_aura.h18
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_gesture_target_base.cc103
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_gesture_target_base.h15
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_pinch_gesture.cc169
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_pinch_gesture.h40
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc230
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h53
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_tap_gesture.cc52
-rw-r--r--chromium/content/browser/renderer_host/input/synthetic_tap_gesture.h14
-rw-r--r--chromium/content/browser/renderer_host/input/tap_suppression_controller.cc30
-rw-r--r--chromium/content/browser/renderer_host/input/tap_suppression_controller.h22
-rw-r--r--chromium/content/browser/renderer_host/input/tap_suppression_controller_client.h8
-rw-r--r--chromium/content/browser/renderer_host/input/tap_suppression_controller_unittest.cc103
-rw-r--r--chromium/content/browser/renderer_host/input/touch_action_browsertest.cc216
-rw-r--r--chromium/content/browser/renderer_host/input/touch_action_filter.cc172
-rw-r--r--chromium/content/browser/renderer_host/input/touch_action_filter.h31
-rw-r--r--chromium/content/browser/renderer_host/input/touch_action_filter_unittest.cc631
-rw-r--r--chromium/content/browser/renderer_host/input/touch_emulator.cc389
-rw-r--r--chromium/content/browser/renderer_host/input/touch_emulator.h100
-rw-r--r--chromium/content/browser/renderer_host/input/touch_emulator_client.h26
-rw-r--r--chromium/content/browser/renderer_host/input/touch_emulator_unittest.cc349
-rw-r--r--chromium/content/browser/renderer_host/input/touch_event_queue.cc644
-rw-r--r--chromium/content/browser/renderer_host/input/touch_event_queue.h156
-rw-r--r--chromium/content/browser/renderer_host/input/touch_event_queue_unittest.cc1185
-rw-r--r--chromium/content/browser/renderer_host/input/touch_input_browsertest.cc80
-rw-r--r--chromium/content/browser/renderer_host/input/touchpad_tap_suppression_controller.cc40
-rw-r--r--chromium/content/browser/renderer_host/input/touchpad_tap_suppression_controller.h13
-rw-r--r--chromium/content/browser/renderer_host/input/touchpad_tap_suppression_controller_aura.cc58
-rw-r--r--chromium/content/browser/renderer_host/input/touchscreen_tap_suppression_controller.cc87
-rw-r--r--chromium/content/browser/renderer_host/input/touchscreen_tap_suppression_controller.h30
-rw-r--r--chromium/content/browser/renderer_host/input/touchscreen_tap_suppression_controller_stub.cc52
-rw-r--r--chromium/content/browser/renderer_host/input/web_input_event_builders_android.cc9
-rw-r--r--chromium/content/browser/renderer_host/input/web_input_event_builders_android.h38
-rw-r--r--chromium/content/browser/renderer_host/input/web_input_event_builders_gtk.cc603
-rw-r--r--chromium/content/browser/renderer_host/input/web_input_event_builders_gtk.h44
-rw-r--r--chromium/content/browser/renderer_host/input/web_input_event_builders_gtk_unittest.cc171
-rw-r--r--chromium/content/browser/renderer_host/input/web_input_event_builders_win.cc47
-rw-r--r--chromium/content/browser/renderer_host/input/web_input_event_builders_win.h21
-rw-r--r--chromium/content/browser/renderer_host/input/web_input_event_util.cc196
-rw-r--r--chromium/content/browser/renderer_host/input/web_input_event_util.h18
-rw-r--r--chromium/content/browser/renderer_host/java/OWNERS2
-rw-r--r--chromium/content/browser/renderer_host/java/gin_java_bound_object.cc192
-rw-r--r--chromium/content/browser/renderer_host/java/gin_java_bound_object.h96
-rw-r--r--chromium/content/browser/renderer_host/java/gin_java_bound_object_delegate.cc43
-rw-r--r--chromium/content/browser/renderer_host/java/gin_java_bound_object_delegate.h38
-rw-r--r--chromium/content/browser/renderer_host/java/gin_java_method_invocation_helper.cc341
-rw-r--r--chromium/content/browser/renderer_host/java/gin_java_method_invocation_helper.h116
-rw-r--r--chromium/content/browser/renderer_host/java/gin_java_method_invocation_helper_unittest.cc285
-rw-r--r--chromium/content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.cc705
-rw-r--r--chromium/content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.h33
-rw-r--r--chromium/content/browser/renderer_host/java/java_bound_object.cc172
-rw-r--r--chromium/content/browser/renderer_host/java/java_bound_object.h25
-rw-r--r--chromium/content/browser/renderer_host/java/java_bridge_dispatcher_host.cc20
-rw-r--r--chromium/content/browser/renderer_host/java/java_bridge_dispatcher_host.h17
-rw-r--r--chromium/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc87
-rw-r--r--chromium/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h44
-rw-r--r--chromium/content/browser/renderer_host/java/java_method.cc9
-rw-r--r--chromium/content/browser/renderer_host/java/java_method.h2
-rw-r--r--chromium/content/browser/renderer_host/legacy_render_widget_host_win.cc333
-rw-r--r--chromium/content/browser/renderer_host/legacy_render_widget_host_win.h151
-rw-r--r--chromium/content/browser/renderer_host/media/DEPS6
-rw-r--r--chromium/content/browser/renderer_host/media/OWNERS20
-rw-r--r--chromium/content/browser/renderer_host/media/audio_input_device_manager.cc83
-rw-r--r--chromium/content/browser/renderer_host/media/audio_input_device_manager.h10
-rw-r--r--chromium/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc59
-rw-r--r--chromium/content/browser/renderer_host/media/audio_input_renderer_host.cc167
-rw-r--r--chromium/content/browser/renderer_host/media/audio_input_renderer_host.h65
-rw-r--r--chromium/content/browser/renderer_host/media/audio_input_sync_writer.cc70
-rw-r--r--chromium/content/browser/renderer_host/media/audio_input_sync_writer.h34
-rw-r--r--chromium/content/browser/renderer_host/media/audio_mirroring_manager.cc164
-rw-r--r--chromium/content/browser/renderer_host/media/audio_mirroring_manager.h108
-rw-r--r--chromium/content/browser/renderer_host/media/audio_mirroring_manager_unittest.cc234
-rw-r--r--chromium/content/browser/renderer_host/media/audio_renderer_host.cc216
-rw-r--r--chromium/content/browser/renderer_host/media/audio_renderer_host.h18
-rw-r--r--chromium/content/browser/renderer_host/media/audio_renderer_host_unittest.cc36
-rw-r--r--chromium/content/browser/renderer_host/media/audio_sync_reader.cc28
-rw-r--r--chromium/content/browser/renderer_host/media/audio_sync_reader.h17
-rw-r--r--chromium/content/browser/renderer_host/media/desktop_capture_device.cc420
-rw-r--r--chromium/content/browser/renderer_host/media/desktop_capture_device.h54
-rw-r--r--chromium/content/browser/renderer_host/media/desktop_capture_device_aura.cc442
-rw-r--r--chromium/content/browser/renderer_host/media/desktop_capture_device_aura.h48
-rw-r--r--chromium/content/browser/renderer_host/media/desktop_capture_device_aura_unittest.cc114
-rw-r--r--chromium/content/browser/renderer_host/media/desktop_capture_device_unittest.cc279
-rw-r--r--chromium/content/browser/renderer_host/media/device_request_message_filter.cc47
-rw-r--r--chromium/content/browser/renderer_host/media/device_request_message_filter.h14
-rw-r--r--chromium/content/browser/renderer_host/media/device_request_message_filter_unittest.cc72
-rw-r--r--chromium/content/browser/renderer_host/media/media_capture_devices_impl.cc99
-rw-r--r--chromium/content/browser/renderer_host/media/media_capture_devices_impl.h49
-rw-r--r--chromium/content/browser/renderer_host/media/media_stream_dispatcher_host.cc88
-rw-r--r--chromium/content/browser/renderer_host/media/media_stream_dispatcher_host.h26
-rw-r--r--chromium/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc267
-rw-r--r--chromium/content/browser/renderer_host/media/media_stream_manager.cc736
-rw-r--r--chromium/content/browser/renderer_host/media/media_stream_manager.h105
-rw-r--r--chromium/content/browser/renderer_host/media/media_stream_manager_unittest.cc12
-rw-r--r--chromium/content/browser/renderer_host/media/media_stream_provider.h15
-rw-r--r--chromium/content/browser/renderer_host/media/media_stream_requester.h6
-rw-r--r--chromium/content/browser/renderer_host/media/media_stream_track_metrics_host.cc86
-rw-r--r--chromium/content/browser/renderer_host/media/media_stream_track_metrics_host.h63
-rw-r--r--chromium/content/browser/renderer_host/media/media_stream_ui_controller_unittest.cc2
-rw-r--r--chromium/content/browser/renderer_host/media/media_stream_ui_proxy.cc106
-rw-r--r--chromium/content/browser/renderer_host/media/media_stream_ui_proxy.h21
-rw-r--r--chromium/content/browser/renderer_host/media/media_stream_ui_proxy_unittest.cc78
-rw-r--r--chromium/content/browser/renderer_host/media/midi_dispatcher_host.cc79
-rw-r--r--chromium/content/browser/renderer_host/media/midi_dispatcher_host.h51
-rw-r--r--chromium/content/browser/renderer_host/media/midi_host.cc225
-rw-r--r--chromium/content/browser/renderer_host/media/midi_host.h99
-rw-r--r--chromium/content/browser/renderer_host/media/midi_host_unittest.cc90
-rw-r--r--chromium/content/browser/renderer_host/media/mock_media_observer.h15
-rw-r--r--chromium/content/browser/renderer_host/media/peer_connection_tracker_host.cc26
-rw-r--r--chromium/content/browser/renderer_host/media/peer_connection_tracker_host.h8
-rw-r--r--chromium/content/browser/renderer_host/media/video_capture_controller.cc310
-rw-r--r--chromium/content/browser/renderer_host/media/video_capture_controller.h21
-rw-r--r--chromium/content/browser/renderer_host/media/video_capture_controller_event_handler.h25
-rw-r--r--chromium/content/browser/renderer_host/media/video_capture_controller_unittest.cc218
-rw-r--r--chromium/content/browser/renderer_host/media/video_capture_device_impl.cc304
-rw-r--r--chromium/content/browser/renderer_host/media/video_capture_device_impl.h191
-rw-r--r--chromium/content/browser/renderer_host/media/video_capture_host.cc163
-rw-r--r--chromium/content/browser/renderer_host/media/video_capture_host.h56
-rw-r--r--chromium/content/browser/renderer_host/media/video_capture_host_unittest.cc66
-rw-r--r--chromium/content/browser/renderer_host/media/video_capture_manager.cc380
-rw-r--r--chromium/content/browser/renderer_host/media/video_capture_manager.h127
-rw-r--r--chromium/content/browser/renderer_host/media/video_capture_manager_unittest.cc204
-rw-r--r--chromium/content/browser/renderer_host/media/video_capture_oracle.cc165
-rw-r--r--chromium/content/browser/renderer_host/media/video_capture_oracle.h107
-rw-r--r--chromium/content/browser/renderer_host/media/video_capture_oracle_unittest.cc478
-rw-r--r--chromium/content/browser/renderer_host/media/web_contents_audio_input_stream.cc349
-rw-r--r--chromium/content/browser/renderer_host/media/web_contents_audio_input_stream.h92
-rw-r--r--chromium/content/browser/renderer_host/media/web_contents_audio_input_stream_unittest.cc513
-rw-r--r--chromium/content/browser/renderer_host/media/web_contents_capture_util.cc59
-rw-r--r--chromium/content/browser/renderer_host/media/web_contents_capture_util.h35
-rw-r--r--chromium/content/browser/renderer_host/media/web_contents_tracker.cc102
-rw-r--r--chromium/content/browser/renderer_host/media/web_contents_tracker.h86
-rw-r--r--chromium/content/browser/renderer_host/media/web_contents_video_capture_device.cc791
-rw-r--r--chromium/content/browser/renderer_host/media/web_contents_video_capture_device.h60
-rw-r--r--chromium/content/browser/renderer_host/media/web_contents_video_capture_device_unittest.cc818
-rw-r--r--chromium/content/browser/renderer_host/media/webrtc_identity_service_host.cc10
-rw-r--r--chromium/content/browser/renderer_host/media/webrtc_identity_service_host.h3
-rw-r--r--chromium/content/browser/renderer_host/media/webrtc_identity_service_host_unittest.cc15
-rw-r--r--chromium/content/browser/renderer_host/memory_benchmark_message_filter.cc10
-rw-r--r--chromium/content/browser/renderer_host/memory_benchmark_message_filter.h3
-rw-r--r--chromium/content/browser/renderer_host/native_web_keyboard_event_aura.cc14
-rw-r--r--chromium/content/browser/renderer_host/native_web_keyboard_event_gtk.cc75
-rw-r--r--chromium/content/browser/renderer_host/native_web_keyboard_event_win.cc49
-rw-r--r--chromium/content/browser/renderer_host/overscroll_controller.cc31
-rw-r--r--chromium/content/browser/renderer_host/overscroll_controller.h17
-rw-r--r--chromium/content/browser/renderer_host/p2p/socket_dispatcher_host.cc118
-rw-r--r--chromium/content/browser/renderer_host/p2p/socket_dispatcher_host.h37
-rw-r--r--chromium/content/browser/renderer_host/p2p/socket_host.cc506
-rw-r--r--chromium/content/browser/renderer_host/p2p/socket_host.h62
-rw-r--r--chromium/content/browser/renderer_host/p2p/socket_host_tcp.cc86
-rw-r--r--chromium/content/browser/renderer_host/p2p/socket_host_tcp.h24
-rw-r--r--chromium/content/browser/renderer_host/p2p/socket_host_tcp_server.cc26
-rw-r--r--chromium/content/browser/renderer_host/p2p/socket_host_tcp_server.h11
-rw-r--r--chromium/content/browser/renderer_host/p2p/socket_host_tcp_server_unittest.cc9
-rw-r--r--chromium/content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc91
-rw-r--r--chromium/content/browser/renderer_host/p2p/socket_host_test_utils.cc9
-rw-r--r--chromium/content/browser/renderer_host/p2p/socket_host_test_utils.h4
-rw-r--r--chromium/content/browser/renderer_host/p2p/socket_host_udp.cc89
-rw-r--r--chromium/content/browser/renderer_host/p2p/socket_host_udp.h15
-rw-r--r--chromium/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc55
-rw-r--r--chromium/content/browser/renderer_host/p2p/socket_host_unittest.cc376
-rw-r--r--chromium/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc84
-rw-r--r--chromium/content/browser/renderer_host/pepper/browser_ppapi_host_impl.h51
-rw-r--r--chromium/content/browser/renderer_host/pepper/browser_ppapi_host_test.cc22
-rw-r--r--chromium/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc85
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_browser_font_singleton_host.cc13
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_external_file_ref_backend.cc39
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_external_file_ref_backend.h16
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_file_io_host.cc430
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_file_io_host.h70
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_file_ref_host.cc79
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_file_ref_host.h7
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc248
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_file_system_browser_host.h57
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_file_system_browser_host_unittest.cc16
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc161
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.h3
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_gamepad_host.cc14
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_gamepad_host.h13
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc38
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.cc46
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.h2
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc81
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.h18
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_lookup_request.h2
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_message_filter.cc19
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_message_filter.h3
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_network_monitor_host.cc49
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_network_monitor_host.h7
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_network_proxy_host.cc67
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_network_proxy_host.h2
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_print_settings_manager.cc45
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_printing_host.cc14
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_printing_host.h8
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_printing_host_unittest.cc52
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_renderer_connection.cc43
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_renderer_connection.h3
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_security_helper.cc21
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_socket_utils.cc75
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_socket_utils.h10
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.cc72
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.h11
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_tcp_socket.cc159
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc261
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h25
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_truetype_font_list_host.cc26
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_truetype_font_list_win.cc23
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc129
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.h9
-rw-r--r--chromium/content/browser/renderer_host/pepper/quota_reservation.cc81
-rw-r--r--chromium/content/browser/renderer_host/pepper/quota_reservation.h24
-rw-r--r--chromium/content/browser/renderer_host/pepper/quota_reservation_unittest.cc150
-rw-r--r--chromium/content/browser/renderer_host/pepper/ssl_context_helper.cc6
-rw-r--r--chromium/content/browser/renderer_host/popup_menu_helper_mac.h10
-rw-r--r--chromium/content/browser/renderer_host/popup_menu_helper_mac.mm39
-rw-r--r--chromium/content/browser/renderer_host/render_message_filter.cc294
-rw-r--r--chromium/content/browser/renderer_host/render_message_filter.h57
-rw-r--r--chromium/content/browser/renderer_host/render_process_host_browsertest.cc126
-rw-r--r--chromium/content/browser/renderer_host/render_process_host_impl.cc1149
-rw-r--r--chromium/content/browser/renderer_host/render_process_host_impl.h178
-rw-r--r--chromium/content/browser/renderer_host/render_process_host_unittest.cc2
-rw-r--r--chromium/content/browser/renderer_host/render_sandbox_host_linux.cc710
-rw-r--r--chromium/content/browser/renderer_host/render_sandbox_host_linux.h17
-rw-r--r--chromium/content/browser/renderer_host/render_view_host_browsertest.cc68
-rw-r--r--chromium/content/browser/renderer_host/render_view_host_delegate.cc24
-rw-r--r--chromium/content/browser/renderer_host/render_view_host_delegate.h181
-rw-r--r--chromium/content/browser/renderer_host/render_view_host_delegate_view.h82
-rw-r--r--chromium/content/browser/renderer_host/render_view_host_factory.cc10
-rw-r--r--chromium/content/browser/renderer_host/render_view_host_factory.h2
-rw-r--r--chromium/content/browser/renderer_host/render_view_host_impl.cc1361
-rw-r--r--chromium/content/browser/renderer_host/render_view_host_impl.h409
-rw-r--r--chromium/content/browser/renderer_host/render_view_host_unittest.cc93
-rw-r--r--chromium/content/browser/renderer_host/render_widget_helper.cc22
-rw-r--r--chromium/content/browser/renderer_host/render_widget_helper.h13
-rw-r--r--chromium/content/browser/renderer_host/render_widget_helper_mac.mm64
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_browsertest.cc53
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_delegate.cc14
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_delegate.h19
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_impl.cc1114
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_impl.h317
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_unittest.cc1885
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_android.cc1118
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_android.h195
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_aura.cc2230
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_aura.h457
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc1899
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_base.cc106
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_base.h377
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_browsertest.cc263
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_gtk.cc1608
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_gtk.h340
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_guest.cc630
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_guest.h226
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_guest_unittest.cc81
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_mac.h278
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_mac.mm2084
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_mac_dictionary_helper.h4
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_mac_dictionary_helper.mm2
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm49
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm92
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_win.cc3225
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_view_win.h616
-rw-r--r--chromium/content/browser/renderer_host/renderer_frame_manager.cc88
-rw-r--r--chromium/content/browser/renderer_host/renderer_frame_manager.h18
-rw-r--r--chromium/content/browser/renderer_host/sandbox_ipc_linux.cc650
-rw-r--r--chromium/content/browser/renderer_host/sandbox_ipc_linux.h87
-rw-r--r--chromium/content/browser/renderer_host/socket_stream_dispatcher_host.cc51
-rw-r--r--chromium/content/browser/renderer_host/socket_stream_dispatcher_host.h5
-rw-r--r--chromium/content/browser/renderer_host/socket_stream_host.cc17
-rw-r--r--chromium/content/browser/renderer_host/socket_stream_host.h8
-rw-r--r--chromium/content/browser/renderer_host/software_frame_manager.cc96
-rw-r--r--chromium/content/browser/renderer_host/software_frame_manager_unittest.cc21
-rw-r--r--chromium/content/browser/renderer_host/software_layer_mac.h22
-rw-r--r--chromium/content/browser/renderer_host/software_layer_mac.mm66
-rw-r--r--chromium/content/browser/renderer_host/text_input_client_mac.h22
-rw-r--r--chromium/content/browser/renderer_host/text_input_client_mac.mm18
-rw-r--r--chromium/content/browser/renderer_host/text_input_client_mac_unittest.mm13
-rw-r--r--chromium/content/browser/renderer_host/text_input_client_message_filter.h7
-rw-r--r--chromium/content/browser/renderer_host/text_input_client_message_filter.mm23
-rw-r--r--chromium/content/browser/renderer_host/ui_events_helper.cc31
-rw-r--r--chromium/content/browser/renderer_host/ui_events_helper.h6
-rw-r--r--chromium/content/browser/renderer_host/web_input_event_aura.cc55
-rw-r--r--chromium/content/browser/renderer_host/web_input_event_aurawin.cc17
-rw-r--r--chromium/content/browser/renderer_host/web_input_event_aurax11.cc2
-rw-r--r--chromium/content/browser/renderer_host/webmenurunner_mac.h3
-rw-r--r--chromium/content/browser/renderer_host/webmenurunner_mac.mm4
-rw-r--r--chromium/content/browser/renderer_host/websocket_dispatcher_host.cc45
-rw-r--r--chromium/content/browser/renderer_host/websocket_dispatcher_host.h35
-rw-r--r--chromium/content/browser/renderer_host/websocket_dispatcher_host_unittest.cc50
-rw-r--r--chromium/content/browser/renderer_host/websocket_host.cc230
-rw-r--r--chromium/content/browser/renderer_host/websocket_host.h18
-rw-r--r--chromium/content/browser/resolve_proxy_msg_helper.cc11
-rw-r--r--chromium/content/browser/resolve_proxy_msg_helper.h3
-rw-r--r--chromium/content/browser/resolve_proxy_msg_helper_unittest.cc3
-rw-r--r--chromium/content/browser/resources/accessibility/accessibility.js27
-rw-r--r--chromium/content/browser/resources/devtools/devtools_pinch_cursor.pngbin0 -> 139 bytes
-rw-r--r--chromium/content/browser/resources/devtools/devtools_pinch_cursor_2x.pngbin0 -> 198 bytes
-rw-r--r--chromium/content/browser/resources/devtools/devtools_touch_cursor.pngbin0 -> 271 bytes
-rw-r--r--chromium/content/browser/resources/devtools/devtools_touch_cursor_2x.pngbin0 -> 518 bytes
-rw-r--r--chromium/content/browser/resources/gpu/OWNERS2
-rw-r--r--chromium/content/browser/resources/gpu/gpu_internals.html1
-rw-r--r--chromium/content/browser/resources/gpu/info_view.css6
-rw-r--r--chromium/content/browser/resources/gpu/info_view.html15
-rw-r--r--chromium/content/browser/resources/gpu/info_view.js155
-rw-r--r--chromium/content/browser/resources/indexed_db/indexeddb_internals.css6
-rw-r--r--chromium/content/browser/resources/indexed_db/indexeddb_internals.html2
-rw-r--r--chromium/content/browser/resources/media/OWNERS1
-rw-r--r--chromium/content/browser/resources/media/data_series.js3
-rw-r--r--chromium/content/browser/resources/media/dump_creator.js131
-rw-r--r--chromium/content/browser/resources/media/stats_graph_helper.js101
-rw-r--r--chromium/content/browser/resources/media/stats_table.js5
-rw-r--r--chromium/content/browser/resources/media/tab_view.js2
-rw-r--r--chromium/content/browser/resources/media/timeline_graph_view.js83
-rw-r--r--chromium/content/browser/resources/media/webrtc_internals.css17
-rw-r--r--chromium/content/browser/resources/media/webrtc_internals.js60
-rw-r--r--chromium/content/browser/resources/service_worker/OWNERS5
-rw-r--r--chromium/content/browser/resources/service_worker/serviceworker_internals.css44
-rw-r--r--chromium/content/browser/resources/service_worker/serviceworker_internals.html141
-rw-r--r--chromium/content/browser/resources/service_worker/serviceworker_internals.js304
-rw-r--r--chromium/content/browser/safe_util_win.cc2
-rw-r--r--chromium/content/browser/screen_orientation/OWNERS1
-rw-r--r--chromium/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc85
-rw-r--r--chromium/content/browser/screen_orientation/screen_orientation_dispatcher_host.h50
-rw-r--r--chromium/content/browser/screen_orientation/screen_orientation_provider.h28
-rw-r--r--chromium/content/browser/screen_orientation/screen_orientation_provider_android.cc51
-rw-r--r--chromium/content/browser/screen_orientation/screen_orientation_provider_android.h34
-rw-r--r--chromium/content/browser/security_exploit_browsertest.cc19
-rw-r--r--chromium/content/browser/service_worker/BUILD.gn12
-rw-r--r--chromium/content/browser/service_worker/DEPS3
-rw-r--r--chromium/content/browser/service_worker/OWNERS13
-rw-r--r--chromium/content/browser/service_worker/embedded_worker_instance.cc301
-rw-r--r--chromium/content/browser/service_worker/embedded_worker_instance.h130
-rw-r--r--chromium/content/browser/service_worker/embedded_worker_instance_unittest.cc166
-rw-r--r--chromium/content/browser/service_worker/embedded_worker_registry.cc193
-rw-r--r--chromium/content/browser/service_worker/embedded_worker_registry.h61
-rw-r--r--chromium/content/browser/service_worker/embedded_worker_test_helper.cc241
-rw-r--r--chromium/content/browser/service_worker/embedded_worker_test_helper.h135
-rw-r--r--chromium/content/browser/service_worker/service_worker_browsertest.cc710
-rw-r--r--chromium/content/browser/service_worker/service_worker_context.h28
-rw-r--r--chromium/content/browser/service_worker/service_worker_context_core.cc287
-rw-r--r--chromium/content/browser/service_worker/service_worker_context_core.h140
-rw-r--r--chromium/content/browser/service_worker/service_worker_context_observer.h70
-rw-r--r--chromium/content/browser/service_worker/service_worker_context_request_handler.cc90
-rw-r--r--chromium/content/browser/service_worker/service_worker_context_request_handler.h42
-rw-r--r--chromium/content/browser/service_worker/service_worker_context_unittest.cc301
-rw-r--r--chromium/content/browser/service_worker/service_worker_context_wrapper.cc148
-rw-r--r--chromium/content/browser/service_worker/service_worker_context_wrapper.h41
-rw-r--r--chromium/content/browser/service_worker/service_worker_controllee_request_handler.cc121
-rw-r--r--chromium/content/browser/service_worker/service_worker_controllee_request_handler.h57
-rw-r--r--chromium/content/browser/service_worker/service_worker_database.cc1113
-rw-r--r--chromium/content/browser/service_worker/service_worker_database.h324
-rw-r--r--chromium/content/browser/service_worker/service_worker_database.proto31
-rw-r--r--chromium/content/browser/service_worker/service_worker_database_unittest.cc904
-rw-r--r--chromium/content/browser/service_worker/service_worker_disk_cache.cc22
-rw-r--r--chromium/content/browser/service_worker/service_worker_disk_cache.h55
-rw-r--r--chromium/content/browser/service_worker/service_worker_dispatcher_host.cc380
-rw-r--r--chromium/content/browser/service_worker/service_worker_dispatcher_host.h101
-rw-r--r--chromium/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc252
-rw-r--r--chromium/content/browser/service_worker/service_worker_fetch_dispatcher.cc78
-rw-r--r--chromium/content/browser/service_worker/service_worker_fetch_dispatcher.h57
-rw-r--r--chromium/content/browser/service_worker/service_worker_handle.cc126
-rw-r--r--chromium/content/browser/service_worker/service_worker_handle.h92
-rw-r--r--chromium/content/browser/service_worker/service_worker_handle_unittest.cc114
-rw-r--r--chromium/content/browser/service_worker/service_worker_histograms.cc30
-rw-r--r--chromium/content/browser/service_worker/service_worker_histograms.h38
-rw-r--r--chromium/content/browser/service_worker/service_worker_info.cc57
-rw-r--r--chromium/content/browser/service_worker/service_worker_info.h56
-rw-r--r--chromium/content/browser/service_worker/service_worker_internals_ui.cc675
-rw-r--r--chromium/content/browser/service_worker/service_worker_internals_ui.h74
-rw-r--r--chromium/content/browser/service_worker/service_worker_job_coordinator.cc112
-rw-r--r--chromium/content/browser/service_worker/service_worker_job_coordinator.h85
-rw-r--r--chromium/content/browser/service_worker/service_worker_job_unittest.cc702
-rw-r--r--chromium/content/browser/service_worker/service_worker_process_manager.cc193
-rw-r--r--chromium/content/browser/service_worker/service_worker_process_manager.h118
-rw-r--r--chromium/content/browser/service_worker/service_worker_proto.gyp17
-rw-r--r--chromium/content/browser/service_worker/service_worker_provider_host.cc165
-rw-r--r--chromium/content/browser/service_worker/service_worker_provider_host.h101
-rw-r--r--chromium/content/browser/service_worker/service_worker_provider_host_unittest.cc283
-rw-r--r--chromium/content/browser/service_worker/service_worker_read_from_cache_job.cc191
-rw-r--r--chromium/content/browser/service_worker/service_worker_read_from_cache_job.h73
-rw-r--r--chromium/content/browser/service_worker/service_worker_register_job.cc538
-rw-r--r--chromium/content/browser/service_worker/service_worker_register_job.h177
-rw-r--r--chromium/content/browser/service_worker/service_worker_register_job_base.h37
-rw-r--r--chromium/content/browser/service_worker/service_worker_registration.cc52
-rw-r--r--chromium/content/browser/service_worker/service_worker_registration.h30
-rw-r--r--chromium/content/browser/service_worker/service_worker_registration_status.cc42
-rw-r--r--chromium/content/browser/service_worker/service_worker_registration_status.h13
-rw-r--r--chromium/content/browser/service_worker/service_worker_registration_unittest.cc63
-rw-r--r--chromium/content/browser/service_worker/service_worker_request_handler.cc111
-rw-r--r--chromium/content/browser/service_worker/service_worker_request_handler.h83
-rw-r--r--chromium/content/browser/service_worker/service_worker_script_cache_map.cc72
-rw-r--r--chromium/content/browser/service_worker/service_worker_script_cache_map.h62
-rw-r--r--chromium/content/browser/service_worker/service_worker_storage.cc1057
-rw-r--r--chromium/content/browser/service_worker/service_worker_storage.h322
-rw-r--r--chromium/content/browser/service_worker/service_worker_storage_unittest.cc899
-rw-r--r--chromium/content/browser/service_worker/service_worker_test_utils.h39
-rw-r--r--chromium/content/browser/service_worker/service_worker_unregister_job.cc90
-rw-r--r--chromium/content/browser/service_worker/service_worker_unregister_job.h64
-rw-r--r--chromium/content/browser/service_worker/service_worker_url_request_job.cc304
-rw-r--r--chromium/content/browser/service_worker/service_worker_url_request_job.h137
-rw-r--r--chromium/content/browser/service_worker/service_worker_url_request_job_unittest.cc238
-rw-r--r--chromium/content/browser/service_worker/service_worker_utils.cc65
-rw-r--r--chromium/content/browser/service_worker/service_worker_utils.h55
-rw-r--r--chromium/content/browser/service_worker/service_worker_utils_unittest.cc103
-rw-r--r--chromium/content/browser/service_worker/service_worker_version.cc627
-rw-r--r--chromium/content/browser/service_worker/service_worker_version.h280
-rw-r--r--chromium/content/browser/service_worker/service_worker_version_unittest.cc355
-rw-r--r--chromium/content/browser/service_worker/service_worker_write_to_cache_job.cc327
-rw-r--r--chromium/content/browser/service_worker/service_worker_write_to_cache_job.h117
-rw-r--r--chromium/content/browser/session_history_browsertest.cc26
-rw-r--r--chromium/content/browser/shared_worker/OWNERS3
-rw-r--r--chromium/content/browser/shared_worker/shared_worker_host.cc336
-rw-r--r--chromium/content/browser/shared_worker/shared_worker_host.h135
-rw-r--r--chromium/content/browser/shared_worker/shared_worker_instance.cc68
-rw-r--r--chromium/content/browser/shared_worker/shared_worker_instance.h70
-rw-r--r--chromium/content/browser/shared_worker/shared_worker_instance_unittest.cc83
-rw-r--r--chromium/content/browser/shared_worker/shared_worker_message_filter.cc168
-rw-r--r--chromium/content/browser/shared_worker/shared_worker_message_filter.h78
-rw-r--r--chromium/content/browser/shared_worker/shared_worker_service_impl.cc657
-rw-r--r--chromium/content/browser/shared_worker/shared_worker_service_impl.h176
-rw-r--r--chromium/content/browser/shared_worker/shared_worker_service_impl_unittest.cc905
-rw-r--r--chromium/content/browser/site_instance_impl.cc19
-rw-r--r--chromium/content/browser/site_instance_impl.h12
-rw-r--r--chromium/content/browser/site_instance_impl_unittest.cc18
-rw-r--r--chromium/content/browser/site_per_process_browsertest.cc546
-rw-r--r--chromium/content/browser/speech/endpointer/energy_endpointer.cc2
-rw-r--r--chromium/content/browser/speech/google_one_shot_remote_engine.cc10
-rw-r--r--chromium/content/browser/speech/google_one_shot_remote_engine_unittest.cc6
-rw-r--r--chromium/content/browser/speech/google_streaming_remote_engine.cc39
-rw-r--r--chromium/content/browser/speech/google_streaming_remote_engine_unittest.cc24
-rw-r--r--chromium/content/browser/speech/input_tag_speech_browsertest.cc136
-rw-r--r--chromium/content/browser/speech/input_tag_speech_dispatcher_host.cc227
-rw-r--r--chromium/content/browser/speech/input_tag_speech_dispatcher_host.h93
-rw-r--r--chromium/content/browser/speech/proto/BUILD.gn11
-rw-r--r--chromium/content/browser/speech/proto/speech_proto.gyp4
-rw-r--r--chromium/content/browser/speech/speech_recognition_browsertest.cc17
-rw-r--r--chromium/content/browser/speech/speech_recognition_dispatcher_host.cc43
-rw-r--r--chromium/content/browser/speech/speech_recognition_dispatcher_host.h6
-rw-r--r--chromium/content/browser/speech/speech_recognition_manager_impl.cc10
-rw-r--r--chromium/content/browser/speech/speech_recognizer_impl.cc40
-rw-r--r--chromium/content/browser/speech/speech_recognizer_impl.h13
-rw-r--r--chromium/content/browser/speech/speech_recognizer_impl_unittest.cc60
-rw-r--r--chromium/content/browser/ssl/ssl_cert_error_handler.cc4
-rw-r--r--chromium/content/browser/ssl/ssl_cert_error_handler.h2
-rw-r--r--chromium/content/browser/ssl/ssl_client_auth_handler.cc12
-rw-r--r--chromium/content/browser/ssl/ssl_client_auth_handler.h2
-rw-r--r--chromium/content/browser/ssl/ssl_error_handler.cc13
-rw-r--r--chromium/content/browser/ssl/ssl_error_handler.h6
-rw-r--r--chromium/content/browser/ssl/ssl_manager.cc6
-rw-r--r--chromium/content/browser/ssl/ssl_manager.h2
-rw-r--r--chromium/content/browser/ssl/ssl_policy.cc13
-rw-r--r--chromium/content/browser/storage_partition_impl.cc55
-rw-r--r--chromium/content/browser/storage_partition_impl.h7
-rw-r--r--chromium/content/browser/storage_partition_impl_map.cc55
-rw-r--r--chromium/content/browser/storage_partition_impl_map.h4
-rw-r--r--chromium/content/browser/storage_partition_impl_map_unittest.cc37
-rw-r--r--chromium/content/browser/storage_partition_impl_unittest.cc460
-rw-r--r--chromium/content/browser/streams/stream.cc11
-rw-r--r--chromium/content/browser/streams/stream.h7
-rw-r--r--chromium/content/browser/streams/stream_context.cc1
-rw-r--r--chromium/content/browser/streams/stream_context.h1
-rw-r--r--chromium/content/browser/streams/stream_handle_impl.cc36
-rw-r--r--chromium/content/browser/streams/stream_handle_impl.h14
-rw-r--r--chromium/content/browser/streams/stream_url_request_job.cc2
-rw-r--r--chromium/content/browser/streams/stream_url_request_job_unittest.cc8
-rw-r--r--chromium/content/browser/theme_helper_mac.h6
-rw-r--r--chromium/content/browser/theme_helper_mac.mm83
-rw-r--r--chromium/content/browser/time_zone_monitor.cc31
-rw-r--r--chromium/content/browser/time_zone_monitor.h51
-rw-r--r--chromium/content/browser/time_zone_monitor_android.cc38
-rw-r--r--chromium/content/browser/time_zone_monitor_android.h37
-rw-r--r--chromium/content/browser/time_zone_monitor_chromeos.cc37
-rw-r--r--chromium/content/browser/time_zone_monitor_linux.cc166
-rw-r--r--chromium/content/browser/time_zone_monitor_mac.mm40
-rw-r--r--chromium/content/browser/time_zone_monitor_win.cc46
-rw-r--r--chromium/content/browser/tracing/BUILD.gn66
-rw-r--r--chromium/content/browser/tracing/etw_system_event_consumer_win.cc215
-rw-r--r--chromium/content/browser/tracing/etw_system_event_consumer_win.h75
-rwxr-xr-xchromium/content/browser/tracing/generate_trace_viewer_grd.py1
-rw-r--r--chromium/content/browser/tracing/trace_message_filter.cc25
-rw-r--r--chromium/content/browser/tracing/trace_message_filter.h3
-rw-r--r--chromium/content/browser/tracing/tracing_controller_browsertest.cc50
-rw-r--r--chromium/content/browser/tracing/tracing_controller_impl.cc427
-rw-r--r--chromium/content/browser/tracing/tracing_controller_impl.h50
-rw-r--r--chromium/content/browser/tracing/tracing_resources.gyp8
-rw-r--r--chromium/content/browser/tracing/tracing_ui.cc161
-rw-r--r--chromium/content/browser/tracing/tracing_ui.h4
-rw-r--r--chromium/content/browser/user_metrics.cc47
-rw-r--r--chromium/content/browser/utility_process_host_impl.cc92
-rw-r--r--chromium/content/browser/utility_process_host_impl.h13
-rw-r--r--chromium/content/browser/vibration/vibration_message_filter.cc18
-rw-r--r--chromium/content/browser/vibration/vibration_message_filter.h3
-rw-r--r--chromium/content/browser/vibration/vibration_provider_android.cc1
-rw-r--r--chromium/content/browser/vibration/vibration_provider_android.h2
-rw-r--r--chromium/content/browser/web_contents/OWNERS4
-rw-r--r--chromium/content/browser/web_contents/aura/gesture_nav_simple.cc232
-rw-r--r--chromium/content/browser/web_contents/aura/gesture_nav_simple.h55
-rw-r--r--chromium/content/browser/web_contents/aura/image_window_delegate.cc8
-rw-r--r--chromium/content/browser/web_contents/aura/image_window_delegate.h9
-rw-r--r--chromium/content/browser/web_contents/aura/overscroll_navigation_overlay.cc302
-rw-r--r--chromium/content/browser/web_contents/aura/overscroll_navigation_overlay.h128
-rw-r--r--chromium/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc197
-rw-r--r--chromium/content/browser/web_contents/aura/shadow_layer_delegate.cc2
-rw-r--r--chromium/content/browser/web_contents/aura/window_slider.cc129
-rw-r--r--chromium/content/browser/web_contents/aura/window_slider.h58
-rw-r--r--chromium/content/browser/web_contents/aura/window_slider_unittest.cc329
-rw-r--r--chromium/content/browser/web_contents/drag_utils_gtk.cc38
-rw-r--r--chromium/content/browser/web_contents/drag_utils_gtk.h24
-rw-r--r--chromium/content/browser/web_contents/opened_by_dom_browsertest.cc139
-rw-r--r--chromium/content/browser/web_contents/touch_editable_impl_aura.cc117
-rw-r--r--chromium/content/browser/web_contents/touch_editable_impl_aura.h17
-rw-r--r--chromium/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc522
-rw-r--r--chromium/content/browser/web_contents/web_contents_android.cc11
-rw-r--r--chromium/content/browser/web_contents/web_contents_android.h5
-rw-r--r--chromium/content/browser/web_contents/web_contents_drag_win.cc443
-rw-r--r--chromium/content/browser/web_contents/web_contents_drag_win.h122
-rw-r--r--chromium/content/browser/web_contents/web_contents_impl.cc2484
-rw-r--r--chromium/content/browser/web_contents/web_contents_impl.h524
-rw-r--r--chromium/content/browser/web_contents/web_contents_impl_browsertest.cc262
-rw-r--r--chromium/content/browser/web_contents/web_contents_impl_unittest.cc637
-rw-r--r--chromium/content/browser/web_contents/web_contents_view.h137
-rw-r--r--chromium/content/browser/web_contents/web_contents_view_android.cc60
-rw-r--r--chromium/content/browser/web_contents/web_contents_view_android.h26
-rw-r--r--chromium/content/browser/web_contents/web_contents_view_aura.cc673
-rw-r--r--chromium/content/browser/web_contents/web_contents_view_aura.h57
-rw-r--r--chromium/content/browser/web_contents/web_contents_view_aura_browsertest.cc244
-rw-r--r--chromium/content/browser/web_contents/web_contents_view_gtk.cc431
-rw-r--r--chromium/content/browser/web_contents/web_contents_view_gtk.h147
-rw-r--r--chromium/content/browser/web_contents/web_contents_view_guest.cc101
-rw-r--r--chromium/content/browser/web_contents/web_contents_view_guest.h49
-rw-r--r--chromium/content/browser/web_contents/web_contents_view_mac.h21
-rw-r--r--chromium/content/browser/web_contents/web_contents_view_mac.mm68
-rw-r--r--chromium/content/browser/web_contents/web_contents_view_mac_unittest.mm2
-rw-r--r--chromium/content/browser/web_contents/web_contents_view_overscroll_animator_mac.h61
-rw-r--r--chromium/content/browser/web_contents/web_contents_view_overscroll_animator_slider_mac.h59
-rw-r--r--chromium/content/browser/web_contents/web_contents_view_overscroll_animator_slider_mac.mm259
-rw-r--r--chromium/content/browser/web_contents/web_contents_view_win.cc465
-rw-r--r--chromium/content/browser/web_contents/web_contents_view_win.h147
-rw-r--r--chromium/content/browser/web_contents/web_drag_dest_gtk.cc339
-rw-r--r--chromium/content/browser/web_contents/web_drag_dest_gtk.h114
-rw-r--r--chromium/content/browser/web_contents/web_drag_dest_mac.mm9
-rw-r--r--chromium/content/browser/web_contents/web_drag_dest_mac_unittest.mm4
-rw-r--r--chromium/content/browser/web_contents/web_drag_dest_win.cc286
-rw-r--r--chromium/content/browser/web_contents/web_drag_dest_win.h89
-rw-r--r--chromium/content/browser/web_contents/web_drag_source_gtk.cc403
-rw-r--r--chromium/content/browser/web_contents/web_drag_source_gtk.h115
-rw-r--r--chromium/content/browser/web_contents/web_drag_source_mac.h3
-rw-r--r--chromium/content/browser/web_contents/web_drag_source_mac.mm51
-rw-r--r--chromium/content/browser/web_contents/web_drag_source_win.cc130
-rw-r--r--chromium/content/browser/web_contents/web_drag_source_win.h79
-rw-r--r--chromium/content/browser/webkit_browsertest.cc19
-rw-r--r--chromium/content/browser/webui/content_web_ui_controller_factory.cc17
-rw-r--r--chromium/content/browser/webui/generic_handler.cc2
-rw-r--r--chromium/content/browser/webui/shared_resources_data_source.cc2
-rw-r--r--chromium/content/browser/webui/shared_resources_data_source.h2
-rw-r--r--chromium/content/browser/webui/url_data_manager_backend.cc164
-rw-r--r--chromium/content/browser/webui/url_data_manager_backend.h10
-rw-r--r--chromium/content/browser/webui/web_ui_controller_factory_registry.cc19
-rw-r--r--chromium/content/browser/webui/web_ui_controller_factory_registry.h3
-rw-r--r--chromium/content/browser/webui/web_ui_data_source_impl.cc32
-rw-r--r--chromium/content/browser/webui/web_ui_data_source_impl.h2
-rw-r--r--chromium/content/browser/webui/web_ui_data_source_unittest.cc32
-rw-r--r--chromium/content/browser/webui/web_ui_impl.cc98
-rw-r--r--chromium/content/browser/webui/web_ui_impl.h24
-rw-r--r--chromium/content/browser/webui/web_ui_message_handler.cc7
-rw-r--r--chromium/content/browser/webui/web_ui_message_handler_unittest.cc16
-rw-r--r--chromium/content/browser/webui/web_ui_mojo_browsertest.cc218
-rw-r--r--chromium/content/browser/worker_host/OWNERS2
-rw-r--r--chromium/content/browser/worker_host/worker_document_set.cc28
-rw-r--r--chromium/content/browser/worker_host/worker_document_set.h28
-rw-r--r--chromium/content/browser/worker_host/worker_message_filter.cc32
-rw-r--r--chromium/content/browser/worker_host/worker_message_filter.h8
-rw-r--r--chromium/content/browser/worker_host/worker_process_host.cc385
-rw-r--r--chromium/content/browser/worker_host/worker_process_host.h78
-rw-r--r--chromium/content/browser/worker_host/worker_service_impl.cc310
-rw-r--r--chromium/content/browser/worker_host/worker_service_impl.h44
-rw-r--r--chromium/content/browser/worker_host/worker_storage_partition.cc38
-rw-r--r--chromium/content/browser/worker_host/worker_storage_partition.h34
-rw-r--r--chromium/content/browser/zygote_host/zygote_host_impl_linux.cc191
-rw-r--r--chromium/content/browser/zygote_host/zygote_host_impl_linux.h1
-rw-r--r--chromium/content/child/BUILD.gn114
-rw-r--r--chromium/content/child/DEPS6
-rw-r--r--chromium/content/child/OWNERS2
-rw-r--r--chromium/content/child/appcache/appcache_backend_proxy.cc4
-rw-r--r--chromium/content/child/appcache/appcache_backend_proxy.h2
-rw-r--r--chromium/content/child/appcache/appcache_dispatcher.cc10
-rw-r--r--chromium/content/child/appcache/appcache_dispatcher.h6
-rw-r--r--chromium/content/child/appcache/appcache_frontend_impl.cc82
-rw-r--r--chromium/content/child/appcache/appcache_frontend_impl.h9
-rw-r--r--chromium/content/child/appcache/web_application_cache_host_impl.cc127
-rw-r--r--chromium/content/child/appcache/web_application_cache_host_impl.h24
-rw-r--r--chromium/content/child/assert_matching_enums.cc50
-rw-r--r--chromium/content/child/blink_glue.cc29
-rw-r--r--chromium/content/child/blink_glue.h23
-rw-r--r--chromium/content/child/blink_platform_impl.cc1105
-rw-r--r--chromium/content/child/blink_platform_impl.h183
-rw-r--r--chromium/content/child/blink_platform_unittest.cc67
-rw-r--r--chromium/content/child/browser_font_resource_trusted.cc9
-rw-r--r--chromium/content/child/child.gni15
-rw-r--r--chromium/content/child/child_histogram_message_filter.cc9
-rw-r--r--chromium/content/child/child_histogram_message_filter.h11
-rw-r--r--chromium/content/child/child_message_filter.cc5
-rw-r--r--chromium/content/child/child_message_filter.h13
-rw-r--r--chromium/content/child/child_process.cc4
-rw-r--r--chromium/content/child/child_process.h12
-rw-r--r--chromium/content/child/child_resource_message_filter.h6
-rw-r--r--chromium/content/child/child_shared_bitmap_manager.cc90
-rw-r--r--chromium/content/child/child_shared_bitmap_manager.h37
-rw-r--r--chromium/content/child/child_thread.cc192
-rw-r--r--chromium/content/child/child_thread.h51
-rw-r--r--chromium/content/child/content_child_helpers.cc55
-rw-r--r--chromium/content/child/content_child_helpers.h20
-rw-r--r--chromium/content/child/database_util.h2
-rw-r--r--chromium/content/child/db_message_filter.h7
-rw-r--r--chromium/content/child/fileapi/OWNERS7
-rw-r--r--chromium/content/child/fileapi/file_system_dispatcher.cc43
-rw-r--r--chromium/content/child/fileapi/file_system_dispatcher.h20
-rw-r--r--chromium/content/child/fileapi/webfilesystem_impl.cc339
-rw-r--r--chromium/content/child/fileapi/webfilesystem_impl.h27
-rw-r--r--chromium/content/child/fileapi/webfilewriter_base.cc10
-rw-r--r--chromium/content/child/fileapi/webfilewriter_base.h6
-rw-r--r--chromium/content/child/fileapi/webfilewriter_base_unittest.cc10
-rw-r--r--chromium/content/child/fileapi/webfilewriter_impl.cc7
-rw-r--r--chromium/content/child/fling_animator_impl_android.cc101
-rw-r--r--chromium/content/child/fling_animator_impl_android.h47
-rw-r--r--chromium/content/child/fling_curve_configuration.cc56
-rw-r--r--chromium/content/child/fling_curve_configuration.h58
-rw-r--r--chromium/content/child/ftp_directory_listing_response_delegate.cc129
-rw-r--r--chromium/content/child/ftp_directory_listing_response_delegate.h56
-rw-r--r--chromium/content/child/indexed_db/OWNERS10
-rw-r--r--chromium/content/child/indexed_db/indexed_db_dispatcher.cc217
-rw-r--r--chromium/content/child/indexed_db/indexed_db_dispatcher.h74
-rw-r--r--chromium/content/child/indexed_db/indexed_db_dispatcher_unittest.cc297
-rw-r--r--chromium/content/child/indexed_db/indexed_db_key_builders.cc18
-rw-r--r--chromium/content/child/indexed_db/indexed_db_key_builders.h15
-rw-r--r--chromium/content/child/indexed_db/indexed_db_message_filter.cc3
-rw-r--r--chromium/content/child/indexed_db/indexed_db_message_filter.h7
-rw-r--r--chromium/content/child/indexed_db/webidbcursor_impl.cc68
-rw-r--r--chromium/content/child/indexed_db/webidbcursor_impl.h31
-rw-r--r--chromium/content/child/indexed_db/webidbcursor_impl_unittest.cc228
-rw-r--r--chromium/content/child/indexed_db/webidbdatabase_impl.cc38
-rw-r--r--chromium/content/child/indexed_db/webidbdatabase_impl.h15
-rw-r--r--chromium/content/child/indexed_db/webidbfactory_impl.h6
-rw-r--r--chromium/content/child/mojo/mojo_application.cc45
-rw-r--r--chromium/content/child/mojo/mojo_application.h48
-rw-r--r--chromium/content/child/multipart_response_delegate_unittest.cc676
-rw-r--r--chromium/content/child/npapi/np_channel_base.cc11
-rw-r--r--chromium/content/child/npapi/np_channel_base.h2
-rw-r--r--chromium/content/child/npapi/plugin_host.cc43
-rw-r--r--chromium/content/child/npapi/plugin_instance.cc20
-rw-r--r--chromium/content/child/npapi/plugin_lib.cc4
-rw-r--r--chromium/content/child/npapi/plugin_stream_url.cc27
-rw-r--r--chromium/content/child/npapi/plugin_stream_url.h7
-rw-r--r--chromium/content/child/npapi/plugin_url_fetcher.cc75
-rw-r--r--chromium/content/child/npapi/plugin_url_fetcher.h40
-rw-r--r--chromium/content/child/npapi/webplugin_delegate.h3
-rw-r--r--chromium/content/child/npapi/webplugin_delegate_impl.cc6
-rw-r--r--chromium/content/child/npapi/webplugin_delegate_impl.h38
-rw-r--r--chromium/content/child/npapi/webplugin_delegate_impl_android.cc2
-rw-r--r--chromium/content/child/npapi/webplugin_delegate_impl_aura.cc2
-rw-r--r--chromium/content/child/npapi/webplugin_delegate_impl_gtk.cc751
-rw-r--r--chromium/content/child/npapi/webplugin_delegate_impl_mac.mm6
-rw-r--r--chromium/content/child/npapi/webplugin_delegate_impl_win.cc13
-rw-r--r--chromium/content/child/plugin_messages.h12
-rw-r--r--chromium/content/child/power_monitor_broadcast_source.cc6
-rw-r--r--chromium/content/child/power_monitor_broadcast_source.h7
-rw-r--r--chromium/content/child/power_monitor_broadcast_source_unittest.cc4
-rw-r--r--chromium/content/child/quota_dispatcher.cc48
-rw-r--r--chromium/content/child/quota_dispatcher.h13
-rw-r--r--chromium/content/child/quota_message_filter.h1
-rw-r--r--chromium/content/child/request_extra_data.cc45
-rw-r--r--chromium/content/child/request_extra_data.h98
-rw-r--r--chromium/content/child/request_info.cc25
-rw-r--r--chromium/content/child/request_info.h87
-rw-r--r--chromium/content/child/resource_dispatcher.cc319
-rw-r--r--chromium/content/child/resource_dispatcher.h109
-rw-r--r--chromium/content/child/resource_dispatcher_unittest.cc790
-rw-r--r--chromium/content/child/runtime_features.cc102
-rw-r--r--chromium/content/child/runtime_features.h4
-rw-r--r--chromium/content/child/service_worker/OWNERS6
-rw-r--r--chromium/content/child/service_worker/service_worker_dispatcher.cc242
-rw-r--r--chromium/content/child/service_worker/service_worker_dispatcher.h107
-rw-r--r--chromium/content/child/service_worker/service_worker_handle_reference.cc49
-rw-r--r--chromium/content/child/service_worker/service_worker_handle_reference.h54
-rw-r--r--chromium/content/child/service_worker/service_worker_message_filter.cc48
-rw-r--r--chromium/content/child/service_worker/service_worker_message_filter.h10
-rw-r--r--chromium/content/child/service_worker/service_worker_network_provider.cc62
-rw-r--r--chromium/content/child/service_worker/service_worker_network_provider.h58
-rw-r--r--chromium/content/child/service_worker/service_worker_provider_context.cc99
-rw-r--r--chromium/content/child/service_worker/service_worker_provider_context.h80
-rw-r--r--chromium/content/child/service_worker/web_service_worker_impl.cc91
-rw-r--r--chromium/content/child/service_worker/web_service_worker_impl.h48
-rw-r--r--chromium/content/child/service_worker/web_service_worker_provider_impl.cc77
-rw-r--r--chromium/content/child/service_worker/web_service_worker_provider_impl.h22
-rw-r--r--chromium/content/child/shared_worker_devtools_agent.cc83
-rw-r--r--chromium/content/child/shared_worker_devtools_agent.h49
-rw-r--r--chromium/content/child/simple_webmimeregistry_impl.cc100
-rw-r--r--chromium/content/child/simple_webmimeregistry_impl.h52
-rw-r--r--chromium/content/child/site_isolation_policy.cc171
-rw-r--r--chromium/content/child/site_isolation_policy.h86
-rw-r--r--chromium/content/child/site_isolation_policy_browsertest.cc4
-rw-r--r--chromium/content/child/socket_stream_dispatcher.cc40
-rw-r--r--chromium/content/child/socket_stream_dispatcher.h10
-rw-r--r--chromium/content/child/sync_load_response.cc13
-rw-r--r--chromium/content/child/sync_load_response.h34
-rw-r--r--chromium/content/child/thread_safe_sender.h4
-rw-r--r--chromium/content/child/threaded_data_provider.cc289
-rw-r--r--chromium/content/child/threaded_data_provider.h83
-rw-r--r--chromium/content/child/touch_fling_gesture_curve.cc163
-rw-r--r--chromium/content/child/touch_fling_gesture_curve.h55
-rw-r--r--chromium/content/child/touch_fling_gesture_curve_unittest.cc70
-rw-r--r--chromium/content/child/web_discardable_memory_impl.cc48
-rw-r--r--chromium/content/child/web_discardable_memory_impl.h42
-rw-r--r--chromium/content/child/web_socket_stream_handle_bridge.h37
-rw-r--r--chromium/content/child/web_socket_stream_handle_delegate.h44
-rw-r--r--chromium/content/child/web_socket_stream_handle_impl.cc198
-rw-r--r--chromium/content/child/web_socket_stream_handle_impl.h35
-rw-r--r--chromium/content/child/web_url_loader_impl.cc884
-rw-r--r--chromium/content/child/web_url_loader_impl.h52
-rw-r--r--chromium/content/child/webcrypto/OWNERS2
-rw-r--r--chromium/content/child/webcrypto/crypto_data.cc29
-rw-r--r--chromium/content/child/webcrypto/crypto_data.h49
-rw-r--r--chromium/content/child/webcrypto/jwk.cc1018
-rw-r--r--chromium/content/child/webcrypto/jwk.h34
-rw-r--r--chromium/content/child/webcrypto/platform_crypto.h292
-rw-r--r--chromium/content/child/webcrypto/platform_crypto_nss.cc1934
-rw-r--r--chromium/content/child/webcrypto/platform_crypto_openssl.cc520
-rw-r--r--chromium/content/child/webcrypto/shared_crypto.cc955
-rw-r--r--chromium/content/child/webcrypto/shared_crypto.h187
-rw-r--r--chromium/content/child/webcrypto/shared_crypto_unittest.cc4399
-rw-r--r--chromium/content/child/webcrypto/status.cc226
-rw-r--r--chromium/content/child/webcrypto/status.h212
-rw-r--r--chromium/content/child/webcrypto/webcrypto_impl.cc775
-rw-r--r--chromium/content/child/webcrypto/webcrypto_impl.h113
-rw-r--r--chromium/content/child/webcrypto/webcrypto_util.cc207
-rw-r--r--chromium/content/child/webcrypto/webcrypto_util.h85
-rw-r--r--chromium/content/child/webfallbackthemeengine_impl.cc193
-rw-r--r--chromium/content/child/webfallbackthemeengine_impl.h39
-rw-r--r--chromium/content/child/webfileutilities_impl.cc56
-rw-r--r--chromium/content/child/webfileutilities_impl.h37
-rw-r--r--chromium/content/child/webkitplatformsupport_impl.cc49
-rw-r--r--chromium/content/child/webkitplatformsupport_impl.h40
-rw-r--r--chromium/content/child/webmessageportchannel_impl.cc81
-rw-r--r--chromium/content/child/webmessageportchannel_impl.h12
-rw-r--r--chromium/content/child/websocket_bridge.cc39
-rw-r--r--chromium/content/child/websocket_bridge.h16
-rw-r--r--chromium/content/child/websocket_dispatcher.cc1
-rw-r--r--chromium/content/child/webthemeengine_impl_android.cc178
-rw-r--r--chromium/content/child/webthemeengine_impl_android.h26
-rw-r--r--chromium/content/child/webthemeengine_impl_default.cc202
-rw-r--r--chromium/content/child/webthemeengine_impl_default.h32
-rw-r--r--chromium/content/child/webthemeengine_impl_mac.cc61
-rw-r--r--chromium/content/child/webthemeengine_impl_mac.h25
-rw-r--r--chromium/content/child/webthread_impl.cc131
-rw-r--r--chromium/content/child/webthread_impl.h74
-rw-r--r--chromium/content/child/worker_task_runner.cc112
-rw-r--r--chromium/content/child/worker_task_runner.h59
-rw-r--r--chromium/content/child/worker_task_runner_unittest.cc57
-rw-r--r--chromium/content/child/worker_thread_task_runner.cc4
-rw-r--r--chromium/content/child/worker_thread_task_runner.h2
-rw-r--r--chromium/content/common/BUILD.gn269
-rw-r--r--chromium/content/common/DEPS15
-rw-r--r--chromium/content/common/OWNERS33
-rw-r--r--chromium/content/common/accessibility_messages.h52
-rw-r--r--chromium/content/common/accessibility_node_data.cc575
-rw-r--r--chromium/content/common/accessibility_node_data.h233
-rw-r--r--chromium/content/common/android/OWNERS1
-rw-r--r--chromium/content/common/android/address_parser.cc5
-rw-r--r--chromium/content/common/android/address_parser_internal.cc24
-rw-r--r--chromium/content/common/android/address_parser_internal.h4
-rw-r--r--chromium/content/common/android/address_parser_unittest.cc14
-rw-r--r--chromium/content/common/android/device_telephony_info.cc39
-rw-r--r--chromium/content/common/android/device_telephony_info.h37
-rw-r--r--chromium/content/common/android/gin_java_bridge_value.cc128
-rw-r--r--chromium/content/common/android/gin_java_bridge_value.h65
-rw-r--r--chromium/content/common/android/gin_java_bridge_value_unittest.cc92
-rw-r--r--chromium/content/common/android/linker/DEPS5
-rw-r--r--chromium/content/common/android/surface_texture_lookup.cc27
-rw-r--r--chromium/content/common/android/surface_texture_lookup.h26
-rw-r--r--chromium/content/common/android/trace_event_binding.cc135
-rw-r--r--chromium/content/common/android/trace_event_binding.h12
-rw-r--r--chromium/content/common/appcache_messages.h26
-rw-r--r--chromium/content/common/battery_status_messages.h32
-rw-r--r--chromium/content/common/browser_plugin/OWNERS7
-rw-r--r--chromium/content/common/browser_plugin/browser_plugin_constants.cc48
-rw-r--r--chromium/content/common/browser_plugin/browser_plugin_constants.h45
-rw-r--r--chromium/content/common/browser_plugin/browser_plugin_messages.h184
-rw-r--r--chromium/content/common/browser_rendering_stats.cc36
-rw-r--r--chromium/content/common/browser_rendering_stats.h37
-rw-r--r--chromium/content/common/cc_messages.cc79
-rw-r--r--chromium/content/common/cc_messages.h45
-rw-r--r--chromium/content/common/cc_messages_perftest.cc10
-rw-r--r--chromium/content/common/cc_messages_unittest.cc274
-rw-r--r--chromium/content/common/child_process_host_impl.cc42
-rw-r--r--chromium/content/common/child_process_host_impl.h16
-rw-r--r--chromium/content/common/child_process_messages.h47
-rw-r--r--chromium/content/common/child_process_sandbox_support_impl_linux.cc48
-rw-r--r--chromium/content/common/child_process_sandbox_support_impl_linux.h6
-rw-r--r--chromium/content/common/clipboard_format.h20
-rw-r--r--chromium/content/common/clipboard_messages.cc30
-rw-r--r--chromium/content/common/clipboard_messages.h31
-rw-r--r--chromium/content/common/common.gni14
-rw-r--r--chromium/content/common/content_message_generator.h25
-rw-r--r--chromium/content/common/content_param_traits.cc19
-rw-r--r--chromium/content/common/content_param_traits.h14
-rw-r--r--chromium/content/common/content_param_traits_macros.h31
-rw-r--r--chromium/content/common/content_paths.cc3
-rw-r--r--chromium/content/common/content_switches_internal.cc33
-rw-r--r--chromium/content/common/content_switches_internal.h14
-rw-r--r--chromium/content/common/cursors/DEPS4
-rw-r--r--chromium/content/common/cursors/webcursor.cc265
-rw-r--r--chromium/content/common/cursors/webcursor.h184
-rw-r--r--chromium/content/common/cursors/webcursor_android.cc33
-rw-r--r--chromium/content/common/cursors/webcursor_aura.cc114
-rw-r--r--chromium/content/common/cursors/webcursor_aurawin.cc60
-rw-r--r--chromium/content/common/cursors/webcursor_aurax11.cc90
-rw-r--r--chromium/content/common/cursors/webcursor_mac.mm391
-rw-r--r--chromium/content/common/cursors/webcursor_ozone.cc77
-rw-r--r--chromium/content/common/cursors/webcursor_unittest.cc213
-rw-r--r--chromium/content/common/database_connections_unittest.cc147
-rw-r--r--chromium/content/common/database_identifier_unittest.cc247
-rw-r--r--chromium/content/common/desktop_notification_messages.h11
-rw-r--r--chromium/content/common/device_orientation/device_motion_hardware_buffer.h18
-rw-r--r--chromium/content/common/device_orientation/device_motion_messages.h28
-rw-r--r--chromium/content/common/device_orientation/device_orientation_hardware_buffer.h18
-rw-r--r--chromium/content/common/device_orientation/device_orientation_messages.h26
-rw-r--r--chromium/content/common/device_sensors/OWNERS (renamed from chromium/content/common/device_orientation/OWNERS)0
-rw-r--r--chromium/content/common/device_sensors/device_motion_hardware_buffer.h18
-rw-r--r--chromium/content/common/device_sensors/device_motion_messages.h28
-rw-r--r--chromium/content/common/device_sensors/device_orientation_hardware_buffer.h18
-rw-r--r--chromium/content/common/device_sensors/device_orientation_messages.h26
-rw-r--r--chromium/content/common/devtools_messages.h23
-rw-r--r--chromium/content/common/dom_storage/OWNERS13
-rw-r--r--chromium/content/common/dom_storage/dom_storage_map.cc2
-rw-r--r--chromium/content/common/dom_storage/dom_storage_map_unittest.cc10
-rw-r--r--chromium/content/common/dom_storage/dom_storage_messages.h5
-rw-r--r--chromium/content/common/drag_messages.h6
-rw-r--r--chromium/content/common/drag_traits.h12
-rw-r--r--chromium/content/common/file_utilities_messages.h4
-rw-r--r--chromium/content/common/fileapi/OWNERS7
-rw-r--r--chromium/content/common/fileapi/file_system_messages.h13
-rw-r--r--chromium/content/common/fileapi/file_system_util_unittest.cc307
-rw-r--r--chromium/content/common/font_cache_dispatcher_win.cc12
-rw-r--r--chromium/content/common/font_cache_dispatcher_win.h12
-rw-r--r--chromium/content/common/font_list_android.cc4
-rw-r--r--chromium/content/common/font_list_ozone.cc4
-rw-r--r--chromium/content/common/frame_message_enums.h40
-rw-r--r--chromium/content/common/frame_messages.h578
-rw-r--r--chromium/content/common/frame_param.cc40
-rw-r--r--chromium/content/common/frame_param.h10
-rw-r--r--chromium/content/common/frame_param_macros.h64
-rw-r--r--chromium/content/common/gamepad_messages.h12
-rw-r--r--chromium/content/common/gamepad_param_traits.cc79
-rw-r--r--chromium/content/common/gamepad_param_traits.h32
-rw-r--r--chromium/content/common/gamepad_user_gesture.cc2
-rw-r--r--chromium/content/common/geolocation_messages.h35
-rw-r--r--chromium/content/common/gin_java_bridge_messages.h68
-rw-r--r--chromium/content/common/gpu/DEPS3
-rw-r--r--chromium/content/common/gpu/OWNERS12
-rw-r--r--chromium/content/common/gpu/client/command_buffer_proxy_impl.cc245
-rw-r--r--chromium/content/common/gpu/client/command_buffer_proxy_impl.h66
-rw-r--r--chromium/content/common/gpu/client/context_provider_command_buffer.cc54
-rw-r--r--chromium/content/common/gpu/client/context_provider_command_buffer.h18
-rw-r--r--chromium/content/common/gpu/client/context_provider_command_buffer_browsertest.cc59
-rw-r--r--chromium/content/common/gpu/client/gl_helper.cc1091
-rw-r--r--chromium/content/common/gpu/client/gl_helper.h291
-rw-r--r--chromium/content/common/gpu/client/gl_helper_benchmark.cc18
-rw-r--r--chromium/content/common/gpu/client/gl_helper_readback_support.cc115
-rw-r--r--chromium/content/common/gpu/client/gl_helper_readback_support.h64
-rw-r--r--chromium/content/common/gpu/client/gl_helper_scaling.cc550
-rw-r--r--chromium/content/common/gpu/client/gl_helper_scaling.h16
-rw-r--r--chromium/content/common/gpu/client/gl_helper_unittest.cc1673
-rw-r--r--chromium/content/common/gpu/client/gl_helper_unittests.cc1393
-rw-r--r--chromium/content/common/gpu/client/gpu_channel_host.cc206
-rw-r--r--chromium/content/common/gpu/client/gpu_channel_host.h78
-rw-r--r--chromium/content/common/gpu/client/gpu_in_process_context_tests.cc6
-rw-r--r--chromium/content/common/gpu/client/gpu_memory_buffer_factory_host.h37
-rw-r--r--chromium/content/common/gpu/client/gpu_memory_buffer_impl.cc30
-rw-r--r--chromium/content/common/gpu/client/gpu_memory_buffer_impl.h41
-rw-r--r--chromium/content/common/gpu/client/gpu_memory_buffer_impl_android.cc49
-rw-r--r--chromium/content/common/gpu/client/gpu_memory_buffer_impl_io_surface.cc46
-rw-r--r--chromium/content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h18
-rw-r--r--chromium/content/common/gpu/client/gpu_memory_buffer_impl_linux.cc40
-rw-r--r--chromium/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc42
-rw-r--r--chromium/content/common/gpu/client/gpu_memory_buffer_impl_shm.cc83
-rw-r--r--chromium/content/common/gpu/client/gpu_memory_buffer_impl_shm.h27
-rw-r--r--chromium/content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.cc123
-rw-r--r--chromium/content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h44
-rw-r--r--chromium/content/common/gpu/client/gpu_memory_buffer_impl_win.cc40
-rw-r--r--chromium/content/common/gpu/client/gpu_video_decode_accelerator_host.cc123
-rw-r--r--chromium/content/common/gpu/client/gpu_video_decode_accelerator_host.h30
-rw-r--r--chromium/content/common/gpu/client/gpu_video_encode_accelerator_host.cc158
-rw-r--r--chromium/content/common/gpu/client/gpu_video_encode_accelerator_host.h63
-rw-r--r--chromium/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc1195
-rw-r--r--chromium/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h636
-rw-r--r--chromium/content/common/gpu/devtools_gpu_agent.cc19
-rw-r--r--chromium/content/common/gpu/devtools_gpu_agent.h5
-rw-r--r--chromium/content/common/gpu/devtools_gpu_instrumentation.cc6
-rw-r--r--chromium/content/common/gpu/devtools_gpu_instrumentation.h18
-rw-r--r--chromium/content/common/gpu/gpu_channel.cc336
-rw-r--r--chromium/content/common/gpu/gpu_channel.h85
-rw-r--r--chromium/content/common/gpu/gpu_channel_manager.cc89
-rw-r--r--chromium/content/common/gpu/gpu_channel_manager.h30
-rw-r--r--chromium/content/common/gpu/gpu_command_buffer_stub.cc324
-rw-r--r--chromium/content/common/gpu/gpu_command_buffer_stub.h33
-rw-r--r--chromium/content/common/gpu/gpu_memory_manager.cc465
-rw-r--r--chromium/content/common/gpu/gpu_memory_manager.h88
-rw-r--r--chromium/content/common/gpu/gpu_memory_manager_client.cc12
-rw-r--r--chromium/content/common/gpu/gpu_memory_manager_client.h20
-rw-r--r--chromium/content/common/gpu/gpu_memory_manager_unittest.cc197
-rw-r--r--chromium/content/common/gpu/gpu_messages.h248
-rw-r--r--chromium/content/common/gpu/gpu_rendering_stats.cc35
-rw-r--r--chromium/content/common/gpu/gpu_rendering_stats.h34
-rw-r--r--chromium/content/common/gpu/gpu_result_codes.h20
-rw-r--r--chromium/content/common/gpu/image_transport_surface.cc129
-rw-r--r--chromium/content/common/gpu/image_transport_surface.h22
-rw-r--r--chromium/content/common/gpu/image_transport_surface_android.cc36
-rw-r--r--chromium/content/common/gpu/image_transport_surface_fbo_mac.cc345
-rw-r--r--chromium/content/common/gpu/image_transport_surface_fbo_mac.h124
-rw-r--r--chromium/content/common/gpu/image_transport_surface_iosurface_mac.cc109
-rw-r--r--chromium/content/common/gpu/image_transport_surface_iosurface_mac.h41
-rw-r--r--chromium/content/common/gpu/image_transport_surface_linux.cc5
-rw-r--r--chromium/content/common/gpu/image_transport_surface_mac.cc559
-rw-r--r--chromium/content/common/gpu/image_transport_surface_mac.mm74
-rw-r--r--chromium/content/common/gpu/image_transport_surface_win.cc256
-rw-r--r--chromium/content/common/gpu/media/OWNERS1
-rw-r--r--chromium/content/common/gpu/media/android_video_decode_accelerator.cc103
-rw-r--r--chromium/content/common/gpu/media/android_video_decode_accelerator.h14
-rw-r--r--chromium/content/common/gpu/media/android_video_decode_accelerator_unittest.cc8
-rw-r--r--chromium/content/common/gpu/media/android_video_encode_accelerator.cc85
-rw-r--r--chromium/content/common/gpu/media/android_video_encode_accelerator.h10
-rw-r--r--chromium/content/common/gpu/media/dxva_video_decode_accelerator.cc115
-rw-r--r--chromium/content/common/gpu/media/dxva_video_decode_accelerator.h15
-rw-r--r--chromium/content/common/gpu/media/exynos_v4l2_video_device.cc211
-rw-r--r--chromium/content/common/gpu/media/exynos_v4l2_video_device.h58
-rw-r--r--chromium/content/common/gpu/media/exynos_video_decode_accelerator.cc2023
-rw-r--r--chromium/content/common/gpu/media/exynos_video_decode_accelerator.h443
-rw-r--r--chromium/content/common/gpu/media/exynos_video_encode_accelerator.cc1554
-rw-r--r--chromium/content/common/gpu/media/exynos_video_encode_accelerator.h308
-rw-r--r--chromium/content/common/gpu/media/gpu_video_decode_accelerator.cc167
-rw-r--r--chromium/content/common/gpu/media/gpu_video_decode_accelerator.h16
-rw-r--r--chromium/content/common/gpu/media/gpu_video_encode_accelerator.cc186
-rw-r--r--chromium/content/common/gpu/media/gpu_video_encode_accelerator.h47
-rw-r--r--chromium/content/common/gpu/media/h264_bit_reader.cc112
-rw-r--r--chromium/content/common/gpu/media/h264_bit_reader.h79
-rw-r--r--chromium/content/common/gpu/media/h264_bit_reader_unittest.cc72
-rw-r--r--chromium/content/common/gpu/media/h264_dpb.h5
-rw-r--r--chromium/content/common/gpu/media/h264_parser.cc1133
-rw-r--r--chromium/content/common/gpu/media/h264_parser.h355
-rw-r--r--chromium/content/common/gpu/media/h264_parser_unittest.cc93
-rw-r--r--chromium/content/common/gpu/media/rendering_helper.cc447
-rw-r--r--chromium/content/common/gpu/media/rendering_helper.h100
-rw-r--r--chromium/content/common/gpu/media/tegra_v4l2_video_device.cc218
-rw-r--r--chromium/content/common/gpu/media/tegra_v4l2_video_device.h58
-rw-r--r--chromium/content/common/gpu/media/v4l2_image_processor.cc717
-rw-r--r--chromium/content/common/gpu/media/v4l2_image_processor.h177
-rw-r--r--chromium/content/common/gpu/media/v4l2_video_decode_accelerator.cc1941
-rw-r--r--chromium/content/common/gpu/media/v4l2_video_decode_accelerator.h446
-rw-r--r--chromium/content/common/gpu/media/v4l2_video_device.cc139
-rw-r--r--chromium/content/common/gpu/media/v4l2_video_device.h102
-rw-r--r--chromium/content/common/gpu/media/v4l2_video_encode_accelerator.cc1096
-rw-r--r--chromium/content/common/gpu/media/v4l2_video_encode_accelerator.h283
-rw-r--r--chromium/content/common/gpu/media/va.sigs38
-rw-r--r--chromium/content/common/gpu/media/va_stub_header.fragment9
-rw-r--r--chromium/content/common/gpu/media/va_surface.h2
-rw-r--r--chromium/content/common/gpu/media/vaapi_h264_decoder.cc149
-rw-r--r--chromium/content/common/gpu/media/vaapi_h264_decoder.h34
-rw-r--r--chromium/content/common/gpu/media/vaapi_h264_decoder_unittest.cc385
-rw-r--r--chromium/content/common/gpu/media/vaapi_video_decode_accelerator.cc88
-rw-r--r--chromium/content/common/gpu/media/vaapi_video_decode_accelerator.h22
-rw-r--r--chromium/content/common/gpu/media/vaapi_wrapper.cc375
-rw-r--r--chromium/content/common/gpu/media/vaapi_wrapper.h19
-rw-r--r--chromium/content/common/gpu/media/video_decode_accelerator_impl.cc15
-rw-r--r--chromium/content/common/gpu/media/video_decode_accelerator_impl.h30
-rw-r--r--chromium/content/common/gpu/media/video_decode_accelerator_unittest.cc514
-rw-r--r--chromium/content/common/gpu/media/video_encode_accelerator_unittest.cc944
-rw-r--r--chromium/content/common/gpu/media/vt_video_decode_accelerator.cc63
-rw-r--r--chromium/content/common/gpu/media/vt_video_decode_accelerator.h56
-rw-r--r--chromium/content/common/gpu/stream_texture_android.cc205
-rw-r--r--chromium/content/common/gpu/stream_texture_android.h83
-rw-r--r--chromium/content/common/gpu/stream_texture_manager_android.cc146
-rw-r--r--chromium/content/common/gpu/stream_texture_manager_android.h112
-rw-r--r--chromium/content/common/gpu/sync_point_manager.cc22
-rw-r--r--chromium/content/common/gpu/sync_point_manager.h4
-rw-r--r--chromium/content/common/gpu/texture_image_transport_surface.cc118
-rw-r--r--chromium/content/common/gpu/texture_image_transport_surface.h15
-rw-r--r--chromium/content/common/handle_enumerator_win.cc2
-rw-r--r--chromium/content/common/host_shared_bitmap_manager.cc196
-rw-r--r--chromium/content/common/host_shared_bitmap_manager.h86
-rw-r--r--chromium/content/common/host_shared_bitmap_manager_unittest.cc160
-rw-r--r--chromium/content/common/indexed_db/OWNERS9
-rw-r--r--chromium/content/common/indexed_db/indexed_db_key.cc112
-rw-r--r--chromium/content/common/indexed_db/indexed_db_key.h13
-rw-r--r--chromium/content/common/indexed_db/indexed_db_key_path.h1
-rw-r--r--chromium/content/common/indexed_db/indexed_db_key_range.cc2
-rw-r--r--chromium/content/common/indexed_db/indexed_db_key_unittest.cc16
-rw-r--r--chromium/content/common/indexed_db/indexed_db_messages.h102
-rw-r--r--chromium/content/common/indexed_db/indexed_db_param_traits.cc11
-rw-r--r--chromium/content/common/indexed_db/indexed_db_param_traits.h9
-rw-r--r--chromium/content/common/input/did_overscroll_params.h20
-rw-r--r--chromium/content/common/input/gesture_event_stream_validator.cc78
-rw-r--r--chromium/content/common/input/gesture_event_stream_validator.h38
-rw-r--r--chromium/content/common/input/input_event_ack_state.h22
-rw-r--r--chromium/content/common/input/input_event_stream_validator.cc48
-rw-r--r--chromium/content/common/input/input_event_stream_validator.h41
-rw-r--r--chromium/content/common/input/input_param_traits_unittest.cc13
-rw-r--r--chromium/content/common/input/synthetic_gesture_params.cc17
-rw-r--r--chromium/content/common/input/synthetic_gesture_params.h5
-rw-r--r--chromium/content/common/input/synthetic_pinch_gesture_params.cc6
-rw-r--r--chromium/content/common/input/synthetic_pinch_gesture_params.h3
-rw-r--r--chromium/content/common/input/synthetic_smooth_scroll_gesture_params.cc2
-rw-r--r--chromium/content/common/input/synthetic_smooth_scroll_gesture_params.h4
-rw-r--r--chromium/content/common/input/synthetic_tap_gesture_params.cc4
-rw-r--r--chromium/content/common/input/synthetic_web_input_event_builders.cc61
-rw-r--r--chromium/content/common/input/synthetic_web_input_event_builders.h42
-rw-r--r--chromium/content/common/input/touch_action.h18
-rw-r--r--chromium/content/common/input/touch_event_stream_validator.cc108
-rw-r--r--chromium/content/common/input/touch_event_stream_validator.h33
-rw-r--r--chromium/content/common/input/web_input_event_traits.cc103
-rw-r--r--chromium/content/common/input/web_input_event_traits.h2
-rw-r--r--chromium/content/common/input/web_input_event_traits_unittest.cc163
-rw-r--r--chromium/content/common/input/web_touch_event_traits.cc70
-rw-r--r--chromium/content/common/input/web_touch_event_traits.h41
-rw-r--r--chromium/content/common/input_messages.h50
-rw-r--r--chromium/content/common/mac/attributed_string_coder.mm2
-rw-r--r--chromium/content/common/mac/attributed_string_coder_unittest.mm3
-rw-r--r--chromium/content/common/mac/font_descriptor_unittest.mm2
-rw-r--r--chromium/content/common/media/OWNERS18
-rw-r--r--chromium/content/common/media/aec_dump_messages.h36
-rw-r--r--chromium/content/common/media/audio_messages.h10
-rw-r--r--chromium/content/common/media/cdm_messages.h70
-rw-r--r--chromium/content/common/media/cdm_messages_enums.h14
-rw-r--r--chromium/content/common/media/media_param_traits.cc5
-rw-r--r--chromium/content/common/media/media_player_messages_android.h121
-rw-r--r--chromium/content/common/media/media_player_messages_enums_android.h3
-rw-r--r--chromium/content/common/media/media_stream_messages.h23
-rw-r--r--chromium/content/common/media/media_stream_options.cc3
-rw-r--r--chromium/content/common/media/media_stream_options.h3
-rw-r--r--chromium/content/common/media/media_stream_track_metrics_host_messages.h19
-rw-r--r--chromium/content/common/media/midi_messages.h43
-rw-r--r--chromium/content/common/media/peer_connection_tracker_messages.h8
-rw-r--r--chromium/content/common/media/video_capture.h10
-rw-r--r--chromium/content/common/media/video_capture_messages.h44
-rw-r--r--chromium/content/common/message_router.cc7
-rw-r--r--chromium/content/common/message_router.h7
-rw-r--r--chromium/content/common/mojo/OWNERS23
-rw-r--r--chromium/content/common/mojo/mojo_messages.h24
-rw-r--r--chromium/content/common/mojo/mojo_service_names.cc13
-rw-r--r--chromium/content/common/mojo/mojo_service_names.h18
-rw-r--r--chromium/content/common/net/url_fetcher.cc10
-rw-r--r--chromium/content/common/net/url_request_user_data.cc4
-rw-r--r--chromium/content/common/net/url_request_user_data.h7
-rw-r--r--chromium/content/common/p2p_messages.h42
-rw-r--r--chromium/content/common/p2p_socket_type.h53
-rw-r--r--chromium/content/common/page_state_serialization.cc62
-rw-r--r--chromium/content/common/page_state_serialization.h6
-rw-r--r--chromium/content/common/page_state_serialization_unittest.cc27
-rw-r--r--chromium/content/common/pepper_plugin_list.cc14
-rw-r--r--chromium/content/common/pepper_renderer_instance_data.cc6
-rw-r--r--chromium/content/common/pepper_renderer_instance_data.h4
-rw-r--r--chromium/content/common/plugin_constants_win.cc39
-rw-r--r--chromium/content/common/plugin_constants_win.h40
-rw-r--r--chromium/content/common/plugin_list.cc37
-rw-r--r--chromium/content/common/plugin_list.h20
-rw-r--r--chromium/content/common/plugin_list_mac.mm9
-rw-r--r--chromium/content/common/plugin_list_posix.cc576
-rw-r--r--chromium/content/common/plugin_list_unittest.cc124
-rw-r--r--chromium/content/common/plugin_list_win.cc43
-rw-r--r--chromium/content/common/plugin_process_messages.h10
-rw-r--r--chromium/content/common/push_messaging_messages.h28
-rw-r--r--chromium/content/common/quota_messages.h23
-rw-r--r--chromium/content/common/resource_messages.cc18
-rw-r--r--chromium/content/common/resource_messages.h80
-rw-r--r--chromium/content/common/resource_request_body.cc45
-rw-r--r--chromium/content/common/resource_request_body.h65
-rw-r--r--chromium/content/common/sandbox_init_mac.cc3
-rw-r--r--chromium/content/common/sandbox_init_mac.h8
-rw-r--r--chromium/content/common/sandbox_init_win.cc4
-rw-r--r--chromium/content/common/sandbox_linux/OWNERS1
-rw-r--r--chromium/content/common/sandbox_linux/android/sandbox_bpf_base_policy_android.cc60
-rw-r--r--chromium/content/common/sandbox_linux/android/sandbox_bpf_base_policy_android.h32
-rw-r--r--chromium/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc57
-rw-r--r--chromium/content/common/sandbox_linux/bpf_gpu_policy_linux.cc53
-rw-r--r--chromium/content/common/sandbox_linux/bpf_gpu_policy_linux.h7
-rw-r--r--chromium/content/common/sandbox_linux/bpf_ppapi_policy_linux.cc27
-rw-r--r--chromium/content/common/sandbox_linux/bpf_renderer_policy_linux.cc30
-rw-r--r--chromium/content/common/sandbox_linux/sandbox_linux.cc112
-rw-r--r--chromium/content/common/sandbox_linux/sandbox_linux.h27
-rw-r--r--chromium/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc40
-rw-r--r--chromium/content/common/sandbox_mac.mm26
-rw-r--r--chromium/content/common/sandbox_mac_diraccess_unittest.mm17
-rw-r--r--chromium/content/common/sandbox_mac_fontloading_unittest.mm5
-rw-r--r--chromium/content/common/sandbox_mac_system_access_unittest.mm13
-rw-r--r--chromium/content/common/sandbox_mac_unittest_helper.mm4
-rw-r--r--chromium/content/common/sandbox_win.cc148
-rw-r--r--chromium/content/common/sandbox_win.h8
-rw-r--r--chromium/content/common/savable_url_schemes.cc16
-rw-r--r--chromium/content/common/screen_orientation_messages.h64
-rw-r--r--chromium/content/common/service_worker/OWNERS18
-rw-r--r--chromium/content/common/service_worker/embedded_worker_messages.h93
-rw-r--r--chromium/content/common/service_worker/service_worker_messages.h204
-rw-r--r--chromium/content/common/service_worker/service_worker_status_code.cc38
-rw-r--r--chromium/content/common/service_worker/service_worker_status_code.h52
-rw-r--r--chromium/content/common/service_worker/service_worker_types.cc41
-rw-r--r--chromium/content/common/service_worker/service_worker_types.h85
-rw-r--r--chromium/content/common/service_worker_messages.h73
-rw-r--r--chromium/content/common/set_process_title.cc14
-rw-r--r--chromium/content/common/shareable_file_reference_unittest.cc61
-rw-r--r--chromium/content/common/socket_stream_handle_data.cc36
-rw-r--r--chromium/content/common/socket_stream_handle_data.h26
-rw-r--r--chromium/content/common/socket_stream_messages.h4
-rw-r--r--chromium/content/common/speech_recognition_messages.h78
-rw-r--r--chromium/content/common/swapped_out_messages.cc34
-rw-r--r--chromium/content/common/text_input_client_messages.h9
-rw-r--r--chromium/content/common/url_schemes.cc12
-rw-r--r--chromium/content/common/user_agent.cc197
-rw-r--r--chromium/content/common/user_agent_ios.mm130
-rw-r--r--chromium/content/common/view_message_enums.h62
-rw-r--r--chromium/content/common/view_messages.h897
-rw-r--r--chromium/content/common/web_ui_setup.mojom16
-rw-r--r--chromium/content/common/webplugininfo_unittest.cc2
-rw-r--r--chromium/content/common/websocket.h7
-rw-r--r--chromium/content/common/websocket_messages.h17
-rw-r--r--chromium/content/common/worker_messages.h32
-rw-r--r--chromium/content/common/zygote_commands_linux.h22
-rw-r--r--chromium/content/content.gni12
-rw-r--r--chromium/content/content.gyp129
-rw-r--r--chromium/content/content_app.gypi20
-rw-r--r--chromium/content/content_browser.gypi2856
-rw-r--r--chromium/content/content_browsertests.isolate12
-rw-r--r--chromium/content/content_child.gypi396
-rw-r--r--chromium/content/content_common.gypi995
-rw-r--r--chromium/content/content_common_mojo_bindings.gypi24
-rw-r--r--chromium/content/content_gpu.gypi2
-rw-r--r--chromium/content/content_jni.gypi12
-rw-r--r--chromium/content/content_plugin.gypi27
-rw-r--r--chromium/content/content_ppapi_plugin.gypi5
-rw-r--r--chromium/content/content_renderer.gypi1410
-rw-r--r--chromium/content/content_resources.grd15
-rw-r--r--chromium/content/content_shell.gypi427
-rw-r--r--chromium/content/content_tests.gypi789
-rw-r--r--chromium/content/content_unittests.isolate7
-rw-r--r--chromium/content/content_utility.gypi2
-rw-r--r--chromium/content/content_worker.gypi3
-rw-r--r--chromium/content/gpu/BUILD.gn73
-rw-r--r--chromium/content/gpu/gpu_child_thread.cc61
-rw-r--r--chromium/content/gpu/gpu_idirect3d9_mock_win.cc9
-rw-r--r--chromium/content/gpu/gpu_idirect3d9_mock_win.h76
-rw-r--r--chromium/content/gpu/gpu_main.cc208
-rw-r--r--chromium/content/gpu/in_process_gpu_thread.cc1
-rw-r--r--chromium/content/plugin/BUILD.gn44
-rw-r--r--chromium/content/plugin/DEPS1
-rw-r--r--chromium/content/plugin/plugin_channel.cc15
-rw-r--r--chromium/content/plugin/plugin_channel.h1
-rw-r--r--chromium/content/plugin/plugin_main.cc13
-rw-r--r--chromium/content/plugin/plugin_main_linux.cc74
-rw-r--r--chromium/content/plugin/plugin_thread.cc53
-rw-r--r--chromium/content/plugin/plugin_thread.h3
-rw-r--r--chromium/content/plugin/webplugin_accelerated_surface_proxy_mac.cc5
-rw-r--r--chromium/content/plugin/webplugin_delegate_stub.cc7
-rw-r--r--chromium/content/plugin/webplugin_delegate_stub.h2
-rw-r--r--chromium/content/plugin/webplugin_proxy.cc117
-rw-r--r--chromium/content/plugin/webplugin_proxy.h31
-rw-r--r--chromium/content/port/OWNERS10
-rw-r--r--chromium/content/port/browser/DEPS3
-rw-r--r--chromium/content/port/browser/event_with_latency_info.h59
-rw-r--r--chromium/content/port/browser/location_provider.h58
-rw-r--r--chromium/content/port/browser/render_view_host_delegate_view.h77
-rw-r--r--chromium/content/port/browser/render_widget_host_view_frame_subscriber.h72
-rw-r--r--chromium/content/port/browser/render_widget_host_view_port.h354
-rw-r--r--chromium/content/port/browser/vibration_provider.h23
-rw-r--r--chromium/content/port/browser/web_contents_view_port.h64
-rw-r--r--chromium/content/port/common/input_event_ack_state.h22
-rw-r--r--chromium/content/ppapi_plugin/BUILD.gn35
-rw-r--r--chromium/content/ppapi_plugin/broker_process_dispatcher.cc2
-rw-r--r--chromium/content/ppapi_plugin/ppapi_broker_main.cc2
-rw-r--r--chromium/content/ppapi_plugin/ppapi_plugin_main.cc15
-rw-r--r--chromium/content/ppapi_plugin/ppapi_thread.cc112
-rw-r--r--chromium/content/ppapi_plugin/ppapi_thread.h13
-rw-r--r--chromium/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc34
-rw-r--r--chromium/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h7
-rw-r--r--chromium/content/public/OWNERS10
-rw-r--r--chromium/content/public/android/OWNERS4
-rw-r--r--chromium/content/public/app/BUILD.gn25
-rw-r--r--chromium/content/public/app/android_library_loader_hooks.h24
-rw-r--r--chromium/content/public/app/content_main.h54
-rw-r--r--chromium/content/public/app/content_main_delegate.cc4
-rw-r--r--chromium/content/public/app/content_main_delegate.h8
-rw-r--r--chromium/content/public/app/content_main_runner.h30
-rw-r--r--chromium/content/public/app/startup_helper_win.h4
-rw-r--r--chromium/content/public/browser/BUILD.gn39
-rw-r--r--chromium/content/public/browser/android/OWNERS1
-rw-r--r--chromium/content/public/browser/android/compositor.h55
-rw-r--r--chromium/content/public/browser/android/compositor_client.h15
-rw-r--r--chromium/content/public/browser/android/content_view_core.h24
-rw-r--r--chromium/content/public/browser/android/external_video_surface_container.h52
-rw-r--r--chromium/content/public/browser/android/layer_tree_build_helper.h31
-rw-r--r--chromium/content/public/browser/android/synchronous_compositor.h45
-rw-r--r--chromium/content/public/browser/android/synchronous_compositor_client.h12
-rw-r--r--chromium/content/public/browser/android/ui_resource_client_android.h30
-rw-r--r--chromium/content/public/browser/android/ui_resource_provider.h27
-rw-r--r--chromium/content/public/browser/ax_event_notification_details.cc23
-rw-r--r--chromium/content/public/browser/ax_event_notification_details.h37
-rw-r--r--chromium/content/public/browser/blob_handle.h25
-rw-r--r--chromium/content/public/browser/browser_accessibility_state.h8
-rw-r--r--chromium/content/public/browser/browser_child_process_host.h10
-rw-r--r--chromium/content/public/browser/browser_child_process_host_delegate.h4
-rw-r--r--chromium/content/public/browser/browser_child_process_observer.h5
-rw-r--r--chromium/content/public/browser/browser_context.h42
-rw-r--r--chromium/content/public/browser/browser_main_runner.h3
-rw-r--r--chromium/content/public/browser/browser_message_filter.cc68
-rw-r--r--chromium/content/public/browser/browser_message_filter.h35
-rw-r--r--chromium/content/public/browser/browser_plugin_guest_delegate.cc34
-rw-r--r--chromium/content/public/browser/browser_plugin_guest_delegate.h93
-rw-r--r--chromium/content/public/browser/browser_plugin_guest_manager.cc29
-rw-r--r--chromium/content/public/browser/browser_plugin_guest_manager.h63
-rw-r--r--chromium/content/public/browser/browser_ppapi_host.h25
-rw-r--r--chromium/content/public/browser/browser_thread.h27
-rw-r--r--chromium/content/public/browser/child_process_data.h4
-rw-r--r--chromium/content/public/browser/child_process_security_policy.h6
-rw-r--r--chromium/content/public/browser/content_browser_client.cc95
-rw-r--r--chromium/content/public/browser/content_browser_client.h227
-rw-r--r--chromium/content/public/browser/context_factory.h22
-rw-r--r--chromium/content/public/browser/cookie_store_factory.h94
-rw-r--r--chromium/content/public/browser/desktop_notification_delegate.h31
-rw-r--r--chromium/content/public/browser/devtools_agent_host.h18
-rw-r--r--chromium/content/public/browser/devtools_external_agent_proxy.h9
-rw-r--r--chromium/content/public/browser/devtools_external_agent_proxy_delegate.h9
-rw-r--r--chromium/content/public/browser/devtools_http_handler.h8
-rw-r--r--chromium/content/public/browser/devtools_manager_delegate.h36
-rwxr-xr-xchromium/content/public/browser/devtools_protocol_constants_generator.py211
-rw-r--r--chromium/content/public/browser/devtools_target.h7
-rw-r--r--chromium/content/public/browser/download_interrupt_reason_values.h6
-rw-r--r--chromium/content/public/browser/download_interrupt_reasons.h2
-rw-r--r--chromium/content/public/browser/download_item.h16
-rw-r--r--chromium/content/public/browser/download_manager.h2
-rw-r--r--chromium/content/public/browser/download_save_info.h7
-rw-r--r--chromium/content/public/browser/download_url_parameters.h19
-rw-r--r--chromium/content/public/browser/geolocation_permission_context.h48
-rw-r--r--chromium/content/public/browser/geolocation_provider.h47
-rw-r--r--chromium/content/public/browser/host_zoom_map.h41
-rw-r--r--chromium/content/public/browser/location_provider.h58
-rw-r--r--chromium/content/public/browser/media_capture_devices.h32
-rw-r--r--chromium/content/public/browser/media_device_id.cc18
-rw-r--r--chromium/content/public/browser/media_device_id.h8
-rw-r--r--chromium/content/public/browser/media_devices_monitor.h19
-rw-r--r--chromium/content/public/browser/media_observer.h42
-rw-r--r--chromium/content/public/browser/native_web_keyboard_event.h4
-rw-r--r--chromium/content/public/browser/navigation_controller.h29
-rw-r--r--chromium/content/public/browser/navigation_details.h4
-rw-r--r--chromium/content/public/browser/navigation_entry.h8
-rw-r--r--chromium/content/public/browser/notification_types.h7
-rw-r--r--chromium/content/public/browser/page_navigator.cc4
-rw-r--r--chromium/content/public/browser/page_navigator.h5
-rw-r--r--chromium/content/public/browser/plugin_service.h3
-rw-r--r--chromium/content/public/browser/push_messaging_service.h33
-rw-r--r--chromium/content/public/browser/quota_permission_context.h6
-rw-r--r--chromium/content/public/browser/render_frame_host.h54
-rw-r--r--chromium/content/public/browser/render_process_host.h83
-rw-r--r--chromium/content/public/browser/render_process_host_observer.h15
-rw-r--r--chromium/content/public/browser/render_view_host.h106
-rw-r--r--chromium/content/public/browser/render_widget_host.h104
-rw-r--r--chromium/content/public/browser/render_widget_host_view.h71
-rw-r--r--chromium/content/public/browser/render_widget_host_view_frame_subscriber.h70
-rw-r--r--chromium/content/public/browser/render_widget_host_view_mac_delegate.h23
-rw-r--r--chromium/content/public/browser/resource_dispatcher_host.h11
-rw-r--r--chromium/content/public/browser/resource_dispatcher_host_delegate.cc38
-rw-r--r--chromium/content/public/browser/resource_dispatcher_host_delegate.h54
-rw-r--r--chromium/content/public/browser/resource_request_details.cc10
-rw-r--r--chromium/content/public/browser/resource_request_details.h6
-rw-r--r--chromium/content/public/browser/resource_request_info.h36
-rw-r--r--chromium/content/public/browser/resource_throttle.h1
-rw-r--r--chromium/content/public/browser/service_worker_context.h64
-rw-r--r--chromium/content/public/browser/session_storage_namespace.h5
-rw-r--r--chromium/content/public/browser/site_instance.h5
-rw-r--r--chromium/content/public/browser/speech_recognition_session_config.h2
-rw-r--r--chromium/content/public/browser/speech_recognition_session_context.cc3
-rw-r--r--chromium/content/public/browser/speech_recognition_session_context.h8
-rw-r--r--chromium/content/public/browser/storage_partition.h4
-rw-r--r--chromium/content/public/browser/stream_handle.h11
-rw-r--r--chromium/content/public/browser/url_data_source.cc4
-rw-r--r--chromium/content/public/browser/url_data_source.h8
-rw-r--r--chromium/content/public/browser/user_metrics.h45
-rw-r--r--chromium/content/public/browser/utility_process_host.h11
-rw-r--r--chromium/content/public/browser/utility_process_host_client.h3
-rw-r--r--chromium/content/public/browser/vibration_provider.h23
-rw-r--r--chromium/content/public/browser/web_contents.cc7
-rw-r--r--chromium/content/public/browser/web_contents.h217
-rw-r--r--chromium/content/public/browser/web_contents_delegate.cc24
-rw-r--r--chromium/content/public/browser/web_contents_delegate.h62
-rw-r--r--chromium/content/public/browser/web_contents_observer.cc11
-rw-r--r--chromium/content/public/browser/web_contents_observer.h56
-rw-r--r--chromium/content/public/browser/web_contents_view.h107
-rw-r--r--chromium/content/public/browser/web_contents_view_delegate.h30
-rw-r--r--chromium/content/public/browser/web_drag_dest_delegate.h33
-rw-r--r--chromium/content/public/browser/web_ui.h9
-rw-r--r--chromium/content/public/browser/web_ui_data_source.h8
-rw-r--r--chromium/content/public/browser/worker_service.h3
-rw-r--r--chromium/content/public/browser/zygote_host_linux.h3
-rw-r--r--chromium/content/public/child/BUILD.gn18
-rw-r--r--chromium/content/public/child/request_peer.h86
-rw-r--r--chromium/content/public/child/resource_dispatcher_delegate.h70
-rw-r--r--chromium/content/public/common/BUILD.gn20
-rw-r--r--chromium/content/public/common/OWNERS12
-rw-r--r--chromium/content/public/common/bindings_policy.h4
-rw-r--r--chromium/content/public/common/browser_plugin_permission_type.h36
-rw-r--r--chromium/content/public/common/child_process_host.h13
-rw-r--r--chromium/content/public/common/child_process_host_delegate.h5
-rw-r--r--chromium/content/public/common/child_process_sandbox_support_linux.h22
-rw-r--r--chromium/content/public/common/common_param_traits.cc68
-rw-r--r--chromium/content/public/common/common_param_traits.h39
-rw-r--r--chromium/content/public/common/common_param_traits_macros.h51
-rw-r--r--chromium/content/public/common/console_message_level.h3
-rw-r--r--chromium/content/public/common/content_client.cc21
-rw-r--r--chromium/content/public/common/content_client.h15
-rw-r--r--chromium/content/public/common/content_descriptors.h1
-rw-r--r--chromium/content/public/common/content_switches.cc428
-rw-r--r--chromium/content/public/common/content_switches.h146
-rw-r--r--chromium/content/public/common/context_menu_params.cc5
-rw-r--r--chromium/content/public/common/context_menu_params.h6
-rw-r--r--chromium/content/public/common/drop_data.cc13
-rw-r--r--chromium/content/public/common/drop_data.h28
-rw-r--r--chromium/content/public/common/eme_codec.h37
-rw-r--r--chromium/content/public/common/favicon_url.cc8
-rw-r--r--chromium/content/public/common/favicon_url.h13
-rw-r--r--chromium/content/public/common/geoposition.h1
-rw-r--r--chromium/content/public/common/main_function_params.h12
-rw-r--r--chromium/content/public/common/media_stream_request.cc24
-rw-r--r--chromium/content/public/common/media_stream_request.h48
-rw-r--r--chromium/content/public/common/p2p_socket_type.h28
-rw-r--r--chromium/content/public/common/page_state.cc32
-rw-r--r--chromium/content/public/common/page_state.h5
-rw-r--r--chromium/content/public/common/page_transition_types.cc5
-rw-r--r--chromium/content/public/common/page_transition_types.h4
-rw-r--r--chromium/content/public/common/pepper_plugin_info.cc6
-rw-r--r--chromium/content/public/common/renderer_preferences.cc4
-rw-r--r--chromium/content/public/common/renderer_preferences.h7
-rw-r--r--chromium/content/public/common/resource_devtools_info.cc16
-rw-r--r--chromium/content/public/common/resource_devtools_info.h37
-rw-r--r--chromium/content/public/common/resource_response.h4
-rw-r--r--chromium/content/public/common/resource_response_info.cc26
-rw-r--r--chromium/content/public/common/resource_response_info.h104
-rw-r--r--chromium/content/public/common/result_codes_list.h14
-rw-r--r--chromium/content/public/common/sandbox_init.h5
-rw-r--r--chromium/content/public/common/sandbox_linux.h3
-rw-r--r--chromium/content/public/common/sandbox_type_mac.h3
-rw-r--r--chromium/content/public/common/sandboxed_process_launcher_delegate.cc34
-rw-r--r--chromium/content/public/common/sandboxed_process_launcher_delegate.h38
-rw-r--r--chromium/content/public/common/screen_orientation_values.h18
-rw-r--r--chromium/content/public/common/screen_orientation_values_list.h23
-rw-r--r--chromium/content/public/common/security_style.h1
-rw-r--r--chromium/content/public/common/show_desktop_notification_params.cc3
-rw-r--r--chromium/content/public/common/show_desktop_notification_params.h3
-rw-r--r--chromium/content/public/common/socket_permission_request.h3
-rw-r--r--chromium/content/public/common/speech_recognition_error.h3
-rw-r--r--chromium/content/public/common/speech_recognition_error_list.h4
-rw-r--r--chromium/content/public/common/storage_quota_params.h37
-rw-r--r--chromium/content/public/common/url_constants.cc24
-rw-r--r--chromium/content/public/common/url_constants.h25
-rw-r--r--chromium/content/public/common/url_fetcher.h6
-rw-r--r--chromium/content/public/common/url_utils.cc4
-rw-r--r--chromium/content/public/common/user_agent.h39
-rw-r--r--chromium/content/public/common/user_metrics_action.h29
-rw-r--r--chromium/content/public/common/webplugininfo.cc4
-rw-r--r--chromium/content/public/common/webplugininfo.h3
-rw-r--r--chromium/content/public/common/zygote_fork_delegate_linux.h31
-rw-r--r--chromium/content/public/plugin/BUILD.gn9
-rw-r--r--chromium/content/public/renderer/BUILD.gn30
-rw-r--r--chromium/content/public/renderer/DEPS2
-rw-r--r--chromium/content/public/renderer/android/OWNERS3
-rw-r--r--chromium/content/public/renderer/content_renderer_client.cc14
-rw-r--r--chromium/content/public/renderer/content_renderer_client.h24
-rw-r--r--chromium/content/public/renderer/history_item_serialization.cc196
-rw-r--r--chromium/content/public/renderer/history_item_serialization.h26
-rw-r--r--chromium/content/public/renderer/key_system_info.h17
-rw-r--r--chromium/content/public/renderer/media_stream_audio_sink.cc16
-rw-r--r--chromium/content/public/renderer/media_stream_video_sink.cc3
-rw-r--r--chromium/content/public/renderer/media_stream_video_sink.h29
-rw-r--r--chromium/content/public/renderer/p2p_socket_client.h62
-rw-r--r--chromium/content/public/renderer/p2p_socket_client_delegate.h46
-rw-r--r--chromium/content/public/renderer/pepper_plugin_instance.h14
-rw-r--r--chromium/content/public/renderer/render_font_warmup_win.cc164
-rw-r--r--chromium/content/public/renderer/render_font_warmup_win.h25
-rw-r--r--chromium/content/public/renderer/render_frame.h25
-rw-r--r--chromium/content/public/renderer/render_frame_observer.cc1
-rw-r--r--chromium/content/public/renderer/render_frame_observer.h40
-rw-r--r--chromium/content/public/renderer/render_process_observer.h3
-rw-r--r--chromium/content/public/renderer/render_thread.h38
-rw-r--r--chromium/content/public/renderer/render_view.h24
-rw-r--r--chromium/content/public/renderer/render_view_observer.cc18
-rw-r--r--chromium/content/public/renderer/render_view_observer.h62
-rw-r--r--chromium/content/public/renderer/renderer_gamepad_provider.h30
-rw-r--r--chromium/content/public/renderer/renderer_ppapi_host.h17
-rw-r--r--chromium/content/public/renderer/resource_fetcher.h27
-rw-r--r--chromium/content/public/renderer/v8_value_converter.h33
-rw-r--r--chromium/content/public/renderer/video_encode_accelerator.cc41
-rw-r--r--chromium/content/public/renderer/video_encode_accelerator.h35
-rw-r--r--chromium/content/public/utility/BUILD.gn21
-rw-r--r--chromium/content/renderer/BUILD.gn178
-rw-r--r--chromium/content/renderer/DEPS1
-rw-r--r--chromium/content/renderer/accessibility/accessibility_node_serializer.cc497
-rw-r--r--chromium/content/renderer/accessibility/accessibility_node_serializer.h23
-rw-r--r--chromium/content/renderer/accessibility/blink_ax_enum_conversion.cc401
-rw-r--r--chromium/content/renderer/accessibility/blink_ax_enum_conversion.h32
-rw-r--r--chromium/content/renderer/accessibility/blink_ax_tree_source.cc563
-rw-r--r--chromium/content/renderer/accessibility/blink_ax_tree_source.h49
-rw-r--r--chromium/content/renderer/accessibility/renderer_accessibility.cc73
-rw-r--r--chromium/content/renderer/accessibility/renderer_accessibility.h31
-rw-r--r--chromium/content/renderer/accessibility/renderer_accessibility_browsertest.cc233
-rw-r--r--chromium/content/renderer/accessibility/renderer_accessibility_complete.cc416
-rw-r--r--chromium/content/renderer/accessibility/renderer_accessibility_complete.h79
-rw-r--r--chromium/content/renderer/accessibility/renderer_accessibility_focus_only.cc44
-rw-r--r--chromium/content/renderer/accessibility/renderer_accessibility_focus_only.h3
-rw-r--r--chromium/content/renderer/android/address_detector.cc6
-rw-r--r--chromium/content/renderer/android/email_detector.cc3
-rw-r--r--chromium/content/renderer/android/email_detector_unittest.cc4
-rw-r--r--chromium/content/renderer/android/phone_number_detector.cc7
-rw-r--r--chromium/content/renderer/android/phone_number_detector_unittest.cc6
-rw-r--r--chromium/content/renderer/android/synchronous_compositor_factory.h22
-rw-r--r--chromium/content/renderer/battery_status/OWNERS1
-rw-r--r--chromium/content/renderer/battery_status/battery_status_dispatcher.cc55
-rw-r--r--chromium/content/renderer/battery_status/battery_status_dispatcher.h44
-rw-r--r--chromium/content/renderer/battery_status/battery_status_dispatcher_unittest.cc123
-rw-r--r--chromium/content/renderer/battery_status/fake_battery_status_dispatcher.cc34
-rw-r--r--chromium/content/renderer/battery_status/fake_battery_status_dispatcher.h32
-rw-r--r--chromium/content/renderer/bmp_image_decoder_unittest.cc2
-rw-r--r--chromium/content/renderer/browser_plugin/browser_plugin.cc681
-rw-r--r--chromium/content/renderer/browser_plugin/browser_plugin.h121
-rw-r--r--chromium/content/renderer/browser_plugin/browser_plugin_backing_store.cc99
-rw-r--r--chromium/content/renderer/browser_plugin/browser_plugin_backing_store.h66
-rw-r--r--chromium/content/renderer/browser_plugin/browser_plugin_bindings.cc182
-rw-r--r--chromium/content/renderer/browser_plugin/browser_plugin_browsertest.cc353
-rw-r--r--chromium/content/renderer/browser_plugin/browser_plugin_browsertest.h5
-rw-r--r--chromium/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc493
-rw-r--r--chromium/content/renderer/browser_plugin/browser_plugin_compositing_helper.h140
-rw-r--r--chromium/content/renderer/browser_plugin/browser_plugin_manager.h10
-rw-r--r--chromium/content/renderer/browser_plugin/browser_plugin_manager_impl.cc69
-rw-r--r--chromium/content/renderer/browser_plugin/browser_plugin_manager_impl.h16
-rw-r--r--chromium/content/renderer/browser_plugin/mock_browser_plugin.cc5
-rw-r--r--chromium/content/renderer/browser_plugin/mock_browser_plugin.h5
-rw-r--r--chromium/content/renderer/browser_plugin/mock_browser_plugin_manager.cc23
-rw-r--r--chromium/content/renderer/browser_plugin/mock_browser_plugin_manager.h16
-rw-r--r--chromium/content/renderer/browser_render_view_browsertest.cc245
-rw-r--r--chromium/content/renderer/child_frame_compositing_helper.cc568
-rw-r--r--chromium/content/renderer/child_frame_compositing_helper.h176
-rw-r--r--chromium/content/renderer/clipboard_client.h14
-rw-r--r--chromium/content/renderer/clipboard_utils.cc4
-rw-r--r--chromium/content/renderer/compositor_bindings/OWNERS (renamed from chromium/webkit/renderer/compositor_bindings/OWNERS)0
-rw-r--r--chromium/content/renderer/compositor_bindings/PRESUBMIT.py33
-rw-r--r--chromium/content/renderer/compositor_bindings/scrollbar_impl.cc109
-rw-r--r--chromium/content/renderer/compositor_bindings/scrollbar_impl.h51
-rw-r--r--chromium/content/renderer/compositor_bindings/web_animation_curve_common.cc29
-rw-r--r--chromium/content/renderer/compositor_bindings/web_animation_curve_common.h21
-rw-r--r--chromium/content/renderer/compositor_bindings/web_animation_impl.cc160
-rw-r--r--chromium/content/renderer/compositor_bindings/web_animation_impl.h59
-rw-r--r--chromium/content/renderer/compositor_bindings/web_animation_unittest.cc60
-rw-r--r--chromium/content/renderer/compositor_bindings/web_blend_mode.h107
-rw-r--r--chromium/content/renderer/compositor_bindings/web_compositor_support_impl.cc141
-rw-r--r--chromium/content/renderer/compositor_bindings/web_compositor_support_impl.h68
-rw-r--r--chromium/content/renderer/compositor_bindings/web_content_layer_impl.cc90
-rw-r--r--chromium/content/renderer/compositor_bindings/web_content_layer_impl.h62
-rw-r--r--chromium/content/renderer/compositor_bindings/web_external_bitmap_impl.cc47
-rw-r--r--chromium/content/renderer/compositor_bindings/web_external_bitmap_impl.h47
-rw-r--r--chromium/content/renderer/compositor_bindings/web_external_texture_layer_impl.cc130
-rw-r--r--chromium/content/renderer/compositor_bindings/web_external_texture_layer_impl.h73
-rw-r--r--chromium/content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc59
-rw-r--r--chromium/content/renderer/compositor_bindings/web_filter_animation_curve_impl.h51
-rw-r--r--chromium/content/renderer/compositor_bindings/web_filter_operations_impl.cc96
-rw-r--r--chromium/content/renderer/compositor_bindings/web_filter_operations_impl.h50
-rw-r--r--chromium/content/renderer/compositor_bindings/web_float_animation_curve_impl.cc60
-rw-r--r--chromium/content/renderer/compositor_bindings/web_float_animation_curve_impl.h54
-rw-r--r--chromium/content/renderer/compositor_bindings/web_float_animation_curve_unittest.cc234
-rw-r--r--chromium/content/renderer/compositor_bindings/web_image_layer_impl.cc39
-rw-r--r--chromium/content/renderer/compositor_bindings/web_image_layer_impl.h35
-rw-r--r--chromium/content/renderer/compositor_bindings/web_layer_impl.cc489
-rw-r--r--chromium/content/renderer/compositor_bindings/web_layer_impl.h161
-rw-r--r--chromium/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc101
-rw-r--r--chromium/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h52
-rw-r--r--chromium/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc181
-rw-r--r--chromium/content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc62
-rw-r--r--chromium/content/renderer/compositor_bindings/web_nine_patch_layer_impl.h42
-rw-r--r--chromium/content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc55
-rw-r--r--chromium/content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h52
-rw-r--r--chromium/content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc74
-rw-r--r--chromium/content/renderer/compositor_bindings/web_scrollbar_layer_impl.h48
-rw-r--r--chromium/content/renderer/compositor_bindings/web_solid_color_layer_impl.cc31
-rw-r--r--chromium/content/renderer/compositor_bindings/web_solid_color_layer_impl.h34
-rw-r--r--chromium/content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc33
-rw-r--r--chromium/content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h39
-rw-r--r--chromium/content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc63
-rw-r--r--chromium/content/renderer/compositor_bindings/web_transform_animation_curve_impl.h53
-rw-r--r--chromium/content/renderer/compositor_bindings/web_transform_operations_impl.cc69
-rw-r--r--chromium/content/renderer/compositor_bindings/web_transform_operations_impl.h42
-rw-r--r--chromium/content/renderer/context_menu_params_builder.cc9
-rw-r--r--chromium/content/renderer/cpp_bound_class_unittest.cc241
-rw-r--r--chromium/content/renderer/cursor_utils.cc2
-rw-r--r--chromium/content/renderer/device_orientation/device_motion_event_pump.cc62
-rw-r--r--chromium/content/renderer/device_orientation/device_motion_event_pump.h47
-rw-r--r--chromium/content/renderer/device_orientation/device_motion_event_pump_unittest.cc162
-rw-r--r--chromium/content/renderer/device_orientation/device_orientation_event_pump.cc88
-rw-r--r--chromium/content/renderer/device_orientation/device_orientation_event_pump.h54
-rw-r--r--chromium/content/renderer/device_orientation/device_orientation_event_pump_unittest.cc181
-rw-r--r--chromium/content/renderer/device_orientation/device_sensor_event_pump.cc87
-rw-r--r--chromium/content/renderer/device_orientation/device_sensor_event_pump.h60
-rw-r--r--chromium/content/renderer/device_sensors/OWNERS (renamed from chromium/content/renderer/device_orientation/OWNERS)0
-rw-r--r--chromium/content/renderer/device_sensors/device_motion_event_pump.cc62
-rw-r--r--chromium/content/renderer/device_sensors/device_motion_event_pump.h47
-rw-r--r--chromium/content/renderer/device_sensors/device_motion_event_pump_unittest.cc160
-rw-r--r--chromium/content/renderer/device_sensors/device_orientation_event_pump.cc95
-rw-r--r--chromium/content/renderer/device_sensors/device_orientation_event_pump.h54
-rw-r--r--chromium/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc226
-rw-r--r--chromium/content/renderer/device_sensors/device_sensor_event_pump.cc87
-rw-r--r--chromium/content/renderer/device_sensors/device_sensor_event_pump.h60
-rw-r--r--chromium/content/renderer/devtools/devtools_agent.cc97
-rw-r--r--chromium/content/renderer/devtools/devtools_agent.h40
-rw-r--r--chromium/content/renderer/devtools/devtools_agent_filter.cc44
-rw-r--r--chromium/content/renderer/devtools/devtools_agent_filter.h20
-rw-r--r--chromium/content/renderer/devtools/devtools_client.cc3
-rw-r--r--chromium/content/renderer/dom_automation_controller.cc207
-rw-r--r--chromium/content/renderer/dom_automation_controller.h80
-rw-r--r--chromium/content/renderer/dom_serializer_browsertest.cc66
-rw-r--r--chromium/content/renderer/dom_storage/dom_storage_cached_area_unittest.cc4
-rw-r--r--chromium/content/renderer/dom_storage/dom_storage_dispatcher.cc3
-rw-r--r--chromium/content/renderer/drop_data_builder.cc12
-rw-r--r--chromium/content/renderer/external_popup_menu.cc5
-rw-r--r--chromium/content/renderer/external_popup_menu_browsertest.cc4
-rw-r--r--chromium/content/renderer/fetchers/alt_error_page_resource_fetcher.cc55
-rw-r--r--chromium/content/renderer/fetchers/alt_error_page_resource_fetcher.h65
-rw-r--r--chromium/content/renderer/fetchers/image_resource_fetcher.cc8
-rw-r--r--chromium/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc7
-rw-r--r--chromium/content/renderer/fetchers/resource_fetcher_impl.cc94
-rw-r--r--chromium/content/renderer/fetchers/resource_fetcher_impl.h22
-rw-r--r--chromium/content/renderer/gamepad_shared_memory_reader.cc93
-rw-r--r--chromium/content/renderer/gamepad_shared_memory_reader.h29
-rw-r--r--chromium/content/renderer/geolocation_dispatcher.cc8
-rw-r--r--chromium/content/renderer/geolocation_dispatcher.h13
-rw-r--r--chromium/content/renderer/gin_browsertest.cc10
-rw-r--r--chromium/content/renderer/gpu/compositor_output_surface.cc95
-rw-r--r--chromium/content/renderer/gpu/compositor_output_surface.h19
-rw-r--r--chromium/content/renderer/gpu/compositor_software_output_device.cc66
-rw-r--r--chromium/content/renderer/gpu/compositor_software_output_device.h21
-rw-r--r--chromium/content/renderer/gpu/delegated_compositor_output_surface.cc5
-rw-r--r--chromium/content/renderer/gpu/delegated_compositor_output_surface.h3
-rw-r--r--chromium/content/renderer/gpu/gpu_benchmarking_extension.cc558
-rw-r--r--chromium/content/renderer/gpu/mailbox_output_surface.cc89
-rw-r--r--chromium/content/renderer/gpu/mailbox_output_surface.h2
-rw-r--r--chromium/content/renderer/gpu/render_widget_compositor.cc258
-rw-r--r--chromium/content/renderer/gpu/render_widget_compositor.h28
-rw-r--r--chromium/content/renderer/gpu/stream_texture_host_android.cc27
-rw-r--r--chromium/content/renderer/gpu/stream_texture_host_android.h9
-rw-r--r--chromium/content/renderer/history_controller.cc195
-rw-r--r--chromium/content/renderer/history_controller.h147
-rw-r--r--chromium/content/renderer/history_entry.cc188
-rw-r--r--chromium/content/renderer/history_entry.h109
-rw-r--r--chromium/content/renderer/history_serialization.cc203
-rw-r--r--chromium/content/renderer/history_serialization.h29
-rw-r--r--chromium/content/renderer/ico_image_decoder_unittest.cc4
-rw-r--r--chromium/content/renderer/image_loading_helper.cc15
-rw-r--r--chromium/content/renderer/image_loading_helper.h10
-rw-r--r--chromium/content/renderer/input/input_event_filter.cc118
-rw-r--r--chromium/content/renderer/input/input_event_filter.h39
-rw-r--r--chromium/content/renderer/input/input_event_filter_unittest.cc66
-rw-r--r--chromium/content/renderer/input/input_handler_manager.cc6
-rw-r--r--chromium/content/renderer/input/input_handler_manager.h9
-rw-r--r--chromium/content/renderer/input/input_handler_manager_client.h5
-rw-r--r--chromium/content/renderer/input/input_handler_proxy.cc501
-rw-r--r--chromium/content/renderer/input/input_handler_proxy.h51
-rw-r--r--chromium/content/renderer/input/input_handler_proxy_client.h8
-rw-r--r--chromium/content/renderer/input/input_handler_proxy_unittest.cc1015
-rw-r--r--chromium/content/renderer/input/input_handler_wrapper.cc12
-rw-r--r--chromium/content/renderer/input/input_handler_wrapper.h5
-rw-r--r--chromium/content/renderer/input_tag_speech_dispatcher.cc148
-rw-r--r--chromium/content/renderer/input_tag_speech_dispatcher.h56
-rw-r--r--chromium/content/renderer/internal_document_state_data.cc10
-rw-r--r--chromium/content/renderer/internal_document_state_data.h26
-rw-r--r--chromium/content/renderer/java/OWNERS2
-rw-r--r--chromium/content/renderer/java/gin_java_bridge_dispatcher.cc151
-rw-r--r--chromium/content/renderer/java/gin_java_bridge_dispatcher.h73
-rw-r--r--chromium/content/renderer/java/gin_java_bridge_object.cc165
-rw-r--r--chromium/content/renderer/java/gin_java_bridge_object.h70
-rw-r--r--chromium/content/renderer/java/gin_java_bridge_value_converter.cc163
-rw-r--r--chromium/content/renderer/java/gin_java_bridge_value_converter.h46
-rw-r--r--chromium/content/renderer/java/gin_java_bridge_value_converter_unittest.cc138
-rw-r--r--chromium/content/renderer/java/java_bridge_dispatcher.cc19
-rw-r--r--chromium/content/renderer/java/java_bridge_dispatcher.h9
-rw-r--r--chromium/content/renderer/load_progress_tracker.cc92
-rw-r--r--chromium/content/renderer/load_progress_tracker.h48
-rw-r--r--chromium/content/renderer/media/OWNERS7
-rw-r--r--chromium/content/renderer/media/aec_dump_message_filter.cc191
-rw-r--r--chromium/content/renderer/media/aec_dump_message_filter.h108
-rw-r--r--chromium/content/renderer/media/android/audio_decoder_android.cc37
-rw-r--r--chromium/content/renderer/media/android/audio_decoder_android.h1
-rw-r--r--chromium/content/renderer/media/android/media_info_loader.cc3
-rw-r--r--chromium/content/renderer/media/android/media_info_loader.h7
-rw-r--r--chromium/content/renderer/media/android/media_info_loader_unittest.cc15
-rw-r--r--chromium/content/renderer/media/android/media_source_delegate.cc288
-rw-r--r--chromium/content/renderer/media/android/media_source_delegate.h72
-rw-r--r--chromium/content/renderer/media/android/proxy_media_keys.cc98
-rw-r--r--chromium/content/renderer/media/android/proxy_media_keys.h69
-rw-r--r--chromium/content/renderer/media/android/renderer_demuxer_android.cc9
-rw-r--r--chromium/content/renderer/media/android/renderer_demuxer_android.h11
-rw-r--r--chromium/content/renderer/media/android/renderer_media_player_manager.cc197
-rw-r--r--chromium/content/renderer/media/android/renderer_media_player_manager.h93
-rw-r--r--chromium/content/renderer/media/android/stream_texture_factory.h79
-rw-r--r--chromium/content/renderer/media/android/stream_texture_factory_android.h83
-rw-r--r--chromium/content/renderer/media/android/stream_texture_factory_android_impl.cc144
-rw-r--r--chromium/content/renderer/media/android/stream_texture_factory_android_impl.h48
-rw-r--r--chromium/content/renderer/media/android/stream_texture_factory_android_synchronous_impl.cc194
-rw-r--r--chromium/content/renderer/media/android/stream_texture_factory_android_synchronous_impl.h67
-rw-r--r--chromium/content/renderer/media/android/stream_texture_factory_impl.cc137
-rw-r--r--chromium/content/renderer/media/android/stream_texture_factory_impl.h58
-rw-r--r--chromium/content/renderer/media/android/stream_texture_factory_synchronous_impl.cc200
-rw-r--r--chromium/content/renderer/media/android/stream_texture_factory_synchronous_impl.h71
-rw-r--r--chromium/content/renderer/media/android/webmediaplayer_android.cc921
-rw-r--r--chromium/content/renderer/media/android/webmediaplayer_android.h204
-rw-r--r--chromium/content/renderer/media/audio_decoder.cc4
-rw-r--r--chromium/content/renderer/media/audio_decoder.h2
-rw-r--r--chromium/content/renderer/media/audio_device_factory.cc5
-rw-r--r--chromium/content/renderer/media/audio_device_factory.h9
-rw-r--r--chromium/content/renderer/media/audio_input_message_filter.cc15
-rw-r--r--chromium/content/renderer/media/audio_input_message_filter.h13
-rw-r--r--chromium/content/renderer/media/audio_message_filter.cc31
-rw-r--r--chromium/content/renderer/media/audio_message_filter.h26
-rw-r--r--chromium/content/renderer/media/audio_message_filter_unittest.cc11
-rw-r--r--chromium/content/renderer/media/audio_renderer_mixer_manager.cc10
-rw-r--r--chromium/content/renderer/media/audio_renderer_mixer_manager.h9
-rw-r--r--chromium/content/renderer/media/audio_renderer_mixer_manager_unittest.cc21
-rw-r--r--chromium/content/renderer/media/buffered_data_source.cc141
-rw-r--r--chromium/content/renderer/media/buffered_data_source.h55
-rw-r--r--chromium/content/renderer/media/buffered_data_source_host_impl.cc56
-rw-r--r--chromium/content/renderer/media/buffered_data_source_host_impl.h51
-rw-r--r--chromium/content/renderer/media/buffered_data_source_host_impl_unittest.cc75
-rw-r--r--chromium/content/renderer/media/buffered_data_source_unittest.cc203
-rw-r--r--chromium/content/renderer/media/buffered_resource_loader.cc6
-rw-r--r--chromium/content/renderer/media/buffered_resource_loader.h6
-rw-r--r--chromium/content/renderer/media/buffered_resource_loader_unittest.cc13
-rw-r--r--chromium/content/renderer/media/cdm_session_adapter.cc156
-rw-r--r--chromium/content/renderer/media/cdm_session_adapter.h136
-rw-r--r--chromium/content/renderer/media/crypto/content_decryption_module_factory.cc153
-rw-r--r--chromium/content/renderer/media/crypto/content_decryption_module_factory.h37
-rw-r--r--chromium/content/renderer/media/crypto/key_systems.cc438
-rw-r--r--chromium/content/renderer/media/crypto/key_systems.h30
-rw-r--r--chromium/content/renderer/media/crypto/key_systems_unittest.cc230
-rw-r--r--chromium/content/renderer/media/crypto/pepper_cdm_wrapper.h44
-rw-r--r--chromium/content/renderer/media/crypto/pepper_cdm_wrapper_impl.cc79
-rw-r--r--chromium/content/renderer/media/crypto/pepper_cdm_wrapper_impl.h69
-rw-r--r--chromium/content/renderer/media/crypto/ppapi_decryptor.cc352
-rw-r--r--chromium/content/renderer/media/crypto/ppapi_decryptor.h84
-rw-r--r--chromium/content/renderer/media/crypto/proxy_decryptor.cc310
-rw-r--r--chromium/content/renderer/media/crypto/proxy_decryptor.h121
-rw-r--r--chromium/content/renderer/media/crypto/proxy_media_keys.cc273
-rw-r--r--chromium/content/renderer/media/crypto/proxy_media_keys.h127
-rw-r--r--chromium/content/renderer/media/crypto/renderer_cdm_manager.cc147
-rw-r--r--chromium/content/renderer/media/crypto/renderer_cdm_manager.h90
-rw-r--r--chromium/content/renderer/media/media_stream.cc81
-rw-r--r--chromium/content/renderer/media/media_stream.h96
-rw-r--r--chromium/content/renderer/media/media_stream_audio_level_calculator.cc65
-rw-r--r--chromium/content/renderer/media/media_stream_audio_level_calculator.h41
-rw-r--r--chromium/content/renderer/media/media_stream_audio_processor.cc427
-rw-r--r--chromium/content/renderer/media/media_stream_audio_processor.h132
-rw-r--r--chromium/content/renderer/media/media_stream_audio_processor_options.cc310
-rw-r--r--chromium/content/renderer/media/media_stream_audio_processor_options.h91
-rw-r--r--chromium/content/renderer/media/media_stream_audio_processor_unittest.cc394
-rw-r--r--chromium/content/renderer/media/media_stream_audio_source.cc56
-rw-r--r--chromium/content/renderer/media/media_stream_audio_source.h66
-rw-r--r--chromium/content/renderer/media/media_stream_center.cc165
-rw-r--r--chromium/content/renderer/media/media_stream_center.h12
-rw-r--r--chromium/content/renderer/media/media_stream_client.h39
-rw-r--r--chromium/content/renderer/media/media_stream_constraints_util.cc132
-rw-r--r--chromium/content/renderer/media/media_stream_constraints_util.h87
-rw-r--r--chromium/content/renderer/media/media_stream_constraints_util_unittest.cc103
-rw-r--r--chromium/content/renderer/media/media_stream_dependency_factory.cc1000
-rw-r--r--chromium/content/renderer/media/media_stream_dependency_factory.h261
-rw-r--r--chromium/content/renderer/media/media_stream_dependency_factory_unittest.cc217
-rw-r--r--chromium/content/renderer/media/media_stream_dispatcher.cc27
-rw-r--r--chromium/content/renderer/media/media_stream_dispatcher.h13
-rw-r--r--chromium/content/renderer/media/media_stream_dispatcher_eventhandler.h4
-rw-r--r--chromium/content/renderer/media/media_stream_dispatcher_unittest.cc14
-rw-r--r--chromium/content/renderer/media/media_stream_extra_data.h47
-rw-r--r--chromium/content/renderer/media/media_stream_impl.cc946
-rw-r--r--chromium/content/renderer/media/media_stream_impl.h185
-rw-r--r--chromium/content/renderer/media/media_stream_impl_unittest.cc323
-rw-r--r--chromium/content/renderer/media/media_stream_renderer_factory.cc197
-rw-r--r--chromium/content/renderer/media/media_stream_renderer_factory.h42
-rw-r--r--chromium/content/renderer/media/media_stream_source.cc26
-rw-r--r--chromium/content/renderer/media/media_stream_source.h79
-rw-r--r--chromium/content/renderer/media/media_stream_source_extra_data.h92
-rw-r--r--chromium/content/renderer/media/media_stream_source_observer.cc63
-rw-r--r--chromium/content/renderer/media/media_stream_source_observer.h42
-rw-r--r--chromium/content/renderer/media/media_stream_track.cc47
-rw-r--r--chromium/content/renderer/media/media_stream_track.h56
-rw-r--r--chromium/content/renderer/media/media_stream_track_extra_data.cc20
-rw-r--r--chromium/content/renderer/media/media_stream_track_extra_data.h41
-rw-r--r--chromium/content/renderer/media/media_stream_video_capture_source_unittest.cc200
-rw-r--r--chromium/content/renderer/media/media_stream_video_capturer_source.cc247
-rw-r--r--chromium/content/renderer/media/media_stream_video_capturer_source.h123
-rw-r--r--chromium/content/renderer/media/media_stream_video_source.cc578
-rw-r--r--chromium/content/renderer/media/media_stream_video_source.h180
-rw-r--r--chromium/content/renderer/media/media_stream_video_source_unittest.cc694
-rw-r--r--chromium/content/renderer/media/media_stream_video_track.cc172
-rw-r--r--chromium/content/renderer/media/media_stream_video_track.h89
-rw-r--r--chromium/content/renderer/media/media_stream_video_track_unittest.cc232
-rw-r--r--chromium/content/renderer/media/midi_dispatcher.cc34
-rw-r--r--chromium/content/renderer/media/midi_dispatcher.h33
-rw-r--r--chromium/content/renderer/media/midi_message_filter.cc129
-rw-r--r--chromium/content/renderer/media/midi_message_filter.h38
-rw-r--r--chromium/content/renderer/media/mock_media_constraint_factory.cc101
-rw-r--r--chromium/content/renderer/media/mock_media_constraint_factory.h38
-rw-r--r--chromium/content/renderer/media/mock_media_stream_dependency_factory.cc486
-rw-r--r--chromium/content/renderer/media/mock_media_stream_dependency_factory.h176
-rw-r--r--chromium/content/renderer/media/mock_media_stream_dispatcher.cc90
-rw-r--r--chromium/content/renderer/media/mock_media_stream_dispatcher.h30
-rw-r--r--chromium/content/renderer/media/mock_media_stream_registry.cc42
-rw-r--r--chromium/content/renderer/media/mock_media_stream_registry.h12
-rw-r--r--chromium/content/renderer/media/mock_media_stream_video_sink.cc49
-rw-r--r--chromium/content/renderer/media/mock_media_stream_video_sink.h55
-rw-r--r--chromium/content/renderer/media/mock_media_stream_video_source.cc91
-rw-r--r--chromium/content/renderer/media/mock_media_stream_video_source.h73
-rw-r--r--chromium/content/renderer/media/mock_peer_connection_impl.cc29
-rw-r--r--chromium/content/renderer/media/mock_peer_connection_impl.h16
-rw-r--r--chromium/content/renderer/media/mock_web_rtc_peer_connection_handler_client.cc4
-rw-r--r--chromium/content/renderer/media/mock_web_rtc_peer_connection_handler_client.h1
-rw-r--r--chromium/content/renderer/media/peer_connection_handler_base.cc46
-rw-r--r--chromium/content/renderer/media/peer_connection_handler_base.h61
-rw-r--r--chromium/content/renderer/media/peer_connection_tracker.cc36
-rw-r--r--chromium/content/renderer/media/peer_connection_tracker.h5
-rw-r--r--chromium/content/renderer/media/pepper_platform_video_decoder.cc127
-rw-r--r--chromium/content/renderer/media/pepper_platform_video_decoder.h66
-rw-r--r--chromium/content/renderer/media/remote_media_stream_impl.cc163
-rw-r--r--chromium/content/renderer/media/remote_media_stream_impl.h6
-rw-r--r--chromium/content/renderer/media/render_media_log.cc43
-rw-r--r--chromium/content/renderer/media/render_media_log.h18
-rw-r--r--chromium/content/renderer/media/render_media_log_unittest.cc104
-rw-r--r--chromium/content/renderer/media/renderer_gpu_video_accelerator_factories.cc263
-rw-r--r--chromium/content/renderer/media/renderer_gpu_video_accelerator_factories.h86
-rw-r--r--chromium/content/renderer/media/renderer_webaudiodevice_impl.cc34
-rw-r--r--chromium/content/renderer/media/renderer_webaudiodevice_impl.h4
-rw-r--r--chromium/content/renderer/media/renderer_webmidiaccessor_impl.cc4
-rw-r--r--chromium/content/renderer/media/renderer_webmidiaccessor_impl.h4
-rw-r--r--chromium/content/renderer/media/rtc_data_channel_handler.cc71
-rw-r--r--chromium/content/renderer/media/rtc_data_channel_handler.h2
-rw-r--r--chromium/content/renderer/media/rtc_dtmf_sender_handler.cc6
-rw-r--r--chromium/content/renderer/media/rtc_media_constraints.cc29
-rw-r--r--chromium/content/renderer/media/rtc_media_constraints.h8
-rw-r--r--chromium/content/renderer/media/rtc_peer_connection_handler.cc229
-rw-r--r--chromium/content/renderer/media/rtc_peer_connection_handler.h45
-rw-r--r--chromium/content/renderer/media/rtc_peer_connection_handler_unittest.cc158
-rw-r--r--chromium/content/renderer/media/rtc_video_capture_delegate.cc124
-rw-r--r--chromium/content/renderer/media/rtc_video_capture_delegate.h89
-rw-r--r--chromium/content/renderer/media/rtc_video_capturer.cc159
-rw-r--r--chromium/content/renderer/media/rtc_video_capturer.h59
-rw-r--r--chromium/content/renderer/media/rtc_video_decoder.cc270
-rw-r--r--chromium/content/renderer/media/rtc_video_decoder.h47
-rw-r--r--chromium/content/renderer/media/rtc_video_decoder_bridge_tv.cc113
-rw-r--r--chromium/content/renderer/media/rtc_video_decoder_bridge_tv.h55
-rw-r--r--chromium/content/renderer/media/rtc_video_decoder_factory.cc12
-rw-r--r--chromium/content/renderer/media/rtc_video_decoder_factory.h11
-rw-r--r--chromium/content/renderer/media/rtc_video_decoder_factory_tv.cc246
-rw-r--r--chromium/content/renderer/media/rtc_video_decoder_factory_tv.h80
-rw-r--r--chromium/content/renderer/media/rtc_video_decoder_factory_tv_unittest.cc348
-rw-r--r--chromium/content/renderer/media/rtc_video_decoder_unittest.cc52
-rw-r--r--chromium/content/renderer/media/rtc_video_encoder.cc128
-rw-r--r--chromium/content/renderer/media/rtc_video_encoder.h18
-rw-r--r--chromium/content/renderer/media/rtc_video_encoder_factory.cc9
-rw-r--r--chromium/content/renderer/media/rtc_video_encoder_factory.h12
-rw-r--r--chromium/content/renderer/media/rtc_video_renderer.cc52
-rw-r--r--chromium/content/renderer/media/rtc_video_renderer.h13
-rw-r--r--chromium/content/renderer/media/texttrack_impl.cc2
-rw-r--r--chromium/content/renderer/media/video_capture_impl.cc423
-rw-r--r--chromium/content/renderer/media/video_capture_impl.h189
-rw-r--r--chromium/content/renderer/media/video_capture_impl_manager.cc210
-rw-r--r--chromium/content/renderer/media/video_capture_impl_manager.h125
-rw-r--r--chromium/content/renderer/media/video_capture_impl_manager_unittest.cc177
-rw-r--r--chromium/content/renderer/media/video_capture_impl_unittest.cc338
-rw-r--r--chromium/content/renderer/media/video_capture_message_filter.cc88
-rw-r--r--chromium/content/renderer/media/video_capture_message_filter.h57
-rw-r--r--chromium/content/renderer/media/video_capture_message_filter_unittest.cc93
-rw-r--r--chromium/content/renderer/media/video_destination_handler.cc210
-rw-r--r--chromium/content/renderer/media/video_destination_handler.h94
-rw-r--r--chromium/content/renderer/media/video_destination_handler_unittest.cc127
-rw-r--r--chromium/content/renderer/media/video_frame_compositor.cc77
-rw-r--r--chromium/content/renderer/media/video_frame_compositor.h71
-rw-r--r--chromium/content/renderer/media/video_frame_compositor_unittest.cc162
-rw-r--r--chromium/content/renderer/media/video_frame_deliverer.cc84
-rw-r--r--chromium/content/renderer/media/video_frame_deliverer.h82
-rw-r--r--chromium/content/renderer/media/video_source_handler.cc168
-rw-r--r--chromium/content/renderer/media/video_source_handler.h55
-rw-r--r--chromium/content/renderer/media/video_source_handler_unittest.cc73
-rw-r--r--chromium/content/renderer/media/video_track_adapter.cc340
-rw-r--r--chromium/content/renderer/media/video_track_adapter.h90
-rw-r--r--chromium/content/renderer/media/webaudio_capturer_source.cc16
-rw-r--r--chromium/content/renderer/media/webaudio_capturer_source.h3
-rw-r--r--chromium/content/renderer/media/webaudiosourceprovider_impl.cc18
-rw-r--r--chromium/content/renderer/media/webaudiosourceprovider_impl.h5
-rw-r--r--chromium/content/renderer/media/webaudiosourceprovider_impl_unittest.cc16
-rw-r--r--chromium/content/renderer/media/webcontentdecryptionmodule_impl.cc230
-rw-r--r--chromium/content/renderer/media/webcontentdecryptionmodule_impl.h49
-rw-r--r--chromium/content/renderer/media/webcontentdecryptionmodulesession_impl.cc127
-rw-r--r--chromium/content/renderer/media/webcontentdecryptionmodulesession_impl.h56
-rw-r--r--chromium/content/renderer/media/webmediaplayer_impl.cc858
-rw-r--r--chromium/content/renderer/media/webmediaplayer_impl.h182
-rw-r--r--chromium/content/renderer/media/webmediaplayer_ms.cc102
-rw-r--r--chromium/content/renderer/media/webmediaplayer_ms.h67
-rw-r--r--chromium/content/renderer/media/webmediaplayer_params.cc16
-rw-r--r--chromium/content/renderer/media/webmediaplayer_params.h30
-rw-r--r--chromium/content/renderer/media/webmediaplayer_util.cc43
-rw-r--r--chromium/content/renderer/media/webmediaplayer_util.h4
-rw-r--r--chromium/content/renderer/media/webmediasource_impl.cc3
-rw-r--r--chromium/content/renderer/media/webmediasource_impl.h10
-rw-r--r--chromium/content/renderer/media/webrtc/DEPS5
-rw-r--r--chromium/content/renderer/media/webrtc/OWNERS3
-rw-r--r--chromium/content/renderer/media/webrtc/media_stream_remote_video_source.cc193
-rw-r--r--chromium/content/renderer/media/webrtc/media_stream_remote_video_source.h65
-rw-r--r--chromium/content/renderer/media/webrtc/media_stream_remote_video_source_unittest.cc141
-rw-r--r--chromium/content/renderer/media/webrtc/media_stream_track_metrics.cc332
-rw-r--r--chromium/content/renderer/media/webrtc/media_stream_track_metrics.h101
-rw-r--r--chromium/content/renderer/media/webrtc/media_stream_track_metrics_unittest.cc543
-rw-r--r--chromium/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc541
-rw-r--r--chromium/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.h234
-rw-r--r--chromium/content/renderer/media/webrtc/peer_connection_dependency_factory.cc657
-rw-r--r--chromium/content/renderer/media/webrtc/peer_connection_dependency_factory.h218
-rw-r--r--chromium/content/renderer/media/webrtc/peer_connection_dependency_factory_unittest.cc29
-rw-r--r--chromium/content/renderer/media/webrtc/video_destination_handler.cc235
-rw-r--r--chromium/content/renderer/media/webrtc/video_destination_handler.h92
-rw-r--r--chromium/content/renderer/media/webrtc/video_destination_handler_unittest.cc109
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_audio_sink_adapter.cc40
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_audio_sink_adapter.h45
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc158
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h108
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_local_audio_track_adapter_unittest.cc99
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter.cc111
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter.h67
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_unittest.cc155
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc193
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter.h71
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter_unittest.cc71
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_video_sink_adapter.cc119
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_video_sink_adapter.h60
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_video_track_adapter.cc185
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_video_track_adapter.h59
-rw-r--r--chromium/content/renderer/media/webrtc_audio_capturer.cc384
-rw-r--r--chromium/content/renderer/media/webrtc_audio_capturer.h150
-rw-r--r--chromium/content/renderer/media/webrtc_audio_capturer_unittest.cc229
-rw-r--r--chromium/content/renderer/media/webrtc_audio_device_impl.cc226
-rw-r--r--chromium/content/renderer/media/webrtc_audio_device_impl.h126
-rw-r--r--chromium/content/renderer/media/webrtc_audio_device_not_impl.cc8
-rw-r--r--chromium/content/renderer/media/webrtc_audio_device_not_impl.h2
-rw-r--r--chromium/content/renderer/media/webrtc_audio_device_unittest.cc979
-rw-r--r--chromium/content/renderer/media/webrtc_audio_renderer.cc271
-rw-r--r--chromium/content/renderer/media/webrtc_audio_renderer.h133
-rw-r--r--chromium/content/renderer/media/webrtc_audio_renderer_unittest.cc154
-rw-r--r--chromium/content/renderer/media/webrtc_local_audio_renderer.cc36
-rw-r--r--chromium/content/renderer/media/webrtc_local_audio_renderer.h4
-rw-r--r--chromium/content/renderer/media/webrtc_local_audio_source_provider.cc25
-rw-r--r--chromium/content/renderer/media/webrtc_local_audio_source_provider.h21
-rw-r--r--chromium/content/renderer/media/webrtc_local_audio_source_provider_unittest.cc46
-rw-r--r--chromium/content/renderer/media/webrtc_local_audio_track.cc275
-rw-r--r--chromium/content/renderer/media/webrtc_local_audio_track.h104
-rw-r--r--chromium/content/renderer/media/webrtc_local_audio_track_unittest.cc427
-rw-r--r--chromium/content/renderer/media/webrtc_logging.cc4
-rw-r--r--chromium/content/renderer/media/webrtc_uma_histograms.cc60
-rw-r--r--chromium/content/renderer/media/webrtc_uma_histograms.h65
-rw-r--r--chromium/content/renderer/media/webrtc_uma_histograms_unittest.cc79
-rw-r--r--chromium/content/renderer/media/websourcebuffer_impl.cc74
-rw-r--r--chromium/content/renderer/media/websourcebuffer_impl.h25
-rw-r--r--chromium/content/renderer/memory_benchmarking_extension.cc132
-rw-r--r--chromium/content/renderer/memory_benchmarking_extension.h32
-rw-r--r--chromium/content/renderer/mhtml_generator.cc16
-rw-r--r--chromium/content/renderer/mhtml_generator.h4
-rw-r--r--chromium/content/renderer/net_info_helper.cc33
-rw-r--r--chromium/content/renderer/net_info_helper.h18
-rw-r--r--chromium/content/renderer/notification_provider.cc25
-rw-r--r--chromium/content/renderer/notification_provider.h15
-rw-r--r--chromium/content/renderer/npapi/webplugin_delegate_proxy.cc31
-rw-r--r--chromium/content/renderer/npapi/webplugin_delegate_proxy.h1
-rw-r--r--chromium/content/renderer/npapi/webplugin_impl.cc133
-rw-r--r--chromium/content/renderer/npapi/webplugin_impl.h70
-rw-r--r--chromium/content/renderer/npapi/webplugin_impl_unittest.cc4
-rw-r--r--chromium/content/renderer/p2p/host_address_request.cc36
-rw-r--r--chromium/content/renderer/p2p/host_address_request.h42
-rw-r--r--chromium/content/renderer/p2p/ipc_network_manager.cc62
-rw-r--r--chromium/content/renderer/p2p/ipc_socket_factory.cc220
-rw-r--r--chromium/content/renderer/p2p/port_allocator.cc169
-rw-r--r--chromium/content/renderer/p2p/port_allocator.h26
-rw-r--r--chromium/content/renderer/p2p/socket_client.h66
-rw-r--r--chromium/content/renderer/p2p/socket_client_delegate.h46
-rw-r--r--chromium/content/renderer/p2p/socket_client_impl.cc47
-rw-r--r--chromium/content/renderer/p2p/socket_client_impl.h14
-rw-r--r--chromium/content/renderer/p2p/socket_dispatcher.cc25
-rw-r--r--chromium/content/renderer/p2p/socket_dispatcher.h27
-rw-r--r--chromium/content/renderer/paint_aggregator.cc288
-rw-r--r--chromium/content/renderer/paint_aggregator.h70
-rw-r--r--chromium/content/renderer/paint_aggregator_unittest.cc439
-rw-r--r--chromium/content/renderer/pepper/DEPS1
-rw-r--r--chromium/content/renderer/pepper/audio_helper.cc23
-rw-r--r--chromium/content/renderer/pepper/audio_helper.h3
-rw-r--r--chromium/content/renderer/pepper/common.h9
-rw-r--r--chromium/content/renderer/pepper/content_decryptor_delegate.cc578
-rw-r--r--chromium/content/renderer/pepper/content_decryptor_delegate.h135
-rw-r--r--chromium/content/renderer/pepper/content_renderer_pepper_host_factory.cc74
-rw-r--r--chromium/content/renderer/pepper/content_renderer_pepper_host_factory.h3
-rw-r--r--chromium/content/renderer/pepper/event_conversion.cc142
-rw-r--r--chromium/content/renderer/pepper/event_conversion.h2
-rw-r--r--chromium/content/renderer/pepper/fake_pepper_plugin_instance.cc28
-rw-r--r--chromium/content/renderer/pepper/fake_pepper_plugin_instance.h8
-rw-r--r--chromium/content/renderer/pepper/gfx_conversion.h5
-rw-r--r--chromium/content/renderer/pepper/host_array_buffer_var.cc21
-rw-r--r--chromium/content/renderer/pepper/host_array_buffer_var.h8
-rw-r--r--chromium/content/renderer/pepper/host_dispatcher_wrapper.cc24
-rw-r--r--chromium/content/renderer/pepper/host_globals.cc62
-rw-r--r--chromium/content/renderer/pepper/host_globals.h10
-rw-r--r--chromium/content/renderer/pepper/host_resource_var.cc4
-rw-r--r--chromium/content/renderer/pepper/host_resource_var.h4
-rw-r--r--chromium/content/renderer/pepper/host_var_tracker.cc28
-rw-r--r--chromium/content/renderer/pepper/host_var_tracker.h10
-rw-r--r--chromium/content/renderer/pepper/host_var_tracker_unittest.cc34
-rw-r--r--chromium/content/renderer/pepper/message_channel.cc477
-rw-r--r--chromium/content/renderer/pepper/message_channel.h67
-rw-r--r--chromium/content/renderer/pepper/mock_renderer_ppapi_host.cc16
-rw-r--r--chromium/content/renderer/pepper/mock_renderer_ppapi_host.h27
-rw-r--r--chromium/content/renderer/pepper/npapi_glue.cc23
-rw-r--r--chromium/content/renderer/pepper/npapi_glue.h10
-rw-r--r--chromium/content/renderer/pepper/npobject_var.cc14
-rw-r--r--chromium/content/renderer/pepper/pepper_audio_input_host.cc87
-rw-r--r--chromium/content/renderer/pepper/pepper_audio_input_host.h7
-rw-r--r--chromium/content/renderer/pepper/pepper_broker.cc34
-rw-r--r--chromium/content/renderer/pepper/pepper_broker.h5
-rw-r--r--chromium/content/renderer/pepper/pepper_browser_connection.cc20
-rw-r--r--chromium/content/renderer/pepper/pepper_browser_connection.h2
-rw-r--r--chromium/content/renderer/pepper/pepper_compositor_host.cc385
-rw-r--r--chromium/content/renderer/pepper/pepper_compositor_host.h102
-rw-r--r--chromium/content/renderer/pepper/pepper_device_enumeration_host_helper.cc36
-rw-r--r--chromium/content/renderer/pepper/pepper_device_enumeration_host_helper.h19
-rw-r--r--chromium/content/renderer/pepper/pepper_device_enumeration_host_helper_unittest.cc45
-rw-r--r--chromium/content/renderer/pepper/pepper_file_chooser_host.cc48
-rw-r--r--chromium/content/renderer/pepper/pepper_file_chooser_host_unittest.cc11
-rw-r--r--chromium/content/renderer/pepper/pepper_file_ref_renderer_host.cc11
-rw-r--r--chromium/content/renderer/pepper/pepper_file_ref_renderer_host.h3
-rw-r--r--chromium/content/renderer/pepper/pepper_file_system_host.cc27
-rw-r--r--chromium/content/renderer/pepper/pepper_file_system_host.h3
-rw-r--r--chromium/content/renderer/pepper/pepper_graphics_2d_host.cc323
-rw-r--r--chromium/content/renderer/pepper/pepper_graphics_2d_host.h46
-rw-r--r--chromium/content/renderer/pepper/pepper_graphics_2d_host_unittest.cc319
-rw-r--r--chromium/content/renderer/pepper/pepper_hung_plugin_filter.cc19
-rw-r--r--chromium/content/renderer/pepper/pepper_hung_plugin_filter.h2
-rw-r--r--chromium/content/renderer/pepper/pepper_in_process_resource_creation.cc55
-rw-r--r--chromium/content/renderer/pepper/pepper_in_process_resource_creation.h32
-rw-r--r--chromium/content/renderer/pepper/pepper_in_process_router.cc36
-rw-r--r--chromium/content/renderer/pepper/pepper_in_process_router.h6
-rw-r--r--chromium/content/renderer/pepper/pepper_media_device_manager.cc69
-rw-r--r--chromium/content/renderer/pepper/pepper_media_device_manager.h31
-rw-r--r--chromium/content/renderer/pepper/pepper_media_stream_audio_track_host.cc265
-rw-r--r--chromium/content/renderer/pepper/pepper_media_stream_audio_track_host.h150
-rw-r--r--chromium/content/renderer/pepper/pepper_media_stream_track_host_base.cc124
-rw-r--r--chromium/content/renderer/pepper/pepper_media_stream_track_host_base.h73
-rw-r--r--chromium/content/renderer/pepper/pepper_media_stream_video_track_host.cc545
-rw-r--r--chromium/content/renderer/pepper/pepper_media_stream_video_track_host.h130
-rw-r--r--chromium/content/renderer/pepper/pepper_platform_audio_input.cc44
-rw-r--r--chromium/content/renderer/pepper/pepper_platform_audio_input.h21
-rw-r--r--chromium/content/renderer/pepper/pepper_platform_audio_output.cc54
-rw-r--r--chromium/content/renderer/pepper/pepper_platform_audio_output.h6
-rw-r--r--chromium/content/renderer/pepper/pepper_platform_context_3d.cc178
-rw-r--r--chromium/content/renderer/pepper/pepper_platform_context_3d.h85
-rw-r--r--chromium/content/renderer/pepper/pepper_platform_video_capture.cc155
-rw-r--r--chromium/content/renderer/pepper/pepper_platform_video_capture.h72
-rw-r--r--chromium/content/renderer/pepper/pepper_plugin_instance_impl.cc1079
-rw-r--r--chromium/content/renderer/pepper/pepper_plugin_instance_impl.h190
-rw-r--r--chromium/content/renderer/pepper/pepper_plugin_registry.cc17
-rw-r--r--chromium/content/renderer/pepper/pepper_proxy_channel_delegate_impl.cc6
-rw-r--r--chromium/content/renderer/pepper/pepper_truetype_font_host.cc15
-rw-r--r--chromium/content/renderer/pepper/pepper_truetype_font_linux.cc40
-rw-r--r--chromium/content/renderer/pepper/pepper_truetype_font_mac.mm10
-rw-r--r--chromium/content/renderer/pepper/pepper_truetype_font_win.cc55
-rw-r--r--chromium/content/renderer/pepper/pepper_url_loader_host.cc66
-rw-r--r--chromium/content/renderer/pepper/pepper_url_loader_host.h12
-rw-r--r--chromium/content/renderer/pepper/pepper_url_request_unittest.cc85
-rw-r--r--chromium/content/renderer/pepper/pepper_video_capture_host.cc131
-rw-r--r--chromium/content/renderer/pepper/pepper_video_capture_host.h47
-rw-r--r--chromium/content/renderer/pepper/pepper_video_decoder_host.cc403
-rw-r--r--chromium/content/renderer/pepper/pepper_video_decoder_host.h128
-rw-r--r--chromium/content/renderer/pepper/pepper_video_destination_host.cc26
-rw-r--r--chromium/content/renderer/pepper/pepper_video_destination_host.h2
-rw-r--r--chromium/content/renderer/pepper/pepper_video_source_host.cc106
-rw-r--r--chromium/content/renderer/pepper/pepper_video_source_host.h7
-rw-r--r--chromium/content/renderer/pepper/pepper_webplugin_impl.cc70
-rw-r--r--chromium/content/renderer/pepper/pepper_webplugin_impl.h6
-rw-r--r--chromium/content/renderer/pepper/pepper_websocket_host.cc126
-rw-r--r--chromium/content/renderer/pepper/pepper_websocket_host.h1
-rw-r--r--chromium/content/renderer/pepper/plugin_module.cc139
-rw-r--r--chromium/content/renderer/pepper/plugin_module.h15
-rw-r--r--chromium/content/renderer/pepper/plugin_object.cc116
-rw-r--r--chromium/content/renderer/pepper/plugin_object.h4
-rw-r--r--chromium/content/renderer/pepper/ppb_audio_impl.cc67
-rw-r--r--chromium/content/renderer/pepper/ppb_audio_impl.h25
-rw-r--r--chromium/content/renderer/pepper/ppb_broker_impl.cc23
-rw-r--r--chromium/content/renderer/pepper/ppb_buffer_impl.cc19
-rw-r--r--chromium/content/renderer/pepper/ppb_flash_message_loop_impl.cc13
-rw-r--r--chromium/content/renderer/pepper/ppb_flash_message_loop_impl.h8
-rw-r--r--chromium/content/renderer/pepper/ppb_graphics_3d_impl.cc214
-rw-r--r--chromium/content/renderer/pepper/ppb_graphics_3d_impl.h46
-rw-r--r--chromium/content/renderer/pepper/ppb_image_data_impl.cc86
-rw-r--r--chromium/content/renderer/pepper/ppb_image_data_impl.h29
-rw-r--r--chromium/content/renderer/pepper/ppb_proxy_impl.cc13
-rw-r--r--chromium/content/renderer/pepper/ppb_proxy_impl.h1
-rw-r--r--chromium/content/renderer/pepper/ppb_scrollbar_impl.cc63
-rw-r--r--chromium/content/renderer/pepper/ppb_scrollbar_impl.h10
-rw-r--r--chromium/content/renderer/pepper/ppb_uma_private_impl.cc97
-rw-r--r--chromium/content/renderer/pepper/ppb_uma_private_impl.h19
-rw-r--r--chromium/content/renderer/pepper/ppb_var_deprecated_impl.cc123
-rw-r--r--chromium/content/renderer/pepper/ppb_video_decoder_impl.cc132
-rw-r--r--chromium/content/renderer/pepper/ppb_video_decoder_impl.h44
-rw-r--r--chromium/content/renderer/pepper/ppb_widget_impl.cc22
-rw-r--r--chromium/content/renderer/pepper/ppb_widget_impl.h2
-rw-r--r--chromium/content/renderer/pepper/ppp_pdf.h34
-rw-r--r--chromium/content/renderer/pepper/renderer_ppapi_host_impl.cc67
-rw-r--r--chromium/content/renderer/pepper/renderer_ppapi_host_impl.h29
-rw-r--r--chromium/content/renderer/pepper/resource_converter.cc222
-rw-r--r--chromium/content/renderer/pepper/resource_converter.h26
-rw-r--r--chromium/content/renderer/pepper/resource_creation_impl.cc169
-rw-r--r--chromium/content/renderer/pepper/resource_creation_impl.h80
-rw-r--r--chromium/content/renderer/pepper/url_request_info_util.cc52
-rw-r--r--chromium/content/renderer/pepper/url_response_info_util.cc42
-rw-r--r--chromium/content/renderer/pepper/v8_var_converter.cc219
-rw-r--r--chromium/content/renderer/pepper/v8_var_converter.h45
-rw-r--r--chromium/content/renderer/pepper/v8_var_converter_unittest.cc102
-rw-r--r--chromium/content/renderer/pepper/video_decoder_shim.cc589
-rw-r--r--chromium/content/renderer/pepper/video_decoder_shim.h129
-rw-r--r--chromium/content/renderer/push_messaging_dispatcher.cc73
-rw-r--r--chromium/content/renderer/push_messaging_dispatcher.h56
-rw-r--r--chromium/content/renderer/render_frame_impl.cc3032
-rw-r--r--chromium/content/renderer/render_frame_impl.h554
-rw-r--r--chromium/content/renderer/render_frame_impl_unittest.cc41
-rw-r--r--chromium/content/renderer/render_frame_proxy.cc148
-rw-r--r--chromium/content/renderer/render_frame_proxy.h95
-rw-r--r--chromium/content/renderer/render_process.h29
-rw-r--r--chromium/content/renderer/render_process_impl.cc195
-rw-r--r--chromium/content/renderer/render_process_impl.h45
-rw-r--r--chromium/content/renderer/render_thread_impl.cc613
-rw-r--r--chromium/content/renderer/render_thread_impl.h157
-rw-r--r--chromium/content/renderer/render_thread_impl_browsertest.cc21
-rw-r--r--chromium/content/renderer/render_view_browsertest.cc722
-rw-r--r--chromium/content/renderer/render_view_browsertest_mac.mm10
-rw-r--r--chromium/content/renderer/render_view_impl.cc3553
-rw-r--r--chromium/content/renderer/render_view_impl.h670
-rw-r--r--chromium/content/renderer/render_view_impl_params.cc13
-rw-r--r--chromium/content/renderer/render_view_impl_params.h10
-rw-r--r--chromium/content/renderer/render_view_impl_unittest.cc41
-rw-r--r--chromium/content/renderer/render_widget.cc1679
-rw-r--r--chromium/content/renderer/render_widget.h350
-rw-r--r--chromium/content/renderer/render_widget_browsertest.cc4
-rw-r--r--chromium/content/renderer/render_widget_fullscreen.cc3
-rw-r--r--chromium/content/renderer/render_widget_fullscreen_pepper.cc124
-rw-r--r--chromium/content/renderer/render_widget_fullscreen_pepper.h8
-rw-r--r--chromium/content/renderer/render_widget_unittest.cc32
-rw-r--r--chromium/content/renderer/renderer.gni14
-rw-r--r--chromium/content/renderer/renderer.sb9
-rw-r--r--chromium/content/renderer/renderer_clipboard_client.cc26
-rw-r--r--chromium/content/renderer/renderer_clipboard_client.h6
-rw-r--r--chromium/content/renderer/renderer_main.cc37
-rw-r--r--chromium/content/renderer/renderer_main_platform_delegate.h7
-rw-r--r--chromium/content/renderer/renderer_main_platform_delegate_android.cc26
-rw-r--r--chromium/content/renderer/renderer_main_platform_delegate_linux.cc21
-rw-r--r--chromium/content/renderer/renderer_main_platform_delegate_mac.mm215
-rw-r--r--chromium/content/renderer/renderer_main_platform_delegate_win.cc86
-rw-r--r--chromium/content/renderer/renderer_webapplicationcachehost_impl.cc2
-rw-r--r--chromium/content/renderer/renderer_webapplicationcachehost_impl.h2
-rw-r--r--chromium/content/renderer/renderer_webcolorchooser_impl.cc26
-rw-r--r--chromium/content/renderer/renderer_webcolorchooser_impl.h15
-rw-r--r--chromium/content/renderer/renderer_webcookiejar_impl.cc12
-rw-r--r--chromium/content/renderer/renderer_webcookiejar_impl.h7
-rw-r--r--chromium/content/renderer/renderer_webkitplatformsupport_impl.cc345
-rw-r--r--chromium/content/renderer/renderer_webkitplatformsupport_impl.h70
-rw-r--r--chromium/content/renderer/resource_fetcher_browsertest.cc149
-rw-r--r--chromium/content/renderer/resources/media/mediaplayer_remote_playback.pngbin7568 -> 0 bytes
-rw-r--r--chromium/content/renderer/savable_resources.cc21
-rw-r--r--chromium/content/renderer/savable_resources_browsertest.cc10
-rw-r--r--chromium/content/renderer/screen_orientation/OWNERS1
-rw-r--r--chromium/content/renderer/screen_orientation/mock_screen_orientation_controller.cc97
-rw-r--r--chromium/content/renderer/screen_orientation/mock_screen_orientation_controller.h50
-rw-r--r--chromium/content/renderer/screen_orientation/screen_orientation_dispatcher.cc81
-rw-r--r--chromium/content/renderer/screen_orientation/screen_orientation_dispatcher.h65
-rw-r--r--chromium/content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc281
-rw-r--r--chromium/content/renderer/service_worker/OWNERS7
-rw-r--r--chromium/content/renderer/service_worker/embedded_worker_context_client.cc319
-rw-r--r--chromium/content/renderer/service_worker/embedded_worker_context_client.h133
-rw-r--r--chromium/content/renderer/service_worker/embedded_worker_context_message_filter.cc48
-rw-r--r--chromium/content/renderer/service_worker/embedded_worker_context_message_filter.h36
-rw-r--r--chromium/content/renderer/service_worker/embedded_worker_devtools_agent.cc68
-rw-r--r--chromium/content/renderer/service_worker/embedded_worker_devtools_agent.h47
-rw-r--r--chromium/content/renderer/service_worker/embedded_worker_dispatcher.cc60
-rw-r--r--chromium/content/renderer/service_worker/embedded_worker_dispatcher.h8
-rw-r--r--chromium/content/renderer/service_worker/service_worker_context_client.cc98
-rw-r--r--chromium/content/renderer/service_worker/service_worker_context_client.h63
-rw-r--r--chromium/content/renderer/service_worker/service_worker_script_context.cc188
-rw-r--r--chromium/content/renderer/service_worker/service_worker_script_context.h101
-rw-r--r--chromium/content/renderer/shared_worker/OWNERS3
-rw-r--r--chromium/content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.cc62
-rw-r--r--chromium/content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.h47
-rw-r--r--chromium/content/renderer/shared_worker/embedded_shared_worker_stub.cc212
-rw-r--r--chromium/content/renderer/shared_worker/embedded_shared_worker_stub.h93
-rw-r--r--chromium/content/renderer/shared_worker_repository.cc33
-rw-r--r--chromium/content/renderer/shared_worker_repository.h13
-rw-r--r--chromium/content/renderer/skia_benchmarking_extension.cc525
-rw-r--r--chromium/content/renderer/skia_benchmarking_extension.h67
-rw-r--r--chromium/content/renderer/skia_benchmarking_extension_unittest.cc3
-rw-r--r--chromium/content/renderer/speech_recognition_dispatcher.cc7
-rw-r--r--chromium/content/renderer/speech_recognition_dispatcher.h3
-rw-r--r--chromium/content/renderer/stats_collection_controller.cc33
-rw-r--r--chromium/content/renderer/stats_collection_controller.h4
-rw-r--r--chromium/content/renderer/text_input_client_observer.cc23
-rw-r--r--chromium/content/renderer/text_input_client_observer.h1
-rw-r--r--chromium/content/renderer/v8_value_converter_impl.cc146
-rw-r--r--chromium/content/renderer/v8_value_converter_impl.h19
-rw-r--r--chromium/content/renderer/v8_value_converter_impl_unittest.cc216
-rw-r--r--chromium/content/renderer/web_preferences.cc77
-rw-r--r--chromium/content/renderer/web_ui_extension.cc149
-rw-r--r--chromium/content/renderer/web_ui_extension.h23
-rw-r--r--chromium/content/renderer/web_ui_extension_data.h6
-rw-r--r--chromium/content/renderer/web_ui_mojo.cc133
-rw-r--r--chromium/content/renderer/web_ui_mojo.h87
-rw-r--r--chromium/content/renderer/web_ui_mojo_context_state.cc142
-rw-r--r--chromium/content/renderer/web_ui_mojo_context_state.h87
-rw-r--r--chromium/content/renderer/web_ui_runner.cc70
-rw-r--r--chromium/content/renderer/web_ui_runner.h46
-rw-r--r--chromium/content/renderer/web_ui_setup_impl.cc33
-rw-r--r--chromium/content/renderer/web_ui_setup_impl.h32
-rw-r--r--chromium/content/renderer/webclipboard_impl.cc63
-rw-r--r--chromium/content/renderer/webcrypto/OWNERS2
-rw-r--r--chromium/content/renderer/webcrypto/webcrypto_impl.cc631
-rw-r--r--chromium/content/renderer/webcrypto/webcrypto_impl.h153
-rw-r--r--chromium/content/renderer/webcrypto/webcrypto_impl_nss.cc1013
-rw-r--r--chromium/content/renderer/webcrypto/webcrypto_impl_openssl.cc539
-rw-r--r--chromium/content/renderer/webcrypto/webcrypto_impl_unittest.cc1641
-rw-r--r--chromium/content/renderer/webcrypto/webcrypto_util.cc205
-rw-r--r--chromium/content/renderer/webcrypto/webcrypto_util.h107
-rw-r--r--chromium/content/renderer/webgraphicscontext3d_provider_impl.cc25
-rw-r--r--chromium/content/renderer/webgraphicscontext3d_provider_impl.h38
-rw-r--r--chromium/content/renderer/webscrollbarbehavior_impl_gtkoraura.cc47
-rw-r--r--chromium/content/renderer/webscrollbarbehavior_impl_gtkoraura.h25
-rw-r--r--chromium/content/renderer/webscrollbarbehavior_impl_mac.h32
-rw-r--r--chromium/content/renderer/webscrollbarbehavior_impl_mac.mm21
-rw-r--r--chromium/content/renderer/websharedworker_proxy.cc110
-rw-r--r--chromium/content/renderer/websharedworker_proxy.h41
-rw-r--r--chromium/content/shell/DEPS33
-rw-r--r--chromium/content/shell/OWNERS1
-rw-r--r--chromium/content/shell/android/OWNERS2
-rw-r--r--chromium/content/shell/android/browsertests_apk/AndroidManifest.xml109
-rw-r--r--chromium/content/shell/android/browsertests_apk/content_browser_tests_android.cc118
-rw-r--r--chromium/content/shell/android/browsertests_apk/res/layout/test_activity.xml16
-rw-r--r--chromium/content/shell/android/linker_test_apk/AndroidManifest.xml109
-rw-r--r--chromium/content/shell/android/linker_test_apk/content_linker_test_android.cc36
-rw-r--r--chromium/content/shell/android/linker_test_apk/content_linker_test_linker_tests.cc185
-rw-r--r--chromium/content/shell/android/linker_test_apk/content_linker_test_linker_tests.h16
-rw-r--r--chromium/content/shell/android/linker_test_apk/res/layout/test_activity.xml16
-rw-r--r--chromium/content/shell/android/shell_apk/AndroidManifest.xml110
-rw-r--r--chromium/content/shell/android/shell_apk/res/layout/content_shell_activity.xml14
-rw-r--r--chromium/content/shell/android/shell_apk/res/values/strings.xml11
-rw-r--r--chromium/content/shell/android/shell_descriptors.h17
-rw-r--r--chromium/content/shell/android/shell_library_loader.cc32
-rw-r--r--chromium/content/shell/android/shell_manager.cc67
-rw-r--r--chromium/content/shell/android/shell_manager.h37
-rw-r--r--chromium/content/shell/app/English.lproj/HttpAuth.xib350
-rw-r--r--chromium/content/shell/app/English.lproj/MainMenu.xib2183
-rw-r--r--chromium/content/shell/app/app-Info.plist34
-rw-r--r--chromium/content/shell/app/app.icnsbin55080 -> 0 bytes
-rw-r--r--chromium/content/shell/app/framework-Info.plist18
-rw-r--r--chromium/content/shell/app/helper-Info.plist30
-rw-r--r--chromium/content/shell/app/paths_mac.h24
-rw-r--r--chromium/content/shell/app/paths_mac.mm67
-rw-r--r--chromium/content/shell/app/resource.h41
-rw-r--r--chromium/content/shell/app/shell.exe.manifest20
-rw-r--r--chromium/content/shell/app/shell.rc146
-rw-r--r--chromium/content/shell/app/shell_breakpad_client.cc72
-rw-r--r--chromium/content/shell/app/shell_breakpad_client.h55
-rw-r--r--chromium/content/shell/app/shell_content_main.cc16
-rw-r--r--chromium/content/shell/app/shell_content_main.h18
-rw-r--r--chromium/content/shell/app/shell_main.cc40
-rw-r--r--chromium/content/shell/app/shell_main_delegate.cc298
-rw-r--r--chromium/content/shell/app/shell_main_delegate.h54
-rw-r--r--chromium/content/shell/app/shell_main_delegate_mac.h16
-rw-r--r--chromium/content/shell/app/shell_main_delegate_mac.mm55
-rw-r--r--chromium/content/shell/app/webkit_test_platform_support.h15
-rw-r--r--chromium/content/shell/app/webkit_test_platform_support_android.cc42
-rw-r--r--chromium/content/shell/app/webkit_test_platform_support_linux.cc148
-rw-r--r--chromium/content/shell/app/webkit_test_platform_support_mac.mm105
-rw-r--r--chromium/content/shell/app/webkit_test_platform_support_win.cc112
-rw-r--r--chromium/content/shell/browser/notify_done_forwarder.cc33
-rw-r--r--chromium/content/shell/browser/notify_done_forwarder.h34
-rw-r--r--chromium/content/shell/browser/shell.cc362
-rw-r--r--chromium/content/shell/browser/shell.h290
-rw-r--r--chromium/content/shell/browser/shell_android.cc96
-rw-r--r--chromium/content/shell/browser/shell_application_mac.h27
-rw-r--r--chromium/content/shell/browser/shell_application_mac.mm39
-rw-r--r--chromium/content/shell/browser/shell_aura.cc204
-rw-r--r--chromium/content/shell/browser/shell_aura.h48
-rw-r--r--chromium/content/shell/browser/shell_browser_context.cc223
-rw-r--r--chromium/content/shell/browser/shell_browser_context.h89
-rw-r--r--chromium/content/shell/browser/shell_browser_main.cc224
-rw-r--r--chromium/content/shell/browser/shell_browser_main.h19
-rw-r--r--chromium/content/shell/browser/shell_browser_main_parts.cc189
-rw-r--r--chromium/content/shell/browser/shell_browser_main_parts.h79
-rw-r--r--chromium/content/shell/browser/shell_browser_main_parts_mac.mm25
-rw-r--r--chromium/content/shell/browser/shell_content_browser_client.cc339
-rw-r--r--chromium/content/shell/browser/shell_content_browser_client.h96
-rw-r--r--chromium/content/shell/browser/shell_devtools_delegate.cc216
-rw-r--r--chromium/content/shell/browser/shell_devtools_delegate.h49
-rw-r--r--chromium/content/shell/browser/shell_devtools_frontend.cc118
-rw-r--r--chromium/content/shell/browser/shell_devtools_frontend.h58
-rw-r--r--chromium/content/shell/browser/shell_download_manager_delegate.cc211
-rw-r--r--chromium/content/shell/browser/shell_download_manager_delegate.h65
-rw-r--r--chromium/content/shell/browser/shell_gtk.cc346
-rw-r--r--chromium/content/shell/browser/shell_javascript_dialog.h64
-rw-r--r--chromium/content/shell/browser/shell_javascript_dialog_gtk.cc127
-rw-r--r--chromium/content/shell/browser/shell_javascript_dialog_mac.mm138
-rw-r--r--chromium/content/shell/browser/shell_javascript_dialog_manager.cc143
-rw-r--r--chromium/content/shell/browser/shell_javascript_dialog_manager.h67
-rw-r--r--chromium/content/shell/browser/shell_javascript_dialog_win.cc113
-rw-r--r--chromium/content/shell/browser/shell_layout_tests_android.cc93
-rw-r--r--chromium/content/shell/browser/shell_layout_tests_android.h25
-rw-r--r--chromium/content/shell/browser/shell_login_dialog.cc107
-rw-r--r--chromium/content/shell/browser/shell_login_dialog.h98
-rw-r--r--chromium/content/shell/browser/shell_login_dialog_gtk.cc111
-rw-r--r--chromium/content/shell/browser/shell_login_dialog_mac.mm122
-rw-r--r--chromium/content/shell/browser/shell_mac.mm336
-rw-r--r--chromium/content/shell/browser/shell_message_filter.cc105
-rw-r--r--chromium/content/shell/browser/shell_message_filter.h66
-rw-r--r--chromium/content/shell/browser/shell_net_log.cc72
-rw-r--r--chromium/content/shell/browser/shell_net_log.h28
-rw-r--r--chromium/content/shell/browser/shell_network_delegate.cc127
-rw-r--r--chromium/content/shell/browser/shell_network_delegate.h71
-rw-r--r--chromium/content/shell/browser/shell_plugin_service_filter.cc31
-rw-r--r--chromium/content/shell/browser/shell_plugin_service_filter.h37
-rw-r--r--chromium/content/shell/browser/shell_quota_permission_context.cc32
-rw-r--r--chromium/content/shell/browser/shell_quota_permission_context.h34
-rw-r--r--chromium/content/shell/browser/shell_resource_dispatcher_host_delegate.cc44
-rw-r--r--chromium/content/shell/browser/shell_resource_dispatcher_host_delegate.h40
-rw-r--r--chromium/content/shell/browser/shell_speech_recognition_manager_delegate.cc33
-rw-r--r--chromium/content/shell/browser/shell_speech_recognition_manager_delegate.h38
-rw-r--r--chromium/content/shell/browser/shell_url_request_context_getter.cc231
-rw-r--r--chromium/content/shell/browser/shell_url_request_context_getter.h69
-rw-r--r--chromium/content/shell/browser/shell_views.cc398
-rw-r--r--chromium/content/shell/browser/shell_web_contents_view_delegate.h83
-rw-r--r--chromium/content/shell/browser/shell_web_contents_view_delegate_android.cc46
-rw-r--r--chromium/content/shell/browser/shell_web_contents_view_delegate_creator.h18
-rw-r--r--chromium/content/shell/browser/shell_web_contents_view_delegate_gtk.cc241
-rw-r--r--chromium/content/shell/browser/shell_web_contents_view_delegate_mac.mm277
-rw-r--r--chromium/content/shell/browser/shell_web_contents_view_delegate_win.cc254
-rw-r--r--chromium/content/shell/browser/shell_win.cc285
-rw-r--r--chromium/content/shell/browser/webkit_test_controller.cc655
-rw-r--r--chromium/content/shell/browser/webkit_test_controller.h220
-rw-r--r--chromium/content/shell/common/shell_content_client.cc87
-rw-r--r--chromium/content/shell/common/shell_content_client.h32
-rw-r--r--chromium/content/shell/common/shell_messages.cc33
-rw-r--r--chromium/content/shell/common/shell_messages.h100
-rw-r--r--chromium/content/shell/common/shell_switches.cc43
-rw-r--r--chromium/content/shell/common/shell_switches.h25
-rw-r--r--chromium/content/shell/common/shell_test_configuration.cc15
-rw-r--r--chromium/content/shell/common/shell_test_configuration.h44
-rw-r--r--chromium/content/shell/common/webkit_test_helpers.cc120
-rw-r--r--chromium/content/shell/common/webkit_test_helpers.h37
-rw-r--r--chromium/content/shell/geolocation/shell_access_token_store.cc55
-rw-r--r--chromium/content/shell/geolocation/shell_access_token_store.h41
-rw-r--r--chromium/content/shell/layout_tests/TestExpectations3
-rw-r--r--chromium/content/shell/renderer/gc_extension.cc29
-rw-r--r--chromium/content/shell/renderer/gc_extension.h23
-rw-r--r--chromium/content/shell/renderer/shell_content_renderer_client.cc193
-rw-r--r--chromium/content/shell/renderer/shell_content_renderer_client.h67
-rw-r--r--chromium/content/shell/renderer/shell_render_process_observer.cc102
-rw-r--r--chromium/content/shell/renderer/shell_render_process_observer.h69
-rw-r--r--chromium/content/shell/renderer/shell_render_view_observer.cc27
-rw-r--r--chromium/content/shell/renderer/shell_render_view_observer.h33
-rw-r--r--chromium/content/shell/renderer/webkit_test_runner.cc703
-rw-r--r--chromium/content/shell/renderer/webkit_test_runner.h141
-rw-r--r--chromium/content/shell/resources/README.txt26
-rw-r--r--chromium/content/shell/resources/missingImage.gifbin362 -> 0 bytes
-rw-r--r--chromium/content/shell/resources/missingImage.pngbin372 -> 0 bytes
-rw-r--r--chromium/content/shell/resources/shell_devtools_discovery_page.html54
-rw-r--r--chromium/content/shell/resources/textAreaResizeCorner.pngbin92 -> 0 bytes
-rw-r--r--chromium/content/shell/shell_resources.grd19
-rw-r--r--chromium/content/shell/tools/DEPS4
-rw-r--r--chromium/content/shell/tools/content_shell_crash_service.cc42
-rw-r--r--chromium/content/utility/BUILD.gn24
-rw-r--r--chromium/content/utility/DEPS1
-rw-r--r--chromium/content/utility/utility_main.cc34
-rw-r--r--chromium/content/utility/utility_thread_impl.cc7
-rw-r--r--chromium/content/utility/utility_thread_impl.h4
-rw-r--r--chromium/content/webkit_version.h.in9
-rw-r--r--chromium/content/worker/BUILD.gn34
-rw-r--r--chromium/content/worker/DEPS2
-rw-r--r--chromium/content/worker/OWNERS2
-rw-r--r--chromium/content/worker/shared_worker_devtools_agent.cc88
-rw-r--r--chromium/content/worker/shared_worker_devtools_agent.h50
-rw-r--r--chromium/content/worker/shared_worker_permission_client_proxy.cc5
-rw-r--r--chromium/content/worker/shared_worker_permission_client_proxy.h2
-rw-r--r--chromium/content/worker/websharedworker_stub.cc102
-rw-r--r--chromium/content/worker/websharedworker_stub.h30
-rw-r--r--chromium/content/worker/websharedworkerclient_proxy.cc52
-rw-r--r--chromium/content/worker/websharedworkerclient_proxy.h13
-rw-r--r--chromium/content/worker/worker_thread.cc17
-rw-r--r--chromium/content/worker/worker_webapplicationcachehost_impl.cc5
-rw-r--r--chromium/content/worker/worker_webapplicationcachehost_impl.h24
-rw-r--r--chromium/content/worker/worker_webkitplatformsupport_impl.cc39
-rw-r--r--chromium/content/worker/worker_webkitplatformsupport_impl.h14
-rw-r--r--chromium/content/zygote/zygote_linux.cc345
-rw-r--r--chromium/content/zygote/zygote_linux.h51
-rw-r--r--chromium/content/zygote/zygote_main.h5
-rw-r--r--chromium/content/zygote/zygote_main_linux.cc352
-rw-r--r--chromium/courgette/courgette.gyp26
-rw-r--r--chromium/crypto/BUILD.gn270
-rw-r--r--chromium/crypto/PRESUBMIT.py9
-rw-r--r--chromium/crypto/crypto.gyp138
-rw-r--r--chromium/crypto/crypto.gypi104
-rw-r--r--chromium/crypto/crypto_nacl.gyp47
-rw-r--r--chromium/crypto/ec_private_key_openssl.cc5
-rw-r--r--chromium/crypto/ec_private_key_unittest.cc126
-rw-r--r--chromium/crypto/encryptor.h3
-rw-r--r--chromium/crypto/hmac_openssl.cc8
-rw-r--r--chromium/crypto/hmac_unittest.cc18
-rw-r--r--chromium/crypto/nss_util.cc247
-rw-r--r--chromium/crypto/nss_util.h33
-rw-r--r--chromium/crypto/nss_util_internal.h2
-rw-r--r--chromium/crypto/openpgp_symmetric_encryption.cc795
-rw-r--r--chromium/crypto/openpgp_symmetric_encryption.h45
-rw-r--r--chromium/crypto/openpgp_symmetric_encryption_unittest.cc114
-rw-r--r--chromium/crypto/openssl_bio_string.cc77
-rw-r--r--chromium/crypto/openssl_bio_string.h29
-rw-r--r--chromium/crypto/openssl_bio_string_unittest.cc66
-rw-r--r--chromium/crypto/openssl_util.h3
-rw-r--r--chromium/crypto/p224_unittest.cc2
-rw-r--r--chromium/crypto/rsa_private_key.h18
-rw-r--r--chromium/crypto/rsa_private_key_nss.cc101
-rw-r--r--chromium/crypto/scoped_capi_types.h4
-rw-r--r--chromium/crypto/scoped_nss_types.h49
-rw-r--r--chromium/crypto/symmetric_key.h8
-rw-r--r--chromium/crypto/symmetric_key_nss.cc7
-rw-r--r--chromium/crypto/third_party/nss/chromium-blapit.h2
-rw-r--r--chromium/crypto/third_party/nss/chromium-prtypes.h77
-rw-r--r--chromium/crypto/third_party/nss/chromium-sha256.h2
-rw-r--r--chromium/crypto/third_party/nss/sha512.cc2
-rw-r--r--chromium/dbus/BUILD.gn127
-rw-r--r--chromium/dbus/bus.h4
-rw-r--r--chromium/dbus/exported_object.h8
-rw-r--r--chromium/dbus/file_descriptor.cc10
-rw-r--r--chromium/dbus/message.cc15
-rw-r--r--chromium/dbus/message.h17
-rw-r--r--chromium/dbus/message_unittest.cc4
-rw-r--r--chromium/dbus/object_manager.cc34
-rw-r--r--chromium/dbus/object_manager.h6
-rw-r--r--chromium/dbus/object_manager_unittest.cc17
-rw-r--r--chromium/dbus/object_proxy.cc4
-rw-r--r--chromium/dbus/property.cc28
-rw-r--r--chromium/dbus/property.h5
-rw-r--r--chromium/dbus/property_unittest.cc26
-rw-r--r--chromium/dbus/test_service.cc101
-rw-r--r--chromium/dbus/test_service.h25
-rw-r--r--chromium/dbus/values_util.cc51
-rw-r--r--chromium/dbus/values_util.h26
-rw-r--r--chromium/dbus/values_util_unittest.cc238
-rw-r--r--chromium/device/DEPS1
-rw-r--r--chromium/device/OWNERS2
-rw-r--r--chromium/device/bluetooth/DEPS1
-rw-r--r--chromium/device/bluetooth/OWNERS7
-rw-r--r--chromium/device/bluetooth/bluetooth.gyp71
-rw-r--r--chromium/device/bluetooth/bluetooth_adapter.cc99
-rw-r--r--chromium/device/bluetooth/bluetooth_adapter.h307
-rw-r--r--chromium/device/bluetooth/bluetooth_adapter_chromeos.cc631
-rw-r--r--chromium/device/bluetooth/bluetooth_adapter_chromeos.h181
-rw-r--r--chromium/device/bluetooth/bluetooth_adapter_factory.cc88
-rw-r--r--chromium/device/bluetooth/bluetooth_adapter_factory.h19
-rw-r--r--chromium/device/bluetooth/bluetooth_adapter_mac.h108
-rw-r--r--chromium/device/bluetooth/bluetooth_adapter_mac.mm377
-rw-r--r--chromium/device/bluetooth/bluetooth_adapter_unittest.cc192
-rw-r--r--chromium/device/bluetooth/bluetooth_adapter_win.cc119
-rw-r--r--chromium/device/bluetooth/bluetooth_adapter_win.h60
-rw-r--r--chromium/device/bluetooth/bluetooth_adapter_win_unittest.cc74
-rw-r--r--chromium/device/bluetooth/bluetooth_channel_mac.h64
-rw-r--r--chromium/device/bluetooth/bluetooth_channel_mac.mm29
-rw-r--r--chromium/device/bluetooth/bluetooth_chromeos_unittest.cc1719
-rw-r--r--chromium/device/bluetooth/bluetooth_device.cc96
-rw-r--r--chromium/device/bluetooth/bluetooth_device.h225
-rw-r--r--chromium/device/bluetooth/bluetooth_device_chromeos.cc659
-rw-r--r--chromium/device/bluetooth/bluetooth_device_chromeos.h158
-rw-r--r--chromium/device/bluetooth/bluetooth_device_mac.h56
-rw-r--r--chromium/device/bluetooth/bluetooth_device_mac.mm235
-rw-r--r--chromium/device/bluetooth/bluetooth_device_unittest.cc59
-rw-r--r--chromium/device/bluetooth/bluetooth_device_win.cc130
-rw-r--r--chromium/device/bluetooth/bluetooth_device_win.h62
-rw-r--r--chromium/device/bluetooth/bluetooth_device_win_unittest.cc110
-rw-r--r--chromium/device/bluetooth/bluetooth_discovery_manager_mac.h66
-rw-r--r--chromium/device/bluetooth/bluetooth_discovery_manager_mac.mm222
-rw-r--r--chromium/device/bluetooth/bluetooth_discovery_session.cc65
-rw-r--r--chromium/device/bluetooth/bluetooth_discovery_session.h90
-rw-r--r--chromium/device/bluetooth/bluetooth_gatt_characteristic.cc27
-rw-r--r--chromium/device/bluetooth/bluetooth_gatt_characteristic.h210
-rw-r--r--chromium/device/bluetooth/bluetooth_gatt_chromeos_unittest.cc1346
-rw-r--r--chromium/device/bluetooth/bluetooth_gatt_connection.cc15
-rw-r--r--chromium/device/bluetooth/bluetooth_gatt_connection.h50
-rw-r--r--chromium/device/bluetooth/bluetooth_gatt_connection_chromeos.cc107
-rw-r--r--chromium/device/bluetooth/bluetooth_gatt_connection_chromeos.h66
-rw-r--r--chromium/device/bluetooth/bluetooth_gatt_descriptor.cc91
-rw-r--r--chromium/device/bluetooth/bluetooth_gatt_descriptor.h188
-rw-r--r--chromium/device/bluetooth/bluetooth_gatt_notify_session.cc15
-rw-r--r--chromium/device/bluetooth/bluetooth_gatt_notify_session.h44
-rw-r--r--chromium/device/bluetooth/bluetooth_gatt_notify_session_chromeos.cc132
-rw-r--r--chromium/device/bluetooth/bluetooth_gatt_notify_session_chromeos.h78
-rw-r--r--chromium/device/bluetooth/bluetooth_gatt_service.cc26
-rw-r--r--chromium/device/bluetooth/bluetooth_gatt_service.h307
-rw-r--r--chromium/device/bluetooth/bluetooth_l2cap_channel_mac.h69
-rw-r--r--chromium/device/bluetooth/bluetooth_l2cap_channel_mac.mm173
-rw-r--r--chromium/device/bluetooth/bluetooth_out_of_band_pairing_data.h27
-rw-r--r--chromium/device/bluetooth/bluetooth_pairing_chromeos.cc273
-rw-r--r--chromium/device/bluetooth/bluetooth_pairing_chromeos.h146
-rw-r--r--chromium/device/bluetooth/bluetooth_profile.cc67
-rw-r--r--chromium/device/bluetooth/bluetooth_profile.h109
-rw-r--r--chromium/device/bluetooth/bluetooth_profile_chromeos.cc253
-rw-r--r--chromium/device/bluetooth/bluetooth_profile_chromeos.h127
-rw-r--r--chromium/device/bluetooth/bluetooth_profile_chromeos_unittest.cc369
-rw-r--r--chromium/device/bluetooth/bluetooth_profile_mac.h47
-rw-r--r--chromium/device/bluetooth/bluetooth_profile_mac.mm84
-rw-r--r--chromium/device/bluetooth/bluetooth_profile_win.cc47
-rw-r--r--chromium/device/bluetooth/bluetooth_profile_win.h38
-rw-r--r--chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_chromeos.cc479
-rw-r--r--chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_chromeos.h169
-rw-r--r--chromium/device/bluetooth/bluetooth_remote_gatt_descriptor_chromeos.cc137
-rw-r--r--chromium/device/bluetooth/bluetooth_remote_gatt_descriptor_chromeos.h89
-rw-r--r--chromium/device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc286
-rw-r--r--chromium/device/bluetooth/bluetooth_remote_gatt_service_chromeos.h158
-rw-r--r--chromium/device/bluetooth/bluetooth_rfcomm_channel_mac.h69
-rw-r--r--chromium/device/bluetooth/bluetooth_rfcomm_channel_mac.mm168
-rw-r--r--chromium/device/bluetooth/bluetooth_service_record.cc15
-rw-r--r--chromium/device/bluetooth/bluetooth_service_record.h70
-rw-r--r--chromium/device/bluetooth/bluetooth_service_record_mac.h37
-rw-r--r--chromium/device/bluetooth/bluetooth_service_record_mac.mm77
-rw-r--r--chromium/device/bluetooth/bluetooth_service_record_mac_unittest.mm152
-rw-r--r--chromium/device/bluetooth/bluetooth_service_record_win.cc19
-rw-r--r--chromium/device/bluetooth/bluetooth_service_record_win.h31
-rw-r--r--chromium/device/bluetooth/bluetooth_service_record_win_unittest.cc11
-rw-r--r--chromium/device/bluetooth/bluetooth_socket.cc11
-rw-r--r--chromium/device/bluetooth/bluetooth_socket.h73
-rw-r--r--chromium/device/bluetooth/bluetooth_socket_chromeos.cc662
-rw-r--r--chromium/device/bluetooth/bluetooth_socket_chromeos.h211
-rw-r--r--chromium/device/bluetooth/bluetooth_socket_chromeos_unittest.cc513
-rw-r--r--chromium/device/bluetooth/bluetooth_socket_mac.h206
-rw-r--r--chromium/device/bluetooth/bluetooth_socket_mac.mm968
-rw-r--r--chromium/device/bluetooth/bluetooth_socket_net.cc312
-rw-r--r--chromium/device/bluetooth/bluetooth_socket_net.h131
-rw-r--r--chromium/device/bluetooth/bluetooth_socket_thread.cc78
-rw-r--r--chromium/device/bluetooth/bluetooth_socket_thread.h50
-rw-r--r--chromium/device/bluetooth/bluetooth_socket_win.cc422
-rw-r--r--chromium/device/bluetooth/bluetooth_socket_win.h96
-rw-r--r--chromium/device/bluetooth/bluetooth_strings.grd22
-rw-r--r--chromium/device/bluetooth/bluetooth_task_manager_win.cc105
-rw-r--r--chromium/device/bluetooth/bluetooth_task_manager_win.h6
-rw-r--r--chromium/device/bluetooth/bluetooth_utils.cc59
-rw-r--r--chromium/device/bluetooth/bluetooth_utils.h31
-rw-r--r--chromium/device/bluetooth/bluetooth_utils_unittest.cc53
-rw-r--r--chromium/device/bluetooth/bluetooth_uuid.cc95
-rw-r--r--chromium/device/bluetooth/bluetooth_uuid.h97
-rw-r--r--chromium/device/bluetooth/bluetooth_uuid_unittest.cc107
-rw-r--r--chromium/device/device_tests.gyp25
-rw-r--r--chromium/device/hid/DEPS (renamed from chromium/third_party/zlib/google/DEPS)0
-rw-r--r--chromium/device/hid/device_monitor_linux.cc150
-rw-r--r--chromium/device/hid/device_monitor_linux.h75
-rw-r--r--chromium/device/hid/hid.gyp67
-rw-r--r--chromium/device/hid/hid_connection.cc22
-rw-r--r--chromium/device/hid/hid_connection.h65
-rw-r--r--chromium/device/hid/hid_connection_linux.cc210
-rw-r--r--chromium/device/hid/hid_connection_linux.h59
-rw-r--r--chromium/device/hid/hid_connection_mac.cc176
-rw-r--r--chromium/device/hid/hid_connection_mac.h81
-rw-r--r--chromium/device/hid/hid_connection_unittest.cc128
-rw-r--r--chromium/device/hid/hid_connection_win.cc303
-rw-r--r--chromium/device/hid/hid_connection_win.h57
-rw-r--r--chromium/device/hid/hid_device_info.cc25
-rw-r--r--chromium/device/hid/hid_device_info.h55
-rw-r--r--chromium/device/hid/hid_report_descriptor.cc61
-rw-r--r--chromium/device/hid/hid_report_descriptor.h38
-rw-r--r--chromium/device/hid/hid_report_descriptor_item.cc112
-rw-r--r--chromium/device/hid/hid_report_descriptor_item.h183
-rw-r--r--chromium/device/hid/hid_report_descriptor_unittest.cc613
-rw-r--r--chromium/device/hid/hid_service.cc99
-rw-r--r--chromium/device/hid/hid_service.h64
-rw-r--r--chromium/device/hid/hid_service_linux.cc202
-rw-r--r--chromium/device/hid/hid_service_linux.h42
-rw-r--r--chromium/device/hid/hid_service_mac.cc192
-rw-r--r--chromium/device/hid/hid_service_mac.h64
-rw-r--r--chromium/device/hid/hid_service_unittest.cc27
-rw-r--r--chromium/device/hid/hid_service_win.cc250
-rw-r--r--chromium/device/hid/hid_service_win.h38
-rw-r--r--chromium/device/hid/hid_usage_and_page.cc13
-rw-r--r--chromium/device/hid/hid_usage_and_page.h134
-rw-r--r--chromium/device/hid/hid_utils_mac.cc45
-rw-r--r--chromium/device/hid/hid_utils_mac.h30
-rw-r--r--chromium/device/hid/input_service_linux.cc240
-rw-r--r--chromium/device/hid/input_service_linux.h98
-rw-r--r--chromium/device/hid/input_service_linux_unittest.cc24
-rw-r--r--chromium/device/media_transfer_protocol/media_transfer_protocol_daemon_client.cc5
-rw-r--r--chromium/device/nfc/OWNERS2
-rw-r--r--chromium/device/nfc/nfc.gyp11
-rw-r--r--chromium/device/nfc/nfc_adapter.cc46
-rw-r--r--chromium/device/nfc/nfc_adapter.h19
-rw-r--r--chromium/device/nfc/nfc_adapter_chromeos.cc178
-rw-r--r--chromium/device/nfc/nfc_adapter_chromeos.h4
-rw-r--r--chromium/device/nfc/nfc_chromeos_unittest.cc675
-rw-r--r--chromium/device/nfc/nfc_ndef_record.cc55
-rw-r--r--chromium/device/nfc/nfc_ndef_record.h8
-rw-r--r--chromium/device/nfc/nfc_ndef_record_unittest.cc39
-rw-r--r--chromium/device/nfc/nfc_ndef_record_utils_chromeos.cc238
-rw-r--r--chromium/device/nfc/nfc_ndef_record_utils_chromeos.h36
-rw-r--r--chromium/device/nfc/nfc_peer.h12
-rw-r--r--chromium/device/nfc/nfc_peer_chromeos.cc194
-rw-r--r--chromium/device/nfc/nfc_peer_chromeos.h81
-rw-r--r--chromium/device/nfc/nfc_tag.h35
-rw-r--r--chromium/device/nfc/nfc_tag_chromeos.cc164
-rw-r--r--chromium/device/nfc/nfc_tag_chromeos.h70
-rw-r--r--chromium/device/nfc/nfc_tag_technology.cc7
-rw-r--r--chromium/device/nfc/nfc_tag_technology.h47
-rw-r--r--chromium/device/nfc/nfc_tag_technology_chromeos.cc186
-rw-r--r--chromium/device/nfc/nfc_tag_technology_chromeos.h87
-rw-r--r--chromium/device/serial/BUILD.gn37
-rw-r--r--chromium/device/serial/serial.gyp43
-rw-r--r--chromium/device/serial/serial.mojom16
-rw-r--r--chromium/device/serial/serial_device_enumerator.cc13
-rw-r--r--chromium/device/serial/serial_device_enumerator.h27
-rw-r--r--chromium/device/serial/serial_device_enumerator_linux.cc107
-rw-r--r--chromium/device/serial/serial_device_enumerator_linux.h36
-rw-r--r--chromium/device/serial/serial_device_enumerator_mac.cc60
-rw-r--r--chromium/device/serial/serial_device_enumerator_mac.h27
-rw-r--r--chromium/device/serial/serial_device_enumerator_win.cc41
-rw-r--r--chromium/device/serial/serial_device_enumerator_win.h27
-rw-r--r--chromium/device/udev_linux/BUILD.gn22
-rw-r--r--chromium/device/udev_linux/udev.cc27
-rw-r--r--chromium/device/udev_linux/udev.gyp30
-rw-r--r--chromium/device/udev_linux/udev.h38
-rw-r--r--chromium/device/usb/BUILD.gn31
-rw-r--r--chromium/device/usb/tools/usb_ids.py (renamed from chromium/tools/usb_ids/usb_ids.py)0
-rw-r--r--chromium/device/usb/usb.gyp4
-rw-r--r--chromium/extensions/browser/extension_function_histogram_value.h866
-rw-r--r--chromium/extensions/browser/extension_function_registry.h66
-rw-r--r--chromium/extensions/common/api/api.gyp54
-rw-r--r--chromium/extensions/extensions.gyp503
-rw-r--r--chromium/extensions/extensions_resources.gyp38
-rw-r--r--chromium/extensions/extensions_strings.gyp31
-rw-r--r--chromium/gin/BUILD.gn125
-rw-r--r--chromium/gin/README26
-rw-r--r--chromium/gin/arguments.h11
-rw-r--r--chromium/gin/array_buffer.cc37
-rw-r--r--chromium/gin/array_buffer.h2
-rw-r--r--chromium/gin/context_holder.cc10
-rw-r--r--chromium/gin/converter.cc12
-rw-r--r--chromium/gin/converter.h12
-rw-r--r--chromium/gin/converter_unittest.cc5
-rw-r--r--chromium/gin/function_template.cc33
-rw-r--r--chromium/gin/function_template.h249
-rw-r--r--chromium/gin/function_template.h.pump83
-rw-r--r--chromium/gin/gin.gyp21
-rw-r--r--chromium/gin/handle.h5
-rw-r--r--chromium/gin/interceptor.cc64
-rw-r--r--chromium/gin/interceptor.h63
-rw-r--r--chromium/gin/interceptor_unittest.cc159
-rw-r--r--chromium/gin/isolate_holder.cc34
-rw-r--r--chromium/gin/modules/console.cc22
-rw-r--r--chromium/gin/modules/console.h2
-rw-r--r--chromium/gin/modules/file_module_provider.cc5
-rw-r--r--chromium/gin/modules/module_registry.cc73
-rw-r--r--chromium/gin/modules/module_registry.h24
-rw-r--r--chromium/gin/modules/module_registry_observer.h31
-rw-r--r--chromium/gin/modules/module_registry_unittest.cc99
-rw-r--r--chromium/gin/modules/module_runner_delegate.cc30
-rw-r--r--chromium/gin/modules/module_runner_delegate.h25
-rw-r--r--chromium/gin/modules/timer.cc103
-rw-r--r--chromium/gin/modules/timer.h64
-rw-r--r--chromium/gin/modules/timer_unittest.cc155
-rw-r--r--chromium/gin/object_template_builder.cc143
-rw-r--r--chromium/gin/object_template_builder.h23
-rw-r--r--chromium/gin/per_context_data.cc33
-rw-r--r--chromium/gin/per_context_data.h40
-rw-r--r--chromium/gin/per_context_data_unittest.cc34
-rw-r--r--chromium/gin/per_isolate_data.cc60
-rw-r--r--chromium/gin/per_isolate_data.h39
-rw-r--r--chromium/gin/public/context_holder.h6
-rw-r--r--chromium/gin/public/isolate_holder.h25
-rw-r--r--chromium/gin/public/v8_platform.h38
-rw-r--r--chromium/gin/runner.cc86
-rw-r--r--chromium/gin/runner.h51
-rw-r--r--chromium/gin/runner_unittest.cc37
-rw-r--r--chromium/gin/shell/gin_main.cc10
-rw-r--r--chromium/gin/shell_runner.cc112
-rw-r--r--chromium/gin/shell_runner.h68
-rw-r--r--chromium/gin/shell_runner_unittest.cc37
-rw-r--r--chromium/gin/v8_platform.cc42
-rw-r--r--chromium/gin/wrappable.cc31
-rw-r--r--chromium/gin/wrappable.h29
-rw-r--r--chromium/gin/wrappable_unittest.cc175
-rw-r--r--chromium/google_apis/BUILD.gn246
-rw-r--r--chromium/google_apis/OWNERS1
-rw-r--r--chromium/google_apis/cup/client_update_protocol_nss.cc7
-rw-r--r--chromium/google_apis/drive/auth_service.cc3
-rw-r--r--chromium/google_apis/drive/base_requests.cc3
-rw-r--r--chromium/google_apis/drive/base_requests_unittest.cc2
-rw-r--r--chromium/google_apis/drive/drive_api_parser.cc107
-rw-r--r--chromium/google_apis/drive/drive_api_parser.h175
-rw-r--r--chromium/google_apis/drive/drive_api_parser_unittest.cc68
-rw-r--r--chromium/google_apis/drive/drive_api_requests.cc184
-rw-r--r--chromium/google_apis/drive/drive_api_requests.h165
-rw-r--r--chromium/google_apis/drive/drive_api_requests_unittest.cc208
-rw-r--r--chromium/google_apis/drive/drive_api_url_generator.cc58
-rw-r--r--chromium/google_apis/drive/drive_api_url_generator.h19
-rw-r--r--chromium/google_apis/drive/drive_api_url_generator_unittest.cc70
-rw-r--r--chromium/google_apis/drive/drive_common_callbacks.h5
-rw-r--r--chromium/google_apis/drive/gdata_contacts_requests.cc115
-rw-r--r--chromium/google_apis/drive/gdata_contacts_requests.h102
-rw-r--r--chromium/google_apis/drive/gdata_wapi_parser.cc248
-rw-r--r--chromium/google_apis/drive/gdata_wapi_parser.h247
-rw-r--r--chromium/google_apis/drive/gdata_wapi_parser_unittest.cc69
-rw-r--r--chromium/google_apis/drive/gdata_wapi_requests.cc647
-rw-r--r--chromium/google_apis/drive/gdata_wapi_requests.h442
-rw-r--r--chromium/google_apis/drive/gdata_wapi_requests_unittest.cc1427
-rw-r--r--chromium/google_apis/drive/gdata_wapi_url_generator.cc185
-rw-r--r--chromium/google_apis/drive/gdata_wapi_url_generator.h83
-rw-r--r--chromium/google_apis/drive/gdata_wapi_url_generator_unittest.cc170
-rw-r--r--chromium/google_apis/drive/task_util.cc4
-rw-r--r--chromium/google_apis/drive/task_util.h15
-rw-r--r--chromium/google_apis/drive/test_util.cc3
-rw-r--r--chromium/google_apis/gaia/DEPS5
-rw-r--r--chromium/google_apis/gaia/account_tracker.cc293
-rw-r--r--chromium/google_apis/gaia/account_tracker.h149
-rw-r--r--chromium/google_apis/gaia/account_tracker_unittest.cc816
-rw-r--r--chromium/google_apis/gaia/fake_gaia.cc531
-rw-r--r--chromium/google_apis/gaia/fake_gaia.h102
-rw-r--r--chromium/google_apis/gaia/fake_identity_provider.cc40
-rw-r--r--chromium/google_apis/gaia/fake_identity_provider.h38
-rw-r--r--chromium/google_apis/gaia/fake_oauth2_token_service.cc89
-rw-r--r--chromium/google_apis/gaia/fake_oauth2_token_service.h84
-rw-r--r--chromium/google_apis/gaia/gaia_auth_fetcher.cc179
-rw-r--r--chromium/google_apis/gaia/gaia_auth_fetcher.h19
-rw-r--r--chromium/google_apis/gaia/gaia_auth_fetcher_unittest.cc59
-rw-r--r--chromium/google_apis/gaia/gaia_auth_util.cc72
-rw-r--r--chromium/google_apis/gaia/gaia_auth_util.h16
-rw-r--r--chromium/google_apis/gaia/gaia_auth_util_unittest.cc90
-rw-r--r--chromium/google_apis/gaia/gaia_constants.cc7
-rw-r--r--chromium/google_apis/gaia/gaia_constants.h4
-rw-r--r--chromium/google_apis/gaia/gaia_oauth_client.cc7
-rw-r--r--chromium/google_apis/gaia/gaia_oauth_client.h2
-rw-r--r--chromium/google_apis/gaia/gaia_oauth_client_unittest.cc10
-rw-r--r--chromium/google_apis/gaia/gaia_switches.cc6
-rw-r--r--chromium/google_apis/gaia/gaia_switches.h11
-rw-r--r--chromium/google_apis/gaia/gaia_urls.cc23
-rw-r--r--chromium/google_apis/gaia/gaia_urls.h6
-rw-r--r--chromium/google_apis/gaia/google_service_auth_error.cc17
-rw-r--r--chromium/google_apis/gaia/google_service_auth_error.h7
-rw-r--r--chromium/google_apis/gaia/google_service_auth_error_unittest.cc6
-rw-r--r--chromium/google_apis/gaia/identity_provider.cc71
-rw-r--r--chromium/google_apis/gaia/identity_provider.h93
-rw-r--r--chromium/google_apis/gaia/merge_session_helper.cc178
-rw-r--r--chromium/google_apis/gaia/merge_session_helper.h117
-rw-r--r--chromium/google_apis/gaia/merge_session_helper_unittest.cc307
-rw-r--r--chromium/google_apis/gaia/oauth2_access_token_fetcher.cc306
-rw-r--r--chromium/google_apis/gaia/oauth2_access_token_fetcher.h94
-rw-r--r--chromium/google_apis/gaia/oauth2_access_token_fetcher_impl.cc313
-rw-r--r--chromium/google_apis/gaia/oauth2_access_token_fetcher_impl.h118
-rw-r--r--chromium/google_apis/gaia/oauth2_access_token_fetcher_impl_unittest.cc265
-rw-r--r--chromium/google_apis/gaia/oauth2_access_token_fetcher_unittest.cc256
-rw-r--r--chromium/google_apis/gaia/oauth2_api_call_flow.cc4
-rw-r--r--chromium/google_apis/gaia/oauth2_api_call_flow.h2
-rw-r--r--chromium/google_apis/gaia/oauth2_api_call_flow_unittest.cc44
-rw-r--r--chromium/google_apis/gaia/oauth2_mint_token_flow.cc12
-rw-r--r--chromium/google_apis/gaia/oauth2_mint_token_flow.h2
-rw-r--r--chromium/google_apis/gaia/oauth2_mint_token_flow_unittest.cc14
-rw-r--r--chromium/google_apis/gaia/oauth2_token_service.cc121
-rw-r--r--chromium/google_apis/gaia/oauth2_token_service.h72
-rw-r--r--chromium/google_apis/gaia/oauth2_token_service_request.cc360
-rw-r--r--chromium/google_apis/gaia/oauth2_token_service_request.h96
-rw-r--r--chromium/google_apis/gaia/oauth2_token_service_request_unittest.cc263
-rw-r--r--chromium/google_apis/gaia/oauth2_token_service_test_util.cc3
-rw-r--r--chromium/google_apis/gaia/oauth2_token_service_unittest.cc30
-rw-r--r--chromium/google_apis/gaia/ubertoken_fetcher.cc63
-rw-r--r--chromium/google_apis/gaia/ubertoken_fetcher.h71
-rw-r--r--chromium/google_apis/gaia/ubertoken_fetcher_unittest.cc112
-rw-r--r--chromium/google_apis/gcm/DEPS1
-rw-r--r--chromium/google_apis/gcm/base/encryptor.h27
-rw-r--r--chromium/google_apis/gcm/base/fake_encryptor.cc24
-rw-r--r--chromium/google_apis/gcm/base/fake_encryptor.h28
-rw-r--r--chromium/google_apis/gcm/base/mcs_message_unittest.cc6
-rw-r--r--chromium/google_apis/gcm/base/mcs_util.cc61
-rw-r--r--chromium/google_apis/gcm/base/mcs_util.h15
-rw-r--r--chromium/google_apis/gcm/base/mcs_util_unittest.cc6
-rw-r--r--chromium/google_apis/gcm/base/socket_stream.cc4
-rw-r--r--chromium/google_apis/gcm/engine/checkin_request.cc221
-rw-r--r--chromium/google_apis/gcm/engine/checkin_request.h95
-rw-r--r--chromium/google_apis/gcm/engine/checkin_request_unittest.cc380
-rw-r--r--chromium/google_apis/gcm/engine/connection_factory.cc3
-rw-r--r--chromium/google_apis/gcm/engine/connection_factory.h51
-rw-r--r--chromium/google_apis/gcm/engine/connection_factory_impl.cc508
-rw-r--r--chromium/google_apis/gcm/engine/connection_factory_impl.h108
-rw-r--r--chromium/google_apis/gcm/engine/connection_factory_impl_unittest.cc364
-rw-r--r--chromium/google_apis/gcm/engine/connection_handler.h6
-rw-r--r--chromium/google_apis/gcm/engine/connection_handler_impl.cc67
-rw-r--r--chromium/google_apis/gcm/engine/connection_handler_impl.h5
-rw-r--r--chromium/google_apis/gcm/engine/connection_handler_impl_unittest.cc99
-rw-r--r--chromium/google_apis/gcm/engine/fake_connection_factory.cc22
-rw-r--r--chromium/google_apis/gcm/engine/fake_connection_factory.h16
-rw-r--r--chromium/google_apis/gcm/engine/fake_connection_handler.cc7
-rw-r--r--chromium/google_apis/gcm/engine/fake_connection_handler.h3
-rw-r--r--chromium/google_apis/gcm/engine/gcm_store.cc21
-rw-r--r--chromium/google_apis/gcm/engine/gcm_store.h121
-rw-r--r--chromium/google_apis/gcm/engine/gcm_store_impl.cc956
-rw-r--r--chromium/google_apis/gcm/engine/gcm_store_impl.h126
-rw-r--r--chromium/google_apis/gcm/engine/gcm_store_impl_unittest.cc552
-rw-r--r--chromium/google_apis/gcm/engine/gservices_settings.cc342
-rw-r--r--chromium/google_apis/gcm/engine/gservices_settings.h82
-rw-r--r--chromium/google_apis/gcm/engine/gservices_settings_unittest.cc336
-rw-r--r--chromium/google_apis/gcm/engine/heartbeat_manager.cc119
-rw-r--r--chromium/google_apis/gcm/engine/heartbeat_manager.h82
-rw-r--r--chromium/google_apis/gcm/engine/heartbeat_manager_unittest.cc176
-rw-r--r--chromium/google_apis/gcm/engine/mcs_client.cc605
-rw-r--r--chromium/google_apis/gcm/engine/mcs_client.h150
-rw-r--r--chromium/google_apis/gcm/engine/mcs_client_unittest.cc479
-rw-r--r--chromium/google_apis/gcm/engine/registration_info.cc62
-rw-r--r--chromium/google_apis/gcm/engine/registration_info.h35
-rw-r--r--chromium/google_apis/gcm/engine/registration_request.cc267
-rw-r--r--chromium/google_apis/gcm/engine/registration_request.h128
-rw-r--r--chromium/google_apis/gcm/engine/registration_request_unittest.cc427
-rw-r--r--chromium/google_apis/gcm/engine/rmq_store.cc491
-rw-r--r--chromium/google_apis/gcm/engine/rmq_store.h102
-rw-r--r--chromium/google_apis/gcm/engine/rmq_store_unittest.cc303
-rw-r--r--chromium/google_apis/gcm/engine/unregistration_request.cc224
-rw-r--r--chromium/google_apis/gcm/engine/unregistration_request.h115
-rw-r--r--chromium/google_apis/gcm/engine/unregistration_request_unittest.cc295
-rw-r--r--chromium/google_apis/gcm/gcm.gyp89
-rw-r--r--chromium/google_apis/gcm/gcm_client.cc45
-rw-r--r--chromium/google_apis/gcm/gcm_client.h193
-rw-r--r--chromium/google_apis/gcm/gcm_client_impl.cc39
-rw-r--r--chromium/google_apis/gcm/gcm_client_impl.h39
-rw-r--r--chromium/google_apis/gcm/monitoring/fake_gcm_stats_recorder.cc107
-rw-r--r--chromium/google_apis/gcm/monitoring/fake_gcm_stats_recorder.h71
-rw-r--r--chromium/google_apis/gcm/monitoring/gcm_stats_recorder.h135
-rw-r--r--chromium/google_apis/gcm/protocol/android_checkin.proto97
-rw-r--r--chromium/google_apis/gcm/protocol/checkin.proto156
-rw-r--r--chromium/google_apis/gcm/tools/mcs_probe.cc191
-rw-r--r--chromium/google_apis/google_api_keys.cc19
-rw-r--r--chromium/google_apis/google_api_keys.h4
-rw-r--r--chromium/google_apis/google_api_keys_unittest.cc1
-rw-r--r--chromium/google_apis/google_apis.gyp106
-rw-r--r--chromium/gpu/BUILD.gn238
-rw-r--r--chromium/gpu/DEPS1
-rw-r--r--chromium/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_color_buffer_float_rgb.txt64
-rw-r--r--chromium/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_color_buffer_float_rgba.txt64
-rw-r--r--chromium/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_image.txt117
-rw-r--r--chromium/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_map_image.txt107
-rw-r--r--chromium/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_schedule_overlay_plane.txt75
-rw-r--r--chromium/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_sync_query.txt53
-rw-r--r--chromium/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_texture_mailbox.txt33
-rw-r--r--chromium/gpu/GLES2/gl2chromium.h4
-rw-r--r--chromium/gpu/GLES2/gl2chromium_autogen.h64
-rw-r--r--chromium/gpu/GLES2/gl2extchromium.h120
-rw-r--r--chromium/gpu/PRESUBMIT.py18
-rw-r--r--chromium/gpu/command_buffer/OWNERS1
-rwxr-xr-xchromium/gpu/command_buffer/build_gles2_cmd_buffer.py2218
-rw-r--r--chromium/gpu/command_buffer/client/BUILD.gn165
-rw-r--r--chromium/gpu/command_buffer/client/buffer_tracker.cc22
-rw-r--r--chromium/gpu/command_buffer/client/buffer_tracker.h26
-rw-r--r--chromium/gpu/command_buffer/client/buffer_tracker_unittest.cc29
-rw-r--r--chromium/gpu/command_buffer/client/client_context_state_autogen.h5
-rw-r--r--chromium/gpu/command_buffer/client/client_context_state_impl_autogen.h50
-rw-r--r--chromium/gpu/command_buffer/client/client_test_helper.cc41
-rw-r--r--chromium/gpu/command_buffer/client/client_test_helper.h30
-rw-r--r--chromium/gpu/command_buffer/client/cmd_buffer_helper.cc196
-rw-r--r--chromium/gpu/command_buffer/client/cmd_buffer_helper.h121
-rw-r--r--chromium/gpu/command_buffer/client/cmd_buffer_helper_test.cc400
-rw-r--r--chromium/gpu/command_buffer/client/context_support.h15
-rw-r--r--chromium/gpu/command_buffer/client/fenced_allocator.cc17
-rw-r--r--chromium/gpu/command_buffer/client/fenced_allocator.h16
-rw-r--r--chromium/gpu/command_buffer/client/fenced_allocator_test.cc75
-rw-r--r--chromium/gpu/command_buffer/client/gl_in_process_context.cc105
-rw-r--r--chromium/gpu/command_buffer/client/gl_in_process_context.h29
-rw-r--r--chromium/gpu/command_buffer/client/gl_in_process_context_export.h29
-rw-r--r--chromium/gpu/command_buffer/client/gles2_c_lib_autogen.h1667
-rw-r--r--chromium/gpu/command_buffer/client/gles2_cmd_helper.h40
-rw-r--r--chromium/gpu/command_buffer/client/gles2_cmd_helper_autogen.h3893
-rw-r--r--chromium/gpu/command_buffer/client/gles2_implementation.cc640
-rw-r--r--chromium/gpu/command_buffer/client/gles2_implementation.h123
-rw-r--r--chromium/gpu/command_buffer/client/gles2_implementation_autogen.h673
-rw-r--r--chromium/gpu/command_buffer/client/gles2_implementation_impl_autogen.h1133
-rw-r--r--chromium/gpu/command_buffer/client/gles2_implementation_unittest.cc818
-rw-r--r--chromium/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h219
-rw-r--r--chromium/gpu/command_buffer/client/gles2_interface_autogen.h526
-rw-r--r--chromium/gpu/command_buffer/client/gles2_interface_stub_autogen.h642
-rw-r--r--chromium/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h965
-rw-r--r--chromium/gpu/command_buffer/client/gles2_trace_implementation_autogen.h642
-rw-r--r--chromium/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h905
-rw-r--r--chromium/gpu/command_buffer/client/gpu_control.h71
-rw-r--r--chromium/gpu/command_buffer/client/gpu_memory_buffer_factory.h8
-rw-r--r--chromium/gpu/command_buffer/client/gpu_memory_buffer_tracker.cc10
-rw-r--r--chromium/gpu/command_buffer/client/gpu_memory_buffer_tracker.h5
-rw-r--r--chromium/gpu/command_buffer/client/mapped_memory.cc19
-rw-r--r--chromium/gpu/command_buffer/client/mapped_memory.h39
-rw-r--r--chromium/gpu/command_buffer/client/mapped_memory_unittest.cc117
-rw-r--r--chromium/gpu/command_buffer/client/program_info_manager.cc4
-rw-r--r--chromium/gpu/command_buffer/client/query_tracker.cc20
-rw-r--r--chromium/gpu/command_buffer/client/query_tracker.h12
-rw-r--r--chromium/gpu/command_buffer/client/query_tracker_unittest.cc40
-rw-r--r--chromium/gpu/command_buffer/client/ring_buffer.cc19
-rw-r--r--chromium/gpu/command_buffer/client/ring_buffer.h121
-rw-r--r--chromium/gpu/command_buffer/client/ring_buffer_test.cc141
-rw-r--r--chromium/gpu/command_buffer/client/share_group.cc220
-rw-r--r--chromium/gpu/command_buffer/client/share_group.h27
-rw-r--r--chromium/gpu/command_buffer/client/transfer_buffer.cc54
-rw-r--r--chromium/gpu/command_buffer/client/transfer_buffer.h38
-rw-r--r--chromium/gpu/command_buffer/client/transfer_buffer_unittest.cc28
-rw-r--r--chromium/gpu/command_buffer/client/vertex_array_object_manager.h3
-rw-r--r--chromium/gpu/command_buffer/cmd_buffer_functions.txt13
-rw-r--r--chromium/gpu/command_buffer/command_buffer_nacl.gyp36
-rw-r--r--chromium/gpu/command_buffer/command_buffer_untrusted.gyp36
-rw-r--r--chromium/gpu/command_buffer/common/BUILD.gn42
-rw-r--r--chromium/gpu/command_buffer/common/buffer.cc42
-rw-r--r--chromium/gpu/command_buffer/common/buffer.h71
-rw-r--r--chromium/gpu/command_buffer/common/capabilities.cc1
-rw-r--r--chromium/gpu/command_buffer/common/capabilities.h3
-rw-r--r--chromium/gpu/command_buffer/common/cmd_buffer_common.cc2
-rw-r--r--chromium/gpu/command_buffer/common/cmd_buffer_common.h189
-rw-r--r--chromium/gpu/command_buffer/common/command_buffer.h44
-rw-r--r--chromium/gpu/command_buffer/common/command_buffer_mock.cc2
-rw-r--r--chromium/gpu/command_buffer/common/command_buffer_mock.h13
-rw-r--r--chromium/gpu/command_buffer/common/constants.h12
-rw-r--r--chromium/gpu/command_buffer/common/debug_marker_manager.cc2
-rw-r--r--chromium/gpu/command_buffer/common/gles2_cmd_format.h307
-rw-r--r--chromium/gpu/command_buffer/common/gles2_cmd_format_autogen.h7554
-rw-r--r--chromium/gpu/command_buffer/common/gles2_cmd_format_test.cc67
-rw-r--r--chromium/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h4342
-rw-r--r--chromium/gpu/command_buffer/common/gles2_cmd_ids_autogen.h443
-rw-r--r--chromium/gpu/command_buffer/common/gles2_cmd_utils.cc46
-rw-r--r--chromium/gpu/command_buffer/common/gles2_cmd_utils.h86
-rw-r--r--chromium/gpu/command_buffer/common/gles2_cmd_utils_autogen.h115
-rw-r--r--chromium/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h3798
-rw-r--r--chromium/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc53
-rw-r--r--chromium/gpu/command_buffer/common/gpu_control.h72
-rw-r--r--chromium/gpu/command_buffer/common/gpu_memory_allocation.h43
-rw-r--r--chromium/gpu/command_buffer/common/id_allocator.h6
-rw-r--r--chromium/gpu/command_buffer/common/mailbox.cc25
-rw-r--r--chromium/gpu/command_buffer/common/mailbox.h26
-rw-r--r--chromium/gpu/command_buffer/common/mailbox_holder.cc18
-rw-r--r--chromium/gpu/command_buffer/common/mailbox_holder.h28
-rw-r--r--chromium/gpu/command_buffer/common/types.h186
-rw-r--r--chromium/gpu/command_buffer/common/unittest_main.cc2
-rw-r--r--chromium/gpu/command_buffer/service/BUILD.gn155
-rw-r--r--chromium/gpu/command_buffer/service/async_pixel_transfer_delegate.cc47
-rw-r--r--chromium/gpu/command_buffer/service/async_pixel_transfer_delegate.h33
-rw-r--r--chromium/gpu/command_buffer/service/async_pixel_transfer_manager.cc15
-rw-r--r--chromium/gpu/command_buffer/service/async_pixel_transfer_manager.h5
-rw-r--r--chromium/gpu/command_buffer/service/async_pixel_transfer_manager_android.cc12
-rw-r--r--chromium/gpu/command_buffer/service/async_pixel_transfer_manager_egl.cc60
-rw-r--r--chromium/gpu/command_buffer/service/async_pixel_transfer_manager_egl.h1
-rw-r--r--chromium/gpu/command_buffer/service/async_pixel_transfer_manager_idle.cc94
-rw-r--r--chromium/gpu/command_buffer/service/async_pixel_transfer_manager_idle.h7
-rw-r--r--chromium/gpu/command_buffer/service/async_pixel_transfer_manager_mock.h1
-rw-r--r--chromium/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc60
-rw-r--r--chromium/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.h1
-rw-r--r--chromium/gpu/command_buffer/service/async_pixel_transfer_manager_stub.cc3
-rw-r--r--chromium/gpu/command_buffer/service/async_pixel_transfer_manager_stub.h1
-rw-r--r--chromium/gpu/command_buffer/service/async_pixel_transfer_manager_sync.cc7
-rw-r--r--chromium/gpu/command_buffer/service/async_pixel_transfer_manager_sync.h1
-rw-r--r--chromium/gpu/command_buffer/service/buffer_manager_unittest.cc11
-rw-r--r--chromium/gpu/command_buffer/service/cmd_buffer_engine.h2
-rw-r--r--chromium/gpu/command_buffer/service/command_buffer_service.cc71
-rw-r--r--chromium/gpu/command_buffer/service/command_buffer_service.h51
-rw-r--r--chromium/gpu/command_buffer/service/command_buffer_service_unittest.cc10
-rw-r--r--chromium/gpu/command_buffer/service/common_decoder.cc29
-rw-r--r--chromium/gpu/command_buffer/service/common_decoder.h2
-rw-r--r--chromium/gpu/command_buffer/service/common_decoder_unittest.cc23
-rw-r--r--chromium/gpu/command_buffer/service/context_group.cc37
-rw-r--r--chromium/gpu/command_buffer/service/context_group.h10
-rw-r--r--chromium/gpu/command_buffer/service/context_group_unittest.cc29
-rw-r--r--chromium/gpu/command_buffer/service/context_state.cc247
-rw-r--r--chromium/gpu/command_buffer/service/context_state.h72
-rw-r--r--chromium/gpu/command_buffer/service/context_state_autogen.h79
-rw-r--r--chromium/gpu/command_buffer/service/context_state_impl_autogen.h288
-rw-r--r--chromium/gpu/command_buffer/service/error_state.cc38
-rw-r--r--chromium/gpu/command_buffer/service/error_state.h35
-rw-r--r--chromium/gpu/command_buffer/service/error_state_mock.h11
-rw-r--r--chromium/gpu/command_buffer/service/feature_info.cc211
-rw-r--r--chromium/gpu/command_buffer/service/feature_info.h15
-rw-r--r--chromium/gpu/command_buffer/service/feature_info_unittest.cc96
-rw-r--r--chromium/gpu/command_buffer/service/framebuffer_manager.cc76
-rw-r--r--chromium/gpu/command_buffer/service/framebuffer_manager.h17
-rw-r--r--chromium/gpu/command_buffer/service/framebuffer_manager_unittest.cc319
-rw-r--r--chromium/gpu/command_buffer/service/gl_state_restorer_impl.cc19
-rw-r--r--chromium/gpu/command_buffer/service/gl_state_restorer_impl.h5
-rw-r--r--chromium/gpu/command_buffer/service/gl_surface_mock.h2
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc472
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h30
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder.cc1832
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder.h31
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h1598
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_mock.h21
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc8720
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest.h80
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h53
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc30
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h1078
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2.cc429
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h1418
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3.cc6
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h63
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_async_pixel.cc388
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc485
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc605
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h161
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc428
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc2284
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc2331
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc1046
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc2831
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_validation_autogen.h8
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h797
-rw-r--r--chromium/gpu/command_buffer/service/gpu_control_service.cc101
-rw-r--r--chromium/gpu/command_buffer/service/gpu_control_service.h47
-rw-r--r--chromium/gpu/command_buffer/service/gpu_memory_buffer_manager.h4
-rw-r--r--chromium/gpu/command_buffer/service/gpu_scheduler.cc19
-rw-r--r--chromium/gpu/command_buffer/service/gpu_scheduler.h8
-rw-r--r--chromium/gpu/command_buffer/service/gpu_scheduler_unittest.cc31
-rw-r--r--chromium/gpu/command_buffer/service/gpu_service_test.cc50
-rw-r--r--chromium/gpu/command_buffer/service/gpu_service_test.h42
-rw-r--r--chromium/gpu/command_buffer/service/gpu_switches.cc10
-rw-r--r--chromium/gpu/command_buffer/service/gpu_switches.h2
-rw-r--r--chromium/gpu/command_buffer/service/gpu_tracer.cc373
-rw-r--r--chromium/gpu/command_buffer/service/gpu_tracer.h118
-rw-r--r--chromium/gpu/command_buffer/service/gpu_tracer_unittest.cc209
-rw-r--r--chromium/gpu/command_buffer/service/image_manager.cc11
-rw-r--r--chromium/gpu/command_buffer/service/image_manager.h4
-rw-r--r--chromium/gpu/command_buffer/service/in_process_command_buffer.cc557
-rw-r--r--chromium/gpu/command_buffer/service/in_process_command_buffer.h106
-rw-r--r--chromium/gpu/command_buffer/service/mailbox_manager.cc90
-rw-r--r--chromium/gpu/command_buffer/service/mailbox_manager.h64
-rw-r--r--chromium/gpu/command_buffer/service/mailbox_manager_unittest.cc401
-rw-r--r--chromium/gpu/command_buffer/service/mailbox_synchronizer.cc226
-rw-r--r--chromium/gpu/command_buffer/service/mailbox_synchronizer.h96
-rw-r--r--chromium/gpu/command_buffer/service/memory_program_cache_unittest.cc14
-rw-r--r--chromium/gpu/command_buffer/service/mocks.h2
-rw-r--r--chromium/gpu/command_buffer/service/program_cache.cc2
-rw-r--r--chromium/gpu/command_buffer/service/program_manager.cc134
-rw-r--r--chromium/gpu/command_buffer/service/program_manager.h24
-rw-r--r--chromium/gpu/command_buffer/service/program_manager_unittest.cc74
-rw-r--r--chromium/gpu/command_buffer/service/query_manager.cc156
-rw-r--r--chromium/gpu/command_buffer/service/query_manager.h28
-rw-r--r--chromium/gpu/command_buffer/service/query_manager_unittest.cc63
-rw-r--r--chromium/gpu/command_buffer/service/renderbuffer_manager_unittest.cc11
-rw-r--r--chromium/gpu/command_buffer/service/safe_shared_memory_pool.cc149
-rw-r--r--chromium/gpu/command_buffer/service/safe_shared_memory_pool.h82
-rw-r--r--chromium/gpu/command_buffer/service/shader_manager_unittest.cc15
-rw-r--r--chromium/gpu/command_buffer/service/shader_translator.cc75
-rw-r--r--chromium/gpu/command_buffer/service/shader_translator.h6
-rw-r--r--chromium/gpu/command_buffer/service/shader_translator_cache.cc5
-rw-r--r--chromium/gpu/command_buffer/service/shader_translator_cache.h17
-rw-r--r--chromium/gpu/command_buffer/service/shader_translator_unittest.cc11
-rw-r--r--chromium/gpu/command_buffer/service/stream_texture.h32
-rw-r--r--chromium/gpu/command_buffer/service/stream_texture_manager.h36
-rw-r--r--chromium/gpu/command_buffer/service/stream_texture_manager_in_process_android.cc141
-rw-r--r--chromium/gpu/command_buffer/service/stream_texture_manager_in_process_android.h55
-rw-r--r--chromium/gpu/command_buffer/service/stream_texture_manager_mock.cc15
-rw-r--r--chromium/gpu/command_buffer/service/stream_texture_manager_mock.h32
-rw-r--r--chromium/gpu/command_buffer/service/stream_texture_mock.cc15
-rw-r--r--chromium/gpu/command_buffer/service/stream_texture_mock.h28
-rw-r--r--chromium/gpu/command_buffer/service/test_helper.cc139
-rw-r--r--chromium/gpu/command_buffer/service/test_helper.h25
-rw-r--r--chromium/gpu/command_buffer/service/texture_definition.cc456
-rw-r--r--chromium/gpu/command_buffer/service/texture_definition.h127
-rw-r--r--chromium/gpu/command_buffer/service/texture_manager.cc308
-rw-r--r--chromium/gpu/command_buffer/service/texture_manager.h100
-rw-r--r--chromium/gpu/command_buffer/service/texture_manager_unittest.cc276
-rw-r--r--chromium/gpu/command_buffer/service/transfer_buffer_manager.cc47
-rw-r--r--chromium/gpu/command_buffer/service/transfer_buffer_manager.h14
-rw-r--r--chromium/gpu/command_buffer/service/transfer_buffer_manager_unittest.cc104
-rw-r--r--chromium/gpu/command_buffer/service/vertex_array_manager.cc20
-rw-r--r--chromium/gpu/command_buffer/service/vertex_array_manager.h10
-rw-r--r--chromium/gpu/command_buffer/service/vertex_array_manager_unittest.cc23
-rw-r--r--chromium/gpu/command_buffer/service/vertex_attrib_manager.cc5
-rw-r--r--chromium/gpu/command_buffer/service/vertex_attrib_manager.h2
-rw-r--r--chromium/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc16
-rw-r--r--chromium/gpu/command_buffer_client.gypi1
-rw-r--r--chromium/gpu/command_buffer_common.gypi13
-rw-r--r--chromium/gpu/command_buffer_service.gypi30
-rw-r--r--chromium/gpu/config/BUILD.gn74
-rw-r--r--chromium/gpu/config/gpu_blacklist.cc18
-rw-r--r--chromium/gpu/config/gpu_blacklist_unittest.cc35
-rw-r--r--chromium/gpu/config/gpu_control_list.cc415
-rw-r--r--chromium/gpu/config/gpu_control_list.h75
-rw-r--r--chromium/gpu/config/gpu_control_list_entry_unittest.cc558
-rw-r--r--chromium/gpu/config/gpu_control_list_format.txt51
-rw-r--r--chromium/gpu/config/gpu_control_list_machine_model_info_unittest.cc57
-rw-r--r--chromium/gpu/config/gpu_control_list_number_info_unittest.cc14
-rw-r--r--chromium/gpu/config/gpu_control_list_os_info_unittest.cc40
-rw-r--r--chromium/gpu/config/gpu_control_list_unittest.cc97
-rw-r--r--chromium/gpu/config/gpu_driver_bug_list.cc64
-rw-r--r--chromium/gpu/config/gpu_driver_bug_list.h8
-rw-r--r--chromium/gpu/config/gpu_driver_bug_list_json.cc525
-rw-r--r--chromium/gpu/config/gpu_driver_bug_list_unittest.cc85
-rw-r--r--chromium/gpu/config/gpu_driver_bug_workaround_type.h26
-rw-r--r--chromium/gpu/config/gpu_dx_diagnostics_win.cc6
-rw-r--r--chromium/gpu/config/gpu_feature_type.h9
-rw-r--r--chromium/gpu/config/gpu_info.cc15
-rw-r--r--chromium/gpu/config/gpu_info.h34
-rw-r--r--chromium/gpu/config/gpu_info_collector.cc29
-rw-r--r--chromium/gpu/config/gpu_info_collector.h37
-rw-r--r--chromium/gpu/config/gpu_info_collector_android.cc38
-rw-r--r--chromium/gpu/config/gpu_info_collector_mac.mm66
-rw-r--r--chromium/gpu/config/gpu_info_collector_ozone.cc67
-rw-r--r--chromium/gpu/config/gpu_info_collector_unittest.cc108
-rw-r--r--chromium/gpu/config/gpu_info_collector_win.cc81
-rw-r--r--chromium/gpu/config/gpu_info_collector_x11.cc113
-rw-r--r--chromium/gpu/config/gpu_info_unittest.cc1
-rw-r--r--chromium/gpu/config/gpu_test_config.cc18
-rw-r--r--chromium/gpu/config/gpu_test_config.h9
-rw-r--r--chromium/gpu/config/gpu_test_expectations_parser.cc5
-rw-r--r--chromium/gpu/config/gpu_test_expectations_parser_unittest.cc2
-rw-r--r--chromium/gpu/config/gpu_util.cc2
-rw-r--r--chromium/gpu/config/gpu_util.h7
-rw-r--r--chromium/gpu/config/software_rendering_list_json.cc422
-rw-r--r--chromium/gpu/gles2_conform_support/egl/display.cc69
-rw-r--r--chromium/gpu/gles2_conform_support/egl/display.h23
-rw-r--r--chromium/gpu/gles2_conform_support/gles2_conform_support.gyp23
-rw-r--r--chromium/gpu/gles2_conform_support/gles2_conform_test.gyp14
-rw-r--r--chromium/gpu/gles2_conform_support/gles2_conform_test_expectations.txt15
-rw-r--r--chromium/gpu/gles2_conform_support/native/egl_native_gtk.cc63
-rw-r--r--chromium/gpu/gles2_conform_support/native/main.cc8
-rw-r--r--chromium/gpu/gpu.gyp121
-rw-r--r--chromium/gpu/gpu_common.gypi20
-rw-r--r--chromium/gpu/gpu_config.gypi4
-rw-r--r--chromium/gpu/gpu_nacl.gyp121
-rw-r--r--chromium/gpu/gpu_untrusted.gyp121
-rw-r--r--chromium/gpu/ipc/BUILD.gn17
-rw-r--r--chromium/gpu/ipc/gpu_command_buffer_traits.cc22
-rw-r--r--chromium/gpu/ipc/gpu_command_buffer_traits.h9
-rw-r--r--chromium/gpu/skia_bindings/BUILD.gn14
-rw-r--r--chromium/gpu/skia_bindings/gl_bindings_skia_cmd_buffer.cc227
-rw-r--r--chromium/gpu/tools/compositor_model_bench/compositor_model_bench.cc7
-rw-r--r--chromium/gpu/tools/compositor_model_bench/render_tree.cc135
-rw-r--r--chromium/gpu/tools/tools.gyp3
-rw-r--r--chromium/ios/ios_tests.gyp24
-rw-r--r--chromium/ios/provider/ios_components.gyp20
-rw-r--r--chromium/ipc/BUILD.gn178
-rw-r--r--chromium/ipc/OWNERS1
-rw-r--r--chromium/ipc/ipc.gyp38
-rw-r--r--chromium/ipc/ipc.gypi5
-rw-r--r--chromium/ipc/ipc_channel.h114
-rw-r--r--chromium/ipc/ipc_channel_common.cc47
-rw-r--r--chromium/ipc/ipc_channel_factory.cc10
-rw-r--r--chromium/ipc/ipc_channel_nacl.cc91
-rw-r--r--chromium/ipc/ipc_channel_nacl.h21
-rw-r--r--chromium/ipc/ipc_channel_posix.cc158
-rw-r--r--chromium/ipc/ipc_channel_posix.h47
-rw-r--r--chromium/ipc/ipc_channel_posix_unittest.cc202
-rw-r--r--chromium/ipc/ipc_channel_proxy.cc155
-rw-r--r--chromium/ipc/ipc_channel_proxy.h69
-rw-r--r--chromium/ipc/ipc_channel_proxy_unittest.cc441
-rw-r--r--chromium/ipc/ipc_channel_proxy_unittest_messages.h44
-rw-r--r--chromium/ipc/ipc_channel_reader.cc7
-rw-r--r--chromium/ipc/ipc_channel_unittest.cc12
-rw-r--r--chromium/ipc/ipc_channel_win.cc82
-rw-r--r--chromium/ipc/ipc_channel_win.h33
-rw-r--r--chromium/ipc/ipc_forwarding_message_filter.cc1
-rw-r--r--chromium/ipc/ipc_forwarding_message_filter.h7
-rw-r--r--chromium/ipc/ipc_fuzzing_tests.cc75
-rw-r--r--chromium/ipc/ipc_listener.h3
-rw-r--r--chromium/ipc/ipc_message.cc17
-rw-r--r--chromium/ipc/ipc_message.h48
-rw-r--r--chromium/ipc/ipc_message_macros.h160
-rw-r--r--chromium/ipc/ipc_message_start.h17
-rw-r--r--chromium/ipc/ipc_message_unittest.cc79
-rw-r--r--chromium/ipc/ipc_message_utils.cc18
-rw-r--r--chromium/ipc/ipc_message_utils.h79
-rw-r--r--chromium/ipc/ipc_multiprocess_test.cc7
-rw-r--r--chromium/ipc/ipc_nacl.gyp35
-rw-r--r--chromium/ipc/ipc_perftests.cc24
-rw-r--r--chromium/ipc/ipc_platform_file.cc5
-rw-r--r--chromium/ipc/ipc_platform_file.h19
-rw-r--r--chromium/ipc/ipc_send_fds_test.cc19
-rw-r--r--chromium/ipc/ipc_switches.cc5
-rw-r--r--chromium/ipc/ipc_switches.h1
-rw-r--r--chromium/ipc/ipc_sync_channel.cc50
-rw-r--r--chromium/ipc/ipc_sync_channel.h35
-rw-r--r--chromium/ipc/ipc_sync_channel_unittest.cc209
-rw-r--r--chromium/ipc/ipc_sync_message_filter.cc15
-rw-r--r--chromium/ipc/ipc_sync_message_filter.h12
-rw-r--r--chromium/ipc/ipc_test_base.cc26
-rw-r--r--chromium/ipc/ipc_test_sink.cc29
-rw-r--r--chromium/ipc/ipc_test_sink.h8
-rw-r--r--chromium/ipc/ipc_untrusted.gyp35
-rw-r--r--chromium/ipc/message_filter.cc35
-rw-r--r--chromium/ipc/message_filter.h67
-rw-r--r--chromium/ipc/message_filter_router.cc92
-rw-r--r--chromium/ipc/message_filter_router.h42
-rw-r--r--chromium/ipc/sync_socket_unittest.cc10
-rw-r--r--chromium/ipc/unix_domain_socket_util.cc43
-rw-r--r--chromium/jingle/OWNERS2
-rw-r--r--chromium/jingle/PRESUBMIT.py14
-rw-r--r--chromium/jingle/glue/channel_socket_adapter.cc17
-rw-r--r--chromium/jingle/glue/channel_socket_adapter.h4
-rw-r--r--chromium/jingle/glue/channel_socket_adapter_unittest.cc8
-rw-r--r--chromium/jingle/glue/fake_socket_factory.cc6
-rw-r--r--chromium/jingle/glue/fake_socket_factory.h4
-rw-r--r--chromium/jingle/glue/fake_ssl_client_socket.cc4
-rw-r--r--chromium/jingle/glue/fake_ssl_client_socket.h4
-rw-r--r--chromium/jingle/glue/fake_ssl_client_socket_unittest.cc4
-rw-r--r--chromium/jingle/glue/proxy_resolving_client_socket.cc25
-rw-r--r--chromium/jingle/glue/proxy_resolving_client_socket.h4
-rw-r--r--chromium/jingle/glue/pseudotcp_adapter.cc8
-rw-r--r--chromium/jingle/glue/pseudotcp_adapter.h4
-rw-r--r--chromium/jingle/glue/pseudotcp_adapter_unittest.cc8
-rw-r--r--chromium/jingle/jingle.gyp32
-rw-r--r--chromium/jingle/jingle.gypi29
-rw-r--r--chromium/jingle/jingle_nacl.gyp43
-rw-r--r--chromium/jingle/notifier/listener/notification_defines_unittest.cc2
-rw-r--r--chromium/media/DEPS3
-rw-r--r--chromium/media/OWNERS1
-rw-r--r--chromium/media/PRESUBMIT.py109
-rw-r--r--chromium/media/PRESUBMIT_test.py150
-rw-r--r--chromium/media/audio/agc_audio_stream.h4
-rw-r--r--chromium/media/audio/alsa/alsa_input.cc20
-rw-r--r--chromium/media/audio/alsa/alsa_input.h5
-rw-r--r--chromium/media/audio/alsa/alsa_output.cc11
-rw-r--r--chromium/media/audio/alsa/alsa_output.h9
-rw-r--r--chromium/media/audio/alsa/alsa_output_unittest.cc21
-rw-r--r--chromium/media/audio/alsa/audio_manager_alsa.cc16
-rw-r--r--chromium/media/audio/alsa/audio_manager_alsa.h3
-rw-r--r--chromium/media/audio/android/audio_android_unittest.cc533
-rw-r--r--chromium/media/audio/android/audio_manager_android.cc209
-rw-r--r--chromium/media/audio/android/audio_manager_android.h28
-rw-r--r--chromium/media/audio/android/audio_record_input.cc18
-rw-r--r--chromium/media/audio/android/audio_record_input.h4
-rw-r--r--chromium/media/audio/android/opensles_input.cc24
-rw-r--r--chromium/media/audio/android/opensles_input.h3
-rw-r--r--chromium/media/audio/android/opensles_output.cc11
-rw-r--r--chromium/media/audio/android/opensles_output.h7
-rw-r--r--chromium/media/audio/audio_input_controller.cc260
-rw-r--r--chromium/media/audio/audio_input_controller.h99
-rw-r--r--chromium/media/audio/audio_input_controller_unittest.cc33
-rw-r--r--chromium/media/audio/audio_input_device.cc61
-rw-r--r--chromium/media/audio/audio_input_device.h9
-rw-r--r--chromium/media/audio/audio_input_ipc.h3
-rw-r--r--chromium/media/audio/audio_input_unittest.cc252
-rw-r--r--chromium/media/audio/audio_io.h23
-rw-r--r--chromium/media/audio/audio_logging.h8
-rw-r--r--chromium/media/audio/audio_low_latency_input_output_unittest.cc31
-rw-r--r--chromium/media/audio/audio_manager.h38
-rw-r--r--chromium/media/audio/audio_manager_base.cc112
-rw-r--r--chromium/media/audio/audio_manager_base.h31
-rw-r--r--chromium/media/audio/audio_manager_unittest.cc45
-rw-r--r--chromium/media/audio/audio_output_controller.cc94
-rw-r--r--chromium/media/audio/audio_output_controller.h53
-rw-r--r--chromium/media/audio/audio_output_controller_unittest.cc20
-rw-r--r--chromium/media/audio/audio_output_device.cc64
-rw-r--r--chromium/media/audio/audio_output_device.h15
-rw-r--r--chromium/media/audio/audio_output_device_unittest.cc41
-rw-r--r--chromium/media/audio/audio_output_dispatcher.cc16
-rw-r--r--chromium/media/audio/audio_output_dispatcher.h20
-rw-r--r--chromium/media/audio/audio_output_dispatcher_impl.cc45
-rw-r--r--chromium/media/audio/audio_output_dispatcher_impl.h4
-rw-r--r--chromium/media/audio/audio_output_ipc.h3
-rw-r--r--chromium/media/audio/audio_output_proxy_unittest.cc136
-rw-r--r--chromium/media/audio/audio_output_resampler.cc106
-rw-r--r--chromium/media/audio/audio_output_resampler.h3
-rw-r--r--chromium/media/audio/audio_parameters.cc2
-rw-r--r--chromium/media/audio/audio_parameters.h4
-rw-r--r--chromium/media/audio/audio_parameters_unittest.cc38
-rw-r--r--chromium/media/audio/clockless_audio_sink.cc16
-rw-r--r--chromium/media/audio/clockless_audio_sink.h2
-rw-r--r--chromium/media/audio/cras/audio_manager_cras.cc47
-rw-r--r--chromium/media/audio/cras/audio_manager_cras.h7
-rw-r--r--chromium/media/audio/cras/cras_input.cc23
-rw-r--r--chromium/media/audio/cras/cras_input.h8
-rw-r--r--chromium/media/audio/cras/cras_input_unittest.cc29
-rw-r--r--chromium/media/audio/cras/cras_unified.cc11
-rw-r--r--chromium/media/audio/cras/cras_unified.h10
-rw-r--r--chromium/media/audio/cras/cras_unified_unittest.cc29
-rw-r--r--chromium/media/audio/fake_audio_consumer.cc29
-rw-r--r--chromium/media/audio/fake_audio_consumer.h13
-rw-r--r--chromium/media/audio/fake_audio_input_stream.cc72
-rw-r--r--chromium/media/audio/fake_audio_input_stream.h3
-rw-r--r--chromium/media/audio/fake_audio_log_factory.cc3
-rw-r--r--chromium/media/audio/fake_audio_manager.cc3
-rw-r--r--chromium/media/audio/fake_audio_manager.h3
-rw-r--r--chromium/media/audio/fake_audio_output_stream.cc14
-rw-r--r--chromium/media/audio/linux/audio_manager_linux.cc8
-rw-r--r--chromium/media/audio/mac/aggregate_device_manager.cc371
-rw-r--r--chromium/media/audio/mac/aggregate_device_manager.h58
-rw-r--r--chromium/media/audio/mac/audio_auhal_mac.cc215
-rw-r--r--chromium/media/audio/mac/audio_auhal_mac.h21
-rw-r--r--chromium/media/audio/mac/audio_auhal_mac_unittest.cc231
-rw-r--r--chromium/media/audio/mac/audio_device_listener_mac.cc1
-rw-r--r--chromium/media/audio/mac/audio_device_listener_mac_unittest.cc13
-rw-r--r--chromium/media/audio/mac/audio_input_mac.cc44
-rw-r--r--chromium/media/audio/mac/audio_input_mac.h12
-rw-r--r--chromium/media/audio/mac/audio_low_latency_input_mac.cc88
-rw-r--r--chromium/media/audio/mac/audio_low_latency_input_mac.h10
-rw-r--r--chromium/media/audio/mac/audio_low_latency_input_mac_unittest.cc83
-rw-r--r--chromium/media/audio/mac/audio_low_latency_output_mac.cc416
-rw-r--r--chromium/media/audio/mac/audio_low_latency_output_mac.h115
-rw-r--r--chromium/media/audio/mac/audio_manager_mac.cc402
-rw-r--r--chromium/media/audio/mac/audio_manager_mac.h39
-rw-r--r--chromium/media/audio/mac/audio_synchronized_mac.cc976
-rw-r--r--chromium/media/audio/mac/audio_synchronized_mac.h216
-rw-r--r--chromium/media/audio/mac/audio_unified_mac.cc397
-rw-r--r--chromium/media/audio/mac/audio_unified_mac.h100
-rw-r--r--chromium/media/audio/mock_audio_manager.cc32
-rw-r--r--chromium/media/audio/mock_audio_manager.h18
-rw-r--r--chromium/media/audio/mock_audio_source_callback.cc12
-rw-r--r--chromium/media/audio/mock_audio_source_callback.h28
-rw-r--r--chromium/media/audio/null_audio_sink.cc18
-rw-r--r--chromium/media/audio/null_audio_sink.h6
-rw-r--r--chromium/media/audio/openbsd/audio_manager_openbsd.cc9
-rw-r--r--chromium/media/audio/openbsd/audio_manager_openbsd.h3
-rw-r--r--chromium/media/audio/pulse/audio_manager_pulse.cc53
-rw-r--r--chromium/media/audio/pulse/audio_manager_pulse.h5
-rw-r--r--chromium/media/audio/pulse/pulse.sigs12
-rw-r--r--chromium/media/audio/pulse/pulse_input.cc13
-rw-r--r--chromium/media/audio/pulse/pulse_input.h2
-rw-r--r--chromium/media/audio/pulse/pulse_output.cc20
-rw-r--r--chromium/media/audio/pulse/pulse_output.h9
-rw-r--r--chromium/media/audio/pulse/pulse_unified.cc292
-rw-r--r--chromium/media/audio/pulse/pulse_unified.h90
-rw-r--r--chromium/media/audio/pulse/pulse_util.cc13
-rw-r--r--chromium/media/audio/pulse/pulse_util.h1
-rw-r--r--chromium/media/audio/sample_rates.cc51
-rw-r--r--chromium/media/audio/sample_rates.h7
-rw-r--r--chromium/media/audio/scoped_loop_observer.cc47
-rw-r--r--chromium/media/audio/scoped_loop_observer.h50
-rw-r--r--chromium/media/audio/scoped_task_runner_observer.cc48
-rw-r--r--chromium/media/audio/scoped_task_runner_observer.h52
-rw-r--r--chromium/media/audio/simple_sources.cc6
-rw-r--r--chromium/media/audio/simple_sources.h3
-rw-r--r--chromium/media/audio/sounds/audio_stream_handler.cc127
-rw-r--r--chromium/media/audio/sounds/audio_stream_handler.h10
-rw-r--r--chromium/media/audio/sounds/audio_stream_handler_unittest.cc8
-rw-r--r--chromium/media/audio/sounds/sounds_manager.cc71
-rw-r--r--chromium/media/audio/sounds/sounds_manager.h4
-rw-r--r--chromium/media/audio/sounds/sounds_manager_unittest.cc2
-rw-r--r--chromium/media/audio/sounds/wav_audio_handler.cc34
-rw-r--r--chromium/media/audio/sounds/wav_audio_handler.h14
-rw-r--r--chromium/media/audio/sounds/wav_audio_handler_unittest.cc20
-rw-r--r--chromium/media/audio/test_audio_input_controller_factory.cc4
-rw-r--r--chromium/media/audio/virtual_audio_input_stream.cc28
-rw-r--r--chromium/media/audio/virtual_audio_input_stream.h12
-rw-r--r--chromium/media/audio/virtual_audio_input_stream_unittest.cc52
-rw-r--r--chromium/media/audio/virtual_audio_output_stream_unittest.cc30
-rw-r--r--chromium/media/audio/win/audio_device_listener_win.cc69
-rw-r--r--chromium/media/audio/win/audio_device_listener_win.h3
-rw-r--r--chromium/media/audio/win/audio_device_listener_win_unittest.cc2
-rw-r--r--chromium/media/audio/win/audio_low_latency_input_win.cc150
-rw-r--r--chromium/media/audio/win/audio_low_latency_input_win.h27
-rw-r--r--chromium/media/audio/win/audio_low_latency_input_win_unittest.cc149
-rw-r--r--chromium/media/audio/win/audio_low_latency_output_win.cc60
-rw-r--r--chromium/media/audio/win/audio_low_latency_output_win.h5
-rw-r--r--chromium/media/audio/win/audio_low_latency_output_win_unittest.cc41
-rw-r--r--chromium/media/audio/win/audio_manager_win.cc127
-rw-r--r--chromium/media/audio/win/audio_manager_win.h15
-rw-r--r--chromium/media/audio/win/audio_output_win_unittest.cc79
-rw-r--r--chromium/media/audio/win/audio_unified_win.cc984
-rw-r--r--chromium/media/audio/win/audio_unified_win.h352
-rw-r--r--chromium/media/audio/win/audio_unified_win_unittest.cc366
-rw-r--r--chromium/media/audio/win/core_audio_util_win.cc47
-rw-r--r--chromium/media/audio/win/core_audio_util_win.h4
-rw-r--r--chromium/media/audio/win/core_audio_util_win_unittest.cc2
-rw-r--r--chromium/media/audio/win/device_enumeration_win.cc11
-rw-r--r--chromium/media/audio/win/wavein_input_win.cc21
-rw-r--r--chromium/media/audio/win/wavein_input_win.h5
-rw-r--r--chromium/media/base/android/OWNERS6
-rw-r--r--chromium/media/base/android/audio_decoder_job.cc130
-rw-r--r--chromium/media/base/android/audio_decoder_job.h56
-rw-r--r--chromium/media/base/android/browser_cdm_factory_android.cc53
-rw-r--r--chromium/media/base/android/demuxer_android.h12
-rw-r--r--chromium/media/base/android/demuxer_stream_player_params.cc3
-rw-r--r--chromium/media/base/android/demuxer_stream_player_params.h15
-rw-r--r--chromium/media/base/android/media_codec_bridge.cc57
-rw-r--r--chromium/media/base/android/media_codec_bridge.h27
-rw-r--r--chromium/media/base/android/media_decoder_job.cc447
-rw-r--r--chromium/media/base/android/media_decoder_job.h245
-rw-r--r--chromium/media/base/android/media_drm_bridge.cc354
-rw-r--r--chromium/media/base/android/media_drm_bridge.h105
-rw-r--r--chromium/media/base/android/media_drm_bridge_unittest.cc96
-rw-r--r--chromium/media/base/android/media_player_android.cc26
-rw-r--r--chromium/media/base/android/media_player_android.h34
-rw-r--r--chromium/media/base/android/media_player_bridge.cc94
-rw-r--r--chromium/media/base/android/media_player_bridge.h30
-rw-r--r--chromium/media/base/android/media_player_listener.cc22
-rw-r--r--chromium/media/base/android/media_player_listener.h8
-rw-r--r--chromium/media/base/android/media_player_manager.h57
-rw-r--r--chromium/media/base/android/media_resource_getter.h5
-rw-r--r--chromium/media/base/android/media_source_player.cc629
-rw-r--r--chromium/media/base/android/media_source_player.h127
-rw-r--r--chromium/media/base/android/media_source_player_unittest.cc1338
-rw-r--r--chromium/media/base/android/video_decoder_job.cc139
-rw-r--r--chromium/media/base/android/video_decoder_job.h75
-rw-r--r--chromium/media/base/audio_buffer.cc143
-rw-r--r--chromium/media/base/audio_buffer.h40
-rw-r--r--chromium/media/base/audio_buffer_converter.cc249
-rw-r--r--chromium/media/base/audio_buffer_converter.h108
-rw-r--r--chromium/media/base/audio_buffer_converter_unittest.cc255
-rw-r--r--chromium/media/base/audio_buffer_queue_unittest.cc409
-rw-r--r--chromium/media/base/audio_buffer_unittest.cc526
-rw-r--r--chromium/media/base/audio_bus.cc11
-rw-r--r--chromium/media/base/audio_bus.h11
-rw-r--r--chromium/media/base/audio_bus_unittest.cc4
-rw-r--r--chromium/media/base/audio_capturer_source.h2
-rw-r--r--chromium/media/base/audio_converter.cc82
-rw-r--r--chromium/media/base/audio_converter.h15
-rw-r--r--chromium/media/base/audio_converter_unittest.cc7
-rw-r--r--chromium/media/base/audio_decoder.cc2
-rw-r--r--chromium/media/base/audio_decoder.h67
-rw-r--r--chromium/media/base/audio_decoder_config.cc36
-rw-r--r--chromium/media/base/audio_decoder_config.h54
-rw-r--r--chromium/media/base/audio_discard_helper.cc199
-rw-r--r--chromium/media/base/audio_discard_helper.h81
-rw-r--r--chromium/media/base/audio_discard_helper_unittest.cc481
-rw-r--r--chromium/media/base/audio_fifo.cc15
-rw-r--r--chromium/media/base/audio_fifo.h8
-rw-r--r--chromium/media/base/audio_hardware_config.cc56
-rw-r--r--chromium/media/base/audio_hardware_config.h4
-rw-r--r--chromium/media/base/audio_hardware_config_unittest.cc39
-rw-r--r--chromium/media/base/audio_renderer.h17
-rw-r--r--chromium/media/base/audio_renderer_mixer.cc51
-rw-r--r--chromium/media/base/audio_renderer_mixer.h21
-rw-r--r--chromium/media/base/audio_renderer_mixer_input.cc33
-rw-r--r--chromium/media/base/audio_renderer_mixer_input.h2
-rw-r--r--chromium/media/base/audio_renderer_mixer_input_unittest.cc10
-rw-r--r--chromium/media/base/audio_renderer_mixer_unittest.cc20
-rw-r--r--chromium/media/base/audio_renderer_sink.h5
-rw-r--r--chromium/media/base/audio_splicer.cc441
-rw-r--r--chromium/media/base/audio_splicer.h108
-rw-r--r--chromium/media/base/audio_splicer_unittest.cc607
-rw-r--r--chromium/media/base/audio_timestamp_helper.h3
-rw-r--r--chromium/media/base/audio_video_metadata_extractor.cc260
-rw-r--r--chromium/media/base/audio_video_metadata_extractor.h106
-rw-r--r--chromium/media/base/audio_video_metadata_extractor_unittest.cc208
-rw-r--r--chromium/media/base/bind_to_current_loop.h162
-rw-r--r--chromium/media/base/bind_to_current_loop.h.pump86
-rw-r--r--chromium/media/base/bind_to_current_loop_unittest.cc168
-rw-r--r--chromium/media/base/bind_to_loop.h168
-rw-r--r--chromium/media/base/bind_to_loop.h.pump96
-rw-r--r--chromium/media/base/bind_to_loop_unittest.cc169
-rw-r--r--chromium/media/base/bit_reader.cc83
-rw-r--r--chromium/media/base/bit_reader.h77
-rw-r--r--chromium/media/base/bit_reader_core.cc159
-rw-r--r--chromium/media/base/bit_reader_core.h118
-rw-r--r--chromium/media/base/bit_reader_unittest.cc21
-rw-r--r--chromium/media/base/browser_cdm.cc15
-rw-r--r--chromium/media/base/browser_cdm.h63
-rw-r--r--chromium/media/base/browser_cdm_factory.h29
-rw-r--r--chromium/media/base/buffering_state.h26
-rw-r--r--chromium/media/base/buffers.h2
-rw-r--r--chromium/media/base/callback_holder.h2
-rw-r--r--chromium/media/base/cdm_promise.cc74
-rw-r--r--chromium/media/base/cdm_promise.h87
-rw-r--r--chromium/media/base/channel_layout.cc14
-rw-r--r--chromium/media/base/channel_layout.h12
-rw-r--r--chromium/media/base/channel_mixer.cc5
-rw-r--r--chromium/media/base/channel_mixer_unittest.cc8
-rw-r--r--chromium/media/base/clock.cc24
-rw-r--r--chromium/media/base/clock.h7
-rw-r--r--chromium/media/base/container_names.h2
-rw-r--r--chromium/media/base/data_source.cc12
-rw-r--r--chromium/media/base/data_source.h25
-rw-r--r--chromium/media/base/decoder_buffer.cc10
-rw-r--r--chromium/media/base/decoder_buffer.h41
-rw-r--r--chromium/media/base/decoder_buffer_queue.cc14
-rw-r--r--chromium/media/base/decoder_buffer_queue.h6
-rw-r--r--chromium/media/base/decoder_buffer_queue_unittest.cc31
-rw-r--r--chromium/media/base/decrypt_config.cc3
-rw-r--r--chromium/media/base/decrypt_config.h12
-rw-r--r--chromium/media/base/demuxer.h28
-rw-r--r--chromium/media/base/demuxer_perftest.cc6
-rw-r--r--chromium/media/base/demuxer_stream.h12
-rw-r--r--chromium/media/base/fake_text_track_stream.cc6
-rw-r--r--chromium/media/base/fake_text_track_stream.h3
-rw-r--r--chromium/media/base/media.cc5
-rw-r--r--chromium/media/base/media_file_checker.cc20
-rw-r--r--chromium/media/base/media_file_checker.h8
-rw-r--r--chromium/media/base/media_file_checker_unittest.cc17
-rw-r--r--chromium/media/base/media_keys.h80
-rw-r--r--chromium/media/base/media_log.cc19
-rw-r--r--chromium/media/base/media_log.h1
-rw-r--r--chromium/media/base/media_log_event.h4
-rw-r--r--chromium/media/base/media_switches.cc48
-rw-r--r--chromium/media/base/media_switches.h19
-rw-r--r--chromium/media/base/mock_data_source_host.cc13
-rw-r--r--chromium/media/base/mock_data_source_host.h32
-rw-r--r--chromium/media/base/mock_demuxer_host.h7
-rw-r--r--chromium/media/base/mock_filters.h36
-rw-r--r--chromium/media/base/multi_channel_resampler.cc5
-rw-r--r--chromium/media/base/multi_channel_resampler.h4
-rw-r--r--chromium/media/base/pipeline.cc527
-rw-r--r--chromium/media/base/pipeline.h185
-rw-r--r--chromium/media/base/pipeline_status.h3
-rw-r--r--chromium/media/base/pipeline_unittest.cc265
-rw-r--r--chromium/media/base/player_tracker.cc15
-rw-r--r--chromium/media/base/player_tracker.h41
-rw-r--r--chromium/media/base/run_all_perftests.cc51
-rw-r--r--chromium/media/base/run_all_unittests.cc4
-rw-r--r--chromium/media/base/sample_format.cc4
-rw-r--r--chromium/media/base/sample_format.h7
-rw-r--r--chromium/media/base/seekable_buffer_unittest.cc15
-rw-r--r--chromium/media/base/serial_runner.cc47
-rw-r--r--chromium/media/base/serial_runner.h9
-rw-r--r--chromium/media/base/serial_runner_unittest.cc52
-rw-r--r--chromium/media/base/simd/convert_rgb_to_yuv_unittest.cc9
-rw-r--r--chromium/media/base/simd/convert_yuv_to_rgb.h122
-rw-r--r--chromium/media/base/simd/convert_yuv_to_rgb_c.cc89
-rw-r--r--chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm3
-rw-r--r--chromium/media/base/simd/convert_yuv_to_rgb_mmx.inc60
-rw-r--r--chromium/media/base/simd/convert_yuv_to_rgb_sse.asm1
-rw-r--r--chromium/media/base/simd/convert_yuv_to_rgb_x86.cc16
-rw-r--r--chromium/media/base/simd/convert_yuva_to_argb_mmx.asm1
-rw-r--r--chromium/media/base/simd/convert_yuva_to_argb_mmx.inc110
-rw-r--r--chromium/media/base/simd/linear_scale_yuv_to_rgb_mmx.asm1
-rw-r--r--chromium/media/base/simd/linear_scale_yuv_to_rgb_mmx.inc45
-rw-r--r--chromium/media/base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm8
-rw-r--r--chromium/media/base/simd/scale_yuv_to_rgb_mmx.asm1
-rw-r--r--chromium/media/base/simd/scale_yuv_to_rgb_mmx.inc27
-rw-r--r--chromium/media/base/simd/scale_yuv_to_rgb_sse.asm1
-rw-r--r--chromium/media/base/simd/scale_yuv_to_rgb_sse2_x64.asm8
-rw-r--r--chromium/media/base/simd/sinc_resampler_sse.cc48
-rw-r--r--chromium/media/base/simd/vector_math_sse.cc118
-rw-r--r--chromium/media/base/simd/yuv_to_rgb_table.cc331
-rw-r--r--chromium/media/base/simd/yuv_to_rgb_table.h1
-rw-r--r--chromium/media/base/sinc_resampler.cc113
-rw-r--r--chromium/media/base/sinc_resampler.h18
-rw-r--r--chromium/media/base/sinc_resampler_perftest.cc4
-rw-r--r--chromium/media/base/sinc_resampler_unittest.cc5
-rw-r--r--chromium/media/base/stream_parser.cc124
-rw-r--r--chromium/media/base/stream_parser.h92
-rw-r--r--chromium/media/base/stream_parser_buffer.cc145
-rw-r--r--chromium/media/base/stream_parser_buffer.h66
-rw-r--r--chromium/media/base/stream_parser_unittest.cc382
-rw-r--r--chromium/media/base/test_data_util.cc16
-rw-r--r--chromium/media/base/test_helpers.cc136
-rw-r--r--chromium/media/base/test_helpers.h66
-rw-r--r--chromium/media/base/text_ranges.cc141
-rw-r--r--chromium/media/base/text_ranges.h95
-rw-r--r--chromium/media/base/text_ranges_unittest.cc147
-rw-r--r--chromium/media/base/text_renderer.cc62
-rw-r--r--chromium/media/base/text_renderer.h18
-rw-r--r--chromium/media/base/user_input_monitor_linux.cc6
-rw-r--r--chromium/media/base/user_input_monitor_unittest.cc4
-rw-r--r--chromium/media/base/user_input_monitor_win.cc13
-rw-r--r--chromium/media/base/vector_math.cc158
-rw-r--r--chromium/media/base/vector_math.h7
-rw-r--r--chromium/media/base/vector_math_perftest.cc39
-rw-r--r--chromium/media/base/vector_math_testing.h2
-rw-r--r--chromium/media/base/vector_math_unittest.cc24
-rw-r--r--chromium/media/base/video_decoder.cc10
-rw-r--r--chromium/media/base/video_decoder.h65
-rw-r--r--chromium/media/base/video_decoder_config.cc2
-rw-r--r--chromium/media/base/video_decoder_config.h1
-rw-r--r--chromium/media/base/video_frame.cc549
-rw-r--r--chromium/media/base/video_frame.h164
-rw-r--r--chromium/media/base/video_frame_pool.cc7
-rw-r--r--chromium/media/base/video_frame_pool_unittest.cc18
-rw-r--r--chromium/media/base/video_frame_unittest.cc153
-rw-r--r--chromium/media/base/video_renderer.h19
-rw-r--r--chromium/media/base/yuv_convert.cc71
-rw-r--r--chromium/media/base/yuv_convert.h13
-rw-r--r--chromium/media/base/yuv_convert_perftest.cc226
-rw-r--r--chromium/media/base/yuv_convert_unittest.cc104
-rw-r--r--chromium/media/cast/DEPS2
-rw-r--r--chromium/media/cast/OWNERS1
-rw-r--r--chromium/media/cast/README7
-rw-r--r--chromium/media/cast/audio_receiver/audio_decoder.cc161
-rw-r--r--chromium/media/cast/audio_receiver/audio_decoder.h71
-rw-r--r--chromium/media/cast/audio_receiver/audio_decoder_unittest.cc220
-rw-r--r--chromium/media/cast/audio_receiver/audio_receiver.cc490
-rw-r--r--chromium/media/cast/audio_receiver/audio_receiver.gypi29
-rw-r--r--chromium/media/cast/audio_receiver/audio_receiver.h143
-rw-r--r--chromium/media/cast/audio_receiver/audio_receiver_unittest.cc217
-rw-r--r--chromium/media/cast/audio_sender/audio_encoder.cc300
-rw-r--r--chromium/media/cast/audio_sender/audio_encoder.h34
-rw-r--r--chromium/media/cast/audio_sender/audio_encoder_unittest.cc246
-rw-r--r--chromium/media/cast/audio_sender/audio_sender.cc433
-rw-r--r--chromium/media/cast/audio_sender/audio_sender.gypi32
-rw-r--r--chromium/media/cast/audio_sender/audio_sender.h167
-rw-r--r--chromium/media/cast/audio_sender/audio_sender_unittest.cc137
-rw-r--r--chromium/media/cast/base/clock_drift_smoother.cc58
-rw-r--r--chromium/media/cast/base/clock_drift_smoother.h52
-rw-r--r--chromium/media/cast/cast.gyp315
-rw-r--r--chromium/media/cast/cast_config.cc69
-rw-r--r--chromium/media/cast/cast_config.h230
-rw-r--r--chromium/media/cast/cast_defines.h111
-rw-r--r--chromium/media/cast/cast_environment.cc112
-rw-r--r--chromium/media/cast/cast_environment.h68
-rw-r--r--chromium/media/cast/cast_receiver.gyp33
-rw-r--r--chromium/media/cast/cast_receiver.h100
-rw-r--r--chromium/media/cast/cast_receiver_impl.cc175
-rw-r--r--chromium/media/cast/cast_receiver_impl.h50
-rw-r--r--chromium/media/cast/cast_sender.gyp36
-rw-r--r--chromium/media/cast/cast_sender.h103
-rw-r--r--chromium/media/cast/cast_sender_impl.cc274
-rw-r--r--chromium/media/cast/cast_sender_impl.h57
-rw-r--r--chromium/media/cast/cast_testing.gypi276
-rw-r--r--chromium/media/cast/congestion_control/congestion_control.cc231
-rw-r--r--chromium/media/cast/congestion_control/congestion_control.gypi23
-rw-r--r--chromium/media/cast/congestion_control/congestion_control.h60
-rw-r--r--chromium/media/cast/congestion_control/congestion_control_unittest.cc234
-rw-r--r--chromium/media/cast/framer/cast_message_builder.cc90
-rw-r--r--chromium/media/cast/framer/cast_message_builder.h7
-rw-r--r--chromium/media/cast/framer/cast_message_builder_unittest.cc203
-rw-r--r--chromium/media/cast/framer/frame_buffer.cc70
-rw-r--r--chromium/media/cast/framer/frame_buffer.h10
-rw-r--r--chromium/media/cast/framer/frame_buffer_unittest.cc50
-rw-r--r--chromium/media/cast/framer/frame_id_map.cc129
-rw-r--r--chromium/media/cast/framer/frame_id_map.h15
-rw-r--r--chromium/media/cast/framer/framer.cc85
-rw-r--r--chromium/media/cast/framer/framer.gyp27
-rw-r--r--chromium/media/cast/framer/framer.h27
-rw-r--r--chromium/media/cast/framer/framer_unittest.cc419
-rw-r--r--chromium/media/cast/logging/encoding_event_subscriber.cc286
-rw-r--r--chromium/media/cast/logging/encoding_event_subscriber.h122
-rw-r--r--chromium/media/cast/logging/encoding_event_subscriber_unittest.cc668
-rw-r--r--chromium/media/cast/logging/log_deserializer.cc252
-rw-r--r--chromium/media/cast/logging/log_deserializer.h51
-rw-r--r--chromium/media/cast/logging/log_serializer.cc190
-rw-r--r--chromium/media/cast/logging/log_serializer.h37
-rw-r--r--chromium/media/cast/logging/logging_defines.cc110
-rw-r--r--chromium/media/cast/logging/logging_defines.h142
-rw-r--r--chromium/media/cast/logging/logging_impl.cc272
-rw-r--r--chromium/media/cast/logging/logging_impl.h89
-rw-r--r--chromium/media/cast/logging/logging_impl_unittest.cc234
-rw-r--r--chromium/media/cast/logging/logging_internal.cc79
-rw-r--r--chromium/media/cast/logging/logging_internal.h95
-rw-r--r--chromium/media/cast/logging/logging_raw.cc173
-rw-r--r--chromium/media/cast/logging/logging_raw.h94
-rw-r--r--chromium/media/cast/logging/logging_raw_unittest.cc196
-rw-r--r--chromium/media/cast/logging/logging_stats.cc150
-rw-r--r--chromium/media/cast/logging/logging_stats.h75
-rw-r--r--chromium/media/cast/logging/logging_unittest.cc248
-rw-r--r--chromium/media/cast/logging/proto/proto_utils.cc36
-rw-r--r--chromium/media/cast/logging/proto/proto_utils.h21
-rw-r--r--chromium/media/cast/logging/proto/raw_events.proto149
-rw-r--r--chromium/media/cast/logging/raw_event_subscriber.h32
-rw-r--r--chromium/media/cast/logging/raw_event_subscriber_bundle.cc99
-rw-r--r--chromium/media/cast/logging/raw_event_subscriber_bundle.h84
-rw-r--r--chromium/media/cast/logging/receiver_time_offset_estimator.h39
-rw-r--r--chromium/media/cast/logging/receiver_time_offset_estimator_impl.cc129
-rw-r--r--chromium/media/cast/logging/receiver_time_offset_estimator_impl.h64
-rw-r--r--chromium/media/cast/logging/receiver_time_offset_estimator_impl_unittest.cc242
-rw-r--r--chromium/media/cast/logging/serialize_deserialize_test.cc214
-rw-r--r--chromium/media/cast/logging/simple_event_subscriber.cc46
-rw-r--r--chromium/media/cast/logging/simple_event_subscriber.h52
-rw-r--r--chromium/media/cast/logging/simple_event_subscriber_unittest.cc87
-rw-r--r--chromium/media/cast/logging/stats_event_subscriber.cc400
-rw-r--r--chromium/media/cast/logging/stats_event_subscriber.h176
-rw-r--r--chromium/media/cast/logging/stats_event_subscriber_unittest.cc401
-rw-r--r--chromium/media/cast/net/cast_net_defines.h81
-rw-r--r--chromium/media/cast/net/frame_id_wrap_helper_test.cc48
-rw-r--r--chromium/media/cast/net/pacing/mock_paced_packet_sender.cc17
-rw-r--r--chromium/media/cast/net/pacing/mock_paced_packet_sender.h27
-rw-r--r--chromium/media/cast/net/pacing/paced_sender.cc148
-rw-r--r--chromium/media/cast/net/pacing/paced_sender.gyp22
-rw-r--r--chromium/media/cast/net/pacing/paced_sender.h83
-rw-r--r--chromium/media/cast/net/pacing/paced_sender_unittest.cc257
-rw-r--r--chromium/media/cast/net/rtp_sender/mock_rtp_sender.h34
-rw-r--r--chromium/media/cast/net/rtp_sender/packet_storage/packet_storage.cc174
-rw-r--r--chromium/media/cast/net/rtp_sender/packet_storage/packet_storage.gyp23
-rw-r--r--chromium/media/cast/net/rtp_sender/packet_storage/packet_storage.h55
-rw-r--r--chromium/media/cast/net/rtp_sender/packet_storage/packet_storage_unittest.cc110
-rw-r--r--chromium/media/cast/net/rtp_sender/rtp_packetizer/rtp_packetizer.cc153
-rw-r--r--chromium/media/cast/net/rtp_sender/rtp_packetizer/rtp_packetizer.gyp27
-rw-r--r--chromium/media/cast/net/rtp_sender/rtp_packetizer/rtp_packetizer.h73
-rw-r--r--chromium/media/cast/net/rtp_sender/rtp_packetizer/rtp_packetizer_config.cc21
-rw-r--r--chromium/media/cast/net/rtp_sender/rtp_packetizer/rtp_packetizer_config.h39
-rw-r--r--chromium/media/cast/net/rtp_sender/rtp_packetizer/rtp_packetizer_unittest.cc153
-rw-r--r--chromium/media/cast/net/rtp_sender/rtp_sender.cc145
-rw-r--r--chromium/media/cast/net/rtp_sender/rtp_sender.gyp26
-rw-r--r--chromium/media/cast/net/rtp_sender/rtp_sender.h66
-rw-r--r--chromium/media/cast/receiver/audio_decoder.cc246
-rw-r--r--chromium/media/cast/receiver/audio_decoder.h64
-rw-r--r--chromium/media/cast/receiver/audio_decoder_unittest.cc241
-rw-r--r--chromium/media/cast/receiver/cast_receiver_impl.cc232
-rw-r--r--chromium/media/cast/receiver/cast_receiver_impl.h122
-rw-r--r--chromium/media/cast/receiver/frame_receiver.cc326
-rw-r--r--chromium/media/cast/receiver/frame_receiver.h184
-rw-r--r--chromium/media/cast/receiver/frame_receiver_unittest.cc419
-rw-r--r--chromium/media/cast/receiver/video_decoder.cc259
-rw-r--r--chromium/media/cast/receiver/video_decoder.h63
-rw-r--r--chromium/media/cast/receiver/video_decoder_unittest.cc183
-rw-r--r--chromium/media/cast/rtcp/mock_rtcp_receiver_feedback.cc12
-rw-r--r--chromium/media/cast/rtcp/mock_rtcp_receiver_feedback.h6
-rw-r--r--chromium/media/cast/rtcp/mock_rtcp_sender_feedback.cc6
-rw-r--r--chromium/media/cast/rtcp/receiver_rtcp_event_subscriber.cc96
-rw-r--r--chromium/media/cast/rtcp/receiver_rtcp_event_subscriber.h79
-rw-r--r--chromium/media/cast/rtcp/receiver_rtcp_event_subscriber_unittest.cc131
-rw-r--r--chromium/media/cast/rtcp/rtcp.cc433
-rw-r--r--chromium/media/cast/rtcp/rtcp.gyp46
-rw-r--r--chromium/media/cast/rtcp/rtcp.h132
-rw-r--r--chromium/media/cast/rtcp/rtcp_defines.cc49
-rw-r--r--chromium/media/cast/rtcp/rtcp_defines.h118
-rw-r--r--chromium/media/cast/rtcp/rtcp_receiver.cc197
-rw-r--r--chromium/media/cast/rtcp/rtcp_receiver.h26
-rw-r--r--chromium/media/cast/rtcp/rtcp_receiver_unittest.cc256
-rw-r--r--chromium/media/cast/rtcp/rtcp_sender.cc798
-rw-r--r--chromium/media/cast/rtcp/rtcp_sender.h115
-rw-r--r--chromium/media/cast/rtcp/rtcp_sender_unittest.cc616
-rw-r--r--chromium/media/cast/rtcp/rtcp_unittest.cc509
-rw-r--r--chromium/media/cast/rtcp/rtcp_utility.cc289
-rw-r--r--chromium/media/cast/rtcp/rtcp_utility.h101
-rw-r--r--chromium/media/cast/rtcp/test_rtcp_packet_builder.cc62
-rw-r--r--chromium/media/cast/rtcp/test_rtcp_packet_builder.h30
-rw-r--r--chromium/media/cast/rtp_receiver/mock_rtp_payload_feedback.cc6
-rw-r--r--chromium/media/cast/rtp_receiver/mock_rtp_payload_feedback.h3
-rw-r--r--chromium/media/cast/rtp_receiver/receiver_stats.cc25
-rw-r--r--chromium/media/cast/rtp_receiver/receiver_stats.h15
-rw-r--r--chromium/media/cast/rtp_receiver/receiver_stats_unittest.cc94
-rw-r--r--chromium/media/cast/rtp_receiver/rtp_parser/include/mock/mock_rtp_feedback.h16
-rw-r--r--chromium/media/cast/rtp_receiver/rtp_parser/rtp_parser.cc173
-rw-r--r--chromium/media/cast/rtp_receiver/rtp_parser/rtp_parser.gyp23
-rw-r--r--chromium/media/cast/rtp_receiver/rtp_parser/rtp_parser.h57
-rw-r--r--chromium/media/cast/rtp_receiver/rtp_parser/rtp_parser_unittest.cc231
-rw-r--r--chromium/media/cast/rtp_receiver/rtp_receiver.cc70
-rw-r--r--chromium/media/cast/rtp_receiver/rtp_receiver.gyp26
-rw-r--r--chromium/media/cast/rtp_receiver/rtp_receiver.h56
-rw-r--r--chromium/media/cast/rtp_receiver/rtp_receiver_defines.cc25
-rw-r--r--chromium/media/cast/rtp_receiver/rtp_receiver_defines.h26
-rw-r--r--chromium/media/cast/rtp_timestamp_helper.cc36
-rw-r--r--chromium/media/cast/rtp_timestamp_helper.h41
-rw-r--r--chromium/media/cast/test/transport/transport.gyp22
-rw-r--r--chromium/media/cast/test/utility/utility.gyp28
-rw-r--r--chromium/media/cast/transport/cast_transport_config.cc82
-rw-r--r--chromium/media/cast/transport/cast_transport_config.h221
-rw-r--r--chromium/media/cast/transport/cast_transport_defines.h169
-rw-r--r--chromium/media/cast/transport/cast_transport_sender.h113
-rw-r--r--chromium/media/cast/transport/cast_transport_sender_impl.cc212
-rw-r--r--chromium/media/cast/transport/cast_transport_sender_impl.h110
-rw-r--r--chromium/media/cast/transport/cast_transport_sender_impl_unittest.cc113
-rw-r--r--chromium/media/cast/transport/frame_id_wrap_helper_test.cc52
-rw-r--r--chromium/media/cast/transport/pacing/mock_paced_packet_sender.cc17
-rw-r--r--chromium/media/cast/transport/pacing/mock_paced_packet_sender.h31
-rw-r--r--chromium/media/cast/transport/pacing/paced_sender.cc260
-rw-r--r--chromium/media/cast/transport/pacing/paced_sender.h147
-rw-r--r--chromium/media/cast/transport/pacing/paced_sender_unittest.cc351
-rw-r--r--chromium/media/cast/transport/rtcp/rtcp_builder.cc197
-rw-r--r--chromium/media/cast/transport/rtcp/rtcp_builder.h49
-rw-r--r--chromium/media/cast/transport/rtcp/rtcp_builder_unittest.cc164
-rw-r--r--chromium/media/cast/transport/rtp_sender/packet_storage/packet_storage.cc65
-rw-r--r--chromium/media/cast/transport/rtp_sender/packet_storage/packet_storage.h62
-rw-r--r--chromium/media/cast/transport/rtp_sender/packet_storage/packet_storage_unittest.cc115
-rw-r--r--chromium/media/cast/transport/rtp_sender/rtp_packetizer/rtp_packetizer.cc137
-rw-r--r--chromium/media/cast/transport/rtp_sender/rtp_packetizer/rtp_packetizer.h86
-rw-r--r--chromium/media/cast/transport/rtp_sender/rtp_packetizer/rtp_packetizer_unittest.cc175
-rw-r--r--chromium/media/cast/transport/rtp_sender/rtp_sender.cc150
-rw-r--r--chromium/media/cast/transport/rtp_sender/rtp_sender.h85
-rw-r--r--chromium/media/cast/transport/transport/udp_transport.cc242
-rw-r--r--chromium/media/cast/transport/transport/udp_transport.h97
-rw-r--r--chromium/media/cast/transport/transport/udp_transport_unittest.cc100
-rw-r--r--chromium/media/cast/transport/utility/transport_encryption_handler.cc76
-rw-r--r--chromium/media/cast/transport/utility/transport_encryption_handler.h58
-rw-r--r--chromium/media/cast/video_receiver/codecs/vp8/vp8_decoder.cc106
-rw-r--r--chromium/media/cast/video_receiver/codecs/vp8/vp8_decoder.gyp25
-rw-r--r--chromium/media/cast/video_receiver/codecs/vp8/vp8_decoder.h46
-rw-r--r--chromium/media/cast/video_receiver/video_decoder.cc44
-rw-r--r--chromium/media/cast/video_receiver/video_decoder.h43
-rw-r--r--chromium/media/cast/video_receiver/video_decoder_unittest.cc94
-rw-r--r--chromium/media/cast/video_receiver/video_receiver.cc465
-rw-r--r--chromium/media/cast/video_receiver/video_receiver.gypi31
-rw-r--r--chromium/media/cast/video_receiver/video_receiver.h133
-rw-r--r--chromium/media/cast/video_receiver/video_receiver_unittest.cc169
-rw-r--r--chromium/media/cast/video_sender/codecs/vp8/vp8_encoder.cc193
-rw-r--r--chromium/media/cast/video_sender/codecs/vp8/vp8_encoder.gypi20
-rw-r--r--chromium/media/cast/video_sender/codecs/vp8/vp8_encoder.h34
-rw-r--r--chromium/media/cast/video_sender/external_video_encoder.cc436
-rw-r--r--chromium/media/cast/video_sender/external_video_encoder.h86
-rw-r--r--chromium/media/cast/video_sender/external_video_encoder_unittest.cc191
-rw-r--r--chromium/media/cast/video_sender/fake_software_video_encoder.cc69
-rw-r--r--chromium/media/cast/video_sender/fake_software_video_encoder.h38
-rw-r--r--chromium/media/cast/video_sender/mock_video_encoder_controller.cc17
-rw-r--r--chromium/media/cast/video_sender/mock_video_encoder_controller.h34
-rw-r--r--chromium/media/cast/video_sender/software_video_encoder.h46
-rw-r--r--chromium/media/cast/video_sender/video_encoder.cc123
-rw-r--r--chromium/media/cast/video_sender/video_encoder.h66
-rw-r--r--chromium/media/cast/video_sender/video_encoder_impl.cc139
-rw-r--r--chromium/media/cast/video_sender/video_encoder_impl.h72
-rw-r--r--chromium/media/cast/video_sender/video_encoder_impl_unittest.cc260
-rw-r--r--chromium/media/cast/video_sender/video_encoder_unittest.cc247
-rw-r--r--chromium/media/cast/video_sender/video_sender.cc632
-rw-r--r--chromium/media/cast/video_sender/video_sender.gypi34
-rw-r--r--chromium/media/cast/video_sender/video_sender.h198
-rw-r--r--chromium/media/cast/video_sender/video_sender_unittest.cc483
-rw-r--r--chromium/media/cdm/aes_decryptor.cc171
-rw-r--r--chromium/media/cdm/aes_decryptor.h41
-rw-r--r--chromium/media/cdm/aes_decryptor_unittest.cc341
-rw-r--r--chromium/media/cdm/json_web_key.cc15
-rw-r--r--chromium/media/cdm/key_system_names.cc4
-rw-r--r--chromium/media/cdm/key_system_names.h7
-rw-r--r--chromium/media/cdm/player_tracker_impl.cc57
-rw-r--r--chromium/media/cdm/player_tracker_impl.h54
-rw-r--r--chromium/media/cdm/ppapi/api/content_decryption_module.h568
-rw-r--r--chromium/media/cdm/ppapi/cdm_adapter.cc556
-rw-r--r--chromium/media/cdm/ppapi/cdm_adapter.h156
-rw-r--r--chromium/media/cdm/ppapi/cdm_file_io_impl.cc457
-rw-r--r--chromium/media/cdm/ppapi/cdm_file_io_impl.h166
-rw-r--r--chromium/media/cdm/ppapi/cdm_file_io_test.cc454
-rw-r--r--chromium/media/cdm/ppapi/cdm_file_io_test.h157
-rw-r--r--chromium/media/cdm/ppapi/cdm_helpers.cc58
-rw-r--r--chromium/media/cdm/ppapi/cdm_helpers.h54
-rw-r--r--chromium/media/cdm/ppapi/cdm_video_decoder.cc56
-rw-r--r--chromium/media/cdm/ppapi/cdm_video_decoder.h44
-rw-r--r--chromium/media/cdm/ppapi/cdm_wrapper.h431
-rw-r--r--chromium/media/cdm/ppapi/clear_key_cdm.cc624
-rw-r--r--chromium/media/cdm/ppapi/clear_key_cdm.h186
-rw-r--r--chromium/media/cdm/ppapi/clear_key_cdm_common.h18
-rw-r--r--chromium/media/cdm/ppapi/external_clear_key/cdm_video_decoder.cc57
-rw-r--r--chromium/media/cdm/ppapi/external_clear_key/cdm_video_decoder.h44
-rw-r--r--chromium/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc800
-rw-r--r--chromium/media/cdm/ppapi/external_clear_key/clear_key_cdm.h181
-rw-r--r--chromium/media/cdm/ppapi/external_clear_key/clear_key_cdm_common.h18
-rw-r--r--chromium/media/cdm/ppapi/external_clear_key/fake_cdm_video_decoder.cc91
-rw-r--r--chromium/media/cdm/ppapi/external_clear_key/fake_cdm_video_decoder.h41
-rw-r--r--chromium/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.cc429
-rw-r--r--chromium/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.h94
-rw-r--r--chromium/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.cc339
-rw-r--r--chromium/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.h60
-rw-r--r--chromium/media/cdm/ppapi/external_clear_key/libvpx_cdm_video_decoder.cc195
-rw-r--r--chromium/media/cdm/ppapi/external_clear_key/libvpx_cdm_video_decoder.h55
-rw-r--r--chromium/media/cdm/ppapi/fake_cdm_video_decoder.cc91
-rw-r--r--chromium/media/cdm/ppapi/fake_cdm_video_decoder.h41
-rw-r--r--chromium/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.cc429
-rw-r--r--chromium/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.h95
-rw-r--r--chromium/media/cdm/ppapi/ffmpeg_cdm_video_decoder.cc335
-rw-r--r--chromium/media/cdm/ppapi/ffmpeg_cdm_video_decoder.h62
-rw-r--r--chromium/media/cdm/ppapi/libvpx_cdm_video_decoder.cc195
-rw-r--r--chromium/media/cdm/ppapi/libvpx_cdm_video_decoder.h55
-rw-r--r--chromium/media/cdm/ppapi/supported_cdm_versions.h14
-rw-r--r--chromium/media/ffmpeg/ffmpeg_common.cc60
-rw-r--r--chromium/media/ffmpeg/ffmpeg_common.h94
-rw-r--r--chromium/media/ffmpeg/ffmpeg_common_unittest.cc54
-rw-r--r--chromium/media/ffmpeg/ffmpeg_deleters.h42
-rw-r--r--chromium/media/ffmpeg/ffmpeg_regression_tests.cc1
-rw-r--r--chromium/media/ffmpeg/ffmpeg_unittest.cc8
-rw-r--r--chromium/media/filters/audio_clock.cc135
-rw-r--r--chromium/media/filters/audio_clock.h76
-rw-r--r--chromium/media/filters/audio_clock_unittest.cc177
-rw-r--r--chromium/media/filters/audio_decoder_selector.cc187
-rw-r--r--chromium/media/filters/audio_decoder_selector.h91
-rw-r--r--chromium/media/filters/audio_decoder_selector_unittest.cc50
-rw-r--r--chromium/media/filters/audio_file_reader.cc70
-rw-r--r--chromium/media/filters/audio_file_reader.h28
-rw-r--r--chromium/media/filters/audio_file_reader_unittest.cc36
-rw-r--r--chromium/media/filters/audio_renderer_algorithm_unittest.cc83
-rw-r--r--chromium/media/filters/audio_renderer_impl.cc478
-rw-r--r--chromium/media/filters/audio_renderer_impl.h118
-rw-r--r--chromium/media/filters/audio_renderer_impl_unittest.cc583
-rw-r--r--chromium/media/filters/chunk_demuxer.cc1136
-rw-r--r--chromium/media/filters/chunk_demuxer.h194
-rw-r--r--chromium/media/filters/chunk_demuxer_unittest.cc1297
-rw-r--r--chromium/media/filters/clockless_video_frame_scheduler.cc34
-rw-r--r--chromium/media/filters/clockless_video_frame_scheduler.h34
-rw-r--r--chromium/media/filters/decoder_selector.cc242
-rw-r--r--chromium/media/filters/decoder_selector.h104
-rw-r--r--chromium/media/filters/decoder_stream.cc598
-rw-r--r--chromium/media/filters/decoder_stream.h223
-rw-r--r--chromium/media/filters/decoder_stream_traits.cc109
-rw-r--r--chromium/media/filters/decoder_stream_traits.h74
-rw-r--r--chromium/media/filters/decrypting_audio_decoder.cc332
-rw-r--r--chromium/media/filters/decrypting_audio_decoder.h66
-rw-r--r--chromium/media/filters/decrypting_audio_decoder_unittest.cc411
-rw-r--r--chromium/media/filters/decrypting_demuxer_stream.cc61
-rw-r--r--chromium/media/filters/decrypting_demuxer_stream.h15
-rw-r--r--chromium/media/filters/decrypting_demuxer_stream_unittest.cc9
-rw-r--r--chromium/media/filters/decrypting_video_decoder.cc105
-rw-r--r--chromium/media/filters/decrypting_video_decoder.h21
-rw-r--r--chromium/media/filters/decrypting_video_decoder_unittest.cc155
-rw-r--r--chromium/media/filters/fake_demuxer_stream.cc70
-rw-r--r--chromium/media/filters/fake_demuxer_stream.h27
-rw-r--r--chromium/media/filters/fake_demuxer_stream_unittest.cc76
-rw-r--r--chromium/media/filters/fake_video_decoder.cc233
-rw-r--r--chromium/media/filters/fake_video_decoder.h66
-rw-r--r--chromium/media/filters/fake_video_decoder_unittest.cc318
-rw-r--r--chromium/media/filters/ffmpeg_audio_decoder.cc555
-rw-r--r--chromium/media/filters/ffmpeg_audio_decoder.h116
-rw-r--r--chromium/media/filters/ffmpeg_audio_decoder_unittest.cc154
-rw-r--r--chromium/media/filters/ffmpeg_demuxer.cc324
-rw-r--r--chromium/media/filters/ffmpeg_demuxer.h39
-rw-r--r--chromium/media/filters/ffmpeg_demuxer_unittest.cc153
-rw-r--r--chromium/media/filters/ffmpeg_glue.h5
-rw-r--r--chromium/media/filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc74
-rw-r--r--chromium/media/filters/ffmpeg_video_decoder.cc294
-rw-r--r--chromium/media/filters/ffmpeg_video_decoder.h46
-rw-r--r--chromium/media/filters/ffmpeg_video_decoder_unittest.cc165
-rw-r--r--chromium/media/filters/file_data_source.cc34
-rw-r--r--chromium/media/filters/file_data_source.h8
-rw-r--r--chromium/media/filters/file_data_source_unittest.cc17
-rw-r--r--chromium/media/filters/frame_processor.cc373
-rw-r--r--chromium/media/filters/frame_processor.h57
-rw-r--r--chromium/media/filters/frame_processor_base.cc214
-rw-r--r--chromium/media/filters/frame_processor_base.h234
-rw-r--r--chromium/media/filters/frame_processor_unittest.cc658
-rw-r--r--chromium/media/filters/gpu_video_accelerator_factories.h65
-rw-r--r--chromium/media/filters/gpu_video_decoder.cc368
-rw-r--r--chromium/media/filters/gpu_video_decoder.h73
-rw-r--r--chromium/media/filters/h264_bit_reader.cc113
-rw-r--r--chromium/media/filters/h264_bit_reader.h79
-rw-r--r--chromium/media/filters/h264_bit_reader_unittest.cc73
-rw-r--r--chromium/media/filters/h264_parser.cc1264
-rw-r--r--chromium/media/filters/h264_parser.h410
-rw-r--r--chromium/media/filters/h264_parser_unittest.cc72
-rw-r--r--chromium/media/filters/h264_to_annex_b_bitstream_converter.cc235
-rw-r--r--chromium/media/filters/h264_to_annex_b_bitstream_converter.h113
-rw-r--r--chromium/media/filters/h264_to_annex_b_bitstream_converter_unittest.cc138
-rw-r--r--chromium/media/filters/in_memory_url_protocol.cc14
-rw-r--r--chromium/media/filters/in_memory_url_protocol_unittest.cc51
-rw-r--r--chromium/media/filters/mock_gpu_video_accelerator_factories.cc13
-rw-r--r--chromium/media/filters/mock_gpu_video_accelerator_factories.h34
-rw-r--r--chromium/media/filters/opus_audio_decoder.cc284
-rw-r--r--chromium/media/filters/opus_audio_decoder.h60
-rw-r--r--chromium/media/filters/opus_audio_decoder_unittest.cc219
-rw-r--r--chromium/media/filters/pipeline_integration_test.cc625
-rw-r--r--chromium/media/filters/pipeline_integration_test_base.cc56
-rw-r--r--chromium/media/filters/pipeline_integration_test_base.h7
-rw-r--r--chromium/media/filters/skcanvas_video_renderer.cc266
-rw-r--r--chromium/media/filters/skcanvas_video_renderer_unittest.cc224
-rw-r--r--chromium/media/filters/source_buffer_stream.cc525
-rw-r--r--chromium/media/filters/source_buffer_stream.h68
-rw-r--r--chromium/media/filters/source_buffer_stream_unittest.cc681
-rw-r--r--chromium/media/filters/stream_parser_factory.cc67
-rw-r--r--chromium/media/filters/test_video_frame_scheduler.cc66
-rw-r--r--chromium/media/filters/test_video_frame_scheduler.h57
-rw-r--r--chromium/media/filters/video_decoder_selector.cc184
-rw-r--r--chromium/media/filters/video_decoder_selector.h88
-rw-r--r--chromium/media/filters/video_decoder_selector_unittest.cc82
-rw-r--r--chromium/media/filters/video_frame_scheduler.h48
-rw-r--r--chromium/media/filters/video_frame_scheduler_impl.cc105
-rw-r--r--chromium/media/filters/video_frame_scheduler_impl.h74
-rw-r--r--chromium/media/filters/video_frame_scheduler_impl_unittest.cc150
-rw-r--r--chromium/media/filters/video_frame_scheduler_proxy.cc48
-rw-r--r--chromium/media/filters/video_frame_scheduler_proxy.h51
-rw-r--r--chromium/media/filters/video_frame_scheduler_unittest.cc80
-rw-r--r--chromium/media/filters/video_frame_stream.cc455
-rw-r--r--chromium/media/filters/video_frame_stream.h162
-rw-r--r--chromium/media/filters/video_frame_stream_unittest.cc319
-rw-r--r--chromium/media/filters/video_renderer_impl.cc133
-rw-r--r--chromium/media/filters/video_renderer_impl.h75
-rw-r--r--chromium/media/filters/video_renderer_impl_unittest.cc587
-rw-r--r--chromium/media/filters/vpx_video_decoder.cc272
-rw-r--r--chromium/media/filters/vpx_video_decoder.h27
-rw-r--r--chromium/media/filters/wsola_internals.cc28
-rw-r--r--chromium/media/filters/wsola_internals.h20
-rw-r--r--chromium/media/formats/common/offset_byte_queue.cc64
-rw-r--r--chromium/media/formats/common/offset_byte_queue.h66
-rw-r--r--chromium/media/formats/common/offset_byte_queue_unittest.cc92
-rw-r--r--chromium/media/formats/common/stream_parser_test_base.cc128
-rw-r--r--chromium/media/formats/common/stream_parser_test_base.h74
-rw-r--r--chromium/media/formats/mp2t/es_parser.h42
-rw-r--r--chromium/media/formats/mp2t/es_parser_adts.cc290
-rw-r--r--chromium/media/formats/mp2t/es_parser_adts.h86
-rw-r--r--chromium/media/formats/mp2t/es_parser_h264.cc332
-rw-r--r--chromium/media/formats/mp2t/es_parser_h264.h98
-rw-r--r--chromium/media/formats/mp2t/es_parser_h264_unittest.cc300
-rw-r--r--chromium/media/formats/mp2t/mp2t_common.h21
-rw-r--r--chromium/media/formats/mp2t/mp2t_stream_parser.cc662
-rw-r--r--chromium/media/formats/mp2t/mp2t_stream_parser.h147
-rw-r--r--chromium/media/formats/mp2t/mp2t_stream_parser_unittest.cc199
-rw-r--r--chromium/media/formats/mp2t/ts_packet.cc215
-rw-r--r--chromium/media/formats/mp2t/ts_packet.h73
-rw-r--r--chromium/media/formats/mp2t/ts_section.h40
-rw-r--r--chromium/media/formats/mp2t/ts_section_pat.cc122
-rw-r--r--chromium/media/formats/mp2t/ts_section_pat.h40
-rw-r--r--chromium/media/formats/mp2t/ts_section_pes.cc312
-rw-r--r--chromium/media/formats/mp2t/ts_section_pes.h64
-rw-r--r--chromium/media/formats/mp2t/ts_section_pmt.cc122
-rw-r--r--chromium/media/formats/mp2t/ts_section_pmt.h40
-rw-r--r--chromium/media/formats/mp2t/ts_section_psi.cc132
-rw-r--r--chromium/media/formats/mp2t/ts_section_psi.h54
-rw-r--r--chromium/media/formats/mp4/aac.cc250
-rw-r--r--chromium/media/formats/mp4/aac.h92
-rw-r--r--chromium/media/formats/mp4/aac_unittest.cc146
-rw-r--r--chromium/media/formats/mp4/avc.cc310
-rw-r--r--chromium/media/formats/mp4/avc.h52
-rw-r--r--chromium/media/formats/mp4/avc_unittest.cc372
-rw-r--r--chromium/media/formats/mp4/box_definitions.cc959
-rw-r--r--chromium/media/formats/mp4/box_definitions.h437
-rw-r--r--chromium/media/formats/mp4/box_reader.cc248
-rw-r--r--chromium/media/formats/mp4/box_reader.h222
-rw-r--r--chromium/media/formats/mp4/box_reader_unittest.cc235
-rw-r--r--chromium/media/formats/mp4/cenc.cc58
-rw-r--r--chromium/media/formats/mp4/cenc.h32
-rw-r--r--chromium/media/formats/mp4/es_descriptor.cc117
-rw-r--r--chromium/media/formats/mp4/es_descriptor.h61
-rw-r--r--chromium/media/formats/mp4/es_descriptor_unittest.cc92
-rw-r--r--chromium/media/formats/mp4/fourccs.h104
-rw-r--r--chromium/media/formats/mp4/mp4_stream_parser.cc635
-rw-r--r--chromium/media/formats/mp4/mp4_stream_parser.h138
-rw-r--r--chromium/media/formats/mp4/mp4_stream_parser_unittest.cc250
-rw-r--r--chromium/media/formats/mp4/rcheck.h18
-rw-r--r--chromium/media/formats/mp4/sample_to_group_iterator.cc47
-rw-r--r--chromium/media/formats/mp4/sample_to_group_iterator.h49
-rw-r--r--chromium/media/formats/mp4/sample_to_group_iterator_unittest.cc65
-rw-r--r--chromium/media/formats/mp4/track_run_iterator.cc573
-rw-r--r--chromium/media/formats/mp4/track_run_iterator.h118
-rw-r--r--chromium/media/formats/mp4/track_run_iterator_unittest.cc666
-rw-r--r--chromium/media/formats/mpeg/adts_constants.cc27
-rw-r--r--chromium/media/formats/mpeg/adts_constants.h28
-rw-r--r--chromium/media/formats/mpeg/adts_stream_parser.cc99
-rw-r--r--chromium/media/formats/mpeg/adts_stream_parser.h34
-rw-r--r--chromium/media/formats/mpeg/adts_stream_parser_unittest.cc59
-rw-r--r--chromium/media/formats/mpeg/mp3_stream_parser.cc280
-rw-r--r--chromium/media/formats/mpeg/mp3_stream_parser.h34
-rw-r--r--chromium/media/formats/mpeg/mp3_stream_parser_unittest.cc95
-rw-r--r--chromium/media/formats/mpeg/mpeg_audio_stream_parser_base.cc421
-rw-r--r--chromium/media/formats/mpeg/mpeg_audio_stream_parser_base.h156
-rw-r--r--chromium/media/formats/webm/chromeos/DEPS (renamed from chromium/media/webm/chromeos/DEPS)0
-rw-r--r--chromium/media/formats/webm/chromeos/ebml_writer.cc33
-rw-r--r--chromium/media/formats/webm/chromeos/ebml_writer.h21
-rw-r--r--chromium/media/formats/webm/chromeos/webm_encoder.cc321
-rw-r--r--chromium/media/formats/webm/chromeos/webm_encoder.h106
-rw-r--r--chromium/media/formats/webm/cluster_builder.cc226
-rw-r--r--chromium/media/formats/webm/cluster_builder.h65
-rw-r--r--chromium/media/formats/webm/tracks_builder.cc384
-rw-r--r--chromium/media/formats/webm/tracks_builder.h91
-rw-r--r--chromium/media/formats/webm/webm_audio_client.cc133
-rw-r--r--chromium/media/formats/webm/webm_audio_client.h54
-rw-r--r--chromium/media/formats/webm/webm_cluster_parser.cc686
-rw-r--r--chromium/media/formats/webm/webm_cluster_parser.h275
-rw-r--r--chromium/media/formats/webm/webm_cluster_parser_unittest.cc957
-rw-r--r--chromium/media/formats/webm/webm_constants.cc14
-rw-r--r--chromium/media/formats/webm/webm_constants.h229
-rw-r--r--chromium/media/formats/webm/webm_content_encodings.cc28
-rw-r--r--chromium/media/formats/webm/webm_content_encodings.h88
-rw-r--r--chromium/media/formats/webm/webm_content_encodings_client.cc265
-rw-r--r--chromium/media/formats/webm/webm_content_encodings_client.h50
-rw-r--r--chromium/media/formats/webm/webm_content_encodings_client_unittest.cc238
-rw-r--r--chromium/media/formats/webm/webm_crypto_helpers.cc62
-rw-r--r--chromium/media/formats/webm/webm_crypto_helpers.h33
-rw-r--r--chromium/media/formats/webm/webm_info_parser.cc103
-rw-r--r--chromium/media/formats/webm/webm_info_parser.h50
-rw-r--r--chromium/media/formats/webm/webm_parser.cc953
-rw-r--r--chromium/media/formats/webm/webm_parser.h158
-rw-r--r--chromium/media/formats/webm/webm_parser_unittest.cc412
-rw-r--r--chromium/media/formats/webm/webm_stream_parser.cc281
-rw-r--r--chromium/media/formats/webm/webm_stream_parser.h89
-rw-r--r--chromium/media/formats/webm/webm_tracks_parser.cc350
-rw-r--r--chromium/media/formats/webm/webm_tracks_parser.h119
-rw-r--r--chromium/media/formats/webm/webm_tracks_parser_unittest.cc185
-rw-r--r--chromium/media/formats/webm/webm_video_client.cc161
-rw-r--r--chromium/media/formats/webm/webm_video_client.h61
-rw-r--r--chromium/media/formats/webm/webm_webvtt_parser.cc78
-rw-r--r--chromium/media/formats/webm/webm_webvtt_parser.h49
-rw-r--r--chromium/media/formats/webm/webm_webvtt_parser_unittest.cc105
-rw-r--r--chromium/media/media.gyp624
-rw-r--r--chromium/media/media_cdm.gypi202
-rw-r--r--chromium/media/media_cdm_adapter.gyp67
-rw-r--r--chromium/media/media_nacl.gyp73
-rw-r--r--chromium/media/media_untrusted.gyp45
-rw-r--r--chromium/media/midi/OWNERS5
-rw-r--r--chromium/media/midi/midi_manager.cc134
-rw-r--r--chromium/media/midi/midi_manager.h138
-rw-r--r--chromium/media/midi/midi_manager_alsa.cc452
-rw-r--r--chromium/media/midi/midi_manager_alsa.h69
-rw-r--r--chromium/media/midi/midi_manager_android.cc16
-rw-r--r--chromium/media/midi/midi_manager_mac.cc64
-rw-r--r--chromium/media/midi/midi_manager_mac.h24
-rw-r--r--chromium/media/midi/midi_manager_unittest.cc267
-rw-r--r--chromium/media/midi/midi_manager_usb.cc110
-rw-r--r--chromium/media/midi/midi_manager_usb.h86
-rw-r--r--chromium/media/midi/midi_manager_usb_unittest.cc357
-rw-r--r--chromium/media/midi/midi_manager_win.cc112
-rw-r--r--chromium/media/midi/midi_manager_win.h14
-rw-r--r--chromium/media/midi/midi_message_queue.cc12
-rw-r--r--chromium/media/midi/midi_message_queue.h10
-rw-r--r--chromium/media/midi/midi_message_queue_unittest.cc18
-rw-r--r--chromium/media/midi/midi_message_util.cc2
-rw-r--r--chromium/media/midi/midi_message_util.h10
-rw-r--r--chromium/media/midi/midi_message_util_unittest.cc16
-rw-r--r--chromium/media/midi/midi_port_info.cc8
-rw-r--r--chromium/media/midi/midi_port_info.h12
-rw-r--r--chromium/media/midi/midi_result.h24
-rw-r--r--chromium/media/midi/usb_midi_descriptor_parser.cc235
-rw-r--r--chromium/media/midi/usb_midi_descriptor_parser.h60
-rw-r--r--chromium/media/midi/usb_midi_descriptor_parser_unittest.cc101
-rw-r--r--chromium/media/midi/usb_midi_device.h71
-rw-r--r--chromium/media/midi/usb_midi_device_android.cc66
-rw-r--r--chromium/media/midi/usb_midi_device_android.h51
-rw-r--r--chromium/media/midi/usb_midi_device_factory_android.cc77
-rw-r--r--chromium/media/midi/usb_midi_device_factory_android.h48
-rw-r--r--chromium/media/midi/usb_midi_input_stream.cc105
-rw-r--r--chromium/media/midi/usb_midi_input_stream.h84
-rw-r--r--chromium/media/midi/usb_midi_input_stream_unittest.cc178
-rw-r--r--chromium/media/midi/usb_midi_jack.h51
-rw-r--r--chromium/media/midi/usb_midi_output_stream.cc187
-rw-r--r--chromium/media/midi/usb_midi_output_stream.h57
-rw-r--r--chromium/media/midi/usb_midi_output_stream_unittest.cc276
-rw-r--r--chromium/media/mp2t/es_parser.h42
-rw-r--r--chromium/media/mp2t/es_parser_adts.cc306
-rw-r--r--chromium/media/mp2t/es_parser_adts.h86
-rw-r--r--chromium/media/mp2t/es_parser_h264.cc505
-rw-r--r--chromium/media/mp2t/es_parser_h264.h97
-rw-r--r--chromium/media/mp2t/mp2t_common.h21
-rw-r--r--chromium/media/mp2t/mp2t_stream_parser.cc620
-rw-r--r--chromium/media/mp2t/mp2t_stream_parser.h136
-rw-r--r--chromium/media/mp2t/mp2t_stream_parser_unittest.cc178
-rw-r--r--chromium/media/mp2t/ts_packet.cc215
-rw-r--r--chromium/media/mp2t/ts_packet.h73
-rw-r--r--chromium/media/mp2t/ts_section.h40
-rw-r--r--chromium/media/mp2t/ts_section_pat.cc122
-rw-r--r--chromium/media/mp2t/ts_section_pat.h40
-rw-r--r--chromium/media/mp2t/ts_section_pes.cc312
-rw-r--r--chromium/media/mp2t/ts_section_pes.h64
-rw-r--r--chromium/media/mp2t/ts_section_pmt.cc122
-rw-r--r--chromium/media/mp2t/ts_section_pmt.h40
-rw-r--r--chromium/media/mp2t/ts_section_psi.cc132
-rw-r--r--chromium/media/mp2t/ts_section_psi.h54
-rw-r--r--chromium/media/mp3/mp3_stream_parser.cc597
-rw-r--r--chromium/media/mp3/mp3_stream_parser.h126
-rw-r--r--chromium/media/mp3/mp3_stream_parser_unittest.cc165
-rw-r--r--chromium/media/mp4/aac.cc275
-rw-r--r--chromium/media/mp4/aac.h94
-rw-r--r--chromium/media/mp4/aac_unittest.cc146
-rw-r--r--chromium/media/mp4/avc.cc91
-rw-r--r--chromium/media/mp4/avc.h30
-rw-r--r--chromium/media/mp4/avc_unittest.cc95
-rw-r--r--chromium/media/mp4/box_definitions.cc796
-rw-r--r--chromium/media/mp4/box_definitions.h375
-rw-r--r--chromium/media/mp4/box_reader.cc240
-rw-r--r--chromium/media/mp4/box_reader.h214
-rw-r--r--chromium/media/mp4/box_reader_unittest.cc201
-rw-r--r--chromium/media/mp4/cenc.cc58
-rw-r--r--chromium/media/mp4/cenc.h32
-rw-r--r--chromium/media/mp4/es_descriptor.cc117
-rw-r--r--chromium/media/mp4/es_descriptor.h62
-rw-r--r--chromium/media/mp4/es_descriptor_unittest.cc92
-rw-r--r--chromium/media/mp4/fourccs.h101
-rw-r--r--chromium/media/mp4/mp4_stream_parser.cc576
-rw-r--r--chromium/media/mp4/mp4_stream_parser.h121
-rw-r--r--chromium/media/mp4/mp4_stream_parser_unittest.cc204
-rw-r--r--chromium/media/mp4/offset_byte_queue.cc64
-rw-r--r--chromium/media/mp4/offset_byte_queue.h66
-rw-r--r--chromium/media/mp4/offset_byte_queue_unittest.cc92
-rw-r--r--chromium/media/mp4/rcheck.h18
-rw-r--r--chromium/media/mp4/track_run_iterator.cc459
-rw-r--r--chromium/media/mp4/track_run_iterator.h108
-rw-r--r--chromium/media/mp4/track_run_iterator_unittest.cc437
-rw-r--r--chromium/media/ozone/media_ozone_platform.cc93
-rw-r--r--chromium/media/ozone/media_ozone_platform.h47
-rwxr-xr-xchromium/media/tools/layout_tests/layouttest_analyzer.py4
-rw-r--r--chromium/media/tools/layout_tests/test_expectations.py22
-rw-r--r--chromium/media/tools/player_x11/data_source_logger.cc5
-rw-r--r--chromium/media/tools/player_x11/data_source_logger.h1
-rw-r--r--chromium/media/tools/player_x11/gl_video_renderer.cc10
-rw-r--r--chromium/media/tools/player_x11/gl_video_renderer.h2
-rw-r--r--chromium/media/tools/player_x11/player_x11.cc89
-rw-r--r--chromium/media/tools/player_x11/x11_video_renderer.cc11
-rw-r--r--chromium/media/tools/player_x11/x11_video_renderer.h2
-rw-r--r--chromium/media/video/capture/android/imageformat_list.h4
-rw-r--r--chromium/media/video/capture/android/video_capture_device_android.cc112
-rw-r--r--chromium/media/video/capture/android/video_capture_device_android.h24
-rw-r--r--chromium/media/video/capture/android/video_capture_device_factory_android.cc130
-rw-r--r--chromium/media/video/capture/android/video_capture_device_factory_android.h48
-rw-r--r--chromium/media/video/capture/fake_video_capture_device.cc119
-rw-r--r--chromium/media/video/capture/fake_video_capture_device.h39
-rw-r--r--chromium/media/video/capture/fake_video_capture_device_factory.cc54
-rw-r--r--chromium/media/video/capture/fake_video_capture_device_factory.h44
-rw-r--r--chromium/media/video/capture/fake_video_capture_device_unittest.cc208
-rw-r--r--chromium/media/video/capture/file_video_capture_device.cc110
-rw-r--r--chromium/media/video/capture/file_video_capture_device.h22
-rw-r--r--chromium/media/video/capture/file_video_capture_device_factory.cc67
-rw-r--r--chromium/media/video/capture/file_video_capture_device_factory.h31
-rw-r--r--chromium/media/video/capture/linux/video_capture_device_chromeos.cc116
-rw-r--r--chromium/media/video/capture/linux/video_capture_device_chromeos.h36
-rw-r--r--chromium/media/video/capture/linux/video_capture_device_factory_linux.cc187
-rw-r--r--chromium/media/video/capture/linux/video_capture_device_factory_linux.h38
-rw-r--r--chromium/media/video/capture/linux/video_capture_device_linux.cc295
-rw-r--r--chromium/media/video/capture/linux/video_capture_device_linux.h19
-rw-r--r--chromium/media/video/capture/mac/avfoundation_glue.h28
-rw-r--r--chromium/media/video/capture/mac/avfoundation_glue.mm123
-rw-r--r--chromium/media/video/capture/mac/coremedia_glue.h20
-rw-r--r--chromium/media/video/capture/mac/coremedia_glue.mm44
-rw-r--r--chromium/media/video/capture/mac/video_capture_device_avfoundation_mac.h9
-rw-r--r--chromium/media/video/capture/mac/video_capture_device_avfoundation_mac.mm147
-rw-r--r--chromium/media/video/capture/mac/video_capture_device_factory_mac.h42
-rw-r--r--chromium/media/video/capture/mac/video_capture_device_factory_mac.mm177
-rw-r--r--chromium/media/video/capture/mac/video_capture_device_factory_mac_unittest.mm44
-rw-r--r--chromium/media/video/capture/mac/video_capture_device_mac.h41
-rw-r--r--chromium/media/video/capture/mac/video_capture_device_mac.mm444
-rw-r--r--chromium/media/video/capture/mac/video_capture_device_qtkit_mac.h8
-rw-r--r--chromium/media/video/capture/mac/video_capture_device_qtkit_mac.mm73
-rw-r--r--chromium/media/video/capture/video_capture.h76
-rw-r--r--chromium/media/video/capture/video_capture_device.cc22
-rw-r--r--chromium/media/video/capture/video_capture_device.h102
-rw-r--r--chromium/media/video/capture/video_capture_device_factory.cc76
-rw-r--r--chromium/media/video/capture/video_capture_device_factory.h54
-rw-r--r--chromium/media/video/capture/video_capture_device_unittest.cc287
-rw-r--r--chromium/media/video/capture/video_capture_proxy.cc135
-rw-r--r--chromium/media/video/capture/video_capture_proxy.h85
-rw-r--r--chromium/media/video/capture/video_capture_types.cc8
-rw-r--r--chromium/media/video/capture/video_capture_types.h9
-rw-r--r--chromium/media/video/capture/win/capability_list_win.cc2
-rw-r--r--chromium/media/video/capture/win/capability_list_win.h2
-rw-r--r--chromium/media/video/capture/win/filter_base_win.cc2
-rw-r--r--chromium/media/video/capture/win/video_capture_device_factory_win.cc436
-rw-r--r--chromium/media/video/capture/win/video_capture_device_factory_win.h39
-rw-r--r--chromium/media/video/capture/win/video_capture_device_mf_win.cc192
-rw-r--r--chromium/media/video/capture/win/video_capture_device_mf_win.h25
-rw-r--r--chromium/media/video/capture/win/video_capture_device_win.cc315
-rw-r--r--chromium/media/video/capture/win/video_capture_device_win.h41
-rw-r--r--chromium/media/video/mock_video_decode_accelerator.h3
-rw-r--r--chromium/media/video/video_decode_accelerator.cc20
-rw-r--r--chromium/media/video/video_decode_accelerator.h59
-rw-r--r--chromium/media/video/video_encode_accelerator.cc11
-rw-r--r--chromium/media/video/video_encode_accelerator.h45
-rw-r--r--chromium/media/webm/chromeos/ebml_writer.cc33
-rw-r--r--chromium/media/webm/chromeos/ebml_writer.h21
-rw-r--r--chromium/media/webm/chromeos/webm_encoder.cc321
-rw-r--r--chromium/media/webm/chromeos/webm_encoder.h106
-rw-r--r--chromium/media/webm/cluster_builder.cc175
-rw-r--r--chromium/media/webm/cluster_builder.h59
-rw-r--r--chromium/media/webm/tracks_builder.cc216
-rw-r--r--chromium/media/webm/tracks_builder.h59
-rw-r--r--chromium/media/webm/webm_audio_client.cc121
-rw-r--r--chromium/media/webm/webm_audio_client.h54
-rw-r--r--chromium/media/webm/webm_cluster_parser.cc463
-rw-r--r--chromium/media/webm/webm_cluster_parser.h159
-rw-r--r--chromium/media/webm/webm_cluster_parser_unittest.cc530
-rw-r--r--chromium/media/webm/webm_constants.cc14
-rw-r--r--chromium/media/webm/webm_constants.h229
-rw-r--r--chromium/media/webm/webm_content_encodings.cc28
-rw-r--r--chromium/media/webm/webm_content_encodings.h88
-rw-r--r--chromium/media/webm/webm_content_encodings_client.cc265
-rw-r--r--chromium/media/webm/webm_content_encodings_client.h50
-rw-r--r--chromium/media/webm/webm_content_encodings_client_unittest.cc238
-rw-r--r--chromium/media/webm/webm_crypto_helpers.cc60
-rw-r--r--chromium/media/webm/webm_crypto_helpers.h32
-rw-r--r--chromium/media/webm/webm_info_parser.cc84
-rw-r--r--chromium/media/webm/webm_info_parser.h47
-rw-r--r--chromium/media/webm/webm_parser.cc947
-rw-r--r--chromium/media/webm/webm_parser.h158
-rw-r--r--chromium/media/webm/webm_parser_unittest.cc395
-rw-r--r--chromium/media/webm/webm_stream_parser.cc295
-rw-r--r--chromium/media/webm/webm_stream_parser.h91
-rw-r--r--chromium/media/webm/webm_tracks_parser.cc301
-rw-r--r--chromium/media/webm/webm_tracks_parser.h105
-rw-r--r--chromium/media/webm/webm_tracks_parser_unittest.cc122
-rw-r--r--chromium/media/webm/webm_video_client.cc163
-rw-r--r--chromium/media/webm/webm_video_client.h61
-rw-r--r--chromium/media/webm/webm_webvtt_parser.cc78
-rw-r--r--chromium/media/webm/webm_webvtt_parser.h49
-rw-r--r--chromium/media/webm/webm_webvtt_parser_unittest.cc105
-rw-r--r--chromium/mojo/BUILD.gn12
-rw-r--r--chromium/mojo/DEPS7
-rw-r--r--chromium/mojo/OWNERS10
-rw-r--r--chromium/mojo/README.md6
-rw-r--r--chromium/mojo/android/DEPS3
-rw-r--r--chromium/mojo/android/javatests/AndroidManifest.xml21
-rw-r--r--chromium/mojo/android/javatests/DEPS4
-rw-r--r--chromium/mojo/android/javatests/apk/.empty (renamed from chromium/third_party/JSON/JSON-2.59/blib/arch/.exists)0
-rw-r--r--chromium/mojo/android/javatests/init_library.cc40
-rw-r--r--chromium/mojo/android/javatests/mojo_test_case.cc62
-rw-r--r--chromium/mojo/android/javatests/mojo_test_case.h20
-rw-r--r--chromium/mojo/android/system/core_impl.cc368
-rw-r--r--chromium/mojo/android/system/core_impl.h20
-rw-r--r--chromium/mojo/apps/js/DEPS4
-rw-r--r--chromium/mojo/apps/js/bindings/connection_unittests.js256
-rw-r--r--chromium/mojo/apps/js/bindings/gl/context.cc187
-rw-r--r--chromium/mojo/apps/js/bindings/gl/context.h77
-rw-r--r--chromium/mojo/apps/js/bindings/gl/module.cc50
-rw-r--r--chromium/mojo/apps/js/bindings/gl/module.h22
-rw-r--r--chromium/mojo/apps/js/bindings/monotonic_clock.cc42
-rw-r--r--chromium/mojo/apps/js/bindings/monotonic_clock.h22
-rw-r--r--chromium/mojo/apps/js/bindings/monotonic_clock_unittests.js20
-rw-r--r--chromium/mojo/apps/js/bindings/sample_service_unittests.js169
-rw-r--r--chromium/mojo/apps/js/bindings/threading.cc47
-rw-r--r--chromium/mojo/apps/js/bindings/threading.h25
-rw-r--r--chromium/mojo/apps/js/main.cc43
-rw-r--r--chromium/mojo/apps/js/main.js398
-rw-r--r--chromium/mojo/apps/js/mojo_runner_delegate.cc82
-rw-r--r--chromium/mojo/apps/js/mojo_runner_delegate.h33
-rw-r--r--chromium/mojo/aura/DEPS10
-rw-r--r--chromium/mojo/aura/aura_init.cc26
-rw-r--r--chromium/mojo/aura/aura_init.h33
-rw-r--r--chromium/mojo/aura/context_factory_mojo.cc136
-rw-r--r--chromium/mojo/aura/context_factory_mojo.h40
-rw-r--r--chromium/mojo/aura/screen_mojo.cc76
-rw-r--r--chromium/mojo/aura/screen_mojo.h54
-rw-r--r--chromium/mojo/aura/window_tree_host_mojo.cc179
-rw-r--r--chromium/mojo/aura/window_tree_host_mojo.h82
-rw-r--r--chromium/mojo/aura/window_tree_host_mojo_delegate.h24
-rw-r--r--chromium/mojo/bindings/js/DEPS4
-rw-r--r--chromium/mojo/bindings/js/codec_unittests.js222
-rw-r--r--chromium/mojo/bindings/js/core.cc278
-rw-r--r--chromium/mojo/bindings/js/core.h22
-rw-r--r--chromium/mojo/bindings/js/core_unittests.js91
-rw-r--r--chromium/mojo/bindings/js/handle.cc41
-rw-r--r--chromium/mojo/bindings/js/handle.h75
-rw-r--r--chromium/mojo/bindings/js/run_js_tests.cc64
-rw-r--r--chromium/mojo/bindings/js/support.cc59
-rw-r--r--chromium/mojo/bindings/js/support.h22
-rw-r--r--chromium/mojo/bindings/js/waiting_callback.cc84
-rw-r--r--chromium/mojo/bindings/js/waiting_callback.h52
-rw-r--r--chromium/mojo/cc/DEPS3
-rw-r--r--chromium/mojo/cc/context_provider_mojo.cc60
-rw-r--r--chromium/mojo/cc/context_provider_mojo.h51
-rw-r--r--chromium/mojo/common/BUILD.gn30
-rw-r--r--chromium/mojo/common/DEPS6
-rw-r--r--chromium/mojo/common/common_type_converters.cc41
-rw-r--r--chromium/mojo/common/common_type_converters.h32
-rw-r--r--chromium/mojo/common/common_type_converters_unittest.cc72
-rw-r--r--chromium/mojo/common/data_pipe_utils.cc72
-rw-r--r--chromium/mojo/common/data_pipe_utils.h32
-rw-r--r--chromium/mojo/common/handle_watcher.cc312
-rw-r--r--chromium/mojo/common/handle_watcher.h59
-rw-r--r--chromium/mojo/common/handle_watcher_unittest.cc341
-rw-r--r--chromium/mojo/common/message_pump_mojo.cc243
-rw-r--r--chromium/mojo/common/message_pump_mojo.h107
-rw-r--r--chromium/mojo/common/message_pump_mojo_handler.h29
-rw-r--r--chromium/mojo/common/message_pump_mojo_unittest.cc22
-rw-r--r--chromium/mojo/common/mojo_common_export.h32
-rw-r--r--chromium/mojo/common/time_helper.cc33
-rw-r--r--chromium/mojo/common/time_helper.h34
-rw-r--r--chromium/mojo/dbus/DEPS4
-rw-r--r--chromium/mojo/dbus/dbus_external_service.cc90
-rw-r--r--chromium/mojo/dbus/dbus_external_service.h88
-rw-r--r--chromium/mojo/embedder/DEPS11
-rw-r--r--chromium/mojo/embedder/README.md13
-rw-r--r--chromium/mojo/embedder/channel_init.cc59
-rw-r--r--chromium/mojo/embedder/channel_init.h59
-rw-r--r--chromium/mojo/embedder/embedder.cc179
-rw-r--r--chromium/mojo/embedder/embedder.h77
-rw-r--r--chromium/mojo/embedder/embedder_unittest.cc518
-rw-r--r--chromium/mojo/embedder/platform_channel_pair.cc32
-rw-r--r--chromium/mojo/embedder/platform_channel_pair.h94
-rw-r--r--chromium/mojo/embedder/platform_channel_pair_posix.cc111
-rw-r--r--chromium/mojo/embedder/platform_channel_pair_posix_unittest.cc243
-rw-r--r--chromium/mojo/embedder/platform_channel_pair_win.cc117
-rw-r--r--chromium/mojo/embedder/platform_channel_utils_posix.cc187
-rw-r--r--chromium/mojo/embedder/platform_channel_utils_posix.h78
-rw-r--r--chromium/mojo/embedder/platform_handle.cc40
-rw-r--r--chromium/mojo/embedder/platform_handle.h47
-rw-r--r--chromium/mojo/embedder/platform_handle_utils.h34
-rw-r--r--chromium/mojo/embedder/platform_handle_utils_posix.cc22
-rw-r--r--chromium/mojo/embedder/platform_handle_utils_win.cc31
-rw-r--r--chromium/mojo/embedder/platform_handle_vector.h35
-rw-r--r--chromium/mojo/embedder/scoped_platform_handle.h61
-rw-r--r--chromium/mojo/embedder/test_embedder.cc54
-rw-r--r--chromium/mojo/embedder/test_embedder.h25
-rw-r--r--chromium/mojo/environment/BUILD.gn47
-rw-r--r--chromium/mojo/environment/default_async_waiter_impl.cc50
-rw-r--r--chromium/mojo/environment/default_async_waiter_impl.h19
-rw-r--r--chromium/mojo/environment/default_logger_impl.cc71
-rw-r--r--chromium/mojo/environment/default_logger_impl.h19
-rw-r--r--chromium/mojo/environment/environment.cc36
-rw-r--r--chromium/mojo/environment/mojo_environment_impl_export.h32
-rw-r--r--chromium/mojo/examples/aura_demo/DEPS9
-rw-r--r--chromium/mojo/examples/aura_demo/aura_demo.cc198
-rw-r--r--chromium/mojo/examples/aura_demo/view_manager_init.cc45
-rw-r--r--chromium/mojo/examples/browser/DEPS10
-rw-r--r--chromium/mojo/examples/browser/browser.cc128
-rw-r--r--chromium/mojo/examples/compositor_app/DEPS5
-rw-r--r--chromium/mojo/examples/compositor_app/compositor_app.cc69
-rw-r--r--chromium/mojo/examples/compositor_app/compositor_host.cc89
-rw-r--r--chromium/mojo/examples/compositor_app/compositor_host.h58
-rw-r--r--chromium/mojo/examples/dbus_echo/dbus_echo_app.cc51
-rw-r--r--chromium/mojo/examples/demo_launcher/demo_launcher.cc43
-rw-r--r--chromium/mojo/examples/embedded_app/DEPS3
-rw-r--r--chromium/mojo/examples/embedded_app/embedded_app.cc155
-rw-r--r--chromium/mojo/examples/html_viewer/DEPS6
-rw-r--r--chromium/mojo/examples/html_viewer/blink_platform_impl.cc213
-rw-r--r--chromium/mojo/examples/html_viewer/blink_platform_impl.h78
-rw-r--r--chromium/mojo/examples/html_viewer/html_document_view.cc140
-rw-r--r--chromium/mojo/examples/html_viewer/html_document_view.h62
-rw-r--r--chromium/mojo/examples/html_viewer/html_viewer.cc105
-rw-r--r--chromium/mojo/examples/html_viewer/webmimeregistry_impl.cc97
-rw-r--r--chromium/mojo/examples/html_viewer/webmimeregistry_impl.h50
-rw-r--r--chromium/mojo/examples/html_viewer/webthread_impl.cc133
-rw-r--r--chromium/mojo/examples/html_viewer/webthread_impl.h75
-rw-r--r--chromium/mojo/examples/html_viewer/weburlloader_impl.cc139
-rw-r--r--chromium/mojo/examples/html_viewer/weburlloader_impl.h60
-rw-r--r--chromium/mojo/examples/image_viewer/DEPS4
-rw-r--r--chromium/mojo/examples/image_viewer/image_viewer.cc138
-rw-r--r--chromium/mojo/examples/nesting_app/DEPS3
-rw-r--r--chromium/mojo/examples/nesting_app/nesting_app.cc136
-rw-r--r--chromium/mojo/examples/pepper_container_app/DEPS6
-rw-r--r--chromium/mojo/examples/pepper_container_app/OWNERS6
-rw-r--r--chromium/mojo/examples/pepper_container_app/graphics_3d_resource.cc160
-rw-r--r--chromium/mojo/examples/pepper_container_app/graphics_3d_resource.h72
-rw-r--r--chromium/mojo/examples/pepper_container_app/interface_list.cc50
-rw-r--r--chromium/mojo/examples/pepper_container_app/interface_list.h37
-rw-r--r--chromium/mojo/examples/pepper_container_app/mojo_ppapi_globals.cc184
-rw-r--r--chromium/mojo/examples/pepper_container_app/mojo_ppapi_globals.h90
-rw-r--r--chromium/mojo/examples/pepper_container_app/pepper_container_app.cc110
-rw-r--r--chromium/mojo/examples/pepper_container_app/plugin_instance.cc416
-rw-r--r--chromium/mojo/examples/pepper_container_app/plugin_instance.h185
-rw-r--r--chromium/mojo/examples/pepper_container_app/plugin_module.cc110
-rw-r--r--chromium/mojo/examples/pepper_container_app/plugin_module.h61
-rw-r--r--chromium/mojo/examples/pepper_container_app/ppb_core_thunk.cc64
-rw-r--r--chromium/mojo/examples/pepper_container_app/ppb_opengles2_thunk.cc1454
-rw-r--r--chromium/mojo/examples/pepper_container_app/resource_creation_impl.cc409
-rw-r--r--chromium/mojo/examples/pepper_container_app/resource_creation_impl.h178
-rw-r--r--chromium/mojo/examples/pepper_container_app/thunk.h20
-rw-r--r--chromium/mojo/examples/pepper_container_app/type_converters.h74
-rw-r--r--chromium/mojo/examples/sample_app/DEPS4
-rw-r--r--chromium/mojo/examples/sample_app/gles2_client_impl.cc134
-rw-r--r--chromium/mojo/examples/sample_app/gles2_client_impl.h50
-rw-r--r--chromium/mojo/examples/sample_app/sample_app.cc84
-rw-r--r--chromium/mojo/examples/sample_app/spinning_cube.cc472
-rw-r--r--chromium/mojo/examples/sample_app/spinning_cube.h51
-rw-r--r--chromium/mojo/examples/wget/wget.cc116
-rw-r--r--chromium/mojo/examples/window_manager/DEPS3
-rw-r--r--chromium/mojo/examples/window_manager/window_manager.cc226
-rw-r--r--chromium/mojo/examples/window_manager/window_manager.mojom11
-rw-r--r--chromium/mojo/gles2/DEPS4
-rw-r--r--chromium/mojo/gles2/README.md5
-rw-r--r--chromium/mojo/gles2/command_buffer_client_impl.cc269
-rw-r--r--chromium/mojo/gles2/command_buffer_client_impl.h114
-rw-r--r--chromium/mojo/gles2/gles2_context.cc73
-rw-r--r--chromium/mojo/gles2/gles2_context.h63
-rw-r--r--chromium/mojo/gles2/gles2_impl_export.h31
-rw-r--r--chromium/mojo/gles2/gles2_support_impl.cc116
-rw-r--r--chromium/mojo/gles2/gles2_support_impl.h46
-rw-r--r--chromium/mojo/mojo.gyp747
-rw-r--r--chromium/mojo/mojo_apps.gypi62
-rw-r--r--chromium/mojo/mojo_apps_js_unittests.isolate54
-rw-r--r--chromium/mojo/mojo_examples.gypi446
-rw-r--r--chromium/mojo/mojo_js_unittests.isolate52
-rw-r--r--chromium/mojo/mojo_public.gypi436
-rw-r--r--chromium/mojo/mojo_services.gypi503
-rw-r--r--chromium/mojo/public/DEPS6
-rw-r--r--chromium/mojo/public/README.md43
-rw-r--r--chromium/mojo/public/bindings/mojom_bindings_generator.gypi82
-rw-r--r--chromium/mojo/public/c/DEPS16
-rw-r--r--chromium/mojo/public/c/README.md45
-rw-r--r--chromium/mojo/public/c/environment/async_waiter.h30
-rw-r--r--chromium/mojo/public/c/environment/logger.h54
-rw-r--r--chromium/mojo/public/c/gles2/DEPS3
-rw-r--r--chromium/mojo/public/c/gles2/gles2.h51
-rw-r--r--chromium/mojo/public/c/gles2/gles2_call_visitor_autogen.h544
-rw-r--r--chromium/mojo/public/c/gles2/gles2_export.h26
-rw-r--r--chromium/mojo/public/c/gles2/gles2_types.h26
-rw-r--r--chromium/mojo/public/c/system/buffer.h187
-rw-r--r--chromium/mojo/public/c/system/core.h20
-rw-r--r--chromium/mojo/public/c/system/data_pipe.h367
-rw-r--r--chromium/mojo/public/c/system/functions.h87
-rw-r--r--chromium/mojo/public/c/system/macros.h72
-rw-r--r--chromium/mojo/public/c/system/message_pipe.h178
-rw-r--r--chromium/mojo/public/c/system/system_export.h33
-rw-r--r--chromium/mojo/public/c/system/types.h176
-rw-r--r--chromium/mojo/public/c/test_support/test_support.h48
-rw-r--r--chromium/mojo/public/c/test_support/test_support_export.h26
-rw-r--r--chromium/mojo/public/cpp/DEPS18
-rw-r--r--chromium/mojo/public/cpp/README.md71
-rw-r--r--chromium/mojo/public/cpp/application/DEPS14
-rw-r--r--chromium/mojo/public/cpp/application/application.h121
-rw-r--r--chromium/mojo/public/cpp/application/connect.h24
-rw-r--r--chromium/mojo/public/cpp/application/lib/application.cc34
-rw-r--r--chromium/mojo/public/cpp/application/lib/mojo_main_chromium.cc23
-rw-r--r--chromium/mojo/public/cpp/application/lib/mojo_main_standalone.cc22
-rw-r--r--chromium/mojo/public/cpp/application/lib/service_connector.cc18
-rw-r--r--chromium/mojo/public/cpp/application/lib/service_connector.h133
-rw-r--r--chromium/mojo/public/cpp/application/lib/service_registry.cc78
-rw-r--r--chromium/mojo/public/cpp/application/lib/service_registry.h55
-rw-r--r--chromium/mojo/public/cpp/bindings/BUILD.gn53
-rw-r--r--chromium/mojo/public/cpp/bindings/DEPS3
-rw-r--r--chromium/mojo/public/cpp/bindings/array.h143
-rw-r--r--chromium/mojo/public/cpp/bindings/callback.h462
-rw-r--r--chromium/mojo/public/cpp/bindings/callback.h.pump80
-rw-r--r--chromium/mojo/public/cpp/bindings/error_handler.h19
-rw-r--r--chromium/mojo/public/cpp/bindings/interface_impl.h109
-rw-r--r--chromium/mojo/public/cpp/bindings/interface_ptr.h124
-rw-r--r--chromium/mojo/public/cpp/bindings/interface_request.h76
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/DEPS5
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/TODO6
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/array_internal.cc70
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/array_internal.h384
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/array_serialization.h179
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/bindings_internal.h86
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/bindings_serialization.cc118
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/bindings_serialization.h83
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/bounds_checker.cc77
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/bounds_checker.h64
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/buffer.h24
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/callback_internal.h26
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/connector.cc157
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/connector.h100
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/filter_chain.cc49
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/filter_chain.h66
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/fixed_buffer.cc53
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/fixed_buffer.h67
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/interface_impl_internal.h94
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/interface_ptr_internal.h84
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/message.cc81
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/message_builder.cc52
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/message_builder.h63
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/message_filter.cc23
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/message_header_validator.cc81
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/message_header_validator.h24
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/message_internal.h44
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/message_queue.cc50
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/message_queue.h47
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/no_interface.cc20
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/router.cc140
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/router.h91
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/shared_data.h84
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/shared_ptr.h63
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/string_serialization.cc38
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/string_serialization.h20
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/sync_dispatcher.cc27
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/template_util.h89
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/validation_errors.cc64
-rw-r--r--chromium/mojo/public/cpp/bindings/lib/validation_errors.h66
-rw-r--r--chromium/mojo/public/cpp/bindings/message.h123
-rw-r--r--chromium/mojo/public/cpp/bindings/message_filter.h39
-rw-r--r--chromium/mojo/public/cpp/bindings/no_interface.h56
-rw-r--r--chromium/mojo/public/cpp/bindings/string.h154
-rw-r--r--chromium/mojo/public/cpp/bindings/struct_ptr.h154
-rw-r--r--chromium/mojo/public/cpp/bindings/sync_dispatcher.h47
-rw-r--r--chromium/mojo/public/cpp/bindings/type_converter.h82
-rw-r--r--chromium/mojo/public/cpp/environment/environment.h41
-rw-r--r--chromium/mojo/public/cpp/environment/lib/DEPS4
-rw-r--r--chromium/mojo/public/cpp/environment/lib/default_async_waiter.cc94
-rw-r--r--chromium/mojo/public/cpp/environment/lib/default_async_waiter.h18
-rw-r--r--chromium/mojo/public/cpp/environment/lib/default_logger.cc71
-rw-r--r--chromium/mojo/public/cpp/environment/lib/default_logger.h18
-rw-r--r--chromium/mojo/public/cpp/environment/lib/environment.cc60
-rw-r--r--chromium/mojo/public/cpp/environment/lib/logging.cc45
-rw-r--r--chromium/mojo/public/cpp/environment/logging.h87
-rw-r--r--chromium/mojo/public/cpp/gles2/DEPS4
-rw-r--r--chromium/mojo/public/cpp/gles2/gles2.h24
-rw-r--r--chromium/mojo/public/cpp/system/core.h555
-rw-r--r--chromium/mojo/public/cpp/system/macros.h53
-rw-r--r--chromium/mojo/public/cpp/test_support/DEPS3
-rw-r--r--chromium/mojo/public/cpp/test_support/lib/test_support.cc26
-rw-r--r--chromium/mojo/public/cpp/test_support/lib/test_utils.cc91
-rw-r--r--chromium/mojo/public/cpp/test_support/test_support.h34
-rw-r--r--chromium/mojo/public/cpp/test_support/test_utils.h39
-rw-r--r--chromium/mojo/public/cpp/utility/lib/mutex.cc52
-rw-r--r--chromium/mojo/public/cpp/utility/lib/run_loop.cc221
-rw-r--r--chromium/mojo/public/cpp/utility/lib/thread.cc69
-rw-r--r--chromium/mojo/public/cpp/utility/lib/thread_local.h61
-rw-r--r--chromium/mojo/public/cpp/utility/lib/thread_local_posix.cc39
-rw-r--r--chromium/mojo/public/cpp/utility/lib/thread_local_win.cc39
-rw-r--r--chromium/mojo/public/cpp/utility/mutex.h70
-rw-r--r--chromium/mojo/public/cpp/utility/run_loop.h108
-rw-r--r--chromium/mojo/public/cpp/utility/run_loop_handler.h25
-rw-r--r--chromium/mojo/public/cpp/utility/thread.h62
-rw-r--r--chromium/mojo/public/gles2/gles2_interface.h23
-rw-r--r--chromium/mojo/public/gles2/gles2_private.cc92
-rw-r--r--chromium/mojo/public/gles2/gles2_private.h46
-rw-r--r--chromium/mojo/public/interfaces/interface_provider/BUILD.gn11
-rw-r--r--chromium/mojo/public/interfaces/interface_provider/interface_provider.mojom12
-rw-r--r--chromium/mojo/public/interfaces/service_provider/BUILD.gn11
-rw-r--r--chromium/mojo/public/interfaces/service_provider/service_provider.mojom19
-rw-r--r--chromium/mojo/public/interfaces/shell/BUILD.gn11
-rw-r--r--chromium/mojo/public/js/bindings/BUILD.gn10
-rw-r--r--chromium/mojo/public/js/bindings/codec.js739
-rw-r--r--chromium/mojo/public/js/bindings/connection.js30
-rw-r--r--chromium/mojo/public/js/bindings/connector.js109
-rw-r--r--chromium/mojo/public/js/bindings/constants.cc15
-rw-r--r--chromium/mojo/public/js/bindings/constants.h19
-rw-r--r--chromium/mojo/public/js/bindings/core.js215
-rw-r--r--chromium/mojo/public/js/bindings/router.js93
-rw-r--r--chromium/mojo/public/js/bindings/support.js30
-rw-r--r--chromium/mojo/public/js/bindings/unicode.js51
-rw-r--r--chromium/mojo/public/platform/native/system_thunks.cc170
-rw-r--r--chromium/mojo/public/platform/native/system_thunks.h137
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/enum_declaration.tmpl9
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl49
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl315
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/interface_macros.tmpl23
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/interface_proxy_declaration.tmpl14
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/interface_request_validator_declaration.tmpl6
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/interface_response_validator_declaration.tmpl6
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/interface_stub_declaration.tmpl14
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/module-internal.h.tmpl49
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl86
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl108
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/params_definition.tmpl33
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/struct_declaration.tmpl22
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/struct_definition.tmpl28
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl91
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl5
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl51
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl31
-rw-r--r--chromium/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_definition.tmpl15
-rw-r--r--chromium/mojo/public/tools/bindings/generators/java_templates/constant_definition.tmpl5
-rw-r--r--chromium/mojo/public/tools/bindings/generators/java_templates/constants.java.tmpl12
-rw-r--r--chromium/mojo/public/tools/bindings/generators/java_templates/enum.java.tmpl4
-rw-r--r--chromium/mojo/public/tools/bindings/generators/java_templates/enum_definition.tmpl21
-rw-r--r--chromium/mojo/public/tools/bindings/generators/java_templates/header.java.tmpl11
-rw-r--r--chromium/mojo/public/tools/bindings/generators/java_templates/java_macros.tmpl3
-rw-r--r--chromium/mojo/public/tools/bindings/generators/js_templates/enum_definition.tmpl14
-rw-r--r--chromium/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl122
-rw-r--r--chromium/mojo/public/tools/bindings/generators/js_templates/module.js.tmpl52
-rw-r--r--chromium/mojo/public/tools/bindings/generators/js_templates/struct_definition.tmpl72
-rw-r--r--chromium/mojo/public/tools/bindings/generators/mojom_cpp_generator.py286
-rw-r--r--chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py187
-rw-r--r--chromium/mojo/public/tools/bindings/generators/mojom_js_generator.py186
-rwxr-xr-xchromium/mojo/public/tools/bindings/generators/run_cpp_generator.py28
-rw-r--r--chromium/mojo/public/tools/bindings/mojom.gni90
-rw-r--r--chromium/mojo/public/tools/bindings/mojom_bindings_generator.gypi99
-rwxr-xr-xchromium/mojo/public/tools/bindings/mojom_bindings_generator.py179
-rw-r--r--chromium/mojo/public/tools/bindings/mojom_bindings_generator_unittest.py23
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom/__init__.py (renamed from chromium/tools/site_compare/commands/__init__.py)0
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom/error.py27
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom/generate/__init__.py (renamed from chromium/tools/site_compare/drivers/win32/__init__.py)0
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom/generate/data.py348
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom/generate/data_tests.py86
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom/generate/generator.py90
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom/generate/module.py217
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom/generate/module_tests.py34
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom/generate/pack.py150
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom/generate/pack_tests.py176
-rwxr-xr-xchromium/mojo/public/tools/bindings/pylib/mojom/generate/run_tests.py35
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom/generate/template_expander.py54
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom/generate/test_support.py193
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom/parse/__init__.py (renamed from chromium/tools/site_compare/utils/__init__.py)0
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom/parse/ast.py25
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom/parse/lexer.py277
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom/parse/parser.py323
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom/parse/translate.py144
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom_tests/__init__.py (renamed from chromium/tools/traceline/traceline/scripts/__init__.py)0
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom_tests/parse/__init__.py (renamed from chromium/tools/valgrind/asan/third_party/__init__.py)0
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom_tests/parse/lexer_unittest.py187
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom_tests/parse/parser_unittest.py493
-rwxr-xr-xchromium/mojo/public/tools/bindings/pylib/mojom_tests/parse/run_parser.py39
-rwxr-xr-xchromium/mojo/public/tools/bindings/pylib/mojom_tests/parse/run_translate.py37
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom_tests/support/__init__.py (renamed from chromium/third_party/JSON/JSON-2.59/blib/arch/auto/JSON/.exists)0
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom_tests/support/find_files.py32
-rw-r--r--chromium/mojo/public/tools/bindings/pylib/mojom_tests/support/run_bindings_generator.py47
-rw-r--r--chromium/mojo/service_manager/BUILD.gn33
-rw-r--r--chromium/mojo/service_manager/background_service_loader.cc104
-rw-r--r--chromium/mojo/service_manager/background_service_loader.h61
-rw-r--r--chromium/mojo/service_manager/service_loader.h32
-rw-r--r--chromium/mojo/service_manager/service_manager.cc206
-rw-r--r--chromium/mojo/service_manager/service_manager.h117
-rw-r--r--chromium/mojo/service_manager/service_manager_export.h32
-rw-r--r--chromium/mojo/service_manager/service_manager_unittest.cc406
-rw-r--r--chromium/mojo/service_manager/test.mojom24
-rw-r--r--chromium/mojo/services/DEPS10
-rw-r--r--chromium/mojo/services/dbus_echo/DEPS5
-rw-r--r--chromium/mojo/services/dbus_echo/dbus_echo_service.cc58
-rw-r--r--chromium/mojo/services/dbus_echo/echo.mojom11
-rw-r--r--chromium/mojo/services/gles2/DEPS5
-rw-r--r--chromium/mojo/services/gles2/command_buffer.mojom49
-rw-r--r--chromium/mojo/services/gles2/command_buffer_impl.cc198
-rw-r--r--chromium/mojo/services/gles2/command_buffer_impl.h72
-rw-r--r--chromium/mojo/services/gles2/command_buffer_type_conversions.cc40
-rw-r--r--chromium/mojo/services/gles2/command_buffer_type_conversions.h27
-rw-r--r--chromium/mojo/services/gles2/mojo_buffer_backing.cc36
-rw-r--r--chromium/mojo/services/gles2/mojo_buffer_backing.h40
-rw-r--r--chromium/mojo/services/launcher/DEPS3
-rw-r--r--chromium/mojo/services/launcher/launcher.cc176
-rw-r--r--chromium/mojo/services/native_viewport/DEPS8
-rw-r--r--chromium/mojo/services/native_viewport/native_viewport.h62
-rw-r--r--chromium/mojo/services/native_viewport/native_viewport_android.cc161
-rw-r--r--chromium/mojo/services/native_viewport/native_viewport_android.h71
-rw-r--r--chromium/mojo/services/native_viewport/native_viewport_export.h32
-rw-r--r--chromium/mojo/services/native_viewport/native_viewport_mac.mm88
-rw-r--r--chromium/mojo/services/native_viewport/native_viewport_service.cc165
-rw-r--r--chromium/mojo/services/native_viewport/native_viewport_service.h18
-rw-r--r--chromium/mojo/services/native_viewport/native_viewport_stub.cc50
-rw-r--r--chromium/mojo/services/native_viewport/native_viewport_win.cc167
-rw-r--r--chromium/mojo/services/native_viewport/native_viewport_x11.cc163
-rw-r--r--chromium/mojo/services/network/DEPS4
-rw-r--r--chromium/mojo/services/network/main.cc30
-rw-r--r--chromium/mojo/services/network/network_context.cc123
-rw-r--r--chromium/mojo/services/network/network_context.h42
-rw-r--r--chromium/mojo/services/network/network_service_impl.cc23
-rw-r--r--chromium/mojo/services/network/network_service_impl.h29
-rw-r--r--chromium/mojo/services/network/url_loader_impl.cc253
-rw-r--r--chromium/mojo/services/network/url_loader_impl.h61
-rw-r--r--chromium/mojo/services/public/cpp/geometry/DEPS3
-rw-r--r--chromium/mojo/services/public/cpp/geometry/geometry_type_converters.h37
-rw-r--r--chromium/mojo/services/public/cpp/geometry/lib/geometry_type_converters.cc58
-rw-r--r--chromium/mojo/services/public/cpp/geometry/mojo_geometry_export.h32
-rw-r--r--chromium/mojo/services/public/cpp/input_events/DEPS3
-rw-r--r--chromium/mojo/services/public/cpp/input_events/input_events_type_converters.h30
-rw-r--r--chromium/mojo/services/public/cpp/input_events/lib/input_events_type_converters.cc68
-rw-r--r--chromium/mojo/services/public/cpp/input_events/mojo_input_events_export.h32
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/DEPS4
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/lib/DEPS11
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/lib/node.cc432
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/lib/node_observer.cc23
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/lib/node_private.cc23
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/lib/node_private.h62
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/lib/view.cc97
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc841
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h162
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.cc24
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.h28
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/lib/view_manager_unittests.cc14
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/lib/view_private.cc23
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/lib/view_private.h44
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/node.h108
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/node_observer.h66
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/types.h27
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/util.h32
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/view.h60
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/view_manager.h44
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/view_manager_delegate.h25
-rw-r--r--chromium/mojo/services/public/cpp/view_manager/view_observer.h37
-rw-r--r--chromium/mojo/services/public/interfaces/geometry/geometry.mojom34
-rw-r--r--chromium/mojo/services/public/interfaces/input_events/input_events.mojom27
-rw-r--r--chromium/mojo/services/public/interfaces/launcher/launcher.mojom36
-rw-r--r--chromium/mojo/services/public/interfaces/native_viewport/native_viewport.mojom28
-rw-r--r--chromium/mojo/services/public/interfaces/navigation/navigation.mojom36
-rw-r--r--chromium/mojo/services/public/interfaces/network/network_error.mojom12
-rw-r--r--chromium/mojo/services/public/interfaces/network/network_service.mojom15
-rw-r--r--chromium/mojo/services/public/interfaces/network/url_loader.mojom94
-rw-r--r--chromium/mojo/services/public/interfaces/surfaces/quads.mojom165
-rw-r--r--chromium/mojo/services/public/interfaces/surfaces/surface_id.mojom11
-rw-r--r--chromium/mojo/services/public/interfaces/surfaces/surfaces.mojom57
-rw-r--r--chromium/mojo/services/public/interfaces/view_manager/view_manager.mojom193
-rw-r--r--chromium/mojo/services/public/interfaces/view_manager/view_manager_constants.mojom12
-rw-r--r--chromium/mojo/services/test_service/test_service.mojom11
-rw-r--r--chromium/mojo/services/test_service/test_service_application.cc44
-rw-r--r--chromium/mojo/services/test_service/test_service_application.h33
-rw-r--r--chromium/mojo/services/test_service/test_service_impl.cc32
-rw-r--r--chromium/mojo/services/test_service/test_service_impl.h35
-rw-r--r--chromium/mojo/services/view_manager/DEPS22
-rw-r--r--chromium/mojo/services/view_manager/context_factory_impl.cc75
-rw-r--r--chromium/mojo/services/view_manager/context_factory_impl.h56
-rw-r--r--chromium/mojo/services/view_manager/ids.h94
-rw-r--r--chromium/mojo/services/view_manager/main.cc35
-rw-r--r--chromium/mojo/services/view_manager/node.cc189
-rw-r--r--chromium/mojo/services/view_manager/node.h112
-rw-r--r--chromium/mojo/services/view_manager/node_delegate.h45
-rw-r--r--chromium/mojo/services/view_manager/root_node_manager.cc265
-rw-r--r--chromium/mojo/services/view_manager/root_node_manager.h224
-rw-r--r--chromium/mojo/services/view_manager/root_view_manager.cc159
-rw-r--r--chromium/mojo/services/view_manager/root_view_manager.h72
-rw-r--r--chromium/mojo/services/view_manager/root_view_manager_delegate.h27
-rw-r--r--chromium/mojo/services/view_manager/screen_impl.cc80
-rw-r--r--chromium/mojo/services/view_manager/screen_impl.h58
-rw-r--r--chromium/mojo/services/view_manager/test_change_tracker.cc263
-rw-r--r--chromium/mojo/services/view_manager/test_change_tracker.h134
-rw-r--r--chromium/mojo/services/view_manager/view.cc28
-rw-r--r--chromium/mojo/services/view_manager/view.h50
-rw-r--r--chromium/mojo/services/view_manager/view_manager_export.h31
-rw-r--r--chromium/mojo/services/view_manager/view_manager_init_service_impl.cc62
-rw-r--r--chromium/mojo/services/view_manager/view_manager_init_service_impl.h79
-rw-r--r--chromium/mojo/services/view_manager/view_manager_service_impl.cc803
-rw-r--r--chromium/mojo/services/view_manager/view_manager_service_impl.h269
-rw-r--r--chromium/mojo/services/view_manager/view_manager_unittest.cc1370
-rw-r--r--chromium/mojo/services/view_manager/window_tree_host_impl.cc177
-rw-r--r--chromium/mojo/services/view_manager/window_tree_host_impl.h76
-rw-r--r--chromium/mojo/shell/DEPS6
-rw-r--r--chromium/mojo/shell/android/DEPS3
-rw-r--r--chromium/mojo/shell/android/apk/AndroidManifest.xml28
-rw-r--r--chromium/mojo/shell/android/apk/res/layout/mojo_shell_activity.xml13
-rw-r--r--chromium/mojo/shell/android/apk/res/values/strings.xml10
-rw-r--r--chromium/mojo/shell/android/library_loader.cc46
-rw-r--r--chromium/mojo/shell/android/mojo_main.cc80
-rw-r--r--chromium/mojo/shell/android/mojo_main.h16
-rw-r--r--chromium/mojo/shell/app_child_process.cc289
-rw-r--r--chromium/mojo/shell/app_child_process.h30
-rw-r--r--chromium/mojo/shell/app_child_process.mojom17
-rw-r--r--chromium/mojo/shell/app_child_process_host.cc63
-rw-r--r--chromium/mojo/shell/app_child_process_host.h55
-rw-r--r--chromium/mojo/shell/child_process.cc58
-rw-r--r--chromium/mojo/shell/child_process.h57
-rw-r--r--chromium/mojo/shell/child_process_host.cc105
-rw-r--r--chromium/mojo/shell/child_process_host.h84
-rw-r--r--chromium/mojo/shell/child_process_host_unittest.cc56
-rw-r--r--chromium/mojo/shell/context.cc141
-rw-r--r--chromium/mojo/shell/context.h62
-rw-r--r--chromium/mojo/shell/dbus_service_loader_linux.cc181
-rw-r--r--chromium/mojo/shell/dbus_service_loader_linux.h89
-rw-r--r--chromium/mojo/shell/desktop/mojo_main.cc56
-rw-r--r--chromium/mojo/shell/dynamic_service_loader.cc186
-rw-r--r--chromium/mojo/shell/dynamic_service_loader.h51
-rw-r--r--chromium/mojo/shell/dynamic_service_runner.h57
-rw-r--r--chromium/mojo/shell/external_service.mojom11
-rw-r--r--chromium/mojo/shell/in_process_dynamic_service_runner.cc102
-rw-r--r--chromium/mojo/shell/in_process_dynamic_service_runner.h52
-rw-r--r--chromium/mojo/shell/init.cc24
-rw-r--r--chromium/mojo/shell/init.h18
-rw-r--r--chromium/mojo/shell/keep_alive.cc34
-rw-r--r--chromium/mojo/shell/keep_alive.h44
-rw-r--r--chromium/mojo/shell/mojo_url_resolver.cc78
-rw-r--r--chromium/mojo/shell/mojo_url_resolver.h49
-rw-r--r--chromium/mojo/shell/out_of_process_dynamic_service_runner.cc64
-rw-r--r--chromium/mojo/shell/out_of_process_dynamic_service_runner.h55
-rw-r--r--chromium/mojo/shell/run.cc33
-rw-r--r--chromium/mojo/shell/run.h22
-rw-r--r--chromium/mojo/shell/shell_test_base.cc63
-rw-r--r--chromium/mojo/shell/shell_test_base.h58
-rw-r--r--chromium/mojo/shell/shell_test_base_unittest.cc110
-rw-r--r--chromium/mojo/shell/shell_test_helper.cc52
-rw-r--r--chromium/mojo/shell/shell_test_helper.h61
-rw-r--r--chromium/mojo/shell/shell_test_main.cc31
-rw-r--r--chromium/mojo/shell/switches.cc30
-rw-r--r--chromium/mojo/shell/switches.h19
-rw-r--r--chromium/mojo/shell/task_runners.cc38
-rw-r--r--chromium/mojo/shell/task_runners.h53
-rw-r--r--chromium/mojo/shell/test_child_process.cc28
-rw-r--r--chromium/mojo/shell/test_child_process.h28
-rw-r--r--chromium/mojo/shell/view_manager_loader.cc36
-rw-r--r--chromium/mojo/shell/view_manager_loader.h41
-rw-r--r--chromium/mojo/spy/DEPS (renamed from chromium/components/auto_login_parser/DEPS)0
-rw-r--r--chromium/mojo/spy/PRESUBMIT.py40
-rwxr-xr-xchromium/mojo/spy/run_ui_dev_server22
-rwxr-xr-xchromium/mojo/spy/run_ui_tests23
-rw-r--r--chromium/mojo/spy/spy.cc215
-rw-r--r--chromium/mojo/spy/spy.h40
-rw-r--r--chromium/mojo/spy/ui/__init__.py5
-rw-r--r--chromium/mojo/spy/ui/dev_server.py23
-rw-r--r--chromium/mojo/spy/ui/spy.html35
-rw-r--r--chromium/mojo/spy/ui/spy.js96
-rw-r--r--chromium/mojo/spy/ui/spy_project.py18
-rw-r--r--chromium/mojo/spy/ui/spy_shell.html38
-rw-r--r--chromium/mojo/spy/ui/spy_shell.js68
-rwxr-xr-xchromium/mojo/spy/ui/spy_shell_to_html13
-rw-r--r--chromium/mojo/spy/ui/spy_shell_to_html.py39
-rw-r--r--chromium/mojo/spy/ui/spy_test.js51
-rw-r--r--chromium/mojo/spy/ui/tvcm_stub.py18
-rw-r--r--chromium/mojo/spy/ui/ui_unittest.py15
-rw-r--r--chromium/mojo/spy/websocket_server.cc70
-rw-r--r--chromium/mojo/spy/websocket_server.h44
-rw-r--r--chromium/mojo/system/BUILD.gn109
-rw-r--r--chromium/mojo/system/channel.cc505
-rw-r--r--chromium/mojo/system/channel.h202
-rw-r--r--chromium/mojo/system/channel_unittest.cc329
-rw-r--r--chromium/mojo/system/constants.h48
-rw-r--r--chromium/mojo/system/core.cc561
-rw-r--r--chromium/mojo/system/core.h131
-rw-r--r--chromium/mojo/system/core_test_base.cc349
-rw-r--r--chromium/mojo/system/core_test_base.h105
-rw-r--r--chromium/mojo/system/core_unittest.cc888
-rw-r--r--chromium/mojo/system/data_pipe.cc403
-rw-r--r--chromium/mojo/system/data_pipe.h205
-rw-r--r--chromium/mojo/system/data_pipe_consumer_dispatcher.cc130
-rw-r--r--chromium/mojo/system/data_pipe_consumer_dispatcher.h62
-rw-r--r--chromium/mojo/system/data_pipe_producer_dispatcher.cc109
-rw-r--r--chromium/mojo/system/data_pipe_producer_dispatcher.h64
-rw-r--r--chromium/mojo/system/data_pipe_unittest.cc360
-rw-r--r--chromium/mojo/system/dispatcher.cc461
-rw-r--r--chromium/mojo/system/dispatcher.h379
-rw-r--r--chromium/mojo/system/dispatcher_unittest.cc274
-rw-r--r--chromium/mojo/system/entrypoints.cc158
-rw-r--r--chromium/mojo/system/entrypoints.h24
-rw-r--r--chromium/mojo/system/handle_signals_state.h50
-rw-r--r--chromium/mojo/system/handle_table.cc237
-rw-r--r--chromium/mojo/system/handle_table.h144
-rw-r--r--chromium/mojo/system/local_data_pipe.cc332
-rw-r--r--chromium/mojo/system/local_data_pipe.h84
-rw-r--r--chromium/mojo/system/local_data_pipe_unittest.cc1644
-rw-r--r--chromium/mojo/system/local_message_pipe_endpoint.cc165
-rw-r--r--chromium/mojo/system/local_message_pipe_endpoint.h63
-rw-r--r--chromium/mojo/system/mapping_table.cc48
-rw-r--r--chromium/mojo/system/mapping_table.h57
-rw-r--r--chromium/mojo/system/memory.cc99
-rw-r--r--chromium/mojo/system/memory.h56
-rw-r--r--chromium/mojo/system/memory_unittest.cc136
-rw-r--r--chromium/mojo/system/message_in_transit.cc206
-rw-r--r--chromium/mojo/system/message_in_transit.h258
-rw-r--r--chromium/mojo/system/message_in_transit_queue.cc33
-rw-r--r--chromium/mojo/system/message_in_transit_queue.h69
-rw-r--r--chromium/mojo/system/message_pipe.cc285
-rw-r--r--chromium/mojo/system/message_pipe.h122
-rw-r--r--chromium/mojo/system/message_pipe_dispatcher.cc281
-rw-r--r--chromium/mojo/system/message_pipe_dispatcher.h131
-rw-r--r--chromium/mojo/system/message_pipe_dispatcher_unittest.cc598
-rw-r--r--chromium/mojo/system/message_pipe_endpoint.cc56
-rw-r--r--chromium/mojo/system/message_pipe_endpoint.h93
-rw-r--r--chromium/mojo/system/message_pipe_unittest.cc525
-rw-r--r--chromium/mojo/system/multiprocess_message_pipe_unittest.cc555
-rw-r--r--chromium/mojo/system/options_validation.h123
-rw-r--r--chromium/mojo/system/options_validation_unittest.cc190
-rw-r--r--chromium/mojo/system/platform_handle_dispatcher.cc123
-rw-r--r--chromium/mojo/system/platform_handle_dispatcher.h64
-rw-r--r--chromium/mojo/system/platform_handle_dispatcher_unittest.cc102
-rw-r--r--chromium/mojo/system/proxy_message_pipe_endpoint.cc148
-rw-r--r--chromium/mojo/system/proxy_message_pipe_endpoint.h104
-rw-r--r--chromium/mojo/system/raw_channel.cc500
-rw-r--r--chromium/mojo/system/raw_channel.h315
-rw-r--r--chromium/mojo/system/raw_channel_posix.cc469
-rw-r--r--chromium/mojo/system/raw_channel_unittest.cc689
-rw-r--r--chromium/mojo/system/raw_channel_win.cc568
-rw-r--r--chromium/mojo/system/raw_shared_buffer.cc86
-rw-r--r--chromium/mojo/system/raw_shared_buffer.h137
-rw-r--r--chromium/mojo/system/raw_shared_buffer_posix.cc151
-rw-r--r--chromium/mojo/system/raw_shared_buffer_unittest.cc181
-rw-r--r--chromium/mojo/system/raw_shared_buffer_win.cc88
-rw-r--r--chromium/mojo/system/remote_message_pipe_unittest.cc843
-rw-r--r--chromium/mojo/system/shared_buffer_dispatcher.cc272
-rw-r--r--chromium/mojo/system/shared_buffer_dispatcher.h98
-rw-r--r--chromium/mojo/system/shared_buffer_dispatcher_unittest.cc268
-rw-r--r--chromium/mojo/system/simple_dispatcher.cc49
-rw-r--r--chromium/mojo/system/simple_dispatcher.h53
-rw-r--r--chromium/mojo/system/simple_dispatcher_unittest.cc541
-rw-r--r--chromium/mojo/system/system_impl_export.h29
-rw-r--r--chromium/mojo/system/test_utils.cc96
-rw-r--r--chromium/mojo/system/test_utils.h100
-rw-r--r--chromium/mojo/system/transport_data.cc345
-rw-r--r--chromium/mojo/system/transport_data.h192
-rw-r--r--chromium/mojo/system/waiter.cc98
-rw-r--r--chromium/mojo/system/waiter.h81
-rw-r--r--chromium/mojo/system/waiter_list.cc57
-rw-r--r--chromium/mojo/system/waiter_list.h58
-rw-r--r--chromium/mojo/system/waiter_list_unittest.cc297
-rw-r--r--chromium/mojo/system/waiter_test_utils.cc66
-rw-r--r--chromium/mojo/system/waiter_test_utils.h101
-rw-r--r--chromium/mojo/system/waiter_unittest.cc303
-rwxr-xr-xchromium/mojo/tools/check_mojom_golden_files.py99
-rw-r--r--chromium/mojo/tools/data/unittests26
-rw-r--r--chromium/mojo/tools/generate_java_callback_interfaces.py59
-rw-r--r--chromium/mojo/tools/message_generator.cc63
-rwxr-xr-xchromium/mojo/tools/mojob.sh186
-rwxr-xr-xchromium/mojo/tools/mojosh.sh71
-rw-r--r--chromium/mojo/tools/pylib/transitive_hash.py89
-rwxr-xr-xchromium/mojo/tools/run_mojo_python_tests.py74
-rwxr-xr-xchromium/mojo/tools/test_runner.py116
-rw-r--r--chromium/mojo/views/DEPS9
-rw-r--r--chromium/mojo/views/native_widget_view_manager.cc131
-rw-r--r--chromium/mojo/views/native_widget_view_manager.h61
-rw-r--r--chromium/mojo/views/views_init.cc27
-rw-r--r--chromium/mojo/views/views_init.h26
-rw-r--r--chromium/native_client/build/all.gyp1
-rw-r--r--chromium/native_client/build/android_settings.gypi216
-rw-r--r--chromium/native_client/build/common.gypi205
-rw-r--r--chromium/native_client/build/nacl_core_sdk.gyp22
-rw-r--r--chromium/native_client/build/standalone_flags.gypi1
-rwxr-xr-xchromium/native_client/build/untrusted.gypi971
-rw-r--r--chromium/native_client/src/shared/gio/gio.gyp2
-rw-r--r--chromium/native_client/src/shared/imc/imc.gyp36
-rw-r--r--chromium/native_client/src/shared/platform/platform.gyp8
-rw-r--r--chromium/native_client/src/shared/srpc/srpc.gyp1
-rw-r--r--chromium/native_client/src/third_party/gtest/gtest.gyp (renamed from chromium/native_client/src/third_party_mod/gtest/gtest.gyp)0
-rw-r--r--chromium/native_client/src/tools/tls_edit/tls_edit.gyp23
-rw-r--r--chromium/native_client/src/trusted/debug_stub/debug_stub.gyp6
-rw-r--r--chromium/native_client/src/trusted/desc/desc.gyp9
-rw-r--r--chromium/native_client/src/trusted/desc_cacheability/desc_cacheability.gyp51
-rw-r--r--chromium/native_client/src/trusted/nonnacl_util/nonnacl_util.gyp2
-rw-r--r--chromium/native_client/src/trusted/platform_qualify/platform_qualify.gyp3
-rw-r--r--chromium/native_client/src/trusted/service_runtime/linux/nacl_bootstrap.gyp43
-rw-r--r--chromium/native_client/src/trusted/service_runtime/service_runtime.gyp19
-rw-r--r--chromium/native_client/src/trusted/validator_ragel/rdfa_validator.gyp2
-rw-r--r--chromium/native_client/src/trusted/weak_ref/weak_ref.gyp34
-rw-r--r--chromium/native_client/src/untrusted/irt/check_tls.gypi87
-rw-r--r--chromium/native_client/src/untrusted/irt/irt.gyp20
-rw-r--r--chromium/native_client/src/untrusted/irt/irt_test.gyp14
-rw-r--r--chromium/native_client/src/untrusted/nacl/nacl.gyp3
-rw-r--r--chromium/native_client/src/untrusted/pthread/pthread.gyp22
-rw-r--r--chromium/native_client/tools.gyp112
-rw-r--r--chromium/net/BUILD.gn1295
-rw-r--r--chromium/net/DEPS43
-rw-r--r--chromium/net/OWNERS8
-rw-r--r--chromium/net/PRESUBMIT.py19
-rw-r--r--chromium/net/android/OWNERS1
-rw-r--r--chromium/net/android/android_private_key.cc25
-rw-r--r--chromium/net/android/android_private_key.h28
-rw-r--r--chromium/net/android/cert_verify_result_android.cc40
-rw-r--r--chromium/net/android/cert_verify_result_android.h24
-rw-r--r--chromium/net/android/cert_verify_result_android_list.h31
-rw-r--r--chromium/net/android/cert_verify_status_android_list.h31
-rw-r--r--chromium/net/android/keystore.cc51
-rw-r--r--chromium/net/android/keystore.h2
-rw-r--r--chromium/net/android/keystore_openssl.cc49
-rw-r--r--chromium/net/android/keystore_unittest.cc6
-rw-r--r--chromium/net/android/network_change_notifier_android.cc52
-rw-r--r--chromium/net/android/network_change_notifier_android.h3
-rw-r--r--chromium/net/android/network_change_notifier_delegate_android.cc1
-rw-r--r--chromium/net/android/network_library.cc36
-rw-r--r--chromium/net/android/network_library.h17
-rw-r--r--chromium/net/base/address_family.h1
-rw-r--r--chromium/net/base/address_tracker_linux.cc101
-rw-r--r--chromium/net/base/address_tracker_linux.h40
-rw-r--r--chromium/net/base/address_tracker_linux_unittest.cc165
-rw-r--r--chromium/net/base/backoff_entry.cc41
-rw-r--r--chromium/net/base/backoff_entry_unittest.cc18
-rw-r--r--chromium/net/base/big_endian.cc98
-rw-r--r--chromium/net/base/big_endian.h103
-rw-r--r--chromium/net/base/big_endian_unittest.cc100
-rw-r--r--chromium/net/base/capturing_net_log.cc10
-rw-r--r--chromium/net/base/capturing_net_log.h2
-rw-r--r--chromium/net/base/data_url.cc8
-rw-r--r--chromium/net/base/data_url_unittest.cc7
-rw-r--r--chromium/net/base/directory_lister_unittest.cc11
-rw-r--r--chromium/net/base/dns_reloader.cc2
-rw-r--r--chromium/net/base/escape.cc231
-rw-r--r--chromium/net/base/escape.h34
-rw-r--r--chromium/net/base/escape_unittest.cc138
-rw-r--r--chromium/net/base/file_stream.cc222
-rw-r--r--chromium/net/base/file_stream.h135
-rw-r--r--chromium/net/base/file_stream_context.cc197
-rw-r--r--chromium/net/base/file_stream_context.h64
-rw-r--r--chromium/net/base/file_stream_context_posix.cc80
-rw-r--r--chromium/net/base/file_stream_context_win.cc99
-rw-r--r--chromium/net/base/file_stream_metrics.cc103
-rw-r--r--chromium/net/base/file_stream_metrics.h44
-rw-r--r--chromium/net/base/file_stream_metrics_posix.cc21
-rw-r--r--chromium/net/base/file_stream_metrics_win.cc146
-rw-r--r--chromium/net/base/file_stream_net_log_parameters.cc25
-rw-r--r--chromium/net/base/file_stream_net_log_parameters.h27
-rw-r--r--chromium/net/base/file_stream_unittest.cc678
-rw-r--r--chromium/net/base/filename_util.cc163
-rw-r--r--chromium/net/base/filename_util.h116
-rw-r--r--chromium/net/base/filename_util_icu.cc90
-rw-r--r--chromium/net/base/filename_util_internal.cc318
-rw-r--r--chromium/net/base/filename_util_internal.h62
-rw-r--r--chromium/net/base/filename_util_unittest.cc1652
-rw-r--r--chromium/net/base/filename_util_unsafe.cc51
-rw-r--r--chromium/net/base/filename_util_unsafe.h30
-rw-r--r--chromium/net/base/filter.cc400
-rw-r--r--chromium/net/base/filter.h276
-rw-r--r--chromium/net/base/filter_unittest.cc350
-rw-r--r--chromium/net/base/gzip_filter.cc298
-rw-r--r--chromium/net/base/gzip_filter.h151
-rw-r--r--chromium/net/base/gzip_filter_unittest.cc387
-rw-r--r--chromium/net/base/gzip_header.cc181
-rw-r--r--chromium/net/base/gzip_header.h94
-rw-r--r--chromium/net/base/host_mapping_rules.cc2
-rw-r--r--chromium/net/base/host_mapping_rules.h4
-rw-r--r--chromium/net/base/host_port_pair.cc10
-rw-r--r--chromium/net/base/host_port_pair_unittest.cc77
-rw-r--r--chromium/net/base/int128.cc4
-rw-r--r--chromium/net/base/int128_unittest.cc18
-rw-r--r--chromium/net/base/io_buffer.h2
-rw-r--r--chromium/net/base/ip_endpoint.h2
-rw-r--r--chromium/net/base/ip_pattern.cc188
-rw-r--r--chromium/net/base/ip_pattern.h70
-rw-r--r--chromium/net/base/ip_pattern_unittest.cc160
-rw-r--r--chromium/net/base/keygen_handler_unittest.cc4
-rw-r--r--chromium/net/base/keygen_handler_win.cc2
-rw-r--r--chromium/net/base/load_timing_info.h4
-rw-r--r--chromium/net/base/mime_util.cc155
-rw-r--r--chromium/net/base/mime_util.h26
-rw-r--r--chromium/net/base/mime_util_unittest.cc194
-rw-r--r--chromium/net/base/mock_file_stream.cc128
-rw-r--r--chromium/net/base/mock_file_stream.h54
-rw-r--r--chromium/net/base/mock_filter_context.cc45
-rw-r--r--chromium/net/base/mock_filter_context.h70
-rw-r--r--chromium/net/base/net_error_list.h49
-rw-r--r--chromium/net/base/net_errors.cc11
-rw-r--r--chromium/net/base/net_errors.h10
-rw-r--r--chromium/net/base/net_log.cc74
-rw-r--r--chromium/net/base/net_log.h61
-rw-r--r--chromium/net/base/net_log_event_type_list.h200
-rw-r--r--chromium/net/base/net_log_logger.cc46
-rw-r--r--chromium/net/base/net_log_logger.h10
-rw-r--r--chromium/net/base/net_log_logger_unittest.cc24
-rw-r--r--chromium/net/base/net_log_source_type_list.h2
-rw-r--r--chromium/net/base/net_log_unittest.cc97
-rw-r--r--chromium/net/base/net_string_util.h42
-rw-r--r--chromium/net/base/net_string_util_icu.cc62
-rw-r--r--chromium/net/base/net_string_util_icu_alternatives_android.cc115
-rw-r--r--chromium/net/base/net_string_util_icu_alternatives_android.h18
-rw-r--r--chromium/net/base/net_util.cc1384
-rw-r--r--chromium/net/base/net_util.h144
-rw-r--r--chromium/net/base/net_util_icu.cc830
-rw-r--r--chromium/net/base/net_util_icu_unittest.cc1071
-rw-r--r--chromium/net/base/net_util_posix.cc177
-rw-r--r--chromium/net/base/net_util_unittest.cc2699
-rw-r--r--chromium/net/base/net_util_win.cc118
-rw-r--r--chromium/net/base/network_change_notifier.cc93
-rw-r--r--chromium/net/base/network_change_notifier.h20
-rw-r--r--chromium/net/base/network_change_notifier_linux.cc3
-rw-r--r--chromium/net/base/network_change_notifier_mac.cc3
-rw-r--r--chromium/net/base/network_change_notifier_win.cc8
-rw-r--r--chromium/net/base/network_change_notifier_win.h2
-rw-r--r--chromium/net/base/network_change_notifier_win_unittest.cc4
-rw-r--r--chromium/net/base/network_delegate.cc23
-rw-r--r--chromium/net/base/network_delegate.h44
-rw-r--r--chromium/net/base/network_time_notifier.cc91
-rw-r--r--chromium/net/base/network_time_notifier.h84
-rw-r--r--chromium/net/base/nss_memio.c11
-rw-r--r--chromium/net/base/nss_memio.h11
-rw-r--r--chromium/net/base/platform_mime_util_win.cc5
-rw-r--r--chromium/net/base/privacy_mode.h7
-rw-r--r--chromium/net/base/registry_controlled_domains/BUILD.gn23
-rw-r--r--chromium/net/base/registry_controlled_domains/effective_tld_names.cc47055
-rw-r--r--chromium/net/base/registry_controlled_domains/effective_tld_names.dat1111
-rw-r--r--chromium/net/base/registry_controlled_domains/effective_tld_names.gperf369
-rw-r--r--chromium/net/base/registry_controlled_domains/effective_tld_names_unittest1.cc218
-rw-r--r--chromium/net/base/registry_controlled_domains/effective_tld_names_unittest2.cc161
-rw-r--r--chromium/net/base/registry_controlled_domains/effective_tld_names_unittest3.gperf13
-rw-r--r--chromium/net/base/registry_controlled_domains/effective_tld_names_unittest4.gperf523
-rw-r--r--chromium/net/base/registry_controlled_domains/effective_tld_names_unittest5.gperf9
-rw-r--r--chromium/net/base/registry_controlled_domains/effective_tld_names_unittest6.gperf9
-rw-r--r--chromium/net/base/registry_controlled_domains/registry_controlled_domain.cc241
-rw-r--r--chromium/net/base/registry_controlled_domains/registry_controlled_domain.h9
-rw-r--r--chromium/net/base/registry_controlled_domains/registry_controlled_domain_unittest.cc188
-rw-r--r--chromium/net/base/request_priority.h4
-rw-r--r--chromium/net/base/sdch_dictionary_fetcher.cc105
-rw-r--r--chromium/net/base/sdch_dictionary_fetcher.h99
-rw-r--r--chromium/net/base/sdch_filter.cc388
-rw-r--r--chromium/net/base/sdch_filter.h128
-rw-r--r--chromium/net/base/sdch_filter_unittest.cc1393
-rw-r--r--chromium/net/base/sdch_manager.cc144
-rw-r--r--chromium/net/base/sdch_manager.h48
-rw-r--r--chromium/net/base/sdch_manager_unittest.cc478
-rw-r--r--chromium/net/base/static_cookie_policy.cc6
-rw-r--r--chromium/net/base/static_cookie_policy.h2
-rw-r--r--chromium/net/base/static_cookie_policy_unittest.cc16
-rw-r--r--chromium/net/base/upload_data.cc37
-rw-r--r--chromium/net/base/upload_data.h83
-rw-r--r--chromium/net/base/upload_data_stream_unittest.cc20
-rw-r--r--chromium/net/base/upload_file_element_reader.cc290
-rw-r--r--chromium/net/base/upload_file_element_reader.h63
-rw-r--r--chromium/net/base/upload_file_element_reader_unittest.cc137
-rw-r--r--chromium/net/base/url_util.cc14
-rw-r--r--chromium/net/base/url_util.h6
-rw-r--r--chromium/net/cert/cert_database.cc4
-rw-r--r--chromium/net/cert/cert_database.h16
-rw-r--r--chromium/net/cert/cert_database_android.cc4
-rw-r--r--chromium/net/cert/cert_database_mac.cc2
-rw-r--r--chromium/net/cert/cert_database_nss.cc19
-rw-r--r--chromium/net/cert/cert_status_flags.cc8
-rw-r--r--chromium/net/cert/cert_status_flags.h27
-rw-r--r--chromium/net/cert/cert_status_flags_list.h31
-rw-r--r--chromium/net/cert/cert_verify_proc.cc59
-rw-r--r--chromium/net/cert/cert_verify_proc_android.cc56
-rw-r--r--chromium/net/cert/cert_verify_proc_mac.cc30
-rw-r--r--chromium/net/cert/cert_verify_proc_nss.cc83
-rw-r--r--chromium/net/cert/cert_verify_proc_nss.h13
-rw-r--r--chromium/net/cert/cert_verify_proc_openssl.cc28
-rw-r--r--chromium/net/cert/cert_verify_proc_unittest.cc132
-rw-r--r--chromium/net/cert/cert_verify_proc_win.cc18
-rw-r--r--chromium/net/cert/crl_set.cc52
-rw-r--r--chromium/net/cert/crl_set.h4
-rw-r--r--chromium/net/cert/ct_log_response_parser.cc140
-rw-r--r--chromium/net/cert/ct_log_response_parser.h27
-rw-r--r--chromium/net/cert/ct_log_response_parser_unittest.cc106
-rw-r--r--chromium/net/cert/ct_log_verifier.cc41
-rw-r--r--chromium/net/cert/ct_log_verifier.h14
-rw-r--r--chromium/net/cert/ct_log_verifier_nss.cc2
-rw-r--r--chromium/net/cert/ct_log_verifier_openssl.cc1
-rw-r--r--chromium/net/cert/ct_log_verifier_unittest.cc14
-rw-r--r--chromium/net/cert/ct_serialization.cc24
-rw-r--r--chromium/net/cert/ct_serialization.h8
-rw-r--r--chromium/net/cert/ct_serialization_unittest.cc24
-rw-r--r--chromium/net/cert/ct_signed_certificate_timestamp_log_param.cc2
-rw-r--r--chromium/net/cert/jwk_serializer_nss.cc2
-rw-r--r--chromium/net/cert/multi_log_ct_verifier.cc44
-rw-r--r--chromium/net/cert/multi_log_ct_verifier_unittest.cc174
-rw-r--r--chromium/net/cert/multi_threaded_cert_verifier.cc61
-rw-r--r--chromium/net/cert/multi_threaded_cert_verifier.h3
-rw-r--r--chromium/net/cert/nss_cert_database.cc177
-rw-r--r--chromium/net/cert/nss_cert_database.h86
-rw-r--r--chromium/net/cert/nss_cert_database_chromeos.cc91
-rw-r--r--chromium/net/cert/nss_cert_database_chromeos.h53
-rw-r--r--chromium/net/cert/nss_cert_database_chromeos_unittest.cc279
-rw-r--r--chromium/net/cert/nss_cert_database_unittest.cc57
-rw-r--r--chromium/net/cert/nss_profile_filter_chromeos.cc141
-rw-r--r--chromium/net/cert/nss_profile_filter_chromeos.h71
-rw-r--r--chromium/net/cert/nss_profile_filter_chromeos_unittest.cc192
-rw-r--r--chromium/net/cert/pem_tokenizer.cc4
-rw-r--r--chromium/net/cert/scoped_nss_types.h10
-rw-r--r--chromium/net/cert/sct_status_flags.h6
-rw-r--r--chromium/net/cert/signed_certificate_timestamp.cc6
-rw-r--r--chromium/net/cert/signed_certificate_timestamp.h9
-rw-r--r--chromium/net/cert/signed_tree_head.h40
-rw-r--r--chromium/net/cert/test_root_certs.h23
-rw-r--r--chromium/net/cert/test_root_certs_nss.cc11
-rw-r--r--chromium/net/cert/test_root_certs_openssl.cc22
-rw-r--r--chromium/net/cert/test_root_certs_unittest.cc33
-rw-r--r--chromium/net/cert/x509_cert_types_mac.cc23
-rw-r--r--chromium/net/cert/x509_cert_types_win.cc4
-rw-r--r--chromium/net/cert/x509_certificate.cc5
-rw-r--r--chromium/net/cert/x509_certificate.h8
-rw-r--r--chromium/net/cert/x509_certificate_mac.cc42
-rw-r--r--chromium/net/cert/x509_certificate_win.cc11
-rw-r--r--chromium/net/cert/x509_util_android.cc13
-rw-r--r--chromium/net/cert/x509_util_nss.cc2
-rw-r--r--chromium/net/cookies/canonical_cookie.cc30
-rw-r--r--chromium/net/cookies/canonical_cookie.h9
-rw-r--r--chromium/net/cookies/cookie_monster.cc120
-rw-r--r--chromium/net/cookies/cookie_monster.h94
-rw-r--r--chromium/net/cookies/cookie_monster_store_test.cc2
-rw-r--r--chromium/net/cookies/cookie_monster_store_test.h8
-rw-r--r--chromium/net/cookies/cookie_monster_unittest.cc83
-rw-r--r--chromium/net/cookies/cookie_store.h24
-rw-r--r--chromium/net/cookies/cookie_store_test_callbacks.cc10
-rw-r--r--chromium/net/cookies/cookie_store_test_callbacks.h32
-rw-r--r--chromium/net/cookies/cookie_store_test_helpers.cc14
-rw-r--r--chromium/net/cookies/cookie_store_test_helpers.h10
-rw-r--r--chromium/net/cookies/cookie_store_unittest.h72
-rw-r--r--chromium/net/cookies/cookie_util.cc5
-rw-r--r--chromium/net/data/ftp/dir-listing-ls-32.expected196
-rw-r--r--chromium/net/data/spdy_tests/examples_07.hpackbin0 -> 5617 bytes
-rw-r--r--chromium/net/data/ssl/certificates/1024-rsa-ee-by-secp256k1-ecdsa-intermediate.pem44
-rw-r--r--chromium/net/data/ssl/certificates/2048-rsa-ee-by-secp256k1-ecdsa-intermediate.pem56
-rw-r--r--chromium/net/data/ssl/certificates/768-rsa-ee-by-secp256k1-ecdsa-intermediate.pem42
-rw-r--r--chromium/net/data/ssl/certificates/README7
-rw-r--r--chromium/net/data/ssl/certificates/multi-root-chain1.pem328
-rw-r--r--chromium/net/data/ssl/certificates/multi-root-chain2.pem328
-rwxr-xr-xchromium/net/data/ssl/scripts/generate-aia-certs.sh17
-rwxr-xr-xchromium/net/data/ssl/scripts/generate-bad-eku-certs.sh39
-rwxr-xr-xchromium/net/data/ssl/scripts/generate-client-certificates.sh23
-rwxr-xr-xchromium/net/data/ssl/scripts/generate-cross-signed-certs.sh6
-rwxr-xr-xchromium/net/data/ssl/scripts/generate-duplicate-cn-certs.sh41
-rwxr-xr-xchromium/net/data/ssl/scripts/generate-multi-root-test-chains.sh161
-rwxr-xr-xchromium/net/data/ssl/scripts/generate-policy-certs.sh13
-rwxr-xr-xchromium/net/data/ssl/scripts/generate-redundant-test-chains.sh79
-rwxr-xr-xchromium/net/data/ssl/scripts/generate-test-certs.sh20
-rwxr-xr-xchromium/net/data/ssl/scripts/generate-weak-test-chains.sh12
-rw-r--r--chromium/net/data/ssl/scripts/redundant-ca.cnf46
-rw-r--r--chromium/net/data/url_request_unittest/308-without-location-header1
-rw-r--r--chromium/net/data/url_request_unittest/308-without-location-header.mock-http-headers1
-rw-r--r--chromium/net/data/url_request_unittest/redirect302-to-echo-cacheable1
-rw-r--r--chromium/net/data/url_request_unittest/redirect302-to-echo-cacheable.mock-http-headers4
-rw-r--r--chromium/net/data/url_request_unittest/redirect308-to-echo1
-rw-r--r--chromium/net/data/url_request_unittest/redirect308-to-echo.mock-http-headers2
-rw-r--r--chromium/net/data/websocket/close-with-split-packet_wsh.py11
-rw-r--r--chromium/net/data/websocket/split_packet_check.html2
-rw-r--r--chromium/net/disk_cache/addr.cc92
-rw-r--r--chromium/net/disk_cache/addr.h184
-rw-r--r--chromium/net/disk_cache/addr_unittest.cc59
-rw-r--r--chromium/net/disk_cache/backend_impl.cc2088
-rw-r--r--chromium/net/disk_cache/backend_impl.h397
-rw-r--r--chromium/net/disk_cache/backend_unittest.cc59
-rw-r--r--chromium/net/disk_cache/bitmap.cc311
-rw-r--r--chromium/net/disk_cache/bitmap.h136
-rw-r--r--chromium/net/disk_cache/bitmap_unittest.cc293
-rw-r--r--chromium/net/disk_cache/block_files.cc732
-rw-r--r--chromium/net/disk_cache/block_files.h169
-rw-r--r--chromium/net/disk_cache/block_files_unittest.cc350
-rw-r--r--chromium/net/disk_cache/blockfile/addr.cc92
-rw-r--r--chromium/net/disk_cache/blockfile/addr.h188
-rw-r--r--chromium/net/disk_cache/blockfile/addr_unittest.cc59
-rw-r--r--chromium/net/disk_cache/blockfile/backend_impl.cc2101
-rw-r--r--chromium/net/disk_cache/blockfile/backend_impl.h400
-rw-r--r--chromium/net/disk_cache/blockfile/backend_impl_v3.cc1607
-rw-r--r--chromium/net/disk_cache/blockfile/backend_impl_v3.h284
-rw-r--r--chromium/net/disk_cache/blockfile/backend_worker_v3.cc468
-rw-r--r--chromium/net/disk_cache/blockfile/backend_worker_v3.h50
-rw-r--r--chromium/net/disk_cache/blockfile/bitmap.cc311
-rw-r--r--chromium/net/disk_cache/blockfile/bitmap.h136
-rw-r--r--chromium/net/disk_cache/blockfile/bitmap_unittest.cc293
-rw-r--r--chromium/net/disk_cache/blockfile/block_bitmaps_v3.cc178
-rw-r--r--chromium/net/disk_cache/blockfile/block_bitmaps_v3.h65
-rw-r--r--chromium/net/disk_cache/blockfile/block_bitmaps_v3_unittest.cc70
-rw-r--r--chromium/net/disk_cache/blockfile/block_files.cc730
-rw-r--r--chromium/net/disk_cache/blockfile/block_files.h169
-rw-r--r--chromium/net/disk_cache/blockfile/block_files_unittest.cc350
-rw-r--r--chromium/net/disk_cache/blockfile/disk_cache_perftest.cc250
-rw-r--r--chromium/net/disk_cache/blockfile/disk_format.cc15
-rw-r--r--chromium/net/disk_cache/blockfile/disk_format.h153
-rw-r--r--chromium/net/disk_cache/blockfile/disk_format_base.h132
-rw-r--r--chromium/net/disk_cache/blockfile/disk_format_v3.h246
-rw-r--r--chromium/net/disk_cache/blockfile/entry_impl.cc1553
-rw-r--r--chromium/net/disk_cache/blockfile/entry_impl.h278
-rw-r--r--chromium/net/disk_cache/blockfile/entry_impl_v3.cc1464
-rw-r--r--chromium/net/disk_cache/blockfile/entry_impl_v3.h208
-rw-r--r--chromium/net/disk_cache/blockfile/errors.h33
-rw-r--r--chromium/net/disk_cache/blockfile/eviction.cc602
-rw-r--r--chromium/net/disk_cache/blockfile/eviction.h91
-rw-r--r--chromium/net/disk_cache/blockfile/eviction_v3.cc512
-rw-r--r--chromium/net/disk_cache/blockfile/eviction_v3.h78
-rw-r--r--chromium/net/disk_cache/blockfile/experiments.h28
-rw-r--r--chromium/net/disk_cache/blockfile/file.cc16
-rw-r--r--chromium/net/disk_cache/blockfile/file.h100
-rw-r--r--chromium/net/disk_cache/blockfile/file_block.h31
-rw-r--r--chromium/net/disk_cache/blockfile/file_ios.cc297
-rw-r--r--chromium/net/disk_cache/blockfile/file_lock.cc47
-rw-r--r--chromium/net/disk_cache/blockfile/file_lock.h45
-rw-r--r--chromium/net/disk_cache/blockfile/file_posix.cc187
-rw-r--r--chromium/net/disk_cache/blockfile/file_win.cc257
-rw-r--r--chromium/net/disk_cache/blockfile/histogram_macros.h107
-rw-r--r--chromium/net/disk_cache/blockfile/histogram_macros_v3.h109
-rw-r--r--chromium/net/disk_cache/blockfile/in_flight_backend_io.cc525
-rw-r--r--chromium/net/disk_cache/blockfile/in_flight_backend_io.h223
-rw-r--r--chromium/net/disk_cache/blockfile/in_flight_io.cc110
-rw-r--r--chromium/net/disk_cache/blockfile/in_flight_io.h136
-rw-r--r--chromium/net/disk_cache/blockfile/index_table_v3.cc1149
-rw-r--r--chromium/net/disk_cache/blockfile/index_table_v3.h279
-rw-r--r--chromium/net/disk_cache/blockfile/index_table_v3_unittest.cc706
-rw-r--r--chromium/net/disk_cache/blockfile/mapped_file.cc46
-rw-r--r--chromium/net/disk_cache/blockfile/mapped_file.h82
-rw-r--r--chromium/net/disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc63
-rw-r--r--chromium/net/disk_cache/blockfile/mapped_file_posix.cc54
-rw-r--r--chromium/net/disk_cache/blockfile/mapped_file_unittest.cc141
-rw-r--r--chromium/net/disk_cache/blockfile/mapped_file_win.cc55
-rw-r--r--chromium/net/disk_cache/blockfile/rankings.cc925
-rw-r--r--chromium/net/disk_cache/blockfile/rankings.h214
-rw-r--r--chromium/net/disk_cache/blockfile/sparse_control.cc886
-rw-r--r--chromium/net/disk_cache/blockfile/sparse_control.h177
-rw-r--r--chromium/net/disk_cache/blockfile/sparse_control_v3.cc868
-rw-r--r--chromium/net/disk_cache/blockfile/sparse_control_v3.h175
-rw-r--r--chromium/net/disk_cache/blockfile/stats.cc319
-rw-r--r--chromium/net/disk_cache/blockfile/stats.h100
-rw-r--r--chromium/net/disk_cache/blockfile/storage_block-inl.h205
-rw-r--r--chromium/net/disk_cache/blockfile/storage_block.h97
-rw-r--r--chromium/net/disk_cache/blockfile/storage_block_unittest.cc72
-rw-r--r--chromium/net/disk_cache/blockfile/stress_cache.cc294
-rw-r--r--chromium/net/disk_cache/blockfile/stress_support.h39
-rw-r--r--chromium/net/disk_cache/blockfile/trace.cc192
-rw-r--r--chromium/net/disk_cache/blockfile/trace.h41
-rw-r--r--chromium/net/disk_cache/blockfile/webfonts_histogram.cc105
-rw-r--r--chromium/net/disk_cache/blockfile/webfonts_histogram.h26
-rw-r--r--chromium/net/disk_cache/cache_creator.cc23
-rw-r--r--chromium/net/disk_cache/cache_util.cc3
-rw-r--r--chromium/net/disk_cache/disk_cache.h2
-rw-r--r--chromium/net/disk_cache/disk_cache_perftest.cc250
-rw-r--r--chromium/net/disk_cache/disk_cache_test_base.cc4
-rw-r--r--chromium/net/disk_cache/disk_cache_test_util.cc17
-rw-r--r--chromium/net/disk_cache/disk_format.cc15
-rw-r--r--chromium/net/disk_cache/disk_format.h153
-rw-r--r--chromium/net/disk_cache/disk_format_base.h131
-rw-r--r--chromium/net/disk_cache/entry_impl.cc1550
-rw-r--r--chromium/net/disk_cache/entry_impl.h278
-rw-r--r--chromium/net/disk_cache/entry_unittest.cc524
-rw-r--r--chromium/net/disk_cache/errors.h33
-rw-r--r--chromium/net/disk_cache/eviction.cc597
-rw-r--r--chromium/net/disk_cache/eviction.h91
-rw-r--r--chromium/net/disk_cache/experiments.h28
-rw-r--r--chromium/net/disk_cache/file.cc16
-rw-r--r--chromium/net/disk_cache/file.h100
-rw-r--r--chromium/net/disk_cache/file_block.h31
-rw-r--r--chromium/net/disk_cache/file_ios.cc312
-rw-r--r--chromium/net/disk_cache/file_lock.cc47
-rw-r--r--chromium/net/disk_cache/file_lock.h45
-rw-r--r--chromium/net/disk_cache/file_posix.cc202
-rw-r--r--chromium/net/disk_cache/file_win.cc274
-rw-r--r--chromium/net/disk_cache/flash/flash_cache_test_base.cc29
-rw-r--r--chromium/net/disk_cache/flash/flash_cache_test_base.h43
-rw-r--r--chromium/net/disk_cache/flash/flash_entry_impl.cc150
-rw-r--r--chromium/net/disk_cache/flash/flash_entry_impl.h98
-rw-r--r--chromium/net/disk_cache/flash/format.h32
-rw-r--r--chromium/net/disk_cache/flash/internal_entry.cc86
-rw-r--r--chromium/net/disk_cache/flash/internal_entry.h63
-rw-r--r--chromium/net/disk_cache/flash/log_store.cc185
-rw-r--r--chromium/net/disk_cache/flash/log_store.h101
-rw-r--r--chromium/net/disk_cache/flash/log_store_entry.cc171
-rw-r--r--chromium/net/disk_cache/flash/log_store_entry.h65
-rw-r--r--chromium/net/disk_cache/flash/log_store_entry_unittest.cc69
-rw-r--r--chromium/net/disk_cache/flash/log_store_unittest.cc131
-rw-r--r--chromium/net/disk_cache/flash/segment.cc122
-rw-r--r--chromium/net/disk_cache/flash/segment.h118
-rw-r--r--chromium/net/disk_cache/flash/segment_unittest.cc152
-rw-r--r--chromium/net/disk_cache/flash/storage.cc63
-rw-r--r--chromium/net/disk_cache/flash/storage.h35
-rw-r--r--chromium/net/disk_cache/flash/storage_unittest.cc41
-rw-r--r--chromium/net/disk_cache/histogram_macros.h127
-rw-r--r--chromium/net/disk_cache/in_flight_backend_io.cc522
-rw-r--r--chromium/net/disk_cache/in_flight_backend_io.h223
-rw-r--r--chromium/net/disk_cache/in_flight_io.cc110
-rw-r--r--chromium/net/disk_cache/in_flight_io.h136
-rw-r--r--chromium/net/disk_cache/mapped_file.cc35
-rw-r--r--chromium/net/disk_cache/mapped_file.h78
-rw-r--r--chromium/net/disk_cache/mapped_file_avoid_mmap_posix.cc63
-rw-r--r--chromium/net/disk_cache/mapped_file_posix.cc54
-rw-r--r--chromium/net/disk_cache/mapped_file_unittest.cc141
-rw-r--r--chromium/net/disk_cache/mapped_file_win.cc55
-rw-r--r--chromium/net/disk_cache/mem_backend_impl.cc337
-rw-r--r--chromium/net/disk_cache/mem_backend_impl.h120
-rw-r--r--chromium/net/disk_cache/mem_entry_impl.cc631
-rw-r--r--chromium/net/disk_cache/mem_entry_impl.h185
-rw-r--r--chromium/net/disk_cache/mem_rankings.cc67
-rw-r--r--chromium/net/disk_cache/mem_rankings.h44
-rw-r--r--chromium/net/disk_cache/memory/mem_backend_impl.cc337
-rw-r--r--chromium/net/disk_cache/memory/mem_backend_impl.h120
-rw-r--r--chromium/net/disk_cache/memory/mem_entry_impl.cc631
-rw-r--r--chromium/net/disk_cache/memory/mem_entry_impl.h185
-rw-r--r--chromium/net/disk_cache/memory/mem_rankings.cc67
-rw-r--r--chromium/net/disk_cache/memory/mem_rankings.h44
-rw-r--r--chromium/net/disk_cache/rankings.cc922
-rw-r--r--chromium/net/disk_cache/rankings.h214
-rw-r--r--chromium/net/disk_cache/simple/simple_backend_impl.cc6
-rw-r--r--chromium/net/disk_cache/simple/simple_entry_impl.cc30
-rw-r--r--chromium/net/disk_cache/simple/simple_histogram_macros.h5
-rw-r--r--chromium/net/disk_cache/simple/simple_index.cc40
-rw-r--r--chromium/net/disk_cache/simple/simple_index.h12
-rw-r--r--chromium/net/disk_cache/simple/simple_index_file.cc7
-rw-r--r--chromium/net/disk_cache/simple/simple_index_file_unittest.cc29
-rw-r--r--chromium/net/disk_cache/simple/simple_index_unittest.cc1
-rw-r--r--chromium/net/disk_cache/simple/simple_synchronous_entry.cc238
-rw-r--r--chromium/net/disk_cache/simple/simple_synchronous_entry.h14
-rw-r--r--chromium/net/disk_cache/simple/simple_test_util.cc18
-rw-r--r--chromium/net/disk_cache/simple/simple_util.cc6
-rw-r--r--chromium/net/disk_cache/simple/simple_util.h2
-rw-r--r--chromium/net/disk_cache/simple/simple_version_upgrade.cc46
-rw-r--r--chromium/net/disk_cache/simple/simple_version_upgrade_unittest.cc10
-rw-r--r--chromium/net/disk_cache/sparse_control.cc884
-rw-r--r--chromium/net/disk_cache/sparse_control.h177
-rw-r--r--chromium/net/disk_cache/stats.cc312
-rw-r--r--chromium/net/disk_cache/stats.h105
-rw-r--r--chromium/net/disk_cache/stats_histogram.cc94
-rw-r--r--chromium/net/disk_cache/stats_histogram.h58
-rw-r--r--chromium/net/disk_cache/storage_block-inl.h205
-rw-r--r--chromium/net/disk_cache/storage_block.h97
-rw-r--r--chromium/net/disk_cache/storage_block_unittest.cc72
-rw-r--r--chromium/net/disk_cache/stress_cache.cc294
-rw-r--r--chromium/net/disk_cache/stress_support.h39
-rw-r--r--chromium/net/disk_cache/trace.cc192
-rw-r--r--chromium/net/disk_cache/trace.h41
-rw-r--r--chromium/net/disk_cache/tracing/tracing_cache_backend.cc317
-rw-r--r--chromium/net/disk_cache/tracing/tracing_cache_backend.h84
-rw-r--r--chromium/net/disk_cache/tracing_cache_backend.cc317
-rw-r--r--chromium/net/disk_cache/tracing_cache_backend.h81
-rw-r--r--chromium/net/disk_cache/v3/backend_impl_v3.cc1640
-rw-r--r--chromium/net/disk_cache/v3/backend_impl_v3.h288
-rw-r--r--chromium/net/disk_cache/v3/backend_worker.cc485
-rw-r--r--chromium/net/disk_cache/v3/backend_worker.h60
-rw-r--r--chromium/net/disk_cache/v3/block_bitmaps.cc178
-rw-r--r--chromium/net/disk_cache/v3/block_bitmaps.h65
-rw-r--r--chromium/net/disk_cache/v3/block_bitmaps_unittest.cc70
-rw-r--r--chromium/net/disk_cache/v3/disk_format_v3.h190
-rw-r--r--chromium/net/disk_cache/v3/entry_impl_v3.cc1395
-rw-r--r--chromium/net/disk_cache/v3/entry_impl_v3.h223
-rw-r--r--chromium/net/disk_cache/v3/eviction_v3.cc502
-rw-r--r--chromium/net/disk_cache/v3/eviction_v3.h74
-rw-r--r--chromium/net/disk_cache/v3/sparse_control_v3.cc868
-rw-r--r--chromium/net/disk_cache/v3/sparse_control_v3.h175
-rw-r--r--chromium/net/dns/address_sorter_posix_unittest.cc8
-rw-r--r--chromium/net/dns/address_sorter_win.cc4
-rw-r--r--chromium/net/dns/dns_config_service.cc86
-rw-r--r--chromium/net/dns/dns_config_service.h35
-rw-r--r--chromium/net/dns/dns_config_service_posix.cc106
-rw-r--r--chromium/net/dns/dns_config_service_posix.h4
-rw-r--r--chromium/net/dns/dns_config_service_posix_unittest.cc4
-rw-r--r--chromium/net/dns/dns_config_service_unittest.cc94
-rw-r--r--chromium/net/dns/dns_config_service_win.cc20
-rw-r--r--chromium/net/dns/dns_config_service_win.h2
-rw-r--r--chromium/net/dns/dns_config_service_win_unittest.cc6
-rw-r--r--chromium/net/dns/dns_config_watcher_mac.cc2
-rw-r--r--chromium/net/dns/dns_config_watcher_mac.h2
-rw-r--r--chromium/net/dns/dns_query.cc10
-rw-r--r--chromium/net/dns/dns_response.cc10
-rw-r--r--chromium/net/dns/dns_test_util.cc4
-rw-r--r--chromium/net/dns/dns_transaction.cc7
-rw-r--r--chromium/net/dns/dns_transaction_unittest.cc1
-rw-r--r--chromium/net/dns/host_resolver.cc33
-rw-r--r--chromium/net/dns/host_resolver.h18
-rw-r--r--chromium/net/dns/host_resolver_impl.cc77
-rw-r--r--chromium/net/dns/host_resolver_impl.h36
-rw-r--r--chromium/net/dns/host_resolver_impl_unittest.cc110
-rw-r--r--chromium/net/dns/mdns_cache.h1
-rw-r--r--chromium/net/dns/mdns_client.cc2
-rw-r--r--chromium/net/dns/mdns_client.h5
-rw-r--r--chromium/net/dns/mdns_client_impl.cc143
-rw-r--r--chromium/net/dns/mdns_client_impl.h19
-rw-r--r--chromium/net/dns/mdns_client_unittest.cc48
-rw-r--r--chromium/net/dns/mock_mdns_socket_factory.h6
-rw-r--r--chromium/net/dns/record_parsed.cc2
-rw-r--r--chromium/net/dns/record_rdata.cc4
-rw-r--r--chromium/net/dns/record_rdata.h1
-rw-r--r--chromium/net/filter/filter.cc409
-rw-r--r--chromium/net/filter/filter.h284
-rw-r--r--chromium/net/filter/filter_unittest.cc367
-rw-r--r--chromium/net/filter/gzip_filter.cc298
-rw-r--r--chromium/net/filter/gzip_filter.h151
-rw-r--r--chromium/net/filter/gzip_filter_unittest.cc387
-rw-r--r--chromium/net/filter/gzip_header.cc181
-rw-r--r--chromium/net/filter/gzip_header.h94
-rw-r--r--chromium/net/filter/mock_filter_context.cc59
-rw-r--r--chromium/net/filter/mock_filter_context.h88
-rw-r--r--chromium/net/filter/sdch_filter.cc394
-rw-r--r--chromium/net/filter/sdch_filter.h135
-rw-r--r--chromium/net/filter/sdch_filter_unittest.cc1142
-rw-r--r--chromium/net/ftp/ftp_auth_cache_unittest.cc1
-rw-r--r--chromium/net/ftp/ftp_directory_listing_parser.cc2
-rw-r--r--chromium/net/ftp/ftp_directory_listing_parser_ls.cc7
-rw-r--r--chromium/net/ftp/ftp_directory_listing_parser_netware.cc6
-rw-r--r--chromium/net/ftp/ftp_directory_listing_parser_netware_unittest.cc4
-rw-r--r--chromium/net/ftp/ftp_directory_listing_parser_os2.cc2
-rw-r--r--chromium/net/ftp/ftp_directory_listing_parser_unittest.cc2
-rw-r--r--chromium/net/ftp/ftp_directory_listing_parser_unittest.h4
-rw-r--r--chromium/net/ftp/ftp_directory_listing_parser_vms.cc12
-rw-r--r--chromium/net/ftp/ftp_directory_listing_parser_vms_unittest.cc2
-rw-r--r--chromium/net/ftp/ftp_directory_listing_parser_windows.cc2
-rw-r--r--chromium/net/ftp/ftp_network_transaction.cc14
-rw-r--r--chromium/net/ftp/ftp_network_transaction_unittest.cc8
-rw-r--r--chromium/net/ftp/ftp_util.cc3
-rw-r--r--chromium/net/ftp/ftp_util_unittest.cc3
-rw-r--r--chromium/net/http/disk_cache_based_quic_server_info.cc295
-rw-r--r--chromium/net/http/disk_cache_based_quic_server_info.h106
-rw-r--r--chromium/net/http/disk_cache_based_quic_server_info_unittest.cc282
-rw-r--r--chromium/net/http/failing_http_transaction_factory.cc191
-rw-r--r--chromium/net/http/failing_http_transaction_factory.h42
-rw-r--r--chromium/net/http/http_auth.cc53
-rw-r--r--chromium/net/http/http_auth.h42
-rw-r--r--chromium/net/http/http_auth_cache.cc41
-rw-r--r--chromium/net/http/http_auth_cache.h6
-rw-r--r--chromium/net/http/http_auth_cache_unittest.cc6
-rw-r--r--chromium/net/http/http_auth_challenge_tokenizer.cc61
-rw-r--r--chromium/net/http/http_auth_challenge_tokenizer.h61
-rw-r--r--chromium/net/http/http_auth_challenge_tokenizer_unittest.cc177
-rw-r--r--chromium/net/http/http_auth_controller_unittest.cc5
-rw-r--r--chromium/net/http/http_auth_filter_win.h10
-rw-r--r--chromium/net/http/http_auth_gssapi_posix.cc3
-rw-r--r--chromium/net/http/http_auth_gssapi_posix.h4
-rw-r--r--chromium/net/http/http_auth_gssapi_posix_unittest.cc33
-rw-r--r--chromium/net/http/http_auth_handler.cc3
-rw-r--r--chromium/net/http/http_auth_handler.h7
-rw-r--r--chromium/net/http/http_auth_handler_basic.cc22
-rw-r--r--chromium/net/http/http_auth_handler_basic.h8
-rw-r--r--chromium/net/http/http_auth_handler_basic_unittest.cc9
-rw-r--r--chromium/net/http/http_auth_handler_digest.cc21
-rw-r--r--chromium/net/http/http_auth_handler_digest.h8
-rw-r--r--chromium/net/http/http_auth_handler_digest_unittest.cc24
-rw-r--r--chromium/net/http/http_auth_handler_factory.cc7
-rw-r--r--chromium/net/http/http_auth_handler_factory.h5
-rw-r--r--chromium/net/http/http_auth_handler_factory_unittest.cc2
-rw-r--r--chromium/net/http/http_auth_handler_mock.cc7
-rw-r--r--chromium/net/http/http_auth_handler_mock.h6
-rw-r--r--chromium/net/http/http_auth_handler_negotiate.cc6
-rw-r--r--chromium/net/http/http_auth_handler_negotiate.h6
-rw-r--r--chromium/net/http/http_auth_handler_ntlm.cc7
-rw-r--r--chromium/net/http/http_auth_handler_ntlm.h8
-rw-r--r--chromium/net/http/http_auth_handler_ntlm_portable.cc24
-rw-r--r--chromium/net/http/http_auth_handler_ntlm_win.cc2
-rw-r--r--chromium/net/http/http_auth_handler_unittest.cc6
-rw-r--r--chromium/net/http/http_auth_sspi_win.cc3
-rw-r--r--chromium/net/http/http_auth_sspi_win.h4
-rw-r--r--chromium/net/http/http_auth_sspi_win_unittest.cc33
-rw-r--r--chromium/net/http/http_auth_unittest.cc170
-rw-r--r--chromium/net/http/http_basic_stream.cc8
-rw-r--r--chromium/net/http/http_basic_stream.h2
-rw-r--r--chromium/net/http/http_byte_range.h4
-rw-r--r--chromium/net/http/http_cache.cc86
-rw-r--r--chromium/net/http/http_cache.h43
-rw-r--r--chromium/net/http/http_cache_transaction.cc182
-rw-r--r--chromium/net/http/http_cache_transaction.h27
-rw-r--r--chromium/net/http/http_cache_unittest.cc682
-rw-r--r--chromium/net/http/http_chunked_decoder.h3
-rw-r--r--chromium/net/http/http_content_disposition.cc44
-rw-r--r--chromium/net/http/http_content_disposition_unittest.cc4
-rw-r--r--chromium/net/http/http_log_util.cc81
-rw-r--r--chromium/net/http/http_log_util.h24
-rw-r--r--chromium/net/http/http_log_util_unittest.cc76
-rw-r--r--chromium/net/http/http_network_layer.cc3
-rw-r--r--chromium/net/http/http_network_layer.h3
-rw-r--r--chromium/net/http/http_network_layer_unittest.cc427
-rw-r--r--chromium/net/http/http_network_session.cc86
-rw-r--r--chromium/net/http/http_network_session.h54
-rw-r--r--chromium/net/http/http_network_transaction.cc264
-rw-r--r--chromium/net/http/http_network_transaction.h29
-rw-r--r--chromium/net/http/http_network_transaction_unittest.cc1236
-rw-r--r--chromium/net/http/http_pipelined_connection.h93
-rw-r--r--chromium/net/http/http_pipelined_connection_impl.cc845
-rw-r--r--chromium/net/http/http_pipelined_connection_impl.h330
-rw-r--r--chromium/net/http/http_pipelined_connection_impl_unittest.cc1597
-rw-r--r--chromium/net/http/http_pipelined_host.cc17
-rw-r--r--chromium/net/http/http_pipelined_host.h102
-rw-r--r--chromium/net/http/http_pipelined_host_capability.h23
-rw-r--r--chromium/net/http/http_pipelined_host_forced.cc103
-rw-r--r--chromium/net/http/http_pipelined_host_forced.h83
-rw-r--r--chromium/net/http/http_pipelined_host_forced_unittest.cc106
-rw-r--r--chromium/net/http/http_pipelined_host_impl.cc210
-rw-r--r--chromium/net/http/http_pipelined_host_impl.h117
-rw-r--r--chromium/net/http/http_pipelined_host_impl_unittest.cc308
-rw-r--r--chromium/net/http/http_pipelined_host_pool.cc145
-rw-r--r--chromium/net/http/http_pipelined_host_pool.h102
-rw-r--r--chromium/net/http/http_pipelined_host_pool_unittest.cc262
-rw-r--r--chromium/net/http/http_pipelined_host_test_util.cc33
-rw-r--r--chromium/net/http/http_pipelined_host_test_util.h70
-rw-r--r--chromium/net/http/http_pipelined_network_transaction_unittest.cc1035
-rw-r--r--chromium/net/http/http_pipelined_stream.cc153
-rw-r--r--chromium/net/http/http_pipelined_stream.h115
-rw-r--r--chromium/net/http/http_proxy_client_socket.cc6
-rw-r--r--chromium/net/http/http_proxy_client_socket.h4
-rw-r--r--chromium/net/http/http_proxy_client_socket_pool.cc21
-rw-r--r--chromium/net/http/http_proxy_client_socket_pool_unittest.cc15
-rw-r--r--chromium/net/http/http_request_headers.cc21
-rw-r--r--chromium/net/http/http_request_info.cc2
-rw-r--r--chromium/net/http/http_response_body_drainer.cc25
-rw-r--r--chromium/net/http/http_response_body_drainer.h4
-rw-r--r--chromium/net/http/http_response_body_drainer_unittest.cc19
-rw-r--r--chromium/net/http/http_response_headers.cc118
-rw-r--r--chromium/net/http/http_response_headers.h42
-rw-r--r--chromium/net/http/http_response_headers_unittest.cc211
-rw-r--r--chromium/net/http/http_response_info.cc20
-rw-r--r--chromium/net/http/http_response_info.h11
-rw-r--r--chromium/net/http/http_security_headers.cc2
-rw-r--r--chromium/net/http/http_security_headers_unittest.cc261
-rw-r--r--chromium/net/http/http_server_properties.cc35
-rw-r--r--chromium/net/http/http_server_properties.h101
-rw-r--r--chromium/net/http/http_server_properties_impl.cc330
-rw-r--r--chromium/net/http/http_server_properties_impl.h104
-rw-r--r--chromium/net/http/http_server_properties_impl_unittest.cc231
-rw-r--r--chromium/net/http/http_stream.h10
-rw-r--r--chromium/net/http/http_stream_base.h27
-rw-r--r--chromium/net/http/http_stream_factory.cc360
-rw-r--r--chromium/net/http/http_stream_factory.h84
-rw-r--r--chromium/net/http/http_stream_factory_impl.cc76
-rw-r--r--chromium/net/http/http_stream_factory_impl.h24
-rw-r--r--chromium/net/http/http_stream_factory_impl_job.cc402
-rw-r--r--chromium/net/http/http_stream_factory_impl_job.h31
-rw-r--r--chromium/net/http/http_stream_factory_impl_request.cc118
-rw-r--r--chromium/net/http/http_stream_factory_impl_request.h14
-rw-r--r--chromium/net/http/http_stream_factory_impl_request_unittest.cc3
-rw-r--r--chromium/net/http/http_stream_factory_impl_unittest.cc112
-rw-r--r--chromium/net/http/http_stream_parser.cc436
-rw-r--r--chromium/net/http/http_stream_parser.h44
-rw-r--r--chromium/net/http/http_stream_parser_unittest.cc57
-rw-r--r--chromium/net/http/http_transaction.h19
-rw-r--r--chromium/net/http/http_transaction_delegate.h26
-rw-r--r--chromium/net/http/http_transaction_factory.h10
-rw-r--r--chromium/net/http/http_transaction_test_util.cc503
-rw-r--r--chromium/net/http/http_transaction_test_util.h306
-rw-r--r--chromium/net/http/http_transaction_unittest.cc451
-rw-r--r--chromium/net/http/http_transaction_unittest.h288
-rw-r--r--chromium/net/http/http_util.cc105
-rw-r--r--chromium/net/http/http_util.h4
-rw-r--r--chromium/net/http/mock_http_cache.cc4
-rw-r--r--chromium/net/http/mock_http_cache.h5
-rw-r--r--chromium/net/http/partial_data.cc36
-rw-r--r--chromium/net/http/proxy_connect_redirect_http_stream.cc6
-rw-r--r--chromium/net/http/proxy_connect_redirect_http_stream.h1
-rw-r--r--chromium/net/http/transport_security_persister.cc104
-rw-r--r--chromium/net/http/transport_security_persister_unittest.cc63
-rw-r--r--chromium/net/http/transport_security_state.cc261
-rw-r--r--chromium/net/http/transport_security_state.h165
-rw-r--r--chromium/net/http/transport_security_state_static.h115
-rw-r--r--chromium/net/http/transport_security_state_static.json118
-rw-r--r--chromium/net/http/transport_security_state_unittest.cc624
-rw-r--r--chromium/net/http/url_security_manager_win.cc2
-rw-r--r--chromium/net/net.gyp2020
-rw-r--r--chromium/net/net.gypi1717
-rw-r--r--chromium/net/net.isolate10
-rw-r--r--chromium/net/net_nacl.gyp44
-rw-r--r--chromium/net/net_unittests.isolate14
-rw-r--r--chromium/net/ocsp/nss_ocsp_unittest.cc11
-rw-r--r--chromium/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc8
-rw-r--r--chromium/net/proxy/dhcp_proxy_script_fetcher_win.cc5
-rw-r--r--chromium/net/proxy/mock_proxy_script_fetcher.cc2
-rw-r--r--chromium/net/proxy/multi_threaded_proxy_resolver.cc25
-rw-r--r--chromium/net/proxy/multi_threaded_proxy_resolver.h1
-rw-r--r--chromium/net/proxy/multi_threaded_proxy_resolver_unittest.cc29
-rw-r--r--chromium/net/proxy/network_delegate_error_observer_unittest.cc6
-rw-r--r--chromium/net/proxy/proxy_bypass_rules.cc12
-rw-r--r--chromium/net/proxy/proxy_config.cc2
-rw-r--r--chromium/net/proxy/proxy_config_service_android.cc9
-rw-r--r--chromium/net/proxy/proxy_config_service_linux.cc38
-rw-r--r--chromium/net/proxy/proxy_config_service_linux_unittest.cc8
-rw-r--r--chromium/net/proxy/proxy_config_service_win.cc6
-rw-r--r--chromium/net/proxy/proxy_info.h7
-rw-r--r--chromium/net/proxy/proxy_list.cc57
-rw-r--r--chromium/net/proxy/proxy_list.h24
-rw-r--r--chromium/net/proxy/proxy_list_unittest.cc113
-rw-r--r--chromium/net/proxy/proxy_resolver.h5
-rw-r--r--chromium/net/proxy/proxy_resolver_perftest.cc3
-rw-r--r--chromium/net/proxy/proxy_resolver_script_data.cc2
-rw-r--r--chromium/net/proxy/proxy_resolver_v8.cc110
-rw-r--r--chromium/net/proxy/proxy_resolver_v8.h23
-rw-r--r--chromium/net/proxy/proxy_resolver_v8_tracing.cc16
-rw-r--r--chromium/net/proxy/proxy_resolver_v8_tracing.h1
-rw-r--r--chromium/net/proxy/proxy_resolver_v8_tracing_unittest.cc6
-rw-r--r--chromium/net/proxy/proxy_resolver_v8_unittest.cc5
-rw-r--r--chromium/net/proxy/proxy_resolver_winhttp.cc11
-rw-r--r--chromium/net/proxy/proxy_retry_info.h5
-rw-r--r--chromium/net/proxy/proxy_script_decider.cc12
-rw-r--r--chromium/net/proxy/proxy_script_decider.h9
-rw-r--r--chromium/net/proxy/proxy_script_decider_unittest.cc27
-rw-r--r--chromium/net/proxy/proxy_script_fetcher_impl.cc15
-rw-r--r--chromium/net/proxy/proxy_script_fetcher_impl_unittest.cc28
-rw-r--r--chromium/net/proxy/proxy_server.cc22
-rw-r--r--chromium/net/proxy/proxy_server.h8
-rw-r--r--chromium/net/proxy/proxy_service.cc75
-rw-r--r--chromium/net/proxy/proxy_service.h51
-rw-r--r--chromium/net/proxy/proxy_service_unittest.cc59
-rw-r--r--chromium/net/quic/congestion_control/available_channel_estimator.cc78
-rw-r--r--chromium/net/quic/congestion_control/available_channel_estimator.h64
-rw-r--r--chromium/net/quic/congestion_control/available_channel_estimator_test.cc109
-rw-r--r--chromium/net/quic/congestion_control/channel_estimator.cc110
-rw-r--r--chromium/net/quic/congestion_control/channel_estimator.h61
-rw-r--r--chromium/net/quic/congestion_control/channel_estimator_test.cc224
-rw-r--r--chromium/net/quic/congestion_control/cube_root.h3
-rw-r--r--chromium/net/quic/congestion_control/cubic.cc163
-rw-r--r--chromium/net/quic/congestion_control/cubic.h15
-rw-r--r--chromium/net/quic/congestion_control/cubic_test.cc162
-rw-r--r--chromium/net/quic/congestion_control/fix_rate_receiver.cc3
-rw-r--r--chromium/net/quic/congestion_control/fix_rate_receiver.h3
-rw-r--r--chromium/net/quic/congestion_control/fix_rate_sender.cc86
-rw-r--r--chromium/net/quic/congestion_control/fix_rate_sender.h36
-rw-r--r--chromium/net/quic/congestion_control/fix_rate_test.cc96
-rw-r--r--chromium/net/quic/congestion_control/hybrid_slow_start.cc133
-rw-r--r--chromium/net/quic/congestion_control/hybrid_slow_start.h61
-rw-r--r--chromium/net/quic/congestion_control/hybrid_slow_start_test.cc59
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_bitrate_ramp_up.cc176
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_bitrate_ramp_up.h65
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_bitrate_ramp_up_test.cc404
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_overuse_detector.cc256
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_overuse_detector.h173
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_overuse_detector_test.cc1114
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_probe.cc122
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_probe.h61
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_probe_test.cc84
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_receiver.cc48
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_receiver.h46
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_receiver_test.cc55
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_sender.cc529
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_sender.h102
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_sender_test.cc569
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_state_machine.cc163
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_state_machine.h94
-rw-r--r--chromium/net/quic/congestion_control/inter_arrival_state_machine_test.cc126
-rw-r--r--chromium/net/quic/congestion_control/leaky_bucket.cc10
-rw-r--r--chromium/net/quic/congestion_control/leaky_bucket.h3
-rw-r--r--chromium/net/quic/congestion_control/loss_detection_interface.cc25
-rw-r--r--chromium/net/quic/congestion_control/loss_detection_interface.h42
-rw-r--r--chromium/net/quic/congestion_control/paced_sender.cc57
-rw-r--r--chromium/net/quic/congestion_control/paced_sender.h44
-rw-r--r--chromium/net/quic/congestion_control/paced_sender_test.cc78
-rw-r--r--chromium/net/quic/congestion_control/pacing_sender.cc108
-rw-r--r--chromium/net/quic/congestion_control/pacing_sender.h34
-rw-r--r--chromium/net/quic/congestion_control/pacing_sender_test.cc143
-rw-r--r--chromium/net/quic/congestion_control/quic_max_sized_map.h77
-rw-r--r--chromium/net/quic/congestion_control/quic_max_sized_map_test.cc66
-rw-r--r--chromium/net/quic/congestion_control/receive_algorithm_interface.cc6
-rw-r--r--chromium/net/quic/congestion_control/receive_algorithm_interface.h5
-rw-r--r--chromium/net/quic/congestion_control/rtt_stats.cc129
-rw-r--r--chromium/net/quic/congestion_control/rtt_stats.h112
-rw-r--r--chromium/net/quic/congestion_control/rtt_stats_test.cc160
-rw-r--r--chromium/net/quic/congestion_control/send_algorithm_interface.cc17
-rw-r--r--chromium/net/quic/congestion_control/send_algorithm_interface.h93
-rw-r--r--chromium/net/quic/congestion_control/send_algorithm_simulator.cc273
-rw-r--r--chromium/net/quic/congestion_control/send_algorithm_simulator.h133
-rw-r--r--chromium/net/quic/congestion_control/tcp_cubic_sender.cc343
-rw-r--r--chromium/net/quic/congestion_control/tcp_cubic_sender.h92
-rw-r--r--chromium/net/quic/congestion_control/tcp_cubic_sender_test.cc527
-rw-r--r--chromium/net/quic/congestion_control/tcp_loss_algorithm.cc79
-rw-r--r--chromium/net/quic/congestion_control/tcp_loss_algorithm.h46
-rw-r--r--chromium/net/quic/congestion_control/tcp_loss_algorithm_test.cc183
-rw-r--r--chromium/net/quic/congestion_control/tcp_receiver.cc13
-rw-r--r--chromium/net/quic/congestion_control/tcp_receiver.h5
-rw-r--r--chromium/net/quic/congestion_control/tcp_receiver_test.cc6
-rw-r--r--chromium/net/quic/congestion_control/time_loss_algorithm.cc69
-rw-r--r--chromium/net/quic/congestion_control/time_loss_algorithm.h52
-rw-r--r--chromium/net/quic/congestion_control/time_loss_algorithm_test.cc138
-rw-r--r--chromium/net/quic/crypto/aead_base_decrypter.h107
-rw-r--r--chromium/net/quic/crypto/aead_base_decrypter_nss.cc154
-rw-r--r--chromium/net/quic/crypto/aead_base_decrypter_openssl.cc143
-rw-r--r--chromium/net/quic/crypto/aead_base_encrypter.h110
-rw-r--r--chromium/net/quic/crypto/aead_base_encrypter_nss.cc162
-rw-r--r--chromium/net/quic/crypto/aead_base_encrypter_openssl.cc148
-rw-r--r--chromium/net/quic/crypto/aes_128_gcm_12_decrypter.h50
-rw-r--r--chromium/net/quic/crypto/aes_128_gcm_12_decrypter_nss.cc185
-rw-r--r--chromium/net/quic/crypto/aes_128_gcm_12_decrypter_openssl.cc141
-rw-r--r--chromium/net/quic/crypto/aes_128_gcm_12_decrypter_test.cc70
-rw-r--r--chromium/net/quic/crypto/aes_128_gcm_12_encrypter.h50
-rw-r--r--chromium/net/quic/crypto/aes_128_gcm_12_encrypter_nss.cc188
-rw-r--r--chromium/net/quic/crypto/aes_128_gcm_12_encrypter_openssl.cc164
-rw-r--r--chromium/net/quic/crypto/aes_128_gcm_12_encrypter_test.cc60
-rw-r--r--chromium/net/quic/crypto/cert_compressor.h3
-rw-r--r--chromium/net/quic/crypto/chacha20_poly1305_decrypter.h47
-rw-r--r--chromium/net/quic/crypto/chacha20_poly1305_decrypter_nss.cc80
-rw-r--r--chromium/net/quic/crypto/chacha20_poly1305_decrypter_openssl.cc31
-rw-r--r--chromium/net/quic/crypto/chacha20_poly1305_decrypter_test.cc132
-rw-r--r--chromium/net/quic/crypto/chacha20_poly1305_encrypter.h47
-rw-r--r--chromium/net/quic/crypto/chacha20_poly1305_encrypter_nss.cc80
-rw-r--r--chromium/net/quic/crypto/chacha20_poly1305_encrypter_openssl.cc31
-rw-r--r--chromium/net/quic/crypto/chacha20_poly1305_encrypter_test.cc108
-rw-r--r--chromium/net/quic/crypto/channel_id.h66
-rw-r--r--chromium/net/quic/crypto/channel_id_test.cc14
-rw-r--r--chromium/net/quic/crypto/crypto_framer.cc18
-rw-r--r--chromium/net/quic/crypto/crypto_framer.h4
-rw-r--r--chromium/net/quic/crypto/crypto_handshake.cc310
-rw-r--r--chromium/net/quic/crypto/crypto_handshake.h132
-rw-r--r--chromium/net/quic/crypto/crypto_handshake_message.cc324
-rw-r--r--chromium/net/quic/crypto/crypto_handshake_message.h135
-rw-r--r--chromium/net/quic/crypto/crypto_protocol.h131
-rw-r--r--chromium/net/quic/crypto/crypto_secret_boxer.cc78
-rw-r--r--chromium/net/quic/crypto/crypto_secret_boxer.h4
-rw-r--r--chromium/net/quic/crypto/crypto_server_config_protobuf.cc3
-rw-r--r--chromium/net/quic/crypto/crypto_server_config_protobuf.h40
-rw-r--r--chromium/net/quic/crypto/crypto_server_test.cc323
-rw-r--r--chromium/net/quic/crypto/crypto_utils.cc4
-rw-r--r--chromium/net/quic/crypto/crypto_utils.h3
-rw-r--r--chromium/net/quic/crypto/curve25519_key_exchange.cc1
-rw-r--r--chromium/net/quic/crypto/local_strike_register_client.cc8
-rw-r--r--chromium/net/quic/crypto/local_strike_register_client.h5
-rw-r--r--chromium/net/quic/crypto/local_strike_register_client_test.cc15
-rw-r--r--chromium/net/quic/crypto/null_decrypter.h2
-rw-r--r--chromium/net/quic/crypto/null_encrypter.h2
-rw-r--r--chromium/net/quic/crypto/p256_key_exchange.h2
-rw-r--r--chromium/net/quic/crypto/proof_test.cc169
-rw-r--r--chromium/net/quic/crypto/proof_verifier.cc15
-rw-r--r--chromium/net/quic/crypto/proof_verifier.h64
-rw-r--r--chromium/net/quic/crypto/proof_verifier_chromium.cc167
-rw-r--r--chromium/net/quic/crypto/proof_verifier_chromium.h71
-rw-r--r--chromium/net/quic/crypto/quic_crypto_client_config.cc268
-rw-r--r--chromium/net/quic/crypto/quic_crypto_client_config.h126
-rw-r--r--chromium/net/quic/crypto/quic_crypto_client_config_test.cc210
-rw-r--r--chromium/net/quic/crypto/quic_crypto_server_config.cc531
-rw-r--r--chromium/net/quic/crypto/quic_crypto_server_config.h124
-rw-r--r--chromium/net/quic/crypto/quic_crypto_server_config_test.cc419
-rw-r--r--chromium/net/quic/crypto/quic_decrypter.cc4
-rw-r--r--chromium/net/quic/crypto/quic_decrypter.h1
-rw-r--r--chromium/net/quic/crypto/quic_encrypter.cc4
-rw-r--r--chromium/net/quic/crypto/quic_encrypter.h1
-rw-r--r--chromium/net/quic/crypto/quic_random.cc5
-rw-r--r--chromium/net/quic/crypto/quic_server_info.cc141
-rw-r--r--chromium/net/quic/crypto/quic_server_info.h118
-rw-r--r--chromium/net/quic/crypto/scoped_evp_aead_ctx.cc23
-rw-r--r--chromium/net/quic/crypto/scoped_evp_aead_ctx.h31
-rw-r--r--chromium/net/quic/crypto/scoped_evp_cipher_ctx.cc22
-rw-r--r--chromium/net/quic/crypto/scoped_evp_cipher_ctx.h30
-rw-r--r--chromium/net/quic/crypto/source_address_token.h2
-rw-r--r--chromium/net/quic/crypto/strike_register.cc12
-rw-r--r--chromium/net/quic/crypto/strike_register.h5
-rw-r--r--chromium/net/quic/crypto/strike_register_client.h5
-rw-r--r--chromium/net/quic/iovector.h1
-rw-r--r--chromium/net/quic/quic_ack_notifier.cc62
-rw-r--r--chromium/net/quic/quic_ack_notifier.h58
-rw-r--r--chromium/net/quic/quic_ack_notifier_manager.cc8
-rw-r--r--chromium/net/quic/quic_ack_notifier_manager.h6
-rw-r--r--chromium/net/quic/quic_ack_notifier_test.cc54
-rw-r--r--chromium/net/quic/quic_address_mismatch.cc52
-rw-r--r--chromium/net/quic/quic_address_mismatch.h44
-rw-r--r--chromium/net/quic/quic_address_mismatch_test.cc113
-rw-r--r--chromium/net/quic/quic_bandwidth.h1
-rw-r--r--chromium/net/quic/quic_blocked_writer_interface.h5
-rw-r--r--chromium/net/quic/quic_client_session.cc423
-rw-r--r--chromium/net/quic/quic_client_session.h48
-rw-r--r--chromium/net/quic/quic_client_session_base.cc16
-rw-r--r--chromium/net/quic/quic_client_session_base.h41
-rw-r--r--chromium/net/quic/quic_client_session_test.cc40
-rw-r--r--chromium/net/quic/quic_clock.cc3
-rw-r--r--chromium/net/quic/quic_clock.h3
-rw-r--r--chromium/net/quic/quic_config.cc632
-rw-r--r--chromium/net/quic/quic_config.h311
-rw-r--r--chromium/net/quic/quic_config_test.cc158
-rw-r--r--chromium/net/quic/quic_connection.cc1231
-rw-r--r--chromium/net/quic/quic_connection.h475
-rw-r--r--chromium/net/quic/quic_connection_helper.h2
-rw-r--r--chromium/net/quic/quic_connection_logger.cc448
-rw-r--r--chromium/net/quic/quic_connection_logger.h87
-rw-r--r--chromium/net/quic/quic_connection_stats.cc45
-rw-r--r--chromium/net/quic/quic_connection_stats.h67
-rw-r--r--chromium/net/quic/quic_connection_test.cc2592
-rw-r--r--chromium/net/quic/quic_crypto_client_stream.cc174
-rw-r--r--chromium/net/quic/quic_crypto_client_stream.h32
-rw-r--r--chromium/net/quic/quic_crypto_client_stream_factory.h7
-rw-r--r--chromium/net/quic/quic_crypto_client_stream_test.cc27
-rw-r--r--chromium/net/quic/quic_crypto_server_stream.cc23
-rw-r--r--chromium/net/quic/quic_crypto_server_stream.h14
-rw-r--r--chromium/net/quic/quic_crypto_server_stream_test.cc20
-rw-r--r--chromium/net/quic/quic_crypto_stream.cc8
-rw-r--r--chromium/net/quic/quic_crypto_stream.h5
-rw-r--r--chromium/net/quic/quic_crypto_stream_test.cc6
-rw-r--r--chromium/net/quic/quic_data_reader.h2
-rw-r--r--chromium/net/quic/quic_data_stream.cc226
-rw-r--r--chromium/net/quic/quic_data_stream.h51
-rw-r--r--chromium/net/quic/quic_data_stream_test.cc615
-rw-r--r--chromium/net/quic/quic_data_writer.cc5
-rw-r--r--chromium/net/quic/quic_data_writer.h2
-rw-r--r--chromium/net/quic/quic_data_writer_test.cc10
-rw-r--r--chromium/net/quic/quic_default_packet_writer.cc17
-rw-r--r--chromium/net/quic/quic_default_packet_writer.h22
-rw-r--r--chromium/net/quic/quic_dispatcher.cc426
-rw-r--r--chromium/net/quic/quic_dispatcher.h230
-rw-r--r--chromium/net/quic/quic_end_to_end_unittest.cc29
-rw-r--r--chromium/net/quic/quic_fec_group.cc30
-rw-r--r--chromium/net/quic/quic_fec_group.h37
-rw-r--r--chromium/net/quic/quic_fec_group_test.cc59
-rw-r--r--chromium/net/quic/quic_flags.cc48
-rw-r--r--chromium/net/quic/quic_flags.h20
-rw-r--r--chromium/net/quic/quic_flow_controller.cc203
-rw-r--r--chromium/net/quic/quic_flow_controller.h130
-rw-r--r--chromium/net/quic/quic_flow_controller_test.cc224
-rw-r--r--chromium/net/quic/quic_framer.cc800
-rw-r--r--chromium/net/quic/quic_framer.h166
-rw-r--r--chromium/net/quic/quic_framer_test.cc2172
-rw-r--r--chromium/net/quic/quic_headers_stream.cc266
-rw-r--r--chromium/net/quic/quic_headers_stream.h82
-rw-r--r--chromium/net/quic/quic_headers_stream_test.cc334
-rw-r--r--chromium/net/quic/quic_http_stream.cc58
-rw-r--r--chromium/net/quic/quic_http_stream.h8
-rw-r--r--chromium/net/quic/quic_http_stream_test.cc436
-rw-r--r--chromium/net/quic/quic_http_utils.cc12
-rw-r--r--chromium/net/quic/quic_http_utils.h10
-rw-r--r--chromium/net/quic/quic_in_memory_cache.cc242
-rw-r--r--chromium/net/quic/quic_in_memory_cache.h116
-rw-r--r--chromium/net/quic/quic_network_transaction_unittest.cc691
-rw-r--r--chromium/net/quic/quic_packet_creator.cc362
-rw-r--r--chromium/net/quic/quic_packet_creator.h145
-rw-r--r--chromium/net/quic/quic_packet_creator_test.cc572
-rw-r--r--chromium/net/quic/quic_packet_generator.cc204
-rw-r--r--chromium/net/quic/quic_packet_generator.h93
-rw-r--r--chromium/net/quic/quic_packet_generator_test.cc379
-rw-r--r--chromium/net/quic/quic_packet_writer.h13
-rw-r--r--chromium/net/quic/quic_protocol.cc471
-rw-r--r--chromium/net/quic/quic_protocol.h424
-rw-r--r--chromium/net/quic/quic_protocol_test.cc31
-rw-r--r--chromium/net/quic/quic_received_packet_manager.cc249
-rw-r--r--chromium/net/quic/quic_received_packet_manager.h125
-rw-r--r--chromium/net/quic/quic_received_packet_manager_test.cc238
-rw-r--r--chromium/net/quic/quic_reliable_client_stream.cc10
-rw-r--r--chromium/net/quic/quic_reliable_client_stream_test.cc67
-rw-r--r--chromium/net/quic/quic_sent_entropy_manager.h2
-rw-r--r--chromium/net/quic/quic_sent_packet_manager.cc1044
-rw-r--r--chromium/net/quic/quic_sent_packet_manager.h245
-rw-r--r--chromium/net/quic/quic_sent_packet_manager_test.cc1473
-rw-r--r--chromium/net/quic/quic_server_id.cc58
-rw-r--r--chromium/net/quic/quic_server_id.h60
-rw-r--r--chromium/net/quic/quic_server_id_test.cc319
-rw-r--r--chromium/net/quic/quic_server_packet_writer.cc74
-rw-r--r--chromium/net/quic/quic_server_packet_writer.h53
-rw-r--r--chromium/net/quic/quic_server_session.cc81
-rw-r--r--chromium/net/quic/quic_server_session.h87
-rw-r--r--chromium/net/quic/quic_session.cc553
-rw-r--r--chromium/net/quic/quic_session.h146
-rw-r--r--chromium/net/quic/quic_session_test.cc791
-rw-r--r--chromium/net/quic/quic_socket_address_coder.cc89
-rw-r--r--chromium/net/quic/quic_socket_address_coder.h45
-rw-r--r--chromium/net/quic/quic_socket_address_coder_test.cc117
-rw-r--r--chromium/net/quic/quic_spdy_compressor.cc71
-rw-r--r--chromium/net/quic/quic_spdy_compressor.h49
-rw-r--r--chromium/net/quic/quic_spdy_compressor_test.cc46
-rw-r--r--chromium/net/quic/quic_spdy_decompressor.cc140
-rw-r--r--chromium/net/quic/quic_spdy_decompressor.h65
-rw-r--r--chromium/net/quic/quic_spdy_decompressor_test.cc103
-rw-r--r--chromium/net/quic/quic_spdy_server_stream.cc143
-rw-r--r--chromium/net/quic/quic_spdy_server_stream.h64
-rw-r--r--chromium/net/quic/quic_stream_factory.cc744
-rw-r--r--chromium/net/quic/quic_stream_factory.h148
-rw-r--r--chromium/net/quic/quic_stream_factory_test.cc893
-rw-r--r--chromium/net/quic/quic_stream_sequencer.cc205
-rw-r--r--chromium/net/quic/quic_stream_sequencer.h77
-rw-r--r--chromium/net/quic/quic_stream_sequencer_test.cc486
-rw-r--r--chromium/net/quic/quic_time.cc19
-rw-r--r--chromium/net/quic/quic_time.h9
-rw-r--r--chromium/net/quic/quic_time_test.cc24
-rw-r--r--chromium/net/quic/quic_time_wait_list_manager.cc283
-rw-r--r--chromium/net/quic/quic_time_wait_list_manager.h174
-rw-r--r--chromium/net/quic/quic_types.cc34
-rw-r--r--chromium/net/quic/quic_types.h69
-rw-r--r--chromium/net/quic/quic_unacked_packet_map.cc323
-rw-r--r--chromium/net/quic/quic_unacked_packet_map.h152
-rw-r--r--chromium/net/quic/quic_unacked_packet_map_test.cc166
-rw-r--r--chromium/net/quic/quic_utils.cc31
-rw-r--r--chromium/net/quic/quic_utils.h10
-rw-r--r--chromium/net/quic/quic_utils_chromium.h80
-rw-r--r--chromium/net/quic/quic_utils_chromium_test.cc50
-rw-r--r--chromium/net/quic/quic_write_blocked_list.cc20
-rw-r--r--chromium/net/quic/quic_write_blocked_list.h113
-rw-r--r--chromium/net/quic/quic_write_blocked_list_test.cc117
-rw-r--r--chromium/net/quic/reliable_quic_stream.cc380
-rw-r--r--chromium/net/quic/reliable_quic_stream.h108
-rw-r--r--chromium/net/quic/reliable_quic_stream_test.cc569
-rw-r--r--chromium/net/quic/spdy_utils.cc2
-rw-r--r--chromium/net/quic/spdy_utils.h3
-rw-r--r--chromium/net/quic/test_tools/crypto_test_utils.cc33
-rw-r--r--chromium/net/quic/test_tools/crypto_test_utils.h21
-rw-r--r--chromium/net/quic/test_tools/crypto_test_utils_chromium.cc9
-rw-r--r--chromium/net/quic/test_tools/crypto_test_utils_nss.cc91
-rw-r--r--chromium/net/quic/test_tools/crypto_test_utils_openssl.cc83
-rw-r--r--chromium/net/quic/test_tools/delayed_verify_strike_register_client.cc2
-rw-r--r--chromium/net/quic/test_tools/delayed_verify_strike_register_client.h4
-rw-r--r--chromium/net/quic/test_tools/mock_clock.h3
-rw-r--r--chromium/net/quic/test_tools/mock_crypto_client_stream.cc35
-rw-r--r--chromium/net/quic/test_tools/mock_crypto_client_stream.h15
-rw-r--r--chromium/net/quic/test_tools/mock_crypto_client_stream_factory.cc14
-rw-r--r--chromium/net/quic/test_tools/mock_crypto_client_stream_factory.h15
-rw-r--r--chromium/net/quic/test_tools/mock_quic_dispatcher.cc23
-rw-r--r--chromium/net/quic/test_tools/mock_quic_dispatcher.h37
-rw-r--r--chromium/net/quic/test_tools/mock_random.h4
-rw-r--r--chromium/net/quic/test_tools/quic_config_peer.cc45
-rw-r--r--chromium/net/quic/test_tools/quic_config_peer.h42
-rw-r--r--chromium/net/quic/test_tools/quic_connection_peer.cc66
-rw-r--r--chromium/net/quic/test_tools/quic_connection_peer.h28
-rw-r--r--chromium/net/quic/test_tools/quic_data_stream_peer.h1
-rw-r--r--chromium/net/quic/test_tools/quic_flow_controller_peer.cc61
-rw-r--r--chromium/net/quic/test_tools/quic_flow_controller_peer.h42
-rw-r--r--chromium/net/quic/test_tools/quic_framer_peer.cc26
-rw-r--r--chromium/net/quic/test_tools/quic_framer_peer.h7
-rw-r--r--chromium/net/quic/test_tools/quic_packet_creator_peer.cc6
-rw-r--r--chromium/net/quic/test_tools/quic_packet_creator_peer.h2
-rw-r--r--chromium/net/quic/test_tools/quic_packet_generator_peer.cc20
-rw-r--r--chromium/net/quic/test_tools/quic_packet_generator_peer.h29
-rw-r--r--chromium/net/quic/test_tools/quic_received_packet_manager_peer.cc6
-rw-r--r--chromium/net/quic/test_tools/quic_received_packet_manager_peer.h2
-rw-r--r--chromium/net/quic/test_tools/quic_sent_packet_manager_peer.cc90
-rw-r--r--chromium/net/quic/test_tools/quic_sent_packet_manager_peer.h31
-rw-r--r--chromium/net/quic/test_tools/quic_session_peer.cc20
-rw-r--r--chromium/net/quic/test_tools/quic_session_peer.h13
-rw-r--r--chromium/net/quic/test_tools/quic_stream_sequencer_peer.cc28
-rw-r--r--chromium/net/quic/test_tools/quic_stream_sequencer_peer.h31
-rw-r--r--chromium/net/quic/test_tools/quic_test_packet_maker.cc249
-rw-r--r--chromium/net/quic/test_tools/quic_test_packet_maker.h91
-rw-r--r--chromium/net/quic/test_tools/quic_test_utils.cc326
-rw-r--r--chromium/net/quic/test_tools/quic_test_utils.h346
-rw-r--r--chromium/net/quic/test_tools/quic_test_writer.cc23
-rw-r--r--chromium/net/quic/test_tools/quic_test_writer.h33
-rw-r--r--chromium/net/quic/test_tools/reliable_quic_stream_peer.cc35
-rw-r--r--chromium/net/quic/test_tools/reliable_quic_stream_peer.h8
-rw-r--r--chromium/net/quic/test_tools/simple_quic_framer.cc95
-rw-r--r--chromium/net/quic/test_tools/simple_quic_framer.h12
-rw-r--r--chromium/net/server/http_server.cc33
-rw-r--r--chromium/net/server/http_server.h4
-rw-r--r--chromium/net/server/http_server_request_info.cc17
-rw-r--r--chromium/net/server/http_server_request_info.h11
-rw-r--r--chromium/net/server/http_server_unittest.cc223
-rw-r--r--chromium/net/socket/buffered_write_stream_socket.cc161
-rw-r--r--chromium/net/socket/buffered_write_stream_socket.h83
-rw-r--r--chromium/net/socket/buffered_write_stream_socket_unittest.cc124
-rw-r--r--chromium/net/socket/client_socket_handle.cc4
-rw-r--r--chromium/net/socket/client_socket_handle.h16
-rw-r--r--chromium/net/socket/client_socket_pool_base.cc36
-rw-r--r--chromium/net/socket/client_socket_pool_base.h18
-rw-r--r--chromium/net/socket/client_socket_pool_base_unittest.cc70
-rw-r--r--chromium/net/socket/client_socket_pool_manager.cc7
-rw-r--r--chromium/net/socket/next_proto.cc73
-rw-r--r--chromium/net/socket/next_proto.h30
-rw-r--r--chromium/net/socket/nss_ssl_util.cc12
-rw-r--r--chromium/net/socket/openssl_ssl_util.cc156
-rw-r--r--chromium/net/socket/openssl_ssl_util.h32
-rw-r--r--chromium/net/socket/socket.h8
-rw-r--r--chromium/net/socket/socket_test_util.cc73
-rw-r--r--chromium/net/socket/socket_test_util.h23
-rw-r--r--chromium/net/socket/socks5_client_socket.cc50
-rw-r--r--chromium/net/socket/socks5_client_socket.h7
-rw-r--r--chromium/net/socket/socks_client_socket.cc48
-rw-r--r--chromium/net/socket/socks_client_socket.h10
-rw-r--r--chromium/net/socket/ssl_client_socket.cc16
-rw-r--r--chromium/net/socket/ssl_client_socket.h10
-rw-r--r--chromium/net/socket/ssl_client_socket_nss.cc177
-rw-r--r--chromium/net/socket/ssl_client_socket_nss.h15
-rw-r--r--chromium/net/socket/ssl_client_socket_openssl.cc435
-rw-r--r--chromium/net/socket/ssl_client_socket_openssl.h28
-rw-r--r--chromium/net/socket/ssl_client_socket_openssl_unittest.cc89
-rw-r--r--chromium/net/socket/ssl_client_socket_pool.cc2
-rw-r--r--chromium/net/socket/ssl_client_socket_pool_unittest.cc16
-rw-r--r--chromium/net/socket/ssl_client_socket_unittest.cc999
-rw-r--r--chromium/net/socket/ssl_server_socket_nss.cc45
-rw-r--r--chromium/net/socket/ssl_server_socket_nss.h6
-rw-r--r--chromium/net/socket/ssl_server_socket_openssl.cc671
-rw-r--r--chromium/net/socket/ssl_server_socket_openssl.h150
-rw-r--r--chromium/net/socket/ssl_server_socket_unittest.cc21
-rw-r--r--chromium/net/socket/stream_listen_socket.cc28
-rw-r--r--chromium/net/socket/stream_listen_socket.h6
-rw-r--r--chromium/net/socket/stream_socket.h6
-rw-r--r--chromium/net/socket/tcp_client_socket.cc4
-rw-r--r--chromium/net/socket/tcp_client_socket.h4
-rw-r--r--chromium/net/socket/tcp_socket.cc49
-rw-r--r--chromium/net/socket/tcp_socket_libevent.cc51
-rw-r--r--chromium/net/socket/tcp_socket_libevent.h4
-rw-r--r--chromium/net/socket/tcp_socket_unittest.cc55
-rw-r--r--chromium/net/socket/tcp_socket_win.cc46
-rw-r--r--chromium/net/socket/tcp_socket_win.h11
-rw-r--r--chromium/net/socket/transport_client_socket_pool.cc4
-rw-r--r--chromium/net/socket/transport_client_socket_pool_unittest.cc12
-rw-r--r--chromium/net/socket_stream/OWNERS7
-rw-r--r--chromium/net/socket_stream/socket_stream.cc84
-rw-r--r--chromium/net/socket_stream/socket_stream.h17
-rw-r--r--chromium/net/socket_stream/socket_stream_job.cc24
-rw-r--r--chromium/net/socket_stream/socket_stream_job.h16
-rw-r--r--chromium/net/socket_stream/socket_stream_job_manager.cc10
-rw-r--r--chromium/net/socket_stream/socket_stream_job_manager.h3
-rw-r--r--chromium/net/socket_stream/socket_stream_unittest.cc83
-rw-r--r--chromium/net/spdy/buffered_spdy_framer.cc136
-rw-r--r--chromium/net/spdy/buffered_spdy_framer.h32
-rw-r--r--chromium/net/spdy/buffered_spdy_framer_unittest.cc76
-rw-r--r--chromium/net/spdy/fuzzing/hpack_example_generator.cc75
-rw-r--r--chromium/net/spdy/fuzzing/hpack_fuzz_mutator.cc81
-rw-r--r--chromium/net/spdy/fuzzing/hpack_fuzz_util.cc189
-rw-r--r--chromium/net/spdy/fuzzing/hpack_fuzz_util.h93
-rw-r--r--chromium/net/spdy/fuzzing/hpack_fuzz_util_test.cc151
-rw-r--r--chromium/net/spdy/fuzzing/hpack_fuzz_wrapper.cc59
-rw-r--r--chromium/net/spdy/hpack_constants.cc331
-rw-r--r--chromium/net/spdy/hpack_constants.h86
-rw-r--r--chromium/net/spdy/hpack_decoder.cc240
-rw-r--r--chromium/net/spdy/hpack_decoder.h121
-rw-r--r--chromium/net/spdy/hpack_decoder_test.cc670
-rw-r--r--chromium/net/spdy/hpack_encoder.cc291
-rw-r--r--chromium/net/spdy/hpack_encoder.h108
-rw-r--r--chromium/net/spdy/hpack_encoder_test.cc453
-rw-r--r--chromium/net/spdy/hpack_entry.cc59
-rw-r--r--chromium/net/spdy/hpack_entry.h98
-rw-r--r--chromium/net/spdy/hpack_entry_test.cc130
-rw-r--r--chromium/net/spdy/hpack_header_table.cc306
-rw-r--r--chromium/net/spdy/hpack_header_table.h151
-rw-r--r--chromium/net/spdy/hpack_header_table_test.cc517
-rw-r--r--chromium/net/spdy/hpack_huffman_aggregator.cc183
-rw-r--r--chromium/net/spdy/hpack_huffman_aggregator.h74
-rw-r--r--chromium/net/spdy/hpack_huffman_aggregator_test.cc204
-rw-r--r--chromium/net/spdy/hpack_huffman_table.cc323
-rw-r--r--chromium/net/spdy/hpack_huffman_table.h126
-rw-r--r--chromium/net/spdy/hpack_huffman_table_test.cc522
-rw-r--r--chromium/net/spdy/hpack_input_stream.cc172
-rw-r--r--chromium/net/spdy/hpack_input_stream.h80
-rw-r--r--chromium/net/spdy/hpack_input_stream_test.cc629
-rw-r--r--chromium/net/spdy/hpack_output_stream.cc77
-rw-r--r--chromium/net/spdy/hpack_output_stream.h66
-rw-r--r--chromium/net/spdy/hpack_output_stream_test.cc260
-rw-r--r--chromium/net/spdy/hpack_round_trip_test.cc174
-rw-r--r--chromium/net/spdy/hpack_string_util.cc24
-rw-r--r--chromium/net/spdy/hpack_string_util.h24
-rw-r--r--chromium/net/spdy/hpack_string_util_test.cc98
-rw-r--r--chromium/net/spdy/mock_spdy_framer_visitor.cc17
-rw-r--r--chromium/net/spdy/mock_spdy_framer_visitor.h65
-rw-r--r--chromium/net/spdy/spdy_buffer.cc8
-rw-r--r--chromium/net/spdy/spdy_frame_builder.cc94
-rw-r--r--chromium/net/spdy/spdy_frame_builder.h41
-rw-r--r--chromium/net/spdy/spdy_frame_builder_test.cc55
-rw-r--r--chromium/net/spdy/spdy_frame_reader.cc18
-rw-r--r--chromium/net/spdy/spdy_frame_reader.h21
-rw-r--r--chromium/net/spdy/spdy_framer.cc2054
-rw-r--r--chromium/net/spdy/spdy_framer.h333
-rw-r--r--chromium/net/spdy/spdy_framer_test.cc3612
-rw-r--r--chromium/net/spdy/spdy_header_block.cc6
-rw-r--r--chromium/net/spdy/spdy_header_block_unittest.cc2
-rw-r--r--chromium/net/spdy/spdy_headers_block_parser.cc193
-rw-r--r--chromium/net/spdy/spdy_headers_block_parser.h149
-rw-r--r--chromium/net/spdy/spdy_headers_block_parser_test.cc259
-rw-r--r--chromium/net/spdy/spdy_http_stream.cc19
-rw-r--r--chromium/net/spdy/spdy_http_stream.h5
-rw-r--r--chromium/net/spdy/spdy_http_stream_unittest.cc21
-rw-r--r--chromium/net/spdy/spdy_http_utils.cc38
-rw-r--r--chromium/net/spdy/spdy_http_utils.h10
-rw-r--r--chromium/net/spdy/spdy_http_utils_unittest.cc10
-rw-r--r--chromium/net/spdy/spdy_network_transaction_unittest.cc729
-rw-r--r--chromium/net/spdy/spdy_pinnable_buffer_piece.cc34
-rw-r--r--chromium/net/spdy/spdy_pinnable_buffer_piece.h60
-rw-r--r--chromium/net/spdy/spdy_pinnable_buffer_piece_test.cc79
-rw-r--r--chromium/net/spdy/spdy_prefixed_buffer_reader.cc81
-rw-r--r--chromium/net/spdy/spdy_prefixed_buffer_reader.h41
-rw-r--r--chromium/net/spdy/spdy_prefixed_buffer_reader_test.cc129
-rw-r--r--chromium/net/spdy/spdy_priority_forest.h1
-rw-r--r--chromium/net/spdy/spdy_protocol.cc764
-rw-r--r--chromium/net/spdy/spdy_protocol.h413
-rw-r--r--chromium/net/spdy/spdy_protocol_test.cc24
-rw-r--r--chromium/net/spdy/spdy_proxy_client_socket.cc45
-rw-r--r--chromium/net/spdy/spdy_proxy_client_socket.h15
-rw-r--r--chromium/net/spdy/spdy_proxy_client_socket_unittest.cc266
-rw-r--r--chromium/net/spdy/spdy_session.cc1134
-rw-r--r--chromium/net/spdy/spdy_session.h274
-rw-r--r--chromium/net/spdy/spdy_session_key.cc2
-rw-r--r--chromium/net/spdy/spdy_session_pool.cc61
-rw-r--r--chromium/net/spdy/spdy_session_pool.h11
-rw-r--r--chromium/net/spdy/spdy_session_pool_unittest.cc176
-rw-r--r--chromium/net/spdy/spdy_session_unittest.cc957
-rw-r--r--chromium/net/spdy/spdy_stream.cc402
-rw-r--r--chromium/net/spdy/spdy_stream.h113
-rw-r--r--chromium/net/spdy/spdy_stream_unittest.cc35
-rw-r--r--chromium/net/spdy/spdy_test_util_common.cc461
-rw-r--r--chromium/net/spdy/spdy_test_util_common.h57
-rw-r--r--chromium/net/spdy/spdy_test_utils.cc33
-rw-r--r--chromium/net/spdy/spdy_test_utils.h10
-rw-r--r--chromium/net/spdy/spdy_websocket_stream.cc6
-rw-r--r--chromium/net/spdy/spdy_websocket_stream.h3
-rw-r--r--chromium/net/spdy/spdy_websocket_stream_unittest.cc86
-rw-r--r--chromium/net/spdy/spdy_websocket_test_util.cc4
-rw-r--r--chromium/net/spdy/spdy_websocket_test_util.h1
-rw-r--r--chromium/net/spdy/spdy_write_queue.cc52
-rw-r--r--chromium/net/spdy/spdy_write_queue.h2
-rw-r--r--chromium/net/spdy/spdy_write_queue_unittest.cc124
-rw-r--r--chromium/net/ssl/client_cert_store.h3
-rw-r--r--chromium/net/ssl/client_cert_store_chromeos.cc94
-rw-r--r--chromium/net/ssl/client_cert_store_chromeos.h66
-rw-r--r--chromium/net/ssl/client_cert_store_chromeos_unittest.cc189
-rw-r--r--chromium/net/ssl/client_cert_store_mac.cc3
-rw-r--r--chromium/net/ssl/client_cert_store_nss.cc88
-rw-r--r--chromium/net/ssl/client_cert_store_nss.h21
-rw-r--r--chromium/net/ssl/openssl_client_key_store.h2
-rw-r--r--chromium/net/ssl/server_bound_cert_service_unittest.cc8
-rw-r--r--chromium/net/ssl/signed_certificate_timestamp_and_status.cc2
-rw-r--r--chromium/net/ssl/signed_certificate_timestamp_and_status.h12
-rw-r--r--chromium/net/ssl/ssl_cert_request_info.cc2
-rw-r--r--chromium/net/ssl/ssl_cert_request_info.h3
-rw-r--r--chromium/net/ssl/ssl_cipher_suite_names.cc48
-rw-r--r--chromium/net/ssl/ssl_cipher_suite_names.h11
-rw-r--r--chromium/net/ssl/ssl_cipher_suite_names_unittest.cc16
-rw-r--r--chromium/net/ssl/ssl_client_auth_cache.cc6
-rw-r--r--chromium/net/ssl/ssl_client_auth_cache.h9
-rw-r--r--chromium/net/ssl/ssl_client_auth_cache_unittest.cc16
-rw-r--r--chromium/net/ssl/ssl_config.cc69
-rw-r--r--chromium/net/ssl/ssl_config.h156
-rw-r--r--chromium/net/ssl/ssl_config_service.cc95
-rw-r--r--chromium/net/ssl/ssl_config_service.h160
-rw-r--r--chromium/net/ssl/ssl_config_service_defaults.cc1
-rw-r--r--chromium/net/ssl/ssl_config_service_unittest.cc5
-rw-r--r--chromium/net/ssl/ssl_connection_status_flags.h27
-rw-r--r--chromium/net/ssl/ssl_connection_status_flags_unittest.cc37
-rw-r--r--chromium/net/ssl/ssl_info.cc2
-rw-r--r--chromium/net/ssl/ssl_info.h5
-rw-r--r--chromium/net/test/OWNERS3
-rw-r--r--chromium/net/test/android/OWNERS1
-rw-r--r--chromium/net/test/ct_test_util.cc27
-rw-r--r--chromium/net/test/ct_test_util.h7
-rw-r--r--chromium/net/test/embedded_test_server/embedded_test_server.cc1
-rw-r--r--chromium/net/test/embedded_test_server/embedded_test_server_unittest.cc4
-rw-r--r--chromium/net/test/gtest_util.h99
-rw-r--r--chromium/net/test/net_test_suite.cc134
-rw-r--r--chromium/net/test/python_utils.cc4
-rw-r--r--chromium/net/test/python_utils.h5
-rw-r--r--chromium/net/test/python_utils_unittest.cc4
-rw-r--r--chromium/net/test/run_all_unittests.cc17
-rw-r--r--chromium/net/test/scoped_disable_exit_on_dfatal.cc33
-rw-r--r--chromium/net/test/scoped_disable_exit_on_dfatal.h39
-rw-r--r--chromium/net/test/scoped_mock_log.cc58
-rw-r--r--chromium/net/test/scoped_mock_log.h98
-rw-r--r--chromium/net/test/spawned_test_server/base_test_server.cc44
-rw-r--r--chromium/net/test/spawned_test_server/base_test_server.h26
-rw-r--r--chromium/net/test/spawned_test_server/local_test_server.cc9
-rw-r--r--chromium/net/test/spawned_test_server/local_test_server.h8
-rw-r--r--chromium/net/test/spawned_test_server/local_test_server_posix.cc14
-rw-r--r--chromium/net/test/spawned_test_server/local_test_server_win.cc4
-rw-r--r--chromium/net/test/spawned_test_server/remote_test_server.cc7
-rw-r--r--chromium/net/test/spawned_test_server/spawner_communicator.cc2
-rw-r--r--chromium/net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp4
-rw-r--r--chromium/net/third_party/nss/README.chromium110
-rw-r--r--chromium/net/third_party/nss/patches/aesgcm.patch1363
-rw-r--r--chromium/net/third_party/nss/patches/aesgcmchromium.patch15
-rw-r--r--chromium/net/third_party/nss/patches/alpn.patch245
-rwxr-xr-xchromium/net/third_party/nss/patches/applypatches.sh49
-rw-r--r--chromium/net/third_party/nss/patches/cachecerts.patch33
-rw-r--r--chromium/net/third_party/nss/patches/cachelocks.patch149
-rw-r--r--chromium/net/third_party/nss/patches/canfalsestart.patch837
-rw-r--r--chromium/net/third_party/nss/patches/cbc.patch81
-rw-r--r--chromium/net/third_party/nss/patches/chacha20poly1305.patch142
-rw-r--r--chromium/net/third_party/nss/patches/channelid.patch239
-rw-r--r--chromium/net/third_party/nss/patches/channelid2.patch155
-rw-r--r--chromium/net/third_party/nss/patches/cipherorder.patch62
-rw-r--r--chromium/net/third_party/nss/patches/ciphersuiteversion.patch169
-rw-r--r--chromium/net/third_party/nss/patches/clientauth.patch100
-rw-r--r--chromium/net/third_party/nss/patches/didhandshakeresume.patch12
-rw-r--r--chromium/net/third_party/nss/patches/disableticketrenewal.patch17
-rw-r--r--chromium/net/third_party/nss/patches/ecpointform.patch19
-rw-r--r--chromium/net/third_party/nss/patches/fallbackscsv.patch162
-rw-r--r--chromium/net/third_party/nss/patches/getrequestedclientcerttypes.patch28
-rw-r--r--chromium/net/third_party/nss/patches/ignorechangecipherspec.patch19
-rw-r--r--chromium/net/third_party/nss/patches/negotiatedextension.patch27
-rw-r--r--chromium/net/third_party/nss/patches/nssrwlock.patch235
-rw-r--r--chromium/net/third_party/nss/patches/nullcipher_934016.patch16
-rw-r--r--chromium/net/third_party/nss/patches/paddingextension.patch142
-rw-r--r--chromium/net/third_party/nss/patches/paddingextensionall.patch26
-rw-r--r--chromium/net/third_party/nss/patches/paddingextvalue.patch16
-rw-r--r--chromium/net/third_party/nss/patches/peercertchain.patch67
-rw-r--r--chromium/net/third_party/nss/patches/peercertchain2.patch107
-rw-r--r--chromium/net/third_party/nss/patches/renegoscsv.patch15
-rw-r--r--chromium/net/third_party/nss/patches/reorderextensions.patch34
-rw-r--r--chromium/net/third_party/nss/patches/restartclientauth.patch30
-rw-r--r--chromium/net/third_party/nss/patches/resumeclienthelloversion.patch31
-rw-r--r--chromium/net/third_party/nss/patches/secitemarray.patch10
-rw-r--r--chromium/net/third_party/nss/patches/secretexporterlocks.patch10
-rw-r--r--chromium/net/third_party/nss/patches/sessioncache.patch53
-rw-r--r--chromium/net/third_party/nss/patches/signedcertificatetimestamps.patch311
-rw-r--r--chromium/net/third_party/nss/patches/sslnoncestatics.patch15
-rw-r--r--chromium/net/third_party/nss/patches/sslsock_903565.patch20
-rw-r--r--chromium/net/third_party/nss/patches/suitebonly.patch8
-rw-r--r--chromium/net/third_party/nss/patches/tls12backuphash.patch220
-rw-r--r--chromium/net/third_party/nss/patches/tls12backuphash2.patch127
-rw-r--r--chromium/net/third_party/nss/patches/tls12chromium.patch20
-rw-r--r--chromium/net/third_party/nss/patches/tlsunique.patch24
-rw-r--r--chromium/net/third_party/nss/patches/versionskew.patch45
-rw-r--r--chromium/net/third_party/nss/ssl.gyp2
-rw-r--r--chromium/net/third_party/nss/ssl/BUILD.gn139
-rw-r--r--chromium/net/third_party/nss/ssl/ssl.h36
-rw-r--r--chromium/net/third_party/nss/ssl/ssl3con.c449
-rw-r--r--chromium/net/third_party/nss/ssl/ssl3ecc.c9
-rw-r--r--chromium/net/third_party/nss/ssl/ssl3ext.c89
-rw-r--r--chromium/net/third_party/nss/ssl/ssl3gthr.c25
-rw-r--r--chromium/net/third_party/nss/ssl/sslauth.c11
-rw-r--r--chromium/net/third_party/nss/ssl/sslcon.c8
-rw-r--r--chromium/net/third_party/nss/ssl/sslenum.c125
-rw-r--r--chromium/net/third_party/nss/ssl/sslimpl.h111
-rw-r--r--chromium/net/third_party/nss/ssl/sslinit.c5
-rw-r--r--chromium/net/third_party/nss/ssl/sslnonce.c124
-rw-r--r--chromium/net/third_party/nss/ssl/sslplatf.c88
-rw-r--r--chromium/net/third_party/nss/ssl/sslsecur.c9
-rw-r--r--chromium/net/third_party/nss/ssl/sslsock.c143
-rw-r--r--chromium/net/third_party/nss/ssl/sslt.h2
-rw-r--r--chromium/net/tools/DEPS4
-rw-r--r--chromium/net/tools/balsa/balsa_enums.h5
-rw-r--r--chromium/net/tools/balsa/balsa_frame.cc15
-rw-r--r--chromium/net/tools/balsa/balsa_frame.h2
-rw-r--r--chromium/net/tools/balsa/balsa_headers.cc25
-rw-r--r--chromium/net/tools/balsa/balsa_headers.h2
-rw-r--r--chromium/net/tools/balsa/string_piece_utils.h29
-rw-r--r--chromium/net/tools/crash_cache/crash_cache.cc6
-rw-r--r--chromium/net/tools/crl_set_dump/crl_set_dump.cc3
-rw-r--r--chromium/net/tools/disk_cache_memory_test/disk_cache_memory_test.cc5
-rw-r--r--chromium/net/tools/dns_fuzz_stub/dns_fuzz_stub.cc2
-rw-r--r--chromium/net/tools/dump_cache/cache_dumper.cc2
-rw-r--r--chromium/net/tools/dump_cache/cache_dumper.h2
-rw-r--r--chromium/net/tools/dump_cache/dump_cache.cc9
-rw-r--r--chromium/net/tools/dump_cache/dump_files.cc25
-rw-r--r--chromium/net/tools/dump_cache/upgrade_win.cc8
-rw-r--r--chromium/net/tools/fetch/fetch_client.cc231
-rw-r--r--chromium/net/tools/fetch/fetch_server.cc57
-rw-r--r--chromium/net/tools/fetch/http_listen_socket.cc249
-rw-r--r--chromium/net/tools/fetch/http_listen_socket.h70
-rw-r--r--chromium/net/tools/fetch/http_server.cc12
-rw-r--r--chromium/net/tools/fetch/http_server.h26
-rw-r--r--chromium/net/tools/fetch/http_server_request_info.cc11
-rw-r--r--chromium/net/tools/fetch/http_server_request_info.h26
-rw-r--r--chromium/net/tools/fetch/http_server_response_info.cc11
-rw-r--r--chromium/net/tools/fetch/http_server_response_info.h39
-rw-r--r--chromium/net/tools/fetch/http_session.cc33
-rw-r--r--chromium/net/tools/fetch/http_session.h27
-rw-r--r--chromium/net/tools/flip_server/flip_in_mem_edsm_server.cc4
-rw-r--r--chromium/net/tools/flip_server/loadtime_measurement.h54
-rw-r--r--chromium/net/tools/flip_server/sm_connection.cc4
-rw-r--r--chromium/net/tools/flip_server/sm_connection.h3
-rw-r--r--chromium/net/tools/flip_server/spdy_interface.cc48
-rw-r--r--chromium/net/tools/flip_server/spdy_interface.h15
-rw-r--r--chromium/net/tools/flip_server/spdy_interface_test.cc93
-rw-r--r--chromium/net/tools/flip_server/spdy_ssl.cc4
-rw-r--r--chromium/net/tools/gdig/file_net_log.cc2
-rw-r--r--chromium/net/tools/gdig/gdig.cc18
-rw-r--r--chromium/net/tools/get_server_time/get_server_time.cc47
-rw-r--r--chromium/net/tools/net_watcher/net_watcher.cc10
-rw-r--r--chromium/net/tools/quic/end_to_end_test.cc696
-rw-r--r--chromium/net/tools/quic/quic_client.cc121
-rw-r--r--chromium/net/tools/quic/quic_client.h92
-rw-r--r--chromium/net/tools/quic/quic_client_bin.cc57
-rw-r--r--chromium/net/tools/quic/quic_client_session.cc25
-rw-r--r--chromium/net/tools/quic/quic_client_session.h14
-rw-r--r--chromium/net/tools/quic/quic_client_session_test.cc24
-rw-r--r--chromium/net/tools/quic/quic_default_packet_writer.cc29
-rw-r--r--chromium/net/tools/quic/quic_default_packet_writer.h23
-rw-r--r--chromium/net/tools/quic/quic_dispatcher.cc381
-rw-r--r--chromium/net/tools/quic/quic_dispatcher.h149
-rw-r--r--chromium/net/tools/quic/quic_dispatcher_test.cc320
-rw-r--r--chromium/net/tools/quic/quic_epoll_clock.h4
-rw-r--r--chromium/net/tools/quic/quic_in_memory_cache.cc27
-rw-r--r--chromium/net/tools/quic/quic_in_memory_cache.h16
-rw-r--r--chromium/net/tools/quic/quic_in_memory_cache_test.cc2
-rw-r--r--chromium/net/tools/quic/quic_packet_writer_wrapper.cc48
-rw-r--r--chromium/net/tools/quic/quic_packet_writer_wrapper.h50
-rw-r--r--chromium/net/tools/quic/quic_server.cc63
-rw-r--r--chromium/net/tools/quic/quic_server.h42
-rw-r--r--chromium/net/tools/quic/quic_server_bin.cc10
-rw-r--r--chromium/net/tools/quic/quic_server_session.cc31
-rw-r--r--chromium/net/tools/quic/quic_server_session.h25
-rw-r--r--chromium/net/tools/quic/quic_server_session_test.cc217
-rw-r--r--chromium/net/tools/quic/quic_server_test.cc32
-rw-r--r--chromium/net/tools/quic/quic_socket_utils.cc68
-rw-r--r--chromium/net/tools/quic/quic_socket_utils.h31
-rw-r--r--chromium/net/tools/quic/quic_spdy_client_stream.cc43
-rw-r--r--chromium/net/tools/quic/quic_spdy_client_stream.h12
-rw-r--r--chromium/net/tools/quic/quic_spdy_client_stream_test.cc36
-rw-r--r--chromium/net/tools/quic/quic_spdy_server_stream.cc38
-rw-r--r--chromium/net/tools/quic/quic_spdy_server_stream.h3
-rw-r--r--chromium/net/tools/quic/quic_spdy_server_stream_test.cc146
-rw-r--r--chromium/net/tools/quic/quic_time_wait_list_manager.cc301
-rw-r--r--chromium/net/tools/quic/quic_time_wait_list_manager.h198
-rw-r--r--chromium/net/tools/quic/quic_time_wait_list_manager_test.cc439
-rw-r--r--chromium/net/tools/quic/spdy_utils.cc8
-rw-r--r--chromium/net/tools/quic/spdy_utils.h3
-rw-r--r--chromium/net/tools/quic/test_tools/http_message.cc174
-rw-r--r--chromium/net/tools/quic/test_tools/http_message.h133
-rw-r--r--chromium/net/tools/quic/test_tools/http_message_test_utils.cc174
-rw-r--r--chromium/net/tools/quic/test_tools/http_message_test_utils.h133
-rw-r--r--chromium/net/tools/quic/test_tools/mock_epoll_server.h12
-rw-r--r--chromium/net/tools/quic/test_tools/mock_quic_dispatcher.cc11
-rw-r--r--chromium/net/tools/quic/test_tools/mock_quic_dispatcher.h9
-rw-r--r--chromium/net/tools/quic/test_tools/packet_dropping_test_writer.cc78
-rw-r--r--chromium/net/tools/quic/test_tools/packet_dropping_test_writer.h38
-rw-r--r--chromium/net/tools/quic/test_tools/quic_client_peer.cc14
-rw-r--r--chromium/net/tools/quic/test_tools/quic_client_peer.h12
-rw-r--r--chromium/net/tools/quic/test_tools/quic_dispatcher_peer.cc21
-rw-r--r--chromium/net/tools/quic/test_tools/quic_dispatcher_peer.h20
-rw-r--r--chromium/net/tools/quic/test_tools/quic_server_peer.cc5
-rw-r--r--chromium/net/tools/quic/test_tools/quic_server_peer.h6
-rw-r--r--chromium/net/tools/quic/test_tools/quic_test_client.cc349
-rw-r--r--chromium/net/tools/quic/test_tools/quic_test_client.h162
-rw-r--r--chromium/net/tools/quic/test_tools/quic_test_utils.cc60
-rw-r--r--chromium/net/tools/quic/test_tools/quic_test_utils.h100
-rw-r--r--chromium/net/tools/quic/test_tools/server_thread.cc45
-rw-r--r--chromium/net/tools/quic/test_tools/server_thread.h21
-rw-r--r--chromium/net/tools/quic/test_tools/simple_client.cc36
-rw-r--r--chromium/net/tools/quic/test_tools/simple_client.h159
-rw-r--r--chromium/net/tools/testserver/run_testserver.cc7
-rwxr-xr-xchromium/net/tools/testserver/testserver.py142
-rw-r--r--chromium/net/tools/testserver/testserver_base.py8
-rw-r--r--chromium/net/tools/tld_cleanup/BUILD.gn14
-rw-r--r--chromium/net/tools/tld_cleanup/PRESUBMIT.py32
-rw-r--r--chromium/net/tools/tld_cleanup/README13
-rwxr-xr-xchromium/net/tools/tld_cleanup/make_dafsa.py469
-rwxr-xr-xchromium/net/tools/tld_cleanup/make_dafsa_unittest.py757
-rw-r--r--chromium/net/tools/tld_cleanup/tld_cleanup.cc2
-rw-r--r--chromium/net/tools/tld_cleanup/tld_cleanup_util.cc4
-rw-r--r--chromium/net/udp/datagram_server_socket.h9
-rw-r--r--chromium/net/udp/udp_client_socket.cc4
-rw-r--r--chromium/net/udp/udp_client_socket.h4
-rw-r--r--chromium/net/udp/udp_server_socket.cc8
-rw-r--r--chromium/net/udp/udp_server_socket.h5
-rw-r--r--chromium/net/udp/udp_socket_libevent.cc45
-rw-r--r--chromium/net/udp/udp_socket_libevent.h7
-rw-r--r--chromium/net/udp/udp_socket_win.cc60
-rw-r--r--chromium/net/udp/udp_socket_win.h9
-rw-r--r--chromium/net/url_request/file_protocol_handler.cc2
-rw-r--r--chromium/net/url_request/http_user_agent_settings.h5
-rw-r--r--chromium/net/url_request/protocol_intercept_job_factory.cc47
-rw-r--r--chromium/net/url_request/protocol_intercept_job_factory.h51
-rw-r--r--chromium/net/url_request/static_http_user_agent_settings.cc2
-rw-r--r--chromium/net/url_request/static_http_user_agent_settings.h2
-rw-r--r--chromium/net/url_request/test_url_fetcher_factory.cc50
-rw-r--r--chromium/net/url_request/test_url_fetcher_factory.h8
-rw-r--r--chromium/net/url_request/url_fetcher.h20
-rw-r--r--chromium/net/url_request/url_fetcher_core.cc15
-rw-r--r--chromium/net/url_request/url_fetcher_core.h5
-rw-r--r--chromium/net/url_request/url_fetcher_impl.cc10
-rw-r--r--chromium/net/url_request/url_fetcher_impl.h6
-rw-r--r--chromium/net/url_request/url_fetcher_impl_unittest.cc2
-rw-r--r--chromium/net/url_request/url_fetcher_response_writer.cc32
-rw-r--r--chromium/net/url_request/url_fetcher_response_writer.h8
-rw-r--r--chromium/net/url_request/url_fetcher_response_writer_unittest.cc180
-rw-r--r--chromium/net/url_request/url_range_request_job.cc31
-rw-r--r--chromium/net/url_request/url_range_request_job.h43
-rw-r--r--chromium/net/url_request/url_request.cc188
-rw-r--r--chromium/net/url_request/url_request.h125
-rw-r--r--chromium/net/url_request/url_request_context.cc18
-rw-r--r--chromium/net/url_request/url_request_context.h27
-rw-r--r--chromium/net/url_request/url_request_context_builder.cc119
-rw-r--r--chromium/net/url_request/url_request_context_builder.h40
-rw-r--r--chromium/net/url_request/url_request_context_builder_unittest.cc45
-rw-r--r--chromium/net/url_request/url_request_context_getter.cc18
-rw-r--r--chromium/net/url_request/url_request_context_getter.h29
-rw-r--r--chromium/net/url_request/url_request_file_dir_job.cc2
-rw-r--r--chromium/net/url_request/url_request_file_job.cc54
-rw-r--r--chromium/net/url_request/url_request_file_job.h13
-rw-r--r--chromium/net/url_request/url_request_file_job_unittest.cc253
-rw-r--r--chromium/net/url_request/url_request_filter.cc166
-rw-r--r--chromium/net/url_request/url_request_filter.h81
-rw-r--r--chromium/net/url_request/url_request_filter_unittest.cc100
-rw-r--r--chromium/net/url_request/url_request_ftp_job.cc9
-rw-r--r--chromium/net/url_request/url_request_ftp_job.h4
-rw-r--r--chromium/net/url_request/url_request_ftp_job_unittest.cc11
-rw-r--r--chromium/net/url_request/url_request_http_job.cc268
-rw-r--r--chromium/net/url_request/url_request_http_job.h22
-rw-r--r--chromium/net/url_request/url_request_http_job_unittest.cc6
-rw-r--r--chromium/net/url_request/url_request_intercepting_job_factory.cc49
-rw-r--r--chromium/net/url_request/url_request_intercepting_job_factory.h58
-rw-r--r--chromium/net/url_request/url_request_interceptor.cc15
-rw-r--r--chromium/net/url_request/url_request_interceptor.h37
-rw-r--r--chromium/net/url_request/url_request_job.cc276
-rw-r--r--chromium/net/url_request/url_request_job.h37
-rw-r--r--chromium/net/url_request/url_request_job_factory_impl.cc22
-rw-r--r--chromium/net/url_request/url_request_job_factory_impl.h15
-rw-r--r--chromium/net/url_request/url_request_job_manager.cc79
-rw-r--r--chromium/net/url_request/url_request_job_manager.h22
-rw-r--r--chromium/net/url_request/url_request_job_unittest.cc68
-rw-r--r--chromium/net/url_request/url_request_redirect_job.cc20
-rw-r--r--chromium/net/url_request/url_request_redirect_job.h10
-rw-r--r--chromium/net/url_request/url_request_simple_job.cc27
-rw-r--r--chromium/net/url_request/url_request_simple_job.h5
-rw-r--r--chromium/net/url_request/url_request_simple_job_unittest.cc141
-rw-r--r--chromium/net/url_request/url_request_test_job.cc16
-rw-r--r--chromium/net/url_request/url_request_test_job.h5
-rw-r--r--chromium/net/url_request/url_request_test_util.cc36
-rw-r--r--chromium/net/url_request/url_request_test_util.h40
-rw-r--r--chromium/net/url_request/url_request_throttler_simulation_unittest.cc2
-rw-r--r--chromium/net/url_request/url_request_throttler_unittest.cc80
-rw-r--r--chromium/net/url_request/url_request_unittest.cc972
-rw-r--r--chromium/net/url_request/view_cache_helper_unittest.cc3
-rw-r--r--chromium/net/websockets/OWNERS9
-rw-r--r--chromium/net/websockets/README4
-rw-r--r--chromium/net/websockets/websocket_basic_handshake_stream.cc480
-rw-r--r--chromium/net/websockets/websocket_basic_handshake_stream.h34
-rw-r--r--chromium/net/websockets/websocket_basic_stream.cc31
-rw-r--r--chromium/net/websockets/websocket_basic_stream_test.cc50
-rw-r--r--chromium/net/websockets/websocket_channel.cc723
-rw-r--r--chromium/net/websockets/websocket_channel.h209
-rw-r--r--chromium/net/websockets/websocket_channel_test.cc1359
-rw-r--r--chromium/net/websockets/websocket_deflate_stream.cc38
-rw-r--r--chromium/net/websockets/websocket_deflate_stream.h2
-rw-r--r--chromium/net/websockets/websocket_deflate_stream_test.cc182
-rw-r--r--chromium/net/websockets/websocket_deflater.cc1
-rw-r--r--chromium/net/websockets/websocket_deflater.h3
-rw-r--r--chromium/net/websockets/websocket_deflater_test.cc6
-rw-r--r--chromium/net/websockets/websocket_event_interface.h61
-rw-r--r--chromium/net/websockets/websocket_frame.cc6
-rw-r--r--chromium/net/websockets/websocket_frame_parser.cc6
-rw-r--r--chromium/net/websockets/websocket_frame_test.cc4
-rw-r--r--chromium/net/websockets/websocket_handshake_handler_spdy_test.cc3
-rw-r--r--chromium/net/websockets/websocket_handshake_request_info.cc19
-rw-r--r--chromium/net/websockets/websocket_handshake_request_info.h33
-rw-r--r--chromium/net/websockets/websocket_handshake_response_info.cc30
-rw-r--r--chromium/net/websockets/websocket_handshake_response_info.h43
-rw-r--r--chromium/net/websockets/websocket_handshake_stream_base.h2
-rw-r--r--chromium/net/websockets/websocket_handshake_stream_create_helper.cc24
-rw-r--r--chromium/net/websockets/websocket_handshake_stream_create_helper.h18
-rw-r--r--chromium/net/websockets/websocket_handshake_stream_create_helper_test.cc67
-rw-r--r--chromium/net/websockets/websocket_job.cc46
-rw-r--r--chromium/net/websockets/websocket_job.h6
-rw-r--r--chromium/net/websockets/websocket_job_test.cc253
-rw-r--r--chromium/net/websockets/websocket_net_log_params_test.cc2
-rw-r--r--chromium/net/websockets/websocket_stream.cc209
-rw-r--r--chromium/net/websockets/websocket_stream.h37
-rw-r--r--chromium/net/websockets/websocket_stream_test.cc791
-rw-r--r--chromium/net/websockets/websocket_test_util.cc62
-rw-r--r--chromium/net/websockets/websocket_test_util.h40
-rw-r--r--chromium/net/websockets/websocket_throttle_test.cc66
-rw-r--r--chromium/pdf/pdf.gyp205
-rw-r--r--chromium/ppapi/BUILD.gn719
-rw-r--r--chromium/ppapi/PRESUBMIT.py45
-rw-r--r--chromium/ppapi/api/dev/pp_optional_structs_dev.idl14
-rw-r--r--chromium/ppapi/api/dev/ppb_alarms_dev.idl181
-rw-r--r--chromium/ppapi/api/dev/ppb_audio_input_dev.idl28
-rw-r--r--chromium/ppapi/api/dev/ppb_file_io_dev.idl116
-rw-r--r--chromium/ppapi/api/dev/ppb_find_dev.idl35
-rw-r--r--chromium/ppapi/api/dev/ppb_graphics_2d_dev.idl96
-rw-r--r--chromium/ppapi/api/dev/ppb_keyboard_input_event_dev.idl60
-rw-r--r--chromium/ppapi/api/dev/ppb_resource_array_dev.idl68
-rw-r--r--chromium/ppapi/api/dev/ppb_var_resource_dev.idl38
-rw-r--r--chromium/ppapi/api/dev/ppb_video_capture_dev.idl20
-rw-r--r--chromium/ppapi/api/extensions/dev/ppb_ext_socket_dev.idl542
-rw-r--r--chromium/ppapi/api/pp_codecs.idl57
-rw-r--r--chromium/ppapi/api/pp_errors.idl12
-rw-r--r--chromium/ppapi/api/pp_macros.idl16
-rw-r--r--chromium/ppapi/api/pp_rect.idl39
-rw-r--r--chromium/ppapi/api/pp_size.idl26
-rw-r--r--chromium/ppapi/api/pp_var.idl31
-rw-r--r--chromium/ppapi/api/ppb.idl2
-rw-r--r--chromium/ppapi/api/ppb_audio.idl2
-rw-r--r--chromium/ppapi/api/ppb_audio_buffer.idl140
-rw-r--r--chromium/ppapi/api/ppb_audio_config.idl2
-rw-r--r--chromium/ppapi/api/ppb_compositor.idl131
-rw-r--r--chromium/ppapi/api/ppb_compositor_layer.idl222
-rw-r--r--chromium/ppapi/api/ppb_file_mapping.idl131
-rw-r--r--chromium/ppapi/api/ppb_file_ref.idl43
-rw-r--r--chromium/ppapi/api/ppb_input_event.idl69
-rw-r--r--chromium/ppapi/api/ppb_media_stream_audio_track.idl201
-rw-r--r--chromium/ppapi/api/ppb_media_stream_video_track.idl247
-rw-r--r--chromium/ppapi/api/ppb_message_loop.idl4
-rw-r--r--chromium/ppapi/api/ppb_messaging.idl62
-rw-r--r--chromium/ppapi/api/ppb_var.idl45
-rw-r--r--chromium/ppapi/api/ppb_video_decoder.idl216
-rw-r--r--chromium/ppapi/api/ppb_video_frame.idl123
-rw-r--r--chromium/ppapi/api/ppb_view.idl26
-rw-r--r--chromium/ppapi/api/ppp_input_event.idl8
-rw-r--r--chromium/ppapi/api/ppp_message_handler.idl70
-rw-r--r--chromium/ppapi/api/private/finish_writing_these/ppb_pdf.idl12
-rw-r--r--chromium/ppapi/api/private/pp_content_decryptor.idl41
-rw-r--r--chromium/ppapi/api/private/ppb_content_decryptor_private.idl83
-rw-r--r--chromium/ppapi/api/private/ppb_display_color_profile_private.idl97
-rw-r--r--chromium/ppapi/api/private/ppb_find_private.idl66
-rw-r--r--chromium/ppapi/api/private/ppb_flash_clipboard.idl14
-rw-r--r--chromium/ppapi/api/private/ppb_flash_drm.idl8
-rw-r--r--chromium/ppapi/api/private/ppb_input_event_private.idl54
-rw-r--r--chromium/ppapi/api/private/ppb_nacl_private.idl385
-rw-r--r--chromium/ppapi/api/private/ppb_uma_private.idl27
-rw-r--r--chromium/ppapi/api/private/ppp_content_decryptor_private.idl66
-rw-r--r--chromium/ppapi/api/private/ppp_find_private.idl35
-rw-r--r--chromium/ppapi/c/dev/pp_optional_structs_dev.h34
-rw-r--r--chromium/ppapi/c/dev/ppb_alarms_dev.h210
-rw-r--r--chromium/ppapi/c/dev/ppb_audio_input_dev.h25
-rw-r--r--chromium/ppapi/c/dev/ppb_file_io_dev.h138
-rw-r--r--chromium/ppapi/c/dev/ppb_find_dev.h51
-rw-r--r--chromium/ppapi/c/dev/ppb_graphics_2d_dev.h122
-rw-r--r--chromium/ppapi/c/dev/ppb_keyboard_input_event_dev.h84
-rw-r--r--chromium/ppapi/c/dev/ppb_opengles2ext_dev.h20
-rw-r--r--chromium/ppapi/c/dev/ppb_resource_array_dev.h85
-rw-r--r--chromium/ppapi/c/dev/ppb_var_resource_dev.h60
-rw-r--r--chromium/ppapi/c/dev/ppb_video_capture_dev.h20
-rw-r--r--chromium/ppapi/c/dev/ppp_find_dev.h35
-rw-r--r--chromium/ppapi/c/extensions/dev/ppb_ext_socket_dev.h603
-rw-r--r--chromium/ppapi/c/pp_codecs.h83
-rw-r--r--chromium/ppapi/c/pp_errors.h13
-rw-r--r--chromium/ppapi/c/pp_macros.h20
-rw-r--r--chromium/ppapi/c/pp_rect.h40
-rw-r--r--chromium/ppapi/c/pp_size.h28
-rw-r--r--chromium/ppapi/c/pp_var.h33
-rw-r--r--chromium/ppapi/c/ppb.h4
-rw-r--r--chromium/ppapi/c/ppb_audio.h4
-rw-r--r--chromium/ppapi/c/ppb_audio_buffer.h156
-rw-r--r--chromium/ppapi/c/ppb_audio_config.h4
-rw-r--r--chromium/ppapi/c/ppb_compositor.h148
-rw-r--r--chromium/ppapi/c/ppb_compositor_layer.h236
-rw-r--r--chromium/ppapi/c/ppb_file_mapping.h147
-rw-r--r--chromium/ppapi/c/ppb_file_ref.h78
-rw-r--r--chromium/ppapi/c/ppb_input_event.h53
-rw-r--r--chromium/ppapi/c/ppb_media_stream_audio_track.h215
-rw-r--r--chromium/ppapi/c/ppb_media_stream_video_track.h275
-rw-r--r--chromium/ppapi/c/ppb_message_loop.h4
-rw-r--r--chromium/ppapi/c/ppb_messaging.h67
-rw-r--r--chromium/ppapi/c/ppb_opengles2.h743
-rw-r--r--chromium/ppapi/c/ppb_var.h53
-rw-r--r--chromium/ppapi/c/ppb_video_decoder.h222
-rw-r--r--chromium/ppapi/c/ppb_video_frame.h139
-rw-r--r--chromium/ppapi/c/ppb_view.h34
-rw-r--r--chromium/ppapi/c/ppp_input_event.h10
-rw-r--r--chromium/ppapi/c/ppp_message_handler.h87
-rw-r--r--chromium/ppapi/c/private/pp_content_decryptor.h41
-rw-r--r--chromium/ppapi/c/private/ppb_content_decryptor_private.h88
-rw-r--r--chromium/ppapi/c/private/ppb_display_color_profile_private.h123
-rw-r--r--chromium/ppapi/c/private/ppb_find_private.h81
-rw-r--r--chromium/ppapi/c/private/ppb_flash_clipboard.h34
-rw-r--r--chromium/ppapi/c/private/ppb_flash_drm.h8
-rw-r--r--chromium/ppapi/c/private/ppb_input_event_private.h78
-rw-r--r--chromium/ppapi/c/private/ppb_nacl_private.h381
-rw-r--r--chromium/ppapi/c/private/ppb_pdf.h6
-rw-r--r--chromium/ppapi/c/private/ppb_uma_private.h29
-rw-r--r--chromium/ppapi/c/private/ppp_content_decryptor_private.h75
-rw-r--r--chromium/ppapi/c/private/ppp_find_private.h58
-rw-r--r--chromium/ppapi/c/private/ppp_pdf.h34
-rw-r--r--chromium/ppapi/cpp/audio.h2
-rw-r--r--chromium/ppapi/cpp/audio_buffer.cc91
-rw-r--r--chromium/ppapi/cpp/audio_buffer.h85
-rw-r--r--chromium/ppapi/cpp/audio_config.h2
-rw-r--r--chromium/ppapi/cpp/completion_callback.h170
-rw-r--r--chromium/ppapi/cpp/compositor.cc79
-rw-r--r--chromium/ppapi/cpp/compositor.h90
-rw-r--r--chromium/ppapi/cpp/compositor_layer.cc142
-rw-r--r--chromium/ppapi/cpp/compositor_layer.h188
-rw-r--r--chromium/ppapi/cpp/dev/audio_input_dev.cc43
-rw-r--r--chromium/ppapi/cpp/dev/audio_input_dev.h4
-rw-r--r--chromium/ppapi/cpp/dev/find_dev.cc77
-rw-r--r--chromium/ppapi/cpp/dev/find_dev.h62
-rw-r--r--chromium/ppapi/cpp/dev/graphics_2d_dev.cc64
-rw-r--r--chromium/ppapi/cpp/dev/graphics_2d_dev.h76
-rw-r--r--chromium/ppapi/cpp/dev/printing_dev.h2
-rw-r--r--chromium/ppapi/cpp/dev/resource_array_dev.cc92
-rw-r--r--chromium/ppapi/cpp/dev/resource_array_dev.h71
-rw-r--r--chromium/ppapi/cpp/dev/var_resource_dev.cc70
-rw-r--r--chromium/ppapi/cpp/dev/var_resource_dev.h53
-rw-r--r--chromium/ppapi/cpp/dev/video_capture_dev.cc44
-rw-r--r--chromium/ppapi/cpp/extensions/dev/socket_dev.cc654
-rw-r--r--chromium/ppapi/cpp/extensions/dev/socket_dev.h290
-rw-r--r--chromium/ppapi/cpp/extensions/dict_field.h100
-rw-r--r--chromium/ppapi/cpp/extensions/ext_output_traits.h142
-rw-r--r--chromium/ppapi/cpp/extensions/from_var_converter.h236
-rw-r--r--chromium/ppapi/cpp/extensions/optional.h97
-rw-r--r--chromium/ppapi/cpp/extensions/to_var_converter.h156
-rw-r--r--chromium/ppapi/cpp/file_io.cc1
-rw-r--r--chromium/ppapi/cpp/file_ref.cc91
-rw-r--r--chromium/ppapi/cpp/file_ref.h28
-rw-r--r--chromium/ppapi/cpp/image_data.h2
-rw-r--r--chromium/ppapi/cpp/input_event.cc88
-rw-r--r--chromium/ppapi/cpp/input_event.h37
-rw-r--r--chromium/ppapi/cpp/instance.cc8
-rw-r--r--chromium/ppapi/cpp/instance.h20
-rw-r--r--chromium/ppapi/cpp/media_stream_audio_track.cc111
-rw-r--r--chromium/ppapi/cpp/media_stream_audio_track.h144
-rw-r--r--chromium/ppapi/cpp/media_stream_video_track.cc167
-rw-r--r--chromium/ppapi/cpp/media_stream_video_track.h164
-rw-r--r--chromium/ppapi/cpp/message_loop.h4
-rw-r--r--chromium/ppapi/cpp/private/content_decryptor_private.cc129
-rw-r--r--chromium/ppapi/cpp/private/content_decryptor_private.h40
-rw-r--r--chromium/ppapi/cpp/private/find_private.cc99
-rw-r--r--chromium/ppapi/cpp/private/find_private.h66
-rw-r--r--chromium/ppapi/cpp/private/flash_clipboard.cc62
-rw-r--r--chromium/ppapi/cpp/private/flash_clipboard.h6
-rw-r--r--chromium/ppapi/cpp/private/input_event_private.cc44
-rw-r--r--chromium/ppapi/cpp/private/input_event_private.h27
-rw-r--r--chromium/ppapi/cpp/private/pdf.cc38
-rw-r--r--chromium/ppapi/cpp/private/pdf.h10
-rw-r--r--chromium/ppapi/cpp/private/uma_private.cc79
-rw-r--r--chromium/ppapi/cpp/private/uma_private.h49
-rw-r--r--chromium/ppapi/cpp/rect.cc109
-rw-r--r--chromium/ppapi/cpp/rect.h416
-rw-r--r--chromium/ppapi/cpp/resource.h4
-rw-r--r--chromium/ppapi/cpp/size.h160
-rw-r--r--chromium/ppapi/cpp/var.cc111
-rw-r--r--chromium/ppapi/cpp/var.h12
-rw-r--r--chromium/ppapi/cpp/video_decoder.cc96
-rw-r--r--chromium/ppapi/cpp/video_decoder.h181
-rw-r--r--chromium/ppapi/cpp/video_frame.cc74
-rw-r--r--chromium/ppapi/cpp/video_frame.h77
-rw-r--r--chromium/ppapi/cpp/view.cc48
-rw-r--r--chromium/ppapi/cpp/view.h7
-rw-r--r--chromium/ppapi/examples/compositor/compositor.cc445
-rw-r--r--chromium/ppapi/examples/compositor/compositor.html28
-rw-r--r--chromium/ppapi/examples/compositor/spinning_cube.cc459
-rw-r--r--chromium/ppapi/examples/compositor/spinning_cube.h42
-rw-r--r--chromium/ppapi/examples/file_chooser/file_chooser.cc2
-rw-r--r--chromium/ppapi/examples/gles2_spinning_cube/gles2_spinning_cube.cc150
-rw-r--r--chromium/ppapi/examples/gles2_spinning_cube/gles2_spinning_cube.html18
-rw-r--r--chromium/ppapi/examples/gles2_spinning_cube/spinning_cube.cc466
-rw-r--r--chromium/ppapi/examples/gles2_spinning_cube/spinning_cube.h42
-rw-r--r--chromium/ppapi/examples/media_stream_audio/media_stream_audio.cc224
-rw-r--r--chromium/ppapi/examples/media_stream_audio/media_stream_audio.html44
-rw-r--r--chromium/ppapi/examples/media_stream_video/media_stream_video.cc494
-rw-r--r--chromium/ppapi/examples/media_stream_video/media_stream_video.html74
-rw-r--r--chromium/ppapi/examples/video_decode/OWNERS1
-rw-r--r--chromium/ppapi/examples/video_decode/testdata.h45418
-rw-r--r--chromium/ppapi/examples/video_decode/video_decode.cc848
-rw-r--r--chromium/ppapi/examples/video_decode/video_decode.html2
-rw-r--r--chromium/ppapi/examples/video_decode/video_decode_dev.cc685
-rw-r--r--chromium/ppapi/examples/video_decode/video_decode_dev.html18
-rw-r--r--chromium/ppapi/examples/video_effects/video_effects.html10
-rw-r--r--chromium/ppapi/generators/idl_ast.py9
-rwxr-xr-xchromium/ppapi/generators/idl_c_header.py34
-rwxr-xr-xchromium/ppapi/generators/idl_c_proto.py55
-rwxr-xr-xchromium/ppapi/generators/idl_gen_pnacl.py8
-rw-r--r--chromium/ppapi/generators/idl_gen_wrapper.py29
-rwxr-xr-xchromium/ppapi/generators/idl_lexer.py3
-rwxr-xr-xchromium/ppapi/generators/idl_node.py22
-rwxr-xr-xchromium/ppapi/generators/idl_parser.py82
-rwxr-xr-xchromium/ppapi/generators/idl_release.py7
-rwxr-xr-xchromium/ppapi/generators/idl_thunk.py18
-rw-r--r--chromium/ppapi/generators/pnacl_shim.h29
-rw-r--r--chromium/ppapi/generators/test_cgen/interface.h6
-rw-r--r--chromium/ppapi/generators/test_cgen/interface.idl5
-rw-r--r--chromium/ppapi/generators/test_cgen_range/dev_channel_interface.h101
-rw-r--r--chromium/ppapi/generators/test_cgen_range/dev_channel_interface.idl67
-rw-r--r--chromium/ppapi/generators/test_cgen_range/versions.h1
-rw-r--r--chromium/ppapi/generators/test_cgen_range/versions.idl8
-rw-r--r--chromium/ppapi/generators/test_gen_pnacl/test_interfaces.idl6
-rw-r--r--chromium/ppapi/host/error_conversion.cc4
-rw-r--r--chromium/ppapi/host/host_message_context.cc4
-rw-r--r--chromium/ppapi/host/host_message_context.h3
-rw-r--r--chromium/ppapi/host/ppapi_host.cc17
-rw-r--r--chromium/ppapi/host/ppapi_host.h8
-rw-r--r--chromium/ppapi/host/resource_host.cc8
-rw-r--r--chromium/ppapi/host/resource_host.h2
-rw-r--r--chromium/ppapi/lib/gl/gles2/gl2ext_ppapi.c11
-rw-r--r--chromium/ppapi/lib/gl/gles2/gl2ext_ppapi.h2
-rw-r--r--chromium/ppapi/lib/gl/gles2/gles2.c585
-rw-r--r--chromium/ppapi/lib/gl/include/GLES2/gl2ext.h10
-rw-r--r--chromium/ppapi/lib/gl/include/KHR/khrplatform.h15
-rw-r--r--chromium/ppapi/nacl_irt/DEPS16
-rw-r--r--chromium/ppapi/nacl_irt/irt_manifest.h21
-rw-r--r--chromium/ppapi/nacl_irt/irt_ppapi.cc64
-rw-r--r--chromium/ppapi/nacl_irt/irt_ppapi.h13
-rw-r--r--chromium/ppapi/nacl_irt/irt_start.cc26
-rw-r--r--chromium/ppapi/nacl_irt/manifest_service.cc112
-rw-r--r--chromium/ppapi/nacl_irt/manifest_service.h44
-rw-r--r--chromium/ppapi/nacl_irt/plugin_main.cc60
-rw-r--r--chromium/ppapi/nacl_irt/plugin_main.h25
-rw-r--r--chromium/ppapi/nacl_irt/plugin_startup.cc115
-rw-r--r--chromium/ppapi/nacl_irt/plugin_startup.h51
-rw-r--r--chromium/ppapi/nacl_irt/ppapi_dispatcher.cc226
-rw-r--r--chromium/ppapi/nacl_irt/ppapi_dispatcher.h100
-rw-r--r--chromium/ppapi/nacl_irt/public/README10
-rw-r--r--chromium/ppapi/nacl_irt/public/irt_nonsfi.h24
-rw-r--r--chromium/ppapi/nacl_irt/public/irt_ppapi.h42
-rw-r--r--chromium/ppapi/native_client/DEPS9
-rw-r--r--chromium/ppapi/native_client/chrome_main.scons17
-rw-r--r--chromium/ppapi/native_client/native_client.gyp178
-rw-r--r--chromium/ppapi/native_client/src/shared/ppapi_proxy/ppruntime.h10
-rwxr-xr-xchromium/ppapi/native_client/src/tools/srpcgen.py466
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/DEPS10
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/arch_arm/sandbox_isa.cc18
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/arch_x86/sandbox_isa.cc28
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/file_downloader.cc356
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/file_downloader.h131
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/file_utils.cc77
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/file_utils.h38
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/json_manifest.cc651
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/json_manifest.h89
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/manifest.h77
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/module_ppapi.cc8
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/nacl_entry_points.h34
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/nacl_http_response_headers.cc115
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/nacl_http_response_headers.h60
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/nacl_http_response_headers_unittest.cc147
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/nexe_arch.h31
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/plugin.cc1514
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/plugin.gyp1
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/plugin.gypi22
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/plugin.h336
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/plugin_error.h123
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc427
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h86
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/pnacl_options.cc42
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/pnacl_options.h40
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/pnacl_resources.cc240
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/pnacl_resources.h75
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc290
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.h44
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/scriptable_plugin.cc191
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/scriptable_plugin.h111
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/sel_ldr_launcher_chrome.cc70
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/sel_ldr_launcher_chrome.h10
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/service_runtime.cc844
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/service_runtime.h170
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/temporary_file.cc65
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/temporary_file.h27
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/utility.cc97
-rw-r--r--chromium/ppapi/native_client/src/trusted/plugin/utility.h13
-rw-r--r--chromium/ppapi/native_client/src/untrusted/irt_stub/ppapi_plugin_start.c2
-rw-r--r--chromium/ppapi/native_client/src/untrusted/irt_stub/ppapi_start.h2
-rw-r--r--chromium/ppapi/native_client/src/untrusted/irt_stub/thread_creator.h10
-rw-r--r--chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/irt_shim_ppapi.c79
-rw-r--r--chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/irt_shim_ppapi.h30
-rw-r--r--chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp95
-rw-r--r--chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c2186
-rw-r--r--chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.h29
-rw-r--r--chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/shim_entry.c6
-rw-r--r--chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/shim_ppapi.c156
-rw-r--r--chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/shim_ppapi.h15
-rwxr-xr-xchromium/ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_component_crx_gen.py120
-rw-r--r--chromium/ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_support_extension.gyp74
-rw-r--r--chromium/ppapi/ppapi_internal.gyp14
-rw-r--r--chromium/ppapi/ppapi_ipc_nacl.gyp43
-rw-r--r--chromium/ppapi/ppapi_ipc_untrusted.gyp43
-rw-r--r--chromium/ppapi/ppapi_nacl.gyp281
-rw-r--r--chromium/ppapi/ppapi_nacl_test_common.gypi63
-rw-r--r--chromium/ppapi/ppapi_proxy.gypi52
-rw-r--r--chromium/ppapi/ppapi_proxy_nacl.gyp51
-rw-r--r--chromium/ppapi/ppapi_proxy_untrusted.gyp49
-rw-r--r--chromium/ppapi/ppapi_shared.gypi51
-rw-r--r--chromium/ppapi/ppapi_shared_nacl.gyp44
-rw-r--r--chromium/ppapi/ppapi_shared_untrusted.gyp44
-rw-r--r--chromium/ppapi/ppapi_sources.gypi88
-rw-r--r--chromium/ppapi/ppapi_tests.gypi100
-rw-r--r--chromium/ppapi/ppapi_untrusted.gyp237
-rw-r--r--chromium/ppapi/proxy/DEPS8
-rw-r--r--chromium/ppapi/proxy/OWNERS5
-rw-r--r--chromium/ppapi/proxy/audio_buffer_resource.cc112
-rw-r--r--chromium/ppapi/proxy/audio_buffer_resource.h57
-rw-r--r--chromium/ppapi/proxy/audio_input_resource.cc103
-rw-r--r--chromium/ppapi/proxy/audio_input_resource.h23
-rw-r--r--chromium/ppapi/proxy/compositor_layer_resource.cc368
-rw-r--r--chromium/ppapi/proxy/compositor_layer_resource.h99
-rw-r--r--chromium/ppapi/proxy/compositor_resource.cc154
-rw-r--r--chromium/ppapi/proxy/compositor_resource.h80
-rw-r--r--chromium/ppapi/proxy/device_enumeration_resource_helper.cc43
-rw-r--r--chromium/ppapi/proxy/device_enumeration_resource_helper.h7
-rw-r--r--chromium/ppapi/proxy/dispatch_reply_message.h14
-rw-r--r--chromium/ppapi/proxy/dispatcher.cc15
-rw-r--r--chromium/ppapi/proxy/dispatcher.h27
-rw-r--r--chromium/ppapi/proxy/extensions_common_resource.cc139
-rw-r--r--chromium/ppapi/proxy/extensions_common_resource.h68
-rw-r--r--chromium/ppapi/proxy/file_chooser_resource.cc2
-rw-r--r--chromium/ppapi/proxy/file_io_resource.cc354
-rw-r--r--chromium/ppapi/proxy/file_io_resource.h113
-rw-r--r--chromium/ppapi/proxy/file_mapping_resource.cc160
-rw-r--r--chromium/ppapi/proxy/file_mapping_resource.h77
-rw-r--r--chromium/ppapi/proxy/file_mapping_resource_posix.cc89
-rw-r--r--chromium/ppapi/proxy/file_mapping_resource_win.cc40
-rw-r--r--chromium/ppapi/proxy/file_ref_resource.cc29
-rw-r--r--chromium/ppapi/proxy/file_ref_resource.h12
-rw-r--r--chromium/ppapi/proxy/file_system_resource.cc119
-rw-r--r--chromium/ppapi/proxy/file_system_resource.h28
-rw-r--r--chromium/ppapi/proxy/file_system_resource_unittest.cc369
-rw-r--r--chromium/ppapi/proxy/flash_clipboard_resource.cc12
-rw-r--r--chromium/ppapi/proxy/flash_clipboard_resource.h4
-rw-r--r--chromium/ppapi/proxy/flash_file_resource.cc2
-rw-r--r--chromium/ppapi/proxy/graphics_2d_resource.cc27
-rw-r--r--chromium/ppapi/proxy/graphics_2d_resource.h2
-rw-r--r--chromium/ppapi/proxy/host_dispatcher.cc4
-rw-r--r--chromium/ppapi/proxy/host_dispatcher.h8
-rw-r--r--chromium/ppapi/proxy/interface_list.cc179
-rw-r--r--chromium/ppapi/proxy/interface_list.h44
-rw-r--r--chromium/ppapi/proxy/interface_list_unittest.cc80
-rw-r--r--chromium/ppapi/proxy/interface_proxy.h18
-rw-r--r--chromium/ppapi/proxy/media_stream_audio_track_resource.cc197
-rw-r--r--chromium/ppapi/proxy/media_stream_audio_track_resource.h76
-rw-r--r--chromium/ppapi/proxy/media_stream_track_resource_base.cc93
-rw-r--r--chromium/ppapi/proxy/media_stream_track_resource_base.h71
-rw-r--r--chromium/ppapi/proxy/media_stream_video_track_resource.cc225
-rw-r--r--chromium/ppapi/proxy/media_stream_video_track_resource.h79
-rw-r--r--chromium/ppapi/proxy/message_handler.cc134
-rw-r--r--chromium/ppapi/proxy/message_handler.h75
-rw-r--r--chromium/ppapi/proxy/nacl_message_scanner.cc293
-rw-r--r--chromium/ppapi/proxy/nacl_message_scanner.h78
-rw-r--r--chromium/ppapi/proxy/nacl_message_scanner_unittest.cc295
-rw-r--r--chromium/ppapi/proxy/network_monitor_resource.cc4
-rw-r--r--chromium/ppapi/proxy/pdf_resource.cc16
-rw-r--r--chromium/ppapi/proxy/pdf_resource.h2
-rw-r--r--chromium/ppapi/proxy/pdf_resource_unittest.cc8
-rw-r--r--chromium/ppapi/proxy/plugin_dispatcher.cc10
-rw-r--r--chromium/ppapi/proxy/plugin_dispatcher.h8
-rw-r--r--chromium/ppapi/proxy/plugin_globals.cc39
-rw-r--r--chromium/ppapi/proxy/plugin_globals.h20
-rw-r--r--chromium/ppapi/proxy/plugin_main_nacl.cc290
-rw-r--r--chromium/ppapi/proxy/plugin_message_filter.cc13
-rw-r--r--chromium/ppapi/proxy/plugin_message_filter.h13
-rw-r--r--chromium/ppapi/proxy/plugin_var_tracker.cc42
-rw-r--r--chromium/ppapi/proxy/ppapi_command_buffer_proxy.cc176
-rw-r--r--chromium/ppapi/proxy/ppapi_command_buffer_proxy.h33
-rw-r--r--chromium/ppapi/proxy/ppapi_messages.h543
-rw-r--r--chromium/ppapi/proxy/ppapi_param_traits.cc38
-rw-r--r--chromium/ppapi/proxy/ppapi_param_traits.h10
-rw-r--r--chromium/ppapi/proxy/ppb_audio_proxy.cc2
-rw-r--r--chromium/ppapi/proxy/ppb_broker_proxy.cc13
-rw-r--r--chromium/ppapi/proxy/ppb_core_proxy.cc6
-rw-r--r--chromium/ppapi/proxy/ppb_graphics_3d_proxy.cc114
-rw-r--r--chromium/ppapi/proxy/ppb_graphics_3d_proxy.h51
-rw-r--r--chromium/ppapi/proxy/ppb_image_data_proxy.cc23
-rw-r--r--chromium/ppapi/proxy/ppb_instance_proxy.cc304
-rw-r--r--chromium/ppapi/proxy/ppb_instance_proxy.h82
-rw-r--r--chromium/ppapi/proxy/ppb_message_loop_proxy.cc2
-rw-r--r--chromium/ppapi/proxy/ppb_message_loop_proxy.h4
-rw-r--r--chromium/ppapi/proxy/ppb_var_unittest.cc8
-rw-r--r--chromium/ppapi/proxy/ppb_video_decoder_proxy.cc27
-rw-r--r--chromium/ppapi/proxy/ppb_video_decoder_proxy.h2
-rw-r--r--chromium/ppapi/proxy/ppp_content_decryptor_private_proxy.cc108
-rw-r--r--chromium/ppapi/proxy/ppp_content_decryptor_private_proxy.h17
-rw-r--r--chromium/ppapi/proxy/ppp_find_proxy.cc103
-rw-r--r--chromium/ppapi/proxy/ppp_find_proxy.h46
-rw-r--r--chromium/ppapi/proxy/ppp_graphics_3d_proxy.cc15
-rw-r--r--chromium/ppapi/proxy/ppp_graphics_3d_proxy.h2
-rw-r--r--chromium/ppapi/proxy/ppp_input_event_proxy.cc15
-rw-r--r--chromium/ppapi/proxy/ppp_input_event_proxy.h2
-rw-r--r--chromium/ppapi/proxy/ppp_instance_private_proxy.cc15
-rw-r--r--chromium/ppapi/proxy/ppp_instance_private_proxy.h2
-rw-r--r--chromium/ppapi/proxy/ppp_messaging_proxy.cc105
-rw-r--r--chromium/ppapi/proxy/ppp_messaging_proxy.h5
-rw-r--r--chromium/ppapi/proxy/ppp_messaging_proxy_unittest.cc32
-rw-r--r--chromium/ppapi/proxy/ppp_mouse_lock_proxy.cc15
-rw-r--r--chromium/ppapi/proxy/ppp_mouse_lock_proxy.h2
-rw-r--r--chromium/ppapi/proxy/ppp_pdf_proxy.cc77
-rw-r--r--chromium/ppapi/proxy/ppp_pdf_proxy.h40
-rw-r--r--chromium/ppapi/proxy/ppp_video_decoder_proxy.cc19
-rw-r--r--chromium/ppapi/proxy/ppp_video_decoder_proxy.h2
-rw-r--r--chromium/ppapi/proxy/proxy_channel.cc15
-rw-r--r--chromium/ppapi/proxy/raw_var_data.cc2
-rw-r--r--chromium/ppapi/proxy/raw_var_data_unittest.cc2
-rw-r--r--chromium/ppapi/proxy/resource_creation_proxy.cc47
-rw-r--r--chromium/ppapi/proxy/resource_creation_proxy.h19
-rw-r--r--chromium/ppapi/proxy/resource_message_test_sink.cc59
-rw-r--r--chromium/ppapi/proxy/resource_message_test_sink.h13
-rw-r--r--chromium/ppapi/proxy/serialized_handle.cc41
-rw-r--r--chromium/ppapi/proxy/serialized_handle.h63
-rw-r--r--chromium/ppapi/proxy/serialized_structs.h3
-rw-r--r--chromium/ppapi/proxy/serialized_var.cc4
-rw-r--r--chromium/ppapi/proxy/talk_resource.cc4
-rw-r--r--chromium/ppapi/proxy/tcp_socket_resource_base.cc31
-rw-r--r--chromium/ppapi/proxy/uma_private_resource.cc110
-rw-r--r--chromium/ppapi/proxy/uma_private_resource.h62
-rw-r--r--chromium/ppapi/proxy/url_loader_resource.cc4
-rw-r--r--chromium/ppapi/proxy/video_capture_resource.cc10
-rw-r--r--chromium/ppapi/proxy/video_capture_resource.h3
-rw-r--r--chromium/ppapi/proxy/video_decoder_constants.h28
-rw-r--r--chromium/ppapi/proxy/video_decoder_resource.cc518
-rw-r--r--chromium/ppapi/proxy/video_decoder_resource.h181
-rw-r--r--chromium/ppapi/proxy/video_decoder_resource_unittest.cc583
-rw-r--r--chromium/ppapi/proxy/video_frame_resource.cc96
-rw-r--r--chromium/ppapi/proxy/video_frame_resource.h52
-rw-r--r--chromium/ppapi/proxy/websocket_resource.cc22
-rw-r--r--chromium/ppapi/proxy/websocket_resource_unittest.cc2
-rw-r--r--chromium/ppapi/shared_impl/DEPS4
-rw-r--r--chromium/ppapi/shared_impl/README.txt2
-rw-r--r--chromium/ppapi/shared_impl/api_id.h4
-rw-r--r--chromium/ppapi/shared_impl/array_var.cc14
-rw-r--r--chromium/ppapi/shared_impl/array_var.h8
-rw-r--r--chromium/ppapi/shared_impl/array_writer.cc46
-rw-r--r--chromium/ppapi/shared_impl/array_writer.h10
-rw-r--r--chromium/ppapi/shared_impl/callback_tracker.cc12
-rw-r--r--chromium/ppapi/shared_impl/compositor_layer_data.cc36
-rw-r--r--chromium/ppapi/shared_impl/compositor_layer_data.h119
-rw-r--r--chromium/ppapi/shared_impl/dictionary_var.cc24
-rw-r--r--chromium/ppapi/shared_impl/dictionary_var.h4
-rw-r--r--chromium/ppapi/shared_impl/dir_contents.h1
-rw-r--r--chromium/ppapi/shared_impl/file_growth.cc41
-rw-r--r--chromium/ppapi/shared_impl/file_growth.h33
-rw-r--r--chromium/ppapi/shared_impl/file_io_state_manager.cc13
-rw-r--r--chromium/ppapi/shared_impl/file_io_state_manager.h1
-rw-r--r--chromium/ppapi/shared_impl/file_path.cc8
-rw-r--r--chromium/ppapi/shared_impl/file_ref_create_info.cc10
-rw-r--r--chromium/ppapi/shared_impl/file_ref_create_info.h17
-rw-r--r--chromium/ppapi/shared_impl/file_ref_util.cc4
-rw-r--r--chromium/ppapi/shared_impl/file_type_conversion.cc44
-rw-r--r--chromium/ppapi/shared_impl/file_type_conversion.h12
-rw-r--r--chromium/ppapi/shared_impl/flash_clipboard_format_registry.cc19
-rw-r--r--chromium/ppapi/shared_impl/flash_clipboard_format_registry.h1
-rw-r--r--chromium/ppapi/shared_impl/host_resource.cc4
-rw-r--r--chromium/ppapi/shared_impl/host_resource.h8
-rw-r--r--chromium/ppapi/shared_impl/id_assignment.cc2
-rw-r--r--chromium/ppapi/shared_impl/id_assignment.h6
-rw-r--r--chromium/ppapi/shared_impl/media_stream_audio_track_shared.cc17
-rw-r--r--chromium/ppapi/shared_impl/media_stream_audio_track_shared.h25
-rw-r--r--chromium/ppapi/shared_impl/media_stream_audio_track_shared_unittest.cc33
-rw-r--r--chromium/ppapi/shared_impl/media_stream_buffer.h58
-rw-r--r--chromium/ppapi/shared_impl/media_stream_buffer_manager.cc81
-rw-r--r--chromium/ppapi/shared_impl/media_stream_buffer_manager.h97
-rw-r--r--chromium/ppapi/shared_impl/media_stream_buffer_manager_unittest.cc180
-rw-r--r--chromium/ppapi/shared_impl/media_stream_video_track_shared.cc40
-rw-r--r--chromium/ppapi/shared_impl/media_stream_video_track_shared.h32
-rw-r--r--chromium/ppapi/shared_impl/media_stream_video_track_shared_unittest.cc96
-rw-r--r--chromium/ppapi/shared_impl/platform_file.cc4
-rw-r--r--chromium/ppapi/shared_impl/platform_file.h2
-rw-r--r--chromium/ppapi/shared_impl/ppapi_constants.h19
-rw-r--r--chromium/ppapi/shared_impl/ppapi_globals.cc19
-rw-r--r--chromium/ppapi/shared_impl/ppapi_globals.h21
-rw-r--r--chromium/ppapi/shared_impl/ppapi_nacl_channel_args.cc18
-rw-r--r--chromium/ppapi/shared_impl/ppapi_nacl_channel_args.h31
-rw-r--r--chromium/ppapi/shared_impl/ppapi_nacl_plugin_args.cc20
-rw-r--r--chromium/ppapi/shared_impl/ppapi_nacl_plugin_args.h32
-rw-r--r--chromium/ppapi/shared_impl/ppapi_permissions.cc9
-rw-r--r--chromium/ppapi/shared_impl/ppapi_permissions.h14
-rw-r--r--chromium/ppapi/shared_impl/ppapi_preferences.cc16
-rw-r--r--chromium/ppapi/shared_impl/ppapi_preferences.h1
-rw-r--r--chromium/ppapi/shared_impl/ppb_audio_config_shared.cc29
-rw-r--r--chromium/ppapi/shared_impl/ppb_audio_config_shared.h6
-rw-r--r--chromium/ppapi/shared_impl/ppb_audio_shared.cc150
-rw-r--r--chromium/ppapi/shared_impl/ppb_audio_shared.h24
-rw-r--r--chromium/ppapi/shared_impl/ppb_crypto_shared.cc4
-rw-r--r--chromium/ppapi/shared_impl/ppb_device_ref_shared.cc43
-rw-r--r--chromium/ppapi/shared_impl/ppb_device_ref_shared.h10
-rw-r--r--chromium/ppapi/shared_impl/ppb_gamepad_shared.cc12
-rw-r--r--chromium/ppapi/shared_impl/ppb_gamepad_shared.h55
-rw-r--r--chromium/ppapi/shared_impl/ppb_graphics_3d_shared.cc24
-rw-r--r--chromium/ppapi/shared_impl/ppb_graphics_3d_shared.h5
-rw-r--r--chromium/ppapi/shared_impl/ppb_image_data_shared.cc5
-rw-r--r--chromium/ppapi/shared_impl/ppb_input_event_shared.cc64
-rw-r--r--chromium/ppapi/shared_impl/ppb_input_event_shared.h10
-rw-r--r--chromium/ppapi/shared_impl/ppb_instance_shared.cc18
-rw-r--r--chromium/ppapi/shared_impl/ppb_memory_shared.cc13
-rw-r--r--chromium/ppapi/shared_impl/ppb_message_loop_shared.cc9
-rw-r--r--chromium/ppapi/shared_impl/ppb_opengles2_shared.cc1075
-rw-r--r--chromium/ppapi/shared_impl/ppb_opengles2_shared.h2
-rw-r--r--chromium/ppapi/shared_impl/ppb_resource_array_shared.cc51
-rw-r--r--chromium/ppapi/shared_impl/ppb_resource_array_shared.h42
-rw-r--r--chromium/ppapi/shared_impl/ppb_tcp_socket_shared.cc6
-rw-r--r--chromium/ppapi/shared_impl/ppb_tcp_socket_shared.h9
-rw-r--r--chromium/ppapi/shared_impl/ppb_trace_event_impl.cc64
-rw-r--r--chromium/ppapi/shared_impl/ppb_trace_event_impl.h19
-rw-r--r--chromium/ppapi/shared_impl/ppb_url_util_shared.cc5
-rw-r--r--chromium/ppapi/shared_impl/ppb_url_util_shared.h3
-rw-r--r--chromium/ppapi/shared_impl/ppb_var_shared.cc49
-rw-r--r--chromium/ppapi/shared_impl/ppb_var_shared.h1
-rw-r--r--chromium/ppapi/shared_impl/ppb_video_decoder_shared.cc16
-rw-r--r--chromium/ppapi/shared_impl/ppb_video_decoder_shared.h9
-rw-r--r--chromium/ppapi/shared_impl/ppb_view_shared.cc36
-rw-r--r--chromium/ppapi/shared_impl/ppb_view_shared.h10
-rw-r--r--chromium/ppapi/shared_impl/ppp_flash_browser_operations_shared.h7
-rw-r--r--chromium/ppapi/shared_impl/ppp_instance_combined.cc15
-rw-r--r--chromium/ppapi/shared_impl/ppp_instance_combined.h1
-rw-r--r--chromium/ppapi/shared_impl/private/ppb_char_set_shared.cc2
-rw-r--r--chromium/ppapi/shared_impl/proxy_lock.cc7
-rw-r--r--chromium/ppapi/shared_impl/proxy_lock.h42
-rw-r--r--chromium/ppapi/shared_impl/proxy_lock_unittest.cc23
-rw-r--r--chromium/ppapi/shared_impl/resource.cc9
-rw-r--r--chromium/ppapi/shared_impl/resource.h160
-rw-r--r--chromium/ppapi/shared_impl/resource_tracker.cc9
-rw-r--r--chromium/ppapi/shared_impl/resource_tracker_unittest.cc11
-rw-r--r--chromium/ppapi/shared_impl/resource_var.cc20
-rw-r--r--chromium/ppapi/shared_impl/scoped_pp_resource.cc10
-rw-r--r--chromium/ppapi/shared_impl/scoped_pp_var.cc17
-rw-r--r--chromium/ppapi/shared_impl/singleton_resource_id.h3
-rw-r--r--chromium/ppapi/shared_impl/socket_option_data.cc10
-rw-r--r--chromium/ppapi/shared_impl/socket_option_data.h6
-rw-r--r--chromium/ppapi/shared_impl/test_globals.cc41
-rw-r--r--chromium/ppapi/shared_impl/test_globals.h19
-rw-r--r--chromium/ppapi/shared_impl/test_harness_utils.cc31
-rw-r--r--chromium/ppapi/shared_impl/test_harness_utils.h29
-rw-r--r--chromium/ppapi/shared_impl/thread_aware_callback.cc10
-rw-r--r--chromium/ppapi/shared_impl/thread_aware_callback.h10
-rw-r--r--chromium/ppapi/shared_impl/thread_aware_callback_unittest.cc47
-rw-r--r--chromium/ppapi/shared_impl/time_conversion.cc10
-rw-r--r--chromium/ppapi/shared_impl/tracked_callback.cc21
-rw-r--r--chromium/ppapi/shared_impl/tracked_callback.h8
-rw-r--r--chromium/ppapi/shared_impl/tracked_callback_unittest.cc26
-rw-r--r--chromium/ppapi/shared_impl/unittest_utils.cc76
-rw-r--r--chromium/ppapi/shared_impl/unittest_utils.h7
-rw-r--r--chromium/ppapi/shared_impl/url_request_info_data.cc24
-rw-r--r--chromium/ppapi/shared_impl/url_response_info_data.cc6
-rw-r--r--chromium/ppapi/shared_impl/var.cc77
-rw-r--r--chromium/ppapi/shared_impl/var.h8
-rw-r--r--chromium/ppapi/shared_impl/var_tracker.cc21
-rw-r--r--chromium/ppapi/shared_impl/var_tracker.h12
-rw-r--r--chromium/ppapi/shared_impl/var_tracker_unittest.cc27
-rw-r--r--chromium/ppapi/shared_impl/var_value_conversions.cc394
-rw-r--r--chromium/ppapi/shared_impl/var_value_conversions.h60
-rw-r--r--chromium/ppapi/shared_impl/var_value_conversions_unittest.cc396
-rw-r--r--chromium/ppapi/tests/extensions/extensions.gyp36
-rw-r--r--chromium/ppapi/thunk/OWNERS12
-rw-r--r--chromium/ppapi/thunk/enter.cc6
-rw-r--r--chromium/ppapi/thunk/extensions_common_api.h44
-rw-r--r--chromium/ppapi/thunk/interfaces_legacy.h5
-rw-r--r--chromium/ppapi/thunk/interfaces_postamble.h10
-rw-r--r--chromium/ppapi/thunk/interfaces_ppb_private.h48
-rw-r--r--chromium/ppapi/thunk/interfaces_ppb_private_flash.h45
-rw-r--r--chromium/ppapi/thunk/interfaces_ppb_private_no_permissions.h37
-rw-r--r--chromium/ppapi/thunk/interfaces_ppb_public_dev.h96
-rw-r--r--chromium/ppapi/thunk/interfaces_ppb_public_dev_channel.h25
-rw-r--r--chromium/ppapi/thunk/interfaces_ppb_public_stable.h124
-rw-r--r--chromium/ppapi/thunk/interfaces_preamble.h12
-rw-r--r--chromium/ppapi/thunk/ppb_alarms_dev_thunk.cc82
-rw-r--r--chromium/ppapi/thunk/ppb_audio_buffer_api.h38
-rw-r--r--chromium/ppapi/thunk/ppb_audio_buffer_thunk.cc108
-rw-r--r--chromium/ppapi/thunk/ppb_audio_input_api.h7
-rw-r--r--chromium/ppapi/thunk/ppb_audio_input_dev_thunk.cc35
-rw-r--r--chromium/ppapi/thunk/ppb_compositor_api.h27
-rw-r--r--chromium/ppapi/thunk/ppb_compositor_layer_api.h43
-rw-r--r--chromium/ppapi/thunk/ppb_compositor_layer_thunk.cc136
-rw-r--r--chromium/ppapi/thunk/ppb_compositor_thunk.cc73
-rw-r--r--chromium/ppapi/thunk/ppb_console_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/ppb_content_decryptor_private_thunk.cc82
-rw-r--r--chromium/ppapi/thunk/ppb_device_ref_dev_thunk.cc9
-rw-r--r--chromium/ppapi/thunk/ppb_display_color_profile_private_thunk.cc78
-rw-r--r--chromium/ppapi/thunk/ppb_ext_socket_thunk.cc419
-rw-r--r--chromium/ppapi/thunk/ppb_file_chooser_dev_thunk.cc12
-rw-r--r--chromium/ppapi/thunk/ppb_file_chooser_trusted_thunk.cc12
-rw-r--r--chromium/ppapi/thunk/ppb_file_io_api.h4
-rw-r--r--chromium/ppapi/thunk/ppb_file_io_thunk.cc10
-rw-r--r--chromium/ppapi/thunk/ppb_file_mapping_api.h46
-rw-r--r--chromium/ppapi/thunk/ppb_file_mapping_thunk.cc77
-rw-r--r--chromium/ppapi/thunk/ppb_file_ref_api.h2
-rw-r--r--chromium/ppapi/thunk/ppb_file_ref_thunk.cc36
-rw-r--r--chromium/ppapi/thunk/ppb_file_system_api.h6
-rw-r--r--chromium/ppapi/thunk/ppb_file_system_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/ppb_find_dev_thunk.cc50
-rw-r--r--chromium/ppapi/thunk/ppb_find_private_thunk.cc69
-rw-r--r--chromium/ppapi/thunk/ppb_flash_clipboard_api.h4
-rw-r--r--chromium/ppapi/thunk/ppb_flash_clipboard_thunk.cc22
-rw-r--r--chromium/ppapi/thunk/ppb_flash_drm_thunk.cc10
-rw-r--r--chromium/ppapi/thunk/ppb_fullscreen_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/ppb_gamepad_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/ppb_graphics_2d_api.h5
-rw-r--r--chromium/ppapi/thunk/ppb_graphics_2d_dev_thunk.cc78
-rw-r--r--chromium/ppapi/thunk/ppb_graphics_2d_thunk.cc10
-rw-r--r--chromium/ppapi/thunk/ppb_graphics_3d_api.h14
-rw-r--r--chromium/ppapi/thunk/ppb_graphics_3d_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/ppb_host_resolver_thunk.cc9
-rw-r--r--chromium/ppapi/thunk/ppb_image_data_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/ppb_input_event_api.h6
-rw-r--r--chromium/ppapi/thunk/ppb_input_event_private_thunk.cc42
-rw-r--r--chromium/ppapi/thunk/ppb_input_event_thunk.cc88
-rw-r--r--chromium/ppapi/thunk/ppb_instance_api.h44
-rw-r--r--chromium/ppapi/thunk/ppb_instance_private_thunk.cc9
-rw-r--r--chromium/ppapi/thunk/ppb_instance_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/ppb_isolated_file_system_private_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/ppb_media_stream_audio_track_api.h31
-rw-r--r--chromium/ppapi/thunk/ppb_media_stream_audio_track_thunk.cc112
-rw-r--r--chromium/ppapi/thunk/ppb_media_stream_video_track_api.h35
-rw-r--r--chromium/ppapi/thunk/ppb_media_stream_video_track_thunk.cc160
-rw-r--r--chromium/ppapi/thunk/ppb_messaging_thunk.cc40
-rw-r--r--chromium/ppapi/thunk/ppb_mouse_cursor_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/ppb_mouse_lock_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/ppb_network_list_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/ppb_network_monitor_thunk.cc9
-rw-r--r--chromium/ppapi/thunk/ppb_network_proxy_thunk.cc9
-rw-r--r--chromium/ppapi/thunk/ppb_output_protection_private_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/ppb_pdf_api.h2
-rw-r--r--chromium/ppapi/thunk/ppb_pdf_thunk.cc16
-rw-r--r--chromium/ppapi/thunk/ppb_platform_verification_private_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/ppb_printing_dev_thunk.cc9
-rw-r--r--chromium/ppapi/thunk/ppb_resource_array_api.h25
-rw-r--r--chromium/ppapi/thunk/ppb_resource_array_dev_thunk.cc67
-rw-r--r--chromium/ppapi/thunk/ppb_truetype_font_dev_thunk.cc9
-rw-r--r--chromium/ppapi/thunk/ppb_udp_socket_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/ppb_uma_private_thunk.cc95
-rw-r--r--chromium/ppapi/thunk/ppb_uma_singleton_api.h47
-rw-r--r--chromium/ppapi/thunk/ppb_url_loader_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/ppb_url_loader_trusted_thunk.cc9
-rw-r--r--chromium/ppapi/thunk/ppb_url_request_info_thunk.cc9
-rw-r--r--chromium/ppapi/thunk/ppb_url_response_info_thunk.cc9
-rw-r--r--chromium/ppapi/thunk/ppb_var_resource_dev_thunk.cc46
-rw-r--r--chromium/ppapi/thunk/ppb_video_capture_api.h3
-rw-r--r--chromium/ppapi/thunk/ppb_video_capture_thunk.cc26
-rw-r--r--chromium/ppapi/thunk/ppb_video_decoder_api.h30
-rw-r--r--chromium/ppapi/thunk/ppb_video_decoder_dev_api.h34
-rw-r--r--chromium/ppapi/thunk/ppb_video_decoder_dev_thunk.cc96
-rw-r--r--chromium/ppapi/thunk/ppb_video_decoder_thunk.cc106
-rw-r--r--chromium/ppapi/thunk/ppb_video_frame_api.h36
-rw-r--r--chromium/ppapi/thunk/ppb_video_frame_thunk.cc90
-rw-r--r--chromium/ppapi/thunk/ppb_view_api.h1
-rw-r--r--chromium/ppapi/thunk/ppb_view_dev_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/ppb_view_thunk.cc34
-rw-r--r--chromium/ppapi/thunk/ppb_websocket_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/ppb_widget_dev_thunk.cc10
-rw-r--r--chromium/ppapi/thunk/ppb_zoom_dev_thunk.cc8
-rw-r--r--chromium/ppapi/thunk/resource_creation_api.h18
-rw-r--r--chromium/ppapi/thunk/thunk.h7
-rw-r--r--chromium/ppapi/tools/pepper_hash_for_uma.cc37
-rw-r--r--chromium/ppapi/tools/ppapi_tools.gyp18
-rw-r--r--chromium/ppapi/utility/completion_callback_factory.h169
-rw-r--r--chromium/ppapi/utility/websocket/websocket_api.cc4
-rw-r--r--chromium/printing/BUILD.gn256
-rw-r--r--chromium/printing/DEPS1
-rw-r--r--chromium/printing/backend/cups_helper.cc59
-rw-r--r--chromium/printing/backend/cups_helper_unittest.cc68
-rw-r--r--chromium/printing/backend/print_backend.cc10
-rw-r--r--chromium/printing/backend/print_backend.h26
-rw-r--r--chromium/printing/backend/print_backend_consts.cc10
-rw-r--r--chromium/printing/backend/print_backend_consts.h10
-rw-r--r--chromium/printing/backend/print_backend_cups.cc88
-rw-r--r--chromium/printing/backend/print_backend_dummy.cc2
-rw-r--r--chromium/printing/backend/print_backend_win.cc209
-rw-r--r--chromium/printing/backend/printing_info_win.cc19
-rw-r--r--chromium/printing/backend/printing_info_win.h25
-rw-r--r--chromium/printing/backend/win_helper.cc164
-rw-r--r--chromium/printing/backend/win_helper.h19
-rwxr-xr-xchromium/printing/cups_config_helper.py37
-rw-r--r--chromium/printing/image.cc8
-rw-r--r--chromium/printing/metafile_impl.h4
-rw-r--r--chromium/printing/page_size_margins.cc29
-rw-r--r--chromium/printing/page_size_margins.h7
-rw-r--r--chromium/printing/pdf_metafile_skia.cc23
-rw-r--r--chromium/printing/print_destination_win.cc55
-rw-r--r--chromium/printing/print_dialog_gtk_interface.h4
-rw-r--r--chromium/printing/print_job_constants.cc21
-rw-r--r--chromium/printing/print_job_constants.h16
-rw-r--r--chromium/printing/print_settings.cc1
-rw-r--r--chromium/printing/print_settings.h29
-rw-r--r--chromium/printing/print_settings_conversion.cc249
-rw-r--r--chromium/printing/print_settings_conversion.h31
-rw-r--r--chromium/printing/print_settings_initializer.cc106
-rw-r--r--chromium/printing/print_settings_initializer.h37
-rw-r--r--chromium/printing/print_settings_initializer_gtk.cc81
-rw-r--r--chromium/printing/print_settings_initializer_gtk.h38
-rw-r--r--chromium/printing/printed_document.cc168
-rw-r--r--chromium/printing/printed_document.h46
-rw-r--r--chromium/printing/printed_document_gtk.cc35
-rw-r--r--chromium/printing/printed_document_linux.cc37
-rw-r--r--chromium/printing/printed_page.cc9
-rw-r--r--chromium/printing/printed_page.h16
-rw-r--r--chromium/printing/printed_page_unittest.cc44
-rw-r--r--chromium/printing/printing.gyp77
-rw-r--r--chromium/printing/printing_context.cc38
-rw-r--r--chromium/printing/printing_context.h6
-rw-r--r--chromium/printing/printing_context_android.cc2
-rw-r--r--chromium/printing/printing_context_gtk.cc174
-rw-r--r--chromium/printing/printing_context_gtk.h62
-rw-r--r--chromium/printing/printing_context_linux.cc190
-rw-r--r--chromium/printing/printing_context_linux.h66
-rw-r--r--chromium/printing/printing_context_mac.h11
-rw-r--r--chromium/printing/printing_context_mac.mm173
-rw-r--r--chromium/printing/printing_context_win.cc272
-rw-r--r--chromium/printing/printing_context_win.h29
-rw-r--r--chromium/printing/printing_context_win_unittest.cc245
-rw-r--r--chromium/printing/printing_utils_unittest.cc2
-rw-r--r--chromium/printing/pwg_raster_settings.h33
-rw-r--r--chromium/remoting/remoting.gyp2829
-rw-r--r--chromium/remoting/remoting_android.gypi154
-rw-r--r--chromium/remoting/remoting_client.gypi139
-rw-r--r--chromium/remoting/remoting_host.gypi850
-rw-r--r--chromium/remoting/remoting_host_linux.gypi139
-rw-r--r--chromium/remoting/remoting_host_mac.gypi261
-rw-r--r--chromium/remoting/remoting_host_win.gypi617
-rw-r--r--chromium/remoting/remoting_nacl.gyp247
-rw-r--r--chromium/remoting/remoting_srcs.gypi257
-rw-r--r--chromium/remoting/remoting_test.gypi259
-rw-r--r--chromium/remoting/remoting_version.gypi27
-rw-r--r--chromium/remoting/remoting_webapp.gypi77
-rw-r--r--chromium/remoting/remoting_webapp_files.gypi239
-rw-r--r--chromium/sandbox/BUILD.gn14
-rw-r--r--chromium/sandbox/OWNERS9
-rw-r--r--chromium/sandbox/linux/BUILD.gn314
-rw-r--r--chromium/sandbox/linux/DEPS25
-rw-r--r--chromium/sandbox/linux/OWNERS3
-rw-r--r--chromium/sandbox/linux/sandbox_linux.gypi129
-rw-r--r--chromium/sandbox/linux/sandbox_linux_test_sources.gypi13
-rw-r--r--chromium/sandbox/linux/seccomp-bpf-helpers/DEPS4
-rw-r--r--chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc92
-rw-r--r--chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.h10
-rw-r--r--chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc288
-rw-r--r--chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc80
-rw-r--r--chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h30
-rw-r--r--chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc102
-rw-r--r--chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h28
-rw-r--r--chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc17
-rw-r--r--chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h7
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/DEPS3
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h65
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/bpf_tests.h182
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/bpf_tests_unittest.cc139
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/codegen.cc116
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/codegen.h3
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/codegen_unittest.cc251
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/demo.cc22
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/die.cc8
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/die.h3
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/errorcode.cc5
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/errorcode.h9
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/errorcode_unittest.cc11
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/linux_seccomp.h97
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/sandbox_bpf.cc188
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/sandbox_bpf.h49
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/sandbox_bpf_compatibility_policy.h43
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/sandbox_bpf_policy.cc17
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/sandbox_bpf_policy.h8
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/sandbox_bpf_test_runner.cc76
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/sandbox_bpf_test_runner.h59
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc795
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/syscall.cc395
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/syscall.h197
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/syscall_iterator.h3
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/syscall_unittest.cc137
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/trap.cc23
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/trap.h19
-rw-r--r--chromium/sandbox/linux/seccomp-bpf/verifier.cc6
-rw-r--r--chromium/sandbox/linux/services/android_futex.h28
-rw-r--r--chromium/sandbox/linux/services/android_ucontext.h2
-rw-r--r--chromium/sandbox/linux/services/android_x86_64_ucontext.h88
-rw-r--r--chromium/sandbox/linux/services/broker_process.cc59
-rw-r--r--chromium/sandbox/linux/services/broker_process.h12
-rw-r--r--chromium/sandbox/linux/services/broker_process_unittest.cc131
-rw-r--r--chromium/sandbox/linux/services/credentials.cc89
-rw-r--r--chromium/sandbox/linux/services/credentials.h15
-rw-r--r--chromium/sandbox/linux/services/credentials_unittest.cc43
-rw-r--r--chromium/sandbox/linux/services/init_process_reaper.h4
-rw-r--r--chromium/sandbox/linux/services/libc_urandom_override.cc12
-rw-r--r--chromium/sandbox/linux/services/scoped_process.cc119
-rw-r--r--chromium/sandbox/linux/services/scoped_process.h55
-rw-r--r--chromium/sandbox/linux/services/scoped_process_unittest.cc130
-rw-r--r--chromium/sandbox/linux/services/thread_helpers.cc20
-rw-r--r--chromium/sandbox/linux/services/thread_helpers.h11
-rw-r--r--chromium/sandbox/linux/services/thread_helpers_unittests.cc24
-rw-r--r--chromium/sandbox/linux/services/unix_domain_socket_unittest.cc267
-rw-r--r--chromium/sandbox/linux/services/yama.cc116
-rw-r--r--chromium/sandbox/linux/services/yama.h58
-rw-r--r--chromium/sandbox/linux/services/yama_unittests.cc152
-rw-r--r--chromium/sandbox/linux/suid/client/DEPS3
-rw-r--r--chromium/sandbox/linux/suid/client/setuid_sandbox_client.cc144
-rw-r--r--chromium/sandbox/linux/suid/client/setuid_sandbox_client.h59
-rw-r--r--chromium/sandbox/linux/suid/client/setuid_sandbox_client_unittest.cc13
-rw-r--r--chromium/sandbox/linux/suid/common/suid_unsafe_environment_variables.h2
-rw-r--r--chromium/sandbox/linux/suid/linux_util.c15
-rw-r--r--chromium/sandbox/linux/suid/process_util.h6
-rw-r--r--chromium/sandbox/linux/suid/process_util_linux.c9
-rw-r--r--chromium/sandbox/linux/suid/sandbox.c93
-rw-r--r--chromium/sandbox/mac/BUILD.gn72
-rw-r--r--chromium/sandbox/mac/OWNERS2
-rw-r--r--chromium/sandbox/mac/bootstrap_sandbox.cc133
-rw-r--r--chromium/sandbox/mac/bootstrap_sandbox.h114
-rw-r--r--chromium/sandbox/mac/bootstrap_sandbox_unittest.mm417
-rw-r--r--chromium/sandbox/mac/launchd_interception_server.cc153
-rw-r--r--chromium/sandbox/mac/launchd_interception_server.h78
-rw-r--r--chromium/sandbox/mac/mach_message_server.cc184
-rw-r--r--chromium/sandbox/mac/mach_message_server.h95
-rw-r--r--chromium/sandbox/mac/os_compatibility.cc127
-rw-r--r--chromium/sandbox/mac/os_compatibility.h52
-rw-r--r--chromium/sandbox/mac/policy.cc56
-rw-r--r--chromium/sandbox/mac/policy.h70
-rw-r--r--chromium/sandbox/mac/policy_unittest.cc98
-rw-r--r--chromium/sandbox/mac/sandbox_mac.gypi100
-rw-r--r--chromium/sandbox/mac/xpc.h40
-rw-r--r--chromium/sandbox/mac/xpc_private_stubs.sig17
-rw-r--r--chromium/sandbox/mac/xpc_stubs.sig16
-rw-r--r--chromium/sandbox/mac/xpc_stubs_header.fragment27
-rw-r--r--chromium/sandbox/sandbox.gyp5
-rw-r--r--chromium/sandbox/sandbox_export.h29
-rw-r--r--chromium/sandbox/sandbox_linux_unittests.isolate27
-rw-r--r--chromium/sandbox/win/BUILD.gn285
-rw-r--r--chromium/sandbox/win/OWNERS3
-rw-r--r--chromium/sandbox/win/sandbox_win.gypi12
-rw-r--r--chromium/sandbox/win/src/Wow64.cc3
-rw-r--r--chromium/sandbox/win/src/acl.cc9
-rw-r--r--chromium/sandbox/win/src/acl.h5
-rw-r--r--chromium/sandbox/win/src/app_container.cc21
-rw-r--r--chromium/sandbox/win/src/app_container.h11
-rw-r--r--chromium/sandbox/win/src/app_container_test.cc3
-rw-r--r--chromium/sandbox/win/src/app_container_unittest.cc2
-rw-r--r--chromium/sandbox/win/src/broker_services.cc78
-rw-r--r--chromium/sandbox/win/src/broker_services.h8
-rw-r--r--chromium/sandbox/win/src/crosscall_server.cc1
-rw-r--r--chromium/sandbox/win/src/handle_closer.cc36
-rw-r--r--chromium/sandbox/win/src/handle_closer.h13
-rw-r--r--chromium/sandbox/win/src/handle_closer_agent.cc14
-rw-r--r--chromium/sandbox/win/src/handle_closer_test.cc14
-rw-r--r--chromium/sandbox/win/src/handle_dispatcher.cc6
-rw-r--r--chromium/sandbox/win/src/handle_policy.cc3
-rw-r--r--chromium/sandbox/win/src/handle_policy.h1
-rw-r--r--chromium/sandbox/win/src/handle_table.cc38
-rw-r--r--chromium/sandbox/win/src/handle_table.h42
-rw-r--r--chromium/sandbox/win/src/interception.cc5
-rw-r--r--chromium/sandbox/win/src/interceptors.h7
-rw-r--r--chromium/sandbox/win/src/interceptors_64.cc41
-rw-r--r--chromium/sandbox/win/src/interceptors_64.h23
-rw-r--r--chromium/sandbox/win/src/ipc_tags.h3
-rw-r--r--chromium/sandbox/win/src/ipc_unittest.cc10
-rw-r--r--chromium/sandbox/win/src/job.cc16
-rw-r--r--chromium/sandbox/win/src/job.h5
-rw-r--r--chromium/sandbox/win/src/job_unittest.cc29
-rw-r--r--chromium/sandbox/win/src/named_pipe_dispatcher.cc4
-rw-r--r--chromium/sandbox/win/src/named_pipe_policy_test.cc7
-rw-r--r--chromium/sandbox/win/src/nt_internals.h10
-rw-r--r--chromium/sandbox/win/src/policy_engine_opcodes.cc2
-rw-r--r--chromium/sandbox/win/src/policy_engine_unittest.cc2
-rw-r--r--chromium/sandbox/win/src/policy_low_level_unittest.cc18
-rw-r--r--chromium/sandbox/win/src/policy_opcodes_unittest.cc7
-rw-r--r--chromium/sandbox/win/src/policy_target_test.cc4
-rw-r--r--chromium/sandbox/win/src/process_mitigations.cc20
-rw-r--r--chromium/sandbox/win/src/process_mitigations_test.cc57
-rw-r--r--chromium/sandbox/win/src/process_mitigations_win32k_dispatcher.cc57
-rw-r--r--chromium/sandbox/win/src/process_mitigations_win32k_dispatcher.h31
-rw-r--r--chromium/sandbox/win/src/process_mitigations_win32k_interception.cc29
-rw-r--r--chromium/sandbox/win/src/process_mitigations_win32k_interception.h46
-rw-r--r--chromium/sandbox/win/src/process_mitigations_win32k_policy.cc24
-rw-r--r--chromium/sandbox/win/src/process_mitigations_win32k_policy.h35
-rw-r--r--chromium/sandbox/win/src/process_policy_test.cc48
-rw-r--r--chromium/sandbox/win/src/process_thread_interception.cc46
-rw-r--r--chromium/sandbox/win/src/process_thread_interception.h13
-rw-r--r--chromium/sandbox/win/src/process_thread_policy.cc3
-rw-r--r--chromium/sandbox/win/src/restricted_token.cc1
-rw-r--r--chromium/sandbox/win/src/restricted_token_unittest.cc13
-rw-r--r--chromium/sandbox/win/src/restricted_token_utils.cc2
-rw-r--r--chromium/sandbox/win/src/sandbox.cc8
-rw-r--r--chromium/sandbox/win/src/sandbox_nt_util.cc13
-rw-r--r--chromium/sandbox/win/src/sandbox_policy.h24
-rw-r--r--chromium/sandbox/win/src/sandbox_policy_base.cc63
-rw-r--r--chromium/sandbox/win/src/sandbox_policy_base.h18
-rw-r--r--chromium/sandbox/win/src/sandbox_types.h1
-rw-r--r--chromium/sandbox/win/src/sandbox_utils.cc8
-rw-r--r--chromium/sandbox/win/src/sandbox_utils.h3
-rw-r--r--chromium/sandbox/win/src/security_level.h3
-rw-r--r--chromium/sandbox/win/src/service_resolver.h32
-rw-r--r--chromium/sandbox/win/src/service_resolver_32.cc46
-rw-r--r--chromium/sandbox/win/src/service_resolver_64.cc31
-rw-r--r--chromium/sandbox/win/src/service_resolver_unittest.cc4
-rw-r--r--chromium/sandbox/win/src/sharedmem_ipc_client.cc4
-rw-r--r--chromium/sandbox/win/src/sharedmem_ipc_server.cc28
-rw-r--r--chromium/sandbox/win/src/target_process.cc2
-rw-r--r--chromium/sandbox/win/src/target_process.h2
-rw-r--r--chromium/sandbox/win/src/win_utils.cc31
-rw-r--r--chromium/sandbox/win/src/window.cc16
-rw-r--r--chromium/sandbox/win/wow_helper/wow_helper.cc37
-rw-r--r--chromium/sdch/BUILD.gn78
-rw-r--r--chromium/sdch/README.chromium4
-rw-r--r--chromium/sdch/sdch.gyp20
-rw-r--r--chromium/sdch/win/config.h14
-rw-r--r--chromium/skia/BUILD.gn650
-rw-r--r--chromium/skia/PRESUBMIT.py19
-rw-r--r--chromium/skia/README.chromium4
-rw-r--r--chromium/skia/config/SkUserConfig.h18
-rw-r--r--chromium/skia/ext/SkDiscardableMemory_chrome.cc6
-rw-r--r--chromium/skia/ext/SkMemory_new_handler.cpp27
-rw-r--r--chromium/skia/ext/analysis_canvas.cc319
-rw-r--r--chromium/skia/ext/analysis_canvas.h209
-rw-r--r--chromium/skia/ext/analysis_canvas_unittest.cc95
-rw-r--r--chromium/skia/ext/benchmarking_canvas.cc119
-rw-r--r--chromium/skia/ext/bitmap_platform_device_cairo.cc112
-rw-r--r--chromium/skia/ext/bitmap_platform_device_cairo.h9
-rw-r--r--chromium/skia/ext/bitmap_platform_device_mac.cc24
-rw-r--r--chromium/skia/ext/bitmap_platform_device_mac.h5
-rw-r--r--chromium/skia/ext/bitmap_platform_device_skia.cc24
-rw-r--r--chromium/skia/ext/bitmap_platform_device_skia.h5
-rw-r--r--chromium/skia/ext/bitmap_platform_device_win.cc140
-rw-r--r--chromium/skia/ext/bitmap_platform_device_win.h5
-rw-r--r--chromium/skia/ext/convolver_unittest.cc207
-rw-r--r--chromium/skia/ext/event_tracer_impl.cc78
-rw-r--r--chromium/skia/ext/event_tracer_impl.h12
-rw-r--r--chromium/skia/ext/fontmgr_default_win.cc27
-rw-r--r--chromium/skia/ext/fontmgr_default_win.h14
-rw-r--r--chromium/skia/ext/image_operations.cc7
-rw-r--r--chromium/skia/ext/image_operations_bench.cc22
-rw-r--r--chromium/skia/ext/image_operations_unittest.cc17
-rw-r--r--chromium/skia/ext/lazy_pixel_ref.cc6
-rw-r--r--chromium/skia/ext/lazy_pixel_ref.h5
-rw-r--r--chromium/skia/ext/lazy_pixel_ref_utils.cc411
-rw-r--r--chromium/skia/ext/lazy_pixel_ref_utils.h33
-rw-r--r--chromium/skia/ext/lazy_pixel_ref_utils_unittest.cc736
-rw-r--r--chromium/skia/ext/opacity_draw_filter.cc2
-rw-r--r--chromium/skia/ext/paint_simplifier.cc19
-rw-r--r--chromium/skia/ext/pixel_ref_utils.cc375
-rw-r--r--chromium/skia/ext/pixel_ref_utils.h32
-rw-r--r--chromium/skia/ext/pixel_ref_utils_unittest.cc674
-rw-r--r--chromium/skia/ext/platform_canvas.cc12
-rw-r--r--chromium/skia/ext/skia_utils_mac.h1
-rw-r--r--chromium/skia/ext/skia_utils_mac.mm96
-rw-r--r--chromium/skia/ext/skia_utils_mac_unittest.mm18
-rw-r--r--chromium/skia/ext/skia_utils_win.cc32
-rw-r--r--chromium/skia/ext/vector_canvas.cc38
-rw-r--r--chromium/skia/ext/vector_canvas.h31
-rw-r--r--chromium/skia/ext/vector_canvas_unittest.cc2
-rw-r--r--chromium/skia/ext/vector_platform_device_emf_win.cc75
-rw-r--r--chromium/skia/ext/vector_platform_device_emf_win.h5
-rw-r--r--chromium/skia/ext/vector_platform_device_skia.cc2
-rw-r--r--chromium/skia/fix_for_1186198.diff38
-rw-r--r--chromium/skia/skia.gyp6
-rw-r--r--chromium/skia/skia_chrome.gypi9
-rw-r--r--chromium/skia/skia_common.gypi170
-rw-r--r--chromium/skia/skia_gn_files.gypi59
-rw-r--r--chromium/skia/skia_library.gypi309
-rw-r--r--chromium/skia/skia_library_opts.gyp36
-rw-r--r--chromium/skia/skia_test_expectations.txt13
-rw-r--r--chromium/skia/tile_patch.diff284
-rw-r--r--chromium/skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc7
-rw-r--r--chromium/sql/BUILD.gn94
-rw-r--r--chromium/sql/connection.cc58
-rw-r--r--chromium/sql/connection.h24
-rw-r--r--chromium/sql/connection_unittest.cc7
-rw-r--r--chromium/sql/meta_table_unittest.cc4
-rw-r--r--chromium/sql/sql.gyp9
-rw-r--r--chromium/sql/sqlite_features_unittest.cc4
-rw-r--r--chromium/sql/statement.cc4
-rw-r--r--chromium/sql/transaction.cc19
-rw-r--r--chromium/sync/DEPS14
-rw-r--r--chromium/sync/OWNERS11
-rw-r--r--chromium/sync/PRESUBMIT.py16
-rw-r--r--chromium/sync/api/DEPS7
-rw-r--r--chromium/sync/api/fake_syncable_service.cc64
-rw-r--r--chromium/sync/api/fake_syncable_service.h51
-rw-r--r--chromium/sync/api/string_ordinal.h47
-rw-r--r--chromium/sync/api/sync_change.cc86
-rw-r--r--chromium/sync/api/sync_change.h78
-rw-r--r--chromium/sync/api/sync_change_processor.cc13
-rw-r--r--chromium/sync/api/sync_change_processor.h53
-rw-r--r--chromium/sync/api/sync_change_unittest.cc139
-rw-r--r--chromium/sync/api/sync_data.cc153
-rw-r--r--chromium/sync/api/sync_data.h138
-rw-r--r--chromium/sync/api/sync_error.cc140
-rw-r--r--chromium/sync/api/sync_error.h107
-rw-r--r--chromium/sync/api/sync_error_factory.cc15
-rw-r--r--chromium/sync/api/sync_error_factory.h29
-rw-r--r--chromium/sync/api/sync_error_factory_mock.cc15
-rw-r--r--chromium/sync/api/sync_error_factory_mock.h26
-rw-r--r--chromium/sync/api/sync_error_unittest.cc137
-rw-r--r--chromium/sync/api/sync_merge_result.cc86
-rw-r--r--chromium/sync/api/sync_merge_result.h78
-rw-r--r--chromium/sync/api/sync_merge_result_unittest.cc77
-rw-r--r--chromium/sync/api/syncable_service.cc11
-rw-r--r--chromium/sync/api/syncable_service.h74
-rw-r--r--chromium/sync/api/time.h13
-rw-r--r--chromium/sync/base/DEPS2
-rw-r--r--chromium/sync/base/sync_export.h40
-rw-r--r--chromium/sync/engine/DEPS14
-rw-r--r--chromium/sync/engine/all_status.cc207
-rw-r--r--chromium/sync/engine/all_status.h86
-rw-r--r--chromium/sync/engine/apply_control_data_updates.cc221
-rw-r--r--chromium/sync/engine/apply_control_data_updates.h30
-rw-r--r--chromium/sync/engine/apply_control_data_updates_unittest.cc920
-rw-r--r--chromium/sync/engine/backoff_delay_provider.cc115
-rw-r--r--chromium/sync/engine/backoff_delay_provider.h56
-rw-r--r--chromium/sync/engine/backoff_delay_provider_unittest.cc119
-rw-r--r--chromium/sync/engine/commit.cc180
-rw-r--r--chromium/sync/engine/commit.h81
-rw-r--r--chromium/sync/engine/commit_util.cc440
-rw-r--r--chromium/sync/engine/commit_util.h64
-rw-r--r--chromium/sync/engine/conflict_resolver.cc237
-rw-r--r--chromium/sync/engine/conflict_resolver.h69
-rw-r--r--chromium/sync/engine/conflict_util.cc54
-rw-r--r--chromium/sync/engine/conflict_util.h34
-rw-r--r--chromium/sync/engine/download.cc426
-rw-r--r--chromium/sync/engine/download.h103
-rw-r--r--chromium/sync/engine/download_unittest.cc306
-rw-r--r--chromium/sync/engine/get_commit_ids.cc508
-rw-r--r--chromium/sync/engine/get_commit_ids.h42
-rw-r--r--chromium/sync/engine/net/DEPS3
-rw-r--r--chromium/sync/engine/net/server_connection_manager.cc396
-rw-r--r--chromium/sync/engine/net/server_connection_manager.h348
-rw-r--r--chromium/sync/engine/net/url_translator.cc57
-rw-r--r--chromium/sync/engine/net/url_translator.h27
-rw-r--r--chromium/sync/engine/nudge_source.cc26
-rw-r--r--chromium/sync/engine/nudge_source.h24
-rw-r--r--chromium/sync/engine/process_updates_util.cc329
-rw-r--r--chromium/sync/engine/process_updates_util.h73
-rw-r--r--chromium/sync/engine/sync_directory_commit_contribution.cc164
-rw-r--r--chromium/sync/engine/sync_directory_commit_contribution.h102
-rw-r--r--chromium/sync/engine/sync_directory_commit_contribution_unittest.cc235
-rw-r--r--chromium/sync/engine/sync_directory_commit_contributor.cc24
-rw-r--r--chromium/sync/engine/sync_directory_commit_contributor.h45
-rw-r--r--chromium/sync/engine/sync_directory_update_handler.cc148
-rw-r--r--chromium/sync/engine/sync_directory_update_handler.h97
-rw-r--r--chromium/sync/engine/sync_directory_update_handler_unittest.cc826
-rw-r--r--chromium/sync/engine/sync_engine_event.cc14
-rw-r--r--chromium/sync/engine/sync_engine_event.h83
-rw-r--r--chromium/sync/engine/sync_scheduler.cc12
-rw-r--r--chromium/sync/engine/sync_scheduler.h135
-rw-r--r--chromium/sync/engine/sync_scheduler_impl.cc911
-rw-r--r--chromium/sync/engine/sync_scheduler_impl.h336
-rw-r--r--chromium/sync/engine/sync_scheduler_unittest.cc1299
-rw-r--r--chromium/sync/engine/syncer.cc203
-rw-r--r--chromium/sync/engine/syncer.h118
-rw-r--r--chromium/sync/engine/syncer_proto_util.cc582
-rw-r--r--chromium/sync/engine/syncer_proto_util.h149
-rw-r--r--chromium/sync/engine/syncer_proto_util_unittest.cc314
-rw-r--r--chromium/sync/engine/syncer_types.h66
-rw-r--r--chromium/sync/engine/syncer_unittest.cc4811
-rw-r--r--chromium/sync/engine/syncer_util.cc650
-rw-r--r--chromium/sync/engine/syncer_util.h112
-rw-r--r--chromium/sync/engine/traffic_logger.cc46
-rw-r--r--chromium/sync/engine/traffic_logger.h25
-rw-r--r--chromium/sync/engine/traffic_recorder.cc143
-rw-r--r--chromium/sync/engine/traffic_recorder.h86
-rw-r--r--chromium/sync/engine/traffic_recorder_unittest.cc123
-rw-r--r--chromium/sync/engine/update_applicator.cc97
-rw-r--r--chromium/sync/engine/update_applicator.h78
-rw-r--r--chromium/sync/internal_api/DEPS13
-rw-r--r--chromium/sync/internal_api/README32
-rw-r--r--chromium/sync/internal_api/base_node.cc361
-rw-r--r--chromium/sync/internal_api/base_transaction.cc32
-rw-r--r--chromium/sync/internal_api/change_record.cc67
-rw-r--r--chromium/sync/internal_api/change_reorder_buffer.cc217
-rw-r--r--chromium/sync/internal_api/change_reorder_buffer.h91
-rw-r--r--chromium/sync/internal_api/debug_info_event_listener.cc270
-rw-r--r--chromium/sync/internal_api/debug_info_event_listener.h122
-rw-r--r--chromium/sync/internal_api/debug_info_event_listener_unittest.cc61
-rw-r--r--chromium/sync/internal_api/delete_journal.cc58
-rw-r--r--chromium/sync/internal_api/http_bridge.cc392
-rw-r--r--chromium/sync/internal_api/http_bridge_network_resources.cc29
-rw-r--r--chromium/sync/internal_api/http_bridge_unittest.cc520
-rw-r--r--chromium/sync/internal_api/internal_components_factory_impl.cc73
-rw-r--r--chromium/sync/internal_api/js_mutation_event_observer.cc111
-rw-r--r--chromium/sync/internal_api/js_mutation_event_observer.h71
-rw-r--r--chromium/sync/internal_api/js_mutation_event_observer_unittest.cc118
-rw-r--r--chromium/sync/internal_api/js_sync_encryption_handler_observer.cc128
-rw-r--r--chromium/sync/internal_api/js_sync_encryption_handler_observer.h64
-rw-r--r--chromium/sync/internal_api/js_sync_encryption_handler_observer_unittest.cc173
-rw-r--r--chromium/sync/internal_api/js_sync_manager_observer.cc99
-rw-r--r--chromium/sync/internal_api/js_sync_manager_observer.h58
-rw-r--r--chromium/sync/internal_api/js_sync_manager_observer_unittest.cc133
-rw-r--r--chromium/sync/internal_api/public/DEPS10
-rw-r--r--chromium/sync/internal_api/public/base/DEPS12
-rw-r--r--chromium/sync/internal_api/public/base/ack_handle.cc67
-rw-r--r--chromium/sync/internal_api/public/base/ack_handle.h47
-rw-r--r--chromium/sync/internal_api/public/base/cancelation_observer.cc13
-rw-r--r--chromium/sync/internal_api/public/base/cancelation_observer.h25
-rw-r--r--chromium/sync/internal_api/public/base/cancelation_signal.cc52
-rw-r--r--chromium/sync/internal_api/public/base/cancelation_signal.h72
-rw-r--r--chromium/sync/internal_api/public/base/cancelation_signal_unittest.cc169
-rw-r--r--chromium/sync/internal_api/public/base/enum_set.h285
-rw-r--r--chromium/sync/internal_api/public/base/enum_set_unittest.cc195
-rw-r--r--chromium/sync/internal_api/public/base/invalidation.cc182
-rw-r--r--chromium/sync/internal_api/public/base/invalidation.h125
-rw-r--r--chromium/sync/internal_api/public/base/invalidation_test_util.cc121
-rw-r--r--chromium/sync/internal_api/public/base/invalidation_test_util.h26
-rw-r--r--chromium/sync/internal_api/public/base/model_type.h312
-rw-r--r--chromium/sync/internal_api/public/base/model_type_test_util.cc65
-rw-r--r--chromium/sync/internal_api/public/base/model_type_test_util.h34
-rw-r--r--chromium/sync/internal_api/public/base/node_ordinal.cc47
-rw-r--r--chromium/sync/internal_api/public/base/node_ordinal.h56
-rw-r--r--chromium/sync/internal_api/public/base/node_ordinal_unittest.cc125
-rw-r--r--chromium/sync/internal_api/public/base/object_id_invalidation_map_test_util.cc128
-rw-r--r--chromium/sync/internal_api/public/base/object_id_invalidation_map_test_util.h20
-rw-r--r--chromium/sync/internal_api/public/base/ordinal.h486
-rw-r--r--chromium/sync/internal_api/public/base/ordinal_unittest.cc376
-rw-r--r--chromium/sync/internal_api/public/base/progress_marker_map.cc26
-rw-r--r--chromium/sync/internal_api/public/base/progress_marker_map.h35
-rw-r--r--chromium/sync/internal_api/public/base/unique_position.cc615
-rw-r--r--chromium/sync/internal_api/public/base/unique_position.h140
-rw-r--r--chromium/sync/internal_api/public/base/unique_position_unittest.cc680
-rw-r--r--chromium/sync/internal_api/public/base_node.h275
-rw-r--r--chromium/sync/internal_api/public/base_transaction.h60
-rw-r--r--chromium/sync/internal_api/public/change_record.h68
-rw-r--r--chromium/sync/internal_api/public/change_record_unittest.cc137
-rw-r--r--chromium/sync/internal_api/public/configure_reason.h39
-rw-r--r--chromium/sync/internal_api/public/data_type_association_stats.cc28
-rw-r--r--chromium/sync/internal_api/public/data_type_association_stats.h52
-rw-r--r--chromium/sync/internal_api/public/data_type_debug_info_listener.cc15
-rw-r--r--chromium/sync/internal_api/public/data_type_debug_info_listener.h50
-rw-r--r--chromium/sync/internal_api/public/delete_journal.h44
-rw-r--r--chromium/sync/internal_api/public/engine/model_safe_worker.cc175
-rw-r--r--chromium/sync/internal_api/public/engine/model_safe_worker.h160
-rw-r--r--chromium/sync/internal_api/public/engine/model_safe_worker_unittest.cc52
-rw-r--r--chromium/sync/internal_api/public/engine/passive_model_worker.cc36
-rw-r--r--chromium/sync/internal_api/public/engine/passive_model_worker.h42
-rw-r--r--chromium/sync/internal_api/public/engine/polling_constants.cc40
-rw-r--r--chromium/sync/internal_api/public/engine/polling_constants.h25
-rw-r--r--chromium/sync/internal_api/public/engine/sync_status.cc44
-rw-r--r--chromium/sync/internal_api/public/engine/sync_status.h112
-rw-r--r--chromium/sync/internal_api/public/http_bridge.h269
-rw-r--r--chromium/sync/internal_api/public/http_bridge_network_resources.h35
-rw-r--r--chromium/sync/internal_api/public/http_post_provider_factory.h39
-rw-r--r--chromium/sync/internal_api/public/http_post_provider_interface.h64
-rw-r--r--chromium/sync/internal_api/public/internal_components_factory.h104
-rw-r--r--chromium/sync/internal_api/public/internal_components_factory_impl.h51
-rw-r--r--chromium/sync/internal_api/public/network_resources.h33
-rw-r--r--chromium/sync/internal_api/public/network_time_update_callback.h28
-rw-r--r--chromium/sync/internal_api/public/read_node.h66
-rw-r--r--chromium/sync/internal_api/public/read_transaction.h52
-rw-r--r--chromium/sync/internal_api/public/sessions/model_neutral_state.cc40
-rw-r--r--chromium/sync/internal_api/public/sessions/model_neutral_state.h75
-rw-r--r--chromium/sync/internal_api/public/sessions/sync_session_snapshot.cc171
-rw-r--r--chromium/sync/internal_api/public/sessions/sync_session_snapshot.h96
-rw-r--r--chromium/sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc90
-rw-r--r--chromium/sync/internal_api/public/sync_encryption_handler.cc23
-rw-r--r--chromium/sync/internal_api/public/sync_encryption_handler.h177
-rw-r--r--chromium/sync/internal_api/public/sync_manager.cc19
-rw-r--r--chromium/sync/internal_api/public/sync_manager.h425
-rw-r--r--chromium/sync/internal_api/public/sync_manager_factory.h31
-rw-r--r--chromium/sync/internal_api/public/user_share.h33
-rw-r--r--chromium/sync/internal_api/public/util/experiments.h35
-rw-r--r--chromium/sync/internal_api/public/util/immutable.h260
-rw-r--r--chromium/sync/internal_api/public/util/immutable_unittest.cc250
-rw-r--r--chromium/sync/internal_api/public/util/report_unrecoverable_error_function.h18
-rw-r--r--chromium/sync/internal_api/public/util/sync_string_conversions.cc57
-rw-r--r--chromium/sync/internal_api/public/util/sync_string_conversions.h25
-rw-r--r--chromium/sync/internal_api/public/util/syncer_error.cc44
-rw-r--r--chromium/sync/internal_api/public/util/syncer_error.h47
-rw-r--r--chromium/sync/internal_api/public/util/unrecoverable_error_handler.h27
-rw-r--r--chromium/sync/internal_api/public/util/unrecoverable_error_info.cc44
-rw-r--r--chromium/sync/internal_api/public/util/unrecoverable_error_info.h40
-rw-r--r--chromium/sync/internal_api/public/util/weak_handle.cc36
-rw-r--r--chromium/sync/internal_api/public/util/weak_handle.h379
-rw-r--r--chromium/sync/internal_api/public/util/weak_handle_unittest.cc326
-rw-r--r--chromium/sync/internal_api/public/write_node.h215
-rw-r--r--chromium/sync/internal_api/public/write_transaction.h64
-rw-r--r--chromium/sync/internal_api/read_node.cc97
-rw-r--r--chromium/sync/internal_api/read_transaction.cc43
-rw-r--r--chromium/sync/internal_api/sync_encryption_handler_impl.cc1651
-rw-r--r--chromium/sync/internal_api/sync_encryption_handler_impl.h315
-rw-r--r--chromium/sync/internal_api/sync_encryption_handler_impl_unittest.cc2282
-rw-r--r--chromium/sync/internal_api/sync_manager_factory.cc22
-rw-r--r--chromium/sync/internal_api/sync_manager_impl.cc1347
-rw-r--r--chromium/sync/internal_api/sync_manager_impl.h379
-rw-r--r--chromium/sync/internal_api/sync_manager_impl_unittest.cc3520
-rw-r--r--chromium/sync/internal_api/syncapi_internal.cc85
-rw-r--r--chromium/sync/internal_api/syncapi_internal.h38
-rw-r--r--chromium/sync/internal_api/syncapi_server_connection_manager.cc104
-rw-r--r--chromium/sync/internal_api/syncapi_server_connection_manager.h79
-rw-r--r--chromium/sync/internal_api/syncapi_server_connection_manager_unittest.cc134
-rw-r--r--chromium/sync/internal_api/user_share.cc15
-rw-r--r--chromium/sync/internal_api/write_node.cc522
-rw-r--r--chromium/sync/internal_api/write_transaction.cc39
-rw-r--r--chromium/sync/js/DEPS5
-rw-r--r--chromium/sync/js/README.js48
-rw-r--r--chromium/sync/js/js_arg_list.cc27
-rw-r--r--chromium/sync/js/js_arg_list.h44
-rw-r--r--chromium/sync/js/js_arg_list_unittest.cc40
-rw-r--r--chromium/sync/js/js_backend.h42
-rw-r--r--chromium/sync/js/js_controller.h51
-rw-r--r--chromium/sync/js/js_event_details.cc28
-rw-r--r--chromium/sync/js/js_event_details.h46
-rw-r--r--chromium/sync/js/js_event_details_unittest.cc36
-rw-r--r--chromium/sync/js/js_event_handler.h31
-rw-r--r--chromium/sync/js/js_reply_handler.h29
-rw-r--r--chromium/sync/js/js_test_util.cc137
-rw-r--r--chromium/sync/js/js_test_util.h108
-rw-r--r--chromium/sync/js/sync_js_controller.cc83
-rw-r--r--chromium/sync/js/sync_js_controller.h81
-rw-r--r--chromium/sync/js/sync_js_controller_unittest.cc147
-rw-r--r--chromium/sync/notifier/DEPS19
-rw-r--r--chromium/sync/notifier/ack_handler.cc15
-rw-r--r--chromium/sync/notifier/ack_handler.h42
-rw-r--r--chromium/sync/notifier/dropped_invalidation_tracker.cc42
-rw-r--r--chromium/sync/notifier/dropped_invalidation_tracker.h67
-rw-r--r--chromium/sync/notifier/fake_invalidation_handler.cc38
-rw-r--r--chromium/sync/notifier/fake_invalidation_handler.h41
-rw-r--r--chromium/sync/notifier/fake_invalidation_state_tracker.cc55
-rw-r--r--chromium/sync/notifier/fake_invalidation_state_tracker.h42
-rw-r--r--chromium/sync/notifier/fake_invalidator.cc64
-rw-r--r--chromium/sync/notifier/fake_invalidator.h49
-rw-r--r--chromium/sync/notifier/fake_invalidator_unittest.cc63
-rw-r--r--chromium/sync/notifier/invalidation_handler.h32
-rw-r--r--chromium/sync/notifier/invalidation_notifier.cc87
-rw-r--r--chromium/sync/notifier/invalidation_notifier.h105
-rw-r--r--chromium/sync/notifier/invalidation_notifier_unittest.cc87
-rw-r--r--chromium/sync/notifier/invalidation_state_tracker.h65
-rw-r--r--chromium/sync/notifier/invalidation_util.cc131
-rw-r--r--chromium/sync/notifier/invalidation_util.h73
-rw-r--r--chromium/sync/notifier/invalidator.h84
-rw-r--r--chromium/sync/notifier/invalidator_registrar.cc137
-rw-r--r--chromium/sync/notifier/invalidator_registrar.h92
-rw-r--r--chromium/sync/notifier/invalidator_registrar_unittest.cc158
-rw-r--r--chromium/sync/notifier/invalidator_state.cc55
-rw-r--r--chromium/sync/notifier/invalidator_state.h38
-rw-r--r--chromium/sync/notifier/invalidator_test_template.cc28
-rw-r--r--chromium/sync/notifier/invalidator_test_template.h377
-rw-r--r--chromium/sync/notifier/mock_ack_handler.cc85
-rw-r--r--chromium/sync/notifier/mock_ack_handler.h64
-rw-r--r--chromium/sync/notifier/non_blocking_invalidator.cc219
-rw-r--r--chromium/sync/notifier/non_blocking_invalidator.h80
-rw-r--r--chromium/sync/notifier/non_blocking_invalidator_unittest.cc100
-rw-r--r--chromium/sync/notifier/object_id_invalidation_map.cc121
-rw-r--r--chromium/sync/notifier/object_id_invalidation_map.h76
-rw-r--r--chromium/sync/notifier/object_id_invalidation_map_unittest.cc104
-rw-r--r--chromium/sync/notifier/p2p_invalidator.cc291
-rw-r--r--chromium/sync/notifier/p2p_invalidator.h147
-rw-r--r--chromium/sync/notifier/p2p_invalidator_unittest.cc355
-rw-r--r--chromium/sync/notifier/push_client_channel.cc65
-rw-r--r--chromium/sync/notifier/push_client_channel.h58
-rw-r--r--chromium/sync/notifier/push_client_channel_unittest.cc118
-rw-r--r--chromium/sync/notifier/registration_manager.cc305
-rw-r--r--chromium/sync/notifier/registration_manager.h187
-rw-r--r--chromium/sync/notifier/registration_manager_unittest.cc433
-rw-r--r--chromium/sync/notifier/single_object_invalidation_set.cc111
-rw-r--r--chromium/sync/notifier/single_object_invalidation_set.h63
-rw-r--r--chromium/sync/notifier/single_object_invalidation_set_unittest.cc110
-rw-r--r--chromium/sync/notifier/state_writer.h25
-rw-r--r--chromium/sync/notifier/sync_invalidation_listener.cc420
-rw-r--r--chromium/sync/notifier/sync_invalidation_listener.h191
-rw-r--r--chromium/sync/notifier/sync_invalidation_listener_unittest.cc1127
-rw-r--r--chromium/sync/notifier/sync_system_resources.cc383
-rw-r--r--chromium/sync/notifier/sync_system_resources.h243
-rw-r--r--chromium/sync/notifier/sync_system_resources_unittest.cc403
-rw-r--r--chromium/sync/notifier/unacked_invalidation_set.cc204
-rw-r--r--chromium/sync/notifier/unacked_invalidation_set.h117
-rw-r--r--chromium/sync/notifier/unacked_invalidation_set_test_util.cc181
-rw-r--r--chromium/sync/notifier/unacked_invalidation_set_test_util.h25
-rw-r--r--chromium/sync/notifier/unacked_invalidation_set_unittest.cc219
-rw-r--r--chromium/sync/protocol/DEPS4
-rw-r--r--chromium/sync/protocol/app_list_specifics.proto49
-rw-r--r--chromium/sync/protocol/app_notification_specifics.proto44
-rw-r--r--chromium/sync/protocol/app_setting_specifics.proto25
-rw-r--r--chromium/sync/protocol/app_specifics.proto60
-rw-r--r--chromium/sync/protocol/article_specifics.proto29
-rw-r--r--chromium/sync/protocol/autofill_specifics.proto63
-rw-r--r--chromium/sync/protocol/bookmark_specifics.proto34
-rw-r--r--chromium/sync/protocol/client_commands.proto34
-rw-r--r--chromium/sync/protocol/client_debug_info.proto196
-rw-r--r--chromium/sync/protocol/device_info_specifics.proto37
-rw-r--r--chromium/sync/protocol/dictionary_specifics.proto18
-rw-r--r--chromium/sync/protocol/encryption.proto32
-rw-r--r--chromium/sync/protocol/experiments_specifics.proto51
-rw-r--r--chromium/sync/protocol/extension_setting_specifics.proto28
-rw-r--r--chromium/sync/protocol/extension_specifics.proto39
-rw-r--r--chromium/sync/protocol/favicon_image_specifics.proto40
-rw-r--r--chromium/sync/protocol/favicon_tracking_specifics.proto24
-rw-r--r--chromium/sync/protocol/get_updates_caller_info.proto52
-rw-r--r--chromium/sync/protocol/history_delete_directive_specifics.proto48
-rw-r--r--chromium/sync/protocol/managed_user_setting_specifics.proto21
-rw-r--r--chromium/sync/protocol/managed_user_specifics.proto36
-rw-r--r--chromium/sync/protocol/nigori_specifics.proto130
-rw-r--r--chromium/sync/protocol/password_specifics.proto45
-rw-r--r--chromium/sync/protocol/preference_specifics.proto22
-rw-r--r--chromium/sync/protocol/priority_preference_specifics.proto22
-rw-r--r--chromium/sync/protocol/proto_enum_conversions.cc252
-rw-r--r--chromium/sync/protocol/proto_enum_conversions.h65
-rw-r--r--chromium/sync/protocol/proto_enum_conversions_unittest.cc95
-rw-r--r--chromium/sync/protocol/proto_value_conversions.cc1028
-rw-r--r--chromium/sync/protocol/proto_value_conversions.h288
-rw-r--r--chromium/sync/protocol/proto_value_conversions_unittest.cc360
-rw-r--r--chromium/sync/protocol/search_engine_specifics.proto82
-rw-r--r--chromium/sync/protocol/session_specifics.proto137
-rw-r--r--chromium/sync/protocol/sync.proto895
-rw-r--r--chromium/sync/protocol/sync_enums.proto148
-rw-r--r--chromium/sync/protocol/sync_protocol_error.cc65
-rw-r--r--chromium/sync/protocol/sync_protocol_error.h88
-rw-r--r--chromium/sync/protocol/synced_notification_data.proto130
-rw-r--r--chromium/sync/protocol/synced_notification_render.proto178
-rw-r--r--chromium/sync/protocol/synced_notification_specifics.proto24
-rw-r--r--chromium/sync/protocol/test.proto21
-rw-r--r--chromium/sync/protocol/theme_specifics.proto39
-rw-r--r--chromium/sync/protocol/typed_url_specifics.proto41
-rw-r--r--chromium/sync/protocol/unique_position.proto80
-rw-r--r--chromium/sync/sessions/DEPS12
-rw-r--r--chromium/sync/sessions/data_type_tracker.cc157
-rw-r--r--chromium/sync/sessions/data_type_tracker.h126
-rw-r--r--chromium/sync/sessions/debug_info_getter.h31
-rw-r--r--chromium/sync/sessions/nudge_tracker.cc219
-rw-r--r--chromium/sync/sessions/nudge_tracker.h139
-rw-r--r--chromium/sync/sessions/nudge_tracker_unittest.cc467
-rw-r--r--chromium/sync/sessions/status_controller.cc135
-rw-r--r--chromium/sync/sessions/status_controller.h116
-rw-r--r--chromium/sync/sessions/status_controller_unittest.cc46
-rw-r--r--chromium/sync/sessions/sync_session.cc89
-rw-r--r--chromium/sync/sessions/sync_session.h133
-rw-r--r--chromium/sync/sessions/sync_session_context.cc79
-rw-r--r--chromium/sync/sessions/sync_session_context.h227
-rw-r--r--chromium/sync/sessions/sync_session_unittest.cc150
-rw-r--r--chromium/sync/sessions/test_util.cc134
-rw-r--r--chromium/sync/sessions/test_util.h97
-rw-r--r--chromium/sync/sync.gyp1
-rw-r--r--chromium/sync/sync_android.gypi1
-rw-r--r--chromium/sync/sync_api.gypi30
-rw-r--r--chromium/sync/sync_core.gypi65
-rw-r--r--chromium/sync/sync_internal_api.gypi55
-rw-r--r--chromium/sync/sync_notifier.gypi18
-rw-r--r--chromium/sync/sync_proto.gypi5
-rw-r--r--chromium/sync/sync_tests.gypi189
-rw-r--r--chromium/sync/syncable/DEPS11
-rw-r--r--chromium/sync/syncable/blob.h20
-rw-r--r--chromium/sync/syncable/dir_open_result.h24
-rw-r--r--chromium/sync/syncable/directory.cc1296
-rw-r--r--chromium/sync/syncable/directory.h557
-rw-r--r--chromium/sync/syncable/directory_backing_store.cc1504
-rw-r--r--chromium/sync/syncable/directory_backing_store.h194
-rw-r--r--chromium/sync/syncable/directory_backing_store_unittest.cc3502
-rw-r--r--chromium/sync/syncable/directory_change_delegate.h51
-rw-r--r--chromium/sync/syncable/entry.cc169
-rw-r--r--chromium/sync/syncable/entry.h269
-rw-r--r--chromium/sync/syncable/entry_kernel.cc216
-rw-r--r--chromium/sync/syncable/entry_kernel.h358
-rw-r--r--chromium/sync/syncable/in_memory_directory_backing_store.cc50
-rw-r--r--chromium/sync/syncable/in_memory_directory_backing_store.h45
-rw-r--r--chromium/sync/syncable/invalid_directory_backing_store.cc25
-rw-r--r--chromium/sync/syncable/invalid_directory_backing_store.h31
-rw-r--r--chromium/sync/syncable/metahandle_set.h20
-rw-r--r--chromium/sync/syncable/model_neutral_mutable_entry.cc381
-rw-r--r--chromium/sync/syncable/model_neutral_mutable_entry.h116
-rw-r--r--chromium/sync/syncable/model_type.cc995
-rw-r--r--chromium/sync/syncable/model_type_unittest.cc108
-rw-r--r--chromium/sync/syncable/mutable_entry.cc247
-rw-r--r--chromium/sync/syncable/mutable_entry.h77
-rw-r--r--chromium/sync/syncable/nigori_handler.cc14
-rw-r--r--chromium/sync/syncable/nigori_handler.h64
-rw-r--r--chromium/sync/syncable/nigori_util.cc322
-rw-r--r--chromium/sync/syncable/nigori_util.h85
-rw-r--r--chromium/sync/syncable/nigori_util_unittest.cc50
-rw-r--r--chromium/sync/syncable/on_disk_directory_backing_store.cc117
-rw-r--r--chromium/sync/syncable/on_disk_directory_backing_store.h51
-rw-r--r--chromium/sync/syncable/parent_child_index.cc115
-rw-r--r--chromium/sync/syncable/parent_child_index.h66
-rw-r--r--chromium/sync/syncable/parent_child_index_unittest.cc344
-rw-r--r--chromium/sync/syncable/scoped_kernel_lock.cc19
-rw-r--r--chromium/sync/syncable/scoped_kernel_lock.h29
-rw-r--r--chromium/sync/syncable/scoped_parent_child_index_updater.cc28
-rw-r--r--chromium/sync/syncable/scoped_parent_child_index_updater.h37
-rw-r--r--chromium/sync/syncable/syncable-inl.h25
-rw-r--r--chromium/sync/syncable/syncable_base_transaction.cc79
-rw-r--r--chromium/sync/syncable/syncable_base_transaction.h85
-rw-r--r--chromium/sync/syncable/syncable_base_write_transaction.cc22
-rw-r--r--chromium/sync/syncable/syncable_base_write_transaction.h35
-rw-r--r--chromium/sync/syncable/syncable_changes_version.h31
-rw-r--r--chromium/sync/syncable/syncable_columns.h78
-rw-r--r--chromium/sync/syncable/syncable_delete_journal.cc143
-rw-r--r--chromium/sync/syncable/syncable_delete_journal.h104
-rw-r--r--chromium/sync/syncable/syncable_enum_conversions.cc178
-rw-r--r--chromium/sync/syncable/syncable_enum_conversions.h52
-rw-r--r--chromium/sync/syncable/syncable_enum_conversions_unittest.cc93
-rw-r--r--chromium/sync/syncable/syncable_id.cc72
-rw-r--r--chromium/sync/syncable/syncable_id.h132
-rw-r--r--chromium/sync/syncable/syncable_id_unittest.cc96
-rw-r--r--chromium/sync/syncable/syncable_model_neutral_write_transaction.cc33
-rw-r--r--chromium/sync/syncable/syncable_model_neutral_write_transaction.h44
-rw-r--r--chromium/sync/syncable/syncable_proto_util.cc32
-rw-r--r--chromium/sync/syncable/syncable_proto_util.h38
-rw-r--r--chromium/sync/syncable/syncable_read_transaction.cc22
-rw-r--r--chromium/sync/syncable/syncable_read_transaction.h33
-rw-r--r--chromium/sync/syncable/syncable_unittest.cc2303
-rw-r--r--chromium/sync/syncable/syncable_util.cc116
-rw-r--r--chromium/sync/syncable/syncable_util.h58
-rw-r--r--chromium/sync/syncable/syncable_util_unittest.cc32
-rw-r--r--chromium/sync/syncable/syncable_write_transaction.cc188
-rw-r--r--chromium/sync/syncable/syncable_write_transaction.h68
-rw-r--r--chromium/sync/syncable/transaction_observer.h27
-rw-r--r--chromium/sync/syncable/write_transaction_info.cc48
-rw-r--r--chromium/sync/syncable/write_transaction_info.h41
-rw-r--r--chromium/sync/tools/DEPS9
-rw-r--r--chromium/sync/tools/null_invalidation_state_tracker.cc59
-rw-r--r--chromium/sync/tools/null_invalidation_state_tracker.h36
-rw-r--r--chromium/sync/tools/sync_client.cc396
-rw-r--r--chromium/sync/tools/sync_listen_notifications.cc213
-rw-r--r--chromium/sync/tools/sync_tools.gyp77
-rw-r--r--chromium/sync/tools/testserver/DEPS3
-rw-r--r--chromium/sync/tools/testserver/OWNERS3
-rw-r--r--chromium/sync/tools/testserver/chromiumsync.py1643
-rwxr-xr-xchromium/sync/tools/testserver/chromiumsync_test.py680
-rw-r--r--chromium/sync/tools/testserver/run_sync_testserver.cc120
-rwxr-xr-xchromium/sync/tools/testserver/sync_testserver.py614
-rw-r--r--chromium/sync/tools/testserver/synced_notifications.html51
-rw-r--r--chromium/sync/tools/testserver/xmppserver.py603
-rwxr-xr-xchromium/sync/tools/testserver/xmppserver_test.py421
-rw-r--r--chromium/sync/util/DEPS13
-rw-r--r--chromium/sync/util/cryptographer.cc361
-rw-r--r--chromium/sync/util/cryptographer.h217
-rw-r--r--chromium/sync/util/cryptographer_unittest.cc204
-rw-r--r--chromium/sync/util/data_type_histogram.h129
-rw-r--r--chromium/sync/util/data_type_histogram_unittest.cc60
-rw-r--r--chromium/sync/util/encryptor.h27
-rw-r--r--chromium/sync/util/extensions_activity.cc39
-rw-r--r--chromium/sync/util/extensions_activity.h64
-rw-r--r--chromium/sync/util/get_session_name.cc88
-rw-r--r--chromium/sync/util/get_session_name.h28
-rw-r--r--chromium/sync/util/get_session_name_ios.h18
-rw-r--r--chromium/sync/util/get_session_name_ios.mm19
-rw-r--r--chromium/sync/util/get_session_name_linux.cc24
-rw-r--r--chromium/sync/util/get_session_name_linux.h19
-rw-r--r--chromium/sync/util/get_session_name_mac.h22
-rw-r--r--chromium/sync/util/get_session_name_mac.mm48
-rw-r--r--chromium/sync/util/get_session_name_unittest.cc76
-rw-r--r--chromium/sync/util/get_session_name_win.cc21
-rw-r--r--chromium/sync/util/get_session_name_win.h18
-rw-r--r--chromium/sync/util/logging.cc18
-rw-r--r--chromium/sync/util/logging.h34
-rw-r--r--chromium/sync/util/nigori.cc250
-rw-r--r--chromium/sync/util/nigori.h86
-rw-r--r--chromium/sync/util/nigori_unittest.cc170
-rw-r--r--chromium/sync/util/protobuf_unittest.cc35
-rw-r--r--chromium/sync/util/test_unrecoverable_error_handler.cc23
-rw-r--r--chromium/sync/util/test_unrecoverable_error_handler.h27
-rw-r--r--chromium/sync/util/time.cc24
-rw-r--r--chromium/sync/util/time.h29
-rw-r--r--chromium/testing/android/native_test.gyp8
-rw-r--r--chromium/testing/gtest.gyp21
-rw-r--r--chromium/testing/iossim/iossim.gyp85
-rw-r--r--chromium/testing/iossim/iossim.mm124
-rwxr-xr-xchromium/testing/iossim/redirect-stdout.sh9
-rw-r--r--chromium/third_party/BUILD.gn39
-rw-r--r--chromium/third_party/JSON/JSON-2.59.tar.gz.sha11
-rw-r--r--chromium/third_party/JSON/JSON-2.59/Changes372
-rw-r--r--chromium/third_party/JSON/JSON-2.59/MANIFEST71
-rw-r--r--chromium/third_party/JSON/JSON-2.59/META.json49
-rw-r--r--chromium/third_party/JSON/JSON-2.59/META.yml26
-rw-r--r--chromium/third_party/JSON/JSON-2.59/MYMETA.yml27
-rw-r--r--chromium/third_party/JSON/JSON-2.59/Makefile823
-rw-r--r--chromium/third_party/JSON/JSON-2.59/Makefile.PL77
-rw-r--r--chromium/third_party/JSON/JSON-2.59/README1566
-rw-r--r--chromium/third_party/JSON/JSON-2.59/blib/lib/JSON.pm2292
-rw-r--r--chromium/third_party/JSON/JSON-2.59/blib/lib/JSON/backportPP.pm2803
-rw-r--r--chromium/third_party/JSON/JSON-2.59/blib/lib/JSON/backportPP/Boolean.pm27
-rw-r--r--chromium/third_party/JSON/JSON-2.59/blib/lib/JSON/backportPP/Compat5005.pm131
-rw-r--r--chromium/third_party/JSON/JSON-2.59/blib/lib/JSON/backportPP/Compat5006.pm173
-rw-r--r--chromium/third_party/JSON/JSON-2.59/blib/man3/JSON.3pm1876
-rw-r--r--chromium/third_party/JSON/JSON-2.59/blib/man3/JSON__backportPP.3pm1379
-rw-r--r--chromium/third_party/JSON/JSON-2.59/blib/man3/JSON__backportPP__Boolean.3pm146
-rw-r--r--chromium/third_party/JSON/JSON-2.59/blib/man3/JSON__backportPP__Compat5005.3pm145
-rw-r--r--chromium/third_party/JSON/JSON-2.59/blib/man3/JSON__backportPP__Compat5006.3pm145
-rwxr-xr-xchromium/third_party/JSON/JSON-2.59/eg/bench_decode.pl70
-rwxr-xr-xchromium/third_party/JSON/JSON-2.59/eg/bench_encode.pl86
-rw-r--r--chromium/third_party/JSON/JSON-2.59/lib/JSON.pm2292
-rw-r--r--chromium/third_party/JSON/JSON-2.59/lib/JSON/backportPP.pm2803
-rw-r--r--chromium/third_party/JSON/JSON-2.59/lib/JSON/backportPP/Boolean.pm27
-rw-r--r--chromium/third_party/JSON/JSON-2.59/lib/JSON/backportPP/Compat5005.pm131
-rw-r--r--chromium/third_party/JSON/JSON-2.59/lib/JSON/backportPP/Compat5006.pm173
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/00_load.t15
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/00_pod.t8
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/01_utf8.t36
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/02_error.t51
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/03_types.t60
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/06_pc_pretty.t68
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/07_pc_esc.t93
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/08_pc_base.t99
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/09_pc_extra_number.t39
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/10_pc_keysort.t20
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/11_pc_expo.t47
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/12_blessed.t53
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/13_limit.t34
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/14_latin1.t27
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/15_prefix.t16
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/16_tied.t23
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/17_relaxed.t30
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/18_json_checker.t174
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/19_incr.t182
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/20_unknown.t54
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/21_evans_bugrep.t50
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/22_comment_at_eof.t47
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/99_binary.t53
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/_unicode_handling.pm28
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e00_func.t17
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e01_property.t67
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e02_bool.t32
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e03_bool2.t43
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e04_sortby.t24
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e05_esc_slash.t15
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e06_allow_barekey.t19
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e07_allow_singlequote.t20
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e08_decode.t41
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e09_encode.t39
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e10_bignum.t41
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e11_conv_blessed_univ.t45
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e12_upgrade.t32
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e13_overloaded_eq.t65
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e14_decode_prefix.t28
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e15_tie_ixhash.t44
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e16_incr_parse_fixed.t28
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/e90_misc.t18
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/x00_load.t14
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/x02_error.t61
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/x12_blessed.t54
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/x16_tied.t26
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/x17_strange_overload.t20
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/xe01_property.t56
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/xe02_bool.t33
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/xe03_bool2.t47
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/xe04support_by_pp.t22
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/xe05_indent_length.t76
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/xe08_decode.t45
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/xe10_bignum.t36
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/xe11_conv_blessed_univ.t48
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/xe12_boolean.t35
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/xe19_xs_and_suportbypp.t33
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/xe20_croak_message.t21
-rw-r--r--chromium/third_party/JSON/LICENSE1092
-rw-r--r--chromium/third_party/JSON/OWNERS2
-rw-r--r--chromium/third_party/JSON/README.chromium21
-rwxr-xr-xchromium/third_party/JSON/get_and_build_json_pm.sh80
-rw-r--r--chromium/third_party/JSON/out/lib/perl5/JSON.pm2292
-rw-r--r--chromium/third_party/JSON/out/lib/perl5/JSON/backportPP.pm2803
-rw-r--r--chromium/third_party/JSON/out/lib/perl5/JSON/backportPP/Boolean.pm27
-rw-r--r--chromium/third_party/JSON/out/lib/perl5/JSON/backportPP/Compat5005.pm131
-rw-r--r--chromium/third_party/JSON/out/lib/perl5/JSON/backportPP/Compat5006.pm173
-rw-r--r--chromium/third_party/JSON/out/lib/perl5/x86_64-linux-gnu-thread-multi/auto/JSON/.packlist14
-rw-r--r--chromium/third_party/JSON/out/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod66
-rw-r--r--chromium/third_party/JSON/out/man/man3/JSON.3pm1876
-rw-r--r--chromium/third_party/JSON/out/man/man3/JSON__backportPP.3pm1379
-rw-r--r--chromium/third_party/JSON/out/man/man3/JSON__backportPP__Boolean.3pm146
-rw-r--r--chromium/third_party/JSON/out/man/man3/JSON__backportPP__Compat5005.3pm145
-rw-r--r--chromium/third_party/JSON/out/man/man3/JSON__backportPP__Compat5006.3pm145
-rw-r--r--chromium/third_party/OWNERS7
-rw-r--r--chromium/third_party/PRESUBMIT.py46
-rw-r--r--chromium/third_party/README.chromium.template32
-rw-r--r--chromium/third_party/WebKit/.clang-format1
-rw-r--r--chromium/third_party/WebKit/LICENSE30
-rw-r--r--chromium/third_party/WebKit/PRESUBMIT.py89
-rw-r--r--chromium/third_party/WebKit/Source/BUILD.gn82
-rw-r--r--chromium/third_party/WebKit/Source/OWNERS14
-rw-r--r--chromium/third_party/WebKit/Source/bindings/BUILD.gn105
-rw-r--r--chromium/third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt37
-rw-r--r--chromium/third_party/WebKit/Source/bindings/OWNERS1
-rw-r--r--chromium/third_party/WebKit/Source/bindings/PRESUBMIT.py9
-rw-r--r--chromium/third_party/WebKit/Source/bindings/__init__.py (renamed from chromium/third_party/JSON/JSON-2.59/blib/bin/.exists)0
-rw-r--r--chromium/third_party/WebKit/Source/bindings/bindings.gni51
-rw-r--r--chromium/third_party/WebKit/Source/bindings/bindings.gypi283
-rw-r--r--chromium/third_party/WebKit/Source/bindings/core/BUILD.gn18
-rw-r--r--chromium/third_party/WebKit/Source/bindings/core/core.gni8
-rw-r--r--chromium/third_party/WebKit/Source/bindings/core/core.gypi15
-rw-r--r--chromium/third_party/WebKit/Source/bindings/core/generated.gyp72
-rw-r--r--chromium/third_party/WebKit/Source/bindings/core/generated.gypi24
-rw-r--r--chromium/third_party/WebKit/Source/bindings/core/idl.gni57
-rw-r--r--chromium/third_party/WebKit/Source/bindings/core/idl.gypi71
-rw-r--r--chromium/third_party/WebKit/Source/bindings/core/v8/BUILD.gn32
-rw-r--r--chromium/third_party/WebKit/Source/bindings/core/v8/generated.gni35
-rw-r--r--chromium/third_party/WebKit/Source/bindings/core/v8/generated.gyp135
-rw-r--r--chromium/third_party/WebKit/Source/bindings/core/v8/generated.gypi41
-rw-r--r--chromium/third_party/WebKit/Source/bindings/derived_sources.gyp316
-rw-r--r--chromium/third_party/WebKit/Source/bindings/idl.gni21
-rw-r--r--chromium/third_party/WebKit/Source/bindings/modules/BUILD.gn120
-rw-r--r--chromium/third_party/WebKit/Source/bindings/modules/generated.gyp242
-rw-r--r--chromium/third_party/WebKit/Source/bindings/modules/generated.gypi34
-rw-r--r--chromium/third_party/WebKit/Source/bindings/modules/idl.gni42
-rw-r--r--chromium/third_party/WebKit/Source/bindings/modules/idl.gypi72
-rw-r--r--chromium/third_party/WebKit/Source/bindings/modules/modules.gni8
-rw-r--r--chromium/third_party/WebKit/Source/bindings/modules/modules.gypi13
-rw-r--r--chromium/third_party/WebKit/Source/bindings/modules/v8/BUILD.gn32
-rw-r--r--chromium/third_party/WebKit/Source/bindings/modules/v8/generated.gni35
-rw-r--r--chromium/third_party/WebKit/Source/bindings/modules/v8/generated.gyp121
-rw-r--r--chromium/third_party/WebKit/Source/bindings/modules/v8/generated.gypi41
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/BUILD.gn48
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/__init__.py (renamed from chromium/third_party/JSON/JSON-2.59/blib/lib/.exists)0
-rwxr-xr-xchromium/third_party/WebKit/Source/bindings/scripts/aggregate_generated_bindings.py229
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/blink_idl_lexer.py127
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/blink_idl_parser.py446
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/code_generator_v8.pm6351
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py222
-rwxr-xr-xchromium/third_party/WebKit/Source/bindings/scripts/compute_dependencies.py404
-rwxr-xr-xchromium/third_party/WebKit/Source/bindings/scripts/compute_global_objects.py113
-rwxr-xr-xchromium/third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_individual.py192
-rwxr-xr-xchromium/third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_overall.py264
-rwxr-xr-xchromium/third_party/WebKit/Source/bindings/scripts/generate_bindings.pl309
-rwxr-xr-xchromium/third_party/WebKit/Source/bindings/scripts/generate_event_interfaces.py122
-rwxr-xr-xchromium/third_party/WebKit/Source/bindings/scripts/generate_global_constructors.py184
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/global_constructors.gypi73
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/global_objects.gypi64
-rwxr-xr-xchromium/third_party/WebKit/Source/bindings/scripts/idl_compiler.py143
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/idl_definitions.py756
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/idl_parser.pm2222
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/idl_reader.py109
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/idl_serializer.pm126
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/idl_types.py321
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/idl_validator.py108
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/interface_dependency_resolver.py179
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/interfaces_info_individual.gypi70
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/interfaces_info_overall.gypi56
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/scripts.gni202
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/scripts.gyp75
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/scripts.gypi59
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/unstable/blink_idl_lexer.py90
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/unstable/blink_idl_parser.py404
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/unstable/code_generator_v8.py156
-rwxr-xr-xchromium/third_party/WebKit/Source/bindings/scripts/unstable/idl_compiler.py129
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/unstable/idl_definitions.py446
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/unstable/idl_definitions_builder.py511
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/unstable/idl_reader.py80
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/unstable/idl_validator.py96
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/unstable/interface_dependency_resolver.py211
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/unstable/v8_attributes.py331
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/unstable/v8_callback_interface.py139
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/unstable/v8_globals.py31
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/unstable/v8_interface.py406
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/unstable/v8_methods.py232
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/unstable/v8_types.py583
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/unstable/v8_utilities.py221
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/utilities.py171
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/v8_attributes.py436
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py134
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/v8_globals.py32
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/v8_interface.py1087
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/v8_methods.py349
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/v8_types.py691
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/v8_utilities.py274
-rw-r--r--chromium/third_party/WebKit/Source/bindings/templates/attributes.cpp271
-rw-r--r--chromium/third_party/WebKit/Source/bindings/templates/callback_interface.cpp73
-rw-r--r--chromium/third_party/WebKit/Source/bindings/templates/callback_interface.h51
-rw-r--r--chromium/third_party/WebKit/Source/bindings/templates/interface.cpp909
-rw-r--r--chromium/third_party/WebKit/Source/bindings/templates/interface.h148
-rw-r--r--chromium/third_party/WebKit/Source/bindings/templates/interface_base.cpp89
-rw-r--r--chromium/third_party/WebKit/Source/bindings/templates/methods.cpp492
-rw-r--r--chromium/third_party/WebKit/Source/bindings/templates/templates.gni17
-rw-r--r--chromium/third_party/WebKit/Source/bindings/templates/templates.gypi17
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ArrayValue.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/BindingSecurity.cpp44
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/BindingSecurity.h12
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/CallbackPromiseAdapter.h32
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/CustomElementBinding.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/CustomElementBinding.h6
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/CustomElementConstructorBuilder.cpp102
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/CustomElementConstructorBuilder.h3
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/CustomElementWrapper.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/CustomElementWrapper.h3
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/DOMDataStore.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/DOMDataStore.h108
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/DOMRequestState.h85
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/DOMWrapperMap.h134
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/DOMWrapperWorld.cpp144
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/DOMWrapperWorld.h83
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/DebuggerScript.js179
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/Dictionary.cpp191
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/Dictionary.h131
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ExceptionMessages.cpp83
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ExceptionMessages.h115
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ExceptionState.cpp53
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ExceptionState.h57
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ExceptionStatePlaceholder.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ExceptionStatePlaceholder.h29
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/IDBBindingUtilities.cpp181
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/IDBBindingUtilities.h24
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/IDBBindingUtilitiesTest.cpp131
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/NPV8Object.cpp126
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/NPV8Object.h6
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/Nullable.h51
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/PageScriptDebugServer.cpp114
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/PageScriptDebugServer.h36
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/RetainedDOMInfo.h17
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScheduledAction.cpp53
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScheduledAction.h17
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScopedPersistent.h7
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptCallStackFactory.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptCallStackFactory.h8
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptController.cpp334
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptController.h38
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptDebugServer.cpp268
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptDebugServer.h49
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptEventListener.cpp78
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptEventListener.h9
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptFunction.cpp32
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptFunction.h56
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptFunctionCall.cpp113
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptFunctionCall.h26
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptGCEvent.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptGCEvent.h3
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptHeapSnapshot.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptHeapSnapshot.h9
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptObject.cpp82
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptObject.h66
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptPreprocessor.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptPreprocessor.h7
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptProfiler.cpp85
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptProfiler.h10
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptPromise.cpp104
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptPromise.h45
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptPromiseResolver.cpp74
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptPromiseResolver.h139
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptPromiseResolverTest.cpp184
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptPromiseResolverWithContext.cpp101
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptPromiseResolverWithContext.h145
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptPromiseTest.cpp260
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptRegexp.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptScope.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptScope.h55
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptSourceCode.h2
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptState.cpp148
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptState.h179
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptString.cpp45
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptString.h27
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptValue.cpp96
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptValue.h89
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptWrappable.h169
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/SerializedScriptValue.cpp1139
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/SerializedScriptValue.h37
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/UnsafePersistent.h129
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8AbstractEventListener.cpp89
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8AbstractEventListener.h30
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8Binding.cpp670
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8Binding.h1340
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8BindingMacros.h115
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8Callback.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8Callback.h14
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8CustomElementLifecycleCallbacks.cpp97
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8CustomElementLifecycleCallbacks.h12
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8DOMActivityLogger.cpp72
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8DOMActivityLogger.h26
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8DOMConfiguration.cpp49
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8DOMConfiguration.h23
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8DOMWrapper.cpp68
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8DOMWrapper.h96
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8ErrorHandler.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8ErrorHandler.h16
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8EventListener.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8EventListener.h11
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8EventListenerList.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8EventListenerList.h37
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8GCController.cpp207
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8GCController.h3
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8GCForContextDispose.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8GCForContextDispose.h1
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8GarbageCollected.h89
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8HiddenPropertyName.cpp79
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8HiddenPropertyName.h83
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8HiddenValue.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8HiddenValue.h61
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8Initializer.cpp101
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8LazyEventListener.cpp113
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8LazyEventListener.h16
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8MutationCallback.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8MutationCallback.h17
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8NPObject.cpp156
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8NPObject.h3
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8NPUtils.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8NodeFilterCondition.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8NodeFilterCondition.h15
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8ObjectConstructor.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8ObjectConstructor.h23
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8PerContextData.cpp79
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8PerContextData.h119
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8PerIsolateData.cpp157
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8PerIsolateData.h102
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8PersistentValueMap.h128
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8PersistentValueVector.h77
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8RecursionScope.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8RecursionScope.h41
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8ScriptRunner.cpp142
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8ScriptRunner.h16
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8StringResource.cpp85
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8StringResource.h59
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8ThrowException.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8ThrowException.h4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8Utilities.cpp181
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8Utilities.h72
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8ValueCache.cpp55
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8ValueCache.h42
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8WindowShell.cpp248
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8WindowShell.h40
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp66
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8WorkerGlobalScopeEventListener.h14
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/WorkerScriptController.cpp157
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/WorkerScriptController.h36
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/WorkerScriptDebugServer.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/WorkerScriptDebugServer.h18
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/WrapperTypeInfo.h85
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8AlgorithmCustom.cpp78
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferCustom.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferCustom.h17
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferViewCustom.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferViewCustom.h7
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferViewCustomScript.js36
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8AudioNodeCustom.cpp36
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8BiquadFilterNodeCustom.cpp60
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8BlobCustom.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8BlobCustomHelpers.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8BlobCustomHelpers.h10
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8CSSRuleCustom.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp132
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8CSSValueCustom.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp45
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8CanvasRenderingContextCustom.cpp51
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8ClientCustom.cpp39
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8CryptoCustom.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8CustomEventCustom.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8CustomXPathNSResolver.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8CustomXPathNSResolver.h6
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8DataViewCustom.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8DataViewCustom.h4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8DedicatedWorkerGlobalScopeCustom.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8DeviceMotionEventCustom.cpp40
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8DeviceOrientationEventCustom.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8DocumentCustom.cpp40
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8ElementCustom.cpp236
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8EntryCustom.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8EntrySyncCustom.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8ErrorEventCustom.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8EventCustom.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8EventTargetCustom.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8FileCustom.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8FileReaderCustom.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8Float32ArrayCustom.h4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8Float64ArrayCustom.h4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8FormDataCustom.cpp71
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8GeolocationCustom.cpp80
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp55
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8HTMLCollectionCustom.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8HTMLDocumentCustom.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8HTMLElementCustom.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp71
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8HTMLFrameElementCustom.cpp59
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp56
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8HistoryCustom.cpp40
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8ImageDataCustom.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp151
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8InjectedScriptManager.cpp45
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8Int16ArrayCustom.h4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8Int32ArrayCustom.h4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8Int8ArrayCustom.h4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8LocationCustom.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8MIDIInputCustom.cpp52
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8MIDIOutputCustom.cpp52
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8MessageChannelCustom.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8MessageEventCustom.cpp92
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8MessagePortCustom.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8MutationObserverCustom.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8NodeCustom.cpp67
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8NodeListCustom.cpp60
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8OscillatorNodeCustom.cpp60
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8PannerNodeCustom.cpp84
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8PerformanceEntryCustom.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8PopStateEventCustom.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8PromiseCustom.cpp794
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8PromiseCustom.h136
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8SQLTransactionCustom.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8SQLTransactionSyncCustom.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8SVGElementCustom.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8SVGLengthCustom.cpp102
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8SVGPathSegCustom.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8ServiceWorkerCustom.cpp38
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8StyleSheetCustom.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8SubtleCryptoCustom.cpp125
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8TextCustom.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp31
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8TrackEventCustom.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8TypedArrayCustom.h17
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8Uint16ArrayCustom.h4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8Uint32ArrayCustom.h4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8Uint8ArrayCustom.h4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8Uint8ClampedArrayCustom.h4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp449
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8WebKitPointCustom.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8WindowCustom.cpp242
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8WorkerCryptoCustom.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8WorkerCustom.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8WorkerGlobalScopeCustom.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp60
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8XSLTProcessorCustom.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/custom.gypi92
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/npruntime.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/v8.gypi165
-rw-r--r--chromium/third_party/WebKit/Source/build/ConvertFileToHeaderWithCharacterArray.gypi1
-rw-r--r--chromium/third_party/WebKit/Source/build/convert_file_to_header_with_character_array.gni28
-rw-r--r--chromium/third_party/WebKit/Source/build/features.gypi26
-rw-r--r--chromium/third_party/WebKit/Source/build/gn_list_to_space_separated_string.py12
-rw-r--r--chromium/third_party/WebKit/Source/build/make_file_arrays.gni46
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/action_derivedsourcesallinone.py212
-rwxr-xr-x[-rw-r--r--]chromium/third_party/WebKit/Source/build/scripts/action_useragentstylesheets.py9
-rwxr-xr-xchromium/third_party/WebKit/Source/build/scripts/audit_runtime_enabled_features.py176
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/gperf.py12
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/hasher.py1
-rwxr-xr-x[-rw-r--r--]chromium/third_party/WebKit/Source/build/scripts/in_file_unittest.py0
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/in_generator.py7
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/license.py33
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/list_idl_files_with_partial_interface.py45
-rwxr-xr-xchromium/third_party/WebKit/Source/build/scripts/make-file-arrays.py158
-rwxr-xr-xchromium/third_party/WebKit/Source/build/scripts/make_css_property_names.py13
-rwxr-xr-xchromium/third_party/WebKit/Source/build/scripts/make_css_value_keywords.py11
-rwxr-xr-xchromium/third_party/WebKit/Source/build/scripts/make_element_factory.py4
-rwxr-xr-xchromium/third_party/WebKit/Source/build/scripts/make_element_lookup_trie.py102
-rwxr-xr-xchromium/third_party/WebKit/Source/build/scripts/make_element_type_helpers.py95
-rwxr-xr-x[-rw-r--r--]chromium/third_party/WebKit/Source/build/scripts/make_event_factory.py18
-rwxr-xr-xchromium/third_party/WebKit/Source/build/scripts/make_internal_runtime_flags.py16
-rwxr-xr-xchromium/third_party/WebKit/Source/build/scripts/make_media_feature_names.py19
-rwxr-xr-xchromium/third_party/WebKit/Source/build/scripts/make_media_features.py46
-rwxr-xr-xchromium/third_party/WebKit/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py93
-rwxr-xr-xchromium/third_party/WebKit/Source/build/scripts/make_names.py15
-rwxr-xr-xchromium/third_party/WebKit/Source/build/scripts/make_qualified_names.py3
-rwxr-xr-xchromium/third_party/WebKit/Source/build/scripts/make_runtime_features.py29
-rwxr-xr-xchromium/third_party/WebKit/Source/build/scripts/make_style_builder.py78
-rwxr-xr-x[-rw-r--r--]chromium/third_party/WebKit/Source/build/scripts/make_style_shorthands.py63
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/media_feature_symbol.py28
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/name_macros.py37
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/name_utilities.py34
-rwxr-xr-xchromium/third_party/WebKit/Source/build/scripts/rjsmin.py295
-rwxr-xr-x[-rw-r--r--]chromium/third_party/WebKit/Source/build/scripts/rule_bison.py7
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/scripts.gni186
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/scripts.gypi6
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/template_expander.py6
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl85
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/ElementFactory.h.tmpl21
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/ElementLookupTrie.cpp.tmpl28
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/ElementLookupTrie.h.tmpl2
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/ElementTypeHelpers.h.tmpl67
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/ElementWrapperFactory.cpp.tmpl49
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/ElementWrapperFactory.h.tmpl2
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/EventFactory.cpp.tmpl28
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/InternalRuntimeFlags.h.tmpl25
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/InternalRuntimeFlags.idl.tmpl11
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/InternalSettingsGenerated.cpp.tmpl16
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/InternalSettingsGenerated.h.tmpl15
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/InternalSettingsGenerated.idl.tmpl10
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl33
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/MakeNames.h.tmpl28
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl67
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/MakeQualifiedNames.h.tmpl20
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/MediaFeatures.h.tmpl13
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl22
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/RuntimeEnabledFeatures.h.tmpl38
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/SettingsMacros.h.tmpl30
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/StyleBuilder.cpp.tmpl93
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl700
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.h.tmpl11
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/StylePropertyShorthand.cpp.tmpl58
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/StylePropertyShorthand.h.tmpl8
-rw-r--r--chromium/third_party/WebKit/Source/build/scripts/templates/macros.tmpl48
-rw-r--r--chromium/third_party/WebKit/Source/config.gni110
-rw-r--r--chromium/third_party/WebKit/Source/config.gyp24
-rw-r--r--chromium/third_party/WebKit/Source/config.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/BUILD.gn1072
-rw-r--r--chromium/third_party/WebKit/Source/core/DEPS19
-rw-r--r--chromium/third_party/WebKit/Source/core/Init.cpp75
-rw-r--r--chromium/third_party/WebKit/Source/core/Init.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/OWNERS13
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXARIAGrid.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXARIAGrid.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXARIAGridCell.cpp1
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXARIAGridCell.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXARIAGridRow.cpp57
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXARIAGridRow.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXImageMapLink.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXImageMapLink.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXInlineTextBox.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXInlineTextBox.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXList.cpp41
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXList.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXListBox.cpp55
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXListBox.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXListBoxOption.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXListBoxOption.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXMediaControls.cpp41
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXMediaControls.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXMenuList.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXMenuList.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXMenuListOption.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXMenuListOption.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXMenuListPopup.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXMenuListPopup.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXMockObject.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXNodeObject.cpp347
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXNodeObject.h71
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXObject.cpp66
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXObject.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXObjectCache.cpp151
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXObjectCache.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXProgressIndicator.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXRenderObject.cpp324
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXRenderObject.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXSVGRoot.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXScrollView.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXScrollView.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXScrollbar.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXScrollbar.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXSlider.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXSpinButton.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXTable.cpp83
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXTable.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXTableCell.cpp1
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXTableCell.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXTableColumn.cpp1
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXTableColumn.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXTableHeaderContainer.cpp1
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXTableHeaderContainer.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXTableRow.cpp1
-rw-r--r--chromium/third_party/WebKit/Source/core/accessibility/AXTableRow.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/ActiveAnimations.cpp90
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/ActiveAnimations.h45
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableClipPathOperation.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableClipPathOperation.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableColor.cpp40
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableColor.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableColorTest.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableDouble.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableDouble.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableDoubleTest.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableFilterOperations.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableFilterOperations.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableImage.cpp49
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableImage.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableLength.cpp206
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableLength.h125
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableLengthBox.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableLengthBox.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableLengthBoxAndBool.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableLengthBoxAndBool.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableLengthPoint.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableLengthPoint.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableLengthPoint3D.cpp59
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableLengthPoint3D.h77
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableLengthSize.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableLengthSize.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableLengthTest.cpp378
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableNeutral.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableNeutralTest.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableRepeatable.cpp62
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableRepeatable.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableSVGLength.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableSVGLength.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableSVGPaint.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableSVGPaint.h40
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableShadow.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableShadow.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableShapeValue.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableShapeValue.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableStrokeDasharrayList.cpp49
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableStrokeDasharrayList.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableStrokeDasharrayListTest.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableTransform.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableTransform.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableUnknown.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableUnknownTest.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableValue.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableValue.h34
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableValueKeyframe.cpp80
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableValueKeyframe.h75
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableValueTestHelper.cpp82
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableValueTestHelper.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableValueTestHelperTest.cpp72
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableVisibility.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableVisibility.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/Animation.cpp218
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/Animation.h71
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/Animation.idl41
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationClock.cpp82
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationClock.h38
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationClockTest.cpp98
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationEffect.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationEffect.idl10
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationHelpers.h33
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationHelpersTest.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationNode.cpp195
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationNode.h171
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationNode.idl47
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationNodeTest.cpp775
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationNodeTiming.cpp180
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationNodeTiming.h46
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationPlayer.cpp460
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationPlayer.h195
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationPlayer.idl51
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationPlayerTest.cpp737
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationStack.cpp104
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationStack.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationStackTest.cpp163
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationTest.cpp467
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationTestHelper.cpp32
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationTestHelper.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationTimeline.cpp232
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationTimeline.h143
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationTimeline.idl11
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationTimelineTest.cpp293
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationTranslationUtil.cpp127
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationTranslationUtil.h49
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimationTranslationUtilTest.cpp115
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp202
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/CompositorAnimations.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/CompositorAnimationsImpl.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/CompositorAnimationsTest.cpp458
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/CompositorAnimationsTestHelper.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/CompositorAnimationsTimingFunctionReverserTest.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/CompositorPendingAnimations.cpp108
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/CompositorPendingAnimations.h64
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/DocumentAnimation.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/DocumentAnimation.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/DocumentAnimations.cpp72
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/DocumentAnimations.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/DocumentTimeline.cpp187
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/DocumentTimeline.h141
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/DocumentTimelineTest.cpp287
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/EffectInput.cpp128
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/EffectInput.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/EffectInputTest.cpp125
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/ElementAnimation.cpp142
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/ElementAnimation.h65
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/ElementAnimation.idl10
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/ElementAnimationTest.cpp208
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/InertAnimation.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/InertAnimation.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/InterpolableValue.cpp75
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/InterpolableValue.h167
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/InterpolableValueTest.cpp105
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/InterpolationEffect.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/InterpolationEffect.h66
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/InterpolationEffectTest.cpp98
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/Keyframe.h102
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/KeyframeAnimationEffect.cpp367
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/KeyframeAnimationEffect.h155
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/KeyframeAnimationEffectTest.cpp379
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp255
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/KeyframeEffectModel.h179
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/KeyframeEffectModelTest.cpp564
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/Player.cpp204
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/Player.h102
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/PlayerTest.cpp364
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/SampledEffect.cpp66
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/SampledEffect.h51
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/StringKeyframe.cpp152
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/StringKeyframe.h79
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/TimedItem.cpp148
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/TimedItem.h148
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/TimedItemCalculations.h200
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/TimedItemCalculationsTest.cpp227
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/TimedItemTest.cpp782
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/Timing.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/Timing.idl29
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/TimingCalculations.h198
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/TimingCalculationsTest.cpp214
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/TimingInput.cpp154
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/TimingInput.h32
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/TimingInputTest.cpp181
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp173
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/CSSAnimationData.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/CSSAnimationData.h61
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp726
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/CSSAnimations.h146
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/CSSPendingAnimations.cpp94
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/CSSPendingAnimations.h56
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/CSSPropertyEquality.cpp318
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/CSSPropertyEquality.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/CSSTimingData.cpp36
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/CSSTimingData.h50
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/CSSTransitionData.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/CSSTransitionData.h81
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/TransitionTimeline.cpp52
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/TransitionTimeline.h48
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/interpolation/DefaultStyleInterpolation.h46
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/interpolation/DeferredLegacyStyleInterpolation.cpp152
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/interpolation/DeferredLegacyStyleInterpolation.h53
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/interpolation/DeferredLegacyStyleInterpolationTest.cpp94
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/interpolation/Interpolation.cpp63
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/interpolation/Interpolation.h47
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/interpolation/LegacyStyleInterpolation.h48
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/interpolation/LengthStyleInterpolation.cpp109
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/interpolation/LengthStyleInterpolation.h42
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/interpolation/LengthStyleInterpolationTest.cpp119
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/interpolation/StyleInterpolation.h48
-rw-r--r--chromium/third_party/WebKit/Source/core/clipboard/Clipboard.cpp543
-rw-r--r--chromium/third_party/WebKit/Source/core/clipboard/Clipboard.h144
-rw-r--r--chromium/third_party/WebKit/Source/core/clipboard/ClipboardAccessPolicy.h (renamed from chromium/third_party/WebKit/Source/core/dom/ClipboardAccessPolicy.h)0
-rw-r--r--chromium/third_party/WebKit/Source/core/clipboard/DataObject.cpp267
-rw-r--r--chromium/third_party/WebKit/Source/core/clipboard/DataObject.h119
-rw-r--r--chromium/third_party/WebKit/Source/core/clipboard/DataObjectItem.cpp179
-rw-r--r--chromium/third_party/WebKit/Source/core/clipboard/DataObjectItem.h98
-rw-r--r--chromium/third_party/WebKit/Source/core/clipboard/DataTransfer.idl45
-rw-r--r--chromium/third_party/WebKit/Source/core/clipboard/DataTransferItem.cpp106
-rw-r--r--chromium/third_party/WebKit/Source/core/clipboard/DataTransferItem.h74
-rw-r--r--chromium/third_party/WebKit/Source/core/clipboard/DataTransferItem.idl41
-rw-r--r--chromium/third_party/WebKit/Source/core/clipboard/DataTransferItemList.cpp116
-rw-r--r--chromium/third_party/WebKit/Source/core/clipboard/DataTransferItemList.h72
-rw-r--r--chromium/third_party/WebKit/Source/core/clipboard/DataTransferItemList.idl44
-rw-r--r--chromium/third_party/WebKit/Source/core/clipboard/Pasteboard.cpp139
-rw-r--r--chromium/third_party/WebKit/Source/core/clipboard/Pasteboard.h80
-rw-r--r--chromium/third_party/WebKit/Source/core/core.gni37
-rw-r--r--chromium/third_party/WebKit/Source/core/core.gyp441
-rw-r--r--chromium/third_party/WebKit/Source/core/core.gypi1394
-rw-r--r--chromium/third_party/WebKit/Source/core/core_derived_sources.gyp662
-rw-r--r--chromium/third_party/WebKit/Source/core/core_generated.gyp828
-rw-r--r--chromium/third_party/WebKit/Source/core/core_generated.gypi9
-rw-r--r--chromium/third_party/WebKit/Source/core/css/AffectedByFocusTest.cpp316
-rw-r--r--chromium/third_party/WebKit/Source/core/css/BasicShapeFunctions.cpp237
-rw-r--r--chromium/third_party/WebKit/Source/core/css/BasicShapeFunctions.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/BinaryDataFontFaceSource.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/core/css/BinaryDataFontFaceSource.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSS.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSArrayFunctionValue.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSArrayFunctionValue.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSAspectRatioValue.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSBasicShapes.cpp427
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSBasicShapes.h240
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSBorderImage.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSBorderImage.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSBorderImageSliceValue.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSBorderImageSliceValue.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSCalculationValue.cpp345
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSCalculationValue.h53
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSCalculationValueTest.cpp196
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSCanvasValue.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSCanvasValue.h41
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSCharsetRule.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSCharsetRule.idl2
-rw-r--r--[-rwxr-xr-x]chromium/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp1142
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.h104
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSCrossfadeValue.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSCursorImageValue.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSCursorImageValue.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSCustomFontData.h31
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp175
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.h63
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFilterRule.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFilterRule.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFilterValue.cpp44
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFilterValue.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontFace.cpp232
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontFace.h62
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontFaceLoadEvent.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontFaceLoadEvent.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontFaceRule.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontFaceRule.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontFaceSource.cpp266
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontFaceSource.h71
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontFaceTest.cpp90
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontFeatureValue.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontSelector.cpp142
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontSelector.h71
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontSelectorClient.h52
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontValue.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontValue.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFunctionValue.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFunctionValue.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSGradientValue.cpp74
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSGradientValue.h92
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSGrammar.y267
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSGridLineNamesValue.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSGridLineNamesValue.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSGridTemplateAreasValue.cpp86
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSGridTemplateAreasValue.h68
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSGridTemplateValue.cpp86
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSGridTemplateValue.h63
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSGroupingRule.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSGroupingRule.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSImageGeneratorValue.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSImageGeneratorValue.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSImageSetValue.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSImageValue.cpp66
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSImageValue.h36
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSImportRule.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSImportRule.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSInheritedValue.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSInitialValue.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSKeyframeRule.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSKeyframeRule.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSKeyframesRule.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSKeyframesRule.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSLengthFunctions.cpp149
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSLengthFunctions.h42
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSLineBoxContainValue.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSMarkup.cpp189
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSMarkup.h40
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSMatrix.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSMatrix.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSMediaRule.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSMediaRule.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSMixFunctionValue.cpp61
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSMixFunctionValue.h61
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSOMUtils.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSOMUtils.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSPageRule.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSPageRule.h14
-rwxr-xr-xchromium/third_party/WebKit/Source/core/css/CSSParser-in.cpp10465
-rwxr-xr-xchromium/third_party/WebKit/Source/core/css/CSSParser.h676
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSParserMode.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSParserMode.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSParserValues.cpp76
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSParserValues.h42
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSParserValuesTest.cpp41
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp697
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h197
-rw-r--r--[-rwxr-xr-x]chromium/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h475
-rw-r--r--[-rwxr-xr-x]chromium/third_party/WebKit/Source/core/css/CSSProperties.in145
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSProperty.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSProperty.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSPropertyNames.in35
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSPropertySourceData.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSPropertySourceData.h47
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSReflectValue.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSReflectValue.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSRegionRule.cpp61
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSRegionRule.h55
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSRule.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSRule.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSRule.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSRuleList.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSRuleList.h71
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSRuleList.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSSVGDocumentValue.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSSVGDocumentValue.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSSegmentedFontFace.cpp151
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSSegmentedFontFace.h45
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSSegmentedFontFaceCache.cpp208
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSSegmentedFontFaceCache.h71
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSSelector.cpp391
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSSelector.h156
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSSelectorList.cpp41
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSSelectorList.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSSelectorTest.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSShaderValue.cpp104
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSShaderValue.h72
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSShadowValue.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSShadowValue.h40
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSShorthands.in2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSStyleDeclaration.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSStyleDeclaration.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSStyleDeclaration.idl14
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSStyleRule.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSStyleRule.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp222
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSStyleSheet.h70
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSStyleSheet.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSSupportsRule.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSTestHelper.cpp70
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSTestHelper.h63
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSTimingFunctionValue.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSTimingFunctionValue.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSToLengthConversionData.cpp56
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSToLengthConversionData.h33
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSTokenizer-in.cpp174
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSTokenizer.h41
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSTransformValue.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSTransformValue.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSUnicodeRangeValue.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSUnknownRule.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSValue.cpp302
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSValue.h52
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSValue.idl1
-rw-r--r--[-rwxr-xr-x]chromium/third_party/WebKit/Source/core/css/CSSValueKeywords.in244
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSValueList.cpp59
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSValueList.h35
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSValuePool.cpp77
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSValuePool.h62
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSVariableValue.h66
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSVariablesIterator.h49
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSVariablesMap.cpp121
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSVariablesMap.h77
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSVariablesMap.idl36
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSVariablesMapForEachCallback.h48
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSVariablesMapForEachCallback.idl31
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSViewportRule.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSViewportRule.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/css/Counter.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/core/css/Counter.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/css/Counter.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/css/DOMWindowCSS.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/css/DOMWindowCSS.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/css/DocumentFontFaceSet.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/DocumentFontFaceSet.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/css/DocumentFontFaceSet.idl6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/DragUpdateTest.cpp69
-rw-r--r--chromium/third_party/WebKit/Source/core/css/ElementRuleCollector.cpp161
-rw-r--r--chromium/third_party/WebKit/Source/core/css/ElementRuleCollector.h87
-rw-r--r--chromium/third_party/WebKit/Source/core/css/FontFace.cpp393
-rw-r--r--chromium/third_party/WebKit/Source/core/css/FontFace.h81
-rw-r--r--chromium/third_party/WebKit/Source/core/css/FontFace.idl29
-rw-r--r--chromium/third_party/WebKit/Source/core/css/FontFaceCache.cpp225
-rw-r--r--chromium/third_party/WebKit/Source/core/css/FontFaceCache.h85
-rw-r--r--chromium/third_party/WebKit/Source/core/css/FontFaceSet.cpp421
-rw-r--r--chromium/third_party/WebKit/Source/core/css/FontFaceSet.h63
-rw-r--r--chromium/third_party/WebKit/Source/core/css/FontFaceSet.idl16
-rw-r--r--chromium/third_party/WebKit/Source/core/css/FontFaceSetForEachCallback.h45
-rw-r--r--chromium/third_party/WebKit/Source/core/css/FontFaceSetForEachCallback.idl34
-rw-r--r--chromium/third_party/WebKit/Source/core/css/FontLoader.cpp95
-rw-r--r--chromium/third_party/WebKit/Source/core/css/FontLoader.h51
-rw-r--r--chromium/third_party/WebKit/Source/core/css/FontSize.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/HashTools.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/InspectorCSSOMWrappers.cpp125
-rw-r--r--chromium/third_party/WebKit/Source/core/css/InspectorCSSOMWrappers.h61
-rw-r--r--chromium/third_party/WebKit/Source/core/css/LocalFontFaceSource.cpp36
-rw-r--r--chromium/third_party/WebKit/Source/core/css/LocalFontFaceSource.h36
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaFeatureNames.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaFeatureNames.h87
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaFeatureNames.in42
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaList.cpp104
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaList.h50
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaList.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaQuery.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaQuery.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp440
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaQueryEvaluator.h67
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaQueryEvaluatorTest.cpp102
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaQueryExp.cpp301
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaQueryExp.h73
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaQueryList.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaQueryList.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaQueryList.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaQueryListListener.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaQueryListListener.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaQueryMatcher.cpp57
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaQueryMatcher.h32
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaQuerySetTest.cpp171
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaTypeNames.in15
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaValues.cpp206
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaValues.h88
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaValuesCached.cpp169
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaValuesCached.h85
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaValuesDynamic.cpp132
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaValuesDynamic.h49
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaValuesTest.cpp61
-rw-r--r--chromium/third_party/WebKit/Source/core/css/PageRuleCollector.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/css/PageRuleCollector.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/css/Pair.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/css/Pair.h35
-rw-r--r--chromium/third_party/WebKit/Source/core/css/PropertySetCSSStyleDeclaration.cpp234
-rw-r--r--chromium/third_party/WebKit/Source/core/css/PropertySetCSSStyleDeclaration.h109
-rw-r--r--chromium/third_party/WebKit/Source/core/css/RGBColor.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/core/css/RGBColor.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/css/RGBColor.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/css/Rect.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/core/css/Rect.h77
-rw-r--r--chromium/third_party/WebKit/Source/core/css/Rect.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp193
-rw-r--r--chromium/third_party/WebKit/Source/core/css/RemoteFontFaceSource.h70
-rw-r--r--chromium/third_party/WebKit/Source/core/css/RuleFeature.cpp513
-rw-r--r--chromium/third_party/WebKit/Source/core/css/RuleFeature.h156
-rw-r--r--chromium/third_party/WebKit/Source/core/css/RuleSet.cpp340
-rw-r--r--chromium/third_party/WebKit/Source/core/css/RuleSet.h126
-rw-r--r--chromium/third_party/WebKit/Source/core/css/RuleSetTest.cpp139
-rw-r--r--chromium/third_party/WebKit/Source/core/css/RuntimeCSSEnabled.cpp64
-rw-r--r--chromium/third_party/WebKit/Source/core/css/RuntimeCSSEnabled.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/SVGCSSComputedStyleDeclaration.cpp63
-rw-r--r--chromium/third_party/WebKit/Source/core/css/SVGCSSParser.cpp427
-rw-r--r--chromium/third_party/WebKit/Source/core/css/SVGCSSPropertyNames.in2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/SVGCSSValueKeywords.in1
-rw-r--r--chromium/third_party/WebKit/Source/core/css/SelectorChecker.cpp396
-rw-r--r--chromium/third_party/WebKit/Source/core/css/SelectorChecker.h49
-rw-r--r--chromium/third_party/WebKit/Source/core/css/SelectorCheckerFastPath.cpp224
-rw-r--r--chromium/third_party/WebKit/Source/core/css/SelectorCheckerFastPath.h64
-rw-r--r--chromium/third_party/WebKit/Source/core/css/SelectorFilter.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/core/css/SelectorFilter.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/SiblingTraversalStrategies.h91
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleColor.h65
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleInvalidationAnalysis.cpp218
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleInvalidationAnalysis.h58
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleMedia.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleMedia.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleMedia.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp323
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StylePropertySerializer.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StylePropertySet.cpp318
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StylePropertySet.h97
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StylePropertyShorthandCustom.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleRule.cpp162
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleRule.h134
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleRuleImport.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleRuleImport.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleSheet.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleSheet.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleSheetContents.cpp287
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleSheetContents.h67
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleSheetList.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleSheetList.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleSheetList.idl10
-rw-r--r--chromium/third_party/WebKit/Source/core/css/TreeBoundaryCrossingRules.cpp76
-rw-r--r--chromium/third_party/WebKit/Source/core/css/TreeBoundaryCrossingRules.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/css/WebKitCSSFilterValue.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/css/WebKitCSSMatrix.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/css/WebKitCSSMixFunctionValue.idl34
-rw-r--r--chromium/third_party/WebKit/Source/core/css/WebKitCSSRegionRule.idl36
-rw-r--r--chromium/third_party/WebKit/Source/core/css/WebKitCSSTransformValue.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/fullscreen.css1
-rw-r--r--chromium/third_party/WebKit/Source/core/css/html.css84
-rw-r--r--chromium/third_party/WebKit/Source/core/css/invalidation/DescendantInvalidationSet.cpp196
-rw-r--r--chromium/third_party/WebKit/Source/core/css/invalidation/DescendantInvalidationSet.h103
-rw-r--r--chromium/third_party/WebKit/Source/core/css/invalidation/DescendantInvalidationSetTest.cpp64
-rw-r--r--chromium/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp167
-rw-r--r--chromium/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.h96
-rw-r--r--chromium/third_party/WebKit/Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp216
-rw-r--r--chromium/third_party/WebKit/Source/core/css/invalidation/StyleSheetInvalidationAnalysis.h59
-rwxr-xr-xchromium/third_party/WebKit/Source/core/css/make-css-file-arrays.pl6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/mathml.css49
-rw-r--r--chromium/third_party/WebKit/Source/core/css/mediaControls.css74
-rw-r--r--chromium/third_party/WebKit/Source/core/css/mediaControlsAndroid.css34
-rw-r--r--chromium/third_party/WebKit/Source/core/css/navigationTransitions.css13
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/BisonCSSParser-in.cpp2119
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/BisonCSSParser.h327
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/BisonCSSParserTest.cpp67
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/CSSParserIdioms.h47
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/CSSParserObserver.h69
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp8435
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h410
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/MediaConditionTest.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/MediaQueryBlockWatcher.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/MediaQueryBlockWatcher.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/MediaQueryInputStream.cpp66
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/MediaQueryInputStream.h57
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/MediaQueryParser.cpp265
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/MediaQueryParser.h107
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/MediaQueryToken.cpp129
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/MediaQueryToken.h88
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/MediaQueryTokenizer.cpp527
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/MediaQueryTokenizer.h85
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/MediaQueryTokenizerTest.cpp173
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/SizesAttributeParser.cpp141
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/SizesAttributeParser.h44
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/SizesAttributeParserTest.cpp82
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/SizesCalcParser.cpp214
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/SizesCalcParser.h59
-rw-r--r--chromium/third_party/WebKit/Source/core/css/parser/SizesCalcParserTest.cpp136
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp152
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp245
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/ElementResolveContext.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/ElementResolveContext.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/FilterOperationResolver.cpp304
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/FilterOperationResolver.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp164
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/FontBuilder.h41
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/FontBuilderTest.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/MatchRequest.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/MatchResult.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/MatchedPropertiesCache.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/MatchedPropertiesCache.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/MediaQueryResult.h26
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp65
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/ScopedStyleTree.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp79
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp412
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleBuilder.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp314
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h23
-rw-r--r--[-rwxr-xr-x]chromium/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp1908
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp890
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleResolver.h142
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleResolverIncludes.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleResolverParentScope.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleResolverParentScope.h78
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleResolverState.cpp41
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleResolverState.h60
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleResourceLoader.cpp104
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleResourceLoader.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/TransformBuilder.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.cpp78
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/css/svg.css11
-rw-r--r--chromium/third_party/WebKit/Source/core/css/themeChromium.css2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/themeChromiumAndroid.css17
-rw-r--r--chromium/third_party/WebKit/Source/core/css/themeMac.css20
-rw-r--r--chromium/third_party/WebKit/Source/core/css/themeWin.css1
-rw-r--r--chromium/third_party/WebKit/Source/core/css/view-source.css5
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ActiveDOMObject.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ActiveDOMObject.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ActiveDOMObjectTest.cpp107
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Attr.cpp115
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Attr.h40
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Attr.idl16
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/CDATASection.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/CDATASection.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/CSSSelectorWatch.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/CharacterData.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/CharacterData.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ChildFrameDisconnector.cpp106
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ChildFrameDisconnector.h42
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ChildListMutationScope.cpp68
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ChildListMutationScope.h64
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ChildNode.h33
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ChildNode.idl7
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ChildNodeList.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ChildNodeList.h41
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ClassCollection.cpp52
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ClassCollection.h77
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ClassNodeList.cpp55
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ClassNodeList.h75
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ClientRect.h48
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ClientRect.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ClientRectList.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ClientRectList.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ClientRectList.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Clipboard.cpp525
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Clipboard.h140
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Clipboard.idl43
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Comment.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Comment.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Comment.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ContainerNode.cpp536
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ContainerNode.h262
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ContainerNodeAlgorithms.cpp158
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ContainerNodeAlgorithms.h240
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ContextFeatures.cpp36
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ContextFeatures.h38
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/CrossThreadTask.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMError.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMError.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMException.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMException.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMException.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMImplementation.cpp134
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMImplementation.h48
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMImplementation.idl18
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMImplementationTest.cpp98
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMNamedFlowCollection.cpp90
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMNamedFlowCollection.h68
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMSettableTokenList.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMSettableTokenList.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMSettableTokenList.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMStringList.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMStringList.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMStringMap.h31
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMStringMap.idl18
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMTokenList.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMTokenList.h26
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMTokenList.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMURL.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMURL.h26
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMURLUtils.cpp96
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMURLUtils.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMURLUtilsReadOnly.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DOMURLUtilsReadOnly.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DataTransferItem.cpp99
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DataTransferItem.h71
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DataTransferItem.idl40
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DataTransferItemList.cpp110
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DataTransferItemList.h69
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DataTransferItemList.idl40
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DatasetDOMStringMap.cpp88
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DatasetDOMStringMap.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DecodedDataDocumentParser.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DecodedDataDocumentParser.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Document.cpp2925
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Document.h765
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Document.idl83
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentEncodingData.cpp56
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentEncodingData.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentFragment.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentFragment.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentFragment.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentFullscreen.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentFullscreen.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentFullscreen.idl15
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentInit.cpp72
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentInit.h39
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp118
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentLifecycle.h110
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentLifecycleNotifier.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentLifecycleObserver.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentMarker.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentMarker.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentMarkerController.cpp104
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentMarkerController.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentMarkerControllerTest.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentOrderedList.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentOrderedMap.cpp136
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentOrderedMap.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentParser.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentParser.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentSharedObjectPool.cpp102
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentSharedObjectPool.h56
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.cpp167
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollector.cpp72
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollector.h80
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentSupplementable.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentTest.cpp207
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentType.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentType.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentType.idl7
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Element.cpp1778
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Element.h382
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Element.idl107
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ElementData.cpp59
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ElementData.h148
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ElementDataCache.cpp70
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ElementDataCache.h59
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ElementRareData.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ElementRareData.h202
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ElementTraversal.h302
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/EmptyNodeList.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/EmptyNodeList.h68
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Entity.h36
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Entity.idl25
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ExceptionCode.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ExecutionContext.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ExecutionContext.h43
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ExecutionContextClient.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ExecutionContextTask.cpp38
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ExecutionContextTask.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/FullscreenElementStack.cpp168
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/FullscreenElementStack.h45
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/GlobalEventHandlers.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/GlobalEventHandlers.idl53
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/IconURL.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/IconURL.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/IdTargetObserver.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/IdTargetObserver.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/IdTargetObserverRegistry.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/IdTargetObserverRegistry.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/IncrementLoadEventDelayCount.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/IncrementLoadEventDelayCount.h33
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/LiveNodeList.cpp72
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/LiveNodeList.h193
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/LiveNodeListBase.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/LiveNodeListBase.h198
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MainThreadTaskRunner.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MainThreadTaskRunnerTest.cpp53
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MessageChannel.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MessageChannel.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MessageChannel.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MessagePort.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MessagePort.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MessagePort.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Microtask.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Microtask.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MutationCallback.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MutationObserver.cpp119
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MutationObserver.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MutationObserver.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MutationObserverInterestGroup.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MutationObserverInterestGroup.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MutationObserverRegistration.cpp45
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MutationObserverRegistration.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MutationRecord.cpp82
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MutationRecord.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/MutationRecord.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NameNodeList.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NameNodeList.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NamedFlow.cpp249
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NamedFlow.h93
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NamedFlowCollection.cpp131
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NamedFlowCollection.h75
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NamedNodeMap.cpp45
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NamedNodeMap.h32
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NamedNodeMap.idl22
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NamedNodesCollection.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NamedNodesCollection.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NoEventDispatchAssertion.h76
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Node.cpp871
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Node.h364
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Node.idl33
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeFilter.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeFilter.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeFilter.idl6
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeFilterCondition.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeFilterCondition.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeIterator.cpp53
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeIterator.h39
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeIterator.idl14
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeIteratorBase.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeIteratorBase.h63
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeList.cpp57
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeList.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeList.idl8
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeRareData.cpp59
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeRareData.h283
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeRenderStyle.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeRenderingContext.cpp281
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeRenderingContext.h76
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeRenderingTraversal.cpp170
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeRenderingTraversal.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeTraversal.cpp51
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeTraversal.h106
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/NodeWithIndex.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Notation.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ParentNode.h31
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ParentNode.idl40
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/PendingScript.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/PendingScript.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Position.cpp126
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Position.h45
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/PositionIterator.cpp51
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/PositionIterator.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/PostAttachCallbacks.cpp75
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/PostAttachCallbacks.h52
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/PresentationAttributeStyle.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp199
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ProcessingInstruction.h32
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Promise.h46
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Promise.idl46
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/PseudoElement.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/PseudoElement.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/QualifiedName.cpp62
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/QualifiedName.h79
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Range.cpp657
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Range.h67
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Range.idl25
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h45
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/RangeTest.cpp144
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/RawDataDocumentParser.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/RenderTreeBuilder.cpp177
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/RenderTreeBuilder.h78
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/RenderedDocumentMarker.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/SandboxFlags.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/SandboxFlags.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ScriptForbiddenScope.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ScriptForbiddenScope.h47
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ScriptLoader.cpp80
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ScriptLoader.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ScriptRunner.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ScriptRunner.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ScriptableDocumentParser.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ScriptableDocumentParser.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ScriptedAnimationController.cpp39
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ScriptedAnimationController.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/SecurityContext.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/SecurityContext.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/SelectorQuery.cpp531
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/SelectorQuery.h69
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.cpp31
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/SpaceSplitString.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/StaticNodeList.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/StaticNodeList.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/StringCallback.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/StyleElement.cpp74
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/StyleElement.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/StyleEngine.cpp485
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/StyleEngine.h146
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp140
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/StyleSheetCandidate.h78
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/StyleSheetCollection.cpp221
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/StyleSheetCollection.h100
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/StyleSheetScopingNodeList.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TagCollection.cpp65
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TagCollection.h93
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TagNodeList.cpp68
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TagNodeList.h91
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TemplateContentDocumentFragment.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Text.cpp95
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Text.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Text.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TextLinkColors.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Touch.cpp63
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Touch.h74
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Touch.idl24
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TouchController.cpp162
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TouchController.h76
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TouchList.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TouchList.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TouchList.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TransformSource.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Traversal.cpp51
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Traversal.h58
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TreeScope.cpp247
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TreeScope.h69
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TreeScopeAdopter.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TreeScopeAdopter.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.cpp233
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.h116
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TreeScopeTest.cpp99
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TreeShared.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TreeWalker.cpp98
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TreeWalker.h34
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/TreeWalker.idl22
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/URL.idl17
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/URLUtils.idl17
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/URLUtilsReadOnly.idl10
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/UserActionElementSet.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/UserActionElementSet.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ViewportDescription.cpp121
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ViewportDescription.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/VisitedLinkState.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/WeakNodeMap.cpp104
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/WeakNodeMap.h40
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/WebKitNamedFlow.idl42
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/WebKitNamedFlowCollection.idl39
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/WheelController.cpp121
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/WheelController.h63
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/XMLDocument.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/XMLDocument.h59
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/XMLDocument.idl27
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElement.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementAsyncImportMicrotaskQueue.cpp55
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementAsyncImportMicrotaskQueue.h53
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementBaseElementQueue.cpp64
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementBaseElementQueue.h58
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackDispatcher.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackDispatcher.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackInvocation.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackInvocation.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackQueue.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackQueue.h32
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackScheduler.cpp121
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackScheduler.h71
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementDescriptor.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementException.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementLifecycleCallbacks.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp134
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskDispatcher.h70
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskImportStep.cpp105
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskImportStep.h89
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskQueueBase.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskQueueBase.h43
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskResolutionStep.cpp76
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskResolutionStep.h71
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskStep.h61
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskStepDispatcher.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskStepDispatcher.h40
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementObserver.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementObserver.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementProcessingStep.h52
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementRegistrationContext.cpp73
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementRegistrationContext.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementScheduler.cpp155
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementScheduler.h86
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementSyncMicrotaskQueue.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementSyncMicrotaskQueue.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeCandidateMap.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/ComposedTreeWalker.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/ComposedTreeWalker.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/ContentDistribution.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/ContentDistribution.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp137
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/ElementShadow.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp60
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/SelectRuleFeatureSet.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/SelectRuleFeatureSet.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp151
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h55
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.idl23
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/ShadowRootRareData.h35
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/AppendNodeCommand.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/AppendNodeCommand.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/ApplyBlockElementCommand.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/ApplyBlockElementCommand.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/ApplyStyleCommand.cpp317
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/ApplyStyleCommand.h53
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/BreakBlockquoteCommand.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/BreakBlockquoteCommand.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/Caret.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/Caret.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/CompositeEditCommand.cpp404
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/CompositeEditCommand.h111
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/CompositionUnderline.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/CompositionUnderlineRangeFilter.cpp39
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/CompositionUnderlineRangeFilter.h78
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/CompositionUnderlineRangeFilterTest.cpp90
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/CreateLinkCommand.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/CreateLinkCommand.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/DeleteFromTextNodeCommand.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/DeleteFromTextNodeCommand.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/DeleteSelectionCommand.cpp175
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/DeleteSelectionCommand.h47
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/EditCommand.cpp50
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/EditCommand.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/EditingBehavior.cpp267
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/EditingBehavior.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/EditingStyle.cpp337
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/EditingStyle.h50
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/Editor.cpp376
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/Editor.h52
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/EditorCommand.cpp789
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/EditorKeyBindings.cpp243
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/FormatBlockCommand.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/FormatBlockCommand.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/FrameSelection.cpp257
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/FrameSelection.h65
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/HTMLInterchange.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/HTMLInterchange.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/IndentOutdentCommand.cpp71
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/IndentOutdentCommand.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/InputMethodController.cpp69
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/InputMethodController.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/InsertIntoTextNodeCommand.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/InsertIntoTextNodeCommand.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/InsertLineBreakCommand.cpp45
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/InsertLineBreakCommand.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/InsertListCommand.cpp118
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/InsertListCommand.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/InsertNodeBeforeCommand.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/InsertNodeBeforeCommand.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/InsertParagraphSeparatorCommand.cpp55
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/InsertParagraphSeparatorCommand.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/InsertTextCommand.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/InsertTextCommand.h29
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/MarkupAccumulator.cpp377
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/MarkupAccumulator.h71
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/MergeIdenticalElementsCommand.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/MergeIdenticalElementsCommand.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/ModifySelectionListLevel.cpp293
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/ModifySelectionListLevel.h92
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/MoveSelectionCommand.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/MoveSelectionCommand.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/PlainTextRange.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/PlainTextRange.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/RemoveCSSPropertyCommand.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/RemoveCSSPropertyCommand.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/RemoveFormatCommand.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/RemoveFormatCommand.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/RemoveNodeCommand.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/RemoveNodeCommand.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/RemoveNodePreservingChildrenCommand.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/RemoveNodePreservingChildrenCommand.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/RenderedPosition.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/RenderedPosition.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/ReplaceNodeWithSpanCommand.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/ReplaceNodeWithSpanCommand.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/ReplaceSelectionCommand.cpp274
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/ReplaceSelectionCommand.h34
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SetNodeAttributeCommand.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SetNodeAttributeCommand.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SetSelectionCommand.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SetSelectionCommand.h53
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SimplifyMarkupCommand.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SimplifyMarkupCommand.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SpellCheckRequester.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SpellCheckRequester.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SpellChecker.cpp156
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SpellChecker.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SpellingCorrectionCommand.cpp60
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SpellingCorrectionCommand.h53
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SplitElementCommand.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SplitElementCommand.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SplitTextNodeCommand.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SplitTextNodeCommand.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SplitTextNodeContainingElementCommand.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SplitTextNodeContainingElementCommand.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SurroundingText.cpp68
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SurroundingText.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/SurroundingTextTest.cpp264
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/TextCheckingHelper.cpp62
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/TextCheckingHelper.h33
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/TextGranularity.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/TextInsertionBaseCommand.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/TextInsertionBaseCommand.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/TextIterator.cpp368
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/TextIterator.h82
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/TextIteratorTest.cpp148
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/TypingCommand.cpp105
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/TypingCommand.h34
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/UndoStack.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/UndoStack.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/UndoStep.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/UnlinkCommand.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/VisiblePosition.cpp73
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/VisiblePosition.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/VisibleSelection.cpp166
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/VisibleSelection.h44
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp171
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/VisibleUnits.cpp138
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/VisibleUnits.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/WrapContentsInDummySpanCommand.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/WrapContentsInDummySpanCommand.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/htmlediting.cpp261
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/htmlediting.h53
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/markup.cpp387
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/markup.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/events/AnimationPlayerEvent.cpp63
-rw-r--r--chromium/third_party/WebKit/Source/core/events/AnimationPlayerEvent.h54
-rw-r--r--chromium/third_party/WebKit/Source/core/events/AnimationPlayerEvent.idl12
-rw-r--r--chromium/third_party/WebKit/Source/core/events/ApplicationCacheErrorEvent.cpp82
-rw-r--r--chromium/third_party/WebKit/Source/core/events/ApplicationCacheErrorEvent.h66
-rw-r--r--chromium/third_party/WebKit/Source/core/events/ApplicationCacheErrorEvent.idl12
-rw-r--r--chromium/third_party/WebKit/Source/core/events/AutocompleteErrorEvent.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/events/BeforeLoadEvent.h89
-rw-r--r--chromium/third_party/WebKit/Source/core/events/BeforeLoadEvent.idl32
-rw-r--r--chromium/third_party/WebKit/Source/core/events/BeforeTextInsertedEvent.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/events/BeforeTextInsertedEvent.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/events/BeforeUnloadEvent.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/events/BeforeUnloadEvent.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/events/ClipboardEvent.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/events/ClipboardEvent.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/events/CompositionEvent.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/core/events/CompositionEvent.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/events/CompositionEvent.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/events/CustomEvent.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/events/CustomEvent.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/events/DOMWindowEventQueue.cpp55
-rw-r--r--chromium/third_party/WebKit/Source/core/events/DOMWindowEventQueue.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/events/ErrorEvent.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/events/ErrorEvent.h26
-rw-r--r--chromium/third_party/WebKit/Source/core/events/Event.cpp74
-rw-r--r--chromium/third_party/WebKit/Source/core/events/Event.h63
-rw-r--r--chromium/third_party/WebKit/Source/core/events/Event.idl13
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventAliases.in2
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventContext.cpp100
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventContext.h117
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventDispatchMediator.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventDispatchMediator.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventDispatcher.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventDispatcher.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventFactory.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventListener.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventListenerMap.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventPath.cpp305
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventPath.h58
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventQueue.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventRetargeter.cpp187
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventRetargeter.h64
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventSender.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventTarget.cpp98
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventTarget.h130
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventTarget.idl11
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventTargetFactory.in34
-rw-r--r--chromium/third_party/WebKit/Source/core/events/EventTypeNames.in19
-rw-r--r--chromium/third_party/WebKit/Source/core/events/FocusEvent.cpp44
-rw-r--r--chromium/third_party/WebKit/Source/core/events/FocusEvent.h50
-rw-r--r--chromium/third_party/WebKit/Source/core/events/GenericEventQueue.cpp38
-rw-r--r--chromium/third_party/WebKit/Source/core/events/GenericEventQueue.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/events/GestureEvent.cpp38
-rw-r--r--chromium/third_party/WebKit/Source/core/events/GestureEvent.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/events/HashChangeEvent.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/events/KeyboardEvent.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/events/KeyboardEvent.h36
-rw-r--r--chromium/third_party/WebKit/Source/core/events/MessageEvent.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/events/MessageEvent.h60
-rw-r--r--chromium/third_party/WebKit/Source/core/events/MessageEvent.idl17
-rw-r--r--chromium/third_party/WebKit/Source/core/events/MouseEvent.cpp86
-rw-r--r--chromium/third_party/WebKit/Source/core/events/MouseEvent.h60
-rw-r--r--chromium/third_party/WebKit/Source/core/events/MouseEvent.idl8
-rw-r--r--chromium/third_party/WebKit/Source/core/events/MouseRelatedEvent.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/core/events/MouseRelatedEvent.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/events/MutationEvent.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/events/MutationEvent.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/events/NavigatorEvents.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/events/NavigatorEvents.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/events/NavigatorEvents.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/events/NodeEventContext.cpp72
-rw-r--r--chromium/third_party/WebKit/Source/core/events/NodeEventContext.h70
-rw-r--r--chromium/third_party/WebKit/Source/core/events/OverflowEvent.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/events/OverflowEvent.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/events/PageTransitionEvent.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/events/PageTransitionEvent.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/events/PopStateEvent.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/core/events/PopStateEvent.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/events/ProgressEvent.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/events/ProgressEvent.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/events/ResourceProgressEvent.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/events/ResourceProgressEvent.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/events/ScopedEventQueue.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/events/ScopedEventQueue.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/events/TextEvent.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/core/events/TextEvent.h26
-rw-r--r--chromium/third_party/WebKit/Source/core/events/ThreadLocalEventNames.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/events/TouchEvent.cpp51
-rw-r--r--chromium/third_party/WebKit/Source/core/events/TouchEvent.h57
-rw-r--r--chromium/third_party/WebKit/Source/core/events/TouchEvent.idl8
-rw-r--r--chromium/third_party/WebKit/Source/core/events/TouchEventContext.cpp66
-rw-r--r--chromium/third_party/WebKit/Source/core/events/TouchEventContext.h61
-rw-r--r--chromium/third_party/WebKit/Source/core/events/TransitionEvent.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/events/TransitionEvent.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/events/TreeScopeEventContext.cpp97
-rw-r--r--chromium/third_party/WebKit/Source/core/events/TreeScopeEventContext.h120
-rw-r--r--chromium/third_party/WebKit/Source/core/events/UIEvent.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/events/UIEvent.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/events/UIEventWithKeyState.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/events/WebKitAnimationEvent.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/events/WebKitAnimationEvent.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/events/WheelEvent.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/core/events/WheelEvent.h32
-rw-r--r--chromium/third_party/WebKit/Source/core/events/WheelEvent.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/events/WindowEventContext.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/events/WindowEventContext.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp70
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/CachedMetadata.cpp36
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/CachingCorrectnessTest.cpp580
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp96
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/DocumentResource.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/DocumentResource.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/DocumentResourceReference.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/FetchContext.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/FetchContext.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/FetchInitiatorTypeNames.in3
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/FetchRequest.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/FetchRequest.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/FontResource.cpp96
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/FontResource.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/ImageResource.cpp57
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/ImageResource.h37
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/ImageResourceClient.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp70
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/MemoryCache.cpp362
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/MemoryCache.h93
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/MemoryCacheTest.cpp82
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/MockImageResourceClient.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/RawResource.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/RawResource.h42
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/RawResourceTest.cpp105
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/Resource.cpp516
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/Resource.h127
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp579
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/ResourceFetcher.h103
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/ResourceLoadPriorityOptimizer.cpp64
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/ResourceLoadPriorityOptimizer.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp131
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/ResourceLoader.h40
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/ResourceLoaderHost.h34
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/ResourceLoaderOptions.h41
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/ScriptResource.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/ScriptResource.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/ShaderResource.cpp61
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/ShaderResource.h58
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/StyleSheetResource.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/StyleSheetResourceClient.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/TextResource.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/TextResource.h34
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/TextResourceDecoder.cpp437
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/TextResourceDecoder.h105
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/XSLStyleSheetResource.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/XSLStyleSheetResource.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/Blob.cpp76
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/Blob.h48
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/Blob.idl6
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/BlobBuilder.cpp155
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/BlobBuilder.h65
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/File.cpp78
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/File.h60
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/File.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/FileError.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/FileList.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/FileList.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/FileList.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/FileReader.cpp68
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/FileReader.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/FileReader.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp52
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/FileReaderLoader.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/FileReaderSync.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/FileReaderSync.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/FileReaderSync.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/Stream.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/fileapi/Stream.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/AdjustViewSizeOrNot.h38
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/BarProp.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/BarProp.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/BarProp.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Console.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Console.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/ConsoleBase.cpp86
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/ConsoleBase.h46
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/ConsoleBase.idl17
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/ContentSecurityPolicy.cpp2032
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/ContentSecurityPolicy.h171
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/ContentSecurityPolicyResponseHeaders.cpp41
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/ContentSecurityPolicyResponseHeaders.h54
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMPoint.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMSecurityPolicy.cpp174
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMSecurityPolicy.h72
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMTimer.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMTimer.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMWindow.cpp1890
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMWindow.h390
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMWindowBase64.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMWindowBase64.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMWindowEventHandlers.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMWindowLifecycleNotifier.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMWindowLifecycleNotifier.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMWindowLifecycleObserver.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMWindowLifecycleObserver.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMWindowProperty.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMWindowProperty.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMWindowTimers.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DOMWindowTimers.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DeprecatedScheduleStyleRecalcDuringLayout.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DeprecatedScheduleStyleRecalcDuringLayout.h26
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DeviceEventControllerBase.cpp70
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DeviceEventControllerBase.h49
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DeviceEventDispatcherBase.cpp87
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DeviceEventDispatcherBase.h37
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DeviceSingleWindowEventController.cpp73
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/DeviceSingleWindowEventController.h44
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp255
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/EventHandlerRegistry.h96
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Frame.cpp601
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Frame.h364
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/FrameClient.h29
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/FrameConsole.cpp123
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/FrameConsole.h64
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/FrameDestructionObserver.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/FrameDestructionObserver.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/FrameHost.cpp94
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/FrameHost.h92
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/FrameOwner.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/FrameView.cpp1847
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/FrameView.h333
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/GraphicsLayerDebugInfo.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/GraphicsLayerDebugInfo.h50
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/History.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/History.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/History.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/ImageBitmap.cpp105
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/ImageBitmap.h35
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/ImageBitmap.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp95
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp1946
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/LocalDOMWindow.h414
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/LocalFrame.cpp660
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/LocalFrame.h249
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Location.cpp68
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Location.h41
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Location.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Navigator.cpp73
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Navigator.h38
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Navigator.idl12
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/NavigatorBase.h43
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/NavigatorCPU.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/NavigatorCPU.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/NavigatorCPU.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/NavigatorID.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/NavigatorID.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/NavigatorID.idl8
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/NavigatorLanguage.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/NavigatorLanguage.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/NavigatorLanguage.idl10
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/NavigatorOnLine.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/NavigatorOnLine.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/PRESUBMIT.py57
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/PinchViewport.cpp453
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/PinchViewport.h165
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/RemoteFrame.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/RemoteFrame.h41
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/RemoteFrameView.cpp59
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/RemoteFrameView.h42
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Screen.cpp49
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Screen.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Screen.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/SecurityPolicy.idl45
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Settings.cpp38
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Settings.h36
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Settings.in88
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/SettingsDelegate.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/SmartClip.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/SmartClip.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/SuspendableTimer.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/SuspendableTimer.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/UseCounter.cpp254
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/UseCounter.h662
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/WebKitPoint.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Window.idl128
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/WindowBase64.idl7
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/WindowEventHandlers.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/WindowTimers.idl14
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/animation/AnimationBase.cpp585
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/animation/AnimationBase.h228
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/animation/AnimationController.cpp542
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/animation/AnimationController.h104
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/animation/AnimationControllerPrivate.h140
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/animation/CSSPropertyAnimation.cpp1153
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/animation/CSSPropertyAnimation.h54
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/animation/CompositeAnimation.cpp510
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/animation/CompositeAnimation.h96
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/animation/ImplicitAnimation.cpp283
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/animation/ImplicitAnimation.h98
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/animation/KeyframeAnimation.cpp455
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/animation/KeyframeAnimation.h102
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/csp/CSPDirective.h38
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp679
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h141
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp93
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/csp/CSPSource.h39
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/csp/CSPSourceList.cpp485
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/csp/CSPSourceList.h65
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp786
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h203
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/csp/MediaListDirective.cpp86
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/csp/MediaListDirective.h31
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp62
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h38
-rw-r--r--chromium/third_party/WebKit/Source/core/history/HistoryItem.cpp262
-rw-r--r--chromium/third_party/WebKit/Source/core/history/HistoryItem.h146
-rw-r--r--chromium/third_party/WebKit/Source/core/html/ClassList.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/ClassList.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/CollectionIndexCache.h208
-rw-r--r--chromium/third_party/WebKit/Source/core/html/CollectionType.h35
-rw-r--r--chromium/third_party/WebKit/Source/core/html/DOMFormData.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/DocumentNameCollection.cpp33
-rw-r--r--chromium/third_party/WebKit/Source/core/html/DocumentNameCollection.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/html/FormAssociatedElement.cpp165
-rw-r--r--chromium/third_party/WebKit/Source/core/html/FormAssociatedElement.h34
-rw-r--r--chromium/third_party/WebKit/Source/core/html/FormData.idl16
-rw-r--r--chromium/third_party/WebKit/Source/core/html/FormDataList.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/core/html/FormDataList.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLAllCollection.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLAllCollection.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLAllCollection.idl16
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp215
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLAnchorElement.h79
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLAnchorElement.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLAppletElement.cpp32
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLAppletElement.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLAreaElement.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLAreaElement.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLAreaElement.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLAttributeNames.in9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLAudioElement.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLAudioElement.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLAudioElement.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLBDIElement.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLBRElement.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLBRElement.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLBaseElement.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLBaseElement.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLBodyElement.cpp167
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLBodyElement.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLBodyElement.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLButtonElement.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLButtonElement.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLButtonElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp298
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLCanvasElement.h74
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLCanvasElement.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLCollection.cpp666
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLCollection.h152
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLCollection.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLContentElement.cpp131
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLContentElement.h96
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLContentElement.idl31
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDListElement.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDListElement.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDataListElement.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDataListElement.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDataListElement.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp94
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDetailsElement.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDialogElement.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDialogElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDirectoryElement.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDirectoryElement.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDivElement.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDivElement.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDocument.cpp90
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDocument.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDocument.idl26
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLElement.cpp372
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLElement.h55
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLElement.idl8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp60
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLEmbedElement.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLEmbedElement.idl6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFieldSetElement.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFieldSetElement.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFontElement.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFontElement.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp141
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFormControlElement.h66
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFormControlElementWithState.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFormControlElementWithState.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFormControlsCollection.cpp157
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFormControlsCollection.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFormControlsCollection.idl8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFormElement.cpp565
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFormElement.h98
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFormElement.idl16
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFrameElement.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFrameElement.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFrameElement.idl10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp59
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFrameElementBase.h38
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp131
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h39
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFrameSetElement.cpp96
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFrameSetElement.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFrameSetElement.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLHRElement.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLHRElement.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLHeadElement.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLHeadElement.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLHeadElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLHeadingElement.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLHeadingElement.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLHtmlElement.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLHtmlElement.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLHtmlElement.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp35
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLIFrameElement.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLIFrameElement.idl7
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImageElement.cpp349
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImageElement.h73
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImageElement.idl21
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImageLoader.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImageLoader.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImport.cpp190
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImport.h193
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImportChild.cpp174
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImportChild.h97
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImportChildClient.h45
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImportLoader.cpp181
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImportLoader.h101
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImportLoaderClient.h44
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImportResourceOwner.cpp60
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImportResourceOwner.h64
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImportsController.cpp175
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImportsController.h95
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLInputElement.cpp402
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLInputElement.h202
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLInputElement.idl21
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLKeygenElement.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLKeygenElement.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLKeygenElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLLIElement.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLLIElement.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLLabelElement.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLLegendElement.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLLegendElement.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp258
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLLinkElement.h52
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLLinkElement.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLLinkElementSizesAttributeTest.cpp77
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLMapElement.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLMapElement.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLMarqueeElement.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLMarqueeElement.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp1580
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLMediaElement.h349
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLMediaElement.idl37
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLMediaSource.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLMenuElement.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLMenuElement.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLMetaElement-in.cpp138
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLMetaElement.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLMeterElement.cpp74
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLMeterElement.h34
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLMeterElement.idl18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLModElement.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLModElement.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLModElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLNameCollection.cpp74
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLNameCollection.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLNoEmbedElement.cpp57
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLNoEmbedElement.h52
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLNoScriptElement.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLNoScriptElement.h52
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLOListElement.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLOListElement.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLObjectElement.cpp159
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLObjectElement.h44
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLObjectElement.idl6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp51
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLOptGroupElement.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp107
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLOptionElement.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLOptionElement.idl6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLOptionsCollection.cpp75
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLOptionsCollection.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLOptionsCollection.idl18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLOutputElement.cpp30
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLOutputElement.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLParagraphElement.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLParagraphElement.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLParamElement.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLParamElement.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLPictureElement.cpp31
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLPictureElement.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLPictureElement.idl10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp174
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLPlugInElement.h58
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLPreElement.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLPreElement.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLPreElement.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLProgressElement.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLProgressElement.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLProgressElement.idl15
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLQuoteElement.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLQuoteElement.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLQuoteElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLRTElement.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLRTElement.h26
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLRubyElement.cpp31
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLRubyElement.h26
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp32
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLScriptElement.h32
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLScriptElement.idl6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp399
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLSelectElement.h67
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLSelectElement.idl21
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLShadowElement.cpp83
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLShadowElement.h55
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLShadowElement.idl33
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLSourceElement.cpp62
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLSourceElement.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLSourceElement.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLSpanElement.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLSpanElement.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp163
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLStyleElement.h56
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLStyleElement.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLSummaryElement.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLSummaryElement.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTableCaptionElement.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTableCaptionElement.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTableCellElement.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTableCellElement.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTableColElement.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTableColElement.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTableElement.cpp176
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTableElement.h47
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTableElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTablePartElement.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTableRowElement.cpp80
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTableRowElement.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTableRowElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTableRowsCollection.cpp100
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTableRowsCollection.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTableSectionElement.cpp105
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTableSectionElement.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTableSectionElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTagNames.in22
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTemplateElement.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTemplateElement.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp123
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTextAreaElement.h67
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTextAreaElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp135
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.h37
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTextFormControlElementTest.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTitleElement.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTitleElement.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTrackElement.cpp76
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTrackElement.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLTrackElement.idl8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLUListElement.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLUListElement.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLUnknownElement.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp107
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLVideoElement.h45
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLVideoElement.idl14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLViewSourceDocument.cpp89
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLViewSourceDocument.h37
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLWBRElement.cpp53
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLWBRElement.h52
-rw-r--r--chromium/third_party/WebKit/Source/core/html/ImageData.cpp83
-rw-r--r--chromium/third_party/WebKit/Source/core/html/ImageData.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/html/ImageData.idl8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/ImageDocument.cpp85
-rw-r--r--chromium/third_party/WebKit/Source/core/html/ImageDocument.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/html/LabelableElement.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/html/LabelableElement.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/html/LabelsNodeList.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/html/LabelsNodeList.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/LinkImport.cpp126
-rw-r--r--chromium/third_party/WebKit/Source/core/html/LinkImport.h77
-rw-r--r--chromium/third_party/WebKit/Source/core/html/LinkManifest.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/core/html/LinkManifest.h37
-rw-r--r--chromium/third_party/WebKit/Source/core/html/LinkRelAttribute.cpp96
-rw-r--r--chromium/third_party/WebKit/Source/core/html/LinkRelAttribute.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/LinkRelAttributeTest.cpp67
-rw-r--r--chromium/third_party/WebKit/Source/core/html/LinkResource.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/core/html/LinkResource.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/html/MediaController.cpp249
-rw-r--r--chromium/third_party/WebKit/Source/core/html/MediaController.h93
-rw-r--r--chromium/third_party/WebKit/Source/core/html/MediaController.idl7
-rw-r--r--chromium/third_party/WebKit/Source/core/html/MediaControllerInterface.h89
-rw-r--r--chromium/third_party/WebKit/Source/core/html/MediaDocument.cpp45
-rw-r--r--chromium/third_party/WebKit/Source/core/html/MediaDocument.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/MediaError.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/MediaError.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/html/MediaFragmentURIParser.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/MediaKeyEvent.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/MediaKeyEvent.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/PluginDocument.cpp44
-rw-r--r--chromium/third_party/WebKit/Source/core/html/PluginDocument.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/PublicURLManager.cpp33
-rw-r--r--chromium/third_party/WebKit/Source/core/html/PublicURLManager.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/html/RadioNodeList.cpp75
-rw-r--r--chromium/third_party/WebKit/Source/core/html/RadioNodeList.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/html/RadioNodeList.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/TextDocument.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/TextDocument.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/TextMetrics.h58
-rw-r--r--chromium/third_party/WebKit/Source/core/html/TextMetrics.idl14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/TimeRanges.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/html/URLRegistry.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/html/ValidityState.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/html/ValidityState.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/html/WindowNameCollection.cpp32
-rw-r--r--chromium/third_party/WebKit/Source/core/html/WindowNameCollection.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/ANGLEInstancedArrays.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/ANGLEInstancedArrays.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/ANGLEInstancedArrays.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/Canvas2DContextAttributes.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/Canvas2DContextAttributes.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/Canvas2DContextAttributes.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/CanvasGradient.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/CanvasGradient.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/CanvasImageSource.h77
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/CanvasPathMethods.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/CanvasPathMethods.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/CanvasPathMethods.idl20
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/CanvasPattern.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp87
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h33
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.idl32
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext2D.cpp1395
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext2D.h143
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext2D.idl266
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/CanvasStyle.cpp32
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/CanvasStyle.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/DOMPath.h80
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/DataView.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/DataView.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/DataView.idl28
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/EXTBlendMinMax.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/EXTBlendMinMax.h29
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/EXTBlendMinMax.idl12
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/EXTFragDepth.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/EXTFragDepth.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/EXTShaderTextureLOD.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/EXTShaderTextureLOD.h29
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/EXTShaderTextureLOD.idl8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/EXTTextureFilterAnisotropic.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/EXTTextureFilterAnisotropic.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/OESElementIndexUint.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/OESElementIndexUint.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/OESStandardDerivatives.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/OESStandardDerivatives.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/OESTextureFloat.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/OESTextureFloat.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/OESTextureFloatLinear.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/OESTextureFloatLinear.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/OESTextureHalfFloat.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/OESTextureHalfFloat.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/OESTextureHalfFloatLinear.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/OESTextureHalfFloatLinear.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/OESVertexArrayObject.cpp36
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/OESVertexArrayObject.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/OESVertexArrayObject.idl11
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/Path.idl68
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/Path2D.h90
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/Path2D.idl41
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLActiveInfo.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLBuffer.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLBuffer.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLCompressedTextureATC.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLCompressedTextureATC.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLCompressedTextureETC1.cpp45
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLCompressedTextureETC1.h31
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLCompressedTextureETC1.idl11
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLCompressedTexturePVRTC.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLCompressedTexturePVRTC.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLCompressedTextureS3TC.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLCompressedTextureS3TC.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLContextAttributes.cpp81
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLContextAttributes.h39
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLContextEvent.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLContextEvent.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLContextGroup.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLContextGroup.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLContextObject.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLContextObject.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLDebugRendererInfo.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLDebugRendererInfo.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLDebugShaders.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLDebugShaders.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLDebugShaders.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLDepthTexture.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLDepthTexture.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLDrawBuffers.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLDrawBuffers.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLExtension.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLExtension.h35
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLExtensionName.h38
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLFramebuffer.cpp211
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLFramebuffer.h62
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLGetInfo.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLGetInfo.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLLoseContext.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLLoseContext.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLLoseContext.idl7
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLObject.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLObject.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLProgram.cpp40
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLProgram.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderbuffer.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderbuffer.h31
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderingContext.cpp5569
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderingContext.h887
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderingContext.idl641
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderingContextBase.cpp5728
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderingContextBase.h914
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderingContextBase.idl689
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLShader.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLShader.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLShaderPrecisionFormat.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLShaderPrecisionFormat.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLSharedObject.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLSharedObject.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLTexture.cpp64
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLTexture.h58
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLUniformLocation.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLUniformLocation.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLVertexArrayObjectOES.cpp35
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLVertexArrayObjectOES.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/BaseButtonInputType.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/BaseCheckableInputType.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/BaseCheckableInputType.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/BaseDateAndTimeInputType.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/BaseDateAndTimeInputType.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp76
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/BaseTextInputType.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/BaseTextInputType.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/ButtonInputType.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/ButtonInputType.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/CheckboxInputType.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/CheckboxInputType.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/CheckedRadioButtons.cpp269
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/CheckedRadioButtons.h54
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/ColorInputType.cpp73
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/ColorInputType.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/DateInputType.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/DateInputType.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/DateTimeLocalInputType.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/DateTimeLocalInputType.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp36
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/EmailInputType.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/FileInputType.cpp57
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/FileInputType.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/FormController.cpp99
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/FormController.h47
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/HiddenInputType.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/HiddenInputType.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/ImageInputType.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/ImageInputType.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/InputType.cpp216
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/InputType.h26
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/InputTypeView.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/InputTypeView.h31
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/MonthInputType.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/MonthInputType.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/NumberInputType.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/NumberInputType.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/PasswordInputType.cpp53
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/PasswordInputType.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/RadioButtonGroupScope.cpp282
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/RadioButtonGroupScope.h55
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/RadioInputType.cpp33
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/RadioInputType.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/RangeInputType.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/RangeInputType.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/ResetInputType.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/ResetInputType.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/SearchInputType.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/SearchInputType.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/StepRange.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/StepRange.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/SubmitInputType.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/SubmitInputType.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/TelephoneInputType.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/TelephoneInputType.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp144
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/TextFieldInputType.h32
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/TextInputType.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/TextInputType.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/TimeInputType.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/TimeInputType.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/TypeAhead.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/URLInputType.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/URLInputType.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/ValidationMessage.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/WeekInputType.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/forms/WeekInputType.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/ime/Composition.cpp83
-rw-r--r--chromium/third_party/WebKit/Source/core/html/ime/Composition.h63
-rw-r--r--chromium/third_party/WebKit/Source/core/html/ime/Composition.idl39
-rw-r--r--chromium/third_party/WebKit/Source/core/html/ime/InputMethodContext.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/html/ime/InputMethodContext.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/ime/InputMethodContext.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/html/imports/HTMLImport.cpp143
-rw-r--r--chromium/third_party/WebKit/Source/core/html/imports/HTMLImport.h147
-rw-r--r--chromium/third_party/WebKit/Source/core/html/imports/HTMLImportChild.cpp236
-rw-r--r--chromium/third_party/WebKit/Source/core/html/imports/HTMLImportChild.h112
-rw-r--r--chromium/third_party/WebKit/Source/core/html/imports/HTMLImportChildClient.h53
-rw-r--r--chromium/third_party/WebKit/Source/core/html/imports/HTMLImportLoader.cpp229
-rw-r--r--chromium/third_party/WebKit/Source/core/html/imports/HTMLImportLoader.h133
-rw-r--r--chromium/third_party/WebKit/Source/core/html/imports/HTMLImportState.h77
-rw-r--r--chromium/third_party/WebKit/Source/core/html/imports/HTMLImportStateResolver.cpp83
-rw-r--r--chromium/third_party/WebKit/Source/core/html/imports/HTMLImportStateResolver.h60
-rw-r--r--chromium/third_party/WebKit/Source/core/html/imports/HTMLImportTreeRoot.cpp110
-rw-r--r--chromium/third_party/WebKit/Source/core/html/imports/HTMLImportTreeRoot.h52
-rw-r--r--chromium/third_party/WebKit/Source/core/html/imports/HTMLImportsController.cpp184
-rw-r--r--chromium/third_party/WebKit/Source/core/html/imports/HTMLImportsController.h95
-rw-r--r--chromium/third_party/WebKit/Source/core/html/imports/LinkImport.cpp150
-rw-r--r--chromium/third_party/WebKit/Source/core/html/imports/LinkImport.h81
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp56
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp114
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.h58
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp224
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h68
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLElementStack.cpp106
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLElementStack.h51
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLEntityParser.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLEntitySearch.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLEntityTable.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLFormattingElementList.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLFormattingElementList.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLMetaCharsetParser.cpp100
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLMetaCharsetParser.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLParserIdioms.cpp135
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLParserIdioms.h52
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLParserOptions.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLParserThread.cpp63
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLParserThread.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLParserThreadTest.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp201
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp101
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h32
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLScriptRunnerHost.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp279
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.h81
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParserTest.cpp102
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLStackItem.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLToken.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLTokenizer.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLTokenizer.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLTokenizerNames.in8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp186
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilderSimulator.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLViewSourceParser.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLViewSourceParser.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/NestingLevelIncrementer.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/TextDocumentParser.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/TextDocumentParser.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/TextResourceDecoder.cpp439
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/TextResourceDecoder.h106
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/XSSAuditor.cpp371
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/XSSAuditor.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp8
-rwxr-xr-xchromium/third_party/WebKit/Source/core/html/parser/create-html-entity-table133
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/ClearButtonElement.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/ClearButtonElement.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp62
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.h35
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/DateTimeFieldElement.cpp51
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/DateTimeFieldElement.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/DateTimeFieldElements.cpp52
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/DateTimeFieldElements.h104
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/DateTimeNumericFieldElement.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/DateTimeNumericFieldElement.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/DetailsMarkerControl.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/DetailsMarkerControl.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/HTMLContentElement.cpp120
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/HTMLContentElement.h107
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/HTMLContentElement.idl32
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/HTMLShadowElement.cpp86
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/HTMLShadowElement.h62
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/HTMLShadowElement.idl35
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/MediaControlElementTypes.cpp128
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/MediaControlElementTypes.h84
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp411
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/MediaControlElements.h130
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp410
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/MediaControls.h137
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/MediaControlsChromium.cpp225
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/MediaControlsChromium.h65
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/MediaControlsChromiumAndroid.cpp99
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/MediaControlsChromiumAndroid.h54
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/MeterShadowElement.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/MeterShadowElement.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/PasswordGeneratorButtonElement.cpp172
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/PasswordGeneratorButtonElement.h73
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/PickerIndicatorElement.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/PickerIndicatorElement.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/ProgressShadowElement.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/ProgressShadowElement.h33
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/ShadowElementNames.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/ShadowElementNames.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/SliderThumbElement.cpp68
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/SliderThumbElement.h34
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/SpinButtonElement.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/SpinButtonElement.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/TextControlInnerElements.cpp277
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/TextControlInnerElements.h83
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/AudioTrack.cpp86
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/AudioTrack.h44
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/AudioTrack.idl15
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/AudioTrackList.cpp40
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/AudioTrackList.h31
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/AudioTrackList.idl16
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/InbandTextTrack.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/InbandTextTrack.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/LoadableTextTrack.cpp52
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/LoadableTextTrack.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TextTrack.cpp118
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TextTrack.h71
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TextTrack.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TextTrackCue.cpp38
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TextTrackCue.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TextTrackCue.idl21
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TextTrackCueList.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TextTrackCueList.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TextTrackCueList.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TextTrackList.cpp71
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TextTrackList.h40
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TextTrackList.idl6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TrackBase.cpp80
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TrackBase.h42
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TrackEvent.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TrackEvent.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TrackEvent.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/TrackListBase.h139
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/VideoTrack.cpp88
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/VideoTrack.h48
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/VideoTrack.idl15
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/VideoTrackList.cpp60
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/VideoTrackList.h33
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/VideoTrackList.idl17
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/BufferedLineReader.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.cpp357
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.h43
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTElement.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTElement.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTParser.cpp190
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTParser.h56
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTRegion.cpp149
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTRegion.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTRegion.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTRegionList.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTRegionList.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTRegionList.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTScanner.cpp171
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTScanner.h233
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTScannerTest.cpp352
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/AsyncCallStackTracker.cpp215
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/AsyncCallStackTracker.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/BUILD.gn98
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/BindingVisitors.h8
-rwxr-xr-xchromium/third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py109
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/CodeGeneratorInspectorStrings.py132
-rwxr-xr-x[-rw-r--r--]chromium/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py13
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/ConsoleMessage.cpp81
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/ConsoleMessage.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/ContentSearchUtils.cpp119
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/ContentSearchUtils.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/DOMEditor.cpp214
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/DOMEditor.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/DOMPatchSupport.cpp150
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InjectedScript.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InjectedScript.h71
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InjectedScriptBase.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InjectedScriptBase.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModule.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModule.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js557
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InjectedScriptExterns.js24
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InjectedScriptHost.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InjectedScriptHost.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InjectedScriptHost.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InjectedScriptManager.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InjectedScriptManager.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InjectedScriptModule.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js701
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorAgent.cpp169
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorAgent.h98
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorApplicationCacheAgent.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorApplicationCacheAgent.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorBaseAgent.cpp30
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorBaseAgent.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp1193
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h141
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorCanvasAgent.cpp93
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorCanvasAgent.h60
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorCanvasInstrumentation.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorClient.cpp55
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorClient.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorConsoleAgent.cpp82
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorConsoleAgent.h44
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorConsoleInstrumentation.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorController.cpp237
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorController.h61
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorCounters.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp563
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h164
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp135
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.h55
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorDOMStorageAgent.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorDOMStorageAgent.h34
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorDatabaseAgent.cpp334
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorDatabaseAgent.h87
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorDatabaseInstrumentation.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorDatabaseResource.cpp65
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorDatabaseResource.h65
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorDebuggerAgent.cpp375
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorDebuggerAgent.h149
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorFileSystemAgent.cpp729
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorFileSystemAgent.h72
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorFrontendChannel.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorFrontendClient.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorFrontendHost.cpp86
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorFrontendHost.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorFrontendHost.idl7
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.cpp175
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.h39
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorHistory.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorHistory.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorIndexedDBAgent.cpp773
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorIndexedDBAgent.h73
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorInputAgent.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorInspectorAgent.cpp161
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorInspectorAgent.h98
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp35
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl193
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorInstrumentationCustomInl.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp235
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.h55
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorNodeIds.cpp35
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorNodeIds.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorOverlay.cpp336
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorOverlay.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorOverlayHost.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorOverlayPage.html80
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp509
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorPageAgent.h169
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.cpp72
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.h34
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp195
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.h81
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp134
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.h47
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp81
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.h48
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorState.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp1072
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.h205
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorStyleTextEditor.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorStyleTextEditor.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorTimelineAgent.cpp540
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorTimelineAgent.h157
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp334
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.h144
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorTracingAgent.cpp64
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorTracingAgent.h50
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorWorkerAgent.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorWorkerAgent.h29
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InstrumentingAgents.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/JSONParser.cpp36
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/JavaScriptCallFrame.cpp73
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/JavaScriptCallFrame.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/JavaScriptCallFrame.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/NetworkResourcesData.cpp44
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/NetworkResourcesData.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/PageConsoleAgent.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/PageConsoleAgent.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/PageDebuggerAgent.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/PageDebuggerAgent.h36
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/PageRuntimeAgent.cpp110
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/PageRuntimeAgent.h29
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/ScriptArguments.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/ScriptArguments.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/ScriptCallFrame.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/ScriptCallFrame.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/ScriptCallStack.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/ScriptCallStack.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/ScriptDebugListener.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/ScriptProfile.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/ScriptProfile.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/TimelineRecordFactory.cpp91
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/TimelineRecordFactory.h156
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/TraceEventDispatcher.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/TraceEventDispatcher.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/WorkerConsoleAgent.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/WorkerConsoleAgent.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/WorkerDebuggerAgent.cpp32
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/WorkerDebuggerAgent.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/WorkerRuntimeAgent.cpp39
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/WorkerRuntimeAgent.h20
-rwxr-xr-xchromium/third_party/WebKit/Source/core/inspector/combine-javascript-resources.pl81
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/BeaconLoader.cpp130
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/BeaconLoader.h43
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/CookieJar.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/CrossOriginPreflightResultCache.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/CrossOriginPreflightResultCache.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/DocumentLoadTiming.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/DocumentLoader.cpp332
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h96
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp293
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h88
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/DocumentThreadableLoaderClient.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/DocumentWriter.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/DocumentWriter.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/EmptyClients.cpp52
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/EmptyClients.h137
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FormState.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FormState.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FormSubmission.cpp73
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FormSubmission.h43
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp82
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FrameFetchContext.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FrameLoadRequest.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FrameLoader.cpp981
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FrameLoader.h106
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FrameLoaderClient.h90
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FrameLoaderStateMachine.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FrameLoaderStateMachine.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FrameLoaderTypes.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/HistoryController.cpp347
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/HistoryController.h180
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/HistoryItem.cpp217
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/HistoryItem.h138
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/ImageLoader.cpp270
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/ImageLoader.h77
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/LinkLoader.cpp33
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/LinkLoader.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp38
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/MixedContentChecker.h39
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/NavigationAction.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/NavigationAction.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/NavigationPolicy.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/NavigationPolicy.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/NavigationScheduler.cpp82
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/NavigationScheduler.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/PingLoader.cpp140
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/PingLoader.h50
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/PrerenderHandle.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/PrerenderHandle.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/PrerendererClient.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/PrerendererClient.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/ProgressTracker.cpp77
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/ProgressTracker.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/SinkDocument.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/SinkDocument.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/SubstituteData.h54
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/TextResourceDecoderBuilder.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/TextResourceDecoderBuilder.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/TextTrackLoader.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/TextTrackLoader.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/ThreadableLoader.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/ThreadableLoader.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/ThreadableLoaderClient.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/ThreadableLoaderClientWrapper.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/WorkerLoaderClientBridge.cpp162
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/WorkerLoaderClientBridge.h73
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/WorkerLoaderClientBridgeSyncHelper.cpp146
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/WorkerLoaderClientBridgeSyncHelper.h79
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp156
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.h37
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/appcache/ApplicationCache.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/appcache/ApplicationCache.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/appcache/ApplicationCache.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp280
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.h40
-rw-r--r--chromium/third_party/WebKit/Source/core/make_core_derived_sources.xml68
-rw-r--r--chromium/third_party/WebKit/Source/core/page/AutoscrollController.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/page/AutoscrollController.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/page/Chrome.cpp86
-rw-r--r--chromium/third_party/WebKit/Source/core/page/Chrome.h41
-rw-r--r--chromium/third_party/WebKit/Source/core/page/ChromeClient.h108
-rw-r--r--chromium/third_party/WebKit/Source/core/page/ContextMenuController.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/page/CreateWindow.cpp93
-rw-r--r--chromium/third_party/WebKit/Source/core/page/CreateWindow.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DOMSelection.cpp138
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DOMSelection.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DOMWindowPagePopup.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DOMWindowPagePopup.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DragActions.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DragClient.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DragController.cpp163
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DragController.h32
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DragData.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DragData.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DragState.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/page/EditorClient.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/page/EventHandler.cpp1296
-rw-r--r--chromium/third_party/WebKit/Source/core/page/EventHandler.h118
-rw-r--r--chromium/third_party/WebKit/Source/core/page/EventSource.cpp74
-rw-r--r--chromium/third_party/WebKit/Source/core/page/EventSource.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/page/EventSource.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/page/FocusController.cpp394
-rw-r--r--chromium/third_party/WebKit/Source/core/page/FocusController.h38
-rw-r--r--chromium/third_party/WebKit/Source/core/page/FocusDirection.h49
-rw-r--r--chromium/third_party/WebKit/Source/core/page/FocusType.h50
-rw-r--r--chromium/third_party/WebKit/Source/core/page/FrameTree.cpp155
-rw-r--r--chromium/third_party/WebKit/Source/core/page/FrameTree.h116
-rw-r--r--chromium/third_party/WebKit/Source/core/page/InjectedStyleSheet.h60
-rw-r--r--chromium/third_party/WebKit/Source/core/page/InjectedStyleSheets.cpp65
-rw-r--r--chromium/third_party/WebKit/Source/core/page/InjectedStyleSheets.h77
-rw-r--r--chromium/third_party/WebKit/Source/core/page/NetworkStateNotifier.cpp122
-rw-r--r--chromium/third_party/WebKit/Source/core/page/NetworkStateNotifier.h68
-rw-r--r--chromium/third_party/WebKit/Source/core/page/NetworkStateNotifierTest.cpp280
-rw-r--r--chromium/third_party/WebKit/Source/core/page/Page.cpp418
-rw-r--r--chromium/third_party/WebKit/Source/core/page/Page.h146
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PageAnimator.cpp82
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PageAnimator.h32
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PageConsole.cpp123
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PageConsole.h62
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PageGroup.cpp88
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PageGroup.h78
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PageGroupLoadDeferrer.cpp77
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PageGroupLoadDeferrer.h42
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PageLifecycleNotifier.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PageLifecycleObserver.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PagePopupClient.cpp80
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PagePopupClient.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PagePopupController.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PagePopupController.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PagePopupController.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PageSerializer.cpp206
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PageSerializer.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PointerLockController.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PointerLockController.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PrintContext.cpp56
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PrintContext.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.cpp79
-rw-r--r--chromium/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.h43
-rw-r--r--chromium/third_party/WebKit/Source/core/page/Selection.idl35
-rw-r--r--chromium/third_party/WebKit/Source/core/page/SpatialNavigation.cpp422
-rw-r--r--chromium/third_party/WebKit/Source/core/page/SpatialNavigation.h34
-rw-r--r--chromium/third_party/WebKit/Source/core/page/StorageClient.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/page/TouchAdjustment.cpp44
-rw-r--r--chromium/third_party/WebKit/Source/core/page/TouchAdjustment.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/page/TouchDisambiguation.cpp38
-rw-r--r--chromium/third_party/WebKit/Source/core/page/TouchDisambiguation.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/page/ValidationMessageClient.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/page/WindowFeatures.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/core/page/WindowFeatures.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/page/WindowPagePopup.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/page/scrolling/ScrollingConstraints.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp508
-rw-r--r--chromium/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h44
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/CryptoResult.h58
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/DEPS15
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/DragImage.cpp267
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/DragImage.h63
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/Pasteboard.cpp139
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/Pasteboard.h79
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/animation/AnimationTranslationUtil.cpp355
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/animation/AnimationTranslationUtil.h63
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/animation/AnimationTranslationUtilTest.cpp352
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/animation/AnimationValue.h114
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/animation/CSSAnimationData.cpp128
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/animation/CSSAnimationData.h192
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/animation/CSSAnimationDataList.cpp64
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/animation/CSSAnimationDataList.h66
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/animation/KeyframeValueList.cpp53
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/animation/KeyframeValueList.h90
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/animation/TimingFunction.h330
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/animation/TimingFunctionTestHelper.cpp253
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/animation/TimingFunctionTestHelper.h63
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/animation/TimingFunctionTestHelperTest.cpp326
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/ChromiumDataObject.cpp266
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/ChromiumDataObject.h109
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/ChromiumDataObjectItem.cpp182
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/ChromiumDataObjectItem.h98
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/KeyCodeConversion.h40
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/KeyCodeConversionAndroid.cpp329
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/KeyCodeConversionGtk.cpp436
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/support/WebArrayBuffer.cpp103
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/support/WebCrypto.cpp98
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/support/WebMediaStream.cpp161
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/support/WebMediaStreamTrack.cpp146
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/support/WebRTCSessionDescription.cpp109
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/support/WebRTCSessionDescriptionRequest.cpp98
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/support/WebRTCStatsRequest.cpp86
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mac/ThemeMac.mm728
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mediastream/MediaStreamCenter.cpp127
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mediastream/MediaStreamCenter.h81
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mediastream/MediaStreamDescriptor.cpp136
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mediastream/MediaStreamDescriptor.h105
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mediastream/RTCDataChannelHandler.cpp135
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mediastream/RTCDataChannelHandler.h77
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mediastream/RTCDataChannelHandlerClient.h51
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mediastream/RTCPeerConnectionHandler.cpp219
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mediastream/RTCPeerConnectionHandler.h108
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mediastream/RTCPeerConnectionHandlerClient.h86
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mediastream/RTCStatsRequest.h60
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mock/GeolocationClientMock.cpp190
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mock/GeolocationClientMock.h99
-rw-r--r--chromium/third_party/WebKit/Source/core/plugins/DOMMimeType.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/plugins/DOMMimeType.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/plugins/DOMMimeTypeArray.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/plugins/DOMMimeTypeArray.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/plugins/DOMPlugin.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/plugins/DOMPlugin.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/plugins/DOMPluginArray.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/plugins/DOMPluginArray.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/plugins/MimeType.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/plugins/MimeTypeArray.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/plugins/Plugin.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/plugins/PluginArray.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/plugins/PluginOcclusionSupport.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/core/plugins/PluginView.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/AbstractInlineTextBox.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/AutoTableLayout.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/AutoTableLayout.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/BidiRun.cpp51
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/BidiRun.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/ClipPathOperation.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/ClipRect.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/ColumnInfo.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/CompositedLayerMapping.cpp2228
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/CompositedLayerMapping.h359
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/CompositingReasons.h105
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/EllipsisBox.cpp76
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/EllipsisBox.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/FastTextAutosizer.cpp1104
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/FastTextAutosizer.h248
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/FilterEffectRenderer.cpp101
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/FilterEffectRenderer.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/FixedTableLayout.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/FloatingObjects.cpp191
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/FloatingObjects.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/FlowThreadController.cpp210
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/FlowThreadController.h51
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/HitTestLocation.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/HitTestLocation.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/HitTestRequest.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/HitTestResult.cpp95
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/HitTestResult.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/ImageQualityController.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/ImageQualityController.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/InlineBox.cpp101
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/InlineBox.h36
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/InlineFlowBox.cpp345
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/InlineFlowBox.h39
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/InlineIterator.h130
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/InlineTextBox.cpp502
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/InlineTextBox.h32
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/LayerPaintingInfo.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/LayoutIndicator.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/LayoutIndicator.h63
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/LayoutRectRecorder.cpp76
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/LayoutRectRecorder.h58
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/LayoutRepainter.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/LayoutRepainter.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/LayoutState.cpp233
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/LayoutState.h104
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/LineWidth.cpp197
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/LineWidth.h88
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/OrderIterator.cpp31
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/OrderIterator.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/Pagination.cpp67
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/Pagination.h64
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/PaintInfo.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/PartialLayoutState.h103
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RegionOversetState.h33
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderApplet.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderApplet.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderBR.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderBR.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderBlock.cpp1820
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderBlock.h323
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderBlockFlow.cpp987
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderBlockFlow.h162
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderBlockLineLayout.cpp1282
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderBox.cpp1502
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderBox.h206
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderBoxModelObject.cpp415
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderBoxModelObject.h59
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderBoxRegionInfo.h59
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderButton.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderButton.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderCombineText.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderCombineText.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderCounter.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderCounter.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp127
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderDeprecatedFlexibleBox.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderDetailsMarker.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderDetailsMarker.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderEmbeddedObject.cpp106
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderEmbeddedObject.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderFieldset.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderFieldset.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderFileUploadControl.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderFileUploadControl.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderFlexibleBox.cpp323
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderFlexibleBox.h36
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderFlowThread.cpp678
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderFlowThread.h120
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderFrame.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderFrame.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderFrameSet.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderFrameSet.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderFullScreen.cpp40
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderFullScreen.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderGeometryMap.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderGeometryMap.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderGrid.cpp769
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderGrid.h51
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderHTMLCanvas.cpp33
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderHTMLCanvas.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderIFrame.cpp94
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderIFrame.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderImage.cpp201
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderImage.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderImageResource.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderImageResource.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderImageResourceStyleImage.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderImageResourceStyleImage.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderInline.cpp156
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderInline.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderInputSpeech.cpp102
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderInputSpeech.h55
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayer.cpp1991
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayer.h438
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerBlendInfo.cpp114
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerBlendInfo.h91
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerClipper.cpp244
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerClipper.h41
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerCompositor.cpp2605
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerCompositor.h372
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerFilterInfo.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerFilterInfo.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerModelObject.cpp78
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerModelObject.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerReflectionInfo.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerReflectionInfo.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerRepainter.cpp174
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerRepainter.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerScrollableArea.cpp715
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerScrollableArea.h43
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerStackingNode.cpp434
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerStackingNode.h102
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerStackingNodeIterator.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLineBoxList.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLineBoxList.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderListBox.cpp299
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderListBox.h69
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderListItem.cpp196
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderListItem.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderListMarker.cpp64
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderListMarker.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMarquee.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMarquee.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMedia.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMedia.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMediaControlElements.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMediaControlElements.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMediaControls.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMediaControls.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMenuList.cpp205
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMenuList.h29
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMeter.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMeter.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMultiColumnBlock.cpp200
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMultiColumnBlock.h83
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMultiColumnFlowThread.cpp294
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMultiColumnFlowThread.h105
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMultiColumnSet.cpp351
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderMultiColumnSet.h161
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderNamedFlowFragment.cpp108
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderNamedFlowFragment.h74
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderNamedFlowThread.cpp730
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderNamedFlowThread.h144
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderObject.cpp1497
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderObject.h492
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderObjectChildList.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderOverflow.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderPart.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderPart.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderProgress.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderProgress.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderRegion.cpp495
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderRegion.h130
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderRegionSet.cpp63
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderRegionSet.h68
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderReplaced.cpp166
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderReplaced.h32
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderReplica.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderReplica.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderRuby.cpp30
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderRuby.h29
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderRubyBase.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderRubyBase.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderRubyRun.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderRubyRun.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderRubyText.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderRubyText.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderScrollbar.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderScrollbar.h26
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderScrollbarPart.cpp33
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderScrollbarPart.h31
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderScrollbarTheme.cpp1
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderScrollbarTheme.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderSelectionInfo.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderSlider.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderSlider.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTable.cpp366
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTable.h66
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTableCaption.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTableCaption.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.cpp92
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.h75
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTableCol.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTableCol.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTableRow.cpp113
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTableRow.h67
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTableSection.cpp374
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTableSection.h41
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderText.cpp245
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderText.h37
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTextControl.cpp101
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTextControl.h37
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTextControlMultiLine.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTextControlMultiLine.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTextControlSingleLine.cpp149
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTextControlSingleLine.h39
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTextFragment.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTextFragment.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTheme.cpp223
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTheme.h44
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderThemeChromiumAndroid.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderThemeChromiumAndroid.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderThemeChromiumDefault.cpp51
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderThemeChromiumDefault.h37
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderThemeChromiumFontProvider.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderThemeChromiumFontProvider.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderThemeChromiumFontProviderLinux.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderThemeChromiumFontProviderWin.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderThemeChromiumMac.h77
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderThemeChromiumMac.mm175
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderThemeChromiumSkia.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderThemeChromiumSkia.h92
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderThemeChromiumWin.cpp660
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderThemeChromiumWin.h114
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTreeAsText.cpp149
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTreeAsText.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderVTTCue.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderVTTCue.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderVideo.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderVideo.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderView.cpp590
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderView.h268
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderWidget.cpp223
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderWidget.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderWordBreak.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RootInlineBox.cpp279
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RootInlineBox.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/ScrollAlignment.cpp146
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/ScrollAlignment.h83
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/ScrollBehavior.cpp146
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/ScrollBehavior.h83
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/SubtreeLayoutScope.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/SubtreeLayoutScope.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/TextAutosizer.cpp288
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/TextAutosizer.h48
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/TrailingFloatsRootInlineBox.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/animation/WebAnimationProvider.cpp214
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/animation/WebAnimationProvider.h76
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/CompositedLayerMapping.cpp2246
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/CompositedLayerMapping.h419
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/CompositedLayerMappingPtr.h (renamed from chromium/third_party/WebKit/Source/core/rendering/CompositedLayerMappingPtr.h)0
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/CompositingInputsUpdater.cpp94
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/CompositingInputsUpdater.h49
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/CompositingLayerAssigner.cpp279
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/CompositingLayerAssigner.h93
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/CompositingReasonFinder.cpp236
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/CompositingReasonFinder.h47
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/CompositingRequirementsUpdater.cpp460
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/CompositingRequirementsUpdater.h70
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/CompositingState.h (renamed from chromium/third_party/WebKit/Source/core/rendering/CompositingState.h)0
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/CompositingTriggers.h41
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/GraphicsLayerTreeBuilder.cpp124
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/GraphicsLayerTreeBuilder.h47
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/GraphicsLayerUpdater.cpp117
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/GraphicsLayerUpdater.h77
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/RenderLayerCompositor.cpp1259
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/compositing/RenderLayerCompositor.h280
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/line/BreakingContext.cpp69
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/line/BreakingContextInlineHeaders.h488
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/line/LineBreaker.cpp114
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/line/LineBreaker.h63
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/line/LineInfo.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/line/LineLayoutState.h130
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/line/LineWidth.cpp214
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/line/LineWidth.h92
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/line/RenderTextInfo.h47
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/line/TrailingObjects.cpp73
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/line/TrailingObjects.h94
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/line/WordMeasurement.h53
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/BoxShape.cpp60
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/BoxShape.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/BoxShapeTest.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/PolygonShape.cpp506
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/PolygonShape.h51
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/RasterShape.cpp244
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/RasterShape.h71
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/RectangleShape.cpp133
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/RectangleShape.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/Shape.cpp161
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/Shape.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInfo.cpp101
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInfo.h179
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInsideInfo.cpp121
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInsideInfo.h122
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInterval.h177
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeOutsideInfo.cpp297
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeOutsideInfo.h83
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/AppliedTextDecoration.cpp36
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/AppliedTextDecoration.h34
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/BasicShapes.cpp202
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/BasicShapes.h256
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/BorderData.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/BorderValue.h29
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/CachedUAStyle.h29
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/CollapsedBorderValue.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/ContentData.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/CursorList.h62
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/DataEquivalency.h49
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/FillLayer.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/FillLayer.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/GridCoordinate.h85
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/GridLength.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/GridPosition.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/GridResolvedPosition.cpp253
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/GridResolvedPosition.h125
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/GridTrackSize.h46
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/KeyframeList.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/KeyframeList.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/NinePieceImage.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/OutlineValue.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/QuotesData.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/QuotesData.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/RenderStyle.cpp1005
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/RenderStyle.h681
-rw-r--r--[-rwxr-xr-x]chromium/third_party/WebKit/Source/core/rendering/style/RenderStyleConstants.h93
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/SVGRenderStyle.cpp81
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/SVGRenderStyle.h103
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/SVGRenderStyleDefs.cpp32
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/SVGRenderStyleDefs.h44
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/ShadowData.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/ShadowData.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/ShadowList.cpp35
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/ShadowList.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/ShapeValue.h60
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleBackgroundData.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleBackgroundData.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleBoxData.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleCustomFilterProgram.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleCustomFilterProgram.h193
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleCustomFilterProgramCache.cpp86
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleCustomFilterProgramCache.h65
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleDeprecatedFlexibleBoxData.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleDeprecatedFlexibleBoxData.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleDifference.h80
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImage.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImage.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImageSet.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImageSet.h37
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedShader.cpp53
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedShader.h57
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleGeneratedImage.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleGeneratedImage.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleGridData.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleGridData.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleImage.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleInheritedData.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleInheritedData.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleMultiColData.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleMultiColData.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StylePendingImage.h26
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StylePendingShader.h60
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleRareInheritedData.cpp98
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleRareInheritedData.h53
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleRareNonInheritedData.cpp113
-rw-r--r--[-rwxr-xr-x]chromium/third_party/WebKit/Source/core/rendering/style/StyleRareNonInheritedData.h66
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleShader.h64
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleVariableData.h64
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleVisualData.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleVisualData.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleWillChangeData.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleWillChangeData.h42
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/ReferenceFilterBuilder.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGBlock.cpp41
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGBlock.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGContainer.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGContainer.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGEllipse.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGEllipse.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGForeignObject.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGForeignObject.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGGradientStop.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGGradientStop.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGHiddenContainer.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGHiddenContainer.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGImage.cpp59
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGImage.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGInline.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGInline.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGInlineText.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGInlineText.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGModelObject.cpp137
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGModelObject.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGPath.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGRect.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGRect.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResource.cpp68
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResource.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceClipper.cpp71
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceClipper.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceContainer.cpp61
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceContainer.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceFilter.cpp218
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceFilter.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceFilterPrimitive.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceFilterPrimitive.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceGradient.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceLinearGradient.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceMarker.cpp30
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceMarker.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceMasker.cpp33
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceMasker.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourcePattern.cpp51
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourcePattern.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceRadialGradient.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceSolidColor.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGRoot.cpp239
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGRoot.h66
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGShape.cpp136
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGShape.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGTSpan.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGTSpan.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGText.cpp114
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGText.h46
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGTextPath.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGTextPath.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGTransformableContainer.cpp45
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGTransformableContainer.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGViewportContainer.cpp69
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGViewportContainer.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGInlineFlowBox.cpp79
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGInlineFlowBox.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGInlineTextBox.cpp350
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGInlineTextBox.h45
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGMarkerData.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGPathData.cpp93
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGRenderSupport.cpp111
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGRenderSupport.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGRenderTreeAsText.cpp116
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGRenderTreeAsText.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGRenderingContext.cpp72
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGRenderingContext.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGResources.cpp180
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGResources.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGResourcesCache.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGResourcesCache.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGResourcesCycleSolver.cpp154
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGResourcesCycleSolver.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGRootInlineBox.cpp81
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGRootInlineBox.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGTextChunkBuilder.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGTextLayoutAttributesBuilder.cpp53
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGTextLayoutAttributesBuilder.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGTextLayoutEngine.cpp50
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGTextLayoutEngine.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGTextLayoutEngineBaseline.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp51
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGTextMetrics.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGTextMetrics.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGTextMetricsBuilder.cpp238
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGTextMetricsBuilder.h38
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGTextQuery.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGTextQuery.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGTextRunRenderingContext.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/SVGTextRunRenderingContext.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/speech/SpeechInput.cpp130
-rw-r--r--chromium/third_party/WebKit/Source/core/speech/SpeechInput.h90
-rw-r--r--chromium/third_party/WebKit/Source/core/speech/SpeechInputClient.h76
-rw-r--r--chromium/third_party/WebKit/Source/core/speech/SpeechInputEvent.cpp74
-rw-r--r--chromium/third_party/WebKit/Source/core/speech/SpeechInputEvent.h59
-rw-r--r--chromium/third_party/WebKit/Source/core/speech/SpeechInputEvent.idl31
-rw-r--r--chromium/third_party/WebKit/Source/core/speech/SpeechInputListener.h67
-rw-r--r--chromium/third_party/WebKit/Source/core/speech/SpeechInputResult.cpp62
-rw-r--r--chromium/third_party/WebKit/Source/core/speech/SpeechInputResult.h61
-rw-r--r--chromium/third_party/WebKit/Source/core/speech/SpeechInputResult.idl33
-rw-r--r--chromium/third_party/WebKit/Source/core/speech/SpeechInputResultList.cpp56
-rw-r--r--chromium/third_party/WebKit/Source/core/speech/SpeechInputResultList.h56
-rw-r--r--chromium/third_party/WebKit/Source/core/speech/SpeechInputResultList.idl33
-rw-r--r--chromium/third_party/WebKit/Source/core/storage/Storage.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/storage/Storage.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/storage/Storage.idl29
-rw-r--r--chromium/third_party/WebKit/Source/core/storage/StorageArea.cpp197
-rw-r--r--chromium/third_party/WebKit/Source/core/storage/StorageArea.h70
-rw-r--r--chromium/third_party/WebKit/Source/core/storage/StorageEvent.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/core/storage/StorageEvent.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/storage/StorageNamespace.cpp66
-rw-r--r--chromium/third_party/WebKit/Source/core/storage/StorageNamespace.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/ColorDistance.cpp44
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/ColorDistance.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/LinearGradientAttributes.h33
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/PatternAttributes.h40
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/RadialGradientAttributes.h48
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAElement.cpp117
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAElement.h33
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAElement.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAltGlyphDefElement.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAltGlyphDefElement.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAltGlyphElement.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAltGlyphElement.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAltGlyphItemElement.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAltGlyphItemElement.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAngle.cpp274
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAngle.h84
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAngle.idl14
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAngleTearOff.cpp125
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAngleTearOff.h79
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimateColorElement.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimateColorElement.h40
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimateColorElement.idl28
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp245
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimateElement.h53
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimateMotionElement.cpp75
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimateMotionElement.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimateTransformElement.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimateTransformElement.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedAngle.cpp165
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedAngle.h88
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedAngle.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedBoolean.cpp88
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedBoolean.h79
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedBoolean.idl8
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedColor.cpp95
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedColor.h86
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedEnumeration.cpp163
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedEnumeration.h94
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedEnumeration.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedEnumerationBase.cpp63
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedEnumerationBase.h54
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedInteger.cpp116
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedInteger.h91
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedInteger.idl8
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedIntegerOptionalInteger.cpp125
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedIntegerOptionalInteger.h81
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedLength.cpp138
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedLength.h82
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedLength.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedLengthList.cpp135
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedLengthList.h73
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedLengthList.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedNumber.cpp126
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedNumber.h89
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedNumber.idl8
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedNumberList.cpp110
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedNumberList.h70
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedNumberList.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedNumberOptionalNumber.cpp85
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedNumberOptionalNumber.h81
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedPath.cpp156
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedPath.h68
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedPointList.cpp117
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedPointList.h63
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedPreserveAspectRatio.cpp88
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedPreserveAspectRatio.h80
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedPreserveAspectRatio.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedRect.cpp102
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedRect.h81
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedRect.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedString.cpp97
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedString.h80
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedString.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedTransformList.cpp152
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedTransformList.h72
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedTransformList.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedType.cpp330
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedType.h306
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.cpp250
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.h214
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp65
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimationElement.h70
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimationElement.idl12
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimatorFactory.h102
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAttributeNames.in5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGBoolean.cpp85
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGBoolean.h86
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGCircleElement.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGCircleElement.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGCircleElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGClipPathElement.cpp44
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGClipPathElement.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGClipPathElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGColor.cpp110
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGColor.h100
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGColor.idl38
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGComponentTransferFunctionElement.cpp128
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGComponentTransferFunctionElement.h72
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGCursorElement.cpp78
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGCursorElement.h31
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGCursorElement.idl7
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGDefsElement.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGDefsElement.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGDefsElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGDescElement.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGDescElement.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGDiscardElement.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGDiscardElement.h59
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGDiscardElement.idl32
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGDocument.cpp109
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGDocument.h62
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGDocument.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp171
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGDocumentExtensions.h49
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGElement.cpp721
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGElement.h166
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGElement.idl12
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGElementInstance.cpp272
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGElementInstance.h194
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGElementInstance.idl82
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGElementInstanceList.cpp53
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGElementInstanceList.h46
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGElementInstanceList.idl30
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGElementRareData.h87
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGEllipseElement.cpp63
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGEllipseElement.h33
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGEllipseElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGEnumeration.cpp127
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGEnumeration.h127
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGExternalResourcesRequired.cpp120
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGExternalResourcesRequired.h63
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGExternalResourcesRequired.idl33
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEBlendElement.cpp77
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEBlendElement.h60
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEBlendElement.idl19
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEColorMatrixElement.cpp88
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEColorMatrixElement.h57
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEColorMatrixElement.idl16
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEComponentTransferElement.cpp55
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEComponentTransferElement.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEComponentTransferElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFECompositeElement.cpp135
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFECompositeElement.h77
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFECompositeElement.idl28
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEConvolveMatrixElement.cpp279
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEConvolveMatrixElement.h86
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEConvolveMatrixElement.idl33
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEDiffuseLightingElement.cpp126
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEDiffuseLightingElement.h38
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEDiffuseLightingElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.cpp110
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.h65
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.idl18
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEDistantLightElement.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEDistantLightElement.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEDropShadowElement.cpp101
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEDropShadowElement.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEDropShadowElement.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEFloodElement.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEFloodElement.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEFloodElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEFuncAElement.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEFuncAElement.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEFuncBElement.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEFuncBElement.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEFuncGElement.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEFuncGElement.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEFuncRElement.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEFuncRElement.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEGaussianBlurElement.cpp73
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEGaussianBlurElement.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEGaussianBlurElement.idl7
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp79
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEImageElement.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEImageElement.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFELightElement.cpp157
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFELightElement.h64
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEMergeElement.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEMergeElement.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEMergeElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEMergeNodeElement.cpp30
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEMergeNodeElement.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEMorphologyElement.cpp103
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEMorphologyElement.h56
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEMorphologyElement.idl20
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEOffsetElement.cpp60
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEOffsetElement.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEOffsetElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEPointLightElement.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEPointLightElement.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFESpecularLightingElement.cpp144
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFESpecularLightingElement.h32
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFESpecularLightingElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFESpotLightElement.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFESpotLightElement.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFETileElement.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFETileElement.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFETileElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFETurbulenceElement.cpp137
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFETurbulenceElement.h93
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFETurbulenceElement.idl20
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFilterElement.cpp177
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFilterElement.h56
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFilterElement.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFilterPrimitiveStandardAttributes.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFilterPrimitiveStandardAttributes.h35
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFilterPrimitiveStandardAttributes.idl6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFitToViewBox.cpp80
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFitToViewBox.h56
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFitToViewBox.idl8
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontData.cpp69
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontData.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontElement.cpp189
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontElement.h34
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontFaceElement.cpp76
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontFaceElement.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontFaceFormatElement.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontFaceFormatElement.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontFaceNameElement.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontFaceNameElement.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontFaceSource.cpp39
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontFaceSource.h31
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontFaceSrcElement.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontFaceSrcElement.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontFaceUriElement.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontFaceUriElement.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGForeignObjectElement.cpp104
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGForeignObjectElement.h37
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGForeignObjectElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGGElement.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGGElement.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGGElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGGeometryElement.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGGeometryElement.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGGeometryElement.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGGlyphElement.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGGlyphElement.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGGlyphMap.h82
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGGlyphRefElement.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGGlyphRefElement.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGGradientElement.cpp100
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGGradientElement.h62
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGGradientElement.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp149
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGGraphicsElement.h42
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGGraphicsElement.idl15
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGHKernElement.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGHKernElement.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGImageElement.cpp132
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGImageElement.h47
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGImageElement.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGImageLoader.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGImageLoader.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGInteger.cpp101
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGInteger.h80
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGIntegerOptionalInteger.cpp115
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGIntegerOptionalInteger.h80
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGLength.cpp345
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGLength.h151
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGLength.idl17
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGLengthContext.cpp70
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGLengthContext.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGLengthList.cpp159
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGLengthList.h85
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGLengthList.idl22
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGLengthListTearOff.h58
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGLengthTearOff.cpp148
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGLengthTearOff.h79
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGLineElement.cpp63
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGLineElement.h35
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGLineElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGLinearGradientElement.cpp152
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGLinearGradientElement.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGMPathElement.cpp61
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGMPathElement.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGMPathElement.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGMarkerElement.cpp178
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGMarkerElement.h117
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGMarkerElement.idl31
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGMaskElement.cpp96
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGMaskElement.h49
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGMaskElement.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGMatrix.h129
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGMatrix.idl36
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGMatrixTearOff.cpp179
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGMatrixTearOff.h105
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGMetadataElement.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGMetadataElement.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGMissingGlyphElement.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGMissingGlyphElement.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGNumber.cpp143
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGNumber.h74
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGNumber.idl8
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGNumberList.cpp166
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGNumberList.h91
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGNumberList.idl22
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGNumberListTearOff.h58
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGNumberOptionalNumber.cpp112
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGNumberOptionalNumber.h80
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGNumberTearOff.cpp57
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGNumberTearOff.h56
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPaint.cpp68
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPaint.h85
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPaint.idl44
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGParserUtilities.cpp297
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGParserUtilities.h46
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathBuilder.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathByteStream.h41
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathByteStreamBuilder.cpp119
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathByteStreamBuilder.h63
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathByteStreamSource.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathByteStreamSource.h75
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathElement.cpp250
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathElement.h96
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathElement.idl62
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathParser.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSeg.cpp50
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSeg.h47
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSeg.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegArcAbs.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegArcAbs.idl19
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegArcRel.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegArcRel.idl19
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegClosePath.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegClosePath.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegCurvetoCubicAbs.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegCurvetoCubicAbs.idl17
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegCurvetoCubicRel.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegCurvetoCubicRel.idl17
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegCurvetoCubicSmoothAbs.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegCurvetoCubicSmoothAbs.idl13
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegCurvetoCubicSmoothRel.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegCurvetoCubicSmoothRel.idl13
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegCurvetoQuadraticAbs.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegCurvetoQuadraticAbs.idl13
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegCurvetoQuadraticRel.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegCurvetoQuadraticRel.idl13
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegCurvetoQuadraticSmoothAbs.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegCurvetoQuadraticSmoothRel.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegCurvetoQuadraticSmoothRel.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegLinetoAbs.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegLinetoAbs.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegLinetoHorizontalAbs.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegLinetoHorizontalAbs.idl7
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegLinetoHorizontalRel.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegLinetoHorizontalRel.idl7
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegLinetoRel.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegLinetoRel.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegLinetoVerticalAbs.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegLinetoVerticalAbs.idl7
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegLinetoVerticalRel.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegLinetoVerticalRel.idl7
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegList.cpp207
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegList.h180
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegList.idl23
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegListBuilder.cpp40
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegListBuilder.h34
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegListSource.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegListSource.h42
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegListTearOff.h82
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegMovetoAbs.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegMovetoAbs.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegMovetoRel.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegMovetoRel.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathSegWithContext.h48
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathStringBuilder.cpp116
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathStringBuilder.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathStringSource.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathTraversalStateBuilder.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathTraversalStateBuilder.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathUtilities.cpp142
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPathUtilities.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPatternElement.cpp201
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPatternElement.h66
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPatternElement.idl19
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPoint.cpp147
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPoint.h105
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPoint.idl13
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPointList.cpp182
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPointList.h83
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPointList.idl23
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPointListTearOff.h58
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPointTearOff.cpp75
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPointTearOff.h62
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPolyElement.cpp90
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPolyElement.h38
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPolygonElement.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPolygonElement.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPolygonElement.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPolylineElement.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPolylineElement.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPolylineElement.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatio.cpp179
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatio.h53
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatio.idl15
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatioTearOff.cpp74
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatioTearOff.h78
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGRadialGradientElement.cpp177
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGRadialGradientElement.h33
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGRect.cpp169
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGRect.h97
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGRect.idl15
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGRectElement.cpp81
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGRectElement.h39
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGRectElement.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGRectTearOff.cpp90
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGRectTearOff.h62
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGRemoteFontFaceSource.cpp74
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGRemoteFontFaceSource.h36
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGRenderingIntent.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp571
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGSVGElement.h150
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGSVGElement.idl35
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGScriptElement.cpp105
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGScriptElement.h59
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGScriptElement.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGSetElement.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGSetElement.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGStaticStringList.cpp96
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGStaticStringList.h74
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGStopElement.cpp40
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGStopElement.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGString.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGString.h96
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGStringList.cpp134
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGStringList.h107
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGStringList.idl22
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGStringListTearOff.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGStringListTearOff.h147
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGStyleElement.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGStyleElement.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGSwitchElement.cpp36
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGSwitchElement.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGSwitchElement.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGSymbolElement.cpp49
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGSymbolElement.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGSymbolElement.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTSpanElement.cpp30
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTSpanElement.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTagNames.in46
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTests.cpp177
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTests.h35
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTests.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp156
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTextContentElement.h80
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTextContentElement.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTextElement.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTextElement.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTextPathElement.cpp100
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTextPathElement.h89
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTextPositioningElement.cpp99
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTextPositioningElement.h33
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTitleElement.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTitleElement.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTransform.cpp86
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTransform.h76
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTransform.idl22
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTransformDistance.cpp199
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTransformDistance.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTransformList.cpp336
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTransformList.h88
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTransformList.idl25
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTransformListTearOff.cpp65
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTransformListTearOff.h60
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTransformTearOff.cpp124
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTransformTearOff.h79
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGURIReference.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGURIReference.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGURIReference.idl6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGUnitTypes.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGUnitTypes.h32
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGUnitTypes.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGUnknownElement.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGUnknownElement.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGUseElement.cpp708
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGUseElement.h88
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGUseElement.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGVKernElement.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGVKernElement.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGViewElement.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGViewElement.h29
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGViewElement.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGViewSpec.cpp219
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGViewSpec.h72
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGViewSpec.idl15
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGZoomAndPan.cpp35
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGZoomAndPan.h38
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGZoomAndPan.idl10
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGZoomEvent.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGZoomEvent.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGZoomEvent.idl9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/animation/SMILTime.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp267
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.h54
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp498
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.h88
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp204
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/graphics/SVGImage.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/graphics/SVGImageCache.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/graphics/SVGImageCache.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/graphics/SVGImageChromeClient.cpp93
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/graphics/SVGImageChromeClient.h26
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.cpp1
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp184
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/graphics/filters/SVGFilter.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/graphics/filters/SVGFilter.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGAnimatedEnumerationPropertyTearOff.h64
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGAnimatedListPropertyTearOff.h191
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGAnimatedPathSegListPropertyTearOff.h118
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.cpp93
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h330
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGAnimatedPropertyDescription.h87
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGAnimatedPropertyMacros.h190
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGAnimatedPropertyTearOff.h124
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGAnimatedStaticPropertyTearOff.h116
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGAnimatedTransformListPropertyTearOff.h60
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGAttributeToPropertyMap.cpp147
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGAttributeToPropertyMap.h60
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGListProperty.h482
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGListPropertyHelper.h371
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGListPropertyTearOff.h231
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGListPropertyTearOffHelper.h228
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGMatrixTearOff.h108
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGPathSegListPropertyTearOff.cpp137
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGPathSegListPropertyTearOff.h164
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGProperty.h109
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGPropertyInfo.h40
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGPropertyTearOff.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGPropertyTearOff.h209
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGPropertyTraits.h63
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGStaticListPropertyTearOff.h122
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGStaticPropertyTearOff.h66
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/properties/SVGTransformListPropertyTearOff.h82
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/DummyPageHolder.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/GCObservation.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/GCObservation.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/InspectorFrontendClientLocal.cpp129
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/InspectorFrontendClientLocal.h72
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/InternalProfilers.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/InternalProfilers.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/InternalProfilers.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/InternalSettings.cpp128
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/InternalSettings.h62
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/InternalSettings.idl11
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/Internals.cpp1046
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/Internals.h136
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/Internals.idl58
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/LayerRect.h29
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/LayerRect.idl11
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/LayerRectList.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/LayerRectList.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/LayerRectList.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/MallocStatistics.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/MallocStatistics.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/MockPagePopupDriver.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/MockPagePopupDriver.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/NullExecutionContext.cpp30
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/NullExecutionContext.h57
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/TypeConversions.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/TypeConversions.idl17
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/MemoryInfo.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/MemoryInfo.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/MemoryInfo.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/Performance.cpp69
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/Performance.h37
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/Performance.idl25
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/PerformanceEntry.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/PerformanceEntry.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/PerformanceMark.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/PerformanceMeasure.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/PerformanceNavigation.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/PerformanceNavigation.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/PerformanceNavigation.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/PerformanceResourceTiming.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/PerformanceResourceTiming.h19
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/PerformanceTiming.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/PerformanceTiming.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/PerformanceTiming.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/PerformanceUserTiming.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/PerformanceUserTiming.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/ResourceTimingInfo.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/AbstractWorker.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/AbstractWorker.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/AbstractWorker.idl6
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.cpp49
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.idl6
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/DedicatedWorkerThread.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/DedicatedWorkerThread.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/SharedWorker.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/SharedWorker.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/SharedWorker.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/SharedWorkerRepositoryClient.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/SharedWorkerThread.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/SharedWorkerThread.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/Worker.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/Worker.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/Worker.idl3
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerClients.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerConsole.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerConsole.h23
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerEventQueue.cpp30
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerEventQueue.h13
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp146
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h111
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.idl6
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScopeProxyProvider.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScopeProxyProvider.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerLocation.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerLocation.idl6
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerNavigator.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerNavigator.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerNavigator.idl6
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerObjectProxy.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerObjectProxy.h62
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerReportingProxy.h39
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.cpp174
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.h31
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerScriptLoader.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerSupplementable.h42
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerThread.cpp79
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerThread.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.h20
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/DOMParser.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/DOMParser.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/DOMParser.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/DocumentXPathEvaluator.cpp50
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/DocumentXPathEvaluator.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/DocumentXPathEvaluator.idl7
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/NativeXPathNSResolver.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/NativeXPathNSResolver.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLErrors.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLErrors.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLHttpRequest.cpp286
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLHttpRequest.h70
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLHttpRequest.idl8
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLHttpRequestProgressEvent.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLHttpRequestProgressEvent.idl4
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLHttpRequestProgressEventThrottle.cpp53
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLHttpRequestProgressEventThrottle.h36
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLHttpRequestUpload.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLHttpRequestUpload.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLSerializer.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLSerializer.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLSerializer.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLTreeViewer.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLTreeViewer.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathEvaluator.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathEvaluator.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathEvaluator.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathExpression.cpp31
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathExpression.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathExpression.idl5
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathExpressionNode.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathExpressionNode.h122
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathFunctions.cpp203
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathFunctions.h41
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathGrammar.y54
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathNSResolver.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathNSResolver.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathNodeSet.cpp85
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathNodeSet.h75
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathParser.cpp98
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathParser.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathPath.cpp70
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathPath.h82
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathPredicate.cpp153
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathPredicate.h179
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathResult.cpp127
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathResult.h15
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathResult.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathStep.cpp452
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathStep.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathUtil.cpp62
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathUtil.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathValue.cpp117
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathValue.h141
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathVariableReference.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathVariableReference.h30
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XSLImportRule.cpp30
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XSLImportRule.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XSLStyleSheet.h38
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XSLStyleSheetLibxslt.cpp68
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XSLTExtensions.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XSLTProcessor.cpp40
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XSLTProcessor.h26
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XSLTProcessor.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp74
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XSLTUnicodeSort.cpp212
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XSLTUnicodeSort.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/parser/SharedBufferReader.cpp77
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/parser/SharedBufferReader.h60
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/parser/SharedBufferReaderTest.cpp119
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp396
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.h249
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParserScope.h33
-rw-r--r--chromium/third_party/WebKit/Source/devtools/BUILD.gn386
-rw-r--r--chromium/third_party/WebKit/Source/devtools/Inspector-1.1.json4
-rw-r--r--chromium/third_party/WebKit/Source/devtools/PRESUBMIT.py117
-rw-r--r--chromium/third_party/WebKit/Source/devtools/devtools.gyp804
-rw-r--r--chromium/third_party/WebKit/Source/devtools/devtools.gypi689
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/AdvancedSearchController.js802
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/AllocationProfile.js310
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ApplicationCacheItemsView.js269
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ApplicationCacheModel.js257
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/AuditCategories.js79
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/AuditController.js162
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/AuditFormatters.js128
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/AuditLauncherView.js327
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/AuditResultView.js128
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/AuditRules.js1466
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/AuditsPanel.js524
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/BottomUpProfileDataGridTree.js289
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/BreakpointManager.js732
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/BreakpointsSidebarPane.js713
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CPUProfileView.js1246
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CSSFormatter.js291
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CSSMetadata.js979
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CSSNamedFlowCollectionsView.js433
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CSSNamedFlowView.js256
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CSSSourceFrame.js100
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CSSStyleModel.js1843
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CSSStyleSheetMapping.js68
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CallStackSidebarPane.js288
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CanvasProfileView.js1288
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CanvasReplayStateView.js531
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Checkbox.js67
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CodeMirrorTextEditor.js1572
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CodeMirrorUtils.js104
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Color.js635
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CompilerScriptMapping.js256
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CompletionDictionary.js130
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ConsoleMessage.js1089
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ConsoleModel.js325
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ConsolePanel.js90
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ConsoleView.js1079
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ContentProvider.js96
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ContentProviderBasedProjectDelegate.js391
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ContentProviders.js330
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ContextMenu.js290
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CookieItemsView.js187
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CookieParser.js435
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CookiesTable.js287
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DOMAgent.js1618
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DOMBreakpointsSidebarPane.js427
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DOMCountersGraph.js388
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DOMExtension.js598
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DOMPresentationUtils.js497
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DOMStorage.js311
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DOMStorageItemsView.js261
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DOMSyntaxHighlighter.js90
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DataGrid.js1810
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Database.js207
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DatabaseQueryView.js207
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DatabaseTableView.js101
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DebuggerModel.js1079
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DebuggerScriptMapping.js66
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DefaultScriptMapping.js150
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DevToolsExtensionAPI.js65
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Dialog.js180
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DirectoryContentView.js184
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DockController.js177
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Drawer.js395
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/EditFileSystemDialog.js389
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ElementsPanel.js1326
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ElementsPanelDescriptor.js199
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ElementsTreeOutline.js2552
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/EmptyView.js57
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/EventListenersSidebarPane.js270
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ExtensionAPI.js941
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ExtensionAuditCategory.js216
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ExtensionPanel.js255
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ExtensionServer.js968
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ExtensionView.js101
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/FileContentView.js173
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/FileManager.js141
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/FileSystemMapping.js450
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/FileSystemModel.js552
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/FileSystemProjectDelegate.js601
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/FileSystemView.js243
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/FileUtils.js414
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/FilterBar.js560
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/FilteredItemSelectionDialog.js872
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/FlameChart.js907
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/FontView.js141
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ForwardedInputEventHandler.js31
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Geometry.js145
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/GoToLineDialog.js116
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/HAREntry.js433
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/HandlerRegistry.js236
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/HeapSnapshot.js1855
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/HeapSnapshotDataGrids.js1035
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/HeapSnapshotGridNodes.js1180
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/HeapSnapshotLoader.js266
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/HeapSnapshotProxy.js596
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/HeapSnapshotView.js1858
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/HeapSnapshotWorker.js49
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/HeapSnapshotWorkerDispatcher.js103
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/HelpScreen.js157
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ImageView.js157
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/breakpoint.pngbin0 -> 154 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/breakpoint2.pngbin161 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/breakpoint2_2x.pngbin233 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/breakpointBorder.pngbin190 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/breakpointConditional.pngbin0 -> 157 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/breakpointConditional2.pngbin162 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/breakpointConditional2_2x.pngbin235 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/breakpointConditionalBorder.pngbin191 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/breakpointConditionalCounterBorder.pngbin348 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/breakpointConditional_2x.pngbin0 -> 230 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/breakpointCounterBorder.pngbin343 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/breakpoint_2x.pngbin0 -> 228 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/glossyHeader.pngbin87 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/glossyHeaderPressed.pngbin86 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/glossyHeaderSelected.pngbin121 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/glossyHeaderSelectedPressed.pngbin121 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/namedFlowOverflow.pngbin107 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/programCounterBorder.pngbin216 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/regionEmpty.pngbin97 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/regionFit.pngbin87 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/regionOverset.pngbin107 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/responsiveDesign.pngbin0 -> 412 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/responsiveDesign_2x.pngbin0 -> 781 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/settingsListRemove.pngbin550 -> 540 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/settingsListRemove_2x.pngbin754 -> 741 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/spinner.gifbin1684 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/spinnerActive.gifbin3208 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/spinnerActiveSelected.gifbin3208 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/spinnerInactive.gifbin3208 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/spinnerInactiveSelected.gifbin3208 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/src/breakpoint.svg6
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/src/breakpointConditional.svg6
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/src/breakpoints2.svg104
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/src/optimize_png.hashes7
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/src/responsiveDesign.svg11
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/src/settingListRemove.svg195
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/src/settingsListRemove.svg16
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/src/statusbarButtonGlyphs.svg2508
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/src/svg2png.hashes7
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/statusbarButtonGlyphs.pngbin6731 -> 6313 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/statusbarButtonGlyphs2x.pngbin16194 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/statusbarButtonGlyphs_2x.pngbin0 -> 14957 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/timelineHollowPillBlue.pngbin745 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/timelineHollowPillGray.pngbin436 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/timelineHollowPillGreen.pngbin748 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/timelineHollowPillOrange.pngbin740 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/timelineHollowPillPurple.pngbin736 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/timelineHollowPillRed.pngbin752 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/timelineHollowPillYellow.pngbin739 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/timelinePillBlue.pngbin612 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/timelinePillGray.pngbin371 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/timelinePillGreen.pngbin618 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/timelinePillOrange.pngbin617 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/timelinePillPurple.pngbin632 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/timelinePillRed.pngbin609 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Images/timelinePillYellow.pngbin612 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/IndexedDBModel.js487
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/IndexedDBViews.js446
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/InspectElementModeController.js87
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/InspectorBackend.js408
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/InspectorFrontendAPI.js114
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/InspectorFrontendEventSink.js43
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/InspectorFrontendHostStub.js195
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/InspectorView.js486
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/IsolatedFileSystem.js577
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/IsolatedFileSystemManager.js245
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/JSHeapSnapshot.js701
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/JavaScriptFormatter.js1024
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/JavaScriptSourceFrame.js937
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/KeyboardShortcut.js232
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/LayerDetailsView.js181
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/LayerTree.js229
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/LayerTreeModel.js488
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Layers3DView.js450
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/LayersPanel.js171
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/LayersPanelDescriptor.js40
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Linkifier.js188
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/LiveEditSupport.js179
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/MediaQueryInspector.js371
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/MemoryStatistics.js428
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/MetricsSidebarPane.js467
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/NavigatorOverlayController.js179
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/NavigatorView.js1263
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/NetworkItemView.js188
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/NetworkLog.js152
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/NetworkManager.js560
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/NetworkPanel.js2568
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/NetworkPanelDescriptor.js54
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/NetworkRequest.js958
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/NetworkUISourceCodeProvider.js145
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/OWNERS1
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Object.js187
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ObjectPopoverHelper.js179
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ObjectPropertiesSection.js973
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/OverridesSupport.js547
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/OverridesView.js1089
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/OverviewGrid.js492
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/PaintProfilerView.js179
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Panel.js267
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ParsedURL.js271
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/PieChart.js74
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Placard.js112
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/PlatformFontsSidebarPane.js116
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Popover.js389
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/PresentationConsoleMessageHelper.js168
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ProfileDataGridTree.js423
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ProfileLauncherView.js219
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ProfilesPanel.js1178
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ProfilesPanelDescriptor.js165
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Progress.js204
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ProgressIndicator.js126
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/PropertiesSidebarPane.js118
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/RemoteObject.js882
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/RenderingOptionsView.js53
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/RequestCookiesView.js94
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/RequestHTMLView.js72
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/RequestHeadersView.js492
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/RequestJSONView.js116
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/RequestPreviewView.js121
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/RequestResponseView.js80
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/RequestTimingView.js160
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/RequestView.js79
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Resource.js431
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ResourceScriptMapping.js431
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ResourceTreeModel.js778
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ResourceType.js180
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ResourceUtils.js244
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ResourceView.js136
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ResourceWebSocketFrameView.js134
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ResourcesPanel.js2074
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ResponsiveDesignView.js518
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/RevisionHistoryView.js323
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/RuntimeModel.js473
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SASSSourceMapping.js609
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ScopeChainSidebarPane.js178
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ScreencastView.js384
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Script.js273
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ScriptFormatter.js270
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ScriptFormatterWorker.js347
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ScriptSnippetModel.js695
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SearchableView.js526
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Settings.js485
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SettingsScreen.js1171
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ShortcutsScreen.js213
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ShowMoreDataGridNode.js147
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SidebarOverlay.js180
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SidebarPane.js202
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SidebarTreeElement.js213
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SidebarView.js117
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SimpleWorkspaceProvider.js199
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SnippetStorage.js223
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SoftContextMenu.js385
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SourceFrame.js859
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SourceMap.js349
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SourceMapping.js67
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SourcesNavigator.js251
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SourcesPanel.js1730
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SourcesPanelDescriptor.js159
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SourcesSearchScope.js225
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Spectrum.js443
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SplitView.js525
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/StatusBarButton.js536
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/StyleSheetOutlineDialog.js153
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/StylesSidebarPane.js3043
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/StylesSourceMapping.js392
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/SuggestBox.js425
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TabbedEditorContainer.js725
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TabbedPane.js1022
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TempFile.js165
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TestController.js2
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Tests.js169
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TextEditor.js324
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TextPrompt.js924
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TextRange.js177
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TextUtils.js131
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TimelineEventOverview.js139
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TimelineFrameController.js188
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TimelineFrameOverview.js420
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TimelineGrid.js254
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TimelineManager.js145
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TimelineMemoryOverview.js115
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TimelineModel.js528
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TimelineOverviewPane.js362
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TimelinePanel.js2108
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TimelinePanelDescriptor.js62
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TimelinePresentationModel.js1891
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TopDownProfileDataGridTree.js143
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/TracingAgent.js114
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/UISourceCode.js1115
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/UISourceCodeFrame.js202
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/UIUtils.js1221
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/UserMetrics.js130
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/View.js544
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ViewportControl.js172
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/WatchExpressionsSidebarPane.js500
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/WorkerManager.js298
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/WorkersSidebarPane.js121
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Workspace.js707
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/WorkspaceController.js67
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/audits/AuditCategories.js79
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/audits/AuditCategory.js61
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/audits/AuditController.js167
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/audits/AuditFormatters.js153
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/audits/AuditLauncherView.js337
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/audits/AuditResultView.js132
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/audits/AuditRules.js1601
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/audits/AuditsPanel.js532
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/audits/module.json12
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/auditsPanel.css20
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/breakpointsList.css13
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/buildSystemOnly.js7
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/canvasProfiler.css13
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/cm/clike.js3
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/cm/closebrackets.js133
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/cm/cmdevtools.css23
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/cm/codemirror.css51
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/cm/codemirror.js5542
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/cm/coffeescript.js631
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/cm/comment.js28
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/cm/css.js116
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/cm/headlesscodemirror.js219
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/cm/htmlmixed.js2
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/cm/javascript.js362
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/cm/markselection.js25
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/cm/matchbrackets.js121
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/cm/php.js8
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/cm/python.js39
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/cm/xml.js10
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/Color.js642
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/CompletionDictionary.js137
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/DOMExtension.js754
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/Geometry.js228
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/MessageSink.js79
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/ModuleManager.js487
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/Object.js228
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/ParsedURL.js281
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/Platform.js161
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/Progress.js209
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/Settings.js765
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/TextRange.js249
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/Throttler.js88
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/UIString.js (renamed from chromium/third_party/WebKit/Source/devtools/front_end/UIString.js)0
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/UserMetrics.js106
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/WebInspector.js46
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/modules.js1
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/common/utilities.js1775
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/CookiesTable.js286
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/DOMBreakpointsSidebarPane.js462
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js518
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/DockController.js198
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/Drawer.js333
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/ExecutionContextSelector.js134
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/ExtensionServerProxy.js69
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/FilterBar.js765
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/FilterSuggestionBuilder.js193
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/FlameChart.js967
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/HandlerRegistry.js308
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/HelpScreen.js167
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/InspectElementModeController.js115
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/InspectedPagePlaceholder.js123
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/InspectorView.js560
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/NativeBreakpointsSidebarPane.js (renamed from chromium/third_party/WebKit/Source/devtools/front_end/NativeBreakpointsSidebarPane.js)0
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/ObjectPopoverHelper.js183
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js1008
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/OverviewGrid.js480
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/Panel.js252
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/PropertiesSection.js (renamed from chromium/third_party/WebKit/Source/devtools/front_end/PropertiesSection.js)0
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/SearchableView.js590
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/Section.js (renamed from chromium/third_party/WebKit/Source/devtools/front_end/Section.js)0
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/ShortcutsScreen.js534
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/TimelineGrid.js353
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/components/WorkerFrontendManager.js172
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/console/ConsolePanel.js146
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js1228
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js1248
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/console/module.json55
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/cssNamedFlows.css99
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/dataGrid.css91
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/devices/DevicesView.js186
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/devices/module.json13
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/devicesView.css53
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/dialog.css6
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/elements/DOMSyntaxHighlighter.js94
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js1480
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeOutline.js2685
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/elements/EventListenersSidebarPane.js274
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/elements/MetricsSidebarPane.js492
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/elements/OverridesView.js653
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/elements/PlatformFontsSidebarPane.js132
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/elements/PropertiesSidebarPane.js119
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/elements/RenderingOptionsView.js53
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/elements/Spectrum.js453
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js3327
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/elements/module.json92
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/elementsPanel.css97
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionAPI.js1059
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionAuditCategory.js228
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionPanel.js261
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionRegistryStub.js (renamed from chromium/third_party/WebKit/Source/devtools/front_end/ExtensionRegistryStub.js)0
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionServer.js1086
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionView.js101
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/extensions/module.json10
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/externs.js281
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/filter.css39
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/filteredItemSelectionDialog.css31
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/flameChart.css45
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/heapProfiler.css219
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/helpScreen.css59
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/inspector.css630
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/inspector.html298
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/inspector.js966
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/inspectorCommon.css36
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/inspectorSyntaxHighlight.css13
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/layers/LayerDetailsView.js197
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/layers/LayerPaintProfilerView.js59
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/layers/LayerTreeOutline.js224
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/layers/LayersPanel.js233
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/layers/PaintProfilerView.js336
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/layers/module.json18
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/layersPanel.css80
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/main/AdvancedApp.js198
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/main/App.js68
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/main/HelpScreenUntilReload.js57
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/main/Main.js830
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/main/ScreencastApp.js90
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/main/SimpleApp.js23
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/main/module.json169
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/navigatorView.css3
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/network/HAREntry.js439
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/network/NetworkItemView.js185
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js2966
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/network/RequestCookiesView.js94
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/network/RequestHTMLView.js75
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/network/RequestHeadersView.js519
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/network/RequestJSONView.js128
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/network/RequestPreviewView.js139
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/network/RequestResponseView.js96
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/network/RequestTimingView.js186
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/network/RequestView.js84
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/network/ResourceWebSocketFrameView.js134
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/network/module.json23
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/networkLogView.css142
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/networkPanel.css41
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/overrides.css161
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/panelEnablerView.css15
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/popover.css2
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileBottomUpDataGrid.js296
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileDataGrid.js450
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileFlameChart.js650
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileTopDownDataGrid.js144
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js897
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/CanvasProfileView.js1276
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/CanvasReplayStateView.js529
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/HeapSnapshotCommon.js349
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/HeapSnapshotDataGrids.js1155
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/HeapSnapshotGridNodes.js1616
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/HeapSnapshotProxy.js550
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/HeapSnapshotView.js2285
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/ProfileLauncherView.js232
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js1350
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/heap_snapshot_worker/AllocationProfile.js422
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/heap_snapshot_worker/HeapSnapshot.js2293
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/heap_snapshot_worker/HeapSnapshotLoader.js269
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/heap_snapshot_worker/HeapSnapshotWorker.js49
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.js111
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/heap_snapshot_worker/JSHeapSnapshot.js824
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profiler/module.json31
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/profilesPanel.css115
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/resourceView.css13
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/resources/ApplicationCacheItemsView.js269
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/resources/CookieItemsView.js187
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/resources/DOMStorageItemsView.js261
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/resources/DatabaseQueryView.js207
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/resources/DatabaseTableView.js101
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/resources/DirectoryContentView.js185
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/resources/FileContentView.js173
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/resources/FileSystemView.js243
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js430
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js2127
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/resources/module.json18
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/resourcesPanel.css16
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/responsiveDesignView.css494
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/screencastView.css54
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/script_formatter_worker/CSSFormatter.js291
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/script_formatter_worker/JavaScriptFormatter.js1028
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/script_formatter_worker/ScriptFormatterWorker.js498
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/ApplicationCacheModel.js261
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/BreakpointManager.js908
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/CPUProfileModel.js288
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/CPUProfilerModel.js130
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/CSSMetadata.js1013
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/CSSParser.js129
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/CSSStyleModel.js1812
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/CSSStyleSheetMapping.js68
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/CompilerScriptMapping.js261
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js468
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/ContentProvider.js91
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/ContentProviderBasedProjectDelegate.js342
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/ContentProviders.js323
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/CookieParser.js437
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js1867
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/DOMStorage.js317
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/Database.js215
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js1191
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerScriptMapping.js66
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/DefaultScriptMapping.js155
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/FileManager.js141
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/FileSystemMapping.js444
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/FileSystemModel.js553
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/FileSystemWorkspaceBinding.js588
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/FileUtils.js383
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/IndexedDBModel.js506
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackend.js877
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/IsolatedFileSystem.js602
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/IsolatedFileSystemManager.js227
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/LayerTreeModel.js1187
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/Linkifier.js298
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/LiveEditSupport.js135
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/NetworkLog.js158
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js572
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js985
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/NetworkUISourceCodeProvider.js265
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/NetworkWorkspaceBinding.js149
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/NotificationService.js22
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/OverridesSupport.js1091
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/PaintProfiler.js74
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/PowerProfiler.js55
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/PresentationConsoleMessageHelper.js201
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js1017
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/Resource.js383
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/ResourceScriptMapping.js409
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js820
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/ResourceType.js185
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/ResourceUtils.js244
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js409
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/SASSSourceMapping.js625
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/Script.js332
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/ScriptSnippetModel.js694
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/SearchConfig.js180
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/SnippetStorage.js216
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js371
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/SourceMapping.js72
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/StylesSourceMapping.js390
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/Target.js339
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/TempFile.js359
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/TimelineManager.js230
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/UISourceCode.js1059
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/WorkerManager.js209
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/WorkerTargetManager.js77
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/Workspace.js779
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sdk/WorkspaceController.js70
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/search/AdvancedSearchView.js442
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/search/FileBasedSearchResultsPane.js231
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/search/SourcesSearchScope.js264
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/search/module.json27
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/settings/EditFileSystemDialog.js405
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/settings/SettingsScreen.js1063
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/settings/module.json23
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sidebarPane.css30
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js2136
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/source_frame/CodeMirrorUtils.js174
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/source_frame/FontView.js144
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/source_frame/GoToLineDialog.js115
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/source_frame/ImageView.js160
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/source_frame/ResourceView.js140
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/source_frame/SourceFrame.js896
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/source_frame/module.json26
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/BreakpointsSidebarPane.js816
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/CSSSourceFrame.js100
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js369
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/EditingLocationHistoryManager.js196
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/FilePathScoreFunction.js (renamed from chromium/third_party/WebKit/Source/devtools/front_end/FilePathScoreFunction.js)0
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/FilteredItemSelectionDialog.js941
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/InplaceFormatterEditorAction.js115
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js845
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js1434
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/Placard.js132
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/RevisionHistoryView.js322
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/ScopeChainSidebarPane.js184
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatter.js270
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js379
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/SimpleHistoryManager.js167
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js205
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js1479
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js708
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/StyleSheetOutlineDialog.js120
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js739
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/TargetsToolbar.js78
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js190
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js518
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/WorkersSidebarPane.js119
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sources/module.json173
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sourcesPanel.css175
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/sourcesView.css89
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/spectrum.css6
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/splitView.css130
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/suggestBox.css104
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/tabbedPane.css24
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/temp_storage_shared_worker/TempStorageSharedWorker.js141
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/test-runner.html366
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/textPrompt.css69
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/CountersGraph.js563
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/Layers3DView.js750
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/MemoryCountersGraph.js100
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelineEventOverview.js155
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js980
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFrameModel.js569
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFrameOverview.js368
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelineJSProfile.js92
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelineLayersView.js91
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelineMemoryOverview.js143
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelineModel.js497
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelineModelImpl.js739
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelineOverviewPane.js429
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js1453
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePowerGraph.js50
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePowerOverview.js217
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePresentationModel.js607
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTracingView.js556
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js654
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtilsImpl.js571
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TimelineView.js1304
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TracingModel.js558
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TracingTimelineModel.js661
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TracingTimelineUIUtils.js729
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/TransformController.js237
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timeline/module.json12
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/timelinePanel.css312
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/treeoutline.js974
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/ActionRegistry.js79
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/Checkbox.js69
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/Context.js119
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/ContextMenu.js307
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/DataGrid.js1837
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/Dialog.js218
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/DropDownMenu.js68
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/EmptyView.js57
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/InplaceEditor.js260
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/KeyboardShortcut.js291
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/PieChart.js115
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/Popover.js395
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/ProgressIndicator.js125
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/ResizerWidget.js156
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/SettingsUI.js265
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/ShortcutRegistry.js214
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/ShowMoreDataGridNode.js153
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/SidebarPane.js207
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/SidebarTreeElement.js195
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/SoftContextMenu.js386
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/SplitView.js888
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/StackView.js73
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/StatusBarButton.js688
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/SuggestBox.js443
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js1180
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/TextEditor.js373
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js908
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/TextUtils.js169
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js911
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/View.js703
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js529
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/ZoomManager.js42
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js990
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/utilities.js1481
-rw-r--r--chromium/third_party/WebKit/Source/devtools/protocol.json675
-rw-r--r--chromium/third_party/WebKit/Source/devtools/scripts/__init__.py (renamed from chromium/third_party/JSON/JSON-2.59/blib/lib/auto/JSON/.exists)0
-rwxr-xr-xchromium/third_party/WebKit/Source/devtools/scripts/check_injected_script_source.py67
-rwxr-xr-xchromium/third_party/WebKit/Source/devtools/scripts/compile_frontend.py724
-rw-r--r--chromium/third_party/WebKit/Source/devtools/scripts/compiler-runner/OWNERS1
-rwxr-xr-xchromium/third_party/WebKit/Source/devtools/scripts/compiler-runner/build_compiler_runner_jar.py73
-rw-r--r--chromium/third_party/WebKit/Source/devtools/scripts/compiler-runner/closure-runner.jarbin0 -> 8163 bytes
-rwxr-xr-x[-rw-r--r--]chromium/third_party/WebKit/Source/devtools/scripts/concatenate_js_files.py22
-rwxr-xr-xchromium/third_party/WebKit/Source/devtools/scripts/concatenate_module_descriptors.py41
-rwxr-xr-xchromium/third_party/WebKit/Source/devtools/scripts/convert_svg_images_to_png.py87
-rw-r--r--chromium/third_party/WebKit/Source/devtools/scripts/devtools_file_hashes.py79
-rw-r--r--chromium/third_party/WebKit/Source/devtools/scripts/frontend_modules.json510
-rwxr-xr-x[-rw-r--r--]chromium/third_party/WebKit/Source/devtools/scripts/generate_devtools_grd.py32
-rwxr-xr-x[-rw-r--r--]chromium/third_party/WebKit/Source/devtools/scripts/generate_devtools_html.py24
-rwxr-xr-xchromium/third_party/WebKit/Source/devtools/scripts/generate_protocol_externs.py81
-rwxr-xr-xchromium/third_party/WebKit/Source/devtools/scripts/generate_supported_css.py84
-rwxr-xr-x[-rw-r--r--]chromium/third_party/WebKit/Source/devtools/scripts/inline_js_imports.py19
-rw-r--r--chromium/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/Manifest.txt1
-rw-r--r--chromium/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/PRESUBMIT.py55
-rwxr-xr-xchromium/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/build-jsdoc-validator-jar.sh42
-rwxr-xr-xchromium/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/build_jsdoc_validator_jar.py165
-rw-r--r--chromium/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/hashes2
-rw-r--r--chromium/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/jsdoc-validator.jarbin13733 -> 38348 bytes
-rwxr-xr-xchromium/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/run_tests.py74
-rw-r--r--chromium/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/DEPS3
-rwxr-xr-xchromium/third_party/WebKit/Source/devtools/scripts/optimize_png_images.py103
-rw-r--r--chromium/third_party/WebKit/Source/devtools/scripts/rjsmin.py300
-rw-r--r--chromium/third_party/WebKit/Source/heap/Heap.cpp269
-rw-r--r--chromium/third_party/WebKit/Source/heap/Heap.h411
-rw-r--r--chromium/third_party/WebKit/Source/heap/HeapExport.h53
-rw-r--r--chromium/third_party/WebKit/Source/heap/HeapTest.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/heap/ThreadState.cpp98
-rw-r--r--chromium/third_party/WebKit/Source/heap/ThreadState.h93
-rw-r--r--chromium/third_party/WebKit/Source/heap/Visitor.h73
-rw-r--r--chromium/third_party/WebKit/Source/heap/asm/SaveRegisters_arm.S52
-rw-r--r--chromium/third_party/WebKit/Source/heap/asm/SaveRegisters_mips.S41
-rw-r--r--chromium/third_party/WebKit/Source/heap/asm/SaveRegisters_x86.asm132
-rwxr-xr-xchromium/third_party/WebKit/Source/heap/blink_heap.gyp105
-rwxr-xr-xchromium/third_party/WebKit/Source/heap/blink_heap.gypi61
-rw-r--r--chromium/third_party/WebKit/Source/heap/blink_heap_tests.gyp57
-rw-r--r--chromium/third_party/WebKit/Source/modules/BUILD.gn101
-rw-r--r--chromium/third_party/WebKit/Source/modules/EventModules.h11
-rw-r--r--chromium/third_party/WebKit/Source/modules/EventModulesFactory.h29
-rw-r--r--chromium/third_party/WebKit/Source/modules/EventTargetModules.h31
-rw-r--r--chromium/third_party/WebKit/Source/modules/EventTargetModulesFactory.in31
-rw-r--r--chromium/third_party/WebKit/Source/modules/InitModules.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/modules/InitModules.h27
-rw-r--r--chromium/third_party/WebKit/Source/modules/OWNERS7
-rw-r--r--chromium/third_party/WebKit/Source/modules/battery/BatteryDispatcher.cpp50
-rw-r--r--chromium/third_party/WebKit/Source/modules/battery/BatteryDispatcher.h41
-rw-r--r--chromium/third_party/WebKit/Source/modules/battery/BatteryManager.cpp149
-rw-r--r--chromium/third_party/WebKit/Source/modules/battery/BatteryManager.h74
-rw-r--r--chromium/third_party/WebKit/Source/modules/battery/BatteryManager.idl19
-rw-r--r--chromium/third_party/WebKit/Source/modules/battery/BatteryStatus.cpp38
-rw-r--r--chromium/third_party/WebKit/Source/modules/battery/BatteryStatus.h38
-rw-r--r--chromium/third_party/WebKit/Source/modules/battery/NavigatorBattery.cpp55
-rw-r--r--chromium/third_party/WebKit/Source/modules/battery/NavigatorBattery.h39
-rw-r--r--chromium/third_party/WebKit/Source/modules/battery/NavigatorBattery.idl10
-rw-r--r--chromium/third_party/WebKit/Source/modules/battery/OWNERS1
-rw-r--r--chromium/third_party/WebKit/Source/modules/beacon/NavigatorBeacon.cpp161
-rw-r--r--chromium/third_party/WebKit/Source/modules/beacon/NavigatorBeacon.h54
-rw-r--r--chromium/third_party/WebKit/Source/modules/beacon/NavigatorBeacon.idl15
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/AesCbcParams.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/AesCbcParams.h53
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/AesCbcParams.idl35
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/AesCtrParams.cpp59
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/AesCtrParams.h54
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/AesCtrParams.idl36
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/AesKeyAlgorithm.cpp61
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/AesKeyAlgorithm.h58
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/AesKeyAlgorithm.idl35
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/AesKeyGenParams.cpp50
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/AesKeyGenParams.h51
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/AesKeyGenParams.idl35
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/Algorithm.cpp87
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/Algorithm.h58
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/Algorithm.idl36
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/Crypto.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/Crypto.h14
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/Crypto.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/CryptoResultImpl.cpp145
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/CryptoResultImpl.h39
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/DOMWindowCrypto.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/DOMWindowCrypto.h16
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/HmacKeyAlgorithm.cpp68
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/HmacKeyAlgorithm.h57
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/HmacKeyAlgorithm.idl36
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/HmacKeyParams.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/HmacKeyParams.h55
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/HmacKeyParams.idl36
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/HmacParams.cpp52
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/HmacParams.h53
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/HmacParams.idl35
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/Key.cpp89
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/Key.h29
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/Key.idl5
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/KeyAlgorithm.cpp102
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/KeyAlgorithm.h69
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/KeyAlgorithm.idl37
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/KeyPair.cpp55
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/KeyPair.h61
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/KeyPair.idl36
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/NormalizeAlgorithm.cpp642
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/NormalizeAlgorithm.h41
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/RsaHashedKeyAlgorithm.cpp63
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/RsaHashedKeyAlgorithm.h56
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/RsaHashedKeyAlgorithm.idl35
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/RsaKeyAlgorithm.cpp76
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/RsaKeyAlgorithm.h58
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/RsaKeyAlgorithm.idl36
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/RsaKeyGenParams.cpp59
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/RsaKeyGenParams.h55
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/RsaKeyGenParams.idl36
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/RsaSsaParams.cpp52
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/RsaSsaParams.h53
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/RsaSsaParams.idl35
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/SubtleCrypto.cpp376
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/SubtleCrypto.h34
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/SubtleCrypto.idl49
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/WindowCrypto.idl3
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/WorkerCrypto.cpp41
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/WorkerCrypto.h51
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/WorkerCrypto.idl35
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/WorkerGlobalScopeCrypto.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/WorkerGlobalScopeCrypto.h21
-rw-r--r--chromium/third_party/WebKit/Source/modules/crypto/WorkerGlobalScopeCrypto.idl6
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_light/DOMWindowDeviceLight.h19
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_light/DeviceLightController.cpp74
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_light/DeviceLightController.h40
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_light/DeviceLightDispatcher.cpp50
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_light/DeviceLightDispatcher.h39
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_light/DeviceLightEvent.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_light/DeviceLightEvent.h56
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_light/DeviceLightEvent.idl10
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_light/WindowDeviceLight.idl10
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DOMWindowDeviceMotion.h19
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DOMWindowDeviceOrientation.h19
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceAcceleration.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceAcceleration.h12
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceAcceleration.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.cpp84
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.h59
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionData.cpp45
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionData.h43
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionDispatcher.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionDispatcher.h17
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionEvent.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionEvent.h34
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionEvent.idl10
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationController.cpp101
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationController.h66
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationData.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationData.h11
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationDispatcher.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationDispatcher.h15
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.h27
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.cpp86
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.h43
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceRotationRate.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceRotationRate.h12
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceRotationRate.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceSensorEventController.cpp112
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceSensorEventController.h71
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceSensorEventDispatcher.cpp94
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceSensorEventDispatcher.h58
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/WindowDeviceMotion.idl9
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/WindowDeviceOrientation.idl9
-rw-r--r--chromium/third_party/WebKit/Source/modules/donottrack/NavigatorDoNotTrack.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/modules/donottrack/NavigatorDoNotTrack.h14
-rw-r--r--chromium/third_party/WebKit/Source/modules/donottrack/NavigatorDoNotTrack.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/encoding/TextDecoder.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/modules/encoding/TextDecoder.h15
-rw-r--r--chromium/third_party/WebKit/Source/modules/encoding/TextDecoder.idl12
-rw-r--r--chromium/third_party/WebKit/Source/modules/encoding/TextEncoder.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/modules/encoding/TextEncoder.h12
-rw-r--r--chromium/third_party/WebKit/Source/modules/encoding/TextEncoder.idl10
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp358
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h84
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.idl18
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyMessageEvent.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyMessageEvent.h14
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyMessageEvent.idl2
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyNeededEvent.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyNeededEvent.h17
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyNeededEvent.idl3
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp268
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.h119
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.idl16
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp153
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.h62
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.idl11
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/MediaKeysClient.h33
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/MediaKeysController.cpp35
-rw-r--r--chromium/third_party/WebKit/Source/modules/encryptedmedia/MediaKeysController.h39
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DOMFilePath.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DOMFilePath.h2
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp40
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.h113
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.idl3
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.h12
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp66
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.h17
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.idl3
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.h7
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DataTransferItemFileSystem.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DataTransferItemFileSystem.h4
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DataTransferItemFileSystem.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DirectoryEntry.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DirectoryEntry.h17
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DirectoryEntrySync.cpp31
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DirectoryEntrySync.h21
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DirectoryReader.cpp94
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DirectoryReader.h29
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DirectoryReader.idl3
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DirectoryReaderBase.h16
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.cpp78
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.h36
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.idl3
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DraggedIsolatedFileSystem.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DraggedIsolatedFileSystem.h24
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/EntriesCallback.h6
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/Entry.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/Entry.h11
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/Entry.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/EntryBase.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/EntryBase.h15
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/EntrySync.cpp45
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/EntrySync.h19
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/EntrySync.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/FileEntry.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/FileEntry.h13
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/FileEntrySync.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/FileEntrySync.h20
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp145
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.h78
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/FileSystemClient.h8
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/FileWriter.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/FileWriter.h19
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/FileWriter.idl3
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/FileWriterBase.h8
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/FileWriterSync.h8
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/FileWriterSync.idl3
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/HTMLInputElementFileSystem.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/HTMLInputElementFileSystem.h3
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/HTMLInputElementFileSystem.idl7
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/InspectorFileSystemAgent.cpp730
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/InspectorFileSystemAgent.h72
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/InspectorFrontendHostFileSystem.cpp39
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/InspectorFrontendHostFileSystem.h27
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/InspectorFrontendHostFileSystem.idl10
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp112
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.h24
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/Metadata.h14
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/Metadata.idl3
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/OWNERS2
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/SyncCallbackHelper.h63
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/WindowFileSystem.idl3
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.cpp51
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.h10
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/Gamepad.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/Gamepad.h36
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/Gamepad.idl9
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/GamepadButton.cpp30
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/GamepadButton.h38
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/GamepadButton.idl11
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/GamepadCommon.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/GamepadCommon.h70
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/GamepadDispatcher.cpp63
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/GamepadDispatcher.h53
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/GamepadEvent.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/GamepadEvent.h51
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/GamepadEvent.idl9
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/GamepadList.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/GamepadList.h27
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/GamepadList.idl4
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp185
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.h47
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.idl8
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/OWNERS3
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/WebKitGamepad.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/WebKitGamepad.h38
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/WebKitGamepad.idl15
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/WebKitGamepadList.cpp38
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/WebKitGamepadList.h38
-rw-r--r--chromium/third_party/WebKit/Source/modules/gamepad/WebKitGamepadList.idl11
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/Coordinates.h13
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/Coordinates.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp174
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/Geolocation.h61
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/Geolocation.idl13
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/GeolocationClient.h12
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/GeolocationController.cpp79
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/GeolocationController.h32
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/GeolocationError.h11
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/GeolocationInspectorAgent.cpp102
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/GeolocationInspectorAgent.h75
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/GeolocationPosition.h18
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/Geoposition.h19
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/Geoposition.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/NavigatorGeolocation.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/NavigatorGeolocation.h16
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/NavigatorGeolocation.idl3
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/PositionError.h8
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/PositionError.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/PositionOptions.h36
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/testing/GeolocationClientMock.cpp187
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/testing/GeolocationClientMock.h99
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/testing/InternalsGeolocation.cpp100
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/testing/InternalsGeolocation.h57
-rw-r--r--chromium/third_party/WebKit/Source/modules/geolocation/testing/InternalsGeolocation.idl37
-rw-r--r--chromium/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapFactories.cpp223
-rw-r--r--chromium/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapFactories.h73
-rw-r--r--chromium/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapFactories.idl36
-rw-r--r--chromium/third_party/WebKit/Source/modules/imagebitmap/WindowImageBitmapFactories.idl19
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/DOMWindowIndexedDatabase.cpp31
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/DOMWindowIndexedDatabase.h18
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBAny.cpp55
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBAny.h76
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp171
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBCursor.h69
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBCursor.idl16
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBCursorWithValue.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBCursorWithValue.h13
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBCursorWithValue.idl5
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp122
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h62
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.idl23
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h19
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBEventDispatcher.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBEventDispatcher.h3
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBFactory.cpp78
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBFactory.h29
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBFactory.idl9
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBFactoryBackendInterface.h50
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBIndex.cpp113
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBIndex.h32
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBIndex.idl13
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBKey.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBKey.h40
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBKeyRange.cpp59
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBKeyRange.h33
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBKeyRange.idl5
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp268
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.h63
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.idl23
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.h14
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBPendingTransactionMonitor.cpp45
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBPendingTransactionMonitor.h18
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp150
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBRequest.h110
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBRequest.idl5
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBRequestTest.cpp81
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp116
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.h67
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.idl3
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBTransactionTest.cpp80
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBVersionChangeEvent.cpp38
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBVersionChangeEvent.h44
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IDBVersionChangeEvent.idl8
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IndexedDB.h13
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.h54
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp777
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.h69
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/PageGroupIndexedDatabase.cpp66
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/PageGroupIndexedDatabase.h52
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.cpp33
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.h33
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/WebIDBDatabaseCallbacksImpl.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/WebIDBDatabaseCallbacksImpl.h16
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/WindowIndexedDatabase.idl13
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h17
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl4
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/chromium/IDBFactoryBackendInterfaceChromium.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/modules/indexeddb/chromium/IDBFactoryBackendInterfaceChromium.h41
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/HTMLVideoElementMediaSource.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/HTMLVideoElementMediaSource.h3
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/HTMLVideoElementMediaSource.idl7
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/MediaSource.cpp390
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/MediaSource.h86
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/MediaSource.idl12
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/MediaSourceBase.cpp318
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/MediaSourceBase.h111
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/MediaSourceRegistry.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/MediaSourceRegistry.h7
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp258
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/SourceBuffer.h25
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/SourceBuffer.idl20
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/SourceBufferList.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/SourceBufferList.h16
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/SourceBufferList.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/URLMediaSource.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/URLMediaSource.h4
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/URLMediaSource.idl10
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/VideoPlaybackQuality.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/VideoPlaybackQuality.h7
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/VideoPlaybackQuality.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/WebKitMediaSource.cpp207
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/WebKitMediaSource.h75
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/WebKitMediaSource.idl54
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/WebKitSourceBuffer.cpp169
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/WebKitSourceBuffer.h77
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/WebKitSourceBuffer.idl48
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/WebKitSourceBufferList.cpp105
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/WebKitSourceBufferList.h77
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/WebKitSourceBufferList.idl38
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediasource/WindowMediaSource.idl34
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/DOMWindowMediaStream.h7
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.cpp103
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.h26
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaDeviceInfo.cpp74
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaDeviceInfo.h58
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaDeviceInfo.idl40
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaDeviceInfoCallback.h41
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaDeviceInfoCallback.idl29
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaDevicesRequest.cpp83
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaDevicesRequest.h71
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaStream.cpp191
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaStream.h38
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaStream.idl4
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaStreamEvent.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaStreamEvent.h14
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaStreamRegistry.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaStreamRegistry.h4
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp91
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.h29
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.idl2
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackEvent.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackEvent.h14
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesRequest.cpp71
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesRequest.h77
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesRequestImpl.cpp78
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackSourcesRequestImpl.h68
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.cpp32
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.h5
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.idl11
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/NavigatorUserMediaError.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/NavigatorUserMediaError.h17
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/NavigatorUserMediaError.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/OWNERS1
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCDTMFSender.cpp45
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCDTMFSender.h34
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCDTMFSender.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCDTMFToneChangeEvent.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCDTMFToneChangeEvent.h14
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp73
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.h49
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.idl29
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCDataChannelEvent.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCDataChannelEvent.h16
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCIceCandidate.cpp30
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCIceCandidate.h13
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCIceCandidate.idl7
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCIceCandidateEvent.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCIceCandidateEvent.h16
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp386
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h79
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.idl6
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCSessionDescription.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCSessionDescription.h8
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCSessionDescription.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionRequestImpl.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionRequestImpl.h13
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCStatsReport.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCStatsReport.h10
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCStatsReport.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCStatsRequestImpl.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCStatsRequestImpl.h18
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCStatsResponse.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCStatsResponse.h13
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCStatsResponse.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCVoidRequestImpl.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCVoidRequestImpl.h17
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/SourceInfo.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/SourceInfo.h8
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/SourceInfo.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/URLMediaStream.idl5
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/UserMediaClient.h9
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/UserMediaController.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/UserMediaController.h32
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp74
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.h28
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/WebMediaStreamTrackSourcesRequest.cpp93
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/WindowMediaStream.idl11
-rw-r--r--chromium/third_party/WebKit/Source/modules/modules.gni50
-rw-r--r--chromium/third_party/WebKit/Source/modules/modules.gyp116
-rw-r--r--chromium/third_party/WebKit/Source/modules/modules.gypi438
-rw-r--r--chromium/third_party/WebKit/Source/modules/modules_generated.gypi9
-rw-r--r--chromium/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp88
-rw-r--r--chromium/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.h32
-rw-r--r--chromium/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.idl7
-rw-r--r--chromium/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtilsClient.h14
-rw-r--r--chromium/third_party/WebKit/Source/modules/navigatorcontentutils/testing/InternalsNavigatorContentUtils.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/modules/navigatorcontentutils/testing/InternalsNavigatorContentUtils.h21
-rw-r--r--chromium/third_party/WebKit/Source/modules/navigatorcontentutils/testing/InternalsNavigatorContentUtils.idl7
-rw-r--r--chromium/third_party/WebKit/Source/modules/navigatorcontentutils/testing/NavigatorContentUtilsClientMock.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/modules/navigatorcontentutils/testing/NavigatorContentUtilsClientMock.h41
-rw-r--r--chromium/third_party/WebKit/Source/modules/netinfo/NavigatorNetworkInformation.cpp64
-rw-r--r--chromium/third_party/WebKit/Source/modules/netinfo/NavigatorNetworkInformation.h41
-rw-r--r--chromium/third_party/WebKit/Source/modules/netinfo/NavigatorNetworkInformation.idl9
-rw-r--r--chromium/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp149
-rw-r--r--chromium/third_party/WebKit/Source/modules/netinfo/NetworkInformation.h65
-rw-r--r--chromium/third_party/WebKit/Source/modules/netinfo/NetworkInformation.idl23
-rw-r--r--chromium/third_party/WebKit/Source/modules/netinfo/WorkerNavigatorNetworkInformation.cpp60
-rw-r--r--chromium/third_party/WebKit/Source/modules/netinfo/WorkerNavigatorNetworkInformation.h40
-rw-r--r--chromium/third_party/WebKit/Source/modules/netinfo/WorkerNavigatorNetworkInformation.idl10
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/DOMWindowNotifications.cpp107
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/DOMWindowNotifications.h65
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/Notification.cpp130
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/Notification.h86
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/Notification.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/NotificationBase.cpp154
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/NotificationBase.h122
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/NotificationCenter.cpp134
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/NotificationCenter.h101
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/NotificationCenter.idl42
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/NotificationClient.h20
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/NotificationController.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/NotificationController.h23
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/OWNERS1
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/WebKitNotification.cpp83
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/WebKitNotification.h75
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/WebKitNotification.idl47
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/WindowNotifications.idl32
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/WorkerGlobalScopeNotifications.cpp77
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/WorkerGlobalScopeNotifications.h61
-rw-r--r--chromium/third_party/WebKit/Source/modules/notifications/WorkerGlobalScopeNotifications.idl31
-rw-r--r--chromium/third_party/WebKit/Source/modules/performance/SharedWorkerPerformance.cpp79
-rw-r--r--chromium/third_party/WebKit/Source/modules/performance/SharedWorkerPerformance.h60
-rw-r--r--chromium/third_party/WebKit/Source/modules/performance/SharedWorkerPerformance.idl35
-rw-r--r--chromium/third_party/WebKit/Source/modules/performance/WorkerGlobalScopePerformance.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/modules/performance/WorkerGlobalScopePerformance.h20
-rw-r--r--chromium/third_party/WebKit/Source/modules/performance/WorkerGlobalScopePerformance.idl2
-rw-r--r--chromium/third_party/WebKit/Source/modules/performance/WorkerPerformance.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/modules/performance/WorkerPerformance.h17
-rw-r--r--chromium/third_party/WebKit/Source/modules/performance/WorkerPerformance.idl5
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/NavigatorPushManager.cpp55
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/NavigatorPushManager.h36
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/NavigatorPushManager.idl9
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/OWNERS1
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/PushController.cpp40
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/PushController.h44
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/PushError.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/PushError.h29
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/PushEvent.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/PushEvent.h51
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/PushEvent.idl10
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/PushManager.h36
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/PushManager.idl11
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/PushRegistration.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/PushRegistration.h44
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/PushRegistration.idl11
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/ServiceWorkerGlobalScopePush.h19
-rw-r--r--chromium/third_party/WebKit/Source/modules/push_messaging/ServiceWorkerGlobalScopePush.idl9
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/DOMWindowQuota.cpp32
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/DOMWindowQuota.h20
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/DeprecatedStorageInfo.cpp99
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/DeprecatedStorageInfo.h77
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/DeprecatedStorageInfo.idl35
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.cpp101
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.h72
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.idl32
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuotaCallbacksImpl.cpp73
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuotaCallbacksImpl.h73
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/NavigatorStorageQuota.cpp49
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/NavigatorStorageQuota.h31
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/NavigatorStorageQuota.idl6
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/OWNERS2
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/StorageErrorCallback.h5
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/StorageInfo.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/StorageInfo.h38
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/StorageInfo.idl50
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/StorageQuota.cpp79
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/StorageQuota.h31
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/StorageQuota.idl53
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/StorageQuotaCallbacksImpl.cpp64
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/StorageQuotaCallbacksImpl.h64
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/StorageQuotaClient.cpp56
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/StorageQuotaClient.h63
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/WebStorageQuotaCallbacksImpl.cpp76
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/WebStorageQuotaCallbacksImpl.h76
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/WindowQuota.idl5
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/WorkerNavigatorStorageQuota.cpp37
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/WorkerNavigatorStorageQuota.h25
-rw-r--r--chromium/third_party/WebKit/Source/modules/quota/WorkerNavigatorStorageQuota.idl4
-rw-r--r--chromium/third_party/WebKit/Source/modules/screen_orientation/LockOrientationCallback.cpp78
-rw-r--r--chromium/third_party/WebKit/Source/modules/screen_orientation/LockOrientationCallback.h37
-rw-r--r--chromium/third_party/WebKit/Source/modules/screen_orientation/OWNERS2
-rw-r--r--chromium/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.cpp161
-rw-r--r--chromium/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.h48
-rw-r--r--chromium/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.idl30
-rw-r--r--chromium/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationController.cpp136
-rw-r--r--chromium/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationController.h53
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/Client.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/Client.h31
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/Client.idl16
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.cpp57
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.h46
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.idl13
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/FetchManager.cpp172
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/FetchManager.h36
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/HeaderMap.cpp93
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/HeaderMap.h47
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/HeaderMap.idl28
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/HeaderMapForEachCallback.h23
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/HeaderMapForEachCallback.idl8
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/InstallEvent.cpp91
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/InstallEvent.h63
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/InstallEvent.idl38
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/InstallPhaseEvent.cpp80
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/InstallPhaseEvent.h62
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/InstallPhaseEvent.idl37
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/NavigatorServiceWorker.cpp158
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/NavigatorServiceWorker.h70
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/NavigatorServiceWorker.idl39
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/OWNERS5
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/RegistrationOptionList.h25
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/Request.cpp74
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/Request.h50
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/Request.idl26
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/RequestInit.h31
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp124
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.h54
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/Response.cpp51
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/Response.h48
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/Response.idl20
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ResponseInit.h32
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp202
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.h63
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.idl19
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp63
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.h33
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.idl11
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp230
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.h93
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.idl44
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp61
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainerClient.h53
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerError.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerError.h13
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp66
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h33
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.idl17
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h79
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerThread.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerThread.h12
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp127
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h59
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/polyfills/cachePolyfill.js120
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/polyfills/cacheStoragePolyfill.js91
-rw-r--r--chromium/third_party/WebKit/Source/modules/serviceworkers/polyfills/fetchPolyfill.js51
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/DOMWindowSpeech.h7
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/DOMWindowSpeechSynthesis.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/DOMWindowSpeechSynthesis.h16
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechGrammar.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechGrammar.h10
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechGrammar.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechGrammarList.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechGrammarList.h11
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechGrammarList.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognition.cpp33
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognition.h38
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognition.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognitionAlternative.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognitionAlternative.h8
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognitionAlternative.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognitionClient.h2
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognitionController.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognitionController.h13
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognitionError.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognitionError.h16
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognitionEvent.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognitionEvent.h25
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognitionResult.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognitionResult.h13
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognitionResult.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognitionResultList.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognitionResultList.h13
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechRecognitionResultList.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechSynthesis.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechSynthesis.h41
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechSynthesis.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechSynthesisEvent.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechSynthesisEvent.h16
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.h23
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.idl3
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.h15
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/WindowSpeech.idl14
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/WindowSpeechSynthesis.idl2
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/testing/InternalsSpeechSynthesis.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/testing/InternalsSpeechSynthesis.h2
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/testing/PlatformSpeechSynthesizerMock.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/modules/speech/testing/PlatformSpeechSynthesizerMock.h22
-rw-r--r--chromium/third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp33
-rw-r--r--chromium/third_party/WebKit/Source/modules/vibration/NavigatorVibration.h20
-rw-r--r--chromium/third_party/WebKit/Source/modules/vibration/NavigatorVibration.idl10
-rw-r--r--chromium/third_party/WebKit/Source/modules/vibration/testing/InternalsVibration.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/modules/vibration/testing/InternalsVibration.h4
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AnalyserNode.cpp45
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AnalyserNode.h23
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AnalyserNode.idl7
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.h5
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioBasicInspectorNode.h8
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorNode.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorNode.h15
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp99
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioBuffer.h24
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioBuffer.idl5
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp75
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h28
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.idl24
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp333
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioContext.h111
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioContext.idl15
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.h18
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp96
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioListener.h45
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioListener.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp41
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioNode.h41
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioNode.idl35
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.h2
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.h7
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioParam.h13
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioParam.idl5
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h2
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioProcessingEvent.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioProcessingEvent.h20
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioProcessingEvent.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.h7
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioSourceNode.h4
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/AudioSummingJunction.h8
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.cpp134
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.h19
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.h8
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.idl23
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.h14
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp31
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.h9
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.h7
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/ConvolverNode.h20
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/ConvolverNode.idl2
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/DOMWindowWebAudio.h7
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.h7
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/DelayDSPKernel.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/DelayDSPKernel.h2
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/DelayNode.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/DelayNode.h6
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/DelayProcessor.h6
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.h27
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/GainNode.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/GainNode.h15
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.h20
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.h9
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.h22
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/OWNERS1
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/OfflineAudioCompletionEvent.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/OfflineAudioCompletionEvent.h16
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.h4
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.h13
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/OscillatorNode.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h18
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/OscillatorNode.idl25
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp332
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/PannerNode.h113
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/PannerNode.idl25
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/PeriodicWave.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/PeriodicWave.h17
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/PeriodicWave.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.cpp41
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.h17
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp52
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.h20
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/WaveShaperDSPKernel.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/WaveShaperDSPKernel.h6
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/WaveShaperNode.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/WaveShaperNode.h8
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/WaveShaperNode.idl8
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.h9
-rw-r--r--chromium/third_party/WebKit/Source/modules/webaudio/WindowWebAudio.idl12
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/AbstractDatabaseServer.h3
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/AbstractSQLStatement.h5
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/AbstractSQLStatementBackend.h8
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/AbstractSQLTransaction.h4
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/AbstractSQLTransactionBackend.h8
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/ChangeVersionWrapper.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/ChangeVersionWrapper.h18
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.h7
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/Database.cpp77
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/Database.h17
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/Database.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.h8
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseBackend.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseBackend.h11
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendBase.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendBase.h17
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendSync.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendSync.h5
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseBase.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseBase.h8
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseClient.cpp33
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseClient.h19
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseContext.cpp100
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseContext.h50
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseDetails.h79
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp127
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.h36
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseObserver.h60
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseServer.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseServer.h17
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseSync.cpp53
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseSync.h36
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseSync.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseTask.cpp35
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseTask.h82
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.h30
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseTracker.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/DatabaseTracker.h1
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.cpp316
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.h85
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseResource.cpp70
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseResource.h67
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/QuotaTracker.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLCallbackWrapper.h17
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLError.cpp1
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLError.h36
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLError.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLResultSet.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLResultSet.h11
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLResultSet.idl3
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLResultSetRowList.h6
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLResultSetRowList.idl5
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLStatement.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLStatement.h13
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.cpp57
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.h19
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLStatementSync.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLStatementSync.h3
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp41
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.h14
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.idl5
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackend.cpp67
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackend.h37
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackendSync.cpp41
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackendSync.h10
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLTransactionClient.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCoordinator.cpp30
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCoordinator.h25
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLTransactionSync.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLTransactionSync.h4
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/SQLTransactionSync.idl5
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/WindowWebDatabase.idl6
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.h5
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.idl9
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteAuthorizer.cpp1
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteDatabase.cpp79
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteDatabase.h31
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystem.cpp49
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystem.h50
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteStatement.cpp270
-rw-r--r--chromium/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteStatement.h27
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIAccess.cpp152
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIAccess.h44
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIAccess.idl2
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIAccessInitializer.cpp98
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIAccessInitializer.h76
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIAccessPromise.cpp140
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIAccessPromise.h89
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIAccessPromise.idl39
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIAccessor.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIAccessor.h8
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIAccessorClient.h2
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIClient.h13
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIClientMock.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIClientMock.h9
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIConnectionEvent.cpp76
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIConnectionEvent.h54
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIController.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIController.h25
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIInput.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIInput.h15
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIInput.idl3
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIMessageEvent.h18
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp177
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIOutput.h12
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIOutput.idl6
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIPort.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIPort.h22
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/MIDIPort.idl1
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.cpp41
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.h16
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.idl6
-rw-r--r--chromium/third_party/WebKit/Source/modules/webmidi/OWNERS1
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/CloseEvent.h19
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/MainThreadWebSocketChannel.cpp233
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/MainThreadWebSocketChannel.h68
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/NewWebSocketChannelImpl.cpp186
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/NewWebSocketChannelImpl.h41
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/OWNERS3
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp232
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/ThreadableWebSocketChannelClientWrapper.h71
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/WebSocket.cpp217
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/WebSocket.h83
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/WebSocket.idl37
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/WebSocketChannel.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/WebSocketChannel.h27
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/WebSocketChannelClient.h34
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/WebSocketDeflateFramer.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/WebSocketDeflater.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/WebSocketExtensionDispatcherTest.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/WebSocketHandshake.cpp122
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/WebSocketHandshake.h15
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/WebSocketPerMessageDeflate.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/WebSocketPerMessageDeflateTest.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/WebSocketTest.cpp794
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/WorkerThreadableWebSocketChannel.cpp594
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/WorkerThreadableWebSocketChannel.h134
-rw-r--r--chromium/third_party/WebKit/Source/platform/AsyncMethodRunner.h10
-rw-r--r--chromium/third_party/WebKit/Source/platform/BUILD.gn496
-rw-r--r--chromium/third_party/WebKit/Source/platform/CalculationValue.cpp73
-rw-r--r--chromium/third_party/WebKit/Source/platform/CalculationValue.h205
-rw-r--r--chromium/third_party/WebKit/Source/platform/CheckedInt.h2
-rw-r--r--chromium/third_party/WebKit/Source/platform/ColorChooser.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/ColorChooser.h1
-rw-r--r--chromium/third_party/WebKit/Source/platform/ColorChooserClient.h1
-rw-r--r--chromium/third_party/WebKit/Source/platform/ContentDecryptionModuleResult.h37
-rw-r--r--chromium/third_party/WebKit/Source/platform/CrossThreadCopier.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/platform/CrossThreadCopier.h51
-rw-r--r--chromium/third_party/WebKit/Source/platform/Crypto.cpp67
-rw-r--r--chromium/third_party/WebKit/Source/platform/Crypto.h66
-rw-r--r--chromium/third_party/WebKit/Source/platform/CryptoResult.h60
-rw-r--r--chromium/third_party/WebKit/Source/platform/DEPS2
-rw-r--r--chromium/third_party/WebKit/Source/platform/DateComponents.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/platform/DateComponents.h1
-rw-r--r--chromium/third_party/WebKit/Source/platform/DateTimeChooser.h5
-rw-r--r--chromium/third_party/WebKit/Source/platform/DateTimeChooserClient.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/DateTimeChooserClient.h8
-rw-r--r--chromium/third_party/WebKit/Source/platform/Decimal.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/platform/DecimalTest.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/platform/DragImage.cpp272
-rw-r--r--chromium/third_party/WebKit/Source/platform/DragImage.h63
-rw-r--r--chromium/third_party/WebKit/Source/platform/DragImageTest.cpp168
-rw-r--r--chromium/third_party/WebKit/Source/platform/EventTracer.cpp33
-rw-r--r--chromium/third_party/WebKit/Source/platform/EventTracer.h27
-rw-r--r--chromium/third_party/WebKit/Source/platform/FileChooser.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/HostWindow.h3
-rw-r--r--chromium/third_party/WebKit/Source/platform/JSONValues.cpp114
-rw-r--r--chromium/third_party/WebKit/Source/platform/JSONValues.h119
-rw-r--r--chromium/third_party/WebKit/Source/platform/Language.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/platform/Language.h10
-rw-r--r--chromium/third_party/WebKit/Source/platform/LayoutTestSupport.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/platform/LayoutTestSupport.h2
-rw-r--r--chromium/third_party/WebKit/Source/platform/LayoutUnit.h27
-rw-r--r--chromium/third_party/WebKit/Source/platform/Length.cpp50
-rw-r--r--chromium/third_party/WebKit/Source/platform/Length.h86
-rw-r--r--chromium/third_party/WebKit/Source/platform/LengthBox.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/platform/LengthBox.h22
-rw-r--r--chromium/third_party/WebKit/Source/platform/LengthFunctions.cpp81
-rw-r--r--chromium/third_party/WebKit/Source/platform/LengthFunctions.h7
-rw-r--r--chromium/third_party/WebKit/Source/platform/LengthPoint.h10
-rw-r--r--chromium/third_party/WebKit/Source/platform/LengthSize.h12
-rw-r--r--chromium/third_party/WebKit/Source/platform/LifecycleObserver.h2
-rw-r--r--chromium/third_party/WebKit/Source/platform/LinkHash.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/platform/Logging.cpp52
-rw-r--r--chromium/third_party/WebKit/Source/platform/MIMETypeRegistry.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/platform/MIMETypeRegistry.h3
-rw-r--r--chromium/third_party/WebKit/Source/platform/OWNERS6
-rw-r--r--chromium/third_party/WebKit/Source/platform/PODArena.h4
-rw-r--r--chromium/third_party/WebKit/Source/platform/PODIntervalTree.h6
-rw-r--r--chromium/third_party/WebKit/Source/platform/PODRedBlackTree.h2
-rw-r--r--chromium/third_party/WebKit/Source/platform/ParsingUtilities.h7
-rw-r--r--chromium/third_party/WebKit/Source/platform/Partitions.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/Partitions.h9
-rw-r--r--chromium/third_party/WebKit/Source/platform/PermissionCallbacks.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/platform/PermissionCallbacks.h33
-rw-r--r--chromium/third_party/WebKit/Source/platform/PlatformInstrumentation.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/PlatformInstrumentation.h8
-rw-r--r--chromium/third_party/WebKit/Source/platform/PlatformKeyboardEvent.h6
-rw-r--r--chromium/third_party/WebKit/Source/platform/PlatformScreen.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/platform/PlatformScreen.h6
-rw-r--r--chromium/third_party/WebKit/Source/platform/PlatformTouchEvent.h4
-rw-r--r--chromium/third_party/WebKit/Source/platform/PlatformTouchPoint.h18
-rw-r--r--chromium/third_party/WebKit/Source/platform/PlatformWheelEvent.h20
-rw-r--r--chromium/third_party/WebKit/Source/platform/PopupMenuClient.h17
-rw-r--r--chromium/third_party/WebKit/Source/platform/PopupMenuStyle.h7
-rw-r--r--chromium/third_party/WebKit/Source/platform/Prerender.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/platform/Prerender.h13
-rw-r--r--chromium/third_party/WebKit/Source/platform/PurgeableBuffer.cpp97
-rw-r--r--chromium/third_party/WebKit/Source/platform/PurgeableBuffer.h72
-rw-r--r--chromium/third_party/WebKit/Source/platform/PurgeableVector.cpp262
-rw-r--r--chromium/third_party/WebKit/Source/platform/PurgeableVector.h127
-rw-r--r--chromium/third_party/WebKit/Source/platform/PurgeableVectorTest.cpp337
-rw-r--r--chromium/third_party/WebKit/Source/platform/RefCountedSupplement.h20
-rw-r--r--chromium/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in123
-rw-r--r--chromium/third_party/WebKit/Source/platform/SharedBuffer.cpp140
-rw-r--r--chromium/third_party/WebKit/Source/platform/SharedBuffer.h50
-rw-r--r--chromium/third_party/WebKit/Source/platform/SharedBufferChunkReader.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/SharedBufferTest.cpp116
-rw-r--r--chromium/third_party/WebKit/Source/platform/SharedTimer.h6
-rw-r--r--chromium/third_party/WebKit/Source/platform/StorageQuotaCallbacks.h54
-rw-r--r--chromium/third_party/WebKit/Source/platform/Supplementable.h149
-rw-r--r--chromium/third_party/WebKit/Source/platform/TaskSynchronizer.cpp73
-rw-r--r--chromium/third_party/WebKit/Source/platform/TaskSynchronizer.h69
-rw-r--r--chromium/third_party/WebKit/Source/platform/TestingPlatformSupport.cpp93
-rw-r--r--chromium/third_party/WebKit/Source/platform/TestingPlatformSupport.h79
-rw-r--r--chromium/third_party/WebKit/Source/platform/Theme.h3
-rw-r--r--chromium/third_party/WebKit/Source/platform/ThemeTypes.h26
-rw-r--r--chromium/third_party/WebKit/Source/platform/ThreadTimers.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/platform/Timer.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/platform/Timer.h41
-rw-r--r--chromium/third_party/WebKit/Source/platform/TraceEvent.h128
-rw-r--r--chromium/third_party/WebKit/Source/platform/TraceLocation.h40
-rw-r--r--chromium/third_party/WebKit/Source/platform/TracedValue.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/platform/TracedValue.h35
-rw-r--r--chromium/third_party/WebKit/Source/platform/UUID.h4
-rw-r--r--chromium/third_party/WebKit/Source/platform/UserGestureIndicator.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/platform/UserGestureIndicator.h11
-rw-r--r--chromium/third_party/WebKit/Source/platform/Widget.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/platform/Widget.h7
-rw-r--r--chromium/third_party/WebKit/Source/platform/animation/AnimationUtilities.h6
-rw-r--r--chromium/third_party/WebKit/Source/platform/animation/AnimationValue.h114
-rw-r--r--chromium/third_party/WebKit/Source/platform/animation/KeyframeValueList.cpp52
-rw-r--r--chromium/third_party/WebKit/Source/platform/animation/KeyframeValueList.h90
-rw-r--r--chromium/third_party/WebKit/Source/platform/animation/TimingFunction.cpp159
-rw-r--r--chromium/third_party/WebKit/Source/platform/animation/TimingFunction.h255
-rw-r--r--chromium/third_party/WebKit/Source/platform/animation/TimingFunctionTest.cpp323
-rw-r--r--chromium/third_party/WebKit/Source/platform/animation/UnitBezier.h37
-rw-r--r--chromium/third_party/WebKit/Source/platform/animation/UnitBezierTest.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/AudioBus.cpp56
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/AudioDSPKernelProcessor.h12
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/AudioDelayDSPKernel.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/AudioDelayDSPKernel.h4
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/AudioDestination.cpp180
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/AudioDestination.h51
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/AudioPullFIFO.h2
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/AudioSourceProviderClient.h7
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/DenormalDisabler.h6
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp500
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/DownSampler.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/DynamicsCompressor.cpp78
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/DynamicsCompressor.h11
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/DynamicsCompressorKernel.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/DynamicsCompressorKernel.h2
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/EqualPowerPanner.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/EqualPowerPanner.h4
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/FFTFrame.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/FFTFrame.h24
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/FFTFrameStub.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/HRTFElevation.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/HRTFKernel.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/HRTFPanner.h4
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/MultiChannelResampler.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/Panner.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/Panner.h3
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/UpSampler.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/android/FFTFrameOpenMAXDLAndroid.cpp187
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/chromium/AudioBusChromium.cpp80
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/chromium/AudioDestinationChromium.cpp180
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/chromium/AudioDestinationChromium.h81
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/chromium/FFTFrameOpenMAXDLAndroid.cpp209
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/ffmpeg/FFTFrameFFMPEG.cpp94
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/ipp/FFTFrameIPP.cpp38
-rw-r--r--chromium/third_party/WebKit/Source/platform/audio/mac/FFTFrameMac.cpp41
-rw-r--r--chromium/third_party/WebKit/Source/platform/blink_platform.gyp162
-rw-r--r--chromium/third_party/WebKit/Source/platform/blink_platform.gypi220
-rw-r--r--chromium/third_party/WebKit/Source/platform/blink_platform_tests.gyp157
-rw-r--r--chromium/third_party/WebKit/Source/platform/blob/BlobData.cpp64
-rw-r--r--chromium/third_party/WebKit/Source/platform/blob/BlobData.h19
-rw-r--r--chromium/third_party/WebKit/Source/platform/drm/ContentDecryptionModule.cpp80
-rw-r--r--chromium/third_party/WebKit/Source/platform/drm/ContentDecryptionModule.h64
-rw-r--r--chromium/third_party/WebKit/Source/platform/drm/ContentDecryptionModuleSession.cpp88
-rw-r--r--chromium/third_party/WebKit/Source/platform/drm/ContentDecryptionModuleSession.h86
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebArrayBuffer.cpp85
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebAudioBus.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebBlobData.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebContentDecryptionModuleResult.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebContentDecryptionModuleSession.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebConvertableToTraceFormat.cpp36
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebCryptoAlgorithm.cpp245
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebCryptoKey.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebCryptoKeyAlgorithm.cpp144
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebCryptoResult.cpp110
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebHTTPBody.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebHTTPLoadInfo.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp108
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebMediaDeviceInfo.cpp107
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebMediaStream.cpp161
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebMediaStreamSource.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebMediaStreamTrack.cpp157
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebMediaStreamTrackSourcesRequest.cpp93
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebPermissionCallbacks.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebPrerender.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebRTCICECandidate.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebRTCSessionDescription.cpp109
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebRTCSessionDescriptionRequest.cpp98
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebRTCStatsRequest.cpp81
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebRTCStatsResponse.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebRTCVoidRequest.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebScrollbarThemeClientImpl.h2
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebSerializedOrigin.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebServiceWorkerProxy.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebServiceWorkerRequest.cpp62
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebServiceWorkerResponse.cpp99
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebSocketHandshakeRequestInfo.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebSocketHandshakeResponseInfo.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebSpeechSynthesisUtterance.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebSpeechSynthesisVoice.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebSpeechSynthesizerClientImpl.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebSpeechSynthesizerClientImpl.h13
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebStorageQuotaCallbacks.cpp67
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebString.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebURLError.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebURLRequest.cpp45
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/WebURLRequestPrivate.h4
-rw-r--r--chromium/third_party/WebKit/Source/platform/exported/linux/WebFontInfo.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/AlternateFontFamily.h27
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/Character.cpp392
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/Character.h86
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/CustomFontData.h24
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/Font.cpp1093
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/Font.h154
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontCache.cpp70
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontCache.h39
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontCacheClient.h50
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontCacheTest.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.h19
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontData.h2
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontDataCache.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontDescription.cpp138
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontDescription.h127
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontDescriptionTest.cpp121
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontFallbackList.cpp68
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontFallbackList.h9
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontFastPath.cpp621
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontMetrics.h12
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontPlatformData.h23
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontPlatformFeatures.h49
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontSelector.h20
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontTest.cpp291
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontTraits.h106
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/FontTraitsMask.h70
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/GenericFontFamilySettings.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/GenericFontFamilySettings.h5
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/GlyphBuffer.h76
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/GlyphPage.h52
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/GlyphPageTreeNode.cpp66
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/GlyphPageTreeNodeTest.cpp226
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/SegmentedFontData.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/SegmentedFontData.h13
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/SimpleFontData.h22
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/WidthCache.h37
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/WidthIterator.cpp56
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/WidthIterator.h5
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/android/FontCacheAndroid.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/android/FontCacheAndroidTest.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/cocoa/FontPlatformDataCocoa.mm22
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/harfbuzz/FontHarfBuzz.cpp69
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/harfbuzz/FontPlatformDataHarfBuzz.cpp212
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/harfbuzz/FontPlatformDataHarfBuzz.h67
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/harfbuzz/HarfBuzzFace.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/harfbuzz/HarfBuzzFaceCoreText.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/harfbuzz/HarfBuzzFaceSkia.cpp57
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp523
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/harfbuzz/HarfBuzzShaper.h36
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/linux/FontCacheLinux.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/linux/FontPlatformDataLinuxHarfBuzz.cpp151
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/mac/ComplexTextController.cpp101
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/mac/ComplexTextController.h3
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/mac/ComplexTextControllerCoreText.mm8
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm38
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/mac/FontComplexTextMac.cpp32
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/mac/FontMac.cpp39
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/mac/GlyphPageTreeNodeMac.cpp168
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/mac/MemoryActivatedFont.mm4
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/mac/SimpleFontDataCoreText.cpp137
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/mac/SimpleFontDataMac.mm54
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/opentype/OpenTypeSanitizer.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/opentype/OpenTypeVerticalData.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp98
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkiaWin.cpp219
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/skia/FontCustomPlatformDataSkia.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/skia/FontPlatformDataSkia.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/skia/GlyphPageTreeNodeSkia.cpp65
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/skia/SimpleFontDataSkia.cpp120
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/skia/SkiaFontWin.cpp182
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/skia/SkiaFontWin.h74
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp249
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/win/FontCacheWin.cpp594
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/win/FontCustomPlatformDataWin.cpp135
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/win/FontFallbackWin.cpp91
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/win/FontFallbackWin.h17
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/win/FontPlatformDataWin.cpp418
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/win/FontPlatformDataWin.h191
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/win/FontWin.cpp224
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/win/GlyphPageTreeNodeWin.cpp260
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/win/SimpleFontDataWin.cpp181
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/win/UniscribeHelper.cpp1208
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/win/UniscribeHelper.h449
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/win/UniscribeHelperTextRun.cpp151
-rw-r--r--chromium/third_party/WebKit/Source/platform/fonts/win/UniscribeHelperTextRun.h102
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/FloatBox.h180
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/FloatBoxExtent.h125
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/FloatBoxTest.cpp121
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/FloatBoxTestHelpers.cpp93
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/FloatBoxTestHelpers.h42
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/FloatPoint.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/FloatPoint.h27
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/FloatPolygon.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/FloatPolygonTest.cpp331
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/FloatRect.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/FloatRect.h14
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/FloatRoundedRect.h9
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/FloatSize.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/FloatSize.h21
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/IntPoint.h17
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/IntRect.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/IntRect.h23
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/IntSize.h14
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/LayoutPoint.h10
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/LayoutRect.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/LayoutRect.h17
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/LayoutSize.h7
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/Region.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/Region.h4
-rw-r--r--chromium/third_party/WebKit/Source/platform/geometry/TransformState.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp35
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/BitmapImage.h11
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp207
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h9
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp328
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h34
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp166
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/Canvas2DLayerManager.cpp75
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/Canvas2DLayerManager.h7
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/Canvas2DLayerManagerTest.cpp339
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/Color.cpp66
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/Color.h38
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/ColorSpace.cpp107
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/ColorSpace.h15
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/CompositingReasons.h328
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/CrossfadeGeneratedImage.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/CrossfadeGeneratedImage.h10
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h12
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp103
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h11
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp117
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/DiscardablePixelRef.cpp33
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/DiscardablePixelRef.h11
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/DisplayList.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/DisplayList.h14
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/DrawLooper.cpp108
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/DrawLooper.h79
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/DrawLooperBuilder.cpp116
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/DrawLooperBuilder.h82
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/Extensions3D.cpp237
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/Extensions3D.h327
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/FrameData.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/FrameData.h16
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/Gradient.cpp108
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/Gradient.h25
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GradientGeneratedImage.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp1001
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsContext.h321
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsContext3D.cpp944
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsContext3D.h551
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsContext3DImagePacking.cpp1588
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsContextCullSaver.h46
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsContextRecorder.cpp855
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsContextRecorder.h6
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsContextState.cpp256
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsContextState.h169
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsContextTest.cpp1123
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp291
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h107
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsLayerClient.h8
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.cpp99
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.h72
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp168
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsTypes.h14
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/GraphicsTypes3D.h52
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/Image.h10
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp227
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/ImageBuffer.h26
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/ImageBufferClient.h45
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.h16
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/ImageDecodingStore.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/ImageDecodingStore.h18
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/ImageDecodingStoreTest.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp166
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h11
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/ImageFrameGeneratorTest.cpp161
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/ImageLayerChromiumTest.cpp130
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/ImageSource.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/ImageSource.h10
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/LazyDecodingPixelRef.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/LazyDecodingPixelRef.h16
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/OpaqueRectTrackingContentLayerDelegate.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/OpaqueRectTrackingContentLayerDelegate.h3
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/OpaqueRectTrackingContentLayerDelegateTest.cpp197
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/Path.cpp73
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/Path.h24
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/PathTraversalState.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/PathTraversalState.h2
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/Pattern.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/StrokeData.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/StrokeData.h26
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/ThreadSafeDataTransport.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.h4
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/angle/ANGLEPlatformBridge.cpp229
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/angle/ANGLEPlatformBridge.h96
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/cg/GraphicsContextCG.h41
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/cpu/arm/GraphicsContext3DNEON.h304
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/cpu/arm/WebGLImageConversionNEON.h304
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/cpu/arm/filters/FELightingNEON.h203
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/DistantLightSource.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/DistantLightSource.h11
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEBlend.cpp39
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEBlend.h3
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEColorMatrix.cpp130
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEColorMatrix.h34
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEComponentTransfer.cpp59
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEComponentTransfer.h5
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEComposite.cpp100
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEComposite.h8
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.h4
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEDiffuseLighting.cpp1
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEDiffuseLighting.h2
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEDisplacementMap.cpp52
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEDisplacementMap.h7
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEDropShadow.cpp33
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEDropShadow.h5
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEFlood.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEFlood.h8
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEGaussianBlur.cpp257
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEGaussianBlur.h45
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FELighting.cpp93
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FELighting.h15
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEMerge.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEMerge.h2
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEMorphology.cpp150
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEMorphology.h8
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEOffset.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FEOffset.h3
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FESpecularLighting.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FESpecularLighting.h2
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FETile.cpp40
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FETile.h6
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FETurbulence.cpp44
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FETurbulence.h7
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/Filter.h74
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp173
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.h45
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FilterOperation.h44
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FilterOperations.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FilterOperations.h1
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/FilterOperationsTest.cpp61
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/ImageFilterBuilderTest.cpp125
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/LightSource.h7
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/ParallelJobs.h5
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/PointLightSource.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/PointLightSource.h12
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/ReferenceFilter.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/ReferenceFilter.h4
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/SkiaImageFilterBuilder.cpp91
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/SkiaImageFilterBuilder.h23
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/SourceAlpha.cpp32
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/SourceAlpha.h7
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/SourceGraphic.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/SourceGraphic.h6
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/SpotLightSource.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/SpotLightSource.h15
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterArrayParameter.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterArrayParameter.h74
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterCompiledProgram.cpp149
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterCompiledProgram.h95
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterConstants.h60
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterGlobalContext.cpp112
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterGlobalContext.h83
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterMesh.cpp68
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterMesh.h76
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterMeshGenerator.cpp171
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterMeshGenerator.h121
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterNumberParameter.cpp50
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterNumberParameter.h73
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterOperation.cpp74
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterOperation.h97
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterParameter.h78
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterParameterList.cpp116
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterParameterList.h63
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterProgram.cpp85
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterProgram.h92
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterProgramClient.cpp39
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterProgramClient.h49
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterProgramInfo.cpp106
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterProgramInfo.h110
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterRenderer.cpp292
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterRenderer.h98
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterTransformParameter.cpp70
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterTransformParameter.h72
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterValidatedProgram.cpp617
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/CustomFilterValidatedProgram.h123
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/FECustomFilter.cpp367
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/FECustomFilter.h101
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/ValidatedCustomFilterOperation.cpp60
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/filters/custom/ValidatedCustomFilterOperation.h93
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp61
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.h57
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp772
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h156
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp623
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp101
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.h44
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/gpu/SharedGraphicsContext3D.cpp85
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/gpu/SharedGraphicsContext3D.h49
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageBufferSurface.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageBufferSurface.h15
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp1779
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.h168
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/media/MediaPlayer.h71
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/skia/GaneshUtils.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/skia/NativeImageSkia.cpp208
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/skia/NativeImageSkia.h23
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/skia/OpaqueRegionSkia.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h15
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/win/TransparencyWin.cpp512
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/win/TransparencyWin.h256
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/AddressSanitizer.h65
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/BUILD.gn33
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/BlinkHeapUnitTests.isolate42
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/DEPS (renamed from chromium/third_party/WebKit/Source/heap/DEPS)0
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/Handle.h1213
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/Heap.cpp1818
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/Heap.h2307
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/HeapLinkedStack.h115
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/HeapTerminatedArray.h54
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/HeapTerminatedArrayBuilder.h22
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/HeapTest.cpp4349
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/OWNERS (renamed from chromium/third_party/WebKit/Source/heap/OWNERS)0
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/RunAllTests.cpp64
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/ThreadState.cpp931
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/ThreadState.h659
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/Visitor.cpp64
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/Visitor.h758
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_arm.S77
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_arm64.S62
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_mips.S64
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_x86.asm155
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/blink_heap.gypi69
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/glue/DEPS4
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/glue/MessageLoopInterruptor.h73
-rw-r--r--chromium/third_party/WebKit/Source/platform/heap/glue/PendingGCRunner.h73
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h52
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp36
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/ImageFrame.h34
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageDecoder.h10
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.cpp162
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.h44
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoderTest.cpp502
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageReader.h2
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.h20
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.h5
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoderTest.cpp185
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp31
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.h10
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp214
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.h5
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp665
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-encoders/skia/JPEGImageEncoder.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-encoders/skia/PNGImageEncoder.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/image-encoders/skia/WEBPImageEncoder.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/mac/BlockExceptions.mm6
-rw-r--r--chromium/third_party/WebKit/Source/platform/mac/ColorMac.h11
-rw-r--r--chromium/third_party/WebKit/Source/platform/mac/ColorMac.mm33
-rw-r--r--chromium/third_party/WebKit/Source/platform/mac/EmptyProtocolDefinitions.h43
-rw-r--r--chromium/third_party/WebKit/Source/platform/mac/LocalCurrentGraphicsContext.h7
-rw-r--r--chromium/third_party/WebKit/Source/platform/mac/NSScrollerImpDetails.h21
-rw-r--r--chromium/third_party/WebKit/Source/platform/mac/NSScrollerImpDetails.mm95
-rw-r--r--chromium/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.h47
-rw-r--r--chromium/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm160
-rw-r--r--chromium/third_party/WebKit/Source/platform/mac/ScrollElasticityController.h44
-rw-r--r--chromium/third_party/WebKit/Source/platform/mac/ScrollElasticityController.mm63
-rw-r--r--chromium/third_party/WebKit/Source/platform/mac/ScrollElasticityControllerTest.mm173
-rw-r--r--chromium/third_party/WebKit/Source/platform/mac/ThemeMac.h (renamed from chromium/third_party/WebKit/Source/core/platform/mac/ThemeMac.h)0
-rw-r--r--chromium/third_party/WebKit/Source/platform/mac/ThemeMac.mm728
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/MediaConstraints.cpp40
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/MediaConstraints.h67
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/MediaStreamCenter.cpp154
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/MediaStreamCenter.h86
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/MediaStreamComponent.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/MediaStreamComponent.h18
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/MediaStreamDescriptor.cpp128
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/MediaStreamDescriptor.h106
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h12
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/MediaStreamTrackSourcesRequest.h68
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/MediaStreamWebAudioSource.cpp73
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/MediaStreamWebAudioSource.h64
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/RTCDTMFSenderHandler.cpp77
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/RTCDTMFSenderHandler.h65
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/RTCDTMFSenderHandlerClient.h42
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/RTCSessionDescriptionRequest.h11
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/RTCStatsRequest.h59
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/RTCStatsResponseBase.h4
-rw-r--r--chromium/third_party/WebKit/Source/platform/mediastream/RTCVoidRequest.h11
-rw-r--r--chromium/third_party/WebKit/Source/platform/mhtml/ArchiveResource.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/platform/mhtml/MHTMLParser.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/ContentSecurityPolicyParsers.cpp69
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/ContentSecurityPolicyParsers.h52
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/ContentSecurityPolicyResponseHeaders.cpp39
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/ContentSecurityPolicyResponseHeaders.h51
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/FormData.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/FormData.h3
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/FormDataBuilder.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/HTTPParsers.cpp272
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/HTTPParsers.h18
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/HTTPParsersTest.cpp227
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/HTTPRequest.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/ResourceError.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/ResourceError.h5
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/ResourceRequest.cpp87
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/ResourceRequest.h36
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/ResourceResponse.cpp216
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/ResourceResponse.h18
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/SocketStreamHandle.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/SocketStreamHandle.h7
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/SocketStreamHandleClient.h3
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/WebSocketHandshakeRequest.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/WebSocketHandshakeRequest.h39
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/WebSocketHandshakeResponse.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/platform/network/WebSocketHandshakeResponse.h3
-rw-r--r--chromium/third_party/WebKit/Source/platform/platform_derived_sources.gyp101
-rw-r--r--chromium/third_party/WebKit/Source/platform/platform_generated.gni5
-rw-r--r--chromium/third_party/WebKit/Source/platform/platform_generated.gyp102
-rw-r--r--chromium/third_party/WebKit/Source/platform/platform_generated.gypi9
-rw-r--r--chromium/third_party/WebKit/Source/platform/plugins/PluginListBuilder.h8
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/FramelessScrollView.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/FramelessScrollView.h17
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollAnimator.h4
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollAnimatorNone.cpp49
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollAnimatorNone.h18
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollView.cpp290
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollView.h98
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp65
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollableArea.h74
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/Scrollbar.h95
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp143
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h6
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollbarThemeAndroid.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollbarThemeAura.cpp175
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollbarThemeAura.h52
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollbarThemeGtkOrAura.cpp171
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollbarThemeGtkOrAura.h53
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMacCommon.h10
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMacCommon.mm49
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMacNonOverlayAPI.mm14
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMacOverlayAPI.mm4
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMock.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp35
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.h5
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollbarThemeWin.cpp256
-rw-r--r--chromium/third_party/WebKit/Source/platform/scroll/ScrollbarThemeWin.h59
-rw-r--r--chromium/third_party/WebKit/Source/platform/speech/PlatformSpeechSynthesisUtterance.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/platform/speech/PlatformSpeechSynthesisUtterance.h18
-rw-r--r--chromium/third_party/WebKit/Source/platform/speech/PlatformSpeechSynthesisVoice.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/platform/speech/PlatformSpeechSynthesisVoice.h11
-rw-r--r--chromium/third_party/WebKit/Source/platform/speech/PlatformSpeechSynthesizer.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/platform/speech/PlatformSpeechSynthesizer.h41
-rw-r--r--chromium/third_party/WebKit/Source/platform/testing/ArenaTestHelpers.h6
-rw-r--r--chromium/third_party/WebKit/Source/platform/testing/RunAllTests.cpp71
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/BidiCharacterRun.cpp52
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/BidiCharacterRun.h80
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/BidiResolver.h191
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/BidiResolverTest.cpp1
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/BidiRunList.h4
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/BidiTextRun.cpp63
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/BidiTextRun.h46
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/LineEnding.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/LocaleToScriptMapping.h2
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/PlatformLocale.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/SegmentedString.cpp59
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/SegmentedString.h4
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/SegmentedStringTest.cpp86
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/TextBreakIterator.h2
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/TextBreakIteratorICU.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/TextBreakIteratorInternalICU.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/TextPath.h40
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/TextRun.h4
-rw-r--r--chromium/third_party/WebKit/Source/platform/text/UnicodeRange.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/AffineTransform.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/AffineTransform.h3
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/IdentityTransformOperation.h13
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/InterpolatedTransformOperation.h13
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/Matrix3DTransformOperation.h13
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/MatrixTransformOperation.h13
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/PerspectiveTransformOperation.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/PerspectiveTransformOperation.h26
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/RotateTransformOperation.cpp63
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/RotateTransformOperation.h14
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/ScaleTransformOperation.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/ScaleTransformOperation.h10
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/SkewTransformOperation.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/SkewTransformOperation.h9
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/TransformOperation.h2
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/TransformOperations.cpp268
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/TransformOperations.h3
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/TransformOperationsTest.cpp493
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp36
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/TransformationMatrix.h4
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/TransformationMatrixTest.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/TranslateTransformOperation.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/platform/transforms/TranslateTransformOperation.h23
-rw-r--r--chromium/third_party/WebKit/Source/platform/weborigin/KURL.cpp180
-rw-r--r--chromium/third_party/WebKit/Source/platform/weborigin/KURL.h26
-rw-r--r--chromium/third_party/WebKit/Source/platform/weborigin/KURLTest.cpp129
-rw-r--r--chromium/third_party/WebKit/Source/platform/weborigin/Referrer.h49
-rw-r--r--chromium/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp86
-rw-r--r--chromium/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.h22
-rw-r--r--chromium/third_party/WebKit/Source/platform/weborigin/SecurityOriginHash.h19
-rw-r--r--chromium/third_party/WebKit/Source/platform/weborigin/SecurityOriginTest.cpp75
-rw-r--r--chromium/third_party/WebKit/Source/platform/weborigin/SecurityPolicy.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/platform/weborigin/SecurityPolicyTest.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/testing/data/fonts/AHEM____.TTFbin12480 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/testing/data/fonts/SampleFont.sfont223
-rw-r--r--chromium/third_party/WebKit/Source/testing/data/fonts/WebKit Layout Tests 2.ttfbin28812 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/testing/data/fonts/WebKit Layout Tests.ttfbin28780 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/testing/data/fonts/WebKitWeightWatcher100.ttfbin5236 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/testing/data/fonts/WebKitWeightWatcher200.ttfbin5236 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/testing/data/fonts/WebKitWeightWatcher300.ttfbin5216 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/testing/data/fonts/WebKitWeightWatcher400.ttfbin5164 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/testing/data/fonts/WebKitWeightWatcher500.ttfbin5144 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/testing/data/fonts/WebKitWeightWatcher600.ttfbin5180 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/testing/data/fonts/WebKitWeightWatcher700.ttfbin5108 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/testing/data/fonts/WebKitWeightWatcher800.ttfbin5216 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/testing/data/fonts/WebKitWeightWatcher900.ttfbin5216 -> 0 bytes
-rw-r--r--chromium/third_party/WebKit/Source/testing/data/fonts/android_fallback_fonts.xml38
-rw-r--r--chromium/third_party/WebKit/Source/testing/data/fonts/android_main_fonts.xml120
-rw-r--r--chromium/third_party/WebKit/Source/testing/data/fonts/fonts.conf252
-rw-r--r--chromium/third_party/WebKit/Source/testing/helper/LayoutTestHelperMac.mm214
-rw-r--r--chromium/third_party/WebKit/Source/testing/helper/LayoutTestHelperWin.cpp84
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/PluginObject.cpp1309
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/PluginObject.h89
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/PluginObjectMac.mm100
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/PluginTest.cpp296
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/PluginTest.h274
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/TestObject.cpp209
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/TestObject.h30
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/DocumentOpenInDestroyStream.cpp56
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/EvaluateJSAfterRemovingPluginElement.cpp64
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/EvaluateJSWithinNPP_New.cpp56
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/FormValue.cpp53
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/GetURLNotifyWithURLThatFailsToLoad.cpp72
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/GetURLWithJavaScriptURL.cpp112
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/InvokeDestroysPluginWithinNPP_New.cpp67
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/LeakWindowScriptableObject.cpp64
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/LogNPPSetWindow.cpp61
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/NPDeallocateCalledBeforeNPShutdown.cpp94
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/NPPNewFails.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/NPPSetWindowCalledDuringDestruction.cpp125
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/NPRuntimeCallsWithNullNPP.cpp66
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp88
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/NPRuntimeRemoveProperty.cpp170
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/NullNPPGetValuePointer.cpp70
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/PassDifferentNPPStruct.cpp72
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/PluginScriptableNPObjectInvokeDefault.cpp68
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/PluginScriptableObjectOverridesAllProperties.cpp83
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/Tests/SlowNPPNew.cpp87
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/mac/Info.plist69
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/main.cpp879
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/plugin.gypi59
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/win/TestNetscapePlugin.def6
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/win/TestNetscapePlugin.rc102
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/win/TestNetscapePlugin_debug.def6
-rw-r--r--chromium/third_party/WebKit/Source/testing/plugin/win/resource.h14
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/AccessibilityController.cpp206
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/AccessibilityController.h96
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/CppBoundClass.cpp358
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/CppBoundClass.h246
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/CppVariant.cpp322
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/CppVariant.h144
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/EventSender.cpp1464
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/EventSender.h214
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/GamepadController.cpp199
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/GamepadController.h72
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/KeyCodeMapping.cpp248
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/KeyCodeMapping.h67
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockColorChooser.cpp84
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockColorChooser.h64
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockConstraints.cpp85
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockConstraints.h49
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockGrammarCheck.cpp83
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockGrammarCheck.h57
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockSpellCheck.cpp210
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockSpellCheck.h92
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebAudioDevice.cpp59
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebAudioDevice.h55
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebMIDIAccessor.cpp84
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebMIDIAccessor.h71
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebMediaStreamCenter.cpp119
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebMediaStreamCenter.h64
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebRTCDTMFSenderHandler.cpp93
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebRTCDTMFSenderHandler.h67
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebRTCDataChannelHandler.cpp127
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebRTCDataChannelHandler.h73
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebRTCPeerConnectionHandler.cpp307
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebRTCPeerConnectionHandler.h90
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebSpeechInputController.cpp207
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebSpeechInputController.h97
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebSpeechRecognizer.cpp247
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebSpeechRecognizer.h104
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebValidationMessageClient.cpp68
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/MockWebValidationMessageClient.h57
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/NotificationPresenter.cpp167
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/NotificationPresenter.h86
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/SpellCheckClient.cpp169
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/SpellCheckClient.h81
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/TestCommon.cpp63
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/TestCommon.h53
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/TestInterfaces.cpp216
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/TestInterfaces.h109
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/TestPlugin.cpp581
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/TestPlugin.h157
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/TestRunner.cpp2140
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/TestRunner.h737
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/TextInputController.cpp219
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/TextInputController.h68
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebAXObjectProxy.cpp1187
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebAXObjectProxy.h170
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebPermissions.cpp139
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebPermissions.h82
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebPreferences.cpp77
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebTask.cpp79
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebTestInterfaces.cpp118
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebTestProxy.cpp1394
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebTestThemeControlWin.cpp491
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebTestThemeControlWin.h201
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebTestThemeEngineMac.h66
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebTestThemeEngineMac.mm199
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebTestThemeEngineMock.cpp627
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebTestThemeEngineMock.h58
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebTestThemeEngineWin.cpp742
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebTestThemeEngineWin.h104
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebUserMediaClientMock.cpp167
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/WebUserMediaClientMock.h64
-rw-r--r--chromium/third_party/WebKit/Source/testing/runner/runner.gypi104
-rw-r--r--chromium/third_party/WebKit/Source/testing/testing.gyp311
-rw-r--r--chromium/third_party/WebKit/Source/web/ApplicationCacheHost.cpp251
-rw-r--r--chromium/third_party/WebKit/Source/web/ApplicationCacheHostInternal.h78
-rw-r--r--[-rwxr-xr-x]chromium/third_party/WebKit/Source/web/AssertMatchingEnums.cpp207
-rw-r--r--chromium/third_party/WebKit/Source/web/AssociatedURLLoader.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/web/AssociatedURLLoader.h18
-rw-r--r--chromium/third_party/WebKit/Source/web/AutofillPopupMenuClient.cpp348
-rw-r--r--chromium/third_party/WebKit/Source/web/AutofillPopupMenuClient.h145
-rw-r--r--chromium/third_party/WebKit/Source/web/BUILD.gn73
-rw-r--r--chromium/third_party/WebKit/Source/web/BackForwardClientImpl.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/web/BackForwardClientImpl.h9
-rw-r--r--chromium/third_party/WebKit/Source/web/ChromeClientImpl.cpp485
-rw-r--r--chromium/third_party/WebKit/Source/web/ChromeClientImpl.h191
-rw-r--r--chromium/third_party/WebKit/Source/web/ColorChooserPopupUIController.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/web/ColorChooserPopupUIController.h10
-rw-r--r--chromium/third_party/WebKit/Source/web/ColorChooserUIController.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/web/ColorChooserUIController.h14
-rw-r--r--chromium/third_party/WebKit/Source/web/CompositionUnderlineBuilder.h5
-rw-r--r--chromium/third_party/WebKit/Source/web/CompositionUnderlineVectorBuilder.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/web/CompositionUnderlineVectorBuilder.h2
-rw-r--r--chromium/third_party/WebKit/Source/web/ContextFeaturesClientImpl.cpp62
-rw-r--r--chromium/third_party/WebKit/Source/web/ContextFeaturesClientImpl.h16
-rw-r--r--chromium/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp133
-rw-r--r--chromium/third_party/WebKit/Source/web/ContextMenuClientImpl.h6
-rw-r--r--chromium/third_party/WebKit/Source/web/DEPS2
-rw-r--r--chromium/third_party/WebKit/Source/web/DOMUtilitiesPrivate.cpp64
-rw-r--r--chromium/third_party/WebKit/Source/web/DOMUtilitiesPrivate.h54
-rw-r--r--chromium/third_party/WebKit/Source/web/DatabaseClientImpl.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/web/DatabaseClientImpl.h7
-rw-r--r--chromium/third_party/WebKit/Source/web/DateTimeChooserImpl.cpp94
-rw-r--r--chromium/third_party/WebKit/Source/web/DateTimeChooserImpl.h9
-rw-r--r--chromium/third_party/WebKit/Source/web/DragClientImpl.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/web/DragClientImpl.h8
-rw-r--r--chromium/third_party/WebKit/Source/web/EditorClientImpl.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/web/EditorClientImpl.h11
-rw-r--r--chromium/third_party/WebKit/Source/web/EventListenerWrapper.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/web/EventListenerWrapper.h8
-rw-r--r--chromium/third_party/WebKit/Source/web/ExternalDateTimeChooser.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/web/ExternalDateTimeChooser.h2
-rw-r--r--chromium/third_party/WebKit/Source/web/ExternalPopupMenu.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/web/ExternalPopupMenu.h28
-rw-r--r--chromium/third_party/WebKit/Source/web/FindInPageCoordinates.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp404
-rw-r--r--chromium/third_party/WebKit/Source/web/FrameLoaderClientImpl.h179
-rw-r--r--chromium/third_party/WebKit/Source/web/FullscreenController.cpp50
-rw-r--r--chromium/third_party/WebKit/Source/web/FullscreenController.h11
-rw-r--r--chromium/third_party/WebKit/Source/web/GeolocationClientProxy.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/web/GeolocationClientProxy.h24
-rw-r--r--chromium/third_party/WebKit/Source/web/GraphicsLayerFactoryChromium.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/web/GraphicsLayerFactoryChromium.h2
-rw-r--r--chromium/third_party/WebKit/Source/web/IDBFactoryBackendProxy.cpp71
-rw-r--r--chromium/third_party/WebKit/Source/web/IDBFactoryBackendProxy.h54
-rw-r--r--chromium/third_party/WebKit/Source/web/IndexedDBClientImpl.cpp68
-rw-r--r--chromium/third_party/WebKit/Source/web/IndexedDBClientImpl.h52
-rw-r--r--chromium/third_party/WebKit/Source/web/InspectorClientImpl.cpp62
-rw-r--r--chromium/third_party/WebKit/Source/web/InspectorClientImpl.h48
-rw-r--r--chromium/third_party/WebKit/Source/web/InspectorFrontendClientImpl.cpp106
-rw-r--r--chromium/third_party/WebKit/Source/web/InspectorFrontendClientImpl.h12
-rw-r--r--chromium/third_party/WebKit/Source/web/LinkHighlight.cpp67
-rw-r--r--chromium/third_party/WebKit/Source/web/LinkHighlight.h14
-rw-r--r--chromium/third_party/WebKit/Source/web/LocalFileSystemClient.cpp40
-rw-r--r--chromium/third_party/WebKit/Source/web/LocalFileSystemClient.h5
-rw-r--r--chromium/third_party/WebKit/Source/web/MIDIClientProxy.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/web/MIDIClientProxy.h17
-rw-r--r--chromium/third_party/WebKit/Source/web/MediaKeysClientImpl.cpp30
-rw-r--r--chromium/third_party/WebKit/Source/web/MediaKeysClientImpl.h26
-rw-r--r--chromium/third_party/WebKit/Source/web/NavigatorContentUtilsClientImpl.cpp41
-rw-r--r--chromium/third_party/WebKit/Source/web/NavigatorContentUtilsClientImpl.h32
-rw-r--r--chromium/third_party/WebKit/Source/web/NotificationPresenterImpl.cpp57
-rw-r--r--chromium/third_party/WebKit/Source/web/NotificationPresenterImpl.h17
-rw-r--r--chromium/third_party/WebKit/Source/web/OWNERS6
-rw-r--r--chromium/third_party/WebKit/Source/web/OpenedFrameTracker.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/web/OpenedFrameTracker.h37
-rw-r--r--chromium/third_party/WebKit/Source/web/PageOverlay.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/web/PageOverlayList.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/web/PageScaleConstraintsSet.cpp59
-rw-r--r--chromium/third_party/WebKit/Source/web/PageScaleConstraintsSet.h12
-rw-r--r--chromium/third_party/WebKit/Source/web/PageWidgetDelegate.cpp59
-rw-r--r--chromium/third_party/WebKit/Source/web/PageWidgetDelegate.h16
-rw-r--r--chromium/third_party/WebKit/Source/web/PinchViewports.cpp216
-rw-r--r--chromium/third_party/WebKit/Source/web/PinchViewports.h92
-rw-r--r--chromium/third_party/WebKit/Source/web/PopupContainer.cpp87
-rw-r--r--chromium/third_party/WebKit/Source/web/PopupContainer.h69
-rw-r--r--chromium/third_party/WebKit/Source/web/PopupListBox.cpp216
-rw-r--r--chromium/third_party/WebKit/Source/web/PopupListBox.h84
-rw-r--r--chromium/third_party/WebKit/Source/web/PopupMenuChromium.cpp32
-rw-r--r--chromium/third_party/WebKit/Source/web/PopupMenuChromium.h35
-rw-r--r--chromium/third_party/WebKit/Source/web/PrerendererClientImpl.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/web/PrerendererClientImpl.h5
-rw-r--r--chromium/third_party/WebKit/Source/web/RemoteFrameClient.cpp57
-rw-r--r--chromium/third_party/WebKit/Source/web/RemoteFrameClient.h37
-rw-r--r--chromium/third_party/WebKit/Source/web/ScrollbarGroup.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/web/ScrollbarGroup.h7
-rw-r--r--chromium/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.cpp101
-rw-r--r--chromium/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.h68
-rw-r--r--chromium/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp95
-rw-r--r--chromium/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h25
-rw-r--r--chromium/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp114
-rw-r--r--chromium/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.h4
-rw-r--r--chromium/third_party/WebKit/Source/web/SpeechInputClientImpl.cpp107
-rw-r--r--chromium/third_party/WebKit/Source/web/SpeechInputClientImpl.h81
-rw-r--r--chromium/third_party/WebKit/Source/web/SpeechRecognitionClientProxy.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/web/SpeechRecognitionClientProxy.h6
-rw-r--r--chromium/third_party/WebKit/Source/web/SpellCheckerClientImpl.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/web/SpellCheckerClientImpl.h6
-rw-r--r--chromium/third_party/WebKit/Source/web/StorageAreaProxy.cpp207
-rw-r--r--chromium/third_party/WebKit/Source/web/StorageAreaProxy.h82
-rw-r--r--chromium/third_party/WebKit/Source/web/StorageClientImpl.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/web/StorageClientImpl.h27
-rw-r--r--chromium/third_party/WebKit/Source/web/StorageNamespaceProxy.cpp79
-rw-r--r--chromium/third_party/WebKit/Source/web/StorageNamespaceProxy.h52
-rw-r--r--chromium/third_party/WebKit/Source/web/StorageQuotaChromium.cpp70
-rw-r--r--chromium/third_party/WebKit/Source/web/StorageQuotaClientImpl.cpp101
-rw-r--r--chromium/third_party/WebKit/Source/web/StorageQuotaClientImpl.h57
-rw-r--r--chromium/third_party/WebKit/Source/web/TextFinder.cpp738
-rw-r--r--chromium/third_party/WebKit/Source/web/TextFinder.h280
-rw-r--r--chromium/third_party/WebKit/Source/web/UserMediaClientImpl.cpp30
-rw-r--r--chromium/third_party/WebKit/Source/web/UserMediaClientImpl.h14
-rw-r--r--chromium/third_party/WebKit/Source/web/ValidationMessageClientImpl.cpp40
-rw-r--r--chromium/third_party/WebKit/Source/web/ValidationMessageClientImpl.h15
-rw-r--r--chromium/third_party/WebKit/Source/web/ViewportAnchor.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/ViewportAnchor.h3
-rw-r--r--chromium/third_party/WebKit/Source/web/WebAXObject.cpp144
-rw-r--r--chromium/third_party/WebKit/Source/web/WebArrayBufferConverter.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/web/WebArrayBufferView.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebBindings.cpp32
-rw-r--r--chromium/third_party/WebKit/Source/web/WebBlob.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/web/WebCache.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/web/WebCachedURLRequest.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebColorName.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/web/WebColorSuggestion.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebCrossOriginPreflightResultCache.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/web/WebCryptoNormalize.cpp62
-rw-r--r--chromium/third_party/WebKit/Source/web/WebCustomElement.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDOMActivityLogger.cpp51
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDOMCustomEvent.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDOMError.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDOMEvent.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDOMEventListener.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDOMEventListenerPrivate.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDOMFileSystem.cpp62
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDOMMediaStreamTrack.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDOMMessageEvent.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDOMMouseEvent.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDOMProgressEvent.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDOMResourceProgressEvent.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDataSourceImpl.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDataSourceImpl.h43
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDatabase.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDateTimeSuggestion.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp305
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDevToolsAgentImpl.h116
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDevToolsAgentPrivate.h13
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDevToolsFrontendImpl.cpp38
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDevToolsFrontendImpl.h6
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDocument.cpp83
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDocumentType.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDragData.cpp107
-rw-r--r--chromium/third_party/WebKit/Source/web/WebElement.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/web/WebElementCollection.cpp84
-rw-r--r--chromium/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp192
-rw-r--r--chromium/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.h45
-rw-r--r--chromium/third_party/WebKit/Source/web/WebEntities.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/web/WebFileChooserCompletionImpl.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebFileChooserCompletionImpl.h10
-rw-r--r--chromium/third_party/WebKit/Source/web/WebFontCache.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/web/WebFontDescription.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/web/WebFontImpl.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/web/WebFontImpl.h26
-rw-r--r--chromium/third_party/WebKit/Source/web/WebFormControlElement.cpp112
-rw-r--r--chromium/third_party/WebKit/Source/web/WebFormElement.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/web/WebFrame.cpp193
-rw-r--r--chromium/third_party/WebKit/Source/web/WebFrameImpl.cpp2533
-rw-r--r--chromium/third_party/WebKit/Source/web/WebFrameImpl.h538
-rw-r--r--chromium/third_party/WebKit/Source/web/WebGeolocationClientMock.cpp138
-rw-r--r--chromium/third_party/WebKit/Source/web/WebGeolocationController.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/web/WebGeolocationError.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/web/WebGeolocationPermissionRequest.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/web/WebGeolocationPermissionRequestManager.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/web/WebGeolocationPosition.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/web/WebGlyphCache.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebHeap.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/web/WebHelperPluginImpl.cpp265
-rw-r--r--chromium/third_party/WebKit/Source/web/WebHelperPluginImpl.h67
-rw-r--r--chromium/third_party/WebKit/Source/web/WebHistoryItem.cpp119
-rw-r--r--chromium/third_party/WebKit/Source/web/WebHitTestResult.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/web/WebIDBDatabaseError.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebIDBKey.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/web/WebIDBKeyPath.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebIDBKeyRange.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/web/WebIDBMetadata.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebImageCache.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebImageDecoder.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebInputElement.cpp137
-rw-r--r--chromium/third_party/WebKit/Source/web/WebInputEvent.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/web/WebInputEventConversion.cpp80
-rw-r--r--chromium/third_party/WebKit/Source/web/WebInputEventConversion.h2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebInputEventFactoryAndroid.cpp186
-rw-r--r--chromium/third_party/WebKit/Source/web/WebInputEventFactoryGtk.cpp629
-rw-r--r--chromium/third_party/WebKit/Source/web/WebInputEventFactoryMac.mm35
-rw-r--r--chromium/third_party/WebKit/Source/web/WebInputEventFactoryWin.cpp499
-rw-r--r--chromium/third_party/WebKit/Source/web/WebKit.cpp110
-rw-r--r--chromium/third_party/WebKit/Source/web/WebKitUnitTests.isolate4
-rw-r--r--chromium/third_party/WebKit/Source/web/WebLabelElement.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/web/WebLeakDetector.cpp134
-rw-r--r--chromium/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp1915
-rw-r--r--chromium/third_party/WebKit/Source/web/WebLocalFrameImpl.h366
-rw-r--r--chromium/third_party/WebKit/Source/web/WebMIDIClientMock.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/web/WebMIDIPermissionRequest.cpp34
-rw-r--r--chromium/third_party/WebKit/Source/web/WebMediaDevicesRequest.cpp99
-rw-r--r--chromium/third_party/WebKit/Source/web/WebMediaPlayerClientImpl.cpp363
-rw-r--r--chromium/third_party/WebKit/Source/web/WebMediaPlayerClientImpl.h126
-rw-r--r--chromium/third_party/WebKit/Source/web/WebMediaStreamRegistry.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/web/WebNetworkStateNotifier.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/web/WebNode.cpp60
-rw-r--r--chromium/third_party/WebKit/Source/web/WebNodeCollection.cpp89
-rw-r--r--chromium/third_party/WebKit/Source/web/WebNodeList.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/web/WebNodeTest.cpp47
-rw-r--r--chromium/third_party/WebKit/Source/web/WebNotification.cpp77
-rw-r--r--chromium/third_party/WebKit/Source/web/WebOptionElement.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPagePopupImpl.cpp126
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPagePopupImpl.h45
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPageSerializer.cpp99
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPageSerializerImpl.cpp75
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPageSerializerImpl.h12
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPasswordFormData.cpp184
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPasswordFormUtils.cpp104
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPasswordFormUtils.h63
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPerformance.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp109
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPluginContainerImpl.h97
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPluginDocument.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPluginLoadObserver.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPluginScrollbarImpl.cpp23
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPluginScrollbarImpl.h6
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPopupMenuImpl.cpp84
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPopupMenuImpl.h92
-rw-r--r--chromium/third_party/WebKit/Source/web/WebRange.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp832
-rw-r--r--chromium/third_party/WebKit/Source/web/WebRemoteFrameImpl.h197
-rw-r--r--chromium/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp261
-rw-r--r--chromium/third_party/WebKit/Source/web/WebScopedMicrotaskSuppression.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/web/WebScopedUserGesture.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/web/WebScopedWindowFocusAllowedIndicator.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/web/WebScriptController.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSearchableFormData.cpp68
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSecurityOrigin.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSecurityPolicy.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSelectElement.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSelector.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSerializedScriptValue.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSettingsImpl.cpp163
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSettingsImpl.h285
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp223
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSharedWorkerImpl.h78
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSocket.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSocketImpl.cpp79
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSocketImpl.h25
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSpeechGrammar.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSpeechInputResult.cpp63
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSpeechRecognitionHandle.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSpeechRecognitionResult.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/web/WebStorageEventDispatcherImpl.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/web/WebSurroundingText.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/web/WebTestingSupport.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/web/WebTextAreaElement.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/web/WebTextCheckingCompletionImpl.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/web/WebTextCheckingCompletionImpl.h4
-rw-r--r--chromium/third_party/WebKit/Source/web/WebTextCheckingResult.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebTextInputInfo.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebTextRun.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebUserGestureIndicator.cpp38
-rw-r--r--chromium/third_party/WebKit/Source/web/WebUserGestureToken.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebUserMediaRequest.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/web/WebViewImpl.cpp1730
-rw-r--r--chromium/third_party/WebKit/Source/web/WebViewImpl.h522
-rw-r--r--chromium/third_party/WebKit/Source/web/WebWorkerInfo.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WorkerGlobalScopeProxyProviderImpl.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/web/WorkerGlobalScopeProxyProviderImpl.h9
-rw-r--r--chromium/third_party/WebKit/Source/web/WorkerPermissionClient.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/web/WorkerPermissionClient.h12
-rw-r--r--chromium/third_party/WebKit/Source/web/default/WebRenderTheme.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/web/mac/WebScrollbarTheme.cpp52
-rw-r--r--chromium/third_party/WebKit/Source/web/mac/WebScrollbarTheme.mm58
-rw-r--r--chromium/third_party/WebKit/Source/web/mac/WebSubstringUtil.mm87
-rw-r--r--chromium/third_party/WebKit/Source/web/painting/ContinuousPainter.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/web/painting/PaintAggregator.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/web/resources/calendarPicker.js39
-rw-r--r--chromium/third_party/WebKit/Source/web/resources/pickerButton.css8
-rw-r--r--chromium/third_party/WebKit/Source/web/resources/pickerCommon.js8
-rw-r--r--chromium/third_party/WebKit/Source/web/resources/suggestionPicker.js2
-rwxr-xr-xchromium/third_party/WebKit/Source/web/scripts/make-file-arrays.py156
-rw-r--r--chromium/third_party/WebKit/Source/web/web.gyp85
-rw-r--r--chromium/third_party/WebKit/Source/web/web.gypi111
-rw-r--r--chromium/third_party/WebKit/Source/web/web_tests.gyp21
-rw-r--r--chromium/third_party/WebKit/Source/web/win/WebFontRendering.cpp36
-rw-r--r--chromium/third_party/WebKit/Source/web/x11/WebScreenInfoFactory.cpp69
-rw-r--r--chromium/third_party/WebKit/Source/wtf/ArrayBuffer.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/wtf/ArrayBuffer.h6
-rw-r--r--chromium/third_party/WebKit/Source/wtf/ArrayBufferBuilder.h9
-rw-r--r--chromium/third_party/WebKit/Source/wtf/ArrayBufferBuilderTest.cpp25
-rw-r--r--chromium/third_party/WebKit/Source/wtf/ArrayBufferContents.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/wtf/ArrayBufferView.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/ArrayBufferView.h2
-rw-r--r--chromium/third_party/WebKit/Source/wtf/ArrayPiece.cpp78
-rw-r--r--chromium/third_party/WebKit/Source/wtf/ArrayPiece.h52
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Assertions.cpp38
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Assertions.h76
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Atomics.h84
-rw-r--r--chromium/third_party/WebKit/Source/wtf/AutodrainedPool.h67
-rw-r--r--chromium/third_party/WebKit/Source/wtf/AutodrainedPoolMac.mm57
-rw-r--r--chromium/third_party/WebKit/Source/wtf/BUILD.gn151
-rw-r--r--chromium/third_party/WebKit/Source/wtf/BitArray.h10
-rw-r--r--chromium/third_party/WebKit/Source/wtf/BitVector.h2
-rw-r--r--chromium/third_party/WebKit/Source/wtf/BitwiseOperations.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/BloomFilter.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/CPU.h18
-rw-r--r--chromium/third_party/WebKit/Source/wtf/CheckedArithmetic.h7
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Compiler.h30
-rw-r--r--chromium/third_party/WebKit/Source/wtf/CryptographicallyRandomNumber.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/wtf/DateMath.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/wtf/DecimalNumber.cpp196
-rw-r--r--chromium/third_party/WebKit/Source/wtf/DecimalNumber.h109
-rw-r--r--chromium/third_party/WebKit/Source/wtf/DefaultAllocator.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/wtf/DefaultAllocator.h169
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Deque.h243
-rw-r--r--chromium/third_party/WebKit/Source/wtf/DequeTest.cpp300
-rw-r--r--chromium/third_party/WebKit/Source/wtf/FastMalloc.cpp3784
-rw-r--r--chromium/third_party/WebKit/Source/wtf/FastMalloc.h43
-rw-r--r--chromium/third_party/WebKit/Source/wtf/FilePrintStream.h6
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Float32Array.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Float64Array.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Forward.h6
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Functional.h136
-rw-r--r--chromium/third_party/WebKit/Source/wtf/FunctionalTest.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/wtf/GetPtr.h5
-rw-r--r--chromium/third_party/WebKit/Source/wtf/GregorianDateTime.cpp86
-rw-r--r--chromium/third_party/WebKit/Source/wtf/GregorianDateTime.h129
-rw-r--r--chromium/third_party/WebKit/Source/wtf/HashCountedSet.h166
-rw-r--r--chromium/third_party/WebKit/Source/wtf/HashFunctions.h30
-rw-r--r--chromium/third_party/WebKit/Source/wtf/HashMap.h234
-rw-r--r--chromium/third_party/WebKit/Source/wtf/HashMapTest.cpp116
-rw-r--r--chromium/third_party/WebKit/Source/wtf/HashSet.h159
-rw-r--r--chromium/third_party/WebKit/Source/wtf/HashSetTest.cpp140
-rw-r--r--chromium/third_party/WebKit/Source/wtf/HashTable.h788
-rw-r--r--chromium/third_party/WebKit/Source/wtf/HashTraits.h74
-rw-r--r--chromium/third_party/WebKit/Source/wtf/InstanceCounter.cpp41
-rw-r--r--chromium/third_party/WebKit/Source/wtf/InstanceCounter.h16
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Int16Array.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Int32Array.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Int8Array.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/LeakAnnotations.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h717
-rw-r--r--chromium/third_party/WebKit/Source/wtf/ListHashSet.h809
-rw-r--r--chromium/third_party/WebKit/Source/wtf/ListHashSetTest.cpp613
-rw-r--r--chromium/third_party/WebKit/Source/wtf/MathExtras.h30
-rw-r--r--chromium/third_party/WebKit/Source/wtf/MathExtrasTest.cpp115
-rw-r--r--chromium/third_party/WebKit/Source/wtf/MessageQueue.h58
-rw-r--r--chromium/third_party/WebKit/Source/wtf/NullPtr.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/wtf/NullPtr.h27
-rw-r--r--chromium/third_party/WebKit/Source/wtf/NumberOfCores.cpp58
-rw-r--r--chromium/third_party/WebKit/Source/wtf/NumberOfCores.h30
-rw-r--r--chromium/third_party/WebKit/Source/wtf/OWNERS3
-rw-r--r--chromium/third_party/WebKit/Source/wtf/OwnPtr.h7
-rw-r--r--chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp43
-rw-r--r--chromium/third_party/WebKit/Source/wtf/PageAllocator.h25
-rw-r--r--chromium/third_party/WebKit/Source/wtf/PartitionAlloc.cpp892
-rw-r--r--chromium/third_party/WebKit/Source/wtf/PartitionAlloc.h499
-rw-r--r--chromium/third_party/WebKit/Source/wtf/PartitionAllocTest.cpp627
-rw-r--r--chromium/third_party/WebKit/Source/wtf/PassOwnPtr.h8
-rw-r--r--chromium/third_party/WebKit/Source/wtf/PassRefPtr.h24
-rw-r--r--chromium/third_party/WebKit/Source/wtf/QuantizedAllocation.cpp53
-rw-r--r--chromium/third_party/WebKit/Source/wtf/QuantizedAllocation.h85
-rw-r--r--chromium/third_party/WebKit/Source/wtf/RawPtr.h144
-rw-r--r--chromium/third_party/WebKit/Source/wtf/RefCounted.h13
-rw-r--r--chromium/third_party/WebKit/Source/wtf/RefCountedLeakCounter.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/wtf/RefPtr.h30
-rw-r--r--chromium/third_party/WebKit/Source/wtf/RefPtrHashMap.h329
-rw-r--r--chromium/third_party/WebKit/Source/wtf/RefVector.h40
-rw-r--r--chromium/third_party/WebKit/Source/wtf/SHA1.cpp178
-rw-r--r--chromium/third_party/WebKit/Source/wtf/SHA1.h78
-rw-r--r--chromium/third_party/WebKit/Source/wtf/SHA1Test.cpp70
-rw-r--r--chromium/third_party/WebKit/Source/wtf/SaturatedArithmetic.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/SaturatedArithmeticTest.cpp108
-rw-r--r--chromium/third_party/WebKit/Source/wtf/SizeLimits.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/SpinLock.h2
-rw-r--r--chromium/third_party/WebKit/Source/wtf/StdLibExtras.h133
-rw-r--r--chromium/third_party/WebKit/Source/wtf/StringExtrasTest.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/wtf/StringHasher.h61
-rw-r--r--chromium/third_party/WebKit/Source/wtf/StringHasherTest.cpp404
-rw-r--r--chromium/third_party/WebKit/Source/wtf/TCPackedCache.h229
-rw-r--r--chromium/third_party/WebKit/Source/wtf/TCPageMap.h305
-rw-r--r--chromium/third_party/WebKit/Source/wtf/TCSpinLock.h85
-rw-r--r--chromium/third_party/WebKit/Source/wtf/TCSystemAlloc.cpp242
-rw-r--r--chromium/third_party/WebKit/Source/wtf/TCSystemAlloc.h80
-rw-r--r--chromium/third_party/WebKit/Source/wtf/TemporaryChangeTest.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/wtf/TerminatedArray.h98
-rw-r--r--chromium/third_party/WebKit/Source/wtf/TerminatedArrayBuilder.h79
-rw-r--r--chromium/third_party/WebKit/Source/wtf/ThreadRestrictionVerifier.h2
-rw-r--r--chromium/third_party/WebKit/Source/wtf/ThreadingPthreads.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/wtf/ThreadingWin.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/wtf/TreeNode.h12
-rw-r--r--chromium/third_party/WebKit/Source/wtf/TreeNodeTest.cpp121
-rw-r--r--chromium/third_party/WebKit/Source/wtf/TypeTraits.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/wtf/TypeTraits.h97
-rw-r--r--chromium/third_party/WebKit/Source/wtf/TypedArrayBase.h10
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Uint16Array.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Uint32Array.h18
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Uint8Array.h2
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Uint8ClampedArray.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/VMTags.h47
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Vector.h441
-rw-r--r--chromium/third_party/WebKit/Source/wtf/VectorTest.cpp160
-rw-r--r--chromium/third_party/WebKit/Source/wtf/VectorTraits.h71
-rw-r--r--chromium/third_party/WebKit/Source/wtf/WTF.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/wtf/WTF.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/WeakPtr.h18
-rw-r--r--chromium/third_party/WebKit/Source/wtf/dtoa/cached-powers.cc2
-rw-r--r--chromium/third_party/WebKit/Source/wtf/dtoa/utils.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/AtomicString.cpp35
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/AtomicString.h24
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/AtomicStringCF.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/AtomicStringHash.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/AtomicStringTest.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/Base64.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/IntegerToStringConversion.h2
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/StringBuffer.h3
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/StringBuilder.cpp48
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/StringBuilder.h3
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/StringBuilderTest.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/StringConcatenate.h6
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/StringImpl.cpp184
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/StringImpl.h41
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/StringStatics.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/StringUTF8Adaptor.h13
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextCodec.h20
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextCodecICU.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextCodecICU.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextCodecLatin1.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextCodecLatin1.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextCodecReplacement.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextCodecReplacement.h28
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextCodecReplacementTest.cpp64
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp35
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextCodecUTF16.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextCodecUTF8.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextCodecUTF8.h6
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextCodecUTF8Test.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextCodecUserDefined.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextCodecUserDefined.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextEncoding.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextEncoding.h3
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextEncodingRegistry.cpp62
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextEncodingRegistry.h6
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextPosition.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/TextPosition.h1
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/WTFString.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/WTFString.h52
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/WTFStringTest.cpp139
-rw-r--r--chromium/third_party/WebKit/Source/wtf/unicode/icu/UnicodeIcu.h4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/wtf.gyp4
-rw-r--r--chromium/third_party/WebKit/Source/wtf/wtf.gypi29
-rw-r--r--chromium/third_party/WebKit/Source/wtf/wtf_tests.gyp28
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/garden-o-matic.html1
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/base.js134
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/base_unittests.js86
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/builders.js56
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/builders_unittests.js135
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/checkout.js56
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/checkout_unittests.js90
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/config.js87
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/controllers.js32
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/controllers_unittests.js9
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/garden-o-matic.js33
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/model.js35
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/model_unittests.js58
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/net.js95
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/net_unittests.js65
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/pixelzoomer.js31
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/results.js206
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/results_unittests.js157
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/rollbot.js16
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/rollbot_unittests.js12
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/summary-mock.js2
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/svn-log.js48
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/svn-log_unittests.js129
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/treestatus.js2
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/treestatus_unittests.js33
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/ui.js187
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/ui/failures.js17
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/ui/failures_unittests.js18
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/ui/notifications.js56
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/ui/notifications_unittests.js88
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/ui/results.js22
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/ui/results_unittests.js17
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/scripts/ui_unittests.js328
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/styles/common.css24
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/styles/failures.css17
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/styles/main.css8
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/styles/notifications.css65
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/styles/onebar.css20
-rw-r--r--chromium/third_party/WebKit/Tools/GardeningServer/styles/results.css39
-rw-r--r--chromium/third_party/WebKit/Tools/RebaselineLogServer/main.py11
-rw-r--r--chromium/third_party/WebKit/Tools/RebaselineLogServer/main_unittest.py10
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/SpacingHeuristics.pm4
-rwxr-xr-xchromium/third_party/WebKit/Tools/Scripts/check-blink-deps2
-rwxr-xr-xchromium/third_party/WebKit/Tools/Scripts/run-bindings-tests23
-rwxr-xr-xchromium/third_party/WebKit/Tools/Scripts/run-blink-httpd67
-rwxr-xr-xchromium/third_party/WebKit/Tools/Scripts/run-blink-websocketserver88
-rwxr-xr-xchromium/third_party/WebKit/Tools/Scripts/run-inspector-perf-tests41
-rwxr-xr-xchromium/third_party/WebKit/Tools/Scripts/run-inspector-perf-tests.py41
-rwxr-xr-xchromium/third_party/WebKit/Tools/Scripts/update-w3c-deps147
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/bindings/main.py380
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py51
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py82
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py3
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/host.py7
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/host_mock.py12
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/net/sheriff_calendar.py59
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/net/sheriff_calendar_unittest.py56
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive.py22
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_mock.py8
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_unittest.py35
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/breakpad/dump_reader_multipart.py26
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/breakpad/dump_reader_win.py19
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py14
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py34
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py12
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py2
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/repaint_overlay.py250
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/repaint_overlay_unittest.py54
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py76
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py57
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py77
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations.py36
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py50
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations.py99
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py104
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py54
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py89
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_failures.py22
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_results.py3
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py74
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py27
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py22
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py242
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py9
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/builders.py34
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/driver.py39
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py16
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux.py23
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mac.py14
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mock_drt.py2
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py36
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/test.py50
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/win.py94
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py2
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py16
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py31
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/apache_http.py170
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py192
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py70
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_unittest.py69
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/cli_wrapper.py67
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/cli_wrapper_unittest.py34
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/crash_service.py54
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/crash_service_unittest.py3
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py228
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py217
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base_unittest.py58
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/http_server_unittest.py101
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/httpd2.pem41
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/lighttpd.conf89
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/lighttpd.py131
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/lighttpd_unittest.py91
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/pywebsocket.py76
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/server_base.py238
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/server_base_unittest.py58
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/websocket_server.py175
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftest.py13
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checker_unittest.py2
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py65
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py60
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/coverage/tracer.c18
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/common.py18
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/extensions.py36
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi.py19
-rwxr-xr-xchromium/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/standalone.py150
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py16
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/xhr_benchmark_handler.py110
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/bot/commitannouncer.py8
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/bot/commitannouncer_unittest.py29
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/flakytests.py92
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/flakytests_unittest.py64
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py300
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py380
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py5
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py4
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py242
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py7
-rw-r--r--chromium/third_party/WebKit/Tools/TestResultServer/handlers/buildershandler.py150
-rw-r--r--chromium/third_party/WebKit/Tools/TestResultServer/handlers/buildershandler_unittest.py191
-rw-r--r--chromium/third_party/WebKit/Tools/TestResultServer/handlers/menu.py1
-rwxr-xr-xchromium/third_party/WebKit/Tools/TestResultServer/model/datastorefile.py7
-rw-r--r--chromium/third_party/WebKit/Tools/TestResultServer/model/datastorefile_test.py13
-rwxr-xr-xchromium/third_party/WebKit/Tools/TestResultServer/model/jsonresults.py3
-rwxr-xr-xchromium/third_party/WebKit/Tools/TestResultServer/model/jsonresults_unittest.py13
-rw-r--r--chromium/third_party/WebKit/Tools/TestResultServer/static-dashboards/aggregate_results_unittest.js3
-rw-r--r--chromium/third_party/WebKit/Tools/TestResultServer/static-dashboards/builders.js68
-rw-r--r--chromium/third_party/WebKit/Tools/TestResultServer/static-dashboards/builders.jsonp3132
-rw-r--r--chromium/third_party/WebKit/Tools/TestResultServer/static-dashboards/builders_unittest.jsonp9
-rw-r--r--chromium/third_party/WebKit/Tools/TestResultServer/static-dashboards/builders_unittests.js14
-rw-r--r--chromium/third_party/WebKit/Tools/TestResultServer/static-dashboards/flakiness_dashboard_tests.css4
-rw-r--r--chromium/third_party/WebKit/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js17
-rw-r--r--chromium/third_party/WebKit/Tools/TestResultServer/static-dashboards/load_failures.html44
-rw-r--r--chromium/third_party/WebKit/Tools/TestResultServer/static-dashboards/load_failures.js151
-rw-r--r--chromium/third_party/WebKit/Tools/TestResultServer/static-dashboards/load_failures_unittests.js59
-rw-r--r--chromium/third_party/WebKit/Tools/TestResultServer/static-dashboards/loader.js8
-rw-r--r--chromium/third_party/WebKit/Tools/TestResultServer/static-dashboards/run-unittests.html2
-rw-r--r--chromium/third_party/WebKit/Tools/gdb/webkit.py51
-rw-r--r--chromium/third_party/WebKit/Tools/lldb/lldb_webkit.py67
-rw-r--r--chromium/third_party/WebKit/Tools/whitespace_file.txt3
-rw-r--r--chromium/third_party/WebKit/WATCHLISTS191
-rw-r--r--chromium/third_party/WebKit/codereview.settings1
-rw-r--r--chromium/third_party/WebKit/public/BUILD.gn72
-rw-r--r--chromium/third_party/WebKit/public/DEPS1
-rw-r--r--chromium/third_party/WebKit/public/OWNERS2
-rw-r--r--chromium/third_party/WebKit/public/README7
-rw-r--r--chromium/third_party/WebKit/public/all.gyp12
-rw-r--r--chromium/third_party/WebKit/public/blink.gyp19
-rw-r--r--chromium/third_party/WebKit/public/blink_devtools.gyp2
-rw-r--r--chromium/third_party/WebKit/public/blink_headers.gyp18
-rw-r--r--chromium/third_party/WebKit/public/blink_test_plugin.gyp43
-rw-r--r--chromium/third_party/WebKit/public/blink_test_runner.gyp43
-rw-r--r--chromium/third_party/WebKit/public/platform/DEPS4
-rw-r--r--chromium/third_party/WebKit/public/platform/Platform.h90
-rw-r--r--chromium/third_party/WebKit/public/platform/WebAnimationDelegate.h6
-rw-r--r--chromium/third_party/WebKit/public/platform/WebApplicationCacheHost.h132
-rw-r--r--chromium/third_party/WebKit/public/platform/WebApplicationCacheHostClient.h57
-rw-r--r--chromium/third_party/WebKit/public/platform/WebArrayBuffer.h25
-rw-r--r--chromium/third_party/WebKit/public/platform/WebAudioSourceProvider.h5
-rw-r--r--chromium/third_party/WebKit/public/platform/WebBatteryStatus.h30
-rw-r--r--chromium/third_party/WebKit/public/platform/WebBatteryStatusListener.h24
-rw-r--r--chromium/third_party/WebKit/public/platform/WebBlobData.h2
-rw-r--r--chromium/third_party/WebKit/public/platform/WebBlobInfo.h90
-rw-r--r--chromium/third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallback.h40
-rw-r--r--chromium/third_party/WebKit/public/platform/WebCompositingReasons.h80
-rw-r--r--chromium/third_party/WebKit/public/platform/WebCompositorSupport.h3
-rw-r--r--chromium/third_party/WebKit/public/platform/WebConnectionType.h49
-rw-r--r--chromium/third_party/WebKit/public/platform/WebContentDecryptionModuleException.h22
-rw-r--r--chromium/third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h73
-rw-r--r--chromium/third_party/WebKit/public/platform/WebContentDecryptionModuleSession.h23
-rw-r--r--chromium/third_party/WebKit/public/platform/WebContentLayerClient.h6
-rw-r--r--chromium/third_party/WebKit/public/platform/WebConvertableToTraceFormat.h44
-rw-r--r--chromium/third_party/WebKit/public/platform/WebCrypto.h243
-rw-r--r--chromium/third_party/WebKit/public/platform/WebCryptoAlgorithm.h65
-rw-r--r--chromium/third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h168
-rw-r--r--chromium/third_party/WebKit/public/platform/WebCryptoKey.h12
-rw-r--r--chromium/third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h97
-rw-r--r--chromium/third_party/WebKit/public/platform/WebCryptoKeyAlgorithmParams.h142
-rw-r--r--chromium/third_party/WebKit/public/platform/WebDeviceLightListener.h20
-rw-r--r--chromium/third_party/WebKit/public/platform/WebDeviceMotionListener.h2
-rw-r--r--chromium/third_party/WebKit/public/platform/WebDeviceOrientationListener.h2
-rw-r--r--chromium/third_party/WebKit/public/platform/WebDragData.h35
-rw-r--r--chromium/third_party/WebKit/public/platform/WebExternalTextureLayerClient.h2
-rw-r--r--chromium/third_party/WebKit/public/platform/WebExternalTextureMailbox.h7
-rw-r--r--chromium/third_party/WebKit/public/platform/WebFallbackThemeEngine.h1
-rw-r--r--chromium/third_party/WebKit/public/platform/WebFileSystem.h18
-rw-r--r--chromium/third_party/WebKit/public/platform/WebFloatPoint3D.h93
-rw-r--r--chromium/third_party/WebKit/public/platform/WebGamepad.h29
-rw-r--r--chromium/third_party/WebKit/public/platform/WebGamepadListener.h23
-rw-r--r--chromium/third_party/WebKit/public/platform/WebGamepads.h6
-rw-r--r--chromium/third_party/WebKit/public/platform/WebGestureCurveTarget.h4
-rw-r--r--chromium/third_party/WebKit/public/platform/WebGestureDevice.h38
-rw-r--r--chromium/third_party/WebKit/public/platform/WebGraphicsContext3D.h28
-rw-r--r--chromium/third_party/WebKit/public/platform/WebIDBCallbacks.h9
-rw-r--r--chromium/third_party/WebKit/public/platform/WebIDBCursor.h14
-rw-r--r--chromium/third_party/WebKit/public/platform/WebIDBDatabase.h37
-rw-r--r--chromium/third_party/WebKit/public/platform/WebIDBDatabaseError.h2
-rw-r--r--chromium/third_party/WebKit/public/platform/WebIDBKey.h6
-rw-r--r--chromium/third_party/WebKit/public/platform/WebIDBKeyRange.h6
-rw-r--r--chromium/third_party/WebKit/public/platform/WebIDBTypes.h28
-rw-r--r--chromium/third_party/WebKit/public/platform/WebLayer.h37
-rw-r--r--chromium/third_party/WebKit/public/platform/WebLayerClient.h7
-rw-r--r--chromium/third_party/WebKit/public/platform/WebLayerTreeView.h21
-rw-r--r--chromium/third_party/WebKit/public/platform/WebLocalizedString.h9
-rw-r--r--chromium/third_party/WebKit/public/platform/WebLockOrientationCallback.h38
-rw-r--r--chromium/third_party/WebKit/public/platform/WebLockOrientationError.h23
-rw-r--r--chromium/third_party/WebKit/public/platform/WebMIDIAccessorClient.h2
-rw-r--r--chromium/third_party/WebKit/public/platform/WebMediaConstraints.h23
-rw-r--r--chromium/third_party/WebKit/public/platform/WebMediaDeviceInfo.h73
-rw-r--r--chromium/third_party/WebKit/public/platform/WebMediaPlayer.h16
-rw-r--r--chromium/third_party/WebKit/public/platform/WebMediaPlayerClient.h34
-rw-r--r--chromium/third_party/WebKit/public/platform/WebMediaSource.h21
-rw-r--r--chromium/third_party/WebKit/public/platform/WebMediaStream.h36
-rw-r--r--chromium/third_party/WebKit/public/platform/WebMediaStreamCenter.h6
-rw-r--r--chromium/third_party/WebKit/public/platform/WebMediaStreamCenterClient.h4
-rw-r--r--chromium/third_party/WebKit/public/platform/WebMediaStreamTrack.h45
-rw-r--r--chromium/third_party/WebKit/public/platform/WebMediaStreamTrackSourcesRequest.h16
-rw-r--r--chromium/third_party/WebKit/public/platform/WebMessagePortChannel.h3
-rw-r--r--chromium/third_party/WebKit/public/platform/WebMimeRegistry.h1
-rw-r--r--chromium/third_party/WebKit/public/platform/WebPermissionCallbacks.h47
-rw-r--r--chromium/third_party/WebKit/public/platform/WebPrerender.h7
-rw-r--r--chromium/third_party/WebKit/public/platform/WebPrivatePtr.h199
-rw-r--r--chromium/third_party/WebKit/public/platform/WebPushClient.h26
-rw-r--r--chromium/third_party/WebKit/public/platform/WebPushError.h31
-rw-r--r--chromium/third_party/WebKit/public/platform/WebPushRegistration.h25
-rw-r--r--chromium/third_party/WebKit/public/platform/WebRTCDTMFSenderHandler.h2
-rw-r--r--chromium/third_party/WebKit/public/platform/WebRTCDTMFSenderHandlerClient.h5
-rw-r--r--chromium/third_party/WebKit/public/platform/WebRTCDataChannelHandlerClient.h8
-rw-r--r--chromium/third_party/WebKit/public/platform/WebRTCICECandidate.h3
-rw-r--r--chromium/third_party/WebKit/public/platform/WebRTCPeerConnectionHandlerClient.h1
-rw-r--r--chromium/third_party/WebKit/public/platform/WebRTCSessionDescription.h14
-rw-r--r--chromium/third_party/WebKit/public/platform/WebRTCSessionDescriptionRequest.h16
-rw-r--r--chromium/third_party/WebKit/public/platform/WebRTCStatsRequest.h22
-rw-r--r--chromium/third_party/WebKit/public/platform/WebRTCStatsResponse.h4
-rw-r--r--chromium/third_party/WebKit/public/platform/WebReferrerPolicy.h1
-rw-r--r--chromium/third_party/WebKit/public/platform/WebScreenInfo.h14
-rw-r--r--chromium/third_party/WebKit/public/platform/WebScreenOrientationClient.h28
-rw-r--r--chromium/third_party/WebKit/public/platform/WebScreenOrientationLockType.h23
-rw-r--r--chromium/third_party/WebKit/public/platform/WebScreenOrientationType.h20
-rw-r--r--chromium/third_party/WebKit/public/platform/WebScrollbarBehavior.h28
-rw-r--r--chromium/third_party/WebKit/public/platform/WebScrollbarLayer.h1
-rw-r--r--chromium/third_party/WebKit/public/platform/WebSerializedOrigin.h40
-rw-r--r--chromium/third_party/WebKit/public/platform/WebServiceWorker.h30
-rw-r--r--chromium/third_party/WebKit/public/platform/WebServiceWorkerClientsInfo.h23
-rw-r--r--chromium/third_party/WebKit/public/platform/WebServiceWorkerError.h13
-rw-r--r--chromium/third_party/WebKit/public/platform/WebServiceWorkerEventResult.h22
-rw-r--r--chromium/third_party/WebKit/public/platform/WebServiceWorkerProvider.h12
-rw-r--r--chromium/third_party/WebKit/public/platform/WebServiceWorkerProviderClient.h18
-rw-r--r--chromium/third_party/WebKit/public/platform/WebServiceWorkerProxy.h42
-rw-r--r--chromium/third_party/WebKit/public/platform/WebServiceWorkerRequest.h57
-rw-r--r--chromium/third_party/WebKit/public/platform/WebServiceWorkerResponse.h69
-rw-r--r--chromium/third_party/WebKit/public/platform/WebServiceWorkerState.h23
-rw-r--r--chromium/third_party/WebKit/public/platform/WebSocketHandle.h7
-rw-r--r--chromium/third_party/WebKit/public/platform/WebSocketHandleClient.h4
-rw-r--r--chromium/third_party/WebKit/public/platform/WebSocketHandshakeRequestInfo.h1
-rw-r--r--chromium/third_party/WebKit/public/platform/WebSocketHandshakeResponseInfo.h1
-rw-r--r--chromium/third_party/WebKit/public/platform/WebSourceBuffer.h13
-rw-r--r--chromium/third_party/WebKit/public/platform/WebSpeechSynthesisUtterance.h3
-rw-r--r--chromium/third_party/WebKit/public/platform/WebSpeechSynthesisVoice.h2
-rw-r--r--chromium/third_party/WebKit/public/platform/WebStorageArea.h3
-rw-r--r--chromium/third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h36
-rw-r--r--chromium/third_party/WebKit/public/platform/WebThemeEngine.h193
-rw-r--r--chromium/third_party/WebKit/public/platform/WebThreadedDataReceiver.h22
-rw-r--r--chromium/third_party/WebKit/public/platform/WebTimeRange.h6
-rw-r--r--chromium/third_party/WebKit/public/platform/WebURL.h4
-rw-r--r--chromium/third_party/WebKit/public/platform/WebURLError.h6
-rw-r--r--chromium/third_party/WebKit/public/platform/WebURLLoader.h9
-rw-r--r--chromium/third_party/WebKit/public/platform/WebURLLoaderClient.h6
-rw-r--r--chromium/third_party/WebKit/public/platform/WebURLRequest.h14
-rw-r--r--chromium/third_party/WebKit/public/platform/WebUnitTestSupport.h5
-rw-r--r--chromium/third_party/WebKit/public/platform/WebVector.h10
-rw-r--r--chromium/third_party/WebKit/public/platform/WebWaitableEvent.h55
-rw-r--r--chromium/third_party/WebKit/public/platform/android/DEPS4
-rw-r--r--chromium/third_party/WebKit/public/platform/android/WebThemeEngine.h34
-rw-r--r--chromium/third_party/WebKit/public/platform/default/WebThemeEngine.h158
-rw-r--r--chromium/third_party/WebKit/public/platform/linux/DEPS3
-rw-r--r--chromium/third_party/WebKit/public/platform/linux/WebFallbackFont.h50
-rw-r--r--chromium/third_party/WebKit/public/platform/linux/WebFontInfo.h3
-rw-r--r--chromium/third_party/WebKit/public/platform/linux/WebSandboxSupport.h10
-rw-r--r--chromium/third_party/WebKit/public/platform/mac/WebThemeEngine.h78
-rw-r--r--chromium/third_party/WebKit/public/platform/win/WebThemeEngine.h92
-rw-r--r--chromium/third_party/WebKit/public/testing/WebFrameTestProxy.h180
-rw-r--r--chromium/third_party/WebKit/public/testing/WebPreferences.h81
-rw-r--r--chromium/third_party/WebKit/public/testing/WebScopedPtr.h149
-rw-r--r--chromium/third_party/WebKit/public/testing/WebTask.h104
-rw-r--r--chromium/third_party/WebKit/public/testing/WebTestCommon.h69
-rw-r--r--chromium/third_party/WebKit/public/testing/WebTestDelegate.h167
-rw-r--r--chromium/third_party/WebKit/public/testing/WebTestInterfaces.h90
-rw-r--r--chromium/third_party/WebKit/public/testing/WebTestProxy.h562
-rw-r--r--chromium/third_party/WebKit/public/testing/WebTestRunner.h67
-rw-r--r--chromium/third_party/WebKit/public/web/DEPS7
-rw-r--r--chromium/third_party/WebKit/public/web/OWNERS2
-rw-r--r--chromium/third_party/WebKit/public/web/WebAXEnums.h3
-rw-r--r--chromium/third_party/WebKit/public/web/WebAXObject.h14
-rw-r--r--chromium/third_party/WebKit/public/web/WebActiveWheelFlingParameters.h5
-rw-r--r--chromium/third_party/WebKit/public/web/WebApplicationCacheHost.h122
-rw-r--r--chromium/third_party/WebKit/public/web/WebApplicationCacheHostClient.h57
-rw-r--r--chromium/third_party/WebKit/public/web/WebArrayBufferConverter.h53
-rw-r--r--chromium/third_party/WebKit/public/web/WebAutofillClient.h49
-rw-r--r--chromium/third_party/WebKit/public/web/WebBindings.h5
-rw-r--r--chromium/third_party/WebKit/public/web/WebBlob.h14
-rw-r--r--chromium/third_party/WebKit/public/web/WebCompositionUnderline.h22
-rw-r--r--chromium/third_party/WebKit/public/web/WebConsoleMessage.h1
-rw-r--r--chromium/third_party/WebKit/public/web/WebContentSecurityPolicy.h1
-rw-r--r--chromium/third_party/WebKit/public/web/WebContextMenuData.h9
-rw-r--r--chromium/third_party/WebKit/public/web/WebCrossOriginPreflightResultCache.h50
-rw-r--r--chromium/third_party/WebKit/public/web/WebCryptoNormalize.h61
-rw-r--r--chromium/third_party/WebKit/public/web/WebDOMActivityLogger.h21
-rw-r--r--chromium/third_party/WebKit/public/web/WebDOMCustomEvent.h1
-rw-r--r--chromium/third_party/WebKit/public/web/WebDOMError.h9
-rw-r--r--chromium/third_party/WebKit/public/web/WebDOMEvent.h10
-rw-r--r--chromium/third_party/WebKit/public/web/WebDOMFileSystem.h38
-rw-r--r--chromium/third_party/WebKit/public/web/WebDOMMediaStreamTrack.h2
-rw-r--r--chromium/third_party/WebKit/public/web/WebDOMMessageEvent.h2
-rw-r--r--chromium/third_party/WebKit/public/web/WebDataSource.h7
-rw-r--r--chromium/third_party/WebKit/public/web/WebDevToolsAgent.h22
-rw-r--r--chromium/third_party/WebKit/public/web/WebDevToolsAgentClient.h28
-rw-r--r--chromium/third_party/WebKit/public/web/WebDeviceEmulationParams.h52
-rw-r--r--chromium/third_party/WebKit/public/web/WebDocument.h27
-rw-r--r--chromium/third_party/WebKit/public/web/WebDocumentType.h6
-rw-r--r--chromium/third_party/WebKit/public/web/WebDragStatus.h3
-rw-r--r--chromium/third_party/WebKit/public/web/WebElement.h6
-rw-r--r--chromium/third_party/WebKit/public/web/WebElementCollection.h81
-rw-r--r--chromium/third_party/WebKit/public/web/WebEmbeddedWorker.h12
-rw-r--r--chromium/third_party/WebKit/public/web/WebEmbeddedWorkerStartData.h14
-rw-r--r--chromium/third_party/WebKit/public/web/WebFontCache.h50
-rw-r--r--chromium/third_party/WebKit/public/web/WebFontDescription.h2
-rw-r--r--chromium/third_party/WebKit/public/web/WebFormControlElement.h50
-rw-r--r--chromium/third_party/WebKit/public/web/WebFormElement.h10
-rw-r--r--chromium/third_party/WebKit/public/web/WebFrame.h194
-rw-r--r--chromium/third_party/WebKit/public/web/WebFrameClient.h291
-rw-r--r--chromium/third_party/WebKit/public/web/WebGeolocationClientMock.h77
-rw-r--r--chromium/third_party/WebKit/public/web/WebGeolocationError.h10
-rw-r--r--chromium/third_party/WebKit/public/web/WebGeolocationPermissionRequest.h13
-rw-r--r--chromium/third_party/WebKit/public/web/WebGeolocationPermissionRequestManager.h1
-rw-r--r--chromium/third_party/WebKit/public/web/WebGeolocationPosition.h10
-rw-r--r--chromium/third_party/WebKit/public/web/WebHeap.h63
-rw-r--r--chromium/third_party/WebKit/public/web/WebHelperPlugin.h36
-rw-r--r--chromium/third_party/WebKit/public/web/WebHistoryCommitType.h29
-rw-r--r--chromium/third_party/WebKit/public/web/WebHistoryItem.h24
-rw-r--r--chromium/third_party/WebKit/public/web/WebIconURL.h11
-rw-r--r--chromium/third_party/WebKit/public/web/WebInputElement.h41
-rw-r--r--chromium/third_party/WebKit/public/web/WebInputEvent.h152
-rw-r--r--chromium/third_party/WebKit/public/web/WebKit.h4
-rw-r--r--chromium/third_party/WebKit/public/web/WebLabelElement.h6
-rw-r--r--chromium/third_party/WebKit/public/web/WebLeakDetector.h65
-rw-r--r--chromium/third_party/WebKit/public/web/WebLocalFrame.h41
-rw-r--r--chromium/third_party/WebKit/public/web/WebMIDIClient.h15
-rw-r--r--chromium/third_party/WebKit/public/web/WebMIDIClientMock.h6
-rw-r--r--chromium/third_party/WebKit/public/web/WebMIDIPermissionRequest.h27
-rw-r--r--chromium/third_party/WebKit/public/web/WebMediaDevicesRequest.h82
-rw-r--r--chromium/third_party/WebKit/public/web/WebMediaPlayerAction.h3
-rw-r--r--chromium/third_party/WebKit/public/web/WebNavigationPolicy.h1
-rw-r--r--chromium/third_party/WebKit/public/web/WebNavigatorContentUtilsClient.h46
-rw-r--r--chromium/third_party/WebKit/public/web/WebNetworkStateNotifier.h2
-rw-r--r--chromium/third_party/WebKit/public/web/WebNode.h30
-rw-r--r--chromium/third_party/WebKit/public/web/WebNodeCollection.h78
-rw-r--r--chromium/third_party/WebKit/public/web/WebNodeList.h14
-rw-r--r--chromium/third_party/WebKit/public/web/WebNotification.h63
-rw-r--r--chromium/third_party/WebKit/public/web/WebNotificationPresenter.h8
-rw-r--r--chromium/third_party/WebKit/public/web/WebOptionElement.h6
-rw-r--r--chromium/third_party/WebKit/public/web/WebPageSerializer.h15
-rw-r--r--chromium/third_party/WebKit/public/web/WebPageVisibilityState.h1
-rw-r--r--chromium/third_party/WebKit/public/web/WebPasswordFormData.h126
-rw-r--r--chromium/third_party/WebKit/public/web/WebPasswordGeneratorClient.h47
-rw-r--r--chromium/third_party/WebKit/public/web/WebPerformance.h9
-rw-r--r--chromium/third_party/WebKit/public/web/WebPermissionClient.h58
-rw-r--r--chromium/third_party/WebKit/public/web/WebPlugin.h3
-rw-r--r--chromium/third_party/WebKit/public/web/WebPluginAction.h3
-rw-r--r--chromium/third_party/WebKit/public/web/WebPluginDocument.h6
-rw-r--r--chromium/third_party/WebKit/public/web/WebPopupMenu.h3
-rw-r--r--chromium/third_party/WebKit/public/web/WebPopupType.h2
-rw-r--r--chromium/third_party/WebKit/public/web/WebPrintScalingOption.h1
-rw-r--r--chromium/third_party/WebKit/public/web/WebRange.h27
-rw-r--r--chromium/third_party/WebKit/public/web/WebRemoteFrame.h22
-rw-r--r--chromium/third_party/WebKit/public/web/WebRuntimeFeatures.h79
-rw-r--r--chromium/third_party/WebKit/public/web/WebScopedWindowFocusAllowedIndicator.h56
-rw-r--r--chromium/third_party/WebKit/public/web/WebScriptController.h9
-rw-r--r--chromium/third_party/WebKit/public/web/WebSelectElement.h8
-rw-r--r--chromium/third_party/WebKit/public/web/WebSerializedScriptValueVersion.h2
-rw-r--r--chromium/third_party/WebKit/public/web/WebServiceWorkerContextClient.h77
-rw-r--r--chromium/third_party/WebKit/public/web/WebServiceWorkerContextProxy.h20
-rw-r--r--chromium/third_party/WebKit/public/web/WebServiceWorkerNetworkProvider.h52
-rw-r--r--chromium/third_party/WebKit/public/web/WebSettings.h42
-rw-r--r--chromium/third_party/WebKit/public/web/WebSharedWorker.h25
-rw-r--r--chromium/third_party/WebKit/public/web/WebSharedWorkerClient.h6
-rw-r--r--chromium/third_party/WebKit/public/web/WebSharedWorkerConnector.h16
-rw-r--r--chromium/third_party/WebKit/public/web/WebSharedWorkerRepositoryClient.h13
-rw-r--r--chromium/third_party/WebKit/public/web/WebSocket.h8
-rw-r--r--chromium/third_party/WebKit/public/web/WebSocketClient.h11
-rw-r--r--chromium/third_party/WebKit/public/web/WebSpeechGrammar.h4
-rw-r--r--chromium/third_party/WebKit/public/web/WebSpeechInputController.h72
-rw-r--r--chromium/third_party/WebKit/public/web/WebSpeechInputListener.h72
-rw-r--r--chromium/third_party/WebKit/public/web/WebSpeechInputResult.h71
-rw-r--r--chromium/third_party/WebKit/public/web/WebSpeechRecognitionHandle.h6
-rw-r--r--chromium/third_party/WebKit/public/web/WebSpeechRecognitionResult.h2
-rw-r--r--chromium/third_party/WebKit/public/web/WebSurroundingText.h26
-rw-r--r--chromium/third_party/WebKit/public/web/WebTestingSupport.h7
-rw-r--r--chromium/third_party/WebKit/public/web/WebTextAreaElement.h9
-rw-r--r--chromium/third_party/WebKit/public/web/WebTextDirection.h1
-rw-r--r--[-rwxr-xr-x]chromium/third_party/WebKit/public/web/WebTouchAction.h3
-rw-r--r--chromium/third_party/WebKit/public/web/WebTouchPoint.h10
-rw-r--r--chromium/third_party/WebKit/public/web/WebUserGestureIndicator.h8
-rw-r--r--chromium/third_party/WebKit/public/web/WebUserMediaClient.h4
-rw-r--r--chromium/third_party/WebKit/public/web/WebUserMediaRequest.h8
-rw-r--r--chromium/third_party/WebKit/public/web/WebValidationMessageClient.h63
-rw-r--r--chromium/third_party/WebKit/public/web/WebView.h116
-rw-r--r--chromium/third_party/WebKit/public/web/WebViewClient.h142
-rw-r--r--chromium/third_party/WebKit/public/web/WebWidget.h42
-rw-r--r--chromium/third_party/WebKit/public/web/WebWidgetClient.h17
-rw-r--r--chromium/third_party/WebKit/public/web/WebWorkerPermissionClientProxy.h5
-rw-r--r--chromium/third_party/WebKit/public/web/android/DEPS3
-rw-r--r--chromium/third_party/WebKit/public/web/android/WebInputEventFactory.h95
-rw-r--r--chromium/third_party/WebKit/public/web/gtk/WebInputEventFactory.h61
-rw-r--r--chromium/third_party/WebKit/public/web/mac/WebInputEventFactory.h2
-rw-r--r--chromium/third_party/WebKit/public/web/mac/WebScrollbarTheme.h10
-rw-r--r--chromium/third_party/WebKit/public/web/mac/WebSubstringUtil.h14
-rw-r--r--chromium/third_party/WebKit/public/web/win/WebFontRendering.h25
-rw-r--r--chromium/third_party/WebKit/public/web/win/WebInputEventFactory.h62
-rw-r--r--chromium/third_party/accessibility-audit/README.chromium4
-rw-r--r--chromium/third_party/accessibility-audit/axs_testing.js1359
-rw-r--r--chromium/third_party/adobe/flash/BUILD.gn65
-rw-r--r--chromium/third_party/adobe/flash/flash_player.gyp2
-rw-r--r--chromium/third_party/android_crazy_linker/crazy_linker.gyp54
-rw-r--r--chromium/third_party/android_opengl/LICENSE15
-rw-r--r--chromium/third_party/android_opengl/OWNERS2
-rw-r--r--chromium/third_party/android_opengl/README.chromium15
-rw-r--r--chromium/third_party/android_opengl/README.security1
-rw-r--r--chromium/third_party/android_opengl/etc1/etc1.cpp589
-rw-r--r--chromium/third_party/android_opengl/etc1/etc1.gyp16
-rw-r--r--chromium/third_party/android_opengl/etc1/etc1.h38
-rw-r--r--chromium/third_party/android_tools/android_tools.gyp8
-rw-r--r--chromium/third_party/android_tools/ndk/sources/android/cpufeatures/Android.mk19
-rw-r--r--chromium/third_party/android_tools/ndk/sources/android/cpufeatures/cpu-features.c326
-rw-r--r--chromium/third_party/android_tools/ndk/sources/android/cpufeatures/cpu-features.h65
-rw-r--r--chromium/third_party/angle/.gclient2
-rw-r--r--chromium/third_party/angle/.gitattributes1
-rw-r--r--chromium/third_party/angle/AUTHORS1
-rw-r--r--chromium/third_party/angle/DEPS6
-rw-r--r--chromium/third_party/angle/build/all.gyp40
-rw-r--r--chromium/third_party/angle/build/common.gypi464
-rw-r--r--chromium/third_party/angle/build/common_defines.gypi114
-rw-r--r--chromium/third_party/angle/build/gyp_angle29
-rw-r--r--chromium/third_party/angle/codereview.settings6
-rw-r--r--chromium/third_party/angle/enumerate_files.py62
-rw-r--r--chromium/third_party/angle/extensions/ANGLE_platform_angle_d3d.txt112
-rw-r--r--chromium/third_party/angle/extensions/EGL_ANGLE_window_fixed_size.txt136
-rw-r--r--chromium/third_party/angle/extensions/EXT_blend_minmax.txt164
-rw-r--r--chromium/third_party/angle/extensions/EXT_color_buffer_float.txt230
-rw-r--r--chromium/third_party/angle/extensions/EXT_texture_rg.txt195
-rw-r--r--chromium/third_party/angle/generate_projects49
-rw-r--r--chromium/third_party/angle/include/EGL/egl.h2
-rw-r--r--chromium/third_party/angle/include/EGL/eglext.h255
-rw-r--r--chromium/third_party/angle/include/EGL/eglplatform.h18
-rw-r--r--chromium/third_party/angle/include/GLES2/gl2.h9
-rw-r--r--chromium/third_party/angle/include/GLES2/gl2ext.h593
-rw-r--r--chromium/third_party/angle/include/GLES3/gl3.h1061
-rw-r--r--chromium/third_party/angle/include/GLES3/gl3ext.h24
-rw-r--r--chromium/third_party/angle/include/GLES3/gl3platform.h30
-rw-r--r--chromium/third_party/angle/include/GLSLANG/ShaderLang.h104
-rw-r--r--chromium/third_party/angle/projects/build/All.vcxproj215
-rw-r--r--chromium/third_party/angle/projects/build/all.sln285
-rw-r--r--chromium/third_party/angle/projects/samples/dds_to_header.vcxproj119
-rw-r--r--chromium/third_party/angle/projects/samples/dds_to_header.vcxproj.filters14
-rw-r--r--chromium/third_party/angle/projects/samples/essl_to_glsl.vcxproj133
-rw-r--r--chromium/third_party/angle/projects/samples/essl_to_glsl.vcxproj.filters14
-rw-r--r--chromium/third_party/angle/projects/samples/essl_to_hlsl.vcxproj133
-rw-r--r--chromium/third_party/angle/projects/samples/essl_to_hlsl.vcxproj.filters14
-rw-r--r--chromium/third_party/angle/projects/samples/hello_triangle.vcxproj133
-rw-r--r--chromium/third_party/angle/projects/samples/hello_triangle.vcxproj.filters17
-rw-r--r--chromium/third_party/angle/projects/samples/mip_map_2d.vcxproj133
-rw-r--r--chromium/third_party/angle/projects/samples/mip_map_2d.vcxproj.filters17
-rw-r--r--chromium/third_party/angle/projects/samples/multi_texture.vcxproj147
-rw-r--r--chromium/third_party/angle/projects/samples/multi_texture.vcxproj.filters23
-rw-r--r--chromium/third_party/angle/projects/samples/multiple_draw_buffers.vcxproj153
-rw-r--r--chromium/third_party/angle/projects/samples/multiple_draw_buffers.vcxproj.filters26
-rw-r--r--chromium/third_party/angle/projects/samples/particle_system.vcxproj141
-rw-r--r--chromium/third_party/angle/projects/samples/particle_system.vcxproj.filters20
-rw-r--r--chromium/third_party/angle/projects/samples/post_sub_buffer.vcxproj133
-rw-r--r--chromium/third_party/angle/projects/samples/post_sub_buffer.vcxproj.filters17
-rw-r--r--chromium/third_party/angle/projects/samples/sample_util.vcxproj158
-rw-r--r--chromium/third_party/angle/projects/samples/sample_util.vcxproj.filters101
-rw-r--r--chromium/third_party/angle/projects/samples/samples.sln252
-rw-r--r--chromium/third_party/angle/projects/samples/simple_instancing.vcxproj133
-rw-r--r--chromium/third_party/angle/projects/samples/simple_instancing.vcxproj.filters17
-rw-r--r--chromium/third_party/angle/projects/samples/simple_texture_2d.vcxproj133
-rw-r--r--chromium/third_party/angle/projects/samples/simple_texture_2d.vcxproj.filters17
-rw-r--r--chromium/third_party/angle/projects/samples/simple_texture_cubemap.vcxproj133
-rw-r--r--chromium/third_party/angle/projects/samples/simple_texture_cubemap.vcxproj.filters17
-rw-r--r--chromium/third_party/angle/projects/samples/simple_vertex_shader.vcxproj133
-rw-r--r--chromium/third_party/angle/projects/samples/simple_vertex_shader.vcxproj.filters17
-rw-r--r--chromium/third_party/angle/projects/samples/stencil_operations.vcxproj133
-rw-r--r--chromium/third_party/angle/projects/samples/stencil_operations.vcxproj.filters17
-rw-r--r--chromium/third_party/angle/projects/samples/texture_wrap.vcxproj133
-rw-r--r--chromium/third_party/angle/projects/samples/texture_wrap.vcxproj.filters17
-rw-r--r--chromium/third_party/angle/projects/src/angle.sln82
-rw-r--r--chromium/third_party/angle/projects/src/commit_id.vcxproj115
-rw-r--r--chromium/third_party/angle/projects/src/copy_compiler_dll.vcxproj127
-rw-r--r--chromium/third_party/angle/projects/src/copy_compiler_dll.vcxproj.filters14
-rw-r--r--chromium/third_party/angle/projects/src/copy_scripts.vcxproj121
-rw-r--r--chromium/third_party/angle/projects/src/libEGL.vcxproj172
-rw-r--r--chromium/third_party/angle/projects/src/libEGL.vcxproj.filters151
-rw-r--r--chromium/third_party/angle/projects/src/libGLESv2.vcxproj409
-rw-r--r--chromium/third_party/angle/projects/src/libGLESv2.vcxproj.filters847
-rw-r--r--chromium/third_party/angle/projects/src/preprocessor.vcxproj147
-rw-r--r--chromium/third_party/angle/projects/src/preprocessor.vcxproj.filters95
-rw-r--r--chromium/third_party/angle/projects/src/translator.vcxproj119
-rw-r--r--chromium/third_party/angle/projects/src/translator.vcxproj.filters17
-rw-r--r--chromium/third_party/angle/projects/src/translator_lib.vcxproj266
-rw-r--r--chromium/third_party/angle/projects/src/translator_lib.vcxproj.filters481
-rw-r--r--chromium/third_party/angle/projects/src/translator_static.vcxproj119
-rw-r--r--chromium/third_party/angle/projects/src/translator_static.vcxproj.filters17
-rw-r--r--chromium/third_party/angle/samples/angle/Simple_Instancing/Simple_Instancing.c230
-rw-r--r--chromium/third_party/angle/samples/angle/Simple_Instancing/Simple_Instancing.vcxproj105
-rw-r--r--chromium/third_party/angle/samples/angle/hello_triangle/HelloTriangle.cpp96
-rw-r--r--chromium/third_party/angle/samples/angle/mip_map_2d/MipMap2D.cpp169
-rw-r--r--chromium/third_party/angle/samples/angle/multi_texture/MultiTexture.cpp173
-rw-r--r--chromium/third_party/angle/samples/angle/multi_texture/basemap.tga (renamed from chromium/third_party/angle/samples/gles2_book/MultiTexture/basemap.tga)bin786476 -> 786476 bytes
-rw-r--r--chromium/third_party/angle/samples/angle/multi_texture/lightmap.tga (renamed from chromium/third_party/angle/samples/gles2_book/MultiTexture/lightmap.tga)bin196626 -> 196626 bytes
-rw-r--r--chromium/third_party/angle/samples/angle/multiple_draw_buffers/MultipleDrawBuffers.cpp215
-rw-r--r--chromium/third_party/angle/samples/angle/multiple_draw_buffers/multiple_draw_buffers_copy_fs.glsl8
-rw-r--r--chromium/third_party/angle/samples/angle/multiple_draw_buffers/multiple_draw_buffers_fs.glsl12
-rw-r--r--chromium/third_party/angle/samples/angle/multiple_draw_buffers/multiple_draw_buffers_vs.glsl8
-rw-r--r--chromium/third_party/angle/samples/angle/particle_system/ParticleSystem.cpp231
-rw-r--r--chromium/third_party/angle/samples/angle/particle_system/smoke.tga (renamed from chromium/third_party/angle/samples/gles2_book/ParticleSystem/smoke.tga)bin49170 -> 49170 bytes
-rw-r--r--chromium/third_party/angle/samples/angle/post_sub_buffer/PostSubBuffer.cpp176
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/Event.h86
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/Matrix.cpp219
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/Matrix.h46
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/SampleApplication.cpp223
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/SampleApplication.h72
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/Timer.h18
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/Vector.cpp194
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/Vector.h82
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/Window.cpp50
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/Window.h50
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/geometry_utils.cpp145
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/geometry_utils.h34
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/keyboard.h117
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/mouse.h21
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/path_utils.h15
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/random_utils.cpp22
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/random_utils.h12
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/shader_utils.cpp125
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/shader_utils.h29
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/texture_utils.cpp129
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/texture_utils.h17
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/tga_utils.cpp122
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/tga_utils.h29
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/win32/Win32Timer.cpp53
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/win32/Win32Timer.h30
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/win32/Win32Window.cpp510
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/win32/Win32Window.h42
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/win32/Win32_path_utils.cpp23
-rw-r--r--chromium/third_party/angle/samples/angle/simple_instancing/SimpleInstancing.cpp200
-rw-r--r--chromium/third_party/angle/samples/angle/simple_texture_2d/SimpleTexture2D.cpp141
-rw-r--r--chromium/third_party/angle/samples/angle/simple_texture_cubemap/SimpleTextureCubemap.cpp138
-rw-r--r--chromium/third_party/angle/samples/angle/simple_vertex_shader/SimpleVertexShader.cpp150
-rw-r--r--chromium/third_party/angle/samples/angle/stencil_operations/StencilOperations.cpp242
-rw-r--r--chromium/third_party/angle/samples/angle/texture_wrap/TextureWrap.cpp160
-rw-r--r--chromium/third_party/angle/samples/build_samples.gyp178
-rw-r--r--chromium/third_party/angle/samples/dds_to_header/main.cpp238
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Common/Win32/esUtil_TGA.c122
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Common/Win32/esUtil_win32.c190
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Common/esShader.c155
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Common/esShapes.c279
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Common/esTransform.c212
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Common/esUtil.c290
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Common/esUtil.h297
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Common/esUtil.vcxproj103
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Common/esUtil.vcxproj.filters39
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Common/esUtil_win.h65
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Hello_Triangle/Hello_Triangle.c194
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Hello_Triangle/Hello_Triangle.vcxproj105
-rw-r--r--chromium/third_party/angle/samples/gles2_book/MipMap2D/MipMap2D.c346
-rw-r--r--chromium/third_party/angle/samples/gles2_book/MipMap2D/MipMap2D.vcxproj105
-rw-r--r--chromium/third_party/angle/samples/gles2_book/MultiTexture/MultiTexture.c213
-rw-r--r--chromium/third_party/angle/samples/gles2_book/MultiTexture/MultiTexture.vcxproj115
-rw-r--r--chromium/third_party/angle/samples/gles2_book/MultipleRenderTargets/MultipleRenderTargets.c295
-rw-r--r--chromium/third_party/angle/samples/gles2_book/MultipleRenderTargets/MultipleRenderTargets.vcxproj105
-rw-r--r--chromium/third_party/angle/samples/gles2_book/ParticleSystem/ParticleSystem.c294
-rw-r--r--chromium/third_party/angle/samples/gles2_book/ParticleSystem/ParticleSystem.vcxproj111
-rw-r--r--chromium/third_party/angle/samples/gles2_book/PostSubBuffer/PostSubBuffer.c204
-rw-r--r--chromium/third_party/angle/samples/gles2_book/PostSubBuffer/PostSubBuffer.vcxproj105
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Simple_Texture2D/Simple_Texture2D.c198
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Simple_Texture2D/Simple_Texture2D.vcxproj105
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Simple_TextureCubemap/Simple_TextureCubemap.c229
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Simple_TextureCubemap/Simple_TextureCubemap.vcxproj108
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Simple_VertexShader/Simple_VertexShader.c194
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Simple_VertexShader/Simple_VertexShader.vcxproj105
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Stencil_Test/Stencil_Test.c273
-rw-r--r--chromium/third_party/angle/samples/gles2_book/Stencil_Test/Stencil_Test.vcxproj97
-rw-r--r--chromium/third_party/angle/samples/gles2_book/TextureWrap/TextureWrap.c254
-rw-r--r--chromium/third_party/angle/samples/gles2_book/TextureWrap/TextureWrap.vcxproj105
-rw-r--r--chromium/third_party/angle/samples/samples.gyp199
-rw-r--r--chromium/third_party/angle/samples/samples.sln167
-rw-r--r--chromium/third_party/angle/samples/translator/essl_to_glsl.vcproj193
-rw-r--r--chromium/third_party/angle/samples/translator/essl_to_hlsl.vcxproj104
-rw-r--r--chromium/third_party/angle/samples/translator/essl_to_hlsl.vcxproj.filters21
-rw-r--r--chromium/third_party/angle/samples/translator/translator.cpp46
-rw-r--r--chromium/third_party/angle/src/ANGLE.sln56
-rw-r--r--chromium/third_party/angle/src/angle.gyp10
-rw-r--r--chromium/third_party/angle/src/angle.gypi150
-rw-r--r--chromium/third_party/angle/src/build_angle.gyp13
-rw-r--r--chromium/third_party/angle/src/build_angle.gypi431
-rw-r--r--chromium/third_party/angle/src/commit.h14
-rw-r--r--chromium/third_party/angle/src/commit_id.py38
-rw-r--r--chromium/third_party/angle/src/common/RefCountObject.cpp1
-rw-r--r--chromium/third_party/angle/src/common/RefCountObject.h64
-rw-r--r--chromium/third_party/angle/src/common/angleutils.h24
-rw-r--r--chromium/third_party/angle/src/common/blocklayout.cpp339
-rw-r--r--chromium/third_party/angle/src/common/blocklayout.h111
-rw-r--r--chromium/third_party/angle/src/common/debug.cpp89
-rw-r--r--chromium/third_party/angle/src/common/debug.h50
-rw-r--r--chromium/third_party/angle/src/common/event_tracer.cpp4
-rw-r--r--chromium/third_party/angle/src/common/event_tracer.h12
-rw-r--r--chromium/third_party/angle/src/common/mathutil.cpp66
-rw-r--r--chromium/third_party/angle/src/common/mathutil.h546
-rw-r--r--chromium/third_party/angle/src/common/shadervars.h162
-rw-r--r--chromium/third_party/angle/src/common/system.h26
-rw-r--r--chromium/third_party/angle/src/common/utilities.cpp473
-rw-r--r--chromium/third_party/angle/src/common/utilities.h56
-rw-r--r--chromium/third_party/angle/src/common/version.h18
-rw-r--r--chromium/third_party/angle/src/compiler.gypi99
-rw-r--r--chromium/third_party/angle/src/compiler/BaseTypes.h148
-rw-r--r--chromium/third_party/angle/src/compiler/BuiltInFunctionEmulator.cpp406
-rw-r--r--chromium/third_party/angle/src/compiler/BuiltInFunctionEmulator.h93
-rw-r--r--chromium/third_party/angle/src/compiler/CodeGen.cpp38
-rw-r--r--chromium/third_party/angle/src/compiler/Common.h77
-rw-r--r--chromium/third_party/angle/src/compiler/Compiler.cpp440
-rw-r--r--chromium/third_party/angle/src/compiler/ConstantUnion.h257
-rw-r--r--chromium/third_party/angle/src/compiler/DetectCallDepth.cpp185
-rw-r--r--chromium/third_party/angle/src/compiler/DetectCallDepth.h80
-rw-r--r--chromium/third_party/angle/src/compiler/DetectDiscontinuity.cpp139
-rw-r--r--chromium/third_party/angle/src/compiler/DetectDiscontinuity.h52
-rw-r--r--chromium/third_party/angle/src/compiler/Diagnostics.cpp63
-rw-r--r--chromium/third_party/angle/src/compiler/Diagnostics.h44
-rw-r--r--chromium/third_party/angle/src/compiler/DirectiveHandler.cpp161
-rw-r--r--chromium/third_party/angle/src/compiler/DirectiveHandler.h46
-rw-r--r--chromium/third_party/angle/src/compiler/ForLoopUnroll.cpp215
-rw-r--r--chromium/third_party/angle/src/compiler/ForLoopUnroll.h52
-rw-r--r--chromium/third_party/angle/src/compiler/HashNames.h19
-rw-r--r--chromium/third_party/angle/src/compiler/InfoSink.cpp54
-rw-r--r--chromium/third_party/angle/src/compiler/InfoSink.h116
-rw-r--r--chromium/third_party/angle/src/compiler/Initialize.cpp564
-rw-r--r--chromium/third_party/angle/src/compiler/Initialize.h23
-rw-r--r--chromium/third_party/angle/src/compiler/InitializeDll.cpp32
-rw-r--r--chromium/third_party/angle/src/compiler/InitializeGLPosition.cpp61
-rw-r--r--chromium/third_party/angle/src/compiler/InitializeGLPosition.h33
-rw-r--r--chromium/third_party/angle/src/compiler/InitializeParseContext.cpp40
-rw-r--r--chromium/third_party/angle/src/compiler/IntermTraverse.cpp259
-rw-r--r--chromium/third_party/angle/src/compiler/Intermediate.cpp1500
-rw-r--r--chromium/third_party/angle/src/compiler/MapLongVariableNames.cpp115
-rw-r--r--chromium/third_party/angle/src/compiler/MapLongVariableNames.h58
-rw-r--r--chromium/third_party/angle/src/compiler/NodeSearch.h78
-rw-r--r--chromium/third_party/angle/src/compiler/OutputESSL.cpp26
-rw-r--r--chromium/third_party/angle/src/compiler/OutputESSL.h25
-rw-r--r--chromium/third_party/angle/src/compiler/OutputGLSL.cpp35
-rw-r--r--chromium/third_party/angle/src/compiler/OutputGLSL.h26
-rw-r--r--chromium/third_party/angle/src/compiler/OutputGLSLBase.cpp817
-rw-r--r--chromium/third_party/angle/src/compiler/OutputGLSLBase.h79
-rw-r--r--chromium/third_party/angle/src/compiler/OutputHLSL.cpp3133
-rw-r--r--chromium/third_party/angle/src/compiler/OutputHLSL.h167
-rw-r--r--chromium/third_party/angle/src/compiler/ParseContext.cpp1602
-rw-r--r--chromium/third_party/angle/src/compiler/ParseContext.h134
-rw-r--r--chromium/third_party/angle/src/compiler/PoolAlloc.cpp294
-rw-r--r--chromium/third_party/angle/src/compiler/QualifierAlive.cpp58
-rw-r--r--chromium/third_party/angle/src/compiler/RemoveTree.cpp77
-rw-r--r--chromium/third_party/angle/src/compiler/RenameFunction.h36
-rw-r--r--chromium/third_party/angle/src/compiler/SearchSymbol.cpp38
-rw-r--r--chromium/third_party/angle/src/compiler/SearchSymbol.h33
-rw-r--r--chromium/third_party/angle/src/compiler/ShHandle.h169
-rw-r--r--chromium/third_party/angle/src/compiler/ShaderLang.cpp387
-rw-r--r--chromium/third_party/angle/src/compiler/SymbolTable.cpp216
-rw-r--r--chromium/third_party/angle/src/compiler/SymbolTable.h382
-rw-r--r--chromium/third_party/angle/src/compiler/TranslatorESSL.cpp43
-rw-r--r--chromium/third_party/angle/src/compiler/TranslatorESSL.h23
-rw-r--r--chromium/third_party/angle/src/compiler/TranslatorGLSL.cpp44
-rw-r--r--chromium/third_party/angle/src/compiler/TranslatorGLSL.h20
-rw-r--r--chromium/third_party/angle/src/compiler/TranslatorHLSL.cpp24
-rw-r--r--chromium/third_party/angle/src/compiler/TranslatorHLSL.h27
-rw-r--r--chromium/third_party/angle/src/compiler/Types.h307
-rw-r--r--chromium/third_party/angle/src/compiler/UnfoldShortCircuit.cpp184
-rw-r--r--chromium/third_party/angle/src/compiler/UnfoldShortCircuit.h39
-rw-r--r--chromium/third_party/angle/src/compiler/UnfoldShortCircuitAST.cpp81
-rw-r--r--chromium/third_party/angle/src/compiler/UnfoldShortCircuitAST.h51
-rw-r--r--chromium/third_party/angle/src/compiler/Uniform.cpp21
-rw-r--r--chromium/third_party/angle/src/compiler/Uniform.h35
-rw-r--r--chromium/third_party/angle/src/compiler/ValidateLimitations.cpp512
-rw-r--r--chromium/third_party/angle/src/compiler/ValidateLimitations.h59
-rw-r--r--chromium/third_party/angle/src/compiler/VariableInfo.cpp308
-rw-r--r--chromium/third_party/angle/src/compiler/VariableInfo.h51
-rw-r--r--chromium/third_party/angle/src/compiler/VariablePacker.cpp297
-rw-r--r--chromium/third_party/angle/src/compiler/VariablePacker.h41
-rw-r--r--chromium/third_party/angle/src/compiler/VersionGLSL.cpp140
-rw-r--r--chromium/third_party/angle/src/compiler/VersionGLSL.h56
-rw-r--r--chromium/third_party/angle/src/compiler/debug.cpp37
-rw-r--r--chromium/third_party/angle/src/compiler/depgraph/DependencyGraph.cpp97
-rw-r--r--chromium/third_party/angle/src/compiler/depgraph/DependencyGraph.h212
-rw-r--r--chromium/third_party/angle/src/compiler/depgraph/DependencyGraphBuilder.cpp227
-rw-r--r--chromium/third_party/angle/src/compiler/depgraph/DependencyGraphBuilder.h181
-rw-r--r--chromium/third_party/angle/src/compiler/depgraph/DependencyGraphOutput.cpp65
-rw-r--r--chromium/third_party/angle/src/compiler/depgraph/DependencyGraphOutput.h30
-rw-r--r--chromium/third_party/angle/src/compiler/depgraph/DependencyGraphTraverse.cpp69
-rw-r--r--chromium/third_party/angle/src/compiler/glslang.l355
-rw-r--r--chromium/third_party/angle/src/compiler/glslang.y2002
-rw-r--r--chromium/third_party/angle/src/compiler/glslang_lex.cpp2964
-rw-r--r--chromium/third_party/angle/src/compiler/glslang_tab.cpp4870
-rw-r--r--chromium/third_party/angle/src/compiler/glslang_tab.h223
-rw-r--r--chromium/third_party/angle/src/compiler/intermOut.cpp424
-rw-r--r--chromium/third_party/angle/src/compiler/intermediate.h635
-rw-r--r--chromium/third_party/angle/src/compiler/localintermediate.h57
-rw-r--r--chromium/third_party/angle/src/compiler/osinclude.h65
-rw-r--r--chromium/third_party/angle/src/compiler/ossource_posix.cpp64
-rw-r--r--chromium/third_party/angle/src/compiler/ossource_win.cpp57
-rw-r--r--chromium/third_party/angle/src/compiler/parseConst.cpp245
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/DiagnosticsBase.cpp80
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/DiagnosticsBase.h6
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/DirectiveHandlerBase.h18
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/DirectiveParser.cpp171
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/DirectiveParser.h62
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/ExpressionParser.cpp119
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/ExpressionParser.h8
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/ExpressionParser.y97
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/Input.cpp4
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/Input.h29
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/Lexer.h2
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/Macro.cpp2
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/Macro.h9
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/MacroExpander.cpp64
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/MacroExpander.h60
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/Preprocessor.cpp35
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/Preprocessor.h19
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/SourceLocation.h18
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/Token.cpp10
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/Token.h35
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/Tokenizer.cpp236
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/Tokenizer.h16
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/Tokenizer.l38
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/length_limits.h21
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/numeric_lex.h8
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/pp_utils.h4
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/preprocessor.vcxproj172
-rw-r--r--chromium/third_party/angle/src/compiler/preprocessor/preprocessor.vcxproj.filters100
-rw-r--r--chromium/third_party/angle/src/compiler/timing/RestrictFragmentShaderTiming.cpp127
-rw-r--r--chromium/third_party/angle/src/compiler/timing/RestrictFragmentShaderTiming.h40
-rw-r--r--chromium/third_party/angle/src/compiler/timing/RestrictVertexShaderTiming.cpp17
-rw-r--r--chromium/third_party/angle/src/compiler/timing/RestrictVertexShaderTiming.h33
-rw-r--r--chromium/third_party/angle/src/compiler/translator.vcxproj304
-rw-r--r--chromium/third_party/angle/src/compiler/translator.vcxproj.filters361
-rw-r--r--chromium/third_party/angle/src/compiler/translator/64bit-lexer-safety.patch (renamed from chromium/third_party/angle/src/compiler/64bit-lexer-safety.patch)0
-rw-r--r--chromium/third_party/angle/src/compiler/translator/BaseTypes.h471
-rw-r--r--chromium/third_party/angle/src/compiler/translator/BuiltInFunctionEmulator.cpp406
-rw-r--r--chromium/third_party/angle/src/compiler/translator/BuiltInFunctionEmulator.h91
-rw-r--r--chromium/third_party/angle/src/compiler/translator/CodeGen.cpp38
-rw-r--r--chromium/third_party/angle/src/compiler/translator/Common.h92
-rw-r--r--chromium/third_party/angle/src/compiler/translator/Compiler.cpp579
-rw-r--r--chromium/third_party/angle/src/compiler/translator/ConstantUnion.h282
-rw-r--r--chromium/third_party/angle/src/compiler/translator/DetectCallDepth.cpp185
-rw-r--r--chromium/third_party/angle/src/compiler/translator/DetectCallDepth.h78
-rw-r--r--chromium/third_party/angle/src/compiler/translator/DetectDiscontinuity.cpp139
-rw-r--r--chromium/third_party/angle/src/compiler/translator/DetectDiscontinuity.h52
-rw-r--r--chromium/third_party/angle/src/compiler/translator/Diagnostics.cpp63
-rw-r--r--chromium/third_party/angle/src/compiler/translator/Diagnostics.h44
-rw-r--r--chromium/third_party/angle/src/compiler/translator/DirectiveHandler.cpp166
-rw-r--r--chromium/third_party/angle/src/compiler/translator/DirectiveHandler.h48
-rw-r--r--chromium/third_party/angle/src/compiler/translator/ExtensionBehavior.h (renamed from chromium/third_party/angle/src/compiler/ExtensionBehavior.h)0
-rw-r--r--chromium/third_party/angle/src/compiler/translator/FlagStd140Structs.cpp77
-rw-r--r--chromium/third_party/angle/src/compiler/translator/FlagStd140Structs.h37
-rw-r--r--chromium/third_party/angle/src/compiler/translator/ForLoopUnroll.cpp82
-rw-r--r--chromium/third_party/angle/src/compiler/translator/ForLoopUnroll.h50
-rw-r--r--chromium/third_party/angle/src/compiler/translator/HashNames.h18
-rw-r--r--chromium/third_party/angle/src/compiler/translator/InfoSink.cpp54
-rw-r--r--chromium/third_party/angle/src/compiler/translator/InfoSink.h116
-rw-r--r--chromium/third_party/angle/src/compiler/translator/Initialize.cpp760
-rw-r--r--chromium/third_party/angle/src/compiler/translator/Initialize.h23
-rw-r--r--chromium/third_party/angle/src/compiler/translator/InitializeDll.cpp32
-rw-r--r--chromium/third_party/angle/src/compiler/translator/InitializeDll.h (renamed from chromium/third_party/angle/src/compiler/InitializeDll.h)0
-rw-r--r--chromium/third_party/angle/src/compiler/translator/InitializeGlobals.h (renamed from chromium/third_party/angle/src/compiler/InitializeGlobals.h)0
-rw-r--r--chromium/third_party/angle/src/compiler/translator/InitializeParseContext.cpp40
-rw-r--r--chromium/third_party/angle/src/compiler/translator/InitializeParseContext.h (renamed from chromium/third_party/angle/src/compiler/InitializeParseContext.h)0
-rw-r--r--chromium/third_party/angle/src/compiler/translator/InitializeVariables.cpp116
-rw-r--r--chromium/third_party/angle/src/compiler/translator/InitializeVariables.h50
-rw-r--r--chromium/third_party/angle/src/compiler/translator/IntermTraverse.cpp263
-rw-r--r--chromium/third_party/angle/src/compiler/translator/Intermediate.cpp1835
-rw-r--r--chromium/third_party/angle/src/compiler/translator/LoopInfo.cpp211
-rw-r--r--chromium/third_party/angle/src/compiler/translator/LoopInfo.h80
-rw-r--r--chromium/third_party/angle/src/compiler/translator/MMap.h (renamed from chromium/third_party/angle/src/compiler/MMap.h)0
-rw-r--r--chromium/third_party/angle/src/compiler/translator/NodeSearch.h80
-rw-r--r--chromium/third_party/angle/src/compiler/translator/OutputESSL.cpp27
-rw-r--r--chromium/third_party/angle/src/compiler/translator/OutputESSL.h26
-rw-r--r--chromium/third_party/angle/src/compiler/translator/OutputGLSL.cpp57
-rw-r--r--chromium/third_party/angle/src/compiler/translator/OutputGLSL.h28
-rw-r--r--chromium/third_party/angle/src/compiler/translator/OutputGLSLBase.cpp1080
-rw-r--r--chromium/third_party/angle/src/compiler/translator/OutputGLSLBase.h91
-rw-r--r--chromium/third_party/angle/src/compiler/translator/OutputHLSL.cpp4184
-rw-r--r--chromium/third_party/angle/src/compiler/translator/OutputHLSL.h220
-rw-r--r--chromium/third_party/angle/src/compiler/translator/ParseContext.cpp2649
-rw-r--r--chromium/third_party/angle/src/compiler/translator/ParseContext.h169
-rw-r--r--chromium/third_party/angle/src/compiler/translator/PoolAlloc.cpp294
-rw-r--r--chromium/third_party/angle/src/compiler/translator/PoolAlloc.h (renamed from chromium/third_party/angle/src/compiler/PoolAlloc.h)0
-rw-r--r--chromium/third_party/angle/src/compiler/translator/Pragma.h (renamed from chromium/third_party/angle/src/compiler/Pragma.h)0
-rw-r--r--chromium/third_party/angle/src/compiler/translator/QualifierAlive.cpp58
-rw-r--r--chromium/third_party/angle/src/compiler/translator/QualifierAlive.h (renamed from chromium/third_party/angle/src/compiler/QualifierAlive.h)0
-rw-r--r--chromium/third_party/angle/src/compiler/translator/RemoveTree.cpp29
-rw-r--r--chromium/third_party/angle/src/compiler/translator/RemoveTree.h (renamed from chromium/third_party/angle/src/compiler/RemoveTree.h)0
-rw-r--r--chromium/third_party/angle/src/compiler/translator/RenameFunction.h36
-rw-r--r--chromium/third_party/angle/src/compiler/translator/RewriteElseBlocks.cpp132
-rw-r--r--chromium/third_party/angle/src/compiler/translator/RewriteElseBlocks.h37
-rw-r--r--chromium/third_party/angle/src/compiler/translator/SearchSymbol.cpp38
-rw-r--r--chromium/third_party/angle/src/compiler/translator/SearchSymbol.h33
-rw-r--r--chromium/third_party/angle/src/compiler/translator/ShHandle.h180
-rw-r--r--chromium/third_party/angle/src/compiler/translator/ShaderLang.cpp445
-rw-r--r--chromium/third_party/angle/src/compiler/translator/SymbolTable.cpp241
-rw-r--r--chromium/third_party/angle/src/compiler/translator/SymbolTable.h431
-rw-r--r--chromium/third_party/angle/src/compiler/translator/TranslatorESSL.cpp43
-rw-r--r--chromium/third_party/angle/src/compiler/translator/TranslatorESSL.h23
-rw-r--r--chromium/third_party/angle/src/compiler/translator/TranslatorGLSL.cpp64
-rw-r--r--chromium/third_party/angle/src/compiler/translator/TranslatorGLSL.h23
-rw-r--r--chromium/third_party/angle/src/compiler/translator/TranslatorHLSL.cpp29
-rw-r--r--chromium/third_party/angle/src/compiler/translator/TranslatorHLSL.h34
-rw-r--r--chromium/third_party/angle/src/compiler/translator/Types.cpp250
-rw-r--r--chromium/third_party/angle/src/compiler/translator/Types.h586
-rw-r--r--chromium/third_party/angle/src/compiler/translator/UnfoldShortCircuit.cpp184
-rw-r--r--chromium/third_party/angle/src/compiler/translator/UnfoldShortCircuit.h39
-rw-r--r--chromium/third_party/angle/src/compiler/translator/UnfoldShortCircuitAST.cpp81
-rw-r--r--chromium/third_party/angle/src/compiler/translator/UnfoldShortCircuitAST.h51
-rw-r--r--chromium/third_party/angle/src/compiler/translator/ValidateLimitations.cpp469
-rw-r--r--chromium/third_party/angle/src/compiler/translator/ValidateLimitations.h55
-rw-r--r--chromium/third_party/angle/src/compiler/translator/ValidateOutputs.cpp78
-rw-r--r--chromium/third_party/angle/src/compiler/translator/ValidateOutputs.h33
-rw-r--r--chromium/third_party/angle/src/compiler/translator/VariableInfo.cpp374
-rw-r--r--chromium/third_party/angle/src/compiler/translator/VariableInfo.h51
-rw-r--r--chromium/third_party/angle/src/compiler/translator/VariablePacker.cpp323
-rw-r--r--chromium/third_party/angle/src/compiler/translator/VariablePacker.h41
-rw-r--r--chromium/third_party/angle/src/compiler/translator/VersionGLSL.cpp140
-rw-r--r--chromium/third_party/angle/src/compiler/translator/VersionGLSL.h56
-rw-r--r--chromium/third_party/angle/src/compiler/translator/compilerdebug.cpp37
-rw-r--r--chromium/third_party/angle/src/compiler/translator/compilerdebug.h (renamed from chromium/third_party/angle/src/compiler/debug.h)0
-rw-r--r--chromium/third_party/angle/src/compiler/translator/depgraph/DependencyGraph.cpp97
-rw-r--r--chromium/third_party/angle/src/compiler/translator/depgraph/DependencyGraph.h212
-rw-r--r--chromium/third_party/angle/src/compiler/translator/depgraph/DependencyGraphBuilder.cpp227
-rw-r--r--chromium/third_party/angle/src/compiler/translator/depgraph/DependencyGraphBuilder.h181
-rw-r--r--chromium/third_party/angle/src/compiler/translator/depgraph/DependencyGraphOutput.cpp65
-rw-r--r--chromium/third_party/angle/src/compiler/translator/depgraph/DependencyGraphOutput.h30
-rw-r--r--chromium/third_party/angle/src/compiler/translator/depgraph/DependencyGraphTraverse.cpp69
-rw-r--r--[-rwxr-xr-x]chromium/third_party/angle/src/compiler/translator/generate_parser.sh (renamed from chromium/third_party/angle/src/compiler/generate_parser.sh)0
-rw-r--r--chromium/third_party/angle/src/compiler/translator/glslang.h (renamed from chromium/third_party/angle/src/compiler/glslang.h)0
-rw-r--r--chromium/third_party/angle/src/compiler/translator/glslang.l558
-rw-r--r--chromium/third_party/angle/src/compiler/translator/glslang.y1951
-rw-r--r--chromium/third_party/angle/src/compiler/translator/glslang_lex.cpp3360
-rw-r--r--chromium/third_party/angle/src/compiler/translator/glslang_tab.cpp5263
-rw-r--r--chromium/third_party/angle/src/compiler/translator/glslang_tab.h257
-rw-r--r--chromium/third_party/angle/src/compiler/translator/intermOut.cpp439
-rw-r--r--chromium/third_party/angle/src/compiler/translator/intermediate.h719
-rw-r--r--chromium/third_party/angle/src/compiler/translator/length_limits.h21
-rw-r--r--chromium/third_party/angle/src/compiler/translator/localintermediate.h55
-rw-r--r--chromium/third_party/angle/src/compiler/translator/osinclude.h66
-rw-r--r--chromium/third_party/angle/src/compiler/translator/ossource_posix.cpp64
-rw-r--r--chromium/third_party/angle/src/compiler/translator/ossource_win.cpp57
-rw-r--r--chromium/third_party/angle/src/compiler/translator/parseConst.cpp251
-rw-r--r--chromium/third_party/angle/src/compiler/translator/timing/RestrictFragmentShaderTiming.cpp136
-rw-r--r--chromium/third_party/angle/src/compiler/translator/timing/RestrictFragmentShaderTiming.h38
-rw-r--r--chromium/third_party/angle/src/compiler/translator/timing/RestrictVertexShaderTiming.cpp17
-rw-r--r--chromium/third_party/angle/src/compiler/translator/timing/RestrictVertexShaderTiming.h31
-rw-r--r--chromium/third_party/angle/src/compiler/translator/util.cpp28
-rw-r--r--chromium/third_party/angle/src/compiler/translator/util.h (renamed from chromium/third_party/angle/src/compiler/util.h)0
-rw-r--r--chromium/third_party/angle/src/compiler/util.cpp28
-rw-r--r--chromium/third_party/angle/src/copy_compiler_dll.bat4
-rw-r--r--chromium/third_party/angle/src/libEGL.gypi60
-rw-r--r--chromium/third_party/angle/src/libEGL/Config.cpp16
-rw-r--r--chromium/third_party/angle/src/libEGL/Display.cpp56
-rw-r--r--chromium/third_party/angle/src/libEGL/Display.h4
-rw-r--r--chromium/third_party/angle/src/libEGL/Surface.cpp98
-rw-r--r--chromium/third_party/angle/src/libEGL/Surface.h18
-rw-r--r--chromium/third_party/angle/src/libEGL/libEGL.cpp126
-rw-r--r--chromium/third_party/angle/src/libEGL/libEGL.rc11
-rw-r--r--chromium/third_party/angle/src/libEGL/libEGL.vcxproj258
-rw-r--r--chromium/third_party/angle/src/libEGL/libEGL.vcxproj.filters68
-rw-r--r--chromium/third_party/angle/src/libEGL/main.cpp97
-rw-r--r--chromium/third_party/angle/src/libGLESv2.gypi124
-rw-r--r--chromium/third_party/angle/src/libGLESv2/BinaryStream.h118
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Buffer.cpp106
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Buffer.h19
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Constants.h34
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Context.cpp2649
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Context.h338
-rw-r--r--chromium/third_party/angle/src/libGLESv2/DynamicHLSL.cpp1057
-rw-r--r--chromium/third_party/angle/src/libGLESv2/DynamicHLSL.h78
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Fence.cpp165
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Fence.h41
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Framebuffer.cpp375
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Framebuffer.h48
-rw-r--r--chromium/third_party/angle/src/libGLESv2/FramebufferAttachment.cpp491
-rw-r--r--chromium/third_party/angle/src/libGLESv2/FramebufferAttachment.h247
-rw-r--r--chromium/third_party/angle/src/libGLESv2/HandleAllocator.h2
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Program.cpp162
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Program.h22
-rw-r--r--chromium/third_party/angle/src/libGLESv2/ProgramBinary.cpp2887
-rw-r--r--chromium/third_party/angle/src/libGLESv2/ProgramBinary.h190
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Query.cpp5
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Query.h3
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Renderbuffer.cpp341
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Renderbuffer.h153
-rw-r--r--chromium/third_party/angle/src/libGLESv2/RenderbufferProxySet.cpp87
-rw-r--r--chromium/third_party/angle/src/libGLESv2/RenderbufferProxySet.h46
-rw-r--r--chromium/third_party/angle/src/libGLESv2/ResourceManager.cpp115
-rw-r--r--chromium/third_party/angle/src/libGLESv2/ResourceManager.h51
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Sampler.cpp44
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Sampler.h60
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Shader.cpp521
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Shader.h103
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Texture.cpp2460
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Texture.h348
-rw-r--r--chromium/third_party/angle/src/libGLESv2/TransformFeedback.cpp63
-rw-r--r--chromium/third_party/angle/src/libGLESv2/TransformFeedback.h45
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Uniform.cpp91
-rw-r--r--chromium/third_party/angle/src/libGLESv2/Uniform.h45
-rw-r--r--chromium/third_party/angle/src/libGLESv2/VertexArray.cpp71
-rw-r--r--chromium/third_party/angle/src/libGLESv2/VertexArray.h54
-rw-r--r--chromium/third_party/angle/src/libGLESv2/VertexAttribute.h156
-rw-r--r--chromium/third_party/angle/src/libGLESv2/angletypes.cpp177
-rw-r--r--chromium/third_party/angle/src/libGLESv2/angletypes.h158
-rw-r--r--chromium/third_party/angle/src/libGLESv2/constants.h42
-rw-r--r--chromium/third_party/angle/src/libGLESv2/formatutils.cpp1812
-rw-r--r--chromium/third_party/angle/src/libGLESv2/formatutils.h98
-rw-r--r--chromium/third_party/angle/src/libGLESv2/libGLESv2.cpp7518
-rw-r--r--chromium/third_party/angle/src/libGLESv2/libGLESv2.def113
-rw-r--r--chromium/third_party/angle/src/libGLESv2/libGLESv2.rc11
-rw-r--r--chromium/third_party/angle/src/libGLESv2/libGLESv2.vcxproj425
-rw-r--r--chromium/third_party/angle/src/libGLESv2/libGLESv2.vcxproj.filters527
-rw-r--r--chromium/third_party/angle/src/libGLESv2/main.cpp75
-rw-r--r--chromium/third_party/angle/src/libGLESv2/main.h3
-rw-r--r--chromium/third_party/angle/src/libGLESv2/mathutil.h161
-rw-r--r--chromium/third_party/angle/src/libGLESv2/precompiled.h18
-rw-r--r--chromium/third_party/angle/src/libGLESv2/queryconversions.cpp148
-rw-r--r--chromium/third_party/angle/src/libGLESv2/queryconversions.h17
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Blit.cpp595
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Blit.h94
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/BufferStorage.cpp4
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/BufferStorage.h13
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/BufferStorage11.cpp358
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/BufferStorage11.h56
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/BufferStorage9.cpp78
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/BufferStorage9.h42
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Fence11.cpp134
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Fence11.h39
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Fence9.cpp135
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Fence9.h39
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/FenceImpl.h21
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Image.cpp527
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Image.h93
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Image11.cpp457
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Image11.h76
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Image9.cpp732
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Image9.h79
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/ImageSSE2.cpp100
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/IndexBuffer.cpp1
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/IndexBuffer11.cpp183
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/IndexBuffer9.cpp207
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/IndexDataManager.cpp18
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/IndexRangeCache.cpp4
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/IndexRangeCache.h1
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/InputLayoutCache.cpp213
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/InputLayoutCache.h95
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Query11.cpp122
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Query11.h40
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Query9.cpp125
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Query9.h40
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/QueryImpl.h1
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/RenderStateCache.cpp406
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/RenderStateCache.h101
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/RenderTarget.h20
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/RenderTarget11.cpp355
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/RenderTarget11.h51
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/RenderTarget9.cpp113
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/RenderTarget9.h40
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Renderer.cpp203
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Renderer.h138
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Renderer11.cpp3551
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Renderer11.h358
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Renderer9.cpp3287
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/Renderer9.h356
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/ShaderCache.h110
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/ShaderExecutable.h17
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/ShaderExecutable11.cpp109
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/ShaderExecutable11.h47
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/ShaderExecutable9.cpp60
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/SwapChain11.cpp775
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/SwapChain11.h78
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/SwapChain9.cpp443
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/TextureStorage.cpp110
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/TextureStorage.h73
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/TextureStorage11.cpp667
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/TextureStorage11.h120
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/TextureStorage9.cpp328
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/TextureStorage9.h109
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/VertexBuffer.cpp95
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/VertexBuffer.h25
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/VertexBuffer11.cpp440
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/VertexBuffer11.h74
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/VertexBuffer9.cpp530
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/VertexBuffer9.h91
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/VertexDataManager.cpp65
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/VertexDataManager.h9
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/VertexDeclarationCache.cpp217
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/copyimage.cpp23
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/copyimage.h42
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/copyvertex.h309
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d/HLSLCompiler.cpp123
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d/HLSLCompiler.h40
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/Blit11.cpp1040
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/Blit11.h126
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/BufferStorage11.cpp869
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/BufferStorage11.h100
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/Clear11.cpp557
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/Clear11.h77
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/Fence11.cpp71
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/Fence11.h38
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/Image11.cpp461
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/Image11.h77
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/IndexBuffer11.cpp175
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/IndexBuffer11.h (renamed from chromium/third_party/angle/src/libGLESv2/renderer/IndexBuffer11.h)0
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/InputLayoutCache.cpp248
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/InputLayoutCache.h95
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/PixelTransfer11.cpp252
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/PixelTransfer11.h80
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/Query11.cpp155
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/Query11.h41
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/RenderStateCache.cpp436
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/RenderStateCache.h108
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/RenderTarget11.cpp459
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/RenderTarget11.h54
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/Renderer11.cpp3856
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/Renderer11.h415
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/ShaderExecutable11.cpp112
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/ShaderExecutable11.h61
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/SwapChain11.cpp661
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/SwapChain11.h80
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/TextureStorage11.cpp1567
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/TextureStorage11.h278
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/VertexBuffer11.cpp223
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/VertexBuffer11.h52
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/formatutils11.cpp1665
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/formatutils11.h79
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/renderer11_utils.cpp280
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/renderer11_utils.h165
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/BufferToTexture11.hlsl76
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/Clear11.hlsl102
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/Passthrough2D11.hlsl111
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/Passthrough3D11.hlsl146
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/Swizzle11.hlsl99
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_gs.h166
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_4f.h223
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_4i.h129
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_4ui.h130
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_vs.h303
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/clearfloat11ps.h196
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/clearfloat11vs.h131
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/clearsint11ps.h196
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/clearsint11vs.h131
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/clearuint11ps.h196
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/clearuint11vs.h131
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthrough2d11vs.h134
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthrough3d11gs.h192
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthrough3d11vs.h156
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughdepth2d11ps.h146
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughlum2d11ps.h152
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughlum3d11ps.h161
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughlumalpha2d11ps.h148
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughlumalpha3d11ps.h157
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughr2d11ps.h154
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughr2di11ps.h168
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughr2dui11ps.h169
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughr3d11ps.h163
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughr3di11ps.h175
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughr3dui11ps.h176
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrg2d11ps.h154
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrg2di11ps.h168
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrg2dui11ps.h169
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrg3d11ps.h163
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrg3di11ps.h175
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrg3dui11ps.h176
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgb2d11ps.h152
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgb2di11ps.h166
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgb2dui11ps.h167
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgb3d11ps.h161
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgb3di11ps.h173
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgb3dui11ps.h174
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgba2d11ps.h141
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgba2di11ps.h158
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgba2dui11ps.h158
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgba3d11ps.h150
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgba3di11ps.h165
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgba3dui11ps.h165
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/swizzlef2darrayps.h279
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/swizzlef2dps.h257
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/swizzlef3dps.h266
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/swizzlei2darrayps.h287
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/swizzlei2dps.h271
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/swizzlei3dps.h278
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/swizzleui2darrayps.h287
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/swizzleui2dps.h271
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/compiled/swizzleui3dps.h278
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d11/shaders/generate_shaders.bat119
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/Blit9.cpp645
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/Blit9.h94
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/BufferStorage9.cpp98
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/BufferStorage9.h46
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/Fence9.cpp73
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/Fence9.h38
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/Image9.cpp700
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/Image9.h80
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/IndexBuffer9.cpp199
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/IndexBuffer9.h (renamed from chromium/third_party/angle/src/libGLESv2/renderer/IndexBuffer9.h)0
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/Query9.cpp125
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/Query9.h41
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/RenderTarget9.cpp141
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/RenderTarget9.h43
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/Renderer9.cpp3577
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/Renderer9.h411
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/ShaderCache.h102
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/ShaderExecutable9.cpp54
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/ShaderExecutable9.h (renamed from chromium/third_party/angle/src/libGLESv2/renderer/ShaderExecutable9.h)0
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/SwapChain9.cpp416
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/SwapChain9.h (renamed from chromium/third_party/angle/src/libGLESv2/renderer/SwapChain9.h)0
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/TextureStorage9.cpp308
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/TextureStorage9.h109
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/VertexBuffer9.cpp252
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/VertexBuffer9.h54
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/VertexDeclarationCache.cpp216
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/VertexDeclarationCache.h (renamed from chromium/third_party/angle/src/libGLESv2/renderer/VertexDeclarationCache.h)0
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/formatutils9.cpp864
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/formatutils9.h77
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/renderer9_utils.cpp247
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/renderer9_utils.h56
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/shaders/Blit.ps33
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/shaders/Blit.vs (renamed from chromium/third_party/angle/src/libGLESv2/renderer/shaders/Blit.vs)0
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/shaders/compiled/componentmaskps.h85
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/shaders/compiled/flipyvs.h (renamed from chromium/third_party/angle/src/libGLESv2/renderer/shaders/compiled/flipyvs.h)0
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/shaders/compiled/luminanceps.h95
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/shaders/compiled/passthroughps.h (renamed from chromium/third_party/angle/src/libGLESv2/renderer/shaders/compiled/passthroughps.h)0
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/shaders/compiled/standardvs.h (renamed from chromium/third_party/angle/src/libGLESv2/renderer/shaders/compiled/standardvs.h)0
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/d3d9/shaders/generate_shaders.bat63
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/generatemip.h330
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/imageformats.h2029
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/loadimage.cpp951
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/loadimage.h343
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/loadimageSSE2.cpp107
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/renderer11_utils.cpp688
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/renderer11_utils.h95
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/renderer9_utils.cpp500
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/renderer9_utils.h74
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/shaders/Blit.ps39
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/shaders/Clear11.hlsl38
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/shaders/Passthrough11.hlsl29
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/shaders/compiled/clear11vs.h131
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/shaders/compiled/clearmultiple11ps.h196
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/shaders/compiled/clearsingle11ps.h110
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/shaders/compiled/componentmaskps.h79
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/shaders/compiled/luminanceps.h79
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/shaders/compiled/passthrough11vs.h134
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/shaders/compiled/passthroughlum11ps.h152
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/shaders/compiled/passthroughlumalpha11ps.h148
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/shaders/compiled/passthroughrgb11ps.h152
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/shaders/compiled/passthroughrgba11ps.h141
-rw-r--r--chromium/third_party/angle/src/libGLESv2/renderer/shaders/generate_shaders.bat24
-rw-r--r--chromium/third_party/angle/src/libGLESv2/utilities.cpp769
-rw-r--r--chromium/third_party/angle/src/libGLESv2/utilities.h67
-rw-r--r--chromium/third_party/angle/src/libGLESv2/validationES.cpp1293
-rw-r--r--chromium/third_party/angle/src/libGLESv2/validationES.h63
-rw-r--r--chromium/third_party/angle/src/libGLESv2/validationES2.cpp992
-rw-r--r--chromium/third_party/angle/src/libGLESv2/validationES2.h35
-rw-r--r--chromium/third_party/angle/src/libGLESv2/validationES3.cpp760
-rw-r--r--chromium/third_party/angle/src/libGLESv2/validationES3.h39
-rw-r--r--chromium/third_party/angle/src/third_party/compiler/ArrayBoundsClamper.h6
-rw-r--r--chromium/third_party/angle/src/third_party/murmurhash/MurmurHash3.h14
-rw-r--r--chromium/third_party/angle/src/third_party/systeminfo/SystemInfo.cpp60
-rw-r--r--chromium/third_party/angle/src/third_party/systeminfo/SystemInfo.h35
-rw-r--r--chromium/third_party/angle/tests/build_tests.gyp100
-rw-r--r--chromium/third_party/angle/tests/compiler_tests/compiler_tests.gypi21
-rw-r--r--chromium/third_party/angle/tests/preprocessor_tests/preprocessor_tests.gypi38
-rw-r--r--chromium/third_party/angle/tests/tests.gyp364
-rw-r--r--chromium/third_party/ashmem/BUILD.gn22
-rw-r--r--chromium/third_party/blanketjs/LICENSE22
-rw-r--r--chromium/third_party/blanketjs/OWNERS2
-rw-r--r--chromium/third_party/blanketjs/README.chromium17
-rw-r--r--chromium/third_party/blanketjs/patches/config_autostart_bug.patch69
-rw-r--r--chromium/third_party/blanketjs/src/blanket.js5350
-rw-r--r--chromium/third_party/blanketjs/src/qunit_adapter.js73
-rw-r--r--chromium/third_party/brotli/BUILD.gn51
-rw-r--r--chromium/third_party/brotli/OWNERS2
-rw-r--r--chromium/third_party/brotli/README.chromium15
-rw-r--r--chromium/third_party/brotli/brotli.gyp24
-rw-r--r--chromium/third_party/brotli/src/LICENSE27
-rw-r--r--chromium/third_party/brotli/src/README160
-rw-r--r--chromium/third_party/brotli/src/brotli/LICENSE202
-rw-r--r--chromium/third_party/brotli/src/brotli/brotlispec.txt5284
-rw-r--r--chromium/third_party/brotli/src/brotli/dec/Makefile10
-rw-r--r--chromium/third_party/brotli/src/brotli/dec/README3
-rw-r--r--chromium/third_party/brotli/src/brotli/dec/bit_reader.c50
-rw-r--r--chromium/third_party/brotli/src/brotli/dec/bit_reader.h175
-rw-r--r--chromium/third_party/brotli/src/brotli/dec/context.h259
-rw-r--r--chromium/third_party/brotli/src/brotli/dec/decode.c1116
-rw-r--r--chromium/third_party/brotli/src/brotli/dec/decode.h54
-rw-r--r--chromium/third_party/brotli/src/brotli/dec/dictionary.h9494
-rw-r--r--chromium/third_party/brotli/src/brotli/dec/huffman.c164
-rw-r--r--chromium/third_party/brotli/src/brotli/dec/huffman.h44
-rw-r--r--chromium/third_party/brotli/src/brotli/dec/prefix.h65
-rw-r--r--chromium/third_party/brotli/src/brotli/dec/safe_malloc.c42
-rw-r--r--chromium/third_party/brotli/src/brotli/dec/safe_malloc.h45
-rw-r--r--chromium/third_party/brotli/src/brotli/dec/streams.c117
-rw-r--r--chromium/third_party/brotli/src/brotli/dec/streams.h103
-rw-r--r--chromium/third_party/brotli/src/brotli/dec/transform.h239
-rw-r--r--chromium/third_party/brotli/src/brotli/dec/types.h42
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/Makefile11
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/README3
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/backward_references.cc267
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/backward_references.h40
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/bit_cost.h143
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/block_splitter.cc391
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/block_splitter.h77
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/cluster.h288
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/command.h50
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/context.h185
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/dictionary.h9483
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/encode.cc1056
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/encode.h93
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/entropy_encode.cc504
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/entropy_encode.h116
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/fast_log.h161
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/find_match_length.h85
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/hash.h447
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/histogram.cc94
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/histogram.h114
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/literal_cost.cc171
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/literal_cost.h38
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/port.h138
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/prefix.cc166
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/prefix.h51
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/ringbuffer.h89
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/static_dict.h68
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/transform.h242
-rw-r--r--chromium/third_party/brotli/src/brotli/enc/write_bits.h95
-rw-r--r--chromium/third_party/brotli/src/build.xml32
-rw-r--r--chromium/third_party/brotli/src/docs/WOFFUltraCondensedfileformat.pdfbin0 -> 192108 bytes
-rw-r--r--chromium/third_party/brotli/src/ots-lzma.patch5500
-rw-r--r--chromium/third_party/brotli/src/shared.mk17
-rw-r--r--chromium/third_party/brotli/src/woff2/Makefile29
-rw-r--r--chromium/third_party/brotli/src/woff2/buffer.h171
-rw-r--r--chromium/third_party/brotli/src/woff2/file.h40
-rw-r--r--chromium/third_party/brotli/src/woff2/font.cc187
-rw-r--r--chromium/third_party/brotli/src/woff2/font.h79
-rw-r--r--chromium/third_party/brotli/src/woff2/glyph.cc380
-rw-r--r--chromium/third_party/brotli/src/woff2/glyph.h71
-rw-r--r--chromium/third_party/brotli/src/woff2/normalize.cc196
-rw-r--r--chromium/third_party/brotli/src/woff2/normalize.h45
-rw-r--r--chromium/third_party/brotli/src/woff2/port.h46
-rw-r--r--chromium/third_party/brotli/src/woff2/round.h33
-rw-r--r--chromium/third_party/brotli/src/woff2/store_bytes.h61
-rw-r--r--chromium/third_party/brotli/src/woff2/table_tags.cc90
-rw-r--r--chromium/third_party/brotli/src/woff2/table_tags.h34
-rw-r--r--chromium/third_party/brotli/src/woff2/transform.cc264
-rw-r--r--chromium/third_party/brotli/src/woff2/transform.h31
-rw-r--r--chromium/third_party/brotli/src/woff2/woff2_common.h50
-rw-r--r--chromium/third_party/brotli/src/woff2/woff2_compress.cc52
-rw-r--r--chromium/third_party/brotli/src/woff2/woff2_dec.cc895
-rw-r--r--chromium/third_party/brotli/src/woff2/woff2_dec.h36
-rw-r--r--chromium/third_party/brotli/src/woff2/woff2_decompress.cc54
-rw-r--r--chromium/third_party/brotli/src/woff2/woff2_enc.cc281
-rw-r--r--chromium/third_party/brotli/src/woff2/woff2_enc.h36
-rw-r--r--chromium/third_party/brotli/src/woff2_header_dump.py38
-rw-r--r--chromium/third_party/bspatch/README.chromium1
-rw-r--r--chromium/third_party/bspatch/mbspatch.cc4
-rw-r--r--chromium/third_party/cacheinvalidation/OWNERS1
-rw-r--r--chromium/third_party/cacheinvalidation/README.chromium2
-rw-r--r--chromium/third_party/cacheinvalidation/cacheinvalidation.gyp27
-rw-r--r--chromium/third_party/cacheinvalidation/src/example-app-build/AndroidManifest.xml10
-rwxr-xr-xchromium/third_party/cacheinvalidation/src/example-app-build/generate_protos.sh2
-rw-r--r--chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/android_channel.proto91
-rw-r--r--chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/channel_common.proto49
-rw-r--r--chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/build_constants.h2
-rw-r--r--chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/protocol-handler_test.cc25
-rw-r--r--chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/types.proto2
-rw-r--r--chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/examples/android2/example_listener.proto31
-rw-r--r--chromium/third_party/cacheinvalidation/src/proto/android_channel.proto1
-rw-r--r--chromium/third_party/cacheinvalidation/src/proto/channel.proto45
-rw-r--r--chromium/third_party/cacheinvalidation/src/proto/channel_common.proto17
-rw-r--r--chromium/third_party/clang_format/OWNERS2
-rw-r--r--chromium/third_party/clang_format/README.chromium15
-rw-r--r--chromium/third_party/clang_format/README.txt28
-rw-r--r--chromium/third_party/clang_format/bin/linux/clang-format.sha11
-rw-r--r--chromium/third_party/clang_format/bin/mac/clang-format.sha11
-rw-r--r--chromium/third_party/clang_format/bin/win/clang-format.exe.sha11
-rw-r--r--chromium/third_party/clang_format/script/CMakeLists.txt21
-rw-r--r--chromium/third_party/clang_format/script/ClangFormat.cpp319
-rw-r--r--chromium/third_party/clang_format/script/Makefile24
-rw-r--r--chromium/third_party/clang_format/script/clang-format-bbedit.applescript27
-rwxr-xr-xchromium/third_party/clang_format/script/clang-format-diff.py115
-rw-r--r--chromium/third_party/clang_format/script/clang-format-sublime.py58
-rw-r--r--chromium/third_party/clang_format/script/clang-format.el56
-rw-r--r--chromium/third_party/clang_format/script/clang-format.py82
-rwxr-xr-xchromium/third_party/clang_format/script/git-clang-format484
-rw-r--r--chromium/third_party/cld/OWNERS4
-rw-r--r--chromium/third_party/cld/README.chromium3
-rw-r--r--chromium/third_party/cld/base/build_config.h5
-rw-r--r--chromium/third_party/cld_2/cld_2.gyp152
-rw-r--r--chromium/third_party/cros_dbus_cplusplus/cros_dbus_cplusplus.gyp66
-rw-r--r--chromium/third_party/cros_system_api/system_api.gyp21
-rw-r--r--chromium/third_party/cygwin/CYGWIN_LICENSE37
-rw-r--r--chromium/third_party/cygwin/GPLv2.txt339
-rw-r--r--chromium/third_party/cygwin/README.google36
-rwxr-xr-xchromium/third_party/cygwin/bin/awk.exebin19 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/bash.exebin471040 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/bison.exebin225280 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cat.exebin46592 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/chown.exebin71168 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cp.exebin145408 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cpp.exebin96277 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cut.exebin52736 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cygcheck.exebin96768 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cygcrypt-0.dllbin6656 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cygiconv-2.dllbin999424 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cygintl-2.dllbin37888 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cygintl-3.dllbin31744 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cygintl-8.dllbin31744 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cygminires.dllbin20480 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cygncurses-8.dllbin242688 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cygpath.exebin14336 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cygpcre-0.dllbin154624 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cygperl5_10.dllbin1579520 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cygpopt-0.dllbin22528 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cygreadline6.dllbin158208 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/cygwin1.dllbin1872884 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/diff.exebin105472 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/dirname.exebin43008 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/dos2unix.exebin12288 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/env.exebin42496 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/flex.exebin267776 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/gawk.exebin292864 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/gcc.exebin94741 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/gperf.exebin100864 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/grep.exebin157184 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/libhttpd.dllbin280064 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/link.exebin42496 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/ls.exebin122368 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/m4.exebin183808 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/make.exebin151552 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/mkdir.exebin49152 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/mount.exebin10752 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/mv.exebin153088 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/perl.exebin9216 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/pwd.exebin45056 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/realpath.exebin7168 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/rm.exebin126464 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/sed.exebin97280 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/sh.exebin471040 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/sort.exebin84480 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/test.exebin47616 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/touch.exebin65024 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/uname.exebin43520 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/uniq.exebin50688 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/wdiff.exebin18944 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/bin/whoami.exebin41984 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/apache/httpd.exp489
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/libproxy.dllbin81408 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_access.dllbin8704 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_actions.dllbin7680 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_alias.dllbin10240 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_asis.dllbin6656 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_auth.dllbin10752 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_auth_anon.dllbin7680 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_autoindex.dllbin24064 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_cern_meta.dllbin9216 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_cgi.dllbin13312 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_digest.dllbin10240 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_dir.dllbin7680 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_env.dllbin7680 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_example.dllbin12288 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_expires.dllbin9216 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_headers.dllbin7168 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_imap.dllbin14336 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_include.dllbin30208 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_info.dllbin17920 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_log_agent.dllbin7168 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_log_config.dllbin14848 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_log_forensic.dllbin9216 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_log_referer.dllbin7168 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_mime.dllbin12800 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_mime_magic.dllbin19456 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_negotiation.dllbin23040 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_rewrite.dllbin49152 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_setenvif.dllbin9216 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_speling.dllbin10240 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_status.dllbin17408 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_unique_id.dllbin7680 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_userdir.dllbin8192 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_usertrack.dllbin11264 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/apache/mod_vhost_alias.dllbin9216 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/SYSCALLS.c.X1350
-rwxr-xr-xchromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/cc1.exebin3531892 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/cc1plus.exebin4002420 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/collect2.exebin129967 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/README14
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/algorithm71
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/algo.h149
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/algobase.h95
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/alloc.h52
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/backward_warning.h39
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/bvector.h68
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/complex.h43
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/defalloc.h117
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/deque.h70
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/fstream.h52
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/function.h130
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/hash_map.h72
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/hash_set.h69
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/hashtable.h76
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/heap.h71
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/iomanip.h70
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/iostream.h60
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/istream.h43
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/iterator.h191
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/list.h70
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/map.h69
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/multimap.h69
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/multiset.h69
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/new.h42
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/ostream.h38
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/pair.h70
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/queue.h41
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/rope.h60
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/set.h69
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/slist.h56
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/stack.h72
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/stream.h38
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/streambuf.h40
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/strstream179
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/tempbuf.h78
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/tree.h55
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/vector.h70
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/allocator.h130
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/atomicity.h46
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/basic_ios.h467
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/basic_ios.tcc200
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/basic_string.h2355
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/basic_string.tcc964
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/boost_concept_check.h932
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/char_traits.h376
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/cmath.tcc54
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/codecvt.h478
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/concept_check.h85
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/concurrence.h95
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/cpp_type_traits.h345
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/deque.tcc719
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/fstream.tcc877
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/functexcept.h85
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/gslice.h165
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/gslice_array.h220
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/indirect_array.h212
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/ios_base.h969
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/istream.tcc1192
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/list.tcc377
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/locale_classes.h599
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/locale_facets.h4558
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/locale_facets.tcc2797
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/localefwd.h192
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/mask_array.h209
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/ostream.tcc699
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/postypes.h215
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/slice_array.h273
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/sstream.tcc227
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_algo.h5148
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_algobase.h842
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_bvector.h876
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_construct.h157
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_deque.h1501
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_function.h898
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_heap.h467
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_iterator.h772
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_iterator_base_funcs.h179
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_iterator_base_types.h170
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_list.h1255
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_map.h694
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_multimap.h677
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_multiset.h585
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_numeric.h326
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_pair.h147
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_queue.h472
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_raw_storage_iter.h113
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_relops.h137
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_set.h593
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_stack.h272
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_tempbuf.h171
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_threads.h150
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_tree.h1283
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_uninitialized.h297
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_vector.h932
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stream_iterator.h214
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/streambuf.tcc163
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/streambuf_iterator.h258
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stringfwd.h69
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/type_traits.h405
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/valarray_after.h499
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/valarray_array.h625
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/valarray_array.tcc240
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/valarray_before.h701
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/vector.tcc414
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bitset1229
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cassert48
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cctype83
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cerrno55
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cfloat50
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ciso64637
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/climits51
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/clocale62
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cmath595
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/complex1226
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/csetjmp65
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/csignal61
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstdarg60
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstddef56
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstdio185
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstdlib204
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstring128
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ctime81
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cwchar273
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cwctype110
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cxxabi.h528
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/deque81
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/exception120
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/exception_defines.h47
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/algorithm518
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/bitmap_allocator.h859
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/debug_allocator.h121
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/enc_filebuf.h68
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/functional395
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/hash_fun.h122
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/hash_map447
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/hash_set439
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/hashtable.h994
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/iterator113
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/malloc_allocator.h118
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/memory171
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/mt_allocator.h718
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/new_allocator.h113
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/numeric148
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/pod_char_traits.h158
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/pool_allocator.h255
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/rb_tree97
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/rope2494
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/ropeimpl.h1539
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/slist906
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/stdio_filebuf.h162
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ext/stdio_sync_filebuf.h281
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/fstream843
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/functional58
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/atomic_word.h35
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/basic_file.h110
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/c++allocator.h37
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/c++config.h1297
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/c++io.h86
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/c++locale.h86
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/codecvt_specializations.h38
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/ctype_base.h57
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/ctype_inline.h67
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/ctype_noninline.h98
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/gthr-default.h517
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/gthr-posix.h517
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/gthr-single.h239
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/gthr.h103
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/messages_members.h84
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/os_defines.h36
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/time_members.h71
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/iomanip300
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ios53
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/iosfwd168
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/iostream80
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/istream774
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/iterator76
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/limits1143
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/list82
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/locale49
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/map74
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/memory375
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/new101
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/numeric72
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/ostream548
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/queue78
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/set74
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/sstream643
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/stack73
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/stdexcept148
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/streambuf784
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/string60
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/typeinfo156
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/utility70
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/valarray1017
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/vector83
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/emmintrin.h1491
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/float.h162
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/iso646.h48
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/limits.h125
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/mm_malloc.h77
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/mmintrin.h917
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/pmmintrin.h132
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/stdarg.h135
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/stdbool.h53
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h426
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/syslimits.h8
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/unwind.h232
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/varargs.h7
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/include/xmmintrin.h1222
-rwxr-xr-xchromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/fixinc.sh2
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/gsyslimits.h8
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/include/README14
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/include/emmintrin.h1491
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/include/float.h162
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/include/iso646.h48
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/include/limits.h125
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/include/mm_malloc.h77
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/include/mmintrin.h917
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/include/pmmintrin.h132
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/include/stdarg.h135
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/include/stdbool.h53
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/include/stddef.h426
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/include/unwind.h232
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/include/varargs.h7
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/include/xmmintrin.h1222
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/mkheaders105
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/install-tools/mkheaders.conf5
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.abin47730 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/libgcov.abin9896 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/libstdc++.abin1143030 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/libsupc++.abin139768 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/gcc/i686-pc-cygwin/3.4.4/specs127
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/AnyDBM_File.pm93
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/App/Prove.pm621
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/App/Prove/State.pm421
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Archive/Extract.pm1410
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Archive/Tar.pm1866
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Archive/Tar/Constant.pm78
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Archive/Tar/File.pm606
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Attribute/Handlers.pm879
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/AutoLoader.pm426
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/AutoSplit.pm592
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/B/Lint/Debug.pm65
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Benchmark.pm1044
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CGI.pm7850
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CGI/Apache.pm26
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CGI/Carp.pm604
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CGI/Cookie.pm541
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CGI/Fast.pm214
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CGI/Pretty.pm276
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CGI/Push.pm325
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CGI/Switch.pm27
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CGI/Util.pm337
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CORE.pod62
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPAN.pm12583
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPAN/API/HOWTO.pm44
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPAN/Debug.pm79
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPAN/DeferedCode.pm16
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPAN/FirstTime.pm1636
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPAN/HandleConfig.pm719
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPAN/Kwalify.pm130
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPAN/Kwalify/distroprefs.dd137
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPAN/Kwalify/distroprefs.yml84
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPAN/Nox.pm51
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPAN/Queue.pm193
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPAN/Tarzip.pm352
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPAN/Version.pm173
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS.pm271
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Backend.pm1227
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Backend/RV.pm144
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Config.pm735
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Configure.pm596
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Configure/Setup.pm1627
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Dist.pm508
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Dist/Base.pm250
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Dist/Build.pm796
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Dist/Build/Constants.pm40
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Dist/MM.pm956
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Dist/Sample.pm16
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Error.pm201
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/FAQ.pod30
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Hacking.pod142
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Internals.pm507
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Internals/Constants.pm348
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Internals/Constants/Report.pm359
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Internals/Extract.pm243
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Internals/Fetch.pm435
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Internals/Report.pm627
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Internals/Search.pm342
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Internals/Source.pm1512
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Internals/Utils.pm652
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Internals/Utils/Autoflush.pm5
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Module.pm1614
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Module/Author.pm213
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Module/Author/Fake.pm80
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Module/Checksums.pm251
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Module/Fake.pm86
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Module/Signature.pm65
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Selfupdate.pm535
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Shell.pm339
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Shell/Classic.pm1236
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Shell/Default.pm1861
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Shell/Default/Plugins/CustomSource.pm201
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Shell/Default/Plugins/HOWTO.pod136
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Shell/Default/Plugins/Remote.pm186
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/Shell/Default/Plugins/Source.pm107
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/CPANPLUS/inc.pm522
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Carp.pm237
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Carp/Heavy.pm308
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Class/ISA.pm214
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Class/Struct.pm636
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Config/Extensions.pm63
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/DB.pm809
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/DBM_Filter.pm605
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/DBM_Filter/compress.pm53
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/DBM_Filter/encode.pm86
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/DBM_Filter/int32.pm50
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/DBM_Filter/null.pm52
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/DBM_Filter/utf8.pm51
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Devel/SelfStubber.pm152
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Digest.pm315
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Digest/base.pm100
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Digest/file.pm85
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/DirHandle.pm92
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Dumpvalue.pm648
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Encode/Changes.e2x7
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Encode/ConfigLocal_PM.e2x13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Encode/Makefile_PL.e2x180
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Encode/PerlIO.pod167
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Encode/README.e2x31
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Encode/Supported.pod901
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Encode/_PM.e2x23
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Encode/_T.e2x7
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Encode/encode.h113
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/English.pm230
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Env.pm235
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Exporter.pm583
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Exporter/Heavy.pm250
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/CBuilder.pm318
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/CBuilder/Base.pm279
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/CBuilder/Platform/Unix.pm37
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/CBuilder/Platform/VMS.pm294
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/CBuilder/Platform/Windows.pm732
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/CBuilder/Platform/aix.pm31
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/CBuilder/Platform/cygwin.pm30
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/CBuilder/Platform/darwin.pm22
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/CBuilder/Platform/dec_osf.pm18
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/CBuilder/Platform/os2.pm80
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/Command.pm354
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/Command/MM.pm266
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/Constant.pm561
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/Constant/Base.pm1006
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/Constant/ProxySubs.pm549
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/Constant/Utils.pm131
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/Constant/XS.pm259
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/Embed.pm511
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/Install.pm1322
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/Installed.pm415
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/Liblist.pm286
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/Liblist/Kid.pm547
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MANIFEST.SKIP30
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MM.pm89
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MM_AIX.pm79
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MM_Any.pm1782
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MM_BeOS.pm61
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MM_Cygwin.pm105
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MM_DOS.pm65
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MM_Darwin.pm45
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MM_MacOS.pm40
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MM_NW5.pm269
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MM_OS2.pm151
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MM_QNX.pm57
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MM_UWIN.pm64
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MM_Unix.pm3731
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MM_VMS.pm1963
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MM_VOS.pm50
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MM_Win32.pm573
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MM_Win95.pm124
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MY.pm40
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MakeMaker.pm2637
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MakeMaker/Config.pm39
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MakeMaker/FAQ.pod426
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MakeMaker/Tutorial.pod180
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MakeMaker/bytes.pm40
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/MakeMaker/vmsish.pm41
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/Manifest.pm806
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/Miniperl.pm267
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/Mkbootstrap.pm109
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/Mksymlists.pm312
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/Packlist.pm348
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/ParseXS.pm2053
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/testlib.pm41
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/typemap336
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ExtUtils/xsubpp156
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Fatal.pm193
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/Basename.pm402
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/CheckTree.pm238
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/Compare.pm182
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/Copy.pm526
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/DosGlob.pm571
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/Fetch.pm1226
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/Find.pm1338
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/Path.pm898
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/Spec.pm339
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/Spec/Cygwin.pm152
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/Spec/Epoc.pm78
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/Spec/Functions.pm109
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/Spec/Mac.pm780
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/Spec/OS2.pm273
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/Spec/Unix.pm518
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/Spec/VMS.pm536
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/Spec/Win32.pm450
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/Temp.pm2425
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/File/stat.pm139
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/FileCache.pm183
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/FileHandle.pm262
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Filter/Simple.pm783
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/FindBin.pm210
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Getopt/Long.pm2638
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Getopt/Std.pm295
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/I18N/Collate.pm196
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/I18N/LangTags.pm887
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/I18N/LangTags/Detect.pm237
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/I18N/LangTags/List.pm1779
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/IO/Zlib.pm652
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/IPC/Cmd.pm798
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/IPC/Open2.pm118
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/IPC/Open3.pm371
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/IPC/regen.pl97
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Locale/Constants.pm31
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Locale/Constants.pod76
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Locale/Country.pm550
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Locale/Country.pod306
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Locale/Currency.pm356
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Locale/Currency.pod191
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Locale/Language.pm315
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Locale/Language.pod158
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Locale/Maketext.pm456
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Locale/Maketext.pod1326
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Locale/Maketext/Guts.pm328
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Locale/Maketext/GutsLoader.pm49
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Locale/Maketext/Simple.pm338
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Locale/Maketext/TPJ13.pod775
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Locale/Script.pm294
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Locale/Script.pod253
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Log/Message.pm600
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Log/Message/Config.pm197
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Log/Message/Handlers.pm191
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Log/Message/Item.pm192
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Log/Message/Simple.pm293
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Math/BigFloat.pm4402
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Math/BigFloat/Trace.pm58
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Math/BigInt.pm5115
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Math/BigInt/Calc.pm2612
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Math/BigInt/CalcEmu.pm329
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Math/BigInt/Trace.pm47
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Math/BigRat.pm2017
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Math/Complex.pm2073
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Math/Trig.pm768
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Memoize.pm1047
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Memoize/AnyDBM_File.pm31
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Memoize/Expire.pm365
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Memoize/ExpireFile.pm52
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Memoize/ExpireTest.pm49
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Memoize/NDBM_File.pm77
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Memoize/SDBM_File.pm75
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Memoize/Storable.pm72
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build.pm1071
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/API.pod1734
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Authoring.pod319
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Base.pm4286
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Compat.pm460
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Config.pm59
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/ConfigData.pm194
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Cookbook.pm449
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Dumper.pm16
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/ModuleInfo.pm455
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Notes.pm295
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/PPMMaker.pm194
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Platform/Amiga.pm34
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Platform/Default.pm33
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Platform/EBCDIC.pm34
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Platform/MPEiX.pm34
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Platform/MacOS.pm152
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Platform/RiscOS.pm34
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Platform/Unix.pm76
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Platform/VMS.pm375
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Platform/VOS.pm34
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Platform/Windows.pm258
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Platform/aix.pm40
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Platform/cygwin.pm39
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Platform/darwin.pm40
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Platform/os2.pm39
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/PodParser.pm106
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/Version.pm589
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Build/YAML.pm160
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/CoreList.pm8668
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Load.pm182
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Load/Conditional.pm610
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Module/Loaded.pm144
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/NEXT.pm555
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/Cmd.pm783
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/Config.eg49
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/Config.pm312
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/Domain.pm347
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/FTP.pm1829
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/FTP/A.pm111
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/FTP/E.pm8
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/FTP/I.pm80
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/FTP/L.pm8
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/FTP/dataconn.pm124
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/Hostname.pm.eg14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/NNTP.pm1140
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/Netrc.pm325
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/POP3.pm742
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/Ping.pm1777
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/SMTP.pm867
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/Time.pm151
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/hostent.pm151
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/libnetFAQ.pod303
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/netent.pm169
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/protoent.pm96
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Net/servent.pm113
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Object/Accessor.pm819
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Package/Constants.pm108
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Params/Check.pm712
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/PerlIO.pm344
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/PerlIO/via/QuotedPrint.pm94
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Checker.pm1271
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Escapes.pm721
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Find.pm523
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Functions.pm376
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Html.pm2233
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/InputObjects.pm941
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/LaTeX.pm1876
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Man.pm1701
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/ParseLink.pm184
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/ParseUtils.pm854
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Parser.pm1810
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Perldoc.pm1828
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Perldoc/BaseTo.pm28
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Perldoc/GetOptsOO.pm106
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Perldoc/ToChecker.pm72
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Perldoc/ToMan.pm187
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Perldoc/ToNroff.pm100
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Perldoc/ToPod.pm90
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Perldoc/ToRtf.pm85
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Perldoc/ToText.pm91
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Perldoc/ToTk.pm129
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Perldoc/ToXml.pm63
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/PlainText.pm722
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Plainer.pm69
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Select.pm754
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple.pm1520
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple.pod218
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/BlackBox.pm1923
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/Checker.pm171
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/Debug.pm151
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/DumpAsText.pm130
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/DumpAsXML.pm146
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/HTML.pm889
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/HTMLBatch.pm1342
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/HTMLLegacy.pm104
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/LinkSection.pm145
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/Methody.pm127
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/Progress.pm93
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/PullParser.pm795
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/PullParserEndToken.pm93
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/PullParserStartToken.pm130
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/PullParserTextToken.pm101
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/PullParserToken.pm138
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/RTF.pm674
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/Search.pm1016
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/SimpleTree.pm155
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/Subclassing.pod922
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/Text.pm152
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/TextContent.pm87
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/TiedOutFH.pm103
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/Transcode.pm33
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/TranscodeDumb.pm63
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/TranscodeSmart.pm42
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Simple/XMLOutStream.pm157
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Text.pm786
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Text/Color.pm147
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Text/Overstrike.pm208
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Text/Termcap.pm184
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Pod/Usage.pm674
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Search/Dict.pm108
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/SelectSaver.pm54
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/SelfLoader.pm434
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Shell.pm270
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Switch.pm883
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Symbol.pm170
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Base.pm143
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Formatter/Color.pm145
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Formatter/Console.pm479
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Formatter/Console/ParallelSession.pm186
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Formatter/Console/Session.pm330
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Harness.pm715
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser.pm1622
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Aggregator.pm412
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Grammar.pm544
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Iterator.pm115
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Iterator/Array.pm86
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Iterator/Process.pm346
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Iterator/Stream.pm92
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Multiplexer.pm192
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Result.pm262
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Result/Bailout.pm63
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Result/Comment.pm61
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Result/Plan.pm120
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Result/Pragma.pm63
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Result/Test.pm274
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Result/Unknown.pm51
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Result/Version.pm63
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Result/YAML.pm62
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Source.pm172
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Source/Perl.pm275
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/Utils.pm72
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/YAMLish/Reader.pm340
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/TAP/Parser/YAMLish/Writer.pm257
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Term/ANSIColor.pm478
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Term/Cap.pm799
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Term/Complete.pm188
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Term/ReadLine.pm413
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Term/UI.pm620
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Term/UI/History.pm137
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Test.pm955
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Test/Builder.pm1873
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Test/Builder/Module.pm185
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Test/Builder/Tester.pm646
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Test/Builder/Tester/Color.pm50
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Test/Harness.pm600
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Test/More.pm1569
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Test/Simple.pm230
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Test/Tutorial.pod603
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Text/Abbrev.pm84
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Text/Balanced.pm2306
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Text/ParseWords.pm291
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Text/Tabs.pm136
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Text/Wrap.pm250
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Thread.pm273
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Thread/Queue.pm474
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Thread/Semaphore.pm170
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Tie/Array.pm287
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Tie/File.pm2632
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Tie/Handle.pm201
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Tie/Hash.pm257
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Tie/Hash/NamedCapture.pm62
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Tie/Memoize.pm128
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Tie/RefHash.pm274
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Tie/Scalar.pm140
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Tie/StdHandle.pm40
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Tie/SubstrHash.pm215
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Time/Local.pm377
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Time/gmtime.pm91
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Time/localtime.pm86
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Time/tm.pm33
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/UNIVERSAL.pm195
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Unicode/Collate.pm1877
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Unicode/Collate/allkeys.txt18191
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Unicode/Collate/keys.txt864
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Unicode/UCD.pm932
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/User/grent.pm95
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/User/pwent.pm298
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/Win32API/File/cFile.pc165
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/abbrev.pl43
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/assert.pl55
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/attributes.pm495
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/autouse.pm171
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/base.pm265
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/bigfloat.pl254
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/bigint.pl320
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/bigint.pm675
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/bignum.pm681
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/bigrat.pl155
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/bigrat.pm566
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/blib.pm97
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/bytes.pm88
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/bytes_heavy.pl40
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/cacheout.pl55
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/charnames.pm549
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/complete.pl120
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/constant.pm360
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/ctime.pl59
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/diagnostics.pm647
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/dotsh.pl74
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/dumpvar.pl552
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/encoding/warnings.pm239
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/exceptions.pl61
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/fastcwd.pl43
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/feature.pm218
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/fields.pm327
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/filetest.pm117
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/find.pl47
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/finddepth.pl46
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/flush.pl32
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/getcwd.pl71
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/getopt.pl49
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/getopts.pl66
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/hostname.pl31
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/.packlist2387
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/B.pm1189
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/B/Concise.pm1824
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/B/Debug.pm333
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/B/Deparse.pm4842
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/B/Lint.pm792
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/B/Showlex.pm205
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/B/Terse.pm102
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/B/Xref.pm430
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/EXTERN.h61
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/INTERN.h54
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/XSUB.h655
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/av.h126
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/cc_runtime.h83
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/config.h4493
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/cop.h913
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/cv.h276
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/dosish.h209
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/embed.h4738
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/embedvar.h842
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/fakesdio.h133
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/fakethr.h75
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/form.h27
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/gv.h227
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/handy.h865
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/hv.h552
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/intrpvar.h686
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/iperlsys.h1420
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/keywords.h269
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/libperl.abin2070568 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/libperl.dll.abin1289112 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/malloc_ctl.h64
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/mg.h72
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/mydtrace.h42
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/nostdio.h136
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/op.h749
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/opcode.h1911
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/opnames.h433
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/overload.h88
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/pad.h356
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/parser.h118
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/patchlevel.h140
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/perl.h5996
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/perlapi.h829
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/perlio.h394
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/perliol.h297
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/perlsdio.h164
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/perlsfio.h84
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/perlvars.h188
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/perly.h214
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/pp.h511
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/pp_proto.h410
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/proto.h4754
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/reentr.h1540
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/regcharclass.h454
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/regcomp.h828
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/regexp.h679
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/regnodes.h664
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/scope.h271
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/sv.h2109
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/thread.h484
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/uconfig.h4481
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/unixish.h156
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/utf8.h352
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/utfebcdic.h429
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/util.h53
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/uudmap.h18
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/CORE/warnings.h123
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Compress/Raw/Zlib.pm1175
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Compress/Zlib.pm1451
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Config.pm95
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Config.pod8638
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Config_heavy.pl1240
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Cwd.pm763
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/DB_File.pm2299
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Data/Dumper.pm1286
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Devel/DProf.pm238
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Devel/InnerPackage.pm128
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Devel/PPPort.pm7580
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Devel/Peek.pm570
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Digest/MD5.pm376
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Digest/SHA.pm669
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/DynaLoader.pm773
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode.pm948
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/Alias.pm375
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/Byte.pm120
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/CJKConstants.pm66
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/CN.pm78
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/CN/HZ.pm198
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/Config.pm170
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/EBCDIC.pm45
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/Encoder.pm253
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/Encoding.pm360
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/GSM0338.pm292
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/Guess.pm355
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/JP.pm99
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/JP/H2Z.pm176
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/JP/JIS7.pm164
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/KR.pm73
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/KR/2022_KR.pm81
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/MIME/Header.pm242
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/MIME/Header/ISO_2022_JP.pm131
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/MIME/Name.pm94
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/Symbol.pm44
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/TW.pm79
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/Unicode.pm270
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/Unicode/UTF7.pm128
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Errno.pm275
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Fcntl.pm244
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/File/Glob.pm496
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/File/GlobMapper.pm679
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Filter/Util/Call.pm498
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/GDBM_File.pm86
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Hash/Util.pm520
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Hash/Util/FieldHash.pm860
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/I18N/Langinfo.pm215
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO.pm68
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Compress/Adapter/Deflate.pm165
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Compress/Adapter/Identity.pm101
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Compress/Base.pm978
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Compress/Base/Common.pm914
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Compress/Deflate.pm889
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Compress/Gzip.pm1201
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Compress/Gzip/Constants.pm148
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Compress/RawDeflate.pm976
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Compress/Zip.pm1512
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Compress/Zip/Constants.pm102
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Compress/Zlib/Constants.pm77
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Compress/Zlib/Extra.pm198
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Dir.pm247
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/File.pm204
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Handle.pm633
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Pipe.pm257
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Poll.pm209
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Seekable.pm128
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Select.pm381
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Socket.pm529
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Socket/INET.pm464
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Socket/UNIX.pm143
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Uncompress/Adapter/Identity.pm102
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Uncompress/Adapter/Inflate.pm161
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Uncompress/AnyInflate.pm946
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Uncompress/AnyUncompress.pm922
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Uncompress/Base.pm1454
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Uncompress/Gunzip.pm1070
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Uncompress/Inflate.pm941
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Uncompress/RawInflate.pm1052
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IO/Uncompress/Unzip.pm1485
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IPC/Msg.pm245
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IPC/Semaphore.pm319
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IPC/SharedMem.pm276
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/IPC/SysV.pm188
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/List/Util.pm281
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/MIME/Base64.pm177
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/MIME/QuotedPrint.pm116
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Math/BigInt/FastCalc.pm125
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Module/Pluggable.pm355
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Module/Pluggable/Object.pm351
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/NDBM_File.pm116
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/O.pm143
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/ODBM_File.pm113
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Opcode.pm590
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/POSIX.pm1042
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/POSIX.pod2210
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/PerlIO/encoding.pm53
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/PerlIO/scalar.pm41
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/PerlIO/via.pm244
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/SDBM_File.pm116
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Safe.pm630
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Scalar/Util.pm334
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Socket.pm414
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Storable.pm1188
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Sys/Hostname.pm165
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Sys/Syslog.pm1531
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Text/Soundex.pm260
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Time/HiRes.pm588
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Time/Piece.pm800
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Time/Seconds.pm230
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Unicode/Normalize.pm518
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Win32.pm783
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Win32API/File.pm3035
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/Win32CORE.pm38
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/XSLoader.pm350
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/attrs.pm58
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/B/B.dllbin176920 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Compress/Raw/Zlib/Zlib.dllbin180222 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Compress/Raw/Zlib/autosplit.ix3
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Compress/Zlib/autosplit.ix3
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Cwd/Cwd.dllbin24167 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/DB_File/DB_File.dllbin75673 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/DB_File/autosplit.ix3
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Data/Dumper/Dumper.dllbin51769 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Devel/DProf/DProf.dllbin30163 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Devel/PPPort/PPPort.dllbin177991 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Devel/Peek/Peek.dllbin34265 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Digest/MD5/MD5.dllbin26644 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Digest/SHA/SHA.dllbin77883 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/DynaLoader/autosplit.ix8
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/DynaLoader/dl_expandspec.al31
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/DynaLoader/dl_find_symbol_anywhere.al19
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/DynaLoader/dl_findfile.al87
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Encode/Byte/Byte.dllbin165818 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Encode/CN/CN.dllbin864509 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Encode/EBCDIC/EBCDIC.dllbin30716 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Encode/Encode.dllbin52887 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Encode/JP/JP.dllbin975990 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Encode/KR/KR.dllbin950757 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Encode/Symbol/Symbol.dllbin37730 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Encode/TW/TW.dllbin881980 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Encode/Unicode/Unicode.dllbin31974 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Fcntl/Fcntl.dllbin22585 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/File/Glob/Glob.dllbin33565 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Filter/Util/Call/Call.dllbin27610 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/GDBM_File/GDBM_File.dllbin59134 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Hash/Util/FieldHash/FieldHash.dllbin39930 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Hash/Util/Util.dllbin21990 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/I18N/Langinfo/Langinfo.dllbin23913 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/I18N/Langinfo/autosplit.ix3
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/IO/IO.dllbin31224 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/IPC/SysV/SysV.dllbin44091 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/List/Util/Util.dllbin50771 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/MIME/Base64/Base64.dllbin22391 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Math/BigInt/FastCalc/FastCalc.dllbin36372 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/NDBM_File/NDBM_File.dllbin49114 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/ODBM_File/ODBM_File.dllbin50667 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Opcode/Opcode.dllbin39835 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/POSIX.dllbin141462 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/SigAction/flags.al9
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/SigAction/handler.al9
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/SigAction/mask.al9
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/SigAction/new.al11
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/SigAction/safe.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/SigRt/CLEAR.al9
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/SigRt/DELETE.al9
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/SigRt/EXISTS.al9
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/SigRt/FETCH.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/SigRt/SCALAR.al9
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/SigRt/STORE.al9
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/SigRt/_check.al15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/SigRt/_croak.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/SigRt/_exist.al14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/SigRt/_getsig.al17
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/SigRt/_init.al14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/SigRt/new.al17
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/abs.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/alarm.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/assert.al15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/atan2.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/atexit.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/atof.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/atoi.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/atol.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/autosplit.ix173
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/bsearch.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/calloc.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/chdir.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/chmod.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/chown.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/clearerr.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/closedir.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/cos.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/creat.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/div.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/errno.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/execl.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/execle.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/execlp.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/execv.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/execve.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/execvp.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/exit.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/exp.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fabs.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fclose.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fcntl.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fdopen.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/feof.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/ferror.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fflush.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fgetc.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fgetpos.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fgets.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fileno.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fopen.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fork.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fprintf.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fputc.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fputs.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fread.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/free.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/freopen.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fscanf.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fseek.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fsetpos.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fstat.al17
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fsync.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/ftell.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/fwrite.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/getc.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/getchar.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/getegid.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/getenv.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/geteuid.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/getgid.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/getgrgid.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/getgrnam.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/getgroups.al14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/getlogin.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/getpgrp.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/getpid.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/getppid.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/getpwnam.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/getpwuid.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/gets.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/getuid.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/gmtime.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/isatty.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/kill.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/labs.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/ldiv.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/link.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/load_imports.al230
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/localtime.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/log.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/longjmp.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/malloc.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/memchr.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/memcmp.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/memcpy.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/memmove.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/memset.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/mkdir.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/offsetof.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/opendir.al16
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/perror.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/pow.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/printf.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/putc.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/putchar.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/puts.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/qsort.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/raise.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/rand.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/readdir.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/realloc.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/redef.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/remove.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/rename.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/rewind.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/rewinddir.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/rmdir.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/scanf.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/setbuf.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/setjmp.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/setvbuf.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/siglongjmp.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/sigsetjmp.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/sin.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/sleep.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/sprintf.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/sqrt.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/srand.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/sscanf.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/stat.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/strcat.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/strchr.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/strcmp.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/strcpy.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/strcspn.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/strerror.al14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/strlen.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/strncat.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/strncmp.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/strncpy.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/strpbrk.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/strrchr.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/strspn.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/strstr.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/strtok.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/system.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/time.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/tmpfile.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/tolower.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/toupper.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/umask.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/ungetc.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/unimpl.al14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/unlink.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/usage.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/utime.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/vfprintf.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/vprintf.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/vsprintf.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/wait.al13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/POSIX/waitpid.al13
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/PerlIO/encoding/encoding.dllbin43141 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/PerlIO/scalar/scalar.dllbin23718 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/PerlIO/via/via.dllbin35673 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/SDBM_File/SDBM_File.dllbin48543 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Socket/Socket.dllbin32789 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/BIN_VERSION_NV.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/BIN_WRITE_VERSION_NV.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/CAN_FLOCK.al21
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/Storable.dllbin99824 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/_freeze.al23
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/_retrieve.al31
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/_store.al41
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/_store_fd.al27
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/autosplit.ix28
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/fd_retrieve.al25
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/file_magic.al21
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/freeze.al18
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/lock_nstore.al17
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/lock_retrieve.al17
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/lock_store.al17
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/logcarp.al12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/logcroak.al17
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/nfreeze.al17
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/nstore.al17
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/nstore_fd.al18
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/read_magic.al69
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/retrieve.al18
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/show_file_magic.al30
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/store.al20
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/store_fd.al18
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Storable/thaw.al28
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Sys/Hostname/Hostname.dllbin17933 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Sys/Hostname/autosplit.ix3
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Sys/Syslog/Syslog.dllbin32041 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Text/Soundex/Soundex.dllbin18958 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Time/HiRes/HiRes.dllbin42350 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Time/Piece/Piece.dllbin25372 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Unicode/Normalize/Normalize.dllbin278609 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Win32/Win32.dllbin79927 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Win32API/File/File.dllbin149032 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/Win32CORE/extralibs.ld1
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/attrs/attrs.dllbin18093 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/re/re.dllbin351698 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/sdbm/extralibs.ld1
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/threads/shared/shared.dllbin61521 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/auto/threads/threads.dllbin66685 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/encoding.pm669
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/lib.pm236
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/ops.pm47
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/perllocal.pod1034
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/re.pm504
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/threads.pm1039
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/i686-cygwin/threads/shared.pm566
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/if.pm56
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/importenv.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/integer.pm93
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/less.pm155
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/locale.pm40
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/look.pl50
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/mro.pm378
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/newgetopt.pl75
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/open.pm258
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/open2.pl12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/open3.pl12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/overload.pm1461
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/parent.pm136
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/perl5db.pl9458
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/a2p.pod179
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl.pod462
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl5004delta.pod1612
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl5005delta.pod993
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl5100delta.pod1591
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl5101delta.pod91
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl561delta.pod3661
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl56delta.pod3022
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl570delta.pod899
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl571delta.pod1075
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl572delta.pod831
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl573delta.pod246
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl581delta.pod1102
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl582delta.pod162
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl583delta.pod210
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl584delta.pod263
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl585delta.pod257
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl586delta.pod170
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl587delta.pod379
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl588delta.pod1632
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl58delta.pod3746
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl590delta.pod1017
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl591delta.pod323
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl592delta.pod342
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl593delta.pod549
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl594delta.pod382
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perl595delta.pod593
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlaix.pod270
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlamiga.pod278
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlapi.pod7267
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlapio.pod526
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlapollo.pod23
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlartistic.pod217
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlbeos.pod109
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlbook.pod17
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlboot.pod821
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlbot.pod535
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlbs2000.pod241
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlcall.pod1937
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlce.pod306
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlcheat.pod93
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlclib.pod212
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlcn.pod150
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlcommunity.pod158
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlcompile.pod293
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlcygwin.pod785
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perldata.pod869
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perldbmfilter.pod168
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perldebguts.pod877
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perldebtut.pod723
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perldebug.pod1169
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perldelta.pod91
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perldgux.pod117
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perldiag.pod5037
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perldoc.pod235
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perldos.pod331
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perldsc.pod847
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlebcdic.pod1394
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlembed.pod1158
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlepoc.pod159
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlfaq.pod1414
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlfaq1.pod421
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlfaq2.pod550
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlfaq3.pod1054
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlfaq4.pod2315
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlfaq5.pod1327
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlfaq6.pod1004
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlfaq7.pod1033
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlfaq8.pod1331
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlfaq9.pod686
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlfilter.pod588
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlfork.pod323
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlform.pod459
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlfreebsd.pod47
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlfunc.pod7405
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlglossary.pod3405
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlgpl.pod378
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlguts.pod2673
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlhack.pod3558
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlhist.pod628
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlhpux.pod653
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlhurd.pod54
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlintern.pod1125
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlintro.pod679
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perliol.pod1039
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlipc.pod1732
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlirix.pod137
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perljp.pod206
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlko.pod219
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perllexwarn.pod525
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perllinux.pod39
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perllocale.pod1043
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perllol.pod303
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlmachten.pod116
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlmacos.pod64
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlmacosx.pod264
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlmint.pod229
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlmod.pod607
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlmodinstall.pod465
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlmodlib.pod3206
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlmodstyle.pod780
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlmpeix.pod730
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlnetware.pod214
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlnewmod.pod280
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlnumber.pod209
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlobj.pod602
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlop.pod2497
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlopenbsd.pod30
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlopentut.pod954
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlos2.pod2743
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlos390.pod458
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlos400.pod120
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlothrtut.pod1067
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlpacktut.pod1221
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlplan9.pod146
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlpod.pod730
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlpodspec.pod1899
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlport.pod2334
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlpragma.pod147
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlqnx.pod143
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlre.pod2199
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlreapi.pod699
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlrebackslash.pod539
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlrecharclass.pod525
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlref.pod686
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlreftut.pod527
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlreguts.pod887
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlrequick.pod516
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlreref.pod364
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlretut.pod2870
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlriscos.pod67
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlrun.pod1354
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlsec.pod510
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlsolaris.pod690
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlstyle.pod303
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlsub.pod1463
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlsymbian.pod433
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlsyn.pod877
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlthrtut.pod1180
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perltie.pod1191
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perltoc.pod33273
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perltodo.pod1123
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perltooc.pod1342
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perltoot.pod1836
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perltrap.pod1590
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perltru64.pod172
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perltw.pod176
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlunicode.pod1622
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlunifaq.pod305
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perluniintro.pod885
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlunitut.pod209
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlutil.pod309
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perluts.pod107
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlvar.pod1730
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlvmesa.pod131
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlvms.pod1223
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlvos.pod163
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlwin32.pod1000
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlxs.pod2122
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pods/perlxstut.pod1378
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/pwd.pl67
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/shellwords.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/sigtrap.pm289
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/sort.pm196
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/stat.pl29
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/strict.pm147
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/subs.pm40
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/syslog.pl199
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/tainted.pl9
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/termcap.pl178
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/timelocal.pl18
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/ArabicShaping.txt362
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/Blocks.txt202
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/Canonical.pl1178
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/CaseFolding.txt1196
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/CombiningClass.pl235
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/CompositionExclusions.txt197
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/Decomposition.pl5382
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/EastAsianWidth.txt19357
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/Exact.pl75
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/HangulSyllableType.txt855
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/Index.txt5245
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/Jamo.txt92
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/LineBreak.txt20158
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/Name.pl19331
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/NamedSequences.txt126
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/NamedSqProv.txt84
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/NamesList.txt31236
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/NormalizationCorrections.txt48
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/PVA.pl2080
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/PropList.txt1207
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/PropValueAliases.txt596
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/Properties394
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/PropertyAliases.txt165
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/ReadMe.txt15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/SpecialCasing.txt274
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/StandardizedVariants.txt139
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/To/Digit.pl376
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/To/Fold.pl1123
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/To/Lower.pl1035
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/To/Title.pl1095
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/To/Upper.pl1118
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/UnicodeData.txt19336
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/AL.pl31
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/AN.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/B.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/BN.pl22
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/CS.pl22
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/EN.pl19
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/ES.pl18
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/ET.pl28
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/L.pl453
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/LRE.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/LRO.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/NSM.pl165
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/ON.pl162
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/PDF.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/R.pl42
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/RLE.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/RLO.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/S.pl12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/bc/WS.pl17
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/A.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/AL.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/AR.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/ATAR.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/ATB.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/ATBL.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/B.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/BL.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/BR.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/DA.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/DB.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/IS.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/KV.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/L.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/NK.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/NR.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/OV.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/R.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ccc/VR.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/dt/can.pl232
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/dt/com.pl822
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/dt/enc.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/dt/fin.pl122
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/dt/font.pl43
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/dt/fra.pl11
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/dt/init.pl84
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/dt/iso.pl107
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/dt/med.pl63
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/dt/nar.pl15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/dt/nb.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/dt/sml.pl12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/dt/sqr.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/dt/sub.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/dt/sup.pl29
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/dt/vert.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/dt/wide.pl12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ea/A.pl168
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ea/F.pl12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ea/H.pl16
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ea/N.pl567
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ea/Na.pl16
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/ea/W.pl40
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/AHex.pl12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/ASCII.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Alnum.pl479
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Alpha.pl460
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Alphabet.pl455
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Any.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Arab.pl29
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Armn.pl17
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/AsciiHex.pl15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Assigned.pl457
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Bali.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Beng.pl26
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/BidiC.pl11
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/BidiCont.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Blank.pl21
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Bopo.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Brai.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Bugi.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Buhd.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/C.pl460
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Canadian.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Carian.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Cc.pl15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Cf.pl27
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Cham.pl16
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Cher.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Cn.pl458
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Cntrl.pl31
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Co.pl16
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Copt.pl15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Cprt.pl18
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Cs.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Cyrl.pl19
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Dash.pl27
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Dash2.pl30
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/DefaultI.pl52
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Dep.pl15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Deprecat.pl18
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Deva.pl20
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Dia.pl111
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Diacriti.pl114
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Digit.pl45
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Dsrt.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Ethi.pl39
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Ext.pl25
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Extender.pl28
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Geor.pl16
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Glag.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Goth.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Graph.pl461
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Grek.pl45
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Gujr.pl26
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Guru.pl28
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Hang.pl24
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Hani.pl26
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Hano.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Hebr.pl21
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Hex.pl15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/HexDigit.pl18
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Hira.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/HorizSpa.pl21
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Hyphen.pl19
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Hyphen2.pl22
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/IDSB.pl11
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/IDST.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/IdContin.pl490
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/IdStart.pl405
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Ideo.pl19
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Ideograp.pl22
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/IdsBinar.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/IdsTrina.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InAegean.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InAlphab.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InAncie2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InAncie3.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InAncien.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InArabi2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InArabi3.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InArabi4.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InArabic.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InArmeni.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InArrows.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InBaline.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InBasicL.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InBengal.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InBlockE.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InBopom2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InBopomo.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InBoxDra.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InBraill.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InBugine.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InBuhid.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InByzant.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCarian.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCham.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCherok.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCjkCo2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCjkCo3.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCjkCo4.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCjkCom.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCjkRad.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCjkStr.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCjkSym.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCjkUn2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCjkUn3.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCjkUni.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCombi2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCombi3.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCombi4.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCombin.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InContro.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCoptic.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCounti.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCunei2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCuneif.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCurren.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCyprio.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCyril2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCyril3.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCyril4.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InCyrill.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InDesere.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InDevana.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InDingba.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InDomino.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InEnclo2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InEnclos.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InEthio2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InEthio3.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InEthiop.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InGenera.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InGeomet.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InGeorg2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InGeorgi.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InGlagol.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InGothic.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InGreekA.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InGreekE.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InGujara.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InGurmuk.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InHalfwi.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InHangu2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InHangu3.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InHangul.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InHanuno.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InHebrew.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InHighPr.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InHighSu.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InHiraga.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InIdeogr.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InIpaExt.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InKanbun.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InKangxi.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InKannad.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InKatak2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InKataka.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InKayahL.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InKharos.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InKhmer.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InKhmerS.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InLao.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InLatin1.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InLatin2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InLatin3.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InLatin4.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InLatin5.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InLatinE.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InLepcha.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InLetter.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InLimbu.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InLinea2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InLinear.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InLowSur.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InLycian.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InLydian.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InMahjon.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InMalaya.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InMathe2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InMathem.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InMisce2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InMisce3.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InMisce4.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InMisce5.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InMiscel.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InModifi.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InMongol.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InMusica.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InMyanma.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InNewTai.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InNko.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InNumber.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InOgham.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InOlChik.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InOldIta.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InOldPer.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InOptica.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InOriya.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InOsmany.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InPhagsP.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InPhaist.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InPhoeni.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InPhone2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InPhonet.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InPrivat.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InRejang.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InRunic.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InSauras.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InShavia.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InSinhal.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InSmallF.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InSpacin.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InSpecia.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InSundan.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InSupers.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InSuppl2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InSuppl3.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InSuppl4.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InSuppl5.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InSuppl6.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InSupple.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InSyloti.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InSyriac.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InTagalo.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InTagban.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InTags.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InTaiLe.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InTaiXua.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InTamil.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InTelugu.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InThaana.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InThai.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InTibeta.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InTifina.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InUgarit.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InUnifie.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InVai.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InVaria2.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InVariat.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InVertic.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InYiRadi.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InYiSyll.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/InYijing.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/JoinC.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/JoinCont.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Kana.pl19
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/KayahLi.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Khar.pl20
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Khmr.pl16
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Knda.pl25
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/L.pl403
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/LC.pl123
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/LOE.pl11
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Laoo.pl30
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Latn.pl41
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Lepcha.pl15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Limb.pl17
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/LinearB.pl19
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Ll.pl611
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Lm.pl52
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Lo.pl295
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/LogicalO.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Lower.pl610
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Lowercas.pl613
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Lt.pl23
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Lu.pl604
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Lycian.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Lydian.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/M.pl174
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Math.pl117
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Mc.pl98
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Me.pl18
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Mlym.pl24
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Mn.pl173
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Mong.pl18
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Mymr.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/N.pl82
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/NChar.pl27
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Nd.pl46
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/NewTaiLu.pl16
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Nkoo.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Nl.pl24
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/No.pl43
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Nonchara.pl30
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OAlpha.pl131
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/ODI.pl19
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OGrExt.pl25
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OIDC.pl12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OIDS.pl12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OLower.pl22
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OMath.pl108
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OUpper.pl11
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Ogam.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OlChiki.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OldItali.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OldPersi.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Orya.pl26
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Osma.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OtherAlp.pl134
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OtherDef.pl22
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OtherGra.pl28
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OtherIdC.pl15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OtherIdS.pl15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OtherLow.pl25
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OtherMat.pl111
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/OtherUpp.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/P.pl125
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/PatSyn.pl37
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/PatWS.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/PatternS.pl40
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/PatternW.pl17
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Pc.pl19
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Pd.pl27
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Pe.pl83
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Pf.pl23
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/PhagsPa.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Phnx.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Pi.pl24
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Po.pl121
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Print.pl460
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Ps.pl85
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Punct.pl124
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/QMark.pl21
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Qaai.pl30
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Quotatio.pl24
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Radical.pl12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Radical2.pl15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Rejang.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Runr.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/S.pl192
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/SD.pl40
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/STerm.pl46
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Saurasht.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Sc.pl27
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Shaw.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Sinh.pl23
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Sk.pl39
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Sm.pl78
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/So.pl147
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/SoftDott.pl43
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Space.pl23
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/SpacePer.pl24
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Sterm2.pl49
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Sundanes.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/SylotiNa.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Syrc.pl15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Tagb.pl15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/TaiLe.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Taml.pl28
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Telu.pl26
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Term.pl64
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Terminal.pl67
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Tfng.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Tglg.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Thaa.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Thai.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Tibt.pl19
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Title.pl22
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/UIdeo.pl19
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Ugar.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/UnifiedI.pl22
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Upper.pl603
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Uppercas.pl605
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/VS.pl12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Vai.pl13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Variatio.pl15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/VertSpac.pl15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/WSpace.pl20
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/WhiteSpa.pl23
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Word.pl508
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/XDigit.pl15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Xsux.pl15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Yiii.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Z.pl22
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Zl.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Zp.pl14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Zs.pl21
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/Zyyy.pl149
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/_CanonDC.pl16
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/_CaseIgn.pl174
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/gc_sc/_CombAbo.pl80
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/hst/L.pl11
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/hst/LV.pl408
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/hst/LVT.pl408
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/hst/T.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/hst/V.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/jt/C.pl12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/jt/D.pl37
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/jt/R.pl37
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/jt/U.pl16
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/AI.pl100
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/AL.pl497
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/B2.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/BA.pl60
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/BB.pl21
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/BK.pl11
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/CB.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/CL.pl85
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/CM.pl163
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/CR.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/EX.pl31
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/GL.pl19
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/H2.pl408
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/H3.pl408
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/HY.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/ID.pl80
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/IN.pl11
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/IS.pl19
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/JL.pl11
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/JT.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/JV.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/LF.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/NL.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/NS.pl46
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/NU.pl42
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/OP.pl84
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/PO.pl23
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/PR.pl27
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/QU.pl21
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/SA.pl39
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/SG.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/SP.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/SY.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/WJ.pl11
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/XX.pl12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/lb/ZW.pl10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/nt/De.pl42
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/nt/Di.pl25
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/lib/nt/Nu.pl59
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/mktables2239
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/mktables.lst518
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/unicore/version1
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/utf8.pm198
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/utf8_heavy.pl286
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/validate.pl102
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/vars.pm82
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/version.pm25
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/version.pod679
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/vmsish.pm154
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/warnings.pm503
-rw-r--r--chromium/third_party/cygwin/lib/perl5/5.10/warnings/register.pm51
-rw-r--r--chromium/third_party/cygwin/lib/perl5/site_perl/5.10/Getopt/Mixed.pm763
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Archive/Zip.pm2029
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Archive/Zip/Archive.pm786
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Archive/Zip/BufferedFileHandle.pm131
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Archive/Zip/DirectoryMember.pm82
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Archive/Zip/FAQ.pod467
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Archive/Zip/FileMember.pm64
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Archive/Zip/Member.pm951
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Archive/Zip/MemberRead.pm333
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Archive/Zip/MockFileHandle.pm69
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Archive/Zip/NewFileMember.pm79
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Archive/Zip/StringMember.pm64
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Archive/Zip/Tree.pm46
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Archive/Zip/ZipFileMember.pm413
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Bundle/LWP.pm43
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN.pm12583
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/API/HOWTO.pm44
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Admin.pm230
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Debug.pm79
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/DeferedCode.pm16
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/FirstTime.pm1636
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/HandleConfig.pm719
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Kwalify.pm130
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Kwalify/distroprefs.dd137
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Kwalify/distroprefs.yml84
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Nox.pm51
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Queue.pm193
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Reporter.pm1487
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Reporter.pod224
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Reporter/API.pod135
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Reporter/Config.pm764
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Reporter/Config.pod342
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Reporter/FAQ.pod138
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Reporter/History.pm404
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Reporter/History.pod130
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Reporter/PrereqCheck.pm182
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Reporter/PrereqCheck.pod75
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Tarzip.pm352
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/CPAN/Version.pm173
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Config/Tiny.pm267
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Devel/Symdump.pm468
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Devel/Symdump/Export.pm39
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/File/._Temp.pmbin82 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/File/Copy/Recursive.pm641
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/File/HomeDir.pm619
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/File/HomeDir/Darwin.pm185
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/File/HomeDir/Driver.pm19
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/File/HomeDir/MacOS9.pm94
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/File/HomeDir/Unix.pm167
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/File/HomeDir/Windows.pm176
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/File/Listing.pm409
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/File/Temp.pm2425
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/File/pushd.pm229
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/File/pushd.pod145
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/HTML/Form.pm1400
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/HTML/Tagset.pm471
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/HTTP/Cookies.pm775
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/HTTP/Cookies/Microsoft.pm328
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/HTTP/Cookies/Netscape.pm116
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/HTTP/Daemon.pm885
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/HTTP/Date.pm389
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/HTTP/Headers.pm737
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/HTTP/Headers/Auth.pm98
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/HTTP/Headers/ETag.pm94
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/HTTP/Headers/Util.pm184
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/HTTP/Message.pm762
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/HTTP/Negotiate.pm529
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/HTTP/Request.pm210
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/HTTP/Request/Common.pm493
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/HTTP/Response.pm559
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/HTTP/Status.pm247
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/IO/CaptureOutput.pm317
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/IO/CaptureOutput.pod180
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/IO/Compress/Adapter/Bzip2.pm162
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/IO/Compress/Bzip2.pm758
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/IO/String.pm551
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/IO/Uncompress/Adapter/Bunzip2.pm199
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/IO/Uncompress/Bunzip2.pm858
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/IPC/Run3.pm814
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/IPC/Run3/ProfArrayBuffer.pm86
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/IPC/Run3/ProfLogReader.pm157
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/IPC/Run3/ProfLogger.pm139
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/IPC/Run3/ProfPP.pm156
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/IPC/Run3/ProfReporter.pm256
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP.pm655
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Authen/Basic.pm36
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Authen/Digest.pm90
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Authen/Ntlm.pm195
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/ConnCache.pm310
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Debug.pm134
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/DebugFile.pm220
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/MediaTypes.pm299
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/MemberMixin.pm44
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Protocol.pm290
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Protocol/GHTTP.pm73
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Protocol/cpan.pm72
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Protocol/data.pm52
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Protocol/file.pm148
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Protocol/ftp.pm562
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Protocol/gopher.pm214
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Protocol/http.pm471
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Protocol/http10.pm303
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Protocol/https.pm46
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Protocol/https10.pm75
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Protocol/loopback.pm26
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Protocol/mailto.pm183
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Protocol/nntp.pm150
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Protocol/nogo.pm24
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/RobotUA.pm317
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/Simple.pm352
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/UserAgent.pm1424
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/LWP/media.types118
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Module/ScanDeps.pm1324
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Module/ScanDeps/DataFeed.pm143
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Module/Signature.pm884
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Net/HTTP.pm276
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Net/HTTP/Methods.pm558
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Net/HTTP/NB.pm105
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Net/HTTPS.pm56
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Net/Telnet.pm5252
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/PAR/Dist.pm1191
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Coverage.pm486
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Coverage/CountParents.pm77
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Coverage/ExportOnly.pm53
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Coverage/Overloader.pm37
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Escapes.pm721
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple.pm1520
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple.pod218
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/BlackBox.pm1923
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/Checker.pm171
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/Debug.pm151
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/DumpAsText.pm130
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/DumpAsXML.pm146
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/HTML.pm889
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/HTMLBatch.pm1342
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/HTMLLegacy.pm104
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/LinkSection.pm145
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/Methody.pm127
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/Progress.pm93
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/PullParser.pm795
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/PullParserEndToken.pm93
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/PullParserStartToken.pm130
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/PullParserTextToken.pm101
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/PullParserToken.pm138
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/RTF.pm674
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/Search.pm1016
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/SimpleTree.pm155
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/Subclassing.pod922
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/Text.pm152
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/TextContent.pm87
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/TiedOutFH.pm103
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/Transcode.pm33
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/TranscodeDumb.pm63
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/TranscodeSmart.pm42
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Pod/Simple/XMLOutStream.pm157
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Probe/Perl.pm272
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Tee.pm187
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Tee.pod142
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Term/ReadLine/Perl.pm153
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Term/ReadLine/readline.pm4610
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Test/Pod.pm270
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Test/Pod/Coverage.pm305
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Test/Reporter.pm1085
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Test/Reporter/Transport.pm118
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Test/Reporter/Transport/File.pm103
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Test/Reporter/Transport/HTTPGateway.pm128
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Test/Reporter/Transport/Mail/Send.pm121
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Test/Reporter/Transport/Net/SMTP.pm216
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Test/Reporter/Transport/Net/SMTP/TLS.pm86
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/Test/YAML.pm268
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI.pm1021
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/Escape.pm218
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/Heuristic.pm222
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/QueryParam.pm200
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/Split.pm96
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/URL.pm305
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/WithBase.pm171
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/_foreign.pm6
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/_generic.pm249
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/_ldap.pm140
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/_login.pm10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/_query.pm81
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/_segment.pm20
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/_server.pm106
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/_userpass.pm51
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/data.pm140
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/file.pm329
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/file/Base.pm80
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/file/FAT.pm23
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/file/Mac.pm120
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/file/OS2.pm28
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/file/QNX.pm18
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/file/Unix.pm55
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/file/Win32.pm84
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/ftp.pm45
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/gopher.pm94
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/http.pm25
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/https.pm7
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/ldap.pm122
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/ldapi.pm30
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/ldaps.pm7
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/mailto.pm72
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/mms.pm8
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/news.pm68
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/nntp.pm6
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/pop.pm68
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/rlogin.pm7
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/rsync.pm12
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/rtsp.pm8
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/rtspu.pm8
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/sip.pm86
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/sips.pm7
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/snews.pm8
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/ssh.pm9
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/telnet.pm7
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/tn3270.pm7
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/urn.pm97
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/urn/isbn.pm102
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/URI/urn/oid.pm18
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/WWW/RobotRules.pm444
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/WWW/RobotRules/AnyDBM_File.pm170
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/NamespaceSupport.pm583
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX.pm379
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/Base.pm3164
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/DocumentLocator.pm134
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/Exception.pm126
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/Intro.pod407
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/ParserFactory.pm232
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/PurePerl.pm746
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/PurePerl/DTDDecls.pm603
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/PurePerl/DebugHandler.pm95
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/PurePerl/DocType.pm180
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/PurePerl/EncodingDetect.pm105
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/PurePerl/Exception.pm67
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/PurePerl/NoUnicodeExt.pm28
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/PurePerl/Productions.pm151
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/PurePerl/Reader.pm137
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/PurePerl/Reader/NoUnicodeExt.pm25
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/PurePerl/Reader/Stream.pm84
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/PurePerl/Reader/String.pm61
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/PurePerl/Reader/URI.pm57
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/PurePerl/Reader/UnicodeExt.pm23
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/PurePerl/UnicodeExt.pm22
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/PurePerl/XMLDecl.pm129
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/XML/SAX/placeholder.pl1
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/YAML.pm788
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/YAML/Base.pm200
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/YAML/Dumper.pm587
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/YAML/Dumper/Base.pm137
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/YAML/Error.pm220
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/YAML/Loader.pm780
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/YAML/Loader/Base.pm64
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/YAML/Marshall.pm77
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/YAML/Node.pm297
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/YAML/Tag.pm48
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/YAML/Types.pm251
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/auto/Tee/ptee157
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Alias.pm370
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Compress/Bzip2.pm1579
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Compress/Raw/Bzip2.pm329
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Cwd.pm763
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Digest/SHA.pm669
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/File/Spec.pm336
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/File/Spec/Cygwin.pm154
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/File/Spec/Epoc.pm78
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/File/Spec/Functions.pm109
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/File/Spec/Mac.pm780
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/File/Spec/OS2.pm273
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/File/Spec/Unix.pm517
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/File/Spec/VMS.pm536
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/File/Spec/Win32.pm442
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/HTML/Entities.pm491
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/HTML/Filter.pm112
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/HTML/HeadParser.pm259
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/HTML/LinkExtor.pm187
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/HTML/Parser.pm1233
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/HTML/PullParser.pm211
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/HTML/TokeParser.pm371
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Math/BigInt/FastCalc.pm125
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS.pm967
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/FAQ.pod45
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/Header.pm371
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/Nameserver.pm703
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/Packet.pm749
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/Question.pm260
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR.pm1022
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/A.pm95
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/AAAA.pm124
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/AFSDB.pm122
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/CERT.pm178
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/CNAME.pm97
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/DNAME.pm90
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/EID.pm63
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/HINFO.pm125
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/IPSECKEY.pm237
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/ISDN.pm129
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/LOC.pm363
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/MB.pm99
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/MG.pm100
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/MINFO.pm118
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/MR.pm101
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/MX.pm135
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/NAPTR.pm210
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/NIMLOC.pm63
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/NS.pm106
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/NSAP.pm274
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/NULL.pm65
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/OPT.pm286
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/PTR.pm101
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/PX.pm153
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/RP.pm121
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/RT.pm133
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/SOA.pm176
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/SPF.pm48
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/SRV.pm151
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/SSHFP.pm219
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/TKEY.pm208
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/TSIG.pm353
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/TXT.pm179
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/Unknown.pm82
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/RR/X25.pm95
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/Resolver.pm750
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/Resolver/Base.pm1579
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/Resolver/Cygwin.pm180
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/Resolver/Recurse.pm485
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/Resolver/UNIX.pm74
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/Resolver/Win32.pm225
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Net/DNS/Update.pm200
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/PadWalker.pm154
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Proc/Killall.pm111
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Proc/Killfam.pm83
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Proc/ProcessTable.pm232
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Proc/ProcessTable/Process.pm182
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Proc/example.pl16
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Term/ReadKey.pm564
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Term/ReadLine/Gnu.pm1921
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/Term/ReadLine/Gnu/XS.pm590
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML.pm1778
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML.pod433
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/Attr.pod130
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/Boolean.pm85
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/CDATASection.pod54
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/Comment.pod55
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/Common.pm306
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/DOM.pod139
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/Document.pod675
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/DocumentFragment.pod36
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/Dtd.pod98
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/Element.pod380
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/InputCallback.pod288
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/Literal.pm102
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/Namespace.pod139
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/Node.pod661
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/NodeList.pm191
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/Number.pm90
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/PI.pod83
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/Parser.pod683
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/Reader.pm222
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/Reader.pod716
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/RelaxNG.pod77
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/SAX.pm81
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/SAX.pod46
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/SAX/Builder.pm322
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/SAX/Builder.pod47
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/SAX/Generator.pm146
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/SAX/Parser.pm254
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/Schema.pod73
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/Text.pod179
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/XPathContext.pm131
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/LibXML/XPathContext.pod349
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser.pm840
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/Japanese_Encodings.msg117
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/README51
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/big5.encbin40706 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/euc-kr.encbin45802 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/iso-8859-2.encbin1072 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/iso-8859-3.encbin1072 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/iso-8859-4.encbin1072 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/iso-8859-5.encbin1072 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/iso-8859-7.encbin1072 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/iso-8859-8.encbin1072 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/iso-8859-9.encbin1072 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/windows-1250.encbin1072 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/windows-1252.encbin1072 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/x-euc-jp-jisx0221.encbin37890 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/x-euc-jp-unicode.encbin37890 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/x-sjis-cp932.encbin20368 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/x-sjis-jdk117.encbin18202 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/x-sjis-jisx0221.encbin18202 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Encodings/x-sjis-unicode.encbin18202 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Expat.pm1230
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/LWPExternEnt.pl71
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Style/Debug.pm52
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Style/Objects.pm78
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Style/Stream.pm184
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Style/Subs.pm58
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/XML/Parser/Style/Tree.pm90
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Alias/.packlist2
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Alias/Alias.dllbin26896 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Archive/Zip/.packlist14
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/CPAN/.packlist15
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/CPAN/Reporter/.packlist10
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Compress/Bzip2/.packlist3
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Compress/Bzip2/Bzip2.dllbin95624 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Compress/Bzip2/autosplit.ix3
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Compress/Raw/Bzip2/.packlist3
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Compress/Raw/Bzip2/Bzip2.dllbin109141 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Compress/Raw/Bzip2/autosplit.ix3
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Config/Tiny/.packlist1
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Cwd/.packlist11
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Cwd/Cwd.dllbin23962 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Devel/Symdump/.packlist2
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Digest/SHA/.packlist3
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Digest/SHA/SHA.dllbin77883 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/File/Copy/Recursive/.packlist1
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/File/HomeDir/.packlist6
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/File/Temp/.packlist2
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/File/pushd/.packlist2
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/HTML/Parser/.packlist8
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/HTML/Parser/Parser.dllbin69244 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/HTML/Tagset/.packlist1
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/IO/CaptureOutput/.packlist2
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/IO/Compress/Bzip2/.packlist4
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/IO/String/.packlist1
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/IPC/Run3/.packlist6
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/LWP/.packlist54
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Math/BigInt/FastCalc/.packlist2
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Math/BigInt/FastCalc/FastCalc.dllbin36372 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Module/ScanDeps/.packlist3
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Module/Signature/.packlist2
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Net/DNS/.packlist50
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Net/DNS/DNS.dllbin19383 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Net/Telnet/.packlist1
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/PAR/Dist/.packlist1
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/PadWalker/.packlist2
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/PadWalker/PadWalker.dllbin34568 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Pod/Coverage/.packlist5
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Pod/Escapes/.packlist1
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Pod/Simple/.packlist31
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Probe/Perl/.packlist1
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Proc/ProcessTable/.packlist7
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Proc/ProcessTable/Process/autosplit.ix3
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Proc/ProcessTable/ProcessTable.dllbin38168 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Tee/.packlist4
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Term/ReadKey/.packlist3
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Term/ReadKey/ReadKey.dllbin45028 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Term/ReadKey/autosplit.ix3
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Term/ReadLine/.packlist2
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Term/ReadLine/Gnu/.packlist4
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Term/ReadLine/Gnu/Gnu.dllbin247061 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Term/ReadLine/Gnu/XS/autosplit.ix3
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Test/Pod/.packlist1
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Test/Pod/Coverage/.packlist1
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Test/Reporter/.packlist8
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/URI/.packlist49
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/XML/LibXML/.packlist33
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/XML/LibXML/Common/.packlist2
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/XML/LibXML/Common/Common.dllbin25870 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/XML/LibXML/LibXML.dllbin548353 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/XML/NamespaceSupport/.packlist1
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/XML/Parser/.packlist28
-rwxr-xr-xchromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/XML/Parser/Expat/Expat.dllbin125467 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/XML/SAX/.packlist23
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/YAML/.packlist13
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/lwpcook.pod309
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/lwptut.pod837
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/perlpod.pod685
-rw-r--r--chromium/third_party/cygwin/lib/perl5/vendor_perl/5.10/perlpodspec.pod1876
-rwxr-xr-xchromium/third_party/cygwin/setup_env.bat7
-rwxr-xr-xchromium/third_party/cygwin/setup_mount.bat25
-rw-r--r--chromium/third_party/cygwin/usr/lib/apache/httpd.exp489
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/libproxy.dllbin81408 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_access.dllbin8704 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_actions.dllbin7680 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_alias.dllbin10240 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_asis.dllbin6656 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_auth.dllbin10752 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_auth_anon.dllbin7680 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_autoindex.dllbin24064 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_cern_meta.dllbin9216 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_cgi.dllbin13312 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_digest.dllbin10240 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_dir.dllbin7680 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_env.dllbin7680 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_example.dllbin12288 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_expires.dllbin9216 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_headers.dllbin7168 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_imap.dllbin14336 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_include.dllbin30208 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_info.dllbin17920 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_log_agent.dllbin7168 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_log_config.dllbin14848 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_log_forensic.dllbin9216 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_log_referer.dllbin7168 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_mime.dllbin12800 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_mime_magic.dllbin19456 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_negotiation.dllbin23040 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_rewrite.dllbin49152 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_setenvif.dllbin9216 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_speling.dllbin10240 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_status.dllbin17408 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_unique_id.dllbin7680 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_userdir.dllbin8192 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_usertrack.dllbin11264 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/lib/apache/mod_vhost_alias.dllbin9216 -> 0 bytes
-rwxr-xr-xchromium/third_party/cygwin/usr/sbin/httpd.exebin5120 -> 0 bytes
-rw-r--r--chromium/third_party/cygwin/usr/share/bison/README45
-rw-r--r--chromium/third_party/cygwin/usr/share/bison/c++.m4122
-rw-r--r--chromium/third_party/cygwin/usr/share/bison/c.m4534
-rw-r--r--chromium/third_party/cygwin/usr/share/bison/glr.c2616
-rw-r--r--chromium/third_party/cygwin/usr/share/bison/glr.cc389
-rw-r--r--chromium/third_party/cygwin/usr/share/bison/lalr1.cc1157
-rw-r--r--chromium/third_party/cygwin/usr/share/bison/location.cc253
-rw-r--r--chromium/third_party/cygwin/usr/share/bison/m4sugar/m4sugar.m41776
-rw-r--r--chromium/third_party/cygwin/usr/share/bison/yacc.c1529
-rw-r--r--chromium/third_party/d3/OWNERS1
-rw-r--r--chromium/third_party/d3/README.chromium31
-rw-r--r--chromium/third_party/d3/patches/001_no_html.patch24
-rw-r--r--chromium/third_party/d3/src/LICENSE26
-rw-r--r--chromium/third_party/d3/src/README.md9
-rw-r--r--chromium/third_party/d3/src/d3.js9297
-rwxr-xr-xchromium/third_party/devscripts/licensecheck.pl25
-rw-r--r--chromium/third_party/dom_distiller_js/LICENSE94
-rw-r--r--chromium/third_party/dom_distiller_js/OWNERS3
-rw-r--r--chromium/third_party/dom_distiller_js/README.chromium14
-rw-r--r--chromium/third_party/dom_distiller_js/dom_distiller_js.gyp21
-rw-r--r--chromium/third_party/dom_distiller_js/package/js/domdistiller.js512
-rw-r--r--chromium/third_party/dom_distiller_js/package/proto/dom_distiller.proto39
-rw-r--r--chromium/third_party/dom_distiller_js/package/proto_gen/third_party/dom_distiller_js/dom_distiller_json_converter.h204
-rwxr-xr-xchromium/third_party/dom_distiller_js/update_domdistiller_js.sh71
-rw-r--r--chromium/third_party/drmemory/LICENSE476
-rw-r--r--chromium/third_party/drmemory/OWNERS2
-rw-r--r--chromium/third_party/drmemory/README.chromium44
-rw-r--r--chromium/third_party/drmemory/drmemory-windows-sfx.exe.sha11
-rw-r--r--chromium/third_party/elfutils/elfutils.gyp165
-rw-r--r--chromium/third_party/expat/BUILD.gn46
-rw-r--r--chromium/third_party/expat/README.chromium3
-rw-r--r--chromium/third_party/expat/expat_nacl.gyp47
-rw-r--r--chromium/third_party/expat/files/Changes80
-rw-r--r--chromium/third_party/expat/files/MANIFEST23
-rw-r--r--chromium/third_party/expat/files/README14
-rw-r--r--chromium/third_party/expat/files/lib/expat.h39
-rw-r--r--chromium/third_party/expat/files/lib/expat_config.h32
-rw-r--r--chromium/third_party/expat/files/lib/xmlparse.c366
-rw-r--r--chromium/third_party/expat/files/lib/xmlrole.c2
-rw-r--r--chromium/third_party/expat/files/lib/xmltok.c6
-rw-r--r--chromium/third_party/expat/files/lib/xmltok_impl.c7
-rw-r--r--chromium/third_party/expat/files/lib/xmltok_impl.c.original4
-rw-r--r--chromium/third_party/ffmpeg/BUILD.gn395
-rw-r--r--chromium/third_party/ffmpeg/Changelog55
-rw-r--r--chromium/third_party/ffmpeg/LICENSE2
-rw-r--r--chromium/third_party/ffmpeg/MAINTAINERS30
-rw-r--r--chromium/third_party/ffmpeg/Makefile28
-rw-r--r--chromium/third_party/ffmpeg/PRESUBMIT.py33
-rw-r--r--chromium/third_party/ffmpeg/README.chromium29
-rw-r--r--chromium/third_party/ffmpeg/RELEASE2
-rw-r--r--chromium/third_party/ffmpeg/arch.mak3
-rwxr-xr-xchromium/third_party/ffmpeg/chromium/binaries/c99conv.exebin1652224 -> 0 bytes
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/config.h1743
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/linux-noasm/x64/libavutil/avconfig.h7
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/config.h342
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/linux/arm-neon/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/linux/arm/config.h342
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/linux/arm/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.asm336
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/config.h340
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/linux/ia32/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/linux/mipsel/config.h372
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/linux/mipsel/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.asm338
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/linux/x64/config.h342
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/linux/x64/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/mac/ia32/config.asm334
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/mac/ia32/config.h340
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/mac/ia32/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.asm334
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.h340
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/mac/x64/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/win-vs2013/ia32/config.asm1645
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/win-vs2013/ia32/config.h1661
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/win-vs2013/ia32/libavutil/avconfig.h8
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/win-vs2013/x64/config.asm1645
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/win-vs2013/x64/config.h1661
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/win-vs2013/x64/libavutil/avconfig.h8
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.asm366
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.h372
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/win/ia32/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.asm368
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/win/x64/config.h374
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chrome/win/x64/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config.h340
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config.h340
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.asm334
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.h338
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/mipsel/config.h370
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/mipsel/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm336
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h340
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/config.h1743
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/linux-noasm/x64/libavutil/avconfig.h7
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/config.h336
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/linux/arm-neon/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/linux/arm/config.h336
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/linux/arm/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.asm330
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/config.h334
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/linux/ia32/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/linux/mipsel/config.h366
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/linux/mipsel/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.asm332
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/linux/x64/config.h336
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/linux/x64/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/mac/ia32/config.asm328
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/mac/ia32/config.h334
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/mac/ia32/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.asm328
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.h334
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/mac/x64/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/win-vs2013/ia32/config.asm1645
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/win-vs2013/ia32/config.h1661
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/win-vs2013/ia32/libavutil/avconfig.h8
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/win-vs2013/x64/config.asm1645
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/win-vs2013/x64/config.h1661
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/win-vs2013/x64/libavutil/avconfig.h8
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.asm362
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.h368
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/win/ia32/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.asm362
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/win/x64/config.h368
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/Chromium/win/x64/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromiumOS/linux/arm-neon/config.h336
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromiumOS/linux/arm-neon/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromiumOS/linux/arm/config.h336
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromiumOS/linux/arm/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromiumOS/linux/ia32/config.asm330
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromiumOS/linux/ia32/config.h334
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromiumOS/linux/ia32/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromiumOS/linux/mipsel/config.h366
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromiumOS/linux/mipsel/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromiumOS/linux/x64/config.asm332
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromiumOS/linux/x64/config.h336
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromiumOS/linux/x64/libavutil/avconfig.h1
-rw-r--r--chromium/third_party/ffmpeg/chromium/ffmpegsumo.sigs29
-rw-r--r--chromium/third_party/ffmpeg/chromium/patches/README32
-rw-r--r--chromium/third_party/ffmpeg/chromium/patches/to_upstream/unblock_windows_build.patch12
-rw-r--r--chromium/third_party/ffmpeg/chromium/patches/to_upstream/uninitcond_dct_token_vp3_dequant.patch13
-rw-r--r--chromium/third_party/ffmpeg/chromium/patches/ugly/compile_with_no_iconv.patch15
-rw-r--r--chromium/third_party/ffmpeg/chromium/patches/ugly/disable_pix_fmt_desc_api.patch34
-rw-r--r--chromium/third_party/ffmpeg/chromium/patches/ugly/undeprecate_destruct_packet_api.patch72
-rw-r--r--chromium/third_party/ffmpeg/chromium/patches/ugly/w32pthreads_xp_fixes_and_vp8_workaround.patch (renamed from chromium/third_party/ffmpeg/chromium/patches/to_upstream/w32pthreads_xp_fixes_and_vp8_workaround.patch)0
-rwxr-xr-xchromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py462
-rwxr-xr-xchromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.sh457
-rwxr-xr-xchromium/third_party/ffmpeg/chromium/scripts/c99conv.py92
-rwxr-xr-xchromium/third_party/ffmpeg/chromium/scripts/copy_config.sh2
-rwxr-xr-xchromium/third_party/ffmpeg/chromium/scripts/cygwin-wrapper84
-rwxr-xr-xchromium/third_party/ffmpeg/chromium/scripts/generate_gyp.py210
-rwxr-xr-x[-rw-r--r--]chromium/third_party/ffmpeg/chromium/scripts/generate_libs.py0
-rwxr-xr-xchromium/third_party/ffmpeg/chromium/scripts/make_src_tree.sh47
-rwxr-xr-xchromium/third_party/ffmpeg/chromium/scripts/sync_svn.py105
-rw-r--r--chromium/third_party/ffmpeg/cmdutils.c25
-rw-r--r--chromium/third_party/ffmpeg/cmdutils.h4
-rw-r--r--chromium/third_party/ffmpeg/cmdutils_common_opts.h1
-rw-r--r--chromium/third_party/ffmpeg/common.mak6
-rw-r--r--chromium/third_party/ffmpeg/compat/avisynth/avisynth_c.h3
-rw-r--r--chromium/third_party/ffmpeg/compat/avisynth/avxsynth_c.h3
-rw-r--r--chromium/third_party/ffmpeg/compat/float/float.h35
-rw-r--r--chromium/third_party/ffmpeg/compat/float/limits.h22
-rw-r--r--chromium/third_party/ffmpeg/compat/va_copy.h3
-rwxr-xr-xchromium/third_party/ffmpeg/configure1197
-rw-r--r--chromium/third_party/ffmpeg/doc/APIchanges238
-rw-r--r--chromium/third_party/ffmpeg/doc/Doxyfile6
-rw-r--r--chromium/third_party/ffmpeg/doc/Makefile14
-rw-r--r--chromium/third_party/ffmpeg/doc/RELEASE_NOTES2
-rw-r--r--chromium/third_party/ffmpeg/doc/bitstream_filters.texi2
-rw-r--r--chromium/third_party/ffmpeg/doc/codecs.texi14
-rw-r--r--chromium/third_party/ffmpeg/doc/decoders.texi33
-rw-r--r--chromium/third_party/ffmpeg/doc/demuxers.texi30
-rw-r--r--chromium/third_party/ffmpeg/doc/developer.texi4
-rw-r--r--chromium/third_party/ffmpeg/doc/devices.texi4
-rwxr-xr-xchromium/third_party/ffmpeg/doc/doxy-wrapper.sh1
-rw-r--r--chromium/third_party/ffmpeg/doc/doxy/doxy_stylesheet.css2019
-rw-r--r--chromium/third_party/ffmpeg/doc/doxy/footer.html9
-rw-r--r--chromium/third_party/ffmpeg/doc/doxy/header.html16
-rw-r--r--chromium/third_party/ffmpeg/doc/encoders.texi209
-rw-r--r--chromium/third_party/ffmpeg/doc/examples/Makefile7
-rw-r--r--chromium/third_party/ffmpeg/doc/examples/avio_reading.c134
-rw-r--r--chromium/third_party/ffmpeg/doc/examples/decoding_encoding.c58
-rw-r--r--chromium/third_party/ffmpeg/doc/examples/demuxing_decoding.c10
-rw-r--r--chromium/third_party/ffmpeg/doc/examples/filter_audio.c364
-rw-r--r--chromium/third_party/ffmpeg/doc/examples/filtering_audio.c4
-rw-r--r--chromium/third_party/ffmpeg/doc/examples/filtering_video.c4
-rw-r--r--chromium/third_party/ffmpeg/doc/examples/metadata.c2
-rw-r--r--chromium/third_party/ffmpeg/doc/examples/muxing.c230
-rw-r--r--chromium/third_party/ffmpeg/doc/examples/remuxing.c165
-rw-r--r--chromium/third_party/ffmpeg/doc/examples/resampling_audio.c6
-rw-r--r--chromium/third_party/ffmpeg/doc/examples/scaling_video.c2
-rw-r--r--chromium/third_party/ffmpeg/doc/examples/transcode_aac.c5
-rw-r--r--chromium/third_party/ffmpeg/doc/examples/transcoding.c597
-rw-r--r--chromium/third_party/ffmpeg/doc/faq.texi20
-rw-r--r--chromium/third_party/ffmpeg/doc/ffmpeg-resampler.texi2
-rw-r--r--chromium/third_party/ffmpeg/doc/ffmpeg-scaler.texi2
-rw-r--r--chromium/third_party/ffmpeg/doc/ffmpeg.texi89
-rw-r--r--chromium/third_party/ffmpeg/doc/ffplay.texi9
-rw-r--r--chromium/third_party/ffmpeg/doc/ffprobe.texi1
-rw-r--r--chromium/third_party/ffmpeg/doc/ffprobe.xsd2
-rw-r--r--chromium/third_party/ffmpeg/doc/ffserver.conf10
-rw-r--r--chromium/third_party/ffmpeg/doc/ffserver.texi32
-rw-r--r--chromium/third_party/ffmpeg/doc/fftools-common-opts.texi11
-rw-r--r--chromium/third_party/ffmpeg/doc/filters.texi1577
-rw-r--r--chromium/third_party/ffmpeg/doc/formats.texi36
-rw-r--r--chromium/third_party/ffmpeg/doc/general.texi85
-rw-r--r--chromium/third_party/ffmpeg/doc/git-howto.texi2
-rw-r--r--chromium/third_party/ffmpeg/doc/indevs.texi138
-rw-r--r--chromium/third_party/ffmpeg/doc/muxers.texi224
-rw-r--r--chromium/third_party/ffmpeg/doc/optimization.txt14
-rw-r--r--chromium/third_party/ffmpeg/doc/outdevs.texi146
-rw-r--r--chromium/third_party/ffmpeg/doc/platform.texi7
-rw-r--r--chromium/third_party/ffmpeg/doc/protocols.texi240
-rw-r--r--chromium/third_party/ffmpeg/doc/scaler.texi10
-rw-r--r--[-rwxr-xr-x]chromium/third_party/ffmpeg/doc/texi2pod.pl21
-rw-r--r--chromium/third_party/ffmpeg/doc/utils.texi2
-rw-r--r--chromium/third_party/ffmpeg/ffmpeg.c716
-rw-r--r--chromium/third_party/ffmpeg/ffmpeg.gyp129
-rw-r--r--chromium/third_party/ffmpeg/ffmpeg.h37
-rw-r--r--chromium/third_party/ffmpeg/ffmpeg_dxva2.c620
-rw-r--r--chromium/third_party/ffmpeg/ffmpeg_filter.c15
-rw-r--r--chromium/third_party/ffmpeg/ffmpeg_generated.gni468
-rw-r--r--chromium/third_party/ffmpeg/ffmpeg_generated.gypi1069
-rw-r--r--chromium/third_party/ffmpeg/ffmpeg_opt.c90
-rw-r--r--chromium/third_party/ffmpeg/ffmpeg_options.gni43
-rw-r--r--chromium/third_party/ffmpeg/ffmpeg_vda.c134
-rw-r--r--chromium/third_party/ffmpeg/ffplay.c87
-rw-r--r--chromium/third_party/ffmpeg/ffprobe.c53
-rw-r--r--chromium/third_party/ffmpeg/ffserver.c332
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/4xm.c136
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/8bps.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/Makefile117
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/a64multienc.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aac_adtstoasc_bsf.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aacadtsdec.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aacdec.c78
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aacps.c3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aactab.c5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aactab.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/Makefile28
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/asm-offsets.h30
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/cabac.h104
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/fft_init_aarch64.c47
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/fft_neon.S442
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/h264chroma_init_aarch64.c59
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/h264cmc_neon.S402
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/h264dsp_init_aarch64.c101
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/h264dsp_neon.S498
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/h264idct_neon.S408
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/h264qpel_init_aarch64.c172
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/h264qpel_neon.S934
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/hpeldsp_init_aarch64.c123
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/hpeldsp_neon.S397
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/mdct_neon.S323
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/mpegaudiodsp_init.c39
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/mpegaudiodsp_neon.S226
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/neon.S149
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/neontest.c79
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/opus_imdct_init.c45
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/opus_imdct_neon.S647
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/rv40dsp_init_aarch64.c48
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/vc1dsp_init_aarch64.c47
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/videodsp.S28
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/videodsp_init.c32
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/vorbisdsp_init.c34
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aarch64/vorbisdsp_neon.S82
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ac3.h84
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ac3_parser.c27
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ac3_parser.h5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ac3dec.c311
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ac3dec.h42
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ac3dec_fixed.c176
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ac3dec_float.c89
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ac3dsp.c28
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ac3dsp.h5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ac3enc.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ac3enc.h4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ac3enc_fixed.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ac3enc_float.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ac3enc_template.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ac3tab.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ac3tab.h4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/adpcm.c17
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/adpcm_data.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/adpcm_data.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/adx.c7
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/adxdec.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aic.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/alac.c14
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aliaspixdec.c128
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aliaspixenc.c134
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/allcodecs.c21
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/alsdec.c26
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ansi.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/apedec.c13
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/Makefile56
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/asm-offsets.h19
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/cabac.h108
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/dca.h23
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/dcadsp_init_arm.c26
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/dcadsp_neon.S48
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/dcadsp_vfp.S39
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/dsputil_arm.S7
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/dsputil_arm.h16
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/dsputil_init_arm.c38
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/dsputil_init_armv5te.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/dsputil_init_armv6.c40
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/dsputil_init_neon.c22
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/fft_fixed_init_arm.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/fft_fixed_neon.S2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/flacdsp_init_arm.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/fmtconvert_neon.S2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/h264cmc_neon.S13
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/h264dsp_armv6.S253
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/h264dsp_init_arm.c46
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/h264idct_neon.S16
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/h264pred_init_arm.c8
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/hpeldsp_arm.S26
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/hpeldsp_arm.h6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/hpeldsp_armv6.S14
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/hpeldsp_init_arm.c5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/int_neon.S18
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/mdct_neon.S2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/mlpdsp_armv5te.S655
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/mlpdsp_armv6.S533
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/mlpdsp_init_arm.c146
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/mpegvideo_arm.c14
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/mpegvideo_arm.h6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/mpegvideo_neon.S2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/neontest.c79
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/simple_idct_arm.S1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/startcode_armv6.S253
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/vc1dsp.h26
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/vc1dsp_init_arm.c36
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/vc1dsp_init_neon.c119
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/vc1dsp_neon.S1170
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/videodsp_armv5te.S4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/vp3dsp_init_arm.c3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/vp3dsp_neon.S2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/vp8.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/vp8dsp.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/vp8dsp_armv6.S24
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/vp8dsp_init_arm.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/vp8dsp_init_armv6.c47
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/vp8dsp_init_neon.c45
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/arm/vp8dsp_neon.S117
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/atrac1data.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/atrac3plus.c1818
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/atrac3plus.h240
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/atrac3plus_data.h1914
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/atrac3plusdec.c396
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/atrac3plusdsp.c638
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/avcodec.h295
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/avfft.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/avpacket.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/Makefile20
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/config_bfin.h65
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/dsputil.S382
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/dsputil_bfin.c173
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/dsputil_bfin.h95
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/dsputil_init.c195
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/fdct_bfin.S17
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/hpel_pixels_bfin.S379
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/hpel_pixels_no_rnd.S81
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/hpeldsp_bfin.c123
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/hpeldsp_bfin.h50
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/hpeldsp_init.c146
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/idct_bfin.S13
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/mpegvideo_bfin.c152
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/pixels.S207
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/pixels.h42
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/pixels_bfin.S381
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/vp3_bfin.c65
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/vp3_bfin.h27
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/vp3_idct_bfin.S280
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/vp3dsp.S273
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bfin/vp3dsp_init.c66
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bink.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/binkaudio.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/binkdsp.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bit_depth_template.c5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bitstream.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bmp.c22
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bmp_parser.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/brender_pix.c216
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/brenderpix.c292
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/bytestream.h26
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/cabac.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/cabac.h1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/cabac_functions.h7
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/cavs.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/cavsdec.c8
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/cavsdsp.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/cinepakenc.c1335
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/cllc.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/cngdec.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/cngenc.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/codec_desc.c661
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/cook.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/copy_block.h47
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/cos_tablegen.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/cpia.c8
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dca.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dcadata.h387
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dcadec.c118
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dcadsp.c54
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dcadsp.h11
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dcaenc.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dct-test.c22
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dct.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dfa.c7
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dirac_arith.h3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dirac_dwt.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dirac_dwt.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/diracdec.c157
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dnxhd_parser.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dnxhddata.c21
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dnxhddata.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dnxhddec.c169
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dnxhdenc.c494
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dnxhdenc.h3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dpx.c11
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dsd_tablegen.c38
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dsd_tablegen.h95
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dsddec.c167
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dsputil.c3471
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dsputil.h255
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dsputil_template.c408
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dsputilenc_template.c51
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dv.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dvbsub.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dvbsubdec.c29
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dvdata.c13
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dvdata.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dvdsubdec.c8
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dvdsubenc.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dvenc.c6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dxa.c14
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dxtory.c575
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dxva2.c66
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dxva2.h1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dxva2_h264.c47
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dxva2_internal.h6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dxva2_mpeg2.c20
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dxva2_vc1.c50
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/eac3dec.c20
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/eacmv.c18
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/eamad.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/eatgv.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/elbg.c34
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/error_resilience.c282
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/error_resilience.h22
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/evrcdata.h8
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/evrcdec.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/exif.c17
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/exif.h4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/exr.c888
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/faxcompr.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/fft-fixed-test.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/fft-fixed32-test.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/fft-internal.h10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/fft-test.c28
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/fft.h19
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/fft_fixed.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/fft_fixed_32.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/fft_float.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/fft_table.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/fft_template.c23
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ffv1.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ffv1.h8
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ffv1dec.c14
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ffv1enc.c65
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ffwavesynth.c11
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/fic.c459
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/flac_parser.c17
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/flacdec.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/flacdsp.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/flacdsp.h1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/flacdsp_lpc_template.c18
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/flacenc.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/flashsv.c11
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/flashsv2enc.c13
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/flvdec.c44
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/frame_thread_encoder.c27
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/fraps.c3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/g2meet.c174
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/g723_1.c3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/g729postfilter.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/get_bits.h24
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/gifdec.c6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/golomb.h12
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h261data.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h261dec.c18
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h261enc.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h263.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h263dec.c40
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264.c3749
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264.h143
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264_cabac.c9
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264_cavlc.c12
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264_direct.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264_loopfilter.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264_mb.c820
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264_mb_template.c14
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264_mc_template.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264_mp4toannexb_bsf.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264_mvpred.h1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264_parser.c18
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264_picture.c211
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264_ps.c60
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264_refs.c212
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264_sei.c60
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264_slice.c2565
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264chroma.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264chroma.h1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264chroma_template.c43
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264data.h1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264dsp.c44
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264dsp.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264idct_template.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264pred.c42
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264pred.h4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264pred_template.c75
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264qpel.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264qpel.h1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264qpel_template.c3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/hevc.c877
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/hevc.h118
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/hevc_cabac.c6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/hevc_filter.c368
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/hevc_mvs.c117
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/hevc_ps.c104
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/hevc_refs.c14
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/hevc_sei.c16
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/hevcdsp.c131
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/hevcdsp.h122
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/hevcdsp_template.c1117
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/hevcpred_template.c391
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/hnm4video.c11
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/hpel_template.c148
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/hpeldsp.c307
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/hpeldsp.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/hpeldsp_template.c254
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/huffman.c22
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/huffman.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/huffyuv.c21
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/huffyuv.h27
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/huffyuvdec.c447
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/huffyuvenc.c437
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/iff.c12
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/imgconvert.c193
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/imgconvert.h18
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/indeo3.c3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/indeo4data.h3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/indeo5.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/intelh263dec.c5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/internal.h39
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/interplayvideo.c25
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/intrax8.c22
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ituh263dec.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ituh263enc.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ivi_common.c13
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/j2kenc.c21
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/jpeg2000dec.c29
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/jpeg2000dwt.c6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/jpegls.h3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/jpeglsdec.c60
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/jvdec.c44
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/kbdwin.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/kbdwin.h3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/kgv1dec.c45
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/lagarith.c38
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libfdk-aacdec.c32
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libfdk-aacenc.c50
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libopencore-amr.c5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libopenjpegdec.c181
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libopenjpegenc.c52
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libopusdec.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libspeexdec.c5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libstagefright.cpp2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libtwolame.c167
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libutvideodec.cpp4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libutvideoenc.cpp10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libvorbisenc.c42
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libvpx.c13
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libvpx.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libvpxdec.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libvpxenc.c12
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libwebpenc.c285
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libx264.c106
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libx265.c313
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libxavs.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libxvid.c31
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libzvbi-teletextdec.c158
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ljpegenc.c5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/lossless_videodsp.c128
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/lossless_videodsp.h40
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/lzw.c29
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/lzwenc.c3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mace.c7
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mathops.h13
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mathtables.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mdct_fixed.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mdct_fixed_32.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mdct_float.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mdct_template.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mdec.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/metasound.c3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mjpeg.h3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mjpeg2jpeg_bsf.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mjpegbdec.c19
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mjpegdec.c325
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mjpegdec.h11
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mjpegenc.c79
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mjpegenc.h5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mlp.h10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mlp_parser.c23
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mlp_parser.h5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mlpdec.c152
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mlpdsp.c73
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mlpdsp.h46
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/motion_est.c35
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/motion_est_template.c5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/motionpixels.c6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/motionpixels_tablegen.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/motionpixels_tablegen.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpc8.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpeg12.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpeg12dec.c1020
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpeg12enc.c56
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpeg4video.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpeg4video_parser.c7
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpeg4videodec.c32
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpeg4videoenc.c21
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpegaudio_parser.c6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpegaudiodec_template.c24
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpegaudiodecheader.c13
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpegaudiodecheader.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpegaudiodsp.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpegaudiodsp.h1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpegaudioenc_template.c16
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpegutils.c80
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpegutils.h127
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpegvideo.c1031
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpegvideo.h156
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpegvideo_enc.c382
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpegvideo_motion.c93
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mpegvideo_xvmc.c66
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/msmpeg4.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/msmpeg4dec.c28
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/msrle.c6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mss1.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mss12.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mss12.h14
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mss2.c12
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mss3.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mss4.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/msvideo1.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/msvideo1enc.c20
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mvcdec.c140
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/mxpegdec.c5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/nellymoserenc.c6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/nuv.c14
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/on2avc.c1015
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/on2avcdata.c9383
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/on2avcdata.h82
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/options.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/options_table.h15
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/opus.c428
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/opus.h411
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/opus_celt.c2221
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/opus_imdct.c272
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/opus_imdct.h57
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/opus_parser.c75
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/opus_silk.c1597
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/opusdec.c673
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/paf.c251
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/parser.c205
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/pcm-dvd.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/pgssubdec.c6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/pixels.h37
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/png.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/png_parser.c49
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/pngdec.c189
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/pngdsp.c9
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/pngenc.c167
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/Makefile12
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/dsputil_altivec.c1166
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/dsputil_altivec.h11
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/dsputil_ppc.c165
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/fdct_altivec.c396
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/fft_altivec.c12
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/fmtconvert_altivec.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/gmc_altivec.c138
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/h264chroma_init.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/h264dsp.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/h264qpel.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/hpeldsp_altivec.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/hpeldsp_altivec.h34
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/idct_altivec.c313
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/int_altivec.c113
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/mpegaudiodsp_altivec.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/mpegvideo_altivec.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/vc1dsp_altivec.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/vp3dsp_altivec.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ppc/vp8dsp_altivec.c5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/proresdsp.c34
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/proresdsp.h5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/proresenc_kostya.c50
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/psymodel.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/pthread_frame.c30
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/put_bits.h7
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/qcelpdata.h28
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/qcelpdec.c22
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/qtrleenc.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ra144.c14
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ra144.h6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ra144dec.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ra144enc.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ratecontrol.c34
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ratecontrol.h8
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/raw.c43
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/raw.h3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/rawdec.c129
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/rawenc.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/rnd_avg.h10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/roqvideo.h4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/roqvideodec.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/roqvideoenc.c53
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/rpza.c76
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/rtjpeg.c29
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/rtjpeg.h9
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/rv10.c143
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/rv30.c47
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/rv30data.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/rv30dsp.c13
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/rv34.c23
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/rv34.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/rv34dsp.h1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/rv40.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/rv40dsp.c99
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/s302menc.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sanm.c506
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sanm_data.h248
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sbrdsp.c12
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sgi.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sgidec.c78
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sgienc.c36
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sgirledec.c65
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sh4/Makefile2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sh4/README6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sh4/dsputil_sh4.c107
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sh4/dsputil_sh4.h28
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sh4/idct_sh4.c210
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sh4/sh4.h44
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/shorten.c12
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/simple_idct.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/simple_idct_template.c26
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/smacker.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/smvjpegdec.c7
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/snow.c16
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/snow.h6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/snow_dwt.c20
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/snow_dwt.h4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/snowdec.c33
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/snowenc.c43
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sonic.c167
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sp5xdec.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sparc/Makefile4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sparc/README6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sparc/dsputil_vis.c40
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sparc/dsputil_vis.h28
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sparc/hpeldsp_vis.c3524
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sparc/simple_idct_vis.c531
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/sparc/vis.h264
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/startcode.c57
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/startcode.h35
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/svq1enc.c38
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/svq3.c107
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/svq3.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/synth_filter.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/synth_filter.h1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/takdec.c10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/tiff.c285
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/tiff.h20
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/tiff_common.c32
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/tiff_common.h4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/tiffenc.c25
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/tpel_template.c80
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/tpeldsp.c333
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/tpeldsp.h59
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/truemotion1.c7
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/truemotion2.c8
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/tscc2.c7
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/tta.c42
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ttadsp.c57
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ttadsp.h34
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/ttaenc.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/utils.c422
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/utvideodec.c8
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/utvideoenc.c54
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vaapi_h264.c21
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vaapi_internal.h6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vaapi_mpeg.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vaapi_mpeg2.c5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vaapi_mpeg4.c6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vaapi_vc1.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vble.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vc1.c94
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vc1.h17
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vc1_parser.c284
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vc1dec.c297
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vc1dsp.c831
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vc1dsp.h15
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vda.c72
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vda.h75
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vda_h264.c308
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vda_h264_dec.c12
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vda_internal.h33
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vdpau.c59
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vdpau_h264.c44
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vdpau_internal.h13
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vdpau_mpeg12.c12
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vdpau_mpeg4.c12
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vdpau_vc1.c12
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/version.h28
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/videodsp.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/videodsp.h1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/videodsp_template.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vima.c123
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vmdav.c20
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vmnc.c5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vorbis.c13
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vorbisdec.c56
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vorbisdsp.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vorbisdsp.h1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vorbisenc.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp3.c1538
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp3_parser.c22
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp3data.h5846
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp3dsp.c142
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp5.c26
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp56.c14
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp56.h3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp6.c30
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp8.c1916
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp8.h53
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp8_parser.c15
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp8data.h339
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp8dsp.c809
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp8dsp.h17
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp9.c627
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp9_parser.c8
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp9dsp.c70
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vp9dsp.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/vqavideo.c8
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/wavpack.c15
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/webp.c48
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/wma.c14
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/wmadec.c5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/wmalosslessdec.c38
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/wmaprodec.c12
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/wmv2.c22
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/wmv2dec.c6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/wnv1.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/Makefile46
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/ac3dsp.asm133
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/ac3dsp_init.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/cabac.h14
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/cavsdsp.c66
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/constants.h2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/dca.h60
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/dcadsp.asm431
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/dcadsp_init.c113
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/deinterlace.asm2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/dnxhdenc.asm49
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/dnxhdenc.c67
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/dnxhdenc_init.c39
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/dsputil.asm174
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/dsputil_init.c185
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/dsputil_mmx.c124
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/dsputil_qns_template.c8
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/dsputil_x86.h152
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/dsputilenc.asm16
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/dsputilenc_mmx.c1525
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/fdct.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/flacdsp.asm74
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/flacdsp_init.c45
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/fmtconvert.asm11
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/fpel.asm11
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/fpel.h43
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/fpel_mmx.c3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/h263_loopfilter.asm4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/h264_chromamc.asm5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/h264_chromamc_10bit.asm11
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/h264_deblock.asm42
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/h264_deblock_10bit.asm21
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/h264_i386.h6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/h264_idct.asm85
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/h264_idct_10bit.asm24
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/h264_intrapred.asm96
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/h264_intrapred_10bit.asm90
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/h264_intrapred_init.c31
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/h264_qpel.c9
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/h264_qpel_10bit.asm32
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/h264_weight.asm10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/h264_weight_10bit.asm9
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/h264chroma_init.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/h264dsp_init.c15
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/hevc_mc.asm1256
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/hevcdsp.h123
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/hevcdsp_init.c377
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/hpeldsp.asm24
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/hpeldsp.h38
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/hpeldsp_init.c47
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/hpeldsp_mmx.c3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/hpeldsp_rnd_template.c5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/idct_sse2_xvid.c20
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/imdct36.asm23
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/inline_asm.h100
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/lossless_videodsp.asm292
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/lossless_videodsp_init.c62
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/lpc.c5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/mathops.h5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/mlpdsp.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/motion_est.c318
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/mpeg4qpel.asm4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/mpegaudiodsp.c22
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/mpegvideo.c115
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/mpegvideoenc.c133
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/mpegvideoenc_template.c12
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/proresdsp.asm4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/proresdsp_init.c5
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/qpel.asm11
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/rnd_mmx.c35
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/rnd_template.c4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/rv34dsp_init.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/rv40dsp.asm8
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/rv40dsp_init.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/sbrdsp.asm30
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/sbrdsp_init.c3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/simple_idct.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/snowdsp.c7
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/ttadsp.asm119
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/ttadsp_init.c42
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/vc1dsp_init.c18
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/vc1dsp_mmx.c124
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/videodsp_init.c3
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/vorbisdsp_init.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/vp3dsp_init.c7
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/vp56_arith.h15
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/vp6dsp_init.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/vp8dsp.asm20
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/vp8dsp_init.c82
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/vp8dsp_loopfilter.asm10
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/vp9dsp_init.c232
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/vp9intrapred.asm1405
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/vp9itxfm.asm1388
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/vp9lpf.asm817
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/vp9mc.asm140
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/xbmdec.c87
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/xsubenc.c2
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/xvmc.h4
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/xvmc_internal.h7
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/xwddec.c18
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/zmbv.c6
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/Makefile10
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/alldevices.c5
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/alsa-audio-dec.c1
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/alsa-audio-enc.c27
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/avdevice.c191
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/avdevice.h418
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/avfoundation.m374
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/bktr.c1
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/caca.c1
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/decklink_enc.cpp588
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/decklink_enc.h43
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/decklink_enc_c.c56
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/dshow.c31
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/dshow_capture.h2
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/dshow_enummediatypes.c4
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/dshow_pin.c2
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/dv1394.c1
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/fbdev_common.c62
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/fbdev_common.h4
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/fbdev_dec.c7
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/fbdev_enc.c8
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/gdigrab.c630
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/iec61883.c11
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/jack_audio.c15
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/lavfi.c1
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/libcdio.c1
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/libdc1394.c1
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/openal-dec.c3
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/opengl_enc.c1306
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/opengl_enc_shaders.h188
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/oss_audio.c9
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/pulse_audio_common.c210
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/pulse_audio_common.h10
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/pulse_audio_dec.c37
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/pulse_audio_enc.c742
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/qtkit.m358
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/sdl.c7
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/sndio_dec.c1
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/sndio_enc.c8
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/v4l.c1
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/v4l2-common.c6
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/v4l2.c47
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/v4l2enc.c8
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/version.h6
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/vfwcap.c1
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/x11grab.c1
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/xv.c165
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/Makefile29
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/aeval.c4
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/af_adelay.c1
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/af_aecho.c1
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/af_amerge.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/af_apad.c1
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/af_aresample.c9
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/af_ashowinfo.c114
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/af_atempo.c4
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/af_bs2b.c222
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/af_channelmap.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/af_compand.c232
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/af_pan.c3
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/af_resample.c8
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/af_volume.c224
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/af_volume.h38
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/allfilters.c4
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/audio.c4
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/avcodec.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/avf_avectorscope.c3
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/avf_concat.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/avfilter.c30
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/avfilter.h24
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/avfiltergraph.c5
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/buffer.c4
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/buffersink.c5
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/buffersink.h22
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/buffersrc.c36
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/buffersrc.h22
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/deshake.h9
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/deshake_opencl.c81
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/deshake_opencl.h7
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/deshake_opencl_kernel.h254
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/dualinput.c4
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/f_ebur128.c170
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/f_select.c6
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/f_settb.c187
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/fifo.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/filtfmts.c12
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/graphdump.c3
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/internal.h8
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/lavfutils.c5
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/libmpcodecs/img_format.c11
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/libmpcodecs/img_format.h9
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/libmpcodecs/libvo/video_out.h23
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/libmpcodecs/mp_image.c6
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/libmpcodecs/vf_eq.c4
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/libmpcodecs/vf_eq2.c4
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/libmpcodecs/vf_fspp.c57
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/libmpcodecs/vf_ilpack.c8
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/libmpcodecs/vf_pp7.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/libmpcodecs/vf_uspp.c5
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/pthread.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/setpts.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/settb.c187
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/src_movie.c35
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/unsharp.h2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/version.h35
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_aspect.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_blackframe.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_boxblur.c4
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_colormatrix.c37
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_copy.c4
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_crop.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_cropdetect.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_curves.c72
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_dejudder.c187
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_delogo.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_deshake.c6
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_drawbox.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_drawtext.c226
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_edgedetect.c163
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_elbg.c6
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_fade.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_fieldorder.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_format.c5
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_fps.c15
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_framepack.c363
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_framestep.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_frei0r.c41
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_hflip.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_hqdn3d.c5
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_hqdn3d.h2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_hue.c14
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_interlace.c66
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_libopencv.c8
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_lut.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_lut3d.c135
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_mergeplanes.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_noise.c4
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_overlay.c49
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_pad.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_phase.c51
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_pixdesctest.c4
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_psnr.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_pullup.c42
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_removelogo.c14
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_rotate.c108
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_scale.c34
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_showinfo.c85
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_shuffleplanes.c172
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_subtitles.c78
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_tile.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_tinterlace.c12
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_transpose.c65
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_vflip.c2
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_vidstabdetect.c4
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_vidstabtransform.c62
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_yadif.c143
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vsrc_mandelbrot.c6
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vsrc_testsrc.c4
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/x86/Makefile1
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/x86/vf_yadif.asm18
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/x86/vf_yadif_init.c97
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/x86/yadif-10.asm18
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/x86/yadif-16.asm18
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/yadif.h77
-rw-r--r--chromium/third_party/ffmpeg/libavformat/4xm.c4
-rw-r--r--chromium/third_party/ffmpeg/libavformat/Makefile34
-rw-r--r--chromium/third_party/ffmpeg/libavformat/aacdec.c58
-rw-r--r--chromium/third_party/ffmpeg/libavformat/ac3dec.c17
-rw-r--r--chromium/third_party/ffmpeg/libavformat/adxdec.c7
-rw-r--r--chromium/third_party/ffmpeg/libavformat/aiffdec.c5
-rw-r--r--chromium/third_party/ffmpeg/libavformat/aiffenc.c2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/allformats.c11
-rw-r--r--chromium/third_party/ffmpeg/libavformat/amr.c17
-rw-r--r--chromium/third_party/ffmpeg/libavformat/apc.c6
-rw-r--r--chromium/third_party/ffmpeg/libavformat/ape.c12
-rw-r--r--chromium/third_party/ffmpeg/libavformat/apetag.c13
-rw-r--r--chromium/third_party/ffmpeg/libavformat/asf.h3
-rw-r--r--chromium/third_party/ffmpeg/libavformat/asfdec.c69
-rw-r--r--chromium/third_party/ffmpeg/libavformat/asfenc.c90
-rw-r--r--chromium/third_party/ffmpeg/libavformat/assdec.c20
-rw-r--r--chromium/third_party/ffmpeg/libavformat/astenc.c4
-rw-r--r--chromium/third_party/ffmpeg/libavformat/audiointerleave.c2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/avformat.h511
-rw-r--r--chromium/third_party/ffmpeg/libavformat/avidec.c218
-rw-r--r--chromium/third_party/ffmpeg/libavformat/avienc.c461
-rw-r--r--chromium/third_party/ffmpeg/libavformat/avio.c45
-rw-r--r--chromium/third_party/ffmpeg/libavformat/avio.h22
-rw-r--r--chromium/third_party/ffmpeg/libavformat/avio_internal.h2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/aviobuf.c43
-rw-r--r--chromium/third_party/ffmpeg/libavformat/avisynth.c38
-rw-r--r--chromium/third_party/ffmpeg/libavformat/bink.c34
-rw-r--r--chromium/third_party/ffmpeg/libavformat/cafdec.c8
-rw-r--r--chromium/third_party/ffmpeg/libavformat/cafenc.c6
-rw-r--r--chromium/third_party/ffmpeg/libavformat/cinedec.c301
-rw-r--r--chromium/third_party/ffmpeg/libavformat/concatdec.c269
-rw-r--r--chromium/third_party/ffmpeg/libavformat/crcenc.c4
-rw-r--r--chromium/third_party/ffmpeg/libavformat/dfa.c7
-rw-r--r--chromium/third_party/ffmpeg/libavformat/dsfdec.c159
-rw-r--r--chromium/third_party/ffmpeg/libavformat/dvenc.c4
-rw-r--r--chromium/third_party/ffmpeg/libavformat/dxa.c15
-rw-r--r--chromium/third_party/ffmpeg/libavformat/electronicarts.c12
-rw-r--r--chromium/third_party/ffmpeg/libavformat/ffmdec.c6
-rw-r--r--chromium/third_party/ffmpeg/libavformat/file.c17
-rw-r--r--chromium/third_party/ffmpeg/libavformat/flac_picture.c3
-rw-r--r--chromium/third_party/ffmpeg/libavformat/flacdec.c54
-rw-r--r--chromium/third_party/ffmpeg/libavformat/flacenc.c44
-rw-r--r--chromium/third_party/ffmpeg/libavformat/flvdec.c34
-rw-r--r--chromium/third_party/ffmpeg/libavformat/flvenc.c5
-rw-r--r--chromium/third_party/ffmpeg/libavformat/format.c9
-rw-r--r--chromium/third_party/ffmpeg/libavformat/framecrcenc.c4
-rw-r--r--chromium/third_party/ffmpeg/libavformat/ftp.c10
-rw-r--r--chromium/third_party/ffmpeg/libavformat/gif.c20
-rw-r--r--chromium/third_party/ffmpeg/libavformat/golomb_tab.c1
-rw-r--r--chromium/third_party/ffmpeg/libavformat/gxf.c6
-rw-r--r--chromium/third_party/ffmpeg/libavformat/gxfenc.c2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/h263dec.c23
-rw-r--r--chromium/third_party/ffmpeg/libavformat/hdsenc.c32
-rw-r--r--chromium/third_party/ffmpeg/libavformat/hevc.c1140
-rw-r--r--chromium/third_party/ffmpeg/libavformat/hevc.h98
-rw-r--r--chromium/third_party/ffmpeg/libavformat/hls.c1453
-rw-r--r--chromium/third_party/ffmpeg/libavformat/hlsenc.c36
-rw-r--r--chromium/third_party/ffmpeg/libavformat/hnm.c13
-rw-r--r--chromium/third_party/ffmpeg/libavformat/http.c391
-rw-r--r--chromium/third_party/ffmpeg/libavformat/httpauth.c5
-rw-r--r--chromium/third_party/ffmpeg/libavformat/icodec.c2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/icoenc.c2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/id3v2.c198
-rw-r--r--chromium/third_party/ffmpeg/libavformat/id3v2.h28
-rw-r--r--chromium/third_party/ffmpeg/libavformat/id3v2enc.c24
-rw-r--r--chromium/third_party/ffmpeg/libavformat/idcin.c9
-rw-r--r--chromium/third_party/ffmpeg/libavformat/idroqenc.c30
-rw-r--r--chromium/third_party/ffmpeg/libavformat/iff.c323
-rw-r--r--chromium/third_party/ffmpeg/libavformat/img2.c4
-rw-r--r--chromium/third_party/ffmpeg/libavformat/img2.h61
-rw-r--r--chromium/third_party/ffmpeg/libavformat/img2_alias_pix.c65
-rw-r--r--chromium/third_party/ffmpeg/libavformat/img2_brender_pix.c49
-rw-r--r--chromium/third_party/ffmpeg/libavformat/img2dec.c85
-rw-r--r--chromium/third_party/ffmpeg/libavformat/img2enc.c2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/internal.h41
-rw-r--r--chromium/third_party/ffmpeg/libavformat/ipmovie.c15
-rw-r--r--chromium/third_party/ffmpeg/libavformat/isom.c31
-rw-r--r--chromium/third_party/ffmpeg/libavformat/isom.h3
-rw-r--r--chromium/third_party/ffmpeg/libavformat/iss.c15
-rw-r--r--chromium/third_party/ffmpeg/libavformat/jvdec.c94
-rw-r--r--chromium/third_party/ffmpeg/libavformat/libmodplug.c1
-rw-r--r--chromium/third_party/ffmpeg/libavformat/libnut.c2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/librtmp.c144
-rw-r--r--chromium/third_party/ffmpeg/libavformat/libssh.c237
-rw-r--r--chromium/third_party/ffmpeg/libavformat/loasdec.c27
-rw-r--r--chromium/third_party/ffmpeg/libavformat/lxfdec.c9
-rw-r--r--chromium/third_party/ffmpeg/libavformat/matroska.c3
-rw-r--r--chromium/third_party/ffmpeg/libavformat/matroskadec.c1130
-rw-r--r--chromium/third_party/ffmpeg/libavformat/matroskaenc.c84
-rw-r--r--chromium/third_party/ffmpeg/libavformat/metadata.c2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/microdvddec.c44
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mlvdec.c471
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mms.c2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mmsh.c4
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mmst.c6
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mov.c358
-rw-r--r--chromium/third_party/ffmpeg/libavformat/movenc.c251
-rw-r--r--chromium/third_party/ffmpeg/libavformat/movenc.h3
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mp3dec.c213
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mp3enc.c109
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mpc.c3
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mpc8.c14
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mpeg.c294
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mpeg.h1
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mpegenc.c6
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mpegts.c1123
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mpegts.h10
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mpegtsenc.c191
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mtv.c51
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mux.c220
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mvdec.c143
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mvi.c5
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mxf.c46
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mxf.h29
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mxfdec.c275
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mxfenc.c4
-rw-r--r--chromium/third_party/ffmpeg/libavformat/network.c9
-rw-r--r--chromium/third_party/ffmpeg/libavformat/network.h13
-rw-r--r--chromium/third_party/ffmpeg/libavformat/nistspheredec.c9
-rw-r--r--chromium/third_party/ffmpeg/libavformat/nut.c25
-rw-r--r--chromium/third_party/ffmpeg/libavformat/nut.h4
-rw-r--r--chromium/third_party/ffmpeg/libavformat/nutdec.c140
-rw-r--r--chromium/third_party/ffmpeg/libavformat/nutenc.c162
-rw-r--r--chromium/third_party/ffmpeg/libavformat/nuv.c3
-rw-r--r--chromium/third_party/ffmpeg/libavformat/oggdec.c49
-rw-r--r--chromium/third_party/ffmpeg/libavformat/oggdec.h3
-rw-r--r--chromium/third_party/ffmpeg/libavformat/oggenc.c40
-rw-r--r--chromium/third_party/ffmpeg/libavformat/oggparsecelt.c4
-rw-r--r--chromium/third_party/ffmpeg/libavformat/oggparseogm.c15
-rw-r--r--chromium/third_party/ffmpeg/libavformat/oggparseopus.c19
-rw-r--r--chromium/third_party/ffmpeg/libavformat/oggparseskeleton.c1
-rw-r--r--chromium/third_party/ffmpeg/libavformat/oggparsetheora.c2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/oggparsevorbis.c79
-rw-r--r--chromium/third_party/ffmpeg/libavformat/oggparsevp8.c137
-rw-r--r--chromium/third_party/ffmpeg/libavformat/omadec.c14
-rw-r--r--chromium/third_party/ffmpeg/libavformat/options.c8
-rw-r--r--chromium/third_party/ffmpeg/libavformat/options_table.h12
-rw-r--r--chromium/third_party/ffmpeg/libavformat/paf.c52
-rw-r--r--chromium/third_party/ffmpeg/libavformat/pcm.c2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/pjsdec.c3
-rw-r--r--chromium/third_party/ffmpeg/libavformat/pmpdec.c10
-rw-r--r--chromium/third_party/ffmpeg/libavformat/psxstr.c1
-rw-r--r--chromium/third_party/ffmpeg/libavformat/pva.c17
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rawdec.c2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rawenc.c41
-rw-r--r--chromium/third_party/ffmpeg/libavformat/replaygain.c125
-rw-r--r--chromium/third_party/ffmpeg/libavformat/replaygain.h38
-rw-r--r--chromium/third_party/ffmpeg/libavformat/riff.c23
-rw-r--r--chromium/third_party/ffmpeg/libavformat/riff.h22
-rw-r--r--chromium/third_party/ffmpeg/libavformat/riffdec.c18
-rw-r--r--chromium/third_party/ffmpeg/libavformat/riffenc.c58
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rl2.c6
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rmdec.c54
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rpl.c9
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rsd.c7
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rtmppkt.c65
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rtmppkt.h2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rtmpproto.c36
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rtpdec.h4
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rtpdec_asf.c2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rtpdec_h264.c12
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rtpdec_xiph.c4
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rtpenc.c6
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rtsp.c49
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rtsp.h1
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rtspcodes.h110
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rtspdec.c6
-rw-r--r--chromium/third_party/ffmpeg/libavformat/rtspenc.c3
-rw-r--r--chromium/third_party/ffmpeg/libavformat/sapenc.c3
-rw-r--r--chromium/third_party/ffmpeg/libavformat/sdp.c18
-rw-r--r--chromium/third_party/ffmpeg/libavformat/sdr2.c121
-rw-r--r--chromium/third_party/ffmpeg/libavformat/segafilm.c49
-rw-r--r--chromium/third_party/ffmpeg/libavformat/segment.c37
-rw-r--r--chromium/third_party/ffmpeg/libavformat/sierravmd.c7
-rw-r--r--chromium/third_party/ffmpeg/libavformat/siff.c5
-rw-r--r--chromium/third_party/ffmpeg/libavformat/smacker.c8
-rw-r--r--chromium/third_party/ffmpeg/libavformat/smjpegdec.c8
-rw-r--r--chromium/third_party/ffmpeg/libavformat/smush.c50
-rw-r--r--chromium/third_party/ffmpeg/libavformat/spdifenc.c8
-rw-r--r--chromium/third_party/ffmpeg/libavformat/subfile.c147
-rw-r--r--chromium/third_party/ffmpeg/libavformat/swfdec.c20
-rw-r--r--chromium/third_party/ffmpeg/libavformat/swfenc.c3
-rw-r--r--chromium/third_party/ffmpeg/libavformat/takdec.c1
-rw-r--r--chromium/third_party/ffmpeg/libavformat/tcp.c13
-rw-r--r--chromium/third_party/ffmpeg/libavformat/tee.c13
-rw-r--r--chromium/third_party/ffmpeg/libavformat/tls.c6
-rw-r--r--chromium/third_party/ffmpeg/libavformat/txd.c5
-rw-r--r--chromium/third_party/ffmpeg/libavformat/udp.c66
-rw-r--r--chromium/third_party/ffmpeg/libavformat/uncodedframecrcenc.c172
-rw-r--r--chromium/third_party/ffmpeg/libavformat/utils.c2156
-rw-r--r--chromium/third_party/ffmpeg/libavformat/vc1test.c3
-rw-r--r--chromium/third_party/ffmpeg/libavformat/version.h7
-rw-r--r--chromium/third_party/ffmpeg/libavformat/vqf.c2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/wavdec.c2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/wavenc.c6
-rw-r--r--chromium/third_party/ffmpeg/libavformat/wc3movie.c7
-rw-r--r--chromium/third_party/ffmpeg/libavformat/webvttdec.c2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/westwood_vqa.c6
-rw-r--r--chromium/third_party/ffmpeg/libavformat/wtv.h2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/wtv_common.c2
-rw-r--r--chromium/third_party/ffmpeg/libavformat/wtvdec.c23
-rw-r--r--chromium/third_party/ffmpeg/libavformat/wtvenc.c96
-rw-r--r--chromium/third_party/ffmpeg/libavformat/xmv.c8
-rw-r--r--chromium/third_party/ffmpeg/libavformat/xwma.c25
-rw-r--r--chromium/third_party/ffmpeg/libavformat/yuv4mpeg.c1
-rw-r--r--chromium/third_party/ffmpeg/libavresample/Makefile1
-rw-r--r--chromium/third_party/ffmpeg/libavresample/aarch64/Makefile7
-rw-r--r--chromium/third_party/ffmpeg/libavresample/aarch64/asm-offsets.h28
-rw-r--r--chromium/third_party/ffmpeg/libavresample/aarch64/audio_convert_init.c49
-rw-r--r--chromium/third_party/ffmpeg/libavresample/aarch64/audio_convert_neon.S363
-rw-r--r--chromium/third_party/ffmpeg/libavresample/aarch64/neontest.c31
-rw-r--r--chromium/third_party/ffmpeg/libavresample/aarch64/resample_init.c71
-rw-r--r--chromium/third_party/ffmpeg/libavresample/aarch64/resample_neon.S233
-rw-r--r--chromium/third_party/ffmpeg/libavresample/arm/Makefile3
-rw-r--r--chromium/third_party/ffmpeg/libavresample/arm/audio_convert_neon.S4
-rw-r--r--chromium/third_party/ffmpeg/libavresample/arm/neontest.c31
-rw-r--r--chromium/third_party/ffmpeg/libavresample/audio_convert.c2
-rw-r--r--chromium/third_party/ffmpeg/libavresample/audio_convert.h1
-rw-r--r--chromium/third_party/ffmpeg/libavresample/audio_mix.c11
-rw-r--r--chromium/third_party/ffmpeg/libavresample/audio_mix_matrix.c9
-rw-r--r--chromium/third_party/ffmpeg/libavresample/avresample.h8
-rw-r--r--chromium/third_party/ffmpeg/libavresample/internal.h3
-rw-r--r--chromium/third_party/ffmpeg/libavresample/resample.c140
-rw-r--r--chromium/third_party/ffmpeg/libavresample/resample.h29
-rw-r--r--chromium/third_party/ffmpeg/libavresample/resample_template.c72
-rw-r--r--chromium/third_party/ffmpeg/libavresample/utils.c12
-rw-r--r--chromium/third_party/ffmpeg/libavresample/version.h4
-rw-r--r--chromium/third_party/ffmpeg/libavresample/x86/Makefile2
-rw-r--r--chromium/third_party/ffmpeg/libavresample/x86/audio_mix_init.c2
-rw-r--r--chromium/third_party/ffmpeg/libavresample/x86/w64xmmtest.c31
-rw-r--r--chromium/third_party/ffmpeg/libavutil/Makefile8
-rw-r--r--chromium/third_party/ffmpeg/libavutil/aarch64/Makefile4
-rw-r--r--chromium/third_party/ffmpeg/libavutil/aarch64/asm.S70
-rw-r--r--chromium/third_party/ffmpeg/libavutil/aarch64/bswap.h50
-rw-r--r--chromium/third_party/ffmpeg/libavutil/aarch64/cpu.c28
-rw-r--r--chromium/third_party/ffmpeg/libavutil/aarch64/cpu.h30
-rw-r--r--chromium/third_party/ffmpeg/libavutil/aarch64/float_dsp_init.c69
-rw-r--r--chromium/third_party/ffmpeg/libavutil/aarch64/float_dsp_neon.S202
-rw-r--r--chromium/third_party/ffmpeg/libavutil/aarch64/neontest.h65
-rw-r--r--chromium/third_party/ffmpeg/libavutil/aes.c1
-rw-r--r--chromium/third_party/ffmpeg/libavutil/arm/asm.S17
-rw-r--r--chromium/third_party/ffmpeg/libavutil/arm/float_dsp_init_arm.c2
-rw-r--r--chromium/third_party/ffmpeg/libavutil/arm/intmath.h6
-rw-r--r--chromium/third_party/ffmpeg/libavutil/arm/neontest.h62
-rw-r--r--chromium/third_party/ffmpeg/libavutil/atomic.c8
-rw-r--r--chromium/third_party/ffmpeg/libavutil/atomic.h7
-rw-r--r--chromium/third_party/ffmpeg/libavutil/audio_fifo.c2
-rw-r--r--chromium/third_party/ffmpeg/libavutil/avstring.c12
-rw-r--r--chromium/third_party/ffmpeg/libavutil/avstring.h14
-rw-r--r--chromium/third_party/ffmpeg/libavutil/avutil.h17
-rw-r--r--chromium/third_party/ffmpeg/libavutil/base64.c1
-rw-r--r--chromium/third_party/ffmpeg/libavutil/bfin/asm.h54
-rw-r--r--chromium/third_party/ffmpeg/libavutil/bfin/attributes.h34
-rw-r--r--chromium/third_party/ffmpeg/libavutil/bswap.h4
-rw-r--r--chromium/third_party/ffmpeg/libavutil/channel_layout.h4
-rw-r--r--chromium/third_party/ffmpeg/libavutil/cpu.c34
-rw-r--r--chromium/third_party/ffmpeg/libavutil/cpu.h4
-rw-r--r--chromium/third_party/ffmpeg/libavutil/cpu_internal.h1
-rw-r--r--chromium/third_party/ffmpeg/libavutil/crc.c41
-rw-r--r--chromium/third_party/ffmpeg/libavutil/crc.h1
-rw-r--r--chromium/third_party/ffmpeg/libavutil/dict.c52
-rw-r--r--chromium/third_party/ffmpeg/libavutil/dict.h43
-rw-r--r--chromium/third_party/ffmpeg/libavutil/downmix_info.c38
-rw-r--r--chromium/third_party/ffmpeg/libavutil/downmix_info.h114
-rw-r--r--chromium/third_party/ffmpeg/libavutil/dynarray.h70
-rw-r--r--chromium/third_party/ffmpeg/libavutil/eval.c1
-rw-r--r--chromium/third_party/ffmpeg/libavutil/fifo.c12
-rw-r--r--chromium/third_party/ffmpeg/libavutil/fifo.h10
-rw-r--r--chromium/third_party/ffmpeg/libavutil/file_open.c2
-rw-r--r--chromium/third_party/ffmpeg/libavutil/fixed_dsp.c98
-rw-r--r--chromium/third_party/ffmpeg/libavutil/fixed_dsp.h144
-rw-r--r--chromium/third_party/ffmpeg/libavutil/float_dsp.c304
-rw-r--r--chromium/third_party/ffmpeg/libavutil/float_dsp.h5
-rw-r--r--chromium/third_party/ffmpeg/libavutil/frame.c112
-rw-r--r--chromium/third_party/ffmpeg/libavutil/frame.h76
-rw-r--r--chromium/third_party/ffmpeg/libavutil/hash.c35
-rw-r--r--chromium/third_party/ffmpeg/libavutil/hash.h22
-rw-r--r--chromium/third_party/ffmpeg/libavutil/internal.h36
-rw-r--r--chromium/third_party/ffmpeg/libavutil/intfloat_readwrite.c3
-rw-r--r--chromium/third_party/ffmpeg/libavutil/intfloat_readwrite.h4
-rw-r--r--chromium/third_party/ffmpeg/libavutil/log.c187
-rw-r--r--chromium/third_party/ffmpeg/libavutil/log.h31
-rw-r--r--chromium/third_party/ffmpeg/libavutil/macros.h48
-rw-r--r--chromium/third_party/ffmpeg/libavutil/mathematics.c114
-rw-r--r--chromium/third_party/ffmpeg/libavutil/mathematics.h21
-rw-r--r--chromium/third_party/ffmpeg/libavutil/mem.c88
-rw-r--r--chromium/third_party/ffmpeg/libavutil/mem.h19
-rw-r--r--chromium/third_party/ffmpeg/libavutil/opencl.c52
-rw-r--r--chromium/third_party/ffmpeg/libavutil/opencl.h1
-rw-r--r--chromium/third_party/ffmpeg/libavutil/opt.c174
-rw-r--r--chromium/third_party/ffmpeg/libavutil/opt.h100
-rw-r--r--chromium/third_party/ffmpeg/libavutil/parseutils.c6
-rw-r--r--chromium/third_party/ffmpeg/libavutil/pca.c2
-rw-r--r--chromium/third_party/ffmpeg/libavutil/pixdesc.c282
-rw-r--r--chromium/third_party/ffmpeg/libavutil/pixdesc.h50
-rw-r--r--chromium/third_party/ffmpeg/libavutil/pixfmt.h28
-rw-r--r--chromium/third_party/ffmpeg/libavutil/random_seed.c18
-rw-r--r--chromium/third_party/ffmpeg/libavutil/rational.c30
-rw-r--r--chromium/third_party/ffmpeg/libavutil/rational.h11
-rw-r--r--chromium/third_party/ffmpeg/libavutil/replaygain.h51
-rw-r--r--chromium/third_party/ffmpeg/libavutil/samplefmt.c2
-rw-r--r--chromium/third_party/ffmpeg/libavutil/stereo3d.h2
-rw-r--r--chromium/third_party/ffmpeg/libavutil/timer.h20
-rw-r--r--chromium/third_party/ffmpeg/libavutil/timestamp.h4
-rw-r--r--chromium/third_party/ffmpeg/libavutil/utils.c5
-rw-r--r--chromium/third_party/ffmpeg/libavutil/version.h77
-rw-r--r--chromium/third_party/ffmpeg/libavutil/x86/asm.h42
-rw-r--r--chromium/third_party/ffmpeg/libavutil/x86/cpu.c22
-rw-r--r--chromium/third_party/ffmpeg/libavutil/x86/cpu.h6
-rw-r--r--chromium/third_party/ffmpeg/libavutil/x86/float_dsp.asm93
-rw-r--r--chromium/third_party/ffmpeg/libavutil/x86/float_dsp_init.c8
-rw-r--r--chromium/third_party/ffmpeg/libavutil/x86/timer.h1
-rw-r--r--chromium/third_party/ffmpeg/libavutil/x86/x86inc.asm61
-rw-r--r--chromium/third_party/ffmpeg/libavutil/x86/x86util.asm52
-rw-r--r--chromium/third_party/ffmpeg/libpostproc/postprocess.c4
-rw-r--r--chromium/third_party/ffmpeg/libpostproc/postprocess_template.c37
-rw-r--r--chromium/third_party/ffmpeg/library.mak13
-rw-r--r--chromium/third_party/ffmpeg/libswresample/arm/Makefile3
-rw-r--r--chromium/third_party/ffmpeg/libswresample/arm/audio_convert_neon.S4
-rw-r--r--chromium/third_party/ffmpeg/libswresample/arm/neontest.c29
-rw-r--r--chromium/third_party/ffmpeg/libswresample/dither.c2
-rw-r--r--chromium/third_party/ffmpeg/libswresample/rematrix.c5
-rw-r--r--chromium/third_party/ffmpeg/libswresample/resample.c35
-rw-r--r--chromium/third_party/ffmpeg/libswresample/resample_template.c60
-rw-r--r--chromium/third_party/ffmpeg/libswresample/swresample.c71
-rw-r--r--chromium/third_party/ffmpeg/libswresample/swresample.h19
-rw-r--r--chromium/third_party/ffmpeg/libswresample/version.h4
-rw-r--r--chromium/third_party/ffmpeg/libswresample/x86/Makefile2
-rw-r--r--chromium/third_party/ffmpeg/libswresample/x86/resample_mmx.h183
-rw-r--r--chromium/third_party/ffmpeg/libswresample/x86/swresample_x86.c10
-rw-r--r--chromium/third_party/ffmpeg/libswresample/x86/w64xmmtest.c29
-rw-r--r--chromium/third_party/ffmpeg/libswscale/Makefile1
-rw-r--r--chromium/third_party/ffmpeg/libswscale/arm/Makefile4
-rw-r--r--chromium/third_party/ffmpeg/libswscale/arm/rgb2yuv_neon_16.S80
-rw-r--r--chromium/third_party/ffmpeg/libswscale/arm/rgb2yuv_neon_32.S119
-rw-r--r--chromium/third_party/ffmpeg/libswscale/arm/rgb2yuv_neon_common.S291
-rw-r--r--chromium/third_party/ffmpeg/libswscale/arm/swscale_unscaled.c79
-rw-r--r--chromium/third_party/ffmpeg/libswscale/bayer_template.c236
-rw-r--r--chromium/third_party/ffmpeg/libswscale/bfin/internal_bfin.S18
-rw-r--r--chromium/third_party/ffmpeg/libswscale/bfin/swscale_bfin.c13
-rw-r--r--chromium/third_party/ffmpeg/libswscale/bfin/yuv2rgb_bfin.c13
-rw-r--r--chromium/third_party/ffmpeg/libswscale/input.c42
-rw-r--r--chromium/third_party/ffmpeg/libswscale/options.c10
-rw-r--r--chromium/third_party/ffmpeg/libswscale/output.c164
-rw-r--r--chromium/third_party/ffmpeg/libswscale/rgb2rgb.c4
-rw-r--r--chromium/third_party/ffmpeg/libswscale/rgb2rgb_template.c2
-rw-r--r--chromium/third_party/ffmpeg/libswscale/sparc/Makefile1
-rw-r--r--chromium/third_party/ffmpeg/libswscale/sparc/yuv2rgb_vis.c212
-rw-r--r--chromium/third_party/ffmpeg/libswscale/swscale.c58
-rw-r--r--chromium/third_party/ffmpeg/libswscale/swscale.h10
-rw-r--r--chromium/third_party/ffmpeg/libswscale/swscale_internal.h61
-rw-r--r--chromium/third_party/ffmpeg/libswscale/swscale_unscaled.c375
-rw-r--r--chromium/third_party/ffmpeg/libswscale/utils.c118
-rw-r--r--chromium/third_party/ffmpeg/libswscale/version.h6
-rw-r--r--chromium/third_party/ffmpeg/libswscale/x86/rgb2rgb.c5
-rw-r--r--chromium/third_party/ffmpeg/libswscale/x86/rgb2rgb_template.c34
-rw-r--r--chromium/third_party/ffmpeg/libswscale/x86/swscale.c11
-rw-r--r--chromium/third_party/ffmpeg/libswscale/x86/swscale_template.c101
-rw-r--r--chromium/third_party/ffmpeg/libswscale/x86/yuv2rgb.c17
-rw-r--r--chromium/third_party/ffmpeg/libswscale/x86/yuv2rgb_template.c16
-rw-r--r--chromium/third_party/ffmpeg/libswscale/yuv2rgb.c2
-rw-r--r--chromium/third_party/ffmpeg/tools/aviocat.c18
-rw-r--r--chromium/third_party/ffmpeg/tools/build_libstagefright4
-rwxr-xr-xchromium/third_party/ffmpeg/tools/dvd2concat127
-rw-r--r--chromium/third_party/ffmpeg/tools/ffhash.c34
-rwxr-xr-xchromium/third_party/ffmpeg/tools/gen-rc121
-rw-r--r--chromium/third_party/ffmpeg/tools/ismindex.c2
-rwxr-xr-xchromium/third_party/ffmpeg/tools/missing_codec_desc1
-rw-r--r--chromium/third_party/ffmpeg/tools/probetest.c5
-rw-r--r--chromium/third_party/ffmpeg/tools/qt-faststart.c47
-rw-r--r--chromium/third_party/ffmpeg/tools/uncoded_frame.c279
-rw-r--r--chromium/third_party/ffmpeg/tools/zmqsend.c20
-rw-r--r--chromium/third_party/fips181/COPYING27
-rw-r--r--chromium/third_party/fips181/OWNERS2
-rw-r--r--chromium/third_party/fips181/README.chromium16
-rw-r--r--chromium/third_party/fips181/convert.cc404
-rw-r--r--chromium/third_party/fips181/convert.h43
-rw-r--r--chromium/third_party/fips181/fips181.cc2268
-rw-r--r--chromium/third_party/fips181/fips181.gyp33
-rw-r--r--chromium/third_party/fips181/fips181.h84
-rw-r--r--chromium/third_party/fips181/owntypes.h44
-rw-r--r--chromium/third_party/fips181/randpass.cc160
-rw-r--r--chromium/third_party/fips181/randpass.h52
-rw-r--r--chromium/third_party/fips181/smbl.h54
-rw-r--r--chromium/third_party/fontconfig/BUILD.gn71
-rw-r--r--chromium/third_party/fontconfig/LICENSE28
-rw-r--r--chromium/third_party/fontconfig/OWNERS3
-rw-r--r--chromium/third_party/fontconfig/README.chromium20
-rw-r--r--chromium/third_party/fontconfig/fontconfig.gyp70
-rw-r--r--chromium/third_party/fontconfig/include/config.h360
-rw-r--r--chromium/third_party/fontconfig/include/fc-case/fcalias.h (renamed from chromium/third_party/JSON/JSON-2.59/blib/man1/.exists)0
-rw-r--r--chromium/third_party/fontconfig/include/fc-case/fcaliastail.h (renamed from chromium/third_party/JSON/JSON-2.59/blib/man3/.exists)0
-rw-r--r--chromium/third_party/fontconfig/include/fc-case/fccase.h330
-rw-r--r--chromium/third_party/fontconfig/include/fc-glyphname/fcalias.h (renamed from chromium/third_party/JSON/JSON-2.59/blib/script/.exists)0
-rw-r--r--chromium/third_party/fontconfig/include/fc-glyphname/fcaliastail.h (renamed from chromium/third_party/JSON/JSON-2.59/pm_to_blib)0
-rw-r--r--chromium/third_party/fontconfig/include/fc-glyphname/fcglyphname.h781
-rw-r--r--chromium/third_party/fontconfig/include/fc-lang/fcalias.h (renamed from chromium/third_party/WebKit/Source/devtools/front_end/RawSourceCode.js)0
-rw-r--r--chromium/third_party/fontconfig/include/fc-lang/fcaliastail.h (renamed from chromium/third_party/libmtp/config.rpath)0
-rw-r--r--chromium/third_party/fontconfig/include/fc-lang/fclang.h4176
-rw-r--r--chromium/third_party/fontconfig/include/src/fcalias.h390
-rw-r--r--chromium/third_party/fontconfig/include/src/fcaliastail.h440
-rw-r--r--chromium/third_party/fontconfig/include/src/fcftalias.h12
-rw-r--r--chromium/third_party/fontconfig/include/src/fcftaliastail.h20
-rw-r--r--chromium/third_party/fontconfig/include/src/fcobjshash.h317
-rw-r--r--chromium/third_party/fontconfig/include/src/fcstdint.h9
-rw-r--r--chromium/third_party/fontconfig/src/AUTHORS3
-rw-r--r--chromium/third_party/fontconfig/src/COPYING28
-rw-r--r--chromium/third_party/fontconfig/src/INSTALL42
-rw-r--r--chromium/third_party/fontconfig/src/Makefile.am157
-rw-r--r--chromium/third_party/fontconfig/src/NEWS (renamed from chromium/third_party/skia/src/ports/SkFontHost_sandbox_none.cpp)0
-rw-r--r--chromium/third_party/fontconfig/src/README1431
-rw-r--r--chromium/third_party/fontconfig/src/Tools.mk64
-rwxr-xr-xchromium/third_party/fontconfig/src/autogen.sh124
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/10-autohint.conf14
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/10-no-sub-pixel.conf14
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/10-scale-bitmap-fonts.conf81
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/10-sub-pixel-bgr.conf14
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/10-sub-pixel-rgb.conf14
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/10-sub-pixel-vbgr.conf14
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/10-sub-pixel-vrgb.conf14
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/10-unhinted.conf14
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/11-lcdfilter-default.conf16
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/11-lcdfilter-legacy.conf16
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/11-lcdfilter-light.conf16
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/20-unhint-small-vera.conf48
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/25-unhint-nonlatin.conf128
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/30-metric-aliases.conf497
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/30-urw-aliases.conf24
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/40-nonlatin.conf231
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/45-latin.conf189
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/49-sansserif.conf21
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/50-user.conf15
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/51-local.conf6
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/60-latin.conf70
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/65-fonts-persian.conf419
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/65-khmer.conf16
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/65-nonlatin.conf196
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/69-unifont.conf28
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/70-no-bitmaps.conf12
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/70-yes-bitmaps.conf12
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/80-delicious.conf19
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/90-synthetic.conf64
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/Makefile.am103
-rw-r--r--chromium/third_party/fontconfig/src/conf.d/README.in23
-rw-r--r--chromium/third_party/fontconfig/src/config-fixups.h40
-rw-r--r--chromium/third_party/fontconfig/src/config/Makedefs.in76
-rw-r--r--chromium/third_party/fontconfig/src/config/config-subst10
-rw-r--r--chromium/third_party/fontconfig/src/config/config.guess1497
-rw-r--r--chromium/third_party/fontconfig/src/config/config.sub1608
-rw-r--r--chromium/third_party/fontconfig/src/config/install.sh240
-rw-r--r--chromium/third_party/fontconfig/src/configure.ac751
-rw-r--r--chromium/third_party/fontconfig/src/doc/Makefile.am219
-rw-r--r--chromium/third_party/fontconfig/src/doc/check-missing-doc24
-rw-r--r--chromium/third_party/fontconfig/src/doc/confdir.sgml.in26
-rw-r--r--chromium/third_party/fontconfig/src/doc/edit-sgml.c546
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcatomic.fncs95
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcblanks.fncs58
-rw-r--r--chromium/third_party/fontconfig/src/doc/fccache.fncs86
-rw-r--r--chromium/third_party/fontconfig/src/doc/fccharset.fncs241
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcconfig.fncs394
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcconstant.fncs58
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcdircache.fncs88
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcfile.fncs88
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcfontset.fncs140
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcformat.fncs308
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcfreetype.fncs106
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcinit.fncs92
-rw-r--r--chromium/third_party/fontconfig/src/doc/fclangset.fncs195
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcmatrix.fncs125
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcobjectset.fncs73
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcobjecttype.fncs48
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcpattern.fncs397
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcstring.fncs244
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcstrset.fncs123
-rw-r--r--chromium/third_party/fontconfig/src/doc/fcvalue.fncs61
-rw-r--r--chromium/third_party/fontconfig/src/doc/fontconfig-devel.sgml582
-rw-r--r--chromium/third_party/fontconfig/src/doc/fontconfig-user.sgml795
-rw-r--r--chromium/third_party/fontconfig/src/doc/func.sgml90
-rw-r--r--chromium/third_party/fontconfig/src/doc/version.sgml.in24
-rw-r--r--chromium/third_party/fontconfig/src/fc-cache/Makefile.am69
-rw-r--r--chromium/third_party/fontconfig/src/fc-cache/fc-cache.c406
-rw-r--r--chromium/third_party/fontconfig/src/fc-cache/fc-cache.sgml220
-rw-r--r--chromium/third_party/fontconfig/src/fc-case/CaseFolding.txt1226
-rw-r--r--chromium/third_party/fontconfig/src/fc-case/Makefile.am33
-rw-r--r--chromium/third_party/fontconfig/src/fc-case/fc-case.c363
-rw-r--r--chromium/third_party/fontconfig/src/fc-case/fccase.tmpl.h25
-rw-r--r--chromium/third_party/fontconfig/src/fc-cat/Makefile.am60
-rw-r--r--chromium/third_party/fontconfig/src/fc-cat/fc-cat.c390
-rw-r--r--chromium/third_party/fontconfig/src/fc-cat/fc-cat.sgml169
-rw-r--r--chromium/third_party/fontconfig/src/fc-glyphname/Makefile.am33
-rw-r--r--chromium/third_party/fontconfig/src/fc-glyphname/fc-glyphname.c325
-rw-r--r--chromium/third_party/fontconfig/src/fc-glyphname/fcglyphname.tmpl.h25
-rw-r--r--chromium/third_party/fontconfig/src/fc-glyphname/zapfdingbats.txt212
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/Makefile.am286
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/aa.orth40
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ab.orth45
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/af.orth46
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ak.orth30
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/am.orth36
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/an.orth45
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ar.orth39
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/as.orth45
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ast.orth47
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/av.orth97
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ay.orth37
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/az_az.orth53
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/az_ir.orth32
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ba.orth56
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/be.orth40
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ber_dz.orth27
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ber_ma.orth46
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/bg.orth43
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/bh.orth25
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/bho.orth25
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/bi.orth39
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/bin.orth55
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/bm.orth37
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/bn.orth44
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/bo.orth39
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/br.orth47
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/brx.orth46
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/bs.orth39
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/bua.orth102
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/byn.orth27
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ca.orth58
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ce.orth97
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ch.orth35
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/chm.orth109
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/chr.orth25
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/co.orth25
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/crh.orth46
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/cs.orth67
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/csb.orth46
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/cu.orth42
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/cv.orth109
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/cy.orth63
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/da.orth89
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/de.orth49
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/doi.orth40
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/dv.orth34
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/dz.orth28
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ee.orth77
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/el.orth32
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/en.orth40
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/eo.orth32
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/es.orth50
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/et.orth47
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/eu.orth45
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/fa.orth73
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/fat.orth30
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/fc-lang.c587
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/fc-lang.man39
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/fclang.tmpl.h25
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ff.orth38
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/fi.orth51
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/fil.orth45
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/fj.orth34
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/fo.orth59
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/fr.orth58
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/fur.orth39
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/fy.orth61
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ga.orth84
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/gd.orth51
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/gez.orth60
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/gl.orth50
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/gn.orth48
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/gu.orth41
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/gv.orth31
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ha.orth36
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/haw.orth35
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/he.orth25
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/hi.orth35
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/hne.orth28
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ho.orth33
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/hr.orth49
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/hsb.orth42
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ht.orth35
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/hu.orth49
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/hy.orth26
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/hz.orth35
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ia.orth29
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/id.orth31
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ie.orth29
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ig.orth35
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ii.orth34
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ik.orth100
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/io.orth29
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/is.orth64
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/iso-3166.txt242
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/iso639-1139
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/iso639-2473
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/it.orth51
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/iu.orth77
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ja.orth6565
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/jv.orth36
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ka.orth34
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/kaa.orth110
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/kab.orth42
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ki.orth33
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/kj.orth34
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/kk.orth45
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/kl.orth63
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/km.orth39
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/kn.orth40
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ko.orth2538
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/kok.orth25
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/kr.orth43
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ks.orth32
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ku_am.orth91
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ku_iq.orth27
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ku_ir.orth49
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ku_tr.orth42
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/kum.orth96
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/kv.orth101
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/kw.orth35
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/kwm.orth29
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ky.orth102
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/la.orth31
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/lah.orth35
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/lb.orth62
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/lez.orth97
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/lg.orth33
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/li.orth43
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ln.orth43
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/lo.orth45
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/lt.orth43
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/lv.orth44
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/mai.orth25
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/mg.orth35
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/mh.orth45
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/mi.orth35
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/mk.orth40
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ml.orth38
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/mn_cn.orth37
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/mn_mn.orth35
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/mni.orth35
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/mo.orth37
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/mr.orth25
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ms.orth32
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/mt.orth67
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/my.orth37
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/na.orth40
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/nb.orth25
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/nds.orth40
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ne.orth43
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ng.orth29
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/nl.orth63
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/nn.orth43
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/no.orth68
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/nqo.orth30
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/nr.orth29
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/nso.orth34
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/nv.orth48
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ny.orth30
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/oc.orth53
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/om.orth29
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/or.orth42
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/os.orth96
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ota.orth41
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/pa.orth53
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/pa_pk.orth29
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/pap_an.orth46
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/pap_aw.orth31
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/pes.orth26
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/pl.orth41
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/prs.orth29
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ps_af.orth52
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ps_pk.orth52
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/pt.orth64
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/qu.orth36
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/quz.orth36
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/rm.orth45
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/rn.orth32
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ro.orth38
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ru.orth38
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/rw.orth31
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sa.orth25
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sah.orth108
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sat.orth44
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sc.orth42
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sco.orth32
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sd.orth58
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/se.orth37
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sel.orth96
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sg.orth47
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sh.orth33
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/shs.orth48
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/si.orth75
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sid.orth27
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sk.orth63
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sl.orth88
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sm.orth30
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sma.orth37
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/smj.orth37
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/smn.orth40
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sms.orth48
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sn.orth35
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/so.orth29
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sq.orth35
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sr.orth35
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ss.orth29
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/st.orth29
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/su.orth33
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sv.orth100
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/sw.orth29
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/syr.orth29
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ta.orth46
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/te.orth39
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/tg.orth108
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/th.orth30
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ti_er.orth56
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ti_et.orth33
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/tig.orth52
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/tk.orth44
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/tl.orth27
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/tn.orth35
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/to.orth30
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/tr.orth49
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ts.orth29
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/tt.orth108
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/tw.orth50
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ty.orth41
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/tyv.orth102
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ug.orth50
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/uk.orth43
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ur.orth68
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/uz.orth36
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/ve.orth34
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/vi.orth58
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/vo.orth36
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/vot.orth40
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/wa.orth47
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/wal.orth27
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/wen.orth42
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/wo.orth42
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/xh.orth29
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/yap.orth35
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/yi.orth25
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/yo.orth86
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/za.orth39
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/zh_cn.orth6792
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/zh_hk.orth2240
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/zh_mo.orth32
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/zh_sg.orth27
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/zh_tw.orth13105
-rw-r--r--chromium/third_party/fontconfig/src/fc-lang/zu.orth29
-rw-r--r--chromium/third_party/fontconfig/src/fc-list/Makefile.am60
-rw-r--r--chromium/third_party/fontconfig/src/fc-list/fc-list.c200
-rw-r--r--chromium/third_party/fontconfig/src/fc-list/fc-list.sgml227
-rw-r--r--chromium/third_party/fontconfig/src/fc-match/Makefile.am60
-rw-r--r--chromium/third_party/fontconfig/src/fc-match/fc-match.c248
-rw-r--r--chromium/third_party/fontconfig/src/fc-match/fc-match.sgml217
-rw-r--r--chromium/third_party/fontconfig/src/fc-pattern/Makefile.am60
-rw-r--r--chromium/third_party/fontconfig/src/fc-pattern/fc-pattern.c195
-rw-r--r--chromium/third_party/fontconfig/src/fc-pattern/fc-pattern.sgml204
-rw-r--r--chromium/third_party/fontconfig/src/fc-query/Makefile.am60
-rw-r--r--chromium/third_party/fontconfig/src/fc-query/fc-query.c182
-rw-r--r--chromium/third_party/fontconfig/src/fc-query/fc-query.sgml192
-rw-r--r--chromium/third_party/fontconfig/src/fc-scan/Makefile.am60
-rw-r--r--chromium/third_party/fontconfig/src/fc-scan/fc-scan.c178
-rw-r--r--chromium/third_party/fontconfig/src/fc-scan/fc-scan.sgml177
-rw-r--r--chromium/third_party/fontconfig/src/fc-validate/Makefile.am60
-rw-r--r--chromium/third_party/fontconfig/src/fc-validate/fc-validate.c242
-rw-r--r--chromium/third_party/fontconfig/src/fc-validate/fc-validate.sgml182
-rwxr-xr-xchromium/third_party/fontconfig/src/fontconfig-zip.in29
-rw-r--r--chromium/third_party/fontconfig/src/fontconfig.pc.in18
-rw-r--r--chromium/third_party/fontconfig/src/fontconfig.spec.in138
-rw-r--r--chromium/third_party/fontconfig/src/fontconfig/Makefile.am10
-rw-r--r--chromium/third_party/fontconfig/src/fontconfig/fcfreetype.h59
-rw-r--r--chromium/third_party/fontconfig/src/fontconfig/fcprivate.h124
-rw-r--r--chromium/third_party/fontconfig/src/fontconfig/fontconfig.h1007
-rw-r--r--chromium/third_party/fontconfig/src/fonts.conf.in155
-rw-r--r--chromium/third_party/fontconfig/src/fonts.dtd233
-rw-r--r--chromium/third_party/fontconfig/src/git.mk227
-rw-r--r--chromium/third_party/fontconfig/src/local.conf37
-rw-r--r--chromium/third_party/fontconfig/src/m4/.gitkeep0
-rw-r--r--chromium/third_party/fontconfig/src/m4/ax_cc_for_build.m477
-rw-r--r--chromium/third_party/fontconfig/src/m4/ax_create_stdint_h.m4695
-rw-r--r--chromium/third_party/fontconfig/src/m4/ax_pthread.m4309
-rw-r--r--chromium/third_party/fontconfig/src/new-version.sh118
-rw-r--r--chromium/third_party/fontconfig/src/src/Makefile.am213
-rw-r--r--chromium/third_party/fontconfig/src/src/fcarch.c60
-rw-r--r--chromium/third_party/fontconfig/src/src/fcarch.h76
-rw-r--r--chromium/third_party/fontconfig/src/src/fcatomic.c229
-rw-r--r--chromium/third_party/fontconfig/src/src/fcatomic.h145
-rw-r--r--chromium/third_party/fontconfig/src/src/fcblanks.c87
-rw-r--r--chromium/third_party/fontconfig/src/src/fccache.c1464
-rw-r--r--chromium/third_party/fontconfig/src/src/fccfg.c2352
-rw-r--r--chromium/third_party/fontconfig/src/src/fccharset.c1434
-rw-r--r--chromium/third_party/fontconfig/src/src/fccompat.c244
-rw-r--r--chromium/third_party/fontconfig/src/src/fcdbg.c499
-rw-r--r--chromium/third_party/fontconfig/src/src/fcdefault.c314
-rw-r--r--chromium/third_party/fontconfig/src/src/fcdeprecate.h36
-rw-r--r--chromium/third_party/fontconfig/src/src/fcdir.c335
-rw-r--r--chromium/third_party/fontconfig/src/src/fcformat.c1220
-rw-r--r--chromium/third_party/fontconfig/src/src/fcfreetype.c2822
-rw-r--r--chromium/third_party/fontconfig/src/src/fcfs.c127
-rw-r--r--chromium/third_party/fontconfig/src/src/fcftint.h54
-rw-r--r--chromium/third_party/fontconfig/src/src/fchash.c317
-rw-r--r--chromium/third_party/fontconfig/src/src/fcinit.c215
-rw-r--r--chromium/third_party/fontconfig/src/src/fcint.h1162
-rw-r--r--chromium/third_party/fontconfig/src/src/fclang.c1059
-rw-r--r--chromium/third_party/fontconfig/src/src/fclist.c607
-rw-r--r--chromium/third_party/fontconfig/src/src/fcmatch.c1025
-rw-r--r--chromium/third_party/fontconfig/src/src/fcmatrix.c116
-rw-r--r--chromium/third_party/fontconfig/src/src/fcmutex.h127
-rw-r--r--chromium/third_party/fontconfig/src/src/fcname.c584
-rw-r--r--chromium/third_party/fontconfig/src/src/fcobjs.c139
-rw-r--r--chromium/third_party/fontconfig/src/src/fcobjs.h48
-rw-r--r--chromium/third_party/fontconfig/src/src/fcobjshash.gperf.h26
-rw-r--r--chromium/third_party/fontconfig/src/src/fcpat.c1316
-rw-r--r--chromium/third_party/fontconfig/src/src/fcserialize.c155
-rw-r--r--chromium/third_party/fontconfig/src/src/fcstat.c361
-rw-r--r--chromium/third_party/fontconfig/src/src/fcstr.c1400
-rw-r--r--chromium/third_party/fontconfig/src/src/fcwindows.h44
-rw-r--r--chromium/third_party/fontconfig/src/src/fcxml.c3207
-rw-r--r--chromium/third_party/fontconfig/src/src/ftglue.c261
-rw-r--r--chromium/third_party/fontconfig/src/src/ftglue.h111
-rwxr-xr-xchromium/third_party/fontconfig/src/src/makealias38
-rw-r--r--chromium/third_party/freetype/src/base/ftfstype.c124
-rw-r--r--chromium/third_party/freetype/src/base/fttype1.c228
-rw-r--r--chromium/third_party/freetype2/BUILD.gn71
-rw-r--r--chromium/third_party/freetype2/freetype2.gyp1
-rw-r--r--chromium/third_party/freetype2/freetype2.patch22
-rw-r--r--chromium/third_party/freetype2/include/ftoption.h708
-rw-r--r--chromium/third_party/gold/LICENSE340
-rw-r--r--chromium/third_party/gold/OWNERS2
-rw-r--r--chromium/third_party/gold/README.chromium33
-rw-r--r--chromium/third_party/gold/ehframe.patch49
-rwxr-xr-xchromium/third_party/gold/gold32bin3197760 -> 0 bytes
-rwxr-xr-xchromium/third_party/gold/gold64bin3252664 -> 0 bytes
-rwxr-xr-xchromium/third_party/gold/ld22
-rwxr-xr-xchromium/third_party/gold/ld.bfd11
-rw-r--r--chromium/third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp226
-rw-r--r--chromium/third_party/guava/proguard.flags8
-rw-r--r--chromium/third_party/harfbuzz-ng/BUILD.gn153
-rw-r--r--chromium/third_party/harfbuzz-ng/NEWS48
-rw-r--r--chromium/third_party/harfbuzz-ng/README.chromium4
-rw-r--r--chromium/third_party/harfbuzz-ng/harfbuzz.gyp304
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-atomic-private.hh14
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-blob.cc4
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-buffer-private.hh3
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-buffer-serialize.cc2
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-buffer.cc3
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-common.cc4
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-common.h8
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-coretext.cc207
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-coretext.h8
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-face-private.hh1
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-face.cc1
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-fallback-shape.cc15
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-font-private.hh7
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-font.cc1
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-graphite2.cc4
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-open-type-private.hh4
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-layout-common-private.hh3
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-layout-gpos-table.hh28
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-layout-private.hh2
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-layout.h5
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc3
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-shape-complex-default.cc184
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-shape-complex-hangul.cc417
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc172
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc8
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-shape-complex-myanmar-machine.hh369
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-shape-complex-myanmar.cc32
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-shape-complex-private.hh38
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-shape-complex-sea.cc9
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-shape-complex-thai.cc4
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-shape-complex-tibetan.cc61
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-shape-fallback.cc6
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-shape-normalize-private.hh3
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-shape-normalize.cc36
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-shape-private.hh17
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-shape.cc58
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-shape.h54
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot-tag.cc315
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-ot.h9
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-private.hh12
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-set-private.hh1
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-shape-plan-private.hh4
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-shape-plan.cc60
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-shaper-list.hh12
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-tt-font.cc79
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-unicode-private.hh23
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-unicode.cc2
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-uniscribe.cc17
-rw-r--r--chromium/third_party/harfbuzz-ng/src/hb-version.h4
-rw-r--r--chromium/third_party/hwcplus/LICENSE27
-rw-r--r--chromium/third_party/hwcplus/OWNERS2
-rw-r--r--chromium/third_party/hwcplus/README.chromium13
-rw-r--r--chromium/third_party/hwcplus/include/android/log.h128
-rw-r--r--chromium/third_party/hwcplus/include/cutils/log.h5
-rw-r--r--chromium/third_party/hwcplus/include/cutils/native_handle.h69
-rw-r--r--chromium/third_party/hwcplus/include/cutils/properties.h99
-rw-r--r--chromium/third_party/hwcplus/include/hardware/fb.h167
-rw-r--r--chromium/third_party/hwcplus/include/hardware/gralloc.h313
-rw-r--r--chromium/third_party/hwcplus/include/hardware/hardware.h236
-rw-r--r--chromium/third_party/hwcplus/include/hardware/hwcomposer.h647
-rw-r--r--chromium/third_party/hwcplus/include/hardware/hwcomposer_defs.h201
-rw-r--r--chromium/third_party/hwcplus/include/log/log.h567
-rw-r--r--chromium/third_party/hwcplus/include/sync/sync.h54
-rw-r--r--chromium/third_party/hwcplus/include/system/graphics.h307
-rw-r--r--chromium/third_party/hwcplus/include/system/window.h841
-rw-r--r--chromium/third_party/hwcplus/include/vendor/gralloc_drm_defs.h31
-rw-r--r--chromium/third_party/hwcplus/src/hardware.c220
-rw-r--r--chromium/third_party/hwcplus/src/hwcplus_util.c102
-rw-r--r--chromium/third_party/iaccessible2/BUILD.gn28
-rw-r--r--chromium/third_party/iaccessible2/README.chromium3
-rw-r--r--chromium/third_party/iaccessible2/ia2_api_all.idl1137
-rw-r--r--chromium/third_party/iccjpeg/BUILD.gn17
-rw-r--r--chromium/third_party/icu/README.chromium63
-rw-r--r--chromium/third_party/icu/android/icudt46l.datbin5587264 -> 0 bytes
-rw-r--r--chromium/third_party/icu/android/icudt46l_dat.S81331
-rw-r--r--chromium/third_party/icu/android/icudtl.datbin0 -> 5575648 bytes
-rw-r--r--chromium/third_party/icu/icu.gyp463
-rw-r--r--chromium/third_party/icu/icu.gypi313
-rw-r--r--chromium/third_party/icu/icu.isolate48
-rw-r--r--chromium/third_party/icu/icu_nacl.gyp108
-rw-r--r--chromium/third_party/icu/linux/icudt46l_dat.S150113
-rw-r--r--chromium/third_party/icu/mac/icudt46l_dat.S150113
-rw-r--r--chromium/third_party/icu/patches/declspec.patch13
-rw-r--r--chromium/third_party/icu/patches/pandroid.h.patch4
-rw-r--r--chromium/third_party/icu/patches/platform.patch4
-rw-r--r--chromium/third_party/icu/patches/platform.qnx.patch113
-rw-r--r--chromium/third_party/icu/patches/pnacl.h.patch14
-rw-r--r--chromium/third_party/icu/patches/si_value.undef.patch14
-rw-r--r--chromium/third_party/icu/patches/xopen_source.patch28
-rw-r--r--chromium/third_party/icu/source/common/putil.c18
-rw-r--r--chromium/third_party/icu/source/common/ucnvmbcs.c5
-rw-r--r--chromium/third_party/icu/source/common/unicode/pnacl.h405
-rw-r--r--chromium/third_party/icu/source/common/unicode/pqnx.h403
-rw-r--r--chromium/third_party/icu/source/common/unicode/ptypes.h4
-rw-r--r--chromium/third_party/icu/source/common/unicode/utypes.h2
-rw-r--r--chromium/third_party/icu/source/data/in/icudt46l.datbin9991952 -> 0 bytes
-rw-r--r--chromium/third_party/icu/source/data/in/icudtl.datbin0 -> 9980368 bytes
-rw-r--r--chromium/third_party/icu/source/data/lang/reslocal.mk1
-rw-r--r--chromium/third_party/icu/source/data/lang/tg.txt18
-rw-r--r--chromium/third_party/icu/source/data/locales/reslocal.mk1
-rw-r--r--chromium/third_party/icu/source/data/locales/tg.txt17
-rw-r--r--chromium/third_party/icu/source/data/misc/metaZones.txt38
-rw-r--r--chromium/third_party/icu/source/data/misc/windowsZones.txt25
-rw-r--r--chromium/third_party/icu/source/data/misc/zoneinfo64.txt1729
-rw-r--r--chromium/third_party/icu/source/data/translit/css3transform.txt56
-rw-r--r--chromium/third_party/instrumented_libraries/README.chromium14
-rwxr-xr-xchromium/third_party/instrumented_libraries/download_build_install.py168
-rwxr-xr-xchromium/third_party/instrumented_libraries/fix_rpaths.sh22
-rw-r--r--chromium/third_party/instrumented_libraries/instrumented_libraries.gyp455
-rw-r--r--chromium/third_party/instrumented_libraries/standard_instrumented_library_target.gypi23
-rw-r--r--chromium/third_party/isimpledom/BUILD.gn18
-rw-r--r--chromium/third_party/jemalloc/LICENSE30
-rw-r--r--chromium/third_party/jemalloc/README.chromium47
-rw-r--r--chromium/third_party/jemalloc/chromium/Makefile.in130
-rw-r--r--chromium/third_party/jemalloc/chromium/apply-ed-patches.pl84
-rw-r--r--chromium/third_party/jemalloc/chromium/build-crt.py20
-rw-r--r--chromium/third_party/jemalloc/chromium/crtsp1.diff197
-rw-r--r--chromium/third_party/jemalloc/chromium/ed.exebin116736 -> 0 bytes
-rw-r--r--chromium/third_party/jemalloc/chromium/jemalloc.c7277
-rw-r--r--chromium/third_party/jemalloc/chromium/jemalloc.h222
-rw-r--r--chromium/third_party/jemalloc/chromium/ql.h115
-rw-r--r--chromium/third_party/jemalloc/chromium/qr.h99
-rw-r--r--chromium/third_party/jemalloc/chromium/rb.h983
-rw-r--r--chromium/third_party/jemalloc/vendor/Makefile.in130
-rw-r--r--chromium/third_party/jemalloc/vendor/apply-ed-patches.pl84
-rw-r--r--chromium/third_party/jemalloc/vendor/build-crt.py20
-rw-r--r--chromium/third_party/jemalloc/vendor/crtsp1.diff197
-rw-r--r--chromium/third_party/jemalloc/vendor/ed.exebin116736 -> 0 bytes
-rw-r--r--chromium/third_party/jemalloc/vendor/jemalloc.c7259
-rw-r--r--chromium/third_party/jemalloc/vendor/jemalloc.h221
-rw-r--r--chromium/third_party/jemalloc/vendor/ql.h114
-rw-r--r--chromium/third_party/jemalloc/vendor/qr.h98
-rw-r--r--chromium/third_party/jemalloc/vendor/rb.h982
-rw-r--r--chromium/third_party/jsoncpp/BUILD.gn39
-rw-r--r--chromium/third_party/jsoncpp/jsoncpp_nacl.gyp34
-rw-r--r--chromium/third_party/jsoncpp/jsoncpp_untrusted.gyp34
-rw-r--r--chromium/third_party/khronos/BUILD.gn10
-rw-r--r--chromium/third_party/khronos/DEPS2
-rw-r--r--chromium/third_party/khronos/GLES2/gl2.h583
-rw-r--r--chromium/third_party/khronos/GLES2/gl2ext.h2472
-rw-r--r--chromium/third_party/khronos/GLES2/gl2platform.h19
-rw-r--r--chromium/third_party/khronos/KHR/khrplatform.h31
-rw-r--r--chromium/third_party/khronos/README.chromium7
-rw-r--r--chromium/third_party/leveldatabase/README.chromium6
-rw-r--r--chromium/third_party/leveldatabase/env_chromium.cc612
-rw-r--r--chromium/third_party/leveldatabase/env_chromium.h71
-rw-r--r--chromium/third_party/leveldatabase/env_chromium_stdio.cc378
-rw-r--r--chromium/third_party/leveldatabase/env_chromium_stdio.h73
-rw-r--r--chromium/third_party/leveldatabase/env_chromium_unittest.cc65
-rw-r--r--chromium/third_party/leveldatabase/env_chromium_win.cc355
-rw-r--r--chromium/third_party/leveldatabase/env_chromium_win.h79
-rw-r--r--chromium/third_party/leveldatabase/leveldatabase.gyp43
-rw-r--r--chromium/third_party/leveldatabase/src/Makefile11
-rw-r--r--chromium/third_party/leveldatabase/src/db/log_reader.cc23
-rw-r--r--chromium/third_party/leveldatabase/src/db/log_test.cc40
-rw-r--r--chromium/third_party/leveldatabase/src/db/repair.cc1
-rw-r--r--chromium/third_party/leveldatabase/src/db/version_set.cc14
-rw-r--r--chromium/third_party/leveldatabase/src/include/leveldb/c.h1
-rw-r--r--chromium/third_party/leveldatabase/src/include/leveldb/db.h2
-rw-r--r--chromium/third_party/leveldatabase/src/include/leveldb/slice.h2
-rw-r--r--chromium/third_party/libXNVCtrl/BUILD.gn12
-rw-r--r--chromium/third_party/libaddressinput/chromium/cpp/grit.gyp4
-rw-r--r--chromium/third_party/libaddressinput/chromium/cpp/libaddressinput.gyp32
-rw-r--r--chromium/third_party/libaddressinput/chromium/cpp/re2.gyp37
-rw-r--r--chromium/third_party/libaddressinput/libaddressinput.gyp154
-rw-r--r--chromium/third_party/libc++/libc++.gyp127
-rw-r--r--chromium/third_party/libc++abi/libc++abi.gyp75
-rw-r--r--chromium/third_party/libevent/BUILD.gn38
-rw-r--r--chromium/third_party/libevent/README.chromium2
-rw-r--r--chromium/third_party/libevent/chromium.patch65
-rw-r--r--chromium/third_party/libevent/event.c24
-rw-r--r--chromium/third_party/libevent/freebsd/config.h266
-rw-r--r--chromium/third_party/libexif/README.chromium4
-rw-r--r--chromium/third_party/libexif/README.security1
-rw-r--r--chromium/third_party/libexif/chromium.patch115
-rw-r--r--chromium/third_party/libexif/libexif.gyp59
-rw-r--r--chromium/third_party/libexif/sources/README17
-rw-r--r--chromium/third_party/libexif/sources/libexif/canon/mnote-canon-tag.c2
-rw-r--r--chromium/third_party/libexif/sources/libexif/exif-entry.c185
-rw-r--r--chromium/third_party/libexif/sources/libexif/exif-format.c1
-rw-r--r--chromium/third_party/libexif/sources/libexif/exif-tag.c2
-rw-r--r--chromium/third_party/libexif/sources/libexif/exif-utils.c2
-rw-r--r--chromium/third_party/libexif/sources/libexif/exif-utils.h1
-rw-r--r--chromium/third_party/libjingle/README.chromium2
-rw-r--r--chromium/third_party/libjingle/libjingle.gyp367
-rw-r--r--chromium/third_party/libjingle/libjingle_common.gypi353
-rw-r--r--chromium/third_party/libjingle/libjingle_nacl.gyp116
-rw-r--r--chromium/third_party/libjingle/overrides/init_webrtc.cc37
-rw-r--r--chromium/third_party/libjingle/overrides/init_webrtc.h7
-rw-r--r--chromium/third_party/libjingle/overrides/initialize_module.cc18
-rw-r--r--chromium/third_party/libjingle/overrides/talk/base/logging.cc16
-rw-r--r--chromium/third_party/libjingle/overrides/talk/base/logging.h1
-rw-r--r--chromium/third_party/libjingle/source/talk/OWNERS6
-rw-r--r--chromium/third_party/libjingle/source/talk/PRESUBMIT.py14
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/OWNERS3
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/audiotrack.h17
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/datachannel.cc159
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/datachannel.h36
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/datachannel_unittest.cc199
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/datachannelinterface.h4
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/jsepsessiondescription.cc16
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/jsepsessiondescription_unittest.cc31
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/localaudiosource.cc25
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface.cc88
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface.h47
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/mediastream_unittest.cc3
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/mediastreamhandler.cc52
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/mediastreamhandler.h33
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/mediastreamhandler_unittest.cc36
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h81
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/mediastreamprovider.h4
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/mediastreamsignaling.cc223
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/mediastreamsignaling.h28
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/mediastreamsignaling_unittest.cc188
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/mediastreamtrackproxy.h5
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/README13
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCAudioTrack.mm6
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCDataChannel+Internal.h55
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCDataChannel.mm273
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCEAGLVideoView+Internal.h36
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCEAGLVideoView.m244
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCEnumConverter.h3
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCEnumConverter.mm10
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCI420Frame+Internal.h36
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCI420Frame.mm64
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCICECandidate.mm16
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCICEServer.mm14
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCMediaConstraints.mm14
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCMediaSource.mm2
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCMediaStream.mm54
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCMediaStreamTrack.mm40
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCNSGLVideoView.m187
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCOpenGLVideoRenderer.mm457
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCPair.m6
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCPeerConnection+Internal.h7
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCPeerConnection.mm191
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm59
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCPeerConnectionObserver.h10
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCPeerConnectionObserver.mm55
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCSessionDescription.mm10
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCStatsReport+Internal.h36
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCStatsReport.mm69
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCVideoCapturer+Internal.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCVideoCapturer.mm18
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCVideoRenderer+Internal.h6
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCVideoRenderer.mm72
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCVideoSource.mm6
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/RTCVideoTrack.mm21
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/public/RTCDataChannel.h112
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/public/RTCEAGLVideoView.h47
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/public/RTCI420Frame.h19
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/public/RTCICEServer.h4
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/public/RTCMediaSource.h6
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/public/RTCMediaStreamTrack.h12
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/public/RTCNSGLVideoView.h48
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/public/RTCOpenGLVideoRenderer.h73
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/public/RTCPeerConnection.h35
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/public/RTCPeerConnectionDelegate.h7
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/public/RTCSessionDescriptionDelegate.h49
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/public/RTCSessionDescriptonDelegate.h49
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/public/RTCStatsDelegate.h39
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/public/RTCStatsReport.h45
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/public/RTCTypes.h6
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/public/RTCVideoRenderer.h38
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objc/public/RTCVideoRendererDelegate.h44
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objctests/Info.plist14
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objctests/RTCPeerConnectionSyncObserver.h8
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objctests/RTCPeerConnectionSyncObserver.m128
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objctests/RTCPeerConnectionTest.mm229
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objctests/RTCSessionDescriptionSyncObserver.h4
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objctests/RTCSessionDescriptionSyncObserver.m16
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/objctests/mac/main.mm6
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/peerconnection.cc173
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/peerconnection.h26
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/peerconnection_unittest.cc118
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/peerconnectionendtoend_unittest.cc200
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/peerconnectionfactory.cc88
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/peerconnectionfactory.h19
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/peerconnectionfactory_unittest.cc92
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h83
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface_unittest.cc71
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/peerconnectionproxy.h5
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/portallocatorfactory.cc2
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/remoteaudiosource.cc72
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/remoteaudiosource.h66
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/sctputils.cc194
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/sctputils.h55
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/sctputils_unittest.cc161
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/statscollector.cc352
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/statscollector.h49
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/statscollector_unittest.cc938
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/statstypes.h21
-rwxr-xr-xchromium/third_party/libjingle/source/talk/app/webrtc/umametrics.h59
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/videosource.cc31
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/videosource_unittest.cc11
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/webrtc.scons89
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/webrtcsdp.cc179
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/webrtcsdp_unittest.cc260
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/webrtcsession.cc530
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/webrtcsession.h62
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/webrtcsession_unittest.cc689
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/webrtcsessiondescriptionfactory.cc16
-rw-r--r--chromium/third_party/libjingle/source/talk/app/webrtc/webrtcsessiondescriptionfactory.h4
-rw-r--r--chromium/third_party/libjingle/source/talk/base/asyncinvoker-inl.h146
-rw-r--r--chromium/third_party/libjingle/source/talk/base/asyncinvoker.cc108
-rw-r--r--chromium/third_party/libjingle/source/talk/base/asyncinvoker.h151
-rw-r--r--chromium/third_party/libjingle/source/talk/base/asyncpacketsocket.h43
-rw-r--r--chromium/third_party/libjingle/source/talk/base/asynctcpsocket.cc11
-rw-r--r--chromium/third_party/libjingle/source/talk/base/asynctcpsocket.h8
-rw-r--r--chromium/third_party/libjingle/source/talk/base/asyncudpsocket.cc8
-rw-r--r--chromium/third_party/libjingle/source/talk/base/asyncudpsocket.h19
-rw-r--r--chromium/third_party/libjingle/source/talk/base/bandwidthsmoother.cc2
-rw-r--r--chromium/third_party/libjingle/source/talk/base/bind.h207
-rw-r--r--chromium/third_party/libjingle/source/talk/base/bind.h.pump30
-rw-r--r--chromium/third_party/libjingle/source/talk/base/bind_unittest.cc10
-rw-r--r--chromium/third_party/libjingle/source/talk/base/buffer.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/base/bytebuffer.cc5
-rw-r--r--chromium/third_party/libjingle/source/talk/base/byteorder.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/base/callback.h278
-rw-r--r--chromium/third_party/libjingle/source/talk/base/callback.h.pump120
-rw-r--r--chromium/third_party/libjingle/source/talk/base/callback_unittest.cc98
-rw-r--r--chromium/third_party/libjingle/source/talk/base/common.cc10
-rw-r--r--chromium/third_party/libjingle/source/talk/base/common.h20
-rw-r--r--chromium/third_party/libjingle/source/talk/base/cpumonitor.cc10
-rw-r--r--chromium/third_party/libjingle/source/talk/base/cpumonitor_unittest.cc4
-rw-r--r--chromium/third_party/libjingle/source/talk/base/criticalsection_unittest.cc163
-rw-r--r--chromium/third_party/libjingle/source/talk/base/cryptstring.h4
-rw-r--r--chromium/third_party/libjingle/source/talk/base/event.cc17
-rw-r--r--chromium/third_party/libjingle/source/talk/base/fakesslidentity.h22
-rw-r--r--chromium/third_party/libjingle/source/talk/base/fileutils.cc29
-rw-r--r--chromium/third_party/libjingle/source/talk/base/fileutils.h21
-rw-r--r--chromium/third_party/libjingle/source/talk/base/firewallsocketserver.cc3
-rw-r--r--chromium/third_party/libjingle/source/talk/base/gunit.h7
-rw-r--r--chromium/third_party/libjingle/source/talk/base/helpers.cc26
-rw-r--r--chromium/third_party/libjingle/source/talk/base/helpers_unittest.cc22
-rw-r--r--chromium/third_party/libjingle/source/talk/base/httpserver_unittest.cc6
-rw-r--r--chromium/third_party/libjingle/source/talk/base/iosfilesystem.mm70
-rw-r--r--chromium/third_party/libjingle/source/talk/base/ipaddress.cc4
-rw-r--r--chromium/third_party/libjingle/source/talk/base/ipaddress_unittest.cc12
-rw-r--r--chromium/third_party/libjingle/source/talk/base/json.cc4
-rw-r--r--chromium/third_party/libjingle/source/talk/base/latebindingsymboltable.cc.def13
-rw-r--r--chromium/third_party/libjingle/source/talk/base/latebindingsymboltable.h.def1
-rw-r--r--chromium/third_party/libjingle/source/talk/base/linux.cc83
-rw-r--r--chromium/third_party/libjingle/source/talk/base/linux.h5
-rw-r--r--chromium/third_party/libjingle/source/talk/base/linux_unittest.cc8
-rw-r--r--chromium/third_party/libjingle/source/talk/base/logging.cc5
-rw-r--r--chromium/third_party/libjingle/source/talk/base/logging.h7
-rw-r--r--chromium/third_party/libjingle/source/talk/base/maccocoasocketserver.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/base/maccocoasocketserver.mm63
-rw-r--r--chromium/third_party/libjingle/source/talk/base/messagedigest.cc13
-rw-r--r--chromium/third_party/libjingle/source/talk/base/messagedigest.h3
-rw-r--r--chromium/third_party/libjingle/source/talk/base/messagehandler.h34
-rw-r--r--chromium/third_party/libjingle/source/talk/base/messagequeue.cc28
-rw-r--r--chromium/third_party/libjingle/source/talk/base/messagequeue.h9
-rw-r--r--chromium/third_party/libjingle/source/talk/base/natserver.cc9
-rw-r--r--chromium/third_party/libjingle/source/talk/base/natsocketfactory.cc8
-rw-r--r--chromium/third_party/libjingle/source/talk/base/nattypes.cc2
-rw-r--r--chromium/third_party/libjingle/source/talk/base/nethelpers.cc9
-rw-r--r--chromium/third_party/libjingle/source/talk/base/nethelpers.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/base/network.cc119
-rw-r--r--chromium/third_party/libjingle/source/talk/base/network.h39
-rw-r--r--chromium/third_party/libjingle/source/talk/base/network_unittest.cc45
-rw-r--r--chromium/third_party/libjingle/source/talk/base/nssidentity.cc97
-rw-r--r--chromium/third_party/libjingle/source/talk/base/nssidentity.h16
-rw-r--r--chromium/third_party/libjingle/source/talk/base/nssstreamadapter.cc90
-rw-r--r--chromium/third_party/libjingle/source/talk/base/nssstreamadapter.h3
-rw-r--r--chromium/third_party/libjingle/source/talk/base/openssl.h37
-rw-r--r--chromium/third_party/libjingle/source/talk/base/openssladapter.cc14
-rw-r--r--chromium/third_party/libjingle/source/talk/base/openssldigest.cc5
-rw-r--r--chromium/third_party/libjingle/source/talk/base/opensslidentity.cc85
-rw-r--r--chromium/third_party/libjingle/source/talk/base/opensslidentity.h22
-rw-r--r--chromium/third_party/libjingle/source/talk/base/opensslstreamadapter.cc155
-rw-r--r--chromium/third_party/libjingle/source/talk/base/opensslstreamadapter.h16
-rw-r--r--chromium/third_party/libjingle/source/talk/base/optionsfile_unittest.cc209
-rw-r--r--chromium/third_party/libjingle/source/talk/base/physicalsocketserver.cc44
-rw-r--r--chromium/third_party/libjingle/source/talk/base/physicalsocketserver.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/base/physicalsocketserver_unittest.cc13
-rw-r--r--chromium/third_party/libjingle/source/talk/base/profiler.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/base/profiler_unittest.cc8
-rw-r--r--chromium/third_party/libjingle/source/talk/base/proxydetect.cc30
-rw-r--r--chromium/third_party/libjingle/source/talk/base/proxydetect_unittest.cc1
-rw-r--r--chromium/third_party/libjingle/source/talk/base/refcount.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/base/rollingaccumulator.h82
-rw-r--r--chromium/third_party/libjingle/source/talk/base/rollingaccumulator_unittest.cc63
-rw-r--r--chromium/third_party/libjingle/source/talk/base/safe_conversions.h96
-rw-r--r--chromium/third_party/libjingle/source/talk/base/safe_conversions_impl.h205
-rw-r--r--chromium/third_party/libjingle/source/talk/base/scoped_ptr.h4
-rw-r--r--chromium/third_party/libjingle/source/talk/base/scoped_ref_ptr.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/base/scopedptrcollection.h77
-rw-r--r--chromium/third_party/libjingle/source/talk/base/scopedptrcollection_unittest.cc90
-rw-r--r--chromium/third_party/libjingle/source/talk/base/sharedexclusivelock_unittest.cc3
-rw-r--r--chromium/third_party/libjingle/source/talk/base/signalthread_unittest.cc6
-rwxr-xr-xchromium/third_party/libjingle/source/talk/base/sigslottester.h216
-rwxr-xr-xchromium/third_party/libjingle/source/talk/base/sigslottester.h.pump102
-rwxr-xr-xchromium/third_party/libjingle/source/talk/base/sigslottester_unittest.cc74
-rw-r--r--chromium/third_party/libjingle/source/talk/base/socket.h19
-rw-r--r--chromium/third_party/libjingle/source/talk/base/socket_unittest.cc4
-rw-r--r--chromium/third_party/libjingle/source/talk/base/socketaddress.cc2
-rw-r--r--chromium/third_party/libjingle/source/talk/base/sslfingerprint.cc114
-rw-r--r--chromium/third_party/libjingle/source/talk/base/sslfingerprint.h74
-rw-r--r--chromium/third_party/libjingle/source/talk/base/sslidentity.cc12
-rw-r--r--chromium/third_party/libjingle/source/talk/base/sslidentity.h20
-rw-r--r--chromium/third_party/libjingle/source/talk/base/sslidentity_unittest.cc45
-rw-r--r--chromium/third_party/libjingle/source/talk/base/sslstreamadapter.h33
-rw-r--r--chromium/third_party/libjingle/source/talk/base/sslstreamadapter_unittest.cc136
-rw-r--r--chromium/third_party/libjingle/source/talk/base/sslstreamadapterhelper.cc7
-rw-r--r--chromium/third_party/libjingle/source/talk/base/sslstreamadapterhelper.h11
-rw-r--r--chromium/third_party/libjingle/source/talk/base/stream.cc4
-rw-r--r--chromium/third_party/libjingle/source/talk/base/stream.h7
-rw-r--r--chromium/third_party/libjingle/source/talk/base/stringencode.cc4
-rw-r--r--chromium/third_party/libjingle/source/talk/base/stringutils.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/base/template_util.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/base/testclient.cc9
-rw-r--r--chromium/third_party/libjingle/source/talk/base/testechoserver.h3
-rw-r--r--chromium/third_party/libjingle/source/talk/base/testutils.h37
-rw-r--r--chromium/third_party/libjingle/source/talk/base/thread.cc42
-rw-r--r--chromium/third_party/libjingle/source/talk/base/thread.h54
-rw-r--r--chromium/third_party/libjingle/source/talk/base/thread_unittest.cc191
-rw-r--r--chromium/third_party/libjingle/source/talk/base/timeutils.cc21
-rw-r--r--chromium/third_party/libjingle/source/talk/base/timeutils.h11
-rw-r--r--chromium/third_party/libjingle/source/talk/base/timeutils_unittest.cc23
-rw-r--r--chromium/third_party/libjingle/source/talk/base/transformadapter.cc2
-rw-r--r--chromium/third_party/libjingle/source/talk/base/unittest_main.cc23
-rw-r--r--chromium/third_party/libjingle/source/talk/base/unixfilesystem.cc61
-rw-r--r--chromium/third_party/libjingle/source/talk/base/unixfilesystem.h14
-rw-r--r--chromium/third_party/libjingle/source/talk/base/versionparsing.cc2
-rw-r--r--chromium/third_party/libjingle/source/talk/base/virtualsocket_unittest.cc9
-rw-r--r--chromium/third_party/libjingle/source/talk/base/virtualsocketserver.cc10
-rw-r--r--chromium/third_party/libjingle/source/talk/base/virtualsocketserver.h3
-rw-r--r--chromium/third_party/libjingle/source/talk/base/win32regkey.cc60
-rw-r--r--chromium/third_party/libjingle/source/talk/base/win32toolhelp_unittest.cc1
-rw-r--r--chromium/third_party/libjingle/source/talk/base/windowpickerfactory.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/base/winping.cc2
-rw-r--r--chromium/third_party/libjingle/source/talk/build/OWNERS5
-rw-r--r--chromium/third_party/libjingle/source/talk/build/common.gypi55
-rw-r--r--chromium/third_party/libjingle/source/talk/build/ios_test.plist24
-rw-r--r--chromium/third_party/libjingle/source/talk/build/ios_tests.gypi55
-rw-r--r--chromium/third_party/libjingle/source/talk/build/isolate.gypi83
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/android/AndroidManifest.xml4
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/android/README14
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/call/call_main.cc12
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/call/console.cc14
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/call/console.h3
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/chat/Info.plist11
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/chat/chat_main.cc159
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/chat/chatapp.cc251
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/chat/chatapp.h171
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/chat/consoletask.cc177
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/chat/consoletask.h92
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/chat/textchatreceivetask.cc66
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/chat/textchatreceivetask.h63
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/chat/textchatsendtask.cc81
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/chat/textchatsendtask.h56
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/ios/AppRTCDemo/APPRTCAppClient.h54
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/ios/AppRTCDemo/APPRTCAppClient.m340
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/ios/AppRTCDemo/APPRTCAppDelegate.h56
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/ios/AppRTCDemo/APPRTCAppDelegate.m454
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/ios/AppRTCDemo/APPRTCViewController.h40
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/ios/AppRTCDemo/APPRTCViewController.m88
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/ios/AppRTCDemo/GAEChannelClient.h49
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/ios/AppRTCDemo/GAEChannelClient.m107
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/ios/AppRTCDemo/Info.plist77
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/ios/AppRTCDemo/en.lproj/APPRTCViewController.xib529
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/ios/AppRTCDemo/ios_channel.html88
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/ios/AppRTCDemo/main.m37
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/ios/README3
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/login/login_main.cc3
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/APPRTCAppClient.h68
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/APPRTCAppClient.m320
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/APPRTCConnectionManager.h66
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/APPRTCConnectionManager.m495
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/GAEChannelClient.h52
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/GAEChannelClient.m167
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/channel.html94
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/ios/APPRTCAppDelegate.h34
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/ios/APPRTCAppDelegate.m65
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/ios/APPRTCViewController.h40
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/ios/APPRTCViewController.m231
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/ios/AppRTCDemo-Prefix.pch (renamed from chromium/third_party/libjingle/source/talk/examples/ios/AppRTCDemo/AppRTCDemo-Prefix.pch)0
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/ios/Default.png (renamed from chromium/third_party/libjingle/source/talk/examples/ios/AppRTCDemo/Default.png)bin6540 -> 6540 bytes
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/ios/Info.plist62
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/ios/ResourceRules.plist (renamed from chromium/third_party/libjingle/source/talk/examples/ios/AppRTCDemo/ResourceRules.plist)0
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/ios/en.lproj/APPRTCViewController.xib716
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/ios/main.m37
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.h31
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m77
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/mac/APPRTCViewController.h34
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/mac/APPRTCViewController.m312
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/mac/Info.plist29
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/AppRTCDemo/mac/main.m39
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/Icon.png (renamed from chromium/third_party/libjingle/source/talk/examples/ios/Icon.png)bin62469 -> 62469 bytes
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/objc/README3
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/pcp/pcp_main.cc715
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/peerconnection/client/conductor.cc1
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/peerconnection/client/linux/main.cc4
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/peerconnection/client/main.cc3
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/peerconnection/peerconnection.scons64
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/plus/libjingleplus.cc736
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/plus/libjingleplus.h154
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/plus/presencepushtask.cc201
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/plus/presencepushtask.h53
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/plus/rostertask.cc218
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/plus/rostertask.h72
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/plus/testutil/libjingleplus_main.cc119
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/plus/testutil/libjingleplus_test_notifier.h101
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/plus/testutil/libjingleplus_unittest.cc52
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/relayserver/relayserver_main.cc (renamed from chromium/third_party/libjingle/source/talk/p2p/base/relayserver_main.cc)0
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/stunserver/stunserver_main.cc (renamed from chromium/third_party/libjingle/source/talk/p2p/base/stunserver_main.cc)0
-rw-r--r--chromium/third_party/libjingle/source/talk/examples/turnserver/turnserver_main.cc (renamed from chromium/third_party/libjingle/source/talk/p2p/base/turnserver_main.cc)0
-rwxr-xr-xchromium/third_party/libjingle/source/talk/libjingle.gyp140
-rw-r--r--chromium/third_party/libjingle/source/talk/libjingle.scons790
-rwxr-xr-xchromium/third_party/libjingle/source/talk/libjingle_examples.gyp85
-rw-r--r--chromium/third_party/libjingle/source/talk/libjingle_media_unittest.isolate4
-rw-r--r--chromium/third_party/libjingle/source/talk/libjingle_p2p_unittest.isolate4
-rw-r--r--chromium/third_party/libjingle/source/talk/libjingle_peerconnection_unittest.isolate4
-rw-r--r--chromium/third_party/libjingle/source/talk/libjingle_sound_unittest.isolate4
-rwxr-xr-xchromium/third_party/libjingle/source/talk/libjingle_tests.gyp115
-rw-r--r--chromium/third_party/libjingle/source/talk/libjingle_unittest.isolate4
-rw-r--r--chromium/third_party/libjingle/source/talk/main.scons889
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/audiorenderer.h30
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/codec.cc50
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/codec.h22
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/codec_unittest.cc135
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/constants.cc20
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/constants.h22
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/fakemediaengine.h93
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/fakevideorenderer.h28
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/filemediaengine.cc2
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/filemediaengine.h11
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/hybridvideoengine.cc14
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/hybridvideoengine.h5
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/hybridvideoengine_unittest.cc486
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/mediachannel.h217
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/mediaengine.cc50
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/mediaengine.h23
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/rtpdataengine.cc4
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/rtpdataengine.h3
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/rtpdataengine_unittest.cc11
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/rtpdump.h3
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/testutils.cc3
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/videoadapter.cc162
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/videoadapter.h76
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/videocapturer.cc100
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/videocapturer.h74
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/videocapturer_unittest.cc82
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/videocommon.cc3
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/videocommon.h13
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/videocommon_unittest.cc3
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/videoengine_unittest.h307
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/videoframe.cc2
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/yuvframegenerator.cc262
-rw-r--r--chromium/third_party/libjingle/source/talk/media/base/yuvframegenerator.h78
-rw-r--r--chromium/third_party/libjingle/source/talk/media/devices/devicemanager.cc66
-rw-r--r--chromium/third_party/libjingle/source/talk/media/devices/devicemanager.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/media/devices/filevideocapturer.cc6
-rw-r--r--chromium/third_party/libjingle/source/talk/media/devices/iosdeviceinfo.cc40
-rw-r--r--chromium/third_party/libjingle/source/talk/media/devices/linuxdevicemanager.cc15
-rw-r--r--chromium/third_party/libjingle/source/talk/media/devices/macdevicemanager.cc1
-rw-r--r--chromium/third_party/libjingle/source/talk/media/devices/macdevicemanagermm.mm53
-rw-r--r--chromium/third_party/libjingle/source/talk/media/devices/v4llookup.cc7
-rw-r--r--chromium/third_party/libjingle/source/talk/media/devices/yuvframescapturer.cc173
-rw-r--r--chromium/third_party/libjingle/source/talk/media/devices/yuvframescapturer.h71
-rw-r--r--chromium/third_party/libjingle/source/talk/media/other/linphonemediaengine.h3
-rw-r--r--chromium/third_party/libjingle/source/talk/media/sctp/sctpdataengine.cc435
-rw-r--r--chromium/third_party/libjingle/source/talk/media/sctp/sctpdataengine.h36
-rw-r--r--chromium/third_party/libjingle/source/talk/media/sctp/sctpdataengine_unittest.cc260
-rw-r--r--chromium/third_party/libjingle/source/talk/media/sctp/sctputils.cc176
-rw-r--r--chromium/third_party/libjingle/source/talk/media/sctp/sctputils.h53
-rw-r--r--chromium/third_party/libjingle/source/talk/media/sctp/sctputils_unittest.cc153
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/OWNERS3
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/fakewebrtcvideocapturemodule.h37
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/fakewebrtcvideoengine.h173
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/fakewebrtcvoiceengine.h221
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/webrtcmediaengine.cc58
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/webrtcmediaengine.h23
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/webrtcvideocapturer.cc30
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/webrtcvideocapturer.h4
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/webrtcvideochannelfactory.h44
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/webrtcvideoengine.cc1226
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/webrtcvideoengine.h52
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/webrtcvideoengine2.cc1778
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/webrtcvideoengine2.h367
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/webrtcvideoengine2_unittest.cc1367
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/webrtcvideoengine2_unittest.h157
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/webrtcvideoengine_unittest.cc1416
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/webrtcvideoframe.cc29
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/webrtcvideoframe.h1
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/webrtcvoiceengine.cc707
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/webrtcvoiceengine.h36
-rw-r--r--chromium/third_party/libjingle/source/talk/media/webrtc/webrtcvoiceengine_unittest.cc622
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/asyncstuntcpsocket.cc5
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/asyncstuntcpsocket.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/asyncstuntcpsocket_unittest.cc3
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/candidate.h33
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/constants.cc5
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/constants.h4
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/dtlstransport.h78
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/dtlstransportchannel.cc48
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/dtlstransportchannel.h9
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/dtlstransportchannel_unittest.cc51
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/fakesession.h18
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/p2ptransportchannel.cc77
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/p2ptransportchannel.h5
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/p2ptransportchannel_unittest.cc168
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/port.cc104
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/port.h41
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/port_unittest.cc298
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/portallocator.h1
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/portinterface.h5
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/portproxy.cc4
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/portproxy.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/pseudotcp.cc24
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/rawtransportchannel.cc4
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/rawtransportchannel.h6
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/relayport.cc54
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/relayport.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/relayport_unittest.cc9
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/relayserver.cc11
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/relayserver_unittest.cc16
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/session.cc82
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/session.h43
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/session_unittest.cc34
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/stun.cc9
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/stun_unittest.cc99
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/stunport.cc29
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/stunport.h3
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/stunport_unittest.cc3
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/stunrequest_unittest.cc8
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/stunserver.cc4
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/stunserver_unittest.cc2
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/tcpport.cc42
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/tcpport.h4
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/transport.cc206
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/transport.h32
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/transport_unittest.cc69
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/transportchannel.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/transportchannelimpl.h6
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/transportchannelproxy.cc5
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/transportchannelproxy.h2
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/turnport.cc151
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/turnport.h51
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/turnport_unittest.cc113
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/base/turnserver.cc9
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/client/basicportallocator.cc201
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/client/basicportallocator.h10
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/client/connectivitychecker.cc4
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/client/connectivitychecker_unittest.cc4
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/client/httpportallocator.cc3
-rw-r--r--chromium/third_party/libjingle/source/talk/p2p/client/portallocator_unittest.cc198
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/audiomonitor.cc2
-rwxr-xr-xchromium/third_party/libjingle/source/talk/session/media/bundlefilter.cc114
-rwxr-xr-xchromium/third_party/libjingle/source/talk/session/media/bundlefilter.h80
-rwxr-xr-xchromium/third_party/libjingle/source/talk/session/media/bundlefilter_unittest.cc196
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/call.cc53
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/call.h26
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/channel.cc1114
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/channel.h136
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/channel_unittest.cc321
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/channelmanager.cc38
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/channelmanager.h11
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/channelmanager_unittest.cc23
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/currentspeakermonitor.cc43
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/currentspeakermonitor.h39
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/currentspeakermonitor_unittest.cc4
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/externalhmac.cc173
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/externalhmac.h90
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/mediamessages.cc7
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/mediasession.cc101
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/mediasession.h34
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/mediasession_unittest.cc104
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/mediasessionclient.cc10
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/mediasessionclient_unittest.cc6
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/planarfunctions_unittest.cc1010
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/srtpfilter.cc94
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/srtpfilter.h16
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/srtpfilter_unittest.cc30
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/ssrcmuxfilter.cc93
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/ssrcmuxfilter.h67
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/ssrcmuxfilter_unittest.cc184
-rw-r--r--chromium/third_party/libjingle/source/talk/session/media/yuvscaler_unittest.cc615
-rw-r--r--chromium/third_party/libjingle/source/talk/session/tunnel/pseudotcpchannel.cc3
-rw-r--r--chromium/third_party/libjingle/source/talk/session/tunnel/securetunnelsessionclient.cc16
-rw-r--r--chromium/third_party/libjingle/source/talk/site_scons/site_tools/talk_linux.py313
-rw-r--r--chromium/third_party/libjingle/source/talk/site_scons/site_tools/talk_noops.py20
-rw-r--r--chromium/third_party/libjingle/source/talk/site_scons/talk.py635
-rw-r--r--chromium/third_party/libjingle/source/talk/xmllite/xmlparser.cc5
-rw-r--r--chromium/third_party/libjingle/source/talk/xmllite/xmlparser.h3
-rw-r--r--chromium/third_party/libjingle/source/talk/xmpp/chatroommoduleimpl.cc9
-rw-r--r--chromium/third_party/libjingle/source/talk/xmpp/constants.cc7
-rw-r--r--chromium/third_party/libjingle/source/talk/xmpp/constants.h5
-rw-r--r--chromium/third_party/libjingle/source/talk/xmpp/hangoutpubsubclient.cc247
-rw-r--r--chromium/third_party/libjingle/source/talk/xmpp/hangoutpubsubclient.h25
-rw-r--r--chromium/third_party/libjingle/source/talk/xmpp/hangoutpubsubclient_unittest.cc6
-rw-r--r--chromium/third_party/libjingle/source/talk/xmpp/pubsubclient.cc9
-rw-r--r--chromium/third_party/libjingle/source/talk/xmpp/pubsubclient.h3
-rw-r--r--chromium/third_party/libjingle/source/talk/xmpp/pubsubstateclient.cc42
-rw-r--r--chromium/third_party/libjingle/source/talk/xmpp/pubsubstateclient.h287
-rw-r--r--chromium/third_party/libjingle/source/talk/xmpp/pubsubtasks.cc9
-rw-r--r--chromium/third_party/libjingle/source/talk/xmpp/pubsubtasks.h1
-rw-r--r--chromium/third_party/libjingle/source/talk/xmpp/rostermoduleimpl.cc4
-rw-r--r--chromium/third_party/libjingle/source/talk/xmpp/xmppengineimpl.cc3
-rw-r--r--chromium/third_party/libjingle/source/talk/xmpp/xmppengineimpl.h2
-rw-r--r--chromium/third_party/libjpeg/BUILD.gn79
-rw-r--r--chromium/third_party/libjpeg_turbo/ChangeLog.txt149
-rw-r--r--chromium/third_party/libjpeg_turbo/README36
-rw-r--r--chromium/third_party/libjpeg_turbo/README-turbo.txt337
-rw-r--r--chromium/third_party/libjpeg_turbo/README.chromium15
-rw-r--r--chromium/third_party/libjpeg_turbo/bmp.c6
-rw-r--r--chromium/third_party/libjpeg_turbo/bmp.h4
-rw-r--r--chromium/third_party/libjpeg_turbo/change.log18
-rw-r--r--chromium/third_party/libjpeg_turbo/cjpeg.c84
-rw-r--r--chromium/third_party/libjpeg_turbo/config.h15
-rw-r--r--chromium/third_party/libjpeg_turbo/djpeg.c54
-rw-r--r--chromium/third_party/libjpeg_turbo/google.jdmarker.patch25
-rw-r--r--chromium/third_party/libjpeg_turbo/google.patch75
-rw-r--r--chromium/third_party/libjpeg_turbo/jccolext.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/jccolor.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/jcdctmgr.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/jchuff.c39
-rw-r--r--chromium/third_party/libjpeg_turbo/jcmainct.c2
-rw-r--r--chromium/third_party/libjpeg_turbo/jcmarker.c114
-rw-r--r--chromium/third_party/libjpeg_turbo/jcmaster.c5
-rw-r--r--chromium/third_party/libjpeg_turbo/jconfig.h5
-rw-r--r--chromium/third_party/libjpeg_turbo/jcparam.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/jdapistd.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/jdatadst-tj.c12
-rw-r--r--chromium/third_party/libjpeg_turbo/jdatadst.c22
-rw-r--r--chromium/third_party/libjpeg_turbo/jdatasrc-tj.c15
-rw-r--r--chromium/third_party/libjpeg_turbo/jdatasrc.c19
-rw-r--r--chromium/third_party/libjpeg_turbo/jdcoefct.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/jdcolext.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/jdcolor.c88
-rw-r--r--chromium/third_party/libjpeg_turbo/jddctmgr.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/jdhuff.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/jdhuff.h3
-rw-r--r--chromium/third_party/libjpeg_turbo/jdinput.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/jdmainct.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/jdmarker.c18
-rw-r--r--chromium/third_party/libjpeg_turbo/jdmaster.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/jdmerge.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/jdmrgext.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/jdphuff.c1
-rw-r--r--chromium/third_party/libjpeg_turbo/jdsample.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/jmorecfg.h6
-rw-r--r--chromium/third_party/libjpeg_turbo/jpeglib.h9
-rw-r--r--chromium/third_party/libjpeg_turbo/jpegtran.c5
-rw-r--r--chromium/third_party/libjpeg_turbo/jquant1.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/jquant2.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/jversion.h15
-rw-r--r--chromium/third_party/libjpeg_turbo/libjpeg.gyp24
-rw-r--r--chromium/third_party/libjpeg_turbo/rdbmp.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/rdswitch.c3
-rw-r--r--chromium/third_party/libjpeg_turbo/simd/jdclrss2-64.asm8
-rw-r--r--chromium/third_party/libjpeg_turbo/simd/jdclrss2.asm9
-rw-r--r--chromium/third_party/libjpeg_turbo/simd/jdmrgss2-64.asm10
-rw-r--r--chromium/third_party/libjpeg_turbo/simd/jdmrgss2.asm9
-rw-r--r--chromium/third_party/libjpeg_turbo/simd/jsimd_arm.c2
-rw-r--r--chromium/third_party/libjpeg_turbo/simd/jsimd_arm_neon.S13
-rw-r--r--chromium/third_party/libjpeg_turbo/tjbench.c63
-rw-r--r--chromium/third_party/libjpeg_turbo/tjunittest.c66
-rw-r--r--chromium/third_party/libjpeg_turbo/transupp.c37
-rw-r--r--chromium/third_party/libjpeg_turbo/transupp.h17
-rw-r--r--chromium/third_party/libjpeg_turbo/turbojpeg-jni.c77
-rw-r--r--chromium/third_party/libjpeg_turbo/turbojpeg.c44
-rw-r--r--chromium/third_party/libjpeg_turbo/turbojpeg.h113
-rw-r--r--chromium/third_party/libjpeg_turbo/win/jconfig.h58
-rw-r--r--chromium/third_party/liblouis/liblouis_nacl.gyp190
-rw-r--r--chromium/third_party/liblouis/liblouis_untrusted.gyp186
-rw-r--r--chromium/third_party/libmtp/AUTHORS45
-rw-r--r--chromium/third_party/libmtp/COPYING504
-rw-r--r--chromium/third_party/libmtp/ChangeLog2939
-rw-r--r--chromium/third_party/libmtp/INSTALL306
-rw-r--r--chromium/third_party/libmtp/Makefile.am24
-rw-r--r--chromium/third_party/libmtp/Makefile.in839
-rw-r--r--chromium/third_party/libmtp/OWNERS2
-rw-r--r--chromium/third_party/libmtp/README1024
-rw-r--r--chromium/third_party/libmtp/README.chromium14
-rw-r--r--chromium/third_party/libmtp/README.windows.txt54
-rw-r--r--chromium/third_party/libmtp/TODO112
-rw-r--r--chromium/third_party/libmtp/aclocal.m42260
-rw-r--r--chromium/third_party/libmtp/config.guess1526
-rw-r--r--chromium/third_party/libmtp/config.h211
-rw-r--r--chromium/third_party/libmtp/config.h.in210
-rw-r--r--chromium/third_party/libmtp/config.sub1658
-rwxr-xr-xchromium/third_party/libmtp/configure17861
-rw-r--r--chromium/third_party/libmtp/configure.ac221
-rwxr-xr-xchromium/third_party/libmtp/depcomp688
-rw-r--r--chromium/third_party/libmtp/doc/Doxyfile.in1143
-rw-r--r--chromium/third_party/libmtp/doc/Makefile.am20
-rw-r--r--chromium/third_party/libmtp/doc/Makefile.in401
-rw-r--r--chromium/third_party/libmtp/doc/examples.h37
-rw-r--r--chromium/third_party/libmtp/doc/mainpage.h37
-rw-r--r--chromium/third_party/libmtp/examples/Makefile.am31
-rw-r--r--chromium/third_party/libmtp/examples/Makefile.in680
-rw-r--r--chromium/third_party/libmtp/examples/albumart.c171
-rw-r--r--chromium/third_party/libmtp/examples/albums.c114
-rw-r--r--chromium/third_party/libmtp/examples/common.h34
-rw-r--r--chromium/third_party/libmtp/examples/connect.c154
-rw-r--r--chromium/third_party/libmtp/examples/connect.h37
-rw-r--r--chromium/third_party/libmtp/examples/delfile.c114
-rw-r--r--chromium/third_party/libmtp/examples/detect.c291
-rw-r--r--chromium/third_party/libmtp/examples/emptyfolders.c112
-rwxr-xr-xchromium/third_party/libmtp/examples/evolution-sync.sh110
-rw-r--r--chromium/third_party/libmtp/examples/files.c118
-rw-r--r--chromium/third_party/libmtp/examples/filetree.c156
-rw-r--r--chromium/third_party/libmtp/examples/folders.c123
-rw-r--r--chromium/third_party/libmtp/examples/format.c86
-rw-r--r--chromium/third_party/libmtp/examples/getfile.c92
-rw-r--r--chromium/third_party/libmtp/examples/getplaylist.c93
-rw-r--r--chromium/third_party/libmtp/examples/newfolder.c73
-rw-r--r--chromium/third_party/libmtp/examples/newplaylist.c117
-rw-r--r--chromium/third_party/libmtp/examples/pathutils.c238
-rw-r--r--chromium/third_party/libmtp/examples/pathutils.h29
-rw-r--r--chromium/third_party/libmtp/examples/playlists.c82
-rw-r--r--chromium/third_party/libmtp/examples/reset.c85
-rw-r--r--chromium/third_party/libmtp/examples/sendfile.c102
-rw-r--r--chromium/third_party/libmtp/examples/sendtr.c449
-rw-r--r--chromium/third_party/libmtp/examples/thumb.c131
-rw-r--r--chromium/third_party/libmtp/examples/tracks.c147
-rw-r--r--chromium/third_party/libmtp/examples/trexist.c68
-rw-r--r--chromium/third_party/libmtp/examples/util.c68
-rw-r--r--chromium/third_party/libmtp/examples/util.h26
-rwxr-xr-xchromium/third_party/libmtp/hotplug.sh.in186
-rwxr-xr-xchromium/third_party/libmtp/install-sh527
-rw-r--r--chromium/third_party/libmtp/libmtp.gyp71
-rw-r--r--chromium/third_party/libmtp/libmtp.pc.in15
-rw-r--r--chromium/third_party/libmtp/libmtp.sh.in45
-rwxr-xr-xchromium/third_party/libmtp/ltmain.sh9654
-rw-r--r--chromium/third_party/libmtp/m4/byteorder.m4418
-rw-r--r--chromium/third_party/libmtp/m4/iconv.m4195
-rw-r--r--chromium/third_party/libmtp/m4/stdint.m4732
-rwxr-xr-xchromium/third_party/libmtp/missing331
-rw-r--r--chromium/third_party/libmtp/patches/00_disable_playlist.patch273
-rw-r--r--chromium/third_party/libmtp/patches/01_build_fixes.patch40
-rw-r--r--chromium/third_party/libmtp/patches/02_check_ptp_operation_support.patch98
-rw-r--r--chromium/third_party/libmtp/patches/03_enable_ptp_support.patch52
-rw-r--r--chromium/third_party/libmtp/patches/04_parse_extension_descriptor_null_check.patch15
-rw-r--r--chromium/third_party/libmtp/patches/05_improve_warning_formatting.patch24
-rw-r--r--chromium/third_party/libmtp/patches/06_disable_ptp_canon_eos_setdevicepropvalue.patch35
-rw-r--r--chromium/third_party/libmtp/patches/07_fix_strcpy_in_ptp_unpack_ptptime.patch27
-rw-r--r--chromium/third_party/libmtp/patches/08_add_licenses.patch124
-rw-r--r--chromium/third_party/libmtp/patches/09_do_not_build_udev_and_examples.patch573
-rw-r--r--chromium/third_party/libmtp/patches/10_remove_nexus_s_from_device_list.patch14
-rw-r--r--chromium/third_party/libmtp/patches/11_add_gyp_file_and_generated_headers.patch1489
-rw-r--r--chromium/third_party/libmtp/patches/12_check_for_libusb_init_failures.patch76
-rw-r--r--chromium/third_party/libmtp/patches/14_libusb1_header.patch13
-rw-r--r--chromium/third_party/libmtp/patches/15_read_chunks.patch99
-rw-r--r--chromium/third_party/libmtp/patches/16_fix_leaks.patch90
-rw-r--r--chromium/third_party/libmtp/patches/17_fix_leak_in_libmtp_release_device.patch12
-rw-r--r--chromium/third_party/libmtp/patches/18_add_owners_file.patch7
-rw-r--r--chromium/third_party/libmtp/src/Makefile.am79
-rw-r--r--chromium/third_party/libmtp/src/Makefile.in711
-rw-r--r--chromium/third_party/libmtp/src/README25
-rw-r--r--chromium/third_party/libmtp/src/_stdint.h2
-rw-r--r--chromium/third_party/libmtp/src/device-flags.h329
-rw-r--r--chromium/third_party/libmtp/src/gphoto2-endian.h124
-rw-r--r--chromium/third_party/libmtp/src/libmtp.c8956
-rw-r--r--chromium/third_party/libmtp/src/libmtp.h1028
-rw-r--r--chromium/third_party/libmtp/src/libmtp.h.in1029
-rw-r--r--chromium/third_party/libmtp/src/libmtp.sym105
-rw-r--r--chromium/third_party/libmtp/src/libopenusb1-glue.c2229
-rw-r--r--chromium/third_party/libmtp/src/libusb-glue.c2117
-rw-r--r--chromium/third_party/libmtp/src/libusb-glue.h183
-rw-r--r--chromium/third_party/libmtp/src/libusb1-glue.c2151
-rw-r--r--chromium/third_party/libmtp/src/mtpz.c1814
-rw-r--r--chromium/third_party/libmtp/src/mtpz.h51
-rw-r--r--chromium/third_party/libmtp/src/music-players.h1900
-rw-r--r--chromium/third_party/libmtp/src/playlist-spl.c848
-rw-r--r--chromium/third_party/libmtp/src/playlist-spl.h35
-rw-r--r--chromium/third_party/libmtp/src/ptp-pack.c2084
-rw-r--r--chromium/third_party/libmtp/src/ptp.c5711
-rw-r--r--chromium/third_party/libmtp/src/ptp.h2922
-rw-r--r--chromium/third_party/libmtp/src/unicode.c174
-rw-r--r--chromium/third_party/libmtp/src/unicode.h40
-rw-r--r--chromium/third_party/libmtp/src/util.c125
-rw-r--r--chromium/third_party/libmtp/src/util.h55
-rw-r--r--chromium/third_party/libmtp/util/Makefile.am11
-rw-r--r--chromium/third_party/libmtp/util/Makefile.in386
-rw-r--r--chromium/third_party/libmtp/util/mtp-hotplug.c275
-rw-r--r--chromium/third_party/libmtp/util/mtp-probe.c79
-rw-r--r--chromium/third_party/libpng/BUILD.gn66
-rw-r--r--chromium/third_party/libsrtp/README.chromium4
-rw-r--r--chromium/third_party/libsrtp/libsrtp.gyp4
-rw-r--r--chromium/third_party/libsrtp/srtp/srtp.def1
-rw-r--r--chromium/third_party/libusb/BUILD.gn113
-rw-r--r--chromium/third_party/libusb/README.chromium1
-rw-r--r--chromium/third_party/libusb/libusb.gyp1
-rw-r--r--chromium/third_party/libusb/src/libusb/os/darwin_usb.c2
-rw-r--r--chromium/third_party/libusb/upstream-tick147.patch13
-rw-r--r--chromium/third_party/libva/BUILD.gn8
-rw-r--r--chromium/third_party/libva/OWNERS1
-rw-r--r--chromium/third_party/libvpx/README.chromium8
-rw-r--r--chromium/third_party/libvpx/WATCHLISTS22
-rwxr-xr-xchromium/third_party/libvpx/copy_obj.py32
-rwxr-xr-xchromium/third_party/libvpx/copy_obj.sh36
-rwxr-xr-xchromium/third_party/libvpx/generate_gypi.sh153
-rw-r--r--chromium/third_party/libvpx/include/elf.h445
-rw-r--r--chromium/third_party/libvpx/libvpx.gyp398
-rw-r--r--chromium/third_party/libvpx/libvpx_nacl.gyp36
-rw-r--r--chromium/third_party/libvpx/libvpx_srcs_arm.gypi154
-rw-r--r--chromium/third_party/libvpx/libvpx_srcs_arm64.gypi325
-rw-r--r--chromium/third_party/libvpx/libvpx_srcs_arm_neon.gypi213
-rw-r--r--chromium/third_party/libvpx/libvpx_srcs_arm_neon_cpu_detect.gypi202
-rw-r--r--chromium/third_party/libvpx/libvpx_srcs_arm_neon_cpu_detect_intrinsics.gypi47
-rw-r--r--chromium/third_party/libvpx/libvpx_srcs_generic.gypi304
-rw-r--r--chromium/third_party/libvpx/libvpx_srcs_mips.gypi145
-rw-r--r--chromium/third_party/libvpx/libvpx_srcs_nacl.gypi145
-rw-r--r--chromium/third_party/libvpx/libvpx_srcs_x86.gypi164
-rw-r--r--chromium/third_party/libvpx/libvpx_srcs_x86_64.gypi168
-rw-r--r--chromium/third_party/libvpx/libvpx_srcs_x86_64_intrinsics.gypi27
-rw-r--r--chromium/third_party/libvpx/libvpx_srcs_x86_intrinsics.gypi27
-rw-r--r--chromium/third_party/libvpx/libvpx_untrusted.gyp36
-rwxr-xr-xchromium/third_party/libvpx/lint_config.sh1
-rw-r--r--chromium/third_party/libvpx/obj_int_extract.gypi61
-rwxr-xr-xchromium/third_party/libvpx/obj_int_extract.py31
-rwxr-xr-xchromium/third_party/libvpx/obj_int_extract.sh30
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp8_rtcd.h860
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp9_rtcd.h814
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_config.asm11
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_config.c2
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_config.h11
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_scale_rtcd.h60
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm-neon/vp8_rtcd.h534
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm-neon/vp9_rtcd.h748
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm-neon/vpx_config.asm11
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm-neon/vpx_config.c2
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm-neon/vpx_config.h11
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm-neon/vpx_scale_rtcd.h46
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm/vp8_rtcd.h443
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm/vp9_rtcd.h687
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm/vpx_config.asm11
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm/vpx_config.c2
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm/vpx_config.h11
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm/vpx_scale_rtcd.h43
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm64/vp8_rtcd.h378
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm64/vp9_rtcd.h671
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm64/vpx_config.asm84
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm64/vpx_config.c9
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm64/vpx_config.h93
-rw-r--r--chromium/third_party/libvpx/source/config/linux/arm64/vpx_scale_rtcd.h71
-rw-r--r--chromium/third_party/libvpx/source/config/linux/generic/vp8_rtcd.h340
-rw-r--r--chromium/third_party/libvpx/source/config/linux/generic/vp9_rtcd.h666
-rw-r--r--chromium/third_party/libvpx/source/config/linux/generic/vpx_config.asm84
-rw-r--r--chromium/third_party/libvpx/source/config/linux/generic/vpx_config.c9
-rw-r--r--chromium/third_party/libvpx/source/config/linux/generic/vpx_config.h93
-rw-r--r--chromium/third_party/libvpx/source/config/linux/generic/vpx_scale_rtcd.h66
-rw-r--r--chromium/third_party/libvpx/source/config/linux/ia32/vp8_rtcd.h1116
-rw-r--r--chromium/third_party/libvpx/source/config/linux/ia32/vp9_rtcd.h1357
-rw-r--r--chromium/third_party/libvpx/source/config/linux/ia32/vpx_config.asm11
-rw-r--r--chromium/third_party/libvpx/source/config/linux/ia32/vpx_config.c2
-rw-r--r--chromium/third_party/libvpx/source/config/linux/ia32/vpx_config.h11
-rw-r--r--chromium/third_party/libvpx/source/config/linux/ia32/vpx_scale_rtcd.h42
-rw-r--r--chromium/third_party/libvpx/source/config/linux/mipsel/vp8_rtcd.h377
-rw-r--r--chromium/third_party/libvpx/source/config/linux/mipsel/vp9_rtcd.h687
-rw-r--r--chromium/third_party/libvpx/source/config/linux/mipsel/vpx_config.c2
-rw-r--r--chromium/third_party/libvpx/source/config/linux/mipsel/vpx_config.h9
-rw-r--r--chromium/third_party/libvpx/source/config/linux/mipsel/vpx_scale_rtcd.h43
-rw-r--r--chromium/third_party/libvpx/source/config/linux/x64/vp8_rtcd.h832
-rw-r--r--chromium/third_party/libvpx/source/config/linux/x64/vp9_rtcd.h1066
-rw-r--r--chromium/third_party/libvpx/source/config/linux/x64/vpx_config.asm11
-rw-r--r--chromium/third_party/libvpx/source/config/linux/x64/vpx_config.c2
-rw-r--r--chromium/third_party/libvpx/source/config/linux/x64/vpx_config.h11
-rw-r--r--chromium/third_party/libvpx/source/config/linux/x64/vpx_scale_rtcd.h42
-rw-r--r--chromium/third_party/libvpx/source/config/mac/ia32/vp8_rtcd.h1116
-rw-r--r--chromium/third_party/libvpx/source/config/mac/ia32/vp9_rtcd.h924
-rw-r--r--chromium/third_party/libvpx/source/config/mac/ia32/vpx_config.asm11
-rw-r--r--chromium/third_party/libvpx/source/config/mac/ia32/vpx_config.c2
-rw-r--r--chromium/third_party/libvpx/source/config/mac/ia32/vpx_config.h11
-rw-r--r--chromium/third_party/libvpx/source/config/mac/ia32/vpx_scale_rtcd.h42
-rw-r--r--chromium/third_party/libvpx/source/config/mac/x64/vp8_rtcd.h832
-rw-r--r--chromium/third_party/libvpx/source/config/mac/x64/vp9_rtcd.h1066
-rw-r--r--chromium/third_party/libvpx/source/config/mac/x64/vpx_config.asm11
-rw-r--r--chromium/third_party/libvpx/source/config/mac/x64/vpx_config.c2
-rw-r--r--chromium/third_party/libvpx/source/config/mac/x64/vpx_config.h11
-rw-r--r--chromium/third_party/libvpx/source/config/mac/x64/vpx_scale_rtcd.h42
-rw-r--r--chromium/third_party/libvpx/source/config/nacl/vp8_rtcd.h373
-rw-r--r--chromium/third_party/libvpx/source/config/nacl/vp9_rtcd.h687
-rw-r--r--chromium/third_party/libvpx/source/config/nacl/vpx_config.asm9
-rw-r--r--chromium/third_party/libvpx/source/config/nacl/vpx_config.c2
-rw-r--r--chromium/third_party/libvpx/source/config/nacl/vpx_config.h9
-rw-r--r--chromium/third_party/libvpx/source/config/nacl/vpx_scale_rtcd.h43
-rw-r--r--chromium/third_party/libvpx/source/config/vpx_version.h6
-rw-r--r--chromium/third_party/libvpx/source/config/win/ia32/vp8_rtcd.h1116
-rw-r--r--chromium/third_party/libvpx/source/config/win/ia32/vp9_rtcd.h1357
-rw-r--r--chromium/third_party/libvpx/source/config/win/ia32/vpx_config.asm11
-rw-r--r--chromium/third_party/libvpx/source/config/win/ia32/vpx_config.c2
-rw-r--r--chromium/third_party/libvpx/source/config/win/ia32/vpx_config.h11
-rw-r--r--chromium/third_party/libvpx/source/config/win/ia32/vpx_scale_rtcd.h42
-rw-r--r--chromium/third_party/libvpx/source/config/win/x64/vp8_rtcd.h832
-rw-r--r--chromium/third_party/libvpx/source/config/win/x64/vp9_rtcd.h1066
-rw-r--r--chromium/third_party/libvpx/source/config/win/x64/vpx_config.asm11
-rw-r--r--chromium/third_party/libvpx/source/config/win/x64/vpx_config.c2
-rw-r--r--chromium/third_party/libvpx/source/config/win/x64/vpx_config.h11
-rw-r--r--chromium/third_party/libvpx/source/config/win/x64/vpx_scale_rtcd.h42
-rw-r--r--chromium/third_party/libvpx/source/libvpx/.mailmap10
-rw-r--r--chromium/third_party/libvpx/source/libvpx/AUTHORS35
-rw-r--r--chromium/third_party/libvpx/source/libvpx/CHANGELOG50
-rw-r--r--chromium/third_party/libvpx/source/libvpx/README19
-rw-r--r--chromium/third_party/libvpx/source/libvpx/args.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/build/arm-msvs/obj_int_extract.bat8
-rw-r--r--chromium/third_party/libvpx/source/libvpx/build/make/Android.mk67
-rw-r--r--chromium/third_party/libvpx/source/libvpx/build/make/Makefile31
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/build/make/ads2armasm_ms.pl3
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/build/make/ads2gas.pl2
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/build/make/ads2gas_apple.pl42
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/build/make/configure.sh135
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/build/make/gen_msvs_proj.sh119
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/build/make/gen_msvs_sln.sh7
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/build/make/gen_msvs_vcxproj.sh191
-rw-r--r--chromium/third_party/libvpx/source/libvpx/build/make/msvs_common.sh98
-rw-r--r--chromium/third_party/libvpx/source/libvpx/build/make/obj_int_extract.c36
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/build/make/rtcd.pl420
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/build/make/rtcd.sh363
-rw-r--r--chromium/third_party/libvpx/source/libvpx/build/make/thumb.pm6
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/build/make/version.sh4
-rw-r--r--chromium/third_party/libvpx/source/libvpx/build/x86-msvs/obj_int_extract.bat5
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/configure79
-rw-r--r--chromium/third_party/libvpx/source/libvpx/docs.mk7
-rw-r--r--chromium/third_party/libvpx/source/libvpx/example_xma.c191
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples.mk236
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/decode_to_md5.c139
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/decode_to_md5.txt48
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/decode_with_drops.c154
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/decode_with_drops.txt73
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/decode_with_partial_drops.txt238
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/decoder_tmpl.c104
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/decoder_tmpl.txt62
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/encoder_tmpl.c186
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/encoder_tmpl.txt74
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/error_resilient.txt25
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/force_keyframe.txt28
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/examples/gen_example_code.sh85
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/examples/gen_example_doxy.php224
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/examples/gen_example_text.sh84
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/ASCIIMathPHP-2.0/ASCIIMathPHP-2.0.cfg.php218
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/ASCIIMathPHP-2.0/ASCIIMathPHP-2.0.class.php1119
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/ASCIIMathPHP-2.0/htmlMathML.js86
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/.gitattributes1
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/Changes26
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/MANIFEST26
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/Makefile.PL8
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/Toc.pm549
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/Toc.pod1710
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/TocGenerator.pm1793
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/TocInsertor.pm1066
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/TocUpdator.pm693
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/ManualTest/manualTest1.htm92
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/SiteMap/SubDir1/SubSubDir1/index.htm5
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/SiteMap/SubDir1/index.htm5
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/SiteMap/SubDir2/SubSubDir1/index.htm5
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/SiteMap/SubDir2/SubSubDir2/index.htm5
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/SiteMap/SubDir2/index.htm5
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/SiteMap/SubDir3/index.htm5
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/SiteMap/index.htm5
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/extend.t87
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/format.t157
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/generate.t200
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/insert.t336
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/manualTest.t768
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/options.t194
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/podExamples.t709
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/propagate.t176
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/siteMap.t97
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/HTML-Toc-0.91/t/update.t114
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/PHP-Markdown-Extra-1.2.3/License.text36
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/PHP-Markdown-Extra-1.2.3/PHP Markdown Extra Readme.text731
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/PHP-Markdown-Extra-1.2.3/markdown.php2909
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/PHP-SmartyPants-1.5.1e/PHP SmartyPants Readme.txt394
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/PHP-SmartyPants-1.5.1e/smartypants.php860
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/contrib/aliased.php124
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/contrib/cssgen.php456
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/contrib/cssgen2.php59
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/contrib/example.php217
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/contrib/langcheck.php666
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/BUGS29
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/CHANGES682
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/COPYING340
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/README33
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/THANKS163
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/TODO71
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/__filesource/fsource_geshi_core_geshi.php.html4616
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/blank.html13
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/classtrees_geshi.html24
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/elementindex.html867
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/elementindex_geshi.html864
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/errors.html20
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/geshi/core/GeSHi.html2676
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/geshi/core/_geshi.php.html478
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/index.html24
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/li_geshi.html46
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/banner.css33
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/AbstractClass.pngbin620 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/AbstractClass_logo.pngbin1232 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/AbstractMethod.pngbin696 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/AbstractPrivateClass.pngbin848 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/AbstractPrivateClass_logo.pngbin1615 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/AbstractPrivateMethod.pngbin874 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Class.pngbin570 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Class_logo.pngbin1600 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Constant.pngbin752 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Constructor.pngbin865 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Destructor.pngbin956 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Function.pngbin596 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Global.pngbin712 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/I.pngbin148 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Index.pngbin584 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Interface.pngbin1083 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Interface_logo.pngbin1600 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/L.pngbin153 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Lminus.pngbin219 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Lplus.pngbin224 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Method.pngbin661 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Page.pngbin592 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Page_logo.pngbin1369 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/PrivateClass.pngbin790 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/PrivateClass_logo.pngbin1836 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/PrivateMethod.pngbin918 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/PrivateVariable.pngbin772 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/StaticMethod.pngbin661 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/StaticVariable.pngbin688 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/T.pngbin152 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Tminus.pngbin207 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Tplus.pngbin222 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/Variable.pngbin688 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/blank.pngbin144 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/class_folder.pngbin633 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/empty.pngbin90 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/file.pngbin462 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/folder.pngbin492 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/function_folder.pngbin605 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/next_button.pngbin657 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/next_button_disabled.pngbin543 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/package.pngbin668 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/package_folder.pngbin564 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/previous_button.pngbin644 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/previous_button_disabled.pngbin541 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/private_class_logo.pngbin1836 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/tutorial.pngbin431 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/tutorial_folder.pngbin572 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/images/up_button.pngbin668 -> 0 bytes
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/media/stylesheet.css145
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/packages.html29
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/api/todolist.html42
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/geshi-doc.html4051
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/geshi-doc.txt1740
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/docs/phpdoc.ini90
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi.php4619
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/abap.php1419
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/actionscript.php197
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/actionscript3.php467
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/ada.php133
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/apache.php206
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/applescript.php157
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/apt_sources.php144
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/asm.php225
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/asp.php164
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/autoit.php1171
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/avisynth.php194
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/bash.php282
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/basic4gl.php341
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/bf.php114
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/blitzbasic.php185
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/bnf.php110
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/boo.php217
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/c.php188
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/c_mac.php212
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/caddcl.php126
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/cadlisp.php186
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/cfdg.php124
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/cfm.php299
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/cil.php196
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/cobol.php244
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/cpp-qt.php315
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/cpp.php226
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/csharp.php249
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/css.php212
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/d.php272
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/dcs.php185
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/delphi.php289
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/diff.php196
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/div.php126
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/dos.php198
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/dot.php164
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/eiffel.php395
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/email.php209
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/fortran.php160
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/freebasic.php141
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/genero.php463
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/gettext.php97
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/glsl.php205
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/gml.php506
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/gnuplot.php296
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/groovy.php1011
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/haskell.php198
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/hq9plus.php104
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/html4strict.php203
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/idl.php123
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/ini.php128
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/inno.php212
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/intercal.php122
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/io.php138
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/java.php983
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/java5.php1031
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/javascript.php150
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/kixtart.php329
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/klonec.php282
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/klonecpp.php310
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/latex.php209
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/lisp.php144
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/locobasic.php130
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/lolcode.php152
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/lotusformulas.php318
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/lotusscript.php191
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/lscript.php387
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/lsl2.php898
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/lua.php137
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/m68k.php143
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/make.php151
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/matlab.php227
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/mirc.php173
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/modula3.php135
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/mpasm.php164
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/mxml.php145
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/mysql.php475
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/nsis.php351
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/objc.php358
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/ocaml-brief.php112
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/ocaml.php174
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/oobas.php135
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/oracle11.php614
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/oracle8.php496
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/pascal.php152
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/per.php302
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/perl.php213
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/php-brief.php202
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/php.php1094
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/pic16.php141
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/pixelbender.php176
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/plsql.php256
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/povray.php199
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/powershell.php279
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/progress.php479
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/prolog.php143
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/providex.php299
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/python.php237
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/qbasic.php151
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/rails.php406
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/rebol.php196
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/reg.php233
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/robots.php98
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/ruby.php226
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/sas.php290
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/scala.php122
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/scheme.php170
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/scilab.php295
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/sdlbasic.php165
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/smalltalk.php160
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/smarty.php192
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/sql.php140
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/tcl.php194
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/teraterm.php317
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/text.php84
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/thinbasic.php868
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/tsql.php378
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/typoscript.php300
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/vb.php133
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/vbnet.php201
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/verilog.php173
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/vhdl.php144
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/vim.php185
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/visualfoxpro.php456
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/visualprolog.php129
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/whitespace.php121
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/winbatch.php369
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/xml.php157
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/xorg_conf.php124
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/xpp.php436
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/geshi/geshi/z80.php144
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/includes/vp8_doc_tools.php207
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/postproc.c140
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/postproc.txt67
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/resize_util.c120
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/set_maps.c245
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/simple_decoder.c158
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/simple_decoder.txt96
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/simple_encoder.c252
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/simple_encoder.txt105
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/twopass_encoder.c230
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/twopass_encoder.txt87
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/vp8_multi_resolution_encoder.c471
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/vp8_set_maps.txt96
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/vp8cx_set_ref.c187
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/vp8cx_set_ref.txt73
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/vp9_spatial_svc_encoder.c391
-rw-r--r--chromium/third_party/libvpx/source/libvpx/examples/vpx_temporal_svc_encoder.c667
-rw-r--r--chromium/third_party/libvpx/source/libvpx/ivfdec.c112
-rw-r--r--chromium/third_party/libvpx/source/libvpx/ivfdec.h28
-rw-r--r--chromium/third_party/libvpx/source/libvpx/ivfenc.c53
-rw-r--r--chromium/third_party/libvpx/source/libvpx/ivfenc.h35
-rw-r--r--chromium/third_party/libvpx/source/libvpx/libs.mk65
-rw-r--r--chromium/third_party/libvpx/source/libvpx/md5_utils.h14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/nestegg/AUTHORS1
-rw-r--r--chromium/third_party/libvpx/source/libvpx/nestegg/Makefile.am51
-rw-r--r--chromium/third_party/libvpx/source/libvpx/nestegg/configure.ac124
-rw-r--r--chromium/third_party/libvpx/source/libvpx/nestegg/docs/Doxyfile.in1551
-rw-r--r--chromium/third_party/libvpx/source/libvpx/nestegg/docs/Makefile.am38
-rw-r--r--chromium/third_party/libvpx/source/libvpx/nestegg/halloc/src/halloc.c254
-rw-r--r--chromium/third_party/libvpx/source/libvpx/nestegg/include/nestegg/nestegg.h293
-rw-r--r--chromium/third_party/libvpx/source/libvpx/nestegg/m4/as-ac-expand.m443
-rw-r--r--chromium/third_party/libvpx/source/libvpx/nestegg/m4/ax_create_stdint_h.m4695
-rw-r--r--chromium/third_party/libvpx/source/libvpx/nestegg/m4/pkg.m4157
-rw-r--r--chromium/third_party/libvpx/source/libvpx/nestegg/nestegg-uninstalled.pc.in13
-rw-r--r--chromium/third_party/libvpx/source/libvpx/nestegg/nestegg.pc.in13
-rw-r--r--chromium/third_party/libvpx/source/libvpx/nestegg/src/nestegg.c1942
-rw-r--r--chromium/third_party/libvpx/source/libvpx/rate_hist.c282
-rw-r--r--chromium/third_party/libvpx/source/libvpx/rate_hist.h40
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/googletest/README.libvpx (renamed from chromium/third_party/libvpx/source/libvpx/third_party/googletest/README.webm)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libmkv/EbmlBufferWriter.c2
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libmkv/Makefile18
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libmkv/WebMElement.c23
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libmkv/WebMElement.h27
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/AUTHORS.TXT4
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/Android.mk11
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/LICENSE.TXT30
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/PATENTS.TXT22
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/README.libvpx7
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/RELEASE.TXT34
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/mkvmuxer.cpp3075
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/mkvmuxer.hpp1356
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/mkvmuxertypes.hpp30
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/mkvmuxerutil.cpp724
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/mkvmuxerutil.hpp137
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/mkvparser.cpp8358
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/mkvparser.hpp945
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/mkvreader.cpp132
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/mkvreader.hpp45
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/mkvwriter.cpp90
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/mkvwriter.hpp51
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libwebm/webmids.hpp141
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libyuv/README.libvpx (renamed from chromium/third_party/libvpx/source/libvpx/third_party/libyuv/README.webm)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libyuv/include/libyuv/scale.h4
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/libyuv/source/scale.c20
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/nestegg/0001-include-paths.diff41
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/nestegg/0002-ne_read_simple-uninitialized_variable.diff21
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/nestegg/AUTHORS3
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/nestegg/INSTALL (renamed from chromium/third_party/libvpx/source/libvpx/nestegg/INSTALL)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/nestegg/LICENSE (renamed from chromium/third_party/libvpx/source/libvpx/nestegg/LICENSE)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/nestegg/README (renamed from chromium/third_party/libvpx/source/libvpx/nestegg/README)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/nestegg/README.libvpx24
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/nestegg/TODO (renamed from chromium/third_party/libvpx/source/libvpx/nestegg/TODO)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/nestegg/halloc/README (renamed from chromium/third_party/libvpx/source/libvpx/nestegg/halloc/README)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/nestegg/halloc/halloc.h (renamed from chromium/third_party/libvpx/source/libvpx/nestegg/halloc/halloc.h)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/nestegg/halloc/src/align.h (renamed from chromium/third_party/libvpx/source/libvpx/nestegg/halloc/src/align.h)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/nestegg/halloc/src/halloc.c254
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/nestegg/halloc/src/hlist.h (renamed from chromium/third_party/libvpx/source/libvpx/nestegg/halloc/src/hlist.h)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/nestegg/halloc/src/macros.h (renamed from chromium/third_party/libvpx/source/libvpx/nestegg/halloc/src/macros.h)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/nestegg/include/nestegg/nestegg.h353
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/nestegg/src/nestegg.c2323
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/x86inc/README.libvpx (renamed from chromium/third_party/libvpx/source/libvpx/third_party/x86inc/README.webm)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/third_party/x86inc/x86inc.asm24
-rwxr-xr-x[-rw-r--r--]chromium/third_party/libvpx/source/libvpx/tools/all_builds.py0
-rwxr-xr-x[-rw-r--r--]chromium/third_party/libvpx/source/libvpx/tools/cpplint.py1372
-rw-r--r--chromium/third_party/libvpx/source/libvpx/tools/diff.py3
-rwxr-xr-x[-rw-r--r--]chromium/third_party/libvpx/source/libvpx/tools/lint-hunks.py0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/tools_common.c240
-rw-r--r--chromium/third_party/libvpx/source/libvpx/tools_common.h135
-rw-r--r--chromium/third_party/libvpx/source/libvpx/video_common.h23
-rw-r--r--chromium/third_party/libvpx/source/libvpx/video_reader.c83
-rw-r--r--chromium/third_party/libvpx/source/libvpx/video_reader.h52
-rw-r--r--chromium/third_party/libvpx/source/libvpx/video_writer.c80
-rw-r--r--chromium/third_party/libvpx/source/libvpx/video_writer.h47
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/alloccommon.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/armv6/vp8_variance16x16_armv6.asm8
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/armv6/vp8_variance8x8_armv6.asm4
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/armv6/vp8_variance_halfpixvar16x16_h_armv6.asm8
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/armv6/vp8_variance_halfpixvar16x16_hv_armv6.asm8
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/armv6/vp8_variance_halfpixvar16x16_v_armv6.asm8
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/bilinearfilter_arm.h14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/dequantize_arm.c17
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/loopfilter_arm.c14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/bilinearpredict16x16_neon.asm357
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/bilinearpredict4x4_neon.asm130
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/bilinearpredict8x4_neon.asm135
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/bilinearpredict8x8_neon.asm183
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/bilinearpredict_neon.c696
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/buildintrapredictorsmby_neon.asm19
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/copymem16x16_neon.asm59
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/copymem8x4_neon.asm34
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/copymem8x8_neon.asm43
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/copymem_neon.c59
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/dc_only_idct_add_neon.asm54
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/dc_only_idct_add_neon.c42
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/dequant_idct_neon.asm131
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/dequant_idct_neon.c142
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/dequantizeb_neon.asm34
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/dequantizeb_neon.c25
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/idct_dequant_0_2x_neon.asm2
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/idct_dequant_full_2x_neon.asm3
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/iwalsh_neon.asm87
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/iwalsh_neon.c102
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/loopfilter_neon.asm24
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/loopfiltersimplehorizontaledge_neon.asm117
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/loopfiltersimplehorizontaledge_neon.c111
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/loopfiltersimpleverticaledge_neon.asm4
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/mbloopfilter_neon.asm469
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/mbloopfilter_neon.c625
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/sad16_neon.asm207
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/sad8_neon.asm209
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/sad_neon.c184
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/save_reg_neon.asm36
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/shortidct4x4llm_neon.asm139
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/shortidct4x4llm_neon.c123
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/sixtappredict16x16_neon.asm490
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/sixtappredict4x4_neon.asm422
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/sixtappredict8x4_neon.asm473
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/sixtappredict8x8_neon.asm524
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/sixtappredict_neon.c1752
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/variance_neon.asm276
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/variance_neon.c323
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/vp8_subpixelvariance16x16_neon.asm8
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/vp8_subpixelvariance16x16s_neon.asm23
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/neon/vp8_subpixelvariance8x8_neon.asm9
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/reconintra_arm.c2
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/arm/variance_arm.c2
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/blockd.h14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/coefupdateprobs.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/common.h17
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/default_coef_probs.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/entropy.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/entropymode.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/entropymv.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/extend.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/filter.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/findnearmv.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/header.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/invtrans.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/loopfilter.c1
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/loopfilter.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/modecont.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/mv.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/onyx.h10
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/onyxc_int.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/onyxd.h6
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/postproc.c11
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/postproc.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/ppflags.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/pragmas.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/quant_common.h13
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/reconinter.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/reconintra4x4.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/rtcd_defs.pl561
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/vp8/common/rtcd_defs.sh542
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/setupintrarecon.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/swapyv12buffer.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/systemdependent.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/threading.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/treecoder.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/variance.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/vp8_entropymodedata.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/x86/filter_x86.h14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/x86/loopfilter_mmx.asm4
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/x86/loopfilter_sse2.asm4
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/x86/postproc_mmx.asm7
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/x86/postproc_sse2.asm7
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/common/x86/recon_sse2.asm79
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/decoder/dboolhuff.c7
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/decoder/dboolhuff.h25
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/decoder/decodeframe.c1397
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/decoder/decodemv.h14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/decoder/decoderthreading.h14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/decoder/decodframe.c1398
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/decoder/detokenize.h14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/decoder/ec_types.h14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/decoder/error_concealment.c4
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/decoder/error_concealment.h14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/decoder/onyxd_if.c27
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/decoder/onyxd_int.h16
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/decoder/treereader.h14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/arm/neon/denoising_neon.c161
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/arm/neon/subtract_neon.asm14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/arm/neon/vp8_memcpy_neon.asm2
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/arm/neon/vp8_mse16x16_neon.asm9
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/bitstream.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/block.h13
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/boolhuff.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/dct_value_cost.h13
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/dct_value_tokens.h13
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/defaultcoefcounts.h13
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/denoising.c71
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/denoising.h11
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/encodeframe.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/encodeintra.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/encodemb.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/encodemv.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/firstpass.c16
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/firstpass.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/lookahead.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/mcomp.c1
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/mcomp.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/modecosts.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/mr_dissim.c1
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/mr_dissim.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/onyx_if.c160
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/onyx_int.h15
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/pickinter.c2
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/pickinter.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/psnr.c31
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/psnr.h17
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/quantize.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/ratectrl.c24
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/ratectrl.h11
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/rdopt.c9
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/rdopt.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/segmentation.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/temporal_filter.c4
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/tokenize.c12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/tokenize.h14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/treewriter.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/x86/denoising_sse2.c33
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/x86/quantize_ssse3.asm138
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/encoder/x86/quantize_ssse3.c114
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/vp8_common.mk60
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/vp8_cx_iface.c10
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/vp8_dx_iface.c242
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/vp8cx.mk4
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/vp8cx_arm.mk16
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8/vp8dx.mk2
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8_multi_resolution_encoder.c485
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp8_scalable_patterns.c694
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_idct16x16_1_add_neon.asm (renamed from chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_short_idct16x16_1_add_neon.asm)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_idct16x16_add_neon.asm (renamed from chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_short_idct16x16_add_neon.asm)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_idct32x32_1_add_neon.asm144
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_idct32x32_add_neon.asm1299
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_idct4x4_1_add_neon.asm (renamed from chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_short_idct4x4_1_add_neon.asm)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_idct4x4_add_neon.asm (renamed from chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_short_idct4x4_add_neon.asm)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_idct8x8_1_add_neon.asm (renamed from chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_short_idct8x8_1_add_neon.asm)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_idct8x8_add_neon.asm519
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_iht4x4_add_neon.asm (renamed from chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_short_iht4x4_add_neon.asm)0
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_iht8x8_add_neon.asm698
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_loopfilter_16_neon.asm199
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_loopfilter_16_neon.c52
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_loopfilter_neon.asm70
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_mb_lpf_neon.asm33
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_reconintra_neon.asm634
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_short_idct32x32_add_neon.asm1299
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_short_idct8x8_add_neon.asm519
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/arm/neon/vp9_short_iht8x8_add_neon.asm696
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/generic/vp9_systemdependent.c19
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/mips/dspr2/vp9_common_dspr2.h18
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/mips/dspr2/vp9_intrapred16_dspr2.c332
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/mips/dspr2/vp9_intrapred4_dspr2.c232
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/mips/dspr2/vp9_intrapred8_dspr2.c610
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/mips/dspr2/vp9_itrans16_dspr2.c34
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/mips/dspr2/vp9_itrans32_cols_dspr2.c4
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/mips/dspr2/vp9_itrans32_dspr2.c71
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/mips/dspr2/vp9_itrans4_dspr2.c26
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/mips/dspr2/vp9_itrans8_dspr2.c36
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/mips/dspr2/vp9_loopfilter_filters_dspr2.c362
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/mips/dspr2/vp9_loopfilter_filters_dspr2.h763
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/mips/dspr2/vp9_loopfilter_macros_dspr2.h478
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/mips/dspr2/vp9_loopfilter_masks_dspr2.h373
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/mips/dspr2/vp9_mbloop_loopfilter_dspr2.c652
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/mips/dspr2/vp9_mblpf_horiz_loopfilter_dspr2.c795
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/mips/dspr2/vp9_mblpf_vert_loopfilter_dspr2.c840
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_alloccommon.c237
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_alloccommon.h23
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_blockd.c155
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_blockd.h395
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_common.h23
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_common_data.c32
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_common_data.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_convolve.c283
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_convolve.h8
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_debugmodes.c19
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_default_coef_probs.h699
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_entropy.c706
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_entropy.h141
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_entropymode.c225
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_entropymode.h72
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_entropymv.c128
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_entropymv.h36
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_enums.h54
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_extend.c143
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_extend.h25
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_filter.c39
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_filter.h34
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_findnearmv.c85
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_findnearmv.h72
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_frame_buffers.c81
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_frame_buffers.h53
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_idct.c131
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_idct.h14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_loopfilter.c751
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_loopfilter.h58
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_loopfilter_filters.c128
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_mv.h16
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_mvref_common.c195
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_mvref_common.h53
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_onyx.h234
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_onyxc_int.h263
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_postproc.c625
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_postproc.h13
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_ppflags.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_pragmas.h8
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_pred_common.c358
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_pred_common.h129
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_prob.c61
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_prob.h93
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_quant_common.c9
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_quant_common.h11
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_reconinter.c406
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_reconinter.h89
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_reconintra.c154
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_reconintra.h17
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_rtcd_defs.pl780
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/vp9/common/vp9_rtcd_defs.sh744
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_sadmxn.h38
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_scale.c141
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_scale.h38
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_scan.c164
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_scan.h187
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_seg_common.c10
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_seg_common.h18
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_systemdependent.h53
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_tapify.py106
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_textblit.h8
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_tile_common.c55
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_tile_common.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_treecoder.c74
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/vp9_treecoder.h102
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/x86/vp9_asm_stubs.c693
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/x86/vp9_copy_sse2.asm12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/x86/vp9_idct_intrin_sse2.c2521
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/x86/vp9_idct_ssse3.asm300
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/x86/vp9_loopfilter_intrin_avx2.c943
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/x86/vp9_loopfilter_intrin_sse2.c880
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/x86/vp9_loopfilter_mmx.asm14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/x86/vp9_postproc_x86.h8
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/x86/vp9_subpixel_8t_intrin_avx2.c544
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/x86/vp9_subpixel_8t_intrin_ssse3.c490
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/x86/vp9_subpixel_8t_ssse3.asm89
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/x86/vp9_subpixel_bilinear_sse2.asm448
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/common/x86/vp9_subpixel_bilinear_ssse3.asm422
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_dboolhuff.c92
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_dboolhuff.h93
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_decodeframe.c1397
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_decodeframe.h32
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_decodemv.c408
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_decodemv.h11
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_decoder.c330
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_decoder.h86
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_decodframe.c1368
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_decodframe.h21
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_detokenize.c183
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_detokenize.h14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_dsubexp.c57
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_dsubexp.h10
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_dthread.c280
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_dthread.h57
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_onyxd.h69
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_onyxd_if.c446
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_onyxd_int.h54
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_read_bit_buffer.c41
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_read_bit_buffer.h47
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_reader.c106
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_reader.h119
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_thread.c110
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_thread.h123
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/decoder/vp9_treereader.h32
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_aq_complexity.c103
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_aq_complexity.h34
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_aq_cyclicrefresh.c324
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_aq_cyclicrefresh.h50
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_aq_variance.c148
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_aq_variance.h34
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_bitstream.c1143
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_bitstream.h14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_block.h165
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_boolhuff.c68
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_boolhuff.h115
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_context_tree.c156
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_context_tree.h19
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_cost.c62
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_cost.h55
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_dct.c479
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_dct.h24
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_encodeframe.c3796
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_encodeframe.h17
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_encodeintra.c28
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_encodeintra.h20
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_encodemb.c618
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_encodemb.h45
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_encodemv.c252
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_encodemv.h24
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_encoder.c2896
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_encoder.h629
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_extend.c143
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_extend.h33
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_firstpass.c2639
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_firstpass.h92
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_lookahead.c65
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_lookahead.h11
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_mbgraph.c124
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_mbgraph.h26
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_mcomp.c1930
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_mcomp.h149
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_modecosts.c43
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_modecosts.h17
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_onyx_if.c4319
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_onyx_int.h727
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_picklpf.c230
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_picklpf.h14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_pickmode.c420
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_pickmode.h31
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_psnr.c29
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_psnr.h17
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_quantize.c377
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_quantize.h41
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_ratectrl.c1551
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_ratectrl.h180
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_rdopt.c3831
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_rdopt.h92
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_resize.c576
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_resize.h68
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_sad.c137
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_sad_c.c615
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_segmentation.c92
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_segmentation.h27
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_speed_features.c397
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_speed_features.h362
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_ssim.c9
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_ssim.h30
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_subexp.c110
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_subexp.h17
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_svc_layercontext.c229
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_svc_layercontext.h84
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_temporal_filter.c277
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_temporal_filter.h14
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_tokenize.c419
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_tokenize.h31
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_treewriter.c60
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_treewriter.h80
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_vaq.c147
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_vaq.h26
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_variance.c256
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_variance.h55
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_variance_c.c1094
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_write_bit_buffer.c34
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_write_bit_buffer.h46
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_writer.c35
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/vp9_writer.h103
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_dct32x32_avx2.c2710
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_dct32x32_sse2.c3
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_dct_avx2.c2592
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_dct_mmx.asm70
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_dct_sse2.c403
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_dct_ssse3.asm174
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_error_intrin_avx2.c72
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_mcomp_x86.h40
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_quantize_ssse3.asm5
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_sad4d_intrin_avx2.c167
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_subpel_variance.asm198
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_subpel_variance_impl_intrin_avx2.c539
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_subpel_variance_impl_sse2.asm337
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_variance_avx2.c268
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_variance_impl_intrin_avx2.c213
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_variance_impl_sse2.asm333
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_variance_mmx.c1
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/encoder/x86/vp9_variance_sse2.c119
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/exports_enc2
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/vp9_common.mk82
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/vp9_cx_iface.c1193
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/vp9_dx_iface.c800
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/vp9_iface_common.h17
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/vp9cx.mk58
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9/vp9dx.mk17
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vp9_spatial_scalable_encoder.c487
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/exports_dec1
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/exports_enc17
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/internal/vpx_codec_internal.h45
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/internal/vpx_psnr.h34
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/src/svc_encodeframe.c1147
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/src/vpx_decoder.c20
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/src/vpx_encoder.c49
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/src/vpx_psnr.c24
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/svc_context.h153
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/vp8.h6
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/vp8cx.h79
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/vp8dx.h55
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/vpx_codec.h10
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/vpx_codec.mk6
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/vpx_decoder.h58
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/vpx_encoder.h69
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/vpx_frame_buffer.h80
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/vpx_image.h22
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx/vpx_integer.h8
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_mem/include/vpx_mem_intrnl.h6
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_mem/include/vpx_mem_tracker.h6
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_mem/memory_manager/include/cavl_if.h4
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_mem/memory_manager/include/cavl_impl.h4
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_mem/memory_manager/include/heapmm.h3
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_mem/memory_manager/include/hmm_cnfg.h4
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_mem/memory_manager/include/hmm_intrnl.h6
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_mem/vpx_mem.h6
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_ports/arm.h12
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_ports/arm_cpudetect.c7
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_ports/asm_offsets.h6
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_ports/config.h6
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_ports/emmintrin_compat.h6
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_ports/mem.h6
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_ports/mem_ops.h4
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_ports/mem_ops_aligned.h6
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_ports/vpx_once.h6
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_ports/vpx_ports.mk1
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_ports/vpx_timer.h6
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_ports/x86.h59
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_ports/x86_cpuid.c49
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_scale/arm/neon/vp8_vpxyv12_copy_y_neon.asm123
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_scale/generic/yv12config.c61
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_scale/generic/yv12extend.c29
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_scale/mips/dspr2/yv12extend_dspr2.c15
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_scale/vpx_scale.h6
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_scale/vpx_scale.mk13
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_scale/vpx_scale_rtcd.pl36
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/vpx_scale/vpx_scale_rtcd.sh34
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpx_scale/yv12config.h98
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpxdec.c973
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpxenc.c1748
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpxenc.h56
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpxstats.c122
-rw-r--r--chromium/third_party/libvpx/source/libvpx/vpxstats.h43
-rw-r--r--chromium/third_party/libvpx/source/libvpx/warnings.c115
-rw-r--r--chromium/third_party/libvpx/source/libvpx/warnings.h33
-rw-r--r--chromium/third_party/libvpx/source/libvpx/webmdec.cc219
-rw-r--r--chromium/third_party/libvpx/source/libvpx/webmdec.h72
-rw-r--r--chromium/third_party/libvpx/source/libvpx/webmenc.cc87
-rw-r--r--chromium/third_party/libvpx/source/libvpx/webmenc.h57
-rw-r--r--chromium/third_party/libvpx/source/libvpx/y4menc.c27
-rw-r--r--chromium/third_party/libvpx/source/libvpx/y4menc.h33
-rw-r--r--chromium/third_party/libvpx/source/libvpx/y4minput.c48
-rw-r--r--chromium/third_party/libvpx/source/libvpx/y4minput.h14
-rw-r--r--chromium/third_party/libvpx/unpack_lib_posix.gypi54
-rwxr-xr-xchromium/third_party/libvpx/unpack_lib_posix.sh20
-rwxr-xr-xchromium/third_party/libvpx/update_libvpx.sh27
-rw-r--r--chromium/third_party/libwebm/BUILD.gn16
-rw-r--r--chromium/third_party/libwebm/OWNERS2
-rw-r--r--chromium/third_party/libwebm/README.chromium13
-rw-r--r--chromium/third_party/libwebm/libwebm.gyp24
-rw-r--r--chromium/third_party/libwebm/libwebm.gypi13
-rw-r--r--chromium/third_party/libwebm/libwebm_nacl.gyp33
-rw-r--r--chromium/third_party/libwebm/source/.clang-format53
-rw-r--r--chromium/third_party/libwebm/source/.gitattributes4
-rw-r--r--chromium/third_party/libwebm/source/AUTHORS.TXT4
-rw-r--r--chromium/third_party/libwebm/source/Android.mk10
-rw-r--r--chromium/third_party/libwebm/source/LICENSE.TXT30
-rw-r--r--chromium/third_party/libwebm/source/Makefile53
-rw-r--r--chromium/third_party/libwebm/source/PATENTS.TXT22
-rw-r--r--chromium/third_party/libwebm/source/RELEASE.TXT34
-rw-r--r--chromium/third_party/libwebm/source/dumpvtt.cc91
-rw-r--r--chromium/third_party/libwebm/source/libwebm_2008.sln38
-rw-r--r--chromium/third_party/libwebm/source/libwebm_2008.vcproj210
-rw-r--r--chromium/third_party/libwebm/source/libwebm_2010.sln59
-rw-r--r--chromium/third_party/libwebm/source/libwebm_2010.vcxproj150
-rw-r--r--chromium/third_party/libwebm/source/libwebm_2010.vcxproj.filters53
-rw-r--r--chromium/third_party/libwebm/source/libwebm_2013.filters53
-rw-r--r--chromium/third_party/libwebm/source/libwebm_2013.sln61
-rw-r--r--chromium/third_party/libwebm/source/libwebm_2013.vcxproj148
-rw-r--r--chromium/third_party/libwebm/source/mkvmuxer.cpp3131
-rw-r--r--chromium/third_party/libwebm/source/mkvmuxer.hpp1370
-rw-r--r--chromium/third_party/libwebm/source/mkvmuxertypes.hpp30
-rw-r--r--chromium/third_party/libwebm/source/mkvmuxerutil.cpp724
-rw-r--r--chromium/third_party/libwebm/source/mkvmuxerutil.hpp137
-rw-r--r--chromium/third_party/libwebm/source/mkvparser.cpp8356
-rw-r--r--chromium/third_party/libwebm/source/mkvparser.hpp945
-rw-r--r--chromium/third_party/libwebm/source/mkvreader.cpp132
-rw-r--r--chromium/third_party/libwebm/source/mkvreader.hpp45
-rw-r--r--chromium/third_party/libwebm/source/mkvwriter.cpp90
-rw-r--r--chromium/third_party/libwebm/source/mkvwriter.hpp51
-rw-r--r--chromium/third_party/libwebm/source/sample.cpp341
-rw-r--r--chromium/third_party/libwebm/source/sample_2008.vcproj181
-rw-r--r--chromium/third_party/libwebm/source/sample_2010.vcxproj181
-rw-r--r--chromium/third_party/libwebm/source/sample_2010.vcxproj.filters6
-rw-r--r--chromium/third_party/libwebm/source/sample_2013.filters6
-rw-r--r--chromium/third_party/libwebm/source/sample_2013.vcxproj181
-rw-r--r--chromium/third_party/libwebm/source/sample_muxer.cpp561
-rw-r--r--chromium/third_party/libwebm/source/sample_muxer_2008.vcproj179
-rw-r--r--chromium/third_party/libwebm/source/sample_muxer_2010.vcxproj185
-rw-r--r--chromium/third_party/libwebm/source/sample_muxer_2010.vcxproj.filters14
-rw-r--r--chromium/third_party/libwebm/source/sample_muxer_2013.filters14
-rw-r--r--chromium/third_party/libwebm/source/sample_muxer_2013.vcxproj185
-rw-r--r--chromium/third_party/libwebm/source/sample_muxer_metadata.cc380
-rw-r--r--chromium/third_party/libwebm/source/sample_muxer_metadata.h128
-rw-r--r--chromium/third_party/libwebm/source/vttdemux.cc999
-rw-r--r--chromium/third_party/libwebm/source/vttdemux_2010.vcxproj175
-rw-r--r--chromium/third_party/libwebm/source/vttdemux_2010.vcxproj.filters10
-rw-r--r--chromium/third_party/libwebm/source/vttdemux_2013.vcxproj175
-rw-r--r--chromium/third_party/libwebm/source/vttdemux_2013.vcxproj.filters10
-rw-r--r--chromium/third_party/libwebm/source/vttreader.cc59
-rw-r--r--chromium/third_party/libwebm/source/vttreader.h44
-rw-r--r--chromium/third_party/libwebm/source/webmids.hpp141
-rw-r--r--chromium/third_party/libwebm/source/webvttparser.cc702
-rw-r--r--chromium/third_party/libwebm/source/webvttparser.h158
-rw-r--r--chromium/third_party/libwebp/BUILD.gn175
-rw-r--r--chromium/third_party/libwebp/README.chromium18
-rw-r--r--chromium/third_party/libwebp/dec/alpha.c146
-rw-r--r--chromium/third_party/libwebp/dec/alphai.h55
-rw-r--r--chromium/third_party/libwebp/dec/buffer.c7
-rw-r--r--chromium/third_party/libwebp/dec/decode_vp8.h7
-rw-r--r--chromium/third_party/libwebp/dec/frame.c518
-rw-r--r--chromium/third_party/libwebp/dec/idec.c89
-rw-r--r--chromium/third_party/libwebp/dec/io.c11
-rw-r--r--chromium/third_party/libwebp/dec/layer.c7
-rw-r--r--chromium/third_party/libwebp/dec/quant.c9
-rw-r--r--chromium/third_party/libwebp/dec/tree.c141
-rw-r--r--chromium/third_party/libwebp/dec/vp8.c299
-rw-r--r--chromium/third_party/libwebp/dec/vp8i.h145
-rw-r--r--chromium/third_party/libwebp/dec/vp8l.c596
-rw-r--r--chromium/third_party/libwebp/dec/vp8li.h31
-rw-r--r--chromium/third_party/libwebp/dec/webp.c40
-rw-r--r--chromium/third_party/libwebp/dec/webpi.h4
-rw-r--r--chromium/third_party/libwebp/demux/demux.c156
-rw-r--r--chromium/third_party/libwebp/dsp/cpu.c7
-rw-r--r--chromium/third_party/libwebp/dsp/dec.c31
-rw-r--r--chromium/third_party/libwebp/dsp/dec_neon.c118
-rw-r--r--chromium/third_party/libwebp/dsp/dec_sse2.c92
-rw-r--r--chromium/third_party/libwebp/dsp/dsp.h18
-rw-r--r--chromium/third_party/libwebp/dsp/enc.c38
-rw-r--r--chromium/third_party/libwebp/dsp/enc_neon.c9
-rw-r--r--chromium/third_party/libwebp/dsp/enc_sse2.c64
-rw-r--r--chromium/third_party/libwebp/dsp/lossless.c351
-rw-r--r--chromium/third_party/libwebp/dsp/lossless.h130
-rw-r--r--chromium/third_party/libwebp/dsp/upsampling.c23
-rw-r--r--chromium/third_party/libwebp/dsp/upsampling_neon.c169
-rw-r--r--chromium/third_party/libwebp/dsp/upsampling_sse2.c109
-rw-r--r--chromium/third_party/libwebp/dsp/yuv.c156
-rw-r--r--chromium/third_party/libwebp/dsp/yuv.h261
-rw-r--r--chromium/third_party/libwebp/enc/alpha.c224
-rw-r--r--chromium/third_party/libwebp/enc/analysis.c128
-rw-r--r--chromium/third_party/libwebp/enc/backward_references.c82
-rw-r--r--chromium/third_party/libwebp/enc/backward_references.h71
-rw-r--r--chromium/third_party/libwebp/enc/config.c15
-rw-r--r--chromium/third_party/libwebp/enc/cost.c207
-rw-r--r--chromium/third_party/libwebp/enc/cost.h4
-rw-r--r--chromium/third_party/libwebp/enc/filter.c124
-rw-r--r--chromium/third_party/libwebp/enc/frame.c343
-rw-r--r--chromium/third_party/libwebp/enc/histogram.c8
-rw-r--r--chromium/third_party/libwebp/enc/histogram.h4
-rw-r--r--chromium/third_party/libwebp/enc/iterator.c200
-rw-r--r--chromium/third_party/libwebp/enc/layer.c7
-rw-r--r--chromium/third_party/libwebp/enc/picture.c289
-rw-r--r--chromium/third_party/libwebp/enc/quant.c272
-rw-r--r--chromium/third_party/libwebp/enc/syntax.c7
-rw-r--r--chromium/third_party/libwebp/enc/token.c31
-rw-r--r--chromium/third_party/libwebp/enc/tree.c14
-rw-r--r--chromium/third_party/libwebp/enc/vp8enci.h82
-rw-r--r--chromium/third_party/libwebp/enc/vp8l.c23
-rw-r--r--chromium/third_party/libwebp/enc/vp8li.h4
-rw-r--r--chromium/third_party/libwebp/enc/webpenc.c58
-rw-r--r--chromium/third_party/libwebp/libwebp.gyp4
-rw-r--r--chromium/third_party/libwebp/utils/alpha_processing.c196
-rw-r--r--chromium/third_party/libwebp/utils/alpha_processing.h46
-rw-r--r--chromium/third_party/libwebp/utils/bit_reader.c29
-rw-r--r--chromium/third_party/libwebp/utils/bit_reader.h27
-rw-r--r--chromium/third_party/libwebp/utils/bit_writer.c14
-rw-r--r--chromium/third_party/libwebp/utils/bit_writer.h4
-rw-r--r--chromium/third_party/libwebp/utils/color_cache.c7
-rw-r--r--chromium/third_party/libwebp/utils/color_cache.h4
-rw-r--r--chromium/third_party/libwebp/utils/filters.c146
-rw-r--r--chromium/third_party/libwebp/utils/filters.h12
-rw-r--r--chromium/third_party/libwebp/utils/huffman.c64
-rw-r--r--chromium/third_party/libwebp/utils/huffman.h17
-rw-r--r--chromium/third_party/libwebp/utils/huffman_encode.c2
-rw-r--r--chromium/third_party/libwebp/utils/huffman_encode.h4
-rw-r--r--chromium/third_party/libwebp/utils/quant_levels.c7
-rw-r--r--chromium/third_party/libwebp/utils/quant_levels.h4
-rw-r--r--chromium/third_party/libwebp/utils/quant_levels_dec.c18
-rw-r--r--chromium/third_party/libwebp/utils/quant_levels_dec.h12
-rw-r--r--chromium/third_party/libwebp/utils/random.c43
-rw-r--r--chromium/third_party/libwebp/utils/random.h62
-rw-r--r--chromium/third_party/libwebp/utils/rescaler.c12
-rw-r--r--chromium/third_party/libwebp/utils/rescaler.h16
-rw-r--r--chromium/third_party/libwebp/utils/thread.c40
-rw-r--r--chromium/third_party/libwebp/utils/thread.h13
-rw-r--r--chromium/third_party/libwebp/utils/utils.c7
-rw-r--r--chromium/third_party/libwebp/utils/utils.h4
-rw-r--r--chromium/third_party/libwebp/webp/decode.h11
-rw-r--r--chromium/third_party/libwebp/webp/demux.h84
-rw-r--r--chromium/third_party/libwebp/webp/encode.h21
-rw-r--r--chromium/third_party/libwebp/webp/mux.h121
-rw-r--r--chromium/third_party/libwebp/webp/mux_types.h4
-rw-r--r--chromium/third_party/libxml/BUILD.gn190
-rw-r--r--chromium/third_party/libxml/libxml.gyp13
-rw-r--r--chromium/third_party/libxslt/BUILD.gn80
-rw-r--r--chromium/third_party/libyuv/BUILD.gn85
-rw-r--r--chromium/third_party/libyuv/DEPS99
-rw-r--r--chromium/third_party/libyuv/README.chromium2
-rw-r--r--chromium/third_party/libyuv/all.gyp42
-rw-r--r--chromium/third_party/libyuv/download_vs_toolchain.py29
-rwxr-xr-xchromium/third_party/libyuv/gyp_libyuv86
-rw-r--r--chromium/third_party/libyuv/gyp_libyuv.py28
-rw-r--r--chromium/third_party/libyuv/include/libyuv.h1
-rw-r--r--chromium/third_party/libyuv/include/libyuv/basic_types.h9
-rw-r--r--chromium/third_party/libyuv/include/libyuv/convert.h4
-rw-r--r--chromium/third_party/libyuv/include/libyuv/convert_argb.h4
-rw-r--r--chromium/third_party/libyuv/include/libyuv/cpu_id.h2
-rw-r--r--chromium/third_party/libyuv/include/libyuv/mjpeg_decoder.h68
-rw-r--r--chromium/third_party/libyuv/include/libyuv/planar_functions.h12
-rw-r--r--chromium/third_party/libyuv/include/libyuv/rotate.h4
-rw-r--r--chromium/third_party/libyuv/include/libyuv/row.h121
-rw-r--r--chromium/third_party/libyuv/include/libyuv/scale.h27
-rw-r--r--chromium/third_party/libyuv/include/libyuv/scale_row.h122
-rw-r--r--chromium/third_party/libyuv/include/libyuv/version.h2
-rw-r--r--chromium/third_party/libyuv/include/libyuv/video_common.h9
-rw-r--r--chromium/third_party/libyuv/libyuv.gyp133
-rw-r--r--chromium/third_party/libyuv/libyuv.gypi67
-rw-r--r--chromium/third_party/libyuv/libyuv_nacl.gyp40
-rw-r--r--chromium/third_party/libyuv/libyuv_test.gyp12
-rw-r--r--chromium/third_party/libyuv/linux.mk17
-rw-r--r--chromium/third_party/libyuv/source/compare.cc106
-rw-r--r--chromium/third_party/libyuv/source/compare_common.cc8
-rw-r--r--chromium/third_party/libyuv/source/compare_neon.cc7
-rw-r--r--chromium/third_party/libyuv/source/compare_posix.cc14
-rw-r--r--chromium/third_party/libyuv/source/convert.cc100
-rw-r--r--chromium/third_party/libyuv/source/convert_argb.cc16
-rw-r--r--chromium/third_party/libyuv/source/convert_from.cc10
-rw-r--r--chromium/third_party/libyuv/source/convert_from_argb.cc60
-rw-r--r--chromium/third_party/libyuv/source/convert_jpeg.cc30
-rw-r--r--chromium/third_party/libyuv/source/convert_to_argb.cc149
-rw-r--r--chromium/third_party/libyuv/source/convert_to_i420.cc109
-rw-r--r--chromium/third_party/libyuv/source/cpu_id.cc85
-rw-r--r--chromium/third_party/libyuv/source/format_conversion.cc166
-rw-r--r--chromium/third_party/libyuv/source/mjpeg_decoder.cc115
-rw-r--r--chromium/third_party/libyuv/source/mjpeg_validate.cc20
-rw-r--r--chromium/third_party/libyuv/source/planar_functions.cc503
-rw-r--r--chromium/third_party/libyuv/source/rotate.cc76
-rw-r--r--chromium/third_party/libyuv/source/rotate_argb.cc36
-rw-r--r--chromium/third_party/libyuv/source/rotate_neon.cc399
-rw-r--r--chromium/third_party/libyuv/source/row_common.cc583
-rw-r--r--chromium/third_party/libyuv/source/row_neon.cc167
-rw-r--r--chromium/third_party/libyuv/source/row_posix.cc549
-rw-r--r--chromium/third_party/libyuv/source/row_win.cc25
-rw-r--r--chromium/third_party/libyuv/source/scale.cc1089
-rw-r--r--chromium/third_party/libyuv/source/scale_argb.cc319
-rw-r--r--chromium/third_party/libyuv/source/scale_common.cc646
-rw-r--r--chromium/third_party/libyuv/source/scale_mips.cc8
-rw-r--r--chromium/third_party/libyuv/source/scale_neon.cc19
-rw-r--r--chromium/third_party/libyuv/source/scale_posix.cc222
-rw-r--r--chromium/third_party/libyuv/source/scale_win.cc41
-rw-r--r--chromium/third_party/libyuv/source/video_common.cc22
-rwxr-xr-xchromium/third_party/libyuv/tools/valgrind-libyuv/libyuv_tests.py6
-rw-r--r--chromium/third_party/libyuv/unit_test/compare_test.cc65
-rw-r--r--chromium/third_party/libyuv/unit_test/convert_test.cc257
-rw-r--r--chromium/third_party/libyuv/unit_test/cpu_test.cc20
-rw-r--r--chromium/third_party/libyuv/unit_test/math_test.cc78
-rw-r--r--chromium/third_party/libyuv/unit_test/planar_test.cc108
-rw-r--r--chromium/third_party/libyuv/unit_test/rotate_argb_test.cc13
-rw-r--r--chromium/third_party/libyuv/unit_test/rotate_test.cc25
-rw-r--r--chromium/third_party/libyuv/unit_test/scale_argb_test.cc36
-rw-r--r--chromium/third_party/libyuv/unit_test/scale_test.cc158
-rw-r--r--chromium/third_party/libyuv/unit_test/unit_test.cc4
-rw-r--r--chromium/third_party/libyuv/unit_test/unit_test.h12
-rw-r--r--chromium/third_party/libyuv/unit_test/video_common_test.cc11
-rw-r--r--chromium/third_party/lss/linux_syscall_support.h408
-rw-r--r--chromium/third_party/lzma_sdk/BUILD.gn56
-rw-r--r--chromium/third_party/mach_override/BUILD.gn37
-rw-r--r--chromium/third_party/mach_override/README.chromium11
-rw-r--r--chromium/third_party/mach_override/mach_override.c84
-rw-r--r--chromium/third_party/mesa/BUILD.gn759
-rw-r--r--chromium/third_party/mesa/README.chromium12
-rw-r--r--chromium/third_party/mesa/mesa.gyp45
-rw-r--r--chromium/third_party/mesa/src/include/GL/gl.h3
-rw-r--r--chromium/third_party/mesa/src/include/GL/glext.h18
-rw-r--r--chromium/third_party/mesa/src/include/GL/osmesa.h3
-rw-r--r--chromium/third_party/mesa/src/src/gallium/auxiliary/util/u_math.h63
-rw-r--r--chromium/third_party/mesa/src/src/mesa/main/imports.h2
-rw-r--r--chromium/third_party/mesa/src/src/mesa/swrast/s_zoom.c8
-rw-r--r--chromium/third_party/modp_b64/BUILD.gn11
-rw-r--r--chromium/third_party/modp_b64/README.chromium9
-rw-r--r--chromium/third_party/modp_b64/modp_b64.gyp27
-rw-r--r--chromium/third_party/modp_b64/modp_b64_data.h9
-rw-r--r--chromium/third_party/modp_b64/modp_b64_nacl.gyp29
-rw-r--r--chromium/third_party/molokocacao/NSBezierPath+MCAdditions.m4
-rw-r--r--chromium/third_party/molokocacao/molokocacao.gyp2
-rw-r--r--chromium/third_party/mozilla/ComplexTextInputPanel.h4
-rw-r--r--chromium/third_party/mozilla/MozillaExport.h22
-rw-r--r--chromium/third_party/mozilla/NSPasteboard+Utils.h12
-rw-r--r--chromium/third_party/mozilla/README.chromium11
-rw-r--r--chromium/third_party/mozilla/mozilla.gyp30
-rw-r--r--chromium/third_party/mtpd/OWNERS2
-rw-r--r--chromium/third_party/mtpd/README.chromium14
-rw-r--r--chromium/third_party/mtpd/mtpd.gyp44
-rw-r--r--chromium/third_party/mtpd/mtpd_server/mtpd_server.h348
-rw-r--r--chromium/third_party/mtpd/source/Makefile76
-rw-r--r--chromium/third_party/mtpd/source/assert_matching_file_types.cc37
-rw-r--r--chromium/third_party/mtpd/source/build_config.h14
-rw-r--r--chromium/third_party/mtpd/source/common.mk845
-rw-r--r--chromium/third_party/mtpd/source/daemon.cc24
-rw-r--r--chromium/third_party/mtpd/source/daemon.h33
-rw-r--r--chromium/third_party/mtpd/source/device_event_delegate.h26
-rw-r--r--chromium/third_party/mtpd/source/device_manager.cc666
-rw-r--r--chromium/third_party/mtpd/source/device_manager.h250
-rw-r--r--chromium/third_party/mtpd/source/device_manager_unittest.cc243
-rw-r--r--chromium/third_party/mtpd/source/file_entry.cc103
-rw-r--r--chromium/third_party/mtpd/source/file_entry.h50
-rw-r--r--chromium/third_party/mtpd/source/main.cc144
-rw-r--r--chromium/third_party/mtpd/source/mtpd-seccomp-amd64.policy64
-rw-r--r--chromium/third_party/mtpd/source/mtpd-seccomp-arm.policy66
-rw-r--r--chromium/third_party/mtpd/source/mtpd-seccomp-x86.policy60
-rw-r--r--chromium/third_party/mtpd/source/mtpd.conf20
-rw-r--r--chromium/third_party/mtpd/source/mtpd.xml178
-rw-r--r--chromium/third_party/mtpd/source/mtpd_server_impl.cc242
-rw-r--r--chromium/third_party/mtpd/source/mtpd_server_impl.h101
-rw-r--r--chromium/third_party/mtpd/source/mtpd_testrunner.cc11
-rw-r--r--chromium/third_party/mtpd/source/org.chromium.Mtpd.conf56
-rw-r--r--chromium/third_party/mtpd/source/service_constants.h16
-rw-r--r--chromium/third_party/mtpd/source/storage_info.cc77
-rw-r--r--chromium/third_party/mtpd/source/storage_info.h52
-rw-r--r--chromium/third_party/mtpd/source/string_helpers.cc23
-rw-r--r--chromium/third_party/mtpd/source/string_helpers.h18
-rw-r--r--chromium/third_party/npapi/BUILD.gn24
-rw-r--r--chromium/third_party/nss/README.chromium19
-rw-r--r--chromium/third_party/nss/nspr/pr/include/md/_darwin.cfg2
-rw-r--r--chromium/third_party/nss/nspr/pr/include/md/_darwin.h6
-rw-r--r--chromium/third_party/nss/nspr/pr/include/md/_linux.cfg4
-rw-r--r--chromium/third_party/nss/nspr/pr/include/md/_unixos.h6
-rw-r--r--chromium/third_party/nss/nspr/pr/include/md/_win95.h6
-rw-r--r--chromium/third_party/nss/nspr/pr/include/pratom.h2
-rw-r--r--chromium/third_party/nss/nspr/pr/include/prinit.h4
-rw-r--r--chromium/third_party/nss/nspr/pr/include/prio.h13
-rw-r--r--chromium/third_party/nss/nspr/pr/include/private/primpl.h52
-rw-r--r--chromium/third_party/nss/nspr/pr/src/io/prmmap.c8
-rw-r--r--chromium/third_party/nss/nspr/pr/src/md/unix/unix.c23
-rw-r--r--chromium/third_party/nss/nspr/pr/src/md/windows/ntmisc.c24
-rw-r--r--chromium/third_party/nss/nspr/pr/src/md/windows/w95thred.c2
-rw-r--r--chromium/third_party/nss/nspr/pr/src/misc/prcountr.c4
-rw-r--r--chromium/third_party/nss/nspr/pr/src/misc/prdtoa.c6
-rw-r--r--chromium/third_party/nss/nspr/pr/src/misc/prnetdb.c9
-rw-r--r--chromium/third_party/nss/nspr/pr/src/misc/prtrace.c4
-rw-r--r--chromium/third_party/nss/nspr/pr/src/pthreads/ptio.c2
-rw-r--r--chromium/third_party/nss/nspr/pr/src/pthreads/ptsynch.c278
-rw-r--r--chromium/third_party/nss/nspr/pr/src/pthreads/ptthread.c83
-rw-r--r--chromium/third_party/nss/nspr/pr/src/threads/combined/prucv.c48
-rw-r--r--chromium/third_party/nss/nspr/pr/src/threads/combined/prulock.c33
-rw-r--r--chromium/third_party/nss/nspr/pr/src/threads/prmon.c271
-rw-r--r--chromium/third_party/nss/nspr/pr/src/threads/prrwlock.c19
-rw-r--r--chromium/third_party/nss/nss.gyp49
-rw-r--r--chromium/third_party/nss/nss/exports_win.def15
-rw-r--r--chromium/third_party/nss/nss/lib/certdb/alg1485.c10
-rw-r--r--chromium/third_party/nss/nss/lib/certdb/cert.h32
-rw-r--r--chromium/third_party/nss/nss/lib/certdb/certdb.c15
-rw-r--r--chromium/third_party/nss/nss/lib/certdb/certdb.h20
-rw-r--r--chromium/third_party/nss/nss/lib/certdb/certi.h22
-rw-r--r--chromium/third_party/nss/nss/lib/certdb/certt.h6
-rw-r--r--chromium/third_party/nss/nss/lib/certdb/genname.c114
-rw-r--r--chromium/third_party/nss/nss/lib/certdb/genname.h3
-rw-r--r--chromium/third_party/nss/nss/lib/certdb/polcyxtn.c3
-rw-r--r--chromium/third_party/nss/nss/lib/certhigh/certvfy.c58
-rw-r--r--chromium/third_party/nss/nss/lib/certhigh/ocsp.c763
-rw-r--r--chromium/third_party/nss/nss/lib/certhigh/ocsp.h9
-rw-r--r--chromium/third_party/nss/nss/lib/certhigh/ocspi.h32
-rw-r--r--chromium/third_party/nss/nss/lib/certhigh/ocspsig.c4
-rw-r--r--chromium/third_party/nss/nss/lib/ckfw/builtins/bfind.c7
-rw-r--r--chromium/third_party/nss/nss/lib/ckfw/builtins/certdata.c3294
-rw-r--r--chromium/third_party/nss/nss/lib/ckfw/builtins/nssckbi.h4
-rw-r--r--chromium/third_party/nss/nss/lib/cryptohi/cryptohi.h4
-rw-r--r--chromium/third_party/nss/nss/lib/cryptohi/keyhi.h16
-rw-r--r--chromium/third_party/nss/nss/lib/cryptohi/seckey.c91
-rw-r--r--chromium/third_party/nss/nss/lib/cryptohi/secsign.c2
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/aeskeywrap.c1
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/arcfour.c2
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/blapi.h184
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/blapii.h2
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/blapit.h2
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/build_config_mac.h4
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/ctr.c76
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/ctr.h7
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/dh.c23
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/ec.c40
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/ecdecode.c610
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/intel-aes-x64-masm.asm971
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/intel-aes-x86-masm.asm949
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/intel-aes.h146
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/intel-gcm-wrap.c240
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/intel-gcm-x64-masm.asm1295
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/intel-gcm-x86-masm.asm1209
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/intel-gcm.h83
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/mpi/mpi.h6
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/rijndael.c75
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/rsa.c72
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/rsapkcs.c1380
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/sysrand.c5
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/unix_rand.c36
-rw-r--r--chromium/third_party/nss/nss/lib/freebl/win_rand.c251
-rwxr-xr-xchromium/third_party/nss/nss/lib/libpkix/include/pkix_errorstrings.h8
-rwxr-xr-xchromium/third_party/nss/nss/lib/libpkix/include/pkix_pl_pki.h8
-rwxr-xr-xchromium/third_party/nss/nss/lib/libpkix/include/pkix_sample_modules.h2
-rwxr-xr-xchromium/third_party/nss/nss/lib/libpkix/pkix/certsel/pkix_certselector.c8
-rw-r--r--chromium/third_party/nss/nss/lib/libpkix/pkix/checker/pkix_crlchecker.c6
-rwxr-xr-xchromium/third_party/nss/nss/lib/libpkix/pkix/checker/pkix_nameconstraintschecker.c9
-rw-r--r--chromium/third_party/nss/nss/lib/libpkix/pkix/checker/pkix_ocspchecker.c207
-rwxr-xr-xchromium/third_party/nss/nss/lib/libpkix/pkix/params/pkix_trustanchor.c6
-rwxr-xr-xchromium/third_party/nss/nss/lib/libpkix/pkix/top/pkix_build.c124
-rwxr-xr-xchromium/third_party/nss/nss/lib/libpkix/pkix/top/pkix_build.h7
-rwxr-xr-xchromium/third_party/nss/nss/lib/libpkix/pkix/top/pkix_validate.c12
-rw-r--r--chromium/third_party/nss/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.c25
-rw-r--r--chromium/third_party/nss/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.h4
-rw-r--r--chromium/third_party/nss/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_cert.c8
-rw-r--r--chromium/third_party/nss/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.c4
-rw-r--r--chromium/third_party/nss/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.h2
-rw-r--r--chromium/third_party/nss/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.c7
-rw-r--r--chromium/third_party/nss/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.c124
-rw-r--r--chromium/third_party/nss/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.h3
-rwxr-xr-xchromium/third_party/nss/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_common.h4
-rwxr-xr-xchromium/third_party/nss/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_lifecycle.c2
-rwxr-xr-xchromium/third_party/nss/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_lifecycle.h2
-rwxr-xr-xchromium/third_party/nss/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c21
-rw-r--r--chromium/third_party/nss/nss/lib/nss/nss.h10
-rw-r--r--chromium/third_party/nss/nss/lib/nss/nssinit.c18
-rw-r--r--chromium/third_party/nss/nss/lib/pk11wrap/pk11akey.c10
-rw-r--r--chromium/third_party/nss/nss/lib/pk11wrap/pk11cert.c7
-rw-r--r--chromium/third_party/nss/nss/lib/pk11wrap/pk11cxt.c3
-rw-r--r--chromium/third_party/nss/nss/lib/pk11wrap/pk11load.c37
-rw-r--r--chromium/third_party/nss/nss/lib/pk11wrap/pk11obj.c116
-rw-r--r--chromium/third_party/nss/nss/lib/pk11wrap/pk11pk12.c110
-rw-r--r--chromium/third_party/nss/nss/lib/pk11wrap/pk11pub.h50
-rw-r--r--chromium/third_party/nss/nss/lib/pk11wrap/pk11skey.c4
-rw-r--r--chromium/third_party/nss/nss/lib/pk11wrap/pk11slot.c18
-rw-r--r--chromium/third_party/nss/nss/lib/pk11wrap/pk11util.c4
-rw-r--r--chromium/third_party/nss/nss/lib/pk11wrap/secmod.h2
-rw-r--r--chromium/third_party/nss/nss/lib/pk11wrap/secmodi.h3
-rw-r--r--chromium/third_party/nss/nss/lib/pk11wrap/secmodt.h8
-rw-r--r--chromium/third_party/nss/nss/lib/pki/tdcache.c3
-rw-r--r--chromium/third_party/nss/nss/lib/smime/smime.h4
-rw-r--r--chromium/third_party/nss/nss/lib/softoken/ecdecode.c606
-rw-r--r--chromium/third_party/nss/nss/lib/softoken/fipstest.c8
-rw-r--r--chromium/third_party/nss/nss/lib/softoken/fipstokn.c33
-rw-r--r--chromium/third_party/nss/nss/lib/softoken/lowkey.c18
-rw-r--r--chromium/third_party/nss/nss/lib/softoken/lowkeyi.h4
-rw-r--r--chromium/third_party/nss/nss/lib/softoken/lowkeyti.h4
-rw-r--r--chromium/third_party/nss/nss/lib/softoken/pkcs11.c175
-rw-r--r--chromium/third_party/nss/nss/lib/softoken/pkcs11c.c615
-rw-r--r--chromium/third_party/nss/nss/lib/softoken/pkcs11u.c8
-rw-r--r--chromium/third_party/nss/nss/lib/softoken/rsawrapr.c1448
-rw-r--r--chromium/third_party/nss/nss/lib/softoken/sdb.c12
-rw-r--r--chromium/third_party/nss/nss/lib/softoken/softkver.h10
-rw-r--r--chromium/third_party/nss/nss/lib/softoken/softoken.h141
-rw-r--r--chromium/third_party/nss/nss/lib/softoken/softoknt.h15
-rw-r--r--chromium/third_party/nss/nss/lib/ssl/sslerr.h269
-rw-r--r--chromium/third_party/nss/nss/lib/util/nssutil.h8
-rw-r--r--chromium/third_party/nss/nss/lib/util/secdig.c3
-rw-r--r--chromium/third_party/nss/nss/lib/util/secdig.h4
-rw-r--r--chromium/third_party/nss/nss/lib/util/secdigt.h4
-rw-r--r--chromium/third_party/nss/nss/lib/util/secerr.h356
-rw-r--r--chromium/third_party/nss/nss/lib/util/utilmod.c107
-rw-r--r--chromium/third_party/nss/nss/lib/util/utilmodt.h3
-rw-r--r--chromium/third_party/nss/patches/nspr-disable-optimization-2013.patch17
-rw-r--r--chromium/third_party/nss/patches/nss-chacha20-poly1305.patch1786
-rw-r--r--chromium/third_party/nss/patches/nss-genname-warnings.patch17
-rw-r--r--chromium/third_party/nss/patches/nss-rsa-key-check.patch109
-rw-r--r--chromium/third_party/nss/patches/nss-urandom-abort.patch17
-rwxr-xr-xchromium/third_party/nss/scripts/nspr-checkout.sh2
-rwxr-xr-xchromium/third_party/nss/scripts/nss-checkout.sh14
-rw-r--r--chromium/third_party/ocmock/OCMock/NSInvocation+OCMAdditions.m9
-rw-r--r--chromium/third_party/ocmock/OCMock/OCMBoxedReturnValueProvider.m5
-rw-r--r--chromium/third_party/ocmock/OCMock/OCMConstraint.m4
-rw-r--r--chromium/third_party/ocmock/README.chromium8
-rw-r--r--chromium/third_party/openmax_dl/dl/api/arm/arm64COMM_s.h258
-rw-r--r--chromium/third_party/openmax_dl/dl/api/arm/armCOMM_s.h1
-rw-r--r--chromium/third_party/openmax_dl/dl/api/arm/omxtypes_s.h124
-rw-r--r--chromium/third_party/openmax_dl/dl/dl.gyp90
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/api/armSP.h38
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/api/mipsSP.h45
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/api/omxSP.h106
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/arm64/ComplexToRealFixup.S261
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/arm64/armSP_FFTInv_CCSToR_F32_preTwiddleRadix2_s.S280
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix2_fs_s.S136
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix2_ls_s.S149
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix2_s.S185
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix4_fs_s.S266
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix4_ls_s.S371
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix4_s.S339
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix8_fs_s.S473
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/arm64/omxSP_FFTFwd_CToC_FC32.c190
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/arm64/omxSP_FFTFwd_RToCCS_F32.c213
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/arm64/omxSP_FFTInv_CCSToR_F32.c259
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/arm64/omxSP_FFTInv_CToC_FC32.c214
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c4
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/omxSP_FFTInit_C_FC32.c7
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/omxSP_FFTInit_C_SC16.c7
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/omxSP_FFTInit_C_SC32.c5
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/omxSP_FFTInit_R_F32.c6
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/omxSP_FFTInit_R_S16.c4
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/omxSP_FFTInit_R_S16S32.c8
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/arm/omxSP_FFTInit_R_S32.c6
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/armSP_FFT_F32TwiddleTable.c9220
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/mips/mips_FFTFwd_RToCCS_F32_complex.c267
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/mips/mips_FFTFwd_RToCCS_F32_real.c191
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/mips/mips_FFTInv_CCSToR_F32_complex.c307
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/mips/mips_FFTInv_CCSToR_F32_real.c222
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/mips/omxSP_FFTFwd_RToCCS_F32_Sfs.c59
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/mips/omxSP_FFTGetBufSize_R_F32.c45
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/mips/omxSP_FFTInit_R_F32.c168
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/mips/omxSP_FFTInv_CCSToR_F32_Sfs.c60
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/mips/omxSP_FFT_F32TwiddleTable.c1871
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/test/test_fft.gyp33
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/x86/omxSP_FFTFwd_RToCCS_F32_Sfs.c12
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/x86/omxSP_FFTGetBufSize_R_F32.c32
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/x86/omxSP_FFTInit_R_F32.c6
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/x86/omxSP_FFTInv_CCSToR_F32_Sfs.c12
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/x86/x86SP_FFT_F32_radix4_kernel.c24
-rw-r--r--chromium/third_party/openmax_dl/dl/sp/src/x86/x86SP_SSE_Math.h64
-rw-r--r--chromium/third_party/openssl/BUILD.gn97
-rw-r--r--chromium/third_party/openssl/README.chromium27
-rw-r--r--chromium/third_party/openssl/config/mac/ia32/openssl/opensslconf.h319
-rw-r--r--chromium/third_party/openssl/config/x64/openssl/opensslconf.h4
-rwxr-xr-xchromium/third_party/openssl/import_from_android.sh13
-rw-r--r--chromium/third_party/openssl/openssl.gyp41
-rw-r--r--chromium/third_party/openssl/openssl.gypi42
-rw-r--r--chromium/third_party/openssl/openssl/crypto/aes/asm/aes-586-mac.S3200
-rw-r--r--chromium/third_party/openssl/openssl/crypto/aes/asm/aesni-x86-mac.S2107
-rw-r--r--chromium/third_party/openssl/openssl/crypto/aes/asm/vpaes-x86-mac.S635
-rw-r--r--chromium/third_party/openssl/openssl/crypto/bf/asm/bf-586-mac.S890
-rw-r--r--chromium/third_party/openssl/openssl/crypto/bn/asm/bn-586-mac.S1370
-rw-r--r--chromium/third_party/openssl/openssl/crypto/bn/asm/co-586-mac.S1246
-rw-r--r--chromium/third_party/openssl/openssl/crypto/bn/asm/x86-gf2m-mac.S332
-rw-r--r--chromium/third_party/openssl/openssl/crypto/bn/asm/x86-mont-mac.S336
-rw-r--r--chromium/third_party/openssl/openssl/crypto/cryptlib.c2
-rw-r--r--chromium/third_party/openssl/openssl/crypto/crypto.h2
-rw-r--r--chromium/third_party/openssl/openssl/crypto/des/asm/crypt586-mac.S880
-rw-r--r--chromium/third_party/openssl/openssl/crypto/des/asm/des-586-mac.S1821
-rw-r--r--chromium/third_party/openssl/openssl/crypto/ec/ec_asn1.c7
-rw-r--r--chromium/third_party/openssl/openssl/crypto/evp/bio_b64.c1
-rw-r--r--chromium/third_party/openssl/openssl/crypto/evp/encode.c1
-rw-r--r--chromium/third_party/openssl/openssl/crypto/md5/asm/md5-586-mac.S677
-rw-r--r--chromium/third_party/openssl/openssl/crypto/modes/asm/ghash-x86-mac.S718
-rw-r--r--chromium/third_party/openssl/openssl/crypto/pkcs7/pk7_doit.c1
-rw-r--r--chromium/third_party/openssl/openssl/crypto/sha/asm/sha1-586-mac.S1378
-rw-r--r--chromium/third_party/openssl/openssl/crypto/sha/asm/sha256-586-mac.S256
-rw-r--r--chromium/third_party/openssl/openssl/crypto/sha/asm/sha512-586-mac.S561
-rw-r--r--chromium/third_party/openssl/openssl/crypto/x86cpuid-mac.S316
-rw-r--r--chromium/third_party/openssl/openssl/e_os2.h13
-rwxr-xr-xchromium/third_party/openssl/openssl/import_openssl.sh30
-rw-r--r--chromium/third_party/openssl/openssl/include/openssl/ssl.h10
-rw-r--r--chromium/third_party/openssl/openssl/include/openssl/ssl3.h3
-rw-r--r--chromium/third_party/openssl/openssl/include/openssl/tls1.h8
-rw-r--r--chromium/third_party/openssl/openssl/openssl.config66
-rw-r--r--chromium/third_party/openssl/openssl/patches/mac_ia32_assembly.patch16865
-rw-r--r--chromium/third_party/openssl/openssl/patches/neon_runtime.patch4
-rw-r--r--chromium/third_party/openssl/openssl/patches/new_channelid.patch273
-rw-r--r--chromium/third_party/openssl/openssl/patches/paddingext.patch96
-rw-r--r--chromium/third_party/openssl/openssl/ssl/d1_both.c13
-rw-r--r--chromium/third_party/openssl/openssl/ssl/d1_clnt.c2
-rw-r--r--chromium/third_party/openssl/openssl/ssl/d1_lib.c9
-rw-r--r--chromium/third_party/openssl/openssl/ssl/d1_pkt.c18
-rw-r--r--chromium/third_party/openssl/openssl/ssl/d1_srvr.c1
-rw-r--r--chromium/third_party/openssl/openssl/ssl/s23_clnt.c10
-rw-r--r--chromium/third_party/openssl/openssl/ssl/s3_clnt.c152
-rw-r--r--chromium/third_party/openssl/openssl/ssl/s3_pkt.c20
-rw-r--r--chromium/third_party/openssl/openssl/ssl/s3_srvr.c3
-rw-r--r--chromium/third_party/openssl/openssl/ssl/ssl.h10
-rw-r--r--chromium/third_party/openssl/openssl/ssl/ssl3.h3
-rw-r--r--chromium/third_party/openssl/openssl/ssl/ssl_cert.c15
-rw-r--r--chromium/third_party/openssl/openssl/ssl/ssl_lib.c29
-rw-r--r--chromium/third_party/openssl/openssl/ssl/ssl_locl.h8
-rw-r--r--chromium/third_party/openssl/openssl/ssl/t1_enc.c90
-rw-r--r--chromium/third_party/openssl/openssl/ssl/t1_lib.c202
-rw-r--r--chromium/third_party/openssl/openssl/ssl/tls1.h8
-rw-r--r--chromium/third_party/openssl/openssl_nacl.gyp65
-rw-r--r--chromium/third_party/openssl/patches.chromium/0007-chacha.patch2
-rw-r--r--chromium/third_party/openssl/patches.chromium/0008-paddingext.patch95
-rw-r--r--chromium/third_party/openssl/patches.chromium/0009-stricter_cutthrough.patch72
-rw-r--r--chromium/third_party/openssl/patches.chromium/0010-mac_ia32_assembly.patch17016
-rw-r--r--chromium/third_party/openssl/patches.chromium/0011-fix_limit_checks.patch121
-rw-r--r--chromium/third_party/openssl/patches.chromium/0012-paddingext2.patch137
-rw-r--r--chromium/third_party/openssl/patches.chromium/0013-reorder_extensions.patch136
-rw-r--r--chromium/third_party/openssl/patches.chromium/0014-new_channelid.patch537
-rw-r--r--chromium/third_party/openssl/patches.chromium/0015-export_certificate_types.patch80
-rw-r--r--chromium/third_party/openssl/patches.chromium/0016-send_client_verify_cleanup.patch187
-rw-r--r--chromium/third_party/opus/README.chromium2
-rw-r--r--chromium/third_party/opus/opus.gyp275
-rw-r--r--chromium/third_party/opus/opus_nacl.gyp44
-rw-r--r--chromium/third_party/opus/opus_srcs.gypi230
-rw-r--r--chromium/third_party/opus/opus_srcs_arm.gypi17
-rw-r--r--chromium/third_party/opus/opus_srcs_rtcd.gypi30
-rw-r--r--chromium/third_party/opus/src/INSTALL371
-rw-r--r--chromium/third_party/opus/src/Makefile.am28
-rw-r--r--chromium/third_party/opus/src/Makefile.in684
-rw-r--r--chromium/third_party/opus/src/Makefile.unix4
-rw-r--r--chromium/third_party/opus/src/aclocal.m48631
-rw-r--r--chromium/third_party/opus/src/celt/_kiss_fft_guts.h4
-rw-r--r--chromium/third_party/opus/src/celt/arch.h7
-rw-r--r--chromium/third_party/opus/src/celt/arm/arm2gnu.pl340
-rw-r--r--chromium/third_party/opus/src/celt/arm/arm_celt_map.c49
-rw-r--r--chromium/third_party/opus/src/celt/arm/armcpu.c18
-rw-r--r--chromium/third_party/opus/src/celt/arm/armcpu.h42
-rw-r--r--chromium/third_party/opus/src/celt/arm/armopts.s.in37
-rw-r--r--chromium/third_party/opus/src/celt/arm/celt_pitch_xcorr_arm.s545
-rw-r--r--chromium/third_party/opus/src/celt/arm/fixed_armv4.h4
-rw-r--r--chromium/third_party/opus/src/celt/arm/fixed_armv5e.h10
-rw-r--r--chromium/third_party/opus/src/celt/arm/pitch_arm.h57
-rw-r--r--chromium/third_party/opus/src/celt/bands.c28
-rw-r--r--chromium/third_party/opus/src/celt/celt.h15
-rw-r--r--chromium/third_party/opus/src/celt/celt_decoder.c18
-rw-r--r--chromium/third_party/opus/src/celt/celt_encoder.c102
-rw-r--r--chromium/third_party/opus/src/celt/celt_lpc.c5
-rw-r--r--chromium/third_party/opus/src/celt/celt_lpc.h3
-rw-r--r--chromium/third_party/opus/src/celt/cpu_support.h7
-rw-r--r--chromium/third_party/opus/src/celt/cwrs.c12
-rw-r--r--chromium/third_party/opus/src/celt/ecintrin.h2
-rw-r--r--chromium/third_party/opus/src/celt/entcode.h9
-rw-r--r--chromium/third_party/opus/src/celt/fixed_debug.h68
-rw-r--r--chromium/third_party/opus/src/celt/fixed_generic.h2
-rw-r--r--chromium/third_party/opus/src/celt/float_cast.h4
-rw-r--r--chromium/third_party/opus/src/celt/mathops.c2
-rw-r--r--chromium/third_party/opus/src/celt/mathops.h22
-rw-r--r--chromium/third_party/opus/src/celt/os_support.h9
-rw-r--r--chromium/third_party/opus/src/celt/pitch.c15
-rw-r--r--chromium/third_party/opus/src/celt/pitch.h38
-rw-r--r--chromium/third_party/opus/src/celt/quant_bands.c6
-rw-r--r--chromium/third_party/opus/src/celt/rate.c2
-rw-r--r--chromium/third_party/opus/src/celt/rate.h6
-rw-r--r--chromium/third_party/opus/src/celt/stack_alloc.h9
-rw-r--r--chromium/third_party/opus/src/celt/x86/pitch_sse.h6
-rw-r--r--chromium/third_party/opus/src/celt_headers.mk1
-rw-r--r--chromium/third_party/opus/src/celt_sources.mk9
-rw-r--r--chromium/third_party/opus/src/codereview.settings10
-rw-r--r--chromium/third_party/opus/src/config.h.in55
-rwxr-xr-xchromium/third_party/opus/src/configure1645
-rw-r--r--chromium/third_party/opus/src/configure.ac233
-rw-r--r--chromium/third_party/opus/src/doc/Makefile.am3
-rw-r--r--chromium/third_party/opus/src/doc/Makefile.in24
-rw-r--r--chromium/third_party/opus/src/doc/trivial_example.c160
-rw-r--r--chromium/third_party/opus/src/include/opus.h58
-rw-r--r--chromium/third_party/opus/src/include/opus_custom.h7
-rw-r--r--chromium/third_party/opus/src/include/opus_defines.h23
-rw-r--r--chromium/third_party/opus/src/m4/as-gcc-inline-assembly.m431
-rw-r--r--chromium/third_party/opus/src/m4/libtool.m4 (renamed from chromium/third_party/libmtp/m4/libtool.m4)0
-rw-r--r--chromium/third_party/opus/src/m4/ltoptions.m4 (renamed from chromium/third_party/libmtp/m4/ltoptions.m4)0
-rw-r--r--chromium/third_party/opus/src/m4/ltsugar.m4 (renamed from chromium/third_party/libmtp/m4/ltsugar.m4)0
-rw-r--r--chromium/third_party/opus/src/m4/ltversion.m4 (renamed from chromium/third_party/libmtp/m4/ltversion.m4)0
-rw-r--r--chromium/third_party/opus/src/m4/lt~obsolete.m4 (renamed from chromium/third_party/libmtp/m4/lt~obsolete.m4)0
-rw-r--r--chromium/third_party/opus/src/package_version1
-rw-r--r--chromium/third_party/opus/src/silk/A2NLSF.c6
-rw-r--r--chromium/third_party/opus/src/silk/API.h1
-rw-r--r--chromium/third_party/opus/src/silk/CNG.c2
-rw-r--r--chromium/third_party/opus/src/silk/Inlines.h12
-rw-r--r--chromium/third_party/opus/src/silk/LP_variable_cutoff.c2
-rw-r--r--chromium/third_party/opus/src/silk/MacroCount.h160
-rw-r--r--chromium/third_party/opus/src/silk/MacroDebug.h110
-rw-r--r--chromium/third_party/opus/src/silk/NLSF2A.c2
-rw-r--r--chromium/third_party/opus/src/silk/NLSF_decode.c2
-rw-r--r--chromium/third_party/opus/src/silk/NLSF_del_dec_quant.c2
-rw-r--r--chromium/third_party/opus/src/silk/NSQ.c8
-rw-r--r--chromium/third_party/opus/src/silk/NSQ_del_dec.c8
-rw-r--r--chromium/third_party/opus/src/silk/PLC.c8
-rw-r--r--chromium/third_party/opus/src/silk/SigProc_FIX.h33
-rw-r--r--chromium/third_party/opus/src/silk/VAD.c4
-rw-r--r--chromium/third_party/opus/src/silk/VQ_WMat_EC.c11
-rw-r--r--chromium/third_party/opus/src/silk/arm/SigProc_FIX_armv4.h2
-rw-r--r--chromium/third_party/opus/src/silk/arm/SigProc_FIX_armv5e.h4
-rw-r--r--chromium/third_party/opus/src/silk/arm/macros_armv4.h8
-rw-r--r--chromium/third_party/opus/src/silk/arm/macros_armv5e.h24
-rw-r--r--chromium/third_party/opus/src/silk/control.h3
-rw-r--r--chromium/third_party/opus/src/silk/control_codec.c4
-rw-r--r--chromium/third_party/opus/src/silk/dec_API.c2
-rw-r--r--chromium/third_party/opus/src/silk/enc_API.c15
-rw-r--r--chromium/third_party/opus/src/silk/encode_pulses.c2
-rw-r--r--chromium/third_party/opus/src/silk/fixed/autocorr_FIX.c5
-rw-r--r--chromium/third_party/opus/src/silk/fixed/burg_modified_FIX.c5
-rw-r--r--chromium/third_party/opus/src/silk/fixed/encode_frame_FIX.c16
-rw-r--r--chromium/third_party/opus/src/silk/fixed/find_LPC_FIX.c4
-rw-r--r--chromium/third_party/opus/src/silk/fixed/find_pitch_lags_FIX.c8
-rw-r--r--chromium/third_party/opus/src/silk/fixed/find_pred_coefs_FIX.c3
-rw-r--r--chromium/third_party/opus/src/silk/fixed/main_FIX.h9
-rw-r--r--chromium/third_party/opus/src/silk/fixed/noise_shape_analysis_FIX.c9
-rw-r--r--chromium/third_party/opus/src/silk/fixed/pitch_analysis_core_FIX.c17
-rw-r--r--chromium/third_party/opus/src/silk/fixed/prefilter_FIX.c4
-rw-r--r--chromium/third_party/opus/src/silk/fixed/solve_LS_FIX.c16
-rw-r--r--chromium/third_party/opus/src/silk/float/LPC_analysis_filter_FLP.c10
-rw-r--r--chromium/third_party/opus/src/silk/float/SigProc_FLP.h13
-rw-r--r--chromium/third_party/opus/src/silk/float/encode_frame_FLP.c14
-rw-r--r--chromium/third_party/opus/src/silk/float/find_pitch_lags_FLP.c5
-rw-r--r--chromium/third_party/opus/src/silk/float/find_pred_coefs_FLP.c3
-rw-r--r--chromium/third_party/opus/src/silk/float/main_FLP.h7
-rw-r--r--chromium/third_party/opus/src/silk/float/noise_shape_analysis_FLP.c4
-rw-r--r--chromium/third_party/opus/src/silk/float/pitch_analysis_core_FLP.c18
-rw-r--r--chromium/third_party/opus/src/silk/float/prefilter_FLP.c4
-rw-r--r--chromium/third_party/opus/src/silk/float/solve_LS_FLP.c12
-rw-r--r--chromium/third_party/opus/src/silk/float/wrappers_FLP.c3
-rw-r--r--chromium/third_party/opus/src/silk/init_encoder.c6
-rw-r--r--chromium/third_party/opus/src/silk/log2lin.c4
-rw-r--r--chromium/third_party/opus/src/silk/macros.h13
-rw-r--r--chromium/third_party/opus/src/silk/main.h4
-rw-r--r--chromium/third_party/opus/src/silk/quant_LTP_gains.c21
-rw-r--r--chromium/third_party/opus/src/silk/resampler_private_IIR_FIR.c2
-rw-r--r--chromium/third_party/opus/src/silk/resampler_private_down_FIR.c2
-rw-r--r--chromium/third_party/opus/src/silk/shell_coder.c6
-rw-r--r--chromium/third_party/opus/src/silk/structs.h3
-rw-r--r--chromium/third_party/opus/src/silk/tables.h2
-rw-r--r--chromium/third_party/opus/src/silk/tables_LTP.c24
-rw-r--r--chromium/third_party/opus/src/silk/tuning_parameters.h5
-rw-r--r--chromium/third_party/opus/src/silk/typedef.h3
-rw-r--r--chromium/third_party/opus/src/src/analysis.c32
-rw-r--r--chromium/third_party/opus/src/src/analysis.h2
-rw-r--r--chromium/third_party/opus/src/src/mlp.c12
-rw-r--r--chromium/third_party/opus/src/src/opus.c183
-rw-r--r--chromium/third_party/opus/src/src/opus_decoder.c260
-rw-r--r--chromium/third_party/opus/src/src/opus_demo.c44
-rw-r--r--chromium/third_party/opus/src/src/opus_encoder.c193
-rw-r--r--chromium/third_party/opus/src/src/opus_multistream_decoder.c60
-rw-r--r--chromium/third_party/opus/src/src/opus_multistream_encoder.c61
-rw-r--r--chromium/third_party/opus/src/src/opus_private.h22
-rw-r--r--chromium/third_party/opus/src/src/repacketizer.c195
-rw-r--r--chromium/third_party/opus/src/src/repacketizer_demo.c5
-rw-r--r--chromium/third_party/opus/src/win32/config.h2
-rw-r--r--chromium/third_party/opus/src/win32/genversion.bat12
-rw-r--r--chromium/third_party/ots/ots-common.gypi2
-rw-r--r--chromium/third_party/ots/ots.gyp2
-rw-r--r--chromium/third_party/ots/src/gdef.cc2
-rw-r--r--chromium/third_party/ots/src/gsub.cc2
-rw-r--r--chromium/third_party/ots/src/layout.cc24
-rw-r--r--chromium/third_party/ots/src/layout.h3
-rw-r--r--chromium/third_party/ots/src/math.cc594
-rw-r--r--chromium/third_party/ots/src/math_.h25
-rw-r--r--chromium/third_party/ots/src/ots.cc2
-rw-r--r--chromium/third_party/ots/src/ots.h1
-rw-r--r--chromium/third_party/ots/src/woff2.cc117
-rw-r--r--chromium/third_party/pdfium/build/all.gyp15
-rw-r--r--chromium/third_party/pdfium/build/standalone.gypi253
-rw-r--r--chromium/third_party/pdfium/pdfium.gyp851
-rw-r--r--chromium/third_party/pdfium/samples/samples.gyp21
-rw-r--r--chromium/third_party/polymer/.bowerrc3
-rw-r--r--chromium/third_party/polymer/OWNERS3
-rw-r--r--chromium/third_party/polymer/README.chromium28
-rw-r--r--chromium/third_party/polymer/README.md7
-rw-r--r--chromium/third_party/polymer/bower.json7
-rw-r--r--chromium/third_party/polymer/build.log37
-rw-r--r--chromium/third_party/polymer/platform.js35
-rw-r--r--chromium/third_party/polymer/platform/.bower.json26
-rw-r--r--chromium/third_party/polymer/platform/AUTHORS9
-rw-r--r--chromium/third_party/polymer/platform/CONTRIBUTING.md73
-rw-r--r--chromium/third_party/polymer/platform/LICENSE27
-rw-r--r--chromium/third_party/polymer/platform/PATENTS (renamed from chromium/third_party/polymer/PATENTS)0
-rw-r--r--chromium/third_party/polymer/platform/README.md6
-rw-r--r--chromium/third_party/polymer/platform/bower.json17
-rw-r--r--chromium/third_party/polymer/platform/build.log43
-rw-r--r--chromium/third_party/polymer/platform/platform.js39
-rw-r--r--chromium/third_party/polymer/platform/platform.js.map1
-rw-r--r--chromium/third_party/polymer/polymer.js30
-rw-r--r--chromium/third_party/polymer/polymer/.bower.json28
-rw-r--r--chromium/third_party/polymer/polymer/LICENSE27
-rw-r--r--chromium/third_party/polymer/polymer/README.md17
-rw-r--r--chromium/third_party/polymer/polymer/bower.json19
-rw-r--r--chromium/third_party/polymer/polymer/build.log30
-rw-r--r--chromium/third_party/polymer/polymer/polymer-body.html33
-rw-r--r--chromium/third_party/polymer/polymer/polymer.html8
-rw-r--r--chromium/third_party/polymer/polymer/polymer.js33
-rw-r--r--chromium/third_party/polymer/polymer/polymer.js.map1
-rw-r--r--chromium/third_party/power_gadget/BUILD.gn12
-rw-r--r--chromium/third_party/power_gadget/LICENSE28
-rw-r--r--chromium/third_party/power_gadget/PowerGadgetLib.cpp269
-rw-r--r--chromium/third_party/power_gadget/PowerGadgetLib.h97
-rw-r--r--chromium/third_party/power_gadget/README.chromium18
-rw-r--r--chromium/third_party/power_gadget/power_gadget.gyp16
-rw-r--r--chromium/third_party/protobuf/BUILD.gn245
-rw-r--r--chromium/third_party/protobuf/README.chromium5
-rw-r--r--chromium/third_party/protobuf/config.h48
-rw-r--r--chromium/third_party/protobuf/proto_library.gni155
-rw-r--r--chromium/third_party/protobuf/protobuf_nacl.gyp36
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc2
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc30
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h90
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/descriptor.cc8
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/descriptor.pb.cc138
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/descriptor.pb.h414
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/generated_message_reflection.cc10
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/generated_message_util.cc7
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/generated_message_util.h14
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/repeated_field.h2
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops.h2
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_arm64_gcc.h325
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_tsan.h177
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/platform_macros.h3
-rw-r--r--chromium/third_party/pywebsocket/src/example/abort_handshake_wsh.py43
-rw-r--r--chromium/third_party/pywebsocket/src/example/abort_wsh.py43
-rw-r--r--chromium/third_party/pywebsocket/src/example/arraybuffer_benchmark.html134
-rw-r--r--chromium/third_party/pywebsocket/src/example/benchmark.html313
-rw-r--r--chromium/third_party/pywebsocket/src/example/benchmark_helper_wsh.py60
-rw-r--r--chromium/third_party/pywebsocket/src/example/console.html175
-rwxr-xr-xchromium/third_party/pywebsocket/src/example/echo_client.py386
-rw-r--r--chromium/third_party/pywebsocket/src/example/echo_noext_wsh.py61
-rwxr-xr-xchromium/third_party/pywebsocket/src/example/eventsource.cgi54
-rw-r--r--chromium/third_party/pywebsocket/src/example/eventsource.html74
-rw-r--r--chromium/third_party/pywebsocket/src/example/hsts_wsh.py40
-rw-r--r--chromium/third_party/pywebsocket/src/example/internal_error_wsh.py42
-rw-r--r--chromium/third_party/pywebsocket/src/example/util.js143
-rw-r--r--chromium/third_party/pywebsocket/src/example/xhr_benchmark.html310
-rw-r--r--chromium/third_party/pywebsocket/src/mod_pywebsocket/__init__.py68
-rw-r--r--chromium/third_party/pywebsocket/src/mod_pywebsocket/_stream_base.py46
-rw-r--r--chromium/third_party/pywebsocket/src/mod_pywebsocket/_stream_hixie75.py3
-rw-r--r--chromium/third_party/pywebsocket/src/mod_pywebsocket/_stream_hybi.py118
-rw-r--r--chromium/third_party/pywebsocket/src/mod_pywebsocket/common.py5
-rw-r--r--chromium/third_party/pywebsocket/src/mod_pywebsocket/dispatch.py10
-rw-r--r--chromium/third_party/pywebsocket/src/mod_pywebsocket/extensions.py704
-rw-r--r--chromium/third_party/pywebsocket/src/mod_pywebsocket/fast_masking.i98
-rw-r--r--chromium/third_party/pywebsocket/src/mod_pywebsocket/handshake/__init__.py10
-rw-r--r--chromium/third_party/pywebsocket/src/mod_pywebsocket/handshake/_base.py77
-rw-r--r--chromium/third_party/pywebsocket/src/mod_pywebsocket/handshake/draft75.py190
-rw-r--r--chromium/third_party/pywebsocket/src/mod_pywebsocket/handshake/hybi.py77
-rw-r--r--chromium/third_party/pywebsocket/src/mod_pywebsocket/handshake/hybi00.py63
-rw-r--r--chromium/third_party/pywebsocket/src/mod_pywebsocket/headerparserhandler.py33
-rw-r--r--chromium/third_party/pywebsocket/src/mod_pywebsocket/msgutil.py16
-rw-r--r--chromium/third_party/pywebsocket/src/mod_pywebsocket/mux.py1029
-rwxr-xr-xchromium/third_party/pywebsocket/src/mod_pywebsocket/standalone.py375
-rw-r--r--chromium/third_party/pywebsocket/src/mod_pywebsocket/util.py208
-rwxr-xr-xchromium/third_party/pywebsocket/src/setup.py16
-rw-r--r--chromium/third_party/qcms/BUILD.gn44
-rw-r--r--chromium/third_party/qcms/README.chromium4
-rw-r--r--chromium/third_party/qcms/google.patch78
-rw-r--r--chromium/third_party/qcms/qcms.gyp24
-rw-r--r--chromium/third_party/qcms/src/iccread.c3
-rw-r--r--chromium/third_party/qcms/src/qcmstypes.h35
-rw-r--r--chromium/third_party/qunit/LICENSE21
-rw-r--r--chromium/third_party/qunit/OWNERS2
-rw-r--r--chromium/third_party/qunit/README.chromium32
-rw-r--r--chromium/third_party/qunit/src/qunit.css237
-rw-r--r--chromium/third_party/qunit/src/qunit.js2288
-rw-r--r--chromium/third_party/re2/BUILD.gn77
-rw-r--r--chromium/third_party/re2/README.chromium6
-rw-r--r--chromium/third_party/re2/patches/re2-msan.patch63
-rw-r--r--chromium/third_party/re2/patches/this-null.patch71
-rw-r--r--chromium/third_party/re2/re2.gyp2
-rw-r--r--chromium/third_party/re2/re2/prefilter.cc19
-rw-r--r--chromium/third_party/re2/re2/regexp.cc2
-rw-r--r--chromium/third_party/re2/util/sparse_array.h5
-rw-r--r--chromium/third_party/re2/util/sparse_set.h5
-rw-r--r--chromium/third_party/re2/util/util.h8
-rw-r--r--chromium/third_party/readability/README.chromium6
-rw-r--r--chromium/third_party/readability/css/readability.css83
-rw-r--r--chromium/third_party/readability/js/readability.js231
-rw-r--r--chromium/third_party/sfntly/cpp/src/sample/chromium/font_subsetter.h2
-rw-r--r--chromium/third_party/sfntly/cpp/src/sfntly/port/type.h2
-rw-r--r--chromium/third_party/sfntly/cpp/src/sfntly/table/bitmap/bitmap_glyph_info.cc2
-rw-r--r--chromium/third_party/sinonjs/LICENSE27
-rw-r--r--chromium/third_party/sinonjs/OWNERS2
-rw-r--r--chromium/third_party/sinonjs/README.chromium14
-rw-r--r--chromium/third_party/sinonjs/src/sinon-qunit.js62
-rw-r--r--chromium/third_party/sinonjs/src/sinon.js5058
-rw-r--r--chromium/third_party/skia/AUTHORS28
-rw-r--r--chromium/third_party/skia/CONTRIBUTING1
-rw-r--r--chromium/third_party/skia/CQ_COMMITTERS43
-rw-r--r--chromium/third_party/skia/DEPS52
-rw-r--r--chromium/third_party/skia/Doxyfile57
-rw-r--r--chromium/third_party/skia/Makefile97
-rw-r--r--chromium/third_party/skia/PRESUBMIT.py218
-rw-r--r--chromium/third_party/skia/README3
-rw-r--r--chromium/third_party/skia/SKP_VERSION1
-rw-r--r--chromium/third_party/skia/animations/checkbox.xml67
-rw-r--r--chromium/third_party/skia/animations/chest#1.jpgbin0 -> 15734 bytes
-rw-r--r--chromium/third_party/skia/animations/fire#1.jpgbin0 -> 13041 bytes
-rw-r--r--chromium/third_party/skia/animations/images#1.xml102
-rw-r--r--chromium/third_party/skia/animations/jet#1.jpgbin0 -> 12409 bytes
-rw-r--r--chromium/third_party/skia/animations/lines#1.xml66
-rw-r--r--chromium/third_party/skia/animations/movie#1.xml23
-rw-r--r--chromium/third_party/skia/animations/paths#1.xml69
-rw-r--r--chromium/third_party/skia/animations/redcross#1.jpgbin0 -> 22387 bytes
-rw-r--r--chromium/third_party/skia/animations/text#1.xml84
-rw-r--r--chromium/third_party/skia/bench/AAClipBench.cpp257
-rw-r--r--chromium/third_party/skia/bench/BenchGpuTimer_gl.cpp74
-rw-r--r--chromium/third_party/skia/bench/BenchGpuTimer_gl.h26
-rw-r--r--chromium/third_party/skia/bench/BenchLogger.cpp30
-rw-r--r--chromium/third_party/skia/bench/BenchLogger.h76
-rw-r--r--chromium/third_party/skia/bench/BenchSysTimer_c.cpp27
-rw-r--r--chromium/third_party/skia/bench/BenchSysTimer_c.h26
-rw-r--r--chromium/third_party/skia/bench/BenchSysTimer_mach.cpp76
-rw-r--r--chromium/third_party/skia/bench/BenchSysTimer_mach.h26
-rw-r--r--chromium/third_party/skia/bench/BenchSysTimer_posix.cpp57
-rw-r--r--chromium/third_party/skia/bench/BenchSysTimer_posix.h25
-rw-r--r--chromium/third_party/skia/bench/BenchSysTimer_windows.cpp64
-rw-r--r--chromium/third_party/skia/bench/BenchSysTimer_windows.h26
-rw-r--r--chromium/third_party/skia/bench/BenchTimer.cpp94
-rw-r--r--chromium/third_party/skia/bench/BenchTimer.h67
-rw-r--r--chromium/third_party/skia/bench/BenchTool/BenchTool.xcodeproj/project.pbxproj324
-rw-r--r--chromium/third_party/skia/bench/Benchmark.cpp56
-rw-r--r--chromium/third_party/skia/bench/Benchmark.h128
-rw-r--r--chromium/third_party/skia/bench/BicubicBench.cpp58
-rw-r--r--chromium/third_party/skia/bench/BitmapBench.cpp381
-rw-r--r--chromium/third_party/skia/bench/BitmapRectBench.cpp113
-rw-r--r--chromium/third_party/skia/bench/BitmapScaleBench.cpp111
-rw-r--r--chromium/third_party/skia/bench/BlurBench.cpp109
-rw-r--r--chromium/third_party/skia/bench/BlurImageFilterBench.cpp95
-rw-r--r--chromium/third_party/skia/bench/BlurRectBench.cpp228
-rw-r--r--chromium/third_party/skia/bench/BlurRoundRectBench.cpp93
-rw-r--r--chromium/third_party/skia/bench/ChartBench.cpp192
-rw-r--r--chromium/third_party/skia/bench/ChecksumBench.cpp97
-rw-r--r--chromium/third_party/skia/bench/ChromeBench.cpp496
-rw-r--r--chromium/third_party/skia/bench/CmapBench.cpp102
-rw-r--r--chromium/third_party/skia/bench/ColorFilterBench.cpp367
-rw-r--r--chromium/third_party/skia/bench/ColorPrivBench.cpp81
-rw-r--r--chromium/third_party/skia/bench/CoverageBench.cpp70
-rw-r--r--chromium/third_party/skia/bench/DashBench.cpp489
-rw-r--r--chromium/third_party/skia/bench/DecodeBench.cpp50
-rw-r--r--chromium/third_party/skia/bench/DeferredCanvasBench.cpp106
-rw-r--r--chromium/third_party/skia/bench/DeferredSurfaceCopyBench.cpp82
-rw-r--r--chromium/third_party/skia/bench/DisplacementBench.cpp174
-rw-r--r--chromium/third_party/skia/bench/ETCBitmapBench.cpp235
-rw-r--r--chromium/third_party/skia/bench/FSRectBench.cpp63
-rw-r--r--chromium/third_party/skia/bench/FontCacheBench.cpp158
-rw-r--r--chromium/third_party/skia/bench/FontScalerBench.cpp52
-rw-r--r--chromium/third_party/skia/bench/GMBench.cpp51
-rw-r--r--chromium/third_party/skia/bench/GMBench.h31
-rw-r--r--chromium/third_party/skia/bench/GameBench.cpp334
-rw-r--r--chromium/third_party/skia/bench/GrMemoryPoolBench.cpp178
-rw-r--r--chromium/third_party/skia/bench/GrOrderedSetBench.cpp148
-rw-r--r--chromium/third_party/skia/bench/GrResourceCacheBench.cpp239
-rw-r--r--chromium/third_party/skia/bench/GradientBench.cpp390
-rw-r--r--chromium/third_party/skia/bench/HairlinePathBench.cpp258
-rw-r--r--chromium/third_party/skia/bench/ImageCacheBench.cpp57
-rw-r--r--chromium/third_party/skia/bench/ImageDecodeBench.cpp93
-rw-r--r--chromium/third_party/skia/bench/ImageFilterDAGBench.cpp46
-rw-r--r--chromium/third_party/skia/bench/InterpBench.cpp163
-rw-r--r--chromium/third_party/skia/bench/LightingBench.cpp246
-rw-r--r--chromium/third_party/skia/bench/LineBench.cpp66
-rw-r--r--chromium/third_party/skia/bench/MagnifierBench.cpp85
-rw-r--r--chromium/third_party/skia/bench/MathBench.cpp611
-rw-r--r--chromium/third_party/skia/bench/Matrix44Bench.cpp304
-rw-r--r--chromium/third_party/skia/bench/MatrixBench.cpp472
-rw-r--r--chromium/third_party/skia/bench/MatrixConvolutionBench.cpp60
-rw-r--r--chromium/third_party/skia/bench/MemcpyBench.cpp160
-rw-r--r--chromium/third_party/skia/bench/MemoryBench.cpp165
-rw-r--r--chromium/third_party/skia/bench/MemsetBench.cpp116
-rw-r--r--chromium/third_party/skia/bench/MergeBench.cpp97
-rw-r--r--chromium/third_party/skia/bench/MorphologyBench.cpp96
-rw-r--r--chromium/third_party/skia/bench/MutexBench.cpp35
-rw-r--r--chromium/third_party/skia/bench/PathBench.cpp1019
-rw-r--r--chromium/third_party/skia/bench/PathIterBench.cpp95
-rw-r--r--chromium/third_party/skia/bench/PathUtilsBench.cpp72
-rw-r--r--chromium/third_party/skia/bench/PerlinNoiseBench.cpp62
-rw-r--r--chromium/third_party/skia/bench/PicturePlaybackBench.cpp141
-rw-r--r--chromium/third_party/skia/bench/PictureRecordBench.cpp178
-rw-r--r--chromium/third_party/skia/bench/PremulAndUnpremulAlphaOpsBench.cpp66
-rw-r--r--chromium/third_party/skia/bench/QuadTreeBench.cpp216
-rw-r--r--chromium/third_party/skia/bench/RTreeBench.cpp269
-rw-r--r--chromium/third_party/skia/bench/ReadPixBench.cpp67
-rw-r--r--chromium/third_party/skia/bench/RectBench.cpp345
-rw-r--r--chromium/third_party/skia/bench/RectanizerBench.cpp138
-rw-r--r--chromium/third_party/skia/bench/RectoriBench.cpp104
-rw-r--r--chromium/third_party/skia/bench/RefCntBench.cpp200
-rw-r--r--chromium/third_party/skia/bench/RegionBench.cpp188
-rw-r--r--chromium/third_party/skia/bench/RegionContainBench.cpp67
-rw-r--r--chromium/third_party/skia/bench/RepeatTileBench.cpp146
-rw-r--r--chromium/third_party/skia/bench/ResultsWriter.cpp30
-rw-r--r--chromium/third_party/skia/bench/ResultsWriter.h198
-rw-r--r--chromium/third_party/skia/bench/ScalarBench.cpp168
-rw-r--r--chromium/third_party/skia/bench/ShaderMaskBench.cpp98
-rw-r--r--chromium/third_party/skia/bench/SkipZeroesBench.cpp118
-rw-r--r--chromium/third_party/skia/bench/SortBench.cpp172
-rw-r--r--chromium/third_party/skia/bench/StackBench.cpp179
-rw-r--r--chromium/third_party/skia/bench/StrokeBench.cpp104
-rw-r--r--chromium/third_party/skia/bench/TableBench.cpp72
-rw-r--r--chromium/third_party/skia/bench/TextBench.cpp145
-rw-r--r--chromium/third_party/skia/bench/TileBench.cpp131
-rw-r--r--chromium/third_party/skia/bench/TimerData.cpp224
-rw-r--r--chromium/third_party/skia/bench/TimerData.h86
-rw-r--r--chromium/third_party/skia/bench/VertBench.cpp95
-rw-r--r--chromium/third_party/skia/bench/WritePixelsBench.cpp77
-rw-r--r--chromium/third_party/skia/bench/WriterBench.cpp41
-rw-r--r--chromium/third_party/skia/bench/XfermodeBench.cpp127
-rwxr-xr-xchromium/third_party/skia/bench/bench_compare.py193
-rw-r--r--chromium/third_party/skia/bench/bench_util.py356
-rw-r--r--chromium/third_party/skia/bench/benchmain.cpp686
-rw-r--r--chromium/third_party/skia/bench/check_bench_regressions.py244
-rw-r--r--chromium/third_party/skia/bench/gUniqueGlyphIDs.h468
-rw-r--r--chromium/third_party/skia/bench/gen_bench_expectations.py223
-rwxr-xr-xchromium/third_party/skia/bench/tile_analyze.py279
-rw-r--r--chromium/third_party/skia/codereview.settings6
-rw-r--r--chromium/third_party/skia/debugger/QT/Icons/.qrc17
-rw-r--r--chromium/third_party/skia/debugger/QT/Icons/blank.pngbin0 -> 146 bytes
-rw-r--r--chromium/third_party/skia/debugger/QT/Icons/breakpoint.pngbin0 -> 2247 bytes
-rw-r--r--chromium/third_party/skia/debugger/QT/Icons/breakpoint_16x16.pngbin0 -> 1108 bytes
-rw-r--r--chromium/third_party/skia/debugger/QT/Icons/delete.pngbin0 -> 1415 bytes
-rw-r--r--chromium/third_party/skia/debugger/QT/Icons/doit.bat1
-rw-r--r--chromium/third_party/skia/debugger/QT/Icons/inspector.pngbin0 -> 1960 bytes
-rw-r--r--chromium/third_party/skia/debugger/QT/Icons/next.pngbin0 -> 938 bytes
-rw-r--r--chromium/third_party/skia/debugger/QT/Icons/pause.pngbin0 -> 1181 bytes
-rw-r--r--chromium/third_party/skia/debugger/QT/Icons/play.pngbin0 -> 1073 bytes
-rw-r--r--chromium/third_party/skia/debugger/QT/Icons/previous.pngbin0 -> 943 bytes
-rw-r--r--chromium/third_party/skia/debugger/QT/Icons/profile.pngbin0 -> 243 bytes
-rw-r--r--chromium/third_party/skia/debugger/QT/Icons/reload.pngbin0 -> 1932 bytes
-rw-r--r--chromium/third_party/skia/debugger/QT/Icons/rewind.pngbin0 -> 1105 bytes
-rw-r--r--chromium/third_party/skia/debugger/QT/Icons/skia.pngbin0 -> 1054 bytes
-rw-r--r--chromium/third_party/skia/debugger/QT/SkCanvasWidget.cpp144
-rw-r--r--chromium/third_party/skia/debugger/QT/SkCanvasWidget.h86
-rw-r--r--chromium/third_party/skia/debugger/QT/SkDebuggerGUI.cpp1078
-rw-r--r--chromium/third_party/skia/debugger/QT/SkDebuggerGUI.h365
-rw-r--r--chromium/third_party/skia/debugger/QT/SkGLWidget.cpp98
-rw-r--r--chromium/third_party/skia/debugger/QT/SkGLWidget.h58
-rw-r--r--chromium/third_party/skia/debugger/QT/SkIcons.qrc18
-rw-r--r--chromium/third_party/skia/debugger/QT/SkImageWidget.cpp58
-rw-r--r--chromium/third_party/skia/debugger/QT/SkImageWidget.h46
-rw-r--r--chromium/third_party/skia/debugger/QT/SkInspectorWidget.cpp115
-rw-r--r--chromium/third_party/skia/debugger/QT/SkInspectorWidget.h107
-rw-r--r--chromium/third_party/skia/debugger/QT/SkListWidget.cpp121
-rw-r--r--chromium/third_party/skia/debugger/QT/SkListWidget.h56
-rw-r--r--chromium/third_party/skia/debugger/QT/SkRasterWidget.cpp57
-rw-r--r--chromium/third_party/skia/debugger/QT/SkRasterWidget.h50
-rw-r--r--chromium/third_party/skia/debugger/QT/SkSettingsWidget.cpp217
-rw-r--r--chromium/third_party/skia/debugger/QT/SkSettingsWidget.h152
-rw-r--r--chromium/third_party/skia/debugger/QT/qrc_SkIcons.cpp1150
-rw-r--r--chromium/third_party/skia/debugger/SkDebugger.cpp157
-rw-r--r--chromium/third_party/skia/debugger/SkDebugger.h147
-rw-r--r--chromium/third_party/skia/debugger/debuggermain.cpp59
-rw-r--r--chromium/third_party/skia/dm/DM.cpp282
-rw-r--r--chromium/third_party/skia/dm/DMBenchTask.cpp83
-rw-r--r--chromium/third_party/skia/dm/DMBenchTask.h64
-rw-r--r--chromium/third_party/skia/dm/DMCpuGMTask.cpp63
-rw-r--r--chromium/third_party/skia/dm/DMCpuGMTask.h41
-rw-r--r--chromium/third_party/skia/dm/DMExpectations.h46
-rw-r--r--chromium/third_party/skia/dm/DMExpectationsTask.cpp21
-rw-r--r--chromium/third_party/skia/dm/DMExpectationsTask.h29
-rw-r--r--chromium/third_party/skia/dm/DMGpuGMTask.cpp51
-rw-r--r--chromium/third_party/skia/dm/DMGpuGMTask.h42
-rw-r--r--chromium/third_party/skia/dm/DMGpuSupport.h60
-rw-r--r--chromium/third_party/skia/dm/DMPDFRasterizeTask.cpp37
-rw-r--r--chromium/third_party/skia/dm/DMPDFRasterizeTask.h40
-rw-r--r--chromium/third_party/skia/dm/DMPDFTask.cpp101
-rw-r--r--chromium/third_party/skia/dm/DMPDFTask.h48
-rw-r--r--chromium/third_party/skia/dm/DMPipeTask.cpp82
-rw-r--r--chromium/third_party/skia/dm/DMPipeTask.h41
-rw-r--r--chromium/third_party/skia/dm/DMQuiltTask.cpp68
-rw-r--r--chromium/third_party/skia/dm/DMQuiltTask.h33
-rw-r--r--chromium/third_party/skia/dm/DMRecordTask.cpp63
-rw-r--r--chromium/third_party/skia/dm/DMRecordTask.h39
-rw-r--r--chromium/third_party/skia/dm/DMReplayTask.cpp55
-rw-r--r--chromium/third_party/skia/dm/DMReplayTask.h39
-rw-r--r--chromium/third_party/skia/dm/DMReporter.cpp44
-rw-r--r--chromium/third_party/skia/dm/DMReporter.h36
-rw-r--r--chromium/third_party/skia/dm/DMSKPTask.cpp23
-rw-r--r--chromium/third_party/skia/dm/DMSKPTask.h30
-rw-r--r--chromium/third_party/skia/dm/DMSerializeTask.cpp43
-rw-r--r--chromium/third_party/skia/dm/DMSerializeTask.h33
-rw-r--r--chromium/third_party/skia/dm/DMTask.cpp86
-rw-r--r--chromium/third_party/skia/dm/DMTask.h73
-rw-r--r--chromium/third_party/skia/dm/DMTaskRunner.cpp21
-rw-r--r--chromium/third_party/skia/dm/DMTaskRunner.h32
-rw-r--r--chromium/third_party/skia/dm/DMTestTask.cpp61
-rw-r--r--chromium/third_party/skia/dm/DMTestTask.h62
-rw-r--r--chromium/third_party/skia/dm/DMUtil.cpp102
-rw-r--r--chromium/third_party/skia/dm/DMUtil.h42
-rw-r--r--chromium/third_party/skia/dm/DMWriteTask.cpp195
-rw-r--r--chromium/third_party/skia/dm/DMWriteTask.h51
-rw-r--r--chromium/third_party/skia/dm/README25
-rw-r--r--chromium/third_party/skia/docs/quickstart.md44
-rw-r--r--chromium/third_party/skia/expectations/bench/bench_expectations_Perf-Android-GalaxyNexus-SGX540-Arm7-Release.txt252
-rw-r--r--chromium/third_party/skia/expectations/bench/bench_expectations_Perf-Android-Nexus10-MaliT604-Arm7-Release.txt252
-rw-r--r--chromium/third_party/skia/expectations/bench/bench_expectations_Perf-Android-Nexus4-Adreno320-Arm7-Release.txt252
-rw-r--r--chromium/third_party/skia/expectations/bench/bench_expectations_Perf-Android-Nexus7-Tegra3-Arm7-Release.txt252
-rw-r--r--chromium/third_party/skia/expectations/bench/bench_expectations_Perf-Mac10.8-MacMini4.1-GeForce320M-x86-Release.txt252
-rw-r--r--chromium/third_party/skia/expectations/bench/bench_expectations_Perf-Ubuntu12-ShuttleA-GTX660-x86-Release.txt252
-rw-r--r--chromium/third_party/skia/expectations/bench/bench_expectations_Perf-Win7-ShuttleA-HD2000-x86-Release-ANGLE.txt63
-rw-r--r--chromium/third_party/skia/expectations/bench/bench_expectations_Perf-Win7-ShuttleA-HD2000-x86-Release.txt252
-rw-r--r--chromium/third_party/skia/expectations/bench/bench_expectations_Perf-Win8-ShuttleA-GTX660-x86-Release.txt252
-rw-r--r--chromium/third_party/skia/expectations/bench/bench_expectations_Perf-Win8-ShuttleA-HD7770-x86-Release.txt252
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-GalaxyNexus-SGX540-Arm7-Debug/expected-results.json7402
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-GalaxyNexus-SGX540-Arm7-Release/expected-results.json7394
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-IntelRhb-SGX544-x86-Debug/expected-results.json9196
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-IntelRhb-SGX544-x86-Release/expected-results.json9194
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-Logan-Nvidia-Arm7-Debug/expected-results.json13333
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-Logan-Nvidia-Arm7-Release/expected-results.json13333
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-Nexus10-MaliT604-Arm7-Debug/expected-results.json11752
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-Nexus10-MaliT604-Arm7-Release/expected-results.json11752
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-Nexus4-Adreno320-Arm7-Debug/expected-results.json9463
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-Nexus4-Adreno320-Arm7-Release/expected-results.json9463
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-Nexus7-Tegra3-Arm7-Debug/expected-results.json8712
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-Nexus7-Tegra3-Arm7-Release/expected-results.json8712
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-NexusS-SGX540-Arm7-Debug/expected-results.json7376
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-NexusS-SGX540-Arm7-Release/expected-results.json7376
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-RazrI-SGX540-x86-Debug/expected-results.json10906
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-RazrI-SGX540-x86-Release/expected-results.json10858
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-Xoom-Tegra2-Arm7-Debug/expected-results.json8792
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Android-Xoom-Tegra2-Arm7-Release/expected-results.json8792
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-ChromeOS-Alex-GMA3150-x86-Debug/expected-results.json6467
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-ChromeOS-Alex-GMA3150-x86-Release/expected-results.json6459
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-ChromeOS-Daisy-MaliT604-Arm7-Debug/expected-results.json6633
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-ChromeOS-Daisy-MaliT604-Arm7-Release/expected-results.json6633
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-ChromeOS-Link-HD4000-x86_64-Debug/expected-results.json6627
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-ChromeOS-Link-HD4000-x86_64-Release/expected-results.json6627
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Linux-Bare-NoGPU-Arm8_64-Debug/expected-results.json6312
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.6-MacMini4.1-GeForce320M-x86-Debug/README12
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.6-MacMini4.1-GeForce320M-x86-Debug/expected-results.json16695
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.6-MacMini4.1-GeForce320M-x86-Release/README12
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.6-MacMini4.1-GeForce320M-x86-Release/expected-results.json15271
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Debug/README12
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Debug/expected-results.json16686
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Release/README12
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Release/expected-results.json14476
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.7-MacMini4.1-GeForce320M-x86-Debug/README11
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.7-MacMini4.1-GeForce320M-x86-Debug/expected-results.json17215
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.7-MacMini4.1-GeForce320M-x86-Release/README11
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.7-MacMini4.1-GeForce320M-x86-Release/expected-results.json15883
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Debug/README11
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Debug/expected-results.json17223
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Release/README11
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Release/expected-results.json15043
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.8-MacMini4.1-GeForce320M-x86-Debug/expected-results.json16394
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.8-MacMini4.1-GeForce320M-x86-Release/expected-results.json15345
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug/expected-results.json16394
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Release/expected-results.json16971
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Ubuntu12-ShuttleA-GTX550Ti-x86_64-Release-Valgrind/expected-results.json1
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Ubuntu12-ShuttleA-GTX660-x86-Debug/expected-results.json19466
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Ubuntu12-ShuttleA-GTX660-x86-Release/expected-results.json19691
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Ubuntu12-ShuttleA-GTX660-x86_64-Debug/expected-results.json19737
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Ubuntu12-ShuttleA-GTX660-x86_64-Release/expected-results.json19831
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Ubuntu12-ShuttleA-HD2000-x86_64-Release-Valgrind/expected-results.json3
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Ubuntu13.10-ShuttleA-HD2000-x86_64-Debug-ASAN/expected-results.json132
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug/expected-results.json10863
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win7-ShuttleA-HD2000-x86-Debug-ANGLE/README7
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win7-ShuttleA-HD2000-x86-Debug-ANGLE/expected-results.json15468
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win7-ShuttleA-HD2000-x86-Debug-DirectWrite/README7
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win7-ShuttleA-HD2000-x86-Debug-DirectWrite/expected-results.json12576
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win7-ShuttleA-HD2000-x86-Debug/README7
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win7-ShuttleA-HD2000-x86-Debug/expected-results.json12563
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win7-ShuttleA-HD2000-x86-Release-ANGLE/README7
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win7-ShuttleA-HD2000-x86-Release-ANGLE/expected-results.json15460
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win7-ShuttleA-HD2000-x86-Release-DirectWrite/README7
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win7-ShuttleA-HD2000-x86-Release-DirectWrite/expected-results.json12563
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win7-ShuttleA-HD2000-x86-Release/README7
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win7-ShuttleA-HD2000-x86-Release/expected-results.json12743
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win7-ShuttleA-HD2000-x86_64-Debug/README7
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win7-ShuttleA-HD2000-x86_64-Debug/expected-results.json12659
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win7-ShuttleA-HD2000-x86_64-Release/README7
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win7-ShuttleA-HD2000-x86_64-Release/expected-results.json12659
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win8-ShuttleA-GTX660-x86-Debug/expected-results.json19985
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win8-ShuttleA-GTX660-x86-Release/expected-results.json19977
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win8-ShuttleA-GTX660-x86_64-Debug/expected-results.json19983
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win8-ShuttleA-GTX660-x86_64-Release/expected-results.json19984
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win8-ShuttleA-HD7770-x86-Debug/expected-results.json13692
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win8-ShuttleA-HD7770-x86-Release/expected-results.json13684
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win8-ShuttleA-HD7770-x86_64-Debug/expected-results.json13690
-rw-r--r--chromium/third_party/skia/expectations/gm/Test-Win8-ShuttleA-HD7770-x86_64-Release/expected-results.json13690
-rw-r--r--chromium/third_party/skia/expectations/gm/ignored-tests.txt75
-rw-r--r--chromium/third_party/skia/expectations/gm/loader.js52
-rw-r--r--chromium/third_party/skia/expectations/gm/view-platform.html153
-rw-r--r--chromium/third_party/skia/expectations/gm/whitespace.txt3
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Android-GalaxyNexus-SGX540-Arm7-Debug/expected-results.json784
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Android-GalaxyNexus-SGX540-Arm7-Release/expected-results.json784
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Android-IntelRhb-SGX544-x86-Debug/expected-results.json784
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Android-IntelRhb-SGX544-x86-Release/expected-results.json784
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Android-Logan-Nvidia-Arm7-Debug/expected-results.json4
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Android-Logan-Nvidia-Arm7-Release/expected-results.json4
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Android-Nexus10-MaliT604-Arm7-Debug/expected-results.json784
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Android-Nexus10-MaliT604-Arm7-Release/expected-results.json784
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Android-Nexus4-Adreno320-Arm7-Debug/expected-results.json784
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Android-Nexus4-Adreno320-Arm7-Release/expected-results.json784
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Android-Nexus7-Tegra3-Arm7-Debug/expected-results.json784
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Android-Nexus7-Tegra3-Arm7-Release/expected-results.json784
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Android-NexusS-SGX540-Arm7-Debug/expected-results.json784
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Android-NexusS-SGX540-Arm7-Release/expected-results.json784
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Android-Xoom-Tegra2-Arm7-Debug/expected-results.json712
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Android-Xoom-Tegra2-Arm7-Release/expected-results.json712
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-ChromeOS-Alex-GMA3150-x86-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-ChromeOS-Alex-GMA3150-x86-Release/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-ChromeOS-Daisy-MaliT604-Arm7-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-ChromeOS-Daisy-MaliT604-Arm7-Release/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-ChromeOS-Link-HD4000-x86_64-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-ChromeOS-Link-HD4000-x86_64-Release/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Linux-Bare-NoGPU-Arm8_64-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Mac10.6-MacMini4.1-GeForce320M-x86-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Mac10.6-MacMini4.1-GeForce320M-x86-Release/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Release/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Mac10.7-MacMini4.1-GeForce320M-x86-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Mac10.7-MacMini4.1-GeForce320M-x86-Release/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Release/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Mac10.8-MacMini4.1-GeForce320M-x86-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Mac10.8-MacMini4.1-GeForce320M-x86-Release/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Release/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Ubuntu12-ShuttleA-GTX550Ti-x86_64-Release-Valgrind/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Ubuntu12-ShuttleA-GTX660-x86-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Ubuntu12-ShuttleA-GTX660-x86-Release/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Ubuntu12-ShuttleA-GTX660-x86_64-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Ubuntu12-ShuttleA-GTX660-x86_64-Release/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Ubuntu12-ShuttleA-HD2000-x86_64-Release-Valgrind/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-ASAN/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Win7-ShuttleA-HD2000-x86-Debug-ANGLE/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Win7-ShuttleA-HD2000-x86-Debug-DirectWrite/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Win7-ShuttleA-HD2000-x86-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Win7-ShuttleA-HD2000-x86-Release-ANGLE/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Win7-ShuttleA-HD2000-x86-Release-DirectWrite/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Win7-ShuttleA-HD2000-x86-Release/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Win7-ShuttleA-HD2000-x86_64-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Win7-ShuttleA-HD2000-x86_64-Release/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Win8-ShuttleA-GTX660-x86-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Win8-ShuttleA-GTX660-x86-Release-NVPR/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Win8-ShuttleA-GTX660-x86-Release/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Win8-ShuttleA-GTX660-x86_64-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Win8-ShuttleA-GTX660-x86_64-Release/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Win8-ShuttleA-HD7770-x86-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Win8-ShuttleA-HD7770-x86-Release/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Win8-ShuttleA-HD7770-x86_64-Debug/expected-results.json214
-rw-r--r--chromium/third_party/skia/expectations/skimage/Test-Win8-ShuttleA-HD7770-x86_64-Release/expected-results.json214
-rw-r--r--chromium/third_party/skia/experimental/AndroidPathRenderer/AndroidPathRenderer.cpp729
-rw-r--r--chromium/third_party/skia/experimental/AndroidPathRenderer/AndroidPathRenderer.h94
-rw-r--r--chromium/third_party/skia/experimental/AndroidPathRenderer/GrAndroidPathRenderer.cpp89
-rw-r--r--chromium/third_party/skia/experimental/AndroidPathRenderer/GrAndroidPathRenderer.h29
-rw-r--r--chromium/third_party/skia/experimental/AndroidPathRenderer/Vertex.h84
-rw-r--r--chromium/third_party/skia/experimental/AndroidPathRenderer/cutils/compiler.h35
-rw-r--r--chromium/third_party/skia/experimental/ChromeUtils/SkBorder.cpp30
-rw-r--r--chromium/third_party/skia/experimental/ChromeUtils/SkBorder.h104
-rw-r--r--chromium/third_party/skia/experimental/DrawingBoard/SampleDrawingClient.cpp278
-rw-r--r--chromium/third_party/skia/experimental/DrawingBoard/SampleDrawingServer.cpp222
-rw-r--r--chromium/third_party/skia/experimental/DrawingBoard/SkColorPalette.cpp195
-rw-r--r--chromium/third_party/skia/experimental/DrawingBoard/SkColorPalette.h34
-rw-r--r--chromium/third_party/skia/experimental/DrawingBoard/SkNetPipeController.cpp50
-rw-r--r--chromium/third_party/skia/experimental/DrawingBoard/SkNetPipeController.h36
-rw-r--r--chromium/third_party/skia/experimental/FileReaderApp/English.lproj/InfoPlist.strings2
-rw-r--r--chromium/third_party/skia/experimental/FileReaderApp/English.lproj/MainMenu.xib4272
-rw-r--r--chromium/third_party/skia/experimental/FileReaderApp/FileReaderApp-Info.plist32
-rw-r--r--chromium/third_party/skia/experimental/FileReaderApp/FileReaderAppDelegate.h15
-rw-r--r--chromium/third_party/skia/experimental/FileReaderApp/FileReaderAppDelegate.mm10
-rw-r--r--chromium/third_party/skia/experimental/FileReaderApp/FileReaderApp_Prefix.pch7
-rw-r--r--chromium/third_party/skia/experimental/FileReaderApp/FileReaderWindow.h14
-rw-r--r--chromium/third_party/skia/experimental/FileReaderApp/FileReaderWindow.mm35
-rw-r--r--chromium/third_party/skia/experimental/FileReaderApp/ReaderView.cpp75
-rw-r--r--chromium/third_party/skia/experimental/FileReaderApp/ReaderView.h29
-rw-r--r--chromium/third_party/skia/experimental/FileReaderApp/main.m16
-rwxr-xr-xchromium/third_party/skia/experimental/Intersection/ActiveEdge_Test.cpp83
-rw-r--r--chromium/third_party/skia/experimental/Intersection/AddTestOutput/main.cpp115
-rw-r--r--chromium/third_party/skia/experimental/Intersection/ConvexHull.cpp143
-rw-r--r--chromium/third_party/skia/experimental/Intersection/ConvexHull_Test.cpp468
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubeRoot.cpp400
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicBezierClip.cpp89
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicBezierClip_Test.cpp32
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicBounds.cpp66
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicConvexHull.cpp165
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicIntersection.cpp471
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicIntersection_Test.cpp778
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicIntersection_TestData.cpp310
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicIntersection_TestData.h31
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicLineSegments.cpp38
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicLineSegments.h12
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicParameterization.cpp518
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicParameterizationCode.cpp405
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicParameterization_Test.cpp113
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicParameterization_TestUtility.cpp53
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicReduceOrder.cpp254
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicReduceOrder_Test.cpp154
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicSubDivide.cpp147
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicToQuadratics.cpp217
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicToQuadratics_Test.cpp269
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicUtilities.cpp424
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicUtilities.h46
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CubicUtilities_Test.cpp28
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CurveIntersection.h80
-rw-r--r--chromium/third_party/skia/experimental/Intersection/CurveUtilities.h15
-rw-r--r--chromium/third_party/skia/experimental/Intersection/DataTypes.cpp108
-rw-r--r--chromium/third_party/skia/experimental/Intersection/DataTypes.h418
-rw-r--r--chromium/third_party/skia/experimental/Intersection/DataTypes_Test.h7
-rw-r--r--chromium/third_party/skia/experimental/Intersection/EdgeDemo.cpp347
-rw-r--r--chromium/third_party/skia/experimental/Intersection/EdgeDemo.h3
-rw-r--r--chromium/third_party/skia/experimental/Intersection/EdgeDemoApp-Info.plist32
-rw-r--r--chromium/third_party/skia/experimental/Intersection/EdgeDemoApp.mm94
-rw-r--r--chromium/third_party/skia/experimental/Intersection/EdgeDemoApp.xib3115
-rw-r--r--chromium/third_party/skia/experimental/Intersection/EdgeMain.cpp13
-rw-r--r--chromium/third_party/skia/experimental/Intersection/EdgeWalker.cpp2705
-rwxr-xr-xchromium/third_party/skia/experimental/Intersection/EdgeWalkerPolygon4x4_Test.cpp290
-rw-r--r--chromium/third_party/skia/experimental/Intersection/EdgeWalkerPolygons_Mismatches.cpp1622
-rw-r--r--chromium/third_party/skia/experimental/Intersection/EdgeWalkerPolygons_Test.cpp790
-rw-r--r--chromium/third_party/skia/experimental/Intersection/EdgeWalkerQuadralaterals_Test.cpp126
-rw-r--r--chromium/third_party/skia/experimental/Intersection/EdgeWalkerQuadratic4x4_Test.cpp106
-rw-r--r--chromium/third_party/skia/experimental/Intersection/EdgeWalkerQuadratics_Test.cpp284
-rw-r--r--chromium/third_party/skia/experimental/Intersection/EdgeWalkerRectangles_Test.cpp469
-rw-r--r--chromium/third_party/skia/experimental/Intersection/EdgeWalker_Test.h59
-rw-r--r--chromium/third_party/skia/experimental/Intersection/EdgeWalker_TestUtility.cpp761
-rw-r--r--chromium/third_party/skia/experimental/Intersection/English.lproj/InfoPlist.strings2
-rw-r--r--chromium/third_party/skia/experimental/Intersection/English.lproj/MainMenu.xib4119
-rw-r--r--chromium/third_party/skia/experimental/Intersection/Extrema.cpp81
-rw-r--r--chromium/third_party/skia/experimental/Intersection/Extrema.h8
-rw-r--r--chromium/third_party/skia/experimental/Intersection/Inline_Tests.cpp54
-rw-r--r--chromium/third_party/skia/experimental/Intersection/IntersectionUtilities.cpp48
-rw-r--r--chromium/third_party/skia/experimental/Intersection/IntersectionUtilities.h47
-rw-r--r--chromium/third_party/skia/experimental/Intersection/Intersection_Tests.cpp84
-rw-r--r--chromium/third_party/skia/experimental/Intersection/Intersection_Tests.h61
-rw-r--r--chromium/third_party/skia/experimental/Intersection/Intersections.cpp158
-rw-r--r--chromium/third_party/skia/experimental/Intersection/Intersections.h144
-rw-r--r--chromium/third_party/skia/experimental/Intersection/LineCubicIntersection.cpp296
-rw-r--r--chromium/third_party/skia/experimental/Intersection/LineCubicIntersection_Test.cpp62
-rw-r--r--chromium/third_party/skia/experimental/Intersection/LineIntersection.cpp338
-rw-r--r--chromium/third_party/skia/experimental/Intersection/LineIntersection.h21
-rw-r--r--chromium/third_party/skia/experimental/Intersection/LineIntersection_Test.cpp72
-rw-r--r--chromium/third_party/skia/experimental/Intersection/LineParameterization.cpp63
-rw-r--r--chromium/third_party/skia/experimental/Intersection/LineParameters.h108
-rw-r--r--chromium/third_party/skia/experimental/Intersection/LineParameteters_Test.cpp79
-rw-r--r--chromium/third_party/skia/experimental/Intersection/LineQuadraticIntersection.cpp369
-rw-r--r--chromium/third_party/skia/experimental/Intersection/LineQuadraticIntersection_Test.cpp235
-rw-r--r--chromium/third_party/skia/experimental/Intersection/LineUtilities.cpp133
-rw-r--r--chromium/third_party/skia/experimental/Intersection/LineUtilities.h25
-rw-r--r--chromium/third_party/skia/experimental/Intersection/LogoPlay.cpp353
-rw-r--r--chromium/third_party/skia/experimental/Intersection/MiniSimplify_Test.cpp99
-rw-r--r--chromium/third_party/skia/experimental/Intersection/NearestPoint.cpp473
-rw-r--r--chromium/third_party/skia/experimental/Intersection/Parameterization_Test.h12
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticBezierClip.cpp82
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticBezierClip_Test.cpp70
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticBounds.cpp47
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticImplicit.cpp572
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticIntersection.cpp403
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticIntersection_Test.cpp436
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticIntersection_TestData.cpp98
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticIntersection_TestData.h16
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticLineSegments.cpp34
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticLineSegments.h12
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticParameterization.cpp135
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticParameterization.h27
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticParameterization_Test.cpp48
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticParameterization_TestUtility.cpp16
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticReduceOrder.cpp184
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticReduceOrder_Test.cpp67
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticSubDivide.cpp79
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticUtilities.cpp255
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuadraticUtilities.h47
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuarticRoot.cpp236
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuarticRoot.h5
-rw-r--r--chromium/third_party/skia/experimental/Intersection/QuarticRoot_Test.cpp195
-rw-r--r--chromium/third_party/skia/experimental/Intersection/ShapeOpCubic4x4_Test.cpp106
-rw-r--r--chromium/third_party/skia/experimental/Intersection/ShapeOpRect4x4_Test.cpp94
-rw-r--r--chromium/third_party/skia/experimental/Intersection/ShapeOps.cpp279
-rw-r--r--chromium/third_party/skia/experimental/Intersection/ShapeOps.h40
-rw-r--r--chromium/third_party/skia/experimental/Intersection/Simplify.cpp6608
-rw-r--r--chromium/third_party/skia/experimental/Intersection/Simplify.h17
-rw-r--r--chromium/third_party/skia/experimental/Intersection/SimplifyAddIntersectingTs_Test.cpp135
-rw-r--r--chromium/third_party/skia/experimental/Intersection/SimplifyAngle_Test.cpp342
-rw-r--r--chromium/third_party/skia/experimental/Intersection/SimplifyFindNext_Test.cpp153
-rw-r--r--chromium/third_party/skia/experimental/Intersection/SimplifyFindTop_Test.cpp222
-rw-r--r--chromium/third_party/skia/experimental/Intersection/SimplifyNew_Test.cpp5194
-rw-r--r--chromium/third_party/skia/experimental/Intersection/SimplifyRect4x4_Test.cpp200
-rw-r--r--chromium/third_party/skia/experimental/Intersection/SkAntiEdge.cpp1086
-rw-r--r--chromium/third_party/skia/experimental/Intersection/SkAntiEdge.h76
-rw-r--r--chromium/third_party/skia/experimental/Intersection/TSearch.h101
-rw-r--r--chromium/third_party/skia/experimental/Intersection/TestUtilities.cpp65
-rw-r--r--chromium/third_party/skia/experimental/Intersection/TestUtilities.h11
-rw-r--r--chromium/third_party/skia/experimental/Intersection/TriangleUtilities.cpp31
-rw-r--r--chromium/third_party/skia/experimental/Intersection/TriangleUtilities.h10
-rw-r--r--chromium/third_party/skia/experimental/Intersection/as.htm7027
-rw-r--r--chromium/third_party/skia/experimental/Intersection/bc.htm455
-rw-r--r--chromium/third_party/skia/experimental/Intersection/cd.htm517
-rw-r--r--chromium/third_party/skia/experimental/Intersection/edge_Prefix.pch5
-rw-r--r--chromium/third_party/skia/experimental/Intersection/hg.htm649
-rw-r--r--chromium/third_party/skia/experimental/Intersection/op.htm4806
-rw-r--r--chromium/third_party/skia/experimental/Intersection/qc.htm2883
-rw-r--r--chromium/third_party/skia/experimental/Intersection/thingsToDo.txt525
-rw-r--r--chromium/third_party/skia/experimental/LightSymbolsUtil/Callstacker/Callstacker.sln20
-rw-r--r--chromium/third_party/skia/experimental/LightSymbolsUtil/Callstacker/Callstacker/Callstacker.cpp673
-rw-r--r--chromium/third_party/skia/experimental/LightSymbolsUtil/Callstacker/Callstacker/Callstacker.vcxproj90
-rw-r--r--chromium/third_party/skia/experimental/LightSymbolsUtil/Callstacker/Callstacker/Callstacker.vcxproj.filters36
-rw-r--r--chromium/third_party/skia/experimental/LightSymbolsUtil/Callstacker/Callstacker/Callstacker.vcxproj.user11
-rw-r--r--chromium/third_party/skia/experimental/LightSymbolsUtil/Callstacker/Callstacker/ReadMe.txt40
-rw-r--r--chromium/third_party/skia/experimental/LightSymbolsUtil/Callstacker/Callstacker/stdafx.cpp8
-rw-r--r--chromium/third_party/skia/experimental/LightSymbolsUtil/Callstacker/Callstacker/stdafx.h15
-rw-r--r--chromium/third_party/skia/experimental/LightSymbolsUtil/Callstacker/Callstacker/targetver.h8
-rw-r--r--chromium/third_party/skia/experimental/LightSymbolsUtil/lightsymbols/helper.h65
-rw-r--r--chromium/third_party/skia/experimental/LightSymbolsUtil/lightsymbols/lightsymbols.cc169
-rw-r--r--chromium/third_party/skia/experimental/LightSymbolsUtil/lightsymbols/lightsymbols.h50
-rw-r--r--chromium/third_party/skia/experimental/Networking/SampleNetPipeReader.cpp129
-rw-r--r--chromium/third_party/skia/experimental/Networking/SkSockets.cpp358
-rw-r--r--chromium/third_party/skia/experimental/Networking/SkSockets.h198
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/SkNulCanvas.cpp8
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/SkNulCanvas.h112
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/SkPdfConfig.h105
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/SkPdfFont.cpp468
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/SkPdfFont.h479
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/SkPdfGraphicsState.cpp41
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/SkPdfGraphicsState.h354
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/SkPdfReporter.cpp66
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/SkPdfReporter.h100
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/SkPdfUtils.cpp31
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/SkPdfUtils.h121
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/SkTrackDevice.cpp8
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/SkTrackDevice.h180
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/SkTracker.cpp8
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/SkTracker.h227
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/chop_transparency_main.cpp175
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/inc/SkPdfContext.h48
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/inc/SkPdfDiffEncoder.h25
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/inc/SkPdfRenderer.h80
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/inc/SkPdfTokenLooper.h68
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdf_viewer_main.cpp349
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/SkPdfNYI.cpp8
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/SkPdfNYI.h20
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.cpp582
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.h159
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.cpp134
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.h1326
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp1125
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.h201
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfALinkAnnotationDictionary_autogen.cpp103
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfALinkAnnotationDictionary_autogen.h541
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfActionDictionary_autogen.cpp65
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfActionDictionary_autogen.h534
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfAlternateImageDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfAlternateImageDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfAnnotationActionsDictionary_autogen.cpp81
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfAnnotationActionsDictionary_autogen.h535
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfAnnotationDictionary_autogen.cpp249
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfAnnotationDictionary_autogen.h565
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfAppearanceCharacteristicsDictionary_autogen.cpp141
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfAppearanceCharacteristicsDictionary_autogen.h545
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfAppearanceDictionary_autogen.cpp105
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfAppearanceDictionary_autogen.h544
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfApplicationDataDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfApplicationDataDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfArtifactsDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfArtifactsDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfAttributeObjectDictionary_autogen.cpp21
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfAttributeObjectDictionary_autogen.h525
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfBeadDictionary_autogen.cpp81
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfBeadDictionary_autogen.h535
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfBlockLevelStructureElementsDictionary_autogen.cpp181
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfBlockLevelStructureElementsDictionary_autogen.h555
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfBorderStyleDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfBorderStyleDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfBoxColorInformationDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfBoxColorInformationDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfBoxStyleDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfBoxStyleDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCIDFontDescriptorDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCIDFontDescriptorDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCIDFontDictionary_autogen.cpp149
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCIDFontDictionary_autogen.h548
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCIDSystemInfoDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCIDSystemInfoDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCMapDictionary_autogen.cpp109
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCMapDictionary_autogen.h543
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCalgrayColorSpaceDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCalgrayColorSpaceDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCalrgbColorSpaceDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCalrgbColorSpaceDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCatalogDictionary_autogen.cpp301
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCatalogDictionary_autogen.h575
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCcittfaxdecodeFilterDictionary_autogen.cpp105
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCcittfaxdecodeFilterDictionary_autogen.h539
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCheckboxFieldDictionary_autogen.cpp21
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfCheckboxFieldDictionary_autogen.h525
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfChoiceFieldDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfChoiceFieldDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfComponentsWithMetadataDictionary_autogen.cpp21
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfComponentsWithMetadataDictionary_autogen.h525
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfDctdecodeFilterDictionary_autogen.cpp21
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfDctdecodeFilterDictionary_autogen.h525
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfDeviceNColorSpaceDictionary_autogen.cpp21
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfDeviceNColorSpaceDictionary_autogen.h525
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfDictionary_autogen.cpp9
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfDocumentCatalogActionsDictionary_autogen.cpp69
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfDocumentCatalogActionsDictionary_autogen.h533
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfDocumentInformationDictionary_autogen.cpp117
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfDocumentInformationDictionary_autogen.h541
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfEmbeddedFileParameterDictionary_autogen.cpp69
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfEmbeddedFileParameterDictionary_autogen.h533
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfEmbeddedFileStreamDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfEmbeddedFileStreamDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfEmbeddedFontStreamDictionary_autogen.cpp69
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfEmbeddedFontStreamDictionary_autogen.h533
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfEncodingDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfEncodingDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfEncryptedEmbeddedFileStreamDictionary_autogen.cpp21
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfEncryptedEmbeddedFileStreamDictionary_autogen.h525
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfEncryptionCommonDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfEncryptionCommonDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfEnums_autogen.h358
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFDFCatalogDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFDFCatalogDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFDFDictionary_autogen.cpp141
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFDFDictionary_autogen.h545
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFDFFieldDictionary_autogen.cpp189
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFDFFieldDictionary_autogen.h553
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFDFFileAnnotationDictionary_autogen.cpp21
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFDFFileAnnotationDictionary_autogen.h525
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFDFNamedPageReferenceDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFDFNamedPageReferenceDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFDFPageDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFDFPageDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFDFTemplateDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFDFTemplateDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFDFTrailerDictionary_autogen.cpp21
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFDFTrailerDictionary_autogen.h525
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFieldDictionary_autogen.cpp129
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFieldDictionary_autogen.h543
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFileAttachmentAnnotationDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFileAttachmentAnnotationDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFileSpecificationDictionary_autogen.cpp129
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFileSpecificationDictionary_autogen.h543
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFileTrailerDictionary_autogen.cpp81
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFileTrailerDictionary_autogen.h535
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFontDescriptorDictionary_autogen.cpp237
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFontDescriptorDictionary_autogen.h561
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFontDictionary_autogen.cpp9
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFontDictionary_autogen.h507
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFormFieldActionsDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFormFieldActionsDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFreeTextAnnotationDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFreeTextAnnotationDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFunctionCommonDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfFunctionCommonDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfGoToActionDictionary_autogen.cpp67
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfGoToActionDictionary_autogen.h535
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfGraphicsStateDictionary_autogen.cpp515
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfGraphicsStateDictionary_autogen.h621
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfGroupAttributesDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfGroupAttributesDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfHeaders_autogen.cpp176
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfHeaders_autogen.h179
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfHideActionDictionary_autogen.cpp79
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfHideActionDictionary_autogen.h537
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfIccProfileStreamDictionary_autogen.cpp77
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfIccProfileStreamDictionary_autogen.h536
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfIconFitDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfIconFitDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfImageDictionary_autogen.cpp265
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfImageDictionary_autogen.h74
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfImportDataActionDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfImportDataActionDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfInkAnnotationDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfInkAnnotationDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfInlineLevelStructureElementsDictionary_autogen.cpp41
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfInlineLevelStructureElementsDictionary_autogen.h530
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfInteractiveFormDictionary_autogen.cpp93
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfInteractiveFormDictionary_autogen.h537
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfJavascriptActionDictionary_autogen.cpp53
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfJavascriptActionDictionary_autogen.h532
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfJavascriptDictionary_autogen.cpp85
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfJavascriptDictionary_autogen.h539
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfJbig2DecodeFilterDictionary_autogen.cpp21
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfJbig2DecodeFilterDictionary_autogen.h525
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfLabColorSpaceDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfLabColorSpaceDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfLaunchActionDictionary_autogen.cpp81
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfLaunchActionDictionary_autogen.h535
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfLineAnnotationDictionary_autogen.cpp81
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfLineAnnotationDictionary_autogen.h535
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfListAttributeDictionary_autogen.cpp21
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfListAttributeDictionary_autogen.h525
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfLzwdecodeAndFlatedecodeFiltersDictionary_autogen.cpp69
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfLzwdecodeAndFlatedecodeFiltersDictionary_autogen.h533
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMacOsFileInformationDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMacOsFileInformationDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMapper_autogen.cpp4634
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMapper_autogen.h692
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMarkInformationDictionary_autogen.cpp21
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMarkInformationDictionary_autogen.h525
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMarkedContentReferenceDictionary_autogen.cpp69
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMarkedContentReferenceDictionary_autogen.h533
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMarkupAnnotationsDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMarkupAnnotationsDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMetadataStreamDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMetadataStreamDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMovieActionDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMovieActionDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMovieActivationDictionary_autogen.cpp117
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMovieActivationDictionary_autogen.h541
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMovieAnnotationDictionary_autogen.cpp77
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMovieAnnotationDictionary_autogen.h536
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMovieDictionary_autogen.cpp77
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMovieDictionary_autogen.h536
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMultiMasterFontDictionary_autogen.cpp21
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMultiMasterFontDictionary_autogen.h32
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfNameDictionary_autogen.cpp265
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfNameDictionary_autogen.h579
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfNameTreeNodeDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfNameTreeNodeDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfNamedActionsDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfNamedActionsDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfNumberTreeNodeDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfNumberTreeNodeDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfObjectReferenceDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfObjectReferenceDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfOpiVersionDictionary_autogen.cpp21
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfOpiVersionDictionary_autogen.h525
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfOutlineDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfOutlineDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfOutlineItemDictionary_autogen.cpp187
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfOutlineItemDictionary_autogen.h555
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPDF_XOutputIntentDictionary_autogen.cpp93
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPDF_XOutputIntentDictionary_autogen.h537
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPSXobjectDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPSXobjectDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPageLabelDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPageLabelDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPageObjectActionsDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPageObjectActionsDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPageObjectDictionary_autogen.cpp329
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPageObjectDictionary_autogen.h578
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPagePieceDictionary_autogen.cpp23
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPagePieceDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPageTreeNodeDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPageTreeNodeDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPopUpAnnotationDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPopUpAnnotationDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPrinterMarkAnnotationDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPrinterMarkAnnotationDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPrinterMarkFormDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfPrinterMarkFormDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfRadioButtonFieldDictionary_autogen.cpp21
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfRadioButtonFieldDictionary_autogen.h525
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfReferenceDictionary_autogen.cpp65
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfReferenceDictionary_autogen.h534
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfRemoteGoToActionDictionary_autogen.cpp91
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfRemoteGoToActionDictionary_autogen.h539
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfResetFormActionDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfResetFormActionDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfResourceDictionary_autogen.cpp105
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfResourceDictionary_autogen.h539
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfRubberStampAnnotationDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfRubberStampAnnotationDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSeparationDictionary_autogen.cpp65
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSeparationDictionary_autogen.h534
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfShadingDictionary_autogen.cpp89
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfShadingDictionary_autogen.h520
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSignatureDictionary_autogen.cpp117
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSignatureDictionary_autogen.h541
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSoftMaskDictionary_autogen.cpp89
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSoftMaskDictionary_autogen.h538
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSoftMaskImageDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSoftMaskImageDictionary_autogen.h31
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSoundActionDictionary_autogen.cpp81
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSoundActionDictionary_autogen.h535
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSoundAnnotationDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSoundAnnotationDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSoundObjectDictionary_autogen.cpp93
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSoundObjectDictionary_autogen.h537
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSourceInformationDictionary_autogen.cpp89
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSourceInformationDictionary_autogen.h538
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSquareOrCircleAnnotation_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSquareOrCircleAnnotation_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStandardSecurityHandlerDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStandardSecurityHandlerDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStandardStructureDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStandardStructureDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStreamCommonDictionary_autogen.cpp161
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStreamCommonDictionary_autogen.h555
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStructureElementAccessDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStructureElementAccessDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStructureElementDictionary_autogen.cpp185
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStructureElementDictionary_autogen.h554
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStructureTreeRootDictionary_autogen.cpp153
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStructureTreeRootDictionary_autogen.h552
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSubmitFormActionDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSubmitFormActionDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfTableAttributesDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfTableAttributesDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfTextAnnotationDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfTextAnnotationDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfTextFieldDictionary_autogen.cpp21
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfTextFieldDictionary_autogen.h525
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfThreadActionDictionary_autogen.cpp111
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfThreadActionDictionary_autogen.h544
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfThreadDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfThreadDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfTransitionDictionary_autogen.cpp81
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfTransitionDictionary_autogen.h535
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfTransparencyGroupDictionary_autogen.cpp77
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfTransparencyGroupDictionary_autogen.h536
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfTrapNetworkAnnotationDictionary_autogen.cpp81
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfTrapNetworkAnnotationDictionary_autogen.h535
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfTrapNetworkAppearanceStreamDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfTrapNetworkAppearanceStreamDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfTrueTypeFontDictionary_autogen.cpp21
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfTrueTypeFontDictionary_autogen.h32
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType0FontDictionary_autogen.cpp101
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType0FontDictionary_autogen.h54
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType0FunctionDictionary_autogen.cpp69
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType0FunctionDictionary_autogen.h533
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType10HalftoneDictionary_autogen.cpp101
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType10HalftoneDictionary_autogen.h540
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType16HalftoneDictionary_autogen.cpp125
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType16HalftoneDictionary_autogen.h544
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType1FontDictionary_autogen.cpp149
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType1FontDictionary_autogen.h53
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType1FormDictionary_autogen.cpp189
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType1FormDictionary_autogen.h61
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType1HalftoneDictionary_autogen.cpp145
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType1HalftoneDictionary_autogen.h549
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType1PatternDictionary_autogen.cpp117
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType1PatternDictionary_autogen.h541
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType1ShadingDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType1ShadingDictionary_autogen.h46
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType2FunctionDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType2FunctionDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType2PatternDictionary_autogen.cpp89
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType2PatternDictionary_autogen.h538
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType2ShadingDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType2ShadingDictionary_autogen.h48
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType3FontDictionary_autogen.cpp173
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType3FontDictionary_autogen.h60
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType3FunctionDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType3FunctionDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType3ShadingDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType3ShadingDictionary_autogen.h48
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType4ShadingDictionary_autogen.cpp69
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType4ShadingDictionary_autogen.h50
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType5HalftoneDictionary_autogen.cpp111
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType5HalftoneDictionary_autogen.h545
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType5ShadingDictionary_autogen.cpp69
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType5ShadingDictionary_autogen.h50
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType6HalftoneDictionary_autogen.cpp101
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType6HalftoneDictionary_autogen.h540
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType6ShadingDictionary_autogen.cpp69
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType6ShadingDictionary_autogen.h50
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfURIActionDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfURIActionDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfURIDictionary_autogen.cpp21
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfURIDictionary_autogen.h525
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfURLAliasDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfURLAliasDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfVariableTextFieldDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfVariableTextFieldDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfViewerPreferencesDictionary_autogen.cpp153
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfViewerPreferencesDictionary_autogen.h547
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWebCaptureCommandDictionary_autogen.cpp113
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWebCaptureCommandDictionary_autogen.h542
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWebCaptureCommandSettingsDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWebCaptureCommandSettingsDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWebCaptureDictionary_autogen.cpp113
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWebCaptureDictionary_autogen.h542
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWebCaptureImageSetDictionary_autogen.cpp53
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWebCaptureImageSetDictionary_autogen.h532
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWebCaptureInformationDictionary_autogen.cpp33
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWebCaptureInformationDictionary_autogen.h527
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWebCapturePageSetDictionary_autogen.cpp45
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWebCapturePageSetDictionary_autogen.h529
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWidgetAnnotationDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWidgetAnnotationDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWindowsLaunchActionDictionary_autogen.cpp57
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfWindowsLaunchActionDictionary_autogen.h531
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfXObjectDictionary_autogen.cpp9
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfXObjectDictionary_autogen.h513
-rwxr-xr-xchromium/third_party/skia/experimental/PdfViewer/scripts/test_all_pdfs.sh92
-rwxr-xr-xchromium/third_party/skia/experimental/PdfViewer/scripts/vm_pdf_viewer_run_one_pdf.sh11
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/src/SkPdfContext.cpp126
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/src/SkPdfDiffEncoder.cpp130
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/src/SkPdfOps.h18
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/src/SkPdfRenderer.cpp2915
-rw-r--r--chromium/third_party/skia/experimental/PdfViewer/src/SkTDStackNester.h214
-rw-r--r--chromium/third_party/skia/experimental/SimpleCocoaApp/SimpleApp-Info.plist32
-rw-r--r--chromium/third_party/skia/experimental/SimpleCocoaApp/SimpleApp.h16
-rw-r--r--chromium/third_party/skia/experimental/SimpleCocoaApp/SimpleApp.mm306
-rw-r--r--chromium/third_party/skia/experimental/SimpleCocoaApp/SimpleApp.xib3734
-rw-r--r--chromium/third_party/skia/experimental/SimpleiOSApp/SimpleApp.h6
-rw-r--r--chromium/third_party/skia/experimental/SimpleiOSApp/SimpleApp.mm70
-rw-r--r--chromium/third_party/skia/experimental/SimpleiOSApp/SimpleiOSApp-Info.plist43
-rwxr-xr-xchromium/third_party/skia/experimental/SimpleiOSApp/SimpleiOSApp.xcodeproj/project.pbxproj2935
-rw-r--r--chromium/third_party/skia/experimental/SimpleiOSApp/SimpleiOSApp_Prefix.pch8
-rw-r--r--chromium/third_party/skia/experimental/SimpleiOSApp/iPad/AppDelegate_iPad.h17
-rw-r--r--chromium/third_party/skia/experimental/SimpleiOSApp/iPad/AppDelegate_iPad.m67
-rw-r--r--chromium/third_party/skia/experimental/SimpleiOSApp/iPad/MainWindow_iPad.xib439
-rw-r--r--chromium/third_party/skia/experimental/SimpleiOSApp/iPhone/AppDelegate_iPhone.h17
-rw-r--r--chromium/third_party/skia/experimental/SimpleiOSApp/iPhone/AppDelegate_iPhone.m83
-rw-r--r--chromium/third_party/skia/experimental/SimpleiOSApp/iPhone/MainWindow_iPhone.xib449
-rw-r--r--chromium/third_party/skia/experimental/SimpleiOSApp/tool-Info.plist43
-rw-r--r--chromium/third_party/skia/experimental/SkSetPoly3To3.cpp69
-rw-r--r--chromium/third_party/skia/experimental/SkSetPoly3To3_A.cpp84
-rw-r--r--chromium/third_party/skia/experimental/SkSetPoly3To3_D.cpp74
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/BaseContext.cpp286
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/BaseContext.h84
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/Global.cpp245
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/Global.h85
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/JsContext.cpp140
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/JsContext.h65
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/Path2D.cpp244
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/Path2D.h52
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/README16
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/SkV8Example.cpp225
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/SkV8Example.h53
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/compare/gears.html11
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/compare/snow.html11
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/gears.js183
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/path.js33
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/sample.js19
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/snow.js95
-rw-r--r--chromium/third_party/skia/experimental/SkV8Example/speed.js23
-rw-r--r--chromium/third_party/skia/experimental/SkiaExamples/HelloSkiaExample.cpp106
-rw-r--r--chromium/third_party/skia/experimental/SkiaExamples/SkExample.cpp194
-rw-r--r--chromium/third_party/skia/experimental/SkiaExamples/SkExample.h82
-rw-r--r--chromium/third_party/skia/experimental/SkiaExamples/SkExampleNSView.h13
-rw-r--r--chromium/third_party/skia/experimental/SkiaExamples/SkExampleNSView.mm28
-rw-r--r--chromium/third_party/skia/experimental/SkiaExamples/SkiaExamples-Info.plist32
-rw-r--r--chromium/third_party/skia/experimental/SkiaExamples/SkiaExamples.xib3703
-rw-r--r--chromium/third_party/skia/experimental/StrokePathRenderer/GrStrokePathRenderer.cpp300
-rw-r--r--chromium/third_party/skia/experimental/StrokePathRenderer/GrStrokePathRenderer.h30
-rwxr-xr-xchromium/third_party/skia/experimental/benchtools/greenify.py205
-rwxr-xr-xchromium/third_party/skia/experimental/benchtools/rebase.py248
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/Shared/SkOptionListController.h16
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/Shared/SkOptionListController.mm78
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/Shared/SkOptionsTableViewController.h42
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/Shared/SkOptionsTableViewController.mm339
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/Shared/SkUIDetailViewController.h42
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/Shared/SkUIDetailViewController.mm175
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/Shared/SkUIRootViewController.h21
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/Shared/SkUIRootViewController.mm61
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/Shared/SkUIView.h48
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/Shared/SkUIView.mm115
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/Shared/skia_ios.mm15
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/SkSampleUIView.h48
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/SkSampleUIView.mm494
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig17
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig13
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig12
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/iOSSampleApp-Info.plist43
-rwxr-xr-xchromium/third_party/skia/experimental/iOSSampleApp/iOSSampleApp.xcodeproj/project.pbxproj3487
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/iOSSampleApp_Prefix.pch8
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/iPad/AppDelegate_iPad.h19
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/iPad/AppDelegate_iPad.mm22
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/iPad/MainWindow_iPad.xib565
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/iPad/SkUISplitViewController.h20
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/iPad/SkUISplitViewController.mm50
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/iPhone/AppDelegate_iPhone.h19
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/iPhone/AppDelegate_iPhone.mm21
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/iPhone/MainWindow_iPhone.xib831
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/iPhone/SkUINavigationController.h20
-rw-r--r--chromium/third_party/skia/experimental/iOSSampleApp/iPhone/SkUINavigationController.mm28
-rw-r--r--chromium/third_party/skia/experimental/nanomsg/picture_demo.cpp207
-rw-r--r--chromium/third_party/skia/experimental/pixman/Pixman-version.h50
-rw-r--r--chromium/third_party/skia/experimental/pixman/config.h3
-rw-r--r--chromium/third_party/skia/experimental/pixman/junk.cpp108
-rw-r--r--chromium/third_party/skia/experimental/pixman/pixman.mm99
-rw-r--r--chromium/third_party/skia/experimental/webtry/DESIGN.md282
-rw-r--r--chromium/third_party/skia/experimental/webtry/README.md94
-rw-r--r--chromium/third_party/skia/experimental/webtry/TODO.md16
-rw-r--r--chromium/third_party/skia/experimental/webtry/main.cpp126
-rw-r--r--chromium/third_party/skia/experimental/webtry/poly/.bowerrc3
-rw-r--r--chromium/third_party/skia/experimental/webtry/poly/Gruntfile.js64
-rw-r--r--chromium/third_party/skia/experimental/webtry/poly/README.md18
-rw-r--r--chromium/third_party/skia/experimental/webtry/poly/bower.json22
-rw-r--r--chromium/third_party/skia/experimental/webtry/poly/package.json17
-rw-r--r--chromium/third_party/skia/experimental/webtry/res/css/cm/codemirror.css272
-rw-r--r--chromium/third_party/skia/experimental/webtry/res/css/webtry.css128
-rw-r--r--chromium/third_party/skia/experimental/webtry/res/imp/zoom.html169
-rw-r--r--chromium/third_party/skia/experimental/webtry/res/js/cm/clike.js436
-rw-r--r--chromium/third_party/skia/experimental/webtry/res/js/cm/codemirror.js7526
-rw-r--r--chromium/third_party/skia/experimental/webtry/res/js/polyfill.js3
-rw-r--r--chromium/third_party/skia/experimental/webtry/res/js/webtry.js303
-rw-r--r--chromium/third_party/skia/experimental/webtry/result.cpp29
-rwxr-xr-xchromium/third_party/skia/experimental/webtry/safec++7
-rw-r--r--chromium/third_party/skia/experimental/webtry/seccomp_bpf.h65
-rwxr-xr-xchromium/third_party/skia/experimental/webtry/setup/continue_install60
-rwxr-xr-xchromium/third_party/skia/experimental/webtry/setup/webtry_setup.sh33
-rw-r--r--chromium/third_party/skia/experimental/webtry/sys/webtry_init159
-rw-r--r--chromium/third_party/skia/experimental/webtry/sys/webtry_monit7
-rw-r--r--chromium/third_party/skia/experimental/webtry/sys/webtry_schroot9
-rw-r--r--chromium/third_party/skia/experimental/webtry/sys/webtry_squid6
-rw-r--r--chromium/third_party/skia/experimental/webtry/templates/content.html42
-rw-r--r--chromium/third_party/skia/experimental/webtry/templates/footercommon.html6
-rw-r--r--chromium/third_party/skia/experimental/webtry/templates/headercommon.html2
-rw-r--r--chromium/third_party/skia/experimental/webtry/templates/iframe.html16
-rw-r--r--chromium/third_party/skia/experimental/webtry/templates/index.html18
-rw-r--r--chromium/third_party/skia/experimental/webtry/templates/recent.html25
-rw-r--r--chromium/third_party/skia/experimental/webtry/templates/template.cpp162
-rw-r--r--chromium/third_party/skia/experimental/webtry/templates/titlebar.html8
-rw-r--r--chromium/third_party/skia/experimental/webtry/templates/workspace.html39
-rw-r--r--chromium/third_party/skia/experimental/webtry/webtry.go872
-rw-r--r--chromium/third_party/skia/forth/Forth.cpp501
-rw-r--r--chromium/third_party/skia/forth/Forth.h105
-rw-r--r--chromium/third_party/skia/forth/ForthParser.h46
-rw-r--r--chromium/third_party/skia/forth/ForthTests.cpp407
-rw-r--r--chromium/third_party/skia/forth/StdWords.cpp461
-rw-r--r--chromium/third_party/skia/gm/__init__.py1
-rw-r--r--chromium/third_party/skia/gm/aaclip.cpp199
-rw-r--r--chromium/third_party/skia/gm/aarectmodes.cpp191
-rw-r--r--chromium/third_party/skia/gm/alphagradients.cpp81
-rw-r--r--chromium/third_party/skia/gm/androidfallback.cpp86
-rw-r--r--chromium/third_party/skia/gm/arcofzorro.cpp87
-rw-r--r--chromium/third_party/skia/gm/arithmode.cpp132
-rw-r--r--chromium/third_party/skia/gm/beziereffects.cpp539
-rw-r--r--chromium/third_party/skia/gm/bicubicfilter.cpp86
-rw-r--r--chromium/third_party/skia/gm/bigblurs.cpp116
-rw-r--r--chromium/third_party/skia/gm/bigmatrix.cpp99
-rw-r--r--chromium/third_party/skia/gm/bigtext.cpp57
-rw-r--r--chromium/third_party/skia/gm/bitmapcopy.cpp126
-rw-r--r--chromium/third_party/skia/gm/bitmapfilters.cpp125
-rw-r--r--chromium/third_party/skia/gm/bitmapmatrix.cpp135
-rw-r--r--chromium/third_party/skia/gm/bitmappremul.cpp133
-rw-r--r--chromium/third_party/skia/gm/bitmaprect.cpp249
-rw-r--r--chromium/third_party/skia/gm/bitmaprecttest.cpp81
-rw-r--r--chromium/third_party/skia/gm/bitmapscroll.cpp158
-rw-r--r--chromium/third_party/skia/gm/bitmapshader.cpp123
-rw-r--r--chromium/third_party/skia/gm/bitmapsource.cpp89
-rw-r--r--chromium/third_party/skia/gm/bleed.cpp282
-rw-r--r--chromium/third_party/skia/gm/blurcircles.cpp63
-rw-r--r--chromium/third_party/skia/gm/blurquickreject.cpp83
-rw-r--r--chromium/third_party/skia/gm/blurrect.cpp394
-rw-r--r--chromium/third_party/skia/gm/blurroundrect.cpp162
-rw-r--r--chromium/third_party/skia/gm/blurs.cpp102
-rw-r--r--chromium/third_party/skia/gm/canvasstate.cpp180
-rw-r--r--chromium/third_party/skia/gm/circles.cpp211
-rw-r--r--chromium/third_party/skia/gm/circularclips.cpp82
-rw-r--r--chromium/third_party/skia/gm/clippedbitmapshaders.cpp128
-rw-r--r--chromium/third_party/skia/gm/cmykjpeg.cpp76
-rw-r--r--chromium/third_party/skia/gm/coloremoji.cpp120
-rw-r--r--chromium/third_party/skia/gm/colorfilterimagefilter.cpp132
-rw-r--r--chromium/third_party/skia/gm/colorfilters.cpp91
-rw-r--r--chromium/third_party/skia/gm/colormatrix.cpp175
-rw-r--r--chromium/third_party/skia/gm/colortype.cpp73
-rw-r--r--chromium/third_party/skia/gm/complexclip.cpp201
-rw-r--r--chromium/third_party/skia/gm/complexclip2.cpp222
-rw-r--r--chromium/third_party/skia/gm/composeshader.cpp132
-rw-r--r--chromium/third_party/skia/gm/conicpaths.cpp168
-rw-r--r--chromium/third_party/skia/gm/convexpaths.cpp301
-rw-r--r--chromium/third_party/skia/gm/convexpolyclip.cpp301
-rw-r--r--chromium/third_party/skia/gm/convexpolyeffect.cpp238
-rw-r--r--chromium/third_party/skia/gm/copyTo4444.cpp57
-rw-r--r--chromium/third_party/skia/gm/cubicpaths.cpp356
-rw-r--r--chromium/third_party/skia/gm/dashcubics.cpp77
-rw-r--r--chromium/third_party/skia/gm/dashing.cpp407
-rw-r--r--chromium/third_party/skia/gm/degeneratesegments.cpp404
-rw-r--r--chromium/third_party/skia/gm/deviceproperties.cpp113
-rw-r--r--chromium/third_party/skia/gm/discard.cpp95
-rw-r--r--chromium/third_party/skia/gm/displacement.cpp229
-rw-r--r--chromium/third_party/skia/gm/display_json_results.py114
-rw-r--r--chromium/third_party/skia/gm/distantclip.cpp77
-rw-r--r--chromium/third_party/skia/gm/downsamplebitmap.cpp214
-rw-r--r--chromium/third_party/skia/gm/drawbitmaprect.cpp185
-rw-r--r--chromium/third_party/skia/gm/drawlooper.cpp106
-rw-r--r--chromium/third_party/skia/gm/dropshadowimagefilter.cpp172
-rw-r--r--chromium/third_party/skia/gm/drrect.cpp73
-rw-r--r--chromium/third_party/skia/gm/emptypath.cpp133
-rw-r--r--chromium/third_party/skia/gm/etc1bitmap.cpp221
-rw-r--r--chromium/third_party/skia/gm/extractbitmap.cpp86
-rw-r--r--chromium/third_party/skia/gm/factory.cpp76
-rw-r--r--chromium/third_party/skia/gm/fatpathfill.cpp97
-rw-r--r--chromium/third_party/skia/gm/filltypes.cpp99
-rw-r--r--chromium/third_party/skia/gm/filltypespersp.cpp137
-rw-r--r--chromium/third_party/skia/gm/filterbitmap.cpp235
-rw-r--r--chromium/third_party/skia/gm/filterindiabox.cpp133
-rw-r--r--chromium/third_party/skia/gm/fontcache.cpp119
-rw-r--r--chromium/third_party/skia/gm/fontmgr.cpp199
-rw-r--r--chromium/third_party/skia/gm/fontscaler.cpp97
-rw-r--r--chromium/third_party/skia/gm/gammatext.cpp210
-rw-r--r--chromium/third_party/skia/gm/getpostextpath.cpp77
-rw-r--r--chromium/third_party/skia/gm/giantbitmap.cpp159
-rw-r--r--chromium/third_party/skia/gm/gm.cpp68
-rw-r--r--chromium/third_party/skia/gm/gm.h124
-rw-r--r--chromium/third_party/skia/gm/gm_error.h163
-rw-r--r--chromium/third_party/skia/gm/gm_expectations.cpp239
-rw-r--r--chromium/third_party/skia/gm/gm_expectations.h231
-rw-r--r--chromium/third_party/skia/gm/gm_json.py190
-rw-r--r--chromium/third_party/skia/gm/gmmain.cpp2454
-rw-r--r--chromium/third_party/skia/gm/gradientDirtyLaundry.cpp110
-rw-r--r--chromium/third_party/skia/gm/gradient_matrix.cpp150
-rw-r--r--chromium/third_party/skia/gm/gradients.cpp467
-rw-r--r--chromium/third_party/skia/gm/gradients_2pt_conical.cpp381
-rw-r--r--chromium/third_party/skia/gm/gradients_no_texture.cpp258
-rw-r--r--chromium/third_party/skia/gm/gradtext.cpp170
-rw-r--r--chromium/third_party/skia/gm/hairlines.cpp225
-rw-r--r--chromium/third_party/skia/gm/hairmodes.cpp136
-rw-r--r--chromium/third_party/skia/gm/hittestpath.cpp79
-rw-r--r--chromium/third_party/skia/gm/image.cpp212
-rw-r--r--chromium/third_party/skia/gm/image.h14
-rw-r--r--chromium/third_party/skia/gm/imagealphathreshold.cpp86
-rw-r--r--chromium/third_party/skia/gm/imageblur.cpp74
-rw-r--r--chromium/third_party/skia/gm/imageblurtiled.cpp78
-rw-r--r--chromium/third_party/skia/gm/imagefiltersbase.cpp235
-rw-r--r--chromium/third_party/skia/gm/imagefiltersclipped.cpp164
-rw-r--r--chromium/third_party/skia/gm/imagefilterscropexpand.cpp170
-rw-r--r--chromium/third_party/skia/gm/imagefilterscropped.cpp181
-rw-r--r--chromium/third_party/skia/gm/imagefiltersgraph.cpp218
-rw-r--r--chromium/third_party/skia/gm/imagefiltersscaled.cpp183
-rw-r--r--chromium/third_party/skia/gm/imagemagnifier.cpp69
-rw-r--r--chromium/third_party/skia/gm/imageresizetiled.cpp79
-rw-r--r--chromium/third_party/skia/gm/internal_links.cpp77
-rw-r--r--chromium/third_party/skia/gm/inversepaths.cpp150
-rw-r--r--chromium/third_party/skia/gm/lcdtext.cpp70
-rw-r--r--chromium/third_party/skia/gm/lerpmode.cpp67
-rw-r--r--chromium/third_party/skia/gm/lighting.cpp130
-rw-r--r--chromium/third_party/skia/gm/linepaths.cpp309
-rw-r--r--chromium/third_party/skia/gm/lumafilter.cpp157
-rw-r--r--chromium/third_party/skia/gm/matrixconvolution.cpp119
-rw-r--r--chromium/third_party/skia/gm/matriximagefilter.cpp95
-rw-r--r--chromium/third_party/skia/gm/megalooper.cpp248
-rw-r--r--chromium/third_party/skia/gm/mixedxfermodes.cpp145
-rw-r--r--chromium/third_party/skia/gm/modecolorfilters.cpp166
-rw-r--r--chromium/third_party/skia/gm/morphology.cpp105
-rw-r--r--chromium/third_party/skia/gm/nested.cpp129
-rw-r--r--chromium/third_party/skia/gm/ninepatchstretch.cpp101
-rw-r--r--chromium/third_party/skia/gm/nonclosedpaths.cpp149
-rw-r--r--chromium/third_party/skia/gm/offsetimagefilter.cpp132
-rw-r--r--chromium/third_party/skia/gm/optimizations.cpp417
-rwxr-xr-xchromium/third_party/skia/gm/ovals.cpp291
-rw-r--r--chromium/third_party/skia/gm/patheffects.cpp174
-rw-r--r--chromium/third_party/skia/gm/pathfill.cpp230
-rw-r--r--chromium/third_party/skia/gm/pathinterior.cpp117
-rw-r--r--chromium/third_party/skia/gm/pathopsinverse.cpp118
-rw-r--r--chromium/third_party/skia/gm/pathopsskpclip.cpp77
-rw-r--r--chromium/third_party/skia/gm/pathreverse.cpp123
-rw-r--r--chromium/third_party/skia/gm/peekpixels.cpp77
-rw-r--r--chromium/third_party/skia/gm/perlinnoise.cpp180
-rw-r--r--chromium/third_party/skia/gm/pictureimagefilter.cpp93
-rw-r--r--chromium/third_party/skia/gm/pictureshader.cpp164
-rw-r--r--chromium/third_party/skia/gm/points.cpp77
-rw-r--r--chromium/third_party/skia/gm/poly2poly.cpp275
-rw-r--r--chromium/third_party/skia/gm/polygons.cpp172
-rw-r--r--chromium/third_party/skia/gm/quadpaths.cpp315
-rwxr-xr-xchromium/third_party/skia/gm/rebaseline_server/base_unittest.py128
-rw-r--r--chromium/third_party/skia/gm/rebaseline_server/column.py67
-rwxr-xr-xchromium/third_party/skia/gm/rebaseline_server/compare_configs.py207
-rwxr-xr-xchromium/third_party/skia/gm/rebaseline_server/compare_configs_test.py57
-rwxr-xr-xchromium/third_party/skia/gm/rebaseline_server/compare_rendered_pictures.py243
-rwxr-xr-xchromium/third_party/skia/gm/rebaseline_server/compare_rendered_pictures_test.py120
-rwxr-xr-xchromium/third_party/skia/gm/rebaseline_server/compare_to_expectations.py391
-rwxr-xr-xchromium/third_party/skia/gm/rebaseline_server/compare_to_expectations_test.py57
-rwxr-xr-xchromium/third_party/skia/gm/rebaseline_server/download_actuals.py152
-rwxr-xr-xchromium/third_party/skia/gm/rebaseline_server/download_actuals_test.py53
-rwxr-xr-xchromium/third_party/skia/gm/rebaseline_server/fix_pythonpath.py21
-rw-r--r--chromium/third_party/skia/gm/rebaseline_server/imagediffdb.py414
-rwxr-xr-xchromium/third_party/skia/gm/rebaseline_server/imagediffdb_test.py101
-rw-r--r--chromium/third_party/skia/gm/rebaseline_server/imagepair.py90
-rwxr-xr-xchromium/third_party/skia/gm/rebaseline_server/imagepair_test.py183
-rw-r--r--chromium/third_party/skia/gm/rebaseline_server/imagepairset.py168
-rwxr-xr-xchromium/third_party/skia/gm/rebaseline_server/imagepairset_test.py180
-rwxr-xr-xchromium/third_party/skia/gm/rebaseline_server/results.py311
-rwxr-xr-xchromium/third_party/skia/gm/rebaseline_server/results_test.py81
-rwxr-xr-xchromium/third_party/skia/gm/rebaseline_server/server.py694
-rw-r--r--chromium/third_party/skia/gm/rebaseline_server/static/constants.js80
-rw-r--r--chromium/third_party/skia/gm/rebaseline_server/static/loader.js932
-rw-r--r--chromium/third_party/skia/gm/rebaseline_server/static/view.css70
-rw-r--r--chromium/third_party/skia/gm/rebaseline_server/static/view.html447
-rwxr-xr-xchromium/third_party/skia/gm/rebaseline_server/test_all.py28
-rw-r--r--chromium/third_party/skia/gm/rects.cpp305
-rw-r--r--chromium/third_party/skia/gm/resizeimagefilter.cpp127
-rw-r--r--chromium/third_party/skia/gm/roundrects.cpp343
-rw-r--r--chromium/third_party/skia/gm/rrect.cpp173
-rw-r--r--chromium/third_party/skia/gm/rrects.cpp270
-rw-r--r--chromium/third_party/skia/gm/samplerstress.cpp156
-rw-r--r--chromium/third_party/skia/gm/selftest.cpp62
-rw-r--r--chromium/third_party/skia/gm/shaderbounds.cpp110
-rw-r--r--chromium/third_party/skia/gm/shadertext.cpp201
-rw-r--r--chromium/third_party/skia/gm/shadertext2.cpp212
-rw-r--r--chromium/third_party/skia/gm/shadertext3.cpp140
-rw-r--r--chromium/third_party/skia/gm/shadows.cpp131
-rw-r--r--chromium/third_party/skia/gm/shallowgradient.cpp84
-rw-r--r--chromium/third_party/skia/gm/simpleaaclip.cpp204
-rw-r--r--chromium/third_party/skia/gm/skbug1719.cpp106
-rw-r--r--chromium/third_party/skia/gm/spritebitmap.cpp102
-rw-r--r--chromium/third_party/skia/gm/srcmode.cpp146
-rw-r--r--chromium/third_party/skia/gm/stringart.cpp70
-rw-r--r--chromium/third_party/skia/gm/strokefill.cpp95
-rw-r--r--chromium/third_party/skia/gm/strokerect.cpp116
-rw-r--r--chromium/third_party/skia/gm/strokerects.cpp87
-rw-r--r--chromium/third_party/skia/gm/strokes.cpp262
-rw-r--r--chromium/third_party/skia/gm/stroketext.cpp103
-rw-r--r--chromium/third_party/skia/gm/system_preferences.h12
-rw-r--r--chromium/third_party/skia/gm/system_preferences_default.cpp10
-rw-r--r--chromium/third_party/skia/gm/system_preferences_mac.mm28
-rw-r--r--chromium/third_party/skia/gm/tablecolorfilter.cpp137
-rw-r--r--chromium/third_party/skia/gm/techtalk1.cpp397
-rw-r--r--chromium/third_party/skia/gm/testimagefilters.cpp149
-rw-r--r--chromium/third_party/skia/gm/texdata.cpp146
-rw-r--r--chromium/third_party/skia/gm/texteffects.cpp219
-rw-r--r--chromium/third_party/skia/gm/texturedomaineffect.cpp159
-rw-r--r--chromium/third_party/skia/gm/thinrects.cpp123
-rw-r--r--chromium/third_party/skia/gm/thinstrokedrects.cpp82
-rw-r--r--chromium/third_party/skia/gm/tileimagefilter.cpp137
-rw-r--r--chromium/third_party/skia/gm/tilemodes.cpp266
-rw-r--r--chromium/third_party/skia/gm/tilemodes_scaled.cpp286
-rw-r--r--chromium/third_party/skia/gm/tinybitmap.cpp65
-rw-r--r--chromium/third_party/skia/gm/twopointradial.cpp115
-rw-r--r--chromium/third_party/skia/gm/typeface.cpp221
-rw-r--r--chromium/third_party/skia/gm/variedtext.cpp169
-rw-r--r--chromium/third_party/skia/gm/vertices.cpp130
-rw-r--r--chromium/third_party/skia/gm/verttext.cpp123
-rw-r--r--chromium/third_party/skia/gm/verttext2.cpp102
-rw-r--r--chromium/third_party/skia/gm/verylargebitmap.cpp123
-rw-r--r--chromium/third_party/skia/gm/xfermodeimagefilter.cpp226
-rw-r--r--chromium/third_party/skia/gm/xfermodes.cpp292
-rw-r--r--chromium/third_party/skia/gm/xfermodes2.cpp153
-rw-r--r--chromium/third_party/skia/gm/xfermodes3.cpp246
-rw-r--r--chromium/third_party/skia/gyp/SampleApp.gyp49
-rw-r--r--chromium/third_party/skia/gyp/SimpleiOSApp.gyp6
-rw-r--r--chromium/third_party/skia/gyp/android_deps.gyp65
-rw-r--r--chromium/third_party/skia/gyp/android_framework_lib.gyp21
-rw-r--r--chromium/third_party/skia/gyp/angle.gyp45
-rw-r--r--chromium/third_party/skia/gyp/animator.gyp4
-rw-r--r--chromium/third_party/skia/gyp/apptype_console.gypi8
-rw-r--r--chromium/third_party/skia/gyp/bench.gyp112
-rw-r--r--chromium/third_party/skia/gyp/bench.gypi94
-rw-r--r--chromium/third_party/skia/gyp/common.gypi44
-rw-r--r--chromium/third_party/skia/gyp/common_conditions.gypi229
-rw-r--r--chromium/third_party/skia/gyp/common_variables.gypi92
-rw-r--r--chromium/third_party/skia/gyp/core.gyp8
-rw-r--r--chromium/third_party/skia/gyp/core.gypi55
-rw-r--r--chromium/third_party/skia/gyp/crash_handler.gyp18
-rw-r--r--chromium/third_party/skia/gyp/debugger.gyp4
-rw-r--r--chromium/third_party/skia/gyp/dm.gyp38
-rwxr-xr-xchromium/third_party/skia/gyp/edtaa.gyp31
-rw-r--r--chromium/third_party/skia/gyp/effects.gypi9
-rw-r--r--chromium/third_party/skia/gyp/etc1.gyp21
-rw-r--r--chromium/third_party/skia/gyp/everything.gyp5
-rw-r--r--chromium/third_party/skia/gyp/fontconfig.gyp100
-rw-r--r--chromium/third_party/skia/gyp/freetype.gyp92
-rw-r--r--chromium/third_party/skia/gyp/giflib.gyp52
-rw-r--r--chromium/third_party/skia/gyp/gm.gyp41
-rw-r--r--chromium/third_party/skia/gyp/gmslides.gypi84
-rw-r--r--chromium/third_party/skia/gyp/gpu.gyp40
-rw-r--r--chromium/third_party/skia/gyp/gpu.gypi42
-rw-r--r--chromium/third_party/skia/gyp/iconv.gyp43
-rw-r--r--chromium/third_party/skia/gyp/images.gyp82
-rw-r--r--chromium/third_party/skia/gyp/jsoncpp.gyp77
-rw-r--r--chromium/third_party/skia/gyp/ktx.gyp26
-rw-r--r--chromium/third_party/skia/gyp/libjpeg.gyp11
-rw-r--r--chromium/third_party/skia/gyp/libpng.gyp88
-rw-r--r--chromium/third_party/skia/gyp/libwebp.gyp48
-rw-r--r--chromium/third_party/skia/gyp/lua.gyp11
-rw-r--r--chromium/third_party/skia/gyp/most.gyp18
-rw-r--r--chromium/third_party/skia/gyp/nanomsg.gyp204
-rw-r--r--chromium/third_party/skia/gyp/opts.gyp81
-rw-r--r--chromium/third_party/skia/gyp/pathops_unittest.gyp4
-rw-r--r--chromium/third_party/skia/gyp/pdf.gyp17
-rw-r--r--chromium/third_party/skia/gyp/pdfviewer_lib.gyp3
-rw-r--r--chromium/third_party/skia/gyp/poppler.gyp244
-rw-r--r--chromium/third_party/skia/gyp/ports.gyp76
-rw-r--r--chromium/third_party/skia/gyp/public_headers.gypi14
-rw-r--r--chromium/third_party/skia/gyp/record.gypi3
-rw-r--r--chromium/third_party/skia/gyp/resources.gyp25
-rw-r--r--chromium/third_party/skia/gyp/sfnt.gyp4
-rw-r--r--chromium/third_party/skia/gyp/skflate.gyp26
-rw-r--r--chromium/third_party/skia/gyp/skia_for_android_framework_defines.gypi29
-rw-r--r--chromium/third_party/skia/gyp/skia_for_chromium_defines.gypi25
-rwxr-xr-xchromium/third_party/skia/gyp/skpskgr_test.gyp40
-rw-r--r--chromium/third_party/skia/gyp/tests.gyp172
-rw-r--r--chromium/third_party/skia/gyp/tests.gypi203
-rw-r--r--chromium/third_party/skia/gyp/tools.gyp169
-rw-r--r--chromium/third_party/skia/gyp/utils.gyp117
-rw-r--r--chromium/third_party/skia/gyp/utils.gypi125
-rw-r--r--chromium/third_party/skia/gyp/v8.gyp55
-rw-r--r--chromium/third_party/skia/gyp/views.gyp1
-rw-r--r--chromium/third_party/skia/gyp/views_animated.gyp1
-rw-r--r--chromium/third_party/skia/gyp/webtry.gyp23
-rw-r--r--chromium/third_party/skia/gyp/zlib.gyp100
-rwxr-xr-xchromium/third_party/skia/gyp_skia171
-rw-r--r--chromium/third_party/skia/gyp_skia.py18
-rw-r--r--chromium/third_party/skia/include/config/SkUserConfig.h44
-rw-r--r--chromium/third_party/skia/include/core/Sk64.h230
-rw-r--r--[-rwxr-xr-x]chromium/third_party/skia/include/core/SkAdvancedTypefaceMetrics.h16
-rw-r--r--chromium/third_party/skia/include/core/SkAnnotation.h19
-rw-r--r--chromium/third_party/skia/include/core/SkBBHFactory.h69
-rw-r--r--chromium/third_party/skia/include/core/SkBitmap.h437
-rw-r--r--chromium/third_party/skia/include/core/SkBitmapDevice.h107
-rw-r--r--chromium/third_party/skia/include/core/SkBlitRow.h2
-rw-r--r--chromium/third_party/skia/include/core/SkBlurTypes.h29
-rw-r--r--chromium/third_party/skia/include/core/SkBounder.h93
-rw-r--r--chromium/third_party/skia/include/core/SkCanvas.h685
-rw-r--r--chromium/third_party/skia/include/core/SkClipStack.h128
-rw-r--r--chromium/third_party/skia/include/core/SkColorFilter.h4
-rw-r--r--chromium/third_party/skia/include/core/SkColorPriv.h159
-rw-r--r--chromium/third_party/skia/include/core/SkColorShader.h54
-rw-r--r--chromium/third_party/skia/include/core/SkColorTable.h4
-rw-r--r--chromium/third_party/skia/include/core/SkComposeShader.h45
-rw-r--r--chromium/third_party/skia/include/core/SkData.h3
-rw-r--r--chromium/third_party/skia/include/core/SkDevice.h238
-rw-r--r--chromium/third_party/skia/include/core/SkDeviceProperties.h9
-rw-r--r--chromium/third_party/skia/include/core/SkDraw.h15
-rw-r--r--chromium/third_party/skia/include/core/SkDrawLooper.h82
-rw-r--r--chromium/third_party/skia/include/core/SkDynamicAnnotations.h46
-rw-r--r--chromium/third_party/skia/include/core/SkEmptyShader.h28
-rw-r--r--chromium/third_party/skia/include/core/SkEndian.h13
-rw-r--r--chromium/third_party/skia/include/core/SkFixed.h150
-rw-r--r--chromium/third_party/skia/include/core/SkFlattenable.h18
-rw-r--r--chromium/third_party/skia/include/core/SkFlattenableBuffers.h247
-rw-r--r--chromium/third_party/skia/include/core/SkFloatBits.h9
-rw-r--r--chromium/third_party/skia/include/core/SkFloatingPoint.h21
-rw-r--r--chromium/third_party/skia/include/core/SkFont.h161
-rw-r--r--chromium/third_party/skia/include/core/SkGeometry.h307
-rw-r--r--chromium/third_party/skia/include/core/SkImage.h55
-rw-r--r--chromium/third_party/skia/include/core/SkImageDecoder.h137
-rw-r--r--chromium/third_party/skia/include/core/SkImageEncoder.h2
-rw-r--r--chromium/third_party/skia/include/core/SkImageFilter.h136
-rw-r--r--chromium/third_party/skia/include/core/SkImageFilterUtils.h38
-rw-r--r--chromium/third_party/skia/include/core/SkImageGenerator.h54
-rw-r--r--chromium/third_party/skia/include/core/SkImageInfo.h126
-rw-r--r--chromium/third_party/skia/include/core/SkInstCnt.h43
-rw-r--r--chromium/third_party/skia/include/core/SkMallocPixelRef.h63
-rw-r--r--chromium/third_party/skia/include/core/SkMaskFilter.h100
-rw-r--r--chromium/third_party/skia/include/core/SkMath.h43
-rw-r--r--chromium/third_party/skia/include/core/SkMatrix.h93
-rw-r--r--chromium/third_party/skia/include/core/SkOnce.h144
-rw-r--r--chromium/third_party/skia/include/core/SkPaint.h142
-rw-r--r--chromium/third_party/skia/include/core/SkPaintOptionsAndroid.h8
-rw-r--r--chromium/third_party/skia/include/core/SkPath.h58
-rw-r--r--chromium/third_party/skia/include/core/SkPathEffect.h56
-rw-r--r--chromium/third_party/skia/include/core/SkPathRef.h28
-rw-r--r--chromium/third_party/skia/include/core/SkPicture.h241
-rw-r--r--chromium/third_party/skia/include/core/SkPictureRecorder.h93
-rw-r--r--chromium/third_party/skia/include/core/SkPixelRef.h120
-rw-r--r--chromium/third_party/skia/include/core/SkPoint.h28
-rw-r--r--chromium/third_party/skia/include/core/SkPostConfig.h111
-rw-r--r--chromium/third_party/skia/include/core/SkPreConfig.h65
-rw-r--r--chromium/third_party/skia/include/core/SkRRect.h43
-rw-r--r--chromium/third_party/skia/include/core/SkRasterizer.h5
-rw-r--r--chromium/third_party/skia/include/core/SkReadBuffer.h233
-rw-r--r--chromium/third_party/skia/include/core/SkReader32.h8
-rw-r--r--chromium/third_party/skia/include/core/SkRect.h66
-rw-r--r--chromium/third_party/skia/include/core/SkRefCnt.h17
-rw-r--r--chromium/third_party/skia/include/core/SkRegion.h6
-rw-r--r--chromium/third_party/skia/include/core/SkScalar.h411
-rw-r--r--chromium/third_party/skia/include/core/SkShader.h277
-rw-r--r--chromium/third_party/skia/include/core/SkSize.h6
-rw-r--r--chromium/third_party/skia/include/core/SkStream.h18
-rw-r--r--chromium/third_party/skia/include/core/SkString.h6
-rw-r--r--chromium/third_party/skia/include/core/SkStrokeRec.h4
-rw-r--r--chromium/third_party/skia/include/core/SkSurface.h54
-rw-r--r--chromium/third_party/skia/include/core/SkTArray.h33
-rw-r--r--chromium/third_party/skia/include/core/SkTDArray.h64
-rw-r--r--chromium/third_party/skia/include/core/SkTDict.h71
-rw-r--r--chromium/third_party/skia/include/core/SkTInternalLList.h2
-rw-r--r--chromium/third_party/skia/include/core/SkTLazy.h10
-rw-r--r--chromium/third_party/skia/include/core/SkTemplates.h12
-rw-r--r--chromium/third_party/skia/include/core/SkThread.h110
-rw-r--r--chromium/third_party/skia/include/core/SkThread_platform.h194
-rw-r--r--chromium/third_party/skia/include/core/SkTileGridPicture.h56
-rw-r--r--chromium/third_party/skia/include/core/SkTrace.h45
-rw-r--r--chromium/third_party/skia/include/core/SkTypeface.h38
-rw-r--r--chromium/third_party/skia/include/core/SkTypes.h50
-rw-r--r--chromium/third_party/skia/include/core/SkUnPreMultiply.h2
-rw-r--r--chromium/third_party/skia/include/core/SkUnitMapper.h37
-rw-r--r--chromium/third_party/skia/include/core/SkUtils.h19
-rw-r--r--chromium/third_party/skia/include/core/SkWeakRefCnt.h8
-rw-r--r--chromium/third_party/skia/include/core/SkWriteBuffer.h120
-rw-r--r--chromium/third_party/skia/include/core/SkWriter32.h255
-rw-r--r--chromium/third_party/skia/include/core/SkXfermode.h51
-rw-r--r--chromium/third_party/skia/include/device/xps/SkXPSDevice.h15
-rw-r--r--chromium/third_party/skia/include/effects/Sk1DPathEffect.h10
-rw-r--r--chromium/third_party/skia/include/effects/Sk2DPathEffect.h31
-rw-r--r--chromium/third_party/skia/include/effects/SkAlphaThresholdFilter.h26
-rw-r--r--chromium/third_party/skia/include/effects/SkArithmeticMode.h3
-rw-r--r--chromium/third_party/skia/include/effects/SkAvoidXfermode.h11
-rw-r--r--chromium/third_party/skia/include/effects/SkBicubicImageFilter.h26
-rw-r--r--chromium/third_party/skia/include/effects/SkBitmapAlphaThresholdShader.h24
-rw-r--r--chromium/third_party/skia/include/effects/SkBitmapSource.h22
-rw-r--r--chromium/third_party/skia/include/effects/SkBlurDrawLooper.h41
-rw-r--r--chromium/third_party/skia/include/effects/SkBlurImageFilter.h30
-rw-r--r--chromium/third_party/skia/include/effects/SkBlurMaskFilter.h31
-rw-r--r--[-rwxr-xr-x]chromium/third_party/skia/include/effects/SkColorFilterImageFilter.h8
-rw-r--r--chromium/third_party/skia/include/effects/SkColorMatrix.h14
-rw-r--r--chromium/third_party/skia/include/effects/SkColorMatrixFilter.h16
-rw-r--r--chromium/third_party/skia/include/effects/SkComposeImageFilter.h14
-rw-r--r--chromium/third_party/skia/include/effects/SkCornerPathEffect.h9
-rw-r--r--chromium/third_party/skia/include/effects/SkDashPathEffect.h17
-rw-r--r--chromium/third_party/skia/include/effects/SkDiscretePathEffect.h26
-rw-r--r--chromium/third_party/skia/include/effects/SkDisplacementMapEffect.h44
-rw-r--r--chromium/third_party/skia/include/effects/SkDropShadowImageFilter.h26
-rw-r--r--chromium/third_party/skia/include/effects/SkEmbossMaskFilter.h12
-rw-r--r--chromium/third_party/skia/include/effects/SkGradientShader.h123
-rw-r--r--chromium/third_party/skia/include/effects/SkKernel33MaskFilter.h62
-rw-r--r--chromium/third_party/skia/include/effects/SkLayerDrawLooper.h100
-rw-r--r--chromium/third_party/skia/include/effects/SkLayerRasterizer.h67
-rw-r--r--chromium/third_party/skia/include/effects/SkLerpXfermode.h6
-rw-r--r--chromium/third_party/skia/include/effects/SkLightingImageFilter.h19
-rw-r--r--chromium/third_party/skia/include/effects/SkLumaColorFilter.h6
-rw-r--r--chromium/third_party/skia/include/effects/SkMagnifierImageFilter.h13
-rw-r--r--chromium/third_party/skia/include/effects/SkMatrixConvolutionImageFilter.h85
-rw-r--r--chromium/third_party/skia/include/effects/SkMatrixImageFilter.h58
-rw-r--r--[-rwxr-xr-x]chromium/third_party/skia/include/effects/SkMergeImageFilter.h30
-rw-r--r--chromium/third_party/skia/include/effects/SkMorphologyImageFilter.h76
-rw-r--r--chromium/third_party/skia/include/effects/SkOffsetImageFilter.h18
-rw-r--r--chromium/third_party/skia/include/effects/SkPerlinNoiseShader.h80
-rw-r--r--chromium/third_party/skia/include/effects/SkPictureImageFilter.h30
-rw-r--r--chromium/third_party/skia/include/effects/SkPixelXorXfermode.h11
-rw-r--r--chromium/third_party/skia/include/effects/SkRectShaderImageFilter.h8
-rw-r--r--chromium/third_party/skia/include/effects/SkStippleMaskFilter.h11
-rw-r--r--chromium/third_party/skia/include/effects/SkTableMaskFilter.h14
-rw-r--r--[-rwxr-xr-x]chromium/third_party/skia/include/effects/SkTestImageFilters.h13
-rw-r--r--chromium/third_party/skia/include/effects/SkTileImageFilter.h20
-rw-r--r--chromium/third_party/skia/include/effects/SkTransparentShader.h35
-rw-r--r--chromium/third_party/skia/include/effects/SkXfermodeImageFilter.h25
-rw-r--r--chromium/third_party/skia/include/gpu/GrBackendEffectFactory.h4
-rwxr-xr-xchromium/third_party/skia/include/gpu/GrBitmapTextContext.h46
-rw-r--r--chromium/third_party/skia/include/gpu/GrCacheable.h73
-rw-r--r--chromium/third_party/skia/include/gpu/GrClipData.h11
-rw-r--r--chromium/third_party/skia/include/gpu/GrColor.h47
-rw-r--r--chromium/third_party/skia/include/gpu/GrConfig.h17
-rw-r--r--chromium/third_party/skia/include/gpu/GrContext.h218
-rw-r--r--chromium/third_party/skia/include/gpu/GrContextFactory.h35
-rw-r--r--chromium/third_party/skia/include/gpu/GrCoordTransform.h2
-rwxr-xr-xchromium/third_party/skia/include/gpu/GrDistanceFieldTextContext.h46
-rw-r--r--chromium/third_party/skia/include/gpu/GrEffectUnitTest.h6
-rw-r--r--chromium/third_party/skia/include/gpu/GrFontScaler.h8
-rw-r--r--chromium/third_party/skia/include/gpu/GrGlyph.h10
-rw-r--r--chromium/third_party/skia/include/gpu/GrGpuObject.h130
-rw-r--r--chromium/third_party/skia/include/gpu/GrPoint.h30
-rw-r--r--chromium/third_party/skia/include/gpu/GrRect.h8
-rw-r--r--chromium/third_party/skia/include/gpu/GrRenderTarget.h8
-rw-r--r--chromium/third_party/skia/include/gpu/GrResource.h143
-rw-r--r--chromium/third_party/skia/include/gpu/GrSurface.h8
-rw-r--r--chromium/third_party/skia/include/gpu/GrTBackendEffectFactory.h2
-rw-r--r--chromium/third_party/skia/include/gpu/GrTextContext.h40
-rw-r--r--chromium/third_party/skia/include/gpu/GrTexture.h167
-rw-r--r--chromium/third_party/skia/include/gpu/GrTextureAccess.h2
-rw-r--r--chromium/third_party/skia/include/gpu/GrTypes.h105
-rw-r--r--chromium/third_party/skia/include/gpu/GrTypesPriv.h57
-rw-r--r--chromium/third_party/skia/include/gpu/GrUserConfig.h6
-rw-r--r--chromium/third_party/skia/include/gpu/SkGpuDevice.h93
-rw-r--r--chromium/third_party/skia/include/gpu/SkGr.h37
-rw-r--r--chromium/third_party/skia/include/gpu/SkGrPixelRef.h11
-rw-r--r--chromium/third_party/skia/include/gpu/gl/GrGLConfig.h17
-rw-r--r--chromium/third_party/skia/include/gpu/gl/GrGLExtensions.h40
-rw-r--r--chromium/third_party/skia/include/gpu/gl/GrGLFunctions.h56
-rw-r--r--chromium/third_party/skia/include/gpu/gl/GrGLInterface.h529
-rw-r--r--chromium/third_party/skia/include/gpu/gl/SkGLContextHelper.h18
-rw-r--r--chromium/third_party/skia/include/gpu/gl/SkNullGLContext.h2
-rw-r--r--chromium/third_party/skia/include/images/SkDecodingImageGenerator.h131
-rw-r--r--chromium/third_party/skia/include/images/SkImageRef.h104
-rw-r--r--chromium/third_party/skia/include/images/SkImageRef_GlobalPool.h62
-rw-r--r--chromium/third_party/skia/include/images/SkImages.h14
-rw-r--r--chromium/third_party/skia/include/pdf/SkPDFDevice.h12
-rw-r--r--chromium/third_party/skia/include/pdf/SkPDFDocument.h10
-rw-r--r--chromium/third_party/skia/include/ports/SkFontMgr.h64
-rw-r--r--chromium/third_party/skia/include/ports/SkFontMgr_indirect.h104
-rw-r--r--chromium/third_party/skia/include/ports/SkRemotableFontMgr.h152
-rw-r--r--chromium/third_party/skia/include/ports/SkTypeface_android.h6
-rw-r--r--chromium/third_party/skia/include/ports/SkTypeface_win.h21
-rw-r--r--chromium/third_party/skia/include/record/SkRecording.h75
-rw-r--r--chromium/third_party/skia/include/utils/SkCamera.h40
-rw-r--r--chromium/third_party/skia/include/utils/SkCanvasStateUtils.h15
-rw-r--r--chromium/third_party/skia/include/utils/SkDeferredCanvas.h64
-rw-r--r--chromium/third_party/skia/include/utils/SkDumpCanvas.h63
-rw-r--r--chromium/third_party/skia/include/utils/SkEventTracer.h75
-rw-r--r--chromium/third_party/skia/include/utils/SkJSONCPP.h3
-rw-r--r--chromium/third_party/skia/include/utils/SkLua.h10
-rw-r--r--chromium/third_party/skia/include/utils/SkLuaCanvas.h54
-rw-r--r--chromium/third_party/skia/include/utils/SkNWayCanvas.h51
-rw-r--r--chromium/third_party/skia/include/utils/SkNoSaveLayerCanvas.h47
-rw-r--r--chromium/third_party/skia/include/utils/SkPictureUtils.h52
-rw-r--r--chromium/third_party/skia/include/utils/SkProxyCanvas.h58
-rw-r--r--chromium/third_party/skia/include/utils/SkRTConf.h2
-rw-r--r--chromium/third_party/skia/include/utils/SkRandom.h27
-rw-r--r--chromium/third_party/skia/include/utils/SkRunnable.h14
-rw-r--r--chromium/third_party/skia/include/utils/SkThreadPool.h180
-rw-r--r--chromium/third_party/skia/include/utils/SkUnitMappers.h55
-rw-r--r--[-rwxr-xr-x]chromium/third_party/skia/include/utils/ios/SkStream_NSData.h0
-rw-r--r--chromium/third_party/skia/include/utils/mac/SkCGUtils.h19
-rw-r--r--[-rwxr-xr-x]chromium/third_party/skia/include/views/SkOSWindow_iOS.h0
-rw-r--r--chromium/third_party/skia/include/views/SkWindow.h8
-rw-r--r--chromium/third_party/skia/make.bat35
-rw-r--r--chromium/third_party/skia/make.py173
-rw-r--r--chromium/third_party/skia/platform_tools/android/app/AndroidManifest.xml22
-rw-r--r--chromium/third_party/skia/platform_tools/android/app/build.xml61
-rw-r--r--chromium/third_party/skia/platform_tools/android/app/jni/com_skia_SkiaSampleRenderer.cpp354
-rw-r--r--chromium/third_party/skia/platform_tools/android/app/jni/com_skia_SkiaSampleRenderer.h157
-rw-r--r--chromium/third_party/skia/platform_tools/android/app/project.properties14
-rw-r--r--chromium/third_party/skia/platform_tools/android/app/res/drawable-hdpi/ic_btn_find_next.pngbin0 -> 1099 bytes
-rw-r--r--chromium/third_party/skia/platform_tools/android/app/res/drawable-hdpi/ic_btn_find_prev.pngbin0 -> 912 bytes
-rw-r--r--chromium/third_party/skia/platform_tools/android/app/res/layout/layout.xml17
-rw-r--r--chromium/third_party/skia/platform_tools/android/app/res/menu/action_bar.xml75
-rw-r--r--chromium/third_party/skia/platform_tools/android/app/res/values/strings.xml18
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/adb_list_devices.py153
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/android_gdb_apk60
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/android_gdb_exe48
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/android_gdbserver68
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/android_install_apk49
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/android_install_skia6
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/android_kill_skia33
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/android_make21
l---------chromium/third_party/skia/platform_tools/android/bin/android_ninja1
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/android_perf120
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/android_run_skia48
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/android_setup.sh239
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/download_toolchains.py19
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/download_utils.py323
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/gyp_to_android.py206
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/http_download.py92
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/linux/adbbin0 -> 1226659 bytes
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/linux/perfhostbin0 -> 2219858 bytes
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/mac/adbbin0 -> 1256228 bytes
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/mac/perfhostbin0 -> 639612 bytes
-rw-r--r--chromium/third_party/skia/platform_tools/android/bin/utils/setup_adb.sh17
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/utils/setup_toolchain.sh96
-rw-r--r--chromium/third_party/skia/platform_tools/android/examples/hello_skia_app/AndroidManifest.xml17
-rw-r--r--chromium/third_party/skia/platform_tools/android/examples/hello_skia_app/README39
-rw-r--r--chromium/third_party/skia/platform_tools/android/examples/hello_skia_app/build.xml92
-rw-r--r--chromium/third_party/skia/platform_tools/android/examples/hello_skia_app/jni/Android.mk42
-rw-r--r--chromium/third_party/skia/platform_tools/android/examples/hello_skia_app/jni/helloskia.cpp70
-rw-r--r--chromium/third_party/skia/platform_tools/android/examples/hello_skia_app/project.properties14
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/examples/hello_skia_app/res/drawable-mdpi/ic_launcher.pngbin0 -> 5237 bytes
-rw-r--r--chromium/third_party/skia/platform_tools/android/examples/hello_skia_app/res/values/strings.xml4
-rw-r--r--chromium/third_party/skia/platform_tools/android/gclient.config10
-rw-r--r--chromium/third_party/skia/platform_tools/android/gyp/dependencies.gypi242
-rw-r--r--chromium/third_party/skia/platform_tools/android/gyp/skia_android.gypi99
-rw-r--r--chromium/third_party/skia/platform_tools/android/gyp_gen/__init__.py0
-rw-r--r--chromium/third_party/skia/platform_tools/android/gyp_gen/android_framework_gyp.py102
-rw-r--r--chromium/third_party/skia/platform_tools/android/gyp_gen/generate_user_config.py103
-rw-r--r--chromium/third_party/skia/platform_tools/android/gyp_gen/gypd_parser.py153
-rw-r--r--chromium/third_party/skia/platform_tools/android/gyp_gen/makefile_writer.py233
-rw-r--r--chromium/third_party/skia/platform_tools/android/gyp_gen/tool_makefile_writer.py105
-rw-r--r--chromium/third_party/skia/platform_tools/android/gyp_gen/vars_dict_lib.py166
-rw-r--r--chromium/third_party/skia/platform_tools/android/launcher/skia_launcher.cpp114
-rw-r--r--chromium/third_party/skia/platform_tools/android/third_party/cpufeatures/README5
-rw-r--r--chromium/third_party/skia/platform_tools/android/third_party/cpufeatures/cpu-features.c927
-rw-r--r--chromium/third_party/skia/platform_tools/android/third_party/cpufeatures/cpu-features.h195
-rw-r--r--chromium/third_party/skia/platform_tools/android/whitespace.txt4
-rwxr-xr-xchromium/third_party/skia/platform_tools/barelinux/bin/arm64_download150
-rwxr-xr-xchromium/third_party/skia/platform_tools/barelinux/bin/arm64_make55
-rwxr-xr-xchromium/third_party/skia/platform_tools/barelinux/bin/barelinux_make83
-rwxr-xr-xchromium/third_party/skia/platform_tools/barelinux/bin/download_deps29
-rwxr-xr-xchromium/third_party/skia/platform_tools/chromeos/bin/build_skia_in_chroot42
-rwxr-xr-xchromium/third_party/skia/platform_tools/chromeos/bin/chromeos_make81
-rwxr-xr-xchromium/third_party/skia/platform_tools/chromeos/bin/chromeos_setup.sh56
-rw-r--r--chromium/third_party/skia/platform_tools/chromeos/gyp/dependencies.gypi35
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/SampleApp/SampleApp.nmf6
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/SampleApp/index.html71
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/debugger/debugger.css172
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/debugger/debugger.nmf6
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/debugger/icons/blank.pngbin0 -> 146 bytes
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/debugger/icons/breakpoint.pngbin0 -> 2247 bytes
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/debugger/icons/breakpoint_16x16.pngbin0 -> 1108 bytes
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/debugger/icons/delete.pngbin0 -> 1415 bytes
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/debugger/icons/inspector.pngbin0 -> 1960 bytes
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/debugger/icons/next.pngbin0 -> 938 bytes
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/debugger/icons/pause.pngbin0 -> 1181 bytes
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/debugger/icons/play.pngbin0 -> 1073 bytes
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/debugger/icons/previous.pngbin0 -> 943 bytes
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/debugger/icons/profile.pngbin0 -> 243 bytes
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/debugger/icons/reload.pngbin0 -> 1932 bytes
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/debugger/icons/rewind.pngbin0 -> 1105 bytes
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/debugger/icons/skia.pngbin0 -> 1054 bytes
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/debugger/index.html468
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/favicon.icobin0 -> 318 bytes
-rwxr-xr-xchromium/third_party/skia/platform_tools/nacl/httpd.py212
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/index.html23
-rwxr-xr-xchromium/third_party/skia/platform_tools/nacl/nacl_make112
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/skhello/index.html71
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/skhello/skhello.nmf6
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/src/nacl_debugger.cpp220
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/src/nacl_hello.cpp150
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/src/nacl_interface.cpp111
-rw-r--r--chromium/third_party/skia/platform_tools/nacl/src/nacl_sample.cpp212
-rw-r--r--chromium/third_party/skia/resources/CMYK.jpgbin0 -> 116536 bytes
-rw-r--r--chromium/third_party/skia/resources/Funkster.ttfbin0 -> 236808 bytes
-rw-r--r--chromium/third_party/skia/resources/arrow.pngbin0 -> 3926 bytes
-rw-r--r--chromium/third_party/skia/resources/baby_tux.pngbin0 -> 29596 bytes
-rw-r--r--chromium/third_party/skia/resources/baby_tux.webpbin0 -> 17128 bytes
-rw-r--r--chromium/third_party/skia/resources/box.gifbin0 -> 472 bytes
-rw-r--r--chromium/third_party/skia/resources/half-transparent-white-pixel.pngbin0 -> 178 bytes
-rw-r--r--chromium/third_party/skia/resources/half-transparent-white-pixel.webpbin0 -> 38 bytes
-rw-r--r--chromium/third_party/skia/resources/mandrill_128.ktxbin0 -> 8260 bytes
-rw-r--r--chromium/third_party/skia/resources/mandrill_128.pkmbin0 -> 8208 bytes
-rw-r--r--chromium/third_party/skia/resources/mandrill_128.pngbin0 -> 38054 bytes
-rw-r--r--chromium/third_party/skia/resources/mandrill_16.pngbin0 -> 952 bytes
-rw-r--r--chromium/third_party/skia/resources/mandrill_256.pngbin0 -> 153549 bytes
-rw-r--r--chromium/third_party/skia/resources/mandrill_32.pngbin0 -> 2675 bytes
-rw-r--r--chromium/third_party/skia/resources/mandrill_512.pkmbin0 -> 131088 bytes
-rw-r--r--chromium/third_party/skia/resources/mandrill_512.pngbin0 -> 625834 bytes
-rw-r--r--chromium/third_party/skia/resources/mandrill_64.pngbin0 -> 9601 bytes
-rw-r--r--chromium/third_party/skia/resources/plane.pngbin0 -> 5718 bytes
-rw-r--r--chromium/third_party/skia/resources/randPixels.bmpbin0 -> 246 bytes
-rw-r--r--chromium/third_party/skia/resources/randPixels.gifbin0 -> 277 bytes
-rw-r--r--chromium/third_party/skia/resources/randPixels.jpgbin0 -> 329 bytes
-rw-r--r--chromium/third_party/skia/resources/randPixels.pngbin0 -> 268 bytes
-rw-r--r--chromium/third_party/skia/resources/randPixels.webpbin0 -> 308 bytes
-rw-r--r--chromium/third_party/skia/resources/test.ttcbin0 -> 6076 bytes
-rw-r--r--chromium/third_party/skia/resources/yellow_rose.pngbin0 -> 121363 bytes
-rw-r--r--chromium/third_party/skia/resources/yellow_rose.webpbin0 -> 23404 bytes
-rw-r--r--chromium/third_party/skia/samplecode/ClockFaceView.cpp253
-rw-r--r--chromium/third_party/skia/samplecode/GMSampleView.h78
-rw-r--r--chromium/third_party/skia/samplecode/OverView.cpp113
-rw-r--r--chromium/third_party/skia/samplecode/OverView.h18
-rw-r--r--chromium/third_party/skia/samplecode/Sample2PtRadial.cpp52
-rw-r--r--chromium/third_party/skia/samplecode/SampleAAClip.cpp125
-rw-r--r--chromium/third_party/skia/samplecode/SampleAARectModes.cpp137
-rw-r--r--chromium/third_party/skia/samplecode/SampleAARects.cpp196
-rw-r--r--chromium/third_party/skia/samplecode/SampleAll.cpp602
-rw-r--r--chromium/third_party/skia/samplecode/SampleAnimBlur.cpp70
-rw-r--r--chromium/third_party/skia/samplecode/SampleAnimatedGradient.cpp97
-rw-r--r--chromium/third_party/skia/samplecode/SampleAnimator.cpp174
-rw-r--r--chromium/third_party/skia/samplecode/SampleApp.cpp2426
-rw-r--r--chromium/third_party/skia/samplecode/SampleApp.h244
-rw-r--r--chromium/third_party/skia/samplecode/SampleArc.cpp191
-rw-r--r--chromium/third_party/skia/samplecode/SampleAvoid.cpp105
-rw-r--r--chromium/third_party/skia/samplecode/SampleBigBlur.cpp50
-rw-r--r--chromium/third_party/skia/samplecode/SampleBigGradient.cpp49
-rw-r--r--chromium/third_party/skia/samplecode/SampleBitmapRect.cpp245
-rw-r--r--chromium/third_party/skia/samplecode/SampleBlur.cpp142
-rw-r--r--chromium/third_party/skia/samplecode/SampleBox.cpp55
-rw-r--r--chromium/third_party/skia/samplecode/SampleCamera.cpp105
-rw-r--r--chromium/third_party/skia/samplecode/SampleChart.cpp184
-rw-r--r--chromium/third_party/skia/samplecode/SampleCircle.cpp127
-rw-r--r--chromium/third_party/skia/samplecode/SampleClamp.cpp67
-rw-r--r--chromium/third_party/skia/samplecode/SampleClip.cpp164
-rw-r--r--chromium/third_party/skia/samplecode/SampleClock.cpp229
-rw-r--r--chromium/third_party/skia/samplecode/SampleCode.h150
-rw-r--r--chromium/third_party/skia/samplecode/SampleColorFilter.cpp218
-rw-r--r--chromium/third_party/skia/samplecode/SampleComplexClip.cpp153
-rw-r--r--chromium/third_party/skia/samplecode/SampleConcavePaths.cpp153
-rw-r--r--chromium/third_party/skia/samplecode/SampleCull.cpp197
-rw-r--r--chromium/third_party/skia/samplecode/SampleDash.cpp92
-rw-r--r--chromium/third_party/skia/samplecode/SampleDegenerateTwoPtRadials.cpp91
-rw-r--r--chromium/third_party/skia/samplecode/SampleDither.cpp178
-rw-r--r--chromium/third_party/skia/samplecode/SampleDitherBitmap.cpp151
-rw-r--r--chromium/third_party/skia/samplecode/SampleDraw.cpp379
-rw-r--r--chromium/third_party/skia/samplecode/SampleEffects.cpp123
-rw-r--r--chromium/third_party/skia/samplecode/SampleEmboss.cpp72
-rw-r--r--chromium/third_party/skia/samplecode/SampleEmptyPath.cpp130
-rw-r--r--chromium/third_party/skia/samplecode/SampleEncode.cpp236
-rw-r--r--chromium/third_party/skia/samplecode/SampleFatBits.cpp526
-rw-r--r--chromium/third_party/skia/samplecode/SampleFillType.cpp96
-rw-r--r--chromium/third_party/skia/samplecode/SampleFilter.cpp122
-rw-r--r--chromium/third_party/skia/samplecode/SampleFilter2.cpp120
-rw-r--r--chromium/third_party/skia/samplecode/SampleFilterFuzz.cpp488
-rw-r--r--chromium/third_party/skia/samplecode/SampleFontCache.cpp142
-rw-r--r--chromium/third_party/skia/samplecode/SampleFontScalerTest.cpp140
-rw-r--r--chromium/third_party/skia/samplecode/SampleFuzz.cpp396
-rw-r--r--chromium/third_party/skia/samplecode/SampleGradients.cpp177
-rw-r--r--chromium/third_party/skia/samplecode/SampleHairCurves.cpp133
-rw-r--r--chromium/third_party/skia/samplecode/SampleHairModes.cpp135
-rw-r--r--chromium/third_party/skia/samplecode/SampleHairline.cpp273
-rw-r--r--chromium/third_party/skia/samplecode/SampleLCD.cpp67
-rw-r--r--chromium/third_party/skia/samplecode/SampleLayerMask.cpp73
-rw-r--r--chromium/third_party/skia/samplecode/SampleLayers.cpp240
-rw-r--r--chromium/third_party/skia/samplecode/SampleLines.cpp113
-rw-r--r--chromium/third_party/skia/samplecode/SampleLua.cpp154
-rw-r--r--chromium/third_party/skia/samplecode/SampleManyRects.cpp79
-rw-r--r--chromium/third_party/skia/samplecode/SampleMeasure.cpp121
-rw-r--r--chromium/third_party/skia/samplecode/SampleMipMap.cpp101
-rw-r--r--chromium/third_party/skia/samplecode/SampleMovie.cpp64
-rw-r--r--chromium/third_party/skia/samplecode/SampleOvalTest.cpp115
-rw-r--r--chromium/third_party/skia/samplecode/SamplePatch.cpp351
-rw-r--r--chromium/third_party/skia/samplecode/SamplePath.cpp217
-rw-r--r--chromium/third_party/skia/samplecode/SamplePathClip.cpp90
-rw-r--r--chromium/third_party/skia/samplecode/SamplePathEffects.cpp192
-rw-r--r--chromium/third_party/skia/samplecode/SamplePathFill.cpp146
-rw-r--r--chromium/third_party/skia/samplecode/SamplePathUtils.cpp108
-rw-r--r--chromium/third_party/skia/samplecode/SamplePdfFileViewer.cpp105
-rw-r--r--chromium/third_party/skia/samplecode/SamplePictFile.cpp204
-rw-r--r--chromium/third_party/skia/samplecode/SamplePicture.cpp202
-rw-r--r--chromium/third_party/skia/samplecode/SamplePoints.cpp82
-rw-r--r--chromium/third_party/skia/samplecode/SamplePolyToPoly.cpp168
-rw-r--r--chromium/third_party/skia/samplecode/SampleRectanizer.cpp198
-rw-r--r--chromium/third_party/skia/samplecode/SampleRegion.cpp418
-rw-r--r--chromium/third_party/skia/samplecode/SampleRepeatTile.cpp91
-rw-r--r--chromium/third_party/skia/samplecode/SampleRotateCircles.cpp360
-rw-r--r--chromium/third_party/skia/samplecode/SampleShaderText.cpp197
-rw-r--r--chromium/third_party/skia/samplecode/SampleShaders.cpp141
-rw-r--r--chromium/third_party/skia/samplecode/SampleSkLayer.cpp245
-rw-r--r--chromium/third_party/skia/samplecode/SampleSlides.cpp727
-rw-r--r--chromium/third_party/skia/samplecode/SampleSpiral.cpp63
-rw-r--r--chromium/third_party/skia/samplecode/SampleStringArt.cpp72
-rw-r--r--chromium/third_party/skia/samplecode/SampleStrokePath.cpp224
-rw-r--r--chromium/third_party/skia/samplecode/SampleStrokeRect.cpp75
-rw-r--r--chromium/third_party/skia/samplecode/SampleSubpixelTranslate.cpp126
-rw-r--r--chromium/third_party/skia/samplecode/SampleText.cpp278
-rw-r--r--chromium/third_party/skia/samplecode/SampleTextAlpha.cpp123
-rw-r--r--chromium/third_party/skia/samplecode/SampleTextBox.cpp115
-rw-r--r--chromium/third_party/skia/samplecode/SampleTextOnPath.cpp175
-rw-r--r--chromium/third_party/skia/samplecode/SampleTextureDomain.cpp110
-rw-r--r--chromium/third_party/skia/samplecode/SampleTiling.cpp171
-rw-r--r--chromium/third_party/skia/samplecode/SampleTinyBitmap.cpp79
-rw-r--r--chromium/third_party/skia/samplecode/SampleUnpremul.cpp206
-rw-r--r--chromium/third_party/skia/samplecode/SampleVertices.cpp232
-rw-r--r--chromium/third_party/skia/samplecode/SampleWarp.cpp473
-rw-r--r--chromium/third_party/skia/samplecode/SampleWritePixels.cpp68
-rw-r--r--chromium/third_party/skia/samplecode/SampleXfermodesBlur.cpp210
-rw-r--r--chromium/third_party/skia/samplecode/TransitionView.cpp204
-rw-r--r--chromium/third_party/skia/samplecode/TransitionView.h17
-rw-r--r--chromium/third_party/skia/samplecode/vertexdump.cpp95
-rw-r--r--chromium/third_party/skia/skia.gyp22
-rw-r--r--chromium/third_party/skia/src/animator/SkAnimateBase.cpp6
-rw-r--r--chromium/third_party/skia/src/animator/SkAnimateSet.cpp2
-rw-r--r--chromium/third_party/skia/src/animator/SkBoundable.cpp4
-rw-r--r--chromium/third_party/skia/src/animator/SkDisplayList.h6
-rw-r--r--chromium/third_party/skia/src/animator/SkDisplayMath.cpp17
-rw-r--r--chromium/third_party/skia/src/animator/SkDisplayType.cpp2
-rw-r--r--chromium/third_party/skia/src/animator/SkDrawBitmap.cpp5
-rw-r--r--chromium/third_party/skia/src/animator/SkDrawBlur.cpp7
-rw-r--r--chromium/third_party/skia/src/animator/SkDrawBlur.h6
-rw-r--r--chromium/third_party/skia/src/animator/SkDrawColor.cpp10
-rw-r--r--chromium/third_party/skia/src/animator/SkDrawColor.h4
-rw-r--r--chromium/third_party/skia/src/animator/SkDrawDash.cpp2
-rw-r--r--chromium/third_party/skia/src/animator/SkDrawDash.h4
-rw-r--r--chromium/third_party/skia/src/animator/SkDrawDiscrete.cpp2
-rw-r--r--chromium/third_party/skia/src/animator/SkDrawDiscrete.h4
-rw-r--r--chromium/third_party/skia/src/animator/SkDrawExtraPathEffect.cpp12
-rw-r--r--chromium/third_party/skia/src/animator/SkDrawGradient.cpp64
-rw-r--r--chromium/third_party/skia/src/animator/SkDrawGradient.h3
-rw-r--r--chromium/third_party/skia/src/animator/SkDrawPaint.cpp4
-rw-r--r--chromium/third_party/skia/src/animator/SkDrawSaveLayer.cpp4
-rw-r--r--chromium/third_party/skia/src/animator/SkDrawShader.cpp9
-rw-r--r--chromium/third_party/skia/src/animator/SkDrawShader.h4
-rw-r--r--chromium/third_party/skia/src/animator/SkDrawTransparentShader.h4
-rw-r--r--chromium/third_party/skia/src/animator/SkMemberInfo.cpp2
-rw-r--r--chromium/third_party/skia/src/animator/SkOperandIterpolator.cpp2
-rw-r--r--chromium/third_party/skia/src/animator/SkPaintPart.cpp99
-rw-r--r--chromium/third_party/skia/src/animator/SkPaintPart.h73
-rw-r--r--chromium/third_party/skia/src/animator/SkPaintParts.cpp101
-rw-r--r--chromium/third_party/skia/src/animator/SkPaintParts.h75
-rw-r--r--chromium/third_party/skia/src/animator/SkScript.cpp13
-rw-r--r--chromium/third_party/skia/src/animator/SkScript2.h5
-rw-r--r--chromium/third_party/skia/src/animator/SkScriptRuntime.cpp2
-rw-r--r--chromium/third_party/skia/src/animator/SkScriptTokenizer.cpp13
-rw-r--r--chromium/third_party/skia/src/animator/SkSnapshot.cpp2
-rw-r--r--chromium/third_party/skia/src/animator/SkTime.cpp34
-rw-r--r--chromium/third_party/skia/src/core/ARGB32_Clamp_Bilinear_BitmapShader.h177
-rw-r--r--chromium/third_party/skia/src/core/Sk64.cpp345
-rw-r--r--chromium/third_party/skia/src/core/SkAAClip.cpp4
-rw-r--r--chromium/third_party/skia/src/core/SkAnnotation.cpp9
-rw-r--r--chromium/third_party/skia/src/core/SkBBHFactory.cpp44
-rw-r--r--chromium/third_party/skia/src/core/SkBBoxHierarchy.h12
-rw-r--r--chromium/third_party/skia/src/core/SkBBoxHierarchyRecord.cpp111
-rw-r--r--chromium/third_party/skia/src/core/SkBBoxHierarchyRecord.h40
-rw-r--r--chromium/third_party/skia/src/core/SkBBoxRecord.cpp54
-rw-r--r--chromium/third_party/skia/src/core/SkBBoxRecord.h28
-rw-r--r--chromium/third_party/skia/src/core/SkBitmap.cpp1265
-rw-r--r--chromium/third_party/skia/src/core/SkBitmapDevice.cpp319
-rw-r--r--chromium/third_party/skia/src/core/SkBitmapFilter.cpp8
-rw-r--r--chromium/third_party/skia/src/core/SkBitmapHeap.cpp17
-rw-r--r--chromium/third_party/skia/src/core/SkBitmapHeap.h6
-rw-r--r--chromium/third_party/skia/src/core/SkBitmapProcShader.cpp256
-rw-r--r--chromium/third_party/skia/src/core/SkBitmapProcShader.h62
-rw-r--r--chromium/third_party/skia/src/core/SkBitmapProcState.cpp51
-rw-r--r--chromium/third_party/skia/src/core/SkBitmapProcState.h6
-rw-r--r--chromium/third_party/skia/src/core/SkBitmapProcState_filter.h8
-rw-r--r--chromium/third_party/skia/src/core/SkBitmapProcState_matrix.h138
-rw-r--r--chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp117
-rw-r--r--chromium/third_party/skia/src/core/SkBitmapProcState_matrix_template.h124
-rw-r--r--chromium/third_party/skia/src/core/SkBitmapProcState_procs.h30
-rw-r--r--chromium/third_party/skia/src/core/SkBitmapScaler.cpp70
-rw-r--r--chromium/third_party/skia/src/core/SkBitmapScaler.h20
-rw-r--r--chromium/third_party/skia/src/core/SkBitmapShader16BilerpTemplate.h245
-rw-r--r--chromium/third_party/skia/src/core/SkBitmapShaderTemplate.h306
-rw-r--r--chromium/third_party/skia/src/core/SkBitmap_scroll.cpp22
-rw-r--r--chromium/third_party/skia/src/core/SkBlitMask.h8
-rw-r--r--chromium/third_party/skia/src/core/SkBlitMask_D32.cpp28
-rw-r--r--chromium/third_party/skia/src/core/SkBlitRow_D16.cpp6
-rw-r--r--chromium/third_party/skia/src/core/SkBlitRow_D32.cpp2
-rw-r--r--chromium/third_party/skia/src/core/SkBlitter.cpp395
-rw-r--r--chromium/third_party/skia/src/core/SkBlitter.h21
-rw-r--r--chromium/third_party/skia/src/core/SkBlitter_A8.cpp29
-rw-r--r--chromium/third_party/skia/src/core/SkBlitter_ARGB32.cpp78
-rw-r--r--chromium/third_party/skia/src/core/SkBlitter_RGB16.cpp134
-rw-r--r--chromium/third_party/skia/src/core/SkBlitter_Sprite.cpp23
-rw-r--r--chromium/third_party/skia/src/core/SkCanvas.cpp1137
-rw-r--r--chromium/third_party/skia/src/core/SkClipStack.cpp383
-rw-r--r--chromium/third_party/skia/src/core/SkColorFilter.cpp3
-rw-r--r--chromium/third_party/skia/src/core/SkColorTable.cpp18
-rw-r--r--chromium/third_party/skia/src/core/SkComposeShader.cpp121
-rw-r--r--chromium/third_party/skia/src/core/SkConfig8888.cpp333
-rw-r--r--chromium/third_party/skia/src/core/SkConfig8888.h81
-rw-r--r--chromium/third_party/skia/src/core/SkConvolver.cpp10
-rw-r--r--chromium/third_party/skia/src/core/SkConvolver.h2
-rw-r--r--chromium/third_party/skia/src/core/SkCordic.cpp289
-rw-r--r--chromium/third_party/skia/src/core/SkCordic.h28
-rw-r--r--chromium/third_party/skia/src/core/SkCoreBlitters.h37
-rw-r--r--chromium/third_party/skia/src/core/SkCubicClipper.cpp8
-rw-r--r--chromium/third_party/skia/src/core/SkData.cpp17
-rw-r--r--chromium/third_party/skia/src/core/SkDebug.cpp15
-rw-r--r--chromium/third_party/skia/src/core/SkDescriptor.h4
-rw-r--r--chromium/third_party/skia/src/core/SkDevice.cpp140
-rw-r--r--chromium/third_party/skia/src/core/SkDeviceImageFilterProxy.h11
-rwxr-xr-xchromium/third_party/skia/src/core/SkDistanceFieldGen.cpp521
-rw-r--r--chromium/third_party/skia/src/core/SkDistanceFieldGen.h61
-rw-r--r--chromium/third_party/skia/src/core/SkDraw.cpp940
-rw-r--r--chromium/third_party/skia/src/core/SkDrawLooper.cpp21
-rw-r--r--chromium/third_party/skia/src/core/SkDrawProcs.h69
-rw-r--r--chromium/third_party/skia/src/core/SkEdge.cpp30
-rw-r--r--chromium/third_party/skia/src/core/SkEdge.h8
-rw-r--r--chromium/third_party/skia/src/core/SkEdgeBuilder.cpp2
-rw-r--r--chromium/third_party/skia/src/core/SkError.cpp2
-rw-r--r--chromium/third_party/skia/src/core/SkFDot6.h9
-rw-r--r--chromium/third_party/skia/src/core/SkFP.h79
-rw-r--r--chromium/third_party/skia/src/core/SkFilterShader.cpp71
-rw-r--r--chromium/third_party/skia/src/core/SkFilterShader.h34
-rw-r--r--chromium/third_party/skia/src/core/SkFlate.cpp4
-rw-r--r--chromium/third_party/skia/src/core/SkFlate.h (renamed from chromium/third_party/skia/include/core/SkFlate.h)0
-rw-r--r--chromium/third_party/skia/src/core/SkFlattenable.cpp2
-rw-r--r--chromium/third_party/skia/src/core/SkFlattenableBuffers.cpp116
-rw-r--r--chromium/third_party/skia/src/core/SkFlattenableSerialization.cpp7
-rw-r--r--chromium/third_party/skia/src/core/SkFloat.cpp14
-rw-r--r--chromium/third_party/skia/src/core/SkFloat.h2
-rw-r--r--chromium/third_party/skia/src/core/SkFont.cpp156
-rw-r--r--chromium/third_party/skia/src/core/SkFontDescriptor.cpp2
-rw-r--r--chromium/third_party/skia/src/core/SkFontHost.cpp68
-rw-r--r--chromium/third_party/skia/src/core/SkGeometry.cpp644
-rw-r--r--chromium/third_party/skia/src/core/SkGeometry.h316
-rw-r--r--chromium/third_party/skia/src/core/SkGlyph.h2
-rwxr-xr-x[-rw-r--r--]chromium/third_party/skia/src/core/SkGlyphCache.cpp68
-rw-r--r--chromium/third_party/skia/src/core/SkGlyphCache.h75
-rw-r--r--chromium/third_party/skia/src/core/SkGraphics.cpp8
-rw-r--r--chromium/third_party/skia/src/core/SkImageFilter.cpp310
-rw-r--r--chromium/third_party/skia/src/core/SkImageFilterUtils.cpp59
-rw-r--r--chromium/third_party/skia/src/core/SkImageGenerator.cpp72
-rw-r--r--chromium/third_party/skia/src/core/SkImageGeneratorPriv.h39
-rw-r--r--chromium/third_party/skia/src/core/SkImageInfo.cpp7
-rw-r--r--chromium/third_party/skia/src/core/SkLazyFnPtr.h67
-rw-r--r--chromium/third_party/skia/src/core/SkLazyPtr.h146
-rw-r--r--chromium/third_party/skia/src/core/SkLineClipper.cpp16
-rw-r--r--chromium/third_party/skia/src/core/SkLineClipper.h (renamed from chromium/third_party/skia/include/core/SkLineClipper.h)0
-rw-r--r--chromium/third_party/skia/src/core/SkLocalMatrixShader.cpp65
-rw-r--r--chromium/third_party/skia/src/core/SkLocalMatrixShader.h78
-rw-r--r--chromium/third_party/skia/src/core/SkMallocPixelRef.cpp141
-rw-r--r--chromium/third_party/skia/src/core/SkMask.cpp11
-rw-r--r--chromium/third_party/skia/src/core/SkMaskFilter.cpp91
-rw-r--r--chromium/third_party/skia/src/core/SkMaskGamma.h16
-rw-r--r--chromium/third_party/skia/src/core/SkMath.cpp238
-rw-r--r--chromium/third_party/skia/src/core/SkMathPriv.h10
-rw-r--r--chromium/third_party/skia/src/core/SkMatrix.cpp1181
-rw-r--r--chromium/third_party/skia/src/core/SkMatrixClipStateMgr.cpp419
-rw-r--r--chromium/third_party/skia/src/core/SkMatrixClipStateMgr.h414
-rw-r--r--chromium/third_party/skia/src/core/SkMessageBus.h28
-rw-r--r--chromium/third_party/skia/src/core/SkMetaData.cpp4
-rw-r--r--chromium/third_party/skia/src/core/SkMipMap.cpp35
-rw-r--r--chromium/third_party/skia/src/core/SkOnce.h155
-rw-r--r--chromium/third_party/skia/src/core/SkOrderedReadBuffer.cpp317
-rw-r--r--chromium/third_party/skia/src/core/SkOrderedReadBuffer.h139
-rw-r--r--chromium/third_party/skia/src/core/SkOrderedWriteBuffer.cpp319
-rw-r--r--chromium/third_party/skia/src/core/SkOrderedWriteBuffer.h117
-rw-r--r--chromium/third_party/skia/src/core/SkPackBits.cpp24
-rw-r--r--chromium/third_party/skia/src/core/SkPaint.cpp681
-rw-r--r--chromium/third_party/skia/src/core/SkPaintOptionsAndroid.cpp7
-rw-r--r--chromium/third_party/skia/src/core/SkPaintPriv.cpp19
-rw-r--r--chromium/third_party/skia/src/core/SkPaintPriv.h7
-rw-r--r--chromium/third_party/skia/src/core/SkPath.cpp114
-rw-r--r--chromium/third_party/skia/src/core/SkPathEffect.cpp11
-rw-r--r--chromium/third_party/skia/src/core/SkPathHeap.cpp40
-rw-r--r--chromium/third_party/skia/src/core/SkPathHeap.h34
-rw-r--r--chromium/third_party/skia/src/core/SkPathMeasure.cpp5
-rw-r--r--chromium/third_party/skia/src/core/SkPathRef.cpp40
-rw-r--r--chromium/third_party/skia/src/core/SkPicture.cpp352
-rw-r--r--chromium/third_party/skia/src/core/SkPictureFlat.cpp53
-rw-r--r--chromium/third_party/skia/src/core/SkPictureFlat.h312
-rw-r--r--chromium/third_party/skia/src/core/SkPicturePlayback.cpp892
-rw-r--r--chromium/third_party/skia/src/core/SkPicturePlayback.h270
-rw-r--r--chromium/third_party/skia/src/core/SkPictureRecord.cpp936
-rw-r--r--chromium/third_party/skia/src/core/SkPictureRecord.h155
-rw-r--r--chromium/third_party/skia/src/core/SkPictureRecorder.cpp106
-rw-r--r--chromium/third_party/skia/src/core/SkPictureShader.cpp207
-rw-r--r--chromium/third_party/skia/src/core/SkPictureShader.h79
-rw-r--r--chromium/third_party/skia/src/core/SkPictureStateTree.cpp100
-rw-r--r--chromium/third_party/skia/src/core/SkPictureStateTree.h26
-rw-r--r--chromium/third_party/skia/src/core/SkPixelRef.cpp125
-rw-r--r--chromium/third_party/skia/src/core/SkQuadTree.cpp219
-rw-r--r--chromium/third_party/skia/src/core/SkQuadTree.h113
-rw-r--r--chromium/third_party/skia/src/core/SkRRect.cpp97
-rw-r--r--chromium/third_party/skia/src/core/SkRTree.cpp4
-rw-r--r--chromium/third_party/skia/src/core/SkRTree.h18
-rw-r--r--chromium/third_party/skia/src/core/SkReadBuffer.cpp366
-rw-r--r--chromium/third_party/skia/src/core/SkRecord.h234
-rw-r--r--chromium/third_party/skia/src/core/SkRecordDraw.cpp71
-rw-r--r--chromium/third_party/skia/src/core/SkRecordDraw.h55
-rw-r--r--chromium/third_party/skia/src/core/SkRecordOpts.cpp303
-rw-r--r--chromium/third_party/skia/src/core/SkRecordOpts.h35
-rw-r--r--chromium/third_party/skia/src/core/SkRecordPattern.h183
-rw-r--r--chromium/third_party/skia/src/core/SkRecorder.cpp263
-rw-r--r--chromium/third_party/skia/src/core/SkRecorder.h112
-rw-r--r--chromium/third_party/skia/src/core/SkRecording.cpp44
-rw-r--r--chromium/third_party/skia/src/core/SkRecords.h291
-rw-r--r--chromium/third_party/skia/src/core/SkRect.cpp67
-rw-r--r--chromium/third_party/skia/src/core/SkRegion.cpp10
-rw-r--r--chromium/third_party/skia/src/core/SkRegionPriv.h4
-rw-r--r--chromium/third_party/skia/src/core/SkRegion_path.cpp20
-rw-r--r--chromium/third_party/skia/src/core/SkRegion_rects.cpp290
-rw-r--r--chromium/third_party/skia/src/core/SkScaledImageCache.cpp106
-rw-r--r--chromium/third_party/skia/src/core/SkScalerContext.cpp34
-rw-r--r--chromium/third_party/skia/src/core/SkScalerContext.h17
-rw-r--r--chromium/third_party/skia/src/core/SkScan.cpp8
-rw-r--r--chromium/third_party/skia/src/core/SkScan.h38
-rw-r--r--chromium/third_party/skia/src/core/SkScan_AntiPath.cpp7
-rw-r--r--chromium/third_party/skia/src/core/SkScan_Antihair.cpp26
-rw-r--r--chromium/third_party/skia/src/core/SkScan_Hairline.cpp6
-rw-r--r--chromium/third_party/skia/src/core/SkScan_Path.cpp6
-rw-r--r--chromium/third_party/skia/src/core/SkShader.cpp279
-rw-r--r--chromium/third_party/skia/src/core/SkSmallAllocator.h176
-rw-r--r--chromium/third_party/skia/src/core/SkSpriteBlitter.h9
-rw-r--r--chromium/third_party/skia/src/core/SkSpriteBlitter_ARGB32.cpp30
-rw-r--r--chromium/third_party/skia/src/core/SkSpriteBlitter_RGB16.cpp48
-rw-r--r--chromium/third_party/skia/src/core/SkStream.cpp45
-rw-r--r--chromium/third_party/skia/src/core/SkString.cpp2
-rw-r--r--chromium/third_party/skia/src/core/SkStringUtils.h (renamed from chromium/third_party/skia/include/core/SkStringUtils.h)0
-rw-r--r--chromium/third_party/skia/src/core/SkStrokeRec.cpp10
-rw-r--r--chromium/third_party/skia/src/core/SkStrokerPriv.cpp6
-rw-r--r--chromium/third_party/skia/src/core/SkTDynamicHash.h159
-rw-r--r--chromium/third_party/skia/src/core/SkTInternalSList.h132
-rw-r--r--chromium/third_party/skia/src/core/SkTLList.h24
-rw-r--r--chromium/third_party/skia/src/core/SkTObjectPool.h109
-rw-r--r--[-rwxr-xr-x]chromium/third_party/skia/src/core/SkTRefArray.h0
-rw-r--r--chromium/third_party/skia/src/core/SkTemplatesPriv.h76
-rw-r--r--chromium/third_party/skia/src/core/SkTextMapStateProc.h76
-rw-r--r--chromium/third_party/skia/src/core/SkThreadPriv.h23
-rw-r--r--chromium/third_party/skia/src/core/SkTileGrid.cpp9
-rw-r--r--chromium/third_party/skia/src/core/SkTileGrid.h12
-rw-r--r--chromium/third_party/skia/src/core/SkTileGridPicture.cpp28
-rw-r--r--chromium/third_party/skia/src/core/SkTraceEvent.h1245
-rw-r--r--chromium/third_party/skia/src/core/SkTypeface.cpp71
-rw-r--r--chromium/third_party/skia/src/core/SkUnPreMultiply.cpp9
-rw-r--r--chromium/third_party/skia/src/core/SkUtils.cpp47
-rw-r--r--chromium/third_party/skia/src/core/SkUtilsArm.cpp10
-rw-r--r--chromium/third_party/skia/src/core/SkUtilsArm.h4
-rw-r--r--chromium/third_party/skia/src/core/SkValidatingReadBuffer.cpp35
-rw-r--r--chromium/third_party/skia/src/core/SkValidatingReadBuffer.h14
-rw-r--r--chromium/third_party/skia/src/core/SkValidationUtils.h6
-rw-r--r--chromium/third_party/skia/src/core/SkVertState.cpp106
-rw-r--r--chromium/third_party/skia/src/core/SkVertState.h58
-rw-r--r--chromium/third_party/skia/src/core/SkWriteBuffer.cpp321
-rw-r--r--chromium/third_party/skia/src/core/SkWriter32.cpp295
-rw-r--r--chromium/third_party/skia/src/core/SkXfermode.cpp370
-rw-r--r--chromium/third_party/skia/src/core/SkXfermode_proccoeff.h47
-rw-r--r--chromium/third_party/skia/src/device/xps/SkXPSDevice.cpp35
-rw-r--r--chromium/third_party/skia/src/effects/Sk1DPathEffect.cpp7
-rw-r--r--chromium/third_party/skia/src/effects/Sk2DPathEffect.cpp15
-rw-r--r--chromium/third_party/skia/src/effects/SkAlphaThresholdFilter.cpp366
-rw-r--r--chromium/third_party/skia/src/effects/SkArithmeticMode.cpp104
-rw-r--r--chromium/third_party/skia/src/effects/SkAvoidXfermode.cpp9
-rw-r--r--chromium/third_party/skia/src/effects/SkBicubicImageFilter.cpp35
-rw-r--r--chromium/third_party/skia/src/effects/SkBitmapAlphaThresholdShader.cpp277
-rw-r--r--chromium/third_party/skia/src/effects/SkBitmapSource.cpp50
-rw-r--r--chromium/third_party/skia/src/effects/SkBlurDrawLooper.cpp125
-rw-r--r--chromium/third_party/skia/src/effects/SkBlurImageFilter.cpp116
-rw-r--r--chromium/third_party/skia/src/effects/SkBlurMask.cpp169
-rw-r--r--chromium/third_party/skia/src/effects/SkBlurMask.h90
-rw-r--r--chromium/third_party/skia/src/effects/SkBlurMaskFilter.cpp772
-rwxr-xr-xchromium/third_party/skia/src/effects/SkColorFilterImageFilter.cpp27
-rw-r--r--chromium/third_party/skia/src/effects/SkColorFilters.cpp335
-rw-r--r--chromium/third_party/skia/src/effects/SkColorMatrix.cpp43
-rw-r--r--chromium/third_party/skia/src/effects/SkColorMatrixFilter.cpp48
-rw-r--r--chromium/third_party/skia/src/effects/SkComposeImageFilter.cpp17
-rw-r--r--chromium/third_party/skia/src/effects/SkCornerPathEffect.cpp7
-rw-r--r--chromium/third_party/skia/src/effects/SkDashPathEffect.cpp385
-rw-r--r--chromium/third_party/skia/src/effects/SkDiscretePathEffect.cpp23
-rw-r--r--chromium/third_party/skia/src/effects/SkDisplacementMapEffect.cpp243
-rw-r--r--chromium/third_party/skia/src/effects/SkDropShadowImageFilter.cpp77
-rw-r--r--chromium/third_party/skia/src/effects/SkEmbossMaskFilter.cpp34
-rw-r--r--chromium/third_party/skia/src/effects/SkGpuBlurUtils.cpp11
-rw-r--r--chromium/third_party/skia/src/effects/SkKernel33MaskFilter.cpp142
-rw-r--r--chromium/third_party/skia/src/effects/SkLayerDrawLooper.cpp245
-rw-r--r--chromium/third_party/skia/src/effects/SkLayerRasterizer.cpp108
-rw-r--r--chromium/third_party/skia/src/effects/SkLerpXfermode.cpp9
-rw-r--r--chromium/third_party/skia/src/effects/SkLightingImageFilter.cpp160
-rw-r--r--chromium/third_party/skia/src/effects/SkLumaColorFilter.cpp6
-rw-r--r--chromium/third_party/skia/src/effects/SkMagnifierImageFilter.cpp21
-rw-r--r--chromium/third_party/skia/src/effects/SkMatrixConvolutionImageFilter.cpp125
-rw-r--r--chromium/third_party/skia/src/effects/SkMatrixImageFilter.cpp126
-rwxr-xr-xchromium/third_party/skia/src/effects/SkMergeImageFilter.cpp55
-rw-r--r--chromium/third_party/skia/src/effects/SkMorphologyImageFilter.cpp284
-rw-r--r--chromium/third_party/skia/src/effects/SkOffsetImageFilter.cpp59
-rw-r--r--chromium/third_party/skia/src/effects/SkPerlinNoiseShader.cpp792
-rw-r--r--chromium/third_party/skia/src/effects/SkPictureImageFilter.cpp60
-rw-r--r--chromium/third_party/skia/src/effects/SkPixelXorXfermode.cpp9
-rw-r--r--chromium/third_party/skia/src/effects/SkRectShaderImageFilter.cpp28
-rw-r--r--chromium/third_party/skia/src/effects/SkStippleMaskFilter.cpp2
-rw-r--r--chromium/third_party/skia/src/effects/SkTableColorFilter.cpp19
-rw-r--r--chromium/third_party/skia/src/effects/SkTableMaskFilter.cpp11
-rwxr-xr-xchromium/third_party/skia/src/effects/SkTestImageFilters.cpp11
-rw-r--r--chromium/third_party/skia/src/effects/SkTileImageFilter.cpp50
-rw-r--r--chromium/third_party/skia/src/effects/SkTransparentShader.cpp59
-rw-r--r--chromium/third_party/skia/src/effects/SkXfermodeImageFilter.cpp96
-rw-r--r--chromium/third_party/skia/src/effects/gradients/SkClampRange.cpp5
-rw-r--r--chromium/third_party/skia/src/effects/gradients/SkClampRange.h1
-rw-r--r--chromium/third_party/skia/src/effects/gradients/SkGradientShader.cpp492
-rw-r--r--chromium/third_party/skia/src/effects/gradients/SkGradientShaderPriv.h151
-rw-r--r--chromium/third_party/skia/src/effects/gradients/SkLinearGradient.cpp100
-rw-r--r--chromium/third_party/skia/src/effects/gradients/SkLinearGradient.h30
-rw-r--r--chromium/third_party/skia/src/effects/gradients/SkRadialGradient.cpp89
-rw-r--r--chromium/third_party/skia/src/effects/gradients/SkRadialGradient.h30
-rw-r--r--chromium/third_party/skia/src/effects/gradients/SkSweepGradient.cpp295
-rw-r--r--chromium/third_party/skia/src/effects/gradients/SkSweepGradient.h31
-rw-r--r--chromium/third_party/skia/src/effects/gradients/SkTwoPointConicalGradient.cpp539
-rw-r--r--chromium/third_party/skia/src/effects/gradients/SkTwoPointConicalGradient.h62
-rw-r--r--chromium/third_party/skia/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp1330
-rw-r--r--chromium/third_party/skia/src/effects/gradients/SkTwoPointConicalGradient_gpu.h25
-rw-r--r--chromium/third_party/skia/src/effects/gradients/SkTwoPointRadialGradient.cpp125
-rw-r--r--chromium/third_party/skia/src/effects/gradients/SkTwoPointRadialGradient.h31
-rw-r--r--chromium/third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp71
-rw-r--r--chromium/third_party/skia/src/fonts/SkFontMgr_indirect.cpp297
-rw-r--r--chromium/third_party/skia/src/fonts/SkGScalerContext.cpp5
-rw-r--r--chromium/third_party/skia/src/fonts/SkRemotableFontMgr.cpp26
-rw-r--r--chromium/third_party/skia/src/gpu/FlingState.cpp125
-rw-r--r--chromium/third_party/skia/src/gpu/GrAAConvexPathRenderer.cpp38
-rw-r--r--chromium/third_party/skia/src/gpu/GrAAHairLinePathRenderer.cpp47
-rw-r--r--chromium/third_party/skia/src/gpu/GrAARectRenderer.cpp74
-rw-r--r--chromium/third_party/skia/src/gpu/GrAARectRenderer.h2
-rw-r--r--chromium/third_party/skia/src/gpu/GrAddPathRenderers_none.cpp15
-rw-r--r--chromium/third_party/skia/src/gpu/GrAllocPool.cpp6
-rw-r--r--chromium/third_party/skia/src/gpu/GrAllocPool.h2
-rw-r--r--[-rwxr-xr-x]chromium/third_party/skia/src/gpu/GrAllocator.h6
-rw-r--r--chromium/third_party/skia/src/gpu/GrAtlas.cpp346
-rw-r--r--chromium/third_party/skia/src/gpu/GrAtlas.h61
-rwxr-xr-xchromium/third_party/skia/src/gpu/GrBitmapTextContext.cpp490
-rw-r--r--chromium/third_party/skia/src/gpu/GrBitmapTextContext.h57
-rw-r--r--chromium/third_party/skia/src/gpu/GrBufferAllocPool.cpp86
-rw-r--r--chromium/third_party/skia/src/gpu/GrBufferAllocPool.h26
-rw-r--r--chromium/third_party/skia/src/gpu/GrCacheID.cpp2
-rw-r--r--chromium/third_party/skia/src/gpu/GrCacheable.cpp17
-rw-r--r--chromium/third_party/skia/src/gpu/GrClipData.cpp6
-rw-r--r--chromium/third_party/skia/src/gpu/GrClipMaskCache.h2
-rw-r--r--chromium/third_party/skia/src/gpu/GrClipMaskManager.cpp334
-rw-r--r--chromium/third_party/skia/src/gpu/GrClipMaskManager.h33
-rw-r--r--chromium/third_party/skia/src/gpu/GrContext.cpp549
-rw-r--r--chromium/third_party/skia/src/gpu/GrDefaultPathRenderer.cpp10
-rwxr-xr-xchromium/third_party/skia/src/gpu/GrDistanceFieldTextContext.cpp380
-rw-r--r--chromium/third_party/skia/src/gpu/GrDistanceFieldTextContext.h57
-rw-r--r--chromium/third_party/skia/src/gpu/GrDrawState.h11
-rw-r--r--chromium/third_party/skia/src/gpu/GrDrawTarget.cpp202
-rw-r--r--chromium/third_party/skia/src/gpu/GrDrawTarget.h76
-rw-r--r--chromium/third_party/skia/src/gpu/GrDrawTargetCaps.h34
-rw-r--r--chromium/third_party/skia/src/gpu/GrGeometryBuffer.h82
-rw-r--r--chromium/third_party/skia/src/gpu/GrGpu.cpp108
-rw-r--r--chromium/third_party/skia/src/gpu/GrGpu.h69
-rw-r--r--chromium/third_party/skia/src/gpu/GrGpuObject.cpp60
-rw-r--r--chromium/third_party/skia/src/gpu/GrInOrderDrawBuffer.cpp205
-rw-r--r--chromium/third_party/skia/src/gpu/GrInOrderDrawBuffer.h34
-rw-r--r--chromium/third_party/skia/src/gpu/GrIndexBuffer.h6
-rw-r--r--chromium/third_party/skia/src/gpu/GrLayerCache.cpp86
-rw-r--r--chromium/third_party/skia/src/gpu/GrLayerCache.h120
-rw-r--r--chromium/third_party/skia/src/gpu/GrMemory.cpp26
-rw-r--r--chromium/third_party/skia/src/gpu/GrMemoryPool.cpp6
-rw-r--r--chromium/third_party/skia/src/gpu/GrOrderedSet.h154
-rw-r--r--chromium/third_party/skia/src/gpu/GrOvalRenderer.cpp199
-rw-r--r--chromium/third_party/skia/src/gpu/GrOvalRenderer.h6
-rw-r--r--chromium/third_party/skia/src/gpu/GrPaint.cpp2
-rw-r--r--chromium/third_party/skia/src/gpu/GrPath.h6
-rw-r--r--chromium/third_party/skia/src/gpu/GrPathUtils.cpp142
-rw-r--r--chromium/third_party/skia/src/gpu/GrPathUtils.h33
-rw-r--r--chromium/third_party/skia/src/gpu/GrPictureUtils.cpp279
-rw-r--r--chromium/third_party/skia/src/gpu/GrPictureUtils.h79
-rw-r--r--chromium/third_party/skia/src/gpu/GrPlotMgr.h7
-rw-r--r--chromium/third_party/skia/src/gpu/GrRectanizer.cpp128
-rw-r--r--chromium/third_party/skia/src/gpu/GrRectanizer.h19
-rw-r--r--chromium/third_party/skia/src/gpu/GrRectanizer_fifo.cpp121
-rw-r--r--chromium/third_party/skia/src/gpu/GrRectanizer_pow2.cpp60
-rw-r--r--chromium/third_party/skia/src/gpu/GrRectanizer_pow2.h79
-rwxr-xr-xchromium/third_party/skia/src/gpu/GrRectanizer_skyline.cpp73
-rw-r--r--chromium/third_party/skia/src/gpu/GrRectanizer_skyline.h62
-rw-r--r--chromium/third_party/skia/src/gpu/GrRedBlackTree.h181
-rw-r--r--chromium/third_party/skia/src/gpu/GrReducedClip.cpp18
-rw-r--r--chromium/third_party/skia/src/gpu/GrReducedClip.h15
-rw-r--r--chromium/third_party/skia/src/gpu/GrRenderTarget.cpp13
-rw-r--r--chromium/third_party/skia/src/gpu/GrResource.cpp61
-rw-r--r--chromium/third_party/skia/src/gpu/GrResourceCache.cpp130
-rw-r--r--chromium/third_party/skia/src/gpu/GrResourceCache.h126
-rw-r--r--chromium/third_party/skia/src/gpu/GrSWMaskHelper.cpp62
-rw-r--r--chromium/third_party/skia/src/gpu/GrSWMaskHelper.h7
-rw-r--r--chromium/third_party/skia/src/gpu/GrStencil.cpp2
-rw-r--r--chromium/third_party/skia/src/gpu/GrStencilBuffer.h9
-rw-r--r--chromium/third_party/skia/src/gpu/GrStrokeInfo.h99
-rw-r--r--chromium/third_party/skia/src/gpu/GrSurface.cpp18
-rw-r--r--chromium/third_party/skia/src/gpu/GrTBSearch.h5
-rw-r--r--chromium/third_party/skia/src/gpu/GrTHashTable.h7
-rw-r--r--chromium/third_party/skia/src/gpu/GrTMultiMap.h110
-rw-r--r--chromium/third_party/skia/src/gpu/GrTemplates.h2
-rw-r--r--chromium/third_party/skia/src/gpu/GrTest.cpp5
-rw-r--r--chromium/third_party/skia/src/gpu/GrTextContext.cpp62
-rw-r--r--chromium/third_party/skia/src/gpu/GrTextContext.h55
-rw-r--r--chromium/third_party/skia/src/gpu/GrTextStrike.cpp234
-rw-r--r--chromium/third_party/skia/src/gpu/GrTextStrike.h31
-rw-r--r--chromium/third_party/skia/src/gpu/GrTextStrike_impl.h8
-rw-r--r--chromium/third_party/skia/src/gpu/GrTexture.cpp67
-rw-r--r--chromium/third_party/skia/src/gpu/GrTextureAccess.cpp2
-rw-r--r--chromium/third_party/skia/src/gpu/GrTraceMarker.cpp87
-rw-r--r--chromium/third_party/skia/src/gpu/GrTraceMarker.h98
-rw-r--r--chromium/third_party/skia/src/gpu/GrTracing.h108
-rw-r--r--chromium/third_party/skia/src/gpu/GrVertexBuffer.h4
-rw-r--r--chromium/third_party/skia/src/gpu/SkGpuDevice.cpp1364
-rw-r--r--chromium/third_party/skia/src/gpu/SkGr.cpp292
-rw-r--r--chromium/third_party/skia/src/gpu/SkGrFontScaler.cpp42
-rw-r--r--chromium/third_party/skia/src/gpu/SkGrPixelRef.cpp51
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrBezierEffect.cpp63
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrBezierEffect.h162
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrBicubicEffect.cpp96
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrBicubicEffect.h60
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrConfigConversionEffect.cpp10
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrConvexPolyEffect.cpp374
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrConvexPolyEffect.h91
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrConvolutionEffect.cpp2
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrDashingEffect.cpp628
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrDashingEffect.h37
-rwxr-xr-xchromium/third_party/skia/src/gpu/effects/GrDistanceFieldTextureEffect.cpp423
-rw-r--r--[-rwxr-xr-x]chromium/third_party/skia/src/gpu/effects/GrDistanceFieldTextureEffect.h85
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrDitherEffect.cpp115
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrDitherEffect.h23
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrOvalEffect.cpp387
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrOvalEffect.h24
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrRRectEffect.cpp730
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrRRectEffect.h25
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrSimpleTextureEffect.cpp2
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrTextureDomain.cpp2
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrTextureDomain.h6
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrTextureStripAtlas.cpp2
-rw-r--r--chromium/third_party/skia/src/gpu/effects/GrTextureStripAtlas.h2
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLAssembleInterface.cpp295
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLAssembleInterface.h18
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLBufferImpl.cpp127
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLBufferImpl.h13
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLCaps.cpp298
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLCaps.h69
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLContext.cpp76
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLContext.h86
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLCreateNullInterface.cpp316
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLDefines.h89
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLExtensions.cpp87
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLIndexBuffer.cpp26
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLIndexBuffer.h16
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLInterface.cpp690
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLNameAllocator.cpp370
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLNameAllocator.h86
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLNoOpInterface.cpp65
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLNoOpInterface.h32
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLPath.cpp15
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLPath.h2
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLProgram.cpp215
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLProgram.h100
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLProgramDesc.cpp18
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLProgramDesc.h6
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLProgramEffects.cpp52
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLProgramEffects.h37
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLSL.cpp42
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLSL.h5
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLShaderBuilder.cpp364
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLShaderBuilder.h243
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLShaderVar.h10
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLStencilBuffer.cpp4
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLStencilBuffer.h2
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLTexture.h6
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLUniformManager.cpp4
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLUniformManager.h4
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLUtil.cpp44
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLUtil.h23
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLVertexArray.cpp65
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLVertexArray.h33
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLVertexBuffer.cpp27
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLVertexBuffer.h16
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLVertexEffect.h2
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGpuGL.cpp646
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGpuGL.h75
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGpuGL_program.cpp39
-rw-r--r--chromium/third_party/skia/src/gpu/gl/SkGLContextHelper.cpp15
-rw-r--r--chromium/third_party/skia/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp558
-rw-r--r--chromium/third_party/skia/src/gpu/gl/android/SkNativeGLContext_android.cpp8
-rw-r--r--chromium/third_party/skia/src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp270
-rw-r--r--chromium/third_party/skia/src/gpu/gl/debug/GrBufferObj.h12
-rw-r--r--chromium/third_party/skia/src/gpu/gl/debug/GrFakeRefObj.h2
-rw-r--r--chromium/third_party/skia/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp361
-rw-r--r--chromium/third_party/skia/src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp264
-rw-r--r--chromium/third_party/skia/src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp237
-rw-r--r--chromium/third_party/skia/src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp219
-rw-r--r--chromium/third_party/skia/src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp277
-rw-r--r--chromium/third_party/skia/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp316
-rw-r--r--chromium/third_party/skia/src/gpu/gl/win/SkNativeGLContext_win.cpp3
-rw-r--r--chromium/third_party/skia/src/image/SkDataPixelRef.cpp46
-rw-r--r--chromium/third_party/skia/src/image/SkDataPixelRef.h36
-rw-r--r--chromium/third_party/skia/src/image/SkImage.cpp84
-rw-r--r--chromium/third_party/skia/src/image/SkImagePriv.cpp82
-rw-r--r--chromium/third_party/skia/src/image/SkImagePriv.h21
-rw-r--r--chromium/third_party/skia/src/image/SkImage_Base.h8
-rw-r--r--chromium/third_party/skia/src/image/SkImage_Codec.cpp9
-rw-r--r--chromium/third_party/skia/src/image/SkImage_Gpu.cpp9
-rw-r--r--chromium/third_party/skia/src/image/SkImage_Picture.cpp66
-rw-r--r--chromium/third_party/skia/src/image/SkImage_Raster.cpp63
-rw-r--r--chromium/third_party/skia/src/image/SkSurface.cpp33
-rw-r--r--chromium/third_party/skia/src/image/SkSurface_Base.h21
-rw-r--r--chromium/third_party/skia/src/image/SkSurface_Gpu.cpp84
-rw-r--r--chromium/third_party/skia/src/image/SkSurface_Picture.cpp92
-rw-r--r--chromium/third_party/skia/src/image/SkSurface_Raster.cpp41
-rw-r--r--chromium/third_party/skia/src/images/SkDecodingImageGenerator.cpp311
-rw-r--r--chromium/third_party/skia/src/images/SkDecodingImageGenerator.h120
-rw-r--r--chromium/third_party/skia/src/images/SkForceLinking.cpp2
-rw-r--r--chromium/third_party/skia/src/images/SkImageDecoder.cpp96
-rw-r--r--chromium/third_party/skia/src/images/SkImageDecoder_ktx.cpp277
-rw-r--r--chromium/third_party/skia/src/images/SkImageDecoder_libbmp.cpp11
-rw-r--r--chromium/third_party/skia/src/images/SkImageDecoder_libgif.cpp54
-rw-r--r--chromium/third_party/skia/src/images/SkImageDecoder_libico.cpp6
-rw-r--r--chromium/third_party/skia/src/images/SkImageDecoder_libjpeg.cpp115
-rw-r--r--chromium/third_party/skia/src/images/SkImageDecoder_libpng.cpp216
-rw-r--r--chromium/third_party/skia/src/images/SkImageDecoder_libwebp.cpp163
-rw-r--r--chromium/third_party/skia/src/images/SkImageDecoder_pkm.cpp133
-rw-r--r--chromium/third_party/skia/src/images/SkImageDecoder_wbmp.cpp4
-rw-r--r--chromium/third_party/skia/src/images/SkImageEncoder_argb.cpp15
-rw-r--r--chromium/third_party/skia/src/images/SkImageRef.cpp191
-rw-r--r--chromium/third_party/skia/src/images/SkImageRefPool.cpp192
-rw-r--r--chromium/third_party/skia/src/images/SkImageRefPool.h49
-rw-r--r--chromium/third_party/skia/src/images/SkImageRef_GlobalPool.cpp100
-rw-r--r--chromium/third_party/skia/src/images/SkImageRef_ashmem.cpp233
-rw-r--r--chromium/third_party/skia/src/images/SkImageRef_ashmem.h47
-rw-r--r--chromium/third_party/skia/src/images/SkImages.cpp21
-rw-r--r--chromium/third_party/skia/src/images/SkMovie_gif.cpp6
-rw-r--r--chromium/third_party/skia/src/images/SkScaledBitmapSampler.cpp116
-rw-r--r--chromium/third_party/skia/src/images/SkScaledBitmapSampler.h13
-rw-r--r--chromium/third_party/skia/src/images/SkStreamHelpers.cpp27
-rw-r--r--chromium/third_party/skia/src/images/SkStreamHelpers.h9
-rw-r--r--chromium/third_party/skia/src/lazy/SkCachingPixelRef.cpp24
-rw-r--r--chromium/third_party/skia/src/lazy/SkCachingPixelRef.h7
-rw-r--r--chromium/third_party/skia/src/lazy/SkDiscardableMemoryPool.cpp176
-rw-r--r--chromium/third_party/skia/src/lazy/SkDiscardableMemoryPool.h74
-rw-r--r--chromium/third_party/skia/src/lazy/SkDiscardablePixelRef.cpp69
-rw-r--r--chromium/third_party/skia/src/lazy/SkDiscardablePixelRef.h16
-rw-r--r--chromium/third_party/skia/src/lazy/SkPurgeableMemoryBlock.h94
-rw-r--r--chromium/third_party/skia/src/lazy/SkPurgeableMemoryBlock_common.cpp16
-rw-r--r--chromium/third_party/skia/src/opts/SkBitmapFilter_opts_SSE2.cpp793
-rw-r--r--chromium/third_party/skia/src/opts/SkBitmapFilter_opts_SSE2.h6
-rw-r--r--chromium/third_party/skia/src/opts/SkBitmapProcState_filter_neon.h22
-rw-r--r--chromium/third_party/skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp140
-rw-r--r--chromium/third_party/skia/src/opts/SkBitmapProcState_matrix_clamp_neon.h911
-rw-r--r--chromium/third_party/skia/src/opts/SkBitmapProcState_matrix_neon.h506
-rw-r--r--chromium/third_party/skia/src/opts/SkBitmapProcState_matrix_repeat_neon.h542
-rw-r--r--chromium/third_party/skia/src/opts/SkBitmapProcState_opts_SSE2.cpp32
-rw-r--r--chromium/third_party/skia/src/opts/SkBitmapProcState_opts_SSE2.h11
-rw-r--r--chromium/third_party/skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp47
-rw-r--r--chromium/third_party/skia/src/opts/SkBitmapProcState_opts_SSSE3.h5
-rw-r--r--chromium/third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp12
-rw-r--r--chromium/third_party/skia/src/opts/SkBlitMask_opts_arm.cpp15
-rw-r--r--chromium/third_party/skia/src/opts/SkBlitMask_opts_none.cpp10
-rw-r--r--chromium/third_party/skia/src/opts/SkBlitRect_opts_SSE2.cpp21
-rw-r--r--chromium/third_party/skia/src/opts/SkBlitRect_opts_SSE2.h8
-rw-r--r--chromium/third_party/skia/src/opts/SkBlitRow_opts_SSE2.cpp524
-rw-r--r--chromium/third_party/skia/src/opts/SkBlitRow_opts_SSE2.h18
-rw-r--r--chromium/third_party/skia/src/opts/SkBlitRow_opts_arm.cpp6
-rw-r--r--chromium/third_party/skia/src/opts/SkBlitRow_opts_arm_neon.cpp875
-rw-r--r--chromium/third_party/skia/src/opts/SkBlitRow_opts_mips_dsp.cpp848
-rw-r--r--chromium/third_party/skia/src/opts/SkBlurImage_opts_SSE2.cpp25
-rw-r--r--chromium/third_party/skia/src/opts/SkBlurImage_opts_SSE2.h5
-rw-r--r--chromium/third_party/skia/src/opts/SkBlurImage_opts_arm.cpp25
-rw-r--r--chromium/third_party/skia/src/opts/SkBlurImage_opts_neon.cpp93
-rw-r--r--chromium/third_party/skia/src/opts/SkCachePreload_arm.h34
-rw-r--r--chromium/third_party/skia/src/opts/SkColor_opts_SSE2.h186
-rw-r--r--chromium/third_party/skia/src/opts/SkMath_opts_SSE2.h51
-rw-r--r--chromium/third_party/skia/src/opts/SkMorphology_opts.h17
-rw-r--r--chromium/third_party/skia/src/opts/SkMorphology_opts_SSE2.cpp12
-rw-r--r--chromium/third_party/skia/src/opts/SkMorphology_opts_SSE2.h7
-rw-r--r--chromium/third_party/skia/src/opts/SkMorphology_opts_arm.cpp34
-rw-r--r--chromium/third_party/skia/src/opts/SkMorphology_opts_none.cpp2
-rw-r--r--chromium/third_party/skia/src/opts/SkUtils_opts_SSE2.cpp32
-rw-r--r--chromium/third_party/skia/src/opts/SkUtils_opts_SSE2.h6
-rw-r--r--chromium/third_party/skia/src/opts/SkUtils_opts_arm.cpp57
-rw-r--r--chromium/third_party/skia/src/opts/SkUtils_opts_none.cpp4
-rw-r--r--chromium/third_party/skia/src/opts/SkXfermode_opts_SSE2.cpp819
-rw-r--r--chromium/third_party/skia/src/opts/SkXfermode_opts_SSE2.h38
-rw-r--r--chromium/third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp80
-rw-r--r--chromium/third_party/skia/src/opts/SkXfermode_opts_arm_neon.h4
-rw-r--r--chromium/third_party/skia/src/opts/opts_check_SSE2.cpp294
-rw-r--r--chromium/third_party/skia/src/opts/opts_check_arm.cpp110
-rw-r--r--chromium/third_party/skia/src/opts/opts_check_x86.cpp379
-rw-r--r--chromium/third_party/skia/src/pathops/SkAddIntersections.cpp9
-rw-r--r--chromium/third_party/skia/src/pathops/SkDCubicIntersection.cpp69
-rw-r--r--chromium/third_party/skia/src/pathops/SkDCubicLineIntersection.cpp91
-rw-r--r--chromium/third_party/skia/src/pathops/SkDCubicToQuads.cpp12
-rw-r--r--chromium/third_party/skia/src/pathops/SkDLineIntersection.cpp70
-rw-r--r--chromium/third_party/skia/src/pathops/SkDQuadIntersection.cpp20
-rw-r--r--chromium/third_party/skia/src/pathops/SkDQuadLineIntersection.cpp58
-rw-r--r--chromium/third_party/skia/src/pathops/SkIntersectionHelper.h25
-rw-r--r--chromium/third_party/skia/src/pathops/SkIntersections.cpp25
-rw-r--r--chromium/third_party/skia/src/pathops/SkIntersections.h38
-rw-r--r--chromium/third_party/skia/src/pathops/SkLineParameters.h80
-rw-r--r--chromium/third_party/skia/src/pathops/SkOpAngle.cpp1289
-rw-r--r--chromium/third_party/skia/src/pathops/SkOpAngle.h121
-rw-r--r--chromium/third_party/skia/src/pathops/SkOpContour.cpp404
-rw-r--r--chromium/third_party/skia/src/pathops/SkOpContour.h104
-rw-r--r--chromium/third_party/skia/src/pathops/SkOpEdgeBuilder.cpp4
-rw-r--r--chromium/third_party/skia/src/pathops/SkOpSegment.cpp3137
-rw-r--r--chromium/third_party/skia/src/pathops/SkOpSegment.h243
-rw-r--r--chromium/third_party/skia/src/pathops/SkOpSpan.h20
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsCommon.cpp255
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsCommon.h6
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsCubic.cpp98
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsCubic.h40
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsCurve.h26
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsDebug.cpp514
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsDebug.h92
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsLine.cpp15
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsLine.h6
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsOp.cpp133
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsPoint.h57
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsQuad.cpp25
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsQuad.h7
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsSimplify.cpp44
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsTriangle.cpp2
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsTypes.cpp7
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsTypes.h96
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathWriter.h1
-rw-r--r--chromium/third_party/skia/src/pathops/SkQuarticRoot.cpp7
-rw-r--r--chromium/third_party/skia/src/pathops/SkReduceOrder.cpp4
-rw-r--r--chromium/third_party/skia/src/pathops/main.cpp16
-rw-r--r--chromium/third_party/skia/src/pdf/SkPDFDevice.cpp111
-rw-r--r--chromium/third_party/skia/src/pdf/SkPDFDeviceFlattener.cpp7
-rw-r--r--chromium/third_party/skia/src/pdf/SkPDFDocument.cpp46
-rw-r--r--chromium/third_party/skia/src/pdf/SkPDFFont.cpp104
-rw-r--r--chromium/third_party/skia/src/pdf/SkPDFFont.h19
-rw-r--r--[-rwxr-xr-x]chromium/third_party/skia/src/pdf/SkPDFFontImpl.h0
-rw-r--r--chromium/third_party/skia/src/pdf/SkPDFGraphicState.cpp12
-rw-r--r--chromium/third_party/skia/src/pdf/SkPDFImage.cpp62
-rw-r--r--chromium/third_party/skia/src/pdf/SkPDFShader.cpp4
-rw-r--r--chromium/third_party/skia/src/pdf/SkPDFTypes.cpp12
-rw-r--r--chromium/third_party/skia/src/pdf/SkPDFTypes.h8
-rw-r--r--chromium/third_party/skia/src/pipe/SkGPipePriv.h3
-rw-r--r--chromium/third_party/skia/src/pipe/SkGPipeRead.cpp45
-rw-r--r--chromium/third_party/skia/src/pipe/SkGPipeWrite.cpp358
-rw-r--r--chromium/third_party/skia/src/pipe/utils/SamplePipeControllers.cpp2
-rw-r--r--chromium/third_party/skia/src/ports/SkAtomics_sync.h43
-rw-r--r--chromium/third_party/skia/src/ports/SkAtomics_win.h49
-rw-r--r--chromium/third_party/skia/src/ports/SkBarriers_arm.h26
-rw-r--r--chromium/third_party/skia/src/ports/SkBarriers_tsan.h25
-rw-r--r--chromium/third_party/skia/src/ports/SkBarriers_x86.h33
-rw-r--r--chromium/third_party/skia/src/ports/SkDiscardableMemory_ashmem.cpp113
-rw-r--r--chromium/third_party/skia/src/ports/SkFontConfigInterface_android.cpp99
-rw-r--r--chromium/third_party/skia/src/ports/SkFontConfigInterface_direct.cpp13
-rw-r--r--chromium/third_party/skia/src/ports/SkFontConfigParser_android.cpp21
-rw-r--r--chromium/third_party/skia/src/ports/SkFontConfigParser_android.h8
-rw-r--r--chromium/third_party/skia/src/ports/SkFontConfigTypeface.h34
-rw-r--r--chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp287
-rw-r--r--chromium/third_party/skia/src/ports/SkFontHost_FreeType_common.cpp56
-rw-r--r--chromium/third_party/skia/src/ports/SkFontHost_FreeType_common.h1
-rw-r--r--chromium/third_party/skia/src/ports/SkFontHost_fontconfig.cpp2
-rw-r--r--chromium/third_party/skia/src/ports/SkFontHost_linux.cpp36
-rwxr-xr-xchromium/third_party/skia/src/ports/SkFontHost_mac.cpp75
-rwxr-xr-xchromium/third_party/skia/src/ports/SkFontHost_win.cpp170
-rw-r--r--chromium/third_party/skia/src/ports/SkFontHost_win_dw.cpp1912
-rw-r--r--chromium/third_party/skia/src/ports/SkFontMgr_win_dw.cpp764
-rw-r--r--chromium/third_party/skia/src/ports/SkGlobalInitialization_chromium.cpp15
-rw-r--r--chromium/third_party/skia/src/ports/SkGlobalInitialization_default.cpp16
-rw-r--r--chromium/third_party/skia/src/ports/SkHarfBuzzFont.cpp187
-rw-r--r--chromium/third_party/skia/src/ports/SkImageDecoder_CG.cpp37
-rw-r--r--chromium/third_party/skia/src/ports/SkImageDecoder_WIC.cpp6
-rw-r--r--chromium/third_party/skia/src/ports/SkImageDecoder_empty.cpp38
-rw-r--r--chromium/third_party/skia/src/ports/SkMutex_pthread.h91
-rw-r--r--chromium/third_party/skia/src/ports/SkMutex_win.h76
-rw-r--r--chromium/third_party/skia/src/ports/SkOSFile_win.cpp16
-rw-r--r--chromium/third_party/skia/src/ports/SkPurgeableMemoryBlock_android.cpp110
-rw-r--r--chromium/third_party/skia/src/ports/SkPurgeableMemoryBlock_mac.cpp104
-rw-r--r--chromium/third_party/skia/src/ports/SkPurgeableMemoryBlock_none.cpp40
-rw-r--r--chromium/third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp527
-rw-r--r--chromium/third_party/skia/src/ports/SkScalerContext_win_dw.cpp747
-rw-r--r--chromium/third_party/skia/src/ports/SkScalerContext_win_dw.h63
-rw-r--r--chromium/third_party/skia/src/ports/SkThread_none.cpp43
-rw-r--r--chromium/third_party/skia/src/ports/SkThread_pthread.cpp197
-rw-r--r--chromium/third_party/skia/src/ports/SkThread_win.cpp65
-rw-r--r--chromium/third_party/skia/src/ports/SkTypeface_win_dw.cpp489
-rw-r--r--chromium/third_party/skia/src/ports/SkTypeface_win_dw.h117
-rw-r--r--chromium/third_party/skia/src/ports/SkXMLParser_expat.cpp140
-rw-r--r--chromium/third_party/skia/src/ports/SkXMLParser_tinyxml.cpp87
-rw-r--r--chromium/third_party/skia/src/ports/SkXMLPullParser_expat.cpp213
-rw-r--r--chromium/third_party/skia/src/sfnt/SkOTTableTypes.h15
-rw-r--r--chromium/third_party/skia/src/sfnt/SkOTTable_EBDT.h109
-rw-r--r--chromium/third_party/skia/src/sfnt/SkOTTable_EBLC.h152
-rw-r--r--chromium/third_party/skia/src/sfnt/SkOTTable_EBSC.h41
-rw-r--r--chromium/third_party/skia/src/sfnt/SkOTTable_OS_2_V0.h22
-rw-r--r--chromium/third_party/skia/src/sfnt/SkOTTable_OS_2_V1.h224
-rw-r--r--chromium/third_party/skia/src/sfnt/SkOTTable_OS_2_V2.h252
-rw-r--r--chromium/third_party/skia/src/sfnt/SkOTTable_OS_2_V3.h268
-rw-r--r--chromium/third_party/skia/src/sfnt/SkOTTable_OS_2_V4.h346
-rw-r--r--chromium/third_party/skia/src/sfnt/SkOTTable_OS_2_VA.h20
-rw-r--r--chromium/third_party/skia/src/sfnt/SkOTTable_gasp.h73
-rw-r--r--chromium/third_party/skia/src/sfnt/SkOTUtils.cpp6
-rw-r--r--chromium/third_party/skia/src/text/SkTextLayout.cpp78
-rw-r--r--chromium/third_party/skia/src/utils/SkBase64.cpp21
-rw-r--r--chromium/third_party/skia/src/utils/SkBase64.h5
-rw-r--r--[-rwxr-xr-x]chromium/third_party/skia/src/utils/SkBitSet.h0
-rw-r--r--chromium/third_party/skia/src/utils/SkBitmapHasher.cpp4
-rw-r--r--chromium/third_party/skia/src/utils/SkBitmapHasher.h2
-rw-r--r--chromium/third_party/skia/src/utils/SkCamera.cpp92
-rw-r--r--chromium/third_party/skia/src/utils/SkCanvasStack.cpp23
-rw-r--r--chromium/third_party/skia/src/utils/SkCanvasStack.h13
-rw-r--r--chromium/third_party/skia/src/utils/SkCanvasStateUtils.cpp131
-rw-r--r--chromium/third_party/skia/src/utils/SkCullPoints.cpp10
-rw-r--r--chromium/third_party/skia/src/utils/SkDashPath.cpp328
-rw-r--r--chromium/third_party/skia/src/utils/SkDashPathPriv.h32
-rw-r--r--chromium/third_party/skia/src/utils/SkDebugTrace.h24
-rw-r--r--chromium/third_party/skia/src/utils/SkDeferredCanvas.cpp351
-rw-r--r--chromium/third_party/skia/src/utils/SkDumpCanvas.cpp147
-rw-r--r--chromium/third_party/skia/src/utils/SkEventTracer.cpp59
-rw-r--r--chromium/third_party/skia/src/utils/SkFrontBufferedStream.cpp16
-rw-r--r--chromium/third_party/skia/src/utils/SkGatherPixelRefsAndRects.cpp25
-rw-r--r--chromium/third_party/skia/src/utils/SkGatherPixelRefsAndRects.h333
-rw-r--r--chromium/third_party/skia/src/utils/SkInterpolator.cpp8
-rw-r--r--chromium/third_party/skia/src/utils/SkJSON.cpp634
-rw-r--r--chromium/third_party/skia/src/utils/SkLua.cpp390
-rw-r--r--chromium/third_party/skia/src/utils/SkLuaCanvas.cpp137
-rw-r--r--chromium/third_party/skia/src/utils/SkMD5.h4
-rw-r--r--chromium/third_party/skia/src/utils/SkMatrix22.cpp40
-rw-r--r--chromium/third_party/skia/src/utils/SkMatrix22.h31
-rw-r--r--chromium/third_party/skia/src/utils/SkNWayCanvas.cpp124
-rw-r--r--chromium/third_party/skia/src/utils/SkPDFRasterizer.cpp18
-rw-r--r--chromium/third_party/skia/src/utils/SkPDFRasterizer.h2
-rw-r--r--chromium/third_party/skia/src/utils/SkParse.cpp45
-rw-r--r--chromium/third_party/skia/src/utils/SkParseColor.cpp8
-rw-r--r--chromium/third_party/skia/src/utils/SkParsePath.cpp5
-rw-r--r--chromium/third_party/skia/src/utils/SkPictureUtils.cpp92
-rw-r--r--chromium/third_party/skia/src/utils/SkProxyCanvas.cpp86
-rw-r--r--chromium/third_party/skia/src/utils/SkRTConf.cpp29
-rw-r--r--chromium/third_party/skia/src/utils/SkSHA1.h2
-rw-r--r--chromium/third_party/skia/src/utils/SkTLogic.h49
-rw-r--r--chromium/third_party/skia/src/utils/SkTextureCompressor.cpp210
-rw-r--r--chromium/third_party/skia/src/utils/SkTextureCompressor.h31
-rw-r--r--chromium/third_party/skia/src/utils/SkThreadPool.cpp127
-rw-r--r--chromium/third_party/skia/src/utils/SkUnitMappers.cpp59
-rw-r--r--chromium/third_party/skia/src/utils/android/ashmem.cpp87
-rw-r--r--chromium/third_party/skia/src/utils/android/ashmem.h50
-rw-r--r--chromium/third_party/skia/src/utils/debugger/SkDebugCanvas.cpp486
-rw-r--r--chromium/third_party/skia/src/utils/debugger/SkDebugCanvas.h141
-rw-r--r--chromium/third_party/skia/src/utils/debugger/SkDrawCommand.cpp213
-rw-r--r--chromium/third_party/skia/src/utils/debugger/SkDrawCommand.h96
-rw-r--r--chromium/third_party/skia/src/utils/debugger/SkObjectParser.cpp16
-rw-r--r--chromium/third_party/skia/src/utils/debugger/SkObjectParser.h2
-rwxr-xr-xchromium/third_party/skia/src/utils/ios/SkImageDecoder_iOS.mm3
-rw-r--r--chromium/third_party/skia/src/utils/mac/SkCreateCGImageRef.cpp166
-rw-r--r--chromium/third_party/skia/src/utils/win/SkDWrite.cpp130
-rw-r--r--chromium/third_party/skia/src/utils/win/SkDWrite.h76
-rw-r--r--chromium/third_party/skia/src/utils/win/SkDWriteFontFileStream.h1
-rw-r--r--chromium/third_party/skia/src/utils/win/SkHRESULT.cpp15
-rw-r--r--chromium/third_party/skia/src/views/SkParsePaint.cpp2
-rw-r--r--chromium/third_party/skia/src/views/SkStackViewLayout.cpp4
-rw-r--r--chromium/third_party/skia/src/views/SkWidgets.cpp8
-rw-r--r--chromium/third_party/skia/src/views/SkWindow.cpp146
-rw-r--r--chromium/third_party/skia/src/views/mac/SkNSView.mm3
-rw-r--r--chromium/third_party/skia/src/views/mac/SkOptionsTableView.mm10
-rw-r--r--chromium/third_party/skia/src/views/sdl/SkOSWindow_SDL.cpp13
-rw-r--r--chromium/third_party/skia/src/views/unix/SkOSWindow_Unix.cpp10
-rw-r--r--chromium/third_party/skia/src/views/unix/skia_unix.cpp19
-rw-r--r--chromium/third_party/skia/src/views/win/SkOSWindow_win.cpp11
-rw-r--r--chromium/third_party/skia/src/xml/SkJSDisplayable.cpp8
-rw-r--r--chromium/third_party/skia/src/xml/SkXMLWriter.cpp2
-rw-r--r--chromium/third_party/skia/third_party/README5
-rw-r--r--chromium/third_party/skia/third_party/etc1/LICENSE161
-rw-r--r--chromium/third_party/skia/third_party/etc1/README.google7
-rw-r--r--chromium/third_party/skia/third_party/etc1/etc1.cpp678
-rw-r--r--chromium/third_party/skia/third_party/etc1/etc1.h114
-rw-r--r--chromium/third_party/skia/third_party/freetype/include_overrides/freetype/config/ftmodule.h37
-rw-r--r--chromium/third_party/skia/third_party/freetype/include_overrides/freetype/config/ftoption.h833
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/AUTHORS6
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/COPYING24
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/ChangeLog0
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/Makefile.am2
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/NEWS0
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/README7
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/README.google9
-rwxr-xr-xchromium/third_party/skia/third_party/harfbuzz/autogen.sh116
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/chromium.patch37
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/config.h60
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/configure.ac54
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/README9
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/harfbuzz-freetype.c149
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/harfbuzz-freetype.h9
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/harfbuzz-unicode-glib.c169
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/harfbuzz-unicode-tables.c84
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/harfbuzz-unicode.c287
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/harfbuzz-unicode.h54
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/tables/BidiMirroring.txt (renamed from chromium/third_party/cygwin/lib/perl5/5.10/unicore/BidiMirroring.txt)0
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/tables/DerivedCombiningClass.txt1881
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/tables/DerivedGeneralCategory.txt3072
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/tables/GraphemeBreakProperty.txt1166
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/tables/README17
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/tables/Scripts.txt (renamed from chromium/third_party/cygwin/lib/perl5/5.10/unicore/Scripts.txt)0
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/tables/category-parse.py70
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/tables/category-properties.h2869
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/tables/combining-class-parse.py34
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/tables/combining-properties.h247
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/tables/grapheme-break-parse.py45
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/tables/grapheme-break-properties.h1113
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/tables/mirroring-parse.py50
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/tables/mirroring-properties.h379
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/tables/script-properties.h297
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/tables/scripts-parse.py75
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/contrib/tables/unicode_parse_common.py70
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/harfbuzz.gyp63
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/Makefile.am68
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-arabic.c1145
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-buffer-private.h107
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-buffer.c383
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-buffer.h94
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-dump-main.c97
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-dump.c765
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-dump.h41
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-external.h157
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-gdef-private.h124
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-gdef.c1159
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-gdef.h135
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-global.h118
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-gpos-private.h712
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-gpos.c6055
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-gpos.h149
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-gsub-private.h476
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-gsub.c4329
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-gsub.h141
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-hangul.c268
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-hebrew.c189
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-impl.c84
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-impl.h131
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-indic.cpp1873
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-khmer.c667
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-myanmar.c542
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-open-private.h102
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-open.c1416
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-open.h282
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-shape.h199
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-shaper-all.cpp36
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-shaper-private.h167
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-shaper.cpp1357
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-shaper.h278
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-stream-private.h81
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-stream.c114
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-stream.h45
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-thai.c87
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz-tibetan.c274
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz.c32
-rw-r--r--chromium/third_party/skia/third_party/harfbuzz/src/harfbuzz.h38
-rw-r--r--chromium/third_party/skia/third_party/ktx/ktx.cpp499
-rw-r--r--chromium/third_party/skia/third_party/ktx/ktx.h144
-rw-r--r--chromium/third_party/skia/third_party/lua/Makefile114
-rw-r--r--chromium/third_party/skia/third_party/lua/README6
-rw-r--r--chromium/third_party/skia/third_party/lua/doc/contents.html533
-rw-r--r--chromium/third_party/skia/third_party/lua/doc/logo.gifbin0 -> 4232 bytes
-rw-r--r--chromium/third_party/skia/third_party/lua/doc/lua.1116
-rw-r--r--chromium/third_party/skia/third_party/lua/doc/lua.css83
-rw-r--r--chromium/third_party/skia/third_party/lua/doc/luac.1118
-rw-r--r--chromium/third_party/skia/third_party/lua/doc/manual.css26
-rw-r--r--chromium/third_party/skia/third_party/lua/doc/manual.html10507
-rw-r--r--chromium/third_party/skia/third_party/lua/doc/osi-certified-72x60.pngbin0 -> 3774 bytes
-rw-r--r--chromium/third_party/skia/third_party/lua/doc/readme.html412
-rw-r--r--chromium/third_party/skia/third_party/lua/src/Makefile187
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lapi.c1284
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lapi.h24
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lauxlib.c959
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lauxlib.h212
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lbaselib.c458
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lbitlib.c211
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lcode.c881
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lcode.h83
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lcorolib.c155
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lctype.c52
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lctype.h95
-rw-r--r--chromium/third_party/skia/third_party/lua/src/ldblib.c398
-rw-r--r--chromium/third_party/skia/third_party/lua/src/ldebug.c580
-rw-r--r--chromium/third_party/skia/third_party/lua/src/ldebug.h34
-rw-r--r--chromium/third_party/skia/third_party/lua/src/ldo.c673
-rw-r--r--chromium/third_party/skia/third_party/lua/src/ldo.h46
-rw-r--r--chromium/third_party/skia/third_party/lua/src/ldump.c173
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lfunc.c161
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lfunc.h33
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lgc.c1213
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lgc.h157
-rw-r--r--chromium/third_party/skia/third_party/lua/src/linit.c67
-rw-r--r--chromium/third_party/skia/third_party/lua/src/liolib.c665
-rw-r--r--chromium/third_party/skia/third_party/lua/src/llex.c527
-rw-r--r--chromium/third_party/skia/third_party/lua/src/llex.h78
-rw-r--r--chromium/third_party/skia/third_party/lua/src/llimits.h309
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lmathlib.c279
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lmem.c99
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lmem.h57
-rw-r--r--chromium/third_party/skia/third_party/lua/src/loadlib.c725
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lobject.c287
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lobject.h607
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lopcodes.c107
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lopcodes.h288
-rw-r--r--chromium/third_party/skia/third_party/lua/src/loslib.c323
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lparser.c1638
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lparser.h119
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lstate.c322
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lstate.h228
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lstring.c185
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lstring.h46
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lstrlib.c1019
-rw-r--r--chromium/third_party/skia/third_party/lua/src/ltable.c588
-rw-r--r--chromium/third_party/skia/third_party/lua/src/ltable.h41
-rw-r--r--chromium/third_party/skia/third_party/lua/src/ltablib.c283
-rw-r--r--chromium/third_party/skia/third_party/lua/src/ltm.c77
-rw-r--r--chromium/third_party/skia/third_party/lua/src/ltm.h57
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lua.c497
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lua.h444
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lua.hpp9
-rw-r--r--chromium/third_party/skia/third_party/lua/src/luac.c432
-rw-r--r--chromium/third_party/skia/third_party/lua/src/luaconf.h551
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lualib.h55
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lundump.c258
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lundump.h28
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lvm.c867
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lvm.h44
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lzio.c76
-rw-r--r--chromium/third_party/skia/third_party/lua/src/lzio.h65
-rw-r--r--chromium/third_party/skia/tools/CopyTilesRenderer.cpp101
-rw-r--r--chromium/third_party/skia/tools/CopyTilesRenderer.h50
-rw-r--r--chromium/third_party/skia/tools/CrashHandler.cpp172
-rw-r--r--chromium/third_party/skia/tools/CrashHandler.h9
-rw-r--r--chromium/third_party/skia/tools/DumpRecord.cpp113
-rw-r--r--chromium/third_party/skia/tools/DumpRecord.h24
-rw-r--r--chromium/third_party/skia/tools/LazyDecodeBitmap.cpp49
-rw-r--r--chromium/third_party/skia/tools/LazyDecodeBitmap.h24
-rw-r--r--chromium/third_party/skia/tools/OverwriteLine.h13
-rw-r--r--chromium/third_party/skia/tools/PdfRenderer.cpp60
-rw-r--r--chromium/third_party/skia/tools/PdfRenderer.h67
-rw-r--r--chromium/third_party/skia/tools/PictureBenchmark.cpp265
-rw-r--r--chromium/third_party/skia/tools/PictureBenchmark.h75
-rw-r--r--chromium/third_party/skia/tools/PictureRenderer.cpp967
-rw-r--r--chromium/third_party/skia/tools/PictureRenderer.h661
-rw-r--r--chromium/third_party/skia/tools/PictureRenderingFlags.cpp377
-rw-r--r--chromium/third_party/skia/tools/PictureRenderingFlags.h33
-rw-r--r--chromium/third_party/skia/tools/PictureResultsWriter.h232
-rw-r--r--chromium/third_party/skia/tools/Resources.cpp17
-rw-r--r--chromium/third_party/skia/tools/Resources.h15
-rw-r--r--chromium/third_party/skia/tools/Stats.h32
-rw-r--r--chromium/third_party/skia/tools/__init__.py0
-rwxr-xr-xchromium/third_party/skia/tools/add_codereview_message.py148
-rw-r--r--chromium/third_party/skia/tools/bbh_shootout.cpp194
-rw-r--r--chromium/third_party/skia/tools/bench_pictures.cfg83
-rw-r--r--chromium/third_party/skia/tools/bench_pictures_cfg_helper.py112
-rw-r--r--chromium/third_party/skia/tools/bench_pictures_main.cpp465
-rw-r--r--chromium/third_party/skia/tools/bench_playback.cpp156
-rw-r--r--chromium/third_party/skia/tools/bench_record.cpp176
-rw-r--r--chromium/third_party/skia/tools/bug_chomper/res/favicon.icobin0 -> 318 bytes
-rw-r--r--chromium/third_party/skia/tools/bug_chomper/res/style.css72
-rw-r--r--chromium/third_party/skia/tools/bug_chomper/res/third_party/jquery.tablednd.js314
-rwxr-xr-xchromium/third_party/skia/tools/bug_chomper/run_server.sh23
-rw-r--r--chromium/third_party/skia/tools/bug_chomper/src/issue_tracker/issue_tracker.go303
-rw-r--r--chromium/third_party/skia/tools/bug_chomper/src/server/server.go376
-rw-r--r--chromium/third_party/skia/tools/bug_chomper/templates/bug_chomper.html118
-rw-r--r--chromium/third_party/skia/tools/bug_chomper/templates/error.html12
-rw-r--r--chromium/third_party/skia/tools/bug_chomper/templates/submitted.html13
-rwxr-xr-xchromium/third_party/skia/tools/buildbot_globals.py76
-rw-r--r--chromium/third_party/skia/tools/chromium/chrome_changes7
-rwxr-xr-xchromium/third_party/skia/tools/compare_codereview.py414
-rw-r--r--chromium/third_party/skia/tools/copyright/fileparser.py92
-rw-r--r--chromium/third_party/skia/tools/copyright/main.py107
-rwxr-xr-xchromium/third_party/skia/tools/coverage.sh31
-rw-r--r--chromium/third_party/skia/tools/doxygen_footer.txt9
-rw-r--r--chromium/third_party/skia/tools/dump_record.cpp80
-rw-r--r--chromium/third_party/skia/tools/filtermain.cpp847
-rwxr-xr-xchromium/third_party/skia/tools/find_bad_images_in_skps.py197
-rw-r--r--chromium/third_party/skia/tools/find_run_binary.py61
-rw-r--r--chromium/third_party/skia/tools/flags/SkCommandLineFlags.cpp356
-rw-r--r--chromium/third_party/skia/tools/flags/SkCommandLineFlags.h446
-rwxr-xr-xchromium/third_party/skia/tools/gcov_shim15
-rw-r--r--chromium/third_party/skia/tools/gen_bench_expectations_from_codereview.py183
-rw-r--r--chromium/third_party/skia/tools/generate_fir_coeff.py119
-rw-r--r--chromium/third_party/skia/tools/git-skia-verify95
-rwxr-xr-xchromium/third_party/skia/tools/git-sync-deps205
-rw-r--r--chromium/third_party/skia/tools/git_utils.py168
-rw-r--r--chromium/third_party/skia/tools/gpuveto.cpp78
-rw-r--r--chromium/third_party/skia/tools/image_expectations.cpp232
-rw-r--r--chromium/third_party/skia/tools/image_expectations.h149
-rwxr-xr-xchromium/third_party/skia/tools/install_dependencies.sh36
-rwxr-xr-xchromium/third_party/skia/tools/jsondiff.py201
-rw-r--r--chromium/third_party/skia/tools/lsan.supp16
-rwxr-xr-xchromium/third_party/skia/tools/lua/agg_dash.lua29
-rw-r--r--chromium/third_party/skia/tools/lua/bbh_filter.lua148
-rw-r--r--chromium/third_party/skia/tools/lua/bitmap_statistics.lua59
-rw-r--r--chromium/third_party/skia/tools/lua/chars-vs-glyphs.lua35
-rw-r--r--chromium/third_party/skia/tools/lua/classify_rrect_clips.lua109
-rw-r--r--chromium/third_party/skia/tools/lua/count_effects.lua45
-rw-r--r--chromium/third_party/skia/tools/lua/count_reduced_clipstacks.lua87
-rw-r--r--chromium/third_party/skia/tools/lua/dump_clipstack_at_restore.lua33
-rw-r--r--chromium/third_party/skia/tools/lua/dumpops.lua34
-rw-r--r--chromium/third_party/skia/tools/lua/glyph-usage.lua157
-rw-r--r--chromium/third_party/skia/tools/lua/gradients.lua34
-rw-r--r--chromium/third_party/skia/tools/lua/lua_app.cpp63
-rw-r--r--chromium/third_party/skia/tools/lua/lua_pictures.cpp176
-rw-r--r--chromium/third_party/skia/tools/lua/scrape.lua80
-rw-r--r--chromium/third_party/skia/tools/lua/scrape_dashing.lua93
-rwxr-xr-xchromium/third_party/skia/tools/lua/scrape_dashing_full.lua146
-rw-r--r--chromium/third_party/skia/tools/lua/skia.lua91
-rwxr-xr-xchromium/third_party/skia/tools/merge_static_libs.py66
-rw-r--r--chromium/third_party/skia/tools/misc_utils.py224
-rw-r--r--chromium/third_party/skia/tools/pathops_sorter.htm2202
-rw-r--r--chromium/third_party/skia/tools/pathops_visualizer.htm3330
-rw-r--r--chromium/third_party/skia/tools/picture_utils.cpp72
-rw-r--r--chromium/third_party/skia/tools/picture_utils.h56
-rw-r--r--chromium/third_party/skia/tools/pinspect.cpp89
-rw-r--r--chromium/third_party/skia/tools/pyutils/__init__.py0
-rwxr-xr-xchromium/third_party/skia/tools/pyutils/gs_utils.py81
-rwxr-xr-xchromium/third_party/skia/tools/pyutils/url_utils.py63
-rwxr-xr-xchromium/third_party/skia/tools/pyutils/url_utils_test.py61
-rwxr-xr-xchromium/third_party/skia/tools/reformat-json.py55
-rw-r--r--chromium/third_party/skia/tools/render_pdfs_main.cpp302
-rw-r--r--chromium/third_party/skia/tools/render_pictures_main.cpp503
-rw-r--r--chromium/third_party/skia/tools/retrieve_from_googlesource.py37
-rwxr-xr-xchromium/third_party/skia/tools/roll_deps.py543
-rwxr-xr-xchromium/third_party/skia/tools/sanitize_source_files.py152
-rw-r--r--chromium/third_party/skia/tools/sk_tool_utils.cpp32
-rw-r--r--chromium/third_party/skia/tools/sk_tool_utils.h25
-rw-r--r--chromium/third_party/skia/tools/skdiff.cpp228
-rw-r--r--chromium/third_party/skia/tools/skdiff.h272
-rw-r--r--chromium/third_party/skia/tools/skdiff_html.cpp313
-rw-r--r--chromium/third_party/skia/tools/skdiff_html.h21
-rw-r--r--chromium/third_party/skia/tools/skdiff_image.cpp377
-rw-r--r--chromium/third_party/skia/tools/skdiff_main.cpp803
-rw-r--r--chromium/third_party/skia/tools/skdiff_utils.cpp184
-rw-r--r--chromium/third_party/skia/tools/skdiff_utils.h53
-rw-r--r--chromium/third_party/skia/tools/skhello.cpp110
-rw-r--r--chromium/third_party/skia/tools/skimage_main.cpp842
-rw-r--r--chromium/third_party/skia/tools/skpdiff/README12
-rw-r--r--chromium/third_party/skia/tools/skpdiff/SkCLImageDiffer.cpp122
-rw-r--r--chromium/third_party/skia/tools/skpdiff/SkCLImageDiffer.h97
-rw-r--r--chromium/third_party/skia/tools/skpdiff/SkDiffContext.cpp360
-rw-r--r--chromium/third_party/skia/tools/skpdiff/SkDiffContext.h143
-rw-r--r--chromium/third_party/skia/tools/skpdiff/SkDifferentPixelsMetric.h49
-rw-r--r--chromium/third_party/skia/tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp67
-rw-r--r--chromium/third_party/skia/tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp120
-rw-r--r--chromium/third_party/skia/tools/skpdiff/SkImageDiffer.cpp19
-rw-r--r--chromium/third_party/skia/tools/skpdiff/SkImageDiffer.h53
-rw-r--r--chromium/third_party/skia/tools/skpdiff/SkPMetric.cpp466
-rw-r--r--chromium/third_party/skia/tools/skpdiff/SkPMetric.h30
-rw-r--r--chromium/third_party/skia/tools/skpdiff/SkPMetricUtil_generated.h2586
-rw-r--r--chromium/third_party/skia/tools/skpdiff/diff_viewer.js306
-rwxr-xr-xchromium/third_party/skia/tools/skpdiff/generate_pmetric_tables.py149
-rw-r--r--chromium/third_party/skia/tools/skpdiff/skpdiff_main.cpp236
-rwxr-xr-xchromium/third_party/skia/tools/skpdiff/skpdiff_server.py580
-rw-r--r--chromium/third_party/skia/tools/skpdiff/skpdiff_util.cpp206
-rw-r--r--chromium/third_party/skia/tools/skpdiff/skpdiff_util.h60
-rw-r--r--chromium/third_party/skia/tools/skpdiff/viewer.html81
-rw-r--r--chromium/third_party/skia/tools/skpdiff/viewer_style.css173
-rw-r--r--chromium/third_party/skia/tools/skpinfo.cpp162
-rw-r--r--chromium/third_party/skia/tools/skpmaker.cpp85
-rwxr-xr-xchromium/third_party/skia/tools/submit_try294
-rw-r--r--chromium/third_party/skia/tools/submit_try.bat1
-rw-r--r--chromium/third_party/skia/tools/svn.py195
-rwxr-xr-xchromium/third_party/skia/tools/svndiff.py336
-rwxr-xr-xchromium/third_party/skia/tools/test_all.py32
-rwxr-xr-xchromium/third_party/skia/tools/test_gpuveto.py168
-rw-r--r--chromium/third_party/skia/tools/test_image_decoder.cpp39
-rw-r--r--chromium/third_party/skia/tools/test_pdfs.py60
-rw-r--r--chromium/third_party/skia/tools/tsan.supp27
-rw-r--r--chromium/third_party/skia/tools/valgrind.supp202
-rw-r--r--chromium/third_party/skia/tools/win_dbghelp.cpp243
-rw-r--r--chromium/third_party/skia/tools/win_dbghelp.h35
-rw-r--r--chromium/third_party/skia/tools/win_lcid.cpp31
-rwxr-xr-xchromium/third_party/skia/tools/xsan_build31
-rw-r--r--chromium/third_party/skia/trybots_to_run/chrome/README.txt8
-rw-r--r--chromium/third_party/skia/trybots_to_run/chrome/depsroll1
-rw-r--r--chromium/third_party/skia/trybots_to_run/chrome/layout1
-rw-r--r--chromium/third_party/skia/whitespace.txt234
-rw-r--r--chromium/third_party/smhasher/BUILD.gn35
-rw-r--r--chromium/third_party/smhasher/src/City.h11
-rw-r--r--chromium/third_party/smhasher/src/MurmurHash1.h4
-rw-r--r--chromium/third_party/smhasher/src/MurmurHash2.h4
-rw-r--r--chromium/third_party/smhasher/src/MurmurHash3.cpp66
-rw-r--r--chromium/third_party/smhasher/src/MurmurHash3.h4
-rw-r--r--chromium/third_party/smhasher/src/pstdint.h32
-rw-r--r--chromium/third_party/snappy/BUILD.gn46
-rw-r--r--chromium/third_party/snappy/linux/config.h135
-rw-r--r--chromium/third_party/snappy/snappy.gyp51
-rw-r--r--chromium/third_party/snappy/win32/snappy-stubs-public.h1
-rw-r--r--chromium/third_party/speex/BUILD.gn96
-rw-r--r--chromium/third_party/sqlite/BUILD.gn117
-rw-r--r--chromium/third_party/sqlite/README.chromium7
-rw-r--r--chromium/third_party/sqlite/amalgamation/sqlite3.c228
-rw-r--r--chromium/third_party/sqlite/amalgamation/sqlite3.h15
-rw-r--r--chromium/third_party/sqlite/preload-cache.patch280
-rw-r--r--chromium/third_party/sqlite/src/src/build.c30
-rw-r--r--chromium/third_party/sqlite/src/src/pager.c172
-rw-r--r--chromium/third_party/sqlite/src/src/pager.h2
-rw-r--r--chromium/third_party/sqlite/src/src/pcache.c2
-rw-r--r--chromium/third_party/sqlite/src/src/pcache.h2
-rw-r--r--chromium/third_party/sqlite/src/src/recover.c7
-rw-r--r--chromium/third_party/sqlite/src/src/sqlite.h.in15
-rw-r--r--chromium/third_party/swiftshader/README.chromium1
-rw-r--r--chromium/third_party/swiftshader/required.html1
-rwxr-xr-xchromium/third_party/tcmalloc/PRESUBMIT.py8
-rw-r--r--chromium/third_party/tcmalloc/README.chromium6
-rw-r--r--chromium/third_party/tcmalloc/chromium/src/base/atomicops-internals-windows.h16
-rw-r--r--chromium/third_party/tcmalloc/chromium/src/base/commandlineflags.h23
-rw-r--r--chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h2
-rw-r--r--chromium/third_party/tcmalloc/chromium/src/base/logging.h36
-rw-r--r--chromium/third_party/tcmalloc/chromium/src/debugallocation.cc8
-rw-r--r--chromium/third_party/tcmalloc/chromium/src/deep-heap-profile.cc15
-rw-r--r--chromium/third_party/tcmalloc/chromium/src/gperftools/malloc_extension.h5
-rw-r--r--chromium/third_party/tcmalloc/chromium/src/heap-profile-table.cc2
-rw-r--r--chromium/third_party/tcmalloc/chromium/src/heap-profiler.cc7
-rw-r--r--chromium/third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h6
-rw-r--r--chromium/third_party/tcmalloc/chromium/src/malloc_extension.cc12
-rw-r--r--chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h2
-rw-r--r--chromium/third_party/tcmalloc/chromium/src/symbolize.cc9
-rw-r--r--chromium/third_party/tcmalloc/chromium/src/system-alloc.cc2
-rw-r--r--chromium/third_party/tcmalloc/chromium/src/tcmalloc.cc17
-rw-r--r--chromium/third_party/tlslite/LICENSE68
-rw-r--r--chromium/third_party/tlslite/MANIFEST.in6
-rw-r--r--chromium/third_party/tlslite/Makefile24
-rw-r--r--chromium/third_party/tlslite/PKG-INFO10
-rw-r--r--chromium/third_party/tlslite/README653
-rw-r--r--chromium/third_party/tlslite/README.chromium52
-rw-r--r--chromium/third_party/tlslite/make_release.py61
-rw-r--r--chromium/third_party/tlslite/patches/ca_request.patch176
-rw-r--r--chromium/third_party/tlslite/patches/channel_id.patch294
-rw-r--r--chromium/third_party/tlslite/patches/client_cipher_preferences.patch18
-rw-r--r--chromium/third_party/tlslite/patches/close_notify.patch16
-rw-r--r--chromium/third_party/tlslite/patches/dhe_rsa.patch417
-rw-r--r--chromium/third_party/tlslite/patches/fallback_scsv.patch180
-rw-r--r--chromium/third_party/tlslite/patches/fix_test_file.patch8
-rw-r--r--chromium/third_party/tlslite/patches/ignore_write_failure.patch15
-rw-r--r--chromium/third_party/tlslite/patches/parse_chain.patch89
-rw-r--r--chromium/third_party/tlslite/patches/pycrypto_python2.patch51
-rw-r--r--chromium/third_party/tlslite/patches/python26.patch95
-rw-r--r--chromium/third_party/tlslite/patches/req_cert_types.patch153
-rw-r--r--chromium/third_party/tlslite/patches/send_certificate_types.patch32
-rw-r--r--chromium/third_party/tlslite/patches/signed_certificate_timestamps.patch217
-rw-r--r--chromium/third_party/tlslite/patches/srp_cert.patch13
-rw-r--r--chromium/third_party/tlslite/patches/ssl3_padding.patch18
-rw-r--r--chromium/third_party/tlslite/patches/status_request.patch274
-rw-r--r--chromium/third_party/tlslite/patches/tls_intolerant.patch105
-rw-r--r--chromium/third_party/tlslite/readme.txt815
-rwxr-xr-x[-rw-r--r--]chromium/third_party/tlslite/scripts/tls.py1324
-rwxr-xr-x[-rw-r--r--]chromium/third_party/tlslite/scripts/tlsdb.py166
-rwxr-xr-x[-rw-r--r--]chromium/third_party/tlslite/setup.py26
-rw-r--r--chromium/third_party/tlslite/tlslite/BaseDB.py120
-rw-r--r--chromium/third_party/tlslite/tlslite/Checker.py146
-rw-r--r--chromium/third_party/tlslite/tlslite/FileObject.py220
-rw-r--r--chromium/third_party/tlslite/tlslite/HandshakeSettings.py159
-rw-r--r--chromium/third_party/tlslite/tlslite/Session.py131
-rw-r--r--chromium/third_party/tlslite/tlslite/SessionCache.py103
-rw-r--r--chromium/third_party/tlslite/tlslite/SharedKeyDB.py58
-rw-r--r--chromium/third_party/tlslite/tlslite/TLSConnection.py1698
-rw-r--r--chromium/third_party/tlslite/tlslite/TLSRecordLayer.py1150
-rw-r--r--chromium/third_party/tlslite/tlslite/VerifierDB.py90
-rw-r--r--chromium/third_party/tlslite/tlslite/X509.py142
-rw-r--r--chromium/third_party/tlslite/tlslite/X509CertChain.py242
-rw-r--r--chromium/third_party/tlslite/tlslite/__init__.py53
-rw-r--r--chromium/third_party/tlslite/tlslite/api.py103
-rw-r--r--chromium/third_party/tlslite/tlslite/basedb.py130
-rw-r--r--chromium/third_party/tlslite/tlslite/checker.py77
-rw-r--r--chromium/third_party/tlslite/tlslite/constants.py289
-rw-r--r--chromium/third_party/tlslite/tlslite/errors.py33
-rw-r--r--chromium/third_party/tlslite/tlslite/handshakesettings.py186
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/AsyncStateMachine.py235
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/ClientHelper.py163
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/HTTPTLSConnection.py169
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/IMAP4_TLS.py132
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/IntegrationHelper.py52
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/POP3_TLS.py142
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/SMTP_TLS.py114
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/TLSAsyncDispatcherMixIn.py139
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/TLSSocketServerMixIn.py59
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/TLSTwistedProtocolWrapper.py196
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/XMLRPCTransport.py137
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/__init__.py26
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/asyncstatemachine.py238
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/clienthelper.py122
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/httptlsconnection.py112
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/imap4_tls.py96
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/pop3_tls.py84
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/smtp_tls.py78
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/tlsasyncdispatchermixin.py145
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/tlssocketservermixin.py62
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/xmlrpcserver.py55
-rw-r--r--chromium/third_party/tlslite/tlslite/integration/xmlrpctransport.py133
-rw-r--r--chromium/third_party/tlslite/tlslite/mathtls.py177
-rw-r--r--chromium/third_party/tlslite/tlslite/messages.py516
-rw-r--r--chromium/third_party/tlslite/tlslite/session.py126
-rw-r--r--chromium/third_party/tlslite/tlslite/sessioncache.py109
-rw-r--r--chromium/third_party/tlslite/tlslite/tlsconnection.py1934
-rw-r--r--chromium/third_party/tlslite/tlslite/tlsrecordlayer.py1153
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/AES.py31
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/ASN1Parser.py37
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/Cryptlib_AES.py34
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/Cryptlib_RC4.py28
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/Cryptlib_TripleDES.py35
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/OpenSSL_AES.py49
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/OpenSSL_RC4.py25
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/OpenSSL_RSAKey.py148
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/OpenSSL_TripleDES.py44
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/PyCrypto_AES.py22
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/PyCrypto_RC4.py22
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/PyCrypto_RSAKey.py61
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/PyCrypto_TripleDES.py22
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/Python_AES.py68
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/Python_RC4.py39
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/Python_RSAKey.py209
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/RC4.py17
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/RSAKey.py264
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/TripleDES.py26
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/__init__.py46
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/aes.py34
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/asn1parser.py42
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/cipherfactory.py61
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/codec.py49
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/compat.py222
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/cryptomath.py303
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/dateFuncs.py75
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/datefuncs.py77
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/entropy.c173
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/hmac.py104
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/jython_compat.py195
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/keyfactory.py90
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/openssl_aes.py52
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/openssl_rc4.py28
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/openssl_rsakey.py136
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/openssl_tripledes.py47
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/pem.py98
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/pycrypto_aes.py29
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/pycrypto_rc4.py28
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/pycrypto_rsakey.py44
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/pycrypto_tripledes.py29
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/python_aes.py69
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/python_rc4.py41
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/python_rsakey.py138
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/rc4.py19
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/rijndael.py146
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/rsakey.py258
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/tackwrapper.py11
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/tripledes.py27
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/win32prng.c63
-rw-r--r--chromium/third_party/tlslite/tlslite/utils/xmltools.py201
-rw-r--r--chromium/third_party/tlslite/tlslite/verifierdb.py95
-rw-r--r--chromium/third_party/tlslite/tlslite/x509.py110
-rw-r--r--chromium/third_party/tlslite/tlslite/x509certchain.py91
-rw-r--r--chromium/third_party/trace-viewer/build/__init__.py5
-rw-r--r--chromium/third_party/trace-viewer/build/check_grit.py53
-rw-r--r--chromium/third_party/trace-viewer/build/check_gyp.py49
-rwxr-xr-xchromium/third_party/trace-viewer/build/fixjsstyle14
-rw-r--r--chromium/third_party/trace-viewer/build/generate.py182
-rwxr-xr-xchromium/third_party/trace-viewer/build/generate_about_tracing_contents.py105
-rwxr-xr-xchromium/third_party/trace-viewer/build/generate_standalone_timeline_view.py56
-rwxr-xr-xchromium/third_party/trace-viewer/build/gjslint25
-rw-r--r--chromium/third_party/trace-viewer/build/parse_deps.py486
-rwxr-xr-xchromium/third_party/trace-viewer/build/parse_deps_test.py305
-rw-r--r--chromium/third_party/trace-viewer/examples/multi_timeline.html121
-rw-r--r--chromium/third_party/trace-viewer/examples/skia_debugger.html155
-rw-r--r--chromium/third_party/trace-viewer/examples/stream_trace_viewer.html62
-rw-r--r--chromium/third_party/trace-viewer/examples/trace_viewer.html176
-rw-r--r--chromium/third_party/trace-viewer/src/about_tracing.css19
-rw-r--r--chromium/third_party/trace-viewer/src/about_tracing.js19
-rw-r--r--chromium/third_party/trace-viewer/src/about_tracing/begin_recording.js165
-rw-r--r--chromium/third_party/trace-viewer/src/about_tracing/begin_recording_test.js58
-rw-r--r--chromium/third_party/trace-viewer/src/about_tracing/mock_request_handler.js61
-rw-r--r--chromium/third_party/trace-viewer/src/about_tracing/profiling_view.html31
-rw-r--r--chromium/third_party/trace-viewer/src/about_tracing/profiling_view.js274
-rw-r--r--chromium/third_party/trace-viewer/src/about_tracing/profiling_view_test.js57
-rw-r--r--chromium/third_party/trace-viewer/src/base.js402
-rw-r--r--chromium/third_party/trace-viewer/src/base/bbox2.js153
-rw-r--r--chromium/third_party/trace-viewer/src/base/bbox2_test.js28
-rw-r--r--chromium/third_party/trace-viewer/src/base/color.js118
-rw-r--r--chromium/third_party/trace-viewer/src/base/color_test.js62
-rw-r--r--chromium/third_party/trace-viewer/src/base/event_target.js144
-rw-r--r--chromium/third_party/trace-viewer/src/base/event_target_test.js33
-rw-r--r--chromium/third_party/trace-viewer/src/base/events.js52
-rw-r--r--chromium/third_party/trace-viewer/src/base/gl_matrix.js79
-rw-r--r--chromium/third_party/trace-viewer/src/base/guid.js19
-rw-r--r--chromium/third_party/trace-viewer/src/base/interval_tree.js352
-rw-r--r--chromium/third_party/trace-viewer/src/base/interval_tree_test.js216
-rw-r--r--chromium/third_party/trace-viewer/src/base/iteration_helpers.js116
-rw-r--r--chromium/third_party/trace-viewer/src/base/iteration_helpers_test.js50
-rw-r--r--chromium/third_party/trace-viewer/src/base/key_event_manager.js163
-rw-r--r--chromium/third_party/trace-viewer/src/base/key_event_manager_test.js127
-rw-r--r--chromium/third_party/trace-viewer/src/base/measuring_stick.js64
-rw-r--r--chromium/third_party/trace-viewer/src/base/promise.js14
-rw-r--r--chromium/third_party/trace-viewer/src/base/properties.js211
-rw-r--r--chromium/third_party/trace-viewer/src/base/properties_test.js55
-rw-r--r--chromium/third_party/trace-viewer/src/base/quad.js228
-rw-r--r--chromium/third_party/trace-viewer/src/base/quad_test.js112
-rw-r--r--chromium/third_party/trace-viewer/src/base/raf.js151
-rw-r--r--chromium/third_party/trace-viewer/src/base/raf_test.js122
-rw-r--r--chromium/third_party/trace-viewer/src/base/range.js98
-rw-r--r--chromium/third_party/trace-viewer/src/base/range_test.js58
-rw-r--r--chromium/third_party/trace-viewer/src/base/rect.js161
-rw-r--r--chromium/third_party/trace-viewer/src/base/rect_test.js18
-rw-r--r--chromium/third_party/trace-viewer/src/base/settings.js133
-rw-r--r--chromium/third_party/trace-viewer/src/base/settings_test.js113
-rw-r--r--chromium/third_party/trace-viewer/src/base/sorted_array_utils.js259
-rw-r--r--chromium/third_party/trace-viewer/src/base/sorted_array_utils_test.js204
-rw-r--r--chromium/third_party/trace-viewer/src/base/unittest.css133
-rw-r--r--chromium/third_party/trace-viewer/src/base/unittest.js696
-rw-r--r--chromium/third_party/trace-viewer/src/base/unittest/assertions.js259
-rw-r--r--chromium/third_party/trace-viewer/src/base/unittest/assertions_test.js289
-rw-r--r--chromium/third_party/trace-viewer/src/base/unittest/test_error.js22
-rw-r--r--chromium/third_party/trace-viewer/src/base/unittest_test.js69
-rw-r--r--chromium/third_party/trace-viewer/src/base/utils.js110
-rw-r--r--chromium/third_party/trace-viewer/src/base/utils_test.js17
-rw-r--r--chromium/third_party/trace-viewer/src/cc.js17
-rw-r--r--chromium/third_party/trace-viewer/src/cc/constants.js18
-rw-r--r--chromium/third_party/trace-viewer/src/cc/debug_colors.js75
-rw-r--r--chromium/third_party/trace-viewer/src/cc/layer_impl.js163
-rw-r--r--chromium/third_party/trace-viewer/src/cc/layer_picker.css43
-rw-r--r--chromium/third_party/trace-viewer/src/cc/layer_picker.js290
-rw-r--r--chromium/third_party/trace-viewer/src/cc/layer_tree_host_impl.js133
-rw-r--r--chromium/third_party/trace-viewer/src/cc/layer_tree_host_impl_test.js22
-rw-r--r--chromium/third_party/trace-viewer/src/cc/layer_tree_host_impl_test_data.js228
-rw-r--r--chromium/third_party/trace-viewer/src/cc/layer_tree_host_impl_view.css18
-rw-r--r--chromium/third_party/trace-viewer/src/cc/layer_tree_host_impl_view.js109
-rw-r--r--chromium/third_party/trace-viewer/src/cc/layer_tree_host_impl_view_test.js28
-rw-r--r--chromium/third_party/trace-viewer/src/cc/layer_tree_impl.js68
-rw-r--r--chromium/third_party/trace-viewer/src/cc/layer_tree_quad_stack_view.css22
-rw-r--r--chromium/third_party/trace-viewer/src/cc/layer_tree_quad_stack_view.js852
-rw-r--r--chromium/third_party/trace-viewer/src/cc/layer_tree_quad_stack_view_test.js41
-rw-r--r--chromium/third_party/trace-viewer/src/cc/layer_view.css32
-rw-r--r--chromium/third_party/trace-viewer/src/cc/layer_view.js126
-rw-r--r--chromium/third_party/trace-viewer/src/cc/layer_view_test.js47
-rw-r--r--chromium/third_party/trace-viewer/src/cc/picture.js415
-rw-r--r--chromium/third_party/trace-viewer/src/cc/picture_as_image_data.js66
-rw-r--r--chromium/third_party/trace-viewer/src/cc/picture_debugger.css66
-rw-r--r--chromium/third_party/trace-viewer/src/cc/picture_debugger.html24
-rw-r--r--chromium/third_party/trace-viewer/src/cc/picture_debugger.js393
-rw-r--r--chromium/third_party/trace-viewer/src/cc/picture_debugger_test.js27
-rw-r--r--chromium/third_party/trace-viewer/src/cc/picture_ops_chart_summary_view.css18
-rw-r--r--chromium/third_party/trace-viewer/src/cc/picture_ops_chart_summary_view.js464
-rw-r--r--chromium/third_party/trace-viewer/src/cc/picture_ops_chart_view.css18
-rw-r--r--chromium/third_party/trace-viewer/src/cc/picture_ops_chart_view.js493
-rw-r--r--chromium/third_party/trace-viewer/src/cc/picture_ops_list_view.css56
-rw-r--r--chromium/third_party/trace-viewer/src/cc/picture_ops_list_view.js229
-rw-r--r--chromium/third_party/trace-viewer/src/cc/picture_ops_list_view_test.js50
-rw-r--r--chromium/third_party/trace-viewer/src/cc/picture_test.js41
-rw-r--r--chromium/third_party/trace-viewer/src/cc/picture_view.css9
-rw-r--r--chromium/third_party/trace-viewer/src/cc/picture_view.js49
-rw-r--r--chromium/third_party/trace-viewer/src/cc/picture_view_test_data.js34
-rw-r--r--chromium/third_party/trace-viewer/src/cc/raster_task_slice_view.css12
-rw-r--r--chromium/third_party/trace-viewer/src/cc/raster_task_slice_view.js77
-rw-r--r--chromium/third_party/trace-viewer/src/cc/raster_task_slice_view_test.js26
-rw-r--r--chromium/third_party/trace-viewer/src/cc/region.js55
-rw-r--r--chromium/third_party/trace-viewer/src/cc/render_pass.js40
-rw-r--r--chromium/third_party/trace-viewer/src/cc/selection.js327
-rw-r--r--chromium/third_party/trace-viewer/src/cc/tile.js89
-rw-r--r--chromium/third_party/trace-viewer/src/cc/tile_coverage_rect.js22
-rw-r--r--chromium/third_party/trace-viewer/src/cc/tile_test.js22
-rw-r--r--chromium/third_party/trace-viewer/src/cc/tile_view.js51
-rw-r--r--chromium/third_party/trace-viewer/src/cc/util.js143
-rw-r--r--chromium/third_party/trace-viewer/src/cc/util_test.js108
-rw-r--r--chromium/third_party/trace-viewer/src/gpu.js13
-rw-r--r--chromium/third_party/trace-viewer/src/gpu/state.js45
-rw-r--r--chromium/third_party/trace-viewer/src/gpu/state_test.js26
-rw-r--r--chromium/third_party/trace-viewer/src/gpu/state_test_data.js22
-rw-r--r--chromium/third_party/trace-viewer/src/gpu/state_view.css15
-rw-r--r--chromium/third_party/trace-viewer/src/gpu/state_view.js46
-rw-r--r--chromium/third_party/trace-viewer/src/images/checkerboard.pngbin245 -> 0 bytes
-rw-r--r--chromium/third_party/trace-viewer/src/images/chrome-left.pngbin14088 -> 0 bytes
-rw-r--r--chromium/third_party/trace-viewer/src/images/chrome-mid.pngbin382 -> 0 bytes
-rw-r--r--chromium/third_party/trace-viewer/src/images/chrome-right.pngbin3264 -> 0 bytes
-rw-r--r--chromium/third_party/trace-viewer/src/images/collapse.pngbin207 -> 0 bytes
-rw-r--r--chromium/third_party/trace-viewer/src/images/expand.pngbin1241 -> 0 bytes
-rw-r--r--chromium/third_party/trace-viewer/src/images/ui-states.pngbin4097 -> 0 bytes
-rw-r--r--chromium/third_party/trace-viewer/src/system_stats.js13
-rw-r--r--chromium/third_party/trace-viewer/src/system_stats/system_stats_instance_track.css15
-rw-r--r--chromium/third_party/trace-viewer/src/system_stats/system_stats_instance_track.js353
-rw-r--r--chromium/third_party/trace-viewer/src/system_stats/system_stats_instance_track_test.js65
-rw-r--r--chromium/third_party/trace-viewer/src/system_stats/system_stats_snapshot.js53
-rw-r--r--chromium/third_party/trace-viewer/src/system_stats/system_stats_snapshot_view.css28
-rw-r--r--chromium/third_party/trace-viewer/src/system_stats/system_stats_snapshot_view.js81
-rw-r--r--chromium/third_party/trace-viewer/src/tcmalloc.js13
-rw-r--r--chromium/third_party/trace-viewer/src/tcmalloc/heap.js93
-rw-r--r--chromium/third_party/trace-viewer/src/tcmalloc/heap_instance_track.css15
-rw-r--r--chromium/third_party/trace-viewer/src/tcmalloc/heap_instance_track.js172
-rw-r--r--chromium/third_party/trace-viewer/src/tcmalloc/heap_test.js107
-rw-r--r--chromium/third_party/trace-viewer/src/tcmalloc/tcmalloc_instance_view.css37
-rw-r--r--chromium/third_party/trace-viewer/src/tcmalloc/tcmalloc_instance_view.js109
-rw-r--r--chromium/third_party/trace-viewer/src/tcmalloc/tcmalloc_snapshot_view.css59
-rw-r--r--chromium/third_party/trace-viewer/src/tcmalloc/tcmalloc_snapshot_view.js175
-rw-r--r--chromium/third_party/trace-viewer/src/tests.html178
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/analysis_link.css14
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/analysis_link.js100
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/analysis_results.css72
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/analysis_results.js365
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/analysis_results_test.js71
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/analysis_view.css19
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/analysis_view.js165
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/analysis_view_test.js170
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/analyze_counters.js78
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/analyze_counters_test.js177
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/analyze_selection.js117
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/analyze_slices.css9
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/analyze_slices.js212
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/analyze_slices_test.js236
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/cpu_slice_view.html28
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/cpu_slice_view.js72
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/cpu_slice_view_test.js67
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/default_object_view.css33
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/default_object_view.js121
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/default_object_view_test.js34
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/generic_object_view.css13
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/generic_object_view.js211
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/generic_object_view_test.js112
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/object_instance_view.js74
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/object_snapshot_view.js73
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/slice_view.js73
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/stub_analysis_results.js100
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/stub_analysis_table.js43
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/thread_time_slice_view.html38
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/thread_time_slice_view.js104
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/thread_time_slice_view_test.js82
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/analysis/util.js21
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/color_scheme.js230
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/constants.js17
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/draw_helpers.js283
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/elided_cache.js109
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/fast_rect_renderer.js127
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/filter.js82
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/filter_test.js57
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/find_control.html56
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/find_control.js214
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/find_control_test.js210
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer.js12
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/gzip_importer.js135
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/gzip_importer_test.js58
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/importer.js50
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/android_parser.js221
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/android_parser_test.js196
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/bus_parser.js83
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/bus_parser_test.js60
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/clock_parser.js63
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/clock_parser_test.js52
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/cpufreq_parser.js105
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/cpufreq_parser_test.js162
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/disk_parser.js181
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/disk_parser_test.js74
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/drm_parser.js62
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/drm_parser_test.js26
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/exynos_parser.js119
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/exynos_parser_test.js118
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/gesture_parser.js137
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/gesture_parser_test.js201
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/i915_parser.js337
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/i915_parser_test.js84
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/kfunc_parser.js106
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/kfunc_parser_test.js52
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/mali_parser.js560
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/mali_parser_test.js475
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/parser.js99
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/power_parser.js141
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/power_parser_test.js81
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/sched_parser.js84
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/sched_parser_test.js159
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/sync_parser.js127
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/sync_parser_test.js48
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/workqueue_parser.js95
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf/workqueue_parser_test.js28
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf_importer.js797
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/linux_perf_importer_test.js361
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/task.js129
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/task_test.js77
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/timeline_stream_importer.js250
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/timeline_stream_importer_test.js332
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/trace_event_importer.js964
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/trace_event_importer_perf_test.js47
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/trace_event_importer_test.js1554
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/v8/codemap.js282
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/v8/log_reader.js219
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/v8/splaytree.js316
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/v8_log_importer.js233
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/v8_log_importer_test.js81
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/importer/zip_importer.js61
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/record_selection_dialog.html70
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/record_selection_dialog.js272
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/record_selection_dialog_test.js152
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/selection.js179
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/selection_test.js63
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/standalone_timeline_view.js9
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/test_utils.js83
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/timeline_display_transform.js113
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/timeline_display_transform_animations.js171
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/timeline_display_transform_animations_test.js61
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/timeline_display_transform_test.js34
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/timeline_track_view.css39
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/timeline_track_view.js966
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/timeline_track_view_test.js245
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/timeline_view.css183
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/timeline_view.html161
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/timeline_view.js340
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/timeline_view_test.js130
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/timeline_viewport.js569
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/timeline_viewport_test.js28
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/timing_tool.js339
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model.js507
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/async_slice.js55
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/async_slice_group.js101
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/async_slice_group_test.js79
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/counter.js192
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/counter_sample.js91
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/counter_sample_test.js43
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/counter_series.js120
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/counter_test.js103
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/cpu.js257
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/cpu_test.js133
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/event.js49
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/flow_event.js38
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/instant_event.js72
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/kernel.js98
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/object_collection.js199
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/object_collection_test.js153
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/object_instance.js176
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/object_instance_test.js64
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/object_snapshot.js79
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/object_snapshot_test.js32
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/process.js108
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/process_base.js216
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/process_test.js87
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/sample.js35
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/slice.js50
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/slice_group.js435
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/slice_group_test.js613
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/thread.js327
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/thread_test.js90
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/time_to_object_instance_map.js188
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/time_to_object_instance_map_test.js159
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model/timed_event.js50
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model_settings.js124
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model_settings_test.js174
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/trace_model_test.js266
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/async_slice_group_track.js88
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/async_slice_group_track_test.js138
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/container_track.js104
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/counter_track.css9
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/counter_track.js276
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/counter_track_test.js181
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/cpu_track.js77
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/cpu_track_test.js40
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/drawing_container.css19
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/drawing_container.js171
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/drawing_container_perf_test.js76
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/heading_track.css26
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/heading_track.js54
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/kernel_track.js62
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/object_instance_track.css8
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/object_instance_track.js282
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/object_instance_track_test.js100
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/process_track.js128
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/process_track_base.css28
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/process_track_base.js238
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/ruler_track.css12
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/ruler_track.js357
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/ruler_track_test.js29
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/slice_group_track.js227
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/slice_group_track_test.js211
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/slice_track.css8
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/slice_track.js184
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/slice_track_test.js366
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/spacing_track.css7
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/spacing_track.js35
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/stacked_bars_track.css8
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/stacked_bars_track.js112
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/thread_track.css10
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/thread_track.js109
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/thread_track_test.js90
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/trace_model_track.css7
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/trace_model_track.js276
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/track.css33
-rw-r--r--chromium/third_party/trace-viewer/src/tracing/tracks/track.js141
-rw-r--r--chromium/third_party/trace-viewer/src/ui.js158
-rw-r--r--chromium/third_party/trace-viewer/src/ui/animation.js74
-rw-r--r--chromium/third_party/trace-viewer/src/ui/animation_controller.js137
-rw-r--r--chromium/third_party/trace-viewer/src/ui/animation_controller_test.js163
-rw-r--r--chromium/third_party/trace-viewer/src/ui/camera.js341
-rw-r--r--chromium/third_party/trace-viewer/src/ui/camera_test.js58
-rw-r--r--chromium/third_party/trace-viewer/src/ui/container_that_decorates_its_children.js102
-rw-r--r--chromium/third_party/trace-viewer/src/ui/container_that_decorates_its_children_test.js94
-rw-r--r--chromium/third_party/trace-viewer/src/ui/dom_helpers.js155
-rw-r--r--chromium/third_party/trace-viewer/src/ui/dom_helpers_test.js112
-rw-r--r--chromium/third_party/trace-viewer/src/ui/drag_handle.css36
-rw-r--r--chromium/third_party/trace-viewer/src/ui/drag_handle.js159
-rw-r--r--chromium/third_party/trace-viewer/src/ui/drag_handle_test.js91
-rw-r--r--chromium/third_party/trace-viewer/src/ui/info_bar.css33
-rw-r--r--chromium/third_party/trace-viewer/src/ui/info_bar.js114
-rw-r--r--chromium/third_party/trace-viewer/src/ui/info_bar_test.js67
-rw-r--r--chromium/third_party/trace-viewer/src/ui/list_and_associated_view.css17
-rw-r--r--chromium/third_party/trace-viewer/src/ui/list_and_associated_view.js131
-rw-r--r--chromium/third_party/trace-viewer/src/ui/list_and_associated_view_test.js95
-rw-r--r--chromium/third_party/trace-viewer/src/ui/list_view.css30
-rw-r--r--chromium/third_party/trace-viewer/src/ui/list_view.js160
-rw-r--r--chromium/third_party/trace-viewer/src/ui/list_view_test.js51
-rw-r--r--chromium/third_party/trace-viewer/src/ui/mouse_mode_selector.css78
-rw-r--r--chromium/third_party/trace-viewer/src/ui/mouse_mode_selector.html11
-rw-r--r--chromium/third_party/trace-viewer/src/ui/mouse_mode_selector.js562
-rw-r--r--chromium/third_party/trace-viewer/src/ui/mouse_mode_selector_test.js40
-rw-r--r--chromium/third_party/trace-viewer/src/ui/mouse_tracker.js104
-rw-r--r--chromium/third_party/trace-viewer/src/ui/overlay.html116
-rw-r--r--chromium/third_party/trace-viewer/src/ui/overlay.js234
-rw-r--r--chromium/third_party/trace-viewer/src/ui/overlay_test.js94
-rw-r--r--chromium/third_party/trace-viewer/src/ui/quad_stack_view.css29
-rw-r--r--chromium/third_party/trace-viewer/src/ui/quad_stack_view.html12
-rw-r--r--chromium/third_party/trace-viewer/src/ui/quad_stack_view.js603
-rw-r--r--chromium/third_party/trace-viewer/src/ui/sortable_table.css8
-rw-r--r--chromium/third_party/trace-viewer/src/ui/sortable_table.js184
-rw-r--r--chromium/third_party/trace-viewer/src/ui/sortable_table_test.js233
-rw-r--r--chromium/third_party/trace-viewer/src/ui/tool_button.css17
-rw-r--r--chromium/third_party/trace-viewer/src/ui/trace_viewer.css11
-rw-r--r--chromium/third_party/trace-viewer/src/ui_test.js185
-rw-r--r--chromium/third_party/trace-viewer/test_data/android_systrace.html31671
-rw-r--r--chromium/third_party/trace-viewer/third_party/Promises/polyfill/bin/Promise.min.js1
-rw-r--r--chromium/third_party/trace-viewer/third_party/Promises/polyfill/src/Promise.js417
-rw-r--r--chromium/third_party/trace-viewer/third_party/Promises/polyfill/third_party/doh/runner.js656
-rw-r--r--chromium/third_party/trace-viewer/third_party/Promises/polyfill/third_party/doh/runner_async.js921
-rw-r--r--chromium/third_party/trace-viewer/third_party/Promises/polyfill/util/console.js49
-rw-r--r--chromium/third_party/trace-viewer/third_party/Promises/reworked_APIs/IndexedDB/example/after.html50
-rw-r--r--chromium/third_party/trace-viewer/third_party/Promises/reworked_APIs/IndexedDB/example/before.html70
-rw-r--r--chromium/third_party/trace-viewer/third_party/Promises/reworked_APIs/WebCrypto/example/after.html45
-rw-r--r--chromium/third_party/trace-viewer/third_party/Promises/reworked_APIs/WebCrypto/example/before.html52
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/dist/gl-matrix-min.js28
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/dist/gl-matrix.js3865
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/jsdoc-template/publish.js201
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/jsdoc-template/static/default.css428
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/jsdoc-template/static/header.html2
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/jsdoc-template/static/index.html19
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/spec/gl-matrix/mat2-spec.js190
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/spec/gl-matrix/mat2d-spec.js188
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/spec/gl-matrix/mat3-spec.js269
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/spec/gl-matrix/mat4-spec.js566
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/spec/gl-matrix/quat-spec.js270
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/spec/gl-matrix/vec2-spec.js506
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/spec/gl-matrix/vec3-spec.js475
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/spec/gl-matrix/vec4-spec.js448
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/spec/helpers/node-helper.js6
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/spec/helpers/spec-helper.js32
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/src/gl-matrix-manifest.js12
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/src/gl-matrix/common.js48
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/src/gl-matrix/mat2.js237
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/src/gl-matrix/mat2d.js253
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/src/gl-matrix/mat3.js429
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/src/gl-matrix/mat4.js907
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/src/gl-matrix/quat.js457
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/src/gl-matrix/vec2.js482
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/src/gl-matrix/vec3.js482
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/src/gl-matrix/vec4.js486
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/tasks/build/compile.rake5
-rw-r--r--chromium/third_party/trace-viewer/third_party/gl-matrix/tasks/build/minify.rake5
-rw-r--r--chromium/third_party/trace-viewer/third_party/jszip/960.css1
-rw-r--r--chromium/third_party/trace-viewer/third_party/jszip/examples/download-zip-file.html41
-rw-r--r--chromium/third_party/trace-viewer/third_party/jszip/examples/get-binary-files-xhr2.html91
-rw-r--r--chromium/third_party/trace-viewer/third_party/jszip/examples/read-local-file-api.html86
-rw-r--r--chromium/third_party/trace-viewer/third_party/jszip/examples/style.css6
-rw-r--r--chromium/third_party/trace-viewer/third_party/jszip/index.html681
-rw-r--r--chromium/third_party/trace-viewer/third_party/jszip/jszip-deflate.js66
-rw-r--r--chromium/third_party/trace-viewer/third_party/jszip/jszip-inflate.js58
-rw-r--r--chromium/third_party/trace-viewer/third_party/jszip/jszip-load.js712
-rw-r--r--chromium/third_party/trace-viewer/third_party/jszip/jszip.js1425
-rw-r--r--chromium/third_party/trace-viewer/third_party/pywebsocket/src/example/console.html238
-rw-r--r--chromium/third_party/trace-viewer/trace_viewer.gyp536
-rw-r--r--chromium/third_party/usrsctp/usrsctp.gyp14
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp.h17
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_bsd_addr.c9
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_constants.h19
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_crc32.c2
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_crc32.h2
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_indata.c720
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_input.c127
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_os_userspace.h39
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_output.c48
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_pcb.c241
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_pcb.h9
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_sha1.c1
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_structs.h3
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_sysctl.c19
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_sysctl.h12
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_timer.c46
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_timer.h7
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_uio.h2
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_usrreq.c83
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctp_var.h6
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctputil.c60
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/netinet/sctputil.h6
-rw-r--r--chromium/third_party/usrsctp/usrsctplib/netinet6/sctp6_usrreq.c44
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/user_environment.c2
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/user_ip6_var.h2
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/user_ip_icmp.h4
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/user_mbuf.h6
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/user_recv_thread.c14
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/user_socket.c119
-rwxr-xr-xchromium/third_party/usrsctp/usrsctplib/user_socketvar.h10
-rw-r--r--chromium/third_party/usrsctp/usrsctplib/usrsctp.h1
-rw-r--r--chromium/third_party/v4l2capture/LICENSE8
-rw-r--r--chromium/third_party/v4l2capture/OWNERS1
-rw-r--r--chromium/third_party/v4l2capture/README.chromium17
-rwxr-xr-xchromium/third_party/v4l2capture/setup.py28
-rw-r--r--chromium/third_party/v4l2capture/v4l2capture.c505
-rw-r--r--chromium/third_party/webdriver/OWNERS2
-rw-r--r--chromium/third_party/webdriver/README.chromium2
-rw-r--r--chromium/third_party/webpagereplay/README.md20
-rw-r--r--chromium/third_party/webpagereplay/customhandlers.py7
-rw-r--r--chromium/third_party/webpagereplay/dnsproxy.py14
-rw-r--r--chromium/third_party/webpagereplay/documentation/Contributing.md29
-rw-r--r--chromium/third_party/webpagereplay/documentation/GettingStarted.md169
-rw-r--r--chromium/third_party/webpagereplay/documentation/WebPageReplayDiagram.pngbin0 -> 95568 bytes
-rwxr-xr-xchromium/third_party/webpagereplay/httparchive.py177
-rwxr-xr-xchromium/third_party/webpagereplay/httparchive_test.py50
-rw-r--r--chromium/third_party/webpagereplay/httpclient.py22
-rw-r--r--chromium/third_party/webpagereplay/httpproxy.py114
-rw-r--r--chromium/third_party/webpagereplay/platformsettings.py334
-rwxr-xr-xchromium/third_party/webpagereplay/platformsettings_test.py43
-rwxr-xr-xchromium/third_party/webpagereplay/replay.py94
-rw-r--r--chromium/third_party/webpagereplay/servermanager.py21
-rw-r--r--chromium/third_party/webpagereplay/trafficshaper.py17
-rwxr-xr-xchromium/third_party/webpagereplay/trafficshaper_test.py4
-rw-r--r--chromium/third_party/webrtc/BUILD.gn174
-rw-r--r--chromium/third_party/webrtc/OWNERS6
-rw-r--r--chromium/third_party/webrtc/PRESUBMIT.py8
-rw-r--r--chromium/third_party/webrtc/base/BUILD.gn723
-rw-r--r--chromium/third_party/webrtc/base/OWNERS7
-rw-r--r--chromium/third_party/webrtc/base/asyncfile.cc21
-rw-r--r--chromium/third_party/webrtc/base/asyncfile.h40
-rw-r--r--chromium/third_party/webrtc/base/asynchttprequest.cc116
-rw-r--r--chromium/third_party/webrtc/base/asynchttprequest.h104
-rw-r--r--chromium/third_party/webrtc/base/asynchttprequest_unittest.cc233
-rw-r--r--chromium/third_party/webrtc/base/asyncinvoker-inl.h129
-rw-r--r--chromium/third_party/webrtc/base/asyncinvoker.cc91
-rw-r--r--chromium/third_party/webrtc/base/asyncinvoker.h134
-rw-r--r--chromium/third_party/webrtc/base/asyncpacketsocket.h140
-rw-r--r--chromium/third_party/webrtc/base/asyncresolverinterface.h47
-rw-r--r--chromium/third_party/webrtc/base/asyncsocket.cc44
-rw-r--r--chromium/third_party/webrtc/base/asyncsocket.h124
-rw-r--r--chromium/third_party/webrtc/base/asynctcpsocket.cc299
-rw-r--r--chromium/third_party/webrtc/base/asynctcpsocket.h100
-rw-r--r--chromium/third_party/webrtc/base/asynctcpsocket_unittest.cc53
-rw-r--r--chromium/third_party/webrtc/base/asyncudpsocket.cc122
-rw-r--r--chromium/third_party/webrtc/base/asyncudpsocket.h63
-rw-r--r--chromium/third_party/webrtc/base/asyncudpsocket_unittest.cc53
-rw-r--r--chromium/third_party/webrtc/base/atomicops.h149
-rw-r--r--chromium/third_party/webrtc/base/atomicops_unittest.cc79
-rw-r--r--chromium/third_party/webrtc/base/autodetectproxy.cc282
-rw-r--r--chromium/third_party/webrtc/base/autodetectproxy.h90
-rw-r--r--chromium/third_party/webrtc/base/autodetectproxy_unittest.cc131
-rw-r--r--chromium/third_party/webrtc/base/bandwidthsmoother.cc84
-rw-r--r--chromium/third_party/webrtc/base/bandwidthsmoother.h59
-rw-r--r--chromium/third_party/webrtc/base/bandwidthsmoother_unittest.cc116
-rw-r--r--chromium/third_party/webrtc/base/base.gyp756
-rw-r--r--chromium/third_party/webrtc/base/base64.cc260
-rw-r--r--chromium/third_party/webrtc/base/base64.h104
-rw-r--r--chromium/third_party/webrtc/base/base64_unittest.cc1001
-rw-r--r--chromium/third_party/webrtc/base/base_tests.gyp156
-rw-r--r--chromium/third_party/webrtc/base/basicdefs.h20
-rw-r--r--chromium/third_party/webrtc/base/basictypes.h134
-rw-r--r--chromium/third_party/webrtc/base/basictypes_unittest.cc75
-rw-r--r--chromium/third_party/webrtc/base/bind.h587
-rw-r--r--chromium/third_party/webrtc/base/bind.h.pump138
-rw-r--r--chromium/third_party/webrtc/base/bind_unittest.cc67
-rw-r--r--chromium/third_party/webrtc/base/buffer.h102
-rw-r--r--chromium/third_party/webrtc/base/buffer_unittest.cc143
-rw-r--r--chromium/third_party/webrtc/base/bytebuffer.cc234
-rw-r--r--chromium/third_party/webrtc/base/bytebuffer.h119
-rw-r--r--chromium/third_party/webrtc/base/bytebuffer_unittest.cc211
-rw-r--r--chromium/third_party/webrtc/base/byteorder.h168
-rw-r--r--chromium/third_party/webrtc/base/byteorder_unittest.cc83
-rw-r--r--chromium/third_party/webrtc/base/callback.h261
-rw-r--r--chromium/third_party/webrtc/base/callback.h.pump103
-rw-r--r--chromium/third_party/webrtc/base/callback_unittest.cc81
-rw-r--r--chromium/third_party/webrtc/base/checks.cc34
-rw-r--r--chromium/third_party/webrtc/base/checks.h30
-rw-r--r--chromium/third_party/webrtc/base/common.cc64
-rw-r--r--chromium/third_party/webrtc/base/common.h200
-rw-r--r--chromium/third_party/webrtc/base/compile_assert.h82
-rw-r--r--chromium/third_party/webrtc/base/constructormagic.h41
-rw-r--r--chromium/third_party/webrtc/base/cpumonitor.cc423
-rw-r--r--chromium/third_party/webrtc/base/cpumonitor.h123
-rw-r--r--chromium/third_party/webrtc/base/cpumonitor_unittest.cc388
-rw-r--r--chromium/third_party/webrtc/base/crc32.cc52
-rw-r--r--chromium/third_party/webrtc/base/crc32.h34
-rw-r--r--chromium/third_party/webrtc/base/crc32_unittest.cc35
-rw-r--r--chromium/third_party/webrtc/base/criticalsection.h179
-rw-r--r--chromium/third_party/webrtc/base/criticalsection_unittest.cc146
-rw-r--r--chromium/third_party/webrtc/base/cryptstring.h183
-rw-r--r--chromium/third_party/webrtc/base/dbus.cc396
-rw-r--r--chromium/third_party/webrtc/base/dbus.h168
-rw-r--r--chromium/third_party/webrtc/base/dbus_unittest.cc232
-rw-r--r--chromium/third_party/webrtc/base/diskcache.cc347
-rw-r--r--chromium/third_party/webrtc/base/diskcache.h125
-rw-r--r--chromium/third_party/webrtc/base/diskcache_win32.cc86
-rw-r--r--chromium/third_party/webrtc/base/diskcache_win32.h29
-rw-r--r--chromium/third_party/webrtc/base/dscp.h45
-rw-r--r--chromium/third_party/webrtc/base/event.cc135
-rw-r--r--chromium/third_party/webrtc/base/event.h51
-rw-r--r--chromium/third_party/webrtc/base/event_unittest.cc42
-rw-r--r--chromium/third_party/webrtc/base/fakecpumonitor.h32
-rw-r--r--chromium/third_party/webrtc/base/fakenetwork.h119
-rw-r--r--chromium/third_party/webrtc/base/fakesslidentity.h94
-rw-r--r--chromium/third_party/webrtc/base/faketaskrunner.h38
-rw-r--r--chromium/third_party/webrtc/base/filelock.cc62
-rw-r--r--chromium/third_party/webrtc/base/filelock.h53
-rw-r--r--chromium/third_party/webrtc/base/filelock_unittest.cc87
-rw-r--r--chromium/third_party/webrtc/base/fileutils.cc307
-rw-r--r--chromium/third_party/webrtc/base/fileutils.h459
-rw-r--r--chromium/third_party/webrtc/base/fileutils_mock.h253
-rw-r--r--chromium/third_party/webrtc/base/fileutils_unittest.cc131
-rw-r--r--chromium/third_party/webrtc/base/firewallsocketserver.cc239
-rw-r--r--chromium/third_party/webrtc/base/firewallsocketserver.h120
-rw-r--r--chromium/third_party/webrtc/base/flags.cc299
-rw-r--r--chromium/third_party/webrtc/base/flags.h270
-rw-r--r--chromium/third_party/webrtc/base/gunit.h88
-rw-r--r--chromium/third_party/webrtc/base/gunit_prod.h24
-rw-r--r--chromium/third_party/webrtc/base/helpers.cc296
-rw-r--r--chromium/third_party/webrtc/base/helpers.h56
-rw-r--r--chromium/third_party/webrtc/base/helpers_unittest.cc78
-rw-r--r--chromium/third_party/webrtc/base/httpbase.cc877
-rw-r--r--chromium/third_party/webrtc/base/httpbase.h181
-rw-r--r--chromium/third_party/webrtc/base/httpbase_unittest.cc520
-rw-r--r--chromium/third_party/webrtc/base/httpclient.cc829
-rw-r--r--chromium/third_party/webrtc/base/httpclient.h202
-rw-r--r--chromium/third_party/webrtc/base/httpcommon-inl.h131
-rw-r--r--chromium/third_party/webrtc/base/httpcommon.cc1045
-rw-r--r--chromium/third_party/webrtc/base/httpcommon.h446
-rw-r--r--chromium/third_party/webrtc/base/httpcommon_unittest.cc165
-rw-r--r--chromium/third_party/webrtc/base/httprequest.cc110
-rw-r--r--chromium/third_party/webrtc/base/httprequest.h115
-rw-r--r--chromium/third_party/webrtc/base/httpserver.cc288
-rw-r--r--chromium/third_party/webrtc/base/httpserver.h137
-rw-r--r--chromium/third_party/webrtc/base/httpserver_unittest.cc130
-rw-r--r--chromium/third_party/webrtc/base/ifaddrs-android.cc223
-rw-r--r--chromium/third_party/webrtc/base/ifaddrs-android.h39
-rw-r--r--chromium/third_party/webrtc/base/iosfilesystem.mm53
-rw-r--r--chromium/third_party/webrtc/base/ipaddress.cc449
-rw-r--r--chromium/third_party/webrtc/base/ipaddress.h141
-rw-r--r--chromium/third_party/webrtc/base/ipaddress_unittest.cc859
-rw-r--r--chromium/third_party/webrtc/base/json.cc296
-rw-r--r--chromium/third_party/webrtc/base/json.h89
-rw-r--r--chromium/third_party/webrtc/base/json_unittest.cc277
-rw-r--r--chromium/third_party/webrtc/base/latebindingsymboltable.cc156
-rw-r--r--chromium/third_party/webrtc/base/latebindingsymboltable.cc.def69
-rw-r--r--chromium/third_party/webrtc/base/latebindingsymboltable.h69
-rw-r--r--chromium/third_party/webrtc/base/latebindingsymboltable.h.def83
-rw-r--r--chromium/third_party/webrtc/base/latebindingsymboltable_unittest.cc55
-rw-r--r--chromium/third_party/webrtc/base/libdbusglibsymboltable.cc24
-rw-r--r--chromium/third_party/webrtc/base/libdbusglibsymboltable.h56
-rw-r--r--chromium/third_party/webrtc/base/linked_ptr.h125
-rw-r--r--chromium/third_party/webrtc/base/linux.cc348
-rw-r--r--chromium/third_party/webrtc/base/linux.h123
-rw-r--r--chromium/third_party/webrtc/base/linux_unittest.cc104
-rw-r--r--chromium/third_party/webrtc/base/linuxfdwalk.c81
-rw-r--r--chromium/third_party/webrtc/base/linuxfdwalk.h34
-rw-r--r--chromium/third_party/webrtc/base/linuxfdwalk_unittest.cc75
-rw-r--r--chromium/third_party/webrtc/base/linuxwindowpicker.cc818
-rw-r--r--chromium/third_party/webrtc/base/linuxwindowpicker.h51
-rw-r--r--chromium/third_party/webrtc/base/linuxwindowpicker_unittest.cc40
-rw-r--r--chromium/third_party/webrtc/base/logging.cc618
-rw-r--r--chromium/third_party/webrtc/base/logging.h387
-rw-r--r--chromium/third_party/webrtc/base/logging_unittest.cc138
-rw-r--r--chromium/third_party/webrtc/base/macasyncsocket.cc477
-rw-r--r--chromium/third_party/webrtc/base/macasyncsocket.h97
-rw-r--r--chromium/third_party/webrtc/base/maccocoasocketserver.h48
-rw-r--r--chromium/third_party/webrtc/base/maccocoasocketserver.mm140
-rw-r--r--chromium/third_party/webrtc/base/maccocoasocketserver_unittest.mm50
-rw-r--r--chromium/third_party/webrtc/base/maccocoathreadhelper.h27
-rw-r--r--chromium/third_party/webrtc/base/maccocoathreadhelper.mm44
-rw-r--r--chromium/third_party/webrtc/base/macconversion.cc159
-rw-r--r--chromium/third_party/webrtc/base/macconversion.h39
-rw-r--r--chromium/third_party/webrtc/base/macsocketserver.cc378
-rw-r--r--chromium/third_party/webrtc/base/macsocketserver.h136
-rw-r--r--chromium/third_party/webrtc/base/macsocketserver_unittest.cc237
-rw-r--r--chromium/third_party/webrtc/base/macutils.cc221
-rw-r--r--chromium/third_party/webrtc/base/macutils.h59
-rw-r--r--chromium/third_party/webrtc/base/macutils_unittest.cc43
-rw-r--r--chromium/third_party/webrtc/base/macwindowpicker.cc256
-rw-r--r--chromium/third_party/webrtc/base/macwindowpicker.h37
-rw-r--r--chromium/third_party/webrtc/base/macwindowpicker_unittest.cc45
-rw-r--r--chromium/third_party/webrtc/base/mathutils.h20
-rw-r--r--chromium/third_party/webrtc/base/md5.cc222
-rw-r--r--chromium/third_party/webrtc/base/md5.h45
-rw-r--r--chromium/third_party/webrtc/base/md5digest.h46
-rw-r--r--chromium/third_party/webrtc/base/md5digest_unittest.cc79
-rw-r--r--chromium/third_party/webrtc/base/messagedigest.cc180
-rw-r--r--chromium/third_party/webrtc/base/messagedigest.h109
-rw-r--r--chromium/third_party/webrtc/base/messagedigest_unittest.cc151
-rw-r--r--chromium/third_party/webrtc/base/messagehandler.cc20
-rw-r--r--chromium/third_party/webrtc/base/messagehandler.h68
-rw-r--r--chromium/third_party/webrtc/base/messagequeue.cc384
-rw-r--r--chromium/third_party/webrtc/base/messagequeue.h254
-rw-r--r--chromium/third_party/webrtc/base/messagequeue_unittest.cc140
-rw-r--r--chromium/third_party/webrtc/base/move.h213
-rw-r--r--chromium/third_party/webrtc/base/multipart.cc253
-rw-r--r--chromium/third_party/webrtc/base/multipart.h79
-rw-r--r--chromium/third_party/webrtc/base/multipart_unittest.cc125
-rw-r--r--chromium/third_party/webrtc/base/nat_unittest.cc345
-rw-r--r--chromium/third_party/webrtc/base/natserver.cc186
-rw-r--r--chromium/third_party/webrtc/base/natserver.h110
-rw-r--r--chromium/third_party/webrtc/base/natsocketfactory.cc487
-rw-r--r--chromium/third_party/webrtc/base/natsocketfactory.h166
-rw-r--r--chromium/third_party/webrtc/base/nattypes.cc55
-rw-r--r--chromium/third_party/webrtc/base/nattypes.h47
-rw-r--r--chromium/third_party/webrtc/base/nethelpers.cc150
-rw-r--r--chromium/third_party/webrtc/base/nethelpers.h65
-rw-r--r--chromium/third_party/webrtc/base/network.cc658
-rw-r--r--chromium/third_party/webrtc/base/network.h245
-rw-r--r--chromium/third_party/webrtc/base/network_unittest.cc617
-rw-r--r--chromium/third_party/webrtc/base/nssidentity.cc521
-rw-r--r--chromium/third_party/webrtc/base/nssidentity.h130
-rw-r--r--chromium/third_party/webrtc/base/nssstreamadapter.cc1020
-rw-r--r--chromium/third_party/webrtc/base/nssstreamadapter.h111
-rw-r--r--chromium/third_party/webrtc/base/nullsocketserver.h61
-rw-r--r--chromium/third_party/webrtc/base/nullsocketserver_unittest.cc47
-rw-r--r--chromium/third_party/webrtc/base/openssl.h20
-rw-r--r--chromium/third_party/webrtc/base/openssladapter.cc884
-rw-r--r--chromium/third_party/webrtc/base/openssladapter.h88
-rw-r--r--chromium/third_party/webrtc/base/openssldigest.cc122
-rw-r--r--chromium/third_party/webrtc/base/openssldigest.h50
-rw-r--r--chromium/third_party/webrtc/base/opensslidentity.cc366
-rw-r--r--chromium/third_party/webrtc/base/opensslidentity.h150
-rw-r--r--chromium/third_party/webrtc/base/opensslstreamadapter.cc857
-rw-r--r--chromium/third_party/webrtc/base/opensslstreamadapter.h198
-rw-r--r--chromium/third_party/webrtc/base/optionsfile.cc184
-rw-r--r--chromium/third_party/webrtc/base/optionsfile.h49
-rw-r--r--chromium/third_party/webrtc/base/optionsfile_unittest.cc168
-rw-r--r--chromium/third_party/webrtc/base/pathutils.cc251
-rw-r--r--chromium/third_party/webrtc/base/pathutils.h163
-rw-r--r--chromium/third_party/webrtc/base/pathutils_unittest.cc48
-rw-r--r--chromium/third_party/webrtc/base/physicalsocketserver.cc1659
-rw-r--r--chromium/third_party/webrtc/base/physicalsocketserver.h120
-rw-r--r--chromium/third_party/webrtc/base/physicalsocketserver_unittest.cc274
-rw-r--r--chromium/third_party/webrtc/base/posix.cc131
-rw-r--r--chromium/third_party/webrtc/base/posix.h25
-rw-r--r--chromium/third_party/webrtc/base/profiler.cc186
-rw-r--r--chromium/third_party/webrtc/base/profiler.h161
-rw-r--r--chromium/third_party/webrtc/base/profiler_unittest.cc113
-rw-r--r--chromium/third_party/webrtc/base/proxy_unittest.cc135
-rw-r--r--chromium/third_party/webrtc/base/proxydetect.cc1246
-rw-r--r--chromium/third_party/webrtc/base/proxydetect.h31
-rw-r--r--chromium/third_party/webrtc/base/proxydetect_unittest.cc164
-rw-r--r--chromium/third_party/webrtc/base/proxyinfo.cc20
-rw-r--r--chromium/third_party/webrtc/base/proxyinfo.h42
-rw-r--r--chromium/third_party/webrtc/base/proxyserver.cc144
-rw-r--r--chromium/third_party/webrtc/base/proxyserver.h96
-rw-r--r--chromium/third_party/webrtc/base/ratelimiter.cc29
-rw-r--r--chromium/third_party/webrtc/base/ratelimiter.h63
-rw-r--r--chromium/third_party/webrtc/base/ratelimiter_unittest.cc59
-rw-r--r--chromium/third_party/webrtc/base/ratetracker.cc63
-rw-r--r--chromium/third_party/webrtc/base/ratetracker.h42
-rw-r--r--chromium/third_party/webrtc/base/ratetracker_unittest.cc74
-rw-r--r--chromium/third_party/webrtc/base/refcount.h78
-rw-r--r--chromium/third_party/webrtc/base/referencecountedsingletonfactory.h157
-rw-r--r--chromium/third_party/webrtc/base/referencecountedsingletonfactory_unittest.cc132
-rw-r--r--chromium/third_party/webrtc/base/rollingaccumulator.h172
-rw-r--r--chromium/third_party/webrtc/base/rollingaccumulator_unittest.cc118
-rw-r--r--chromium/third_party/webrtc/base/safe_conversions.h79
-rw-r--r--chromium/third_party/webrtc/base/safe_conversions_impl.h188
-rw-r--r--chromium/third_party/webrtc/base/schanneladapter.cc702
-rw-r--r--chromium/third_party/webrtc/base/schanneladapter.h77
-rw-r--r--chromium/third_party/webrtc/base/scoped_autorelease_pool.h59
-rw-r--r--chromium/third_party/webrtc/base/scoped_autorelease_pool.mm25
-rw-r--r--chromium/third_party/webrtc/base/scoped_ptr.h595
-rw-r--r--chromium/third_party/webrtc/base/scoped_ref_ptr.h147
-rw-r--r--chromium/third_party/webrtc/base/scopedptrcollection.h60
-rw-r--r--chromium/third_party/webrtc/base/scopedptrcollection_unittest.cc73
-rw-r--r--chromium/third_party/webrtc/base/sec_buffer.h156
-rw-r--r--chromium/third_party/webrtc/base/sha1.cc286
-rw-r--r--chromium/third_party/webrtc/base/sha1.h32
-rw-r--r--chromium/third_party/webrtc/base/sha1digest.h47
-rw-r--r--chromium/third_party/webrtc/base/sha1digest_unittest.cc82
-rw-r--r--chromium/third_party/webrtc/base/sharedexclusivelock.cc44
-rw-r--r--chromium/third_party/webrtc/base/sharedexclusivelock.h76
-rw-r--r--chromium/third_party/webrtc/base/sharedexclusivelock_unittest.cc218
-rw-r--r--chromium/third_party/webrtc/base/signalthread.cc149
-rw-r--r--chromium/third_party/webrtc/base/signalthread.h156
-rw-r--r--chromium/third_party/webrtc/base/signalthread_unittest.cc198
-rw-r--r--chromium/third_party/webrtc/base/sigslot.h2850
-rw-r--r--chromium/third_party/webrtc/base/sigslot_unittest.cc250
-rw-r--r--chromium/third_party/webrtc/base/sigslotrepeater.h94
-rwxr-xr-xchromium/third_party/webrtc/base/sigslottester.h199
-rwxr-xr-xchromium/third_party/webrtc/base/sigslottester.h.pump85
-rwxr-xr-xchromium/third_party/webrtc/base/sigslottester_unittest.cc86
-rw-r--r--chromium/third_party/webrtc/base/socket.h188
-rw-r--r--chromium/third_party/webrtc/base/socket_unittest.cc1012
-rw-r--r--chromium/third_party/webrtc/base/socket_unittest.h88
-rw-r--r--chromium/third_party/webrtc/base/socketadapters.cc893
-rw-r--r--chromium/third_party/webrtc/base/socketadapters.h244
-rw-r--r--chromium/third_party/webrtc/base/socketaddress.cc383
-rw-r--r--chromium/third_party/webrtc/base/socketaddress.h214
-rw-r--r--chromium/third_party/webrtc/base/socketaddress_unittest.cc335
-rw-r--r--chromium/third_party/webrtc/base/socketaddresspair.cc41
-rw-r--r--chromium/third_party/webrtc/base/socketaddresspair.h41
-rw-r--r--chromium/third_party/webrtc/base/socketfactory.h38
-rw-r--r--chromium/third_party/webrtc/base/socketpool.cc280
-rw-r--r--chromium/third_party/webrtc/base/socketpool.h143
-rw-r--r--chromium/third_party/webrtc/base/socketserver.h44
-rw-r--r--chromium/third_party/webrtc/base/socketstream.cc121
-rw-r--r--chromium/third_party/webrtc/base/socketstream.h57
-rw-r--r--chromium/third_party/webrtc/base/ssladapter.cc97
-rw-r--r--chromium/third_party/webrtc/base/ssladapter.h61
-rw-r--r--chromium/third_party/webrtc/base/sslconfig.h33
-rw-r--r--chromium/third_party/webrtc/base/sslfingerprint.cc96
-rw-r--r--chromium/third_party/webrtc/base/sslfingerprint.h50
-rw-r--r--chromium/third_party/webrtc/base/sslidentity.cc154
-rw-r--r--chromium/third_party/webrtc/base/sslidentity.h172
-rw-r--r--chromium/third_party/webrtc/base/sslidentity_unittest.cc208
-rw-r--r--chromium/third_party/webrtc/base/sslroots.h4932
-rw-r--r--chromium/third_party/webrtc/base/sslsocketfactory.cc175
-rw-r--r--chromium/third_party/webrtc/base/sslsocketfactory.h81
-rw-r--r--chromium/third_party/webrtc/base/sslstreamadapter.cc77
-rw-r--r--chromium/third_party/webrtc/base/sslstreamadapter.h162
-rw-r--r--chromium/third_party/webrtc/base/sslstreamadapter_unittest.cc940
-rw-r--r--chromium/third_party/webrtc/base/sslstreamadapterhelper.cc130
-rw-r--r--chromium/third_party/webrtc/base/sslstreamadapterhelper.h118
-rw-r--r--chromium/third_party/webrtc/base/stream.cc1335
-rw-r--r--chromium/third_party/webrtc/base/stream.h820
-rw-r--r--chromium/third_party/webrtc/base/stream_unittest.cc492
-rw-r--r--chromium/third_party/webrtc/base/stringdigest.h17
-rw-r--r--chromium/third_party/webrtc/base/stringencode.cc657
-rw-r--r--chromium/third_party/webrtc/base/stringencode.h210
-rw-r--r--chromium/third_party/webrtc/base/stringencode_unittest.cc385
-rw-r--r--chromium/third_party/webrtc/base/stringutils.cc133
-rw-r--r--chromium/third_party/webrtc/base/stringutils.h318
-rw-r--r--chromium/third_party/webrtc/base/stringutils_unittest.cc109
-rw-r--r--chromium/third_party/webrtc/base/systeminfo.cc518
-rw-r--r--chromium/third_party/webrtc/base/systeminfo.h81
-rw-r--r--chromium/third_party/webrtc/base/systeminfo_unittest.cc194
-rw-r--r--chromium/third_party/webrtc/base/task.cc272
-rw-r--r--chromium/third_party/webrtc/base/task.h177
-rw-r--r--chromium/third_party/webrtc/base/task_unittest.cc545
-rw-r--r--chromium/third_party/webrtc/base/taskparent.cc95
-rw-r--r--chromium/third_party/webrtc/base/taskparent.h62
-rw-r--r--chromium/third_party/webrtc/base/taskrunner.cc224
-rw-r--r--chromium/third_party/webrtc/base/taskrunner.h100
-rw-r--r--chromium/third_party/webrtc/base/template_util.h112
-rw-r--r--chromium/third_party/webrtc/base/testbase64.h5
-rw-r--r--chromium/third_party/webrtc/base/testclient.cc148
-rw-r--r--chromium/third_party/webrtc/base/testclient.h93
-rw-r--r--chromium/third_party/webrtc/base/testclient_unittest.cc77
-rw-r--r--chromium/third_party/webrtc/base/testechoserver.h73
-rw-r--r--chromium/third_party/webrtc/base/testutils.h629
-rw-r--r--chromium/third_party/webrtc/base/thread.cc560
-rw-r--r--chromium/third_party/webrtc/base/thread.h294
-rw-r--r--chromium/third_party/webrtc/base/thread_checker.h91
-rw-r--r--chromium/third_party/webrtc/base/thread_checker_impl.cc44
-rw-r--r--chromium/third_party/webrtc/base/thread_checker_impl.h51
-rw-r--r--chromium/third_party/webrtc/base/thread_checker_unittest.cc205
-rw-r--r--chromium/third_party/webrtc/base/thread_unittest.cc444
-rw-r--r--chromium/third_party/webrtc/base/timeutils.cc203
-rw-r--r--chromium/third_party/webrtc/base/timeutils.h96
-rw-r--r--chromium/third_party/webrtc/base/timeutils_unittest.cc169
-rw-r--r--chromium/third_party/webrtc/base/timing.cc112
-rw-r--r--chromium/third_party/webrtc/base/timing.h59
-rw-r--r--chromium/third_party/webrtc/base/transformadapter.cc185
-rw-r--r--chromium/third_party/webrtc/base/transformadapter.h80
-rw-r--r--chromium/third_party/webrtc/base/unittest_main.cc101
-rw-r--r--chromium/third_party/webrtc/base/unixfilesystem.cc572
-rw-r--r--chromium/third_party/webrtc/base/unixfilesystem.h126
-rw-r--r--chromium/third_party/webrtc/base/urlencode.cc183
-rw-r--r--chromium/third_party/webrtc/base/urlencode.h46
-rw-r--r--chromium/third_party/webrtc/base/urlencode_unittest.cc83
-rw-r--r--chromium/third_party/webrtc/base/versionparsing.cc57
-rw-r--r--chromium/third_party/webrtc/base/versionparsing.h35
-rw-r--r--chromium/third_party/webrtc/base/versionparsing_unittest.cc74
-rw-r--r--chromium/third_party/webrtc/base/virtualsocket_unittest.cc1001
-rw-r--r--chromium/third_party/webrtc/base/virtualsocketserver.cc1101
-rw-r--r--chromium/third_party/webrtc/base/virtualsocketserver.h234
-rw-r--r--chromium/third_party/webrtc/base/win32.cc456
-rw-r--r--chromium/third_party/webrtc/base/win32.h129
-rw-r--r--chromium/third_party/webrtc/base/win32_unittest.cc62
-rw-r--r--chromium/third_party/webrtc/base/win32filesystem.cc460
-rw-r--r--chromium/third_party/webrtc/base/win32filesystem.h101
-rw-r--r--chromium/third_party/webrtc/base/win32regkey.cc1102
-rw-r--r--chromium/third_party/webrtc/base/win32regkey.h337
-rw-r--r--chromium/third_party/webrtc/base/win32regkey_unittest.cc590
-rw-r--r--chromium/third_party/webrtc/base/win32securityerrors.cc49
-rw-r--r--chromium/third_party/webrtc/base/win32socketinit.cc46
-rw-r--r--chromium/third_party/webrtc/base/win32socketinit.h20
-rw-r--r--chromium/third_party/webrtc/base/win32socketserver.cc850
-rw-r--r--chromium/third_party/webrtc/base/win32socketserver.h164
-rw-r--r--chromium/third_party/webrtc/base/win32socketserver_unittest.cc157
-rw-r--r--chromium/third_party/webrtc/base/win32toolhelp.h172
-rw-r--r--chromium/third_party/webrtc/base/win32toolhelp_unittest.cc278
-rw-r--r--chromium/third_party/webrtc/base/win32window.cc121
-rw-r--r--chromium/third_party/webrtc/base/win32window.h60
-rw-r--r--chromium/third_party/webrtc/base/win32window_unittest.cc66
-rw-r--r--chromium/third_party/webrtc/base/win32windowpicker.cc143
-rw-r--r--chromium/third_party/webrtc/base/win32windowpicker.h39
-rw-r--r--chromium/third_party/webrtc/base/win32windowpicker_unittest.cc99
-rw-r--r--chromium/third_party/webrtc/base/window.h124
-rw-r--r--chromium/third_party/webrtc/base/windowpicker.h84
-rw-r--r--chromium/third_party/webrtc/base/windowpicker_unittest.cc67
-rw-r--r--chromium/third_party/webrtc/base/windowpickerfactory.h59
-rw-r--r--chromium/third_party/webrtc/base/winfirewall.cc155
-rw-r--r--chromium/third_party/webrtc/base/winfirewall.h56
-rw-r--r--chromium/third_party/webrtc/base/winfirewall_unittest.cc40
-rw-r--r--chromium/third_party/webrtc/base/winping.cc359
-rw-r--r--chromium/third_party/webrtc/base/winping.h103
-rw-r--r--chromium/third_party/webrtc/base/worker.cc75
-rw-r--r--chromium/third_party/webrtc/base/worker.h72
-rw-r--r--chromium/third_party/webrtc/build/OWNERS11
-rw-r--r--chromium/third_party/webrtc/build/apk_tests.gyp73
-rw-r--r--chromium/third_party/webrtc/build/apk_tests_noop.gyp16
-rw-r--r--chromium/third_party/webrtc/build/common.gypi108
-rw-r--r--chromium/third_party/webrtc/build/download_vs_toolchain.py30
-rw-r--r--chromium/third_party/webrtc/build/generate_asm_header.gypi79
-rw-r--r--chromium/third_party/webrtc/build/generate_asm_header.py74
-rwxr-xr-xchromium/third_party/webrtc/build/gyp_webrtc99
-rw-r--r--chromium/third_party/webrtc/build/gyp_webrtc.py24
-rw-r--r--chromium/third_party/webrtc/build/isolate.gypi83
-rw-r--r--chromium/third_party/webrtc/build/merge_libs.gyp4
-rw-r--r--chromium/third_party/webrtc/build/merge_libs.py5
-rw-r--r--chromium/third_party/webrtc/build/protoc.gypi1
-rw-r--r--chromium/third_party/webrtc/build/webrtc.gni57
-rw-r--r--chromium/third_party/webrtc/call.h53
-rw-r--r--chromium/third_party/webrtc/common.gyp20
-rw-r--r--chromium/third_party/webrtc/common_audio/OWNERS7
-rw-r--r--chromium/third_party/webrtc/common_audio/audio_util.cc31
-rw-r--r--chromium/third_party/webrtc/common_audio/audio_util_unittest.cc56
-rw-r--r--chromium/third_party/webrtc/common_audio/common_audio.gyp11
-rw-r--r--chromium/third_party/webrtc/common_audio/common_audio_unittests.isolate12
-rw-r--r--chromium/third_party/webrtc/common_audio/fir_filter.cc119
-rw-r--r--chromium/third_party/webrtc/common_audio/fir_filter.h40
-rw-r--r--chromium/third_party/webrtc/common_audio/fir_filter_neon.cc72
-rw-r--r--chromium/third_party/webrtc/common_audio/fir_filter_neon.h37
-rw-r--r--chromium/third_party/webrtc/common_audio/fir_filter_sse.cc80
-rw-r--r--chromium/third_party/webrtc/common_audio/fir_filter_sse.h37
-rw-r--r--chromium/third_party/webrtc/common_audio/fir_filter_unittest.cc207
-rw-r--r--chromium/third_party/webrtc/common_audio/include/audio_util.h75
-rw-r--r--chromium/third_party/webrtc/common_audio/resampler/include/push_resampler.h15
-rw-r--r--chromium/third_party/webrtc/common_audio/resampler/push_resampler.cc40
-rw-r--r--chromium/third_party/webrtc/common_audio/resampler/push_resampler_unittest.cc2
-rw-r--r--chromium/third_party/webrtc/common_audio/resampler/push_sinc_resampler.cc46
-rw-r--r--chromium/third_party/webrtc/common_audio/resampler/push_sinc_resampler.h14
-rw-r--r--chromium/third_party/webrtc/common_audio/resampler/push_sinc_resampler_unittest.cc102
-rw-r--r--chromium/third_party/webrtc/common_audio/resampler/sinc_resampler.cc30
-rw-r--r--chromium/third_party/webrtc/common_audio/resampler/sinc_resampler.h24
-rw-r--r--chromium/third_party/webrtc/common_audio/resampler/sinc_resampler_unittest.cc10
-rw-r--r--chromium/third_party/webrtc/common_audio/resampler/sinusoidal_linear_chirp_source.h2
-rw-r--r--chromium/third_party/webrtc/common_audio/signal_processing/complex_fft.c31
-rw-r--r--chromium/third_party/webrtc/common_audio/signal_processing/include/signal_processing_library.h23
-rw-r--r--chromium/third_party/webrtc/common_audio/signal_processing/include/spl_inl_armv7.h2
-rw-r--r--chromium/third_party/webrtc/common_audio/signal_processing/randomization_functions.c36
-rw-r--r--chromium/third_party/webrtc/common_audio/signal_processing/real_fft_unittest.cc1
-rw-r--r--chromium/third_party/webrtc/common_audio/signal_processing/signal_processing_unittest.cc16
-rw-r--r--chromium/third_party/webrtc/common_audio/signal_processing/spl_init.c4
-rw-r--r--chromium/third_party/webrtc/common_audio/signal_processing/splitting_filter.c60
-rw-r--r--chromium/third_party/webrtc/common_audio/vad/include/webrtc_vad.h6
-rw-r--r--chromium/third_party/webrtc/common_audio/vad/vad_core.c8
-rw-r--r--chromium/third_party/webrtc/common_audio/vad/vad_core.h14
-rw-r--r--chromium/third_party/webrtc/common_audio/vad/vad_sp.c2
-rw-r--r--chromium/third_party/webrtc/common_audio/vad/vad_sp.h2
-rw-r--r--chromium/third_party/webrtc/common_audio/vad/vad_unittest.cc3
-rw-r--r--chromium/third_party/webrtc/common_audio/vad/webrtc_vad.c10
-rw-r--r--chromium/third_party/webrtc/common_types.h344
-rw-r--r--chromium/third_party/webrtc/common_video/OWNERS7
-rw-r--r--chromium/third_party/webrtc/common_video/common_video_unittests.gyp4
-rw-r--r--chromium/third_party/webrtc/common_video/common_video_unittests.isolate16
-rw-r--r--chromium/third_party/webrtc/common_video/i420_video_frame.cc15
-rw-r--r--chromium/third_party/webrtc/common_video/i420_video_frame_unittest.cc91
-rw-r--r--chromium/third_party/webrtc/common_video/interface/i420_video_frame.h21
-rw-r--r--chromium/third_party/webrtc/common_video/interface/texture_video_frame.h1
-rw-r--r--chromium/third_party/webrtc/common_video/interface/video_image.h3
-rw-r--r--chromium/third_party/webrtc/common_video/libyuv/libyuv_unittest.cc20
-rw-r--r--chromium/third_party/webrtc/common_video/libyuv/scaler_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/common_video/plane.cc7
-rw-r--r--chromium/third_party/webrtc/common_video/plane.h3
-rw-r--r--chromium/third_party/webrtc/common_video/texture_video_frame.cc33
-rw-r--r--chromium/third_party/webrtc/common_video/texture_video_frame_unittest.cc23
-rw-r--r--chromium/third_party/webrtc/config.cc53
-rw-r--r--chromium/third_party/webrtc/config.h55
-rw-r--r--chromium/third_party/webrtc/engine_configurations.h7
-rw-r--r--chromium/third_party/webrtc/examples/OWNERS2
-rw-r--r--chromium/third_party/webrtc/examples/android/OWNERS4
-rw-r--r--chromium/third_party/webrtc/examples/android/media_demo/jni/on_load.cc4
-rw-r--r--chromium/third_party/webrtc/examples/android/opensl_loopback/AndroidManifest.xml22
-rw-r--r--chromium/third_party/webrtc/examples/android/opensl_loopback/README23
-rw-r--r--chromium/third_party/webrtc/examples/android/opensl_loopback/build.xml92
-rw-r--r--chromium/third_party/webrtc/examples/android/opensl_loopback/fake_audio_device_buffer.cc107
-rw-r--r--chromium/third_party/webrtc/examples/android/opensl_loopback/fake_audio_device_buffer.h67
-rw-r--r--chromium/third_party/webrtc/examples/android/opensl_loopback/jni/opensl_runner.cc129
-rw-r--r--chromium/third_party/webrtc/examples/android/opensl_loopback/project.properties16
-rw-r--r--chromium/third_party/webrtc/examples/android/opensl_loopback/res/drawable/logo.pngbin0 -> 2574 bytes
-rw-r--r--chromium/third_party/webrtc/examples/android/opensl_loopback/res/layout/open_sl_demo.xml22
-rw-r--r--chromium/third_party/webrtc/examples/android/opensl_loopback/res/values/strings.xml7
-rw-r--r--chromium/third_party/webrtc/experiments.h27
-rw-r--r--chromium/third_party/webrtc/frame_callback.h2
-rw-r--r--chromium/third_party/webrtc/modules/OWNERS6
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/cng/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/g711/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/g722/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/ilbc/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_hist.c4
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_logist.c42
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h15
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/decode_plc.c2
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/encode.c30
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h11
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks.c16
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks_mips.c102
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/filters_mips.c365
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c43
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.gypi24
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_mips.c327
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c6
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_mips.c133
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h3
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/transform_neon.S9
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/main/interface/isac.h2
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/main/source/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c11
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/main/source/isac.c33
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.c29
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.h16
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/isac/main/source/structs.h7
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/opus/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/opus/interface/opus_interface.h117
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/opus/opus.gypi22
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/opus/opus_fec_test.cc249
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/opus/opus_interface.c174
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/opus/opus_speed_test.cc119
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc62
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/pcm16b/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/tools/OWNERS6
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.cc124
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.h90
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_tests.gypi71
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_tests.isolate40
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/OWNERS1
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/acm_codec_database.h2
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/acm_g722.h4
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/acm_generic_codec.cc7
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/acm_generic_codec.h94
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/acm_isac.cc269
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/acm_isac.h87
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/acm_opus.cc41
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/acm_opus.h9
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/acm_receiver.cc142
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/acm_receiver.h40
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest.cc62
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/acm_resampler.cc54
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/acm_resampler.h11
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/audio_coding_module.cc20
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/audio_coding_module.gypi65
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc206
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h117
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc514
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/call_statistics.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.cc8
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.h5
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/initial_delay_manager_unittest.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/acm2/nack_unittest.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/interface/audio_coding_module.h101
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/Android.mk67
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_amr.cc430
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_amr.h87
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_amrwb.cc436
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_amrwb.h90
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_celt.cc339
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_celt.h79
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_cng.cc150
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_cng.h73
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_codec_database.cc956
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_codec_database.h336
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_dtmf_detection.cc42
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_dtmf_detection.h42
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_dtmf_playout.cc171
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_dtmf_playout.h62
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_g722.cc358
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_g722.h84
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_g7221.cc500
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_g7221.h86
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_g7221c.cc510
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_g7221c.h94
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_g729.cc366
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_g729.h76
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_g7291.cc349
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_g7291.h72
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_generic_codec.cc1263
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_generic_codec.h1224
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_gsmfr.cc267
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_gsmfr.h71
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_ilbc.cc259
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_ilbc.h71
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_isac.cc903
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_isac.h138
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_isac_macros.h77
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_neteq.cc1151
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_neteq.h399
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_neteq_unittest.cc153
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_opus.cc319
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_opus.h78
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_pcm16b.cc251
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_pcm16b.h67
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_pcma.cc134
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_pcma.h65
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_pcmu.cc136
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_pcmu.h65
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_red.cc108
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_red.h62
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_resampler.cc63
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_resampler.h40
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_speex.cc471
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/acm_speex.h86
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/audio_coding_module.gypi153
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/audio_coding_module_impl.cc3048
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/main/source/audio_coding_module_impl.h455
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/Android.mk73
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/OWNERS8
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/accelerate.c493
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/accelerate.cc88
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/accelerate.h77
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/audio_classifier.cc71
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/audio_classifier.h59
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/audio_classifier_unittest.cc75
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/audio_decoder.cc264
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/audio_decoder_impl.cc516
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/audio_decoder_impl.h276
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc931
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/audio_decoder_unittests.isolate (renamed from chromium/third_party/webrtc/modules/audio_coding/neteq4/audio_decoder_unittests.isolate)0
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/audio_multi_vector.cc213
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/audio_multi_vector.h134
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/audio_multi_vector_unittest.cc308
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/audio_vector.cc165
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/audio_vector.h120
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/audio_vector_unittest.cc394
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/automode.c783
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/automode.h274
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/background_noise.cc260
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/background_noise.h137
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/background_noise_unittest.cc26
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/bgn_update.c247
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/buffer_level_filter.cc60
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/buffer_level_filter.h47
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/buffer_level_filter_unittest.cc162
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/buffer_stats.h95
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/bufstats_decision.c427
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/cng_internal.c155
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/codec_db.c782
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/codec_db.h128
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/codec_db_defines.h97
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/comfort_noise.cc135
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/comfort_noise.h73
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/comfort_noise_unittest.cc31
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/correlator.c132
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/decision_logic.cc185
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/decision_logic.h168
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/decision_logic_fax.cc102
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/decision_logic_fax.h63
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/decision_logic_normal.cc235
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/decision_logic_normal.h107
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/decision_logic_unittest.cc58
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/decoder_database.cc260
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/decoder_database.h158
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/decoder_database_unittest.cc228
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/defines.h51
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/delay_logging.h34
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/delay_manager.cc425
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/delay_manager.h164
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/delay_manager_unittest.cc297
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/delay_peak_detector.cc110
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/delay_peak_detector.h76
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/delay_peak_detector_unittest.cc121
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/dsp.c532
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/dsp.h807
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/dsp_helper.cc353
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/dsp_helper.h136
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/dsp_helper_unittest.cc89
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/dsp_helpfunctions.c120
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/dsp_helpfunctions.h220
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/dtmf_buffer.c232
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/dtmf_buffer.cc226
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/dtmf_buffer.h199
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/dtmf_buffer_unittest.cc307
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/dtmf_tone_generator.cc192
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/dtmf_tone_generator.h56
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/dtmf_tone_generator_unittest.cc142
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/dtmf_tonegen.c367
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/dtmf_tonegen.h73
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/expand.c1220
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/expand.cc904
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/expand.h187
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/expand_unittest.cc46
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/interface/audio_decoder.h152
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/interface/neteq.h276
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/interface/webrtc_neteq.h230
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/interface/webrtc_neteq_help_macros.h454
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/interface/webrtc_neteq_internal.h336
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mcu.h300
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mcu_address_init.c33
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mcu_dsp_common.c45
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mcu_dsp_common.h69
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mcu_reset.c131
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/merge.c570
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/merge.cc366
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/merge.h110
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/merge_unittest.cc37
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/min_distortion.c55
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mix_voice_unvoice.c41
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mock/mock_audio_decoder.h38
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mock/mock_audio_vector.h51
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mock/mock_buffer_level_filter.h37
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h64
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mock/mock_delay_manager.h63
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mock/mock_delay_peak_detector.h34
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mock/mock_dtmf_buffer.h38
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mock/mock_dtmf_tone_generator.h35
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mock/mock_external_decoder_pcm16b.h99
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mock/mock_packet_buffer.h58
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mock/mock_payload_splitter.h39
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/mute_signal.c33
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/neteq.cc62
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/neteq.gypi328
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/neteq_defines.h374
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/neteq_error_codes.h81
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc210
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/neteq_impl.cc1947
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/neteq_impl.h406
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc498
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/neteq_statistics.h56
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc421
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/neteq_tests.gypi248
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/neteq_unittest.cc1437
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/neteq_unittests.isolate44
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/normal.c279
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/normal.cc190
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/normal.h68
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/normal_unittest.cc40
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/packet.h88
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/packet_buffer.c851
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/packet_buffer.cc264
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/packet_buffer.h371
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/packet_buffer_unittest.cc529
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/payload_splitter.cc430
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/payload_splitter.h90
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/payload_splitter_unittest.cc777
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/peak_detection.c232
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/post_decode_vad.cc87
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/post_decode_vad.h72
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/post_decode_vad_unittest.cc25
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/preemptive_expand.c527
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/preemptive_expand.cc110
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/preemptive_expand.h87
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/random_vector.c54
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/random_vector.cc57
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/random_vector.h50
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/random_vector_unittest.cc25
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/recin.c531
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/recout.c1502
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/rtcp.c134
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/rtcp.cc96
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/rtcp.h140
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/rtp.c240
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/rtp.h78
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/set_fs.c78
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/signal_mcu.c820
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/split_and_insert.c152
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/statistics_calculator.cc170
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/statistics_calculator.h109
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/sync_buffer.cc107
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/sync_buffer.h101
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/sync_buffer_unittest.cc164
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/time_stretch.cc216
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/time_stretch.h111
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/time_stretch_unittest.cc52
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/timestamp_scaler.cc111
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/timestamp_scaler.h68
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/timestamp_scaler_unittest.cc327
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/audio_checksum.h60
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/audio_loop.cc57
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/audio_loop.h59
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/audio_sink.h46
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/input_audio_file.cc51
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/input_audio_file.h51
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc132
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.h32
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc115
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h100
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc628
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/output_audio_file.h50
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/packet.cc155
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/packet.h117
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/packet_source.h37
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/packet_unittest.cc202
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/rtp_analyze.cc147
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc147
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h67
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/rtp_generator.cc48
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/tools/rtp_generator.h57
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/unmute_signal.c41
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/webrtc_neteq.c1769
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq/webrtc_neteq_unittest.cc778
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/OWNERS4
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/accelerate.cc81
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/accelerate.h68
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/audio_decoder.cc254
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/audio_decoder_impl.cc491
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/audio_decoder_impl.h271
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/audio_decoder_unittest.cc931
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/audio_multi_vector.cc214
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/audio_multi_vector.h134
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/audio_multi_vector_unittest.cc308
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/audio_vector.cc165
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/audio_vector.h120
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/audio_vector_unittest.cc394
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/background_noise.cc260
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/background_noise.h137
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/background_noise_unittest.cc26
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/buffer_level_filter.cc60
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/buffer_level_filter.h47
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/buffer_level_filter_unittest.cc162
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/comfort_noise.cc135
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/comfort_noise.h73
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/comfort_noise_unittest.cc31
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/decision_logic.cc185
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/decision_logic.h168
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/decision_logic_fax.cc102
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/decision_logic_fax.h63
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/decision_logic_normal.cc235
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/decision_logic_normal.h106
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/decision_logic_unittest.cc58
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/decoder_database.cc260
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/decoder_database.h158
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/decoder_database_unittest.cc228
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/defines.h51
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/delay_manager.cc425
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/delay_manager.h164
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/delay_manager_unittest.cc297
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/delay_peak_detector.cc110
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/delay_peak_detector.h76
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/delay_peak_detector_unittest.cc121
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/dsp_helper.cc353
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/dsp_helper.h136
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/dsp_helper_unittest.cc89
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/dtmf_buffer.cc226
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/dtmf_buffer.h116
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/dtmf_buffer_unittest.cc307
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/dtmf_tone_generator.cc192
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/dtmf_tone_generator.h56
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/dtmf_tone_generator_unittest.cc142
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/expand.cc867
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/expand.h157
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/expand_unittest.cc33
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/interface/audio_decoder.h141
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/interface/neteq.h267
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/merge.cc360
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/merge.h104
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/merge_unittest.cc37
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/mock/mock_audio_decoder.h38
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/mock/mock_audio_vector.h51
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/mock/mock_buffer_level_filter.h37
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/mock/mock_decoder_database.h64
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/mock/mock_delay_manager.h63
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/mock/mock_delay_peak_detector.h34
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/mock/mock_dtmf_buffer.h38
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/mock/mock_dtmf_tone_generator.h35
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/mock/mock_external_decoder_pcm16b.h99
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/mock/mock_packet_buffer.h58
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/mock/mock_payload_splitter.h37
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/neteq.cc52
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/neteq.gypi220
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/neteq_external_decoder_unittest.cc209
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/neteq_impl.cc1902
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/neteq_impl.h360
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/neteq_impl_unittest.cc229
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/neteq_stereo_unittest.cc418
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/neteq_tests.gypi198
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/neteq_unittest.cc1219
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/normal.cc190
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/normal.h68
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/normal_unittest.cc40
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/packet.h88
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/packet_buffer.cc288
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/packet_buffer.h144
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/packet_buffer_unittest.cc560
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/payload_splitter.cc372
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/payload_splitter.h83
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/payload_splitter_unittest.cc694
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/post_decode_vad.cc87
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/post_decode_vad.h72
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/post_decode_vad_unittest.cc25
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/preemptive_expand.cc101
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/preemptive_expand.h74
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/random_vector.cc57
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/random_vector.h50
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/random_vector_unittest.cc25
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/rtcp.cc95
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/rtcp.h58
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/statistics_calculator.cc170
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/statistics_calculator.h109
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/sync_buffer.cc107
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/sync_buffer.h100
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/sync_buffer_unittest.cc164
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/time_stretch.cc216
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/time_stretch.h111
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/time_stretch_unittest.cc31
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/timestamp_scaler.cc111
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/timestamp_scaler.h68
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/timestamp_scaler_unittest.cc327
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/tools/audio_loop.cc57
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/tools/audio_loop.h60
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/tools/input_audio_file.cc51
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/tools/input_audio_file.h51
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/tools/neteq_rtpplay.cc423
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/tools/rtp_generator.cc48
-rw-r--r--chromium/third_party/webrtc/modules/audio_coding/neteq4/tools/rtp_generator.h57
-rw-r--r--chromium/third_party/webrtc/modules/audio_conference_mixer/interface/audio_conference_mixer.h2
-rw-r--r--chromium/third_party/webrtc/modules/audio_conference_mixer/source/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc726
-rw-r--r--chromium/third_party/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.h50
-rw-r--r--chromium/third_party/webrtc/modules/audio_conference_mixer/source/audio_frame_manipulator.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_conference_mixer/source/memory_pool_posix.h34
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/Android.mk3
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/OWNERS7
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/android/audio_device_template.h16
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/android/fine_audio_buffer.h2
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/android/fine_audio_buffer_unittest.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/android/opensles_input.cc10
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/android/opensles_input.h4
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/android/opensles_output.cc11
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/android/opensles_output.h4
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/android/single_rw_fifo.cc16
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/android/single_rw_fifo.h2
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/android/single_rw_fifo_unittest.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/audio_device.gypi71
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/audio_device_buffer.cc7
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/audio_device_generic.h6
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/audio_device_impl.cc58
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/audio_device_impl.h2
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/audio_device_tests.isolate12
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/dummy/audio_device_dummy.cc4
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/dummy/audio_device_dummy.h2
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/dummy/file_audio_device.cc586
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/dummy/file_audio_device.h202
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/dummy/file_audio_device_factory.cc43
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/dummy/file_audio_device_factory.h41
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/include/audio_device.h2
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/include/audio_device_defines.h41
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/include/fake_audio_device.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/ios/audio_device_ios.cc70
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/ios/audio_device_ios.h2
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc69
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/linux/audio_device_alsa_linux.h15
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc58
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/linux/audio_device_pulse_linux.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.h2
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/mac/audio_device_mac.cc1
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/mac/audio_device_mac.h13
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/main/source/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/win/audio_device_core_win.cc38
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/win/audio_device_core_win.h2
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/win/audio_device_wave_win.cc54
-rw-r--r--chromium/third_party/webrtc/modules/audio_device/win/audio_device_wave_win.h2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/OWNERS6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/Android.mk9
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/aec_core.c102
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/aec_core.h31
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_internal.h19
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_mips.c774
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/aec_core_neon.c304
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/aec_rdft.c15
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/aec_rdft.h21
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/aec_rdft_mips.c1213
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/echo_cancellation.c58
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/include/echo_cancellation.h40
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec/system_delay_unittest.cc21
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core.c3
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aecm/aecm_core_c.c2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.c29
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aecm/include/echo_control_mobile.h44
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/analog_agc.c16
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/analog_agc.h1
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/agc/digital_agc.c11
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/audio_buffer.cc496
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/audio_buffer.h117
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi50
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl.cc646
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl.h132
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/audio_processing_impl_unittest.cc74
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/audio_processing_tests.gypi28
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/common.h76
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/debug.proto19
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl.cc70
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl.h25
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl_unittest.cc31
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_cancellation_impl_wrapper.h35
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_control_mobile_impl.cc27
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/echo_control_mobile_impl.h11
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/gain_control_impl.cc43
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/gain_control_impl.h11
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/gen_core_neon_offsets.gyp45
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/gen_core_neon_offsets_chromium.gyp45
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/high_pass_filter_impl.cc20
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/high_pass_filter_impl.h10
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/include/audio_processing.h164
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/include/mock_audio_processing.h54
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_estimator_impl.cc132
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/level_estimator_impl.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/lib_core_neon_offsets.gypi51
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/noise_suppression_impl.cc35
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/noise_suppression_impl.h12
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/include/noise_suppression.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/noise_suppression.c4
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/ns_core.c78
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/ns_core.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core.c279
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core.h37
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core_c.c273
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/ns/nsx_core_mips.c1008
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/processing_component.cc27
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/processing_component.h8
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/rms_level.cc61
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/rms_level.h57
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/splitting_filter.cc33
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/splitting_filter.h63
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/typing_detection.cc90
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/typing_detection.h93
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator.c106
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator.h74
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_unittest.cc143
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.c67
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h87
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/utility/ring_buffer_unittest.cc11
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/voice_detection_impl.cc27
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/voice_detection_impl.h10
-rw-r--r--chromium/third_party/webrtc/modules/bitrate_controller/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/bitrate_controller/bitrate_controller_impl.cc287
-rw-r--r--chromium/third_party/webrtc/modules/bitrate_controller/bitrate_controller_impl.h87
-rw-r--r--chromium/third_party/webrtc/modules/bitrate_controller/bitrate_controller_unittest.cc211
-rw-r--r--chromium/third_party/webrtc/modules/bitrate_controller/include/bitrate_controller.h8
-rw-r--r--chromium/third_party/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc304
-rw-r--r--chromium/third_party/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h59
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/desktop_and_cursor_composer.cc14
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/desktop_and_cursor_composer.h1
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc54
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/desktop_capture.gypi14
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/desktop_capture_options.cc7
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/desktop_capture_options.h33
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/desktop_capture_types.h11
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/desktop_capturer.h7
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/desktop_geometry.h4
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/desktop_region.h2
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/differ.h2
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/differ_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/mac/desktop_configuration.h12
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/mac/desktop_configuration.mm64
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.cc91
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h66
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/mac/osx_version.cc54
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/mac/osx_version.h16
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/mac/scoped_pixel_buffer_object.h2
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/mouse_cursor.cc10
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/mouse_cursor.h10
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h3
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor_mac.mm91
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor_null.cc5
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor_unittest.cc15
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc75
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc8
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/screen_capture_frame_queue.cc1
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/screen_capturer.h19
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/screen_capturer_helper.cc1
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/screen_capturer_mac.mm451
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/screen_capturer_mock_objects.h2
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/screen_capturer_unittest.cc27
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/screen_capturer_win.cc360
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/screen_capturer_x11.cc16
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/shared_memory.h2
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/win/cursor.cc2
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/win/cursor_unittest.cc6
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/win/desktop.h4
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/win/scoped_gdi_object.h2
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/win/scoped_thread_desktop.h2
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/win/screen_capture_utils.cc92
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/win/screen_capture_utils.h35
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc324
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.h99
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc461
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h159
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/win/window_capture_utils.cc46
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/win/window_capture_utils.h25
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/window_capturer.h12
-rwxr-xr-xchromium/third_party/webrtc/modules/desktop_capture/window_capturer_mac.cc189
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/window_capturer_mac.mm230
-rwxr-xr-xchromium/third_party/webrtc/modules/desktop_capture/window_capturer_null.cc6
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/window_capturer_win.cc44
-rwxr-xr-xchromium/third_party/webrtc/modules/desktop_capture/window_capturer_x11.cc90
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/x11/x_error_trap.h2
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.cc12
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.h3
-rw-r--r--chromium/third_party/webrtc/modules/interface/module_common_types.h71
-rw-r--r--chromium/third_party/webrtc/modules/media_file/source/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/media_file/source/avi_file.cc47
-rw-r--r--chromium/third_party/webrtc/modules/media_file/source/avi_file.h5
-rw-r--r--chromium/third_party/webrtc/modules/media_file/source/media_file_utility.cc1
-rw-r--r--chromium/third_party/webrtc/modules/modules.gyp120
-rw-r--r--chromium/third_party/webrtc/modules/modules_tests.isolate22
-rw-r--r--chromium/third_party/webrtc/modules/modules_unittests.isolate142
-rw-r--r--chromium/third_party/webrtc/modules/pacing/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/pacing/include/paced_sender.h22
-rw-r--r--chromium/third_party/webrtc/modules/pacing/paced_sender.cc39
-rw-r--r--chromium/third_party/webrtc/modules/pacing/paced_sender_unittest.cc46
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/OWNERS6
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/bwe_simulations.cc162
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h32
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/include/rtp_to_ntp.h43
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc128
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/overuse_detector.h21
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/rate_statistics.cc2
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/rate_statistics.h2
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi60
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc85
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream_unittest.cc5
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc36
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h5
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimators_test.cc251
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/remote_rate_control.cc58
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/remote_rate_control.h2
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/rtp_to_ntp.cc119
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/rtp_to_ntp_unittest.cc163
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp.cc74
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp.h36
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp_play.cc116
-rw-r--r--chromium/third_party/webrtc/modules/remote_bitrate_estimator/tools/rtp_to_text.cc80
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/interface/fec_receiver.h2
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/interface/receive_statistics.h39
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/interface/remote_ntp_time_estimator.h50
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h8
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h42
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h3
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h12
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc17
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.h3
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/fec_test_helper.h3
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc69
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction.h4
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h4
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc10
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/producer_fec_unittest.cc2
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.cc362
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h61
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/receive_statistics_unittest.cc173
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/remote_ntp_time_estimator.cc85
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/remote_ntp_time_estimator_unittest.cc112
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc1
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc695
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtcp_packet.h726
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtcp_packet_unittest.cc592
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc98
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h4
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtcp_receiver_help.h2
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc1
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc107
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtcp_sender.h7
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc3
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtcp_utility.cc38
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_fec_unittest.cc39
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.h2
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp8_test_helper.h2
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_header_extension.h10
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_header_parser.cc3
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_packet_history.cc92
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h13
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_packet_history_unittest.cc51
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc46
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc3
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc9
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.cc37
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h3
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc32
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h4
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_rtcp.gypi4
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc528
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h38
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc438
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_sender.cc368
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_sender.h58
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc89
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h13
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc165
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc28
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h3
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_utility.cc163
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_utility.h5
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_utility_unittest.cc18
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/ssrc_database.cc5
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator.h2
-rw-r--r--chromium/third_party/webrtc/modules/utility/interface/mock/mock_process_thread.h29
-rw-r--r--chromium/third_party/webrtc/modules/utility/interface/process_thread.h2
-rw-r--r--chromium/third_party/webrtc/modules/utility/source/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/utility/source/audio_frame_operations.cc1
-rw-r--r--chromium/third_party/webrtc/modules/utility/source/audio_frame_operations_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/modules/utility/source/file_player_impl.cc117
-rw-r--r--chromium/third_party/webrtc/modules/utility/source/file_player_unittests.cc106
-rw-r--r--chromium/third_party/webrtc/modules/utility/source/file_recorder_impl.cc165
-rw-r--r--chromium/third_party/webrtc/modules/utility/source/file_recorder_impl.h32
-rw-r--r--chromium/third_party/webrtc/modules/utility/source/frame_scaler.cc1
-rw-r--r--chromium/third_party/webrtc/modules/utility/source/process_thread_impl.cc56
-rw-r--r--chromium/third_party/webrtc/modules/utility/source/process_thread_impl.h8
-rw-r--r--chromium/third_party/webrtc/modules/utility/source/rtp_dump_impl.cc19
-rw-r--r--chromium/third_party/webrtc/modules/utility/source/video_coder.cc5
-rw-r--r--chromium/third_party/webrtc/modules/utility/source/video_coder.h2
-rw-r--r--chromium/third_party/webrtc/modules/utility/source/video_frames_queue.cc80
-rw-r--r--chromium/third_party/webrtc/modules/utility/source/video_frames_queue.h8
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/OWNERS8
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/android/device_info_android.cc77
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/android/device_info_android.h11
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/android/video_capture_android.cc94
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/device_info_impl.cc29
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/ensure_initialized.cc63
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/ensure_initialized.h19
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/include/mock/mock_video_capture.h50
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/include/video_capture.h19
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/ios/device_info_ios.mm4
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/ios/device_info_ios_objc.mm4
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/ios/rtc_video_capture_ios_objc.h39
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/ios/rtc_video_capture_ios_objc.mm377
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/ios/video_capture_ios.h4
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/ios/video_capture_ios.mm13
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/ios/video_capture_ios_objc.h40
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/ios/video_capture_ios_objc.mm287
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit_info_objc.mm7
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/video_capture.gypi28
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/video_capture_impl.cc67
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/video_capture_impl.h15
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/video_capture_tests.isolate12
-rw-r--r--chromium/third_party/webrtc/modules/video_capture/windows/sink_filter_ds.cc2
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/codecs/i420/main/source/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/codecs/test_framework/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/codecs/test_framework/normal_async_test.cc17
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/codecs/test_framework/normal_async_test.h1
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/codecs/test_framework/test.h2
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/codecs/test_framework/unit_test.cc4
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/codecs/tools/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/codecs/tools/video_codecs_tools.gypi1
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/codecs/vp8/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/codecs/vp8/vp8.gyp1
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/codecs/vp8/vp8_factory.cc24
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc24
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/codecs/vp8/vp8_impl.h4
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc2
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/interface/video_coding.h6
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/Android.mk3
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/codec_database.cc66
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/codec_database.h3
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/encoded_frame.cc8
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/encoded_frame.h2
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/frame_buffer.cc24
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/generic_decoder.cc35
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/generic_decoder.h9
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/generic_encoder.cc111
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/generic_encoder.h23
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/jitter_buffer.cc121
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/jitter_buffer.h10
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/jitter_buffer_unittest.cc34
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/jitter_estimator.cc47
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/media_optimization.cc270
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/media_optimization.h136
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/media_optimization_unittest.cc32
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/packet.cc4
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/packet.h2
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/receiver.cc54
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/receiver.h5
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/receiver_unittest.cc2
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/rtt_filter.cc24
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/rtt_filter.h4
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/session_info.cc6
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/session_info.h1
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/timestamp_extrapolator.cc248
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/timestamp_extrapolator.h63
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/timing.cc56
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/timing.h8
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/video_coding.gypi2
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/video_coding_impl.cc53
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/video_coding_impl.h24
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/video_coding_robustness_unittest.cc2
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/video_coding_test.gypi1
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/video_receiver.cc156
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/video_receiver_unittest.cc2
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/video_sender.cc166
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/main/source/video_sender_unittest.cc7
-rw-r--r--chromium/third_party/webrtc/modules/video_coding/utility/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/video_processing/main/interface/video_processing.h8
-rw-r--r--chromium/third_party/webrtc/modules/video_processing/main/source/OWNERS5
-rw-r--r--chromium/third_party/webrtc/modules/video_processing/main/source/brighten.cc7
-rw-r--r--chromium/third_party/webrtc/modules/video_processing/main/source/brightness_detection.cc7
-rw-r--r--chromium/third_party/webrtc/modules/video_processing/main/source/color_enhancement.cc60
-rw-r--r--chromium/third_party/webrtc/modules/video_processing/main/source/deflickering.cc12
-rw-r--r--chromium/third_party/webrtc/modules/video_processing/main/source/denoising.cc3
-rw-r--r--chromium/third_party/webrtc/modules/video_processing/main/source/frame_preprocessor.cc14
-rw-r--r--chromium/third_party/webrtc/modules/video_processing/main/source/frame_preprocessor.h4
-rw-r--r--chromium/third_party/webrtc/modules/video_processing/main/source/video_decimator.cc31
-rw-r--r--chromium/third_party/webrtc/modules/video_processing/main/source/video_decimator.h4
-rw-r--r--chromium/third_party/webrtc/modules/video_processing/main/source/video_processing_impl.cc19
-rw-r--r--chromium/third_party/webrtc/modules/video_processing/main/source/video_processing_impl.h3
-rw-r--r--chromium/third_party/webrtc/modules/video_render/OWNERS7
-rw-r--r--chromium/third_party/webrtc/modules/video_render/android/video_render_android_native_opengl2.cc3
-rw-r--r--chromium/third_party/webrtc/modules/video_render/ios/open_gles20.mm4
-rw-r--r--chromium/third_party/webrtc/modules/video_render/ios/video_render_ios_channel.mm4
-rw-r--r--chromium/third_party/webrtc/modules/video_render/ios/video_render_ios_gles20.mm6
-rw-r--r--chromium/third_party/webrtc/modules/video_render/ios/video_render_ios_impl.h2
-rw-r--r--chromium/third_party/webrtc/modules/video_render/ios/video_render_ios_impl.mm13
-rw-r--r--chromium/third_party/webrtc/modules/video_render/ios/video_render_ios_view.h10
-rw-r--r--chromium/third_party/webrtc/modules/video_render/ios/video_render_ios_view.mm52
-rw-r--r--chromium/third_party/webrtc/modules/video_render/video_render.gypi25
-rw-r--r--chromium/third_party/webrtc/modules/video_render/video_render_frames.cc124
-rw-r--r--chromium/third_party/webrtc/modules/video_render/video_render_frames.h9
-rw-r--r--chromium/third_party/webrtc/modules/video_render/video_render_tests.isolate12
-rw-r--r--chromium/third_party/webrtc/overrides/webrtc/base/basictypes.h108
-rw-r--r--chromium/third_party/webrtc/overrides/webrtc/base/constructormagic.h20
-rw-r--r--chromium/third_party/webrtc/overrides/webrtc/base/logging.cc318
-rw-r--r--chromium/third_party/webrtc/overrides/webrtc/base/logging.h221
-rw-r--r--chromium/third_party/webrtc/overrides/webrtc/base/win32socketinit.cc28
-rw-r--r--chromium/third_party/webrtc/supplement.gypi6
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/aligned_malloc.h12
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/atomic32.h2
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/clock.h26
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/compile_assert.h11
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/constructor_magic.h50
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/critical_section_wrapper.h23
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/field_trial.h70
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/list_wrapper.h107
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/rtp_to_ntp.h50
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/rw_lock_wrapper.h30
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/scoped_ptr.h153
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/scoped_refptr.h2
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/scoped_vector.h149
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/stl_util.h265
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/template_util.h2
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/thread_annotations.h99
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/timestamp_extrapolator.h56
-rw-r--r--chromium/third_party/webrtc/system_wrappers/interface/utf_util_win.h57
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/Android.mk7
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/OWNERS6
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/aligned_malloc_unittest.cc26
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/android/cpu-features.c397
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/android/cpu-features.h56
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/clock.cc52
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/clock_unittest.cc1
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/cpu_features_android.c4
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/critical_section_unittest.cc4
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/field_trial_default.cc22
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/list_no_stl.cc241
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/list_no_stl.h78
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/list_stl.cc207
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/list_stl.h65
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/list_unittest.cc475
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/move.h11
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/rtp_to_ntp.cc150
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/rtp_to_ntp_unittest.cc146
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/scoped_vector_unittest.cc328
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/stl_util_unittest.cc250
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/system_wrappers.gyp48
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/system_wrappers_tests.gyp8
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/system_wrappers_unittests.isolate12
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/timestamp_extrapolator.cc230
-rw-r--r--chromium/third_party/webrtc/system_wrappers/source/trace_impl.cc7
-rw-r--r--chromium/third_party/webrtc/test/libtest/libtest.gyp26
-rw-r--r--chromium/third_party/webrtc/test/metrics.gyp54
-rw-r--r--chromium/third_party/webrtc/test/metrics_unittests.isolate38
-rw-r--r--chromium/third_party/webrtc/test/test.gyp49
-rw-r--r--chromium/third_party/webrtc/test/test_support_unittests.isolate14
-rw-r--r--chromium/third_party/webrtc/test/testsupport/fileutils.cc41
-rw-r--r--chromium/third_party/webrtc/test/testsupport/fileutils.h9
-rw-r--r--chromium/third_party/webrtc/test/testsupport/fileutils_unittest.cc13
-rw-r--r--chromium/third_party/webrtc/test/testsupport/metrics/video_metrics.cc4
-rw-r--r--chromium/third_party/webrtc/test/webrtc_test_common.gyp124
-rw-r--r--chromium/third_party/webrtc/tools/OWNERS9
-rwxr-xr-xchromium/third_party/webrtc/tools/barcode_tools/barcode_decoder.py1
-rw-r--r--chromium/third_party/webrtc/tools/frame_analyzer/video_quality_analysis.cc89
-rw-r--r--chromium/third_party/webrtc/tools/frame_analyzer/video_quality_analysis.h15
-rw-r--r--chromium/third_party/webrtc/tools/frame_editing/frame_editing_lib.cc2
-rw-r--r--chromium/third_party/webrtc/tools/frame_editing/frame_editing_unittest.cc8
-rw-r--r--chromium/third_party/webrtc/tools/loopback_test/OWNERS1
-rw-r--r--chromium/third_party/webrtc/tools/loopback_test/README12
-rw-r--r--chromium/third_party/webrtc/tools/loopback_test/adapter.js211
-rw-r--r--chromium/third_party/webrtc/tools/loopback_test/loopback_test.html227
-rw-r--r--chromium/third_party/webrtc/tools/loopback_test/loopback_test.js240
-rwxr-xr-xchromium/third_party/webrtc/tools/loopback_test/record-test.sh60
-rwxr-xr-xchromium/third_party/webrtc/tools/loopback_test/run-server.sh15
-rw-r--r--chromium/third_party/webrtc/tools/loopback_test/stat_tracker.js94
-rw-r--r--chromium/third_party/webrtc/tools/psnr_ssim_analyzer/psnr_ssim_analyzer.cc29
-rw-r--r--chromium/third_party/webrtc/tools/simple_command_line_parser.h2
-rw-r--r--chromium/third_party/webrtc/tools/tools.gyp6
-rw-r--r--chromium/third_party/webrtc/tools/tools_unittests.isolate16
-rw-r--r--chromium/third_party/webrtc/typedefs.h20
-rw-r--r--chromium/third_party/webrtc/video/OWNERS5
-rw-r--r--chromium/third_party/webrtc/video/bitrate_estimator_tests.cc79
-rw-r--r--chromium/third_party/webrtc/video/call.cc240
-rw-r--r--chromium/third_party/webrtc/video/call_perf_tests.cc479
-rw-r--r--chromium/third_party/webrtc/video/call_tests.cc934
-rw-r--r--chromium/third_party/webrtc/video/full_stack.cc143
-rw-r--r--chromium/third_party/webrtc/video/loopback.cc92
-rw-r--r--chromium/third_party/webrtc/video/rampup_tests.cc539
-rw-r--r--chromium/third_party/webrtc/video/receive_statistics_proxy.cc100
-rw-r--r--chromium/third_party/webrtc/video/receive_statistics_proxy.h89
-rw-r--r--chromium/third_party/webrtc/video/send_statistics_proxy.cc123
-rw-r--r--chromium/third_party/webrtc/video/send_statistics_proxy.h93
-rw-r--r--chromium/third_party/webrtc/video/send_statistics_proxy_unittest.cc244
-rw-r--r--chromium/third_party/webrtc/video/transport_adapter.cc16
-rw-r--r--chromium/third_party/webrtc/video/transport_adapter.h5
-rw-r--r--chromium/third_party/webrtc/video/video_receive_stream.cc109
-rw-r--r--chromium/third_party/webrtc/video/video_receive_stream.h19
-rw-r--r--chromium/third_party/webrtc/video/video_send_stream.cc352
-rw-r--r--chromium/third_party/webrtc/video/video_send_stream.h47
-rw-r--r--chromium/third_party/webrtc/video/video_send_stream_tests.cc742
-rw-r--r--chromium/third_party/webrtc/video/webrtc_video.gypi4
-rw-r--r--chromium/third_party/webrtc/video_engine/Android.mk2
-rw-r--r--chromium/third_party/webrtc/video_engine/OWNERS7
-rw-r--r--chromium/third_party/webrtc/video_engine/call_stats.cc1
-rw-r--r--chromium/third_party/webrtc/video_engine/call_stats.h2
-rw-r--r--chromium/third_party/webrtc/video_engine/encoder_state_feedback.h2
-rw-r--r--chromium/third_party/webrtc/video_engine/encoder_state_feedback_unittest.cc21
-rw-r--r--chromium/third_party/webrtc/video_engine/include/vie_base.h118
-rw-r--r--chromium/third_party/webrtc/video_engine/include/vie_encryption.h51
-rw-r--r--chromium/third_party/webrtc/video_engine/include/vie_errors.h6
-rw-r--r--chromium/third_party/webrtc/video_engine/include/vie_image_process.h7
-rw-r--r--chromium/third_party/webrtc/video_engine/include/vie_network.h14
-rw-r--r--chromium/third_party/webrtc/video_engine/include/vie_render.h11
-rw-r--r--chromium/third_party/webrtc/video_engine/include/vie_rtp_rtcp.h53
-rw-r--r--chromium/third_party/webrtc/video_engine/mock/mock_vie_frame_provider_base.h33
-rw-r--r--chromium/third_party/webrtc/video_engine/overuse_frame_detector.cc342
-rw-r--r--chromium/third_party/webrtc/video_engine/overuse_frame_detector.h77
-rw-r--r--chromium/third_party/webrtc/video_engine/overuse_frame_detector_unittest.cc402
-rw-r--r--chromium/third_party/webrtc/video_engine/stream_synchronization.cc37
-rw-r--r--chromium/third_party/webrtc/video_engine/stream_synchronization.h4
-rw-r--r--chromium/third_party/webrtc/video_engine/stream_synchronization_unittest.cc5
-rw-r--r--chromium/third_party/webrtc/video_engine/test/auto_test/vie_auto_test.gypi6
-rw-r--r--chromium/third_party/webrtc/video_engine/test/auto_test/vie_auto_test.isolate14
-rw-r--r--chromium/third_party/webrtc/video_engine/test/libvietest/libvietest.gypi21
-rw-r--r--chromium/third_party/webrtc/video_engine/video_engine_core.gypi10
-rw-r--r--chromium/third_party/webrtc/video_engine/video_engine_core_unittests.isolate12
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_base_impl.cc196
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_base_impl.h6
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_capture_impl.cc157
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_capturer.cc201
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_capturer.h15
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_capturer_unittest.cc263
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_channel.cc750
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_channel.h31
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_channel_group.cc107
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_channel_group.h6
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_channel_manager.cc107
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_channel_manager.h19
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_codec_impl.cc338
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_codec_unittest.cc230
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_defines.h10
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_encoder.cc390
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_encoder.h9
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_encryption_impl.cc111
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_encryption_impl.h43
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_external_codec_impl.cc75
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_file_image.cc20
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_frame_provider_base.cc24
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_image_process_impl.cc74
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_impl.cc77
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_impl.h9
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_input_manager.cc88
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_manager_base.h19
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_network_impl.cc92
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_network_impl.h6
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_receiver.cc224
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_receiver.h31
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_remb.cc23
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_remb_unittest.cc17
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_render_impl.cc119
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_render_manager.cc93
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_render_manager.h6
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_renderer.cc2
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_rtp_rtcp_impl.cc582
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_rtp_rtcp_impl.h13
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_sender.cc103
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_sender.h9
-rw-r--r--chromium/third_party/webrtc/video_engine/vie_sync_module.cc53
-rw-r--r--chromium/third_party/webrtc/video_engine_tests.isolate14
-rw-r--r--chromium/third_party/webrtc/video_receive_stream.h78
-rw-r--r--chromium/third_party/webrtc/video_send_stream.h121
-rw-r--r--chromium/third_party/webrtc/voice_engine/Android.mk5
-rw-r--r--chromium/third_party/webrtc/voice_engine/OWNERS7
-rw-r--r--chromium/third_party/webrtc/voice_engine/channel.cc1505
-rw-r--r--chromium/third_party/webrtc/voice_engine/channel.h224
-rw-r--r--chromium/third_party/webrtc/voice_engine/channel_manager.h2
-rw-r--r--chromium/third_party/webrtc/voice_engine/dtmf_inband_queue.cc8
-rw-r--r--chromium/third_party/webrtc/voice_engine/include/mock/fake_voe_external_media.h2
-rw-r--r--chromium/third_party/webrtc/voice_engine/include/voe_base.h24
-rw-r--r--chromium/third_party/webrtc/voice_engine/include/voe_call_report.h87
-rw-r--r--chromium/third_party/webrtc/voice_engine/include/voe_codec.h48
-rw-r--r--chromium/third_party/webrtc/voice_engine/include/voe_dtmf.h16
-rw-r--r--chromium/third_party/webrtc/voice_engine/include/voe_encryption.h63
-rw-r--r--chromium/third_party/webrtc/voice_engine/include/voe_errors.h8
-rw-r--r--chromium/third_party/webrtc/voice_engine/include/voe_external_media.h54
-rw-r--r--chromium/third_party/webrtc/voice_engine/include/voe_file.h43
-rw-r--r--chromium/third_party/webrtc/voice_engine/include/voe_hardware.h53
-rw-r--r--chromium/third_party/webrtc/voice_engine/include/voe_network.h11
-rw-r--r--chromium/third_party/webrtc/voice_engine/include/voe_rtp_rtcp.h119
-rw-r--r--chromium/third_party/webrtc/voice_engine/include/voe_volume_control.h18
-rw-r--r--chromium/third_party/webrtc/voice_engine/output_mixer.cc64
-rw-r--r--chromium/third_party/webrtc/voice_engine/output_mixer.h12
-rw-r--r--chromium/third_party/webrtc/voice_engine/output_mixer_internal.cc70
-rw-r--r--chromium/third_party/webrtc/voice_engine/output_mixer_internal.h33
-rw-r--r--chromium/third_party/webrtc/voice_engine/output_mixer_unittest.cc221
-rw-r--r--chromium/third_party/webrtc/voice_engine/transmit_mixer.cc314
-rw-r--r--chromium/third_party/webrtc/voice_engine/transmit_mixer.h41
-rw-r--r--chromium/third_party/webrtc/voice_engine/utility.cc236
-rw-r--r--chromium/third_party/webrtc/voice_engine/utility.h79
-rw-r--r--chromium/third_party/webrtc/voice_engine/utility_unittest.cc263
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_auto_test.isolate12
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_base_impl.cc336
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_base_impl.h47
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_call_report_impl.cc383
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_call_report_impl.h57
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_codec_impl.cc217
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_codec_impl.h20
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_codec_unittest.cc50
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_dtmf_impl.cc46
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_dtmf_impl.h5
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_encryption_impl.cc96
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_encryption_impl.h40
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_external_media_impl.cc197
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_external_media_impl.h17
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_file_impl.cc762
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_file_impl.h41
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_hardware_impl.cc237
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_hardware_impl.h19
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_neteq_stats_impl.cc2
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_neteq_stats_unittest.cc285
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_network_impl.cc12
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_network_impl.h4
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_rtp_rtcp_impl.cc368
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_rtp_rtcp_impl.h58
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_video_sync_impl.cc8
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_volume_control_impl.cc158
-rw-r--r--chromium/third_party/webrtc/voice_engine/voe_volume_control_impl.h8
-rw-r--r--chromium/third_party/webrtc/voice_engine/voice_engine.gyp32
-rw-r--r--chromium/third_party/webrtc/voice_engine/voice_engine_defines.h57
-rw-r--r--chromium/third_party/webrtc/voice_engine/voice_engine_impl.cc26
-rw-r--r--chromium/third_party/webrtc/voice_engine/voice_engine_impl.h18
-rw-r--r--chromium/third_party/webrtc/voice_engine/voice_engine_unittests.isolate12
-rw-r--r--chromium/third_party/webrtc/webrtc.gyp5
-rw-r--r--chromium/third_party/webrtc/webrtc_examples.gyp93
-rw-r--r--chromium/third_party/webrtc/webrtc_perf_tests.isolate18
-rw-r--r--chromium/third_party/webrtc/webrtc_tests.gypi45
-rw-r--r--chromium/third_party/webtreemap/OWNERS2
-rw-r--r--chromium/third_party/webtreemap/README.chromium21
-rw-r--r--chromium/third_party/webtreemap/src/COPYING202
-rw-r--r--chromium/third_party/webtreemap/src/README.markdown63
-rw-r--r--chromium/third_party/webtreemap/src/webtreemap.css84
-rw-r--r--chromium/third_party/webtreemap/src/webtreemap.js232
-rw-r--r--chromium/third_party/widevine/cdm/BUILD.gn102
-rw-r--r--chromium/third_party/widevine/cdm/widevine_cdm.gyp65
-rw-r--r--chromium/third_party/widevine/cdm/widevine_cdm_common.h1
-rw-r--r--chromium/third_party/win_toolchain/README.chromium12
-rw-r--r--chromium/third_party/win_toolchain/toolchain.sha12
-rw-r--r--chromium/third_party/wtl/BUILD.gn14
-rw-r--r--chromium/third_party/yasm/BUILD.gn411
-rw-r--r--chromium/third_party/yasm/README.chromium3
-rw-r--r--chromium/third_party/yasm/run_yasm.py51
-rw-r--r--chromium/third_party/yasm/source/config/android/config.h2
-rw-r--r--chromium/third_party/yasm/yasm_assemble.gni185
-rw-r--r--chromium/third_party/zlib/BUILD.gn102
-rw-r--r--chromium/third_party/zlib/contrib/minizip/unzip.c5
-rw-r--r--chromium/third_party/zlib/google/zip.cc45
-rw-r--r--chromium/third_party/zlib/google/zip.h2
-rw-r--r--chromium/third_party/zlib/google/zip_internal.cc70
-rw-r--r--chromium/third_party/zlib/google/zip_internal.h14
-rw-r--r--chromium/third_party/zlib/google/zip_reader.cc185
-rw-r--r--chromium/third_party/zlib/google/zip_reader.h70
-rw-r--r--chromium/third_party/zlib/google/zip_reader_unittest.cc233
-rw-r--r--chromium/third_party/zlib/google/zip_unittest.cc127
-rw-r--r--chromium/tools/DEPS6
-rw-r--r--chromium/tools/OWNERS3
-rw-r--r--chromium/tools/PRESUBMIT.py50
-rw-r--r--chromium/tools/android/android_tools.gyp10
-rw-r--r--chromium/tools/android/file_poller/file_poller.gyp18
-rw-r--r--chromium/tools/android/forwarder2/forwarder.gyp20
-rw-r--r--chromium/tools/android/memdump/memdump.gyp36
-rw-r--r--chromium/tools/android/ps_ext/ps_ext.gyp36
-rw-r--r--chromium/tools/android/purge_ashmem/purge_ashmem.gyp13
-rw-r--r--chromium/tools/android/run_pie/run_pie.gyp49
-rw-r--r--chromium/tools/bash-completion25
-rwxr-xr-xchromium/tools/bisect-builds.py859
-rwxr-xr-xchromium/tools/bisect-manual-test.py53
-rwxr-xr-xchromium/tools/bisect-perf-regression.py2948
-rw-r--r--chromium/tools/bisect_test.py53
-rw-r--r--chromium/tools/bisect_utils.py503
-rwxr-xr-xchromium/tools/check_ecs_deps/check_ecs_deps.py202
-rwxr-xr-xchromium/tools/checkbins/checkbins.py109
-rwxr-xr-xchromium/tools/checkdeps/builddeps.py348
-rwxr-xr-xchromium/tools/checkdeps/checkdeps.py229
-rwxr-xr-xchromium/tools/checkdeps/checkdeps_test.py177
-rw-r--r--chromium/tools/checkdeps/cpp_checker.py113
-rwxr-xr-xchromium/tools/checkdeps/graphdeps.py407
-rw-r--r--chromium/tools/checkdeps/java_checker.py107
-rw-r--r--chromium/tools/checkdeps/rules.py178
-rw-r--r--chromium/tools/checklicenses/OWNERS3
-rwxr-xr-xchromium/tools/checklicenses/checklicenses.py506
-rw-r--r--chromium/tools/checkperms/OWNERS1
-rw-r--r--chromium/tools/checkperms/PRESUBMIT.py27
-rwxr-xr-xchromium/tools/checkperms/checkperms.py544
-rw-r--r--chromium/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp1486
-rw-r--r--chromium/tools/clang/blink_gc_plugin/Config.h173
-rw-r--r--chromium/tools/clang/blink_gc_plugin/Edge.cpp75
-rw-r--r--chromium/tools/clang/blink_gc_plugin/Edge.h245
-rw-r--r--chromium/tools/clang/blink_gc_plugin/JsonWriter.h73
-rw-r--r--chromium/tools/clang/blink_gc_plugin/Makefile21
-rw-r--r--chromium/tools/clang/blink_gc_plugin/NeedsTracing.h31
-rw-r--r--chromium/tools/clang/blink_gc_plugin/OWNERS3
-rw-r--r--chromium/tools/clang/blink_gc_plugin/README.chromium2
-rw-r--r--chromium/tools/clang/blink_gc_plugin/RecordInfo.cpp515
-rw-r--r--chromium/tools/clang/blink_gc_plugin/RecordInfo.h173
-rw-r--r--chromium/tools/clang/blink_gc_plugin/TracingStatus.h29
-rwxr-xr-xchromium/tools/clang/blink_gc_plugin/process-graph.py464
-rw-r--r--chromium/tools/clang/plugins/ChromeClassTester.cpp34
-rw-r--r--chromium/tools/clang/plugins/ChromeClassTester.h12
-rw-r--r--chromium/tools/clang/plugins/FindBadConstructs.cpp731
-rw-r--r--chromium/tools/clang/plugins/FindBadConstructsAction.cpp55
-rw-r--r--chromium/tools/clang/plugins/FindBadConstructsAction.h32
-rw-r--r--chromium/tools/clang/plugins/FindBadConstructsConsumer.cpp687
-rw-r--r--chromium/tools/clang/plugins/FindBadConstructsConsumer.h100
-rw-r--r--chromium/tools/clang/plugins/Makefile2
-rw-r--r--chromium/tools/clang/plugins/Options.h25
-rwxr-xr-xchromium/tools/clang/scripts/blink_gc_plugin_flags.sh31
-rwxr-xr-xchromium/tools/clang/scripts/package.sh105
-rwxr-xr-xchromium/tools/clang/scripts/repackage.sh63
-rwxr-xr-xchromium/tools/clang/scripts/update.py216
-rwxr-xr-xchromium/tools/clang/scripts/update.sh323
-rw-r--r--chromium/tools/code_coverage/croc.css102
-rwxr-xr-xchromium/tools/code_coverage/croc.py722
-rw-r--r--chromium/tools/code_coverage/croc_html.py451
-rw-r--r--chromium/tools/code_coverage/croc_scan.py164
-rwxr-xr-xchromium/tools/code_coverage/croc_scan_test.py187
-rwxr-xr-xchromium/tools/code_coverage/croc_test.py758
-rw-r--r--chromium/tools/code_coverage/example.croc197
-rw-r--r--chromium/tools/code_coverage/third_party/README.chromium11
-rw-r--r--chromium/tools/code_coverage/third_party/sorttable.js494
-rwxr-xr-xchromium/tools/compile_test/compile_test.py65
-rwxr-xr-xchromium/tools/coverity/coverity.py308
-rw-r--r--chromium/tools/cr/OWNERS2
-rw-r--r--chromium/tools/cr/README14
-rwxr-xr-xchromium/tools/cr/cr-bash-helpers.sh48
-rwxr-xr-xchromium/tools/cr/cr.sh14
-rw-r--r--chromium/tools/cr/cr/__init__.py15
-rw-r--r--chromium/tools/cr/cr/actions/__init__.py10
-rw-r--r--chromium/tools/cr/cr/actions/action.py49
-rw-r--r--chromium/tools/cr/cr/actions/adb.py144
-rw-r--r--chromium/tools/cr/cr/actions/builder.py72
-rw-r--r--chromium/tools/cr/cr/actions/debugger.py51
-rw-r--r--chromium/tools/cr/cr/actions/gdb.py40
-rw-r--r--chromium/tools/cr/cr/actions/gyp.py26
-rw-r--r--chromium/tools/cr/cr/actions/installer.py55
-rw-r--r--chromium/tools/cr/cr/actions/linux.py50
-rw-r--r--chromium/tools/cr/cr/actions/ninja.py86
-rw-r--r--chromium/tools/cr/cr/actions/runner.py87
-rw-r--r--chromium/tools/cr/cr/auto/__init__.py10
-rw-r--r--chromium/tools/cr/cr/auto/build/__init__.py5
-rw-r--r--chromium/tools/cr/cr/auto/client/__init__.py5
-rw-r--r--chromium/tools/cr/cr/auto/user/__init__.py5
-rw-r--r--chromium/tools/cr/cr/autocomplete.py27
-rw-r--r--chromium/tools/cr/cr/base/__init__.py5
-rw-r--r--chromium/tools/cr/cr/base/android.py116
-rw-r--r--chromium/tools/cr/cr/base/arch.py70
-rw-r--r--chromium/tools/cr/cr/base/buildtype.py58
-rw-r--r--chromium/tools/cr/cr/base/client.py215
-rw-r--r--chromium/tools/cr/cr/base/host.py149
-rw-r--r--chromium/tools/cr/cr/base/linux.py44
-rw-r--r--chromium/tools/cr/cr/base/platform.py70
-rw-r--r--chromium/tools/cr/cr/commands/__init__.py9
-rw-r--r--chromium/tools/cr/cr/commands/build.py81
-rw-r--r--chromium/tools/cr/cr/commands/command.py104
-rw-r--r--chromium/tools/cr/cr/commands/debug.py40
-rw-r--r--chromium/tools/cr/cr/commands/info.py43
-rw-r--r--chromium/tools/cr/cr/commands/init.py180
-rw-r--r--chromium/tools/cr/cr/commands/install.py36
-rw-r--r--chromium/tools/cr/cr/commands/prepare.py48
-rw-r--r--chromium/tools/cr/cr/commands/run.py50
-rw-r--r--chromium/tools/cr/cr/commands/select.py61
-rw-r--r--chromium/tools/cr/cr/commands/shell.py53
-rw-r--r--chromium/tools/cr/cr/commands/sync.py55
-rw-r--r--chromium/tools/cr/cr/config.py240
-rw-r--r--chromium/tools/cr/cr/context.py217
-rw-r--r--chromium/tools/cr/cr/fixups/__init__.py9
-rw-r--r--chromium/tools/cr/cr/fixups/arch.py54
-rw-r--r--chromium/tools/cr/cr/loader.py123
-rw-r--r--chromium/tools/cr/cr/plugin.py320
-rw-r--r--chromium/tools/cr/cr/targets/__init__.py9
-rw-r--r--chromium/tools/cr/cr/targets/chrome.py26
-rw-r--r--chromium/tools/cr/cr/targets/chromium_testshell.py29
-rw-r--r--chromium/tools/cr/cr/targets/content_shell.py28
-rw-r--r--chromium/tools/cr/cr/targets/target.py157
-rw-r--r--chromium/tools/cr/cr/visitor.py257
-rw-r--r--chromium/tools/cr/main.py94
-rw-r--r--chromium/tools/crx_id/PRESUBMIT.py27
-rw-r--r--chromium/tools/crx_id/__init__.py8
-rwxr-xr-xchromium/tools/crx_id/crx_id.py151
-rwxr-xr-xchromium/tools/crx_id/crx_id_unittest.py85
-rw-r--r--chromium/tools/crx_id/jebgalgnebhfojomionfpkfelancnnkf.crxbin1843 -> 0 bytes
-rw-r--r--chromium/tools/cygprofile/cygprofile.cc401
-rw-r--r--chromium/tools/cygprofile/cygprofile.gyp23
-rwxr-xr-xchromium/tools/cygprofile/mergetraces.py186
-rwxr-xr-xchromium/tools/cygprofile/patch_orderfile.py117
-rwxr-xr-xchromium/tools/cygprofile/symbolize.py251
-rw-r--r--chromium/tools/deps2git/PRESUBMIT.py32
-rw-r--r--chromium/tools/deps2git/WATCHLISTS23
-rw-r--r--chromium/tools/deps2git/codereview.settings4
-rwxr-xr-xchromium/tools/deps2git/deps2git.py228
-rw-r--r--chromium/tools/deps2git/deps2submodules.py168
-rwxr-xr-xchromium/tools/deps2git/deps2submodules_unittest.py84
-rw-r--r--chromium/tools/deps2git/deps_utils.py135
-rw-r--r--chromium/tools/deps2git/git_tools.py210
-rwxr-xr-xchromium/tools/deps2git/svn_to_git_public.py188
-rwxr-xr-xchromium/tools/diagnose-me.py109
-rwxr-xr-xchromium/tools/dromaeo_benchmark_runner/dromaeo_benchmark_runner.py266
-rw-r--r--chromium/tools/emacs/chrome-filetypes.el16
-rw-r--r--chromium/tools/emacs/flymake-chromium.el122
-rw-r--r--chromium/tools/emacs/trybot-linux.txt6
-rw-r--r--chromium/tools/emacs/trybot-mac.txt1985
-rw-r--r--chromium/tools/emacs/trybot-windows.txt72
-rw-r--r--chromium/tools/emacs/trybot.el176
-rwxr-xr-xchromium/tools/export_tarball/export_tarball.py172
-rwxr-xr-xchromium/tools/export_tarball/export_v8_tarball.py135
-rw-r--r--chromium/tools/find_depot_tools.py40
-rw-r--r--chromium/tools/find_runtime_symbols/OWNERS1
-rw-r--r--chromium/tools/find_runtime_symbols/PRESUBMIT.py45
-rw-r--r--chromium/tools/find_runtime_symbols/README24
-rwxr-xr-xchromium/tools/find_runtime_symbols/find_runtime_symbols.py214
-rwxr-xr-xchromium/tools/find_runtime_symbols/prepare_symbol_info.py231
-rwxr-xr-xchromium/tools/find_runtime_symbols/reduce_debugline.py68
-rw-r--r--chromium/tools/find_runtime_symbols/static_symbols.py277
-rwxr-xr-xchromium/tools/flakiness/find_flakiness.py179
-rw-r--r--chromium/tools/gdb/gdb_chrome.py297
-rwxr-xr-xchromium/tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py529
-rwxr-xr-xchromium/tools/generate_stubs/generate_stubs.py4
-rwxr-xr-xchromium/tools/generate_stubs/generate_stubs_unittest.py6
-rw-r--r--chromium/tools/git/README16
-rwxr-xr-xchromium/tools/git/for-all-touched-files.py114
-rwxr-xr-xchromium/tools/git/git-diff-ide.py93
-rwxr-xr-xchromium/tools/git/git-utils.sh17
-rwxr-xr-xchromium/tools/git/graph.sh42
-rwxr-xr-xchromium/tools/git/mass-rename.py50
-rwxr-xr-xchromium/tools/git/mass-rename.sh17
-rwxr-xr-xchromium/tools/git/mffr.py169
-rwxr-xr-xchromium/tools/git/move_source_file.bat6
-rwxr-xr-xchromium/tools/git/move_source_file.py194
-rwxr-xr-xchromium/tools/git/post-checkout22
-rwxr-xr-xchromium/tools/git/post-merge12
-rwxr-xr-xchromium/tools/git/update-copyrights.sh7
-rw-r--r--chromium/tools/gn/gn.gyp57
-rw-r--r--chromium/tools/grit/grit/format/chrome_messages_json.py5
-rw-r--r--chromium/tools/grit/grit/format/chrome_messages_json_unittest.py26
-rwxr-xr-xchromium/tools/grit/grit/format/data_pack.py117
-rw-r--r--chromium/tools/grit/grit/format/data_pack_unittest.py29
-rwxr-xr-xchromium/tools/grit/grit/format/html_inline.py24
-rw-r--r--chromium/tools/grit/grit/format/policy_templates/policy_template_generator.py34
-rw-r--r--chromium/tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py2
-rw-r--r--chromium/tools/grit/grit/format/policy_templates/writers/admx_writer_unittest.py2
-rw-r--r--chromium/tools/grit/grit/format/policy_templates/writers/doc_writer.py65
-rw-r--r--chromium/tools/grit/grit/format/policy_templates/writers/doc_writer_unittest.py12
-rw-r--r--chromium/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py122
-rw-r--r--chromium/tools/grit/grit/format/policy_templates/writers/ios_plist_writer_unittest.py208
-rw-r--r--chromium/tools/grit/grit/format/policy_templates/writers/json_writer.py24
-rw-r--r--chromium/tools/grit/grit/format/policy_templates/writers/json_writer_unittest.py12
-rw-r--r--chromium/tools/grit/grit/format/policy_templates/writers/plist_writer.py16
-rw-r--r--chromium/tools/grit/grit/format/policy_templates/writers/reg_writer.py11
-rw-r--r--chromium/tools/grit/grit/format/policy_templates/writers/reg_writer_unittest.py12
-rw-r--r--chromium/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py8
-rw-r--r--chromium/tools/grit/grit/format/rc_header.py14
-rw-r--r--chromium/tools/grit/grit/format/rc_header_unittest.py34
-rwxr-xr-xchromium/tools/grit/grit/format/repack.py22
-rw-r--r--chromium/tools/grit/grit/format/resource_map_unittest.py4
-rw-r--r--chromium/tools/grit/grit/grd_reader.py12
-rw-r--r--chromium/tools/grit/grit/grd_reader_unittest.py24
-rw-r--r--chromium/tools/grit/grit/node/base.py105
-rw-r--r--chromium/tools/grit/grit/node/base_unittest.py61
-rw-r--r--chromium/tools/grit/grit/node/io.py13
-rw-r--r--chromium/tools/grit/grit/node/io_unittest.py16
-rwxr-xr-xchromium/tools/grit/grit/node/misc.py11
-rw-r--r--chromium/tools/grit/grit/test_suite_all.py9
-rw-r--r--chromium/tools/grit/grit/tool/android2grd.py8
-rw-r--r--chromium/tools/grit/grit/tool/build.py51
-rw-r--r--chromium/tools/grit/grit/tool/build_unittest.py6
-rwxr-xr-xchromium/tools/grit/grit_info.py2
-rw-r--r--chromium/tools/gritsettings/resource_ids62
-rw-r--r--chromium/tools/gtk_clipboard_dump/gtk_clipboard_dump.cc85
-rw-r--r--chromium/tools/gtk_clipboard_dump/gtk_clipboard_dump.gyp14
-rw-r--r--chromium/tools/gyp/AUTHORS1
-rw-r--r--chromium/tools/gyp/PRESUBMIT.py2
-rwxr-xr-xchromium/tools/gyp/buildbot/buildbot_run.py45
-rw-r--r--chromium/tools/gyp/gyp_dummy.c7
-rw-r--r--chromium/tools/gyp/pylib/gyp/MSVSSettings.py65
-rwxr-xr-xchromium/tools/gyp/pylib/gyp/MSVSSettings_test.py1
-rw-r--r--chromium/tools/gyp/pylib/gyp/MSVSUtil.py21
-rw-r--r--chromium/tools/gyp/pylib/gyp/MSVSVersion.py8
-rw-r--r--chromium/tools/gyp/pylib/gyp/common.py75
-rw-r--r--chromium/tools/gyp/pylib/gyp/generator/analyzer.py192
-rw-r--r--chromium/tools/gyp/pylib/gyp/generator/android.py108
-rw-r--r--chromium/tools/gyp/pylib/gyp/generator/cmake.py9
-rw-r--r--chromium/tools/gyp/pylib/gyp/generator/eclipse.py64
-rw-r--r--chromium/tools/gyp/pylib/gyp/generator/make.py26
-rw-r--r--chromium/tools/gyp/pylib/gyp/generator/msvs.py184
-rw-r--r--chromium/tools/gyp/pylib/gyp/generator/ninja.py348
-rw-r--r--chromium/tools/gyp/pylib/gyp/generator/xcode.py16
-rw-r--r--chromium/tools/gyp/pylib/gyp/input.py408
-rwxr-xr-xchromium/tools/gyp/pylib/gyp/mac_tool.py6
-rw-r--r--chromium/tools/gyp/pylib/gyp/msvs_emulation.py128
-rw-r--r--chromium/tools/gyp/pylib/gyp/ordered_dict.py289
-rw-r--r--chromium/tools/gyp/pylib/gyp/simple_copy.py46
-rwxr-xr-xchromium/tools/gyp/pylib/gyp/win_tool.py142
-rw-r--r--chromium/tools/gyp/pylib/gyp/xcode_emulation.py376
-rw-r--r--chromium/tools/gyp/pylib/gyp/xcode_ninja.py257
-rw-r--r--chromium/tools/gyp/pylib/gyp/xcodeproj_file.py1
-rw-r--r--chromium/tools/gyp/pylintrc307
-rw-r--r--chromium/tools/gyp/test/analyzer/subdir/subdir.gyp19
-rw-r--r--chromium/tools/gyp/test/analyzer/test.gyp54
-rw-r--r--chromium/tools/gyp/test/android/hello.gyp15
-rw-r--r--chromium/tools/gyp/test/android/make_functions.gyp31
-rw-r--r--chromium/tools/gyp/test/android/space_filenames.gyp18
-rw-r--r--chromium/tools/gyp/test/compiler-override/compiler-host.gyp2
-rw-r--r--chromium/tools/gyp/test/configurations/inheritance/duplicates.gyp27
-rw-r--r--chromium/tools/gyp/test/cxxflags/cxxflags.gyp1
-rw-r--r--chromium/tools/gyp/test/ios/app-bundle/test-archs.gyp129
-rw-r--r--chromium/tools/gyp/test/ios/app-bundle/test-crosscompile.gyp47
-rw-r--r--chromium/tools/gyp/test/ios/app-bundle/test.gyp1
-rw-r--r--chromium/tools/gyp/test/link-dependency/test.gyp37
-rw-r--r--chromium/tools/gyp/test/mac/archs/test-archs-multiarch.gyp32
-rw-r--r--chromium/tools/gyp/test/mac/archs/test-valid-archs.gyp28
-rw-r--r--chromium/tools/gyp/test/mac/xcode-gcc/test.gyp5
-rw-r--r--chromium/tools/gyp/test/mac/xcode-support-actions/test.gyp26
-rw-r--r--chromium/tools/gyp/test/make_global_settings/ar/make_global_settings_ar.gyp29
-rw-r--r--chromium/tools/gyp/test/make_global_settings/ld/make_global_settings_ld.gyp29
-rw-r--r--chromium/tools/gyp/test/msvs/buildevents/buildevents.gyp14
-rw-r--r--chromium/tools/gyp/test/msvs/filters/filters.gyp47
-rw-r--r--chromium/tools/gyp/test/ninja/normalize-paths-win/normalize-paths.gyp12
-rw-r--r--chromium/tools/gyp/test/rules-dirname/src/subdir/input-rule-dirname.gyp76
-rw-r--r--chromium/tools/gyp/test/rules/src/actions.gyp1
-rw-r--r--chromium/tools/gyp/test/rules/src/special-variables.gyp1
-rw-r--r--chromium/tools/gyp/test/rules/src/subdir2/both_rule_and_action_input.gyp50
-rw-r--r--chromium/tools/gyp/test/variables/commands/repeated_multidir/dir_1/test_1.gyp13
-rw-r--r--chromium/tools/gyp/test/variables/commands/repeated_multidir/dir_2/test_2.gyp13
-rw-r--r--chromium/tools/gyp/test/variables/commands/repeated_multidir/main.gyp16
-rw-r--r--chromium/tools/gyp/test/variables/commands/repeated_multidir/repeated_command_common.gypi25
-rw-r--r--chromium/tools/gyp/test/win/command-quote/command-quote.gyp5
-rw-r--r--chromium/tools/gyp/test/win/command-quote/subdir/and/another/in-subdir.gyp1
-rw-r--r--chromium/tools/gyp/test/win/compiler-flags/enable-enhanced-instruction-set.gyp54
-rw-r--r--chromium/tools/gyp/test/win/idl-excluded/idl-excluded.gyp58
-rw-r--r--chromium/tools/gyp/test/win/linker-flags/force-symbol-reference.gyp39
-rw-r--r--chromium/tools/gyp/test/win/linker-flags/generate-manifest.gyp10
-rw-r--r--chromium/tools/gyp/test/win/linker-flags/link-ordering.gyp95
-rw-r--r--chromium/tools/gyp/test/win/linker-flags/pdb-output.gyp36
-rw-r--r--chromium/tools/gyp/test/win/linker-flags/pgo.gyp2
-rw-r--r--chromium/tools/gyp/test/win/linker-flags/program-database.gyp7
-rw-r--r--chromium/tools/gyp/test/win/linker-flags/safeseh.gyp47
-rw-r--r--chromium/tools/gyp/test/win/linker-flags/unsupported-manifest.gyp13
-rw-r--r--chromium/tools/gyp/test/win/linker-flags/warn-as-error.gyp66
-rw-r--r--chromium/tools/gyp/test/win/ml-safeseh/ml-safeseh.gyp24
-rw-r--r--chromium/tools/gyp/test/win/shard/shard.gyp11
-rw-r--r--chromium/tools/gyp/test/win/shard/shard_ref.gyp41
-rw-r--r--chromium/tools/gyp/test/win/vs-macros/containing-gyp.gyp1
-rw-r--r--chromium/tools/gyp/test/win/vs-macros/input-output-macros.gyp1
-rw-r--r--chromium/tools/gyp/test/win/win-tool/copies_readonly_files.gyp29
-rwxr-xr-xchromium/tools/gypv8sh.py26
-rwxr-xr-xchromium/tools/idl_parser/idl_lexer.py3
-rwxr-xr-xchromium/tools/idl_parser/idl_node.py2
-rwxr-xr-xchromium/tools/idl_parser/idl_parser.py243
-rwxr-xr-xchromium/tools/idl_parser/idl_ppapi_lexer.py5
-rwxr-xr-xchromium/tools/idl_parser/idl_ppapi_parser.py4
-rw-r--r--chromium/tools/idl_parser/test_lexer/keywords.in3
-rw-r--r--chromium/tools/idl_parser/test_parser/enum_web.idl20
-rw-r--r--chromium/tools/idl_parser/test_parser/interface_web.idl28
-rw-r--r--chromium/tools/imagediff/DEPS4
-rw-r--r--chromium/tools/imagediff/image_diff.cc449
-rw-r--r--chromium/tools/imagediff/image_diff_png.cc650
-rw-r--r--chromium/tools/imagediff/image_diff_png.h35
-rwxr-xr-xchromium/tools/include_tracer.py202
-rw-r--r--chromium/tools/ipc_fuzzer/DEPS3
-rw-r--r--chromium/tools/ipc_fuzzer/OWNERS2
-rw-r--r--chromium/tools/ipc_fuzzer/ipc_fuzzer.gyp2
-rw-r--r--chromium/tools/ipc_fuzzer/message_lib/DEPS8
-rw-r--r--chromium/tools/ipc_fuzzer/message_lib/all_messages.h14
-rw-r--r--chromium/tools/ipc_fuzzer/message_lib/message_cracker.h32
-rw-r--r--chromium/tools/ipc_fuzzer/message_lib/message_file.h27
-rw-r--r--chromium/tools/ipc_fuzzer/message_lib/message_file_format.h63
-rw-r--r--chromium/tools/ipc_fuzzer/message_lib/message_file_reader.cc230
-rw-r--r--chromium/tools/ipc_fuzzer/message_lib/message_file_writer.cc176
-rw-r--r--chromium/tools/ipc_fuzzer/message_lib/message_lib.gyp9
-rw-r--r--chromium/tools/ipc_fuzzer/message_lib/message_names.cc37
-rw-r--r--chromium/tools/ipc_fuzzer/message_lib/message_names.h59
-rw-r--r--chromium/tools/ipc_fuzzer/mutate/mutate.cc10
-rw-r--r--chromium/tools/ipc_fuzzer/mutate/mutate.gyp81
-rwxr-xr-xchromium/tools/ipc_fuzzer/play_testcase.py86
-rw-r--r--chromium/tools/ipc_fuzzer/replay/DEPS3
-rw-r--r--chromium/tools/ipc_fuzzer/replay/replay.cc20
-rw-r--r--chromium/tools/ipc_fuzzer/replay/replay.gyp6
-rw-r--r--chromium/tools/ipc_fuzzer/replay/replay_process.cc106
-rw-r--r--chromium/tools/ipc_fuzzer/replay/replay_process.h59
-rwxr-xr-xchromium/tools/ipc_messages_log.py168
-rw-r--r--chromium/tools/json_schema_compiler/BUILD.gn13
-rw-r--r--chromium/tools/json_schema_compiler/cc_generator.py263
-rwxr-xr-xchromium/tools/json_schema_compiler/compiler.py45
-rw-r--r--chromium/tools/json_schema_compiler/cpp_bundle_generator.py22
-rw-r--r--chromium/tools/json_schema_compiler/cpp_type_generator.py30
-rw-r--r--chromium/tools/json_schema_compiler/cpp_util.py8
-rwxr-xr-xchromium/tools/json_schema_compiler/dart_generator_test.py2
-rw-r--r--chromium/tools/json_schema_compiler/dart_test/comments.dart2
-rw-r--r--chromium/tools/json_schema_compiler/dart_test/dictionaries.dart2
-rw-r--r--chromium/tools/json_schema_compiler/dart_test/empty_namespace.dart2
-rw-r--r--chromium/tools/json_schema_compiler/dart_test/empty_type.dart2
-rw-r--r--chromium/tools/json_schema_compiler/dart_test/events.dart2
-rw-r--r--chromium/tools/json_schema_compiler/dart_test/functions.dart2
-rw-r--r--chromium/tools/json_schema_compiler/dart_test/operatable_type.dart2
-rw-r--r--chromium/tools/json_schema_compiler/dart_test/tags.dart2
-rw-r--r--chromium/tools/json_schema_compiler/h_generator.py29
-rw-r--r--chromium/tools/json_schema_compiler/idl_schema.py53
-rwxr-xr-xchromium/tools/json_schema_compiler/idl_schema_test.py219
-rw-r--r--chromium/tools/json_schema_compiler/model.py20
-rwxr-xr-xchromium/tools/json_schema_compiler/model_test.py15
-rw-r--r--chromium/tools/json_schema_compiler/schema_loader.py10
-rw-r--r--chromium/tools/json_schema_compiler/test/json_schema_compiler_tests.gyp2
-rw-r--r--chromium/tools/json_schema_compiler/util.cc18
-rw-r--r--chromium/tools/json_schema_compiler/util.h2
-rw-r--r--chromium/tools/json_schema_compiler/util_cc_helper.py42
-rw-r--r--chromium/tools/json_to_struct/PRESUBMIT.py20
-rw-r--r--chromium/tools/json_to_struct/element_generator.py122
-rwxr-xr-xchromium/tools/json_to_struct/element_generator_test.py160
-rwxr-xr-xchromium/tools/json_to_struct/json_to_struct.py211
-rw-r--r--chromium/tools/json_to_struct/struct_generator.py43
-rwxr-xr-xchromium/tools/json_to_struct/struct_generator_test.py58
-rwxr-xr-xchromium/tools/licenses.py470
-rw-r--r--chromium/tools/linux/PRESUBMIT.py45
-rwxr-xr-xchromium/tools/linux/dump-static-initializers.py231
-rwxr-xr-xchromium/tools/linux/procfs.py729
-rw-r--r--chromium/tools/lsan/PRESUBMIT.py36
-rw-r--r--chromium/tools/lsan/suppressions.txt113
-rwxr-xr-xchromium/tools/mac/dump-static-initializers.py69
-rwxr-xr-xchromium/tools/mac/symbolicate_crash.py504
-rw-r--r--chromium/tools/measure_page_load_time/ff_ext/chrome.manifest2
-rw-r--r--chromium/tools/measure_page_load_time/ff_ext/content/firefoxOverlay.xul7
-rw-r--r--chromium/tools/measure_page_load_time/ff_ext/content/measure_page_load_time.js209
-rw-r--r--chromium/tools/measure_page_load_time/ff_ext/install.rdf17
-rw-r--r--chromium/tools/measure_page_load_time/ie_bho/MeasurePageLoadTime.cpp72
-rw-r--r--chromium/tools/measure_page_load_time/ie_bho/MeasurePageLoadTime.def9
-rw-r--r--chromium/tools/measure_page_load_time/ie_bho/MeasurePageLoadTime.idl40
-rw-r--r--chromium/tools/measure_page_load_time/ie_bho/MeasurePageLoadTime.rc121
-rw-r--r--chromium/tools/measure_page_load_time/ie_bho/MeasurePageLoadTime.rgs29
-rw-r--r--chromium/tools/measure_page_load_time/ie_bho/MeasurePageLoadTime.vcproj320
-rw-r--r--chromium/tools/measure_page_load_time/ie_bho/MeasurePageLoadTimeBHO.cpp292
-rw-r--r--chromium/tools/measure_page_load_time/ie_bho/MeasurePageLoadTimeBHO.h87
-rw-r--r--chromium/tools/measure_page_load_time/ie_bho/MeasurePageLoadTimeBHO.rgs27
-rw-r--r--chromium/tools/measure_page_load_time/ie_bho/resource.h18
-rw-r--r--chromium/tools/memory_watcher/DEPS3
-rw-r--r--chromium/tools/memory_watcher/README17
-rw-r--r--chromium/tools/memory_watcher/call_stack.cc399
-rw-r--r--chromium/tools/memory_watcher/call_stack.h168
-rw-r--r--chromium/tools/memory_watcher/dllmain.cc155
-rw-r--r--chromium/tools/memory_watcher/hotkey.h48
-rw-r--r--chromium/tools/memory_watcher/ia32_modrm_map.cc94
-rw-r--r--chromium/tools/memory_watcher/ia32_opcode_map.cc1161
-rw-r--r--chromium/tools/memory_watcher/memory_hook.cc562
-rw-r--r--chromium/tools/memory_watcher/memory_hook.h153
-rw-r--r--chromium/tools/memory_watcher/memory_watcher.cc255
-rw-r--r--chromium/tools/memory_watcher/memory_watcher.gyp48
-rw-r--r--chromium/tools/memory_watcher/memory_watcher.h95
-rw-r--r--chromium/tools/memory_watcher/mini_disassembler.cc392
-rw-r--r--chromium/tools/memory_watcher/mini_disassembler.h163
-rw-r--r--chromium/tools/memory_watcher/mini_disassembler_types.h199
-rw-r--r--chromium/tools/memory_watcher/preamble_patcher.cc228
-rw-r--r--chromium/tools/memory_watcher/preamble_patcher.h293
-rw-r--r--chromium/tools/memory_watcher/preamble_patcher_with_stub.cc174
-rwxr-xr-xchromium/tools/memory_watcher/scripts/finditem.pl56
-rwxr-xr-xchromium/tools/memory_watcher/scripts/memprof.pl116
-rwxr-xr-xchromium/tools/memory_watcher/scripts/memtrace.pl146
-rwxr-xr-xchromium/tools/memory_watcher/scripts/summary.pl154
-rw-r--r--chromium/tools/metrics/OWNERS10
-rw-r--r--chromium/tools/metrics/actions/OWNERS2
-rw-r--r--chromium/tools/metrics/actions/chromeactions.txt1878
-rwxr-xr-xchromium/tools/metrics/actions/extract_actions.py636
-rwxr-xr-xchromium/tools/metrics/actions/extract_actions.sh13
-rw-r--r--chromium/tools/metrics/histograms/PRESUBMIT.py39
-rw-r--r--chromium/tools/metrics/histograms/diffutil.py47
-rw-r--r--chromium/tools/metrics/histograms/extract_histograms.py421
-rw-r--r--chromium/tools/metrics/histograms/find_unmapped_histograms.py227
-rw-r--r--chromium/tools/metrics/histograms/histograms.xml33764
-rwxr-xr-xchromium/tools/metrics/histograms/pretty_print.py358
-rw-r--r--chromium/tools/metrics/histograms/update_extension_functions.py148
-rw-r--r--chromium/tools/metrics/histograms/update_policies.py133
-rw-r--r--chromium/tools/metrics/histograms/validate_format.py20
-rwxr-xr-xchromium/tools/multi-process-rss.py143
-rwxr-xr-xchromium/tools/nocompile_driver.py472
-rwxr-xr-xchromium/tools/omahaproxy.py90
-rw-r--r--chromium/tools/oopif/OWNERS4
-rw-r--r--chromium/tools/oopif/iframe_server.py224
-rwxr-xr-xchromium/tools/prepare-bisect-perf-regression.py70
-rw-r--r--chromium/tools/python/google/__init__.py1
-rwxr-xr-xchromium/tools/python/google/gethash_timer.py149
-rw-r--r--chromium/tools/python/google/httpd_config/httpd.conf734
-rw-r--r--chromium/tools/python/google/httpd_config/httpd2.conf280
-rw-r--r--chromium/tools/python/google/httpd_config/httpd2.pem110
-rw-r--r--chromium/tools/python/google/httpd_config/httpd2_linux.conf144
-rw-r--r--chromium/tools/python/google/httpd_config/httpd2_mac.conf229
-rw-r--r--chromium/tools/python/google/httpd_config/mime.types599
-rw-r--r--chromium/tools/python/google/httpd_config/root_ca_cert.pem102
-rwxr-xr-xchromium/tools/python/google/httpd_utils.py200
-rw-r--r--chromium/tools/python/google/logging_utils.py82
-rw-r--r--chromium/tools/python/google/path_utils.py84
-rw-r--r--chromium/tools/python/google/platform_utils.py23
-rw-r--r--chromium/tools/python/google/platform_utils_linux.py148
-rw-r--r--chromium/tools/python/google/platform_utils_mac.py145
-rw-r--r--chromium/tools/python/google/platform_utils_win.py194
-rw-r--r--chromium/tools/python/google/process_utils.py221
-rw-r--r--chromium/tools/relocation_packer/relocation_packer.gyp66
-rwxr-xr-xchromium/tools/resources/find_unused_resources.py194
-rwxr-xr-xchromium/tools/resources/optimize-png-files.sh472
-rwxr-xr-xchromium/tools/run-bisect-manual-test.py128
-rw-r--r--chromium/tools/run-bisect-perf-regression.cfg88
-rwxr-xr-xchromium/tools/run-bisect-perf-regression.py424
-rw-r--r--chromium/tools/run-perf-test.cfg77
-rwxr-xr-xchromium/tools/safely-roll-blink.py127
-rw-r--r--chromium/tools/set_default_handler/DEPS4
-rw-r--r--chromium/tools/set_default_handler/set_default_handler.gyp5
-rw-r--r--chromium/tools/set_default_handler/set_default_handler_main.cc67
-rwxr-xr-xchromium/tools/site_compare/command_line.py802
-rw-r--r--chromium/tools/site_compare/commands/compare2.py170
-rw-r--r--chromium/tools/site_compare/commands/maskmaker.py272
-rw-r--r--chromium/tools/site_compare/commands/measure.py52
-rw-r--r--chromium/tools/site_compare/commands/scrape.py59
-rw-r--r--chromium/tools/site_compare/commands/timeload.py144
-rw-r--r--chromium/tools/site_compare/drivers/__init__.py13
-rwxr-xr-xchromium/tools/site_compare/drivers/win32/keyboard.py201
-rwxr-xr-xchromium/tools/site_compare/drivers/win32/mouse.py222
-rwxr-xr-xchromium/tools/site_compare/drivers/win32/windowing.py366
-rw-r--r--chromium/tools/site_compare/operators/__init__.py23
-rw-r--r--chromium/tools/site_compare/operators/equals.py37
-rw-r--r--chromium/tools/site_compare/operators/equals_with_mask.py57
-rwxr-xr-xchromium/tools/site_compare/scrapers/__init__.py33
-rwxr-xr-xchromium/tools/site_compare/scrapers/chrome/__init__.py36
-rw-r--r--chromium/tools/site_compare/scrapers/chrome/chrome011010.py42
-rw-r--r--chromium/tools/site_compare/scrapers/chrome/chrome01970.py42
-rwxr-xr-xchromium/tools/site_compare/scrapers/chrome/chromebase.py199
-rwxr-xr-xchromium/tools/site_compare/scrapers/firefox/__init__.py28
-rwxr-xr-xchromium/tools/site_compare/scrapers/firefox/firefox2.py249
-rwxr-xr-xchromium/tools/site_compare/scrapers/ie/__init__.py28
-rwxr-xr-xchromium/tools/site_compare/scrapers/ie/ie7.py210
-rwxr-xr-xchromium/tools/site_compare/site_compare.py176
-rw-r--r--chromium/tools/site_compare/utils/browser_iterate.py199
-rwxr-xr-xchromium/tools/sort-headers.py185
-rw-r--r--chromium/tools/stats_viewer/OpenDialog.Designer.cs88
-rw-r--r--chromium/tools/stats_viewer/OpenDialog.cs45
-rw-r--r--chromium/tools/stats_viewer/OpenDialog.resx120
-rw-r--r--chromium/tools/stats_viewer/Properties/AssemblyInfo.cs33
-rw-r--r--chromium/tools/stats_viewer/Properties/Resources.Designer.cs71
-rw-r--r--chromium/tools/stats_viewer/Properties/Resources.resx117
-rw-r--r--chromium/tools/stats_viewer/Properties/Settings.Designer.cs30
-rw-r--r--chromium/tools/stats_viewer/Properties/Settings.settings7
-rw-r--r--chromium/tools/stats_viewer/Resources.Designer.cs77
-rw-r--r--chromium/tools/stats_viewer/Resources.resx127
-rw-r--r--chromium/tools/stats_viewer/Resources/kitten.pngbin36163 -> 0 bytes
-rw-r--r--chromium/tools/stats_viewer/Resources/kittenbackground.pngbin1275 -> 0 bytes
-rw-r--r--chromium/tools/stats_viewer/program.cs23
-rw-r--r--chromium/tools/stats_viewer/stats_table.cs546
-rw-r--r--chromium/tools/stats_viewer/stats_viewer.Designer.cs392
-rw-r--r--chromium/tools/stats_viewer/stats_viewer.cs510
-rw-r--r--chromium/tools/stats_viewer/stats_viewer.csproj107
-rw-r--r--chromium/tools/stats_viewer/stats_viewer.resx1129
-rw-r--r--chromium/tools/stats_viewer/win32.cs50
-rw-r--r--chromium/tools/swarming_client/example/payload/hello_world.isolate49
-rw-r--r--chromium/tools/swarming_client/googletest/tests/isolate_test_cases/gtest_fake_pass.isolate13
-rw-r--r--chromium/tools/swarming_client/tests/isolate/all_items_invalid.isolate25
-rw-r--r--chromium/tools/swarming_client/tests/isolate/fail.isolate18
-rw-r--r--chromium/tools/swarming_client/tests/isolate/missing_trailing_slash.isolate11
-rw-r--r--chromium/tools/swarming_client/tests/isolate/no_run.isolate14
-rw-r--r--chromium/tools/swarming_client/tests/isolate/non_existent.isolate10
-rw-r--r--chromium/tools/swarming_client/tests/isolate/simple.isolate18
-rw-r--r--chromium/tools/swarming_client/tests/isolate/split.isolate16
-rw-r--r--chromium/tools/swarming_client/tests/isolate/symlink_full.isolate21
-rw-r--r--chromium/tools/swarming_client/tests/isolate/symlink_outside_build_root.isolate21
-rw-r--r--chromium/tools/swarming_client/tests/isolate/symlink_partial.isolate21
-rw-r--r--chromium/tools/swarming_client/tests/isolate/touch_only.isolate18
-rw-r--r--chromium/tools/swarming_client/tests/isolate/touch_root.isolate19
-rw-r--r--chromium/tools/swarming_client/tests/isolate/with_flag.isolate22
-rwxr-xr-xchromium/tools/swig/swig.py45
-rw-r--r--chromium/tools/symsrc/COPYING-pefile27
-rw-r--r--chromium/tools/symsrc/README.chromium14
-rwxr-xr-xchromium/tools/symsrc/img_fingerprint.py34
-rwxr-xr-xchromium/tools/symsrc/pdb_fingerprint_from_img.py64
-rw-r--r--chromium/tools/symsrc/pefile.py3729
-rwxr-xr-xchromium/tools/symsrc/source_index.py226
-rwxr-xr-xchromium/tools/sync-webkit-git.py221
-rwxr-xr-xchromium/tools/tcmalloc/print-live-objects.py91
-rw-r--r--chromium/tools/telemetry/telemetry.gyp16
-rw-r--r--chromium/tools/trace/trace.html287
-rw-r--r--chromium/tools/trace/trace_data.js1050
-rw-r--r--chromium/tools/traceline/svgui/README12
-rw-r--r--chromium/tools/traceline/svgui/startup-release.json178
-rw-r--r--chromium/tools/traceline/svgui/traceline.css73
-rw-r--r--chromium/tools/traceline/svgui/traceline.js693
-rw-r--r--chromium/tools/traceline/svgui/traceline.xml11
-rw-r--r--chromium/tools/traceline/traceline/Makefile30
-rw-r--r--chromium/tools/traceline/traceline/README21
-rw-r--r--chromium/tools/traceline/traceline/assembler.h576
-rw-r--r--chromium/tools/traceline/traceline/assembler_unittest.cc83
-rwxr-xr-xchromium/tools/traceline/traceline/assembler_unittest.sh7
-rw-r--r--chromium/tools/traceline/traceline/assembler_unittest.sh.expected54
-rwxr-xr-xchromium/tools/traceline/traceline/dump_syscalls_idarub.rb32
-rw-r--r--chromium/tools/traceline/traceline/logging.h28
-rw-r--r--chromium/tools/traceline/traceline/main.cc1339
-rw-r--r--chromium/tools/traceline/traceline/rdtsc.h43
-rwxr-xr-xchromium/tools/traceline/traceline/scripts/alloc.py27
-rw-r--r--chromium/tools/traceline/traceline/scripts/crit_sec.js87
-rwxr-xr-xchromium/tools/traceline/traceline/scripts/crit_sec.py57
-rwxr-xr-xchromium/tools/traceline/traceline/scripts/filter_short.py34
-rwxr-xr-xchromium/tools/traceline/traceline/scripts/filter_split.sh14
-rw-r--r--chromium/tools/traceline/traceline/scripts/heap.js69
-rwxr-xr-xchromium/tools/traceline/traceline/scripts/scstats.py32
-rwxr-xr-xchromium/tools/traceline/traceline/scripts/split.py31
-rw-r--r--chromium/tools/traceline/traceline/scripts/syscalls.py942
-rw-r--r--chromium/tools/traceline/traceline/sidestep/ia32_modrm_map.cc92
-rw-r--r--chromium/tools/traceline/traceline/sidestep/ia32_opcode_map.cc1159
-rw-r--r--chromium/tools/traceline/traceline/sidestep/mini_disassembler.cc416
-rw-r--r--chromium/tools/traceline/traceline/sidestep/mini_disassembler.h156
-rw-r--r--chromium/tools/traceline/traceline/sidestep/mini_disassembler_types.h197
-rw-r--r--chromium/tools/traceline/traceline/stubs.asm132
-rw-r--r--chromium/tools/traceline/traceline/sym_resolver.h167
-rw-r--r--chromium/tools/traceline/traceline/syscall_map.h2116
-rwxr-xr-xchromium/tools/unused-symbols-report.py171
-rwxr-xr-xchromium/tools/update_reference_build.py335
-rw-r--r--chromium/tools/valgrind/OWNERS5
-rwxr-xr-xchromium/tools/valgrind/asan/asan_symbolize.py49
-rwxr-xr-xchromium/tools/valgrind/asan/asan_wrapper.sh16
-rw-r--r--chromium/tools/valgrind/asan/third_party/README.chromium6
-rwxr-xr-xchromium/tools/valgrind/asan/third_party/asan_symbolize.py365
-rw-r--r--chromium/tools/valgrind/browser_wrapper_win.py49
-rwxr-xr-xchromium/tools/valgrind/chrome_tests.bat70
-rwxr-xr-xchromium/tools/valgrind/chrome_tests.py652
-rwxr-xr-xchromium/tools/valgrind/chrome_tests.sh122
-rw-r--r--chromium/tools/valgrind/common.py252
-rwxr-xr-xchromium/tools/valgrind/drmemory.bat5
-rw-r--r--chromium/tools/valgrind/drmemory/OWNERS1
-rw-r--r--chromium/tools/valgrind/drmemory/PRESUBMIT.py35
-rw-r--r--chromium/tools/valgrind/drmemory/suppressions.txt430
-rw-r--r--chromium/tools/valgrind/drmemory/suppressions_full.txt1337
-rwxr-xr-xchromium/tools/valgrind/drmemory_analyze.py193
-rw-r--r--chromium/tools/valgrind/gdb_helper.py87
-rw-r--r--chromium/tools/valgrind/gtest_exclude/OWNERS1
-rw-r--r--chromium/tools/valgrind/gtest_exclude/base_unittests.gtest-drmemory_win32.txt26
-rw-r--r--chromium/tools/valgrind/gtest_exclude/base_unittests.gtest-tsan.txt10
-rw-r--r--chromium/tools/valgrind/gtest_exclude/base_unittests.gtest-tsan_win32.txt28
-rw-r--r--chromium/tools/valgrind/gtest_exclude/base_unittests.gtest.txt26
-rw-r--r--chromium/tools/valgrind/gtest_exclude/base_unittests.gtest_mac.txt20
-rw-r--r--chromium/tools/valgrind/gtest_exclude/base_unittests.gtest_win-8.txt2
-rw-r--r--chromium/tools/valgrind/gtest_exclude/base_unittests.gtest_win32.txt12
-rw-r--r--chromium/tools/valgrind/gtest_exclude/browser_tests.gtest-drmemory_win32.txt56
-rw-r--r--chromium/tools/valgrind/gtest_exclude/browser_tests.gtest-memcheck.txt60
-rw-r--r--chromium/tools/valgrind/gtest_exclude/components_unittests.gtest-tsan_win32.txt6
-rw-r--r--chromium/tools/valgrind/gtest_exclude/content_unittests.gtest-tsan.txt2
-rw-r--r--chromium/tools/valgrind/gtest_exclude/content_unittests.gtest.txt5
-rw-r--r--chromium/tools/valgrind/gtest_exclude/content_unittests.gtest_mac.txt58
-rw-r--r--chromium/tools/valgrind/gtest_exclude/crypto_unittests.gtest-tsan_win32.txt2
-rw-r--r--chromium/tools/valgrind/gtest_exclude/interactive_ui_tests.gtest.txt34
-rw-r--r--chromium/tools/valgrind/gtest_exclude/ipc_tests.gtest-drmemory_win32.txt2
-rw-r--r--chromium/tools/valgrind/gtest_exclude/ipc_tests.gtest-tsan_win32.txt2
-rw-r--r--chromium/tools/valgrind/gtest_exclude/ipc_tests.gtest.txt6
-rw-r--r--chromium/tools/valgrind/gtest_exclude/media_unittests.gtest-drmemory_win32.txt4
-rw-r--r--chromium/tools/valgrind/gtest_exclude/media_unittests.gtest-tsan_win32.txt3
-rw-r--r--chromium/tools/valgrind/gtest_exclude/media_unittests.gtest.txt6
-rw-r--r--chromium/tools/valgrind/gtest_exclude/message_center_unittests.gtest.txt3
-rw-r--r--chromium/tools/valgrind/gtest_exclude/net_unittests.gtest-drmemory_win-xp.txt3
-rw-r--r--chromium/tools/valgrind/gtest_exclude/net_unittests.gtest-drmemory_win32.txt24
-rw-r--r--chromium/tools/valgrind/gtest_exclude/net_unittests.gtest-memcheck.txt26
-rw-r--r--chromium/tools/valgrind/gtest_exclude/net_unittests.gtest-tsan.txt27
-rw-r--r--chromium/tools/valgrind/gtest_exclude/net_unittests.gtest-tsan_win32.txt40
-rw-r--r--chromium/tools/valgrind/gtest_exclude/net_unittests.gtest.txt21
-rw-r--r--chromium/tools/valgrind/gtest_exclude/net_unittests.gtest_linux.txt5
-rw-r--r--chromium/tools/valgrind/gtest_exclude/net_unittests.gtest_mac.txt6
-rw-r--r--chromium/tools/valgrind/gtest_exclude/printing_unittests.gtest-drmemory_win32.txt3
-rw-r--r--chromium/tools/valgrind/gtest_exclude/remoting_unittests.gtest-drmemory_win32.txt9
-rw-r--r--chromium/tools/valgrind/gtest_exclude/remoting_unittests.gtest-tsan_win32.txt2
-rw-r--r--chromium/tools/valgrind/gtest_exclude/remoting_unittests.gtest.txt2
-rw-r--r--chromium/tools/valgrind/gtest_exclude/remoting_unittests.gtest_win-8.txt2
-rw-r--r--chromium/tools/valgrind/gtest_exclude/safe_browsing_tests.gtest_mac.txt2
-rw-r--r--chromium/tools/valgrind/gtest_exclude/suppressions.txt39
-rw-r--r--chromium/tools/valgrind/gtest_exclude/sync_unit_tests.gtest-asan.txt2
-rw-r--r--chromium/tools/valgrind/gtest_exclude/sync_unit_tests.gtest-tsan.txt5
-rw-r--r--chromium/tools/valgrind/gtest_exclude/ui_unittests.gtest-memcheck.txt2
-rw-r--r--chromium/tools/valgrind/gtest_exclude/ui_unittests.gtest-tsan.txt2
-rw-r--r--chromium/tools/valgrind/gtest_exclude/unit_tests.gtest-drmemory_win-xp.txt7
-rw-r--r--chromium/tools/valgrind/gtest_exclude/unit_tests.gtest-drmemory_win32.txt76
-rw-r--r--chromium/tools/valgrind/gtest_exclude/unit_tests.gtest-memcheck.txt19
-rw-r--r--chromium/tools/valgrind/gtest_exclude/unit_tests.gtest-tsan.txt12
-rw-r--r--chromium/tools/valgrind/gtest_exclude/unit_tests.gtest.txt34
-rw-r--r--chromium/tools/valgrind/gtest_exclude/unit_tests.gtest_linux.txt31
-rw-r--r--chromium/tools/valgrind/gtest_exclude/unit_tests.gtest_mac.txt39
-rwxr-xr-xchromium/tools/valgrind/locate_valgrind.sh77
-rw-r--r--chromium/tools/valgrind/memcheck/OWNERS1
-rw-r--r--chromium/tools/valgrind/memcheck/PRESUBMIT.py81
-rw-r--r--chromium/tools/valgrind/memcheck/suppressions.txt6359
-rw-r--r--chromium/tools/valgrind/memcheck/suppressions_linux.txt24
-rw-r--r--chromium/tools/valgrind/memcheck/suppressions_mac.txt2378
-rwxr-xr-xchromium/tools/valgrind/memcheck_analyze.py634
-rwxr-xr-xchromium/tools/valgrind/regrind.sh138
-rw-r--r--chromium/tools/valgrind/reliability/url_list.txt11
-rwxr-xr-xchromium/tools/valgrind/scan-build.py227
-rwxr-xr-xchromium/tools/valgrind/suppressions.py1018
-rwxr-xr-xchromium/tools/valgrind/test_suppressions.py182
-rw-r--r--chromium/tools/valgrind/tsan/OWNERS1
-rw-r--r--chromium/tools/valgrind/tsan/PRESUBMIT.py35
-rw-r--r--chromium/tools/valgrind/tsan/ignores.txt189
-rw-r--r--chromium/tools/valgrind/tsan/ignores_win32.txt64
-rw-r--r--chromium/tools/valgrind/tsan/suppressions.txt1141
-rw-r--r--chromium/tools/valgrind/tsan/suppressions_win32.txt321
-rwxr-xr-xchromium/tools/valgrind/tsan_analyze.py271
-rw-r--r--chromium/tools/valgrind/tsan_v2/ignores.txt12
-rw-r--r--chromium/tools/valgrind/tsan_v2/suppressions.txt137
-rwxr-xr-xchromium/tools/valgrind/unused_suppressions.py24
-rwxr-xr-xchromium/tools/valgrind/valgrind.sh124
-rw-r--r--chromium/tools/valgrind/valgrind_test.py1235
-rwxr-xr-xchromium/tools/valgrind/waterfall.sh222
-rw-r--r--chromium/tools/vim/chromium.ycm_extra_conf.py203
-rw-r--r--chromium/tools/vim/filetypes.vim9
-rw-r--r--chromium/tools/vim/ninja-build.vim129
-rw-r--r--chromium/tools/win/static_initializers/static_initializers.gyp28
-rwxr-xr-xchromium/tools/win/toolchain/7z/7z.dllbin1422336 -> 0 bytes
-rwxr-xr-xchromium/tools/win/toolchain/7z/7z.exebin284160 -> 0 bytes
-rw-r--r--chromium/tools/win/toolchain/7z/LICENSE57
-rw-r--r--chromium/tools/win/toolchain/get_toolchain_if_necessary.py138
-rw-r--r--chromium/tools/win/toolchain/toolchain.py714
-rw-r--r--chromium/tools/win/toolchain/toolchain2013.py229
-rw-r--r--chromium/tools/xdisplaycheck/xdisplaycheck.cc115
-rw-r--r--chromium/ui/accessibility/BUILD.gn61
-rw-r--r--chromium/ui/accessibility/accessibility.gyp46
-rw-r--r--chromium/ui/accessibility/ax_enums.h124
-rw-r--r--chromium/ui/accessibility/ax_enums.idl356
-rw-r--r--chromium/ui/accessibility/ax_generated_tree_unittest.cc243
-rw-r--r--chromium/ui/accessibility/ax_node.cc13
-rw-r--r--chromium/ui/accessibility/ax_node.h15
-rw-r--r--chromium/ui/accessibility/ax_node_data.cc356
-rw-r--r--chromium/ui/accessibility/ax_node_data.h167
-rw-r--r--chromium/ui/accessibility/ax_serializable_tree.cc29
-rw-r--r--chromium/ui/accessibility/ax_serializable_tree.h2
-rw-r--r--chromium/ui/accessibility/ax_text_utils.cc88
-rw-r--r--chromium/ui/accessibility/ax_text_utils.h54
-rw-r--r--chromium/ui/accessibility/ax_tree.cc122
-rw-r--r--chromium/ui/accessibility/ax_tree.h78
-rw-r--r--chromium/ui/accessibility/ax_tree_serializer.h149
-rw-r--r--chromium/ui/accessibility/ax_tree_serializer_unittest.cc8
-rw-r--r--chromium/ui/accessibility/ax_tree_source.h44
-rw-r--r--chromium/ui/accessibility/ax_tree_unittest.cc142
-rw-r--r--chromium/ui/accessibility/ax_tree_update.cc27
-rw-r--r--chromium/ui/accessibility/ax_tree_update.h3
-rw-r--r--chromium/ui/accessibility/ax_view_state.cc27
-rw-r--r--chromium/ui/accessibility/ax_view_state.h81
-rw-r--r--chromium/ui/android/OWNERS1
-rw-r--r--chromium/ui/android/ui_android.gyp27
-rw-r--r--chromium/ui/app_list/DEPS15
-rw-r--r--chromium/ui/app_list/OWNERS4
-rw-r--r--chromium/ui/app_list/app_list.gyp111
-rw-r--r--chromium/ui/app_list/app_list_constants.cc48
-rw-r--r--chromium/ui/app_list/app_list_constants.h46
-rw-r--r--chromium/ui/app_list/app_list_export.h33
-rw-r--r--chromium/ui/app_list/app_list_folder_item.cc183
-rw-r--r--chromium/ui/app_list/app_list_folder_item.h67
-rw-r--r--chromium/ui/app_list/app_list_item_list.cc224
-rw-r--r--chromium/ui/app_list/app_list_item_list.h103
-rw-r--r--chromium/ui/app_list/app_list_item_list_observer.h34
-rw-r--r--chromium/ui/app_list/app_list_item_list_unittest.cc319
-rw-r--r--chromium/ui/app_list/app_list_item_model.cc99
-rw-r--r--chromium/ui/app_list/app_list_item_model.h102
-rw-r--r--chromium/ui/app_list/app_list_item_model_observer.h35
-rw-r--r--chromium/ui/app_list/app_list_menu.cc99
-rw-r--r--chromium/ui/app_list/app_list_menu.h51
-rw-r--r--chromium/ui/app_list/app_list_model.cc42
-rw-r--r--chromium/ui/app_list/app_list_model.h62
-rw-r--r--chromium/ui/app_list/app_list_model_observer.h23
-rw-r--r--chromium/ui/app_list/app_list_model_unittest.cc277
-rw-r--r--chromium/ui/app_list/app_list_switches.cc20
-rw-r--r--chromium/ui/app_list/app_list_switches.h20
-rw-r--r--chromium/ui/app_list/app_list_view_delegate.cc15
-rw-r--r--chromium/ui/app_list/app_list_view_delegate.h140
-rw-r--r--chromium/ui/app_list/app_list_view_delegate_observer.h24
-rw-r--r--chromium/ui/app_list/cocoa/app_list_pager_view.h43
-rw-r--r--chromium/ui/app_list/cocoa/app_list_pager_view.mm167
-rw-r--r--chromium/ui/app_list/cocoa/app_list_view_controller.h73
-rw-r--r--chromium/ui/app_list/cocoa/app_list_view_controller.mm354
-rw-r--r--chromium/ui/app_list/cocoa/app_list_view_controller_unittest.mm128
-rw-r--r--chromium/ui/app_list/cocoa/app_list_window_controller.h26
-rw-r--r--chromium/ui/app_list/cocoa/app_list_window_controller.mm69
-rw-r--r--chromium/ui/app_list/cocoa/app_list_window_controller_unittest.mm95
-rw-r--r--chromium/ui/app_list/cocoa/apps_collection_view_drag_manager.h64
-rw-r--r--chromium/ui/app_list/cocoa/apps_collection_view_drag_manager.mm263
-rw-r--r--chromium/ui/app_list/cocoa/apps_grid_controller.h122
-rw-r--r--chromium/ui/app_list/cocoa/apps_grid_controller.mm675
-rw-r--r--chromium/ui/app_list/cocoa/apps_grid_controller_unittest.mm989
-rw-r--r--chromium/ui/app_list/cocoa/apps_grid_view_item.h55
-rw-r--r--chromium/ui/app_list/cocoa/apps_grid_view_item.mm468
-rw-r--r--chromium/ui/app_list/cocoa/apps_pagination_model_observer.h26
-rw-r--r--chromium/ui/app_list/cocoa/apps_search_box_controller.h67
-rw-r--r--chromium/ui/app_list/cocoa/apps_search_box_controller.mm396
-rw-r--r--chromium/ui/app_list/cocoa/apps_search_box_controller_unittest.mm265
-rw-r--r--chromium/ui/app_list/cocoa/apps_search_results_controller.h59
-rw-r--r--chromium/ui/app_list/cocoa/apps_search_results_controller.mm463
-rw-r--r--chromium/ui/app_list/cocoa/apps_search_results_controller_unittest.mm316
-rw-r--r--chromium/ui/app_list/cocoa/apps_search_results_model_bridge.h50
-rw-r--r--chromium/ui/app_list/cocoa/apps_search_results_model_bridge.mm137
-rw-r--r--chromium/ui/app_list/cocoa/item_drag_controller.h44
-rw-r--r--chromium/ui/app_list/cocoa/item_drag_controller.mm184
-rw-r--r--chromium/ui/app_list/cocoa/scroll_view_with_no_scrollbars.h30
-rw-r--r--chromium/ui/app_list/cocoa/scroll_view_with_no_scrollbars.mm99
-rw-r--r--chromium/ui/app_list/cocoa/signin_view_controller.h32
-rw-r--r--chromium/ui/app_list/cocoa/signin_view_controller.mm198
-rw-r--r--chromium/ui/app_list/cocoa/signin_view_controller_unittest.mm115
-rw-r--r--chromium/ui/app_list/pagination_model.cc272
-rw-r--r--chromium/ui/app_list/pagination_model.h144
-rw-r--r--chromium/ui/app_list/pagination_model_observer.h32
-rw-r--r--chromium/ui/app_list/pagination_model_unittest.cc434
-rw-r--r--chromium/ui/app_list/search_box_model.cc80
-rw-r--r--chromium/ui/app_list/search_box_model.h77
-rw-r--r--chromium/ui/app_list/search_box_model_observer.h36
-rw-r--r--chromium/ui/app_list/search_result.cc85
-rw-r--r--chromium/ui/app_list/search_result.h134
-rw-r--r--chromium/ui/app_list/search_result_observer.h38
-rw-r--r--chromium/ui/app_list/signin_delegate.cc13
-rw-r--r--chromium/ui/app_list/signin_delegate.h36
-rw-r--r--chromium/ui/app_list/speech_ui_model.cc54
-rw-r--r--chromium/ui/app_list/speech_ui_model.h47
-rw-r--r--chromium/ui/app_list/speech_ui_model_observer.h39
-rw-r--r--chromium/ui/app_list/views/DEPS3
-rw-r--r--chromium/ui/app_list/views/app_list_background.cc79
-rw-r--r--chromium/ui/app_list/views/app_list_background.h39
-rw-r--r--chromium/ui/app_list/views/app_list_drag_and_drop_host.h63
-rw-r--r--chromium/ui/app_list/views/app_list_folder_view.cc103
-rw-r--r--chromium/ui/app_list/views/app_list_folder_view.h71
-rw-r--r--chromium/ui/app_list/views/app_list_item_view.cc466
-rw-r--r--chromium/ui/app_list/views/app_list_item_view.h142
-rw-r--r--chromium/ui/app_list/views/app_list_main_view.cc258
-rw-r--r--chromium/ui/app_list/views/app_list_main_view.h116
-rw-r--r--chromium/ui/app_list/views/app_list_main_view_unittest.cc90
-rw-r--r--chromium/ui/app_list/views/app_list_menu_views.cc44
-rw-r--r--chromium/ui/app_list/views/app_list_menu_views.h44
-rw-r--r--chromium/ui/app_list/views/app_list_view.cc472
-rw-r--r--chromium/ui/app_list/views/app_list_view.h154
-rw-r--r--chromium/ui/app_list/views/app_list_view_observer.h24
-rw-r--r--chromium/ui/app_list/views/apps_container_view.cc100
-rw-r--r--chromium/ui/app_list/views/apps_container_view.h67
-rw-r--r--chromium/ui/app_list/views/apps_grid_view.cc1671
-rw-r--r--chromium/ui/app_list/views/apps_grid_view.h421
-rw-r--r--chromium/ui/app_list/views/apps_grid_view_delegate.h39
-rw-r--r--chromium/ui/app_list/views/apps_grid_view_unittest.cc464
-rw-r--r--chromium/ui/app_list/views/cached_label.cc35
-rw-r--r--chromium/ui/app_list/views/cached_label.h41
-rw-r--r--chromium/ui/app_list/views/contents_view.cc263
-rw-r--r--chromium/ui/app_list/views/contents_view.h98
-rw-r--r--chromium/ui/app_list/views/folder_header_view.cc176
-rw-r--r--chromium/ui/app_list/views/folder_header_view.h76
-rw-r--r--chromium/ui/app_list/views/folder_header_view_delegate.h27
-rw-r--r--chromium/ui/app_list/views/page_switcher.cc267
-rw-r--r--chromium/ui/app_list/views/page_switcher.h61
-rw-r--r--chromium/ui/app_list/views/progress_bar_view.cc62
-rw-r--r--chromium/ui/app_list/views/progress_bar_view.h37
-rw-r--r--chromium/ui/app_list/views/pulsing_block_view.cc106
-rw-r--r--chromium/ui/app_list/views/pulsing_block_view.h40
-rw-r--r--chromium/ui/app_list/views/search_box_view.cc243
-rw-r--r--chromium/ui/app_list/views/search_box_view.h105
-rw-r--r--chromium/ui/app_list/views/search_box_view_delegate.h25
-rw-r--r--chromium/ui/app_list/views/search_result_actions_view.cc106
-rw-r--r--chromium/ui/app_list/views/search_result_actions_view.h51
-rw-r--r--chromium/ui/app_list/views/search_result_actions_view_delegate.h22
-rw-r--r--chromium/ui/app_list/views/search_result_list_view.cc188
-rw-r--r--chromium/ui/app_list/views/search_result_list_view.h78
-rw-r--r--chromium/ui/app_list/views/search_result_list_view_delegate.h40
-rw-r--r--chromium/ui/app_list/views/search_result_view.cc356
-rw-r--r--chromium/ui/app_list/views/search_result_view.h114
-rw-r--r--chromium/ui/app_list/views/search_result_view_delegate.h36
-rw-r--r--chromium/ui/app_list/views/signin_view.cc135
-rw-r--r--chromium/ui/app_list/views/signin_view.h52
-rw-r--r--chromium/ui/app_list/views/speech_view.cc227
-rw-r--r--chromium/ui/app_list/views/speech_view.h64
-rw-r--r--chromium/ui/aura/BUILD.gn303
-rw-r--r--chromium/ui/aura/DEPS3
-rw-r--r--chromium/ui/aura/aura.gyp150
-rw-r--r--chromium/ui/aura/aura_export.h6
-rw-r--r--chromium/ui/aura/bench/DEPS2
-rw-r--r--chromium/ui/aura/bench/bench_main.cc157
-rw-r--r--chromium/ui/aura/client/activation_change_observer.cc29
-rw-r--r--chromium/ui/aura/client/activation_change_observer.h45
-rw-r--r--chromium/ui/aura/client/activation_client.cc38
-rw-r--r--chromium/ui/aura/client/activation_client.h77
-rw-r--r--chromium/ui/aura/client/activation_delegate.cc27
-rw-r--r--chromium/ui/aura/client/activation_delegate.h37
-rw-r--r--chromium/ui/aura/client/animation_host.cc32
-rw-r--r--chromium/ui/aura/client/animation_host.h48
-rw-r--r--chromium/ui/aura/client/capture_client.cc2
-rw-r--r--chromium/ui/aura/client/cursor_client.h13
-rw-r--r--chromium/ui/aura/client/default_activation_client.cc128
-rw-r--r--chromium/ui/aura/client/default_activation_client.h69
-rw-r--r--chromium/ui/aura/client/default_capture_client.cc5
-rw-r--r--chromium/ui/aura/client/dispatcher_client.cc29
-rw-r--r--chromium/ui/aura/client/dispatcher_client.h31
-rw-r--r--chromium/ui/aura/client/drag_drop_client.cc31
-rw-r--r--chromium/ui/aura/client/drag_drop_client.h62
-rw-r--r--chromium/ui/aura/client/drag_drop_delegate.cc27
-rw-r--r--chromium/ui/aura/client/drag_drop_delegate.h51
-rw-r--r--chromium/ui/aura/client/event_client.cc2
-rw-r--r--chromium/ui/aura/client/focus_client.cc2
-rw-r--r--chromium/ui/aura/client/screen_position_client.cc2
-rw-r--r--chromium/ui/aura/client/tooltip_client.cc42
-rw-r--r--chromium/ui/aura/client/tooltip_client.h38
-rw-r--r--chromium/ui/aura/client/user_action_client.cc30
-rw-r--r--chromium/ui/aura/client/user_action_client.h37
-rw-r--r--chromium/ui/aura/client/visibility_client.cc2
-rw-r--r--chromium/ui/aura/client/window_move_client.cc28
-rw-r--r--chromium/ui/aura/client/window_move_client.h56
-rw-r--r--chromium/ui/aura/client/window_stacking_client.cc3
-rw-r--r--chromium/ui/aura/client/window_stacking_client.h19
-rw-r--r--chromium/ui/aura/client/window_tree_client.cc2
-rw-r--r--chromium/ui/aura/client/window_types.h36
-rw-r--r--chromium/ui/aura/demo/DEPS3
-rw-r--r--chromium/ui/aura/demo/demo_main.cc71
-rw-r--r--chromium/ui/aura/device_list_updater_aurax11.cc32
-rw-r--r--chromium/ui/aura/device_list_updater_aurax11.h32
-rw-r--r--chromium/ui/aura/dispatcher_win.cc33
-rw-r--r--chromium/ui/aura/env.cc114
-rw-r--r--chromium/ui/aura/env.h70
-rw-r--r--chromium/ui/aura/env_observer.h10
-rw-r--r--chromium/ui/aura/gestures/gesture_recognizer_unittest.cc1584
-rw-r--r--chromium/ui/aura/remote_root_window_host_win.cc732
-rw-r--r--chromium/ui/aura/remote_root_window_host_win.h298
-rw-r--r--chromium/ui/aura/remote_window_tree_host_win.cc525
-rw-r--r--chromium/ui/aura/remote_window_tree_host_win.h194
-rw-r--r--chromium/ui/aura/root_window.cc1172
-rw-r--r--chromium/ui/aura/root_window.h401
-rw-r--r--chromium/ui/aura/root_window_host_ozone.cc133
-rw-r--r--chromium/ui/aura/root_window_host_ozone.h59
-rw-r--r--chromium/ui/aura/root_window_host_win.cc309
-rw-r--r--chromium/ui/aura/root_window_host_win.h96
-rw-r--r--chromium/ui/aura/root_window_host_x11.cc1060
-rw-r--r--chromium/ui/aura/root_window_host_x11.h152
-rw-r--r--chromium/ui/aura/root_window_host_x11_unittest.cc290
-rw-r--r--chromium/ui/aura/root_window_observer.h41
-rw-r--r--chromium/ui/aura/root_window_transformer.h45
-rw-r--r--chromium/ui/aura/root_window_unittest.cc1530
-rw-r--r--chromium/ui/aura/scoped_window_targeter.cc29
-rw-r--r--chromium/ui/aura/scoped_window_targeter.h46
-rw-r--r--chromium/ui/aura/window.cc566
-rw-r--r--chromium/ui/aura/window.h161
-rw-r--r--chromium/ui/aura/window_delegate.h15
-rw-r--r--chromium/ui/aura/window_event_dispatcher.cc861
-rw-r--r--chromium/ui/aura/window_event_dispatcher.h265
-rw-r--r--chromium/ui/aura/window_event_dispatcher_unittest.cc2219
-rw-r--r--chromium/ui/aura/window_observer.cc31
-rw-r--r--chromium/ui/aura/window_observer.h34
-rw-r--r--chromium/ui/aura/window_targeter.cc93
-rw-r--r--chromium/ui/aura/window_targeter.h17
-rw-r--r--chromium/ui/aura/window_targeter_unittest.cc125
-rw-r--r--chromium/ui/aura/window_tree_host.cc256
-rw-r--r--chromium/ui/aura/window_tree_host.h203
-rw-r--r--chromium/ui/aura/window_tree_host_delegate.h67
-rw-r--r--chromium/ui/aura/window_tree_host_mac.h61
-rw-r--r--chromium/ui/aura/window_tree_host_mac.mm114
-rw-r--r--chromium/ui/aura/window_tree_host_observer.h36
-rw-r--r--chromium/ui/aura/window_tree_host_ozone.cc118
-rw-r--r--chromium/ui/aura/window_tree_host_ozone.h58
-rw-r--r--chromium/ui/aura/window_tree_host_win.cc238
-rw-r--r--chromium/ui/aura/window_tree_host_win.h93
-rw-r--r--chromium/ui/aura/window_tree_host_x11.cc744
-rw-r--r--chromium/ui/aura/window_tree_host_x11.h118
-rw-r--r--chromium/ui/aura/window_unittest.cc807
-rw-r--r--chromium/ui/base/BUILD.gn556
-rw-r--r--chromium/ui/base/DEPS1
-rw-r--r--chromium/ui/base/accelerators/accelerator.cc48
-rw-r--r--chromium/ui/base/accelerators/accelerator.h11
-rw-r--r--chromium/ui/base/accelerators/accelerator_manager.h4
-rw-r--r--chromium/ui/base/accelerators/menu_label_accelerator_util_linux.h10
-rw-r--r--chromium/ui/base/accelerators/platform_accelerator.h4
-rw-r--r--chromium/ui/base/accelerators/platform_accelerator_cocoa.h5
-rw-r--r--chromium/ui/base/accelerators/platform_accelerator_gtk.cc93
-rw-r--r--chromium/ui/base/accelerators/platform_accelerator_gtk.h48
-rw-r--r--chromium/ui/base/accessibility/OWNERS1
-rw-r--r--chromium/ui/base/accessibility/accessibility_types.h110
-rw-r--r--chromium/ui/base/accessibility/accessible_text_utils.cc92
-rw-r--r--chromium/ui/base/accessibility/accessible_text_utils.h53
-rw-r--r--chromium/ui/base/accessibility/accessible_view_state.cc19
-rw-r--r--chromium/ui/base/accessibility/accessible_view_state.h73
-rw-r--r--chromium/ui/base/android/view_android.cc2
-rw-r--r--chromium/ui/base/android/view_android.h6
-rw-r--r--chromium/ui/base/android/window_android.cc62
-rw-r--r--chromium/ui/base/android/window_android.h26
-rw-r--r--chromium/ui/base/android/window_android_compositor.h32
-rw-r--r--chromium/ui/base/android/window_android_observer.h7
-rw-r--r--chromium/ui/base/base_window.h2
-rw-r--r--chromium/ui/base/clipboard/clipboard.cc2
-rw-r--r--chromium/ui/base/clipboard/clipboard.h80
-rw-r--r--chromium/ui/base/clipboard/clipboard_android.cc16
-rw-r--r--chromium/ui/base/clipboard/clipboard_aura.cc56
-rw-r--r--chromium/ui/base/clipboard/clipboard_aurax11.cc182
-rw-r--r--chromium/ui/base/clipboard/clipboard_gtk.cc676
-rw-r--r--chromium/ui/base/clipboard/clipboard_mac.mm32
-rw-r--r--chromium/ui/base/clipboard/clipboard_types.h3
-rw-r--r--chromium/ui/base/clipboard/clipboard_unittest.cc140
-rw-r--r--chromium/ui/base/clipboard/clipboard_util_win.cc55
-rw-r--r--chromium/ui/base/clipboard/clipboard_util_win.h24
-rw-r--r--chromium/ui/base/clipboard/clipboard_win.cc54
-rw-r--r--chromium/ui/base/clipboard/custom_data_helper.cc2
-rw-r--r--chromium/ui/base/clipboard/custom_data_helper.h28
-rw-r--r--chromium/ui/base/clipboard/custom_data_helper_linux.cc1
-rw-r--r--chromium/ui/base/clipboard/custom_data_helper_mac.mm4
-rw-r--r--chromium/ui/base/clipboard/custom_data_helper_unittest.cc40
-rw-r--r--chromium/ui/base/clipboard/scoped_clipboard_writer.cc10
-rw-r--r--chromium/ui/base/clipboard/scoped_clipboard_writer.h4
-rw-r--r--chromium/ui/base/cocoa/appkit_utils.h17
-rw-r--r--chromium/ui/base/cocoa/base_view.h8
-rw-r--r--chromium/ui/base/cocoa/base_view_unittest.mm2
-rw-r--r--chromium/ui/base/cocoa/cocoa_base_utils.h31
-rw-r--r--chromium/ui/base/cocoa/cocoa_base_utils.mm22
-rw-r--r--chromium/ui/base/cocoa/cocoa_base_utils_unittest.mm68
-rw-r--r--chromium/ui/base/cocoa/cocoa_event_utils.h42
-rw-r--r--chromium/ui/base/cocoa/cocoa_event_utils.mm70
-rw-r--r--chromium/ui/base/cocoa/cocoa_event_utils_unittest.mm128
-rw-r--r--chromium/ui/base/cocoa/controls/blue_label_button.h4
-rw-r--r--chromium/ui/base/cocoa/controls/blue_label_button.mm39
-rw-r--r--chromium/ui/base/cocoa/controls/blue_label_button_unittest.mm2
-rw-r--r--chromium/ui/base/cocoa/controls/hover_image_menu_button.h4
-rw-r--r--chromium/ui/base/cocoa/controls/hover_image_menu_button_cell.h4
-rw-r--r--chromium/ui/base/cocoa/controls/hover_image_menu_button_unittest.mm2
-rw-r--r--chromium/ui/base/cocoa/controls/hyperlink_button_cell.h4
-rw-r--r--chromium/ui/base/cocoa/controls/hyperlink_button_cell_unittest.mm4
-rw-r--r--chromium/ui/base/cocoa/events_mac_unittest.mm299
-rw-r--r--chromium/ui/base/cocoa/find_pasteboard.h8
-rw-r--r--chromium/ui/base/cocoa/find_pasteboard.mm2
-rw-r--r--chromium/ui/base/cocoa/flipped_view.h4
-rw-r--r--chromium/ui/base/cocoa/focus_tracker.h4
-rw-r--r--chromium/ui/base/cocoa/focus_tracker_unittest.mm2
-rw-r--r--chromium/ui/base/cocoa/focus_window_set.h15
-rw-r--r--chromium/ui/base/cocoa/focus_window_set.mm85
-rw-r--r--chromium/ui/base/cocoa/fullscreen_window_manager.h4
-rw-r--r--chromium/ui/base/cocoa/fullscreen_window_manager_unittest.mm2
-rw-r--r--chromium/ui/base/cocoa/hover_button.h4
-rw-r--r--chromium/ui/base/cocoa/hover_image_button.h4
-rw-r--r--chromium/ui/base/cocoa/hover_image_button_unittest.mm2
-rw-r--r--chromium/ui/base/cocoa/menu_controller.h8
-rw-r--r--chromium/ui/base/cocoa/menu_controller.mm24
-rw-r--r--chromium/ui/base/cocoa/menu_controller_unittest.mm44
-rw-r--r--chromium/ui/base/cocoa/nib_loading.h4
-rw-r--r--chromium/ui/base/cocoa/nsgraphics_context_additions.mm11
-rw-r--r--chromium/ui/base/cocoa/nsgraphics_context_additions_unittest.mm2
-rw-r--r--chromium/ui/base/cocoa/tracking_area.h6
-rw-r--r--chromium/ui/base/cocoa/tracking_area_unittest.mm2
-rw-r--r--chromium/ui/base/cocoa/underlay_opengl_hosting_window.h4
-rw-r--r--chromium/ui/base/cocoa/underlay_opengl_hosting_window.mm16
-rw-r--r--chromium/ui/base/cocoa/window_size_constants.h4
-rw-r--r--chromium/ui/base/cursor/DEPS3
-rw-r--r--chromium/ui/base/cursor/cursor.h4
-rw-r--r--chromium/ui/base/cursor/cursor_android.cc19
-rw-r--r--chromium/ui/base/cursor/cursor_loader.h22
-rw-r--r--chromium/ui/base/cursor/cursor_loader_null.cc25
-rw-r--r--chromium/ui/base/cursor/cursor_loader_null.h36
-rw-r--r--chromium/ui/base/cursor/cursor_loader_ozone.cc68
-rw-r--r--chromium/ui/base/cursor/cursor_loader_ozone.h41
-rw-r--r--chromium/ui/base/cursor/cursor_loader_win.cc16
-rw-r--r--chromium/ui/base/cursor/cursor_loader_win.h6
-rw-r--r--chromium/ui/base/cursor/cursor_loader_x11.cc63
-rw-r--r--chromium/ui/base/cursor/cursor_loader_x11.h15
-rw-r--r--chromium/ui/base/cursor/cursor_loader_x11_unittest.cc2
-rw-r--r--chromium/ui/base/cursor/cursor_null.cc15
-rw-r--r--chromium/ui/base/cursor/cursor_ozone.cc21
-rw-r--r--chromium/ui/base/cursor/cursor_util.cc60
-rw-r--r--chromium/ui/base/cursor/cursor_util.h27
-rw-r--r--chromium/ui/base/cursor/cursors_aura.h27
-rw-r--r--chromium/ui/base/cursor/image_cursors.cc150
-rw-r--r--chromium/ui/base/cursor/image_cursors.h52
-rw-r--r--chromium/ui/base/cursor/ozone/OWNERS2
-rw-r--r--chromium/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.cc73
-rw-r--r--chromium/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h75
-rw-r--r--chromium/ui/base/default_theme_provider.cc18
-rw-r--r--chromium/ui/base/default_theme_provider.h7
-rw-r--r--chromium/ui/base/device_form_factor.h4
-rw-r--r--chromium/ui/base/device_form_factor_android.cc17
-rw-r--r--chromium/ui/base/device_form_factor_android.h18
-rw-r--r--chromium/ui/base/dragdrop/cocoa_dnd_util.h14
-rw-r--r--chromium/ui/base/dragdrop/download_file_interface.h6
-rw-r--r--chromium/ui/base/dragdrop/drag_drop_types.h8
-rw-r--r--chromium/ui/base/dragdrop/drag_source_win.h4
-rw-r--r--chromium/ui/base/dragdrop/drag_utils.cc50
-rw-r--r--chromium/ui/base/dragdrop/drag_utils.h40
-rw-r--r--chromium/ui/base/dragdrop/drag_utils_aura.cc1
-rw-r--r--chromium/ui/base/dragdrop/drag_utils_mac.mm23
-rw-r--r--chromium/ui/base/dragdrop/drag_utils_win.cc15
-rw-r--r--chromium/ui/base/dragdrop/drop_target_event.h2
-rw-r--r--chromium/ui/base/dragdrop/drop_target_win.h4
-rw-r--r--chromium/ui/base/dragdrop/file_info.cc17
-rw-r--r--chromium/ui/base/dragdrop/file_info.h25
-rw-r--r--chromium/ui/base/dragdrop/gtk_dnd_util.cc275
-rw-r--r--chromium/ui/base/dragdrop/gtk_dnd_util.h92
-rw-r--r--chromium/ui/base/dragdrop/gtk_dnd_util_unittest.cc81
-rw-r--r--chromium/ui/base/dragdrop/os_exchange_data.cc56
-rw-r--r--chromium/ui/base/dragdrop/os_exchange_data.h57
-rw-r--r--chromium/ui/base/dragdrop/os_exchange_data_provider_aura.cc22
-rw-r--r--chromium/ui/base/dragdrop/os_exchange_data_provider_aura.h15
-rw-r--r--chromium/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc249
-rw-r--r--chromium/ui/base/dragdrop/os_exchange_data_provider_aurax11.h38
-rw-r--r--chromium/ui/base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc93
-rw-r--r--chromium/ui/base/dragdrop/os_exchange_data_provider_mac.h50
-rw-r--r--chromium/ui/base/dragdrop/os_exchange_data_provider_mac.mm116
-rw-r--r--chromium/ui/base/dragdrop/os_exchange_data_provider_win.cc58
-rw-r--r--chromium/ui/base/dragdrop/os_exchange_data_provider_win.h20
-rw-r--r--chromium/ui/base/dragdrop/os_exchange_data_unittest.cc28
-rw-r--r--chromium/ui/base/dragdrop/os_exchange_data_win_unittest.cc24
-rw-r--r--chromium/ui/base/gtk/OWNERS2
-rw-r--r--chromium/ui/base/gtk/event_synthesis_gtk.cc90
-rw-r--r--chromium/ui/base/gtk/event_synthesis_gtk.h37
-rw-r--r--chromium/ui/base/gtk/focus_store_gtk.cc55
-rw-r--r--chromium/ui/base/gtk/focus_store_gtk.h46
-rw-r--r--chromium/ui/base/gtk/g_object_destructor_filo.cc89
-rw-r--r--chromium/ui/base/gtk/g_object_destructor_filo.h91
-rw-r--r--chromium/ui/base/gtk/gtk_expanded_container.cc195
-rw-r--r--chromium/ui/base/gtk/gtk_expanded_container.h74
-rw-r--r--chromium/ui/base/gtk/gtk_expanded_container_unittest.cc164
-rw-r--r--chromium/ui/base/gtk/gtk_floating_container.cc322
-rw-r--r--chromium/ui/base/gtk/gtk_floating_container.h89
-rw-r--r--chromium/ui/base/gtk/gtk_hig_constants.h54
-rw-r--r--chromium/ui/base/gtk/gtk_screen_util.cc58
-rw-r--r--chromium/ui/base/gtk/gtk_screen_util.h34
-rw-r--r--chromium/ui/base/gtk/gtk_signal.h68
-rw-r--r--chromium/ui/base/gtk/gtk_signal_registrar.cc98
-rw-r--r--chromium/ui/base/gtk/gtk_signal_registrar.h75
-rw-r--r--chromium/ui/base/gtk/gtk_windowing.cc48
-rw-r--r--chromium/ui/base/gtk/gtk_windowing.h19
-rw-r--r--chromium/ui/base/gtk/owned_widget_gtk.cc45
-rw-r--r--chromium/ui/base/gtk/owned_widget_gtk.h95
-rw-r--r--chromium/ui/base/gtk/scoped_region.cc41
-rw-r--r--chromium/ui/base/gtk/scoped_region.h40
-rw-r--r--chromium/ui/base/ime/DEPS2
-rw-r--r--chromium/ui/base/ime/OWNERS13
-rw-r--r--chromium/ui/base/ime/candidate_window.cc103
-rw-r--r--chromium/ui/base/ime/candidate_window.h131
-rw-r--r--chromium/ui/base/ime/candidate_window_unittest.cc262
-rw-r--r--chromium/ui/base/ime/chromeos/character_composer.cc46
-rw-r--r--chromium/ui/base/ime/chromeos/character_composer.h14
-rw-r--r--chromium/ui/base/ime/chromeos/character_composer_unittest.cc100
-rw-r--r--chromium/ui/base/ime/chromeos/ibus_bridge.cc128
-rw-r--r--chromium/ui/base/ime/chromeos/ibus_bridge.h211
-rw-r--r--chromium/ui/base/ime/chromeos/ime_bridge.cc107
-rw-r--r--chromium/ui/base/ime/chromeos/ime_bridge.h191
-rw-r--r--chromium/ui/base/ime/chromeos/ime_keymap.cc180
-rw-r--r--chromium/ui/base/ime/chromeos/ime_keymap.h20
-rw-r--r--chromium/ui/base/ime/chromeos/mock_ime_candidate_window_handler.cc21
-rw-r--r--chromium/ui/base/ime/chromeos/mock_ime_candidate_window_handler.h33
-rw-r--r--chromium/ui/base/ime/chromeos/mock_ime_engine_handler.cc7
-rw-r--r--chromium/ui/base/ime/chromeos/mock_ime_engine_handler.h6
-rw-r--r--chromium/ui/base/ime/chromeos/mock_ime_input_context_handler.cc15
-rw-r--r--chromium/ui/base/ime/chromeos/mock_ime_input_context_handler.h22
-rw-r--r--chromium/ui/base/ime/composition_text.h4
-rw-r--r--chromium/ui/base/ime/composition_text_util_pango.cc13
-rw-r--r--chromium/ui/base/ime/composition_text_util_pango.h4
-rw-r--r--chromium/ui/base/ime/composition_text_util_pango_unittest.cc113
-rw-r--r--chromium/ui/base/ime/composition_underline.h44
-rw-r--r--chromium/ui/base/ime/dummy_input_method.cc7
-rw-r--r--chromium/ui/base/ime/dummy_input_method.h3
-rw-r--r--chromium/ui/base/ime/dummy_input_method_delegate.cc9
-rw-r--r--chromium/ui/base/ime/dummy_input_method_delegate.h14
-rw-r--r--chromium/ui/base/ime/dummy_text_input_client.cc28
-rw-r--r--chromium/ui/base/ime/dummy_text_input_client.h20
-rw-r--r--chromium/ui/base/ime/ime.gypi51
-rw-r--r--chromium/ui/base/ime/ime_test_support.gypi10
-rw-r--r--chromium/ui/base/ime/ime_unittests.gypi6
-rw-r--r--chromium/ui/base/ime/infolist_entry.cc22
-rw-r--r--chromium/ui/base/ime/infolist_entry.h26
-rw-r--r--chromium/ui/base/ime/input_method.h12
-rw-r--r--chromium/ui/base/ime/input_method_auralinux.cc96
-rw-r--r--chromium/ui/base/ime/input_method_auralinux.h34
-rw-r--r--chromium/ui/base/ime/input_method_base.cc30
-rw-r--r--chromium/ui/base/ime/input_method_base.h5
-rw-r--r--chromium/ui/base/ime/input_method_base_unittest.cc45
-rw-r--r--chromium/ui/base/ime/input_method_chromeos.cc661
-rw-r--r--chromium/ui/base/ime/input_method_chromeos.h158
-rw-r--r--chromium/ui/base/ime/input_method_chromeos_unittest.cc1071
-rw-r--r--chromium/ui/base/ime/input_method_delegate.h18
-rw-r--r--chromium/ui/base/ime/input_method_factory.cc107
-rw-r--r--chromium/ui/base/ime/input_method_factory.h93
-rw-r--r--chromium/ui/base/ime/input_method_ibus.cc665
-rw-r--r--chromium/ui/base/ime/input_method_ibus.h170
-rw-r--r--chromium/ui/base/ime/input_method_ibus_unittest.cc1027
-rw-r--r--chromium/ui/base/ime/input_method_imm32.cc299
-rw-r--r--chromium/ui/base/ime/input_method_imm32.h87
-rw-r--r--chromium/ui/base/ime/input_method_initializer.cc66
-rw-r--r--chromium/ui/base/ime/input_method_initializer.h10
-rw-r--r--chromium/ui/base/ime/input_method_mac.h38
-rw-r--r--chromium/ui/base/ime/input_method_mac.mm49
-rw-r--r--chromium/ui/base/ime/input_method_minimal.cc4
-rw-r--r--chromium/ui/base/ime/input_method_minimal.h3
-rw-r--r--chromium/ui/base/ime/input_method_observer.h8
-rw-r--r--chromium/ui/base/ime/input_method_tsf.cc158
-rw-r--r--chromium/ui/base/ime/input_method_tsf.h58
-rw-r--r--chromium/ui/base/ime/input_method_win.cc375
-rw-r--r--chromium/ui/base/ime/input_method_win.h87
-rw-r--r--chromium/ui/base/ime/linux/fake_input_method_context.cc5
-rw-r--r--chromium/ui/base/ime/linux/fake_input_method_context.h1
-rw-r--r--chromium/ui/base/ime/linux/linux_input_method_context.h10
-rw-r--r--chromium/ui/base/ime/linux/linux_input_method_context_factory.h4
-rw-r--r--chromium/ui/base/ime/mock_input_method.cc17
-rw-r--r--chromium/ui/base/ime/mock_input_method.h6
-rw-r--r--chromium/ui/base/ime/remote_input_method_delegate_win.h4
-rw-r--r--chromium/ui/base/ime/remote_input_method_win.cc60
-rw-r--r--chromium/ui/base/ime/remote_input_method_win.h13
-rw-r--r--chromium/ui/base/ime/remote_input_method_win_unittest.cc106
-rw-r--r--chromium/ui/base/ime/text_input_client.h25
-rw-r--r--chromium/ui/base/ime/text_input_focus_manager.cc41
-rw-r--r--chromium/ui/base/ime/text_input_focus_manager.h47
-rw-r--r--chromium/ui/base/ime/win/imm32_manager.cc35
-rw-r--r--chromium/ui/base/ime/win/imm32_manager.h16
-rw-r--r--chromium/ui/base/ime/win/mock_tsf_bridge.cc83
-rw-r--r--chromium/ui/base/ime/win/mock_tsf_bridge.h100
-rw-r--r--chromium/ui/base/ime/win/tsf_bridge.cc558
-rw-r--r--chromium/ui/base/ime/win/tsf_bridge.h97
-rw-r--r--chromium/ui/base/ime/win/tsf_event_router.cc307
-rw-r--r--chromium/ui/base/ime/win/tsf_event_router.h81
-rw-r--r--chromium/ui/base/ime/win/tsf_input_scope.cc4
-rw-r--r--chromium/ui/base/ime/win/tsf_input_scope.h13
-rw-r--r--chromium/ui/base/ime/win/tsf_text_store.cc923
-rw-r--r--chromium/ui/base/ime/win/tsf_text_store.h297
-rw-r--r--chromium/ui/base/ime/win/tsf_text_store_unittest.cc1302
-rw-r--r--chromium/ui/base/l10n/formatter.cc327
-rw-r--r--chromium/ui/base/l10n/formatter.h114
-rw-r--r--chromium/ui/base/l10n/l10n_font_util.h14
-rw-r--r--chromium/ui/base/l10n/l10n_util.cc31
-rw-r--r--chromium/ui/base/l10n/l10n_util.h139
-rw-r--r--chromium/ui/base/l10n/l10n_util_android.cc25
-rw-r--r--chromium/ui/base/l10n/l10n_util_android.h13
-rw-r--r--chromium/ui/base/l10n/l10n_util_collator.h8
-rw-r--r--chromium/ui/base/l10n/l10n_util_mac.h75
-rw-r--r--chromium/ui/base/l10n/l10n_util_mac.mm52
-rw-r--r--chromium/ui/base/l10n/l10n_util_mac_unittest.mm2
-rw-r--r--chromium/ui/base/l10n/l10n_util_unittest.cc32
-rw-r--r--chromium/ui/base/l10n/l10n_util_win.cc15
-rw-r--r--chromium/ui/base/l10n/l10n_util_win.h21
-rw-r--r--chromium/ui/base/l10n/time_format.cc396
-rw-r--r--chromium/ui/base/l10n/time_format.h72
-rw-r--r--chromium/ui/base/l10n/time_format_unittest.cc352
-rw-r--r--chromium/ui/base/layout.cc78
-rw-r--r--chromium/ui/base/layout.h41
-rw-r--r--chromium/ui/base/layout_mac.mm4
-rw-r--r--chromium/ui/base/layout_unittest.cc21
-rw-r--r--chromium/ui/base/models/button_menu_item_model.h6
-rw-r--r--chromium/ui/base/models/combobox_model.h4
-rw-r--r--chromium/ui/base/models/combobox_model_observer.h10
-rw-r--r--chromium/ui/base/models/dialog_model.h4
-rw-r--r--chromium/ui/base/models/list_model_observer.h4
-rw-r--r--chromium/ui/base/models/list_selection_model.h4
-rw-r--r--chromium/ui/base/models/menu_model.cc2
-rw-r--r--chromium/ui/base/models/menu_model.h12
-rw-r--r--chromium/ui/base/models/simple_combobox_model.cc33
-rw-r--r--chromium/ui/base/models/simple_combobox_model.h35
-rw-r--r--chromium/ui/base/models/simple_menu_model.h9
-rw-r--r--chromium/ui/base/models/table_model.h6
-rw-r--r--chromium/ui/base/models/table_model_observer.h4
-rw-r--r--chromium/ui/base/models/tree_model.h6
-rw-r--r--chromium/ui/base/models/tree_node_model.h2
-rw-r--r--chromium/ui/base/models/tree_node_model_unittest.cc2
-rw-r--r--chromium/ui/base/nine_image_painter_factory.cc32
-rw-r--r--chromium/ui/base/nine_image_painter_factory.h40
-rw-r--r--chromium/ui/base/resource/data_pack.cc28
-rw-r--r--chromium/ui/base/resource/data_pack.h8
-rw-r--r--chromium/ui/base/resource/data_pack_literal.cc16
-rw-r--r--chromium/ui/base/resource/data_pack_unittest.cc55
-rw-r--r--chromium/ui/base/resource/resource_bundle.cc163
-rw-r--r--chromium/ui/base/resource/resource_bundle.h19
-rw-r--r--chromium/ui/base/resource/resource_bundle_auralinux.cc2
-rw-r--r--chromium/ui/base/resource/resource_bundle_gtk.cc112
-rw-r--r--chromium/ui/base/resource/resource_bundle_ios.mm10
-rw-r--r--chromium/ui/base/resource/resource_bundle_unittest.cc64
-rw-r--r--chromium/ui/base/resource/resource_bundle_win.cc40
-rw-r--r--chromium/ui/base/resource/resource_bundle_win.h6
-rw-r--r--chromium/ui/base/resource/resource_data_dll_win.cc3
-rw-r--r--chromium/ui/base/resource/resource_handle.h4
-rw-r--r--chromium/ui/base/strings/OWNERS1
-rw-r--r--chromium/ui/base/strings/app_locale_settings.grd263
-rw-r--r--chromium/ui/base/strings/app_locale_settings_am.xtb8
-rw-r--r--chromium/ui/base/strings/app_locale_settings_ar.xtb9
-rw-r--r--chromium/ui/base/strings/app_locale_settings_bn.xtb20
-rw-r--r--chromium/ui/base/strings/app_locale_settings_hi.xtb11
-rw-r--r--chromium/ui/base/strings/app_locale_settings_ja.xtb22
-rw-r--r--chromium/ui/base/strings/app_locale_settings_kn.xtb13
-rw-r--r--chromium/ui/base/strings/app_locale_settings_ko.xtb19
-rw-r--r--chromium/ui/base/strings/app_locale_settings_ml.xtb19
-rw-r--r--chromium/ui/base/strings/app_locale_settings_mr.xtb11
-rw-r--r--chromium/ui/base/strings/app_locale_settings_ta.xtb8
-rw-r--r--chromium/ui/base/strings/app_locale_settings_te.xtb13
-rw-r--r--chromium/ui/base/strings/app_locale_settings_th.xtb16
-rw-r--r--chromium/ui/base/strings/app_locale_settings_zh-CN.xtb19
-rw-r--r--chromium/ui/base/strings/app_locale_settings_zh-TW.xtb19
-rw-r--r--chromium/ui/base/strings/ui_strings.grd1616
-rw-r--r--chromium/ui/base/strings/ui_strings.gyp89
-rw-r--r--chromium/ui/base/strings/ui_strings_am.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_ar.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_bg.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_bn.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_ca.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_cs.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_da.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_de.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_el.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_en-GB.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_es-419.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_es.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_et.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_fa.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_fi.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_fil.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_fr.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_gu.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_hi.xtb194
-rw-r--r--chromium/ui/base/strings/ui_strings_hr.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_hu.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_id.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_it.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_iw.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_ja.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_kn.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_ko.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_lt.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_lv.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_ml.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_mr.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_ms.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_nl.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_no.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_pl.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_pt-BR.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_pt-PT.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_ro.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_ru.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_sk.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_sl.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_sr.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_sv.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_sw.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_ta.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_te.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_th.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_tr.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_uk.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_vi.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_zh-CN.xtb192
-rw-r--r--chromium/ui/base/strings/ui_strings_zh-TW.xtb192
-rw-r--r--chromium/ui/base/text/bytes_formatting.h14
-rw-r--r--chromium/ui/base/text/bytes_formatting_unittest.cc4
-rw-r--r--chromium/ui/base/theme_provider.h23
-rw-r--r--chromium/ui/base/touch/touch_device.h20
-rw-r--r--chromium/ui/base/touch/touch_device_android.cc20
-rw-r--r--chromium/ui/base/touch/touch_editing_controller.h24
-rw-r--r--chromium/ui/base/touch/touch_enabled.h4
-rw-r--r--chromium/ui/base/ui_base.gyp644
-rw-r--r--chromium/ui/base/ui_base_export.h37
-rw-r--r--chromium/ui/base/ui_base_paths.cc16
-rw-r--r--chromium/ui/base/ui_base_paths.h12
-rw-r--r--chromium/ui/base/ui_base_switches.cc50
-rw-r--r--chromium/ui/base/ui_base_switches.h35
-rw-r--r--chromium/ui/base/ui_base_switches_util.cc7
-rw-r--r--chromium/ui/base/ui_base_switches_util.h8
-rw-r--r--chromium/ui/base/ui_base_types.h5
-rw-r--r--chromium/ui/base/ui_export.h32
-rw-r--r--chromium/ui/base/view_prop.h6
-rw-r--r--chromium/ui/base/webui/jstemplate_builder.h39
-rw-r--r--chromium/ui/base/webui/web_ui_util.cc19
-rw-r--r--chromium/ui/base/webui/web_ui_util.h29
-rw-r--r--chromium/ui/base/webui/web_ui_util_unittest.cc29
-rw-r--r--chromium/ui/base/win/accessibility_misc_utils.cc10
-rw-r--r--chromium/ui/base/win/accessibility_misc_utils.h16
-rw-r--r--chromium/ui/base/win/dpi_setup.cc1
-rw-r--r--chromium/ui/base/win/dpi_setup.h4
-rw-r--r--chromium/ui/base/win/foreground_helper.cc10
-rw-r--r--chromium/ui/base/win/foreground_helper.h12
-rw-r--r--chromium/ui/base/win/hidden_window.cc6
-rw-r--r--chromium/ui/base/win/hidden_window.h4
-rw-r--r--chromium/ui/base/win/hwnd_subclass.cc7
-rw-r--r--chromium/ui/base/win/hwnd_subclass.h8
-rw-r--r--chromium/ui/base/win/internal_constants.cc13
-rw-r--r--chromium/ui/base/win/internal_constants.h20
-rw-r--r--chromium/ui/base/win/lock_state.h4
-rw-r--r--chromium/ui/base/win/message_box_win.cc8
-rw-r--r--chromium/ui/base/win/message_box_win.h10
-rw-r--r--chromium/ui/base/win/mouse_wheel_util.h9
-rw-r--r--chromium/ui/base/win/scoped_ole_initializer.h4
-rw-r--r--chromium/ui/base/win/shell.cc44
-rw-r--r--chromium/ui/base/win/shell.h44
-rw-r--r--chromium/ui/base/win/touch_input.cc8
-rw-r--r--chromium/ui/base/win/touch_input.h10
-rw-r--r--chromium/ui/base/win/window_event_target.cc16
-rw-r--r--chromium/ui/base/win/window_event_target.h71
-rw-r--r--chromium/ui/base/window_open_disposition.h14
-rw-r--r--chromium/ui/base/window_open_disposition_list.h2
-rw-r--r--chromium/ui/base/work_area_watcher_observer.h4
-rw-r--r--chromium/ui/base/x/active_window_watcher_x.cc99
-rw-r--r--chromium/ui/base/x/active_window_watcher_x.h60
-rw-r--r--chromium/ui/base/x/active_window_watcher_x_observer.h25
-rw-r--r--chromium/ui/base/x/root_window_property_watcher_x.cc59
-rw-r--r--chromium/ui/base/x/root_window_property_watcher_x.h41
-rw-r--r--chromium/ui/base/x/selection_owner.cc148
-rw-r--r--chromium/ui/base/x/selection_owner.h16
-rw-r--r--chromium/ui/base/x/selection_requestor.cc106
-rw-r--r--chromium/ui/base/x/selection_requestor.h41
-rw-r--r--chromium/ui/base/x/selection_utils.cc47
-rw-r--r--chromium/ui/base/x/selection_utils.h38
-rw-r--r--chromium/ui/base/x/work_area_watcher_x.cc53
-rw-r--r--chromium/ui/base/x/work_area_watcher_x.h55
-rw-r--r--chromium/ui/base/x/x11_menu_list.cc46
-rw-r--r--chromium/ui/base/x/x11_menu_list.h48
-rw-r--r--chromium/ui/base/x/x11_util.cc536
-rw-r--r--chromium/ui/base/x/x11_util.h245
-rw-r--r--chromium/ui/base/x/x11_util_internal.h21
-rw-r--r--chromium/ui/base/x/x11_util_unittest.cc25
-rw-r--r--chromium/ui/chromeos/ui_chromeos.gyp31
-rw-r--r--chromium/ui/compositor/BUILD.gn153
-rw-r--r--chromium/ui/compositor/DEPS1
-rw-r--r--chromium/ui/compositor/PRESUBMIT.py8
-rw-r--r--chromium/ui/compositor/compositor.cc370
-rw-r--r--chromium/ui/compositor/compositor.gyp65
-rw-r--r--chromium/ui/compositor/compositor.h155
-rw-r--r--chromium/ui/compositor/compositor_observer.h5
-rw-r--r--chromium/ui/compositor/compositor_switches.cc35
-rw-r--r--chromium/ui/compositor/compositor_switches.h19
-rw-r--r--chromium/ui/compositor/compositor_vsync_manager.cc63
-rw-r--r--chromium/ui/compositor/compositor_vsync_manager.h71
-rw-r--r--chromium/ui/compositor/debug_utils.cc6
-rw-r--r--chromium/ui/compositor/debug_utils.h2
-rw-r--r--chromium/ui/compositor/dip_util.cc10
-rw-r--r--chromium/ui/compositor/layer.cc345
-rw-r--r--chromium/ui/compositor/layer.h130
-rw-r--r--chromium/ui/compositor/layer_animation_delegate.h3
-rw-r--r--chromium/ui/compositor/layer_animation_element.cc125
-rw-r--r--chromium/ui/compositor/layer_animation_element.h27
-rw-r--r--chromium/ui/compositor/layer_animation_element_unittest.cc11
-rw-r--r--chromium/ui/compositor/layer_animation_observer.cc13
-rw-r--r--chromium/ui/compositor/layer_animation_sequence.cc27
-rw-r--r--chromium/ui/compositor/layer_animation_sequence.h4
-rw-r--r--chromium/ui/compositor/layer_animation_sequence_unittest.cc74
-rw-r--r--chromium/ui/compositor/layer_animator.cc130
-rw-r--r--chromium/ui/compositor/layer_animator.h25
-rw-r--r--chromium/ui/compositor/layer_animator_collection.cc56
-rw-r--r--chromium/ui/compositor/layer_animator_collection.h56
-rw-r--r--chromium/ui/compositor/layer_animator_unittest.cc444
-rw-r--r--chromium/ui/compositor/layer_owner.cc72
-rw-r--r--chromium/ui/compositor/layer_owner.h24
-rw-r--r--chromium/ui/compositor/layer_owner_delegate.h27
-rw-r--r--chromium/ui/compositor/layer_owner_unittest.cc33
-rw-r--r--chromium/ui/compositor/layer_tree_owner.cc34
-rw-r--r--chromium/ui/compositor/layer_tree_owner.h38
-rw-r--r--chromium/ui/compositor/layer_unittest.cc296
-rw-r--r--chromium/ui/compositor/scoped_layer_animation_settings.cc12
-rw-r--r--chromium/ui/compositor/scoped_layer_animation_settings.h4
-rw-r--r--chromium/ui/compositor/test/test_compositor_host_ozone.cc20
-rw-r--r--chromium/ui/compositor/transform_animation_curve_adapter.cc28
-rw-r--r--chromium/ui/compositor/transform_animation_curve_adapter.h6
-rw-r--r--chromium/ui/display/DEPS4
-rw-r--r--chromium/ui/display/OWNERS3
-rw-r--r--chromium/ui/display/display.gyp162
-rw-r--r--chromium/ui/display/display_export.h37
-rw-r--r--chromium/ui/display/display_switches.cc16
-rw-r--r--chromium/ui/display/display_switches.h21
-rw-r--r--chromium/ui/display/display_unittests.gypi34
-rw-r--r--chromium/ui/display/types/DEPS5
-rw-r--r--chromium/ui/display/types/chromeos/display_mode.cc28
-rw-r--r--chromium/ui/display/types/chromeos/display_mode.h39
-rw-r--r--chromium/ui/display/types/chromeos/display_snapshot.cc34
-rw-r--r--chromium/ui/display/types/chromeos/display_snapshot.h90
-rw-r--r--chromium/ui/display/types/chromeos/native_display_delegate.h95
-rw-r--r--chromium/ui/display/types/chromeos/native_display_observer.h23
-rw-r--r--chromium/ui/display/types/chromeos/touchscreen_device.cc19
-rw-r--r--chromium/ui/display/types/chromeos/touchscreen_device.h31
-rw-r--r--chromium/ui/display/types/chromeos/touchscreen_device_manager.h27
-rw-r--r--chromium/ui/display/types/display_constants.h52
-rw-r--r--chromium/ui/display/types/display_types_export.h37
-rw-r--r--chromium/ui/display/util/display_util.cc71
-rw-r--r--chromium/ui/display/util/display_util.h26
-rw-r--r--chromium/ui/display/util/display_util_export.h37
-rw-r--r--chromium/ui/display/util/display_util_unittest.cc53
-rw-r--r--chromium/ui/display/util/edid_parser.cc197
-rw-r--r--chromium/ui/display/util/edid_parser.h42
-rw-r--r--chromium/ui/display/util/edid_parser_unittest.cc229
-rw-r--r--chromium/ui/display/util/x11/DEPS3
-rw-r--r--chromium/ui/display/util/x11/edid_parser_x11.cc122
-rw-r--r--chromium/ui/display/util/x11/edid_parser_x11.h40
-rw-r--r--chromium/ui/events/BUILD.gn311
-rw-r--r--chromium/ui/events/PRESUBMIT.py26
-rw-r--r--chromium/ui/events/cocoa/cocoa_event_utils.h26
-rw-r--r--chromium/ui/events/cocoa/cocoa_event_utils.mm55
-rw-r--r--chromium/ui/events/cocoa/events_mac.mm261
-rw-r--r--chromium/ui/events/cocoa/events_mac_unittest.mm315
-rw-r--r--chromium/ui/events/event.cc264
-rw-r--r--chromium/ui/events/event.h144
-rw-r--r--chromium/ui/events/event_constants.h46
-rw-r--r--chromium/ui/events/event_dispatcher.cc28
-rw-r--r--chromium/ui/events/event_dispatcher.h4
-rw-r--r--chromium/ui/events/event_dispatcher_unittest.cc62
-rw-r--r--chromium/ui/events/event_processor.cc16
-rw-r--r--chromium/ui/events/event_processor.h4
-rw-r--r--chromium/ui/events/event_processor_unittest.cc219
-rw-r--r--chromium/ui/events/event_rewriter.h68
-rw-r--r--chromium/ui/events/event_rewriter_unittest.cc231
-rw-r--r--chromium/ui/events/event_source.cc65
-rw-r--r--chromium/ui/events/event_source.h24
-rw-r--r--chromium/ui/events/event_switches.cc17
-rw-r--r--chromium/ui/events/event_switches.h8
-rw-r--r--chromium/ui/events/event_target.h4
-rw-r--r--chromium/ui/events/event_targeter.cc24
-rw-r--r--chromium/ui/events/event_targeter.h37
-rw-r--r--chromium/ui/events/event_unittest.cc132
-rw-r--r--chromium/ui/events/event_utils.cc63
-rw-r--r--chromium/ui/events/event_utils.h44
-rw-r--r--chromium/ui/events/events.gyp221
-rw-r--r--chromium/ui/events/events_stub.cc29
-rw-r--r--chromium/ui/events/gesture_detection/OWNERS2
-rw-r--r--chromium/ui/events/gesture_detection/bitset_32.h128
-rw-r--r--chromium/ui/events/gesture_detection/bitset_32_unittest.cc100
-rw-r--r--chromium/ui/events/gesture_detection/filtered_gesture_provider.cc77
-rw-r--r--chromium/ui/events/gesture_detection/filtered_gesture_provider.h61
-rw-r--r--chromium/ui/events/gesture_detection/gesture_config_helper.cc17
-rw-r--r--chromium/ui/events/gesture_detection/gesture_config_helper.h20
-rw-r--r--chromium/ui/events/gesture_detection/gesture_config_helper_android.cc73
-rw-r--r--chromium/ui/events/gesture_detection/gesture_config_helper_aura.cc73
-rw-r--r--chromium/ui/events/gesture_detection/gesture_detection_export.h29
-rw-r--r--chromium/ui/events/gesture_detection/gesture_detector.cc553
-rw-r--r--chromium/ui/events/gesture_detection/gesture_detector.h214
-rw-r--r--chromium/ui/events/gesture_detection/gesture_event_data.cc50
-rw-r--r--chromium/ui/events/gesture_detection/gesture_event_data.h48
-rw-r--r--chromium/ui/events/gesture_detection/gesture_event_data_packet.cc96
-rw-r--r--chromium/ui/events/gesture_detection/gesture_event_data_packet.h68
-rw-r--r--chromium/ui/events/gesture_detection/gesture_provider.cc810
-rw-r--r--chromium/ui/events/gesture_detection/gesture_provider.h136
-rw-r--r--chromium/ui/events/gesture_detection/gesture_provider_unittest.cc2298
-rw-r--r--chromium/ui/events/gesture_detection/mock_motion_event.cc204
-rw-r--r--chromium/ui/events/gesture_detection/mock_motion_event.h86
-rw-r--r--chromium/ui/events/gesture_detection/motion_event.h73
-rw-r--r--chromium/ui/events/gesture_detection/scale_gesture_detector.cc383
-rw-r--r--chromium/ui/events/gesture_detection/scale_gesture_detector.h158
-rw-r--r--chromium/ui/events/gesture_detection/snap_scroll_controller.cc106
-rw-r--r--chromium/ui/events/gesture_detection/snap_scroll_controller.h60
-rw-r--r--chromium/ui/events/gesture_detection/touch_disposition_gesture_filter.cc400
-rw-r--r--chromium/ui/events/gesture_detection/touch_disposition_gesture_filter.h108
-rw-r--r--chromium/ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc1059
-rw-r--r--chromium/ui/events/gesture_detection/velocity_tracker.cc805
-rw-r--r--chromium/ui/events/gesture_detection/velocity_tracker.h150
-rw-r--r--chromium/ui/events/gesture_detection/velocity_tracker_state.cc105
-rw-r--r--chromium/ui/events/gesture_detection/velocity_tracker_state.h50
-rw-r--r--chromium/ui/events/gesture_detection/velocity_tracker_unittest.cc193
-rw-r--r--chromium/ui/events/gesture_event_details.cc71
-rw-r--r--chromium/ui/events/gesture_event_details.h171
-rw-r--r--chromium/ui/events/gestures/OWNERS1
-rw-r--r--chromium/ui/events/gestures/gesture_configuration.cc17
-rw-r--r--chromium/ui/events/gestures/gesture_configuration.h29
-rw-r--r--chromium/ui/events/gestures/gesture_point.cc85
-rw-r--r--chromium/ui/events/gestures/gesture_point.h47
-rw-r--r--chromium/ui/events/gestures/gesture_provider_aura.cc142
-rw-r--r--chromium/ui/events/gestures/gesture_provider_aura.h59
-rw-r--r--chromium/ui/events/gestures/gesture_recognizer.h24
-rw-r--r--chromium/ui/events/gestures/gesture_recognizer_impl.cc216
-rw-r--r--chromium/ui/events/gestures/gesture_recognizer_impl.h29
-rw-r--r--chromium/ui/events/gestures/gesture_recognizer_impl_mac.cc64
-rw-r--r--chromium/ui/events/gestures/gesture_sequence.cc268
-rw-r--r--chromium/ui/events/gestures/gesture_sequence.h35
-rw-r--r--chromium/ui/events/gestures/gesture_types.cc105
-rw-r--r--chromium/ui/events/gestures/gesture_types.h167
-rw-r--r--chromium/ui/events/gestures/gesture_util.cc23
-rw-r--r--chromium/ui/events/gestures/gesture_util.h26
-rw-r--r--chromium/ui/events/gestures/gestures.dot5
-rw-r--r--chromium/ui/events/gestures/motion_event_aura.cc255
-rw-r--r--chromium/ui/events/gestures/motion_event_aura.h106
-rw-r--r--chromium/ui/events/gestures/motion_event_aura_unittest.cc323
-rw-r--r--chromium/ui/events/gestures/unified_gesture_detector_enabled.cc37
-rw-r--r--chromium/ui/events/gestures/unified_gesture_detector_enabled.h17
-rw-r--r--chromium/ui/events/gestures/velocity_calculator.cc2
-rw-r--r--chromium/ui/events/gestures/velocity_calculator.h6
-rw-r--r--chromium/ui/events/gestures/velocity_calculator_unittest.cc2
-rw-r--r--chromium/ui/events/ipc/BUILD.gn17
-rw-r--r--chromium/ui/events/ipc/OWNERS13
-rw-r--r--chromium/ui/events/ipc/events_ipc.gyp29
-rw-r--r--chromium/ui/events/ipc/latency_info_param_traits.cc26
-rw-r--r--chromium/ui/events/ipc/latency_info_param_traits.h30
-rw-r--r--chromium/ui/events/keycodes/DEPS11
-rw-r--r--chromium/ui/events/keycodes/dom4/DEPS3
-rw-r--r--chromium/ui/events/keycodes/keyboard_code_conversion_gtk.cc85
-rw-r--r--chromium/ui/events/keycodes/keyboard_code_conversion_gtk.h58
-rw-r--r--chromium/ui/events/keycodes/keyboard_code_conversion_mac.h4
-rw-r--r--chromium/ui/events/keycodes/keyboard_code_conversion_mac.mm12
-rw-r--r--chromium/ui/events/keycodes/keyboard_code_conversion_x.cc899
-rw-r--r--chromium/ui/events/keycodes/keyboard_code_conversion_x.h5
-rw-r--r--chromium/ui/events/latency_info.cc51
-rw-r--r--chromium/ui/events/latency_info.h35
-rw-r--r--chromium/ui/events/latency_info_nacl.gyp78
-rw-r--r--chromium/ui/events/latency_info_unittest.cc80
-rw-r--r--chromium/ui/events/linux/text_edit_command_auralinux.cc124
-rw-r--r--chromium/ui/events/linux/text_edit_command_auralinux.h82
-rw-r--r--chromium/ui/events/linux/text_edit_key_bindings_delegate_auralinux.cc23
-rw-r--r--chromium/ui/events/linux/text_edit_key_bindings_delegate_auralinux.h43
-rw-r--r--chromium/ui/events/ozone/BUILD.gn101
-rw-r--r--chromium/ui/events/ozone/DEPS4
-rw-r--r--chromium/ui/events/ozone/OWNERS1
-rw-r--r--chromium/ui/events/ozone/device/device_event.cc16
-rw-r--r--chromium/ui/events/ozone/device/device_event.h43
-rw-r--r--chromium/ui/events/ozone/device/device_event_observer.h24
-rw-r--r--chromium/ui/events/ozone/device/device_manager.cc23
-rw-r--r--chromium/ui/events/ozone/device/device_manager.h36
-rw-r--r--chromium/ui/events/ozone/device/device_manager_manual.cc33
-rw-r--r--chromium/ui/events/ozone/device/device_manager_manual.h29
-rw-r--r--chromium/ui/events/ozone/device/udev/device_manager_udev.cc186
-rw-r--r--chromium/ui/events/ozone/device/udev/device_manager_udev.h51
-rw-r--r--chromium/ui/events/ozone/evdev/cursor_delegate_evdev.h31
-rw-r--r--chromium/ui/events/ozone/evdev/event_converter_evdev.cc23
-rw-r--r--chromium/ui/events/ozone/evdev/event_converter_evdev.h46
-rw-r--r--chromium/ui/events/ozone/evdev/event_device_info.cc63
-rw-r--r--chromium/ui/events/ozone/evdev/event_device_info.h19
-rw-r--r--chromium/ui/events/ozone/evdev/event_factory.cc83
-rw-r--r--chromium/ui/events/ozone/evdev/event_factory.h31
-rw-r--r--chromium/ui/events/ozone/evdev/event_factory_evdev.cc242
-rw-r--r--chromium/ui/events/ozone/evdev/event_factory_evdev.h82
-rw-r--r--chromium/ui/events/ozone/evdev/event_modifiers.cc74
-rw-r--r--chromium/ui/events/ozone/evdev/event_modifiers.h74
-rw-r--r--chromium/ui/events/ozone/evdev/event_modifiers_evdev.cc79
-rw-r--r--chromium/ui/events/ozone/evdev/event_modifiers_evdev.h77
-rw-r--r--chromium/ui/events/ozone/evdev/events_ozone_evdev_export.h29
-rw-r--r--chromium/ui/events/ozone/evdev/key_event_converter.cc248
-rw-r--r--chromium/ui/events/ozone/evdev/key_event_converter.h46
-rw-r--r--chromium/ui/events/ozone/evdev/key_event_converter_evdev.cc271
-rw-r--r--chromium/ui/events/ozone/evdev/key_event_converter_evdev.h60
-rw-r--r--chromium/ui/events/ozone/evdev/key_event_converter_evdev_unittest.cc347
-rw-r--r--chromium/ui/events/ozone/evdev/key_event_converter_unittest.cc325
-rw-r--r--chromium/ui/events/ozone/evdev/libgestures_glue/event_reader_libevdev_cros.cc107
-rw-r--r--chromium/ui/events/ozone/evdev/libgestures_glue/event_reader_libevdev_cros.h78
-rw-r--r--chromium/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc274
-rw-r--r--chromium/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h82
-rw-r--r--chromium/ui/events/ozone/evdev/libgestures_glue/gesture_logging.cc32
-rw-r--r--chromium/ui/events/ozone/evdev/libgestures_glue/gesture_logging.h15
-rw-r--r--chromium/ui/events/ozone/evdev/libgestures_glue/gesture_timer_provider.cc72
-rw-r--r--chromium/ui/events/ozone/evdev/libgestures_glue/gesture_timer_provider.h16
-rw-r--r--chromium/ui/events/ozone/evdev/touch_event_converter.cc197
-rw-r--r--chromium/ui/events/ozone/evdev/touch_event_converter.h82
-rw-r--r--chromium/ui/events/ozone/evdev/touch_event_converter_evdev.cc307
-rw-r--r--chromium/ui/events/ozone/evdev/touch_event_converter_evdev.h118
-rw-r--r--chromium/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc481
-rw-r--r--chromium/ui/events/ozone/evdev/touch_event_converter_unittest.cc398
-rw-r--r--chromium/ui/events/ozone/event_converter_ozone.cc33
-rw-r--r--chromium/ui/events/ozone/event_converter_ozone.h40
-rw-r--r--chromium/ui/events/ozone/event_factory_ozone.cc61
-rw-r--r--chromium/ui/events/ozone/event_factory_ozone.h62
-rw-r--r--chromium/ui/events/ozone/events_ozone.cc24
-rw-r--r--chromium/ui/events/ozone/events_ozone.gyp97
-rw-r--r--chromium/ui/events/ozone/events_ozone_export.h29
-rw-r--r--chromium/ui/events/platform/BUILD.gn32
-rw-r--r--chromium/ui/events/platform/events_platform.gyp36
-rw-r--r--chromium/ui/events/platform/platform_event_dispatcher.h43
-rw-r--r--chromium/ui/events/platform/platform_event_observer.h29
-rw-r--r--chromium/ui/events/platform/platform_event_source.cc111
-rw-r--r--chromium/ui/events/platform/platform_event_source.h102
-rw-r--r--chromium/ui/events/platform/platform_event_source_stub.cc13
-rw-r--r--chromium/ui/events/platform/platform_event_source_unittest.cc787
-rw-r--r--chromium/ui/events/platform/platform_event_types.h14
-rw-r--r--chromium/ui/events/platform/scoped_event_dispatcher.cc21
-rw-r--r--chromium/ui/events/platform/scoped_event_dispatcher.h40
-rw-r--r--chromium/ui/events/platform/x11/BUILD.gn42
-rw-r--r--chromium/ui/events/platform/x11/x11_event_source.cc149
-rw-r--r--chromium/ui/events/platform/x11/x11_event_source.h64
-rw-r--r--chromium/ui/events/platform/x11/x11_event_source_glib.cc101
-rw-r--r--chromium/ui/events/platform/x11/x11_event_source_libevent.cc68
-rw-r--r--chromium/ui/events/platform/x11/x11_events_platform.gyp43
-rw-r--r--chromium/ui/events/win/events_win.cc29
-rw-r--r--chromium/ui/events/x/device_data_manager.cc89
-rw-r--r--chromium/ui/events/x/device_data_manager.h29
-rw-r--r--chromium/ui/events/x/events_x.cc136
-rw-r--r--chromium/ui/events/x/events_x_unittest.cc237
-rw-r--r--chromium/ui/events/x/touch_factory_x11.cc58
-rw-r--r--chromium/ui/events/x/touch_factory_x11.h12
-rw-r--r--chromium/ui/file_manager/file_manager.gyp52
-rw-r--r--chromium/ui/gfx/BUILD.gn445
-rw-r--r--chromium/ui/gfx/DEPS4
-rw-r--r--chromium/ui/gfx/OWNERS9
-rw-r--r--chromium/ui/gfx/android/OWNERS4
-rw-r--r--chromium/ui/gfx/android/bitmap_config_list.h15
-rw-r--r--chromium/ui/gfx/android/device_display_info.cc12
-rw-r--r--chromium/ui/gfx/android/device_display_info.h17
-rw-r--r--chromium/ui/gfx/android/java_bitmap.cc99
-rw-r--r--chromium/ui/gfx/android/java_bitmap.h40
-rw-r--r--chromium/ui/gfx/android/scroller.cc439
-rw-r--r--chromium/ui/gfx/android/scroller.h148
-rw-r--r--chromium/ui/gfx/android/scroller_unittest.cc167
-rw-r--r--chromium/ui/gfx/android/shared_device_display_info.cc57
-rw-r--r--chromium/ui/gfx/android/shared_device_display_info.h17
-rw-r--r--chromium/ui/gfx/android/view_configuration.cc196
-rw-r--r--chromium/ui/gfx/android/view_configuration.h8
-rw-r--r--chromium/ui/gfx/animation/animation.cc3
-rw-r--r--chromium/ui/gfx/animation/animation_delegate.h5
-rw-r--r--chromium/ui/gfx/animation/tween.cc10
-rw-r--r--chromium/ui/gfx/animation/tween.h25
-rw-r--r--chromium/ui/gfx/animation/tween_unittest.cc9
-rw-r--r--chromium/ui/gfx/blit.cc21
-rw-r--r--chromium/ui/gfx/box_f.cc70
-rw-r--r--chromium/ui/gfx/box_f.h157
-rw-r--r--chromium/ui/gfx/box_unittest.cc176
-rw-r--r--chromium/ui/gfx/canvas.cc301
-rw-r--r--chromium/ui/gfx/canvas.h145
-rw-r--r--chromium/ui/gfx/canvas_paint_gtk.cc107
-rw-r--r--chromium/ui/gfx/canvas_paint_gtk.h102
-rw-r--r--chromium/ui/gfx/canvas_skia.cc99
-rw-r--r--chromium/ui/gfx/canvas_skia_paint.h4
-rw-r--r--chromium/ui/gfx/canvas_unittest.cc16
-rw-r--r--chromium/ui/gfx/codec/png_codec.cc100
-rw-r--r--chromium/ui/gfx/codec/png_codec.h21
-rw-r--r--chromium/ui/gfx/codec/png_codec_unittest.cc51
-rw-r--r--chromium/ui/gfx/color_analysis.cc74
-rw-r--r--chromium/ui/gfx/color_analysis.h48
-rw-r--r--chromium/ui/gfx/color_analysis_unittest.cc140
-rw-r--r--chromium/ui/gfx/color_profile.cc7
-rw-r--r--chromium/ui/gfx/color_profile.h15
-rw-r--r--chromium/ui/gfx/color_profile_mac.cc27
-rw-r--r--chromium/ui/gfx/color_profile_mac.mm32
-rw-r--r--chromium/ui/gfx/color_profile_win.cc98
-rw-r--r--chromium/ui/gfx/color_profile_win_unittest.cc32
-rw-r--r--chromium/ui/gfx/color_utils.cc32
-rw-r--r--chromium/ui/gfx/color_utils.h14
-rw-r--r--chromium/ui/gfx/color_utils_unittest.cc75
-rw-r--r--chromium/ui/gfx/display.cc45
-rw-r--r--chromium/ui/gfx/display.h2
-rw-r--r--chromium/ui/gfx/display_observer.h16
-rw-r--r--chromium/ui/gfx/font.cc16
-rw-r--r--chromium/ui/gfx/font.h20
-rw-r--r--chromium/ui/gfx/font_fallback_win.cc13
-rw-r--r--chromium/ui/gfx/font_list.cc267
-rw-r--r--chromium/ui/gfx/font_list.h97
-rw-r--r--chromium/ui/gfx/font_list_impl.cc248
-rw-r--r--chromium/ui/gfx/font_list_impl.h123
-rw-r--r--chromium/ui/gfx/font_list_unittest.cc112
-rw-r--r--chromium/ui/gfx/font_render_params_linux.cc81
-rw-r--r--chromium/ui/gfx/font_smoothing_win.cc2
-rw-r--r--chromium/ui/gfx/font_unittest.cc46
-rw-r--r--chromium/ui/gfx/gdi_util.cc4
-rw-r--r--chromium/ui/gfx/gdk_compat.h27
-rw-r--r--chromium/ui/gfx/geometry/BUILD.gn62
-rw-r--r--chromium/ui/gfx/geometry/box_f.cc70
-rw-r--r--chromium/ui/gfx/geometry/box_f.h160
-rw-r--r--chromium/ui/gfx/geometry/box_unittest.cc176
-rw-r--r--chromium/ui/gfx/geometry/cubic_bezier.cc128
-rw-r--r--chromium/ui/gfx/geometry/cubic_bezier.h36
-rw-r--r--chromium/ui/gfx/geometry/cubic_bezier_unittest.cc140
-rw-r--r--chromium/ui/gfx/geometry/insets.cc25
-rw-r--r--chromium/ui/gfx/geometry/insets.h50
-rw-r--r--chromium/ui/gfx/geometry/insets_base.h80
-rw-r--r--chromium/ui/gfx/geometry/insets_f.cc25
-rw-r--r--chromium/ui/gfx/geometry/insets_f.h33
-rw-r--r--chromium/ui/gfx/geometry/insets_unittest.cc66
-rw-r--r--chromium/ui/gfx/geometry/matrix3_f.cc237
-rw-r--r--chromium/ui/gfx/geometry/matrix3_f.h108
-rw-r--r--chromium/ui/gfx/geometry/matrix3_unittest.cc148
-rw-r--r--chromium/ui/gfx/geometry/point.cc54
-rw-r--r--chromium/ui/gfx/geometry/point.h90
-rw-r--r--chromium/ui/gfx/geometry/point3_f.cc40
-rw-r--r--chromium/ui/gfx/geometry/point3_f.h120
-rw-r--r--chromium/ui/gfx/geometry/point3_unittest.cc69
-rw-r--r--chromium/ui/gfx/geometry/point_base.h87
-rw-r--r--chromium/ui/gfx/geometry/point_conversions.cc30
-rw-r--r--chromium/ui/gfx/geometry/point_conversions.h24
-rw-r--r--chromium/ui/gfx/geometry/point_f.cc24
-rw-r--r--chromium/ui/gfx/geometry/point_f.h75
-rw-r--r--chromium/ui/gfx/geometry/point_unittest.cc173
-rw-r--r--chromium/ui/gfx/geometry/quad_f.cc123
-rw-r--r--chromium/ui/gfx/geometry/quad_f.h109
-rw-r--r--chromium/ui/gfx/geometry/quad_unittest.cc359
-rw-r--r--chromium/ui/gfx/geometry/r_tree.h182
-rw-r--r--chromium/ui/gfx/geometry/r_tree_base.cc658
-rw-r--r--chromium/ui/gfx/geometry/r_tree_base.h309
-rw-r--r--chromium/ui/gfx/geometry/r_tree_unittest.cc1025
-rw-r--r--chromium/ui/gfx/geometry/rect.cc97
-rw-r--r--chromium/ui/gfx/geometry/rect.h139
-rw-r--r--chromium/ui/gfx/geometry/rect_base.h174
-rw-r--r--chromium/ui/gfx/geometry/rect_base_impl.h354
-rw-r--r--chromium/ui/gfx/geometry/rect_conversions.cc82
-rw-r--r--chromium/ui/gfx/geometry/rect_conversions.h36
-rw-r--r--chromium/ui/gfx/geometry/rect_f.cc60
-rw-r--r--chromium/ui/gfx/geometry/rect_f.h113
-rw-r--r--chromium/ui/gfx/geometry/rect_unittest.cc925
-rw-r--r--chromium/ui/gfx/geometry/safe_integer_conversions.h54
-rw-r--r--chromium/ui/gfx/geometry/safe_integer_conversions_unittest.cc109
-rw-r--r--chromium/ui/gfx/geometry/size.cc46
-rw-r--r--chromium/ui/gfx/geometry/size.h67
-rw-r--r--chromium/ui/gfx/geometry/size_base.h69
-rw-r--r--chromium/ui/gfx/geometry/size_conversions.cc30
-rw-r--r--chromium/ui/gfx/geometry/size_conversions.h24
-rw-r--r--chromium/ui/gfx/geometry/size_f.cc23
-rw-r--r--chromium/ui/gfx/geometry/size_f.h54
-rw-r--r--chromium/ui/gfx/geometry/size_unittest.cc127
-rw-r--r--chromium/ui/gfx/geometry/vector2d.cc39
-rw-r--r--chromium/ui/gfx/geometry/vector2d.h91
-rw-r--r--chromium/ui/gfx/geometry/vector2d_conversions.cc30
-rw-r--r--chromium/ui/gfx/geometry/vector2d_conversions.h24
-rw-r--r--chromium/ui/gfx/geometry/vector2d_f.cc60
-rw-r--r--chromium/ui/gfx/geometry/vector2d_f.h112
-rw-r--r--chromium/ui/gfx/geometry/vector2d_unittest.cc250
-rw-r--r--chromium/ui/gfx/geometry/vector3d_f.cc88
-rw-r--r--chromium/ui/gfx/geometry/vector3d_f.h124
-rw-r--r--chromium/ui/gfx/geometry/vector3d_unittest.cc264
-rw-r--r--chromium/ui/gfx/gfx.gyp259
-rw-r--r--chromium/ui/gfx/gfx_tests.gyp146
-rw-r--r--chromium/ui/gfx/gpu_memory_buffer.cc14
-rw-r--r--chromium/ui/gfx/gpu_memory_buffer.h76
-rw-r--r--chromium/ui/gfx/gtk_compat.h97
-rw-r--r--chromium/ui/gfx/gtk_native_view_id_manager.cc254
-rw-r--r--chromium/ui/gfx/gtk_native_view_id_manager.h138
-rw-r--r--chromium/ui/gfx/gtk_preserve_window.cc264
-rw-r--r--chromium/ui/gfx/gtk_preserve_window.h74
-rw-r--r--chromium/ui/gfx/gtk_util.cc190
-rw-r--r--chromium/ui/gfx/gtk_util.h52
-rw-r--r--chromium/ui/gfx/icon_util.cc31
-rw-r--r--chromium/ui/gfx/icon_util_unittest.cc34
-rw-r--r--chromium/ui/gfx/icon_util_unittests.ico (renamed from chromium/chrome/app/theme/chromium/chromium.ico)bin53740 -> 53740 bytes
-rw-r--r--chromium/ui/gfx/icon_util_unittests.rc36
-rw-r--r--chromium/ui/gfx/icon_util_unittests_resource.h5
-rw-r--r--chromium/ui/gfx/image/OWNERS2
-rw-r--r--chromium/ui/gfx/image/cairo_cached_surface.cc109
-rw-r--r--chromium/ui/gfx/image/cairo_cached_surface.h84
-rw-r--r--chromium/ui/gfx/image/image.cc393
-rw-r--r--chromium/ui/gfx/image/image.h24
-rw-r--r--chromium/ui/gfx/image/image_skia.cc94
-rw-r--r--chromium/ui/gfx/image/image_skia.h4
-rw-r--r--chromium/ui/gfx/image/image_skia_rep.cc19
-rw-r--r--chromium/ui/gfx/image/image_skia_rep.h16
-rw-r--r--chromium/ui/gfx/image/image_skia_unittest.cc185
-rw-r--r--chromium/ui/gfx/image/image_skia_util_mac.h4
-rw-r--r--chromium/ui/gfx/image/image_skia_util_mac.mm6
-rw-r--r--chromium/ui/gfx/image/image_unittest.cc53
-rw-r--r--chromium/ui/gfx/image/image_unittest_util.cc31
-rw-r--r--chromium/ui/gfx/image/image_unittest_util.h2
-rw-r--r--chromium/ui/gfx/image/image_util.cc57
-rw-r--r--chromium/ui/gfx/image/image_util.h17
-rw-r--r--chromium/ui/gfx/image/image_util_unittest.cc78
-rw-r--r--chromium/ui/gfx/insets.cc38
-rw-r--r--chromium/ui/gfx/insets.h51
-rw-r--r--chromium/ui/gfx/insets_base.h80
-rw-r--r--chromium/ui/gfx/insets_f.cc25
-rw-r--r--chromium/ui/gfx/insets_f.h32
-rw-r--r--chromium/ui/gfx/insets_unittest.cc66
-rw-r--r--chromium/ui/gfx/linux_font_delegate.cc23
-rw-r--r--chromium/ui/gfx/linux_font_delegate.h49
-rw-r--r--chromium/ui/gfx/matrix3_f.cc237
-rw-r--r--chromium/ui/gfx/matrix3_f.h107
-rw-r--r--chromium/ui/gfx/matrix3_unittest.cc148
-rw-r--r--chromium/ui/gfx/native_widget_types.h80
-rw-r--r--chromium/ui/gfx/nine_image_painter.cc157
-rw-r--r--chromium/ui/gfx/nine_image_painter.h42
-rw-r--r--chromium/ui/gfx/overlay_transform.h24
-rw-r--r--chromium/ui/gfx/ozone/OWNERS1
-rw-r--r--chromium/ui/gfx/ozone/dri/dri_skbitmap.cc208
-rw-r--r--chromium/ui/gfx/ozone/dri/dri_skbitmap.h57
-rw-r--r--chromium/ui/gfx/ozone/dri/dri_surface.cc113
-rw-r--r--chromium/ui/gfx/ozone/dri/dri_surface.h168
-rw-r--r--chromium/ui/gfx/ozone/dri/dri_surface_factory.cc317
-rw-r--r--chromium/ui/gfx/ozone/dri/dri_surface_factory.h75
-rw-r--r--chromium/ui/gfx/ozone/dri/dri_surface_factory_unittest.cc292
-rw-r--r--chromium/ui/gfx/ozone/dri/dri_surface_unittest.cc212
-rw-r--r--chromium/ui/gfx/ozone/dri/dri_vsync_provider.cc32
-rw-r--r--chromium/ui/gfx/ozone/dri/dri_vsync_provider.h29
-rw-r--r--chromium/ui/gfx/ozone/dri/dri_wrapper.cc93
-rw-r--r--chromium/ui/gfx/ozone/dri/dri_wrapper.h86
-rw-r--r--chromium/ui/gfx/ozone/dri/hardware_display_controller.cc129
-rw-r--r--chromium/ui/gfx/ozone/dri/hardware_display_controller.h190
-rw-r--r--chromium/ui/gfx/ozone/dri/hardware_display_controller_unittest.cc301
-rw-r--r--chromium/ui/gfx/ozone/impl/file_surface_factory.cc96
-rw-r--r--chromium/ui/gfx/ozone/impl/file_surface_factory.h49
-rw-r--r--chromium/ui/gfx/ozone/surface_factory_ozone.cc92
-rw-r--r--chromium/ui/gfx/ozone/surface_factory_ozone.h147
-rw-r--r--chromium/ui/gfx/pango_util.cc14
-rw-r--r--chromium/ui/gfx/path.h2
-rw-r--r--chromium/ui/gfx/path_gtk.cc55
-rw-r--r--chromium/ui/gfx/path_win.cc4
-rw-r--r--chromium/ui/gfx/path_x11.cc6
-rw-r--r--chromium/ui/gfx/path_x11.h5
-rw-r--r--chromium/ui/gfx/platform_font.h7
-rw-r--r--chromium/ui/gfx/platform_font_ios.h2
-rw-r--r--chromium/ui/gfx/platform_font_ios.mm9
-rw-r--r--chromium/ui/gfx/platform_font_mac.h2
-rw-r--r--chromium/ui/gfx/platform_font_mac.mm9
-rw-r--r--chromium/ui/gfx/platform_font_mac_unittest.mm8
-rw-r--r--chromium/ui/gfx/platform_font_pango.cc56
-rw-r--r--chromium/ui/gfx/platform_font_pango.h3
-rw-r--r--chromium/ui/gfx/platform_font_win.cc17
-rw-r--r--chromium/ui/gfx/platform_font_win.h2
-rw-r--r--chromium/ui/gfx/platform_font_win_unittest.cc8
-rw-r--r--chromium/ui/gfx/point.cc54
-rw-r--r--chromium/ui/gfx/point.h89
-rw-r--r--chromium/ui/gfx/point3_f.cc40
-rw-r--r--chromium/ui/gfx/point3_f.h119
-rw-r--r--chromium/ui/gfx/point3_unittest.cc70
-rw-r--r--chromium/ui/gfx/point_base.h87
-rw-r--r--chromium/ui/gfx/point_conversions.cc30
-rw-r--r--chromium/ui/gfx/point_conversions.h23
-rw-r--r--chromium/ui/gfx/point_f.cc24
-rw-r--r--chromium/ui/gfx/point_f.h74
-rw-r--r--chromium/ui/gfx/point_unittest.cc174
-rw-r--r--chromium/ui/gfx/quad_f.cc127
-rw-r--r--chromium/ui/gfx/quad_f.h108
-rw-r--r--chromium/ui/gfx/quad_unittest.cc360
-rw-r--r--chromium/ui/gfx/rect.cc110
-rw-r--r--chromium/ui/gfx/rect.h144
-rw-r--r--chromium/ui/gfx/rect_base.h174
-rw-r--r--chromium/ui/gfx/rect_base_impl.h355
-rw-r--r--chromium/ui/gfx/rect_conversions.cc82
-rw-r--r--chromium/ui/gfx/rect_conversions.h35
-rw-r--r--chromium/ui/gfx/rect_f.cc60
-rw-r--r--chromium/ui/gfx/rect_f.h112
-rw-r--r--chromium/ui/gfx/rect_unittest.cc936
-rw-r--r--chromium/ui/gfx/render_text.cc395
-rw-r--r--chromium/ui/gfx/render_text.h132
-rw-r--r--chromium/ui/gfx/render_text_harfbuzz.cc1010
-rw-r--r--chromium/ui/gfx/render_text_harfbuzz.h130
-rw-r--r--chromium/ui/gfx/render_text_mac.cc22
-rw-r--r--chromium/ui/gfx/render_text_mac.h2
-rw-r--r--chromium/ui/gfx/render_text_ozone.cc2
-rw-r--r--chromium/ui/gfx/render_text_pango.cc56
-rw-r--r--chromium/ui/gfx/render_text_pango.h2
-rw-r--r--chromium/ui/gfx/render_text_unittest.cc336
-rw-r--r--chromium/ui/gfx/render_text_win.cc95
-rw-r--r--chromium/ui/gfx/render_text_win.h2
-rw-r--r--chromium/ui/gfx/safe_integer_conversions.h53
-rw-r--r--chromium/ui/gfx/safe_integer_conversions_unittest.cc109
-rw-r--r--chromium/ui/gfx/scoped_gobject.h34
-rw-r--r--chromium/ui/gfx/screen_android.cc1
-rw-r--r--chromium/ui/gfx/screen_gtk.cc210
-rw-r--r--chromium/ui/gfx/screen_ios.mm3
-rw-r--r--chromium/ui/gfx/screen_mac.mm7
-rw-r--r--chromium/ui/gfx/screen_win.cc33
-rw-r--r--chromium/ui/gfx/selection_model.h11
-rw-r--r--chromium/ui/gfx/size.cc46
-rw-r--r--chromium/ui/gfx/size.h66
-rw-r--r--chromium/ui/gfx/size_base.h69
-rw-r--r--chromium/ui/gfx/size_conversions.cc30
-rw-r--r--chromium/ui/gfx/size_conversions.h23
-rw-r--r--chromium/ui/gfx/size_f.cc23
-rw-r--r--chromium/ui/gfx/size_f.h53
-rw-r--r--chromium/ui/gfx/size_unittest.cc128
-rw-r--r--chromium/ui/gfx/skbitmap_operations.cc78
-rw-r--r--chromium/ui/gfx/skia_util.cc43
-rw-r--r--chromium/ui/gfx/skia_util.h7
-rw-r--r--chromium/ui/gfx/skia_utils_gtk.cc32
-rw-r--r--chromium/ui/gfx/skia_utils_gtk.h23
-rw-r--r--chromium/ui/gfx/skrect_conversion_unittest.cc26
-rw-r--r--chromium/ui/gfx/switches.cc13
-rw-r--r--chromium/ui/gfx/switches.h4
-rw-r--r--chromium/ui/gfx/sys_color_change_listener.cc3
-rw-r--r--chromium/ui/gfx/text_constants.h41
-rw-r--r--chromium/ui/gfx/text_elider.cc526
-rw-r--r--chromium/ui/gfx/text_elider.h128
-rw-r--r--chromium/ui/gfx/text_elider_unittest.cc481
-rw-r--r--chromium/ui/gfx/text_utils_unittest.cc31
-rw-r--r--chromium/ui/gfx/transform.h8
-rw-r--r--chromium/ui/gfx/utf16_indexing_unittest.cc5
-rw-r--r--chromium/ui/gfx/vector2d.cc39
-rw-r--r--chromium/ui/gfx/vector2d.h90
-rw-r--r--chromium/ui/gfx/vector2d_conversions.cc30
-rw-r--r--chromium/ui/gfx/vector2d_conversions.h23
-rw-r--r--chromium/ui/gfx/vector2d_f.cc60
-rw-r--r--chromium/ui/gfx/vector2d_f.h111
-rw-r--r--chromium/ui/gfx/vector2d_unittest.cc250
-rw-r--r--chromium/ui/gfx/vector3d_f.cc88
-rw-r--r--chromium/ui/gfx/vector3d_f.h123
-rw-r--r--chromium/ui/gfx/vector3d_unittest.cc264
-rw-r--r--chromium/ui/gfx/win/dpi.cc159
-rw-r--r--chromium/ui/gfx/win/dpi.h27
-rw-r--r--chromium/ui/gfx/win/hwnd_util.cc19
-rw-r--r--chromium/ui/gfx/win/hwnd_util.h4
-rw-r--r--chromium/ui/gfx/win/msg_util.h2283
-rw-r--r--chromium/ui/gfx/win/singleton_hwnd.cc3
-rw-r--r--chromium/ui/gfx/win/window_impl.cc10
-rw-r--r--chromium/ui/gfx/win/window_impl.h6
-rw-r--r--chromium/ui/gfx/x/BUILD.gn32
-rw-r--r--chromium/ui/gfx/x/gfx_x11.gyp38
-rw-r--r--chromium/ui/gfx/x/x11_atom_cache.cc11
-rw-r--r--chromium/ui/gfx/x/x11_atom_cache.h18
-rw-r--r--chromium/ui/gfx/x/x11_connection.cc17
-rw-r--r--chromium/ui/gfx/x/x11_connection.h18
-rw-r--r--chromium/ui/gfx/x/x11_error_tracker.cc45
-rw-r--r--chromium/ui/gfx/x/x11_error_tracker.h36
-rw-r--r--chromium/ui/gfx/x/x11_switches.cc15
-rw-r--r--chromium/ui/gfx/x/x11_switches.h18
-rw-r--r--chromium/ui/gfx/x/x11_types.cc17
-rw-r--r--chromium/ui/gfx/x/x11_types.h3
-rw-r--r--chromium/ui/gl/BUILD.gn341
-rw-r--r--chromium/ui/gl/DEPS1
-rw-r--r--chromium/ui/gl/OWNERS1
-rw-r--r--chromium/ui/gl/PRESUBMIT.py18
-rw-r--r--chromium/ui/gl/android/OWNERS1
-rw-r--r--chromium/ui/gl/android/surface_texture.cc32
-rw-r--r--chromium/ui/gl/android/surface_texture.h19
-rw-r--r--chromium/ui/gl/android/surface_texture_listener.cc2
-rw-r--r--chromium/ui/gl/android/surface_texture_tracker.cc26
-rw-r--r--chromium/ui/gl/android/surface_texture_tracker.h32
-rwxr-xr-xchromium/ui/gl/generate_bindings.py721
-rw-r--r--chromium/ui/gl/gl.gyp78
-rw-r--r--chromium/ui/gl/gl_bindings.h56
-rw-r--r--chromium/ui/gl/gl_bindings_skia_in_process.cc279
-rw-r--r--chromium/ui/gl/gl_context.cc76
-rw-r--r--chromium/ui/gl/gl_context.h58
-rw-r--r--chromium/ui/gl/gl_context_android.cc49
-rw-r--r--chromium/ui/gl/gl_context_cgl.cc7
-rw-r--r--chromium/ui/gl/gl_context_egl.cc5
-rw-r--r--chromium/ui/gl/gl_context_glx.cc20
-rw-r--r--chromium/ui/gl/gl_context_mac.mm10
-rw-r--r--chromium/ui/gl/gl_context_nsview.h48
-rw-r--r--chromium/ui/gl/gl_context_nsview.mm100
-rw-r--r--chromium/ui/gl/gl_context_osmesa.cc6
-rw-r--r--chromium/ui/gl/gl_context_stub.cc5
-rw-r--r--chromium/ui/gl/gl_context_stub.h1
-rw-r--r--chromium/ui/gl/gl_context_stub_with_extensions.cc30
-rw-r--r--chromium/ui/gl/gl_context_stub_with_extensions.h37
-rw-r--r--chromium/ui/gl/gl_context_wgl.cc5
-rw-r--r--chromium/ui/gl/gl_egl_api_implementation.cc8
-rw-r--r--chromium/ui/gl/gl_egl_api_implementation.h10
-rw-r--r--chromium/ui/gl/gl_fence.cc105
-rw-r--r--chromium/ui/gl/gl_fence.h11
-rw-r--r--chromium/ui/gl/gl_gl_api_implementation.cc199
-rw-r--r--chromium/ui/gl/gl_gl_api_implementation.h45
-rw-r--r--chromium/ui/gl/gl_glx_api_implementation.cc9
-rw-r--r--chromium/ui/gl/gl_glx_api_implementation.h10
-rw-r--r--chromium/ui/gl/gl_image.cc17
-rw-r--r--chromium/ui/gl/gl_image.h14
-rw-r--r--chromium/ui/gl/gl_image_android.cc16
-rw-r--r--chromium/ui/gl/gl_image_android_native_buffer.cc118
-rw-r--r--chromium/ui/gl/gl_image_android_native_buffer.h40
-rw-r--r--chromium/ui/gl/gl_image_egl.cc115
-rw-r--r--chromium/ui/gl/gl_image_egl.h20
-rw-r--r--chromium/ui/gl/gl_image_glx.cc78
-rw-r--r--chromium/ui/gl/gl_image_glx.h8
-rw-r--r--chromium/ui/gl/gl_image_io_surface.cc54
-rw-r--r--chromium/ui/gl/gl_image_io_surface.h19
-rw-r--r--chromium/ui/gl/gl_image_shm.cc104
-rw-r--r--chromium/ui/gl/gl_image_shm.h14
-rw-r--r--chromium/ui/gl/gl_image_stub.cc27
-rw-r--r--chromium/ui/gl/gl_image_stub.h12
-rw-r--r--chromium/ui/gl/gl_image_surface_texture.cc75
-rw-r--r--chromium/ui/gl/gl_image_surface_texture.h45
-rw-r--r--chromium/ui/gl/gl_implementation.cc47
-rw-r--r--chromium/ui/gl/gl_implementation.h49
-rw-r--r--chromium/ui/gl/gl_implementation_android.cc64
-rw-r--r--chromium/ui/gl/gl_implementation_linux.cc63
-rw-r--r--chromium/ui/gl/gl_implementation_linux.h14
-rw-r--r--chromium/ui/gl/gl_implementation_mac.cc31
-rw-r--r--chromium/ui/gl/gl_implementation_osmesa.cc64
-rw-r--r--chromium/ui/gl/gl_implementation_osmesa.h19
-rw-r--r--chromium/ui/gl/gl_implementation_ozone.cc43
-rw-r--r--chromium/ui/gl/gl_implementation_win.cc86
-rw-r--r--chromium/ui/gl/gl_implementation_x11.cc68
-rw-r--r--chromium/ui/gl/gl_interface.cc20
-rw-r--r--chromium/ui/gl/gl_interface.h35
-rw-r--r--chromium/ui/gl/gl_mock.cc6
-rw-r--r--chromium/ui/gl/gl_mock.h26
-rw-r--r--chromium/ui/gl/gl_osmesa_api_implementation.cc8
-rw-r--r--chromium/ui/gl/gl_osmesa_api_implementation.h10
-rw-r--r--chromium/ui/gl/gl_state_restorer.h3
-rw-r--r--chromium/ui/gl/gl_surface.cc122
-rw-r--r--chromium/ui/gl/gl_surface.h21
-rw-r--r--chromium/ui/gl/gl_surface_android.cc90
-rw-r--r--chromium/ui/gl/gl_surface_cgl.cc106
-rw-r--r--chromium/ui/gl/gl_surface_cgl.h56
-rw-r--r--chromium/ui/gl/gl_surface_egl.cc234
-rw-r--r--chromium/ui/gl/gl_surface_egl.h14
-rw-r--r--chromium/ui/gl/gl_surface_glx.cc276
-rw-r--r--chromium/ui/gl/gl_surface_glx.h40
-rw-r--r--chromium/ui/gl/gl_surface_mac.cc91
-rw-r--r--chromium/ui/gl/gl_surface_nsview.h47
-rw-r--r--chromium/ui/gl/gl_surface_nsview.mm47
-rw-r--r--chromium/ui/gl/gl_surface_osmesa.cc14
-rw-r--r--chromium/ui/gl/gl_surface_osmesa.h17
-rw-r--r--chromium/ui/gl/gl_surface_ozone.cc143
-rw-r--r--chromium/ui/gl/gl_surface_wgl.cc28
-rw-r--r--chromium/ui/gl/gl_surface_win.cc33
-rw-r--r--chromium/ui/gl/gl_surface_x11.cc102
-rw-r--r--chromium/ui/gl/gl_switches.cc28
-rw-r--r--chromium/ui/gl/gl_switches.h14
-rw-r--r--chromium/ui/gl/gl_version_info.cc42
-rw-r--r--chromium/ui/gl/gl_version_info.h36
-rw-r--r--chromium/ui/gl/gl_wgl_api_implementation.cc8
-rw-r--r--chromium/ui/gl/gl_wgl_api_implementation.h10
-rw-r--r--chromium/ui/gl/gpu_preference.h3
-rw-r--r--chromium/ui/gl/io_surface_support_mac.cc379
-rw-r--r--chromium/ui/gl/io_surface_support_mac.h83
-rw-r--r--chromium/ui/gl/scoped_binders.cc2
-rw-r--r--chromium/ui/gl/scoped_cgl.cc27
-rw-r--r--chromium/ui/gl/scoped_cgl.h56
-rw-r--r--chromium/ui/gl/sync_control_vsync_provider.cc37
-rw-r--r--chromium/ui/gl/sync_control_vsync_provider.h1
-rw-r--r--chromium/ui/keyboard/DEPS3
-rw-r--r--chromium/ui/keyboard/keyboard.cc63
-rw-r--r--chromium/ui/keyboard/keyboard.gyp20
-rw-r--r--chromium/ui/keyboard/keyboard.h10
-rw-r--r--chromium/ui/keyboard/keyboard_constants.cc4
-rw-r--r--chromium/ui/keyboard/keyboard_constants.h8
-rw-r--r--chromium/ui/keyboard/keyboard_controller.cc411
-rw-r--r--chromium/ui/keyboard/keyboard_controller.h61
-rw-r--r--chromium/ui/keyboard/keyboard_controller_proxy.cc146
-rw-r--r--chromium/ui/keyboard/keyboard_controller_proxy.h78
-rw-r--r--chromium/ui/keyboard/keyboard_controller_unittest.cc427
-rw-r--r--chromium/ui/keyboard/keyboard_layout_manager.cc63
-rw-r--r--chromium/ui/keyboard/keyboard_layout_manager.h43
-rw-r--r--chromium/ui/keyboard/keyboard_resources.grd43
-rw-r--r--chromium/ui/keyboard/keyboard_switches.cc11
-rw-r--r--chromium/ui/keyboard/keyboard_switches.h20
-rw-r--r--chromium/ui/keyboard/keyboard_ui_controller.cc116
-rw-r--r--chromium/ui/keyboard/keyboard_ui_controller.h29
-rw-r--r--chromium/ui/keyboard/keyboard_ui_handler.cc142
-rw-r--r--chromium/ui/keyboard/keyboard_ui_handler.h45
-rw-r--r--chromium/ui/keyboard/keyboard_util.cc222
-rw-r--r--chromium/ui/keyboard/keyboard_util.h72
-rw-r--r--chromium/ui/keyboard/resources/api_adapter.js31
-rw-r--r--chromium/ui/keyboard/resources/constants.js100
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-altkey-container.html29
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-altkey-container.js35
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-altkey-data.html124
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-altkey-data.js126
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-altkey-set.html12
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-altkey-set.js10
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-altkey.html72
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-altkey.js52
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-key-base.html231
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-key-base.js228
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-key-codes.html225
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-key-codes.js227
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-key-import.html19
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-key-import.js22
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-key-sequence.html61
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-key-sequence.js60
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-key.html255
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-key.js114
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-keyboard.html970
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-keyboard.js977
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-keyset.html74
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-keyset.js104
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-modifier-key.html133
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-modifier-key.js135
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-options-menu.html111
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-row.html31
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-row.js8
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-shift-key.html275
-rw-r--r--chromium/ui/keyboard/resources/elements/kb-shift-key.js246
-rw-r--r--chromium/ui/keyboard/resources/images/back.svg2
-rw-r--r--chromium/ui/keyboard/resources/images/backspace.pngbin0 -> 494 bytes
-rw-r--r--chromium/ui/keyboard/resources/images/down.svg2
-rw-r--r--chromium/ui/keyboard/resources/images/hide-keyboard.pngbin0 -> 395 bytes
-rw-r--r--chromium/ui/keyboard/resources/images/left.svg2
-rw-r--r--chromium/ui/keyboard/resources/images/return.pngbin0 -> 423 bytes
-rw-r--r--chromium/ui/keyboard/resources/images/right.svg2
-rw-r--r--chromium/ui/keyboard/resources/images/search.pngbin0 -> 707 bytes
-rw-r--r--chromium/ui/keyboard/resources/images/search.svg14
-rw-r--r--chromium/ui/keyboard/resources/images/shift.pngbin0 -> 463 bytes
-rw-r--r--chromium/ui/keyboard/resources/images/tab.pngbin0 -> 656 bytes
-rw-r--r--chromium/ui/keyboard/resources/images/up.svg2
-rw-r--r--chromium/ui/keyboard/resources/index.html48
-rw-r--r--chromium/ui/keyboard/resources/keyboard.js26
-rw-r--r--chromium/ui/keyboard/resources/layouts/dvorak.html10
-rw-r--r--chromium/ui/keyboard/resources/layouts/function-key-row.html32
-rw-r--r--chromium/ui/keyboard/resources/layouts/latin-accents.js2
-rw-r--r--chromium/ui/keyboard/resources/layouts/numeric.html43
-rw-r--r--chromium/ui/keyboard/resources/layouts/qwerty.html279
-rw-r--r--chromium/ui/keyboard/resources/layouts/spacebar-row.html2
-rw-r--r--chromium/ui/keyboard/resources/layouts/symbol-altkeys.js2
-rw-r--r--chromium/ui/keyboard/resources/layouts/system-qwerty.html208
-rw-r--r--chromium/ui/keyboard/resources/layouts/webui_qwerty.html122
-rw-r--r--chromium/ui/keyboard/resources/main.css66
-rw-r--r--chromium/ui/keyboard/resources/main.js635
-rw-r--r--chromium/ui/keyboard/resources/polymer_loader.js10
-rw-r--r--chromium/ui/keyboard/resources/roboto_bold.ttfbin0 -> 135820 bytes
-rw-r--r--chromium/ui/keyboard/resources/sounds/keypress-delete.wavbin0 -> 56208 bytes
-rw-r--r--chromium/ui/keyboard/resources/sounds/keypress-return.wavbin0 -> 13544 bytes
-rw-r--r--chromium/ui/keyboard/resources/sounds/keypress-spacebar.wavbin0 -> 20880 bytes
-rw-r--r--chromium/ui/keyboard/resources/sounds/keypress-standard.wavbin0 -> 21352 bytes
-rw-r--r--chromium/ui/keyboard/resources/touch_fuzzing.js449
-rw-r--r--chromium/ui/keyboard/resources/webui/api_adapter.js89
-rw-r--r--chromium/ui/keyboard/resources/webui/constants.js26
-rw-r--r--chromium/ui/keyboard/resources/webui/main.css172
-rw-r--r--chromium/ui/keyboard/resources/webui_index.html45
-rw-r--r--chromium/ui/message_center/DEPS2
-rw-r--r--chromium/ui/message_center/cocoa/notification_controller.h4
-rw-r--r--chromium/ui/message_center/cocoa/notification_controller.mm236
-rw-r--r--chromium/ui/message_center/cocoa/notification_controller_unittest.mm153
-rw-r--r--chromium/ui/message_center/cocoa/opaque_views.h36
-rw-r--r--chromium/ui/message_center/cocoa/opaque_views.mm63
-rw-r--r--chromium/ui/message_center/cocoa/popup_collection.mm9
-rw-r--r--chromium/ui/message_center/cocoa/popup_collection_unittest.mm66
-rw-r--r--chromium/ui/message_center/cocoa/popup_controller.mm7
-rw-r--r--chromium/ui/message_center/cocoa/popup_controller_unittest.mm6
-rw-r--r--chromium/ui/message_center/cocoa/settings_controller.h5
-rw-r--r--chromium/ui/message_center/cocoa/settings_controller.mm28
-rw-r--r--chromium/ui/message_center/cocoa/settings_controller_unittest.mm2
-rw-r--r--chromium/ui/message_center/cocoa/settings_entry_view.mm24
-rw-r--r--chromium/ui/message_center/cocoa/status_item_view.h8
-rw-r--r--chromium/ui/message_center/cocoa/status_item_view.mm6
-rw-r--r--chromium/ui/message_center/cocoa/status_item_view_unittest.mm2
-rw-r--r--chromium/ui/message_center/cocoa/tray_controller_unittest.mm2
-rw-r--r--chromium/ui/message_center/cocoa/tray_view_controller.h8
-rw-r--r--chromium/ui/message_center/cocoa/tray_view_controller.mm82
-rw-r--r--chromium/ui/message_center/cocoa/tray_view_controller_unittest.mm60
-rw-r--r--chromium/ui/message_center/dummy_message_center.cc6
-rw-r--r--chromium/ui/message_center/fake_message_center.cc16
-rw-r--r--chromium/ui/message_center/fake_message_center.h8
-rw-r--r--chromium/ui/message_center/fake_message_center_tray_delegate.cc56
-rw-r--r--chromium/ui/message_center/fake_message_center_tray_delegate.h50
-rw-r--r--chromium/ui/message_center/fake_notifier_settings_provider.cc4
-rw-r--r--chromium/ui/message_center/message_center.gyp64
-rw-r--r--chromium/ui/message_center/message_center.h33
-rw-r--r--chromium/ui/message_center/message_center_impl.cc134
-rw-r--r--chromium/ui/message_center/message_center_impl.h26
-rw-r--r--chromium/ui/message_center/message_center_impl_unittest.cc161
-rw-r--r--chromium/ui/message_center/message_center_observer.h4
-rw-r--r--chromium/ui/message_center/message_center_style.cc28
-rw-r--r--chromium/ui/message_center/message_center_style.h16
-rw-r--r--chromium/ui/message_center/message_center_switches.cc17
-rw-r--r--chromium/ui/message_center/message_center_switches.h31
-rw-r--r--chromium/ui/message_center/message_center_tray.cc90
-rw-r--r--chromium/ui/message_center/message_center_tray.h14
-rw-r--r--chromium/ui/message_center/message_center_tray_delegate.h3
-rw-r--r--chromium/ui/message_center/message_center_tray_unittest.cc73
-rw-r--r--chromium/ui/message_center/message_center_types.h10
-rw-r--r--chromium/ui/message_center/message_center_util.cc39
-rw-r--r--chromium/ui/message_center/message_center_util.h24
-rw-r--r--chromium/ui/message_center/notification.cc18
-rw-r--r--chromium/ui/message_center/notification.h68
-rw-r--r--chromium/ui/message_center/notification_delegate.cc32
-rw-r--r--chromium/ui/message_center/notification_delegate.h26
-rw-r--r--chromium/ui/message_center/notification_delegate_unittest.cc71
-rw-r--r--chromium/ui/message_center/notification_list.cc19
-rw-r--r--chromium/ui/message_center/notification_list.h28
-rw-r--r--chromium/ui/message_center/notification_list_unittest.cc8
-rw-r--r--chromium/ui/message_center/notifier_settings.cc6
-rw-r--r--chromium/ui/message_center/notifier_settings.h24
-rw-r--r--chromium/ui/message_center/views/bounded_label.cc73
-rw-r--r--chromium/ui/message_center/views/bounded_label.h20
-rw-r--r--chromium/ui/message_center/views/bounded_label_unittest.cc18
-rw-r--r--chromium/ui/message_center/views/constants.h3
-rw-r--r--chromium/ui/message_center/views/group_view.cc280
-rw-r--r--chromium/ui/message_center/views/group_view.h77
-rw-r--r--chromium/ui/message_center/views/message_bubble_base.cc1
-rw-r--r--chromium/ui/message_center/views/message_center_bubble.cc15
-rw-r--r--chromium/ui/message_center/views/message_center_bubble.h2
-rw-r--r--chromium/ui/message_center/views/message_center_button_bar.cc51
-rw-r--r--chromium/ui/message_center/views/message_center_button_bar.h12
-rw-r--r--chromium/ui/message_center/views/message_center_controller.h15
-rw-r--r--chromium/ui/message_center/views/message_center_view.cc387
-rw-r--r--chromium/ui/message_center/views/message_center_view.h38
-rw-r--r--chromium/ui/message_center/views/message_center_view_unittest.cc67
-rw-r--r--chromium/ui/message_center/views/message_popup_collection.cc142
-rw-r--r--chromium/ui/message_center/views/message_popup_collection.h24
-rw-r--r--chromium/ui/message_center/views/message_popup_collection_unittest.cc10
-rw-r--r--chromium/ui/message_center/views/message_view.cc209
-rw-r--r--chromium/ui/message_center/views/message_view.h35
-rw-r--r--chromium/ui/message_center/views/message_view_context_menu_controller.cc45
-rw-r--r--chromium/ui/message_center/views/message_view_context_menu_controller.h34
-rw-r--r--chromium/ui/message_center/views/notification_button.cc20
-rw-r--r--chromium/ui/message_center/views/notification_button.h8
-rw-r--r--chromium/ui/message_center/views/notification_view.cc614
-rw-r--r--chromium/ui/message_center/views/notification_view.h49
-rw-r--r--chromium/ui/message_center/views/notification_view_unittest.cc323
-rw-r--r--chromium/ui/message_center/views/notifier_settings_view.cc66
-rw-r--r--chromium/ui/message_center/views/notifier_settings_view.h8
-rw-r--r--chromium/ui/message_center/views/padded_button.cc4
-rw-r--r--chromium/ui/message_center/views/padded_button.h4
-rw-r--r--chromium/ui/message_center/views/proportional_image_view.cc73
-rw-r--r--chromium/ui/message_center/views/proportional_image_view.h9
-rw-r--r--chromium/ui/message_center/views/toast_contents_view.cc96
-rw-r--r--chromium/ui/message_center/views/toast_contents_view.h21
-rw-r--r--chromium/ui/metro_viewer/BUILD.gn17
-rw-r--r--chromium/ui/metro_viewer/OWNERS6
-rw-r--r--chromium/ui/metro_viewer/ime_types.h2
-rw-r--r--chromium/ui/metro_viewer/metro_viewer_messages.h51
-rw-r--r--chromium/ui/native_theme/BUILD.gn56
-rw-r--r--chromium/ui/native_theme/common_theme.cc46
-rw-r--r--chromium/ui/native_theme/common_theme.h13
-rw-r--r--chromium/ui/native_theme/fallback_theme.cc112
-rw-r--r--chromium/ui/native_theme/native_theme.cc15
-rw-r--r--chromium/ui/native_theme/native_theme.gyp11
-rw-r--r--chromium/ui/native_theme/native_theme.h63
-rw-r--r--chromium/ui/native_theme/native_theme_android.cc2
-rw-r--r--chromium/ui/native_theme/native_theme_aura.cc380
-rw-r--r--chromium/ui/native_theme/native_theme_aura.h86
-rw-r--r--chromium/ui/native_theme/native_theme_aurawin.cc86
-rw-r--r--chromium/ui/native_theme/native_theme_aurawin.h37
-rw-r--r--chromium/ui/native_theme/native_theme_base.cc114
-rw-r--r--chromium/ui/native_theme/native_theme_base.h32
-rw-r--r--chromium/ui/native_theme/native_theme_gtk.cc108
-rw-r--r--chromium/ui/native_theme/native_theme_gtk.h28
-rw-r--r--chromium/ui/native_theme/native_theme_mac.h6
-rw-r--r--chromium/ui/native_theme/native_theme_mac.mm3
-rw-r--r--chromium/ui/native_theme/native_theme_observer.cc11
-rw-r--r--chromium/ui/native_theme/native_theme_observer.h27
-rw-r--r--chromium/ui/native_theme/native_theme_switches.cc31
-rw-r--r--chromium/ui/native_theme/native_theme_switches.h25
-rw-r--r--chromium/ui/native_theme/native_theme_win.cc129
-rw-r--r--chromium/ui/native_theme/native_theme_win.h9
-rw-r--r--chromium/ui/native_theme/native_theme_win_unittest.cc15
-rw-r--r--chromium/ui/oak/DEPS10
-rw-r--r--chromium/ui/oak/oak.gyp48
-rw-r--r--chromium/ui/oak/oak.h17
-rw-r--r--chromium/ui/oak/oak_aura_window_display.cc164
-rw-r--r--chromium/ui/oak/oak_aura_window_display.h37
-rw-r--r--chromium/ui/oak/oak_details_model.h33
-rw-r--r--chromium/ui/oak/oak_export.h32
-rw-r--r--chromium/ui/oak/oak_pretty_print.cc43
-rw-r--r--chromium/ui/oak/oak_pretty_print.h31
-rw-r--r--chromium/ui/oak/oak_tree_model.cc39
-rw-r--r--chromium/ui/oak/oak_tree_model.h26
-rw-r--r--chromium/ui/oak/oak_window.cc159
-rw-r--r--chromium/ui/oak/oak_window.h67
-rw-r--r--chromium/ui/ozone/BUILD.gn56
-rw-r--r--chromium/ui/ozone/DEPS2
-rw-r--r--chromium/ui/ozone/OWNERS1
-rw-r--r--chromium/ui/ozone/common/README2
-rw-r--r--chromium/ui/ozone/common/chromeos/native_display_delegate_ozone.cc95
-rw-r--r--chromium/ui/ozone/common/chromeos/native_display_delegate_ozone.h51
-rw-r--r--chromium/ui/ozone/common/chromeos/touchscreen_device_manager_ozone.cc20
-rw-r--r--chromium/ui/ozone/common/chromeos/touchscreen_device_manager_ozone.h27
-rwxr-xr-xchromium/ui/ozone/generate_constructor_list.py169
-rwxr-xr-xchromium/ui/ozone/generate_ozone_platform_list.py142
-rw-r--r--chromium/ui/ozone/ozone.gni18
-rw-r--r--chromium/ui/ozone/ozone.gyp164
-rw-r--r--chromium/ui/ozone/ozone_base_export.h29
-rw-r--r--chromium/ui/ozone/ozone_platform.cc76
-rw-r--r--chromium/ui/ozone/ozone_platform.h37
-rw-r--r--chromium/ui/ozone/ozone_platform_list.h25
-rw-r--r--chromium/ui/ozone/platform/README2
-rw-r--r--chromium/ui/ozone/platform/caca/DEPS3
-rw-r--r--chromium/ui/ozone/platform/caca/OWNERS1
-rw-r--r--chromium/ui/ozone/platform/caca/caca.gypi45
-rw-r--r--chromium/ui/ozone/platform/caca/caca_connection.cc40
-rw-r--r--chromium/ui/ozone/platform/caca/caca_connection.h47
-rw-r--r--chromium/ui/ozone/platform/caca/caca_event_factory.cc232
-rw-r--r--chromium/ui/ozone/platform/caca/caca_event_factory.h54
-rw-r--r--chromium/ui/ozone/platform/caca/caca_surface_factory.cc147
-rw-r--r--chromium/ui/ozone/platform/caca/caca_surface_factory.h46
-rw-r--r--chromium/ui/ozone/platform/caca/ozone_platform_caca.cc77
-rw-r--r--chromium/ui/ozone/platform/caca/ozone_platform_caca.h17
-rw-r--r--chromium/ui/ozone/platform/dri/DEPS4
-rw-r--r--chromium/ui/ozone/platform/dri/OWNERS1
-rw-r--r--chromium/ui/ozone/platform/dri/buffer_data.cc71
-rw-r--r--chromium/ui/ozone/platform/dri/buffer_data.h53
-rw-r--r--chromium/ui/ozone/platform/dri/chromeos/DEPS3
-rw-r--r--chromium/ui/ozone/platform/dri/chromeos/display_mode_dri.cc17
-rw-r--r--chromium/ui/ozone/platform/dri/chromeos/display_mode_dri.h33
-rw-r--r--chromium/ui/ozone/platform/dri/chromeos/display_snapshot_dri.cc127
-rw-r--r--chromium/ui/ozone/platform/dri/chromeos/display_snapshot_dri.h47
-rw-r--r--chromium/ui/ozone/platform/dri/chromeos/native_display_delegate_dri.cc189
-rw-r--r--chromium/ui/ozone/platform/dri/chromeos/native_display_delegate_dri.h78
-rw-r--r--chromium/ui/ozone/platform/dri/cursor_factory_evdev_dri.cc67
-rw-r--r--chromium/ui/ozone/platform/dri/cursor_factory_evdev_dri.h58
-rw-r--r--chromium/ui/ozone/platform/dri/dri.gypi97
-rw-r--r--chromium/ui/ozone/platform/dri/dri_buffer.cc140
-rw-r--r--chromium/ui/ozone/platform/dri/dri_buffer.h57
-rw-r--r--chromium/ui/ozone/platform/dri/dri_surface.cc80
-rw-r--r--chromium/ui/ozone/platform/dri/dri_surface.h64
-rw-r--r--chromium/ui/ozone/platform/dri/dri_surface_factory.cc252
-rw-r--r--chromium/ui/ozone/platform/dri/dri_surface_factory.h85
-rw-r--r--chromium/ui/ozone/platform/dri/dri_surface_factory_unittest.cc202
-rw-r--r--chromium/ui/ozone/platform/dri/dri_surface_unittest.cc118
-rw-r--r--chromium/ui/ozone/platform/dri/dri_util.cc125
-rw-r--r--chromium/ui/ozone/platform/dri/dri_util.h44
-rw-r--r--chromium/ui/ozone/platform/dri/dri_vsync_provider.cc38
-rw-r--r--chromium/ui/ozone/platform/dri/dri_vsync_provider.h30
-rw-r--r--chromium/ui/ozone/platform/dri/dri_wrapper.cc164
-rw-r--r--chromium/ui/ozone/platform/dri/dri_wrapper.h127
-rw-r--r--chromium/ui/ozone/platform/dri/gbm.gypi43
-rw-r--r--chromium/ui/ozone/platform/dri/gbm_surface.cc112
-rw-r--r--chromium/ui/ozone/platform/dri/gbm_surface.h75
-rw-r--r--chromium/ui/ozone/platform/dri/gbm_surface_factory.cc187
-rw-r--r--chromium/ui/ozone/platform/dri/gbm_surface_factory.h42
-rw-r--r--chromium/ui/ozone/platform/dri/hardware_display_controller.cc168
-rw-r--r--chromium/ui/ozone/platform/dri/hardware_display_controller.h182
-rw-r--r--chromium/ui/ozone/platform/dri/hardware_display_controller_unittest.cc112
-rw-r--r--chromium/ui/ozone/platform/dri/ozone_platform_dri.cc112
-rw-r--r--chromium/ui/ozone/platform/dri/ozone_platform_dri.h23
-rw-r--r--chromium/ui/ozone/platform/dri/ozone_platform_gbm.cc146
-rw-r--r--chromium/ui/ozone/platform/dri/ozone_platform_gbm.h17
-rw-r--r--chromium/ui/ozone/platform/dri/scanout_surface.h84
-rw-r--r--chromium/ui/ozone/platform/dri/screen_manager.cc137
-rw-r--r--chromium/ui/ozone/platform/dri/screen_manager.h83
-rw-r--r--chromium/ui/ozone/platform/dri/screen_manager_unittest.cc116
-rw-r--r--chromium/ui/ozone/platform/dri/test/mock_dri_surface.cc53
-rw-r--r--chromium/ui/ozone/platform/dri/test/mock_dri_surface.h45
-rw-r--r--chromium/ui/ozone/platform/dri/test/mock_dri_wrapper.cc113
-rw-r--r--chromium/ui/ozone/platform/dri/test/mock_dri_wrapper.h85
-rw-r--r--chromium/ui/ozone/platform/dri/test/mock_surface_generator.cc18
-rw-r--r--chromium/ui/ozone/platform/dri/test/mock_surface_generator.h40
-rw-r--r--chromium/ui/ozone/platform/dri/virtual_terminal_manager.cc75
-rw-r--r--chromium/ui/ozone/platform/dri/virtual_terminal_manager.h31
-rw-r--r--chromium/ui/ozone/platform/egltest/eglplatform_shim.h58
-rw-r--r--chromium/ui/ozone/platform/egltest/eglplatform_shim_xeleven.cc106
-rw-r--r--chromium/ui/ozone/platform/egltest/egltest.gypi107
-rw-r--r--chromium/ui/ozone/platform/egltest/ozone_platform_egltest.cc304
-rw-r--r--chromium/ui/ozone/platform/egltest/ozone_platform_egltest.h17
-rw-r--r--chromium/ui/ozone/platform/test/DEPS3
-rw-r--r--chromium/ui/ozone/platform/test/file_surface_factory.cc98
-rw-r--r--chromium/ui/ozone/platform/test/file_surface_factory.h38
-rw-r--r--chromium/ui/ozone/platform/test/ozone_platform_test.cc75
-rw-r--r--chromium/ui/ozone/platform/test/ozone_platform_test.h23
-rw-r--r--chromium/ui/ozone/platform/test/test.gypi35
-rw-r--r--chromium/ui/ozone/platform_constructor_list.h21
-rw-r--r--chromium/ui/ozone/platform_object.h34
-rw-r--r--chromium/ui/ozone/platform_object_internal.h31
-rw-r--r--chromium/ui/ozone/platform_selection.cc52
-rw-r--r--chromium/ui/ozone/platform_selection.h21
-rw-r--r--chromium/ui/ozone/public/DEPS3
-rw-r--r--chromium/ui/ozone/public/README2
-rw-r--r--chromium/ui/ozone/public/cursor_factory_ozone.cc59
-rw-r--r--chromium/ui/ozone/public/cursor_factory_ozone.h59
-rw-r--r--chromium/ui/ozone/public/event_factory_ozone.cc34
-rw-r--r--chromium/ui/ozone/public/event_factory_ozone.h50
-rw-r--r--chromium/ui/ozone/public/gpu_platform_support.cc34
-rw-r--r--chromium/ui/ozone/public/gpu_platform_support.h31
-rw-r--r--chromium/ui/ozone/public/gpu_platform_support_host.cc37
-rw-r--r--chromium/ui/ozone/public/gpu_platform_support_host.h40
-rw-r--r--chromium/ui/ozone/public/overlay_candidates_ozone.cc28
-rw-r--r--chromium/ui/ozone/public/overlay_candidates_ozone.h56
-rw-r--r--chromium/ui/ozone/public/surface_factory_ozone.cc75
-rw-r--r--chromium/ui/ozone/public/surface_factory_ozone.h163
-rw-r--r--chromium/ui/ozone/public/surface_ozone_canvas.h56
-rw-r--r--chromium/ui/ozone/public/surface_ozone_egl.h49
-rw-r--r--chromium/ui/ozone/run_all_unittests.cc45
-rw-r--r--chromium/ui/resources/BUILD.gn15
-rw-r--r--chromium/ui/resources/default_100_percent/ash/status_network.pngbin437 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/ash/status_volume.pngbin388 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/app_list_apps_icon.pngbin0 -> 108 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/app_list_experimental_icon.pngbin0 -> 523 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/app_list_notifications_icon.pngbin0 -> 305 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/app_list_search_icon.pngbin0 -> 866 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/app_list_user_indicator.png (renamed from chromium/ui/resources/default_100_percent/win/app_list_user_indicator.png)bin143 -> 143 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_hover_bottom.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_hover_bottom_left.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_hover_bottom_right.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_hover_center.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_hover_left.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_hover_right.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_hover_top.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_hover_top_left.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_hover_top_right.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_normal_bottom.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_normal_bottom_left.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_normal_bottom_right.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_normal_center.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_normal_left.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_normal_right.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_normal_top.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_normal_top_left.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_normal_top_right.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_pressed_bottom.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_pressed_bottom_left.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_pressed_bottom_right.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_pressed_center.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_pressed_left.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_pressed_right.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_pressed_top.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_pressed_top_left.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_arrow_button_base_pressed_top_right.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_base_bottom.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_base_bottom_left.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_base_bottom_right.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_base_center.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_base_left.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_base_right.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_base_top.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_base_top_left.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_base_top_right.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_overlay_thumb_fill_bottom.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_overlay_thumb_fill_bottom_left.pngbin0 -> 77 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_overlay_thumb_fill_bottom_right.pngbin0 -> 75 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_overlay_thumb_fill_center.pngbin0 -> 69 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_overlay_thumb_fill_left.pngbin0 -> 70 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_overlay_thumb_fill_right.pngbin0 -> 70 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_overlay_thumb_fill_top.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_overlay_thumb_fill_top_left.pngbin0 -> 77 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_overlay_thumb_fill_top_right.pngbin0 -> 76 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_overlay_thumb_stroke_bottom.png (renamed from chromium/chrome/app/theme/default_100_percent/common/omnibox_filling_center.png)bin67 -> 67 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_overlay_thumb_stroke_bottom_left.pngbin0 -> 80 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_overlay_thumb_stroke_bottom_right.pngbin0 -> 80 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_overlay_thumb_stroke_left.pngbin0 -> 67 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_overlay_thumb_stroke_right.pngbin0 -> 67 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_overlay_thumb_stroke_top.pngbin0 -> 67 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_overlay_thumb_stroke_top_left.pngbin0 -> 80 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_overlay_thumb_stroke_top_right.pngbin0 -> 80 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_hover_bottom.pngbin0 -> 76 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_hover_bottom_left.pngbin0 -> 78 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_hover_bottom_right.pngbin0 -> 77 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_hover_center.pngbin0 -> 74 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_hover_left.pngbin0 -> 76 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_hover_right.pngbin0 -> 76 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_hover_top.pngbin0 -> 77 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_hover_top_left.pngbin0 -> 77 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_hover_top_right.pngbin0 -> 77 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_normal_bottom.pngbin0 -> 76 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_normal_bottom_left.pngbin0 -> 78 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_normal_bottom_right.pngbin0 -> 77 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_normal_center.pngbin0 -> 74 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_normal_left.pngbin0 -> 76 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_normal_right.pngbin0 -> 76 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_normal_top.pngbin0 -> 77 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_normal_top_left.pngbin0 -> 77 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_normal_top_right.pngbin0 -> 77 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_pressed_bottom.pngbin0 -> 76 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_pressed_bottom_left.pngbin0 -> 78 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_pressed_bottom_right.pngbin0 -> 77 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_pressed_center.pngbin0 -> 74 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_pressed_left.pngbin0 -> 76 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_pressed_right.pngbin0 -> 76 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_pressed_top.pngbin0 -> 77 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_pressed_top_left.pngbin0 -> 77 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/aura_scrollbar_thumb_base_pressed_top_right.pngbin0 -> 77 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/back_arrow.pngbin0 -> 1402 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/buy_with_google_button.pngbin1815 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/buy_with_google_button_hover.pngbin1815 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/buy_with_google_button_pressed.pngbin1811 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/forward_arrow.pngbin0 -> 1409 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/menu_overflow_down.pngbin85 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/menu_overflow_up.pngbin87 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/notification_bubble_close.pngbin0 -> 139 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/notification_bubble_close_hover.pngbin0 -> 214 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/notification_bubble_close_pressed.pngbin0 -> 214 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/notification_expand.pngbin79 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/notification_expand_hover.pngbin79 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/notification_expand_pressed.pngbin79 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/pointers/xterm.pngbin165 -> 166 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/pointers/xterm_horiz.pngbin179 -> 164 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/common/text_selection_handle.pngbin1650 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_base_horizontal_hover_center.pngbin94 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_base_horizontal_hover_left.pngbin98 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_base_horizontal_hover_right.pngbin80 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_base_vertical_hover_bottom.pngbin80 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_base_vertical_hover_center.pngbin82 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_base_vertical_hover_top.pngbin86 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_horizontal_hover_center.pngbin98 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_horizontal_hover_left.pngbin110 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_horizontal_hover_right.pngbin106 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_horizontal_normal_center.pngbin98 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_horizontal_normal_left.pngbin113 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_horizontal_normal_right.pngbin108 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_horizontal_pressed_center.pngbin98 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_horizontal_pressed_left.pngbin113 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_horizontal_pressed_right.pngbin108 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_vertical_hover_bottom.pngbin108 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_vertical_hover_center.pngbin86 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_vertical_hover_top.pngbin105 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_vertical_normal_bottom.pngbin112 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_vertical_normal_center.pngbin86 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_vertical_normal_top.pngbin105 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_vertical_pressed_bottom.pngbin106 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_vertical_pressed_center.pngbin86 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/cros/aura_scrollbar_thumb_vertical_pressed_top.pngbin105 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/oak.pngbin165 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/radialmenu_back.pngbin599 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/radialmenu_forward.pngbin588 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/radialmenu_options.pngbin407 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_100_percent/radialmenu_reload.pngbin854 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/app_list_apps_icon.pngbin0 -> 137 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/app_list_experimental_icon.pngbin0 -> 707 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/app_list_notifications_icon.pngbin0 -> 550 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/app_list_search_icon.pngbin0 -> 2208 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/app_list_user_indicator.png (renamed from chromium/ui/resources/default_200_percent/win/app_list_user_indicator.png)bin465 -> 465 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_hover_bottom.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_hover_bottom_left.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_hover_bottom_right.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_hover_center.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_hover_left.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_hover_right.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_hover_top.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_hover_top_left.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_hover_top_right.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_normal_bottom.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_normal_bottom_left.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_normal_bottom_right.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_normal_center.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_normal_left.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_normal_right.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_normal_top.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_normal_top_left.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_normal_top_right.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_pressed_bottom.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_pressed_bottom_left.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_pressed_bottom_right.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_pressed_center.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_pressed_left.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_pressed_right.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_pressed_top.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_pressed_top_left.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_arrow_button_base_pressed_top_right.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_base_bottom.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_base_bottom_left.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_base_bottom_right.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_base_center.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_base_left.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_base_right.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_base_top.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_base_top_left.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_base_top_right.pngbin0 -> 72 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_overlay_thumb_fill_bottom.pngbin0 -> 73 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_overlay_thumb_fill_bottom_left.pngbin0 -> 83 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_overlay_thumb_fill_bottom_right.pngbin0 -> 81 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_overlay_thumb_fill_center.pngbin0 -> 73 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_overlay_thumb_fill_left.pngbin0 -> 73 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_overlay_thumb_fill_right.pngbin0 -> 73 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_overlay_thumb_fill_top.pngbin0 -> 73 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_overlay_thumb_fill_top_left.pngbin0 -> 84 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_overlay_thumb_fill_top_right.pngbin0 -> 85 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_overlay_thumb_stroke_bottom.png (renamed from chromium/chrome/app/theme/default_200_percent/common/omnibox_filling_center.png)bin71 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_overlay_thumb_stroke_bottom_left.pngbin0 -> 95 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_overlay_thumb_stroke_bottom_right.pngbin0 -> 97 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_overlay_thumb_stroke_left.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_overlay_thumb_stroke_right.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_overlay_thumb_stroke_top.pngbin0 -> 71 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_overlay_thumb_stroke_top_left.pngbin0 -> 94 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_overlay_thumb_stroke_top_right.pngbin0 -> 94 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_hover_bottom.pngbin0 -> 79 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_hover_bottom_left.pngbin0 -> 80 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_hover_bottom_right.pngbin0 -> 81 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_hover_center.pngbin0 -> 75 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_hover_left.pngbin0 -> 78 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_hover_right.pngbin0 -> 78 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_hover_top.pngbin0 -> 79 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_hover_top_left.pngbin0 -> 81 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_hover_top_right.pngbin0 -> 79 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_normal_bottom.pngbin0 -> 79 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_normal_bottom_left.pngbin0 -> 80 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_normal_bottom_right.pngbin0 -> 81 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_normal_center.pngbin0 -> 75 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_normal_left.pngbin0 -> 78 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_normal_right.pngbin0 -> 78 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_normal_top.pngbin0 -> 79 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_normal_top_left.pngbin0 -> 81 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_normal_top_right.pngbin0 -> 79 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_pressed_bottom.pngbin0 -> 79 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_pressed_bottom_left.pngbin0 -> 80 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_pressed_bottom_right.pngbin0 -> 81 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_pressed_center.pngbin0 -> 75 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_pressed_left.pngbin0 -> 78 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_pressed_right.pngbin0 -> 78 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_pressed_top.pngbin0 -> 79 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_pressed_top_left.pngbin0 -> 81 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/aura_scrollbar_thumb_base_pressed_top_right.pngbin0 -> 79 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/back_arrow.pngbin0 -> 4934 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/buy_with_google_button.pngbin5121 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/buy_with_google_button_hover.pngbin5123 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/buy_with_google_button_pressed.pngbin5183 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/forward_arrow.pngbin0 -> 4976 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/menu_overflow_down.pngbin143 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/menu_overflow_up.pngbin137 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/notification_bubble_close.pngbin0 -> 205 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/notification_bubble_close_hover.pngbin0 -> 380 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/notification_bubble_close_pressed.pngbin0 -> 379 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/notification_expand.pngbin82 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/notification_expand_hover.pngbin81 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/notification_expand_pressed.pngbin81 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/pointers/xterm.pngbin285 -> 295 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/pointers/xterm_horiz.pngbin298 -> 369 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/common/text_selection_handle.pngbin4156 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_base_horizontal_hover_center.pngbin91 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_base_horizontal_hover_left.pngbin101 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_base_horizontal_hover_right.pngbin89 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_base_vertical_hover_bottom.pngbin87 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_base_vertical_hover_center.pngbin378 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_base_vertical_hover_top.pngbin103 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_base_vertical_normal_bottom.pngbin80 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_base_vertical_normal_top.pngbin74 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_horizontal_hover_center.pngbin116 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_horizontal_hover_left.pngbin139 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_horizontal_hover_right.pngbin132 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_horizontal_normal_center.pngbin119 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_horizontal_normal_left.pngbin147 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_horizontal_normal_right.pngbin133 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_horizontal_pressed_center.pngbin112 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_horizontal_pressed_left.pngbin139 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_horizontal_pressed_right.pngbin140 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_vertical_hover_bottom.pngbin138 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_vertical_hover_center.pngbin113 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_vertical_hover_top.pngbin134 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_vertical_normal_bottom.pngbin141 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_vertical_normal_center.pngbin128 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_vertical_normal_top.pngbin134 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_vertical_pressed_bottom.pngbin137 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_vertical_pressed_center.pngbin112 -> 0 bytes
-rw-r--r--chromium/ui/resources/default_200_percent/cros/aura_scrollbar_thumb_vertical_pressed_top.pngbin134 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_hover_bottom.pngbin83 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_hover_bottom_left.pngbin109 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_hover_bottom_right.pngbin110 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_hover_center.pngbin87 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_hover_left.pngbin148 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_hover_right.pngbin144 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_hover_top.pngbin79 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_hover_top_left.pngbin102 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_hover_top_right.pngbin101 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_pressed_bottom.pngbin81 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_left.pngbin108 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_pressed_bottom_right.pngbin108 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_pressed_center.pngbin85 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_pressed_left.pngbin118 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_pressed_right.pngbin117 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_pressed_top.pngbin79 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_pressed_top_left.pngbin107 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/common/textbutton_pressed_top_right.pngbin104 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_base_horizontal_hover_center.pngbin169 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_base_horizontal_hover_left.pngbin97 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_base_horizontal_hover_right.pngbin101 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_base_horizontal_hover_right_fix.pngbin84 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_base_horizontal_normal_center.pngbin71 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_base_horizontal_normal_left.pngbin78 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_base_horizontal_normal_right.pngbin78 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_base_hover_edge.pngbin153 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_base_normal_edge.pngbin85 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_base_vertical_hover_bottom.pngbin98 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_base_vertical_hover_bottom_fix.pngbin85 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_base_vertical_hover_center.pngbin176 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_base_vertical_hover_top.pngbin86 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_base_vertical_normal_bottom.pngbin77 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_base_vertical_normal_center.pngbin71 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_base_vertical_normal_top.pngbin72 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_horizontal_hover_center.pngbin98 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_horizontal_hover_left.pngbin112 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_horizontal_hover_right.pngbin108 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_horizontal_normal_center.pngbin98 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_horizontal_normal_left.pngbin113 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_horizontal_normal_right.pngbin108 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_horizontal_pressed_center.pngbin98 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_horizontal_pressed_left.pngbin112 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_horizontal_pressed_right.pngbin108 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_vertical_hover_bottom.pngbin113 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_vertical_hover_center.pngbin86 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_vertical_hover_top.pngbin105 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_vertical_normal_bottom.pngbin113 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_vertical_normal_center.pngbin86 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_vertical_normal_top.pngbin106 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_vertical_pressed_bottom.pngbin112 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_vertical_pressed_center.pngbin86 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/scrollbar_thumb_vertical_pressed_top.pngbin105 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_hover_bottom.pngbin83 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_hover_bottom_left.pngbin104 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_hover_bottom_right.pngbin110 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_hover_center.pngbin87 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_hover_left.pngbin141 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_hover_right.pngbin131 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_hover_top.pngbin79 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_hover_top_left.pngbin97 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_hover_top_right.pngbin102 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_pressed_bottom.pngbin81 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_pressed_bottom_left.pngbin108 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_pressed_bottom_right.pngbin108 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_pressed_center.pngbin85 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_pressed_left.pngbin118 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_pressed_right.pngbin117 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_pressed_top.pngbin79 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_pressed_top_left.pngbin107 -> 0 bytes
-rw-r--r--chromium/ui/resources/touch_100_percent/textbutton_pressed_top_right.pngbin108 -> 0 bytes
-rw-r--r--chromium/ui/resources/ui_resources.grd684
-rw-r--r--chromium/ui/resources/ui_resources.gyp65
-rw-r--r--chromium/ui/shell_dialogs/DEPS1
-rw-r--r--chromium/ui/shell_dialogs/base_shell_dialog_win.cc4
-rw-r--r--chromium/ui/shell_dialogs/gtk/OWNERS2
-rw-r--r--chromium/ui/shell_dialogs/gtk/select_file_dialog_impl.cc92
-rw-r--r--chromium/ui/shell_dialogs/gtk/select_file_dialog_impl.h89
-rw-r--r--chromium/ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc596
-rw-r--r--chromium/ui/shell_dialogs/gtk/select_file_dialog_impl_kde.cc485
-rw-r--r--chromium/ui/shell_dialogs/print_settings_dialog_win.cc58
-rw-r--r--chromium/ui/shell_dialogs/print_settings_dialog_win.h83
-rw-r--r--chromium/ui/shell_dialogs/select_file_dialog.cc13
-rw-r--r--chromium/ui/shell_dialogs/select_file_dialog_android.cc9
-rw-r--r--chromium/ui/shell_dialogs/select_file_dialog_android.h3
-rw-r--r--chromium/ui/shell_dialogs/select_file_dialog_win.cc74
-rw-r--r--chromium/ui/shell_dialogs/shell_dialogs.gyp33
-rw-r--r--chromium/ui/snapshot/BUILD.gn95
-rw-r--r--chromium/ui/snapshot/DEPS3
-rw-r--r--chromium/ui/snapshot/snapshot.gyp26
-rw-r--r--chromium/ui/snapshot/snapshot.h42
-rw-r--r--chromium/ui/snapshot/snapshot_android.cc75
-rw-r--r--chromium/ui/snapshot/snapshot_async.cc103
-rw-r--r--chromium/ui/snapshot/snapshot_async.h42
-rw-r--r--chromium/ui/snapshot/snapshot_aura.cc108
-rw-r--r--chromium/ui/snapshot/snapshot_aura_unittest.cc120
-rw-r--r--chromium/ui/snapshot/snapshot_gtk.cc85
-rw-r--r--chromium/ui/snapshot/snapshot_ios.mm27
-rw-r--r--chromium/ui/snapshot/snapshot_mac.mm29
-rw-r--r--chromium/ui/snapshot/snapshot_win.cc29
-rw-r--r--chromium/ui/strings/BUILD.gn22
-rw-r--r--chromium/ui/strings/OWNERS (renamed from chromium/third_party/WebKit/Source/testing/OWNERS)0
-rw-r--r--chromium/ui/strings/app_locale_settings.grd263
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_am.xtb8
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_ar.xtb9
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_bg.xtb (renamed from chromium/ui/base/strings/app_locale_settings_bg.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_bn.xtb20
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_ca.xtb (renamed from chromium/ui/base/strings/app_locale_settings_ca.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_cs.xtb (renamed from chromium/ui/base/strings/app_locale_settings_cs.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_da.xtb (renamed from chromium/ui/base/strings/app_locale_settings_da.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_de.xtb (renamed from chromium/ui/base/strings/app_locale_settings_de.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_el.xtb (renamed from chromium/ui/base/strings/app_locale_settings_el.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_en-GB.xtb (renamed from chromium/ui/base/strings/app_locale_settings_en-GB.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_es-419.xtb (renamed from chromium/ui/base/strings/app_locale_settings_es-419.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_es.xtb (renamed from chromium/ui/base/strings/app_locale_settings_es.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_et.xtb (renamed from chromium/ui/base/strings/app_locale_settings_et.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_fa.xtb (renamed from chromium/ui/base/strings/app_locale_settings_fa.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_fi.xtb (renamed from chromium/ui/base/strings/app_locale_settings_fi.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_fil.xtb (renamed from chromium/ui/base/strings/app_locale_settings_fil.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_fr.xtb (renamed from chromium/ui/base/strings/app_locale_settings_fr.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_gu.xtb (renamed from chromium/ui/base/strings/app_locale_settings_gu.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_he.xtb (renamed from chromium/ui/base/strings/app_locale_settings_he.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_hi.xtb11
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_hr.xtb (renamed from chromium/ui/base/strings/app_locale_settings_hr.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_hu.xtb (renamed from chromium/ui/base/strings/app_locale_settings_hu.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_id.xtb (renamed from chromium/ui/base/strings/app_locale_settings_id.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_it.xtb (renamed from chromium/ui/base/strings/app_locale_settings_it.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_ja.xtb22
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_kn.xtb13
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_ko.xtb19
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_lt.xtb (renamed from chromium/ui/base/strings/app_locale_settings_lt.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_lv.xtb (renamed from chromium/ui/base/strings/app_locale_settings_lv.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_ml.xtb19
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_mr.xtb11
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_ms.xtb (renamed from chromium/ui/base/strings/app_locale_settings_ms.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_nb.xtb (renamed from chromium/ui/base/strings/app_locale_settings_nb.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_nl.xtb (renamed from chromium/ui/base/strings/app_locale_settings_nl.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_pl.xtb (renamed from chromium/ui/base/strings/app_locale_settings_pl.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_pt-BR.xtb (renamed from chromium/ui/base/strings/app_locale_settings_pt-BR.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_pt-PT.xtb (renamed from chromium/ui/base/strings/app_locale_settings_pt-PT.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_ro.xtb (renamed from chromium/ui/base/strings/app_locale_settings_ro.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_ru.xtb (renamed from chromium/ui/base/strings/app_locale_settings_ru.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_sk.xtb (renamed from chromium/ui/base/strings/app_locale_settings_sk.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_sl.xtb (renamed from chromium/ui/base/strings/app_locale_settings_sl.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_sr.xtb (renamed from chromium/ui/base/strings/app_locale_settings_sr.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_sv.xtb (renamed from chromium/ui/base/strings/app_locale_settings_sv.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_sw.xtb (renamed from chromium/ui/base/strings/app_locale_settings_sw.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_ta.xtb8
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_te.xtb13
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_th.xtb16
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_tr.xtb (renamed from chromium/ui/base/strings/app_locale_settings_tr.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_uk.xtb (renamed from chromium/ui/base/strings/app_locale_settings_uk.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_vi.xtb (renamed from chromium/ui/base/strings/app_locale_settings_vi.xtb)0
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_zh-CN.xtb19
-rw-r--r--chromium/ui/strings/translations/app_locale_settings_zh-TW.xtb19
-rw-r--r--chromium/ui/strings/translations/ui_strings_am.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_ar.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_bg.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_bn.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_ca.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_cs.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_da.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_de.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_el.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_en-GB.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_es-419.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_es.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_et.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_fa.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_fi.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_fil.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_fr.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_gu.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_hi.xtb223
-rw-r--r--chromium/ui/strings/translations/ui_strings_hr.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_hu.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_id.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_it.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_iw.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_ja.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_kn.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_ko.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_lt.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_lv.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_ml.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_mr.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_ms.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_nl.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_no.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_pl.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_pt-BR.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_pt-PT.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_ro.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_ru.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_sk.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_sl.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_sr.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_sv.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_sw.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_ta.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_te.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_th.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_tr.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_uk.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_vi.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_zh-CN.xtb221
-rw-r--r--chromium/ui/strings/translations/ui_strings_zh-TW.xtb221
-rw-r--r--chromium/ui/strings/ui_strings.grd2198
-rw-r--r--chromium/ui/strings/ui_strings.gyp40
-rw-r--r--chromium/ui/surface/BUILD.gn32
-rw-r--r--chromium/ui/surface/DEPS1
-rw-r--r--chromium/ui/surface/accelerated_surface_mac.cc33
-rw-r--r--chromium/ui/surface/accelerated_surface_mac.h3
-rw-r--r--chromium/ui/surface/accelerated_surface_transformer_win.cc736
-rw-r--r--chromium/ui/surface/accelerated_surface_transformer_win.h228
-rw-r--r--chromium/ui/surface/accelerated_surface_transformer_win.hlsl300
-rw-r--r--chromium/ui/surface/accelerated_surface_transformer_win_unittest.cc895
-rw-r--r--chromium/ui/surface/accelerated_surface_win.cc1108
-rw-r--r--chromium/ui/surface/accelerated_surface_win.h222
-rw-r--r--chromium/ui/surface/compile_hlsl.py160
-rw-r--r--chromium/ui/surface/d3d9_utils_win.cc168
-rw-r--r--chromium/ui/surface/d3d9_utils_win.h87
-rw-r--r--chromium/ui/surface/surface.gyp92
-rw-r--r--chromium/ui/surface/surface_switches.cc19
-rw-r--r--chromium/ui/surface/surface_switches.h19
-rw-r--r--chromium/ui/surface/transport_dib.h74
-rw-r--r--chromium/ui/surface/transport_dib_gtk.cc158
-rw-r--r--chromium/ui/surface/transport_dib_posix.cc6
-rw-r--r--chromium/ui/ui.gyp702
-rw-r--r--chromium/ui/ui_unittests.gyp234
-rw-r--r--chromium/ui/ui_unittests.isolate3
-rw-r--r--chromium/ui/ui_unittests_bundle.gypi55
-rw-r--r--chromium/ui/v2/OWNERS2
-rw-r--r--chromium/ui/v2/src/v2_unittest.cc16
-rw-r--r--chromium/ui/v2/src/v2_unittests.cc16
-rw-r--r--chromium/ui/v2/v2.gyp4
-rw-r--r--chromium/ui/views/DEPS9
-rw-r--r--chromium/ui/views/accessibility/ax_aura_obj_cache.cc130
-rw-r--r--chromium/ui/views/accessibility/ax_aura_obj_cache.h83
-rw-r--r--chromium/ui/views/accessibility/ax_aura_obj_wrapper.h43
-rw-r--r--chromium/ui/views/accessibility/ax_view_obj_wrapper.cc91
-rw-r--r--chromium/ui/views/accessibility/ax_view_obj_wrapper.h38
-rw-r--r--chromium/ui/views/accessibility/ax_widget_obj_wrapper.cc55
-rw-r--r--chromium/ui/views/accessibility/ax_widget_obj_wrapper.h44
-rw-r--r--chromium/ui/views/accessibility/ax_window_obj_wrapper.cc64
-rw-r--r--chromium/ui/views/accessibility/ax_window_obj_wrapper.h42
-rw-r--r--chromium/ui/views/accessibility/native_view_accessibility.h4
-rw-r--r--chromium/ui/views/accessibility/native_view_accessibility_win.cc297
-rw-r--r--chromium/ui/views/accessibility/native_view_accessibility_win.h57
-rw-r--r--chromium/ui/views/accessibility/native_view_accessibility_win_unittest.cc112
-rw-r--r--chromium/ui/views/accessible_pane_view.cc6
-rw-r--r--chromium/ui/views/accessible_pane_view.h2
-rw-r--r--chromium/ui/views/accessible_pane_view_unittest.cc4
-rw-r--r--chromium/ui/views/animation/bounds_animator.cc15
-rw-r--r--chromium/ui/views/animation/bounds_animator.h27
-rw-r--r--chromium/ui/views/animation/bounds_animator_unittest.cc15
-rw-r--r--chromium/ui/views/background.cc5
-rw-r--r--chromium/ui/views/border.cc39
-rw-r--r--chromium/ui/views/border.h33
-rw-r--r--chromium/ui/views/bubble/bubble_border.cc3
-rw-r--r--chromium/ui/views/bubble/bubble_border.h8
-rw-r--r--chromium/ui/views/bubble/bubble_delegate.cc117
-rw-r--r--chromium/ui/views/bubble/bubble_delegate.h42
-rw-r--r--chromium/ui/views/bubble/bubble_delegate_unittest.cc75
-rw-r--r--chromium/ui/views/bubble/bubble_frame_view.cc101
-rw-r--r--chromium/ui/views/bubble/bubble_frame_view.h19
-rw-r--r--chromium/ui/views/bubble/bubble_frame_view_unittest.cc3
-rw-r--r--chromium/ui/views/bubble/bubble_window_targeter.cc30
-rw-r--r--chromium/ui/views/bubble/bubble_window_targeter.h33
-rw-r--r--chromium/ui/views/bubble/bubble_window_targeter_unittest.cc116
-rw-r--r--chromium/ui/views/bubble/tray_bubble_view.cc44
-rw-r--r--chromium/ui/views/bubble/tray_bubble_view.h19
-rw-r--r--chromium/ui/views/button_drag_utils.cc27
-rw-r--r--chromium/ui/views/button_drag_utils.h15
-rw-r--r--chromium/ui/views/cocoa/bridged_content_view.h33
-rw-r--r--chromium/ui/views/cocoa/bridged_content_view.mm50
-rw-r--r--chromium/ui/views/cocoa/bridged_native_widget.h62
-rw-r--r--chromium/ui/views/cocoa/bridged_native_widget.mm78
-rw-r--r--chromium/ui/views/cocoa/bridged_native_widget_unittest.mm117
-rw-r--r--chromium/ui/views/color_chooser/color_chooser_view.cc31
-rw-r--r--chromium/ui/views/color_chooser/color_chooser_view.h2
-rw-r--r--chromium/ui/views/controls/button/blue_button.cc83
-rw-r--r--chromium/ui/views/controls/button/blue_button.h1
-rw-r--r--chromium/ui/views/controls/button/blue_button_unittest.cc59
-rw-r--r--chromium/ui/views/controls/button/button.cc28
-rw-r--r--chromium/ui/views/controls/button/button.h16
-rw-r--r--chromium/ui/views/controls/button/checkbox.cc14
-rw-r--r--chromium/ui/views/controls/button/checkbox.h4
-rw-r--r--chromium/ui/views/controls/button/custom_button.cc15
-rw-r--r--chromium/ui/views/controls/button/custom_button.h6
-rw-r--r--chromium/ui/views/controls/button/custom_button_unittest.cc24
-rw-r--r--chromium/ui/views/controls/button/image_button.cc23
-rw-r--r--chromium/ui/views/controls/button/image_button.h17
-rw-r--r--chromium/ui/views/controls/button/image_button_unittest.cc25
-rw-r--r--chromium/ui/views/controls/button/label_button.cc161
-rw-r--r--chromium/ui/views/controls/button/label_button.h54
-rw-r--r--chromium/ui/views/controls/button/label_button_border.cc50
-rw-r--r--chromium/ui/views/controls/button/label_button_unittest.cc53
-rw-r--r--chromium/ui/views/controls/button/menu_button.cc62
-rw-r--r--chromium/ui/views/controls/button/menu_button.h18
-rw-r--r--chromium/ui/views/controls/button/menu_button_unittest.cc199
-rw-r--r--chromium/ui/views/controls/button/radio_button.cc10
-rw-r--r--chromium/ui/views/controls/button/radio_button.h6
-rw-r--r--chromium/ui/views/controls/button/text_button.cc185
-rw-r--r--chromium/ui/views/controls/button/text_button.h72
-rw-r--r--chromium/ui/views/controls/combobox/combobox.cc244
-rw-r--r--chromium/ui/views/controls/combobox/combobox.h53
-rw-r--r--chromium/ui/views/controls/combobox/combobox_listener.h21
-rw-r--r--chromium/ui/views/controls/combobox/combobox_unittest.cc244
-rw-r--r--chromium/ui/views/controls/image_view.cc42
-rw-r--r--chromium/ui/views/controls/image_view.h16
-rw-r--r--chromium/ui/views/controls/label.cc261
-rw-r--r--chromium/ui/views/controls/label.h169
-rw-r--r--chromium/ui/views/controls/label_unittest.cc477
-rw-r--r--chromium/ui/views/controls/link.cc115
-rw-r--r--chromium/ui/views/controls/link.h26
-rw-r--r--chromium/ui/views/controls/menu/display_change_listener_mac.cc16
-rw-r--r--chromium/ui/views/controls/menu/menu.cc26
-rw-r--r--chromium/ui/views/controls/menu/menu.h30
-rw-r--r--chromium/ui/views/controls/menu/menu_config.cc13
-rw-r--r--chromium/ui/views/controls/menu/menu_config.h17
-rw-r--r--chromium/ui/views/controls/menu/menu_config_aura.cc62
-rw-r--r--chromium/ui/views/controls/menu/menu_config_mac.cc26
-rw-r--r--chromium/ui/views/controls/menu/menu_config_views.cc66
-rw-r--r--chromium/ui/views/controls/menu/menu_config_win.cc21
-rw-r--r--chromium/ui/views/controls/menu/menu_controller.cc376
-rw-r--r--chromium/ui/views/controls/menu/menu_controller.h63
-rw-r--r--chromium/ui/views/controls/menu/menu_controller_aura.cc115
-rw-r--r--chromium/ui/views/controls/menu/menu_controller_unittest.cc267
-rw-r--r--chromium/ui/views/controls/menu/menu_controller_win.cc27
-rw-r--r--chromium/ui/views/controls/menu/menu_delegate.cc29
-rw-r--r--chromium/ui/views/controls/menu/menu_delegate.h34
-rw-r--r--chromium/ui/views/controls/menu/menu_event_dispatcher_linux.cc91
-rw-r--r--chromium/ui/views/controls/menu/menu_event_dispatcher_linux.h32
-rw-r--r--chromium/ui/views/controls/menu/menu_host.cc20
-rw-r--r--chromium/ui/views/controls/menu/menu_host_root_view.cc9
-rw-r--r--chromium/ui/views/controls/menu/menu_image_util.cc5
-rw-r--r--chromium/ui/views/controls/menu/menu_item_view.cc238
-rw-r--r--chromium/ui/views/controls/menu/menu_item_view.h98
-rw-r--r--chromium/ui/views/controls/menu/menu_message_loop.h57
-rw-r--r--chromium/ui/views/controls/menu/menu_message_loop_aura.cc202
-rw-r--r--chromium/ui/views/controls/menu/menu_message_loop_aura.h52
-rw-r--r--chromium/ui/views/controls/menu/menu_message_loop_mac.cc51
-rw-r--r--chromium/ui/views/controls/menu/menu_message_loop_mac.h35
-rw-r--r--chromium/ui/views/controls/menu/menu_message_pump_dispatcher_win.cc95
-rw-r--r--chromium/ui/views/controls/menu/menu_message_pump_dispatcher_win.h36
-rw-r--r--chromium/ui/views/controls/menu/menu_model_adapter.cc32
-rw-r--r--chromium/ui/views/controls/menu/menu_model_adapter.h7
-rw-r--r--chromium/ui/views/controls/menu/menu_model_adapter_unittest.cc11
-rw-r--r--chromium/ui/views/controls/menu/menu_runner.cc32
-rw-r--r--chromium/ui/views/controls/menu/menu_runner.h15
-rw-r--r--chromium/ui/views/controls/menu/menu_runner_handler.h4
-rw-r--r--chromium/ui/views/controls/menu/menu_scroll_view_container.cc43
-rw-r--r--chromium/ui/views/controls/menu/menu_scroll_view_container.h11
-rw-r--r--chromium/ui/views/controls/menu/menu_separator.h6
-rw-r--r--chromium/ui/views/controls/menu/menu_separator_views.cc4
-rw-r--r--chromium/ui/views/controls/menu/menu_separator_win.cc11
-rw-r--r--chromium/ui/views/controls/menu/menu_types.h26
-rw-r--r--chromium/ui/views/controls/menu/menu_win.cc572
-rw-r--r--chromium/ui/views/controls/menu/menu_win.h139
-rw-r--r--chromium/ui/views/controls/menu/native_menu_win.cc40
-rw-r--r--chromium/ui/views/controls/menu/native_menu_win.h4
-rw-r--r--chromium/ui/views/controls/menu/submenu_view.cc68
-rw-r--r--chromium/ui/views/controls/menu/submenu_view.h30
-rw-r--r--chromium/ui/views/controls/message_box_view.cc43
-rw-r--r--chromium/ui/views/controls/message_box_view.h14
-rw-r--r--chromium/ui/views/controls/native/native_view_host.cc20
-rw-r--r--chromium/ui/views/controls/native/native_view_host.h6
-rw-r--r--chromium/ui/views/controls/native/native_view_host_aura.cc7
-rw-r--r--chromium/ui/views/controls/native/native_view_host_aura.h1
-rw-r--r--chromium/ui/views/controls/native/native_view_host_aura_unittest.cc19
-rw-r--r--chromium/ui/views/controls/native/native_view_host_mac.cc18
-rw-r--r--chromium/ui/views/controls/native/native_view_host_unittest.cc15
-rw-r--r--chromium/ui/views/controls/native/native_view_host_win.cc157
-rw-r--r--chromium/ui/views/controls/native/native_view_host_win.h47
-rw-r--r--chromium/ui/views/controls/native/native_view_host_wrapper.h4
-rw-r--r--chromium/ui/views/controls/native_control.cc389
-rw-r--r--chromium/ui/views/controls/native_control.h126
-rw-r--r--chromium/ui/views/controls/native_control_win.cc226
-rw-r--r--chromium/ui/views/controls/native_control_win.h99
-rw-r--r--chromium/ui/views/controls/prefix_delegate.h2
-rw-r--r--chromium/ui/views/controls/prefix_selector.cc25
-rw-r--r--chromium/ui/views/controls/prefix_selector.h15
-rw-r--r--chromium/ui/views/controls/prefix_selector_unittest.cc6
-rw-r--r--chromium/ui/views/controls/progress_bar.cc21
-rw-r--r--chromium/ui/views/controls/progress_bar.h10
-rw-r--r--chromium/ui/views/controls/progress_bar_unittest.cc16
-rw-r--r--chromium/ui/views/controls/resize_area.cc22
-rw-r--r--chromium/ui/views/controls/resize_area.h2
-rw-r--r--chromium/ui/views/controls/scroll_view.cc54
-rw-r--r--chromium/ui/views/controls/scroll_view.h15
-rw-r--r--chromium/ui/views/controls/scroll_view_unittest.cc103
-rw-r--r--chromium/ui/views/controls/scrollbar/base_scroll_bar.cc39
-rw-r--r--chromium/ui/views/controls/scrollbar/base_scroll_bar.h10
-rw-r--r--chromium/ui/views/controls/scrollbar/base_scroll_bar_button.cc5
-rw-r--r--chromium/ui/views/controls/scrollbar/base_scroll_bar_thumb.h2
-rw-r--r--chromium/ui/views/controls/scrollbar/bitmap_scroll_bar.cc309
-rw-r--r--chromium/ui/views/controls/scrollbar/bitmap_scroll_bar.h91
-rw-r--r--chromium/ui/views/controls/scrollbar/kennedy_scroll_bar.cc6
-rw-r--r--chromium/ui/views/controls/scrollbar/kennedy_scroll_bar.h2
-rw-r--r--chromium/ui/views/controls/scrollbar/native_scroll_bar.cc7
-rw-r--r--chromium/ui/views/controls/scrollbar/native_scroll_bar.h2
-rw-r--r--chromium/ui/views/controls/scrollbar/native_scroll_bar_views.cc10
-rw-r--r--chromium/ui/views/controls/scrollbar/native_scroll_bar_views.h2
-rw-r--r--chromium/ui/views/controls/scrollbar/overlay_scroll_bar.cc16
-rw-r--r--chromium/ui/views/controls/scrollbar/overlay_scroll_bar.h2
-rw-r--r--chromium/ui/views/controls/scrollbar/scroll_bar.cc6
-rw-r--r--chromium/ui/views/controls/scrollbar/scroll_bar.h2
-rw-r--r--chromium/ui/views/controls/scrollbar/scrollbar_unittest.cc11
-rw-r--r--chromium/ui/views/controls/separator.cc10
-rw-r--r--chromium/ui/views/controls/separator.h7
-rw-r--r--chromium/ui/views/controls/single_split_view.cc28
-rw-r--r--chromium/ui/views/controls/single_split_view.h8
-rw-r--r--chromium/ui/views/controls/single_split_view_listener.h4
-rw-r--r--chromium/ui/views/controls/single_split_view_unittest.cc58
-rw-r--r--chromium/ui/views/controls/slide_out_view.cc26
-rw-r--r--chromium/ui/views/controls/slider.cc77
-rw-r--r--chromium/ui/views/controls/slider.h26
-rw-r--r--chromium/ui/views/controls/slider_unittest.cc382
-rw-r--r--chromium/ui/views/controls/styled_label.cc147
-rw-r--r--chromium/ui/views/controls/styled_label.h29
-rw-r--r--chromium/ui/views/controls/styled_label_unittest.cc161
-rw-r--r--chromium/ui/views/controls/tabbed_pane/tabbed_pane.cc42
-rw-r--r--chromium/ui/views/controls/tabbed_pane/tabbed_pane.h8
-rw-r--r--chromium/ui/views/controls/tabbed_pane/tabbed_pane_listener.h4
-rw-r--r--chromium/ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc4
-rw-r--r--chromium/ui/views/controls/table/table_grouper.h6
-rw-r--r--chromium/ui/views/controls/table/table_header.cc33
-rw-r--r--chromium/ui/views/controls/table/table_header.h8
-rw-r--r--chromium/ui/views/controls/table/table_utils.cc25
-rw-r--r--chromium/ui/views/controls/table/table_utils.h18
-rw-r--r--chromium/ui/views/controls/table/table_utils_unittest.cc70
-rw-r--r--chromium/ui/views/controls/table/table_view.cc31
-rw-r--r--chromium/ui/views/controls/table/table_view.h10
-rw-r--r--chromium/ui/views/controls/table/table_view_observer.h3
-rw-r--r--chromium/ui/views/controls/table/table_view_unittest.cc23
-rw-r--r--chromium/ui/views/controls/table/test_table_model.cc6
-rw-r--r--chromium/ui/views/controls/table/test_table_model.h2
-rw-r--r--chromium/ui/views/controls/textfield/native_textfield_views.cc1545
-rw-r--r--chromium/ui/views/controls/textfield/native_textfield_views.h345
-rw-r--r--chromium/ui/views/controls/textfield/native_textfield_views_unittest.cc1992
-rw-r--r--chromium/ui/views/controls/textfield/native_textfield_wrapper.h188
-rw-r--r--chromium/ui/views/controls/textfield/textfield.cc1817
-rw-r--r--chromium/ui/views/controls/textfield/textfield.h450
-rw-r--r--chromium/ui/views/controls/textfield/textfield_controller.cc16
-rw-r--r--chromium/ui/views/controls/textfield/textfield_controller.h24
-rw-r--r--chromium/ui/views/controls/textfield/textfield_model.cc771
-rw-r--r--chromium/ui/views/controls/textfield/textfield_model.h292
-rw-r--r--chromium/ui/views/controls/textfield/textfield_model_unittest.cc1482
-rw-r--r--chromium/ui/views/controls/textfield/textfield_test_api.cc30
-rw-r--r--chromium/ui/views/controls/textfield/textfield_test_api.h43
-rw-r--r--chromium/ui/views/controls/textfield/textfield_unittest.cc2012
-rw-r--r--chromium/ui/views/controls/textfield/textfield_views_model.cc799
-rw-r--r--chromium/ui/views/controls/textfield/textfield_views_model.h313
-rw-r--r--chromium/ui/views/controls/textfield/textfield_views_model_unittest.cc1516
-rw-r--r--chromium/ui/views/controls/throbber.cc2
-rw-r--r--chromium/ui/views/controls/throbber.h2
-rw-r--r--chromium/ui/views/controls/tree/tree_view.cc44
-rw-r--r--chromium/ui/views/controls/tree/tree_view.h21
-rw-r--r--chromium/ui/views/controls/tree/tree_view_unittest.cc14
-rw-r--r--chromium/ui/views/controls/webview/unhandled_keyboard_event_handler_win.cc4
-rw-r--r--chromium/ui/views/controls/webview/web_dialog_view.cc44
-rw-r--r--chromium/ui/views/controls/webview/web_dialog_view.h20
-rw-r--r--chromium/ui/views/controls/webview/webview.cc236
-rw-r--r--chromium/ui/views/controls/webview/webview.gyp3
-rw-r--r--chromium/ui/views/controls/webview/webview.h51
-rw-r--r--chromium/ui/views/controls/webview/webview_interactive_uitest.cc82
-rw-r--r--chromium/ui/views/controls/webview/webview_tests.gyp38
-rw-r--r--chromium/ui/views/corewm/DEPS61
-rw-r--r--chromium/ui/views/corewm/base_focus_rules.cc196
-rw-r--r--chromium/ui/views/corewm/base_focus_rules.h47
-rw-r--r--chromium/ui/views/corewm/capture_controller.cc145
-rw-r--r--chromium/ui/views/corewm/capture_controller.h88
-rw-r--r--chromium/ui/views/corewm/capture_controller_unittest.cc82
-rw-r--r--chromium/ui/views/corewm/compound_event_filter.cc279
-rw-r--r--chromium/ui/views/corewm/compound_event_filter.h93
-rw-r--r--chromium/ui/views/corewm/compound_event_filter_unittest.cc205
-rw-r--r--chromium/ui/views/corewm/corewm_switches.cc21
-rw-r--r--chromium/ui/views/corewm/corewm_switches.h27
-rw-r--r--chromium/ui/views/corewm/cursor_height_provider_win.cc146
-rw-r--r--chromium/ui/views/corewm/cursor_height_provider_win.h21
-rw-r--r--chromium/ui/views/corewm/cursor_manager.cc235
-rw-r--r--chromium/ui/views/corewm/cursor_manager.h92
-rw-r--r--chromium/ui/views/corewm/cursor_manager_unittest.cc353
-rw-r--r--chromium/ui/views/corewm/desktop_capture_controller_unittest.cc60
-rw-r--r--chromium/ui/views/corewm/focus_controller.cc365
-rw-r--r--chromium/ui/views/corewm/focus_controller.h130
-rw-r--r--chromium/ui/views/corewm/focus_controller_unittest.cc1110
-rw-r--r--chromium/ui/views/corewm/focus_rules.h68
-rw-r--r--chromium/ui/views/corewm/image_grid.cc308
-rw-r--r--chromium/ui/views/corewm/image_grid.h228
-rw-r--r--chromium/ui/views/corewm/image_grid_unittest.cc341
-rw-r--r--chromium/ui/views/corewm/input_method_event_filter.cc81
-rw-r--r--chromium/ui/views/corewm/input_method_event_filter.h58
-rw-r--r--chromium/ui/views/corewm/input_method_event_filter_unittest.cc91
-rw-r--r--chromium/ui/views/corewm/native_cursor_manager.h67
-rw-r--r--chromium/ui/views/corewm/native_cursor_manager_delegate.h36
-rw-r--r--chromium/ui/views/corewm/shadow.cc195
-rw-r--r--chromium/ui/views/corewm/shadow.h88
-rw-r--r--chromium/ui/views/corewm/shadow_controller.cc273
-rw-r--r--chromium/ui/views/corewm/shadow_controller.h71
-rw-r--r--chromium/ui/views/corewm/shadow_controller_unittest.cc214
-rw-r--r--chromium/ui/views/corewm/shadow_types.cc25
-rw-r--r--chromium/ui/views/corewm/shadow_types.h36
-rw-r--r--chromium/ui/views/corewm/tooltip.h2
-rw-r--r--chromium/ui/views/corewm/tooltip_aura.cc130
-rw-r--r--chromium/ui/views/corewm/tooltip_aura.h22
-rw-r--r--chromium/ui/views/corewm/tooltip_aura_unittest.cc70
-rw-r--r--chromium/ui/views/corewm/tooltip_controller.cc61
-rw-r--r--chromium/ui/views/corewm/tooltip_controller.h10
-rw-r--r--chromium/ui/views/corewm/tooltip_controller_test_helper.cc4
-rw-r--r--chromium/ui/views/corewm/tooltip_controller_test_helper.h10
-rw-r--r--chromium/ui/views/corewm/tooltip_controller_unittest.cc452
-rw-r--r--chromium/ui/views/corewm/tooltip_win.cc30
-rw-r--r--chromium/ui/views/corewm/tooltip_win.h2
-rw-r--r--chromium/ui/views/corewm/transient_window_stacking_client.cc95
-rw-r--r--chromium/ui/views/corewm/transient_window_stacking_client.h32
-rw-r--r--chromium/ui/views/corewm/transient_window_stacking_client_unittest.cc175
-rw-r--r--chromium/ui/views/corewm/visibility_controller.cc87
-rw-r--r--chromium/ui/views/corewm/visibility_controller.h75
-rw-r--r--chromium/ui/views/corewm/visibility_controller_unittest.cc57
-rw-r--r--chromium/ui/views/corewm/window_animations.cc573
-rw-r--r--chromium/ui/views/corewm/window_animations.h101
-rw-r--r--chromium/ui/views/corewm/window_animations_unittest.cc143
-rw-r--r--chromium/ui/views/corewm/window_modality_controller.cc196
-rw-r--r--chromium/ui/views/corewm/window_modality_controller.h73
-rw-r--r--chromium/ui/views/corewm/window_util.cc141
-rw-r--r--chromium/ui/views/corewm/window_util.h53
-rw-r--r--chromium/ui/views/corewm/window_util_unittest.cc117
-rw-r--r--chromium/ui/views/cull_set.cc26
-rw-r--r--chromium/ui/views/cull_set.h47
-rw-r--r--chromium/ui/views/debug_utils.cc6
-rw-r--r--chromium/ui/views/drag_utils.cc43
-rw-r--r--chromium/ui/views/drag_utils_aura.cc27
-rw-r--r--chromium/ui/views/event_utils.h31
-rw-r--r--chromium/ui/views/event_utils_aura.cc60
-rw-r--r--chromium/ui/views/event_utils_win.cc64
-rw-r--r--chromium/ui/views/examples/DEPS2
-rw-r--r--chromium/ui/views/examples/bubble_example.cc15
-rw-r--r--chromium/ui/views/examples/bubble_example.h7
-rw-r--r--chromium/ui/views/examples/button_example.cc17
-rw-r--r--chromium/ui/views/examples/button_example.h10
-rw-r--r--chromium/ui/views/examples/checkbox_example.cc2
-rw-r--r--chromium/ui/views/examples/checkbox_example.h5
-rw-r--r--chromium/ui/views/examples/combobox_example.cc8
-rw-r--r--chromium/ui/views/examples/combobox_example.h18
-rw-r--r--chromium/ui/views/examples/content_client/DEPS4
-rw-r--r--chromium/ui/views/examples/content_client/examples_browser_main_parts.cc95
-rw-r--r--chromium/ui/views/examples/content_client/examples_browser_main_parts.h57
-rw-r--r--chromium/ui/views/examples/content_client/examples_content_browser_client.cc36
-rw-r--r--chromium/ui/views/examples/content_client/examples_content_browser_client.h44
-rw-r--r--chromium/ui/views/examples/content_client/examples_main.cc25
-rw-r--r--chromium/ui/views/examples/content_client/examples_main_delegate.cc80
-rw-r--r--chromium/ui/views/examples/content_client/examples_main_delegate.h43
-rw-r--r--chromium/ui/views/examples/double_split_view_example.cc6
-rw-r--r--chromium/ui/views/examples/double_split_view_example.h7
-rw-r--r--chromium/ui/views/examples/example_base.cc3
-rw-r--r--chromium/ui/views/examples/example_base.h5
-rw-r--r--chromium/ui/views/examples/example_combobox_model.cc4
-rw-r--r--chromium/ui/views/examples/example_combobox_model.h7
-rw-r--r--chromium/ui/views/examples/examples.gyp187
-rw-r--r--chromium/ui/views/examples/examples_main.cc84
-rw-r--r--chromium/ui/views/examples/examples_window.cc182
-rw-r--r--chromium/ui/views/examples/examples_window.h18
-rw-r--r--chromium/ui/views/examples/examples_window_with_content.cc210
-rw-r--r--chromium/ui/views/examples/examples_window_with_content.h6
-rw-r--r--chromium/ui/views/examples/examples_with_content_main_exe.cc49
-rw-r--r--chromium/ui/views/examples/label_example.cc43
-rw-r--r--chromium/ui/views/examples/label_example.h7
-rw-r--r--chromium/ui/views/examples/link_example.cc2
-rw-r--r--chromium/ui/views/examples/link_example.h10
-rw-r--r--chromium/ui/views/examples/menu_example.cc30
-rw-r--r--chromium/ui/views/examples/menu_example.h7
-rw-r--r--chromium/ui/views/examples/message_box_example.cc2
-rw-r--r--chromium/ui/views/examples/message_box_example.h10
-rw-r--r--chromium/ui/views/examples/multiline_example.cc56
-rw-r--r--chromium/ui/views/examples/multiline_example.h14
-rw-r--r--chromium/ui/views/examples/progress_bar_example.cc4
-rw-r--r--chromium/ui/views/examples/progress_bar_example.h10
-rw-r--r--chromium/ui/views/examples/radio_button_example.cc6
-rw-r--r--chromium/ui/views/examples/radio_button_example.h10
-rw-r--r--chromium/ui/views/examples/scroll_view_example.cc4
-rw-r--r--chromium/ui/views/examples/scroll_view_example.h10
-rw-r--r--chromium/ui/views/examples/single_split_view_example.cc10
-rw-r--r--chromium/ui/views/examples/single_split_view_example.h11
-rw-r--r--chromium/ui/views/examples/slider_example.cc2
-rw-r--r--chromium/ui/views/examples/slider_example.h10
-rw-r--r--chromium/ui/views/examples/tabbed_pane_example.cc4
-rw-r--r--chromium/ui/views/examples/tabbed_pane_example.h9
-rw-r--r--chromium/ui/views/examples/table_example.cc14
-rw-r--r--chromium/ui/views/examples/table_example.h15
-rw-r--r--chromium/ui/views/examples/text_example.cc218
-rw-r--r--chromium/ui/views/examples/text_example.h17
-rw-r--r--chromium/ui/views/examples/textfield_example.cc14
-rw-r--r--chromium/ui/views/examples/textfield_example.h12
-rw-r--r--chromium/ui/views/examples/throbber_example.cc2
-rw-r--r--chromium/ui/views/examples/throbber_example.h7
-rw-r--r--chromium/ui/views/examples/tree_view_example.cc12
-rw-r--r--chromium/ui/views/examples/tree_view_example.h14
-rw-r--r--chromium/ui/views/examples/webview_example.cc3
-rw-r--r--chromium/ui/views/examples/webview_example.h5
-rw-r--r--chromium/ui/views/examples/widget_example.cc8
-rw-r--r--chromium/ui/views/examples/widget_example.h10
-rw-r--r--chromium/ui/views/focus/accelerator_handler.h46
-rw-r--r--chromium/ui/views/focus/accelerator_handler_aura.cc26
-rw-r--r--chromium/ui/views/focus/accelerator_handler_win.cc55
-rw-r--r--chromium/ui/views/focus/focus_manager.cc70
-rw-r--r--chromium/ui/views/focus/focus_manager.h11
-rw-r--r--chromium/ui/views/focus/focus_manager_test.cc18
-rw-r--r--chromium/ui/views/focus/focus_manager_test.h9
-rw-r--r--chromium/ui/views/focus/focus_manager_unittest.cc131
-rw-r--r--chromium/ui/views/focus/focus_manager_unittest_win.cc281
-rw-r--r--chromium/ui/views/focus/focus_traversal_unittest.cc38
-rw-r--r--chromium/ui/views/focus/view_storage.h2
-rw-r--r--chromium/ui/views/ime/OWNERS6
-rw-r--r--chromium/ui/views/ime/input_method.h9
-rw-r--r--chromium/ui/views/ime/input_method_bridge.cc27
-rw-r--r--chromium/ui/views/ime/input_method_bridge.h10
-rw-r--r--chromium/ui/views/ime/mock_input_method.cc21
-rw-r--r--chromium/ui/views/ime/mock_input_method.h8
-rw-r--r--chromium/ui/views/ime/null_input_method.cc62
-rw-r--r--chromium/ui/views/ime/null_input_method.h50
-rw-r--r--chromium/ui/views/layout/box_layout.cc93
-rw-r--r--chromium/ui/views/layout/box_layout.h52
-rw-r--r--chromium/ui/views/layout/box_layout_unittest.cc114
-rw-r--r--chromium/ui/views/layout/fill_layout.cc4
-rw-r--r--chromium/ui/views/layout/fill_layout.h5
-rw-r--r--chromium/ui/views/layout/grid_layout.cc52
-rw-r--r--chromium/ui/views/layout/grid_layout.h28
-rw-r--r--chromium/ui/views/layout/grid_layout_unittest.cc33
-rw-r--r--chromium/ui/views/layout/layout_manager.cc3
-rw-r--r--chromium/ui/views/layout/layout_manager.h4
-rw-r--r--chromium/ui/views/linux_ui/linux_ui.cc3
-rw-r--r--chromium/ui/views/linux_ui/linux_ui.gyp2
-rw-r--r--chromium/ui/views/linux_ui/linux_ui.h52
-rw-r--r--chromium/ui/views/linux_ui/status_icon_linux.h2
-rw-r--r--chromium/ui/views/linux_ui/window_button_order_provider.cc83
-rw-r--r--chromium/ui/views/masked_view_targeter.cc46
-rw-r--r--chromium/ui/views/masked_view_targeter.h46
-rw-r--r--chromium/ui/views/metrics_aura.cc1
-rw-r--r--chromium/ui/views/metrics_mac.cc25
-rw-r--r--chromium/ui/views/metrics_win.cc22
-rw-r--r--chromium/ui/views/mouse_watcher.cc213
-rw-r--r--chromium/ui/views/mouse_watcher_aura.cc125
-rw-r--r--chromium/ui/views/native_cursor.h21
-rw-r--r--chromium/ui/views/native_cursor_aura.cc31
-rw-r--r--chromium/ui/views/native_cursor_mac.mm39
-rw-r--r--chromium/ui/views/painter.cc100
-rw-r--r--chromium/ui/views/painter.h6
-rw-r--r--chromium/ui/views/run_all_unittests.cc13
-rw-r--r--chromium/ui/views/touchui/touch_editing_menu.cc44
-rw-r--r--chromium/ui/views/touchui/touch_editing_menu.h8
-rw-r--r--chromium/ui/views/touchui/touch_selection_controller_impl.cc207
-rw-r--r--chromium/ui/views/touchui/touch_selection_controller_impl.h37
-rw-r--r--chromium/ui/views/touchui/touch_selection_controller_impl_unittest.cc454
-rw-r--r--chromium/ui/views/view.cc477
-rw-r--r--chromium/ui/views/view.h123
-rw-r--r--chromium/ui/views/view_aura.cc33
-rw-r--r--chromium/ui/views/view_constants_aura.cc2
-rw-r--r--chromium/ui/views/view_constants_aura.h4
-rw-r--r--chromium/ui/views/view_model.cc5
-rw-r--r--chromium/ui/views/view_targeter.cc79
-rw-r--r--chromium/ui/views/view_targeter.h51
-rw-r--r--chromium/ui/views/view_targeter_unittest.cc386
-rw-r--r--chromium/ui/views/view_unittest.cc979
-rw-r--r--chromium/ui/views/view_unittest_aura.cc160
-rw-r--r--chromium/ui/views/view_win.cc28
-rw-r--r--chromium/ui/views/views.gyp678
-rw-r--r--chromium/ui/views/views_delegate.cc81
-rw-r--r--chromium/ui/views/views_delegate.h87
-rw-r--r--chromium/ui/views/views_switches.cc9
-rw-r--r--chromium/ui/views/views_switches.h4
-rw-r--r--chromium/ui/views/views_touch_selection_controller_factory.h25
-rw-r--r--chromium/ui/views/views_touch_selection_controller_factory_aura.cc22
-rw-r--r--chromium/ui/views/views_touch_selection_controller_factory_mac.cc17
-rw-r--r--chromium/ui/views/widget/aero_tooltip_manager.cc115
-rw-r--r--chromium/ui/views/widget/aero_tooltip_manager.h59
-rw-r--r--chromium/ui/views/widget/child_window_message_processor.cc28
-rw-r--r--chromium/ui/views/widget/child_window_message_processor.h47
-rw-r--r--chromium/ui/views/widget/desktop_aura/OWNERS5
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_capture_client.cc8
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_cursor_loader_updater.h2
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_cursor_loader_updater_auralinux.cc6
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_cursor_loader_updater_auralinux.h2
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_dispatcher_client.cc37
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_dispatcher_client.h10
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc556
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h101
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc679
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc3
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h3
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_drop_target_win.cc8
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_drop_target_win.h2
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_factory_ozone.h11
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_focus_rules.cc14
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_focus_rules.h7
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_focus_rules_unittest.cc58
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc51
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_native_cursor_manager.h48
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc494
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_native_widget_aura.h117
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc306
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_root_window_host.h158
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_root_window_host_observer_x11.h29
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_root_window_host_ozone.cc20
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc992
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_root_window_host_win.h278
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_root_window_host_win_unittest.cc55
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc1544
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_root_window_host_x11.h291
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_screen.h2
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_screen_ozone.cc6
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_screen_position_client.cc50
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_screen_position_client.h7
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_screen_position_client_unittest.cc16
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_screen_win.cc10
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_screen_x11.cc158
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_screen_x11.h9
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc272
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_window_tree_host.h163
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_observer_x11.h29
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_ozone.cc20
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc960
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h276
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc1838
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h345
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc448
-rw-r--r--chromium/ui/views/widget/desktop_aura/x11_desktop_handler.cc116
-rw-r--r--chromium/ui/views/widget/desktop_aura/x11_desktop_handler.h27
-rw-r--r--chromium/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc53
-rw-r--r--chromium/ui/views/widget/desktop_aura/x11_desktop_window_move_client.h19
-rw-r--r--chromium/ui/views/widget/desktop_aura/x11_scoped_capture.cc31
-rw-r--r--chromium/ui/views/widget/desktop_aura/x11_scoped_capture.h29
-rw-r--r--chromium/ui/views/widget/desktop_aura/x11_topmost_window_finder.cc97
-rw-r--r--chromium/ui/views/widget/desktop_aura/x11_topmost_window_finder.h53
-rw-r--r--chromium/ui/views/widget/desktop_aura/x11_topmost_window_finder_unittest.cc389
-rw-r--r--chromium/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc244
-rw-r--r--chromium/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h45
-rw-r--r--chromium/ui/views/widget/desktop_aura/x11_window_event_filter.cc162
-rw-r--r--chromium/ui/views/widget/desktop_aura/x11_window_event_filter.h29
-rw-r--r--chromium/ui/views/widget/drop_target_win.cc63
-rw-r--r--chromium/ui/views/widget/drop_target_win.h55
-rw-r--r--chromium/ui/views/widget/monitor_win.cc19
-rw-r--r--chromium/ui/views/widget/monitor_win.h10
-rw-r--r--chromium/ui/views/widget/native_widget.h7
-rw-r--r--chromium/ui/views/widget/native_widget_aura.cc228
-rw-r--r--chromium/ui/views/widget/native_widget_aura.h34
-rw-r--r--chromium/ui/views/widget/native_widget_aura_unittest.cc249
-rw-r--r--chromium/ui/views/widget/native_widget_delegate.h13
-rw-r--r--chromium/ui/views/widget/native_widget_mac.h117
-rw-r--r--chromium/ui/views/widget/native_widget_mac.mm448
-rw-r--r--chromium/ui/views/widget/native_widget_private.h19
-rw-r--r--chromium/ui/views/widget/native_widget_unittest.cc1
-rw-r--r--chromium/ui/views/widget/native_widget_win.cc1068
-rw-r--r--chromium/ui/views/widget/native_widget_win.h278
-rw-r--r--chromium/ui/views/widget/native_widget_win_unittest.cc83
-rw-r--r--chromium/ui/views/widget/root_view.cc624
-rw-r--r--chromium/ui/views/widget/root_view.h46
-rw-r--r--chromium/ui/views/widget/root_view_test_helper.h33
-rw-r--r--chromium/ui/views/widget/root_view_unittest.cc198
-rw-r--r--chromium/ui/views/widget/tooltip_manager_aura.cc16
-rw-r--r--chromium/ui/views/widget/tooltip_manager_aura.h2
-rw-r--r--chromium/ui/views/widget/tooltip_manager_win.cc357
-rw-r--r--chromium/ui/views/widget/tooltip_manager_win.h135
-rw-r--r--chromium/ui/views/widget/widget.cc298
-rw-r--r--chromium/ui/views/widget/widget.h129
-rw-r--r--chromium/ui/views/widget/widget_aura_utils.cc16
-rw-r--r--chromium/ui/views/widget/widget_aura_utils.h4
-rw-r--r--chromium/ui/views/widget/widget_delegate.cc16
-rw-r--r--chromium/ui/views/widget/widget_delegate.h15
-rw-r--r--chromium/ui/views/widget/widget_hwnd_utils.cc14
-rw-r--r--chromium/ui/views/widget/widget_hwnd_utils.h3
-rw-r--r--chromium/ui/views/widget/widget_interactive_uitest.cc288
-rw-r--r--chromium/ui/views/widget/widget_observer.h1
-rw-r--r--chromium/ui/views/widget/widget_removals_observer.h30
-rw-r--r--chromium/ui/views/widget/widget_unittest.cc826
-rw-r--r--chromium/ui/views/widget/window_reorderer_unittest.cc2
-rw-r--r--chromium/ui/views/win/DEPS2
-rw-r--r--chromium/ui/views/win/appbar.cc88
-rw-r--r--chromium/ui/views/win/appbar.h70
-rw-r--r--chromium/ui/views/win/fullscreen_handler.cc4
-rw-r--r--chromium/ui/views/win/hwnd_message_handler.cc774
-rw-r--r--chromium/ui/views/win/hwnd_message_handler.h257
-rw-r--r--chromium/ui/views/win/hwnd_message_handler_delegate.h16
-rw-r--r--chromium/ui/views/win/hwnd_util_aurawin.cc13
-rw-r--r--chromium/ui/views/win/hwnd_util_win.cc39
-rw-r--r--chromium/ui/views/window/client_view.cc12
-rw-r--r--chromium/ui/views/window/client_view.h8
-rw-r--r--chromium/ui/views/window/custom_frame_view.cc245
-rw-r--r--chromium/ui/views/window/custom_frame_view.h33
-rw-r--r--chromium/ui/views/window/custom_frame_view_unittest.cc252
-rw-r--r--chromium/ui/views/window/dialog_client_view.cc61
-rw-r--r--chromium/ui/views/window/dialog_client_view.h3
-rw-r--r--chromium/ui/views/window/dialog_delegate.cc68
-rw-r--r--chromium/ui/views/window/dialog_delegate.h25
-rw-r--r--chromium/ui/views/window/dialog_delegate_unittest.cc40
-rw-r--r--chromium/ui/views/window/frame_background.cc39
-rw-r--r--chromium/ui/views/window/frame_background.h15
-rw-r--r--chromium/ui/views/window/native_frame_view.cc37
-rw-r--r--chromium/ui/views/window/native_frame_view.h9
-rw-r--r--chromium/ui/views/window/non_client_view.cc54
-rw-r--r--chromium/ui/views/window/non_client_view.h40
-rw-r--r--chromium/ui/views/window/window_button_order_provider.cc41
-rw-r--r--chromium/ui/views/window/window_button_order_provider.h56
-rw-r--r--chromium/ui/views_content_client/DEPS9
-rw-r--r--chromium/ui/views_content_client/README.chromium3
-rw-r--r--chromium/ui/views_content_client/views_content_browser_client.cc39
-rw-r--r--chromium/ui/views_content_client/views_content_browser_client.h43
-rw-r--r--chromium/ui/views_content_client/views_content_client.cc41
-rw-r--r--chromium/ui/views_content_client/views_content_client.gyp60
-rw-r--r--chromium/ui/views_content_client/views_content_client.h83
-rw-r--r--chromium/ui/views_content_client/views_content_client_export.h32
-rw-r--r--chromium/ui/views_content_client/views_content_client_main_parts.cc40
-rw-r--r--chromium/ui/views_content_client/views_content_client_main_parts.h64
-rw-r--r--chromium/ui/views_content_client/views_content_client_main_parts_aura.cc33
-rw-r--r--chromium/ui/views_content_client/views_content_client_main_parts_aura.h37
-rw-r--r--chromium/ui/views_content_client/views_content_client_main_parts_chromeos.cc102
-rw-r--r--chromium/ui/views_content_client/views_content_client_main_parts_desktop_aura.cc57
-rw-r--r--chromium/ui/views_content_client/views_content_client_main_parts_mac.mm55
-rw-r--r--chromium/ui/views_content_client/views_content_main_delegate.cc79
-rw-r--r--chromium/ui/views_content_client/views_content_main_delegate.h38
-rw-r--r--chromium/ui/web_dialogs/DEPS1
-rw-r--r--chromium/ui/web_dialogs/web_dialog_delegate.cc4
-rw-r--r--chromium/ui/web_dialogs/web_dialog_delegate.h6
-rw-r--r--chromium/ui/web_dialogs/web_dialog_ui.cc4
-rw-r--r--chromium/ui/web_dialogs/web_dialog_web_contents_delegate.cc10
-rw-r--r--chromium/ui/web_dialogs/web_dialog_web_contents_delegate.h4
-rw-r--r--chromium/ui/webui/DEPS2
-rw-r--r--chromium/ui/webui/OWNERS3
-rw-r--r--chromium/ui/webui/resources/BUILD.gn10
-rw-r--r--chromium/ui/webui/resources/css/bubble_button.css3
-rw-r--r--chromium/ui/webui/resources/css/chrome_shared.css2
-rw-r--r--chromium/ui/webui/resources/css/overlay.css2
-rw-r--r--chromium/ui/webui/resources/css/table.css6
-rw-r--r--chromium/ui/webui/resources/images/1.5x/laptop.pngbin266 -> 0 bytes
-rw-r--r--chromium/ui/webui/resources/images/1.5x/phone.pngbin259 -> 0 bytes
-rw-r--r--chromium/ui/webui/resources/images/1.5x/tablet.pngbin270 -> 0 bytes
-rw-r--r--chromium/ui/webui/resources/images/2x/apps/button_butter_bar_close_pressed.pngbin159 -> 158 bytes
-rw-r--r--chromium/ui/webui/resources/images/2x/laptop.pngbin346 -> 0 bytes
-rw-r--r--chromium/ui/webui/resources/images/2x/phone.pngbin317 -> 0 bytes
-rw-r--r--chromium/ui/webui/resources/images/2x/tablet.pngbin303 -> 0 bytes
-rw-r--r--chromium/ui/webui/resources/images/apps/button_butter_bar_close_hover.pngbin113 -> 112 bytes
-rw-r--r--chromium/ui/webui/resources/images/gear.pngbin313 -> 311 bytes
-rw-r--r--chromium/ui/webui/resources/images/laptop.pngbin219 -> 0 bytes
-rw-r--r--chromium/ui/webui/resources/images/phone.pngbin199 -> 0 bytes
-rw-r--r--chromium/ui/webui/resources/images/plus.pngbin235 -> 234 bytes
-rw-r--r--chromium/ui/webui/resources/images/tablet.pngbin204 -> 0 bytes
-rw-r--r--chromium/ui/webui/resources/js/cr/promise.js214
-rw-r--r--chromium/ui/webui/resources/js/cr/ui/array_data_model.js45
-rw-r--r--chromium/ui/webui/resources/js/cr/ui/context_menu_handler.js7
-rw-r--r--chromium/ui/webui/resources/js/cr/ui/dialogs.js10
-rw-r--r--chromium/ui/webui/resources/js/cr/ui/focus_manager.js2
-rw-r--r--chromium/ui/webui/resources/js/cr/ui/list.js31
-rw-r--r--chromium/ui/webui/resources/js/cr/ui/overlay.js3
-rw-r--r--chromium/ui/webui/resources/js/cr/ui/tree.js20
-rw-r--r--chromium/ui/webui/resources/js/util.js62
-rw-r--r--chromium/ui/webui/resources/webui_resources.grd14
-rw-r--r--chromium/ui/wm/DEPS5
-rw-r--r--chromium/ui/wm/core/DEPS16
-rw-r--r--chromium/ui/wm/core/accelerator_delegate.h33
-rw-r--r--chromium/ui/wm/core/accelerator_filter.cc80
-rw-r--r--chromium/ui/wm/core/accelerator_filter.h40
-rw-r--r--chromium/ui/wm/core/base_focus_rules.cc195
-rw-r--r--chromium/ui/wm/core/base_focus_rules.h45
-rw-r--r--chromium/ui/wm/core/capture_controller.cc145
-rw-r--r--chromium/ui/wm/core/capture_controller.h86
-rw-r--r--chromium/ui/wm/core/compound_event_filter.cc263
-rw-r--r--chromium/ui/wm/core/compound_event_filter.h93
-rw-r--r--chromium/ui/wm/core/compound_event_filter_unittest.cc250
-rw-r--r--chromium/ui/wm/core/cursor_manager.cc217
-rw-r--r--chromium/ui/wm/core/cursor_manager.h93
-rw-r--r--chromium/ui/wm/core/cursor_manager_unittest.cc330
-rw-r--r--chromium/ui/wm/core/default_activation_client.cc157
-rw-r--r--chromium/ui/wm/core/default_activation_client.h73
-rw-r--r--chromium/ui/wm/core/easy_resize_window_targeter.cc62
-rw-r--r--chromium/ui/wm/core/easy_resize_window_targeter.h53
-rw-r--r--chromium/ui/wm/core/focus_controller.cc368
-rw-r--r--chromium/ui/wm/core/focus_controller.h128
-rw-r--r--chromium/ui/wm/core/focus_controller_unittest.cc1285
-rw-r--r--chromium/ui/wm/core/focus_rules.h66
-rw-r--r--chromium/ui/wm/core/image_grid.cc338
-rw-r--r--chromium/ui/wm/core/image_grid.h221
-rw-r--r--chromium/ui/wm/core/image_grid_unittest.cc340
-rw-r--r--chromium/ui/wm/core/input_method_event_filter.cc105
-rw-r--r--chromium/ui/wm/core/input_method_event_filter.h50
-rw-r--r--chromium/ui/wm/core/input_method_event_filter_unittest.cc143
-rw-r--r--chromium/ui/wm/core/masked_window_targeter.cc43
-rw-r--r--chromium/ui/wm/core/masked_window_targeter.h40
-rw-r--r--chromium/ui/wm/core/native_cursor_manager.h61
-rw-r--r--chromium/ui/wm/core/native_cursor_manager_delegate.h33
-rw-r--r--chromium/ui/wm/core/nested_accelerator_controller.cc57
-rw-r--r--chromium/ui/wm/core/nested_accelerator_controller.h47
-rw-r--r--chromium/ui/wm/core/nested_accelerator_controller_unittest.cc205
-rw-r--r--chromium/ui/wm/core/nested_accelerator_delegate.h34
-rw-r--r--chromium/ui/wm/core/nested_accelerator_dispatcher.cc21
-rw-r--r--chromium/ui/wm/core/nested_accelerator_dispatcher.h55
-rw-r--r--chromium/ui/wm/core/nested_accelerator_dispatcher_linux.cc104
-rw-r--r--chromium/ui/wm/core/nested_accelerator_dispatcher_win.cc74
-rw-r--r--chromium/ui/wm/core/shadow.cc193
-rw-r--r--chromium/ui/wm/core/shadow.h86
-rw-r--r--chromium/ui/wm/core/shadow_controller.cc272
-rw-r--r--chromium/ui/wm/core/shadow_controller.h69
-rw-r--r--chromium/ui/wm/core/shadow_controller_unittest.cc219
-rw-r--r--chromium/ui/wm/core/shadow_types.cc23
-rw-r--r--chromium/ui/wm/core/shadow_types.h34
-rw-r--r--chromium/ui/wm/core/transient_window_controller.cc40
-rw-r--r--chromium/ui/wm/core/transient_window_controller.h36
-rw-r--r--chromium/ui/wm/core/transient_window_manager.cc182
-rw-r--r--chromium/ui/wm/core/transient_window_manager.h91
-rw-r--r--chromium/ui/wm/core/transient_window_manager_unittest.cc666
-rw-r--r--chromium/ui/wm/core/transient_window_observer.h32
-rw-r--r--chromium/ui/wm/core/transient_window_stacking_client.cc131
-rw-r--r--chromium/ui/wm/core/transient_window_stacking_client.h37
-rw-r--r--chromium/ui/wm/core/transient_window_stacking_client_unittest.cc215
-rw-r--r--chromium/ui/wm/core/user_activity_detector.cc112
-rw-r--r--chromium/ui/wm/core/user_activity_detector.h81
-rw-r--r--chromium/ui/wm/core/user_activity_detector_unittest.cc200
-rw-r--r--chromium/ui/wm/core/user_activity_observer.h35
-rw-r--r--chromium/ui/wm/core/visibility_controller.cc89
-rw-r--r--chromium/ui/wm/core/visibility_controller.h74
-rw-r--r--chromium/ui/wm/core/visibility_controller_unittest.cc56
-rw-r--r--chromium/ui/wm/core/window_animations.cc658
-rw-r--r--chromium/ui/wm/core/window_animations.h117
-rw-r--r--chromium/ui/wm/core/window_animations_unittest.cc291
-rw-r--r--chromium/ui/wm/core/window_modality_controller.cc201
-rw-r--r--chromium/ui/wm/core/window_modality_controller.h71
-rw-r--r--chromium/ui/wm/core/window_util.cc129
-rw-r--r--chromium/ui/wm/core/window_util.h67
-rw-r--r--chromium/ui/wm/core/window_util_unittest.cc52
-rw-r--r--chromium/ui/wm/core/wm_core_switches.cc16
-rw-r--r--chromium/ui/wm/core/wm_core_switches.h24
-rw-r--r--chromium/ui/wm/core/wm_state.cc30
-rw-r--r--chromium/ui/wm/core/wm_state.h32
-rw-r--r--chromium/ui/wm/public/DEPS9
-rw-r--r--chromium/ui/wm/public/activation_change_observer.cc29
-rw-r--r--chromium/ui/wm/public/activation_change_observer.h45
-rw-r--r--chromium/ui/wm/public/activation_client.cc38
-rw-r--r--chromium/ui/wm/public/activation_client.h77
-rw-r--r--chromium/ui/wm/public/activation_delegate.cc27
-rw-r--r--chromium/ui/wm/public/activation_delegate.h37
-rw-r--r--chromium/ui/wm/public/animation_host.cc28
-rw-r--r--chromium/ui/wm/public/animation_host.h48
-rw-r--r--chromium/ui/wm/public/dispatcher_client.cc52
-rw-r--r--chromium/ui/wm/public/dispatcher_client.h59
-rw-r--r--chromium/ui/wm/public/drag_drop_client.cc31
-rw-r--r--chromium/ui/wm/public/drag_drop_client.h62
-rw-r--r--chromium/ui/wm/public/drag_drop_delegate.cc27
-rw-r--r--chromium/ui/wm/public/drag_drop_delegate.h51
-rw-r--r--chromium/ui/wm/public/scoped_tooltip_disabler.cc43
-rw-r--r--chromium/ui/wm/public/scoped_tooltip_disabler.h39
-rw-r--r--chromium/ui/wm/public/tooltip_client.cc52
-rw-r--r--chromium/ui/wm/public/tooltip_client.h51
-rw-r--r--chromium/ui/wm/public/transient_window_client.cc25
-rw-r--r--chromium/ui/wm/public/transient_window_client.h47
-rw-r--r--chromium/ui/wm/public/window_move_client.cc28
-rw-r--r--chromium/ui/wm/public/window_move_client.h56
-rw-r--r--chromium/ui/wm/public/window_types.h36
-rw-r--r--chromium/ui/wm/wm.gyp125
-rw-r--r--chromium/ui/wm/wm_export.h32
-rw-r--r--chromium/url/BUILD.gn134
-rw-r--r--chromium/url/DEPS13
-rw-r--r--chromium/url/config.gni8
-rw-r--r--chromium/url/gurl.cc113
-rw-r--r--chromium/url/gurl.h42
-rw-r--r--chromium/url/gurl_unittest.cc116
-rw-r--r--chromium/url/origin.cc19
-rw-r--r--chromium/url/origin.h33
-rw-r--r--chromium/url/origin_unittest.cc36
-rw-r--r--chromium/url/third_party/mozilla/url_parse.cc16
-rw-r--r--chromium/url/third_party/mozilla/url_parse.h16
-rw-r--r--chromium/url/url.gyp108
-rw-r--r--chromium/url/url_canon.h248
-rw-r--r--chromium/url/url_canon_etc.cc85
-rw-r--r--chromium/url/url_canon_filesystemurl.cc54
-rw-r--r--chromium/url/url_canon_fileurl.cc55
-rw-r--r--chromium/url/url_canon_host.cc34
-rw-r--r--chromium/url/url_canon_icu.cc47
-rw-r--r--chromium/url/url_canon_icu.h4
-rw-r--r--chromium/url/url_canon_icu_alternatives_android.cc41
-rw-r--r--chromium/url/url_canon_icu_alternatives_android.h18
-rw-r--r--chromium/url/url_canon_icu_unittest.cc167
-rw-r--r--chromium/url/url_canon_internal.cc59
-rw-r--r--chromium/url/url_canon_internal.h20
-rw-r--r--chromium/url/url_canon_internal_file.h14
-rw-r--r--chromium/url/url_canon_ip.cc79
-rw-r--r--chromium/url/url_canon_ip.h34
-rw-r--r--chromium/url/url_canon_mailtourl.cc46
-rw-r--r--chromium/url/url_canon_path.cc28
-rw-r--r--chromium/url/url_canon_pathurl.cc34
-rw-r--r--chromium/url/url_canon_query.cc28
-rw-r--r--chromium/url/url_canon_relative.cc134
-rw-r--r--chromium/url/url_canon_stdstring.cc4
-rw-r--r--chromium/url/url_canon_stdstring.h31
-rw-r--r--chromium/url/url_canon_stdurl.cc45
-rw-r--r--chromium/url/url_canon_unittest.cc1179
-rw-r--r--chromium/url/url_constants.cc27
-rw-r--r--chromium/url/url_constants.h33
-rw-r--r--chromium/url/url_file.h4
-rw-r--r--chromium/url/url_nacl.gyp37
-rw-r--r--chromium/url/url_parse_file.cc4
-rw-r--r--chromium/url/url_parse_internal.h4
-rw-r--r--chromium/url/url_parse_unittest.cc66
-rw-r--r--chromium/url/url_srcs.gypi44
-rw-r--r--chromium/url/url_test_utils.h21
-rw-r--r--chromium/url/url_util.cc285
-rw-r--r--chromium/url/url_util.h90
-rw-r--r--chromium/url/url_util_internal.h12
-rw-r--r--chromium/url/url_util_unittest.cc149
-rw-r--r--chromium/v8/.clang-format1
-rw-r--r--chromium/v8/AUTHORS11
-rw-r--r--chromium/v8/BUILD.gn1068
-rw-r--r--chromium/v8/ChangeLog1292
-rw-r--r--chromium/v8/DEPS30
-rw-r--r--chromium/v8/LICENSE2
-rw-r--r--chromium/v8/Makefile134
-rw-r--r--chromium/v8/Makefile.android81
-rw-r--r--chromium/v8/Makefile.nacl11
-rw-r--r--chromium/v8/OWNERS5
-rw-r--r--chromium/v8/PRESUBMIT.py74
-rw-r--r--chromium/v8/benchmarks/v8.json16
-rw-r--r--chromium/v8/build/all.gyp1
-rw-r--r--chromium/v8/build/android.gypi55
-rw-r--r--chromium/v8/build/features.gypi8
-rwxr-xr-xchromium/v8/build/gyp_v826
-rw-r--r--chromium/v8/build/gyp_v8.py41
-rw-r--r--chromium/v8/build/standalone.gypi75
-rw-r--r--chromium/v8/build/toolchain.gypi437
-rw-r--r--chromium/v8/codereview.settings7
-rw-r--r--[-rwxr-xr-x]chromium/v8/include/v8-debug.h109
-rw-r--r--chromium/v8/include/v8-platform.h27
-rw-r--r--chromium/v8/include/v8-profiler.h210
-rw-r--r--chromium/v8/include/v8-testing.h27
-rw-r--r--chromium/v8/include/v8-util.h487
-rw-r--r--chromium/v8/include/v8.h1383
-rw-r--r--chromium/v8/include/v8config.h36
-rw-r--r--chromium/v8/include/v8stdint.h27
-rw-r--r--chromium/v8/samples/lineprocessor.cc90
-rw-r--r--chromium/v8/samples/process.cc37
-rw-r--r--chromium/v8/samples/shell.cc34
-rw-r--r--chromium/v8/src/DEPS6
-rw-r--r--chromium/v8/src/accessors.cc1378
-rw-r--r--chromium/v8/src/accessors.h165
-rw-r--r--chromium/v8/src/allocation-site-scopes.cc31
-rw-r--r--chromium/v8/src/allocation-site-scopes.h37
-rw-r--r--chromium/v8/src/allocation-tracker.cc233
-rw-r--r--chromium/v8/src/allocation-tracker.h89
-rw-r--r--chromium/v8/src/allocation.cc74
-rw-r--r--chromium/v8/src/allocation.h32
-rw-r--r--chromium/v8/src/api.cc3229
-rw-r--r--chromium/v8/src/api.h99
-rw-r--r--chromium/v8/src/apinatives.js59
-rw-r--r--chromium/v8/src/apiutils.h49
-rw-r--r--chromium/v8/src/arguments.cc37
-rw-r--r--chromium/v8/src/arguments.h59
-rw-r--r--chromium/v8/src/arm/OWNERS1
-rw-r--r--chromium/v8/src/arm/assembler-arm-inl.h157
-rw-r--r--chromium/v8/src/arm/assembler-arm.cc667
-rw-r--r--chromium/v8/src/arm/assembler-arm.h211
-rw-r--r--chromium/v8/src/arm/builtins-arm.cc419
-rw-r--r--chromium/v8/src/arm/code-stubs-arm.cc2763
-rw-r--r--chromium/v8/src/arm/code-stubs-arm.h158
-rw-r--r--chromium/v8/src/arm/codegen-arm.cc161
-rw-r--r--chromium/v8/src/arm/codegen-arm.h72
-rw-r--r--chromium/v8/src/arm/constants-arm.cc35
-rw-r--r--chromium/v8/src/arm/constants-arm.h35
-rw-r--r--chromium/v8/src/arm/cpu-arm.cc54
-rw-r--r--chromium/v8/src/arm/debug-arm.cc116
-rw-r--r--chromium/v8/src/arm/deoptimizer-arm.cc82
-rw-r--r--chromium/v8/src/arm/disasm-arm.cc227
-rw-r--r--chromium/v8/src/arm/frames-arm.cc58
-rw-r--r--chromium/v8/src/arm/frames-arm.h38
-rw-r--r--chromium/v8/src/arm/full-codegen-arm.cc1184
-rw-r--r--chromium/v8/src/arm/ic-arm.cc419
-rw-r--r--chromium/v8/src/arm/lithium-arm.cc1037
-rw-r--r--chromium/v8/src/arm/lithium-arm.h673
-rw-r--r--chromium/v8/src/arm/lithium-codegen-arm.cc1782
-rw-r--r--chromium/v8/src/arm/lithium-codegen-arm.h78
-rw-r--r--chromium/v8/src/arm/lithium-gap-resolver-arm.cc108
-rw-r--r--chromium/v8/src/arm/lithium-gap-resolver-arm.h35
-rw-r--r--chromium/v8/src/arm/macro-assembler-arm.cc769
-rw-r--r--chromium/v8/src/arm/macro-assembler-arm.h249
-rw-r--r--chromium/v8/src/arm/regexp-macro-assembler-arm.cc54
-rw-r--r--chromium/v8/src/arm/regexp-macro-assembler-arm.h33
-rw-r--r--chromium/v8/src/arm/simulator-arm.cc136
-rw-r--r--chromium/v8/src/arm/simulator-arm.h48
-rw-r--r--chromium/v8/src/arm/stub-cache-arm.cc1803
-rw-r--r--chromium/v8/src/arm64/OWNERS1
-rw-r--r--chromium/v8/src/arm64/assembler-arm64-inl.h1264
-rw-r--r--chromium/v8/src/arm64/assembler-arm64.cc2892
-rw-r--r--chromium/v8/src/arm64/assembler-arm64.h2256
-rw-r--r--chromium/v8/src/arm64/builtins-arm64.cc1565
-rw-r--r--chromium/v8/src/arm64/code-stubs-arm64.cc5555
-rw-r--r--chromium/v8/src/arm64/code-stubs-arm64.h478
-rw-r--r--chromium/v8/src/arm64/codegen-arm64.cc620
-rw-r--r--chromium/v8/src/arm64/codegen-arm64.h48
-rw-r--r--chromium/v8/src/arm64/constants-arm64.h1250
-rw-r--r--chromium/v8/src/arm64/cpu-arm64.cc123
-rw-r--r--chromium/v8/src/arm64/debug-arm64.cc357
-rw-r--r--chromium/v8/src/arm64/decoder-arm64-inl.h648
-rw-r--r--chromium/v8/src/arm64/decoder-arm64.cc86
-rw-r--r--chromium/v8/src/arm64/decoder-arm64.h187
-rw-r--r--chromium/v8/src/arm64/deoptimizer-arm64.cc385
-rw-r--r--chromium/v8/src/arm64/disasm-arm64.cc1832
-rw-r--r--chromium/v8/src/arm64/disasm-arm64.h92
-rw-r--r--chromium/v8/src/arm64/frames-arm64.cc42
-rw-r--r--chromium/v8/src/arm64/frames-arm64.h109
-rw-r--r--chromium/v8/src/arm64/full-codegen-arm64.cc4884
-rw-r--r--chromium/v8/src/arm64/ic-arm64.cc1387
-rw-r--r--chromium/v8/src/arm64/instructions-arm64.cc317
-rw-r--r--chromium/v8/src/arm64/instructions-arm64.h509
-rw-r--r--chromium/v8/src/arm64/instrument-arm64.cc595
-rw-r--r--chromium/v8/src/arm64/instrument-arm64.h84
-rw-r--r--chromium/v8/src/arm64/lithium-arm64.cc2725
-rw-r--r--chromium/v8/src/arm64/lithium-arm64.h3248
-rw-r--r--chromium/v8/src/arm64/lithium-codegen-arm64.cc6061
-rw-r--r--chromium/v8/src/arm64/lithium-codegen-arm64.h506
-rw-r--r--chromium/v8/src/arm64/lithium-gap-resolver-arm64.cc311
-rw-r--r--chromium/v8/src/arm64/lithium-gap-resolver-arm64.h67
-rw-r--r--chromium/v8/src/arm64/macro-assembler-arm64-inl.h1706
-rw-r--r--chromium/v8/src/arm64/macro-assembler-arm64.cc5303
-rw-r--r--chromium/v8/src/arm64/macro-assembler-arm64.h2327
-rw-r--r--chromium/v8/src/arm64/regexp-macro-assembler-arm64.cc1707
-rw-r--r--chromium/v8/src/arm64/regexp-macro-assembler-arm64.h292
-rw-r--r--chromium/v8/src/arm64/simulator-arm64.cc3736
-rw-r--r--chromium/v8/src/arm64/simulator-arm64.h837
-rw-r--r--chromium/v8/src/arm64/stub-cache-arm64.cc1477
-rw-r--r--chromium/v8/src/arm64/utils-arm64.cc89
-rw-r--r--chromium/v8/src/arm64/utils-arm64.h112
-rw-r--r--chromium/v8/src/array-iterator.js90
-rw-r--r--chromium/v8/src/array.js525
-rw-r--r--chromium/v8/src/arraybuffer.js44
-rw-r--r--chromium/v8/src/assembler.cc400
-rw-r--r--chromium/v8/src/assembler.h233
-rw-r--r--chromium/v8/src/assert-scope.cc21
-rw-r--r--chromium/v8/src/assert-scope.h169
-rw-r--r--chromium/v8/src/ast.cc322
-rw-r--r--chromium/v8/src/ast.h790
-rw-r--r--chromium/v8/src/atomicops.h170
-rw-r--r--chromium/v8/src/atomicops_internals_arm_gcc.h145
-rw-r--r--chromium/v8/src/atomicops_internals_mips_gcc.h174
-rw-r--r--chromium/v8/src/atomicops_internals_tsan.h400
-rw-r--r--chromium/v8/src/atomicops_internals_x86_gcc.cc135
-rw-r--r--chromium/v8/src/atomicops_internals_x86_gcc.h287
-rw-r--r--chromium/v8/src/atomicops_internals_x86_macosx.h301
-rw-r--r--chromium/v8/src/atomicops_internals_x86_msvc.h203
-rw-r--r--chromium/v8/src/base/DEPS4
-rw-r--r--chromium/v8/src/base/atomicops.h161
-rw-r--r--chromium/v8/src/base/atomicops_internals_arm64_gcc.h316
-rw-r--r--chromium/v8/src/base/atomicops_internals_arm_gcc.h301
-rw-r--r--chromium/v8/src/base/atomicops_internals_atomicword_compat.h99
-rw-r--r--chromium/v8/src/base/atomicops_internals_mac.h204
-rw-r--r--chromium/v8/src/base/atomicops_internals_mips_gcc.h159
-rw-r--r--chromium/v8/src/base/atomicops_internals_tsan.h379
-rw-r--r--chromium/v8/src/base/atomicops_internals_x86_gcc.cc111
-rw-r--r--chromium/v8/src/base/atomicops_internals_x86_gcc.h272
-rw-r--r--chromium/v8/src/base/atomicops_internals_x86_msvc.h202
-rw-r--r--chromium/v8/src/base/build_config.h120
-rw-r--r--chromium/v8/src/base/lazy-instance.h237
-rw-r--r--chromium/v8/src/base/macros.h120
-rw-r--r--chromium/v8/src/base/once.cc53
-rw-r--r--chromium/v8/src/base/once.h100
-rw-r--r--chromium/v8/src/base/safe_conversions.h67
-rw-r--r--chromium/v8/src/base/safe_conversions_impl.h220
-rw-r--r--chromium/v8/src/base/safe_math.h276
-rw-r--r--chromium/v8/src/base/safe_math_impl.h531
-rw-r--r--chromium/v8/src/base/win32-headers.h79
-rw-r--r--chromium/v8/src/bignum-dtoa.cc42
-rw-r--r--chromium/v8/src/bignum-dtoa.h27
-rw-r--r--chromium/v8/src/bignum.cc35
-rw-r--r--chromium/v8/src/bignum.h27
-rw-r--r--chromium/v8/src/bootstrapper.cc1592
-rw-r--r--chromium/v8/src/bootstrapper.h61
-rw-r--r--chromium/v8/src/builtins.cc998
-rw-r--r--chromium/v8/src/builtins.h88
-rw-r--r--chromium/v8/src/bytecodes-irregexp.h27
-rw-r--r--chromium/v8/src/cached-powers.cc40
-rw-r--r--chromium/v8/src/cached-powers.h29
-rw-r--r--chromium/v8/src/char-predicates-inl.h29
-rw-r--r--chromium/v8/src/char-predicates.h50
-rw-r--r--chromium/v8/src/checks.cc97
-rw-r--r--chromium/v8/src/checks.h90
-rw-r--r--chromium/v8/src/circular-queue-inl.h41
-rw-r--r--chromium/v8/src/circular-queue.h32
-rw-r--r--chromium/v8/src/code-stubs-hydrogen.cc1066
-rw-r--r--chromium/v8/src/code-stubs.cc331
-rw-r--r--chromium/v8/src/code-stubs.h1204
-rw-r--r--chromium/v8/src/code.h33
-rw-r--r--chromium/v8/src/codegen.cc148
-rw-r--r--chromium/v8/src/codegen.h110
-rw-r--r--chromium/v8/src/collection-iterator.js162
-rw-r--r--chromium/v8/src/collection.js321
-rw-r--r--chromium/v8/src/compilation-cache.cc227
-rw-r--r--chromium/v8/src/compilation-cache.h97
-rw-r--r--chromium/v8/src/compiler-intrinsics.h27
-rw-r--r--chromium/v8/src/compiler.cc1443
-rw-r--r--chromium/v8/src/compiler.h296
-rw-r--r--chromium/v8/src/contexts.cc64
-rw-r--r--chromium/v8/src/contexts.h176
-rw-r--r--chromium/v8/src/conversions-inl.h51
-rw-r--r--chromium/v8/src/conversions.cc129
-rw-r--r--chromium/v8/src/conversions.h130
-rw-r--r--chromium/v8/src/counters.cc149
-rw-r--r--chromium/v8/src/counters.h437
-rw-r--r--chromium/v8/src/cpu-profiler-inl.h43
-rw-r--r--chromium/v8/src/cpu-profiler.cc136
-rw-r--r--chromium/v8/src/cpu-profiler.h56
-rw-r--r--chromium/v8/src/cpu.cc164
-rw-r--r--chromium/v8/src/cpu.h42
-rw-r--r--chromium/v8/src/d8-debug.cc247
-rw-r--r--chromium/v8/src/d8-debug.h143
-rw-r--r--chromium/v8/src/d8-posix.cc65
-rw-r--r--chromium/v8/src/d8-readline.cc41
-rw-r--r--chromium/v8/src/d8-windows.cc39
-rw-r--r--chromium/v8/src/d8.cc635
-rw-r--r--chromium/v8/src/d8.gyp9
-rw-r--r--chromium/v8/src/d8.h83
-rw-r--r--chromium/v8/src/d8.js239
-rw-r--r--chromium/v8/src/data-flow.cc33
-rw-r--r--chromium/v8/src/data-flow.h37
-rw-r--r--chromium/v8/src/date.cc48
-rw-r--r--chromium/v8/src/date.h48
-rw-r--r--chromium/v8/src/date.js52
-rw-r--r--chromium/v8/src/dateparser-inl.h29
-rw-r--r--chromium/v8/src/dateparser.cc35
-rw-r--r--chromium/v8/src/dateparser.h33
-rw-r--r--chromium/v8/src/debug-agent.cc503
-rw-r--r--chromium/v8/src/debug-agent.h118
-rw-r--r--chromium/v8/src/debug-debugger.js170
-rw-r--r--chromium/v8/src/debug.cc2178
-rw-r--r--chromium/v8/src/debug.h1039
-rw-r--r--chromium/v8/src/default-platform.cc56
-rw-r--r--chromium/v8/src/default-platform.h55
-rw-r--r--chromium/v8/src/deoptimizer.cc943
-rw-r--r--chromium/v8/src/deoptimizer.h214
-rw-r--r--chromium/v8/src/disasm.h27
-rw-r--r--chromium/v8/src/disassembler.cc85
-rw-r--r--chromium/v8/src/disassembler.h29
-rw-r--r--chromium/v8/src/diy-fp.cc35
-rw-r--r--chromium/v8/src/diy-fp.h27
-rw-r--r--chromium/v8/src/double.h29
-rw-r--r--chromium/v8/src/dtoa.cc43
-rw-r--r--chromium/v8/src/dtoa.h27
-rw-r--r--chromium/v8/src/effects.h59
-rw-r--r--chromium/v8/src/elements-kind.cc164
-rw-r--r--chromium/v8/src/elements-kind.h102
-rw-r--r--chromium/v8/src/elements.cc1464
-rw-r--r--chromium/v8/src/elements.h193
-rw-r--r--chromium/v8/src/execution.cc688
-rw-r--r--chromium/v8/src/execution.h221
-rw-r--r--chromium/v8/src/extensions/externalize-string-extension.cc47
-rw-r--r--chromium/v8/src/extensions/externalize-string-extension.h31
-rw-r--r--chromium/v8/src/extensions/free-buffer-extension.cc45
-rw-r--r--chromium/v8/src/extensions/free-buffer-extension.h34
-rw-r--r--chromium/v8/src/extensions/gc-extension.cc56
-rw-r--r--chromium/v8/src/extensions/gc-extension.h43
-rw-r--r--chromium/v8/src/extensions/statistics-extension.cc47
-rw-r--r--chromium/v8/src/extensions/statistics-extension.h31
-rw-r--r--chromium/v8/src/extensions/trigger-failure-extension.cc56
-rw-r--r--chromium/v8/src/extensions/trigger-failure-extension.h32
-rw-r--r--chromium/v8/src/factory.cc2147
-rw-r--r--chromium/v8/src/factory.h488
-rw-r--r--chromium/v8/src/fast-dtoa.cc47
-rw-r--r--chromium/v8/src/fast-dtoa.h27
-rw-r--r--chromium/v8/src/feedback-slots.h27
-rw-r--r--chromium/v8/src/field-index-inl.h98
-rw-r--r--chromium/v8/src/field-index.cc23
-rw-r--r--chromium/v8/src/field-index.h119
-rw-r--r--chromium/v8/src/fixed-dtoa.cc37
-rw-r--r--chromium/v8/src/fixed-dtoa.h27
-rw-r--r--chromium/v8/src/flag-definitions.h244
-rw-r--r--chromium/v8/src/flags.cc57
-rw-r--r--chromium/v8/src/flags.h35
-rw-r--r--chromium/v8/src/frames-inl.h50
-rw-r--r--chromium/v8/src/frames.cc124
-rw-r--r--chromium/v8/src/frames.h86
-rw-r--r--chromium/v8/src/full-codegen.cc215
-rw-r--r--chromium/v8/src/full-codegen.h125
-rw-r--r--chromium/v8/src/func-name-inferrer.cc55
-rw-r--r--chromium/v8/src/func-name-inferrer.h31
-rw-r--r--chromium/v8/src/gdb-jit.cc105
-rw-r--r--chromium/v8/src/gdb-jit.h39
-rw-r--r--chromium/v8/src/generator.js38
-rw-r--r--chromium/v8/src/global-handles.cc119
-rw-r--r--chromium/v8/src/global-handles.h56
-rw-r--r--chromium/v8/src/globals.h756
-rw-r--r--chromium/v8/src/handles-inl.h75
-rw-r--r--chromium/v8/src/handles.cc696
-rw-r--r--chromium/v8/src/handles.h203
-rw-r--r--chromium/v8/src/harmony-array.js87
-rw-r--r--chromium/v8/src/harmony-math.js238
-rw-r--r--chromium/v8/src/harmony-string.js69
-rw-r--r--chromium/v8/src/hashmap.h38
-rw-r--r--chromium/v8/src/heap-inl.h493
-rw-r--r--chromium/v8/src/heap-profiler.cc134
-rw-r--r--chromium/v8/src/heap-profiler.h57
-rw-r--r--chromium/v8/src/heap-snapshot-generator-inl.h34
-rw-r--r--chromium/v8/src/heap-snapshot-generator.cc914
-rw-r--r--chromium/v8/src/heap-snapshot-generator.h202
-rw-r--r--chromium/v8/src/heap.cc4429
-rw-r--r--chromium/v8/src/heap.h1605
-rw-r--r--chromium/v8/src/hydrogen-alias-analysis.h29
-rw-r--r--chromium/v8/src/hydrogen-bce.cc187
-rw-r--r--chromium/v8/src/hydrogen-bce.h29
-rw-r--r--chromium/v8/src/hydrogen-bch.cc31
-rw-r--r--chromium/v8/src/hydrogen-bch.h29
-rw-r--r--chromium/v8/src/hydrogen-canonicalize.cc31
-rw-r--r--chromium/v8/src/hydrogen-canonicalize.h29
-rw-r--r--chromium/v8/src/hydrogen-check-elimination.cc757
-rw-r--r--chromium/v8/src/hydrogen-check-elimination.h49
-rw-r--r--chromium/v8/src/hydrogen-dce.cc35
-rw-r--r--chromium/v8/src/hydrogen-dce.h29
-rw-r--r--chromium/v8/src/hydrogen-dehoist.cc34
-rw-r--r--chromium/v8/src/hydrogen-dehoist.h29
-rw-r--r--chromium/v8/src/hydrogen-environment-liveness.cc49
-rw-r--r--chromium/v8/src/hydrogen-environment-liveness.h32
-rw-r--r--chromium/v8/src/hydrogen-escape-analysis.cc59
-rw-r--r--chromium/v8/src/hydrogen-escape-analysis.h33
-rw-r--r--chromium/v8/src/hydrogen-flow-engine.h75
-rw-r--r--chromium/v8/src/hydrogen-gvn.cc638
-rw-r--r--chromium/v8/src/hydrogen-gvn.h143
-rw-r--r--chromium/v8/src/hydrogen-infer-representation.cc31
-rw-r--r--chromium/v8/src/hydrogen-infer-representation.h29
-rw-r--r--chromium/v8/src/hydrogen-infer-types.cc29
-rw-r--r--chromium/v8/src/hydrogen-infer-types.h29
-rw-r--r--chromium/v8/src/hydrogen-instructions.cc1456
-rw-r--r--chromium/v8/src/hydrogen-instructions.h2546
-rw-r--r--chromium/v8/src/hydrogen-load-elimination.cc177
-rw-r--r--chromium/v8/src/hydrogen-load-elimination.h29
-rw-r--r--chromium/v8/src/hydrogen-mark-deoptimize.cc29
-rw-r--r--chromium/v8/src/hydrogen-mark-deoptimize.h29
-rw-r--r--chromium/v8/src/hydrogen-mark-unreachable.cc29
-rw-r--r--chromium/v8/src/hydrogen-mark-unreachable.h29
-rw-r--r--chromium/v8/src/hydrogen-minus-zero.cc91
-rw-r--r--chromium/v8/src/hydrogen-minus-zero.h56
-rw-r--r--chromium/v8/src/hydrogen-osr.cc33
-rw-r--r--chromium/v8/src/hydrogen-osr.h33
-rw-r--r--chromium/v8/src/hydrogen-range-analysis.cc146
-rw-r--r--chromium/v8/src/hydrogen-range-analysis.h45
-rw-r--r--chromium/v8/src/hydrogen-redundant-phi.cc29
-rw-r--r--chromium/v8/src/hydrogen-redundant-phi.h29
-rw-r--r--chromium/v8/src/hydrogen-removable-simulates.cc246
-rw-r--r--chromium/v8/src/hydrogen-removable-simulates.h29
-rw-r--r--chromium/v8/src/hydrogen-representation-changes.cc80
-rw-r--r--chromium/v8/src/hydrogen-representation-changes.h29
-rw-r--r--chromium/v8/src/hydrogen-sce.cc33
-rw-r--r--chromium/v8/src/hydrogen-sce.h29
-rw-r--r--chromium/v8/src/hydrogen-store-elimination.cc121
-rw-r--r--chromium/v8/src/hydrogen-store-elimination.h34
-rw-r--r--chromium/v8/src/hydrogen-types.cc67
-rw-r--r--chromium/v8/src/hydrogen-types.h87
-rw-r--r--chromium/v8/src/hydrogen-uint32-analysis.cc64
-rw-r--r--chromium/v8/src/hydrogen-uint32-analysis.h29
-rw-r--r--chromium/v8/src/hydrogen.cc6099
-rw-r--r--chromium/v8/src/hydrogen.h752
-rw-r--r--chromium/v8/src/i18n.cc413
-rw-r--r--chromium/v8/src/i18n.h52
-rw-r--r--chromium/v8/src/i18n.js246
-rw-r--r--chromium/v8/src/ia32/assembler-ia32-inl.h95
-rw-r--r--chromium/v8/src/ia32/assembler-ia32.cc205
-rw-r--r--chromium/v8/src/ia32/assembler-ia32.h235
-rw-r--r--chromium/v8/src/ia32/builtins-ia32.cc380
-rw-r--r--chromium/v8/src/ia32/code-stubs-ia32.cc2816
-rw-r--r--chromium/v8/src/ia32/code-stubs-ia32.h152
-rw-r--r--chromium/v8/src/ia32/codegen-ia32.cc758
-rw-r--r--chromium/v8/src/ia32/codegen-ia32.h68
-rw-r--r--chromium/v8/src/ia32/cpu-ia32.cc45
-rw-r--r--chromium/v8/src/ia32/debug-ia32.cc132
-rw-r--r--chromium/v8/src/ia32/deoptimizer-ia32.cc133
-rw-r--r--chromium/v8/src/ia32/disasm-ia32.cc114
-rw-r--r--chromium/v8/src/ia32/frames-ia32.cc53
-rw-r--r--chromium/v8/src/ia32/frames-ia32.h33
-rw-r--r--chromium/v8/src/ia32/full-codegen-ia32.cc1080
-rw-r--r--chromium/v8/src/ia32/ic-ia32.cc451
-rw-r--r--chromium/v8/src/ia32/lithium-codegen-ia32.cc2790
-rw-r--r--chromium/v8/src/ia32/lithium-codegen-ia32.h169
-rw-r--r--chromium/v8/src/ia32/lithium-gap-resolver-ia32.cc121
-rw-r--r--chromium/v8/src/ia32/lithium-gap-resolver-ia32.h31
-rw-r--r--chromium/v8/src/ia32/lithium-ia32.cc1072
-rw-r--r--chromium/v8/src/ia32/lithium-ia32.h731
-rw-r--r--chromium/v8/src/ia32/macro-assembler-ia32.cc765
-rw-r--r--chromium/v8/src/ia32/macro-assembler-ia32.h180
-rw-r--r--chromium/v8/src/ia32/regexp-macro-assembler-ia32.cc52
-rw-r--r--chromium/v8/src/ia32/regexp-macro-assembler-ia32.h33
-rw-r--r--chromium/v8/src/ia32/simulator-ia32.cc27
-rw-r--r--chromium/v8/src/ia32/simulator-ia32.h32
-rw-r--r--chromium/v8/src/ia32/stub-cache-ia32.cc1927
-rw-r--r--chromium/v8/src/ic-inl.h122
-rw-r--r--chromium/v8/src/ic.cc2051
-rw-r--r--chromium/v8/src/ic.h656
-rw-r--r--chromium/v8/src/icu_util.cc91
-rw-r--r--chromium/v8/src/icu_util.h29
-rw-r--r--chromium/v8/src/incremental-marking-inl.h33
-rw-r--r--chromium/v8/src/incremental-marking.cc121
-rw-r--r--chromium/v8/src/incremental-marking.h39
-rw-r--r--chromium/v8/src/interface.cc42
-rw-r--r--chromium/v8/src/interface.h29
-rw-r--r--chromium/v8/src/interpreter-irregexp.cc65
-rw-r--r--chromium/v8/src/interpreter-irregexp.h27
-rw-r--r--chromium/v8/src/isolate-inl.h58
-rw-r--r--chromium/v8/src/isolate.cc978
-rw-r--r--chromium/v8/src/isolate.h568
-rw-r--r--chromium/v8/src/json-parser.h95
-rw-r--r--chromium/v8/src/json-stringifier.h288
-rw-r--r--chromium/v8/src/json.js51
-rw-r--r--chromium/v8/src/jsregexp-inl.h37
-rw-r--r--chromium/v8/src/jsregexp.cc226
-rw-r--r--chromium/v8/src/jsregexp.h74
-rw-r--r--chromium/v8/src/lazy-instance.h260
-rw-r--r--chromium/v8/src/libplatform/DEPS6
-rw-r--r--chromium/v8/src/libplatform/default-platform.cc70
-rw-r--r--chromium/v8/src/libplatform/default-platform.h53
-rw-r--r--chromium/v8/src/libplatform/task-queue.cc57
-rw-r--r--chromium/v8/src/libplatform/task-queue.h47
-rw-r--r--chromium/v8/src/libplatform/worker-thread.cc31
-rw-r--r--chromium/v8/src/libplatform/worker-thread.h38
-rw-r--r--chromium/v8/src/list-inl.h34
-rw-r--r--chromium/v8/src/list.h47
-rw-r--r--chromium/v8/src/lithium-allocator-inl.h41
-rw-r--r--chromium/v8/src/lithium-allocator.cc68
-rw-r--r--chromium/v8/src/lithium-allocator.h39
-rw-r--r--chromium/v8/src/lithium-codegen.cc169
-rw-r--r--chromium/v8/src/lithium-codegen.h44
-rw-r--r--chromium/v8/src/lithium.cc267
-rw-r--r--chromium/v8/src/lithium.h256
-rw-r--r--chromium/v8/src/liveedit-debugger.js31
-rw-r--r--chromium/v8/src/liveedit.cc794
-rw-r--r--chromium/v8/src/liveedit.h283
-rw-r--r--chromium/v8/src/log-inl.h29
-rw-r--r--chromium/v8/src/log-utils.cc42
-rw-r--r--chromium/v8/src/log-utils.h37
-rw-r--r--chromium/v8/src/log.cc321
-rw-r--r--chromium/v8/src/log.h68
-rw-r--r--chromium/v8/src/lookup.cc200
-rw-r--r--chromium/v8/src/lookup.h183
-rw-r--r--chromium/v8/src/macro-assembler.h86
-rw-r--r--chromium/v8/src/macros.py29
-rw-r--r--chromium/v8/src/mark-compact-inl.h39
-rw-r--r--chromium/v8/src/mark-compact.cc861
-rw-r--r--chromium/v8/src/mark-compact.h131
-rw-r--r--chromium/v8/src/math.js113
-rw-r--r--chromium/v8/src/messages.cc79
-rw-r--r--chromium/v8/src/messages.h30
-rw-r--r--chromium/v8/src/messages.js175
-rw-r--r--chromium/v8/src/mips/OWNERS3
-rw-r--r--chromium/v8/src/mips/assembler-mips-inl.h75
-rw-r--r--chromium/v8/src/mips/assembler-mips.cc177
-rw-r--r--chromium/v8/src/mips/assembler-mips.h140
-rw-r--r--chromium/v8/src/mips/builtins-mips.cc409
-rw-r--r--chromium/v8/src/mips/code-stubs-mips.cc2721
-rw-r--r--chromium/v8/src/mips/code-stubs-mips.h162
-rw-r--r--chromium/v8/src/mips/codegen-mips.cc705
-rw-r--r--chromium/v8/src/mips/codegen-mips.h72
-rw-r--r--chromium/v8/src/mips/constants-mips.cc57
-rw-r--r--chromium/v8/src/mips/constants-mips.h65
-rw-r--r--chromium/v8/src/mips/cpu-mips.cc45
-rw-r--r--chromium/v8/src/mips/debug-mips.cc123
-rw-r--r--chromium/v8/src/mips/deoptimizer-mips.cc87
-rw-r--r--chromium/v8/src/mips/disasm-mips.cc84
-rw-r--r--chromium/v8/src/mips/frames-mips.cc54
-rw-r--r--chromium/v8/src/mips/frames-mips.h36
-rw-r--r--chromium/v8/src/mips/full-codegen-mips.cc1058
-rw-r--r--chromium/v8/src/mips/ic-mips.cc416
-rw-r--r--chromium/v8/src/mips/lithium-codegen-mips.cc1717
-rw-r--r--chromium/v8/src/mips/lithium-codegen-mips.h104
-rw-r--r--chromium/v8/src/mips/lithium-gap-resolver-mips.cc37
-rw-r--r--chromium/v8/src/mips/lithium-gap-resolver-mips.h31
-rw-r--r--chromium/v8/src/mips/lithium-mips.cc1000
-rw-r--r--chromium/v8/src/mips/lithium-mips.h686
-rw-r--r--chromium/v8/src/mips/macro-assembler-mips.cc768
-rw-r--r--chromium/v8/src/mips/macro-assembler-mips.h198
-rw-r--r--chromium/v8/src/mips/regexp-macro-assembler-mips.cc52
-rw-r--r--chromium/v8/src/mips/regexp-macro-assembler-mips.h37
-rw-r--r--chromium/v8/src/mips/simulator-mips.cc236
-rw-r--r--chromium/v8/src/mips/simulator-mips.h58
-rw-r--r--chromium/v8/src/mips/stub-cache-mips.cc1807
-rw-r--r--chromium/v8/src/mirror-debugger.js286
-rw-r--r--chromium/v8/src/misc-intrinsics.h31
-rw-r--r--chromium/v8/src/mksnapshot.cc493
-rw-r--r--chromium/v8/src/msan.h37
-rw-r--r--chromium/v8/src/natives.h27
-rw-r--r--chromium/v8/src/object-observe.js323
-rw-r--r--chromium/v8/src/objects-debug.cc307
-rw-r--r--chromium/v8/src/objects-inl.h2794
-rw-r--r--chromium/v8/src/objects-printer.cc425
-rw-r--r--chromium/v8/src/objects-visiting-inl.h153
-rw-r--r--chromium/v8/src/objects-visiting.cc338
-rw-r--r--chromium/v8/src/objects-visiting.h64
-rw-r--r--chromium/v8/src/objects.cc11095
-rw-r--r--chromium/v8/src/objects.h4437
-rw-r--r--chromium/v8/src/once.cc77
-rw-r--r--chromium/v8/src/once.h123
-rw-r--r--chromium/v8/src/optimizing-compiler-thread.cc133
-rw-r--r--chromium/v8/src/optimizing-compiler-thread.h70
-rw-r--r--chromium/v8/src/parser.cc3196
-rw-r--r--chromium/v8/src/parser.h631
-rw-r--r--chromium/v8/src/platform-cygwin.cc61
-rw-r--r--chromium/v8/src/platform-freebsd.cc58
-rw-r--r--chromium/v8/src/platform-linux.cc75
-rw-r--r--chromium/v8/src/platform-macos.cc58
-rw-r--r--chromium/v8/src/platform-openbsd.cc59
-rw-r--r--chromium/v8/src/platform-posix.cc260
-rw-r--r--chromium/v8/src/platform-qnx.cc373
-rw-r--r--chromium/v8/src/platform-solaris.cc91
-rw-r--r--chromium/v8/src/platform-win32.cc490
-rw-r--r--chromium/v8/src/platform.h182
-rw-r--r--chromium/v8/src/platform/condition-variable.cc41
-rw-r--r--chromium/v8/src/platform/condition-variable.h36
-rw-r--r--chromium/v8/src/platform/elapsed-timer.h31
-rw-r--r--chromium/v8/src/platform/mutex.cc35
-rw-r--r--chromium/v8/src/platform/mutex.h44
-rw-r--r--chromium/v8/src/platform/semaphore.cc37
-rw-r--r--chromium/v8/src/platform/semaphore.h35
-rw-r--r--chromium/v8/src/platform/socket.cc224
-rw-r--r--chromium/v8/src/platform/socket.h101
-rw-r--r--chromium/v8/src/platform/time.cc61
-rw-r--r--chromium/v8/src/platform/time.h31
-rw-r--r--chromium/v8/src/preparse-data-format.h37
-rw-r--r--chromium/v8/src/preparse-data.cc152
-rw-r--r--chromium/v8/src/preparse-data.h255
-rw-r--r--chromium/v8/src/preparser.cc1207
-rw-r--r--chromium/v8/src/preparser.h2275
-rw-r--r--chromium/v8/src/prettyprinter.cc73
-rw-r--r--chromium/v8/src/prettyprinter.h37
-rw-r--r--chromium/v8/src/profile-generator-inl.h31
-rw-r--r--chromium/v8/src/profile-generator.cc88
-rw-r--r--chromium/v8/src/profile-generator.h55
-rw-r--r--chromium/v8/src/promise.js540
-rw-r--r--chromium/v8/src/property-details-inl.h39
-rw-r--r--chromium/v8/src/property-details.h75
-rw-r--r--chromium/v8/src/property.cc71
-rw-r--r--chromium/v8/src/property.h407
-rw-r--r--chromium/v8/src/proxy.js30
-rw-r--r--chromium/v8/src/qnx-math.h19
-rw-r--r--chromium/v8/src/regexp-macro-assembler-irregexp-inl.h33
-rw-r--r--chromium/v8/src/regexp-macro-assembler-irregexp.cc45
-rw-r--r--chromium/v8/src/regexp-macro-assembler-irregexp.h29
-rw-r--r--chromium/v8/src/regexp-macro-assembler-tracer.cc46
-rw-r--r--chromium/v8/src/regexp-macro-assembler-tracer.h27
-rw-r--r--chromium/v8/src/regexp-macro-assembler.cc41
-rw-r--r--chromium/v8/src/regexp-macro-assembler.h31
-rw-r--r--chromium/v8/src/regexp-stack.cc46
-rw-r--r--chromium/v8/src/regexp-stack.h27
-rw-r--r--chromium/v8/src/regexp.js65
-rw-r--r--chromium/v8/src/rewriter.cc52
-rw-r--r--chromium/v8/src/rewriter.h27
-rw-r--r--chromium/v8/src/runtime-profiler.cc290
-rw-r--r--chromium/v8/src/runtime-profiler.h59
-rw-r--r--chromium/v8/src/runtime.cc7458
-rw-r--r--chromium/v8/src/runtime.h442
-rw-r--r--chromium/v8/src/runtime.js44
-rw-r--r--chromium/v8/src/safepoint-table.cc45
-rw-r--r--chromium/v8/src/safepoint-table.h35
-rw-r--r--chromium/v8/src/sampler.cc134
-rw-r--r--chromium/v8/src/sampler.h50
-rw-r--r--chromium/v8/src/scanner-character-streams.cc45
-rw-r--r--chromium/v8/src/scanner-character-streams.h30
-rw-r--r--chromium/v8/src/scanner.cc173
-rw-r--r--chromium/v8/src/scanner.h258
-rw-r--r--chromium/v8/src/scopeinfo.cc140
-rw-r--r--chromium/v8/src/scopeinfo.h41
-rw-r--r--chromium/v8/src/scopes.cc127
-rw-r--r--chromium/v8/src/scopes.h73
-rw-r--r--chromium/v8/src/serialize.cc307
-rw-r--r--chromium/v8/src/serialize.h83
-rw-r--r--chromium/v8/src/simulator.h39
-rw-r--r--chromium/v8/src/small-pointer-list.h33
-rw-r--r--chromium/v8/src/smart-pointers.h74
-rw-r--r--chromium/v8/src/snapshot-common.cc39
-rw-r--r--chromium/v8/src/snapshot-empty.cc31
-rw-r--r--chromium/v8/src/snapshot.h29
-rw-r--r--chromium/v8/src/spaces-inl.h58
-rw-r--r--chromium/v8/src/spaces.cc405
-rw-r--r--chromium/v8/src/spaces.h318
-rw-r--r--chromium/v8/src/splay-tree-inl.h29
-rw-r--r--chromium/v8/src/splay-tree.h29
-rw-r--r--chromium/v8/src/store-buffer-inl.h29
-rw-r--r--chromium/v8/src/store-buffer.cc187
-rw-r--r--chromium/v8/src/store-buffer.h44
-rw-r--r--chromium/v8/src/string-search.cc31
-rw-r--r--chromium/v8/src/string-search.h27
-rw-r--r--chromium/v8/src/string-stream.cc53
-rw-r--r--chromium/v8/src/string-stream.h59
-rw-r--r--chromium/v8/src/string.js244
-rw-r--r--chromium/v8/src/strtod.cc42
-rw-r--r--chromium/v8/src/strtod.h27
-rw-r--r--chromium/v8/src/stub-cache.cc1104
-rw-r--r--chromium/v8/src/stub-cache.h461
-rw-r--r--chromium/v8/src/sweeper-thread.cc82
-rw-r--r--chromium/v8/src/sweeper-thread.h47
-rw-r--r--chromium/v8/src/symbol.js137
-rw-r--r--chromium/v8/src/third_party/valgrind/valgrind.h44
-rw-r--r--chromium/v8/src/third_party/vtune/jitprofiling.cc40
-rw-r--r--chromium/v8/src/third_party/vtune/jitprofiling.h92
-rw-r--r--chromium/v8/src/third_party/vtune/v8-vtune.h22
-rw-r--r--chromium/v8/src/third_party/vtune/vtune-jit.cc15
-rw-r--r--chromium/v8/src/third_party/vtune/vtune-jit.h22
-rw-r--r--chromium/v8/src/token.cc33
-rw-r--r--chromium/v8/src/token.h31
-rw-r--r--chromium/v8/src/transitions-inl.h40
-rw-r--r--chromium/v8/src/transitions.cc168
-rw-r--r--chromium/v8/src/transitions.h79
-rw-r--r--chromium/v8/src/trig-table.h27
-rw-r--r--chromium/v8/src/type-info.cc352
-rw-r--r--chromium/v8/src/type-info.h270
-rw-r--r--chromium/v8/src/typedarray.js359
-rw-r--r--chromium/v8/src/types-inl.h336
-rw-r--r--chromium/v8/src/types.cc1143
-rw-r--r--chromium/v8/src/types.h1012
-rw-r--r--chromium/v8/src/typing.cc249
-rw-r--r--chromium/v8/src/typing.h65
-rw-r--r--chromium/v8/src/unbound-queue-inl.h45
-rw-r--r--chromium/v8/src/unbound-queue.h34
-rw-r--r--chromium/v8/src/unicode-inl.h57
-rw-r--r--chromium/v8/src/unicode.cc69
-rw-r--r--chromium/v8/src/unicode.h47
-rw-r--r--chromium/v8/src/unique.h103
-rw-r--r--chromium/v8/src/uri.h71
-rw-r--r--chromium/v8/src/uri.js697
-rw-r--r--chromium/v8/src/utils-inl.h29
-rw-r--r--chromium/v8/src/utils.cc365
-rw-r--r--chromium/v8/src/utils.h863
-rw-r--r--chromium/v8/src/utils/DEPS5
-rw-r--r--chromium/v8/src/utils/random-number-generator.cc64
-rw-r--r--chromium/v8/src/utils/random-number-generator.h29
-rw-r--r--chromium/v8/src/v8-counters.cc104
-rw-r--r--chromium/v8/src/v8-counters.h440
-rw-r--r--chromium/v8/src/v8.cc168
-rw-r--r--chromium/v8/src/v8.h68
-rw-r--r--chromium/v8/src/v8checks.h31
-rw-r--r--chromium/v8/src/v8conversions.cc132
-rw-r--r--chromium/v8/src/v8conversions.h95
-rw-r--r--chromium/v8/src/v8dll-main.cc31
-rw-r--r--chromium/v8/src/v8globals.h580
-rw-r--r--chromium/v8/src/v8memory.h27
-rw-r--r--chromium/v8/src/v8natives.js342
-rw-r--r--chromium/v8/src/v8threads.cc68
-rw-r--r--chromium/v8/src/v8threads.h27
-rw-r--r--chromium/v8/src/v8utils.cc276
-rw-r--r--chromium/v8/src/v8utils.h443
-rw-r--r--chromium/v8/src/variables.cc43
-rw-r--r--chromium/v8/src/variables.h41
-rw-r--r--chromium/v8/src/vector.h171
-rw-r--r--chromium/v8/src/version.cc32
-rw-r--r--chromium/v8/src/version.h27
-rw-r--r--chromium/v8/src/vm-state-inl.h36
-rw-r--r--chromium/v8/src/vm-state.h31
-rw-r--r--chromium/v8/src/weak_collection.js183
-rw-r--r--chromium/v8/src/win32-headers.h101
-rw-r--r--chromium/v8/src/win32-math.cc33
-rw-r--r--chromium/v8/src/win32-math.h27
-rw-r--r--chromium/v8/src/x64/assembler-x64-inl.h125
-rw-r--r--chromium/v8/src/x64/assembler-x64.cc668
-rw-r--r--chromium/v8/src/x64/assembler-x64.h887
-rw-r--r--chromium/v8/src/x64/builtins-x64.cc728
-rw-r--r--chromium/v8/src/x64/code-stubs-x64.cc3357
-rw-r--r--chromium/v8/src/x64/code-stubs-x64.h164
-rw-r--r--chromium/v8/src/x64/codegen-x64.cc261
-rw-r--r--chromium/v8/src/x64/codegen-x64.h67
-rw-r--r--chromium/v8/src/x64/cpu-x64.cc45
-rw-r--r--chromium/v8/src/x64/debug-x64.cc159
-rw-r--r--chromium/v8/src/x64/deoptimizer-x64.cc172
-rw-r--r--chromium/v8/src/x64/disasm-x64.cc113
-rw-r--r--chromium/v8/src/x64/frames-x64.cc53
-rw-r--r--chromium/v8/src/x64/frames-x64.h44
-rw-r--r--chromium/v8/src/x64/full-codegen-x64.cc1734
-rw-r--r--chromium/v8/src/x64/ic-x64.cc624
-rw-r--r--chromium/v8/src/x64/lithium-codegen-x64.cc2528
-rw-r--r--chromium/v8/src/x64/lithium-codegen-x64.h72
-rw-r--r--chromium/v8/src/x64/lithium-gap-resolver-x64.cc71
-rw-r--r--chromium/v8/src/x64/lithium-gap-resolver-x64.h31
-rw-r--r--chromium/v8/src/x64/lithium-x64.cc1122
-rw-r--r--chromium/v8/src/x64/lithium-x64.h726
-rw-r--r--chromium/v8/src/x64/macro-assembler-x64.cc2231
-rw-r--r--chromium/v8/src/x64/macro-assembler-x64.h269
-rw-r--r--chromium/v8/src/x64/regexp-macro-assembler-x64.cc402
-rw-r--r--chromium/v8/src/x64/regexp-macro-assembler-x64.h84
-rw-r--r--chromium/v8/src/x64/simulator-x64.cc27
-rw-r--r--chromium/v8/src/x64/simulator-x64.h32
-rw-r--r--chromium/v8/src/x64/stub-cache-x64.cc2052
-rw-r--r--chromium/v8/src/x87/OWNERS1
-rw-r--r--chromium/v8/src/x87/assembler-x87-inl.h561
-rw-r--r--chromium/v8/src/x87/assembler-x87.cc2028
-rw-r--r--chromium/v8/src/x87/assembler-x87.h1031
-rw-r--r--chromium/v8/src/x87/builtins-x87.cc1452
-rw-r--r--chromium/v8/src/x87/code-stubs-x87.cc4734
-rw-r--r--chromium/v8/src/x87/code-stubs-x87.h413
-rw-r--r--chromium/v8/src/x87/codegen-x87.cc632
-rw-r--r--chromium/v8/src/x87/codegen-x87.h33
-rw-r--r--chromium/v8/src/x87/cpu-x87.cc44
-rw-r--r--chromium/v8/src/x87/debug-x87.cc336
-rw-r--r--chromium/v8/src/x87/deoptimizer-x87.cc406
-rw-r--r--chromium/v8/src/x87/disasm-x87.cc1757
-rw-r--r--chromium/v8/src/x87/frames-x87.cc42
-rw-r--r--chromium/v8/src/x87/frames-x87.h125
-rw-r--r--chromium/v8/src/x87/full-codegen-x87.cc4791
-rw-r--r--chromium/v8/src/x87/ic-x87.cc1290
-rw-r--r--chromium/v8/src/x87/lithium-codegen-x87.cc5707
-rw-r--r--chromium/v8/src/x87/lithium-codegen-x87.h504
-rw-r--r--chromium/v8/src/x87/lithium-gap-resolver-x87.cc445
-rw-r--r--chromium/v8/src/x87/lithium-gap-resolver-x87.h87
-rw-r--r--chromium/v8/src/x87/lithium-x87.cc2660
-rw-r--r--chromium/v8/src/x87/lithium-x87.h2888
-rw-r--r--chromium/v8/src/x87/macro-assembler-x87.cc3301
-rw-r--r--chromium/v8/src/x87/macro-assembler-x87.h1090
-rw-r--r--chromium/v8/src/x87/regexp-macro-assembler-x87.cc1309
-rw-r--r--chromium/v8/src/x87/regexp-macro-assembler-x87.h200
-rw-r--r--chromium/v8/src/x87/simulator-x87.cc6
-rw-r--r--chromium/v8/src/x87/simulator-x87.h48
-rw-r--r--chromium/v8/src/x87/stub-cache-x87.cc1493
-rw-r--r--chromium/v8/src/zone-allocator.h67
-rw-r--r--chromium/v8/src/zone-containers.h23
-rw-r--r--chromium/v8/src/zone-inl.h65
-rw-r--r--chromium/v8/src/zone.cc37
-rw-r--r--chromium/v8/src/zone.h46
-rw-r--r--chromium/v8/test/cctest/cctest.gyp55
-rw-r--r--chromium/v8/tools/DEPS8
-rwxr-xr-xchromium/v8/tools/bash-completion.sh4
-rw-r--r--chromium/v8/tools/blink_tests/TestExpectations2
-rw-r--r--chromium/v8/tools/common-includes.sh198
-rwxr-xr-xchromium/v8/tools/cross_build_gcc.sh72
-rwxr-xr-xchromium/v8/tools/draw_instruction_graph.sh130
-rwxr-xr-xchromium/v8/tools/fuzz-harness.sh2
-rw-r--r--chromium/v8/tools/gcmole/gcmole.lua29
-rw-r--r--chromium/v8/tools/gen-postmortem-metadata.py12
-rwxr-xr-xchromium/v8/tools/generate-runtime-tests.py1323
-rw-r--r--chromium/v8/tools/generate-trig-table.py4
-rwxr-xr-xchromium/v8/tools/grokdump.py1164
-rw-r--r--chromium/v8/tools/gyp/v8.gyp298
-rwxr-xr-xchromium/v8/tools/js2c.py362
-rw-r--r--chromium/v8/tools/lexer-shell.cc71
-rw-r--r--chromium/v8/tools/lexer-shell.gyp25
-rwxr-xr-xchromium/v8/tools/merge-to-branch.sh296
-rw-r--r--chromium/v8/tools/oom_dump/oom_dump.cc2
-rw-r--r--chromium/v8/tools/parser-shell.cc157
-rwxr-xr-xchromium/v8/tools/plot-timer-events30
-rwxr-xr-xchromium/v8/tools/presubmit.py25
-rw-r--r--chromium/v8/tools/profviz/composer.js26
-rw-r--r--chromium/v8/tools/profviz/stdio.js2
-rwxr-xr-xchromium/v8/tools/push-to-trunk.sh412
-rwxr-xr-xchromium/v8/tools/push-to-trunk/auto_push.py156
-rwxr-xr-xchromium/v8/tools/push-to-trunk/auto_roll.py183
-rwxr-xr-xchromium/v8/tools/push-to-trunk/chromium_roll.py176
-rw-r--r--chromium/v8/tools/push-to-trunk/common_includes.py338
-rw-r--r--chromium/v8/tools/push-to-trunk/git_recipes.py202
-rwxr-xr-xchromium/v8/tools/push-to-trunk/merge_to_branch.py333
-rwxr-xr-xchromium/v8/tools/push-to-trunk/push_to_trunk.py568
-rwxr-xr-xchromium/v8/tools/push-to-trunk/releases.py463
-rwxr-xr-xchromium/v8/tools/push-to-trunk/script_test.py54
-rw-r--r--chromium/v8/tools/push-to-trunk/test_scripts.py1100
-rwxr-xr-xchromium/v8/tools/run-deopt-fuzzer.py63
-rwxr-xr-xchromium/v8/tools/run-tests.py170
-rwxr-xr-xchromium/v8/tools/run.py12
-rwxr-xr-xchromium/v8/tools/run_benchmarks.py401
-rw-r--r--chromium/v8/tools/shell-utils.h67
-rw-r--r--chromium/v8/tools/testrunner/local/commands.py52
-rw-r--r--chromium/v8/tools/testrunner/local/execution.py85
-rw-r--r--chromium/v8/tools/testrunner/local/perfdata.py (renamed from chromium/v8/tools/testrunner/network/perfdata.py)0
-rw-r--r--chromium/v8/tools/testrunner/local/pool.py146
-rw-r--r--chromium/v8/tools/testrunner/local/pool_unittest.py41
-rw-r--r--chromium/v8/tools/testrunner/local/progress.py55
-rw-r--r--chromium/v8/tools/testrunner/local/statusfile.py6
-rw-r--r--chromium/v8/tools/testrunner/local/utils.py15
-rw-r--r--chromium/v8/tools/testrunner/network/network_execution.py4
-rw-r--r--chromium/v8/tools/testrunner/objects/context.py11
-rw-r--r--chromium/v8/tools/unittests/run_benchmarks_test.py256
-rw-r--r--chromium/v8/tools/v8heapconst.py288
-rw-r--r--chromium/v8/tools/whitespace.txt5
-rw-r--r--chromium/webkit/BUILD.gn27
-rw-r--r--chromium/webkit/DEPS1
-rw-r--r--chromium/webkit/OWNERS3
-rw-r--r--chromium/webkit/browser/BUILD.gn237
-rw-r--r--chromium/webkit/browser/appcache/appcache.cc2
-rw-r--r--chromium/webkit/browser/appcache/appcache.h17
-rw-r--r--chromium/webkit/browser/appcache/appcache_backend_impl.cc4
-rw-r--r--chromium/webkit/browser/appcache/appcache_backend_impl.h6
-rw-r--r--chromium/webkit/browser/appcache/appcache_database.cc45
-rw-r--r--chromium/webkit/browser/appcache/appcache_database.h57
-rw-r--r--chromium/webkit/browser/appcache/appcache_database_unittest.cc1177
-rw-r--r--chromium/webkit/browser/appcache/appcache_disk_cache.cc51
-rw-r--r--chromium/webkit/browser/appcache/appcache_disk_cache.h4
-rw-r--r--chromium/webkit/browser/appcache/appcache_entry.h6
-rw-r--r--chromium/webkit/browser/appcache/appcache_group.cc4
-rw-r--r--chromium/webkit/browser/appcache/appcache_group.h34
-rw-r--r--chromium/webkit/browser/appcache/appcache_group_unittest.cc302
-rw-r--r--chromium/webkit/browser/appcache/appcache_histograms.cc80
-rw-r--r--chromium/webkit/browser/appcache/appcache_histograms.h13
-rw-r--r--chromium/webkit/browser/appcache/appcache_host.cc60
-rw-r--r--chromium/webkit/browser/appcache/appcache_host.h73
-rw-r--r--chromium/webkit/browser/appcache/appcache_host_unittest.cc539
-rw-r--r--chromium/webkit/browser/appcache/appcache_interceptor.cc121
-rw-r--r--chromium/webkit/browser/appcache/appcache_interceptor.h80
-rw-r--r--chromium/webkit/browser/appcache/appcache_quota_client.cc4
-rw-r--r--chromium/webkit/browser/appcache/appcache_quota_client.h14
-rw-r--r--chromium/webkit/browser/appcache/appcache_quota_client_unittest.cc435
-rw-r--r--chromium/webkit/browser/appcache/appcache_request_handler.cc19
-rw-r--r--chromium/webkit/browser/appcache/appcache_request_handler.h6
-rw-r--r--chromium/webkit/browser/appcache/appcache_request_handler_unittest.cc973
-rw-r--r--chromium/webkit/browser/appcache/appcache_response.cc2
-rw-r--r--chromium/webkit/browser/appcache/appcache_response.h23
-rw-r--r--chromium/webkit/browser/appcache/appcache_response_unittest.cc717
-rw-r--r--chromium/webkit/browser/appcache/appcache_service.cc550
-rw-r--r--chromium/webkit/browser/appcache/appcache_service.h196
-rw-r--r--chromium/webkit/browser/appcache/appcache_service_impl.cc578
-rw-r--r--chromium/webkit/browser/appcache/appcache_service_impl.h227
-rw-r--r--chromium/webkit/browser/appcache/appcache_service_unittest.cc320
-rw-r--r--chromium/webkit/browser/appcache/appcache_storage.cc6
-rw-r--r--chromium/webkit/browser/appcache/appcache_storage.h39
-rw-r--r--chromium/webkit/browser/appcache/appcache_storage_impl.cc148
-rw-r--r--chromium/webkit/browser/appcache/appcache_storage_impl.h15
-rw-r--r--chromium/webkit/browser/appcache/appcache_storage_impl_unittest.cc1968
-rw-r--r--chromium/webkit/browser/appcache/appcache_storage_unittest.cc165
-rw-r--r--chromium/webkit/browser/appcache/appcache_test_helper.cc80
-rw-r--r--chromium/webkit/browser/appcache/appcache_test_helper.h46
-rw-r--r--chromium/webkit/browser/appcache/appcache_unittest.cc695
-rw-r--r--chromium/webkit/browser/appcache/appcache_update_job.cc363
-rw-r--r--chromium/webkit/browser/appcache/appcache_update_job.h55
-rw-r--r--chromium/webkit/browser/appcache/appcache_update_job_unittest.cc3692
-rw-r--r--chromium/webkit/browser/appcache/appcache_url_request_job.cc36
-rw-r--r--chromium/webkit/browser/appcache/appcache_url_request_job.h13
-rw-r--r--chromium/webkit/browser/appcache/appcache_url_request_job_unittest.cc816
-rw-r--r--chromium/webkit/browser/appcache/appcache_working_set.cc4
-rw-r--r--chromium/webkit/browser/appcache/manifest_parser.cc31
-rw-r--r--chromium/webkit/browser/appcache/manifest_parser.h16
-rw-r--r--chromium/webkit/browser/appcache/manifest_parser_unittest.cc472
-rw-r--r--chromium/webkit/browser/appcache/mock_appcache_policy.cc28
-rw-r--r--chromium/webkit/browser/appcache/mock_appcache_policy.h31
-rw-r--r--chromium/webkit/browser/appcache/mock_appcache_service.cc27
-rw-r--r--chromium/webkit/browser/appcache/mock_appcache_service.h48
-rw-r--r--chromium/webkit/browser/appcache/mock_appcache_storage.cc537
-rw-r--r--chromium/webkit/browser/appcache/mock_appcache_storage.h219
-rw-r--r--chromium/webkit/browser/appcache/mock_appcache_storage_unittest.cc630
-rw-r--r--chromium/webkit/browser/appcache/view_appcache_internals_job.cc670
-rw-r--r--chromium/webkit/browser/appcache/view_appcache_internals_job.h34
-rw-r--r--chromium/webkit/browser/blob/blob_data_handle.cc66
-rw-r--r--chromium/webkit/browser/blob/blob_data_handle.h35
-rw-r--r--chromium/webkit/browser/blob/blob_storage_context.h10
-rw-r--r--chromium/webkit/browser/blob/blob_storage_context_unittest.cc208
-rw-r--r--chromium/webkit/browser/blob/blob_storage_host.cc114
-rw-r--r--chromium/webkit/browser/blob/blob_storage_host.h71
-rw-r--r--chromium/webkit/browser/blob/blob_url_request_job.cc14
-rw-r--r--chromium/webkit/browser/blob/blob_url_request_job.h2
-rw-r--r--chromium/webkit/browser/blob/blob_url_request_job_factory.cc2
-rw-r--r--chromium/webkit/browser/blob/file_stream_reader.cc20
-rw-r--r--chromium/webkit/browser/blob/file_stream_reader.h6
-rw-r--r--chromium/webkit/browser/blob/local_file_stream_reader.cc25
-rw-r--r--chromium/webkit/browser/blob/local_file_stream_reader.h12
-rw-r--r--chromium/webkit/browser/blob/local_file_stream_reader_unittest.cc261
-rw-r--r--chromium/webkit/browser/blob/mock_blob_url_request_context.cc49
-rw-r--r--chromium/webkit/browser/blob/mock_blob_url_request_context.h58
-rw-r--r--chromium/webkit/browser/blob/view_blob_internals_job.cc12
-rw-r--r--chromium/webkit/browser/database/database_quota_client_unittest.cc285
-rw-r--r--chromium/webkit/browser/database/database_tracker.cc60
-rw-r--r--chromium/webkit/browser/database/database_tracker.h21
-rw-r--r--chromium/webkit/browser/database/database_tracker_unittest.cc877
-rw-r--r--chromium/webkit/browser/database/database_util.cc55
-rw-r--r--chromium/webkit/browser/database/database_util_unittest.cc74
-rw-r--r--chromium/webkit/browser/database/databases_table_unittest.cc148
-rw-r--r--chromium/webkit/browser/database/vfs_backend.cc61
-rw-r--r--chromium/webkit/browser/database/vfs_backend.h12
-rw-r--r--chromium/webkit/browser/fileapi/async_file_test_helper.cc270
-rw-r--r--chromium/webkit/browser/fileapi/async_file_test_helper.h109
-rw-r--r--chromium/webkit/browser/fileapi/async_file_util.h84
-rw-r--r--chromium/webkit/browser/fileapi/async_file_util_adapter.cc124
-rw-r--r--chromium/webkit/browser/fileapi/copy_or_move_file_validator.h6
-rw-r--r--chromium/webkit/browser/fileapi/copy_or_move_operation_delegate.cc168
-rw-r--r--chromium/webkit/browser/fileapi/copy_or_move_operation_delegate.h14
-rw-r--r--chromium/webkit/browser/fileapi/dragged_file_util.cc17
-rw-r--r--chromium/webkit/browser/fileapi/dragged_file_util.h4
-rw-r--r--chromium/webkit/browser/fileapi/dump_file_system.cc6
-rw-r--r--chromium/webkit/browser/fileapi/external_mount_points.cc52
-rw-r--r--chromium/webkit/browser/fileapi/external_mount_points.h17
-rw-r--r--chromium/webkit/browser/fileapi/external_mount_points_unittest.cc507
-rw-r--r--chromium/webkit/browser/fileapi/file_stream_writer.h5
-rw-r--r--chromium/webkit/browser/fileapi/file_system_backend.h35
-rw-r--r--chromium/webkit/browser/fileapi/file_system_context.cc152
-rw-r--r--chromium/webkit/browser/fileapi/file_system_context.h74
-rw-r--r--chromium/webkit/browser/fileapi/file_system_dir_url_request_job.cc35
-rw-r--r--chromium/webkit/browser/fileapi/file_system_dir_url_request_job.h7
-rw-r--r--chromium/webkit/browser/fileapi/file_system_file_stream_reader.cc9
-rw-r--r--chromium/webkit/browser/fileapi/file_system_file_stream_reader.h12
-rw-r--r--chromium/webkit/browser/fileapi/file_system_file_util.h48
-rw-r--r--chromium/webkit/browser/fileapi/file_system_operation.h67
-rw-r--r--chromium/webkit/browser/fileapi/file_system_operation_impl.cc73
-rw-r--r--chromium/webkit/browser/fileapi/file_system_operation_impl.h23
-rw-r--r--chromium/webkit/browser/fileapi/file_system_operation_runner.cc96
-rw-r--r--chromium/webkit/browser/fileapi/file_system_operation_runner.h53
-rw-r--r--chromium/webkit/browser/fileapi/file_system_options.cc6
-rw-r--r--chromium/webkit/browser/fileapi/file_system_options.h11
-rw-r--r--chromium/webkit/browser/fileapi/file_system_quota_client.cc24
-rw-r--r--chromium/webkit/browser/fileapi/file_system_quota_util.h18
-rw-r--r--chromium/webkit/browser/fileapi/file_system_url.cc70
-rw-r--r--chromium/webkit/browser/fileapi/file_system_url.h8
-rw-r--r--chromium/webkit/browser/fileapi/file_system_url_request_job.cc28
-rw-r--r--chromium/webkit/browser/fileapi/file_system_url_request_job.h10
-rw-r--r--chromium/webkit/browser/fileapi/file_system_url_request_job_factory.cc19
-rw-r--r--chromium/webkit/browser/fileapi/file_system_url_request_job_factory.h5
-rw-r--r--chromium/webkit/browser/fileapi/file_system_url_unittest.cc213
-rw-r--r--chromium/webkit/browser/fileapi/file_system_usage_cache.cc63
-rw-r--r--chromium/webkit/browser/fileapi/file_system_usage_cache.h9
-rw-r--r--chromium/webkit/browser/fileapi/file_system_usage_cache_unittest.cc158
-rw-r--r--chromium/webkit/browser/fileapi/file_writer_delegate.cc52
-rw-r--r--chromium/webkit/browser/fileapi/file_writer_delegate.h27
-rw-r--r--chromium/webkit/browser/fileapi/isolated_context.cc51
-rw-r--r--chromium/webkit/browser/fileapi/isolated_context.h4
-rw-r--r--chromium/webkit/browser/fileapi/isolated_context_unittest.cc345
-rw-r--r--chromium/webkit/browser/fileapi/isolated_file_system_backend.cc33
-rw-r--r--chromium/webkit/browser/fileapi/isolated_file_system_backend.h13
-rw-r--r--chromium/webkit/browser/fileapi/local_file_stream_writer.cc33
-rw-r--r--chromium/webkit/browser/fileapi/local_file_stream_writer.h11
-rw-r--r--chromium/webkit/browser/fileapi/local_file_stream_writer_unittest.cc176
-rw-r--r--chromium/webkit/browser/fileapi/local_file_util.cc104
-rw-r--r--chromium/webkit/browser/fileapi/local_file_util.h36
-rw-r--r--chromium/webkit/browser/fileapi/mock_file_change_observer.cc51
-rw-r--r--chromium/webkit/browser/fileapi/mock_file_change_observer.h103
-rw-r--r--chromium/webkit/browser/fileapi/mount_points.h1
-rw-r--r--chromium/webkit/browser/fileapi/native_file_util.cc178
-rw-r--r--chromium/webkit/browser/fileapi/native_file_util.h39
-rw-r--r--chromium/webkit/browser/fileapi/native_file_util_unittest.cc412
-rw-r--r--chromium/webkit/browser/fileapi/obfuscated_file_util.cc551
-rw-r--r--chromium/webkit/browser/fileapi/obfuscated_file_util.h107
-rw-r--r--chromium/webkit/browser/fileapi/plugin_private_file_system_backend.cc48
-rw-r--r--chromium/webkit/browser/fileapi/plugin_private_file_system_backend.h29
-rw-r--r--chromium/webkit/browser/fileapi/quota/open_file_handle.cc31
-rw-r--r--chromium/webkit/browser/fileapi/quota/open_file_handle.h31
-rw-r--r--chromium/webkit/browser/fileapi/quota/open_file_handle_context.cc46
-rw-r--r--chromium/webkit/browser/fileapi/quota/open_file_handle_context.h12
-rw-r--r--chromium/webkit/browser/fileapi/quota/quota_backend_impl.cc37
-rw-r--r--chromium/webkit/browser/fileapi/quota/quota_backend_impl.h8
-rw-r--r--chromium/webkit/browser/fileapi/quota/quota_backend_impl_unittest.cc248
-rw-r--r--chromium/webkit/browser/fileapi/quota/quota_reservation.cc38
-rw-r--r--chromium/webkit/browser/fileapi/quota/quota_reservation.h18
-rw-r--r--chromium/webkit/browser/fileapi/quota/quota_reservation_buffer.cc17
-rw-r--r--chromium/webkit/browser/fileapi/quota/quota_reservation_buffer.h5
-rw-r--r--chromium/webkit/browser/fileapi/quota/quota_reservation_manager.h10
-rw-r--r--chromium/webkit/browser/fileapi/quota/quota_reservation_manager_unittest.cc358
-rw-r--r--chromium/webkit/browser/fileapi/recursive_operation_delegate.cc31
-rw-r--r--chromium/webkit/browser/fileapi/recursive_operation_delegate.h18
-rw-r--r--chromium/webkit/browser/fileapi/remove_operation_delegate.cc21
-rw-r--r--chromium/webkit/browser/fileapi/remove_operation_delegate.h8
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_database_test_helper.cc99
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_database_test_helper.h28
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_directory_database.cc38
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_directory_database.h20
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_directory_database_unittest.cc681
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_file_stream_writer.cc17
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_file_stream_writer.h6
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_file_system_backend.cc30
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_file_system_backend.h14
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc77
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_file_system_backend_delegate.h26
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_isolated_origin_database_unittest.cc41
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_origin_database.cc10
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_origin_database.h5
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_origin_database_unittest.cc308
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_prioritized_origin_database.cc30
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_prioritized_origin_database.h9
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_prioritized_origin_database_unittest.cc215
-rw-r--r--chromium/webkit/browser/fileapi/sandbox_quota_observer.cc6
-rw-r--r--chromium/webkit/browser/fileapi/test_file_set.cc76
-rw-r--r--chromium/webkit/browser/fileapi/test_file_set.h42
-rw-r--r--chromium/webkit/browser/fileapi/timed_task_helper_unittest.cc83
-rw-r--r--chromium/webkit/browser/fileapi/transient_file_util.cc10
-rw-r--r--chromium/webkit/browser/fileapi/transient_file_util.h4
-rw-r--r--chromium/webkit/browser/fileapi/upload_file_system_file_element_reader.cc117
-rw-r--r--chromium/webkit/browser/fileapi/upload_file_system_file_element_reader.h64
-rw-r--r--chromium/webkit/browser/quota/mock_quota_manager.cc199
-rw-r--r--chromium/webkit/browser/quota/mock_quota_manager.h206
-rw-r--r--chromium/webkit/browser/quota/mock_quota_manager_unittest.cc222
-rw-r--r--chromium/webkit/browser/quota/mock_special_storage_policy.cc47
-rw-r--r--chromium/webkit/browser/quota/mock_special_storage_policy.h101
-rw-r--r--chromium/webkit/browser/quota/mock_storage_client.cc186
-rw-r--r--chromium/webkit/browser/quota/mock_storage_client.h96
-rw-r--r--chromium/webkit/browser/quota/quota_database.cc18
-rw-r--r--chromium/webkit/browser/quota/quota_database.h10
-rw-r--r--chromium/webkit/browser/quota/quota_database_unittest.cc567
-rw-r--r--chromium/webkit/browser/quota/quota_manager.cc229
-rw-r--r--chromium/webkit/browser/quota/quota_manager.h80
-rw-r--r--chromium/webkit/browser/quota/quota_manager_proxy.cc160
-rw-r--r--chromium/webkit/browser/quota/quota_manager_proxy.h78
-rw-r--r--chromium/webkit/browser/quota/quota_manager_unittest.cc2165
-rw-r--r--chromium/webkit/browser/quota/quota_temporary_storage_evictor.h6
-rw-r--r--chromium/webkit/browser/quota/quota_temporary_storage_evictor_unittest.cc410
-rw-r--r--chromium/webkit/browser/quota/storage_monitor.cc379
-rw-r--r--chromium/webkit/browser/quota/storage_monitor.h180
-rw-r--r--chromium/webkit/browser/quota/storage_observer.cc65
-rw-r--r--chromium/webkit/browser/quota/storage_observer.h79
-rw-r--r--chromium/webkit/browser/quota/usage_tracker.cc34
-rw-r--r--chromium/webkit/browser/quota/usage_tracker.h12
-rw-r--r--chromium/webkit/browser/quota/usage_tracker_unittest.cc328
-rw-r--r--chromium/webkit/build/webkit_version.h.in9
-rw-r--r--chromium/webkit/child/BUILD.gn60
-rw-r--r--chromium/webkit/child/fling_animator_impl_android.cc148
-rw-r--r--chromium/webkit/child/fling_animator_impl_android.h58
-rw-r--r--chromium/webkit/child/fling_curve_configuration.cc55
-rw-r--r--chromium/webkit/child/fling_curve_configuration.h58
-rw-r--r--chromium/webkit/child/ftp_directory_listing_response_delegate.cc123
-rw-r--r--chromium/webkit/child/ftp_directory_listing_response_delegate.h53
-rw-r--r--chromium/webkit/child/multipart_response_delegate.h8
-rw-r--r--chromium/webkit/child/multipart_response_delegate_unittest.cc675
-rw-r--r--chromium/webkit/child/resource_loader_bridge.cc26
-rw-r--r--chromium/webkit/child/resource_loader_bridge.h196
-rw-r--r--chromium/webkit/child/touch_fling_gesture_curve.cc163
-rw-r--r--chromium/webkit/child/touch_fling_gesture_curve.h55
-rw-r--r--chromium/webkit/child/touch_fling_gesture_curve_unittest.cc71
-rw-r--r--chromium/webkit/child/web_discardable_memory_impl.cc48
-rw-r--r--chromium/webkit/child/web_discardable_memory_impl.h44
-rw-r--r--chromium/webkit/child/webfallbackthemeengine_impl.cc191
-rw-r--r--chromium/webkit/child/webfallbackthemeengine_impl.h39
-rw-r--r--chromium/webkit/child/webkit_child.gyp49
-rw-r--r--chromium/webkit/child/webkit_child_helpers.cc53
-rw-r--r--chromium/webkit/child/webkit_child_helpers.h21
-rw-r--r--chromium/webkit/child/webkitplatformsupport_child_impl.cc108
-rw-r--r--chromium/webkit/child/webkitplatformsupport_child_impl.h68
-rw-r--r--chromium/webkit/child/webkitplatformsupport_impl.cc947
-rw-r--r--chromium/webkit/child/webkitplatformsupport_impl.h156
-rw-r--r--chromium/webkit/child/websocketstreamhandle_bridge.h37
-rw-r--r--chromium/webkit/child/websocketstreamhandle_delegate.h44
-rw-r--r--chromium/webkit/child/websocketstreamhandle_impl.cc195
-rw-r--r--chromium/webkit/child/websocketstreamhandle_impl.h40
-rw-r--r--chromium/webkit/child/webthemeengine_impl_android.cc186
-rw-r--r--chromium/webkit/child/webthemeengine_impl_android.h26
-rw-r--r--chromium/webkit/child/webthemeengine_impl_default.cc185
-rw-r--r--chromium/webkit/child/webthemeengine_impl_default.h26
-rw-r--r--chromium/webkit/child/webthemeengine_impl_mac.cc61
-rw-r--r--chromium/webkit/child/webthemeengine_impl_mac.h25
-rw-r--r--chromium/webkit/child/webthemeengine_impl_win.cc1014
-rw-r--r--chromium/webkit/child/webthemeengine_impl_win.h49
-rw-r--r--chromium/webkit/child/webthread_impl.cc134
-rw-r--r--chromium/webkit/child/webthread_impl.h72
-rw-r--r--chromium/webkit/child/weburlloader_impl.cc857
-rw-r--r--chromium/webkit/child/weburlloader_impl.h50
-rw-r--r--chromium/webkit/child/weburlrequest_extradata_impl.cc24
-rw-r--r--chromium/webkit/child/weburlrequest_extradata_impl.h48
-rw-r--r--chromium/webkit/child/worker_task_runner.cc111
-rw-r--r--chromium/webkit/child/worker_task_runner.h59
-rw-r--r--chromium/webkit/child/worker_task_runner_unittest.cc56
-rw-r--r--chromium/webkit/common/BUILD.gn82
-rw-r--r--chromium/webkit/common/appcache/appcache_interfaces.cc34
-rw-r--r--chromium/webkit/common/appcache/appcache_interfaces.h113
-rw-r--r--chromium/webkit/common/blob/scoped_file.cc10
-rw-r--r--chromium/webkit/common/blob/shareable_file_reference_unittest.cc59
-rw-r--r--chromium/webkit/common/cursors/DEPS4
-rw-r--r--chromium/webkit/common/cursors/webcursor.cc261
-rw-r--r--chromium/webkit/common/cursors/webcursor.h195
-rw-r--r--chromium/webkit/common/cursors/webcursor_android.cc29
-rw-r--r--chromium/webkit/common/cursors/webcursor_aura.cc110
-rw-r--r--chromium/webkit/common/cursors/webcursor_aurawin.cc56
-rw-r--r--chromium/webkit/common/cursors/webcursor_aurax11.cc85
-rw-r--r--chromium/webkit/common/cursors/webcursor_gtk.cc222
-rw-r--r--chromium/webkit/common/cursors/webcursor_gtk_data.h311
-rw-r--r--chromium/webkit/common/cursors/webcursor_mac.mm395
-rw-r--r--chromium/webkit/common/cursors/webcursor_null.cc34
-rw-r--r--chromium/webkit/common/cursors/webcursor_unittest.cc244
-rw-r--r--chromium/webkit/common/cursors/webcursor_win.cc181
-rw-r--r--chromium/webkit/common/database/database_connections_unittest.cc143
-rw-r--r--chromium/webkit/common/database/database_identifier.cc13
-rw-r--r--chromium/webkit/common/database/database_identifier_unittest.cc245
-rw-r--r--chromium/webkit/common/fileapi/file_system_types.h10
-rw-r--r--chromium/webkit/common/fileapi/file_system_util.cc141
-rw-r--r--chromium/webkit/common/fileapi/file_system_util.h29
-rw-r--r--chromium/webkit/common/fileapi/file_system_util_unittest.cc263
-rw-r--r--chromium/webkit/common/gpu/BUILD.gn42
-rw-r--r--chromium/webkit/common/gpu/context_provider_in_process.cc39
-rw-r--r--chromium/webkit/common/gpu/context_provider_in_process.h15
-rw-r--r--chromium/webkit/common/gpu/context_provider_web_context.h26
-rw-r--r--chromium/webkit/common/gpu/grcontext_for_webgraphicscontext3d.cc39
-rw-r--r--chromium/webkit/common/gpu/grcontext_for_webgraphicscontext3d.h3
-rw-r--r--chromium/webkit/common/gpu/test_context_provider_factory.cc38
-rw-r--r--chromium/webkit/common/gpu/test_context_provider_factory.h38
-rw-r--r--chromium/webkit/common/gpu/webgraphicscontext3d_impl.cc984
-rw-r--r--chromium/webkit/common/gpu/webgraphicscontext3d_impl.h598
-rw-r--r--chromium/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc1063
-rw-r--r--chromium/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h519
-rw-r--r--chromium/webkit/common/gpu/webgraphicscontext3d_provider_impl.cc27
-rw-r--r--chromium/webkit/common/gpu/webgraphicscontext3d_provider_impl.h36
-rw-r--r--chromium/webkit/common/gpu/webkit_gpu.gyp9
-rw-r--r--chromium/webkit/common/quota/quota_types.h1
-rw-r--r--chromium/webkit/common/resource_devtools_info.cc16
-rw-r--r--chromium/webkit/common/resource_devtools_info.h37
-rw-r--r--chromium/webkit/common/resource_request_body.cc45
-rw-r--r--chromium/webkit/common/resource_request_body.h65
-rw-r--r--chromium/webkit/common/resource_response_info.cc25
-rw-r--r--chromium/webkit/common/resource_response_info.h103
-rw-r--r--chromium/webkit/common/resource_type.cc2
-rw-r--r--chromium/webkit/common/resource_type.h5
-rw-r--r--chromium/webkit/common/user_agent/user_agent.cc133
-rw-r--r--chromium/webkit/common/user_agent/user_agent.h29
-rw-r--r--chromium/webkit/common/user_agent/user_agent_unittest.cc55
-rw-r--r--chromium/webkit/common/user_agent/user_agent_util.cc196
-rw-r--r--chromium/webkit/common/user_agent/user_agent_util.h40
-rw-r--r--chromium/webkit/common/user_agent/user_agent_util_ios.mm130
-rw-r--r--chromium/webkit/common/user_agent/webkit_user_agent.gyp88
-rw-r--r--chromium/webkit/common/user_agent/webkit_user_agent_export.h29
-rw-r--r--chromium/webkit/common/webkit_common.gyp55
-rw-r--r--chromium/webkit/common/webpreferences.cc45
-rw-r--r--chromium/webkit/common/webpreferences.h31
-rw-r--r--chromium/webkit/glue/inspector_strings.grd26
-rw-r--r--chromium/webkit/glue/resources/default_100_percent/amex.pngbin908 -> 0 bytes
-rw-r--r--chromium/webkit/glue/resources/default_100_percent/cc-generic.pngbin341 -> 0 bytes
-rw-r--r--chromium/webkit/glue/resources/default_100_percent/diners.pngbin945 -> 0 bytes
-rw-r--r--chromium/webkit/glue/resources/default_100_percent/discover.pngbin688 -> 0 bytes
-rw-r--r--chromium/webkit/glue/resources/default_100_percent/input_speech.pngbin517 -> 0 bytes
-rw-r--r--chromium/webkit/glue/resources/default_100_percent/input_speech_recording.pngbin578 -> 0 bytes
-rw-r--r--chromium/webkit/glue/resources/default_100_percent/input_speech_waiting.pngbin577 -> 0 bytes
-rw-r--r--chromium/webkit/glue/resources/default_100_percent/jcb.pngbin1014 -> 0 bytes
-rw-r--r--chromium/webkit/glue/resources/default_100_percent/mastercard.pngbin751 -> 0 bytes
-rw-r--r--chromium/webkit/glue/resources/default_100_percent/north_east_south_west_resize_cursor.pngbin167 -> 166 bytes
-rw-r--r--chromium/webkit/glue/resources/default_100_percent/north_resize_cursor.pngbin110 -> 108 bytes
-rw-r--r--chromium/webkit/glue/resources/default_100_percent/synthetic_touch_cursor.pngbin344 -> 0 bytes
-rw-r--r--chromium/webkit/glue/resources/default_100_percent/visa.pngbin626 -> 0 bytes
-rw-r--r--chromium/webkit/glue/resources/default_200_percent/amex.pngbin1676 -> 0 bytes
-rw-r--r--chromium/webkit/glue/resources/default_200_percent/discover.pngbin1558 -> 0 bytes
-rw-r--r--chromium/webkit/glue/resources/default_200_percent/mastercard.pngbin2014 -> 0 bytes
-rw-r--r--chromium/webkit/glue/resources/default_200_percent/visa.pngbin1259 -> 0 bytes
-rw-r--r--chromium/webkit/glue/resources/webkit_resources.grd111
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_am.xtb19
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_ar.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_bg.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_bn.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_ca.xtb19
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_cs.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_da.xtb15
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_de.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_el.xtb19
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_en-GB.xtb15
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_es-419.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_es.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_et.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_fa.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_fi.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_fil.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_fr.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_gu.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_hi.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_hr.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_hu.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_id.xtb21
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_it.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_iw.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_ja.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_kn.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_ko.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_lt.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_lv.xtb15
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_ml.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_mr.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_ms.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_nl.xtb15
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_no.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_pl.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_pt-BR.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_pt-PT.xtb19
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_ro.xtb45
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_ru.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_sk.xtb17
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_sl.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_sr.xtb21
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_sv.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_sw.xtb21
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_ta.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_te.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_th.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_tr.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_uk.xtb13
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_vi.xtb17
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_zh-CN.xtb15
-rw-r--r--chromium/webkit/glue/resources/webkit_strings_zh-TW.xtb23
-rw-r--r--chromium/webkit/glue/simple_webmimeregistry_impl.cc91
-rw-r--r--chromium/webkit/glue/simple_webmimeregistry_impl.h49
-rw-r--r--chromium/webkit/glue/webfileutilities_impl.cc85
-rw-r--r--chromium/webkit/glue/webfileutilities_impl.h42
-rw-r--r--chromium/webkit/glue/webkit_glue.cc35
-rw-r--r--chromium/webkit/glue/webkit_glue.gyp17
-rw-r--r--chromium/webkit/glue/webkit_glue.gypi132
-rw-r--r--chromium/webkit/glue/webkit_glue.h28
-rw-r--r--chromium/webkit/glue/webkit_glue_export.h29
-rw-r--r--chromium/webkit/glue/webkit_glue_unittest.cc87
-rw-r--r--chromium/webkit/glue/webkit_strings.grd111
-rw-r--r--chromium/webkit/renderer/compositor_bindings/DEPS3
-rw-r--r--chromium/webkit/renderer/compositor_bindings/PRESUBMIT.py33
-rw-r--r--chromium/webkit/renderer/compositor_bindings/compositor_bindings.gyp84
-rw-r--r--chromium/webkit/renderer/compositor_bindings/compositor_bindings_dummy_unittest.cc11
-rw-r--r--chromium/webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp29
-rw-r--r--chromium/webkit/renderer/compositor_bindings/scrollbar_impl.cc106
-rw-r--r--chromium/webkit/renderer/compositor_bindings/scrollbar_impl.h50
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_animation_curve_common.cc28
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_animation_curve_common.h18
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_animation_impl.cc113
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_animation_impl.h49
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_animation_unittest.cc45
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_blend_mode.h106
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_compositing_reasons.cc151
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_compositor_support_impl.cc122
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_compositor_support_impl.h56
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_content_layer_impl.cc84
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_content_layer_impl.h56
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_external_bitmap_impl.cc44
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_external_bitmap_impl.h47
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_external_texture_layer_impl.cc130
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h73
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_filter_animation_curve_impl.cc56
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_filter_animation_curve_impl.h49
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_filter_operations_impl.cc93
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_filter_operations_impl.h49
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_float_animation_curve_impl.cc57
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h51
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_float_animation_curve_unittest.cc233
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_image_layer_impl.cc41
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_image_layer_impl.h34
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_layer_impl.cc451
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_layer_impl.h156
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc128
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h54
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc203
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_nine_patch_layer_impl.cc57
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_nine_patch_layer_impl.h41
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_rendering_stats_impl.h21
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.cc58
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.h46
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_solid_color_layer_impl.cc27
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_solid_color_layer_impl.h34
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc35
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h38
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_transform_animation_curve_impl.cc60
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_transform_animation_curve_impl.h50
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_transform_operations_impl.cc66
-rw-r--r--chromium/webkit/renderer/compositor_bindings/web_transform_operations_impl.h41
-rw-r--r--chromium/webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h30
-rw-r--r--chromium/webkit/renderer/cpp_bound_class.cc329
-rw-r--r--chromium/webkit/renderer/cpp_bound_class.h147
-rw-r--r--chromium/webkit/renderer/cpp_variant.cc268
-rw-r--r--chromium/webkit/renderer/cpp_variant.h116
-rw-r--r--chromium/webkit/renderer/cpp_variant_unittest.cc514
-rw-r--r--chromium/webkit/renderer/webkit_renderer.gyp34
-rw-r--r--chromium/webkit/renderer/webkit_renderer_export.h29
-rw-r--r--chromium/webkit/storage_browser.gyp21
-rw-r--r--chromium/webkit/storage_common.gyp3
-rw-r--r--chromium/webkit/tools/layout_tests/test_expectations.txt2
-rw-r--r--chromium/webkit/tools/layout_tests/test_expectations_asan.txt71
-rw-r--r--chromium/webkit/tools/layout_tests/test_expectations_w3c.txt14
-rw-r--r--chromium/webkit/webkit_resources.gyp2
-rw-r--r--chromium/win8/delegate_execute/chrome_util.cc10
-rw-r--r--chromium/win8/delegate_execute/command_execute_impl.cc204
-rw-r--r--chromium/win8/delegate_execute/command_execute_impl.h11
-rw-r--r--chromium/win8/delegate_execute/crash_server_init.cc4
-rw-r--r--chromium/win8/delegate_execute/delegate_execute.cc4
-rw-r--r--chromium/win8/delegate_execute/delegate_execute.gyp6
-rw-r--r--chromium/win8/delegate_execute/delegate_execute_operation.cc2
-rw-r--r--chromium/win8/delegate_execute/delegate_execute_operation.h12
-rw-r--r--chromium/win8/delegate_execute/delegate_execute_util.cc12
-rw-r--r--chromium/win8/delegate_execute/delegate_execute_util.h10
-rw-r--r--chromium/win8/delegate_execute/delegate_execute_util_unittest.cc27
-rwxr-xr-xchromium/win8/delegate_execute/post_build.bat6
-rw-r--r--chromium/win8/metro_driver/DEPS8
-rw-r--r--chromium/win8/metro_driver/chrome_app_view.cc8
-rw-r--r--chromium/win8/metro_driver/chrome_app_view.h6
-rw-r--r--chromium/win8/metro_driver/chrome_app_view_ash.cc498
-rw-r--r--chromium/win8/metro_driver/chrome_app_view_ash.h57
-rw-r--r--chromium/win8/metro_driver/chrome_url_launch_handler.cc14
-rw-r--r--chromium/win8/metro_driver/chrome_url_launch_handler.h2
-rw-r--r--chromium/win8/metro_driver/direct3d_helper.cc63
-rw-r--r--chromium/win8/metro_driver/display_properties.cc34
-rw-r--r--chromium/win8/metro_driver/display_properties.h11
-rw-r--r--chromium/win8/metro_driver/file_picker.cc28
-rw-r--r--chromium/win8/metro_driver/file_picker_ash.cc40
-rw-r--r--chromium/win8/metro_driver/file_picker_ash.h20
-rw-r--r--chromium/win8/metro_driver/ime/ime_popup_monitor.cc2
-rw-r--r--chromium/win8/metro_driver/ime/text_service.cc10
-rw-r--r--chromium/win8/metro_driver/ime/text_service_delegate.h4
-rw-r--r--chromium/win8/metro_driver/ime/text_store.cc11
-rw-r--r--chromium/win8/metro_driver/ime/text_store.h2
-rw-r--r--chromium/win8/metro_driver/ime/text_store_delegate.h4
-rw-r--r--chromium/win8/metro_driver/metro_dialog_box.cc2
-rw-r--r--chromium/win8/metro_driver/metro_dialog_box.h8
-rw-r--r--chromium/win8/metro_driver/metro_driver.cc79
-rw-r--r--chromium/win8/metro_driver/metro_driver.gyp33
-rw-r--r--chromium/win8/metro_driver/metro_driver.h4
-rw-r--r--chromium/win8/metro_driver/metro_driver_win7.cc1270
-rw-r--r--chromium/win8/metro_driver/print_document_source.cc4
-rw-r--r--chromium/win8/metro_driver/print_handler.cc4
-rw-r--r--chromium/win8/metro_driver/resources/Logo.pngbin3976 -> 3970 bytes
-rw-r--r--chromium/win8/metro_driver/resources/VisualElementsManifest.xml34
-rw-r--r--chromium/win8/metro_driver/secondary_tile.cc23
-rw-r--r--chromium/win8/metro_driver/secondary_tile.h10
-rw-r--r--chromium/win8/metro_driver/toast_notification_handler.cc5
-rw-r--r--chromium/win8/metro_driver/toast_notification_handler.h8
-rw-r--r--chromium/win8/metro_driver/winrt_utils.cc14
-rw-r--r--chromium/win8/metro_driver/winrt_utils.h6
-rwxr-xr-xchromium/win8/util/check_sdk_patch.py48
-rw-r--r--chromium/win8/util/win8_util.cc19
-rw-r--r--chromium/win8/util/win8_util.h18
-rw-r--r--chromium/win8/viewer/metro_viewer_exports.h29
-rw-r--r--chromium/win8/viewer/metro_viewer_process_host.cc295
-rw-r--r--chromium/win8/viewer/metro_viewer_process_host.h129
-rw-r--r--chromium/win8/win8.gyp46
41493 files changed, 4119232 insertions, 3821954 deletions
diff --git a/chromium/.gitattributes b/chromium/.gitattributes
new file mode 100644
index 00000000000..21a13a6c6e1
--- /dev/null
+++ b/chromium/.gitattributes
@@ -0,0 +1,7 @@
+## This page intentionally left blank. ##
+#
+# Workaround for VS2013 automatically creating .gitattributes files with
+# default settings that we don't want.
+# See also:
+# http://connect.microsoft.com/VisualStudio/feedback/details/804948/inappropriately-creates-gitattributes-file
+# http://crbug.com/342064
diff --git a/chromium/.gn b/chromium/.gn
index aaaf5e0a426..e8cf92b0482 100644
--- a/chromium/.gn
+++ b/chromium/.gn
@@ -5,4 +5,4 @@
buildconfig = "//build/config/BUILDCONFIG.gn"
# The secondary source root is a parallel directory tree where
-secondary_source = "//tools/gn/secondary/"
+secondary_source = "//build/secondary/"
diff --git a/chromium/AUTHORS b/chromium/AUTHORS
index 23347b840fd..21f28d2f0c6 100644
--- a/chromium/AUTHORS
+++ b/chromium/AUTHORS
@@ -11,9 +11,12 @@
Aaron Jacobs <samusaaron3@gmail.com>
Aaron Leventhal <aaronlevbugs@gmail.com>
Aaron Randolph <aaron.randolph@gmail.com>
+Adam Roben <adam@github.com>
Adam Treat <adam.treat@samsung.com>
Adenilson Cavalcanti <a.cavalcanti@partner.samsung.com>
Aditya Bhargava <heuristicist@gmail.com>
+Ajay Berwal <ajay.berwal@samsung.com>
+Ajith Kumar V <ajith.v@samsung.com>
Alex Gartrell <agartrell@cmu.edu>
Alex Scheele <alexscheele@gmail.com>
Alexander Sulfrian <alexander@sulfrian.net>
@@ -23,15 +26,26 @@ Alexey Korepanov <alexkorep@gmail.com>
Alexis Menard <alexis.menard@intel.com>
Alfredo Hernandez <ahernandez.miralles@gmail.com>
Ali Vathi <ali.akbar@gmail.com>
+Amogh Bihani <amogh.bihani@samsung.com>
Amruth Raj <amruthraj@motorola.com>
Amruth Raj <ckqr36@motorola.com>
Anastasios Cassiotis <tom.cassiotis@gmail.com>
+Ancil George <ancilgeorge@samsung.com>
Andrei Parvu <andrei.prv@gmail.com>
Andrei Parvu <parvu@adobe.com>
Andrew Brampton <me@bramp.net>
+Andrew Tulloch <andrew@tullo.ch>
+Anish Patankar <anish.p@samsung.com>
+Ankit Kumar <ankit2.kumar@samsung.com>
+Anssi Hannula <anssi.hannula@iki.fi>
Antonio Gomes <a1.gomes@sisa.samsung.com>
+Arnaud Renevier <a.renevier@samsung.com>
+Arpita Bahuguna <a.bah@samsung.com>
Arthur Lussos <developer0420@gmail.com>
Arun Mankuzhi <arun.m@samsung.com>
+Arunprasad Rajkumar <ararunprasad@gmail.com>
+Attila Dusnoki <dati91@gmail.com>
+Avinaash Doreswamy <avi.nitk@samsung.com>
Balazs Kelemen <b.kelemen@samsung.com>
Behara Mani Shyam Patro <behara.ms@samsung.com>
Bem Jones-Bey <bemajaniman@gmail.com>
@@ -48,11 +62,15 @@ Bruno de Oliveira Abinader <bruno.d@partner.samsung.com>
Bryan Donlan <bdonlan@gmail.com>
Byungwoo Lee <bw80.lee@samsung.com>
Caio Marcelo de Oliveira Filho <caio.de.oliveira.filho@intel.com>
+Caitlin Potter <caitpotter88@gmail.com>
Catalin Badea <badea@adobe.com>
Cem Kocagil <cem.kocagil@gmail.com>
Chamal De Silva <chamalsl@yahoo.com>
Chandra Shekar Vallala <brk376@motorola.com>
+Chang Shu <c.shu@samsung.com>
+ChangSeok Oh <shivamidow@gmail.com>
Changbin Shao <changbin.shao@intel.com>
+Chansik Yun <chansik.yun@gmail.com>
Chaobin Zhang <zhchbin@gmail.com>
Chris Harrelson <chrishtr@gmail.com>
Christophe Dumez <ch.dumez@samsung.com>
@@ -62,23 +80,32 @@ Clement Scheelfeldt Skau <clementskau@gmail.com>
Clinton Staley <clintstaley@chromium.org>
Clinton Staley <clintstaley@gmail.com>
Craig Schlenter <craig.schlenter@gmail.com>
+Daegyu Lee <na7jun8gi@gmail.com>
Dai Chunyang <chunyang.dai@intel.com>
+Daniel Johnson <danielj41@gmail.com>
Daniel Nishi <dhnishi@gmail.com>
Daniel Shaulov <dshaulov@ptc.com>
Daniel Trebbien <dtrebbien@gmail.com>
David Benjamin <davidben@mit.edu>
David Erceg <erceg.david@gmail.com>
David Futcher <david.mike.futcher@gmail.com>
+Deepak Singla <deepak.sa@samsung.com>
Derek Halman <d.halman@gmail.com>
Devlin Cronin <rdevlin.cronin@gmail.com>
+Diego Ferreiro Val <elfogris@gmail.com>
Dillon Sellars <dill.sellars@gmail.com>
Dominic Jodoin <dominic.jodoin@gmail.com>
Dominik Röttsches <dominik.rottsches@intel.com>
Don Woodward <woodward@adobe.com>
Dongseong Hwang <dongseong.hwang@intel.com>
Dongwoo Joshua Im <dw.im@samsung.com>
+Douglas F. Turner <doug.turner@gmail.com>
+Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
Edward Crossman <tedoc2000@gmail.com>
+Eero Häkkinen <e.hakkinen@partner.samsung.com>
Ehsan Akhgari <ehsan.akhgari@gmail.com>
+Elan Ruusamäe <elan.ruusamae@gmail.com>
+Eric Ahn <byungwook.ahn@gmail.com>
Eric Rescorla <ekr@rtfm.com>
Erik Hill <erikghill@gmail.com>
Erik Sjölund <erik.sjolund@gmail.com>
@@ -89,8 +116,10 @@ Evan Wallace <evan.exe@gmail.com>
Evangelos Foutras <evangelos@foutrelis.com>
Fabien Tassin <fta@sofaraway.org>
Felix H. Dahlke <fhd@ubercode.de>
+Fernando Jiménez Moreno <ferjmoreno@gmail.com>
François Beaufort <beaufort.francois@gmail.com>
Francois Kritzinger <francoisk777@gmail.com>
+Frédéric Wang <fred.wang@free.fr>
Gaetano Mendola <mendola@gmail.com>
Gajendra Singh <wxjg68@motorola.com>
Gao Chun <gaochun.dev@gmail.com>
@@ -98,22 +127,34 @@ George Liaskos <geo.liaskos@gmail.com>
Giuseppe Iuculano <giuseppe@iuculano.it>
Glenn Adams <glenn@chromium.org>
Gnanasekar Somanathan <gnanasekar.s@samsung.com>
+Gordana Cmiljanovic <gordana.cmiljanovic@imgtec.com>
Goutham Jagannatha <wrm364@motorola.com>
+Gregory Davis <gpdavis.chromium@gmail.com>
Grzegorz Czajkowski <g.czajkowski@samsung.com>
Guangzhen Li <guangzhen.li@intel.com>
+Gurpreet Kaur <k.gurpreet@samsung.com>
Gyuyoung Kim <gyuyoung.kim@samsung.com>
Habib Virji <habib.virji@samsung.com>
Haitao Feng <haitao.feng@intel.com>
Halton Huo <halton.huo@intel.com>
Haojian Wu <hokein.wu@gmail.com>
+Harpreet Singh Khurana <harpreet.sk@samsung.com>
Hautio Kari <khautio@gmail.com>
+Heejin R. Chung <heejin.r.chung@samsung.com>
+Himanshu Joshi <h.joshi@samsung.com>
+Hong Zheng <hong.zheng@intel.com>
Hongbo Min <hongbo.min@intel.com>
Horia Olaru <horia.olaru@gmail.com>
Horia Olaru <olaru@adobe.com>
+Hosung You <hosung.you@samsung.com>
+Hyunki Baik <hyunki.baik@samsung.com>
+Hyungwook Lee <withlhw@gmail.com>
Ibrar Ahmed <ibrar.ahmad@gmail.com>
Ion Rosca <rosca@adobe.com>
J. Ryan Stinnett <jryans@chromium.org>
Jacob Mandelson <jacob@mandelson.org>
+Jaehun Lim <ljaehun.lim@samsung.com>
+Jaekyeom Kim <btapiz@gmail.com>
Jaime Soriano Pastor <jsorianopastor@gmail.com>
Jake Helfert <jake@helfert.us>
Jakob Weigert <jakob.j.w@googlemail.com>
@@ -125,16 +166,24 @@ Janwar Dinata <j.dinata@gmail.com>
Jared Shumway <jaredshumway94@gmail.com>
Jared Wein <weinjared@gmail.com>
Jay Soffian <jaysoffian@gmail.com>
+Jeado Ko <haibane84@gmail.com>
Jesse Miller <jesse@jmiller.biz>
Jesus Sanchez-Palencia <jesus.sanchez-palencia.fernandez.fil@intel.com>
+Jie Chen <jie.a.chen@intel.com>
+Jihun Brent Kim <devgrapher@gmail.com>
Jin Yang <jin.a.yang@intel.com>
+Jincheol Jo <jincheol.jo@navercorp.com>
Jingwei Liu <kingweiliu@gmail.com>
+Jingyi Wei <wjywbs@gmail.com>
+Jinho Bang <jinho.bang@samsung.com>
Jinwoo Song <jinwoo7.song@samsung.com>
Joe Knoll <joe.knoll@workday.com>
Joe Thomas <mhx348@motorola.com>
Joel Stanley <joel@jms.id.au>
Johannes Rudolph <johannes.rudolph@googlemail.com>
John Yani <vanuan@gmail.com>
+Jonathan Hacker <jhacker@arcanefour.com>
+Jongsoo Lee <leejongsoo@gmail.com>
Joone Hur <joone.hur@intel.com>
Jorge Villatoro <jorge@tomatocannon.com>
Joseph Gentle <josephg@gmail.com>
@@ -142,7 +191,10 @@ Josh Triplett <josh.triplett@intel.com>
Joshua Lock <joshua.lock@intel.com>
Joshua Roesslein <jroesslein@gmail.com>
Josué Ratelle <jorat1346@gmail.com>
+Juhui Lee <juhui24.lee@samsung.com>
+Julien Racle <jracle@logitech.com>
Jun Jiang <jun.a.jiang@intel.com>
+JungJik Lee <jungjik.lee@samsung.com>
Junmin Zhu <junmin.zhu@intel.com>
Kalyan Kondapally <kalyan.kondapally@intel.com>
Kamil Jiwa <kamil.jiwa@gmail.com>
@@ -150,8 +202,10 @@ Kangil Han <kangil.han@samsung.com>
Kangyuan Shu <kangyuan.shu@intel.com>
Kaspar Brand <googlecontrib@velox.ch>
Kaustubh Atrawalkar <kaustubh.ra@gmail.com>
+Kaustubh Atrawalkar <kaustubh.a@samsung.com>
Keene Pan <keenepan@linpus.com>
Kenneth Rohde Christiansen <kenneth.r.christiansen@intel.com>
+Keonho Kim <keonho07.kim@samsung.com>
Kevin Lee Helpingstine <sig11@reprehensible.net>
Kevin M. McCormick <mckev@amazon.com>
Kihong Kwon <kihong.kwon@samsung.com>
@@ -160,8 +214,10 @@ Krzysztof Wolanski <k.wolanski@samsung.com>
Kunal Thakar <kunalt@gmail.com>
Kushal Pisavadia <kushi.p@gmail.com>
Kyle Nahrgang <kpn24@drexel.edu>
+Kyung Yeol Kim <chitacan@gmail.com>
Laszlo Gombos <l.gombos@samsung.com>
Laszlo Radanyi <bekkra@gmail.com>
+Lauren Yeun Kim <lauren.yeun.kim@gmail.com>
Lauri Oherd <lauri.oherd@gmail.com>
Leith Bade <leith@leithalweapon.geek.nz>
Li Yin <li.yin@intel.com>
@@ -171,9 +227,13 @@ Luke Inman-Semerau <luke.semerau@gmail.com>
Luke Zarko <lukezarko@gmail.com>
Maarten Lankhorst <m.b.lankhorst@gmail.com>
Magnus Danielsson <fuzzac@gmail.com>
+Mahesh Kulkarni <mahesh.kk@samsung.com>
+Malcolm Wang <malcolm.2.wang@gmail.com>
+Manuel Braun <thembrown@gmail.com>
Mao Yujie <maojie0924@gmail.com>
Mao Yujie <yujie.mao@intel.com>
Marco Rodrigues <gothicx@gmail.com>
+Mario Sanchez Prada <mario.prada@samsung.com>
Mark Hahnenberg <mhahnenb@andrew.cmu.edu>
Mark Seaborn <mrs@mythic-beasts.com>
Martin Bednorz <m.s.bednorz@gmail.com>
@@ -182,11 +242,13 @@ Matheus Bratfisch <matheusbrat@gmail.com>
Mathias Bynens <mathias@qiwi.be>
Matt Arpidone <mma.public@gmail.com>
Matthew Robertson <matthewrobertson03@gmail.com>
+Matthew Turk <matthewturk@gmail.com>
Matthew Willis <appamatto@gmail.com>
Matthias Reitinger <reimarvin@gmail.com>
Max Perepelitsyn <pph34r@gmail.com>
Max Vujovic <mvujovic@adobe.com>
Michael Gilbert <floppymaster@gmail.com>
+Michael Schechter <mike.schechter@gmail.com>
Michael Zugelder <michael@zugelder.org>
Mihai Maerean <mmaerean@adobe.com>
Mihai Tica <mihai.o.tica@gmail.com>
@@ -201,12 +263,16 @@ Mohamed I. Hammad <ibraaaa@gmail.com>
Mohamed Mansour <m0.interactive@gmail.com>
Mrunal Kapade <mrunal.kapade@intel.com>
Myles C. Maxfield <mymax@amazon.com>
+Naiem Shaik <naiem.shaik@gmail.com>
Naoki Takano <takano.naoki@gmail.com>
Naveen Bobbili <naveenbobbili@motorola.com>
Naveen Bobbili <qghc36@motorola.com>
+Naveen Kumar S G <naveensg@samsung.com>
Nayan Kumar K <qtc746@motorola.com>
+Nikhil Bansal <n.bansal@samsung.com>
Nikita Ofitserov <himikof@gmail.com>
Ningxin Hu <ningxin.hu@intel.com>
+Nitish Mehrotra <nitish.m@samsung.com>
Pan Deng <pan.deng@intel.com>
Parag Radke <nrqv63@motorola.com>
Patrasciuc Sorin Cristian <cristian.patrasciuc@gmail.com>
@@ -216,22 +282,29 @@ Paul Kehrer <paul.l.kehrer@gmail.com>
Paul Lind <paul.lind@imgtec.com>
Paul Nettleship <pnettleship@gmail.com>
Paul Robinson <paulrobinson85@googlemail.com>
+Paul Roskell <blurrech@gmail.com>
Paul Wicks <pwicks86@gmail.com>
Pavan Kumar Emani <pavan.e@samsung.com>
Pavel Ivanov <paivanof@gmail.com>
Paweł Hajdan jr <phajdan.jr@gmail.com>
+Peng Jiang <leiyi.jp@gmail.com>
Petar Jovanovic <petarj@mips.com>
Peter Beverloo <peter@chromium.org>
Peter Bright <drpizza@quiscalusmexicanus.org>
Peter Brophy <pbrophy@adobe.com>
Peter Collingbourne <peter@pcc.me.uk>
+Peter Gal <pgal.u-szeged@partner.samsung.com>
Philippe Beauchamp <philippe.beauchamp@gmail.com>
Philippe Beaudoin <philippe.beaudoin@gmail.com>
Pierre-Antoine LaFayette <pierre.lafayette@gmail.com>
Po-Chun Chang <pochang0403@gmail.com>
Prashant Nevase <prashant.n@samsung.com>
+Pritam Nikam <pritam.nikam@samsung.com>
+Puttaraju R <puttaraju.r@samsung.com>
Qiankun Miao <qiankun.miao@intel.com>
+Qing Zhang <qing.zhang@intel.com>
Radu Stavila <stavila@adobe.com>
+Raghavendra Ghatage <r.ghatage@samsung.com>
Raman Tenneti <raman.tenneti@gmail.com>
Ramkumar Gokarnesan <ramkumar.gokarnesan@gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com>
@@ -239,21 +312,30 @@ Randy Posynick <randy.posynick@gmail.com>
Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Ravi Phaneendra Kasibhatla <r.kasibhatla@samsung.com>
Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com>
+Renata Hodovan <rhodovan.u-szeged@partner.samsung.com>
Rene Bolldorf <rb@radix.io>
+Rene Ladan <r.c.ladan@gmail.com>
Rijubrata Bhaumik <rijubrata.bhaumik@intel.com>
Rob Buis <rob.buis@samsung.com>
+Rob Wu <rob@robwu.nl>
Robert Bear Travis <bear.travis@gmail.com>
Robert Bear Travis <betravis@adobe.com>
+Robert Bradford <robert.bradford@intel.com>
Robert Goldberg <goldberg@adobe.com>
+Robert Hogan <robhogan@gmail.com>
Robert Nagy <robert.nagy@gmail.com>
Robert Sesek <rsesek@bluestatic.org>
+Roland Takacs <rtakacs.u-szeged@partner.samsung.com>
Rosen Dash <nqk836@motorola.com>
Rosen Dash <rosen.dash@gmail.com>
ruben <chromium@hybridsource.org>
Ruben Terrazas <rubentopo@gmail.com>
+Ruiyi Luo <luoruiyi2008@gmail.com>
Ryan Norton <rnorton10@gmail.com>
Ryan Sleevi <ryan-chromium-dev@sleevi.com>
Ryuan Choi <ryuan.choi@samsung.com>
+Saikrishna Arcot <saiarcot895@gmail.com>
+Salvatore Iovene <salvatore.iovene@intel.com>
Sam Larison <qufighter@gmail.com>
Sam McDonald <sam@sammcd.com>
Sanjoy Pal <ncj674@motorola.com>
@@ -265,6 +347,7 @@ Scott Blomquist <sblom@microsoft.com>
Sean Bryant <sean@cyberwang.net>
Seo Sanghyeon <sanxiyn@gmail.com>
Seokju Kwon <seokju.kwon@gmail.com>
+Sergey Putilin <p.sergey@samsung.com>
Sergio Carlos Morales Angeles <carloschilazo@gmail.com>
Sergiy Byelozyorov <rryk.ua@gmail.com>
Seshadri Mahalingam <seshadri.mahalingam@gmail.com>
@@ -275,21 +358,32 @@ Shiliu Wang <aofdwsl@gmail.com>
Shouqun Liu <shouqun.liu@intel.com>
Shreyas VA <v.a.shreyas@gmail.com>
Simon Arlott <simon.arlott@gmail.com>
+Siva Kumar Gunturi <siva.gunturi@samsung.com>
+Sohan Jyoti Ghosh <sohan.jyoti@samsung.com>
Song YeWen <ffmpeg@gmail.com>
Soren Dreijer <dreijerbit@gmail.com>
+Srirama Chandra Sekhar Mogali <srirama.m@samsung.com>
Stephen Searles <stephen.searles@gmail.com>
Steven Pennington <spenn@engr.uvic.ca>
+Subrahmanya Praveen Munukutla <sataya.m@samsung.com>
Suchit Agrawal <a.suchit@samsung.com>
Sudarsana Babu Nagineni <sudarsana.nagineni@intel.com>
Sudarshan Parthasarathy <sudarshan.p@samsung.com>
Sungguk Lim <limasdf@gmail.com>
Sungmann Cho <sungmann.cho@gmail.com>
+Sungmann Cho <sungmann.cho@navercorp.com>
+Suyash Sengar <suyash.s@samsung.com>
+Sunil Ratnu <sunil.ratnu@samsung.com>
Sylvain Zimmer <sylvinus@gmail.com>
Szymon Piechowicz <szymonpiechowicz@o2.pl>
+Takeshi Kurosawa <taken.spc@gmail.com>
+Tapu Kumar Ghose <ghose.tapu@gmail.com>
Taylor Price <trprice@gmail.com>
+Ted Kim <neot0000@gmail.com>
Ted Vessenes <tedvessenes@gmail.com>
Teodora Novkovic <teodora.petrovic@gmail.com>
Thiago Farina <thiago.farina@gmail.com>
+Thiago Marcos P. Santos <thiago.santos@intel.com>
Tiago Vignatti <tiago.vignatti@intel.com>
Tim Ansell <mithro@mithis.com>
Timo Reimann <ttr314@googlemail.com>
@@ -297,6 +391,7 @@ Torsten Kurbad <google@tk-webart.de>
Trevor Perrin <unsafe@trevp.net>
Umar Hansa <umar.hansa@gmail.com>
Vamshikrishna Yellenki <vamshi@motorola.com>
+Vani Hegde <vani.hegde@samsung.com>
Vedran Šajatović <vedran.sajatovic@gmail.com>
Vernon Tang <vt@foilhead.net>
Viatcheslav Ostapenko <sl.ostapenko@samsung.com>
@@ -308,26 +403,37 @@ Vivek Galatage <vivek.vg@samsung.com>
Will Hirsch <chromium@willhirsch.co.uk>
Xinchao He <hexinchao@gmail.com>
Xu Samuel <samuel.xu@intel.com>
+Xuefei Ren <xrenishere@gmail.com>
Yael Aharon <yael.aharon@intel.com>
Yair Yogev <progame@chromium.org>
Yang Gu <yang.gu@intel.com>
Yarin Kaul <yarin.kaul@gmail.com>
+Ye Liu <cbakgly@gmail.com>
+Yi Shen <yi.shen@samsung.com>
Yoav Weiss <yoav@yoav.ws>
Yoav Zilberberg <yoav.zilberberg@gmail.com>
Yong Shin <sy3620@gmail.com>
Yongsheng Zhu <yongsheng.zhu@intel.com>
Yoshinori Sano <yoshinori.sano@gmail.com>
YoungKi Hong <simon.hong81@gmail.com>
+Youngsun Suh <zard17@gmail.com>
Yumikiyo Osanai <yumios.art@gmail.com>
Yuri Gorobets <yuri.gorobets@gmail.com>
Zeno Albisser <zeno.albisser@digia.com>
Zheng Chuang <zhengchuangscu@gmail.com>
+Zhenyu Liang <zhenyu.liang@intel.com>
+Zhenyu Shan <zhenyu.shan@intel.com>
Ziran Sun <ziran.sun@samsung.com>
+Yongha Lee <yongha78.lee@samsung.com>
方觉 (Fang Jue) <fangjue23303@gmail.com>
+Yupei Wang <perryuwang@tencent.com>
+Peng Hu <penghu@tencent.com>
+BlackBerry Limited <*@blackberry.com>
Code Aurora Forum <*@codeaurora.org>
Comodo CA Limited
Google Inc. <*@google.com>
+Igalia S.L. <*@igalia.com>
NVIDIA Corporation <*@nvidia.com>
Opera Software ASA <*@opera.com>
The Chromium Authors <*@chromium.org>
diff --git a/chromium/Android.mk b/chromium/Android.mk
index aaeed5ca2d7..487118520af 100644
--- a/chromium/Android.mk
+++ b/chromium/Android.mk
@@ -3,26 +3,71 @@
# found in the LICENSE file.
# This Android makefile is used to build WebView in the Android build system.
-# gyp autogenerates most of the real makefiles, which we just include here if
-# we are doing a WebView build. For other builds, this makefile does nothing,
-# which prevents the Android build system from mistakenly loading any other
-# Android.mk that may exist in the Chromium tree.
+# gyp autogenerates most of the real makefiles, which we include below.
-CHROMIUM_DIR := $(call my-dir)
-
-# Assume that if the gyp autogenerated makefile exists, we are doing the
-# WebView build using the Android build system.
-ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk))
-
-# Don't include anything if the product is using a prebuilt webviewchromium.
+# Don't do anything if the product is using a prebuilt webviewchromium, to avoid
+# duplicate target definitions between this directory and the prebuilts.
ifneq ($(PRODUCT_PREBUILT_WEBVIEWCHROMIUM),yes)
+CHROMIUM_DIR := $(call my-dir)
+
# We default to release for the Android build system. Developers working on
# WebView code can build with "make GYP_CONFIGURATION=Debug".
GYP_CONFIGURATION := Release
-include $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk
+# Include the manually-written makefile that builds all the WebView java code.
include $(CHROMIUM_DIR)/android_webview/Android.mk
+# If the gyp-generated makefile exists for the current host OS and primary
+# target architecture, we need to include it. If it doesn't exist then just do
+# nothing, since we may not have finished bringing up this architecture yet.
+ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk))
+
+# We set GYP_VAR_PREFIX to the empty string to indicate that we are building for
+# the primary target architecture.
+GYP_VAR_PREFIX :=
+
+# If the host is declared as being 64-bit, set the host multilib variables
+# appropriately to ensure that the host targets are the same "bitness" as the
+# primary target, which is required by V8.
+ifeq ($(HOST_IS_64_BIT),true)
+ifeq ($(TARGET_IS_64_BIT),true)
+GYP_HOST_VAR_PREFIX :=
+GYP_HOST_MULTILIB := 64
+else # Target is 32-bit.
+GYP_HOST_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX)
+GYP_HOST_MULTILIB := 32
+endif
+endif
+
+include $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk
+
+endif # End primary architecture handling.
+
+# Do the same check for the secondary architecture; if this doesn't exist then
+# the current target platform probably doesn't have a secondary architecture and
+# we can just do nothing.
+ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk))
+
+# We set GYP_VAR_PREFIX to $(TARGET_2ND_ARCH_VAR_PREFIX) to indicate that we are
+# building for the secondary target architecture.
+GYP_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
+
+# If the host is declared as being 64-bit, set the host multilib variables
+# appropriately to ensure that the host targets are the same "bitness" as the
+# secondary target, which is required by V8.
+ifeq ($(HOST_IS_64_BIT),true)
+ifeq ($(2ND_TARGET_IS_64_BIT),true)
+GYP_HOST_VAR_PREFIX :=
+GYP_HOST_MULTILIB := 64
+else # Second target is 32-bit.
+GYP_HOST_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX)
+GYP_HOST_MULTILIB := 32
+endif
endif
+
+include $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk
+
+endif # End secondary architecture handling.
+
endif
diff --git a/chromium/BUILD.gn b/chromium/BUILD.gn
new file mode 100644
index 00000000000..4308624eddf
--- /dev/null
+++ b/chromium/BUILD.gn
@@ -0,0 +1,160 @@
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This is the root build file for GN. GN will start processing by loading this
+# file, and recursively load all dependencies until all dependencies are either
+# resolved or known not to exist (which will cause the build to fail). So if
+# you add a new build file, there must be some path of dependencies from this
+# file to your new one or GN won't know about it.
+
+import("//build/config/ui.gni")
+
+# In GN, a "group" is a dummy target that just lists other targets.
+group("root") {
+ # Note that some dependencies are commented out. These are things that are
+ # currently written but not hooked up to the build yet. They may need to be
+ # completed or possibly just tested and then re-enabled.
+ deps = [
+ # This is a temporary test of the not-yet-complete NaCl cross-compilation.
+ #"//base(//build/toolchain/nacl:x86_newlib)",
+
+ "//apps/common/api:apps_api",
+ "//cc",
+ "//chrome/common",
+ "//components:all_components",
+ "//content",
+ "//crypto",
+ "//extensions/common/api:extensions_api",
+ "//device/usb",
+ "//gin",
+ "//gpu",
+ "//google_apis",
+ "//ipc",
+ "//mojo",
+ "//mojo/common",
+ "//mojo/environment:chromium",
+ "//mojo/service_manager",
+ "//mojo/system",
+ "//net",
+ "//pdf",
+ "//ppapi:ppapi_c",
+ "//printing",
+ "//sandbox",
+ "//sdch",
+ "//skia",
+ "//sql",
+ "//third_party/angle:translator",
+ "//third_party/brotli",
+ "//third_party/ffmpeg",
+ "//third_party/flac",
+ "//third_party/harfbuzz-ng",
+ "//third_party/iccjpeg",
+ "//third_party/icu",
+ "//third_party/leveldatabase",
+ "//third_party/libpng",
+ "//third_party/libusb",
+ "//third_party/libwebm",
+ "//third_party/libwebp",
+ "//third_party/libxslt",
+ "//third_party/libyuv",
+ "//third_party/lzma_sdk",
+ "//third_party/mesa",
+ "//third_party/ots",
+ "//third_party/protobuf:protobuf_lite",
+ "//third_party/qcms",
+ "//third_party/re2",
+ "//third_party/smhasher:cityhash",
+ "//third_party/smhasher:murmurhash3",
+ "//third_party/smhasher:pmurhash",
+ "//third_party/speex",
+ "//third_party/WebKit/public:all_blink",
+ "//third_party/widevine/cdm:version_h",
+ "//third_party/zlib",
+ "//third_party:jpeg",
+ "//tools/gn",
+ "//ui/aura",
+ "//ui/accessibility",
+ "//ui/base",
+ "//ui/events",
+ "//ui/gfx",
+ "//ui/gl",
+ "//ui/native_theme",
+ "//ui/resources",
+ "//ui/snapshot",
+ "//ui/strings",
+ "//ui/surface",
+ "//url",
+ "//v8:v8",
+ "//webkit/browser:storage",
+ "//webkit/child",
+ ]
+
+ if (!is_win) {
+ deps += [ "//breakpad:symupload" ]
+ }
+
+ if (is_linux) {
+ deps += [
+ "//dbus",
+ "//third_party/fontconfig",
+ "//third_party/freetype2",
+ ]
+ }
+
+ if (is_win) {
+ deps += [
+ "//ui/metro_viewer",
+ ]
+ }
+
+ if (is_win || is_mac || is_chromeos) {
+ # RLZ works on these platforms.
+ deps += [
+ "//rlz:rlz_lib",
+ ]
+ }
+
+ if (cpu_arch == "x86" || cpu_arch == "x64") {
+ # YASM is x86/x64 only.
+ deps += [ "//third_party/yasm($host_toolchain)" ]
+ }
+
+ if (is_android) {
+ deps -= [
+ "//cc",
+ "//chrome/common", # Blocked on content.
+ "//content",
+ "//extensions/common/api:extensions_api",
+ "//pdf", # Not compiled on Android in GYP yet, either.
+ "//ppapi:ppapi_c",
+ "//sandbox",
+ "//third_party/libusb",
+
+ # Seems to not be compiled on Android. Otherwise it will need a config.h.
+ "//third_party/libxslt",
+
+ "//tools/gn",
+ "//ui/aura",
+
+ # Fails on Android for unknown reasons.
+ "//third_party/flac",
+ "//breakpad:symupload",
+
+ # TODO(brettw) make Blink work on Android.
+ "//third_party/WebKit/public:all_blink",
+
+ # Not tested on Android yet:
+ "//third_party/ffmpeg",
+ "//webkit/browser:storage",
+ "//webkit/child",
+ ]
+ }
+
+ if (use_ozone) {
+ deps += [
+ "//ui/events/ozone:events_ozone",
+ "//ui/events/ozone:events_ozone_evdev",
+ ]
+ }
+}
diff --git a/chromium/DEPS b/chromium/DEPS
index 529f49ecd92..dcf05a2f0d5 100644
--- a/chromium/DEPS
+++ b/chromium/DEPS
@@ -1,700 +1,764 @@
-# This file is automatically processed to create .DEPS.git which is the file
-# that gclient uses under git.
-#
-# See http://code.google.com/p/chromium/wiki/UsingGit
-#
-# To test manually, run:
-# python tools/deps2git/deps2git.py -o .DEPS.git
-# gclient runhooks
-# DO NOT CHECK IN CHANGES TO .DEPS.git. It will be automatically updated by
-# a bot when you modify this one.
-#
-# When adding a new dependency, please update the top-level .gitignore file
-# to list the dependency's destination directory.
-
-vars = {
- # Use this googlecode_url variable only if there is an internal mirror for it.
- # If you do not know, use the full path while defining your new deps entry.
- "googlecode_url": "http://%s.googlecode.com/svn",
- "sourceforge_url": "http://svn.code.sf.net/p/%(repo)s/code",
- "webkit_trunk": "http://src.chromium.org/blink/trunk",
- "nacl_trunk": "http://src.chromium.org/native_client/trunk",
- "webkit_revision": "163968",
- "chromium_git": "https://chromium.googlesource.com",
- "chromiumos_git": "https://chromium.googlesource.com/chromiumos",
- "skia_git": "https://skia.googlesource.com",
- "swig_revision": "230490",
- "nacl_revision": "12544",
- # After changing nacl_revision, run 'glient sync' and check native_client/DEPS
- # to update other nacl_*_revision's.
- "nacl_tools_revision": "12526", # native_client/DEPS: tools_rev
- "gtm_revision": "616",
- "libaddressinput_revision": "176",
- "libphonenumber_revision": "621",
- "libvpx_revision": "240222",
- "lss_revision": "24",
-
- # These two FFmpeg variables must be updated together. One is used for SVN
- # checkouts and the other for Git checkouts.
- "ffmpeg_revision": "240434",
- "ffmpeg_hash": "c6c988923be6b8fd1f381522d478813e14505ce2",
-
- "sfntly_revision": "228",
- "lighttpd_revision": "33737",
- "skia_revision": "12678",
- "skia_hash": "e132f5031fb700e34af1ea08b575b2c774393047",
- # Three lines of non-changing comments so that
- # the commit queue can handle CLs rolling Skia
- # and V8 without interference from each other.
- "v8_revision": "18251",
- # Three lines of non-changing comments so that
- # the commit queue can handle CLs rolling WebRTC
- # and V8 without interference from each other.
- "webrtc_revision": "5301",
- "jsoncpp_revision": "248",
- "nss_revision": "239365",
- # Three lines of non-changing comments so that
- # the commit queue can handle CLs rolling swarming_client
- # and whatever else without interference from each other.
- "swarming_revision": "f89de358c2edb260e0ca8429c16d1037a4ec4fa4",
- # Three lines of non-changing comments so that
- # the commit queue can handle CLs rolling openssl
- # and whatever else without interference from each other.
- "openssl_revision": "236537",
-}
-
-deps = {
- "src/breakpad/src":
- (Var("googlecode_url") % "google-breakpad") + "/trunk/src@1253",
-
- "src/sdch/open-vcdiff":
- (Var("googlecode_url") % "open-vcdiff") + "/trunk@42",
-
- "src/testing/gtest":
- (Var("googlecode_url") % "googletest") + "/trunk@643",
-
- "src/testing/gmock":
- (Var("googlecode_url") % "googlemock") + "/trunk@410",
-
- "src/third_party/angle":
- Var("chromium_git") +
- "/angle/angle.git@95fa672f26db492aee2076b0acb524149d52c68f",
-
- "src/third_party/trace-viewer":
- (Var("googlecode_url") % "trace-viewer") + "/trunk@1069",
-
- "src/third_party/WebKit":
- Var("webkit_trunk") + "@" + Var("webkit_revision"),
-
- "src/third_party/icu":
- "/trunk/deps/third_party/icu46@239289",
-
- "src/third_party/libexif/sources":
- "/trunk/deps/third_party/libexif/sources@146817",
-
- "src/third_party/hunspell":
- "/trunk/deps/third_party/hunspell@206172",
-
- "src/third_party/hunspell_dictionaries":
- "/trunk/deps/third_party/hunspell_dictionaries@193701",
-
- "src/third_party/safe_browsing/testing":
- (Var("googlecode_url") % "google-safe-browsing") + "/trunk/testing@112",
-
- "src/third_party/cacheinvalidation/src":
- (Var("googlecode_url") % "google-cache-invalidation-api") +
- "/trunk/src@314",
-
- "src/third_party/leveldatabase/src":
- (Var("googlecode_url") % "leveldb") + "/trunk@78",
-
- "src/third_party/snappy/src":
- (Var("googlecode_url") % "snappy") + "/trunk@80",
-
- "src/tools/grit":
- (Var("googlecode_url") % "grit-i18n") + "/trunk@140",
-
- "src/tools/gyp":
- (Var("googlecode_url") % "gyp") + "/trunk@1806",
-
- "src/tools/swarming_client":
- Var("chromium_git") + "/external/swarming.client.git@" +
- Var("swarming_revision"),
-
- "src/v8":
- (Var("googlecode_url") % "v8") + "/trunk@" + Var("v8_revision"),
-
- "src/native_client":
- Var("nacl_trunk") + "/src/native_client@" + Var("nacl_revision"),
-
- "src/chrome/test/data/extensions/api_test/permissions/nacl_enabled/bin":
- Var("nacl_trunk") + "/src/native_client/tests/prebuilt@" +
- Var("nacl_revision"),
-
- "src/third_party/sfntly/cpp/src":
- (Var("googlecode_url") % "sfntly") + "/trunk/cpp/src@" +
- Var("sfntly_revision"),
-
- "src/third_party/skia/src":
- (Var("googlecode_url") % "skia") + "/trunk/src@" + Var("skia_revision"),
-
- "src/third_party/skia/gyp":
- (Var("googlecode_url") % "skia") + "/trunk/gyp@" + Var("skia_revision"),
-
- "src/third_party/skia/include":
- (Var("googlecode_url") % "skia") + "/trunk/include@" + Var("skia_revision"),
-
- "src/third_party/ots":
- (Var("googlecode_url") % "ots") + "/trunk@107",
-
- "src/third_party/brotli/src":
- Var("chromium_git") +
- "/external/font-compression-reference.git@fe79fac8da1ec850d94679705a6f3405153f51dd",
-
- "src/tools/page_cycler/acid3":
- "/trunk/deps/page_cycler/acid3@171600",
-
- "src/chrome/test/data/perf/canvas_bench":
- "/trunk/deps/canvas_bench@122605",
-
- "src/chrome/test/data/perf/frame_rate/content":
- "/trunk/deps/frame_rate/content@93671",
-
- "src/chrome/test/data/perf/third_party/octane":
- (Var("googlecode_url") % "octane-benchmark") + "/trunk@19",
-
- "src/third_party/bidichecker":
- (Var("googlecode_url") % "bidichecker") + "/trunk/lib@4",
-
- "src/third_party/webgl/src":
- Var("chromium_git") +
- "/external/khronosgroup/webgl.git@159f31dd34842c871032d97d360a9dce5153f585",
-
- "src/third_party/swig/Lib":
- "/trunk/deps/third_party/swig/Lib@" + Var("swig_revision"),
-
- # Make sure you update the two functional.DEPS and webdriver.DEPS too.
- "src/third_party/webdriver/pylib":
- (Var("googlecode_url") % "selenium") + "/trunk/py@18337",
-
- "src/third_party/libvpx":
- "/trunk/deps/third_party/libvpx@" +
- Var("libvpx_revision"),
-
- "src/third_party/ffmpeg":
- "/trunk/deps/third_party/ffmpeg@" +
- Var("ffmpeg_revision"),
-
- "src/third_party/libjingle/source/talk":
- (Var("googlecode_url") % "webrtc") + "/branches/3.48/talk@5413",
-
- "src/third_party/usrsctp/usrsctplib":
- (Var("googlecode_url") % "sctp-refimpl") +
- "/trunk/KERN/usrsctp/usrsctplib@8723",
-
- "src/third_party/libsrtp":
- "/trunk/deps/third_party/libsrtp@214783",
-
- "src/third_party/speex":
- "/trunk/deps/third_party/speex@198168",
-
- "src/third_party/yasm/source/patched-yasm":
- "/trunk/deps/third_party/yasm/patched-yasm@167605",
-
- "src/third_party/libjpeg_turbo":
- "/trunk/deps/third_party/libjpeg_turbo@239583",
-
- "src/third_party/flac":
- "/trunk/deps/third_party/flac@222897",
-
- "src/third_party/pyftpdlib/src":
- (Var("googlecode_url") % "pyftpdlib") + "/trunk@977",
-
- "src/third_party/scons-2.0.1":
- Var("nacl_trunk") + "/src/third_party/scons-2.0.1@" +
- Var("nacl_tools_revision"),
-
- "src/third_party/webrtc":
- (Var("googlecode_url") % "webrtc") + "/stable/webrtc@" + Var("webrtc_revision"),
-
- "src/third_party/openmax_dl":
- (Var("googlecode_url") % "webrtc") + "/deps/third_party/openmax@5205",
-
- "src/third_party/jsoncpp/source/include":
- (Var("sourceforge_url") % {"repo": "jsoncpp"}) +
- "/trunk/jsoncpp/include@" + Var("jsoncpp_revision"),
-
- "src/third_party/jsoncpp/source/src/lib_json":
- (Var("sourceforge_url") % {"repo": "jsoncpp"}) +
- "/trunk/jsoncpp/src/lib_json@" + Var("jsoncpp_revision"),
-
- "src/third_party/libyuv":
- (Var("googlecode_url") % "libyuv") + "/trunk@911",
-
- "src/third_party/smhasher/src":
- (Var("googlecode_url") % "smhasher") + "/trunk@149",
-
- "src/third_party/libaddressinput/src/cpp":
- (Var("googlecode_url") % "libaddressinput") + "/trunk/cpp@" +
- Var("libaddressinput_revision"),
- "src/third_party/libaddressinput/src/testdata":
- (Var("googlecode_url") % "libaddressinput") + "/trunk/testdata@" +
- Var("libaddressinput_revision"),
-
- "src/third_party/libphonenumber/src/phonenumbers":
- (Var("googlecode_url") % "libphonenumber") +
- "/trunk/cpp/src/phonenumbers@" + Var("libphonenumber_revision"),
- "src/third_party/libphonenumber/src/test":
- (Var("googlecode_url") % "libphonenumber") + "/trunk/cpp/test@" +
- Var("libphonenumber_revision"),
- "src/third_party/libphonenumber/src/resources":
- (Var("googlecode_url") % "libphonenumber") + "/trunk/resources@" +
- Var("libphonenumber_revision"),
-
- "src/tools/deps2git":
- "/trunk/tools/deps2git@236839",
-
- "src/third_party/webpagereplay":
- (Var("googlecode_url") % "web-page-replay") + "/trunk@528",
-
- "src/third_party/pywebsocket/src":
- (Var("googlecode_url") % "pywebsocket") + "/trunk/src@662",
-
- "src/third_party/opus/src":
- "/trunk/deps/third_party/opus@237544",
-
- "src/media/cdm/ppapi/api":
- "/trunk/deps/cdm@237635",
-
- "src/third_party/mesa/src":
- "/trunk/deps/third_party/mesa@229994",
-
- "src/third_party/cld_2/src":
- (Var("googlecode_url") % "cld2") + "/trunk@84",
-}
-
-
-deps_os = {
- "win": {
- "src/chrome/tools/test/reference_build/chrome_win":
- "/trunk/deps/reference_builds/chrome_win@237381",
-
- "src/third_party/cygwin":
- "/trunk/deps/third_party/cygwin@231940",
-
- "src/third_party/python_26":
- "/trunk/tools/third_party/python_26@89111",
-
- "src/third_party/psyco_win32":
- "/trunk/deps/third_party/psyco_win32@237949",
-
- "src/third_party/bison":
- "/trunk/deps/third_party/bison@147303",
-
- "src/third_party/gperf":
- "/trunk/deps/third_party/gperf@147304",
-
- "src/third_party/perl":
- "/trunk/deps/third_party/perl@147900",
-
- "src/third_party/lighttpd":
- "/trunk/deps/third_party/lighttpd@" + Var("lighttpd_revision"),
-
- # Chrome Frame related deps
- "src/third_party/xulrunner-sdk":
- "/trunk/deps/third_party/xulrunner-sdk@119756",
- "src/chrome_frame/tools/test/reference_build/chrome_win":
- "/trunk/deps/reference_builds/chrome_win@89574",
-
- # Parses Windows PE/COFF executable format.
- "src/third_party/pefile":
- (Var("googlecode_url") % "pefile") + "/trunk@63",
-
- # NSS, for SSLClientSocketNSS.
- "src/third_party/nss":
- "/trunk/deps/third_party/nss@" + Var("nss_revision"),
-
- "src/third_party/swig/win":
- "/trunk/deps/third_party/swig/win@" + Var("swig_revision"),
-
- # GNU binutils assembler for x86-32.
- "src/third_party/gnu_binutils":
- (Var("nacl_trunk") + "/deps/third_party/gnu_binutils@" +
- Var("nacl_tools_revision")),
- # GNU binutils assembler for x86-64.
- "src/third_party/mingw-w64/mingw/bin":
- (Var("nacl_trunk") + "/deps/third_party/mingw-w64/mingw/bin@" +
- Var("nacl_tools_revision")),
-
- # Dependencies used by libjpeg-turbo
- "src/third_party/yasm/binaries":
- "/trunk/deps/third_party/yasm/binaries@154708",
-
- # Binary level profile guided optimizations. This points to the
- # latest release binaries for the toolchain.
- "src/third_party/syzygy/binaries":
- (Var("googlecode_url") % "sawbuck") + "/trunk/syzygy/binaries@1909",
-
- # Binaries for nacl sdk.
- "src/third_party/nacl_sdk_binaries":
- "/trunk/deps/third_party/nacl_sdk_binaries@111576",
- },
- "ios": {
- "src/third_party/GTM":
- (Var("googlecode_url") % "google-toolbox-for-mac") + "/trunk@" +
- Var("gtm_revision"),
-
- "src/third_party/nss":
- "/trunk/deps/third_party/nss@" + Var("nss_revision"),
-
- # class-dump utility to generate header files for undocumented SDKs
- "src/testing/iossim/third_party/class-dump":
- "/trunk/deps/third_party/class-dump@199203",
-
- # Code that's not needed due to not building everything
- "src/build/util/support": None,
- "src/chrome/test/data/extensions/api_test/permissions/nacl_enabled/bin": None,
- "src/chrome/test/data/perf/canvas_bench": None,
- "src/chrome/test/data/perf/frame_rate/content": None,
- "src/chrome/test/data/perf/third_party/octane": None,
- "src/media/cdm/ppapi/api": None,
- "src/native_client": None,
- "src/native_client/src/third_party/ppapi": None,
- "src/third_party/angle": None,
- "src/third_party/bidichecker": None,
- "src/third_party/cld_2/src": None,
- "src/third_party/ffmpeg": None,
- "src/third_party/hunspell_dictionaries": None,
- "src/third_party/hunspell": None,
- "src/third_party/libaddressinput/src/cpp": None,
- "src/third_party/libaddressinput/src/testdata": None,
- "src/third_party/libexif/sources": None,
- "src/third_party/libjpeg_turbo": None,
- "src/third_party/libsrtp": None,
- "src/third_party/libvpx": None,
- "src/third_party/libyuv": None,
- "src/third_party/mesa/src": None,
- "src/third_party/opus/src": None,
- "src/third_party/openmax_dl": None,
- "src/third_party/ots": None,
- "src/third_party/pymox/src": None,
- "src/third_party/safe_browsing/testing": None,
- "src/third_party/scons-2.0.1": None,
- "src/third_party/sfntly/cpp/src": None,
- "src/third_party/smhasher/src": None,
- "src/third_party/swig/Lib": None,
- "src/third_party/undoview": None,
- "src/third_party/usrsctp/usrsctplib": None,
- "src/third_party/v8-i18n": None,
- "src/third_party/webdriver/pylib": None,
- "src/third_party/webgl": None,
- "src/third_party/webpagereplay": None,
- "src/third_party/webrtc": None,
- "src/third_party/yasm/source/patched-yasm": None,
- "src/tools/page_cycler/acid3": None,
- "src/v8": None,
- },
- "mac": {
- "src/chrome/tools/test/reference_build/chrome_mac":
- "/trunk/deps/reference_builds/chrome_mac@237381",
-
- "src/third_party/GTM":
- (Var("googlecode_url") % "google-toolbox-for-mac") + "/trunk@" +
- Var("gtm_revision"),
- "src/third_party/pdfsqueeze":
- (Var("googlecode_url") % "pdfsqueeze") + "/trunk@5",
- "src/third_party/lighttpd":
- "/trunk/deps/third_party/lighttpd@" + Var("lighttpd_revision"),
-
- "src/third_party/swig/mac":
- "/trunk/deps/third_party/swig/mac@" + Var("swig_revision"),
-
- # NSS, for SSLClientSocketNSS.
- "src/third_party/nss":
- "/trunk/deps/third_party/nss@" + Var("nss_revision"),
-
- "src/chrome/installer/mac/third_party/xz/xz":
- "/trunk/deps/third_party/xz@233311",
- },
- "unix": {
- # Linux, really.
- "src/chrome/tools/test/reference_build/chrome_linux":
- "/trunk/deps/reference_builds/chrome_linux64@237381",
-
- "src/third_party/xdg-utils":
- "/trunk/deps/third_party/xdg-utils@203785",
-
- "src/third_party/swig/linux":
- "/trunk/deps/third_party/swig/linux@" + Var("swig_revision"),
-
- "src/third_party/lss":
- ((Var("googlecode_url") % "linux-syscall-support") + "/trunk/lss@" +
- Var("lss_revision")),
-
- "src/third_party/openssl":
- "/trunk/deps/third_party/openssl@" + Var("openssl_revision"),
-
- "src/third_party/gold":
- "/trunk/deps/third_party/gold@228995",
-
- "src/third_party/libmtp":
- "/trunk/deps/third_party/libmtp@206535",
-
- # Used on Linux only. CrOS already has a copy.
- "src/third_party/mtpd/source":
- Var("chromiumos_git") + "/platform/mtpd.git" +
- "@5be739c938a0a229ba9479b00b180e1f9c843e81",
-
- # Used on Linux only. CrOS already has a copy.
- "src/third_party/cros_dbus_cplusplus/source":
- Var("chromiumos_git") + "/third_party/dbus-cplusplus.git" +
- "@5e8f6d9db5c2abfb91d91f751184f25bb5cd0900",
-
- # For Linux and Chromium OS.
- "src/third_party/cros_system_api":
- Var("chromiumos_git") + "/platform/system_api.git" +
- "@cfa23a554dcb262bfac10f9f5ac624d26c8c4e38",
-
- # Note that this is different from Android's freetype repo.
- "src/third_party/freetype2/src":
- Var("chromium_git") + "/chromium/src/third_party/freetype2.git" +
- "@d699c2994ecc178c4ed05ac2086061b2034c2178",
-
- # Build tools for targeting ChromeOS.
- "src/third_party/chromite":
- Var("chromiumos_git") + "/chromite.git" +
- "@cbdd21c5ea76aa93ba4619a6d253697765f4de1f",
-
- # Dependency of chromite.git.
- "src/third_party/pyelftools":
- Var("chromiumos_git") + "/third_party/pyelftools.git" +
- "@bdc1d380acd88d4bfaf47265008091483b0d614e",
-
- "src/third_party/undoview":
- "/trunk/deps/third_party/undoview@119694",
-
- "src/third_party/liblouis/src":
- Var("chromium_git") +
- "/external/liblouis.git@3c2daee56250162e5a75830871601d74328d39f5",
-
- },
- "android": {
- "src/third_party/android_tools":
- Var("chromium_git") + "/android_tools.git" +
- "@25cf2d85072b06f78956ecaacd564ef56a054d65",
-
- "src/third_party/aosp":
- "/trunk/deps/third_party/aosp@148330",
-
- "src/third_party/apache-mime4j":
- "/trunk/deps/third_party/apache-mime4j@170888",
-
- "src/third_party/findbugs":
- "/trunk/deps/third_party/findbugs@163586",
-
- "src/third_party/freetype":
- Var("chromium_git") + "/chromium/src/third_party/freetype.git" +
- "@e3b631da8034f7c6ecc6d809cd9e46d306215c32",
-
- "src/third_party/guava/src":
- Var("chromium_git") + "/external/guava-libraries.git" +
- "@c523556ab7d0f05afadebd20e7768d4c16af8771",
-
- "src/third_party/httpcomponents-client":
- "/trunk/deps/third_party/httpcomponents-client@170888",
-
- "src/third_party/httpcomponents-core":
- "/trunk/deps/third_party/httpcomponents-core@170888",
-
- "src/third_party/jarjar":
- "/trunk/deps/third_party/jarjar@170888",
-
- "src/third_party/jsr-305/src":
- (Var("googlecode_url") % "jsr-305") + "/trunk@51",
-
- "src/third_party/lss":
- ((Var("googlecode_url") % "linux-syscall-support") + "/trunk/lss@" +
- Var("lss_revision")),
-
- "src/third_party/openssl":
- "/trunk/deps/third_party/openssl@" + Var("openssl_revision"),
-
- "src/third_party/eyesfree/src/android/java/src/com/googlecode/eyesfree/braille":
- (Var("googlecode_url") % "eyes-free") + "/trunk/braille/client/src/com/googlecode/eyesfree/braille@797",
-
- # Android shouldn't use this address validation library.
- "src/third_party/libaddressinput/src/cpp": None,
- "src/third_party/libaddressinput/src/testdata": None,
- },
-}
-
-
-include_rules = [
- # Everybody can use some things.
- "+base",
- "+build",
- "+ipc",
-
- # Everybody can use headers generated by tools/generate_library_loader.
- "+library_loaders",
-
- "+testing",
- "+third_party/icu/source/common/unicode",
- "+third_party/icu/source/i18n/unicode",
- "+url",
-]
-
-
-# checkdeps.py shouldn't check include paths for files in these dirs:
-skip_child_includes = [
- "breakpad",
- "chrome_frame",
- "delegate_execute",
- "metro_driver",
- "native_client_sdk",
- "o3d",
- "pdf",
- "sdch",
- "skia",
- "testing",
- "third_party",
- "v8",
- "win8",
-]
-
-
-hooks = [
- {
- # This downloads binaries for Native Client's newlib toolchain.
- # Done in lieu of building the toolchain from scratch as it can take
- # anywhere from 30 minutes to 4 hours depending on platform to build.
- "name": "nacltools",
- "pattern": ".",
- "action": [
- "python", "src/build/download_nacl_toolchains.py",
- "--no-arm-trusted",
- "--keep",
- ],
- },
- {
- # Downloads an ARM sysroot image to src/arm-sysroot. This image updates
- # at about the same rate that the chrome build deps change.
- # This script is a no-op except for linux users who have
- # target_arch=arm in their GYP_DEFINES.
- "name": "sysroot",
- "pattern": ".",
- "action": ["python", "src/build/linux/install-arm-sysroot.py",
- "--linux-only"],
- },
- {
- # Downloads the Debian Wheezy sysroot to chrome/installer/linux if needed.
- # This sysroot updates at about the same rate that the chrome build deps
- # change. This script is a no-op except for linux users who are doing
- # official chrome builds.
- "name": "sysroot",
- "pattern": ".",
- "action": [
- "python",
- "src/chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py",
- "--linux-only",
- "--arch=amd64"],
- },
- {
- # Same as above, but for 32-bit Linux.
- "name": "sysroot",
- "pattern": ".",
- "action": [
- "python",
- "src/chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py",
- "--linux-only",
- "--arch=i386"],
- },
- {
- # Pull clang on mac. If nothing changed, or on non-mac platforms, this takes
- # zero seconds to run. If something changed, it downloads a prebuilt clang,
- # which takes ~20s, but clang speeds up builds by more than 20s.
- "name": "clang",
- "pattern": ".",
- "action": ["python", "src/tools/clang/scripts/update.py", "--mac-only"],
- },
- {
- # Update the cygwin mount on Windows.
- "name": "cygwin",
- "pattern": ".",
- "action": ["python", "src/build/win/setup_cygwin_mount.py", "--win-only"],
- },
- {
- # Update LASTCHANGE. This is also run by export_tarball.py in
- # src/tools/export_tarball - please keep them in sync.
- "name": "lastchange",
- "pattern": ".",
- "action": ["python", "src/build/util/lastchange.py",
- "-o", "src/build/util/LASTCHANGE"],
- },
- {
- # Update LASTCHANGE.blink. This is also run by export_tarball.py in
- # src/tools/export_tarball - please keep them in sync.
- "name": "lastchange",
- "pattern": ".",
- "action": ["python", "src/build/util/lastchange.py",
- "-s", "src/third_party/WebKit",
- "-o", "src/build/util/LASTCHANGE.blink"],
- },
- # Pull GN binaries. This needs to be before running GYP below.
- {
- "name": "gn_win",
- "pattern": "src/tools/gn/bin/win/gn.exe.sha1",
- "action": [ "download_from_google_storage",
- "--no_resume",
- "--platform=win32",
- "--no_auth",
- "--bucket", "chromium-gn",
- "-s", "src/tools/gn/bin/win/gn.exe.sha1",
- ],
- },
- {
- "name": "gn_mac",
- "pattern": "src/tools/gn/bin/mac/gn.sha1",
- "action": [ "download_from_google_storage",
- "--no_resume",
- "--platform=darwin",
- "--no_auth",
- "--bucket", "chromium-gn",
- "-s", "src/tools/gn/bin/mac/gn.sha1",
- ],
- },
- {
- "name": "gn_linux",
- "pattern": "src/tools/gn/bin/linux/gn.sha1",
- "action": [ "download_from_google_storage",
- "--no_resume",
- "--platform=linux*",
- "--no_auth",
- "--bucket", "chromium-gn",
- "-s", "src/tools/gn/bin/linux/gn.sha1",
- ],
- },
- {
- "name": "gn_linux32",
- "pattern": "src/tools/gn/bin/linux/gn32.sha1",
- "action": [ "download_from_google_storage",
- "--no_resume",
- "--platform=linux*",
- "--no_auth",
- "--bucket", "chromium-gn",
- "-s", "src/tools/gn/bin/linux/gn32.sha1",
- ],
- },
- {
- # A change to a .gyp, .gypi, or to GYP itself should run the generator.
- "name": "gyp",
- "pattern": ".",
- "action": ["python", "src/build/gyp_chromium"],
- },
- {
- # Check for landmines (reasons to clobber the build).
- "name": "landmines",
- "pattern": ".",
- "action": ["python", "src/build/landmines.py"],
- },
-]
+vars = {
+ 'eyes-free':
+ 'http://eyes-free.googlecode.com/svn',
+ 'blink':
+ 'http://src.chromium.org/blink',
+ 'skia':
+ 'http://skia.googlecode.com/svn',
+ 'google-breakpad':
+ 'http://google-breakpad.googlecode.com/svn',
+ 'sawbuck':
+ 'http://sawbuck.googlecode.com/svn',
+ 'mozc':
+ 'http://mozc.googlecode.com/svn',
+ 'git.chromium.org':
+ 'https://chromium.googlesource.com',
+ 'v8-i18n':
+ 'http://v8-i18n.googlecode.com/svn',
+ 'selenium':
+ 'http://selenium.googlecode.com/svn',
+ 'buildspec_platforms':
+ 'all',
+ 'snappy':
+ 'http://snappy.googlecode.com/svn',
+ 'ppapi':
+ 'http://ppapi.googlecode.com/svn',
+ 'pywebsocket':
+ 'http://pywebsocket.googlecode.com/svn',
+ 'libaddressinput':
+ 'http://libaddressinput.googlecode.com/svn',
+ 'pyftpdlib':
+ 'http://pyftpdlib.googlecode.com/svn',
+ 'google-url':
+ 'http://google-url.googlecode.com/svn',
+ 'googletest':
+ 'http://googletest.googlecode.com/svn',
+ 'gyp':
+ 'http://gyp.googlecode.com/svn',
+ 'seccompsandbox':
+ 'http://seccompsandbox.googlecode.com/svn',
+ 'ots':
+ 'http://ots.googlecode.com/svn',
+ 'angleproject':
+ 'http://angleproject.googlecode.com/svn',
+ 'pefile':
+ 'http://pefile.googlecode.com/svn',
+ 'open-vcdiff':
+ 'http://open-vcdiff.googlecode.com/svn',
+ 'linux-syscall-support':
+ 'http://linux-syscall-support.googlecode.com/svn',
+ 'trace-viewer':
+ 'http://trace-viewer.googlecode.com/svn',
+ 'webrtc':
+ 'http://webrtc.googlecode.com/svn',
+ 'web-page-replay':
+ 'http://web-page-replay.googlecode.com/svn',
+ 'libjingle':
+ 'http://libjingle.googlecode.com/svn',
+ 'cld2':
+ 'https://cld2.googlecode.com/svn',
+ 'google-cache-invalidation-api':
+ 'http://google-cache-invalidation-api.googlecode.com/svn',
+ 'jsr-305':
+ 'http://jsr-305.googlecode.com/svn',
+ 'bidichecker':
+ 'http://bidichecker.googlecode.com/svn',
+ 'native_client':
+ 'http://src.chromium.org/native_client',
+ 'jsoncpp':
+ 'http://svn.code.sf.net/p/jsoncpp/code',
+ 'leveldb':
+ 'http://leveldb.googlecode.com/svn',
+ 'webkit_trunk':
+ 'http://src.chromium.org/blink/trunk',
+ 'google-toolbox-for-mac':
+ 'http://google-toolbox-for-mac.googlecode.com/svn',
+ 'grit-i18n':
+ 'http://grit-i18n.googlecode.com/svn',
+ 'pdfsqueeze':
+ 'http://pdfsqueeze.googlecode.com/svn',
+ 'protobuf':
+ 'http://protobuf.googlecode.com/svn',
+ 'smhasher':
+ 'http://smhasher.googlecode.com/svn',
+ 'googlemock':
+ 'http://googlemock.googlecode.com/svn',
+ 'libyuv':
+ 'http://libyuv.googlecode.com/svn',
+ 'rlz':
+ 'http://rlz.googlecode.com/svn',
+ 'v8':
+ 'http://v8.googlecode.com/svn',
+ 'pymox':
+ 'http://pymox.googlecode.com/svn',
+ 'sfntly':
+ 'http://sfntly.googlecode.com/svn',
+ 'sctp-refimpl':
+ 'https://sctp-refimpl.googlecode.com/svn',
+ 'libphonenumber':
+ 'http://libphonenumber.googlecode.com/svn',
+ 'octane-benchmark':
+ 'http://octane-benchmark.googlecode.com/svn',
+ 'google-safe-browsing':
+ 'http://google-safe-browsing.googlecode.com/svn'
+}
+
+deps_os = {
+ 'win': {
+ 'src/third_party/yasm/binaries':
+ '/trunk/deps/third_party/yasm/binaries@154708',
+ 'src/chrome/tools/test/reference_build/chrome_win':
+ '/trunk/deps/reference_builds/chrome_win@273882',
+ 'src/third_party/nacl_sdk_binaries':
+ '/trunk/deps/third_party/nacl_sdk_binaries@111576',
+ 'src/third_party/lighttpd':
+ '/trunk/deps/third_party/lighttpd@33737',
+ 'src/third_party/gnu_binutils':
+ (Var("native_client")) + '/trunk/deps/third_party/gnu_binutils@13077',
+ 'src/third_party/pefile':
+ (Var("pefile")) + '/trunk@141',
+ 'src/third_party/psyco_win32':
+ '/trunk/deps/third_party/psyco_win32@237949',
+ 'src/third_party/mingw-w64/mingw/bin':
+ (Var("native_client")) + '/trunk/deps/third_party/mingw-w64/mingw/bin@13077',
+ 'src/third_party/perl':
+ '/trunk/deps/third_party/perl@147900',
+ 'src/third_party/gperf':
+ '/trunk/deps/third_party/gperf@147304',
+ 'src/third_party/cygwin':
+ '/trunk/deps/third_party/cygwin@231940',
+ 'src/third_party/swig/win':
+ '/trunk/deps/third_party/swig/win@230490',
+ 'src/third_party/bison':
+ '/trunk/deps/third_party/bison@147303',
+ 'src/third_party/nss':
+ '/trunk/deps/third_party/nss@277057'
+ },
+ 'mac': {
+ 'src/third_party/pdfsqueeze':
+ (Var("pdfsqueeze")) + '/trunk@5',
+ 'src/chrome/installer/mac/third_party/xz/xz':
+ '/trunk/deps/third_party/xz@233311',
+ 'src/third_party/lighttpd':
+ '/trunk/deps/third_party/lighttpd@33737',
+ 'src/third_party/swig/mac':
+ '/trunk/deps/third_party/swig/mac@230490',
+ 'src/third_party/google_toolbox_for_mac/src':
+ (Var("google-toolbox-for-mac")) + '/trunk@662',
+ 'src/chrome/tools/test/reference_build/chrome_mac':
+ '/trunk/deps/reference_builds/chrome_mac@273882',
+ 'src/third_party/nss':
+ '/trunk/deps/third_party/nss@277057'
+ },
+ 'ios': {
+ 'src/third_party/sfntly/cpp/src': None,
+ 'src/third_party/libc++/trunk': None,
+ 'src/third_party/libc++abi/trunk': None,
+ 'src/breakpad/src':
+ (Var("google-breakpad")) + '/branches/chrome_37/src@1357',
+ 'src/media/cdm/ppapi/api': None,
+ 'src/third_party/v8-i18n': None,
+ 'src/chrome/test/data/perf/frame_rate/content': None,
+ 'src/third_party/ots': None,
+ 'src/third_party/mesa/src': None,
+ 'src/third_party/opus/src': None,
+ 'src/third_party/hunspell_dictionaries': None,
+ 'src/third_party/brotli/src': None,
+ 'src/third_party/webgl': None,
+ 'src/third_party/scons-2.0.1': None,
+ 'src/third_party/webdriver/pylib': None,
+ 'src/chrome/test/data/perf/canvas_bench': None,
+ 'src/third_party/libexif/sources': None,
+ 'src/third_party/safe_browsing/testing': None,
+ 'src/third_party/libyuv': None,
+ 'src/third_party/usrsctp/usrsctplib': None,
+ 'src/third_party/webrtc': None,
+ 'src/third_party/libjpeg_turbo': None,
+ 'src/third_party/nss':
+ '/trunk/deps/third_party/nss@277057',
+ 'src/third_party/bidichecker': None,
+ 'src/third_party/WebKit': None,
+ 'src/third_party/openmax_dl': None,
+ 'src/third_party/WebKit/LayoutTests/w3c/csswg-test': None,
+ 'src/third_party/google_toolbox_for_mac/src':
+ (Var("google-toolbox-for-mac")) + '/trunk@662',
+ 'src/third_party/WebKit/LayoutTests/w3c/web-platform-tests': None,
+ 'src/chrome/test/data/extensions/api_test/permissions/nacl_enabled/bin': None,
+ 'src/third_party/WebKit/public':
+ (Var("blink")) + '/branches/chromium/2062/public@179513',
+ 'src/native_client': None,
+ 'src/tools/page_cycler/acid3': None,
+ 'src/testing/iossim/third_party/class-dump':
+ '/trunk/deps/third_party/class-dump@199203',
+ 'src/third_party/cld_2/src': None,
+ 'src/third_party/libsrtp': None,
+ 'src/third_party/ffmpeg': None,
+ 'src/native_client/src/third_party/ppapi': None,
+ 'src/third_party/pdfium': None,
+ 'src/build/util/support': None,
+ 'src/pdf': None,
+ 'src/third_party/pymox/src': None,
+ 'src/third_party/yasm/source/patched-yasm': None,
+ 'src/third_party/speex': None,
+ 'src/third_party/colorama/src': None,
+ 'src/third_party/webpagereplay': None,
+ 'src/third_party/hunspell': None,
+ 'src/third_party/angle': None,
+ 'src/v8': None,
+ 'src/third_party/libvpx': None,
+ 'src/third_party/swig/Lib': None
+ },
+ 'unix': {
+ 'src/third_party/fontconfig/src':
+ (Var("git.chromium.org")) + '/external/fontconfig.git@f16c3118e25546c1b749f9823c51827a60aeb5c1',
+ 'build/third_party/cbuildbot_chromite':
+ (Var("git.chromium.org")) + '/chromiumos/chromite.git@ff6389dc2361455d2072625a91e18672bdf03547',
+ 'src/third_party/cros_system_api':
+ (Var("git.chromium.org")) + '/chromiumos/platform/system_api.git@ba73627b396a7773203a6c554ae2cc759d52eb2b',
+ 'src/third_party/pyelftools':
+ (Var("git.chromium.org")) + '/chromiumos/third_party/pyelftools.git@bdc1d380acd88d4bfaf47265008091483b0d614e',
+ 'src/third_party/chromite':
+ (Var("git.chromium.org")) + '/chromiumos/chromite.git@df22fd72b22d1905af6e69d23ec373b69c9c75f6',
+ 'build/third_party/xvfb':
+ '/trunk/tools/third_party/xvfb@125214',
+ 'src/third_party/xdg-utils':
+ '/trunk/deps/third_party/xdg-utils@203785',
+ 'src/third_party/undoview':
+ '/trunk/deps/third_party/undoview@119694',
+ 'src/chrome/tools/test/reference_build/chrome_linux':
+ '/trunk/deps/reference_builds/chrome_linux64@273882',
+ 'src/third_party/swig/linux':
+ '/trunk/deps/third_party/swig/linux@230490',
+ 'src/third_party/liblouis/src':
+ (Var("git.chromium.org")) + '/external/liblouis.git@3c2daee56250162e5a75830871601d74328d39f5',
+ 'src/third_party/freetype2/src':
+ (Var("git.chromium.org")) + '/chromium/src/third_party/freetype2.git@d699c2994ecc178c4ed05ac2086061b2034c2178',
+ 'src/third_party/lss':
+ (Var("linux-syscall-support")) + '/trunk/lss@26'
+ },
+ 'android': {
+ 'src/third_party/guava/src':
+ (Var("git.chromium.org")) + '/external/guava-libraries.git@c523556ab7d0f05afadebd20e7768d4c16af8771',
+ 'src/third_party/eyesfree/src/android/java/src/com/googlecode/eyesfree/braille':
+ (Var("eyes-free")) + '/trunk/braille/client/src/com/googlecode/eyesfree/braille@797',
+ 'src/pdf': None,
+ 'src/third_party/apache-mime4j':
+ '/trunk/deps/third_party/apache-mime4j@170888',
+ 'src/third_party/elfutils/src':
+ (Var("git.chromium.org")) + '/external/elfutils.git@43a97297be82feab4b3176a094ed701ad3ccb308',
+ 'src/breakpad/src':
+ (Var("google-breakpad")) + '/branches/chrome_37/src@1357',
+ 'src/third_party/freetype':
+ (Var("git.chromium.org")) + '/chromium/src/third_party/freetype.git@a2b9955b49034a51dfbc8bf9f4e9d312149cecac',
+ 'src/third_party/jarjar':
+ '/trunk/deps/third_party/jarjar@170888',
+ 'src/third_party/aosp':
+ '/trunk/deps/third_party/aosp@148330',
+ 'src/third_party/android_tools':
+ (Var("git.chromium.org")) + '/android_tools.git@e91e44dc29517115794a72eea554616d067925ae',
+ 'src/third_party/httpcomponents-client':
+ '/trunk/deps/third_party/httpcomponents-client@170888',
+ 'src/third_party/findbugs':
+ '/trunk/deps/third_party/findbugs@245039',
+ 'src/third_party/lss':
+ (Var("linux-syscall-support")) + '/trunk/lss@26',
+ 'src/third_party/jsr-305/src':
+ (Var("jsr-305")) + '/trunk@51',
+ 'src/third_party/httpcomponents-core':
+ '/trunk/deps/third_party/httpcomponents-core@170888'
+ }
+ }
+
+deps = {
+ 'depot_tools':
+ '/trunk/tools/depot_tools@278770',
+ 'src/third_party/sfntly/cpp/src':
+ (Var("sfntly")) + '/trunk/cpp/src@239',
+ 'src/third_party/bidichecker':
+ (Var("bidichecker")) + '/trunk/lib@4',
+ 'src/third_party/libc++/trunk':
+ 'http://src.chromium.org/llvm-project/libcxx/trunk@206024',
+ 'src/third_party/libwebm/source':
+ (Var("git.chromium.org")) + '/webm/libwebm.git@8be63972fdd7ae8c041778f8ba674ade903395c9',
+ 'src/third_party/WebKit':
+ (Var("blink")) + '/branches/chromium/2062@179513',
+ 'src/third_party/openmax_dl':
+ (Var("webrtc")) + '/deps/third_party/openmax@6483',
+ 'src/third_party/libc++abi/trunk':
+ 'http://src.chromium.org/llvm-project/libcxxabi/trunk@206024',
+ 'build/scripts/private/data/reliability':
+ '/trunk/src/chrome/test/data/reliability@237714',
+ 'src/third_party/WebKit/LayoutTests/w3c/csswg-test':
+ (Var("git.chromium.org")) + '/external/w3c/csswg-test.git@bacbb4a8dca702cd86646761fde96793db13d4f1',
+ 'src/third_party/flac':
+ '/trunk/deps/third_party/flac@222897',
+ 'src/media/cdm/ppapi/api':
+ '/trunk/deps/cdm@273356',
+ 'src/third_party/skia':
+ (Var("git.chromium.org")) + '/skia.git@0c1c911ff19894031cd1b8acef3b597e26a85334',
+ 'src/tools/swarming_client':
+ (Var("git.chromium.org")) + '/external/swarming.client.git@c333224ef8cf5cc41ab91f6ee9cb1fdbe3689f19',
+ 'src/chrome/test/data/perf/frame_rate/content':
+ '/trunk/deps/frame_rate/content@93671',
+ 'src/third_party/ots':
+ (Var("ots")) + '/trunk@113',
+ 'src/third_party/jsoncpp/source/src/lib_json':
+ (Var("jsoncpp")) + '/trunk/jsoncpp/src/lib_json@248',
+ 'src/third_party/clang_format/script':
+ 'http://src.chromium.org/llvm-project/cfe/trunk/tools/clang-format@206068',
+ 'src/third_party/WebKit/LayoutTests/w3c/web-platform-tests':
+ (Var("git.chromium.org")) + '/external/w3c/web-platform-tests.git@6bed4516fe8522d65512c76ef02e4f0ae8234395',
+ 'src/third_party/libaddressinput/src/testdata':
+ (Var("libaddressinput")) + '/trunk/testdata@293',
+ 'src/testing/gmock':
+ (Var("googlemock")) + '/trunk@410',
+ 'src/tools/grit':
+ (Var("grit-i18n")) + '/trunk@169',
+ 'src/third_party/mesa/src':
+ '/trunk/deps/third_party/mesa@265279',
+ 'src/third_party/smhasher/src':
+ (Var("smhasher")) + '/trunk@152',
+ 'src/third_party/webrtc':
+ (Var("webrtc")) + '/branches/3.55/webrtc@6796',
+ 'build/scripts/tools/deps2git':
+ '/trunk/tools/deps2git@276439',
+ 'src/third_party/hunspell_dictionaries':
+ '/trunk/deps/third_party/hunspell_dictionaries@255132',
+ 'src/native_client':
+ (Var("native_client")) + '/branches/2062/src/native_client@13567',
+ 'src/third_party/brotli/src':
+ (Var("git.chromium.org")) + '/external/font-compression-reference.git@6cef49677dc4c650ef6e3f56041e0a41803afa8c',
+ 'src/tools/page_cycler/acid3':
+ '/trunk/deps/page_cycler/acid3@171600',
+ 'src/third_party/cacheinvalidation/src':
+ (Var("google-cache-invalidation-api")) + '/trunk/src@331',
+ 'src/chrome/test/data/extensions/api_test/permissions/nacl_enabled/bin':
+ (Var("native_client")) + '/branches/2062/src/native_client/tests/prebuilt@13567',
+ 'src/third_party/leveldatabase/src':
+ (Var("leveldb")) + '/trunk@80',
+ 'src/third_party/webpagereplay':
+ (Var("git.chromium.org")) + '/external/web-page-replay.git@b62c02d3b64cf00a2f65a82cca0721aa42c3d6ad',
+ 'src/third_party/cld_2/src':
+ (Var("cld2")) + '/trunk@161',
+ 'src/chrome/test/data/perf/canvas_bench':
+ '/trunk/deps/canvas_bench@122605',
+ 'src/sdch/open-vcdiff':
+ (Var("open-vcdiff")) + '/trunk@42',
+ 'src/third_party/angle':
+ (Var("git.chromium.org")) + '/angle/angle.git@c333af9c8e6b776363b722d9e9c4fed0b597f984',
+ 'build/third_party/lighttpd':
+ '/trunk/deps/third_party/lighttpd@58968',
+ 'src/buildtools':
+ (Var("git.chromium.org")) + '/chromium/buildtools.git@10a5251e71445a832953f1374bbbbe60ad019144',
+ 'src/third_party/scons-2.0.1':
+ (Var("native_client")) + '/trunk/src/third_party/scons-2.0.1@13077',
+ 'src/third_party/webdriver/pylib':
+ (Var("selenium")) + '/trunk/py@18337',
+ 'src/third_party/usrsctp/usrsctplib':
+ (Var("sctp-refimpl")) + '/trunk/KERN/usrsctp/usrsctplib@8875',
+ 'build/scripts/gsd_generate_index':
+ '/trunk/tools/gsd_generate_index@164784',
+ 'src/chrome/browser/resources/pdf/html_office':
+ (Var("git.chromium.org")) + '/chromium/html-office-public.git@eeff97614f65e0578529490d44d412032c3d7359',
+ 'src/third_party/webgl/src':
+ (Var("git.chromium.org")) + '/external/khronosgroup/webgl.git@0475a2763fc30cbed22740f8a9ef53a82f03b4ac',
+ 'src/third_party/libyuv':
+ (Var("libyuv")) + '/trunk@1007',
+ 'src/third_party/libjingle/source/talk':
+ (Var("webrtc")) + '/trunk/talk@6496',
+ 'src/third_party/libexif/sources':
+ '/trunk/deps/third_party/libexif/sources@265008',
+ 'src/third_party/jsoncpp/source/include':
+ (Var("jsoncpp")) + '/trunk/jsoncpp/include@248',
+ 'src/third_party/libphonenumber/src/test':
+ (Var("libphonenumber")) + '/trunk/cpp/test@621',
+ 'src/third_party/pdfium':
+ 'https://pdfium.googlesource.com/pdfium.git@a2dfb95353c8e4851300f8d53d4659e1b764c31d',
+ 'src/third_party/libphonenumber/src/phonenumbers':
+ (Var("libphonenumber")) + '/trunk/cpp/src/phonenumbers@621',
+ 'src/third_party/openssl':
+ '/trunk/deps/third_party/openssl@275836',
+ 'src/third_party/trace-viewer':
+ (Var("trace-viewer")) + '/trunk@1281',
+ 'src/third_party/yasm/source/patched-yasm':
+ '/trunk/deps/third_party/yasm/patched-yasm@167605',
+ 'src/third_party/safe_browsing/testing':
+ (Var("google-safe-browsing")) + '/trunk/testing@112',
+ 'src/third_party/ffmpeg':
+ (Var("git.chromium.org")) + '/chromium/third_party/ffmpeg.git@5c3de8094903dd2162232b8f1be916c46acdd8f5',
+ 'build':
+ '/trunk/tools/build@278895',
+ 'build/scripts/command_wrapper/bin':
+ '/trunk/tools/command_wrapper/bin@135178',
+ 'src/testing/gtest':
+ (Var("googletest")) + '/trunk@643',
+ 'src/third_party/pyftpdlib/src':
+ (Var("pyftpdlib")) + '/trunk@977',
+ 'src/third_party/libaddressinput/src/cpp':
+ (Var("libaddressinput")) + '/trunk/cpp@293',
+ 'src/third_party/icu':
+ '/trunk/deps/third_party/icu46@285202',
+ 'src/third_party/speex':
+ '/trunk/deps/third_party/speex@272757',
+ 'src/third_party/opus/src':
+ '/trunk/deps/third_party/opus@256783',
+ 'src/third_party/libphonenumber/src/resources':
+ (Var("libphonenumber")) + '/trunk/resources@621',
+ 'src/third_party/colorama/src':
+ (Var("git.chromium.org")) + '/external/colorama.git@799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8',
+ 'src/third_party/snappy/src':
+ (Var("snappy")) + '/trunk@80',
+ 'src/breakpad/src':
+ (Var("google-breakpad")) + '/trunk/src@1338',
+ 'src/third_party/hunspell':
+ '/trunk/deps/third_party/hunspell@256272',
+ 'src/tools/deps2git':
+ '/trunk/tools/deps2git@276439',
+ 'src/third_party/libjpeg_turbo':
+ '/trunk/deps/third_party/libjpeg_turbo@272637',
+ 'src/third_party/libsrtp':
+ '/trunk/deps/third_party/libsrtp@261337',
+ 'src/v8':
+ (Var("v8")) + '/branches/3.27@22822',
+ 'src/third_party/pywebsocket/src':
+ (Var("pywebsocket")) + '/trunk/src@790',
+ 'src/third_party/libvpx':
+ '/trunk/deps/third_party/libvpx@278497',
+ 'src/third_party/swig/Lib':
+ '/trunk/deps/third_party/swig/Lib@230490',
+ 'src/tools/gyp':
+ (Var("gyp")) + '/trunk@1944'
+}
+
+skip_child_includes = [
+ 'breakpad',
+ 'delegate_execute',
+ 'metro_driver',
+ 'native_client_sdk',
+ 'o3d',
+ 'sdch',
+ 'skia',
+ 'testing',
+ 'third_party',
+ 'v8',
+ 'win8'
+]
+
+hooks = [{
+ 'action': ['python',
+ 'src/build/download_nacl_toolchains.py',
+ '--exclude',
+ 'arm_trusted'],
+ 'pattern':
+ '.',
+ 'name':
+ 'nacltools'
+},
+{
+ 'action': ['python',
+ 'src/build/linux/install-arm-sysroot.py',
+ '--linux-only'],
+ 'pattern':
+ '.',
+ 'name':
+ 'sysroot'
+},
+{
+ 'action': ['python',
+ 'src/chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py',
+ '--linux-only',
+ '--arch=amd64'],
+ 'pattern':
+ '.',
+ 'name':
+ 'sysroot'
+},
+{
+ 'action': ['python',
+ 'src/chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py',
+ '--linux-only',
+ '--arch=i386'],
+ 'pattern':
+ '.',
+ 'name':
+ 'sysroot'
+},
+{
+ 'action': ['python',
+ 'src/tools/clang/scripts/update.py',
+ '--if-needed'],
+ 'pattern':
+ '.',
+ 'name':
+ 'clang'
+},
+{
+ 'action': ['python',
+ 'src/build/vs_toolchain.py',
+ 'update'],
+ 'pattern':
+ '.',
+ 'name':
+ 'win_toolchain'
+},
+{
+ 'action': ['python',
+ 'src/build/util/lastchange.py',
+ '-o',
+ 'src/build/util/LASTCHANGE'],
+ 'pattern':
+ '.',
+ 'name':
+ 'lastchange'
+},
+{
+ 'action': ['python',
+ 'src/build/util/lastchange.py',
+ '-s',
+ 'src/third_party/WebKit',
+ '-o',
+ 'src/build/util/LASTCHANGE.blink'],
+ 'pattern':
+ '.',
+ 'name':
+ 'lastchange'
+},
+{
+ 'action': ['download_from_google_storage',
+ '--no_resume',
+ '--platform=win32',
+ '--no_auth',
+ '--bucket',
+ 'chromium-gn',
+ '-s',
+ 'src/buildtools/win/gn.exe.sha1'],
+ 'pattern':
+ '.',
+ 'name':
+ 'gn_win'
+},
+{
+ 'action': ['download_from_google_storage',
+ '--no_resume',
+ '--platform=darwin',
+ '--no_auth',
+ '--bucket',
+ 'chromium-gn',
+ '-s',
+ 'src/buildtools/mac/gn.sha1'],
+ 'pattern':
+ '.',
+ 'name':
+ 'gn_mac'
+},
+{
+ 'action': ['download_from_google_storage',
+ '--no_resume',
+ '--platform=linux*',
+ '--no_auth',
+ '--bucket',
+ 'chromium-gn',
+ '-s',
+ 'src/buildtools/linux32/gn.sha1'],
+ 'pattern':
+ '.',
+ 'name':
+ 'gn_linux32'
+},
+{
+ 'action': ['download_from_google_storage',
+ '--no_resume',
+ '--platform=linux*',
+ '--no_auth',
+ '--bucket',
+ 'chromium-gn',
+ '-s',
+ 'src/buildtools/linux64/gn.sha1'],
+ 'pattern':
+ '.',
+ 'name':
+ 'gn_linux64'
+},
+{
+ 'action': ['download_from_google_storage',
+ '--no_resume',
+ '--platform=win32',
+ '--no_auth',
+ '--bucket',
+ 'chromium-gn',
+ '-s',
+ 'src/tools/gn/bin/win/gn.exe.sha1'],
+ 'pattern':
+ '.',
+ 'name':
+ 'gn_old_win'
+},
+{
+ 'action': ['download_from_google_storage',
+ '--no_resume',
+ '--platform=darwin',
+ '--no_auth',
+ '--bucket',
+ 'chromium-gn',
+ '-s',
+ 'src/tools/gn/bin/mac/gn.sha1'],
+ 'pattern':
+ '.',
+ 'name':
+ 'gn_old_mac'
+},
+{
+ 'action': ['download_from_google_storage',
+ '--no_resume',
+ '--platform=linux*',
+ '--no_auth',
+ '--bucket',
+ 'chromium-gn',
+ '-s',
+ 'src/tools/gn/bin/linux/gn.sha1'],
+ 'pattern':
+ '.',
+ 'name':
+ 'gn_old_linux'
+},
+{
+ 'action': ['download_from_google_storage',
+ '--no_resume',
+ '--platform=linux*',
+ '--no_auth',
+ '--bucket',
+ 'chromium-gn',
+ '-s',
+ 'src/tools/gn/bin/linux/gn32.sha1'],
+ 'pattern':
+ '.',
+ 'name':
+ 'gn_old_linux32'
+},
+{
+ 'action': ['download_from_google_storage',
+ '--no_resume',
+ '--platform=win32',
+ '--no_auth',
+ '--bucket',
+ 'chromium-clang-format',
+ '-s',
+ 'src/third_party/clang_format/bin/win/clang-format.exe.sha1'],
+ 'pattern':
+ '.',
+ 'name':
+ 'clang_format_win'
+},
+{
+ 'action': ['download_from_google_storage',
+ '--no_resume',
+ '--platform=darwin',
+ '--no_auth',
+ '--bucket',
+ 'chromium-clang-format',
+ '-s',
+ 'src/third_party/clang_format/bin/mac/clang-format.sha1'],
+ 'pattern':
+ '.',
+ 'name':
+ 'clang_format_mac'
+},
+{
+ 'action': ['download_from_google_storage',
+ '--no_resume',
+ '--platform=linux*',
+ '--no_auth',
+ '--bucket',
+ 'chromium-clang-format',
+ '-s',
+ 'src/third_party/clang_format/bin/linux/clang-format.sha1'],
+ 'pattern':
+ '.',
+ 'name':
+ 'clang_format_linux'
+},
+{
+ 'action': ['python',
+ 'src/third_party/binutils/download.py'],
+ 'pattern':
+ 'src/third_party/binutils',
+ 'name':
+ 'binutils'
+},
+{
+ 'action': ['download_from_google_storage',
+ '--no_resume',
+ '--platform=linux*',
+ '--no_auth',
+ '--bucket',
+ 'chromium-eu-strip',
+ '-s',
+ 'src/build/linux/bin/eu-strip.sha1'],
+ 'pattern':
+ '.',
+ 'name':
+ 'eu-strip'
+},
+{
+ 'action': ['download_from_google_storage',
+ '--no_resume',
+ '--platform=win32',
+ '--no_auth',
+ '--bucket',
+ 'chromium-drmemory',
+ '-s',
+ 'src/third_party/drmemory/drmemory-windows-sfx.exe.sha1'],
+ 'pattern':
+ '.',
+ 'name':
+ 'drmemory'
+},
+{
+ 'action': ['python',
+ 'src/build/get_syzygy_binaries.py',
+ '--output-dir=src/third_party/syzygy/binaries',
+ '--revision=b08fb72610963d31cc3eae33f746a04e263bd860',
+ '--overwrite'],
+ 'pattern':
+ '.',
+ 'name':
+ 'syzygy-binaries'
+},
+{
+ 'action': ['download_from_google_storage',
+ '--no_resume',
+ '--platform=win32',
+ '--directory',
+ '--recursive',
+ '--no_auth',
+ '--num_threads=16',
+ '--bucket',
+ 'chromium-apache-win32',
+ 'src/third_party/apache-win32'],
+ 'pattern':
+ '\\.sha1',
+ 'name':
+ 'apache_win32'
+},
+{
+ 'action': [
+ 'python',
+ 'src/build/gyp_chromium'],
+ 'pattern':
+ '.',
+ 'name':
+ 'gyp'
+ }
+]
+
+include_rules = [
+ '+base',
+ '+build',
+ '+ipc',
+ '+library_loaders',
+ '+testing',
+ '+third_party/icu/source/common/unicode',
+ '+third_party/icu/source/i18n/unicode',
+ '+url'
+]
+
diff --git a/chromium/LICENSE b/chromium/LICENSE
index 3d0f7d3edfd..972bb2edb09 100644
--- a/chromium/LICENSE
+++ b/chromium/LICENSE
@@ -1,4 +1,4 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
diff --git a/chromium/OWNERS b/chromium/OWNERS
index 398edd51e72..4c215b4cd24 100644
--- a/chromium/OWNERS
+++ b/chromium/OWNERS
@@ -1,10 +1,13 @@
darin@chromium.org
ben@chromium.org
per-file .gitignore=*
+per-file .gn=brettw@chromium.org
+per-file BUILD.gn=brettw@chromium.org
per-file DEPS=*
per-file AUTHORS=*
per-file WATCHLISTS=*
per-file Android.mk=benm@chromium.org
per-file Android.mk=torne@chromium.org
per-file PRESUBMIT*.py=maruel@chromium.org
-per-file PRESUBMIT*.py=joi@chromium.org
+per-file PRESUBMIT*.py=jochen@chromium.org
+per-file PRESUBMIT*.py=phajdan.jr@chromium.org
diff --git a/chromium/PRESUBMIT.py b/chromium/PRESUBMIT.py
index dc30cbc9c34..c2a4c5c3e0a 100644
--- a/chromium/PRESUBMIT.py
+++ b/chromium/PRESUBMIT.py
@@ -10,7 +10,6 @@ for more details about the presubmit API built into gcl.
import re
-import subprocess
import sys
@@ -26,6 +25,14 @@ _EXCLUDED_PATHS = (
r".+_autogen\.h$",
r".+[\\\/]pnacl_shim\.c$",
r"^gpu[\\\/]config[\\\/].*_list_json\.cc$",
+ r"^chrome[\\\/]browser[\\\/]resources[\\\/]pdf[\\\/]index.js"
+)
+
+# TestRunner and NetscapePlugIn library is temporarily excluded from pan-project
+# checks until it's transitioned to chromium coding style.
+_TESTRUNNER_PATHS = (
+ r"^content[\\\/]shell[\\\/]renderer[\\\/]test_runner[\\\/].*",
+ r"^content[\\\/]shell[\\\/]tools[\\\/]plugin[\\\/].*",
)
# Fragment of a regular expression that matches C++ and Objective-C++
@@ -37,7 +44,7 @@ _IMPLEMENTATION_EXTENSIONS = r'\.(cc|cpp|cxx|mm)$'
_TEST_CODE_EXCLUDED_PATHS = (
r'.*[/\\](fake_|test_|mock_).+%s' % _IMPLEMENTATION_EXTENSIONS,
r'.+_test_(base|support|util)%s' % _IMPLEMENTATION_EXTENSIONS,
- r'.+_(api|browser|perf|pixel|unit|ui)?test(_[a-z]+)?%s' %
+ r'.+_(api|browser|kif|perf|pixel|unit|ui)?test(_[a-z]+)?%s' %
_IMPLEMENTATION_EXTENSIONS,
r'.+profile_sync_service_harness%s' % _IMPLEMENTATION_EXTENSIONS,
r'.*[/\\](test|tool(s)?)[/\\].*',
@@ -47,14 +54,15 @@ _TEST_CODE_EXCLUDED_PATHS = (
r'chrome[/\\]browser[/\\]automation[/\\].*',
# Non-production example code.
r'mojo[/\\]examples[/\\].*',
+ # Launcher for running iOS tests on the simulator.
+ r'testing[/\\]iossim[/\\]iossim\.mm$',
)
_TEST_ONLY_WARNING = (
'You might be calling functions intended only for testing from\n'
'production code. It is OK to ignore this warning if you know what\n'
'you are doing, as the heuristics used to detect the situation are\n'
- 'not perfect. The commit queue will not block on this warning.\n'
- 'Email joi@chromium.org if you have questions.')
+ 'not perfect. The commit queue will not block on this warning.')
_INCLUDE_ORDER_WARNING = (
@@ -73,7 +81,7 @@ _BANNED_OBJC_FUNCTIONS = (
False,
),
(
- 'NSTrackingArea',
+ r'/NSTrackingArea\W',
(
'The use of NSTrackingAreas is prohibited. Please use CrTrackingArea',
'instead.',
@@ -159,10 +167,13 @@ _BANNED_CPP_FUNCTIONS = (
),
True,
(
+ r"^chrome[\\\/]browser[\\\/]chromeos[\\\/]boot_times_loader\.cc$",
r"^components[\\\/]breakpad[\\\/]app[\\\/]breakpad_mac\.mm$",
r"^content[\\\/]shell[\\\/]browser[\\\/]shell_browser_main\.cc$",
r"^content[\\\/]shell[\\\/]browser[\\\/]shell_message_filter\.cc$",
+ r"^mojo[\\\/]system[\\\/]raw_shared_buffer_posix\.cc$",
r"^net[\\\/]disk_cache[\\\/]cache_util\.cc$",
+ r"^net[\\\/]url_request[\\\/]test_url_fetcher_factory\.cc$",
),
),
(
@@ -226,12 +237,24 @@ _BANNED_CPP_FUNCTIONS = (
r'^ppapi[\\\/]tests[\\\/]test_broker\.cc$',
),
),
+ (
+ r'/v8::Extension\(',
+ (
+ 'Do not introduce new v8::Extensions into the code base, use',
+ 'gin::Wrappable instead. See http://crbug.com/334679',
+ ),
+ True,
+ (
+ r'extensions[/\\]renderer[/\\]safe_builtins\.*',
+ ),
+ ),
)
_VALID_OS_MACROS = (
# Please keep sorted.
'OS_ANDROID',
+ 'OS_ANDROID_HOST',
'OS_BSD',
'OS_CAT', # For testing.
'OS_CHROMEOS',
@@ -242,6 +265,7 @@ _VALID_OS_MACROS = (
'OS_NACL',
'OS_OPENBSD',
'OS_POSIX',
+ 'OS_QNX',
'OS_SOLARIS',
'OS_WIN',
)
@@ -258,9 +282,9 @@ def _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api):
# calls to such functions without a proper C++ parser.
file_inclusion_pattern = r'.+%s' % _IMPLEMENTATION_EXTENSIONS
- base_function_pattern = r'ForTest(ing)?|for_test(ing)?'
+ base_function_pattern = r'[ :]test::[^\s]+|ForTest(ing)?|for_test(ing)?'
inclusion_pattern = input_api.re.compile(r'(%s)\s*\(' % base_function_pattern)
- comment_pattern = input_api.re.compile(r'//.*%s' % base_function_pattern)
+ comment_pattern = input_api.re.compile(r'//.*(%s)' % base_function_pattern)
exclusion_pattern = input_api.re.compile(
r'::[A-Za-z0-9_]+(%s)|(%s)[^;]+\{' % (
base_function_pattern, base_function_pattern))
@@ -277,15 +301,12 @@ def _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api):
problems = []
for f in input_api.AffectedSourceFiles(FilterFile):
local_path = f.LocalPath()
- lines = input_api.ReadFile(f).splitlines()
- line_number = 0
- for line in lines:
+ for line_number, line in f.ChangedContents():
if (inclusion_pattern.search(line) and
not comment_pattern.search(line) and
not exclusion_pattern.search(line)):
problems.append(
'%s:%d\n %s' % (local_path, line_number, line.strip()))
- line_number += 1
if problems:
return [output_api.PresubmitPromptOrNotify(_TEST_ONLY_WARNING, problems)]
@@ -379,7 +400,14 @@ def _CheckNoBannedFunctions(input_api, output_api):
for f in input_api.AffectedFiles(file_filter=file_filter):
for line_num, line in f.ChangedContents():
for func_name, message, error in _BANNED_OBJC_FUNCTIONS:
- if func_name in line:
+ matched = False
+ if func_name[0:1] == '/':
+ regex = func_name[1:]
+ if input_api.re.search(regex, line):
+ matched = True
+ elif func_name in line:
+ matched = True
+ if matched:
problems = warnings;
if error:
problems = errors;
@@ -474,7 +502,7 @@ def _CheckUnwantedDependencies(input_api, output_api):
original_sys_path = sys.path
try:
sys.path = sys.path + [input_api.os_path.join(
- input_api.PresubmitLocalPath(), 'tools', 'checkdeps')]
+ input_api.PresubmitLocalPath(), 'buildtools', 'checkdeps')]
import checkdeps
from cpp_checker import CppChecker
from rules import Rule
@@ -518,18 +546,19 @@ def _CheckUnwantedDependencies(input_api, output_api):
def _CheckFilePermissions(input_api, output_api):
"""Check that all files have their permissions properly set."""
+ if input_api.platform == 'win32':
+ return []
args = [sys.executable, 'tools/checkperms/checkperms.py', '--root',
input_api.change.RepositoryRoot()]
for f in input_api.AffectedFiles():
args += ['--file', f.LocalPath()]
- errors = []
- (errors, stderrdata) = subprocess.Popen(args).communicate()
-
- results = []
+ checkperms = input_api.subprocess.Popen(args,
+ stdout=input_api.subprocess.PIPE)
+ errors = checkperms.communicate()[0].strip()
if errors:
- results.append(output_api.PresubmitError('checkperms.py failed.',
- errors))
- return results
+ return [output_api.PresubmitError('checkperms.py failed.',
+ errors.splitlines())]
+ return []
def _CheckNoAuraWindowPropertyHInHeaders(input_api, output_api):
@@ -662,7 +691,7 @@ def _CheckIncludeOrderInFile(input_api, f, changed_linenums):
for line in contents[line_num:]:
line_num += 1
if uncheckable_includes_pattern.match(line):
- return []
+ continue
if if_pattern.match(line):
scopes.append(current_scope)
current_scope = []
@@ -751,7 +780,7 @@ def _CheckHardcodedGoogleHostsInLowerLayers(input_api, output_api):
if problems:
return [output_api.PresubmitPromptOrNotify(
'Most layers below src/chrome/ should not hardcode service URLs.\n'
- 'Are you sure this is correct? (Contact: joi@chromium.org)',
+ 'Are you sure this is correct?',
[' %s:%d: %s' % (
problem[0], problem[1], problem[2]) for problem in problems])]
else:
@@ -776,9 +805,14 @@ def _CheckNoAbbreviationInPngFileName(input_api, output_api):
return results
-def _DepsFilesToCheck(re, changed_lines):
+def _FilesToCheckForIncomingDeps(re, changed_lines):
"""Helper method for _CheckAddedDepsHaveTargetApprovals. Returns
- a set of DEPS entries that we should look up."""
+ a set of DEPS entries that we should look up.
+
+ For a directory (rather than a specific filename) we fake a path to
+ a specific filename by adding /DEPS. This is chosen as a file that
+ will seldom or never be subject to per-file include_rules.
+ """
# We ignore deps entries on auto-generated directories.
AUTO_GENERATED_DIRS = ['grit', 'jni']
@@ -794,7 +828,10 @@ def _DepsFilesToCheck(re, changed_lines):
if m:
path = m.group(1)
if path.split('/')[0] not in AUTO_GENERATED_DIRS:
- results.add('%s/DEPS' % m.group(1))
+ if m.group(2):
+ results.add('%s%s' % (path, m.group(2)))
+ else:
+ results.add('%s/DEPS' % path)
return results
@@ -814,7 +851,8 @@ def _CheckAddedDepsHaveTargetApprovals(input_api, output_api):
if not changed_lines:
return []
- virtual_depended_on_files = _DepsFilesToCheck(input_api.re, changed_lines)
+ virtual_depended_on_files = _FilesToCheckForIncomingDeps(input_api.re,
+ changed_lines)
if not virtual_depended_on_files:
return []
@@ -843,12 +881,22 @@ def _CheckAddedDepsHaveTargetApprovals(input_api, output_api):
reviewers_plus_owner.add(owner_email)
missing_files = owners_db.files_not_covered_by(virtual_depended_on_files,
reviewers_plus_owner)
- unapproved_dependencies = ["'+%s'," % path[:-len('/DEPS')]
+
+ # We strip the /DEPS part that was added by
+ # _FilesToCheckForIncomingDeps to fake a path to a file in a
+ # directory.
+ def StripDeps(path):
+ start_deps = path.rfind('/DEPS')
+ if start_deps != -1:
+ return path[:start_deps]
+ else:
+ return path
+ unapproved_dependencies = ["'+%s'," % StripDeps(path)
for path in missing_files]
if unapproved_dependencies:
output_list = [
- output('Missing LGTM from OWNERS of directories added to DEPS:\n %s' %
+ output('Missing LGTM from OWNERS of dependencies added to DEPS:\n %s' %
'\n '.join(sorted(unapproved_dependencies)))]
if not input_api.is_committing:
suggested_owners = owners_db.reviewers_for(missing_files, owner_email)
@@ -866,14 +914,22 @@ def _CheckSpamLogging(input_api, output_api):
_TEST_CODE_EXCLUDED_PATHS +
input_api.DEFAULT_BLACK_LIST +
(r"^base[\\\/]logging\.h$",
+ r"^base[\\\/]logging\.cc$",
+ r"^cloud_print[\\\/]",
+ r"^chrome_elf[\\\/]dll_hash[\\\/]dll_hash_main\.cc$",
r"^chrome[\\\/]app[\\\/]chrome_main_delegate\.cc$",
r"^chrome[\\\/]browser[\\\/]chrome_browser_main\.cc$",
+ r"^chrome[\\\/]browser[\\\/]ui[\\\/]startup[\\\/]"
+ r"startup_browser_creator\.cc$",
r"^chrome[\\\/]installer[\\\/]setup[\\\/].*",
- r"^chrome[\\\/]renderer[\\\/]extensions[\\\/]"
- r"logging_native_handler\.cc$",
+ r"^extensions[\\\/]renderer[\\\/]logging_native_handler\.cc$",
+ r"^content[\\\/]common[\\\/]gpu[\\\/]client[\\\/]"
+ r"gl_helper_benchmark\.cc$",
+ r"^native_client_sdk[\\\/]",
r"^remoting[\\\/]base[\\\/]logging\.h$",
r"^remoting[\\\/]host[\\\/].*",
r"^sandbox[\\\/]linux[\\\/].*",
+ r"^tools[\\\/]",
r"^ui[\\\/]aura[\\\/]bench[\\\/]bench_main\.cc$",))
source_file_filter = lambda x: input_api.FilterSourceFile(
x, white_list=(file_inclusion_pattern,), black_list=black_list)
@@ -978,6 +1034,138 @@ def _CheckCygwinShell(input_api, output_api):
return []
+def _CheckUserActionUpdate(input_api, output_api):
+ """Checks if any new user action has been added."""
+ if any('actions.xml' == input_api.os_path.basename(f) for f in
+ input_api.LocalPaths()):
+ # If actions.xml is already included in the changelist, the PRESUBMIT
+ # for actions.xml will do a more complete presubmit check.
+ return []
+
+ file_filter = lambda f: f.LocalPath().endswith(('.cc', '.mm'))
+ action_re = r'[^a-zA-Z]UserMetricsAction\("([^"]*)'
+ current_actions = None
+ for f in input_api.AffectedFiles(file_filter=file_filter):
+ for line_num, line in f.ChangedContents():
+ match = input_api.re.search(action_re, line)
+ if match:
+ # Loads contents in tools/metrics/actions/actions.xml to memory. It's
+ # loaded only once.
+ if not current_actions:
+ with open('tools/metrics/actions/actions.xml') as actions_f:
+ current_actions = actions_f.read()
+ # Search for the matched user action name in |current_actions|.
+ for action_name in match.groups():
+ action = 'name="{0}"'.format(action_name)
+ if action not in current_actions:
+ return [output_api.PresubmitPromptWarning(
+ 'File %s line %d: %s is missing in '
+ 'tools/metrics/actions/actions.xml. Please run '
+ 'tools/metrics/actions/extract_actions.py to update.'
+ % (f.LocalPath(), line_num, action_name))]
+ return []
+
+
+def _GetJSONParseError(input_api, filename, eat_comments=True):
+ try:
+ contents = input_api.ReadFile(filename)
+ if eat_comments:
+ json_comment_eater = input_api.os_path.join(
+ input_api.PresubmitLocalPath(),
+ 'tools', 'json_comment_eater', 'json_comment_eater.py')
+ process = input_api.subprocess.Popen(
+ [input_api.python_executable, json_comment_eater],
+ stdin=input_api.subprocess.PIPE,
+ stdout=input_api.subprocess.PIPE,
+ universal_newlines=True)
+ (contents, _) = process.communicate(input=contents)
+
+ input_api.json.loads(contents)
+ except ValueError as e:
+ return e
+ return None
+
+
+def _GetIDLParseError(input_api, filename):
+ try:
+ contents = input_api.ReadFile(filename)
+ idl_schema = input_api.os_path.join(
+ input_api.PresubmitLocalPath(),
+ 'tools', 'json_schema_compiler', 'idl_schema.py')
+ process = input_api.subprocess.Popen(
+ [input_api.python_executable, idl_schema],
+ stdin=input_api.subprocess.PIPE,
+ stdout=input_api.subprocess.PIPE,
+ stderr=input_api.subprocess.PIPE,
+ universal_newlines=True)
+ (_, error) = process.communicate(input=contents)
+ return error or None
+ except ValueError as e:
+ return e
+
+
+def _CheckParseErrors(input_api, output_api):
+ """Check that IDL and JSON files do not contain syntax errors."""
+ actions = {
+ '.idl': _GetIDLParseError,
+ '.json': _GetJSONParseError,
+ }
+ # These paths contain test data and other known invalid JSON files.
+ excluded_patterns = [
+ 'test/data/',
+ '^components/policy/resources/policy_templates.json$',
+ ]
+ # Most JSON files are preprocessed and support comments, but these do not.
+ json_no_comments_patterns = [
+ '^testing/',
+ ]
+ # Only run IDL checker on files in these directories.
+ idl_included_patterns = [
+ '^chrome/common/extensions/api/',
+ '^extensions/common/api/',
+ ]
+
+ def get_action(affected_file):
+ filename = affected_file.LocalPath()
+ return actions.get(input_api.os_path.splitext(filename)[1])
+
+ def MatchesFile(patterns, path):
+ for pattern in patterns:
+ if input_api.re.search(pattern, path):
+ return True
+ return False
+
+ def FilterFile(affected_file):
+ action = get_action(affected_file)
+ if not action:
+ return False
+ path = affected_file.LocalPath()
+
+ if MatchesFile(excluded_patterns, path):
+ return False
+
+ if (action == _GetIDLParseError and
+ not MatchesFile(idl_included_patterns, path)):
+ return False
+ return True
+
+ results = []
+ for affected_file in input_api.AffectedFiles(
+ file_filter=FilterFile, include_deletes=False):
+ action = get_action(affected_file)
+ kwargs = {}
+ if (action == _GetJSONParseError and
+ MatchesFile(json_no_comments_patterns, affected_file.LocalPath())):
+ kwargs['eat_comments'] = False
+ parse_error = action(input_api,
+ affected_file.AbsoluteLocalPath(),
+ **kwargs)
+ if parse_error:
+ results.append(output_api.PresubmitError('%s could not be parsed: %s' %
+ (affected_file.LocalPath(), parse_error)))
+ return results
+
+
def _CheckJavaStyle(input_api, output_api):
"""Runs checkstyle on changed java files and returns errors if any exist."""
original_sys_path = sys.path
@@ -993,11 +1181,60 @@ def _CheckJavaStyle(input_api, output_api):
input_api, output_api, 'tools/android/checkstyle/chromium-style-5.0.xml')
+_DEPRECATED_CSS = [
+ # Values
+ ( "-webkit-box", "flex" ),
+ ( "-webkit-inline-box", "inline-flex" ),
+ ( "-webkit-flex", "flex" ),
+ ( "-webkit-inline-flex", "inline-flex" ),
+ ( "-webkit-min-content", "min-content" ),
+ ( "-webkit-max-content", "max-content" ),
+
+ # Properties
+ ( "-webkit-background-clip", "background-clip" ),
+ ( "-webkit-background-origin", "background-origin" ),
+ ( "-webkit-background-size", "background-size" ),
+ ( "-webkit-box-shadow", "box-shadow" ),
+
+ # Functions
+ ( "-webkit-gradient", "gradient" ),
+ ( "-webkit-repeating-gradient", "repeating-gradient" ),
+ ( "-webkit-linear-gradient", "linear-gradient" ),
+ ( "-webkit-repeating-linear-gradient", "repeating-linear-gradient" ),
+ ( "-webkit-radial-gradient", "radial-gradient" ),
+ ( "-webkit-repeating-radial-gradient", "repeating-radial-gradient" ),
+]
+
+def _CheckNoDeprecatedCSS(input_api, output_api):
+ """ Make sure that we don't use deprecated CSS
+ properties, functions or values. Our external
+ documentation is ignored by the hooks as it
+ needs to be consumed by WebKit. """
+ results = []
+ file_inclusion_pattern = (r".+\.css$")
+ black_list = (_EXCLUDED_PATHS +
+ _TEST_CODE_EXCLUDED_PATHS +
+ input_api.DEFAULT_BLACK_LIST +
+ (r"^chrome/common/extensions/docs",
+ r"^chrome/docs",
+ r"^native_client_sdk"))
+ file_filter = lambda f: input_api.FilterSourceFile(
+ f, white_list=file_inclusion_pattern, black_list=black_list)
+ for fpath in input_api.AffectedFiles(file_filter=file_filter):
+ for line_num, line in fpath.ChangedContents():
+ for (deprecated_value, value) in _DEPRECATED_CSS:
+ if input_api.re.search(deprecated_value, line):
+ results.append(output_api.PresubmitError(
+ "%s:%d: Use of deprecated CSS %s, use %s instead" %
+ (fpath.LocalPath(), line_num, deprecated_value, value)))
+ return results
+
def _CommonChecks(input_api, output_api):
"""Checks common to both upload and commit."""
results = []
results.extend(input_api.canned_checks.PanProjectChecks(
- input_api, output_api, excluded_paths=_EXCLUDED_PATHS))
+ input_api, output_api,
+ excluded_paths=_EXCLUDED_PATHS + _TESTRUNNER_PATHS))
results.extend(_CheckAuthorizedAuthor(input_api, output_api))
results.extend(
_CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api))
@@ -1026,7 +1263,9 @@ def _CommonChecks(input_api, output_api):
results.extend(_CheckSpamLogging(input_api, output_api))
results.extend(_CheckForAnonymousVariables(input_api, output_api))
results.extend(_CheckCygwinShell(input_api, output_api))
- results.extend(_CheckJavaStyle(input_api, output_api))
+ results.extend(_CheckUserActionUpdate(input_api, output_api))
+ results.extend(_CheckNoDeprecatedCSS(input_api, output_api))
+ results.extend(_CheckParseErrors(input_api, output_api))
if any('PRESUBMIT.py' == f.LocalPath() for f in input_api.AffectedFiles()):
results.extend(input_api.canned_checks.RunUnitTestsInDirectory(
@@ -1172,9 +1411,121 @@ def _CheckForInvalidOSMacros(input_api, output_api):
def CheckChangeOnUpload(input_api, output_api):
results = []
results.extend(_CommonChecks(input_api, output_api))
+ results.extend(_CheckJavaStyle(input_api, output_api))
return results
+def GetTryServerMasterForBot(bot):
+ """Returns the Try Server master for the given bot.
+
+ Assumes that most Try Servers are on the tryserver.chromium master."""
+ non_default_master_map = {
+ 'linux_gpu': 'tryserver.chromium.gpu',
+ 'mac_gpu': 'tryserver.chromium.gpu',
+ 'win_gpu': 'tryserver.chromium.gpu',
+ }
+ return non_default_master_map.get(bot, 'tryserver.chromium')
+
+
+def GetDefaultTryConfigs(bots=None):
+ """Returns a list of ('bot', set(['tests']), optionally filtered by [bots].
+
+ To add tests to this list, they MUST be in the the corresponding master's
+ gatekeeper config. For example, anything on master.chromium would be closed by
+ tools/build/masters/master.chromium/master_gatekeeper_cfg.py.
+
+ If 'bots' is specified, will only return configurations for bots in that list.
+ """
+
+ standard_tests = [
+ 'base_unittests',
+ 'browser_tests',
+ 'cacheinvalidation_unittests',
+ 'check_deps',
+ 'check_deps2git',
+ 'content_browsertests',
+ 'content_unittests',
+ 'crypto_unittests',
+ 'gpu_unittests',
+ 'interactive_ui_tests',
+ 'ipc_tests',
+ 'jingle_unittests',
+ 'media_unittests',
+ 'net_unittests',
+ 'ppapi_unittests',
+ 'printing_unittests',
+ 'sql_unittests',
+ 'sync_unit_tests',
+ 'unit_tests',
+ # Broken in release.
+ #'url_unittests',
+ #'webkit_unit_tests',
+ ]
+
+ builders_and_tests = {
+ # TODO(maruel): Figure out a way to run 'sizes' where people can
+ # effectively update the perf expectation correctly. This requires a
+ # clobber=True build running 'sizes'. 'sizes' is not accurate with
+ # incremental build. Reference:
+ # http://chromium.org/developers/tree-sheriffs/perf-sheriffs.
+ # TODO(maruel): An option would be to run 'sizes' but not count a failure
+ # of this step as a try job failure.
+ 'android_aosp': ['compile'],
+ 'android_chromium_gn_compile_rel': ['compile'],
+ 'android_clang_dbg': ['slave_steps'],
+ 'android_dbg': ['slave_steps'],
+ 'cros_x86': ['defaulttests'],
+ 'ios_dbg_simulator': [
+ 'compile',
+ 'base_unittests',
+ 'content_unittests',
+ 'crypto_unittests',
+ 'url_unittests',
+ 'net_unittests',
+ 'sql_unittests',
+ 'ui_unittests',
+ ],
+ 'ios_rel_device': ['compile'],
+ 'linux_asan': ['compile'],
+ 'mac_asan': ['compile'],
+ #TODO(stip): Change the name of this builder to reflect that it's release.
+ 'linux_gtk': standard_tests,
+ 'linux_chromeos_asan': ['compile'],
+ 'linux_chromium_chromeos_clang_dbg': ['defaulttests'],
+ 'linux_chromium_chromeos_rel': ['defaulttests'],
+ 'linux_chromium_compile_dbg': ['defaulttests'],
+ 'linux_chromium_gn_rel': ['defaulttests'],
+ 'linux_chromium_rel': ['defaulttests'],
+ 'linux_chromium_clang_dbg': ['defaulttests'],
+ 'linux_gpu': ['defaulttests'],
+ 'linux_nacl_sdk_build': ['compile'],
+ 'mac_chromium_compile_dbg': ['defaulttests'],
+ 'mac_chromium_rel': ['defaulttests'],
+ 'mac_gpu': ['defaulttests'],
+ 'mac_nacl_sdk_build': ['compile'],
+ 'win_chromium_compile_dbg': ['defaulttests'],
+ 'win_chromium_dbg': ['defaulttests'],
+ 'win_chromium_rel': ['defaulttests'],
+ 'win_chromium_x64_rel': ['defaulttests'],
+ 'win_gpu': ['defaulttests'],
+ 'win_nacl_sdk_build': ['compile'],
+ }
+
+ if bots:
+ filtered_builders_and_tests = dict((bot, set(builders_and_tests[bot]))
+ for bot in bots)
+ else:
+ filtered_builders_and_tests = dict(
+ (bot, set(tests))
+ for bot, tests in builders_and_tests.iteritems())
+
+ # Build up the mapping from tryserver master to bot/test.
+ out = dict()
+ for bot, tests in filtered_builders_and_tests.iteritems():
+ out.setdefault(GetTryServerMasterForBot(bot), {})[bot] = tests
+ return out
+
+
def CheckChangeOnCommit(input_api, output_api):
results = []
results.extend(_CommonChecks(input_api, output_api))
@@ -1186,10 +1537,6 @@ def CheckChangeOnCommit(input_api, output_api):
input_api,
output_api,
json_url='http://chromium-status.appspot.com/current?format=json'))
- results.extend(input_api.canned_checks.CheckRietveldTryJobExecution(input_api,
- output_api, 'http://codereview.chromium.org',
- ('win_rel', 'linux_rel', 'mac_rel, win:compile'),
- 'tryserver@chromium.org'))
results.extend(input_api.canned_checks.CheckChangeHasBugField(
input_api, output_api))
@@ -1199,44 +1546,55 @@ def CheckChangeOnCommit(input_api, output_api):
return results
-def GetPreferredTrySlaves(project, change):
+def GetPreferredTryMasters(project, change):
files = change.LocalPaths()
if not files or all(re.search(r'[\\/]OWNERS$', f) for f in files):
- return []
+ return {}
if all(re.search('\.(m|mm)$|(^|[/_])mac[/_.]', f) for f in files):
- return ['mac_rel', 'mac:compile']
+ return GetDefaultTryConfigs([
+ 'mac_chromium_compile_dbg',
+ 'mac_chromium_rel',
+ ])
if all(re.search('(^|[/_])win[/_.]', f) for f in files):
- return ['win_rel', 'win:compile']
+ return GetDefaultTryConfigs(['win_chromium_dbg', 'win_chromium_rel'])
if all(re.search('(^|[/_])android[/_.]', f) for f in files):
- return ['android_aosp', 'android_dbg', 'android_clang_dbg']
- if all(re.search('^native_client_sdk', f) for f in files):
- return ['linux_nacl_sdk', 'win_nacl_sdk', 'mac_nacl_sdk']
+ return GetDefaultTryConfigs([
+ 'android_aosp',
+ 'android_clang_dbg',
+ 'android_dbg',
+ ])
if all(re.search('[/_]ios[/_.]', f) for f in files):
- return ['ios_rel_device', 'ios_dbg_simulator']
+ return GetDefaultTryConfigs(['ios_rel_device', 'ios_dbg_simulator'])
- trybots = [
+ builders = [
+ 'android_chromium_gn_compile_rel',
'android_clang_dbg',
'android_dbg',
'ios_dbg_simulator',
'ios_rel_device',
- 'linux_asan',
- 'linux_aura',
- 'linux_chromeos',
- 'linux_clang:compile',
- 'linux_rel',
- 'mac_rel',
- 'mac:compile',
- 'win_rel',
- 'win:compile',
- 'win_x64_rel:base_unittests',
+ 'linux_chromium_chromeos_rel',
+ 'linux_chromium_clang_dbg',
+ 'linux_chromium_gn_rel',
+ 'linux_chromium_rel',
+ 'linux_gpu',
+ 'mac_chromium_compile_dbg',
+ 'mac_chromium_rel',
+ 'mac_gpu',
+ 'win_chromium_compile_dbg',
+ 'win_chromium_rel',
+ 'win_chromium_x64_rel',
+ 'win_gpu',
]
# Match things like path/aura/file.cc and path/file_aura.cc.
# Same for chromeos.
if any(re.search('[/_](aura|chromeos)', f) for f in files):
- trybots += ['linux_chromeos_clang:compile', 'linux_chromeos_asan']
+ builders.extend([
+ 'linux_chromeos_asan',
+ 'linux_chromium_chromeos_clang_dbg'
+ ])
# If there are gyp changes to base, build, or chromeos, run a full cros build
# in addition to the shorter linux_chromeos build. Changes to high level gyp
@@ -1244,13 +1602,13 @@ def GetPreferredTrySlaves(project, change):
# differnt from the linux_chromeos build that most chrome developers test
# with.
if any(re.search('^(base|build|chromeos).*\.gypi?$', f) for f in files):
- trybots += ['cros_x86']
+ builders.extend(['cros_x86'])
# The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it
# unless they're .gyp(i) files as changes to those files can break the gyp
# step on that bot.
if (not all(re.search('^chrome', f) for f in files) or
any(re.search('\.gypi?$', f) for f in files)):
- trybots += ['android_aosp']
+ builders.extend(['android_aosp'])
- return trybots
+ return GetDefaultTryConfigs(builders)
diff --git a/chromium/PRESUBMIT_test.py b/chromium/PRESUBMIT_test.py
index 1c7990ce898..f81b316aa2e 100755
--- a/chromium/PRESUBMIT_test.py
+++ b/chromium/PRESUBMIT_test.py
@@ -3,23 +3,43 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import glob
+import json
import os
import re
+import subprocess
+import sys
import unittest
import PRESUBMIT
+_TEST_DATA_DIR = 'base/test/data/presubmit'
+
+
class MockInputApi(object):
def __init__(self):
+ self.json = json
self.re = re
self.os_path = os.path
+ self.python_executable = sys.executable
+ self.subprocess = subprocess
self.files = []
self.is_committing = False
def AffectedFiles(self):
return self.files
+ def PresubmitLocalPath(self):
+ return os.path.dirname(__file__)
+
+ def ReadFile(self, filename, mode='rU'):
+ for file_ in self.files:
+ if file_.LocalPath() == filename:
+ return '\n'.join(file_.NewContents())
+ # Otherwise, file is not in our mock API.
+ raise IOError, "No such file or directory: '%s'" % filename
+
class MockOutputApi(object):
class PresubmitResult(object):
@@ -280,36 +300,36 @@ class IncludeOrderTest(unittest.TestCase):
def testUncheckableIncludes(self):
mock_input_api = MockInputApi()
contents = ['#include <windows.h>',
- '#include "b.h"'
+ '#include "b.h"',
'#include "a.h"']
mock_file = MockFile('', contents)
warnings = PRESUBMIT._CheckIncludeOrderInFile(
mock_input_api, mock_file, range(1, len(contents) + 1))
- self.assertEqual(0, len(warnings))
+ self.assertEqual(1, len(warnings))
contents = ['#include "gpu/command_buffer/gles_autogen.h"',
- '#include "b.h"'
+ '#include "b.h"',
'#include "a.h"']
mock_file = MockFile('', contents)
warnings = PRESUBMIT._CheckIncludeOrderInFile(
mock_input_api, mock_file, range(1, len(contents) + 1))
- self.assertEqual(0, len(warnings))
+ self.assertEqual(1, len(warnings))
contents = ['#include "gl_mock_autogen.h"',
- '#include "b.h"'
+ '#include "b.h"',
'#include "a.h"']
mock_file = MockFile('', contents)
warnings = PRESUBMIT._CheckIncludeOrderInFile(
mock_input_api, mock_file, range(1, len(contents) + 1))
- self.assertEqual(0, len(warnings))
+ self.assertEqual(1, len(warnings))
contents = ['#include "ipc/some_macros.h"',
- '#include "b.h"'
+ '#include "b.h"',
'#include "a.h"']
mock_file = MockFile('', contents)
warnings = PRESUBMIT._CheckIncludeOrderInFile(
mock_input_api, mock_file, range(1, len(contents) + 1))
- self.assertEqual(0, len(warnings))
+ self.assertEqual(1, len(warnings))
class VersionControlConflictsTest(unittest.TestCase):
@@ -369,8 +389,8 @@ class BadExtensionsTest(unittest.TestCase):
'some/path/OWNERS',
'A\Windows\Path\OWNERS',
])
- results = PRESUBMIT.GetPreferredTrySlaves(None, mock_change)
- self.assertEqual(0, len(results))
+ results = PRESUBMIT.GetPreferredTryMasters(None, mock_change)
+ self.assertEqual({}, results)
class InvalidOSMacroNamesTest(unittest.TestCase):
@@ -394,7 +414,7 @@ class InvalidOSMacroNamesTest(unittest.TestCase):
class CheckAddedDepsHaveTetsApprovalsTest(unittest.TestCase):
- def testDepsFilesToCheck(self):
+ def testFilesToCheckForIncomingDeps(self):
changed_lines = [
'"+breakpad",',
'"+chrome/installer",',
@@ -404,6 +424,7 @@ class CheckAddedDepsHaveTetsApprovalsTest(unittest.TestCase):
'"+components/breakpad",',
'"+components/nacl/common",',
'"+content/public/browser/render_process_host.h",',
+ '"+jni/fooblat.h",',
'"+grit", # For generated headers',
'"+grit/generated_resources.h",',
'"+grit/",',
@@ -412,23 +433,220 @@ class CheckAddedDepsHaveTetsApprovalsTest(unittest.TestCase):
'"+tools/memory_watcher",',
'"+third_party/lss/linux_syscall_support.h",',
]
- files_to_check = PRESUBMIT._DepsFilesToCheck(re, changed_lines)
+ files_to_check = PRESUBMIT._FilesToCheckForIncomingDeps(re, changed_lines)
expected = set([
'breakpad/DEPS',
'chrome/installer/DEPS',
- 'chrome/plugin/DEPS',
- 'chrome/utility/DEPS',
- 'chromeos/DEPS',
+ 'chrome/plugin/chrome_content_plugin_client.h',
+ 'chrome/utility/chrome_content_utility_client.h',
+ 'chromeos/chromeos_paths.h',
'components/breakpad/DEPS',
'components/nacl/common/DEPS',
- 'content/public/browser/DEPS',
+ 'content/public/browser/render_process_host.h',
'policy/DEPS',
'sandbox/DEPS',
'tools/memory_watcher/DEPS',
- 'third_party/lss/DEPS',
+ 'third_party/lss/linux_syscall_support.h',
])
self.assertEqual(expected, files_to_check);
+class JSONParsingTest(unittest.TestCase):
+ def testSuccess(self):
+ input_api = MockInputApi()
+ filename = 'valid_json.json'
+ contents = ['// This is a comment.',
+ '{',
+ ' "key1": ["value1", "value2"],',
+ ' "key2": 3 // This is an inline comment.',
+ '}'
+ ]
+ input_api.files = [MockFile(filename, contents)]
+ self.assertEqual(None,
+ PRESUBMIT._GetJSONParseError(input_api, filename))
+
+ def testFailure(self):
+ input_api = MockInputApi()
+ test_data = [
+ ('invalid_json_1.json',
+ ['{ x }'],
+ 'Expecting property name:'),
+ ('invalid_json_2.json',
+ ['// Hello world!',
+ '{ "hello": "world }'],
+ 'Unterminated string starting at:'),
+ ('invalid_json_3.json',
+ ['{ "a": "b", "c": "d", }'],
+ 'Expecting property name:'),
+ ('invalid_json_4.json',
+ ['{ "a": "b" "c": "d" }'],
+ 'Expecting , delimiter:'),
+ ]
+
+ input_api.files = [MockFile(filename, contents)
+ for (filename, contents, _) in test_data]
+
+ for (filename, _, expected_error) in test_data:
+ actual_error = PRESUBMIT._GetJSONParseError(input_api, filename)
+ self.assertTrue(expected_error in str(actual_error),
+ "'%s' not found in '%s'" % (expected_error, actual_error))
+
+ def testNoEatComments(self):
+ input_api = MockInputApi()
+ file_with_comments = 'file_with_comments.json'
+ contents_with_comments = ['// This is a comment.',
+ '{',
+ ' "key1": ["value1", "value2"],',
+ ' "key2": 3 // This is an inline comment.',
+ '}'
+ ]
+ file_without_comments = 'file_without_comments.json'
+ contents_without_comments = ['{',
+ ' "key1": ["value1", "value2"],',
+ ' "key2": 3',
+ '}'
+ ]
+ input_api.files = [MockFile(file_with_comments, contents_with_comments),
+ MockFile(file_without_comments,
+ contents_without_comments)]
+
+ self.assertEqual('No JSON object could be decoded',
+ str(PRESUBMIT._GetJSONParseError(input_api,
+ file_with_comments,
+ eat_comments=False)))
+ self.assertEqual(None,
+ PRESUBMIT._GetJSONParseError(input_api,
+ file_without_comments,
+ eat_comments=False))
+
+
+class IDLParsingTest(unittest.TestCase):
+ def testSuccess(self):
+ input_api = MockInputApi()
+ filename = 'valid_idl_basics.idl'
+ contents = ['// Tests a valid IDL file.',
+ 'namespace idl_basics {',
+ ' enum EnumType {',
+ ' name1,',
+ ' name2',
+ ' };',
+ '',
+ ' dictionary MyType1 {',
+ ' DOMString a;',
+ ' };',
+ '',
+ ' callback Callback1 = void();',
+ ' callback Callback2 = void(long x);',
+ ' callback Callback3 = void(MyType1 arg);',
+ ' callback Callback4 = void(EnumType type);',
+ '',
+ ' interface Functions {',
+ ' static void function1();',
+ ' static void function2(long x);',
+ ' static void function3(MyType1 arg);',
+ ' static void function4(Callback1 cb);',
+ ' static void function5(Callback2 cb);',
+ ' static void function6(Callback3 cb);',
+ ' static void function7(Callback4 cb);',
+ ' };',
+ '',
+ ' interface Events {',
+ ' static void onFoo1();',
+ ' static void onFoo2(long x);',
+ ' static void onFoo2(MyType1 arg);',
+ ' static void onFoo3(EnumType type);',
+ ' };',
+ '};'
+ ]
+ input_api.files = [MockFile(filename, contents)]
+ self.assertEqual(None,
+ PRESUBMIT._GetIDLParseError(input_api, filename))
+
+ def testFailure(self):
+ input_api = MockInputApi()
+ test_data = [
+ ('invalid_idl_1.idl',
+ ['//',
+ 'namespace test {',
+ ' dictionary {',
+ ' DOMString s;',
+ ' };',
+ '};'],
+ 'Unexpected "{" after keyword "dictionary".\n'),
+ # TODO(yoz): Disabled because it causes the IDL parser to hang.
+ # See crbug.com/363830.
+ # ('invalid_idl_2.idl',
+ # (['namespace test {',
+ # ' dictionary MissingSemicolon {',
+ # ' DOMString a',
+ # ' DOMString b;',
+ # ' };',
+ # '};'],
+ # 'Unexpected symbol DOMString after symbol a.'),
+ ('invalid_idl_3.idl',
+ ['//',
+ 'namespace test {',
+ ' enum MissingComma {',
+ ' name1',
+ ' name2',
+ ' };',
+ '};'],
+ 'Unexpected symbol name2 after symbol name1.'),
+ ('invalid_idl_4.idl',
+ ['//',
+ 'namespace test {',
+ ' enum TrailingComma {',
+ ' name1,',
+ ' name2,',
+ ' };',
+ '};'],
+ 'Trailing comma in block.'),
+ ('invalid_idl_5.idl',
+ ['//',
+ 'namespace test {',
+ ' callback Callback1 = void(;',
+ '};'],
+ 'Unexpected ";" after "(".'),
+ ('invalid_idl_6.idl',
+ ['//',
+ 'namespace test {',
+ ' callback Callback1 = void(long );',
+ '};'],
+ 'Unexpected ")" after symbol long.'),
+ ('invalid_idl_7.idl',
+ ['//',
+ 'namespace test {',
+ ' interace Events {',
+ ' static void onFoo1();',
+ ' };',
+ '};'],
+ 'Unexpected symbol Events after symbol interace.'),
+ ('invalid_idl_8.idl',
+ ['//',
+ 'namespace test {',
+ ' interface NotEvent {',
+ ' static void onFoo1();',
+ ' };',
+ '};'],
+ 'Did not process Interface Interface(NotEvent)'),
+ ('invalid_idl_9.idl',
+ ['//',
+ 'namespace test {',
+ ' interface {',
+ ' static void function1();',
+ ' };',
+ '};'],
+ 'Interface missing name.'),
+ ]
+
+ input_api.files = [MockFile(filename, contents)
+ for (filename, contents, _) in test_data]
+
+ for (filename, _, expected_error) in test_data:
+ actual_error = PRESUBMIT._GetIDLParseError(input_api, filename)
+ self.assertTrue(expected_error in str(actual_error),
+ "'%s' not found in '%s'" % (expected_error, actual_error))
+
+
if __name__ == '__main__':
unittest.main()
diff --git a/chromium/WATCHLISTS b/chromium/WATCHLISTS
index 2f3c2ffd79e..b41cd50ed40 100644
--- a/chromium/WATCHLISTS
+++ b/chromium/WATCHLISTS
@@ -15,13 +15,16 @@
'|chrome/browser/ui/views/accelerator_table\.cc',
},
'accessibility': {
- 'filepath': 'chrome/browser/accessibility/' \
+ 'filepath': 'braille' \
+ '|chrome/browser/accessibility/' \
+ '|chromevox' \
'|content/browser/accessibility/' \
'|content/browser/resources/accessibility/' \
'|content/renderer/accessibility/' \
'|content/test/data/accessibility/' \
'|content/public/android/.*accessib' \
'|chrome/.*accessib' \
+ '|liblouis' \
'|ui/base/accessibility/' \
'|ui/views/accessibility/'
},
@@ -34,6 +37,17 @@
'|testing/android/' \
'|tools/android/'
},
+ 'android_media': {
+ 'filepath': 'content/browser/media/android' \
+ '|content/renderer/media/android' \
+ '|media/audio/android' \
+ '|media/base/android' \
+ '|media/midi/*_android.*' \
+ '|media/video/capture/android'
+ },
+ 'android_tab': {
+ 'filepath': 'chrome/android/java/src/org/chromium/chrome/browser/Tab'
+ },
'android_webview': {
'filepath': 'android_webview/',
},
@@ -64,9 +78,12 @@
'aura_compositor': {
'filepath':
'ui/compositor/' \
- '|content/browser/aura/' \
+ '|content/browser/compositor/' \
+ '|content/browser/renderer_host/compositor_resize_lock_aura' \
'|content/browser/renderer_host/render_widget_host_view_aura' \
'|content/browser/renderer_host/render_widget_host_view_browsertest' \
+ '|content/browser/renderer_host/delegated' \
+ '|content/browser/renderer_host/software' \
'|content/common/gpu/client/' \
'|webkit/common/gpu/'
},
@@ -108,8 +125,8 @@
'|chrome/browser/resources/bookmark_manager/' \
'|chrome/browser/ui/bookmarks/' \
'|chrome/browser/ui/cocoa/bookmarks/' \
- '|chrome/browser/ui/gtk/bookmarks/' \
- '|chrome/browser/ui/views/bookmarks/'
+ '|chrome/browser/ui/views/bookmarks/' \
+ '|components/bookmarks'
},
'browser': {
'filepath': 'chrome/browser/',
@@ -142,13 +159,16 @@
'cast': {
'filepath': 'media/cast/',
},
+ 'chromecast': {
+ 'filepath': 'chromecast/',
+ },
'cc': {
'filepath': 'cc/|'\
'webkit/renderer/compositor_bindings/|'\
'content/common/cc_messages'
},
- 'chrome_frame': {
- 'filepath': 'chrome_frame/',
+ 'chrome_elf': {
+ 'filepath': 'chrome_elf',
},
'chrome_views': {
'filepath': 'chrome/browser/ui/views',
@@ -192,13 +212,14 @@
'clipboard': {
'filepath': 'clipboard|dnd|drag|drop',
},
- 'contacts': {
- 'filepath': 'chrome/browser/chromeos/contacts/|'\
- 'chrome/browser/chromeos/gdata/gdata_contacts_service',
- },
'content': {
'filepath': 'content/',
},
+ 'content_input': {
+ 'filepath': 'content/browser/renderer_host/input/|'\
+ 'content/common/input/|'\
+ 'content/renderer/input/',
+ },
'content_shell': {
'filepath': 'content/shell/',
},
@@ -209,12 +230,12 @@
'deep_memory_profiler': {
'filepath': 'tools/(deep_memory_profiler|find_runtime_symbols)',
},
- 'device_orientation': {
- 'filepath': 'content/browser/device_orientation/|'\
- 'content/common/device_orientation/|'\
- 'content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java|'\
- 'content/public/android/javatests/src/org/chromium/content/browser/DeviceMotionAndOrientationTest.java|'\
- 'content/renderer/device_orientation/',
+ 'device_sensors': {
+ 'filepath': 'content/browser/device_sensors/|'\
+ 'content/common/device_sensors/|'\
+ 'content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java|'\
+ 'content/public/android/javatests/src/org/chromium/content/browser/DeviceSensorsTest.java|'\
+ 'content/renderer/device_sensors/',
},
'devtools': {
'filepath': 'devtools',
@@ -257,6 +278,9 @@
'drive_resource_metadata': {
'filepath': 'chrome/browser/chromeos/drive/resource_metadata'
},
+ 'events': {
+ 'filepath': 'ui/events/',
+ },
'extension': {
'filepath': 'extension',
},
@@ -270,11 +294,16 @@
'filebrowse'
},
'filesapp': {
- 'filepath': 'chrome/browser/resources/file_manager',
+ 'filepath': 'ui/file_manager'
},
'ftp': {
'filepath': 'ftp',
},
+ 'gcm': {
+ 'filepath': 'chrome/browser/services/gcm/|'\
+ 'components/gcm_driver/|'\
+ 'google_apis/gcm/',
+ },
'geolocation': {
'filepath': 'chrome/browser/geolocation/|'\
'content/browser/geolocation|'\
@@ -294,6 +323,9 @@
'ui/gfx/transform|'\
'ui/gfx/vector2d',
},
+ 'gn': {
+ 'filepath': 'tools/gn',
+ },
'gpu': {
'filepath': 'gpu/',
},
@@ -330,6 +362,9 @@
'ipc': {
'filepath': 'ipc/ipc',
},
+ 'libwebp': {
+ 'filepath': 'third_party/libwebp'
+ },
'layout_tests': {
'filepath': 'webkit/(tools|data)/(layout_tests|test_shell)/',
},
@@ -369,13 +404,18 @@
'filepath': 'base/metrics/'\
'|chrome/browser/metrics/'\
'|chrome/common/metrics/'\
- '|chrome_frame/metrics'\
'|chrome/browser/chromeos/external_metrics'\
- '|chrome/browser/extensions/api/metrics/metrics'\
+ '|chrome/browser/extensions/api/metrics_private/'\
'|chrome/browser/ui/webui/metrics_handler'\
'|content/browser/user_metrics.cc'\
+ '|components/rappor/'\
'|content/public/browser/user_metrics.h'\
- '|tools/metrics/'
+ # Exclude XML files; in particular, histograms.xml.
+ '|tools/metrics/[^.]*([.](?!xml$).*)?$',
+ },
+ 'metrics_xml_files': {
+ # Subscribe to this to watch for changes to histograms.xml.
+ 'filepath': 'tools/metrics/.*\.xml$'
},
'mojo': {
'filepath': 'mojo',
@@ -383,6 +423,9 @@
'mouse_lock': {
'filepath': 'mouse_lock',
},
+ 'music_manager_private': {
+ 'filepath' :'chrome/browser/extensions/api/music_manager_private/',
+ },
'nacl': {
'filepath': 'chrome/nacl/|chrome/test/nacl/|'\
'chrome/browser/nacl_host/|chrome/common/nacl|'\
@@ -391,6 +434,14 @@
'native_client_sdk': {
'filepath': '^native_client_sdk/',
},
+ 'navigation': {
+ 'filepath': 'content/browser/frame_host|'\
+ 'content/browser/renderer_host/render_process_host.*|'\
+ 'content/browser/renderer_host/render_view_host.*|'\
+ 'content/browser/web_contents/web_contents_impl.*|'\
+ 'content/renderer/render_frame.*|'\
+ 'content/renderer/render_view.*'
+ },
'net': {
'filepath': 'net/',
},
@@ -420,6 +471,9 @@
'filepath': 'chrome/browser/resources/options/|'\
'chrome/browser/ui/webui/options/',
},
+ 'overview_mode': {
+ 'filepath': 'ash/wm/overview/',
+ },
'ozone': {
'filepath': 'ui/ozone/|'\
'ui/events/ozone/|'\
@@ -433,15 +487,18 @@
'|chrome/browser/ui/gtk/panels'\
'|chrome/browser/ui/views/panels'
},
+ 'password_manager': {
+ 'filepath': 'chrome/.*/password_'\
+ '|chrome/browser/ui/passwords'\
+ '|chrome/browser/ui/views/passwords'\
+ '|chrome/test/data/password'\
+ '|components/autofill.*password'
+ '|components/password_'\
+ },
'pepper_api': {
'filepath': 'ppapi/api'\
'|ppapi/c',
},
- 'perf': {
- 'filepath': 'tools/perf' \
- '|tools/telemetry' \
- '|chrome/test/perf'
- },
'plugin': {
'filepath': 'chrome/browser/plugin|chrome/plugin/|'\
'chrome/common/plugin|webkit/glue/webplugin|webkit/glue/plugins/',
@@ -469,9 +526,8 @@
'sessions': {
'filepath': 'chrome/browser/sessions/',
},
- 'shell_window': {
- 'filepath': 'chrome/browser/ui/(views/|gtk/|cocoa/|)'\
- 'extensions/(shell|app|native)'
+ 'service_worker': {
+ 'filepath': 'content/(browser|renderer|child|common)/service_worker/',
},
'site_instance': {
'filepath': 'content/browser/site_instance|'\
@@ -497,7 +553,7 @@
'filepath': 'content/browser/streams/',
},
'sync': {
- 'filepath': 'chrome/browser/sync/|sync/',
+ 'filepath': 'chrome/browser/sync/|sync/|components/sync_driver/',
},
'syncfs': {
'filepath': 'sync_file_system',
@@ -534,7 +590,8 @@
'filepath': 'third_party/tcmalloc'
},
'telemetry': {
- 'filepath': 'tools/telemetry'
+ 'filepath': 'tools/perf/|'\
+ 'tools/telemetry/'
},
'tests': {
'filepath': 'apitest|unittest|browsertest|uitest|chrome/test/',
@@ -588,6 +645,9 @@
'valgrind': {
'filepath': 'valgrind',
},
+ 'version_assembly': {
+ 'filepath': 'chrome/app/version_assembly',
+ },
'views': {
# Applies to all files and subdirs within this directory.
'filepath': '^ui/views/',
@@ -600,6 +660,11 @@
'views_corewm': {
'filepath': 'ui/views/corewm/',
},
+ 'virtual_keyboard': {
+ 'filepath': 'ui/keyboard/'\
+ 'chrome/test/data/chromeos/virtual_keyboard/'\
+ 'chrome/common/extensions/api/virtual_keyboard',
+ },
'webkit': {
'filepath': 'webkit/',
},
@@ -639,15 +704,14 @@
'dtseng+watch@chromium.org',
'plundblad+watch@chromium.org',
'aboxhall+watch@chromium.org',
- 'yoshiki+watch@chromium.org',
'yuzo+watch@chromium.org'],
'activity_log': ['felt@chromium.org'],
'android_infra': ['bulach+watch@chromium.org',
'yfriedman+watch@chromium.org',
'ilevy-cc@chromium.org',
- 'klundberg+watch@chromium.org',
- 'craigdh+watch@chromium.org',
- 'frankf+watch@chromium.org'],
+ 'klundberg+watch@chromium.org'],
+ 'android_media': ['avayvod+watch@chromium.org'],
+ 'android_tab': ['avayvod+watch@chromium.org', 'dtrainor@chromium.org'],
'android_webview': ['android-webview-reviews@chromium.org'],
'app_list': ['tfarina@chromium.org', 'chrome-apps-syd-reviews@chromium.org'],
'app_shortcuts': ['chrome-apps-syd-reviews@chromium.org'],
@@ -684,18 +748,20 @@
'browser_resources': ['arv+watch@chromium.org'],
'browsing_data': ['markusheintz@chromium.org'],
'bubble': ['alicet@chromium.org', 'msw+watch@chromium.org'],
- 'cast': ['hclam+watch@chromium.org',
+ 'cast': ['avayvod+watch@chromium.org',
+ 'hclam+watch@chromium.org',
'hguihot+watch@chromium.org',
'hubbe+watch@chromium.org',
+ 'imcheng+watch@chromium.org',
'jasonroberts+watch@google.com',
'mikhal+watch@chromium.org',
'miu+watch@chromium.org',
'pwestin+watch@google.com'],
+ 'chromecast': ['ozone-reviews@chromium.org'],
'cc': ['cc-bugs@chromium.org'],
- 'chrome_frame': ['amit@chromium.org', 'grt+watch@chromium.org',
- 'robertshield@chromium.org'],
+ 'chrome_elf': ['caitkp+watch@chromium.org',],
'chrome_views': ['tfarina@chromium.org'],
- 'chromedriver': ['chrisgao@chromium.org', 'frankf@chromium.org'],
+ 'chromedriver': ['stgao@chromium.org'],
'chromeos' : ['oshima+watch@chromium.org',
'stevenjb+watch@chromium.org'],
'chromeos_attestation' : ['dkrahn+watch@chromium.org'],
@@ -708,13 +774,13 @@
'eugenis+clang@chromium.org',
'glider+clang@chromium.org'],
'clipboard': ['dcheng@chromium.org'],
- 'contacts': ['derat+watch@chromium.org'],
- 'content': ['jam@chromium.org', 'joi+watch-content@chromium.org',
+ 'content': ['jam@chromium.org',
'darin-cc@chromium.org'],
+ 'content_input': ['jdduke+watch@chromium.org'],
'content_shell': ['jochen+watch@chromium.org'],
'cookie_monster': ['erikwright@chromium.org'],
'deep_memory_profiler': ['dmikurube+memory@chromium.org'],
- 'device_orientation': ['timvolodine@chromium.org', 'mvanouwerkerk@chromium.org'],
+ 'device_sensors': ['timvolodine@chromium.org', 'mvanouwerkerk@chromium.org', 'rijubrata.bhaumik@intel.com'],
'devtools': ['pfeldman@chromium.org', 'yurys@chromium.org',
'vsevik@chromium.org', 'aandrey+blink@chromium.org',
'paulirish+reviews@chromium.org',
@@ -727,24 +793,29 @@
'downloads_ui': ['asanka@chromium.org', 'benjhayden+dwatch@chromium.org'],
'drive': ['tfarina@chromium.org'],
'drive_resource_metadata': ['hashimoto+watch@chromium.org'],
+ 'events': ['tdresser+watch@chromium.org'],
'extension': ['chromium-apps-reviews@chromium.org',
'extensions-reviews@chromium.org'],
- 'fileapi': ['kinuko+watch@chromium.org',
+ 'fileapi': ['kinuko+fileapi@chromium.org',
'nhiroki@chromium.org',
'tzik@chromium.org'],
- 'filebrowse': ['rginda+watch@chromium.org'],
+ 'filebrowse': ['rginda+watch@chromium.org',
+ 'yoshiki+watch@chromium.org'],
'filesapp': ['mtomasz+watch@chromium.org'],
'ftp': ['phajdan.jr@chromium.org'],
+ 'gcm': ['zea+watch@chromium.org'],
'geolocation': ['mvanouwerkerk@chromium.org'],
'gfx_geometry': ['cc-bugs@chromium.org'],
'gfx_image': ['rsesek+watch@chromium.org'],
+ 'gn': ['tfarina@chromium.org'],
'gpu': ['piman+watch@chromium.org'],
'history_ui': ['dubroy@chromium.org', 'pam+watch@chromium.org'],
'i18n': ['jshin+watch@chromium.org'],
'imageburner': ['tbarzic+watch@chromium.org'],
'importer': ['tfarina@chromium.org'],
'indexed_db': ['alecflett@chromium.org', 'cmumford@chromium.org',
- 'dgrogan@chromium.org', 'jsbell@chromium.org'],
+ 'dgrogan@chromium.org',
+ 'ericu+idb@chromium.org', 'jsbell+idb@chromium.org'],
'installer': ['grt+watch@chromium.org'],
'instant': ['dcblack@chromium.org', 'jered@chromium.org',
'dominich@chromium.org', 'samarth+watch@chromium.org',
@@ -753,6 +824,8 @@
'jfweitz+watch@chromium.org', 'skanuj+watch@chromium.org',
'donnd+watch@chromium.org'],
'ipc': ['jam@chromium.org', 'darin-cc@chromium.org'],
+ 'libwebp': ['urvang@google.com', 'jzern@chromium.org',
+ 'skal@google.com', 'vikasa@google.com'],
'linux_fonts': ['derat+watch@chromium.org'],
'linux_sandboxing': ['agl@chromium.org', 'jln+watch@chromium.org'],
'linux_seccomp_bpf': ['jln+watch@chromium.org'],
@@ -761,17 +834,23 @@
'media_galleries': ['gbillock@chromium.org', 'thestig@chromium.org',
'tommycli@chromium.org', 'vandebo@chromium.org'],
'message_loop': ['sadrul@chromium.org'],
- 'metrics': ['jar@chromium.org',
- 'isherman@chromium.org',
+ 'metrics': ['isherman@chromium.org',
'asvitkine+watch@chromium.org'],
+ 'metrics_xml_files': ['asvitkine+watch@chromium.org'],
'mojo': ['aa@chromium.org',
'abarth@chromium.org',
'ben+mojo@chromium.org',
'darin@chromium.org',
- 'viettrungluu+watch@chromium.org'],
+ 'qsr+mojo@chromium.org',
+ 'viettrungluu+watch@chromium.org',
+ 'yzshen+watch@chromium.org'],
'mouse_lock': ['scheib+watch@chromium.org'],
+ 'music_manager_private': ['gab+watch@chromium.org',
+ 'erikwright+watch@chromium.org',
+ 'robertshield+watch@chromium.org'],
'nacl': ['native-client-reviews@googlegroups.com'],
- 'native_client_sdk': ['sbc@chromium.org', 'binji@chromium.org'],
+ 'native_client_sdk': ['sbc@chromium.org', 'binji+watch@chromium.org'],
+ 'navigation': ['creis+watch@chromium.org', 'nasko+codewatch@chromium.org'],
'net': ['cbentzel+watch@chromium.org'],
'net_error_list': ['mmenke@chromium.org'],
'net_log': ['mmenke@chromium.org', 'eroman@chromium.org'],
@@ -780,16 +859,18 @@
'pedrosimonetti+watch@chromium.org'],
'omnibox': ['suzhe@chromium.org'],
'options': ['dbeam+watch-options@chromium.org'],
+ 'overview_mode': ['tdanderson+overview@chromium.org'],
'ozone': ['kalyan.kondapally@intel.com', 'ozone-reviews@chromium.org',
'rjkroege@chromium.org'],
'panels': ['dimich@chromium.org', 'jennb@chromium.org',
'dcheng@chromium.org', 'jianli@chromium.org'],
- 'pepper_api': ['piman+watch@chromium.org',
- 'ihf+watch@chromium.org', 'yzshen+watch@chromium.org',
+ 'password_manager': ['mkwst+watchlist@chromium.org',
+ 'gcasto+watchlist@chromium.org'],
+ 'pepper_api': ['piman+watch@chromium.org', 'ihf+watch@chromium.org',
'yusukes+watch@chromium.org', 'raymes+watch@chromium.org',
- 'noelallen@chromium.org', 'binji@chromium.org',
- 'nfullagar@chromium.org', 'teravest+watch@chromium.org'],
- 'perf': ['chrome-speed-team+watch@google.com'],
+ 'noelallen@chromium.org', 'binji+watch@chromium.org',
+ 'nfullagar@chromium.org', 'teravest+watch@chromium.org',
+ 'tzik@chromium.org'],
'plugin': ['jam@chromium.org',
'stuartmorgan+watch@chromium.org'],
'policy_templates': ['joaodasilva+watch@chromium.org'],
@@ -800,37 +881,33 @@
'pyauto': ['anantha@chromium.org',
'dyu@chromium.org',
'dennisjeffrey@chromium.org'],
- 'remoting': ['alexeypa+watch@chromium.org',
- 'dcaiafa+watch@chromium.org',
- 'garykac+watch@chromium.org',
- 'hclam+watch@chromium.org',
- 'jamiewalch+watch@chromium.org',
- 'lambroslambrou+watch@chromium.org',
- 'rmsousa+watch@chromium.org',
- 'sergeyu+watch@chromium.org',
- 'weitaosu+watch@chromium.org',
- 'wez+watch@chromium.org',
- 'amit@chromium.org',
- 'sanjeevr@chromium.org'],
+ 'remoting': ['chromoting-reviews@chromium.org'],
'sessions': ['marja+watch@chromium.org'],
- 'shell_window': ['jeremya+watch@chromium.org'],
- 'site_instance': ['creis+watch@chromium.org', 'ajwong+watch@chromium.org'],
+ 'service_worker': ['tzik@chromium.org',
+ 'kinuko+serviceworker@chromium.org',
+ 'nhiroki@chromium.org',
+ 'horo+watch@chromium.org',
+ 'alecflett+watch@chromium.org',
+ 'jsbell+serviceworker@chromium.org',
+ 'michaeln@chromium.org',
+ 'serviceworker-reviews@chromium.org'],
+ 'site_instance': ['creis+watch@chromium.org', 'ajwong+watch@chromium.org',
+ 'nasko+codewatch@chromium.org'],
'spellcheck': ['groby+spellwatch@chromium.org',
'rlp@chromium.org',
'rouslan+spellwatch@chromium.org'],
'streams': ['zork+watch@chromium.org'],
'sync': ['haitaol+watch@chromium.org',
- 'rsimha+watch@chromium.org',
'tim+watch@chromium.org',
- 'maniscalco+watch@chromium.org'],
- 'syncfs': ['kinuko+watch@chromium.org',
+ 'maniscalco+watch@chromium.org',
+ 'zea+watch@chromium.org'],
+ 'syncfs': ['kinuko+fileapi@chromium.org',
'nhiroki@chromium.org',
'tzik@chromium.org'],
'sync_proto': ['albertb+watch@chromium.org'],
'tab_capture': ['miu+watch@chromium.org'],
'tab_contents': ['avi@chromium.org',
'creis+watch@chromium.org', 'ajwong+watch@chromium.org'],
- 'task_manager': ['yoshiki+watch@chromium.org'],
'tcmalloc': ['dmikurube+memory@chromium.org'],
'telemetry': ['telemetry+watch@chromium.org'],
'tests': [],
@@ -842,20 +919,23 @@
'textinput_chromeos': ['yusukes+watch@chromium.org',
'nona+watch@chromium.org',
'yukishiino+watch@chromium.org'],
- 'tools_emacs': ['fischman+watch@chromium.org',
- 'dhollowa+watch@chromium.org'],
+ 'tools_emacs': ['dhollowa+watch@chromium.org'],
'tracing': ['dsinclair+watch@chromium.org'],
'ui_compositor': ['cc-bugs@chromium.org'],
'ui_resources': ['oshima+watch@chromium.org'],
'valgrind': ['bruening+watch@chromium.org',
'glider+watch@chromium.org',
'timurrrr+watch@chromium.org'],
+ 'version_assembly': ['caitkp+watch@chromium.org',
+ 'gab+watch@chromium.org'],
'views': ['tfarina@chromium.org'],
- 'views_core': ['ben+views@chromium.org'],
+ 'views_core': ['ben+views@chromium.org',
+ 'tdanderson+views@chromium.org'],
'views_corewm': ['ben+corewm@chromium.org'],
+ 'virtual_keyboard': ['dfaden+virtualkb@google.com',
+ 'groby+virtualkb@chromium.org'],
'webkit': ['darin-cc@chromium.org'],
- 'webrtc_media': ['fischman+watch@chromium.org',
- 'wjia+watch@chromium.org',
+ 'webrtc_media': ['wjia+watch@chromium.org',
'mcasas+watch@chromium.org'],
'website_settings': ['markusheintz@chromium.org'],
'worker': ['jam@chromium.org'],
diff --git a/chromium/android_webview/all_webview.gyp b/chromium/android_webview/all_webview.gyp
deleted file mode 100644
index 5da9b2f1a16..00000000000
--- a/chromium/android_webview/all_webview.gyp
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This is used as the top-level gyp file for building WebView in the Android
-# tree. It should depend only on native code, as we cannot currently generate
-# correct makefiles to build Java code via gyp in the Android tree.
-
-{
- 'targets': [
- {
- 'target_name': 'All',
- 'type': 'none',
- 'dependencies': [
- 'android_webview.gyp:libwebviewchromium',
-
- # Needed by android_webview_java
- '../base/base.gyp:base_java_activity_state',
- '../base/base.gyp:base_java_memory_pressure_level_list',
- '../content/content.gyp:page_transition_types_java',
- '../content/content.gyp:popup_item_type_java',
- '../content/content.gyp:result_codes_java',
- '../content/content.gyp:speech_recognition_error_java',
- '../media/media.gyp:media_android_imageformat_list',
- '../net/net.gyp:certificate_mime_types_java',
- '../net/net.gyp:cert_verify_result_android_java',
- '../net/net.gyp:net_errors_java',
- '../net/net.gyp:private_key_types_java',
- '../ui/android/ui_android.gyp:window_open_disposition_java',
- ],
- }, # target_name: All
- ], # targets
-}
diff --git a/chromium/android_webview/android_webview.gyp b/chromium/android_webview/android_webview.gyp
index 941aaa3913e..2efc46c1b57 100644
--- a/chromium/android_webview/android_webview.gyp
+++ b/chromium/android_webview/android_webview.gyp
@@ -5,13 +5,6 @@
'variables': {
'chromium_code': 1,
},
- 'conditions': [
- ['android_webview_build==0', {
- 'includes': [
- 'android_webview_tests.gypi',
- ],
- }],
- ],
'targets': [
{
'target_name': 'libwebviewchromium',
@@ -26,12 +19,28 @@
[ 'android_webview_build==0', {
'product_prefix': 'libstandalone',
}],
- # The general approach is to allow the executable target to choose
- # the allocator, but as in the WebView case we are building a library
- # only, put the dependency on the allocator here
- [ 'android_webview_build==1 and android_use_tcmalloc==1', {
+ [ 'android_webview_build==1', {
+ # When building inside the android tree we also need to depend on all
+ # the java sources generated from templates which will be needed by
+ # android_webview_java in android_webview/Android.mk.
'dependencies': [
- '../base/allocator/allocator.gyp:allocator', ],
+ '../base/base.gyp:base_java_application_state',
+ '../base/base.gyp:base_java_memory_pressure_level_list',
+ '../content/content.gyp:content_gamepad_mapping',
+ '../content/content.gyp:gesture_event_type_java',
+ '../content/content.gyp:page_transition_types_java',
+ '../content/content.gyp:popup_item_type_java',
+ '../content/content.gyp:result_codes_java',
+ '../content/content.gyp:screen_orientation_values_java',
+ '../content/content.gyp:speech_recognition_error_java',
+ '../media/media.gyp:media_android_imageformat_list',
+ '../net/net.gyp:cert_verify_status_android_java',
+ '../net/net.gyp:certificate_mime_types_java',
+ '../net/net.gyp:net_errors_java',
+ '../net/net.gyp:private_key_types_java',
+ '../ui/android/ui_android.gyp:bitmap_format_java',
+ '../ui/android/ui_android.gyp:window_open_disposition_java',
+ ],
}],
[ 'android_webview_build==1 and use_system_skia==0', {
# When not using the system skia there are linker warnings about
@@ -58,9 +67,6 @@
'<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
'<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
],
- 'variables': {
- 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
- },
'actions': [
{
'action_name': 'repack_android_webview_pack',
@@ -72,16 +78,9 @@
'<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
],
+ 'pak_output': '<(PRODUCT_DIR)/android_webview_apk/assets/webviewchromium.pak',
},
- 'inputs': [
- '<(repack_path)',
- '<@(pak_inputs)',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/android_webview_apk/assets/webviewchromium.pak',
- ],
- 'action': ['python', '<(repack_path)', '<@(_outputs)',
- '<@(pak_inputs)'],
+ 'includes': [ '../build/repack_action.gypi' ],
}
],
},
@@ -92,6 +91,9 @@
'../android_webview/native/webview_native.gyp:webview_native',
'../components/components.gyp:auto_login_parser',
'../components/components.gyp:autofill_content_renderer',
+ '../components/components.gyp:cdm_browser',
+ '../components/components.gyp:cdm_renderer',
+ '../components/components.gyp:data_reduction_proxy_browser',
'../components/components.gyp:navigation_interception',
'../components/components.gyp:visitedlink_browser',
'../components/components.gyp:visitedlink_renderer',
@@ -99,9 +101,12 @@
'../content/content.gyp:content_app_both',
'../gpu/gpu.gyp:command_buffer_service',
'../gpu/gpu.gyp:gles2_implementation',
+ '../gpu/gpu.gyp:gl_in_process_context',
+ '../media/media.gyp:media',
'../printing/printing.gyp:printing',
'../skia/skia.gyp:skia',
'../third_party/WebKit/public/blink.gyp:blink',
+ '../v8/tools/gyp/v8.gyp:v8',
'../ui/gl/gl.gyp:gl',
'../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs',
'../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu',
@@ -117,6 +122,7 @@
'browser/aw_browser_context.h',
'browser/aw_browser_main_parts.cc',
'browser/aw_browser_main_parts.h',
+ 'browser/aw_browser_permission_request_delegate.h',
'browser/aw_contents_client_bridge_base.cc',
'browser/aw_contents_client_bridge_base.h',
'browser/aw_content_browser_client.cc',
@@ -149,18 +155,25 @@
'browser/aw_result_codes.h',
'browser/aw_web_preferences_populater.cc',
'browser/aw_web_preferences_populater.h',
+ 'browser/aw_web_resource_response.cc',
+ 'browser/aw_web_resource_response.h',
+ 'browser/browser_view_renderer.cc',
'browser/browser_view_renderer.h',
+ 'browser/browser_view_renderer_client.h',
+ 'browser/deferred_gpu_command_service.cc',
+ 'browser/deferred_gpu_command_service.h',
'browser/find_helper.cc',
'browser/find_helper.h',
+ 'browser/global_tile_manager.cc',
+ 'browser/global_tile_manager.h',
+ 'browser/global_tile_manager_client.h',
'browser/gpu_memory_buffer_factory_impl.cc',
'browser/gpu_memory_buffer_factory_impl.h',
+ 'browser/hardware_renderer.cc',
+ 'browser/hardware_renderer.h',
'browser/icon_helper.cc',
'browser/icon_helper.h',
- 'browser/in_process_view_renderer.cc',
- 'browser/in_process_view_renderer.h',
'browser/input_stream.h',
- 'browser/intercepted_request_data.cc',
- 'browser/intercepted_request_data.h',
'browser/jni_dependency_factory.h',
'browser/gl_view_renderer_manager.cc',
'browser/gl_view_renderer_manager.h',
@@ -177,6 +190,8 @@
'browser/net/init_native_callback.h',
'browser/net/input_stream_reader.cc',
'browser/net/input_stream_reader.h',
+ 'browser/parent_output_surface.cc',
+ 'browser/parent_output_surface.h',
'browser/renderer_host/aw_render_view_host_ext.cc',
'browser/renderer_host/aw_render_view_host_ext.h',
'browser/renderer_host/aw_resource_dispatcher_host_delegate.cc',
@@ -186,6 +201,8 @@
'browser/scoped_allow_wait_for_legacy_web_view_api.h',
'browser/scoped_app_gl_state_restore.cc',
'browser/scoped_app_gl_state_restore.h',
+ 'browser/shared_renderer_state.cc',
+ 'browser/shared_renderer_state.h',
'common/android_webview_message_generator.cc',
'common/android_webview_message_generator.h',
'common/aw_content_client.cc',
@@ -195,6 +212,7 @@
'common/aw_resource.h',
'common/aw_switches.cc',
'common/aw_switches.h',
+ 'common/devtools_instrumentation.h',
'common/print_messages.cc',
'common/print_messages.h',
'common/render_view_messages.cc',
@@ -208,31 +226,82 @@
'public/browser/draw_gl.h',
'renderer/aw_content_renderer_client.cc',
'renderer/aw_content_renderer_client.h',
+ 'renderer/aw_execution_termination_filter.cc',
+ 'renderer/aw_execution_termination_filter.h',
'renderer/aw_key_systems.cc',
'renderer/aw_key_systems.h',
+ 'renderer/aw_permission_client.cc',
+ 'renderer/aw_permission_client.h',
'renderer/aw_render_process_observer.cc',
'renderer/aw_render_process_observer.h',
+ 'renderer/aw_render_frame_ext.cc',
+ 'renderer/aw_render_frame_ext.h',
'renderer/aw_render_view_ext.cc',
'renderer/aw_render_view_ext.h',
'renderer/print_web_view_helper.cc',
'renderer/print_web_view_helper.h',
'renderer/print_web_view_helper_android.cc',
'renderer/print_web_view_helper_linux.cc',
+ 'renderer/print_render_frame_observer.cc',
+ 'renderer/print_render_frame_observer.h',
],
},
- {
- 'target_name': 'android_webview_java',
- 'type': 'none',
- 'dependencies': [
- '../components/components.gyp:navigation_interception_java',
- '../components/components.gyp:web_contents_delegate_android_java',
- '../content/content.gyp:content_java',
- '../ui/android/ui_android.gyp:ui_java',
+ ],
+ 'conditions': [
+ ['android_webview_build==0', {
+ 'includes': [
+ 'android_webview_tests.gypi',
],
- 'variables': {
- 'java_in_dir': '../android_webview/java',
- },
- 'includes': [ '../build/java.gypi' ],
- },
+ 'targets': [
+ {
+ 'target_name': 'android_webview_java',
+ 'type': 'none',
+ 'dependencies': [
+ '../components/components.gyp:navigation_interception_java',
+ '../components/components.gyp:web_contents_delegate_android_java',
+ '../content/content.gyp:content_java',
+ '../ui/android/ui_android.gyp:ui_java',
+ ],
+ 'variables': {
+ 'java_in_dir': '../android_webview/java',
+ },
+ 'includes': [ '../build/java.gypi' ],
+ },
+ ],
+ }, { # android_webview_build==1
+ 'targets': [
+ {
+ 'target_name': 'android_webview_jarjar_ui_resources',
+ 'android_unmangled_name': 1,
+ 'type': 'none',
+ 'variables': {
+ 'res_dir': '../ui/android/java/res',
+ 'rules_file': '../android_webview/build/jarjar-rules.txt',
+ },
+ 'includes': ['../android_webview/build/jarjar_resources.gypi'],
+ },
+ {
+ 'target_name': 'android_webview_jarjar_content_resources',
+ 'android_unmangled_name': 1,
+ 'type': 'none',
+ 'variables': {
+ 'res_dir': '../content/public/android/java/res',
+ 'rules_file': '../android_webview/build/jarjar-rules.txt',
+ },
+ 'includes': ['../android_webview/build/jarjar_resources.gypi'],
+ },
+ {
+ 'target_name': 'android_webview_resources',
+ 'type': 'none',
+ 'android_unmangled_name': 1,
+ 'dependencies': [
+ '../content/content.gyp:content_strings_grd',
+ '../ui/android/ui_android.gyp:ui_strings_grd',
+ 'android_webview_jarjar_ui_resources',
+ 'android_webview_jarjar_content_resources'
+ ],
+ },
+ ],
+ }],
],
}
diff --git a/chromium/android_webview/android_webview_tests.gypi b/chromium/android_webview/android_webview_tests.gypi
index 58855718a4c..390732ad202 100644
--- a/chromium/android_webview/android_webview_tests.gypi
+++ b/chromium/android_webview/android_webview_tests.gypi
@@ -19,9 +19,17 @@
'additional_input_paths': [
'<(PRODUCT_DIR)/android_webview_apk/assets/webviewchromium.pak',
'<(PRODUCT_DIR)/android_webview_apk/assets/asset_file.html',
+ '<(PRODUCT_DIR)/android_webview_apk/assets/cookie_test.html',
'<(PRODUCT_DIR)/android_webview_apk/assets/asset_icon.png',
'<(PRODUCT_DIR)/android_webview_apk/assets/full_screen_video_test.html',
],
+ 'conditions': [
+ ['icu_use_data_file_flag==1', {
+ 'additional_input_paths': [
+ '<(PRODUCT_DIR)/icudtl.dat',
+ ],
+ }],
+ ],
},
'copies': [
{
@@ -29,8 +37,16 @@
'files': [
'<(java_in_dir)/assets/asset_file.html',
'<(java_in_dir)/assets/asset_icon.png',
+ '<(java_in_dir)/assets/cookie_test.html',
'<(java_in_dir)/assets/full_screen_video_test.html',
],
+ 'conditions': [
+ ['icu_use_data_file_flag==1', {
+ 'files': [
+ '<(PRODUCT_DIR)/icudtl.dat',
+ ],
+ }],
+ ],
},
],
'includes': [ '../build/java_apk.gypi' ],
@@ -38,7 +54,7 @@
{
# android_webview_apk creates a .jar as a side effect. Any java
# targets that need that .jar in their classpath should depend on this
- # target. For more details see the chromium_testshell_java target.
+ # target. For more details see the chrome_shell_apk_java target.
'target_name': 'android_webview_apk_java',
'type': 'none',
'dependencies': [
@@ -72,8 +88,9 @@
'../testing/android/native_test.gyp:native_test_native_code',
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
- '../ui/ui.gyp:ui_base_jni_headers',
+ '../ui/base/ui_base.gyp:ui_base_jni_headers',
'android_webview_common',
+ 'android_webview_unittests_jni',
],
'include_dirs': [
'..',
@@ -81,12 +98,17 @@
'<(SHARED_INTERMEDIATE_DIR)/android_webview_unittests',
],
'sources': [
+ 'browser/aw_static_cookie_policy_unittest.cc',
'browser/aw_form_database_service_unittest.cc',
+ 'browser/global_tile_manager_unittest.cc',
'browser/net/android_stream_reader_url_request_job_unittest.cc',
'browser/net/input_stream_reader_unittest.cc',
'lib/main/webview_tests.cc',
+ 'native/aw_contents_client_bridge_unittest.cc',
'native/input_stream_unittest.cc',
- 'native/state_serializer_unittests.cc',
+ 'native/permission/media_access_permission_request_unittest.cc',
+ 'native/permission/permission_request_handler_unittest.cc',
+ 'native/state_serializer_unittest.cc',
],
},
{
@@ -107,6 +129,7 @@
'type': 'none',
'sources': [
'../android_webview/unittestjava/src/org/chromium/android_webview/unittest/InputStreamUnittest.java',
+ '../android_webview/unittestjava/src/org/chromium/android_webview/unittest/MockAwContentsClientBridge.java',
],
'variables': {
'jni_gen_package': 'android_webview_unittests',
@@ -119,11 +142,9 @@
'dependencies': [
'android_webview_unittest_java',
'android_webview_unittests',
- 'android_webview_unittests_jni',
],
'variables': {
'test_suite_name': 'android_webview_unittests',
- 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)android_webview_unittests<(SHARED_LIB_SUFFIX)',
},
'includes': [ '../build/apk_test.gypi' ],
},
diff --git a/chromium/android_webview/build/jarjar_resources.gypi b/chromium/android_webview/build/jarjar_resources.gypi
new file mode 100644
index 00000000000..17838c6a767
--- /dev/null
+++ b/chromium/android_webview/build/jarjar_resources.gypi
@@ -0,0 +1,50 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# This file is meant to be included into a target to provide a rule
+# to run the equivalent of jarjar on Java resources (layout.xml files).
+#
+# To use this, create a gyp target with the following form:
+# {
+# 'target_name': 'my-package_java',
+# 'type': 'none',
+# 'variables': {
+# 'java_in_dir': 'path/to/package/root',
+# },
+# 'includes': ['path/to/this/gypi/file'],
+# }
+#
+# Required variables:
+# res_dir - The top-level resources folder.
+# rules_file - Path to the file containing jar-jar rules.
+
+{
+ 'variables': {
+ 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)',
+ 'jarjar_stamp': '<(intermediate_dir)/jarjar_resources.stamp',
+ 'resource_input_paths': ['<!@(find <(res_dir) -type f)'],
+ },
+ 'actions': [{
+ 'action_name': 'jarjar resources',
+ 'message': 'Copying and jar-jaring resources for <(_target_name)',
+ 'variables': {
+ 'out_dir': '<(intermediate_dir)/jarjar_res',
+ },
+ 'inputs': [
+ '<(DEPTH)/build/android/gyp/util/build_utils.py',
+ '<(DEPTH)/build/android/gyp/jarjar_resources.py',
+ '>@(resource_input_paths)',
+ ],
+ 'outputs': [
+ '<(jarjar_stamp)',
+ ],
+ 'action': [
+ 'python', '../build/android/gyp/jarjar_resources.py',
+ '--input-dir', '<(res_dir)',
+ '--output-dir', '<(out_dir)',
+ '--rules-path', '<(rules_file)',
+ '--stamp', '<(jarjar_stamp)',
+ ]
+ }],
+}
diff --git a/chromium/android_webview/native/webview_native.gyp b/chromium/android_webview/native/webview_native.gyp
index 52f4820852b..f8c70d98806 100644
--- a/chromium/android_webview/native/webview_native.gyp
+++ b/chromium/android_webview/native/webview_native.gyp
@@ -12,31 +12,32 @@
'dependencies': [
'../../base/base.gyp:base_static',
'../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ '../../cc/cc.gyp:cc',
'../../components/components.gyp:autofill_content_browser',
'../../components/components.gyp:web_contents_delegate_android',
- '../../cc/cc.gyp:cc',
+ '../../content/content.gyp:content_common',
'../../net/net.gyp:net',
'../../skia/skia.gyp:skia',
+ '../../ui/base/ui_base.gyp:ui_base',
'../../ui/gfx/gfx.gyp:gfx',
- '../../ui/ui.gyp:ui',
- '../../webkit/common/user_agent/webkit_user_agent.gyp:user_agent',
+ '../../ui/gfx/gfx.gyp:gfx_geometry',
'../../webkit/common/webkit_common.gyp:webkit_common',
'../../webkit/storage_browser.gyp:webkit_storage_browser',
'../../webkit/storage_common.gyp:webkit_storage_common',
+ '../../third_party/openssl/openssl.gyp:openssl',
'android_webview_native_jni',
],
'include_dirs': [
'../..',
'../../skia/config',
- '<(SHARED_INTERMEDIATE_DIR)/android_webview',
],
'sources': [
'android_protocol_handler.cc',
'android_protocol_handler.h',
'android_webview_jni_registrar.cc',
'android_webview_jni_registrar.h',
- 'aw_autofill_manager_delegate.cc',
- 'aw_autofill_manager_delegate.h',
+ 'aw_autofill_client.cc',
+ 'aw_autofill_client.h',
'aw_browser_dependency_factory.cc',
'aw_browser_dependency_factory.h',
'aw_contents.cc',
@@ -45,12 +46,12 @@
'aw_contents_client_bridge.h',
'aw_contents_io_thread_client_impl.cc',
'aw_contents_io_thread_client_impl.h',
+ 'aw_contents_statics.cc',
+ 'aw_contents_statics.h',
'aw_dev_tools_server.cc',
'aw_dev_tools_server.h',
'aw_form_database.cc',
'aw_form_database.h',
- 'aw_geolocation_permission_context.cc',
- 'aw_geolocation_permission_context.h',
'aw_http_auth_handler.cc',
'aw_http_auth_handler.h',
'aw_pdf_exporter.cc',
@@ -69,27 +70,38 @@
'aw_web_contents_view_delegate.h',
'aw_web_preferences_populater_impl.cc',
'aw_web_preferences_populater_impl.h',
+ 'aw_web_resource_response_impl.cc',
+ 'aw_web_resource_response_impl.h',
'cookie_manager.cc',
'cookie_manager.h',
'input_stream_impl.cc',
'input_stream_impl.h',
- 'intercepted_request_data_impl.cc',
- 'intercepted_request_data_impl.h',
'java_browser_view_renderer_helper.cc',
'java_browser_view_renderer_helper.h',
'net_init_native_callback.cc',
+ 'permission/aw_permission_request.cc',
+ 'permission/aw_permission_request.h',
+ 'permission/aw_permission_request_delegate.cc',
+ 'permission/aw_permission_request_delegate.h',
+ 'permission/media_access_permission_request.cc',
+ 'permission/media_access_permission_request.h',
+ 'permission/permission_request_handler.cc',
+ 'permission/permission_request_handler.h',
+ 'permission/permission_request_handler_client.cc',
+ 'permission/permission_request_handler_client.h',
+ 'permission/simple_permission_request.cc',
+ 'permission/simple_permission_request.h',
'state_serializer.cc',
'state_serializer.h',
],
- },
- {
- 'target_name': 'input_stream_android_jar_jni_headers',
- 'type': 'none',
- 'variables': {
- 'jni_gen_package': 'android_webview',
- 'input_java_class': 'java/io/InputStream.class',
- },
- 'includes': [ '../../build/jar_file_jni_generator.gypi' ],
+ 'conditions': [
+ ['video_hole==1', {
+ 'sources': [
+ 'external_video_surface_container_impl.cc',
+ 'external_video_surface_container_impl.h',
+ ],
+ }],
+ ],
},
{
'target_name': 'cancellation_signal_android_jar_jni_headers',
@@ -105,10 +117,11 @@
'type': 'none',
'sources': [
'../java/src/org/chromium/android_webview/AndroidProtocolHandler.java',
- '../java/src/org/chromium/android_webview/AwAutofillManagerDelegate.java',
+ '../java/src/org/chromium/android_webview/AwAutofillClient.java',
'../java/src/org/chromium/android_webview/AwContents.java',
'../java/src/org/chromium/android_webview/AwContentsClientBridge.java',
'../java/src/org/chromium/android_webview/AwContentsIoThreadClient.java',
+ '../java/src/org/chromium/android_webview/AwContentsStatics.java',
'../java/src/org/chromium/android_webview/AwCookieManager.java',
'../java/src/org/chromium/android_webview/AwDevToolsServer.java',
'../java/src/org/chromium/android_webview/AwFormDatabase.java',
@@ -119,16 +132,17 @@
'../java/src/org/chromium/android_webview/AwResource.java',
'../java/src/org/chromium/android_webview/AwSettings.java',
'../java/src/org/chromium/android_webview/AwWebContentsDelegate.java',
- '../java/src/org/chromium/android_webview/InterceptedRequestData.java',
+ '../java/src/org/chromium/android_webview/AwWebResourceResponse.java',
+ '../java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java',
+ '../java/src/org/chromium/android_webview/InputStreamUtil.java',
'../java/src/org/chromium/android_webview/JavaBrowserViewRendererHelper.java',
+ '../java/src/org/chromium/android_webview/permission/AwPermissionRequest.java',
],
'variables': {
'jni_gen_package': 'android_webview',
- 'jni_generator_ptr_type': 'long',
},
'includes': [ '../../build/jni_generator.gypi' ],
'dependencies': [
- 'input_stream_android_jar_jni_headers',
'cancellation_signal_android_jar_jni_headers',
],
},
diff --git a/chromium/apps/app_shim/app_shim.gypi b/chromium/apps/app_shim/app_shim.gypi
index 8d206031d2b..3f402f72530 100644
--- a/chromium/apps/app_shim/app_shim.gypi
+++ b/chromium/apps/app_shim/app_shim.gypi
@@ -24,8 +24,6 @@
'app_shim_host_mac.h',
'app_shim_host_manager_mac.h',
'app_shim_host_manager_mac.mm',
- 'app_shim_mac.cc',
- 'app_shim_mac.h',
'chrome_main_app_mode_mac.mm',
'extension_app_shim_handler_mac.cc',
'extension_app_shim_handler_mac.h',
diff --git a/chromium/apps/apps.gypi b/chromium/apps/apps.gypi
index be6a6190320..e2b4e7e7126 100644
--- a/chromium/apps/apps.gypi
+++ b/chromium/apps/apps.gypi
@@ -15,7 +15,8 @@
# browser, then we can clean up these dependencies.
'dependencies': [
'browser_extensions',
- 'common/extensions/api/api.gyp:api',
+ 'common/extensions/api/api.gyp:chrome_api',
+ '../apps/common/api/api.gyp:apps_api',
'../skia/skia.gyp:skia',
],
'include_dirs': [
@@ -23,10 +24,6 @@
'<(grit_out_dir)',
],
'sources': [
- 'app_keep_alive_service.cc',
- 'app_keep_alive_service.h',
- 'app_keep_alive_service_factory.cc',
- 'app_keep_alive_service_factory.h',
'app_lifetime_monitor.cc',
'app_lifetime_monitor.h',
'app_lifetime_monitor_factory.cc',
@@ -39,10 +36,22 @@
'app_restore_service.h',
'app_restore_service_factory.cc',
'app_restore_service_factory.h',
+ 'app_window.cc',
+ 'app_window.h',
'app_window_contents.cc',
'app_window_contents.h',
+ 'app_window_geometry_cache.cc',
+ 'app_window_geometry_cache.h',
+ 'app_window_registry.cc',
+ 'app_window_registry.h',
'apps_client.cc',
'apps_client.h',
+ 'browser_context_keyed_service_factories.cc',
+ 'browser_context_keyed_service_factories.h',
+ 'browser/api/app_runtime/app_runtime_api.cc',
+ 'browser/api/app_runtime/app_runtime_api.h',
+ 'browser/file_handler_util.cc',
+ 'browser/file_handler_util.h',
'launcher.cc',
'launcher.h',
'metrics_names.h',
@@ -54,19 +63,27 @@
'saved_files_service.h',
'saved_files_service_factory.cc',
'saved_files_service_factory.h',
- 'shell_window.cc',
- 'shell_window.h',
- 'shell_window_geometry_cache.cc',
- 'shell_window_geometry_cache.h',
- 'shell_window_registry.cc',
- 'shell_window_registry.h',
+ 'size_constraints.cc',
+ 'size_constraints.h',
'switches.cc',
'switches.h',
'ui/native_app_window.h',
- 'ui/views/shell_window_frame_view.cc',
- 'ui/views/shell_window_frame_view.h',
+ 'ui/views/app_window_frame_view.cc',
+ 'ui/views/app_window_frame_view.h',
+ 'ui/views/native_app_window_views.cc',
+ 'ui/views/native_app_window_views.h',
+ 'ui/web_contents_sizer.h',
],
'conditions': [
+ ['OS=="mac"', {
+ 'sources': [
+ 'ui/web_contents_sizer.mm',
+ ],
+ }, { # OS!=mac
+ 'sources': [
+ 'ui/web_contents_sizer.cc',
+ ],
+ }],
['chromeos==1',
{
'dependencies': [
@@ -77,13 +94,15 @@
['enable_extensions==0',
{
'sources/': [
- ['exclude', '^apps/'],
+ ['exclude', '.*'],
+ ['include', 'ui/web_contents_sizer\.cc$'],
+ ['include', 'ui/web_contents_sizer\.mm$'],
],
}
],
['toolkit_views==1', {
'dependencies': [
- '../ui/base/strings/ui_strings.gyp:ui_strings',
+ '../ui/strings/ui_strings.gyp:ui_strings',
'../ui/views/views.gyp:views',
],
}, { # toolkit_views==0
@@ -96,54 +115,4 @@
'msvs_disabled_warnings': [ 4267, ],
},
], # targets
- 'conditions': [
- ['chromeos==1', {
- 'targets': [
- {
- 'target_name': 'app_shell',
- 'type': 'executable',
- 'defines!': ['CONTENT_IMPLEMENTATION'],
- 'variables': {
- 'chromium_code': 1,
- },
- 'dependencies': [
- 'apps',
- 'chrome_resources.gyp:packed_resources',
- 'test_support_common',
- '../base/base.gyp:base',
- '../base/base.gyp:base_prefs_test_support',
- '../content/content.gyp:content',
- '../content/content_shell_and_tests.gyp:content_shell_lib',
- '../skia/skia.gyp:skia',
- '../ui/views/views.gyp:views',
- '../ui/wm/wm.gyp:wm_test_support',
- ],
- 'include_dirs': [
- '..',
- ],
- 'sources': [
- 'shell/shell_app_sorting.cc',
- 'shell/shell_app_sorting.h',
- 'shell/shell_browser_context.cc',
- 'shell/shell_browser_context.h',
- 'shell/shell_browser_main_parts.cc',
- 'shell/shell_browser_main_parts.h',
- 'shell/shell_content_browser_client.cc',
- 'shell/shell_content_browser_client.h',
- 'shell/shell_content_client.cc',
- 'shell/shell_content_client.h',
- 'shell/shell_extensions_browser_client.cc',
- 'shell/shell_extensions_browser_client.h',
- 'shell/shell_extensions_client.cc',
- 'shell/shell_extensions_client.h',
- 'shell/shell_main_delegate.cc',
- 'shell/shell_main_delegate.h',
- 'shell/shell_main.cc',
- 'shell/web_view_window.cc',
- 'shell/web_view_window.cc',
- ],
- },
- ], # targets
- }], # chromeos==1
- ], # conditions
}
diff --git a/chromium/apps/common/api/api.gyp b/chromium/apps/common/api/api.gyp
new file mode 100644
index 00000000000..5f1fb93be46
--- /dev/null
+++ b/chromium/apps/common/api/api.gyp
@@ -0,0 +1,36 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'apps_api',
+ 'type': 'static_library',
+ 'sources': [
+ '<@(schema_files)',
+ ],
+ # TODO(jschuh): http://crbug.com/167187 size_t -> int
+ 'msvs_disabled_warnings': [ 4267 ],
+ 'includes': [
+ '../../../build/json_schema_bundle_compile.gypi',
+ '../../../build/json_schema_compile.gypi',
+ ],
+ 'variables': {
+ 'chromium_code': 1,
+ 'non_compiled_schema_files': [
+ ],
+ # TODO: Eliminate these on Android. See crbug.com/305852.
+ 'schema_files': [
+ 'app_runtime.idl',
+ ],
+ 'cc_dir': 'apps/common/api',
+ 'root_namespace': 'apps::api',
+ 'impl_dir': 'apps/browser/api',
+ },
+ 'dependencies': [
+ # None yet, but some may need to be added as more APIs move in.
+ ],
+ },
+ ],
+}
diff --git a/chromium/apps/shell/app_shell.gyp b/chromium/apps/shell/app_shell.gyp
new file mode 100644
index 00000000000..8b2996cf1d9
--- /dev/null
+++ b/chromium/apps/shell/app_shell.gyp
@@ -0,0 +1,214 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ 'chromium_code': 1,
+ },
+ 'targets': [
+ {
+ 'target_name': 'app_shell_resources',
+ 'type': 'none',
+ 'actions': [
+ {
+ 'action_name': 'generate_app_shell_resources',
+ 'variables': {
+ 'grit_grd_file': 'app_shell_resources.grd',
+ 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/apps/shell',
+ },
+ 'includes': [ '../../build/grit_action.gypi' ],
+ },
+ ],
+ },
+ {
+ 'target_name': 'app_shell_pak',
+ 'type': 'none',
+ 'dependencies': [
+ 'app_shell_resources',
+ # Need extension related resources in common_resources.pak and
+ # renderer_resources_100_percent.pak
+ '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
+ # Need dev-tools related resources in shell_resources.pak and
+ # devtools_resources.pak.
+ '<(DEPTH)/content/content_shell_and_tests.gyp:content_shell_resources',
+ '<(DEPTH)/content/browser/devtools/devtools_resources.gyp:devtools_resources',
+ '<(DEPTH)/extensions/extensions_resources.gyp:extensions_resources',
+ '<(DEPTH)/extensions/extensions_strings.gyp:extensions_strings',
+ '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
+ '<(DEPTH)/ui/strings/ui_strings.gyp:ui_strings',
+ ],
+ 'actions': [
+ {
+ 'action_name': 'repack_app_shell_pack',
+ 'variables': {
+ 'pak_inputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/apps/shell/app_shell_resources.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/chrome/extensions_api_resources.pak',
+ # TODO(jamescook): Extract the extension/app related resources
+ # from generated_resources_en-US.pak.
+ '<(SHARED_INTERMEDIATE_DIR)/chrome/generated_resources_en-US.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources_100_percent.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_renderer_resources.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_resources.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/extensions/strings/extensions_strings_en-US.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
+ ],
+ 'pak_output': '<(PRODUCT_DIR)/app_shell.pak',
+ },
+ 'includes': [ '../../build/repack_action.gypi' ],
+ },
+ ],
+ },
+ {
+ 'target_name': 'app_shell_lib',
+ 'type': 'static_library',
+ 'defines!': ['CONTENT_IMPLEMENTATION'],
+ 'dependencies': [
+ 'app_shell_pak',
+ '<(DEPTH)/apps/shell/common/api/api.gyp:shell_api',
+ '<(DEPTH)/base/base.gyp:base',
+ '<(DEPTH)/base/base.gyp:base_prefs_test_support',
+ '<(DEPTH)/components/components.gyp:pref_registry',
+ '<(DEPTH)/components/components.gyp:user_prefs',
+ '<(DEPTH)/content/content.gyp:content',
+ '<(DEPTH)/content/content.gyp:content_gpu',
+ '<(DEPTH)/content/content.gyp:content_ppapi_plugin',
+ '<(DEPTH)/content/content.gyp:content_worker',
+ '<(DEPTH)/content/content_shell_and_tests.gyp:content_shell_lib',
+ '<(DEPTH)/extensions/common/api/api.gyp:extensions_api',
+ '<(DEPTH)/extensions/extensions.gyp:extensions_browser',
+ '<(DEPTH)/extensions/extensions.gyp:extensions_common',
+ '<(DEPTH)/extensions/extensions.gyp:extensions_renderer',
+ '<(DEPTH)/extensions/extensions_resources.gyp:extensions_resources',
+ '<(DEPTH)/skia/skia.gyp:skia',
+ '<(DEPTH)/third_party/WebKit/public/blink.gyp:blink',
+ '<(DEPTH)/ui/wm/wm.gyp:wm',
+ '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
+ ],
+ 'include_dirs': [
+ '../..',
+ '<(SHARED_INTERMEDIATE_DIR)',
+ '<(SHARED_INTERMEDIATE_DIR)/apps/shell',
+ ],
+ 'sources': [
+ 'app/shell_main_delegate.cc',
+ 'app/shell_main_delegate.h',
+ 'browser/api/shell/shell_api.cc',
+ 'browser/api/shell/shell_api.h',
+ 'browser/default_shell_browser_main_delegate.cc',
+ 'browser/default_shell_browser_main_delegate.h',
+ 'browser/default_shell_app_window_controller.cc',
+ 'browser/default_shell_app_window_controller.h',
+ 'browser/shell_app_sorting.cc',
+ 'browser/shell_app_sorting.h',
+ 'browser/shell_app_window.cc',
+ 'browser/shell_app_window.h',
+ 'browser/shell_app_window_controller.h',
+ 'browser/shell_browser_context.cc',
+ 'browser/shell_browser_context.h',
+ 'browser/shell_browser_main_delegate.h',
+ 'browser/shell_browser_main_parts.cc',
+ 'browser/shell_browser_main_parts.h',
+ 'browser/shell_content_browser_client.cc',
+ 'browser/shell_content_browser_client.h',
+ 'browser/shell_desktop_controller.cc',
+ 'browser/shell_desktop_controller.h',
+ 'browser/shell_extension_system.cc',
+ 'browser/shell_extension_system.h',
+ 'browser/shell_extension_system_factory.cc',
+ 'browser/shell_extension_system_factory.h',
+ 'browser/shell_extension_web_contents_observer.cc',
+ 'browser/shell_extension_web_contents_observer.h',
+ 'browser/shell_extensions_browser_client.cc',
+ 'browser/shell_extensions_browser_client.h',
+ 'browser/shell_network_controller_chromeos.cc',
+ 'browser/shell_network_controller_chromeos.h',
+ 'browser/shell_runtime_api_delegate.cc',
+ 'browser/shell_runtime_api_delegate.h',
+ 'common/shell_app_runtime.cc',
+ 'common/shell_app_runtime.h',
+ 'common/shell_content_client.cc',
+ 'common/shell_content_client.h',
+ 'common/shell_extensions_client.cc',
+ 'common/shell_extensions_client.h',
+ 'renderer/shell_content_renderer_client.cc',
+ 'renderer/shell_content_renderer_client.h',
+ 'renderer/shell_custom_bindings.cc',
+ 'renderer/shell_custom_bindings.h',
+ 'renderer/shell_custom_bindings.js',
+ 'renderer/shell_dispatcher_delegate.cc',
+ 'renderer/shell_dispatcher_delegate.h',
+ 'renderer/shell_extensions_renderer_client.cc',
+ 'renderer/shell_extensions_renderer_client.h',
+ 'renderer/shell_renderer_main_delegate.h',
+ ],
+ 'conditions': [
+ ['chromeos==1', {
+ 'dependencies': [
+ '<(DEPTH)/chromeos/chromeos.gyp:chromeos',
+ '<(DEPTH)/ui/chromeos/ui_chromeos.gyp:ui_chromeos',
+ '<(DEPTH)/ui/display/display.gyp:display',
+ ],
+ }],
+ ],
+ },
+ {
+ 'target_name': 'app_shell',
+ 'type': 'executable',
+ 'defines!': ['CONTENT_IMPLEMENTATION'],
+ 'dependencies': [
+ 'app_shell_lib',
+ 'app_shell_pak',
+ ],
+ 'include_dirs': [
+ '../..',
+ ],
+ 'sources': [
+ 'app/shell_main.cc',
+ ],
+ 'conditions': [
+ ['OS=="win"', {
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
+ },
+ },
+ 'dependencies': [
+ '<(DEPTH)/sandbox/sandbox.gyp:sandbox',
+ ],
+ }],
+ ],
+ },
+ {
+ 'target_name': 'app_shell_browsertests',
+ 'type': '<(gtest_target_type)',
+ 'dependencies': [
+ 'app_shell_lib',
+ # TODO(yoz): find the right deps
+ '<(DEPTH)/base/base.gyp:test_support_base',
+ '<(DEPTH)/content/content.gyp:content_app_both',
+ '<(DEPTH)/content/content_shell_and_tests.gyp:content_browser_test_support',
+ '<(DEPTH)/content/content_shell_and_tests.gyp:test_support_content',
+ '<(DEPTH)/testing/gtest.gyp:gtest',
+ ],
+ 'defines': [
+ 'HAS_OUT_OF_PROC_TEST_RUNNER',
+ ],
+ 'sources': [
+ # TODO(yoz): Refactor once we have a second test target.
+ 'browser/shell_browsertest.cc',
+ 'test/shell_test.h',
+ 'test/shell_test.cc',
+ 'test/shell_test_launcher_delegate.cc',
+ 'test/shell_test_launcher_delegate.h',
+ 'test/shell_tests_main.cc',
+ ],
+ },
+ ], # targets
+}
diff --git a/chromium/apps/shell/common/api/api.gyp b/chromium/apps/shell/common/api/api.gyp
new file mode 100644
index 00000000000..bbefdb898ef
--- /dev/null
+++ b/chromium/apps/shell/common/api/api.gyp
@@ -0,0 +1,36 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'shell_api',
+ 'type': 'static_library',
+ 'sources': [
+ '<@(schema_files)',
+ ],
+ # TODO(jschuh): http://crbug.com/167187 size_t -> int
+ 'msvs_disabled_warnings': [ 4267 ],
+ 'includes': [
+ '../../../../build/json_schema_bundle_compile.gypi',
+ '../../../../build/json_schema_compile.gypi',
+ ],
+ 'variables': {
+ 'chromium_code': 1,
+ 'non_compiled_schema_files': [
+ ],
+ # TODO: Eliminate these on Android. See crbug.com/305852.
+ 'schema_files': [
+ 'shell.idl',
+ ],
+ 'cc_dir': 'apps/shell/common/api',
+ 'root_namespace': 'apps::shell_api',
+ 'impl_dir': 'apps/shell/browser/api',
+ },
+ 'dependencies': [
+ '<(DEPTH)/skia/skia.gyp:skia',
+ ],
+ },
+ ],
+}
diff --git a/chromium/ash/DEPS b/chromium/ash/DEPS
deleted file mode 100644
index 9b394844c3b..00000000000
--- a/chromium/ash/DEPS
+++ /dev/null
@@ -1,17 +0,0 @@
-include_rules = [
- "+cc/debug",
- "+chromeos",
- "+content/public",
- "+gpu/config",
- "+grit/ash_resources.h",
- "+grit/ash_strings.h",
- "+grit/ui_resources.h",
- "+grit/ui_strings.h",
- "+media",
- "+skia/ext",
- "+third_party/cros_system_api",
- "+third_party/skia",
- "+net",
- "+ui",
- "+win8",
-]
diff --git a/chromium/ash/OWNERS b/chromium/ash/OWNERS
deleted file mode 100644
index e7dd72d4022..00000000000
--- a/chromium/ash/OWNERS
+++ /dev/null
@@ -1,11 +0,0 @@
-derat@chromium.org
-jamescook@chromium.org
-oshima@chromium.org
-sky@chromium.org
-
-# These are for the common case of adding or renaming a few items. If you're
-# doing structural changes, please get a review from a reviewer above.
-per-file ash.gyp=*
-per-file ash_strings.grd=*
-per-file ash_chromeos_strings.grdp=*
-per-file ash_switches.*=*
diff --git a/chromium/ash/PRESUBMIT.py b/chromium/ash/PRESUBMIT.py
deleted file mode 100644
index 12b0c42e854..00000000000
--- a/chromium/ash/PRESUBMIT.py
+++ /dev/null
@@ -1,12 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Chromium presubmit script for src/ash
-
-See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
-for more details on the presubmit API built into gcl.
-"""
-
-def GetPreferredTrySlaves():
- return ['linux_chromeos_clang']
diff --git a/chromium/ash/accelerators/accelerator_commands.cc b/chromium/ash/accelerators/accelerator_commands.cc
deleted file mode 100644
index b50959f498a..00000000000
--- a/chromium/ash/accelerators/accelerator_commands.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/accelerators/accelerator_commands.h"
-
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "ash/wm/window_cycle_controller.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "content/public/browser/user_metrics.h"
-
-namespace ash {
-namespace accelerators {
-
-bool ToggleMinimized() {
- aura::Window* window = wm::GetActiveWindow();
- // Attempt to restore the window that would be cycled through next from
- // the launcher when there is no active window.
- if (!window) {
- ash::Shell::GetInstance()->window_cycle_controller()->
- HandleCycleWindow(WindowCycleController::FORWARD, false);
- return true;
- }
- wm::WindowState* window_state = wm::GetWindowState(window);
- if (!window_state->CanMinimize())
- return false;
- window_state->Minimize();
- return true;
-}
-
-void ToggleMaximized() {
- wm::WindowState* window_state = wm::GetActiveWindowState();
- if (!window_state)
- return;
- content::RecordAction(
- content::UserMetricsAction("Accel_Toggle_Maximized"));
- // Get out of fullscreen when in fullscreen mode.
- if (window_state->IsFullscreen())
- ToggleFullscreen();
- else
- window_state->ToggleMaximized();
-}
-
-void ToggleFullscreen() {
- wm::WindowState* window_state = wm::GetActiveWindowState();
- if (window_state)
- window_state->ToggleFullscreen();
-}
-
-} // namespace accelerators
-} // namespace ash
diff --git a/chromium/ash/accelerators/accelerator_commands.h b/chromium/ash/accelerators/accelerator_commands.h
deleted file mode 100644
index df576ba975f..00000000000
--- a/chromium/ash/accelerators/accelerator_commands.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_ACCELERATORS_ACCELERATOR_COMMANDS_H_
-#define ASH_ACCELERATORS_ACCELERATOR_COMMANDS_H_
-
-#include "ash/ash_export.h"
-
-// This file contains implementations of commands that are bound to keyboard
-// shortcuts in Ash or in the embedding application (e.g. Chrome).
-namespace ash {
-namespace accelerators {
-
-// Minimizes the active window, if present. If no windows are active, restores
-// the first unminimized window. Returns true if a window was minimized or
-// restored.
-ASH_EXPORT bool ToggleMinimized();
-
-// Toggles the maxmized state. If the window is in fulllscreen, it exits
-// fullscreen mode.
-ASH_EXPORT void ToggleMaximized();
-
-// Toggles the fullscreen state. The behavior can be overridden
-// by WindowStateDelegate::ToggleFullscreen().
-ASH_EXPORT void ToggleFullscreen();
-
-} // namespace accelerators
-} // namespace ash
-
-#endif // ASH_ACCELERATORS_ACCELERATOR_COMMANDS_H_
diff --git a/chromium/ash/accelerators/accelerator_commands_unittest.cc b/chromium/ash/accelerators/accelerator_commands_unittest.cc
deleted file mode 100644
index c193b268327..00000000000
--- a/chromium/ash/accelerators/accelerator_commands_unittest.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/accelerators/accelerator_commands.h"
-
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/window_state.h"
-#include "ui/aura/window.h"
-
-// Note: The unit tests for |ToggleMaximized()| and
-// |ToggleFullscreen()| are in
-// chrome/browser/ui/ash/accelerator_commands_browsertests.cc.
-// because they depends on chrome implementation of
-// |ash::wm::WindowStateDelegate|.
-
-namespace ash {
-namespace accelerators {
-
-typedef test::AshTestBase AcceleratorCommandsTest;
-
-TEST_F(AcceleratorCommandsTest, ToggleMinimized) {
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- window_state->Activate();
-
- ToggleMinimized();
- EXPECT_TRUE(window_state->IsMinimized());
- EXPECT_FALSE(window_state->IsNormalShowState());
-
- ToggleMinimized();
- EXPECT_FALSE(window_state->IsMinimized());
- EXPECT_TRUE(window_state->IsNormalShowState());
-}
-
-} // namespace accelerators
-} // namespace ash
diff --git a/chromium/ash/accelerators/accelerator_controller.cc b/chromium/ash/accelerators/accelerator_controller.cc
deleted file mode 100644
index 0ac3f7ef4b2..00000000000
--- a/chromium/ash/accelerators/accelerator_controller.cc
+++ /dev/null
@@ -1,1215 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/accelerators/accelerator_controller.h"
-
-#include <algorithm>
-#include <cmath>
-#include <iostream>
-#include <string>
-
-#include "ash/accelerators/accelerator_commands.h"
-#include "ash/accelerators/accelerator_table.h"
-#include "ash/accelerators/debug_commands.h"
-#include "ash/ash_switches.h"
-#include "ash/caps_lock_delegate.h"
-#include "ash/debug.h"
-#include "ash/display/display_controller.h"
-#include "ash/display/display_manager.h"
-#include "ash/focus_cycler.h"
-#include "ash/ime_control_delegate.h"
-#include "ash/launcher/launcher.h"
-#include "ash/magnifier/magnification_controller.h"
-#include "ash/magnifier/partial_magnification_controller.h"
-#include "ash/media_delegate.h"
-#include "ash/multi_profile_uma.h"
-#include "ash/new_window_delegate.h"
-#include "ash/root_window_controller.h"
-#include "ash/rotator/screen_rotation.h"
-#include "ash/screenshot_delegate.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shelf/shelf_delegate.h"
-#include "ash/shelf/shelf_model.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/brightness_control_delegate.h"
-#include "ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/web_notification/web_notification_tray.h"
-#include "ash/touch/touch_hud_debug.h"
-#include "ash/volume_control_delegate.h"
-#include "ash/wm/mru_window_tracker.h"
-#include "ash/wm/overview/window_selector_controller.h"
-#include "ash/wm/partial_screenshot_view.h"
-#include "ash/wm/power_button_controller.h"
-#include "ash/wm/window_cycle_controller.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/snap_sizer.h"
-#include "base/bind.h"
-#include "base/command_line.h"
-#include "content/public/browser/gpu_data_manager.h"
-#include "content/public/browser/user_metrics.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/base/accelerators/accelerator.h"
-#include "ui/base/accelerators/accelerator_manager.h"
-#include "ui/compositor/debug_utils.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animation_sequence.h"
-#include "ui/compositor/layer_animator.h"
-#include "ui/events/event.h"
-#include "ui/events/keycodes/keyboard_codes.h"
-#include "ui/gfx/screen.h"
-#include "ui/oak/oak.h"
-#include "ui/views/controls/webview/webview.h"
-#include "ui/views/debug_utils.h"
-#include "ui/views/widget/widget.h"
-
-#if defined(OS_CHROMEOS)
-#include "ash/session_state_delegate.h"
-#include "ash/system/chromeos/keyboard_brightness_controller.h"
-#include "base/sys_info.h"
-#endif // defined(OS_CHROMEOS)
-
-namespace ash {
-namespace {
-
-using internal::DisplayInfo;
-using content::UserMetricsAction;
-
-bool DebugShortcutsEnabled() {
-#if defined(NDEBUG)
- return CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshDebugShortcuts);
-#else
- return true;
-#endif
-}
-
-bool HandleAccessibleFocusCycle(bool reverse) {
- if (reverse) {
- content::RecordAction(UserMetricsAction("Accel_Accessible_Focus_Previous"));
- } else {
- content::RecordAction(UserMetricsAction("Accel_Accessible_Focus_Next"));
- }
-
- if (!Shell::GetInstance()->accessibility_delegate()->
- IsSpokenFeedbackEnabled()) {
- return false;
- }
- aura::Window* active_window = ash::wm::GetActiveWindow();
- if (!active_window)
- return false;
- views::Widget* widget =
- views::Widget::GetWidgetForNativeWindow(active_window);
- if (!widget)
- return false;
- views::FocusManager* focus_manager = widget->GetFocusManager();
- if (!focus_manager)
- return false;
- views::View* view = focus_manager->GetFocusedView();
- if (!view)
- return false;
- if (!strcmp(view->GetClassName(), views::WebView::kViewClassName))
- return false;
-
- focus_manager->AdvanceFocus(reverse);
- return true;
-}
-
-bool HandleCycleBackwardMRU(const ui::Accelerator& accelerator) {
- Shell* shell = Shell::GetInstance();
-
- if (accelerator.key_code() == ui::VKEY_TAB)
- content::RecordAction(content::UserMetricsAction("Accel_PrevWindow_Tab"));
-
- if (switches::UseOverviewMode()) {
- shell->window_selector_controller()->HandleCycleWindow(
- WindowSelector::BACKWARD);
- return true;
- }
- shell->window_cycle_controller()->HandleCycleWindow(
- WindowCycleController::BACKWARD, accelerator.IsAltDown());
- return true;
-}
-
-bool HandleCycleForwardMRU(const ui::Accelerator& accelerator) {
- Shell* shell = Shell::GetInstance();
-
- if (accelerator.key_code() == ui::VKEY_TAB)
- content::RecordAction(content::UserMetricsAction("Accel_NextWindow_Tab"));
-
- if (switches::UseOverviewMode()) {
- shell->window_selector_controller()->HandleCycleWindow(
- WindowSelector::FORWARD);
- return true;
- }
- shell->window_cycle_controller()->HandleCycleWindow(
- WindowCycleController::FORWARD, accelerator.IsAltDown());
- return true;
-}
-
-bool HandleCycleLinear(const ui::Accelerator& accelerator) {
- Shell* shell = Shell::GetInstance();
-
- // TODO(jamescook): When overview becomes the default the AcceleratorAction
- // should be renamed from CYCLE_LINEAR to TOGGLE_OVERVIEW.
- if (switches::UseOverviewMode()) {
- content::RecordAction(content::UserMetricsAction("Accel_Overview_F5"));
- shell->window_selector_controller()->ToggleOverview();
- return true;
- }
- if (accelerator.key_code() == ui::VKEY_MEDIA_LAUNCH_APP1)
- content::RecordAction(content::UserMetricsAction("Accel_NextWindow_F5"));
- shell->window_cycle_controller()->HandleLinearCycleWindow();
- return true;
-}
-
-bool HandleDisableCapsLock(ui::KeyboardCode key_code,
- ui::EventType previous_event_type,
- ui::KeyboardCode previous_key_code) {
- Shell* shell = Shell::GetInstance();
-
- if (previous_event_type == ui::ET_KEY_RELEASED ||
- (previous_key_code != ui::VKEY_LSHIFT &&
- previous_key_code != ui::VKEY_SHIFT &&
- previous_key_code != ui::VKEY_RSHIFT)) {
- // If something else was pressed between the Shift key being pressed
- // and released, then ignore the release of the Shift key.
- return false;
- }
- content::RecordAction(UserMetricsAction("Accel_Disable_Caps_Lock"));
- if (shell->caps_lock_delegate()->IsCapsLockEnabled()) {
- shell->caps_lock_delegate()->SetCapsLockEnabled(false);
- return true;
- }
- return false;
-}
-
-bool HandleFocusLauncher() {
- Shell* shell = Shell::GetInstance();
- content::RecordAction(content::UserMetricsAction("Accel_Focus_Launcher"));
- return shell->focus_cycler()->FocusWidget(
- Launcher::ForPrimaryDisplay()->shelf_widget());
-}
-
-bool HandleLaunchAppN(int n) {
- content::RecordAction(UserMetricsAction("Accel_Launch_App"));
- Launcher::ForPrimaryDisplay()->LaunchAppIndexAt(n);
- return true;
-}
-
-bool HandleLaunchLastApp() {
- content::RecordAction(UserMetricsAction("Accel_Launch_Last_App"));
- Launcher::ForPrimaryDisplay()->LaunchAppIndexAt(-1);
- return true;
-}
-
-// Magnify the screen
-bool HandleMagnifyScreen(int delta_index) {
- if (ash::Shell::GetInstance()->magnification_controller()->IsEnabled()) {
- // TODO(yoshiki): Move the following logic to MagnificationController.
- float scale =
- ash::Shell::GetInstance()->magnification_controller()->GetScale();
- // Calculate rounded logarithm (base kMagnificationScaleFactor) of scale.
- int scale_index =
- std::floor(std::log(scale) / std::log(kMagnificationScaleFactor) + 0.5);
-
- int new_scale_index = std::max(0, std::min(8, scale_index + delta_index));
-
- ash::Shell::GetInstance()->magnification_controller()->
- SetScale(std::pow(kMagnificationScaleFactor, new_scale_index), true);
- } else if (ash::Shell::GetInstance()->
- partial_magnification_controller()->is_enabled()) {
- float scale = delta_index > 0 ? kDefaultPartialMagnifiedScale : 1;
- ash::Shell::GetInstance()->partial_magnification_controller()->
- SetScale(scale);
- }
-
- return true;
-}
-
-bool HandleMediaNextTrack() {
- Shell::GetInstance()->media_delegate()->HandleMediaNextTrack();
- return true;
-}
-
-bool HandleMediaPlayPause() {
- Shell::GetInstance()->media_delegate()->HandleMediaPlayPause();
- return true;
-}
-
-bool HandleMediaPrevTrack() {
- Shell::GetInstance()->media_delegate()->HandleMediaPrevTrack();
- return true;
-}
-
-bool HandleNewIncognitoWindow() {
- content::RecordAction(UserMetricsAction("Accel_New_Incognito_Window"));
- bool incognito_allowed =
- Shell::GetInstance()->delegate()->IsIncognitoAllowed();
- if (incognito_allowed)
- Shell::GetInstance()->new_window_delegate()->NewWindow(
- true /* is_incognito */);
- return incognito_allowed;
-}
-
-bool HandleNewTab(ui::KeyboardCode key_code) {
- if (key_code == ui::VKEY_T)
- content::RecordAction(content::UserMetricsAction("Accel_NewTab_T"));
- Shell::GetInstance()->new_window_delegate()->NewTab();
- return true;
-}
-
-bool HandleNewWindow() {
- content::RecordAction(content::UserMetricsAction("Accel_New_Window"));
- Shell::GetInstance()->new_window_delegate()->NewWindow(
- false /* is_incognito */);
- return true;
-}
-
-bool HandleNextIme(ImeControlDelegate* ime_control_delegate,
- ui::EventType previous_event_type,
- ui::KeyboardCode previous_key_code) {
- // This check is necessary e.g. not to process the Shift+Alt+
- // ET_KEY_RELEASED accelerator for Chrome OS (see ash/accelerators/
- // accelerator_controller.cc) when Shift+Alt+Tab is pressed and then Tab
- // is released.
- if (previous_event_type == ui::ET_KEY_RELEASED &&
- // Workaround for crbug.com/139556. CJK IME users tend to press
- // Enter (or Space) and Shift+Alt almost at the same time to commit
- // an IME string and then switch from the IME to the English layout.
- // This workaround allows the user to trigger NEXT_IME even if the
- // user presses Shift+Alt before releasing Enter.
- // TODO(nona|mazda): Fix crbug.com/139556 in a cleaner way.
- previous_key_code != ui::VKEY_RETURN &&
- previous_key_code != ui::VKEY_SPACE) {
- // We totally ignore this accelerator.
- // TODO(mazda): Fix crbug.com/158217
- return false;
- }
- content::RecordAction(UserMetricsAction("Accel_Next_Ime"));
- if (ime_control_delegate)
- return ime_control_delegate->HandleNextIme();
- return false;
-}
-
-bool HandleOpenFeedbackPage() {
- content::RecordAction(UserMetricsAction("Accel_Open_Feedback_Page"));
- ash::Shell::GetInstance()->new_window_delegate()->OpenFeedbackPage();
- return true;
-}
-
-bool HandlePositionCenter() {
- content::RecordAction(UserMetricsAction("Accel_Window_Position_Center"));
- aura::Window* window = wm::GetActiveWindow();
- // Docked windows do not support centering and ignore accelerator.
- if (window && !wm::GetWindowState(window)->IsDocked()) {
- wm::CenterWindow(window);
- return true;
- }
- return false;
-}
-
-bool HandlePreviousIme(ImeControlDelegate* ime_control_delegate,
- const ui::Accelerator& accelerator) {
- content::RecordAction(UserMetricsAction("Accel_Previous_Ime"));
- if (ime_control_delegate)
- return ime_control_delegate->HandlePreviousIme(accelerator);
- return false;
-}
-
-bool HandleRestoreTab() {
- content::RecordAction(content::UserMetricsAction("Accel_Restore_Tab"));
- Shell::GetInstance()->new_window_delegate()->RestoreTab();
- return true;
-}
-
-bool HandleRotatePaneFocus(Shell::Direction direction) {
- Shell* shell = Shell::GetInstance();
- switch (direction) {
- // TODO(stevet): Not sure if this is the same as IDC_FOCUS_NEXT_PANE.
- case Shell::FORWARD: {
- content::RecordAction(UserMetricsAction("Accel_Focus_Next_Pane"));
- shell->focus_cycler()->RotateFocus(internal::FocusCycler::FORWARD);
- break;
- }
- case Shell::BACKWARD: {
- content::RecordAction(UserMetricsAction("Accel_Focus_Previous_Pane"));
- shell->focus_cycler()->RotateFocus(internal::FocusCycler::BACKWARD);
- break;
- }
- }
- return true;
-}
-
-// Rotate the active window.
-bool HandleRotateActiveWindow() {
- content::RecordAction(UserMetricsAction("Accel_Rotate_Window"));
- aura::Window* active_window = wm::GetActiveWindow();
- if (active_window) {
- // The rotation animation bases its target transform on the current
- // rotation and position. Since there could be an animation in progress
- // right now, queue this animation so when it starts it picks up a neutral
- // rotation and position. Use replace so we only enqueue one at a time.
- active_window->layer()->GetAnimator()->
- set_preemption_strategy(ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS);
- active_window->layer()->GetAnimator()->StartAnimation(
- new ui::LayerAnimationSequence(
- new ash::ScreenRotation(360, active_window->layer())));
- }
- return true;
-}
-
-gfx::Display::Rotation GetNextRotation(gfx::Display::Rotation current) {
- switch (current) {
- case gfx::Display::ROTATE_0:
- return gfx::Display::ROTATE_90;
- case gfx::Display::ROTATE_90:
- return gfx::Display::ROTATE_180;
- case gfx::Display::ROTATE_180:
- return gfx::Display::ROTATE_270;
- case gfx::Display::ROTATE_270:
- return gfx::Display::ROTATE_0;
- }
- NOTREACHED() << "Unknown rotation:" << current;
- return gfx::Display::ROTATE_0;
-}
-
-// Rotates the screen.
-bool HandleRotateScreen() {
- content::RecordAction(UserMetricsAction("Accel_Rotate_Window"));
- gfx::Point point = Shell::GetScreen()->GetCursorScreenPoint();
- gfx::Display display = Shell::GetScreen()->GetDisplayNearestPoint(point);
- const DisplayInfo& display_info =
- Shell::GetInstance()->display_manager()->GetDisplayInfo(display.id());
- Shell::GetInstance()->display_manager()->SetDisplayRotation(
- display.id(), GetNextRotation(display_info.rotation()));
- return true;
-}
-
-bool HandleScaleReset() {
- internal::DisplayManager* display_manager =
- Shell::GetInstance()->display_manager();
- int64 display_id = display_manager->GetDisplayIdForUIScaling();
- if (display_id == gfx::Display::kInvalidDisplayID)
- return false;
-
- content::RecordAction(UserMetricsAction("Accel_Scale_Ui_Reset"));
-
- display_manager->SetDisplayUIScale(display_id, 1.0f);
- return true;
-}
-
-bool HandleScaleUI(bool up) {
- internal::DisplayManager* display_manager =
- Shell::GetInstance()->display_manager();
- int64 display_id = display_manager->GetDisplayIdForUIScaling();
- if (display_id == gfx::Display::kInvalidDisplayID)
- return false;
-
- if (up) {
- content::RecordAction(UserMetricsAction("Accel_Scale_Ui_Up"));
- } else {
- content::RecordAction(UserMetricsAction("Accel_Scale_Ui_Down"));
- }
-
- const DisplayInfo& display_info = display_manager->GetDisplayInfo(display_id);
- float next_scale =
- internal::DisplayManager::GetNextUIScale(display_info, up);
- display_manager->SetDisplayUIScale(display_id, next_scale);
- return true;
-}
-
-bool HandleSwapPrimaryDisplay() {
- content::RecordAction(UserMetricsAction("Accel_Swap_Primary_Display"));
- Shell::GetInstance()->display_controller()->SwapPrimaryDisplay();
- return true;
-}
-
-bool HandleShowKeyboardOverlay() {
- content::RecordAction(UserMetricsAction("Accel_Show_Keyboard_Overlay"));
- ash::Shell::GetInstance()->new_window_delegate()->ShowKeyboardOverlay();
-
- return true;
-}
-
-void HandleShowMessageCenterBubble() {
- content::RecordAction(UserMetricsAction("Accel_Show_Message_Center_Bubble"));
- internal::RootWindowController* controller =
- internal::RootWindowController::ForTargetRootWindow();
- internal::StatusAreaWidget* status_area_widget =
- controller->shelf()->status_area_widget();
- if (status_area_widget) {
- WebNotificationTray* notification_tray =
- status_area_widget->web_notification_tray();
- if (notification_tray->visible())
- notification_tray->ShowMessageCenterBubble();
- }
-}
-
-bool HandleShowOak() {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshEnableOak)) {
- oak::ShowOakWindowWithContext(Shell::GetPrimaryRootWindow());
- return true;
- }
- return false;
-}
-
-bool HandleShowSystemTrayBubble() {
- content::RecordAction(UserMetricsAction("Accel_Show_System_Tray_Bubble"));
- internal::RootWindowController* controller =
- internal::RootWindowController::ForTargetRootWindow();
- if (!controller->GetSystemTray()->HasSystemBubble()) {
- controller->GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW);
- return true;
- }
- return false;
-}
-
-bool HandleShowTaskManager() {
- content::RecordAction(UserMetricsAction("Accel_Show_Task_Manager"));
- Shell::GetInstance()->new_window_delegate()->ShowTaskManager();
- return true;
-}
-
-void HandleSilenceSpokenFeedback() {
- content::RecordAction(UserMetricsAction("Accel_Silence_Spoken_Feedback"));
-
- AccessibilityDelegate* delegate =
- Shell::GetInstance()->accessibility_delegate();
- if (!delegate->IsSpokenFeedbackEnabled())
- return;
- delegate->SilenceSpokenFeedback();
-}
-
-bool HandleSwitchIme(ImeControlDelegate* ime_control_delegate,
- const ui::Accelerator& accelerator) {
- content::RecordAction(UserMetricsAction("Accel_Switch_Ime"));
- if (ime_control_delegate)
- return ime_control_delegate->HandleSwitchIme(accelerator);
- return false;
-}
-
-bool HandleTakePartialScreenshot(ScreenshotDelegate* screenshot_delegate) {
- content::RecordAction(UserMetricsAction("Accel_Take_Partial_Screenshot"));
- if (screenshot_delegate) {
- ash::PartialScreenshotView::StartPartialScreenshot(
- screenshot_delegate);
- }
- // Return true to prevent propagation of the key event because
- // this key combination is reserved for partial screenshot.
- return true;
-}
-
-bool HandleTakeScreenshot(ScreenshotDelegate* screenshot_delegate) {
- content::RecordAction(UserMetricsAction("Accel_Take_Screenshot"));
- if (screenshot_delegate &&
- screenshot_delegate->CanTakeScreenshot()) {
- screenshot_delegate->HandleTakeScreenshotForAllRootWindows();
- }
- // Return true to prevent propagation of the key event.
- return true;
-}
-
-bool HandleToggleAppList(ui::KeyboardCode key_code,
- ui::EventType previous_event_type,
- ui::KeyboardCode previous_key_code,
- const ui::Accelerator& accelerator) {
- // If something else was pressed between the Search key (LWIN)
- // being pressed and released, then ignore the release of the
- // Search key.
- if (key_code == ui::VKEY_LWIN &&
- (previous_event_type == ui::ET_KEY_RELEASED ||
- previous_key_code != ui::VKEY_LWIN))
- return false;
- if (key_code == ui::VKEY_LWIN)
- content::RecordAction(content::UserMetricsAction("Accel_Search_LWin"));
- // When spoken feedback is enabled, we should neither toggle the list nor
- // consume the key since Search+Shift is one of the shortcuts the a11y
- // feature uses. crbug.com/132296
- DCHECK_EQ(ui::VKEY_LWIN, accelerator.key_code());
- if (Shell::GetInstance()->accessibility_delegate()->
- IsSpokenFeedbackEnabled())
- return false;
- ash::Shell::GetInstance()->ToggleAppList(NULL);
- return true;
-}
-
-bool HandleToggleCapsLock(ui::KeyboardCode key_code,
- ui::EventType previous_event_type,
- ui::KeyboardCode previous_key_code) {
- Shell* shell = Shell::GetInstance();
- if (key_code == ui::VKEY_LWIN) {
- // If something else was pressed between the Search key (LWIN)
- // being pressed and released, then ignore the release of the
- // Search key.
- // TODO(danakj): Releasing Alt first breaks this: crbug.com/166495
- if (previous_event_type == ui::ET_KEY_RELEASED ||
- previous_key_code != ui::VKEY_LWIN)
- return false;
- }
- content::RecordAction(UserMetricsAction("Accel_Toggle_Caps_Lock"));
- shell->caps_lock_delegate()->ToggleCapsLock();
- return true;
-}
-
-bool HandleToggleFullscreen(ui::KeyboardCode key_code) {
- if (key_code == ui::VKEY_MEDIA_LAUNCH_APP2) {
- content::RecordAction(UserMetricsAction("Accel_Fullscreen_F4"));
- }
- accelerators::ToggleFullscreen();
- return true;
-}
-
-bool HandleToggleRootWindowFullScreen() {
- Shell::GetPrimaryRootWindow()->GetDispatcher()->host()->ToggleFullScreen();
- return true;
-}
-
-bool HandleWindowSnap(int action) {
- wm::WindowState* window_state = wm::GetActiveWindowState();
- // Disable window snapping shortcut key for full screen window due to
- // http://crbug.com/135487.
- if (!window_state ||
- window_state->window()->type() != aura::client::WINDOW_TYPE_NORMAL ||
- window_state->IsFullscreen()) {
- return false;
- }
-
- if (action == WINDOW_SNAP_LEFT) {
- content::RecordAction(UserMetricsAction("Accel_Window_Snap_Left"));
- } else {
- content::RecordAction(UserMetricsAction("Accel_Window_Snap_Right"));
- }
-
- internal::SnapSizer::SnapWindow(window_state,
- action == WINDOW_SNAP_LEFT ? internal::SnapSizer::LEFT_EDGE :
- internal::SnapSizer::RIGHT_EDGE);
- return true;
-}
-
-bool HandleWindowMinimize() {
- content::RecordAction(
- content::UserMetricsAction("Accel_Toggle_Minimized_Minus"));
- return accelerators::ToggleMinimized();
-}
-
-#if defined(OS_CHROMEOS)
-bool HandleAddRemoveDisplay() {
- content::RecordAction(UserMetricsAction("Accel_Add_Remove_Display"));
- Shell::GetInstance()->display_manager()->AddRemoveDisplay();
- return true;
-}
-
-bool HandleCrosh() {
- content::RecordAction(UserMetricsAction("Accel_Open_Crosh"));
-
- Shell::GetInstance()->new_window_delegate()->OpenCrosh();
- return true;
-}
-
-bool HandleFileManager() {
- content::RecordAction(UserMetricsAction("Accel_Open_File_Manager"));
-
- Shell::GetInstance()->new_window_delegate()->OpenFileManager();
- return true;
-}
-
-bool HandleLock(ui::KeyboardCode key_code) {
- content::RecordAction(UserMetricsAction("Accel_LockScreen_L"));
- Shell::GetInstance()->session_state_delegate()->LockScreen();
- return true;
-}
-
-bool HandleCycleUser(SessionStateDelegate::CycleUser cycle_user) {
- if (!Shell::GetInstance()->delegate()->IsMultiProfilesEnabled())
- return false;
- ash::SessionStateDelegate* delegate =
- ash::Shell::GetInstance()->session_state_delegate();
- if (delegate->NumberOfLoggedInUsers() <= 1)
- return false;
- MultiProfileUMA::RecordSwitchActiveUser(
- MultiProfileUMA::SWITCH_ACTIVE_USER_BY_ACCELERATOR);
- switch (cycle_user) {
- case SessionStateDelegate::CYCLE_TO_NEXT_USER:
- content::RecordAction(UserMetricsAction("Accel_Switch_To_Next_User"));
- break;
- case SessionStateDelegate::CYCLE_TO_PREVIOUS_USER:
- content::RecordAction(UserMetricsAction("Accel_Switch_To_Previous_User"));
- break;
- }
- delegate->CycleActiveUser(cycle_user);
- return true;
-}
-
-bool HandleToggleMirrorMode() {
- content::RecordAction(UserMetricsAction("Accel_Toggle_Mirror_Mode"));
- Shell::GetInstance()->display_controller()->ToggleMirrorMode();
- return true;
-}
-
-bool HandleToggleSpokenFeedback() {
- content::RecordAction(UserMetricsAction("Accel_Toggle_Spoken_Feedback"));
-
- Shell::GetInstance()->accessibility_delegate()->
- ToggleSpokenFeedback(A11Y_NOTIFICATION_SHOW);
- return true;
-}
-
-bool HandleTouchHudClear() {
- internal::RootWindowController* controller =
- internal::RootWindowController::ForTargetRootWindow();
- if (controller->touch_hud_debug()) {
- controller->touch_hud_debug()->Clear();
- return true;
- }
- return false;
-}
-
-bool HandleTouchHudModeChange() {
- internal::RootWindowController* controller =
- internal::RootWindowController::ForTargetRootWindow();
- if (controller->touch_hud_debug()) {
- controller->touch_hud_debug()->ChangeToNextMode();
- return true;
- }
- return false;
-}
-
-bool HandleTouchHudProjectToggle() {
- content::RecordAction(UserMetricsAction("Accel_Touch_Hud_Clear"));
- bool enabled = Shell::GetInstance()->is_touch_hud_projection_enabled();
- Shell::GetInstance()->SetTouchHudProjectionEnabled(!enabled);
- return true;
-}
-
-#endif // defined(OS_CHROMEOS)
-
-// Debug print methods.
-
-bool HandlePrintLayerHierarchy() {
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- for (size_t i = 0; i < root_windows.size(); ++i) {
- ui::PrintLayerHierarchy(
- root_windows[i]->layer(),
- root_windows[i]->GetDispatcher()->GetLastMouseLocationInRoot());
- }
- return true;
-}
-
-bool HandlePrintViewHierarchy() {
- aura::Window* active_window = ash::wm::GetActiveWindow();
- if (!active_window)
- return true;
- views::Widget* browser_widget =
- views::Widget::GetWidgetForNativeWindow(active_window);
- if (!browser_widget)
- return true;
- views::PrintViewHierarchy(browser_widget->GetRootView());
- return true;
-}
-
-void PrintWindowHierarchy(aura::Window* window,
- int indent,
- std::ostringstream* out) {
- std::string indent_str(indent, ' ');
- std::string name(window->name());
- if (name.empty())
- name = "\"\"";
- *out << indent_str << name << " (" << window << ")"
- << " type=" << window->type()
- << (wm::IsActiveWindow(window) ? " [active] " : " ")
- << (window->IsVisible() ? " visible " : " ")
- << window->bounds().ToString()
- << '\n';
-
- for (size_t i = 0; i < window->children().size(); ++i)
- PrintWindowHierarchy(window->children()[i], indent + 3, out);
-}
-
-bool HandlePrintWindowHierarchy() {
- Shell::RootWindowControllerList controllers =
- Shell::GetAllRootWindowControllers();
- for (size_t i = 0; i < controllers.size(); ++i) {
- std::ostringstream out;
- out << "RootWindow " << i << ":\n";
- PrintWindowHierarchy(controllers[i]->root_window(), 0, &out);
- // Error so logs can be collected from end-users.
- LOG(ERROR) << out.str();
- }
- return true;
-}
-
-bool HandlePrintUIHierarchies() {
- // This is a separate command so the user only has to hit one key to generate
- // all the logs. Developers use the individual dumps repeatedly, so keep
- // those as separate commands to avoid spamming their logs.
- HandlePrintLayerHierarchy();
- HandlePrintWindowHierarchy();
- HandlePrintViewHierarchy();
- return true;
-}
-
-} // namespace
-
-////////////////////////////////////////////////////////////////////////////////
-// AcceleratorControllerContext, public:
-
-AcceleratorControllerContext::AcceleratorControllerContext() {
- current_accelerator_.set_type(ui::ET_UNKNOWN);
- previous_accelerator_.set_type(ui::ET_UNKNOWN);
-}
-
-void AcceleratorControllerContext::UpdateContext(
- const ui::Accelerator& accelerator) {
- previous_accelerator_ = current_accelerator_;
- current_accelerator_ = accelerator;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AcceleratorController, public:
-
-AcceleratorController::AcceleratorController()
- : accelerator_manager_(new ui::AcceleratorManager) {
- Init();
-}
-
-AcceleratorController::~AcceleratorController() {
-}
-
-void AcceleratorController::Init() {
- for (size_t i = 0; i < kActionsAllowedAtLoginOrLockScreenLength; ++i) {
- actions_allowed_at_login_screen_.insert(
- kActionsAllowedAtLoginOrLockScreen[i]);
- actions_allowed_at_lock_screen_.insert(
- kActionsAllowedAtLoginOrLockScreen[i]);
- }
- for (size_t i = 0; i < kActionsAllowedAtLockScreenLength; ++i)
- actions_allowed_at_lock_screen_.insert(kActionsAllowedAtLockScreen[i]);
- for (size_t i = 0; i < kActionsAllowedAtModalWindowLength; ++i)
- actions_allowed_at_modal_window_.insert(kActionsAllowedAtModalWindow[i]);
- for (size_t i = 0; i < kReservedActionsLength; ++i)
- reserved_actions_.insert(kReservedActions[i]);
- for (size_t i = 0; i < kNonrepeatableActionsLength; ++i)
- nonrepeatable_actions_.insert(kNonrepeatableActions[i]);
- for (size_t i = 0; i < kActionsAllowedInAppModeLength; ++i)
- actions_allowed_in_app_mode_.insert(kActionsAllowedInAppMode[i]);
- for (size_t i = 0; i < kActionsNeedingWindowLength; ++i)
- actions_needing_window_.insert(kActionsNeedingWindow[i]);
-
- RegisterAccelerators(kAcceleratorData, kAcceleratorDataLength);
-
-#if !defined(NDEBUG)
- RegisterAccelerators(kDesktopAcceleratorData, kDesktopAcceleratorDataLength);
-#endif
-
- if (DebugShortcutsEnabled()) {
- RegisterAccelerators(kDebugAcceleratorData, kDebugAcceleratorDataLength);
- for (size_t i = 0; i < kReservedDebugActionsLength; ++i)
- reserved_actions_.insert(kReservedDebugActions[i]);
- }
-
-#if defined(OS_CHROMEOS)
- keyboard_brightness_control_delegate_.reset(
- new KeyboardBrightnessController());
-#endif
-}
-
-void AcceleratorController::Register(const ui::Accelerator& accelerator,
- ui::AcceleratorTarget* target) {
- accelerator_manager_->Register(accelerator,
- ui::AcceleratorManager::kNormalPriority,
- target);
-}
-
-void AcceleratorController::Unregister(const ui::Accelerator& accelerator,
- ui::AcceleratorTarget* target) {
- accelerator_manager_->Unregister(accelerator, target);
-}
-
-void AcceleratorController::UnregisterAll(ui::AcceleratorTarget* target) {
- accelerator_manager_->UnregisterAll(target);
-}
-
-bool AcceleratorController::Process(const ui::Accelerator& accelerator) {
- if (ime_control_delegate_) {
- return accelerator_manager_->Process(
- ime_control_delegate_->RemapAccelerator(accelerator));
- }
- return accelerator_manager_->Process(accelerator);
-}
-
-bool AcceleratorController::IsRegistered(
- const ui::Accelerator& accelerator) const {
- return accelerator_manager_->GetCurrentTarget(accelerator) != NULL;
-}
-
-bool AcceleratorController::IsReservedAccelerator(
- const ui::Accelerator& accelerator) const {
- const ui::Accelerator remapped_accelerator = ime_control_delegate_.get() ?
- ime_control_delegate_->RemapAccelerator(accelerator) : accelerator;
-
- std::map<ui::Accelerator, int>::const_iterator iter =
- accelerators_.find(remapped_accelerator);
- if (iter == accelerators_.end())
- return false; // not an accelerator.
-
- return reserved_actions_.find(iter->second) != reserved_actions_.end();
-}
-
-bool AcceleratorController::PerformAction(int action,
- const ui::Accelerator& accelerator) {
- ash::Shell* shell = ash::Shell::GetInstance();
- if (!shell->session_state_delegate()->IsActiveUserSessionStarted() &&
- actions_allowed_at_login_screen_.find(action) ==
- actions_allowed_at_login_screen_.end()) {
- return false;
- }
- if (shell->session_state_delegate()->IsScreenLocked() &&
- actions_allowed_at_lock_screen_.find(action) ==
- actions_allowed_at_lock_screen_.end()) {
- return false;
- }
- if (shell->IsSystemModalWindowOpen() &&
- actions_allowed_at_modal_window_.find(action) ==
- actions_allowed_at_modal_window_.end()) {
- // Note: we return true. This indicates the shortcut is handled
- // and will not be passed to the modal window. This is important
- // for things like Alt+Tab that would cause an undesired effect
- // in the modal window by cycling through its window elements.
- return true;
- }
- if (shell->delegate()->IsRunningInForcedAppMode() &&
- actions_allowed_in_app_mode_.find(action) ==
- actions_allowed_in_app_mode_.end()) {
- return false;
- }
- if (MruWindowTracker::BuildWindowList(false).empty() &&
- actions_needing_window_.find(action) != actions_needing_window_.end()) {
- Shell::GetInstance()->accessibility_delegate()->TriggerAccessibilityAlert(
- A11Y_ALERT_WINDOW_NEEDED);
- return true;
- }
-
- const ui::KeyboardCode key_code = accelerator.key_code();
- // PerformAction() is performed from gesture controllers and passes
- // empty Accelerator() instance as the second argument. Such events
- // should never be suspended.
- const bool gesture_event = key_code == ui::VKEY_UNKNOWN;
-
- // Ignore accelerators invoked as repeated (while holding a key for a long
- // time, if their handling is nonrepeatable.
- if (nonrepeatable_actions_.find(action) != nonrepeatable_actions_.end() &&
- context_.repeated() && !gesture_event) {
- return true;
- }
- // Type of the previous accelerator. Used by NEXT_IME and DISABLE_CAPS_LOCK.
- const ui::EventType previous_event_type =
- context_.previous_accelerator().type();
- const ui::KeyboardCode previous_key_code =
- context_.previous_accelerator().key_code();
-
- // You *MUST* return true when some action is performed. Otherwise, this
- // function might be called *twice*, via BrowserView::PreHandleKeyboardEvent
- // and BrowserView::HandleKeyboardEvent, for a single accelerator press.
- //
- // If your accelerator invokes more than one line of code, please either
- // implement it in your module's controller code (like TOGGLE_MIRROR_MODE
- // below) or pull it into a HandleFoo() function above.
- switch (action) {
- case ACCESSIBLE_FOCUS_NEXT:
- return HandleAccessibleFocusCycle(false);
- case ACCESSIBLE_FOCUS_PREVIOUS:
- return HandleAccessibleFocusCycle(true);
- case CYCLE_BACKWARD_MRU:
- return HandleCycleBackwardMRU(accelerator);
- case CYCLE_FORWARD_MRU:
- return HandleCycleForwardMRU(accelerator);
- case CYCLE_LINEAR:
- return HandleCycleLinear(accelerator);
-#if defined(OS_CHROMEOS)
- case ADD_REMOVE_DISPLAY:
- return HandleAddRemoveDisplay();
- case TOGGLE_MIRROR_MODE:
- return HandleToggleMirrorMode();
- case LOCK_SCREEN:
- return HandleLock(key_code);
- case OPEN_FILE_MANAGER:
- return HandleFileManager();
- case OPEN_CROSH:
- return HandleCrosh();
- case SILENCE_SPOKEN_FEEDBACK:
- HandleSilenceSpokenFeedback();
- break;
- case SWAP_PRIMARY_DISPLAY:
- return HandleSwapPrimaryDisplay();
- case SWITCH_TO_NEXT_USER:
- return HandleCycleUser(SessionStateDelegate::CYCLE_TO_NEXT_USER);
- case SWITCH_TO_PREVIOUS_USER:
- return HandleCycleUser(SessionStateDelegate::CYCLE_TO_PREVIOUS_USER);
- case TOGGLE_SPOKEN_FEEDBACK:
- return HandleToggleSpokenFeedback();
- case TOGGLE_WIFI:
- Shell::GetInstance()->system_tray_notifier()->NotifyRequestToggleWifi();
- return true;
- case TOUCH_HUD_CLEAR:
- return HandleTouchHudClear();
- case TOUCH_HUD_MODE_CHANGE:
- return HandleTouchHudModeChange();
- case TOUCH_HUD_PROJECTION_TOGGLE:
- return HandleTouchHudProjectToggle();
- case DISABLE_GPU_WATCHDOG:
- content::GpuDataManager::GetInstance()->DisableGpuWatchdog();
- return true;
-#endif // OS_CHROMEOS
- case OPEN_FEEDBACK_PAGE:
- return HandleOpenFeedbackPage();
- case EXIT:
- // UMA metrics are recorded in the handler.
- exit_warning_handler_.HandleAccelerator();
- return true;
- case NEW_INCOGNITO_WINDOW:
- return HandleNewIncognitoWindow();
- case NEW_TAB:
- return HandleNewTab(key_code);
- case NEW_WINDOW:
- return HandleNewWindow();
- case RESTORE_TAB:
- return HandleRestoreTab();
- case TAKE_SCREENSHOT:
- return HandleTakeScreenshot(screenshot_delegate_.get());
- case TAKE_PARTIAL_SCREENSHOT:
- return HandleTakePartialScreenshot(screenshot_delegate_.get());
- case TOGGLE_APP_LIST:
- return HandleToggleAppList(
- key_code, previous_event_type, previous_key_code, accelerator);
- case DISABLE_CAPS_LOCK:
- return HandleDisableCapsLock(
- key_code, previous_event_type, previous_key_code);
- case TOGGLE_CAPS_LOCK:
- return HandleToggleCapsLock(
- key_code, previous_event_type, previous_key_code);
- case BRIGHTNESS_DOWN:
- if (brightness_control_delegate_)
- return brightness_control_delegate_->HandleBrightnessDown(accelerator);
- break;
- case BRIGHTNESS_UP:
- if (brightness_control_delegate_)
- return brightness_control_delegate_->HandleBrightnessUp(accelerator);
- break;
- case KEYBOARD_BRIGHTNESS_DOWN:
- if (keyboard_brightness_control_delegate_)
- return keyboard_brightness_control_delegate_->
- HandleKeyboardBrightnessDown(accelerator);
- break;
- case KEYBOARD_BRIGHTNESS_UP:
- if (keyboard_brightness_control_delegate_)
- return keyboard_brightness_control_delegate_->
- HandleKeyboardBrightnessUp(accelerator);
- break;
- case VOLUME_MUTE: {
- ash::VolumeControlDelegate* volume_delegate =
- shell->system_tray_delegate()->GetVolumeControlDelegate();
- return volume_delegate && volume_delegate->HandleVolumeMute(accelerator);
- }
- case VOLUME_DOWN: {
- ash::VolumeControlDelegate* volume_delegate =
- shell->system_tray_delegate()->GetVolumeControlDelegate();
- return volume_delegate && volume_delegate->HandleVolumeDown(accelerator);
- }
- case VOLUME_UP: {
- ash::VolumeControlDelegate* volume_delegate =
- shell->system_tray_delegate()->GetVolumeControlDelegate();
- return volume_delegate && volume_delegate->HandleVolumeUp(accelerator);
- }
- case FOCUS_LAUNCHER:
- return HandleFocusLauncher();
- case FOCUS_NEXT_PANE:
- return HandleRotatePaneFocus(Shell::FORWARD);
- case FOCUS_PREVIOUS_PANE:
- return HandleRotatePaneFocus(Shell::BACKWARD);
- case SHOW_KEYBOARD_OVERLAY:
- return HandleShowKeyboardOverlay();
- case SHOW_OAK:
- return HandleShowOak();
- case SHOW_SYSTEM_TRAY_BUBBLE:
- return HandleShowSystemTrayBubble();
- case SHOW_MESSAGE_CENTER_BUBBLE:
- HandleShowMessageCenterBubble();
- break;
- case SHOW_TASK_MANAGER:
- return HandleShowTaskManager();
- case NEXT_IME:
- return HandleNextIme(
- ime_control_delegate_.get(), previous_event_type, previous_key_code);
- case PREVIOUS_IME:
- return HandlePreviousIme(ime_control_delegate_.get(), accelerator);
- case PRINT_UI_HIERARCHIES:
- return HandlePrintUIHierarchies();
- case SWITCH_IME:
- return HandleSwitchIme(ime_control_delegate_.get(), accelerator);
- case LAUNCH_APP_0:
- return HandleLaunchAppN(0);
- case LAUNCH_APP_1:
- return HandleLaunchAppN(1);
- case LAUNCH_APP_2:
- return HandleLaunchAppN(2);
- case LAUNCH_APP_3:
- return HandleLaunchAppN(3);
- case LAUNCH_APP_4:
- return HandleLaunchAppN(4);
- case LAUNCH_APP_5:
- return HandleLaunchAppN(5);
- case LAUNCH_APP_6:
- return HandleLaunchAppN(6);
- case LAUNCH_APP_7:
- return HandleLaunchAppN(7);
- case LAUNCH_LAST_APP:
- return HandleLaunchLastApp();
- case WINDOW_SNAP_LEFT:
- case WINDOW_SNAP_RIGHT:
- return HandleWindowSnap(action);
- case WINDOW_MINIMIZE:
- return HandleWindowMinimize();
- case TOGGLE_FULLSCREEN:
- return HandleToggleFullscreen(key_code);
- case TOGGLE_MAXIMIZED:
- accelerators::ToggleMaximized();
- return true;
- case WINDOW_POSITION_CENTER:
- return HandlePositionCenter();
- case SCALE_UI_UP:
- return HandleScaleUI(true /* up */);
- case SCALE_UI_DOWN:
- return HandleScaleUI(false /* down */);
- case SCALE_UI_RESET:
- return HandleScaleReset();
- case ROTATE_WINDOW:
- return HandleRotateActiveWindow();
- case ROTATE_SCREEN:
- return HandleRotateScreen();
- case TOGGLE_DESKTOP_BACKGROUND_MODE:
- return debug::CycleDesktopBackgroundMode();
- case TOGGLE_ROOT_WINDOW_FULL_SCREEN:
- return HandleToggleRootWindowFullScreen();
- case DEBUG_TOGGLE_DEVICE_SCALE_FACTOR:
- Shell::GetInstance()->display_manager()->ToggleDisplayScaleFactor();
- return true;
- case DEBUG_TOGGLE_SHOW_DEBUG_BORDERS:
- ash::debug::ToggleShowDebugBorders();
- return true;
- case DEBUG_TOGGLE_SHOW_FPS_COUNTER:
- ash::debug::ToggleShowFpsCounter();
- return true;
- case DEBUG_TOGGLE_SHOW_PAINT_RECTS:
- ash::debug::ToggleShowPaintRects();
- return true;
- case MAGNIFY_SCREEN_ZOOM_IN:
- return HandleMagnifyScreen(1);
- case MAGNIFY_SCREEN_ZOOM_OUT:
- return HandleMagnifyScreen(-1);
- case MEDIA_NEXT_TRACK:
- return HandleMediaNextTrack();
- case MEDIA_PLAY_PAUSE:
- return HandleMediaPlayPause();
- case MEDIA_PREV_TRACK:
- return HandleMediaPrevTrack();
- case POWER_PRESSED: // fallthrough
- case POWER_RELEASED:
-#if defined(OS_CHROMEOS)
- if (!base::SysInfo::IsRunningOnChromeOS()) {
- // There is no powerd in linux desktop, so call the
- // PowerButtonController here.
- Shell::GetInstance()->power_button_controller()->
- OnPowerButtonEvent(action == POWER_PRESSED, base::TimeTicks());
- }
-#endif
- // We don't do anything with these at present on the device,
- // (power button events are reported to us from powerm via
- // D-BUS), but we consume them to prevent them from getting
- // passed to apps -- see http://crbug.com/146609.
- return true;
- case LOCK_PRESSED:
- case LOCK_RELEASED:
- Shell::GetInstance()->power_button_controller()->
- OnLockButtonEvent(action == LOCK_PRESSED, base::TimeTicks());
- return true;
- case PRINT_LAYER_HIERARCHY:
- return HandlePrintLayerHierarchy();
- case PRINT_VIEW_HIERARCHY:
- return HandlePrintViewHierarchy();
- case PRINT_WINDOW_HIERARCHY:
- return HandlePrintWindowHierarchy();
- default:
- NOTREACHED() << "Unhandled action " << action;
- }
- return false;
-}
-
-void AcceleratorController::SetBrightnessControlDelegate(
- scoped_ptr<BrightnessControlDelegate> brightness_control_delegate) {
- // Install brightness control delegate only when internal
- // display exists.
- if (Shell::GetInstance()->display_manager()->HasInternalDisplay() ||
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshEnableBrightnessControl)) {
- brightness_control_delegate_ = brightness_control_delegate.Pass();
- }
-}
-
-void AcceleratorController::SetImeControlDelegate(
- scoped_ptr<ImeControlDelegate> ime_control_delegate) {
- ime_control_delegate_ = ime_control_delegate.Pass();
-}
-
-void AcceleratorController::SetScreenshotDelegate(
- scoped_ptr<ScreenshotDelegate> screenshot_delegate) {
- screenshot_delegate_ = screenshot_delegate.Pass();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AcceleratorController, ui::AcceleratorTarget implementation:
-
-bool AcceleratorController::AcceleratorPressed(
- const ui::Accelerator& accelerator) {
- std::map<ui::Accelerator, int>::const_iterator it =
- accelerators_.find(accelerator);
- DCHECK(it != accelerators_.end());
- return PerformAction(static_cast<AcceleratorAction>(it->second), accelerator);
-}
-
-void AcceleratorController::RegisterAccelerators(
- const AcceleratorData accelerators[],
- size_t accelerators_length) {
- for (size_t i = 0; i < accelerators_length; ++i) {
- ui::Accelerator accelerator(accelerators[i].keycode,
- accelerators[i].modifiers);
- accelerator.set_type(accelerators[i].trigger_on_press ?
- ui::ET_KEY_PRESSED : ui::ET_KEY_RELEASED);
- Register(accelerator, this);
- accelerators_.insert(
- std::make_pair(accelerator, accelerators[i].action));
- }
-}
-
-void AcceleratorController::SetKeyboardBrightnessControlDelegate(
- scoped_ptr<KeyboardBrightnessControlDelegate>
- keyboard_brightness_control_delegate) {
- keyboard_brightness_control_delegate_ =
- keyboard_brightness_control_delegate.Pass();
-}
-
-bool AcceleratorController::CanHandleAccelerators() const {
- return true;
-}
-
-} // namespace ash
diff --git a/chromium/ash/accelerators/accelerator_controller.h b/chromium/ash/accelerators/accelerator_controller.h
deleted file mode 100644
index 5689a419e5f..00000000000
--- a/chromium/ash/accelerators/accelerator_controller.h
+++ /dev/null
@@ -1,180 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_
-#define ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_
-
-#include <map>
-#include <set>
-
-#include "ash/accelerators/exit_warning_handler.h"
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/gtest_prod_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/base/accelerators/accelerator.h"
-
-namespace ui {
-class AcceleratorManager;
-}
-
-namespace ash {
-
-struct AcceleratorData;
-class BrightnessControlDelegate;
-class ExitWarningHandler;
-class ImeControlDelegate;
-class KeyboardBrightnessControlDelegate;
-class ScreenshotDelegate;
-class VolumeControlDelegate;
-
-// Stores information about accelerator context, eg. previous accelerator
-// or if the current accelerator is repeated or not.
-class ASH_EXPORT AcceleratorControllerContext {
- public:
- AcceleratorControllerContext();
- ~AcceleratorControllerContext() {}
-
- // Updates context - determines if the accelerator is repeated, as well as
- // event type of the previous accelerator.
- void UpdateContext(const ui::Accelerator& accelerator);
-
- const ui::Accelerator& previous_accelerator() const {
- return previous_accelerator_;
- }
- bool repeated() const {
- return current_accelerator_ == previous_accelerator_ &&
- current_accelerator_.type() != ui::ET_UNKNOWN;
- }
-
- private:
- ui::Accelerator current_accelerator_;
- // Used for NEXT_IME and DISABLE_CAPS_LOCK accelerator actions.
- ui::Accelerator previous_accelerator_;
-
- DISALLOW_COPY_AND_ASSIGN(AcceleratorControllerContext);
-};
-
-// AcceleratorController provides functions for registering or unregistering
-// global keyboard accelerators, which are handled earlier than any windows. It
-// also implements several handlers as an accelerator target.
-class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget {
- public:
- AcceleratorController();
- virtual ~AcceleratorController();
-
- // Registers a global keyboard accelerator for the specified target. If
- // multiple targets are registered for an accelerator, a target registered
- // later has higher priority.
- void Register(const ui::Accelerator& accelerator,
- ui::AcceleratorTarget* target);
-
- // Unregisters the specified keyboard accelerator for the specified target.
- void Unregister(const ui::Accelerator& accelerator,
- ui::AcceleratorTarget* target);
-
- // Unregisters all keyboard accelerators for the specified target.
- void UnregisterAll(ui::AcceleratorTarget* target);
-
- // Activates the target associated with the specified accelerator.
- // First, AcceleratorPressed handler of the most recently registered target
- // is called, and if that handler processes the event (i.e. returns true),
- // this method immediately returns. If not, we do the same thing on the next
- // target, and so on.
- // Returns true if an accelerator was activated.
- bool Process(const ui::Accelerator& accelerator);
-
- // Returns true if the |accelerator| is registered.
- bool IsRegistered(const ui::Accelerator& accelerator) const;
-
- // Returns true if the |accelerator| is one of the |reserved_actions_|.
- bool IsReservedAccelerator(const ui::Accelerator& accelerator) const;
-
- // Performs the specified action. The |accelerator| may provide additional
- // data the action needs. Returns whether an action was performed
- // successfully.
- bool PerformAction(int action,
- const ui::Accelerator& accelerator);
-
- // Overridden from ui::AcceleratorTarget:
- virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
- virtual bool CanHandleAccelerators() const OVERRIDE;
-
- void SetBrightnessControlDelegate(
- scoped_ptr<BrightnessControlDelegate> brightness_control_delegate);
- void SetImeControlDelegate(
- scoped_ptr<ImeControlDelegate> ime_control_delegate);
- void SetScreenshotDelegate(
- scoped_ptr<ScreenshotDelegate> screenshot_delegate);
- BrightnessControlDelegate* brightness_control_delegate() const {
- return brightness_control_delegate_.get();
- }
-
- // Provides access to an object holding contextual information.
- AcceleratorControllerContext* context() {
- return &context_;
- }
-
- // Provides access to the ExitWarningHandler for testing.
- ExitWarningHandler* GetExitWarningHandlerForTest() {
- return &exit_warning_handler_;
- }
-
- private:
- FRIEND_TEST_ALL_PREFIXES(AcceleratorControllerTest, GlobalAccelerators);
-
- // Initializes the accelerators this class handles as a target.
- void Init();
-
- // Registers the specified accelerators.
- void RegisterAccelerators(const AcceleratorData accelerators[],
- size_t accelerators_length);
-
- void SetKeyboardBrightnessControlDelegate(
- scoped_ptr<KeyboardBrightnessControlDelegate>
- keyboard_brightness_control_delegate);
-
- scoped_ptr<ui::AcceleratorManager> accelerator_manager_;
-
- // TODO(derat): BrightnessControlDelegate is also used by the system tray;
- // move it outside of this class.
- scoped_ptr<BrightnessControlDelegate> brightness_control_delegate_;
- scoped_ptr<ImeControlDelegate> ime_control_delegate_;
- scoped_ptr<KeyboardBrightnessControlDelegate>
- keyboard_brightness_control_delegate_;
- scoped_ptr<ScreenshotDelegate> screenshot_delegate_;
-
- // Contextual information, eg. if the current accelerator is repeated.
- AcceleratorControllerContext context_;
-
- // Handles the exit accelerator which requires a double press to exit and
- // shows a popup with an explanation.
- ExitWarningHandler exit_warning_handler_;
-
- // A map from accelerators to the AcceleratorAction values, which are used in
- // the implementation.
- std::map<ui::Accelerator, int> accelerators_;
-
- // Actions allowed when the user is not signed in.
- std::set<int> actions_allowed_at_login_screen_;
- // Actions allowed when the screen is locked.
- std::set<int> actions_allowed_at_lock_screen_;
- // Actions allowed when a modal window is up.
- std::set<int> actions_allowed_at_modal_window_;
- // Reserved actions. See accelerator_table.h for details.
- std::set<int> reserved_actions_;
- // Actions which will not be repeated while holding the accelerator key.
- std::set<int> nonrepeatable_actions_;
- // Actions allowed in app mode.
- std::set<int> actions_allowed_in_app_mode_;
- // Actions disallowed if there are no windows.
- std::set<int> actions_needing_window_;
-
- DISALLOW_COPY_AND_ASSIGN(AcceleratorController);
-};
-
-} // namespace ash
-
-#endif // ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_
diff --git a/chromium/ash/accelerators/accelerator_controller_unittest.cc b/chromium/ash/accelerators/accelerator_controller_unittest.cc
deleted file mode 100644
index 8569171ca45..00000000000
--- a/chromium/ash/accelerators/accelerator_controller_unittest.cc
+++ /dev/null
@@ -1,1392 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/accelerators/accelerator_controller.h"
-#include "ash/accelerators/accelerator_table.h"
-#include "ash/accessibility_delegate.h"
-#include "ash/ash_switches.h"
-#include "ash/caps_lock_delegate.h"
-#include "ash/display/display_manager.h"
-#include "ash/ime_control_delegate.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/brightness_control_delegate.h"
-#include "ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/display_manager_test_api.h"
-#include "ash/test/test_screenshot_delegate.h"
-#include "ash/test/test_shell_delegate.h"
-#include "ash/volume_control_delegate.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "base/command_line.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/events/event.h"
-
-#if defined(USE_X11)
-#include <X11/Xlib.h>
-#include "ui/events/test/events_test_utils_x11.h"
-#endif
-
-namespace ash {
-
-namespace {
-
-class TestTarget : public ui::AcceleratorTarget {
- public:
- TestTarget() : accelerator_pressed_count_(0) {}
- virtual ~TestTarget() {}
-
- int accelerator_pressed_count() const {
- return accelerator_pressed_count_;
- }
-
- void set_accelerator_pressed_count(int accelerator_pressed_count) {
- accelerator_pressed_count_ = accelerator_pressed_count;
- }
-
- // Overridden from ui::AcceleratorTarget:
- virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
- virtual bool CanHandleAccelerators() const OVERRIDE;
-
- private:
- int accelerator_pressed_count_;
-
- DISALLOW_COPY_AND_ASSIGN(TestTarget);
-};
-
-class ReleaseAccelerator : public ui::Accelerator {
- public:
- ReleaseAccelerator(ui::KeyboardCode keycode, int modifiers)
- : ui::Accelerator(keycode, modifiers) {
- set_type(ui::ET_KEY_RELEASED);
- }
-};
-
-class DummyVolumeControlDelegate : public VolumeControlDelegate {
- public:
- explicit DummyVolumeControlDelegate(bool consume)
- : consume_(consume),
- handle_volume_mute_count_(0),
- handle_volume_down_count_(0),
- handle_volume_up_count_(0) {
- }
- virtual ~DummyVolumeControlDelegate() {}
-
- virtual bool HandleVolumeMute(const ui::Accelerator& accelerator) OVERRIDE {
- ++handle_volume_mute_count_;
- last_accelerator_ = accelerator;
- return consume_;
- }
- virtual bool HandleVolumeDown(const ui::Accelerator& accelerator) OVERRIDE {
- ++handle_volume_down_count_;
- last_accelerator_ = accelerator;
- return consume_;
- }
- virtual bool HandleVolumeUp(const ui::Accelerator& accelerator) OVERRIDE {
- ++handle_volume_up_count_;
- last_accelerator_ = accelerator;
- return consume_;
- }
-
- int handle_volume_mute_count() const {
- return handle_volume_mute_count_;
- }
- int handle_volume_down_count() const {
- return handle_volume_down_count_;
- }
- int handle_volume_up_count() const {
- return handle_volume_up_count_;
- }
- const ui::Accelerator& last_accelerator() const {
- return last_accelerator_;
- }
-
- private:
- const bool consume_;
- int handle_volume_mute_count_;
- int handle_volume_down_count_;
- int handle_volume_up_count_;
- ui::Accelerator last_accelerator_;
-
- DISALLOW_COPY_AND_ASSIGN(DummyVolumeControlDelegate);
-};
-
-class DummyBrightnessControlDelegate : public BrightnessControlDelegate {
- public:
- explicit DummyBrightnessControlDelegate(bool consume)
- : consume_(consume),
- handle_brightness_down_count_(0),
- handle_brightness_up_count_(0) {
- }
- virtual ~DummyBrightnessControlDelegate() {}
-
- virtual bool HandleBrightnessDown(
- const ui::Accelerator& accelerator) OVERRIDE {
- ++handle_brightness_down_count_;
- last_accelerator_ = accelerator;
- return consume_;
- }
- virtual bool HandleBrightnessUp(const ui::Accelerator& accelerator) OVERRIDE {
- ++handle_brightness_up_count_;
- last_accelerator_ = accelerator;
- return consume_;
- }
- virtual void SetBrightnessPercent(double percent, bool gradual) OVERRIDE {}
- virtual void GetBrightnessPercent(
- const base::Callback<void(double)>& callback) OVERRIDE {
- callback.Run(100.0);
- }
-
- int handle_brightness_down_count() const {
- return handle_brightness_down_count_;
- }
- int handle_brightness_up_count() const {
- return handle_brightness_up_count_;
- }
- const ui::Accelerator& last_accelerator() const {
- return last_accelerator_;
- }
-
- private:
- const bool consume_;
- int handle_brightness_down_count_;
- int handle_brightness_up_count_;
- ui::Accelerator last_accelerator_;
-
- DISALLOW_COPY_AND_ASSIGN(DummyBrightnessControlDelegate);
-};
-
-class DummyImeControlDelegate : public ImeControlDelegate {
- public:
- explicit DummyImeControlDelegate(bool consume)
- : consume_(consume),
- handle_next_ime_count_(0),
- handle_previous_ime_count_(0),
- handle_switch_ime_count_(0) {
- }
- virtual ~DummyImeControlDelegate() {}
-
- virtual bool HandleNextIme() OVERRIDE {
- ++handle_next_ime_count_;
- return consume_;
- }
- virtual bool HandlePreviousIme(const ui::Accelerator& accelerator) OVERRIDE {
- ++handle_previous_ime_count_;
- last_accelerator_ = accelerator;
- return consume_;
- }
- virtual bool HandleSwitchIme(const ui::Accelerator& accelerator) OVERRIDE {
- ++handle_switch_ime_count_;
- last_accelerator_ = accelerator;
- return consume_;
- }
-
- int handle_next_ime_count() const {
- return handle_next_ime_count_;
- }
- int handle_previous_ime_count() const {
- return handle_previous_ime_count_;
- }
- int handle_switch_ime_count() const {
- return handle_switch_ime_count_;
- }
- const ui::Accelerator& last_accelerator() const {
- return last_accelerator_;
- }
- virtual ui::Accelerator RemapAccelerator(
- const ui::Accelerator& accelerator) OVERRIDE {
- return ui::Accelerator(accelerator);
- }
-
- private:
- const bool consume_;
- int handle_next_ime_count_;
- int handle_previous_ime_count_;
- int handle_switch_ime_count_;
- ui::Accelerator last_accelerator_;
-
- DISALLOW_COPY_AND_ASSIGN(DummyImeControlDelegate);
-};
-
-class DummyKeyboardBrightnessControlDelegate
- : public KeyboardBrightnessControlDelegate {
- public:
- explicit DummyKeyboardBrightnessControlDelegate(bool consume)
- : consume_(consume),
- handle_keyboard_brightness_down_count_(0),
- handle_keyboard_brightness_up_count_(0) {
- }
- virtual ~DummyKeyboardBrightnessControlDelegate() {}
-
- virtual bool HandleKeyboardBrightnessDown(
- const ui::Accelerator& accelerator) OVERRIDE {
- ++handle_keyboard_brightness_down_count_;
- last_accelerator_ = accelerator;
- return consume_;
- }
-
- virtual bool HandleKeyboardBrightnessUp(
- const ui::Accelerator& accelerator) OVERRIDE {
- ++handle_keyboard_brightness_up_count_;
- last_accelerator_ = accelerator;
- return consume_;
- }
-
- int handle_keyboard_brightness_down_count() const {
- return handle_keyboard_brightness_down_count_;
- }
-
- int handle_keyboard_brightness_up_count() const {
- return handle_keyboard_brightness_up_count_;
- }
-
- const ui::Accelerator& last_accelerator() const {
- return last_accelerator_;
- }
-
- private:
- const bool consume_;
- int handle_keyboard_brightness_down_count_;
- int handle_keyboard_brightness_up_count_;
- ui::Accelerator last_accelerator_;
-
- DISALLOW_COPY_AND_ASSIGN(DummyKeyboardBrightnessControlDelegate);
-};
-
-bool TestTarget::AcceleratorPressed(const ui::Accelerator& accelerator) {
- ++accelerator_pressed_count_;
- return true;
-}
-
-bool TestTarget::CanHandleAccelerators() const {
- return true;
-}
-
-} // namespace
-
-class AcceleratorControllerTest : public test::AshTestBase {
- public:
- AcceleratorControllerTest() {}
- virtual ~AcceleratorControllerTest() {}
-
- protected:
- void EnableInternalDisplay() {
- test::DisplayManagerTestApi(Shell::GetInstance()->display_manager()).
- SetFirstDisplayAsInternalDisplay();
- }
-
- static AcceleratorController* GetController();
- static bool ProcessWithContext(const ui::Accelerator& accelerator);
-
- // Several functions to access ExitWarningHandler (as friend).
- static void StubForTest(ExitWarningHandler* ewh) {
- ewh->stub_timer_for_test_ = true;
- }
- static void Reset(ExitWarningHandler* ewh) {
- ewh->state_ = ExitWarningHandler::IDLE;
- }
- static void SimulateTimerExpired(ExitWarningHandler* ewh) {
- ewh->TimerAction();
- }
- static bool is_ui_shown(ExitWarningHandler* ewh) {
- return !!ewh->widget_;
- }
- static bool is_idle(ExitWarningHandler* ewh) {
- return ewh->state_ == ExitWarningHandler::IDLE;
- }
- static bool is_exiting(ExitWarningHandler* ewh) {
- return ewh->state_ == ExitWarningHandler::EXITING;
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AcceleratorControllerTest);
-};
-
-AcceleratorController* AcceleratorControllerTest::GetController() {
- return Shell::GetInstance()->accelerator_controller();
-}
-
-bool AcceleratorControllerTest::ProcessWithContext(
- const ui::Accelerator& accelerator) {
- AcceleratorController* controller = GetController();
- controller->context()->UpdateContext(accelerator);
- return controller->Process(accelerator);
-}
-
-#if !defined(OS_WIN)
-// Double press of exit shortcut => exiting
-TEST_F(AcceleratorControllerTest, ExitWarningHandlerTestDoublePress) {
- ui::Accelerator press(ui::VKEY_Q, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN);
- ui::Accelerator release(press);
- release.set_type(ui::ET_KEY_RELEASED);
- ExitWarningHandler* ewh = GetController()->GetExitWarningHandlerForTest();
- ASSERT_TRUE(!!ewh);
- StubForTest(ewh);
- EXPECT_TRUE(is_idle(ewh));
- EXPECT_FALSE(is_ui_shown(ewh));
- EXPECT_TRUE(ProcessWithContext(press));
- EXPECT_FALSE(ProcessWithContext(release));
- EXPECT_FALSE(is_idle(ewh));
- EXPECT_TRUE(is_ui_shown(ewh));
- EXPECT_TRUE(ProcessWithContext(press)); // second press before timer.
- EXPECT_FALSE(ProcessWithContext(release));
- SimulateTimerExpired(ewh);
- EXPECT_TRUE(is_exiting(ewh));
- EXPECT_FALSE(is_ui_shown(ewh));
- Reset(ewh);
-}
-
-// Single press of exit shortcut before timer => idle
-TEST_F(AcceleratorControllerTest, ExitWarningHandlerTestSinglePress) {
- ui::Accelerator press(ui::VKEY_Q, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN);
- ui::Accelerator release(press);
- release.set_type(ui::ET_KEY_RELEASED);
- ExitWarningHandler* ewh = GetController()->GetExitWarningHandlerForTest();
- ASSERT_TRUE(!!ewh);
- StubForTest(ewh);
- EXPECT_TRUE(is_idle(ewh));
- EXPECT_FALSE(is_ui_shown(ewh));
- EXPECT_TRUE(ProcessWithContext(press));
- EXPECT_FALSE(ProcessWithContext(release));
- EXPECT_FALSE(is_idle(ewh));
- EXPECT_TRUE(is_ui_shown(ewh));
- SimulateTimerExpired(ewh);
- EXPECT_TRUE(is_idle(ewh));
- EXPECT_FALSE(is_ui_shown(ewh));
- Reset(ewh);
-}
-
-// Shutdown ash with exit warning bubble open should not crash.
-TEST_F(AcceleratorControllerTest, LingeringExitWarningBubble) {
- ExitWarningHandler* ewh = GetController()->GetExitWarningHandlerForTest();
- ASSERT_TRUE(!!ewh);
- StubForTest(ewh);
-
- // Trigger once to show the bubble.
- ewh->HandleAccelerator();
- EXPECT_FALSE(is_idle(ewh));
- EXPECT_TRUE(is_ui_shown(ewh));
-
- // Exit ash and there should be no crash
-}
-#endif // !defined(OS_WIN)
-
-TEST_F(AcceleratorControllerTest, Register) {
- const ui::Accelerator accelerator_a(ui::VKEY_A, ui::EF_NONE);
- TestTarget target;
- GetController()->Register(accelerator_a, &target);
-
- // The registered accelerator is processed.
- EXPECT_TRUE(ProcessWithContext(accelerator_a));
- EXPECT_EQ(1, target.accelerator_pressed_count());
-}
-
-TEST_F(AcceleratorControllerTest, RegisterMultipleTarget) {
- const ui::Accelerator accelerator_a(ui::VKEY_A, ui::EF_NONE);
- TestTarget target1;
- GetController()->Register(accelerator_a, &target1);
- TestTarget target2;
- GetController()->Register(accelerator_a, &target2);
-
- // If multiple targets are registered with the same accelerator, the target
- // registered later processes the accelerator.
- EXPECT_TRUE(ProcessWithContext(accelerator_a));
- EXPECT_EQ(0, target1.accelerator_pressed_count());
- EXPECT_EQ(1, target2.accelerator_pressed_count());
-}
-
-TEST_F(AcceleratorControllerTest, Unregister) {
- const ui::Accelerator accelerator_a(ui::VKEY_A, ui::EF_NONE);
- TestTarget target;
- GetController()->Register(accelerator_a, &target);
- const ui::Accelerator accelerator_b(ui::VKEY_B, ui::EF_NONE);
- GetController()->Register(accelerator_b, &target);
-
- // Unregistering a different accelerator does not affect the other
- // accelerator.
- GetController()->Unregister(accelerator_b, &target);
- EXPECT_TRUE(ProcessWithContext(accelerator_a));
- EXPECT_EQ(1, target.accelerator_pressed_count());
-
- // The unregistered accelerator is no longer processed.
- target.set_accelerator_pressed_count(0);
- GetController()->Unregister(accelerator_a, &target);
- EXPECT_FALSE(ProcessWithContext(accelerator_a));
- EXPECT_EQ(0, target.accelerator_pressed_count());
-}
-
-TEST_F(AcceleratorControllerTest, UnregisterAll) {
- const ui::Accelerator accelerator_a(ui::VKEY_A, ui::EF_NONE);
- TestTarget target1;
- GetController()->Register(accelerator_a, &target1);
- const ui::Accelerator accelerator_b(ui::VKEY_B, ui::EF_NONE);
- GetController()->Register(accelerator_b, &target1);
- const ui::Accelerator accelerator_c(ui::VKEY_C, ui::EF_NONE);
- TestTarget target2;
- GetController()->Register(accelerator_c, &target2);
- GetController()->UnregisterAll(&target1);
-
- // All the accelerators registered for |target1| are no longer processed.
- EXPECT_FALSE(ProcessWithContext(accelerator_a));
- EXPECT_FALSE(ProcessWithContext(accelerator_b));
- EXPECT_EQ(0, target1.accelerator_pressed_count());
-
- // UnregisterAll with a different target does not affect the other target.
- EXPECT_TRUE(ProcessWithContext(accelerator_c));
- EXPECT_EQ(1, target2.accelerator_pressed_count());
-}
-
-TEST_F(AcceleratorControllerTest, Process) {
- const ui::Accelerator accelerator_a(ui::VKEY_A, ui::EF_NONE);
- TestTarget target1;
- GetController()->Register(accelerator_a, &target1);
-
- // The registered accelerator is processed.
- EXPECT_TRUE(ProcessWithContext(accelerator_a));
- EXPECT_EQ(1, target1.accelerator_pressed_count());
-
- // The non-registered accelerator is not processed.
- const ui::Accelerator accelerator_b(ui::VKEY_B, ui::EF_NONE);
- EXPECT_FALSE(ProcessWithContext(accelerator_b));
-}
-
-TEST_F(AcceleratorControllerTest, IsRegistered) {
- const ui::Accelerator accelerator_a(ui::VKEY_A, ui::EF_NONE);
- const ui::Accelerator accelerator_shift_a(ui::VKEY_A, ui::EF_SHIFT_DOWN);
- TestTarget target;
- GetController()->Register(accelerator_a, &target);
- EXPECT_TRUE(GetController()->IsRegistered(accelerator_a));
- EXPECT_FALSE(GetController()->IsRegistered(accelerator_shift_a));
- GetController()->UnregisterAll(&target);
- EXPECT_FALSE(GetController()->IsRegistered(accelerator_a));
-}
-
-TEST_F(AcceleratorControllerTest, WindowSnap) {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kAshMultipleSnapWindowWidths);
-
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
- const ui::Accelerator dummy;
-
- wm::WindowState* window_state = wm::GetWindowState(window.get());
-
- window_state->Activate();
-
- {
- GetController()->PerformAction(WINDOW_SNAP_LEFT, dummy);
- gfx::Rect snap_left = window->bounds();
- GetController()->PerformAction(WINDOW_SNAP_LEFT, dummy);
- EXPECT_NE(window->bounds().ToString(), snap_left.ToString());
- GetController()->PerformAction(WINDOW_SNAP_LEFT, dummy);
- EXPECT_NE(window->bounds().ToString(), snap_left.ToString());
-
- // It should cycle back to the first snapped position.
- GetController()->PerformAction(WINDOW_SNAP_LEFT, dummy);
- EXPECT_EQ(window->bounds().ToString(), snap_left.ToString());
- }
- {
- GetController()->PerformAction(WINDOW_SNAP_RIGHT, dummy);
- gfx::Rect snap_right = window->bounds();
- GetController()->PerformAction(WINDOW_SNAP_RIGHT, dummy);
- EXPECT_NE(window->bounds().ToString(), snap_right.ToString());
- GetController()->PerformAction(WINDOW_SNAP_RIGHT, dummy);
- EXPECT_NE(window->bounds().ToString(), snap_right.ToString());
-
- // It should cycle back to the first snapped position.
- GetController()->PerformAction(WINDOW_SNAP_RIGHT, dummy);
- EXPECT_EQ(window->bounds().ToString(), snap_right.ToString());
- }
- {
- gfx::Rect normal_bounds = window_state->GetRestoreBoundsInParent();
-
- GetController()->PerformAction(TOGGLE_MAXIMIZED, dummy);
- EXPECT_TRUE(window_state->IsMaximized());
- EXPECT_NE(normal_bounds.ToString(), window->bounds().ToString());
-
- GetController()->PerformAction(TOGGLE_MAXIMIZED, dummy);
- EXPECT_FALSE(window_state->IsMaximized());
- // Window gets restored to its restore bounds since side-maximized state
- // is treated as a "maximized" state.
- EXPECT_EQ(normal_bounds.ToString(), window->bounds().ToString());
-
- GetController()->PerformAction(TOGGLE_MAXIMIZED, dummy);
- GetController()->PerformAction(WINDOW_SNAP_LEFT, dummy);
- EXPECT_FALSE(window_state->IsMaximized());
-
- GetController()->PerformAction(TOGGLE_MAXIMIZED, dummy);
- GetController()->PerformAction(WINDOW_SNAP_RIGHT, dummy);
- EXPECT_FALSE(window_state->IsMaximized());
-
- GetController()->PerformAction(TOGGLE_MAXIMIZED, dummy);
- EXPECT_TRUE(window_state->IsMaximized());
- GetController()->PerformAction(WINDOW_MINIMIZE, dummy);
- EXPECT_FALSE(window_state->IsMaximized());
- EXPECT_TRUE(window_state->IsMinimized());
- window_state->Restore();
- window_state->Activate();
- }
- {
- GetController()->PerformAction(WINDOW_MINIMIZE, dummy);
- EXPECT_TRUE(window_state->IsMinimized());
- }
-}
-
-TEST_F(AcceleratorControllerTest, CenterWindowAccelerator) {
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
- const ui::Accelerator dummy;
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- window_state->Activate();
-
- // Center the window using accelerator.
- GetController()->PerformAction(WINDOW_POSITION_CENTER, dummy);
- gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(window.get()).work_area();
- gfx::Rect bounds = window->GetBoundsInScreen();
- EXPECT_NEAR(bounds.x() - work_area.x(),
- work_area.right() - bounds.right(),
- 1);
- EXPECT_NEAR(bounds.y() - work_area.y(),
- work_area.bottom() - bounds.bottom(),
- 1);
-
- // Add the window to docked container and try to center it.
- window->SetBounds(gfx::Rect(0, 0, 20, 20));
- aura::Window* docked_container = Shell::GetContainer(
- window->GetRootWindow(), internal::kShellWindowId_DockedContainer);
- docked_container->AddChild(window.get());
- gfx::Rect docked_bounds = window->GetBoundsInScreen();
- GetController()->PerformAction(WINDOW_POSITION_CENTER, dummy);
- // It should not get centered and should remain docked.
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
- EXPECT_EQ(docked_bounds.ToString(), window->GetBoundsInScreen().ToString());
-}
-
-TEST_F(AcceleratorControllerTest, ControllerContext) {
- ui::Accelerator accelerator_a(ui::VKEY_A, ui::EF_NONE);
- ui::Accelerator accelerator_a2(ui::VKEY_A, ui::EF_NONE);
- ui::Accelerator accelerator_b(ui::VKEY_B, ui::EF_NONE);
-
- accelerator_a.set_type(ui::ET_KEY_PRESSED);
- accelerator_a2.set_type(ui::ET_KEY_RELEASED);
- accelerator_b.set_type(ui::ET_KEY_PRESSED);
-
- EXPECT_FALSE(GetController()->context()->repeated());
- EXPECT_EQ(ui::ET_UNKNOWN,
- GetController()->context()->previous_accelerator().type());
-
- GetController()->context()->UpdateContext(accelerator_a);
- EXPECT_FALSE(GetController()->context()->repeated());
- EXPECT_EQ(ui::ET_UNKNOWN,
- GetController()->context()->previous_accelerator().type());
-
- GetController()->context()->UpdateContext(accelerator_a2);
- EXPECT_FALSE(GetController()->context()->repeated());
- EXPECT_EQ(ui::ET_KEY_PRESSED,
- GetController()->context()->previous_accelerator().type());
-
- GetController()->context()->UpdateContext(accelerator_a2);
- EXPECT_TRUE(GetController()->context()->repeated());
- EXPECT_EQ(ui::ET_KEY_RELEASED,
- GetController()->context()->previous_accelerator().type());
-
- GetController()->context()->UpdateContext(accelerator_b);
- EXPECT_FALSE(GetController()->context()->repeated());
- EXPECT_EQ(ui::ET_KEY_RELEASED,
- GetController()->context()->previous_accelerator().type());
-}
-
-#if defined(OS_WIN) && defined(USE_AURA)
-// crbug.com/314674
-#define MAYBE_SuppressToggleMaximized DISABLED_SuppressToggleMaximized
-#else
-#define MAYBE_SuppressToggleMaximized SuppressToggleMaximized
-#endif
-
-TEST_F(AcceleratorControllerTest, MAYBE_SuppressToggleMaximized) {
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
- wm::ActivateWindow(window.get());
- const ui::Accelerator accelerator(ui::VKEY_A, ui::EF_NONE);
- const ui::Accelerator empty_accelerator;
-
- wm::WindowState* window_state = wm::GetWindowState(window.get());
-
- // Toggling not suppressed.
- GetController()->context()->UpdateContext(accelerator);
- GetController()->PerformAction(TOGGLE_MAXIMIZED, accelerator);
- EXPECT_TRUE(window_state->IsMaximized());
-
- // The same accelerator - toggling suppressed.
- GetController()->context()->UpdateContext(accelerator);
- GetController()->PerformAction(TOGGLE_MAXIMIZED, accelerator);
- EXPECT_TRUE(window_state->IsMaximized());
-
- // Suppressed but not for gesture events.
- GetController()->PerformAction(TOGGLE_MAXIMIZED, empty_accelerator);
- EXPECT_FALSE(window_state->IsMaximized());
-}
-
-#if defined(OS_WIN) && defined(USE_AURA)
-// crbug.com/317592
-#define MAYBE_ProcessOnce DISABLED_ProcessOnce
-#else
-#define MAYBE_ProcessOnce ProcessOnce
-#endif
-
-#if defined(OS_WIN) || defined(USE_X11)
-TEST_F(AcceleratorControllerTest, MAYBE_ProcessOnce) {
- ui::Accelerator accelerator_a(ui::VKEY_A, ui::EF_NONE);
- TestTarget target;
- GetController()->Register(accelerator_a, &target);
-
- // The accelerator is processed only once.
- aura::WindowEventDispatcher* dispatcher =
- Shell::GetPrimaryRootWindow()->GetDispatcher();
-#if defined(OS_WIN)
- MSG msg1 = { NULL, WM_KEYDOWN, ui::VKEY_A, 0 };
- ui::TranslatedKeyEvent key_event1(msg1, false);
- EXPECT_TRUE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(
- &key_event1));
-
- MSG msg2 = { NULL, WM_CHAR, L'A', 0 };
- ui::TranslatedKeyEvent key_event2(msg2, true);
- EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(
- &key_event2));
-
- MSG msg3 = { NULL, WM_KEYUP, ui::VKEY_A, 0 };
- ui::TranslatedKeyEvent key_event3(msg3, false);
- EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(
- &key_event3));
-#elif defined(USE_X11)
- ui::ScopedXI2Event key_event;
- key_event.InitKeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_A, 0);
- ui::TranslatedKeyEvent key_event1(key_event, false);
- EXPECT_TRUE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(
- &key_event1));
-
- ui::TranslatedKeyEvent key_event2(key_event, true);
- EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(
- &key_event2));
-
- key_event.InitKeyEvent(ui::ET_KEY_RELEASED, ui::VKEY_A, 0);
- ui::TranslatedKeyEvent key_event3(key_event, false);
- EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(
- &key_event3));
-#endif
- EXPECT_EQ(1, target.accelerator_pressed_count());
-}
-#endif
-
-TEST_F(AcceleratorControllerTest, GlobalAccelerators) {
- // CycleBackward
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_TAB, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN)));
- // CycleForward
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_TAB, ui::EF_ALT_DOWN)));
- // CycleLinear
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_NONE)));
-
-#if defined(OS_CHROMEOS)
- // Take screenshot / partial screenshot
- // True should always be returned regardless of the existence of the delegate.
- {
- test::TestScreenshotDelegate* delegate = GetScreenshotDelegate();
- delegate->set_can_take_screenshot(false);
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_CONTROL_DOWN)));
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_PRINT, ui::EF_NONE)));
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_MEDIA_LAUNCH_APP1,
- ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN)));
-
- delegate->set_can_take_screenshot(true);
- EXPECT_EQ(0, delegate->handle_take_screenshot_count());
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_CONTROL_DOWN)));
- EXPECT_EQ(1, delegate->handle_take_screenshot_count());
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_PRINT, ui::EF_NONE)));
- EXPECT_EQ(2, delegate->handle_take_screenshot_count());
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_MEDIA_LAUNCH_APP1,
- ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN)));
- EXPECT_EQ(2, delegate->handle_take_screenshot_count());
- }
-#endif
- // DisableCapsLock
- {
- CapsLockDelegate* delegate = Shell::GetInstance()->caps_lock_delegate();
- delegate->SetCapsLockEnabled(true);
- EXPECT_TRUE(delegate->IsCapsLockEnabled());
- // Handled only on key release.
- EXPECT_FALSE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_LSHIFT, ui::EF_NONE)));
- EXPECT_TRUE(delegate->IsCapsLockEnabled());
- EXPECT_TRUE(ProcessWithContext(
- ReleaseAccelerator(ui::VKEY_SHIFT, ui::EF_NONE)));
- EXPECT_FALSE(delegate->IsCapsLockEnabled());
- delegate->SetCapsLockEnabled(true);
- EXPECT_FALSE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_RSHIFT, ui::EF_NONE)));
- EXPECT_TRUE(delegate->IsCapsLockEnabled());
- EXPECT_TRUE(ProcessWithContext(
- ReleaseAccelerator(ui::VKEY_LSHIFT, ui::EF_NONE)));
- EXPECT_FALSE(delegate->IsCapsLockEnabled());
- delegate->SetCapsLockEnabled(true);
- EXPECT_FALSE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_SHIFT, ui::EF_NONE)));
- EXPECT_TRUE(delegate->IsCapsLockEnabled());
- EXPECT_TRUE(ProcessWithContext(
- ReleaseAccelerator(ui::VKEY_RSHIFT, ui::EF_NONE)));
- EXPECT_FALSE(delegate->IsCapsLockEnabled());
-
- // Do not handle when a shift pressed with other keys.
- delegate->SetCapsLockEnabled(true);
- EXPECT_FALSE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_A, ui::EF_SHIFT_DOWN)));
- EXPECT_TRUE(delegate->IsCapsLockEnabled());
- EXPECT_FALSE(ProcessWithContext(
- ReleaseAccelerator(ui::VKEY_A, ui::EF_SHIFT_DOWN)));
- EXPECT_TRUE(delegate->IsCapsLockEnabled());
-
- // Do not handle when a shift pressed with other keys, and shift is
- // released first.
- delegate->SetCapsLockEnabled(true);
- EXPECT_FALSE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_A, ui::EF_SHIFT_DOWN)));
- EXPECT_TRUE(delegate->IsCapsLockEnabled());
- EXPECT_FALSE(ProcessWithContext(
- ReleaseAccelerator(ui::VKEY_LSHIFT, ui::EF_NONE)));
- EXPECT_TRUE(delegate->IsCapsLockEnabled());
-
- EXPECT_FALSE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_A, ui::EF_SHIFT_DOWN)));
- EXPECT_TRUE(delegate->IsCapsLockEnabled());
- EXPECT_FALSE(ProcessWithContext(
- ReleaseAccelerator(ui::VKEY_SHIFT, ui::EF_NONE)));
- EXPECT_TRUE(delegate->IsCapsLockEnabled());
-
- EXPECT_FALSE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_A, ui::EF_SHIFT_DOWN)));
- EXPECT_TRUE(delegate->IsCapsLockEnabled());
- EXPECT_FALSE(ProcessWithContext(
- ReleaseAccelerator(ui::VKEY_RSHIFT, ui::EF_NONE)));
- EXPECT_TRUE(delegate->IsCapsLockEnabled());
-
- // Do not consume shift keyup when caps lock is off.
- delegate->SetCapsLockEnabled(false);
- EXPECT_FALSE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_LSHIFT, ui::EF_NONE)));
- EXPECT_FALSE(ProcessWithContext(
- ReleaseAccelerator(ui::VKEY_LSHIFT, ui::EF_NONE)));
- EXPECT_FALSE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_RSHIFT, ui::EF_NONE)));
- EXPECT_FALSE(ProcessWithContext(
- ReleaseAccelerator(ui::VKEY_RSHIFT, ui::EF_NONE)));
- EXPECT_FALSE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_SHIFT, ui::EF_NONE)));
- EXPECT_FALSE(ProcessWithContext(
- ReleaseAccelerator(ui::VKEY_SHIFT, ui::EF_NONE)));
- }
- // ToggleCapsLock
- {
- CapsLockDelegate* delegate = Shell::GetInstance()->caps_lock_delegate();
- delegate->SetCapsLockEnabled(true);
- EXPECT_TRUE(delegate->IsCapsLockEnabled());
- EXPECT_FALSE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_LWIN, ui::EF_ALT_DOWN)));
- EXPECT_TRUE(ProcessWithContext(
- ReleaseAccelerator(ui::VKEY_LWIN, ui::EF_ALT_DOWN)));
- EXPECT_FALSE(delegate->IsCapsLockEnabled());
- EXPECT_FALSE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_LWIN, ui::EF_ALT_DOWN)));
- EXPECT_TRUE(ProcessWithContext(
- ReleaseAccelerator(ui::VKEY_LWIN, ui::EF_ALT_DOWN)));
- EXPECT_TRUE(delegate->IsCapsLockEnabled());
- }
- const ui::Accelerator volume_mute(ui::VKEY_VOLUME_MUTE, ui::EF_NONE);
- const ui::Accelerator volume_down(ui::VKEY_VOLUME_DOWN, ui::EF_NONE);
- const ui::Accelerator volume_up(ui::VKEY_VOLUME_UP, ui::EF_NONE);
- {
- DummyVolumeControlDelegate* delegate =
- new DummyVolumeControlDelegate(false);
- ash::Shell::GetInstance()->system_tray_delegate()->SetVolumeControlDelegate(
- scoped_ptr<VolumeControlDelegate>(delegate).Pass());
- EXPECT_EQ(0, delegate->handle_volume_mute_count());
- EXPECT_FALSE(ProcessWithContext(volume_mute));
- EXPECT_EQ(1, delegate->handle_volume_mute_count());
- EXPECT_EQ(volume_mute, delegate->last_accelerator());
- EXPECT_EQ(0, delegate->handle_volume_down_count());
- EXPECT_FALSE(ProcessWithContext(volume_down));
- EXPECT_EQ(1, delegate->handle_volume_down_count());
- EXPECT_EQ(volume_down, delegate->last_accelerator());
- EXPECT_EQ(0, delegate->handle_volume_up_count());
- EXPECT_FALSE(ProcessWithContext(volume_up));
- EXPECT_EQ(1, delegate->handle_volume_up_count());
- EXPECT_EQ(volume_up, delegate->last_accelerator());
- }
- {
- DummyVolumeControlDelegate* delegate = new DummyVolumeControlDelegate(true);
- ash::Shell::GetInstance()->system_tray_delegate()->SetVolumeControlDelegate(
- scoped_ptr<VolumeControlDelegate>(delegate).Pass());
- EXPECT_EQ(0, delegate->handle_volume_mute_count());
- EXPECT_TRUE(ProcessWithContext(volume_mute));
- EXPECT_EQ(1, delegate->handle_volume_mute_count());
- EXPECT_EQ(volume_mute, delegate->last_accelerator());
- EXPECT_EQ(0, delegate->handle_volume_down_count());
- EXPECT_TRUE(ProcessWithContext(volume_down));
- EXPECT_EQ(1, delegate->handle_volume_down_count());
- EXPECT_EQ(volume_down, delegate->last_accelerator());
- EXPECT_EQ(0, delegate->handle_volume_up_count());
- EXPECT_TRUE(ProcessWithContext(volume_up));
- EXPECT_EQ(1, delegate->handle_volume_up_count());
- EXPECT_EQ(volume_up, delegate->last_accelerator());
- }
-#if defined(OS_CHROMEOS)
- // Brightness
- // ui::VKEY_BRIGHTNESS_DOWN/UP are not defined on Windows.
- const ui::Accelerator brightness_down(ui::VKEY_BRIGHTNESS_DOWN, ui::EF_NONE);
- const ui::Accelerator brightness_up(ui::VKEY_BRIGHTNESS_UP, ui::EF_NONE);
- {
- EXPECT_FALSE(ProcessWithContext(brightness_down));
- EXPECT_FALSE(ProcessWithContext(brightness_up));
- DummyBrightnessControlDelegate* delegate =
- new DummyBrightnessControlDelegate(true);
- GetController()->SetBrightnessControlDelegate(
- scoped_ptr<BrightnessControlDelegate>(delegate).Pass());
- EXPECT_FALSE(ProcessWithContext(brightness_down));
- EXPECT_FALSE(ProcessWithContext(brightness_up));
- }
- // Enable internal display.
- EnableInternalDisplay();
- {
- DummyBrightnessControlDelegate* delegate =
- new DummyBrightnessControlDelegate(false);
- GetController()->SetBrightnessControlDelegate(
- scoped_ptr<BrightnessControlDelegate>(delegate).Pass());
- EXPECT_EQ(0, delegate->handle_brightness_down_count());
- EXPECT_FALSE(ProcessWithContext(brightness_down));
- EXPECT_EQ(1, delegate->handle_brightness_down_count());
- EXPECT_EQ(brightness_down, delegate->last_accelerator());
- EXPECT_EQ(0, delegate->handle_brightness_up_count());
- EXPECT_FALSE(ProcessWithContext(brightness_up));
- EXPECT_EQ(1, delegate->handle_brightness_up_count());
- EXPECT_EQ(brightness_up, delegate->last_accelerator());
- }
- {
- DummyBrightnessControlDelegate* delegate =
- new DummyBrightnessControlDelegate(true);
- GetController()->SetBrightnessControlDelegate(
- scoped_ptr<BrightnessControlDelegate>(delegate).Pass());
- EXPECT_EQ(0, delegate->handle_brightness_down_count());
- EXPECT_TRUE(ProcessWithContext(brightness_down));
- EXPECT_EQ(1, delegate->handle_brightness_down_count());
- EXPECT_EQ(brightness_down, delegate->last_accelerator());
- EXPECT_EQ(0, delegate->handle_brightness_up_count());
- EXPECT_TRUE(ProcessWithContext(brightness_up));
- EXPECT_EQ(1, delegate->handle_brightness_up_count());
- EXPECT_EQ(brightness_up, delegate->last_accelerator());
- }
-
- // Keyboard brightness
- const ui::Accelerator alt_brightness_down(ui::VKEY_BRIGHTNESS_DOWN,
- ui::EF_ALT_DOWN);
- const ui::Accelerator alt_brightness_up(ui::VKEY_BRIGHTNESS_UP,
- ui::EF_ALT_DOWN);
- {
- EXPECT_TRUE(ProcessWithContext(alt_brightness_down));
- EXPECT_TRUE(ProcessWithContext(alt_brightness_up));
- DummyKeyboardBrightnessControlDelegate* delegate =
- new DummyKeyboardBrightnessControlDelegate(false);
- GetController()->SetKeyboardBrightnessControlDelegate(
- scoped_ptr<KeyboardBrightnessControlDelegate>(delegate).Pass());
- EXPECT_EQ(0, delegate->handle_keyboard_brightness_down_count());
- EXPECT_FALSE(ProcessWithContext(alt_brightness_down));
- EXPECT_EQ(1, delegate->handle_keyboard_brightness_down_count());
- EXPECT_EQ(alt_brightness_down, delegate->last_accelerator());
- EXPECT_EQ(0, delegate->handle_keyboard_brightness_up_count());
- EXPECT_FALSE(ProcessWithContext(alt_brightness_up));
- EXPECT_EQ(1, delegate->handle_keyboard_brightness_up_count());
- EXPECT_EQ(alt_brightness_up, delegate->last_accelerator());
- }
- {
- DummyKeyboardBrightnessControlDelegate* delegate =
- new DummyKeyboardBrightnessControlDelegate(true);
- GetController()->SetKeyboardBrightnessControlDelegate(
- scoped_ptr<KeyboardBrightnessControlDelegate>(delegate).Pass());
- EXPECT_EQ(0, delegate->handle_keyboard_brightness_down_count());
- EXPECT_TRUE(ProcessWithContext(alt_brightness_down));
- EXPECT_EQ(1, delegate->handle_keyboard_brightness_down_count());
- EXPECT_EQ(alt_brightness_down, delegate->last_accelerator());
- EXPECT_EQ(0, delegate->handle_keyboard_brightness_up_count());
- EXPECT_TRUE(ProcessWithContext(alt_brightness_up));
- EXPECT_EQ(1, delegate->handle_keyboard_brightness_up_count());
- EXPECT_EQ(alt_brightness_up, delegate->last_accelerator());
- }
-#endif
-
-#if !defined(NDEBUG)
- // ToggleDesktopBackgroundMode
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_B, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN)));
-#if !defined(OS_LINUX)
- // ToggleDesktopFullScreen (not implemented yet on Linux)
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_F11, ui::EF_CONTROL_DOWN)));
-#endif // OS_LINUX
-#endif // !NDEBUG
-
-#if !defined(OS_WIN)
- // Exit
- ExitWarningHandler* ewh = GetController()->GetExitWarningHandlerForTest();
- ASSERT_TRUE(!!ewh);
- StubForTest(ewh);
- EXPECT_TRUE(is_idle(ewh));
- EXPECT_FALSE(is_ui_shown(ewh));
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_Q, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN)));
- EXPECT_FALSE(is_idle(ewh));
- EXPECT_TRUE(is_ui_shown(ewh));
- SimulateTimerExpired(ewh);
- EXPECT_TRUE(is_idle(ewh));
- EXPECT_FALSE(is_ui_shown(ewh));
- Reset(ewh);
-#endif
-
- // New tab
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_T, ui::EF_CONTROL_DOWN)));
-
- // New incognito window
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_N, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN)));
-
- // New window
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_N, ui::EF_CONTROL_DOWN)));
-
- // Restore tab
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_T, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN)));
-
- // Show task manager
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN)));
-
-#if defined(OS_CHROMEOS)
- // Open file manager
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_M, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN)));
-
- // Lock screen
- // NOTE: Accelerators that do not work on the lock screen need to be
- // tested before the sequence below is invoked because it causes a side
- // effect of locking the screen.
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_L, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN)));
-#endif
-}
-
-TEST_F(AcceleratorControllerTest, GlobalAcceleratorsToggleAppList) {
- AccessibilityDelegate* delegate =
- ash::Shell::GetInstance()->accessibility_delegate();
- EXPECT_FALSE(ash::Shell::GetInstance()->GetAppListTargetVisibility());
-
- // The press event should not open the AppList, the release should instead.
- EXPECT_FALSE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_LWIN, ui::EF_NONE)));
- EXPECT_TRUE(ProcessWithContext(
- ReleaseAccelerator(ui::VKEY_LWIN, ui::EF_NONE)));
- EXPECT_TRUE(ash::Shell::GetInstance()->GetAppListTargetVisibility());
-
- // When spoken feedback is on, the AppList should not toggle.
- delegate->ToggleSpokenFeedback(A11Y_NOTIFICATION_NONE);
- EXPECT_FALSE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_LWIN, ui::EF_NONE)));
- EXPECT_FALSE(ProcessWithContext(
- ReleaseAccelerator(ui::VKEY_LWIN, ui::EF_NONE)));
- delegate->ToggleSpokenFeedback(A11Y_NOTIFICATION_NONE);
- EXPECT_TRUE(ash::Shell::GetInstance()->GetAppListTargetVisibility());
-
- EXPECT_FALSE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_LWIN, ui::EF_NONE)));
- EXPECT_TRUE(ProcessWithContext(
- ReleaseAccelerator(ui::VKEY_LWIN, ui::EF_NONE)));
- EXPECT_FALSE(ash::Shell::GetInstance()->GetAppListTargetVisibility());
-
- // When spoken feedback is on, the AppList should not toggle.
- delegate->ToggleSpokenFeedback(A11Y_NOTIFICATION_NONE);
- EXPECT_FALSE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_LWIN, ui::EF_NONE)));
- EXPECT_FALSE(ProcessWithContext(
- ReleaseAccelerator(ui::VKEY_LWIN, ui::EF_NONE)));
- delegate->ToggleSpokenFeedback(A11Y_NOTIFICATION_NONE);
- EXPECT_FALSE(ash::Shell::GetInstance()->GetAppListTargetVisibility());
-}
-
-TEST_F(AcceleratorControllerTest, ImeGlobalAccelerators) {
- // Test IME shortcuts.
- {
- const ui::Accelerator control_space(ui::VKEY_SPACE, ui::EF_CONTROL_DOWN);
- const ui::Accelerator convert(ui::VKEY_CONVERT, ui::EF_NONE);
- const ui::Accelerator non_convert(ui::VKEY_NONCONVERT, ui::EF_NONE);
- const ui::Accelerator wide_half_1(ui::VKEY_DBE_SBCSCHAR, ui::EF_NONE);
- const ui::Accelerator wide_half_2(ui::VKEY_DBE_DBCSCHAR, ui::EF_NONE);
- const ui::Accelerator hangul(ui::VKEY_HANGUL, ui::EF_NONE);
- EXPECT_FALSE(ProcessWithContext(control_space));
- EXPECT_FALSE(ProcessWithContext(convert));
- EXPECT_FALSE(ProcessWithContext(non_convert));
- EXPECT_FALSE(ProcessWithContext(wide_half_1));
- EXPECT_FALSE(ProcessWithContext(wide_half_2));
- EXPECT_FALSE(ProcessWithContext(hangul));
- DummyImeControlDelegate* delegate = new DummyImeControlDelegate(true);
- GetController()->SetImeControlDelegate(
- scoped_ptr<ImeControlDelegate>(delegate).Pass());
- EXPECT_EQ(0, delegate->handle_previous_ime_count());
- EXPECT_TRUE(ProcessWithContext(control_space));
- EXPECT_EQ(1, delegate->handle_previous_ime_count());
- EXPECT_EQ(0, delegate->handle_switch_ime_count());
- EXPECT_TRUE(ProcessWithContext(convert));
- EXPECT_EQ(1, delegate->handle_switch_ime_count());
- EXPECT_TRUE(ProcessWithContext(non_convert));
- EXPECT_EQ(2, delegate->handle_switch_ime_count());
- EXPECT_TRUE(ProcessWithContext(wide_half_1));
- EXPECT_EQ(3, delegate->handle_switch_ime_count());
- EXPECT_TRUE(ProcessWithContext(wide_half_2));
- EXPECT_EQ(4, delegate->handle_switch_ime_count());
- EXPECT_TRUE(ProcessWithContext(hangul));
- EXPECT_EQ(5, delegate->handle_switch_ime_count());
- }
-
- // Test IME shortcuts that are triggered on key release.
- {
- const ui::Accelerator shift_alt_press(ui::VKEY_MENU,
- ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN);
- const ReleaseAccelerator shift_alt(ui::VKEY_MENU, ui::EF_SHIFT_DOWN);
- const ui::Accelerator alt_shift_press(ui::VKEY_SHIFT,
- ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN);
- const ReleaseAccelerator alt_shift(ui::VKEY_SHIFT, ui::EF_ALT_DOWN);
-
- DummyImeControlDelegate* delegate = new DummyImeControlDelegate(true);
- GetController()->SetImeControlDelegate(
- scoped_ptr<ImeControlDelegate>(delegate).Pass());
- EXPECT_EQ(0, delegate->handle_next_ime_count());
- EXPECT_FALSE(ProcessWithContext(shift_alt_press));
- EXPECT_TRUE(ProcessWithContext(shift_alt));
- EXPECT_EQ(1, delegate->handle_next_ime_count());
- EXPECT_FALSE(ProcessWithContext(alt_shift_press));
- EXPECT_TRUE(ProcessWithContext(alt_shift));
- EXPECT_EQ(2, delegate->handle_next_ime_count());
-
- // We should NOT switch IME when e.g. Shift+Alt+X is pressed and X is
- // released.
- const ui::Accelerator shift_alt_x_press(
- ui::VKEY_X,
- ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN);
- const ReleaseAccelerator shift_alt_x(ui::VKEY_X,
- ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN);
-
- EXPECT_FALSE(ProcessWithContext(shift_alt_press));
- EXPECT_FALSE(ProcessWithContext(shift_alt_x_press));
- EXPECT_FALSE(ProcessWithContext(shift_alt_x));
- EXPECT_FALSE(ProcessWithContext(shift_alt));
- EXPECT_EQ(2, delegate->handle_next_ime_count());
-
- // But we _should_ if X is either VKEY_RETURN or VKEY_SPACE.
- // TODO(nona|mazda): Remove this when crbug.com/139556 in a better way.
- const ui::Accelerator shift_alt_return_press(
- ui::VKEY_RETURN,
- ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN);
- const ReleaseAccelerator shift_alt_return(
- ui::VKEY_RETURN,
- ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN);
-
- EXPECT_FALSE(ProcessWithContext(shift_alt_press));
- EXPECT_FALSE(ProcessWithContext(shift_alt_return_press));
- EXPECT_FALSE(ProcessWithContext(shift_alt_return));
- EXPECT_TRUE(ProcessWithContext(shift_alt));
- EXPECT_EQ(3, delegate->handle_next_ime_count());
-
- const ui::Accelerator shift_alt_space_press(
- ui::VKEY_SPACE,
- ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN);
- const ReleaseAccelerator shift_alt_space(
- ui::VKEY_SPACE,
- ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN);
-
- EXPECT_FALSE(ProcessWithContext(shift_alt_press));
- EXPECT_FALSE(ProcessWithContext(shift_alt_space_press));
- EXPECT_FALSE(ProcessWithContext(shift_alt_space));
- EXPECT_TRUE(ProcessWithContext(shift_alt));
- EXPECT_EQ(4, delegate->handle_next_ime_count());
- }
-
-#if defined(OS_CHROMEOS)
- // Test IME shortcuts again with unnormalized accelerators (Chrome OS only).
- {
- const ui::Accelerator shift_alt_press(ui::VKEY_MENU, ui::EF_SHIFT_DOWN);
- const ReleaseAccelerator shift_alt(ui::VKEY_MENU, ui::EF_SHIFT_DOWN);
- const ui::Accelerator alt_shift_press(ui::VKEY_SHIFT, ui::EF_ALT_DOWN);
- const ReleaseAccelerator alt_shift(ui::VKEY_SHIFT, ui::EF_ALT_DOWN);
-
- DummyImeControlDelegate* delegate = new DummyImeControlDelegate(true);
- GetController()->SetImeControlDelegate(
- scoped_ptr<ImeControlDelegate>(delegate).Pass());
- EXPECT_EQ(0, delegate->handle_next_ime_count());
- EXPECT_FALSE(ProcessWithContext(shift_alt_press));
- EXPECT_TRUE(ProcessWithContext(shift_alt));
- EXPECT_EQ(1, delegate->handle_next_ime_count());
- EXPECT_FALSE(ProcessWithContext(alt_shift_press));
- EXPECT_TRUE(ProcessWithContext(alt_shift));
- EXPECT_EQ(2, delegate->handle_next_ime_count());
-
- // We should NOT switch IME when e.g. Shift+Alt+X is pressed and X is
- // released.
- const ui::Accelerator shift_alt_x_press(
- ui::VKEY_X,
- ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN);
- const ReleaseAccelerator shift_alt_x(ui::VKEY_X,
- ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN);
-
- EXPECT_FALSE(ProcessWithContext(shift_alt_press));
- EXPECT_FALSE(ProcessWithContext(shift_alt_x_press));
- EXPECT_FALSE(ProcessWithContext(shift_alt_x));
- EXPECT_FALSE(ProcessWithContext(shift_alt));
- EXPECT_EQ(2, delegate->handle_next_ime_count());
- }
-#endif
-}
-
-// TODO(nona|mazda): Remove this when crbug.com/139556 in a better way.
-TEST_F(AcceleratorControllerTest, ImeGlobalAcceleratorsWorkaround139556) {
- // The workaround for crbug.com/139556 depends on the fact that we don't
- // use Shift+Alt+Enter/Space with ET_KEY_PRESSED as an accelerator. Test it.
- const ui::Accelerator shift_alt_return_press(
- ui::VKEY_RETURN,
- ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN);
- EXPECT_FALSE(ProcessWithContext(shift_alt_return_press));
- const ui::Accelerator shift_alt_space_press(
- ui::VKEY_SPACE,
- ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN);
- EXPECT_FALSE(ProcessWithContext(shift_alt_space_press));
-}
-
-TEST_F(AcceleratorControllerTest, ReservedAccelerators) {
- // (Shift+)Alt+Tab and Chrome OS top-row keys are reserved.
- EXPECT_TRUE(GetController()->IsReservedAccelerator(
- ui::Accelerator(ui::VKEY_TAB, ui::EF_ALT_DOWN)));
- EXPECT_TRUE(GetController()->IsReservedAccelerator(
- ui::Accelerator(ui::VKEY_TAB, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN)));
-#if defined(OS_CHROMEOS)
- EXPECT_TRUE(GetController()->IsReservedAccelerator(
- ui::Accelerator(ui::VKEY_POWER, ui::EF_NONE)));
-#endif
- // Others are not reserved.
- EXPECT_FALSE(GetController()->IsReservedAccelerator(
- ui::Accelerator(ui::VKEY_PRINT, ui::EF_NONE)));
- EXPECT_FALSE(GetController()->IsReservedAccelerator(
- ui::Accelerator(ui::VKEY_TAB, ui::EF_NONE)));
- EXPECT_FALSE(GetController()->IsReservedAccelerator(
- ui::Accelerator(ui::VKEY_A, ui::EF_NONE)));
-}
-
-#if defined(OS_CHROMEOS)
-TEST_F(AcceleratorControllerTest, DisallowedAtModalWindow) {
- std::set<AcceleratorAction> all_actions;
- for (size_t i = 0 ; i < kAcceleratorDataLength; ++i)
- all_actions.insert(kAcceleratorData[i].action);
-#if !defined(NDEBUG)
- std::set<AcceleratorAction> all_desktop_actions;
- for (size_t i = 0 ; i < kDesktopAcceleratorDataLength; ++i)
- all_desktop_actions.insert(kDesktopAcceleratorData[i].action);
-#endif
-
- std::set<AcceleratorAction> actionsAllowedAtModalWindow;
- for (size_t k = 0 ; k < kActionsAllowedAtModalWindowLength; ++k)
- actionsAllowedAtModalWindow.insert(kActionsAllowedAtModalWindow[k]);
- for (std::set<AcceleratorAction>::const_iterator it =
- actionsAllowedAtModalWindow.begin();
- it != actionsAllowedAtModalWindow.end(); ++it) {
- EXPECT_TRUE(all_actions.find(*it) != all_actions.end()
-
-#if !defined(NDEBUG)
- || all_desktop_actions.find(*it) != all_desktop_actions.end()
-#endif
- )
- << " action from kActionsAllowedAtModalWindow"
- << " not found in kAcceleratorData or kDesktopAcceleratorData. "
- << "action: " << *it;
- }
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
- const ui::Accelerator dummy;
- wm::ActivateWindow(window.get());
- Shell::GetInstance()->SimulateModalWindowOpenForTesting(true);
- for (std::set<AcceleratorAction>::const_iterator it = all_actions.begin();
- it != all_actions.end(); ++it) {
- if (actionsAllowedAtModalWindow.find(*it) ==
- actionsAllowedAtModalWindow.end()) {
- EXPECT_TRUE(GetController()->PerformAction(*it, dummy))
- << " for action (disallowed at modal window): " << *it;
- }
- }
- // Testing of top row (F5-F10) accelerators that should still work
- // when a modal window is open
- //
- // Screenshot
- {
- test::TestScreenshotDelegate* delegate = GetScreenshotDelegate();
- delegate->set_can_take_screenshot(false);
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_CONTROL_DOWN)));
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_PRINT, ui::EF_NONE)));
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_MEDIA_LAUNCH_APP1,
- ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN)));
- delegate->set_can_take_screenshot(true);
- EXPECT_EQ(0, delegate->handle_take_screenshot_count());
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_CONTROL_DOWN)));
- EXPECT_EQ(1, delegate->handle_take_screenshot_count());
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_PRINT, ui::EF_NONE)));
- EXPECT_EQ(2, delegate->handle_take_screenshot_count());
- EXPECT_TRUE(ProcessWithContext(
- ui::Accelerator(ui::VKEY_MEDIA_LAUNCH_APP1,
- ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN)));
- EXPECT_EQ(2, delegate->handle_take_screenshot_count());
- }
- // Brightness
- const ui::Accelerator brightness_down(ui::VKEY_BRIGHTNESS_DOWN, ui::EF_NONE);
- const ui::Accelerator brightness_up(ui::VKEY_BRIGHTNESS_UP, ui::EF_NONE);
- {
- EXPECT_FALSE(ProcessWithContext(brightness_down));
- EXPECT_FALSE(ProcessWithContext(brightness_up));
- DummyBrightnessControlDelegate* delegate =
- new DummyBrightnessControlDelegate(true);
- GetController()->SetBrightnessControlDelegate(
- scoped_ptr<BrightnessControlDelegate>(delegate).Pass());
- EXPECT_FALSE(ProcessWithContext(brightness_down));
- EXPECT_FALSE(ProcessWithContext(brightness_up));
- }
- EnableInternalDisplay();
- {
- EXPECT_FALSE(ProcessWithContext(brightness_down));
- EXPECT_FALSE(ProcessWithContext(brightness_up));
- DummyBrightnessControlDelegate* delegate =
- new DummyBrightnessControlDelegate(false);
- GetController()->SetBrightnessControlDelegate(
- scoped_ptr<BrightnessControlDelegate>(delegate).Pass());
- EXPECT_EQ(0, delegate->handle_brightness_down_count());
- EXPECT_FALSE(ProcessWithContext(brightness_down));
- EXPECT_EQ(1, delegate->handle_brightness_down_count());
- EXPECT_EQ(brightness_down, delegate->last_accelerator());
- EXPECT_EQ(0, delegate->handle_brightness_up_count());
- EXPECT_FALSE(ProcessWithContext(brightness_up));
- EXPECT_EQ(1, delegate->handle_brightness_up_count());
- EXPECT_EQ(brightness_up, delegate->last_accelerator());
- }
- {
- DummyBrightnessControlDelegate* delegate =
- new DummyBrightnessControlDelegate(true);
- GetController()->SetBrightnessControlDelegate(
- scoped_ptr<BrightnessControlDelegate>(delegate).Pass());
- EXPECT_EQ(0, delegate->handle_brightness_down_count());
- EXPECT_TRUE(ProcessWithContext(brightness_down));
- EXPECT_EQ(1, delegate->handle_brightness_down_count());
- EXPECT_EQ(brightness_down, delegate->last_accelerator());
- EXPECT_EQ(0, delegate->handle_brightness_up_count());
- EXPECT_TRUE(ProcessWithContext(brightness_up));
- EXPECT_EQ(1, delegate->handle_brightness_up_count());
- EXPECT_EQ(brightness_up, delegate->last_accelerator());
- }
- // Volume
- const ui::Accelerator volume_mute(ui::VKEY_VOLUME_MUTE, ui::EF_NONE);
- const ui::Accelerator volume_down(ui::VKEY_VOLUME_DOWN, ui::EF_NONE);
- const ui::Accelerator volume_up(ui::VKEY_VOLUME_UP, ui::EF_NONE);
- {
- EXPECT_TRUE(ProcessWithContext(volume_mute));
- EXPECT_TRUE(ProcessWithContext(volume_down));
- EXPECT_TRUE(ProcessWithContext(volume_up));
- DummyVolumeControlDelegate* delegate =
- new DummyVolumeControlDelegate(false);
- ash::Shell::GetInstance()->system_tray_delegate()->SetVolumeControlDelegate(
- scoped_ptr<VolumeControlDelegate>(delegate).Pass());
- EXPECT_EQ(0, delegate->handle_volume_mute_count());
- EXPECT_FALSE(ProcessWithContext(volume_mute));
- EXPECT_EQ(1, delegate->handle_volume_mute_count());
- EXPECT_EQ(volume_mute, delegate->last_accelerator());
- EXPECT_EQ(0, delegate->handle_volume_down_count());
- EXPECT_FALSE(ProcessWithContext(volume_down));
- EXPECT_EQ(1, delegate->handle_volume_down_count());
- EXPECT_EQ(volume_down, delegate->last_accelerator());
- EXPECT_EQ(0, delegate->handle_volume_up_count());
- EXPECT_FALSE(ProcessWithContext(volume_up));
- EXPECT_EQ(1, delegate->handle_volume_up_count());
- EXPECT_EQ(volume_up, delegate->last_accelerator());
- }
- {
- DummyVolumeControlDelegate* delegate = new DummyVolumeControlDelegate(true);
- ash::Shell::GetInstance()->system_tray_delegate()->SetVolumeControlDelegate(
- scoped_ptr<VolumeControlDelegate>(delegate).Pass());
- EXPECT_EQ(0, delegate->handle_volume_mute_count());
- EXPECT_TRUE(ProcessWithContext(volume_mute));
- EXPECT_EQ(1, delegate->handle_volume_mute_count());
- EXPECT_EQ(volume_mute, delegate->last_accelerator());
- EXPECT_EQ(0, delegate->handle_volume_down_count());
- EXPECT_TRUE(ProcessWithContext(volume_down));
- EXPECT_EQ(1, delegate->handle_volume_down_count());
- EXPECT_EQ(volume_down, delegate->last_accelerator());
- EXPECT_EQ(0, delegate->handle_volume_up_count());
- EXPECT_TRUE(ProcessWithContext(volume_up));
- EXPECT_EQ(1, delegate->handle_volume_up_count());
- EXPECT_EQ(volume_up, delegate->last_accelerator());
- }
-}
-#endif
-
-TEST_F(AcceleratorControllerTest, DisallowedWithNoWindow) {
- const ui::Accelerator dummy;
- AccessibilityDelegate* delegate =
- ash::Shell::GetInstance()->accessibility_delegate();
-
- for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) {
- delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE);
- EXPECT_TRUE(
- GetController()->PerformAction(kActionsNeedingWindow[i], dummy));
- EXPECT_EQ(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_WINDOW_NEEDED);
- }
-
- // Make sure we don't alert if we do have a window.
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
- wm::ActivateWindow(window.get());
- for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) {
- delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE);
- GetController()->PerformAction(kActionsNeedingWindow[i], dummy);
- EXPECT_EQ(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_NONE);
- }
-
- // Don't alert if we have a minimized window either.
- GetController()->PerformAction(WINDOW_MINIMIZE, dummy);
- for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) {
- delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE);
- GetController()->PerformAction(kActionsNeedingWindow[i], dummy);
- EXPECT_EQ(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_NONE);
- }
-}
-
-} // namespace ash
diff --git a/chromium/ash/accelerators/accelerator_dispatcher.cc b/chromium/ash/accelerators/accelerator_dispatcher.cc
deleted file mode 100644
index 23bae22703a..00000000000
--- a/chromium/ash/accelerators/accelerator_dispatcher.cc
+++ /dev/null
@@ -1,139 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/accelerators/accelerator_dispatcher.h"
-
-#if defined(USE_X11)
-#include <X11/Xlib.h>
-
-// Xlib defines RootWindow
-#ifdef RootWindow
-#undef RootWindow
-#endif
-#endif // defined(USE_X11)
-
-#include "ash/accelerators/accelerator_controller.h"
-#include "ash/shell.h"
-#include "ash/wm/event_rewriter_event_filter.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/base/accelerators/accelerator.h"
-#include "ui/events/event.h"
-#include "ui/events/event_constants.h"
-#include "ui/events/event_utils.h"
-#include "ui/views/controls/menu/menu_controller.h"
-
-namespace ash {
-namespace {
-
-const int kModifierMask = (ui::EF_SHIFT_DOWN |
- ui::EF_CONTROL_DOWN |
- ui::EF_ALT_DOWN);
-#if defined(OS_WIN)
-bool IsKeyEvent(const MSG& msg) {
- return
- msg.message == WM_KEYDOWN || msg.message == WM_SYSKEYDOWN ||
- msg.message == WM_KEYUP || msg.message == WM_SYSKEYUP;
-}
-#elif defined(USE_X11)
-bool IsKeyEvent(const XEvent* xev) {
- return xev->type == KeyPress || xev->type == KeyRelease;
-}
-#elif defined(USE_OZONE)
-bool IsKeyEvent(const base::NativeEvent& native_event) {
- const ui::KeyEvent* event = static_cast<const ui::KeyEvent*>(native_event);
- return event->IsKeyEvent();
-}
-#endif
-
-bool IsPossibleAcceleratorNotForMenu(const ui::KeyEvent& key_event) {
- // For shortcuts generated by Ctrl or Alt plus a letter, number or
- // the tab key, we want to exit the context menu first and then
- // repost the event. That allows for the shortcut execution after
- // the context menu has exited.
- if (key_event.type() == ui::ET_KEY_PRESSED &&
- (key_event.flags() & (ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN))) {
- const ui::KeyboardCode key_code = key_event.key_code();
- if ((key_code >= ui::VKEY_A && key_code <= ui::VKEY_Z) ||
- (key_code >= ui::VKEY_0 && key_code <= ui::VKEY_9) ||
- (key_code == ui::VKEY_TAB)) {
- return true;
- }
- }
- return false;
-}
-
-} // namespace
-
-AcceleratorDispatcher::AcceleratorDispatcher(
- base::MessageLoop::Dispatcher* nested_dispatcher,
- aura::Window* associated_window)
- : nested_dispatcher_(nested_dispatcher),
- associated_window_(associated_window) {
- DCHECK(nested_dispatcher_);
- associated_window_->AddObserver(this);
-}
-
-AcceleratorDispatcher::~AcceleratorDispatcher() {
- if (associated_window_)
- associated_window_->RemoveObserver(this);
-}
-
-void AcceleratorDispatcher::OnWindowDestroying(aura::Window* window) {
- if (associated_window_ == window)
- associated_window_ = NULL;
-}
-
-bool AcceleratorDispatcher::Dispatch(const base::NativeEvent& event) {
- if (!associated_window_)
- return false;
- if (!ui::IsNoopEvent(event) && !associated_window_->CanReceiveEvents())
- return aura::Env::GetInstance()->GetDispatcher()->Dispatch(event);
-
- if (IsKeyEvent(event)) {
- // Modifiers can be changed by the user preference, so we need to rewrite
- // the event explicitly.
- ui::KeyEvent key_event(event, false);
- ui::EventHandler* event_rewriter =
- ash::Shell::GetInstance()->event_rewriter_filter();
- DCHECK(event_rewriter);
- event_rewriter->OnKeyEvent(&key_event);
- if (key_event.stopped_propagation())
- return true;
-
- if (IsPossibleAcceleratorNotForMenu(key_event)) {
- if (views::MenuController* menu_controller =
- views::MenuController::GetActiveInstance()) {
- menu_controller->CancelAll();
-#if defined(USE_X11)
- XPutBackEvent(event->xany.display, event);
-#else
- NOTIMPLEMENTED() << " Repost NativeEvent here.";
-#endif
- return false;
- }
- }
-
- ash::AcceleratorController* accelerator_controller =
- ash::Shell::GetInstance()->accelerator_controller();
- if (accelerator_controller) {
- ui::Accelerator accelerator(key_event.key_code(),
- key_event.flags() & kModifierMask);
- if (key_event.type() == ui::ET_KEY_RELEASED)
- accelerator.set_type(ui::ET_KEY_RELEASED);
- // Fill out context object so AcceleratorController will know what
- // was the previous accelerator or if the current accelerator is repeated.
- Shell::GetInstance()->accelerator_controller()->context()->
- UpdateContext(accelerator);
- if (accelerator_controller->Process(accelerator))
- return true;
- }
-
- return nested_dispatcher_->Dispatch(key_event.native_event());
- }
-
- return nested_dispatcher_->Dispatch(event);
-}
-
-} // namespace ash
diff --git a/chromium/ash/accelerators/accelerator_dispatcher.h b/chromium/ash/accelerators/accelerator_dispatcher.h
deleted file mode 100644
index c0dfb03a0d4..00000000000
--- a/chromium/ash/accelerators/accelerator_dispatcher.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_
-#define ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_
-
-#include "ash/ash_export.h"
-#include "base/message_loop/message_loop.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_observer.h"
-
-namespace ash {
-
-// Dispatcher for handling accelerators from menu.
-//
-// Wraps a nested dispatcher to which control is passed if no accelerator key
-// has been pressed.
-// TODO(pkotwicz): Port AcceleratorDispatcher to mac.
-// TODO(pkotwicz): Add support for a |nested_dispatcher| which sends
-// events to a system IME.
-class ASH_EXPORT AcceleratorDispatcher : public base::MessageLoop::Dispatcher,
- public aura::WindowObserver {
- public:
- AcceleratorDispatcher(base::MessageLoop::Dispatcher* nested_dispatcher,
- aura::Window* associated_window);
- virtual ~AcceleratorDispatcher();
-
- // MessageLoop::Dispatcher overrides:
- virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
-
- // aura::WindowObserver overrides:
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
-
- private:
- base::MessageLoop::Dispatcher* nested_dispatcher_;
-
- // Window associated with |nested_dispatcher_| which is used to determine
- // whether the |nested_dispatcher_| is allowed to receive events.
- aura::Window* associated_window_;
-
- DISALLOW_COPY_AND_ASSIGN(AcceleratorDispatcher);
-};
-
-} // namespace ash
-
-#endif // ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_
diff --git a/chromium/ash/accelerators/accelerator_filter.cc b/chromium/ash/accelerators/accelerator_filter.cc
deleted file mode 100644
index 1ce80c76de5..00000000000
--- a/chromium/ash/accelerators/accelerator_filter.cc
+++ /dev/null
@@ -1,137 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/accelerators/accelerator_filter.h"
-
-#include "ash/accelerators/accelerator_controller.h"
-#include "ash/shell.h"
-#include "ash/wm/window_state.h"
-#include "ui/aura/root_window.h"
-#include "ui/base/accelerators/accelerator.h"
-#include "ui/base/accelerators/accelerator_manager.h"
-#include "ui/events/event.h"
-#include "ui/views/corewm/window_util.h"
-
-namespace ash {
-namespace {
-
-const int kModifierFlagMask = (ui::EF_SHIFT_DOWN |
- ui::EF_CONTROL_DOWN |
- ui::EF_ALT_DOWN);
-
-// Returns true if |key_code| is a key usually handled directly by the shell.
-bool IsSystemKey(ui::KeyboardCode key_code) {
-#if defined(OS_CHROMEOS)
- switch (key_code) {
- case ui::VKEY_MEDIA_LAUNCH_APP2: // Fullscreen button.
- case ui::VKEY_MEDIA_LAUNCH_APP1: // Overview button.
- case ui::VKEY_BRIGHTNESS_DOWN:
- case ui::VKEY_BRIGHTNESS_UP:
- case ui::VKEY_KBD_BRIGHTNESS_DOWN:
- case ui::VKEY_KBD_BRIGHTNESS_UP:
- case ui::VKEY_VOLUME_MUTE:
- case ui::VKEY_VOLUME_DOWN:
- case ui::VKEY_VOLUME_UP:
- return true;
- default:
- return false;
- }
-#endif // defined(OS_CHROMEOS)
- return false;
-}
-
-// Returns true if the window should be allowed a chance to handle system keys.
-// Uses the top level window so if the target is a web contents window the
-// containing parent window will be checked for the property.
-bool CanConsumeSystemKeys(aura::Window* target) {
- if (!target) // Can be NULL in tests.
- return false;
- aura::Window* top_level = views::corewm::GetToplevelWindow(target);
- return top_level && wm::GetWindowState(top_level)->can_consume_system_keys();
-}
-
-// Returns true if the |accelerator| should be processed now, inside Ash's env
-// event filter.
-bool ShouldProcessAcceleratorsNow(const ui::Accelerator& accelerator,
- aura::Window* target) {
- if (!target)
- return true;
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- if (std::find(root_windows.begin(), root_windows.end(), target) !=
- root_windows.end())
- return true;
-
- // A full screen window should be able to handle all key events including the
- // reserved ones.
- if (wm::GetWindowState(target)->IsFullscreen()) {
- // TODO(yusukes): On Chrome OS, only browser and flash windows can be full
- // screen. Launching an app in "open full-screen" mode is not supported yet.
- // That makes the IsWindowFullscreen() check above almost meaningless
- // because a browser and flash window do handle Ash accelerators anyway
- // before they're passed to a page or flash content.
- return false;
- }
-
- if (Shell::GetInstance()->GetAppListTargetVisibility())
- return true;
-
- // Unless |target| is in the full screen state, handle reserved accelerators
- // such as Alt+Tab now.
- return Shell::GetInstance()->accelerator_controller()->IsReservedAccelerator(
- accelerator);
-}
-
-} // namespace
-
-namespace internal {
-
-////////////////////////////////////////////////////////////////////////////////
-// AcceleratorFilter, public:
-
-AcceleratorFilter::AcceleratorFilter() {
-}
-
-AcceleratorFilter::~AcceleratorFilter() {
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AcceleratorFilter, EventFilter implementation:
-
-void AcceleratorFilter::OnKeyEvent(ui::KeyEvent* event) {
- const ui::EventType type = event->type();
- if (type != ui::ET_KEY_PRESSED && type != ui::ET_KEY_RELEASED)
- return;
- if (event->is_char())
- return;
-
- ui::Accelerator accelerator(event->key_code(),
- event->flags() & kModifierFlagMask);
- accelerator.set_type(type);
-
- // Fill out context object so AcceleratorController will know what
- // was the previous accelerator or if the current accelerator is repeated.
- AcceleratorController* accelerator_controller =
- Shell::GetInstance()->accelerator_controller();
- accelerator_controller->context()->UpdateContext(accelerator);
-
- aura::Window* target = static_cast<aura::Window*>(event->target());
- // Handle special hardware keys like brightness and volume. However, some
- // windows can override this behavior (e.g. Chrome v1 apps by default and
- // Chrome v2 apps with permission) by setting a window property.
- if (IsSystemKey(event->key_code()) && !CanConsumeSystemKeys(target)) {
- accelerator_controller->Process(accelerator);
- // These keys are always consumed regardless of whether they trigger an
- // accelerator to prevent windows from seeing unexpected key up events.
- event->StopPropagation();
- return;
- }
- if (!ShouldProcessAcceleratorsNow(accelerator, target))
- return;
- if (accelerator_controller->Process(accelerator))
- event->StopPropagation();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/accelerators/accelerator_filter.h b/chromium/ash/accelerators/accelerator_filter.h
deleted file mode 100644
index 1df7637edd3..00000000000
--- a/chromium/ash/accelerators/accelerator_filter.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_ACCELERATORS_ACCELERATOR_FILTER_H_
-#define ASH_ACCELERATORS_ACCELERATOR_FILTER_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/events/event_handler.h"
-
-namespace ash {
-namespace internal {
-
-// AcceleratorFilter filters key events for AcceleratorControler handling global
-// keyboard accelerators.
-class ASH_EXPORT AcceleratorFilter : public ui::EventHandler {
- public:
- AcceleratorFilter();
- virtual ~AcceleratorFilter();
-
- // Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AcceleratorFilter);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_ACCELERATORS_ACCELERATOR_FILTER_H_
diff --git a/chromium/ash/accelerators/accelerator_filter_unittest.cc b/chromium/ash/accelerators/accelerator_filter_unittest.cc
deleted file mode 100644
index c1a70549b9e..00000000000
--- a/chromium/ash/accelerators/accelerator_filter_unittest.cc
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/accelerators/accelerator_filter.h"
-
-#include "ash/accelerators/accelerator_controller.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/test_screenshot_delegate.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/aura/test/aura_test_base.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/events/event.h"
-#include "ui/gfx/rect.h"
-
-namespace ash {
-namespace test {
-
-typedef AshTestBase AcceleratorFilterTest;
-
-// Tests if AcceleratorFilter works without a focused window.
-TEST_F(AcceleratorFilterTest, TestFilterWithoutFocus) {
- const TestScreenshotDelegate* delegate = GetScreenshotDelegate();
- EXPECT_EQ(0, delegate->handle_take_screenshot_count());
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- // AcceleratorController calls ScreenshotDelegate::HandleTakeScreenshot() when
- // VKEY_PRINT is pressed. See kAcceleratorData[] in accelerator_controller.cc.
- generator.PressKey(ui::VKEY_PRINT, 0);
- EXPECT_EQ(1, delegate->handle_take_screenshot_count());
- generator.ReleaseKey(ui::VKEY_PRINT, 0);
- EXPECT_EQ(1, delegate->handle_take_screenshot_count());
-}
-
-// Tests if AcceleratorFilter works as expected with a focused window.
-TEST_F(AcceleratorFilterTest, TestFilterWithFocus) {
- aura::test::TestWindowDelegate test_delegate;
- scoped_ptr<aura::Window> window(CreateTestWindowInShellWithDelegate(
- &test_delegate,
- -1,
- gfx::Rect()));
- wm::ActivateWindow(window.get());
-
- const TestScreenshotDelegate* delegate = GetScreenshotDelegate();
- EXPECT_EQ(0, delegate->handle_take_screenshot_count());
-
- // AcceleratorFilter should ignore the key events since the root window is
- // not focused.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- generator.PressKey(ui::VKEY_PRINT, 0);
- EXPECT_EQ(0, delegate->handle_take_screenshot_count());
- generator.ReleaseKey(ui::VKEY_PRINT, 0);
- EXPECT_EQ(0, delegate->handle_take_screenshot_count());
-
- // Reset window before |test_delegate| gets deleted.
- window.reset();
-}
-
-// Tests if AcceleratorFilter ignores the flag for Caps Lock.
-TEST_F(AcceleratorFilterTest, TestCapsLockMask) {
- const TestScreenshotDelegate* delegate = GetScreenshotDelegate();
- EXPECT_EQ(0, delegate->handle_take_screenshot_count());
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- generator.PressKey(ui::VKEY_PRINT, 0);
- EXPECT_EQ(1, delegate->handle_take_screenshot_count());
- generator.ReleaseKey(ui::VKEY_PRINT, 0);
- EXPECT_EQ(1, delegate->handle_take_screenshot_count());
-
- // Check if AcceleratorFilter ignores the mask for Caps Lock. Note that there
- // is no ui::EF_ mask for Num Lock.
- generator.PressKey(ui::VKEY_PRINT, ui::EF_CAPS_LOCK_DOWN);
- EXPECT_EQ(2, delegate->handle_take_screenshot_count());
- generator.ReleaseKey(ui::VKEY_PRINT, ui::EF_CAPS_LOCK_DOWN);
- EXPECT_EQ(2, delegate->handle_take_screenshot_count());
-}
-
-#if defined(OS_CHROMEOS)
-// Tests if special hardware keys like brightness and volume are consumed as
-// expected by the shell.
-TEST_F(AcceleratorFilterTest, CanConsumeSystemKeys) {
- internal::AcceleratorFilter filter;
-
- // Normal keys are not consumed.
- ui::KeyEvent press_a(ui::ET_KEY_PRESSED, ui::VKEY_A, ui::EF_NONE, false);
- filter.OnKeyEvent(&press_a);
- EXPECT_FALSE(press_a.stopped_propagation());
-
- // System keys are directly consumed.
- ui::KeyEvent press_mute(
- ui::ET_KEY_PRESSED, ui::VKEY_VOLUME_MUTE, ui::EF_NONE, false);
- filter.OnKeyEvent(&press_mute);
- EXPECT_TRUE(press_mute.stopped_propagation());
-
- // Setting a window property on the target allows system keys to pass through.
- scoped_ptr<aura::Window> window(CreateTestWindowInShellWithId(1));
- wm::GetWindowState(window.get())->set_can_consume_system_keys(true);
- ui::KeyEvent press_volume_up(
- ui::ET_KEY_PRESSED, ui::VKEY_VOLUME_UP, ui::EF_NONE, false);
- ui::Event::DispatcherApi dispatch_helper(&press_volume_up);
- dispatch_helper.set_target(window.get());
- filter.OnKeyEvent(&press_volume_up);
- EXPECT_FALSE(press_volume_up.stopped_propagation());
-
- // System keys pass through to a child window if the parent (top level)
- // window has the property set.
- scoped_ptr<aura::Window> child(CreateTestWindowInShellWithId(2));
- window->AddChild(child.get());
- dispatch_helper.set_target(child.get());
- filter.OnKeyEvent(&press_volume_up);
- EXPECT_FALSE(press_volume_up.stopped_propagation());
-}
-#endif // defined(OS_CHROMEOS)
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/accelerators/accelerator_table.cc b/chromium/ash/accelerators/accelerator_table.cc
deleted file mode 100644
index 4baff1f39b2..00000000000
--- a/chromium/ash/accelerators/accelerator_table.cc
+++ /dev/null
@@ -1,434 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/accelerators/accelerator_table.h"
-
-#include "base/basictypes.h"
-
-namespace ash {
-
-const AcceleratorData kAcceleratorData[] = {
- // We have to define 3 entries for Shift+Alt. VKEY_[LR]MENU might be sent to
- // the accelerator controller when RenderWidgetHostViewAura is focused, and
- // VKEY_MENU might be when it's not (e.g. when NativeWidgetAura is focused).
- { false, ui::VKEY_LMENU, ui::EF_SHIFT_DOWN, NEXT_IME },
- { false, ui::VKEY_MENU, ui::EF_SHIFT_DOWN, NEXT_IME },
- { false, ui::VKEY_RMENU, ui::EF_SHIFT_DOWN, NEXT_IME },
- // The same is true for Alt+Shift.
- { false, ui::VKEY_LSHIFT, ui::EF_ALT_DOWN, NEXT_IME },
- { false, ui::VKEY_SHIFT, ui::EF_ALT_DOWN, NEXT_IME },
- { false, ui::VKEY_RSHIFT, ui::EF_ALT_DOWN, NEXT_IME },
- // Single shift release turns off caps lock.
- { false, ui::VKEY_LSHIFT, ui::EF_NONE, DISABLE_CAPS_LOCK },
- { false, ui::VKEY_SHIFT, ui::EF_NONE, DISABLE_CAPS_LOCK },
- { false, ui::VKEY_RSHIFT, ui::EF_NONE, DISABLE_CAPS_LOCK },
-
- { true, ui::VKEY_SPACE, ui::EF_CONTROL_DOWN, PREVIOUS_IME },
- { false, ui::VKEY_SPACE, ui::EF_CONTROL_DOWN, PREVIOUS_IME },
- // Shortcuts for Japanese IME.
- { true, ui::VKEY_CONVERT, ui::EF_NONE, SWITCH_IME },
- { true, ui::VKEY_NONCONVERT, ui::EF_NONE, SWITCH_IME },
- { true, ui::VKEY_DBE_SBCSCHAR, ui::EF_NONE, SWITCH_IME },
- { true, ui::VKEY_DBE_DBCSCHAR, ui::EF_NONE, SWITCH_IME },
- // Shortcut for Koren IME.
- { true, ui::VKEY_HANGUL, ui::EF_NONE, SWITCH_IME },
-
- { true, ui::VKEY_TAB, ui::EF_ALT_DOWN, CYCLE_FORWARD_MRU },
- { true, ui::VKEY_TAB, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN,
- CYCLE_BACKWARD_MRU },
- { true, ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_NONE, CYCLE_LINEAR },
-#if defined(OS_CHROMEOS)
- { true, ui::VKEY_BROWSER_SEARCH, ui::EF_NONE, TOGGLE_APP_LIST },
- { true, ui::VKEY_WLAN, ui::EF_NONE, TOGGLE_WIFI },
- { true, ui::VKEY_KBD_BRIGHTNESS_DOWN, ui::EF_NONE, KEYBOARD_BRIGHTNESS_DOWN },
- { true, ui::VKEY_KBD_BRIGHTNESS_UP, ui::EF_NONE, KEYBOARD_BRIGHTNESS_UP },
- // Maximize button.
- { true, ui::VKEY_MEDIA_LAUNCH_APP2, ui::EF_CONTROL_DOWN, TOGGLE_MIRROR_MODE },
- { true, ui::VKEY_MEDIA_LAUNCH_APP2, ui::EF_ALT_DOWN, SWAP_PRIMARY_DISPLAY },
- // Cycle windows button.
- { true, ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_CONTROL_DOWN, TAKE_SCREENSHOT },
- { true, ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
- TAKE_PARTIAL_SCREENSHOT },
- { true, ui::VKEY_BRIGHTNESS_DOWN, ui::EF_NONE, BRIGHTNESS_DOWN },
- { true, ui::VKEY_BRIGHTNESS_DOWN, ui::EF_ALT_DOWN, KEYBOARD_BRIGHTNESS_DOWN },
- { true, ui::VKEY_BRIGHTNESS_UP, ui::EF_NONE, BRIGHTNESS_UP },
- { true, ui::VKEY_BRIGHTNESS_UP, ui::EF_ALT_DOWN, KEYBOARD_BRIGHTNESS_UP },
- { true, ui::VKEY_BRIGHTNESS_DOWN, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- MAGNIFY_SCREEN_ZOOM_OUT},
- { true, ui::VKEY_BRIGHTNESS_UP, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- MAGNIFY_SCREEN_ZOOM_IN},
- { true, ui::VKEY_L, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, LOCK_SCREEN },
- // The lock key on Chrome OS keyboards produces F13 scancodes.
- { true, ui::VKEY_F13, ui::EF_NONE, LOCK_PRESSED },
- { false, ui::VKEY_F13, ui::EF_NONE, LOCK_RELEASED },
- { true, ui::VKEY_POWER, ui::EF_NONE, POWER_PRESSED },
- { false, ui::VKEY_POWER, ui::EF_NONE, POWER_RELEASED },
- { true, ui::VKEY_M, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN,
- OPEN_FILE_MANAGER },
- { true, ui::VKEY_T, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, OPEN_CROSH },
- { true, ui::VKEY_G, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- DISABLE_GPU_WATCHDOG },
- { true, ui::VKEY_I, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- TOUCH_HUD_MODE_CHANGE },
- { true, ui::VKEY_I, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN | ui::EF_SHIFT_DOWN,
- TOUCH_HUD_CLEAR },
- { true, ui::VKEY_9, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN,
- TOUCH_HUD_PROJECTION_TOGGLE },
- // Accessibility: Spoken feedback shortcuts. The first one is to toggle
- // spoken feedback on or off. The others are only valid when
- // spoken feedback is enabled.
- { true, ui::VKEY_Z, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- TOGGLE_SPOKEN_FEEDBACK },
- { true, ui::VKEY_CONTROL, ui::EF_CONTROL_DOWN, SILENCE_SPOKEN_FEEDBACK},
- { true, ui::VKEY_OEM_COMMA, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- SWITCH_TO_PREVIOUS_USER },
- { true, ui::VKEY_OEM_PERIOD, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- SWITCH_TO_NEXT_USER },
-#endif // defined(OS_CHROMEOS)
- { true, ui::VKEY_I, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, OPEN_FEEDBACK_PAGE },
-#if !defined(OS_WIN)
- { true, ui::VKEY_Q, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, EXIT },
-#endif
- { true, ui::VKEY_N, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
- NEW_INCOGNITO_WINDOW },
- { true, ui::VKEY_N, ui::EF_CONTROL_DOWN, NEW_WINDOW },
- { true, ui::VKEY_T, ui::EF_CONTROL_DOWN, NEW_TAB },
- { true, ui::VKEY_OEM_MINUS,
- ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, SCALE_UI_UP },
- { true, ui::VKEY_OEM_PLUS,
- ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, SCALE_UI_DOWN },
- { true, ui::VKEY_0,
- ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, SCALE_UI_RESET },
- { true, ui::VKEY_BROWSER_REFRESH,
- ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, ROTATE_SCREEN },
- { true, ui::VKEY_BROWSER_REFRESH,
- ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- ROTATE_WINDOW },
- { true, ui::VKEY_T, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, RESTORE_TAB },
- { true, ui::VKEY_PRINT, ui::EF_NONE, TAKE_SCREENSHOT },
- // On Chrome OS, Search key is mapped to LWIN. The Search key binding should
- // act on release instead of press when using Search as a modifier key for
- // extended keyboard shortcuts.
- { false, ui::VKEY_LWIN, ui::EF_NONE, TOGGLE_APP_LIST },
- { false, ui::VKEY_LWIN, ui::EF_ALT_DOWN, TOGGLE_CAPS_LOCK },
- { true, ui::VKEY_MEDIA_LAUNCH_APP2, ui::EF_NONE, TOGGLE_FULLSCREEN },
- { true, ui::VKEY_MEDIA_LAUNCH_APP2, ui::EF_SHIFT_DOWN, TOGGLE_FULLSCREEN },
- { true, ui::VKEY_VOLUME_MUTE, ui::EF_NONE, VOLUME_MUTE },
- { true, ui::VKEY_VOLUME_DOWN, ui::EF_NONE, VOLUME_DOWN },
- { true, ui::VKEY_VOLUME_UP, ui::EF_NONE, VOLUME_UP },
- { true, ui::VKEY_L, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, FOCUS_LAUNCHER },
- { true, ui::VKEY_HELP, ui::EF_NONE, SHOW_KEYBOARD_OVERLAY },
- { true, ui::VKEY_OEM_2, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- SHOW_KEYBOARD_OVERLAY },
- { true, ui::VKEY_OEM_2,
- ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- SHOW_KEYBOARD_OVERLAY },
- { true, ui::VKEY_F14, ui::EF_NONE, SHOW_KEYBOARD_OVERLAY },
- { true, ui::VKEY_N, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN,
- SHOW_MESSAGE_CENTER_BUBBLE },
- { true, ui::VKEY_BROWSER_BACK,
- ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- SHOW_OAK },
- { true, ui::VKEY_S, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN,
- SHOW_SYSTEM_TRAY_BUBBLE },
- { true, ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, SHOW_TASK_MANAGER },
- { true, ui::VKEY_1, ui::EF_ALT_DOWN, LAUNCH_APP_0 },
- { true, ui::VKEY_2, ui::EF_ALT_DOWN, LAUNCH_APP_1 },
- { true, ui::VKEY_3, ui::EF_ALT_DOWN, LAUNCH_APP_2 },
- { true, ui::VKEY_4, ui::EF_ALT_DOWN, LAUNCH_APP_3 },
- { true, ui::VKEY_5, ui::EF_ALT_DOWN, LAUNCH_APP_4 },
- { true, ui::VKEY_6, ui::EF_ALT_DOWN, LAUNCH_APP_5 },
- { true, ui::VKEY_7, ui::EF_ALT_DOWN, LAUNCH_APP_6 },
- { true, ui::VKEY_8, ui::EF_ALT_DOWN, LAUNCH_APP_7 },
- { true, ui::VKEY_9, ui::EF_ALT_DOWN, LAUNCH_LAST_APP },
-
- // Window management shortcuts.
- { true, ui::VKEY_OEM_4, ui::EF_ALT_DOWN, WINDOW_SNAP_LEFT },
- { true, ui::VKEY_OEM_6, ui::EF_ALT_DOWN, WINDOW_SNAP_RIGHT },
- // The same accelerator is defined in
- // c/b/ui/views/accelerator_table.cc in order for the web page to
- // intercept and process this shortcut. This accelerator is used if the
- // focused window isn't browser window nor web content.
- // TODO(stevet/jamescook): Remove this in M33, as well as the copy
- // referenced above. We want to move away from shortcuts bound to Ctrl
- // because web content often uses them.
- { true, ui::VKEY_M, ui::EF_CONTROL_DOWN, WINDOW_MINIMIZE },
- { true, ui::VKEY_OEM_MINUS, ui::EF_ALT_DOWN, WINDOW_MINIMIZE },
- { true, ui::VKEY_OEM_PLUS, ui::EF_ALT_DOWN, TOGGLE_MAXIMIZED },
- { true, ui::VKEY_OEM_PLUS, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN,
- WINDOW_POSITION_CENTER },
- { true, ui::VKEY_BROWSER_FORWARD, ui::EF_CONTROL_DOWN, FOCUS_NEXT_PANE },
- { true, ui::VKEY_BROWSER_BACK, ui::EF_CONTROL_DOWN, FOCUS_PREVIOUS_PANE },
-
- // Media Player shortcuts.
- { true, ui::VKEY_MEDIA_NEXT_TRACK, ui::EF_NONE, MEDIA_NEXT_TRACK},
- { true, ui::VKEY_MEDIA_PLAY_PAUSE, ui::EF_NONE, MEDIA_PLAY_PAUSE},
- { true, ui::VKEY_MEDIA_PREV_TRACK, ui::EF_NONE, MEDIA_PREV_TRACK},
-
- // Debugging shortcuts that need to be available to end-users in
- // release builds.
- { true, ui::VKEY_U, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN | ui::EF_SHIFT_DOWN,
- PRINT_UI_HIERARCHIES },
-
- { false, ui::VKEY_HOME, ui::EF_SHIFT_DOWN, ACCESSIBLE_FOCUS_PREVIOUS},
- { false, ui::VKEY_PRIOR, ui::EF_SHIFT_DOWN, ACCESSIBLE_FOCUS_PREVIOUS},
- { false, ui::VKEY_END, ui::EF_SHIFT_DOWN, ACCESSIBLE_FOCUS_NEXT},
- { false, ui::VKEY_NEXT, ui::EF_SHIFT_DOWN, ACCESSIBLE_FOCUS_NEXT},
-
- // TODO(yusukes): Handle VKEY_MEDIA_STOP, and
- // VKEY_MEDIA_LAUNCH_MAIL.
-};
-
-const size_t kAcceleratorDataLength = arraysize(kAcceleratorData);
-
-#if !defined(NDEBUG)
-const AcceleratorData kDesktopAcceleratorData[] = {
-#if defined(OS_CHROMEOS)
- // Extra shortcut for debug build to control magnifier on linux desktop.
- { true, ui::VKEY_BRIGHTNESS_DOWN, ui::EF_CONTROL_DOWN,
- MAGNIFY_SCREEN_ZOOM_OUT},
- { true, ui::VKEY_BRIGHTNESS_UP, ui::EF_CONTROL_DOWN, MAGNIFY_SCREEN_ZOOM_IN},
- // Extra shortcuts to lock the screen on linux desktop.
- { true, ui::VKEY_L, ui::EF_ALT_DOWN, LOCK_SCREEN },
- { true, ui::VKEY_POWER, ui::EF_SHIFT_DOWN, LOCK_PRESSED },
- { false, ui::VKEY_POWER, ui::EF_SHIFT_DOWN, LOCK_RELEASED },
- { true, ui::VKEY_D, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN,
- ADD_REMOVE_DISPLAY },
- { true, ui::VKEY_M, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN,
- TOGGLE_MIRROR_MODE },
- { true, ui::VKEY_W, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, TOGGLE_WIFI },
- // Extra shortcut for display swaping as alt-f4 is taken on linux desktop.
- { true, ui::VKEY_S, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
- SWAP_PRIMARY_DISPLAY },
-#endif
- // Extra shortcut to rotate/scale up/down the screen on linux desktop.
- { true, ui::VKEY_R,
- ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, ROTATE_SCREEN },
- // For testing on systems where Alt-Tab is already mapped.
- { true, ui::VKEY_W, ui::EF_ALT_DOWN, CYCLE_FORWARD_MRU },
-
- { true, ui::VKEY_F11, ui::EF_CONTROL_DOWN, TOGGLE_ROOT_WINDOW_FULL_SCREEN },
- { true, ui::VKEY_W, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN,
- CYCLE_BACKWARD_MRU },
- { true, ui::VKEY_B, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- TOGGLE_DESKTOP_BACKGROUND_MODE },
-};
-
-const size_t kDesktopAcceleratorDataLength = arraysize(kDesktopAcceleratorData);
-#endif
-
-const AcceleratorData kDebugAcceleratorData[] = {
- { true, ui::VKEY_L, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- PRINT_LAYER_HIERARCHY },
- { true, ui::VKEY_V, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- PRINT_VIEW_HIERARCHY },
- { true, ui::VKEY_W, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- PRINT_WINDOW_HIERARCHY },
- { true, ui::VKEY_S, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- DEBUG_TOGGLE_DEVICE_SCALE_FACTOR },
- { true, ui::VKEY_B, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- DEBUG_TOGGLE_SHOW_DEBUG_BORDERS },
- { true, ui::VKEY_F, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- DEBUG_TOGGLE_SHOW_FPS_COUNTER },
- { true, ui::VKEY_P, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
- DEBUG_TOGGLE_SHOW_PAINT_RECTS },
-};
-
-const size_t kDebugAcceleratorDataLength = arraysize(kDebugAcceleratorData);
-
-const AcceleratorAction kReservedActions[] = {
- // Window cycling accelerators.
- CYCLE_BACKWARD_MRU, // Shift+Alt+Tab
- CYCLE_FORWARD_MRU, // Alt+Tab
-#if defined(OS_CHROMEOS)
- POWER_PRESSED,
- POWER_RELEASED,
-#endif
-};
-
-const size_t kReservedActionsLength = arraysize(kReservedActions);
-
-const AcceleratorAction kReservedDebugActions[] = {
- PRINT_LAYER_HIERARCHY,
- PRINT_VIEW_HIERARCHY,
- PRINT_WINDOW_HIERARCHY,
- DEBUG_TOGGLE_DEVICE_SCALE_FACTOR,
- DEBUG_TOGGLE_SHOW_DEBUG_BORDERS,
- DEBUG_TOGGLE_SHOW_FPS_COUNTER,
- DEBUG_TOGGLE_SHOW_PAINT_RECTS,
-};
-
-const size_t kReservedDebugActionsLength = arraysize(kReservedDebugActions);
-
-const AcceleratorAction kActionsAllowedAtLoginOrLockScreen[] = {
- BRIGHTNESS_DOWN,
- BRIGHTNESS_UP,
- DISABLE_CAPS_LOCK,
- KEYBOARD_BRIGHTNESS_DOWN,
- KEYBOARD_BRIGHTNESS_UP,
- MAGNIFY_SCREEN_ZOOM_IN, // Control+F7
- MAGNIFY_SCREEN_ZOOM_OUT, // Control+F6
- NEXT_IME,
- PREVIOUS_IME,
- PRINT_LAYER_HIERARCHY,
- PRINT_UI_HIERARCHIES,
- PRINT_VIEW_HIERARCHY,
- PRINT_WINDOW_HIERARCHY,
- ROTATE_WINDOW,
- SHOW_SYSTEM_TRAY_BUBBLE,
- SWITCH_IME, // Switch to another IME depending on the accelerator.
- TAKE_PARTIAL_SCREENSHOT,
- TAKE_SCREENSHOT,
- TOGGLE_CAPS_LOCK,
- TOGGLE_WIFI,
- TOUCH_HUD_CLEAR,
- VOLUME_DOWN,
- VOLUME_MUTE,
- VOLUME_UP,
-#if defined(OS_CHROMEOS)
- TOGGLE_SPOKEN_FEEDBACK,
- ADD_REMOVE_DISPLAY,
- DISABLE_GPU_WATCHDOG,
- TOGGLE_MIRROR_MODE,
-#endif
-#if defined(OS_CHROMEOS) && !defined(NDEBUG)
- POWER_PRESSED,
- POWER_RELEASED,
-#endif // defined(OS_CHROMEOS)
-};
-
-const size_t kActionsAllowedAtLoginOrLockScreenLength =
- arraysize(kActionsAllowedAtLoginOrLockScreen);
-
-const AcceleratorAction kActionsAllowedAtLockScreen[] = {
- EXIT,
-};
-
-const size_t kActionsAllowedAtLockScreenLength =
- arraysize(kActionsAllowedAtLockScreen);
-
-const AcceleratorAction kActionsAllowedAtModalWindow[] = {
- BRIGHTNESS_DOWN,
- BRIGHTNESS_UP,
- DISABLE_CAPS_LOCK,
- EXIT,
- KEYBOARD_BRIGHTNESS_DOWN,
- KEYBOARD_BRIGHTNESS_UP,
- MAGNIFY_SCREEN_ZOOM_IN,
- MAGNIFY_SCREEN_ZOOM_OUT,
- MEDIA_NEXT_TRACK,
- MEDIA_PLAY_PAUSE,
- MEDIA_PREV_TRACK,
- NEXT_IME,
- OPEN_FEEDBACK_PAGE,
- POWER_PRESSED,
- POWER_RELEASED,
- PREVIOUS_IME,
- PRINT_UI_HIERARCHIES,
- SHOW_KEYBOARD_OVERLAY,
- SWITCH_IME,
- TAKE_PARTIAL_SCREENSHOT,
- TAKE_SCREENSHOT,
- TOGGLE_CAPS_LOCK,
- TOGGLE_WIFI,
- VOLUME_DOWN,
- VOLUME_MUTE,
- VOLUME_UP,
-#if defined(OS_CHROMEOS)
- SWAP_PRIMARY_DISPLAY,
- TOGGLE_SPOKEN_FEEDBACK,
-#if !defined(NDEBUG)
- ADD_REMOVE_DISPLAY,
-#endif
- LOCK_SCREEN,
- TOGGLE_MIRROR_MODE,
-#endif
-};
-
-const size_t kActionsAllowedAtModalWindowLength =
- arraysize(kActionsAllowedAtModalWindow);
-
-const AcceleratorAction kNonrepeatableActions[] = {
- // TODO(mazda): Add other actions which should not be repeated.
- CYCLE_BACKWARD_MRU,
- CYCLE_FORWARD_MRU,
- CYCLE_LINEAR,
- EXIT,
- PRINT_UI_HIERARCHIES, // Don't fill the logs if the key is held down.
- ROTATE_SCREEN,
- ROTATE_WINDOW,
- SCALE_UI_UP,
- SCALE_UI_DOWN,
- SCALE_UI_RESET,
- TOGGLE_FULLSCREEN,
- TOGGLE_MAXIMIZED,
- WINDOW_MINIMIZE,
-};
-
-const size_t kNonrepeatableActionsLength =
- arraysize(kNonrepeatableActions);
-
-const AcceleratorAction kActionsAllowedInAppMode[] = {
- BRIGHTNESS_DOWN,
- BRIGHTNESS_UP,
- CYCLE_BACKWARD_MRU,
- CYCLE_FORWARD_MRU,
- CYCLE_LINEAR,
- DISABLE_CAPS_LOCK,
- KEYBOARD_BRIGHTNESS_DOWN,
- KEYBOARD_BRIGHTNESS_UP,
- MAGNIFY_SCREEN_ZOOM_IN, // Control+F7
- MAGNIFY_SCREEN_ZOOM_OUT, // Control+F6
- MEDIA_NEXT_TRACK,
- MEDIA_PLAY_PAUSE,
- MEDIA_PREV_TRACK,
- NEXT_IME,
- POWER_PRESSED,
- POWER_RELEASED,
- PREVIOUS_IME,
- PRINT_LAYER_HIERARCHY,
- PRINT_UI_HIERARCHIES,
- PRINT_VIEW_HIERARCHY,
- PRINT_WINDOW_HIERARCHY,
- ROTATE_SCREEN,
- SCALE_UI_DOWN,
- SCALE_UI_RESET,
- SCALE_UI_UP,
- SWITCH_IME, // Switch to another IME depending on the accelerator.
- TOGGLE_CAPS_LOCK,
- TOGGLE_WIFI,
- TOUCH_HUD_CLEAR,
- VOLUME_DOWN,
- VOLUME_MUTE,
- VOLUME_UP,
-#if defined(OS_CHROMEOS)
- SWAP_PRIMARY_DISPLAY,
- TOGGLE_SPOKEN_FEEDBACK,
- ADD_REMOVE_DISPLAY,
- DISABLE_GPU_WATCHDOG,
- TOGGLE_MIRROR_MODE,
-#endif // defined(OS_CHROMEOS)
-};
-
-const size_t kActionsAllowedInAppModeLength =
- arraysize(kActionsAllowedInAppMode);
-
-const AcceleratorAction kActionsNeedingWindow[] = {
- ACCESSIBLE_FOCUS_NEXT,
- ACCESSIBLE_FOCUS_PREVIOUS,
- CYCLE_BACKWARD_MRU,
- CYCLE_FORWARD_MRU,
- CYCLE_LINEAR,
- WINDOW_SNAP_LEFT,
- WINDOW_SNAP_RIGHT,
- WINDOW_MINIMIZE,
- TOGGLE_FULLSCREEN,
- TOGGLE_MAXIMIZED,
- WINDOW_POSITION_CENTER,
- ROTATE_WINDOW,
-};
-
-const size_t kActionsNeedingWindowLength = arraysize(kActionsNeedingWindow);
-
-} // namespace ash
diff --git a/chromium/ash/accelerators/accelerator_table.h b/chromium/ash/accelerators/accelerator_table.h
deleted file mode 100644
index d12096037b0..00000000000
--- a/chromium/ash/accelerators/accelerator_table.h
+++ /dev/null
@@ -1,202 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_ACCELERATORS_ACCELERATOR_TABLE_H_
-#define ASH_ACCELERATORS_ACCELERATOR_TABLE_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "ui/events/event_constants.h"
-#include "ui/events/keycodes/keyboard_codes.h"
-
-namespace ash {
-
-// There are four classes of accelerators in Ash:
-//
-// Ash (OS) reserved:
-// * Neither packaged apps nor web pages can cancel.
-// * For example, Alt-Tab window cycling.
-// * See kReservedActions below.
-//
-// Chrome OS system keys:
-// * For legacy reasons, v1 apps can process and cancel. Otherwise handled
-// directly by Ash.
-// * Brightness, volume control, etc.
-// * See IsSystemKey() in ash/accelerators/accelerator_filter.cc.
-//
-// Browser reserved:
-// * Packaged apps can cancel but web pages cannot.
-// * For example, browser back and forward from first-row function keys.
-// * See IsReservedCommandOrKey() in
-// chrome/browser/ui/browser_command_controller.cc.
-//
-// Browser non-reserved:
-// * Both packaged apps and web pages can cancel.
-// * For example, selecting tabs by number with Ctrl-1 to Ctrl-9.
-// * See kAcceleratorMap in chrome/browser/ui/views/accelerator_table.cc.
-//
-// In particular, there is not an accelerator processing pass for Ash after
-// the browser gets the accelerator. See crbug.com/285308 for details.
-//
-// There are also various restrictions on accelerators allowed at the login
-// screen, when running in "forced app mode" (like a kiosk), etc. See the
-// various kActionsAllowed* below.
-//
-// Please put if/def sections at the end of the bare section and keep the list
-// within each section in alphabetical order.
-enum AcceleratorAction {
- ACCESSIBLE_FOCUS_NEXT,
- ACCESSIBLE_FOCUS_PREVIOUS,
- BRIGHTNESS_DOWN,
- BRIGHTNESS_UP,
- CYCLE_BACKWARD_MRU,
- CYCLE_FORWARD_MRU,
- CYCLE_LINEAR,
- DEBUG_TOGGLE_DEVICE_SCALE_FACTOR,
- DEBUG_TOGGLE_SHOW_DEBUG_BORDERS,
- DEBUG_TOGGLE_SHOW_FPS_COUNTER,
- DEBUG_TOGGLE_SHOW_PAINT_RECTS,
- DISABLE_CAPS_LOCK,
- EXIT,
- FOCUS_LAUNCHER,
- FOCUS_NEXT_PANE,
- FOCUS_PREVIOUS_PANE,
- KEYBOARD_BRIGHTNESS_DOWN,
- KEYBOARD_BRIGHTNESS_UP,
- LAUNCH_APP_0,
- LAUNCH_APP_1,
- LAUNCH_APP_2,
- LAUNCH_APP_3,
- LAUNCH_APP_4,
- LAUNCH_APP_5,
- LAUNCH_APP_6,
- LAUNCH_APP_7,
- LAUNCH_LAST_APP,
- LOCK_PRESSED,
- LOCK_RELEASED,
- MAGNIFY_SCREEN_ZOOM_IN,
- MAGNIFY_SCREEN_ZOOM_OUT,
- MEDIA_NEXT_TRACK,
- MEDIA_PLAY_PAUSE,
- MEDIA_PREV_TRACK,
- NEW_INCOGNITO_WINDOW,
- NEW_TAB,
- NEW_WINDOW,
- NEXT_IME,
- OPEN_FEEDBACK_PAGE,
- POWER_PRESSED,
- POWER_RELEASED,
- PREVIOUS_IME,
- PRINT_LAYER_HIERARCHY,
- PRINT_UI_HIERARCHIES,
- PRINT_VIEW_HIERARCHY,
- PRINT_WINDOW_HIERARCHY,
- RESTORE_TAB,
- ROTATE_SCREEN,
- ROTATE_WINDOW,
- SCALE_UI_DOWN,
- SCALE_UI_RESET,
- SCALE_UI_UP,
- SHOW_KEYBOARD_OVERLAY,
- SHOW_MESSAGE_CENTER_BUBBLE,
- SHOW_OAK,
- SHOW_SYSTEM_TRAY_BUBBLE,
- SHOW_TASK_MANAGER,
- SILENCE_SPOKEN_FEEDBACK,
- SWAP_PRIMARY_DISPLAY,
- SWITCH_IME, // Switch to another IME depending on the accelerator.
- TAKE_PARTIAL_SCREENSHOT,
- TAKE_SCREENSHOT,
- TOGGLE_APP_LIST,
- TOGGLE_CAPS_LOCK,
- TOGGLE_CAPS_LOCK_BY_ALT_LWIN,
- TOGGLE_DESKTOP_BACKGROUND_MODE,
- TOGGLE_FULLSCREEN,
- TOGGLE_MAXIMIZED,
- TOGGLE_ROOT_WINDOW_FULL_SCREEN,
- TOGGLE_SPOKEN_FEEDBACK,
- TOGGLE_WIFI,
- TOUCH_HUD_CLEAR,
- TOUCH_HUD_MODE_CHANGE,
- TOUCH_HUD_PROJECTION_TOGGLE,
- VOLUME_DOWN,
- VOLUME_MUTE,
- VOLUME_UP,
- WINDOW_MINIMIZE,
- WINDOW_POSITION_CENTER,
- WINDOW_SNAP_LEFT,
- WINDOW_SNAP_RIGHT,
-#if defined(OS_CHROMEOS)
- ADD_REMOVE_DISPLAY,
- TOGGLE_MIRROR_MODE,
- DISABLE_GPU_WATCHDOG,
- LOCK_SCREEN,
- OPEN_CROSH,
- OPEN_FILE_MANAGER,
- SWITCH_TO_NEXT_USER,
- SWITCH_TO_PREVIOUS_USER,
-#endif
-};
-
-struct AcceleratorData {
- bool trigger_on_press;
- ui::KeyboardCode keycode;
- int modifiers;
- AcceleratorAction action;
-};
-
-// Accelerators handled by AcceleratorController.
-ASH_EXPORT extern const AcceleratorData kAcceleratorData[];
-ASH_EXPORT extern const size_t kAcceleratorDataLength;
-
-#if !defined(NDEBUG)
-// Accelerators useful when running on desktop. Debug build only.
-ASH_EXPORT extern const AcceleratorData kDesktopAcceleratorData[];
-ASH_EXPORT extern const size_t kDesktopAcceleratorDataLength;
-#endif
-
-// Debug accelerators enabled only when "Debugging keyboard shortcuts" flag
-// (--ash-debug-shortcuts) is enabled.
-ASH_EXPORT extern const AcceleratorData kDebugAcceleratorData[];
-ASH_EXPORT extern const size_t kDebugAcceleratorDataLength;
-
-// Actions that should be handled very early in Ash unless the current target
-// window is full-screen.
-ASH_EXPORT extern const AcceleratorAction kReservedActions[];
-ASH_EXPORT extern const size_t kReservedActionsLength;
-
-// Actions that should be handled very early in Ash unless the current target
-// window is full-screen, these actions are only handled if
-// DebugShortcutsEnabled is true (command line switch 'ash-debug-shortcuts').
-ASH_EXPORT extern const AcceleratorAction kReservedDebugActions[];
-ASH_EXPORT extern const size_t kReservedDebugActionsLength;
-
-// Actions allowed while user is not signed in or screen is locked.
-ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtLoginOrLockScreen[];
-ASH_EXPORT extern const size_t kActionsAllowedAtLoginOrLockScreenLength;
-
-// Actions allowed while screen is locked (in addition to
-// kActionsAllowedAtLoginOrLockScreen).
-ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtLockScreen[];
-ASH_EXPORT extern const size_t kActionsAllowedAtLockScreenLength;
-
-// Actions allowed while a modal window is up.
-ASH_EXPORT extern const AcceleratorAction kActionsAllowedAtModalWindow[];
-ASH_EXPORT extern const size_t kActionsAllowedAtModalWindowLength;
-
-// Actions which will not be repeated while holding an accelerator key.
-ASH_EXPORT extern const AcceleratorAction kNonrepeatableActions[];
-ASH_EXPORT extern const size_t kNonrepeatableActionsLength;
-
-// Actions allowed in app mode.
-ASH_EXPORT extern const AcceleratorAction kActionsAllowedInAppMode[];
-ASH_EXPORT extern const size_t kActionsAllowedInAppModeLength;
-
-// Actions that require at least 1 window.
-ASH_EXPORT extern const AcceleratorAction kActionsNeedingWindow[];
-ASH_EXPORT extern const size_t kActionsNeedingWindowLength;
-
-} // namespace ash
-
-#endif // ASH_ACCELERATORS_ACCELERATOR_TABLE_H_
diff --git a/chromium/ash/accelerators/accelerator_table_unittest.cc b/chromium/ash/accelerators/accelerator_table_unittest.cc
deleted file mode 100644
index ec71f412eb1..00000000000
--- a/chromium/ash/accelerators/accelerator_table_unittest.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <set>
-
-#include "base/basictypes.h"
-#include "ash/accelerators/accelerator_table.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace ash {
-
-namespace {
-
-struct Cmp {
- bool operator()(const AcceleratorData& lhs,
- const AcceleratorData& rhs) {
- if (lhs.trigger_on_press != rhs.trigger_on_press)
- return lhs.trigger_on_press < rhs.trigger_on_press;
- if (lhs.keycode != rhs.keycode)
- return lhs.keycode < rhs.keycode;
- return lhs.modifiers < rhs.modifiers;
- // Do not check |action|.
- }
-};
-
-} // namespace
-
-TEST(AcceleratorTableTest, CheckDuplicatedAccelerators) {
- std::set<AcceleratorData, Cmp> acclerators;
- for (size_t i = 0; i < kAcceleratorDataLength; ++i) {
- const AcceleratorData& entry = kAcceleratorData[i];
- EXPECT_TRUE(acclerators.insert(entry).second)
- << "Duplicated accelerator: " << entry.trigger_on_press << ", "
- << entry.keycode << ", " << (entry.modifiers & ui::EF_SHIFT_DOWN)
- << ", " << (entry.modifiers & ui::EF_CONTROL_DOWN) << ", "
- << (entry.modifiers & ui::EF_ALT_DOWN);
- }
-}
-
-TEST(AcceleratorTableTest, CheckDuplicatedReservedActions) {
- std::set<AcceleratorAction> actions;
- for (size_t i = 0; i < kReservedActionsLength; ++i) {
- EXPECT_TRUE(actions.insert(kReservedActions[i]).second)
- << "Duplicated action: " << kReservedActions[i];
- }
-}
-
-TEST(AcceleratorTableTest, CheckDuplicatedActionsAllowedAtLoginOrLockScreen) {
- std::set<AcceleratorAction> actions;
- for (size_t i = 0; i < kActionsAllowedAtLoginOrLockScreenLength; ++i) {
- EXPECT_TRUE(actions.insert(kActionsAllowedAtLoginOrLockScreen[i]).second)
- << "Duplicated action: " << kActionsAllowedAtLoginOrLockScreen[i];
- }
- for (size_t i = 0; i < kActionsAllowedAtLockScreenLength; ++i) {
- EXPECT_TRUE(actions.insert(kActionsAllowedAtLockScreen[i]).second)
- << "Duplicated action: " << kActionsAllowedAtLockScreen[i];
- }
-}
-
-TEST(AcceleratorTableTest, CheckDuplicatedActionsAllowedAtModalWindow) {
- std::set<AcceleratorAction> actions;
- for (size_t i = 0; i < kActionsAllowedAtModalWindowLength; ++i) {
- EXPECT_TRUE(actions.insert(kActionsAllowedAtModalWindow[i]).second)
- << "Duplicated action: " << kActionsAllowedAtModalWindow[i]
- << " at index: " << i;
- }
-}
-
-TEST(AcceleratorTableTest, CheckDuplicatedNonrepeatableActions) {
- std::set<AcceleratorAction> actions;
- for (size_t i = 0; i < kNonrepeatableActionsLength; ++i) {
- EXPECT_TRUE(actions.insert(kNonrepeatableActions[i]).second)
- << "Duplicated action: " << kNonrepeatableActions[i]
- << " at index: " << i;
- }
-}
-
-} // namespace ash
diff --git a/chromium/ash/accelerators/debug_commands.cc b/chromium/ash/accelerators/debug_commands.cc
deleted file mode 100644
index 4ca1720e3a0..00000000000
--- a/chromium/ash/accelerators/debug_commands.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/accelerators/accelerator_commands.h"
-
-#include "ash/desktop_background/desktop_background_controller.h"
-#include "ash/desktop_background/user_wallpaper_delegate.h"
-#include "ash/shell.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "third_party/skia/include/core/SkPaint.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/image/image_skia.h"
-
-namespace ash {
-namespace debug {
-namespace {
-
-gfx::ImageSkia CreateWallpaperImage(SkColor fill, SkColor rect) {
- // TODO(oshima): Consider adding a command line option to control
- // wallpaper images for testing.
- // The size is randomly picked.
- gfx::Size image_size(1366, 768);
- gfx::Canvas canvas(image_size, 1.0f, true);
- canvas.DrawColor(fill);
- SkPaint paint;
- paint.setColor(rect);
- paint.setStrokeWidth(10);
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setXfermodeMode(SkXfermode::kSrcOver_Mode);
- canvas.DrawRoundRect(gfx::Rect(image_size), 100, paint);
- return gfx::ImageSkia(canvas.ExtractImageRep());
-}
-
-} // namespace
-
-bool CycleDesktopBackgroundMode() {
- static int index = 0;
- DesktopBackgroundController* desktop_background_controller =
- Shell::GetInstance()->desktop_background_controller();
- switch (++index % 4) {
- case 0:
- ash::Shell::GetInstance()->user_wallpaper_delegate()->
- InitializeWallpaper();
- break;
- case 1:
- desktop_background_controller->SetCustomWallpaper(
- CreateWallpaperImage(SK_ColorRED, SK_ColorBLUE),
- WALLPAPER_LAYOUT_STRETCH);
- break;
- case 2:
- desktop_background_controller->SetCustomWallpaper(
- CreateWallpaperImage(SK_ColorBLUE, SK_ColorGREEN),
- WALLPAPER_LAYOUT_CENTER);
- break;
- case 3:
- desktop_background_controller->SetCustomWallpaper(
- CreateWallpaperImage(SK_ColorGREEN, SK_ColorRED),
- WALLPAPER_LAYOUT_CENTER_CROPPED);
- break;
- }
- return true;
-}
-
-} // namespace debug
-} // namespace ash
diff --git a/chromium/ash/accelerators/debug_commands.h b/chromium/ash/accelerators/debug_commands.h
deleted file mode 100644
index a064d4f54b8..00000000000
--- a/chromium/ash/accelerators/debug_commands.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_ACCELERATORS_DEBUG_COMMANDS_H_
-#define ASH_ACCELERATORS_DEBUG_COMMANDS_H_
-
-#include "ash/ash_export.h"
-
-// This file contains implementations of commands that are used only
-// when running on desktop for debugging.
-namespace ash {
-namespace debug {
-
-// Cycle through different wallpaper modes. This is used when running
-// on desktop for testing.
-ASH_EXPORT bool CycleDesktopBackgroundMode();
-
-} // namespace debug
-} // namespace ash
-
-#endif // ASH_ACCELERATORS_DEBUG_COMMANDS_H_
diff --git a/chromium/ash/accelerators/exit_warning_handler.cc b/chromium/ash/accelerators/exit_warning_handler.cc
deleted file mode 100644
index 776068ee0b7..00000000000
--- a/chromium/ash/accelerators/exit_warning_handler.cc
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/accelerators/exit_warning_handler.h"
-
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "ash/shell_window_ids.h"
-#include "base/strings/utf_string_conversions.h"
-#include "base/time/time.h"
-#include "base/timer/timer.h"
-#include "grit/ash_strings.h"
-#include "ui/aura/window.h"
-#include "ui/base/accessibility/accessible_view_state.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/font.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/fill_layout.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-namespace {
-
-const int64 kTimeOutMilliseconds = 2000;
-// Color of the text of the warning message.
-const SkColor kTextColor = SK_ColorWHITE;
-// Color of the window background.
-const SkColor kWindowBackgroundColor = SkColorSetARGB(0xC0, 0x0, 0x0, 0x0);
-// Radius of the rounded corners of the window.
-const int kWindowCornerRadius = 2;
-const int kHorizontalMarginAroundText = 100;
-const int kVerticalMarginAroundText = 100;
-
-class ExitWarningLabel : public views::Label {
- public:
- ExitWarningLabel() {}
-
- virtual ~ExitWarningLabel() {}
-
- private:
- virtual void PaintText(gfx::Canvas* canvas,
- const string16& text,
- const gfx::Rect& text_bounds,
- int flags) OVERRIDE {
- // Turn off subpixel rendering.
- views::Label::PaintText(canvas,
- text,
- text_bounds,
- flags | gfx::Canvas::NO_SUBPIXEL_RENDERING);
- }
-
- DISALLOW_COPY_AND_ASSIGN(ExitWarningLabel);
-};
-
-class ExitWarningWidgetDelegateView : public views::WidgetDelegateView {
- public:
- ExitWarningWidgetDelegateView() : text_width_(0), width_(0), height_(0) {
- text_ = l10n_util::GetStringUTF16(IDS_ASH_EXIT_WARNING_POPUP_TEXT);
- accessible_name_ =
- l10n_util::GetStringUTF16(IDS_ASH_EXIT_WARNING_POPUP_TEXT_ACCESSIBLE);
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- font_ = rb.GetFont(ui::ResourceBundle::LargeFont);
- text_width_ = font_.GetStringWidth(text_);
- width_ = text_width_ + kHorizontalMarginAroundText;
- height_ = font_.GetHeight() + kVerticalMarginAroundText;
- views::Label* label = new ExitWarningLabel;
- label->SetText(text_);
- label->SetHorizontalAlignment(gfx::ALIGN_CENTER);
- label->SetFont(font_);
- label->SetEnabledColor(kTextColor);
- label->SetDisabledColor(kTextColor);
- label->SetAutoColorReadabilityEnabled(false);
- AddChildView(label);
- SetLayoutManager(new views::FillLayout);
- }
-
- virtual gfx::Size GetPreferredSize() OVERRIDE {
- return gfx::Size(width_, height_);
- }
-
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- SkPaint paint;
- paint.setStyle(SkPaint::kFill_Style);
- paint.setColor(kWindowBackgroundColor);
- canvas->DrawRoundRect(GetLocalBounds(), kWindowCornerRadius, paint);
- views::WidgetDelegateView::OnPaint(canvas);
- }
-
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE {
- state->name = accessible_name_;
- state->role = ui::AccessibilityTypes::ROLE_ALERT;
- }
-
- private:
- base::string16 text_;
- base::string16 accessible_name_;
- gfx::Font font_;
- int text_width_;
- int width_;
- int height_;
-
- DISALLOW_COPY_AND_ASSIGN(ExitWarningWidgetDelegateView);
-};
-
-} // namespace
-
-ExitWarningHandler::ExitWarningHandler()
- : state_(IDLE),
- stub_timer_for_test_(false) {
-}
-
-ExitWarningHandler::~ExitWarningHandler() {
- // Note: If a timer is outstanding, it is stopped in its destructor.
- Hide();
-}
-
-void ExitWarningHandler::HandleAccelerator() {
- ShellDelegate* shell_delegate = Shell::GetInstance()->delegate();
- switch (state_) {
- case IDLE:
- state_ = WAIT_FOR_DOUBLE_PRESS;
- Show();
- StartTimer();
- Shell::GetInstance()->
- metrics()->RecordUserMetricsAction(UMA_ACCEL_EXIT_FIRST_Q);
- break;
- case WAIT_FOR_DOUBLE_PRESS:
- state_ = EXITING;
- CancelTimer();
- Hide();
- Shell::GetInstance()->
- metrics()->RecordUserMetricsAction(UMA_ACCEL_EXIT_SECOND_Q);
- shell_delegate->Exit();
- break;
- case EXITING:
- break;
- default:
- NOTREACHED();
- break;
- }
-}
-
-void ExitWarningHandler::TimerAction() {
- Hide();
- if (state_ == WAIT_FOR_DOUBLE_PRESS)
- state_ = IDLE;
-}
-
-void ExitWarningHandler::StartTimer() {
- if (stub_timer_for_test_)
- return;
- timer_.Start(FROM_HERE,
- base::TimeDelta::FromMilliseconds(kTimeOutMilliseconds),
- this,
- &ExitWarningHandler::TimerAction);
-}
-
-void ExitWarningHandler::CancelTimer() {
- timer_.Stop();
-}
-
-void ExitWarningHandler::Show() {
- if (widget_)
- return;
- aura::Window* root_window = Shell::GetTargetRootWindow();
- ExitWarningWidgetDelegateView* delegate = new ExitWarningWidgetDelegateView;
- gfx::Size rs = root_window->bounds().size();
- gfx::Size ps = delegate->GetPreferredSize();
- gfx::Rect bounds((rs.width() - ps.width()) / 2,
- (rs.height() - ps.height()) / 3,
- ps.width(), ps.height());
- views::Widget::InitParams params;
- params.type = views::Widget::InitParams::TYPE_POPUP;
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.accept_events = false;
- params.can_activate = false;
- params.keep_on_top = true;
- params.remove_standard_frame = true;
- params.delegate = delegate;
- params.bounds = bounds;
- params.parent = Shell::GetContainer(
- root_window,
- internal::kShellWindowId_SettingBubbleContainer);
- widget_.reset(new views::Widget);
- widget_->Init(params);
- widget_->SetContentsView(delegate);
- widget_->GetNativeView()->SetName("ExitWarningWindow");
- widget_->Show();
-
- delegate->NotifyAccessibilityEvent(ui::AccessibilityTypes::EVENT_ALERT, true);
-}
-
-void ExitWarningHandler::Hide() {
- widget_.reset();
-}
-
-} // namespace ash
diff --git a/chromium/ash/accelerators/exit_warning_handler.h b/chromium/ash/accelerators/exit_warning_handler.h
deleted file mode 100644
index b99681cb435..00000000000
--- a/chromium/ash/accelerators/exit_warning_handler.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_ACCELERATORS_EXIT_WARNING_HANDLER_H_
-#define ASH_ACCELERATORS_EXIT_WARNING_HANDLER_H_
-
-#include "ash/ash_export.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/timer/timer.h"
-#include "ui/base/accelerators/accelerator.h"
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-
-// In order to avoid accidental exits when the user presses the exit
-// shortcut by mistake, we require the user press it twice within a
-// period of time. During that time we show a popup informing the
-// user of this.
-//
-// Notes:
-//
-// The corresponding accelerator must be non-repeatable (see
-// kNonrepeatableActions in accelerator_table.cc). Otherwise the "Double Press
-// Exit" will be activated just by holding it down, i.e. probably every time.
-//
-// State Transition Diagrams:
-//
-// IDLE
-// | Press
-// WAIT_FOR_DOUBLE_PRESS action: show ui & start timers
-// | Press (before time limit )
-// EXITING action: hide ui, stop timer, exit
-//
-// IDLE
-// | Press
-// WAIT_FOR_DOUBLE_PRESS action: show ui & start timers
-// | T timer expires
-// IDLE action: hide ui
-//
-
-class AcceleratorControllerTest;
-
-class ASH_EXPORT ExitWarningHandler {
- public:
- ExitWarningHandler();
-
- ~ExitWarningHandler();
-
- // Handles accelerator for exit (Ctrl-Shift-Q).
- void HandleAccelerator();
-
- private:
- friend class AcceleratorControllerTest;
-
- enum State {
- IDLE,
- WAIT_FOR_DOUBLE_PRESS,
- EXITING
- };
-
- // Performs actions when the time limit is exceeded.
- void TimerAction();
-
- void StartTimer();
- void CancelTimer();
-
- void Show();
- void Hide();
-
- State state_;
- scoped_ptr<views::Widget> widget_;
- base::OneShotTimer<ExitWarningHandler> timer_;
-
- // Flag to suppress starting the timer for testing. For test we call
- // TimerAction() directly to simulate the expiration of the timer.
- bool stub_timer_for_test_;
-
- DISALLOW_COPY_AND_ASSIGN(ExitWarningHandler);
-};
-
-} // namespace ash
-
-#endif // ASH_ACCELERATORS_EXIT_WARNING_HANDLER_H_
diff --git a/chromium/ash/accelerators/focus_manager_factory.cc b/chromium/ash/accelerators/focus_manager_factory.cc
deleted file mode 100644
index 0695fd3e7a0..00000000000
--- a/chromium/ash/accelerators/focus_manager_factory.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/accelerators/focus_manager_factory.h"
-
-#include "ash/accelerators/accelerator_controller.h"
-#include "ash/shell.h"
-#include "ui/views/focus/focus_manager.h"
-
-namespace ash {
-
-AshFocusManagerFactory::AshFocusManagerFactory() {}
-AshFocusManagerFactory::~AshFocusManagerFactory() {}
-
-views::FocusManager* AshFocusManagerFactory::CreateFocusManager(
- views::Widget* widget,
- bool desktop_widget) {
- return new views::FocusManager(widget, desktop_widget ? NULL : new Delegate);
-}
-
-bool AshFocusManagerFactory::Delegate::ProcessAccelerator(
- const ui::Accelerator& accelerator) {
- AcceleratorController* controller =
- Shell::GetInstance()->accelerator_controller();
- if (controller)
- return controller->Process(accelerator);
- return false;
-}
-
-ui::AcceleratorTarget*
-AshFocusManagerFactory::Delegate::GetCurrentTargetForAccelerator(
- const ui::Accelerator& accelerator) const {
- AcceleratorController* controller =
- Shell::GetInstance()->accelerator_controller();
- if (controller && controller->IsRegistered(accelerator))
- return controller;
- return NULL;
-}
-
-} // namespace ash
diff --git a/chromium/ash/accelerators/focus_manager_factory.h b/chromium/ash/accelerators/focus_manager_factory.h
deleted file mode 100644
index cbe27cba9a3..00000000000
--- a/chromium/ash/accelerators/focus_manager_factory.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_ACCELERATORS_FOCUS_MANAGER_FACTORY_H_
-#define ASH_ACCELERATORS_FOCUS_MANAGER_FACTORY_H_
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/views/focus/focus_manager_delegate.h"
-#include "ui/views/focus/focus_manager_factory.h"
-
-namespace ash {
-
-// A factory class for creating a custom views::FocusManager object which
-// supports Ash shortcuts.
-class AshFocusManagerFactory : public views::FocusManagerFactory {
- public:
- AshFocusManagerFactory();
- virtual ~AshFocusManagerFactory();
-
- protected:
- // views::FocusManagerFactory overrides:
- virtual views::FocusManager* CreateFocusManager(
- views::Widget* widget,
- bool desktop_widget) OVERRIDE;
-
- private:
- class Delegate : public views::FocusManagerDelegate {
- public:
- // views::FocusManagerDelegate overrides:
- virtual bool ProcessAccelerator(
- const ui::Accelerator& accelerator) OVERRIDE;
- virtual ui::AcceleratorTarget* GetCurrentTargetForAccelerator(
- const ui::Accelerator& accelerator) const OVERRIDE;
- };
-
- DISALLOW_COPY_AND_ASSIGN(AshFocusManagerFactory);
-};
-
-} // namespace ash
-
-#endif // ASH_ACCELERATORS_FOCUS_MANAGER_FACTORY_H_
diff --git a/chromium/ash/accelerators/nested_dispatcher_controller.cc b/chromium/ash/accelerators/nested_dispatcher_controller.cc
deleted file mode 100644
index 82e477cd782..00000000000
--- a/chromium/ash/accelerators/nested_dispatcher_controller.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/accelerators/nested_dispatcher_controller.h"
-
-#include "ash/accelerators/accelerator_dispatcher.h"
-#include "ash/shell.h"
-#include "base/run_loop.h"
-
-namespace ash {
-
-NestedDispatcherController::NestedDispatcherController() {
-}
-
-NestedDispatcherController::~NestedDispatcherController() {
-}
-
-void NestedDispatcherController::RunWithDispatcher(
- base::MessageLoop::Dispatcher* nested_dispatcher,
- aura::Window* associated_window,
- bool nestable_tasks_allowed) {
- base::MessageLoopForUI* loop = base::MessageLoopForUI::current();
- bool did_allow_task_nesting = loop->NestableTasksAllowed();
- loop->SetNestableTasksAllowed(nestable_tasks_allowed);
-
- AcceleratorDispatcher dispatcher(nested_dispatcher, associated_window);
-
- // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them
- // use run_loop.QuitClosure().
- base::RunLoop run_loop(&dispatcher);
- run_loop.Run();
- loop->SetNestableTasksAllowed(did_allow_task_nesting);
-}
-
-} // namespace ash
diff --git a/chromium/ash/accelerators/nested_dispatcher_controller.h b/chromium/ash/accelerators/nested_dispatcher_controller.h
deleted file mode 100644
index c6f9320d447..00000000000
--- a/chromium/ash/accelerators/nested_dispatcher_controller.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_ACCELERATORS_NESTED_DISPATCHER_CONTROLLER_H_
-#define ASH_ACCELERATORS_NESTED_DISPATCHER_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "base/message_loop/message_loop.h"
-#include "ui/aura/client/dispatcher_client.h"
-#include "ui/aura/window.h"
-
-namespace ash {
-
-// Creates a dispatcher which wraps another dispatcher.
-// The outer dispatcher runs first and performs ash specific handling.
-// If it does not consume the event it forwards the event to the nested
-// dispatcher.
-class ASH_EXPORT NestedDispatcherController
- : public aura::client::DispatcherClient {
- public:
- NestedDispatcherController();
- virtual ~NestedDispatcherController();
-
- virtual void RunWithDispatcher(base::MessageLoop::Dispatcher* dispatcher,
- aura::Window* associated_window,
- bool nestable_tasks_allowed) OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NestedDispatcherController);
-};
-
-} // namespace ash
-
-#endif // ASH_ACCELERATORS_NESTED_DISPATCHER_CONTROLLER_H_
diff --git a/chromium/ash/accelerators/nested_dispatcher_controller_unittest.cc b/chromium/ash/accelerators/nested_dispatcher_controller_unittest.cc
deleted file mode 100644
index 445c29c96ca..00000000000
--- a/chromium/ash/accelerators/nested_dispatcher_controller_unittest.cc
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/accelerators/accelerator_controller.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "base/bind.h"
-#include "base/event_types.h"
-#include "base/message_loop/message_loop.h"
-#include "ui/aura/client/dispatcher_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/base/accelerators/accelerator.h"
-#include "ui/events/event_constants.h"
-#include "ui/events/event_utils.h"
-
-#if defined(USE_X11)
-#include <X11/Xlib.h>
-#include "ui/events/test/events_test_utils_x11.h"
-#endif // USE_X11
-
-namespace ash {
-namespace test {
-
-namespace {
-
-class MockDispatcher : public base::MessageLoop::Dispatcher {
- public:
- MockDispatcher() : num_key_events_dispatched_(0) {
- }
-
- int num_key_events_dispatched() { return num_key_events_dispatched_; }
-
-#if defined(OS_WIN) || defined(USE_X11) || defined(USE_OZONE)
- virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE {
- if (ui::EventTypeFromNative(event) == ui::ET_KEY_RELEASED)
- num_key_events_dispatched_++;
- return !ui::IsNoopEvent(event);
- }
-#endif
-
- private:
- int num_key_events_dispatched_;
-};
-
-class TestTarget : public ui::AcceleratorTarget {
- public:
- TestTarget() : accelerator_pressed_count_(0) {
- }
- virtual ~TestTarget() {
- }
-
- int accelerator_pressed_count() const {
- return accelerator_pressed_count_;
- }
-
- // Overridden from ui::AcceleratorTarget:
- virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE {
- accelerator_pressed_count_++;
- return true;
- }
- virtual bool CanHandleAccelerators() const OVERRIDE {
- return true;
- }
-
- private:
- int accelerator_pressed_count_;
-
- DISALLOW_COPY_AND_ASSIGN(TestTarget);
-};
-
-void DispatchKeyReleaseA() {
- // Sending both keydown and keyup is necessary here because the accelerator
- // manager only checks a keyup event following a keydown event. See
- // ShouldHandle() in ui/base/accelerators/accelerator_manager.cc for details.
-#if defined(OS_WIN)
- MSG native_event_down = { NULL, WM_KEYDOWN, ui::VKEY_A, 0 };
- ash::Shell::GetPrimaryRootWindow()->host()->PostNativeEvent(
- native_event_down);
- MSG native_event_up = { NULL, WM_KEYUP, ui::VKEY_A, 0 };
- ash::Shell::GetPrimaryRootWindow()->host()->PostNativeEvent(native_event_up);
-#elif defined(USE_X11)
- ui::ScopedXI2Event native_event;
- native_event.InitKeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_A, 0);
- aura::WindowEventDispatcher* dispatcher =
- ash::Shell::GetPrimaryRootWindow()->GetDispatcher();
- dispatcher->host()->PostNativeEvent(native_event);
- native_event.InitKeyEvent(ui::ET_KEY_RELEASED, ui::VKEY_A, 0);
- dispatcher->host()->PostNativeEvent(native_event);
-#endif
-
- // Send noop event to signal dispatcher to exit.
- dispatcher->host()->PostNativeEvent(ui::CreateNoopEvent());
-}
-
-} // namespace
-
-typedef AshTestBase NestedDispatcherTest;
-
-// Aura window below lock screen in z order.
-TEST_F(NestedDispatcherTest, AssociatedWindowBelowLockScreen) {
- MockDispatcher inner_dispatcher;
- scoped_ptr<aura::Window> associated_window(CreateTestWindowInShellWithId(0));
-
- Shell::GetInstance()->session_state_delegate()->LockScreen();
- DispatchKeyReleaseA();
- aura::Window* root_window = ash::Shell::GetPrimaryRootWindow();
- aura::client::GetDispatcherClient(root_window)->RunWithDispatcher(
- &inner_dispatcher,
- associated_window.get(),
- true /* nestable_tasks_allowed */);
- EXPECT_EQ(0, inner_dispatcher.num_key_events_dispatched());
- Shell::GetInstance()->session_state_delegate()->UnlockScreen();
-}
-
-// Aura window above lock screen in z order.
-TEST_F(NestedDispatcherTest, AssociatedWindowAboveLockScreen) {
- MockDispatcher inner_dispatcher;
-
- scoped_ptr<aura::Window>mock_lock_container(
- CreateTestWindowInShellWithId(0));
- aura::test::CreateTestWindowWithId(0, mock_lock_container.get());
- scoped_ptr<aura::Window> associated_window(CreateTestWindowInShellWithId(0));
- EXPECT_TRUE(aura::test::WindowIsAbove(associated_window.get(),
- mock_lock_container.get()));
-
- DispatchKeyReleaseA();
- aura::Window* root_window = ash::Shell::GetPrimaryRootWindow();
- aura::client::GetDispatcherClient(root_window)->RunWithDispatcher(
- &inner_dispatcher,
- associated_window.get(),
- true /* nestable_tasks_allowed */);
- EXPECT_EQ(1, inner_dispatcher.num_key_events_dispatched());
-}
-
-// Test that the nested dispatcher handles accelerators.
-TEST_F(NestedDispatcherTest, AcceleratorsHandled) {
- MockDispatcher inner_dispatcher;
- aura::Window* root_window = ash::Shell::GetPrimaryRootWindow();
-
- ui::Accelerator accelerator(ui::VKEY_A, ui::EF_NONE);
- accelerator.set_type(ui::ET_KEY_RELEASED);
- TestTarget target;
- Shell::GetInstance()->accelerator_controller()->Register(accelerator,
- &target);
-
- DispatchKeyReleaseA();
- aura::client::GetDispatcherClient(root_window)->RunWithDispatcher(
- &inner_dispatcher,
- root_window,
- true /* nestable_tasks_allowed */);
- EXPECT_EQ(0, inner_dispatcher.num_key_events_dispatched());
- EXPECT_EQ(1, target.accelerator_pressed_count());
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/accessibility_delegate.h b/chromium/ash/accessibility_delegate.h
deleted file mode 100644
index a4ef7ebdcda..00000000000
--- a/chromium/ash/accessibility_delegate.h
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_ACCESSIBILITY_DELEGATE_H_
-#define ASH_ACCESSIBILITY_DELEGATE_H_
-
-#include "ash/ash_export.h"
-#include "ash/magnifier/magnifier_constants.h"
-#include "base/time/time.h"
-
-namespace ash {
-
-enum AccessibilityNotificationVisibility {
- A11Y_NOTIFICATION_NONE,
- A11Y_NOTIFICATION_SHOW,
-};
-
-enum AccessibilityAlert {
- A11Y_ALERT_NONE,
- A11Y_ALERT_WINDOW_NEEDED
-};
-
-// A deletate class to control accessibility features.
-class ASH_EXPORT AccessibilityDelegate {
- public:
- virtual ~AccessibilityDelegate() {}
-
- // Invoked to toggle spoken feedback for accessibility
- virtual void ToggleSpokenFeedback(
- AccessibilityNotificationVisibility notify) = 0;
-
- // Returns true if spoken feedback is enabled.
- virtual bool IsSpokenFeedbackEnabled() const = 0;
-
- // Invoked to toggle high contrast mode for accessibility.
- virtual void ToggleHighContrast() = 0;
-
- // Returns true if high contrast mode is enabled.
- virtual bool IsHighContrastEnabled() const = 0;
-
- // Invoked to enable the screen magnifier.
- virtual void SetMagnifierEnabled(bool enabled) = 0;
-
- // Invoked to change the type of the screen magnifier.
- virtual void SetMagnifierType(MagnifierType type) = 0;
-
- // Returns true if the screen magnifier is enabled or not.
- virtual bool IsMagnifierEnabled() const = 0;
-
- // Returns the current screen magnifier mode.
- virtual MagnifierType GetMagnifierType() const = 0;
-
- // Invoked to enable Large Cursor.
- virtual void SetLargeCursorEnabled(bool enabled) = 0;
-
- // Returns ture if Large Cursor is enabled or not.
- virtual bool IsLargeCursorEnabled() const = 0;
-
- // Invoked to enable autoclick.
- virtual void SetAutoclickEnabled(bool enabled) = 0;
-
- // Returns if autoclick is enabled or not.
- virtual bool IsAutoclickEnabled() const = 0;
-
- // Returns true when the accessibility menu should be shown.
- virtual bool ShouldShowAccessibilityMenu() const = 0;
-
- // Cancel all current and queued speech immediately.
- virtual void SilenceSpokenFeedback() const = 0;
-
- // Saves the zoom scale of the full screen magnifier.
- virtual void SaveScreenMagnifierScale(double scale) = 0;
-
- // Gets a saved value of the zoom scale of full screen magnifier. If a value
- // is not saved, return a negative value.
- virtual double GetSavedScreenMagnifierScale() = 0;
-
- // Triggers an accessibility alert to give the user feedback.
- virtual void TriggerAccessibilityAlert(AccessibilityAlert alert) = 0;
-
- // Gets the last accessibility alert that was triggered.
- virtual AccessibilityAlert GetLastAccessibilityAlert() = 0;
-
- // Initiates play of shutdown sound and returns it's duration.
- virtual base::TimeDelta PlayShutdownSound() const = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_ACCESSIBILITYDELEGATE_H_
diff --git a/chromium/ash/ash.gyp b/chromium/ash/ash.gyp
index 4a21ba40a43..21fdc6cada6 100644
--- a/chromium/ash/ash.gyp
+++ b/chromium/ash/ash.gyp
@@ -7,9 +7,6 @@
'chromium_code': 1,
'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
},
- 'includes': [
- 'ash_resources.gypi',
- ],
'targets': [
{
'target_name': 'ash',
@@ -19,31 +16,32 @@
'../base/base.gyp:base_i18n',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'../cc/cc.gyp:cc',
- '../content/content.gyp:content',
'../content/content.gyp:content_browser',
- '../ipc/ipc.gyp:ipc',
'../media/media.gyp:media',
'../net/net.gyp:net',
'../skia/skia.gyp:skia',
'../third_party/icu/icu.gyp:icui18n',
'../third_party/icu/icu.gyp:icuuc',
+ '../ui/accessibility/accessibility.gyp:accessibility',
'../ui/app_list/app_list.gyp:app_list',
'../ui/aura/aura.gyp:aura',
- '../ui/base/strings/ui_strings.gyp:ui_strings',
+ '../ui/base/ui_base.gyp:ui_base',
'../ui/compositor/compositor.gyp:compositor',
'../ui/events/events.gyp:events',
+ '../ui/events/events.gyp:events_base',
'../ui/gfx/gfx.gyp:gfx',
+ '../ui/gfx/gfx.gyp:gfx_geometry',
'../ui/keyboard/keyboard.gyp:keyboard',
'../ui/message_center/message_center.gyp:message_center',
- '../ui/oak/oak.gyp:oak',
'../ui/resources/ui_resources.gyp:ui_resources',
- '../ui/ui.gyp:ui',
+ '../ui/strings/ui_strings.gyp:ui_strings',
'../ui/views/controls/webview/webview.gyp:webview',
'../ui/views/views.gyp:views',
'../ui/web_dialogs/web_dialogs.gyp:web_dialogs',
+ '../ui/wm/wm.gyp:wm',
'../url/url.gyp:url_lib',
+ 'ash_resources.gyp:ash_resources',
'ash_strings.gyp:ash_strings',
- 'ash_resources',
],
'defines': [
'ASH_IMPLEMENTATION',
@@ -54,21 +52,30 @@
'accelerators/accelerator_commands.h',
'accelerators/accelerator_controller.cc',
'accelerators/accelerator_controller.h',
- 'accelerators/accelerator_dispatcher.cc',
- 'accelerators/accelerator_dispatcher.h',
- 'accelerators/accelerator_filter.cc',
- 'accelerators/accelerator_filter.h',
+ 'accelerators/nested_accelerator_delegate.cc',
+ 'accelerators/nested_accelerator_delegate.h',
+ 'accelerators/accelerator_delegate.cc',
+ 'accelerators/accelerator_delegate.h',
'accelerators/accelerator_table.cc',
'accelerators/accelerator_table.h',
'accelerators/debug_commands.cc',
'accelerators/debug_commands.h',
'accelerators/exit_warning_handler.cc',
'accelerators/exit_warning_handler.h',
+ 'accelerators/key_hold_detector.cc',
+ 'accelerators/key_hold_detector.h',
'accelerators/focus_manager_factory.cc',
'accelerators/focus_manager_factory.h',
- 'accelerators/nested_dispatcher_controller.cc',
- 'accelerators/nested_dispatcher_controller.h',
+ 'accelerators/magnifier_key_scroller.cc',
+ 'accelerators/magnifier_key_scroller.h',
+ 'accelerators/spoken_feedback_toggler.cc',
+ 'accelerators/spoken_feedback_toggler.h',
+ 'accelerometer/accelerometer_controller.cc',
+ 'accelerometer/accelerometer_controller.h',
+ 'accelerometer/accelerometer_observer.h',
'accessibility_delegate.h',
+ 'audio/sounds.cc',
+ 'audio/sounds.h',
'autoclick/autoclick_controller.cc',
'autoclick/autoclick_controller.h',
'ash_constants.cc',
@@ -77,9 +84,6 @@
'ash_switches.h',
'cancel_mode.cc',
'cancel_mode.h',
- 'caps_lock_delegate.h',
- 'caps_lock_delegate_stub.cc',
- 'caps_lock_delegate_stub.h',
'debug.cc',
'debug.h',
'default_accessibility_delegate.cc',
@@ -97,8 +101,12 @@
'desktop_background/wallpaper_resizer.cc',
'desktop_background/wallpaper_resizer.h',
'desktop_background/wallpaper_resizer_observer.h',
+ 'display/cursor_window_controller.cc',
+ 'display/cursor_window_controller.h',
'display/display_change_observer_chromeos.cc',
'display/display_change_observer_chromeos.h',
+ 'display/display_configurator_animation.cc',
+ 'display/display_configurator_animation.h',
'display/display_controller.cc',
'display/display_controller.h',
'display/display_error_observer_chromeos.cc',
@@ -118,12 +126,14 @@
'display/mirror_window_controller.h',
'display/mouse_cursor_event_filter.cc',
'display/mouse_cursor_event_filter.h',
- 'display/output_configurator_animation.cc',
- 'display/output_configurator_animation.h',
+ 'display/projecting_observer_chromeos.cc',
+ 'display/projecting_observer_chromeos.h',
'display/resolution_notification_controller.cc',
'display/resolution_notification_controller.h',
'display/root_window_transformers.cc',
'display/root_window_transformers.h',
+ 'display/screen_ash.cc',
+ 'display/screen_ash.h',
'display/screen_position_controller.cc',
'display/screen_position_controller.h',
'display/shared_display_edge_indicator.cc',
@@ -136,7 +146,6 @@
'drag_drop/drag_drop_tracker.h',
'drag_drop/drag_image_view.cc',
'drag_drop/drag_image_view.h',
- 'event_rewriter_delegate.h',
'first_run/desktop_cleaner.cc',
'first_run/desktop_cleaner.h',
'first_run/first_run_helper.cc',
@@ -145,21 +154,56 @@
'first_run/first_run_helper_impl.h',
'focus_cycler.cc',
'focus_cycler.h',
+ 'frame/caption_buttons/caption_button_types.h',
+ 'frame/caption_buttons/frame_caption_button.cc',
+ 'frame/caption_buttons/frame_caption_button.h',
+ 'frame/caption_buttons/frame_caption_button_container_view.cc',
+ 'frame/caption_buttons/frame_caption_button_container_view.h',
+ 'frame/caption_buttons/frame_size_button.cc',
+ 'frame/caption_buttons/frame_size_button.h',
+ 'frame/caption_buttons/frame_size_button_delegate.h',
+ 'frame/custom_frame_view_ash.cc',
+ 'frame/custom_frame_view_ash.h',
+ 'frame/frame_border_hit_test_controller.cc',
+ 'frame/frame_border_hit_test_controller.h',
+ 'frame/default_header_painter.cc',
+ 'frame/default_header_painter.h',
+ 'frame/frame_util.cc',
+ 'frame/frame_util.h',
+ 'frame/header_painter.h',
+ 'frame/header_painter_util.cc',
+ 'frame/header_painter_util.h',
+ 'gpu_support.h',
+ 'gpu_support_stub.cc',
+ 'gpu_support_stub.h',
'high_contrast/high_contrast_controller.cc',
'high_contrast/high_contrast_controller.h',
- 'host/root_window_host_factory.cc',
- 'host/root_window_host_factory.h',
- 'host/root_window_host_factory_win.cc',
- 'keyboard_overlay/keyboard_overlay_delegate.cc',
- 'keyboard_overlay/keyboard_overlay_delegate.h',
- 'keyboard_overlay/keyboard_overlay_view.cc',
- 'keyboard_overlay/keyboard_overlay_view.h',
+ 'host/ash_remote_window_tree_host_win.cc',
+ 'host/ash_remote_window_tree_host_win.h',
+ 'host/ash_window_tree_host.h',
+ 'host/ash_window_tree_host_init_params.cc',
+ 'host/ash_window_tree_host_init_params.h',
+ 'host/ash_window_tree_host_ozone.cc',
+ 'host/ash_window_tree_host_win.cc',
+ 'host/ash_window_tree_host_x11.cc',
+ 'host/ash_window_tree_host_x11.h',
+ 'host/root_window_transformer.h',
+ 'host/transformer_helper.cc',
+ 'host/transformer_helper.h',
+ 'ime/candidate_view.cc',
+ 'ime/candidate_view.h',
+ 'ime/candidate_window_view.cc',
+ 'ime/candidate_window_view.h',
+ 'ime/infolist_window.cc',
+ 'ime/infolist_window.h',
+ 'ime/input_method_menu_item.cc',
+ 'ime/input_method_menu_item.h',
+ 'ime/input_method_menu_manager.cc',
+ 'ime/input_method_menu_manager.h',
+ 'ime/mode_indicator_view.cc',
+ 'ime/mode_indicator_view.h',
'keyboard_uma_event_filter.cc',
'keyboard_uma_event_filter.h',
- 'launcher/launcher.cc',
- 'launcher/launcher.h',
- 'launcher/launcher_types.cc',
- 'launcher/launcher_types.h',
'magnifier/magnification_controller.cc',
'magnifier/magnification_controller.h',
'magnifier/magnifier_constants.h',
@@ -179,16 +223,13 @@
'rotator/screen_rotation.h',
'scoped_target_root_window.cc',
'scoped_target_root_window.h',
- 'screen_ash.cc',
- 'screen_ash.h',
- 'screensaver/screensaver_view.cc',
- 'screensaver/screensaver_view.h',
+ 'screen_util.cc',
+ 'screen_util.h',
'screenshot_delegate.h',
- 'session_state_delegate.h',
- 'session_state_observer.cc',
- 'session_state_observer.h',
- 'shelf/alternate_app_list_button.cc',
- 'shelf/alternate_app_list_button.h',
+ 'session/session_state_delegate.h',
+ 'session/session_state_observer.cc',
+ 'session/session_state_observer.h',
+ 'session/user_info.h',
'shelf/app_list_button.cc',
'shelf/app_list_button.h',
'shelf/app_list_shelf_item_delegate.cc',
@@ -202,6 +243,8 @@
'shelf/overflow_button.cc',
'shelf/overflow_button.h',
'shelf/scoped_observer_with_duplicated_sources.h',
+ 'shelf/shelf.cc',
+ 'shelf/shelf.h',
'shelf/shelf_alignment_menu.cc',
'shelf/shelf_alignment_menu.h',
'shelf/shelf_bezel_event_filter.cc',
@@ -209,11 +252,15 @@
'shelf/shelf_button.cc',
'shelf/shelf_button.h',
'shelf/shelf_button_host.h',
+ 'shelf/shelf_constants.cc',
+ 'shelf/shelf_constants.h',
'shelf/shelf_delegate.h',
'shelf/shelf_icon_observer.h',
'shelf/shelf_item_delegate.h',
'shelf/shelf_item_delegate_manager.cc',
'shelf/shelf_item_delegate_manager.h',
+ 'shelf/shelf_item_types.cc',
+ 'shelf/shelf_item_types.h',
'shelf/shelf_layout_manager.cc',
'shelf/shelf_layout_manager.h',
'shelf/shelf_layout_manager_observer.h',
@@ -240,26 +287,47 @@
'shell.h',
'shell_delegate.h',
'shell_factory.h',
+ 'shell_init_params.cc',
+ 'shell_init_params.h',
'shell_window_ids.h',
+ 'sticky_keys/sticky_keys_state.h',
+ 'sticky_keys/sticky_keys_controller.cc',
+ 'sticky_keys/sticky_keys_controller.h',
+ 'sticky_keys/sticky_keys_overlay.cc',
+ 'sticky_keys/sticky_keys_overlay.h',
+ 'switchable_windows.cc',
+ 'switchable_windows.h',
+ 'system/audio/audio_observer.h',
+ 'system/audio/tray_audio.cc',
+ 'system/audio/tray_audio.h',
+ 'system/audio/tray_audio_delegate.h',
+ 'system/audio/volume_view.cc',
+ 'system/audio/volume_view.h',
'system/bluetooth/bluetooth_observer.h',
'system/bluetooth/tray_bluetooth.cc',
'system/bluetooth/tray_bluetooth.h',
'system/brightness_control_delegate.h',
- 'system/chromeos/audio/tray_audio.cc',
- 'system/chromeos/audio/tray_audio.h',
- 'system/chromeos/enterprise/enterprise_domain_observer.h',
+ 'system/chromeos/audio/audio_detailed_view.cc',
+ 'system/chromeos/audio/audio_detailed_view.h',
+ 'system/chromeos/audio/tray_audio_chromeos.cc',
+ 'system/chromeos/audio/tray_audio_chromeos.h',
+ 'system/chromeos/audio/tray_audio_delegate_chromeos.cc',
+ 'system/chromeos/audio/tray_audio_delegate_chromeos.h',
+ 'system/chromeos/bluetooth/bluetooth_notification_controller.cc',
+ 'system/chromeos/bluetooth/bluetooth_notification_controller.h',
'system/chromeos/brightness/brightness_controller_chromeos.cc',
'system/chromeos/brightness/brightness_controller_chromeos.h',
'system/chromeos/brightness/tray_brightness.cc',
'system/chromeos/brightness/tray_brightness.h',
- 'system/chromeos/enterprise/tray_enterprise.h',
+ 'system/chromeos/enterprise/enterprise_domain_observer.h',
'system/chromeos/enterprise/tray_enterprise.cc',
+ 'system/chromeos/enterprise/tray_enterprise.h',
'system/chromeos/keyboard_brightness_controller.cc',
'system/chromeos/keyboard_brightness_controller.h',
- 'system/chromeos/label_tray_view.h',
'system/chromeos/label_tray_view.cc',
- 'system/chromeos/managed/tray_locally_managed_user.h',
+ 'system/chromeos/label_tray_view.h',
'system/chromeos/managed/tray_locally_managed_user.cc',
+ 'system/chromeos/managed/tray_locally_managed_user.h',
'system/chromeos/network/network_connect.cc',
'system/chromeos/network/network_connect.h',
'system/chromeos/network/network_detailed_view.h',
@@ -269,6 +337,7 @@
'system/chromeos/network/network_icon_animation.h',
'system/chromeos/network/network_icon_animation_observer.h',
'system/chromeos/network/network_observer.h',
+ 'system/chromeos/network/network_portal_detector_observer.h',
'system/chromeos/network/network_state_list_detailed_view.cc',
'system/chromeos/network/network_state_list_detailed_view.h',
'system/chromeos/network/network_state_notifier.cc',
@@ -289,10 +358,10 @@
'system/chromeos/power/power_status_view.h',
'system/chromeos/power/tray_power.cc',
'system/chromeos/power/tray_power.h',
- 'system/chromeos/power/user_activity_notifier.cc',
- 'system/chromeos/power/user_activity_notifier.h',
'system/chromeos/power/video_activity_notifier.cc',
'system/chromeos/power/video_activity_notifier.h',
+ 'system/chromeos/rotation/tray_rotation_lock.cc',
+ 'system/chromeos/rotation/tray_rotation_lock.h',
'system/chromeos/screen_security/screen_capture_observer.h',
'system/chromeos/screen_security/screen_capture_tray_item.cc',
'system/chromeos/screen_security/screen_capture_tray_item.h',
@@ -301,15 +370,34 @@
'system/chromeos/screen_security/screen_share_tray_item.h',
'system/chromeos/screen_security/screen_tray_item.cc',
'system/chromeos/screen_security/screen_tray_item.h',
+ 'system/chromeos/session/last_window_closed_observer.h',
+ 'system/chromeos/session/last_window_closed_logout_reminder.cc',
+ 'system/chromeos/session/last_window_closed_logout_reminder.h',
+ 'system/chromeos/session/logout_button_observer.h',
+ 'system/chromeos/session/logout_button_tray.cc',
+ 'system/chromeos/session/logout_button_tray.h',
+ 'system/chromeos/session/logout_confirmation_controller.cc',
+ 'system/chromeos/session/logout_confirmation_controller.h',
+ 'system/chromeos/session/logout_confirmation_dialog.cc',
+ 'system/chromeos/session/logout_confirmation_dialog.h',
+ 'system/chromeos/session/session_length_limit_observer.h',
+ 'system/chromeos/session/tray_session_length_limit.cc',
+ 'system/chromeos/session/tray_session_length_limit.h',
'system/chromeos/settings/tray_settings.cc',
'system/chromeos/settings/tray_settings.h',
'system/chromeos/system_clock_observer.cc',
'system/chromeos/system_clock_observer.h',
+ 'system/chromeos/tray_caps_lock.cc',
+ 'system/chromeos/tray_caps_lock.h',
'system/chromeos/tray_display.cc',
'system/chromeos/tray_display.h',
'system/chromeos/tray_tracing.cc',
'system/chromeos/tray_tracing.h',
+ 'system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc',
+ 'system/chromeos/virtual_keyboard/virtual_keyboard_tray.h',
'system/date/clock_observer.h',
+ 'system/date/date_default_view.cc',
+ 'system/date/date_default_view.h',
'system/date/date_view.cc',
'system/date/date_view.h',
'system/date/tray_date.cc',
@@ -323,14 +411,8 @@
'system/keyboard_brightness/keyboard_brightness_control_delegate.h',
'system/locale/locale_notification_controller.cc',
'system/locale/locale_notification_controller.h',
- 'system/logout_button/logout_button_observer.h',
- 'system/logout_button/logout_button_tray.cc',
- 'system/logout_button/logout_button_tray.h',
- 'system/monitor/tray_monitor.cc',
- 'system/monitor/tray_monitor.h',
- 'system/session_length_limit/session_length_limit_observer.h',
- 'system/session_length_limit/tray_session_length_limit.cc',
- 'system/session_length_limit/tray_session_length_limit.h',
+ 'system/overview/overview_button_tray.h',
+ 'system/overview/overview_button_tray.cc',
'system/status_area_widget.cc',
'system/status_area_widget.h',
'system/status_area_widget_delegate.cc',
@@ -347,6 +429,9 @@
'system/tray/fixed_sized_scroll_view.h',
'system/tray/hover_highlight_view.cc',
'system/tray/hover_highlight_view.h',
+ 'system/tray/media_security/media_capture_observer.h',
+ 'system/tray/media_security/multi_profile_media_tray_item.cc',
+ 'system/tray/media_security/multi_profile_media_tray_item.h',
'system/tray/special_popup_row.cc',
'system/tray/special_popup_row.h',
'system/tray/system_tray.cc',
@@ -395,26 +480,44 @@
'system/tray/view_click_listener.h',
'system/tray_accessibility.cc',
'system/tray_accessibility.h',
- 'system/tray_caps_lock.cc',
- 'system/tray_caps_lock.h',
'system/tray_update.cc',
'system/tray_update.h',
+ 'system/user/accounts_detailed_view.cc',
+ 'system/user/accounts_detailed_view.h',
+ 'system/user/config.cc',
+ 'system/user/config.h',
+ 'system/user/button_from_view.cc',
+ 'system/user/button_from_view.h',
'system/user/login_status.cc',
'system/user/login_status.h',
+ 'system/user/rounded_image_view.cc',
+ 'system/user/rounded_image_view.h',
'system/user/tray_user.cc',
'system/user/tray_user.h',
'system/user/tray_user_separator.cc',
'system/user/tray_user_separator.h',
'system/user/update_observer.h',
'system/user/user_observer.h',
+ 'system/user/user_accounts_delegate.cc',
+ 'system/user/user_accounts_delegate.h',
+ 'system/user/user_card_view.cc',
+ 'system/user/user_card_view.h',
+ 'system/user/user_view.cc',
+ 'system/user/user_view.h',
'system/web_notification/web_notification_tray.cc',
'system/web_notification/web_notification_tray.h',
+ 'system/win/audio/tray_audio_delegate_win.cc',
+ 'system/win/audio/tray_audio_delegate_win.h',
+ 'system/win/audio/tray_audio_win.cc',
+ 'system/win/audio/tray_audio_win.h',
'touch/touch_hud_debug.cc',
'touch/touch_hud_debug.h',
'touch/touch_hud_projection.cc',
'touch/touch_hud_projection.h',
'touch/touch_observer_hud.cc',
'touch/touch_observer_hud.h',
+ 'touch/touch_transformer_controller.cc',
+ 'touch/touch_transformer_controller.h',
'touch/touch_uma.cc',
'touch/touch_uma.h',
'volume_control_delegate.h',
@@ -426,31 +529,14 @@
'wm/ash_native_cursor_manager.h',
'wm/ash_focus_rules.cc',
'wm/ash_focus_rules.h',
- 'wm/base_layout_manager.cc',
- 'wm/base_layout_manager.h',
'wm/boot_splash_screen_chromeos.cc',
'wm/boot_splash_screen_chromeos.h',
- 'wm/caption_buttons/alternate_frame_size_button.cc',
- 'wm/caption_buttons/alternate_frame_size_button.h',
- 'wm/caption_buttons/alternate_frame_size_button_delegate.h',
- 'wm/caption_buttons/bubble_contents_button_row.cc',
- 'wm/caption_buttons/bubble_contents_button_row.h',
- 'wm/caption_buttons/caption_button_types.h',
- 'wm/caption_buttons/frame_caption_button.cc',
- 'wm/caption_buttons/frame_caption_button.h',
- 'wm/caption_buttons/frame_caption_button_container_view.cc',
- 'wm/caption_buttons/frame_caption_button_container_view.h',
- 'wm/caption_buttons/frame_maximize_button.cc',
- 'wm/caption_buttons/frame_maximize_button.h',
- 'wm/caption_buttons/frame_maximize_button_observer.h',
- 'wm/caption_buttons/maximize_bubble_controller.cc',
- 'wm/caption_buttons/maximize_bubble_controller.h',
- 'wm/caption_buttons/maximize_bubble_controller_bubble.cc',
- 'wm/caption_buttons/maximize_bubble_controller_bubble.h',
+ 'wm/cursor_manager_chromeos.cc',
+ 'wm/cursor_manager_chromeos.h',
'wm/coordinate_conversion.cc',
'wm/coordinate_conversion.h',
- 'wm/custom_frame_view_ash.cc',
- 'wm/custom_frame_view_ash.h',
+ 'wm/default_state.cc',
+ 'wm/default_state.h',
'wm/default_window_resizer.cc',
'wm/default_window_resizer.h',
'wm/dock/docked_window_layout_manager.cc',
@@ -458,39 +544,46 @@
'wm/dock/docked_window_layout_manager_observer.h',
'wm/dock/docked_window_resizer.cc',
'wm/dock/docked_window_resizer.h',
+ 'wm/drag_details.cc',
+ 'wm/drag_details.h',
'wm/drag_window_controller.cc',
'wm/drag_window_controller.h',
'wm/drag_window_resizer.cc',
'wm/drag_window_resizer.h',
'wm/event_client_impl.cc',
'wm/event_client_impl.h',
- 'wm/event_rewriter_event_filter.cc',
- 'wm/event_rewriter_event_filter.h',
- 'wm/frame_border_hit_test_controller.cc',
- 'wm/frame_border_hit_test_controller.h',
- 'wm/header_painter.cc',
- 'wm/header_painter.h',
'wm/gestures/long_press_affordance_handler.cc',
'wm/gestures/long_press_affordance_handler.h',
'wm/gestures/overview_gesture_handler.cc',
'wm/gestures/overview_gesture_handler.h',
'wm/gestures/shelf_gesture_handler.cc',
'wm/gestures/shelf_gesture_handler.h',
- 'wm/gestures/system_pinch_handler.cc',
- 'wm/gestures/system_pinch_handler.h',
'wm/gestures/tray_gesture_handler.cc',
'wm/gestures/tray_gesture_handler.h',
- 'wm/gestures/two_finger_drag_handler.cc',
- 'wm/gestures/two_finger_drag_handler.h',
- 'wm/image_cursors.cc',
- 'wm/image_cursors.h',
'wm/immersive_fullscreen_controller.cc',
'wm/immersive_fullscreen_controller.h',
'wm/immersive_revealed_lock.cc',
'wm/immersive_revealed_lock.h',
+ 'wm/lock_layout_manager.cc',
+ 'wm/lock_layout_manager.h',
'wm/lock_state_controller.cc',
'wm/lock_state_controller.h',
'wm/lock_state_observer.h',
+ 'wm/lock_window_state.cc',
+ 'wm/lock_window_state.h',
+ 'wm/maximize_mode/internal_input_device_list.h',
+ 'wm/maximize_mode/internal_input_device_list_x11.cc',
+ 'wm/maximize_mode/internal_input_device_list_x11.h',
+ 'wm/maximize_mode/maximize_mode_controller.cc',
+ 'wm/maximize_mode/maximize_mode_controller.h',
+ 'wm/maximize_mode/maximize_mode_event_blocker.cc',
+ 'wm/maximize_mode/maximize_mode_event_blocker.h',
+ 'wm/maximize_mode/maximize_mode_window_manager.cc',
+ 'wm/maximize_mode/maximize_mode_window_manager.h',
+ 'wm/maximize_mode/maximize_mode_window_state.cc',
+ 'wm/maximize_mode/maximize_mode_window_state.h',
+ 'wm/maximize_mode/workspace_backdrop_delegate.cc',
+ 'wm/maximize_mode/workspace_backdrop_delegate.h',
'wm/mru_window_tracker.cc',
'wm/mru_window_tracker.h',
'wm/overlay_event_filter.cc',
@@ -499,10 +592,16 @@
'wm/overview/scoped_transform_overview_window.h',
'wm/overview/scoped_window_copy.cc',
'wm/overview/scoped_window_copy.h',
- 'wm/overview/window_overview.cc',
- 'wm/overview/window_overview.h',
+ 'wm/overview/window_grid.cc',
+ 'wm/overview/window_grid.h',
'wm/overview/window_selector.cc',
'wm/overview/window_selector.h',
+ 'wm/window_cycle_controller.cc',
+ 'wm/window_cycle_controller.h',
+ 'wm/window_cycle_list.cc',
+ 'wm/window_cycle_list.h',
+ 'wm/overview/transparent_activate_window_button.cc',
+ 'wm/overview/transparent_activate_window_button.h',
'wm/overview/window_selector_controller.cc',
'wm/overview/window_selector_controller.h',
'wm/overview/window_selector_delegate.h',
@@ -512,6 +611,8 @@
'wm/overview/window_selector_panels.h',
'wm/overview/window_selector_window.cc',
'wm/overview/window_selector_window.h',
+ 'wm/panels/attached_panel_window_targeter.cc',
+ 'wm/panels/attached_panel_window_targeter.h',
'wm/panels/panel_frame_view.cc',
'wm/panels/panel_frame_view.h',
'wm/panels/panel_layout_manager.cc',
@@ -524,6 +625,8 @@
'wm/partial_screenshot_view.h',
'wm/power_button_controller.cc',
'wm/power_button_controller.h',
+ 'wm/resize_handle_window_targeter.cc',
+ 'wm/resize_handle_window_targeter.h',
'wm/resize_shadow.cc',
'wm/resize_shadow.h',
'wm/resize_shadow_controller.cc',
@@ -534,14 +637,10 @@
'wm/screen_dimmer.h',
'wm/session_state_animator.cc',
'wm/session_state_animator.h',
- 'wm/solo_window_tracker.cc',
- 'wm/solo_window_tracker.h',
'wm/stacking_controller.cc',
'wm/stacking_controller.h',
'wm/status_area_layout_manager.cc',
'wm/status_area_layout_manager.h',
- 'wm/sticky_keys.cc',
- 'wm/sticky_keys.h',
'wm/system_background_controller.cc',
'wm/system_background_controller.h',
'wm/system_gesture_event_filter.cc',
@@ -553,17 +652,10 @@
'wm/system_modal_container_layout_manager.h',
'wm/toplevel_window_event_handler.cc',
'wm/toplevel_window_event_handler.h',
- 'wm/user_activity_detector.cc',
- 'wm/user_activity_detector.h',
- 'wm/user_activity_observer.h',
'wm/video_detector.cc',
'wm/video_detector.h',
'wm/window_animations.cc',
'wm/window_animations.h',
- 'wm/window_cycle_controller.cc',
- 'wm/window_cycle_controller.h',
- 'wm/window_cycle_list.cc',
- 'wm/window_cycle_list.h',
'wm/window_positioner.cc',
'wm/window_positioner.h',
'wm/window_state.cc',
@@ -571,12 +663,16 @@
'wm/window_state_delegate.cc',
'wm/window_state_delegate.h',
'wm/window_state_observer.h',
+ 'wm/window_state_util.cc',
+ 'wm/window_state_util.h',
'wm/window_properties.cc',
'wm/window_properties.h',
'wm/window_resizer.cc',
'wm/window_resizer.h',
'wm/window_util.cc',
'wm/window_util.h',
+ 'wm/wm_event.cc',
+ 'wm/wm_event.h',
'wm/wm_types.cc',
'wm/wm_types.h',
'wm/workspace_controller.cc',
@@ -587,13 +683,13 @@
'wm/workspace/multi_window_resize_controller.h',
'wm/workspace/phantom_window_controller.cc',
'wm/workspace/phantom_window_controller.h',
- 'wm/workspace/snap_sizer.cc',
- 'wm/workspace/snap_sizer.h',
- 'wm/workspace/snap_types.h',
+ 'wm/workspace/two_step_edge_cycler.cc',
+ 'wm/workspace/two_step_edge_cycler.h',
'wm/workspace/workspace_event_handler.cc',
'wm/workspace/workspace_event_handler.h',
'wm/workspace/workspace_layout_manager.cc',
'wm/workspace/workspace_layout_manager.h',
+ 'wm/workspace/workspace_layout_manager_delegate.h',
'wm/workspace/workspace_types.h',
'wm/workspace/workspace_window_resizer.cc',
'wm/workspace/workspace_window_resizer.h',
@@ -601,81 +697,145 @@
'conditions': [
['OS=="win"', {
'sources/': [
- ['exclude', 'host/root_window_host_factory.cc'],
- ['exclude', 'wm/sticky_keys.cc'],
- ['exclude', 'wm/sticky_keys.h'],
+ ['exclude', 'host/window_tree_host_factory.cc'],
+ ['exclude', 'sticky_keys/sticky_keys_controller.cc'],
+ ['exclude', 'sticky_keys/sticky_keys_controller.h'],
],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
}],
- ['OS!="linux"', {
- 'sources/': [
- ['exclude', 'system/monitor/tray_monitor.cc'],
- ['exclude', 'system/monitor/tray_monitor.h'],
- ],
- }],
['use_x11!=1', {
'sources/': [
- ['exclude', 'display/display_change_observer_chromeos.cc'],
- ['exclude', 'display/display_change_observer_chromeos.h'],
- ['exclude', 'display/display_error_observer_chromeos.cc'],
- ['exclude', 'display/display_error_observer_chromeos.h'],
+ ['exclude', 'accelerators/key_hold_detector.cc'],
+ ['exclude', 'accelerators/key_hold_detector.h'],
+ ['exclude', 'accelerators/magnifier_key_scroller.cc'],
+ ['exclude', 'accelerators/magnifier_key_scroller.h'],
+ ['exclude', 'accelerators/spoken_feedback_toggler.cc'],
+ ['exclude', 'accelerators/spoken_feedback_toggler.h'],
+ ['exclude', 'touch/touch_transformer_controller.cc'],
+ ['exclude', 'touch/touch_transformer_controller.h'],
],
+ }, { # else: use_x11==1
+ 'dependencies': [
+ '../build/linux/system.gyp:xfixes',
+ ],
}],
['chromeos==1', {
'dependencies': [
'../chromeos/chromeos.gyp:chromeos',
# Ash #includes power_supply_properties.pb.h directly.
'../chromeos/chromeos.gyp:power_manager_proto',
+ '../device/bluetooth/bluetooth.gyp:device_bluetooth',
+ '../ui/chromeos/ui_chromeos.gyp:ui_chromeos',
+ '../ui/display/display.gyp:display',
+ '../ui/display/display.gyp:display_util',
],
}, { # else: chromeos!=1
'sources/': [
- ['exclude', '/chromeos/'],
- ['exclude', 'display/output_configurator_animation.cc'],
- ['exclude', 'display/output_configurator_animation.h'],
+ ['exclude', 'display/display_configurator_animation.cc'],
+ ['exclude', 'display/display_configurator_animation.h'],
+ ['exclude', 'display/resolution_notification_controller.cc'],
+ ['exclude', 'display/resolution_notification_controller.h'],
+ ['exclude', 'system/tray/media_security/media_capture_observer.h'],
+ ['exclude', 'system/tray/media_security/multi_profile_media_tray_item.cc'],
+ ['exclude', 'system/tray/media_security/multi_profile_media_tray_item.h'],
+ ['exclude', 'touch/touch_transformer_controller.cc'],
+ ['exclude', 'touch/touch_transformer_controller.h'],
],
}],
],
},
{
+ 'target_name': 'ash_with_content',
+ 'type': '<(component)',
+ 'dependencies': [
+ '../base/base.gyp:base',
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ '../content/content.gyp:content_browser',
+ '../ipc/ipc.gyp:ipc',
+ '../skia/skia.gyp:skia',
+ '../ui/aura/aura.gyp:aura',
+ '../ui/base/ui_base.gyp:ui_base',
+ '../ui/compositor/compositor.gyp:compositor',
+ '../ui/events/events.gyp:events',
+ '../ui/gfx/gfx.gyp:gfx',
+ '../ui/gfx/gfx.gyp:gfx_geometry',
+ '../ui/resources/ui_resources.gyp:ui_resources',
+ '../ui/strings/ui_strings.gyp:ui_strings',
+ '../ui/views/controls/webview/webview.gyp:webview',
+ '../ui/views/views.gyp:views',
+ '../ui/web_dialogs/web_dialogs.gyp:web_dialogs',
+ '../url/url.gyp:url_lib',
+ 'ash',
+ 'ash_resources.gyp:ash_resources',
+ 'ash_strings.gyp:ash_strings',
+ ],
+ 'defines': [
+ 'ASH_WITH_CONTENT_IMPLEMENTATION',
+ ],
+ 'sources': [
+ 'content_support/ash_with_content_export.h',
+ 'content_support/gpu_support_impl.cc',
+ 'content_support/gpu_support_impl.h',
+ 'screensaver/screensaver_view.cc',
+ 'screensaver/screensaver_view.h',
+ 'keyboard_overlay/keyboard_overlay_delegate.cc',
+ 'keyboard_overlay/keyboard_overlay_delegate.h',
+ 'keyboard_overlay/keyboard_overlay_view.cc',
+ 'keyboard_overlay/keyboard_overlay_view.h',
+ ],
+ },
+ {
'target_name': 'ash_test_support',
'type': 'static_library',
'dependencies': [
'../skia/skia.gyp:skia',
'../testing/gtest.gyp:gtest',
+ '../ui/accessibility/accessibility.gyp:ax_gen',
'../ui/app_list/app_list.gyp:app_list_test_support',
+ '../ui/views/views.gyp:views_test_support',
'ash',
- 'ash_resources',
+ 'ash_resources.gyp:ash_resources',
],
'sources': [
- 'shell/toplevel_window.cc',
- 'shell/toplevel_window.h',
+ 'desktop_background/desktop_background_controller_test_api.cc',
+ 'desktop_background/desktop_background_controller_test_api.h',
'shell/keyboard_controller_proxy_stub.cc',
'shell/keyboard_controller_proxy_stub.h',
+ 'shell/toplevel_window.cc',
+ 'shell/toplevel_window.h',
'test/app_list_controller_test_api.cc',
'test/app_list_controller_test_api.h',
'test/ash_test_base.cc',
'test/ash_test_base.h',
'test/ash_test_helper.cc',
'test/ash_test_helper.h',
+ 'test/ash_test_views_delegate.cc',
+ 'test/ash_test_views_delegate.h',
+ 'test/child_modal_window.cc',
+ 'test/child_modal_window.h',
'test/cursor_manager_test_api.cc',
'test/cursor_manager_test_api.h',
'test/display_manager_test_api.cc',
'test/display_manager_test_api.h',
- 'test/launcher_test_api.cc',
- 'test/launcher_test_api.h',
'test/mirror_window_test_api.cc',
'test/mirror_window_test_api.h',
'test/overflow_bubble_view_test_api.cc',
'test/overflow_bubble_view_test_api.h',
'test/shelf_item_delegate_manager_test_api.cc',
'test/shelf_item_delegate_manager_test_api.h',
+ 'test/shelf_test_api.cc',
+ 'test/shelf_test_api.h',
'test/shelf_view_test_api.cc',
'test/shelf_view_test_api.h',
'test/shell_test_api.cc',
'test/shell_test_api.h',
+ 'test/status_area_widget_test_helper.cc',
+ 'test/status_area_widget_test_helper.h',
'test/test_activation_delegate.cc',
'test/test_activation_delegate.h',
+ 'test/test_lock_state_controller_delegate.cc',
+ 'test/test_lock_state_controller_delegate.h',
'test/test_screenshot_delegate.cc',
'test/test_screenshot_delegate.cc',
'test/test_session_state_delegate.cc',
@@ -694,6 +854,8 @@
'test/test_system_tray_delegate.h',
'test/test_user_wallpaper_delegate.cc',
'test/test_user_wallpaper_delegate.h',
+ 'test/test_volume_control_delegate.cc',
+ 'test/test_volume_control_delegate.h',
'test/ui_controls_factory_ash.cc',
'test/ui_controls_factory_ash.h',
],
@@ -726,40 +888,42 @@
'../testing/gtest.gyp:gtest',
'../third_party/icu/icu.gyp:icui18n',
'../third_party/icu/icu.gyp:icuuc',
+ '../ui/accessibility/accessibility.gyp:accessibility',
'../ui/app_list/app_list.gyp:app_list',
'../ui/aura/aura.gyp:aura',
'../ui/aura/aura.gyp:aura_test_support',
+ '../ui/base/ui_base.gyp:ui_base',
+ '../ui/base/ui_base.gyp:ui_base_test_support',
'../ui/compositor/compositor.gyp:compositor',
+ '../ui/compositor/compositor.gyp:compositor_test_support',
'../ui/events/events.gyp:events',
'../ui/events/events.gyp:events_test_support',
+ '../ui/events/events.gyp:gesture_detection',
'../ui/gfx/gfx.gyp:gfx',
+ '../ui/gfx/gfx.gyp:gfx_geometry',
'../ui/keyboard/keyboard.gyp:keyboard',
'../ui/message_center/message_center.gyp:message_center',
'../ui/message_center/message_center.gyp:message_center_test_support',
'../ui/resources/ui_resources.gyp:ui_resources',
- '../ui/ui.gyp:ui',
- '../ui/ui_unittests.gyp:ui_test_support',
+ '../ui/views/controls/webview/webview_tests.gyp:webview_test_support',
'../ui/views/views.gyp:views',
- '../ui/views/views.gyp:views_examples_with_content_lib',
'../ui/views/views.gyp:views_test_support',
- '../ui/views/views.gyp:views_with_content_test_support',
'../ui/web_dialogs/web_dialogs.gyp:web_dialogs_test_support',
+ '../ui/wm/wm.gyp:wm',
'../url/url.gyp:url_lib',
- 'ash_strings.gyp:ash_strings',
'ash',
- 'ash_resources',
+ 'ash_resources.gyp:ash_resources',
+ 'ash_strings.gyp:ash_strings',
'ash_test_support',
+ 'ash_with_content',
],
'sources': [
- '../ui/compositor/test/layer_animator_test_controller.cc',
- '../ui/compositor/test/layer_animator_test_controller.h',
- '../ui/views/test/test_views_delegate.cc',
- '../ui/views/test/test_views_delegate.h',
'accelerators/accelerator_commands_unittest.cc',
'accelerators/accelerator_controller_unittest.cc',
'accelerators/accelerator_filter_unittest.cc',
'accelerators/accelerator_table_unittest.cc',
- 'accelerators/nested_dispatcher_controller_unittest.cc',
+ 'accelerators/magnifier_key_scroller_unittest.cc',
+ 'accelerators/spoken_feedback_toggler_unittest.cc',
'autoclick/autoclick_unittest.cc',
'desktop_background/desktop_background_controller_unittest.cc',
'desktop_background/wallpaper_resizer_unittest.cc',
@@ -772,6 +936,7 @@
'display/mirror_window_controller_unittest.cc',
'display/virtual_keyboard_window_controller_unittest.cc',
'display/mouse_cursor_event_filter_unittest.cc',
+ 'display/projecting_observer_chromeos_unittest.cc',
'display/resolution_notification_controller_unittest.cc',
'display/root_window_transformers_unittest.cc',
'display/screen_position_controller_unittest.cc',
@@ -779,52 +944,48 @@
'drag_drop/drag_drop_tracker_unittest.cc',
'extended_desktop_unittest.cc',
'focus_cycler_unittest.cc',
+ 'frame/caption_buttons/frame_caption_button_container_view_unittest.cc',
+ 'frame/caption_buttons/frame_size_button_unittest.cc',
+ 'frame/custom_frame_view_ash_unittest.cc',
+ 'frame/default_header_painter_unittest.cc',
+ 'host/ash_window_tree_host_x11_unittest.cc',
+ 'ime/candidate_view_unittest.cc',
+ 'ime/candidate_window_view_unittest.cc',
+ 'ime/input_method_menu_item_unittest.cc',
+ 'ime/input_method_menu_manager_unittest.cc',
'keyboard_overlay/keyboard_overlay_delegate_unittest.cc',
'keyboard_overlay/keyboard_overlay_view_unittest.cc',
- 'launcher/launcher_unittest.cc',
'magnifier/magnification_controller_unittest.cc',
'root_window_controller_unittest.cc',
- 'screen_ash_unittest.cc',
+ 'screen_util_unittest.cc',
'screensaver/screensaver_view_unittest.cc',
- 'session_state_delegate_stub.cc',
- 'session_state_delegate_stub.h',
'shelf/scoped_observer_with_duplicated_sources_unittest.cc',
'shelf/shelf_layout_manager_unittest.cc',
'shelf/shelf_model_unittest.cc',
'shelf/shelf_navigator_unittest.cc',
'shelf/shelf_tooltip_manager_unittest.cc',
+ 'shelf/shelf_unittest.cc',
'shelf/shelf_view_unittest.cc',
'shelf/shelf_widget_unittest.cc',
'shelf/shelf_window_watcher_unittest.cc',
- 'shell/app_list.cc',
- 'shell/bubble.cc',
- 'shell/context_menu.cc',
- 'shell/context_menu.h',
- 'shell/lock_view.cc',
- 'shell/panel_window.cc',
- 'shell/panel_window.h',
- 'shell/shelf_delegate_impl.cc',
- 'shell/shelf_delegate_impl.h',
- 'shell/shell_delegate_impl.cc',
- 'shell/shell_delegate_impl.h',
- 'shell/widgets.cc',
- 'shell/window_type_launcher.cc',
- 'shell/window_type_launcher.h',
- 'shell/window_watcher.cc',
- 'shell/window_watcher.h',
- 'shell/window_watcher_shelf_item_delegate.cc',
- 'shell/window_watcher_shelf_item_delegate.h',
- 'shell/window_watcher_unittest.cc',
'shell_unittest.cc',
+ 'sticky_keys/sticky_keys_overlay_unittest.cc',
+ 'sticky_keys/sticky_keys_unittest.cc',
+ 'system/chromeos/brightness/tray_brightness_unittest.cc',
'system/chromeos/managed/tray_locally_managed_user_unittest.cc',
'system/chromeos/network/network_state_notifier_unittest.cc',
'system/chromeos/power/power_event_observer_unittest.cc',
'system/chromeos/power/power_status_unittest.cc',
+ 'system/chromeos/power/power_status_view_unittest.cc',
'system/chromeos/power/tray_power_unittest.cc',
+ 'system/chromeos/rotation/tray_rotation_lock_unittest.cc',
'system/chromeos/screen_security/screen_tray_item_unittest.cc',
+ 'system/chromeos/session/logout_confirmation_controller_unittest.cc',
+ 'system/chromeos/session/tray_session_length_limit_unittest.cc',
'system/chromeos/tray_display_unittest.cc',
'system/date/date_view_unittest.cc',
- 'system/session_length_limit/tray_session_length_limit_unittest.cc',
+ 'system/overview/overview_button_tray_unittest.cc',
+ 'system/tray/media_security/multi_profile_media_tray_item_unittest.cc',
'system/tray/system_tray_unittest.cc',
'system/tray/tray_details_view_unittest.cc',
'system/user/tray_user_unittest.cc',
@@ -833,19 +994,19 @@
'test/ash_unittests.cc',
'tooltips/tooltip_controller_unittest.cc',
'touch/touch_observer_hud_unittest.cc',
+ 'touch/touch_transformer_controller_unittest.cc',
'wm/app_list_controller_unittest.cc',
'wm/ash_native_cursor_manager_unittest.cc',
- 'wm/base_layout_manager_unittest.cc',
- 'wm/caption_buttons/alternate_frame_size_button_unittest.cc',
- 'wm/caption_buttons/frame_caption_button_container_view_unittest.cc',
- 'wm/caption_buttons/frame_maximize_button_unittest.cc',
'wm/dock/docked_window_layout_manager_unittest.cc',
'wm/dock/docked_window_resizer_unittest.cc',
'wm/drag_window_resizer_unittest.cc',
'wm/gestures/overview_gesture_handler_unittest.cc',
- 'wm/header_painter_unittest.cc',
'wm/immersive_fullscreen_controller_unittest.cc',
+ 'wm/lock_layout_manager_unittest.cc',
'wm/lock_state_controller_unittest.cc',
+ 'wm/maximize_mode/accelerometer_test_data_literals.cc',
+ 'wm/maximize_mode/maximize_mode_controller_unittest.cc',
+ 'wm/maximize_mode/maximize_mode_window_manager_unittest.cc',
'wm/mru_window_tracker_unittest.cc',
'wm/overview/window_selector_unittest.cc',
'wm/panels/panel_layout_manager_unittest.cc',
@@ -853,23 +1014,22 @@
'wm/partial_screenshot_view_unittest.cc',
'wm/resize_shadow_and_cursor_unittest.cc',
'wm/screen_dimmer_unittest.cc',
- 'wm/solo_window_tracker_unittest.cc',
'wm/stacking_controller_unittest.cc',
- 'wm/sticky_keys_unittest.cc',
'wm/system_gesture_event_filter_unittest.cc',
'wm/system_modal_container_layout_manager_unittest.cc',
'wm/toplevel_window_event_handler_unittest.cc',
- 'wm/user_activity_detector_unittest.cc',
'wm/video_detector_unittest.cc',
'wm/window_animations_unittest.cc',
'wm/window_cycle_controller_unittest.cc',
'wm/window_manager_unittest.cc',
'wm/window_modality_controller_unittest.cc',
'wm/window_positioner_unittest.cc',
+ 'wm/window_state_unittest.cc',
'wm/window_util_unittest.cc',
+ 'wm/maximize_mode/workspace_backdrop_delegate.cc',
+ 'wm/maximize_mode/workspace_backdrop_delegate.h',
'wm/workspace/magnetism_matcher_unittest.cc',
'wm/workspace/multi_window_resize_controller_unittest.cc',
- 'wm/workspace/snap_sizer_unittest.cc',
'wm/workspace/workspace_event_handler_test_helper.cc',
'wm/workspace/workspace_event_handler_test_helper.h',
'wm/workspace/workspace_event_handler_unittest.cc',
@@ -880,7 +1040,7 @@
'wm/workspace_controller_unittest.cc',
],
'conditions': [
- ['OS=="win"', {
+ ['chromeos==0', {
'sources/': [
# TODO(zork): fix this test to build on Windows. See: crosbug.com/26906
['exclude', 'focus_cycler_unittest.cc'],
@@ -891,7 +1051,9 @@
['exclude', 'ash_root_window_transformer_unittest.cc'],
['exclude', 'magnifier/magnification_controller_unittest.cc'],
['exclude', 'wm/workspace/workspace_window_resizer_unittest.cc'],
- ['exclude', 'wm/sticky_keys_unittest.cc'],
+ ['exclude', 'sticky_keys/sticky_keys_overlay_unittest.cc'],
+ ['exclude', 'sticky_keys/sticky_keys_unittest.cc'],
+ ['exclude', 'system/tray/media_security/multi_profile_media_tray_item_unittest.cc'],
['exclude', 'autoclick/autoclick_unittest.cc'],
],
'sources': [
@@ -907,19 +1069,30 @@
}],
['use_x11!=1', {
'sources/': [
- ['exclude', 'display/display_change_observer_chromeos_unittest.cc'],
- ['exclude', 'display/display_error_observer_chromeos_unittest.cc'],
+ ['exclude', 'accelerators/magnifier_key_scroller_unittest.cc'],
+ ['exclude', 'accelerators/spoken_feedback_toggler_unittest.cc'],
+ ['exclude', 'touch/touch_transformer_controller_unittest.cc'],
],
}],
['chromeos==1', {
'dependencies': [
+ '../chromeos/chromeos.gyp:chromeos_test_support_without_gmock',
'../chromeos/chromeos.gyp:power_manager_proto',
+ '../device/bluetooth/bluetooth.gyp:device_bluetooth',
+ '../ui/display/display.gyp:display',
+ '../ui/display/display.gyp:display_test_util',
+ '../ui/display/display.gyp:display_types',
],
'sources': [
'first_run/first_run_helper_unittest.cc',
],
+ }, { # else: chromeos!=1
+ 'sources/': [
+ ['exclude', 'display/resolution_notification_controller_unittest.cc'],
+ ['exclude', 'touch/touch_transformer_controller_unittest.cc'],
+ ],
}],
- ['OS=="linux" and component=="shared_library" and linux_use_tcmalloc==1', {
+ ['OS=="linux" and component=="shared_library" and use_allocator!="none"', {
'dependencies': [
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
],
@@ -927,13 +1100,17 @@
'ldflags': ['-rdynamic'],
},
}],
+ ['use_ozone==1', {
+ 'sources!': [
+ 'sticky_keys/sticky_keys_unittest.cc', # crbug.com/354035
+ ],
+ }],
],
},
{
- 'target_name': 'ash_shell',
- 'type': 'executable',
+ 'target_name': 'ash_shell_lib',
+ 'type': 'static_library',
'dependencies': [
- 'ash_strings.gyp:ash_strings',
'../base/base.gyp:base',
'../base/base.gyp:base_i18n',
'../chrome/chrome_resources.gyp:packed_resources',
@@ -944,23 +1121,27 @@
'../third_party/icu/icu.gyp:icuuc',
'../ui/app_list/app_list.gyp:app_list',
'../ui/aura/aura.gyp:aura',
+ '../ui/base/ui_base.gyp:ui_base',
'../ui/compositor/compositor.gyp:compositor',
'../ui/events/events.gyp:events',
'../ui/gfx/gfx.gyp:gfx',
+ '../ui/gfx/gfx.gyp:gfx_geometry',
'../ui/keyboard/keyboard.gyp:keyboard',
'../ui/message_center/message_center.gyp:message_center',
'../ui/resources/ui_resources.gyp:ui_resources',
- '../ui/ui.gyp:ui',
+ '../ui/views/examples/examples.gyp:views_examples_lib',
+ '../ui/views/examples/examples.gyp:views_examples_with_content_lib',
'../ui/views/views.gyp:views',
- '../ui/views/views.gyp:views_examples_lib',
- '../ui/views/views.gyp:views_examples_with_content_lib',
'../ui/views/views.gyp:views_test_support',
'ash',
- 'ash_resources',
+ 'ash_resources.gyp:ash_resources',
+ 'ash_strings.gyp:ash_strings',
+ 'ash_test_support',
+ 'ash_with_content',
],
'sources': [
- 'session_state_delegate_stub.cc',
- 'session_state_delegate_stub.h',
+ '../content/app/startup_helper_win.cc',
+ '../ui/views/test/test_views_delegate_aura.cc',
'shell/app_list.cc',
'shell/bubble.cc',
'shell/content_client/shell_browser_main_parts.cc',
@@ -981,7 +1162,6 @@
'shell/shelf_delegate_impl.h',
'shell/shell_delegate_impl.cc',
'shell/shell_delegate_impl.h',
- 'shell/shell_main.cc',
'shell/shell_main_parts.cc',
'shell/shell_main_parts.h',
'shell/toplevel_window.cc',
@@ -993,8 +1173,16 @@
'shell/window_watcher.h',
'shell/window_watcher_shelf_item_delegate.cc',
'shell/window_watcher_shelf_item_delegate.h',
- '../content/app/startup_helper_win.cc',
- '../ui/views/test/test_views_delegate.cc',
+ ],
+ },
+ {
+ 'target_name': 'ash_shell',
+ 'type': 'executable',
+ 'dependencies': [
+ 'ash_shell_lib',
+ ],
+ 'sources': [
+ 'shell/shell_main.cc',
],
'conditions': [
['OS=="win"', {
@@ -1007,6 +1195,35 @@
'../sandbox/sandbox.gyp:sandbox',
],
}],
+ ['chromeos==1', {
+ 'dependencies': [
+ '../device/bluetooth/bluetooth.gyp:device_bluetooth',
+ ],
+ }],
+ ],
+ },
+ {
+ 'target_name': 'ash_shell_unittests',
+ 'type': 'executable',
+ 'dependencies': [
+ '../base/base.gyp:test_support_base',
+ '../content/content_shell_and_tests.gyp:test_support_content',
+ '../skia/skia.gyp:skia',
+ '../testing/gtest.gyp:gtest',
+ '../ui/accessibility/accessibility.gyp:ax_gen',
+ 'ash_shell_lib',
+ 'ash_test_support',
+ ],
+ 'sources': [
+ 'shell/window_watcher_unittest.cc',
+ 'test/ash_unittests.cc',
+ ],
+ 'conditions': [
+ ['chromeos==1', {
+ 'dependencies': [
+ '../ui/display/display.gyp:display',
+ ],
+ }],
],
},
],
diff --git a/chromium/ash/ash_chromeos_strings.grdp b/chromium/ash/ash_chromeos_strings.grdp
deleted file mode 100644
index 5c9293c2325..00000000000
--- a/chromium/ash/ash_chromeos_strings.grdp
+++ /dev/null
@@ -1,313 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- ChromeOS-specific strings (included from ash_strings.grd).
- Everything in this file is wrapped in <if expr="pp_ifdef('chromeos')">. -->
-<grit-part>
-
- <!-- Status tray charging strings. -->
- <message name="IDS_ASH_STATUS_TRAY_LOW_POWER_CHARGER_TITLE" desc="The title of a notification indicating that a low-current USB charger has been connected.">
- Low-power charger connected
- </message>
- <message name="IDS_ASH_STATUS_TRAY_LOW_POWER_CHARGER_MESSAGE" desc="The message body of a notification indicating that a low-current USB charger has been connected.">
- Your Chromebook may not charge while it is turned on. Consider using the official charger.
- </message>
- <message name="IDS_ASH_STATUS_TRAY_LOW_POWER_CHARGER_MESSAGE_SHORT" desc="The message body of a notification indicating that a low-current USB charger has been connected, short version.">
- Your Chromebook may not charge while it is turned on.
- </message>
-
- <!-- Status Tray Network strings -->
- <message name="IDS_ASH_STATUS_TRAY_NETWORK" desc="The label used in the network dialog header.">
- Network
- </message>
- <message name="IDS_ASH_STATUS_TRAY_VPN" desc="The label used in the VPN detailed view header.">
- Private Network
- </message>
- <message name="IDS_ASH_STATUS_TRAY_ETHERNET" desc="The ethernet network device.">
- Ethernet
- </message>
- <message name="IDS_ASH_STATUS_TRAY_WIFI" desc="The wifi network device.">
- Wi-Fi
- </message>
- <message name="IDS_ASH_STATUS_TRAY_CELLULAR" desc="The accessible text for the cellular button.">
- Cellular
- </message>
- <message name="IDS_ASH_STATUS_TRAY_NETWORK_INFO" desc="The accessible text for the network info button.">
- Network Info
- </message>
- <message name="IDS_ASH_STATUS_TRAY_IP" desc="The label for the IP address of the network:">
- IP Address
- </message>
- <message name="IDS_ASH_STATUS_TRAY_NO_NETWORKS" desc="The message to display in the network info bubble when it is otherwise empty.">
- No network information available
- </message>
- <message name="IDS_ASH_STATUS_TRAY_NO_CELLULAR_NETWORKS" desc="The message to display in the network list when no cellular networks are available.">
- No cellular network available
- </message>
- <message name="IDS_ASH_STATUS_TRAY_NETWORK_NOT_CONNECTED" desc="Description in status area or network dropdown when no network is connected.">
- No network
- </message>
- <message name="IDS_ASH_STATUS_TRAY_VPN_DISCONNECTED" desc="The label used in system tray bubble to display vpn is disconnected.">
- VPN disconnected
- </message>
- <message name="IDS_ASH_STATUS_TRAY_NETWORK_CONNECTED" desc="Message for the network tray tooltip and default menu text when connected to a network.">
- Connected to <ph name="NAME">$1<ex>GoogleGuest</ex></ph>
- </message>
- <message name="IDS_ASH_STATUS_TRAY_NETWORK_CONNECTING" desc="Message for the network tray tooltip and default menu text when connecting to a network.">
- Connecting to <ph name="NAME">$1<ex>GoogleGuest</ex></ph>
- </message>
- <message name="IDS_ASH_STATUS_TRAY_NETWORK_ACTIVATING" desc="Message for the network tray tooltip and default menu text when activating a network.">
- Activating <ph name="NAME">$1<ex>YBH Cellular</ex></ph>
- </message>
- <message name="IDS_ASH_STATUS_TRAY_NETWORK_LIST_CONNECTING" desc="Message for the network list when connecting to a network.">
- <ph name="NAME">$1<ex>GoogleGuest</ex></ph>: Connecting...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_NETWORK_LIST_ACTIVATING" desc="Message for the network list when activating a network.">
- <ph name="NAME">$1<ex>YBH Cellular</ex></ph>: Activating...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_NETWORK_LIST_ACTIVATE" desc="Message for the network list to activate the network.">
- Activate <ph name="NETWORKSERVICE">$1<ex>YBH Cellular</ex></ph>
- </message>
- <message name="IDS_ASH_STATUS_TRAY_NETWORK_SETTINGS" desc="The label used in the settings entry in the network dialog.">
- Settings...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_NETWORK_PROXY_SETTINGS" desc="The label used in the proxy settings entry in the network dialog in the login screen.">
- Proxy...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_NETWORK_WIFI_ENABLED" desc="The label used in the tray popup to notify that Wi-Fi is turned on.">
- Wi-Fi is turned on.
- </message>
- <message name="IDS_ASH_STATUS_TRAY_NETWORK_WIFI_DISABLED" desc="The label used in the tray popup to notify that Wi-Fi is turned off.">
- Wi-Fi is turned off.
- </message>
- <message name="IDS_ASH_STATUS_TRAY_NETWORK_NO_VPN" desc="The label used in the tray popup to notify no vpn is configured.">
- VPN is not configured.
- </message>
- <message name="IDS_ASH_STATUS_TRAY_ENABLE_WIFI" desc="The label used for the item to enable wifi.">
- Enable Wi-Fi
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISABLE_WIFI" desc="The label used for the item to disable wifi.">
- Disable Wi-Fi
- </message>
- <message name="IDS_ASH_STATUS_TRAY_OTHER_WIFI" desc="The label used for the item to display other Wi-Fi networks.">
- Join other...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_OTHER_VPN" desc="The label used for the item to configure other private networks.">
- Join other...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_TURN_ON_WIFI" desc="The label used for the item to turn on Wi-Fi networks.">
- Turn Wi-Fi on...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_ENABLE_MOBILE" desc="The label used for the item to enable cellular networks.">
- Enable mobile data
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISABLE_MOBILE" desc="The label used for the item to disable cellular networks.">
- Disable mobile data
- </message>
- <message name="IDS_ASH_STATUS_TRAY_SETUP_MOBILE" desc="The label used for the item to setup cellular network when no SIM card in installed.">
- Setup mobile data
- </message>
- <message name="IDS_ASH_STATUS_TRAY_OTHER_MOBILE" desc="The label used for the item to display other cellular networks.">
- Mobile ...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_MOBILE_VIEW_ACCOUNT" desc="In the network popup bubble, the text of the top-up URL link.">
- View mobile account
- </message>
- <message name="IDS_ASH_STATUS_TRAY_WIFI_SCANNING_MESSAGE" desc="Scanning for wifi networks">
- Searching for Wi-Fi networks...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_INITIALIZING_CELLULAR" desc="Message for the status area when initializing the cellular device.">
- Initializing cellular modem...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_CELLULAR_SCANNING" desc="Message when scanning for cellular networks">
- Searching for cellular networks...
- </message>
-
- <!-- Other Network UI strings -->
- <message name="IDS_NETWORK_CONNECTION_ERROR_TITLE" desc="Title for network connection error notification">
- Network Connection Error
- </message>
- <message name="IDS_NETWORK_CONNECTION_ERROR_MESSAGE" desc="Message for network connection error notification">
- Failed to connect to network '<ph name="name">$1<ex>GoogleGuest</ex></ph>': <ph name="details">$2<ex>Unrecognized error</ex></ph>
- </message>
- <message name="IDS_NETWORK_CONNECTION_ERROR_MESSAGE_WITH_SERVER_MESSAGE" desc="Message for network connection error notification with details and a server message">
-Failed to connect to '<ph name="name">$1<ex>GoogleGuest</ex></ph>': <ph name="details">$2<ex>Unrecognized error</ex></ph>
-Server message: <ph name="server_msg">$3<ex>Incorrect password</ex></ph>
- </message>
- <message name="IDS_NETWORK_CONNECTION_ERROR_MESSAGE_NO_NAME" desc="Message for network connection error where the network name is unavailable">
- Failed to connect to network: <ph name="details">$2<ex>Unrecognized error</ex></ph>
- </message>
- <message name="IDS_NETWORK_OUT_OF_CREDITS_TITLE" desc="Title for network out of data error notification">
- Network Connection Error
- </message>
- <message name="IDS_NETWORK_OUT_OF_CREDITS_BODY" desc="Message body for network out of data error notification">
- You may have used up your mobile data allowance. Visit the <ph name="name">$1<ex>GoogleGuest</ex></ph> activation portal to buy more data.
- </message>
- <message name="IDS_NETWORK_UNRECOGNIZED_ERROR" desc="Unrecognized Network error text">
- Unrecognized error: <ph name="desc">$1<ex>ShillErrorString</ex></ph>
- </message>
- <message name="IDS_NETWORK_CELLULAR_ACTIVATED_TITLE" desc="Title for cellular activated notification">
- Cellular Activated
- </message>
- <message name="IDS_NETWORK_CELLULAR_ACTIVATED" desc="Text of the cellular activated notification">
- Congratulations! Your '<ph name="name">$1<ex>Generic Wireless</ex></ph>' data service has been activated and is ready to go.
- </message>
- <message name="IDS_NETWORK_ACTIVATION_ERROR_TITLE" desc="Title for network activation error notification">
- Network Activation Error
- </message>
- <message name="IDS_NETWORK_ACTIVATION_NEEDS_CONNECTION" desc="Message when attempting to activate a mobile network that requires a connection">
- Activation of '<ph name="name">$1<ex>Generic Wireless</ex></ph>' requires a network connection.
- </message>
-
- <!-- Network state strings -->
- <message name="IDS_CHROMEOS_NETWORK_STATE_UNKNOWN" desc="Network state in about:network: UNKNOWN">
- Unknown
- </message>
- <message name="IDS_CHROMEOS_NETWORK_STATE_IDLE" desc="Network state in about:network: IDLE">
- Idle
- </message>
- <message name="IDS_CHROMEOS_NETWORK_STATE_CARRIER" desc="Network state in about:network: CARRIER">
- Carrier
- </message>
- <message name="IDS_CHROMEOS_NETWORK_STATE_ASSOCIATION" desc="Network state in about:network: ASSOCIATION">
- Association
- </message>
- <message name="IDS_CHROMEOS_NETWORK_STATE_CONFIGURATION" desc="Network state in about:network: CONFIGURATION">
- Configuration
- </message>
- <message name="IDS_CHROMEOS_NETWORK_STATE_READY" desc="Network state in about:network: READY">
- Connected
- </message>
- <message name="IDS_CHROMEOS_NETWORK_STATE_DISCONNECT" desc="Network state in about:network: DISCONNECT">
- Disconnect
- </message>
- <message name="IDS_CHROMEOS_NETWORK_STATE_FAILURE" desc="Network state in about:network: FAILURE">
- Failure
- </message>
- <message name="IDS_CHROMEOS_NETWORK_STATE_ACTIVATION_FAILURE" desc="Network state in about:network: ACTIVATION_FAILURE">
- Activation failure
- </message>
- <message name="IDS_CHROMEOS_NETWORK_STATE_UNRECOGNIZED" desc="Network state in about:network: Unrecognized">
- Unrecognized state
- </message>
- <message name="IDS_CHROMEOS_NETWORK_STATE_PORTAL" desc="Network state in about:network: Portal">
- Portal state
- </message>
- <message name="IDS_CHROMEOS_NETWORK_STATE_ONLINE" desc="Network state in about:network: Online">
- Online state
- </message>
- <message name="IDS_CHROMEOS_NETWORK_STATE_CONNECT_REQUESTED" desc="Network state in about:network: Connect Requested">
- Connect Requested
- </message>
-
- <!-- Network error strings -->
- <message name="IDS_CHROMEOS_NETWORK_ERROR_UNKNOWN" desc="Network error details in notifications: UNKNOWN">
- Unknown network error
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_OUT_OF_RANGE" desc="Network error details in notifications: OUT_OF_RANGE">
- Out of range
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_PIN_MISSING" desc="Network error details in notifications: PIN_MISSING">
- PIN missing
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_DHCP_FAILED" desc="Network error details in notifications: DHCP_FAILED">
- DHCP lookup failed
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_CONNECT_FAILED" desc="Network error details in notifications: CONNECT_FAILED">
- Connect failed
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_BAD_PASSPHRASE" desc="Network error details in notifications: BAD_PASSPHRASE">
- Bad passphrase
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_BAD_WEPKEY" desc="Network error details in notifications: BAD_WEPKEY">
- Bad WEP key
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_ACTIVATION_FAILED" desc="Network error details in notifications: ACTIVATION_FAILED">
- Activation failed
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_NEED_EVDO" desc="Network error details in notifications: NEED_EVDO">
- Need EVDO
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_NEED_HOME_NETWORK" desc="Network error details in notifications: NEED_HOME_NETWORK">
- Need home network
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_OTASP_FAILED" desc="Network error details in notifications: OTASP_FAILED">
- OTASP failed
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_AAA_FAILED" desc="Network error details in notifications: AAA_FAILED">
- AAA check failed
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_INTERNAL" desc="Network error details in notifications: INTERNAL">
- Internal error
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_DNS_LOOKUP_FAILED" desc="Network error details in notifications: DNS_LOOKUP_FAILED">
- DNS lookup failed
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_HTTP_GET_FAILED" desc="Network error details in notifications: HTTP_GET_FAILED">
- HTTP get failed
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_IPSEC_PSK_AUTH_FAILED" desc="Network error details in notifications: IPSEC_PSK_AUTH_FAILED">
- Incorrect password
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_CERT_AUTH_FAILED" desc="Network error details in notifications: IPSEC_CERT_AUTH_FAILED">
- Authentication certificate rejected by network
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_EAP_LOCAL_TLS_FAILED" desc="Network error details in notifications: EAP_LOCAL_TLS_FAILED">
- Authentication certificate rejected locally
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_EAP_REMOTE_TLS_FAILED" desc="Network error details in notifications: EAP_REMOTE_TLS_FAILED">
- Authentication certificate rejected remotely
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_EAP_AUTH_FAILED" desc="Network error details in notifications: IPSEC_CERT_AUTH_FAILED">
- Username/password incorrect or EAP-auth failed
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_PPP_AUTH_FAILED" desc="Network error details in notifications: PPP_AUTH_FAILED">
- PPP authentication failed due to an incorrect username or password
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_CONFIGURE_FAILED" desc="Network error details in notifications: Configuration error">
- Failed to configure network
- </message>
- <message name="IDS_CHROMEOS_NETWORK_ERROR_UNRECOGNIZED" desc="Network error details in notifications: Unrecognized">
- Unrecognized error
- </message>
-
- <!-- Status tray screen capture strings. -->
- <message name="IDS_ASH_STATUS_TRAY_SCREEN_CAPTURE_STOP" desc="label used for screen capture stop button">
- Stop
- </message>
-
- <!-- Status tray screen share strings. -->
- <message name="IDS_ASH_STATUS_TRAY_SCREEN_SHARE_STOP" desc="label used for screen sharing stop button">
- Stop
- </message>
- <message name="IDS_ASH_STATUS_TRAY_SCREEN_SHARE_BEING_HELPED" desc="label for screen sharing notification">
- Sharing control of your screen via Hangouts.
- </message>
- <message name="IDS_ASH_STATUS_TRAY_SCREEN_SHARE_BEING_HELPED_NAME" desc="label for screen sharing notification with name">
- Sharing control of your screen with <ph name="HELPER_NAME">$1<ex>Walder Frey</ex></ph> via Hangouts.
- </message>
-
- <!-- Status tray audio strings. -->
- <message name="IDS_ASH_STATUS_TRAY_AUDIO_HEADPHONE" desc="label used for audio headphone device">
- Headphone
- </message>
-
- <message name="IDS_ASH_STATUS_TRAY_AUDIO_INTERNAL_SPEAKER" desc="label used for internal audio speaker">
- Speaker (Internal)
- </message>
-
- <message name="IDS_ASH_STATUS_TRAY_AUDIO_INTERNAL_MIC" desc="label used for internal microphone">
- Microphone (Internal)
- </message>
-
- <message name="IDS_ASH_STATUS_TRAY_AUDIO_USB_DEVICE" desc="label used for usb audio device">
- <ph name="device_name">$1<ex>Headphone</ex></ph> (USB)
- </message>
-
- <message name="IDS_ASH_STATUS_TRAY_AUDIO_BLUETOOTH_DEVICE" desc="label used for bluetooth audio device">
- <ph name="device_name">$1<ex>Headphone</ex></ph> (Bluetooth)
- </message>
-
- <message name="IDS_ASH_STATUS_TRAY_AUDIO_HDMI_DEVICE" desc="label used for hdmi audio device">
- <ph name="device_name">$1<ex>Speaker</ex></ph> (HDMI)
- </message>
-
-</grit-part>
diff --git a/chromium/ash/ash_constants.cc b/chromium/ash/ash_constants.cc
deleted file mode 100644
index 82501f20855..00000000000
--- a/chromium/ash/ash_constants.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/ash_constants.h"
-
-#include "third_party/skia/include/core/SkColor.h"
-#include "ui/aura/window_property.h"
-
-namespace ash {
-
-const int kResizeAreaCornerSize = 16;
-const int kResizeOutsideBoundsSize = 6;
-const int kResizeOutsideBoundsScaleForTouch = 5;
-const int kResizeInsideBoundsSize = 1;
-
-const SkColor kChromeOsBootColor = SkColorSetRGB(0xfe, 0xfe, 0xfe);
-
-const SkColor kFocusBorderColor = SkColorSetRGB(64, 128, 250);
-
-} // namespace ash
diff --git a/chromium/ash/ash_constants.h b/chromium/ash/ash_constants.h
deleted file mode 100644
index cad4354bcb0..00000000000
--- a/chromium/ash/ash_constants.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_ASH_CONSTANTS_H_
-#define ASH_ASH_CONSTANTS_H_
-
-#include "ash/ash_export.h"
-#include "ui/aura/window.h"
-#include "ui/base/ui_base_types.h"
-
-typedef unsigned int SkColor;
-
-namespace ash {
-
-// In the window corners, the resize areas don't actually expand bigger, but the
-// 16 px at the end of each edge triggers diagonal resizing.
-ASH_EXPORT extern const int kResizeAreaCornerSize;
-
-// Ash windows do not have a traditional visible window frame. Window content
-// extends to the edge of the window. We consider a small region outside the
-// window bounds and an even smaller region overlapping the window to be the
-// "non-client" area and use it for resizing.
-ASH_EXPORT extern const int kResizeOutsideBoundsSize;
-ASH_EXPORT extern const int kResizeOutsideBoundsScaleForTouch;
-ASH_EXPORT extern const int kResizeInsideBoundsSize;
-
-#if defined(OS_CHROMEOS)
-// Background color used for the Chrome OS boot splash screen.
-extern const SkColor kChromeOsBootColor;
-#endif
-
-// The border color of keyboard focus for launcher items and system tray.
-extern const SkColor kFocusBorderColor;
-
-} // namespace ash
-
-#endif // ASH_ASH_CONSTANTS_H_
diff --git a/chromium/ash/ash_export.h b/chromium/ash/ash_export.h
deleted file mode 100644
index c220690c991..00000000000
--- a/chromium/ash/ash_export.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_ASH_EXPORT_H_
-#define ASH_ASH_EXPORT_H_
-
-// Defines ASH_EXPORT so that functionality implemented by the aura_shell
-// module can be exported to consumers.
-
-#if defined(COMPONENT_BUILD)
-#if defined(WIN32)
-
-#if defined(ASH_IMPLEMENTATION)
-#define ASH_EXPORT __declspec(dllexport)
-#else
-#define ASH_EXPORT __declspec(dllimport)
-#endif // defined(ASH_IMPLEMENTATION)
-
-#else // defined(WIN32)
-#if defined(ASH_IMPLEMENTATION)
-#define ASH_EXPORT __attribute__((visibility("default")))
-#else
-#define ASH_EXPORT
-#endif
-#endif
-
-#else // defined(COMPONENT_BUILD)
-#define ASH_EXPORT
-#endif
-
-#endif // ASH_ASH_EXPORT_H_
diff --git a/chromium/ash/ash_resources.gyp b/chromium/ash/ash_resources.gyp
new file mode 100644
index 00000000000..930cde8d0c0
--- /dev/null
+++ b/chromium/ash/ash_resources.gyp
@@ -0,0 +1,25 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'ash_resources',
+ 'type': 'none',
+ 'variables': {
+ 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/ash/resources',
+ },
+ 'actions': [
+ {
+ 'action_name': 'ash_resources',
+ 'variables': {
+ 'grit_grd_file': 'resources/ash_resources.grd',
+ },
+ 'includes': [ '../build/grit_action.gypi' ],
+ },
+ ],
+ 'includes': [ '../build/grit_target.gypi' ],
+ },
+ ],
+}
diff --git a/chromium/ash/ash_resources.gypi b/chromium/ash/ash_resources.gypi
deleted file mode 100644
index 5c2d62ad43b..00000000000
--- a/chromium/ash/ash_resources.gypi
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'ash_resources',
- 'type': 'none',
- 'variables': {
- 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/ash/ash_resources',
- },
- 'actions': [
- {
- 'action_name': 'ash_resources',
- 'variables': {
- 'grit_grd_file': 'resources/ash_resources.grd',
- },
- 'includes': [ '../build/grit_action.gypi' ],
- },
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)/ash/ash_resources',
- ],
- },
- },
- ],
-}
diff --git a/chromium/ash/ash_strings.grd b/chromium/ash/ash_strings.grd
deleted file mode 100644
index 289c8b1b3e0..00000000000
--- a/chromium/ash/ash_strings.grd
+++ /dev/null
@@ -1,596 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-This file contains the strings for ash.
--->
-
-<grit base_dir="." latest_public_release="0" current_release="1"
- source_lang_id="en" enc_check="möl">
- <outputs>
- <output filename="grit/ash_strings.h" type="rc_header">
- <emit emit_type='prepend'></emit>
- </output>
- <output filename="ash_strings_am.pak" type="data_package" lang="am" />
- <output filename="ash_strings_ar.pak" type="data_package" lang="ar" />
- <if expr="pp_ifdef('use_third_party_translations')">
- <output filename="ash_strings_ast.pak" type="data_package" lang="ast" />
- </if>
- <output filename="ash_strings_bg.pak" type="data_package" lang="bg" />
- <output filename="ash_strings_bn.pak" type="data_package" lang="bn" />
- <if expr="pp_ifdef('use_third_party_translations')">
- <output filename="ash_strings_bs.pak" type="data_package" lang="bs" />
- </if>
- <output filename="ash_strings_ca.pak" type="data_package" lang="ca" />
- <if expr="pp_ifdef('use_third_party_translations')">
- <output filename="ash_strings_ca@valencia.pak" type="data_package" lang="ca@valencia" />
- </if>
- <output filename="ash_strings_cs.pak" type="data_package" lang="cs" />
- <output filename="ash_strings_da.pak" type="data_package" lang="da" />
- <output filename="ash_strings_de.pak" type="data_package" lang="de" />
- <output filename="ash_strings_el.pak" type="data_package" lang="el" />
- <if expr="pp_ifdef('use_third_party_translations')">
- <output filename="ash_strings_en-AU.pak" type="data_package" lang="en-AU" />
- </if>
- <output filename="ash_strings_en-GB.pak" type="data_package" lang="en-GB" />
- <output filename="ash_strings_en-US.pak" type="data_package" lang="en" />
- <if expr="pp_ifdef('use_third_party_translations')">
- <output filename="ash_strings_eo.pak" type="data_package" lang="eo" />
- </if>
- <output filename="ash_strings_es.pak" type="data_package" lang="es" />
- <output filename="ash_strings_es-419.pak" type="data_package" lang="es-419" />
- <output filename="ash_strings_et.pak" type="data_package" lang="et" />
- <if expr="pp_ifdef('use_third_party_translations')">
- <output filename="ash_strings_eu.pak" type="data_package" lang="eu" />
- </if>
- <output filename="ash_strings_fa.pak" type="data_package" lang="fa" />
- <output filename="ash_strings_fake-bidi.pak" type="data_package" lang="fake-bidi" />
- <output filename="ash_strings_fi.pak" type="data_package" lang="fi" />
- <output filename="ash_strings_fil.pak" type="data_package" lang="fil" />
- <output filename="ash_strings_fr.pak" type="data_package" lang="fr" />
- <if expr="pp_ifdef('use_third_party_translations')">
- <output filename="ash_strings_gl.pak" type="data_package" lang="gl" />
- </if>
- <output filename="ash_strings_gu.pak" type="data_package" lang="gu" />
- <output filename="ash_strings_he.pak" type="data_package" lang="he" />
- <output filename="ash_strings_hi.pak" type="data_package" lang="hi" />
- <output filename="ash_strings_hr.pak" type="data_package" lang="hr" />
- <output filename="ash_strings_hu.pak" type="data_package" lang="hu" />
- <if expr="pp_ifdef('use_third_party_translations')">
- <output filename="ash_strings_hy.pak" type="data_package" lang="hy" />
- <output filename="ash_strings_ia.pak" type="data_package" lang="ia" />
- </if>
- <output filename="ash_strings_id.pak" type="data_package" lang="id" />
- <output filename="ash_strings_it.pak" type="data_package" lang="it" />
- <output filename="ash_strings_ja.pak" type="data_package" lang="ja" />
- <if expr="pp_ifdef('use_third_party_translations')">
- <output filename="ash_strings_ka.pak" type="data_package" lang="ka" />
- </if>
- <output filename="ash_strings_kn.pak" type="data_package" lang="kn" />
- <output filename="ash_strings_ko.pak" type="data_package" lang="ko" />
- <if expr="pp_ifdef('use_third_party_translations')">
- <output filename="ash_strings_ku.pak" type="data_package" lang="ku" />
- <output filename="ash_strings_kw.pak" type="data_package" lang="kw" />
- </if>
- <output filename="ash_strings_lt.pak" type="data_package" lang="lt" />
- <output filename="ash_strings_lv.pak" type="data_package" lang="lv" />
- <output filename="ash_strings_ml.pak" type="data_package" lang="ml" />
- <output filename="ash_strings_mr.pak" type="data_package" lang="mr" />
- <output filename="ash_strings_ms.pak" type="data_package" lang="ms" />
- <output filename="ash_strings_nl.pak" type="data_package" lang="nl" />
- <!-- The translation console uses 'no' for Norwegian Bokmål. It should
- be 'nb'. -->
- <output filename="ash_strings_nb.pak" type="data_package" lang="no" />
- <output filename="ash_strings_pl.pak" type="data_package" lang="pl" />
- <output filename="ash_strings_pt-BR.pak" type="data_package" lang="pt-BR" />
- <output filename="ash_strings_pt-PT.pak" type="data_package" lang="pt-PT" />
- <output filename="ash_strings_ro.pak" type="data_package" lang="ro" />
- <output filename="ash_strings_ru.pak" type="data_package" lang="ru" />
- <output filename="ash_strings_sk.pak" type="data_package" lang="sk" />
- <output filename="ash_strings_sl.pak" type="data_package" lang="sl" />
- <output filename="ash_strings_sr.pak" type="data_package" lang="sr" />
- <output filename="ash_strings_sv.pak" type="data_package" lang="sv" />
- <output filename="ash_strings_sw.pak" type="data_package" lang="sw" />
- <output filename="ash_strings_ta.pak" type="data_package" lang="ta" />
- <output filename="ash_strings_te.pak" type="data_package" lang="te" />
- <output filename="ash_strings_th.pak" type="data_package" lang="th" />
- <output filename="ash_strings_tr.pak" type="data_package" lang="tr" />
- <if expr="pp_ifdef('use_third_party_translations')">
- <output filename="ash_strings_ug.pak" type="data_package" lang="ug" />
- </if>
- <output filename="ash_strings_uk.pak" type="data_package" lang="uk" />
- <output filename="ash_strings_vi.pak" type="data_package" lang="vi" />
- <output filename="ash_strings_zh-CN.pak" type="data_package" lang="zh-CN" />
- <output filename="ash_strings_zh-TW.pak" type="data_package" lang="zh-TW" />
- </outputs>
- <translations>
- <file path="strings/ash_strings_am.xtb" lang="am" />
- <file path="strings/ash_strings_ar.xtb" lang="ar" />
- <file path="strings/ash_strings_bg.xtb" lang="bg" />
- <file path="strings/ash_strings_bn.xtb" lang="bn" />
- <file path="strings/ash_strings_ca.xtb" lang="ca" />
- <file path="strings/ash_strings_cs.xtb" lang="cs" />
- <file path="strings/ash_strings_da.xtb" lang="da" />
- <file path="strings/ash_strings_de.xtb" lang="de" />
- <file path="strings/ash_strings_el.xtb" lang="el" />
- <file path="strings/ash_strings_en-GB.xtb" lang="en-GB" />
- <file path="strings/ash_strings_es.xtb" lang="es" />
- <file path="strings/ash_strings_es-419.xtb" lang="es-419" />
- <file path="strings/ash_strings_et.xtb" lang="et" />
- <file path="strings/ash_strings_fa.xtb" lang="fa" />
- <file path="strings/ash_strings_fi.xtb" lang="fi" />
- <file path="strings/ash_strings_fil.xtb" lang="fil" />
- <file path="strings/ash_strings_fr.xtb" lang="fr" />
- <file path="strings/ash_strings_gu.xtb" lang="gu" />
- <file path="strings/ash_strings_hi.xtb" lang="hi" />
- <file path="strings/ash_strings_hr.xtb" lang="hr" />
- <file path="strings/ash_strings_hu.xtb" lang="hu" />
- <file path="strings/ash_strings_id.xtb" lang="id" />
- <file path="strings/ash_strings_it.xtb" lang="it" />
- <!-- The translation console uses 'iw' for Hebrew, but we use 'he'. -->
- <file path="strings/ash_strings_iw.xtb" lang="he" />
- <file path="strings/ash_strings_ja.xtb" lang="ja" />
- <file path="strings/ash_strings_kn.xtb" lang="kn" />
- <file path="strings/ash_strings_ko.xtb" lang="ko" />
- <file path="strings/ash_strings_lt.xtb" lang="lt" />
- <file path="strings/ash_strings_lv.xtb" lang="lv" />
- <file path="strings/ash_strings_ml.xtb" lang="ml" />
- <file path="strings/ash_strings_mr.xtb" lang="mr" />
- <file path="strings/ash_strings_ms.xtb" lang="ms" />
- <file path="strings/ash_strings_nl.xtb" lang="nl" />
- <file path="strings/ash_strings_no.xtb" lang="no" />
- <file path="strings/ash_strings_pl.xtb" lang="pl" />
- <file path="strings/ash_strings_pt-BR.xtb" lang="pt-BR" />
- <file path="strings/ash_strings_pt-PT.xtb" lang="pt-PT" />
- <file path="strings/ash_strings_ro.xtb" lang="ro" />
- <file path="strings/ash_strings_ru.xtb" lang="ru" />
- <file path="strings/ash_strings_sk.xtb" lang="sk" />
- <file path="strings/ash_strings_sl.xtb" lang="sl" />
- <file path="strings/ash_strings_sr.xtb" lang="sr" />
- <file path="strings/ash_strings_sv.xtb" lang="sv" />
- <file path="strings/ash_strings_sw.xtb" lang="sw" />
- <file path="strings/ash_strings_ta.xtb" lang="ta" />
- <file path="strings/ash_strings_te.xtb" lang="te" />
- <file path="strings/ash_strings_th.xtb" lang="th" />
- <file path="strings/ash_strings_tr.xtb" lang="tr" />
- <file path="strings/ash_strings_uk.xtb" lang="uk" />
- <file path="strings/ash_strings_vi.xtb" lang="vi" />
- <file path="strings/ash_strings_zh-CN.xtb" lang="zh-CN" />
- <file path="strings/ash_strings_zh-TW.xtb" lang="zh-TW" />
- </translations>
- <release seq="1" allow_pseudo="false">
- <messages fallback_to_english="true">
- <!-- TODO add all of your "string table" messages here. Remember to
- change nontranslateable parts of the messages into placeholders (using the
- <ph> element). You can also use the 'grit add' tool to help you identify
- nontranslateable parts and create placeholders for them. -->
- <!-- TODO(zork): Only include these in Aura builds -->
- <message name="IDS_AURA_APP_LIST_TITLE" desc="The title used for the Aura app list in the launcher">
- Apps
- </message>
- <message name="IDS_AURA_APP_LIST_SYNCING_TITLE" desc="The title used for the Aura app list in the launcher to indicate loading/syncing apps.">
- Syncing apps...
- </message>
- <message name="IDS_ASH_SHELF_OVERFLOW_NAME" desc="The title used for the Ash overflow button in the shelf">
- Overflow Button
- </message>
- <message name="IDS_ASH_SHELF_CONTEXT_MENU_AUTO_HIDE" desc="Title of the menu item in the context menu for auto-hiding the shelf when the current window is not maximized">
- Autohide shelf
- </message>
- <message name="IDS_ASH_SHELF_CONTEXT_MENU_POSITION" desc="Title of the menu item in the context menu for aligning the shelf">
- Shelf position
- </message>
- <message name="IDS_ASH_SHELF_CONTEXT_MENU_ALIGN_BOTTOM" desc="Title of the menu item in the context menu for aligning the shelf to the bottom of the screen">
- Bottom
- </message>
- <message name="IDS_ASH_SHELF_CONTEXT_MENU_ALIGN_LEFT" desc="Title of the menu item in the context menu for aligning the shelf to the left of the screen">
- Left
- </message>
- <message name="IDS_ASH_SHELF_CONTEXT_MENU_ALIGN_RIGHT" desc="Title of the menu item in the context menu for aligning the shelf to the right of the screen">
- Right
- </message>
- <message name="IDS_ASH_SHELF_ACCESSIBLE_NAME" desc="The accessible name of the shelf.">
- Shelf
- </message>
-
- <message name="IDS_AURA_SET_DESKTOP_WALLPAPER" desc="The label used for change wallpaper in context menu">
- Set wallpaper...
- </message>
-
- <message name="IDS_ASH_KEYBOARD_OVERLAY_TITLE" desc="The title of the keyboard overlay.">
- Keyboard Overlay
- </message>
-
- <message name="IDS_ASH_LEARN_MORE" desc="Text of Learn more links.">
- Learn more
- </message>
-
- <!-- Status tray items -->
- <message name="IDS_ASH_STATUS_TRAY_ACCESSIBLE_NAME" desc="The accessible name of the status tray.">
- Status tray
- </message>
- <message name="IDS_ASH_STATUS_TRAY_SPOKEN_FEEDBACK_ENABLED_BUBBLE" desc="The message shown on a bubble when spoken feedback is enabled">
-Spoken feedback is enabled.
-Press Ctrl+Alt+Z to disable.
- </message>
- <message name="IDS_ASH_STATUS_TRAY_SETTINGS" desc="The label used for the settings item in the status tray.">
- Settings
- </message>
- <message name="IDS_ASH_STATUS_TRAY_SIGN_OUT" desc="The label used for the button in the status tray to sign out of the system.">
- Sign out
- </message>
- <message name="IDS_ASH_STATUS_TRAY_SIGN_OUT_ALL" desc="The label used for the button in the status tray to sign out all users of the system.">
- Sign out all
- </message>
- <message name="IDS_ASH_STATUS_TRAY_GUEST_LABEL" desc="The label used in the system tray's user card to indicate that the current session is a guest session.">
- Guest
- </message>
- <message name="IDS_ASH_STATUS_TRAY_EXIT_GUEST" desc="The label used for the button in the status tray to terminate a guest session.">
- Exit guest
- </message>
- <message name="IDS_ASH_STATUS_TRAY_KIOSK_LABEL" desc="The label used in the system tray's user card to indicate that the current session is running in demo mode.">
- Demo mode
- </message>
- <message name="IDS_ASH_STATUS_TRAY_EXIT_KIOSK" desc="The label used for the button in the status tray to terminate a session kiosk mode.">
- Exit session
- </message>
- <message name="IDS_ASH_STATUS_TRAY_EXIT_PUBLIC" desc="The label used for the button in the status tray to terminate a public account session. If the label is long, indicate where it may be broken into two lines by inserting \n instead of a whitespace.">
- Exit session
- </message>
- <message name="IDS_ASH_STATUS_TRAY_PUBLIC_LABEL" desc="Text of the the ash system bubble's user card when the current session is a public account session.">
- <ph name="DISPLAY_NAME">$1<ex>Internet kiosk</ex></ph> is a public session managed by <ph name="DOMAIN">$2<ex>yourdomain.com</ex></ph>
- </message>
- <message name="IDS_ASH_STATUS_TRAY_LOCK" desc="The label used for the button in the status tray to lock the screen.">
- Lock
- </message>
- <message name="IDS_ASH_STATUS_TRAY_SMS" desc="The label used in the status tray for SMS.">
- SMS
- </message>
- <message name="IDS_ASH_STATUS_TRAY_SMS_MESSAGES" desc="The label used in the default status tray view for SMS with the number of messages.">
- SMS messages: <ph name="MESSAGE_COUNT">$1<ex>3</ex></ph>
- </message>
- <message name="IDS_ASH_STATUS_TRAY_SMS_NUMBER" desc="Sender for SMS messagees in the system tray.">
- SMS from <ph name="PHONE_NUMBER">$1<ex>08700 776655</ex></ph>
- </message>
- <message name="IDS_ASH_STATUS_TRAY_SIGN_IN_ANOTHER_ACCOUNT" desc="The string for the button which lets the user add another account to the current session.">
- Sign in another account...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_CAPTION_CANNOT_ADD_USER" desc="The caption for the error message when the user has reached the limit of multi profile users.">
- Can't sign into another account.
- </message>
- <message name="IDS_ASH_STATUS_TRAY_MESSAGE_CANNOT_ADD_USER" desc="The error message when the user has reached the limit of multi profile users.">
- You can only have up to three accounts in multiple sign-in.
- </message>
-
- <message name="IDS_ASH_STATUS_TRAY_BLUETOOTH" desc="The label used as the header in the bluetooth popup.">
- Bluetooth
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BLUETOOTH_ENABLED" desc="The label used in the tray popup to notify that bluetooth is enabled.">
- Bluetooth enabled
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BLUETOOTH_DISABLED" desc="The label used in the tray popup to notify that bluetooth is disabled.">
- Bluetooth disabled
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BLUETOOTH_CONNECTING" desc="Shows a connecting bluetooth device in the bluetooth list.">
- <ph name="BLUETOOTH">$1<ex>Apple Magic Mouse</ex></ph>: Connecting...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISABLE_BLUETOOTH" desc="The label used in the tray popup to disable bluetooth.">
- Disable Bluetooth
- </message>
- <message name="IDS_ASH_STATUS_TRAY_ENABLE_BLUETOOTH" desc="The label used in the tray popup to enable bluetooth.">
- Enable Bluetooth
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BLUETOOTH_MANAGE_DEVICES" desc="The label used in the tray popup to manage bluetooth devices.">
- Manage devices...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BLUETOOTH_DISCOVERING" desc="The label used in the tray popup to show bluetooth is discovering devices.">
- Scanning for devices...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_TRACING" desc="The status tray item indicating that performance tracing is running.">
- Performance tracing enabled
- </message>
-
- <message name="IDS_ASH_STATUS_TRAY_UPDATE" desc="The label used in the tray popup to notify that the user should restart to get system updates.">
- Restart to update
- </message>
- <message name="IDS_ASH_STATUS_TRAY_RESTART_AND_POWERWASH_UPDATE" desc="The label used in the tray popup to notify that the user should restart and powerwash to get system updates.">
- Restart and Powerwash to update
- </message>
-
- <message name="IDS_ASH_STATUS_TRAY_BRIGHTNESS" desc="The accessible text for the brightness slider.">
- Brightness
- </message>
- <message name="IDS_ASH_STATUS_TRAY_VOLUME" desc="The accessible text for the volume slider.">
- Volume
- </message>
- <message name="IDS_ASH_STATUS_TRAY_AUDIO" desc="The label used in audio detailed page bottom header of ash tray pop up.">
- Audio Settings
- </message>
- <message name="IDS_ASH_STATUS_TRAY_AUDIO_OUTPUT" desc="The label used in audio detailed page for audio output section of ash tray pop up.">
- Output
- </message>
- <message name="IDS_ASH_STATUS_TRAY_AUDIO_INPUT" desc="The label used in audio detailed page for audio input section of ash tray pop up.">
- Input
- </message>
-
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_MIRRORING" desc="The label used in the tray to show that the current status is mirroring.">
- Mirroring to <ph name="DISPLAY_NAME">$1</ph>
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED" desc="The label used in the tray to show that the current status is extended.">
- Extending screen to <ph name="DISPLAY_NAME">$1</ph>
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_MIRRORING_NO_INTERNAL" desc="The label used in the tray to show that the current status is mirroring and the device doesn't have the internal display.">
- Mirroring
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED_NO_INTERNAL" desc="The label used in the tray to show that the current status is extended and the device doesn't have the internal display.">
- Extending screen
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_DOCKED" desc="The label used in the tray to show that the current status is docked mode.">
- Docked mode
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_DOCKED_DESCRIPTION" desc="The label used in the notification body to describe what the docked mode means.">
- Your Chromebook will stay on while connected to an external display, even with the lid closed.
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_RESOLUTION_CHANGED" desc="The label used in the tray to notify that the display resolution settings has changed.">
- <ph name="DISPLAY_NAME">$1</ph> resolution was changed to <ph name="RESOLUTION">$2</ph>
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_ROTATED" desc="The label used in the tray to notify that the display rotation settings has changed.">
- <ph name="DISPLAY_NAME">$1</ph> was rotated to <ph name="ROTATION">$2</ph>
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_SINGLE_DISPLAY" desc="The label used in the tray to show a single display's configuration">
- <ph name="DISPLAY_NAME">$1</ph>: <ph name="ANNOTATION">$2</ph>
- </message>
- <message name="IDS_ASH_STATUS_TRAY_UNKNOWN_DISPLAY_NAME" desc="Label shown in tray for a display whose name is unknown.">
- Unknown Display
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_ANNOTATED_NAME" desc="Label used to show a display name with annotation (like screen resolution or overscan info).">
- <ph name="DISPLAY_NAME">$1</ph> (<ph name="ANNOTATION">$2</ph>)
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_ANNOTATION" desc="Label used to annotate the display's status like resolution or overscan flag.">
- <ph name="RESOLUTION">$1</ph>, <ph name="OVERSCAN">$2</ph>
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_ANNOTATION_OVERSCAN" desc="Label used to describe that the system notice that this display device may have overscan area.">
- overscan
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_STANDARD_ORIENTATION" desc="The default value of display orientation option item.">
- 0&#x00B0;
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_90" desc="The value of display orientation option item: 90-degree rotated">
- 90&#x00B0;
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_180" desc="The value of display orientation option item: 180-degree rotated">
- 180&#x00B0;
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_270" desc="The value of display orientation option item: 270-degree rotated">
- 270&#x00B0;
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DRIVE_SYNCING" desc="The label in the tray to indicate onoing file sync operations.">
- Syncing <ph name="count">$1<ex>3</ex></ph> file(s)
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DRIVE" desc="The label used for Google Drive tray details header.">
- Google Drive
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DRIVE_SETTINGS" desc="The label used for Google Drive settings entry.">
- Google Drive settings...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_IME" desc="The label used as the header in the IME popup.">
- Input methods
- </message>
- <message name="IDS_ASH_STATUS_TRAY_IME_SETTINGS" desc="The label used for IME settings entry.">
- Customize languages and input...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_CAPS_LOCK_ENABLED" desc="The label used for the tray item to indicate caps lock is on and to toggle caps lock by the click.">
- CAPS LOCK is on
- </message>
- <message name="IDS_ASH_STATUS_TRAY_CAPS_LOCK_DISABLED" desc="The label used for the tray item to indicate caps lock is on and to toggle caps lock by the click.">
- CAPS LOCK is off
- </message>
- <message name="IDS_ASH_STATUS_TRAY_CAPS_LOCK_SHORTCUT_SEARCH" desc="The shortcut text used for the caps lock tray item.">
- Search
- </message>
- <message name="IDS_ASH_STATUS_TRAY_CAPS_LOCK_SHORTCUT_SEARCH_OR_SHIFT" desc="The shortcut text used for the caps lock tray item.">
- Search or Shift
- </message>
- <message name="IDS_ASH_STATUS_TRAY_CAPS_LOCK_SHORTCUT_ALT_SEARCH" desc="The shortcut text used for the caps lock tray item.">
- Alt+Search
- </message>
- <message name="IDS_ASH_STATUS_TRAY_CAPS_LOCK_SHORTCUT_ALT_SEARCH_OR_SHIFT" desc="The shortcut text used for the caps lock tray item.">
- Alt+Search or Shift
- </message>
- <message name="IDS_ASH_STATUS_TRAY_CAPS_LOCK_CANCEL_BY_ALT_SEARCH" desc="The message shown on a bubble when caps lock is turned on.">
-CAPS LOCK is on.
-Press Alt+Search or Shift to cancel.
- </message>
- <message name="IDS_ASH_STATUS_TRAY_CAPS_LOCK_CANCEL_BY_SEARCH" desc="The message shown on a bubble when caps lock is turned on.">
-CAPS LOCK is on.
-Press Search or Shift to cancel.
- </message>
- <message name="IDS_ASH_STATUS_TRAY_IME_TURNED_ON_BUBBLE" desc="The message shown on a bubble when an IME is enabled">
- Your input method has changed to <ph name="INPUT_METHOD_ID">$1<ex>EN</ex></ph>.
-Press Shift + Alt to switch.
- </message>
- <message name="IDS_ASH_STATUS_TRAY_THIRD_PARTY_IME_TURNED_ON_BUBBLE" desc="The message shown on a bubble when a third party IME is enabled">
- Your input method has changed to <ph name="INPUT_METHOD_ID">$1<ex>EN</ex></ph>*(<ph name="BEGIN_LINK">&lt;a target="_blank" href="$2"&gt;</ph>3rd party<ph name="END_LINK">&lt;/a&gt;<ex>&lt;/a&gt;</ex></ph>).
-Press Shift + Alt to switch.
- </message>
-
- <message name="IDS_ASH_STATUS_TRAY_LOCALE_CHANGE_MESSAGE" desc="The message used for locale change notifications in the system tray.">
- The language has changed from "<ph name="FROM_LOCALE">$1<ex>Italian</ex></ph>" to "<ph name="TO_LOCALE">$2<ex>English (United States)</ex></ph>" after syncing your settings.
- </message>
- <message name="IDS_ASH_STATUS_TRAY_LOCALE_REVERT_MESSAGE" desc="Link to revert a change.">
- Change back to "<ph name="FROM_LOCALE">$1<ex>Italian</ex></ph>" (requires restart)
- </message>
-
- <message name="IDS_ASH_STATUS_TRAY_ACCESSIBILITY" desc="The label used in the tray menu to show the accessibility option menu.">
- Accessibility
- </message>
- <message name="IDS_ASH_STATUS_TRAY_ACCESSIBILITY_TITLE" desc="The label used in the title of the accessibility option menu.">
- Accessibility
- </message>
- <message name="IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SPOKEN_FEEDBACK" desc="The label used in the accessibility menu of the
- system tray to toggle on/off spoken feedback feature.">
- Spoken feedback
- </message>
- <message name="IDS_ASH_STATUS_TRAY_ACCESSIBILITY_HIGH_CONTRAST_MODE" desc="The label used in the accessibility menu of the system tray to toggle on/off high contrast feature.">
- High contrast mode
- </message>
- <message name="IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SCREEN_MAGNIFIER" desc="The label used in the accessibility menu of the system tray to toggle on/off magnifier feature.">
- Screen magnifier
- </message>
- <message name="IDS_ASH_STATUS_TRAY_ACCESSIBILITY_LARGE_CURSOR" desc="The label used in the accessibility menu of the system tray to toggle on/off large mouse cursor feature.">
- Large mouse cursor
- </message>
- <message name="IDS_ASH_STATUS_TRAY_ACCESSIBILITY_AUTOCLICK" desc="The label used in the accessibility menu of the system tray to toggle on/off automatic mouse clicks.">
- Automatic clicks
- </message>
- <message name="IDS_ASH_STATUS_TRAY_ACCESSIBILITY_LEARN_MORE" desc="The label used in the accessibility menu of the system tray
- to open a webpage (article on help center) containing explanation about accessibility feature.">
- Learn more...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SETTINGS" desc="The label of the item 'Settings...' used in the accessibility menu of the system tray to open an accessibility setting page.">
- Settings...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BATTERY_FULL" desc="The label in the tray dialog to indicate that the battery is full.">
- Battery full
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BATTERY_PERCENT" desc="The label in the tray dialog to show the remaining battery power as a percent.">
- <ph name="percentage">$1<ex>56</ex></ph>% remaining
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BATTERY_PERCENT_ONLY" desc="The label in the tray bubble setting row to show the remaining battery power as a percent.">
- <ph name="percentage">$1<ex>56</ex></ph>%
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BATTERY_TIME_UNTIL_FULL" desc="The label in the tray dialog to show a time estimate until the battery is fully charged.">
- <ph name="hour">$1<ex>2</ex></ph>h <ph name="minute">$2<ex>53</ex></ph>m until full
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BATTERY_CALCULATING" desc="The label in the tray dialog indicating that the time to charge or discharge the battery is being calculated.">
- Calculating...
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BATTERY_TIME_LEFT_SHORT" desc="The label in the tray bubble settings row to show a time estimate until the battery is empty.">
- <ph name="hour">$1<ex>2</ex></ph>:<ph name="minute">$2<ex>53</ex></ph> left
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BATTERY_TIME_UNTIL_FULL_SHORT" desc="The label in the tray bubble settings row to show a time estimate until the battery is fully charged.">
- <ph name="hour">$1<ex>2</ex></ph>:<ph name="minute">$2<ex>53</ex></ph> until full
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BATTERY_CHARGING_UNRELIABLE" desc="The label in the tray dialog to indicate that battery charging is unreliable.">
- Low-power charger
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BATTERY_FULL_CHARGE_ACCESSIBLE" desc="The message used by accessibility to show battery is fully charged.">
- Battery is full.
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BATTERY_PERCENT_ACCESSIBLE" desc="The message used by accessibility to show battery is discharging.">
- Battery is <ph name="percentage">$1<ex>56</ex></ph>% full.
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BATTERY_PERCENT_CHARGING_ACCESSIBLE" desc="The message used by accessibility to show battery is being charged.">
- Battery is <ph name="percentage">$1<ex>56</ex></ph>% full and charging.
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BATTERY_CALCULATING_ACCESSIBLE" desc="The message used by accessibility to show battery is calculating its time in short message.">
- Calculating battery time.
- </message>
- <message name= "IDS_ASH_STATUS_TRAY_BATTERY_TIME_LEFT_ACCESSIBLE" desc="The message used by accessibility to read remaining battery time until empty.">
- Time left until battery is empty, <ph name="time_left">$1<ex>1 hour and 15 minutes</ex></ph>
- </message>
- <message name= "IDS_ASH_STATUS_TRAY_BATTERY_TIME_UNTIL_FULL_ACCESSIBLE" desc="The message used by accessibility to read the estimated time until full.">
- Time remaining until battery is fully charged, <ph name="time_remaining">$1<ex>1 hour and 15 minutes</ex></ph>
- </message>
- <message name = "IDS_ASH_STATUS_TRAY_BATTERY_TIME_ACCESSIBLE" desc="The message used by accessibility to read battery time, which includes both non-zero hours and minutes.">
- <ph name="hour">$1<ex> 1 hour</ex></ph> and <ph name="minute">$2<ex>15 minutes</ex></ph>
- </message>
- <message name="IDS_ASH_STATUS_TRAY_BATTERY_CHARGING_UNRELIABLE_ACCESSIBLE" desc="The message used by accessibility to indicate that battery charging is unreliable.">
- Plugged in to a low-power charger. Battery charging may not be reliable.
- </message>
- <message name="IDS_ASH_STATUS_TRAY_HELP" desc="The accessible text for the help button.">
- Help
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DATE" desc="The date displayed on ash system bubble, Depending on launguage, please choose the best separator(eg ',') between abbreviated weekday and date">
- <ph name="short_weekday">$1<ex>Fri</ex></ph>, <ph name="date">$2<ex>Aug 31, 2012</ex></ph>
- </message>
- <message name="IDS_ASH_STATUS_TRAY_SHUTDOWN" desc="The accessible text for the shutdown button.">
- Shutdown
- </message>
- <message name="IDS_ASH_STATUS_TRAY_REMAINING_SESSION_TIME" desc="The time remaining until the end of the session. Shown if the session length is limited.">
- <ph name="hours">$1<ex>01</ex></ph>:<ph name="minutes">$2<ex>35</ex></ph>:<ph name="seconds">$3<ex>12</ex></ph>
- </message>
- <message name="IDS_ASH_STATUS_TRAY_REMAINING_SESSION_TIME_NOTIFICATION" desc="Notification shown to inform the user that the session length is limited.">
- This session will end in <ph name="session_time_remaining">$1<ex>15 minutes</ex></ph>. You will be automatically signed out.
- </message>
-
- <message name="IDS_ASH_STATUS_TRAY_LOCALLY_MANAGED_LABEL" desc="Label shown instead of email for supervised users">
- Supervised user
- </message>
-
- <message name="IDS_ASH_STATUS_TRAY_PREVIOUS_MENU" desc="The accessible text for header entries for detailed versions of status tray items.">
- Previous menu
- </message>
-
- <message name="IDS_ASH_NOTIFICATION_UNREAD_COUNT_NINE_PLUS" desc="The text shown in the notification icon for the unread count when the count is more than 9.">
- 9+
- </message>
- <message name="IDS_ASH_MAXIMIZE_WINDOW" desc="A help text to show that when the button gets clicked the window get maximized.">
- Maximize
- </message>
- <message name="IDS_ASH_SNAP_WINDOW_RIGHT" desc="A help text to show that when the button gets clicked the window get snapped to the right side.">
- Right
- </message>
- <message name="IDS_ASH_SNAP_WINDOW_LEFT" desc="A help text to show that when the button gets clicked the window get snapped to the left side.">
- Left
- </message>
- <message name="IDS_ASH_RESTORE_WINDOW" desc="A help text to show that when the button gets clicked the window gets restored to its normal - non maximized - state.">
- Restore
- </message>
- <message name="IDS_ASH_MINIMIZE_WINDOW" desc="A help text to show that when the button gets clicked the window gets minimized.">
- Minimize
- </message>
- <message name="IDS_ASH_DISPLAY_FAILURE_ON_MIRRORING" desc="An error message to show that the system failed to enter the mirroring mode.">
- Could not mirror displays since no supported resolutions found. Entered extended desktop instead.
- </message>
- <message name="IDS_ASH_DISPLAY_FAILURE_ON_NON_MIRRORING" desc="An error message to show that the system failed to enter the extended desktop mode or unknown status. Please translate the parentized text.">
- Dear Monitor, it's not working out between us. (That monitor is not supported)
- </message>
- <message name="IDS_ASH_DISPLAY_RESOLUTION_CHANGE_ACCEPT" desc="A button label shown in the notification for the resolution change to accept the change">
- Accept
- </message>
- <message name="IDS_ASH_DISPLAY_RESOLUTION_CHANGE_REVERT" desc="A button label shown in the notification for the resolution change to revert the change">
- Revert
- </message>
- <message name="IDS_ASH_DISPLAY_RESOLUTION_TIMEOUT" desc="A message for to notify the user about the timeout of display resolution change.">
- Reverting to old resolution in <ph name="TIMEOUT_SECONDS">$1</ph>
- </message>
- <message name="IDS_ASH_INTERNAL_DISPLAY_NAME" desc="The name of the internal display which is shown in the display settings.">
- Internal Display
- </message>
- <message name="IDS_ASH_LOW_PERIPHERAL_BATTERY_NOTIFICATION_TEXT" desc="The text of the notification when a peripheral device is in low battery condition.">
- Battery low (<ph name="percentage">$1<ex>56</ex></ph>%)
- </message>
- <message name="IDS_ASH_SCREENSHOT_NOTIFICATION_TITLE_SUCCESS" desc="The title of the notification when a screenshot was taken.">
- Screenshot taken
- </message>
- <message name="IDS_ASH_SCREENSHOT_NOTIFICATION_TITLE_DISABLED" desc="The title of the notification when taking a screenshot failed because screenshots are disabled.">
- Screenshots disabled
- </message>
- <message name="IDS_ASH_SCREENSHOT_NOTIFICATION_TITLE_FAIL" desc="The title of the notification when taking a screenshot failed.">
- An error occurred
- </message>
- <message name="IDS_ASH_SCREENSHOT_NOTIFICATION_TEXT_SUCCESS" desc="The text of the notification when a screenshot was taken.">
- Click to view
- </message>
- <message name="IDS_ASH_SCREENSHOT_NOTIFICATION_TEXT_DISABLED" desc="The text of the notification when taking a screenshot failed because screenshots are disabled by administrator policy.">
- The ability to take screenshots has been disabled by your administrator.
- </message>
- <message name="IDS_ASH_SCREENSHOT_NOTIFICATION_TEXT_FAIL" desc="The text of the notification when taking a screenshot failed.">
- Failed to save screenshot
- </message>
- <message name="IDS_ASH_EXIT_WARNING_POPUP_TEXT" desc="The text of the popup when the user preses the exit shortcut.">
- Press Ctrl+Shift+Q twice to quit.
- </message>
- <message name="IDS_ASH_EXIT_WARNING_POPUP_TEXT_ACCESSIBLE" desc="The message used by accessibility to indicate the content of the popup when the user preses the exit shortcut.">
- Press Control Shift Q twice to quit.
- </message>
-
- <!-- ChromeOS-specific strings -->
- <if expr="pp_ifdef('chromeos')">
- <part file="ash_chromeos_strings.grdp" />
- </if>
-
- </messages>
- </release>
-</grit>
-
diff --git a/chromium/ash/ash_strings.gyp b/chromium/ash/ash_strings.gyp
index 4b09ad25101..6c81594ee02 100644
--- a/chromium/ash/ash_strings.gyp
+++ b/chromium/ash/ash_strings.gyp
@@ -3,30 +3,23 @@
# found in the LICENSE file.
{
- 'variables': {
- 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
- },
-
'targets': [
{
'target_name': 'ash_strings',
'type': 'none',
+ 'variables': {
+ 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/ash/strings',
+ },
'actions': [
- # Localizable resources.
{
- 'action_name': 'ash_strings',
+ 'action_name': 'generate_ash_strings',
'variables': {
'grit_grd_file': 'ash_strings.grd',
- 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/ash_strings',
},
'includes': [ '../build/grit_action.gypi' ],
},
],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)/ash_strings',
- ],
- },
+ 'includes': [ '../build/grit_target.gypi' ],
},
],
}
diff --git a/chromium/ash/ash_switches.cc b/chromium/ash/ash_switches.cc
deleted file mode 100644
index 1234a2cfa92..00000000000
--- a/chromium/ash/ash_switches.cc
+++ /dev/null
@@ -1,270 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/ash_switches.h"
-
-#include "base/command_line.h"
-
-namespace ash {
-namespace switches {
-
-// Enables an animated transition from the boot splash screen (Chrome logo on a
-// white background) to the login screen. Implies
-// |kAshCopyHostBackgroundAtBoot| and doesn't make much sense if used in
-// conjunction with |kDisableBootAnimation| (since the transition begins at the
-// same time as the white/grayscale login screen animation).
-const char kAshAnimateFromBootSplashScreen[] =
- "ash-animate-from-boot-splash-screen";
-
-// Constrains the pointer movement within a root window on desktop.
-const char kAshConstrainPointerToRoot[] = "ash-constrain-pointer-to-root";
-
-// Copies the host window's content to the system background layer at startup.
-// Can make boot slightly slower, but also hides an even-longer awkward period
-// where we display a white background if the login wallpaper takes a long time
-// to load.
-const char kAshCopyHostBackgroundAtBoot[] = "ash-copy-host-background-at-boot";
-
-// Enable keyboard shortcuts useful for debugging.
-const char kAshDebugShortcuts[] = "ash-debug-shortcuts";
-
-// UI to show preferred networks in the status area (for testing).
-const char kAshDebugShowPreferredNetworks[] =
- "ash-debug-show-preferred-networks";
-
-// Indicates that the wallpaper images specified by
-// kAshDefaultWallpaper{Large,Small} are OEM-specific (i.e. they are not
-// downloadable from Google).
-const char kAshDefaultWallpaperIsOem[] = "ash-default-wallpaper-is-oem";
-
-// Default wallpaper to use (as paths to trusted, non-user-writable JPEG files).
-const char kAshDefaultWallpaperLarge[] = "ash-default-wallpaper-large";
-const char kAshDefaultWallpaperSmall[] = "ash-default-wallpaper-small";
-
-// Use the normal visual style for the caption buttons (minimize, maximize,
-// restore, close).
-const char kAshDisableAlternateFrameCaptionButtonStyle[] =
- "ash-disable-alternate-caption-button";
-
-// Disable the alternate shelf layout.
-const char kAshDisableAlternateShelfLayout[] =
- "ash-disable-alternate-shelf-layout";
-
-#if defined(OS_CHROMEOS)
-// Disable the status tray volume menu for allowing the user to choose an audio
-// input and output device.
-const char kAshDisableAudioDeviceMenu[] =
- "ash-disable-audio-device-menu";
-#endif
-
-// Disable auto window maximization logic.
-const char kAshDisableAutoMaximizing[] = "ash-disable-auto-maximizing";
-
-// Disables the limitter to throttle how quickly a user
-// can change display settings.
-const char kAshDisableDisplayChangeLimiter[] =
- "ash-disable-display-change-limiter";
-
-#if defined(OS_CHROMEOS)
-// Disable the notification when a low-power USB charger is connected.
-const char kAshDisableUsbChargerNotification[] =
- "ash-disable-usb-charger-notification";
-
-// TODO(jamescook): Remove this unused flag. It exists only to allow the
-// "Enable audio device menu" about:flags item to have the tri-state
-// default/enabled/disabled UI.
-const char kAshEnableAudioDeviceMenu[] = "ash-enable-audio-device-menu";
-#endif // defined(OS_CHROMEOS)
-
-// Enable advanced gestures (e.g. for window management).
-const char kAshEnableAdvancedGestures[] = "ash-enable-advanced-gestures";
-
-// Use alternate visual style for the caption buttons (minimize, maximize,
-// restore, close). The alternate style:
-// - Adds a dedicated button for minimize.
-// - Removes the maximize button's help bubble.
-const char kAshEnableAlternateFrameCaptionButtonStyle[] =
- "ash-enable-alternate-caption-button";
-
-// Always enable brightness control. Used by machines that don't report their
-// main monitor as internal.
-const char kAshEnableBrightnessControl[] = "ash-enable-brightness-control";
-
-// Enable ability to dock windows at the desktop edge.
-const char kAshEnableDockedWindows[] = "ash-enable-docked-windows";
-
-// Disable dragging items off the shelf to unpin them.
-const char kAshDisableDragOffShelf[] = "ash-disable-drag-off-shelf";
-
-// Enables putting all windows into immersive fullscreen via <F4>.
-const char kAshEnableImmersiveFullscreenForAllWindows[] =
- "ash-enable-immersive-all-windows";
-
-#if defined(OS_CHROMEOS)
-// Enables the "full multi profile mode" - as it was in M-31.
-const char kAshEnableFullMultiProfileMode[] =
- "ash-enable-full-multi-profile-mode";
-#endif
-
-#if defined(OS_LINUX)
-// Enable memory monitoring.
-const char kAshEnableMemoryMonitor[] = "ash-enable-memory-monitor";
-#endif
-
-#if defined(OS_CHROMEOS)
-// Enables the multi user icons in the system tray.
-const char kAshEnableMultiUserTray[] = "ash-enable-multi-user-tray";
-#endif
-
-// Enables the Oak tree viewer.
-const char kAshEnableOak[] = "ash-enable-oak";
-
-// Disables overview mode for window switching.
-const char kAshDisableOverviewMode[] = "ash-disable-overview-mode";
-
-// Enables software based mirroring.
-const char kAshEnableSoftwareMirroring[] = "ash-enable-software-mirroring";
-
-// Enables "sticky" edges instead of "snap-to-edge"
-const char kAshEnableStickyEdges[] = "ash-enable-sticky-edges";
-
-// Enables showing the tray bubble by dragging on the shelf.
-const char kAshEnableTrayDragging[] = "ash-enable-tray-dragging";
-
-// Forces chrome to use mirror mode when an external display is connected.
-const char kAshForceMirrorMode[] = "ash-force-mirror-mode";
-
-// Wallpaper to use in guest mode (as paths to trusted, non-user-writable JPEG
-// files).
-const char kAshGuestWallpaperLarge[] = "ash-guest-wallpaper-large";
-const char kAshGuestWallpaperSmall[] = "ash-guest-wallpaper-small";
-
-// Hides notifications that are irrelevant to Chrome OS device factory testing,
-// such as battery level updates.
-const char kAshHideNotificationsForFactory[] =
- "ash-hide-notifications-for-factory";
-
-// Sets a window size, optional position, and optional scale factor.
-// "1024x768" creates a window of size 1024x768.
-// "100+200-1024x768" positions the window at 100,200.
-// "1024x768*2" sets the scale factor to 2 for a high DPI display.
-const char kAshHostWindowBounds[] = "ash-host-window-bounds";
-
-// Specifies the delay in milliseconds before beginning overview mode after
-// getting an alt tab keypress.
-const char kAshOverviewDelayOnAltTab[] = "ash-overview-delay-on-alt-tab";
-
-// Specifies the layout mode and offsets for the secondary display for
-// testing. The format is "<t|r|b|l>,<offset>" where t=TOP, r=RIGHT,
-// b=BOTTOM and L=LEFT. For example, 'r,-100' means the secondary display
-// is positioned on the right with -100 offset. (above than primary)
-const char kAshSecondaryDisplayLayout[] = "ash-secondary-display-layout";
-
-// Use the old behavior where the user can pick the width of a side maximized
-// window. The user selects the width of the side maximized window based on how
-// far off the edge of the work area they drag the window.
-const char kAshMultipleSnapWindowWidths[] = "ash-multiple-snap-window-widths";
-
-// Enables the heads-up display for tracking touch points.
-const char kAshTouchHud[] = "ash-touch-hud";
-
-// Use alternate layout of the shelf for testing a new look and feel:
-// Slightly smaller profile, only 2 states for the "bar highlight" on
-// launcher buttons, app list icon with more visible state indication,
-// app list icon repositionable and defaulting as 1st item in shelf,
-// more visible state indication for background on status area.
-// crbug's [244983, 244990, 244994, 245005, 245012]
-const char kAshUseAlternateShelfLayout[] = "ash-use-alternate-shelf";
-
-// Flags explicitly show or hide the shelf alignment menu.
-const char kShowShelfAlignmentMenu[] = "show-launcher-alignment-menu";
-const char kHideShelfAlignmentMenu[] = "hide-launcher-alignment-menu";
-
-// Uses the 1st display in --ash-host-window-bounds as internal display.
-// This is for debugging on linux desktop.
-const char kAshUseFirstDisplayAsInternal[] =
- "ash-use-first-display-as-internal";
-
-// (Most) Chrome OS hardware reports ACPI power button releases correctly.
-// Standard hardware reports releases immediately after presses. If set, we
-// lock the screen or shutdown the system immediately in response to a press
-// instead of displaying an interactive animation.
-const char kAuraLegacyPowerButton[] = "aura-legacy-power-button";
-
-#if defined(OS_WIN)
-// Force Ash to open its root window on the desktop, even on Windows 8 where
-// it would normally end up in metro.
-const char kForceAshToDesktop[] = "ash-force-desktop";
-
-#endif
-
-// Disallow items to be dragged from the app launcher list into the launcher.
-const char kAshDisableDragAndDropAppListToLauncher[] =
- "ash-disable-drag-and-drop-applist-to-launcher";
-
-bool UseAlternateFrameCaptionButtonStyle() {
- // For the sake of simplicity, the alternate caption button style is only
- // used if snapped windows are always 50% of the screen's width.
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- return command_line->HasSwitch(kAshEnableAlternateFrameCaptionButtonStyle) &&
- !command_line->HasSwitch(kAshMultipleSnapWindowWidths);
-}
-
-bool UseAlternateShelfLayout() {
- return !CommandLine::ForCurrentProcess()->
- HasSwitch(kAshDisableAlternateShelfLayout);
-}
-
-bool UseDragOffShelf() {
- return !CommandLine::ForCurrentProcess()->
- HasSwitch(kAshDisableDragOffShelf);
-}
-
-bool ShowShelfAlignmentMenu() {
- return !CommandLine::ForCurrentProcess()->
- HasSwitch(kHideShelfAlignmentMenu);
-}
-
-// Returns true if the full multi profile mode (M-31 version) is active.
-bool UseFullMultiProfileMode() {
-#if defined(OS_CHROMEOS)
- return CommandLine::ForCurrentProcess()->
- HasSwitch(kAshEnableFullMultiProfileMode);
-#else
- return false;
-#endif
-}
-
-bool UseMultiUserTray() {
-#if defined(OS_CHROMEOS)
- // TODO(skuhne): If this gets removed for good, remove also
- // |SystemTray::user_items_| and the use of it.
- return CommandLine::ForCurrentProcess()->HasSwitch(kAshEnableMultiUserTray);
-#else
- return false;
-#endif
-}
-
-bool UseOverviewMode() {
- return !CommandLine::ForCurrentProcess()->HasSwitch(kAshDisableOverviewMode);
-}
-
-bool UseDockedWindows() {
- return CommandLine::ForCurrentProcess()->HasSwitch(kAshEnableDockedWindows);
-}
-
-#if defined(OS_CHROMEOS)
-bool ShowAudioDeviceMenu() {
- return !CommandLine::ForCurrentProcess()->
- HasSwitch(kAshDisableAudioDeviceMenu);
-}
-
-bool UseUsbChargerNotification() {
- return !CommandLine::ForCurrentProcess()->
- HasSwitch(kAshDisableUsbChargerNotification);
-}
-#endif
-
-} // namespace switches
-} // namespace ash
diff --git a/chromium/ash/ash_switches.h b/chromium/ash/ash_switches.h
deleted file mode 100644
index eb1c5422f68..00000000000
--- a/chromium/ash/ash_switches.h
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_ASH_SWITCHES_H_
-#define ASH_ASH_SWITCHES_H_
-
-#include "ash/ash_export.h"
-
-#include "build/build_config.h"
-
-namespace ash {
-namespace switches {
-
-// Note: If you add a switch, consider if it needs to be copied to a subsequent
-// command line if the process executes a new copy of itself. (For example,
-// see chromeos::LoginUtil::GetOffTheRecordCommandLine().)
-
-// Please keep alphabetized.
-ASH_EXPORT extern const char kAshAnimateFromBootSplashScreen[];
-ASH_EXPORT extern const char kAshConstrainPointerToRoot[];
-ASH_EXPORT extern const char kAshCopyHostBackgroundAtBoot[];
-ASH_EXPORT extern const char kAshDebugShortcuts[];
-ASH_EXPORT extern const char kAshDebugShowPreferredNetworks[];
-ASH_EXPORT extern const char kAshDefaultWallpaperIsOem[];
-ASH_EXPORT extern const char kAshDefaultWallpaperLarge[];
-ASH_EXPORT extern const char kAshDefaultWallpaperSmall[];
-ASH_EXPORT extern const char kAshDisableAlternateShelfLayout[];
-#if defined(OS_CHROMEOS)
-ASH_EXPORT extern const char kAshDisableAudioDeviceMenu[];
-#endif
-ASH_EXPORT extern const char kAshDisableAlternateFrameCaptionButtonStyle[];
-ASH_EXPORT extern const char kAshDisableAutoMaximizing[];
-ASH_EXPORT extern const char kAshDisableDisplayChangeLimiter[];
-ASH_EXPORT extern const char kAshDisableDragOffShelf[];
-ASH_EXPORT extern const char kAshDisableOverviewMode[];
-ASH_EXPORT extern const char kAshDisableDragAndDropAppListToLauncher[];
-#if defined(OS_CHROMEOS)
-ASH_EXPORT extern const char kAshDisableUsbChargerNotification[];
-ASH_EXPORT extern const char kAshEnableAudioDeviceMenu[];
-#endif
-ASH_EXPORT extern const char kAshEnableAdvancedGestures[];
-ASH_EXPORT extern const char kAshEnableAlternateFrameCaptionButtonStyle[];
-ASH_EXPORT extern const char kAshEnableBrightnessControl[];
-ASH_EXPORT extern const char kAshEnableDockedWindows[];
-ASH_EXPORT extern const char kAshEnableImmersiveFullscreenForAllWindows[];
-#if defined(OS_CHROMEOS)
-ASH_EXPORT extern const char kAshEnableFullMultiProfileMode[];
-#endif
-#if defined(OS_LINUX)
-ASH_EXPORT extern const char kAshEnableMemoryMonitor[];
-#endif
-#if defined(OS_CHROMEOS)
-ASH_EXPORT extern const char kAshEnableMultiUserTray[];
-#endif
-ASH_EXPORT extern const char kAshEnableOak[];
-ASH_EXPORT extern const char kAshEnableSoftwareMirroring[];
-ASH_EXPORT extern const char kAshEnableStickyEdges[];
-ASH_EXPORT extern const char kAshEnableTrayDragging[];
-ASH_EXPORT extern const char kAshForceMirrorMode[];
-ASH_EXPORT extern const char kAshGuestWallpaperLarge[];
-ASH_EXPORT extern const char kAshGuestWallpaperSmall[];
-ASH_EXPORT extern const char kAshHideNotificationsForFactory[];
-ASH_EXPORT extern const char kAshHostWindowBounds[];
-ASH_EXPORT extern const char kAshOverviewDelayOnAltTab[];
-ASH_EXPORT extern const char kAshSecondaryDisplayLayout[];
-ASH_EXPORT extern const char kAshMultipleSnapWindowWidths[];
-ASH_EXPORT extern const char kAshTouchHud[];
-ASH_EXPORT extern const char kAshUseAlternateShelfLayout[];
-ASH_EXPORT extern const char kAshUseFirstDisplayAsInternal[];
-ASH_EXPORT extern const char kAuraLegacyPowerButton[];
-#if defined(OS_WIN)
-ASH_EXPORT extern const char kForceAshToDesktop[];
-#endif
-ASH_EXPORT extern const char kShowShelfAlignmentMenu[];
-ASH_EXPORT extern const char kHideShelfAlignmentMenu[];
-
-// Returns true if the alternate visual style for the caption buttons (minimize,
-// maximize, restore, close) should be used.
-ASH_EXPORT bool UseAlternateFrameCaptionButtonStyle();
-
-// Returns true if the alternate shelf layout should be used.
-ASH_EXPORT bool UseAlternateShelfLayout();
-
-// Returns true if items can be dragged off the shelf to unpin.
-ASH_EXPORT bool UseDragOffShelf();
-
-// Returns true if side shelf alignment is enabled.
-ASH_EXPORT bool ShowShelfAlignmentMenu();
-
-// Returns true if the full MultiProfile mode (M-31 version) is used.
-ASH_EXPORT bool UseFullMultiProfileMode();
-
-// Returns true if multiple user icons are allowed in the tray.
-ASH_EXPORT bool UseMultiUserTray();
-
-// Returns true if overview mode should be activated for window switching.
-ASH_EXPORT bool UseOverviewMode();
-
-// Returns true if docked windows feature is enabled.
-ASH_EXPORT bool UseDockedWindows();
-
-#if defined(OS_CHROMEOS)
-// Returns true if new audio handler should be used.
-ASH_EXPORT bool UseNewAudioHandler();
-
-// Returns true if we should show the audio device switching UI.
-ASH_EXPORT bool ShowAudioDeviceMenu();
-
-// Returns true if a notification should appear when a low-power USB charger
-// is connected.
-ASH_EXPORT bool UseUsbChargerNotification();
-#endif
-
-} // namespace switches
-} // namespace ash
-
-#endif // ASH_ASH_SWITCHES_H_
diff --git a/chromium/ash/autoclick/autoclick_controller.cc b/chromium/ash/autoclick/autoclick_controller.cc
deleted file mode 100644
index 9b49ca29099..00000000000
--- a/chromium/ash/autoclick/autoclick_controller.cc
+++ /dev/null
@@ -1,209 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/autoclick/autoclick_controller.h"
-
-#include "ash/shell.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "base/timer/timer.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/events/event.h"
-#include "ui/events/event_constants.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/point.h"
-#include "ui/gfx/vector2d.h"
-
-namespace ash {
-
-namespace {
-
-// The threshold of mouse movement measured in DIP that will
-// initiate a new autoclick.
-const int kMovementThreshold = 20;
-
-bool IsModifierKey(ui::KeyboardCode key_code) {
- return key_code == ui::VKEY_SHIFT ||
- key_code == ui::VKEY_LSHIFT ||
- key_code == ui::VKEY_CONTROL ||
- key_code == ui::VKEY_LCONTROL ||
- key_code == ui::VKEY_RCONTROL ||
- key_code == ui::VKEY_MENU ||
- key_code == ui::VKEY_LMENU ||
- key_code == ui::VKEY_RMENU;
-}
-
-} // namespace
-
-// static.
-const int AutoclickController::kDefaultAutoclickDelayMs = 400;
-
-class AutoclickControllerImpl : public AutoclickController,
- public ui::EventHandler {
- public:
- AutoclickControllerImpl();
- virtual ~AutoclickControllerImpl();
-
- private:
- // AutoclickController overrides:
- virtual void SetEnabled(bool enabled) OVERRIDE;
- virtual bool IsEnabled() const OVERRIDE;
- virtual void SetAutoclickDelay(int delay_ms) OVERRIDE;
- virtual int GetAutoclickDelay() const OVERRIDE;
-
- // ui::EventHandler overrides:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
-
- void InitClickTimer();
-
- void DoAutoclick();
-
- bool enabled_;
- int delay_ms_;
- int mouse_event_flags_;
- scoped_ptr<base::Timer> autoclick_timer_;
- // The position in screen coordinates used to determine
- // the distance the mouse has moved.
- gfx::Point anchor_location_;
-
- DISALLOW_COPY_AND_ASSIGN(AutoclickControllerImpl);
-};
-
-
-AutoclickControllerImpl::AutoclickControllerImpl()
- : enabled_(false),
- delay_ms_(kDefaultAutoclickDelayMs),
- mouse_event_flags_(ui::EF_NONE),
- anchor_location_(-kMovementThreshold, -kMovementThreshold) {
- InitClickTimer();
-}
-
-AutoclickControllerImpl::~AutoclickControllerImpl() {
-}
-
-void AutoclickControllerImpl::SetEnabled(bool enabled) {
- if (enabled_ == enabled)
- return;
- enabled_ = enabled;
-
- if (enabled_) {
- Shell::GetInstance()->AddPreTargetHandler(this);
- autoclick_timer_->Stop();
- } else {
- Shell::GetInstance()->RemovePreTargetHandler(this);
- }
-}
-
-bool AutoclickControllerImpl::IsEnabled() const {
- return enabled_;
-}
-
-void AutoclickControllerImpl::SetAutoclickDelay(int delay_ms) {
- delay_ms_ = delay_ms;
- InitClickTimer();
-}
-
-int AutoclickControllerImpl::GetAutoclickDelay() const {
- return delay_ms_;
-}
-
-void AutoclickControllerImpl::InitClickTimer() {
- autoclick_timer_.reset(new base::Timer(
- FROM_HERE,
- base::TimeDelta::FromMilliseconds(delay_ms_),
- base::Bind(&AutoclickControllerImpl::DoAutoclick,
- base::Unretained(this)),
- false));
-}
-
-void AutoclickControllerImpl::OnMouseEvent(ui::MouseEvent* event) {
- if (event->type() == ui::ET_MOUSE_MOVED) {
- mouse_event_flags_ = event->flags();
-
- gfx::Point mouse_location = event->root_location();
- ash::wm::ConvertPointToScreen(
- wm::GetRootWindowAt(mouse_location),
- &mouse_location);
-
- // The distance between the mouse location and the anchor location
- // must exceed a certain threshold to initiate a new autoclick countdown.
- // This ensures that mouse jitter caused by poor motor control does not
- // 1. initiate an unwanted autoclick from rest
- // 2. prevent the autoclick from ever occuring when the mouse
- // arrives at the target.
- gfx::Vector2d delta = mouse_location - anchor_location_;
- if (delta.LengthSquared() >= kMovementThreshold * kMovementThreshold) {
- anchor_location_ = event->root_location();
- autoclick_timer_->Reset();
- }
- } else if (event->type() == ui::ET_MOUSE_PRESSED) {
- autoclick_timer_->Stop();
- } else if (event->type() == ui::ET_MOUSEWHEEL &&
- autoclick_timer_->IsRunning()) {
- autoclick_timer_->Reset();
- }
-}
-
-void AutoclickControllerImpl::OnKeyEvent(ui::KeyEvent* event) {
- int modifier_mask =
- ui::EF_SHIFT_DOWN |
- ui::EF_CONTROL_DOWN |
- ui::EF_ALT_DOWN |
- ui::EF_COMMAND_DOWN |
- ui::EF_EXTENDED;
- int new_modifiers = event->flags() & modifier_mask;
- mouse_event_flags_ = (mouse_event_flags_ & ~modifier_mask) | new_modifiers;
-
- if (!IsModifierKey(event->key_code()))
- autoclick_timer_->Stop();
-}
-
-void AutoclickControllerImpl::OnTouchEvent(ui::TouchEvent* event) {
- autoclick_timer_->Stop();
-}
-
-void AutoclickControllerImpl::OnGestureEvent(ui::GestureEvent* event) {
- autoclick_timer_->Stop();
-}
-
-void AutoclickControllerImpl::OnScrollEvent(ui::ScrollEvent* event) {
- autoclick_timer_->Stop();
-}
-
-void AutoclickControllerImpl::DoAutoclick() {
- gfx::Point screen_location =
- aura::Env::GetInstance()->last_mouse_location();
- aura::Window* root_window = wm::GetRootWindowAt(screen_location);
- DCHECK(root_window) << "Root window not found while attempting autoclick.";
-
- gfx::Point click_location(screen_location);
- anchor_location_ = click_location;
- wm::ConvertPointFromScreen(root_window, &click_location);
-
- aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher();
- dispatcher->ConvertPointToHost(&click_location);
-
- ui::MouseEvent press_event(ui::ET_MOUSE_PRESSED,
- click_location,
- click_location,
- mouse_event_flags_ | ui::EF_LEFT_MOUSE_BUTTON);
- ui::MouseEvent release_event(ui::ET_MOUSE_RELEASED,
- click_location,
- click_location,
- mouse_event_flags_ | ui::EF_LEFT_MOUSE_BUTTON);
-
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&press_event);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&release_event);
-}
-
-// static.
-AutoclickController* AutoclickController::CreateInstance() {
- return new AutoclickControllerImpl();
-}
-
-} // namespace ash
diff --git a/chromium/ash/autoclick/autoclick_controller.h b/chromium/ash/autoclick/autoclick_controller.h
deleted file mode 100644
index 46b9ef48089..00000000000
--- a/chromium/ash/autoclick/autoclick_controller.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_AUTOCLICK_AUTOCLICK_CONTROLLER_H
-#define ASH_AUTOCLICK_AUTOCLICK_CONTROLLER_H
-
-#include "ash/ash_export.h"
-
-namespace ash {
-
-// Controls the autoclick a11y feature in ash.
-// If enabled, we will automatically send a click event a short time after
-// the mouse had been at rest.
-class ASH_EXPORT AutoclickController {
- public:
- virtual ~AutoclickController() {}
-
- // Set whether autoclicking is enabled.
- virtual void SetEnabled(bool enabled) = 0;
-
- // Returns true if autoclicking is enabled.
- virtual bool IsEnabled() const = 0;
-
- // Set the time to wait in milliseconds from when the mouse stops moving
- // to when the autoclick event is sent.
- virtual void SetAutoclickDelay(int delay_ms) = 0;
-
- // Returns the autoclick delay in milliseconds.
- virtual int GetAutoclickDelay() const = 0;
-
- static AutoclickController* CreateInstance();
-
- // The default wait time between last mouse movement and sending
- // the autoclick.
- static const int kDefaultAutoclickDelayMs;
-
- protected:
- AutoclickController() {}
-};
-
-} // namespace ash
-
-#endif // ASH_AUTOCLICK_AUTOCLICK_CONTROLLER_H
diff --git a/chromium/ash/autoclick/autoclick_unittest.cc b/chromium/ash/autoclick/autoclick_unittest.cc
deleted file mode 100644
index 96f17cf3ea0..00000000000
--- a/chromium/ash/autoclick/autoclick_unittest.cc
+++ /dev/null
@@ -1,289 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/autoclick/autoclick_controller.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/window.h"
-#include "ui/events/event.h"
-#include "ui/events/event_constants.h"
-#include "ui/events/event_handler.h"
-#include "ui/events/keycodes/keyboard_codes.h"
-
-namespace ash {
-
-class MouseEventCapturer : public ui::EventHandler {
- public:
- MouseEventCapturer() { Reset(); }
- virtual ~MouseEventCapturer() {}
-
- void Reset() {
- events_.clear();
- }
-
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
- if (!(event->flags() & ui::EF_LEFT_MOUSE_BUTTON))
- return;
- // Filter out extraneous mouse events like mouse entered, exited,
- // capture changed, etc.
- ui::EventType type = event->type();
- if (type == ui::ET_MOUSE_MOVED || type == ui::ET_MOUSE_PRESSED ||
- type == ui::ET_MOUSE_RELEASED) {
- events_.push_back(ui::MouseEvent(
- event->type(),
- event->location(),
- event->root_location(),
- event->flags()));
- // Stop event propagation so we don't click on random stuff that
- // might break test assumptions.
- event->StopPropagation();
- }
-
- // If there is a possibility that we're in an infinite loop, we should
- // exit early with a sensible error rather than letting the test time out.
- ASSERT_LT(events_.size(), 100u);
- }
-
- const std::vector<ui::MouseEvent>& captured_events() const {
- return events_;
- }
-
- private:
- std::vector<ui::MouseEvent> events_;
-
- DISALLOW_COPY_AND_ASSIGN(MouseEventCapturer);
-};
-
-class AutoclickTest : public test::AshTestBase {
- public:
- AutoclickTest() {}
- virtual ~AutoclickTest() {}
-
- virtual void SetUp() OVERRIDE {
- test::AshTestBase::SetUp();
- Shell::GetInstance()->AddPreTargetHandler(&mouse_event_capturer_);
- GetAutoclickController()->SetAutoclickDelay(0);
-
- // Move mouse to deterministic location at the start of each test.
- GetEventGenerator().MoveMouseTo(100, 100);
- }
-
- virtual void TearDown() OVERRIDE {
- Shell::GetInstance()->RemovePreTargetHandler(&mouse_event_capturer_);
- test::AshTestBase::TearDown();
- }
-
- void MoveMouseWithFlagsTo(int x, int y, ui::EventFlags flags) {
- GetEventGenerator().set_flags(flags);
- GetEventGenerator().MoveMouseTo(x, y);
- GetEventGenerator().set_flags(ui::EF_NONE);
- }
-
- const std::vector<ui::MouseEvent>& WaitForMouseEvents() {
- mouse_event_capturer_.Reset();
- RunAllPendingInMessageLoop();
- return mouse_event_capturer_.captured_events();
- }
-
- AutoclickController* GetAutoclickController() {
- return Shell::GetInstance()->autoclick_controller();
- }
-
- private:
- MouseEventCapturer mouse_event_capturer_;
-
- DISALLOW_COPY_AND_ASSIGN(AutoclickTest);
-};
-
-TEST_F(AutoclickTest, ToggleEnabled) {
- std::vector<ui::MouseEvent> events;
-
- // We should not see any events initially.
- EXPECT_FALSE(GetAutoclickController()->IsEnabled());
- events = WaitForMouseEvents();
- EXPECT_EQ(0u, events.size());
-
- // Enable autoclick, and we should see a mouse pressed and
- // a mouse released event, simulating a click.
- GetAutoclickController()->SetEnabled(true);
- GetEventGenerator().MoveMouseTo(0, 0);
- EXPECT_TRUE(GetAutoclickController()->IsEnabled());
- events = WaitForMouseEvents();
- EXPECT_EQ(2u, events.size());
- EXPECT_EQ(ui::ET_MOUSE_PRESSED, events[0].type());
- EXPECT_EQ(ui::ET_MOUSE_RELEASED, events[1].type());
-
- // We should not get any more clicks until we move the mouse.
- events = WaitForMouseEvents();
- EXPECT_EQ(0u, events.size());
- GetEventGenerator().MoveMouseTo(30, 30);
- events = WaitForMouseEvents();
- EXPECT_EQ(2u, events.size());
- EXPECT_EQ(ui::ET_MOUSE_PRESSED, events[0].type());
- EXPECT_EQ(ui::ET_MOUSE_RELEASED, events[1].type());
-
- // Disable autoclick, and we should see the original behaviour.
- GetAutoclickController()->SetEnabled(false);
- EXPECT_FALSE(GetAutoclickController()->IsEnabled());
- events = WaitForMouseEvents();
- EXPECT_EQ(0u, events.size());
-}
-
-TEST_F(AutoclickTest, MouseMovement) {
- std::vector<ui::MouseEvent> events;
- GetAutoclickController()->SetEnabled(true);
-
- gfx::Point p1(0, 0);
- gfx::Point p2(20, 20);
- gfx::Point p3(40, 40);
-
- // Move mouse to p1.
- GetEventGenerator().MoveMouseTo(p1);
- events = WaitForMouseEvents();
- EXPECT_EQ(2u, events.size());
- EXPECT_EQ(p1.ToString(), events[0].root_location().ToString());
- EXPECT_EQ(p1.ToString(), events[1].root_location().ToString());
-
- // Move mouse to multiple locations and finally arrive at p3.
- GetEventGenerator().MoveMouseTo(p2);
- GetEventGenerator().MoveMouseTo(p1);
- GetEventGenerator().MoveMouseTo(p3);
- events = WaitForMouseEvents();
- EXPECT_EQ(2u, events.size());
- EXPECT_EQ(p3.ToString(), events[0].root_location().ToString());
- EXPECT_EQ(p3.ToString(), events[1].root_location().ToString());
-}
-
-TEST_F(AutoclickTest, MovementThreshold) {
- GetAutoclickController()->SetEnabled(true);
- GetEventGenerator().MoveMouseTo(0, 0);
- EXPECT_EQ(2u, WaitForMouseEvents().size());
-
- // Small mouse movements should not trigger an autoclick.
- GetEventGenerator().MoveMouseTo(1, 1);
- EXPECT_EQ(0u, WaitForMouseEvents().size());
- GetEventGenerator().MoveMouseTo(2, 2);
- EXPECT_EQ(0u, WaitForMouseEvents().size());
- GetEventGenerator().MoveMouseTo(0, 0);
- EXPECT_EQ(0u, WaitForMouseEvents().size());
-
- // A large mouse movement should trigger an autoclick.
- GetEventGenerator().MoveMouseTo(100, 100);
- EXPECT_EQ(2u, WaitForMouseEvents().size());
-}
-
-TEST_F(AutoclickTest, SingleKeyModifier) {
- GetAutoclickController()->SetEnabled(true);
- MoveMouseWithFlagsTo(20, 20, ui::EF_SHIFT_DOWN);
- std::vector<ui::MouseEvent> events = WaitForMouseEvents();
- EXPECT_EQ(2u, events.size());
- EXPECT_EQ(ui::EF_SHIFT_DOWN, events[0].flags() & ui::EF_SHIFT_DOWN);
- EXPECT_EQ(ui::EF_SHIFT_DOWN, events[1].flags() & ui::EF_SHIFT_DOWN);
-}
-
-TEST_F(AutoclickTest, MultipleKeyModifiers) {
- GetAutoclickController()->SetEnabled(true);
- ui::EventFlags modifier_flags = static_cast<ui::EventFlags>(
- ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN | ui::EF_SHIFT_DOWN);
- MoveMouseWithFlagsTo(30, 30, modifier_flags);
- std::vector<ui::MouseEvent> events = WaitForMouseEvents();
- EXPECT_EQ(2u, events.size());
- EXPECT_EQ(modifier_flags, events[0].flags() & modifier_flags);
- EXPECT_EQ(modifier_flags, events[1].flags() & modifier_flags);
-}
-
-TEST_F(AutoclickTest, KeyModifiersReleased) {
- GetAutoclickController()->SetEnabled(true);
-
- ui::EventFlags modifier_flags = static_cast<ui::EventFlags>(
- ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN | ui::EF_SHIFT_DOWN);
- MoveMouseWithFlagsTo(12, 12, modifier_flags);
-
- // Simulate releasing key modifiers by sending key released events.
- GetEventGenerator().ReleaseKey(ui::VKEY_CONTROL,
- static_cast<ui::EventFlags>(ui::EF_ALT_DOWN | ui::EF_SHIFT_DOWN));
- GetEventGenerator().ReleaseKey(ui::VKEY_SHIFT, ui::EF_ALT_DOWN);
-
- std::vector<ui::MouseEvent> events;
- events = WaitForMouseEvents();
- EXPECT_EQ(2u, events.size());
- EXPECT_EQ(0, events[0].flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(0, events[0].flags() & ui::EF_SHIFT_DOWN);
- EXPECT_EQ(ui::EF_ALT_DOWN, events[0].flags() & ui::EF_ALT_DOWN);
-}
-
-TEST_F(AutoclickTest, ExtendedDisplay) {
- UpdateDisplay("1280x1024,800x600");
- RunAllPendingInMessageLoop();
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- EXPECT_EQ(2u, root_windows.size());
-
- GetAutoclickController()->SetEnabled(true);
- std::vector<ui::MouseEvent> events;
-
- // Test first root window.
- aura::test::EventGenerator generator1(root_windows[0]);
- generator1.MoveMouseTo(100, 200);
- events = WaitForMouseEvents();
- EXPECT_EQ(2u, events.size());
- EXPECT_EQ(100, events[0].root_location().x());
- EXPECT_EQ(200, events[0].root_location().y());
-
- // Test second root window.
- aura::test::EventGenerator generator2(root_windows[1]);
- generator2.MoveMouseTo(300, 400);
- events = WaitForMouseEvents();
- EXPECT_EQ(2u, events.size());
- EXPECT_EQ(300, events[0].root_location().x());
- EXPECT_EQ(400, events[0].root_location().y());
-
- // Test movement threshold between displays.
-}
-
-TEST_F(AutoclickTest, UserInputCancelsAutoclick) {
- GetAutoclickController()->SetEnabled(true);
- std::vector<ui::MouseEvent> events;
-
- // Pressing a normal key should cancel the autoclick.
- GetEventGenerator().MoveMouseTo(200, 200);
- GetEventGenerator().PressKey(ui::VKEY_K, ui::EF_NONE);
- GetEventGenerator().ReleaseKey(ui::VKEY_K, ui::EF_NONE);
- events = WaitForMouseEvents();
- EXPECT_EQ(0u, events.size());
-
- // Pressing a modifier key should NOT cancel the autoclick.
- GetEventGenerator().MoveMouseTo(100, 100);
- GetEventGenerator().PressKey(ui::VKEY_SHIFT, ui::EF_SHIFT_DOWN);
- GetEventGenerator().ReleaseKey(ui::VKEY_SHIFT, ui::EF_NONE);
- events = WaitForMouseEvents();
- EXPECT_EQ(2u, events.size());
-
- // Performing a gesture should cancel the autoclick.
- GetEventGenerator().MoveMouseTo(200, 200);
- GetEventGenerator().GestureTapDownAndUp(gfx::Point(100, 100));
- events = WaitForMouseEvents();
- EXPECT_EQ(0u, events.size());
-
- // Test another gesture.
- GetEventGenerator().MoveMouseTo(100, 100);
- GetEventGenerator().GestureScrollSequence(
- gfx::Point(100, 100),
- gfx::Point(200, 200),
- base::TimeDelta::FromMilliseconds(200),
- 3);
- events = WaitForMouseEvents();
- EXPECT_EQ(0u, events.size());
-
- // Test scroll events.
- GetEventGenerator().MoveMouseTo(200, 200);
- GetEventGenerator().ScrollSequence(
- gfx::Point(100, 100), base::TimeDelta::FromMilliseconds(200),
- 0, 100, 3, 2);
- events = WaitForMouseEvents();
- EXPECT_EQ(0u, events.size());
-}
-
-} // namespace ash
diff --git a/chromium/ash/cancel_mode.cc b/chromium/ash/cancel_mode.cc
deleted file mode 100644
index df775d2ce4c..00000000000
--- a/chromium/ash/cancel_mode.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/cancel_mode.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "ui/aura/root_window.h"
-
-namespace ash {
-
-void DispatchCancelMode() {
- Shell::RootWindowControllerList controllers(
- Shell::GetAllRootWindowControllers());
- for (Shell::RootWindowControllerList::const_iterator i = controllers.begin();
- i != controllers.end(); ++i) {
- (*i)->dispatcher()->AsRootWindowHostDelegate()->OnHostCancelMode();
- }
-}
-
-} // namespace ash
diff --git a/chromium/ash/cancel_mode.h b/chromium/ash/cancel_mode.h
deleted file mode 100644
index 915fe43c490..00000000000
--- a/chromium/ash/cancel_mode.h
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_CANCEL_MODE_H_
-#define ASH_CANCEL_MODE_H_
-
-namespace ash {
-
-// Sends OnHostCancelMode() to all RootWindows.
-void DispatchCancelMode();
-
-} // namespace ash
-
-#endif // ASH_CANCEL_MODE_H_
diff --git a/chromium/ash/caps_lock_delegate.h b/chromium/ash/caps_lock_delegate.h
deleted file mode 100644
index 6bd2b69eb8c..00000000000
--- a/chromium/ash/caps_lock_delegate.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_CAPS_LOCK_DELEGATE_H_
-#define ASH_CAPS_LOCK_DELEGATE_H_
-
-#include "ash/ash_export.h"
-
-namespace ash {
-
-// Delegate for controlling Caps Lock.
-class ASH_EXPORT CapsLockDelegate {
- public:
- virtual ~CapsLockDelegate() {}
-
- // Returns true if caps lock is enabled.
- virtual bool IsCapsLockEnabled() const = 0;
-
- // Sets the caps lock state to |enabled|.
- // The state change can occur asynchronously and calling IsCapsLockEnabled
- // just after this may return the old state.
- virtual void SetCapsLockEnabled(bool enabled) = 0;
-
- // Toggles the caps lock state.
- // The state change can occur asynchronously and calling IsCapsLockEnabled
- // just after this may return the old state.
- virtual void ToggleCapsLock() = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_CAPS_LOCK_DELEGATE_H_
diff --git a/chromium/ash/caps_lock_delegate_stub.cc b/chromium/ash/caps_lock_delegate_stub.cc
deleted file mode 100644
index 8dc61cffef0..00000000000
--- a/chromium/ash/caps_lock_delegate_stub.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/caps_lock_delegate_stub.h"
-
-namespace ash {
-
-CapsLockDelegateStub::CapsLockDelegateStub()
- : enabled_(false) {}
-
-CapsLockDelegateStub::~CapsLockDelegateStub() {}
-
-bool CapsLockDelegateStub::IsCapsLockEnabled() const {
- return enabled_;
-}
-
-void CapsLockDelegateStub::SetCapsLockEnabled(bool enabled) {
- enabled_ = enabled;
-}
-
-void CapsLockDelegateStub::ToggleCapsLock() {
- enabled_ = !enabled_;
-}
-
-} // namespace ash
diff --git a/chromium/ash/caps_lock_delegate_stub.h b/chromium/ash/caps_lock_delegate_stub.h
deleted file mode 100644
index d701e47bc48..00000000000
--- a/chromium/ash/caps_lock_delegate_stub.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_CAPS_LOCK_DELEGATE_STUB_H_
-#define ASH_CAPS_LOCK_DELEGATE_STUB_H_
-
-#include "ash/ash_export.h"
-#include "ash/caps_lock_delegate.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-
-namespace ash {
-
-// Stub implementation of CapsLockDelegate mainly for testing.
-class ASH_EXPORT CapsLockDelegateStub : public CapsLockDelegate {
- public:
- CapsLockDelegateStub();
- virtual ~CapsLockDelegateStub();
-
- // Overridden from CapsLockDelegate:
- virtual bool IsCapsLockEnabled() const OVERRIDE;
- virtual void SetCapsLockEnabled(bool enabled) OVERRIDE;
- virtual void ToggleCapsLock() OVERRIDE;
-
- private:
- bool enabled_;
-
- DISALLOW_COPY_AND_ASSIGN(CapsLockDelegateStub);
-};
-
-} // namespace ash
-
-#endif // ASH_CAPS_LOCK_DELEGATE_STUB
diff --git a/chromium/ash/debug.cc b/chromium/ash/debug.cc
deleted file mode 100644
index f5c62200c76..00000000000
--- a/chromium/ash/debug.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/debug.h"
-
-#include "ash/shell.h"
-#include "cc/debug/layer_tree_debug_state.h"
-#include "ui/aura/root_window.h"
-#include "ui/compositor/compositor.h"
-
-namespace ash {
-namespace debug {
-
-void ToggleShowDebugBorders() {
- aura::Window::Windows root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- scoped_ptr<bool> value;
- for (aura::Window::Windows::iterator it = root_windows.begin();
- it != root_windows.end(); ++it) {
- ui::Compositor* compositor = (*it)->GetDispatcher()->compositor();
- cc::LayerTreeDebugState state = compositor->GetLayerTreeDebugState();
- if (!value.get())
- value.reset(new bool(!state.show_debug_borders));
- state.show_debug_borders = *value.get();
- compositor->SetLayerTreeDebugState(state);
- }
-}
-
-void ToggleShowFpsCounter() {
- aura::Window::Windows root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- scoped_ptr<bool> value;
- for (aura::Window::Windows::iterator it = root_windows.begin();
- it != root_windows.end(); ++it) {
- ui::Compositor* compositor = (*it)->GetDispatcher()->compositor();
- cc::LayerTreeDebugState state = compositor->GetLayerTreeDebugState();
- if (!value.get())
- value.reset(new bool(!state.show_fps_counter));
- state.show_fps_counter = *value.get();
- compositor->SetLayerTreeDebugState(state);
- }
-}
-
-void ToggleShowPaintRects() {
- aura::Window::Windows root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- scoped_ptr<bool> value;
- for (aura::Window::Windows::iterator it = root_windows.begin();
- it != root_windows.end(); ++it) {
- ui::Compositor* compositor = (*it)->GetDispatcher()->compositor();
- cc::LayerTreeDebugState state = compositor->GetLayerTreeDebugState();
- if (!value.get())
- value.reset(new bool(!state.show_paint_rects));
- state.show_paint_rects = *value.get();
- compositor->SetLayerTreeDebugState(state);
- }
-}
-
-} // debug
-} // ash
diff --git a/chromium/ash/debug.h b/chromium/ash/debug.h
deleted file mode 100644
index 92838d61147..00000000000
--- a/chromium/ash/debug.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DEBUG_H_
-#define ASH_DEBUG_H_
-
-#include "ash/ash_export.h"
-
-namespace ash {
-namespace debug {
-
-// Toggles debugging features controlled by
-// cc::LayerTreeDebugState.
-ASH_EXPORT void ToggleShowDebugBorders();
-ASH_EXPORT void ToggleShowFpsCounter();
-ASH_EXPORT void ToggleShowPaintRects();
-
-} // debug
-} // ash
-
-#endif // ASH_DEBUG_H_
diff --git a/chromium/ash/default_accessibility_delegate.cc b/chromium/ash/default_accessibility_delegate.cc
deleted file mode 100644
index 99540d726b8..00000000000
--- a/chromium/ash/default_accessibility_delegate.cc
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/default_accessibility_delegate.h"
-
-#include <limits>
-
-namespace ash {
-namespace internal {
-
-DefaultAccessibilityDelegate::DefaultAccessibilityDelegate()
- : spoken_feedback_enabled_(false),
- high_contrast_enabled_(false),
- screen_magnifier_enabled_(false),
- screen_magnifier_type_(kDefaultMagnifierType),
- large_cursor_enabled_(false),
- autoclick_enabled_(false),
- accessibility_alert_(A11Y_ALERT_NONE) {
-}
-
-DefaultAccessibilityDelegate::~DefaultAccessibilityDelegate() {}
-
-bool DefaultAccessibilityDelegate::IsSpokenFeedbackEnabled() const {
- return spoken_feedback_enabled_;
-}
-
-void DefaultAccessibilityDelegate::ToggleHighContrast() {
- high_contrast_enabled_ = !high_contrast_enabled_;
-}
-
-bool DefaultAccessibilityDelegate::IsHighContrastEnabled() const {
- return high_contrast_enabled_;
-}
-
-void DefaultAccessibilityDelegate::SetMagnifierEnabled(bool enabled) {
- screen_magnifier_enabled_ = enabled;
-}
-
-void DefaultAccessibilityDelegate::SetMagnifierType(MagnifierType type) {
- screen_magnifier_type_ = type;
-}
-
-bool DefaultAccessibilityDelegate::IsMagnifierEnabled() const {
- return screen_magnifier_enabled_;
-}
-
-MagnifierType DefaultAccessibilityDelegate::GetMagnifierType() const {
- return screen_magnifier_type_;
-}
-
-void DefaultAccessibilityDelegate::SetLargeCursorEnabled(bool enabled) {
- large_cursor_enabled_ = enabled;
-}
-
-bool DefaultAccessibilityDelegate::IsLargeCursorEnabled() const {
- return large_cursor_enabled_;
-}
-
-void DefaultAccessibilityDelegate::SetAutoclickEnabled(bool enabled) {
- autoclick_enabled_ = enabled;
-}
-
-bool DefaultAccessibilityDelegate::IsAutoclickEnabled() const {
- return autoclick_enabled_;
-}
-
-bool DefaultAccessibilityDelegate::ShouldShowAccessibilityMenu() const {
- return spoken_feedback_enabled_ ||
- high_contrast_enabled_ ||
- screen_magnifier_enabled_ ||
- large_cursor_enabled_ ||
- autoclick_enabled_;
-}
-
-void DefaultAccessibilityDelegate::SilenceSpokenFeedback() const {
-}
-
-void DefaultAccessibilityDelegate::ToggleSpokenFeedback(
- AccessibilityNotificationVisibility notify) {
- spoken_feedback_enabled_ = !spoken_feedback_enabled_;
-}
-
-void DefaultAccessibilityDelegate::SaveScreenMagnifierScale(double scale) {
-}
-
-double DefaultAccessibilityDelegate::GetSavedScreenMagnifierScale() {
- return std::numeric_limits<double>::min();
-}
-
-void DefaultAccessibilityDelegate::TriggerAccessibilityAlert(
- AccessibilityAlert alert) {
- accessibility_alert_ = alert;
-}
-
-AccessibilityAlert DefaultAccessibilityDelegate::GetLastAccessibilityAlert() {
- return accessibility_alert_;
-}
-
-base::TimeDelta DefaultAccessibilityDelegate::PlayShutdownSound() const {
- return base::TimeDelta();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/default_accessibility_delegate.h b/chromium/ash/default_accessibility_delegate.h
deleted file mode 100644
index 84d0e3edcf0..00000000000
--- a/chromium/ash/default_accessibility_delegate.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DEFAULT_ACCESSIBILITY_DELEGATE_H_
-#define ASH_DEFAULT_ACCESSIBILITY_DELEGATE_H_
-
-#include "ash/accessibility_delegate.h"
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-
-namespace ash {
-namespace internal {
-
-class ASH_EXPORT DefaultAccessibilityDelegate : public AccessibilityDelegate {
- public:
- DefaultAccessibilityDelegate();
- virtual ~DefaultAccessibilityDelegate();
-
- virtual bool IsSpokenFeedbackEnabled() const OVERRIDE;
- virtual void ToggleHighContrast() OVERRIDE;
- virtual bool IsHighContrastEnabled() const OVERRIDE;
- virtual void SetMagnifierEnabled(bool enabled) OVERRIDE;
- virtual void SetMagnifierType(MagnifierType type) OVERRIDE;
- virtual bool IsMagnifierEnabled() const OVERRIDE;
- virtual MagnifierType GetMagnifierType() const OVERRIDE;
- virtual void SetLargeCursorEnabled(bool enabled) OVERRIDE;
- virtual bool IsLargeCursorEnabled() const OVERRIDE;
- virtual void SetAutoclickEnabled(bool enabled) OVERRIDE;
- virtual bool IsAutoclickEnabled() const OVERRIDE;
- virtual bool ShouldShowAccessibilityMenu() const OVERRIDE;
- virtual void SilenceSpokenFeedback() const OVERRIDE;
- virtual void ToggleSpokenFeedback(
- AccessibilityNotificationVisibility notify) OVERRIDE;
- virtual void SaveScreenMagnifierScale(double scale) OVERRIDE;
- virtual double GetSavedScreenMagnifierScale() OVERRIDE;
- virtual void TriggerAccessibilityAlert(AccessibilityAlert alert) OVERRIDE;
- virtual AccessibilityAlert GetLastAccessibilityAlert() OVERRIDE;
- virtual base::TimeDelta PlayShutdownSound() const OVERRIDE;
-
- private:
- bool spoken_feedback_enabled_;
- bool high_contrast_enabled_;
- bool screen_magnifier_enabled_;
- MagnifierType screen_magnifier_type_;
- bool large_cursor_enabled_;
- bool autoclick_enabled_;
- AccessibilityAlert accessibility_alert_;
- DISALLOW_COPY_AND_ASSIGN(DefaultAccessibilityDelegate);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // DEFAULT_ACCESSIBILITY_DELEGATE_H_
diff --git a/chromium/ash/default_user_wallpaper_delegate.cc b/chromium/ash/default_user_wallpaper_delegate.cc
deleted file mode 100644
index 168fc9d4522..00000000000
--- a/chromium/ash/default_user_wallpaper_delegate.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/default_user_wallpaper_delegate.h"
-
-#include "ash/desktop_background/desktop_background_controller.h"
-#include "ash/shell.h"
-
-namespace ash {
-
-int DefaultUserWallpaperDelegate::GetAnimationType() {
- return views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE;
-}
-
-bool DefaultUserWallpaperDelegate::ShouldShowInitialAnimation() {
- return false;
-}
-
-void DefaultUserWallpaperDelegate::UpdateWallpaper() {
-}
-
-void DefaultUserWallpaperDelegate::InitializeWallpaper() {
- ash::Shell::GetInstance()->desktop_background_controller()->
- CreateEmptyWallpaper();
-}
-
-void DefaultUserWallpaperDelegate::OpenSetWallpaperPage() {
-}
-
-bool DefaultUserWallpaperDelegate::CanOpenSetWallpaperPage() {
- return false;
-}
-
-void DefaultUserWallpaperDelegate::OnWallpaperAnimationFinished() {
-}
-
-void DefaultUserWallpaperDelegate::OnWallpaperBootAnimationFinished() {
-}
-
-} // namespace ash
diff --git a/chromium/ash/default_user_wallpaper_delegate.h b/chromium/ash/default_user_wallpaper_delegate.h
deleted file mode 100644
index 2e22e305475..00000000000
--- a/chromium/ash/default_user_wallpaper_delegate.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DEFAULT_USER_WALLPAPER_DELEGATE_H_
-#define ASH_DEFAULT_USER_WALLPAPER_DELEGATE_H_
-
-#include "ash/ash_export.h"
-#include "ash/desktop_background/user_wallpaper_delegate.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-
-namespace ash {
-
-class ASH_EXPORT DefaultUserWallpaperDelegate : public UserWallpaperDelegate {
- public:
- DefaultUserWallpaperDelegate() {}
- virtual ~DefaultUserWallpaperDelegate() {}
-
- // UserWallpaperDelegate overrides:
- virtual int GetAnimationType() OVERRIDE;
- virtual bool ShouldShowInitialAnimation() OVERRIDE;
- virtual void UpdateWallpaper() OVERRIDE;
- virtual void InitializeWallpaper() OVERRIDE;
- virtual void OpenSetWallpaperPage() OVERRIDE;
- virtual bool CanOpenSetWallpaperPage() OVERRIDE;
- virtual void OnWallpaperAnimationFinished() OVERRIDE;
- virtual void OnWallpaperBootAnimationFinished() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DefaultUserWallpaperDelegate);
-};
-
-} // namespace ash
-
-#endif // ASH_DEFAULT_USER_WALLPAPER_DELEGATE_H_
diff --git a/chromium/ash/desktop_background/OWNERS b/chromium/ash/desktop_background/OWNERS
deleted file mode 100644
index 679223ebc47..00000000000
--- a/chromium/ash/desktop_background/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-bshe@chromium.org
-nkostylev@chromium.org
diff --git a/chromium/ash/desktop_background/desktop_background_controller.cc b/chromium/ash/desktop_background/desktop_background_controller.cc
deleted file mode 100644
index d1c67a93f0d..00000000000
--- a/chromium/ash/desktop_background/desktop_background_controller.cc
+++ /dev/null
@@ -1,463 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/desktop_background/desktop_background_controller.h"
-
-#include "ash/ash_switches.h"
-#include "ash/desktop_background/desktop_background_controller_observer.h"
-#include "ash/desktop_background/desktop_background_view.h"
-#include "ash/desktop_background/desktop_background_widget_controller.h"
-#include "ash/desktop_background/user_wallpaper_delegate.h"
-#include "ash/desktop_background/wallpaper_resizer.h"
-#include "ash/display/display_info.h"
-#include "ash/display/display_manager.h"
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "ash/shell_factory.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/root_window_layout_manager.h"
-#include "base/bind.h"
-#include "base/command_line.h"
-#include "base/file_util.h"
-#include "base/logging.h"
-#include "base/synchronization/cancellation_flag.h"
-#include "base/threading/worker_pool.h"
-#include "content/public/browser/browser_thread.h"
-#include "grit/ash_resources.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/gfx/codec/jpeg_codec.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/gfx/rect.h"
-#include "ui/views/widget/widget.h"
-
-using ash::internal::DesktopBackgroundWidgetController;
-using content::BrowserThread;
-
-namespace ash {
-namespace {
-
-// How long to wait reloading the wallpaper after the max display has
-// changed?
-const int kWallpaperReloadDelayMs = 2000;
-
-} // namespace
-
-const int kSmallWallpaperMaxWidth = 1366;
-const int kSmallWallpaperMaxHeight = 800;
-const int kLargeWallpaperMaxWidth = 2560;
-const int kLargeWallpaperMaxHeight = 1700;
-const int kWallpaperThumbnailWidth = 108;
-const int kWallpaperThumbnailHeight = 68;
-
-// DesktopBackgroundController::WallpaperLoader wraps background wallpaper
-// loading.
-class DesktopBackgroundController::WallpaperLoader
- : public base::RefCountedThreadSafe<
- DesktopBackgroundController::WallpaperLoader> {
- public:
- // If set, |file_path| must be a trusted (i.e. read-only,
- // non-user-controlled) file containing a JPEG image.
- WallpaperLoader(const base::FilePath& file_path,
- WallpaperLayout file_layout,
- int resource_id,
- WallpaperLayout resource_layout)
- : file_path_(file_path),
- file_layout_(file_layout),
- resource_id_(resource_id),
- resource_layout_(resource_layout) {
- }
-
- static void LoadOnWorkerPoolThread(scoped_refptr<WallpaperLoader> loader) {
- DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
- loader->LoadWallpaper();
- }
-
- const base::FilePath& file_path() const { return file_path_; }
- int resource_id() const { return resource_id_; }
-
- void Cancel() {
- cancel_flag_.Set();
- }
-
- WallpaperResizer* ReleaseWallpaperResizer() {
- return wallpaper_resizer_.release();
- }
-
- private:
- friend class base::RefCountedThreadSafe<
- DesktopBackgroundController::WallpaperLoader>;
-
- // Loads a JPEG image from |path|, a trusted file -- note that the image
- // is not loaded in a sandboxed process. Returns an empty pointer on
- // error.
- static scoped_ptr<SkBitmap> LoadSkBitmapFromJPEGFile(
- const base::FilePath& path) {
- std::string data;
- if (!base::ReadFileToString(path, &data)) {
- LOG(ERROR) << "Unable to read data from " << path.value();
- return scoped_ptr<SkBitmap>();
- }
-
- scoped_ptr<SkBitmap> bitmap(gfx::JPEGCodec::Decode(
- reinterpret_cast<const unsigned char*>(data.data()), data.size()));
- if (!bitmap)
- LOG(ERROR) << "Unable to decode JPEG data from " << path.value();
- return bitmap.Pass();
- }
-
- void LoadWallpaper() {
- if (cancel_flag_.IsSet())
- return;
-
- if (!file_path_.empty())
- file_bitmap_ = LoadSkBitmapFromJPEGFile(file_path_);
-
- if (cancel_flag_.IsSet())
- return;
-
- if (file_bitmap_) {
- gfx::ImageSkia image = gfx::ImageSkia::CreateFrom1xBitmap(*file_bitmap_);
- wallpaper_resizer_.reset(new WallpaperResizer(
- image, GetMaxDisplaySizeInNative(), file_layout_));
- } else {
- wallpaper_resizer_.reset(new WallpaperResizer(
- resource_id_, GetMaxDisplaySizeInNative(), resource_layout_));
- }
- }
-
- ~WallpaperLoader() {}
-
- base::CancellationFlag cancel_flag_;
-
- // Bitmap loaded from |file_path_|.
- scoped_ptr<SkBitmap> file_bitmap_;
-
- scoped_ptr<WallpaperResizer> wallpaper_resizer_;
-
- // Path to a trusted JPEG file.
- base::FilePath file_path_;
-
- // Layout to be used when displaying the image from |file_path_|.
- WallpaperLayout file_layout_;
-
- // ID of an image resource to use if |file_path_| is empty or unloadable.
- int resource_id_;
-
- // Layout to be used when displaying |resource_id_|.
- WallpaperLayout resource_layout_;
-
- DISALLOW_COPY_AND_ASSIGN(WallpaperLoader);
-};
-
-DesktopBackgroundController::DesktopBackgroundController()
- : command_line_for_testing_(NULL),
- locked_(false),
- desktop_background_mode_(BACKGROUND_NONE),
- current_default_wallpaper_resource_id_(-1),
- weak_ptr_factory_(this),
- wallpaper_reload_delay_(kWallpaperReloadDelayMs) {
- Shell::GetInstance()->display_controller()->AddObserver(this);
-}
-
-DesktopBackgroundController::~DesktopBackgroundController() {
- CancelPendingWallpaperOperation();
- Shell::GetInstance()->display_controller()->RemoveObserver(this);
-}
-
-gfx::ImageSkia DesktopBackgroundController::GetWallpaper() const {
- if (current_wallpaper_)
- return current_wallpaper_->image();
- return gfx::ImageSkia();
-}
-
-void DesktopBackgroundController::AddObserver(
- DesktopBackgroundControllerObserver* observer) {
- observers_.AddObserver(observer);
-}
-
-void DesktopBackgroundController::RemoveObserver(
- DesktopBackgroundControllerObserver* observer) {
- observers_.RemoveObserver(observer);
-}
-
-WallpaperLayout DesktopBackgroundController::GetWallpaperLayout() const {
- if (current_wallpaper_)
- return current_wallpaper_->layout();
- return WALLPAPER_LAYOUT_CENTER_CROPPED;
-}
-
-void DesktopBackgroundController::OnRootWindowAdded(aura::Window* root_window) {
- // The background hasn't been set yet.
- if (desktop_background_mode_ == BACKGROUND_NONE)
- return;
-
- // Handle resolution change for "built-in" images.
- gfx::Size max_display_size = GetMaxDisplaySizeInNative();
- if (current_max_display_size_ != max_display_size) {
- current_max_display_size_ = max_display_size;
- if (desktop_background_mode_ == BACKGROUND_IMAGE &&
- current_wallpaper_.get())
- UpdateWallpaper();
- }
-
- InstallDesktopController(root_window);
-}
-
-bool DesktopBackgroundController::SetDefaultWallpaper(bool is_guest) {
- const bool use_large =
- GetAppropriateResolution() == WALLPAPER_RESOLUTION_LARGE;
-
- base::FilePath file_path;
- WallpaperLayout file_layout = use_large ? WALLPAPER_LAYOUT_CENTER_CROPPED :
- WALLPAPER_LAYOUT_CENTER;
- int resource_id = use_large ? IDR_AURA_WALLPAPER_DEFAULT_LARGE :
- IDR_AURA_WALLPAPER_DEFAULT_SMALL;
- WallpaperLayout resource_layout = WALLPAPER_LAYOUT_TILE;
-
- CommandLine* command_line = command_line_for_testing_ ?
- command_line_for_testing_ : CommandLine::ForCurrentProcess();
- const char* switch_name = NULL;
- if (is_guest) {
- switch_name = use_large ? switches::kAshGuestWallpaperLarge :
- switches::kAshGuestWallpaperSmall;
- } else {
- switch_name = use_large ? switches::kAshDefaultWallpaperLarge :
- switches::kAshDefaultWallpaperSmall;
- }
- file_path = command_line->GetSwitchValuePath(switch_name);
-
- if (DefaultWallpaperIsAlreadyLoadingOrLoaded(file_path, resource_id))
- return false;
-
- CancelPendingWallpaperOperation();
- wallpaper_loader_ = new WallpaperLoader(
- file_path, file_layout, resource_id, resource_layout);
- base::WorkerPool::PostTaskAndReply(
- FROM_HERE,
- base::Bind(&WallpaperLoader::LoadOnWorkerPoolThread, wallpaper_loader_),
- base::Bind(&DesktopBackgroundController::OnDefaultWallpaperLoadCompleted,
- weak_ptr_factory_.GetWeakPtr(),
- wallpaper_loader_),
- true /* task_is_slow */);
- return true;
-}
-
-void DesktopBackgroundController::SetCustomWallpaper(
- const gfx::ImageSkia& image,
- WallpaperLayout layout) {
- CancelPendingWallpaperOperation();
- if (CustomWallpaperIsAlreadyLoaded(image))
- return;
-
- current_wallpaper_.reset(new WallpaperResizer(
- image, GetMaxDisplaySizeInNative(), layout));
- current_wallpaper_->StartResize();
-
- current_default_wallpaper_path_ = base::FilePath();
- current_default_wallpaper_resource_id_ = -1;
-
- FOR_EACH_OBSERVER(DesktopBackgroundControllerObserver, observers_,
- OnWallpaperDataChanged());
- SetDesktopBackgroundImageMode();
-}
-
-void DesktopBackgroundController::CancelPendingWallpaperOperation() {
- // Set canceled flag of previous request to skip unneeded loading.
- if (wallpaper_loader_.get())
- wallpaper_loader_->Cancel();
-
- // Cancel reply callback for previous request.
- weak_ptr_factory_.InvalidateWeakPtrs();
-}
-
-void DesktopBackgroundController::CreateEmptyWallpaper() {
- current_wallpaper_.reset(NULL);
- SetDesktopBackgroundImageMode();
-}
-
-WallpaperResolution DesktopBackgroundController::GetAppropriateResolution() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- gfx::Size size = GetMaxDisplaySizeInNative();
- return (size.width() > kSmallWallpaperMaxWidth ||
- size.height() > kSmallWallpaperMaxHeight) ?
- WALLPAPER_RESOLUTION_LARGE : WALLPAPER_RESOLUTION_SMALL;
-}
-
-bool DesktopBackgroundController::MoveDesktopToLockedContainer() {
- if (locked_)
- return false;
- locked_ = true;
- return ReparentBackgroundWidgets(GetBackgroundContainerId(false),
- GetBackgroundContainerId(true));
-}
-
-bool DesktopBackgroundController::MoveDesktopToUnlockedContainer() {
- if (!locked_)
- return false;
- locked_ = false;
- return ReparentBackgroundWidgets(GetBackgroundContainerId(true),
- GetBackgroundContainerId(false));
-}
-
-void DesktopBackgroundController::OnDisplayConfigurationChanged() {
- gfx::Size max_display_size = GetMaxDisplaySizeInNative();
- if (current_max_display_size_ != max_display_size) {
- current_max_display_size_ = max_display_size;
- if (desktop_background_mode_ == BACKGROUND_IMAGE &&
- current_wallpaper_.get()) {
- timer_.Stop();
- timer_.Start(FROM_HERE,
- base::TimeDelta::FromMilliseconds(wallpaper_reload_delay_),
- this,
- &DesktopBackgroundController::UpdateWallpaper);
- }
- }
-}
-
-bool DesktopBackgroundController::DefaultWallpaperIsAlreadyLoadingOrLoaded(
- const base::FilePath& image_file, int image_resource_id) const {
- return (wallpaper_loader_.get() &&
- wallpaper_loader_->file_path() == image_file &&
- wallpaper_loader_->resource_id() == image_resource_id) ||
- (current_wallpaper_.get() &&
- current_default_wallpaper_path_ == image_file &&
- current_default_wallpaper_resource_id_ == image_resource_id);
-}
-
-bool DesktopBackgroundController::CustomWallpaperIsAlreadyLoaded(
- const gfx::ImageSkia& image) const {
- return current_wallpaper_.get() &&
- (WallpaperResizer::GetImageId(image) ==
- current_wallpaper_->original_image_id());
-}
-
-void DesktopBackgroundController::SetDesktopBackgroundImageMode() {
- desktop_background_mode_ = BACKGROUND_IMAGE;
- InstallDesktopControllerForAllWindows();
-}
-
-void DesktopBackgroundController::OnDefaultWallpaperLoadCompleted(
- scoped_refptr<WallpaperLoader> loader) {
- current_wallpaper_.reset(loader->ReleaseWallpaperResizer());
- current_wallpaper_->StartResize();
- current_default_wallpaper_path_ = loader->file_path();
- current_default_wallpaper_resource_id_ = loader->resource_id();
- FOR_EACH_OBSERVER(DesktopBackgroundControllerObserver, observers_,
- OnWallpaperDataChanged());
-
- SetDesktopBackgroundImageMode();
-
- DCHECK(loader.get() == wallpaper_loader_.get());
- wallpaper_loader_ = NULL;
-}
-
-void DesktopBackgroundController::InstallDesktopController(
- aura::Window* root_window) {
- internal::DesktopBackgroundWidgetController* component = NULL;
- int container_id = GetBackgroundContainerId(locked_);
-
- switch (desktop_background_mode_) {
- case BACKGROUND_IMAGE: {
- views::Widget* widget = internal::CreateDesktopBackground(root_window,
- container_id);
- component = new internal::DesktopBackgroundWidgetController(widget);
- break;
- }
- case BACKGROUND_NONE:
- NOTREACHED();
- return;
- }
- internal::GetRootWindowController(root_window)->
- SetAnimatingWallpaperController(
- new internal::AnimatingDesktopController(component));
-
- component->StartAnimating(internal::GetRootWindowController(root_window));
-}
-
-void DesktopBackgroundController::InstallDesktopControllerForAllWindows() {
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- for (aura::Window::Windows::iterator iter = root_windows.begin();
- iter != root_windows.end(); ++iter) {
- InstallDesktopController(*iter);
- }
- current_max_display_size_ = GetMaxDisplaySizeInNative();
-}
-
-bool DesktopBackgroundController::ReparentBackgroundWidgets(int src_container,
- int dst_container) {
- bool moved = false;
- Shell::RootWindowControllerList controllers =
- Shell::GetAllRootWindowControllers();
- for (Shell::RootWindowControllerList::iterator iter = controllers.begin();
- iter != controllers.end(); ++iter) {
- internal::RootWindowController* root_window_controller = *iter;
- // In the steady state (no animation playing) the background widget
- // controller exists in the RootWindowController.
- DesktopBackgroundWidgetController* desktop_controller =
- root_window_controller->wallpaper_controller();
- if (desktop_controller) {
- moved |= desktop_controller->Reparent(
- root_window_controller->root_window(),
- src_container,
- dst_container);
- }
- // During desktop show animations the controller lives in
- // AnimatingDesktopController owned by RootWindowController.
- // NOTE: If a wallpaper load happens during a desktop show animation there
- // can temporarily be two desktop background widgets. We must reparent
- // both of them - one above and one here.
- DesktopBackgroundWidgetController* animating_controller =
- root_window_controller->animating_wallpaper_controller() ?
- root_window_controller->animating_wallpaper_controller()->
- GetController(false) :
- NULL;
- if (animating_controller) {
- moved |= animating_controller->Reparent(
- root_window_controller->root_window(),
- src_container,
- dst_container);
- }
- }
- return moved;
-}
-
-int DesktopBackgroundController::GetBackgroundContainerId(bool locked) {
- return locked ? internal::kShellWindowId_LockScreenBackgroundContainer :
- internal::kShellWindowId_DesktopBackgroundContainer;
-}
-
-void DesktopBackgroundController::UpdateWallpaper() {
- current_wallpaper_.reset(NULL);
- current_default_wallpaper_path_ = base::FilePath();
- current_default_wallpaper_resource_id_ = -1;
- ash::Shell::GetInstance()->user_wallpaper_delegate()->
- UpdateWallpaper();
-}
-
-// static
-gfx::Size DesktopBackgroundController::GetMaxDisplaySizeInNative() {
- int width = 0;
- int height = 0;
- std::vector<gfx::Display> displays = Shell::GetScreen()->GetAllDisplays();
- internal::DisplayManager* display_manager =
- Shell::GetInstance()->display_manager();
-
- for (std::vector<gfx::Display>::iterator iter = displays.begin();
- iter != displays.end(); ++iter) {
- // Don't use size_in_pixel because we want to use the native pixel size.
- gfx::Size size_in_pixel =
- display_manager->GetDisplayInfo(iter->id()).bounds_in_native().size();
- if (iter->rotation() == gfx::Display::ROTATE_90 ||
- iter->rotation() == gfx::Display::ROTATE_270) {
- size_in_pixel = gfx::Size(size_in_pixel.height(), size_in_pixel.width());
- }
- width = std::max(size_in_pixel.width(), width);
- height = std::max(size_in_pixel.height(), height);
- }
- return gfx::Size(width, height);
-}
-
-} // namespace ash
diff --git a/chromium/ash/desktop_background/desktop_background_controller.h b/chromium/ash/desktop_background/desktop_background_controller.h
deleted file mode 100644
index 4cfbc8ea5df..00000000000
--- a/chromium/ash/desktop_background/desktop_background_controller.h
+++ /dev/null
@@ -1,227 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_
-#define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "ash/display/display_controller.h"
-#include "base/basictypes.h"
-#include "base/files/file_path.h"
-#include "base/gtest_prod_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "base/observer_list.h"
-#include "base/timer/timer.h"
-#include "ui/compositor/layer.h"
-#include "ui/gfx/image/image_skia.h"
-
-typedef unsigned int SkColor;
-
-class CommandLine;
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-
-enum WallpaperLayout {
- // Center the wallpaper on the desktop without scaling it. The wallpaper
- // may be cropped.
- WALLPAPER_LAYOUT_CENTER,
- // Scale the wallpaper (while preserving its aspect ratio) to cover the
- // desktop; the wallpaper may be cropped.
- WALLPAPER_LAYOUT_CENTER_CROPPED,
- // Scale the wallpaper (without preserving its aspect ratio) to match the
- // desktop's size.
- WALLPAPER_LAYOUT_STRETCH,
- // Tile the wallpaper over the background without scaling it.
- WALLPAPER_LAYOUT_TILE,
-};
-
-enum WallpaperResolution {
- WALLPAPER_RESOLUTION_LARGE,
- WALLPAPER_RESOLUTION_SMALL
-};
-
-const SkColor kLoginWallpaperColor = 0xFEFEFE;
-
-// The width and height of small/large resolution wallpaper. When screen size is
-// smaller than |kSmallWallpaperMaxWidth| and |kSmallWallpaperMaxHeight|, the
-// small resolution wallpaper should be used. Otherwise, uses the large
-// resolution wallpaper.
-ASH_EXPORT extern const int kSmallWallpaperMaxWidth;
-ASH_EXPORT extern const int kSmallWallpaperMaxHeight;
-ASH_EXPORT extern const int kLargeWallpaperMaxWidth;
-ASH_EXPORT extern const int kLargeWallpaperMaxHeight;
-
-// The width and heigh of wallpaper thumbnails.
-ASH_EXPORT extern const int kWallpaperThumbnailWidth;
-ASH_EXPORT extern const int kWallpaperThumbnailHeight;
-
-class DesktopBackgroundControllerObserver;
-class WallpaperResizer;
-
-// Loads selected desktop wallpaper from file system asynchronously and updates
-// background layer if loaded successfully.
-class ASH_EXPORT DesktopBackgroundController
- : public DisplayController::Observer {
- public:
- enum BackgroundMode {
- BACKGROUND_NONE,
- BACKGROUND_IMAGE,
- };
-
- DesktopBackgroundController();
- virtual ~DesktopBackgroundController();
-
- BackgroundMode desktop_background_mode() const {
- return desktop_background_mode_;
- }
-
- void set_command_line_for_testing(CommandLine* command_line) {
- command_line_for_testing_ = command_line;
- }
-
- // Add/Remove observers.
- void AddObserver(DesktopBackgroundControllerObserver* observer);
- void RemoveObserver(DesktopBackgroundControllerObserver* observer);
-
- // Provides current image on the background, or empty gfx::ImageSkia if there
- // is no image, e.g. background is none.
- gfx::ImageSkia GetWallpaper() const;
-
- WallpaperLayout GetWallpaperLayout() const;
-
- // Initialize root window's background.
- void OnRootWindowAdded(aura::Window* root_window);
-
- // Loads builtin wallpaper asynchronously and sets to current wallpaper
- // after loaded. Returns true if the controller started loading the
- // wallpaper and false otherwise (i.e. the appropriate wallpaper was
- // already loading or loaded).
- bool SetDefaultWallpaper(bool is_guest);
-
- // Sets the user selected custom wallpaper. Called when user selected a file
- // from file system or changed the layout of wallpaper.
- void SetCustomWallpaper(const gfx::ImageSkia& image, WallpaperLayout layout);
-
- // Cancels the current wallpaper loading operation.
- void CancelPendingWallpaperOperation();
-
- // Creates an empty wallpaper. Some tests require a wallpaper widget is ready
- // when running. However, the wallpaper widgets are now created asynchronously
- // . If loading a real wallpaper, there are cases that these tests crash
- // because the required widget is not ready. This function synchronously
- // creates an empty widget for those tests to prevent crashes. An example test
- // is SystemGestureEventFilterTest.ThreeFingerSwipe.
- void CreateEmptyWallpaper();
-
- // Returns the appropriate wallpaper resolution for all root windows.
- WallpaperResolution GetAppropriateResolution();
-
- // Move all desktop widgets to locked container.
- // Returns true if the desktop moved.
- bool MoveDesktopToLockedContainer();
-
- // Move all desktop widgets to unlocked container.
- // Returns true if the desktop moved.
- bool MoveDesktopToUnlockedContainer();
-
- // Overrides DisplayController::Observer:
- virtual void OnDisplayConfigurationChanged() OVERRIDE;
-
- private:
- friend class DesktopBackgroundControllerTest;
- FRIEND_TEST_ALL_PREFIXES(DesktopBackgroundControllerTest, GetMaxDisplaySize);
-
- // An operation to asynchronously loads wallpaper.
- class WallpaperLoader;
-
- // Returns true if the specified default wallpaper is already being
- // loaded by |wallpaper_loader_| or stored in |current_wallpaper_|.
- bool DefaultWallpaperIsAlreadyLoadingOrLoaded(
- const base::FilePath& image_file, int image_resource_id) const;
-
- // Returns true if the specified custom wallpaper is already stored
- // in |current_wallpaper_|.
- bool CustomWallpaperIsAlreadyLoaded(const gfx::ImageSkia& image) const;
-
- // Creates view for all root windows, or notifies them to repaint if they
- // already exist.
- void SetDesktopBackgroundImageMode();
-
- // Creates a new background widget and sets the background mode to image mode.
- // Called after a default wallpaper has been loaded successfully.
- void OnDefaultWallpaperLoadCompleted(scoped_refptr<WallpaperLoader> loader);
-
- // Creates and adds component for current mode (either Widget or Layer) to
- // |root_window|.
- void InstallDesktopController(aura::Window* root_window);
-
- // Creates and adds component for current mode (either Widget or Layer) to
- // all root windows.
- void InstallDesktopControllerForAllWindows();
-
- // Moves all desktop components from one container to other across all root
- // windows. Returns true if a desktop moved.
- bool ReparentBackgroundWidgets(int src_container, int dst_container);
-
- // Returns id for background container for unlocked and locked states.
- int GetBackgroundContainerId(bool locked);
-
- // Send notification that background animation finished.
- void NotifyAnimationFinished();
-
- // Reload the wallpaper.
- void UpdateWallpaper();
-
- void set_wallpaper_reload_delay_for_test(bool value) {
- wallpaper_reload_delay_ = value;
- }
-
- // Returns the maximum size of all displays combined in native
- // resolutions. Note that this isn't the bounds of the display who
- // has maximum resolutions. Instead, this returns the size of the
- // maximum width of all displays, and the maximum height of all displays.
- static gfx::Size GetMaxDisplaySizeInNative();
-
- // If non-NULL, used in place of the real command line.
- CommandLine* command_line_for_testing_;
-
- // Can change at runtime.
- bool locked_;
-
- BackgroundMode desktop_background_mode_;
-
- SkColor background_color_;
-
- ObserverList<DesktopBackgroundControllerObserver> observers_;
-
- // The current wallpaper.
- scoped_ptr<WallpaperResizer> current_wallpaper_;
-
- // If a default wallpaper is stored in |current_wallpaper_|, the path and
- // resource ID that were passed to WallpaperLoader when loading it.
- // Otherwise, empty and -1, respectively.
- base::FilePath current_default_wallpaper_path_;
- int current_default_wallpaper_resource_id_;
-
- gfx::Size current_max_display_size_;
-
- scoped_refptr<WallpaperLoader> wallpaper_loader_;
-
- base::WeakPtrFactory<DesktopBackgroundController> weak_ptr_factory_;
-
- base::OneShotTimer<DesktopBackgroundController> timer_;
-
- int wallpaper_reload_delay_;
-
- DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController);
-};
-
-} // namespace ash
-
-#endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_
diff --git a/chromium/ash/desktop_background/desktop_background_controller_observer.h b/chromium/ash/desktop_background/desktop_background_controller_observer.h
deleted file mode 100644
index 9f74306839b..00000000000
--- a/chromium/ash/desktop_background/desktop_background_controller_observer.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_OBSERVER_H_
-#define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_OBSERVER_H_
-
-#include "ash/ash_export.h"
-
-namespace ash {
-
-class ASH_EXPORT DesktopBackgroundControllerObserver {
- public:
- // Invoked when the wallpaper data is changed.
- virtual void OnWallpaperDataChanged() = 0;
-
- protected:
- virtual ~DesktopBackgroundControllerObserver() {}
-};
-
-} // namespace ash
-
-#endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_OBSERVER_H_
diff --git a/chromium/ash/desktop_background/desktop_background_controller_unittest.cc b/chromium/ash/desktop_background/desktop_background_controller_unittest.cc
deleted file mode 100644
index d16141426f9..00000000000
--- a/chromium/ash/desktop_background/desktop_background_controller_unittest.cc
+++ /dev/null
@@ -1,668 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/desktop_background/desktop_background_controller.h"
-
-#include <cmath>
-#include <cstdlib>
-
-#include "ash/ash_switches.h"
-#include "ash/desktop_background/desktop_background_controller_observer.h"
-#include "ash/desktop_background/desktop_background_widget_controller.h"
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/display_manager_test_api.h"
-#include "ash/test/test_user_wallpaper_delegate.h"
-#include "base/command_line.h"
-#include "base/file_util.h"
-#include "base/files/file_path.h"
-#include "base/files/scoped_temp_dir.h"
-#include "base/message_loop/message_loop.h"
-#include "base/threading/sequenced_worker_pool.h"
-#include "content/public/browser/browser_thread.h"
-#include "content/public/test/test_browser_thread.h"
-#include "content/public/test/test_utils.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "ui/aura/root_window.h"
-#include "ui/compositor/scoped_animation_duration_scale_mode.h"
-#include "ui/compositor/test/layer_animator_test_controller.h"
-#include "ui/gfx/codec/jpeg_codec.h"
-#include "ui/gfx/point.h"
-#include "ui/gfx/rect.h"
-
-using aura::RootWindow;
-using aura::Window;
-
-namespace ash {
-namespace {
-
-// Containers IDs used for tests.
-const int kDesktopBackgroundId =
- ash::internal::kShellWindowId_DesktopBackgroundContainer;
-const int kLockScreenBackgroundId =
- ash::internal::kShellWindowId_LockScreenBackgroundContainer;
-
-// Returns number of child windows in a shell window container.
-int ChildCountForContainer(int container_id) {
- Window* root = ash::Shell::GetPrimaryRootWindow();
- Window* container = root->GetChildById(container_id);
- return static_cast<int>(container->children().size());
-}
-
-class TestObserver : public DesktopBackgroundControllerObserver {
- public:
- explicit TestObserver(DesktopBackgroundController* controller)
- : controller_(controller) {
- DCHECK(controller_);
- controller_->AddObserver(this);
- }
-
- virtual ~TestObserver() {
- controller_->RemoveObserver(this);
- }
-
- void WaitForWallpaperDataChanged() {
- base::MessageLoop::current()->Run();
- }
-
- // DesktopBackgroundControllerObserver overrides:
- virtual void OnWallpaperDataChanged() OVERRIDE {
- base::MessageLoop::current()->Quit();
- }
-
- private:
- DesktopBackgroundController* controller_;
-};
-
-// Steps a widget's layer animation until it is completed. Animations must be
-// enabled.
-void RunAnimationForWidget(views::Widget* widget) {
- // Animations must be enabled for stepping to work.
- ASSERT_NE(ui::ScopedAnimationDurationScaleMode::duration_scale_mode(),
- ui::ScopedAnimationDurationScaleMode::ZERO_DURATION);
-
- ui::Layer* layer = widget->GetNativeView()->layer();
- ui::LayerAnimatorTestController controller(layer->GetAnimator());
- gfx::AnimationContainerElement* element = layer->GetAnimator();
- // Multiple steps are required to complete complex animations.
- // TODO(vollick): This should not be necessary. crbug.com/154017
- while (controller.animator()->is_animating()) {
- controller.StartThreadedAnimationsIfNeeded();
- base::TimeTicks step_time = controller.animator()->last_step_time();
- element->Step(step_time + base::TimeDelta::FromMilliseconds(1000));
- }
-}
-
-} // namespace
-
-class DesktopBackgroundControllerTest : public test::AshTestBase {
- public:
- DesktopBackgroundControllerTest()
- : command_line_(CommandLine::NO_PROGRAM),
- controller_(NULL) {
- }
- virtual ~DesktopBackgroundControllerTest() {}
-
- virtual void SetUp() OVERRIDE {
- test::AshTestBase::SetUp();
- // Ash shell initialization creates wallpaper. Reset it so we can manually
- // control wallpaper creation and animation in our tests.
- internal::RootWindowController* root_window_controller =
- Shell::GetPrimaryRootWindowController();
- root_window_controller->SetWallpaperController(NULL);
- root_window_controller->SetAnimatingWallpaperController(NULL);
- controller_ = Shell::GetInstance()->desktop_background_controller();
- wallpaper_delegate_ = static_cast<test::TestUserWallpaperDelegate*>(
- Shell::GetInstance()->user_wallpaper_delegate());
- controller_->set_wallpaper_reload_delay_for_test(0);
- }
-
- protected:
- // Colors used for different default wallpapers by
- // WriteWallpapersAndSetFlags().
- static const SkColor kLargeWallpaperColor = SK_ColorRED;
- static const SkColor kSmallWallpaperColor = SK_ColorGREEN;
- static const SkColor kLargeGuestWallpaperColor = SK_ColorBLUE;
- static const SkColor kSmallGuestWallpaperColor = SK_ColorYELLOW;
-
- // Dimension used for width and height of default wallpaper images. A
- // small value is used to minimize the amount of time spent compressing
- // and writing images.
- static const int kWallpaperSize = 2;
-
- // Creates an image of size |size|.
- gfx::ImageSkia CreateImage(int width, int height) {
- SkBitmap bitmap;
- bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height);
- bitmap.allocPixels();
- gfx::ImageSkia image = gfx::ImageSkia::CreateFrom1xBitmap(bitmap);
- return image;
- }
-
- // Runs kAnimatingDesktopController's animation to completion.
- // TODO(bshe): Don't require tests to run animations; it's slow.
- void RunDesktopControllerAnimation() {
- internal::DesktopBackgroundWidgetController* controller =
- Shell::GetPrimaryRootWindowController()->
- animating_wallpaper_controller()->GetController(false);
- ASSERT_NO_FATAL_FAILURE(RunAnimationForWidget(controller->widget()));
- }
-
- // Returns true if the color at the center of |image| is close to
- // |expected_color|. (The center is used so small wallpaper images can be
- // used.)
- bool ImageIsNearColor(gfx::ImageSkia image, SkColor expected_color) {
- if (image.size().IsEmpty()) {
- LOG(ERROR) << "Image is empty";
- return false;
- }
-
- const SkBitmap* bitmap = image.bitmap();
- if (!bitmap) {
- LOG(ERROR) << "Unable to get bitmap from image";
- return false;
- }
-
- bitmap->lockPixels();
- gfx::Point center = gfx::Rect(image.size()).CenterPoint();
- SkColor image_color = bitmap->getColor(center.x(), center.y());
- bitmap->unlockPixels();
-
- const int kDiff = 3;
- if (std::abs(static_cast<int>(SkColorGetA(image_color)) -
- static_cast<int>(SkColorGetA(expected_color))) > kDiff ||
- std::abs(static_cast<int>(SkColorGetR(image_color)) -
- static_cast<int>(SkColorGetR(expected_color))) > kDiff ||
- std::abs(static_cast<int>(SkColorGetG(image_color)) -
- static_cast<int>(SkColorGetG(expected_color))) > kDiff ||
- std::abs(static_cast<int>(SkColorGetB(image_color)) -
- static_cast<int>(SkColorGetB(expected_color))) > kDiff) {
- LOG(ERROR) << "Expected color near 0x" << std::hex << expected_color
- << " but got 0x" << image_color;
- return false;
- }
-
- return true;
- }
-
- // Writes a JPEG image of the specified size and color to |path|. Returns
- // true on success.
- bool WriteJPEGFile(const base::FilePath& path,
- int width,
- int height,
- SkColor color) {
- SkBitmap bitmap;
- bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height, 0);
- bitmap.allocPixels();
- bitmap.eraseColor(color);
-
- const int kQuality = 80;
- std::vector<unsigned char> output;
- if (!gfx::JPEGCodec::Encode(
- static_cast<const unsigned char*>(bitmap.getPixels()),
- gfx::JPEGCodec::FORMAT_SkBitmap, width, height, bitmap.rowBytes(),
- kQuality, &output)) {
- LOG(ERROR) << "Unable to encode " << width << "x" << height << " bitmap";
- return false;
- }
-
- size_t bytes_written = file_util::WriteFile(
- path, reinterpret_cast<const char*>(&output[0]), output.size());
- if (bytes_written != output.size()) {
- LOG(ERROR) << "Wrote " << bytes_written << " byte(s) instead of "
- << output.size() << " to " << path.value();
- return false;
- }
-
- return true;
- }
-
- // Initializes |wallpaper_dir_|, writes JPEG wallpaper images to it, and
- // passes |controller_| a command line instructing it to use the images.
- // Only needs to be called (once) by tests that want to test loading of
- // default wallpapers.
- void WriteWallpapersAndSetFlags() {
- wallpaper_dir_.reset(new base::ScopedTempDir);
- ASSERT_TRUE(wallpaper_dir_->CreateUniqueTempDir());
-
- const base::FilePath kLargePath =
- wallpaper_dir_->path().Append(FILE_PATH_LITERAL("large.jpg"));
- ASSERT_TRUE(WriteJPEGFile(kLargePath, kWallpaperSize, kWallpaperSize,
- kLargeWallpaperColor));
- command_line_.AppendSwitchPath(
- switches::kAshDefaultWallpaperLarge, kLargePath);
-
- const base::FilePath kSmallPath =
- wallpaper_dir_->path().Append(FILE_PATH_LITERAL("small.jpg"));
- ASSERT_TRUE(WriteJPEGFile(kSmallPath, kWallpaperSize, kWallpaperSize,
- kSmallWallpaperColor));
- command_line_.AppendSwitchPath(
- switches::kAshDefaultWallpaperSmall, kSmallPath);
-
- const base::FilePath kLargeGuestPath =
- wallpaper_dir_->path().Append(FILE_PATH_LITERAL("guest_large.jpg"));
- ASSERT_TRUE(WriteJPEGFile(kLargeGuestPath, kWallpaperSize, kWallpaperSize,
- kLargeGuestWallpaperColor));
- command_line_.AppendSwitchPath(
- switches::kAshGuestWallpaperLarge, kLargeGuestPath);
-
- const base::FilePath kSmallGuestPath =
- wallpaper_dir_->path().Append(FILE_PATH_LITERAL("guest_small.jpg"));
- ASSERT_TRUE(WriteJPEGFile(kSmallGuestPath, kWallpaperSize, kWallpaperSize,
- kSmallGuestWallpaperColor));
- command_line_.AppendSwitchPath(
- switches::kAshGuestWallpaperSmall, kSmallGuestPath);
-
- controller_->set_command_line_for_testing(&command_line_);
- }
-
- // Custom command line passed to DesktopBackgroundController by
- // WriteWallpapersAndSetFlags().
- CommandLine command_line_;
-
- // Directory created by WriteWallpapersAndSetFlags() to store default
- // wallpaper images.
- scoped_ptr<base::ScopedTempDir> wallpaper_dir_;
-
- DesktopBackgroundController* controller_; // Not owned.
-
- test::TestUserWallpaperDelegate* wallpaper_delegate_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundControllerTest);
-};
-
-TEST_F(DesktopBackgroundControllerTest, BasicReparenting) {
- DesktopBackgroundController* controller =
- Shell::GetInstance()->desktop_background_controller();
- controller->CreateEmptyWallpaper();
-
- // Wallpaper view/window exists in the desktop background container and
- // nothing is in the lock screen background container.
- EXPECT_EQ(1, ChildCountForContainer(kDesktopBackgroundId));
- EXPECT_EQ(0, ChildCountForContainer(kLockScreenBackgroundId));
-
- // Moving background to lock container should succeed the first time but
- // subsequent calls should do nothing.
- EXPECT_TRUE(controller->MoveDesktopToLockedContainer());
- EXPECT_FALSE(controller->MoveDesktopToLockedContainer());
-
- // One window is moved from desktop to lock container.
- EXPECT_EQ(0, ChildCountForContainer(kDesktopBackgroundId));
- EXPECT_EQ(1, ChildCountForContainer(kLockScreenBackgroundId));
-
- // Moving background to desktop container should succeed the first time.
- EXPECT_TRUE(controller->MoveDesktopToUnlockedContainer());
- EXPECT_FALSE(controller->MoveDesktopToUnlockedContainer());
-
- // One window is moved from lock to desktop container.
- EXPECT_EQ(1, ChildCountForContainer(kDesktopBackgroundId));
- EXPECT_EQ(0, ChildCountForContainer(kLockScreenBackgroundId));
-}
-
-TEST_F(DesktopBackgroundControllerTest, ControllerOwnership) {
- // We cannot short-circuit animations for this test.
- ui::ScopedAnimationDurationScaleMode normal_duration_mode(
- ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
-
- // Create wallpaper and background view.
- DesktopBackgroundController* controller =
- Shell::GetInstance()->desktop_background_controller();
- controller->CreateEmptyWallpaper();
-
- // The new wallpaper is ready to start animating. kAnimatingDesktopController
- // holds the widget controller instance. kDesktopController will get it later.
- internal::RootWindowController* root_window_controller =
- Shell::GetPrimaryRootWindowController();
- EXPECT_TRUE(root_window_controller->animating_wallpaper_controller()->
- GetController(false));
-
- // kDesktopController will receive the widget controller when the animation
- // is done.
- EXPECT_FALSE(root_window_controller->wallpaper_controller());
-
- // Force the widget's layer animation to play to completion.
- RunDesktopControllerAnimation();
-
- // Ownership has moved from kAnimatingDesktopController to kDesktopController.
- EXPECT_FALSE(root_window_controller->animating_wallpaper_controller()->
- GetController(false));
- EXPECT_TRUE(root_window_controller->wallpaper_controller());
-}
-
-// Test for crbug.com/149043 "Unlock screen, no launcher appears". Ensure we
-// move all desktop views if there are more than one.
-TEST_F(DesktopBackgroundControllerTest, BackgroundMovementDuringUnlock) {
- // We cannot short-circuit animations for this test.
- ui::ScopedAnimationDurationScaleMode normal_duration_mode(
- ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
-
- // Reset wallpaper state, see ControllerOwnership above.
- DesktopBackgroundController* controller =
- Shell::GetInstance()->desktop_background_controller();
- controller->CreateEmptyWallpaper();
-
- // Run wallpaper show animation to completion.
- RunDesktopControllerAnimation();
-
- // User locks the screen, which moves the background forward.
- controller->MoveDesktopToLockedContainer();
-
- // Suspend/resume cycle causes wallpaper to refresh, loading a new desktop
- // background that will animate in on top of the old one.
- controller->CreateEmptyWallpaper();
-
- // In this state we have two desktop background views stored in different
- // properties. Both are in the lock screen background container.
- internal::RootWindowController* root_window_controller =
- Shell::GetPrimaryRootWindowController();
- EXPECT_TRUE(root_window_controller->animating_wallpaper_controller()->
- GetController(false));
- EXPECT_TRUE(root_window_controller->wallpaper_controller());
- EXPECT_EQ(0, ChildCountForContainer(kDesktopBackgroundId));
- EXPECT_EQ(2, ChildCountForContainer(kLockScreenBackgroundId));
-
- // Before the wallpaper's animation completes, user unlocks the screen, which
- // moves the desktop to the back.
- controller->MoveDesktopToUnlockedContainer();
-
- // Ensure both desktop backgrounds have moved.
- EXPECT_EQ(2, ChildCountForContainer(kDesktopBackgroundId));
- EXPECT_EQ(0, ChildCountForContainer(kLockScreenBackgroundId));
-
- // Finish the new desktop background animation.
- RunDesktopControllerAnimation();
-
- // Now there is one desktop background, in the back.
- EXPECT_EQ(1, ChildCountForContainer(kDesktopBackgroundId));
- EXPECT_EQ(0, ChildCountForContainer(kLockScreenBackgroundId));
-}
-
-// Test for crbug.com/156542. Animating wallpaper should immediately finish
-// animation and replace current wallpaper before next animation starts.
-TEST_F(DesktopBackgroundControllerTest, ChangeWallpaperQuick) {
- // We cannot short-circuit animations for this test.
- ui::ScopedAnimationDurationScaleMode normal_duration_mode(
- ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
-
- // Reset wallpaper state, see ControllerOwnership above.
- DesktopBackgroundController* controller =
- Shell::GetInstance()->desktop_background_controller();
- controller->CreateEmptyWallpaper();
-
- // Run wallpaper show animation to completion.
- RunDesktopControllerAnimation();
-
- // Change to a new wallpaper.
- controller->CreateEmptyWallpaper();
-
- internal::RootWindowController* root_window_controller =
- Shell::GetPrimaryRootWindowController();
- internal::DesktopBackgroundWidgetController* animating_controller =
- root_window_controller->animating_wallpaper_controller()->
- GetController(false);
- EXPECT_TRUE(animating_controller);
- EXPECT_TRUE(root_window_controller->wallpaper_controller());
-
- // Change to another wallpaper before animation finished.
- controller->CreateEmptyWallpaper();
-
- // The animating controller should immediately move to desktop controller.
- EXPECT_EQ(animating_controller,
- root_window_controller->wallpaper_controller());
-
- // Cache the new animating controller.
- animating_controller = root_window_controller->
- animating_wallpaper_controller()->GetController(false);
-
- // Run wallpaper show animation to completion.
- ASSERT_NO_FATAL_FAILURE(
- RunAnimationForWidget(
- root_window_controller->animating_wallpaper_controller()->
- GetController(false)->widget()));
-
- EXPECT_TRUE(root_window_controller->wallpaper_controller());
- EXPECT_FALSE(root_window_controller->animating_wallpaper_controller()->
- GetController(false));
- // The desktop controller should be the last created animating controller.
- EXPECT_EQ(animating_controller,
- root_window_controller->wallpaper_controller());
-}
-
-TEST_F(DesktopBackgroundControllerTest, DisplayChange) {
- // TODO(derat|oshima|bshe): Host windows can't be resized on Win8.
- if (!SupportsHostWindowResize())
- return;
-
- // Set the wallpaper to ensure that UpdateWallpaper() will be called when the
- // display configuration changes.
- gfx::ImageSkia image = CreateImage(640, 480);
- wallpaper_delegate_->set_custom_wallpaper(image);
- controller_->SetCustomWallpaper(image, WALLPAPER_LAYOUT_STRETCH);
-
- // Small wallpaper images should be used for configurations less than or
- // equal to kSmallWallpaperMaxWidth by kSmallWallpaperMaxHeight, even if
- // multiple displays are connected.
- test::DisplayManagerTestApi display_manager_test_api(
- Shell::GetInstance()->display_manager());
- display_manager_test_api.UpdateDisplay("800x600");
- RunAllPendingInMessageLoop();
- EXPECT_EQ(WALLPAPER_RESOLUTION_SMALL,
- controller_->GetAppropriateResolution());
- EXPECT_EQ(0, wallpaper_delegate_->GetUpdateWallpaperCountAndReset());
-
- display_manager_test_api.UpdateDisplay("800x600,800x600");
- RunAllPendingInMessageLoop();
- EXPECT_EQ(WALLPAPER_RESOLUTION_SMALL,
- controller_->GetAppropriateResolution());
- EXPECT_EQ(0, wallpaper_delegate_->GetUpdateWallpaperCountAndReset());
-
- display_manager_test_api.UpdateDisplay("1366x800");
- RunAllPendingInMessageLoop();
- EXPECT_EQ(WALLPAPER_RESOLUTION_SMALL,
- controller_->GetAppropriateResolution());
- EXPECT_EQ(1, wallpaper_delegate_->GetUpdateWallpaperCountAndReset());
-
- // At larger sizes, large wallpapers should be used.
- display_manager_test_api.UpdateDisplay("1367x800");
- RunAllPendingInMessageLoop();
- EXPECT_EQ(WALLPAPER_RESOLUTION_LARGE,
- controller_->GetAppropriateResolution());
- EXPECT_EQ(1, wallpaper_delegate_->GetUpdateWallpaperCountAndReset());
-
- display_manager_test_api.UpdateDisplay("1367x801");
- RunAllPendingInMessageLoop();
- EXPECT_EQ(WALLPAPER_RESOLUTION_LARGE,
- controller_->GetAppropriateResolution());
- EXPECT_EQ(1, wallpaper_delegate_->GetUpdateWallpaperCountAndReset());
-
- display_manager_test_api.UpdateDisplay("2560x1700");
- RunAllPendingInMessageLoop();
- EXPECT_EQ(WALLPAPER_RESOLUTION_LARGE,
- controller_->GetAppropriateResolution());
- EXPECT_EQ(1, wallpaper_delegate_->GetUpdateWallpaperCountAndReset());
-
- // Rotated smaller screen may use larger image.
- display_manager_test_api.UpdateDisplay("800x600/r");
- RunAllPendingInMessageLoop();
- EXPECT_EQ(WALLPAPER_RESOLUTION_SMALL,
- controller_->GetAppropriateResolution());
- EXPECT_EQ(1, wallpaper_delegate_->GetUpdateWallpaperCountAndReset());
-
- display_manager_test_api.UpdateDisplay("800x600/r,800x600");
- RunAllPendingInMessageLoop();
- EXPECT_EQ(WALLPAPER_RESOLUTION_SMALL,
- controller_->GetAppropriateResolution());
- EXPECT_EQ(1, wallpaper_delegate_->GetUpdateWallpaperCountAndReset());
- display_manager_test_api.UpdateDisplay("1366x800/r");
- RunAllPendingInMessageLoop();
- EXPECT_EQ(WALLPAPER_RESOLUTION_LARGE,
- controller_->GetAppropriateResolution());
- EXPECT_EQ(1, wallpaper_delegate_->GetUpdateWallpaperCountAndReset());
-
- // Max display size didn't chagne.
- display_manager_test_api.UpdateDisplay("900x800/r,400x1366");
- RunAllPendingInMessageLoop();
- EXPECT_EQ(0, wallpaper_delegate_->GetUpdateWallpaperCountAndReset());
-}
-
-// Test that DesktopBackgroundController loads the appropriate wallpaper
-// images as specified via command-line flags in various situations.
-// Splitting these into separate tests avoids needing to run animations.
-// TODO(derat): Combine these into a single test -- see
-// RunDesktopControllerAnimation()'s TODO.
-TEST_F(DesktopBackgroundControllerTest, SmallDefaultWallpaper) {
- if (!SupportsMultipleDisplays())
- return;
-
- WriteWallpapersAndSetFlags();
- TestObserver observer(controller_);
-
- // At 800x600, the small wallpaper should be loaded.
- test::DisplayManagerTestApi display_manager_test_api(
- Shell::GetInstance()->display_manager());
- display_manager_test_api.UpdateDisplay("800x600");
- ASSERT_TRUE(controller_->SetDefaultWallpaper(false));
- observer.WaitForWallpaperDataChanged();
- EXPECT_TRUE(ImageIsNearColor(controller_->GetWallpaper(),
- kSmallWallpaperColor));
-
- // Requesting the same wallpaper again should be a no-op.
- ASSERT_FALSE(controller_->SetDefaultWallpaper(false));
-}
-
-TEST_F(DesktopBackgroundControllerTest, LargeDefaultWallpaper) {
- if (!SupportsMultipleDisplays())
- return;
-
- WriteWallpapersAndSetFlags();
- TestObserver observer(controller_);
- test::DisplayManagerTestApi display_manager_test_api(
- Shell::GetInstance()->display_manager());
- display_manager_test_api.UpdateDisplay("1600x1200");
- ASSERT_TRUE(controller_->SetDefaultWallpaper(false));
- observer.WaitForWallpaperDataChanged();
- EXPECT_TRUE(ImageIsNearColor(controller_->GetWallpaper(),
- kLargeWallpaperColor));
-}
-
-TEST_F(DesktopBackgroundControllerTest, LargeDefaultWallpaperWhenRotated) {
- if (!SupportsMultipleDisplays())
- return;
- WriteWallpapersAndSetFlags();
- TestObserver observer(controller_);
- test::DisplayManagerTestApi display_manager_test_api(
- Shell::GetInstance()->display_manager());
-
- display_manager_test_api.UpdateDisplay("1200x800/r");
- ASSERT_TRUE(controller_->SetDefaultWallpaper(false));
- observer.WaitForWallpaperDataChanged();
- EXPECT_TRUE(ImageIsNearColor(controller_->GetWallpaper(),
- kLargeWallpaperColor));
-}
-
-TEST_F(DesktopBackgroundControllerTest, SmallGuestWallpaper) {
- if (!SupportsMultipleDisplays())
- return;
-
- WriteWallpapersAndSetFlags();
- TestObserver observer(controller_);
- test::DisplayManagerTestApi display_manager_test_api(
- Shell::GetInstance()->display_manager());
- display_manager_test_api.UpdateDisplay("800x600");
- ASSERT_TRUE(controller_->SetDefaultWallpaper(true));
- observer.WaitForWallpaperDataChanged();
- EXPECT_TRUE(ImageIsNearColor(controller_->GetWallpaper(),
- kSmallGuestWallpaperColor));
-}
-
-TEST_F(DesktopBackgroundControllerTest, LargeGuestWallpaper) {
- if (!SupportsMultipleDisplays())
- return;
-
- WriteWallpapersAndSetFlags();
- TestObserver observer(controller_);
- test::DisplayManagerTestApi display_manager_test_api(
- Shell::GetInstance()->display_manager());
- display_manager_test_api.UpdateDisplay("1600x1200");
- ASSERT_TRUE(controller_->SetDefaultWallpaper(true));
- observer.WaitForWallpaperDataChanged();
- EXPECT_TRUE(ImageIsNearColor(controller_->GetWallpaper(),
- kLargeGuestWallpaperColor));
-}
-
-TEST_F(DesktopBackgroundControllerTest, ResizeCustomWallpaper) {
- if (!SupportsMultipleDisplays())
- return;
-
- test::DisplayManagerTestApi display_manager_test_api(
- Shell::GetInstance()->display_manager());
- display_manager_test_api.UpdateDisplay("320x200");
-
- gfx::ImageSkia image = CreateImage(640, 480);
-
- // Set the image as custom wallpaper, wait for the resize to finish, and check
- // that the resized image is the expected size.
- controller_->SetCustomWallpaper(image, WALLPAPER_LAYOUT_STRETCH);
- EXPECT_TRUE(image.BackedBySameObjectAs(controller_->GetWallpaper()));
- content::BrowserThread::GetBlockingPool()->FlushForTesting();
- content::RunAllPendingInMessageLoop();
- gfx::ImageSkia resized_image = controller_->GetWallpaper();
- EXPECT_FALSE(image.BackedBySameObjectAs(resized_image));
- EXPECT_EQ(gfx::Size(320, 200).ToString(), resized_image.size().ToString());
-
- // Load the original wallpaper again and check that we're still using the
- // previously-resized image instead of doing another resize
- // (http://crbug.com/321402).
- controller_->SetCustomWallpaper(image, WALLPAPER_LAYOUT_STRETCH);
- content::BrowserThread::GetBlockingPool()->FlushForTesting();
- content::RunAllPendingInMessageLoop();
- EXPECT_TRUE(resized_image.BackedBySameObjectAs(controller_->GetWallpaper()));
-}
-
-TEST_F(DesktopBackgroundControllerTest, GetMaxDisplaySize) {
- // Device scale factor shouldn't affect the native size.
- UpdateDisplay("1000x300*2");
- EXPECT_EQ(
- "1000x300",
- DesktopBackgroundController::GetMaxDisplaySizeInNative().ToString());
-
- // Rotated display should return the rotated size.
- UpdateDisplay("1000x300*2/r");
- EXPECT_EQ(
- "300x1000",
- DesktopBackgroundController::GetMaxDisplaySizeInNative().ToString());
-
- // UI Scaling shouldn't affect the native size.
- UpdateDisplay("1000x300*2@1.5");
- EXPECT_EQ(
- "1000x300",
- DesktopBackgroundController::GetMaxDisplaySizeInNative().ToString());
-
- if (!SupportsMultipleDisplays())
- return;
-
- // First display has maximum size.
- UpdateDisplay("400x300,100x100");
- EXPECT_EQ(
- "400x300",
- DesktopBackgroundController::GetMaxDisplaySizeInNative().ToString());
-
- // Second display has maximum size.
- UpdateDisplay("400x300,500x600");
- EXPECT_EQ(
- "500x600",
- DesktopBackgroundController::GetMaxDisplaySizeInNative().ToString());
-
- // Maximum width and height belongs to different displays.
- UpdateDisplay("400x300,100x500");
- EXPECT_EQ(
- "400x500",
- DesktopBackgroundController::GetMaxDisplaySizeInNative().ToString());
-}
-
-} // namespace ash
diff --git a/chromium/ash/desktop_background/desktop_background_view.cc b/chromium/ash/desktop_background/desktop_background_view.cc
deleted file mode 100644
index 6a7bf82a1f7..00000000000
--- a/chromium/ash/desktop_background/desktop_background_view.cc
+++ /dev/null
@@ -1,221 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/desktop_background/desktop_background_view.h"
-
-#include <limits>
-
-#include "ash/ash_export.h"
-#include "ash/desktop_background/desktop_background_controller.h"
-#include "ash/desktop_background/desktop_background_widget_controller.h"
-#include "ash/desktop_background/user_wallpaper_delegate.h"
-#include "ash/display/display_manager.h"
-#include "ash/root_window_controller.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/window_animations.h"
-#include "base/message_loop/message_loop.h"
-#include "base/strings/utf_string_conversions.h"
-#include "ui/aura/root_window.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/compositor/layer.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/image/image.h"
-#include "ui/gfx/size_conversions.h"
-#include "ui/gfx/transform.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-namespace {
-
-// For our scaling ratios we need to round positive numbers.
-int RoundPositive(double x) {
- return static_cast<int>(floor(x + 0.5));
-}
-
-// A view that controls the child view's layer so that the layer
-// always has the same size as the display's original, un-scaled size
-// in DIP. The layer then transformed to fit to the virtual screen
-// size when laid-out.
-// This is to avoid scaling the image at painting time, then scaling
-// it back to the screen size in the compositor.
-class LayerControlView : public views::View {
- public:
- explicit LayerControlView(views::View* view) {
- AddChildView(view);
- view->SetPaintToLayer(true);
- }
-
- // Overrides views::View.
- virtual void Layout() OVERRIDE {
- gfx::Display display = Shell::GetScreen()->GetDisplayNearestWindow(
- GetWidget()->GetNativeView());
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- DisplayInfo info = display_manager->GetDisplayInfo(display.id());
- float ui_scale = info.GetEffectiveUIScale();
- gfx::SizeF pixel_size = display.size();
- pixel_size.Scale(1.0f / ui_scale);
- gfx::Size rounded_size = gfx::ToCeiledSize(pixel_size);
- DCHECK_EQ(1, child_count());
- views::View* child = child_at(0);
- child->SetBounds(0, 0, rounded_size.width(), rounded_size.height());
- gfx::Transform transform;
- transform.Scale(ui_scale, ui_scale);
- child->SetTransform(transform);
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LayerControlView);
-};
-
-} // namespace
-
-////////////////////////////////////////////////////////////////////////////////
-// DesktopBackgroundView, public:
-
-DesktopBackgroundView::DesktopBackgroundView() {
- set_context_menu_controller(this);
-}
-
-DesktopBackgroundView::~DesktopBackgroundView() {
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// DesktopBackgroundView, views::View overrides:
-
-void DesktopBackgroundView::OnPaint(gfx::Canvas* canvas) {
- // Scale the image while maintaining the aspect ratio, cropping as
- // necessary to fill the background. Ideally the image should be larger
- // than the largest display supported, if not we will center it rather than
- // streching to avoid upsampling artifacts (Note that we could tile too, but
- // decided not to do this at the moment).
- DesktopBackgroundController* controller =
- Shell::GetInstance()->desktop_background_controller();
- gfx::ImageSkia wallpaper = controller->GetWallpaper();
- WallpaperLayout wallpaper_layout = controller->GetWallpaperLayout();
-
- gfx::NativeView native_view = GetWidget()->GetNativeView();
- gfx::Display display = gfx::Screen::GetScreenFor(native_view)->
- GetDisplayNearestWindow(native_view);
-
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- DisplayInfo display_info = display_manager->GetDisplayInfo(display.id());
- float scaling = display_info.GetEffectiveUIScale();
- if (scaling <= 1.0f)
- scaling = 1.0f;
- // Allow scaling up to the UI scaling.
- // TODO(oshima): Create separate layer that fits to the image and then
- // scale to avoid artifacts and be more efficient when clipped.
- gfx::Rect wallpaper_rect(
- 0, 0, wallpaper.width() * scaling, wallpaper.height() * scaling);
-
- if (wallpaper_layout == WALLPAPER_LAYOUT_CENTER_CROPPED &&
- wallpaper_rect.width() >= width() &&
- wallpaper_rect.height() >= height()) {
- // The dimension with the smallest ratio must be cropped, the other one
- // is preserved. Both are set in gfx::Size cropped_size.
- double horizontal_ratio = static_cast<double>(width()) /
- static_cast<double>(wallpaper.width());
- double vertical_ratio = static_cast<double>(height()) /
- static_cast<double>(wallpaper.height());
-
- gfx::Size cropped_size;
- if (vertical_ratio > horizontal_ratio) {
- cropped_size = gfx::Size(
- RoundPositive(static_cast<double>(width()) / vertical_ratio),
- wallpaper.height());
- } else {
- cropped_size = gfx::Size(wallpaper.width(),
- RoundPositive(static_cast<double>(height()) / horizontal_ratio));
- }
-
- gfx::Rect wallpaper_cropped_rect(
- 0, 0, wallpaper.width(), wallpaper.height());
- wallpaper_cropped_rect.ClampToCenteredSize(cropped_size);
- canvas->DrawImageInt(wallpaper,
- wallpaper_cropped_rect.x(), wallpaper_cropped_rect.y(),
- wallpaper_cropped_rect.width(), wallpaper_cropped_rect.height(),
- 0, 0, width(), height(),
- true);
- } else if (wallpaper_layout == WALLPAPER_LAYOUT_TILE) {
- canvas->TileImageInt(wallpaper, 0, 0, width(), height());
- } else if (wallpaper_layout == WALLPAPER_LAYOUT_STRETCH) {
- // This is generally not recommended as it may show artifacts.
- canvas->DrawImageInt(wallpaper, 0, 0, wallpaper.width(),
- wallpaper.height(), 0, 0, width(), height(), true);
- } else {
- // Fill with black to make sure that the entire area is opaque.
- canvas->FillRect(GetLocalBounds(), SK_ColorBLACK);
- // All other are simply centered, and not scaled (but may be clipped).
- if (wallpaper.width() && wallpaper.height()) {
- canvas->DrawImageInt(
- wallpaper,
- 0, 0, wallpaper.width(), wallpaper.height(),
- (width() - wallpaper_rect.width()) / 2,
- (height() - wallpaper_rect.height()) / 2,
- wallpaper_rect.width(),
- wallpaper_rect.height(),
- true);
- }
- }
-}
-
-bool DesktopBackgroundView::OnMousePressed(const ui::MouseEvent& event) {
- return true;
-}
-
-void DesktopBackgroundView::ShowContextMenuForView(
- views::View* source,
- const gfx::Point& point,
- ui::MenuSourceType source_type) {
- Shell::GetInstance()->ShowContextMenu(point, source_type);
-}
-
-views::Widget* CreateDesktopBackground(aura::Window* root_window,
- int container_id) {
- DesktopBackgroundController* controller =
- Shell::GetInstance()->desktop_background_controller();
- UserWallpaperDelegate* wallpaper_delegate =
- Shell::GetInstance()->user_wallpaper_delegate();
-
- views::Widget* desktop_widget = new views::Widget;
- views::Widget::InitParams params(
- views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- if (controller->GetWallpaper().isNull())
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- params.parent = root_window->GetChildById(container_id);
- desktop_widget->Init(params);
- desktop_widget->SetContentsView(
- new LayerControlView(new DesktopBackgroundView()));
- int animation_type = wallpaper_delegate->GetAnimationType();
- views::corewm::SetWindowVisibilityAnimationType(
- desktop_widget->GetNativeView(), animation_type);
-
- RootWindowController* root_window_controller =
- GetRootWindowController(root_window);
-
- // Enable wallpaper transition for the following cases:
- // 1. Initial(OOBE) wallpaper animation.
- // 2. Wallpaper fades in from a non empty background.
- // 3. From an empty background, chrome transit to a logged in user session.
- // 4. From an empty background, guest user logged in.
- if (wallpaper_delegate->ShouldShowInitialAnimation() ||
- root_window_controller->animating_wallpaper_controller() ||
- Shell::GetInstance()->session_state_delegate()->NumberOfLoggedInUsers()) {
- views::corewm::SetWindowVisibilityAnimationTransition(
- desktop_widget->GetNativeView(), views::corewm::ANIMATE_SHOW);
- } else {
- // Disable animation if transition to login screen from an empty background.
- views::corewm::SetWindowVisibilityAnimationTransition(
- desktop_widget->GetNativeView(), views::corewm::ANIMATE_NONE);
- }
-
- desktop_widget->SetBounds(params.parent->bounds());
- return desktop_widget;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/desktop_background/desktop_background_view.h b/chromium/ash/desktop_background/desktop_background_view.h
deleted file mode 100644
index dbd33206fb2..00000000000
--- a/chromium/ash/desktop_background/desktop_background_view.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_VIEW_H_
-#define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_VIEW_H_
-
-#include "ui/gfx/image/image_skia.h"
-#include "ui/views/context_menu_controller.h"
-#include "ui/views/view.h"
-
-namespace ash {
-namespace internal {
-
-class DesktopBackgroundView : public views::View,
- public views::ContextMenuController {
- public:
- DesktopBackgroundView();
- virtual ~DesktopBackgroundView();
-
- private:
- // Overridden from views::View:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
-
- // Overridden from views::ContextMenuController:
- virtual void ShowContextMenuForView(views::View* source,
- const gfx::Point& point,
- ui::MenuSourceType source_type) OVERRIDE;
-
- DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundView);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_VIEW_H_
diff --git a/chromium/ash/desktop_background/desktop_background_widget_controller.cc b/chromium/ash/desktop_background/desktop_background_widget_controller.cc
deleted file mode 100644
index 8d0aa673818..00000000000
--- a/chromium/ash/desktop_background/desktop_background_widget_controller.cc
+++ /dev/null
@@ -1,148 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/desktop_background/desktop_background_widget_controller.h"
-
-#include "ash/ash_export.h"
-#include "ash/desktop_background/user_wallpaper_delegate.h"
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "ui/aura/root_window.h"
-#include "ui/compositor/layer_animation_observer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_observer.h"
-
-namespace ash {
-namespace internal {
-namespace {
-
-class ShowWallpaperAnimationObserver : public ui::ImplicitAnimationObserver,
- public views::WidgetObserver {
- public:
- ShowWallpaperAnimationObserver(RootWindowController* root_window_controller,
- views::Widget* desktop_widget,
- bool is_initial_animation)
- : root_window_controller_(root_window_controller),
- desktop_widget_(desktop_widget),
- is_initial_animation_(is_initial_animation) {
- DCHECK(desktop_widget_);
- desktop_widget_->AddObserver(this);
- }
-
- virtual ~ShowWallpaperAnimationObserver() {
- StopObservingImplicitAnimations();
- if (desktop_widget_)
- desktop_widget_->RemoveObserver(this);
- }
-
- private:
- // Overridden from ui::ImplicitAnimationObserver:
- virtual void OnImplicitAnimationsScheduled() OVERRIDE {
- if (is_initial_animation_) {
- root_window_controller_->
- HandleInitialDesktopBackgroundAnimationStarted();
- }
- }
-
- virtual void OnImplicitAnimationsCompleted() OVERRIDE {
- root_window_controller_->OnWallpaperAnimationFinished(desktop_widget_);
- delete this;
- }
-
- // Overridden from views::WidgetObserver.
- virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE {
- delete this;
- }
-
- RootWindowController* root_window_controller_;
- views::Widget* desktop_widget_;
-
- // Is this object observing the initial brightness/grayscale animation?
- const bool is_initial_animation_;
-
- DISALLOW_COPY_AND_ASSIGN(ShowWallpaperAnimationObserver);
-};
-
-} // namespace
-
-DesktopBackgroundWidgetController::DesktopBackgroundWidgetController(
- views::Widget* widget) : widget_(widget) {
- DCHECK(widget_);
- widget_->AddObserver(this);
-}
-
-DesktopBackgroundWidgetController::~DesktopBackgroundWidgetController() {
- if (widget_) {
- widget_->RemoveObserver(this);
- widget_->CloseNow();
- widget_ = NULL;
- }
-}
-
-void DesktopBackgroundWidgetController::OnWidgetDestroying(
- views::Widget* widget) {
- widget_->RemoveObserver(this);
- widget_ = NULL;
-}
-
-void DesktopBackgroundWidgetController::SetBounds(gfx::Rect bounds) {
- if (widget_)
- widget_->SetBounds(bounds);
-}
-
-bool DesktopBackgroundWidgetController::Reparent(aura::Window* root_window,
- int src_container,
- int dest_container) {
- if (widget_) {
- views::Widget::ReparentNativeView(widget_->GetNativeView(),
- root_window->GetChildById(dest_container));
- return true;
- }
- // Nothing to reparent.
- return false;
-}
-
-void DesktopBackgroundWidgetController::StartAnimating(
- RootWindowController* root_window_controller) {
- if (widget_) {
- ui::ScopedLayerAnimationSettings settings(
- widget_->GetNativeView()->layer()->GetAnimator());
- settings.AddObserver(new ShowWallpaperAnimationObserver(
- root_window_controller, widget_,
- Shell::GetInstance()->user_wallpaper_delegate()->
- ShouldShowInitialAnimation()));
- // When |widget_| shows, AnimateShowWindowCommon() is called to do the
- // animation. Sets transition duration to 0 to avoid animating to the
- // show animation's initial values.
- settings.SetTransitionDuration(base::TimeDelta());
- widget_->Show();
- widget_->GetNativeView()->SetName("DesktopBackgroundView");
- }
-}
-
-AnimatingDesktopController::AnimatingDesktopController(
- DesktopBackgroundWidgetController* component) {
- controller_.reset(component);
-}
-
-AnimatingDesktopController::~AnimatingDesktopController() {
-}
-
-void AnimatingDesktopController::StopAnimating() {
- if (controller_) {
- ui::Layer* layer = controller_->widget()->GetNativeView()->layer();
- layer->GetAnimator()->StopAnimating();
- }
-}
-
-DesktopBackgroundWidgetController* AnimatingDesktopController::GetController(
- bool pass_ownership) {
- if (pass_ownership)
- return controller_.release();
- return controller_.get();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/desktop_background/desktop_background_widget_controller.h b/chromium/ash/desktop_background/desktop_background_widget_controller.h
deleted file mode 100644
index 5976f28b15c..00000000000
--- a/chromium/ash/desktop_background/desktop_background_widget_controller.h
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_
-#define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_observer.h"
-
-namespace ash {
-namespace internal {
-class RootWindowController;
-
-// This class implements a widget-based wallpaper.
-// DesktopBackgroundWidgetController is owned by RootWindowController.
-// When the animation completes the old DesktopBackgroundWidgetController is
-// destroyed. Exported for tests.
-class ASH_EXPORT DesktopBackgroundWidgetController
- : public views::WidgetObserver {
- public:
- // Create
- explicit DesktopBackgroundWidgetController(views::Widget* widget);
-
- virtual ~DesktopBackgroundWidgetController();
-
- // Overridden from views::WidgetObserver.
- virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
-
- // Set bounds of component that draws background.
- void SetBounds(gfx::Rect bounds);
-
- // Move component from |src_container| in |root_window| to |dest_container|.
- // It is required for lock screen, when we need to move background so that
- // it hides user's windows. Returns true if there was something to reparent.
- bool Reparent(aura::Window* root_window,
- int src_container,
- int dest_container);
-
- // Starts wallpaper fade in animation. |root_window_controller| is
- // the root window where the animation will happen. (This is
- // necessary this as |layer_| doesn't have access to the root window).
- void StartAnimating(RootWindowController* root_window_controller);
-
- views::Widget* widget() { return widget_; }
-
- private:
- views::Widget* widget_;
-
- DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundWidgetController);
-};
-
-// This class wraps a DesktopBackgroundWidgetController pointer. It is owned
-// by RootWindowController. The instance of DesktopBackgroundWidgetController is
-// moved to this RootWindowController when the animation completes.
-// Exported for tests.
-class ASH_EXPORT AnimatingDesktopController {
- public:
- explicit AnimatingDesktopController(
- DesktopBackgroundWidgetController* component);
- ~AnimatingDesktopController();
-
- // Stops animation and makes sure OnImplicitAnimationsCompleted() is called if
- // current animation is not finished yet.
- // Note we have to make sure this function is called before we set
- // kAnimatingDesktopController to a new controller. If it is not called, the
- // animating widget/layer is closed immediately and the new one is animating
- // from the widget/layer before animation. For instance, if a user quickly
- // switches between red, green and blue wallpapers. The green wallpaper will
- // first fade in from red wallpaper. And in the middle of the animation, blue
- // wallpaper also wants to fade in. If the green wallpaper animation does not
- // finish immediately, the green wallpaper widget will be removed and the red
- // widget will show again. As a result, the blue wallpaper fades in from red
- // wallpaper. This is a bad user experience. See bug http://crbug.com/156542
- // for more details.
- void StopAnimating();
-
- // Gets the wrapped DesktopBackgroundWidgetController pointer. Caller should
- // take ownership of the pointer if |pass_ownership| is true.
- DesktopBackgroundWidgetController* GetController(bool pass_ownership);
-
- private:
- scoped_ptr<DesktopBackgroundWidgetController> controller_;
-
- DISALLOW_COPY_AND_ASSIGN(AnimatingDesktopController);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_
diff --git a/chromium/ash/desktop_background/user_wallpaper_delegate.h b/chromium/ash/desktop_background/user_wallpaper_delegate.h
deleted file mode 100644
index 440d284eba1..00000000000
--- a/chromium/ash/desktop_background/user_wallpaper_delegate.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DESKTOP_BACKGROUND_USER_WALLPAPER_DELEGATE_H_
-#define ASH_DESKTOP_BACKGROUND_USER_WALLPAPER_DELEGATE_H_
-
-#include "ash/ash_export.h"
-#include "ui/views/corewm/window_animations.h"
-
-namespace ash {
-
-class ASH_EXPORT UserWallpaperDelegate {
- public:
- virtual ~UserWallpaperDelegate() {}
-
- // Returns the type of window animation that should be used when showing the
- // wallpaper.
- virtual int GetAnimationType() = 0;
-
- // Should the slower initial animation be shown (as opposed to the faster
- // animation that's used e.g. when switching from one user's wallpaper to
- // another's on the login screen)?
- virtual bool ShouldShowInitialAnimation() = 0;
-
- // Updates current wallpaper. It may switch the size of wallpaper based on the
- // current display's resolution.
- virtual void UpdateWallpaper() = 0;
-
- // Initialize wallpaper.
- virtual void InitializeWallpaper() = 0;
-
- // Opens the set wallpaper page in the browser.
- virtual void OpenSetWallpaperPage() = 0;
-
- // Returns true if user can open set wallpaper page. Only guest user returns
- // false currently.
- virtual bool CanOpenSetWallpaperPage() = 0;
-
- // Notifies delegate that wallpaper animation has finished.
- virtual void OnWallpaperAnimationFinished() = 0;
-
- // Notifies delegate that wallpaper boot animation has finished.
- virtual void OnWallpaperBootAnimationFinished() = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_DESKTOP_BACKGROUND_USER_WALLPAPER_DELEGATE_H_
diff --git a/chromium/ash/desktop_background/wallpaper_resizer.cc b/chromium/ash/desktop_background/wallpaper_resizer.cc
deleted file mode 100644
index 06d8c97da7d..00000000000
--- a/chromium/ash/desktop_background/wallpaper_resizer.cc
+++ /dev/null
@@ -1,158 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/desktop_background/wallpaper_resizer.h"
-
-#include "ash/desktop_background/wallpaper_resizer_observer.h"
-#include "base/bind.h"
-#include "base/logging.h"
-#include "base/threading/sequenced_worker_pool.h"
-#include "base/threading/worker_pool.h"
-#include "content/public/browser/browser_thread.h"
-#include "third_party/skia/include/core/SkImage.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image_skia_rep.h"
-#include "ui/gfx/skia_util.h"
-
-using content::BrowserThread;
-
-namespace ash {
-namespace {
-
-// For our scaling ratios we need to round positive numbers.
-int RoundPositive(double x) {
- return static_cast<int>(floor(x + 0.5));
-}
-
-// Resizes |orig_bitmap| to |target_size| using |layout| and stores the
-// resulting bitmap at |resized_bitmap_out|.
-void Resize(SkBitmap orig_bitmap,
- const gfx::Size& target_size,
- WallpaperLayout layout,
- SkBitmap* resized_bitmap_out) {
- DCHECK(BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
- SkBitmap new_bitmap = orig_bitmap;
-
- const int orig_width = orig_bitmap.width();
- const int orig_height = orig_bitmap.height();
- const int new_width = target_size.width();
- const int new_height = target_size.height();
-
- if (orig_width > new_width || orig_height > new_height) {
- gfx::Rect wallpaper_rect(0, 0, orig_width, orig_height);
- gfx::Size cropped_size = gfx::Size(std::min(new_width, orig_width),
- std::min(new_height, orig_height));
- switch (layout) {
- case WALLPAPER_LAYOUT_CENTER:
- wallpaper_rect.ClampToCenteredSize(cropped_size);
- orig_bitmap.extractSubset(&new_bitmap,
- gfx::RectToSkIRect(wallpaper_rect));
- break;
- case WALLPAPER_LAYOUT_TILE:
- wallpaper_rect.set_size(cropped_size);
- orig_bitmap.extractSubset(&new_bitmap,
- gfx::RectToSkIRect(wallpaper_rect));
- break;
- case WALLPAPER_LAYOUT_STRETCH:
- new_bitmap = skia::ImageOperations::Resize(
- orig_bitmap, skia::ImageOperations::RESIZE_LANCZOS3,
- new_width, new_height);
- break;
- case WALLPAPER_LAYOUT_CENTER_CROPPED:
- if (orig_width > new_width && orig_height > new_height) {
- // The dimension with the smallest ratio must be cropped, the other
- // one is preserved. Both are set in gfx::Size cropped_size.
- double horizontal_ratio = static_cast<double>(new_width) /
- static_cast<double>(orig_width);
- double vertical_ratio = static_cast<double>(new_height) /
- static_cast<double>(orig_height);
-
- if (vertical_ratio > horizontal_ratio) {
- cropped_size = gfx::Size(
- RoundPositive(static_cast<double>(new_width) / vertical_ratio),
- orig_height);
- } else {
- cropped_size = gfx::Size(orig_width, RoundPositive(
- static_cast<double>(new_height) / horizontal_ratio));
- }
- wallpaper_rect.ClampToCenteredSize(cropped_size);
- SkBitmap sub_image;
- orig_bitmap.extractSubset(&sub_image,
- gfx::RectToSkIRect(wallpaper_rect));
- new_bitmap = skia::ImageOperations::Resize(
- sub_image, skia::ImageOperations::RESIZE_LANCZOS3,
- new_width, new_height);
- }
- }
- }
-
- *resized_bitmap_out = new_bitmap;
- resized_bitmap_out->setImmutable();
-}
-
-} // namespace
-
-// static
-uint32_t WallpaperResizer::GetImageId(const gfx::ImageSkia& image) {
- const gfx::ImageSkiaRep& image_rep = image.GetRepresentation(1.0f);
- return image_rep.is_null() ? 0 : image_rep.sk_bitmap().getGenerationID();
-}
-
-WallpaperResizer::WallpaperResizer(int image_resource_id,
- const gfx::Size& target_size,
- WallpaperLayout layout)
- : image_(*(ui::ResourceBundle::GetSharedInstance().
- GetImageNamed(image_resource_id).ToImageSkia())),
- original_image_id_(GetImageId(image_)),
- target_size_(target_size),
- layout_(layout),
- weak_ptr_factory_(this) {
- image_.MakeThreadSafe();
-}
-
-WallpaperResizer::WallpaperResizer(const gfx::ImageSkia& image,
- const gfx::Size& target_size,
- WallpaperLayout layout)
- : image_(image),
- original_image_id_(GetImageId(image_)),
- target_size_(target_size),
- layout_(layout),
- weak_ptr_factory_(this) {
- image_.MakeThreadSafe();
-}
-
-WallpaperResizer::~WallpaperResizer() {
-}
-
-void WallpaperResizer::StartResize() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- SkBitmap* resized_bitmap = new SkBitmap;
- if (!content::BrowserThread::PostBlockingPoolTaskAndReply(
- FROM_HERE,
- base::Bind(&Resize, *image_.bitmap(), target_size_,
- layout_, resized_bitmap),
- base::Bind(&WallpaperResizer::OnResizeFinished,
- weak_ptr_factory_.GetWeakPtr(),
- base::Owned(resized_bitmap)))) {
- LOG(WARNING) << "PostSequencedWorkerTask failed. "
- << "Wallpaper may not be resized.";
- }
-}
-
-void WallpaperResizer::AddObserver(WallpaperResizerObserver* observer) {
- observers_.AddObserver(observer);
-}
-
-void WallpaperResizer::RemoveObserver(WallpaperResizerObserver* observer) {
- observers_.RemoveObserver(observer);
-}
-
-void WallpaperResizer::OnResizeFinished(SkBitmap* resized_bitmap) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- image_ = gfx::ImageSkia::CreateFrom1xBitmap(*resized_bitmap);
- FOR_EACH_OBSERVER(WallpaperResizerObserver, observers_,
- OnWallpaperResized());
-}
-
-} // namespace ash
diff --git a/chromium/ash/desktop_background/wallpaper_resizer.h b/chromium/ash/desktop_background/wallpaper_resizer.h
deleted file mode 100644
index fadfb445f0d..00000000000
--- a/chromium/ash/desktop_background/wallpaper_resizer.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_WALLPAPER_RESIZER_H_
-#define ASH_DESKTOP_BACKGROUND_DESKTOP_WALLPAPER_RESIZER_H_
-
-#include "ash/ash_export.h"
-#include "ash/desktop_background/desktop_background_controller.h"
-#include "base/memory/weak_ptr.h"
-#include "base/observer_list.h"
-#include "skia/ext/image_operations.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/gfx/size.h"
-
-namespace ash {
-
-class WallpaperResizerObserver;
-
-// Stores the current wallpaper data and resize it to |target_size| if needed.
-class ASH_EXPORT WallpaperResizer {
- public:
- // Returns a unique identifier corresponding to |image|, suitable for
- // comparison against the value returned by original_image_id(). If the image
- // is modified, its ID will change.
- static uint32_t GetImageId(const gfx::ImageSkia& image);
-
- WallpaperResizer(int image_resource_id,
- const gfx::Size& target_size,
- WallpaperLayout layout);
-
- WallpaperResizer(const gfx::ImageSkia& image,
- const gfx::Size& target_size,
- WallpaperLayout layout);
-
- ~WallpaperResizer();
-
- const gfx::ImageSkia& image() const { return image_; }
- uint32_t original_image_id() const { return original_image_id_; }
- WallpaperLayout layout() const { return layout_; }
-
- // Called on the UI thread to run Resize() on the worker pool and post an
- // OnResizeFinished() task back to the UI thread on completion.
- void StartResize();
-
- // Add/Remove observers.
- void AddObserver(WallpaperResizerObserver* observer);
- void RemoveObserver(WallpaperResizerObserver* observer);
-
- private:
- // Copies |resized_bitmap| to |image_| and notifies observers after Resize()
- // has finished running.
- void OnResizeFinished(SkBitmap* resized_bitmap);
-
- ObserverList<WallpaperResizerObserver> observers_;
-
- // Image that should currently be used for wallpaper. It initially
- // contains the original image and is updated to contain the resized
- // image by OnResizeFinished().
- gfx::ImageSkia image_;
-
- // Unique identifier corresponding to the original (i.e. pre-resize) |image_|.
- uint32_t original_image_id_;
-
- gfx::Size target_size_;
-
- WallpaperLayout layout_;
-
- base::WeakPtrFactory<WallpaperResizer> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(WallpaperResizer);
-};
-
-} // namespace ash
-
-
-#endif // ASH_DESKTOP_BACKGROUND_DESKTOP_WALLPAPER_RESIZER_H_
diff --git a/chromium/ash/desktop_background/wallpaper_resizer_observer.h b/chromium/ash/desktop_background/wallpaper_resizer_observer.h
deleted file mode 100644
index 5a10651d4c1..00000000000
--- a/chromium/ash/desktop_background/wallpaper_resizer_observer.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DESKTOP_BACKGROUND_WALLPAPER_RESIZER_OBSERVER_H_
-#define ASH_DESKTOP_BACKGROUND_WALLPAPER_RESIZER_OBSERVER_H_
-
-#include "ash/ash_export.h"
-
-namespace ash {
-
-class ASH_EXPORT WallpaperResizerObserver {
- public:
- // Invoked when the wallpaper is resized.
- virtual void OnWallpaperResized() = 0;
-
- protected:
- virtual ~WallpaperResizerObserver() {}
-};
-
-} // namespace ash
-
-#endif // ASH_DESKTOP_BACKGROUND_WALLPAPER_RESIZER_OBSERVER_H_
diff --git a/chromium/ash/desktop_background/wallpaper_resizer_unittest.cc b/chromium/ash/desktop_background/wallpaper_resizer_unittest.cc
deleted file mode 100644
index 7ff04355036..00000000000
--- a/chromium/ash/desktop_background/wallpaper_resizer_unittest.cc
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/desktop_background/wallpaper_resizer.h"
-
-#include "ash/desktop_background/wallpaper_resizer_observer.h"
-#include "base/message_loop/message_loop.h"
-#include "content/public/test/test_browser_thread.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/gfx/image/image_skia_rep.h"
-
-using aura::RootWindow;
-using aura::Window;
-
-namespace {
-
-const int kTestImageWidth = 5;
-const int kTestImageHeight = 2;
-const int kTargetWidth = 1;
-const int kTargetHeight = 1;
-const uint32_t kExpectedCenter = 0x02020202u;
-const uint32_t kExpectedCenterCropped = 0x03030303u;
-const uint32_t kExpectedStretch = 0x04040404u;
-const uint32_t kExpectedTile = 0;
-
-gfx::ImageSkia CreateTestImage(const gfx::Size& size) {
- SkBitmap src;
- int w = size.width();
- int h = size.height();
- src.setConfig(SkBitmap::kARGB_8888_Config, w, h);
- src.allocPixels();
-
- // Fill bitmap with data.
- for (int y = 0; y < h; ++y) {
- for (int x = 0; x < w; ++x) {
- const uint8_t component = static_cast<uint8_t>(y * w + x);
- const SkColor pixel = SkColorSetARGB(component, component,
- component, component);
- *(src.getAddr32(x, y)) = pixel;
- }
- }
-
- gfx::ImageSkia image = gfx::ImageSkia::CreateFrom1xBitmap(src);
- return image;
-}
-
-bool IsColor(const gfx::ImageSkia& image, const uint32_t expect) {
- EXPECT_EQ(image.width(), kTargetWidth);
- EXPECT_EQ(image.height(), kTargetHeight);
- const SkBitmap* image_bitmap = image.bitmap();
- SkAutoLockPixels image_lock(*image_bitmap);
- return *image_bitmap->getAddr32(0, 0) == expect;
-}
-
-} // namespace
-
-namespace ash {
-namespace internal {
-
-class WallpaperResizerTest : public testing::Test,
- public WallpaperResizerObserver {
- public:
- WallpaperResizerTest()
- : ui_thread_(content::BrowserThread::UI, &message_loop_) {
- }
- virtual ~WallpaperResizerTest() {}
-
- gfx::ImageSkia Resize(const gfx::ImageSkia& image,
- const gfx::Size& target_size,
- WallpaperLayout layout) {
- scoped_ptr<WallpaperResizer> resizer;
- resizer.reset(new WallpaperResizer(image, target_size, layout));
- resizer->AddObserver(this);
- resizer->StartResize();
- WaitForResize();
- resizer->RemoveObserver(this);
- return resizer->image();
- }
-
- void WaitForResize() {
- message_loop_.Run();
- }
-
- virtual void OnWallpaperResized() OVERRIDE {
- message_loop_.Quit();
- }
-
- private:
- base::MessageLoop message_loop_;
- content::TestBrowserThread ui_thread_;
-
- DISALLOW_COPY_AND_ASSIGN(WallpaperResizerTest);
-};
-
-TEST_F(WallpaperResizerTest, BasicResize) {
- // Keeps in sync with WallpaperLayout enum.
- WallpaperLayout layouts[4] = {
- WALLPAPER_LAYOUT_CENTER,
- WALLPAPER_LAYOUT_CENTER_CROPPED,
- WALLPAPER_LAYOUT_STRETCH,
- WALLPAPER_LAYOUT_TILE,
- };
- const int length = arraysize(layouts);
-
- for (int i = 0; i < length; i++) {
- WallpaperLayout layout = layouts[i];
- gfx::ImageSkia small_image(gfx::ImageSkiaRep(gfx::Size(10, 20), 1.0f));
-
- gfx::ImageSkia resized_small = Resize(small_image, gfx::Size(800, 600),
- layout);
- EXPECT_EQ(10, resized_small.width());
- EXPECT_EQ(20, resized_small.height());
-
- gfx::ImageSkia large_image(gfx::ImageSkiaRep(gfx::Size(1000, 1000), 1.0f));
- gfx::ImageSkia resized_large = Resize(large_image, gfx::Size(800, 600),
- layout);
- EXPECT_EQ(800, resized_large.width());
- EXPECT_EQ(600, resized_large.height());
- }
-}
-
-// Test for crbug.com/244629. "CENTER_CROPPED generates the same image as
-// STRETCH layout"
-TEST_F(WallpaperResizerTest, AllLayoutDifferent) {
- gfx::ImageSkia image = CreateTestImage(
- gfx::Size(kTestImageWidth, kTestImageHeight));
-
- gfx::Size target_size = gfx::Size(kTargetWidth, kTargetHeight);
- gfx::ImageSkia center = Resize(image, target_size, WALLPAPER_LAYOUT_CENTER);
-
- gfx::ImageSkia center_cropped = Resize(image, target_size,
- WALLPAPER_LAYOUT_CENTER_CROPPED);
-
- gfx::ImageSkia stretch = Resize(image, target_size, WALLPAPER_LAYOUT_STRETCH);
-
- gfx::ImageSkia tile = Resize(image, target_size, WALLPAPER_LAYOUT_TILE);
-
- EXPECT_TRUE(IsColor(center, kExpectedCenter));
- EXPECT_TRUE(IsColor(center_cropped, kExpectedCenterCropped));
- EXPECT_TRUE(IsColor(stretch, kExpectedStretch));
- EXPECT_TRUE(IsColor(tile, kExpectedTile));
-}
-
-TEST_F(WallpaperResizerTest, ImageId) {
- gfx::ImageSkia image = CreateTestImage(
- gfx::Size(kTestImageWidth, kTestImageHeight));
-
- // Create a WallpaperResizer and check that it reports an original image ID
- // both pre- and post-resize that matches the ID returned by GetImageId().
- WallpaperResizer resizer(image, gfx::Size(10, 20), WALLPAPER_LAYOUT_STRETCH);
- EXPECT_EQ(WallpaperResizer::GetImageId(image), resizer.original_image_id());
- resizer.AddObserver(this);
- resizer.StartResize();
- WaitForResize();
- resizer.RemoveObserver(this);
- EXPECT_EQ(WallpaperResizer::GetImageId(image), resizer.original_image_id());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/dip_unittest.cc b/chromium/ash/dip_unittest.cc
deleted file mode 100644
index a501ad25138..00000000000
--- a/chromium/ash/dip_unittest.cc
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <algorithm>
-#include <vector>
-
-#include "ash/ash_switches.h"
-#include "ash/display/display_manager.h"
-#include "ash/launcher/launcher.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/window_properties.h"
-#include "ash/wm/window_util.h"
-#include "base/command_line.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/insets.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/corewm/shadow.h"
-#include "ui/views/corewm/shadow_controller.h"
-#include "ui/views/corewm/shadow_types.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-
-typedef ash::test::AshTestBase DIPTest;
-
-// Test if the WM sets correct work area under different density.
-TEST_F(DIPTest, WorkArea) {
- UpdateDisplay("1000x900*1.0f");
-
- aura::Window* root = Shell::GetPrimaryRootWindow();
- const gfx::Display display =
- Shell::GetScreen()->GetDisplayNearestWindow(root);
-
- EXPECT_EQ("0,0 1000x900", display.bounds().ToString());
- gfx::Rect work_area = display.work_area();
- EXPECT_EQ("0,0 1000x853", work_area.ToString());
- EXPECT_EQ("0,0,47,0", display.bounds().InsetsFrom(work_area).ToString());
-
- UpdateDisplay("2000x1800*2.0f");
- gfx::Screen* screen = Shell::GetScreen();
-
- const gfx::Display display_2x = screen->GetDisplayNearestWindow(root);
- const internal::DisplayInfo display_info_2x =
- Shell::GetInstance()->display_manager()->GetDisplayInfo(display_2x.id());
-
- // The |bounds_in_pixel()| should report bounds in pixel coordinate.
- EXPECT_EQ("1,1 2000x1800",
- display_info_2x.bounds_in_native().ToString());
-
- // Aura and views coordinates are in DIP, so they their bounds do not change.
- EXPECT_EQ("0,0 1000x900", display_2x.bounds().ToString());
- work_area = display_2x.work_area();
- EXPECT_EQ("0,0 1000x853", work_area.ToString());
- EXPECT_EQ("0,0,47,0", display_2x.bounds().InsetsFrom(work_area).ToString());
-
- // Sanity check if the workarea's inset hight is same as
- // the launcher's height.
- Launcher* launcher = Launcher::ForPrimaryDisplay();
- EXPECT_EQ(
- display_2x.bounds().InsetsFrom(work_area).height(),
- launcher->shelf_widget()->GetNativeView()->layer()->bounds().height());
-}
-
-TEST_F(DIPTest, WorkAreaForLegacyShelfLayout) {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshDisableAlternateShelfLayout);
- UpdateDisplay("1000x900*1.0f");
-
- aura::Window* root = Shell::GetPrimaryRootWindow();
- const gfx::Display display =
- Shell::GetScreen()->GetDisplayNearestWindow(root);
-
- EXPECT_EQ("0,0 1000x900", display.bounds().ToString());
- gfx::Rect work_area = display.work_area();
- EXPECT_EQ("0,0 1000x852", work_area.ToString());
- EXPECT_EQ("0,0,48,0", display.bounds().InsetsFrom(work_area).ToString());
-
- UpdateDisplay("2000x1800*2.0f");
- gfx::Screen* screen = Shell::GetScreen();
-
- const gfx::Display display_2x = screen->GetDisplayNearestWindow(root);
- const internal::DisplayInfo display_info_2x =
- Shell::GetInstance()->display_manager()->GetDisplayInfo(display_2x.id());
-
- // The |bounds_in_native()| should report bounds in pixel coordinate.
- EXPECT_EQ("1,1 2000x1800",
- display_info_2x.bounds_in_native().ToString());
-
- // Aura and views coordinates are in DIP, so they their bounds do not change.
- EXPECT_EQ("0,0 1000x900", display_2x.bounds().ToString());
- work_area = display_2x.work_area();
- EXPECT_EQ("0,0 1000x852", work_area.ToString());
- EXPECT_EQ("0,0,48,0", display_2x.bounds().InsetsFrom(work_area).ToString());
-
- // Sanity check if the workarea's inset hight is same as
- // the launcher's height.
- Launcher* launcher = Launcher::ForPrimaryDisplay();
- EXPECT_EQ(
- display_2x.bounds().InsetsFrom(work_area).height(),
- launcher->shelf_widget()->GetNativeView()->layer()->bounds().height());
-}
-
-} // namespace ash
diff --git a/chromium/ash/display/OWNERS b/chromium/ash/display/OWNERS
deleted file mode 100644
index 92f3fbb9210..00000000000
--- a/chromium/ash/display/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-oshima@chromium.org
diff --git a/chromium/ash/display/display_change_observer_chromeos.cc b/chromium/ash/display/display_change_observer_chromeos.cc
deleted file mode 100644
index 4215ac89dba..00000000000
--- a/chromium/ash/display/display_change_observer_chromeos.cc
+++ /dev/null
@@ -1,189 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/display_change_observer_chromeos.h"
-
-#include <algorithm>
-#include <map>
-#include <set>
-#include <vector>
-
-#include "ash/ash_switches.h"
-#include "ash/display/display_info.h"
-#include "ash/display/display_layout_store.h"
-#include "ash/display/display_manager.h"
-#include "ash/shell.h"
-#include "base/command_line.h"
-#include "base/logging.h"
-#include "chromeos/display/output_util.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/x/x11_util.h"
-#include "ui/compositor/dip_util.h"
-#include "ui/gfx/display.h"
-
-namespace ash {
-namespace internal {
-
-using chromeos::OutputConfigurator;
-
-namespace {
-
-// The DPI threshold to detect high density screen.
-// Higher DPI than this will use device_scale_factor=2.
-const unsigned int kHighDensityDPIThreshold = 160;
-
-// 1 inch in mm.
-const float kInchInMm = 25.4f;
-
-// Resolution list are sorted by the area in pixels and the larger
-// one comes first.
-struct ResolutionSorter {
- bool operator()(const Resolution& a, const Resolution& b) {
- return a.size.width() * a.size.height() > b.size.width() * b.size.height();
- }
-};
-
-} // namespace
-
-// static
-std::vector<Resolution> DisplayChangeObserver::GetResolutionList(
- const OutputConfigurator::OutputSnapshot& output) {
- typedef std::map<std::pair<int,int>, Resolution> ResolutionMap;
- ResolutionMap resolution_map;
-
- for (std::map<RRMode, OutputConfigurator::ModeInfo>::const_iterator it =
- output.mode_infos.begin(); it != output.mode_infos.end(); ++it) {
- const OutputConfigurator::ModeInfo& mode_info = it->second;
- const std::pair<int, int> size(mode_info.width, mode_info.height);
- const Resolution resolution(gfx::Size(mode_info.width, mode_info.height),
- mode_info.interlaced);
-
- // Add the resolution if it isn't already present and override interlaced
- // resolutions with non-interlaced ones.
- ResolutionMap::iterator resolution_it = resolution_map.find(size);
- if (resolution_it == resolution_map.end())
- resolution_map.insert(std::make_pair(size, resolution));
- else if (resolution_it->second.interlaced && !resolution.interlaced)
- resolution_it->second = resolution;
- }
-
- std::vector<Resolution> resolution_list;
- for (ResolutionMap::const_iterator iter = resolution_map.begin();
- iter != resolution_map.end();
- ++iter) {
- resolution_list.push_back(iter->second);
- }
- std::sort(resolution_list.begin(), resolution_list.end(), ResolutionSorter());
- return resolution_list;
-}
-
-DisplayChangeObserver::DisplayChangeObserver() {
- Shell::GetInstance()->AddShellObserver(this);
-}
-
-DisplayChangeObserver::~DisplayChangeObserver() {
- Shell::GetInstance()->RemoveShellObserver(this);
-}
-
-chromeos::OutputState DisplayChangeObserver::GetStateForDisplayIds(
- const std::vector<int64>& display_ids) const {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshForceMirrorMode)) {
- return chromeos::STATE_DUAL_MIRROR;
- }
-
- CHECK_EQ(2U, display_ids.size());
- DisplayIdPair pair = std::make_pair(display_ids[0], display_ids[1]);
- DisplayLayout layout = Shell::GetInstance()->display_manager()->
- layout_store()->GetRegisteredDisplayLayout(pair);
- return layout.mirrored ?
- chromeos::STATE_DUAL_MIRROR : chromeos::STATE_DUAL_EXTENDED;
-}
-
-bool DisplayChangeObserver::GetResolutionForDisplayId(int64 display_id,
- int* width,
- int* height) const {
- gfx::Size resolution;
- if (!Shell::GetInstance()->display_manager()->
- GetSelectedResolutionForDisplayId(display_id, &resolution)) {
- return false;
- }
-
- *width = resolution.width();
- *height = resolution.height();
- return true;
-}
-
-void DisplayChangeObserver::OnDisplayModeChanged(
- const std::vector<OutputConfigurator::OutputSnapshot>& outputs) {
- std::vector<DisplayInfo> displays;
- std::set<int64> ids;
- for (size_t i = 0; i < outputs.size(); ++i) {
- const OutputConfigurator::OutputSnapshot& output = outputs[i];
-
- if (output.is_internal &&
- gfx::Display::InternalDisplayId() == gfx::Display::kInvalidDisplayID) {
- // Fall back to output index. crbug.com/180100
- gfx::Display::SetInternalDisplayId(
- output.display_id == gfx::Display::kInvalidDisplayID ? output.index :
- output.display_id);
- }
-
- const OutputConfigurator::ModeInfo* mode_info =
- OutputConfigurator::GetModeInfo(output, output.current_mode);
- if (!mode_info)
- continue;
-
- float device_scale_factor = 1.0f;
- if (!ui::IsXDisplaySizeBlackListed(output.width_mm, output.height_mm) &&
- (kInchInMm * mode_info->width / output.width_mm) >
- kHighDensityDPIThreshold) {
- device_scale_factor = 2.0f;
- }
- gfx::Rect display_bounds(
- output.x, output.y, mode_info->width, mode_info->height);
-
- std::vector<Resolution> resolutions;
- if (!output.is_internal)
- resolutions = GetResolutionList(output);
-
- std::string name = output.is_internal ?
- l10n_util::GetStringUTF8(IDS_ASH_INTERNAL_DISPLAY_NAME) :
- chromeos::GetDisplayName(output.output);
- if (name.empty())
- name = l10n_util::GetStringUTF8(IDS_ASH_STATUS_TRAY_UNKNOWN_DISPLAY_NAME);
-
- bool has_overscan = false;
- chromeos::GetOutputOverscanFlag(output.output, &has_overscan);
-
- int64 id = output.display_id;
- if (id == gfx::Display::kInvalidDisplayID || ids.find(id) != ids.end())
- id = output.index;
- ids.insert(id);
-
- displays.push_back(DisplayInfo(id, name, has_overscan));
- displays.back().set_device_scale_factor(device_scale_factor);
- displays.back().SetBounds(display_bounds);
- displays.back().set_native(true);
- displays.back().set_resolutions(resolutions);
- displays.back().set_touch_support(
- output.touch_device_id == 0 ? gfx::Display::TOUCH_SUPPORT_UNAVAILABLE :
- gfx::Display::TOUCH_SUPPORT_AVAILABLE);
- }
-
- // DisplayManager can be null during the boot.
- Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged(displays);
-}
-
-void DisplayChangeObserver::OnAppTerminating() {
-#if defined(USE_ASH)
- // Stop handling display configuration events once the shutdown
- // process starts. crbug.com/177014.
- Shell::GetInstance()->output_configurator()->Stop();
-#endif
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/display_change_observer_chromeos.h b/chromium/ash/display/display_change_observer_chromeos.h
deleted file mode 100644
index c75c00be4da..00000000000
--- a/chromium/ash/display/display_change_observer_chromeos.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H
-#define ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H
-
-#include "ash/ash_export.h"
-#include "ash/shell_observer.h"
-#include "base/basictypes.h"
-#include "chromeos/display/output_configurator.h"
-
-namespace ash {
-namespace internal {
-
-struct Resolution;
-
-// An object that observes changes in display configuration and
-// update DisplayManagers.
-class DisplayChangeObserver
- : public chromeos::OutputConfigurator::StateController,
- public chromeos::OutputConfigurator::Observer,
- public ShellObserver {
- public:
- // Returns the resolution list.
- ASH_EXPORT static std::vector<Resolution> GetResolutionList(
- const chromeos::OutputConfigurator::OutputSnapshot& output);
-
- DisplayChangeObserver();
- virtual ~DisplayChangeObserver();
-
- // chromeos::OutputConfigurator::StateController overrides:
- virtual chromeos::OutputState GetStateForDisplayIds(
- const std::vector<int64>& outputs) const OVERRIDE;
- virtual bool GetResolutionForDisplayId(int64 display_id,
- int* width,
- int* height) const OVERRIDE;
-
- // Overriden from chromeos::OutputConfigurator::Observer:
- virtual void OnDisplayModeChanged(
- const std::vector<chromeos::OutputConfigurator::OutputSnapshot>& outputs)
- OVERRIDE;
-
- // Overriden from ShellObserver:
- virtual void OnAppTerminating() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserver);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DISPLAY_AURA_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H
diff --git a/chromium/ash/display/display_change_observer_chromeos_unittest.cc b/chromium/ash/display/display_change_observer_chromeos_unittest.cc
deleted file mode 100644
index 1f64be74adb..00000000000
--- a/chromium/ash/display/display_change_observer_chromeos_unittest.cc
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/display_change_observer_chromeos.h"
-
-#include "ash/display/display_info.h"
-#include "chromeos/display/output_configurator.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-using chromeos::OutputConfigurator;
-
-typedef testing::Test DisplayChangeObserverTest;
-
-namespace ash {
-namespace internal {
-
-TEST_F(DisplayChangeObserverTest, GetResolutionList) {
- OutputConfigurator::OutputSnapshot output;
- output.mode_infos[11] = OutputConfigurator::ModeInfo(1920, 1200, false, 60);
-
- // All non-interlaced (as would be seen with different refresh rates).
- output.mode_infos[12] = OutputConfigurator::ModeInfo(1920, 1080, false, 80);
- output.mode_infos[13] = OutputConfigurator::ModeInfo(1920, 1080, false, 70);
- output.mode_infos[14] = OutputConfigurator::ModeInfo(1920, 1080, false, 60);
-
- // Interlaced vs non-interlaced.
- output.mode_infos[15] = OutputConfigurator::ModeInfo(1280, 720, true, 60);
- output.mode_infos[16] = OutputConfigurator::ModeInfo(1280, 720, false, 60);
-
- // Interlaced only.
- output.mode_infos[17] = OutputConfigurator::ModeInfo(1024, 768, true, 70);
- output.mode_infos[18] = OutputConfigurator::ModeInfo(1024, 768, true, 60);
-
- // Mixed.
- output.mode_infos[19] = OutputConfigurator::ModeInfo(1024, 600, true, 60);
- output.mode_infos[20] = OutputConfigurator::ModeInfo(1024, 600, false, 70);
- output.mode_infos[21] = OutputConfigurator::ModeInfo(1024, 600, false, 60);
-
- // Just one interlaced mode.
- output.mode_infos[22] = OutputConfigurator::ModeInfo(640, 480, true, 60);
-
- std::vector<Resolution> resolutions =
- DisplayChangeObserver::GetResolutionList(output);
- ASSERT_EQ(6u, resolutions.size());
- EXPECT_EQ("1920x1200", resolutions[0].size.ToString());
- EXPECT_FALSE(resolutions[0].interlaced);
-
- EXPECT_EQ("1920x1080", resolutions[1].size.ToString());
- EXPECT_FALSE(resolutions[1].interlaced);
-
- EXPECT_EQ("1280x720", resolutions[2].size.ToString());
- EXPECT_FALSE(resolutions[2].interlaced);
-
- EXPECT_EQ("1024x768", resolutions[3].size.ToString());
- EXPECT_TRUE(resolutions[3].interlaced);
-
- EXPECT_EQ("1024x600", resolutions[4].size.ToString());
- EXPECT_FALSE(resolutions[4].interlaced);
-
- EXPECT_EQ("640x480", resolutions[5].size.ToString());
- EXPECT_TRUE(resolutions[5].interlaced);
-
- // Outputs without any modes shouldn't cause a crash.
- output.mode_infos.clear();
- resolutions = DisplayChangeObserver::GetResolutionList(output);
- EXPECT_EQ(0u, resolutions.size());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/display_controller.cc b/chromium/ash/display/display_controller.cc
deleted file mode 100644
index ee5d25a7348..00000000000
--- a/chromium/ash/display/display_controller.cc
+++ /dev/null
@@ -1,809 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/display_controller.h"
-
-#include <algorithm>
-#include <cmath>
-#include <map>
-
-#include "ash/ash_switches.h"
-#include "ash/display/display_layout_store.h"
-#include "ash/display/display_manager.h"
-#include "ash/display/mirror_window_controller.h"
-#include "ash/display/root_window_transformers.h"
-#include "ash/display/virtual_keyboard_window_controller.h"
-#include "ash/host/root_window_host_factory.h"
-#include "ash/root_window_controller.h"
-#include "ash/root_window_settings.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "base/command_line.h"
-#include "base/strings/stringprintf.h"
-#include "third_party/skia/include/utils/SkMatrix44.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/client/capture_client.h"
-#include "ui/aura/client/cursor_client.h"
-#include "ui/aura/client/focus_client.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/root_window_transformer.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_property.h"
-#include "ui/aura/window_tracker.h"
-#include "ui/compositor/compositor.h"
-#include "ui/compositor/dip_util.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-
-#if defined(OS_CHROMEOS)
-#include "base/sys_info.h"
-#include "base/time/time.h"
-#if defined(USE_X11)
-#include "ash/display/output_configurator_animation.h"
-#include "chromeos/display/output_configurator.h"
-#include "ui/base/x/x11_util.h"
-#include "ui/gfx/x/x11_types.h"
-
-// Including this at the bottom to avoid other
-// potential conflict with chrome headers.
-#include <X11/extensions/Xrandr.h>
-#undef RootWindow
-#endif // defined(USE_X11)
-#endif // defined(OS_CHROMEOS)
-
-namespace ash {
-namespace {
-
-// Primary display stored in global object as it can be
-// accessed after Shell is deleted. A separate display instance is created
-// during the shutdown instead of always keeping two display instances
-// (one here and another one in display_manager) in sync, which is error prone.
-int64 primary_display_id = gfx::Display::kInvalidDisplayID;
-gfx::Display* primary_display_for_shutdown = NULL;
-// Keeps the number of displays during the shutdown after
-// ash::Shell:: is deleted.
-int num_displays_for_shutdown = -1;
-
-// Specifies how long the display change should have been disabled
-// after each display change operations.
-// |kCycleDisplayThrottleTimeoutMs| is set to be longer to avoid
-// changing the settings while the system is still configurating
-// displays. It will be overriden by |kAfterDisplayChangeThrottleTimeoutMs|
-// when the display change happens, so the actual timeout is much shorter.
-const int64 kAfterDisplayChangeThrottleTimeoutMs = 500;
-const int64 kCycleDisplayThrottleTimeoutMs = 4000;
-const int64 kSwapDisplayThrottleTimeoutMs = 500;
-
-internal::DisplayManager* GetDisplayManager() {
- return Shell::GetInstance()->display_manager();
-}
-
-void SetDisplayPropertiesOnHostWindow(aura::RootWindow* root,
- const gfx::Display& display) {
- internal::DisplayInfo info =
- GetDisplayManager()->GetDisplayInfo(display.id());
-#if defined(OS_CHROMEOS) && defined(USE_X11)
- // Native window property (Atom in X11) that specifies the display's
- // rotation, scale factor and if it's internal display. They are
- // read and used by touchpad/mouse driver directly on X (contact
- // adlr@ for more details on touchpad/mouse driver side). The value
- // of the rotation is one of 0 (normal), 1 (90 degrees clockwise), 2
- // (180 degree) or 3 (270 degrees clockwise). The value of the
- // scale factor is in percent (100, 140, 200 etc).
- const char kRotationProp[] = "_CHROME_DISPLAY_ROTATION";
- const char kScaleFactorProp[] = "_CHROME_DISPLAY_SCALE_FACTOR";
- const char kInternalProp[] = "_CHROME_DISPLAY_INTERNAL";
- const char kCARDINAL[] = "CARDINAL";
- int xrandr_rotation = RR_Rotate_0;
- switch (info.rotation()) {
- case gfx::Display::ROTATE_0:
- xrandr_rotation = RR_Rotate_0;
- break;
- case gfx::Display::ROTATE_90:
- xrandr_rotation = RR_Rotate_90;
- break;
- case gfx::Display::ROTATE_180:
- xrandr_rotation = RR_Rotate_180;
- break;
- case gfx::Display::ROTATE_270:
- xrandr_rotation = RR_Rotate_270;
- break;
- }
-
- int internal = display.IsInternal() ? 1 : 0;
- gfx::AcceleratedWidget xwindow = root->host()->GetAcceleratedWidget();
- ui::SetIntProperty(xwindow, kInternalProp, kCARDINAL, internal);
- ui::SetIntProperty(xwindow, kRotationProp, kCARDINAL, xrandr_rotation);
- ui::SetIntProperty(xwindow,
- kScaleFactorProp,
- kCARDINAL,
- 100 * display.device_scale_factor());
-#endif
- scoped_ptr<aura::RootWindowTransformer> transformer(
- internal::CreateRootWindowTransformerForDisplay(root->window(), display));
- root->SetRootWindowTransformer(transformer.Pass());
-}
-
-} // namespace
-
-namespace internal {
-
-// A utility class to store/restore focused/active window
-// when the display configuration has changed.
-class FocusActivationStore {
- public:
- FocusActivationStore()
- : activation_client_(NULL),
- capture_client_(NULL),
- focus_client_(NULL),
- focused_(NULL),
- active_(NULL) {
- }
-
- void Store(bool clear_focus) {
- if (!activation_client_) {
- aura::Window* root = Shell::GetPrimaryRootWindow();
- activation_client_ = aura::client::GetActivationClient(root);
- capture_client_ = aura::client::GetCaptureClient(root);
- focus_client_ = aura::client::GetFocusClient(root);
- }
- focused_ = focus_client_->GetFocusedWindow();
- if (focused_)
- tracker_.Add(focused_);
- active_ = activation_client_->GetActiveWindow();
- if (active_ && focused_ != active_)
- tracker_.Add(active_);
-
- // Deactivate the window to close menu / bubble windows.
- if (clear_focus)
- activation_client_->DeactivateWindow(active_);
-
- // Release capture if any.
- capture_client_->SetCapture(NULL);
- // Clear the focused window if any. This is necessary because a
- // window may be deleted when losing focus (fullscreen flash for
- // example). If the focused window is still alive after move, it'll
- // be re-focused below.
- if (clear_focus)
- focus_client_->FocusWindow(NULL);
- }
-
- void Restore() {
- // Restore focused or active window if it's still alive.
- if (focused_ && tracker_.Contains(focused_)) {
- focus_client_->FocusWindow(focused_);
- } else if (active_ && tracker_.Contains(active_)) {
- activation_client_->ActivateWindow(active_);
- }
- if (focused_)
- tracker_.Remove(focused_);
- if (active_)
- tracker_.Remove(active_);
- focused_ = NULL;
- active_ = NULL;
- }
-
- private:
- aura::client::ActivationClient* activation_client_;
- aura::client::CaptureClient* capture_client_;
- aura::client::FocusClient* focus_client_;
- aura::WindowTracker tracker_;
- aura::Window* focused_;
- aura::Window* active_;
-
- DISALLOW_COPY_AND_ASSIGN(FocusActivationStore);
-};
-
-} // namespace internal
-
-////////////////////////////////////////////////////////////////////////////////
-// DisplayChangeLimiter
-
-DisplayController::DisplayChangeLimiter::DisplayChangeLimiter()
- : throttle_timeout_(base::Time::Now()) {
-}
-
-void DisplayController::DisplayChangeLimiter::SetThrottleTimeout(
- int64 throttle_ms) {
- throttle_timeout_ =
- base::Time::Now() + base::TimeDelta::FromMilliseconds(throttle_ms);
-}
-
-bool DisplayController::DisplayChangeLimiter::IsThrottled() const {
- return base::Time::Now() < throttle_timeout_;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// DisplayController
-
-DisplayController::DisplayController()
- : primary_root_window_for_replace_(NULL),
- focus_activation_store_(new internal::FocusActivationStore()),
- mirror_window_controller_(new internal::MirrorWindowController),
- virtual_keyboard_window_controller_(
- new internal::VirtualKeyboardWindowController) {
-#if defined(OS_CHROMEOS)
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (!command_line->HasSwitch(switches::kAshDisableDisplayChangeLimiter) &&
- base::SysInfo::IsRunningOnChromeOS())
- limiter_.reset(new DisplayChangeLimiter);
-#endif
- // Reset primary display to make sure that tests don't use
- // stale display info from previous tests.
- primary_display_id = gfx::Display::kInvalidDisplayID;
- delete primary_display_for_shutdown;
- primary_display_for_shutdown = NULL;
- num_displays_for_shutdown = -1;
-}
-
-DisplayController::~DisplayController() {
- DCHECK(primary_display_for_shutdown);
-}
-
-void DisplayController::Start() {
- Shell::GetScreen()->AddObserver(this);
- Shell::GetInstance()->display_manager()->set_delegate(this);
-}
-
-void DisplayController::Shutdown() {
- // Unset the display manager's delegate here because
- // DisplayManager outlives DisplayController.
- Shell::GetInstance()->display_manager()->set_delegate(NULL);
-
- mirror_window_controller_.reset();
- virtual_keyboard_window_controller_.reset();
-
- DCHECK(!primary_display_for_shutdown);
- primary_display_for_shutdown = new gfx::Display(
- GetDisplayManager()->GetDisplayForId(primary_display_id));
- num_displays_for_shutdown = GetDisplayManager()->GetNumDisplays();
-
- Shell::GetScreen()->RemoveObserver(this);
- // Delete all root window controllers, which deletes root window
- // from the last so that the primary root window gets deleted last.
- for (std::map<int64, aura::Window*>::const_reverse_iterator it =
- root_windows_.rbegin(); it != root_windows_.rend(); ++it) {
- internal::RootWindowController* controller =
- internal::GetRootWindowController(it->second);
- DCHECK(controller);
- delete controller;
- }
-}
-
-// static
-const gfx::Display& DisplayController::GetPrimaryDisplay() {
- DCHECK_NE(primary_display_id, gfx::Display::kInvalidDisplayID);
- if (primary_display_for_shutdown)
- return *primary_display_for_shutdown;
- return GetDisplayManager()->GetDisplayForId(primary_display_id);
-}
-
-// static
-int DisplayController::GetNumDisplays() {
- if (num_displays_for_shutdown >= 0)
- return num_displays_for_shutdown;
- return GetDisplayManager()->GetNumDisplays();
-}
-
-void DisplayController::InitPrimaryDisplay() {
- const gfx::Display& primary_candidate =
- GetDisplayManager()->GetPrimaryDisplayCandidate();
- primary_display_id = primary_candidate.id();
- AddRootWindowForDisplay(primary_candidate);
-}
-
-void DisplayController::InitSecondaryDisplays() {
- internal::DisplayManager* display_manager = GetDisplayManager();
- for (size_t i = 0; i < display_manager->GetNumDisplays(); ++i) {
- const gfx::Display& display = display_manager->GetDisplayAt(i);
- if (primary_display_id != display.id()) {
- aura::RootWindow* root = AddRootWindowForDisplay(display);
- internal::RootWindowController::CreateForSecondaryDisplay(root);
- }
- }
- UpdateHostWindowNames();
-}
-
-void DisplayController::AddObserver(Observer* observer) {
- observers_.AddObserver(observer);
-}
-
-void DisplayController::RemoveObserver(Observer* observer) {
- observers_.RemoveObserver(observer);
-}
-
-aura::Window* DisplayController::GetPrimaryRootWindow() {
- DCHECK(!root_windows_.empty());
- return root_windows_[primary_display_id];
-}
-
-aura::Window* DisplayController::GetRootWindowForDisplayId(int64 id) {
- return root_windows_[id];
-}
-
-void DisplayController::CloseChildWindows() {
- for (std::map<int64, aura::Window*>::const_iterator it =
- root_windows_.begin(); it != root_windows_.end(); ++it) {
- aura::Window* root_window = it->second;
- internal::RootWindowController* controller =
- internal::GetRootWindowController(root_window);
- if (controller) {
- controller->CloseChildWindows();
- } else {
- while (!root_window->children().empty()) {
- aura::Window* child = root_window->children()[0];
- delete child;
- }
- }
- }
-}
-
-aura::Window::Windows DisplayController::GetAllRootWindows() {
- aura::Window::Windows windows;
- for (std::map<int64, aura::Window*>::const_iterator it =
- root_windows_.begin(); it != root_windows_.end(); ++it) {
- DCHECK(it->second);
- if (internal::GetRootWindowController(it->second))
- windows.push_back(it->second);
- }
- return windows;
-}
-
-gfx::Insets DisplayController::GetOverscanInsets(int64 display_id) const {
- return GetDisplayManager()->GetOverscanInsets(display_id);
-}
-
-void DisplayController::SetOverscanInsets(int64 display_id,
- const gfx::Insets& insets_in_dip) {
- GetDisplayManager()->SetOverscanInsets(display_id, insets_in_dip);
-}
-
-std::vector<internal::RootWindowController*>
-DisplayController::GetAllRootWindowControllers() {
- std::vector<internal::RootWindowController*> controllers;
- for (std::map<int64, aura::Window*>::const_iterator it =
- root_windows_.begin(); it != root_windows_.end(); ++it) {
- internal::RootWindowController* controller =
- internal::GetRootWindowController(it->second);
- if (controller)
- controllers.push_back(controller);
- }
- return controllers;
-}
-
-void DisplayController::ToggleMirrorMode() {
- internal::DisplayManager* display_manager = GetDisplayManager();
- if (display_manager->num_connected_displays() <= 1)
- return;
-
- if (limiter_) {
- if (limiter_->IsThrottled())
- return;
- limiter_->SetThrottleTimeout(kCycleDisplayThrottleTimeoutMs);
- }
-#if defined(OS_CHROMEOS) && defined(USE_X11)
- Shell* shell = Shell::GetInstance();
- internal::OutputConfiguratorAnimation* animation =
- shell->output_configurator_animation();
- animation->StartFadeOutAnimation(base::Bind(
- base::IgnoreResult(&internal::DisplayManager::SetMirrorMode),
- base::Unretained(display_manager),
- !display_manager->IsMirrored()));
-#endif
-}
-
-void DisplayController::SwapPrimaryDisplay() {
- if (limiter_) {
- if (limiter_->IsThrottled())
- return;
- limiter_->SetThrottleTimeout(kSwapDisplayThrottleTimeoutMs);
- }
-
- if (Shell::GetScreen()->GetNumDisplays() > 1) {
-#if defined(OS_CHROMEOS) && defined(USE_X11)
- internal::OutputConfiguratorAnimation* animation =
- Shell::GetInstance()->output_configurator_animation();
- if (animation) {
- animation->StartFadeOutAnimation(base::Bind(
- &DisplayController::OnFadeOutForSwapDisplayFinished,
- base::Unretained(this)));
- } else {
- SetPrimaryDisplay(ScreenAsh::GetSecondaryDisplay());
- }
-#else
- SetPrimaryDisplay(ScreenAsh::GetSecondaryDisplay());
-#endif
- }
-}
-
-void DisplayController::SetPrimaryDisplayId(int64 id) {
- DCHECK_NE(gfx::Display::kInvalidDisplayID, id);
- if (id == gfx::Display::kInvalidDisplayID || primary_display_id == id)
- return;
-
- const gfx::Display& display = GetDisplayManager()->GetDisplayForId(id);
- if (display.is_valid())
- SetPrimaryDisplay(display);
-}
-
-void DisplayController::SetPrimaryDisplay(
- const gfx::Display& new_primary_display) {
- internal::DisplayManager* display_manager = GetDisplayManager();
- DCHECK(new_primary_display.is_valid());
- DCHECK(display_manager->IsActiveDisplay(new_primary_display));
-
- if (!new_primary_display.is_valid() ||
- !display_manager->IsActiveDisplay(new_primary_display)) {
- LOG(ERROR) << "Invalid or non-existent display is requested:"
- << new_primary_display.ToString();
- return;
- }
-
- if (primary_display_id == new_primary_display.id() ||
- root_windows_.size() < 2) {
- return;
- }
-
- aura::Window* non_primary_root = root_windows_[new_primary_display.id()];
- LOG_IF(ERROR, !non_primary_root)
- << "Unknown display is requested in SetPrimaryDisplay: id="
- << new_primary_display.id();
- if (!non_primary_root)
- return;
-
- gfx::Display old_primary_display = GetPrimaryDisplay();
-
- // Swap root windows between current and new primary display.
- aura::Window* primary_root = root_windows_[primary_display_id];
- DCHECK(primary_root);
- DCHECK_NE(primary_root, non_primary_root);
-
- root_windows_[new_primary_display.id()] = primary_root;
- internal::GetRootWindowSettings(primary_root)->display_id =
- new_primary_display.id();
-
- root_windows_[old_primary_display.id()] = non_primary_root;
- internal::GetRootWindowSettings(non_primary_root)->display_id =
- old_primary_display.id();
-
- primary_display_id = new_primary_display.id();
- GetDisplayManager()->layout_store()->UpdatePrimaryDisplayId(
- display_manager->GetCurrentDisplayIdPair(), primary_display_id);
-
- UpdateWorkAreaOfDisplayNearestWindow(
- primary_root, old_primary_display.GetWorkAreaInsets());
- UpdateWorkAreaOfDisplayNearestWindow(
- non_primary_root, new_primary_display.GetWorkAreaInsets());
-
- // Update the dispay manager with new display info.
- std::vector<internal::DisplayInfo> display_info_list;
- display_info_list.push_back(display_manager->GetDisplayInfo(
- primary_display_id));
- display_info_list.push_back(display_manager->GetDisplayInfo(
- ScreenAsh::GetSecondaryDisplay().id()));
- GetDisplayManager()->set_force_bounds_changed(true);
- GetDisplayManager()->UpdateDisplays(display_info_list);
- GetDisplayManager()->set_force_bounds_changed(false);
-}
-
-void DisplayController::EnsurePointerInDisplays() {
- // If the mouse is currently on a display in native location,
- // use the same native location. Otherwise find the display closest
- // to the current cursor location in screen coordinates.
-
- gfx::Point point_in_screen = Shell::GetScreen()->GetCursorScreenPoint();
- gfx::Point target_location_in_native;
- int64 closest_distance_squared = -1;
- internal::DisplayManager* display_manager = GetDisplayManager();
-
- aura::Window* dst_root_window = NULL;
- for (size_t i = 0; i < display_manager->GetNumDisplays(); ++i) {
- const gfx::Display& display = display_manager->GetDisplayAt(i);
- const internal::DisplayInfo display_info =
- display_manager->GetDisplayInfo(display.id());
- aura::Window* root_window = GetRootWindowForDisplayId(display.id());
- if (display_info.bounds_in_native().Contains(
- cursor_location_in_native_coords_for_restore_)) {
- dst_root_window = root_window;
- target_location_in_native = cursor_location_in_native_coords_for_restore_;
- break;
- }
- gfx::Point center = display.bounds().CenterPoint();
- // Use the distance squared from the center of the dislay. This is not
- // exactly "closest" display, but good enough to pick one
- // appropriate (and there are at most two displays).
- // We don't care about actual distance, only relative to other displays, so
- // using the LengthSquared() is cheaper than Length().
-
- int64 distance_squared = (center - point_in_screen).LengthSquared();
- if (closest_distance_squared < 0 ||
- closest_distance_squared > distance_squared) {
- aura::Window* root_window = GetRootWindowForDisplayId(display.id());
- aura::client::ScreenPositionClient* client =
- aura::client::GetScreenPositionClient(root_window);
- client->ConvertPointFromScreen(root_window, &center);
- root_window->GetDispatcher()->host()->ConvertPointToNativeScreen(&center);
- dst_root_window = root_window;
- target_location_in_native = center;
- closest_distance_squared = distance_squared;
- }
- }
- dst_root_window->GetDispatcher()->host()->ConvertPointFromNativeScreen(
- &target_location_in_native);
- dst_root_window->MoveCursorTo(target_location_in_native);
-}
-
-bool DisplayController::UpdateWorkAreaOfDisplayNearestWindow(
- const aura::Window* window,
- const gfx::Insets& insets) {
- const aura::Window* root_window = window->GetRootWindow();
- int64 id = internal::GetRootWindowSettings(root_window)->display_id;
- // if id is |kInvaildDisplayID|, it's being deleted.
- DCHECK(id != gfx::Display::kInvalidDisplayID);
- return GetDisplayManager()->UpdateWorkAreaOfDisplay(id, insets);
-}
-
-const gfx::Display& DisplayController::GetDisplayNearestWindow(
- const aura::Window* window) const {
- if (!window)
- return GetPrimaryDisplay();
- const aura::Window* root_window = window->GetRootWindow();
- if (!root_window)
- return GetPrimaryDisplay();
- int64 id = internal::GetRootWindowSettings(root_window)->display_id;
- // if id is |kInvaildDisplayID|, it's being deleted.
- DCHECK(id != gfx::Display::kInvalidDisplayID);
-
- internal::DisplayManager* display_manager = GetDisplayManager();
- // RootWindow needs Display to determine its device scale factor
- // for non desktop display.
- if (display_manager->non_desktop_display().id() == id)
- return display_manager->non_desktop_display();
- return display_manager->GetDisplayForId(id);
-}
-
-const gfx::Display& DisplayController::GetDisplayNearestPoint(
- const gfx::Point& point) const {
- // Fallback to the primary display if there is no root display containing
- // the |point|.
- const gfx::Display& display =
- GetDisplayManager()->FindDisplayContainingPoint(point);
- return display.is_valid() ? display : GetPrimaryDisplay();
-}
-
-const gfx::Display& DisplayController::GetDisplayMatching(
- const gfx::Rect& rect) const {
- if (rect.IsEmpty())
- return GetDisplayNearestPoint(rect.origin());
-
- int max_area = 0;
- const gfx::Display* matching = NULL;
- for (size_t i = 0; i < GetDisplayManager()->GetNumDisplays(); ++i) {
- const gfx::Display& display = GetDisplayManager()->GetDisplayAt(i);
- gfx::Rect intersect = gfx::IntersectRects(display.bounds(), rect);
- int area = intersect.width() * intersect.height();
- if (area > max_area) {
- max_area = area;
- matching = &display;
- }
- }
- // Fallback to the primary display if there is no matching display.
- return matching ? *matching : GetPrimaryDisplay();
-}
-
-void DisplayController::OnDisplayBoundsChanged(const gfx::Display& display) {
- const internal::DisplayInfo& display_info =
- GetDisplayManager()->GetDisplayInfo(display.id());
- DCHECK(!display_info.bounds_in_native().IsEmpty());
- aura::WindowEventDispatcher* dispatcher =
- root_windows_[display.id()]->GetDispatcher();
- dispatcher->SetHostBounds(display_info.bounds_in_native());
- SetDisplayPropertiesOnHostWindow(dispatcher, display);
-}
-
-void DisplayController::OnDisplayAdded(const gfx::Display& display) {
- if (primary_root_window_for_replace_) {
- DCHECK(root_windows_.empty());
- primary_display_id = display.id();
- root_windows_[display.id()] = primary_root_window_for_replace_;
- internal::GetRootWindowSettings(primary_root_window_for_replace_)->
- display_id = display.id();
- primary_root_window_for_replace_ = NULL;
- const internal::DisplayInfo& display_info =
- GetDisplayManager()->GetDisplayInfo(display.id());
- aura::WindowEventDispatcher* dispatcher =
- root_windows_[display.id()]->GetDispatcher();
- dispatcher->SetHostBounds(display_info.bounds_in_native());
- SetDisplayPropertiesOnHostWindow(dispatcher, display);
- } else {
- if (primary_display_id == gfx::Display::kInvalidDisplayID)
- primary_display_id = display.id();
- DCHECK(!root_windows_.empty());
- aura::RootWindow* root = AddRootWindowForDisplay(display);
- internal::RootWindowController::CreateForSecondaryDisplay(root);
- }
-}
-
-void DisplayController::OnDisplayRemoved(const gfx::Display& display) {
- aura::Window* root_to_delete = root_windows_[display.id()];
- DCHECK(root_to_delete) << display.ToString();
-
- // Display for root window will be deleted when the Primary RootWindow
- // is deleted by the Shell.
- root_windows_.erase(display.id());
-
- // When the primary root window's display is removed, move the primary
- // root to the other display.
- if (primary_display_id == display.id()) {
- // Temporarily store the primary root window in
- // |primary_root_window_for_replace_| when replacing the display.
- if (root_windows_.size() == 0) {
- primary_display_id = gfx::Display::kInvalidDisplayID;
- primary_root_window_for_replace_ = root_to_delete;
- return;
- }
- DCHECK_EQ(1U, root_windows_.size());
- primary_display_id = ScreenAsh::GetSecondaryDisplay().id();
- aura::Window* primary_root = root_to_delete;
-
- // Delete the other root instead.
- root_to_delete = root_windows_[primary_display_id];
- internal::GetRootWindowSettings(root_to_delete)->display_id = display.id();
-
- // Setup primary root.
- root_windows_[primary_display_id] = primary_root;
- internal::GetRootWindowSettings(primary_root)->display_id =
- primary_display_id;
-
- OnDisplayBoundsChanged(
- GetDisplayManager()->GetDisplayForId(primary_display_id));
- }
- internal::RootWindowController* controller =
- internal::GetRootWindowController(root_to_delete);
- DCHECK(controller);
- controller->MoveWindowsTo(GetPrimaryRootWindow());
- // Delete most of root window related objects, but don't delete
- // root window itself yet because the stack may be using it.
- controller->Shutdown();
- base::MessageLoop::current()->DeleteSoon(FROM_HERE, controller);
-}
-
-void DisplayController::OnRootWindowHostResized(const aura::RootWindow* root) {
- internal::DisplayManager* display_manager = GetDisplayManager();
- gfx::Display display = GetDisplayNearestWindow(root->window());
- if (display_manager->UpdateDisplayBounds(
- display.id(),
- root->host()->GetBounds())) {
- mirror_window_controller_->UpdateWindow();
- }
-}
-
-void DisplayController::CreateOrUpdateNonDesktopDisplay(
- const internal::DisplayInfo& info) {
- switch (GetDisplayManager()->second_display_mode()) {
- case internal::DisplayManager::MIRRORING:
- mirror_window_controller_->UpdateWindow(info);
- virtual_keyboard_window_controller_->Close();
- break;
- case internal::DisplayManager::VIRTUAL_KEYBOARD:
- mirror_window_controller_->Close();
- virtual_keyboard_window_controller_->UpdateWindow(info);
- break;
- case internal::DisplayManager::EXTENDED:
- NOTREACHED();
- }
-}
-
-void DisplayController::CloseNonDesktopDisplay() {
- mirror_window_controller_->Close();
- virtual_keyboard_window_controller_->Close();
-}
-
-void DisplayController::PreDisplayConfigurationChange(bool clear_focus) {
- FOR_EACH_OBSERVER(Observer, observers_, OnDisplayConfigurationChanging());
- focus_activation_store_->Store(clear_focus);
-
- gfx::Point point_in_screen = Shell::GetScreen()->GetCursorScreenPoint();
- gfx::Display display =
- Shell::GetScreen()->GetDisplayNearestPoint(point_in_screen);
- aura::Window* root_window = GetRootWindowForDisplayId(display.id());
-
- aura::client::ScreenPositionClient* client =
- aura::client::GetScreenPositionClient(root_window);
- client->ConvertPointFromScreen(root_window, &point_in_screen);
- root_window->GetDispatcher()->host()->ConvertPointToNativeScreen(
- &point_in_screen);
- cursor_location_in_native_coords_for_restore_ = point_in_screen;
-}
-
-void DisplayController::PostDisplayConfigurationChange() {
- if (limiter_)
- limiter_->SetThrottleTimeout(kAfterDisplayChangeThrottleTimeoutMs);
-
- focus_activation_store_->Restore();
-
- internal::DisplayManager* display_manager = GetDisplayManager();
- internal::DisplayLayoutStore* layout_store = display_manager->layout_store();
- if (display_manager->num_connected_displays() > 1) {
- DisplayIdPair pair = display_manager->GetCurrentDisplayIdPair();
- layout_store->UpdateMirrorStatus(pair, display_manager->IsMirrored());
- DisplayLayout layout = layout_store->GetRegisteredDisplayLayout(pair);
-
- if (Shell::GetScreen()->GetNumDisplays() > 1 ) {
- int64 primary_id = layout.primary_id;
- SetPrimaryDisplayId(
- primary_id == gfx::Display::kInvalidDisplayID ?
- pair.first : primary_id);
- // Update the primary_id in case the above call is
- // ignored. Happens when a) default layout's primary id
- // doesn't exist, or b) the primary_id has already been
- // set to the same and didn't update it.
- layout_store->UpdatePrimaryDisplayId(pair, GetPrimaryDisplay().id());
- }
- }
- FOR_EACH_OBSERVER(Observer, observers_, OnDisplayConfigurationChanged());
- UpdateHostWindowNames();
- EnsurePointerInDisplays();
-}
-
-aura::RootWindow* DisplayController::AddRootWindowForDisplay(
- const gfx::Display& display) {
- static int root_window_count = 0;
- const internal::DisplayInfo& display_info =
- GetDisplayManager()->GetDisplayInfo(display.id());
- const gfx::Rect& bounds_in_native = display_info.bounds_in_native();
- aura::RootWindow::CreateParams params(bounds_in_native);
- params.host = Shell::GetInstance()->root_window_host_factory()->
- CreateRootWindowHost(bounds_in_native);
- aura::RootWindow* root_window = new aura::RootWindow(params);
- root_window->window()->SetName(
- base::StringPrintf("RootWindow-%d", root_window_count++));
- root_window->compositor()->SetBackgroundColor(SK_ColorBLACK);
- // No need to remove RootWindowObserver because
- // the DisplayController object outlives RootWindow objects.
- root_window->AddRootWindowObserver(this);
- internal::InitRootWindowSettings(root_window->window())->display_id =
- display.id();
- root_window->Init();
-
- root_windows_[display.id()] = root_window->window();
- SetDisplayPropertiesOnHostWindow(root_window, display);
-
-#if defined(OS_CHROMEOS)
- static bool force_constrain_pointer_to_root =
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshConstrainPointerToRoot);
- if (base::SysInfo::IsRunningOnChromeOS() || force_constrain_pointer_to_root)
- root_window->host()->ConfineCursorToRootWindow();
-#endif
- return root_window;
-}
-
-void DisplayController::OnFadeOutForSwapDisplayFinished() {
-#if defined(OS_CHROMEOS) && defined(USE_X11)
- SetPrimaryDisplay(ScreenAsh::GetSecondaryDisplay());
- Shell::GetInstance()->output_configurator_animation()->StartFadeInAnimation();
-#endif
-}
-
-void DisplayController::UpdateHostWindowNames() {
-#if defined(USE_X11)
- // crbug.com/120229 - set the window title for the primary dislpay
- // to "aura_root_0" so gtalk can find the primary root window to broadcast.
- // TODO(jhorwich) Remove this once Chrome supports window-based broadcasting.
- aura::Window* primary = Shell::GetPrimaryRootWindow();
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- for (size_t i = 0; i < root_windows.size(); ++i) {
- std::string name =
- root_windows[i] == primary ? "aura_root_0" : "aura_root_x";
- gfx::AcceleratedWidget xwindow =
- root_windows[i]->GetDispatcher()->host()->GetAcceleratedWidget();
- XStoreName(gfx::GetXDisplay(), xwindow, name.c_str());
- }
-#endif
-}
-
-} // namespace ash
diff --git a/chromium/ash/display/display_controller.h b/chromium/ash/display/display_controller.h
deleted file mode 100644
index 75fe22cd473..00000000000
--- a/chromium/ash/display/display_controller.h
+++ /dev/null
@@ -1,233 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_DISPLAY_CONTROLLER_H_
-#define ASH_DISPLAY_DISPLAY_CONTROLLER_H_
-
-#include <map>
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "ash/display/display_manager.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/gtest_prod_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/observer_list.h"
-#include "base/time/time.h"
-#include "ui/aura/root_window_observer.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/display_observer.h"
-#include "ui/gfx/point.h"
-
-namespace aura {
-class Display;
-class RootWindow;
-}
-
-namespace base {
-class Value;
-template <typename T> class JSONValueConverter;
-}
-
-namespace gfx {
-class Display;
-class Insets;
-}
-
-namespace ash {
-namespace internal {
-class DisplayInfo;
-class DisplayManager;
-class FocusActivationStore;
-class MirrorWindowController;
-class RootWindowController;
-class VirtualKeyboardWindowController;
-}
-
-// DisplayController owns and maintains RootWindows for each attached
-// display, keeping them in sync with display configuration changes.
-class ASH_EXPORT DisplayController : public gfx::DisplayObserver,
- public aura::RootWindowObserver,
- public internal::DisplayManager::Delegate {
- public:
- class ASH_EXPORT Observer {
- public:
- // Invoked when the display configuration change is requested,
- // but before the change is applied to aura/ash.
- virtual void OnDisplayConfigurationChanging() {}
-
- // Invoked when the all display configuration changes
- // have been applied.
- virtual void OnDisplayConfigurationChanged() {};
-
- protected:
- virtual ~Observer() {}
- };
-
- DisplayController();
- virtual ~DisplayController();
-
- void Start();
- void Shutdown();
-
- // Returns primary display. This is safe to use after ash::Shell is
- // deleted.
- static const gfx::Display& GetPrimaryDisplay();
-
- // Returns the number of display. This is safe to use after
- // ash::Shell is deleted.
- static int GetNumDisplays();
-
- internal::MirrorWindowController* mirror_window_controller() {
- return mirror_window_controller_.get();
- }
-
- internal::VirtualKeyboardWindowController*
- virtual_keyboard_window_controller() {
- return virtual_keyboard_window_controller_.get();
- }
-
- // Initializes primary display.
- void InitPrimaryDisplay();
-
- // Initialize secondary displays.
- void InitSecondaryDisplays();
-
- // Add/Remove observers.
- void AddObserver(Observer* observer);
- void RemoveObserver(Observer* observer);
-
- // Returns the root window for primary display.
- aura::Window* GetPrimaryRootWindow();
-
- // Returns the root window for |display_id|.
- aura::Window* GetRootWindowForDisplayId(int64 id);
-
- // Toggle mirror mode.
- void ToggleMirrorMode();
-
- // Swap primary and secondary display.
- void SwapPrimaryDisplay();
-
- // Sets the ID of the primary display. If the display is not connected, it
- // will switch the primary display when connected.
- void SetPrimaryDisplayId(int64 id);
-
- // Sets primary display. This re-assigns the current root
- // window to given |display|.
- void SetPrimaryDisplay(const gfx::Display& display);
-
- // Closes all child windows in the all root windows.
- void CloseChildWindows();
-
- // Returns all root windows. In non extended desktop mode, this
- // returns the primary root window only.
- aura::Window::Windows GetAllRootWindows();
-
- // Returns all oot window controllers. In non extended desktop
- // mode, this return a RootWindowController for the primary root window only.
- std::vector<internal::RootWindowController*> GetAllRootWindowControllers();
-
- // Gets/Sets/Clears the overscan insets for the specified |display_id|. See
- // display_manager.h for the details.
- gfx::Insets GetOverscanInsets(int64 display_id) const;
- void SetOverscanInsets(int64 display_id, const gfx::Insets& insets_in_dip);
-
- // Checks if the mouse pointer is on one of displays, and moves to
- // the center of the nearest display if it's outside of all displays.
- void EnsurePointerInDisplays();
-
- // Sets the work area's |insets| to the display assigned to |window|.
- bool UpdateWorkAreaOfDisplayNearestWindow(const aura::Window* window,
- const gfx::Insets& insets);
-
- // Returns the display object nearest given |point|.
- const gfx::Display& GetDisplayNearestPoint(
- const gfx::Point& point) const;
-
- // Returns the display object nearest given |window|.
- const gfx::Display& GetDisplayNearestWindow(
- const aura::Window* window) const;
-
- // Returns the display that most closely intersects |match_rect|.
- const gfx::Display& GetDisplayMatching(
- const gfx::Rect& match_rect)const;
-
- // aura::DisplayObserver overrides:
- virtual void OnDisplayBoundsChanged(
- const gfx::Display& display) OVERRIDE;
- virtual void OnDisplayAdded(const gfx::Display& display) OVERRIDE;
- virtual void OnDisplayRemoved(const gfx::Display& display) OVERRIDE;
-
- // RootWindowObserver overrides:
- virtual void OnRootWindowHostResized(const aura::RootWindow* root) OVERRIDE;
-
- // aura::DisplayManager::Delegate overrides:
- virtual void CreateOrUpdateNonDesktopDisplay(
- const internal::DisplayInfo& info) OVERRIDE;
- virtual void CloseNonDesktopDisplay() OVERRIDE;
- virtual void PreDisplayConfigurationChange(bool clear_focus) OVERRIDE;
- virtual void PostDisplayConfigurationChange() OVERRIDE;
-
- private:
- FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, BoundsUpdated);
- FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, SecondaryDisplayLayout);
- friend class internal::DisplayManager;
- friend class internal::MirrorWindowController;
-
- // Creates a root window for |display| and stores it in the |root_windows_|
- // map.
- aura::RootWindow* AddRootWindowForDisplay(const gfx::Display& display);
-
- void OnFadeOutForSwapDisplayFinished();
-
- void UpdateHostWindowNames();
-
- class DisplayChangeLimiter {
- public:
- DisplayChangeLimiter();
-
- // Sets how long the throttling should last.
- void SetThrottleTimeout(int64 throttle_ms);
-
- bool IsThrottled() const;
-
- private:
- // The time when the throttling ends.
- base::Time throttle_timeout_;
-
- DISALLOW_COPY_AND_ASSIGN(DisplayChangeLimiter);
- };
-
- // The limiter to throttle how fast a user can
- // change the display configuration.
- scoped_ptr<DisplayChangeLimiter> limiter_;
-
- // The mapping from display ID to its root window.
- std::map<int64, aura::Window*> root_windows_;
-
- ObserverList<Observer> observers_;
-
- // Store the primary root window temporarily while replacing
- // display.
- aura::Window* primary_root_window_for_replace_;
-
- scoped_ptr<internal::FocusActivationStore> focus_activation_store_;
-
- scoped_ptr<internal::MirrorWindowController> mirror_window_controller_;
- scoped_ptr<internal::VirtualKeyboardWindowController>
- virtual_keyboard_window_controller_;
-
- // Stores the curent cursor location (in native coordinates) used to
- // restore the cursor location when display configuration
- // changed.
- gfx::Point cursor_location_in_native_coords_for_restore_;
-
- DISALLOW_COPY_AND_ASSIGN(DisplayController);
-};
-
-} // namespace ash
-
-#endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_
diff --git a/chromium/ash/display/display_controller_unittest.cc b/chromium/ash/display/display_controller_unittest.cc
deleted file mode 100644
index 35b585fc841..00000000000
--- a/chromium/ash/display/display_controller_unittest.cc
+++ /dev/null
@@ -1,1294 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/display_controller.h"
-
-#include "ash/ash_switches.h"
-#include "ash/display/display_info.h"
-#include "ash/display/display_layout_store.h"
-#include "ash/display/display_manager.h"
-#include "ash/launcher/launcher.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/cursor_manager_test_api.h"
-#include "ash/test/display_manager_test_api.h"
-#include "ash/wm/window_state.h"
-#include "base/command_line.h"
-#include "ui/aura/client/activation_change_observer.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/client/focus_change_observer.h"
-#include "ui/aura/client/focus_client.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/window_tracker.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/widget/widget.h"
-
-#if defined(USE_X11)
-#include "ui/gfx/x/x11_types.h"
-#include <X11/Xlib.h>
-#undef RootWindow
-#endif
-
-namespace ash {
-namespace {
-
-const char kDesktopBackgroundView[] = "DesktopBackgroundView";
-
-template<typename T>
-class Resetter {
- public:
- explicit Resetter(T* value) : value_(*value) {
- *value = 0;
- }
- ~Resetter() { }
- T value() { return value_; }
-
- private:
- T value_;
- DISALLOW_COPY_AND_ASSIGN(Resetter);
-};
-
-class TestObserver : public DisplayController::Observer,
- public gfx::DisplayObserver,
- public aura::client::FocusChangeObserver,
- public aura::client::ActivationChangeObserver {
- public:
- TestObserver()
- : changing_count_(0),
- changed_count_(0),
- bounds_changed_count_(0),
- changed_display_id_(0),
- focus_changed_count_(0),
- activation_changed_count_(0) {
- Shell::GetInstance()->display_controller()->AddObserver(this);
- Shell::GetScreen()->AddObserver(this);
- aura::client::GetFocusClient(Shell::GetPrimaryRootWindow())->
- AddObserver(this);
- aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())->
- AddObserver(this);
- }
-
- virtual ~TestObserver() {
- Shell::GetInstance()->display_controller()->RemoveObserver(this);
- Shell::GetScreen()->RemoveObserver(this);
- aura::client::GetFocusClient(Shell::GetPrimaryRootWindow())->
- RemoveObserver(this);
- aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())->
- RemoveObserver(this);
- }
-
- // Overridden from DisplayController::Observer
- virtual void OnDisplayConfigurationChanging() OVERRIDE {
- ++changing_count_;
- }
- virtual void OnDisplayConfigurationChanged() OVERRIDE {
- ++changed_count_;
- }
-
- // Overrideen from gfx::DisplayObserver
- virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE {
- changed_display_id_ = display.id();
- bounds_changed_count_ ++;
- }
- virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE {
- }
- virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE {
- }
-
- // Overridden from aura::client::FocusChangeObserver
- virtual void OnWindowFocused(aura::Window* gained_focus,
- aura::Window* lost_focus) OVERRIDE {
- focus_changed_count_++;
- }
-
- // Overridden from aura::client::ActivationChangeObserver
- virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) OVERRIDE {
- activation_changed_count_++;
- }
- virtual void OnAttemptToReactivateWindow(
- aura::Window* request_active,
- aura::Window* actual_active) OVERRIDE {
- }
-
- int CountAndReset() {
- EXPECT_EQ(changing_count_, changed_count_);
- changed_count_ = 0;
- return Resetter<int>(&changing_count_).value();
- }
-
- int64 GetBoundsChangedCountAndReset() {
- return Resetter<int>(&bounds_changed_count_).value();
- }
-
- int64 GetChangedDisplayIdAndReset() {
- return Resetter<int64>(&changed_display_id_).value();
- }
-
- int GetFocusChangedCountAndReset() {
- return Resetter<int>(&focus_changed_count_).value();
- }
-
- int GetActivationChangedCountAndReset() {
- return Resetter<int>(&activation_changed_count_).value();
- }
-
- private:
- int changing_count_;
- int changed_count_;
-
- int bounds_changed_count_;
- int64 changed_display_id_;
-
- int focus_changed_count_;
- int activation_changed_count_;
-
- DISALLOW_COPY_AND_ASSIGN(TestObserver);
-};
-
-gfx::Display GetPrimaryDisplay() {
- return Shell::GetScreen()->GetDisplayNearestWindow(
- Shell::GetAllRootWindows()[0]);
-}
-
-gfx::Display GetSecondaryDisplay() {
- return Shell::GetScreen()->GetDisplayNearestWindow(
- Shell::GetAllRootWindows()[1]);
-}
-
-void SetSecondaryDisplayLayoutAndOffset(DisplayLayout::Position position,
- int offset) {
- DisplayLayout layout(position, offset);
- ASSERT_GT(Shell::GetScreen()->GetNumDisplays(), 1);
- Shell::GetInstance()->display_manager()->
- SetLayoutForCurrentDisplays(layout);
-}
-
-void SetSecondaryDisplayLayout(DisplayLayout::Position position) {
- SetSecondaryDisplayLayoutAndOffset(position, 0);
-}
-
-void SetDefaultDisplayLayout(DisplayLayout::Position position) {
- Shell::GetInstance()->display_manager()->layout_store()->
- SetDefaultDisplayLayout(DisplayLayout(position, 0));
-}
-
-class DisplayControllerShutdownTest : public test::AshTestBase {
- public:
- virtual void TearDown() OVERRIDE {
- test::AshTestBase::TearDown();
- if (!SupportsMultipleDisplays())
- return;
-
- // Make sure that primary display is accessible after shutdown.
- gfx::Display primary = Shell::GetScreen()->GetPrimaryDisplay();
- EXPECT_EQ("0,0 444x333", primary.bounds().ToString());
- EXPECT_EQ(2, Shell::GetScreen()->GetNumDisplays());
- }
-};
-
-class TestEventHandler : public ui::EventHandler {
- public:
- TestEventHandler() : target_root_(NULL),
- touch_radius_x_(0.0),
- touch_radius_y_(0.0),
- scroll_x_offset_(0.0),
- scroll_y_offset_(0.0),
- scroll_x_offset_ordinal_(0.0),
- scroll_y_offset_ordinal_(0.0) {}
- virtual ~TestEventHandler() {}
-
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
- if (event->flags() & ui::EF_IS_SYNTHESIZED &&
- event->type() != ui::ET_MOUSE_EXITED &&
- event->type() != ui::ET_MOUSE_ENTERED) {
- return;
- }
- aura::Window* target = static_cast<aura::Window*>(event->target());
- mouse_location_ = event->root_location();
- target_root_ = target->GetRootWindow();
- event->StopPropagation();
- }
-
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- // Only record when the target is the background which covers
- // entire root window.
- if (target->name() != kDesktopBackgroundView)
- return;
- touch_radius_x_ = event->radius_x();
- touch_radius_y_ = event->radius_y();
- event->StopPropagation();
- }
-
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- // Only record when the target is the background which covers
- // entire root window.
- if (target->name() != kDesktopBackgroundView)
- return;
-
- if (event->type() == ui::ET_SCROLL) {
- scroll_x_offset_ = event->x_offset();
- scroll_y_offset_ = event->y_offset();
- scroll_x_offset_ordinal_ = event->x_offset_ordinal();
- scroll_y_offset_ordinal_ = event->y_offset_ordinal();
- }
- event->StopPropagation();
- }
-
- std::string GetLocationAndReset() {
- std::string result = mouse_location_.ToString();
- mouse_location_.SetPoint(0, 0);
- target_root_ = NULL;
- return result;
- }
-
- float touch_radius_x() { return touch_radius_x_; }
- float touch_radius_y() { return touch_radius_y_; }
- float scroll_x_offset() { return scroll_x_offset_; }
- float scroll_y_offset() { return scroll_y_offset_; }
- float scroll_x_offset_ordinal() { return scroll_x_offset_ordinal_; }
- float scroll_y_offset_ordinal() { return scroll_y_offset_ordinal_; }
-
- private:
- gfx::Point mouse_location_;
- aura::Window* target_root_;
-
- float touch_radius_x_;
- float touch_radius_y_;
- float scroll_x_offset_;
- float scroll_y_offset_;
- float scroll_x_offset_ordinal_;
- float scroll_y_offset_ordinal_;
-
- DISALLOW_COPY_AND_ASSIGN(TestEventHandler);
-};
-
-gfx::Display::Rotation GetStoredRotation(int64 id) {
- return Shell::GetInstance()->display_manager()->GetDisplayInfo(id).rotation();
-}
-
-float GetStoredUIScale(int64 id) {
- return Shell::GetInstance()->display_manager()->GetDisplayInfo(id).
- GetEffectiveUIScale();
-}
-
-#if defined(USE_X11)
-void GetPrimaryAndSeconary(aura::Window** primary,
- aura::Window** secondary) {
- *primary = Shell::GetPrimaryRootWindow();
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- *secondary = root_windows[0] == *primary ? root_windows[1] : root_windows[0];
-}
-
-std::string GetXWindowName(aura::RootWindow* window) {
- char* name = NULL;
- XFetchName(gfx::GetXDisplay(), window->host()->GetAcceleratedWidget(), &name);
- std::string ret(name);
- XFree(name);
- return ret;
-}
-#endif
-
-} // namespace
-
-typedef test::AshTestBase DisplayControllerTest;
-
-TEST_F(DisplayControllerShutdownTest, Shutdown) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("444x333, 200x200");
-}
-
-TEST_F(DisplayControllerTest, SecondaryDisplayLayout) {
- if (!SupportsMultipleDisplays())
- return;
-
- // Creates windows to catch activation change event.
- scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithId(1));
- w1->Focus();
-
- TestObserver observer;
- UpdateDisplay("500x500,400x400");
- EXPECT_EQ(1, observer.CountAndReset()); // resize and add
- EXPECT_EQ(1, observer.GetBoundsChangedCountAndReset());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- gfx::Insets insets(5, 5, 5, 5);
- int64 secondary_display_id = ScreenAsh::GetSecondaryDisplay().id();
- Shell::GetInstance()->display_manager()->UpdateWorkAreaOfDisplay(
- secondary_display_id, insets);
-
- // Default layout is RIGHT.
- EXPECT_EQ("0,0 500x500", GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ("500,0 400x400", GetSecondaryDisplay().bounds().ToString());
- EXPECT_EQ("505,5 390x390", GetSecondaryDisplay().work_area().ToString());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
-
- // Layout the secondary display to the bottom of the primary.
- SetSecondaryDisplayLayout(DisplayLayout::BOTTOM);
- EXPECT_EQ(1, observer.CountAndReset());
- EXPECT_EQ(1, observer.GetBoundsChangedCountAndReset());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- EXPECT_EQ(secondary_display_id, observer.GetChangedDisplayIdAndReset());
- EXPECT_EQ("0,0 500x500", GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ("0,500 400x400", GetSecondaryDisplay().bounds().ToString());
- EXPECT_EQ("5,505 390x390", GetSecondaryDisplay().work_area().ToString());
-
- // Layout the secondary display to the left of the primary.
- SetSecondaryDisplayLayout(DisplayLayout::LEFT);
- EXPECT_EQ(1, observer.CountAndReset());
- EXPECT_EQ(1, observer.GetBoundsChangedCountAndReset());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- EXPECT_EQ(secondary_display_id, observer.GetChangedDisplayIdAndReset());
- EXPECT_EQ("0,0 500x500", GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ("-400,0 400x400", GetSecondaryDisplay().bounds().ToString());
- EXPECT_EQ("-395,5 390x390", GetSecondaryDisplay().work_area().ToString());
-
- // Layout the secondary display to the top of the primary.
- SetSecondaryDisplayLayout(DisplayLayout::TOP);
- EXPECT_EQ(1, observer.CountAndReset());
- EXPECT_EQ(1, observer.GetBoundsChangedCountAndReset());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- EXPECT_EQ(secondary_display_id, observer.GetChangedDisplayIdAndReset());
- EXPECT_EQ("0,0 500x500", GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ("0,-400 400x400", GetSecondaryDisplay().bounds().ToString());
- EXPECT_EQ("5,-395 390x390", GetSecondaryDisplay().work_area().ToString());
-
- // Layout to the right with an offset.
- SetSecondaryDisplayLayoutAndOffset(DisplayLayout::RIGHT, 300);
- EXPECT_EQ(1, observer.CountAndReset()); // resize and add
- EXPECT_EQ(1, observer.GetBoundsChangedCountAndReset());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- EXPECT_EQ(secondary_display_id, observer.GetChangedDisplayIdAndReset());
- EXPECT_EQ("0,0 500x500", GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ("500,300 400x400", GetSecondaryDisplay().bounds().ToString());
-
- // Keep the minimum 100.
- SetSecondaryDisplayLayoutAndOffset(DisplayLayout::RIGHT, 490);
- EXPECT_EQ(1, observer.CountAndReset()); // resize and add
- EXPECT_EQ(1, observer.GetBoundsChangedCountAndReset());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- EXPECT_EQ(secondary_display_id, observer.GetChangedDisplayIdAndReset());
- EXPECT_EQ("0,0 500x500", GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ("500,400 400x400", GetSecondaryDisplay().bounds().ToString());
-
- SetSecondaryDisplayLayoutAndOffset(DisplayLayout::RIGHT, -400);
- EXPECT_EQ(secondary_display_id, observer.GetChangedDisplayIdAndReset());
- EXPECT_EQ(1, observer.GetBoundsChangedCountAndReset());
- EXPECT_EQ(1, observer.CountAndReset()); // resize and add
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- EXPECT_EQ("0,0 500x500", GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ("500,-300 400x400", GetSecondaryDisplay().bounds().ToString());
-
- // Layout to the bottom with an offset.
- SetSecondaryDisplayLayoutAndOffset(DisplayLayout::BOTTOM, -200);
- EXPECT_EQ(secondary_display_id, observer.GetChangedDisplayIdAndReset());
- EXPECT_EQ(1, observer.GetBoundsChangedCountAndReset());
- EXPECT_EQ(1, observer.CountAndReset()); // resize and add
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- EXPECT_EQ("0,0 500x500", GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ("-200,500 400x400", GetSecondaryDisplay().bounds().ToString());
-
- // Keep the minimum 100.
- SetSecondaryDisplayLayoutAndOffset(DisplayLayout::BOTTOM, 490);
- EXPECT_EQ(secondary_display_id, observer.GetChangedDisplayIdAndReset());
- EXPECT_EQ(1, observer.GetBoundsChangedCountAndReset());
- EXPECT_EQ(1, observer.CountAndReset()); // resize and add
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- EXPECT_EQ("0,0 500x500", GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ("400,500 400x400", GetSecondaryDisplay().bounds().ToString());
-
- SetSecondaryDisplayLayoutAndOffset(DisplayLayout::BOTTOM, -400);
- EXPECT_EQ(secondary_display_id, observer.GetChangedDisplayIdAndReset());
- EXPECT_EQ(1, observer.GetBoundsChangedCountAndReset());
- EXPECT_EQ(1, observer.CountAndReset()); // resize and add
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- EXPECT_EQ("0,0 500x500", GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ("-300,500 400x400", GetSecondaryDisplay().bounds().ToString());
-
- // Setting the same layout shouldn't invoke observers.
- SetSecondaryDisplayLayoutAndOffset(DisplayLayout::BOTTOM, -400);
- EXPECT_EQ(0, observer.GetChangedDisplayIdAndReset());
- EXPECT_EQ(0, observer.GetBoundsChangedCountAndReset());
- EXPECT_EQ(0, observer.CountAndReset()); // resize and add
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- EXPECT_EQ("0,0 500x500", GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ("-300,500 400x400", GetSecondaryDisplay().bounds().ToString());
-
- UpdateDisplay("500x500");
- EXPECT_LE(1, observer.GetFocusChangedCountAndReset());
- EXPECT_LE(1, observer.GetActivationChangedCountAndReset());
-}
-
-namespace {
-
-internal::DisplayInfo CreateDisplayInfo(int64 id,
- const gfx::Rect& bounds,
- float device_scale_factor) {
- internal::DisplayInfo info(id, "", false);
- info.SetBounds(bounds);
- info.set_device_scale_factor(device_scale_factor);
- return info;
-}
-
-} // namespace
-
-TEST_F(DisplayControllerTest, MirrorToDockedWithFullscreen) {
- // Creates windows to catch activation change event.
- scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithId(1));
- w1->Focus();
-
- // Docked mode.
- internal::DisplayManager* display_manager =
- Shell::GetInstance()->display_manager();
-
- const internal::DisplayInfo internal_display_info =
- CreateDisplayInfo(1, gfx::Rect(0, 0, 500, 500), 2.0f);
- const internal::DisplayInfo external_display_info =
- CreateDisplayInfo(2, gfx::Rect(0, 0, 500, 500), 1.0f);
-
- std::vector<internal::DisplayInfo> display_info_list;
- // Mirror.
- display_info_list.push_back(internal_display_info);
- display_info_list.push_back(external_display_info);
- display_manager->OnNativeDisplaysChanged(display_info_list);
- const int64 internal_display_id =
- test::DisplayManagerTestApi(display_manager).
- SetFirstDisplayAsInternalDisplay();
- EXPECT_EQ(1, internal_display_id);
- EXPECT_EQ(2U, display_manager->num_connected_displays());
- EXPECT_EQ(1U, display_manager->GetNumDisplays());
-
- wm::WindowState* window_state = wm::GetWindowState(w1.get());
- window_state->ToggleFullscreen();
- EXPECT_TRUE(window_state->IsFullscreen());
- EXPECT_EQ("0,0 250x250", w1->bounds().ToString());
- // Dock mode.
- TestObserver observer;
- display_info_list.clear();
- display_info_list.push_back(external_display_info);
- display_manager->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(1U, display_manager->GetNumDisplays());
- EXPECT_EQ(1U, display_manager->num_connected_displays());
- EXPECT_EQ(0, observer.GetChangedDisplayIdAndReset());
- EXPECT_EQ(0, observer.GetBoundsChangedCountAndReset());
- EXPECT_EQ(1, observer.CountAndReset());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
-
- EXPECT_TRUE(window_state->IsFullscreen());
- EXPECT_EQ("0,0 500x500", w1->bounds().ToString());
-}
-
-TEST_F(DisplayControllerTest, BoundsUpdated) {
- if (!SupportsMultipleDisplays())
- return;
-
- // Creates windows to catch activation change event.
- scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithId(1));
- w1->Focus();
-
- TestObserver observer;
- SetDefaultDisplayLayout(DisplayLayout::BOTTOM);
- UpdateDisplay("200x200,300x300"); // layout, resize and add.
- EXPECT_EQ(1, observer.CountAndReset());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
-
- internal::DisplayManager* display_manager =
- Shell::GetInstance()->display_manager();
- gfx::Insets insets(5, 5, 5, 5);
- display_manager->UpdateWorkAreaOfDisplay(
- ScreenAsh::GetSecondaryDisplay().id(), insets);
-
- EXPECT_EQ("0,0 200x200", GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ("0,200 300x300", GetSecondaryDisplay().bounds().ToString());
- EXPECT_EQ("5,205 290x290", GetSecondaryDisplay().work_area().ToString());
-
- UpdateDisplay("400x400,200x200");
- EXPECT_EQ(1, observer.CountAndReset()); // two resizes
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- EXPECT_EQ("0,0 400x400", GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ("0,400 200x200", GetSecondaryDisplay().bounds().ToString());
-
- UpdateDisplay("400x400,300x300");
- EXPECT_EQ(1, observer.CountAndReset());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- EXPECT_EQ("0,0 400x400", GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ("0,400 300x300", GetSecondaryDisplay().bounds().ToString());
-
- UpdateDisplay("400x400");
- EXPECT_EQ(1, observer.CountAndReset());
- EXPECT_LE(1, observer.GetFocusChangedCountAndReset());
- EXPECT_LE(1, observer.GetActivationChangedCountAndReset());
- EXPECT_EQ("0,0 400x400", GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ(1, Shell::GetScreen()->GetNumDisplays());
-
- UpdateDisplay("400x500*2,300x300");
- EXPECT_EQ(1, observer.CountAndReset());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- ASSERT_EQ(2, Shell::GetScreen()->GetNumDisplays());
- EXPECT_EQ("0,0 200x250", GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ("0,250 300x300", GetSecondaryDisplay().bounds().ToString());
-
- // No change
- UpdateDisplay("400x500*2,300x300");
- EXPECT_EQ(0, observer.CountAndReset());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
-
- // Rotation
- int64 primary_id = GetPrimaryDisplay().id();
- display_manager->SetDisplayRotation(primary_id, gfx::Display::ROTATE_90);
- EXPECT_EQ(1, observer.CountAndReset());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- display_manager->SetDisplayRotation(primary_id, gfx::Display::ROTATE_90);
- EXPECT_EQ(0, observer.CountAndReset());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
-
- // UI scale is eanbled only on internal display.
- int64 secondary_id = GetSecondaryDisplay().id();
- gfx::Display::SetInternalDisplayId(secondary_id);
- display_manager->SetDisplayUIScale(secondary_id, 1.125f);
- EXPECT_EQ(1, observer.CountAndReset());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- display_manager->SetDisplayUIScale(secondary_id, 1.125f);
- EXPECT_EQ(0, observer.CountAndReset());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- display_manager->SetDisplayUIScale(primary_id, 1.125f);
- EXPECT_EQ(0, observer.CountAndReset());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
- display_manager->SetDisplayUIScale(primary_id, 1.125f);
- EXPECT_EQ(0, observer.CountAndReset());
- EXPECT_EQ(0, observer.GetFocusChangedCountAndReset());
- EXPECT_EQ(0, observer.GetActivationChangedCountAndReset());
-}
-
-TEST_F(DisplayControllerTest, SwapPrimary) {
- if (!SupportsMultipleDisplays())
- return;
-
- DisplayController* display_controller =
- Shell::GetInstance()->display_controller();
- internal::DisplayManager* display_manager =
- Shell::GetInstance()->display_manager();
-
- UpdateDisplay("200x200,300x300");
- gfx::Display primary_display = Shell::GetScreen()->GetPrimaryDisplay();
- gfx::Display secondary_display = ScreenAsh::GetSecondaryDisplay();
-
- DisplayLayout display_layout(DisplayLayout::RIGHT, 50);
- display_manager->SetLayoutForCurrentDisplays(display_layout);
-
- EXPECT_NE(primary_display.id(), secondary_display.id());
- aura::Window* primary_root =
- display_controller->GetRootWindowForDisplayId(primary_display.id());
- aura::Window* secondary_root =
- display_controller->GetRootWindowForDisplayId(secondary_display.id());
- EXPECT_NE(primary_root, secondary_root);
- aura::Window* launcher_window =
- Launcher::ForPrimaryDisplay()->shelf_widget()->GetNativeView();
- EXPECT_TRUE(primary_root->Contains(launcher_window));
- EXPECT_FALSE(secondary_root->Contains(launcher_window));
- EXPECT_EQ(primary_display.id(),
- Shell::GetScreen()->GetDisplayNearestPoint(
- gfx::Point(-100, -100)).id());
- EXPECT_EQ(primary_display.id(),
- Shell::GetScreen()->GetDisplayNearestWindow(NULL).id());
-
- EXPECT_EQ("0,0 200x200", primary_display.bounds().ToString());
- EXPECT_EQ("0,0 200x153", primary_display.work_area().ToString());
- EXPECT_EQ("200,0 300x300", secondary_display.bounds().ToString());
- EXPECT_EQ("200,0 300x253", secondary_display.work_area().ToString());
- EXPECT_EQ("right, 50",
- display_manager->GetCurrentDisplayLayout().ToString());
-
- // Switch primary and secondary
- display_controller->SetPrimaryDisplay(secondary_display);
- const DisplayLayout& inverted_layout =
- display_manager->GetCurrentDisplayLayout();
- EXPECT_EQ("left, -50", inverted_layout.ToString());
-
- EXPECT_EQ(secondary_display.id(),
- Shell::GetScreen()->GetPrimaryDisplay().id());
- EXPECT_EQ(primary_display.id(), ScreenAsh::GetSecondaryDisplay().id());
- EXPECT_EQ(secondary_display.id(),
- Shell::GetScreen()->GetDisplayNearestPoint(
- gfx::Point(-100, -100)).id());
- EXPECT_EQ(secondary_display.id(),
- Shell::GetScreen()->GetDisplayNearestWindow(NULL).id());
-
- EXPECT_EQ(
- primary_root,
- display_controller->GetRootWindowForDisplayId(secondary_display.id()));
- EXPECT_EQ(
- secondary_root,
- display_controller->GetRootWindowForDisplayId(primary_display.id()));
- EXPECT_TRUE(primary_root->Contains(launcher_window));
- EXPECT_FALSE(secondary_root->Contains(launcher_window));
-
- // Test if the bounds are correctly swapped.
- gfx::Display swapped_primary = Shell::GetScreen()->GetPrimaryDisplay();
- gfx::Display swapped_secondary = ScreenAsh::GetSecondaryDisplay();
- EXPECT_EQ("0,0 300x300", swapped_primary.bounds().ToString());
- EXPECT_EQ("0,0 300x253", swapped_primary.work_area().ToString());
- EXPECT_EQ("-200,-50 200x200", swapped_secondary.bounds().ToString());
-
- EXPECT_EQ("-200,-50 200x153", swapped_secondary.work_area().ToString());
-
- aura::WindowTracker tracker;
- tracker.Add(primary_root);
- tracker.Add(secondary_root);
-
- // Deleting 2nd display should move the primary to original primary display.
- UpdateDisplay("200x200");
- RunAllPendingInMessageLoop(); // RootWindow is deleted in a posted task.
- EXPECT_EQ(1, Shell::GetScreen()->GetNumDisplays());
- EXPECT_EQ(primary_display.id(), Shell::GetScreen()->GetPrimaryDisplay().id());
- EXPECT_EQ(primary_display.id(),
- Shell::GetScreen()->GetDisplayNearestPoint(
- gfx::Point(-100, -100)).id());
- EXPECT_EQ(primary_display.id(),
- Shell::GetScreen()->GetDisplayNearestWindow(NULL).id());
- EXPECT_TRUE(tracker.Contains(primary_root));
- EXPECT_FALSE(tracker.Contains(secondary_root));
- EXPECT_TRUE(primary_root->Contains(launcher_window));
-}
-
-TEST_F(DisplayControllerTest, SwapPrimaryForLegacyShelfLayout) {
- if (!SupportsMultipleDisplays())
- return;
-
- CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshDisableAlternateShelfLayout);
-
- DisplayController* display_controller =
- Shell::GetInstance()->display_controller();
- internal::DisplayManager* display_manager =
- Shell::GetInstance()->display_manager();
-
- UpdateDisplay("200x200,300x300");
- gfx::Display primary_display = Shell::GetScreen()->GetPrimaryDisplay();
- gfx::Display secondary_display = ScreenAsh::GetSecondaryDisplay();
-
- DisplayLayout display_layout(DisplayLayout::RIGHT, 50);
- display_manager->SetLayoutForCurrentDisplays(display_layout);
-
- EXPECT_NE(primary_display.id(), secondary_display.id());
- aura::Window* primary_root =
- display_controller->GetRootWindowForDisplayId(primary_display.id());
- aura::Window* secondary_root =
- display_controller->GetRootWindowForDisplayId(secondary_display.id());
- EXPECT_NE(primary_root, secondary_root);
- aura::Window* launcher_window =
- Launcher::ForPrimaryDisplay()->shelf_widget()->GetNativeView();
- EXPECT_TRUE(primary_root->Contains(launcher_window));
- EXPECT_FALSE(secondary_root->Contains(launcher_window));
- EXPECT_EQ(primary_display.id(),
- Shell::GetScreen()->GetDisplayNearestPoint(
- gfx::Point(-100, -100)).id());
- EXPECT_EQ(primary_display.id(),
- Shell::GetScreen()->GetDisplayNearestWindow(NULL).id());
-
- EXPECT_EQ("0,0 200x200", primary_display.bounds().ToString());
- EXPECT_EQ("0,0 200x152", primary_display.work_area().ToString());
- EXPECT_EQ("200,0 300x300", secondary_display.bounds().ToString());
- EXPECT_EQ("200,0 300x252", secondary_display.work_area().ToString());
- EXPECT_EQ("right, 50",
- display_manager->GetCurrentDisplayLayout().ToString());
-
- // Switch primary and secondary
- display_controller->SetPrimaryDisplay(secondary_display);
- const DisplayLayout& inverted_layout =
- display_manager->GetCurrentDisplayLayout();
- EXPECT_EQ("left, -50", inverted_layout.ToString());
-
- EXPECT_EQ(secondary_display.id(),
- Shell::GetScreen()->GetPrimaryDisplay().id());
- EXPECT_EQ(primary_display.id(), ScreenAsh::GetSecondaryDisplay().id());
- EXPECT_EQ(secondary_display.id(),
- Shell::GetScreen()->GetDisplayNearestPoint(
- gfx::Point(-100, -100)).id());
- EXPECT_EQ(secondary_display.id(),
- Shell::GetScreen()->GetDisplayNearestWindow(NULL).id());
-
- EXPECT_EQ(
- primary_root,
- display_controller->GetRootWindowForDisplayId(secondary_display.id()));
- EXPECT_EQ(
- secondary_root,
- display_controller->GetRootWindowForDisplayId(primary_display.id()));
- EXPECT_TRUE(primary_root->Contains(launcher_window));
- EXPECT_FALSE(secondary_root->Contains(launcher_window));
-
- // Test if the bounds are correctly swapped.
- gfx::Display swapped_primary = Shell::GetScreen()->GetPrimaryDisplay();
- gfx::Display swapped_secondary = ScreenAsh::GetSecondaryDisplay();
- EXPECT_EQ("0,0 300x300", swapped_primary.bounds().ToString());
- EXPECT_EQ("0,0 300x252", swapped_primary.work_area().ToString());
- EXPECT_EQ("-200,-50 200x200", swapped_secondary.bounds().ToString());
-
- EXPECT_EQ("-200,-50 200x152", swapped_secondary.work_area().ToString());
-
- aura::WindowTracker tracker;
- tracker.Add(primary_root);
- tracker.Add(secondary_root);
-
- // Deleting 2nd display should move the primary to original primary display.
- UpdateDisplay("200x200");
- RunAllPendingInMessageLoop(); // RootWindow is deleted in a posted task.
- EXPECT_EQ(1, Shell::GetScreen()->GetNumDisplays());
- EXPECT_EQ(primary_display.id(), Shell::GetScreen()->GetPrimaryDisplay().id());
- EXPECT_EQ(primary_display.id(),
- Shell::GetScreen()->GetDisplayNearestPoint(
- gfx::Point(-100, -100)).id());
- EXPECT_EQ(primary_display.id(),
- Shell::GetScreen()->GetDisplayNearestWindow(NULL).id());
- EXPECT_TRUE(tracker.Contains(primary_root));
- EXPECT_FALSE(tracker.Contains(secondary_root));
- EXPECT_TRUE(primary_root->Contains(launcher_window));
-}
-
-TEST_F(DisplayControllerTest, SwapPrimaryById) {
- if (!SupportsMultipleDisplays())
- return;
-
- DisplayController* display_controller =
- Shell::GetInstance()->display_controller();
- internal::DisplayManager* display_manager =
- Shell::GetInstance()->display_manager();
-
- UpdateDisplay("200x200,300x300");
- gfx::Display primary_display = Shell::GetScreen()->GetPrimaryDisplay();
- gfx::Display secondary_display = ScreenAsh::GetSecondaryDisplay();
-
- DisplayLayout display_layout(DisplayLayout::RIGHT, 50);
- display_manager->SetLayoutForCurrentDisplays(display_layout);
-
- EXPECT_NE(primary_display.id(), secondary_display.id());
- aura::Window* primary_root =
- display_controller->GetRootWindowForDisplayId(primary_display.id());
- aura::Window* secondary_root =
- display_controller->GetRootWindowForDisplayId(secondary_display.id());
- aura::Window* launcher_window =
- Launcher::ForPrimaryDisplay()->shelf_widget()->GetNativeView();
- EXPECT_TRUE(primary_root->Contains(launcher_window));
- EXPECT_FALSE(secondary_root->Contains(launcher_window));
- EXPECT_NE(primary_root, secondary_root);
- EXPECT_EQ(primary_display.id(),
- Shell::GetScreen()->GetDisplayNearestPoint(
- gfx::Point(-100, -100)).id());
- EXPECT_EQ(primary_display.id(),
- Shell::GetScreen()->GetDisplayNearestWindow(NULL).id());
-
- // Switch primary and secondary by display ID.
- TestObserver observer;
- display_controller->SetPrimaryDisplayId(secondary_display.id());
- EXPECT_EQ(secondary_display.id(),
- Shell::GetScreen()->GetPrimaryDisplay().id());
- EXPECT_EQ(primary_display.id(), ScreenAsh::GetSecondaryDisplay().id());
- EXPECT_LT(0, observer.CountAndReset());
-
- EXPECT_EQ(
- primary_root,
- display_controller->GetRootWindowForDisplayId(secondary_display.id()));
- EXPECT_EQ(
- secondary_root,
- display_controller->GetRootWindowForDisplayId(primary_display.id()));
- EXPECT_TRUE(primary_root->Contains(launcher_window));
- EXPECT_FALSE(secondary_root->Contains(launcher_window));
-
- const DisplayLayout& inverted_layout =
- display_manager->GetCurrentDisplayLayout();
-
- EXPECT_EQ("left, -50", inverted_layout.ToString());
-
- // Calling the same ID don't do anything.
- display_controller->SetPrimaryDisplayId(secondary_display.id());
- EXPECT_EQ(0, observer.CountAndReset());
-
- aura::WindowTracker tracker;
- tracker.Add(primary_root);
- tracker.Add(secondary_root);
-
- // Deleting 2nd display should move the primary to original primary display.
- UpdateDisplay("200x200");
- RunAllPendingInMessageLoop(); // RootWindow is deleted in a posted task.
- EXPECT_EQ(1, Shell::GetScreen()->GetNumDisplays());
- EXPECT_EQ(primary_display.id(), Shell::GetScreen()->GetPrimaryDisplay().id());
- EXPECT_EQ(primary_display.id(),
- Shell::GetScreen()->GetDisplayNearestPoint(
- gfx::Point(-100, -100)).id());
- EXPECT_EQ(primary_display.id(),
- Shell::GetScreen()->GetDisplayNearestWindow(NULL).id());
- EXPECT_TRUE(tracker.Contains(primary_root));
- EXPECT_FALSE(tracker.Contains(secondary_root));
- EXPECT_TRUE(primary_root->Contains(launcher_window));
-
- // Adding 2nd display with the same ID. The 2nd display should become primary
- // since secondary id is still stored as desirable_primary_id.
- std::vector<internal::DisplayInfo> display_info_list;
- display_info_list.push_back(
- display_manager->GetDisplayInfo(primary_display.id()));
- display_info_list.push_back(
- display_manager->GetDisplayInfo(secondary_display.id()));
- display_manager->OnNativeDisplaysChanged(display_info_list);
-
- EXPECT_EQ(2, Shell::GetScreen()->GetNumDisplays());
- EXPECT_EQ(secondary_display.id(),
- Shell::GetScreen()->GetPrimaryDisplay().id());
- EXPECT_EQ(primary_display.id(), ScreenAsh::GetSecondaryDisplay().id());
- EXPECT_EQ(
- primary_root,
- display_controller->GetRootWindowForDisplayId(secondary_display.id()));
- EXPECT_NE(
- primary_root,
- display_controller->GetRootWindowForDisplayId(primary_display.id()));
- EXPECT_TRUE(primary_root->Contains(launcher_window));
-
- // Deleting 2nd display and adding 2nd display with a different ID. The 2nd
- // display shouldn't become primary.
- UpdateDisplay("200x200");
- internal::DisplayInfo third_display_info(
- secondary_display.id() + 1, std::string(), false);
- third_display_info.SetBounds(secondary_display.bounds());
- ASSERT_NE(primary_display.id(), third_display_info.id());
-
- const internal::DisplayInfo& primary_display_info =
- display_manager->GetDisplayInfo(primary_display.id());
- std::vector<internal::DisplayInfo> display_info_list2;
- display_info_list2.push_back(primary_display_info);
- display_info_list2.push_back(third_display_info);
- display_manager->OnNativeDisplaysChanged(display_info_list2);
- EXPECT_EQ(2, Shell::GetScreen()->GetNumDisplays());
- EXPECT_EQ(primary_display.id(),
- Shell::GetScreen()->GetPrimaryDisplay().id());
- EXPECT_EQ(third_display_info.id(), ScreenAsh::GetSecondaryDisplay().id());
- EXPECT_EQ(
- primary_root,
- display_controller->GetRootWindowForDisplayId(primary_display.id()));
- EXPECT_NE(
- primary_root,
- display_controller->GetRootWindowForDisplayId(third_display_info.id()));
- EXPECT_TRUE(primary_root->Contains(launcher_window));
-}
-
-TEST_F(DisplayControllerTest, CursorDeviceScaleFactorSwapPrimary) {
- if (!SupportsMultipleDisplays())
- return;
-
- DisplayController* display_controller =
- Shell::GetInstance()->display_controller();
-
- UpdateDisplay("200x200,200x200*2");
- gfx::Display primary_display = Shell::GetScreen()->GetPrimaryDisplay();
- gfx::Display secondary_display = ScreenAsh::GetSecondaryDisplay();
-
- aura::Window* primary_root =
- display_controller->GetRootWindowForDisplayId(primary_display.id());
- aura::Window* secondary_root =
- display_controller->GetRootWindowForDisplayId(secondary_display.id());
- EXPECT_NE(primary_root, secondary_root);
-
- test::CursorManagerTestApi test_api(Shell::GetInstance()->cursor_manager());
-
- EXPECT_EQ(1.0f, primary_root->GetDispatcher()->AsRootWindowHostDelegate()->
- GetDeviceScaleFactor());
- primary_root->MoveCursorTo(gfx::Point(50, 50));
- EXPECT_EQ(1.0f, test_api.GetDisplay().device_scale_factor());
- EXPECT_EQ(2.0f, secondary_root->GetDispatcher()->AsRootWindowHostDelegate()->
- GetDeviceScaleFactor());
- secondary_root->MoveCursorTo(gfx::Point(50, 50));
- EXPECT_EQ(2.0f, test_api.GetDisplay().device_scale_factor());
-
- // Switch primary and secondary
- display_controller->SetPrimaryDisplay(secondary_display);
-
- // Cursor's device scale factor should be updated accroding to the swap of
- // primary and secondary.
- EXPECT_EQ(1.0f, secondary_root->GetDispatcher()->AsRootWindowHostDelegate()->
- GetDeviceScaleFactor());
- secondary_root->MoveCursorTo(gfx::Point(50, 50));
- EXPECT_EQ(1.0f, test_api.GetDisplay().device_scale_factor());
- primary_root->MoveCursorTo(gfx::Point(50, 50));
- EXPECT_EQ(2.0f, primary_root->GetDispatcher()->AsRootWindowHostDelegate()->
- GetDeviceScaleFactor());
- EXPECT_EQ(2.0f, test_api.GetDisplay().device_scale_factor());
-
- // Deleting 2nd display.
- UpdateDisplay("200x200");
- RunAllPendingInMessageLoop(); // RootWindow is deleted in a posted task.
-
- // Cursor's device scale factor should be updated even without moving cursor.
- EXPECT_EQ(1.0f, test_api.GetDisplay().device_scale_factor());
-
- primary_root->MoveCursorTo(gfx::Point(50, 50));
- EXPECT_EQ(1.0f, primary_root->GetDispatcher()->AsRootWindowHostDelegate()->
- GetDeviceScaleFactor());
- EXPECT_EQ(1.0f, test_api.GetDisplay().device_scale_factor());
-}
-
-TEST_F(DisplayControllerTest, OverscanInsets) {
- if (!SupportsMultipleDisplays())
- return;
-
- DisplayController* display_controller =
- Shell::GetInstance()->display_controller();
- TestEventHandler event_handler;
- Shell::GetInstance()->AddPreTargetHandler(&event_handler);
-
- UpdateDisplay("120x200,300x400*2");
- gfx::Display display1 = Shell::GetScreen()->GetPrimaryDisplay();
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- display_controller->SetOverscanInsets(display1.id(),
- gfx::Insets(10, 15, 20, 25));
- EXPECT_EQ("0,0 80x170", root_windows[0]->bounds().ToString());
- EXPECT_EQ("150x200", root_windows[1]->bounds().size().ToString());
- EXPECT_EQ("80,0 150x200",
- ScreenAsh::GetSecondaryDisplay().bounds().ToString());
-
- aura::test::EventGenerator generator(root_windows[0]);
- generator.MoveMouseToInHost(20, 25);
- EXPECT_EQ("5,15", event_handler.GetLocationAndReset());
-
- display_controller->SetOverscanInsets(display1.id(), gfx::Insets());
- EXPECT_EQ("0,0 120x200", root_windows[0]->bounds().ToString());
- EXPECT_EQ("120,0 150x200",
- ScreenAsh::GetSecondaryDisplay().bounds().ToString());
-
- generator.MoveMouseToInHost(30, 20);
- EXPECT_EQ("30,20", event_handler.GetLocationAndReset());
-
- // Make sure the root window transformer uses correct scale
- // factor when swapping display. Test crbug.com/253690.
- UpdateDisplay("400x300*2,600x400/o");
- root_windows = Shell::GetAllRootWindows();
- gfx::Point point;
- Shell::GetAllRootWindows()[1]->GetDispatcher()->
- GetRootTransform().TransformPoint(&point);
- EXPECT_EQ("15,10", point.ToString());
-
- display_controller->SwapPrimaryDisplay();
- point.SetPoint(0, 0);
- Shell::GetAllRootWindows()[1]->GetDispatcher()->
- GetRootTransform().TransformPoint(&point);
- EXPECT_EQ("15,10", point.ToString());
-
- Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
-}
-
-TEST_F(DisplayControllerTest, Rotate) {
- if (!SupportsMultipleDisplays())
- return;
-
- internal::DisplayManager* display_manager =
- Shell::GetInstance()->display_manager();
- TestEventHandler event_handler;
- Shell::GetInstance()->AddPreTargetHandler(&event_handler);
-
- UpdateDisplay("120x200,300x400*2");
- gfx::Display display1 = Shell::GetScreen()->GetPrimaryDisplay();
- int64 display2_id = ScreenAsh::GetSecondaryDisplay().id();
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- aura::test::EventGenerator generator1(root_windows[0]);
-
- EXPECT_EQ("120x200", root_windows[0]->bounds().size().ToString());
- EXPECT_EQ("150x200", root_windows[1]->bounds().size().ToString());
- EXPECT_EQ("120,0 150x200",
- ScreenAsh::GetSecondaryDisplay().bounds().ToString());
- generator1.MoveMouseToInHost(50, 40);
- EXPECT_EQ("50,40", event_handler.GetLocationAndReset());
- EXPECT_EQ(gfx::Display::ROTATE_0, GetStoredRotation(display1.id()));
- EXPECT_EQ(gfx::Display::ROTATE_0, GetStoredRotation(display2_id));
-
- display_manager->SetDisplayRotation(display1.id(),
- gfx::Display::ROTATE_90);
- EXPECT_EQ("200x120", root_windows[0]->bounds().size().ToString());
- EXPECT_EQ("150x200", root_windows[1]->bounds().size().ToString());
- EXPECT_EQ("200,0 150x200",
- ScreenAsh::GetSecondaryDisplay().bounds().ToString());
- generator1.MoveMouseToInHost(50, 40);
- EXPECT_EQ("40,69", event_handler.GetLocationAndReset());
- EXPECT_EQ(gfx::Display::ROTATE_90, GetStoredRotation(display1.id()));
- EXPECT_EQ(gfx::Display::ROTATE_0, GetStoredRotation(display2_id));
-
- DisplayLayout display_layout(DisplayLayout::BOTTOM, 50);
- display_manager->SetLayoutForCurrentDisplays(display_layout);
- EXPECT_EQ("50,120 150x200",
- ScreenAsh::GetSecondaryDisplay().bounds().ToString());
-
- display_manager->SetDisplayRotation(display2_id,
- gfx::Display::ROTATE_270);
- EXPECT_EQ("200x120", root_windows[0]->bounds().size().ToString());
- EXPECT_EQ("200x150", root_windows[1]->bounds().size().ToString());
- EXPECT_EQ("50,120 200x150",
- ScreenAsh::GetSecondaryDisplay().bounds().ToString());
- EXPECT_EQ(gfx::Display::ROTATE_90, GetStoredRotation(display1.id()));
- EXPECT_EQ(gfx::Display::ROTATE_270, GetStoredRotation(display2_id));
-
-#if !defined(OS_WIN)
- aura::test::EventGenerator generator2(root_windows[1]);
- generator2.MoveMouseToInHost(50, 40);
- EXPECT_EQ("179,25", event_handler.GetLocationAndReset());
- display_manager->SetDisplayRotation(display1.id(),
- gfx::Display::ROTATE_180);
-
- EXPECT_EQ("120x200", root_windows[0]->bounds().size().ToString());
- EXPECT_EQ("200x150", root_windows[1]->bounds().size().ToString());
- // Dislay must share at least 100, so the x's offset becomes 20.
- EXPECT_EQ("20,200 200x150",
- ScreenAsh::GetSecondaryDisplay().bounds().ToString());
- EXPECT_EQ(gfx::Display::ROTATE_180, GetStoredRotation(display1.id()));
- EXPECT_EQ(gfx::Display::ROTATE_270, GetStoredRotation(display2_id));
-
- generator1.MoveMouseToInHost(50, 40);
- EXPECT_EQ("69,159", event_handler.GetLocationAndReset());
-#endif
-
- Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
-}
-
-TEST_F(DisplayControllerTest, ScaleRootWindow) {
- if (!SupportsMultipleDisplays())
- return;
-
- TestEventHandler event_handler;
- Shell::GetInstance()->AddPreTargetHandler(&event_handler);
-
- UpdateDisplay("600x400*2@1.5,500x300");
-
- gfx::Display display1 = Shell::GetScreen()->GetPrimaryDisplay();
- gfx::Display::SetInternalDisplayId(display1.id());
-
- gfx::Display display2 = ScreenAsh::GetSecondaryDisplay();
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- EXPECT_EQ("0,0 450x300", display1.bounds().ToString());
- EXPECT_EQ("0,0 450x300", root_windows[0]->bounds().ToString());
- EXPECT_EQ("450,0 500x300", display2.bounds().ToString());
- EXPECT_EQ(1.5f, GetStoredUIScale(display1.id()));
- EXPECT_EQ(1.0f, GetStoredUIScale(display2.id()));
-
- aura::test::EventGenerator generator(root_windows[0]);
- generator.MoveMouseToInHost(599, 200);
- EXPECT_EQ("449,150", event_handler.GetLocationAndReset());
-
- internal::DisplayManager* display_manager =
- Shell::GetInstance()->display_manager();
- display_manager->SetDisplayUIScale(display1.id(), 1.25f);
- display1 = Shell::GetScreen()->GetPrimaryDisplay();
- display2 = ScreenAsh::GetSecondaryDisplay();
- EXPECT_EQ("0,0 375x250", display1.bounds().ToString());
- EXPECT_EQ("0,0 375x250", root_windows[0]->bounds().ToString());
- EXPECT_EQ("375,0 500x300", display2.bounds().ToString());
- EXPECT_EQ(1.25f, GetStoredUIScale(display1.id()));
- EXPECT_EQ(1.0f, GetStoredUIScale(display2.id()));
-
- Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
-}
-
-TEST_F(DisplayControllerTest, TouchScale) {
- if (!SupportsMultipleDisplays())
- return;
-
- TestEventHandler event_handler;
- Shell::GetInstance()->AddPreTargetHandler(&event_handler);
-
- UpdateDisplay("200x200*2");
- gfx::Display display = Shell::GetScreen()->GetPrimaryDisplay();
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- aura::Window* root_window = root_windows[0];
- aura::test::EventGenerator generator(root_window);
-
- generator.PressMoveAndReleaseTouchTo(50, 50);
- // Default test touches have radius_x/y = 1.0, with device scale
- // factor = 2, the scaled radius_x/y should be 0.5.
- EXPECT_EQ(0.5, event_handler.touch_radius_x());
- EXPECT_EQ(0.5, event_handler.touch_radius_y());
-
- generator.ScrollSequence(gfx::Point(0,0),
- base::TimeDelta::FromMilliseconds(100),
- 10.0, 1.0, 5, 1);
-
- // ordinal_offset is invariant to the device scale factor.
- EXPECT_EQ(event_handler.scroll_x_offset(),
- event_handler.scroll_x_offset_ordinal());
- EXPECT_EQ(event_handler.scroll_y_offset(),
- event_handler.scroll_y_offset_ordinal());
-
- Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
-}
-
-TEST_F(DisplayControllerTest, ConvertHostToRootCoords) {
- if (!SupportsMultipleDisplays())
- return;
-
- TestEventHandler event_handler;
- Shell::GetInstance()->AddPreTargetHandler(&event_handler);
-
- UpdateDisplay("600x400*2/r@1.5");
-
- gfx::Display display1 = Shell::GetScreen()->GetPrimaryDisplay();
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- EXPECT_EQ("0,0 300x450", display1.bounds().ToString());
- EXPECT_EQ("0,0 300x450", root_windows[0]->bounds().ToString());
- EXPECT_EQ(1.5f, GetStoredUIScale(display1.id()));
-
- aura::test::EventGenerator generator(root_windows[0]);
- generator.MoveMouseToInHost(0, 0);
- EXPECT_EQ("0,449", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(599, 0);
- EXPECT_EQ("0,0", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(599, 399);
- EXPECT_EQ("299,0", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(0, 399);
- EXPECT_EQ("299,449", event_handler.GetLocationAndReset());
-
- UpdateDisplay("600x400*2/u@1.5");
- display1 = Shell::GetScreen()->GetPrimaryDisplay();
- root_windows = Shell::GetAllRootWindows();
- EXPECT_EQ("0,0 450x300", display1.bounds().ToString());
- EXPECT_EQ("0,0 450x300", root_windows[0]->bounds().ToString());
- EXPECT_EQ(1.5f, GetStoredUIScale(display1.id()));
-
- generator.MoveMouseToInHost(0, 0);
- EXPECT_EQ("449,299", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(599, 0);
- EXPECT_EQ("0,299", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(599, 399);
- EXPECT_EQ("0,0", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(0, 399);
- EXPECT_EQ("449,0", event_handler.GetLocationAndReset());
-
- UpdateDisplay("600x400*2/l@1.5");
- display1 = Shell::GetScreen()->GetPrimaryDisplay();
- root_windows = Shell::GetAllRootWindows();
- EXPECT_EQ("0,0 300x450", display1.bounds().ToString());
- EXPECT_EQ("0,0 300x450", root_windows[0]->bounds().ToString());
- EXPECT_EQ(1.5f, GetStoredUIScale(display1.id()));
-
- generator.MoveMouseToInHost(0, 0);
- EXPECT_EQ("299,0", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(599, 0);
- EXPECT_EQ("299,449", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(599, 399);
- EXPECT_EQ("0,449", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(0, 399);
- EXPECT_EQ("0,0", event_handler.GetLocationAndReset());
-
- Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
-}
-
-namespace {
-
-internal::DisplayInfo CreateDisplayInfo(int64 id,
- int y,
- gfx::Display::Rotation rotation) {
- internal::DisplayInfo info(id, "", false);
- info.SetBounds(gfx::Rect(0, y, 500, 500));
- info.set_rotation(rotation);
- return info;
-}
-
-} // namespace
-
-// Make sure that the compositor based mirroring can switch
-// from/to dock mode.
-TEST_F(DisplayControllerTest, DockToSingle) {
- if (!SupportsMultipleDisplays())
- return;
-
- internal::DisplayManager* display_manager =
- Shell::GetInstance()->display_manager();
-
- const int64 internal_id = 1;
-
- const internal::DisplayInfo internal_display_info =
- CreateDisplayInfo(internal_id, 0, gfx::Display::ROTATE_0);
- const internal::DisplayInfo external_display_info =
- CreateDisplayInfo(2, 1, gfx::Display::ROTATE_90);
-
- std::vector<internal::DisplayInfo> display_info_list;
- // Extended
- display_info_list.push_back(internal_display_info);
- display_info_list.push_back(external_display_info);
- display_manager->OnNativeDisplaysChanged(display_info_list);
- const int64 internal_display_id =
- test::DisplayManagerTestApi(display_manager).
- SetFirstDisplayAsInternalDisplay();
- EXPECT_EQ(internal_id, internal_display_id);
- EXPECT_EQ(2U, display_manager->GetNumDisplays());
-
- // Dock mode.
- display_info_list.clear();
- display_info_list.push_back(external_display_info);
- display_manager->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(1U, display_manager->GetNumDisplays());
- EXPECT_FALSE(Shell::GetPrimaryRootWindow()->GetDispatcher()->
- GetRootTransform().IsIdentityOrIntegerTranslation());
-
- // Switch to single mode and make sure the transform is the one
- // for the internal display.
- display_info_list.clear();
- display_info_list.push_back(internal_display_info);
- display_manager->OnNativeDisplaysChanged(display_info_list);
- EXPECT_TRUE(Shell::GetPrimaryRootWindow()->GetDispatcher()->
- GetRootTransform().IsIdentityOrIntegerTranslation());
-}
-
-#if defined(USE_X11)
-TEST_F(DisplayControllerTest, XWidowNameForRootWindow) {
- EXPECT_EQ("aura_root_0", GetXWindowName(
- Shell::GetPrimaryRootWindow()->GetDispatcher()));
-
- // Multiple display.
- UpdateDisplay("200x200,300x300");
- aura::Window* primary, *secondary;
- GetPrimaryAndSeconary(&primary, &secondary);
- EXPECT_EQ("aura_root_0", GetXWindowName(primary->GetDispatcher()));
- EXPECT_EQ("aura_root_x", GetXWindowName(secondary->GetDispatcher()));
-
- // Swap primary.
- primary = secondary = NULL;
- Shell::GetInstance()->display_controller()->SwapPrimaryDisplay();
- GetPrimaryAndSeconary(&primary, &secondary);
- EXPECT_EQ("aura_root_0", GetXWindowName(primary->GetDispatcher()));
- EXPECT_EQ("aura_root_x", GetXWindowName(secondary->GetDispatcher()));
-
- // Switching back to single display.
- UpdateDisplay("300x400");
- EXPECT_EQ("aura_root_0", GetXWindowName(
- Shell::GetPrimaryRootWindow()->GetDispatcher()));
-}
-#endif
-
-} // namespace ash
diff --git a/chromium/ash/display/display_error_observer_chromeos.cc b/chromium/ash/display/display_error_observer_chromeos.cc
deleted file mode 100644
index 34e1bc2e5df..00000000000
--- a/chromium/ash/display/display_error_observer_chromeos.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/display_error_observer_chromeos.h"
-
-#include "ash/system/system_notifier.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/message_center/message_center.h"
-#include "ui/message_center/notification.h"
-#include "ui/message_center/notification_delegate.h"
-#include "ui/message_center/notification_list.h"
-
-using message_center::Notification;
-
-namespace ash {
-namespace internal {
-namespace {
-
-const char kDisplayErrorNotificationId[] = "chrome://settings/display/error";
-
-} // namespace
-
-DisplayErrorObserver::DisplayErrorObserver() {
-}
-
-DisplayErrorObserver::~DisplayErrorObserver() {
-}
-
-void DisplayErrorObserver::OnDisplayModeChangeFailed(
- chromeos::OutputState new_state) {
- // Always remove the notification to make sure the notification appears
- // as a popup in any situation.
- message_center::MessageCenter::Get()->RemoveNotification(
- kDisplayErrorNotificationId, false /* by_user */);
-
- int message_id = (new_state == chromeos::STATE_DUAL_MIRROR) ?
- IDS_ASH_DISPLAY_FAILURE_ON_MIRRORING :
- IDS_ASH_DISPLAY_FAILURE_ON_NON_MIRRORING;
-
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- scoped_ptr<Notification> notification(new Notification(
- message_center::NOTIFICATION_TYPE_SIMPLE,
- kDisplayErrorNotificationId,
- l10n_util::GetStringUTF16(message_id),
- base::string16(), // message
- bundle.GetImageNamed(IDR_AURA_UBER_TRAY_DISPLAY),
- base::string16(), // display_source
- message_center::NotifierId(
- message_center::NotifierId::SYSTEM_COMPONENT,
- system_notifier::kNotifierDisplayError),
- message_center::RichNotificationData(),
- NULL));
- message_center::MessageCenter::Get()->AddNotification(notification.Pass());
-}
-
-string16 DisplayErrorObserver::GetTitleOfDisplayErrorNotificationForTest() {
- message_center::NotificationList::Notifications notifications =
- message_center::MessageCenter::Get()->GetVisibleNotifications();
- for (message_center::NotificationList::Notifications::const_iterator iter =
- notifications.begin(); iter != notifications.end(); ++iter) {
- if ((*iter)->id() == kDisplayErrorNotificationId)
- return (*iter)->title();
- }
-
- return base::string16();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/display_error_observer_chromeos.h b/chromium/ash/display/display_error_observer_chromeos.h
deleted file mode 100644
index b8bb1c1ea3b..00000000000
--- a/chromium/ash/display/display_error_observer_chromeos.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_DISPLAY_ERROR_OBSERVER_CHROMEOS_H_
-#define ASH_DISPLAY_DISPLAY_ERROR_OBSERVER_CHROMEOS_H_
-
-#include "ash/ash_export.h"
-#include "base/compiler_specific.h"
-#include "base/strings/string16.h"
-#include "chromeos/display/output_configurator.h"
-
-namespace ash {
-namespace internal {
-
-// The class to observe the output failures and shows the error dialog when
-// necessary.
-class ASH_EXPORT DisplayErrorObserver
- : public chromeos::OutputConfigurator::Observer {
- public:
- DisplayErrorObserver();
- virtual ~DisplayErrorObserver();
-
- // chromeos::OutputConfigurator::Observer overrides:
- virtual void OnDisplayModeChangeFailed(
- chromeos::OutputState failed_new_state) OVERRIDE;
-
- private:
- friend class DisplayErrorObserverTest;
-
- base::string16 GetTitleOfDisplayErrorNotificationForTest();
-
- DISALLOW_COPY_AND_ASSIGN(DisplayErrorObserver);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DISPLAY_DISPLAY_ERROR_OBSERVER_CHROMEOS_H_
diff --git a/chromium/ash/display/display_error_observer_chromeos_unittest.cc b/chromium/ash/display/display_error_observer_chromeos_unittest.cc
deleted file mode 100644
index 7cd0503b287..00000000000
--- a/chromium/ash/display/display_error_observer_chromeos_unittest.cc
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/display_error_observer_chromeos.h"
-
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "grit/ash_strings.h"
-#include "ui/aura/window.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-class DisplayErrorObserverTest : public test::AshTestBase {
- protected:
- DisplayErrorObserverTest() {
- }
-
- virtual ~DisplayErrorObserverTest() {
- }
-
- virtual void SetUp() OVERRIDE {
- test::AshTestBase::SetUp();
- observer_.reset(new DisplayErrorObserver());
- }
-
- protected:
- DisplayErrorObserver* observer() { return observer_.get(); }
-
- base::string16 GetMessageContents() {
- return observer_->GetTitleOfDisplayErrorNotificationForTest();
- }
-
- private:
- scoped_ptr<DisplayErrorObserver> observer_;
-
- DISALLOW_COPY_AND_ASSIGN(DisplayErrorObserverTest);
-};
-
-TEST_F(DisplayErrorObserverTest, Normal) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("200x200,300x300");
- observer()->OnDisplayModeChangeFailed(chromeos::STATE_DUAL_MIRROR);
- EXPECT_EQ(l10n_util::GetStringUTF16(IDS_ASH_DISPLAY_FAILURE_ON_MIRRORING),
- GetMessageContents());
-}
-
-TEST_F(DisplayErrorObserverTest, CallTwice) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("200x200,300x300");
- observer()->OnDisplayModeChangeFailed(chromeos::STATE_DUAL_MIRROR);
- base::string16 message = GetMessageContents();
- EXPECT_FALSE(message.empty());
-
- observer()->OnDisplayModeChangeFailed(chromeos::STATE_DUAL_MIRROR);
- base::string16 message2 = GetMessageContents();
- EXPECT_FALSE(message2.empty());
- EXPECT_EQ(message, message2);
-}
-
-TEST_F(DisplayErrorObserverTest, CallWithDifferentState) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("200x200,300x300");
- observer()->OnDisplayModeChangeFailed(chromeos::STATE_DUAL_MIRROR);
- EXPECT_EQ(l10n_util::GetStringUTF16(IDS_ASH_DISPLAY_FAILURE_ON_MIRRORING),
- GetMessageContents());
-
- observer()->OnDisplayModeChangeFailed(chromeos::STATE_DUAL_EXTENDED);
- EXPECT_EQ(l10n_util::GetStringUTF16(IDS_ASH_DISPLAY_FAILURE_ON_NON_MIRRORING),
- GetMessageContents());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/display_info.cc b/chromium/ash/display/display_info.cc
deleted file mode 100644
index 01c604f7a62..00000000000
--- a/chromium/ash/display/display_info.cc
+++ /dev/null
@@ -1,264 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <stdio.h>
-#include <string>
-#include <vector>
-
-#include "ash/display/display_info.h"
-#include "base/logging.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/string_util.h"
-#include "base/strings/stringprintf.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/size_conversions.h"
-#include "ui/gfx/size_f.h"
-
-#if defined(OS_WIN)
-#include "ui/aura/window_tree_host.h"
-#endif
-
-namespace ash {
-namespace internal {
-
-Resolution::Resolution(const gfx::Size& size, bool interlaced)
- : size(size),
- interlaced(interlaced) {
-}
-
-// satic
-DisplayInfo DisplayInfo::CreateFromSpec(const std::string& spec) {
- return CreateFromSpecWithID(spec, gfx::Display::kInvalidDisplayID);
-}
-
-// static
-DisplayInfo DisplayInfo::CreateFromSpecWithID(const std::string& spec,
- int64 id) {
- // Default bounds for a display.
- const int kDefaultHostWindowX = 200;
- const int kDefaultHostWindowY = 200;
- const int kDefaultHostWindowWidth = 1366;
- const int kDefaultHostWindowHeight = 768;
-
- // Use larger than max int to catch overflow early.
- static int64 synthesized_display_id = 2200000000LL;
-
-#if defined(OS_WIN)
- gfx::Rect bounds_in_native(aura::RootWindowHost::GetNativeScreenSize());
-#else
- gfx::Rect bounds_in_native(kDefaultHostWindowX, kDefaultHostWindowY,
- kDefaultHostWindowWidth, kDefaultHostWindowHeight);
-#endif
- std::string main_spec = spec;
-
- float ui_scale = 1.0f;
- std::vector<std::string> parts;
- if (Tokenize(main_spec, "@", &parts) == 2) {
- double scale_in_double = 0;
- if (base::StringToDouble(parts[1], &scale_in_double))
- ui_scale = scale_in_double;
- main_spec = parts[0];
- }
-
- size_t count = Tokenize(main_spec, "/", &parts);
- gfx::Display::Rotation rotation(gfx::Display::ROTATE_0);
- bool has_overscan = false;
- if (count) {
- main_spec = parts[0];
- if (count >= 2) {
- std::string options = parts[1];
- for (size_t i = 0; i < options.size(); ++i) {
- char c = options[i];
- switch (c) {
- case 'o':
- has_overscan = true;
- break;
- case 'r': // rotate 90 degrees to 'right'.
- rotation = gfx::Display::ROTATE_90;
- break;
- case 'u': // 180 degrees, 'u'pside-down.
- rotation = gfx::Display::ROTATE_180;
- break;
- case 'l': // rotate 90 degrees to 'left'.
- rotation = gfx::Display::ROTATE_270;
- break;
- }
- }
- }
- }
-
- int x = 0, y = 0, width, height;
- float device_scale_factor = 1.0f;
- if (sscanf(main_spec.c_str(), "%dx%d*%f",
- &width, &height, &device_scale_factor) >= 2 ||
- sscanf(main_spec.c_str(), "%d+%d-%dx%d*%f", &x, &y, &width, &height,
- &device_scale_factor) >= 4) {
- bounds_in_native.SetRect(x, y, width, height);
- }
-
- std::vector<Resolution> resolutions;
- if (Tokenize(main_spec, "#", &parts) == 2) {
- main_spec = parts[0];
- std::string resolution_list = parts[1];
- count = Tokenize(resolution_list, "|", &parts);
- for (size_t i = 0; i < count; ++i) {
- std::string resolution = parts[i];
- int width, height;
- if (sscanf(resolution.c_str(), "%dx%d", &width, &height) == 2)
- resolutions.push_back(Resolution(gfx::Size(width, height), false));
- }
- }
-
- if (id == gfx::Display::kInvalidDisplayID)
- id = synthesized_display_id++;
- DisplayInfo display_info(
- id, base::StringPrintf("Display-%d", static_cast<int>(id)), has_overscan);
- display_info.set_device_scale_factor(device_scale_factor);
- display_info.set_rotation(rotation);
- display_info.set_configured_ui_scale(ui_scale);
- display_info.SetBounds(bounds_in_native);
- display_info.set_resolutions(resolutions);
-
- // To test the overscan, it creates the default 5% overscan.
- if (has_overscan) {
- int width = bounds_in_native.width() / device_scale_factor / 40;
- int height = bounds_in_native.height() / device_scale_factor / 40;
- display_info.SetOverscanInsets(gfx::Insets(height, width, height, width));
- display_info.UpdateDisplaySize();
- }
-
- DVLOG(1) << "DisplayInfoFromSpec info=" << display_info.ToString()
- << ", spec=" << spec;
- return display_info;
-}
-
-DisplayInfo::DisplayInfo()
- : id_(gfx::Display::kInvalidDisplayID),
- has_overscan_(false),
- rotation_(gfx::Display::ROTATE_0),
- touch_support_(gfx::Display::TOUCH_SUPPORT_UNKNOWN),
- device_scale_factor_(1.0f),
- overscan_insets_in_dip_(0, 0, 0, 0),
- configured_ui_scale_(1.0f),
- native_(false) {
-}
-
-DisplayInfo::DisplayInfo(int64 id,
- const std::string& name,
- bool has_overscan)
- : id_(id),
- name_(name),
- has_overscan_(has_overscan),
- rotation_(gfx::Display::ROTATE_0),
- touch_support_(gfx::Display::TOUCH_SUPPORT_UNKNOWN),
- device_scale_factor_(1.0f),
- overscan_insets_in_dip_(0, 0, 0, 0),
- configured_ui_scale_(1.0f),
- native_(false) {
-}
-
-DisplayInfo::~DisplayInfo() {
-}
-
-void DisplayInfo::Copy(const DisplayInfo& native_info) {
- DCHECK(id_ == native_info.id_);
- name_ = native_info.name_;
- has_overscan_ = native_info.has_overscan_;
-
- DCHECK(!native_info.bounds_in_native_.IsEmpty());
- bounds_in_native_ = native_info.bounds_in_native_;
- size_in_pixel_ = native_info.size_in_pixel_;
- device_scale_factor_ = native_info.device_scale_factor_;
- resolutions_ = native_info.resolutions_;
- touch_support_ = native_info.touch_support_;
-
- // Copy overscan_insets_in_dip_ if it's not empty. This is for test
- // cases which use "/o" annotation which sets the overscan inset
- // to native, and that overscan has to be propagated. This does not
- // happen on the real environment.
- if (!native_info.overscan_insets_in_dip_.empty())
- overscan_insets_in_dip_ = native_info.overscan_insets_in_dip_;
-
- // Rotation_ and ui_scale_ are given by preference, or unit
- // tests. Don't copy if this native_info came from
- // DisplayChangeObserver.
- if (!native_info.native()) {
- rotation_ = native_info.rotation_;
- configured_ui_scale_ = native_info.configured_ui_scale_;
- }
- // Don't copy insets as it may be given by preference. |rotation_|
- // is treated as a native so that it can be specified in
- // |CreateFromSpec|.
-}
-
-void DisplayInfo::SetBounds(const gfx::Rect& new_bounds_in_native) {
- bounds_in_native_ = new_bounds_in_native;
- size_in_pixel_ = new_bounds_in_native.size();
- UpdateDisplaySize();
-}
-
-float DisplayInfo::GetEffectiveUIScale() const {
- if (device_scale_factor_ == 2.0f && configured_ui_scale_ == 2.0f)
- return 1.0f;
- return configured_ui_scale_;
-}
-
-void DisplayInfo::UpdateDisplaySize() {
- size_in_pixel_ = bounds_in_native_.size();
- if (!overscan_insets_in_dip_.empty()) {
- gfx::Insets insets_in_pixel =
- overscan_insets_in_dip_.Scale(device_scale_factor_);
- size_in_pixel_.Enlarge(-insets_in_pixel.width(), -insets_in_pixel.height());
- } else {
- overscan_insets_in_dip_.Set(0, 0, 0, 0);
- }
-
- if (rotation_ == gfx::Display::ROTATE_90 ||
- rotation_ == gfx::Display::ROTATE_270)
- size_in_pixel_.SetSize(size_in_pixel_.height(), size_in_pixel_.width());
- gfx::SizeF size_f(size_in_pixel_);
- size_f.Scale(GetEffectiveUIScale());
- size_in_pixel_ = gfx::ToFlooredSize(size_f);
-}
-
-void DisplayInfo::SetOverscanInsets(const gfx::Insets& insets_in_dip) {
- overscan_insets_in_dip_ = insets_in_dip;
-}
-
-gfx::Insets DisplayInfo::GetOverscanInsetsInPixel() const {
- return overscan_insets_in_dip_.Scale(device_scale_factor_);
-}
-
-std::string DisplayInfo::ToString() const {
- int rotation_degree = static_cast<int>(rotation_) * 90;
- return base::StringPrintf(
- "DisplayInfo[%lld] native bounds=%s, size=%s, scale=%f, "
- "overscan=%s, rotation=%d, ui-scale=%f, touchscreen=%s",
- static_cast<long long int>(id_),
- bounds_in_native_.ToString().c_str(),
- size_in_pixel_.ToString().c_str(),
- device_scale_factor_,
- overscan_insets_in_dip_.ToString().c_str(),
- rotation_degree,
- configured_ui_scale_,
- touch_support_ == gfx::Display::TOUCH_SUPPORT_AVAILABLE ? "yes" :
- touch_support_ == gfx::Display::TOUCH_SUPPORT_UNAVAILABLE ? "no" :
- "unknown");
-}
-
-std::string DisplayInfo::ToFullString() const {
- std::string resolutions_str;
- std::vector<Resolution>::const_iterator iter = resolutions_.begin();
- for (; iter != resolutions_.end(); ++iter) {
- if (!resolutions_str.empty())
- resolutions_str += ",";
- resolutions_str += iter->size.ToString();
- if (iter->interlaced)
- resolutions_str += "(i)";
- }
- return ToString() + ", resolutions=" + resolutions_str;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/display_info.h b/chromium/ash/display/display_info.h
deleted file mode 100644
index 69b83dce53d..00000000000
--- a/chromium/ash/display/display_info.h
+++ /dev/null
@@ -1,198 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_DISPLAY_INFO_H_
-#define ASH_DISPLAY_DISPLAY_INFO_H_
-
-#include <string>
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/insets.h"
-#include "ui/gfx/rect.h"
-
-namespace ash {
-namespace internal {
-
-// A struct that represents the display's resolution and
-// interlaced info.
-struct ASH_EXPORT Resolution {
- Resolution(const gfx::Size& size, bool interlaced);
-
- gfx::Size size;
- bool interlaced;
-};
-
-// DisplayInfo contains metadata for each display. This is used to
-// create |gfx::Display| as well as to maintain extra infomation
-// to manage displays in ash environment.
-// This class is intentionally made copiable.
-class ASH_EXPORT DisplayInfo {
- public:
- // Creates a DisplayInfo from string spec. 100+200-1440x800 creates display
- // whose size is 1440x800 at the location (100, 200) in host coordinates.
- // The format is
- //
- // [origin-]widthxheight[*device_scale_factor][#resolutions list]
- // [/<properties>][@ui-scale]
- //
- // where [] are optional:
- // - |origin| is given in x+y- format.
- // - |device_scale_factor| is either 2 or 1 (or empty).
- // - properties can combination of 'o', which adds default overscan insets
- // (5%), and one rotation property where 'r' is 90 degree clock-wise
- // (to the 'r'ight) 'u' is 180 degrees ('u'pside-down) and 'l' is
- // 270 degrees (to the 'l'eft).
- // - ui-scale is floating value, e.g. @1.5 or @1.25.
- // - |resolution list| is the list of size that is given in
- // |width x height| separated by '|'.
- //
- // A couple of examples:
- // "100x100"
- // 100x100 window at 0,0 origin. 1x device scale factor. no overscan.
- // no rotation. 1.0 ui scale.
- // "5+5-300x200*2"
- // 300x200 window at 5,5 origin. 2x device scale factor.
- // no overscan, no rotation. 1.0 ui scale.
- // "300x200/ol"
- // 300x200 window at 0,0 origin. 1x device scale factor.
- // with 5% overscan. rotated to left (90 degree counter clockwise).
- // 1.0 ui scale.
- // "10+20-300x200/u@1.5"
- // 300x200 window at 10,20 origin. 1x device scale factor.
- // no overscan. flipped upside-down (180 degree) and 1.5 ui scale.
- // "200x100#300x200|200x100|100x100"
- // 200x100 window at 0,0 origin, with 3 possible resolutions,
- // 300x200, 200x100 and 100x100.
- static DisplayInfo CreateFromSpec(const std::string& spec);
-
- // Creates a DisplayInfo from string spec using given |id|.
- static DisplayInfo CreateFromSpecWithID(const std::string& spec,
- int64 id);
-
- DisplayInfo();
- DisplayInfo(int64 id, const std::string& name, bool has_overscan);
- ~DisplayInfo();
-
- int64 id() const { return id_; }
-
- // The name of the display.
- const std::string& name() const { return name_; }
-
- // True if the display EDID has the overscan flag. This does not create the
- // actual overscan automatically, but used in the message.
- bool has_overscan() const { return has_overscan_; }
-
- void set_rotation(gfx::Display::Rotation rotation) { rotation_ = rotation; }
- gfx::Display::Rotation rotation() const { return rotation_; }
-
- void set_touch_support(gfx::Display::TouchSupport support) {
- touch_support_ = support;
- }
- gfx::Display::TouchSupport touch_support() const { return touch_support_; }
-
- // Gets/Sets the device scale factor of the display.
- float device_scale_factor() const { return device_scale_factor_; }
- void set_device_scale_factor(float scale) { device_scale_factor_ = scale; }
-
- // The native bounds for the display. The size of this can be
- // different from the |size_in_pixel| when overscan insets are set
- // and/or |configured_ui_scale_| is set.
- const gfx::Rect bounds_in_native() const {
- return bounds_in_native_;
- }
-
- // The size for the display in pixels.
- const gfx::Size& size_in_pixel() const { return size_in_pixel_; }
-
- // The overscan insets for the display in DIP.
- const gfx::Insets& overscan_insets_in_dip() const {
- return overscan_insets_in_dip_;
- }
-
- // Sets/gets configured ui scale. This can be different from the ui
- // scale actually used when the scale is 2.0 and DSF is 2.0.
- // (the effective ui scale is 1.0 in this case).
- float configured_ui_scale() const { return configured_ui_scale_; }
- void set_configured_ui_scale(float scale) { configured_ui_scale_ = scale; }
-
- // Returns the ui scale used for the device scale factor. This
- // return 1.0f if the ui scale and dsf are both set to 2.0.
- float GetEffectiveUIScale() const;
-
- // Copy the display info except for fields that can be modified by a
- // user (|rotation_| and |configured_ui_scale_|). |rotation_| and
- // |configured_ui_scale_| are copied when the |another_info| isn't native one.
- void Copy(const DisplayInfo& another_info);
-
- // Update the |bounds_in_native_| and |size_in_pixel_| using
- // given |bounds_in_native|.
- void SetBounds(const gfx::Rect& bounds_in_native);
-
- // Update the |bounds_in_native| according to the current overscan
- // and rotation settings.
- void UpdateDisplaySize();
-
- // Sets/Clears the overscan insets.
- void SetOverscanInsets(const gfx::Insets& insets_in_dip);
- gfx::Insets GetOverscanInsetsInPixel() const;
-
- void set_native(bool native) { native_ = native; }
- bool native() const { return native_; }
-
- const std::vector<Resolution>& resolutions() const {
- return resolutions_;
- }
- void set_resolutions(std::vector<Resolution>& resolution) {
- resolutions_.swap(resolution);
- }
-
- // Returns a string representation of the DisplayInfo
- // excluding resolutions.
- std::string ToString() const;
-
- // Returns a string representation of the DisplayInfo
- // including resolutions.
- std::string ToFullString() const;
-
- private:
- int64 id_;
- std::string name_;
- bool has_overscan_;
- gfx::Display::Rotation rotation_;
- gfx::Display::TouchSupport touch_support_;
-
- // This specifies the device's pixel density. (For example, a
- // display whose DPI is higher than the threshold is considered to have
- // device_scale_factor = 2.0 on Chrome OS). This is used by the
- // grapics layer to choose and draw appropriate images and scale
- // layers properly.
- float device_scale_factor_;
- gfx::Rect bounds_in_native_;
-
- // The size of the display in use. The size can be different from the size
- // of |bounds_in_native_| if the display has overscan insets and/or rotation.
- gfx::Size size_in_pixel_;
- gfx::Insets overscan_insets_in_dip_;
-
- // The pixel scale of the display. This is used to simply expand (or
- // shrink) the desktop over the native display resolution (useful in
- // HighDPI display). Note that this should not be confused with the
- // device scale factor, which specifies the pixel density of the
- // display. The actuall scale value to be used depends on the device
- // scale factor. See |GetEffectiveScaleFactor()|.
- float configured_ui_scale_;
-
- // True if this comes from native platform (DisplayChangeObserver).
- bool native_;
-
- // The list of resolutions supported by this display.
- std::vector<Resolution> resolutions_;
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DISPLAY_DISPLAY_INFO_H_
diff --git a/chromium/ash/display/display_info_unittest.cc b/chromium/ash/display/display_info_unittest.cc
deleted file mode 100644
index 9faa0aa9863..00000000000
--- a/chromium/ash/display/display_info_unittest.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/display_info.h"
-
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace ash {
-namespace internal {
-
-typedef testing::Test DisplayInfoTest;
-
-TEST_F(DisplayInfoTest, CreateFromSpec) {
- DisplayInfo info = DisplayInfo::CreateFromSpecWithID("200x100", 10);
- EXPECT_EQ(10, info.id());
- EXPECT_EQ("0,0 200x100", info.bounds_in_native().ToString());
- EXPECT_EQ("200x100", info.size_in_pixel().ToString());
- EXPECT_EQ(gfx::Display::ROTATE_0, info.rotation());
- EXPECT_EQ("0,0,0,0", info.overscan_insets_in_dip().ToString());
- EXPECT_EQ(1.0f, info.configured_ui_scale());
-
- info = DisplayInfo::CreateFromSpecWithID("10+20-300x400*2/o", 10);
- EXPECT_EQ("10,20 300x400", info.bounds_in_native().ToString());
- EXPECT_EQ("288x380", info.size_in_pixel().ToString());
- EXPECT_EQ(gfx::Display::ROTATE_0, info.rotation());
- EXPECT_EQ("5,3,5,3", info.overscan_insets_in_dip().ToString());
-
- info = DisplayInfo::CreateFromSpecWithID("10+20-300x400*2/ob", 10);
- EXPECT_EQ("10,20 300x400", info.bounds_in_native().ToString());
- EXPECT_EQ("288x380", info.size_in_pixel().ToString());
- EXPECT_EQ(gfx::Display::ROTATE_0, info.rotation());
- EXPECT_EQ("5,3,5,3", info.overscan_insets_in_dip().ToString());
-
- info = DisplayInfo::CreateFromSpecWithID("10+20-300x400*2/or", 10);
- EXPECT_EQ("10,20 300x400", info.bounds_in_native().ToString());
- EXPECT_EQ("380x288", info.size_in_pixel().ToString());
- EXPECT_EQ(gfx::Display::ROTATE_90, info.rotation());
- // TODO(oshima): This should be rotated too. Fix this.
- EXPECT_EQ("5,3,5,3", info.overscan_insets_in_dip().ToString());
-
- info = DisplayInfo::CreateFromSpecWithID("10+20-300x400*2/l@1.5", 10);
- EXPECT_EQ("10,20 300x400", info.bounds_in_native().ToString());
- EXPECT_EQ(gfx::Display::ROTATE_270, info.rotation());
- EXPECT_EQ(1.5f, info.configured_ui_scale());
-
- info = DisplayInfo::CreateFromSpecWithID(
- "200x200#300x200|200x200|100x100", 10);
- EXPECT_EQ("0,0 200x200", info.bounds_in_native().ToString());
- EXPECT_EQ(3u, info.resolutions().size());
- EXPECT_EQ("300x200", info.resolutions()[0].size.ToString());
- EXPECT_EQ("200x200", info.resolutions()[1].size.ToString());
- EXPECT_EQ("100x100", info.resolutions()[2].size.ToString());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/display_layout.cc b/chromium/ash/display/display_layout.cc
deleted file mode 100644
index a733e762a82..00000000000
--- a/chromium/ash/display/display_layout.cc
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/display_layout.h"
-
-#include "ash/display/display_pref_util.h"
-#include "base/json/json_value_converter.h"
-#include "base/logging.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/string_piece.h"
-#include "base/strings/stringprintf.h"
-#include "base/values.h"
-#include "ui/gfx/display.h"
-
-namespace ash {
-namespace {
-
-// The maximum value for 'offset' in DisplayLayout in case of outliers. Need
-// to change this value in case to support even larger displays.
-const int kMaxValidOffset = 10000;
-
-// Persistent key names
-const char kPositionKey[] = "position";
-const char kOffsetKey[] = "offset";
-const char kMirroredKey[] = "mirrored";
-const char kPrimaryIdKey[] = "primary-id";
-
-typedef std::map<DisplayLayout::Position, std::string> PositionToStringMap;
-
-const PositionToStringMap* GetPositionToStringMap() {
- static const PositionToStringMap* map = CreateToStringMap(
- DisplayLayout::TOP, "top",
- DisplayLayout::BOTTOM, "bottom",
- DisplayLayout::RIGHT, "right",
- DisplayLayout::LEFT, "left");
- return map;
-}
-
-bool GetPositionFromString(const base::StringPiece& position,
- DisplayLayout::Position* field) {
- if (ReverseFind(GetPositionToStringMap(), position, field))
- return true;
- LOG(ERROR) << "Invalid position value:" << position;
- return false;
-}
-
-std::string GetStringFromPosition(DisplayLayout::Position position) {
- const PositionToStringMap* map = GetPositionToStringMap();
- PositionToStringMap::const_iterator iter = map->find(position);
- return iter != map->end() ? iter->second : std::string("unknown");
-}
-
-bool GetDisplayIdFromString(const base::StringPiece& position, int64* field) {
- return base::StringToInt64(position, field);
-}
-
-} // namespace
-
-////////////////////////////////////////////////////////////////////////////////
-// DisplayLayout
-
-// static
-DisplayLayout DisplayLayout::FromInts(int position, int offsets) {
- return DisplayLayout(static_cast<Position>(position), offsets);
-}
-
-DisplayLayout::DisplayLayout()
- : position(RIGHT),
- offset(0),
- mirrored(false),
- primary_id(gfx::Display::kInvalidDisplayID) {
-}
-
-DisplayLayout::DisplayLayout(DisplayLayout::Position position, int offset)
- : position(position),
- offset(offset),
- mirrored(false),
- primary_id(gfx::Display::kInvalidDisplayID) {
- DCHECK_LE(TOP, position);
- DCHECK_GE(LEFT, position);
-
- // Set the default value to |position| in case position is invalid. DCHECKs
- // above doesn't stop in Release builds.
- if (TOP > position || LEFT < position)
- this->position = RIGHT;
-
- DCHECK_GE(kMaxValidOffset, abs(offset));
-}
-
-DisplayLayout DisplayLayout::Invert() const {
- Position inverted_position = RIGHT;
- switch (position) {
- case TOP:
- inverted_position = BOTTOM;
- break;
- case BOTTOM:
- inverted_position = TOP;
- break;
- case RIGHT:
- inverted_position = LEFT;
- break;
- case LEFT:
- inverted_position = RIGHT;
- break;
- }
- DisplayLayout ret = DisplayLayout(inverted_position, -offset);
- ret.primary_id = primary_id;
- return ret;
-}
-
-// static
-bool DisplayLayout::ConvertFromValue(const base::Value& value,
- DisplayLayout* layout) {
- base::JSONValueConverter<DisplayLayout> converter;
- return converter.Convert(value, layout);
-}
-
-// static
-bool DisplayLayout::ConvertToValue(const DisplayLayout& layout,
- base::Value* value) {
- base::DictionaryValue* dict_value = NULL;
- if (!value->GetAsDictionary(&dict_value) || dict_value == NULL)
- return false;
-
- const std::string position_str = GetStringFromPosition(layout.position);
- dict_value->SetString(kPositionKey, position_str);
- dict_value->SetInteger(kOffsetKey, layout.offset);
- dict_value->SetBoolean(kMirroredKey, layout.mirrored);
- dict_value->SetString(kPrimaryIdKey, base::Int64ToString(layout.primary_id));
- return true;
-}
-
-std::string DisplayLayout::ToString() const {
- const std::string position_str = GetStringFromPosition(position);
- return base::StringPrintf(
- "%s, %d%s",
- position_str.c_str(), offset, mirrored ? ", mirrored" : "");
-}
-
-// static
-void DisplayLayout::RegisterJSONConverter(
- base::JSONValueConverter<DisplayLayout>* converter) {
- converter->RegisterCustomField<Position>(
- kPositionKey, &DisplayLayout::position, &GetPositionFromString);
- converter->RegisterIntField(kOffsetKey, &DisplayLayout::offset);
- converter->RegisterBoolField(kMirroredKey, &DisplayLayout::mirrored);
- converter->RegisterCustomField<int64>(
- kPrimaryIdKey, &DisplayLayout::primary_id, &GetDisplayIdFromString);
-}
-
-} // namespace ash
diff --git a/chromium/ash/display/display_layout.h b/chromium/ash/display/display_layout.h
deleted file mode 100644
index dc322087c2f..00000000000
--- a/chromium/ash/display/display_layout.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_DISPLAY_LAYOUT_H_
-#define ASH_DISPLAY_DISPLAY_LAYOUT_H_
-
-#include <map>
-#include <string>
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-
-namespace base {
-class Value;
-template <typename T> class JSONValueConverter;
-}
-
-namespace ash {
-
-typedef std::pair<int64, int64> DisplayIdPair;
-
-struct ASH_EXPORT DisplayLayout {
- // Layout options where the secondary display should be positioned.
- enum Position {
- TOP,
- RIGHT,
- BOTTOM,
- LEFT
- };
-
- // Factory method to create DisplayLayout from ints. The |mirrored| is
- // set to false and |primary_id| is set to gfx::Display::kInvalidDisplayId.
- // Used for persistence and webui.
- static DisplayLayout FromInts(int position, int offsets);
-
- DisplayLayout();
- DisplayLayout(Position position, int offset);
-
- // Returns an inverted display layout.
- DisplayLayout Invert() const WARN_UNUSED_RESULT;
-
- // Converter functions to/from base::Value.
- static bool ConvertFromValue(const base::Value& value, DisplayLayout* layout);
- static bool ConvertToValue(const DisplayLayout& layout, base::Value* value);
-
- // This method is used by base::JSONValueConverter, you don't need to call
- // this directly. Instead consider using converter functions above.
- static void RegisterJSONConverter(
- base::JSONValueConverter<DisplayLayout>* converter);
-
- Position position;
-
- // The offset of the position of the secondary display. The offset is
- // based on the top/left edge of the primary display.
- int offset;
-
- // True if displays are mirrored.
- bool mirrored;
-
- // The id of the display used as a primary display.
- int64 primary_id;
-
- // Returns string representation of the layout for debugging/testing.
- std::string ToString() const;
-};
-
-} // namespace ash
-
-#endif
diff --git a/chromium/ash/display/display_layout_store.cc b/chromium/ash/display/display_layout_store.cc
deleted file mode 100644
index 63b1d60b2c8..00000000000
--- a/chromium/ash/display/display_layout_store.cc
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <stdio.h>
-
-#include "ash/ash_switches.h"
-#include "ash/display/display_layout_store.h"
-#include "base/command_line.h"
-#include "base/logging.h"
-#include "ui/gfx/display.h"
-
-namespace ash {
-namespace internal {
-
-DisplayLayoutStore::DisplayLayoutStore() {
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kAshSecondaryDisplayLayout)) {
- std::string value = command_line->GetSwitchValueASCII(
- switches::kAshSecondaryDisplayLayout);
- char layout;
- int offset = 0;
- if (sscanf(value.c_str(), "%c,%d", &layout, &offset) == 2) {
- if (layout == 't')
- default_display_layout_.position = DisplayLayout::TOP;
- else if (layout == 'b')
- default_display_layout_.position = DisplayLayout::BOTTOM;
- else if (layout == 'r')
- default_display_layout_.position = DisplayLayout::RIGHT;
- else if (layout == 'l')
- default_display_layout_.position = DisplayLayout::LEFT;
- default_display_layout_.offset = offset;
- }
- }
-}
-
-DisplayLayoutStore::~DisplayLayoutStore() {
-}
-
-void DisplayLayoutStore::SetDefaultDisplayLayout(const DisplayLayout& layout) {
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (!command_line->HasSwitch(switches::kAshSecondaryDisplayLayout))
- default_display_layout_ = layout;
-}
-
-void DisplayLayoutStore::RegisterLayoutForDisplayIdPair(
- int64 id1,
- int64 id2,
- const DisplayLayout& layout) {
- paired_layouts_[std::make_pair(id1, id2)] = layout;
-}
-
-DisplayLayout DisplayLayoutStore::GetRegisteredDisplayLayout(
- const DisplayIdPair& pair) {
- std::map<DisplayIdPair, DisplayLayout>::const_iterator iter =
- paired_layouts_.find(pair);
- return
- iter != paired_layouts_.end() ? iter->second : CreateDisplayLayout(pair);
-}
-
-DisplayLayout DisplayLayoutStore::ComputeDisplayLayoutForDisplayIdPair(
- const DisplayIdPair& pair) {
- DisplayLayout layout = GetRegisteredDisplayLayout(pair);
- DCHECK_NE(layout.primary_id, gfx::Display::kInvalidDisplayID);
- // Invert if the primary was swapped. If mirrored, first is always
- // primary.
- return (layout.primary_id == gfx::Display::kInvalidDisplayID ||
- pair.first == layout.primary_id) ? layout : layout.Invert();
-}
-
-void DisplayLayoutStore::UpdateMirrorStatus(const DisplayIdPair& pair,
- bool mirrored) {
- if (paired_layouts_.find(pair) == paired_layouts_.end())
- CreateDisplayLayout(pair);
- paired_layouts_[pair].mirrored = mirrored;
-}
-
-void DisplayLayoutStore::UpdatePrimaryDisplayId(const DisplayIdPair& pair,
- int64 display_id) {
- if (paired_layouts_.find(pair) == paired_layouts_.end())
- CreateDisplayLayout(pair);
- paired_layouts_[pair].primary_id = display_id;
-}
-
-DisplayLayout DisplayLayoutStore::CreateDisplayLayout(
- const DisplayIdPair& pair) {
- DisplayLayout layout = default_display_layout_;
- layout.primary_id = pair.first;
- paired_layouts_[pair] = layout;
- return layout;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/display_layout_store.h b/chromium/ash/display/display_layout_store.h
deleted file mode 100644
index 67c3c2e523c..00000000000
--- a/chromium/ash/display/display_layout_store.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_DISPLAY_LAYOUT_STORE_H_
-#define ASH_DISPLAY_DISPLAY_LAYOUT_STORE_H_
-
-#include <map>
-
-#include "ash/ash_export.h"
-#include "ash/display/display_layout.h"
-
-namespace ash {
-namespace internal {
-
-class ASH_EXPORT DisplayLayoutStore {
- public:
- DisplayLayoutStore();
- ~DisplayLayoutStore();
-
- const DisplayLayout& default_display_layout() const {
- return default_display_layout_;
- }
- void SetDefaultDisplayLayout(const DisplayLayout& layout);
-
- // Registeres the display layout info for the specified display(s).
- void RegisterLayoutForDisplayIdPair(int64 id1,
- int64 id2,
- const DisplayLayout& layout);
-
- // If no layout is registered, it creatas new layout using
- // |default_display_layout_|.
- DisplayLayout GetRegisteredDisplayLayout(const DisplayIdPair& pair);
-
- // Returns the display layout for the display id pair
- // with display swapping applied. That is, this returns
- // flipped layout if the displays are swapped.
- DisplayLayout ComputeDisplayLayoutForDisplayIdPair(
- const DisplayIdPair& display_pair);
-
- // Update the mirrored flag in the display layout for
- // |display_pair|. This creates new display layout if no layout is
- // registered for |display_pair|.
- void UpdateMirrorStatus(const DisplayIdPair& display_pair,
- bool mirrored);
-
- // Update the |primary_id| in the display layout for
- // |display_pair|. This creates new display layout if no layout is
- // registered for |display_pair|.
- void UpdatePrimaryDisplayId(const DisplayIdPair& display_pair,
- int64 display_id);
-
- private:
- // Creates new layout for display pair from |default_display_layout_|.
- DisplayLayout CreateDisplayLayout(const DisplayIdPair& display_pair);
-
- // The default display layout.
- DisplayLayout default_display_layout_;
-
- // Display layout per pair of devices.
- std::map<DisplayIdPair, DisplayLayout> paired_layouts_;
-
- DISALLOW_COPY_AND_ASSIGN(DisplayLayoutStore);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DISPLAY_DISPLAY_LAYOUT_STORE_H_
diff --git a/chromium/ash/display/display_manager.cc b/chromium/ash/display/display_manager.cc
deleted file mode 100644
index 0377484bede..00000000000
--- a/chromium/ash/display/display_manager.cc
+++ /dev/null
@@ -1,1048 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/display_manager.h"
-
-#include <cmath>
-#include <set>
-#include <string>
-#include <vector>
-
-#include "ash/ash_switches.h"
-#include "ash/display/display_layout_store.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "base/auto_reset.h"
-#include "base/command_line.h"
-#include "base/logging.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/string_split.h"
-#include "base/strings/stringprintf.h"
-#include "base/strings/utf_string_conversions.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/screen.h"
-#include "ui/gfx/size_conversions.h"
-
-#if defined(USE_X11)
-#include "ui/base/x/x11_util.h"
-#endif
-
-#if defined(OS_CHROMEOS)
-#include "ash/display/output_configurator_animation.h"
-#include "base/sys_info.h"
-#include "chromeos/display/output_configurator.h"
-#endif
-
-#if defined(OS_WIN)
-#include "base/win/windows_version.h"
-#endif
-
-namespace ash {
-namespace internal {
-typedef std::vector<gfx::Display> DisplayList;
-typedef std::vector<DisplayInfo> DisplayInfoList;
-
-namespace {
-
-// The number of pixels to overlap between the primary and secondary displays,
-// in case that the offset value is too large.
-const int kMinimumOverlapForInvalidOffset = 100;
-
-// List of value UI Scale values. Scales for 2x are equivalent to 640,
-// 800, 1024, 1280, 1440, 1600 and 1920 pixel width respectively on
-// 2560 pixel width 2x density display. Please see crbug.com/233375
-// for the full list of resolutions.
-const float kUIScalesFor2x[] =
- {0.5f, 0.625f, 0.8f, 1.0f, 1.125f, 1.25f, 1.5f, 2.0f};
-const float kUIScalesFor1280[] = {0.5f, 0.625f, 0.8f, 1.0f, 1.125f };
-const float kUIScalesFor1366[] = {0.5f, 0.6f, 0.75f, 1.0f, 1.125f };
-
-struct DisplaySortFunctor {
- bool operator()(const gfx::Display& a, const gfx::Display& b) {
- return a.id() < b.id();
- }
-};
-
-struct DisplayInfoSortFunctor {
- bool operator()(const DisplayInfo& a, const DisplayInfo& b) {
- return a.id() < b.id();
- }
-};
-
-struct ResolutionMatcher {
- ResolutionMatcher(const gfx::Size& size) : size(size) {}
- bool operator()(const Resolution& resolution) {
- return resolution.size == size;
- }
- gfx::Size size;
-};
-
-struct ScaleComparator {
- ScaleComparator(float s) : scale(s) {}
-
- bool operator()(float s) const {
- const float kEpsilon = 0.0001f;
- return std::abs(scale - s) < kEpsilon;
- }
- float scale;
-};
-
-gfx::Display& GetInvalidDisplay() {
- static gfx::Display* invalid_display = new gfx::Display();
- return *invalid_display;
-}
-
-void MaybeInitInternalDisplay(int64 id) {
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kAshUseFirstDisplayAsInternal))
- gfx::Display::SetInternalDisplayId(id);
-}
-
-// Scoped objects used to either create or close the non desktop window
-// at specific timing.
-class NonDesktopDisplayUpdater {
- public:
- NonDesktopDisplayUpdater(DisplayManager* manager,
- DisplayManager::Delegate* delegate)
- : manager_(manager),
- delegate_(delegate),
- enabled_(manager_->second_display_mode() != DisplayManager::EXTENDED &&
- manager_->non_desktop_display().is_valid()) {
- }
-
- ~NonDesktopDisplayUpdater() {
- if (!delegate_)
- return;
-
- if (enabled_) {
- DisplayInfo display_info = manager_->GetDisplayInfo(
- manager_->non_desktop_display().id());
- delegate_->CreateOrUpdateNonDesktopDisplay(display_info);
- } else {
- delegate_->CloseNonDesktopDisplay();
- }
- }
-
- bool enabled() const { return enabled_; }
-
- private:
- DisplayManager* manager_;
- DisplayManager::Delegate* delegate_;
- bool enabled_;
- DISALLOW_COPY_AND_ASSIGN(NonDesktopDisplayUpdater);
-};
-
-} // namespace
-
-using std::string;
-using std::vector;
-
-DisplayManager::DisplayManager()
- : delegate_(NULL),
- layout_store_(new DisplayLayoutStore),
- first_display_id_(gfx::Display::kInvalidDisplayID),
- num_connected_displays_(0),
- force_bounds_changed_(false),
- change_display_upon_host_resize_(false),
- second_display_mode_(EXTENDED),
- mirrored_display_id_(gfx::Display::kInvalidDisplayID) {
-#if defined(OS_CHROMEOS)
- change_display_upon_host_resize_ = !base::SysInfo::IsRunningOnChromeOS();
-#endif
-}
-
-DisplayManager::~DisplayManager() {
-}
-
-// static
-std::vector<float> DisplayManager::GetScalesForDisplay(
- const DisplayInfo& info) {
- std::vector<float> ret;
- if (info.device_scale_factor() == 2.0f) {
- ret.assign(kUIScalesFor2x, kUIScalesFor2x + arraysize(kUIScalesFor2x));
- return ret;
- }
- switch (info.bounds_in_native().width()) {
- case 1280:
- ret.assign(kUIScalesFor1280,
- kUIScalesFor1280 + arraysize(kUIScalesFor1280));
- break;
- case 1366:
- ret.assign(kUIScalesFor1366,
- kUIScalesFor1366 + arraysize(kUIScalesFor1366));
- break;
- default:
- ret.assign(kUIScalesFor1280,
- kUIScalesFor1280 + arraysize(kUIScalesFor1280));
-#if defined(OS_CHROMEOS)
- if (base::SysInfo::IsRunningOnChromeOS())
- NOTREACHED() << "Unknown resolution:" << info.ToString();
-#endif
- }
- return ret;
-}
-
-// static
-float DisplayManager::GetNextUIScale(const DisplayInfo& info, bool up) {
- float scale = info.configured_ui_scale();
- std::vector<float> scales = GetScalesForDisplay(info);
- for (size_t i = 0; i < scales.size(); ++i) {
- if (ScaleComparator(scales[i])(scale)) {
- if (up && i != scales.size() - 1)
- return scales[i + 1];
- if (!up && i != 0)
- return scales[i - 1];
- return scales[i];
- }
- }
- // Fallback to 1.0f if the |scale| wasn't in the list.
- return 1.0f;
-}
-
-bool DisplayManager::InitFromCommandLine() {
- DisplayInfoList info_list;
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (!command_line->HasSwitch(switches::kAshHostWindowBounds))
- return false;
- const string size_str =
- command_line->GetSwitchValueASCII(switches::kAshHostWindowBounds);
- vector<string> parts;
- base::SplitString(size_str, ',', &parts);
- for (vector<string>::const_iterator iter = parts.begin();
- iter != parts.end(); ++iter) {
- info_list.push_back(DisplayInfo::CreateFromSpec(*iter));
- }
- MaybeInitInternalDisplay(info_list[0].id());
- if (info_list.size() > 1 &&
- command_line->HasSwitch(switches::kAshEnableSoftwareMirroring)) {
- SetSecondDisplayMode(MIRRORING);
- }
- OnNativeDisplaysChanged(info_list);
- return true;
-}
-
-void DisplayManager::InitDefaultDisplay() {
- DisplayInfoList info_list;
- info_list.push_back(DisplayInfo::CreateFromSpec(std::string()));
- MaybeInitInternalDisplay(info_list[0].id());
- OnNativeDisplaysChanged(info_list);
-}
-
-// static
-void DisplayManager::UpdateDisplayBoundsForLayoutById(
- const DisplayLayout& layout,
- const gfx::Display& primary_display,
- int64 secondary_display_id) {
- DCHECK_NE(gfx::Display::kInvalidDisplayID, secondary_display_id);
- UpdateDisplayBoundsForLayout(
- layout, primary_display,
- Shell::GetInstance()->display_manager()->
- FindDisplayForId(secondary_display_id));
-}
-
-bool DisplayManager::IsActiveDisplay(const gfx::Display& display) const {
- for (DisplayList::const_iterator iter = displays_.begin();
- iter != displays_.end(); ++iter) {
- if ((*iter).id() == display.id())
- return true;
- }
- return false;
-}
-
-bool DisplayManager::HasInternalDisplay() const {
- return gfx::Display::InternalDisplayId() != gfx::Display::kInvalidDisplayID;
-}
-
-bool DisplayManager::IsInternalDisplayId(int64 id) const {
- return gfx::Display::InternalDisplayId() == id;
-}
-
-DisplayLayout DisplayManager::GetCurrentDisplayLayout() {
- DCHECK_EQ(2U, num_connected_displays());
- // Invert if the primary was swapped.
- if (num_connected_displays() > 1) {
- DisplayIdPair pair = GetCurrentDisplayIdPair();
- return layout_store_->ComputeDisplayLayoutForDisplayIdPair(pair);
- }
- NOTREACHED() << "DisplayLayout is requested for single display";
- // On release build, just fallback to default instead of blowing up.
- DisplayLayout layout =
- layout_store_->default_display_layout();
- layout.primary_id = displays_[0].id();
- return layout;
-}
-
-DisplayIdPair DisplayManager::GetCurrentDisplayIdPair() const {
- if (IsMirrored()) {
- if (software_mirroring_enabled()) {
- CHECK_EQ(2u, num_connected_displays());
- // This comment is to make it easy to distinguish the crash
- // between two checks.
- CHECK_EQ(1u, displays_.size());
- }
- return std::make_pair(displays_[0].id(), mirrored_display_id_);
- } else {
- CHECK_GE(2u, displays_.size());
- int64 id_at_zero = displays_[0].id();
- if (id_at_zero == gfx::Display::InternalDisplayId() ||
- id_at_zero == first_display_id()) {
- return std::make_pair(id_at_zero, displays_[1].id());
- } else {
- return std::make_pair(displays_[1].id(), id_at_zero);
- }
- }
-}
-
-void DisplayManager::SetLayoutForCurrentDisplays(
- const DisplayLayout& layout_relative_to_primary) {
- DCHECK_EQ(2U, GetNumDisplays());
- if (GetNumDisplays() < 2)
- return;
- const gfx::Display& primary = Shell::GetScreen()->GetPrimaryDisplay();
- const DisplayIdPair pair = GetCurrentDisplayIdPair();
- // Invert if the primary was swapped.
- DisplayLayout to_set = pair.first == primary.id() ?
- layout_relative_to_primary : layout_relative_to_primary.Invert();
-
- DisplayLayout current_layout =
- layout_store_->GetRegisteredDisplayLayout(pair);
- if (to_set.position != current_layout.position ||
- to_set.offset != current_layout.offset) {
- to_set.primary_id = primary.id();
- layout_store_->RegisterLayoutForDisplayIdPair(
- pair.first, pair.second, to_set);
- if (delegate_)
- delegate_->PreDisplayConfigurationChange(false);
- // PreDisplayConfigurationChange(false);
- // TODO(oshima): Call UpdateDisplays instead.
- const DisplayLayout layout = GetCurrentDisplayLayout();
- UpdateDisplayBoundsForLayoutById(
- layout, primary,
- ScreenAsh::GetSecondaryDisplay().id());
-
- //UpdateCurrentDisplayBoundsForLayout();
- // Primary's bounds stay the same. Just notify bounds change
- // on the secondary.
- Shell::GetInstance()->screen()->NotifyBoundsChanged(
- ScreenAsh::GetSecondaryDisplay());
- if (delegate_)
- delegate_->PostDisplayConfigurationChange();
- }
-}
-
-const gfx::Display& DisplayManager::GetDisplayForId(int64 id) const {
- gfx::Display* display =
- const_cast<DisplayManager*>(this)->FindDisplayForId(id);
- return display ? *display : GetInvalidDisplay();
-}
-
-const gfx::Display& DisplayManager::FindDisplayContainingPoint(
- const gfx::Point& point_in_screen) const {
- for (DisplayList::const_iterator iter = displays_.begin();
- iter != displays_.end(); ++iter) {
- const gfx::Display& display = *iter;
- if (display.bounds().Contains(point_in_screen))
- return display;
- }
- return GetInvalidDisplay();
-}
-
-bool DisplayManager::UpdateWorkAreaOfDisplay(int64 display_id,
- const gfx::Insets& insets) {
- gfx::Display* display = FindDisplayForId(display_id);
- DCHECK(display);
- gfx::Rect old_work_area = display->work_area();
- display->UpdateWorkAreaFromInsets(insets);
- return old_work_area != display->work_area();
-}
-
-void DisplayManager::SetOverscanInsets(int64 display_id,
- const gfx::Insets& insets_in_dip) {
- display_info_[display_id].SetOverscanInsets(insets_in_dip);
- DisplayInfoList display_info_list;
- for (DisplayList::const_iterator iter = displays_.begin();
- iter != displays_.end(); ++iter) {
- display_info_list.push_back(GetDisplayInfo(iter->id()));
- }
- AddMirrorDisplayInfoIfAny(&display_info_list);
- UpdateDisplays(display_info_list);
-}
-
-void DisplayManager::SetDisplayRotation(int64 display_id,
- gfx::Display::Rotation rotation) {
- DisplayInfoList display_info_list;
- for (DisplayList::const_iterator iter = displays_.begin();
- iter != displays_.end(); ++iter) {
- DisplayInfo info = GetDisplayInfo(iter->id());
- if (info.id() == display_id) {
- if (info.rotation() == rotation)
- return;
- info.set_rotation(rotation);
- }
- display_info_list.push_back(info);
- }
- AddMirrorDisplayInfoIfAny(&display_info_list);
- if (virtual_keyboard_root_window_enabled() &&
- display_id == non_desktop_display_.id()) {
- DisplayInfo info = GetDisplayInfo(display_id);
- info.set_rotation(rotation);
- display_info_list.push_back(info);
- }
- UpdateDisplays(display_info_list);
-}
-
-void DisplayManager::SetDisplayUIScale(int64 display_id,
- float ui_scale) {
- if (!IsDisplayUIScalingEnabled() ||
- gfx::Display::InternalDisplayId() != display_id) {
- return;
- }
-
- DisplayInfoList display_info_list;
- for (DisplayList::const_iterator iter = displays_.begin();
- iter != displays_.end(); ++iter) {
- DisplayInfo info = GetDisplayInfo(iter->id());
- if (info.id() == display_id) {
- if (info.configured_ui_scale() == ui_scale)
- return;
- std::vector<float> scales = GetScalesForDisplay(info);
- ScaleComparator comparator(ui_scale);
- if (std::find_if(scales.begin(), scales.end(), comparator) ==
- scales.end()) {
- return;
- }
- info.set_configured_ui_scale(ui_scale);
- }
- display_info_list.push_back(info);
- }
- AddMirrorDisplayInfoIfAny(&display_info_list);
- UpdateDisplays(display_info_list);
-}
-
-void DisplayManager::SetDisplayResolution(int64 display_id,
- const gfx::Size& resolution) {
- DCHECK_NE(gfx::Display::InternalDisplayId(), display_id);
- if (gfx::Display::InternalDisplayId() == display_id)
- return;
- const DisplayInfo& display_info = GetDisplayInfo(display_id);
- const std::vector<Resolution>& resolutions = display_info.resolutions();
- DCHECK_NE(0u, resolutions.size());
- std::vector<Resolution>::const_iterator iter =
- std::find_if(resolutions.begin(),
- resolutions.end(),
- ResolutionMatcher(resolution));
- if (iter == resolutions.end()) {
- LOG(WARNING) << "Unsupported resolution was requested:"
- << resolution.ToString();
- return;
- } else if (iter == resolutions.begin()) {
- // The best resolution was set, so forget it.
- resolutions_.erase(display_id);
- } else {
- resolutions_[display_id] = resolution;
- }
-#if defined(OS_CHROMEOS) && defined(USE_X11)
- if (base::SysInfo::IsRunningOnChromeOS())
- Shell::GetInstance()->output_configurator()->ScheduleConfigureOutputs();
-#endif
-}
-
-void DisplayManager::RegisterDisplayProperty(
- int64 display_id,
- gfx::Display::Rotation rotation,
- float ui_scale,
- const gfx::Insets* overscan_insets,
- const gfx::Size& resolution_in_pixels) {
- if (display_info_.find(display_id) == display_info_.end()) {
- display_info_[display_id] =
- DisplayInfo(display_id, std::string(""), false);
- }
-
- display_info_[display_id].set_rotation(rotation);
- // Just in case the preference file was corrupted.
- if (0.5f <= ui_scale && ui_scale <= 2.0f)
- display_info_[display_id].set_configured_ui_scale(ui_scale);
- if (overscan_insets)
- display_info_[display_id].SetOverscanInsets(*overscan_insets);
- if (!resolution_in_pixels.IsEmpty())
- resolutions_[display_id] = resolution_in_pixels;
-}
-
-bool DisplayManager::GetSelectedResolutionForDisplayId(
- int64 id,
- gfx::Size* resolution_out) const {
- std::map<int64, gfx::Size>::const_iterator iter =
- resolutions_.find(id);
- if (iter == resolutions_.end())
- return false;
- *resolution_out = iter->second;
- return true;
-}
-
-bool DisplayManager::IsDisplayUIScalingEnabled() const {
- return GetDisplayIdForUIScaling() != gfx::Display::kInvalidDisplayID;
-}
-
-gfx::Insets DisplayManager::GetOverscanInsets(int64 display_id) const {
- std::map<int64, DisplayInfo>::const_iterator it =
- display_info_.find(display_id);
- return (it != display_info_.end()) ?
- it->second.overscan_insets_in_dip() : gfx::Insets();
-}
-
-void DisplayManager::OnNativeDisplaysChanged(
- const std::vector<DisplayInfo>& updated_displays) {
- if (updated_displays.empty()) {
- VLOG(1) << "OnNativeDisplayChanged(0): # of current displays="
- << displays_.size();
- // If the device is booted without display, or chrome is started
- // without --ash-host-window-bounds on linux desktop, use the
- // default display.
- if (displays_.empty()) {
- std::vector<DisplayInfo> init_displays;
- init_displays.push_back(DisplayInfo::CreateFromSpec(std::string()));
- MaybeInitInternalDisplay(init_displays[0].id());
- OnNativeDisplaysChanged(init_displays);
- } else {
- // Otherwise don't update the displays when all displays are disconnected.
- // This happens when:
- // - the device is idle and powerd requested to turn off all displays.
- // - the device is suspended. (kernel turns off all displays)
- // - the internal display's brightness is set to 0 and no external
- // display is connected.
- // - the internal display's brightness is 0 and external display is
- // disconnected.
- // The display will be updated when one of displays is turned on, and the
- // display list will be updated correctly.
- }
- return;
- }
- first_display_id_ = updated_displays[0].id();
- std::set<gfx::Point> origins;
-
- if (updated_displays.size() == 1) {
- VLOG(1) << "OnNativeDisplaysChanged(1):" << updated_displays[0].ToString();
- } else {
- VLOG(1) << "OnNativeDisplaysChanged(" << updated_displays.size()
- << ") [0]=" << updated_displays[0].ToString()
- << ", [1]=" << updated_displays[1].ToString();
- }
-
- bool internal_display_connected = false;
- num_connected_displays_ = updated_displays.size();
- mirrored_display_id_ = gfx::Display::kInvalidDisplayID;
- non_desktop_display_ = gfx::Display();
- DisplayInfoList new_display_info_list;
- for (DisplayInfoList::const_iterator iter = updated_displays.begin();
- iter != updated_displays.end();
- ++iter) {
- if (!internal_display_connected)
- internal_display_connected = IsInternalDisplayId(iter->id());
- // Mirrored monitors have the same origins.
- gfx::Point origin = iter->bounds_in_native().origin();
- if (origins.find(origin) != origins.end()) {
- InsertAndUpdateDisplayInfo(*iter);
- mirrored_display_id_ = iter->id();
- } else {
- origins.insert(origin);
- new_display_info_list.push_back(*iter);
- }
- }
- if (HasInternalDisplay() &&
- !internal_display_connected &&
- display_info_.find(gfx::Display::InternalDisplayId()) ==
- display_info_.end()) {
- DisplayInfo internal_display_info(
- gfx::Display::InternalDisplayId(),
- l10n_util::GetStringUTF8(IDS_ASH_INTERNAL_DISPLAY_NAME),
- false /*Internal display must not have overscan */);
- internal_display_info.SetBounds(gfx::Rect(0, 0, 800, 600));
- display_info_[gfx::Display::InternalDisplayId()] = internal_display_info;
- }
- UpdateDisplays(new_display_info_list);
-}
-
-void DisplayManager::UpdateDisplays() {
- DisplayInfoList display_info_list;
- for (DisplayList::const_iterator iter = displays_.begin();
- iter != displays_.end(); ++iter) {
- display_info_list.push_back(GetDisplayInfo(iter->id()));
- }
- AddMirrorDisplayInfoIfAny(&display_info_list);
- UpdateDisplays(display_info_list);
-}
-
-void DisplayManager::UpdateDisplays(
- const std::vector<DisplayInfo>& updated_display_info_list) {
-#if defined(OS_WIN)
- if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
- DCHECK_EQ(1u, updated_display_info_list.size()) <<
- "Multiple display test does not work on Win8 bots. Please "
- "skip (don't disable) the test using SupportsMultipleDisplays()";
- }
-#endif
-
- DisplayInfoList new_display_info_list = updated_display_info_list;
- std::sort(displays_.begin(), displays_.end(), DisplaySortFunctor());
- std::sort(new_display_info_list.begin(),
- new_display_info_list.end(),
- DisplayInfoSortFunctor());
- DisplayList removed_displays;
- std::vector<size_t> changed_display_indices;
- std::vector<size_t> added_display_indices;
-
- DisplayList::iterator curr_iter = displays_.begin();
- DisplayInfoList::const_iterator new_info_iter = new_display_info_list.begin();
-
- DisplayList new_displays;
-
- // Use the internal display or 1st as the mirror source, then scale
- // the root window so that it matches the external display's
- // resolution. This is necessary in order for scaling to work while
- // mirrored.
- int64 non_desktop_display_id = gfx::Display::kInvalidDisplayID;
-
- if (second_display_mode_ != EXTENDED && new_display_info_list.size() == 2) {
- bool zero_is_source =
- first_display_id_ == new_display_info_list[0].id() ||
- gfx::Display::InternalDisplayId() == new_display_info_list[0].id();
- if (second_display_mode_ == MIRRORING) {
- mirrored_display_id_ = new_display_info_list[zero_is_source ? 1 : 0].id();
- non_desktop_display_id = mirrored_display_id_;
- } else {
- // TODO(oshima|bshe): The virtual keyboard is currently assigned to
- // the 1st display.
- non_desktop_display_id =
- new_display_info_list[zero_is_source ? 0 : 1].id();
- }
- }
-
- while (curr_iter != displays_.end() ||
- new_info_iter != new_display_info_list.end()) {
- if (new_info_iter != new_display_info_list.end() &&
- non_desktop_display_id == new_info_iter->id()) {
- DisplayInfo info = *new_info_iter;
- info.SetOverscanInsets(gfx::Insets());
- InsertAndUpdateDisplayInfo(info);
- non_desktop_display_ =
- CreateDisplayFromDisplayInfoById(non_desktop_display_id);
- ++new_info_iter;
- // Remove existing external dispaly if it is going to be used as
- // non desktop.
- if (curr_iter != displays_.end() &&
- curr_iter->id() == non_desktop_display_id) {
- removed_displays.push_back(*curr_iter);
- ++curr_iter;
- }
- continue;
- }
-
- if (curr_iter == displays_.end()) {
- // more displays in new list.
- added_display_indices.push_back(new_displays.size());
- InsertAndUpdateDisplayInfo(*new_info_iter);
- new_displays.push_back(
- CreateDisplayFromDisplayInfoById(new_info_iter->id()));
- ++new_info_iter;
- } else if (new_info_iter == new_display_info_list.end()) {
- // more displays in current list.
- removed_displays.push_back(*curr_iter);
- ++curr_iter;
- } else if (curr_iter->id() == new_info_iter->id()) {
- const gfx::Display& current_display = *curr_iter;
- // Copy the info because |CreateDisplayFromInfo| updates the instance.
- const DisplayInfo current_display_info =
- GetDisplayInfo(current_display.id());
- InsertAndUpdateDisplayInfo(*new_info_iter);
- gfx::Display new_display =
- CreateDisplayFromDisplayInfoById(new_info_iter->id());
- const DisplayInfo& new_display_info = GetDisplayInfo(new_display.id());
-
- bool host_window_bounds_changed =
- current_display_info.bounds_in_native() !=
- new_display_info.bounds_in_native();
-
- if (force_bounds_changed_ ||
- host_window_bounds_changed ||
- (current_display.device_scale_factor() !=
- new_display.device_scale_factor()) ||
- (current_display_info.size_in_pixel() !=
- new_display.GetSizeInPixel()) ||
- (current_display.rotation() != new_display.rotation())) {
-
- changed_display_indices.push_back(new_displays.size());
- }
-
- new_display.UpdateWorkAreaFromInsets(current_display.GetWorkAreaInsets());
- new_displays.push_back(new_display);
- ++curr_iter;
- ++new_info_iter;
- } else if (curr_iter->id() < new_info_iter->id()) {
- // more displays in current list between ids, which means it is deleted.
- removed_displays.push_back(*curr_iter);
- ++curr_iter;
- } else {
- // more displays in new list between ids, which means it is added.
- added_display_indices.push_back(new_displays.size());
- InsertAndUpdateDisplayInfo(*new_info_iter);
- new_displays.push_back(
- CreateDisplayFromDisplayInfoById(new_info_iter->id()));
- ++new_info_iter;
- }
- }
-
- scoped_ptr<NonDesktopDisplayUpdater> non_desktop_display_updater(
- new NonDesktopDisplayUpdater(this, delegate_));
-
- // Do not update |displays_| if there's nothing to be updated. Without this,
- // it will not update the display layout, which causes the bug
- // http://crbug.com/155948.
- if (changed_display_indices.empty() && added_display_indices.empty() &&
- removed_displays.empty()) {
- return;
- }
- // Clear focus if the display has been removed, but don't clear focus if
- // the destkop has been moved from one display to another
- // (mirror -> docked, docked -> single internal).
- bool clear_focus =
- !removed_displays.empty() &&
- !(removed_displays.size() == 1 && added_display_indices.size() == 1);
- if (delegate_)
- delegate_->PreDisplayConfigurationChange(clear_focus);
-
- size_t updated_index;
- if (UpdateSecondaryDisplayBoundsForLayout(&new_displays, &updated_index) &&
- std::find(added_display_indices.begin(),
- added_display_indices.end(),
- updated_index) == added_display_indices.end() &&
- std::find(changed_display_indices.begin(),
- changed_display_indices.end(),
- updated_index) == changed_display_indices.end()) {
- changed_display_indices.push_back(updated_index);
- }
-
- displays_ = new_displays;
-
- base::AutoReset<bool> resetter(&change_display_upon_host_resize_, false);
-
- // Temporarily add displays to be removed because display object
- // being removed are accessed during shutting down the root.
- displays_.insert(displays_.end(), removed_displays.begin(),
- removed_displays.end());
-
- for (DisplayList::const_reverse_iterator iter = removed_displays.rbegin();
- iter != removed_displays.rend(); ++iter) {
- Shell::GetInstance()->screen()->NotifyDisplayRemoved(displays_.back());
- displays_.pop_back();
- }
- // Close the non desktop window here to avoid creating two compositor on
- // one display.
- if (!non_desktop_display_updater->enabled())
- non_desktop_display_updater.reset();
- for (std::vector<size_t>::iterator iter = added_display_indices.begin();
- iter != added_display_indices.end(); ++iter) {
- Shell::GetInstance()->screen()->NotifyDisplayAdded(displays_[*iter]);
- }
- // Create the non destkop window after all displays are added so that
- // it can mirror the display newly added. This can happen when switching
- // from dock mode to software mirror mode.
- non_desktop_display_updater.reset();
- for (std::vector<size_t>::iterator iter = changed_display_indices.begin();
- iter != changed_display_indices.end(); ++iter) {
- Shell::GetInstance()->screen()->NotifyBoundsChanged(displays_[*iter]);
- }
- if (delegate_)
- delegate_->PostDisplayConfigurationChange();
-
-#if defined(USE_X11) && defined(OS_CHROMEOS)
- if (!changed_display_indices.empty() && base::SysInfo::IsRunningOnChromeOS())
- ui::ClearX11DefaultRootWindow();
-#endif
-}
-
-const gfx::Display& DisplayManager::GetDisplayAt(size_t index) const {
- DCHECK_LT(index, displays_.size());
- return displays_[index];
-}
-
-const gfx::Display& DisplayManager::GetPrimaryDisplayCandidate() const {
- if (GetNumDisplays() == 1)
- return displays_[0];
- DisplayLayout layout = layout_store_->GetRegisteredDisplayLayout(
- GetCurrentDisplayIdPair());
- return GetDisplayForId(layout.primary_id);
-}
-
-size_t DisplayManager::GetNumDisplays() const {
- return displays_.size();
-}
-
-bool DisplayManager::IsMirrored() const {
- return mirrored_display_id_ != gfx::Display::kInvalidDisplayID;
-}
-
-const DisplayInfo& DisplayManager::GetDisplayInfo(int64 display_id) const {
- std::map<int64, DisplayInfo>::const_iterator iter =
- display_info_.find(display_id);
- CHECK(iter != display_info_.end()) << display_id;
- return iter->second;
-}
-
-std::string DisplayManager::GetDisplayNameForId(int64 id) {
- if (id == gfx::Display::kInvalidDisplayID)
- return l10n_util::GetStringUTF8(IDS_ASH_STATUS_TRAY_UNKNOWN_DISPLAY_NAME);
-
- std::map<int64, DisplayInfo>::const_iterator iter = display_info_.find(id);
- if (iter != display_info_.end() && !iter->second.name().empty())
- return iter->second.name();
-
- return base::StringPrintf("Display %d", static_cast<int>(id));
-}
-
-int64 DisplayManager::GetDisplayIdForUIScaling() const {
- // UI Scaling is effective only on internal display.
- int64 display_id = gfx::Display::InternalDisplayId();
-#if defined(OS_WIN)
- display_id = first_display_id();
-#endif
- return display_id;
-}
-
-void DisplayManager::SetMirrorMode(bool mirrored) {
- if (num_connected_displays() <= 1)
- return;
-
-#if defined(OS_CHROMEOS)
- if (base::SysInfo::IsRunningOnChromeOS()) {
- chromeos::OutputState new_state = mirrored ?
- chromeos::STATE_DUAL_MIRROR : chromeos::STATE_DUAL_EXTENDED;
- Shell::GetInstance()->output_configurator()->SetDisplayMode(new_state);
- return;
- }
-#endif
- // This is fallback path to emulate mirroroing on desktop.
- SetSecondDisplayMode(mirrored ? MIRRORING : EXTENDED);
- DisplayInfoList display_info_list;
- int count = 0;
- for (std::map<int64, DisplayInfo>::const_iterator iter =
- display_info_.begin();
- count < 2; ++iter, ++count) {
- display_info_list.push_back(GetDisplayInfo(iter->second.id()));
- }
- UpdateDisplays(display_info_list);
-#if defined(OS_CHROMEOS)
- if (Shell::GetInstance()->output_configurator_animation()) {
- Shell::GetInstance()->output_configurator_animation()->
- StartFadeInAnimation();
- }
-#endif
-}
-
-void DisplayManager::AddRemoveDisplay() {
- DCHECK(!displays_.empty());
- std::vector<DisplayInfo> new_display_info_list;
- const DisplayInfo& first_display = GetDisplayInfo(displays_[0].id());
- new_display_info_list.push_back(first_display);
- // Add if there is only one display connected.
- if (num_connected_displays() == 1) {
- // Layout the 2nd display below the primary as with the real device.
- gfx::Rect host_bounds = first_display.bounds_in_native();
- new_display_info_list.push_back(DisplayInfo::CreateFromSpec(
- base::StringPrintf(
- "%d+%d-500x400", host_bounds.x(), host_bounds.bottom())));
- }
- num_connected_displays_ = new_display_info_list.size();
- mirrored_display_id_ = gfx::Display::kInvalidDisplayID;
- non_desktop_display_ = gfx::Display();
- UpdateDisplays(new_display_info_list);
-}
-
-void DisplayManager::ToggleDisplayScaleFactor() {
- DCHECK(!displays_.empty());
- std::vector<DisplayInfo> new_display_info_list;
- for (DisplayList::const_iterator iter = displays_.begin();
- iter != displays_.end(); ++iter) {
- DisplayInfo display_info = GetDisplayInfo(iter->id());
- display_info.set_device_scale_factor(
- display_info.device_scale_factor() == 1.0f ? 2.0f : 1.0f);
- new_display_info_list.push_back(display_info);
- }
- AddMirrorDisplayInfoIfAny(&new_display_info_list);
- UpdateDisplays(new_display_info_list);
-}
-
-#if defined(OS_CHROMEOS)
-void DisplayManager::SetSoftwareMirroring(bool enabled) {
- // TODO(oshima|bshe): Support external display on the system
- // that has virtual keyboard display.
- if (second_display_mode_ == VIRTUAL_KEYBOARD)
- return;
- SetSecondDisplayMode(enabled ? MIRRORING : EXTENDED);
-}
-#endif
-
-void DisplayManager::SetSecondDisplayMode(SecondDisplayMode mode) {
- second_display_mode_ = mode;
- mirrored_display_id_ = gfx::Display::kInvalidDisplayID;
- non_desktop_display_ = gfx::Display();
-}
-
-bool DisplayManager::UpdateDisplayBounds(int64 display_id,
- const gfx::Rect& new_bounds) {
- if (change_display_upon_host_resize_) {
- display_info_[display_id].SetBounds(new_bounds);
- // Don't notify observers if the mirrored window has changed.
- if (software_mirroring_enabled() && mirrored_display_id_ == display_id)
- return false;
- gfx::Display* display = FindDisplayForId(display_id);
- display->SetSize(display_info_[display_id].size_in_pixel());
- Shell::GetInstance()->screen()->NotifyBoundsChanged(*display);
- return true;
- }
- return false;
-}
-
-void DisplayManager::CreateMirrorWindowIfAny() {
- NonDesktopDisplayUpdater updater(this, delegate_);
-}
-
-gfx::Display* DisplayManager::FindDisplayForId(int64 id) {
- for (DisplayList::iterator iter = displays_.begin();
- iter != displays_.end(); ++iter) {
- if ((*iter).id() == id)
- return &(*iter);
- }
- DLOG(WARNING) << "Could not find display:" << id;
- return NULL;
-}
-
-void DisplayManager::AddMirrorDisplayInfoIfAny(
- std::vector<DisplayInfo>* display_info_list) {
- if (software_mirroring_enabled() && IsMirrored())
- display_info_list->push_back(GetDisplayInfo(mirrored_display_id_));
-}
-
-void DisplayManager::InsertAndUpdateDisplayInfo(const DisplayInfo& new_info) {
- std::map<int64, DisplayInfo>::iterator info =
- display_info_.find(new_info.id());
- if (info != display_info_.end())
- info->second.Copy(new_info);
- else {
- display_info_[new_info.id()] = new_info;
- display_info_[new_info.id()].set_native(false);
- }
- display_info_[new_info.id()].UpdateDisplaySize();
-}
-
-gfx::Display DisplayManager::CreateDisplayFromDisplayInfoById(int64 id) {
- DCHECK(display_info_.find(id) != display_info_.end());
- const DisplayInfo& display_info = display_info_[id];
-
- gfx::Display new_display(display_info.id());
- gfx::Rect bounds_in_native(display_info.size_in_pixel());
- float device_scale_factor = display_info.device_scale_factor();
- if (device_scale_factor == 2.0f && display_info.configured_ui_scale() == 2.0f)
- device_scale_factor = 1.0f;
-
- // Simply set the origin to (0,0). The primary display's origin is
- // always (0,0) and the secondary display's bounds will be updated
- // in |UpdateSecondaryDisplayBoundsForLayout| called in |UpdateDisplay|.
- new_display.SetScaleAndBounds(
- device_scale_factor, gfx::Rect(bounds_in_native.size()));
- new_display.set_rotation(display_info.rotation());
- new_display.set_touch_support(display_info.touch_support());
- return new_display;
-}
-
-bool DisplayManager::UpdateSecondaryDisplayBoundsForLayout(
- DisplayList* displays,
- size_t* updated_index) const {
- if (displays->size() != 2U)
- return false;
-
- int64 id_at_zero = displays->at(0).id();
- DisplayIdPair pair =
- (id_at_zero == first_display_id_ ||
- id_at_zero == gfx::Display::InternalDisplayId()) ?
- std::make_pair(id_at_zero, displays->at(1).id()) :
- std::make_pair(displays->at(1).id(), id_at_zero) ;
- DisplayLayout layout =
- layout_store_->ComputeDisplayLayoutForDisplayIdPair(pair);
-
- // Ignore if a user has a old format (should be extremely rare)
- // and this will be replaced with DCHECK.
- if (layout.primary_id != gfx::Display::kInvalidDisplayID) {
- size_t primary_index, secondary_index;
- if (displays->at(0).id() == layout.primary_id) {
- primary_index = 0;
- secondary_index = 1;
- } else {
- primary_index = 1;
- secondary_index = 0;
- }
- // This function may be called before the secondary display is
- // registered. The bounds is empty in that case and will
- // return true.
- gfx::Rect bounds =
- GetDisplayForId(displays->at(secondary_index).id()).bounds();
- UpdateDisplayBoundsForLayout(
- layout, displays->at(primary_index), &displays->at(secondary_index));
- *updated_index = secondary_index;
- return bounds != displays->at(secondary_index).bounds();
- }
- return false;
-}
-
-// static
-void DisplayManager::UpdateDisplayBoundsForLayout(
- const DisplayLayout& layout,
- const gfx::Display& primary_display,
- gfx::Display* secondary_display) {
- DCHECK_EQ("0,0", primary_display.bounds().origin().ToString());
-
- const gfx::Rect& primary_bounds = primary_display.bounds();
- const gfx::Rect& secondary_bounds = secondary_display->bounds();
- gfx::Point new_secondary_origin = primary_bounds.origin();
-
- DisplayLayout::Position position = layout.position;
-
- // Ignore the offset in case the secondary display doesn't share edges with
- // the primary display.
- int offset = layout.offset;
- if (position == DisplayLayout::TOP || position == DisplayLayout::BOTTOM) {
- offset = std::min(
- offset, primary_bounds.width() - kMinimumOverlapForInvalidOffset);
- offset = std::max(
- offset, -secondary_bounds.width() + kMinimumOverlapForInvalidOffset);
- } else {
- offset = std::min(
- offset, primary_bounds.height() - kMinimumOverlapForInvalidOffset);
- offset = std::max(
- offset, -secondary_bounds.height() + kMinimumOverlapForInvalidOffset);
- }
- switch (position) {
- case DisplayLayout::TOP:
- new_secondary_origin.Offset(offset, -secondary_bounds.height());
- break;
- case DisplayLayout::RIGHT:
- new_secondary_origin.Offset(primary_bounds.width(), offset);
- break;
- case DisplayLayout::BOTTOM:
- new_secondary_origin.Offset(offset, primary_bounds.height());
- break;
- case DisplayLayout::LEFT:
- new_secondary_origin.Offset(-secondary_bounds.width(), offset);
- break;
- }
- gfx::Insets insets = secondary_display->GetWorkAreaInsets();
- secondary_display->set_bounds(
- gfx::Rect(new_secondary_origin, secondary_bounds.size()));
- secondary_display->UpdateWorkAreaFromInsets(insets);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/display_manager.h b/chromium/ash/display/display_manager.h
deleted file mode 100644
index ef6780981c5..00000000000
--- a/chromium/ash/display/display_manager.h
+++ /dev/null
@@ -1,350 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_DISPLAY_MANAGER_H_
-#define ASH_DISPLAY_DISPLAY_MANAGER_H_
-
-#include <string>
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "ash/display/display_info.h"
-#include "ash/display/display_layout.h"
-#include "base/compiler_specific.h"
-#include "base/gtest_prod_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/gfx/display.h"
-
-#if defined(OS_CHROMEOS)
-#include "chromeos/display/output_configurator.h"
-#endif
-
-namespace gfx {
-class Display;
-class Insets;
-class Rect;
-}
-
-namespace ash {
-class AcceleratorControllerTest;
-class DisplayController;
-
-namespace test {
-class DisplayManagerTestApi;
-class SystemGestureEventFilterTest;
-}
-namespace internal {
-class DisplayLayoutStore;
-
-// DisplayManager maintains the current display configurations,
-// and notifies observers when configuration changes.
-//
-// TODO(oshima): Make this non internal.
-class ASH_EXPORT DisplayManager
-#if defined(OS_CHROMEOS)
- : public chromeos::OutputConfigurator::SoftwareMirroringController
-#endif
- {
- public:
- class ASH_EXPORT Delegate {
- public:
- virtual ~Delegate() {}
-
- // Create or updates the non desktop window with |display_info|.
- virtual void CreateOrUpdateNonDesktopDisplay(
- const DisplayInfo& display_info) = 0;
-
- // Closes the mirror window if exists.
- virtual void CloseNonDesktopDisplay() = 0;
-
- // Called before and after the display configuration changes.
- // When |clear_focus| is true, the implementation should
- // deactivate the active window and set the focus window to NULL.
- virtual void PreDisplayConfigurationChange(bool clear_focus) = 0;
- virtual void PostDisplayConfigurationChange() = 0;
- };
-
- // How the second display will be used.
- // 1) EXTENDED mode extends the desktop to the second dislpay.
- // 2) MIRRORING mode copies the content of the primary display to
- // the 2nd display. (Software Mirroring).
- // 3) In VIRTUAL_KEYBOARD mode, the 2nd display is used as a
- // dedicated display for virtual keyboard, and it is not
- // recognized as a part of desktop.
- enum SecondDisplayMode {
- EXTENDED,
- MIRRORING,
- VIRTUAL_KEYBOARD
- };
-
- // Returns the list of possible UI scales for the display.
- static std::vector<float> GetScalesForDisplay(const DisplayInfo& info);
-
- // Returns next valid UI scale.
- static float GetNextUIScale(const DisplayInfo& info, bool up);
-
- // Updates the bounds of the display given by |secondary_display_id|
- // according to |layout|.
- static void UpdateDisplayBoundsForLayoutById(
- const DisplayLayout& layout,
- const gfx::Display& primary_display,
- int64 secondary_display_id);
-
- DisplayManager();
- virtual ~DisplayManager();
-
- DisplayLayoutStore* layout_store() {
- return layout_store_.get();
- }
-
- void set_delegate(Delegate* delegate) { delegate_ = delegate; }
-
- // When set to true, the MonitorManager calls OnDisplayBoundsChanged
- // even if the display's bounds didn't change. Used to swap primary
- // display.
- void set_force_bounds_changed(bool force_bounds_changed) {
- force_bounds_changed_ = force_bounds_changed;
- }
-
- // Returns the display id of the first display in the outupt list.
- int64 first_display_id() const { return first_display_id_; }
-
- // Initializes displays using command line flag. Returns false
- // if no command line flag was provided.
- bool InitFromCommandLine();
-
- // Initialize default display.
- void InitDefaultDisplay();
-
- // True if the given |display| is currently connected.
- bool IsActiveDisplay(const gfx::Display& display) const;
-
- // True if there is an internal display.
- bool HasInternalDisplay() const;
-
- bool IsInternalDisplayId(int64 id) const;
-
- // Returns the display layout used for current displays.
- DisplayLayout GetCurrentDisplayLayout();
-
- // Returns the current display pair.
- DisplayIdPair GetCurrentDisplayIdPair() const;
-
- // Sets the layout for the current display pair. The |layout| specifies
- // the locaion of the secondary display relative to the primary.
- void SetLayoutForCurrentDisplays(
- const DisplayLayout& layout_relative_to_primary);
-
- // Returns display for given |id|;
- const gfx::Display& GetDisplayForId(int64 id) const;
-
- // Finds the display that contains |point| in screeen coordinates.
- // Returns invalid display if there is no display that can satisfy
- // the condition.
- const gfx::Display& FindDisplayContainingPoint(
- const gfx::Point& point_in_screen) const;
-
- // Sets the work area's |insets| to the display given by |display_id|.
- bool UpdateWorkAreaOfDisplay(int64 display_id, const gfx::Insets& insets);
-
- // Registers the overscan insets for the display of the specified ID. Note
- // that the insets size should be specified in DIP size. It also triggers the
- // display's bounds change.
- void SetOverscanInsets(int64 display_id, const gfx::Insets& insets_in_dip);
-
- // Sets the display's rotation.
- void SetDisplayRotation(int64 display_id, gfx::Display::Rotation rotation);
-
- // Sets the display's ui scale.
- void SetDisplayUIScale(int64 display_id, float ui_scale);
-
- // Sets the display's resolution.
- void SetDisplayResolution(int64 display_id, const gfx::Size& resolution);
-
- // Register per display properties. |overscan_insets| is NULL if
- // the display has no custom overscan insets.
- void RegisterDisplayProperty(int64 display_id,
- gfx::Display::Rotation rotation,
- float ui_scale,
- const gfx::Insets* overscan_insets,
- const gfx::Size& resolution_in_pixels);
-
- // Returns the display's selected resolution.
- bool GetSelectedResolutionForDisplayId(int64 display_id,
- gfx::Size* resolution_out) const;
-
- // Tells if the virtual resolution feature is enabled.
- bool IsDisplayUIScalingEnabled() const;
-
- // Returns the current overscan insets for the specified |display_id|.
- // Returns an empty insets (0, 0, 0, 0) if no insets are specified for
- // the display.
- gfx::Insets GetOverscanInsets(int64 display_id) const;
-
- // Called when display configuration has changed. The new display
- // configurations is passed as a vector of Display object, which
- // contains each display's new infomration.
- void OnNativeDisplaysChanged(
- const std::vector<DisplayInfo>& display_info_list);
-
- // Updates the internal display data and notifies observers about the changes.
- void UpdateDisplays(const std::vector<DisplayInfo>& display_info_list);
-
- // Updates current displays using current |display_info_|.
- void UpdateDisplays();
-
- // Returns the display at |index|. The display at 0 is
- // no longer considered "primary".
- const gfx::Display& GetDisplayAt(size_t index) const;
-
- const gfx::Display& GetPrimaryDisplayCandidate() const;
-
- // Returns the logical number of displays. This returns 1
- // when displays are mirrored.
- size_t GetNumDisplays() const;
-
- const std::vector<gfx::Display>& displays() const { return displays_; }
-
- // Returns the number of connected displays. This returns 2
- // when displays are mirrored.
- size_t num_connected_displays() const { return num_connected_displays_; }
-
- // Returns the mirroring status.
- bool IsMirrored() const;
- int64 mirrored_display_id() const { return mirrored_display_id_; }
-
- // Returns the display object that is not a part of desktop.
- const gfx::Display& non_desktop_display() const {
- return non_desktop_display_;
- }
-
- // Retuns the display info associated with |display_id|.
- const DisplayInfo& GetDisplayInfo(int64 display_id) const;
-
- // Returns the human-readable name for the display |id|.
- std::string GetDisplayNameForId(int64 id);
-
- // Returns the display id that is capable of UI scaling. On device,
- // this returns internal display's ID if its device scale factor is 2,
- // or invalid ID if such internal display doesn't exist. On linux
- // desktop, this returns the first display ID.
- int64 GetDisplayIdForUIScaling() const;
-
- // Change the mirror mode.
- void SetMirrorMode(bool mirrored);
-
- // Used to emulate display change when run in a desktop environment instead
- // of on a device.
- void AddRemoveDisplay();
- void ToggleDisplayScaleFactor();
-
- // SoftwareMirroringController override:
-#if defined(OS_CHROMEOS)
- virtual void SetSoftwareMirroring(bool enabled) OVERRIDE;
-#endif
- bool software_mirroring_enabled() const {
- return second_display_mode_ == MIRRORING;
- };
-
- bool virtual_keyboard_root_window_enabled() const {
- return second_display_mode_ == VIRTUAL_KEYBOARD;
- };
-
- // Sets/gets second display mode.
- void SetSecondDisplayMode(SecondDisplayMode mode);
- SecondDisplayMode second_display_mode() const {
- return second_display_mode_;
- }
-
- // Update the bounds of the display given by |display_id|.
- bool UpdateDisplayBounds(int64 display_id,
- const gfx::Rect& new_bounds);
-
- // Creates mirror window if the software mirror mode is enabled.
- // This is used only for bootstrap.
- void CreateMirrorWindowIfAny();
-
-private:
- FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, ConvertPoint);
- FRIEND_TEST_ALL_PREFIXES(DisplayManagerTest, TestNativeDisplaysChanged);
- FRIEND_TEST_ALL_PREFIXES(DisplayManagerTest,
- NativeDisplaysChangedAfterPrimaryChange);
- FRIEND_TEST_ALL_PREFIXES(DisplayManagerTest, AutomaticOverscanInsets);
- friend class ash::AcceleratorControllerTest;
- friend class test::DisplayManagerTestApi;
- friend class test::SystemGestureEventFilterTest;
- friend class DisplayManagerTest;
-
- typedef std::vector<gfx::Display> DisplayList;
-
- void set_change_display_upon_host_resize(bool value) {
- change_display_upon_host_resize_ = value;
- }
-
- gfx::Display* FindDisplayForId(int64 id);
-
- // Add the mirror display's display info if the software based
- // mirroring is in use.
- void AddMirrorDisplayInfoIfAny(std::vector<DisplayInfo>* display_info_list);
-
- // Inserts and update the DisplayInfo according to the overscan
- // state. Note that The DisplayInfo stored in the |internal_display_info_|
- // can be different from |new_info| (due to overscan state), so
- // you must use |GetDisplayInfo| to get the correct DisplayInfo for
- // a display.
- void InsertAndUpdateDisplayInfo(const DisplayInfo& new_info);
-
- // Creates a display object from the DisplayInfo for |display_id|.
- gfx::Display CreateDisplayFromDisplayInfoById(int64 display_id);
-
- // Updates the bounds of the secondary display in |display_list|
- // using the layout registered for the display pair and set the
- // index of display updated to |updated_index|. Returns true
- // if the secondary display's bounds has been changed from current
- // value, or false otherwise.
- bool UpdateSecondaryDisplayBoundsForLayout(DisplayList* display_list,
- size_t* updated_index) const;
-
- static void UpdateDisplayBoundsForLayout(
- const DisplayLayout& layout,
- const gfx::Display& primary_display,
- gfx::Display* secondary_display);
-
- Delegate* delegate_; // not owned.
-
- scoped_ptr<DisplayLayoutStore> layout_store_;
-
- int64 first_display_id_;
-
- // List of current active displays.
- DisplayList displays_;
-
- int num_connected_displays_;
-
- bool force_bounds_changed_;
-
- // The mapping from the display ID to its internal data.
- std::map<int64, DisplayInfo> display_info_;
-
- // Selected resolutions for displays. Key is the displays' ID.
- std::map<int64, gfx::Size> resolutions_;
-
- // When set to true, the host window's resize event updates
- // the display's size. This is set to true when running on
- // desktop environment (for debugging) so that resizing the host
- // window will update the display properly. This is set to false
- // on device as well as during the unit tests.
- bool change_display_upon_host_resize_;
-
- SecondDisplayMode second_display_mode_;
- int64 mirrored_display_id_;
- gfx::Display non_desktop_display_;
-
- DISALLOW_COPY_AND_ASSIGN(DisplayManager);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DISPLAY_DISPLAY_MANAGER_H_
diff --git a/chromium/ash/display/display_manager_unittest.cc b/chromium/ash/display/display_manager_unittest.cc
deleted file mode 100644
index 162f9a90a81..00000000000
--- a/chromium/ash/display/display_manager_unittest.cc
+++ /dev/null
@@ -1,1138 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/display_manager.h"
-
-#include "ash/display/display_controller.h"
-#include "ash/display/display_layout_store.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/display_manager_test_api.h"
-#include "ash/test/mirror_window_test_api.h"
-#include "base/format_macros.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/stringprintf.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/window_observer.h"
-#include "ui/gfx/display_observer.h"
-#include "ui/gfx/display.h"
-
-namespace ash {
-namespace internal {
-
-using std::vector;
-using std::string;
-
-using base::StringPrintf;
-
-namespace {
-
-std::string ToDisplayName(int64 id) {
- return "x-" + base::Int64ToString(id);
-}
-
-} // namespace
-
-class DisplayManagerTest : public test::AshTestBase,
- public gfx::DisplayObserver,
- public aura::WindowObserver {
- public:
- DisplayManagerTest()
- : removed_count_(0U),
- root_window_destroyed_(false) {
- }
- virtual ~DisplayManagerTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- Shell::GetScreen()->AddObserver(this);
- Shell::GetPrimaryRootWindow()->AddObserver(this);
- }
- virtual void TearDown() OVERRIDE {
- Shell::GetPrimaryRootWindow()->RemoveObserver(this);
- Shell::GetScreen()->RemoveObserver(this);
- AshTestBase::TearDown();
- }
-
- DisplayManager* display_manager() {
- return Shell::GetInstance()->display_manager();
- }
- const vector<gfx::Display>& changed() const { return changed_; }
- const vector<gfx::Display>& added() const { return added_; }
-
- string GetCountSummary() const {
- return StringPrintf("%" PRIuS " %" PRIuS " %" PRIuS,
- changed_.size(), added_.size(), removed_count_);
- }
-
- void reset() {
- changed_.clear();
- added_.clear();
- removed_count_ = 0U;
- root_window_destroyed_ = false;
- }
-
- bool root_window_destroyed() const {
- return root_window_destroyed_;
- }
-
- const DisplayInfo& GetDisplayInfo(const gfx::Display& display) {
- return display_manager()->GetDisplayInfo(display.id());
- }
-
- const DisplayInfo& GetDisplayInfoAt(int index) {
- return GetDisplayInfo(display_manager()->GetDisplayAt(index));
- }
-
- const gfx::Display& GetDisplayForId(int64 id) {
- return display_manager()->GetDisplayForId(id);
- }
-
- const DisplayInfo& GetDisplayInfoForId(int64 id) {
- return GetDisplayInfo(display_manager()->GetDisplayForId(id));
- }
-
- // aura::DisplayObserver overrides:
- virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE {
- changed_.push_back(display);
- }
- virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE {
- added_.push_back(new_display);
- }
- virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE {
- ++removed_count_;
- }
-
- // aura::WindowObserver overrides:
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE {
- ASSERT_EQ(Shell::GetPrimaryRootWindow(), window);
- root_window_destroyed_ = true;
- }
-
- private:
- vector<gfx::Display> changed_;
- vector<gfx::Display> added_;
- size_t removed_count_;
- bool root_window_destroyed_;
-
- DISALLOW_COPY_AND_ASSIGN(DisplayManagerTest);
-};
-
-TEST_F(DisplayManagerTest, UpdateDisplayTest) {
- if (!SupportsMultipleDisplays())
- return;
-
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
-
- // Update primary and add seconary.
- UpdateDisplay("100+0-500x500,0+501-400x400");
- EXPECT_EQ(2U, display_manager()->GetNumDisplays());
- EXPECT_EQ("0,0 500x500",
- display_manager()->GetDisplayAt(0).bounds().ToString());
-
- EXPECT_EQ("1 1 0", GetCountSummary());
- EXPECT_EQ(display_manager()->GetDisplayAt(0).id(), changed()[0].id());
- EXPECT_EQ(display_manager()->GetDisplayAt(1).id(), added()[0].id());
- EXPECT_EQ("0,0 500x500", changed()[0].bounds().ToString());
- // Secondary display is on right.
- EXPECT_EQ("500,0 400x400", added()[0].bounds().ToString());
- EXPECT_EQ("0,501 400x400",
- GetDisplayInfo(added()[0]).bounds_in_native().ToString());
- reset();
-
- // Delete secondary.
- UpdateDisplay("100+0-500x500");
- EXPECT_EQ("0 0 1", GetCountSummary());
- reset();
-
- // Change primary.
- UpdateDisplay("1+1-1000x600");
- EXPECT_EQ("1 0 0", GetCountSummary());
- EXPECT_EQ(display_manager()->GetDisplayAt(0).id(), changed()[0].id());
- EXPECT_EQ("0,0 1000x600", changed()[0].bounds().ToString());
- reset();
-
- // Add secondary.
- UpdateDisplay("1+1-1000x600,1002+0-600x400");
- EXPECT_EQ(2U, display_manager()->GetNumDisplays());
- EXPECT_EQ("0 1 0", GetCountSummary());
- EXPECT_EQ(display_manager()->GetDisplayAt(1).id(), added()[0].id());
- // Secondary display is on right.
- EXPECT_EQ("1000,0 600x400", added()[0].bounds().ToString());
- EXPECT_EQ("1002,0 600x400",
- GetDisplayInfo(added()[0]).bounds_in_native().ToString());
- reset();
-
- // Secondary removed, primary changed.
- UpdateDisplay("1+1-800x300");
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
- EXPECT_EQ("1 0 1", GetCountSummary());
- EXPECT_EQ(display_manager()->GetDisplayAt(0).id(), changed()[0].id());
- EXPECT_EQ("0,0 800x300", changed()[0].bounds().ToString());
- reset();
-
- // # of display can go to zero when screen is off.
- const vector<DisplayInfo> empty;
- display_manager()->OnNativeDisplaysChanged(empty);
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
- EXPECT_EQ("0 0 0", GetCountSummary());
- EXPECT_FALSE(root_window_destroyed());
- // Display configuration stays the same
- EXPECT_EQ("0,0 800x300",
- display_manager()->GetDisplayAt(0).bounds().ToString());
- reset();
-
- // Connect to display again
- UpdateDisplay("100+100-500x400");
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
- EXPECT_EQ("1 0 0", GetCountSummary());
- EXPECT_FALSE(root_window_destroyed());
- EXPECT_EQ("0,0 500x400", changed()[0].bounds().ToString());
- EXPECT_EQ("100,100 500x400",
- GetDisplayInfo(changed()[0]).bounds_in_native().ToString());
- reset();
-
- // Go back to zero and wake up with multiple displays.
- display_manager()->OnNativeDisplaysChanged(empty);
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
- EXPECT_FALSE(root_window_destroyed());
- reset();
-
- // Add secondary.
- UpdateDisplay("0+0-1000x600,1000+1000-600x400");
- EXPECT_EQ(2U, display_manager()->GetNumDisplays());
- EXPECT_EQ("0,0 1000x600",
- display_manager()->GetDisplayAt(0).bounds().ToString());
- // Secondary display is on right.
- EXPECT_EQ("1000,0 600x400",
- display_manager()->GetDisplayAt(1).bounds().ToString());
- EXPECT_EQ("1000,1000 600x400",
- GetDisplayInfoAt(1).bounds_in_native().ToString());
- reset();
-
- // Changing primary will update secondary as well.
- UpdateDisplay("0+0-800x600,1000+1000-600x400");
- EXPECT_EQ("2 0 0", GetCountSummary());
- reset();
- EXPECT_EQ("0,0 800x600",
- display_manager()->GetDisplayAt(0).bounds().ToString());
- EXPECT_EQ("800,0 600x400",
- display_manager()->GetDisplayAt(1).bounds().ToString());
-}
-
-// Test in emulation mode (use_fullscreen_host_window=false)
-TEST_F(DisplayManagerTest, EmulatorTest) {
- if (!SupportsMultipleDisplays())
- return;
-
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
-
- display_manager()->AddRemoveDisplay();
- // Update primary and add seconary.
- EXPECT_EQ(2U, display_manager()->GetNumDisplays());
- EXPECT_EQ("0 1 0", GetCountSummary());
- reset();
-
- display_manager()->AddRemoveDisplay();
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
- EXPECT_EQ("0 0 1", GetCountSummary());
- reset();
-
- display_manager()->AddRemoveDisplay();
- EXPECT_EQ(2U, display_manager()->GetNumDisplays());
- EXPECT_EQ("0 1 0", GetCountSummary());
- reset();
-}
-
-TEST_F(DisplayManagerTest, OverscanInsetsTest) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("0+0-500x500,0+501-400x400");
- reset();
- ASSERT_EQ(2u, display_manager()->GetNumDisplays());
- const DisplayInfo& display_info1 = GetDisplayInfoAt(0);
- const DisplayInfo& display_info2 = GetDisplayInfoAt(1);
- display_manager()->SetOverscanInsets(
- display_info2.id(), gfx::Insets(13, 12, 11, 10));
-
- std::vector<gfx::Display> changed_displays = changed();
- EXPECT_EQ(1u, changed_displays.size());
- EXPECT_EQ(display_info2.id(), changed_displays[0].id());
- EXPECT_EQ("0,0 500x500",
- GetDisplayInfoAt(0).bounds_in_native().ToString());
- DisplayInfo updated_display_info2 = GetDisplayInfoAt(1);
- EXPECT_EQ("0,501 400x400",
- updated_display_info2.bounds_in_native().ToString());
- EXPECT_EQ("378x376",
- updated_display_info2.size_in_pixel().ToString());
- EXPECT_EQ("13,12,11,10",
- updated_display_info2.overscan_insets_in_dip().ToString());
- EXPECT_EQ("500,0 378x376",
- ScreenAsh::GetSecondaryDisplay().bounds().ToString());
-
- // Make sure that SetOverscanInsets() is idempotent.
- display_manager()->SetOverscanInsets(display_info1.id(), gfx::Insets());
- display_manager()->SetOverscanInsets(
- display_info2.id(), gfx::Insets(13, 12, 11, 10));
- EXPECT_EQ("0,0 500x500",
- GetDisplayInfoAt(0).bounds_in_native().ToString());
- updated_display_info2 = GetDisplayInfoAt(1);
- EXPECT_EQ("0,501 400x400",
- updated_display_info2.bounds_in_native().ToString());
- EXPECT_EQ("378x376",
- updated_display_info2.size_in_pixel().ToString());
- EXPECT_EQ("13,12,11,10",
- updated_display_info2.overscan_insets_in_dip().ToString());
-
- display_manager()->SetOverscanInsets(
- display_info2.id(), gfx::Insets(10, 11, 12, 13));
- EXPECT_EQ("0,0 500x500",
- GetDisplayInfoAt(0).bounds_in_native().ToString());
- EXPECT_EQ("376x378",
- GetDisplayInfoAt(1).size_in_pixel().ToString());
- EXPECT_EQ("10,11,12,13",
- GetDisplayInfoAt(1).overscan_insets_in_dip().ToString());
-
- // Recreate a new 2nd display. It won't apply the overscan inset because the
- // new display has a different ID.
- UpdateDisplay("0+0-500x500");
- UpdateDisplay("0+0-500x500,0+501-400x400");
- EXPECT_EQ("0,0 500x500",
- GetDisplayInfoAt(0).bounds_in_native().ToString());
- EXPECT_EQ("0,501 400x400",
- GetDisplayInfoAt(1).bounds_in_native().ToString());
-
- // Recreate the displays with the same ID. It should apply the overscan
- // inset.
- UpdateDisplay("0+0-500x500");
- std::vector<DisplayInfo> display_info_list;
- display_info_list.push_back(display_info1);
- display_info_list.push_back(display_info2);
- display_manager()->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ("1,1 500x500",
- GetDisplayInfoAt(0).bounds_in_native().ToString());
- updated_display_info2 = GetDisplayInfoAt(1);
- EXPECT_EQ("376x378",
- updated_display_info2.size_in_pixel().ToString());
- EXPECT_EQ("10,11,12,13",
- updated_display_info2.overscan_insets_in_dip().ToString());
-
- // HiDPI but overscan display. The specified insets size should be doubled.
- UpdateDisplay("0+0-500x500,0+501-400x400*2");
- display_manager()->SetOverscanInsets(
- display_manager()->GetDisplayAt(1).id(), gfx::Insets(4, 5, 6, 7));
- EXPECT_EQ("0,0 500x500",
- GetDisplayInfoAt(0).bounds_in_native().ToString());
- updated_display_info2 = GetDisplayInfoAt(1);
- EXPECT_EQ("0,501 400x400",
- updated_display_info2.bounds_in_native().ToString());
- EXPECT_EQ("376x380",
- updated_display_info2.size_in_pixel().ToString());
- EXPECT_EQ("4,5,6,7",
- updated_display_info2.overscan_insets_in_dip().ToString());
- EXPECT_EQ("8,10,12,14",
- updated_display_info2.GetOverscanInsetsInPixel().ToString());
-
- // Make sure switching primary display applies the overscan offset only once.
- ash::Shell::GetInstance()->display_controller()->SetPrimaryDisplay(
- ScreenAsh::GetSecondaryDisplay());
- EXPECT_EQ("-500,0 500x500",
- ScreenAsh::GetSecondaryDisplay().bounds().ToString());
- EXPECT_EQ("0,0 500x500",
- GetDisplayInfo(ScreenAsh::GetSecondaryDisplay()).
- bounds_in_native().ToString());
- EXPECT_EQ("0,501 400x400",
- GetDisplayInfo(Shell::GetScreen()->GetPrimaryDisplay()).
- bounds_in_native().ToString());
- EXPECT_EQ("0,0 188x190",
- Shell::GetScreen()->GetPrimaryDisplay().bounds().ToString());
-}
-
-TEST_F(DisplayManagerTest, ZeroOverscanInsets) {
- if (!SupportsMultipleDisplays())
- return;
-
- // Make sure the display change events is emitted for overscan inset changes.
- UpdateDisplay("0+0-500x500,0+501-400x400");
- ASSERT_EQ(2u, display_manager()->GetNumDisplays());
- int64 display2_id = display_manager()->GetDisplayAt(1).id();
-
- reset();
- display_manager()->SetOverscanInsets(display2_id, gfx::Insets(0, 0, 0, 0));
- EXPECT_EQ(0u, changed().size());
-
- reset();
- display_manager()->SetOverscanInsets(display2_id, gfx::Insets(1, 0, 0, 0));
- EXPECT_EQ(1u, changed().size());
- EXPECT_EQ(display2_id, changed()[0].id());
-
- reset();
- display_manager()->SetOverscanInsets(display2_id, gfx::Insets(0, 0, 0, 0));
- EXPECT_EQ(1u, changed().size());
- EXPECT_EQ(display2_id, changed()[0].id());
-}
-
-TEST_F(DisplayManagerTest, TestDeviceScaleOnlyChange) {
- if (!SupportsHostWindowResize())
- return;
-
- UpdateDisplay("1000x600");
- aura::WindowEventDispatcher* dispatcher =
- Shell::GetPrimaryRootWindow()->GetDispatcher();
- EXPECT_EQ(1, dispatcher->compositor()->device_scale_factor());
- EXPECT_EQ("1000x600",
- Shell::GetPrimaryRootWindow()->bounds().size().ToString());
- UpdateDisplay("1000x600*2");
- EXPECT_EQ(2, dispatcher->compositor()->device_scale_factor());
- EXPECT_EQ("500x300",
- Shell::GetPrimaryRootWindow()->bounds().size().ToString());
-}
-
-DisplayInfo CreateDisplayInfo(int64 id, const gfx::Rect& bounds) {
- DisplayInfo info(id, ToDisplayName(id), false);
- info.SetBounds(bounds);
- return info;
-}
-
-TEST_F(DisplayManagerTest, TestNativeDisplaysChanged) {
- const int64 internal_display_id =
- test::DisplayManagerTestApi(display_manager()).
- SetFirstDisplayAsInternalDisplay();
- const int external_id = 10;
- const int mirror_id = 11;
- const int64 invalid_id = gfx::Display::kInvalidDisplayID;
- const DisplayInfo internal_display_info =
- CreateDisplayInfo(internal_display_id, gfx::Rect(0, 0, 500, 500));
- const DisplayInfo external_display_info =
- CreateDisplayInfo(external_id, gfx::Rect(1, 1, 100, 100));
- const DisplayInfo mirrored_display_info =
- CreateDisplayInfo(mirror_id, gfx::Rect(0, 0, 500, 500));
-
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
- EXPECT_EQ(1U, display_manager()->num_connected_displays());
- std::string default_bounds =
- display_manager()->GetDisplayAt(0).bounds().ToString();
-
- std::vector<DisplayInfo> display_info_list;
- // Primary disconnected.
- display_manager()->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
- EXPECT_EQ(default_bounds,
- display_manager()->GetDisplayAt(0).bounds().ToString());
- EXPECT_EQ(1U, display_manager()->num_connected_displays());
- EXPECT_FALSE(display_manager()->IsMirrored());
-
- if (!SupportsMultipleDisplays())
- return;
-
- // External connected while primary was disconnected.
- display_info_list.push_back(external_display_info);
- display_manager()->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
-
- EXPECT_EQ(invalid_id, GetDisplayForId(internal_display_id).id());
- EXPECT_EQ("1,1 100x100",
- GetDisplayInfoForId(external_id).bounds_in_native().ToString());
- EXPECT_EQ(1U, display_manager()->num_connected_displays());
- EXPECT_FALSE(display_manager()->IsMirrored());
- EXPECT_EQ(external_id, Shell::GetScreen()->GetPrimaryDisplay().id());
-
- EXPECT_EQ(internal_display_id, gfx::Display::InternalDisplayId());
-
- // Primary connected, with different bounds.
- display_info_list.clear();
- display_info_list.push_back(internal_display_info);
- display_info_list.push_back(external_display_info);
- display_manager()->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(2U, display_manager()->GetNumDisplays());
- EXPECT_EQ(internal_display_id, Shell::GetScreen()->GetPrimaryDisplay().id());
-
- // This combinatino is new, so internal display becomes primary.
- EXPECT_EQ("0,0 500x500",
- GetDisplayForId(internal_display_id).bounds().ToString());
- EXPECT_EQ("1,1 100x100",
- GetDisplayInfoForId(10).bounds_in_native().ToString());
- EXPECT_EQ(2U, display_manager()->num_connected_displays());
- EXPECT_FALSE(display_manager()->IsMirrored());
- EXPECT_EQ(ToDisplayName(internal_display_id),
- display_manager()->GetDisplayNameForId(internal_display_id));
-
- // Emulate suspend.
- display_info_list.clear();
- display_manager()->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(2U, display_manager()->GetNumDisplays());
- EXPECT_EQ("0,0 500x500",
- GetDisplayForId(internal_display_id).bounds().ToString());
- EXPECT_EQ("1,1 100x100",
- GetDisplayInfoForId(10).bounds_in_native().ToString());
- EXPECT_EQ(2U, display_manager()->num_connected_displays());
- EXPECT_FALSE(display_manager()->IsMirrored());
- EXPECT_EQ(ToDisplayName(internal_display_id),
- display_manager()->GetDisplayNameForId(internal_display_id));
-
- // External display has disconnected then resumed.
- display_info_list.push_back(internal_display_info);
- display_manager()->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
- EXPECT_EQ("0,0 500x500",
- GetDisplayForId(internal_display_id).bounds().ToString());
- EXPECT_EQ(1U, display_manager()->num_connected_displays());
- EXPECT_FALSE(display_manager()->IsMirrored());
-
- // External display was changed during suspend.
- display_info_list.push_back(external_display_info);
- display_manager()->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(2U, display_manager()->GetNumDisplays());
- EXPECT_EQ(2U, display_manager()->num_connected_displays());
- EXPECT_FALSE(display_manager()->IsMirrored());
-
- // suspend...
- display_info_list.clear();
- display_manager()->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(2U, display_manager()->GetNumDisplays());
- EXPECT_EQ(2U, display_manager()->num_connected_displays());
- EXPECT_FALSE(display_manager()->IsMirrored());
-
- // and resume with different external display.
- display_info_list.push_back(internal_display_info);
- display_info_list.push_back(CreateDisplayInfo(12, gfx::Rect(1, 1, 100, 100)));
- display_manager()->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(2U, display_manager()->GetNumDisplays());
- EXPECT_EQ(2U, display_manager()->num_connected_displays());
- EXPECT_FALSE(display_manager()->IsMirrored());
- EXPECT_FALSE(display_manager()->IsMirrored());
-
- // mirrored...
- display_info_list.clear();
- display_info_list.push_back(internal_display_info);
- display_info_list.push_back(mirrored_display_info);
- display_manager()->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
- EXPECT_EQ("0,0 500x500",
- GetDisplayForId(internal_display_id).bounds().ToString());
- EXPECT_EQ(2U, display_manager()->num_connected_displays());
- EXPECT_EQ(11U, display_manager()->mirrored_display_id());
- EXPECT_TRUE(display_manager()->IsMirrored());
-
- // Test display name.
- EXPECT_EQ(ToDisplayName(internal_display_id),
- display_manager()->GetDisplayNameForId(internal_display_id));
- EXPECT_EQ("x-10", display_manager()->GetDisplayNameForId(10));
- EXPECT_EQ("x-11", display_manager()->GetDisplayNameForId(11));
- EXPECT_EQ("x-12", display_manager()->GetDisplayNameForId(12));
- // Default name for the id that doesn't exist.
- EXPECT_EQ("Display 100", display_manager()->GetDisplayNameForId(100));
-
- // and exit mirroring.
- display_info_list.clear();
- display_info_list.push_back(internal_display_info);
- display_info_list.push_back(external_display_info);
- display_manager()->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(2U, display_manager()->GetNumDisplays());
- EXPECT_EQ(2U, display_manager()->num_connected_displays());
- EXPECT_FALSE(display_manager()->IsMirrored());
- EXPECT_EQ("0,0 500x500",
- GetDisplayForId(internal_display_id).bounds().ToString());
- EXPECT_EQ("500,0 100x100",
- GetDisplayForId(10).bounds().ToString());
-
- // Turn off internal
- display_info_list.clear();
- display_info_list.push_back(external_display_info);
- display_manager()->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
- EXPECT_EQ(invalid_id, GetDisplayForId(internal_display_id).id());
- EXPECT_EQ("1,1 100x100",
- GetDisplayInfoForId(external_id).bounds_in_native().ToString());
- EXPECT_EQ(1U, display_manager()->num_connected_displays());
- EXPECT_FALSE(display_manager()->IsMirrored());
-
- // Switched to another display
- display_info_list.clear();
- display_info_list.push_back(internal_display_info);
- display_manager()->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
- EXPECT_EQ(
- "0,0 500x500",
- GetDisplayInfoForId(internal_display_id).bounds_in_native().ToString());
- EXPECT_EQ(1U, display_manager()->num_connected_displays());
- EXPECT_FALSE(display_manager()->IsMirrored());
-}
-
-#if defined(OS_WIN)
-// TODO(scottmg): RootWindow doesn't get resized on Windows
-// Ash. http://crbug.com/247916.
-#define MAYBE_TestNativeDisplaysChangedNoInternal \
- DISABLED_TestNativeDisplaysChangedNoInternal
-#else
-#define MAYBE_TestNativeDisplaysChangedNoInternal \
- TestNativeDisplaysChangedNoInternal
-#endif
-
-TEST_F(DisplayManagerTest, MAYBE_TestNativeDisplaysChangedNoInternal) {
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
-
- // Don't change the display info if all displays are disconnected.
- std::vector<DisplayInfo> display_info_list;
- display_manager()->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
-
- // Connect another display which will become primary.
- const DisplayInfo external_display_info =
- CreateDisplayInfo(10, gfx::Rect(1, 1, 100, 100));
- display_info_list.push_back(external_display_info);
- display_manager()->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
- EXPECT_EQ("1,1 100x100",
- GetDisplayInfoForId(10).bounds_in_native().ToString());
- EXPECT_EQ("100x100", ash::Shell::GetPrimaryRootWindow()->GetDispatcher()->
- host()->GetBounds().size().ToString());
-}
-
-#if defined(OS_WIN)
-// Tests that rely on the actual host size/location does not work on windows.
-#define MAYBE_EnsurePointerInDisplays DISABLED_EnsurePointerInDisplays
-#define MAYBE_EnsurePointerInDisplays_2ndOnLeft DISABLED_EnsurePointerInDisplays_2ndOnLeft
-#else
-#define MAYBE_EnsurePointerInDisplays EnsurePointerInDisplays
-#define MAYBE_EnsurePointerInDisplays_2ndOnLeft EnsurePointerInDisplays_2ndOnLeft
-#endif
-
-TEST_F(DisplayManagerTest, MAYBE_EnsurePointerInDisplays) {
- UpdateDisplay("200x200,300x300");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- aura::Env* env = aura::Env::GetInstance();
-
- aura::test::EventGenerator generator(root_windows[0]);
-
- // Set the initial position.
- generator.MoveMouseToInHost(350, 150);
- EXPECT_EQ("350,150", env->last_mouse_location().ToString());
-
- // A mouse pointer will stay in the 2nd display.
- UpdateDisplay("300x300,200x200");
- EXPECT_EQ("450,50", env->last_mouse_location().ToString());
-
- // A mouse pointer will be outside of displays and move to the
- // center of 2nd display.
- UpdateDisplay("300x300,100x100");
- EXPECT_EQ("350,50", env->last_mouse_location().ToString());
-
- // 2nd display was disconnected, and the cursor is
- // now in the 1st display.
- UpdateDisplay("400x400");
- EXPECT_EQ("50,350", env->last_mouse_location().ToString());
-
- // 1st display's resolution has changed, and the mouse pointer is
- // now outside. Move the mouse pointer to the center of 1st display.
- UpdateDisplay("300x300");
- EXPECT_EQ("150,150", env->last_mouse_location().ToString());
-
- // Move the mouse pointer to the bottom of 1st display.
- generator.MoveMouseToInHost(150, 290);
- EXPECT_EQ("150,290", env->last_mouse_location().ToString());
-
- // The mouse pointer is now on 2nd display.
- UpdateDisplay("300x280,200x200");
- EXPECT_EQ("450,10", env->last_mouse_location().ToString());
-}
-
-TEST_F(DisplayManagerTest, MAYBE_EnsurePointerInDisplays_2ndOnLeft) {
- // Set the 2nd display on the left.
- DisplayLayoutStore* layout_store =
- Shell::GetInstance()->display_manager()->layout_store();
- DisplayLayout layout = layout_store->default_display_layout();
- layout.position = DisplayLayout::LEFT;
- layout_store->SetDefaultDisplayLayout(layout);
-
- UpdateDisplay("200x200,300x300");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- EXPECT_EQ("-300,0 300x300",
- ScreenAsh::GetSecondaryDisplay().bounds().ToString());
-
- aura::Env* env = aura::Env::GetInstance();
-
- // Set the initial position.
- root_windows[0]->MoveCursorTo(gfx::Point(-150, 250));
- EXPECT_EQ("-150,250", env->last_mouse_location().ToString());
-
- // A mouse pointer will stay in 2nd display.
- UpdateDisplay("300x300,200x300");
- EXPECT_EQ("-50,150", env->last_mouse_location().ToString());
-
- // A mouse pointer will be outside of displays and move to the
- // center of 2nd display.
- UpdateDisplay("300x300,200x100");
- EXPECT_EQ("-100,50", env->last_mouse_location().ToString());
-
- // 2nd display was disconnected. Mouse pointer should move to
- // 1st display.
- UpdateDisplay("300x300");
- EXPECT_EQ("150,150", env->last_mouse_location().ToString());
-}
-
-TEST_F(DisplayManagerTest, NativeDisplaysChangedAfterPrimaryChange) {
- if (!SupportsMultipleDisplays())
- return;
-
- const int64 internal_display_id =
- test::DisplayManagerTestApi(display_manager()).
- SetFirstDisplayAsInternalDisplay();
- const DisplayInfo native_display_info =
- CreateDisplayInfo(internal_display_id, gfx::Rect(0, 0, 500, 500));
- const DisplayInfo secondary_display_info =
- CreateDisplayInfo(10, gfx::Rect(1, 1, 100, 100));
-
- std::vector<DisplayInfo> display_info_list;
- display_info_list.push_back(native_display_info);
- display_info_list.push_back(secondary_display_info);
- display_manager()->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(2U, display_manager()->GetNumDisplays());
- EXPECT_EQ("0,0 500x500",
- GetDisplayForId(internal_display_id).bounds().ToString());
- EXPECT_EQ("500,0 100x100", GetDisplayForId(10).bounds().ToString());
-
- ash::Shell::GetInstance()->display_controller()->SetPrimaryDisplay(
- GetDisplayForId(secondary_display_info.id()));
- EXPECT_EQ("-500,0 500x500",
- GetDisplayForId(internal_display_id).bounds().ToString());
- EXPECT_EQ("0,0 100x100", GetDisplayForId(10).bounds().ToString());
-
- // OnNativeDisplaysChanged may change the display bounds. Here makes sure
- // nothing changed if the exactly same displays are specified.
- display_manager()->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ("-500,0 500x500",
- GetDisplayForId(internal_display_id).bounds().ToString());
- EXPECT_EQ("0,0 100x100", GetDisplayForId(10).bounds().ToString());
-}
-
-TEST_F(DisplayManagerTest, DontRememberBestResolution) {
- int display_id = 1000;
- DisplayInfo native_display_info =
- CreateDisplayInfo(display_id, gfx::Rect(0, 0, 1000, 500));
- std::vector<Resolution> resolutions;
- resolutions.push_back(Resolution(gfx::Size(1000, 500), false));
- resolutions.push_back(Resolution(gfx::Size(800, 300), false));
- resolutions.push_back(Resolution(gfx::Size(400, 500), false));
-
- native_display_info.set_resolutions(resolutions);
-
- std::vector<DisplayInfo> display_info_list;
- display_info_list.push_back(native_display_info);
- display_manager()->OnNativeDisplaysChanged(display_info_list);
-
- gfx::Size selected;
- EXPECT_FALSE(display_manager()->GetSelectedResolutionForDisplayId(
- display_id, &selected));
-
- // Unsupported resolution.
- display_manager()->SetDisplayResolution(display_id, gfx::Size(800, 4000));
- EXPECT_FALSE(display_manager()->GetSelectedResolutionForDisplayId(
- display_id, &selected));
-
- // Supported resolution.
- display_manager()->SetDisplayResolution(display_id, gfx::Size(800, 300));
- EXPECT_TRUE(display_manager()->GetSelectedResolutionForDisplayId(
- display_id, &selected));
- EXPECT_EQ("800x300", selected.ToString());
-
- // Best resolution.
- display_manager()->SetDisplayResolution(display_id, gfx::Size(1000, 500));
- EXPECT_FALSE(display_manager()->GetSelectedResolutionForDisplayId(
- display_id, &selected));
-}
-
-TEST_F(DisplayManagerTest, Rotate) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("100x200/r,300x400/l");
- EXPECT_EQ("1,1 100x200",
- GetDisplayInfoAt(0).bounds_in_native().ToString());
- EXPECT_EQ("200x100",
- GetDisplayInfoAt(0).size_in_pixel().ToString());
-
- EXPECT_EQ("1,201 300x400",
- GetDisplayInfoAt(1).bounds_in_native().ToString());
- EXPECT_EQ("400x300",
- GetDisplayInfoAt(1).size_in_pixel().ToString());
- reset();
- UpdateDisplay("100x200/b,300x400");
- EXPECT_EQ("2 0 0", GetCountSummary());
- reset();
-
- EXPECT_EQ("1,1 100x200",
- GetDisplayInfoAt(0).bounds_in_native().ToString());
- EXPECT_EQ("100x200",
- GetDisplayInfoAt(0).size_in_pixel().ToString());
-
- EXPECT_EQ("1,201 300x400",
- GetDisplayInfoAt(1).bounds_in_native().ToString());
- EXPECT_EQ("300x400",
- GetDisplayInfoAt(1).size_in_pixel().ToString());
-
- // Just Rotating display will change the bounds on both display.
- UpdateDisplay("100x200/l,300x400");
- EXPECT_EQ("2 0 0", GetCountSummary());
- reset();
-
- // Updating tothe same configuration should report no changes.
- UpdateDisplay("100x200/l,300x400");
- EXPECT_EQ("0 0 0", GetCountSummary());
- reset();
-
- UpdateDisplay("100x200/l,300x400");
- EXPECT_EQ("0 0 0", GetCountSummary());
- reset();
-
- UpdateDisplay("200x200");
- EXPECT_EQ("1 0 1", GetCountSummary());
- reset();
-
- UpdateDisplay("200x200/l");
- EXPECT_EQ("1 0 0", GetCountSummary());
-}
-
-TEST_F(DisplayManagerTest, UIScale) {
- UpdateDisplay("1280x800");
- int64 display_id = Shell::GetScreen()->GetPrimaryDisplay().id();
- display_manager()->SetDisplayUIScale(display_id, 1.125f);
- EXPECT_EQ(1.0, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 0.8f);
- EXPECT_EQ(1.0f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 0.75f);
- EXPECT_EQ(1.0f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 0.625f);
- EXPECT_EQ(1.0f, GetDisplayInfoAt(0).configured_ui_scale());
-
- gfx::Display::SetInternalDisplayId(display_id);
-
- display_manager()->SetDisplayUIScale(display_id, 1.5f);
- EXPECT_EQ(1.0f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 1.25f);
- EXPECT_EQ(1.0f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 1.125f);
- EXPECT_EQ(1.125f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 0.8f);
- EXPECT_EQ(0.8f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 0.75f);
- EXPECT_EQ(0.8f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 0.625f);
- EXPECT_EQ(0.625f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 0.6f);
- EXPECT_EQ(0.625f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 0.5f);
- EXPECT_EQ(0.5f, GetDisplayInfoAt(0).configured_ui_scale());
-
- UpdateDisplay("1366x768");
- display_manager()->SetDisplayUIScale(display_id, 1.5f);
- EXPECT_EQ(1.0f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 1.25f);
- EXPECT_EQ(1.0f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 1.125f);
- EXPECT_EQ(1.125f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 0.8f);
- EXPECT_EQ(1.125f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 0.75f);
- EXPECT_EQ(0.75f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 0.6f);
- EXPECT_EQ(0.6f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 0.625f);
- EXPECT_EQ(0.6f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 0.5f);
- EXPECT_EQ(0.5f, GetDisplayInfoAt(0).configured_ui_scale());
-
- UpdateDisplay("1280x850*2");
- EXPECT_EQ(1.0f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 1.5f);
- EXPECT_EQ(1.5f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 1.25f);
- EXPECT_EQ(1.25f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 1.125f);
- EXPECT_EQ(1.125f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 1.0f);
- EXPECT_EQ(1.0f, GetDisplayInfoAt(0).configured_ui_scale());
- gfx::Display display = Shell::GetScreen()->GetPrimaryDisplay();
- EXPECT_EQ(2.0f, display.device_scale_factor());
- EXPECT_EQ("640x425", display.bounds().size().ToString());
-
- display_manager()->SetDisplayUIScale(display_id, 0.8f);
- EXPECT_EQ(0.8f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 0.75f);
- EXPECT_EQ(0.8f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 0.625f);
- EXPECT_EQ(0.625f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 0.6f);
- EXPECT_EQ(0.625f, GetDisplayInfoAt(0).configured_ui_scale());
- display_manager()->SetDisplayUIScale(display_id, 0.5f);
- EXPECT_EQ(0.5f, GetDisplayInfoAt(0).configured_ui_scale());
-
- display_manager()->SetDisplayUIScale(display_id, 2.0f);
- EXPECT_EQ(2.0f, GetDisplayInfoAt(0).configured_ui_scale());
- EXPECT_EQ(1.0f, GetDisplayInfoAt(0).GetEffectiveUIScale());
- display = Shell::GetScreen()->GetPrimaryDisplay();
- EXPECT_EQ(1.0f, display.device_scale_factor());
- EXPECT_EQ("1280x850", display.bounds().size().ToString());
-}
-
-
-#if defined(OS_WIN)
-// TODO(scottmg): RootWindow doesn't get resized on Windows
-// Ash. http://crbug.com/247916.
-#define MAYBE_UpdateMouseCursorAfterRotateZoom DISABLED_UpdateMouseCursorAfterRotateZoom
-#else
-#define MAYBE_UpdateMouseCursorAfterRotateZoom UpdateMouseCursorAfterRotateZoom
-#endif
-
-TEST_F(DisplayManagerTest, MAYBE_UpdateMouseCursorAfterRotateZoom) {
- // Make sure just rotating will not change native location.
- UpdateDisplay("300x200,200x150");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- aura::Env* env = aura::Env::GetInstance();
-
- aura::test::EventGenerator generator1(root_windows[0]);
- aura::test::EventGenerator generator2(root_windows[1]);
-
- // Test on 1st display.
- generator1.MoveMouseToInHost(150, 50);
- EXPECT_EQ("150,50", env->last_mouse_location().ToString());
- UpdateDisplay("300x200/r,200x150");
- EXPECT_EQ("50,149", env->last_mouse_location().ToString());
-
- // Test on 2nd display.
- generator2.MoveMouseToInHost(50, 100);
- EXPECT_EQ("250,100", env->last_mouse_location().ToString());
- UpdateDisplay("300x200/r,200x150/l");
- EXPECT_EQ("249,50", env->last_mouse_location().ToString());
-
- // The native location is now outside, so move to the center
- // of closest display.
- UpdateDisplay("300x200/r,100x50/l");
- EXPECT_EQ("225,50", env->last_mouse_location().ToString());
-
- // Make sure just zooming will not change native location.
- UpdateDisplay("600x400*2,400x300");
-
- // Test on 1st display.
- generator1.MoveMouseToInHost(200, 300);
- EXPECT_EQ("100,150", env->last_mouse_location().ToString());
- UpdateDisplay("600x400*2@1.5,400x300");
- EXPECT_EQ("150,225", env->last_mouse_location().ToString());
-
- // Test on 2nd display.
- UpdateDisplay("600x400,400x300*2");
- generator2.MoveMouseToInHost(200, 250);
- EXPECT_EQ("700,125", env->last_mouse_location().ToString());
- UpdateDisplay("600x400,400x300*2@1.5");
- EXPECT_EQ("750,187", env->last_mouse_location().ToString());
-
- // The native location is now outside, so move to the
- // center of closest display.
- UpdateDisplay("600x400,400x200*2@1.5");
- EXPECT_EQ("750,75", env->last_mouse_location().ToString());
-}
-
-class TestDisplayObserver : public gfx::DisplayObserver {
- public:
- TestDisplayObserver() : changed_(false) {}
- virtual ~TestDisplayObserver() {}
-
- // gfx::DisplayObserver overrides:
- virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE {
- }
- virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE {
- // Mirror window should already be delete before restoring
- // the external dispay.
- EXPECT_FALSE(test_api.GetRootWindow());
- changed_ = true;
- }
- virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE {
- // Mirror window should not be created until the external display
- // is removed.
- EXPECT_FALSE(test_api.GetRootWindow());
- changed_ = true;
- }
-
- bool changed_and_reset() {
- bool changed = changed_;
- changed_ = false;
- return changed;
- }
-
- private:
- test::MirrorWindowTestApi test_api;
- bool changed_;
-
- DISALLOW_COPY_AND_ASSIGN(TestDisplayObserver);
-};
-
-TEST_F(DisplayManagerTest, SoftwareMirroring) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("300x400,400x500");
-
- test::MirrorWindowTestApi test_api;
- EXPECT_EQ(NULL, test_api.GetRootWindow());
-
- TestDisplayObserver display_observer;
- Shell::GetScreen()->AddObserver(&display_observer);
-
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- display_manager->SetSecondDisplayMode(DisplayManager::MIRRORING);
- display_manager->UpdateDisplays();
- EXPECT_TRUE(display_observer.changed_and_reset());
- EXPECT_EQ(1U, display_manager->GetNumDisplays());
- EXPECT_EQ("0,0 300x400",
- Shell::GetScreen()->GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ("400x500",
- test_api.GetRootWindow()->host()->GetBounds().size().ToString());
- EXPECT_EQ("300x400",
- test_api.GetRootWindow()->window()->bounds().size().ToString());
- EXPECT_TRUE(display_manager->IsMirrored());
-
- display_manager->SetMirrorMode(false);
- EXPECT_TRUE(display_observer.changed_and_reset());
- EXPECT_EQ(NULL, test_api.GetRootWindow());
- EXPECT_EQ(2U, display_manager->GetNumDisplays());
- EXPECT_FALSE(display_manager->IsMirrored());
-
- // Make sure the mirror window has the pixel size of the
- // source display.
- display_manager->SetMirrorMode(true);
- EXPECT_TRUE(display_observer.changed_and_reset());
-
- UpdateDisplay("300x400@0.5,400x500");
- EXPECT_FALSE(display_observer.changed_and_reset());
- EXPECT_EQ("300x400",
- test_api.GetRootWindow()->window()->bounds().size().ToString());
-
- UpdateDisplay("310x410*2,400x500");
- EXPECT_FALSE(display_observer.changed_and_reset());
- EXPECT_EQ("310x410",
- test_api.GetRootWindow()->window()->bounds().size().ToString());
-
- UpdateDisplay("320x420/r,400x500");
- EXPECT_FALSE(display_observer.changed_and_reset());
- EXPECT_EQ("320x420",
- test_api.GetRootWindow()->window()->bounds().size().ToString());
-
- UpdateDisplay("330x440/r,400x500");
- EXPECT_FALSE(display_observer.changed_and_reset());
- EXPECT_EQ("330x440",
- test_api.GetRootWindow()->window()->bounds().size().ToString());
-
- // Overscan insets are ignored.
- UpdateDisplay("400x600/o,600x800/o");
- EXPECT_FALSE(display_observer.changed_and_reset());
- EXPECT_EQ("400x600",
- test_api.GetRootWindow()->window()->bounds().size().ToString());
-
- Shell::GetScreen()->RemoveObserver(&display_observer);
-}
-
-TEST_F(DisplayManagerTest, MirroredLayout) {
- if (!SupportsMultipleDisplays())
- return;
-
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- UpdateDisplay("500x500,400x400");
- EXPECT_FALSE(display_manager->GetCurrentDisplayLayout().mirrored);
- EXPECT_EQ(2, Shell::GetScreen()->GetNumDisplays());
- EXPECT_EQ(2U, display_manager->num_connected_displays());
-
- UpdateDisplay("1+0-500x500,1+0-500x500");
- EXPECT_TRUE(display_manager->GetCurrentDisplayLayout().mirrored);
- EXPECT_EQ(1, Shell::GetScreen()->GetNumDisplays());
- EXPECT_EQ(2U, display_manager->num_connected_displays());
-
- UpdateDisplay("500x500,500x500");
- EXPECT_FALSE(display_manager->GetCurrentDisplayLayout().mirrored);
- EXPECT_EQ(2, Shell::GetScreen()->GetNumDisplays());
- EXPECT_EQ(2U, display_manager->num_connected_displays());
-}
-
-TEST_F(DisplayManagerTest, InvertLayout) {
- EXPECT_EQ("left, 0",
- DisplayLayout(DisplayLayout::RIGHT, 0).Invert().ToString());
- EXPECT_EQ("left, -100",
- DisplayLayout(DisplayLayout::RIGHT, 100).Invert().ToString());
- EXPECT_EQ("left, 50",
- DisplayLayout(DisplayLayout::RIGHT, -50).Invert().ToString());
-
- EXPECT_EQ("right, 0",
- DisplayLayout(DisplayLayout::LEFT, 0).Invert().ToString());
- EXPECT_EQ("right, -90",
- DisplayLayout(DisplayLayout::LEFT, 90).Invert().ToString());
- EXPECT_EQ("right, 60",
- DisplayLayout(DisplayLayout::LEFT, -60).Invert().ToString());
-
- EXPECT_EQ("bottom, 0",
- DisplayLayout(DisplayLayout::TOP, 0).Invert().ToString());
- EXPECT_EQ("bottom, -80",
- DisplayLayout(DisplayLayout::TOP, 80).Invert().ToString());
- EXPECT_EQ("bottom, 70",
- DisplayLayout(DisplayLayout::TOP, -70).Invert().ToString());
-
- EXPECT_EQ("top, 0",
- DisplayLayout(DisplayLayout::BOTTOM, 0).Invert().ToString());
- EXPECT_EQ("top, -70",
- DisplayLayout(DisplayLayout::BOTTOM, 70).Invert().ToString());
- EXPECT_EQ("top, 80",
- DisplayLayout(DisplayLayout::BOTTOM, -80).Invert().ToString());
-}
-
-#if defined(OS_WIN)
-// TODO(scottmg): RootWindow doesn't get resized on Windows
-// Ash. http://crbug.com/247916.
-#define MAYBE_UpdateDisplayWithHostOrigin DISABLED_UpdateDisplayWithHostOrigin
-#else
-#define MAYBE_UpdateDisplayWithHostOrigin UpdateDisplayWithHostOrigin
-#endif
-
-TEST_F(DisplayManagerTest, MAYBE_UpdateDisplayWithHostOrigin) {
- UpdateDisplay("100x200,300x400");
- ASSERT_EQ(2, Shell::GetScreen()->GetNumDisplays());
- aura::Window::Windows root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- ASSERT_EQ(2U, root_windows.size());
- aura::WindowEventDispatcher* dispatcher0 = root_windows[0]->GetDispatcher();
- aura::WindowEventDispatcher* dispatcher1 = root_windows[1]->GetDispatcher();
-
- EXPECT_EQ("1,1", dispatcher0->host()->GetBounds().origin().ToString());
- EXPECT_EQ("100x200", dispatcher0->host()->GetBounds().size().ToString());
- // UpdateDisplay set the origin if it's not set.
- EXPECT_NE("1,1", dispatcher1->host()->GetBounds().origin().ToString());
- EXPECT_EQ("300x400", dispatcher1->host()->GetBounds().size().ToString());
-
- UpdateDisplay("100x200,200+300-300x400");
- ASSERT_EQ(2, Shell::GetScreen()->GetNumDisplays());
- EXPECT_EQ("0,0", dispatcher0->host()->GetBounds().origin().ToString());
- EXPECT_EQ("100x200", dispatcher0->host()->GetBounds().size().ToString());
- EXPECT_EQ("200,300", dispatcher1->host()->GetBounds().origin().ToString());
- EXPECT_EQ("300x400", dispatcher1->host()->GetBounds().size().ToString());
-
- UpdateDisplay("400+500-200x300,300x400");
- ASSERT_EQ(2, Shell::GetScreen()->GetNumDisplays());
- EXPECT_EQ("400,500", dispatcher0->host()->GetBounds().origin().ToString());
- EXPECT_EQ("200x300", dispatcher0->host()->GetBounds().size().ToString());
- EXPECT_EQ("0,0", dispatcher1->host()->GetBounds().origin().ToString());
- EXPECT_EQ("300x400", dispatcher1->host()->GetBounds().size().ToString());
-
- UpdateDisplay("100+200-100x200,300+500-200x300");
- ASSERT_EQ(2, Shell::GetScreen()->GetNumDisplays());
- EXPECT_EQ("100,200", dispatcher0->host()->GetBounds().origin().ToString());
- EXPECT_EQ("100x200", dispatcher0->host()->GetBounds().size().ToString());
- EXPECT_EQ("300,500", dispatcher1->host()->GetBounds().origin().ToString());
- EXPECT_EQ("200x300", dispatcher1->host()->GetBounds().size().ToString());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/display_pref_util.h b/chromium/ash/display/display_pref_util.h
deleted file mode 100644
index 5047774c479..00000000000
--- a/chromium/ash/display/display_pref_util.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_DISPLAY_PREF_UTIL_H
-#define ASH_DISPLAY_DISPLAY_PREF_UTIL_H
-
-#include <map>
-#include <string>
-
-#include "base/strings/string_piece.h"
-
-namespace ash {
-
-// Utility templates to create enum to string map and
-// a function to find an enum value from a string.
-template<typename T>
-std::map<T, std::string>* CreateToStringMap(T k1, const std::string& v1,
- T k2, const std::string& v2,
- T k3, const std::string& v3,
- T k4, const std::string& v4) {
- std::map<T, std::string>* map = new std::map<T, std::string>();
- (*map)[k1] = v1;
- (*map)[k2] = v2;
- (*map)[k3] = v3;
- (*map)[k4] = v4;
- return map;
-}
-
-template<typename T>
-std::map<T, std::string>* CreateToStringMap(T k1, const std::string& v1,
- T k2, const std::string& v2,
- T k3, const std::string& v3) {
- std::map<T, std::string>* map = new std::map<T, std::string>();
- (*map)[k1] = v1;
- (*map)[k2] = v2;
- (*map)[k3] = v3;
- return map;
-}
-
-template<typename T>
-bool ReverseFind(const std::map<T, std::string>* map,
- const base::StringPiece& value,
- T* key) {
- typename std::map<T, std::string>::const_iterator iter = map->begin();
- for (;
- iter != map->end();
- ++iter) {
- if (iter->second == value) {
- *key = iter->first;
- return true;
- }
- }
- return false;
-}
-
-} // namespace ash
-
-#endif // ASH_DISPLAY_DISPLAY_PREF_UTIL_H
diff --git a/chromium/ash/display/event_transformation_handler.cc b/chromium/ash/display/event_transformation_handler.cc
deleted file mode 100644
index aaac56c256a..00000000000
--- a/chromium/ash/display/event_transformation_handler.cc
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/event_transformation_handler.h"
-
-#include <cmath>
-
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/dip_util.h"
-#include "ui/events/event.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-
-#if defined(OS_CHROMEOS)
-#include "chromeos/display/output_configurator.h"
-#endif // defined(OS_CHROMEOS)
-
-namespace ash {
-namespace internal {
-namespace {
-
-// Boost factor for non-integrated displays.
-const float kBoostForNonIntegrated = 1.20f;
-}
-
-EventTransformationHandler::EventTransformationHandler()
- : transformation_mode_(TRANSFORM_AUTO) {
-}
-
-EventTransformationHandler::~EventTransformationHandler() {
-}
-
-void EventTransformationHandler::OnScrollEvent(ui::ScrollEvent* event) {
- if (transformation_mode_ == TRANSFORM_NONE)
- return;
-
- // It is unnecessary to scale the event for the device scale factor since
- // the event locations etc. are already in DIP.
- gfx::Point point_in_screen(event->location());
- aura::Window* target = static_cast<aura::Window*>(event->target());
- wm::ConvertPointToScreen(target, &point_in_screen);
- const gfx::Display& display =
- Shell::GetScreen()->GetDisplayNearestPoint(point_in_screen);
-
- // Apply some additional scaling if the display is non-integrated.
- if (!display.IsInternal())
- event->Scale(kBoostForNonIntegrated);
-}
-
-#if defined(OS_CHROMEOS)
-// This is to scale the TouchEvent's radius when the touch display is in
-// mirror mode. TouchEvent's radius is often reported in the touchscreen's
-// native resolution. In mirror mode, the touch display could be configured
-// at a lower resolution. We scale down the radius using the ratio defined as
-// the sqrt of
-// (mirror_width * mirror_height) / (native_width * native_height)
-void EventTransformationHandler::OnTouchEvent(ui::TouchEvent* event) {
- using chromeos::OutputConfigurator;
- OutputConfigurator* output_configurator =
- ash::Shell::GetInstance()->output_configurator();
-
- // Check output_configurator's output_state instead of checking
- // DisplayManager::IsMirrored() because the compositor based mirroring
- // won't cause the scaling issue.
- if (output_configurator->output_state() != chromeos::STATE_DUAL_MIRROR)
- return;
-
- const std::map<int, float>& area_ratio_map =
- output_configurator->GetMirroredDisplayAreaRatioMap();
-
- // TODO(miletus): When there are more than 1 touchscreen (e.g. Link connected
- // to an external touchscreen), the correct way to do is to have a way
- // to find out which touchscreen is the event originating from and use the
- // area ratio of that touchscreen to scale the event's radius.
- // Tracked here crbug.com/233245
- if (area_ratio_map.size() != 1) {
- LOG(ERROR) << "Mirroring mode with " << area_ratio_map.size()
- << " touch display found";
- return;
- }
-
- float area_ratio_sqrt = std::sqrt(area_ratio_map.begin()->second);
- event->set_radius_x(event->radius_x() * area_ratio_sqrt);
- event->set_radius_y(event->radius_y() * area_ratio_sqrt);
-}
-#endif // defined(OS_CHROMEOS)
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/event_transformation_handler.h b/chromium/ash/display/event_transformation_handler.h
deleted file mode 100644
index da9560f81a3..00000000000
--- a/chromium/ash/display/event_transformation_handler.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_EVENT_TRANSFORMATION_HANDLER_H_
-#define ASH_DISPLAY_EVENT_TRANSFORMATION_HANDLER_H_
-
-#include "ash/ash_export.h"
-#include "base/compiler_specific.h"
-#include "ui/events/event_handler.h"
-
-namespace ash {
-
-namespace internal {
-
-// An event filter that transforms input event properties in extended desktop
-// environment.
-class ASH_EXPORT EventTransformationHandler : public ui::EventHandler {
- public:
- enum TransformationMode {
- TRANSFORM_AUTO, // Transform events by the default amount.
- // 1. Linear scaling w.r.t. the device scale factor.
- // 2. Add 20% more for non-integrated displays.
- TRANSFORM_NONE, // No transformation.
- };
-
- EventTransformationHandler();
- virtual ~EventTransformationHandler();
-
- void set_transformation_mode(TransformationMode transformation_mode) {
- transformation_mode_ = transformation_mode;
- }
-
- // Overridden from ui::EventHandler.
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
-#if defined(OS_CHROMEOS)
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
-#endif // defined(OS_CHROMEOS)
-
- private:
- TransformationMode transformation_mode_;
-
- DISALLOW_COPY_AND_ASSIGN(EventTransformationHandler);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DISPLAY_EVENT_TRANSFORMATION_HANDLER_H_
diff --git a/chromium/ash/display/mirror_window_controller.cc b/chromium/ash/display/mirror_window_controller.cc
deleted file mode 100644
index 7e812a4ca79..00000000000
--- a/chromium/ash/display/mirror_window_controller.cc
+++ /dev/null
@@ -1,349 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/mirror_window_controller.h"
-
-#if defined(USE_X11)
-#include <X11/Xlib.h>
-
-// Xlib.h defines RootWindow.
-#undef RootWindow
-#endif
-
-#include "ash/display/display_controller.h"
-#include "ash/display/display_info.h"
-#include "ash/display/display_manager.h"
-#include "ash/display/root_window_transformers.h"
-#include "ash/host/root_window_host_factory.h"
-#include "ash/root_window_settings.h"
-#include "ash/shell.h"
-#include "base/strings/stringprintf.h"
-#include "ui/aura/client/capture_client.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/root_window_transformer.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/base/cursor/cursors_aura.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/layout.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/compositor/reflector.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/gfx/image/image_skia_operations.h"
-#include "ui/gfx/native_widget_types.h"
-
-#if defined(USE_X11)
-#include "ui/gfx/x/x11_types.h"
-#endif
-
-namespace ash {
-namespace internal {
-namespace {
-
-#if defined(USE_X11)
-// Mirror window shouldn't handle input events.
-void DisableInput(XID window) {
- long event_mask = ExposureMask | VisibilityChangeMask |
- StructureNotifyMask | PropertyChangeMask;
- XSelectInput(gfx::GetXDisplay(), window, event_mask);
-}
-#endif
-
-class NoneCaptureClient : public aura::client::CaptureClient {
- public:
- NoneCaptureClient() {}
- virtual ~NoneCaptureClient() {}
-
- private:
- // Does a capture on the |window|.
- virtual void SetCapture(aura::Window* window) OVERRIDE {}
-
- // Releases a capture from the |window|.
- virtual void ReleaseCapture(aura::Window* window) OVERRIDE {}
-
- // Returns the current capture window.
- virtual aura::Window* GetCaptureWindow() OVERRIDE {
- return NULL;
- }
- virtual aura::Window* GetGlobalCaptureWindow() OVERRIDE {
- return NULL;
- }
-
- DISALLOW_COPY_AND_ASSIGN(NoneCaptureClient);
-};
-
-} // namespace
-
-class CursorWindowDelegate : public aura::WindowDelegate {
- public:
- CursorWindowDelegate() {}
- virtual ~CursorWindowDelegate() {}
-
- // aura::WindowDelegate overrides:
- virtual gfx::Size GetMinimumSize() const OVERRIDE {
- return size_;
- }
- virtual gfx::Size GetMaximumSize() const OVERRIDE {
- return size_;
- }
- virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE {
- }
- virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE {
- return gfx::kNullCursor;
- }
- virtual int GetNonClientComponent(
- const gfx::Point& point) const OVERRIDE {
- return HTNOWHERE;
- }
- virtual bool ShouldDescendIntoChildForEventHandling(
- aura::Window* child,
- const gfx::Point& location) OVERRIDE {
- return false;
- }
- virtual bool CanFocus() OVERRIDE {
- return false;
- }
- virtual void OnCaptureLost() OVERRIDE {
- }
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- canvas->DrawImageInt(cursor_image_, 0, 0);
- }
- virtual void OnDeviceScaleFactorChanged(
- float device_scale_factor) OVERRIDE {
- }
- virtual void OnWindowDestroying() OVERRIDE {}
- virtual void OnWindowDestroyed() OVERRIDE {}
- virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE {
- }
- virtual bool HasHitTestMask() const OVERRIDE {
- return false;
- }
- virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE {}
- virtual void DidRecreateLayer(ui::Layer* old_layer,
- ui::Layer* new_layer) OVERRIDE {}
-
- // Set the cursor image for the |display|'s scale factor. Note that
- // mirror window's scale factor is always 1.0f, therefore we need to
- // take 2x's image and paint as if it's 1x image.
- void SetCursorImage(const gfx::ImageSkia& image,
- const gfx::Display& display) {
- const gfx::ImageSkiaRep& image_rep =
- image.GetRepresentation(display.device_scale_factor());
- size_ = image_rep.pixel_size();
- cursor_image_ = gfx::ImageSkia::CreateFrom1xBitmap(image_rep.sk_bitmap());
- }
-
- const gfx::Size size() const { return size_; }
-
- private:
- gfx::ImageSkia cursor_image_;
- gfx::Size size_;
-
- DISALLOW_COPY_AND_ASSIGN(CursorWindowDelegate);
-};
-
-MirrorWindowController::MirrorWindowController()
- : current_cursor_type_(ui::kCursorNone),
- current_cursor_rotation_(gfx::Display::ROTATE_0),
- cursor_window_(NULL),
- cursor_window_delegate_(new CursorWindowDelegate) {
-}
-
-MirrorWindowController::~MirrorWindowController() {
- // Make sure the root window gets deleted before cursor_window_delegate.
- Close();
-}
-
-void MirrorWindowController::UpdateWindow(const DisplayInfo& display_info) {
- static int mirror_root_window_count = 0;
-
- if (!root_window_.get()) {
- const gfx::Rect& bounds_in_native = display_info.bounds_in_native();
- aura::RootWindow::CreateParams params(bounds_in_native);
- params.host = Shell::GetInstance()->root_window_host_factory()->
- CreateRootWindowHost(bounds_in_native);
- root_window_.reset(new aura::RootWindow(params));
- root_window_->window()->SetName(
- base::StringPrintf("MirrorRootWindow-%d", mirror_root_window_count++));
- root_window_->compositor()->SetBackgroundColor(SK_ColorBLACK);
- // No need to remove RootWindowObserver because
- // the DisplayController object outlives RootWindow objects.
- root_window_->AddRootWindowObserver(
- Shell::GetInstance()->display_controller());
- root_window_->AddRootWindowObserver(this);
- // TODO(oshima): TouchHUD is using idkey.
- InitRootWindowSettings(root_window_->window())->display_id =
- display_info.id();
- root_window_->Init();
-#if defined(USE_X11)
- DisableInput(root_window_->host()->GetAcceleratedWidget());
-#endif
-
- aura::client::SetCaptureClient(root_window_->window(),
- new NoneCaptureClient());
- root_window_->host()->Show();
-
- // TODO(oshima): Start mirroring.
- aura::Window* mirror_window = new aura::Window(NULL);
- mirror_window->Init(ui::LAYER_TEXTURED);
- root_window_->window()->AddChild(mirror_window);
- mirror_window->SetBounds(root_window_->window()->bounds());
- mirror_window->Show();
- reflector_ = ui::ContextFactory::GetInstance()->CreateReflector(
- Shell::GetPrimaryRootWindow()->GetDispatcher()->compositor(),
- mirror_window->layer());
-
- cursor_window_ = new aura::Window(cursor_window_delegate_.get());
- cursor_window_->SetTransparent(true);
- cursor_window_->Init(ui::LAYER_TEXTURED);
- root_window_->window()->AddChild(cursor_window_);
- cursor_window_->Show();
- } else {
- GetRootWindowSettings(root_window_->window())->display_id =
- display_info.id();
- root_window_->SetHostBounds(display_info.bounds_in_native());
- }
-
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- const DisplayInfo& source_display_info = display_manager->GetDisplayInfo(
- Shell::GetScreen()->GetPrimaryDisplay().id());
- DCHECK(display_manager->IsMirrored());
- scoped_ptr<aura::RootWindowTransformer> transformer(
- internal::CreateRootWindowTransformerForMirroredDisplay(
- source_display_info,
- display_info));
- root_window_->SetRootWindowTransformer(transformer.Pass());
-
- UpdateCursorLocation();
-}
-
-void MirrorWindowController::UpdateWindow() {
- if (root_window_.get()) {
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- const DisplayInfo& mirror_display_info = display_manager->GetDisplayInfo(
- display_manager->mirrored_display_id());
- UpdateWindow(mirror_display_info);
- }
-}
-
-void MirrorWindowController::Close() {
- if (root_window_.get()) {
- ui::ContextFactory::GetInstance()->RemoveReflector(reflector_);
- reflector_ = NULL;
- NoneCaptureClient* capture_client = static_cast<NoneCaptureClient*>(
- aura::client::GetCaptureClient(root_window_->window()));
- aura::client::SetCaptureClient(root_window_->window(), NULL);
- delete capture_client;
-
- root_window_->RemoveRootWindowObserver(
- Shell::GetInstance()->display_controller());
- root_window_->RemoveRootWindowObserver(this);
- root_window_.reset();
- cursor_window_ = NULL;
- }
-}
-
-void MirrorWindowController::UpdateCursorLocation() {
- if (cursor_window_) {
- // TODO(oshima): Rotate cursor image (including hotpoint).
- gfx::Point point = aura::Env::GetInstance()->last_mouse_location();
- Shell::GetPrimaryRootWindow()->GetDispatcher()->ConvertPointToHost(&point);
- point.Offset(-hot_point_.x(), -hot_point_.y());
- gfx::Rect bounds = cursor_window_->bounds();
- bounds.set_origin(point);
- cursor_window_->SetBounds(bounds);
- }
-}
-
-void MirrorWindowController::SetMirroredCursor(gfx::NativeCursor cursor) {
- const gfx::Display& display = Shell::GetScreen()->GetPrimaryDisplay();
- if (current_cursor_type_ == cursor.native_type() &&
- current_cursor_rotation_ == display.rotation())
- return;
- current_cursor_type_ = cursor.native_type();
- current_cursor_rotation_ = display.rotation();
- int resource_id;
- bool success = ui::GetCursorDataFor(
- ui::CURSOR_SET_NORMAL, // Not support custom cursor set.
- current_cursor_type_,
- display.device_scale_factor(),
- &resource_id,
- &hot_point_);
- if (!success)
- return;
- const gfx::ImageSkia* image =
- ResourceBundle::GetSharedInstance().GetImageSkiaNamed(resource_id);
- gfx::ImageSkia rotated = *image;
- switch (current_cursor_rotation_) {
- case gfx::Display::ROTATE_0:
- break;
- case gfx::Display::ROTATE_90:
- rotated = gfx::ImageSkiaOperations::CreateRotatedImage(
- *image, SkBitmapOperations::ROTATION_90_CW);
- hot_point_.SetPoint(
- rotated.width() - hot_point_.y(),
- hot_point_.x());
- break;
- case gfx::Display::ROTATE_180:
- rotated = gfx::ImageSkiaOperations::CreateRotatedImage(
- *image, SkBitmapOperations::ROTATION_180_CW);
- hot_point_.SetPoint(
- rotated.height() - hot_point_.x(),
- rotated.width() - hot_point_.y());
- break;
- case gfx::Display::ROTATE_270:
- rotated = gfx::ImageSkiaOperations::CreateRotatedImage(
- *image, SkBitmapOperations::ROTATION_270_CW);
- hot_point_.SetPoint(
- hot_point_.y(),
- rotated.height() - hot_point_.x());
- break;
- }
- cursor_window_delegate_->SetCursorImage(rotated, display);
-
- if (cursor_window_) {
- cursor_window_->SetBounds(gfx::Rect(cursor_window_delegate_->size()));
- cursor_window_->SchedulePaintInRect(
- gfx::Rect(cursor_window_->bounds().size()));
- UpdateCursorLocation();
- }
-}
-
-void MirrorWindowController::SetMirroredCursorVisibility(bool visible) {
- if (cursor_window_)
- visible ? cursor_window_->Show() : cursor_window_->Hide();
-}
-
-void MirrorWindowController::OnRootWindowHostResized(
- const aura::RootWindow* root) {
- // Do not use |old_size| as it contains RootWindow's (but not host's) size,
- // and this parameter wil be removed soon.
- if (mirror_window_host_size_ == root->host()->GetBounds().size())
- return;
- mirror_window_host_size_ = root->host()->GetBounds().size();
- reflector_->OnMirroringCompositorResized();
- root_window_->SetRootWindowTransformer(
- CreateRootWindowTransformer().Pass());
- UpdateCursorLocation();
-}
-
-
-scoped_ptr<aura::RootWindowTransformer>
-MirrorWindowController::CreateRootWindowTransformer() const {
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- const DisplayInfo& mirror_display_info = display_manager->GetDisplayInfo(
- display_manager->mirrored_display_id());
- const DisplayInfo& source_display_info = display_manager->GetDisplayInfo(
- Shell::GetScreen()->GetPrimaryDisplay().id());
- DCHECK(display_manager->IsMirrored());
- return scoped_ptr<aura::RootWindowTransformer>(
- internal::CreateRootWindowTransformerForMirroredDisplay(
- source_display_info,
- mirror_display_info));
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/mirror_window_controller.h b/chromium/ash/display/mirror_window_controller.h
deleted file mode 100644
index 13460d7239b..00000000000
--- a/chromium/ash/display/mirror_window_controller.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_
-#define ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "base/compiler_specific.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/root_window_observer.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/native_widget_types.h"
-#include "ui/gfx/point.h"
-#include "ui/gfx/size.h"
-
-namespace aura {
-class RootWindow;
-class RootWindowTransformer;
-class Window;
-}
-
-namespace ui {
-class Reflector;
-}
-
-namespace ash {
-namespace test{
-class MirrorWindowTestApi;
-}
-
-namespace internal {
-class DisplayInfo;
-class CursorWindowDelegate;
-
-// An object that copies the content of the primary root window to a
-// mirror window. This also draws a mouse cursor as the mouse cursor
-// is typically drawn by the window system.
-class ASH_EXPORT MirrorWindowController : public aura::RootWindowObserver {
- public:
- MirrorWindowController();
- virtual ~MirrorWindowController();
-
- // Updates the root window's bounds using |display_info|.
- // Creates the new root window if one doesn't exist.
- void UpdateWindow(const DisplayInfo& display_info);
-
- // Same as above, but using existing display info
- // for the mirrored display.
- void UpdateWindow();
-
- // Close the mirror window.
- void Close();
-
- // Updates the mirrored cursor location,shape and
- // visibility.
- void UpdateCursorLocation();
- void SetMirroredCursor(gfx::NativeCursor cursor);
- void SetMirroredCursorVisibility(bool visible);
-
- // aura::RootWindowObserver overrides:
- virtual void OnRootWindowHostResized(const aura::RootWindow* root) OVERRIDE;
-
- private:
- friend class test::MirrorWindowTestApi;
-
- // Creates a RootWindowTransformer for current display
- // configuration.
- scoped_ptr<aura::RootWindowTransformer> CreateRootWindowTransformer() const;
-
- int current_cursor_type_;
- gfx::Display::Rotation current_cursor_rotation_;
- aura::Window* cursor_window_; // owned by root window.
- scoped_ptr<aura::RootWindow> root_window_;
- scoped_ptr<CursorWindowDelegate> cursor_window_delegate_;
- gfx::Point hot_point_;
- gfx::Size mirror_window_host_size_;
- scoped_refptr<ui::Reflector> reflector_;
-
- DISALLOW_COPY_AND_ASSIGN(MirrorWindowController);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_
diff --git a/chromium/ash/display/mirror_window_controller_unittest.cc b/chromium/ash/display/mirror_window_controller_unittest.cc
deleted file mode 100644
index a94f285700a..00000000000
--- a/chromium/ash/display/mirror_window_controller_unittest.cc
+++ /dev/null
@@ -1,291 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/mirror_window_controller.h"
-
-#include "ash/ash_switches.h"
-#include "ash/display/display_manager.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/display_manager_test_api.h"
-#include "ash/test/mirror_window_test_api.h"
-#include "base/command_line.h"
-#include "base/strings/stringprintf.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/base/hit_test.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-DisplayInfo CreateDisplayInfo(int64 id, const gfx::Rect& bounds) {
- DisplayInfo info(id, base::StringPrintf("x-%d", static_cast<int>(id)), false);
- info.SetBounds(bounds);
- return info;
-}
-
-class MirrorOnBootTest : public test::AshTestBase {
- public:
- MirrorOnBootTest() {}
- virtual ~MirrorOnBootTest() {}
-
- virtual void SetUp() OVERRIDE {
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kAshHostWindowBounds, "1+1-300x300,1+301-300x300");
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kAshEnableSoftwareMirroring);
- test::AshTestBase::SetUp();
- }
- virtual void TearDown() OVERRIDE {
- test::AshTestBase::TearDown();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MirrorOnBootTest);
-};
-
-}
-
-typedef test::AshTestBase MirrorWindowControllerTest;
-
-#if defined(OS_WIN)
-// Software mirroring does not work on win.
-#define MAYBE_MirrorCursorBasic DISABLED_MirrorCursorBasic
-#define MAYBE_MirrorCursorLocations DISABLED_MirrorCursorLocations
-#define MAYBE_MirrorCursorRotate DISABLED_MirrorCursorRotate
-#define MAYBE_DockMode DISABLED_DockMode
-#define MAYBE_MirrorOnBoot DISABLED_MirrorOnBoot
-#else
-#define MAYBE_MirrorCursorBasic MirrorCursorBasic
-#define MAYBE_MirrorCursorLocations MirrorCursorLocations
-#define MAYBE_MirrorCursorRotate MirrorCursorRotate
-#define MAYBE_DockMode DockMode
-#define MAYBE_MirrorOnBoot MirrorOnBoot
-#endif
-
-TEST_F(MirrorWindowControllerTest, MAYBE_MirrorCursorBasic) {
- test::MirrorWindowTestApi test_api;
- aura::test::TestWindowDelegate test_window_delegate;
- test_window_delegate.set_window_component(HTTOP);
-
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- display_manager->SetSecondDisplayMode(DisplayManager::MIRRORING);
- UpdateDisplay("400x400,400x400");
- aura::Window* root = Shell::GetInstance()->GetPrimaryRootWindow();
- scoped_ptr<aura::Window> window(aura::test::CreateTestWindowWithDelegate(
- &test_window_delegate,
- 0,
- gfx::Rect(50, 50, 100, 100),
- root));
- window->Show();
- window->SetName("foo");
-
- EXPECT_TRUE(test_api.GetCursorWindow());
- EXPECT_EQ("50,50 100x100", window->bounds().ToString());
-
- aura::test::EventGenerator generator(root);
- generator.MoveMouseTo(10, 10);
-
- // Test if cursor movement is propertly reflected in mirror window.
- gfx::Point hot_point = test_api.GetCursorHotPoint();
- gfx::Point cursor_window_origin =
- test_api.GetCursorWindow()->bounds().origin();
- EXPECT_EQ("4,4", hot_point.ToString());
- EXPECT_EQ(10 - hot_point.x(), cursor_window_origin.x());
- EXPECT_EQ(10 - hot_point.y(), cursor_window_origin.y());
- EXPECT_EQ(ui::kCursorNull, test_api.GetCurrentCursorType());
- EXPECT_TRUE(test_api.GetCursorWindow()->IsVisible());
-
- // Test if cursor type change is propertly reflected in mirror window.
- generator.MoveMouseTo(100, 100);
- hot_point = test_api.GetCursorHotPoint();
- cursor_window_origin = test_api.GetCursorWindow()->bounds().origin();
- EXPECT_EQ(100 - hot_point.x(), cursor_window_origin.x());
- EXPECT_EQ(100 - hot_point.y(), cursor_window_origin.y());
- EXPECT_EQ(ui::kCursorNorthResize, test_api.GetCurrentCursorType());
-
- // Test if visibility change is propertly reflected in mirror window.
- // A key event hides cursor.
- generator.PressKey(ui::VKEY_A, 0);
- generator.ReleaseKey(ui::VKEY_A, 0);
- EXPECT_FALSE(test_api.GetCursorWindow()->IsVisible());
-
- // Mouse event makes it visible again.
- generator.MoveMouseTo(300, 300);
- hot_point = test_api.GetCursorHotPoint();
- cursor_window_origin = test_api.GetCursorWindow()->bounds().origin();
- EXPECT_EQ(300 - hot_point.x(), cursor_window_origin.x());
- EXPECT_EQ(300 - hot_point.y(), cursor_window_origin.y());
- EXPECT_EQ(ui::kCursorNull, test_api.GetCurrentCursorType());
- EXPECT_TRUE(test_api.GetCursorWindow()->IsVisible());
-}
-
-TEST_F(MirrorWindowControllerTest, MAYBE_MirrorCursorRotate) {
- test::MirrorWindowTestApi test_api;
- aura::test::TestWindowDelegate test_window_delegate;
- test_window_delegate.set_window_component(HTTOP);
-
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- display_manager->SetSecondDisplayMode(DisplayManager::MIRRORING);
- UpdateDisplay("400x400,400x400");
- aura::Window* root = Shell::GetInstance()->GetPrimaryRootWindow();
- scoped_ptr<aura::Window> window(aura::test::CreateTestWindowWithDelegate(
- &test_window_delegate,
- 0,
- gfx::Rect(50, 50, 100, 100),
- root));
- window->Show();
- window->SetName("foo");
-
- EXPECT_TRUE(test_api.GetCursorWindow());
- EXPECT_EQ("50,50 100x100", window->bounds().ToString());
-
- aura::test::EventGenerator generator(root);
- generator.MoveMouseToInHost(100, 100);
-
- // Test if cursor movement is propertly reflected in mirror window.
- gfx::Point hot_point = test_api.GetCursorHotPoint();
- gfx::Point cursor_window_origin =
- test_api.GetCursorWindow()->bounds().origin();
- EXPECT_EQ("11,12", hot_point.ToString());
- EXPECT_EQ(100 - hot_point.x(), cursor_window_origin.x());
- EXPECT_EQ(100 - hot_point.y(), cursor_window_origin.y());
- EXPECT_EQ(ui::kCursorNorthResize, test_api.GetCurrentCursorType());
-
- UpdateDisplay("400x400/r,400x400"); // 90 degrees.
- generator.MoveMouseToInHost(300, 100);
- hot_point = test_api.GetCursorHotPoint();
- cursor_window_origin = test_api.GetCursorWindow()->bounds().origin();
- EXPECT_EQ(ui::kCursorNorthResize, test_api.GetCurrentCursorType());
- // The size of cursor image is 25x25, so the rotated hot point must
- // be (25-12, 11).
- EXPECT_EQ("13,11", hot_point.ToString());
- EXPECT_EQ(300 - hot_point.x(), cursor_window_origin.x());
- EXPECT_EQ(100 - hot_point.y(), cursor_window_origin.y());
-
- UpdateDisplay("400x400/u,400x400"); // 180 degrees.
- generator.MoveMouseToInHost(300, 300);
- hot_point = test_api.GetCursorHotPoint();
- cursor_window_origin = test_api.GetCursorWindow()->bounds().origin();
- EXPECT_EQ(ui::kCursorNorthResize, test_api.GetCurrentCursorType());
- // Rotated hot point must be (25-11, 25-12).
- EXPECT_EQ("14,13", hot_point.ToString());
- EXPECT_EQ(300 - hot_point.x(), cursor_window_origin.x());
- EXPECT_EQ(300 - hot_point.y(), cursor_window_origin.y());
-
- UpdateDisplay("400x400/l,400x400"); // 270 degrees.
- generator.MoveMouseToInHost(100, 300);
- hot_point = test_api.GetCursorHotPoint();
- cursor_window_origin = test_api.GetCursorWindow()->bounds().origin();
- EXPECT_EQ(ui::kCursorNorthResize, test_api.GetCurrentCursorType());
- // Rotated hot point must be (12, 25-11).
- EXPECT_EQ("12,14", hot_point.ToString());
- EXPECT_EQ(100 - hot_point.x(), cursor_window_origin.x());
- EXPECT_EQ(300 - hot_point.y(), cursor_window_origin.y());
-}
-
-// Make sure that the mirror cursor's location is same as
-// the source display's host location in the mirror root window's
-// coordinates.
-TEST_F(MirrorWindowControllerTest, MAYBE_MirrorCursorLocations) {
- test::MirrorWindowTestApi test_api;
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- display_manager->SetSecondDisplayMode(DisplayManager::MIRRORING);
-
- // Test with device scale factor.
- UpdateDisplay("400x600*2,400x600");
-
- aura::Window* root = Shell::GetInstance()->GetPrimaryRootWindow();
- aura::test::EventGenerator generator(root);
- generator.MoveMouseToInHost(10, 20);
-
- gfx::Point hot_point = test_api.GetCursorHotPoint();
- EXPECT_EQ("8,9", hot_point.ToString());
- gfx::Point cursor_window_origin =
- test_api.GetCursorWindow()->bounds().origin();
- EXPECT_EQ(10 - hot_point.x(), cursor_window_origin.x());
- EXPECT_EQ(20 - hot_point.y(), cursor_window_origin.y());
-
- // Test with ui scale
- UpdateDisplay("400x600*0.5,400x600");
- generator.MoveMouseToInHost(20, 30);
-
- hot_point = test_api.GetCursorHotPoint();
- EXPECT_EQ("4,4", hot_point.ToString());
- cursor_window_origin = test_api.GetCursorWindow()->bounds().origin();
- EXPECT_EQ(20 - hot_point.x(), cursor_window_origin.x());
- EXPECT_EQ(30 - hot_point.y(), cursor_window_origin.y());
-
- // Test with rotation
- UpdateDisplay("400x600/r,400x600");
- generator.MoveMouseToInHost(30, 40);
-
- hot_point = test_api.GetCursorHotPoint();
- EXPECT_EQ("21,4", hot_point.ToString());
- cursor_window_origin = test_api.GetCursorWindow()->bounds().origin();
- EXPECT_EQ(30 - hot_point.x(), cursor_window_origin.x());
- EXPECT_EQ(40 - hot_point.y(), cursor_window_origin.y());
-}
-
-// Make sure that the compositor based mirroring can switch
-// from/to dock mode.
-TEST_F(MirrorWindowControllerTest, MAYBE_DockMode) {
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- const int64 internal_id = 1;
- const int64 external_id = 2;
-
- const DisplayInfo internal_display_info =
- CreateDisplayInfo(internal_id, gfx::Rect(0, 0, 500, 500));
- const DisplayInfo external_display_info =
- CreateDisplayInfo(external_id, gfx::Rect(1, 1, 100, 100));
- std::vector<DisplayInfo> display_info_list;
-
- display_manager->SetSecondDisplayMode(DisplayManager::MIRRORING);
-
- // software mirroring.
- display_info_list.push_back(internal_display_info);
- display_info_list.push_back(external_display_info);
- display_manager->OnNativeDisplaysChanged(display_info_list);
- const int64 internal_display_id =
- test::DisplayManagerTestApi(display_manager).
- SetFirstDisplayAsInternalDisplay();
- EXPECT_EQ(internal_id, internal_display_id);
-
- EXPECT_EQ(1U, display_manager->GetNumDisplays());
- EXPECT_TRUE(display_manager->IsMirrored());
- EXPECT_EQ(external_id, display_manager->mirrored_display_id());
-
- // dock mode.
- display_info_list.clear();
- display_info_list.push_back(external_display_info);
- display_manager->SetSecondDisplayMode(DisplayManager::MIRRORING);
- display_manager->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(1U, display_manager->GetNumDisplays());
- EXPECT_FALSE(display_manager->IsMirrored());
-
- // back to software mirroring.
- display_info_list.clear();
- display_info_list.push_back(internal_display_info);
- display_info_list.push_back(external_display_info);
- display_manager->SetSecondDisplayMode(DisplayManager::MIRRORING);
- display_manager->OnNativeDisplaysChanged(display_info_list);
- EXPECT_EQ(1U, display_manager->GetNumDisplays());
- EXPECT_TRUE(display_manager->IsMirrored());
- EXPECT_EQ(external_id, display_manager->mirrored_display_id());
-}
-
-TEST_F(MirrorOnBootTest, MAYBE_MirrorOnBoot) {
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- EXPECT_TRUE(display_manager->IsMirrored());
- RunAllPendingInMessageLoop();
- test::MirrorWindowTestApi test_api;
- EXPECT_TRUE(test_api.GetRootWindow());
-}
-
-} // namsspace internal
-} // namespace ash
diff --git a/chromium/ash/display/mouse_cursor_event_filter.cc b/chromium/ash/display/mouse_cursor_event_filter.cc
deleted file mode 100644
index ebac900a891..00000000000
--- a/chromium/ash/display/mouse_cursor_event_filter.cc
+++ /dev/null
@@ -1,255 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/mouse_cursor_event_filter.h"
-
-#include "ash/display/display_controller.h"
-#include "ash/display/display_manager.h"
-#include "ash/display/mirror_window_controller.h"
-#include "ash/display/shared_display_edge_indicator.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/base/layout.h"
-#include "ui/compositor/dip_util.h"
-#include "ui/events/event.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-namespace internal {
-namespace {
-
-// Maximum size on the display edge that initiate snapping phantom window,
-// from the corner of the display.
-const int kMaximumSnapHeight = 16;
-
-// Minimum height of an indicator on the display edge that allows
-// dragging a window. If two displays shares the edge smaller than
-// this, entire edge will be used as a draggable space.
-const int kMinimumIndicatorHeight = 200;
-
-const int kIndicatorThickness = 1;
-}
-
-MouseCursorEventFilter::MouseCursorEventFilter()
- : mouse_warp_mode_(WARP_ALWAYS),
- was_mouse_warped_(false),
- drag_source_root_(NULL),
- scale_when_drag_started_(1.0f),
- shared_display_edge_indicator_(new SharedDisplayEdgeIndicator) {
-}
-
-MouseCursorEventFilter::~MouseCursorEventFilter() {
- HideSharedEdgeIndicator();
-}
-
-void MouseCursorEventFilter::ShowSharedEdgeIndicator(
- const aura::Window* from) {
- HideSharedEdgeIndicator();
- if (Shell::GetScreen()->GetNumDisplays() <= 1 || from == NULL) {
- src_indicator_bounds_.SetRect(0, 0, 0, 0);
- dst_indicator_bounds_.SetRect(0, 0, 0, 0);
- drag_source_root_ = NULL;
- return;
- }
- drag_source_root_ = from;
-
- DisplayLayout::Position position = Shell::GetInstance()->
- display_manager()->GetCurrentDisplayLayout().position;
- if (position == DisplayLayout::TOP || position == DisplayLayout::BOTTOM)
- UpdateHorizontalIndicatorWindowBounds();
- else
- UpdateVerticalIndicatorWindowBounds();
-
- shared_display_edge_indicator_->Show(src_indicator_bounds_,
- dst_indicator_bounds_);
-}
-
-void MouseCursorEventFilter::HideSharedEdgeIndicator() {
- shared_display_edge_indicator_->Hide();
-}
-
-void MouseCursorEventFilter::OnMouseEvent(ui::MouseEvent* event) {
- if (event->type() == ui::ET_MOUSE_PRESSED) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- scale_when_drag_started_ = ui::GetDeviceScaleFactor(target->layer());
- } else if (event->type() == ui::ET_MOUSE_RELEASED) {
- scale_when_drag_started_ = 1.0f;
- }
-
- // Handle both MOVED and DRAGGED events here because when the mouse pointer
- // enters the other root window while dragging, the underlying window system
- // (at least X11) stops generating a ui::ET_MOUSE_MOVED event.
- if (event->type() != ui::ET_MOUSE_MOVED &&
- event->type() != ui::ET_MOUSE_DRAGGED) {
- return;
- }
- Shell::GetInstance()->display_controller()->
- mirror_window_controller()->UpdateCursorLocation();
-
- gfx::Point point_in_screen(event->location());
- aura::Window* target = static_cast<aura::Window*>(event->target());
- wm::ConvertPointToScreen(target, &point_in_screen);
- if (WarpMouseCursorIfNecessary(target->GetRootWindow(), point_in_screen))
- event->StopPropagation();
-}
-
-bool MouseCursorEventFilter::WarpMouseCursorIfNecessary(
- aura::Window* target_root,
- const gfx::Point& point_in_screen) {
- if (Shell::GetScreen()->GetNumDisplays() <= 1 ||
- mouse_warp_mode_ == WARP_NONE)
- return false;
-
- // Do not warp again right after the cursor was warped. Sometimes the offset
- // is not long enough and the cursor moves at the edge of the destination
- // display. See crbug.com/278885
- // TODO(mukai): simplify the offset calculation below, it would not be
- // necessary anymore with this flag.
- if (was_mouse_warped_) {
- was_mouse_warped_ = false;
- return false;
- }
-
- aura::Window* root_at_point = wm::GetRootWindowAt(point_in_screen);
- gfx::Point point_in_root = point_in_screen;
- wm::ConvertPointFromScreen(root_at_point, &point_in_root);
- gfx::Rect root_bounds = root_at_point->bounds();
- int offset_x = 0;
- int offset_y = 0;
-
- // If the window is dragged between 2x display and 1x display,
- // staring from 2x display, pointer location is rounded by the
- // source scale factor (2x) so it will never reach the edge (which
- // is odd). Shrink by scale factor of the display where the dragging
- // started instead. Only integral scale factor is supported for now.
- int shrink = scale_when_drag_started_;
- // Make the bounds inclusive to detect the edge.
- root_bounds.Inset(0, 0, shrink, shrink);
- gfx::Rect src_indicator_bounds = src_indicator_bounds_;
- src_indicator_bounds.Inset(-shrink, -shrink, -shrink, -shrink);
-
- if (point_in_root.x() <= root_bounds.x()) {
- // Use -2, not -1, to avoid infinite loop of pointer warp.
- offset_x = -2 * scale_when_drag_started_;
- } else if (point_in_root.x() >= root_bounds.right()) {
- offset_x = 2 * scale_when_drag_started_;
- } else if (point_in_root.y() <= root_bounds.y()) {
- offset_y = -2 * scale_when_drag_started_;
- } else if (point_in_root.y() >= root_bounds.bottom()) {
- offset_y = 2 * scale_when_drag_started_;
- } else {
- return false;
- }
-
- gfx::Point point_in_dst_screen(point_in_screen);
- point_in_dst_screen.Offset(offset_x, offset_y);
- aura::Window* dst_root = wm::GetRootWindowAt(point_in_dst_screen);
-
- // Warp the mouse cursor only if the location is in the indicator bounds
- // or the mouse pointer is in the destination root.
- if (mouse_warp_mode_ == WARP_DRAG &&
- dst_root != drag_source_root_ &&
- !src_indicator_bounds.Contains(point_in_screen)) {
- return false;
- }
-
- wm::ConvertPointFromScreen(dst_root, &point_in_dst_screen);
-
- if (dst_root->bounds().Contains(point_in_dst_screen)) {
- DCHECK_NE(dst_root, root_at_point);
- was_mouse_warped_ = true;
- dst_root->MoveCursorTo(point_in_dst_screen);
- return true;
- }
- return false;
-}
-
-void MouseCursorEventFilter::UpdateHorizontalIndicatorWindowBounds() {
- bool from_primary = Shell::GetPrimaryRootWindow() == drag_source_root_;
- // GetPrimaryDisplay returns an object on stack, so copy the bounds
- // instead of using reference.
- const gfx::Rect primary_bounds =
- Shell::GetScreen()->GetPrimaryDisplay().bounds();
- const gfx::Rect secondary_bounds = ScreenAsh::GetSecondaryDisplay().bounds();
- DisplayLayout::Position position = Shell::GetInstance()->
- display_manager()->GetCurrentDisplayLayout().position;
-
- src_indicator_bounds_.set_x(
- std::max(primary_bounds.x(), secondary_bounds.x()));
- src_indicator_bounds_.set_width(
- std::min(primary_bounds.right(), secondary_bounds.right()) -
- src_indicator_bounds_.x());
- src_indicator_bounds_.set_height(kIndicatorThickness);
- src_indicator_bounds_.set_y(
- position == DisplayLayout::TOP ?
- primary_bounds.y() - (from_primary ? 0 : kIndicatorThickness) :
- primary_bounds.bottom() - (from_primary ? kIndicatorThickness : 0));
-
- dst_indicator_bounds_ = src_indicator_bounds_;
- dst_indicator_bounds_.set_height(kIndicatorThickness);
- dst_indicator_bounds_.set_y(
- position == DisplayLayout::TOP ?
- primary_bounds.y() - (from_primary ? kIndicatorThickness : 0) :
- primary_bounds.bottom() - (from_primary ? 0 : kIndicatorThickness));
-}
-
-void MouseCursorEventFilter::UpdateVerticalIndicatorWindowBounds() {
- bool in_primary = Shell::GetPrimaryRootWindow() == drag_source_root_;
- // GetPrimaryDisplay returns an object on stack, so copy the bounds
- // instead of using reference.
- const gfx::Rect primary_bounds =
- Shell::GetScreen()->GetPrimaryDisplay().bounds();
- const gfx::Rect secondary_bounds = ScreenAsh::GetSecondaryDisplay().bounds();
- DisplayLayout::Position position = Shell::GetInstance()->
- display_manager()->GetCurrentDisplayLayout().position;
-
- int upper_shared_y = std::max(primary_bounds.y(), secondary_bounds.y());
- int lower_shared_y = std::min(primary_bounds.bottom(),
- secondary_bounds.bottom());
- int shared_height = lower_shared_y - upper_shared_y;
-
- int dst_x = position == DisplayLayout::LEFT ?
- primary_bounds.x() - (in_primary ? kIndicatorThickness : 0) :
- primary_bounds.right() - (in_primary ? 0 : kIndicatorThickness);
- dst_indicator_bounds_.SetRect(
- dst_x, upper_shared_y, kIndicatorThickness, shared_height);
-
- // The indicator on the source display.
- src_indicator_bounds_.set_width(kIndicatorThickness);
- src_indicator_bounds_.set_x(
- position == DisplayLayout::LEFT ?
- primary_bounds.x() - (in_primary ? 0 : kIndicatorThickness) :
- primary_bounds.right() - (in_primary ? kIndicatorThickness : 0));
-
- const gfx::Rect& source_bounds =
- in_primary ? primary_bounds : secondary_bounds;
- int upper_indicator_y = source_bounds.y() + kMaximumSnapHeight;
- int lower_indicator_y = std::min(source_bounds.bottom(), lower_shared_y);
-
- // This gives a hight that can be used without sacrifying the snap space.
- int available_space = lower_indicator_y -
- std::max(upper_shared_y, upper_indicator_y);
-
- if (shared_height < kMinimumIndicatorHeight) {
- // If the shared height is smaller than minimum height, use the
- // entire height.
- upper_indicator_y = upper_shared_y;
- } else if (available_space < kMinimumIndicatorHeight) {
- // Snap to the bottom.
- upper_indicator_y =
- std::max(upper_shared_y, lower_indicator_y + kMinimumIndicatorHeight);
- } else {
- upper_indicator_y = std::max(upper_indicator_y, upper_shared_y);
- }
- src_indicator_bounds_.set_y(upper_indicator_y);
- src_indicator_bounds_.set_height(lower_indicator_y - upper_indicator_y);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/mouse_cursor_event_filter.h b/chromium/ash/display/mouse_cursor_event_filter.h
deleted file mode 100644
index b05456e9048..00000000000
--- a/chromium/ash/display/mouse_cursor_event_filter.h
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_MOUSE_CURSOR_EVENT_FILTER_H
-#define ASH_DISPLAY_MOUSE_CURSOR_EVENT_FILTER_H
-
-#include "ash/ash_export.h"
-#include "base/compiler_specific.h"
-#include "base/gtest_prod_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/rect.h"
-
-namespace aura {
-class RootWindow;
-class Window;
-}
-
-namespace ash {
-class DisplayController;
-
-namespace internal {
-class SharedDisplayEdgeIndicator;
-
-// An event filter that controls mouse location in extended desktop
-// environment.
-class ASH_EXPORT MouseCursorEventFilter : public ui::EventHandler {
- public:
- enum MouseWarpMode {
- WARP_ALWAYS, // Always warp the mouse when possible.
- WARP_DRAG, // Used when dragging a window. Top and bottom
- // corner of the shared edge is reserved for window
- // snapping.
- WARP_NONE, // No mouse warping. Used when resizing the window.
- };
-
- MouseCursorEventFilter();
- virtual ~MouseCursorEventFilter();
-
- void set_mouse_warp_mode(MouseWarpMode mouse_warp_mode) {
- mouse_warp_mode_ = mouse_warp_mode;
- }
-
- // Shows/Hide the indicator for window dragging. The |from|
- // is the window where the dragging started.
- void ShowSharedEdgeIndicator(const aura::Window* from);
- void HideSharedEdgeIndicator();
-
- // Overridden from ui::EventHandler:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
-
- private:
- friend class DragWindowResizerTest;
- friend class MouseCursorEventFilterTest;
- FRIEND_TEST_ALL_PREFIXES(MouseCursorEventFilterTest, DoNotWarpTwice);
- FRIEND_TEST_ALL_PREFIXES(MouseCursorEventFilterTest, SetMouseWarpModeFlag);
- FRIEND_TEST_ALL_PREFIXES(MouseCursorEventFilterTest,
- IndicatorBoundsTestOnRight);
- FRIEND_TEST_ALL_PREFIXES(MouseCursorEventFilterTest,
- IndicatorBoundsTestOnLeft);
- FRIEND_TEST_ALL_PREFIXES(MouseCursorEventFilterTest,
- IndicatorBoundsTestOnTopBottom);
- FRIEND_TEST_ALL_PREFIXES(DragWindowResizerTest, WarpMousePointer);
-
- void reset_was_mouse_warped_for_test() { was_mouse_warped_ = false; }
-
- // Warps the mouse cursor to an alternate root window when the
- // |point_in_screen|, which is the location of the mouse cursor,
- // hits or exceeds the edge of the |target_root| and the mouse cursor
- // is considered to be in an alternate display. Returns true if
- // the cursor was moved.
- bool WarpMouseCursorIfNecessary(aura::Window* target_root,
- const gfx::Point& point_in_screen);
-
- void UpdateHorizontalIndicatorWindowBounds();
- void UpdateVerticalIndicatorWindowBounds();
-
- MouseWarpMode mouse_warp_mode_;
-
- // This flag is used to suppress the accidental mouse warp back to the
- // original display.
- bool was_mouse_warped_;
-
- // The bounds for warp hole windows. |dst_indicator_bounds_| is kept
- // in the instance for testing.
- gfx::Rect src_indicator_bounds_;
- gfx::Rect dst_indicator_bounds_;
-
- // The root window in which the dragging started.
- const aura::Window* drag_source_root_;
-
- float scale_when_drag_started_;
-
- // Shows the area where a window can be dragged in to/out from
- // another display.
- scoped_ptr<SharedDisplayEdgeIndicator> shared_display_edge_indicator_;
-
- DISALLOW_COPY_AND_ASSIGN(MouseCursorEventFilter);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DISPLAY_MOUSE_CURSOR_EVENT_FILTER_H
diff --git a/chromium/ash/display/mouse_cursor_event_filter_unittest.cc b/chromium/ash/display/mouse_cursor_event_filter_unittest.cc
deleted file mode 100644
index 7fa79fd6f3b..00000000000
--- a/chromium/ash/display/mouse_cursor_event_filter_unittest.cc
+++ /dev/null
@@ -1,380 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/mouse_cursor_event_filter.h"
-
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/cursor_manager_test_api.h"
-#include "ash/display/display_layout_store.h"
-#include "ash/display/display_manager.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-namespace internal {
-
-class MouseCursorEventFilterTest : public test::AshTestBase {
- public:
- MouseCursorEventFilterTest() {}
- virtual ~MouseCursorEventFilterTest() {}
-
- protected:
- MouseCursorEventFilter* event_filter() {
- return Shell::GetInstance()->mouse_cursor_filter();
- }
-
- bool WarpMouseCursorIfNecessary(aura::Window* target_root,
- gfx::Point point_in_screen) {
- bool is_warped = event_filter()->WarpMouseCursorIfNecessary(
- target_root, point_in_screen);
- event_filter()->reset_was_mouse_warped_for_test();
- return is_warped;
- }
-
- bool WarpMouseCursorIfNecessaryWithDragRoot(
- aura::Window* drag_source_root,
- aura::Window* target_root,
- gfx::Point point_in_screen) {
- gfx::Point location = drag_source_root->bounds().CenterPoint();
- ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, location,
- location, 0);
- ui::Event::DispatcherApi(&pressed).set_target(drag_source_root);
- event_filter()->OnMouseEvent(&pressed);
- bool is_warped = event_filter()->WarpMouseCursorIfNecessary(
- target_root, point_in_screen);
- event_filter()->reset_was_mouse_warped_for_test();
-
- ui::MouseEvent released(ui::ET_MOUSE_RELEASED, location,
- location, 0);
- ui::Event::DispatcherApi(&released).set_target(drag_source_root);
- event_filter()->OnMouseEvent(&released);
- return is_warped;
- }
-
- private:
- MouseCursorEventFilter* event_filter_;
-
- DISALLOW_COPY_AND_ASSIGN(MouseCursorEventFilterTest);
-};
-
-// Verifies if the mouse pointer correctly moves to another display when there
-// are two displays.
-TEST_F(MouseCursorEventFilterTest, WarpMouse) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("500x500,500x500");
-
- ASSERT_EQ(
- DisplayLayout::RIGHT,
- Shell::GetInstance()->display_manager()->layout_store()->
- default_display_layout().position);
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- EXPECT_FALSE(WarpMouseCursorIfNecessary(root_windows[0], gfx::Point(11, 11)));
- EXPECT_FALSE(WarpMouseCursorIfNecessary(root_windows[1], gfx::Point(11, 11)));
-
- // Touch the right edge of the primary root window. Pointer should warp.
- EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0], gfx::Point(499, 11)));
- EXPECT_EQ("501,11", // by 2px.
- aura::Env::GetInstance()->last_mouse_location().ToString());
-
- // Touch the left edge of the secondary root window. Pointer should warp.
- EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[1], gfx::Point(500, 11)));
- EXPECT_EQ("498,11", // by 2px.
- aura::Env::GetInstance()->last_mouse_location().ToString());
-
- // Touch the left edge of the primary root window.
- EXPECT_FALSE(WarpMouseCursorIfNecessary(root_windows[0], gfx::Point(0, 11)));
- // Touch the top edge of the primary root window.
- EXPECT_FALSE(WarpMouseCursorIfNecessary(root_windows[0], gfx::Point(11, 0)));
- // Touch the bottom edge of the primary root window.
- EXPECT_FALSE(WarpMouseCursorIfNecessary(root_windows[0],
- gfx::Point(11, 499)));
- // Touch the right edge of the secondary root window.
- EXPECT_FALSE(WarpMouseCursorIfNecessary(root_windows[1],
- gfx::Point(999, 11)));
- // Touch the top edge of the secondary root window.
- EXPECT_FALSE(WarpMouseCursorIfNecessary(root_windows[1], gfx::Point(11, 0)));
- // Touch the bottom edge of the secondary root window.
- EXPECT_FALSE(WarpMouseCursorIfNecessary(root_windows[1],
- gfx::Point(11, 499)));
-}
-
-// Verifies if the mouse pointer correctly moves to another display even when
-// two displays are not the same size.
-TEST_F(MouseCursorEventFilterTest, WarpMouseDifferentSizeDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("500x500,600x600"); // the second one is larger.
-
- ASSERT_EQ(
- DisplayLayout::RIGHT,
- Shell::GetInstance()->display_manager()->
- GetCurrentDisplayLayout().position);
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- aura::Env::GetInstance()->set_last_mouse_location(gfx::Point(623, 123));
-
- // Touch the left edge of the secondary root window. Pointer should NOT warp
- // because 1px left of (0, 500) is outside the primary root window.
- EXPECT_FALSE(WarpMouseCursorIfNecessary(root_windows[1], gfx::Point(0, 500)));
- EXPECT_EQ("623,123", // by 2px.
- aura::Env::GetInstance()->last_mouse_location().ToString());
-
- // Touch the left edge of the secondary root window. Pointer should warp
- // because 1px left of (0, 499) is inside the primary root window.
- EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[1],
- gfx::Point(500, 499)));
- EXPECT_EQ("498,499", // by 2px.
- aura::Env::GetInstance()->last_mouse_location().ToString());
-}
-
-// Verifies if the mouse pointer correctly moves between displays with
-// different scale factors.
-TEST_F(MouseCursorEventFilterTest, WarpMouseDifferentScaleDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("500x500,600x600*2");
-
- ASSERT_EQ(
- DisplayLayout::RIGHT,
- Shell::GetInstance()->display_manager()->
- GetCurrentDisplayLayout().position);
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- aura::Env::GetInstance()->set_last_mouse_location(gfx::Point(900, 123));
-
- // This emulates the dragging to the 2nd display, which has
- // higher scale factor, by having 2nd display's root as target
- // but have the edge of 1st display.
- EXPECT_TRUE(WarpMouseCursorIfNecessaryWithDragRoot(
- root_windows[1], root_windows[1], gfx::Point(498, 123)));
- EXPECT_EQ("502,123",
- aura::Env::GetInstance()->last_mouse_location().ToString());
-
- // Touch the edge of 2nd display again and make sure it warps to
- // 1st dislay.
- EXPECT_TRUE(WarpMouseCursorIfNecessaryWithDragRoot(
- root_windows[1], root_windows[1], gfx::Point(500, 123)));
- EXPECT_EQ("496,123",
- aura::Env::GetInstance()->last_mouse_location().ToString());
-
- // Draging back from 1x to 2x.
- EXPECT_TRUE(WarpMouseCursorIfNecessaryWithDragRoot(
- root_windows[1], root_windows[0], gfx::Point(500, 123)));
- EXPECT_EQ("496,123",
- aura::Env::GetInstance()->last_mouse_location().ToString());
-
- UpdateDisplay("500x500*2,600x600");
- // Draging back from 1x to 2x.
- EXPECT_TRUE(WarpMouseCursorIfNecessaryWithDragRoot(
- root_windows[0], root_windows[1], gfx::Point(250, 123)));
- EXPECT_EQ("246,123",
- aura::Env::GetInstance()->last_mouse_location().ToString());
-}
-
-TEST_F(MouseCursorEventFilterTest, DoNotWarpTwice) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("500x500,600x600");
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- aura::Env::GetInstance()->set_last_mouse_location(gfx::Point(623, 123));
-
- // Touch the right edge of the primary root window. Pointer should warp.
- EXPECT_TRUE(event_filter()->WarpMouseCursorIfNecessary(root_windows[0],
- gfx::Point(499, 11)));
- EXPECT_EQ("501,11", // by 2px.
- aura::Env::GetInstance()->last_mouse_location().ToString());
-
- // Touch the left edge of the secondary root window immediately. This should
- // be ignored.
- EXPECT_FALSE(event_filter()->WarpMouseCursorIfNecessary(root_windows[1],
- gfx::Point(500, 11)));
-
- // Touch the left edge of the secondary root window again, pointer should
- // warp for this time.
- EXPECT_TRUE(event_filter()->WarpMouseCursorIfNecessary(root_windows[1],
- gfx::Point(500, 11)));
- EXPECT_EQ("498,11", // by 2px.
- aura::Env::GetInstance()->last_mouse_location().ToString());
-}
-
-// Verifies if MouseCursorEventFilter::set_mouse_warp_mode() works as expected.
-TEST_F(MouseCursorEventFilterTest, SetMouseWarpModeFlag) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("500x500,500x500");
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- aura::Env::GetInstance()->set_last_mouse_location(gfx::Point(1, 1));
-
- event_filter()->set_mouse_warp_mode(MouseCursorEventFilter::WARP_NONE);
- EXPECT_FALSE(WarpMouseCursorIfNecessary(root_windows[0],
- gfx::Point(499, 11)));
- EXPECT_EQ("1,1",
- aura::Env::GetInstance()->last_mouse_location().ToString());
-
- event_filter()->set_mouse_warp_mode(MouseCursorEventFilter::WARP_ALWAYS);
- EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0], gfx::Point(499, 11)));
- EXPECT_EQ("501,11",
- aura::Env::GetInstance()->last_mouse_location().ToString());
-}
-
-// Verifies if MouseCursorEventFilter's bounds calculation works correctly.
-TEST_F(MouseCursorEventFilterTest, IndicatorBoundsTestOnRight) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("360x360,700x700");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- DisplayLayout layout(DisplayLayout::RIGHT, 0);
- display_manager->SetLayoutForCurrentDisplays(layout);
- event_filter()->ShowSharedEdgeIndicator(root_windows[0] /* primary */);
- EXPECT_EQ("359,16 1x344", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("360,0 1x360", event_filter()->dst_indicator_bounds_.ToString());
- event_filter()->ShowSharedEdgeIndicator(root_windows[1] /* secondary */);
- EXPECT_EQ("360,16 1x344", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("359,0 1x360", event_filter()->dst_indicator_bounds_.ToString());
-
- // Move 2nd display downwards a bit.
- layout.offset = 5;
- display_manager->SetLayoutForCurrentDisplays(layout);
- event_filter()->ShowSharedEdgeIndicator(root_windows[0] /* primary */);
- // This is same as before because the 2nd display's y is above
- // the indicator's x.
- EXPECT_EQ("359,16 1x344", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("360,5 1x355", event_filter()->dst_indicator_bounds_.ToString());
- event_filter()->ShowSharedEdgeIndicator(root_windows[1] /* secondary */);
- EXPECT_EQ("360,21 1x339", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("359,5 1x355", event_filter()->dst_indicator_bounds_.ToString());
-
- // Move it down further so that the shared edge is shorter than
- // minimum hole size (160).
- layout.offset = 200;
- display_manager->SetLayoutForCurrentDisplays(layout);
- event_filter()->ShowSharedEdgeIndicator(root_windows[0] /* primary */);
- EXPECT_EQ("359,200 1x160", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("360,200 1x160", event_filter()->dst_indicator_bounds_.ToString());
- event_filter()->ShowSharedEdgeIndicator(root_windows[1] /* secondary */);
- EXPECT_EQ("360,200 1x160", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("359,200 1x160", event_filter()->dst_indicator_bounds_.ToString());
-
- // Now move 2nd display upwards
- layout.offset = -5;
- display_manager->SetLayoutForCurrentDisplays(layout);
- event_filter()->ShowSharedEdgeIndicator(root_windows[0] /* primary */);
- EXPECT_EQ("359,16 1x344", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("360,0 1x360", event_filter()->dst_indicator_bounds_.ToString());
- event_filter()->ShowSharedEdgeIndicator(root_windows[1] /* secondary */);
- // 16 px are reserved on 2nd display from top, so y must be
- // (16 - 5) = 11
- EXPECT_EQ("360,11 1x349", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("359,0 1x360", event_filter()->dst_indicator_bounds_.ToString());
-
- event_filter()->HideSharedEdgeIndicator();
-}
-
-TEST_F(MouseCursorEventFilterTest, IndicatorBoundsTestOnLeft) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("360x360,700x700");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- DisplayLayout layout(DisplayLayout::LEFT, 0);
- display_manager->SetLayoutForCurrentDisplays(layout);
- event_filter()->ShowSharedEdgeIndicator(root_windows[0] /* primary */);
- EXPECT_EQ("0,16 1x344", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("-1,0 1x360", event_filter()->dst_indicator_bounds_.ToString());
- event_filter()->ShowSharedEdgeIndicator(root_windows[1] /* secondary */);
- EXPECT_EQ("-1,16 1x344", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("0,0 1x360", event_filter()->dst_indicator_bounds_.ToString());
-
- layout.offset = 250;
- display_manager->SetLayoutForCurrentDisplays(layout);
- event_filter()->ShowSharedEdgeIndicator(root_windows[0] /* primary */);
- EXPECT_EQ("0,250 1x110", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("-1,250 1x110", event_filter()->dst_indicator_bounds_.ToString());
- event_filter()->ShowSharedEdgeIndicator(root_windows[1] /* secondary */);
- EXPECT_EQ("-1,250 1x110", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("0,250 1x110", event_filter()->dst_indicator_bounds_.ToString());
- event_filter()->HideSharedEdgeIndicator();
-}
-
-TEST_F(MouseCursorEventFilterTest, IndicatorBoundsTestOnTopBottom) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("360x360,700x700");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- DisplayLayout layout(DisplayLayout::TOP, 0);
- display_manager->SetLayoutForCurrentDisplays(layout);
- event_filter()->ShowSharedEdgeIndicator(root_windows[0] /* primary */);
- EXPECT_EQ("0,0 360x1", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("0,-1 360x1", event_filter()->dst_indicator_bounds_.ToString());
- event_filter()->ShowSharedEdgeIndicator(root_windows[1] /* secondary */);
- EXPECT_EQ("0,-1 360x1", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("0,0 360x1", event_filter()->dst_indicator_bounds_.ToString());
-
- layout.offset = 250;
- display_manager->SetLayoutForCurrentDisplays(layout);
- event_filter()->ShowSharedEdgeIndicator(root_windows[0] /* primary */);
- EXPECT_EQ("250,0 110x1", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("250,-1 110x1", event_filter()->dst_indicator_bounds_.ToString());
- event_filter()->ShowSharedEdgeIndicator(root_windows[1] /* secondary */);
- EXPECT_EQ("250,-1 110x1", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("250,0 110x1", event_filter()->dst_indicator_bounds_.ToString());
-
- layout.position = DisplayLayout::BOTTOM;
- layout.offset = 0;
- display_manager->SetLayoutForCurrentDisplays(layout);
- event_filter()->ShowSharedEdgeIndicator(root_windows[0] /* primary */);
- EXPECT_EQ("0,359 360x1", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("0,360 360x1", event_filter()->dst_indicator_bounds_.ToString());
- event_filter()->ShowSharedEdgeIndicator(root_windows[1] /* secondary */);
- EXPECT_EQ("0,360 360x1", event_filter()->src_indicator_bounds_.ToString());
- EXPECT_EQ("0,359 360x1", event_filter()->dst_indicator_bounds_.ToString());
-
- event_filter()->HideSharedEdgeIndicator();
-}
-
-// Verifies cursor's device scale factor is updated when a cursor has moved
-// across root windows with different device scale factors
-// (http://crbug.com/154183).
-TEST_F(MouseCursorEventFilterTest, CursorDeviceScaleFactor) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("400x400,800x800*2");
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- display_manager->SetLayoutForCurrentDisplays(
- DisplayLayout(DisplayLayout::RIGHT, 0));
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- ASSERT_EQ(2U, root_windows.size());
- test::CursorManagerTestApi cursor_test_api(
- Shell::GetInstance()->cursor_manager());
-
- EXPECT_EQ(1.0f, cursor_test_api.GetDisplay().device_scale_factor());
- WarpMouseCursorIfNecessary(root_windows[0], gfx::Point(399, 200));
- EXPECT_EQ(2.0f, cursor_test_api.GetDisplay().device_scale_factor());
- WarpMouseCursorIfNecessary(root_windows[1], gfx::Point(400, 200));
- EXPECT_EQ(1.0f, cursor_test_api.GetDisplay().device_scale_factor());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/output_configurator_animation.cc b/chromium/ash/display/output_configurator_animation.cc
deleted file mode 100644
index 2fb5d5204e8..00000000000
--- a/chromium/ash/display/output_configurator_animation.cc
+++ /dev/null
@@ -1,229 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/output_configurator_animation.h"
-
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "base/bind.h"
-#include "base/stl_util.h"
-#include "base/time/time.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animation_observer.h"
-#include "ui/compositor/layer_animation_sequence.h"
-#include "ui/compositor/layer_animator.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-
-namespace ash {
-namespace internal {
-namespace {
-
-const int kFadingAnimationDurationInMS = 200;
-const int kFadingTimeoutDurationInSeconds = 10;
-
-// CallbackRunningObserver accepts multiple layer animations and
-// runs the specified |callback| when all of the animations have finished.
-class CallbackRunningObserver {
- public:
- CallbackRunningObserver(base::Closure callback)
- : completed_counter_(0),
- animation_aborted_(false),
- callback_(callback) {}
-
- void AddNewAnimator(ui::LayerAnimator* animator) {
- Observer* observer = new Observer(animator, this);
- animator->AddObserver(observer);
- observer_list_.push_back(observer);
- }
-
- private:
- void OnSingleTaskCompleted() {
- completed_counter_++;
- if (completed_counter_ >= observer_list_.size()) {
- base::MessageLoopForUI::current()->DeleteSoon(FROM_HERE, this);
- if (!animation_aborted_)
- base::MessageLoopForUI::current()->PostTask(FROM_HERE, callback_);
- }
- }
-
- void OnSingleTaskAborted() {
- animation_aborted_ = true;
- OnSingleTaskCompleted();
- }
-
- // The actual observer to listen each animation completion.
- class Observer : public ui::LayerAnimationObserver {
- public:
- Observer(ui::LayerAnimator* animator,
- CallbackRunningObserver* observer)
- : animator_(animator),
- observer_(observer) {}
-
- protected:
- // ui::LayerAnimationObserver overrides:
- virtual void OnLayerAnimationEnded(
- ui::LayerAnimationSequence* sequence) OVERRIDE {
- animator_->RemoveObserver(this);
- observer_->OnSingleTaskCompleted();
- }
- virtual void OnLayerAnimationAborted(
- ui::LayerAnimationSequence* sequence) OVERRIDE {
- animator_->RemoveObserver(this);
- observer_->OnSingleTaskAborted();
- }
- virtual void OnLayerAnimationScheduled(
- ui::LayerAnimationSequence* sequence) OVERRIDE {
- }
- virtual bool RequiresNotificationWhenAnimatorDestroyed() const OVERRIDE {
- return true;
- }
-
- private:
- ui::LayerAnimator* animator_;
- CallbackRunningObserver* observer_;
-
- DISALLOW_COPY_AND_ASSIGN(Observer);
- };
-
- size_t completed_counter_;
- bool animation_aborted_;
- ScopedVector<Observer> observer_list_;
- base::Closure callback_;
-
- DISALLOW_COPY_AND_ASSIGN(CallbackRunningObserver);
-};
-
-} // namespace
-
-OutputConfiguratorAnimation::OutputConfiguratorAnimation() {
-}
-
-OutputConfiguratorAnimation::~OutputConfiguratorAnimation() {
- ClearHidingLayers();
-}
-
-void OutputConfiguratorAnimation::StartFadeOutAnimation(
- base::Closure callback) {
- CallbackRunningObserver* observer = new CallbackRunningObserver(callback);
- ClearHidingLayers();
-
- // Make the fade-out animation for all root windows. Instead of actually
- // hiding the root windows, we put a black layer over a root window for
- // safety. These layers remain to hide root windows and will be deleted
- // after the animation of OnDisplayModeChanged().
- aura::Window::Windows root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- for (aura::Window::Windows::const_iterator it = root_windows.begin();
- it != root_windows.end(); ++it) {
- aura::Window* root_window = *it;
- ui::Layer* hiding_layer = new ui::Layer(ui::LAYER_SOLID_COLOR);
- hiding_layer->SetColor(SK_ColorBLACK);
- hiding_layer->SetBounds(root_window->bounds());
- ui::Layer* parent = ash::Shell::GetContainer(
- root_window,
- ash::internal::kShellWindowId_OverlayContainer)->layer();
- parent->Add(hiding_layer);
-
- hiding_layer->SetOpacity(0.0);
-
- ui::ScopedLayerAnimationSettings settings(hiding_layer->GetAnimator());
- settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds(
- kFadingAnimationDurationInMS));
- observer->AddNewAnimator(hiding_layer->GetAnimator());
- hiding_layer->SetOpacity(1.0f);
- hiding_layer->SetVisible(true);
- hiding_layers_[root_window] = hiding_layer;
- }
-
- // In case that OnDisplayModeChanged() isn't called or its animator is
- // canceled due to some unknown errors, we set a timer to clear these
- // hiding layers.
- timer_.reset(new base::OneShotTimer<OutputConfiguratorAnimation>());
- timer_->Start(FROM_HERE,
- base::TimeDelta::FromSeconds(kFadingTimeoutDurationInSeconds),
- this,
- &OutputConfiguratorAnimation::ClearHidingLayers);
-}
-
-void OutputConfiguratorAnimation::StartFadeInAnimation() {
- // We want to make sure clearing all of hiding layers after the animation
- // finished. Note that this callback can be canceled, but the cancel only
- // happens when the next animation is scheduled. Thus the hiding layers
- // should be deleted eventually.
- CallbackRunningObserver* observer = new CallbackRunningObserver(
- base::Bind(&OutputConfiguratorAnimation::ClearHidingLayers,
- base::Unretained(this)));
-
- // Ensure that layers are not animating.
- for (std::map<aura::Window*, ui::Layer*>::iterator it =
- hiding_layers_.begin(); it != hiding_layers_.end(); ++it) {
- ui::LayerAnimator* animator = it->second->GetAnimator();
- if (animator->is_animating())
- animator->StopAnimating();
- }
-
- // Schedules the fade-in effect for all root windows. Because we put the
- // black layers for fade-out, here we actually turn those black layers
- // invisible.
- aura::Window::Windows root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- for (aura::Window::Windows::const_iterator it = root_windows.begin();
- it != root_windows.end(); ++it) {
- aura::Window* root_window = *it;
- ui::Layer* hiding_layer = NULL;
- if (hiding_layers_.find(root_window) == hiding_layers_.end()) {
- // In case of the transition from mirroring->non-mirroring, new root
- // windows appear and we do not have the black layers for them. Thus
- // we need to create the layer and make it visible.
- hiding_layer = new ui::Layer(ui::LAYER_SOLID_COLOR);
- hiding_layer->SetColor(SK_ColorBLACK);
- hiding_layer->SetBounds(root_window->bounds());
- ui::Layer* parent = ash::Shell::GetContainer(
- root_window,
- ash::internal::kShellWindowId_OverlayContainer)->layer();
- parent->Add(hiding_layer);
- hiding_layer->SetOpacity(1.0f);
- hiding_layer->SetVisible(true);
- hiding_layers_[root_window] = hiding_layer;
- } else {
- hiding_layer = hiding_layers_[root_window];
- if (hiding_layer->bounds() != root_window->bounds())
- hiding_layer->SetBounds(root_window->bounds());
- }
-
- ui::ScopedLayerAnimationSettings settings(hiding_layer->GetAnimator());
- settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds(
- kFadingAnimationDurationInMS));
- observer->AddNewAnimator(hiding_layer->GetAnimator());
- hiding_layer->SetOpacity(0.0f);
- hiding_layer->SetVisible(false);
- }
-}
-
-void OutputConfiguratorAnimation::OnDisplayModeChanged(
- const std::vector<chromeos::OutputConfigurator::OutputSnapshot>& outputs) {
- if (!hiding_layers_.empty())
- StartFadeInAnimation();
-}
-
-void OutputConfiguratorAnimation::OnDisplayModeChangeFailed(
- chromeos::OutputState failed_new_state) {
- if (!hiding_layers_.empty())
- StartFadeInAnimation();
-}
-
-void OutputConfiguratorAnimation::ClearHidingLayers() {
- if (timer_) {
- timer_->Stop();
- timer_.reset();
- }
- STLDeleteContainerPairSecondPointers(
- hiding_layers_.begin(), hiding_layers_.end());
- hiding_layers_.clear();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/output_configurator_animation.h b/chromium/ash/display/output_configurator_animation.h
deleted file mode 100644
index f53ffa58656..00000000000
--- a/chromium/ash/display/output_configurator_animation.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_OUTPUT_CONFIGURATOR_ANIMATION_H_
-#define ASH_DISPLAY_OUTPUT_CONFIGURATOR_ANIMATION_H_
-
-#include <map>
-
-#include "ash/ash_export.h"
-#include "base/callback.h"
-#include "base/timer/timer.h"
-#include "chromeos/display/output_configurator.h"
-
-namespace aura {
-class RootWindow;
-class Window;
-} // namespace aura
-
-namespace ui {
-class Layer;
-} // namespace ui
-
-namespace ash {
-namespace internal {
-
-// OutputConfiguratorAnimation provides the visual effects for
-// chromeos::OutputConfigurator, such like fade-out/in during changing
-// the display mode.
-class ASH_EXPORT OutputConfiguratorAnimation
- : public chromeos::OutputConfigurator::Observer {
- public:
- OutputConfiguratorAnimation();
- virtual ~OutputConfiguratorAnimation();
-
- // Starts the fade-out animation for the all root windows. It will
- // call |callback| once all of the animations have finished.
- void StartFadeOutAnimation(base::Closure callback);
-
- // Starts the animation to clear the fade-out animation effect
- // for the all root windows.
- void StartFadeInAnimation();
-
- protected:
- // chromeos::OutputConfigurator::Observer overrides:
- virtual void OnDisplayModeChanged(
- const std::vector<chromeos::OutputConfigurator::OutputSnapshot>& outputs)
- OVERRIDE;
- virtual void OnDisplayModeChangeFailed(
- chromeos::OutputState failed_new_state) OVERRIDE;
-
- private:
- // Clears all hiding layers. Note that in case that this method is called
- // during an animation, the method call will cancel all of the animations
- // and *not* call the registered callback.
- void ClearHidingLayers();
-
- std::map<aura::Window*, ui::Layer*> hiding_layers_;
- scoped_ptr<base::OneShotTimer<OutputConfiguratorAnimation> > timer_;
-
- DISALLOW_COPY_AND_ASSIGN(OutputConfiguratorAnimation);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DISPLAY_OUTPUT_CONFIGURATION_CONTROLLER_H_
diff --git a/chromium/ash/display/resolution_notification_controller.cc b/chromium/ash/display/resolution_notification_controller.cc
deleted file mode 100644
index 0914772ac01..00000000000
--- a/chromium/ash/display/resolution_notification_controller.cc
+++ /dev/null
@@ -1,305 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/resolution_notification_controller.h"
-
-#include "ash/display/display_controller.h"
-#include "ash/display/display_manager.h"
-#include "ash/shell.h"
-#include "ash/system/system_notifier.h"
-#include "base/strings/utf_string_conversions.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/l10n/time_format.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-#include "ui/message_center/message_center.h"
-#include "ui/message_center/notification.h"
-#include "ui/message_center/notification_delegate.h"
-
-using message_center::Notification;
-
-namespace ash {
-namespace internal {
-namespace {
-
-bool g_use_timer = true;
-
-class ResolutionChangeNotificationDelegate
- : public message_center::NotificationDelegate {
- public:
- ResolutionChangeNotificationDelegate(
- ResolutionNotificationController* controller,
- bool has_timeout);
-
- protected:
- virtual ~ResolutionChangeNotificationDelegate();
-
- private:
- // message_center::NotificationDelegate overrides:
- virtual void Display() OVERRIDE;
- virtual void Error() OVERRIDE;
- virtual void Close(bool by_user) OVERRIDE;
- virtual void Click() OVERRIDE;
- virtual bool HasClickedListener() OVERRIDE;
- virtual void ButtonClick(int button_index) OVERRIDE;
-
- ResolutionNotificationController* controller_;
- bool has_timeout_;
-
- DISALLOW_COPY_AND_ASSIGN(ResolutionChangeNotificationDelegate);
-};
-
-ResolutionChangeNotificationDelegate::ResolutionChangeNotificationDelegate(
- ResolutionNotificationController* controller,
- bool has_timeout)
- : controller_(controller),
- has_timeout_(has_timeout) {
- DCHECK(controller_);
-}
-
-ResolutionChangeNotificationDelegate::~ResolutionChangeNotificationDelegate() {
-}
-
-void ResolutionChangeNotificationDelegate::Display() {
-}
-
-void ResolutionChangeNotificationDelegate::Error() {
-}
-
-void ResolutionChangeNotificationDelegate::Close(bool by_user) {
- if (by_user)
- controller_->AcceptResolutionChange(false);
-}
-
-void ResolutionChangeNotificationDelegate::Click() {
- controller_->AcceptResolutionChange(true);
-}
-
-bool ResolutionChangeNotificationDelegate::HasClickedListener() {
- return true;
-}
-
-void ResolutionChangeNotificationDelegate::ButtonClick(int button_index) {
- // If there's the timeout, the first button is "Accept". Otherwise the
- // button click should be "Revert".
- if (has_timeout_ && button_index == 0)
- controller_->AcceptResolutionChange(true);
- else
- controller_->RevertResolutionChange();
-}
-
-} // namespace
-
-// static
-const int ResolutionNotificationController::kTimeoutInSec = 15;
-
-// static
-const char ResolutionNotificationController::kNotificationId[] =
- "chrome://settings/display/resolution";
-
-struct ResolutionNotificationController::ResolutionChangeInfo {
- ResolutionChangeInfo(int64 display_id,
- const gfx::Size& old_resolution,
- const gfx::Size& new_resolution,
- const base::Closure& accept_callback);
- ~ResolutionChangeInfo();
-
- // The id of the display where the resolution change happens.
- int64 display_id;
-
- // The resolution before the change.
- gfx::Size old_resolution;
-
- // The new resolution after the change.
- gfx::Size new_resolution;
-
- // The callback when accept is chosen.
- base::Closure accept_callback;
-
- // The remaining timeout in seconds. 0 if the change does not time out.
- uint8 timeout_count;
-
- // The timer to invoke OnTimerTick() every second. This cannot be
- // OneShotTimer since the message contains text "automatically closed in xx
- // seconds..." which has to be updated every second.
- base::RepeatingTimer<ResolutionNotificationController> timer;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ResolutionChangeInfo);
-};
-
-ResolutionNotificationController::ResolutionChangeInfo::ResolutionChangeInfo(
- int64 display_id,
- const gfx::Size& old_resolution,
- const gfx::Size& new_resolution,
- const base::Closure& accept_callback)
- : display_id(display_id),
- old_resolution(old_resolution),
- new_resolution(new_resolution),
- accept_callback(accept_callback),
- timeout_count(0) {
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- if (!display_manager->HasInternalDisplay() &&
- display_manager->num_connected_displays() == 1u) {
- timeout_count = kTimeoutInSec;
- }
-}
-
-ResolutionNotificationController::ResolutionChangeInfo::
- ~ResolutionChangeInfo() {
-}
-
-ResolutionNotificationController::ResolutionNotificationController() {
- Shell::GetInstance()->display_controller()->AddObserver(this);
- Shell::GetScreen()->AddObserver(this);
-}
-
-ResolutionNotificationController::~ResolutionNotificationController() {
- Shell::GetInstance()->display_controller()->RemoveObserver(this);
- Shell::GetScreen()->RemoveObserver(this);
-}
-
-void ResolutionNotificationController::SetDisplayResolutionAndNotify(
- int64 display_id,
- const gfx::Size& old_resolution,
- const gfx::Size& new_resolution,
- const base::Closure& accept_callback) {
- // If multiple resolution changes are invoked for the same display,
- // the original resolution for the first resolution change has to be used
- // instead of the specified |old_resolution|.
- gfx::Size original_resolution;
- if (change_info_ && change_info_->display_id == display_id) {
- DCHECK(change_info_->new_resolution == old_resolution);
- original_resolution = change_info_->old_resolution;
- }
-
- change_info_.reset(new ResolutionChangeInfo(
- display_id, old_resolution, new_resolution, accept_callback));
- if (!original_resolution.IsEmpty())
- change_info_->old_resolution = original_resolution;
-
- // SetDisplayResolution() causes OnConfigurationChanged() and the notification
- // will be shown at that point.
- Shell::GetInstance()->display_manager()->SetDisplayResolution(
- display_id, new_resolution);
-}
-
-bool ResolutionNotificationController::DoesNotificationTimeout() {
- return change_info_ && change_info_->timeout_count > 0;
-}
-
-void ResolutionNotificationController::CreateOrUpdateNotification(
- bool enable_spoken_feedback) {
- message_center::MessageCenter* message_center =
- message_center::MessageCenter::Get();
- if (!change_info_) {
- message_center->RemoveNotification(kNotificationId, false /* by_user */);
- return;
- }
-
- base::string16 timeout_message;
- message_center::RichNotificationData data;
- if (change_info_->timeout_count > 0) {
- data.buttons.push_back(message_center::ButtonInfo(
- l10n_util::GetStringUTF16(IDS_ASH_DISPLAY_RESOLUTION_CHANGE_ACCEPT)));
- timeout_message = l10n_util::GetStringFUTF16(
- IDS_ASH_DISPLAY_RESOLUTION_TIMEOUT,
- ui::TimeFormat::TimeDurationLong(
- base::TimeDelta::FromSeconds(change_info_->timeout_count)));
- }
- data.buttons.push_back(message_center::ButtonInfo(
- l10n_util::GetStringUTF16(IDS_ASH_DISPLAY_RESOLUTION_CHANGE_REVERT)));
-
- data.should_make_spoken_feedback_for_popup_updates = enable_spoken_feedback;
-
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- scoped_ptr<Notification> notification(new Notification(
- message_center::NOTIFICATION_TYPE_SIMPLE,
- kNotificationId,
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_RESOLUTION_CHANGED,
- UTF8ToUTF16(Shell::GetInstance()->display_manager()->
- GetDisplayNameForId(change_info_->display_id)),
- UTF8ToUTF16(change_info_->new_resolution.ToString())),
- timeout_message,
- bundle.GetImageNamed(IDR_AURA_UBER_TRAY_DISPLAY),
- base::string16() /* display_source */,
- message_center::NotifierId(
- message_center::NotifierId::SYSTEM_COMPONENT,
- system_notifier::kNotifierDisplayResolutionChange),
- data,
- new ResolutionChangeNotificationDelegate(
- this, change_info_->timeout_count > 0)));
- notification->SetSystemPriority();
- message_center->AddNotification(notification.Pass());
-}
-
-void ResolutionNotificationController::OnTimerTick() {
- if (!change_info_)
- return;
-
- --change_info_->timeout_count;
- if (change_info_->timeout_count == 0)
- RevertResolutionChange();
- else
- CreateOrUpdateNotification(false);
-}
-
-void ResolutionNotificationController::AcceptResolutionChange(
- bool close_notification) {
- if (close_notification) {
- message_center::MessageCenter::Get()->RemoveNotification(
- kNotificationId, false /* by_user */);
- }
- base::Closure callback = change_info_->accept_callback;
- change_info_.reset();
- callback.Run();
-}
-
-void ResolutionNotificationController::RevertResolutionChange() {
- message_center::MessageCenter::Get()->RemoveNotification(
- kNotificationId, false /* by_user */);
- int64 display_id = change_info_->display_id;
- gfx::Size old_resolution = change_info_->old_resolution;
- change_info_.reset();
- Shell::GetInstance()->display_manager()->SetDisplayResolution(
- display_id, old_resolution);
-}
-
-void ResolutionNotificationController::OnDisplayBoundsChanged(
- const gfx::Display& display) {
-}
-
-void ResolutionNotificationController::OnDisplayAdded(
- const gfx::Display& new_display) {
-}
-
-void ResolutionNotificationController::OnDisplayRemoved(
- const gfx::Display& old_display) {
- if (change_info_ && change_info_->display_id == old_display.id())
- RevertResolutionChange();
-}
-
-void ResolutionNotificationController::OnDisplayConfigurationChanged() {
- if (!change_info_)
- return;
-
- CreateOrUpdateNotification(true);
- if (g_use_timer && change_info_->timeout_count > 0) {
- change_info_->timer.Start(FROM_HERE,
- base::TimeDelta::FromSeconds(1),
- this,
- &ResolutionNotificationController::OnTimerTick);
- }
-}
-
-void ResolutionNotificationController::SuppressTimerForTest() {
- g_use_timer = false;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/resolution_notification_controller.h b/chromium/ash/display/resolution_notification_controller.h
deleted file mode 100644
index bacc9c8bee3..00000000000
--- a/chromium/ash/display/resolution_notification_controller.h
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_RESOLUTION_NOTIFICATION_CONTROLLER_H_
-#define ASH_DISPLAY_RESOLUTION_NOTIFICATION_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "ash/display/display_controller.h"
-#include "base/callback.h"
-#include "base/gtest_prod_util.h"
-#include "base/timer/timer.h"
-#include "ui/gfx/display_observer.h"
-#include "ui/gfx/size.h"
-
-namespace chromeos {
-FORWARD_DECLARE_TEST(DisplayPreferencesTest, PreventStore);
-} // namespace chromeos
-
-namespace views {
-class Label;
-class Widget;
-} // namespace views
-
-namespace ash {
-namespace internal {
-// A class which manages the notification of display resolution change and
-// also manages the timeout in case the new resolution is unusable.
-class ASH_EXPORT ResolutionNotificationController
- : public gfx::DisplayObserver,
- public DisplayController::Observer {
- public:
- ResolutionNotificationController();
- virtual ~ResolutionNotificationController();
-
- // Updates the display resolution for |display_id| to |new_resolution| and
- // creates a notification for this change which offers a button to revert the
- // change in case something goes wrong. The notification times out if there's
- // only one display connected and the user is trying to modify its resolution.
- // In that case, the timeout has to be set since the user cannot make any
- // changes if something goes wrong.
- void SetDisplayResolutionAndNotify(
- int64 display_id,
- const gfx::Size& old_resolution,
- const gfx::Size& new_resolution,
- const base::Closure& accept_callback);
-
- // Returns true if the notification is visible or scheduled to be visible and
- // the notification times out.
- bool DoesNotificationTimeout();
-
- // Called by the notification delegate when the user accepts the display
- // resolution change. Set |close_notification| to true when the notification
- // should be removed.
- void AcceptResolutionChange(bool close_notification);
-
- // Called by the notification delegate when the user wants to revert the
- // display resolution change.
- void RevertResolutionChange();
-
- private:
- friend class ResolutionNotificationControllerTest;
- FRIEND_TEST_ALL_PREFIXES(ResolutionNotificationControllerTest, Timeout);
- FRIEND_TEST_ALL_PREFIXES(chromeos::DisplayPreferencesTest, PreventStore);
-
- // A struct to bundle the data for a single resolution change.
- struct ResolutionChangeInfo;
-
- static const int kTimeoutInSec;
- static const char kNotificationId[];
-
- // Create a new notification, or update its content if it already exists.
- // |enable_spoken_feedback| is set to false when the notification is updated
- // during the countdown so the update isn't necessarily read by the spoken
- // feedback.
- void CreateOrUpdateNotification(bool enable_spoken_feedback);
-
- // Called every second for timeout.
- void OnTimerTick();
-
- // gfx::DisplayObserver overrides:
- virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE;
- virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE;
- virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE;
-
- // DisplayController::Observer overrides:
- virtual void OnDisplayConfigurationChanged() OVERRIDE;
-
- static void SuppressTimerForTest();
-
- scoped_ptr<ResolutionChangeInfo> change_info_;
-
- DISALLOW_COPY_AND_ASSIGN(ResolutionNotificationController);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DISPLAY_RESOLUTION_NOTIFICATION_CONTROLLER_H_
diff --git a/chromium/ash/display/resolution_notification_controller_unittest.cc b/chromium/ash/display/resolution_notification_controller_unittest.cc
deleted file mode 100644
index 0ec8852df05..00000000000
--- a/chromium/ash/display/resolution_notification_controller_unittest.cc
+++ /dev/null
@@ -1,314 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/resolution_notification_controller.h"
-
-#include "ash/display/display_manager.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "base/bind.h"
-#include "ui/gfx/size.h"
-#include "ui/message_center/message_center.h"
-
-namespace ash {
-namespace internal {
-
-class ResolutionNotificationControllerTest : public ash::test::AshTestBase {
- public:
- ResolutionNotificationControllerTest()
- : accept_count_(0) {
- }
-
- virtual ~ResolutionNotificationControllerTest() {}
-
- protected:
- virtual void SetUp() OVERRIDE {
- ash::test::AshTestBase::SetUp();
- ResolutionNotificationController::SuppressTimerForTest();
- }
-
- void SetDisplayResolutionAndNotify(const gfx::Display& display,
- const gfx::Size& new_resolution) {
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- const DisplayInfo& info = display_manager->GetDisplayInfo(display.id());
- Shell::GetInstance()->resolution_notification_controller()->
- SetDisplayResolutionAndNotify(
- display.id(),
- info.size_in_pixel(),
- new_resolution,
- base::Bind(&ResolutionNotificationControllerTest::OnAccepted,
- base::Unretained(this)));
-
- // OnConfigurationChanged event won't be emitted in the test environment,
- // so invoke UpdateDisplay() to emit that event explicitly.
- std::vector<DisplayInfo> info_list;
- for (size_t i = 0; i < display_manager->GetNumDisplays(); ++i) {
- int64 id = display_manager->GetDisplayAt(i).id();
- DisplayInfo info = display_manager->GetDisplayInfo(id);
- if (display.id() == id) {
- gfx::Rect bounds = info.bounds_in_native();
- bounds.set_size(new_resolution);
- info.SetBounds(bounds);
- }
- info_list.push_back(info);
- }
- display_manager->OnNativeDisplaysChanged(info_list);
- RunAllPendingInMessageLoop();
- }
-
- void ClickOnNotification() {
- message_center::MessageCenter::Get()->ClickOnNotification(
- ResolutionNotificationController::kNotificationId);
- }
-
- void ClickOnNotificationButton(int index) {
- message_center::MessageCenter::Get()->ClickOnNotificationButton(
- ResolutionNotificationController::kNotificationId, index);
- }
-
- void CloseNotification() {
- message_center::MessageCenter::Get()->RemoveNotification(
- ResolutionNotificationController::kNotificationId, true /* by_user */);
- }
-
- bool IsNotificationVisible() {
- return message_center::MessageCenter::Get()->HasNotification(
- ResolutionNotificationController::kNotificationId);
- }
-
- void TickTimer() {
- controller()->OnTimerTick();
- }
-
- ResolutionNotificationController* controller() {
- return Shell::GetInstance()->resolution_notification_controller();
- }
-
- int accept_count() const {
- return accept_count_;
- }
-
- private:
- void OnAccepted() {
- EXPECT_FALSE(controller()->DoesNotificationTimeout());
- accept_count_++;
- }
-
- int accept_count_;
-
- DISALLOW_COPY_AND_ASSIGN(ResolutionNotificationControllerTest);
-};
-
-// Basic behaviors and verifies it doesn't cause crashes.
-TEST_F(ResolutionNotificationControllerTest, Basic) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("300x300#300x300|200x200,250x250#250x250|200x200");
- int64 id2 = ash::ScreenAsh::GetSecondaryDisplay().id();
- ash::internal::DisplayManager* display_manager =
- ash::Shell::GetInstance()->display_manager();
- ASSERT_EQ(0, accept_count());
- EXPECT_FALSE(IsNotificationVisible());
-
- // Changes the resolution and apply the result.
- SetDisplayResolutionAndNotify(
- ScreenAsh::GetSecondaryDisplay(), gfx::Size(200, 200));
- EXPECT_TRUE(IsNotificationVisible());
- EXPECT_FALSE(controller()->DoesNotificationTimeout());
- gfx::Size resolution;
- EXPECT_TRUE(
- display_manager->GetSelectedResolutionForDisplayId(id2, &resolution));
- EXPECT_EQ("200x200", resolution.ToString());
-
- // Click the revert button, which reverts to the best resolution.
- ClickOnNotificationButton(0);
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(IsNotificationVisible());
- EXPECT_EQ(0, accept_count());
- EXPECT_FALSE(
- display_manager->GetSelectedResolutionForDisplayId(id2, &resolution));
-}
-
-TEST_F(ResolutionNotificationControllerTest, ClickMeansAccept) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("300x300#300x300|200x200,250x250#250x250|200x200");
- int64 id2 = ash::ScreenAsh::GetSecondaryDisplay().id();
- ash::internal::DisplayManager* display_manager =
- ash::Shell::GetInstance()->display_manager();
- ASSERT_EQ(0, accept_count());
- EXPECT_FALSE(IsNotificationVisible());
-
- // Changes the resolution and apply the result.
- SetDisplayResolutionAndNotify(
- ScreenAsh::GetSecondaryDisplay(), gfx::Size(200, 200));
- EXPECT_TRUE(IsNotificationVisible());
- EXPECT_FALSE(controller()->DoesNotificationTimeout());
- gfx::Size resolution;
- EXPECT_TRUE(
- display_manager->GetSelectedResolutionForDisplayId(id2, &resolution));
- EXPECT_EQ("200x200", resolution.ToString());
-
- // Click the revert button, which reverts the resolution.
- ClickOnNotification();
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(IsNotificationVisible());
- EXPECT_EQ(1, accept_count());
- EXPECT_TRUE(
- display_manager->GetSelectedResolutionForDisplayId(id2, &resolution));
- EXPECT_EQ("200x200", resolution.ToString());
-}
-
-TEST_F(ResolutionNotificationControllerTest, AcceptButton) {
- if (!SupportsMultipleDisplays())
- return;
-
- ash::internal::DisplayManager* display_manager =
- ash::Shell::GetInstance()->display_manager();
-
- UpdateDisplay("300x300#300x300|200x200");
- const gfx::Display& display = ash::Shell::GetScreen()->GetPrimaryDisplay();
- SetDisplayResolutionAndNotify(display, gfx::Size(200, 200));
- EXPECT_TRUE(IsNotificationVisible());
-
- // If there's a single display only, it will have timeout and the first button
- // becomes accept.
- EXPECT_TRUE(controller()->DoesNotificationTimeout());
- ClickOnNotificationButton(0);
- EXPECT_FALSE(IsNotificationVisible());
- EXPECT_EQ(1, accept_count());
- gfx::Size resolution;
- EXPECT_TRUE(display_manager->GetSelectedResolutionForDisplayId(
- display.id(), &resolution));
- EXPECT_EQ("200x200", resolution.ToString());
-
- // In that case the second button is revert.
- UpdateDisplay("300x300#300x300|200x200");
- SetDisplayResolutionAndNotify(display, gfx::Size(200, 200));
- EXPECT_TRUE(IsNotificationVisible());
-
- EXPECT_TRUE(controller()->DoesNotificationTimeout());
- ClickOnNotificationButton(1);
- EXPECT_FALSE(IsNotificationVisible());
- EXPECT_EQ(1, accept_count());
- EXPECT_FALSE(display_manager->GetSelectedResolutionForDisplayId(
- display.id(), &resolution));
-}
-
-TEST_F(ResolutionNotificationControllerTest, Close) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("100x100,150x150#150x150|200x200");
- int64 id2 = ash::ScreenAsh::GetSecondaryDisplay().id();
- ash::internal::DisplayManager* display_manager =
- ash::Shell::GetInstance()->display_manager();
- ASSERT_EQ(0, accept_count());
- EXPECT_FALSE(IsNotificationVisible());
-
- // Changes the resolution and apply the result.
- SetDisplayResolutionAndNotify(
- ScreenAsh::GetSecondaryDisplay(), gfx::Size(200, 200));
- EXPECT_TRUE(IsNotificationVisible());
- EXPECT_FALSE(controller()->DoesNotificationTimeout());
- gfx::Size resolution;
- EXPECT_TRUE(
- display_manager->GetSelectedResolutionForDisplayId(id2, &resolution));
- EXPECT_EQ("200x200", resolution.ToString());
-
- // Close the notification (imitates clicking [x] button). Also verifies if
- // this does not cause a crash. See crbug.com/271784
- CloseNotification();
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(IsNotificationVisible());
- EXPECT_EQ(1, accept_count());
-}
-
-TEST_F(ResolutionNotificationControllerTest, Timeout) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("300x300#300x300|200x200");
- const gfx::Display& display = ash::Shell::GetScreen()->GetPrimaryDisplay();
- SetDisplayResolutionAndNotify(display, gfx::Size(200, 200));
-
- for (int i = 0; i < ResolutionNotificationController::kTimeoutInSec; ++i) {
- EXPECT_TRUE(IsNotificationVisible()) << "notification is closed after "
- << i << "-th timer tick";
- TickTimer();
- RunAllPendingInMessageLoop();
- }
- EXPECT_FALSE(IsNotificationVisible());
- EXPECT_EQ(0, accept_count());
- gfx::Size resolution;
- ash::internal::DisplayManager* display_manager =
- ash::Shell::GetInstance()->display_manager();
- EXPECT_FALSE(display_manager->GetSelectedResolutionForDisplayId(
- display.id(), &resolution));
-}
-
-TEST_F(ResolutionNotificationControllerTest, DisplayDisconnected) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("300x300#300x300|200x200,200x200#250x250|200x200|100x100");
- int64 id2 = ash::ScreenAsh::GetSecondaryDisplay().id();
- ash::internal::DisplayManager* display_manager =
- ash::Shell::GetInstance()->display_manager();
- SetDisplayResolutionAndNotify(
- ScreenAsh::GetSecondaryDisplay(), gfx::Size(100, 100));
- ASSERT_TRUE(IsNotificationVisible());
-
- // Disconnects the secondary display and verifies it doesn't cause crashes.
- UpdateDisplay("300x300#300x300|200x200");
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(IsNotificationVisible());
- EXPECT_EQ(0, accept_count());
- gfx::Size resolution;
- EXPECT_TRUE(
- display_manager->GetSelectedResolutionForDisplayId(id2, &resolution));
- EXPECT_EQ("200x200", resolution.ToString());
-}
-
-TEST_F(ResolutionNotificationControllerTest, MultipleResolutionChange) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("300x300#300x300|200x200,250x250#250x250|200x200");
- int64 id2 = ash::ScreenAsh::GetSecondaryDisplay().id();
- ash::internal::DisplayManager* display_manager =
- ash::Shell::GetInstance()->display_manager();
-
- SetDisplayResolutionAndNotify(
- ScreenAsh::GetSecondaryDisplay(), gfx::Size(200, 200));
- EXPECT_TRUE(IsNotificationVisible());
- EXPECT_FALSE(controller()->DoesNotificationTimeout());
- gfx::Size resolution;
- EXPECT_TRUE(
- display_manager->GetSelectedResolutionForDisplayId(id2, &resolution));
- EXPECT_EQ("200x200", resolution.ToString());
-
- // Invokes SetDisplayResolutionAndNotify during the previous notification is
- // visible.
- SetDisplayResolutionAndNotify(
- ScreenAsh::GetSecondaryDisplay(), gfx::Size(250, 250));
- EXPECT_FALSE(
- display_manager->GetSelectedResolutionForDisplayId(id2, &resolution));
-
- // Then, click the revert button. Although |old_resolution| for the second
- // SetDisplayResolutionAndNotify is 200x200, it should revert to the original
- // size 150x150.
- ClickOnNotificationButton(0);
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(IsNotificationVisible());
- EXPECT_EQ(0, accept_count());
- EXPECT_FALSE(
- display_manager->GetSelectedResolutionForDisplayId(id2, &resolution));
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/root_window_transformers.cc b/chromium/ash/display/root_window_transformers.cc
deleted file mode 100644
index 7f808ddbc14..00000000000
--- a/chromium/ash/display/root_window_transformers.cc
+++ /dev/null
@@ -1,285 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/root_window_transformers.h"
-
-#include <cmath>
-
-#include "ash/display/display_info.h"
-#include "ash/display/display_manager.h"
-#include "ash/magnifier/magnification_controller.h"
-#include "ash/shell.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "third_party/skia/include/utils/SkMatrix44.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/root_window_transformer.h"
-#include "ui/aura/window_property.h"
-#include "ui/compositor/dip_util.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/insets.h"
-#include "ui/gfx/size_conversions.h"
-#include "ui/gfx/transform.h"
-#include "ui/gfx/transform.h"
-
-DECLARE_WINDOW_PROPERTY_TYPE(gfx::Display::Rotation);
-
-namespace ash {
-namespace internal {
-namespace {
-
-#if defined(OS_WIN)
-DEFINE_WINDOW_PROPERTY_KEY(gfx::Display::Rotation, kRotationPropertyKey,
- gfx::Display::ROTATE_0);
-#endif
-
-// Round near zero value to zero.
-void RoundNearZero(gfx::Transform* transform) {
- const float kEpsilon = 0.001f;
- SkMatrix44& matrix = transform->matrix();
- for (int x = 0; x < 4; ++x) {
- for (int y = 0; y < 4; ++y) {
- if (std::abs(SkMScalarToFloat(matrix.get(x, y))) < kEpsilon)
- matrix.set(x, y, SkFloatToMScalar(0.0f));
- }
- }
-}
-
-// TODO(oshima): Transformers should be able to adjust itself
-// when the device scale factor is changed, instead of
-// precalculating the transform using fixed value.
-
-gfx::Transform CreateRotationTransform(aura::Window* root_window,
- const gfx::Display& display) {
- DisplayInfo info =
- Shell::GetInstance()->display_manager()->GetDisplayInfo(display.id());
-
- // TODO(oshima): Add animation. (crossfade+rotation, or just cross-fade)
-#if defined(OS_WIN)
- // Windows 8 bots refused to resize the host window, and
- // updating the transform results in incorrectly resizing
- // the root window. Don't apply the transform unless
- // necessary so that unit tests pass on win8 bots.
- if (info.rotation() == root_window->GetProperty(kRotationPropertyKey))
- return gfx::Transform();
- root_window->SetProperty(kRotationPropertyKey, info.rotation());
-#endif
-
- gfx::Transform rotate;
- // The origin is (0, 0), so the translate width/height must be reduced by
- // 1 pixel.
- float one_pixel = 1.0f / display.device_scale_factor();
- switch (info.rotation()) {
- case gfx::Display::ROTATE_0:
- break;
- case gfx::Display::ROTATE_90:
- rotate.Translate(display.bounds().height() - one_pixel, 0);
- rotate.Rotate(90);
- break;
- case gfx::Display::ROTATE_270:
- rotate.Translate(0, display.bounds().width() - one_pixel);
- rotate.Rotate(270);
- break;
- case gfx::Display::ROTATE_180:
- rotate.Translate(display.bounds().width() - one_pixel,
- display.bounds().height() - one_pixel);
- rotate.Rotate(180);
- break;
- }
-
- RoundNearZero(&rotate);
- return rotate;
-}
-
-gfx::Transform CreateMagnifierTransform(aura::Window* root_window) {
- MagnificationController* magnifier =
- Shell::GetInstance()->magnification_controller();
- float magnifier_scale = 1.f;
- gfx::Point magnifier_offset;
- if (magnifier && magnifier->IsEnabled()) {
- magnifier_scale = magnifier->GetScale();
- magnifier_offset = magnifier->GetWindowPosition();
- }
- gfx::Transform transform;
- if (magnifier_scale != 1.f) {
- transform.Scale(magnifier_scale, magnifier_scale);
- transform.Translate(-magnifier_offset.x(), -magnifier_offset.y());
- }
- return transform;
-}
-
-gfx::Transform CreateInsetsAndScaleTransform(const gfx::Insets& insets,
- float device_scale_factor,
- float ui_scale) {
- gfx::Transform transform;
- if (insets.top() != 0 || insets.left() != 0) {
- float x_offset = insets.left() / device_scale_factor;
- float y_offset = insets.top() / device_scale_factor;
- transform.Translate(x_offset, y_offset);
- }
- float inverted_scale = 1.0f / ui_scale;
- transform.Scale(inverted_scale, inverted_scale);
- return transform;
-}
-
-// RootWindowTransformer for ash environment.
-class AshRootWindowTransformer : public aura::RootWindowTransformer {
- public:
- AshRootWindowTransformer(aura::Window* root,
- const gfx::Display& display)
- : root_window_(root) {
- DisplayInfo info = Shell::GetInstance()->display_manager()->
- GetDisplayInfo(display.id());
- host_insets_ = info.GetOverscanInsetsInPixel();
- root_window_ui_scale_ = info.GetEffectiveUIScale();
- root_window_bounds_transform_ =
- CreateInsetsAndScaleTransform(host_insets_,
- display.device_scale_factor(),
- root_window_ui_scale_) *
- CreateRotationTransform(root, display);
- transform_ = root_window_bounds_transform_ * CreateMagnifierTransform(root);
- CHECK(transform_.GetInverse(&invert_transform_));
-
- }
-
- // aura::RootWindowTransformer overrides:
- virtual gfx::Transform GetTransform() const OVERRIDE {
- return transform_;
- }
- virtual gfx::Transform GetInverseTransform() const OVERRIDE {
- return invert_transform_;
- }
- virtual gfx::Rect GetRootWindowBounds(
- const gfx::Size& host_size) const OVERRIDE {
- gfx::Rect bounds(host_size);
- bounds.Inset(host_insets_);
- bounds = ui::ConvertRectToDIP(root_window_->layer(), bounds);
- gfx::RectF new_bounds(bounds);
- root_window_bounds_transform_.TransformRect(&new_bounds);
- // Apply |root_window_scale_| twice as the downscaling
- // is already applied once in |SetTransformInternal()|.
- // TODO(oshima): This is a bit ugly. Consider specifying
- // the pseudo host resolution instead.
- new_bounds.Scale(root_window_ui_scale_ * root_window_ui_scale_);
- // Ignore the origin because RootWindow's insets are handled by
- // the transform.
- // Floor the size because the bounds is no longer aligned to
- // backing pixel when |root_window_scale_| is specified
- // (850 height at 1.25 scale becomes 1062.5 for example.)
- return gfx::Rect(gfx::ToFlooredSize(new_bounds.size()));
- }
-
- virtual gfx::Insets GetHostInsets() const OVERRIDE {
- return host_insets_;
- }
-
- private:
- virtual ~AshRootWindowTransformer() {}
-
- aura::Window* root_window_;
- gfx::Transform transform_;
-
- // The accurate representation of the inverse of the |transform_|.
- // This is used to avoid computation error caused by
- // |gfx::Transform::GetInverse|.
- gfx::Transform invert_transform_;
-
- // The transform of the root window bounds. This is used to calculate
- // the size of root window.
- gfx::Transform root_window_bounds_transform_;
-
- // The scale of the root window. See |display_info::ui_scale_|
- // for more info.
- float root_window_ui_scale_;
-
- gfx::Insets host_insets_;
-
- DISALLOW_COPY_AND_ASSIGN(AshRootWindowTransformer);
-};
-
-// RootWindowTransformer for mirror root window. We simply copy the
-// texture (bitmap) of the source display into the mirror window, so
-// the root window bounds is the same as the source display's
-// pixel size (excluding overscan insets).
-class MirrorRootWindowTransformer : public aura::RootWindowTransformer {
- public:
- MirrorRootWindowTransformer(const DisplayInfo& source_display_info,
- const DisplayInfo& mirror_display_info) {
- root_bounds_ = gfx::Rect(source_display_info.bounds_in_native().size());
- gfx::Rect mirror_display_rect =
- gfx::Rect(mirror_display_info.bounds_in_native().size());
-
- bool letterbox = root_bounds_.width() * mirror_display_rect.height() >
- root_bounds_.height() * mirror_display_rect.width();
- if (letterbox) {
- float mirror_scale_ratio =
- (static_cast<float>(root_bounds_.width()) /
- static_cast<float>(mirror_display_rect.width()));
- float inverted_scale = 1.0f / mirror_scale_ratio;
- int margin = static_cast<int>(
- (mirror_display_rect.height() -
- root_bounds_.height() * inverted_scale) / 2);
- insets_.Set(0, margin, 0, margin);
-
- transform_.Translate(0, margin);
- transform_.Scale(inverted_scale, inverted_scale);
- } else {
- float mirror_scale_ratio =
- (static_cast<float>(root_bounds_.height()) /
- static_cast<float>(mirror_display_rect.height()));
- float inverted_scale = 1.0f / mirror_scale_ratio;
- int margin = static_cast<int>(
- (mirror_display_rect.width() -
- root_bounds_.width() * inverted_scale) / 2);
- insets_.Set(margin, 0, margin, 0);
-
- transform_.Translate(margin, 0);
- transform_.Scale(inverted_scale, inverted_scale);
- }
- }
-
- // aura::RootWindowTransformer overrides:
- virtual gfx::Transform GetTransform() const OVERRIDE {
- return transform_;
- }
- virtual gfx::Transform GetInverseTransform() const OVERRIDE {
- gfx::Transform invert;
- CHECK(transform_.GetInverse(&invert));
- return invert;
- }
- virtual gfx::Rect GetRootWindowBounds(
- const gfx::Size& host_size) const OVERRIDE {
- return root_bounds_;
- }
- virtual gfx::Insets GetHostInsets() const OVERRIDE {
- return insets_;
- }
-
- private:
- virtual ~MirrorRootWindowTransformer() {}
-
- gfx::Transform transform_;
- gfx::Rect root_bounds_;
- gfx::Insets insets_;
-
- DISALLOW_COPY_AND_ASSIGN(MirrorRootWindowTransformer);
-};
-
-} // namespace
-
-aura::RootWindowTransformer* CreateRootWindowTransformerForDisplay(
- aura::Window* root,
- const gfx::Display& display) {
- return new AshRootWindowTransformer(root, display);
-}
-
-aura::RootWindowTransformer* CreateRootWindowTransformerForMirroredDisplay(
- const DisplayInfo& source_display_info,
- const DisplayInfo& mirror_display_info) {
- return new MirrorRootWindowTransformer(source_display_info,
- mirror_display_info);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/root_window_transformers.h b/chromium/ash/display/root_window_transformers.h
deleted file mode 100644
index e1d40533343..00000000000
--- a/chromium/ash/display/root_window_transformers.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_ROOT_WINDOW_TRANSFORMERS_H_
-#define ASH_DISPLAY_ROOT_WINDOW_TRANSFORMERS_H_
-
-#include "ash/ash_export.h"
-
-namespace aura {
-class RootWindowTransformer;
-class Window;
-}
-
-namespace gfx {
-class Display;
-class Transform;
-}
-
-namespace ash {
-namespace internal {
-class DisplayInfo;
-
-ASH_EXPORT aura::RootWindowTransformer* CreateRootWindowTransformerForDisplay(
- aura::Window* root,
- const gfx::Display& display);
-
-// Creates a RootWindowTransformers for mirror root window.
-// |source_display_info| specifies the display being mirrored,
-// and |mirror_display_info| specifies the display used to
-// mirror the content.
-ASH_EXPORT aura::RootWindowTransformer*
-CreateRootWindowTransformerForMirroredDisplay(
- const DisplayInfo& source_display_info,
- const DisplayInfo& mirror_display_info);
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DISPLAY_ROOT_WINDOW_TRANSFORMERS_H_
diff --git a/chromium/ash/display/root_window_transformers_unittest.cc b/chromium/ash/display/root_window_transformers_unittest.cc
deleted file mode 100644
index 7919243ae22..00000000000
--- a/chromium/ash/display/root_window_transformers_unittest.cc
+++ /dev/null
@@ -1,414 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/root_window_transformers.h"
-
-#include "ash/display/display_info.h"
-#include "ash/display/display_manager.h"
-#include "ash/launcher/launcher.h"
-#include "ash/magnifier/magnification_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/cursor_manager_test_api.h"
-#include "ash/test/mirror_window_test_api.h"
-#include "base/synchronization/waitable_event.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/root_window_transformer.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/window_tracker.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/rect_conversions.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-const char kDesktopBackgroundView[] = "DesktopBackgroundView";
-
-class TestEventHandler : public ui::EventHandler {
- public:
- TestEventHandler() : target_root_(NULL),
- touch_radius_x_(0.0),
- touch_radius_y_(0.0),
- scroll_x_offset_(0.0),
- scroll_y_offset_(0.0),
- scroll_x_offset_ordinal_(0.0),
- scroll_y_offset_ordinal_(0.0) {}
- virtual ~TestEventHandler() {}
-
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
- if (event->flags() & ui::EF_IS_SYNTHESIZED)
- return;
- aura::Window* target = static_cast<aura::Window*>(event->target());
- mouse_location_ = event->root_location();
- target_root_ = target->GetRootWindow();
- event->StopPropagation();
- }
-
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- // Only record when the target is the background which covers
- // entire root window.
- if (target->name() != kDesktopBackgroundView)
- return;
- touch_radius_x_ = event->radius_x();
- touch_radius_y_ = event->radius_y();
- event->StopPropagation();
- }
-
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- // Only record when the target is the background which covers
- // entire root window.
- if (target->name() != kDesktopBackgroundView)
- return;
-
- if (event->type() == ui::ET_SCROLL) {
- scroll_x_offset_ = event->x_offset();
- scroll_y_offset_ = event->y_offset();
- scroll_x_offset_ordinal_ = event->x_offset_ordinal();
- scroll_y_offset_ordinal_ = event->y_offset_ordinal();
- }
- event->StopPropagation();
- }
-
- std::string GetLocationAndReset() {
- std::string result = mouse_location_.ToString();
- mouse_location_.SetPoint(0, 0);
- target_root_ = NULL;
- return result;
- }
-
- float touch_radius_x() const { return touch_radius_x_; }
- float touch_radius_y() const { return touch_radius_y_; }
- float scroll_x_offset() const { return scroll_x_offset_; }
- float scroll_y_offset() const { return scroll_y_offset_; }
- float scroll_x_offset_ordinal() const { return scroll_x_offset_ordinal_; }
- float scroll_y_offset_ordinal() const { return scroll_y_offset_ordinal_; }
-
- private:
- gfx::Point mouse_location_;
- aura::Window* target_root_;
-
- float touch_radius_x_;
- float touch_radius_y_;
- float scroll_x_offset_;
- float scroll_y_offset_;
- float scroll_x_offset_ordinal_;
- float scroll_y_offset_ordinal_;
-
- DISALLOW_COPY_AND_ASSIGN(TestEventHandler);
-};
-
-gfx::Display::Rotation GetStoredRotation(int64 id) {
- return Shell::GetInstance()->display_manager()->GetDisplayInfo(id).rotation();
-}
-
-float GetStoredUIScale(int64 id) {
- return Shell::GetInstance()->display_manager()->GetDisplayInfo(id).
- GetEffectiveUIScale();
-}
-
-} // namespace
-
-typedef test::AshTestBase RootWindowTransformersTest;
-
-#if defined(OS_WIN)
-// TODO(scottmg): RootWindow doesn't get resized on Windows
-// Ash. http://crbug.com/247916.
-#define MAYBE_RotateAndMagnify DISABLED_RotateAndMagniy
-#define MAYBE_TouchScaleAndMagnify DISABLED_TouchScaleAndMagnify
-#define MAYBE_ConvertHostToRootCoords DISABLED_ConvertHostToRootCoords
-#else
-#define MAYBE_RotateAndMagnify RotateAndMagniy
-#define MAYBE_TouchScaleAndMagnify TouchScaleAndMagnify
-#define MAYBE_ConvertHostToRootCoords ConvertHostToRootCoords
-#endif
-
-TEST_F(RootWindowTransformersTest, MAYBE_RotateAndMagnify) {
- MagnificationController* magnifier =
- Shell::GetInstance()->magnification_controller();
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
-
- TestEventHandler event_handler;
- Shell::GetInstance()->AddPreTargetHandler(&event_handler);
-
- UpdateDisplay("120x200,300x400*2");
- gfx::Display display1 = Shell::GetScreen()->GetPrimaryDisplay();
- int64 display2_id = ScreenAsh::GetSecondaryDisplay().id();
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- aura::test::EventGenerator generator1(root_windows[0]);
- aura::test::EventGenerator generator2(root_windows[1]);
-
- magnifier->SetEnabled(true);
- EXPECT_EQ(2.0f, magnifier->GetScale());
- EXPECT_EQ("120x200", root_windows[0]->bounds().size().ToString());
- EXPECT_EQ("150x200", root_windows[1]->bounds().size().ToString());
- EXPECT_EQ("120,0 150x200",
- ScreenAsh::GetSecondaryDisplay().bounds().ToString());
- generator1.MoveMouseToInHost(40, 80);
- EXPECT_EQ("50,90", event_handler.GetLocationAndReset());
- EXPECT_EQ("50,90",
- aura::Env::GetInstance()->last_mouse_location().ToString());
- EXPECT_EQ(gfx::Display::ROTATE_0, GetStoredRotation(display1.id()));
- EXPECT_EQ(gfx::Display::ROTATE_0, GetStoredRotation(display2_id));
- magnifier->SetEnabled(false);
-
- display_manager->SetDisplayRotation(display1.id(),
- gfx::Display::ROTATE_90);
- // Move the cursor to the center of the first root window.
- generator1.MoveMouseToInHost(59, 100);
-
- magnifier->SetEnabled(true);
- EXPECT_EQ(2.0f, magnifier->GetScale());
- EXPECT_EQ("200x120", root_windows[0]->bounds().size().ToString());
- EXPECT_EQ("150x200", root_windows[1]->bounds().size().ToString());
- EXPECT_EQ("200,0 150x200",
- ScreenAsh::GetSecondaryDisplay().bounds().ToString());
- generator1.MoveMouseToInHost(39, 120);
- EXPECT_EQ("110,70", event_handler.GetLocationAndReset());
- EXPECT_EQ("110,70",
- aura::Env::GetInstance()->last_mouse_location().ToString());
- EXPECT_EQ(gfx::Display::ROTATE_90, GetStoredRotation(display1.id()));
- EXPECT_EQ(gfx::Display::ROTATE_0, GetStoredRotation(display2_id));
- magnifier->SetEnabled(false);
-
- DisplayLayout display_layout(DisplayLayout::BOTTOM, 50);
- display_manager->SetLayoutForCurrentDisplays(display_layout);
- EXPECT_EQ("50,120 150x200",
- ScreenAsh::GetSecondaryDisplay().bounds().ToString());
-
- display_manager->SetDisplayRotation(display2_id,
- gfx::Display::ROTATE_270);
- // Move the cursor to the center of the second root window.
- generator2.MoveMouseToInHost(151, 199);
-
- magnifier->SetEnabled(true);
- EXPECT_EQ("200x120", root_windows[0]->bounds().size().ToString());
- EXPECT_EQ("200x150", root_windows[1]->bounds().size().ToString());
- EXPECT_EQ("50,120 200x150",
- ScreenAsh::GetSecondaryDisplay().bounds().ToString());
- generator2.MoveMouseToInHost(172, 219);
- EXPECT_EQ("95,80", event_handler.GetLocationAndReset());
- EXPECT_EQ("145,200",
- aura::Env::GetInstance()->last_mouse_location().ToString());
- EXPECT_EQ(gfx::Display::ROTATE_90, GetStoredRotation(display1.id()));
- EXPECT_EQ(gfx::Display::ROTATE_270, GetStoredRotation(display2_id));
- magnifier->SetEnabled(false);
-
- display_manager->SetDisplayRotation(display1.id(),
- gfx::Display::ROTATE_180);
- // Move the cursor to the center of the first root window.
- generator1.MoveMouseToInHost(59, 99);
-
- magnifier->SetEnabled(true);
- EXPECT_EQ("120x200", root_windows[0]->bounds().size().ToString());
- EXPECT_EQ("200x150", root_windows[1]->bounds().size().ToString());
- // Dislay must share at least 100, so the x's offset becomes 20.
- EXPECT_EQ("20,200 200x150",
- ScreenAsh::GetSecondaryDisplay().bounds().ToString());
- generator1.MoveMouseToInHost(39, 59);
- EXPECT_EQ("70,120", event_handler.GetLocationAndReset());
- EXPECT_EQ(gfx::Display::ROTATE_180, GetStoredRotation(display1.id()));
- EXPECT_EQ(gfx::Display::ROTATE_270, GetStoredRotation(display2_id));
- magnifier->SetEnabled(false);
-
- Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
-}
-
-TEST_F(RootWindowTransformersTest, ScaleAndMagnify) {
- if (!SupportsMultipleDisplays())
- return;
-
- TestEventHandler event_handler;
- Shell::GetInstance()->AddPreTargetHandler(&event_handler);
-
- UpdateDisplay("600x400*2@1.5,500x300");
-
- gfx::Display display1 = Shell::GetScreen()->GetPrimaryDisplay();
- gfx::Display::SetInternalDisplayId(display1.id());
- gfx::Display display2 = ScreenAsh::GetSecondaryDisplay();
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- MagnificationController* magnifier =
- Shell::GetInstance()->magnification_controller();
-
- magnifier->SetEnabled(true);
- EXPECT_EQ(2.0f, magnifier->GetScale());
- EXPECT_EQ("0,0 450x300", display1.bounds().ToString());
- EXPECT_EQ("0,0 450x300", root_windows[0]->bounds().ToString());
- EXPECT_EQ("450,0 500x300", display2.bounds().ToString());
- EXPECT_EQ(1.5f, GetStoredUIScale(display1.id()));
- EXPECT_EQ(1.0f, GetStoredUIScale(display2.id()));
-
- aura::test::EventGenerator generator(root_windows[0]);
- generator.MoveMouseToInHost(500, 200);
- EXPECT_EQ("299,150", event_handler.GetLocationAndReset());
- magnifier->SetEnabled(false);
-
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- display_manager->SetDisplayUIScale(display1.id(), 1.25);
- display1 = Shell::GetScreen()->GetPrimaryDisplay();
- display2 = ScreenAsh::GetSecondaryDisplay();
- magnifier->SetEnabled(true);
- EXPECT_EQ(2.0f, magnifier->GetScale());
- EXPECT_EQ("0,0 375x250", display1.bounds().ToString());
- EXPECT_EQ("0,0 375x250", root_windows[0]->bounds().ToString());
- EXPECT_EQ("375,0 500x300", display2.bounds().ToString());
- EXPECT_EQ(1.25f, GetStoredUIScale(display1.id()));
- EXPECT_EQ(1.0f, GetStoredUIScale(display2.id()));
- magnifier->SetEnabled(false);
-
- Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
-}
-
-TEST_F(RootWindowTransformersTest, MAYBE_TouchScaleAndMagnify) {
- TestEventHandler event_handler;
- Shell::GetInstance()->AddPreTargetHandler(&event_handler);
-
- UpdateDisplay("200x200*2");
- gfx::Display display = Shell::GetScreen()->GetPrimaryDisplay();
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- aura::Window* root_window = root_windows[0];
- aura::test::EventGenerator generator(root_window);
- MagnificationController* magnifier =
- Shell::GetInstance()->magnification_controller();
-
- magnifier->SetEnabled(true);
- EXPECT_FLOAT_EQ(2.0f, magnifier->GetScale());
- magnifier->SetScale(2.5f, false);
- EXPECT_FLOAT_EQ(2.5f, magnifier->GetScale());
- generator.PressMoveAndReleaseTouchTo(50, 50);
- // Default test touches have radius_x/y = 1.0, with device scale
- // factor = 2, the scaled radius_x/y should be 0.5.
- EXPECT_FLOAT_EQ(0.2f, event_handler.touch_radius_x());
- EXPECT_FLOAT_EQ(0.2f, event_handler.touch_radius_y());
-
- generator.ScrollSequence(gfx::Point(0,0),
- base::TimeDelta::FromMilliseconds(100),
- 10.0, 1.0, 5, 1);
-
- // ordinal_offset is invariant to the device scale factor.
- EXPECT_FLOAT_EQ(event_handler.scroll_x_offset(),
- event_handler.scroll_x_offset_ordinal());
- EXPECT_FLOAT_EQ(event_handler.scroll_y_offset(),
- event_handler.scroll_y_offset_ordinal());
- magnifier->SetEnabled(false);
-
- Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
-}
-
-TEST_F(RootWindowTransformersTest, MAYBE_ConvertHostToRootCoords) {
- TestEventHandler event_handler;
- Shell::GetInstance()->AddPreTargetHandler(&event_handler);
- MagnificationController* magnifier =
- Shell::GetInstance()->magnification_controller();
-
- // Test 1
- UpdateDisplay("600x400*2/r@1.5");
-
- gfx::Display display1 = Shell::GetScreen()->GetPrimaryDisplay();
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- EXPECT_EQ("0,0 300x450", display1.bounds().ToString());
- EXPECT_EQ("0,0 300x450", root_windows[0]->bounds().ToString());
- EXPECT_EQ(1.5f, GetStoredUIScale(display1.id()));
-
- aura::test::EventGenerator generator(root_windows[0]);
- generator.MoveMouseToInHost(300, 200);
- magnifier->SetEnabled(true);
- EXPECT_EQ("150,224", event_handler.GetLocationAndReset());
- EXPECT_FLOAT_EQ(2.0f, magnifier->GetScale());
-
- generator.MoveMouseToInHost(300, 200);
- EXPECT_EQ("150,224", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(200, 300);
- EXPECT_EQ("187,261", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(100, 400);
- EXPECT_EQ("237,299", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(0, 0);
- EXPECT_EQ("137,348", event_handler.GetLocationAndReset());
-
- magnifier->SetEnabled(false);
- EXPECT_FLOAT_EQ(1.0f, magnifier->GetScale());
-
- // Test 2
- UpdateDisplay("600x400*2/u@1.5");
- display1 = Shell::GetScreen()->GetPrimaryDisplay();
- root_windows = Shell::GetAllRootWindows();
- EXPECT_EQ("0,0 450x300", display1.bounds().ToString());
- EXPECT_EQ("0,0 450x300", root_windows[0]->bounds().ToString());
- EXPECT_EQ(1.5f, GetStoredUIScale(display1.id()));
-
- generator.MoveMouseToInHost(300, 200);
- magnifier->SetEnabled(true);
- EXPECT_EQ("224,149", event_handler.GetLocationAndReset());
- EXPECT_FLOAT_EQ(2.0f, magnifier->GetScale());
-
- generator.MoveMouseToInHost(300, 200);
- EXPECT_EQ("224,148", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(200, 300);
- EXPECT_EQ("261,111", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(100, 400);
- EXPECT_EQ("299,60", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(0, 0);
- EXPECT_EQ("348,159", event_handler.GetLocationAndReset());
-
- magnifier->SetEnabled(false);
- EXPECT_FLOAT_EQ(1.0f, magnifier->GetScale());
-
- // Test 3
- UpdateDisplay("600x400*2/l@1.5");
- display1 = Shell::GetScreen()->GetPrimaryDisplay();
- root_windows = Shell::GetAllRootWindows();
- EXPECT_EQ("0,0 300x450", display1.bounds().ToString());
- EXPECT_EQ("0,0 300x450", root_windows[0]->bounds().ToString());
- EXPECT_EQ(1.5f, GetStoredUIScale(display1.id()));
-
- generator.MoveMouseToInHost(300, 200);
- magnifier->SetEnabled(true);
- EXPECT_EQ("149,225", event_handler.GetLocationAndReset());
- EXPECT_FLOAT_EQ(2.0f, magnifier->GetScale());
-
- generator.MoveMouseToInHost(300, 200);
- EXPECT_EQ("148,224", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(200, 300);
- EXPECT_EQ("111,187", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(100, 400);
- EXPECT_EQ("60,149", event_handler.GetLocationAndReset());
- generator.MoveMouseToInHost(0, 0);
- EXPECT_EQ("159,99", event_handler.GetLocationAndReset());
-
- magnifier->SetEnabled(false);
- EXPECT_FLOAT_EQ(1.0f, magnifier->GetScale());
-
- Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
-}
-
-TEST_F(RootWindowTransformersTest, LetterBoxPillarBox) {
- if (!SupportsMultipleDisplays())
- return;
- test::MirrorWindowTestApi test_api;
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- display_manager->SetSecondDisplayMode(DisplayManager::MIRRORING);
- UpdateDisplay("400x200,500x500");
- scoped_ptr<aura::RootWindowTransformer> transformer(
- test_api.CreateCurrentRootWindowTransformer());
- // Y margin must be margin is (500 - 500/400 * 200) / 2 = 125.
- EXPECT_EQ("0,125,0,125", transformer->GetHostInsets().ToString());
-
- UpdateDisplay("200x400,500x500");
- // The aspect ratio is flipped, so X margin is now 125.
- transformer = test_api.CreateCurrentRootWindowTransformer();
- EXPECT_EQ("125,0,125,0", transformer->GetHostInsets().ToString());
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/display/screen_position_controller.cc b/chromium/ash/display/screen_position_controller.cc
deleted file mode 100644
index e9f7a4297f2..00000000000
--- a/chromium/ash/display/screen_position_controller.cc
+++ /dev/null
@@ -1,218 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/screen_position_controller.h"
-
-#include "ash/display/display_controller.h"
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ash/wm/system_modal_container_layout_manager.h"
-#include "ash/wm/window_properties.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/client/capture_client.h"
-#include "ui/aura/client/focus_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window_tracker.h"
-#include "ui/compositor/dip_util.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-namespace {
-
-// Return true if the window or its ancestor has |kStayInSameRootWindowkey|
-// property.
-bool ShouldStayInSameRootWindow(const aura::Window* window) {
- return window &&
- (window->GetProperty(internal::kStayInSameRootWindowKey) ||
- ShouldStayInSameRootWindow(window->parent()));
-}
-
-// Move all transient children to |dst_root|, including the ones in
-// the child windows and transient children of the transient children.
-void MoveAllTransientChildrenToNewRoot(const gfx::Display& display,
- aura::Window* window) {
- aura::Window* dst_root = Shell::GetInstance()->display_controller()->
- GetRootWindowForDisplayId(display.id());
- aura::Window::Windows transient_children = window->transient_children();
- for (aura::Window::Windows::iterator iter = transient_children.begin();
- iter != transient_children.end(); ++iter) {
- aura::Window* transient_child = *iter;
- int container_id = transient_child->parent()->id();
- DCHECK_GE(container_id, 0);
- aura::Window* container = Shell::GetContainer(dst_root, container_id);
- gfx::Rect parent_bounds_in_screen = transient_child->GetBoundsInScreen();
- container->AddChild(transient_child);
- transient_child->SetBoundsInScreen(parent_bounds_in_screen, display);
-
- // Transient children may have transient children.
- MoveAllTransientChildrenToNewRoot(display, transient_child);
- }
- // Move transient children of the child windows if any.
- aura::Window::Windows children = window->children();
- for (aura::Window::Windows::iterator iter = children.begin();
- iter != children.end(); ++iter)
- MoveAllTransientChildrenToNewRoot(display, *iter);
-}
-
-// Finds the root window at |location| in |window|'s coordinates and returns a
-// pair of root window and location in that root window's coordinates. The
-// function usually returns |window->GetRootWindow()|, but if the mouse pointer
-// is moved outside the |window|'s root while the mouse is captured, it returns
-// the other root window.
-std::pair<aura::Window*, gfx::Point> GetRootWindowRelativeToWindow(
- aura::Window* window,
- const gfx::Point& location) {
- aura::Window* root_window = window->GetRootWindow();
- gfx::Point location_in_root(location);
- aura::Window::ConvertPointToTarget(window, root_window, &location_in_root);
-
-#if defined(USE_X11)
- if (!root_window->ContainsPointInRoot(location_in_root)) {
- // This conversion is necessary to deal with X's passive input
- // grab while dragging window. For example, if we have two
- // displays, say 1000x1000 (primary) and 500x500 (extended one
- // on the right), and start dragging a window at (999, 123), and
- // then move the pointer to the right, the pointer suddenly
- // warps to the extended display. The destination is (0, 123) in
- // the secondary root window's coordinates, or (1000, 123) in
- // the screen coordinates. However, since the mouse is captured
- // by X during drag, a weird LocatedEvent, something like (0, 1123)
- // in the *primary* root window's coordinates, is sent to Chrome
- // (Remember that in the native X11 world, the two root windows
- // are always stacked vertically regardless of the display
- // layout in Ash). We need to figure out that (0, 1123) in the
- // primary root window's coordinates is actually (0, 123) in the
- // extended root window's coordinates.
-
- gfx::Point location_in_native(location_in_root);
- root_window->GetDispatcher()->host()->ConvertPointToNativeScreen(
- &location_in_native);
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- for (size_t i = 0; i < root_windows.size(); ++i) {
- aura::WindowEventDispatcher* dispatcher =
- root_windows[i]->GetDispatcher();
- const gfx::Rect native_bounds = dispatcher->host()->GetBounds();
- if (native_bounds.Contains(location_in_native)) {
- root_window = root_windows[i];
- location_in_root = location_in_native;
- dispatcher->host()->ConvertPointFromNativeScreen(&location_in_root);
- break;
- }
- }
- }
-#else
- // TODO(yusukes): Support non-X11 platforms if necessary.
-#endif
-
- return std::make_pair(root_window, location_in_root);
-}
-
-} // namespace
-
-namespace internal {
-
-void ScreenPositionController::ConvertPointToScreen(
- const aura::Window* window,
- gfx::Point* point) {
- const aura::Window* root = window->GetRootWindow();
- aura::Window::ConvertPointToTarget(window, root, point);
- const gfx::Point display_origin = Shell::GetScreen()->GetDisplayNearestWindow(
- const_cast<aura::Window*>(root)).bounds().origin();
- point->Offset(display_origin.x(), display_origin.y());
-}
-
-void ScreenPositionController::ConvertPointFromScreen(
- const aura::Window* window,
- gfx::Point* point) {
- const aura::Window* root = window->GetRootWindow();
- const gfx::Point display_origin = Shell::GetScreen()->GetDisplayNearestWindow(
- const_cast<aura::Window*>(root)).bounds().origin();
- point->Offset(-display_origin.x(), -display_origin.y());
- aura::Window::ConvertPointToTarget(root, window, point);
-}
-
-void ScreenPositionController::ConvertHostPointToScreen(
- aura::Window* root_window,
- gfx::Point* point) {
- aura::Window* root = root_window->GetRootWindow();
- root->GetDispatcher()->ConvertPointFromHost(point);
- std::pair<aura::Window*, gfx::Point> pair =
- GetRootWindowRelativeToWindow(root, *point);
- *point = pair.second;
- ConvertPointToScreen(pair.first, point);
-}
-
-void ScreenPositionController::SetBounds(aura::Window* window,
- const gfx::Rect& bounds,
- const gfx::Display& display) {
- DCHECK_NE(-1, display.id());
- if (!window->parent()->GetProperty(internal::kUsesScreenCoordinatesKey)) {
- window->SetBounds(bounds);
- return;
- }
-
- // Don't move a window to other root window if:
- // a) the window is a transient window. It moves when its
- // transient_parent moves.
- // b) if the window or its ancestor has kStayInSameRootWindowkey. It's
- // intentionally kept in the same root window even if the bounds is
- // outside of the display.
- if (!window->transient_parent() &&
- !ShouldStayInSameRootWindow(window)) {
- aura::Window* dst_root =
- Shell::GetInstance()->display_controller()->GetRootWindowForDisplayId(
- display.id());
- DCHECK(dst_root);
- aura::Window* dst_container = NULL;
- if (dst_root != window->GetRootWindow()) {
- int container_id = window->parent()->id();
- // All containers that uses screen coordinates must have valid window ids.
- DCHECK_GE(container_id, 0);
- // Don't move modal background.
- if (!SystemModalContainerLayoutManager::IsModalBackground(window))
- dst_container = Shell::GetContainer(dst_root, container_id);
- }
-
- if (dst_container && window->parent() != dst_container) {
- aura::Window* focused = aura::client::GetFocusClient(window)->
- GetFocusedWindow();
- aura::client::ActivationClient* activation_client =
- aura::client::GetActivationClient(window->GetRootWindow());
- aura::Window* active = activation_client->GetActiveWindow();
-
- aura::WindowTracker tracker;
- if (focused)
- tracker.Add(focused);
- if (active && focused != active)
- tracker.Add(active);
-
- dst_container->AddChild(window);
-
- MoveAllTransientChildrenToNewRoot(display, window);
-
- // Restore focused/active window.
- if (tracker.Contains(focused)) {
- aura::client::GetFocusClient(window)->FocusWindow(focused);
- // TODO(beng): replace with GetRootWindow().
- ash::Shell::GetInstance()->set_target_root_window(
- focused->GetRootWindow());
- } else if (tracker.Contains(active)) {
- activation_client->ActivateWindow(active);
- }
- }
- }
-
- gfx::Point origin(bounds.origin());
- const gfx::Point display_origin = Shell::GetScreen()->GetDisplayNearestWindow(
- window).bounds().origin();
- origin.Offset(-display_origin.x(), -display_origin.y());
- window->SetBounds(gfx::Rect(origin, bounds.size()));
-}
-
-} // internal
-} // ash
diff --git a/chromium/ash/display/screen_position_controller.h b/chromium/ash/display/screen_position_controller.h
deleted file mode 100644
index ad692f9b1df..00000000000
--- a/chromium/ash/display/screen_position_controller.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_SCREEN_POSITION_CONTROLLER_H_
-#define ASH_DISPLAY_SCREEN_POSITION_CONTROLLER_H_
-
-#include "base/basictypes.h"
-#include "ui/aura/client/screen_position_client.h"
-
-namespace ash {
-namespace internal {
-
-class ScreenPositionController : public aura::client::ScreenPositionClient {
- public:
- ScreenPositionController() {}
- virtual ~ScreenPositionController() {}
-
- // aura::client::ScreenPositionClient overrides:
- virtual void ConvertPointToScreen(const aura::Window* window,
- gfx::Point* point) OVERRIDE;
- virtual void ConvertPointFromScreen(const aura::Window* window,
- gfx::Point* point) OVERRIDE;
- virtual void ConvertHostPointToScreen(aura::Window* window,
- gfx::Point* point) OVERRIDE;
- virtual void SetBounds(aura::Window* window,
- const gfx::Rect& bounds,
- const gfx::Display& display) OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ScreenPositionController);
-};
-
-} // internal
-} // ash
-
-#endif // ASH_DISPLAY_SCREEN_POSITION_CONTROLLER_H_
diff --git a/chromium/ash/display/screen_position_controller_unittest.cc b/chromium/ash/display/screen_position_controller_unittest.cc
deleted file mode 100644
index a9996c25eb0..00000000000
--- a/chromium/ash/display/screen_position_controller_unittest.cc
+++ /dev/null
@@ -1,280 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/screen_position_controller.h"
-
-#include "ash/display/display_manager.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/shell_test_api.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/base/layout.h"
-#include "ui/gfx/screen.h"
-
-#if defined(OS_WIN)
-// TODO(scottmg): RootWindow doesn't get resized immediately on Windows
-// Ash. http://crbug.com/247916.
-#define MAYBE_ConvertHostPointToScreen DISABLED_ConvertHostPointToScreen
-#define MAYBE_ConvertHostPointToScreenHiDPI DISABLED_ConvertHostPointToScreenHiDPI
-#define MAYBE_ConvertHostPointToScreenRotate DISABLED_ConvertHostPointToScreenRotate
-#define MAYBE_ConvertHostPointToScreenUIScale DISABLED_ConvertHostPointToScreenUIScale
-#else
-#define MAYBE_ConvertHostPointToScreen ConvertHostPointToScreen
-#define MAYBE_ConvertHostPointToScreenHiDPI ConvertHostPointToScreenHiDPI
-#define MAYBE_ConvertHostPointToScreenRotate ConvertHostPointToScreenRotate
-#define MAYBE_ConvertHostPointToScreenUIScale ConvertHostPointToScreenUIScale
-#endif
-
-namespace ash {
-namespace test {
-
-namespace {
-void SetSecondaryDisplayLayout(DisplayLayout::Position position) {
- DisplayLayout layout =
- Shell::GetInstance()->display_manager()->GetCurrentDisplayLayout();
- layout.position = position;
- Shell::GetInstance()->display_manager()->
- SetLayoutForCurrentDisplays(layout);
-}
-
-internal::ScreenPositionController* GetScreenPositionController() {
- ShellTestApi test_api(Shell::GetInstance());
- return test_api.screen_position_controller();
-}
-
-class ScreenPositionControllerTest : public test::AshTestBase {
- public:
- ScreenPositionControllerTest() {}
- virtual ~ScreenPositionControllerTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- window_.reset(new aura::Window(&window_delegate_));
- window_->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window_->Init(ui::LAYER_NOT_DRAWN);
- ParentWindowInPrimaryRootWindow(window_.get());
- window_->set_id(1);
- }
-
- virtual void TearDown() OVERRIDE {
- window_.reset();
- AshTestBase::TearDown();
- }
-
- // Converts a point (x, y) in host window's coordinate to screen and
- // returns its string representation.
- std::string ConvertHostPointToScreen(int x, int y) const {
- gfx::Point point(x, y);
- GetScreenPositionController()->ConvertHostPointToScreen(
- window_->GetRootWindow(), &point);
- return point.ToString();
- }
-
- protected:
- scoped_ptr<aura::Window> window_;
- aura::test::TestWindowDelegate window_delegate_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ScreenPositionControllerTest);
-};
-
-} // namespace
-
-TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) {
- UpdateDisplay("100+100-200x200,100+500-200x200");
-
- aura::Window::Windows root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- EXPECT_EQ("100,100", root_windows[0]->GetDispatcher()->host()->
- GetBounds().origin().ToString());
- EXPECT_EQ("200x200", root_windows[0]->GetDispatcher()->host()->
- GetBounds().size().ToString());
- EXPECT_EQ("100,500", root_windows[1]->GetDispatcher()->host()->
- GetBounds().origin().ToString());
- EXPECT_EQ("200x200", root_windows[1]->GetDispatcher()->host()->
- GetBounds().size().ToString());
-
- const gfx::Point window_pos(100, 100);
- window_->SetBoundsInScreen(
- gfx::Rect(window_pos, gfx::Size(100, 100)),
- Shell::GetScreen()->GetDisplayNearestPoint(window_pos));
- SetSecondaryDisplayLayout(DisplayLayout::RIGHT);
- // The point is on the primary root window.
- EXPECT_EQ("50,50", ConvertHostPointToScreen(50, 50));
- // The point is out of the all root windows.
- EXPECT_EQ("250,250", ConvertHostPointToScreen(250, 250));
- // The point is on the secondary display.
- EXPECT_EQ("250,0", ConvertHostPointToScreen(50, 400));
-
- SetSecondaryDisplayLayout(DisplayLayout::BOTTOM);
- // The point is on the primary root window.
- EXPECT_EQ("50,50", ConvertHostPointToScreen(50, 50));
- // The point is out of the all root windows.
- EXPECT_EQ("250,250", ConvertHostPointToScreen(250, 250));
- // The point is on the secondary display.
- EXPECT_EQ("50,200", ConvertHostPointToScreen(50, 400));
-
- SetSecondaryDisplayLayout(DisplayLayout::LEFT);
- // The point is on the primary root window.
- EXPECT_EQ("50,50", ConvertHostPointToScreen(50, 50));
- // The point is out of the all root windows.
- EXPECT_EQ("250,250", ConvertHostPointToScreen(250, 250));
- // The point is on the secondary display.
- EXPECT_EQ("-150,0", ConvertHostPointToScreen(50, 400));
-
- SetSecondaryDisplayLayout(DisplayLayout::TOP);
- // The point is on the primary root window.
- EXPECT_EQ("50,50", ConvertHostPointToScreen(50, 50));
- // The point is out of the all root windows.
- EXPECT_EQ("250,250", ConvertHostPointToScreen(250, 250));
- // The point is on the secondary display.
- EXPECT_EQ("50,-200", ConvertHostPointToScreen(50, 400));
-
-
- SetSecondaryDisplayLayout(DisplayLayout::RIGHT);
- const gfx::Point window_pos2(300, 100);
- window_->SetBoundsInScreen(
- gfx::Rect(window_pos2, gfx::Size(100, 100)),
- Shell::GetScreen()->GetDisplayNearestPoint(window_pos2));
- // The point is on the secondary display.
- EXPECT_EQ("250,50", ConvertHostPointToScreen(50, 50));
- // The point is out of the all root windows.
- EXPECT_EQ("450,250", ConvertHostPointToScreen(250, 250));
- // The point is on the primary root window.
- EXPECT_EQ("50,0", ConvertHostPointToScreen(50, -400));
-
- SetSecondaryDisplayLayout(DisplayLayout::BOTTOM);
- // The point is on the secondary display.
- EXPECT_EQ("50,250", ConvertHostPointToScreen(50, 50));
- // The point is out of the all root windows.
- EXPECT_EQ("250,450", ConvertHostPointToScreen(250, 250));
- // The point is on the primary root window.
- EXPECT_EQ("50,0", ConvertHostPointToScreen(50, -400));
-
- SetSecondaryDisplayLayout(DisplayLayout::LEFT);
- // The point is on the secondary display.
- EXPECT_EQ("-150,50", ConvertHostPointToScreen(50, 50));
- // The point is out of the all root windows.
- EXPECT_EQ("50,250", ConvertHostPointToScreen(250, 250));
- // The point is on the primary root window.
- EXPECT_EQ("50,0", ConvertHostPointToScreen(50, -400));
-
- SetSecondaryDisplayLayout(DisplayLayout::TOP);
- // The point is on the secondary display.
- EXPECT_EQ("50,-150", ConvertHostPointToScreen(50, 50));
- // The point is out of the all root windows.
- EXPECT_EQ("250,50", ConvertHostPointToScreen(250, 250));
- // The point is on the primary root window.
- EXPECT_EQ("50,0", ConvertHostPointToScreen(50, -400));
-}
-
-TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreenHiDPI) {
- UpdateDisplay("100+100-200x200*2,100+500-200x200");
-
- aura::Window::Windows root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- EXPECT_EQ("100,100",
- root_windows[0]->GetDispatcher()->host()->
- GetBounds().origin().ToString());
- EXPECT_EQ("200x200",
- root_windows[0]->GetDispatcher()->host()->
- GetBounds().size().ToString());
- EXPECT_EQ("100,500",
- root_windows[1]->GetDispatcher()->host()->
- GetBounds().origin().ToString());
- EXPECT_EQ("200x200",
- root_windows[1]->GetDispatcher()->host()->
- GetBounds().size().ToString());
-
- // Put |window_| to the primary 2x display.
- window_->SetBoundsInScreen(gfx::Rect(20, 20, 50, 50),
- Shell::GetScreen()->GetPrimaryDisplay());
- // (30, 30) means the host coordinate, so the point is still on the primary
- // root window. Since it's 2x, the specified native point was halved.
- EXPECT_EQ("15,15", ConvertHostPointToScreen(30, 30));
- // Similar to above but the point is out of the all root windows.
- EXPECT_EQ("200,200", ConvertHostPointToScreen(400, 400));
- // Similar to above but the point is on the secondary display.
- EXPECT_EQ("100,15", ConvertHostPointToScreen(200, 30));
-
- // On secondary display. The position on the 2nd host window is (150,50)
- // so the screen position is (100,0) + (150,50).
- EXPECT_EQ("250,50", ConvertHostPointToScreen(150, 450));
-
- // At the edge but still in the primary display. Remaining of the primary
- // display is (50, 50) but adding ~100 since it's 2x-display.
- EXPECT_EQ("79,79", ConvertHostPointToScreen(158, 158));
- // At the edge of the secondary display.
- EXPECT_EQ("80,80", ConvertHostPointToScreen(160, 160));
-}
-
-TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreenRotate) {
- // 1st display is rotated 90 clockise, and 2nd display is rotated
- // 270 clockwise.
- UpdateDisplay("100+100-200x200/r,100+500-200x200/l");
- // Put |window_| to the 1st.
- window_->SetBoundsInScreen(gfx::Rect(20, 20, 50, 50),
- Shell::GetScreen()->GetPrimaryDisplay());
-
- // The point is on the 1st host.
- EXPECT_EQ("70,149", ConvertHostPointToScreen(50, 70));
- // The point is out of the host windows.
- EXPECT_EQ("250,-51", ConvertHostPointToScreen(250, 250));
- // The point is on the 2nd host. Point on 2nd host (30,150) -
- // rotate 270 clockwise -> (149, 30) - layout [+(200,0)] -> (349,30).
- EXPECT_EQ("349,30", ConvertHostPointToScreen(30, 450));
-
- // Move |window_| to the 2nd.
- window_->SetBoundsInScreen(gfx::Rect(300, 20, 50, 50),
- ScreenAsh::GetSecondaryDisplay());
- aura::Window::Windows root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- EXPECT_EQ(root_windows[1], window_->GetRootWindow());
-
- // The point is on the 2nd host. (50,70) on 2n host -
- // roatate 270 clockwise -> (129,50) -layout [+(200,0)] -> (329,50)
- EXPECT_EQ("329,50", ConvertHostPointToScreen(50, 70));
- // The point is out of the host windows.
- EXPECT_EQ("449,50", ConvertHostPointToScreen(50, -50));
- // The point is on the 2nd host. Point on 2nd host (50,50) -
- // rotate 90 clockwise -> (50, 149)
- EXPECT_EQ("50,149", ConvertHostPointToScreen(50, -350));
-}
-
-TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreenUIScale) {
- // 1st display is 2x density with 1.5 UI scale.
- UpdateDisplay("100+100-200x200*2@1.5,100+500-200x200");
- // Put |window_| to the 1st.
- window_->SetBoundsInScreen(gfx::Rect(20, 20, 50, 50),
- Shell::GetScreen()->GetPrimaryDisplay());
-
- // The point is on the 1st host.
- EXPECT_EQ("45,45", ConvertHostPointToScreen(60, 60));
- // The point is out of the host windows.
- EXPECT_EQ("45,225", ConvertHostPointToScreen(60, 300));
- // The point is on the 2nd host. Point on 2nd host (60,150) -
- // - screen [+(150,0)]
- EXPECT_EQ("210,49", ConvertHostPointToScreen(60, 450));
-
- // Move |window_| to the 2nd.
- window_->SetBoundsInScreen(gfx::Rect(300, 20, 50, 50),
- ScreenAsh::GetSecondaryDisplay());
- aura::Window::Windows root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- EXPECT_EQ(root_windows[1], window_->GetRootWindow());
-
- // The point is on the 2nd host. (50,70) - ro
- EXPECT_EQ("210,70", ConvertHostPointToScreen(60, 70));
- // The point is out of the host windows.
- EXPECT_EQ("210,-50", ConvertHostPointToScreen(60, -50));
- // The point is on the 2nd host. Point on 1nd host (60, 60)
- // 1/2 * 1.5 = (45,45)
- EXPECT_EQ("45,45", ConvertHostPointToScreen(60, -340));
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/display/shared_display_edge_indicator.cc b/chromium/ash/display/shared_display_edge_indicator.cc
deleted file mode 100644
index 0e16cee0fdb..00000000000
--- a/chromium/ash/display/shared_display_edge_indicator.cc
+++ /dev/null
@@ -1,117 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/shared_display_edge_indicator.h"
-
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/gfx/animation/throb_animation.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-namespace {
-
-const int kIndicatorAnimationDurationMs = 1000;
-
-class IndicatorView : public views::View {
- public:
- IndicatorView() {
- }
- virtual ~IndicatorView() {
- }
-
- void SetColor(SkColor color) {
- color_ = color;
- SchedulePaint();
- }
-
- // views::Views overrides:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- canvas->FillRect(gfx::Rect(bounds().size()), color_);
- }
-
- private:
- SkColor color_;
- DISALLOW_COPY_AND_ASSIGN(IndicatorView);
-};
-
-views::Widget* CreateWidget(const gfx::Rect& bounds,
- views::View* contents_view) {
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- params.can_activate = false;
- params.keep_on_top = true;
- // We set the context to the primary root window; this is OK because the ash
- // stacking controller will still place us in the correct RootWindow.
- params.context = Shell::GetPrimaryRootWindow();
- widget->set_focus_on_creation(false);
- widget->Init(params);
- widget->SetVisibilityChangedAnimationsEnabled(false);
- widget->GetNativeWindow()->SetName("SharedEdgeIndicator");
- widget->SetContentsView(contents_view);
- gfx::Display display = Shell::GetScreen()->GetDisplayMatching(bounds);
- aura::Window* window = widget->GetNativeWindow();
- aura::client::ScreenPositionClient* screen_position_client =
- aura::client::GetScreenPositionClient(window->GetRootWindow());
- screen_position_client->SetBounds(window, bounds, display);
- widget->Show();
- return widget;
-}
-
-} // namespace
-
-SharedDisplayEdgeIndicator::SharedDisplayEdgeIndicator()
- : src_indicator_(NULL),
- dst_indicator_(NULL) {
-}
-
-SharedDisplayEdgeIndicator::~SharedDisplayEdgeIndicator() {
- Hide();
-}
-
-void SharedDisplayEdgeIndicator::Show(const gfx::Rect& src_bounds,
- const gfx::Rect& dst_bounds) {
- DCHECK(!src_indicator_);
- DCHECK(!dst_indicator_);
- src_indicator_ = new IndicatorView;
- dst_indicator_ = new IndicatorView;
- CreateWidget(src_bounds, src_indicator_);
- CreateWidget(dst_bounds, dst_indicator_);
- animation_.reset(new gfx::ThrobAnimation(this));
- animation_->SetThrobDuration(kIndicatorAnimationDurationMs);
- animation_->StartThrobbing(-1 /* infinite */);
-}
-
-void SharedDisplayEdgeIndicator::Hide() {
- if (src_indicator_)
- src_indicator_->GetWidget()->Close();
- src_indicator_ = NULL;
- if (dst_indicator_)
- dst_indicator_->GetWidget()->Close();
- dst_indicator_ = NULL;
-}
-
-void SharedDisplayEdgeIndicator::AnimationProgressed(
- const gfx::Animation* animation) {
- int value = animation->CurrentValueBetween(0, 255);
- SkColor color = SkColorSetARGB(0xFF, value, value, value);
- if (src_indicator_)
- static_cast<IndicatorView*>(src_indicator_)->SetColor(color);
- if (dst_indicator_)
- static_cast<IndicatorView*>(dst_indicator_)->SetColor(color);
-
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/shared_display_edge_indicator.h b/chromium/ash/display/shared_display_edge_indicator.h
deleted file mode 100644
index d0d242d03fb..00000000000
--- a/chromium/ash/display/shared_display_edge_indicator.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_SHARED_DISPLAY_EDGE_INDICATOR_H_
-#define ASH_DISPLAY_SHARED_DISPLAY_EDGE_INDICATOR_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/gfx/animation/animation_delegate.h"
-#include "ui/gfx/display.h"
-
-namespace gfx {
-class Rect;
-class ThrobAnimation;
-}
-
-namespace views {
-class View;
-class Widget;
-}
-
-namespace ash {
-namespace internal {
-
-// SharedDisplayEdgeIndicator is responsible for showing a window that indicates
-// the edge that a window can be dragged into another display.
-class ASH_EXPORT SharedDisplayEdgeIndicator : public gfx::AnimationDelegate {
- public:
- SharedDisplayEdgeIndicator();
- virtual ~SharedDisplayEdgeIndicator();
-
- // Shows/Hides the indicator window. The |src_bounds| is for the window on
- // the source display, and the |dst_bounds| is for the window on the other
- // display.
- void Show(const gfx::Rect& src_bounds, const gfx::Rect& dst_bounds);
- void Hide();
-
- // gfx::AnimationDelegate overrides:
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
-
- private:
- // Used to show the displays' shared edge where a window can be moved across.
- // |src_widget_| is for the display where drag starts and |dst_widget_| is
- // for the other display.
- views::View* src_indicator_;
- views::View* dst_indicator_;
-
- // Used to transition the opacity.
- scoped_ptr<gfx::ThrobAnimation> animation_;
-
- DISALLOW_COPY_AND_ASSIGN(SharedDisplayEdgeIndicator);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DISPLAY_SHARED_DISPLAY_EDGE_INDICATOR_H_
diff --git a/chromium/ash/display/virtual_keyboard_window_controller.cc b/chromium/ash/display/virtual_keyboard_window_controller.cc
deleted file mode 100644
index dd0c4d8eb71..00000000000
--- a/chromium/ash/display/virtual_keyboard_window_controller.cc
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/virtual_keyboard_window_controller.h"
-
-#include "ash/display/display_controller.h"
-#include "ash/display/display_info.h"
-#include "ash/display/display_manager.h"
-#include "ash/display/root_window_transformers.h"
-#include "ash/host/root_window_host_factory.h"
-#include "ash/root_window_controller.h"
-#include "ash/root_window_settings.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "base/strings/stringprintf.h"
-#include "base/strings/utf_string_conversions.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/root_window_transformer.h"
-#include "ui/keyboard/keyboard_controller.h"
-
-namespace ash {
-namespace internal {
-
-VirtualKeyboardWindowController::VirtualKeyboardWindowController() {
-}
-
-VirtualKeyboardWindowController::~VirtualKeyboardWindowController() {
- // Make sure the root window gets deleted before cursor_window_delegate.
- Close();
-}
-
-void VirtualKeyboardWindowController::ActivateKeyboard(
- keyboard::KeyboardController* keyboard_controller) {
- root_window_controller_->ActivateKeyboard(keyboard_controller);
-}
-
-void VirtualKeyboardWindowController::UpdateWindow(
- const DisplayInfo& display_info) {
- static int virtual_keyboard_root_window_count = 0;
- if (!root_window_controller_.get()) {
- const gfx::Rect& bounds_in_native = display_info.bounds_in_native();
- aura::RootWindow::CreateParams params(bounds_in_native);
- params.host = Shell::GetInstance()->root_window_host_factory()->
- CreateRootWindowHost(bounds_in_native);
- aura::RootWindow* root_window = new aura::RootWindow(params);
-
- root_window->window()->SetName(
- base::StringPrintf("VirtualKeyboardRootWindow-%d",
- virtual_keyboard_root_window_count++));
-
- // No need to remove RootWindowObserver because
- // the DisplayController object outlives RootWindow objects.
- root_window->AddRootWindowObserver(
- Shell::GetInstance()->display_controller());
- InitRootWindowSettings(root_window->window())->display_id =
- display_info.id();
- root_window->Init();
- RootWindowController::CreateForVirtualKeyboardDisplay(root_window);
- root_window_controller_.reset(GetRootWindowController(
- root_window->window()));
- root_window_controller_->dispatcher()->host()->Show();
- root_window_controller_->ActivateKeyboard(
- Shell::GetInstance()->keyboard_controller());
- FlipDisplay();
- } else {
- aura::RootWindow* root_window = root_window_controller_->dispatcher();
- GetRootWindowSettings(root_window->window())->display_id =
- display_info.id();
- root_window->SetHostBounds(display_info.bounds_in_native());
- }
-}
-
-void VirtualKeyboardWindowController::Close() {
- if (root_window_controller_.get()) {
- root_window_controller_->dispatcher()->RemoveRootWindowObserver(
- Shell::GetInstance()->display_controller());
- root_window_controller_->Shutdown();
- root_window_controller_.reset();
- }
-}
-
-void VirtualKeyboardWindowController::FlipDisplay() {
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- if (!display_manager->virtual_keyboard_root_window_enabled()) {
- NOTREACHED() << "Attempting to flip virtual keyboard root window when it "
- << "is not enabled.";
- return;
- }
- display_manager->SetDisplayRotation(
- display_manager->non_desktop_display().id(), gfx::Display::ROTATE_180);
-
- aura::RootWindow* root_window = root_window_controller_->dispatcher();
- scoped_ptr<aura::RootWindowTransformer> transformer(
- internal::CreateRootWindowTransformerForDisplay(root_window->window(),
- display_manager->non_desktop_display()));
- root_window->SetRootWindowTransformer(transformer.Pass());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/display/virtual_keyboard_window_controller.h b/chromium/ash/display/virtual_keyboard_window_controller.h
deleted file mode 100644
index 6a466599723..00000000000
--- a/chromium/ash/display/virtual_keyboard_window_controller.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_VIRTUAL_KEYBOARD_WINDOW_CONTROLLER_H_
-#define ASH_DISPLAY_VIRTUAL_KEYBOARD_WINDOW_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/gfx/display.h"
-
-namespace keyboard {
-class KeyboardController;
-}
-
-namespace ash {
-
-namespace test {
-class VirtualKeyboardWindowControllerTest;
-} // namespace test
-
-namespace internal {
-class DisplayInfo;
-class RootWindowController;
-
-// This class maintains the RootWindowController dedicated for
-// virtual keyboard.
-class ASH_EXPORT VirtualKeyboardWindowController {
- public:
- VirtualKeyboardWindowController();
- virtual ~VirtualKeyboardWindowController();
-
- void ActivateKeyboard(keyboard::KeyboardController* keyboard_controller);
-
- // Updates the root window's bounds using |display_info|.
- // Creates the new root window if one doesn't exist.
- void UpdateWindow(const DisplayInfo& display_info);
-
- // Close the mirror window.
- void Close();
-
- private:
- friend class test::VirtualKeyboardWindowControllerTest;
-
- // Rotates virtual keyboard display by 180 degrees.
- void FlipDisplay();
-
- RootWindowController* root_window_controller_for_test() {
- return root_window_controller_.get();
- }
-
- scoped_ptr<RootWindowController> root_window_controller_;
-
- DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardWindowController);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DISPLAY_VIRTUAL_KEYBOARD_WINDOW_CONTROLLER_H_
diff --git a/chromium/ash/display/virtual_keyboard_window_controller_unittest.cc b/chromium/ash/display/virtual_keyboard_window_controller_unittest.cc
deleted file mode 100644
index 720690e85f8..00000000000
--- a/chromium/ash/display/virtual_keyboard_window_controller_unittest.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/virtual_keyboard_window_controller.h"
-
-#include "ash/ash_switches.h"
-#include "ash/display/display_controller.h"
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "base/command_line.h"
-#include "ui/keyboard/keyboard_switches.h"
-
-namespace ash {
-namespace test {
-
-class VirtualKeyboardWindowControllerTest : public AshTestBase {
- public:
- VirtualKeyboardWindowControllerTest()
- : virtual_keyboard_window_controller_(NULL) {}
- virtual ~VirtualKeyboardWindowControllerTest() {}
-
- virtual void SetUp() OVERRIDE {
- if (SupportsMultipleDisplays()) {
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kAshHostWindowBounds, "1+1-300x300,1+301-300x300");
- CommandLine::ForCurrentProcess()->AppendSwitch(
- keyboard::switches::kKeyboardUsabilityExperiment);
- }
- test::AshTestBase::SetUp();
- }
-
- void set_virtual_keyboard_window_controller(
- internal::VirtualKeyboardWindowController* controller) {
- virtual_keyboard_window_controller_ = controller;
- }
-
- internal::RootWindowController* root_window_controller() {
- return virtual_keyboard_window_controller_->
- root_window_controller_for_test();
- }
-
- private:
- internal::VirtualKeyboardWindowController*
- virtual_keyboard_window_controller_;
- DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardWindowControllerTest);
-};
-
-
-TEST_F(VirtualKeyboardWindowControllerTest, VirtualKeyboardWindowTest) {
- if (!SupportsMultipleDisplays())
- return;
- RunAllPendingInMessageLoop();
- set_virtual_keyboard_window_controller(
- Shell::GetInstance()->display_controller()->
- virtual_keyboard_window_controller());
- EXPECT_TRUE(root_window_controller());
- // Keyboard container is added to virtual keyboard window.
- EXPECT_TRUE(root_window_controller()->GetContainer(
- internal::kShellWindowId_VirtualKeyboardContainer));
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/drag_drop/OWNERS b/chromium/ash/drag_drop/OWNERS
deleted file mode 100644
index 5762b1cfb19..00000000000
--- a/chromium/ash/drag_drop/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-varunjain@chromium.org
diff --git a/chromium/ash/drag_drop/drag_drop_controller.cc b/chromium/ash/drag_drop/drag_drop_controller.cc
deleted file mode 100644
index 1d5d636347e..00000000000
--- a/chromium/ash/drag_drop/drag_drop_controller.cc
+++ /dev/null
@@ -1,566 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/drag_drop/drag_drop_controller.h"
-
-#include "ash/drag_drop/drag_drop_tracker.h"
-#include "ash/drag_drop/drag_image_view.h"
-#include "ash/shell.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "base/bind.h"
-#include "base/message_loop/message_loop.h"
-#include "base/run_loop.h"
-#include "ui/aura/client/capture_client.h"
-#include "ui/aura/client/drag_drop_delegate.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/base/dragdrop/drag_drop_types.h"
-#include "ui/base/dragdrop/os_exchange_data.h"
-#include "ui/base/hit_test.h"
-#include "ui/events/event.h"
-#include "ui/events/event_utils.h"
-#include "ui/gfx/animation/linear_animation.h"
-#include "ui/gfx/path.h"
-#include "ui/gfx/point.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/rect_conversions.h"
-#include "ui/views/views_delegate.h"
-#include "ui/views/widget/native_widget_aura.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-// The duration of the drag cancel animation in millisecond.
-const int kCancelAnimationDuration = 250;
-const int kTouchCancelAnimationDuration = 20;
-// The frame rate of the drag cancel animation in hertz.
-const int kCancelAnimationFrameRate = 60;
-
-// For touch initiated dragging, we scale and shift drag image by the following:
-static const float kTouchDragImageScale = 1.2f;
-static const int kTouchDragImageVerticalOffset = -25;
-
-// Adjusts the drag image bounds such that the new bounds are scaled by |scale|
-// and translated by the |drag_image_offset| and and additional
-// |vertical_offset|.
-gfx::Rect AdjustDragImageBoundsForScaleAndOffset(
- const gfx::Rect& drag_image_bounds,
- int vertical_offset,
- float scale,
- gfx::Vector2d* drag_image_offset) {
- gfx::PointF final_origin = drag_image_bounds.origin();
- gfx::SizeF final_size = drag_image_bounds.size();
- final_size.Scale(scale);
- drag_image_offset->set_x(drag_image_offset->x() * scale);
- drag_image_offset->set_y(drag_image_offset->y() * scale);
- float total_x_offset = drag_image_offset->x();
- float total_y_offset = drag_image_offset->y() - vertical_offset;
- final_origin.Offset(-total_x_offset, -total_y_offset);
- return gfx::ToEnclosingRect(gfx::RectF(final_origin, final_size));
-}
-
-void DispatchGestureEndToWindow(aura::Window* window) {
- if (window && window->delegate()) {
- ui::GestureEvent gesture_end(
- ui::ET_GESTURE_END,
- 0,
- 0,
- 0,
- ui::EventTimeForNow(),
- ui::GestureEventDetails(ui::ET_GESTURE_END, 0, 0),
- 0);
- window->delegate()->OnGestureEvent(&gesture_end);
- }
-}
-} // namespace
-
-class DragDropTrackerDelegate : public aura::WindowDelegate {
- public:
- explicit DragDropTrackerDelegate(DragDropController* controller)
- : drag_drop_controller_(controller) {}
- virtual ~DragDropTrackerDelegate() {}
-
- // Overridden from WindowDelegate:
- virtual gfx::Size GetMinimumSize() const OVERRIDE {
- return gfx::Size();
- }
-
- virtual gfx::Size GetMaximumSize() const OVERRIDE {
- return gfx::Size();
- }
-
- virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE {}
- virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE {
- return gfx::kNullCursor;
- }
- virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE {
- return HTCAPTION;
- }
- virtual bool ShouldDescendIntoChildForEventHandling(
- aura::Window* child,
- const gfx::Point& location) OVERRIDE {
- return true;
- }
- virtual bool CanFocus() OVERRIDE { return true; }
- virtual void OnCaptureLost() OVERRIDE {
- if (drag_drop_controller_->IsDragDropInProgress())
- drag_drop_controller_->DragCancel();
- }
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- }
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {}
- virtual void OnWindowDestroying() OVERRIDE {}
- virtual void OnWindowDestroyed() OVERRIDE {}
- virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE {}
- virtual bool HasHitTestMask() const OVERRIDE {
- return true;
- }
- virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE {
- DCHECK(mask->isEmpty());
- }
- virtual void DidRecreateLayer(ui::Layer* old_layer,
- ui::Layer* new_layer) OVERRIDE {}
-
- private:
- DragDropController* drag_drop_controller_;
-
- DISALLOW_COPY_AND_ASSIGN(DragDropTrackerDelegate);
-};
-
-////////////////////////////////////////////////////////////////////////////////
-// DragDropController, public:
-
-DragDropController::DragDropController()
- : drag_data_(NULL),
- drag_operation_(0),
- drag_window_(NULL),
- drag_source_window_(NULL),
- should_block_during_drag_drop_(true),
- drag_drop_window_delegate_(new DragDropTrackerDelegate(this)),
- current_drag_event_source_(ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE),
- weak_factory_(this) {
- Shell::GetInstance()->PrependPreTargetHandler(this);
-}
-
-DragDropController::~DragDropController() {
- Shell::GetInstance()->RemovePreTargetHandler(this);
- Cleanup();
- if (cancel_animation_)
- cancel_animation_->End();
- if (drag_image_)
- drag_image_.reset();
-}
-
-int DragDropController::StartDragAndDrop(
- const ui::OSExchangeData& data,
- aura::Window* root_window,
- aura::Window* source_window,
- const gfx::Point& root_location,
- int operation,
- ui::DragDropTypes::DragEventSource source) {
- if (IsDragDropInProgress())
- return 0;
-
- const ui::OSExchangeData::Provider* provider = &data.provider();
- // We do not support touch drag/drop without a drag image.
- if (source == ui::DragDropTypes::DRAG_EVENT_SOURCE_TOUCH &&
- provider->GetDragImage().size().IsEmpty())
- return 0;
-
- current_drag_event_source_ = source;
- DragDropTracker* tracker =
- new DragDropTracker(root_window, drag_drop_window_delegate_.get());
- if (source == ui::DragDropTypes::DRAG_EVENT_SOURCE_TOUCH) {
- // We need to transfer the current gesture sequence and the GR's touch event
- // queue to the |drag_drop_tracker_|'s capture window so that when it takes
- // capture, it still gets a valid gesture state.
- ui::GestureRecognizer::Get()->TransferEventsTo(source_window,
- tracker->capture_window());
- // We also send a gesture end to the source window so it can clear state.
- // TODO(varunjain): Remove this whole block when gesture sequence
- // transferring is properly done in the GR (http://crbug.com/160558)
- DispatchGestureEndToWindow(source_window);
- }
- tracker->TakeCapture();
- drag_drop_tracker_.reset(tracker);
- drag_source_window_ = source_window;
- if (drag_source_window_)
- drag_source_window_->AddObserver(this);
- pending_long_tap_.reset();
-
- drag_data_ = &data;
- drag_operation_ = operation;
-
- float drag_image_scale = 1;
- int drag_image_vertical_offset = 0;
- if (source == ui::DragDropTypes::DRAG_EVENT_SOURCE_TOUCH) {
- drag_image_scale = kTouchDragImageScale;
- drag_image_vertical_offset = kTouchDragImageVerticalOffset;
- }
- gfx::Point start_location = root_location;
- ash::wm::ConvertPointToScreen(root_window, &start_location);
- drag_image_final_bounds_for_cancel_animation_ = gfx::Rect(
- start_location - provider->GetDragImageOffset(),
- provider->GetDragImage().size());
- drag_image_.reset(new DragImageView(source_window->GetRootWindow(), source));
- drag_image_->SetImage(provider->GetDragImage());
- drag_image_offset_ = provider->GetDragImageOffset();
- gfx::Rect drag_image_bounds(start_location, drag_image_->GetPreferredSize());
- drag_image_bounds = AdjustDragImageBoundsForScaleAndOffset(drag_image_bounds,
- drag_image_vertical_offset, drag_image_scale, &drag_image_offset_);
- drag_image_->SetBoundsInScreen(drag_image_bounds);
- drag_image_->SetWidgetVisible(true);
- if (source == ui::DragDropTypes::DRAG_EVENT_SOURCE_TOUCH) {
- drag_image_->SetTouchDragOperationHintPosition(gfx::Point(
- drag_image_offset_.x(),
- drag_image_offset_.y() + drag_image_vertical_offset));
- }
-
- drag_window_ = NULL;
-
- // Ends cancel animation if it's in progress.
- if (cancel_animation_)
- cancel_animation_->End();
-
- if (should_block_during_drag_drop_) {
- base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher());
- quit_closure_ = run_loop.QuitClosure();
- base::MessageLoopForUI* loop = base::MessageLoopForUI::current();
- base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop);
- run_loop.Run();
- }
-
- if (!cancel_animation_.get() || !cancel_animation_->is_animating() ||
- !pending_long_tap_.get()) {
- // If drag cancel animation is running, this cleanup is done when the
- // animation completes.
- if (drag_source_window_)
- drag_source_window_->RemoveObserver(this);
- drag_source_window_ = NULL;
- }
-
- return drag_operation_;
-}
-
-void DragDropController::DragUpdate(aura::Window* target,
- const ui::LocatedEvent& event) {
- aura::client::DragDropDelegate* delegate = NULL;
- int op = ui::DragDropTypes::DRAG_NONE;
- if (target != drag_window_) {
- if (drag_window_) {
- if ((delegate = aura::client::GetDragDropDelegate(drag_window_)))
- delegate->OnDragExited();
- if (drag_window_ != drag_source_window_)
- drag_window_->RemoveObserver(this);
- }
- drag_window_ = target;
- // We are already an observer of |drag_source_window_| so no need to add.
- if (drag_window_ != drag_source_window_)
- drag_window_->AddObserver(this);
- if ((delegate = aura::client::GetDragDropDelegate(drag_window_))) {
- ui::DropTargetEvent e(*drag_data_,
- event.location(),
- event.root_location(),
- drag_operation_);
- e.set_flags(event.flags());
- delegate->OnDragEntered(e);
- }
- } else {
- if ((delegate = aura::client::GetDragDropDelegate(drag_window_))) {
- ui::DropTargetEvent e(*drag_data_,
- event.location(),
- event.root_location(),
- drag_operation_);
- e.set_flags(event.flags());
- op = delegate->OnDragUpdated(e);
- gfx::NativeCursor cursor = ui::kCursorNoDrop;
- if (op & ui::DragDropTypes::DRAG_COPY)
- cursor = ui::kCursorCopy;
- else if (op & ui::DragDropTypes::DRAG_LINK)
- cursor = ui::kCursorAlias;
- else if (op & ui::DragDropTypes::DRAG_MOVE)
- cursor = ui::kCursorGrabbing;
- ash::Shell::GetInstance()->cursor_manager()->SetCursor(cursor);
- }
- }
-
- DCHECK(drag_image_.get());
- if (drag_image_->visible()) {
- gfx::Point root_location_in_screen = event.root_location();
- ash::wm::ConvertPointToScreen(target->GetRootWindow(),
- &root_location_in_screen);
- drag_image_->SetScreenPosition(
- root_location_in_screen - drag_image_offset_);
- drag_image_->SetTouchDragOperation(op);
- }
-}
-
-void DragDropController::Drop(aura::Window* target,
- const ui::LocatedEvent& event) {
- ash::Shell::GetInstance()->cursor_manager()->SetCursor(ui::kCursorPointer);
- aura::client::DragDropDelegate* delegate = NULL;
-
- // We must guarantee that a target gets a OnDragEntered before Drop. WebKit
- // depends on not getting a Drop without DragEnter. This behavior is
- // consistent with drag/drop on other platforms.
- if (target != drag_window_)
- DragUpdate(target, event);
- DCHECK(target == drag_window_);
-
- if ((delegate = aura::client::GetDragDropDelegate(target))) {
- ui::DropTargetEvent e(
- *drag_data_, event.location(), event.root_location(), drag_operation_);
- e.set_flags(event.flags());
- drag_operation_ = delegate->OnPerformDrop(e);
- if (drag_operation_ == 0)
- StartCanceledAnimation(kCancelAnimationDuration);
- else
- drag_image_.reset();
- } else {
- drag_image_.reset();
- }
-
- Cleanup();
- if (should_block_during_drag_drop_)
- quit_closure_.Run();
-}
-
-void DragDropController::DragCancel() {
- DoDragCancel(kCancelAnimationDuration);
-}
-
-bool DragDropController::IsDragDropInProgress() {
- return !!drag_drop_tracker_.get();
-}
-
-void DragDropController::OnKeyEvent(ui::KeyEvent* event) {
- if (IsDragDropInProgress() && event->key_code() == ui::VKEY_ESCAPE) {
- DragCancel();
- event->StopPropagation();
- }
-}
-
-void DragDropController::OnMouseEvent(ui::MouseEvent* event) {
- if (!IsDragDropInProgress())
- return;
-
- // If current drag session was not started by mouse, dont process this mouse
- // event, but consume it so it does not interfere with current drag session.
- if (current_drag_event_source_ !=
- ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE) {
- event->StopPropagation();
- return;
- }
-
- aura::Window* translated_target = drag_drop_tracker_->GetTarget(*event);
- if (!translated_target) {
- DragCancel();
- event->StopPropagation();
- return;
- }
- scoped_ptr<ui::LocatedEvent> translated_event(
- drag_drop_tracker_->ConvertEvent(translated_target, *event));
- switch (translated_event->type()) {
- case ui::ET_MOUSE_DRAGGED:
- DragUpdate(translated_target, *translated_event.get());
- break;
- case ui::ET_MOUSE_RELEASED:
- Drop(translated_target, *translated_event.get());
- break;
- default:
- // We could also reach here because RootWindow may sometimes generate a
- // bunch of fake mouse events
- // (aura::RootWindow::PostMouseMoveEventAfterWindowChange).
- break;
- }
- event->StopPropagation();
-}
-
-void DragDropController::OnTouchEvent(ui::TouchEvent* event) {
- if (!IsDragDropInProgress())
- return;
-
- // If current drag session was not started by touch, dont process this touch
- // event, but consume it so it does not interfere with current drag session.
- if (current_drag_event_source_ != ui::DragDropTypes::DRAG_EVENT_SOURCE_TOUCH)
- event->StopPropagation();
-
- if (event->handled())
- return;
-
- if (event->type() == ui::ET_TOUCH_CANCELLED)
- DragCancel();
-}
-
-void DragDropController::OnGestureEvent(ui::GestureEvent* event) {
- if (!IsDragDropInProgress())
- return;
-
- // No one else should handle gesture events when in drag drop. Note that it is
- // not enough to just set ER_HANDLED because the dispatcher only stops
- // dispatching when the event has ER_CONSUMED. If we just set ER_HANDLED, the
- // event will still be dispatched to other handlers and we depend on
- // individual handlers' kindness to not touch events marked ER_HANDLED (not
- // all handlers are so kind and may cause bugs like crbug.com/236493).
- event->StopPropagation();
-
- // If current drag session was not started by touch, dont process this event.
- if (current_drag_event_source_ != ui::DragDropTypes::DRAG_EVENT_SOURCE_TOUCH)
- return;
-
- // Apply kTouchDragImageVerticalOffset to the location.
- ui::GestureEvent touch_offset_event(*event,
- static_cast<aura::Window*>(NULL),
- static_cast<aura::Window*>(NULL));
- gfx::Point touch_offset_location = touch_offset_event.location();
- gfx::Point touch_offset_root_location = touch_offset_event.root_location();
- touch_offset_location.Offset(0, kTouchDragImageVerticalOffset);
- touch_offset_root_location.Offset(0, kTouchDragImageVerticalOffset);
- touch_offset_event.set_location(touch_offset_location);
- touch_offset_event.set_root_location(touch_offset_root_location);
-
- aura::Window* translated_target =
- drag_drop_tracker_->GetTarget(touch_offset_event);
- if (!translated_target) {
- DragCancel();
- event->SetHandled();
- return;
- }
- scoped_ptr<ui::LocatedEvent> translated_event(
- drag_drop_tracker_->ConvertEvent(translated_target, touch_offset_event));
-
- switch (event->type()) {
- case ui::ET_GESTURE_SCROLL_UPDATE:
- DragUpdate(translated_target, *translated_event.get());
- break;
- case ui::ET_GESTURE_SCROLL_END:
- Drop(translated_target, *translated_event.get());
- break;
- case ui::ET_SCROLL_FLING_START:
- case ui::ET_GESTURE_LONG_TAP:
- // Ideally we would want to just forward this long tap event to the
- // |drag_source_window_|. However, webkit does not accept events while a
- // drag drop is still in progress. The drag drop ends only when the nested
- // message loop ends. Due to this stupidity, we have to defer forwarding
- // the long tap.
- pending_long_tap_.reset(
- new ui::GestureEvent(*event,
- static_cast<aura::Window*>(drag_drop_tracker_->capture_window()),
- static_cast<aura::Window*>(drag_source_window_)));
- DoDragCancel(kTouchCancelAnimationDuration);
- break;
- default:
- break;
- }
- event->SetHandled();
-}
-
-void DragDropController::OnWindowDestroyed(aura::Window* window) {
- if (drag_window_ == window)
- drag_window_ = NULL;
- if (drag_source_window_ == window)
- drag_source_window_ = NULL;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// DragDropController, protected:
-
-gfx::LinearAnimation* DragDropController::CreateCancelAnimation(
- int duration,
- int frame_rate,
- gfx::AnimationDelegate* delegate) {
- return new gfx::LinearAnimation(duration, frame_rate, delegate);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// DragDropController, private:
-
-void DragDropController::AnimationEnded(const gfx::Animation* animation) {
- cancel_animation_.reset();
-
- // By the time we finish animation, another drag/drop session may have
- // started. We do not want to destroy the drag image in that case.
- if (!IsDragDropInProgress())
- drag_image_.reset();
- if (pending_long_tap_) {
- // If not in a nested message loop, we can forward the long tap right now.
- if (!should_block_during_drag_drop_)
- ForwardPendingLongTap();
- else {
- // See comment about this in OnGestureEvent().
- base::MessageLoopForUI::current()->PostTask(
- FROM_HERE,
- base::Bind(&DragDropController::ForwardPendingLongTap,
- weak_factory_.GetWeakPtr()));
- }
- }
-}
-
-void DragDropController::DoDragCancel(int drag_cancel_animation_duration_ms) {
- ash::Shell::GetInstance()->cursor_manager()->SetCursor(ui::kCursorPointer);
-
- // |drag_window_| can be NULL if we have just started the drag and have not
- // received any DragUpdates, or, if the |drag_window_| gets destroyed during
- // a drag/drop.
- aura::client::DragDropDelegate* delegate = drag_window_?
- aura::client::GetDragDropDelegate(drag_window_) : NULL;
- if (delegate)
- delegate->OnDragExited();
-
- Cleanup();
- drag_operation_ = 0;
- StartCanceledAnimation(drag_cancel_animation_duration_ms);
- if (should_block_during_drag_drop_)
- quit_closure_.Run();
-}
-
-void DragDropController::AnimationProgressed(const gfx::Animation* animation) {
- gfx::Rect current_bounds = animation->CurrentValueBetween(
- drag_image_initial_bounds_for_cancel_animation_,
- drag_image_final_bounds_for_cancel_animation_);
- drag_image_->SetBoundsInScreen(current_bounds);
-}
-
-void DragDropController::AnimationCanceled(const gfx::Animation* animation) {
- AnimationEnded(animation);
-}
-
-void DragDropController::StartCanceledAnimation(int animation_duration_ms) {
- DCHECK(drag_image_.get());
- drag_image_->SetTouchDragOperationHintOff();
- drag_image_initial_bounds_for_cancel_animation_ =
- drag_image_->GetBoundsInScreen();
- cancel_animation_.reset(CreateCancelAnimation(animation_duration_ms,
- kCancelAnimationFrameRate,
- this));
- cancel_animation_->Start();
-}
-
-void DragDropController::ForwardPendingLongTap() {
- if (drag_source_window_ && drag_source_window_->delegate()) {
- drag_source_window_->delegate()->OnGestureEvent(pending_long_tap_.get());
- DispatchGestureEndToWindow(drag_source_window_);
- }
- pending_long_tap_.reset();
- if (drag_source_window_)
- drag_source_window_->RemoveObserver(this);
- drag_source_window_ = NULL;
-}
-
-void DragDropController::Cleanup() {
- if (drag_window_)
- drag_window_->RemoveObserver(this);
- drag_window_ = NULL;
- drag_data_ = NULL;
- // Cleanup can be called again while deleting DragDropTracker, so use Pass
- // instead of reset to avoid double free.
- drag_drop_tracker_.Pass();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/drag_drop/drag_drop_controller.h b/chromium/ash/drag_drop/drag_drop_controller.h
deleted file mode 100644
index a9220dbdffa..00000000000
--- a/chromium/ash/drag_drop/drag_drop_controller.h
+++ /dev/null
@@ -1,142 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_
-#define ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "base/callback.h"
-#include "base/memory/weak_ptr.h"
-#include "ui/aura/client/drag_drop_client.h"
-#include "ui/aura/window_observer.h"
-#include "ui/base/dragdrop/os_exchange_data.h"
-#include "ui/events/event_constants.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/animation/animation_delegate.h"
-#include "ui/gfx/rect.h"
-
-namespace gfx {
-class LinearAnimation;
-}
-
-namespace ash {
-
-namespace test {
-class DragDropControllerTest;
-}
-
-namespace internal {
-
-class DragDropTracker;
-class DragDropTrackerDelegate;
-class DragImageView;
-
-class ASH_EXPORT DragDropController
- : public aura::client::DragDropClient,
- public ui::EventHandler,
- public gfx::AnimationDelegate,
- public aura::WindowObserver {
- public:
- DragDropController();
- virtual ~DragDropController();
-
- void set_should_block_during_drag_drop(bool should_block_during_drag_drop) {
- should_block_during_drag_drop_ = should_block_during_drag_drop;
- }
-
- // Overridden from aura::client::DragDropClient:
- virtual int StartDragAndDrop(
- const ui::OSExchangeData& data,
- aura::Window* root_window,
- aura::Window* source_window,
- const gfx::Point& root_location,
- int operation,
- ui::DragDropTypes::DragEventSource source) OVERRIDE;
- virtual void DragUpdate(aura::Window* target,
- const ui::LocatedEvent& event) OVERRIDE;
- virtual void Drop(aura::Window* target,
- const ui::LocatedEvent& event) OVERRIDE;
- virtual void DragCancel() OVERRIDE;
- virtual bool IsDragDropInProgress() OVERRIDE;
-
- // Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- // Overridden from aura::WindowObserver.
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
-
- protected:
- // Helper method to create a LinearAnimation object that will run the drag
- // cancel animation. Caller take ownership of the returned object. Protected
- // for testing.
- virtual gfx::LinearAnimation* CreateCancelAnimation(
- int duration,
- int frame_rate,
- gfx::AnimationDelegate* delegate);
-
- // Actual implementation of |DragCancel()|. protected for testing.
- virtual void DoDragCancel(int drag_cancel_animation_duration_ms);
-
- private:
- friend class ash::test::DragDropControllerTest;
-
- // Overridden from gfx::AnimationDelegate:
- virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
- virtual void AnimationCanceled(const gfx::Animation* animation) OVERRIDE;
-
- // Helper method to start drag widget flying back animation.
- void StartCanceledAnimation(int animation_duration_ms);
-
- // Helper method to forward |pending_log_tap_| event to |drag_source_window_|.
- void ForwardPendingLongTap();
-
- // Helper method to reset everything.
- void Cleanup();
-
- scoped_ptr<DragImageView> drag_image_;
- gfx::Vector2d drag_image_offset_;
- const ui::OSExchangeData* drag_data_;
- int drag_operation_;
-
- // Window that is currently under the drag cursor.
- aura::Window* drag_window_;
-
- // Starting and final bounds for the drag image for the drag cancel animation.
- gfx::Rect drag_image_initial_bounds_for_cancel_animation_;
- gfx::Rect drag_image_final_bounds_for_cancel_animation_;
-
- scoped_ptr<gfx::LinearAnimation> cancel_animation_;
-
- // Window that started the drag.
- aura::Window* drag_source_window_;
-
- // Indicates whether the caller should be blocked on a drag/drop session.
- // Only be used for tests.
- bool should_block_during_drag_drop_;
-
- // Closure for quitting nested message loop.
- base::Closure quit_closure_;
-
- scoped_ptr<ash::internal::DragDropTracker> drag_drop_tracker_;
- scoped_ptr<DragDropTrackerDelegate> drag_drop_window_delegate_;
-
- ui::DragDropTypes::DragEventSource current_drag_event_source_;
-
- // Holds a synthetic long tap event to be sent to the |drag_source_window_|.
- // See comment in OnGestureEvent() on why we need this.
- scoped_ptr<ui::GestureEvent> pending_long_tap_;
-
- base::WeakPtrFactory<DragDropController> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(DragDropController);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_
diff --git a/chromium/ash/drag_drop/drag_drop_controller_unittest.cc b/chromium/ash/drag_drop/drag_drop_controller_unittest.cc
deleted file mode 100644
index baf5acb758b..00000000000
--- a/chromium/ash/drag_drop/drag_drop_controller_unittest.cc
+++ /dev/null
@@ -1,1083 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/drag_drop/drag_drop_controller.h"
-
-#include "ash/drag_drop/drag_drop_tracker.h"
-#include "ash/drag_drop/drag_image_view.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "base/command_line.h"
-#include "base/location.h"
-#include "base/strings/utf_string_conversions.h"
-#include "ui/aura/client/capture_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/base/clipboard/clipboard.h"
-#include "ui/base/clipboard/scoped_clipboard_writer.h"
-#include "ui/base/dragdrop/drag_drop_types.h"
-#include "ui/base/dragdrop/drag_utils.h"
-#include "ui/base/dragdrop/os_exchange_data.h"
-#include "ui/base/ui_base_switches.h"
-#include "ui/events/event.h"
-#include "ui/events/event_utils.h"
-#include "ui/events/gestures/gesture_types.h"
-#include "ui/gfx/animation/linear_animation.h"
-#include "ui/gfx/image/image_skia_rep.h"
-#include "ui/views/test/test_views_delegate.h"
-#include "ui/views/view.h"
-#include "ui/views/views_delegate.h"
-#include "ui/views/widget/native_widget_aura.h"
-#include "ui/views/widget/native_widget_delegate.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace test {
-
-namespace {
-
-// A simple view that makes sure RunShellDrag is invoked on mouse drag.
-class DragTestView : public views::View {
- public:
- DragTestView() : views::View() {
- Reset();
- }
-
- void Reset() {
- num_drag_enters_ = 0;
- num_drag_exits_ = 0;
- num_drag_updates_ = 0;
- num_drops_ = 0;
- drag_done_received_ = false;
- long_tap_received_ = false;
- }
-
- int VerticalDragThreshold() {
- return views::View::GetVerticalDragThreshold();
- }
-
- int HorizontalDragThreshold() {
- return views::View::GetHorizontalDragThreshold();
- }
-
- int num_drag_enters_;
- int num_drag_exits_;
- int num_drag_updates_;
- int num_drops_;
- bool drag_done_received_;
- bool long_tap_received_;
-
- private:
- // View overrides:
- virtual int GetDragOperations(const gfx::Point& press_pt) OVERRIDE {
- return ui::DragDropTypes::DRAG_COPY;
- }
-
- virtual void WriteDragData(const gfx::Point& p,
- OSExchangeData* data) OVERRIDE {
- data->SetString(UTF8ToUTF16("I am being dragged"));
- gfx::ImageSkiaRep image_rep(gfx::Size(10, 20), 1.0f);
- gfx::ImageSkia image_skia(image_rep);
-
- drag_utils::SetDragImageOnDataObject(
- image_skia, image_skia.size(), gfx::Vector2d(), data);
- }
-
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE {
- return true;
- }
-
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
- if (event->type() == ui::ET_GESTURE_LONG_TAP)
- long_tap_received_ = true;
- return;
- }
-
- virtual bool GetDropFormats(
- int* formats,
- std::set<OSExchangeData::CustomFormat>* custom_formats) OVERRIDE {
- *formats = ui::OSExchangeData::STRING;
- return true;
- }
-
- virtual bool CanDrop(const OSExchangeData& data) OVERRIDE {
- return true;
- }
-
- virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE {
- num_drag_enters_++;
- }
-
- virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE {
- num_drag_updates_++;
- return ui::DragDropTypes::DRAG_COPY;
- }
-
- virtual void OnDragExited() OVERRIDE {
- num_drag_exits_++;
- }
-
- virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE {
- num_drops_++;
- return ui::DragDropTypes::DRAG_COPY;
- }
-
- virtual void OnDragDone() OVERRIDE {
- drag_done_received_ = true;
- }
-
- DISALLOW_COPY_AND_ASSIGN(DragTestView);
-};
-
-class CompletableLinearAnimation : public gfx::LinearAnimation {
- public:
- CompletableLinearAnimation(int duration,
- int frame_rate,
- gfx::AnimationDelegate* delegate)
- : gfx::LinearAnimation(duration, frame_rate, delegate),
- duration_(duration) {
- }
-
- void Complete() {
- Step(start_time() + base::TimeDelta::FromMilliseconds(duration_));
- }
-
- private:
- int duration_;
-};
-
-class TestDragDropController : public internal::DragDropController {
- public:
- TestDragDropController() : internal::DragDropController() {
- Reset();
- }
-
- void Reset() {
- drag_start_received_ = false;
- num_drag_updates_ = 0;
- drop_received_ = false;
- drag_canceled_ = false;
- drag_string_.clear();
- }
-
- virtual int StartDragAndDrop(
- const ui::OSExchangeData& data,
- aura::Window* root_window,
- aura::Window* source_window,
- const gfx::Point& location,
- int operation,
- ui::DragDropTypes::DragEventSource source) OVERRIDE {
- drag_start_received_ = true;
- data.GetString(&drag_string_);
- return DragDropController::StartDragAndDrop(
- data, root_window, source_window, location, operation, source);
- }
-
- virtual void DragUpdate(aura::Window* target,
- const ui::LocatedEvent& event) OVERRIDE {
- DragDropController::DragUpdate(target, event);
- num_drag_updates_++;
- }
-
- virtual void Drop(aura::Window* target,
- const ui::LocatedEvent& event) OVERRIDE {
- DragDropController::Drop(target, event);
- drop_received_ = true;
- }
-
- virtual void DragCancel() OVERRIDE {
- DragDropController::DragCancel();
- drag_canceled_ = true;
- }
-
- virtual gfx::LinearAnimation* CreateCancelAnimation(
- int duration,
- int frame_rate,
- gfx::AnimationDelegate* delegate) OVERRIDE {
- return new CompletableLinearAnimation(duration, frame_rate, delegate);
- }
-
- virtual void DoDragCancel(int animation_duration_ms) OVERRIDE {
- DragDropController::DoDragCancel(animation_duration_ms);
- drag_canceled_ = true;
- }
-
- bool drag_start_received_;
- int num_drag_updates_;
- bool drop_received_;
- bool drag_canceled_;
- base::string16 drag_string_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TestDragDropController);
-};
-
-class TestNativeWidgetAura : public views::NativeWidgetAura {
- public:
- explicit TestNativeWidgetAura(views::internal::NativeWidgetDelegate* delegate)
- : NativeWidgetAura(delegate),
- check_if_capture_lost_(false) {
- }
-
- void set_check_if_capture_lost(bool value) {
- check_if_capture_lost_ = value;
- }
-
- virtual void OnCaptureLost() OVERRIDE {
- DCHECK(!check_if_capture_lost_);
- views::NativeWidgetAura::OnCaptureLost();
- }
-
- private:
- bool check_if_capture_lost_;
-
- DISALLOW_COPY_AND_ASSIGN(TestNativeWidgetAura);
-};
-
-// TODO(sky): this is for debugging, remove when track down failure.
-void SetCheckIfCaptureLost(views::Widget* widget, bool value) {
- // On Windows, the DCHECK triggers when running on bot or locally through RDP,
- // but not when logged in locally.
-#if !defined(OS_WIN)
- static_cast<TestNativeWidgetAura*>(widget->native_widget())->
- set_check_if_capture_lost(value);
-#endif
-}
-
-views::Widget* CreateNewWidget() {
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params;
- params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS;
- params.accept_events = true;
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.parent = Shell::GetPrimaryRootWindow();
- params.child = true;
- params.native_widget = new TestNativeWidgetAura(widget);
- widget->Init(params);
- widget->Show();
- return widget;
-}
-
-void AddViewToWidgetAndResize(views::Widget* widget, views::View* view) {
- if (!widget->GetContentsView()) {
- views::View* contents_view = new views::View;
- widget->SetContentsView(contents_view);
- }
-
- views::View* contents_view = widget->GetContentsView();
- contents_view->AddChildView(view);
- view->SetBounds(contents_view->width(), 0, 100, 100);
- gfx::Rect contents_view_bounds = contents_view->bounds();
- contents_view_bounds.Union(view->bounds());
- contents_view->SetBoundsRect(contents_view_bounds);
- widget->SetBounds(contents_view_bounds);
-}
-
-void DispatchGesture(ui::EventType gesture_type, gfx::Point location) {
- ui::GestureEvent gesture_event(
- gesture_type,
- location.x(),
- location.y(),
- 0,
- ui::EventTimeForNow(),
- ui::GestureEventDetails(gesture_type, 0, 0),
- 1);
- Shell::GetPrimaryRootWindow()->GetDispatcher()->DispatchGestureEvent(
- &gesture_event);
-}
-
-} // namespace
-
-class DragDropControllerTest : public AshTestBase {
- public:
- DragDropControllerTest() : AshTestBase() {}
- virtual ~DragDropControllerTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- drag_drop_controller_.reset(new TestDragDropController);
- drag_drop_controller_->set_should_block_during_drag_drop(false);
- aura::client::SetDragDropClient(Shell::GetPrimaryRootWindow(),
- drag_drop_controller_.get());
- views_delegate_.reset(new views::TestViewsDelegate);
- }
-
- virtual void TearDown() OVERRIDE {
- aura::client::SetDragDropClient(Shell::GetPrimaryRootWindow(), NULL);
- drag_drop_controller_.reset();
- AshTestBase::TearDown();
- }
-
- void UpdateDragData(ui::OSExchangeData* data) {
- drag_drop_controller_->drag_data_ = data;
- }
-
- aura::Window* GetDragWindow() {
- return drag_drop_controller_->drag_window_;
- }
-
- aura::Window* GetDragSourceWindow() {
- return drag_drop_controller_->drag_source_window_;
- }
-
- void SetDragSourceWindow(aura::Window* drag_source_window) {
- drag_drop_controller_->drag_source_window_ = drag_source_window;
- drag_source_window->AddObserver(drag_drop_controller_.get());
- }
-
- aura::Window* GetDragImageWindow() {
- return drag_drop_controller_->drag_image_.get() ?
- drag_drop_controller_->drag_image_->GetWidget()->GetNativeWindow() :
- NULL;
- }
-
- internal::DragDropTracker* drag_drop_tracker() {
- return drag_drop_controller_->drag_drop_tracker_.get();
- }
-
- void CompleteCancelAnimation() {
- CompletableLinearAnimation* animation =
- static_cast<CompletableLinearAnimation*>(
- drag_drop_controller_->cancel_animation_.get());
- animation->Complete();
- }
-
- protected:
- scoped_ptr<TestDragDropController> drag_drop_controller_;
- scoped_ptr<views::TestViewsDelegate> views_delegate_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DragDropControllerTest);
-};
-
-// TODO(win_aura) http://crbug.com/154081
-#if defined(OS_WIN)
-#define MAYBE_DragDropInSingleViewTest DISABLED_DragDropInSingleViewTest
-#else
-#define MAYBE_DragDropInSingleViewTest DragDropInSingleViewTest
-#endif
-TEST_F(DragDropControllerTest, MAYBE_DragDropInSingleViewTest) {
- scoped_ptr<views::Widget> widget(CreateNewWidget());
- DragTestView* drag_view = new DragTestView;
- AddViewToWidgetAndResize(widget.get(), drag_view);
- ui::OSExchangeData data;
- data.SetString(UTF8ToUTF16("I am being dragged"));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
- generator.PressLeftButton();
-
- int num_drags = 17;
- SetCheckIfCaptureLost(widget.get(), true);
- for (int i = 0; i < num_drags; ++i) {
- // Because we are not doing a blocking drag and drop, the original
- // OSDragExchangeData object is lost as soon as we return from the drag
- // initiation in DragDropController::StartDragAndDrop(). Hence we set the
- // drag_data_ to a fake drag data object that we created.
- if (i > 0)
- UpdateDragData(&data);
- // 7 comes from views::View::GetVerticalDragThreshold()).
- if (i >= 7)
- SetCheckIfCaptureLost(widget.get(), false);
-
- generator.MoveMouseBy(0, 1);
-
- // Execute any scheduled draws to process deferred mouse events.
- RunAllPendingInMessageLoop();
- }
-
- generator.ReleaseLeftButton();
-
- EXPECT_TRUE(drag_drop_controller_->drag_start_received_);
- EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(),
- drag_drop_controller_->num_drag_updates_);
- EXPECT_TRUE(drag_drop_controller_->drop_received_);
- EXPECT_EQ(UTF8ToUTF16("I am being dragged"),
- drag_drop_controller_->drag_string_);
-
- EXPECT_EQ(1, drag_view->num_drag_enters_);
- EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(),
- drag_view->num_drag_updates_);
- EXPECT_EQ(1, drag_view->num_drops_);
- EXPECT_EQ(0, drag_view->num_drag_exits_);
- EXPECT_TRUE(drag_view->drag_done_received_);
-}
-
-TEST_F(DragDropControllerTest, DragDropWithZeroDragUpdates) {
- scoped_ptr<views::Widget> widget(CreateNewWidget());
- DragTestView* drag_view = new DragTestView;
- AddViewToWidgetAndResize(widget.get(), drag_view);
- ui::OSExchangeData data;
- data.SetString(UTF8ToUTF16("I am being dragged"));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
- generator.PressLeftButton();
-
- int num_drags = drag_view->VerticalDragThreshold() + 1;
- for (int i = 0; i < num_drags; ++i) {
- // Because we are not doing a blocking drag and drop, the original
- // OSDragExchangeData object is lost as soon as we return from the drag
- // initiation in DragDropController::StartDragAndDrop(). Hence we set the
- // drag_data_ to a fake drag data object that we created.
- if (i > 0)
- UpdateDragData(&data);
- generator.MoveMouseBy(0, 1);
- }
-
- UpdateDragData(&data);
-
- generator.ReleaseLeftButton();
-
- EXPECT_TRUE(drag_drop_controller_->drag_start_received_);
- EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold() + 1,
- drag_drop_controller_->num_drag_updates_);
- EXPECT_TRUE(drag_drop_controller_->drop_received_);
-
- EXPECT_EQ(1, drag_view->num_drag_enters_);
- EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold() + 1,
- drag_view->num_drag_updates_);
- EXPECT_EQ(1, drag_view->num_drops_);
- EXPECT_EQ(0, drag_view->num_drag_exits_);
- EXPECT_TRUE(drag_view->drag_done_received_);
-}
-
-// TODO(win_aura) http://crbug.com/154081
-#if defined(OS_WIN)
-#define MAYBE_DragDropInMultipleViewsSingleWidgetTest DISABLED_DragDropInMultipleViewsSingleWidgetTest
-#else
-#define MAYBE_DragDropInMultipleViewsSingleWidgetTest DragDropInMultipleViewsSingleWidgetTest
-#endif
-TEST_F(DragDropControllerTest, MAYBE_DragDropInMultipleViewsSingleWidgetTest) {
- scoped_ptr<views::Widget> widget(CreateNewWidget());
- DragTestView* drag_view1 = new DragTestView;
- AddViewToWidgetAndResize(widget.get(), drag_view1);
- DragTestView* drag_view2 = new DragTestView;
- AddViewToWidgetAndResize(widget.get(), drag_view2);
-
- ui::OSExchangeData data;
- data.SetString(UTF8ToUTF16("I am being dragged"));
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- generator.MoveMouseRelativeTo(widget->GetNativeView(),
- drag_view1->bounds().CenterPoint());
- generator.PressLeftButton();
-
- int num_drags = drag_view1->width();
- for (int i = 0; i < num_drags; ++i) {
- // Because we are not doing a blocking drag and drop, the original
- // OSDragExchangeData object is lost as soon as we return from the drag
- // initiation in DragDropController::StartDragAndDrop(). Hence we set the
- // drag_data_ to a fake drag data object that we created.
- if (i > 0)
- UpdateDragData(&data);
- generator.MoveMouseBy(1, 0);
-
- // Execute any scheduled draws to process deferred mouse events.
- RunAllPendingInMessageLoop();
- }
-
- generator.ReleaseLeftButton();
-
- EXPECT_TRUE(drag_drop_controller_->drag_start_received_);
- EXPECT_EQ(num_drags - 1 - drag_view1->HorizontalDragThreshold(),
- drag_drop_controller_->num_drag_updates_);
- EXPECT_TRUE(drag_drop_controller_->drop_received_);
- EXPECT_EQ(UTF8ToUTF16("I am being dragged"),
- drag_drop_controller_->drag_string_);
-
- EXPECT_EQ(1, drag_view1->num_drag_enters_);
- int num_expected_updates = drag_view1->bounds().width() -
- drag_view1->bounds().CenterPoint().x() - 2;
- EXPECT_EQ(num_expected_updates - drag_view1->HorizontalDragThreshold(),
- drag_view1->num_drag_updates_);
- EXPECT_EQ(0, drag_view1->num_drops_);
- EXPECT_EQ(1, drag_view1->num_drag_exits_);
- EXPECT_TRUE(drag_view1->drag_done_received_);
-
- EXPECT_EQ(1, drag_view2->num_drag_enters_);
- num_expected_updates = num_drags - num_expected_updates - 1;
- EXPECT_EQ(num_expected_updates, drag_view2->num_drag_updates_);
- EXPECT_EQ(1, drag_view2->num_drops_);
- EXPECT_EQ(0, drag_view2->num_drag_exits_);
- EXPECT_FALSE(drag_view2->drag_done_received_);
-}
-
-// TODO(win_aura) http://crbug.com/154081
-#if defined(OS_WIN)
-#define MAYBE_DragDropInMultipleViewsMultipleWidgetsTest DISABLED_DragDropInMultipleViewsMultipleWidgetsTest
-#else
-#define MAYBE_DragDropInMultipleViewsMultipleWidgetsTest DragDropInMultipleViewsMultipleWidgetsTest
-#endif
-TEST_F(DragDropControllerTest, MAYBE_DragDropInMultipleViewsMultipleWidgetsTest) {
- scoped_ptr<views::Widget> widget1(CreateNewWidget());
- DragTestView* drag_view1 = new DragTestView;
- AddViewToWidgetAndResize(widget1.get(), drag_view1);
- scoped_ptr<views::Widget> widget2(CreateNewWidget());
- DragTestView* drag_view2 = new DragTestView;
- AddViewToWidgetAndResize(widget2.get(), drag_view2);
- gfx::Rect widget1_bounds = widget1->GetClientAreaBoundsInScreen();
- gfx::Rect widget2_bounds = widget2->GetClientAreaBoundsInScreen();
- widget2->SetBounds(gfx::Rect(widget1_bounds.width(), 0,
- widget2_bounds.width(), widget2_bounds.height()));
-
- ui::OSExchangeData data;
- data.SetString(UTF8ToUTF16("I am being dragged"));
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget1->GetNativeView());
- generator.PressLeftButton();
-
- int num_drags = drag_view1->width();
- for (int i = 0; i < num_drags; ++i) {
- // Because we are not doing a blocking drag and drop, the original
- // OSDragExchangeData object is lost as soon as we return from the drag
- // initiation in DragDropController::StartDragAndDrop(). Hence we set the
- // drag_data_ to a fake drag data object that we created.
- if (i > 0)
- UpdateDragData(&data);
- generator.MoveMouseBy(1, 0);
-
- // Execute any scheduled draws to process deferred mouse events.
- RunAllPendingInMessageLoop();
- }
-
- generator.ReleaseLeftButton();
-
- EXPECT_TRUE(drag_drop_controller_->drag_start_received_);
- EXPECT_EQ(num_drags - 1 - drag_view1->HorizontalDragThreshold(),
- drag_drop_controller_->num_drag_updates_);
- EXPECT_TRUE(drag_drop_controller_->drop_received_);
- EXPECT_EQ(UTF8ToUTF16("I am being dragged"),
- drag_drop_controller_->drag_string_);
-
- EXPECT_EQ(1, drag_view1->num_drag_enters_);
- int num_expected_updates = drag_view1->bounds().width() -
- drag_view1->bounds().CenterPoint().x() - 2;
- EXPECT_EQ(num_expected_updates - drag_view1->HorizontalDragThreshold(),
- drag_view1->num_drag_updates_);
- EXPECT_EQ(0, drag_view1->num_drops_);
- EXPECT_EQ(1, drag_view1->num_drag_exits_);
- EXPECT_TRUE(drag_view1->drag_done_received_);
-
- EXPECT_EQ(1, drag_view2->num_drag_enters_);
- num_expected_updates = num_drags - num_expected_updates - 1;
- EXPECT_EQ(num_expected_updates, drag_view2->num_drag_updates_);
- EXPECT_EQ(1, drag_view2->num_drops_);
- EXPECT_EQ(0, drag_view2->num_drag_exits_);
- EXPECT_FALSE(drag_view2->drag_done_received_);
-}
-
-// TODO(win_aura) http://crbug.com/154081
-#if defined(OS_WIN)
-#define MAYBE_ViewRemovedWhileInDragDropTest DISABLED_ViewRemovedWhileInDragDropTest
-#else
-#define MAYBE_ViewRemovedWhileInDragDropTest ViewRemovedWhileInDragDropTest
-#endif
-TEST_F(DragDropControllerTest, MAYBE_ViewRemovedWhileInDragDropTest) {
- scoped_ptr<views::Widget> widget(CreateNewWidget());
- scoped_ptr<DragTestView> drag_view(new DragTestView);
- AddViewToWidgetAndResize(widget.get(), drag_view.get());
- gfx::Point point = gfx::Rect(drag_view->bounds()).CenterPoint();
- ui::OSExchangeData data;
- data.SetString(UTF8ToUTF16("I am being dragged"));
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- generator.MoveMouseToCenterOf(widget->GetNativeView());
- generator.PressLeftButton();
-
- int num_drags_1 = 17;
- for (int i = 0; i < num_drags_1; ++i) {
- // Because we are not doing a blocking drag and drop, the original
- // OSDragExchangeData object is lost as soon as we return from the drag
- // initiation in DragDropController::StartDragAndDrop(). Hence we set the
- // drag_data_ to a fake drag data object that we created.
- if (i > 0)
- UpdateDragData(&data);
- generator.MoveMouseBy(0, 1);
-
- // Execute any scheduled draws to process deferred mouse events.
- RunAllPendingInMessageLoop();
- }
-
- drag_view->parent()->RemoveChildView(drag_view.get());
- // View has been removed. We will not get any of the following drag updates.
- int num_drags_2 = 23;
- for (int i = 0; i < num_drags_2; ++i) {
- UpdateDragData(&data);
- generator.MoveMouseBy(0, 1);
-
- // Execute any scheduled draws to process deferred mouse events.
- RunAllPendingInMessageLoop();
- }
-
- generator.ReleaseLeftButton();
-
- EXPECT_TRUE(drag_drop_controller_->drag_start_received_);
- EXPECT_EQ(num_drags_1 + num_drags_2 - 1 - drag_view->VerticalDragThreshold(),
- drag_drop_controller_->num_drag_updates_);
- EXPECT_TRUE(drag_drop_controller_->drop_received_);
- EXPECT_EQ(UTF8ToUTF16("I am being dragged"),
- drag_drop_controller_->drag_string_);
-
- EXPECT_EQ(1, drag_view->num_drag_enters_);
- EXPECT_EQ(num_drags_1 - 1 - drag_view->VerticalDragThreshold(),
- drag_view->num_drag_updates_);
- EXPECT_EQ(0, drag_view->num_drops_);
- EXPECT_EQ(0, drag_view->num_drag_exits_);
- EXPECT_TRUE(drag_view->drag_done_received_);
-}
-
-TEST_F(DragDropControllerTest, DragLeavesClipboardAloneTest) {
- ui::Clipboard* cb = ui::Clipboard::GetForCurrentThread();
- std::string clip_str("I am on the clipboard");
- {
- // We first copy some text to the clipboard.
- ui::ScopedClipboardWriter scw(cb, ui::CLIPBOARD_TYPE_COPY_PASTE);
- scw.WriteText(ASCIIToUTF16(clip_str));
- }
- EXPECT_TRUE(cb->IsFormatAvailable(ui::Clipboard::GetPlainTextFormatType(),
- ui::CLIPBOARD_TYPE_COPY_PASTE));
-
- scoped_ptr<views::Widget> widget(CreateNewWidget());
- DragTestView* drag_view = new DragTestView;
- AddViewToWidgetAndResize(widget.get(), drag_view);
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
- ui::OSExchangeData data;
- std::string data_str("I am being dragged");
- data.SetString(ASCIIToUTF16(data_str));
-
- generator.PressLeftButton();
- generator.MoveMouseBy(0, drag_view->VerticalDragThreshold() + 1);
-
- // Execute any scheduled draws to process deferred mouse events.
- RunAllPendingInMessageLoop();
-
- // Verify the clipboard contents haven't changed
- std::string result;
- EXPECT_TRUE(cb->IsFormatAvailable(ui::Clipboard::GetPlainTextFormatType(),
- ui::CLIPBOARD_TYPE_COPY_PASTE));
- cb->ReadAsciiText(ui::CLIPBOARD_TYPE_COPY_PASTE, &result);
- EXPECT_EQ(clip_str, result);
- // Destory the clipboard here because ash doesn't delete it.
- // crbug.com/158150.
- ui::Clipboard::DestroyClipboardForCurrentThread();
-}
-
-TEST_F(DragDropControllerTest, WindowDestroyedDuringDragDrop) {
- scoped_ptr<views::Widget> widget(CreateNewWidget());
- DragTestView* drag_view = new DragTestView;
- AddViewToWidgetAndResize(widget.get(), drag_view);
- aura::Window* window = widget->GetNativeView();
-
- ui::OSExchangeData data;
- data.SetString(UTF8ToUTF16("I am being dragged"));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
- generator.PressLeftButton();
-
- int num_drags = 17;
- for (int i = 0; i < num_drags; ++i) {
- // Because we are not doing a blocking drag and drop, the original
- // OSDragExchangeData object is lost as soon as we return from the drag
- // initiation in DragDropController::StartDragAndDrop(). Hence we set the
- // drag_data_ to a fake drag data object that we created.
- if (i > 0)
- UpdateDragData(&data);
- generator.MoveMouseBy(0, 1);
-
- // Execute any scheduled draws to process deferred mouse events.
- RunAllPendingInMessageLoop();
-
- if (i > drag_view->VerticalDragThreshold())
- EXPECT_EQ(window, GetDragWindow());
- }
-
- widget->CloseNow();
- EXPECT_FALSE(GetDragWindow());
-
- num_drags = 23;
- for (int i = 0; i < num_drags; ++i) {
- if (i > 0)
- UpdateDragData(&data);
- generator.MoveMouseBy(0, 1);
- // We should not crash here.
- }
-
- generator.ReleaseLeftButton();
-
- EXPECT_TRUE(drag_drop_controller_->drag_start_received_);
- EXPECT_TRUE(drag_drop_controller_->drop_received_);
-}
-
-TEST_F(DragDropControllerTest, SyntheticEventsDuringDragDrop) {
- scoped_ptr<views::Widget> widget(CreateNewWidget());
- DragTestView* drag_view = new DragTestView;
- AddViewToWidgetAndResize(widget.get(), drag_view);
- ui::OSExchangeData data;
- data.SetString(UTF8ToUTF16("I am being dragged"));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
- generator.PressLeftButton();
-
- int num_drags = 17;
- for (int i = 0; i < num_drags; ++i) {
- // Because we are not doing a blocking drag and drop, the original
- // OSDragExchangeData object is lost as soon as we return from the drag
- // initiation in DragDropController::StartDragAndDrop(). Hence we set the
- // drag_data_ to a fake drag data object that we created.
- if (i > 0)
- UpdateDragData(&data);
- generator.MoveMouseBy(0, 1);
-
- // We send a unexpected mouse move event. Note that we cannot use
- // EventGenerator since it implicitly turns these into mouse drag events.
- // The DragDropController should simply ignore these events.
- gfx::Point mouse_move_location = drag_view->bounds().CenterPoint();
- ui::MouseEvent mouse_move(ui::ET_MOUSE_MOVED, mouse_move_location,
- mouse_move_location, 0);
- Shell::GetPrimaryRootWindow()->GetDispatcher()->AsRootWindowHostDelegate()->
- OnHostMouseEvent(&mouse_move);
- }
-
- generator.ReleaseLeftButton();
-
- EXPECT_TRUE(drag_drop_controller_->drag_start_received_);
- EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(),
- drag_drop_controller_->num_drag_updates_);
- EXPECT_TRUE(drag_drop_controller_->drop_received_);
- EXPECT_EQ(UTF8ToUTF16("I am being dragged"),
- drag_drop_controller_->drag_string_);
-
- EXPECT_EQ(1, drag_view->num_drag_enters_);
- EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(),
- drag_view->num_drag_updates_);
- EXPECT_EQ(1, drag_view->num_drops_);
- EXPECT_EQ(0, drag_view->num_drag_exits_);
- EXPECT_TRUE(drag_view->drag_done_received_);
-}
-
-// TODO(win_aura) http://crbug.com/154081
-#if defined(OS_WIN)
-#define MAYBE_PressingEscapeCancelsDragDrop DISABLED_PressingEscapeCancelsDragDrop
-#define MAYBE_CaptureLostCancelsDragDrop DISABLED_CaptureLostCancelsDragDrop
-#else
-#define MAYBE_PressingEscapeCancelsDragDrop PressingEscapeCancelsDragDrop
-#define MAYBE_CaptureLostCancelsDragDrop CaptureLostCancelsDragDrop
-#endif
-TEST_F(DragDropControllerTest, MAYBE_PressingEscapeCancelsDragDrop) {
- scoped_ptr<views::Widget> widget(CreateNewWidget());
- DragTestView* drag_view = new DragTestView;
- AddViewToWidgetAndResize(widget.get(), drag_view);
- ui::OSExchangeData data;
- data.SetString(UTF8ToUTF16("I am being dragged"));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
- generator.PressLeftButton();
-
- int num_drags = 17;
- for (int i = 0; i < num_drags; ++i) {
- // Because we are not doing a blocking drag and drop, the original
- // OSDragExchangeData object is lost as soon as we return from the drag
- // initiation in DragDropController::StartDragAndDrop(). Hence we set the
- // drag_data_ to a fake drag data object that we created.
- if (i > 0)
- UpdateDragData(&data);
- generator.MoveMouseBy(0, 1);
-
- // Execute any scheduled draws to process deferred mouse events.
- RunAllPendingInMessageLoop();
- }
-
- generator.PressKey(ui::VKEY_ESCAPE, 0);
-
- EXPECT_TRUE(drag_drop_controller_->drag_start_received_);
- EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(),
- drag_drop_controller_->num_drag_updates_);
- EXPECT_FALSE(drag_drop_controller_->drop_received_);
- EXPECT_TRUE(drag_drop_controller_->drag_canceled_);
- EXPECT_EQ(UTF8ToUTF16("I am being dragged"),
- drag_drop_controller_->drag_string_);
-
- EXPECT_EQ(1, drag_view->num_drag_enters_);
- EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(),
- drag_view->num_drag_updates_);
- EXPECT_EQ(0, drag_view->num_drops_);
- EXPECT_EQ(1, drag_view->num_drag_exits_);
- EXPECT_TRUE(drag_view->drag_done_received_);
-}
-
-TEST_F(DragDropControllerTest, MAYBE_CaptureLostCancelsDragDrop) {
- scoped_ptr<views::Widget> widget(CreateNewWidget());
- DragTestView* drag_view = new DragTestView;
- AddViewToWidgetAndResize(widget.get(), drag_view);
- ui::OSExchangeData data;
- data.SetString(UTF8ToUTF16("I am being dragged"));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
- generator.PressLeftButton();
-
- int num_drags = 17;
- for (int i = 0; i < num_drags; ++i) {
- // Because we are not doing a blocking drag and drop, the original
- // OSDragExchangeData object is lost as soon as we return from the drag
- // initiation in DragDropController::StartDragAndDrop(). Hence we set the
- // drag_data_ to a fake drag data object that we created.
- if (i > 0)
- UpdateDragData(&data);
- generator.MoveMouseBy(0, 1);
-
- // Execute any scheduled draws to process deferred mouse events.
- RunAllPendingInMessageLoop();
- }
- // Make sure the capture window won't handle mouse events.
- aura::Window* capture_window = drag_drop_tracker()->capture_window();
- ASSERT_TRUE(!!capture_window);
- EXPECT_EQ("0x0", capture_window->bounds().size().ToString());
- EXPECT_EQ(NULL,
- capture_window->GetEventHandlerForPoint(gfx::Point()));
- EXPECT_EQ(NULL,
- capture_window->GetTopWindowContainingPoint(gfx::Point()));
-
- aura::client::GetCaptureClient(widget->GetNativeView()->GetRootWindow())->
- SetCapture(NULL);
-
- EXPECT_TRUE(drag_drop_controller_->drag_start_received_);
- EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(),
- drag_drop_controller_->num_drag_updates_);
- EXPECT_FALSE(drag_drop_controller_->drop_received_);
- EXPECT_TRUE(drag_drop_controller_->drag_canceled_);
- EXPECT_EQ(UTF8ToUTF16("I am being dragged"),
- drag_drop_controller_->drag_string_);
-
- EXPECT_EQ(1, drag_view->num_drag_enters_);
- EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(),
- drag_view->num_drag_updates_);
- EXPECT_EQ(0, drag_view->num_drops_);
- EXPECT_EQ(1, drag_view->num_drag_exits_);
- EXPECT_TRUE(drag_view->drag_done_received_);
-}
-
-TEST_F(DragDropControllerTest, TouchDragDropInMultipleWindows) {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kEnableTouchDragDrop);
- scoped_ptr<views::Widget> widget1(CreateNewWidget());
- DragTestView* drag_view1 = new DragTestView;
- AddViewToWidgetAndResize(widget1.get(), drag_view1);
- scoped_ptr<views::Widget> widget2(CreateNewWidget());
- DragTestView* drag_view2 = new DragTestView;
- AddViewToWidgetAndResize(widget2.get(), drag_view2);
- gfx::Rect widget1_bounds = widget1->GetClientAreaBoundsInScreen();
- gfx::Rect widget2_bounds = widget2->GetClientAreaBoundsInScreen();
- widget2->SetBounds(gfx::Rect(widget1_bounds.width(), 0,
- widget2_bounds.width(), widget2_bounds.height()));
-
- ui::OSExchangeData data;
- data.SetString(UTF8ToUTF16("I am being dragged"));
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget1->GetNativeView());
- generator.PressTouch();
- gfx::Point point = gfx::Rect(drag_view1->bounds()).CenterPoint();
- DispatchGesture(ui::ET_GESTURE_LONG_PRESS, point);
- // Because we are not doing a blocking drag and drop, the original
- // OSDragExchangeData object is lost as soon as we return from the drag
- // initiation in DragDropController::StartDragAndDrop(). Hence we set the
- // drag_data_ to a fake drag data object that we created.
- UpdateDragData(&data);
- gfx::Point gesture_location = point;
- int num_drags = drag_view1->width();
- for (int i = 0; i < num_drags; ++i) {
- gesture_location.Offset(1, 0);
- DispatchGesture(ui::ET_GESTURE_SCROLL_UPDATE, gesture_location);
-
- // Execute any scheduled draws to process deferred mouse events.
- RunAllPendingInMessageLoop();
- }
-
- DispatchGesture(ui::ET_GESTURE_SCROLL_END, gesture_location);
-
- EXPECT_TRUE(drag_drop_controller_->drag_start_received_);
- EXPECT_EQ(num_drags, drag_drop_controller_->num_drag_updates_);
- EXPECT_TRUE(drag_drop_controller_->drop_received_);
- EXPECT_EQ(UTF8ToUTF16("I am being dragged"),
- drag_drop_controller_->drag_string_);
-
- EXPECT_EQ(1, drag_view1->num_drag_enters_);
- int num_expected_updates = drag_view1->bounds().width() -
- drag_view1->bounds().CenterPoint().x() - 1;
- EXPECT_EQ(num_expected_updates, drag_view1->num_drag_updates_);
- EXPECT_EQ(0, drag_view1->num_drops_);
- EXPECT_EQ(1, drag_view1->num_drag_exits_);
- EXPECT_TRUE(drag_view1->drag_done_received_);
-
- EXPECT_EQ(1, drag_view2->num_drag_enters_);
- num_expected_updates = num_drags - num_expected_updates;
- EXPECT_EQ(num_expected_updates, drag_view2->num_drag_updates_);
- EXPECT_EQ(1, drag_view2->num_drops_);
- EXPECT_EQ(0, drag_view2->num_drag_exits_);
- EXPECT_FALSE(drag_view2->drag_done_received_);
-}
-
-TEST_F(DragDropControllerTest, TouchDragDropCancelsOnLongTap) {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kEnableTouchDragDrop);
- scoped_ptr<views::Widget> widget(CreateNewWidget());
- DragTestView* drag_view = new DragTestView;
- AddViewToWidgetAndResize(widget.get(), drag_view);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
-
- generator.PressTouch();
- gfx::Point point = gfx::Rect(drag_view->bounds()).CenterPoint();
- DispatchGesture(ui::ET_GESTURE_LONG_PRESS, point);
- DispatchGesture(ui::ET_GESTURE_LONG_TAP, point);
-
- EXPECT_TRUE(drag_drop_controller_->drag_start_received_);
- EXPECT_TRUE(drag_drop_controller_->drag_canceled_);
- EXPECT_EQ(0, drag_drop_controller_->num_drag_updates_);
- EXPECT_FALSE(drag_drop_controller_->drop_received_);
- EXPECT_EQ(UTF8ToUTF16("I am being dragged"),
- drag_drop_controller_->drag_string_);
- EXPECT_EQ(0, drag_view->num_drag_enters_);
- EXPECT_EQ(0, drag_view->num_drops_);
- EXPECT_EQ(0, drag_view->num_drag_exits_);
- EXPECT_TRUE(drag_view->drag_done_received_);
-}
-
-TEST_F(DragDropControllerTest, TouchDragDropLongTapGestureIsForwarded) {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kEnableTouchDragDrop);
- scoped_ptr<views::Widget> widget(CreateNewWidget());
- DragTestView* drag_view = new DragTestView;
- AddViewToWidgetAndResize(widget.get(), drag_view);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
-
- generator.PressTouch();
- gfx::Point point = gfx::Rect(drag_view->bounds()).CenterPoint();
- DispatchGesture(ui::ET_GESTURE_LONG_PRESS, point);
-
- // Since we are not running inside a nested loop, the |drag_source_window_|
- // will get destroyed immediately. Hence we reassign it.
- EXPECT_EQ(NULL, GetDragSourceWindow());
- SetDragSourceWindow(widget->GetNativeView());
- EXPECT_FALSE(drag_view->long_tap_received_);
- DispatchGesture(ui::ET_GESTURE_LONG_TAP, point);
- CompleteCancelAnimation();
- EXPECT_TRUE(drag_view->long_tap_received_);
-}
-
-namespace {
-
-class DragImageWindowObserver : public aura::WindowObserver {
- public:
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE {
- window_location_on_destroying_ = window->GetBoundsInScreen().origin();
- }
-
- gfx::Point window_location_on_destroying() const {
- return window_location_on_destroying_;
- }
-
- public:
- gfx::Point window_location_on_destroying_;
-};
-
-}
-
-// Verifies the drag image moves back to the position where drag is started
-// across displays when drag is cancelled.
-TEST_F(DragDropControllerTest, DragCancelAcrossDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("400x400,400x400");
- aura::Window::Windows root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- for (aura::Window::Windows::iterator iter = root_windows.begin();
- iter != root_windows.end(); ++iter) {
- aura::client::SetDragDropClient(*iter, drag_drop_controller_.get());
- }
-
- ui::OSExchangeData data;
- data.SetString(UTF8ToUTF16("I am being dragged"));
- {
- scoped_ptr<views::Widget> widget(CreateNewWidget());
- aura::Window* window = widget->GetNativeWindow();
- drag_drop_controller_->StartDragAndDrop(
- data,
- window->GetRootWindow(),
- window,
- gfx::Point(5, 5),
- ui::DragDropTypes::DRAG_MOVE,
- ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE);
-
- DragImageWindowObserver observer;
- ASSERT_TRUE(GetDragImageWindow());
- GetDragImageWindow()->AddObserver(&observer);
-
- {
- ui::MouseEvent e(ui::ET_MOUSE_DRAGGED,
- gfx::Point(200, 0),
- gfx::Point(200, 0),
- ui::EF_NONE);
- drag_drop_controller_->DragUpdate(window, e);
- }
- {
- ui::MouseEvent e(ui::ET_MOUSE_DRAGGED,
- gfx::Point(600, 0),
- gfx::Point(600, 0),
- ui::EF_NONE);
- drag_drop_controller_->DragUpdate(window, e);
- }
-
- drag_drop_controller_->DragCancel();
- CompleteCancelAnimation();
-
- EXPECT_EQ("5,5", observer.window_location_on_destroying().ToString());
- }
-
- {
- scoped_ptr<views::Widget> widget(CreateNewWidget());
- aura::Window* window = widget->GetNativeWindow();
- drag_drop_controller_->StartDragAndDrop(
- data,
- window->GetRootWindow(),
- window,
- gfx::Point(405, 405),
- ui::DragDropTypes::DRAG_MOVE,
- ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE);
- DragImageWindowObserver observer;
- ASSERT_TRUE(GetDragImageWindow());
- GetDragImageWindow()->AddObserver(&observer);
-
- {
- ui::MouseEvent e(ui::ET_MOUSE_DRAGGED,
- gfx::Point(600, 0),
- gfx::Point(600, 0),
- ui::EF_NONE);
- drag_drop_controller_->DragUpdate(window, e);
- }
- {
- ui::MouseEvent e(ui::ET_MOUSE_DRAGGED,
- gfx::Point(200, 0),
- gfx::Point(200, 0),
- ui::EF_NONE);
- drag_drop_controller_->DragUpdate(window, e);
- }
-
- drag_drop_controller_->DragCancel();
- CompleteCancelAnimation();
-
- EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString());
- }
- for (aura::Window::Windows::iterator iter = root_windows.begin();
- iter != root_windows.end(); ++iter) {
- aura::client::SetDragDropClient(*iter, NULL);
- }
-}
-
-} // namespace test
-} // namespace aura
diff --git a/chromium/ash/drag_drop/drag_drop_interactive_uitest.cc b/chromium/ash/drag_drop/drag_drop_interactive_uitest.cc
deleted file mode 100644
index 73422f32d27..00000000000
--- a/chromium/ash/drag_drop/drag_drop_interactive_uitest.cc
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/drag_drop/drag_drop_controller.h"
-
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "base/bind.h"
-#include "base/message_loop/message_loop.h"
-#include "base/strings/utf_string_conversions.h"
-#include "ui/aura/root_window.h"
-#include "ui/base/dragdrop/drag_drop_types.h"
-#include "ui/base/test/ui_controls.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-namespace {
-
-class DraggableView : public views::View {
- public:
- DraggableView() {}
- virtual ~DraggableView() {}
-
- // views::View overrides:
- virtual int GetDragOperations(const gfx::Point& press_pt) OVERRIDE {
- return ui::DragDropTypes::DRAG_MOVE;
- }
- virtual void WriteDragData(const gfx::Point& press_pt,
- OSExchangeData* data)OVERRIDE {
- data->SetString(UTF8ToUTF16("test"));
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DraggableView);
-};
-
-class TargetView : public views::View {
- public:
- TargetView() : dropped_(false) {}
- virtual ~TargetView() {}
-
- // views::View overrides:
- virtual bool GetDropFormats(
- int* formats,
- std::set<OSExchangeData::CustomFormat>* custom_formats) OVERRIDE {
- *formats = ui::OSExchangeData::STRING;
- return true;
- }
- virtual bool AreDropTypesRequired() OVERRIDE {
- return false;
- }
- virtual bool CanDrop(const OSExchangeData& data) OVERRIDE {
- return true;
- }
- virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE {
- return ui::DragDropTypes::DRAG_MOVE;
- }
- virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE {
- dropped_ = true;
- return ui::DragDropTypes::DRAG_MOVE;
- }
-
- bool dropped() const { return dropped_; }
-
- private:
- bool dropped_;
-
- DISALLOW_COPY_AND_ASSIGN(TargetView);
-};
-
-views::Widget* CreateWidget(views::View* contents_view,
- const gfx::Rect& bounds) {
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params;
- params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS;
- params.accept_events = true;
- params.context = Shell::GetPrimaryRootWindow();
- params.bounds = bounds;
- widget->Init(params);
-
- widget->SetContentsView(contents_view);
- widget->Show();
- return widget;
-}
-
-void QuitLoop() {
- base::MessageLoop::current()->Quit();
-}
-
-void DragDropAcrossMultiDisplay_Step4() {
- ui_controls::SendMouseEventsNotifyWhenDone(
- ui_controls::LEFT, ui_controls::UP,
- base::Bind(&QuitLoop));
-}
-
-void DragDropAcrossMultiDisplay_Step3() {
- // Move to the edge of the 1st display so that the mouse
- // is moved to 2nd display by ash.
- ui_controls::SendMouseMoveNotifyWhenDone(
- 399, 10,
- base::Bind(&DragDropAcrossMultiDisplay_Step4));
-}
-
-void DragDropAcrossMultiDisplay_Step2() {
- ui_controls::SendMouseMoveNotifyWhenDone(
- 20, 10,
- base::Bind(&DragDropAcrossMultiDisplay_Step3));
-}
-
-void DragDropAcrossMultiDisplay_Step1() {
- ui_controls::SendMouseEventsNotifyWhenDone(
- ui_controls::LEFT, ui_controls::DOWN,
- base::Bind(&DragDropAcrossMultiDisplay_Step2));
-}
-
-} // namespace
-
-typedef test::AshTestBase DragDropTest;
-
-#if defined(OS_WIN)
-#define MAYBE_DragDropAcrossMultiDisplay DISABLED_DragDropAcrossMultiDisplay
-#else
-#define MAYBE_DragDropAcrossMultiDisplay DragDropAcrossMultiDisplay
-#endif
-
-// Test if the mouse gets moved properly to another display
-// during drag & drop operation.
-TEST_F(DragDropTest, MAYBE_DragDropAcrossMultiDisplay) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("400x400,400x400");
- aura::Window::Windows root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- views::View* draggable_view = new DraggableView();
- draggable_view->set_drag_controller(NULL);
- draggable_view->SetBounds(0, 0, 100, 100);
- views::Widget* source =
- CreateWidget(draggable_view, gfx::Rect(0, 0, 100, 100));
-
- TargetView* target_view = new TargetView();
- target_view->SetBounds(0, 0, 100, 100);
- views::Widget* target =
- CreateWidget(target_view, gfx::Rect(400, 0, 100, 100));
-
- // Make sure they're on the different root windows.
- EXPECT_EQ(root_windows[0], source->GetNativeView()->GetRootWindow());
- EXPECT_EQ(root_windows[1], target->GetNativeView()->GetRootWindow());
-
- ui_controls::SendMouseMoveNotifyWhenDone(
- 10, 10, base::Bind(&DragDropAcrossMultiDisplay_Step1));
-
- base::MessageLoop::current()->Run();
-
- EXPECT_TRUE(target_view->dropped());
-
- source->Close();
- target->Close();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/drag_drop/drag_drop_tracker.cc b/chromium/ash/drag_drop/drag_drop_tracker.cc
deleted file mode 100644
index 03ecf79b29f..00000000000
--- a/chromium/ash/drag_drop/drag_drop_tracker.cc
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/drag_drop/drag_drop_tracker.h"
-
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ui/aura/client/window_tree_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/events/event.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-// Creates a window for capturing drag events.
-aura::Window* CreateCaptureWindow(aura::Window* context_root,
- aura::WindowDelegate* delegate) {
- aura::Window* window = new aura::Window(delegate);
- window->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window->Init(ui::LAYER_NOT_DRAWN);
- aura::client::ParentWindowWithContext(window, context_root, gfx::Rect());
- window->Show();
- DCHECK(window->bounds().size().IsEmpty());
- return window;
-}
-
-} // namespace
-
-DragDropTracker::DragDropTracker(aura::Window* context_root,
- aura::WindowDelegate* delegate)
- : capture_window_(CreateCaptureWindow(context_root, delegate)) {
-}
-
-DragDropTracker::~DragDropTracker() {
- capture_window_->ReleaseCapture();
-}
-
-void DragDropTracker::TakeCapture() {
- capture_window_->SetCapture();
-}
-
-aura::Window* DragDropTracker::GetTarget(const ui::LocatedEvent& event) {
- DCHECK(capture_window_.get());
- gfx::Point location_in_screen = event.location();
- wm::ConvertPointToScreen(capture_window_.get(),
- &location_in_screen);
- aura::Window* root_window_at_point =
- wm::GetRootWindowAt(location_in_screen);
- gfx::Point location_in_root = location_in_screen;
- wm::ConvertPointFromScreen(root_window_at_point, &location_in_root);
- return root_window_at_point->GetEventHandlerForPoint(location_in_root);
-}
-
-ui::LocatedEvent* DragDropTracker::ConvertEvent(
- aura::Window* target,
- const ui::LocatedEvent& event) {
- DCHECK(capture_window_.get());
- gfx::Point target_location = event.location();
- aura::Window::ConvertPointToTarget(capture_window_.get(), target,
- &target_location);
- gfx::Point location_in_screen = event.location();
- ash::wm::ConvertPointToScreen(capture_window_.get(), &location_in_screen);
- gfx::Point target_root_location = event.root_location();
- aura::Window::ConvertPointToTarget(
- capture_window_->GetRootWindow(),
- ash::wm::GetRootWindowAt(location_in_screen),
- &target_root_location);
- return new ui::MouseEvent(event.type(),
- target_location,
- target_root_location,
- event.flags());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/drag_drop/drag_drop_tracker.h b/chromium/ash/drag_drop/drag_drop_tracker.h
deleted file mode 100644
index b4dcf6e84bd..00000000000
--- a/chromium/ash/drag_drop/drag_drop_tracker.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DRAG_DROP_DRAG_DROP_TRACKER_H_
-#define ASH_DRAG_DROP_DRAG_DROP_TRACKER_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/events/event.h"
-
-namespace aura {
-class Window;
-class WindowDelegate;
-}
-
-namespace ash {
-namespace internal {
-
-// Provides functions for handling drag events inside and outside the root
-// window where drag is started. This internally sets up a capture window for
-// tracking drag events outside the root window where drag is initiated.
-// ash/wm/coordinate_conversion.h is used internally and only X11 environment
-// is supported for now.
-class ASH_EXPORT DragDropTracker {
- public:
- DragDropTracker(aura::Window* context_root,
- aura::WindowDelegate* delegate);
- ~DragDropTracker();
-
- aura::Window* capture_window() { return capture_window_.get(); }
-
- // Tells our |capture_window_| to take capture. This is not done right at
- // creation to give the caller a chance to perform any operations needed
- // before the capture is transfered.
- void TakeCapture();
-
- // Gets the target located at |event| in the coordinates of the active root
- // window.
- aura::Window* GetTarget(const ui::LocatedEvent& event);
-
- // Converts the locations of |event| in the coordinates of the active root
- // window to the ones in |target|'s coordinates.
- // Caller takes ownership of the returned object.
- ui::LocatedEvent* ConvertEvent(aura::Window* target,
- const ui::LocatedEvent& event);
-
- private:
- // A window for capturing drag events while dragging.
- scoped_ptr<aura::Window> capture_window_;
-
- DISALLOW_COPY_AND_ASSIGN(DragDropTracker);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DRAG_DROP_DRAG_DROP_TRACKER_H_
diff --git a/chromium/ash/drag_drop/drag_drop_tracker_unittest.cc b/chromium/ash/drag_drop/drag_drop_tracker_unittest.cc
deleted file mode 100644
index ec2bc153ceb..00000000000
--- a/chromium/ash/drag_drop/drag_drop_tracker_unittest.cc
+++ /dev/null
@@ -1,202 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/drag_drop/drag_drop_tracker.h"
-
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-
-namespace ash {
-namespace test {
-
-class DragDropTrackerTest : public test::AshTestBase {
- public:
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- UpdateDisplay("200x200,300x300");
- }
-
- aura::Window* CreateTestWindow(const gfx::Rect& bounds) {
- static int window_id = 0;
- return CreateTestWindowInShellWithDelegate(
- aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(),
- window_id++,
- bounds);
- }
-
- static aura::Window* GetTarget(const gfx::Point& location) {
- scoped_ptr<internal::DragDropTracker> tracker(
- new internal::DragDropTracker(Shell::GetPrimaryRootWindow(),
- NULL));
- ui::MouseEvent e(ui::ET_MOUSE_DRAGGED,
- location,
- location,
- ui::EF_NONE);
- aura::Window* target = tracker->GetTarget(e);
- return target;
- }
-
- static ui::LocatedEvent* ConvertEvent(aura::Window* target,
- const ui::MouseEvent& event) {
- scoped_ptr<internal::DragDropTracker> tracker(
- new internal::DragDropTracker(Shell::GetPrimaryRootWindow(),
- NULL));
- ui::LocatedEvent* converted = tracker->ConvertEvent(target, event);
- return converted;
- }
-};
-
-// TODO(mazda): Remove this once ash/wm/coordinate_conversion.h supports
-// non-X11 platforms.
-#if defined(USE_X11)
-#define MAYBE_GetTarget GetTarget
-#else
-#define MAYBE_GetTarget DISABLED_GetTarget
-#endif
-
-TEST_F(DragDropTrackerTest, MAYBE_GetTarget) {
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- EXPECT_EQ(2U, root_windows.size());
-
- scoped_ptr<aura::Window> window0(
- CreateTestWindow(gfx::Rect(0, 0, 100, 100)));
- window0->Show();
-
- scoped_ptr<aura::Window> window1(
- CreateTestWindow(gfx::Rect(300, 100, 100, 100)));
- window1->Show();
- EXPECT_EQ(root_windows[0], window0->GetRootWindow());
- EXPECT_EQ(root_windows[1], window1->GetRootWindow());
- EXPECT_EQ("0,0 100x100", window0->GetBoundsInScreen().ToString());
- EXPECT_EQ("300,100 100x100", window1->GetBoundsInScreen().ToString());
-
- // Make RootWindow0 active so that capture window is parented to it.
- Shell::GetInstance()->set_target_root_window(root_windows[0]);
-
- // Start tracking from the RootWindow1 and check the point on RootWindow0 that
- // |window0| covers.
- EXPECT_EQ(window0.get(), GetTarget(gfx::Point(50, 50)));
-
- // Start tracking from the RootWindow0 and check the point on RootWindow0 that
- // neither |window0| nor |window1| covers.
- EXPECT_NE(window0.get(), GetTarget(gfx::Point(150, 150)));
- EXPECT_NE(window1.get(), GetTarget(gfx::Point(150, 150)));
-
- // Start tracking from the RootWindow0 and check the point on RootWindow1 that
- // |window1| covers.
- EXPECT_EQ(window1.get(), GetTarget(gfx::Point(350, 150)));
-
- // Start tracking from the RootWindow0 and check the point on RootWindow1 that
- // neither |window0| nor |window1| covers.
- EXPECT_NE(window0.get(), GetTarget(gfx::Point(50, 250)));
- EXPECT_NE(window1.get(), GetTarget(gfx::Point(50, 250)));
-
- // Make RootWindow1 active so that capture window is parented to it.
- Shell::GetInstance()->set_target_root_window(root_windows[1]);
-
- // Start tracking from the RootWindow1 and check the point on RootWindow0 that
- // |window0| covers.
- EXPECT_EQ(window0.get(), GetTarget(gfx::Point(-150, 50)));
-
- // Start tracking from the RootWindow1 and check the point on RootWindow0 that
- // neither |window0| nor |window1| covers.
- EXPECT_NE(window0.get(), GetTarget(gfx::Point(150, -50)));
- EXPECT_NE(window1.get(), GetTarget(gfx::Point(150, -50)));
-
- // Start tracking from the RootWindow1 and check the point on RootWindow1 that
- // |window1| covers.
- EXPECT_EQ(window1.get(), GetTarget(gfx::Point(150, 150)));
-
- // Start tracking from the RootWindow1 and check the point on RootWindow1 that
- // neither |window0| nor |window1| covers.
- EXPECT_NE(window0.get(), GetTarget(gfx::Point(50, 50)));
- EXPECT_NE(window1.get(), GetTarget(gfx::Point(50, 50)));
-}
-
-// TODO(mazda): Remove this once ash/wm/coordinate_conversion.h supports
-// non-X11 platforms.
-#if defined(USE_X11)
-#define MAYBE_ConvertEvent ConvertEvent
-#else
-#define MAYBE_ConvertEvent DISABLED_ConvertEvent
-#endif
-
-TEST_F(DragDropTrackerTest, MAYBE_ConvertEvent) {
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- EXPECT_EQ(2U, root_windows.size());
-
- scoped_ptr<aura::Window> window0(
- CreateTestWindow(gfx::Rect(0, 0, 100, 100)));
- window0->Show();
-
- scoped_ptr<aura::Window> window1(
- CreateTestWindow(gfx::Rect(300, 100, 100, 100)));
- window1->Show();
-
- // Make RootWindow0 active so that capture window is parented to it.
- Shell::GetInstance()->set_target_root_window(root_windows[0]);
-
- // Start tracking from the RootWindow0 and converts the mouse event into
- // |window0|'s coodinates.
- ui::MouseEvent original00(ui::ET_MOUSE_DRAGGED,
- gfx::Point(50, 50),
- gfx::Point(50, 50),
- ui::EF_NONE);
- scoped_ptr<ui::LocatedEvent> converted00(ConvertEvent(window0.get(),
- original00));
- EXPECT_EQ(original00.type(), converted00->type());
- EXPECT_EQ("50,50", converted00->location().ToString());
- EXPECT_EQ("50,50", converted00->root_location().ToString());
- EXPECT_EQ(original00.flags(), converted00->flags());
-
- // Start tracking from the RootWindow0 and converts the mouse event into
- // |window1|'s coodinates.
- ui::MouseEvent original01(ui::ET_MOUSE_DRAGGED,
- gfx::Point(350, 150),
- gfx::Point(350, 150),
- ui::EF_NONE);
- scoped_ptr<ui::LocatedEvent> converted01(ConvertEvent(window1.get(),
- original01));
- EXPECT_EQ(original01.type(), converted01->type());
- EXPECT_EQ("50,50", converted01->location().ToString());
- EXPECT_EQ("150,150", converted01->root_location().ToString());
- EXPECT_EQ(original01.flags(), converted01->flags());
-
- // Make RootWindow1 active so that capture window is parented to it.
- Shell::GetInstance()->set_target_root_window(root_windows[1]);
-
- // Start tracking from the RootWindow1 and converts the mouse event into
- // |window0|'s coodinates.
- ui::MouseEvent original10(ui::ET_MOUSE_DRAGGED,
- gfx::Point(-150, 50),
- gfx::Point(-150, 50),
- ui::EF_NONE);
- scoped_ptr<ui::LocatedEvent> converted10(ConvertEvent(window0.get(),
- original10));
- EXPECT_EQ(original10.type(), converted10->type());
- EXPECT_EQ("50,50", converted10->location().ToString());
- EXPECT_EQ("50,50", converted10->root_location().ToString());
- EXPECT_EQ(original10.flags(), converted10->flags());
-
- // Start tracking from the RootWindow1 and converts the mouse event into
- // |window1|'s coodinates.
- ui::MouseEvent original11(ui::ET_MOUSE_DRAGGED,
- gfx::Point(150, 150),
- gfx::Point(150, 150),
- ui::EF_NONE);
- scoped_ptr<ui::LocatedEvent> converted11(ConvertEvent(window1.get(),
- original11));
- EXPECT_EQ(original11.type(), converted11->type());
- EXPECT_EQ("50,50", converted11->location().ToString());
- EXPECT_EQ("150,150", converted11->root_location().ToString());
- EXPECT_EQ(original11.flags(), converted11->flags());
-}
-
-} // namespace test
-} // namespace aura
diff --git a/chromium/ash/drag_drop/drag_image_view.cc b/chromium/ash/drag_drop/drag_image_view.cc
deleted file mode 100644
index d9a9e88c53c..00000000000
--- a/chromium/ash/drag_drop/drag_image_view.cc
+++ /dev/null
@@ -1,175 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/drag_drop/drag_image_view.h"
-
-#include "grit/ui_resources.h"
-#include "skia/ext/image_operations.h"
-#include "ui/aura/window.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/compositor/dip_util.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/size_conversions.h"
-#include "ui/views/corewm/shadow_types.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-using views::Widget;
-
-Widget* CreateDragWidget(gfx::NativeView context) {
- Widget* drag_widget = new Widget;
- Widget::InitParams params;
- params.type = Widget::InitParams::TYPE_TOOLTIP;
- params.keep_on_top = true;
- params.context = context;
- params.accept_events = false;
- params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.opacity = Widget::InitParams::TRANSLUCENT_WINDOW;
- drag_widget->Init(params);
- drag_widget->SetOpacity(0xFF);
- drag_widget->GetNativeWindow()->set_owned_by_parent(false);
- drag_widget->GetNativeWindow()->SetName("DragWidget");
- SetShadowType(drag_widget->GetNativeView(), views::corewm::SHADOW_TYPE_NONE);
- return drag_widget;
-}
-}
-
-DragImageView::DragImageView(gfx::NativeView context,
- ui::DragDropTypes::DragEventSource event_source)
- : views::ImageView(),
- drag_event_source_(event_source),
- touch_drag_operation_(ui::DragDropTypes::DRAG_NONE) {
- widget_.reset(CreateDragWidget(context));
- widget_->SetContentsView(this);
- widget_->SetAlwaysOnTop(true);
-
- // We are owned by the DragDropController.
- set_owned_by_client();
-}
-
-DragImageView::~DragImageView() {
- widget_->Hide();
-}
-
-void DragImageView::SetBoundsInScreen(const gfx::Rect& bounds) {
- widget_->SetBounds(bounds);
- widget_size_ = bounds.size();
-}
-
-void DragImageView::SetScreenPosition(const gfx::Point& position) {
- widget_->SetBounds(gfx::Rect(position, widget_size_));
-}
-
-gfx::Rect DragImageView::GetBoundsInScreen() const {
- return widget_->GetWindowBoundsInScreen();
-}
-
-void DragImageView::SetWidgetVisible(bool visible) {
- if (visible != widget_->IsVisible()) {
- if (visible)
- widget_->Show();
- else
- widget_->Hide();
- }
-}
-
-void DragImageView::SetTouchDragOperationHintOff() {
- // Simply set the drag type to non-touch so that no hint is drawn.
- drag_event_source_ = ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE;
- SchedulePaint();
-}
-
-void DragImageView::SetTouchDragOperation(int operation) {
- if (touch_drag_operation_ == operation)
- return;
- touch_drag_operation_ = operation;
- SchedulePaint();
-}
-
-void DragImageView::SetTouchDragOperationHintPosition(
- const gfx::Point& position) {
- if (touch_drag_operation_indicator_position_ == position)
- return;
- touch_drag_operation_indicator_position_ = position;
- SchedulePaint();
-}
-
-void DragImageView::SetOpacity(float visibility) {
- DCHECK_GE(visibility, 0.0f);
- DCHECK_LE(visibility, 1.0f);
- widget_->SetOpacity(static_cast<int>(0xff * visibility));
-}
-
-void DragImageView::OnPaint(gfx::Canvas* canvas) {
- if (GetImage().isNull())
- return;
-
- // |widget_size_| is in DIP. ImageSkia::size() also returns the size in DIP.
- if (GetImage().size() == widget_size_) {
- canvas->DrawImageInt(GetImage(), 0, 0);
- } else {
- float device_scale = 1;
- if (widget_->GetNativeView() && widget_->GetNativeView()->layer()) {
- device_scale = ui::GetDeviceScaleFactor(
- widget_->GetNativeView()->layer());
- }
- // The drag image already has device scale factor applied. But
- // |widget_size_| is in DIP units.
- gfx::Size scaled_widget_size = gfx::ToRoundedSize(
- gfx::ScaleSize(widget_size_, device_scale));
- gfx::ImageSkiaRep image_rep = GetImage().GetRepresentation(device_scale);
- if (image_rep.is_null())
- return;
- SkBitmap scaled = skia::ImageOperations::Resize(
- image_rep.sk_bitmap(), skia::ImageOperations::RESIZE_LANCZOS3,
- scaled_widget_size.width(), scaled_widget_size.height());
- gfx::ImageSkia image_skia(gfx::ImageSkiaRep(scaled, device_scale));
- canvas->DrawImageInt(image_skia, 0, 0);
- }
-
- if (drag_event_source_ != ui::DragDropTypes::DRAG_EVENT_SOURCE_TOUCH)
- return;
-
- // Select appropriate drag hint.
- gfx::Image* drag_hint =
- &ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- IDR_TOUCH_DRAG_TIP_NODROP);
- if (touch_drag_operation_ & ui::DragDropTypes::DRAG_COPY) {
- drag_hint = &ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- IDR_TOUCH_DRAG_TIP_COPY);
- } else if (touch_drag_operation_ & ui::DragDropTypes::DRAG_MOVE) {
- drag_hint = &ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- IDR_TOUCH_DRAG_TIP_MOVE);
- } else if (touch_drag_operation_ & ui::DragDropTypes::DRAG_LINK) {
- drag_hint = &ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- IDR_TOUCH_DRAG_TIP_LINK);
- }
- if (!drag_hint->IsEmpty()) {
- gfx::Size drag_hint_size = drag_hint->Size();
-
- // Enlarge widget if required to fit the drag hint image.
- if (drag_hint_size.width() > widget_size_.width() ||
- drag_hint_size.height() > widget_size_.height()) {
- gfx::Size new_widget_size = widget_size_;
- new_widget_size.SetToMax(drag_hint_size);
- widget_->SetSize(new_widget_size);
- }
-
- // Make sure drag hint image is positioned within the widget.
- gfx::Point drag_hint_position = touch_drag_operation_indicator_position_;
- drag_hint_position.Offset(-drag_hint_size.width() / 2, 0);
- gfx::Rect drag_hint_bounds(drag_hint_position, drag_hint_size);
- drag_hint_bounds.AdjustToFit(gfx::Rect(widget_size_));
-
- // Draw image.
- canvas->DrawImageInt(*(drag_hint->ToImageSkia()),
- drag_hint_bounds.x(), drag_hint_bounds.y());
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/drag_drop/drag_image_view.h b/chromium/ash/drag_drop/drag_image_view.h
deleted file mode 100644
index 04578477e95..00000000000
--- a/chromium/ash/drag_drop/drag_image_view.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_
-#define ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_
-
-#include "ui/base/dragdrop/drag_drop_types.h"
-#include "ui/views/controls/image_view.h"
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-namespace internal {
-
-// This class allows to show a (native) view always on top of everything. It
-// does this by creating a widget and setting the content as the given view. The
-// caller can then use this object to freely move / drag it around on the
-// desktop in screen coordinates.
-class DragImageView : public views::ImageView {
- public:
- // |context is the native view context used to create the widget holding the
- // drag image.
- // |source| is the event source that started this drag drop operation (touch
- // or mouse). It is used to determine attributes of the drag image such as
- // whether to show drag operation hint on top of the image.
- DragImageView(gfx::NativeView context,
- ui::DragDropTypes::DragEventSource source);
- virtual ~DragImageView();
-
- // Sets the bounds of the native widget in screen
- // coordinates.
- // TODO(oshima): Looks like this is root window's
- // coordinate. Change this to screen's coordinate.
- void SetBoundsInScreen(const gfx::Rect& bounds);
-
- // Sets the position of the native widget.
- void SetScreenPosition(const gfx::Point& position);
-
- // Gets the image position in screen coordinates.
- gfx::Rect GetBoundsInScreen() const;
-
- // Sets the visibility of the native widget.
- void SetWidgetVisible(bool visible);
-
- // For touch drag drop, we show a hint corresponding to the drag operation
- // (since no mouse cursor is visible). These functions set the hint
- // parameters.
- void SetTouchDragOperationHintOff();
-
- // |operation| is a bit field indicating allowable drag operations from
- // ui::DragDropTypes::DragOperation.
- void SetTouchDragOperation(int operation);
- void SetTouchDragOperationHintPosition(const gfx::Point& position);
-
- // Sets the |opacity| of the image view between 0.0 and 1.0.
- void SetOpacity(float opacity);
-
- private:
- // Overridden from views::ImageView.
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
-
- scoped_ptr<views::Widget> widget_;
- gfx::Size widget_size_;
-
- ui::DragDropTypes::DragEventSource drag_event_source_;
- int touch_drag_operation_;
- gfx::Point touch_drag_operation_indicator_position_;
-
- DISALLOW_COPY_AND_ASSIGN(DragImageView);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_
diff --git a/chromium/ash/event_rewriter_delegate.h b/chromium/ash/event_rewriter_delegate.h
deleted file mode 100644
index c54c9a37078..00000000000
--- a/chromium/ash/event_rewriter_delegate.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_EVENT_REWRITER_DELEGATE_H_
-#define ASH_EVENT_REWRITER_DELEGATE_H_
-
-namespace ui {
-class KeyEvent;
-class LocatedEvent;
-} // namespace aura
-
-namespace ash {
-
-// Delegate for rewriting or filtering an event.
-class EventRewriterDelegate {
- public:
- enum Action {
- ACTION_REWRITE_EVENT,
- ACTION_DROP_EVENT,
- };
-
- virtual ~EventRewriterDelegate() {}
-
- // A derived class can do either of the following:
- // 1) Just return ACTION_DROP_EVENT to drop the |event|.
- // 2) Rewrite the |event| and return ACTION_REWRITE_EVENT.
- virtual Action RewriteOrFilterKeyEvent(ui::KeyEvent* event) = 0;
- virtual Action RewriteOrFilterLocatedEvent(ui::LocatedEvent* event) = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_EVENT_REWRITER_DELEGATE_H_
diff --git a/chromium/ash/extended_desktop_unittest.cc b/chromium/ash/extended_desktop_unittest.cc
deleted file mode 100644
index 8fed2ba378f..00000000000
--- a/chromium/ash/extended_desktop_unittest.cc
+++ /dev/null
@@ -1,847 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/display/display_controller.h"
-#include "ash/display/display_manager.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ash/wm/window_cycle_controller.h"
-#include "ash/wm/window_properties.h"
-#include "ash/wm/window_util.h"
-#include "base/strings/string_util.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/client/capture_client.h"
-#include "ui/aura/client/focus_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/test/window_test_api.h"
-#include "ui/aura/window.h"
-#include "ui/base/cursor/cursor.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/controls/textfield/textfield.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-namespace {
-
-void SetSecondaryDisplayLayout(DisplayLayout::Position position) {
- DisplayLayout layout =
- Shell::GetInstance()->display_manager()->GetCurrentDisplayLayout();
- layout.position = position;
- Shell::GetInstance()->display_manager()->
- SetLayoutForCurrentDisplays(layout);
-}
-
-class ModalWidgetDelegate : public views::WidgetDelegateView {
- public:
- ModalWidgetDelegate() {}
- virtual ~ModalWidgetDelegate() {}
-
- // Overridden from views::WidgetDelegate:
- virtual views::View* GetContentsView() OVERRIDE {
- return this;
- }
- virtual ui::ModalType GetModalType() const OVERRIDE {
- return ui::MODAL_TYPE_SYSTEM;
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ModalWidgetDelegate);
-};
-
-// An event handler which moves the target window to the secondary root window
-// at pre-handle phase of a mouse release event.
-class MoveWindowByClickEventHandler : public ui::EventHandler {
- public:
- explicit MoveWindowByClickEventHandler(aura::Window* target)
- : target_(target) {}
- virtual ~MoveWindowByClickEventHandler() {}
-
- private:
- // ui::EventHandler overrides:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
- if (event->type() == ui::ET_MOUSE_RELEASED) {
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- DCHECK_LT(1u, root_windows.size());
- root_windows[1]->AddChild(target_);
- }
- }
-
- aura::Window* target_;
- DISALLOW_COPY_AND_ASSIGN(MoveWindowByClickEventHandler);
-};
-
-// An event handler which records the event's locations.
-class EventLocationRecordingEventHandler : public ui::EventHandler {
- public:
- explicit EventLocationRecordingEventHandler() {
- reset();
- }
- virtual ~EventLocationRecordingEventHandler() {}
-
- std::string GetLocationsAndReset() {
- std::string result =
- location_.ToString() + " " + root_location_.ToString();
- reset();
- return result;
- }
-
- private:
- // ui::EventHandler overrides:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
- if (event->type() == ui::ET_MOUSE_MOVED ||
- event->type() == ui::ET_MOUSE_DRAGGED) {
- location_ = event->location();
- root_location_ = event->root_location();
- }
- }
-
- void reset() {
- location_.SetPoint(-999, -999);
- root_location_.SetPoint(-999, -999);
- }
-
- gfx::Point root_location_;
- gfx::Point location_;
-
- DISALLOW_COPY_AND_ASSIGN(EventLocationRecordingEventHandler);
-};
-
-} // namespace
-
-class ExtendedDesktopTest : public test::AshTestBase {
- public:
- views::Widget* CreateTestWidget(const gfx::Rect& bounds) {
- return CreateTestWidgetWithParentAndContext(
- NULL, CurrentContext(), bounds, false);
- }
-
- views::Widget* CreateTestWidgetWithParent(views::Widget* parent,
- const gfx::Rect& bounds,
- bool child) {
- CHECK(parent);
- return CreateTestWidgetWithParentAndContext(parent, NULL, bounds, child);
- }
-
- views::Widget* CreateTestWidgetWithParentAndContext(views::Widget* parent,
- gfx::NativeView context,
- const gfx::Rect& bounds,
- bool child) {
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
- if (parent)
- params.parent = parent->GetNativeView();
- params.context = context;
- params.bounds = bounds;
- params.child = child;
- views::Widget* widget = new views::Widget;
- widget->Init(params);
- widget->Show();
- return widget;
- }
-};
-
-// Test conditions that root windows in extended desktop mode
-// must satisfy.
-TEST_F(ExtendedDesktopTest, Basic) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("1000x600,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- // All root windows must have the root window controller.
- ASSERT_EQ(2U, root_windows.size());
- for (aura::Window::Windows::const_iterator iter = root_windows.begin();
- iter != root_windows.end(); ++iter) {
- EXPECT_TRUE(internal::GetRootWindowController(*iter) != NULL);
- }
- // Make sure root windows share the same controllers.
- EXPECT_EQ(aura::client::GetFocusClient(root_windows[0]),
- aura::client::GetFocusClient(root_windows[1]));
- EXPECT_EQ(aura::client::GetActivationClient(root_windows[0]),
- aura::client::GetActivationClient(root_windows[1]));
- EXPECT_EQ(aura::client::GetCaptureClient(root_windows[0]),
- aura::client::GetCaptureClient(root_windows[1]));
-}
-
-TEST_F(ExtendedDesktopTest, Activation) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("1000x600,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- views::Widget* widget_on_1st = CreateTestWidget(gfx::Rect(10, 10, 100, 100));
- views::Widget* widget_on_2nd =
- CreateTestWidget(gfx::Rect(1200, 10, 100, 100));
- EXPECT_EQ(root_windows[0], widget_on_1st->GetNativeView()->GetRootWindow());
- EXPECT_EQ(root_windows[1], widget_on_2nd->GetNativeView()->GetRootWindow());
-
- EXPECT_EQ(widget_on_2nd->GetNativeView(),
- aura::client::GetFocusClient(root_windows[0])->GetFocusedWindow());
- EXPECT_TRUE(wm::IsActiveWindow(widget_on_2nd->GetNativeView()));
-
- aura::test::EventGenerator& event_generator(GetEventGenerator());
- // Clicking a window changes the active window and active root window.
- event_generator.MoveMouseToCenterOf(widget_on_1st->GetNativeView());
- event_generator.ClickLeftButton();
-
- EXPECT_EQ(widget_on_1st->GetNativeView(),
- aura::client::GetFocusClient(root_windows[0])->GetFocusedWindow());
- EXPECT_TRUE(wm::IsActiveWindow(widget_on_1st->GetNativeView()));
-
- event_generator.MoveMouseToCenterOf(widget_on_2nd->GetNativeView());
- event_generator.ClickLeftButton();
-
- EXPECT_EQ(widget_on_2nd->GetNativeView(),
- aura::client::GetFocusClient(root_windows[0])->GetFocusedWindow());
- EXPECT_TRUE(wm::IsActiveWindow(widget_on_2nd->GetNativeView()));
-}
-
-TEST_F(ExtendedDesktopTest, SystemModal) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("1000x600,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- views::Widget* widget_on_1st = CreateTestWidget(gfx::Rect(10, 10, 100, 100));
- EXPECT_TRUE(wm::IsActiveWindow(widget_on_1st->GetNativeView()));
- EXPECT_EQ(root_windows[0], widget_on_1st->GetNativeView()->GetRootWindow());
- EXPECT_EQ(root_windows[0], Shell::GetTargetRootWindow());
-
- // Open system modal. Make sure it's on 2nd root window and active.
- views::Widget* modal_widget = views::Widget::CreateWindowWithContextAndBounds(
- new ModalWidgetDelegate(),
- CurrentContext(),
- gfx::Rect(1200, 100, 100, 100));
- modal_widget->Show();
- EXPECT_TRUE(wm::IsActiveWindow(modal_widget->GetNativeView()));
- EXPECT_EQ(root_windows[1], modal_widget->GetNativeView()->GetRootWindow());
- EXPECT_EQ(root_windows[1], Shell::GetTargetRootWindow());
-
- aura::test::EventGenerator& event_generator(GetEventGenerator());
-
- // Clicking a widget on widget_on_1st display should not change activation.
- event_generator.MoveMouseToCenterOf(widget_on_1st->GetNativeView());
- event_generator.ClickLeftButton();
- EXPECT_TRUE(wm::IsActiveWindow(modal_widget->GetNativeView()));
- EXPECT_EQ(root_windows[1], Shell::GetTargetRootWindow());
-
- // Close system modal and so clicking a widget should work now.
- modal_widget->Close();
- event_generator.MoveMouseToCenterOf(widget_on_1st->GetNativeView());
- event_generator.ClickLeftButton();
- EXPECT_TRUE(wm::IsActiveWindow(widget_on_1st->GetNativeView()));
- EXPECT_EQ(root_windows[0], Shell::GetTargetRootWindow());
-}
-
-TEST_F(ExtendedDesktopTest, TestCursor) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("1000x600,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- aura::WindowEventDispatcher* dispatcher0 = root_windows[0]->GetDispatcher();
- aura::WindowEventDispatcher* dispatcher1 = root_windows[1]->GetDispatcher();
- EXPECT_EQ(ui::kCursorPointer, dispatcher0->last_cursor().native_type());
- EXPECT_EQ(ui::kCursorPointer, dispatcher1->last_cursor().native_type());
- Shell::GetInstance()->cursor_manager()->SetCursor(ui::kCursorCopy);
- EXPECT_EQ(ui::kCursorCopy, dispatcher0->last_cursor().native_type());
- EXPECT_EQ(ui::kCursorCopy, dispatcher1->last_cursor().native_type());
-}
-
-TEST_F(ExtendedDesktopTest, TestCursorLocation) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("1000x600,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- aura::test::WindowTestApi root_window0_test_api(root_windows[0]);
- aura::test::WindowTestApi root_window1_test_api(root_windows[1]);
-
- root_windows[0]->MoveCursorTo(gfx::Point(10, 10));
- EXPECT_EQ("10,10", Shell::GetScreen()->GetCursorScreenPoint().ToString());
- EXPECT_TRUE(root_window0_test_api.ContainsMouse());
- EXPECT_FALSE(root_window1_test_api.ContainsMouse());
- root_windows[1]->MoveCursorTo(gfx::Point(10, 20));
- EXPECT_EQ("1010,20", Shell::GetScreen()->GetCursorScreenPoint().ToString());
- EXPECT_FALSE(root_window0_test_api.ContainsMouse());
- EXPECT_TRUE(root_window1_test_api.ContainsMouse());
- root_windows[0]->MoveCursorTo(gfx::Point(20, 10));
- EXPECT_EQ("20,10", Shell::GetScreen()->GetCursorScreenPoint().ToString());
- EXPECT_TRUE(root_window0_test_api.ContainsMouse());
- EXPECT_FALSE(root_window1_test_api.ContainsMouse());
-}
-
-TEST_F(ExtendedDesktopTest, CycleWindows) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("700x500,500x500");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- WindowCycleController* controller =
- Shell::GetInstance()->window_cycle_controller();
-
- views::Widget* d1_w1 = CreateTestWidget(gfx::Rect(10, 10, 100, 100));
- EXPECT_EQ(root_windows[0], d1_w1->GetNativeView()->GetRootWindow());
- views::Widget* d2_w1 = CreateTestWidget(gfx::Rect(800, 10, 100, 100));
- EXPECT_EQ(root_windows[1], d2_w1->GetNativeView()->GetRootWindow());
- EXPECT_TRUE(wm::IsActiveWindow(d2_w1->GetNativeView()));
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_TRUE(wm::IsActiveWindow(d1_w1->GetNativeView()));
- controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_TRUE(wm::IsActiveWindow(d2_w1->GetNativeView()));
- controller->HandleCycleWindow(WindowCycleController::BACKWARD, false);
- EXPECT_TRUE(wm::IsActiveWindow(d1_w1->GetNativeView()));
- controller->HandleCycleWindow(WindowCycleController::BACKWARD, false);
- EXPECT_TRUE(wm::IsActiveWindow(d2_w1->GetNativeView()));
-
- // Cycle through all windows across root windows.
- views::Widget* d1_w2 = CreateTestWidget(gfx::Rect(10, 200, 100, 100));
- EXPECT_EQ(root_windows[0], d1_w2->GetNativeView()->GetRootWindow());
- views::Widget* d2_w2 = CreateTestWidget(gfx::Rect(800, 200, 100, 100));
- EXPECT_EQ(root_windows[1], d2_w2->GetNativeView()->GetRootWindow());
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(d1_w2->GetNativeView()));
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(d2_w1->GetNativeView()));
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(d1_w1->GetNativeView()));
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(d2_w2->GetNativeView()));
-
- // Backwards
- controller->HandleCycleWindow(WindowCycleController::BACKWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(d1_w1->GetNativeView()));
- controller->HandleCycleWindow(WindowCycleController::BACKWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(d2_w1->GetNativeView()));
- controller->HandleCycleWindow(WindowCycleController::BACKWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(d1_w2->GetNativeView()));
- controller->HandleCycleWindow(WindowCycleController::BACKWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(d2_w2->GetNativeView()));
-}
-
-TEST_F(ExtendedDesktopTest, GetRootWindowAt) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("700x500,500x500");
- SetSecondaryDisplayLayout(DisplayLayout::LEFT);
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- EXPECT_EQ(root_windows[1], wm::GetRootWindowAt(gfx::Point(-400, 100)));
- EXPECT_EQ(root_windows[1], wm::GetRootWindowAt(gfx::Point(-1, 100)));
- EXPECT_EQ(root_windows[0], wm::GetRootWindowAt(gfx::Point(0, 300)));
- EXPECT_EQ(root_windows[0], wm::GetRootWindowAt(gfx::Point(700,300)));
-
- // Zero origin.
- EXPECT_EQ(root_windows[0], wm::GetRootWindowAt(gfx::Point(0, 0)));
-
- // Out of range point should return the primary root window
- EXPECT_EQ(root_windows[0], wm::GetRootWindowAt(gfx::Point(-600, 0)));
- EXPECT_EQ(root_windows[0], wm::GetRootWindowAt(gfx::Point(701, 100)));
-}
-
-TEST_F(ExtendedDesktopTest, GetRootWindowMatching) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("700x500,500x500");
- SetSecondaryDisplayLayout(DisplayLayout::LEFT);
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- // Containing rect.
- EXPECT_EQ(root_windows[1],
- wm::GetRootWindowMatching(gfx::Rect(-300, 10, 50, 50)));
- EXPECT_EQ(root_windows[0],
- wm::GetRootWindowMatching(gfx::Rect(100, 10, 50, 50)));
-
- // Intersecting rect.
- EXPECT_EQ(root_windows[1],
- wm::GetRootWindowMatching(gfx::Rect(-200, 0, 300, 300)));
- EXPECT_EQ(root_windows[0],
- wm::GetRootWindowMatching(gfx::Rect(-100, 0, 300, 300)));
-
- // Zero origin.
- EXPECT_EQ(root_windows[0],
- wm::GetRootWindowMatching(gfx::Rect(0, 0, 0, 0)));
- EXPECT_EQ(root_windows[0],
- wm::GetRootWindowMatching(gfx::Rect(0, 0, 1, 1)));
-
- // Empty rect.
- EXPECT_EQ(root_windows[1],
- wm::GetRootWindowMatching(gfx::Rect(-400, 100, 0, 0)));
- EXPECT_EQ(root_windows[0],
- wm::GetRootWindowMatching(gfx::Rect(100, 100, 0, 0)));
-
- // Out of range rect should return the primary root window.
- EXPECT_EQ(root_windows[0],
- wm::GetRootWindowMatching(gfx::Rect(-600, -300, 50, 50)));
- EXPECT_EQ(root_windows[0],
- wm::GetRootWindowMatching(gfx::Rect(0, 1000, 50, 50)));
-}
-
-TEST_F(ExtendedDesktopTest, Capture) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("1000x600,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- aura::test::EventCountDelegate r1_d1;
- aura::test::EventCountDelegate r1_d2;
- aura::test::EventCountDelegate r2_d1;
-
- scoped_ptr<aura::Window> r1_w1(aura::test::CreateTestWindowWithDelegate(
- &r1_d1, 0, gfx::Rect(10, 10, 100, 100), root_windows[0]));
- scoped_ptr<aura::Window> r1_w2(aura::test::CreateTestWindowWithDelegate(
- &r1_d2, 0, gfx::Rect(10, 100, 100, 100), root_windows[0]));
- scoped_ptr<aura::Window> r2_w1(aura::test::CreateTestWindowWithDelegate(
- &r2_d1, 0, gfx::Rect(10, 10, 100, 100), root_windows[1]));
-
- r1_w1->SetCapture();
-
- EXPECT_EQ(r1_w1.get(),
- aura::client::GetCaptureWindow(r2_w1->GetRootWindow()));
-
- aura::test::EventGenerator generator2(root_windows[1]);
- generator2.MoveMouseToCenterOf(r2_w1.get());
- generator2.ClickLeftButton();
- EXPECT_EQ("0 0 0", r2_d1.GetMouseMotionCountsAndReset());
- EXPECT_EQ("0 0", r2_d1.GetMouseButtonCountsAndReset());
- // The mouse is outside. On chromeos, the mouse is warped to the
- // dest root window, but it's not implemented on Win yet, so
- // no mouse move event on Win.
- EXPECT_EQ("1 1 0", r1_d1.GetMouseMotionCountsAndReset());
- EXPECT_EQ("1 1", r1_d1.GetMouseButtonCountsAndReset());
- // Emulate passive grab. (15,15) on 1st display is (-985,15) on 2nd
- // display.
- generator2.MoveMouseTo(-985, 15);
- EXPECT_EQ("0 1 0", r1_d1.GetMouseMotionCountsAndReset());
-
- r1_w2->SetCapture();
- EXPECT_EQ(r1_w2.get(),
- aura::client::GetCaptureWindow(r2_w1->GetRootWindow()));
- generator2.MoveMouseBy(10, 10);
- generator2.ClickLeftButton();
- EXPECT_EQ("0 0 0", r2_d1.GetMouseMotionCountsAndReset());
- EXPECT_EQ("0 0", r2_d1.GetMouseButtonCountsAndReset());
- // mouse is already entered.
- EXPECT_EQ("0 1 0", r1_d2.GetMouseMotionCountsAndReset());
- EXPECT_EQ("1 1", r1_d2.GetMouseButtonCountsAndReset());
- r1_w2->ReleaseCapture();
- EXPECT_EQ(NULL, aura::client::GetCaptureWindow(r2_w1->GetRootWindow()));
- generator2.MoveMouseTo(15, 15);
- generator2.ClickLeftButton();
- EXPECT_EQ("1 1 0", r2_d1.GetMouseMotionCountsAndReset());
- EXPECT_EQ("1 1", r2_d1.GetMouseButtonCountsAndReset());
- // Make sure the mouse_moved_handler_ is properly reset.
- EXPECT_EQ("0 0 0", r1_d2.GetMouseMotionCountsAndReset());
- EXPECT_EQ("0 0", r1_d2.GetMouseButtonCountsAndReset());
-}
-
-TEST_F(ExtendedDesktopTest, MoveWindow) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("1000x600,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- views::Widget* d1 = CreateTestWidget(gfx::Rect(10, 10, 100, 100));
-
- EXPECT_EQ(root_windows[0], d1->GetNativeView()->GetRootWindow());
-
- d1->SetBounds(gfx::Rect(1010, 10, 100, 100));
- EXPECT_EQ("1010,10 100x100",
- d1->GetWindowBoundsInScreen().ToString());
-
- EXPECT_EQ(root_windows[1], d1->GetNativeView()->GetRootWindow());
-
- d1->SetBounds(gfx::Rect(10, 10, 100, 100));
- EXPECT_EQ("10,10 100x100",
- d1->GetWindowBoundsInScreen().ToString());
-
- EXPECT_EQ(root_windows[0], d1->GetNativeView()->GetRootWindow());
-
- // Make sure the bounds which doesn't fit to the root window
- // works correctly.
- d1->SetBounds(gfx::Rect(1560, 30, 100, 100));
- EXPECT_EQ(root_windows[1], d1->GetNativeView()->GetRootWindow());
- EXPECT_EQ("1560,30 100x100",
- d1->GetWindowBoundsInScreen().ToString());
-
- // Setting outside of root windows will be moved to primary root window.
- // TODO(oshima): This one probably should pick the closest root window.
- d1->SetBounds(gfx::Rect(200, 10, 100, 100));
- EXPECT_EQ(root_windows[0], d1->GetNativeView()->GetRootWindow());
-}
-
-// Verifies if the mouse event arrives to the window even when the window
-// moves to another root in a pre-target handler. See: crbug.com/157583
-TEST_F(ExtendedDesktopTest, MoveWindowByMouseClick) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("1000x600,600x400");
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- aura::test::EventCountDelegate delegate;
- scoped_ptr<aura::Window> window(aura::test::CreateTestWindowWithDelegate(
- &delegate, 0, gfx::Rect(10, 10, 100, 100), root_windows[0]));
- MoveWindowByClickEventHandler event_handler(window.get());
- window->AddPreTargetHandler(&event_handler);
-
- aura::test::EventGenerator& event_generator(GetEventGenerator());
-
- event_generator.MoveMouseToCenterOf(window.get());
- event_generator.ClickLeftButton();
- // Both mouse pressed and released arrive at the window and its delegate.
- EXPECT_EQ("1 1", delegate.GetMouseButtonCountsAndReset());
- // Also event_handler moves the window to another root at mouse release.
- EXPECT_EQ(root_windows[1], window->GetRootWindow());
-}
-
-TEST_F(ExtendedDesktopTest, MoveWindowToDisplay) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("1000x1000,1000x1000");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- gfx::Display display0 = Shell::GetScreen()->GetDisplayMatching(
- root_windows[0]->GetBoundsInScreen());
- gfx::Display display1 = Shell::GetScreen()->GetDisplayMatching(
- root_windows[1]->GetBoundsInScreen());
- EXPECT_NE(display0.id(), display1.id());
-
- views::Widget* d1 = CreateTestWidget(gfx::Rect(10, 10, 1000, 100));
- EXPECT_EQ(root_windows[0], d1->GetNativeView()->GetRootWindow());
-
- // Move the window where the window spans both root windows. Since the second
- // parameter is |display1|, the window should be shown on the secondary root.
- d1->GetNativeWindow()->SetBoundsInScreen(gfx::Rect(500, 10, 1000, 100),
- display1);
- EXPECT_EQ("500,10 1000x100",
- d1->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ(root_windows[1], d1->GetNativeView()->GetRootWindow());
-
- // Move to the primary root.
- d1->GetNativeWindow()->SetBoundsInScreen(gfx::Rect(500, 10, 1000, 100),
- display0);
- EXPECT_EQ("500,10 1000x100",
- d1->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ(root_windows[0], d1->GetNativeView()->GetRootWindow());
-}
-
-TEST_F(ExtendedDesktopTest, MoveWindowWithTransient) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("1000x600,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- views::Widget* w1 = CreateTestWidget(gfx::Rect(10, 10, 100, 100));
- views::Widget* w1_t1 = CreateTestWidgetWithParent(
- w1, gfx::Rect(50, 50, 50, 50), false /* transient */);
- // Transient child of the transient child.
- views::Widget* w1_t11 = CreateTestWidgetWithParent(
- w1_t1, gfx::Rect(1200, 70, 30, 30), false /* transient */);
-
- views::Widget* w11 = CreateTestWidgetWithParent(
- w1, gfx::Rect(10, 10, 40, 40), true /* child */);
- views::Widget* w11_t1 = CreateTestWidgetWithParent(
- w1, gfx::Rect(1300, 100, 80, 80), false /* transient */);
-
- EXPECT_EQ(root_windows[0], w1->GetNativeView()->GetRootWindow());
- EXPECT_EQ(root_windows[0], w11->GetNativeView()->GetRootWindow());
- EXPECT_EQ(root_windows[0], w1_t1->GetNativeView()->GetRootWindow());
- EXPECT_EQ(root_windows[0], w1_t11->GetNativeView()->GetRootWindow());
- EXPECT_EQ(root_windows[0], w11_t1->GetNativeView()->GetRootWindow());
- EXPECT_EQ("50,50 50x50",
- w1_t1->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("1200,70 30x30",
- w1_t11->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("20,20 40x40",
- w11->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("1300,100 80x80",
- w11_t1->GetWindowBoundsInScreen().ToString());
-
- w1->SetBounds(gfx::Rect(1100,10,100,100));
-
- EXPECT_EQ(root_windows[1], w1_t1->GetNativeView()->GetRootWindow());
- EXPECT_EQ(root_windows[1], w1_t1->GetNativeView()->GetRootWindow());
- EXPECT_EQ(root_windows[1], w1_t11->GetNativeView()->GetRootWindow());
- EXPECT_EQ(root_windows[1], w11->GetNativeView()->GetRootWindow());
- EXPECT_EQ(root_windows[1], w11_t1->GetNativeView()->GetRootWindow());
-
- EXPECT_EQ("1110,20 40x40",
- w11->GetWindowBoundsInScreen().ToString());
- // Transient window's screen bounds stays the same.
- EXPECT_EQ("50,50 50x50",
- w1_t1->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("1200,70 30x30",
- w1_t11->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("1300,100 80x80",
- w11_t1->GetWindowBoundsInScreen().ToString());
-
- // Transient window doesn't move between root window unless
- // its transient parent moves.
- w1_t1->SetBounds(gfx::Rect(10, 50, 50, 50));
- EXPECT_EQ(root_windows[1], w1_t1->GetNativeView()->GetRootWindow());
- EXPECT_EQ("10,50 50x50",
- w1_t1->GetWindowBoundsInScreen().ToString());
-}
-
-// Test if the Window::ConvertPointToTarget works across root windows.
-// TODO(oshima): Move multiple display suport and this test to aura.
-TEST_F(ExtendedDesktopTest, ConvertPoint) {
- if (!SupportsMultipleDisplays())
- return;
- gfx::Screen* screen = Shell::GetInstance()->screen();
- UpdateDisplay("1000x600,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- gfx::Display display_1 = screen->GetDisplayNearestWindow(root_windows[0]);
- EXPECT_EQ("0,0", display_1.bounds().origin().ToString());
- gfx::Display display_2 = screen->GetDisplayNearestWindow(root_windows[1]);
- EXPECT_EQ("1000,0", display_2.bounds().origin().ToString());
-
- aura::Window* d1 =
- CreateTestWidget(gfx::Rect(10, 10, 100, 100))->GetNativeView();
- aura::Window* d2 =
- CreateTestWidget(gfx::Rect(1020, 20, 100, 100))->GetNativeView();
- EXPECT_EQ(root_windows[0], d1->GetRootWindow());
- EXPECT_EQ(root_windows[1], d2->GetRootWindow());
-
- // Convert point in the Root2's window to the Root1's window Coord.
- gfx::Point p(0, 0);
- aura::Window::ConvertPointToTarget(root_windows[1], root_windows[0], &p);
- EXPECT_EQ("1000,0", p.ToString());
- p.SetPoint(0, 0);
- aura::Window::ConvertPointToTarget(d2, d1, &p);
- EXPECT_EQ("1010,10", p.ToString());
-
- // Convert point in the Root1's window to the Root2's window Coord.
- p.SetPoint(0, 0);
- aura::Window::ConvertPointToTarget(root_windows[0], root_windows[1], &p);
- EXPECT_EQ("-1000,0", p.ToString());
- p.SetPoint(0, 0);
- aura::Window::ConvertPointToTarget(d1, d2, &p);
- EXPECT_EQ("-1010,-10", p.ToString());
-
- // Move the 2nd display to the bottom and test again.
- SetSecondaryDisplayLayout(DisplayLayout::BOTTOM);
-
- display_2 = screen->GetDisplayNearestWindow(root_windows[1]);
- EXPECT_EQ("0,600", display_2.bounds().origin().ToString());
-
- // Convert point in Root2's window to Root1's window Coord.
- p.SetPoint(0, 0);
- aura::Window::ConvertPointToTarget(root_windows[1], root_windows[0], &p);
- EXPECT_EQ("0,600", p.ToString());
- p.SetPoint(0, 0);
- aura::Window::ConvertPointToTarget(d2, d1, &p);
- EXPECT_EQ("10,610", p.ToString());
-
- // Convert point in Root1's window to Root2's window Coord.
- p.SetPoint(0, 0);
- aura::Window::ConvertPointToTarget(root_windows[0], root_windows[1], &p);
- EXPECT_EQ("0,-600", p.ToString());
- p.SetPoint(0, 0);
- aura::Window::ConvertPointToTarget(d1, d2, &p);
- EXPECT_EQ("-10,-610", p.ToString());
-}
-
-TEST_F(ExtendedDesktopTest, OpenSystemTray) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("500x600,600x400");
- SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray();
- ASSERT_FALSE(tray->HasSystemBubble());
-
- aura::test::EventGenerator& event_generator(GetEventGenerator());
-
- // Opens the tray by a dummy click event and makes sure that adding/removing
- // displays doesn't break anything.
- event_generator.MoveMouseToCenterOf(tray->GetWidget()->GetNativeWindow());
- event_generator.ClickLeftButton();
- EXPECT_TRUE(tray->HasSystemBubble());
-
- UpdateDisplay("500x600");
- EXPECT_TRUE(tray->HasSystemBubble());
- UpdateDisplay("500x600,600x400");
- EXPECT_TRUE(tray->HasSystemBubble());
-
- // Closes the tray and again makes sure that adding/removing displays doesn't
- // break anything.
- event_generator.ClickLeftButton();
- RunAllPendingInMessageLoop();
-
- EXPECT_FALSE(tray->HasSystemBubble());
-
- UpdateDisplay("500x600");
- EXPECT_FALSE(tray->HasSystemBubble());
- UpdateDisplay("500x600,600x400");
- EXPECT_FALSE(tray->HasSystemBubble());
-}
-
-TEST_F(ExtendedDesktopTest, StayInSameRootWindow) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("100x100,200x200");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- views::Widget* w1 = CreateTestWidget(gfx::Rect(10, 10, 50, 50));
- EXPECT_EQ(root_windows[0], w1->GetNativeView()->GetRootWindow());
- w1->SetBounds(gfx::Rect(150, 10, 50, 50));
- EXPECT_EQ(root_windows[1], w1->GetNativeView()->GetRootWindow());
-
- // The widget stays in the same root if kStayInSameRootWindowKey is set to
- // true.
- w1->GetNativeView()->SetProperty(internal::kStayInSameRootWindowKey, true);
- w1->SetBounds(gfx::Rect(10, 10, 50, 50));
- EXPECT_EQ(root_windows[1], w1->GetNativeView()->GetRootWindow());
-
- // The widget should now move to the 1st root window without the property.
- w1->GetNativeView()->ClearProperty(internal::kStayInSameRootWindowKey);
- w1->SetBounds(gfx::Rect(10, 10, 50, 50));
- EXPECT_EQ(root_windows[0], w1->GetNativeView()->GetRootWindow());
-
- // a window in SettingsBubbleContainer and StatusContainer should
- // not move to another root window regardles of the bounds specified.
- aura::Window* settings_bubble_container =
- Shell::GetPrimaryRootWindowController()->GetContainer(
- internal::kShellWindowId_SettingBubbleContainer);
- aura::Window* window = aura::test::CreateTestWindowWithId(
- 100, settings_bubble_container);
- window->SetBoundsInScreen(gfx::Rect(150, 10, 50, 50),
- ScreenAsh::GetSecondaryDisplay());
- EXPECT_EQ(root_windows[0], window->GetRootWindow());
-
- aura::Window* status_container =
- Shell::GetPrimaryRootWindowController()->GetContainer(
- internal::kShellWindowId_StatusContainer);
- window = aura::test::CreateTestWindowWithId(100, status_container);
- window->SetBoundsInScreen(gfx::Rect(150, 10, 50, 50),
- ScreenAsh::GetSecondaryDisplay());
- EXPECT_EQ(root_windows[0], window->GetRootWindow());
-}
-
-TEST_F(ExtendedDesktopTest, KeyEventsOnLockScreen) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("100x100,200x200");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- // Create normal windows on both displays.
- views::Widget* widget1 = CreateTestWidget(
- Shell::GetScreen()->GetPrimaryDisplay().bounds());
- widget1->Show();
- EXPECT_EQ(root_windows[0], widget1->GetNativeView()->GetRootWindow());
- views::Widget* widget2 = CreateTestWidget(
- ScreenAsh::GetSecondaryDisplay().bounds());
- widget2->Show();
- EXPECT_EQ(root_windows[1], widget2->GetNativeView()->GetRootWindow());
-
- // Create a LockScreen window.
- views::Widget* lock_widget = CreateTestWidget(
- Shell::GetScreen()->GetPrimaryDisplay().bounds());
- views::Textfield* textfield = new views::Textfield;
- lock_widget->client_view()->AddChildView(textfield);
-
- ash::Shell::GetContainer(
- Shell::GetPrimaryRootWindow(),
- ash::internal::kShellWindowId_LockScreenContainer)->
- AddChild(lock_widget->GetNativeView());
- lock_widget->Show();
- textfield->RequestFocus();
-
- aura::client::FocusClient* focus_client =
- aura::client::GetFocusClient(root_windows[0]);
- EXPECT_EQ(lock_widget->GetNativeView(), focus_client->GetFocusedWindow());
-
- // The lock window should get events on both root windows.
- aura::test::EventGenerator& event_generator(GetEventGenerator());
-
- event_generator.set_current_root_window(root_windows[0]->GetDispatcher());
- event_generator.PressKey(ui::VKEY_A, 0);
- event_generator.ReleaseKey(ui::VKEY_A, 0);
- EXPECT_EQ(lock_widget->GetNativeView(), focus_client->GetFocusedWindow());
- EXPECT_EQ("a", UTF16ToASCII(textfield->text()));
-
- event_generator.set_current_root_window(root_windows[1]->GetDispatcher());
- event_generator.PressKey(ui::VKEY_B, 0);
- event_generator.ReleaseKey(ui::VKEY_B, 0);
- EXPECT_EQ(lock_widget->GetNativeView(), focus_client->GetFocusedWindow());
- EXPECT_EQ("ab", UTF16ToASCII(textfield->text()));
-
- // Deleting 2nd display. The lock window still should get the events.
- UpdateDisplay("100x100");
- event_generator.PressKey(ui::VKEY_C, 0);
- event_generator.ReleaseKey(ui::VKEY_C, 0);
- EXPECT_EQ(lock_widget->GetNativeView(), focus_client->GetFocusedWindow());
- EXPECT_EQ("abc", UTF16ToASCII(textfield->text()));
-
- // Creating 2nd display again, and lock window still should get events
- // on both root windows.
- UpdateDisplay("100x100,200x200");
- root_windows = Shell::GetAllRootWindows();
- event_generator.set_current_root_window(root_windows[0]->GetDispatcher());
- event_generator.PressKey(ui::VKEY_D, 0);
- event_generator.ReleaseKey(ui::VKEY_D, 0);
- EXPECT_EQ(lock_widget->GetNativeView(), focus_client->GetFocusedWindow());
- EXPECT_EQ("abcd", UTF16ToASCII(textfield->text()));
-
- event_generator.set_current_root_window(root_windows[1]->GetDispatcher());
- event_generator.PressKey(ui::VKEY_E, 0);
- event_generator.ReleaseKey(ui::VKEY_E, 0);
- EXPECT_EQ(lock_widget->GetNativeView(), focus_client->GetFocusedWindow());
- EXPECT_EQ("abcde", UTF16ToASCII(textfield->text()));
-}
-
-TEST_F(ExtendedDesktopTest, PassiveGrab) {
- if (!SupportsMultipleDisplays())
- return;
-
- EventLocationRecordingEventHandler event_handler;
- ash::Shell::GetInstance()->AddPreTargetHandler(&event_handler);
-
- UpdateDisplay("300x300,200x200");
-
- views::Widget* widget = CreateTestWidget(gfx::Rect(50, 50, 200, 200));
- widget->Show();
- ASSERT_EQ("50,50 200x200", widget->GetWindowBoundsInScreen().ToString());
-
- aura::test::EventGenerator& generator(GetEventGenerator());
- generator.MoveMouseTo(150, 150);
- EXPECT_EQ("100,100 150,150", event_handler.GetLocationsAndReset());
-
- generator.PressLeftButton();
- generator.MoveMouseTo(400, 150);
-
- EXPECT_EQ("350,100 400,150", event_handler.GetLocationsAndReset());
-
- generator.ReleaseLeftButton();
- EXPECT_EQ("-999,-999 -999,-999", event_handler.GetLocationsAndReset());
-
- generator.MoveMouseTo(400, 150);
- EXPECT_EQ("100,150 100,150", event_handler.GetLocationsAndReset());
-
- ash::Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
-}
-
-} // namespace ash
diff --git a/chromium/ash/first_run/desktop_cleaner.cc b/chromium/ash/first_run/desktop_cleaner.cc
deleted file mode 100644
index cf0ffa6f974..00000000000
--- a/chromium/ash/first_run/desktop_cleaner.cc
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/first_run/desktop_cleaner.h"
-
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window_observer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/message_center/message_center.h"
-#include "ui/message_center/notification_blocker.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-const int kContainerIdsToHide[] = {
- kShellWindowId_DefaultContainer,
- kShellWindowId_AlwaysOnTopContainer,
- kShellWindowId_PanelContainer,
- // TODO(dzhioev): uncomment this when issue with BrowserView::CanActivate
- // will be fixed.
- // kShellWindowId_SystemModalContainer
-};
-
-} // namespace
-
-class ContainerHider : public aura::WindowObserver,
- public ui::ImplicitAnimationObserver {
- public:
- explicit ContainerHider(aura::Window* container)
- : container_was_hidden_(!container->IsVisible()),
- container_(container) {
- if (container_was_hidden_)
- return;
- ui::Layer* layer = container_->layer();
- ui::ScopedLayerAnimationSettings animation_settings(layer->GetAnimator());
- animation_settings.AddObserver(this);
- layer->SetOpacity(0.0);
- }
-
- virtual ~ContainerHider() {
- if (container_was_hidden_ || !container_)
- return;
- if (!WasAnimationCompletedForProperty(ui::LayerAnimationElement::OPACITY)) {
- // We are in the middle of animation.
- StopObservingImplicitAnimations();
- } else {
- container_->Show();
- }
- ui::Layer* layer = container_->layer();
- ui::ScopedLayerAnimationSettings animation_settings(layer->GetAnimator());
- layer->SetOpacity(1.0);
- }
-
- private:
- // Overriden from ui::ImplicitAnimationObserver.
- virtual void OnImplicitAnimationsCompleted() OVERRIDE {
- container_->Hide();
- }
-
- // Overriden from aura::WindowObserver.
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE {
- DCHECK(window == container_);
- container_ = NULL;
- }
-
- const bool container_was_hidden_;
- aura::Window* container_;
-
- DISALLOW_COPY_AND_ASSIGN(ContainerHider);
-};
-
-class NotificationBlocker : public message_center::NotificationBlocker {
- public:
- NotificationBlocker()
- : message_center::NotificationBlocker(
- message_center::MessageCenter::Get()) {
- NotifyBlockingStateChanged();
- }
-
- virtual ~NotificationBlocker() {};
-
- private:
- // Overriden from message_center::NotificationBlocker.
- virtual bool ShouldShowNotificationAsPopup(
- const message_center::NotifierId& notifier_id) const OVERRIDE {
- return false;
- }
-
- DISALLOW_COPY_AND_ASSIGN(NotificationBlocker);
-};
-
-DesktopCleaner::DesktopCleaner() {
- // TODO(dzhioev): Add support for secondary displays.
- aura::Window* root_window = Shell::GetInstance()->GetPrimaryRootWindow();
- for (size_t i = 0; i < arraysize(kContainerIdsToHide); ++i) {
- aura::Window* container =
- Shell::GetContainer(root_window, kContainerIdsToHide[i]);
- container_hiders_.push_back(make_linked_ptr(new ContainerHider(container)));
- }
- notification_blocker_.reset(new NotificationBlocker());
-}
-
-DesktopCleaner::~DesktopCleaner() {}
-
-// static
-std::vector<int> DesktopCleaner::GetContainersToHideForTest() {
- return std::vector<int>(kContainerIdsToHide,
- kContainerIdsToHide + arraysize(kContainerIdsToHide));
-}
-
-} // namespace internal
-} // namespace ash
-
diff --git a/chromium/ash/first_run/desktop_cleaner.h b/chromium/ash/first_run/desktop_cleaner.h
deleted file mode 100644
index c3077b42c2f..00000000000
--- a/chromium/ash/first_run/desktop_cleaner.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_FIRST_RUN_DESKTOP_CLEANER_
-#define ASH_FIRST_RUN_DESKTOP_CLEANER_
-
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/memory/linked_ptr.h"
-#include "base/memory/scoped_ptr.h"
-
-namespace ash {
-
-namespace test {
-class FirstRunHelperTest;
-}
-
-namespace internal {
-
-class ContainerHider;
-class NotificationBlocker;
-
-// Class used to "clean" ash desktop, i.e. hide all windows and notifications.
-class ASH_EXPORT DesktopCleaner {
- public:
- DesktopCleaner();
- ~DesktopCleaner();
-
- private:
- // Returns the list of containers that DesctopCleaner hides.
- static std::vector<int> GetContainersToHideForTest();
-
- std::vector<linked_ptr<ContainerHider> > container_hiders_;
- scoped_ptr<NotificationBlocker> notification_blocker_;
-
- friend class ash::test::FirstRunHelperTest;
- DISALLOW_COPY_AND_ASSIGN(DesktopCleaner);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_FIRST_RUN_DESKTOP_CLEANER_
diff --git a/chromium/ash/first_run/first_run_helper.cc b/chromium/ash/first_run/first_run_helper.cc
deleted file mode 100644
index aab0f10f55e..00000000000
--- a/chromium/ash/first_run/first_run_helper.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/first_run/first_run_helper.h"
-
-namespace ash {
-
-FirstRunHelper::FirstRunHelper() {}
-FirstRunHelper::~FirstRunHelper() {}
-
-void FirstRunHelper::AddObserver(Observer* observer) {
- observers_.AddObserver(observer);
-}
-
-void FirstRunHelper::RemoveObserver(Observer* observer) {
- observers_.RemoveObserver(observer);
-}
-
-} // namespace chromeos
-
diff --git a/chromium/ash/first_run/first_run_helper.h b/chromium/ash/first_run/first_run_helper.h
deleted file mode 100644
index 42bc6979cd0..00000000000
--- a/chromium/ash/first_run/first_run_helper.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_FIRST_RUN_FIRST_RUN_HELPER_H_
-#define ASH_FIRST_RUN_FIRST_RUN_HELPER_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/observer_list.h"
-
-namespace gfx {
-class Rect;
-}
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-
-// Interface used by first-run tutorial to manipulate and retreive information
-// about shell elements.
-// All returned coordinates are in screen coordinate system.
-class ASH_EXPORT FirstRunHelper {
- public:
- class Observer {
- public:
- // Called when first-run UI was cancelled.
- virtual void OnCancelled() = 0;
- virtual ~Observer() {}
- };
-
- public:
- FirstRunHelper();
- virtual ~FirstRunHelper();
-
- void AddObserver(Observer* observer);
- void RemoveObserver(Observer* observer);
-
- // Returns widget to place tutorial UI into it.
- virtual views::Widget* GetOverlayWidget() = 0;
-
- // Opens and closes app list.
- virtual void OpenAppList() = 0;
- virtual void CloseAppList() = 0;
-
- // Returns bounding rectangle of launcher elements.
- virtual gfx::Rect GetLauncherBounds() = 0;
-
- // Returns bounds of application list button.
- virtual gfx::Rect GetAppListButtonBounds() = 0;
-
- // Returns bounds of application list. You must open application list before
- // calling this method.
- virtual gfx::Rect GetAppListBounds() = 0;
-
- // Opens and closes system tray bubble.
- virtual void OpenTrayBubble() = 0;
- virtual void CloseTrayBubble() = 0;
-
- // Returns |true| iff system tray bubble is opened now.
- virtual bool IsTrayBubbleOpened() = 0;
-
- // Returns bounds of system tray bubble. You must open bubble before calling
- // this method.
- virtual gfx::Rect GetTrayBubbleBounds() = 0;
-
- // Returns bounds of help app button from system tray buble. You must open
- // bubble before calling this method.
- virtual gfx::Rect GetHelpButtonBounds() = 0;
-
- protected:
- ObserverList<Observer>& observers() { return observers_; }
-
- private:
- ObserverList<Observer> observers_;
-
- DISALLOW_COPY_AND_ASSIGN(FirstRunHelper);
-};
-
-} // namespace ash
-
-#endif // ASH_FIRST_RUN_FIRST_RUN_HELPER_H_
-
diff --git a/chromium/ash/first_run/first_run_helper_impl.cc b/chromium/ash/first_run/first_run_helper_impl.cc
deleted file mode 100644
index 9efb0db9118..00000000000
--- a/chromium/ash/first_run/first_run_helper_impl.cc
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/first_run/first_run_helper_impl.h"
-
-#include "ash/launcher/launcher.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/tray/system_tray.h"
-#include "base/logging.h"
-#include "ui/app_list/views/app_list_view.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/rect.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-
-namespace {
-
-views::Widget* CreateFirstRunWindow() {
- views::Widget::InitParams params(
- views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- params.bounds = Shell::GetScreen()->GetPrimaryDisplay().bounds();
- params.show_state = ui::SHOW_STATE_FULLSCREEN;
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- params.parent =
- Shell::GetContainer(Shell::GetPrimaryRootWindow(),
- ash::internal::kShellWindowId_OverlayContainer);
- views::Widget* window = new views::Widget;
- window->Init(params);
- return window;
-}
-
-} // anonymous namespace
-
-FirstRunHelperImpl::FirstRunHelperImpl()
- : widget_(CreateFirstRunWindow()) {
- Shell::GetInstance()->overlay_filter()->Activate(this);
-}
-
-FirstRunHelperImpl::~FirstRunHelperImpl() {
- Shell::GetInstance()->overlay_filter()->Deactivate();
- if (IsTrayBubbleOpened())
- CloseTrayBubble();
- widget_->Close();
-}
-
-views::Widget* FirstRunHelperImpl::GetOverlayWidget() {
- return widget_;
-}
-
-void FirstRunHelperImpl::OpenAppList() {
- if (Shell::GetInstance()->GetAppListTargetVisibility())
- return;
- Shell::GetInstance()->ToggleAppList(NULL);
-}
-
-void FirstRunHelperImpl::CloseAppList() {
- if (!Shell::GetInstance()->GetAppListTargetVisibility())
- return;
- Shell::GetInstance()->ToggleAppList(NULL);
-}
-
-gfx::Rect FirstRunHelperImpl::GetLauncherBounds() {
- ash::Launcher* launcher = ash::Launcher::ForPrimaryDisplay();
- return launcher->GetVisibleItemsBoundsInScreen();
-}
-
-gfx::Rect FirstRunHelperImpl::GetAppListButtonBounds() {
- ash::Launcher* launcher = ash::Launcher::ForPrimaryDisplay();
- views::View* app_button = launcher->GetAppListButtonView();
- return app_button->GetBoundsInScreen();
-}
-
-gfx::Rect FirstRunHelperImpl::GetAppListBounds() {
- app_list::AppListView* view = Shell::GetInstance()->GetAppListView();
- return view->GetBoundsInScreen();
-}
-
-void FirstRunHelperImpl::Cancel() {
- FOR_EACH_OBSERVER(Observer, observers(), OnCancelled());
-}
-
-bool FirstRunHelperImpl::IsCancelingKeyEvent(ui::KeyEvent* event) {
- return event->key_code() == ui::VKEY_ESCAPE;
-}
-
-aura::Window* FirstRunHelperImpl::GetWindow() {
- return widget_->GetNativeWindow();
-}
-
-void FirstRunHelperImpl::OpenTrayBubble() {
- SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray();
- tray->ShowPersistentDefaultView();
-}
-
-void FirstRunHelperImpl::CloseTrayBubble() {
- SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray();
- DCHECK(tray->HasSystemBubble()) << "Tray bubble is closed already.";
- tray->CloseSystemBubble();
-}
-
-bool FirstRunHelperImpl::IsTrayBubbleOpened() {
- SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray();
- return tray->HasSystemBubble();
-}
-
-gfx::Rect FirstRunHelperImpl::GetTrayBubbleBounds() {
- SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray();
- views::View* bubble = tray->GetSystemBubble()->bubble_view();
- return bubble->GetBoundsInScreen();
-}
-
-gfx::Rect FirstRunHelperImpl::GetHelpButtonBounds() {
- SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray();
- views::View* help_button = tray->GetHelpButtonView();
- return help_button->GetBoundsInScreen();
-}
-
-} // namespace ash
-
diff --git a/chromium/ash/first_run/first_run_helper_impl.h b/chromium/ash/first_run/first_run_helper_impl.h
deleted file mode 100644
index e788f6aa675..00000000000
--- a/chromium/ash/first_run/first_run_helper_impl.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_FIRST_RUN_FIRST_RUN_HELPER_IMPL_H_
-#define ASH_FIRST_RUN_FIRST_RUN_HELPER_IMPL_H_
-
-#include "ash/first_run/first_run_helper.h"
-#include "ash/first_run/desktop_cleaner.h"
-#include "ash/wm/overlay_event_filter.h"
-#include "base/compiler_specific.h"
-
-namespace ash {
-
-class Shell;
-
-class FirstRunHelperImpl : public FirstRunHelper,
- public internal::OverlayEventFilter::Delegate {
- public:
- FirstRunHelperImpl();
- virtual ~FirstRunHelperImpl();
-
- // Overriden from FirstRunHelper.
- virtual views::Widget* GetOverlayWidget() OVERRIDE;
- virtual void OpenAppList() OVERRIDE;
- virtual void CloseAppList() OVERRIDE;
- virtual gfx::Rect GetLauncherBounds() OVERRIDE;
- virtual gfx::Rect GetAppListButtonBounds() OVERRIDE;
- virtual gfx::Rect GetAppListBounds() OVERRIDE;
- virtual void OpenTrayBubble() OVERRIDE;
- virtual void CloseTrayBubble() OVERRIDE;
- virtual bool IsTrayBubbleOpened() OVERRIDE;
- virtual gfx::Rect GetTrayBubbleBounds() OVERRIDE;
- virtual gfx::Rect GetHelpButtonBounds() OVERRIDE;
-
- // Overriden from internal::OverlayEventFilter::Delegate.
- virtual void Cancel() OVERRIDE;
- virtual bool IsCancelingKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual aura::Window* GetWindow() OVERRIDE;
-
- private:
- views::Widget* widget_;
- internal::DesktopCleaner cleaner_;
-
- DISALLOW_COPY_AND_ASSIGN(FirstRunHelperImpl);
-};
-
-} // namespace ash
-
-#endif // ASH_FIRST_RUN_FIRST_RUN_HELPER_IMPL_H_
-
diff --git a/chromium/ash/first_run/first_run_helper_unittest.cc b/chromium/ash/first_run/first_run_helper_unittest.cc
deleted file mode 100644
index 4bac72371db..00000000000
--- a/chromium/ash/first_run/first_run_helper_unittest.cc
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/first_run/first_run_helper.h"
-
-#include "ash/first_run/desktop_cleaner.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/events/event_handler.h"
-#include "ui/views/window/dialog_delegate.h"
-
-namespace ash {
-namespace test {
-
-namespace {
-
-class TestModalDialogDelegate : public views::DialogDelegateView {
- public:
- TestModalDialogDelegate() {}
- virtual ~TestModalDialogDelegate() {}
-
- // Overridden from views::WidgetDelegate:
- virtual ui::ModalType GetModalType() const OVERRIDE {
- return ui::MODAL_TYPE_SYSTEM;
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TestModalDialogDelegate);
-};
-
-class CountingEventHandler : public ui::EventHandler {
- public:
- // Handler resets |*mouse_events_registered_| during construction and updates
- // it after each registered event.
- explicit CountingEventHandler(int* mouse_events_registered)
- : mouse_events_registered_(mouse_events_registered) {
- *mouse_events_registered = 0;
- }
-
- virtual ~CountingEventHandler() {}
-
- private:
- // ui::EventHandler overrides.
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
- ++*mouse_events_registered_;
- }
-
- int* mouse_events_registered_;
-
- DISALLOW_COPY_AND_ASSIGN(CountingEventHandler);
-};
-
-} // namespace
-
-class FirstRunHelperTest : public AshTestBase,
- public FirstRunHelper::Observer {
- public:
- FirstRunHelperTest() : cancelled_times_(0) {}
-
- virtual ~FirstRunHelperTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- CheckContainersAreVisible();
- helper_.reset(ash::Shell::GetInstance()->CreateFirstRunHelper());
- helper_->AddObserver(this);
- helper_->GetOverlayWidget()->Show();
- }
-
- virtual void TearDown() OVERRIDE {
- EXPECT_TRUE(helper_.get());
- helper_.reset();
- CheckContainersAreVisible();
- AshTestBase::TearDown();
- }
-
- void CheckContainersAreVisible() const {
- aura::Window* root_window = Shell::GetInstance()->GetPrimaryRootWindow();
- std::vector<int> containers_to_check =
- internal::DesktopCleaner::GetContainersToHideForTest();
- for (size_t i = 0; i < containers_to_check.size(); ++i) {
- aura::Window* container =
- Shell::GetContainer(root_window, containers_to_check[i]);
- EXPECT_TRUE(container->IsVisible());
- }
- }
-
- void CheckContainersAreHidden() const {
- aura::Window* root_window = Shell::GetInstance()->GetPrimaryRootWindow();
- std::vector<int> containers_to_check =
- internal::DesktopCleaner::GetContainersToHideForTest();
- for (size_t i = 0; i < containers_to_check.size(); ++i) {
- aura::Window* container =
- Shell::GetContainer(root_window, containers_to_check[i]);
- EXPECT_TRUE(!container->IsVisible());
- }
- }
-
- FirstRunHelper* helper() { return helper_.get(); }
-
- int cancelled_times() const { return cancelled_times_; }
-
- private:
- // FirstRunHelper::Observer overrides.
- virtual void OnCancelled() OVERRIDE {
- ++cancelled_times_;
- }
-
- scoped_ptr<FirstRunHelper> helper_;
- int cancelled_times_;
-
- DISALLOW_COPY_AND_ASSIGN(FirstRunHelperTest);
-};
-
-// This test creates helper, checks that containers are hidden and then
-// destructs helper.
-TEST_F(FirstRunHelperTest, ContainersAreHidden) {
- CheckContainersAreHidden();
-}
-
-// Tests that helper correctly handles Escape key press.
-TEST_F(FirstRunHelperTest, Cancel) {
- GetEventGenerator().PressKey(ui::VKEY_ESCAPE, 0);
- EXPECT_EQ(cancelled_times(), 1);
-}
-
-// Tests that modal window doesn't block events for overlay window.
-TEST_F(FirstRunHelperTest, ModalWindowDoesNotBlock) {
- views::Widget* modal_dialog = views::DialogDelegate::CreateDialogWidget(
- new TestModalDialogDelegate(), CurrentContext(), NULL);
- modal_dialog->Show();
- // TODO(dzhioev): modal window should not steal focus from overlay window.
- aura::Window* overlay_window = helper()->GetOverlayWidget()->GetNativeView();
- overlay_window->Focus();
- EXPECT_TRUE(overlay_window->HasFocus());
- int mouse_events;
- overlay_window->SetEventFilter(new CountingEventHandler(&mouse_events));
- GetEventGenerator().PressLeftButton();
- GetEventGenerator().ReleaseLeftButton();
- EXPECT_EQ(mouse_events, 2);
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/focus_cycler.cc b/chromium/ash/focus_cycler.cc
deleted file mode 100644
index c83db87b134..00000000000
--- a/chromium/ash/focus_cycler.cc
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/focus_cycler.h"
-
-#include "ash/shell.h"
-#include "ash/wm/mru_window_tracker.h"
-#include "ash/wm/window_cycle_controller.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/window.h"
-#include "ui/views/accessible_pane_view.h"
-#include "ui/views/focus/focus_search.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-
-namespace {
-
-bool HasFocusableWindow() {
- return !MruWindowTracker::BuildWindowList(false).empty();
-}
-
-} // namespace
-
-namespace internal {
-
-FocusCycler::FocusCycler() : widget_activating_(NULL) {
-}
-
-FocusCycler::~FocusCycler() {
-}
-
-void FocusCycler::AddWidget(views::Widget* widget) {
- widgets_.push_back(widget);
-}
-
-void FocusCycler::RotateFocus(Direction direction) {
- aura::Window* window = ash::wm::GetActiveWindow();
- if (window) {
- views::Widget* widget = views::Widget::GetWidgetForNativeWindow(window);
- // First try to rotate focus within the active widget. If that succeeds,
- // we're done.
- if (widget && widget->GetFocusManager()->RotatePaneFocus(
- direction == BACKWARD ?
- views::FocusManager::kBackward : views::FocusManager::kForward,
- views::FocusManager::kNoWrap)) {
- return;
- }
- }
-
- const bool has_window = HasFocusableWindow();
- int index = 0;
- int count = static_cast<int>(widgets_.size());
- int browser_index = has_window ? count : -1;
-
- for (; index < count; ++index) {
- if (widgets_[index]->IsActive())
- break;
- }
-
- int start_index = index;
-
- if (has_window)
- ++count;
-
- for (;;) {
- if (direction == FORWARD)
- index = (index + 1) % count;
- else
- index = ((index - 1) + count) % count;
-
- // Ensure that we don't loop more than once.
- if (index == start_index)
- break;
-
- if (index == browser_index) {
- // Activate the most recently active browser window.
- ash::Shell::GetInstance()->window_cycle_controller()->HandleCycleWindow(
- WindowCycleController::FORWARD, false);
-
- // Rotate pane focus within that window.
- aura::Window* window = ash::wm::GetActiveWindow();
- if (!window)
- break;
- views::Widget* widget = views::Widget::GetWidgetForNativeWindow(window);
- if (!widget)
- break;
- views::FocusManager* focus_manager = widget->GetFocusManager();
- focus_manager->ClearFocus();
- focus_manager->RotatePaneFocus(
- direction == BACKWARD ?
- views::FocusManager::kBackward : views::FocusManager::kForward,
- views::FocusManager::kWrap);
- break;
- } else {
- if (FocusWidget(widgets_[index]))
- break;
- }
- }
-}
-
-bool FocusCycler::FocusWidget(views::Widget* widget) {
- // Note: It is not necessary to set the focus directly to the pane since that
- // will be taken care of by the widget activation.
- widget_activating_ = widget;
- widget->Activate();
- widget_activating_ = NULL;
- return widget->IsActive();
-}
-
-} // namespace internal
-
-} // namespace ash
diff --git a/chromium/ash/focus_cycler.h b/chromium/ash/focus_cycler.h
deleted file mode 100644
index d0071d10788..00000000000
--- a/chromium/ash/focus_cycler.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef FOCUS_CYCLER_H_
-#define FOCUS_CYCLER_H_
-
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-
-namespace views {
-class Widget;
-} // namespace views
-
-namespace ash {
-
-namespace internal {
-
-// This class handles moving focus between a set of widgets and the main browser
-// window.
-class ASH_EXPORT FocusCycler {
- public:
- enum Direction {
- FORWARD,
- BACKWARD
- };
-
- FocusCycler();
- ~FocusCycler();
-
- // Returns the widget the FocusCycler is attempting to activate or NULL if
- // FocusCycler is not activating any widgets.
- const views::Widget* widget_activating() const { return widget_activating_; }
-
- // Add a widget to the focus cycle. The widget needs to have an
- // AccessiblePaneView as the content view.
- void AddWidget(views::Widget* widget);
-
- // Move focus to the next widget.
- void RotateFocus(Direction direction);
-
- // Moves focus the specified widget. Returns true if the widget was activated.
- bool FocusWidget(views::Widget* widget);
-
- private:
- std::vector<views::Widget*> widgets_;
-
- // See description above getter.
- views::Widget* widget_activating_;
-
- DISALLOW_COPY_AND_ASSIGN(FocusCycler);
-};
-
-} // namespace internal
-
-} // namespace ash
-
-#endif // FOCUS_CYCLER_H_
diff --git a/chromium/ash/focus_cycler_unittest.cc b/chromium/ash/focus_cycler_unittest.cc
deleted file mode 100644
index ed5340e2510..00000000000
--- a/chromium/ash/focus_cycler_unittest.cc
+++ /dev/null
@@ -1,402 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/focus_cycler.h"
-
-#include "ash/launcher/launcher.h"
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/system/status_area_widget_delegate.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/wm/window_util.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/shell_factory.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/views/accessible_pane_view.h"
-#include "ui/views/controls/button/menu_button.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace test {
-
-using aura::Window;
-using internal::FocusCycler;
-
-namespace {
-
-internal::StatusAreaWidgetDelegate* GetStatusAreaWidgetDelegate(
- views::Widget* widget) {
- return static_cast<internal::StatusAreaWidgetDelegate*>(
- widget->GetContentsView());
-}
-
-class PanedWidgetDelegate : public views::WidgetDelegate {
- public:
- PanedWidgetDelegate(views::Widget* widget) : widget_(widget) {}
-
- void SetAccessiblePanes(const std::vector<views::View*>& panes) {
- accessible_panes_ = panes;
- }
-
- // views::WidgetDelegate.
- virtual void GetAccessiblePanes(std::vector<views::View*>* panes) OVERRIDE {
- std::copy(accessible_panes_.begin(),
- accessible_panes_.end(),
- std::back_inserter(*panes));
- }
- virtual views::Widget* GetWidget() OVERRIDE {
- return widget_;
- };
- virtual const views::Widget* GetWidget() const OVERRIDE {
- return widget_;
- }
-
- private:
- views::Widget* widget_;
- std::vector<views::View*> accessible_panes_;
-};
-
-} // namespace
-
-class FocusCyclerTest : public AshTestBase {
- public:
- FocusCyclerTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
-
- focus_cycler_.reset(new FocusCycler());
-
- ASSERT_TRUE(Launcher::ForPrimaryDisplay());
- }
-
- virtual void TearDown() OVERRIDE {
- if (tray_) {
- GetStatusAreaWidgetDelegate(tray_->GetWidget())->
- SetFocusCyclerForTesting(NULL);
- tray_.reset();
- }
-
- shelf_widget()->SetFocusCycler(NULL);
-
- focus_cycler_.reset();
-
- AshTestBase::TearDown();
- }
-
- protected:
- // Creates the system tray, returning true on success.
- bool CreateTray() {
- if (tray_)
- return false;
- aura::Window* parent = Shell::GetPrimaryRootWindowController()->
- GetContainer(ash::internal::kShellWindowId_StatusContainer);
-
- internal::StatusAreaWidget* widget = new internal::StatusAreaWidget(parent);
- widget->CreateTrayViews();
- widget->Show();
- tray_.reset(widget->system_tray());
- if (!tray_->GetWidget())
- return false;
- focus_cycler_->AddWidget(tray()->GetWidget());
- GetStatusAreaWidgetDelegate(tray_->GetWidget())->SetFocusCyclerForTesting(
- focus_cycler());
- return true;
- }
-
- FocusCycler* focus_cycler() { return focus_cycler_.get(); }
-
- SystemTray* tray() { return tray_.get(); }
-
- ShelfWidget* shelf_widget() {
- return Launcher::ForPrimaryDisplay()->shelf_widget();
- }
-
- void InstallFocusCycleOnShelf() {
- // Add the shelf.
- shelf_widget()->SetFocusCycler(focus_cycler());
- }
-
- private:
- scoped_ptr<FocusCycler> focus_cycler_;
- scoped_ptr<SystemTray> tray_;
-
- DISALLOW_COPY_AND_ASSIGN(FocusCyclerTest);
-};
-
-TEST_F(FocusCyclerTest, CycleFocusBrowserOnly) {
- // Create a single test window.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
- wm::ActivateWindow(window0.get());
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- // Cycle the window
- focus_cycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-}
-
-TEST_F(FocusCyclerTest, CycleFocusForward) {
- ASSERT_TRUE(CreateTray());
-
- InstallFocusCycleOnShelf();
-
- // Create a single test window.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
- wm::ActivateWindow(window0.get());
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- // Cycle focus to the status area.
- focus_cycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_TRUE(tray()->GetWidget()->IsActive());
-
- // Cycle focus to the shelf.
- focus_cycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_TRUE(shelf_widget()->IsActive());
-
- // Cycle focus to the browser.
- focus_cycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-}
-
-TEST_F(FocusCyclerTest, CycleFocusBackward) {
- ASSERT_TRUE(CreateTray());
-
- InstallFocusCycleOnShelf();
-
- // Create a single test window.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
- wm::ActivateWindow(window0.get());
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- // Cycle focus to the shelf.
- focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
- EXPECT_TRUE(shelf_widget()->IsActive());
-
- // Cycle focus to the status area.
- focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
- EXPECT_TRUE(tray()->GetWidget()->IsActive());
-
- // Cycle focus to the browser.
- focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-}
-
-TEST_F(FocusCyclerTest, CycleFocusForwardBackward) {
- ASSERT_TRUE(CreateTray());
-
- InstallFocusCycleOnShelf();
-
- // Create a single test window.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
- wm::ActivateWindow(window0.get());
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- // Cycle focus to the shelf.
- focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
- EXPECT_TRUE(shelf_widget()->IsActive());
-
- // Cycle focus to the status area.
- focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
- EXPECT_TRUE(tray()->GetWidget()->IsActive());
-
- // Cycle focus to the browser.
- focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- // Cycle focus to the status area.
- focus_cycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_TRUE(tray()->GetWidget()->IsActive());
-
- // Cycle focus to the shelf.
- focus_cycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_TRUE(shelf_widget()->IsActive());
-
- // Cycle focus to the browser.
- focus_cycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-}
-
-TEST_F(FocusCyclerTest, CycleFocusNoBrowser) {
- ASSERT_TRUE(CreateTray());
-
- InstallFocusCycleOnShelf();
-
- // Add the shelf and focus it.
- focus_cycler()->FocusWidget(shelf_widget());
-
- // Cycle focus to the status area.
- focus_cycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_TRUE(tray()->GetWidget()->IsActive());
-
- // Cycle focus to the shelf.
- focus_cycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_TRUE(shelf_widget()->IsActive());
-
- // Cycle focus to the status area.
- focus_cycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_TRUE(tray()->GetWidget()->IsActive());
-
- // Cycle focus to the shelf.
- focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
- EXPECT_TRUE(shelf_widget()->IsActive());
-
- // Cycle focus to the status area.
- focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
- EXPECT_TRUE(tray()->GetWidget()->IsActive());
-}
-
-TEST_F(FocusCyclerTest, Shelf_CycleFocusForward) {
- ASSERT_TRUE(CreateTray());
- InstallFocusCycleOnShelf();
- shelf_widget()->Hide();
-
- // Create a single test window.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
- wm::ActivateWindow(window0.get());
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- // Cycle focus to the status area.
- focus_cycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_TRUE(tray()->GetWidget()->IsActive());
-
- // Cycle focus to the browser.
- focus_cycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-}
-
-TEST_F(FocusCyclerTest, Shelf_CycleFocusBackwardInvisible) {
- ASSERT_TRUE(CreateTray());
- InstallFocusCycleOnShelf();
- shelf_widget()->Hide();
-
- // Create a single test window.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
- wm::ActivateWindow(window0.get());
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- // Cycle focus to the status area.
- focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
- EXPECT_TRUE(tray()->GetWidget()->IsActive());
-
- // Cycle focus to the browser.
- focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-}
-
-TEST_F(FocusCyclerTest, CycleFocusThroughWindowWithPanes) {
- ASSERT_TRUE(CreateTray());
-
- InstallFocusCycleOnShelf();
-
- scoped_ptr<PanedWidgetDelegate> test_widget_delegate;
- scoped_ptr<views::Widget> browser_widget(new views::Widget);
- test_widget_delegate.reset(new PanedWidgetDelegate(browser_widget.get()));
- views::Widget::InitParams widget_params(
- views::Widget::InitParams::TYPE_WINDOW);
- widget_params.context = CurrentContext();
- widget_params.delegate = test_widget_delegate.get();
- widget_params.ownership =
- views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- browser_widget->Init(widget_params);
- browser_widget->Show();
-
- aura::Window* browser_window = browser_widget->GetNativeView();
-
- views::View* root_view = browser_widget->GetRootView();
-
- views::AccessiblePaneView* pane1 = new views::AccessiblePaneView();
- root_view->AddChildView(pane1);
-
- views::View* view1 = new views::View;
- view1->SetFocusable(true);
- pane1->AddChildView(view1);
-
- views::View* view2 = new views::View;
- view2->SetFocusable(true);
- pane1->AddChildView(view2);
-
- views::AccessiblePaneView* pane2 = new views::AccessiblePaneView();
- root_view->AddChildView(pane2);
-
- views::View* view3 = new views::View;
- view3->SetFocusable(true);
- pane2->AddChildView(view3);
-
- views::View* view4 = new views::View;
- view4->SetFocusable(true);
- pane2->AddChildView(view4);
-
- std::vector<views::View*> panes;
- panes.push_back(pane1);
- panes.push_back(pane2);
-
- test_widget_delegate->SetAccessiblePanes(panes);
-
- views::FocusManager* focus_manager = browser_widget->GetFocusManager();
-
- // Cycle focus to the status area.
- focus_cycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_TRUE(tray()->GetWidget()->IsActive());
-
- // Cycle focus to the shelf.
- focus_cycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_TRUE(shelf_widget()->IsActive());
-
- // Cycle focus to the first pane in the browser.
- focus_cycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_TRUE(wm::IsActiveWindow(browser_window));
- EXPECT_EQ(focus_manager->GetFocusedView(), view1);
-
- // Cycle focus to the second pane in the browser.
- focus_cycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_TRUE(wm::IsActiveWindow(browser_window));
- EXPECT_EQ(focus_manager->GetFocusedView(), view3);
-
- // Cycle focus back to the status area.
- focus_cycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_TRUE(tray()->GetWidget()->IsActive());
-
- // Reverse direction - back to the second pane in the browser.
- focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
- EXPECT_TRUE(wm::IsActiveWindow(browser_window));
- EXPECT_EQ(focus_manager->GetFocusedView(), view3);
-
- // Back to the first pane in the browser.
- focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
- EXPECT_TRUE(wm::IsActiveWindow(browser_window));
- EXPECT_EQ(focus_manager->GetFocusedView(), view1);
-
- // Back to the shelf.
- focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
- EXPECT_TRUE(shelf_widget()->IsActive());
-
- // Back to the status area.
- focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
- EXPECT_TRUE(tray()->GetWidget()->IsActive());
-
- // Pressing "Escape" while on the status area should
- // deactivate it, and activate the browser window.
- aura::Window* root = Shell::GetPrimaryRootWindow();
- aura::test::EventGenerator event_generator(root, root);
- event_generator.PressKey(ui::VKEY_ESCAPE, 0);
- EXPECT_TRUE(wm::IsActiveWindow(browser_window));
- EXPECT_EQ(focus_manager->GetFocusedView(), view1);
-
- // Similarly, pressing "Escape" while on the shelf.
- // should do the same thing.
- focus_cycler()->RotateFocus(FocusCycler::BACKWARD);
- EXPECT_TRUE(shelf_widget()->IsActive());
- event_generator.PressKey(ui::VKEY_ESCAPE, 0);
- EXPECT_TRUE(wm::IsActiveWindow(browser_window));
- EXPECT_EQ(focus_manager->GetFocusedView(), view1);
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/high_contrast/high_contrast_controller.cc b/chromium/ash/high_contrast/high_contrast_controller.cc
deleted file mode 100644
index 487c41bf47c..00000000000
--- a/chromium/ash/high_contrast/high_contrast_controller.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/high_contrast/high_contrast_controller.h"
-
-#include "ash/shell.h"
-#include "ui/aura/root_window.h"
-#include "ui/compositor/layer.h"
-
-namespace ash {
-
-HighContrastController::HighContrastController()
- : enabled_(false) {
-}
-
-void HighContrastController::SetEnabled(bool enabled) {
- enabled_ = enabled;
-
- // Update all active displays.
- aura::Window::Windows root_window_list = Shell::GetAllRootWindows();
- for (aura::Window::Windows::iterator it = root_window_list.begin();
- it != root_window_list.end(); it++) {
- UpdateDisplay(*it);
- }
-}
-
-void HighContrastController::OnRootWindowAdded(aura::Window* root_window) {
- UpdateDisplay(root_window);
-}
-
-void HighContrastController::UpdateDisplay(aura::Window* root_window) {
- root_window->layer()->SetLayerInverted(enabled_);
-}
-
-} // namespace ash
diff --git a/chromium/ash/high_contrast/high_contrast_controller.h b/chromium/ash/high_contrast/high_contrast_controller.h
deleted file mode 100644
index 49aca611791..00000000000
--- a/chromium/ash/high_contrast/high_contrast_controller.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_HIGH_CONTRAST_HIGH_CONTRAST_CONTROLLER_H_
-#define ASH_HIGH_CONTRAST_HIGH_CONTRAST_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-
-namespace aura {
-class RootWindow;
-class Window;
-}
-
-namespace ash {
-
-class ASH_EXPORT HighContrastController {
- public:
- HighContrastController();
-
- ~HighContrastController() {}
-
- // Set high contrast mode and update all available displays.
- void SetEnabled(bool enabled);
-
- // Update high contrast mode on the just added display.
- void OnRootWindowAdded(aura::Window* root_window);
-
- private:
- // Update high contrast mode on the passed display.
- void UpdateDisplay(aura::Window* root_window);
-
- // Indicates if the high contrast mode is enabled or disabled.
- bool enabled_;
-
- DISALLOW_COPY_AND_ASSIGN(HighContrastController);
-};
-
-} // namespace ash
-
-#endif // ASH_HIGH_CONTRAST_HIGH_CONTRAST_CONTROLLER_H_
diff --git a/chromium/ash/host/root_window_host_factory.cc b/chromium/ash/host/root_window_host_factory.cc
deleted file mode 100644
index 1f4cb3dfb04..00000000000
--- a/chromium/ash/host/root_window_host_factory.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/host/root_window_host_factory.h"
-
-#include "ui/aura/window_tree_host.h"
-
-namespace {
-
-class RootWindowHostFactoryImpl : public ash::RootWindowHostFactory {
- public:
- RootWindowHostFactoryImpl() {}
-
- // Overridden from RootWindowHostFactory:
- virtual aura::RootWindowHost* CreateRootWindowHost(
- const gfx::Rect& initial_bounds) OVERRIDE {
- return aura::RootWindowHost::Create(initial_bounds);
- }
-};
-
-}
-
-namespace ash {
-
-// static
-RootWindowHostFactory* RootWindowHostFactory::Create() {
- return new RootWindowHostFactoryImpl;
-}
-
-} // namespace ash
diff --git a/chromium/ash/host/root_window_host_factory.h b/chromium/ash/host/root_window_host_factory.h
deleted file mode 100644
index d357d9b2cb3..00000000000
--- a/chromium/ash/host/root_window_host_factory.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_HOST_ROOT_WINDOW_HOST_FACTORY_H_
-#define ASH_HOST_ROOT_WINDOW_HOST_FACTORY_H_
-
-#include "ash/ash_export.h"
-#include "ui/gfx/rect.h"
-
-namespace aura {
-class RootWindowHost;
-}
-
-namespace ash {
-
-class ASH_EXPORT RootWindowHostFactory {
- public:
- virtual ~RootWindowHostFactory() {}
-
- static RootWindowHostFactory* Create();
-
- // Creates a new aura::RootWindowHost. The caller owns the returned value.
- virtual aura::RootWindowHost* CreateRootWindowHost(
- const gfx::Rect& initial_bounds) = 0;
-
- protected:
- RootWindowHostFactory() {}
-};
-
-} // namespace ash
-
-#endif // ASH_HOST_ROOT_WINDOW_HOST_FACTORY_H_
diff --git a/chromium/ash/host/root_window_host_factory_win.cc b/chromium/ash/host/root_window_host_factory_win.cc
deleted file mode 100644
index 3255f644d31..00000000000
--- a/chromium/ash/host/root_window_host_factory_win.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/host/root_window_host_factory.h"
-
-#include "ash/ash_switches.h"
-#include "base/command_line.h"
-#include "base/win/windows_version.h"
-#include "ui/aura/remote_root_window_host_win.h"
-#include "ui/aura/window_tree_host.h"
-
-namespace {
-
-class RootWindowHostFactoryImpl : public ash::RootWindowHostFactory {
- public:
- RootWindowHostFactoryImpl() {}
-
- // Overridden from RootWindowHostFactory:
- virtual aura::RootWindowHost* CreateRootWindowHost(
- const gfx::Rect& initial_bounds) OVERRIDE {
- if (base::win::GetVersion() >= base::win::VERSION_WIN8 &&
- !CommandLine::ForCurrentProcess()->HasSwitch(
- ash::switches::kForceAshToDesktop))
- return aura::RemoteRootWindowHostWin::Create(initial_bounds);
-
- return aura::RootWindowHost::Create(initial_bounds);
- }
-};
-
-}
-
-namespace ash {
-
-// static
-RootWindowHostFactory* RootWindowHostFactory::Create() {
- return new RootWindowHostFactoryImpl;
-}
-
-} // namespace ash
diff --git a/chromium/ash/ime_control_delegate.h b/chromium/ash/ime_control_delegate.h
deleted file mode 100644
index 6aa560902d8..00000000000
--- a/chromium/ash/ime_control_delegate.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_IME_CONTROL_DELEGATE_H_
-#define ASH_IME_CONTROL_DELEGATE_H_
-
-namespace ui {
-class Accelerator;
-} // namespace ui
-
-namespace ash {
-
-// Delegate for controlling IME (input method editor).
-class ImeControlDelegate {
- public:
- virtual ~ImeControlDelegate() {}
-
- virtual bool HandleNextIme() = 0;
- virtual bool HandlePreviousIme(const ui::Accelerator& accelerator) = 0;
- // Switches to another IME depending on the |accelerator|.
- virtual bool HandleSwitchIme(const ui::Accelerator& accelerator) = 0;
-
- // Checks for special language anomalies and re-map the |accelerator|
- // accordingly.
- virtual ui::Accelerator RemapAccelerator(
- const ui::Accelerator& accelerator) = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_IME_CONTROL_DELEGATE_H_
diff --git a/chromium/ash/keyboard_overlay/keyboard_overlay_delegate.cc b/chromium/ash/keyboard_overlay/keyboard_overlay_delegate.cc
deleted file mode 100644
index 5f0da86d50d..00000000000
--- a/chromium/ash/keyboard_overlay/keyboard_overlay_delegate.cc
+++ /dev/null
@@ -1,149 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/keyboard_overlay/keyboard_overlay_delegate.h"
-
-#include <algorithm>
-
-#include "ash/shell.h"
-#include "base/bind.h"
-#include "base/memory/weak_ptr.h"
-#include "base/strings/utf_string_conversions.h"
-#include "base/values.h"
-#include "content/public/browser/web_ui.h"
-#include "content/public/browser/web_ui_message_handler.h"
-#include "ui/aura/root_window.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/controls/webview/web_dialog_view.h"
-#include "ui/views/widget/widget.h"
-
-using content::WebContents;
-using content::WebUIMessageHandler;
-
-namespace {
-
-const int kBaseWidth = 1252;
-const int kBaseHeight = 516;
-const int kHorizontalMargin = 28;
-
-// A message handler for detecting the timing when the web contents is painted.
-class PaintMessageHandler
- : public WebUIMessageHandler,
- public base::SupportsWeakPtr<PaintMessageHandler> {
- public:
- explicit PaintMessageHandler(views::Widget* widget) : widget_(widget) {}
- virtual ~PaintMessageHandler() {}
-
- // WebUIMessageHandler implementation.
- virtual void RegisterMessages() OVERRIDE;
-
- private:
- void DidPaint(const ListValue* args);
-
- views::Widget* widget_;
-
- DISALLOW_COPY_AND_ASSIGN(PaintMessageHandler);
-};
-
-void PaintMessageHandler::RegisterMessages() {
- web_ui()->RegisterMessageCallback(
- "didPaint",
- base::Bind(&PaintMessageHandler::DidPaint, base::Unretained(this)));
-}
-
-void PaintMessageHandler::DidPaint(const ListValue* args) {
- // Show the widget after the web content has been painted.
- widget_->Show();
-}
-
-} // namespace
-
-namespace ash {
-
-KeyboardOverlayDelegate::KeyboardOverlayDelegate(const base::string16& title,
- const GURL& url)
- : title_(title),
- url_(url),
- widget_(NULL) {
-}
-
-KeyboardOverlayDelegate::~KeyboardOverlayDelegate() {
-}
-
-views::Widget* KeyboardOverlayDelegate::Show(views::WebDialogView* view) {
- widget_ = new views::Widget;
- views::Widget::InitParams params(
- views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- params.context = Shell::GetPrimaryRootWindow();
- params.delegate = view;
- widget_->Init(params);
-
- // Show the widget at the bottom of the work area.
- gfx::Size size;
- GetDialogSize(&size);
- const gfx::Rect& rect = Shell::GetScreen()->GetDisplayNearestWindow(
- widget_->GetNativeView()).work_area();
- gfx::Rect bounds(rect.x() + (rect.width() - size.width()) / 2,
- rect.bottom() - size.height(),
- size.width(),
- size.height());
- widget_->SetBounds(bounds);
-
- // The widget will be shown when the web contents gets ready to display.
- return widget_;
-}
-
-ui::ModalType KeyboardOverlayDelegate::GetDialogModalType() const {
- return ui::MODAL_TYPE_SYSTEM;
-}
-
-base::string16 KeyboardOverlayDelegate::GetDialogTitle() const {
- return title_;
-}
-
-GURL KeyboardOverlayDelegate::GetDialogContentURL() const {
- return url_;
-}
-
-void KeyboardOverlayDelegate::GetWebUIMessageHandlers(
- std::vector<WebUIMessageHandler*>* handlers) const {
- handlers->push_back(new PaintMessageHandler(widget_));
-}
-
-void KeyboardOverlayDelegate::GetDialogSize(
- gfx::Size* size) const {
- using std::min;
- DCHECK(widget_);
- gfx::Rect rect = ash::Shell::GetScreen()->GetDisplayNearestWindow(
- widget_->GetNativeView()).work_area();
- const int width = min(kBaseWidth, rect.width() - kHorizontalMargin);
- const int height = width * kBaseHeight / kBaseWidth;
- size->SetSize(width, height);
-}
-
-std::string KeyboardOverlayDelegate::GetDialogArgs() const {
- return "[]";
-}
-
-void KeyboardOverlayDelegate::OnDialogClosed(
- const std::string& json_retval) {
- delete this;
- return;
-}
-
-void KeyboardOverlayDelegate::OnCloseContents(WebContents* source,
- bool* out_close_dialog) {
-}
-
-bool KeyboardOverlayDelegate::ShouldShowDialogTitle() const {
- return false;
-}
-
-bool KeyboardOverlayDelegate::HandleContextMenu(
- const content::ContextMenuParams& params) {
- return true;
-}
-
-} // namespace ash
diff --git a/chromium/ash/keyboard_overlay/keyboard_overlay_delegate.h b/chromium/ash/keyboard_overlay/keyboard_overlay_delegate.h
deleted file mode 100644
index caf8f2a9cc4..00000000000
--- a/chromium/ash/keyboard_overlay/keyboard_overlay_delegate.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_DELEGATE_H_
-#define ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_DELEGATE_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/gtest_prod_util.h"
-#include "ui/web_dialogs/web_dialog_delegate.h"
-#include "url/gurl.h"
-
-namespace views {
-class WebDialogView;
-class Widget;
-}
-
-namespace ash {
-
-// Delegate to handle showing the keyboard overlay drawing. Exported for test.
-class ASH_EXPORT KeyboardOverlayDelegate : public ui::WebDialogDelegate {
- public:
- KeyboardOverlayDelegate(const base::string16& title, const GURL& url);
-
- // Shows the keyboard overlay widget. Returns the widget for testing.
- views::Widget* Show(views::WebDialogView* view);
-
- // Overridden from ui::WebDialogDelegate:
- virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
-
- private:
- FRIEND_TEST_ALL_PREFIXES(KeyboardOverlayDelegateTest, ShowAndClose);
-
- virtual ~KeyboardOverlayDelegate();
-
- // Overridden from ui::WebDialogDelegate:
- virtual ui::ModalType GetDialogModalType() const OVERRIDE;
- virtual base::string16 GetDialogTitle() const OVERRIDE;
- virtual GURL GetDialogContentURL() const OVERRIDE;
- virtual void GetWebUIMessageHandlers(
- std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE;
- virtual std::string GetDialogArgs() const OVERRIDE;
- virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
- virtual void OnCloseContents(content::WebContents* source,
- bool* out_close_dialog) OVERRIDE;
- virtual bool ShouldShowDialogTitle() const OVERRIDE;
- virtual bool HandleContextMenu(
- const content::ContextMenuParams& params) OVERRIDE;
-
- // The dialog title.
- base::string16 title_;
-
- // The URL of the keyboard overlay.
- GURL url_;
-
- // The widget associated with this delegate. Not owned.
- views::Widget* widget_;
-
- DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayDelegate);
-};
-
-} // namespace ash
-
-#endif // ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_DELEGATE_H_
diff --git a/chromium/ash/keyboard_overlay/keyboard_overlay_delegate_unittest.cc b/chromium/ash/keyboard_overlay/keyboard_overlay_delegate_unittest.cc
deleted file mode 100644
index 95c048de7ac..00000000000
--- a/chromium/ash/keyboard_overlay/keyboard_overlay_delegate_unittest.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/keyboard_overlay/keyboard_overlay_delegate.h"
-
-#include "ash/shelf/shelf_types.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "base/strings/utf_string_conversions.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-
-class KeyboardOverlayDelegateTest
- : public test::AshTestBase,
- public testing::WithParamInterface<ShelfAlignment> {
- public:
- KeyboardOverlayDelegateTest() : shelf_alignment_(GetParam()) {}
- virtual ~KeyboardOverlayDelegateTest() {}
- ShelfAlignment shelf_alignment() const { return shelf_alignment_; }
-
- private:
- ShelfAlignment shelf_alignment_;
-
- DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayDelegateTest);
-};
-
-// Verifies we can show and close the widget for the overlay dialog.
-TEST_P(KeyboardOverlayDelegateTest, ShowAndClose) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("500x400,300x200");
- ash::Shell* shell = ash::Shell::GetInstance();
- shell->SetShelfAlignment(shelf_alignment(), shell->GetPrimaryRootWindow());
- KeyboardOverlayDelegate delegate(ASCIIToUTF16("Title"),
- GURL("chrome://keyboardoverlay/"));
- // Showing the dialog creates a widget.
- views::Widget* widget = delegate.Show(NULL);
- EXPECT_TRUE(widget);
-
- // The widget is on the primary root window.
- EXPECT_EQ(Shell::GetPrimaryRootWindow(),
- widget->GetNativeWindow()->GetRootWindow());
-
- // The widget is horizontally centered at the bottom of the work area.
- gfx::Rect work_area = Shell::GetScreen()->GetPrimaryDisplay().work_area();
- gfx::Rect bounds = widget->GetRestoredBounds();
- EXPECT_EQ(work_area.CenterPoint().x(), bounds.CenterPoint().x());
- EXPECT_EQ(work_area.bottom(), bounds.bottom());
-
- // Clean up.
- widget->CloseNow();
-}
-
-// Tests run three times - for all possible values of shelf alignment
-INSTANTIATE_TEST_CASE_P(ShelfAlignmentAny,
- KeyboardOverlayDelegateTest,
- testing::Values(SHELF_ALIGNMENT_BOTTOM,
- SHELF_ALIGNMENT_LEFT,
- SHELF_ALIGNMENT_RIGHT,
- SHELF_ALIGNMENT_TOP));
-
-} // namespace ash
diff --git a/chromium/ash/keyboard_overlay/keyboard_overlay_view.cc b/chromium/ash/keyboard_overlay/keyboard_overlay_view.cc
deleted file mode 100644
index 2847653ca57..00000000000
--- a/chromium/ash/keyboard_overlay/keyboard_overlay_view.cc
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/keyboard_overlay/keyboard_overlay_view.h"
-
-#include "ash/keyboard_overlay/keyboard_overlay_delegate.h"
-#include "ash/shell.h"
-#include "base/strings/utf_string_conversions.h"
-#include "content/public/browser/browser_context.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/events/event.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/widget/widget.h"
-#include "ui/web_dialogs/web_dialog_delegate.h"
-
-using ui::WebDialogDelegate;
-
-namespace {
-
-// Keys to invoke Cancel (Escape, Ctrl+Alt+/, or Shift+Ctrl+Alt+/, Help, F14).
-const ash::KeyboardOverlayView::KeyEventData kCancelKeys[] = {
- { ui::VKEY_ESCAPE, ui::EF_NONE},
- { ui::VKEY_OEM_2, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN },
- { ui::VKEY_OEM_2, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN },
- { ui::VKEY_HELP, ui::EF_NONE },
- { ui::VKEY_F14, ui::EF_NONE },
-};
-
-}
-
-namespace ash {
-
-KeyboardOverlayView::KeyboardOverlayView(
- content::BrowserContext* context,
- WebDialogDelegate* delegate,
- WebContentsHandler* handler)
- : views::WebDialogView(context, delegate, handler) {
-}
-
-KeyboardOverlayView::~KeyboardOverlayView() {
-}
-
-void KeyboardOverlayView::Cancel() {
- Shell::GetInstance()->overlay_filter()->Deactivate();
- views::Widget* widget = GetWidget();
- if (widget)
- widget->Close();
-}
-
-bool KeyboardOverlayView::IsCancelingKeyEvent(ui::KeyEvent* event) {
- if (event->type() != ui::ET_KEY_PRESSED)
- return false;
- // Ignore the caps lock state.
- const int flags = (event->flags() & ~ui::EF_CAPS_LOCK_DOWN);
- for (size_t i = 0; i < arraysize(kCancelKeys); ++i) {
- if ((kCancelKeys[i].key_code == event->key_code()) &&
- (kCancelKeys[i].flags == flags))
- return true;
- }
- return false;
-}
-
-aura::Window* KeyboardOverlayView::GetWindow() {
- return GetWidget()->GetNativeWindow();
-}
-
-void KeyboardOverlayView::ShowDialog(
- content::BrowserContext* context,
- WebContentsHandler* handler,
- const GURL& url) {
- KeyboardOverlayDelegate* delegate = new KeyboardOverlayDelegate(
- l10n_util::GetStringUTF16(IDS_ASH_KEYBOARD_OVERLAY_TITLE), url);
- KeyboardOverlayView* view =
- new KeyboardOverlayView(context, delegate, handler);
- delegate->Show(view);
-
- Shell::GetInstance()->overlay_filter()->Activate(view);
-}
-
-void KeyboardOverlayView::WindowClosing() {
- Cancel();
-}
-
-// static
-void KeyboardOverlayView::GetCancelingKeysForTesting(
- std::vector<KeyboardOverlayView::KeyEventData>* canceling_keys) {
- CHECK(canceling_keys);
- canceling_keys->clear();
- for (size_t i = 0; i < arraysize(kCancelKeys); ++i)
- canceling_keys->push_back(kCancelKeys[i]);
-}
-
-} // namespace ash
diff --git a/chromium/ash/keyboard_overlay/keyboard_overlay_view.h b/chromium/ash/keyboard_overlay/keyboard_overlay_view.h
deleted file mode 100644
index 3e352ae3169..00000000000
--- a/chromium/ash/keyboard_overlay/keyboard_overlay_view.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_VIEW_H_
-#define ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_VIEW_H_
-
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "ash/wm/overlay_event_filter.h"
-#include "base/compiler_specific.h"
-#include "base/gtest_prod_util.h"
-#include "ui/views/controls/webview/web_dialog_view.h"
-
-class GURL;
-
-namespace content {
-class BrowserContext;
-}
-
-namespace ui {
-class WebDialogDelegate;
-}
-
-namespace ash {
-
-// A customized dialog view for the keyboard overlay.
-class ASH_EXPORT KeyboardOverlayView
- : public views::WebDialogView,
- public ash::internal::OverlayEventFilter::Delegate {
- public:
- struct KeyEventData {
- ui::KeyboardCode key_code;
- int flags;
- };
-
- KeyboardOverlayView(content::BrowserContext* context,
- ui::WebDialogDelegate* delegate,
- WebContentsHandler* handler);
- virtual ~KeyboardOverlayView();
-
- // Overridden from ash::internal::OverlayEventFilter::Delegate:
- virtual void Cancel() OVERRIDE;
- virtual bool IsCancelingKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual aura::Window* GetWindow() OVERRIDE;
-
- // Shows the keyboard overlay.
- static void ShowDialog(content::BrowserContext* context,
- WebContentsHandler* handler,
- const GURL& url);
-
- private:
- FRIEND_TEST_ALL_PREFIXES(KeyboardOverlayViewTest, OpenAcceleratorsClose);
- FRIEND_TEST_ALL_PREFIXES(KeyboardOverlayViewTest, NoRedundantCancelingKeys);
-
- // Overridden from views::WidgetDelegate:
- virtual void WindowClosing() OVERRIDE;
-
- static void GetCancelingKeysForTesting(
- std::vector<KeyEventData>* canceling_keys);
-
- DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayView);
-};
-
-} // namespace ash
-
-#endif // ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_VIEW_H_
diff --git a/chromium/ash/keyboard_overlay/keyboard_overlay_view_unittest.cc b/chromium/ash/keyboard_overlay/keyboard_overlay_view_unittest.cc
deleted file mode 100644
index 8875f0ee75e..00000000000
--- a/chromium/ash/keyboard_overlay/keyboard_overlay_view_unittest.cc
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/keyboard_overlay/keyboard_overlay_view.h"
-
-#include <algorithm>
-
-#include "ash/accelerators/accelerator_table.h"
-#include "ash/keyboard_overlay/keyboard_overlay_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "ash/test/ash_test_base.h"
-#include "ui/web_dialogs/test/test_web_contents_handler.h"
-#include "ui/web_dialogs/test/test_web_dialog_delegate.h"
-
-namespace ash {
-
-typedef test::AshTestBase KeyboardOverlayViewTest;
-
-bool operator==(const KeyboardOverlayView::KeyEventData& lhs,
- const KeyboardOverlayView::KeyEventData& rhs) {
- return (lhs.key_code == rhs.key_code) && (lhs.flags == rhs.flags);
-}
-
-// Verifies that the accelerators that open the keyboard overlay close it.
-TEST_F(KeyboardOverlayViewTest, OpenAcceleratorsClose) {
- ui::test::TestWebDialogDelegate delegate(GURL("chrome://keyboardoverlay"));
- KeyboardOverlayView view(
- Shell::GetInstance()->delegate()->GetActiveBrowserContext(),
- &delegate,
- new ui::test::TestWebContentsHandler);
- for (size_t i = 0; i < kAcceleratorDataLength; ++i) {
- if (kAcceleratorData[i].action != SHOW_KEYBOARD_OVERLAY)
- continue;
- const AcceleratorData& open_key_data = kAcceleratorData[i];
- ui::KeyEvent open_key(open_key_data.trigger_on_press ?
- ui::ET_KEY_PRESSED : ui::ET_KEY_RELEASED,
- open_key_data.keycode,
- open_key_data.modifiers,
- false);
- EXPECT_TRUE(view.IsCancelingKeyEvent(&open_key));
- }
-}
-
-// Verifies that there are no redunduant keys in the canceling keys.
-TEST_F(KeyboardOverlayViewTest, NoRedundantCancelingKeys) {
- std::vector<KeyboardOverlayView::KeyEventData> open_keys;
- for (size_t i = 0; i < kAcceleratorDataLength; ++i) {
- if (kAcceleratorData[i].action != SHOW_KEYBOARD_OVERLAY)
- continue;
- // Escape is used just for canceling.
- KeyboardOverlayView::KeyEventData open_key = {
- kAcceleratorData[i].keycode,
- kAcceleratorData[i].modifiers,
- };
- open_keys.push_back(open_key);
- }
-
- std::vector<KeyboardOverlayView::KeyEventData> canceling_keys;
- KeyboardOverlayView::GetCancelingKeysForTesting(&canceling_keys);
-
- // Escape is used just for canceling, so exclude it from the comparison with
- // open keys.
- KeyboardOverlayView::KeyEventData escape = { ui::VKEY_ESCAPE, ui::EF_NONE };
- std::vector<KeyboardOverlayView::KeyEventData>::iterator escape_itr =
- std::find(canceling_keys.begin(), canceling_keys.end(), escape);
- canceling_keys.erase(escape_itr);
-
- // Other canceling keys should be same as opening keys.
- EXPECT_EQ(open_keys.size(), canceling_keys.size());
- for (size_t i = 0; i < canceling_keys.size(); ++i) {
- EXPECT_NE(std::find(open_keys.begin(), open_keys.end(), canceling_keys[i]),
- open_keys.end());
- }
-}
-
-} // namespace ash
diff --git a/chromium/ash/keyboard_uma_event_filter.cc b/chromium/ash/keyboard_uma_event_filter.cc
deleted file mode 100644
index 6b7ae6bee38..00000000000
--- a/chromium/ash/keyboard_uma_event_filter.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/keyboard_uma_event_filter.h"
-
-#include "base/metrics/histogram.h"
-#include "ui/events/event.h"
-
-namespace {
-
-// This threshold is used to drop keystrokes that are more than some time apart.
-// These keystrokes are dropped to avoid recording outliers, as well as pauses
-// between actual segments of typing.
-const int kKeystrokeThresholdInSeconds = 5;
-
-}
-
-namespace ash {
-namespace internal {
-
-KeyboardUMAEventFilter::KeyboardUMAEventFilter() {}
-
-KeyboardUMAEventFilter::~KeyboardUMAEventFilter() {}
-
-void KeyboardUMAEventFilter::OnKeyEvent(ui::KeyEvent* event) {
- // This is a rough approximation, so assume that each key release is the
- // result of a typed key.
- if (event->type() != ui::ET_KEY_RELEASED)
- return;
-
- // Reset the timer on non-character keystrokes.
- if (!isprint(event->GetCharacter())) {
- last_keystroke_time_ = base::TimeDelta();
- return;
- }
-
- if (last_keystroke_time_.ToInternalValue() == 0) {
- last_keystroke_time_ = event->time_stamp();
- return;
- }
-
- base::TimeDelta delta = event->time_stamp() - last_keystroke_time_;
- if (delta < base::TimeDelta::FromSeconds(kKeystrokeThresholdInSeconds))
- UMA_HISTOGRAM_TIMES("Keyboard.KeystrokeDeltas", delta);
-
- last_keystroke_time_ = event->time_stamp();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/keyboard_uma_event_filter.h b/chromium/ash/keyboard_uma_event_filter.h
deleted file mode 100644
index b25f2f934e0..00000000000
--- a/chromium/ash/keyboard_uma_event_filter.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_KEYBOARD_UMA_EVENT_FILTER_H_
-#define ASH_KEYBOARD_UMA_EVENT_FILTER_H_
-
-#include "base/compiler_specific.h"
-#include "base/time/time.h"
-#include "ui/events/event_handler.h"
-
-namespace ash {
-namespace internal {
-
-// EventFilter for tracking keyboard-related metrics, which intercepts events
-// before they are processed by the usual path and logs metrics about the
-// events.
-class KeyboardUMAEventFilter : public ui::EventHandler {
- public:
- KeyboardUMAEventFilter();
- virtual ~KeyboardUMAEventFilter();
-
- // ui::EventHandler overrides:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
-
- private:
- // The timestamp of the last character keystroke.
- base::TimeDelta last_keystroke_time_;
-
- DISALLOW_COPY_AND_ASSIGN(KeyboardUMAEventFilter);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_KEYBOARD_UMA_EVENT_FILTER_H_
diff --git a/chromium/ash/launcher/OWNERS b/chromium/ash/launcher/OWNERS
deleted file mode 100644
index 56a830a378d..00000000000
--- a/chromium/ash/launcher/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-davemoore@chromium.org
-skuhne@chromium.org
diff --git a/chromium/ash/launcher/launcher.cc b/chromium/ash/launcher/launcher.cc
deleted file mode 100644
index 58926e8c3b0..00000000000
--- a/chromium/ash/launcher/launcher.cc
+++ /dev/null
@@ -1,198 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/launcher/launcher.h"
-
-#include <algorithm>
-#include <cmath>
-
-#include "ash/focus_cycler.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_delegate.h"
-#include "ash/shelf/shelf_item_delegate.h"
-#include "ash/shelf/shelf_item_delegate_manager.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_model.h"
-#include "ash/shelf/shelf_navigator.h"
-#include "ash/shelf/shelf_util.h"
-#include "ash/shelf/shelf_view.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/window_properties.h"
-#include "grit/ash_resources.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_observer.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/compositor/layer.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/image/image.h"
-#include "ui/gfx/image/image_skia_operations.h"
-#include "ui/gfx/skbitmap_operations.h"
-#include "ui/views/accessible_pane_view.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-
-const char Launcher::kNativeViewName[] = "ShelfView";
-
-Launcher::Launcher(ShelfModel* shelf_model,
- ShelfDelegate* shelf_delegate,
- ShelfWidget* shelf_widget)
- : shelf_view_(NULL),
- alignment_(shelf_widget->GetAlignment()),
- delegate_(shelf_delegate),
- shelf_widget_(shelf_widget) {
- shelf_view_ = new internal::ShelfView(
- shelf_model, delegate_, shelf_widget_->shelf_layout_manager());
- shelf_view_->Init();
- shelf_widget_->GetContentsView()->AddChildView(shelf_view_);
- shelf_widget_->GetNativeView()->SetName(kNativeViewName);
- delegate_->OnLauncherCreated(this);
-}
-
-Launcher::~Launcher() {
- delegate_->OnLauncherDestroyed(this);
-}
-
-// static
-Launcher* Launcher::ForPrimaryDisplay() {
- ShelfWidget* shelf_widget = internal::RootWindowController::ForLauncher(
- Shell::GetPrimaryRootWindow())->shelf();
- return shelf_widget ? shelf_widget->launcher() : NULL;
-}
-
-// static
-Launcher* Launcher::ForWindow(aura::Window* window) {
- ShelfWidget* shelf_widget =
- internal::RootWindowController::ForLauncher(window)->shelf();
- return shelf_widget ? shelf_widget->launcher() : NULL;
-}
-
-void Launcher::SetAlignment(ShelfAlignment alignment) {
- alignment_ = alignment;
- shelf_view_->OnShelfAlignmentChanged();
- // ShelfLayoutManager will resize the launcher.
-}
-
-gfx::Rect Launcher::GetScreenBoundsOfItemIconForWindow(aura::Window* window) {
- LauncherID id = GetLauncherIDForWindow(window);
- gfx::Rect bounds(shelf_view_->GetIdealBoundsOfItemIcon(id));
- gfx::Point screen_origin;
- views::View::ConvertPointToScreen(shelf_view_, &screen_origin);
- return gfx::Rect(screen_origin.x() + bounds.x(),
- screen_origin.y() + bounds.y(),
- bounds.width(),
- bounds.height());
-}
-
-void Launcher::UpdateIconPositionForWindow(aura::Window* window) {
- shelf_view_->UpdatePanelIconPosition(
- GetLauncherIDForWindow(window),
- ash::ScreenAsh::ConvertRectFromScreen(
- shelf_widget()->GetNativeView(),
- window->GetBoundsInScreen()).CenterPoint());
-}
-
-void Launcher::ActivateLauncherItem(int index) {
- // We pass in a keyboard event which will then trigger a switch to the
- // next item if the current one is already active.
- ui::KeyEvent event(ui::ET_KEY_RELEASED,
- ui::VKEY_UNKNOWN, // The actual key gets ignored.
- ui::EF_NONE,
- false);
-
- const LauncherItem& item = shelf_view_->model()->items()[index];
- ShelfItemDelegate* item_delegate =
- Shell::GetInstance()->shelf_item_delegate_manager()->GetShelfItemDelegate(
- item.id);
- item_delegate->ItemSelected(event);
-}
-
-void Launcher::CycleWindowLinear(CycleDirection direction) {
- int item_index = GetNextActivatedItemIndex(
- *(shelf_view_->model()), direction);
- if (item_index >= 0)
- ActivateLauncherItem(item_index);
-}
-
-void Launcher::AddIconObserver(ShelfIconObserver* observer) {
- shelf_view_->AddIconObserver(observer);
-}
-
-void Launcher::RemoveIconObserver(ShelfIconObserver* observer) {
- shelf_view_->RemoveIconObserver(observer);
-}
-
-bool Launcher::IsShowingMenu() const {
- return shelf_view_->IsShowingMenu();
-}
-
-bool Launcher::IsShowingOverflowBubble() const {
- return shelf_view_->IsShowingOverflowBubble();
-}
-
-void Launcher::SetVisible(bool visible) const {
- shelf_view_->SetVisible(visible);
-}
-
-bool Launcher::IsVisible() const {
- return shelf_view_->visible();
-}
-
-void Launcher::SchedulePaint() {
- shelf_view_->SchedulePaintForAllButtons();
-}
-
-views::View* Launcher::GetAppListButtonView() const {
- return shelf_view_->GetAppListButtonView();
-}
-
-void Launcher::LaunchAppIndexAt(int item_index) {
- ShelfModel* shelf_model = shelf_view_->model();
- const LauncherItems& items = shelf_model->items();
- int item_count = shelf_model->item_count();
- int indexes_left = item_index >= 0 ? item_index : item_count;
- int found_index = -1;
-
- // Iterating until we have hit the index we are interested in which
- // is true once indexes_left becomes negative.
- for (int i = 0; i < item_count && indexes_left >= 0; i++) {
- if (items[i].type != TYPE_APP_LIST) {
- found_index = i;
- indexes_left--;
- }
- }
-
- // There are two ways how found_index can be valid: a.) the nth item was
- // found (which is true when indexes_left is -1) or b.) the last item was
- // requested (which is true when index was passed in as a negative number).
- if (found_index >= 0 && (indexes_left == -1 || item_index < 0)) {
- // Then set this one as active (or advance to the next item of its kind).
- ActivateLauncherItem(found_index);
- }
-}
-
-void Launcher::SetShelfViewBounds(gfx::Rect bounds) {
- shelf_view_->SetBoundsRect(bounds);
-}
-
-gfx::Rect Launcher::GetShelfViewBounds() const {
- return shelf_view_->bounds();
-}
-
-gfx::Rect Launcher::GetVisibleItemsBoundsInScreen() const {
- return shelf_view_->GetVisibleItemsBoundsInScreen();
-}
-
-app_list::ApplicationDragAndDropHost* Launcher::GetDragAndDropHostForAppList() {
- return shelf_view_;
-}
-
-} // namespace ash
diff --git a/chromium/ash/launcher/launcher.h b/chromium/ash/launcher/launcher.h
deleted file mode 100644
index 5c50b8ce7dc..00000000000
--- a/chromium/ash/launcher/launcher.h
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_LAUNCHER_LAUNCHER_H_
-#define ASH_LAUNCHER_LAUNCHER_H_
-
-#include "ash/ash_export.h"
-#include "ash/launcher/launcher_types.h"
-#include "ash/shelf/shelf_types.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/gfx/size.h"
-#include "ui/views/widget/widget_observer.h"
-
-namespace app_list {
-class ApplicationDragAndDropHost;
-}
-
-namespace aura {
-class Window;
-}
-
-namespace gfx {
-class Rect;
-}
-
-namespace views {
-class View;
-}
-
-namespace ash {
-
-namespace internal {
-class FocusCycler;
-class ShelfLayoutManager;
-class ShelfView;
-}
-
-namespace test {
-class LauncherTestAPI;
-}
-
-class ShelfDelegate;
-class ShelfIconObserver;
-class ShelfModel;
-class ShelfWidget;
-
-class ASH_EXPORT Launcher {
- public:
- static const char kNativeViewName[];
-
- Launcher(ShelfModel* model, ShelfDelegate* delegate, ShelfWidget* widget);
- virtual ~Launcher();
-
- // Return the launcher for the primary display. NULL if no user is
- // logged in yet.
- static Launcher* ForPrimaryDisplay();
-
- // Return the launcher for the display that |window| is currently on,
- // or a launcher on primary display if the launcher per display feature
- // is disabled. NULL if no user is logged in yet.
- static Launcher* ForWindow(aura::Window* window);
-
- void SetAlignment(ShelfAlignment alignment);
- ShelfAlignment alignment() const { return alignment_; }
-
- // Returns the screen bounds of the item for the specified window. If there is
- // no item for the specified window an empty rect is returned.
- gfx::Rect GetScreenBoundsOfItemIconForWindow(aura::Window* window);
-
- // Updates the icon position given the current window bounds. This is used
- // when dragging panels to reposition them with respect to the other panels.
- void UpdateIconPositionForWindow(aura::Window* window);
-
- // Activates the the launcher item specified by the index in the list
- // of launcher items.
- void ActivateLauncherItem(int index);
-
- // Cycles the window focus linearly over the current launcher items.
- void CycleWindowLinear(CycleDirection direction);
-
- void AddIconObserver(ShelfIconObserver* observer);
- void RemoveIconObserver(ShelfIconObserver* observer);
-
- // Returns true if the Launcher is showing a context menu.
- bool IsShowingMenu() const;
-
- bool IsShowingOverflowBubble() const;
-
- void SetVisible(bool visible) const;
- bool IsVisible() const;
-
- void SchedulePaint();
-
- views::View* GetAppListButtonView() const;
-
- // Launch a 0-indexed launcher item in the Launcher.
- // A negative index launches the last launcher item in the launcher.
- void LaunchAppIndexAt(int item_index);
-
- ShelfWidget* shelf_widget() { return shelf_widget_; }
-
- // Set the bounds of the shelf view.
- void SetShelfViewBounds(gfx::Rect bounds);
- gfx::Rect GetShelfViewBounds() const;
-
- // Returns rectangle bounding all visible launcher items. Used screen
- // coordinate system.
- gfx::Rect GetVisibleItemsBoundsInScreen() const;
-
- // Returns ApplicationDragAndDropHost for this Launcher.
- app_list::ApplicationDragAndDropHost* GetDragAndDropHostForAppList();
-
- private:
- friend class ash::test::LauncherTestAPI;
-
- // ShelfView used to display icons.
- internal::ShelfView* shelf_view_;
-
- ShelfAlignment alignment_;
-
- ShelfDelegate* delegate_;
-
- ShelfWidget* shelf_widget_;
-
- DISALLOW_COPY_AND_ASSIGN(Launcher);
-};
-
-} // namespace ash
-
-#endif // ASH_LAUNCHER_LAUNCHER_H_
diff --git a/chromium/ash/launcher/launcher_types.cc b/chromium/ash/launcher/launcher_types.cc
deleted file mode 100644
index 67dc5729c94..00000000000
--- a/chromium/ash/launcher/launcher_types.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/launcher/launcher_types.h"
-
-namespace ash {
-
-const int kLauncherPreferredSize = 48;
-const int kLauncherBackgroundAlpha = 204;
-const int kInvalidImageResourceID = -1;
-const int kInvalidLauncherID = 0;
-const int kTimeToSwitchBackgroundMs = 1000;
-
-LauncherItem::LauncherItem()
- : type(TYPE_UNDEFINED),
- id(kInvalidLauncherID),
- status(STATUS_CLOSED) {
-}
-
-LauncherItem::~LauncherItem() {
-}
-
-LauncherItemDetails::LauncherItemDetails()
- : type(TYPE_UNDEFINED),
- image_resource_id(kInvalidImageResourceID) {
-}
-
-LauncherItemDetails::~LauncherItemDetails() {
-}
-
-} // namespace ash
diff --git a/chromium/ash/launcher/launcher_types.h b/chromium/ash/launcher/launcher_types.h
deleted file mode 100644
index bbb1bbc41d7..00000000000
--- a/chromium/ash/launcher/launcher_types.h
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_LAUNCHER_LAUNCHER_TYPES_H_
-#define ASH_LAUNCHER_LAUNCHER_TYPES_H_
-
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "base/strings/string16.h"
-#include "ui/gfx/image/image_skia.h"
-
-namespace ash {
-
-typedef int LauncherID;
-
-// Height of the Launcher. Hard coded to avoid resizing as items are
-// added/removed.
-ASH_EXPORT extern const int kLauncherPreferredSize;
-
-// Max alpha of the launcher background.
-ASH_EXPORT extern const int kLauncherBackgroundAlpha;
-
-// Invalid image resource id used for LauncherItemDetails.
-extern const int kInvalidImageResourceID;
-
-extern const int kInvalidLauncherID;
-
-// Animation duration for switching black shelf and dock background on and off.
-ASH_EXPORT extern const int kTimeToSwitchBackgroundMs;
-
-// Type the LauncherItem represents.
-enum LauncherItemType {
- // Represents a running app panel.
- TYPE_APP_PANEL,
-
- // Represents a pinned shortcut to an app.
- TYPE_APP_SHORTCUT,
-
- // Toggles visiblity of the app list.
- TYPE_APP_LIST,
-
- // The browser shortcut button.
- TYPE_BROWSER_SHORTCUT,
-
- // Represents a platform app.
- TYPE_PLATFORM_APP,
-
- // Represents a windowed V1 browser app.
- TYPE_WINDOWED_APP,
-
- // Default value.
- TYPE_UNDEFINED,
-};
-
-// Represents the status of pinned or running app launcher items.
-enum LauncherItemStatus {
- // A closed LauncherItem, i.e. has no live instance.
- STATUS_CLOSED,
- // A LauncherItem that has live instance.
- STATUS_RUNNING,
- // An active LauncherItem that has focus.
- STATUS_ACTIVE,
- // A LauncherItem that needs user's attention.
- STATUS_ATTENTION,
-};
-
-struct ASH_EXPORT LauncherItem {
- LauncherItem();
- ~LauncherItem();
-
- LauncherItemType type;
-
- // Image to display in the launcher.
- gfx::ImageSkia image;
-
- // Assigned by the model when the item is added.
- LauncherID id;
-
- // Running status.
- LauncherItemStatus status;
-};
-
-typedef std::vector<LauncherItem> LauncherItems;
-
-// The direction of the focus cycling.
-enum CycleDirection {
- CYCLE_FORWARD,
- CYCLE_BACKWARD
-};
-
-// LauncherItemDetails may be set on Window (by way of
-// SetLauncherItemDetailsForWindow) to make the window appear in the shelf. See
-// ShelfWindowWatcher for details.
-struct ASH_EXPORT LauncherItemDetails {
- LauncherItemDetails();
- ~LauncherItemDetails();
-
- LauncherItemType type;
-
- // Resource id of the image to display on the shelf.
- int image_resource_id;
-
- // Title of the item.
- base::string16 title;
-};
-
-} // namespace ash
-
-#endif // ASH_LAUNCHER_LAUNCHER_TYPES_H_
diff --git a/chromium/ash/launcher/launcher_unittest.cc b/chromium/ash/launcher/launcher_unittest.cc
deleted file mode 100644
index 24eca334999..00000000000
--- a/chromium/ash/launcher/launcher_unittest.cc
+++ /dev/null
@@ -1,166 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/launcher/launcher.h"
-#include "ash/shelf/shelf_button.h"
-#include "ash/shelf/shelf_item_delegate_manager.h"
-#include "ash/shelf/shelf_model.h"
-#include "ash/shelf/shelf_view.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/launcher_test_api.h"
-#include "ash/test/shelf_view_test_api.h"
-#include "ash/test/test_shelf_item_delegate.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/root_window.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/corewm/corewm_switches.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-#if defined(OS_WIN)
-#include "base/win/windows_version.h"
-#endif
-
-typedef ash::test::AshTestBase LauncherTest;
-using ash::internal::ShelfView;
-using ash::internal::ShelfButton;
-
-namespace ash {
-
-class LauncherTest : public ash::test::AshTestBase {
- public:
- LauncherTest() : launcher_(NULL),
- shelf_view_(NULL),
- shelf_model_(NULL),
- item_delegate_manager_(NULL) {
- }
-
- virtual ~LauncherTest() {}
-
- virtual void SetUp() {
- test::AshTestBase::SetUp();
-
- launcher_ = Launcher::ForPrimaryDisplay();
- ASSERT_TRUE(launcher_);
-
- ash::test::LauncherTestAPI test(launcher_);
- shelf_view_ = test.shelf_view();
- shelf_model_ = shelf_view_->model();
- item_delegate_manager_ =
- Shell::GetInstance()->shelf_item_delegate_manager();
-
- test_.reset(new ash::test::ShelfViewTestAPI(shelf_view_));
- }
-
- virtual void TearDown() OVERRIDE {
- test::AshTestBase::TearDown();
- }
-
- Launcher* launcher() {
- return launcher_;
- }
-
- ShelfView* shelf_view() {
- return shelf_view_;
- }
-
- ShelfModel* shelf_model() {
- return shelf_model_;
- }
-
- ShelfItemDelegateManager* item_manager() {
- return item_delegate_manager_;
- }
-
- ash::test::ShelfViewTestAPI* test_api() {
- return test_.get();
- }
-
- private:
- Launcher* launcher_;
- ShelfView* shelf_view_;
- ShelfModel* shelf_model_;
- ShelfItemDelegateManager* item_delegate_manager_;
- scoped_ptr<test::ShelfViewTestAPI> test_;
-
- DISALLOW_COPY_AND_ASSIGN(LauncherTest);
-};
-
-// Confirms that LauncherItem reflects the appropriated state.
-TEST_F(LauncherTest, StatusReflection) {
- // Initially we have the app list.
- int button_count = test_api()->GetButtonCount();
-
- // Add running platform app.
- LauncherItem item;
- item.type = TYPE_PLATFORM_APP;
- item.status = STATUS_RUNNING;
- int index = shelf_model()->Add(item);
- ASSERT_EQ(++button_count, test_api()->GetButtonCount());
- ShelfButton* button = test_api()->GetButton(index);
- EXPECT_EQ(ShelfButton::STATE_RUNNING, button->state());
-
- // Remove it.
- shelf_model()->RemoveItemAt(index);
- ASSERT_EQ(--button_count, test_api()->GetButtonCount());
-}
-
-// Confirm that using the menu will clear the hover attribute. To avoid another
-// browser test we check this here.
-TEST_F(LauncherTest, checkHoverAfterMenu) {
- // Initially we have the app list.
- int button_count = test_api()->GetButtonCount();
-
- // Add running platform app.
- LauncherItem item;
- item.type = TYPE_PLATFORM_APP;
- item.status = STATUS_RUNNING;
- int index = shelf_model()->Add(item);
-
- scoped_ptr<ShelfItemDelegate> delegate(
- new test::TestShelfItemDelegate(NULL));
- item_manager()->SetShelfItemDelegate(shelf_model()->items()[index].id,
- delegate.Pass());
-
- ASSERT_EQ(++button_count, test_api()->GetButtonCount());
- ShelfButton* button = test_api()->GetButton(index);
- button->AddState(ShelfButton::STATE_HOVERED);
- button->ShowContextMenu(gfx::Point(), ui::MENU_SOURCE_MOUSE);
- EXPECT_FALSE(button->state() & ShelfButton::STATE_HOVERED);
-
- // Remove it.
- shelf_model()->RemoveItemAt(index);
-}
-
-TEST_F(LauncherTest, ShowOverflowBubble) {
- LauncherID first_item_id = shelf_model()->next_id();
-
- // Add platform app button until overflow.
- int items_added = 0;
- while (!test_api()->IsOverflowButtonVisible()) {
- LauncherItem item;
- item.type = TYPE_PLATFORM_APP;
- item.status = STATUS_RUNNING;
- shelf_model()->Add(item);
-
- ++items_added;
- ASSERT_LT(items_added, 10000);
- }
-
- // Shows overflow bubble.
- test_api()->ShowOverflowBubble();
- EXPECT_TRUE(launcher()->IsShowingOverflowBubble());
-
- // Removes the first item in main shelf view.
- shelf_model()->RemoveItemAt(shelf_model()->ItemIndexByID(first_item_id));
-
- // Waits for all transitions to finish and there should be no crash.
- test_api()->RunMessageLoopUntilAnimationsDone();
- EXPECT_FALSE(launcher()->IsShowingOverflowBubble());
-}
-
-} // namespace ash
diff --git a/chromium/ash/magnifier/magnification_controller.cc b/chromium/ash/magnifier/magnification_controller.cc
deleted file mode 100644
index 0df6e1287f0..00000000000
--- a/chromium/ash/magnifier/magnification_controller.cc
+++ /dev/null
@@ -1,634 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/magnifier/magnification_controller.h"
-
-#include "ash/accessibility_delegate.h"
-#include "ash/display/root_window_transformers.h"
-#include "ash/shell.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "base/synchronization/waitable_event.h"
-#include "ui/aura/client/cursor_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/root_window_transformer.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_property.h"
-#include "ui/compositor/dip_util.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animation_observer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/events/event.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/point3_f.h"
-#include "ui/gfx/point_conversions.h"
-#include "ui/gfx/point_f.h"
-#include "ui/gfx/rect_conversions.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/corewm/compound_event_filter.h"
-
-namespace {
-
-const float kMaxMagnifiedScale = 4.0f;
-const float kMaxMagnifiedScaleThreshold = 4.0f;
-const float kMinMagnifiedScaleThreshold = 1.1f;
-const float kNonMagnifiedScale = 1.0f;
-
-const float kInitialMagnifiedScale = 2.0f;
-const float kScrollScaleChangeFactor = 0.05f;
-
-// Threadshold of panning. If the cursor moves to within pixels (in DIP) of
-// |kPanningMergin| from the edge, the view-port moves.
-const int kPanningMergin = 100;
-
-void MoveCursorTo(aura::RootWindow* root_window,
- const gfx::Point& root_location) {
- gfx::Point3F host_location_3f(root_location);
- root_window->GetRootTransform().TransformPoint(&host_location_3f);
- root_window->MoveCursorToHostLocation(
- gfx::ToCeiledPoint(host_location_3f.AsPointF()));
-}
-
-} // namespace
-
-namespace ash {
-
-////////////////////////////////////////////////////////////////////////////////
-// MagnificationControllerImpl:
-
-class MagnificationControllerImpl : virtual public MagnificationController,
- public ui::EventHandler,
- public ui::ImplicitAnimationObserver,
- public aura::WindowObserver {
- public:
- MagnificationControllerImpl();
- virtual ~MagnificationControllerImpl();
-
- // MagnificationController overrides:
- virtual void SetEnabled(bool enabled) OVERRIDE;
- virtual bool IsEnabled() const OVERRIDE;
- virtual void SetScale(float scale, bool animate) OVERRIDE;
- virtual float GetScale() const OVERRIDE { return scale_; }
- virtual void MoveWindow(int x, int y, bool animate) OVERRIDE;
- virtual void MoveWindow(const gfx::Point& point, bool animate) OVERRIDE;
- virtual gfx::Point GetWindowPosition() const OVERRIDE {
- return gfx::ToFlooredPoint(origin_);
- }
- virtual void EnsureRectIsVisible(const gfx::Rect& rect,
- bool animate) OVERRIDE;
- virtual void EnsurePointIsVisible(const gfx::Point& point,
- bool animate) OVERRIDE;
- // For test
- virtual gfx::Point GetPointOfInterestForTesting() OVERRIDE {
- return point_of_interest_;
- }
-
- private:
- // ui::ImplicitAnimationObserver overrides:
- virtual void OnImplicitAnimationsCompleted() OVERRIDE;
-
- // aura::WindowObserver overrides:
- virtual void OnWindowDestroying(aura::Window* root_window) OVERRIDE;
- virtual void OnWindowBoundsChanged(aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
-
- // Redraws the magnification window with the given origin position and the
- // given scale. Returns true if the window is changed; otherwise, false.
- // These methods should be called internally just after the scale and/or
- // the position are changed to redraw the window.
- bool Redraw(const gfx::PointF& position, float scale, bool animate);
- bool RedrawDIP(const gfx::PointF& position, float scale, bool animate);
-
- // Redraw with the given zoom scale keeping the mouse cursor location. In
- // other words, zoom (or unzoom) centering around the cursor.
- void RedrawKeepingMousePosition(float scale, bool animate);
-
- // Ensures that the given point, rect or last mouse location is inside
- // magnification window. If not, the controller moves the window to contain
- // the given point/rect.
- void EnsureRectIsVisibleWithScale(const gfx::Rect& target_rect,
- float scale,
- bool animate);
- void EnsureRectIsVisibleDIP(const gfx::Rect& target_rect_in_dip,
- float scale,
- bool animate);
- void EnsurePointIsVisibleWithScale(const gfx::Point& point,
- float scale,
- bool animate);
- void OnMouseMove(const gfx::Point& location);
-
- // Move the mouse cursot to the given point. Actual move will be done when
- // the animation is completed. This should be called after animation is
- // started.
- void AfterAnimationMoveCursorTo(const gfx::Point& location);
-
- // Switch Magnified RootWindow to |new_root_window|. This does following:
- // - Unzoom the current root_window.
- // - Zoom the given new root_window |new_root_window|.
- // - Switch the target window from current window to |new_root_window|.
- void SwitchTargetRootWindow(aura::Window* new_root_window,
- bool redraw_original_root_window);
-
- // Returns if the magnification scale is 1.0 or not (larger then 1.0).
- bool IsMagnified() const;
-
- // Returns the rect of the magnification window.
- gfx::RectF GetWindowRectDIP(float scale) const;
- // Returns the size of the root window.
- gfx::Size GetHostSizeDIP() const;
-
- // Correct the givin scale value if nessesary.
- void ValidateScale(float* scale);
-
- // ui::EventHandler overrides:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
-
- // Target root window. This must not be NULL.
- aura::Window* root_window_;
-
- // True if the magnified window is currently animating a change. Otherwise,
- // false.
- bool is_on_animation_;
-
- bool is_enabled_;
-
- // True if the cursor needs to move the given position after the animation
- // will be finished. When using this, set |position_after_animation_| as well.
- bool move_cursor_after_animation_;
- // Stores the position of cursor to be moved after animation.
- gfx::Point position_after_animation_;
-
- // Stores the last mouse cursor (or last touched) location. This value is
- // used on zooming to keep this location visible.
- gfx::Point point_of_interest_;
-
- // Current scale, origin (left-top) position of the magnification window.
- float scale_;
- gfx::PointF origin_;
-
- DISALLOW_COPY_AND_ASSIGN(MagnificationControllerImpl);
-};
-
-////////////////////////////////////////////////////////////////////////////////
-// MagnificationControllerImpl:
-
-MagnificationControllerImpl::MagnificationControllerImpl()
- : root_window_(ash::Shell::GetPrimaryRootWindow()),
- is_on_animation_(false),
- is_enabled_(false),
- move_cursor_after_animation_(false),
- scale_(kNonMagnifiedScale) {
- Shell::GetInstance()->AddPreTargetHandler(this);
- root_window_->AddObserver(this);
- point_of_interest_ = root_window_->bounds().CenterPoint();
-}
-
-MagnificationControllerImpl::~MagnificationControllerImpl() {
- root_window_->RemoveObserver(this);
-
- Shell::GetInstance()->RemovePreTargetHandler(this);
-}
-
-void MagnificationControllerImpl::RedrawKeepingMousePosition(
- float scale, bool animate) {
- gfx::Point mouse_in_root = point_of_interest_;
-
- // mouse_in_root is invalid value when the cursor is hidden.
- if (!root_window_->bounds().Contains(mouse_in_root))
- mouse_in_root = root_window_->bounds().CenterPoint();
-
- const gfx::PointF origin =
- gfx::PointF(mouse_in_root.x() -
- (scale_ / scale) * (mouse_in_root.x() - origin_.x()),
- mouse_in_root.y() -
- (scale_ / scale) * (mouse_in_root.y() - origin_.y()));
- bool changed = RedrawDIP(origin, scale, animate);
- if (changed)
- AfterAnimationMoveCursorTo(mouse_in_root);
-}
-
-bool MagnificationControllerImpl::Redraw(const gfx::PointF& position,
- float scale,
- bool animate) {
- const gfx::PointF position_in_dip =
- ui::ConvertPointToDIP(root_window_->layer(), position);
- return RedrawDIP(position_in_dip, scale, animate);
-}
-
-bool MagnificationControllerImpl::RedrawDIP(const gfx::PointF& position_in_dip,
- float scale,
- bool animate) {
- DCHECK(root_window_);
-
- float x = position_in_dip.x();
- float y = position_in_dip.y();
-
- ValidateScale(&scale);
-
- if (x < 0)
- x = 0;
- if (y < 0)
- y = 0;
-
- const gfx::Size host_size_in_dip = GetHostSizeDIP();
- const gfx::SizeF window_size_in_dip = GetWindowRectDIP(scale).size();
- float max_x = host_size_in_dip.width() - window_size_in_dip.width();
- float max_y = host_size_in_dip.height() - window_size_in_dip.height();
- if (x > max_x)
- x = max_x;
- if (y > max_y)
- y = max_y;
-
- // Does nothing if both the origin and the scale are not changed.
- if (origin_.x() == x &&
- origin_.y() == y &&
- scale == scale_) {
- return false;
- }
-
- origin_.set_x(x);
- origin_.set_y(y);
- scale_ = scale;
-
- // Creates transform matrix.
- gfx::Transform transform;
- // Flips the signs intentionally to convert them from the position of the
- // magnification window.
- transform.Scale(scale_, scale_);
- transform.Translate(-origin_.x(), -origin_.y());
-
- ui::ScopedLayerAnimationSettings settings(
- root_window_->layer()->GetAnimator());
- settings.AddObserver(this);
- settings.SetPreemptionStrategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- settings.SetTweenType(gfx::Tween::EASE_OUT);
- settings.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(animate ? 100 : 0));
-
- gfx::Display display =
- Shell::GetScreen()->GetDisplayNearestWindow(root_window_);
- scoped_ptr<aura::RootWindowTransformer> transformer(
- internal::CreateRootWindowTransformerForDisplay(root_window_, display));
- root_window_->GetDispatcher()->SetRootWindowTransformer(transformer.Pass());
-
- if (animate)
- is_on_animation_ = true;
-
- return true;
-}
-
-void MagnificationControllerImpl::EnsureRectIsVisibleWithScale(
- const gfx::Rect& target_rect,
- float scale,
- bool animate) {
- const gfx::Rect target_rect_in_dip =
- ui::ConvertRectToDIP(root_window_->layer(), target_rect);
- EnsureRectIsVisibleDIP(target_rect_in_dip, scale, animate);
-}
-
-void MagnificationControllerImpl::EnsureRectIsVisibleDIP(
- const gfx::Rect& target_rect,
- float scale,
- bool animate) {
- ValidateScale(&scale);
-
- const gfx::Rect window_rect = gfx::ToEnclosingRect(GetWindowRectDIP(scale));
- if (scale == scale_ && window_rect.Contains(target_rect))
- return;
-
- // TODO(yoshiki): Un-zoom and change the scale if the magnification window
- // can't contain the whole given rect.
-
- gfx::Rect rect = window_rect;
- if (target_rect.width() > rect.width())
- rect.set_x(target_rect.CenterPoint().x() - rect.x() / 2);
- else if (target_rect.right() < rect.x())
- rect.set_x(target_rect.right());
- else if (rect.right() < target_rect.x())
- rect.set_x(target_rect.x() - rect.width());
-
- if (rect.height() > window_rect.height())
- rect.set_y(target_rect.CenterPoint().y() - rect.y() / 2);
- else if (target_rect.bottom() < rect.y())
- rect.set_y(target_rect.bottom());
- else if (rect.bottom() < target_rect.y())
- rect.set_y(target_rect.y() - rect.height());
-
- RedrawDIP(rect.origin(), scale, animate);
-}
-
-void MagnificationControllerImpl::EnsurePointIsVisibleWithScale(
- const gfx::Point& point,
- float scale,
- bool animate) {
- EnsureRectIsVisibleWithScale(gfx::Rect(point, gfx::Size(0, 0)),
- scale,
- animate);
-}
-
-void MagnificationControllerImpl::OnMouseMove(const gfx::Point& location) {
- DCHECK(root_window_);
-
- gfx::Point mouse(location);
-
- int x = origin_.x();
- int y = origin_.y();
- bool start_zoom = false;
-
- const gfx::Rect window_rect = gfx::ToEnclosingRect(GetWindowRectDIP(scale_));
- const int left = window_rect.x();
- const int right = window_rect.right();
- int margin = kPanningMergin / scale_; // No need to consider DPI.
-
- int x_diff = 0;
-
- if (mouse.x() < left + margin) {
- // Panning left.
- x_diff = mouse.x() - (left + margin);
- start_zoom = true;
- } else if (right - margin < mouse.x()) {
- // Panning right.
- x_diff = mouse.x() - (right - margin);
- start_zoom = true;
- }
- x = left + x_diff;
-
- const int top = window_rect.y();
- const int bottom = window_rect.bottom();
-
- int y_diff = 0;
- if (mouse.y() < top + margin) {
- // Panning up.
- y_diff = mouse.y() - (top + margin);
- start_zoom = true;
- } else if (bottom - margin < mouse.y()) {
- // Panning down.
- y_diff = mouse.y() - (bottom - margin);
- start_zoom = true;
- }
- y = top + y_diff;
-
- if (start_zoom && !is_on_animation_) {
- // No animation on panning.
- bool animate = false;
- bool ret = RedrawDIP(gfx::Point(x, y), scale_, animate);
-
- if (ret) {
- // If the magnified region is moved, hides the mouse cursor and moves it.
- if (x_diff != 0 || y_diff != 0)
- MoveCursorTo(root_window_->GetDispatcher(), mouse);
- }
- }
-}
-
-void MagnificationControllerImpl::AfterAnimationMoveCursorTo(
- const gfx::Point& location) {
- DCHECK(root_window_);
-
- aura::client::CursorClient* cursor_client =
- aura::client::GetCursorClient(root_window_);
- if (cursor_client) {
- // When cursor is invisible, do not move or show the cursor after the
- // animation.
- if (!cursor_client->IsCursorVisible())
- return;
- cursor_client->DisableMouseEvents();
- }
- move_cursor_after_animation_ = true;
- position_after_animation_ = location;
-}
-
-gfx::Size MagnificationControllerImpl::GetHostSizeDIP() const {
- return root_window_->bounds().size();
-}
-
-gfx::RectF MagnificationControllerImpl::GetWindowRectDIP(float scale) const {
- const gfx::Size size_in_dip = root_window_->bounds().size();
- const float width = size_in_dip.width() / scale;
- const float height = size_in_dip.height() / scale;
-
- return gfx::RectF(origin_.x(), origin_.y(), width, height);
-}
-
-bool MagnificationControllerImpl::IsMagnified() const {
- return scale_ >= kMinMagnifiedScaleThreshold;
-}
-
-void MagnificationControllerImpl::ValidateScale(float* scale) {
- // Adjust the scale to just |kNonMagnifiedScale| if scale is smaller than
- // |kMinMagnifiedScaleThreshold|;
- if (*scale < kMinMagnifiedScaleThreshold)
- *scale = kNonMagnifiedScale;
-
- // Adjust the scale to just |kMinMagnifiedScale| if scale is bigger than
- // |kMinMagnifiedScaleThreshold|;
- if (*scale > kMaxMagnifiedScaleThreshold)
- *scale = kMaxMagnifiedScale;
-
- DCHECK(kNonMagnifiedScale <= *scale && *scale <= kMaxMagnifiedScale);
-}
-
-void MagnificationControllerImpl::OnImplicitAnimationsCompleted() {
- if (!is_on_animation_)
- return;
-
- if (move_cursor_after_animation_) {
- MoveCursorTo(root_window_->GetDispatcher(), position_after_animation_);
- move_cursor_after_animation_ = false;
-
- aura::client::CursorClient* cursor_client =
- aura::client::GetCursorClient(root_window_);
- if (cursor_client)
- cursor_client->EnableMouseEvents();
- }
-
- is_on_animation_ = false;
-}
-
-void MagnificationControllerImpl::OnWindowDestroying(
- aura::Window* root_window) {
- if (root_window == root_window_) {
- // There must be at least one root window because this controller is
- // destroyed before the root windows get destroyed.
- DCHECK(root_window);
-
- aura::Window* target_root_window = Shell::GetTargetRootWindow();
- CHECK(target_root_window);
-
- // The destroyed root window must not be target.
- CHECK_NE(target_root_window, root_window);
- // Don't redraw the old root window as it's being destroyed.
- SwitchTargetRootWindow(target_root_window, false);
- point_of_interest_ = target_root_window->bounds().CenterPoint();
- }
-}
-
-void MagnificationControllerImpl::OnWindowBoundsChanged(
- aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) {
- // TODO(yoshiki): implement here. crbug.com/230979
-}
-
-void MagnificationControllerImpl::SwitchTargetRootWindow(
- aura::Window* new_root_window,
- bool redraw_original_root_window) {
- DCHECK(new_root_window);
-
- if (new_root_window == root_window_)
- return;
-
- // Stores the previous scale.
- float scale = GetScale();
-
- // Unmagnify the previous root window.
- root_window_->RemoveObserver(this);
- if (redraw_original_root_window)
- RedrawKeepingMousePosition(1.0f, true);
-
- root_window_ = new_root_window;
- RedrawKeepingMousePosition(scale, true);
- root_window_->AddObserver(this);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// MagnificationControllerImpl: MagnificationController implementation
-
-void MagnificationControllerImpl::SetScale(float scale, bool animate) {
- if (!is_enabled_)
- return;
-
- ValidateScale(&scale);
- ash::Shell::GetInstance()->accessibility_delegate()->
- SaveScreenMagnifierScale(scale);
- RedrawKeepingMousePosition(scale, animate);
-}
-
-void MagnificationControllerImpl::MoveWindow(int x, int y, bool animate) {
- if (!is_enabled_)
- return;
-
- Redraw(gfx::Point(x, y), scale_, animate);
-}
-
-void MagnificationControllerImpl::MoveWindow(const gfx::Point& point,
- bool animate) {
- if (!is_enabled_)
- return;
-
- Redraw(point, scale_, animate);
-}
-
-void MagnificationControllerImpl::EnsureRectIsVisible(
- const gfx::Rect& target_rect,
- bool animate) {
- if (!is_enabled_)
- return;
-
- EnsureRectIsVisibleWithScale(target_rect, scale_, animate);
-}
-
-void MagnificationControllerImpl::EnsurePointIsVisible(
- const gfx::Point& point,
- bool animate) {
- if (!is_enabled_)
- return;
-
- EnsurePointIsVisibleWithScale(point, scale_, animate);
-}
-
-void MagnificationControllerImpl::SetEnabled(bool enabled) {
- if (enabled) {
- float scale =
- ash::Shell::GetInstance()->accessibility_delegate()->
- GetSavedScreenMagnifierScale();
- if (scale <= 0.0f)
- scale = kInitialMagnifiedScale;
- ValidateScale(&scale);
-
- // Do nothing, if already enabled with same scale.
- if (is_enabled_ && scale == scale_)
- return;
-
- is_enabled_ = enabled;
- RedrawKeepingMousePosition(scale, true);
- ash::Shell::GetInstance()->accessibility_delegate()->
- SaveScreenMagnifierScale(scale);
- } else {
- // Do nothing, if already disabled.
- if (!is_enabled_)
- return;
-
- RedrawKeepingMousePosition(kNonMagnifiedScale, true);
- is_enabled_ = enabled;
- }
-}
-
-bool MagnificationControllerImpl::IsEnabled() const {
- return is_enabled_;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// MagnificationControllerImpl: aura::EventFilter implementation
-
-void MagnificationControllerImpl::OnMouseEvent(ui::MouseEvent* event) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- aura::Window* current_root = target->GetRootWindow();
- gfx::Rect root_bounds = current_root->bounds();
-
- if (root_bounds.Contains(event->root_location())) {
- // This must be before |SwitchTargetRootWindow()|.
- point_of_interest_ = event->root_location();
-
- if (current_root != root_window_) {
- DCHECK(current_root);
- SwitchTargetRootWindow(current_root, true);
- }
-
- if (IsMagnified() && event->type() == ui::ET_MOUSE_MOVED)
- OnMouseMove(event->root_location());
- }
-}
-
-void MagnificationControllerImpl::OnScrollEvent(ui::ScrollEvent* event) {
- if (event->IsAltDown() && event->IsControlDown()) {
- if (event->type() == ui::ET_SCROLL_FLING_START ||
- event->type() == ui::ET_SCROLL_FLING_CANCEL) {
- event->StopPropagation();
- return;
- }
-
- if (event->type() == ui::ET_SCROLL) {
- ui::ScrollEvent* scroll_event = static_cast<ui::ScrollEvent*>(event);
- float scale = GetScale();
- scale += scroll_event->y_offset() * kScrollScaleChangeFactor;
- SetScale(scale, true);
- event->StopPropagation();
- return;
- }
- }
-}
-
-void MagnificationControllerImpl::OnTouchEvent(ui::TouchEvent* event) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- aura::Window* current_root = target->GetRootWindow();
- if (current_root == root_window_) {
- gfx::Rect root_bounds = current_root->bounds();
- if (root_bounds.Contains(event->root_location()))
- point_of_interest_ = event->root_location();
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// MagnificationController:
-
-// static
-MagnificationController* MagnificationController::CreateInstance() {
- return new MagnificationControllerImpl();
-}
-
-} // namespace ash
diff --git a/chromium/ash/magnifier/magnification_controller.h b/chromium/ash/magnifier/magnification_controller.h
deleted file mode 100644
index 75d1b2f8f3d..00000000000
--- a/chromium/ash/magnifier/magnification_controller.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_
-#define ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_
-
-#include "base/compiler_specific.h"
-#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/gfx/point.h"
-#include "ui/gfx/rect.h"
-
-namespace aura {
-class RootWindow;
-}
-
-namespace ash {
-
-class MagnificationController {
- public:
- virtual ~MagnificationController() {}
-
- // Creates a new MagnificationController. The caller takes ownership of the
- // returned object.
- static MagnificationController* CreateInstance();
-
- // Enables (or disables if |enabled| is false) screen magnifier feature.
- virtual void SetEnabled(bool enabled) = 0;
-
- // Returns if the screen magnifier is enabled or not.
- virtual bool IsEnabled() const = 0;
-
- // Sets the magnification ratio. 1.0f means no magnification.
- virtual void SetScale(float scale, bool animate) = 0;
- // Returns the current magnification ratio.
- virtual float GetScale() const = 0;
-
- // Set the top-left point of the magnification window.
- virtual void MoveWindow(int x, int y, bool animate) = 0;
- virtual void MoveWindow(const gfx::Point& point, bool animate) = 0;
- // Returns the current top-left point of the magnification window.
- virtual gfx::Point GetWindowPosition() const = 0;
-
- // Ensures that the given point/rect is inside the magnification window. If
- // not, the controller moves the window to contain the given point/rect.
- virtual void EnsureRectIsVisible(const gfx::Rect& rect, bool animate) = 0;
- virtual void EnsurePointIsVisible(const gfx::Point& point, bool animate) = 0;
-
- // Returns |point_of_interest_| in MagnificationControllerImpl. This is
- // the internal variable to stores the last mouse cursor (or last touched)
- // location. This method is only for test purpose.
- virtual gfx::Point GetPointOfInterestForTesting() = 0;
-
- protected:
- MagnificationController() {}
-};
-
-} // namespace ash
-
-#endif // ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_
diff --git a/chromium/ash/magnifier/magnification_controller_unittest.cc b/chromium/ash/magnifier/magnification_controller_unittest.cc
deleted file mode 100644
index 9e32759067e..00000000000
--- a/chromium/ash/magnifier/magnification_controller_unittest.cc
+++ /dev/null
@@ -1,442 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/magnifier/magnification_controller.h"
-#include "ash/magnifier/magnifier_constants.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "base/strings/stringprintf.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/gfx/rect_conversions.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-namespace internal {
-namespace {
-
-const int kRootHeight = 600;
-const int kRootWidth = 800;
-
-} // namespace
-
-class MagnificationControllerTest: public test::AshTestBase {
- public:
- MagnificationControllerTest() {}
- virtual ~MagnificationControllerTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- UpdateDisplay(base::StringPrintf("%dx%d", kRootWidth, kRootHeight));
-
- aura::Window* root = GetRootWindow();
- gfx::Rect root_bounds(root->bounds());
-
-#if defined(OS_WIN)
- // RootWindow and Display can't resize on Windows Ash.
- // http://crbug.com/165962
- EXPECT_EQ(kRootHeight, root_bounds.height());
- EXPECT_EQ(kRootWidth, root_bounds.width());
-#endif
- }
-
- virtual void TearDown() OVERRIDE {
- AshTestBase::TearDown();
- }
-
- protected:
- aura::Window* GetRootWindow() const {
- return Shell::GetPrimaryRootWindow();
- }
-
- std::string GetHostMouseLocation() {
- gfx::Point point;
- GetRootWindow()->GetDispatcher()->host()->QueryMouseLocation(&point);
- return point.ToString();
- }
-
- ash::MagnificationController* GetMagnificationController() const {
- return ash::Shell::GetInstance()->magnification_controller();
- }
-
- gfx::Rect GetViewport() const {
- gfx::RectF bounds(0, 0, kRootWidth, kRootHeight);
- GetRootWindow()->layer()->transform().TransformRectReverse(&bounds);
- return gfx::ToEnclosingRect(bounds);
- }
-
- std::string CurrentPointOfInterest() const {
- return GetMagnificationController()->
- GetPointOfInterestForTesting().ToString();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MagnificationControllerTest);
-};
-
-TEST_F(MagnificationControllerTest, EnableAndDisable) {
- // Confirms the magnifier is disabled.
- EXPECT_TRUE(GetRootWindow()->layer()->transform().IsIdentity());
- EXPECT_EQ(1.0f, GetMagnificationController()->GetScale());
- EXPECT_EQ("0,0 800x600", GetViewport().ToString());
-
- // Enables magnifier.
- GetMagnificationController()->SetEnabled(true);
- EXPECT_FALSE(GetRootWindow()->layer()->transform().IsIdentity());
- EXPECT_EQ(2.0f, GetMagnificationController()->GetScale());
- EXPECT_EQ("200,150 400x300", GetViewport().ToString());
-
- // Disables magnifier.
- GetMagnificationController()->SetEnabled(false);
- EXPECT_TRUE(GetRootWindow()->layer()->transform().IsIdentity());
- EXPECT_EQ(1.0f, GetMagnificationController()->GetScale());
- EXPECT_EQ("0,0 800x600", GetViewport().ToString());
-
- // Confirms the the scale can't be changed.
- GetMagnificationController()->SetScale(4.0f, false);
- EXPECT_TRUE(GetRootWindow()->layer()->transform().IsIdentity());
- EXPECT_EQ(1.0f, GetMagnificationController()->GetScale());
- EXPECT_EQ("0,0 800x600", GetViewport().ToString());
-}
-
-TEST_F(MagnificationControllerTest, MagnifyAndUnmagnify) {
- // Enables magnifier and confirms the default scale is 2.0x.
- GetMagnificationController()->SetEnabled(true);
- EXPECT_FALSE(GetRootWindow()->layer()->transform().IsIdentity());
- EXPECT_EQ(2.0f, GetMagnificationController()->GetScale());
- EXPECT_EQ("200,150 400x300", GetViewport().ToString());
- EXPECT_EQ("400,300", CurrentPointOfInterest());
-
- // Changes the scale.
- GetMagnificationController()->SetScale(4.0f, false);
- EXPECT_EQ(4.0f, GetMagnificationController()->GetScale());
- EXPECT_EQ("300,225 200x150", GetViewport().ToString());
- EXPECT_EQ("400,300", CurrentPointOfInterest());
-
- GetMagnificationController()->SetScale(1.0f, false);
- EXPECT_EQ(1.0f, GetMagnificationController()->GetScale());
- EXPECT_EQ("0,0 800x600", GetViewport().ToString());
- EXPECT_EQ("400,300", CurrentPointOfInterest());
-
- GetMagnificationController()->SetScale(3.0f, false);
- EXPECT_EQ(3.0f, GetMagnificationController()->GetScale());
- EXPECT_EQ("266,200 267x200", GetViewport().ToString());
- EXPECT_EQ("400,300", CurrentPointOfInterest());
-}
-
-TEST_F(MagnificationControllerTest, MoveWindow) {
- // Enables magnifier and confirm the viewport is at center.
- GetMagnificationController()->SetEnabled(true);
- EXPECT_EQ(2.0f, GetMagnificationController()->GetScale());
- EXPECT_EQ("200,150 400x300", GetViewport().ToString());
-
- // Move the viewport.
- GetMagnificationController()->MoveWindow(0, 0, false);
- EXPECT_EQ("0,0 400x300", GetViewport().ToString());
-
- GetMagnificationController()->MoveWindow(200, 300, false);
- EXPECT_EQ("200,300 400x300", GetViewport().ToString());
-
- GetMagnificationController()->MoveWindow(400, 0, false);
- EXPECT_EQ("400,0 400x300", GetViewport().ToString());
-
- GetMagnificationController()->MoveWindow(400, 300, false);
- EXPECT_EQ("400,300 400x300", GetViewport().ToString());
-
- // Confirms that the viewport can't across the top-left border.
- GetMagnificationController()->MoveWindow(-100, 0, false);
- EXPECT_EQ("0,0 400x300", GetViewport().ToString());
-
- GetMagnificationController()->MoveWindow(0, -100, false);
- EXPECT_EQ("0,0 400x300", GetViewport().ToString());
-
- GetMagnificationController()->MoveWindow(-100, -100, false);
- EXPECT_EQ("0,0 400x300", GetViewport().ToString());
-
- // Confirms that the viewport can't across the bittom-right border.
- GetMagnificationController()->MoveWindow(800, 0, false);
- EXPECT_EQ("400,0 400x300", GetViewport().ToString());
-
- GetMagnificationController()->MoveWindow(0, 400, false);
- EXPECT_EQ("0,300 400x300", GetViewport().ToString());
-
- GetMagnificationController()->MoveWindow(200, 400, false);
- EXPECT_EQ("200,300 400x300", GetViewport().ToString());
-
- GetMagnificationController()->MoveWindow(1000, 1000, false);
- EXPECT_EQ("400,300 400x300", GetViewport().ToString());
-}
-
-TEST_F(MagnificationControllerTest, PointOfInterest) {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
-
- generator.MoveMouseToInHost(gfx::Point(0, 0));
- EXPECT_EQ("0,0", CurrentPointOfInterest());
-
- generator.MoveMouseToInHost(gfx::Point(799, 599));
- EXPECT_EQ("799,599", CurrentPointOfInterest());
-
- generator.MoveMouseToInHost(gfx::Point(400, 300));
- EXPECT_EQ("400,300", CurrentPointOfInterest());
-
- GetMagnificationController()->SetEnabled(true);
- EXPECT_EQ("400,300", CurrentPointOfInterest());
-
- generator.MoveMouseToInHost(gfx::Point(500, 400));
- EXPECT_EQ("450,350", CurrentPointOfInterest());
-}
-
-TEST_F(MagnificationControllerTest, PanWindow2xLeftToRight) {
- const aura::Env* env = aura::Env::GetInstance();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
-
- generator.MoveMouseToInHost(gfx::Point(0, 0));
- EXPECT_EQ(1.f, GetMagnificationController()->GetScale());
- EXPECT_EQ("0,0 800x600", GetViewport().ToString());
- EXPECT_EQ("0,0", env->last_mouse_location().ToString());
-
- // Enables magnifier and confirm the viewport is at center.
- GetMagnificationController()->SetEnabled(true);
- EXPECT_EQ(2.0f, GetMagnificationController()->GetScale());
-
- GetMagnificationController()->MoveWindow(0, 0, false);
- generator.MoveMouseToInHost(gfx::Point(0, 0));
- EXPECT_EQ("0,0", env->last_mouse_location().ToString());
- EXPECT_EQ("0,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(300, 150));
- EXPECT_EQ("150,75", env->last_mouse_location().ToString());
- EXPECT_EQ("0,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(700, 150));
- EXPECT_EQ("350,75", env->last_mouse_location().ToString());
- EXPECT_EQ("0,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(701, 150));
- EXPECT_EQ("350,75", env->last_mouse_location().ToString());
- EXPECT_EQ("0,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(702, 150));
- EXPECT_EQ("351,75", env->last_mouse_location().ToString());
- EXPECT_EQ("1,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(703, 150));
- EXPECT_EQ("352,75", env->last_mouse_location().ToString());
- EXPECT_EQ("2,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(704, 150));
- EXPECT_EQ("354,75", env->last_mouse_location().ToString());
- EXPECT_EQ("4,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(712, 150));
- EXPECT_EQ("360,75", env->last_mouse_location().ToString());
- EXPECT_EQ("10,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(600, 150));
- EXPECT_EQ("310,75", env->last_mouse_location().ToString());
- EXPECT_EQ("10,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(720, 150));
- EXPECT_EQ("370,75", env->last_mouse_location().ToString());
- EXPECT_EQ("20,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(780, 150));
- EXPECT_EQ("410,75", env->last_mouse_location().ToString());
- EXPECT_EQ("410,75", CurrentPointOfInterest());
- EXPECT_EQ("60,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(799, 150));
- EXPECT_EQ("459,75", env->last_mouse_location().ToString());
- EXPECT_EQ("109,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(702, 150));
- EXPECT_EQ("460,75", env->last_mouse_location().ToString());
- EXPECT_EQ("110,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(780, 150));
- EXPECT_EQ("500,75", env->last_mouse_location().ToString());
- EXPECT_EQ("150,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(780, 150));
- EXPECT_EQ("540,75", env->last_mouse_location().ToString());
- EXPECT_EQ("190,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(780, 150));
- EXPECT_EQ("580,75", env->last_mouse_location().ToString());
- EXPECT_EQ("230,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(780, 150));
- EXPECT_EQ("620,75", env->last_mouse_location().ToString());
- EXPECT_EQ("270,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(780, 150));
- EXPECT_EQ("660,75", env->last_mouse_location().ToString());
- EXPECT_EQ("310,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(780, 150));
- EXPECT_EQ("700,75", env->last_mouse_location().ToString());
- EXPECT_EQ("350,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(780, 150));
- EXPECT_EQ("740,75", env->last_mouse_location().ToString());
- EXPECT_EQ("390,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(780, 150));
- EXPECT_EQ("780,75", env->last_mouse_location().ToString());
- EXPECT_EQ("400,0 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(799, 150));
- EXPECT_EQ("799,75", env->last_mouse_location().ToString());
- EXPECT_EQ("400,0 400x300", GetViewport().ToString());
-}
-
-TEST_F(MagnificationControllerTest, PanWindow2xRightToLeft) {
- const aura::Env* env = aura::Env::GetInstance();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
-
- generator.MoveMouseToInHost(gfx::Point(799, 300));
- EXPECT_EQ(1.f, GetMagnificationController()->GetScale());
- EXPECT_EQ("0,0 800x600", GetViewport().ToString());
- EXPECT_EQ("799,300", env->last_mouse_location().ToString());
-
- // Enables magnifier and confirm the viewport is at center.
- GetMagnificationController()->SetEnabled(true);
-
- generator.MoveMouseToInHost(gfx::Point(799, 300));
- EXPECT_EQ("798,300", env->last_mouse_location().ToString());
- EXPECT_EQ("400,150 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(0, 300));
- EXPECT_EQ("400,300", env->last_mouse_location().ToString());
- EXPECT_EQ("350,150 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(0, 300));
- EXPECT_EQ("350,300", env->last_mouse_location().ToString());
- EXPECT_EQ("300,150 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(0, 300));
- EXPECT_EQ("300,300", env->last_mouse_location().ToString());
- EXPECT_EQ("250,150 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(0, 300));
- EXPECT_EQ("250,300", env->last_mouse_location().ToString());
- EXPECT_EQ("200,150 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(0, 300));
- EXPECT_EQ("200,300", env->last_mouse_location().ToString());
- EXPECT_EQ("150,150 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(0, 300));
- EXPECT_EQ("150,300", env->last_mouse_location().ToString());
- EXPECT_EQ("100,150 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(0, 300));
- EXPECT_EQ("100,300", env->last_mouse_location().ToString());
- EXPECT_EQ("50,150 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(0, 300));
- EXPECT_EQ("50,300", env->last_mouse_location().ToString());
- EXPECT_EQ("0,150 400x300", GetViewport().ToString());
-
- generator.MoveMouseToInHost(gfx::Point(0, 300));
- EXPECT_EQ("0,300", env->last_mouse_location().ToString());
- EXPECT_EQ("0,150 400x300", GetViewport().ToString());
-}
-
-TEST_F(MagnificationControllerTest, PanWindowToRight) {
- const aura::Env* env = aura::Env::GetInstance();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
-
- generator.MoveMouseToInHost(gfx::Point(400, 300));
- EXPECT_EQ(1.f, GetMagnificationController()->GetScale());
- EXPECT_EQ("0,0 800x600", GetViewport().ToString());
- EXPECT_EQ("400,300", env->last_mouse_location().ToString());
-
- float scale = 2.f;
-
- // Enables magnifier and confirm the viewport is at center.
- GetMagnificationController()->SetEnabled(true);
- EXPECT_FLOAT_EQ(2.f, GetMagnificationController()->GetScale());
-
- scale *= kMagnificationScaleFactor;
- GetMagnificationController()->SetScale(scale, false);
- EXPECT_FLOAT_EQ(2.3784142, GetMagnificationController()->GetScale());
- generator.MoveMouseToInHost(gfx::Point(400, 300));
- EXPECT_EQ("400,300", env->last_mouse_location().ToString());
- generator.MoveMouseToInHost(gfx::Point(799, 300));
- EXPECT_EQ("566,299", env->last_mouse_location().ToString());
- EXPECT_EQ("705,300", GetHostMouseLocation());
-
- scale *= kMagnificationScaleFactor;
- GetMagnificationController()->SetScale(scale, false);
- EXPECT_FLOAT_EQ(2.8284268, GetMagnificationController()->GetScale());
- generator.MoveMouseToInHost(gfx::Point(799, 300));
- EXPECT_EQ("599,299", env->last_mouse_location().ToString());
- EXPECT_EQ("702,300", GetHostMouseLocation());
-
- scale *= kMagnificationScaleFactor;
- GetMagnificationController()->SetScale(scale, false);
- EXPECT_FLOAT_EQ(3.3635852, GetMagnificationController()->GetScale());
- generator.MoveMouseToInHost(gfx::Point(799, 300));
- EXPECT_EQ("627,298", env->last_mouse_location().ToString());
- EXPECT_EQ("707,300", GetHostMouseLocation());
-
- scale *= kMagnificationScaleFactor;
- GetMagnificationController()->SetScale(scale, false);
- EXPECT_FLOAT_EQ(4.f, GetMagnificationController()->GetScale());
- generator.MoveMouseToInHost(gfx::Point(799, 300));
- EXPECT_EQ("649,298", env->last_mouse_location().ToString());
- EXPECT_EQ("704,300", GetHostMouseLocation());
-}
-
-TEST_F(MagnificationControllerTest, PanWindowToLeft) {
- const aura::Env* env = aura::Env::GetInstance();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
-
- generator.MoveMouseToInHost(gfx::Point(400, 300));
- EXPECT_EQ(1.f, GetMagnificationController()->GetScale());
- EXPECT_EQ("0,0 800x600", GetViewport().ToString());
- EXPECT_EQ("400,300", env->last_mouse_location().ToString());
-
- float scale = 2.f;
-
- // Enables magnifier and confirm the viewport is at center.
- GetMagnificationController()->SetEnabled(true);
- EXPECT_FLOAT_EQ(2.f, GetMagnificationController()->GetScale());
-
- scale *= kMagnificationScaleFactor;
- GetMagnificationController()->SetScale(scale, false);
- EXPECT_FLOAT_EQ(2.3784142, GetMagnificationController()->GetScale());
- generator.MoveMouseToInHost(gfx::Point(400, 300));
- EXPECT_EQ("400,300", env->last_mouse_location().ToString());
- generator.MoveMouseToInHost(gfx::Point(0, 300));
- EXPECT_EQ("231,299", env->last_mouse_location().ToString());
- EXPECT_EQ("100,300", GetHostMouseLocation());
-
- scale *= kMagnificationScaleFactor;
- GetMagnificationController()->SetScale(scale, false);
- EXPECT_FLOAT_EQ(2.8284268, GetMagnificationController()->GetScale());
- generator.MoveMouseToInHost(gfx::Point(0, 300));
- EXPECT_EQ("194,299", env->last_mouse_location().ToString());
- EXPECT_EQ("99,300", GetHostMouseLocation());
-
- scale *= kMagnificationScaleFactor;
- GetMagnificationController()->SetScale(scale, false);
- EXPECT_FLOAT_EQ(3.3635852, GetMagnificationController()->GetScale());
- generator.MoveMouseToInHost(gfx::Point(0, 300));
- EXPECT_EQ("164,298", env->last_mouse_location().ToString());
- EXPECT_EQ("98,300", GetHostMouseLocation());
-
- scale *= kMagnificationScaleFactor;
- GetMagnificationController()->SetScale(scale, false);
- EXPECT_FLOAT_EQ(4.f, GetMagnificationController()->GetScale());
- generator.MoveMouseToInHost(gfx::Point(0, 300));
- EXPECT_EQ("139,298", env->last_mouse_location().ToString());
- EXPECT_EQ("100,300", GetHostMouseLocation());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/magnifier/magnifier_constants.h b/chromium/ash/magnifier/magnifier_constants.h
deleted file mode 100644
index b286299aace..00000000000
--- a/chromium/ash/magnifier/magnifier_constants.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_MAGNIFIER_MAGNIFIER_CONSTANTS_H_
-#define ASH_MAGNIFIER_MAGNIFIER_CONSTANTS_H_
-
-namespace ash {
-
-// Note: Do not change these values; UMA and prefs depend on them.
-enum MagnifierType {
- MAGNIFIER_FULL = 1,
- MAGNIFIER_PARTIAL = 2,
-};
-
-const int kMaxMagnifierType = 2;
-
-const MagnifierType kDefaultMagnifierType = MAGNIFIER_FULL;
-
-// Factor of magnification scale. For example, when this value is 1.189, scale
-// value will be changed x1.000, x1.189, x1.414, x1.681, x2.000, ...
-// Note: this value is 2.0 ^ (1 / 4).
-const float kMagnificationScaleFactor = 1.18920712f;
-
-} // namespace ash
-
-#endif // ASH_MAGNIFIER_MAGNIFIER_CONSTANTS_H_
diff --git a/chromium/ash/magnifier/partial_magnification_controller.cc b/chromium/ash/magnifier/partial_magnification_controller.cc
deleted file mode 100644
index a24ba51d4e9..00000000000
--- a/chromium/ash/magnifier/partial_magnification_controller.cc
+++ /dev/null
@@ -1,211 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/magnifier/partial_magnification_controller.h"
-
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ui/aura/root_window.h"
-#include "ui/views/corewm/compound_event_filter.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_property.h"
-#include "ui/gfx/screen.h"
-#include "ui/compositor/layer.h"
-#include "ui/views/layout/fill_layout.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace {
-
-const float kMinPartialMagnifiedScaleThreshold = 1.1f;
-
-// Number of pixels to make the border of the magnified area.
-const int kZoomInset = 16;
-
-// Width of the magnified area.
-const int kMagnifierWidth = 200;
-
-// Height of the magnified area.
-const int kMagnifierHeight = 200;
-
-// Name of the magnifier window.
-const char kPartialMagniferWindowName[] = "PartialMagnifierWindow";
-
-} // namespace
-
-namespace ash {
-
-PartialMagnificationController::PartialMagnificationController()
- : is_on_zooming_(false),
- is_enabled_(false),
- scale_(kNonPartialMagnifiedScale),
- zoom_widget_(NULL) {
- Shell::GetInstance()->AddPreTargetHandler(this);
-}
-
-PartialMagnificationController::~PartialMagnificationController() {
- CloseMagnifierWindow();
-
- Shell::GetInstance()->RemovePreTargetHandler(this);
-}
-
-void PartialMagnificationController::SetScale(float scale) {
- if (!is_enabled_)
- return;
-
- scale_ = scale;
-
- if (IsPartialMagnified()) {
- CreateMagnifierWindow();
- } else {
- CloseMagnifierWindow();
- }
-}
-
-void PartialMagnificationController::SetEnabled(bool enabled) {
- if (enabled) {
- is_enabled_ = enabled;
- SetScale(kDefaultPartialMagnifiedScale);
- } else {
- SetScale(kNonPartialMagnifiedScale);
- is_enabled_ = enabled;
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// PartialMagnificationController: ui::EventHandler implementation
-
-void PartialMagnificationController::OnMouseEvent(ui::MouseEvent* event) {
- if (IsPartialMagnified() && event->type() == ui::ET_MOUSE_MOVED) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- aura::Window* current_root = target->GetRootWindow();
- // TODO(zork): Handle the case where the event is captured on a different
- // display, such as when a menu is opened.
- gfx::Rect root_bounds = current_root->bounds();
-
- if (root_bounds.Contains(event->root_location())) {
- SwitchTargetRootWindow(current_root);
-
- OnMouseMove(event->root_location());
- }
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// PartialMagnificationController: aura::WindowObserver implementation
-
-void PartialMagnificationController::OnWindowDestroying(
- aura::Window* window) {
- CloseMagnifierWindow();
-
- aura::Window* new_root_window = GetCurrentRootWindow();
- if (new_root_window != window)
- SwitchTargetRootWindow(new_root_window);
-}
-
-void PartialMagnificationController::OnWidgetDestroying(
- views::Widget* widget) {
- DCHECK_EQ(widget, zoom_widget_);
- RemoveZoomWidgetObservers();
- zoom_widget_ = NULL;
-}
-
-void PartialMagnificationController::OnMouseMove(
- const gfx::Point& location_in_root) {
- gfx::Point origin(location_in_root);
-
- origin.Offset(-kMagnifierWidth / 2, -kMagnifierHeight / 2);
-
- if (zoom_widget_) {
- zoom_widget_->SetBounds(gfx::Rect(origin.x(), origin.y(),
- kMagnifierWidth, kMagnifierHeight));
- }
-}
-
-bool PartialMagnificationController::IsPartialMagnified() const {
- return scale_ >= kMinPartialMagnifiedScaleThreshold;
-}
-
-void PartialMagnificationController::CreateMagnifierWindow() {
- if (zoom_widget_)
- return;
-
- aura::Window* root_window = GetCurrentRootWindow();
- if (!root_window)
- return;
-
- root_window->AddObserver(this);
-
- gfx::Point mouse(root_window->GetDispatcher()->GetLastMouseLocationInRoot());
-
- zoom_widget_ = new views::Widget;
- views::Widget::InitParams params(
- views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- params.can_activate = false;
- params.accept_events = false;
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- params.parent = root_window;
- zoom_widget_->Init(params);
- zoom_widget_->SetBounds(gfx::Rect(mouse.x() - kMagnifierWidth / 2,
- mouse.y() - kMagnifierHeight / 2,
- kMagnifierWidth, kMagnifierHeight));
- zoom_widget_->set_focus_on_creation(false);
- zoom_widget_->Show();
-
- aura::Window* window = zoom_widget_->GetNativeView();
- window->SetName(kPartialMagniferWindowName);
-
- zoom_widget_->GetNativeView()->layer()->SetBounds(
- gfx::Rect(0, 0,
- kMagnifierWidth,
- kMagnifierHeight));
- zoom_widget_->GetNativeView()->layer()->SetBackgroundZoom(
- scale_,
- kZoomInset);
-
- zoom_widget_->AddObserver(this);
-}
-
-void PartialMagnificationController::CloseMagnifierWindow() {
- if (zoom_widget_) {
- RemoveZoomWidgetObservers();
- zoom_widget_->Close();
- zoom_widget_ = NULL;
- }
-}
-
-void PartialMagnificationController::RemoveZoomWidgetObservers() {
- DCHECK(zoom_widget_);
- zoom_widget_->RemoveObserver(this);
- aura::Window* root_window =
- zoom_widget_->GetNativeView()->GetRootWindow();
- DCHECK(root_window);
- root_window->RemoveObserver(this);
-}
-
-void PartialMagnificationController::SwitchTargetRootWindow(
- aura::Window* new_root_window) {
- if (zoom_widget_ &&
- new_root_window == zoom_widget_->GetNativeView()->GetRootWindow())
- return;
-
- CloseMagnifierWindow();
-
- // Recreate the magnifier window by updating the scale factor.
- SetScale(GetScale());
-}
-
-aura::Window* PartialMagnificationController::GetCurrentRootWindow() {
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- for (aura::Window::Windows::const_iterator iter = root_windows.begin();
- iter != root_windows.end(); ++iter) {
- aura::Window* root_window = *iter;
- if (root_window->ContainsPointInRoot(
- root_window->GetDispatcher()->GetLastMouseLocationInRoot()))
- return root_window;
- }
- return NULL;
-}
-
-} // namespace ash
diff --git a/chromium/ash/magnifier/partial_magnification_controller.h b/chromium/ash/magnifier/partial_magnification_controller.h
deleted file mode 100644
index eaecd1297e8..00000000000
--- a/chromium/ash/magnifier/partial_magnification_controller.h
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_
-#define ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_
-
-#include "ui/aura/window_observer.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/point.h"
-#include "ui/views/widget/widget_observer.h"
-
-namespace ash {
-
-const float kDefaultPartialMagnifiedScale = 1.5f;
-const float kNonPartialMagnifiedScale = 1.0f;
-
-// Controls the partial screen magnifier, which is a small area of the screen
-// which is zoomed in. The zoomed area follows the mouse cursor when enabled.
-class PartialMagnificationController
- : public ui::EventHandler,
- public aura::WindowObserver,
- public views::WidgetObserver {
- public:
- PartialMagnificationController();
- virtual ~PartialMagnificationController();
-
- // Enables (or disables if |enabled| is false) partial screen magnifier
- // feature.
- virtual void SetEnabled(bool enabled);
-
- bool is_enabled() const { return is_enabled_; }
-
- // Sets the magnification ratio. 1.0f means no magnification.
- void SetScale(float scale);
-
- // Returns the current magnification ratio.
- float GetScale() const { return scale_; }
-
- private:
- void OnMouseMove(const gfx::Point& location_in_root);
-
- // Switch PartialMagnified RootWindow to |new_root_window|. This does
- // following:
- // - Remove the magnifier from the current root window.
- // - Create a magnifier in the new root_window |new_root_window|.
- // - Switch the target window from current window to |new_root_window|.
- void SwitchTargetRootWindow(aura::Window* new_root_window);
-
- // Returns the root window that contains the mouse cursor.
- aura::Window* GetCurrentRootWindow();
-
- // Return true if the magnification scale > kMinPartialMagnifiedScaleThreshold
- bool IsPartialMagnified() const;
-
- // Create the magnifier window.
- void CreateMagnifierWindow();
-
- // Cleans up the window if needed.
- void CloseMagnifierWindow();
-
- // Removes this as an observer of the zoom widget and the root window.
- void RemoveZoomWidgetObservers();
-
- // ui::EventHandler overrides:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
-
- // Overridden from WindowObserver:
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
-
- // Overridden from WidgetObserver:
- virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
-
- // True if the magnified window is in motion of zooming or un-zooming effect.
- // Otherwise, false.
- bool is_on_zooming_;
-
- bool is_enabled_;
-
- // Current scale, origin (left-top) position of the magnification window.
- float scale_;
- gfx::Point origin_;
-
- views::Widget* zoom_widget_;
-
- DISALLOW_COPY_AND_ASSIGN(PartialMagnificationController);
-};
-
-} // namespace ash
-
-#endif // ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_
diff --git a/chromium/ash/media_delegate.h b/chromium/ash/media_delegate.h
deleted file mode 100644
index 1dac0592548..00000000000
--- a/chromium/ash/media_delegate.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_MEDIA_DELEGATE_H_
-#define ASH_MEDIA_DELEGATE_H_
-
-namespace ash {
-
-// A delegate class to control media playback.
-class MediaDelegate {
- public:
- virtual ~MediaDelegate() {}
-
- // Handles the Next Track Media shortcut key.
- virtual void HandleMediaNextTrack() = 0;
-
- // Handles the Play/Pause Toggle Media shortcut key.
- virtual void HandleMediaPlayPause() = 0;
-
- // Handles the Previous Track Media shortcut key.
- virtual void HandleMediaPrevTrack() = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_MEDIA_DELEGATE_H_
diff --git a/chromium/ash/metrics/user_metrics_recorder.cc b/chromium/ash/metrics/user_metrics_recorder.cc
deleted file mode 100644
index b0c384f91a2..00000000000
--- a/chromium/ash/metrics/user_metrics_recorder.cc
+++ /dev/null
@@ -1,415 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/metrics/user_metrics_recorder.h"
-
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_view.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/wm/window_state.h"
-#include "base/metrics/histogram.h"
-#include "content/public/browser/user_metrics.h"
-
-namespace ash {
-
-// Time in seconds between calls to "RecordPeriodicMetrics".
-const int kAshPeriodicMetricsTimeInSeconds = 30 * 60;
-
-UserMetricsRecorder::UserMetricsRecorder() {
- timer_.Start(FROM_HERE,
- base::TimeDelta::FromSeconds(kAshPeriodicMetricsTimeInSeconds),
- this,
- &UserMetricsRecorder::RecordPeriodicMetrics);
-}
-
-UserMetricsRecorder::~UserMetricsRecorder() {
- timer_.Stop();
-}
-
-void UserMetricsRecorder::RecordUserMetricsAction(UserMetricsAction action) {
- switch (action) {
- case ash::UMA_ACCEL_KEYBOARD_BRIGHTNESS_DOWN_F6:
- content::RecordAction(
- content::UserMetricsAction("Accel_KeyboardBrightnessDown_F6"));
- break;
- case ash::UMA_ACCEL_KEYBOARD_BRIGHTNESS_UP_F7:
- content::RecordAction(
- content::UserMetricsAction("Accel_KeyboardBrightnessUp_F7"));
- break;
- case ash::UMA_ACCEL_LOCK_SCREEN_LOCK_BUTTON:
- content::RecordAction(
- content::UserMetricsAction("Accel_LockScreen_LockButton"));
- break;
- case ash::UMA_ACCEL_LOCK_SCREEN_POWER_BUTTON:
- content::RecordAction(
- content::UserMetricsAction("Accel_LockScreen_PowerButton"));
- break;
- case ash::UMA_ACCEL_MAXIMIZE_RESTORE_F4:
- content::RecordAction(
- content::UserMetricsAction("Accel_Maximize_Restore_F4"));
- break;
- case ash::UMA_ACCEL_PREVWINDOW_F5:
- content::RecordAction(content::UserMetricsAction("Accel_PrevWindow_F5"));
- break;
- case ash::UMA_ACCEL_EXIT_FIRST_Q:
- content::RecordAction(content::UserMetricsAction("Accel_Exit_First_Q"));
- break;
- case ash::UMA_ACCEL_EXIT_SECOND_Q:
- content::RecordAction(content::UserMetricsAction("Accel_Exit_Second_Q"));
- break;
- case ash::UMA_ACCEL_SHUT_DOWN_POWER_BUTTON:
- content::RecordAction(
- content::UserMetricsAction("Accel_ShutDown_PowerButton"));
- break;
- case ash::UMA_CLOSE_THROUGH_CONTEXT_MENU:
- content::RecordAction(content::UserMetricsAction("CloseFromContextMenu"));
- break;
- case ash::UMA_GESTURE_OVERVIEW:
- content::RecordAction(content::UserMetricsAction("Gesture_Overview"));
- break;
- case ash::UMA_LAUNCHER_CLICK_ON_APP:
- content::RecordAction(content::UserMetricsAction("Launcher_ClickOnApp"));
- break;
- case ash::UMA_LAUNCHER_CLICK_ON_APPLIST_BUTTON:
- content::RecordAction(
- content::UserMetricsAction("Launcher_ClickOnApplistButton"));
- break;
- case ash::UMA_MOUSE_DOWN:
- content::RecordAction(content::UserMetricsAction("Mouse_Down"));
- break;
- case ash::UMA_SHELF_ALIGNMENT_SET_BOTTOM:
- content::RecordAction(
- content::UserMetricsAction("Shelf_AlignmentSetBottom"));
- break;
- case ash::UMA_SHELF_ALIGNMENT_SET_LEFT:
- content::RecordAction(
- content::UserMetricsAction("Shelf_AlignmentSetLeft"));
- break;
- case ash::UMA_SHELF_ALIGNMENT_SET_RIGHT:
- content::RecordAction(
- content::UserMetricsAction("Shelf_AlignmentSetRight"));
- case ash::UMA_STATUS_AREA_AUDIO_CURRENT_INPUT_DEVICE:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Audio_CurrentInputDevice"));
- break;
- case ash::UMA_STATUS_AREA_AUDIO_CURRENT_OUTPUT_DEVICE:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Audio_CurrentOutputDevice"));
- break;
- case ash::UMA_STATUS_AREA_AUDIO_SWITCH_INPUT_DEVICE:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Audio_SwitchInputDevice"));
- break;
- case ash::UMA_STATUS_AREA_AUDIO_SWITCH_OUTPUT_DEVICE:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Audio_SwitchOutputDevice"));
- break;
- case ash::UMA_STATUS_AREA_BRIGHTNESS_CHANGED:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_BrightnessChanged"));
- break;
- case ash::UMA_STATUS_AREA_BLUETOOTH_CONNECT_KNOWN_DEVICE:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Bluetooth_Connect_Known"));
- break;
- case ash::UMA_STATUS_AREA_BLUETOOTH_CONNECT_UNKNOWN_DEVICE:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Bluetooth_Connect_Unknown"));
- break;
- case ash::UMA_STATUS_AREA_BLUETOOTH_DISABLED:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Bluetooth_Disabled"));
- break;
- case ash::UMA_STATUS_AREA_BLUETOOTH_ENABLED:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Bluetooth_Enabled"));
- break;
- case ash::UMA_STATUS_AREA_CAPS_LOCK_DETAILED:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_CapsLock_Detailed"));
- break;
- case ash::UMA_STATUS_AREA_CAPS_LOCK_DISABLED_BY_CLICK:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_CapsLock_DisabledByClick"));
- break;
- case ash::UMA_STATUS_AREA_CAPS_LOCK_ENABLED_BY_CLICK:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_CapsLock_EnabledByClick"));
- break;
- case ash::UMA_STATUS_AREA_CAPS_LOCK_POPUP:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_CapsLock_Popup"));
- break;
- case ash::UMA_STATUS_AREA_CONNECT_TO_CONFIGURED_NETWORK:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Network_ConnectConfigured"));
- break;
- case ash::UMA_STATUS_AREA_CONNECT_TO_UNCONFIGURED_NETWORK:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Network_ConnectUnconfigured"));
- break;
- case ash::UMA_STATUS_AREA_CONNECT_TO_VPN:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_VPN_ConnectToNetwork"));
- break;
- case ash::UMA_STATUS_AREA_CHANGED_VOLUME_MENU:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Volume_ChangedMenu"));
- break;
- case ash::UMA_STATUS_AREA_CHANGED_VOLUME_POPUP:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Volume_ChangedPopup"));
- break;
- case ash::UMA_STATUS_AREA_DETAILED_ACCESSABILITY:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Accessability_DetailedView"));
- break;
- case ash::UMA_STATUS_AREA_DETAILED_AUDIO_VIEW:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Audio_Detailed"));
- break;
- case ash::UMA_STATUS_AREA_DETAILED_BLUETOOTH_VIEW:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Bluetooth_Detailed"));
- break;
- case ash::UMA_STATUS_AREA_DETAILED_BRIGHTNESS_VIEW:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Brightness_Detailed"));
- break;
- case ash::UMA_STATUS_AREA_DETAILED_DRIVE_VIEW:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Drive_Detailed"));
- break;
- case ash::UMA_STATUS_AREA_DETAILED_NETWORK_VIEW:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Network_Detailed"));
- break;
- case ash::UMA_STATUS_AREA_DETAILED_VPN_VIEW:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_VPN_Detailed"));
- break;
- case ash::UMA_STATUS_AREA_DISABLE_AUTO_CLICK:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_AutoClickDisabled"));
- break;
- case ash::UMA_STATUS_AREA_DISABLE_HIGH_CONTRAST:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_HighContrastDisabled"));
- break;
- case ash::UMA_STATUS_AREA_DISABLE_LARGE_CURSOR:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_LargeCursorDisabled"));
- break;
- case ash::UMA_STATUS_AREA_DISABLE_MAGNIFIER:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_MagnifierDisabled"));
- break;
- case ash::UMA_STATUS_AREA_DISABLE_SPOKEN_FEEDBACK:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_SpokenFeedbackDisabled"));
- break;
- case ash::UMA_STATUS_AREA_DISABLE_WIFI:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Network_WifiDisabled"));
- break;
- case ash::UMA_STATUS_AREA_DRIVE_CANCEL_OPERATION:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Drive_CancelOperation"));
- break;
- case ash::UMA_STATUS_AREA_DRIVE_SETTINGS:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Drive_Settings"));
- break;
- case ash::UMA_STATUS_AREA_ENABLE_AUTO_CLICK:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_AutoClickEnabled"));
- break;
- case ash::UMA_STATUS_AREA_ENABLE_HIGH_CONTRAST:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_HighContrastEnabled"));
- break;
- case ash::UMA_STATUS_AREA_ENABLE_LARGE_CURSOR:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_LargeCursorEnabled"));
- break;
- case ash::UMA_STATUS_AREA_ENABLE_MAGNIFIER:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_MagnifierEnabled"));
- break;
- case ash::UMA_STATUS_AREA_ENABLE_SPOKEN_FEEDBACK:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_SpokenFeedbackEnabled"));
- break;
- case ash::UMA_STATUS_AREA_ENABLE_WIFI:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Network_WifiEnabled"));
- break;
- case ash::UMA_STATUS_AREA_IME_SHOW_DETAILED:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_IME_Detailed"));
- break;
- case ash::UMA_STATUS_AREA_IME_SWITCH_MODE:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_IME_SwitchMode"));
- break;
- case ash::UMA_STATUS_AREA_MENU_OPENED:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_MenuOpened"));
- break;
- case ash::UMA_STATUS_AREA_NETWORK_JOIN_OTHER_CLICKED:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Network_JoinOther"));
- break;
- case ash::UMA_STATUS_AREA_NETWORK_SETTINGS_CLICKED:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Network_Settings"));
- break;
- case ash::UMA_STATUS_AREA_SHOW_NETWORK_CONNECTION_DETAILS:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_Network_ConnectionDetails"));
- break;
- case ash::UMA_STATUS_AREA_SHOW_VPN_CONNECTION_DETAILS:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_VPN_ConnectionDetails"));
- break;
- case ash::UMA_STATUS_AREA_SIGN_OUT:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_SignOut"));
- break;
- case ash::UMA_STATUS_AREA_VPN_JOIN_OTHER_CLICKED:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_VPN_JoinOther"));
- break;
- case ash::UMA_STATUS_AREA_VPN_SETTINGS_CLICKED:
- content::RecordAction(
- content::UserMetricsAction("StatusArea_VPN_Settings"));
- break;
- case ash::UMA_TOGGLE_MAXIMIZE_CAPTION_CLICK:
- content::RecordAction(
- content::UserMetricsAction("Caption_ClickTogglesMaximize"));
- break;
- case ash::UMA_TOGGLE_MAXIMIZE_CAPTION_GESTURE:
- content::RecordAction(
- content::UserMetricsAction("Caption_GestureTogglesMaximize"));
- break;
- case ash::UMA_TOUCHPAD_GESTURE_OVERVIEW:
- content::RecordAction(
- content::UserMetricsAction("Touchpad_Gesture_Overview"));
- break;
- case ash::UMA_TOUCHSCREEN_TAP_DOWN:
- content::RecordAction(content::UserMetricsAction("Touchscreen_Down"));
- break;
- case ash::UMA_TRAY_HELP:
- content::RecordAction(content::UserMetricsAction("Tray_Help"));
- break;
- case ash::UMA_TRAY_LOCK_SCREEN:
- content::RecordAction(content::UserMetricsAction("Tray_LockScreen"));
- break;
- case ash::UMA_TRAY_SHUT_DOWN:
- content::RecordAction(content::UserMetricsAction("Tray_ShutDown"));
- break;
- case ash::UMA_WINDOW_APP_CLOSE_BUTTON_CLICK:
- content::RecordAction(content::UserMetricsAction("AppCloseButton_Clk"));
- break;
- case ash::UMA_WINDOW_CLOSE_BUTTON_CLICK:
- content::RecordAction(content::UserMetricsAction("CloseButton_Clk"));
- break;
- case ash::UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_EXIT_FULLSCREEN:
- content::RecordAction(content::UserMetricsAction("MaxButton_Clk_ExitFS"));
- break;
- case ash::UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_RESTORE:
- content::RecordAction(
- content::UserMetricsAction("MaxButton_Clk_Restore"));
- break;
- case ash::UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_MAXIMIZE:
- content::RecordAction(
- content::UserMetricsAction("MaxButton_Clk_Maximize"));
- break;
- case ash::UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_MINIMIZE:
- content::RecordAction(content::UserMetricsAction("MinButton_Clk"));
- break;
- case ash::UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE:
- content::RecordAction(content::UserMetricsAction("MaxButton_Maximize"));
- break;
- case ash::UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE_LEFT:
- content::RecordAction(content::UserMetricsAction("MaxButton_MaxLeft"));
- break;
- case ash::UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE_RIGHT:
- content::RecordAction(content::UserMetricsAction("MaxButton_MaxRight"));
- break;
- case ash::UMA_WINDOW_MAXIMIZE_BUTTON_MINIMIZE:
- content::RecordAction(content::UserMetricsAction("MaxButton_Minimize"));
- break;
- case ash::UMA_WINDOW_MAXIMIZE_BUTTON_RESTORE:
- content::RecordAction(content::UserMetricsAction("MaxButton_Restore"));
- break;
- case ash::UMA_WINDOW_MAXIMIZE_BUTTON_SHOW_BUBBLE:
- content::RecordAction(content::UserMetricsAction("MaxButton_ShowBubble"));
- break;
- case ash::UMA_WINDOW_OVERVIEW:
- content::RecordAction(
- content::UserMetricsAction("WindowSelector_Overview"));
- break;
- case ash::UMA_WINDOW_SELECTION:
- content::RecordAction(
- content::UserMetricsAction("WindowSelector_Selection"));
- break;
- }
-}
-
-void UserMetricsRecorder::RecordPeriodicMetrics() {
- internal::ShelfLayoutManager* manager =
- internal::ShelfLayoutManager::ForLauncher(Shell::GetPrimaryRootWindow());
- if (manager) {
- UMA_HISTOGRAM_ENUMERATION("Ash.ShelfAlignmentOverTime",
- manager->SelectValueForShelfAlignment(
- internal::SHELF_ALIGNMENT_UMA_ENUM_VALUE_BOTTOM,
- internal::SHELF_ALIGNMENT_UMA_ENUM_VALUE_LEFT,
- internal::SHELF_ALIGNMENT_UMA_ENUM_VALUE_RIGHT,
- -1),
- internal::SHELF_ALIGNMENT_UMA_ENUM_VALUE_COUNT);
- }
-
- enum ActiveWindowShowType {
- ACTIVE_WINDOW_SHOW_TYPE_NO_ACTIVE_WINDOW,
- ACTIVE_WINDOW_SHOW_TYPE_OTHER,
- ACTIVE_WINDOW_SHOW_TYPE_MAXIMIZED,
- ACTIVE_WINDOW_SHOW_TYPE_FULLSCREEN,
- ACTIVE_WINDOW_SHOW_TYPE_SNAPPED,
- ACTIVE_WINDOW_SHOW_TYPE_COUNT
- };
-
- ActiveWindowShowType active_window_show_type =
- ACTIVE_WINDOW_SHOW_TYPE_NO_ACTIVE_WINDOW;
- wm::WindowState* active_window_state = ash::wm::GetActiveWindowState();
- if (active_window_state) {
- switch(active_window_state->window_show_type()) {
- case wm::SHOW_TYPE_MAXIMIZED:
- active_window_show_type = ACTIVE_WINDOW_SHOW_TYPE_MAXIMIZED;
- break;
- case wm::SHOW_TYPE_FULLSCREEN:
- active_window_show_type = ACTIVE_WINDOW_SHOW_TYPE_FULLSCREEN;
- break;
- case wm::SHOW_TYPE_LEFT_SNAPPED:
- case wm::SHOW_TYPE_RIGHT_SNAPPED:
- active_window_show_type = ACTIVE_WINDOW_SHOW_TYPE_SNAPPED;
- break;
- case wm::SHOW_TYPE_DEFAULT:
- case wm::SHOW_TYPE_NORMAL:
- case wm::SHOW_TYPE_MINIMIZED:
- case wm::SHOW_TYPE_INACTIVE:
- case wm::SHOW_TYPE_DETACHED:
- case wm::SHOW_TYPE_END:
- case wm::SHOW_TYPE_AUTO_POSITIONED:
- active_window_show_type = ACTIVE_WINDOW_SHOW_TYPE_OTHER;
- break;
- }
- }
- UMA_HISTOGRAM_ENUMERATION("Ash.ActiveWindowShowTypeOverTime",
- active_window_show_type,
- ACTIVE_WINDOW_SHOW_TYPE_COUNT);
-}
-
-} // namespace ash
diff --git a/chromium/ash/metrics/user_metrics_recorder.h b/chromium/ash/metrics/user_metrics_recorder.h
deleted file mode 100644
index dc7043bc3d2..00000000000
--- a/chromium/ash/metrics/user_metrics_recorder.h
+++ /dev/null
@@ -1,129 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_USER_METRICS_RECORDER_H_
-#define ASH_USER_METRICS_RECORDER_H_
-
-#include "ash/ash_export.h"
-#include "base/timer/timer.h"
-
-namespace ash {
-
-enum UserMetricsAction {
- UMA_ACCEL_KEYBOARD_BRIGHTNESS_DOWN_F6,
- UMA_ACCEL_KEYBOARD_BRIGHTNESS_UP_F7,
- UMA_ACCEL_LOCK_SCREEN_LOCK_BUTTON,
- UMA_ACCEL_LOCK_SCREEN_POWER_BUTTON,
- UMA_ACCEL_MAXIMIZE_RESTORE_F4,
- UMA_ACCEL_PREVWINDOW_F5,
- UMA_ACCEL_EXIT_FIRST_Q,
- UMA_ACCEL_EXIT_SECOND_Q,
- UMA_ACCEL_SHUT_DOWN_POWER_BUTTON,
- UMA_CLOSE_THROUGH_CONTEXT_MENU,
- UMA_GESTURE_OVERVIEW,
- UMA_LAUNCHER_CLICK_ON_APP,
- UMA_LAUNCHER_CLICK_ON_APPLIST_BUTTON,
- UMA_MOUSE_DOWN,
- UMA_SHELF_ALIGNMENT_SET_BOTTOM,
- UMA_SHELF_ALIGNMENT_SET_LEFT,
- UMA_SHELF_ALIGNMENT_SET_RIGHT,
- UMA_STATUS_AREA_AUDIO_CURRENT_INPUT_DEVICE,
- UMA_STATUS_AREA_AUDIO_CURRENT_OUTPUT_DEVICE,
- UMA_STATUS_AREA_AUDIO_SWITCH_INPUT_DEVICE,
- UMA_STATUS_AREA_AUDIO_SWITCH_OUTPUT_DEVICE,
- UMA_STATUS_AREA_BRIGHTNESS_CHANGED,
- UMA_STATUS_AREA_BLUETOOTH_CONNECT_KNOWN_DEVICE,
- UMA_STATUS_AREA_BLUETOOTH_CONNECT_UNKNOWN_DEVICE,
- UMA_STATUS_AREA_BLUETOOTH_DISABLED,
- UMA_STATUS_AREA_BLUETOOTH_ENABLED,
- UMA_STATUS_AREA_CAPS_LOCK_DETAILED,
- UMA_STATUS_AREA_CAPS_LOCK_DISABLED_BY_CLICK,
- UMA_STATUS_AREA_CAPS_LOCK_ENABLED_BY_CLICK,
- UMA_STATUS_AREA_CAPS_LOCK_POPUP,
- UMA_STATUS_AREA_CONNECT_TO_CONFIGURED_NETWORK,
- UMA_STATUS_AREA_CONNECT_TO_UNCONFIGURED_NETWORK,
- UMA_STATUS_AREA_CONNECT_TO_VPN,
- UMA_STATUS_AREA_CHANGED_VOLUME_MENU,
- UMA_STATUS_AREA_CHANGED_VOLUME_POPUP,
- UMA_STATUS_AREA_DETAILED_ACCESSABILITY,
- UMA_STATUS_AREA_DETAILED_AUDIO_VIEW,
- UMA_STATUS_AREA_DETAILED_BLUETOOTH_VIEW,
- UMA_STATUS_AREA_DETAILED_BRIGHTNESS_VIEW,
- UMA_STATUS_AREA_DETAILED_DRIVE_VIEW,
- UMA_STATUS_AREA_DETAILED_NETWORK_VIEW,
- UMA_STATUS_AREA_DETAILED_VPN_VIEW,
- UMA_STATUS_AREA_DISABLE_AUTO_CLICK,
- UMA_STATUS_AREA_DISABLE_HIGH_CONTRAST,
- UMA_STATUS_AREA_DISABLE_LARGE_CURSOR,
- UMA_STATUS_AREA_DISABLE_MAGNIFIER,
- UMA_STATUS_AREA_DISABLE_SPOKEN_FEEDBACK,
- UMA_STATUS_AREA_DISABLE_WIFI,
- UMA_STATUS_AREA_DRIVE_CANCEL_OPERATION,
- UMA_STATUS_AREA_DRIVE_SETTINGS,
- UMA_STATUS_AREA_ENABLE_AUTO_CLICK,
- UMA_STATUS_AREA_ENABLE_HIGH_CONTRAST,
- UMA_STATUS_AREA_ENABLE_LARGE_CURSOR,
- UMA_STATUS_AREA_ENABLE_MAGNIFIER,
- UMA_STATUS_AREA_ENABLE_SPOKEN_FEEDBACK,
- UMA_STATUS_AREA_ENABLE_WIFI,
- UMA_STATUS_AREA_IME_SHOW_DETAILED,
- UMA_STATUS_AREA_IME_SWITCH_MODE,
- UMA_STATUS_AREA_MENU_OPENED,
- UMA_STATUS_AREA_NETWORK_JOIN_OTHER_CLICKED,
- UMA_STATUS_AREA_NETWORK_SETTINGS_CLICKED,
- UMA_STATUS_AREA_SHOW_NETWORK_CONNECTION_DETAILS,
- UMA_STATUS_AREA_SHOW_VPN_CONNECTION_DETAILS,
- UMA_STATUS_AREA_SIGN_OUT,
- UMA_STATUS_AREA_VPN_JOIN_OTHER_CLICKED,
- UMA_STATUS_AREA_VPN_SETTINGS_CLICKED,
- UMA_TOGGLE_MAXIMIZE_CAPTION_CLICK,
- UMA_TOGGLE_MAXIMIZE_CAPTION_GESTURE,
- UMA_TOUCHPAD_GESTURE_OVERVIEW,
- UMA_TOUCHSCREEN_TAP_DOWN,
- UMA_TRAY_HELP,
- UMA_TRAY_LOCK_SCREEN,
- UMA_TRAY_SHUT_DOWN,
- UMA_WINDOW_APP_CLOSE_BUTTON_CLICK,
- UMA_WINDOW_CLOSE_BUTTON_CLICK,
- UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_EXIT_FULLSCREEN,
- UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_MAXIMIZE,
- UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_MINIMIZE,
- UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_RESTORE,
- UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE,
- UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE_LEFT,
- UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE_RIGHT,
- UMA_WINDOW_MAXIMIZE_BUTTON_MINIMIZE,
- UMA_WINDOW_MAXIMIZE_BUTTON_RESTORE,
- UMA_WINDOW_MAXIMIZE_BUTTON_SHOW_BUBBLE,
-
- // Thumbnail sized overview of windows triggered. This is a subset of
- // UMA_WINDOW_SELECTION triggered by lingering during alt+tab cycles or
- // pressing the overview key.
- UMA_WINDOW_OVERVIEW,
-
- // Window selection started by beginning an alt+tab cycle or pressing the
- // overview key. This does not count each step through an alt+tab cycle.
- UMA_WINDOW_SELECTION,
-};
-
-// User Metrics Recorder provides a repeating callback (RecordPeriodicMetrics)
-// on a timer to allow recording of state data over time to the UMA records.
-// Any additional states (in ash) that require monitoring can be added to
-// this class. As well calls to record on action metrics
-// (RecordUserMetricsAction) are passed through the UserMetricsRecorder.
-class ASH_EXPORT UserMetricsRecorder {
- public:
- UserMetricsRecorder();
- ~UserMetricsRecorder();
-
- void RecordUserMetricsAction(ash::UserMetricsAction action);
- private:
- void RecordPeriodicMetrics();
-
- base::RepeatingTimer<UserMetricsRecorder> timer_;
-};
-
-} // namespace ash
-
-#endif // ASH_USER_METRICS_RECORDER_H_
diff --git a/chromium/ash/multi_profile_uma.cc b/chromium/ash/multi_profile_uma.cc
deleted file mode 100644
index cbf3b059a35..00000000000
--- a/chromium/ash/multi_profile_uma.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/multi_profile_uma.h"
-
-#include "base/metrics/histogram.h"
-
-namespace ash {
-
-// static
-void MultiProfileUMA::RecordSessionMode(SessionMode action) {
- UMA_HISTOGRAM_ENUMERATION("MultiProfile.SessionMode",
- action,
- NUM_SESSION_MODES);
-}
-
-// static
-void MultiProfileUMA::RecordSigninUser(SigninUserAction action) {
- UMA_HISTOGRAM_ENUMERATION("MultiProfile.SigninUserUIPath",
- action,
- NUM_SIGNIN_USER_ACTIONS);
-}
-
-// static
-void MultiProfileUMA::RecordSwitchActiveUser(SwitchActiveUserAction action) {
- UMA_HISTOGRAM_ENUMERATION("MultiProfile.SwitchActiveUserUIPath",
- action,
- NUM_SWITCH_ACTIVE_USER_ACTIONS);
-}
-
-// static
-void MultiProfileUMA::RecordTeleportWindowType(TeleportWindowType window_type) {
- UMA_HISTOGRAM_ENUMERATION("MultiProfile.TeleportWindowType",
- window_type,
- NUM_TELEPORT_WINDOW_TYPES);
-}
-
-// static
-void MultiProfileUMA::RecordTeleportAction(TeleportWindowAction action) {
- UMA_HISTOGRAM_ENUMERATION("MultiProfile.TeleportWindow",
- action,
- NUM_TELEPORT_WINDOW_ACTIONS);
-}
-
-// static
-void MultiProfileUMA::RecordUserCount(int number_of_users) {
- UMA_HISTOGRAM_COUNTS_100("MultiProfile.UsersPerSession", number_of_users);
-}
-
-// static
-void MultiProfileUMA::RecordDiscardedTab(int number_of_users) {
- UMA_HISTOGRAM_COUNTS_100("MultiProfile.DiscardedTabsPerUser",
- number_of_users);
-}
-
-} // namespace ash
diff --git a/chromium/ash/multi_profile_uma.h b/chromium/ash/multi_profile_uma.h
deleted file mode 100644
index 937b4d818e1..00000000000
--- a/chromium/ash/multi_profile_uma.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_MULTI_PROFILE_UMA_H_
-#define ASH_MULTI_PROFILE_UMA_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-
-namespace ash {
-
-// Records UMA statistics for multiprofile actions.
-// Note: There is also an action to switch profile windows from the
-// browser frame that is recorded by the "Profile.OpenMethod" metric.
-class ASH_EXPORT MultiProfileUMA {
- public:
- // Keep these enums up to date with tools/metrics/histograms/histograms.xml.
- enum SessionMode {
- SESSION_SINGLE_USER_MODE = 0,
- SESSION_SIDE_BY_SIDE_MODE,
- SESSION_SEPARATE_DESKTOP_MODE,
- NUM_SESSION_MODES
- };
-
- enum SigninUserAction {
- SIGNIN_USER_BY_TRAY = 0,
- SIGNIN_USER_BY_BROWSER_FRAME,
- NUM_SIGNIN_USER_ACTIONS
- };
-
- enum SwitchActiveUserAction {
- SWITCH_ACTIVE_USER_BY_TRAY = 0,
- SWITCH_ACTIVE_USER_BY_ACCELERATOR,
- NUM_SWITCH_ACTIVE_USER_ACTIONS
- };
-
- enum TeleportWindowType {
- TELEPORT_WINDOW_BROWSER = 0,
- TELEPORT_WINDOW_INCOGNITO_BROWSER,
- TELEPORT_WINDOW_V1_APP,
- TELEPORT_WINDOW_V2_APP,
- TELEPORT_WINDOW_PANEL,
- TELEPORT_WINDOW_POPUP,
- TELEPORT_WINDOW_UNKNOWN,
- NUM_TELEPORT_WINDOW_TYPES
- };
-
- enum TeleportWindowAction {
- TELEPORT_WINDOW_DRAG_AND_DROP = 0,
- TELEPORT_WINDOW_CAPTION_MENU,
- TELEPORT_WINDOW_RETURN_BY_MINIMIZE,
- TELEPORT_WINDOW_RETURN_BY_LAUNCHER,
- NUM_TELEPORT_WINDOW_ACTIONS
- };
-
- // Record the type of user (multi profile) session.
- static void RecordSessionMode(SessionMode mode);
-
- // Record signing in a new user and what UI path was taken.
- static void RecordSigninUser(SigninUserAction action);
-
- // Record switching the active user and what UI path was taken.
- static void RecordSwitchActiveUser(SwitchActiveUserAction action);
-
- // Record the type of window which got teleported to another desk.
- static void RecordTeleportWindowType(TeleportWindowType window_type);
-
- // Record the way and how many times a window got teleported to another desk.
- static void RecordTeleportAction(TeleportWindowAction action);
-
- // Record number of users joined into a session. Called upon logout.
- static void RecordUserCount(int number_of_users);
-
- // Record a discarded tab in the number of running users bucket.
- static void RecordDiscardedTab(int number_of_users);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(MultiProfileUMA);
-};
-
-} // namespace ash
-
-#endif // ASH_MULTI_PROFILE_UMA_H_
diff --git a/chromium/ash/new_window_delegate.h b/chromium/ash/new_window_delegate.h
deleted file mode 100644
index 57319af1bf0..00000000000
--- a/chromium/ash/new_window_delegate.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_NEW_WINDOW_DELEGATE_H_
-#define ASH_NEW_WINDOW_DELEGATE_H_
-
-namespace ash {
-
-// A delegate class to create or open windows that are not a part of
-// ash.
-class NewWindowDelegate {
- public:
- virtual ~NewWindowDelegate() {}
-
- // Invoked when the user uses Ctrl+T to open a new tab.
- virtual void NewTab() = 0;
-
- // Invoked when the user uses Ctrl-N or Ctrl-Shift-N to open a new window.
- virtual void NewWindow(bool incognito) = 0;
-
- // Invoked when an accelerator is used to open the file manager.
- virtual void OpenFileManager() = 0;
-
- // Invoked when the user opens Crosh.
- virtual void OpenCrosh() = 0;
-
- // Invoked when the user uses Shift+Ctrl+T to restore the closed tab.
- virtual void RestoreTab() = 0;
-
- // Shows the keyboard shortcut overlay.
- virtual void ShowKeyboardOverlay() = 0;
-
- // Shows the task manager window.
- virtual void ShowTaskManager() = 0;
-
- // Opens the feedback page for "Report Issue".
- virtual void OpenFeedbackPage() = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_NEW_WINDOW_DELEGATE_H_
diff --git a/chromium/ash/popup_message.cc b/chromium/ash/popup_message.cc
deleted file mode 100644
index 612cee3c35c..00000000000
--- a/chromium/ash/popup_message.cc
+++ /dev/null
@@ -1,225 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/popup_message.h"
-
-#include "ash/wm/window_animations.h"
-#include "grit/ash_resources.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/insets.h"
-#include "ui/views/bubble/bubble_delegate.h"
-#include "ui/views/bubble/bubble_frame_view.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace {
-const int kMessageTopBottomMargin = 10;
-const int kMessageLeftRightMargin = 10;
-const int kMessageMinHeight = 29 - 2 * kMessageTopBottomMargin;
-const SkColor kMessageTextColor = SkColorSetRGB(0x22, 0x22, 0x22);
-
-// The maximum width of the Message bubble. Borrowed the value from
-// ash/message/message_controller.cc
-const int kMessageMaxWidth = 250;
-
-// The offset for the Message bubble - making sure that the bubble is flush
-// with the shelf. The offset includes the arrow size in pixels as well as
-// the activation bar and other spacing elements.
-const int kArrowOffsetLeftRight = 11;
-const int kArrowOffsetTopBottom = 7;
-
-// The number of pixels between the icon and the text.
-const int kHorizontalPopupPaddingBetweenItems = 10;
-
-// The number of pixels between the text items.
-const int kVerticalPopupPaddingBetweenItems = 10;
-} // namespace
-
-// The implementation of Message of the launcher.
-class PopupMessage::MessageBubble : public views::BubbleDelegateView {
- public:
- MessageBubble(const base::string16& caption,
- const base::string16& message,
- IconType message_type,
- views::View* anchor,
- views::BubbleBorder::Arrow arrow_orientation,
- const gfx::Size& size_override,
- int arrow_offset);
-
- void Close();
-
- private:
- // views::View overrides:
- virtual gfx::Size GetPreferredSize() OVERRIDE;
-
- // Each component (width/height) can force a size override for that component
- // if not 0.
- gfx::Size size_override_;
-
- DISALLOW_COPY_AND_ASSIGN(MessageBubble);
-};
-
-PopupMessage::MessageBubble::MessageBubble(const base::string16& caption,
- const base::string16& message,
- IconType message_type,
- views::View* anchor,
- views::BubbleBorder::Arrow arrow,
- const gfx::Size& size_override,
- int arrow_offset)
- : views::BubbleDelegateView(anchor, arrow),
- size_override_(size_override) {
- gfx::Insets insets = gfx::Insets(kArrowOffsetTopBottom,
- kArrowOffsetLeftRight,
- kArrowOffsetTopBottom,
- kArrowOffsetLeftRight);
- // An anchor can have an asymmetrical border for spacing reasons. Adjust the
- // anchor location for this.
- if (anchor->border())
- insets += anchor->border()->GetInsets();
-
- set_anchor_view_insets(insets);
- set_close_on_esc(false);
- set_close_on_deactivate(false);
- set_use_focusless(true);
- set_accept_events(false);
-
- set_margins(gfx::Insets(kMessageTopBottomMargin, kMessageLeftRightMargin,
- kMessageTopBottomMargin, kMessageLeftRightMargin));
- set_shadow(views::BubbleBorder::SMALL_SHADOW);
-
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0,
- kHorizontalPopupPaddingBetweenItems));
-
- // Here is the layout:
- // arrow_offset (if not 0)
- // |-------------|
- // | ^
- // +-------------------------------------------------+
- // -| |-
- // icon | [!] Caption in bold which can be multi line | caption_label
- // -| |-
- // | Message text which can be multi line | message_label
- // | as well. |
- // | |-
- // +-------------------------------------------------+
- // |------------details container--------------|
- // Note that the icon, caption and massage are optional.
-
- // Add the icon to the first column (if there is one).
- if (message_type != ICON_NONE) {
- views::ImageView* icon = new views::ImageView();
- icon->SetImage(
- bundle.GetImageNamed(IDR_AURA_WARNING_ICON).ToImageSkia());
- icon->SetVerticalAlignment(views::ImageView::LEADING);
- AddChildView(icon);
- }
-
- // Create a container for the text items and use it as second column.
- views::View* details = new views::View();
- AddChildView(details);
- details->SetLayoutManager(new views::BoxLayout(
- views::BoxLayout::kVertical, 0, 0, kVerticalPopupPaddingBetweenItems));
-
- // The caption label.
- if (!caption.empty()) {
- views::Label* caption_label = new views::Label(caption);
- caption_label->SetMultiLine(true);
- caption_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- caption_label->SetFont(bundle.GetFont(ui::ResourceBundle::BoldFont));
- caption_label->SetEnabledColor(kMessageTextColor);
- details->AddChildView(caption_label);
- }
-
- // The message label.
- if (!message.empty()) {
- views::Label* message_label = new views::Label(message);
- message_label->SetMultiLine(true);
- message_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- message_label->SetEnabledColor(kMessageTextColor);
- details->AddChildView(message_label);
- }
- views::BubbleDelegateView::CreateBubble(this);
-
- // Change the arrow offset if needed.
- if (arrow_offset) {
- // With the creation of the bubble, the bubble got already placed (and
- // possibly re-oriented to fit on the screen). Since it is not possible to
- // set the arrow offset before the creation, we need to set the offset,
- // and the orientation variables again and force a re-placement.
- GetBubbleFrameView()->bubble_border()->set_arrow_offset(arrow_offset);
- GetBubbleFrameView()->bubble_border()->set_arrow(arrow);
- SetAlignment(views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR);
- }
-}
-
-void PopupMessage::MessageBubble::Close() {
- if (GetWidget())
- GetWidget()->Close();
-}
-
-gfx::Size PopupMessage::MessageBubble::GetPreferredSize() {
- gfx::Size pref_size = views::BubbleDelegateView::GetPreferredSize();
- // Override the size with either the provided size or adjust it to not
- // violate our minimum / maximum sizes.
- if (size_override_.height())
- pref_size.set_height(size_override_.height());
- else if (pref_size.height() < kMessageMinHeight)
- pref_size.set_height(kMessageMinHeight);
-
- if (size_override_.width())
- pref_size.set_width(size_override_.width());
- else if (pref_size.width() > kMessageMaxWidth)
- pref_size.set_width(kMessageMaxWidth);
-
- return pref_size;
-}
-
-PopupMessage::PopupMessage(const base::string16& caption,
- const base::string16& message,
- IconType message_type,
- views::View* anchor,
- views::BubbleBorder::Arrow arrow,
- const gfx::Size& size_override,
- int arrow_offset)
- : view_(NULL) {
- view_ = new MessageBubble(
- caption, message, message_type, anchor, arrow, size_override,
- arrow_offset);
- widget_ = view_->GetWidget();
-
- gfx::NativeView native_view = widget_->GetNativeView();
- views::corewm::SetWindowVisibilityAnimationType(
- native_view, views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL);
- views::corewm::SetWindowVisibilityAnimationTransition(
- native_view, views::corewm::ANIMATE_HIDE);
- view_->GetWidget()->Show();
-}
-
-PopupMessage::~PopupMessage() {
- CancelHidingAnimation();
- Close();
-}
-
-void PopupMessage::Close() {
- if (view_) {
- view_->Close();
- view_ = NULL;
- widget_ = NULL;
- }
-}
-
-void PopupMessage::CancelHidingAnimation() {
- if (!widget_ || !widget_->GetNativeView())
- return;
-
- gfx::NativeView native_view = widget_->GetNativeView();
- views::corewm::SetWindowVisibilityAnimationTransition(
- native_view, views::corewm::ANIMATE_NONE);
-}
-
-} // namespace ash
diff --git a/chromium/ash/popup_message.h b/chromium/ash/popup_message.h
deleted file mode 100644
index 72a0cf54534..00000000000
--- a/chromium/ash/popup_message.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_POPUP_MESSAGE_H_
-#define ASH_POPUP_MESSAGE_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/strings/string16.h"
-#include "ui/gfx/rect.h"
-#include "ui/views/bubble/bubble_border.h"
-
-namespace views {
-class BubbleDelegateView;
-class Widget;
-}
-
-namespace ash {
-
-// PopupMessage shows a message to the user. Since the user is not able to
-// dismiss it, the calling code needs to explictly close and destroy it.
-class ASH_EXPORT PopupMessage {
- public:
- enum IconType {
- ICON_WARNING,
- ICON_NONE
- };
-
- // Creates a message pointing towards |anchor| with the requested
- // |arrow_orientation|. The message contains an optional |caption| which is
- // drawn in bold and an optional |message| together with an optional icon of
- // shape |message_type|. If a component in |size_override| is not 0 the value
- // is the used as output size. If |arrow_offset| is not 0, the number is the
- // arrow offset in pixels from the border.
- //
- // Here is the layout (arrow given as TOP_LEFT):
- // |--------|
- // | Anchor |
- // |--------|
- // |-arrow_offset---^
- // +-------------------------------------------------+
- // -| |-
- // icon | [!] Caption in bold which can be multi line | caption_label
- // -| |-
- // | Message text which can be multi line | message_label
- // | as well. |
- // | |-
- // +-------------------------------------------------+
- PopupMessage(const base::string16& caption,
- const base::string16& message,
- IconType message_type,
- views::View* anchor,
- views::BubbleBorder::Arrow arrow,
- const gfx::Size& size_override,
- int arrow_offset);
- // If the message was not explicitly closed before, it closes the message
- // without animation.
- virtual ~PopupMessage();
-
- // Closes the message with a fade out animation.
- void Close();
-
- private:
- class MessageBubble;
-
- void CancelHidingAnimation();
-
- MessageBubble* view_;
- views::Widget* widget_;
-
- // Variables of the construction time.
- views::View* anchor_;
- base::string16 caption_;
- base::string16 message_;
- IconType message_type_;
- views::BubbleBorder::Arrow arrow_orientation_;
-
- DISALLOW_COPY_AND_ASSIGN(PopupMessage);
-};
-
-} // namespace ash
-
-#endif // ASH_POPUP_MESSAGE_H_
diff --git a/chromium/ash/resources/OWNERS b/chromium/ash/resources/OWNERS
deleted file mode 100644
index 92f3fbb9210..00000000000
--- a/chromium/ash/resources/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-oshima@chromium.org
diff --git a/chromium/ash/resources/PRESUBMIT.py b/chromium/ash/resources/PRESUBMIT.py
deleted file mode 100644
index 9d070e4a5a3..00000000000
--- a/chromium/ash/resources/PRESUBMIT.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Presubmit script for Chromium Ash resources.
-
-See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
-for more details about the presubmit API built into gcl/git cl, and see
-http://www.chromium.org/developers/web-development-style-guide for the rules
-we're checking against here.
-"""
-
-
-def CheckChangeOnUpload(input_api, output_api):
- return _CommonChecks(input_api, output_api)
-
-
-def CheckChangeOnCommit(input_api, output_api):
- return _CommonChecks(input_api, output_api)
-
-
-def _CommonChecks(input_api, output_api):
- """Checks common to both upload and commit."""
- results = []
- resources = input_api.os_path.join(input_api.PresubmitLocalPath(),
- '../../ui/resources')
-
- # List of paths with their associated scale factor. This is used to verify
- # that the images modified in one are the correct scale of the other.
- path_scales = [
- [(100, 'default_100_percent/'), (200, 'default_200_percent/')],
- ]
-
- import sys
- old_path = sys.path
-
- try:
- sys.path = [resources] + old_path
- from resource_check import resource_scale_factors
-
- for paths in path_scales:
- results.extend(resource_scale_factors.ResourceScaleFactors(
- input_api, output_api, paths).RunChecks())
- finally:
- sys.path = old_path
-
- return results
diff --git a/chromium/ash/resources/ash_resources.grd b/chromium/ash/resources/ash_resources.grd
deleted file mode 100644
index b68b587b475..00000000000
--- a/chromium/ash/resources/ash_resources.grd
+++ /dev/null
@@ -1,262 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grit latest_public_release="0" current_release="1">
- <outputs>
- <output filename="grit/ash_resources.h" type="rc_header" context="default_100_percent">
- <emit emit_type='prepend'></emit>
- </output>
- <output filename="grit/ash_resources_map.cc" type="resource_map_source" context="default_100_percent" />
- <output filename="grit/ash_resources_map.h" type="resource_map_header" context="default_100_percent" />
- <output filename="ash_resources_100_percent.pak" type="data_package" context="default_100_percent" />
- <output filename="ash_resources_200_percent.pak" type="data_package" context="default_200_percent" />
- </outputs>
- <release seq="1">
- <includes>
- <!-- Fallback wallpaper used by Ash. -->
- <include name="IDR_AURA_WALLPAPER_DEFAULT_LARGE" file="wallpaper/default_large.jpg" type="BINDATA" />
- <include name="IDR_AURA_WALLPAPER_DEFAULT_SMALL" file="wallpaper/default_small.jpg" type="BINDATA" />
- </includes>
- <structures fallback_to_low_resolution="true">
- <!-- KEEP THESE IN ALPHABETICAL ORDER! DO NOT ADD TO RANDOM PLACES JUST
- BECAUSE YOUR RESOURCES ARE FUNCTIONALLY RELATED OR FALL UNDER THE
- SAME CONDITIONALS. -->
- <structure type="chrome_scaled_image" name="IDR_AURA_LAUNCHER_BACKGROUND" file="common/launcher/launcher_background.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_LAUNCHER_CORNER" file="common/launcher/launcher_corner.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_LAUNCHER_DIMMING" file="common/launcher/launcher_dimming.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_LAUNCHER_ICON_APPLIST" file="common/launcher/launcher_appmenu.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_LAUNCHER_ICON_APPLIST_ALTERNATE" file="common/alt_launcher/status_app_menu_icon.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_LAUNCHER_ICON_APPLIST_HOT" file="common/launcher/launcher_appmenu_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_LAUNCHER_ICON_APPLIST_PUSHED" file="common/launcher/launcher_appmenu_pressed.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_LAUNCHER_LIST_BROWSER" file="common/launcher/window_switcher_icon_normal.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_LAUNCHER_LIST_INCOGNITO_BROWSER" file="common/launcher/window_switcher_icon_incognito.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_LAUNCHER_OVERFLOW" file="common/launcher/launcher_overflow.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_LAUNCHER_UNDERLINE_ACTIVE" file="common/launcher/launcher_underline_bottom_active.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_LAUNCHER_UNDERLINE_ACTIVE_ALTERNATE" file="common/alt_launcher/launcher_underline_active.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_LAUNCHER_UNDERLINE_HOVER" file="common/launcher/launcher_underline_bottom_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_LAUNCHER_UNDERLINE_RUNNING" file="common/launcher/launcher_underline_bottom_running.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_LAUNCHER_UNDERLINE_RUNNING_ALTERNATE" file="common/alt_launcher/launcher_underline_running.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_LAUNCHER_ICON_TASK_MANAGER" file="common/launcher/task_manager.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_MULTI_WINDOW_RESIZE_H" file="common/multi_window_resize_horizontal.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_MULTI_WINDOW_RESIZE_V" file="common/multi_window_resize_vertical.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_NOTIFICATION_BACKGROUND_NORMAL" file="common/alt_launcher/status_icon_background_normal.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_NOTIFICATION_BACKGROUND_ON_BLACK" file="common/alt_launcher/status_icon_background_onblack_normal.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_NOTIFICATION_BACKGROUND_PRESSED" file="common/alt_launcher/status_icon_background_pressed.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_RESIZE_SHADOW_BOTTOM" file="common/resize_shadow_bottom.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_RESIZE_SHADOW_BOTTOM_LEFT" file="common/resize_shadow_bottom_left.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_RESIZE_SHADOW_BOTTOM_RIGHT" file="common/resize_shadow_bottom_right.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_RESIZE_SHADOW_LEFT" file="common/resize_shadow_left.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_RESIZE_SHADOW_RIGHT" file="common/resize_shadow_right.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_RESIZE_SHADOW_TOP" file="common/resize_shadow_top.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_RESIZE_SHADOW_TOP_LEFT" file="common/resize_shadow_top_left.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_RESIZE_SHADOW_TOP_RIGHT" file="common/resize_shadow_top_right.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_HORIZ_CENTER" file="common/alt_launcher/status_tray_normal_center.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_HORIZ_CENTER_ONBLACK" file="common/alt_launcher/status_tray_normal_onblack_center.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_HORIZ_CENTER_PRESSED" file="common/alt_launcher/status_tray_pressed_center.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_HORIZ_LEFT" file="common/alt_launcher/status_tray_normal_left.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_HORIZ_LEFT_ONBLACK" file="common/alt_launcher/status_tray_normal_onblack_left.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_HORIZ_LEFT_PRESSED" file="common/alt_launcher/status_tray_pressed_left.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_HORIZ_RIGHT" file="common/alt_launcher/status_tray_normal_right.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_HORIZ_RIGHT_ONBLACK" file="common/alt_launcher/status_tray_normal_onblack_right.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_HORIZ_RIGHT_PRESSED" file="common/alt_launcher/status_tray_pressed_right.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_VERTICAL_BOTTOM" file="common/alt_launcher/status_tray_vertical_normal_bottom.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_VERTICAL_BOTTOM_ONBLACK" file="common/alt_launcher/status_tray_vertical_normal_onblack_bottom.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_VERTICAL_BOTTOM_PRESSED" file="common/alt_launcher/status_tray_vertical_pressed_bottom.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_VERTICAL_TOP" file="common/alt_launcher/status_tray_vertical_normal_top.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_VERTICAL_TOP_ONBLACK" file="common/alt_launcher/status_tray_vertical_normal_onblack_top.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_VERTICAL_TOP_PRESSED" file="common/alt_launcher/status_tray_vertical_pressed_top.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_VERTICAL_CENTER" file="common/alt_launcher/status_tray_vertical_normal_center.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_VERTICAL_CENTER_ONBLACK" file="common/alt_launcher/status_tray_vertical_normal_onblack_center.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_BG_VERTICAL_CENTER_PRESSED" file="common/alt_launcher/status_tray_vertical_pressed_center.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_POPUP_LABEL_BUTTON_BORDER" file="common/tray_popup_label_button_border.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_POPUP_LABEL_BUTTON_HOVER_BACKGROUND" file="common/tray_popup_label_button_hover_background.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_POPUP_LABEL_BUTTON_NORMAL_BACKGROUND" file="common/tray_popup_label_button_normal_background.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_TRAY_POPUP_PUBLIC_ACCOUNT_LOGOUT_BUTTON_BORDER" file="common/tray_popup_public_account_logout_button_border.png" />
-
- <structure type="chrome_scaled_image" name="IDR_AURA_CROS_DEFAULT_THROBBER" file="cros/common/default_throbber.png" />
-
- <structure type="chrome_scaled_image" name="IDR_AURA_WARNING_ICON" file="common/alert_small.png" />
-
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_ACCESSIBILITY" file="cros/status/status_accessibility_mode.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_ACCESSIBILITY_DARK" file="cros/status/status_accessibility_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_BLUETOOTH" file="cros/status/status_bluetooth.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_BLUETOOTH_DISABLED" file="cros/status/status_bluetooth_disabled.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_BLUETOOTH_DISABLED_HOVER" file="cros/status/status_bluetooth_disabled_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_BLUETOOTH_ENABLED" file="cros/status/status_bluetooth_enabled.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_BLUETOOTH_ENABLED_HOVER" file="cros/status/status_bluetooth_enabled_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_BRIGHTNESS" file="cros/status/status_brightness.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_CAPS_LOCK" file="cros/status/status_capslock.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_CAPS_LOCK_DARK" file="cros/status/status_capslock_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_CELLULAR_DISABLED" file="cros/network/status_cellular_disabled.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_CELLULAR_DISABLED_HOVER" file="cros/network/status_cellular_disabled_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_CELLULAR_ENABLED" file="cros/network/status_cellular_enabled.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_CELLULAR_ENABLED_HOVER" file="cros/network/status_cellular_enabled_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_DISPLAY" file="cros/status/status_display_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_DRIVE" file="cros/status/status_drive.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_DRIVE_CANCEL" file="cros/status/status_drive_item_cancel.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_DRIVE_CANCEL_HOVER" file="cros/status/status_drive_item_cancel_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_DRIVE_DONE" file="cros/status/status_drive_item_done.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_DRIVE_FAILED" file="cros/status/status_drive_item_failed.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_DRIVE_LIGHT" file="cros/status/status_drive_light.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_HELP" file="cros/status/status_help.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_HELP_HOVER" file="cros/status/status_help_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_IME" file="cros/status/status_ime.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LESS" file="cros/status/status_less.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOCALE" file="cros/status/status_locale.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOCKSCREEN" file="cros/status/status_lockscreen.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOCKSCREEN_HOVER" file="cros/status/status_lockscreen_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_GUEST_ICON" file="cros/status/status_guest_icon.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_GUEST_ICON_LARGE" file="common/alt_launcher/status_guest_icon.png" />
-
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_BOTTOM" file="cros/status/status_logout_button_pushed_bottom.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_BOTTOM_LEFT" file="cros/status/status_logout_button_pushed_bottom_left.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_BOTTOM_RIGHT" file="cros/status/status_logout_button_pushed_bottom_right.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_CENTER" file="cros/status/status_logout_button_pushed_center.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_LEFT" file="cros/status/status_logout_button_pushed_left.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_RIGHT" file="cros/status/status_logout_button_pushed_right.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_TOP" file="cros/status/status_logout_button_pushed_top.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_TOP_LEFT" file="cros/status/status_logout_button_pushed_top_left.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_TOP_RIGHT" file="cros/status/status_logout_button_pushed_top_right.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_BOTTOM" file="cros/status/status_logout_button_normal_bottom.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_BOTTOM_LEFT" file="cros/status/status_logout_button_normal_bottom_left.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_BOTTOM_RIGHT" file="cros/status/status_logout_button_normal_bottom_right.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_CENTER" file="cros/status/status_logout_button_normal_center.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_LEFT" file="cros/status/status_logout_button_normal_left.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_RIGHT" file="cros/status/status_logout_button_normal_right.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_TOP" file="cros/status/status_logout_button_normal_top.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_TOP_LEFT" file="cros/status/status_logout_button_normal_top_left.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_TOP_RIGHT" file="cros/status/status_logout_button_normal_top_right.png" />
-
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_ADD_MULTIPROFILE_USER" file="cros/status/multiprofiles_add.png" />
-
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_MORE" file="cros/status/status_more.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_CELLULAR_NETWORK_FAILED" file="cros/network/status_cellular_failed.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_FAILED" file="cros/network/status_network_failed.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_INFO" file="cros/network/status_network_info.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_INFO_HOVER" file="cros/network/status_network_info_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NOTIFICATION_3G" file="cros/network/notification_3g.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NOTIFICATION_LTE" file="cros/network/notification_lte.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_POWER_SMALL" file="cros/status/status_power_small_all.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_POWER_SMALL_DARK" file="cros/status/status_power_small_all_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_POWER_SMALL_CHARGING_UNRELIABLE" file="cros/status/status_power_small_all_fluctuating.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_POWER_SMALL_CHARGING_UNRELIABLE_DARK" file="cros/status/status_power_small_all_dark_fluctuating.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_SCREENSHARE" file="cros/status/status_screenshare.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_SCREENSHARE_DARK" file="cros/status/status_screenshare_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_SESSION_LENGTH_LIMIT_TIMER" file="cros/status/status_session_length_limit_timer.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_SETTINGS" file="cros/status/status_settings.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_SHUTDOWN" file="cros/status/status_shutdown.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_SHUTDOWN_HOVER" file="cros/status/status_shutdown_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_SMS" file="cros/status/status_sms.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_TRACING" file="cros/status/status_tracing.png" />
-
- <!-- ChromeOS specific icons -->
- <if expr="pp_ifdef('chromeos')">
- <structure type="chrome_scaled_image" name="IDR_AURA_NOTIFICATION_LOW_POWER_CHARGER" file="cros/notification/notification_low_power_charger.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_ENTERPRISE_DARK" file="cros/status/status_managed.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_MANAGED_USER" file="cros/status/status_managed_mode_user.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_1X" file="cros/network/statusbar_network_1x.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_3G_DARK" file="cros/network/statusbar_network_3g_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_3G_LIGHT" file="cros/network/statusbar_network_3g_light.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_4G_DARK" file="cros/network/statusbar_network_4g_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_4G_LIGHT" file="cros/network/statusbar_network_4g_light.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_ARCS_DARK" file="cros/network/statusbar_network_arcs_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_ARCS_LIGHT" file="cros/network/statusbar_network_arcs_light.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_BARS_DARK" file="cros/network/statusbar_network_bars_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_BARS_LIGHT" file="cros/network/statusbar_network_bars_light.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_EDGE_DARK" file="cros/network/statusbar_network_edge_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_EDGE_LIGHT" file="cros/network/statusbar_network_edge_light.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_EVDO_DARK" file="cros/network/statusbar_network_evdo_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_EVDO_LIGHT" file="cros/network/statusbar_network_evdo_light.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_GPRS_DARK" file="cros/network/statusbar_network_gprs_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_GPRS_LIGHT" file="cros/network/statusbar_network_gprs_light.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_HSPA_DARK" file="cros/network/statusbar_network_hspa_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_HSPA_LIGHT" file="cros/network/statusbar_network_hspa_light.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_HSPA_PLUS_DARK" file="cros/network/statusbar_network_hspa_plus_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_HSPA_PLUS_LIGHT" file="cros/network/statusbar_network_hspa_plus_light.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_LTE_DARK" file="cros/network/statusbar_network_lte_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_LTE_LIGHT" file="cros/network/statusbar_network_lte_light.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_LTE_ADVANCED_DARK" file="cros/network/statusbar_network_lte_advanced_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_LTE_ADVANCED_LIGHT" file="cros/network/statusbar_network_lte_advanced_light.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_ROAMING_DARK" file="cros/network/statusbar_network_roaming_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_ROAMING_LIGHT" file="cros/network/statusbar_network_roaming_light.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_SECURE_DARK" file="cros/network/statusbar_network_secure_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_VPN" file="cros/network/statusbar_vpn_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_VPN_BADGE" file="cros/network/statusbar_network_vpn_badge.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_WIRED" file="cros/network/statusbar_wired.png" />
- </if>
-
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_UPDATE" file="cros/status/status_update.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_UPDATE_GREEN" file="cros/status/status_update_green.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_UPDATE_ORANGE" file="cros/status/status_update_orange.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_UPDATE_RED" file="cros/status/status_update_red.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_UPDATE_DARK" file="cros/status/status_update_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_UPDATE_DARK_GREEN" file="cros/status/status_update_dark_green.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_UPDATE_DARK_ORANGE" file="cros/status/status_update_dark_orange.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_UPDATE_DARK_RED" file="cros/status/status_update_dark_red.png" />
-
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_VOLUME_LEVELS" file="cros/status/status_volume_dark.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_VOLUME_MUTE" file="cros/status/status_volume_mute.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_AUDIO_HEADPHONE" file="cros/status/status_audio_device_headphones.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_AUDIO_USB" file="cros/status/status_audio_device_usb.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_AUDIO_BLUETOOTH" file="cros/status/status_audio_device_bluetooth.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_AUDIO_HDMI" file="cros/status/status_audio_device_hdmi.png" />
-
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_WIFI_DISABLED" file="cros/network/status_wifi_disabled.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_WIFI_DISABLED_HOVER" file="cros/network/status_wifi_disabled_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_WIFI_ENABLED" file="cros/network/status_wifi_enabled.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_WIFI_ENABLED_HOVER" file="cros/network/status_wifi_enabled_hover.png" />
-
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_BUTTON_SEPARATOR" file="common/window_button_separator.png" />
-
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_HEADER_BASE_ACTIVE" file="common/window_header_base_active.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_HEADER_BASE_INACTIVE" file="common/window_header_base_inactive.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_HEADER_BASE_INCOGNITO_ACTIVE" file="common/window_header_base_incognito_active.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_HEADER_BASE_INCOGNITO_INACTIVE" file="common/window_header_base_incognito_inactive.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_HEADER_BASE_MINIMAL" file="common/window_header_base_minimal.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_HEADER_SHADE_LEFT" file="common/window_header_shade_left.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_HEADER_SHADE_RIGHT" file="common/window_header_shade_right.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_HEADER_SHADE_TOP" file="common/window_header_shade_top.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_HEADER_SHADE_TOP_LEFT" file="common/window_header_shade_top_left.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_HEADER_SHADE_TOP_RIGHT" file="common/window_header_shade_top_right.png" />
-
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_CLOSE" file="common/window_close_tall_normal.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_CLOSE_H" file="common/window_close_tall_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_CLOSE_P" file="common/window_close_tall_pressed.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MAXIMIZED_CLOSE" file="common/window_close_short_normal.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MAXIMIZED_CLOSE_H" file="common/window_close_short_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MAXIMIZED_CLOSE_P" file="common/window_close_short_pressed.png" />
- <!-- These are temporary, when workspace2 is the default they'll replace IDR_AURA_WINDOW_MAXIMIZED_CLOSE -->
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MAXIMIZED_CLOSE2" file="common/window_close_short_black_normal.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MAXIMIZED_CLOSE2_H" file="common/window_close_short_black_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MAXIMIZED_CLOSE2_P" file="common/window_close_short_black_pressed.png" />
-
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MAXIMIZE" file="common/window_size_tall_normal.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MAXIMIZE_H" file="common/window_size_tall_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MAXIMIZE_P" file="common/window_size_tall_pressed.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MAXIMIZED_RESTORE" file="common/window_size_short_normal.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MAXIMIZED_RESTORE_H" file="common/window_size_short_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MAXIMIZED_RESTORE_P" file="common/window_size_short_pressed.png" />
- <!-- These are temporary, when workspace2 is the default they'll replace IDR_AURA_WINDOW_MAXIMIZED_RESTORE -->
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MAXIMIZED_RESTORE2" file="common/window_size_short_black_normal.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_H" file="common/window_size_short_black_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_P" file="common/window_size_short_black_pressed.png" />
-
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MINIMIZE_SHORT" file="common/window_minimize_short_normal.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MINIMIZE_SHORT_H" file="common/window_minimize_short_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MINIMIZE_SHORT_P" file="common/window_minimize_short_pressed.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_LEFT" file="common/window_position_left_normal.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_LEFT_H" file="common/window_position_left_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_LEFT_P" file="common/window_position_left_pressed.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_MIDDLE" file="common/window_position_middle_normal.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_MIDDLE_H" file="common/window_position_middle_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_MIDDLE_P" file="common/window_position_middle_pressed.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_RIGHT" file="common/window_position_right_normal.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_RIGHT_H" file="common/window_position_right_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_RIGHT_P" file="common/window_position_right_pressed.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_LEFT_RESTORE" file="common/window_position_left_normal_restore.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_LEFT_RESTORE_H" file="common/window_position_left_hover_restore.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_LEFT_RESTORE_P" file="common/window_position_left_pressed_restore.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_RIGHT_RESTORE" file="common/window_position_right_normal_restore.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_RIGHT_RESTORE_H" file="common/window_position_right_hover_restore.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_RIGHT_RESTORE_P" file="common/window_position_right_pressed_restore.png" />
- </structures>
- </release>
-</grit>
diff --git a/chromium/ash/resources/default_100_percent/common/alert_small.png b/chromium/ash/resources/default_100_percent/common/alert_small.png
deleted file mode 100644
index 7b76b49a9aa..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alert_small.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/launcher_background.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/launcher_background.png
deleted file mode 100644
index 45b06ed7464..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/launcher_background.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/launcher_underline_active.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/launcher_underline_active.png
deleted file mode 100644
index 6a69d17bdeb..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/launcher_underline_active.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/launcher_underline_running.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/launcher_underline_running.png
deleted file mode 100644
index 9bcff86ef7e..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/launcher_underline_running.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_app_menu_icon.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_app_menu_icon.png
deleted file mode 100644
index 5e5f18b4f55..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_app_menu_icon.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_guest_icon.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_guest_icon.png
deleted file mode 100644
index 12ac2bb3941..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_guest_icon.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_icon_background_normal.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_icon_background_normal.png
deleted file mode 100644
index 565c5010dde..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_icon_background_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_icon_background_onblack_normal.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_icon_background_onblack_normal.png
deleted file mode 100644
index 41ba35c526b..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_icon_background_onblack_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_icon_background_pressed.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_icon_background_pressed.png
deleted file mode 100644
index d8cdd77291a..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_icon_background_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_notification_icon.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_notification_icon.png
deleted file mode 100644
index a22e1361468..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_notification_icon.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_center.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_center.png
deleted file mode 100644
index 7f895ba31fa..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_center.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_left.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_left.png
deleted file mode 100644
index 8b00443089f..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_onblack_center.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_onblack_center.png
deleted file mode 100644
index 0d26eb2d529..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_onblack_center.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_onblack_left.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_onblack_left.png
deleted file mode 100644
index 34841271995..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_onblack_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_onblack_right.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_onblack_right.png
deleted file mode 100644
index 5787128a603..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_onblack_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_right.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_right.png
deleted file mode 100644
index 850e80f2b82..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_normal_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_pressed_center.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_pressed_center.png
deleted file mode 100644
index 3eb461d3b8b..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_pressed_center.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_pressed_left.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_pressed_left.png
deleted file mode 100644
index 3c97b3e2fa2..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_pressed_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_pressed_right.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_pressed_right.png
deleted file mode 100644
index 8ec72272d0b..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_pressed_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_bottom.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_bottom.png
deleted file mode 100644
index 0b6bd703106..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_bottom.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_center.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_center.png
deleted file mode 100644
index 91674cc42f6..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_center.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_onblack_bottom.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_onblack_bottom.png
deleted file mode 100644
index 2b1b6590931..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_onblack_bottom.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_onblack_center.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_onblack_center.png
deleted file mode 100644
index 9e3bb3cdc72..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_onblack_center.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_onblack_top.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_onblack_top.png
deleted file mode 100644
index d59b1ef1d83..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_onblack_top.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_top.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_top.png
deleted file mode 100644
index e0e0c5ac123..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_normal_top.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_pressed_bottom.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_pressed_bottom.png
deleted file mode 100644
index b2762ba13d2..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_pressed_bottom.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_pressed_center.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_pressed_center.png
deleted file mode 100644
index 77271932048..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_pressed_center.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_pressed_top.png b/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_pressed_top.png
deleted file mode 100644
index 96453a6f57a..00000000000
--- a/chromium/ash/resources/default_100_percent/common/alt_launcher/status_tray_vertical_pressed_top.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_appmenu.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_appmenu.png
deleted file mode 100644
index 719d77212fd..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_appmenu.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_appmenu_hover.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_appmenu_hover.png
deleted file mode 100644
index a41d0e48e7a..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_appmenu_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_appmenu_pressed.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_appmenu_pressed.png
deleted file mode 100644
index 98750f87fdf..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_appmenu_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_background.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_background.png
deleted file mode 100644
index 212c0de3941..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_background.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_background_left.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_background_left.png
deleted file mode 100644
index aabd3b90d23..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_background_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_background_right.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_background_right.png
deleted file mode 100644
index dea5d31bd32..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_background_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_corner.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_corner.png
deleted file mode 100644
index 929c3806260..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_corner.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_dimming.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_dimming.png
deleted file mode 100644
index cead58f8d58..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_dimming.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_dimming_left.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_dimming_left.png
deleted file mode 100644
index 42a41068b60..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_dimming_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_dimming_right.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_dimming_right.png
deleted file mode 100644
index f8852ac72c8..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_dimming_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_overflow.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_overflow.png
deleted file mode 100644
index 05cc71d077c..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_overflow.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_bottom_active.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_bottom_active.png
deleted file mode 100644
index bdf9f4e75c7..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_bottom_active.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_bottom_hover.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_bottom_hover.png
deleted file mode 100644
index 93dd4a1ebbd..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_bottom_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_bottom_running.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_bottom_running.png
deleted file mode 100644
index ac5bccb2407..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_bottom_running.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_left_active.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_left_active.png
deleted file mode 100644
index f232976db65..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_left_active.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_left_hover.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_left_hover.png
deleted file mode 100644
index f232976db65..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_left_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_left_running.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_left_running.png
deleted file mode 100644
index 6a4294fe580..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_left_running.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_right_active.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_right_active.png
deleted file mode 100644
index 82572f20ca2..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_right_active.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_right_hover.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_right_hover.png
deleted file mode 100644
index 82572f20ca2..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_right_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_right_running.png b/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_right_running.png
deleted file mode 100644
index 24de3c042f8..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/launcher_underline_right_running.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/task_manager.png b/chromium/ash/resources/default_100_percent/common/launcher/task_manager.png
deleted file mode 100644
index 293bc769004..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/task_manager.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/window_switcher_icon_incognito.png b/chromium/ash/resources/default_100_percent/common/launcher/window_switcher_icon_incognito.png
deleted file mode 100644
index 47ed4cd55b5..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/window_switcher_icon_incognito.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/launcher/window_switcher_icon_normal.png b/chromium/ash/resources/default_100_percent/common/launcher/window_switcher_icon_normal.png
deleted file mode 100644
index cb0656cfe3d..00000000000
--- a/chromium/ash/resources/default_100_percent/common/launcher/window_switcher_icon_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/multi_window_resize_horizontal.png b/chromium/ash/resources/default_100_percent/common/multi_window_resize_horizontal.png
deleted file mode 100644
index 0f17aa9d981..00000000000
--- a/chromium/ash/resources/default_100_percent/common/multi_window_resize_horizontal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/multi_window_resize_vertical.png b/chromium/ash/resources/default_100_percent/common/multi_window_resize_vertical.png
deleted file mode 100644
index 7dceda426b3..00000000000
--- a/chromium/ash/resources/default_100_percent/common/multi_window_resize_vertical.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/resize_shadow_bottom.png b/chromium/ash/resources/default_100_percent/common/resize_shadow_bottom.png
deleted file mode 100644
index c0d2011c8a3..00000000000
--- a/chromium/ash/resources/default_100_percent/common/resize_shadow_bottom.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/resize_shadow_bottom_left.png b/chromium/ash/resources/default_100_percent/common/resize_shadow_bottom_left.png
deleted file mode 100644
index a469177c3b8..00000000000
--- a/chromium/ash/resources/default_100_percent/common/resize_shadow_bottom_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/resize_shadow_bottom_right.png b/chromium/ash/resources/default_100_percent/common/resize_shadow_bottom_right.png
deleted file mode 100644
index ecf05385be5..00000000000
--- a/chromium/ash/resources/default_100_percent/common/resize_shadow_bottom_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/resize_shadow_left.png b/chromium/ash/resources/default_100_percent/common/resize_shadow_left.png
deleted file mode 100644
index 1f859c16cf8..00000000000
--- a/chromium/ash/resources/default_100_percent/common/resize_shadow_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/resize_shadow_right.png b/chromium/ash/resources/default_100_percent/common/resize_shadow_right.png
deleted file mode 100644
index 1f859c16cf8..00000000000
--- a/chromium/ash/resources/default_100_percent/common/resize_shadow_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/resize_shadow_top.png b/chromium/ash/resources/default_100_percent/common/resize_shadow_top.png
deleted file mode 100644
index c0d2011c8a3..00000000000
--- a/chromium/ash/resources/default_100_percent/common/resize_shadow_top.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/resize_shadow_top_left.png b/chromium/ash/resources/default_100_percent/common/resize_shadow_top_left.png
deleted file mode 100644
index 50e959c9318..00000000000
--- a/chromium/ash/resources/default_100_percent/common/resize_shadow_top_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/resize_shadow_top_right.png b/chromium/ash/resources/default_100_percent/common/resize_shadow_top_right.png
deleted file mode 100644
index 5a0be1a2e76..00000000000
--- a/chromium/ash/resources/default_100_percent/common/resize_shadow_top_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/tray_popup_label_button_border.png b/chromium/ash/resources/default_100_percent/common/tray_popup_label_button_border.png
deleted file mode 100644
index 6677ed94689..00000000000
--- a/chromium/ash/resources/default_100_percent/common/tray_popup_label_button_border.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/tray_popup_label_button_hover_background.png b/chromium/ash/resources/default_100_percent/common/tray_popup_label_button_hover_background.png
deleted file mode 100644
index 6cd3bc7d176..00000000000
--- a/chromium/ash/resources/default_100_percent/common/tray_popup_label_button_hover_background.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/tray_popup_label_button_normal_background.png b/chromium/ash/resources/default_100_percent/common/tray_popup_label_button_normal_background.png
deleted file mode 100644
index 22d48a8fbbb..00000000000
--- a/chromium/ash/resources/default_100_percent/common/tray_popup_label_button_normal_background.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/tray_popup_public_account_logout_button_border.png b/chromium/ash/resources/default_100_percent/common/tray_popup_public_account_logout_button_border.png
deleted file mode 100644
index db4b22f0fea..00000000000
--- a/chromium/ash/resources/default_100_percent/common/tray_popup_public_account_logout_button_border.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_button_separator.png b/chromium/ash/resources/default_100_percent/common/window_button_separator.png
deleted file mode 100644
index ad3a15dfbf8..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_button_separator.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_close_short_black_hover.png b/chromium/ash/resources/default_100_percent/common/window_close_short_black_hover.png
deleted file mode 100644
index 3d464870a93..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_close_short_black_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_close_short_black_normal.png b/chromium/ash/resources/default_100_percent/common/window_close_short_black_normal.png
deleted file mode 100644
index 23010ea7d64..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_close_short_black_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_close_short_black_pressed.png b/chromium/ash/resources/default_100_percent/common/window_close_short_black_pressed.png
deleted file mode 100644
index 703fce26cea..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_close_short_black_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_close_short_hover.png b/chromium/ash/resources/default_100_percent/common/window_close_short_hover.png
deleted file mode 100644
index 2e27e58ee32..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_close_short_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_close_short_normal.png b/chromium/ash/resources/default_100_percent/common/window_close_short_normal.png
deleted file mode 100644
index a49779aaa9a..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_close_short_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_close_short_pressed.png b/chromium/ash/resources/default_100_percent/common/window_close_short_pressed.png
deleted file mode 100644
index 31f9b6e17f8..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_close_short_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_close_tall_hover.png b/chromium/ash/resources/default_100_percent/common/window_close_tall_hover.png
deleted file mode 100644
index 400a398e130..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_close_tall_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_close_tall_normal.png b/chromium/ash/resources/default_100_percent/common/window_close_tall_normal.png
deleted file mode 100644
index a3384f887d4..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_close_tall_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_close_tall_pressed.png b/chromium/ash/resources/default_100_percent/common/window_close_tall_pressed.png
deleted file mode 100644
index 323135da731..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_close_tall_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_header_base_active.png b/chromium/ash/resources/default_100_percent/common/window_header_base_active.png
deleted file mode 100644
index 3881ec2553a..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_header_base_active.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_header_base_inactive.png b/chromium/ash/resources/default_100_percent/common/window_header_base_inactive.png
deleted file mode 100644
index e5a84899326..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_header_base_inactive.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_header_base_incognito_active.png b/chromium/ash/resources/default_100_percent/common/window_header_base_incognito_active.png
deleted file mode 100644
index d6de6253b15..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_header_base_incognito_active.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_header_base_incognito_inactive.png b/chromium/ash/resources/default_100_percent/common/window_header_base_incognito_inactive.png
deleted file mode 100644
index 7850d9c9638..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_header_base_incognito_inactive.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_header_base_minimal.png b/chromium/ash/resources/default_100_percent/common/window_header_base_minimal.png
deleted file mode 100644
index c480496b1f2..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_header_base_minimal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_minimize_short_hover.png b/chromium/ash/resources/default_100_percent/common/window_minimize_short_hover.png
deleted file mode 100644
index ad54e15e28d..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_minimize_short_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_minimize_short_normal.png b/chromium/ash/resources/default_100_percent/common/window_minimize_short_normal.png
deleted file mode 100644
index e4eb416d07d..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_minimize_short_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_minimize_short_pressed.png b/chromium/ash/resources/default_100_percent/common/window_minimize_short_pressed.png
deleted file mode 100644
index 32bccbebec1..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_minimize_short_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_position_left_hover.png b/chromium/ash/resources/default_100_percent/common/window_position_left_hover.png
deleted file mode 100644
index 420d392031a..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_position_left_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_position_left_hover_restore.png b/chromium/ash/resources/default_100_percent/common/window_position_left_hover_restore.png
deleted file mode 100644
index f94002b8461..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_position_left_hover_restore.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_position_left_normal.png b/chromium/ash/resources/default_100_percent/common/window_position_left_normal.png
deleted file mode 100644
index c082951044a..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_position_left_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_position_left_normal_restore.png b/chromium/ash/resources/default_100_percent/common/window_position_left_normal_restore.png
deleted file mode 100644
index 67312ab1604..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_position_left_normal_restore.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_position_left_pressed.png b/chromium/ash/resources/default_100_percent/common/window_position_left_pressed.png
deleted file mode 100644
index 4201d2a9042..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_position_left_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_position_left_pressed_restore.png b/chromium/ash/resources/default_100_percent/common/window_position_left_pressed_restore.png
deleted file mode 100644
index 88415533c1f..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_position_left_pressed_restore.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_position_middle_hover.png b/chromium/ash/resources/default_100_percent/common/window_position_middle_hover.png
deleted file mode 100644
index aaff1c59c82..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_position_middle_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_position_middle_normal.png b/chromium/ash/resources/default_100_percent/common/window_position_middle_normal.png
deleted file mode 100644
index 090b6699fe3..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_position_middle_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_position_middle_pressed.png b/chromium/ash/resources/default_100_percent/common/window_position_middle_pressed.png
deleted file mode 100644
index 66d29b0d95a..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_position_middle_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_position_right_hover.png b/chromium/ash/resources/default_100_percent/common/window_position_right_hover.png
deleted file mode 100644
index e424d950125..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_position_right_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_position_right_hover_restore.png b/chromium/ash/resources/default_100_percent/common/window_position_right_hover_restore.png
deleted file mode 100644
index 7583d26b72a..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_position_right_hover_restore.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_position_right_normal.png b/chromium/ash/resources/default_100_percent/common/window_position_right_normal.png
deleted file mode 100644
index d2c44791362..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_position_right_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_position_right_normal_restore.png b/chromium/ash/resources/default_100_percent/common/window_position_right_normal_restore.png
deleted file mode 100644
index 9da076101c4..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_position_right_normal_restore.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_position_right_pressed.png b/chromium/ash/resources/default_100_percent/common/window_position_right_pressed.png
deleted file mode 100644
index 7fa9303bfb1..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_position_right_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_position_right_pressed_restore.png b/chromium/ash/resources/default_100_percent/common/window_position_right_pressed_restore.png
deleted file mode 100644
index 790ee0e572b..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_position_right_pressed_restore.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_size_short_black_hover.png b/chromium/ash/resources/default_100_percent/common/window_size_short_black_hover.png
deleted file mode 100644
index a0cdd53bd10..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_size_short_black_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_size_short_black_normal.png b/chromium/ash/resources/default_100_percent/common/window_size_short_black_normal.png
deleted file mode 100644
index 9b5a81d3dc2..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_size_short_black_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_size_short_black_pressed.png b/chromium/ash/resources/default_100_percent/common/window_size_short_black_pressed.png
deleted file mode 100644
index bd87956471f..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_size_short_black_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_size_short_hover.png b/chromium/ash/resources/default_100_percent/common/window_size_short_hover.png
deleted file mode 100644
index c52c4aa183d..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_size_short_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_size_short_normal.png b/chromium/ash/resources/default_100_percent/common/window_size_short_normal.png
deleted file mode 100644
index ebe911fc3d2..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_size_short_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_size_short_pressed.png b/chromium/ash/resources/default_100_percent/common/window_size_short_pressed.png
deleted file mode 100644
index cf7cde8131a..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_size_short_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_size_tall_hover.png b/chromium/ash/resources/default_100_percent/common/window_size_tall_hover.png
deleted file mode 100644
index 393beafb34d..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_size_tall_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_size_tall_normal.png b/chromium/ash/resources/default_100_percent/common/window_size_tall_normal.png
deleted file mode 100644
index bba5130201b..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_size_tall_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/common/window_size_tall_pressed.png b/chromium/ash/resources/default_100_percent/common/window_size_tall_pressed.png
deleted file mode 100644
index 9047b4a9484..00000000000
--- a/chromium/ash/resources/default_100_percent/common/window_size_tall_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/common/default_throbber.png b/chromium/ash/resources/default_100_percent/cros/common/default_throbber.png
deleted file mode 100644
index 47eeb2c15e8..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/common/default_throbber.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/notification_3g.png b/chromium/ash/resources/default_100_percent/cros/network/notification_3g.png
deleted file mode 100644
index ced1c67827f..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/notification_3g.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/notification_lte.png b/chromium/ash/resources/default_100_percent/cros/network/notification_lte.png
deleted file mode 100644
index 613962342c6..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/notification_lte.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/status_cellular_disabled.png b/chromium/ash/resources/default_100_percent/cros/network/status_cellular_disabled.png
deleted file mode 100644
index a00aeccf0ec..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/status_cellular_disabled.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/status_cellular_disabled_hover.png b/chromium/ash/resources/default_100_percent/cros/network/status_cellular_disabled_hover.png
deleted file mode 100644
index 348682bc43c..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/status_cellular_disabled_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/status_cellular_enabled.png b/chromium/ash/resources/default_100_percent/cros/network/status_cellular_enabled.png
deleted file mode 100644
index cc5b733c514..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/status_cellular_enabled.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/status_cellular_enabled_hover.png b/chromium/ash/resources/default_100_percent/cros/network/status_cellular_enabled_hover.png
deleted file mode 100644
index 77879ed9f8e..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/status_cellular_enabled_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/status_cellular_failed.png b/chromium/ash/resources/default_100_percent/cros/network/status_cellular_failed.png
deleted file mode 100644
index 412d9d4180d..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/status_cellular_failed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/status_data_low.png b/chromium/ash/resources/default_100_percent/cros/network/status_data_low.png
deleted file mode 100644
index b757e5fbb96..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/status_data_low.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/status_data_none.png b/chromium/ash/resources/default_100_percent/cros/network/status_data_none.png
deleted file mode 100644
index 26d502875ff..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/status_data_none.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/status_network_failed.png b/chromium/ash/resources/default_100_percent/cros/network/status_network_failed.png
deleted file mode 100644
index c6d2710e7c5..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/status_network_failed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/status_network_info.png b/chromium/ash/resources/default_100_percent/cros/network/status_network_info.png
deleted file mode 100644
index 8ee22eea18c..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/status_network_info.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/status_network_info_hover.png b/chromium/ash/resources/default_100_percent/cros/network/status_network_info_hover.png
deleted file mode 100644
index 51fb984f299..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/status_network_info_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/status_wifi_disabled.png b/chromium/ash/resources/default_100_percent/cros/network/status_wifi_disabled.png
deleted file mode 100644
index dd3ff1d8790..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/status_wifi_disabled.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/status_wifi_disabled_hover.png b/chromium/ash/resources/default_100_percent/cros/network/status_wifi_disabled_hover.png
deleted file mode 100644
index 70580161171..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/status_wifi_disabled_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/status_wifi_enabled.png b/chromium/ash/resources/default_100_percent/cros/network/status_wifi_enabled.png
deleted file mode 100644
index 11768b16eda..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/status_wifi_enabled.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/status_wifi_enabled_hover.png b/chromium/ash/resources/default_100_percent/cros/network/status_wifi_enabled_hover.png
deleted file mode 100644
index de634efa40f..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/status_wifi_enabled_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_1x.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_1x.png
deleted file mode 100644
index 5a25e1c92fe..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_1x.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_1x_error.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_1x_error.png
deleted file mode 100644
index 4b6defe6f2a..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_1x_error.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_1x_unknown.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_1x_unknown.png
deleted file mode 100644
index 3d1b1a421dc..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_1x_unknown.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_3g_dark.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_3g_dark.png
deleted file mode 100644
index 8b9b92a719f..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_3g_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_3g_error.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_3g_error.png
deleted file mode 100644
index 9894e7c4f85..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_3g_error.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_3g_light.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_3g_light.png
deleted file mode 100644
index 83b5921e72e..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_3g_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_3g_unknown.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_3g_unknown.png
deleted file mode 100644
index a57300b093d..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_3g_unknown.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_4g_dark.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_4g_dark.png
deleted file mode 100644
index daa9f7e4b91..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_4g_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_4g_light.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_4g_light.png
deleted file mode 100644
index c199a897e18..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_4g_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_arcs_dark.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_arcs_dark.png
deleted file mode 100644
index 29b6c725d99..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_arcs_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_arcs_light.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_arcs_light.png
deleted file mode 100644
index 2d783f6ed15..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_arcs_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_bars_dark.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_bars_dark.png
deleted file mode 100644
index 9facf9fea87..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_bars_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_bars_light.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_bars_light.png
deleted file mode 100644
index 4f77026ce0e..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_bars_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_edge_dark.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_edge_dark.png
deleted file mode 100644
index 8fa7443a917..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_edge_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_edge_light.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_edge_light.png
deleted file mode 100644
index c9a525cf809..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_edge_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_evdo_dark.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_evdo_dark.png
deleted file mode 100644
index 85c0378b815..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_evdo_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_evdo_light.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_evdo_light.png
deleted file mode 100644
index 1ae959b312c..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_evdo_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_gprs_dark.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_gprs_dark.png
deleted file mode 100644
index 03357a6e1d5..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_gprs_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_gprs_light.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_gprs_light.png
deleted file mode 100644
index 3953406b7a8..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_gprs_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_hspa_dark.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_hspa_dark.png
deleted file mode 100644
index bad20a762ba..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_hspa_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_hspa_light.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_hspa_light.png
deleted file mode 100644
index 1eedc069d42..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_hspa_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_hspa_plus_dark.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_hspa_plus_dark.png
deleted file mode 100644
index 2b34e394463..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_hspa_plus_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_hspa_plus_light.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_hspa_plus_light.png
deleted file mode 100644
index 2ee0809b1e0..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_hspa_plus_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_lte_advanced_dark.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_lte_advanced_dark.png
deleted file mode 100644
index db3ab77ca76..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_lte_advanced_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_lte_advanced_light.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_lte_advanced_light.png
deleted file mode 100644
index 66d25d373c9..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_lte_advanced_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_lte_dark.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_lte_dark.png
deleted file mode 100644
index 84b7c7ccc63..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_lte_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_lte_light.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_lte_light.png
deleted file mode 100644
index 29cca1d7f05..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_lte_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_roaming_dark.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_roaming_dark.png
deleted file mode 100644
index f4d9becb8eb..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_roaming_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_roaming_light.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_roaming_light.png
deleted file mode 100644
index 70544b63ab5..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_roaming_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_secure_dark.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_secure_dark.png
deleted file mode 100644
index 98b0b51777d..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_secure_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_secure_light.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_secure_light.png
deleted file mode 100644
index 8c66a67a47f..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_secure_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_vpn_badge.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_vpn_badge.png
deleted file mode 100644
index 906276e6828..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_network_vpn_badge.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_vpn_dark.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_vpn_dark.png
deleted file mode 100644
index a060df37f3b..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_vpn_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/network/statusbar_wired.png b/chromium/ash/resources/default_100_percent/cros/network/statusbar_wired.png
deleted file mode 100644
index 14335f7556c..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/network/statusbar_wired.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/notification/notification_low_power_charger.png b/chromium/ash/resources/default_100_percent/cros/notification/notification_low_power_charger.png
deleted file mode 100644
index d410c4ba830..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/notification/notification_low_power_charger.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/multiprofiles_add.png b/chromium/ash/resources/default_100_percent/cros/status/multiprofiles_add.png
deleted file mode 100644
index 0e8a7a16889..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/multiprofiles_add.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_accessibility_dark.png b/chromium/ash/resources/default_100_percent/cros/status/status_accessibility_dark.png
deleted file mode 100644
index acfb0f0c133..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_accessibility_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_accessibility_mode.png b/chromium/ash/resources/default_100_percent/cros/status/status_accessibility_mode.png
deleted file mode 100644
index e3bf6ca896d..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_accessibility_mode.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_audio_device_bluetooth.png b/chromium/ash/resources/default_100_percent/cros/status/status_audio_device_bluetooth.png
deleted file mode 100644
index 073b8213972..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_audio_device_bluetooth.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_audio_device_hdmi.png b/chromium/ash/resources/default_100_percent/cros/status/status_audio_device_hdmi.png
deleted file mode 100644
index 4112442f666..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_audio_device_hdmi.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_audio_device_headphones.png b/chromium/ash/resources/default_100_percent/cros/status/status_audio_device_headphones.png
deleted file mode 100644
index 93267c7e189..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_audio_device_headphones.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_audio_device_usb.png b/chromium/ash/resources/default_100_percent/cros/status/status_audio_device_usb.png
deleted file mode 100644
index b09326815fc..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_audio_device_usb.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_bluetooth.png b/chromium/ash/resources/default_100_percent/cros/status/status_bluetooth.png
deleted file mode 100644
index 25fbff092ff..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_bluetooth.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_bluetooth_disabled.png b/chromium/ash/resources/default_100_percent/cros/status/status_bluetooth_disabled.png
deleted file mode 100644
index 4f8cae037b2..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_bluetooth_disabled.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_bluetooth_disabled_hover.png b/chromium/ash/resources/default_100_percent/cros/status/status_bluetooth_disabled_hover.png
deleted file mode 100644
index 66b1dd2a55a..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_bluetooth_disabled_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_bluetooth_enabled.png b/chromium/ash/resources/default_100_percent/cros/status/status_bluetooth_enabled.png
deleted file mode 100644
index c06841b46a1..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_bluetooth_enabled.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_bluetooth_enabled_hover.png b/chromium/ash/resources/default_100_percent/cros/status/status_bluetooth_enabled_hover.png
deleted file mode 100644
index 0bf56fb86c8..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_bluetooth_enabled_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_brightness.png b/chromium/ash/resources/default_100_percent/cros/status/status_brightness.png
deleted file mode 100644
index 08ce57ada32..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_brightness.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_capslock.png b/chromium/ash/resources/default_100_percent/cros/status/status_capslock.png
deleted file mode 100644
index 8b0e095ed9c..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_capslock.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_capslock_dark.png b/chromium/ash/resources/default_100_percent/cros/status/status_capslock_dark.png
deleted file mode 100644
index 0b3b26927ce..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_capslock_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_display_dark.png b/chromium/ash/resources/default_100_percent/cros/status/status_display_dark.png
deleted file mode 100644
index 6bb251b9df2..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_display_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_drive.png b/chromium/ash/resources/default_100_percent/cros/status/status_drive.png
deleted file mode 100644
index 173c45c18c5..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_drive.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_drive_item_cancel.png b/chromium/ash/resources/default_100_percent/cros/status/status_drive_item_cancel.png
deleted file mode 100644
index 766bbcecc03..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_drive_item_cancel.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_drive_item_cancel_hover.png b/chromium/ash/resources/default_100_percent/cros/status/status_drive_item_cancel_hover.png
deleted file mode 100644
index 5c746c505fb..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_drive_item_cancel_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_drive_item_done.png b/chromium/ash/resources/default_100_percent/cros/status/status_drive_item_done.png
deleted file mode 100644
index ae2cfcd14c1..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_drive_item_done.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_drive_item_failed.png b/chromium/ash/resources/default_100_percent/cros/status/status_drive_item_failed.png
deleted file mode 100644
index 09e0c812791..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_drive_item_failed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_drive_light.png b/chromium/ash/resources/default_100_percent/cros/status/status_drive_light.png
deleted file mode 100644
index 0b767e1b7dc..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_drive_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_guest_icon.png b/chromium/ash/resources/default_100_percent/cros/status/status_guest_icon.png
deleted file mode 100644
index 53113b8a368..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_guest_icon.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_help.png b/chromium/ash/resources/default_100_percent/cros/status/status_help.png
deleted file mode 100644
index 9410cbd36ac..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_help.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_help_hover.png b/chromium/ash/resources/default_100_percent/cros/status/status_help_hover.png
deleted file mode 100644
index 49e3ad27e9b..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_help_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_ime.png b/chromium/ash/resources/default_100_percent/cros/status/status_ime.png
deleted file mode 100644
index b40d41ee97c..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_ime.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_less.png b/chromium/ash/resources/default_100_percent/cros/status/status_less.png
deleted file mode 100644
index 4289b9da7b8..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_less.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_locale.png b/chromium/ash/resources/default_100_percent/cros/status/status_locale.png
deleted file mode 100644
index ef84488f7be..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_locale.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_lockscreen.png b/chromium/ash/resources/default_100_percent/cros/status/status_lockscreen.png
deleted file mode 100644
index 51db39506f1..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_lockscreen.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_lockscreen_hover.png b/chromium/ash/resources/default_100_percent/cros/status/status_lockscreen_hover.png
deleted file mode 100644
index b707840cc34..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_lockscreen_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_bottom.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_bottom.png
deleted file mode 100644
index 48a9b785df4..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_bottom.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_bottom_left.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_bottom_left.png
deleted file mode 100644
index ed08895c1dc..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_bottom_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_bottom_right.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_bottom_right.png
deleted file mode 100644
index 5c411664aba..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_bottom_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_center.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_center.png
deleted file mode 100644
index 674a2caf3ed..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_center.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_left.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_left.png
deleted file mode 100644
index 0ca8c152c87..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_right.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_right.png
deleted file mode 100644
index 107f25ee038..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_top.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_top.png
deleted file mode 100644
index 0c882a30355..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_top.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_top_left.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_top_left.png
deleted file mode 100644
index a2885849256..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_top_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_top_right.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_top_right.png
deleted file mode 100644
index ac7c0dffecc..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_normal_top_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_bottom.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_bottom.png
deleted file mode 100644
index 07b1a81db81..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_bottom.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_bottom_left.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_bottom_left.png
deleted file mode 100644
index a0c58bbca50..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_bottom_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_bottom_right.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_bottom_right.png
deleted file mode 100644
index f20a29d47e6..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_bottom_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_center.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_center.png
deleted file mode 100644
index 948a9225cbc..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_center.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_left.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_left.png
deleted file mode 100644
index e896e8105e6..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_right.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_right.png
deleted file mode 100644
index 47e1e4ba51f..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_top.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_top.png
deleted file mode 100644
index 6e304f22192..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_top.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_top_left.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_top_left.png
deleted file mode 100644
index aecbe19888c..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_top_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_top_right.png b/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_top_right.png
deleted file mode 100644
index 535677029ef..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_logout_button_pushed_top_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_managed.png b/chromium/ash/resources/default_100_percent/cros/status/status_managed.png
deleted file mode 100644
index 88155e7537c..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_managed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_managed_mode_user.png b/chromium/ash/resources/default_100_percent/cros/status/status_managed_mode_user.png
deleted file mode 100644
index b559fda3054..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_managed_mode_user.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_managed_tray.png b/chromium/ash/resources/default_100_percent/cros/status/status_managed_tray.png
deleted file mode 100644
index 709546ec516..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_managed_tray.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_more.png b/chromium/ash/resources/default_100_percent/cros/status/status_more.png
deleted file mode 100644
index 41b5995041a..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_more.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all.png b/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all.png
deleted file mode 100644
index f09e1fc909c..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_dark.png b/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_dark.png
deleted file mode 100644
index c5f4a8633ea..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_dark_discharging.png b/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_dark_discharging.png
deleted file mode 100644
index 19bcaa13f5b..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_dark_discharging.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_dark_fluctuating.png b/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_dark_fluctuating.png
deleted file mode 100644
index d8a10e8d2bd..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_dark_fluctuating.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_discharging.png b/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_discharging.png
deleted file mode 100644
index 108d98ba045..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_discharging.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_fluctuating.png b/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_fluctuating.png
deleted file mode 100644
index 3c37c5977c4..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_power_small_all_fluctuating.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_screenshare.png b/chromium/ash/resources/default_100_percent/cros/status/status_screenshare.png
deleted file mode 100644
index 0e5cd8714e2..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_screenshare.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_screenshare_dark.png b/chromium/ash/resources/default_100_percent/cros/status/status_screenshare_dark.png
deleted file mode 100644
index 82af5f0acd3..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_screenshare_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_session_length_limit_timer.png b/chromium/ash/resources/default_100_percent/cros/status/status_session_length_limit_timer.png
deleted file mode 100644
index 2e0fd04485e..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_session_length_limit_timer.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_settings.png b/chromium/ash/resources/default_100_percent/cros/status/status_settings.png
deleted file mode 100644
index 8de16dc9e5d..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_settings.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_shutdown.png b/chromium/ash/resources/default_100_percent/cros/status/status_shutdown.png
deleted file mode 100644
index 00328f97b2d..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_shutdown.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_shutdown_hover.png b/chromium/ash/resources/default_100_percent/cros/status/status_shutdown_hover.png
deleted file mode 100644
index 065865205de..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_shutdown_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_sms.png b/chromium/ash/resources/default_100_percent/cros/status/status_sms.png
deleted file mode 100644
index 093ce5852b1..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_sms.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_tracing.png b/chromium/ash/resources/default_100_percent/cros/status/status_tracing.png
deleted file mode 100644
index eaba620c959..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_tracing.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_update.png b/chromium/ash/resources/default_100_percent/cros/status/status_update.png
deleted file mode 100644
index 98256a8eb2b..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_update.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_update_dark.png b/chromium/ash/resources/default_100_percent/cros/status/status_update_dark.png
deleted file mode 100644
index 397bd6308c1..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_update_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_update_dark_green.png b/chromium/ash/resources/default_100_percent/cros/status/status_update_dark_green.png
deleted file mode 100644
index dd5d363a7a2..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_update_dark_green.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_update_dark_orange.png b/chromium/ash/resources/default_100_percent/cros/status/status_update_dark_orange.png
deleted file mode 100644
index 4ad80793406..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_update_dark_orange.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_update_dark_red.png b/chromium/ash/resources/default_100_percent/cros/status/status_update_dark_red.png
deleted file mode 100644
index 444cdacbe50..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_update_dark_red.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_update_green.png b/chromium/ash/resources/default_100_percent/cros/status/status_update_green.png
deleted file mode 100644
index cd94452271e..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_update_green.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_update_orange.png b/chromium/ash/resources/default_100_percent/cros/status/status_update_orange.png
deleted file mode 100644
index 43d61c7e4b6..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_update_orange.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_update_red.png b/chromium/ash/resources/default_100_percent/cros/status/status_update_red.png
deleted file mode 100644
index a73b85a7544..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_update_red.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_volume_dark.png b/chromium/ash/resources/default_100_percent/cros/status/status_volume_dark.png
deleted file mode 100644
index 76dc1857ae3..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_volume_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_100_percent/cros/status/status_volume_mute.png b/chromium/ash/resources/default_100_percent/cros/status/status_volume_mute.png
deleted file mode 100644
index 04aded3ba1f..00000000000
--- a/chromium/ash/resources/default_100_percent/cros/status/status_volume_mute.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alert_small.png b/chromium/ash/resources/default_200_percent/common/alert_small.png
deleted file mode 100644
index 544f98ae96c..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alert_small.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/launcher_background.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/launcher_background.png
deleted file mode 100644
index 5a6220414aa..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/launcher_background.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/launcher_underline_active.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/launcher_underline_active.png
deleted file mode 100644
index f89d8f5e2f3..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/launcher_underline_active.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/launcher_underline_running.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/launcher_underline_running.png
deleted file mode 100644
index ede3d2d75ae..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/launcher_underline_running.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_app_menu_icon.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_app_menu_icon.png
deleted file mode 100644
index 2e1a70f7dc5..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_app_menu_icon.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_guest_icon.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_guest_icon.png
deleted file mode 100644
index 11aca56a942..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_guest_icon.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_icon_background_normal.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_icon_background_normal.png
deleted file mode 100644
index cc2d1b75ccb..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_icon_background_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_icon_background_onblack_normal.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_icon_background_onblack_normal.png
deleted file mode 100644
index 55bac5893e7..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_icon_background_onblack_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_icon_background_pressed.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_icon_background_pressed.png
deleted file mode 100644
index 498b80bce22..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_icon_background_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_notification_icon.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_notification_icon.png
deleted file mode 100644
index 19322c5c064..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_notification_icon.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_center.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_center.png
deleted file mode 100644
index 9b072370ab5..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_center.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_left.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_left.png
deleted file mode 100644
index dba3b692b4c..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_onblack_center.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_onblack_center.png
deleted file mode 100644
index ea177511b81..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_onblack_center.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_onblack_left.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_onblack_left.png
deleted file mode 100644
index ff4e1efe73b..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_onblack_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_onblack_right.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_onblack_right.png
deleted file mode 100644
index 9284fa8f83c..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_onblack_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_right.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_right.png
deleted file mode 100644
index bb129f5bf53..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_normal_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_pressed_center.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_pressed_center.png
deleted file mode 100644
index 953e1edd366..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_pressed_center.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_pressed_left.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_pressed_left.png
deleted file mode 100644
index 8c6f84c003b..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_pressed_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_pressed_right.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_pressed_right.png
deleted file mode 100644
index 27207a13835..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_pressed_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_bottom.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_bottom.png
deleted file mode 100644
index 0804518dfdf..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_bottom.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_center.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_center.png
deleted file mode 100644
index 96859ea6824..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_center.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_onblack_bottom.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_onblack_bottom.png
deleted file mode 100644
index 85bd1f1e766..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_onblack_bottom.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_onblack_center.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_onblack_center.png
deleted file mode 100644
index d880b32eecd..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_onblack_center.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_onblack_top.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_onblack_top.png
deleted file mode 100644
index 18848265b75..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_onblack_top.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_top.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_top.png
deleted file mode 100644
index fed0cab22d8..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_normal_top.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_pressed_bottom.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_pressed_bottom.png
deleted file mode 100644
index 53b3a0d2058..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_pressed_bottom.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_pressed_center.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_pressed_center.png
deleted file mode 100644
index 4ec633ff514..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_pressed_center.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_pressed_top.png b/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_pressed_top.png
deleted file mode 100644
index e47b08106d3..00000000000
--- a/chromium/ash/resources/default_200_percent/common/alt_launcher/status_tray_vertical_pressed_top.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_appmenu.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_appmenu.png
deleted file mode 100644
index 8a3ba66a002..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_appmenu.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_appmenu_hover.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_appmenu_hover.png
deleted file mode 100644
index 7762f27b061..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_appmenu_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_appmenu_pressed.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_appmenu_pressed.png
deleted file mode 100644
index 82ca4b26f1e..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_appmenu_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_background.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_background.png
deleted file mode 100644
index 3a3e6a17440..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_background.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_background_left.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_background_left.png
deleted file mode 100644
index 165f6b8f3cb..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_background_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_background_right.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_background_right.png
deleted file mode 100644
index 593780b98a2..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_background_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_corner.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_corner.png
deleted file mode 100644
index f354c533d42..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_corner.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_dimming.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_dimming.png
deleted file mode 100644
index 6843219c71e..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_dimming.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_dimming_left.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_dimming_left.png
deleted file mode 100644
index 30d20e87945..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_dimming_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_dimming_right.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_dimming_right.png
deleted file mode 100644
index 72f5a6f4dd0..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_dimming_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_overflow.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_overflow.png
deleted file mode 100644
index bddc06cb7cd..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_overflow.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_bottom_active.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_bottom_active.png
deleted file mode 100644
index 21181153dc2..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_bottom_active.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_bottom_hover.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_bottom_hover.png
deleted file mode 100644
index 4062f829e7b..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_bottom_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_bottom_running.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_bottom_running.png
deleted file mode 100644
index 7b7e3e2d65c..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_bottom_running.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_left_active.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_left_active.png
deleted file mode 100644
index c2937e7edc5..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_left_active.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_left_hover.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_left_hover.png
deleted file mode 100644
index c2937e7edc5..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_left_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_left_running.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_left_running.png
deleted file mode 100644
index d7ac0494e57..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_left_running.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_right_active.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_right_active.png
deleted file mode 100644
index 2f9ac00c252..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_right_active.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_right_hover.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_right_hover.png
deleted file mode 100644
index 2f9ac00c252..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_right_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_right_running.png b/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_right_running.png
deleted file mode 100644
index 8fade1943d4..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/launcher_underline_right_running.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/task_manager.png b/chromium/ash/resources/default_200_percent/common/launcher/task_manager.png
deleted file mode 100644
index 63b18213173..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/task_manager.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/window_switcher_icon_incognito.png b/chromium/ash/resources/default_200_percent/common/launcher/window_switcher_icon_incognito.png
deleted file mode 100644
index d1ab17c6eec..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/window_switcher_icon_incognito.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/launcher/window_switcher_icon_normal.png b/chromium/ash/resources/default_200_percent/common/launcher/window_switcher_icon_normal.png
deleted file mode 100644
index a718a458b85..00000000000
--- a/chromium/ash/resources/default_200_percent/common/launcher/window_switcher_icon_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/multi_window_resize_vertical.png b/chromium/ash/resources/default_200_percent/common/multi_window_resize_vertical.png
deleted file mode 100644
index 80f7d62e264..00000000000
--- a/chromium/ash/resources/default_200_percent/common/multi_window_resize_vertical.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/tray_popup_label_button_border.png b/chromium/ash/resources/default_200_percent/common/tray_popup_label_button_border.png
deleted file mode 100644
index ecb62a8659f..00000000000
--- a/chromium/ash/resources/default_200_percent/common/tray_popup_label_button_border.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/tray_popup_label_button_hover_background.png b/chromium/ash/resources/default_200_percent/common/tray_popup_label_button_hover_background.png
deleted file mode 100644
index afa5af9fa42..00000000000
--- a/chromium/ash/resources/default_200_percent/common/tray_popup_label_button_hover_background.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/tray_popup_label_button_normal_background.png b/chromium/ash/resources/default_200_percent/common/tray_popup_label_button_normal_background.png
deleted file mode 100644
index 61ff347c3ef..00000000000
--- a/chromium/ash/resources/default_200_percent/common/tray_popup_label_button_normal_background.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/tray_popup_public_account_logout_button_border.png b/chromium/ash/resources/default_200_percent/common/tray_popup_public_account_logout_button_border.png
deleted file mode 100644
index 36d409f2858..00000000000
--- a/chromium/ash/resources/default_200_percent/common/tray_popup_public_account_logout_button_border.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_close_short_black_hover.png b/chromium/ash/resources/default_200_percent/common/window_close_short_black_hover.png
deleted file mode 100644
index 13445f12842..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_close_short_black_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_close_short_black_normal.png b/chromium/ash/resources/default_200_percent/common/window_close_short_black_normal.png
deleted file mode 100644
index 12aa99337d2..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_close_short_black_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_close_short_black_pressed.png b/chromium/ash/resources/default_200_percent/common/window_close_short_black_pressed.png
deleted file mode 100644
index 42c3ca74515..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_close_short_black_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_close_short_hover.png b/chromium/ash/resources/default_200_percent/common/window_close_short_hover.png
deleted file mode 100644
index ad35cc769db..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_close_short_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_close_short_normal.png b/chromium/ash/resources/default_200_percent/common/window_close_short_normal.png
deleted file mode 100644
index d75809f10af..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_close_short_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_close_short_pressed.png b/chromium/ash/resources/default_200_percent/common/window_close_short_pressed.png
deleted file mode 100644
index 711c6de48c7..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_close_short_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_close_tall_hover.png b/chromium/ash/resources/default_200_percent/common/window_close_tall_hover.png
deleted file mode 100644
index 011e670bb46..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_close_tall_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_close_tall_normal.png b/chromium/ash/resources/default_200_percent/common/window_close_tall_normal.png
deleted file mode 100644
index dd86f4ac291..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_close_tall_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_close_tall_pressed.png b/chromium/ash/resources/default_200_percent/common/window_close_tall_pressed.png
deleted file mode 100644
index b6cfd646816..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_close_tall_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_header_base_active.png b/chromium/ash/resources/default_200_percent/common/window_header_base_active.png
deleted file mode 100644
index fe086b61478..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_header_base_active.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_header_base_inactive.png b/chromium/ash/resources/default_200_percent/common/window_header_base_inactive.png
deleted file mode 100644
index 9403b7e01bf..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_header_base_inactive.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_header_base_incognito_active.png b/chromium/ash/resources/default_200_percent/common/window_header_base_incognito_active.png
deleted file mode 100644
index 2ac535df9e4..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_header_base_incognito_active.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_header_base_incognito_inactive.png b/chromium/ash/resources/default_200_percent/common/window_header_base_incognito_inactive.png
deleted file mode 100644
index adac9cebed1..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_header_base_incognito_inactive.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_header_base_minimal.png b/chromium/ash/resources/default_200_percent/common/window_header_base_minimal.png
deleted file mode 100644
index 32294b3df5f..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_header_base_minimal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_minimize_short_hover.png b/chromium/ash/resources/default_200_percent/common/window_minimize_short_hover.png
deleted file mode 100644
index 61cd35426dc..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_minimize_short_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_minimize_short_normal.png b/chromium/ash/resources/default_200_percent/common/window_minimize_short_normal.png
deleted file mode 100644
index 29f847039e0..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_minimize_short_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_minimize_short_pressed.png b/chromium/ash/resources/default_200_percent/common/window_minimize_short_pressed.png
deleted file mode 100644
index 7511d7dea19..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_minimize_short_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_position_left_hover.png b/chromium/ash/resources/default_200_percent/common/window_position_left_hover.png
deleted file mode 100644
index 4d79bb222fd..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_position_left_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_position_left_hover_restore.png b/chromium/ash/resources/default_200_percent/common/window_position_left_hover_restore.png
deleted file mode 100644
index 61c53876870..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_position_left_hover_restore.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_position_left_normal.png b/chromium/ash/resources/default_200_percent/common/window_position_left_normal.png
deleted file mode 100644
index 58e21b99678..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_position_left_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_position_left_normal_restore.png b/chromium/ash/resources/default_200_percent/common/window_position_left_normal_restore.png
deleted file mode 100644
index bba0ff421ad..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_position_left_normal_restore.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_position_left_pressed.png b/chromium/ash/resources/default_200_percent/common/window_position_left_pressed.png
deleted file mode 100644
index b7fae089645..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_position_left_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_position_left_pressed_restore.png b/chromium/ash/resources/default_200_percent/common/window_position_left_pressed_restore.png
deleted file mode 100644
index 0f9e0c92ac3..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_position_left_pressed_restore.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_position_middle_hover.png b/chromium/ash/resources/default_200_percent/common/window_position_middle_hover.png
deleted file mode 100644
index fe65289b18b..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_position_middle_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_position_middle_normal.png b/chromium/ash/resources/default_200_percent/common/window_position_middle_normal.png
deleted file mode 100644
index 0cda265b274..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_position_middle_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_position_middle_pressed.png b/chromium/ash/resources/default_200_percent/common/window_position_middle_pressed.png
deleted file mode 100644
index f6648674933..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_position_middle_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_position_right_hover.png b/chromium/ash/resources/default_200_percent/common/window_position_right_hover.png
deleted file mode 100644
index e31c7294ab7..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_position_right_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_position_right_hover_restore.png b/chromium/ash/resources/default_200_percent/common/window_position_right_hover_restore.png
deleted file mode 100644
index e5a5be33ca3..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_position_right_hover_restore.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_position_right_normal.png b/chromium/ash/resources/default_200_percent/common/window_position_right_normal.png
deleted file mode 100644
index 1a8e7a24b94..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_position_right_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_position_right_normal_restore.png b/chromium/ash/resources/default_200_percent/common/window_position_right_normal_restore.png
deleted file mode 100644
index 3cf2d4b783b..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_position_right_normal_restore.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_position_right_pressed.png b/chromium/ash/resources/default_200_percent/common/window_position_right_pressed.png
deleted file mode 100644
index b5e533657ec..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_position_right_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_position_right_pressed_restore.png b/chromium/ash/resources/default_200_percent/common/window_position_right_pressed_restore.png
deleted file mode 100644
index 62bb151bddc..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_position_right_pressed_restore.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_size_short_black_hover.png b/chromium/ash/resources/default_200_percent/common/window_size_short_black_hover.png
deleted file mode 100644
index 99a64dd5a4e..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_size_short_black_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_size_short_black_normal.png b/chromium/ash/resources/default_200_percent/common/window_size_short_black_normal.png
deleted file mode 100644
index d7cd09ecad7..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_size_short_black_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_size_short_black_pressed.png b/chromium/ash/resources/default_200_percent/common/window_size_short_black_pressed.png
deleted file mode 100644
index 24d36b2b565..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_size_short_black_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_size_short_hover.png b/chromium/ash/resources/default_200_percent/common/window_size_short_hover.png
deleted file mode 100644
index 39c31794f2d..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_size_short_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_size_short_normal.png b/chromium/ash/resources/default_200_percent/common/window_size_short_normal.png
deleted file mode 100644
index a318359967c..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_size_short_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_size_short_pressed.png b/chromium/ash/resources/default_200_percent/common/window_size_short_pressed.png
deleted file mode 100644
index 1aca3dbb531..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_size_short_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_size_tall_hover.png b/chromium/ash/resources/default_200_percent/common/window_size_tall_hover.png
deleted file mode 100644
index cc7508cc1c4..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_size_tall_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_size_tall_normal.png b/chromium/ash/resources/default_200_percent/common/window_size_tall_normal.png
deleted file mode 100644
index 928eb01eca0..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_size_tall_normal.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/common/window_size_tall_pressed.png b/chromium/ash/resources/default_200_percent/common/window_size_tall_pressed.png
deleted file mode 100644
index 3e988f39fe1..00000000000
--- a/chromium/ash/resources/default_200_percent/common/window_size_tall_pressed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/common/default_throbber.png b/chromium/ash/resources/default_200_percent/cros/common/default_throbber.png
deleted file mode 100644
index 1538e41d9e1..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/common/default_throbber.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/notification_3g.png b/chromium/ash/resources/default_200_percent/cros/network/notification_3g.png
deleted file mode 100644
index 6c04076791c..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/notification_3g.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/notification_lte.png b/chromium/ash/resources/default_200_percent/cros/network/notification_lte.png
deleted file mode 100644
index 0ca53f71ec5..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/notification_lte.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/status_cellular_disabled.png b/chromium/ash/resources/default_200_percent/cros/network/status_cellular_disabled.png
deleted file mode 100644
index cd10247e4bd..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/status_cellular_disabled.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/status_cellular_disabled_hover.png b/chromium/ash/resources/default_200_percent/cros/network/status_cellular_disabled_hover.png
deleted file mode 100644
index 18ffd31edd9..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/status_cellular_disabled_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/status_cellular_enabled.png b/chromium/ash/resources/default_200_percent/cros/network/status_cellular_enabled.png
deleted file mode 100644
index 5817ab5dfec..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/status_cellular_enabled.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/status_cellular_enabled_hover.png b/chromium/ash/resources/default_200_percent/cros/network/status_cellular_enabled_hover.png
deleted file mode 100644
index f9c0c6071b0..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/status_cellular_enabled_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/status_cellular_failed.png b/chromium/ash/resources/default_200_percent/cros/network/status_cellular_failed.png
deleted file mode 100644
index 282cc07a18d..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/status_cellular_failed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/status_data_low.png b/chromium/ash/resources/default_200_percent/cros/network/status_data_low.png
deleted file mode 100644
index e32346c62f3..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/status_data_low.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/status_data_none.png b/chromium/ash/resources/default_200_percent/cros/network/status_data_none.png
deleted file mode 100644
index 3f20d4acd3f..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/status_data_none.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/status_network_failed.png b/chromium/ash/resources/default_200_percent/cros/network/status_network_failed.png
deleted file mode 100644
index 803a48e1a5b..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/status_network_failed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/status_network_info.png b/chromium/ash/resources/default_200_percent/cros/network/status_network_info.png
deleted file mode 100644
index 98a920958b6..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/status_network_info.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/status_network_info_hover.png b/chromium/ash/resources/default_200_percent/cros/network/status_network_info_hover.png
deleted file mode 100644
index db3e2662c09..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/status_network_info_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/status_wifi_disabled.png b/chromium/ash/resources/default_200_percent/cros/network/status_wifi_disabled.png
deleted file mode 100644
index a9d54c7215b..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/status_wifi_disabled.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/status_wifi_disabled_hover.png b/chromium/ash/resources/default_200_percent/cros/network/status_wifi_disabled_hover.png
deleted file mode 100644
index b485baed04d..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/status_wifi_disabled_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/status_wifi_enabled.png b/chromium/ash/resources/default_200_percent/cros/network/status_wifi_enabled.png
deleted file mode 100644
index e951ff3e77f..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/status_wifi_enabled.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/status_wifi_enabled_hover.png b/chromium/ash/resources/default_200_percent/cros/network/status_wifi_enabled_hover.png
deleted file mode 100644
index 7a728844a80..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/status_wifi_enabled_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_3g_dark.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_3g_dark.png
deleted file mode 100644
index e58ed2ada82..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_3g_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_3g_light.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_3g_light.png
deleted file mode 100644
index 095a8894941..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_3g_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_4g_dark.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_4g_dark.png
deleted file mode 100644
index d17ceb76a6c..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_4g_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_4g_light.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_4g_light.png
deleted file mode 100644
index e7835960ec5..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_4g_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_arcs_dark.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_arcs_dark.png
deleted file mode 100644
index f3c281f2eab..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_arcs_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_arcs_light.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_arcs_light.png
deleted file mode 100644
index 108249c7154..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_arcs_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_bars_dark.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_bars_dark.png
deleted file mode 100644
index 548ef5f4e0f..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_bars_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_bars_light.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_bars_light.png
deleted file mode 100644
index 90f2232b91d..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_bars_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_edge_dark.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_edge_dark.png
deleted file mode 100644
index fae8b09c761..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_edge_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_edge_light.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_edge_light.png
deleted file mode 100644
index 445bc95234f..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_edge_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_evdo_dark.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_evdo_dark.png
deleted file mode 100644
index 71351465888..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_evdo_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_evdo_light.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_evdo_light.png
deleted file mode 100644
index 55b89af5b6a..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_evdo_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_gprs_dark.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_gprs_dark.png
deleted file mode 100644
index c45081d13fc..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_gprs_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_gprs_light.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_gprs_light.png
deleted file mode 100644
index 4277cdfa79d..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_gprs_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_hspa_dark.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_hspa_dark.png
deleted file mode 100644
index bf424a31486..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_hspa_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_hspa_light.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_hspa_light.png
deleted file mode 100644
index ca2f70790c6..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_hspa_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_hspa_plus_dark.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_hspa_plus_dark.png
deleted file mode 100644
index a3522894ce7..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_hspa_plus_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_hspa_plus_light.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_hspa_plus_light.png
deleted file mode 100644
index 6e2b38b2fa6..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_hspa_plus_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_lte_advanced_dark.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_lte_advanced_dark.png
deleted file mode 100644
index 50c496ae1a0..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_lte_advanced_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_lte_advanced_light.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_lte_advanced_light.png
deleted file mode 100644
index ef9f7ce044b..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_lte_advanced_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_lte_dark.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_lte_dark.png
deleted file mode 100644
index 1c72085ed86..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_lte_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_lte_light.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_lte_light.png
deleted file mode 100644
index 53f9ab11326..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_lte_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_roaming_dark.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_roaming_dark.png
deleted file mode 100644
index f59974f8aeb..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_roaming_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_roaming_light.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_roaming_light.png
deleted file mode 100644
index ae7fade4eea..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_roaming_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_secure_dark.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_secure_dark.png
deleted file mode 100644
index 10893076c47..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_secure_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_secure_light.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_secure_light.png
deleted file mode 100644
index 022dd6631b4..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_secure_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_vpn_badge.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_vpn_badge.png
deleted file mode 100644
index 07a07564791..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_network_vpn_badge.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_vpn_dark.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_vpn_dark.png
deleted file mode 100644
index 5503851e97e..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_vpn_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/network/statusbar_wired.png b/chromium/ash/resources/default_200_percent/cros/network/statusbar_wired.png
deleted file mode 100644
index 2db7fa0ac0b..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/network/statusbar_wired.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/notification/notification_low_power_charger.png b/chromium/ash/resources/default_200_percent/cros/notification/notification_low_power_charger.png
deleted file mode 100644
index 78a6b889c81..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/notification/notification_low_power_charger.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/multiprofiles_add.png b/chromium/ash/resources/default_200_percent/cros/status/multiprofiles_add.png
deleted file mode 100644
index 2fb62cdd301..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/multiprofiles_add.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_accessibility_dark.png b/chromium/ash/resources/default_200_percent/cros/status/status_accessibility_dark.png
deleted file mode 100644
index d1943715595..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_accessibility_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_audio_device_bluetooth.png b/chromium/ash/resources/default_200_percent/cros/status/status_audio_device_bluetooth.png
deleted file mode 100644
index 28d36d0d376..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_audio_device_bluetooth.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_audio_device_hdmi.png b/chromium/ash/resources/default_200_percent/cros/status/status_audio_device_hdmi.png
deleted file mode 100644
index d6ddc0925ab..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_audio_device_hdmi.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_audio_device_headphones.png b/chromium/ash/resources/default_200_percent/cros/status/status_audio_device_headphones.png
deleted file mode 100644
index 4c0e648b663..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_audio_device_headphones.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_audio_device_usb.png b/chromium/ash/resources/default_200_percent/cros/status/status_audio_device_usb.png
deleted file mode 100644
index f17edcf9e3e..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_audio_device_usb.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_bluetooth.png b/chromium/ash/resources/default_200_percent/cros/status/status_bluetooth.png
deleted file mode 100644
index 6ff1d01b0a2..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_bluetooth.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_bluetooth_disabled.png b/chromium/ash/resources/default_200_percent/cros/status/status_bluetooth_disabled.png
deleted file mode 100644
index 6676cf97007..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_bluetooth_disabled.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_bluetooth_disabled_hover.png b/chromium/ash/resources/default_200_percent/cros/status/status_bluetooth_disabled_hover.png
deleted file mode 100644
index 66f368dccdb..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_bluetooth_disabled_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_bluetooth_enabled.png b/chromium/ash/resources/default_200_percent/cros/status/status_bluetooth_enabled.png
deleted file mode 100644
index d9ee935a84c..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_bluetooth_enabled.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_bluetooth_enabled_hover.png b/chromium/ash/resources/default_200_percent/cros/status/status_bluetooth_enabled_hover.png
deleted file mode 100644
index a4fa7eb8626..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_bluetooth_enabled_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_brightness.png b/chromium/ash/resources/default_200_percent/cros/status/status_brightness.png
deleted file mode 100644
index 547982efb84..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_brightness.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_capslock.png b/chromium/ash/resources/default_200_percent/cros/status/status_capslock.png
deleted file mode 100644
index 7ceed8363cd..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_capslock.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_capslock_dark.png b/chromium/ash/resources/default_200_percent/cros/status/status_capslock_dark.png
deleted file mode 100644
index 1d78d5d7bd4..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_capslock_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_display_dark.png b/chromium/ash/resources/default_200_percent/cros/status/status_display_dark.png
deleted file mode 100644
index 9d28ca2c104..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_display_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_drive.png b/chromium/ash/resources/default_200_percent/cros/status/status_drive.png
deleted file mode 100644
index 43e687727cd..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_drive.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_drive_item_cancel.png b/chromium/ash/resources/default_200_percent/cros/status/status_drive_item_cancel.png
deleted file mode 100644
index 7169edcfcac..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_drive_item_cancel.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_drive_item_cancel_hover.png b/chromium/ash/resources/default_200_percent/cros/status/status_drive_item_cancel_hover.png
deleted file mode 100644
index 9b02e5897c5..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_drive_item_cancel_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_drive_item_done.png b/chromium/ash/resources/default_200_percent/cros/status/status_drive_item_done.png
deleted file mode 100644
index d397f77f9f0..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_drive_item_done.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_drive_item_failed.png b/chromium/ash/resources/default_200_percent/cros/status/status_drive_item_failed.png
deleted file mode 100644
index 3ed87e11d2a..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_drive_item_failed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_drive_light.png b/chromium/ash/resources/default_200_percent/cros/status/status_drive_light.png
deleted file mode 100644
index bfea7bdd69e..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_drive_light.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_guest_icon.png b/chromium/ash/resources/default_200_percent/cros/status/status_guest_icon.png
deleted file mode 100644
index c2921bb9cb3..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_guest_icon.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_help.png b/chromium/ash/resources/default_200_percent/cros/status/status_help.png
deleted file mode 100644
index a8a99776621..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_help.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_help_hover.png b/chromium/ash/resources/default_200_percent/cros/status/status_help_hover.png
deleted file mode 100644
index a9b5233f5df..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_help_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_ime.png b/chromium/ash/resources/default_200_percent/cros/status/status_ime.png
deleted file mode 100644
index f0104f0e697..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_ime.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_less.png b/chromium/ash/resources/default_200_percent/cros/status/status_less.png
deleted file mode 100644
index 8c5e81f094a..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_less.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_locale.png b/chromium/ash/resources/default_200_percent/cros/status/status_locale.png
deleted file mode 100644
index dab0994a96f..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_locale.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_lockscreen.png b/chromium/ash/resources/default_200_percent/cros/status/status_lockscreen.png
deleted file mode 100644
index 9d7fdcd5b76..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_lockscreen.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_lockscreen_hover.png b/chromium/ash/resources/default_200_percent/cros/status/status_lockscreen_hover.png
deleted file mode 100644
index e4aa68a3d2f..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_lockscreen_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_bottom.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_bottom.png
deleted file mode 100644
index 679ebe905cd..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_bottom.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_bottom_left.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_bottom_left.png
deleted file mode 100644
index 19151576f34..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_bottom_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_bottom_right.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_bottom_right.png
deleted file mode 100644
index 149b4a9c5dd..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_bottom_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_center.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_center.png
deleted file mode 100644
index 436c2ac18a1..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_center.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_left.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_left.png
deleted file mode 100644
index c58ee946b2e..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_right.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_right.png
deleted file mode 100644
index 5f7d6500ff8..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_top.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_top.png
deleted file mode 100644
index cc114446f6a..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_top.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_top_left.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_top_left.png
deleted file mode 100644
index 05dfa2f90cd..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_top_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_top_right.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_top_right.png
deleted file mode 100644
index bf15dcdec00..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_normal_top_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_bottom.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_bottom.png
deleted file mode 100644
index 0e23e565c4c..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_bottom.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_bottom_left.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_bottom_left.png
deleted file mode 100644
index 79f2792aa6b..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_bottom_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_bottom_right.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_bottom_right.png
deleted file mode 100644
index d6aa1a4f511..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_bottom_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_center.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_center.png
deleted file mode 100644
index 41a39c92caf..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_center.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_left.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_left.png
deleted file mode 100644
index 1617280c4f7..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_right.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_right.png
deleted file mode 100644
index c5a5730fdfa..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_top.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_top.png
deleted file mode 100644
index b340b1bc287..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_top.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_top_left.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_top_left.png
deleted file mode 100644
index 787ef70d361..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_top_left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_top_right.png b/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_top_right.png
deleted file mode 100644
index 5d5f6349fa6..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_logout_button_pushed_top_right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_managed.png b/chromium/ash/resources/default_200_percent/cros/status/status_managed.png
deleted file mode 100644
index 19161c10e48..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_managed.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_managed_mode_user.png b/chromium/ash/resources/default_200_percent/cros/status/status_managed_mode_user.png
deleted file mode 100644
index 87c29656dea..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_managed_mode_user.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_managed_tray.png b/chromium/ash/resources/default_200_percent/cros/status/status_managed_tray.png
deleted file mode 100644
index 5019650bd4c..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_managed_tray.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_more.png b/chromium/ash/resources/default_200_percent/cros/status/status_more.png
deleted file mode 100644
index a33620bd36e..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_more.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all.png b/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all.png
deleted file mode 100644
index 42b706dc23b..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_dark.png b/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_dark.png
deleted file mode 100644
index d0ea331dc8b..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_dark_discharging.png b/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_dark_discharging.png
deleted file mode 100644
index 3c5557e8c7a..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_dark_discharging.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_dark_fluctuating.png b/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_dark_fluctuating.png
deleted file mode 100644
index 8be069fb325..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_dark_fluctuating.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_discharging.png b/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_discharging.png
deleted file mode 100644
index 8c8490f696c..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_discharging.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_fluctuating.png b/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_fluctuating.png
deleted file mode 100644
index be20d9b5fc8..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_power_small_all_fluctuating.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_screenshare.png b/chromium/ash/resources/default_200_percent/cros/status/status_screenshare.png
deleted file mode 100644
index 91d44e62bee..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_screenshare.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_screenshare_dark.png b/chromium/ash/resources/default_200_percent/cros/status/status_screenshare_dark.png
deleted file mode 100644
index 82fa5638b43..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_screenshare_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_session_length_limit_timer.png b/chromium/ash/resources/default_200_percent/cros/status/status_session_length_limit_timer.png
deleted file mode 100644
index 0dbae9835b4..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_session_length_limit_timer.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_settings.png b/chromium/ash/resources/default_200_percent/cros/status/status_settings.png
deleted file mode 100644
index a5655d6512b..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_settings.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_shutdown.png b/chromium/ash/resources/default_200_percent/cros/status/status_shutdown.png
deleted file mode 100644
index 15ce5e16abf..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_shutdown.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_shutdown_hover.png b/chromium/ash/resources/default_200_percent/cros/status/status_shutdown_hover.png
deleted file mode 100644
index f19ca3ce651..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_shutdown_hover.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_sms.png b/chromium/ash/resources/default_200_percent/cros/status/status_sms.png
deleted file mode 100644
index 101156b52ad..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_sms.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_tracing.png b/chromium/ash/resources/default_200_percent/cros/status/status_tracing.png
deleted file mode 100644
index 4680f3f033e..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_tracing.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_update.png b/chromium/ash/resources/default_200_percent/cros/status/status_update.png
deleted file mode 100644
index 47332d528c7..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_update.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_update_dark.png b/chromium/ash/resources/default_200_percent/cros/status/status_update_dark.png
deleted file mode 100644
index 4cba931f2b7..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_update_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_update_dark_green.png b/chromium/ash/resources/default_200_percent/cros/status/status_update_dark_green.png
deleted file mode 100644
index c9ca473bcee..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_update_dark_green.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_update_dark_orange.png b/chromium/ash/resources/default_200_percent/cros/status/status_update_dark_orange.png
deleted file mode 100644
index 467b3f1c37b..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_update_dark_orange.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_update_dark_red.png b/chromium/ash/resources/default_200_percent/cros/status/status_update_dark_red.png
deleted file mode 100644
index e861ab62615..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_update_dark_red.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_update_green.png b/chromium/ash/resources/default_200_percent/cros/status/status_update_green.png
deleted file mode 100644
index fa875dfd6d1..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_update_green.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_update_orange.png b/chromium/ash/resources/default_200_percent/cros/status/status_update_orange.png
deleted file mode 100644
index 02e04695b55..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_update_orange.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_update_red.png b/chromium/ash/resources/default_200_percent/cros/status/status_update_red.png
deleted file mode 100644
index ef49b2dd739..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_update_red.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_volume_dark.png b/chromium/ash/resources/default_200_percent/cros/status/status_volume_dark.png
deleted file mode 100644
index b8593a65587..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_volume_dark.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/default_200_percent/cros/status/status_volume_mute.png b/chromium/ash/resources/default_200_percent/cros/status/status_volume_mute.png
deleted file mode 100644
index 7a6abc8ab95..00000000000
--- a/chromium/ash/resources/default_200_percent/cros/status/status_volume_mute.png
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/wallpaper/default_large.jpg b/chromium/ash/resources/wallpaper/default_large.jpg
deleted file mode 100644
index 003f3f754b2..00000000000
--- a/chromium/ash/resources/wallpaper/default_large.jpg
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/resources/wallpaper/default_small.jpg b/chromium/ash/resources/wallpaper/default_small.jpg
deleted file mode 100644
index d8641f36ca4..00000000000
--- a/chromium/ash/resources/wallpaper/default_small.jpg
+++ /dev/null
Binary files differ
diff --git a/chromium/ash/root_window_controller.cc b/chromium/ash/root_window_controller.cc
deleted file mode 100644
index 0ab912a3177..00000000000
--- a/chromium/ash/root_window_controller.cc
+++ /dev/null
@@ -1,952 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/root_window_controller.h"
-
-#include <queue>
-#include <vector>
-
-#include "ash/ash_constants.h"
-#include "ash/ash_switches.h"
-#include "ash/desktop_background/desktop_background_controller.h"
-#include "ash/desktop_background/desktop_background_widget_controller.h"
-#include "ash/desktop_background/user_wallpaper_delegate.h"
-#include "ash/display/display_manager.h"
-#include "ash/focus_cycler.h"
-#include "ash/high_contrast/high_contrast_controller.h"
-#include "ash/root_window_settings.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "ash/shell_factory.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/touch/touch_hud_debug.h"
-#include "ash/touch/touch_hud_projection.h"
-#include "ash/touch/touch_observer_hud.h"
-#include "ash/wm/always_on_top_controller.h"
-#include "ash/wm/base_layout_manager.h"
-#include "ash/wm/dock/docked_window_layout_manager.h"
-#include "ash/wm/panels/panel_layout_manager.h"
-#include "ash/wm/panels/panel_window_event_handler.h"
-#include "ash/wm/root_window_layout_manager.h"
-#include "ash/wm/screen_dimmer.h"
-#include "ash/wm/solo_window_tracker.h"
-#include "ash/wm/stacking_controller.h"
-#include "ash/wm/status_area_layout_manager.h"
-#include "ash/wm/system_background_controller.h"
-#include "ash/wm/system_modal_container_layout_manager.h"
-#include "ash/wm/toplevel_window_event_handler.h"
-#include "ash/wm/window_properties.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace_controller.h"
-#include "base/command_line.h"
-#include "base/time/time.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/client/drag_drop_client.h"
-#include "ui/aura/client/tooltip_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/aura/window_observer.h"
-#include "ui/aura/window_tracker.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/models/menu_model.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-#include "ui/keyboard/keyboard_controller.h"
-#include "ui/keyboard/keyboard_util.h"
-#include "ui/views/controls/menu/menu_runner.h"
-#include "ui/views/corewm/capture_controller.h"
-#include "ui/views/corewm/visibility_controller.h"
-#include "ui/views/view_model.h"
-#include "ui/views/view_model_utils.h"
-
-#if defined(OS_CHROMEOS)
-#include "ash/wm/boot_splash_screen_chromeos.h"
-#endif
-
-namespace ash {
-namespace {
-
-#if defined(OS_CHROMEOS)
-// Duration for the animation that hides the boot splash screen, in
-// milliseconds. This should be short enough in relation to
-// wm/window_animation.cc's brightness/grayscale fade animation that the login
-// background image animation isn't hidden by the splash screen animation.
-const int kBootSplashScreenHideDurationMs = 500;
-#endif
-
-// Creates a new window for use as a container.
-aura::Window* CreateContainer(int window_id,
- const char* name,
- aura::Window* parent) {
- aura::Window* container = new aura::Window(NULL);
- container->set_id(window_id);
- container->SetName(name);
- container->Init(ui::LAYER_NOT_DRAWN);
- parent->AddChild(container);
- if (window_id != internal::kShellWindowId_UnparentedControlContainer)
- container->Show();
- return container;
-}
-
-// Reparents |window| to |new_parent|.
-void ReparentWindow(aura::Window* window, aura::Window* new_parent) {
- // Update the restore bounds to make it relative to the display.
- wm::WindowState* state = wm::GetWindowState(window);
- gfx::Rect restore_bounds;
- bool has_restore_bounds = state->HasRestoreBounds();
- if (has_restore_bounds)
- restore_bounds = state->GetRestoreBoundsInParent();
- new_parent->AddChild(window);
- if (has_restore_bounds)
- state->SetRestoreBoundsInParent(restore_bounds);
-}
-
-// Reparents the appropriate set of windows from |src| to |dst|.
-void ReparentAllWindows(aura::Window* src, aura::Window* dst) {
- // Set of windows to move.
- const int kContainerIdsToMove[] = {
- internal::kShellWindowId_DefaultContainer,
- internal::kShellWindowId_DockedContainer,
- internal::kShellWindowId_PanelContainer,
- internal::kShellWindowId_AlwaysOnTopContainer,
- internal::kShellWindowId_SystemModalContainer,
- internal::kShellWindowId_LockSystemModalContainer,
- internal::kShellWindowId_InputMethodContainer,
- internal::kShellWindowId_UnparentedControlContainer,
- };
- for (size_t i = 0; i < arraysize(kContainerIdsToMove); i++) {
- int id = kContainerIdsToMove[i];
- aura::Window* src_container = Shell::GetContainer(src, id);
- aura::Window* dst_container = Shell::GetContainer(dst, id);
- while (!src_container->children().empty()) {
- // Restart iteration from the source container windows each time as they
- // may change as a result of moving other windows.
- aura::Window::Windows::const_iterator iter =
- src_container->children().begin();
- while (iter != src_container->children().end() &&
- internal::SystemModalContainerLayoutManager::IsModalBackground(
- *iter)) {
- ++iter;
- }
- // If the entire window list is modal background windows then stop.
- if (iter == src_container->children().end())
- break;
- ReparentWindow(*iter, dst_container);
- }
- }
-}
-
-// Mark the container window so that a widget added to this container will
-// use the virtual screeen coordinates instead of parent.
-void SetUsesScreenCoordinates(aura::Window* container) {
- container->SetProperty(internal::kUsesScreenCoordinatesKey, true);
-}
-
-// Mark the container window so that a widget added to this container will
-// say in the same root window regardless of the bounds specified.
-void DescendantShouldStayInSameRootWindow(aura::Window* container) {
- container->SetProperty(internal::kStayInSameRootWindowKey, true);
-}
-
-// A window delegate which does nothing. Used to create a window that
-// is a event target, but do nothing.
-class EmptyWindowDelegate : public aura::WindowDelegate {
- public:
- EmptyWindowDelegate() {}
- virtual ~EmptyWindowDelegate() {}
-
- // aura::WindowDelegate overrides:
- virtual gfx::Size GetMinimumSize() const OVERRIDE {
- return gfx::Size();
- }
- virtual gfx::Size GetMaximumSize() const OVERRIDE {
- return gfx::Size();
- }
- virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE {
- }
- virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE {
- return gfx::kNullCursor;
- }
- virtual int GetNonClientComponent(
- const gfx::Point& point) const OVERRIDE {
- return HTNOWHERE;
- }
- virtual bool ShouldDescendIntoChildForEventHandling(
- aura::Window* child,
- const gfx::Point& location) OVERRIDE {
- return false;
- }
- virtual bool CanFocus() OVERRIDE {
- return false;
- }
- virtual void OnCaptureLost() OVERRIDE {
- }
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- }
- virtual void OnDeviceScaleFactorChanged(
- float device_scale_factor) OVERRIDE {
- }
- virtual void OnWindowDestroying() OVERRIDE {}
- virtual void OnWindowDestroyed() OVERRIDE {
- delete this;
- }
- virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE {
- }
- virtual bool HasHitTestMask() const OVERRIDE {
- return false;
- }
- virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE {}
- virtual void DidRecreateLayer(ui::Layer* old_layer,
- ui::Layer* new_layer) OVERRIDE {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(EmptyWindowDelegate);
-};
-
-} // namespace
-
-namespace internal {
-
-void RootWindowController::CreateForPrimaryDisplay(
- aura::RootWindow* root) {
- RootWindowController* controller = new RootWindowController(root);
- controller->Init(RootWindowController::PRIMARY,
- Shell::GetInstance()->delegate()->IsFirstRunAfterBoot());
-}
-
-void RootWindowController::CreateForSecondaryDisplay(aura::RootWindow * root) {
- RootWindowController* controller = new RootWindowController(root);
- controller->Init(RootWindowController::SECONDARY, false /* first run */);
-}
-
-void RootWindowController::CreateForVirtualKeyboardDisplay(
- aura::RootWindow * root) {
- RootWindowController* controller = new RootWindowController(root);
- controller->Init(RootWindowController::VIRTUAL_KEYBOARD,
- false /* first run */);
-}
-
-// static
-RootWindowController* RootWindowController::ForLauncher(aura::Window* window) {
- return GetRootWindowController(window->GetRootWindow());
-}
-
-// static
-RootWindowController* RootWindowController::ForWindow(
- const aura::Window* window) {
- return GetRootWindowController(window->GetRootWindow());
-}
-
-// static
-RootWindowController* RootWindowController::ForTargetRootWindow() {
- return internal::GetRootWindowController(Shell::GetTargetRootWindow());
-}
-
-// static
-aura::Window* RootWindowController::GetContainerForWindow(
- aura::Window* window) {
- aura::Window* container = window->parent();
- while (container && container->type() != aura::client::WINDOW_TYPE_UNKNOWN)
- container = container->parent();
- return container;
-}
-
-RootWindowController::~RootWindowController() {
- Shutdown();
- root_window_.reset();
- // The CaptureClient needs to be around for as long as the RootWindow is
- // valid.
- capture_client_.reset();
-}
-
-void RootWindowController::SetWallpaperController(
- DesktopBackgroundWidgetController* controller) {
- wallpaper_controller_.reset(controller);
-}
-
-void RootWindowController::SetAnimatingWallpaperController(
- AnimatingDesktopController* controller) {
- if (animating_wallpaper_controller_.get())
- animating_wallpaper_controller_->StopAnimating();
- animating_wallpaper_controller_.reset(controller);
-}
-
-void RootWindowController::Shutdown() {
- Shell::GetInstance()->RemoveShellObserver(this);
-
- if (animating_wallpaper_controller_.get())
- animating_wallpaper_controller_->StopAnimating();
- wallpaper_controller_.reset();
- animating_wallpaper_controller_.reset();
-
- // Change the target root window before closing child windows. If any child
- // being removed triggers a relayout of the shelf it will try to build a
- // window list adding windows from the target root window's containers which
- // may have already gone away.
- if (Shell::GetTargetRootWindow() == root_window()) {
- Shell::GetInstance()->set_target_root_window(
- Shell::GetPrimaryRootWindow() == root_window() ?
- NULL : Shell::GetPrimaryRootWindow());
- }
-
- CloseChildWindows();
- GetRootWindowSettings(root_window())->controller = NULL;
- screen_dimmer_.reset();
- workspace_controller_.reset();
- // Forget with the display ID so that display lookup
- // ends up with invalid display.
- internal::GetRootWindowSettings(root_window())->display_id =
- gfx::Display::kInvalidDisplayID;
- // And this root window should no longer process events.
- root_window_->PrepareForShutdown();
-
- system_background_.reset();
-}
-
-SystemModalContainerLayoutManager*
-RootWindowController::GetSystemModalLayoutManager(aura::Window* window) {
- aura::Window* modal_container = NULL;
- if (window) {
- aura::Window* window_container = GetContainerForWindow(window);
- if (window_container &&
- window_container->id() >= kShellWindowId_LockScreenContainer) {
- modal_container = GetContainer(kShellWindowId_LockSystemModalContainer);
- } else {
- modal_container = GetContainer(kShellWindowId_SystemModalContainer);
- }
- } else {
- int modal_window_id = Shell::GetInstance()->session_state_delegate()
- ->IsUserSessionBlocked() ? kShellWindowId_LockSystemModalContainer :
- kShellWindowId_SystemModalContainer;
- modal_container = GetContainer(modal_window_id);
- }
- return modal_container ? static_cast<SystemModalContainerLayoutManager*>(
- modal_container->layout_manager()) : NULL;
-}
-
-aura::Window* RootWindowController::GetContainer(int container_id) {
- return root_window()->GetChildById(container_id);
-}
-
-const aura::Window* RootWindowController::GetContainer(int container_id) const {
- return root_window_->window()->GetChildById(container_id);
-}
-
-void RootWindowController::ShowLauncher() {
- if (!shelf_->launcher())
- return;
- shelf_->launcher()->SetVisible(true);
- shelf_->status_area_widget()->Show();
-}
-
-void RootWindowController::OnLauncherCreated() {
- if (panel_layout_manager_)
- panel_layout_manager_->SetLauncher(shelf_->launcher());
- if (docked_layout_manager_) {
- docked_layout_manager_->SetLauncher(shelf_->launcher());
- if (shelf_->shelf_layout_manager())
- docked_layout_manager_->AddObserver(shelf_->shelf_layout_manager());
- }
-}
-
-void RootWindowController::UpdateAfterLoginStatusChange(
- user::LoginStatus status) {
- if (status != user::LOGGED_IN_NONE)
- mouse_event_target_.reset();
- if (shelf_->status_area_widget())
- shelf_->status_area_widget()->UpdateAfterLoginStatusChange(status);
-}
-
-void RootWindowController::HandleInitialDesktopBackgroundAnimationStarted() {
-#if defined(OS_CHROMEOS)
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshAnimateFromBootSplashScreen) &&
- boot_splash_screen_.get()) {
- // Make the splash screen fade out so it doesn't obscure the desktop
- // wallpaper's brightness/grayscale animation.
- boot_splash_screen_->StartHideAnimation(
- base::TimeDelta::FromMilliseconds(kBootSplashScreenHideDurationMs));
- }
-#endif
-}
-
-void RootWindowController::OnWallpaperAnimationFinished(views::Widget* widget) {
- // Make sure the wallpaper is visible.
- system_background_->SetColor(SK_ColorBLACK);
-#if defined(OS_CHROMEOS)
- boot_splash_screen_.reset();
-#endif
-
- Shell::GetInstance()->user_wallpaper_delegate()->
- OnWallpaperAnimationFinished();
- // Only removes old component when wallpaper animation finished. If we
- // remove the old one before the new wallpaper is done fading in there will
- // be a white flash during the animation.
- if (animating_wallpaper_controller()) {
- DesktopBackgroundWidgetController* controller =
- animating_wallpaper_controller()->GetController(true);
- // |desktop_widget_| should be the same animating widget we try to move
- // to |kDesktopController|. Otherwise, we may close |desktop_widget_|
- // before move it to |kDesktopController|.
- DCHECK_EQ(controller->widget(), widget);
- // Release the old controller and close its background widget.
- SetWallpaperController(controller);
- }
-}
-
-void RootWindowController::CloseChildWindows() {
- mouse_event_target_.reset();
-
- // |solo_window_tracker_| must be shut down before windows are destroyed.
- if (solo_window_tracker_) {
- if (docked_layout_manager_)
- docked_layout_manager_->RemoveObserver(solo_window_tracker_.get());
- solo_window_tracker_.reset();
- }
-
- // Deactivate keyboard container before closing child windows and shutting
- // down associated layout managers.
- DeactivateKeyboard(Shell::GetInstance()->keyboard_controller());
-
- // panel_layout_manager_ needs to be shut down before windows are destroyed.
- if (panel_layout_manager_) {
- panel_layout_manager_->Shutdown();
- panel_layout_manager_ = NULL;
- }
- // docked_layout_manager_ needs to be shut down before windows are destroyed.
- if (docked_layout_manager_) {
- if (shelf_ && shelf_->shelf_layout_manager())
- docked_layout_manager_->RemoveObserver(shelf_->shelf_layout_manager());
- docked_layout_manager_->Shutdown();
- docked_layout_manager_ = NULL;
- }
-
- aura::client::SetDragDropClient(root_window(), NULL);
-
- // TODO(harrym): Remove when Status Area Widget is a child view.
- if (shelf_) {
- shelf_->ShutdownStatusAreaWidget();
-
- if (shelf_->shelf_layout_manager())
- shelf_->shelf_layout_manager()->PrepareForShutdown();
- }
-
- // Close background widget first as it depends on tooltip.
- wallpaper_controller_.reset();
- animating_wallpaper_controller_.reset();
-
- workspace_controller_.reset();
- aura::client::SetTooltipClient(root_window(), NULL);
-
- // Explicitly destroy top level windows. We do this as during part of
- // destruction such windows may query the RootWindow for state.
- std::queue<aura::Window*> non_toplevel_windows;
- non_toplevel_windows.push(root_window());
- while (!non_toplevel_windows.empty()) {
- aura::Window* non_toplevel_window = non_toplevel_windows.front();
- non_toplevel_windows.pop();
- aura::WindowTracker toplevel_windows;
- for (size_t i = 0; i < non_toplevel_window->children().size(); ++i) {
- aura::Window* child = non_toplevel_window->children()[i];
- if (!child->owned_by_parent())
- continue;
- if (child->delegate())
- toplevel_windows.Add(child);
- else
- non_toplevel_windows.push(child);
- }
- while (!toplevel_windows.windows().empty())
- delete *toplevel_windows.windows().begin();
- }
- // And then remove the containers.
- while (!root_window()->children().empty()) {
- aura::Window* window = root_window()->children()[0];
- if (window->owned_by_parent()) {
- delete window;
- } else {
- root_window()->RemoveChild(window);
- }
- }
-
- shelf_.reset();
-}
-
-void RootWindowController::MoveWindowsTo(aura::Window* dst) {
- // Forget the shelf early so that shelf don't update itself using wrong
- // display info.
- workspace_controller_->SetShelf(NULL);
- ReparentAllWindows(root_window(), dst);
-}
-
-ShelfLayoutManager* RootWindowController::GetShelfLayoutManager() {
- return shelf_->shelf_layout_manager();
-}
-
-SystemTray* RootWindowController::GetSystemTray() {
- // We assume in throughout the code that this will not return NULL. If code
- // triggers this for valid reasons, it should test status_area_widget first.
- CHECK(shelf_->status_area_widget());
- return shelf_->status_area_widget()->system_tray();
-}
-
-void RootWindowController::ShowContextMenu(const gfx::Point& location_in_screen,
- ui::MenuSourceType source_type) {
- DCHECK(Shell::GetInstance()->delegate());
- scoped_ptr<ui::MenuModel> menu_model(
- Shell::GetInstance()->delegate()->CreateContextMenu(root_window()));
- if (!menu_model)
- return;
-
- // Background controller may not be set yet if user clicked on status are
- // before initial animation completion. See crbug.com/222218
- if (!wallpaper_controller_.get())
- return;
-
- views::MenuRunner menu_runner(menu_model.get());
- if (menu_runner.RunMenuAt(wallpaper_controller_->widget(),
- NULL, gfx::Rect(location_in_screen, gfx::Size()),
- views::MenuItemView::TOPLEFT, source_type,
- views::MenuRunner::CONTEXT_MENU) ==
- views::MenuRunner::MENU_DELETED) {
- return;
- }
-
- Shell::GetInstance()->UpdateShelfVisibility();
-}
-
-void RootWindowController::UpdateShelfVisibility() {
- shelf_->shelf_layout_manager()->UpdateVisibilityState();
-}
-
-const aura::Window* RootWindowController::GetWindowForFullscreenMode() const {
- const aura::Window::Windows& windows =
- GetContainer(kShellWindowId_DefaultContainer)->children();
- const aura::Window* topmost_window = NULL;
- for (aura::Window::Windows::const_reverse_iterator iter = windows.rbegin();
- iter != windows.rend(); ++iter) {
- if (((*iter)->type() == aura::client::WINDOW_TYPE_NORMAL ||
- (*iter)->type() == aura::client::WINDOW_TYPE_PANEL) &&
- (*iter)->layer()->GetTargetVisibility()) {
- topmost_window = *iter;
- break;
- }
- }
- while (topmost_window) {
- if (wm::GetWindowState(topmost_window)->IsFullscreen())
- return topmost_window;
- topmost_window = topmost_window->transient_parent();
- }
- return NULL;
-}
-
-void RootWindowController::ActivateKeyboard(
- keyboard::KeyboardController* keyboard_controller) {
- if (!keyboard::IsKeyboardEnabled() ||
- GetContainer(kShellWindowId_VirtualKeyboardContainer)) {
- return;
- }
- DCHECK(keyboard_controller);
- if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) {
- keyboard_controller->AddObserver(shelf()->shelf_layout_manager());
- keyboard_controller->AddObserver(panel_layout_manager_);
- keyboard_controller->AddObserver(docked_layout_manager_);
- }
- aura::Window* parent = root_window();
- aura::Window* keyboard_container =
- keyboard_controller->GetContainerWindow();
- keyboard_container->set_id(kShellWindowId_VirtualKeyboardContainer);
- parent->AddChild(keyboard_container);
- // TODO(oshima): Bounds of keyboard container should be handled by
- // RootWindowLayoutManager. Remove this after fixed RootWindowLayoutManager.
- keyboard_container->SetBounds(parent->bounds());
-}
-
-void RootWindowController::DeactivateKeyboard(
- keyboard::KeyboardController* keyboard_controller) {
- if (!keyboard::IsKeyboardEnabled())
- return;
-
- DCHECK(keyboard_controller);
- aura::Window* keyboard_container =
- keyboard_controller->GetContainerWindow();
- if (keyboard_container->GetRootWindow() == root_window()) {
- root_window()->RemoveChild(keyboard_container);
- if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) {
- keyboard_controller->RemoveObserver(shelf()->shelf_layout_manager());
- keyboard_controller->RemoveObserver(panel_layout_manager_);
- keyboard_controller->RemoveObserver(docked_layout_manager_);
- }
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// RootWindowController, private:
-
-RootWindowController::RootWindowController(aura::RootWindow* root_window)
- : root_window_(root_window),
- root_window_layout_(NULL),
- docked_layout_manager_(NULL),
- panel_layout_manager_(NULL),
- touch_hud_debug_(NULL),
- touch_hud_projection_(NULL) {
- GetRootWindowSettings(root_window_->window())->controller = this;
- screen_dimmer_.reset(new ScreenDimmer(root_window_->window()));
-
- stacking_controller_.reset(new StackingController);
- aura::client::SetWindowTreeClient(root_window_->window(),
- stacking_controller_.get());
- capture_client_.reset(
- new views::corewm::ScopedCaptureClient(root_window_->window()));
-}
-
-void RootWindowController::Init(RootWindowType root_window_type,
- bool first_run_after_boot) {
- Shell* shell = Shell::GetInstance();
- shell->InitRootWindow(root_window());
-
- root_window_->SetCursor(ui::kCursorPointer);
- CreateContainersInRootWindow(root_window_->window());
-
- if (root_window_type == VIRTUAL_KEYBOARD) {
- shell->InitKeyboard();
- return;
- }
-
- CreateSystemBackground(first_run_after_boot);
-
- InitLayoutManagers();
- InitTouchHuds();
-
- if (Shell::GetPrimaryRootWindowController()->
- GetSystemModalLayoutManager(NULL)->has_modal_background()) {
- GetSystemModalLayoutManager(NULL)->CreateModalBackground();
- }
-
- shell->AddShellObserver(this);
-
- if (root_window_type == PRIMARY) {
- root_window_layout()->OnWindowResized();
- if (!keyboard::IsKeyboardUsabilityExperimentEnabled())
- shell->InitKeyboard();
- } else {
- root_window_layout()->OnWindowResized();
- shell->desktop_background_controller()->OnRootWindowAdded(root_window());
- shell->high_contrast_controller()->OnRootWindowAdded(
- root_window_->window());
- root_window_->host()->Show();
-
- // Create a launcher if a user is already logged in.
- if (shell->session_state_delegate()->NumberOfLoggedInUsers())
- shelf()->CreateLauncher();
- }
-
- solo_window_tracker_.reset(new SoloWindowTracker(root_window_.get()));
- if (docked_layout_manager_)
- docked_layout_manager_->AddObserver(solo_window_tracker_.get());
-}
-
-void RootWindowController::InitLayoutManagers() {
- root_window_layout_ = new RootWindowLayoutManager(root_window());
- root_window()->SetLayoutManager(root_window_layout_);
-
- aura::Window* default_container =
- GetContainer(kShellWindowId_DefaultContainer);
- // Workspace manager has its own layout managers.
- workspace_controller_.reset(
- new WorkspaceController(default_container));
-
- aura::Window* always_on_top_container =
- GetContainer(kShellWindowId_AlwaysOnTopContainer);
- always_on_top_container->SetLayoutManager(
- new BaseLayoutManager(
- always_on_top_container->GetRootWindow()));
- always_on_top_controller_.reset(new internal::AlwaysOnTopController);
- always_on_top_controller_->SetAlwaysOnTopContainer(always_on_top_container);
-
- DCHECK(!shelf_.get());
- aura::Window* shelf_container =
- GetContainer(internal::kShellWindowId_ShelfContainer);
- // TODO(harrym): Remove when status area is view.
- aura::Window* status_container =
- GetContainer(internal::kShellWindowId_StatusContainer);
- shelf_.reset(new ShelfWidget(
- shelf_container, status_container, workspace_controller()));
-
- if (!Shell::GetInstance()->session_state_delegate()->
- IsActiveUserSessionStarted()) {
- // This window exists only to be a event target on login screen.
- // It does not have to handle events, nor be visible.
- mouse_event_target_.reset(new aura::Window(new EmptyWindowDelegate));
- mouse_event_target_->Init(ui::LAYER_NOT_DRAWN);
-
- aura::Window* lock_background_container =
- GetContainer(internal::kShellWindowId_LockScreenBackgroundContainer);
- lock_background_container->AddChild(mouse_event_target_.get());
- mouse_event_target_->Show();
- }
-
- // Create Docked windows layout manager
- aura::Window* docked_container = GetContainer(
- internal::kShellWindowId_DockedContainer);
- docked_layout_manager_ =
- new internal::DockedWindowLayoutManager(docked_container,
- workspace_controller());
- docked_container_handler_.reset(
- new ToplevelWindowEventHandler(docked_container));
- docked_container->SetLayoutManager(docked_layout_manager_);
-
- // Create Panel layout manager
- aura::Window* panel_container = GetContainer(
- internal::kShellWindowId_PanelContainer);
- panel_layout_manager_ =
- new internal::PanelLayoutManager(panel_container);
- panel_container_handler_.reset(
- new PanelWindowEventHandler(panel_container));
- panel_container->SetLayoutManager(panel_layout_manager_);
-}
-
-void RootWindowController::InitTouchHuds() {
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kAshTouchHud))
- set_touch_hud_debug(new TouchHudDebug(root_window()));
- if (Shell::GetInstance()->is_touch_hud_projection_enabled())
- EnableTouchHudProjection();
-}
-
-void RootWindowController::CreateSystemBackground(
- bool is_first_run_after_boot) {
- SkColor color = SK_ColorBLACK;
-#if defined(OS_CHROMEOS)
- if (is_first_run_after_boot)
- color = kChromeOsBootColor;
-#endif
- system_background_.reset(
- new SystemBackgroundController(root_window(), color));
-
-#if defined(OS_CHROMEOS)
- // Make a copy of the system's boot splash screen so we can composite it
- // onscreen until the desktop background is ready.
- if (is_first_run_after_boot &&
- (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshCopyHostBackgroundAtBoot) ||
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshAnimateFromBootSplashScreen)))
- boot_splash_screen_.reset(new BootSplashScreen(root_window_.get()));
-#endif
-}
-
-void RootWindowController::CreateContainersInRootWindow(
- aura::Window* root_window) {
- // These containers are just used by PowerButtonController to animate groups
- // of containers simultaneously without messing up the current transformations
- // on those containers. These are direct children of the root window; all of
- // the other containers are their children.
-
- // The desktop background container is not part of the lock animation, so it
- // is not included in those animate groups.
- // When screen is locked desktop background is moved to lock screen background
- // container (moved back on unlock). We want to make sure that there's an
- // opaque layer occluding the non-lock-screen layers.
- aura::Window* desktop_background_container = CreateContainer(
- kShellWindowId_DesktopBackgroundContainer,
- "DesktopBackgroundContainer",
- root_window);
- views::corewm::SetChildWindowVisibilityChangesAnimated(
- desktop_background_container);
-
- aura::Window* non_lock_screen_containers = CreateContainer(
- kShellWindowId_NonLockScreenContainersContainer,
- "NonLockScreenContainersContainer",
- root_window);
-
- aura::Window* lock_background_containers = CreateContainer(
- kShellWindowId_LockScreenBackgroundContainer,
- "LockScreenBackgroundContainer",
- root_window);
- views::corewm::SetChildWindowVisibilityChangesAnimated(
- lock_background_containers);
-
- aura::Window* lock_screen_containers = CreateContainer(
- kShellWindowId_LockScreenContainersContainer,
- "LockScreenContainersContainer",
- root_window);
- aura::Window* lock_screen_related_containers = CreateContainer(
- kShellWindowId_LockScreenRelatedContainersContainer,
- "LockScreenRelatedContainersContainer",
- root_window);
-
- CreateContainer(kShellWindowId_UnparentedControlContainer,
- "UnparentedControlContainer",
- non_lock_screen_containers);
-
- aura::Window* default_container = CreateContainer(
- kShellWindowId_DefaultContainer,
- "DefaultContainer",
- non_lock_screen_containers);
- views::corewm::SetChildWindowVisibilityChangesAnimated(default_container);
- SetUsesScreenCoordinates(default_container);
-
- aura::Window* always_on_top_container = CreateContainer(
- kShellWindowId_AlwaysOnTopContainer,
- "AlwaysOnTopContainer",
- non_lock_screen_containers);
- always_on_top_container_handler_.reset(
- new ToplevelWindowEventHandler(always_on_top_container));
- views::corewm::SetChildWindowVisibilityChangesAnimated(
- always_on_top_container);
- SetUsesScreenCoordinates(always_on_top_container);
-
- aura::Window* docked_container = CreateContainer(
- kShellWindowId_DockedContainer,
- "DockedContainer",
- non_lock_screen_containers);
- views::corewm::SetChildWindowVisibilityChangesAnimated(docked_container);
- SetUsesScreenCoordinates(docked_container);
-
- aura::Window* shelf_container =
- CreateContainer(kShellWindowId_ShelfContainer,
- "ShelfContainer",
- non_lock_screen_containers);
- SetUsesScreenCoordinates(shelf_container);
- DescendantShouldStayInSameRootWindow(shelf_container);
-
- aura::Window* panel_container = CreateContainer(
- kShellWindowId_PanelContainer,
- "PanelContainer",
- non_lock_screen_containers);
- SetUsesScreenCoordinates(panel_container);
-
- aura::Window* shelf_bubble_container =
- CreateContainer(kShellWindowId_ShelfBubbleContainer,
- "ShelfBubbleContainer",
- non_lock_screen_containers);
- SetUsesScreenCoordinates(shelf_bubble_container);
- DescendantShouldStayInSameRootWindow(shelf_bubble_container);
-
- aura::Window* app_list_container =
- CreateContainer(kShellWindowId_AppListContainer,
- "AppListContainer",
- non_lock_screen_containers);
- SetUsesScreenCoordinates(app_list_container);
-
- aura::Window* modal_container = CreateContainer(
- kShellWindowId_SystemModalContainer,
- "SystemModalContainer",
- non_lock_screen_containers);
- modal_container_handler_.reset(
- new ToplevelWindowEventHandler(modal_container));
- modal_container->SetLayoutManager(
- new SystemModalContainerLayoutManager(modal_container));
- views::corewm::SetChildWindowVisibilityChangesAnimated(modal_container);
- SetUsesScreenCoordinates(modal_container);
-
- aura::Window* input_method_container = CreateContainer(
- kShellWindowId_InputMethodContainer,
- "InputMethodContainer",
- non_lock_screen_containers);
- views::corewm::SetChildWindowVisibilityChangesAnimated(
- input_method_container);
- SetUsesScreenCoordinates(input_method_container);
-
- // TODO(beng): Figure out if we can make this use
- // SystemModalContainerEventFilter instead of stops_event_propagation.
- aura::Window* lock_container = CreateContainer(
- kShellWindowId_LockScreenContainer,
- "LockScreenContainer",
- lock_screen_containers);
- lock_container->SetLayoutManager(
- new BaseLayoutManager(root_window));
- SetUsesScreenCoordinates(lock_container);
- // TODO(beng): stopsevents
-
- aura::Window* lock_modal_container = CreateContainer(
- kShellWindowId_LockSystemModalContainer,
- "LockSystemModalContainer",
- lock_screen_containers);
- lock_modal_container_handler_.reset(
- new ToplevelWindowEventHandler(lock_modal_container));
- lock_modal_container->SetLayoutManager(
- new SystemModalContainerLayoutManager(lock_modal_container));
- views::corewm::SetChildWindowVisibilityChangesAnimated(lock_modal_container);
- SetUsesScreenCoordinates(lock_modal_container);
-
- aura::Window* status_container =
- CreateContainer(kShellWindowId_StatusContainer,
- "StatusContainer",
- lock_screen_related_containers);
- SetUsesScreenCoordinates(status_container);
- DescendantShouldStayInSameRootWindow(status_container);
-
- aura::Window* settings_bubble_container = CreateContainer(
- kShellWindowId_SettingBubbleContainer,
- "SettingBubbleContainer",
- lock_screen_related_containers);
- views::corewm::SetChildWindowVisibilityChangesAnimated(
- settings_bubble_container);
- SetUsesScreenCoordinates(settings_bubble_container);
- DescendantShouldStayInSameRootWindow(settings_bubble_container);
-
- aura::Window* menu_container = CreateContainer(
- kShellWindowId_MenuContainer,
- "MenuContainer",
- lock_screen_related_containers);
- views::corewm::SetChildWindowVisibilityChangesAnimated(menu_container);
- SetUsesScreenCoordinates(menu_container);
-
- aura::Window* drag_drop_container = CreateContainer(
- kShellWindowId_DragImageAndTooltipContainer,
- "DragImageAndTooltipContainer",
- lock_screen_related_containers);
- views::corewm::SetChildWindowVisibilityChangesAnimated(drag_drop_container);
- SetUsesScreenCoordinates(drag_drop_container);
-
- aura::Window* overlay_container = CreateContainer(
- kShellWindowId_OverlayContainer,
- "OverlayContainer",
- lock_screen_related_containers);
- SetUsesScreenCoordinates(overlay_container);
-
- CreateContainer(kShellWindowId_PowerButtonAnimationContainer,
- "PowerButtonAnimationContainer", root_window) ;
-}
-
-void RootWindowController::EnableTouchHudProjection() {
- if (touch_hud_projection_)
- return;
- set_touch_hud_projection(new TouchHudProjection(root_window()));
-}
-
-void RootWindowController::DisableTouchHudProjection() {
- if (!touch_hud_projection_)
- return;
- touch_hud_projection_->Remove();
-}
-
-void RootWindowController::OnLoginStateChanged(user::LoginStatus status) {
- shelf_->shelf_layout_manager()->UpdateVisibilityState();
-}
-
-void RootWindowController::OnTouchHudProjectionToggled(bool enabled) {
- if (enabled)
- EnableTouchHudProjection();
- else
- DisableTouchHudProjection();
-}
-
-RootWindowController* GetRootWindowController(
- const aura::Window* root_window) {
- return root_window ? GetRootWindowSettings(root_window)->controller : NULL;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/root_window_controller.h b/chromium/ash/root_window_controller.h
deleted file mode 100644
index e71b1ad28ac..00000000000
--- a/chromium/ash/root_window_controller.h
+++ /dev/null
@@ -1,329 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_ROOT_WINDOW_CONTROLLER_H_
-#define ASH_ROOT_WINDOW_CONTROLLER_H_
-
-#include <map>
-
-#include "ash/ash_export.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/shell_observer.h"
-#include "ash/system/user/login_status.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/base/ui_base_types.h"
-
-class SkBitmap;
-
-namespace aura {
-class EventFilter;
-class Window;
-}
-
-namespace gfx {
-class Point;
-}
-
-namespace views {
-class Widget;
-
-namespace corewm {
-class InputMethodEventFilter;
-class RootWindowEventFilter;
-class ScopedCaptureClient;
-}
-}
-
-namespace keyboard {
-class KeyboardController;
-}
-
-namespace ash {
-class ShelfWidget;
-class SoloWindowTracker;
-class StackingController;
-class SystemTray;
-class ToplevelWindowEventHandler;
-
-namespace internal {
-
-class AlwaysOnTopController;
-class AnimatingDesktopController;
-class DesktopBackgroundWidgetController;
-class DockedWindowLayoutManager;
-class PanelLayoutManager;
-class RootWindowLayoutManager;
-class ScreenDimmer;
-class ShelfLayoutManager;
-class StatusAreaWidget;
-class SystemBackgroundController;
-class SystemModalContainerLayoutManager;
-class TouchHudDebug;
-class TouchHudProjection;
-class WorkspaceController;
-
-#if defined(OS_CHROMEOS)
-class BootSplashScreen;
-#endif
-
-// This class maintains the per root window state for ash. This class
-// owns the root window and other dependent objects that should be
-// deleted upon the deletion of the root window. This object is
-// indirectly owned and deleted by |DisplayController|.
-// The RootWindowController for particular root window is stored in
-// its property (RootWindowSettings) and can be obtained using
-// |GetRootWindowController(aura::RootWindow*)| function.
-class ASH_EXPORT RootWindowController : public ShellObserver {
- public:
-
- // Creates and Initialize the RootWindowController for primary display.
- static void CreateForPrimaryDisplay(aura::RootWindow* root_window);
-
- // Creates and Initialize the RootWindowController for secondary displays.
- static void CreateForSecondaryDisplay(aura::RootWindow* root_window);
-
- // Creates and Initialize the RootWindowController for virtual
- // keyboard displays.
- static void CreateForVirtualKeyboardDisplay(aura::RootWindow* root_window);
-
- // Returns a RootWindowController that has a launcher for given
- // |window|. This returns the RootWindowController for the |window|'s
- // root window when multiple launcher mode is enabled, or the primary
- // RootWindowController otherwise.
- static RootWindowController* ForLauncher(aura::Window* window);
-
- // Returns a RootWindowController of the window's root window.
- static RootWindowController* ForWindow(const aura::Window* window);
-
- // Returns the RootWindowController of the target root window.
- static internal::RootWindowController* ForTargetRootWindow();
-
- // Returns container which contains a given |window|.
- static aura::Window* GetContainerForWindow(aura::Window* window);
-
- virtual ~RootWindowController();
-
- aura::Window* root_window() { return dispatcher()->window(); }
- aura::WindowEventDispatcher* dispatcher() { return root_window_.get(); }
-
- RootWindowLayoutManager* root_window_layout() { return root_window_layout_; }
-
- WorkspaceController* workspace_controller() {
- return workspace_controller_.get();
- }
-
- AlwaysOnTopController* always_on_top_controller() {
- return always_on_top_controller_.get();
- }
-
- ScreenDimmer* screen_dimmer() { return screen_dimmer_.get(); }
-
- // Access the shelf associated with this root window controller,
- // NULL if no such shelf exists.
- ShelfWidget* shelf() { return shelf_.get(); }
-
- // Get touch HUDs associated with this root window controller.
- TouchHudDebug* touch_hud_debug() const {
- return touch_hud_debug_;
- }
- TouchHudProjection* touch_hud_projection() const {
- return touch_hud_projection_;
- }
-
- // Set touch HUDs for this root window controller. The root window controller
- // will not own the HUDs; their lifetimes are managed by themselves. Whenever
- // the widget showing a HUD is being destroyed (e.g. because of detaching a
- // display), the HUD deletes itself.
- void set_touch_hud_debug(TouchHudDebug* hud) {
- touch_hud_debug_ = hud;
- }
- void set_touch_hud_projection(TouchHudProjection* hud) {
- touch_hud_projection_ = hud;
- }
-
- DesktopBackgroundWidgetController* wallpaper_controller() {
- return wallpaper_controller_.get();
- }
- void SetWallpaperController(DesktopBackgroundWidgetController* controller);
- AnimatingDesktopController* animating_wallpaper_controller() {
- return animating_wallpaper_controller_.get();
- }
- void SetAnimatingWallpaperController(AnimatingDesktopController* controller);
-
- SoloWindowTracker* solo_window_tracker() {
- return solo_window_tracker_.get();
- }
-
- // Access the shelf layout manager associated with this root
- // window controller, NULL if no such shelf exists.
- ShelfLayoutManager* GetShelfLayoutManager();
-
- // Returns the system tray on this root window. Note that
- // calling this on the root window that doesn't have a launcher will
- // lead to a crash.
- SystemTray* GetSystemTray();
-
- // Shows context menu at the |location_in_screen|. This uses
- // |ShellDelegate::CreateContextMenu| to define the content of the menu.
- void ShowContextMenu(const gfx::Point& location_in_screen,
- ui::MenuSourceType source_type);
-
- // Returns the layout-manager for the appropriate modal-container. If the
- // window is inside the lockscreen modal container, then the layout manager
- // for that is returned. Otherwise the layout manager for the default modal
- // container is returned.
- // If no window is specified (i.e. |window| is NULL), then the lockscreen
- // modal container is used if the screen is currently locked. Otherwise, the
- // default modal container is used.
- SystemModalContainerLayoutManager* GetSystemModalLayoutManager(
- aura::Window* window);
-
- aura::Window* GetContainer(int container_id);
- const aura::Window* GetContainer(int container_id) const;
-
- // Show launcher view if it was created hidden (before session has started).
- void ShowLauncher();
-
- // Called when the launcher associated with this root window is created.
- void OnLauncherCreated();
-
- // Called when the login status changes after login (such as lock/unlock).
- // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
- void UpdateAfterLoginStatusChange(user::LoginStatus status);
-
- // Called when the brightness/grayscale animation from white to the login
- // desktop background image has started. Starts |boot_splash_screen_|'s
- // hiding animation (if the screen is non-NULL).
- void HandleInitialDesktopBackgroundAnimationStarted();
-
- // Called when the wallpaper ainmation is finished. Updates |background_|
- // to be black and drops |boot_splash_screen_| and moves the wallpaper
- // controller into the root window controller. |widget| holds the wallpaper
- // image, or NULL if the background is a solid color.
- void OnWallpaperAnimationFinished(views::Widget* widget);
-
- // Deletes associated objects and clears the state, but doesn't delete
- // the root window yet. This is used to delete a secondary displays'
- // root window safely when the display disconnect signal is received,
- // which may come while we're in the nested message loop.
- void Shutdown();
-
- // Deletes all child windows and performs necessary cleanup.
- void CloseChildWindows();
-
- // Moves child windows to |dest|.
- void MoveWindowsTo(aura::Window* dest);
-
- // Force the shelf to query for it's current visibility state.
- void UpdateShelfVisibility();
-
- // Initialize touch HUDs if necessary.
- void InitTouchHuds();
-
- // Returns the topmost window or one of its transient parents, if any of them
- // are in fullscreen mode.
- const aura::Window* GetWindowForFullscreenMode() const;
-
- // Activate virtual keyboard on current root window controller.
- void ActivateKeyboard(keyboard::KeyboardController* keyboard_controller);
-
- // Deactivate virtual keyboard on current root window controller.
- void DeactivateKeyboard(keyboard::KeyboardController* keyboard_controller);
-
- private:
- explicit RootWindowController(aura::RootWindow* root_window);
- enum RootWindowType {
- PRIMARY,
- SECONDARY,
- VIRTUAL_KEYBOARD
- };
-
- // Initializes the RootWindowController. |is_primary| is true if
- // the controller is for primary display. |first_run_after_boot| is
- // set to true only for primary root window after boot.
- void Init(RootWindowType root_window_type, bool first_run_after_boot);
-
- void InitLayoutManagers();
-
- // Initializes |system_background_| and possibly also |boot_splash_screen_|.
- // |is_first_run_after_boot| determines the background's initial color.
- void CreateSystemBackground(bool is_first_run_after_boot);
-
- // Creates each of the special window containers that holds windows of various
- // types in the shell UI.
- void CreateContainersInRootWindow(aura::Window* root_window);
-
- // Enables projection touch HUD.
- void EnableTouchHudProjection();
-
- // Disables projection touch HUD.
- void DisableTouchHudProjection();
-
- // Overridden from ShellObserver.
- virtual void OnLoginStateChanged(user::LoginStatus status) OVERRIDE;
- virtual void OnTouchHudProjectionToggled(bool enabled) OVERRIDE;
-
- scoped_ptr<aura::RootWindow> root_window_;
- RootWindowLayoutManager* root_window_layout_;
-
- scoped_ptr<StackingController> stacking_controller_;
-
- // The shelf for managing the launcher and the status widget.
- scoped_ptr<ShelfWidget> shelf_;
-
- // An invisible/empty window used as a event target for
- // |MouseCursorEventFilter| before a user logs in.
- // (crbug.com/266987)
- // Its container is |LockScreenBackgroundContainer| and
- // this must be deleted before the container is deleted.
- scoped_ptr<aura::Window> mouse_event_target_;
-
- // Manages layout of docked windows. Owned by DockedContainer.
- DockedWindowLayoutManager* docked_layout_manager_;
-
- // Manages layout of panels. Owned by PanelContainer.
- PanelLayoutManager* panel_layout_manager_;
-
- scoped_ptr<SystemBackgroundController> system_background_;
-#if defined(OS_CHROMEOS)
- scoped_ptr<BootSplashScreen> boot_splash_screen_;
-#endif
-
- scoped_ptr<ScreenDimmer> screen_dimmer_;
- scoped_ptr<WorkspaceController> workspace_controller_;
- scoped_ptr<AlwaysOnTopController> always_on_top_controller_;
-
- // Heads-up displays for touch events. These HUDs are not owned by the root
- // window controller and manage their own lifetimes.
- TouchHudDebug* touch_hud_debug_;
- TouchHudProjection* touch_hud_projection_;
-
- // We need to own event handlers for various containers.
- scoped_ptr<ToplevelWindowEventHandler> default_container_handler_;
- scoped_ptr<ToplevelWindowEventHandler> always_on_top_container_handler_;
- scoped_ptr<ToplevelWindowEventHandler> modal_container_handler_;
- scoped_ptr<ToplevelWindowEventHandler> lock_modal_container_handler_;
- scoped_ptr<ToplevelWindowEventHandler> panel_container_handler_;
- scoped_ptr<ToplevelWindowEventHandler> docked_container_handler_;
-
- scoped_ptr<DesktopBackgroundWidgetController> wallpaper_controller_;
- scoped_ptr<AnimatingDesktopController> animating_wallpaper_controller_;
- scoped_ptr<views::corewm::ScopedCaptureClient> capture_client_;
- scoped_ptr<SoloWindowTracker> solo_window_tracker_;
-
- DISALLOW_COPY_AND_ASSIGN(RootWindowController);
-};
-
-
-// Gets the RootWindowController for |root_window|.
-ASH_EXPORT RootWindowController* GetRootWindowController(
- const aura::Window* root_window);
-
-} // namespace internal
-} // ash
-
-#endif // ASH_ROOT_WINDOW_CONTROLLER_H_
diff --git a/chromium/ash/root_window_controller_unittest.cc b/chromium/ash/root_window_controller_unittest.cc
deleted file mode 100644
index 237a513a451..00000000000
--- a/chromium/ash/root_window_controller_unittest.cc
+++ /dev/null
@@ -1,665 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/root_window_controller.h"
-
-#include "ash/session_state_delegate.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/system_modal_container_layout_manager.h"
-#include "ash/wm/window_properties.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "base/command_line.h"
-#include "ui/aura/client/focus_change_observer.h"
-#include "ui/aura/client/focus_client.h"
-#include "ui/aura/client/window_tree_client.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/test/test_event_handler.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_tracker.h"
-#include "ui/keyboard/keyboard_controller_proxy.h"
-#include "ui/keyboard/keyboard_switches.h"
-#include "ui/views/controls/menu/menu_controller.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-using aura::Window;
-using views::Widget;
-
-namespace ash {
-namespace {
-
-class TestDelegate : public views::WidgetDelegateView {
- public:
- explicit TestDelegate(bool system_modal) : system_modal_(system_modal) {}
- virtual ~TestDelegate() {}
-
- // Overridden from views::WidgetDelegate:
- virtual views::View* GetContentsView() OVERRIDE {
- return this;
- }
-
- virtual ui::ModalType GetModalType() const OVERRIDE {
- return system_modal_ ? ui::MODAL_TYPE_SYSTEM : ui::MODAL_TYPE_NONE;
- }
-
- private:
- bool system_modal_;
-
- DISALLOW_COPY_AND_ASSIGN(TestDelegate);
-};
-
-class DeleteOnBlurDelegate : public aura::test::TestWindowDelegate,
- public aura::client::FocusChangeObserver {
- public:
- DeleteOnBlurDelegate() : window_(NULL) {}
- virtual ~DeleteOnBlurDelegate() {}
-
- void SetWindow(aura::Window* window) {
- window_ = window;
- aura::client::SetFocusChangeObserver(window_, this);
- }
-
- private:
- // aura::test::TestWindowDelegate overrides:
- virtual bool CanFocus() OVERRIDE {
- return true;
- }
-
- // aura::client::FocusChangeObserver implementation:
- virtual void OnWindowFocused(aura::Window* gained_focus,
- aura::Window* lost_focus) OVERRIDE {
- if (window_ == lost_focus)
- delete window_;
- }
-
- aura::Window* window_;
-
- DISALLOW_COPY_AND_ASSIGN(DeleteOnBlurDelegate);
-};
-
-} // namespace
-
-namespace test {
-
-class RootWindowControllerTest : public test::AshTestBase {
- public:
- views::Widget* CreateTestWidget(const gfx::Rect& bounds) {
- views::Widget* widget = views::Widget::CreateWindowWithContextAndBounds(
- NULL, CurrentContext(), bounds);
- widget->Show();
- return widget;
- }
-
- views::Widget* CreateModalWidget(const gfx::Rect& bounds) {
- views::Widget* widget = views::Widget::CreateWindowWithContextAndBounds(
- new TestDelegate(true), CurrentContext(), bounds);
- widget->Show();
- return widget;
- }
-
- views::Widget* CreateModalWidgetWithParent(const gfx::Rect& bounds,
- gfx::NativeWindow parent) {
- views::Widget* widget =
- views::Widget::CreateWindowWithParentAndBounds(new TestDelegate(true),
- parent,
- bounds);
- widget->Show();
- return widget;
- }
-
- aura::Window* GetModalContainer(aura::Window* root_window) {
- return Shell::GetContainer(
- root_window,
- ash::internal::kShellWindowId_SystemModalContainer);
- }
-};
-
-TEST_F(RootWindowControllerTest, MoveWindows_Basic) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("600x600,500x500");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- internal::RootWindowController* controller =
- Shell::GetPrimaryRootWindowController();
- internal::ShelfLayoutManager* shelf_layout_manager =
- controller->GetShelfLayoutManager();
- shelf_layout_manager->SetAutoHideBehavior(
- ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
-
- views::Widget* normal = CreateTestWidget(gfx::Rect(650, 10, 100, 100));
- EXPECT_EQ(root_windows[1], normal->GetNativeView()->GetRootWindow());
- EXPECT_EQ("650,10 100x100", normal->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("50,10 100x100",
- normal->GetNativeView()->GetBoundsInRootWindow().ToString());
-
- views::Widget* maximized = CreateTestWidget(gfx::Rect(700, 10, 100, 100));
- maximized->Maximize();
- EXPECT_EQ(root_windows[1], maximized->GetNativeView()->GetRootWindow());
- EXPECT_EQ("600,0 500x453", maximized->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("0,0 500x453",
- maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
-
- views::Widget* minimized = CreateTestWidget(gfx::Rect(800, 10, 100, 100));
- minimized->Minimize();
- EXPECT_EQ(root_windows[1], minimized->GetNativeView()->GetRootWindow());
- EXPECT_EQ("800,10 100x100",
- minimized->GetWindowBoundsInScreen().ToString());
-
- views::Widget* fullscreen = CreateTestWidget(gfx::Rect(900, 10, 100, 100));
- fullscreen->SetFullscreen(true);
- EXPECT_EQ(root_windows[1], fullscreen->GetNativeView()->GetRootWindow());
-
- EXPECT_EQ("600,0 500x500",
- fullscreen->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("0,0 500x500",
- fullscreen->GetNativeView()->GetBoundsInRootWindow().ToString());
-
- views::Widget* unparented_control = new Widget;
- Widget::InitParams params;
- params.bounds = gfx::Rect(650, 10, 100, 100);
- params.context = CurrentContext();
- params.type = Widget::InitParams::TYPE_CONTROL;
- unparented_control->Init(params);
- EXPECT_EQ(root_windows[1],
- unparented_control->GetNativeView()->GetRootWindow());
- EXPECT_EQ(internal::kShellWindowId_UnparentedControlContainer,
- unparented_control->GetNativeView()->parent()->id());
-
- aura::Window* panel = CreateTestWindowInShellWithDelegateAndType(
- NULL, aura::client::WINDOW_TYPE_PANEL, 0, gfx::Rect(700, 100, 100, 100));
- EXPECT_EQ(root_windows[1], panel->GetRootWindow());
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, panel->parent()->id());
-
- // Make sure a window that will delete itself when losing focus
- // will not crash.
- aura::WindowTracker tracker;
- DeleteOnBlurDelegate delete_on_blur_delegate;
- aura::Window* d2 = CreateTestWindowInShellWithDelegate(
- &delete_on_blur_delegate, 0, gfx::Rect(50, 50, 100, 100));
- delete_on_blur_delegate.SetWindow(d2);
- aura::client::GetFocusClient(root_windows[0])->FocusWindow(d2);
- tracker.Add(d2);
-
- UpdateDisplay("600x600");
-
- // d2 must have been deleted.
- EXPECT_FALSE(tracker.Contains(d2));
-
- EXPECT_EQ(root_windows[0], normal->GetNativeView()->GetRootWindow());
- EXPECT_EQ("50,10 100x100", normal->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("50,10 100x100",
- normal->GetNativeView()->GetBoundsInRootWindow().ToString());
-
- // Maximized area on primary display has 3px (given as
- // kAutoHideSize in shelf_layout_manager.cc) inset at the bottom.
-
- // First clear fullscreen status, since both fullscreen and maximized windows
- // share the same desktop workspace, which cancels the shelf status.
- fullscreen->SetFullscreen(false);
- EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow());
- EXPECT_EQ("0,0 600x597",
- maximized->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("0,0 600x597",
- maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
-
- // Set fullscreen to true. In that case the 3px inset becomes invisible so
- // the maximized window can also use the area fully.
- fullscreen->SetFullscreen(true);
- EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow());
- EXPECT_EQ("0,0 600x600",
- maximized->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("0,0 600x600",
- maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
-
- EXPECT_EQ(root_windows[0], minimized->GetNativeView()->GetRootWindow());
- EXPECT_EQ("200,10 100x100",
- minimized->GetWindowBoundsInScreen().ToString());
-
- EXPECT_EQ(root_windows[0], fullscreen->GetNativeView()->GetRootWindow());
- EXPECT_TRUE(fullscreen->IsFullscreen());
- EXPECT_EQ("0,0 600x600",
- fullscreen->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("0,0 600x600",
- fullscreen->GetNativeView()->GetBoundsInRootWindow().ToString());
-
- // Test if the restore bounds are correctly updated.
- wm::GetWindowState(maximized->GetNativeView())->Restore();
- EXPECT_EQ("100,10 100x100", maximized->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("100,10 100x100",
- maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
-
- fullscreen->SetFullscreen(false);
- EXPECT_EQ("300,10 100x100",
- fullscreen->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("300,10 100x100",
- fullscreen->GetNativeView()->GetBoundsInRootWindow().ToString());
-
- // Test if the unparented widget has moved.
- EXPECT_EQ(root_windows[0],
- unparented_control->GetNativeView()->GetRootWindow());
- EXPECT_EQ(internal::kShellWindowId_UnparentedControlContainer,
- unparented_control->GetNativeView()->parent()->id());
-
- // Test if the panel has moved.
- EXPECT_EQ(root_windows[0], panel->GetRootWindow());
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, panel->parent()->id());
-}
-
-TEST_F(RootWindowControllerTest, MoveWindows_Modal) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("500x500,500x500");
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- // Emulate virtual screen coordinate system.
- root_windows[0]->SetBounds(gfx::Rect(0, 0, 500, 500));
- root_windows[1]->SetBounds(gfx::Rect(500, 0, 500, 500));
-
- views::Widget* normal = CreateTestWidget(gfx::Rect(300, 10, 100, 100));
- EXPECT_EQ(root_windows[0], normal->GetNativeView()->GetRootWindow());
- EXPECT_TRUE(wm::IsActiveWindow(normal->GetNativeView()));
-
- views::Widget* modal = CreateModalWidget(gfx::Rect(650, 10, 100, 100));
- EXPECT_EQ(root_windows[1], modal->GetNativeView()->GetRootWindow());
- EXPECT_TRUE(GetModalContainer(root_windows[1])->Contains(
- modal->GetNativeView()));
- EXPECT_TRUE(wm::IsActiveWindow(modal->GetNativeView()));
-
- aura::test::EventGenerator generator_1st(root_windows[0]);
- generator_1st.ClickLeftButton();
- EXPECT_TRUE(wm::IsActiveWindow(modal->GetNativeView()));
-
- UpdateDisplay("500x500");
- EXPECT_EQ(root_windows[0], modal->GetNativeView()->GetRootWindow());
- EXPECT_TRUE(wm::IsActiveWindow(modal->GetNativeView()));
- generator_1st.ClickLeftButton();
- EXPECT_TRUE(wm::IsActiveWindow(modal->GetNativeView()));
-}
-
-TEST_F(RootWindowControllerTest, ModalContainer) {
- UpdateDisplay("600x600");
- Shell* shell = Shell::GetInstance();
- internal::RootWindowController* controller =
- shell->GetPrimaryRootWindowController();
- EXPECT_EQ(user::LOGGED_IN_USER,
- shell->system_tray_delegate()->GetUserLoginStatus());
- EXPECT_EQ(Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_SystemModalContainer)->layout_manager(),
- controller->GetSystemModalLayoutManager(NULL));
-
- views::Widget* session_modal_widget =
- CreateModalWidget(gfx::Rect(300, 10, 100, 100));
- EXPECT_EQ(Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_SystemModalContainer)->layout_manager(),
- controller->GetSystemModalLayoutManager(
- session_modal_widget->GetNativeView()));
-
- shell->session_state_delegate()->LockScreen();
- EXPECT_EQ(user::LOGGED_IN_LOCKED,
- shell->system_tray_delegate()->GetUserLoginStatus());
- EXPECT_EQ(Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_LockSystemModalContainer)->layout_manager(),
- controller->GetSystemModalLayoutManager(NULL));
-
- aura::Window* lock_container =
- Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_LockScreenContainer);
- views::Widget* lock_modal_widget =
- CreateModalWidgetWithParent(gfx::Rect(300, 10, 100, 100), lock_container);
- EXPECT_EQ(Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_LockSystemModalContainer)->layout_manager(),
- controller->GetSystemModalLayoutManager(
- lock_modal_widget->GetNativeView()));
- EXPECT_EQ(Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_SystemModalContainer)->layout_manager(),
- controller->GetSystemModalLayoutManager(
- session_modal_widget->GetNativeView()));
-
- shell->session_state_delegate()->UnlockScreen();
-}
-
-TEST_F(RootWindowControllerTest, ModalContainerNotLoggedInLoggedIn) {
- UpdateDisplay("600x600");
- Shell* shell = Shell::GetInstance();
-
- // Configure login screen environment.
- SetUserLoggedIn(false);
- EXPECT_EQ(user::LOGGED_IN_NONE,
- shell->system_tray_delegate()->GetUserLoginStatus());
- EXPECT_EQ(0, shell->session_state_delegate()->NumberOfLoggedInUsers());
- EXPECT_FALSE(shell->session_state_delegate()->IsActiveUserSessionStarted());
-
- internal::RootWindowController* controller =
- shell->GetPrimaryRootWindowController();
- EXPECT_EQ(Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_LockSystemModalContainer)->layout_manager(),
- controller->GetSystemModalLayoutManager(NULL));
-
- aura::Window* lock_container =
- Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_LockScreenContainer);
- views::Widget* login_modal_widget =
- CreateModalWidgetWithParent(gfx::Rect(300, 10, 100, 100), lock_container);
- EXPECT_EQ(Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_LockSystemModalContainer)->layout_manager(),
- controller->GetSystemModalLayoutManager(
- login_modal_widget->GetNativeView()));
- login_modal_widget->Close();
-
- // Configure user session environment.
- SetUserLoggedIn(true);
- SetSessionStarted(true);
- EXPECT_EQ(user::LOGGED_IN_USER,
- shell->system_tray_delegate()->GetUserLoginStatus());
- EXPECT_EQ(1, shell->session_state_delegate()->NumberOfLoggedInUsers());
- EXPECT_TRUE(shell->session_state_delegate()->IsActiveUserSessionStarted());
- EXPECT_EQ(Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_SystemModalContainer)->layout_manager(),
- controller->GetSystemModalLayoutManager(NULL));
-
- views::Widget* session_modal_widget =
- CreateModalWidget(gfx::Rect(300, 10, 100, 100));
- EXPECT_EQ(Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_SystemModalContainer)->layout_manager(),
- controller->GetSystemModalLayoutManager(
- session_modal_widget->GetNativeView()));
-}
-
-TEST_F(RootWindowControllerTest, ModalContainerBlockedSession) {
- UpdateDisplay("600x600");
- Shell* shell = Shell::GetInstance();
- internal::RootWindowController* controller =
- shell->GetPrimaryRootWindowController();
- aura::Window* lock_container =
- Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_LockScreenContainer);
- for (int block_reason = FIRST_BLOCK_REASON;
- block_reason < NUMBER_OF_BLOCK_REASONS;
- ++block_reason) {
- views::Widget* session_modal_widget =
- CreateModalWidget(gfx::Rect(300, 10, 100, 100));
- EXPECT_EQ(Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_SystemModalContainer)->layout_manager(),
- controller->GetSystemModalLayoutManager(
- session_modal_widget->GetNativeView()));
- EXPECT_EQ(Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_SystemModalContainer)->layout_manager(),
- controller->GetSystemModalLayoutManager(NULL));
- session_modal_widget->Close();
-
- BlockUserSession(static_cast<UserSessionBlockReason>(block_reason));
-
- EXPECT_EQ(Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_LockSystemModalContainer)->layout_manager(),
- controller->GetSystemModalLayoutManager(NULL));
-
- views::Widget* lock_modal_widget =
- CreateModalWidgetWithParent(gfx::Rect(300, 10, 100, 100),
- lock_container);
- EXPECT_EQ(Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_LockSystemModalContainer)->layout_manager(),
- controller->GetSystemModalLayoutManager(
- lock_modal_widget->GetNativeView()));
-
- session_modal_widget =
- CreateModalWidget(gfx::Rect(300, 10, 100, 100));
- EXPECT_EQ(Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_SystemModalContainer)->layout_manager(),
- controller->GetSystemModalLayoutManager(
- session_modal_widget->GetNativeView()));
- session_modal_widget->Close();
-
- lock_modal_widget->Close();
- UnblockUserSession();
- }
-}
-
-TEST_F(RootWindowControllerTest, GetWindowForFullscreenMode) {
- UpdateDisplay("600x600");
- internal::RootWindowController* controller =
- Shell::GetInstance()->GetPrimaryRootWindowController();
-
- Widget* w1 = CreateTestWidget(gfx::Rect(0, 0, 100, 100));
- w1->Maximize();
- Widget* w2 = CreateTestWidget(gfx::Rect(0, 0, 100, 100));
- w2->SetFullscreen(true);
- // |w3| is a transient child of |w2|.
- Widget* w3 = Widget::CreateWindowWithParentAndBounds(NULL,
- w2->GetNativeWindow(), gfx::Rect(0, 0, 100, 100));
-
- // Test that GetWindowForFullscreenMode() finds the fullscreen window when one
- // of its transient children is active.
- w3->Activate();
- EXPECT_EQ(w2->GetNativeWindow(), controller->GetWindowForFullscreenMode());
-
- // If the topmost window is not fullscreen, it returns NULL.
- w1->Activate();
- EXPECT_EQ(NULL, controller->GetWindowForFullscreenMode());
- w1->Close();
- w3->Close();
-
- // Only w2 remains, if minimized GetWindowForFullscreenMode should return
- // NULL.
- w2->Activate();
- EXPECT_EQ(w2->GetNativeWindow(), controller->GetWindowForFullscreenMode());
- w2->Minimize();
- EXPECT_EQ(NULL, controller->GetWindowForFullscreenMode());
-}
-
-// Test that user session window can't be focused if user session blocked by
-// some overlapping UI.
-TEST_F(RootWindowControllerTest, FocusBlockedWindow) {
- UpdateDisplay("600x600");
- internal::RootWindowController* controller =
- Shell::GetInstance()->GetPrimaryRootWindowController();
- aura::Window* lock_container =
- Shell::GetContainer(controller->root_window(),
- internal::kShellWindowId_LockScreenContainer);
- aura::Window* lock_window = Widget::CreateWindowWithParentAndBounds(NULL,
- lock_container, gfx::Rect(0, 0, 100, 100))->GetNativeView();
- lock_window->Show();
- aura::Window* session_window =
- CreateTestWidget(gfx::Rect(0, 0, 100, 100))->GetNativeView();
- session_window->Show();
-
- for (int block_reason = FIRST_BLOCK_REASON;
- block_reason < NUMBER_OF_BLOCK_REASONS;
- ++block_reason) {
- BlockUserSession(static_cast<UserSessionBlockReason>(block_reason));
- lock_window->Focus();
- EXPECT_TRUE(lock_window->HasFocus());
- session_window->Focus();
- EXPECT_FALSE(session_window->HasFocus());
- UnblockUserSession();
- }
-}
-
-// Tracks whether OnWindowDestroying() has been invoked.
-class DestroyedWindowObserver : public aura::WindowObserver {
- public:
- DestroyedWindowObserver() : destroyed_(false), window_(NULL) {}
- virtual ~DestroyedWindowObserver() {
- Shutdown();
- }
-
- void SetWindow(Window* window) {
- window_ = window;
- window->AddObserver(this);
- }
-
- bool destroyed() const { return destroyed_; }
-
- // WindowObserver overrides:
- virtual void OnWindowDestroying(Window* window) OVERRIDE {
- destroyed_ = true;
- Shutdown();
- }
-
- private:
- void Shutdown() {
- if (!window_)
- return;
- window_->RemoveObserver(this);
- window_ = NULL;
- }
-
- bool destroyed_;
- Window* window_;
-
- DISALLOW_COPY_AND_ASSIGN(DestroyedWindowObserver);
-};
-
-// Verifies shutdown doesn't delete windows that are not owned by the parent.
-TEST_F(RootWindowControllerTest, DontDeleteWindowsNotOwnedByParent) {
- DestroyedWindowObserver observer1;
- aura::test::TestWindowDelegate delegate1;
- aura::Window* window1 = new aura::Window(&delegate1);
- window1->SetType(aura::client::WINDOW_TYPE_CONTROL);
- window1->set_owned_by_parent(false);
- observer1.SetWindow(window1);
- window1->Init(ui::LAYER_NOT_DRAWN);
- aura::client::ParentWindowWithContext(
- window1, Shell::GetInstance()->GetPrimaryRootWindow(), gfx::Rect());
-
- DestroyedWindowObserver observer2;
- aura::Window* window2 = new aura::Window(NULL);
- window2->set_owned_by_parent(false);
- observer2.SetWindow(window2);
- window2->Init(ui::LAYER_NOT_DRAWN);
- Shell::GetInstance()->GetPrimaryRootWindow()->AddChild(window2);
-
- Shell::GetInstance()->GetPrimaryRootWindowController()->CloseChildWindows();
-
- ASSERT_FALSE(observer1.destroyed());
- delete window1;
-
- ASSERT_FALSE(observer2.destroyed());
- delete window2;
-}
-
-typedef test::NoSessionAshTestBase NoSessionRootWindowControllerTest;
-
-// Make sure that an event handler exists for entire display area.
-TEST_F(NoSessionRootWindowControllerTest, Event) {
- aura::Window* root = Shell::GetPrimaryRootWindow();
- const gfx::Size size = root->bounds().size();
- aura::Window* event_target = root->GetEventHandlerForPoint(gfx::Point(0, 0));
- EXPECT_TRUE(event_target);
- EXPECT_EQ(event_target,
- root->GetEventHandlerForPoint(gfx::Point(0, size.height() - 1)));
- EXPECT_EQ(event_target,
- root->GetEventHandlerForPoint(gfx::Point(size.width() - 1, 0)));
- EXPECT_EQ(event_target,
- root->GetEventHandlerForPoint(gfx::Point(0, size.height() - 1)));
- EXPECT_EQ(event_target,
- root->GetEventHandlerForPoint(
- gfx::Point(size.width() - 1, size.height() - 1)));
-}
-
-class VirtualKeyboardRootWindowControllerTest : public test::AshTestBase {
- public:
- VirtualKeyboardRootWindowControllerTest() {};
- virtual ~VirtualKeyboardRootWindowControllerTest() {};
-
- virtual void SetUp() OVERRIDE {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- keyboard::switches::kEnableVirtualKeyboard);
- test::AshTestBase::SetUp();
- Shell::GetPrimaryRootWindowController()->ActivateKeyboard(
- Shell::GetInstance()->keyboard_controller());
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardRootWindowControllerTest);
-};
-
-// Test for http://crbug.com/297858. Virtual keyboard container should only show
-// on primary root window.
-TEST_F(VirtualKeyboardRootWindowControllerTest,
- VirtualKeyboardOnPrimaryRootWindowOnly) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("500x500,500x500");
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- aura::Window* primary_root_window = Shell::GetPrimaryRootWindow();
- aura::Window* secondary_root_window =
- root_windows[0] == primary_root_window ?
- root_windows[1] : root_windows[0];
-
- ASSERT_TRUE(Shell::GetContainer(
- primary_root_window,
- internal::kShellWindowId_VirtualKeyboardContainer));
- ASSERT_FALSE(Shell::GetContainer(
- secondary_root_window,
- internal::kShellWindowId_VirtualKeyboardContainer));
-}
-
-// Test for http://crbug.com/263599. Virtual keyboard should be able to receive
-// events at blocked user session.
-TEST_F(VirtualKeyboardRootWindowControllerTest,
- ClickVirtualKeyboardInBlockedWindow) {
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- aura::Window* keyboard_container = Shell::GetContainer(root_window,
- internal::kShellWindowId_VirtualKeyboardContainer);
- ASSERT_TRUE(keyboard_container);
- keyboard_container->Show();
-
- aura::Window* keyboard_window = Shell::GetInstance()->keyboard_controller()->
- proxy()->GetKeyboardWindow();
- keyboard_container->AddChild(keyboard_window);
- keyboard_window->SetBounds(gfx::Rect());
- keyboard_window->Show();
-
- aura::test::TestEventHandler* handler = new aura::test::TestEventHandler;
- root_window->SetEventFilter(handler);
-
- aura::test::EventGenerator event_generator(root_window, keyboard_window);
- event_generator.ClickLeftButton();
- int expected_mouse_presses = 1;
- EXPECT_EQ(expected_mouse_presses, handler->num_mouse_events() / 2);
-
- for (int block_reason = FIRST_BLOCK_REASON;
- block_reason < NUMBER_OF_BLOCK_REASONS;
- ++block_reason) {
- BlockUserSession(static_cast<UserSessionBlockReason>(block_reason));
- event_generator.ClickLeftButton();
- expected_mouse_presses++;
- EXPECT_EQ(expected_mouse_presses, handler->num_mouse_events() / 2);
- UnblockUserSession();
- }
-}
-
-// Test for http://crbug.com/299787. RootWindowController should delete
-// the old container since the keyboard controller creates a new window in
-// GetWindowContainer().
-TEST_F(VirtualKeyboardRootWindowControllerTest,
- DeleteOldContainerOnVirtualKeyboardInit) {
- aura::Window* root_window = ash::Shell::GetPrimaryRootWindow();
- aura::Window* keyboard_container = Shell::GetContainer(root_window,
- internal::kShellWindowId_VirtualKeyboardContainer);
- ASSERT_TRUE(keyboard_container);
- // Track the keyboard container window.
- aura::WindowTracker tracker;
- tracker.Add(keyboard_container);
- // Mock a login user profile change to reinitialize the keyboard.
- ash::Shell::GetInstance()->OnLoginUserProfilePrepared();
- // keyboard_container should no longer be present.
- EXPECT_FALSE(tracker.Contains(keyboard_container));
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/root_window_settings.cc b/chromium/ash/root_window_settings.cc
deleted file mode 100644
index b6e3b915743..00000000000
--- a/chromium/ash/root_window_settings.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/root_window_settings.h"
-
-#include "ui/aura/root_window.h"
-#include "ui/aura/window_property.h"
-#include "ui/gfx/display.h"
-
-DECLARE_WINDOW_PROPERTY_TYPE(ash::internal::RootWindowSettings*);
-
-namespace ash {
-namespace internal {
-
-DEFINE_OWNED_WINDOW_PROPERTY_KEY(RootWindowSettings,
- kRootWindowSettingsKey, NULL);
-
-RootWindowSettings::RootWindowSettings()
- : display_id(gfx::Display::kInvalidDisplayID),
- controller(NULL) {
-}
-
-RootWindowSettings* InitRootWindowSettings(aura::Window* root) {
- RootWindowSettings* settings = new RootWindowSettings();
- root->SetProperty(kRootWindowSettingsKey, settings);
- return settings;
-}
-
-RootWindowSettings* GetRootWindowSettings(aura::Window* root) {
- return root->GetProperty(kRootWindowSettingsKey);
-}
-
-const RootWindowSettings* GetRootWindowSettings(const aura::Window* root) {
- return root->GetProperty(kRootWindowSettingsKey);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/root_window_settings.h b/chromium/ash/root_window_settings.h
deleted file mode 100644
index f18794929ca..00000000000
--- a/chromium/ash/root_window_settings.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_ROOT_WINDOW_SETTINGS_H_
-#define ASH_ROOT_WINDOW_SETTINGS_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-namespace internal {
-
-class RootWindowController;
-
-// Per root window information should be stored here
-// instead of using plain aura root window property because
-// it can prevent mis-using on non root window.
-struct RootWindowSettings {
- RootWindowSettings();
-
- // ID of the display associated with the root window.
- int64 display_id;
-
- // RootWindowController for the root window. This may be NULL
- // for the root window used for mirroring.
- RootWindowController* controller;
-};
-
-// Initializes and returns RootWindowSettings for |root|.
-// It is owned by the |root|.
-RootWindowSettings* InitRootWindowSettings(aura::Window* root);
-
-// Returns the RootWindowSettings for |root|.
-ASH_EXPORT RootWindowSettings* GetRootWindowSettings(aura::Window* root);
-
-// const version of GetRootWindowSettings.
-ASH_EXPORT const RootWindowSettings*
-GetRootWindowSettings(const aura::Window* root);
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_ROOT_WINDOW_SETTINGS_H_
diff --git a/chromium/ash/rotator/screen_rotation.cc b/chromium/ash/rotator/screen_rotation.cc
deleted file mode 100644
index 9352d81ea34..00000000000
--- a/chromium/ash/rotator/screen_rotation.cc
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/rotator/screen_rotation.h"
-
-#include "base/time/time.h"
-#include "ui/compositor/layer.h"
-#include "ui/gfx/interpolated_transform.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/transform.h"
-
-namespace ash {
-
-namespace {
-
-const int k90DegreeTransitionDurationMs = 350;
-const int k180DegreeTransitionDurationMs = 550;
-const int k360DegreeTransitionDurationMs = 750;
-
-base::TimeDelta GetTransitionDuration(int degrees) {
- if (degrees == 360)
- return base::TimeDelta::FromMilliseconds(k360DegreeTransitionDurationMs);
- if (degrees == 180)
- return base::TimeDelta::FromMilliseconds(k180DegreeTransitionDurationMs);
- if (degrees == 0)
- return base::TimeDelta::FromMilliseconds(0);
- return base::TimeDelta::FromMilliseconds(k90DegreeTransitionDurationMs);
-}
-
-} // namespace
-
-ScreenRotation::ScreenRotation(int degrees, ui::Layer* layer)
- : ui::LayerAnimationElement(GetProperties(),
- GetTransitionDuration(degrees)),
- degrees_(degrees) {
- InitTransform(layer);
-}
-
-ScreenRotation::~ScreenRotation() {
-}
-
-void ScreenRotation::InitTransform(ui::Layer* layer) {
- // No rotation required, use the identity transform.
- if (degrees_ == 0) {
- interpolated_transform_.reset(
- new ui::InterpolatedConstantTransform(gfx::Transform()));
- return;
- }
-
- // Use the target transform/bounds in case the layer is already animating.
- const gfx::Transform& current_transform = layer->GetTargetTransform();
- const gfx::Rect& bounds = layer->GetTargetBounds();
-
- gfx::Point old_pivot;
- gfx::Point new_pivot;
-
- int width = bounds.width();
- int height = bounds.height();
-
- switch (degrees_) {
- case 90:
- new_origin_ = new_pivot = gfx::Point(width, 0);
- break;
- case -90:
- new_origin_ = new_pivot = gfx::Point(0, height);
- break;
- case 180:
- case 360:
- new_pivot = old_pivot = gfx::Point(width / 2, height / 2);
- new_origin_.SetPoint(width, height);
- break;
- }
-
- // Convert points to world space.
- current_transform.TransformPoint(&old_pivot);
- current_transform.TransformPoint(&new_pivot);
- current_transform.TransformPoint(&new_origin_);
-
- scoped_ptr<ui::InterpolatedTransform> rotation(
- new ui::InterpolatedTransformAboutPivot(
- old_pivot,
- new ui::InterpolatedRotation(0, degrees_)));
-
- scoped_ptr<ui::InterpolatedTransform> translation(
- new ui::InterpolatedTranslation(
- gfx::Point(0, 0),
- gfx::Point(new_pivot.x() - old_pivot.x(),
- new_pivot.y() - old_pivot.y())));
-
- float scale_factor = 0.9f;
- scoped_ptr<ui::InterpolatedTransform> scale_down(
- new ui::InterpolatedScale(1.0f, scale_factor, 0.0f, 0.5f));
-
- scoped_ptr<ui::InterpolatedTransform> scale_up(
- new ui::InterpolatedScale(1.0f, 1.0f / scale_factor, 0.5f, 1.0f));
-
- interpolated_transform_.reset(
- new ui::InterpolatedConstantTransform(current_transform));
-
- scale_up->SetChild(scale_down.release());
- translation->SetChild(scale_up.release());
- rotation->SetChild(translation.release());
- interpolated_transform_->SetChild(rotation.release());
-}
-
-void ScreenRotation::OnStart(ui::LayerAnimationDelegate* delegate) {
-}
-
-bool ScreenRotation::OnProgress(double t,
- ui::LayerAnimationDelegate* delegate) {
- delegate->SetTransformFromAnimation(interpolated_transform_->Interpolate(t));
- return true;
-}
-
-void ScreenRotation::OnGetTarget(TargetValue* target) const {
- target->transform = interpolated_transform_->Interpolate(1.0);
-}
-
-void ScreenRotation::OnAbort(ui::LayerAnimationDelegate* delegate) {
-}
-
-// static
-const ui::LayerAnimationElement::AnimatableProperties&
-ScreenRotation::GetProperties() {
- static ui::LayerAnimationElement::AnimatableProperties properties;
- if (properties.empty())
- properties.insert(ui::LayerAnimationElement::TRANSFORM);
- return properties;
-}
-
-} // namespace ash
diff --git a/chromium/ash/rotator/screen_rotation.h b/chromium/ash/rotator/screen_rotation.h
deleted file mode 100644
index 2f9616a648f..00000000000
--- a/chromium/ash/rotator/screen_rotation.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SCREEN_ROTATION_H_
-#define ASH_SCREEN_ROTATION_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/compositor/layer_animation_element.h"
-#include "ui/gfx/point.h"
-
-namespace ui {
-class InterpolatedTransform;
-class Layer;
-}
-
-namespace aura {
-class RootWindow;
-}
-
-namespace ash {
-
-// A screen rotation represents a single transition from one screen orientation
-// to another. The intended usage is that a new instance of the class is
-// created for every transition. It is possible to update the target orientation
-// in the middle of a transition.
-class ASH_EXPORT ScreenRotation : public ui::LayerAnimationElement {
- public:
- // |degrees| are clockwise. |layer| is the target of the animation. Does not
- // take ownership of |layer|.
- ScreenRotation(int degrees, ui::Layer* layer);
- virtual ~ScreenRotation();
-
- private:
- // Generates the intermediate transformation matrices used during the
- // animation.
- void InitTransform(ui::Layer* layer);
-
- // Implementation of ui::LayerAnimationDelegate
- virtual void OnStart(ui::LayerAnimationDelegate* delegate) OVERRIDE;
- virtual bool OnProgress(double t,
- ui::LayerAnimationDelegate* delegate) OVERRIDE;
- virtual void OnGetTarget(TargetValue* target) const OVERRIDE;
- virtual void OnAbort(ui::LayerAnimationDelegate* delegate) OVERRIDE;
-
- static const ui::LayerAnimationElement::AnimatableProperties&
- GetProperties();
-
- scoped_ptr<ui::InterpolatedTransform> interpolated_transform_;
-
- // The number of degrees to rotate.
- int degrees_;
-
- // The target origin.
- gfx::Point new_origin_;
-
- DISALLOW_COPY_AND_ASSIGN(ScreenRotation);
-};
-
-} // namespace ash
-
-#endif // ASH_SCREEN_ROTATION_H_
diff --git a/chromium/ash/scoped_target_root_window.cc b/chromium/ash/scoped_target_root_window.cc
deleted file mode 100644
index c34f4c32135..00000000000
--- a/chromium/ash/scoped_target_root_window.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-#include "ash/scoped_target_root_window.h"
-
-#include "ash/shell.h"
-
-namespace ash {
-namespace internal {
-
-ScopedTargetRootWindow::ScopedTargetRootWindow(
- aura::Window* root_window) {
- Shell::GetInstance()->scoped_target_root_window_ = root_window;
-}
-
-ScopedTargetRootWindow::~ScopedTargetRootWindow() {
- Shell::GetInstance()->scoped_target_root_window_ = NULL;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/scoped_target_root_window.h b/chromium/ash/scoped_target_root_window.h
deleted file mode 100644
index c0ab7ef7557..00000000000
--- a/chromium/ash/scoped_target_root_window.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-#ifndef ASH_SCOPED_TARGET_ROOT_WINDOW_H_
-#define ASH_SCOPED_TARGET_ROOT_WINDOW_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-namespace internal {
-
-// Constructing a ScopedTargetRootWindow allows temporarily
-// switching a target root window so that a new window gets created
-// in the same window where a user interaction happened.
-// An example usage is to specify the target root window when creating
-// a new window using launcher's icon.
-class ASH_EXPORT ScopedTargetRootWindow {
- public:
- explicit ScopedTargetRootWindow(aura::Window* root_window);
- ~ScopedTargetRootWindow();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ScopedTargetRootWindow);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SCOPED_TARGET_ROOT_WINDOW_H_
diff --git a/chromium/ash/screen_ash.cc b/chromium/ash/screen_ash.cc
deleted file mode 100644
index bbda5ad8a7c..00000000000
--- a/chromium/ash/screen_ash.cc
+++ /dev/null
@@ -1,168 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/screen_ash.h"
-
-#include "ash/display/display_controller.h"
-#include "ash/display/display_manager.h"
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "base/logging.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-
-namespace {
-internal::DisplayManager* GetDisplayManager() {
- return Shell::GetInstance()->display_manager();
-}
-
-DisplayController* GetDisplayController() {
- return Shell::GetInstance()->display_controller();
-}
-} // namespace
-
-ScreenAsh::ScreenAsh() {
-}
-
-ScreenAsh::~ScreenAsh() {
-}
-
-// static
-gfx::Display ScreenAsh::FindDisplayContainingPoint(const gfx::Point& point) {
- return GetDisplayManager()->FindDisplayContainingPoint(point);
-}
-
-// static
-gfx::Rect ScreenAsh::GetMaximizedWindowBoundsInParent(aura::Window* window) {
- if (internal::GetRootWindowController(window->GetRootWindow())->shelf())
- return GetDisplayWorkAreaBoundsInParent(window);
- else
- return GetDisplayBoundsInParent(window);
-}
-
-// static
-gfx::Rect ScreenAsh::GetDisplayBoundsInParent(aura::Window* window) {
- return ConvertRectFromScreen(
- window->parent(),
- Shell::GetScreen()->GetDisplayNearestWindow(window).bounds());
-}
-
-// static
-gfx::Rect ScreenAsh::GetDisplayWorkAreaBoundsInParent(aura::Window* window) {
- return ConvertRectFromScreen(
- window->parent(),
- Shell::GetScreen()->GetDisplayNearestWindow(window).work_area());
-}
-
-// static
-gfx::Rect ScreenAsh::ConvertRectToScreen(aura::Window* window,
- const gfx::Rect& rect) {
- gfx::Point point = rect.origin();
- aura::client::GetScreenPositionClient(window->GetRootWindow())->
- ConvertPointToScreen(window, &point);
- return gfx::Rect(point, rect.size());
-}
-
-// static
-gfx::Rect ScreenAsh::ConvertRectFromScreen(aura::Window* window,
- const gfx::Rect& rect) {
- gfx::Point point = rect.origin();
- aura::client::GetScreenPositionClient(window->GetRootWindow())->
- ConvertPointFromScreen(window, &point);
- return gfx::Rect(point, rect.size());
-}
-
-// static
-const gfx::Display& ScreenAsh::GetSecondaryDisplay() {
- internal::DisplayManager* display_manager = GetDisplayManager();
- CHECK_EQ(2U, display_manager->GetNumDisplays());
- return display_manager->GetDisplayAt(0).id() ==
- DisplayController::GetPrimaryDisplay().id() ?
- display_manager->GetDisplayAt(1) : display_manager->GetDisplayAt(0);
-}
-
-// static
-const gfx::Display& ScreenAsh::GetDisplayForId(int64 display_id) {
- return GetDisplayManager()->GetDisplayForId(display_id);
-}
-
-void ScreenAsh::NotifyBoundsChanged(const gfx::Display& display) {
- FOR_EACH_OBSERVER(gfx::DisplayObserver, observers_,
- OnDisplayBoundsChanged(display));
-}
-
-void ScreenAsh::NotifyDisplayAdded(const gfx::Display& display) {
- FOR_EACH_OBSERVER(gfx::DisplayObserver, observers_, OnDisplayAdded(display));
-}
-
-void ScreenAsh::NotifyDisplayRemoved(const gfx::Display& display) {
- FOR_EACH_OBSERVER(
- gfx::DisplayObserver, observers_, OnDisplayRemoved(display));
-}
-
-bool ScreenAsh::IsDIPEnabled() {
- return true;
-}
-
-gfx::Point ScreenAsh::GetCursorScreenPoint() {
- return aura::Env::GetInstance()->last_mouse_location();
-}
-
-gfx::NativeWindow ScreenAsh::GetWindowUnderCursor() {
- return GetWindowAtScreenPoint(Shell::GetScreen()->GetCursorScreenPoint());
-}
-
-gfx::NativeWindow ScreenAsh::GetWindowAtScreenPoint(const gfx::Point& point) {
- return wm::GetRootWindowAt(point)->GetTopWindowContainingPoint(point);
-}
-
-int ScreenAsh::GetNumDisplays() const {
- return DisplayController::GetNumDisplays();
-}
-
-std::vector<gfx::Display> ScreenAsh::GetAllDisplays() const {
- if (!Shell::HasInstance())
- return std::vector<gfx::Display>(1, GetPrimaryDisplay());
- return GetDisplayManager()->displays();
-}
-
-gfx::Display ScreenAsh::GetDisplayNearestWindow(gfx::NativeView window) const {
- if (!Shell::HasInstance())
- return GetPrimaryDisplay();
- return GetDisplayController()->GetDisplayNearestWindow(window);
-}
-
-gfx::Display ScreenAsh::GetDisplayNearestPoint(const gfx::Point& point) const {
- if (!Shell::HasInstance())
- return GetPrimaryDisplay();
- return GetDisplayController()->GetDisplayNearestPoint(point);
-}
-
-gfx::Display ScreenAsh::GetDisplayMatching(const gfx::Rect& match_rect) const {
- if (!Shell::HasInstance())
- return GetPrimaryDisplay();
- return GetDisplayController()->GetDisplayMatching(match_rect);
-}
-
-gfx::Display ScreenAsh::GetPrimaryDisplay() const {
- return DisplayController::GetPrimaryDisplay();
-}
-
-void ScreenAsh::AddObserver(gfx::DisplayObserver* observer) {
- observers_.AddObserver(observer);
-}
-
-void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) {
- observers_.RemoveObserver(observer);
-}
-
-} // namespace ash
diff --git a/chromium/ash/screen_ash.h b/chromium/ash/screen_ash.h
deleted file mode 100644
index 6c076075e6a..00000000000
--- a/chromium/ash/screen_ash.h
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SCREEN_ASH_H_
-#define ASH_SCREEN_ASH_H_
-
-#include "ash/ash_export.h"
-#include "base/compiler_specific.h"
-#include "base/observer_list.h"
-#include "ui/gfx/screen.h"
-
-namespace gfx {
-class Rect;
-}
-
-namespace ash {
-
-// Aura implementation of gfx::Screen. Implemented here to avoid circular
-// dependencies.
-class ASH_EXPORT ScreenAsh : public gfx::Screen {
- public:
- ScreenAsh();
- virtual ~ScreenAsh();
-
- // Finds the display that contains |point| in screeen coordinates.
- // Returns invalid display if there is no display that can satisfy
- // the condition.
- static gfx::Display FindDisplayContainingPoint(const gfx::Point& point);
-
- // Returns the bounds for maximized windows in parent coordinates.
- // Maximized windows trigger auto-hiding the shelf.
- static gfx::Rect GetMaximizedWindowBoundsInParent(aura::Window* window);
-
- // Returns the display bounds in parent coordinates.
- static gfx::Rect GetDisplayBoundsInParent(aura::Window* window);
-
- // Returns the display's work area bounds in parent coordinates.
- static gfx::Rect GetDisplayWorkAreaBoundsInParent(aura::Window* window);
-
- // Converts |rect| from |window|'s coordinates to the virtual screen
- // coordinates.
- static gfx::Rect ConvertRectToScreen(aura::Window* window,
- const gfx::Rect& rect);
-
- // Converts |rect| from virtual screen coordinates to the |window|'s
- // coordinates.
- static gfx::Rect ConvertRectFromScreen(aura::Window* window,
- const gfx::Rect& rect);
-
- // Returns a gfx::Display object for secondary display. Returns
- // invalid display if there is no secondary display connected.
- static const gfx::Display& GetSecondaryDisplay();
-
- // Returns a gfx::Display object for the specified id. Returns
- // invalid display if no such display is connected.
- static const gfx::Display& GetDisplayForId(int64 display_id);
-
- // Notifies observers of display configuration changes.
- void NotifyBoundsChanged(const gfx::Display& display);
- void NotifyDisplayAdded(const gfx::Display& display);
- void NotifyDisplayRemoved(const gfx::Display& display);
-
- protected:
- // gfx::Screen overrides:
- virtual bool IsDIPEnabled() OVERRIDE;
- virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
- virtual gfx::NativeWindow GetWindowUnderCursor() OVERRIDE;
- virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point)
- OVERRIDE;
- virtual int GetNumDisplays() const OVERRIDE;
- virtual std::vector<gfx::Display> GetAllDisplays() const OVERRIDE;
- virtual gfx::Display GetDisplayNearestWindow(
- gfx::NativeView view) const OVERRIDE;
- virtual gfx::Display GetDisplayNearestPoint(
- const gfx::Point& point) const OVERRIDE;
- virtual gfx::Display GetDisplayMatching(
- const gfx::Rect& match_rect) const OVERRIDE;
- virtual gfx::Display GetPrimaryDisplay() const OVERRIDE;
- virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE;
- virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE;
-
- private:
- ObserverList<gfx::DisplayObserver> observers_;
-
- DISALLOW_COPY_AND_ASSIGN(ScreenAsh);
-};
-
-} // namespace ash
-
-#endif // ASH_SCREEN_ASH_H_
diff --git a/chromium/ash/screen_ash_unittest.cc b/chromium/ash/screen_ash_unittest.cc
deleted file mode 100644
index 89b0ea82379..00000000000
--- a/chromium/ash/screen_ash_unittest.cc
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/screen_ash.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-namespace test {
-
-typedef test::AshTestBase ScreenAshTest;
-
-TEST_F(ScreenAshTest, Bounds) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("600x600,500x500");
- Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager()->
- SetAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
-
- views::Widget* primary = views::Widget::CreateWindowWithContextAndBounds(
- NULL, CurrentContext(), gfx::Rect(10, 10, 100, 100));
- primary->Show();
- views::Widget* secondary = views::Widget::CreateWindowWithContextAndBounds(
- NULL, CurrentContext(), gfx::Rect(610, 10, 100, 100));
- secondary->Show();
-
- // Maximized bounds
- EXPECT_EQ("0,0 600x597",
- ScreenAsh::GetMaximizedWindowBoundsInParent(
- primary->GetNativeView()).ToString());
- EXPECT_EQ("0,0 500x453",
- ScreenAsh::GetMaximizedWindowBoundsInParent(
- secondary->GetNativeView()).ToString());
-
- // Display bounds
- EXPECT_EQ("0,0 600x600",
- ScreenAsh::GetDisplayBoundsInParent(
- primary->GetNativeView()).ToString());
- EXPECT_EQ("0,0 500x500",
- ScreenAsh::GetDisplayBoundsInParent(
- secondary->GetNativeView()).ToString());
-
- // Work area bounds
- EXPECT_EQ("0,0 600x597",
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(
- primary->GetNativeView()).ToString());
- EXPECT_EQ("0,0 500x453",
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(
- secondary->GetNativeView()).ToString());
-}
-
-// Test verifies a stable handling of secondary screen widget changes
-// (crbug.com/226132).
-TEST_F(ScreenAshTest, StabilityTest) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("600x600,500x500");
- views::Widget* secondary = views::Widget::CreateWindowWithContextAndBounds(
- NULL, CurrentContext(), gfx::Rect(610, 10, 100, 100));
- EXPECT_EQ(Shell::GetAllRootWindows()[1],
- secondary->GetNativeView()->GetRootWindow());
- secondary->Show();
- secondary->Maximize();
- secondary->Show();
- secondary->SetFullscreen(true);
- secondary->Hide();
- secondary->Close();
-}
-
-TEST_F(ScreenAshTest, ConvertRect) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("600x600,500x500");
-
- views::Widget* primary = views::Widget::CreateWindowWithContextAndBounds(
- NULL, CurrentContext(), gfx::Rect(10, 10, 100, 100));
- primary->Show();
- views::Widget* secondary = views::Widget::CreateWindowWithContextAndBounds(
- NULL, CurrentContext(), gfx::Rect(610, 10, 100, 100));
- secondary->Show();
-
- EXPECT_EQ(
- "0,0 100x100",
- ScreenAsh::ConvertRectFromScreen(
- primary->GetNativeView(), gfx::Rect(10, 10, 100, 100)).ToString());
- EXPECT_EQ(
- "10,10 100x100",
- ScreenAsh::ConvertRectFromScreen(
- secondary->GetNativeView(), gfx::Rect(620, 20, 100, 100)).ToString());
-
- EXPECT_EQ(
- "40,40 100x100",
- ScreenAsh::ConvertRectToScreen(
- primary->GetNativeView(), gfx::Rect(30, 30, 100, 100)).ToString());
- EXPECT_EQ(
- "650,50 100x100",
- ScreenAsh::ConvertRectToScreen(
- secondary->GetNativeView(), gfx::Rect(40, 40, 100, 100)).ToString());
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/screensaver/DEPS b/chromium/ash/screensaver/DEPS
deleted file mode 100644
index 1c35d9ca694..00000000000
--- a/chromium/ash/screensaver/DEPS
+++ /dev/null
@@ -1,3 +0,0 @@
-include_rules = [
- "+content/public/browser",
-]
diff --git a/chromium/ash/screensaver/OWNERS b/chromium/ash/screensaver/OWNERS
deleted file mode 100644
index 6a2cb03fd3e..00000000000
--- a/chromium/ash/screensaver/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-rkc@chromium.org
diff --git a/chromium/ash/screensaver/screensaver_view.cc b/chromium/ash/screensaver/screensaver_view.cc
deleted file mode 100644
index af953f71d3f..00000000000
--- a/chromium/ash/screensaver/screensaver_view.cc
+++ /dev/null
@@ -1,170 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/screensaver/screensaver_view.h"
-
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "base/bind.h"
-#include "base/logging.h"
-#include "content/public/browser/browser_context.h"
-#include "content/public/browser/browser_thread.h"
-#include "content/public/browser/web_contents.h"
-#include "ui/aura/root_window.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/controls/webview/webview.h"
-#include "ui/views/layout/fill_layout.h"
-#include "ui/views/widget/widget.h"
-
-using content::BrowserThread;
-
-namespace {
-
-ash::internal::ScreensaverView* g_instance = NULL;
-
-// Do not restart the screensaver again if it has
-// terminated kMaxTerminations times already.
-const int kMaxTerminations = 3;
-
-} // namespace
-
-namespace ash {
-
-void ShowScreensaver(const GURL& url) {
- internal::ScreensaverView::ShowScreensaver(url);
-}
-
-void CloseScreensaver() {
- internal::ScreensaverView::CloseScreensaver();
-}
-
-bool IsScreensaverShown() {
- return internal::ScreensaverView::IsScreensaverShown();
-}
-
-namespace internal {
-
-// static
-void ScreensaverView::ShowScreensaver(const GURL& url) {
- if (!g_instance) {
- g_instance = new ScreensaverView(url);
- g_instance->Show();
- }
-}
-
-// static
-void ScreensaverView::CloseScreensaver() {
- if (g_instance) {
- g_instance->Close();
- g_instance = NULL;
- }
-}
-
-// static
-bool ScreensaverView::IsScreensaverShown() {
- return g_instance && g_instance->IsScreensaverShowingURL(g_instance->url_);
-}
-
-bool ScreensaverView::IsScreensaverShowingURL(const GURL& url) {
- return screensaver_webview_ &&
- screensaver_webview_->web_contents() &&
- (screensaver_webview_->web_contents()->GetURL() == url);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// ScreensaverView, views::WidgetDelegateView implementation.
-views::View* ScreensaverView::GetContentsView() {
- return this;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// ScreensaverView, content::WebContentsObserver implementation.
-void ScreensaverView::RenderProcessGone(
- base::TerminationStatus status) {
- LOG(ERROR) << "Screensaver terminated with status " << status;
- termination_count_++;
-
- if (termination_count_ < kMaxTerminations) {
- LOG(ERROR) << termination_count_
- << " terminations is under the threshold of "
- << kMaxTerminations
- << "; reloading Screensaver.";
- LoadScreensaver();
- } else {
- LOG(ERROR) << "Exceeded termination threshold, closing Screensaver.";
- ScreensaverView::CloseScreensaver();
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// ScreensaverView private methods.
-ScreensaverView::ScreensaverView(const GURL& url)
- : url_(url),
- termination_count_(0),
- screensaver_webview_(NULL),
- container_window_(NULL) {
-}
-
-ScreensaverView::~ScreensaverView() {
-}
-
-void ScreensaverView::Show() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- // Add the WebView to our view.
- AddChildWebContents();
- // Show the window.
- ShowWindow();
-}
-
-void ScreensaverView::Close() {
- DCHECK(GetWidget());
- GetWidget()->Close();
-}
-
-void ScreensaverView::AddChildWebContents() {
- content::BrowserContext* context =
- Shell::GetInstance()->delegate()->GetActiveBrowserContext();
- screensaver_webview_ = new views::WebView(context);
- SetLayoutManager(new views::FillLayout);
- AddChildView(screensaver_webview_);
-
- LoadScreensaver();
- content::WebContentsObserver::Observe(
- screensaver_webview_->GetWebContents());
-}
-
-void ScreensaverView::LoadScreensaver() {
- screensaver_webview_->GetWebContents()->GetController().LoadURL(
- url_,
- content::Referrer(),
- content::PAGE_TRANSITION_AUTO_TOPLEVEL,
- std::string());
-}
-
-void ScreensaverView::ShowWindow() {
- aura::Window* root_window = ash::Shell::GetPrimaryRootWindow();
- gfx::Rect screen_rect =
- Shell::GetScreen()->GetDisplayNearestWindow(root_window).bounds();
-
- // We want to be the fullscreen topmost child of the root window.
- // There should be nothing ever really that should show up on top of us.
- container_window_ = new views::Widget();
- views::Widget::InitParams params(
- views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- params.delegate = this;
- params.parent = root_window;
- container_window_->Init(params);
-
- container_window_->StackAtTop();
- container_window_->SetBounds(screen_rect);
- container_window_->Show();
-}
-
-// static
-ScreensaverView* ScreensaverView::GetInstance() {
- return g_instance;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/screensaver/screensaver_view.h b/chromium/ash/screensaver/screensaver_view.h
deleted file mode 100644
index 2e27c4e4b28..00000000000
--- a/chromium/ash/screensaver/screensaver_view.h
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SCREENSAVER_SCREENSAVER_VIEW_H_
-#define ASH_SCREENSAVER_SCREENSAVER_VIEW_H_
-
-#include "ash/ash_export.h"
-#include "base/callback.h"
-#include "content/public/browser/web_contents_observer.h"
-#include "ui/views/widget/widget_delegate.h"
-#include "url/gurl.h"
-
-namespace content {
-class BrowserContent;
-}
-
-namespace views {
-class WebView;
-}
-
-namespace ash {
-
-namespace test {
-class ScreensaverViewTest;
-}
-
-ASH_EXPORT void ShowScreensaver(const GURL& url);
-ASH_EXPORT void CloseScreensaver();
-ASH_EXPORT bool IsScreensaverShown();
-
-typedef
- base::Callback<views::WebView*(content::BrowserContext*)> WebViewFactory;
-
-namespace internal {
-
-// Shows a URL as a screensaver. The screensaver window is fullscreen,
-// always on top of every other window and will reload the URL if the
-// renderer crashes for any reason.
-class ScreensaverView : public views::WidgetDelegateView,
- public content::WebContentsObserver {
- public:
- static void ShowScreensaver(const GURL& url);
- static void CloseScreensaver();
-
- static bool IsScreensaverShown();
-
- private:
- friend class test::ScreensaverViewTest;
-
- explicit ScreensaverView(const GURL& url);
- virtual ~ScreensaverView();
-
- // views::WidgetDelegate overrides.
- virtual views::View* GetContentsView() OVERRIDE;
-
- // content::WebContentsObserver overrides.
- virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
-
- void Show();
- void Close();
-
- // Creates and adds web contents to our view.
- void AddChildWebContents();
- // Load the screensaver in the WebView's webcontent. If the webcontents
- // don't exist, they'll be created by WebView.
- void LoadScreensaver();
- // Creates and shows a frameless full screen window containing our view.
- void ShowWindow();
-
- // For testing purposes.
- static ASH_EXPORT ScreensaverView* GetInstance();
- ASH_EXPORT bool IsScreensaverShowingURL(const GURL& url);
-
- // URL to show in the screensaver.
- GURL url_;
-
- // Number of times the screensaver has been terminated (usually this will be
- // synonymous with the number of times it has crashed).
- int termination_count_;
-
- // Host for the extension that implements this dialog.
- views::WebView* screensaver_webview_;
-
- // Window that holds the screensaver webview.
- views::Widget* container_window_;
-
- DISALLOW_COPY_AND_ASSIGN(ScreensaverView);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SCREENSAVER_SCREENSAVER_VIEW_H_
diff --git a/chromium/ash/screensaver/screensaver_view_unittest.cc b/chromium/ash/screensaver/screensaver_view_unittest.cc
deleted file mode 100644
index 0901ba4e6ca..00000000000
--- a/chromium/ash/screensaver/screensaver_view_unittest.cc
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/screensaver/screensaver_view.h"
-
-#include "ash/test/ash_test_base.h"
-#include "base/bind.h"
-#include "content/public/browser/browser_context.h"
-#include "content/public/browser/web_contents.h"
-#include "ui/views/controls/webview/webview.h"
-#include "ui/views/test/webview_test_helper.h"
-
-namespace ash {
-namespace test {
-
-class ScreensaverViewTest : public ash::test::AshTestBase {
- public:
- ScreensaverViewTest() {
- url_ = GURL("http://www.google.com");
- views_delegate_.reset(new AshTestViewsDelegate());
- webview_test_helper_.reset(new views::WebViewTestHelper());
- }
-
- virtual ~ScreensaverViewTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- RunAllPendingInMessageLoop();
- }
-
- void ExpectOpenScreensaver() {
- internal::ScreensaverView* screensaver =
- internal::ScreensaverView::GetInstance();
- EXPECT_TRUE(screensaver != NULL);
- if (!screensaver) return;
- EXPECT_TRUE(screensaver->IsScreensaverShowingURL(url_));
- }
-
- void ExpectClosedScreensaver() {
- EXPECT_TRUE(internal::ScreensaverView::GetInstance() == NULL);
- }
-
- protected:
- GURL url_;
-
- private:
- scoped_ptr<AshTestViewsDelegate> views_delegate_;
- scoped_ptr<views::WebViewTestHelper> webview_test_helper_;
-
- DISALLOW_COPY_AND_ASSIGN(ScreensaverViewTest);
-};
-
-TEST_F(ScreensaverViewTest, ShowScreensaverAndClose) {
- ash::ShowScreensaver(url_);
- RunAllPendingInMessageLoop();
- ExpectOpenScreensaver();
-
- ash::CloseScreensaver();
- ExpectClosedScreensaver();
-}
-
-TEST_F(ScreensaverViewTest, OutOfOrderMultipleShowAndClose) {
- ash::CloseScreensaver();
- ExpectClosedScreensaver();
-
- ash::ShowScreensaver(url_);
- ExpectOpenScreensaver();
- RunAllPendingInMessageLoop();
- ash::ShowScreensaver(url_);
- ExpectOpenScreensaver();
- RunAllPendingInMessageLoop();
-
- ash::CloseScreensaver();
- ExpectClosedScreensaver();
- ash::CloseScreensaver();
- ExpectClosedScreensaver();
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/screenshot_delegate.h b/chromium/ash/screenshot_delegate.h
deleted file mode 100644
index 9e7af06134f..00000000000
--- a/chromium/ash/screenshot_delegate.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SCREENSHOT_DELEGATE_H_
-#define ASH_SCREENSHOT_DELEGATE_H_
-
-namespace aura {
-class Window;
-} // namespace aura
-
-namespace gfx {
-class Rect;
-} // namespace gfx
-
-namespace ash {
-
-// Delegate for taking screenshots.
-class ScreenshotDelegate {
- public:
- virtual ~ScreenshotDelegate() {}
-
- // The actual task of taking a screenshot for each root window.
- // This method is called when the user wants to take a screenshot manually.
- virtual void HandleTakeScreenshotForAllRootWindows() = 0;
-
- // The actual task of taking a partial screenshot for the given
- // window.
- virtual void HandleTakePartialScreenshot(
- aura::Window* window, const gfx::Rect& rect) = 0;
-
- // Returns true if the system is ready to take screenshot.
- virtual bool CanTakeScreenshot() = 0;
-};
-} // namespace ash
-
-#endif // ASH_SCREENSHOT_DELEGATE_H_
diff --git a/chromium/ash/session_state_delegate.h b/chromium/ash/session_state_delegate.h
deleted file mode 100644
index 91c6229133e..00000000000
--- a/chromium/ash/session_state_delegate.h
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SESSION_STATE_DELEGATE_H_
-#define ASH_SESSION_STATE_DELEGATE_H_
-
-#include <string>
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "base/strings/string16.h"
-
-namespace aura {
-class Window;
-} // namespace aura
-
-namespace gfx {
-class ImageSkia;
-} // namespace gfx
-
-namespace ash {
-
-class SessionStateObserver;
-
-// The index for the multi-profile item to use. The list is always LRU sorted
-// So that the index #0 is the currently active user.
-typedef int MultiProfileIndex;
-
-// A list of user_id.
-typedef std::vector<std::string> UserIdList;
-
-// Delegate for checking and modifying the session state.
-class ASH_EXPORT SessionStateDelegate {
- public:
- // Defines the cycle direction for |CycleActiveUser|.
- enum CycleUser {
- CYCLE_TO_NEXT_USER = 0, // Cycle to the next user.
- CYCLE_TO_PREVIOUS_USER, // Cycle to the previous user.
- };
-
- virtual ~SessionStateDelegate() {};
-
- // Returns the maximum possible number of logged in users.
- virtual int GetMaximumNumberOfLoggedInUsers() const = 0;
-
- // Returns the number of signed in users. If 0 is returned, there is either
- // no session in progress or no active user.
- virtual int NumberOfLoggedInUsers() const = 0;
-
- // Returns |true| if the session has been fully started for the active user.
- // When a user becomes active, the profile and browser UI are not immediately
- // available. Only once this method starts returning |true| is the browser
- // startup complete and both profile and UI are fully available.
- virtual bool IsActiveUserSessionStarted() const = 0;
-
- // Returns true if the screen can be locked.
- virtual bool CanLockScreen() const = 0;
-
- // Returns true if the screen is currently locked.
- virtual bool IsScreenLocked() const = 0;
-
- // Returns true if the screen should be locked when the system is about to
- // suspend.
- virtual bool ShouldLockScreenBeforeSuspending() const = 0;
-
- // Locks the screen. The locking happens asynchronously.
- virtual void LockScreen() = 0;
-
- // Unlocks the screen.
- virtual void UnlockScreen() = 0;
-
- // Returns |true| if user session blocked by some overlying UI. It can be
- // login screen, lock screen or screen for adding users into multi-profile
- // session.
- virtual bool IsUserSessionBlocked() const = 0;
-
- // Gets the displayed name for the user with the given |index|.
- // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|.
- virtual const base::string16 GetUserDisplayName(
- MultiProfileIndex index) const = 0;
-
- // Gets the display email address for the user with the given |index|.
- // The display email address might contains some periods in the email name
- // as well as capitalized letters. For example: "Foo.Bar@mock.com".
- // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|.
- virtual const std::string GetUserEmail(MultiProfileIndex index) const = 0;
-
- // Gets the user id (sanitized email address) for the user with the given
- // |index|. The function would return something like "foobar@mock.com".
- // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|.
- virtual const std::string GetUserID(MultiProfileIndex index) const = 0;
-
- // Gets the avatar image for the user with the given |index|.
- // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|.
- virtual const gfx::ImageSkia& GetUserImage(MultiProfileIndex index) const = 0;
-
- // Returns a list of all logged in users.
- virtual void GetLoggedInUsers(UserIdList* users) = 0;
-
- // Switches to another active user with |user_id|
- // (if that user has already signed in).
- virtual void SwitchActiveUser(const std::string& user_id) = 0;
-
- // Switches the active user to the next or previous user, with the same
- // ordering as GetLoggedInUsers.
- virtual void CycleActiveUser(CycleUser cycle_user) = 0;
-
- // Adds or removes sessions state observer.
- virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0;
- virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0;
-
- // Transfers the visibility of a window to another user. Returns true when
- // transfer was done. This could fail if the |window| belongs to no one and
- // is therefore shown on the desktop of every user.
- virtual bool TransferWindowToDesktopOfUser(
- aura::Window* window,
- ash::MultiProfileIndex index) = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_SESSION_STATE_DELEGATE_H_
diff --git a/chromium/ash/session_state_delegate_stub.cc b/chromium/ash/session_state_delegate_stub.cc
deleted file mode 100644
index cea41325236..00000000000
--- a/chromium/ash/session_state_delegate_stub.cc
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/session_state_delegate_stub.h"
-
-#include "ash/shell.h"
-#include "ash/shell/example_factory.h"
-#include "base/strings/string16.h"
-#include "base/strings/utf_string_conversions.h"
-
-namespace ash {
-
-SessionStateDelegateStub::SessionStateDelegateStub() : screen_locked_(false) {
-}
-
-SessionStateDelegateStub::~SessionStateDelegateStub() {
-}
-
-int SessionStateDelegateStub::GetMaximumNumberOfLoggedInUsers() const {
- return 3;
-}
-
-int SessionStateDelegateStub::NumberOfLoggedInUsers() const {
- return 1;
-}
-
-bool SessionStateDelegateStub::IsActiveUserSessionStarted() const {
- return true;
-}
-
-bool SessionStateDelegateStub::CanLockScreen() const {
- return true;
-}
-
-bool SessionStateDelegateStub::IsScreenLocked() const {
- return screen_locked_;
-}
-
-bool SessionStateDelegateStub::ShouldLockScreenBeforeSuspending() const {
- return false;
-}
-
-void SessionStateDelegateStub::LockScreen() {
- shell::CreateLockScreen();
- screen_locked_ = true;
- Shell::GetInstance()->UpdateShelfVisibility();
-}
-
-void SessionStateDelegateStub::UnlockScreen() {
- screen_locked_ = false;
- Shell::GetInstance()->UpdateShelfVisibility();
-}
-
-bool SessionStateDelegateStub::IsUserSessionBlocked() const {
- return !IsActiveUserSessionStarted() || IsScreenLocked();
-}
-
-const base::string16 SessionStateDelegateStub::GetUserDisplayName(
- MultiProfileIndex index) const {
- return UTF8ToUTF16("stub-user");
-}
-
-const std::string SessionStateDelegateStub::GetUserEmail(
- MultiProfileIndex index) const {
- return "stub-user@domain.com";
-}
-
-const std::string SessionStateDelegateStub::GetUserID(
- MultiProfileIndex index) const {
- return GetUserEmail(index);
-}
-
-const gfx::ImageSkia& SessionStateDelegateStub::GetUserImage(
- MultiProfileIndex index) const {
- return null_image_;
-}
-
-void SessionStateDelegateStub::GetLoggedInUsers(UserIdList* users) {
-}
-
-void SessionStateDelegateStub::SwitchActiveUser(const std::string& user_id) {
-}
-
-void SessionStateDelegateStub::CycleActiveUser(CycleUser cycle_user) {
-}
-
-void SessionStateDelegateStub::AddSessionStateObserver(
- ash::SessionStateObserver* observer) {
-}
-
-void SessionStateDelegateStub::RemoveSessionStateObserver(
- ash::SessionStateObserver* observer) {
-}
-
-bool SessionStateDelegateStub::TransferWindowToDesktopOfUser(
- aura::Window* window,
- ash::MultiProfileIndex index) {
- return false;
-}
-
-} // namespace ash
diff --git a/chromium/ash/session_state_delegate_stub.h b/chromium/ash/session_state_delegate_stub.h
deleted file mode 100644
index f496e6bbc80..00000000000
--- a/chromium/ash/session_state_delegate_stub.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SESSION_STATE_DELEGATE_STUB_H_
-#define ASH_SESSION_STATE_DELEGATE_STUB_H_
-
-#include "ash/session_state_delegate.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/gfx/image/image_skia.h"
-
-namespace ash {
-
-// Stub implementation of SessionStateDelegate for testing.
-class SessionStateDelegateStub : public SessionStateDelegate {
- public:
- SessionStateDelegateStub();
- virtual ~SessionStateDelegateStub();
-
- // SessionStateDelegate:
- virtual int GetMaximumNumberOfLoggedInUsers() const OVERRIDE;
- virtual int NumberOfLoggedInUsers() const OVERRIDE;
- virtual bool IsActiveUserSessionStarted() const OVERRIDE;
- virtual bool CanLockScreen() const OVERRIDE;
- virtual bool IsScreenLocked() const OVERRIDE;
- virtual bool ShouldLockScreenBeforeSuspending() const OVERRIDE;
- virtual void LockScreen() OVERRIDE;
- virtual void UnlockScreen() OVERRIDE;
- virtual bool IsUserSessionBlocked() const OVERRIDE;
- virtual const base::string16 GetUserDisplayName(
- ash::MultiProfileIndex index) const OVERRIDE;
- virtual const std::string GetUserEmail(
- ash::MultiProfileIndex index) const OVERRIDE;
- virtual const std::string GetUserID(
- ash::MultiProfileIndex index) const OVERRIDE;
- virtual const gfx::ImageSkia& GetUserImage(
- ash::MultiProfileIndex index) const OVERRIDE;
- virtual void GetLoggedInUsers(UserIdList* users) OVERRIDE;
- virtual void SwitchActiveUser(const std::string& user_id) OVERRIDE;
- virtual void CycleActiveUser(CycleUser cycle_user) OVERRIDE;
- virtual void AddSessionStateObserver(
- ash::SessionStateObserver* observer) OVERRIDE;
- virtual void RemoveSessionStateObserver(
- ash::SessionStateObserver* observer) OVERRIDE;
- virtual bool TransferWindowToDesktopOfUser(
- aura::Window* window,
- ash::MultiProfileIndex index) OVERRIDE;
-
- private:
- bool screen_locked_;
-
- // A pseudo user image.
- gfx::ImageSkia null_image_;
-
- DISALLOW_COPY_AND_ASSIGN(SessionStateDelegateStub);
-};
-
-} // namespace ash
-
-#endif // ASH_SESSION_STATE_DELEGATE_STUB_H_
diff --git a/chromium/ash/session_state_observer.cc b/chromium/ash/session_state_observer.cc
deleted file mode 100644
index 96b07710d39..00000000000
--- a/chromium/ash/session_state_observer.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/session_state_observer.h"
-
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-
-namespace ash {
-
-ScopedSessionStateObserver::ScopedSessionStateObserver(
- ash::SessionStateObserver* observer) : observer_(observer) {
- ash::Shell::GetInstance()->session_state_delegate()->
- AddSessionStateObserver(observer_);
-}
-
-ScopedSessionStateObserver::~ScopedSessionStateObserver() {
- ash::Shell::GetInstance()->session_state_delegate()->
- RemoveSessionStateObserver(observer_);
-}
-
-} // namespace ash
-
diff --git a/chromium/ash/session_state_observer.h b/chromium/ash/session_state_observer.h
deleted file mode 100644
index de1b5333801..00000000000
--- a/chromium/ash/session_state_observer.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SESSION_STATE_OBSERVER_H_
-#define ASH_SESSION_STATE_OBSERVER_H_
-
-#include <string>
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-
-namespace ash {
-
-class ASH_EXPORT SessionStateObserver {
- public:
- // Called when active user has changed.
- virtual void ActiveUserChanged(const std::string& user_id) {}
-
- // Called when another user gets added to the existing session.
- virtual void UserAddedToSession(const std::string& user_id) {}
-
- protected:
- virtual ~SessionStateObserver() {}
-};
-
-// A class to attach / detach an object as a session state observer with a
-// scoped pointer.
-class ASH_EXPORT ScopedSessionStateObserver {
- public:
- explicit ScopedSessionStateObserver(ash::SessionStateObserver* observer);
- virtual ~ScopedSessionStateObserver();
-
- private:
- ash::SessionStateObserver* observer_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedSessionStateObserver);
-};
-
-} // namespace ash
-
-#endif // ASH_SESSION_STATE_OBSERVER_H_
diff --git a/chromium/ash/shelf/alternate_app_list_button.cc b/chromium/ash/shelf/alternate_app_list_button.cc
deleted file mode 100644
index bf442d1abce..00000000000
--- a/chromium/ash/shelf/alternate_app_list_button.cc
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/alternate_app_list_button.h"
-
-#include "ash/ash_constants.h"
-#include "ash/ash_switches.h"
-#include "ash/launcher/launcher_types.h"
-#include "ash/shelf/shelf_button.h"
-#include "ash/shelf/shelf_button_host.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/accessibility/accessible_view_state.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animation_element.h"
-#include "ui/compositor/layer_animation_sequence.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/image/image_skia_operations.h"
-#include "ui/views/controls/button/image_button.h"
-#include "ui/views/painter.h"
-
-namespace ash {
-namespace internal {
-
-// static
-const int AlternateAppListButton::kImageBoundsSize = 7;
-
-
-AlternateAppListButton::AlternateAppListButton(views::ButtonListener* listener,
- ShelfButtonHost* host,
- ShelfWidget* shelf_widget)
- : views::ImageButton(listener),
- host_(host),
- shelf_widget_(shelf_widget) {
- SetAccessibleName(l10n_util::GetStringUTF16(IDS_AURA_APP_LIST_TITLE));
- SetSize(gfx::Size(ShelfLayoutManager::kShelfSize,
- ShelfLayoutManager::kShelfSize));
- SetFocusPainter(views::Painter::CreateSolidFocusPainter(
- kFocusBorderColor, gfx::Insets(1, 1, 1, 1)));
-}
-
-AlternateAppListButton::~AlternateAppListButton() {
-}
-
-bool AlternateAppListButton::OnMousePressed(const ui::MouseEvent& event) {
- ImageButton::OnMousePressed(event);
- host_->PointerPressedOnButton(this, ShelfButtonHost::MOUSE, event);
- return true;
-}
-
-void AlternateAppListButton::OnMouseReleased(const ui::MouseEvent& event) {
- ImageButton::OnMouseReleased(event);
- host_->PointerReleasedOnButton(this, ShelfButtonHost::MOUSE, false);
-}
-
-void AlternateAppListButton::OnMouseCaptureLost() {
- host_->PointerReleasedOnButton(this, ShelfButtonHost::MOUSE, true);
- ImageButton::OnMouseCaptureLost();
-}
-
-bool AlternateAppListButton::OnMouseDragged(const ui::MouseEvent& event) {
- ImageButton::OnMouseDragged(event);
- host_->PointerDraggedOnButton(this, ShelfButtonHost::MOUSE, event);
- return true;
-}
-
-void AlternateAppListButton::OnMouseMoved(const ui::MouseEvent& event) {
- ImageButton::OnMouseMoved(event);
- host_->MouseMovedOverButton(this);
-}
-
-void AlternateAppListButton::OnMouseEntered(const ui::MouseEvent& event) {
- ImageButton::OnMouseEntered(event);
- host_->MouseEnteredButton(this);
-}
-
-void AlternateAppListButton::OnMouseExited(const ui::MouseEvent& event) {
- ImageButton::OnMouseExited(event);
- host_->MouseExitedButton(this);
-}
-
-void AlternateAppListButton::OnGestureEvent(ui::GestureEvent* event) {
- switch (event->type()) {
- case ui::ET_GESTURE_SCROLL_BEGIN:
- host_->PointerPressedOnButton(this, ShelfButtonHost::TOUCH, *event);
- event->SetHandled();
- return;
- case ui::ET_GESTURE_SCROLL_UPDATE:
- host_->PointerDraggedOnButton(this, ShelfButtonHost::TOUCH, *event);
- event->SetHandled();
- return;
- case ui::ET_GESTURE_SCROLL_END:
- case ui::ET_SCROLL_FLING_START:
- host_->PointerReleasedOnButton(this, ShelfButtonHost::TOUCH, false);
- event->SetHandled();
- return;
- default:
- ImageButton::OnGestureEvent(event);
- return;
- }
-}
-
-void AlternateAppListButton::OnPaint(gfx::Canvas* canvas) {
- // Call the base class first to paint any background/borders.
- View::OnPaint(canvas);
-
- int background_image_id = 0;
- if (Shell::GetInstance()->GetAppListTargetVisibility()) {
- background_image_id = IDR_AURA_NOTIFICATION_BACKGROUND_PRESSED;
- } else {
- if (shelf_widget_->GetDimsShelf())
- background_image_id = IDR_AURA_NOTIFICATION_BACKGROUND_ON_BLACK;
- else
- background_image_id = IDR_AURA_NOTIFICATION_BACKGROUND_NORMAL;
- }
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- const gfx::ImageSkia* background_image =
- rb.GetImageNamed(background_image_id).ToImageSkia();
- const gfx::ImageSkia* forground_image =
- rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST_ALTERNATE).ToImageSkia();
-
- gfx::Rect contents_bounds = GetContentsBounds();
- gfx::Rect background_bounds, forground_bounds;
-
- ShelfAlignment alignment = shelf_widget_->GetAlignment();
- background_bounds.set_size(background_image->size());
- if (alignment == SHELF_ALIGNMENT_LEFT) {
- background_bounds.set_x(contents_bounds.width() -
- ShelfLayoutManager::kShelfItemInset - background_image->width());
- background_bounds.set_y(contents_bounds.y() +
- (contents_bounds.height() - background_image->height()) / 2);
- } else if(alignment == SHELF_ALIGNMENT_RIGHT) {
- background_bounds.set_x(ShelfLayoutManager::kShelfItemInset);
- background_bounds.set_y(contents_bounds.y() +
- (contents_bounds.height() - background_image->height()) / 2);
- } else {
- background_bounds.set_y(ShelfLayoutManager::kShelfItemInset);
- background_bounds.set_x(contents_bounds.x() +
- (contents_bounds.width() - background_image->width()) / 2);
- }
-
- forground_bounds.set_size(forground_image->size());
- forground_bounds.set_x(background_bounds.x() +
- std::max(0,
- (background_bounds.width() - forground_bounds.width()) / 2));
- forground_bounds.set_y(background_bounds.y() +
- std::max(0,
- (background_bounds.height() - forground_bounds.height()) / 2));
-
- canvas->DrawImageInt(*background_image,
- background_bounds.x(),
- background_bounds.y());
- canvas->DrawImageInt(*forground_image,
- forground_bounds.x(),
- forground_bounds.y());
-
- views::Painter::PaintFocusPainter(this, canvas, focus_painter());
-}
-
-void AlternateAppListButton::GetAccessibleState(
- ui::AccessibleViewState* state) {
- state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
- state->name = host_->GetAccessibleName(this);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/shelf/alternate_app_list_button.h b/chromium/ash/shelf/alternate_app_list_button.h
deleted file mode 100644
index 1166e04ef7d..00000000000
--- a/chromium/ash/shelf/alternate_app_list_button.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_ALTERNATE_APP_LIST_BUTTON_H_
-#define ASH_SHELF_ALTERNATE_APP_LIST_BUTTON_H_
-
-#include "ui/views/controls/button/image_button.h"
-
-namespace ash {
-
-class ShelfWidget;
-
-namespace internal {
-
-class ShelfButtonHost;
-
-// Button used for the AppList icon on the shelf.
-// This class is an alternate implementation to ash::internal::AppListButton
-// for the purposes of testing an alternate shelf layout
-// (see ash_switches: UseAlternateShelfLayout).
-class AlternateAppListButton : public views::ImageButton {
- public:
- // Bounds size (inset) required for the app icon image (in pixels).
- static const int kImageBoundsSize;
-
- AlternateAppListButton(views::ButtonListener* listener,
- ShelfButtonHost* host,
- ShelfWidget* shelf_widget);
- virtual ~AlternateAppListButton();
-
- protected:
- // views::ImageButton overrides:
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
-
- // ui::EventHandler overrides:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- private:
- ShelfButtonHost* host_;
- // Reference to the shelf widget containing this button, owned by the
- // root window controller.
- ShelfWidget* shelf_widget_;
-
- DISALLOW_COPY_AND_ASSIGN(AlternateAppListButton);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SHELF_ALTERNATE_APP_LIST_BUTTON_H_
diff --git a/chromium/ash/shelf/app_list_button.cc b/chromium/ash/shelf/app_list_button.cc
deleted file mode 100644
index 697ed772b49..00000000000
--- a/chromium/ash/shelf/app_list_button.cc
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/app_list_button.h"
-
-#include <vector>
-
-#include "ash/ash_constants.h"
-#include "ash/launcher/launcher_types.h"
-#include "ash/shelf/shelf_button_host.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/accessibility/accessible_view_state.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animation_element.h"
-#include "ui/compositor/layer_animation_sequence.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/views/painter.h"
-
-namespace ash {
-namespace internal {
-
-const int kAnimationDurationInMs = 600;
-const float kAnimationOpacity[] = { 1.0f, 0.4f, 1.0f };
-
-AppListButton::AppListButton(views::ButtonListener* listener,
- ShelfButtonHost* host)
- : views::ImageButton(listener),
- host_(host) {
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- SetImage(
- views::CustomButton::STATE_NORMAL,
- rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST).ToImageSkia());
- SetImage(
- views::CustomButton::STATE_HOVERED,
- rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST_HOT).
- ToImageSkia());
- SetImage(
- views::CustomButton::STATE_PRESSED,
- rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST_PUSHED).
- ToImageSkia());
- SetAccessibleName(l10n_util::GetStringUTF16(IDS_AURA_APP_LIST_TITLE));
- SetSize(gfx::Size(kLauncherPreferredSize, kLauncherPreferredSize));
- SetImageAlignment(ImageButton::ALIGN_CENTER, ImageButton::ALIGN_TOP);
- SetFocusPainter(views::Painter::CreateSolidFocusPainter(
- kFocusBorderColor, gfx::Insets(1, 1, 1, 1)));
-}
-
-AppListButton::~AppListButton() {
-}
-
-void AppListButton::StartLoadingAnimation() {
- layer()->GetAnimator()->StopAnimating();
-
- scoped_ptr<ui::LayerAnimationSequence> opacity_sequence(
- new ui::LayerAnimationSequence());
-
- opacity_sequence->set_is_cyclic(true);
-
- for (size_t i = 0; i < arraysize(kAnimationOpacity); ++i) {
- opacity_sequence->AddElement(
- ui::LayerAnimationElement::CreateOpacityElement(
- kAnimationOpacity[i],
- base::TimeDelta::FromMilliseconds(kAnimationDurationInMs)));
- }
-
- ui::LayerAnimationElement::AnimatableProperties opacity_properties;
- opacity_properties.insert(ui::LayerAnimationElement::OPACITY);
- opacity_sequence->AddElement(
- ui::LayerAnimationElement::CreatePauseElement(
- opacity_properties,
- base::TimeDelta::FromMilliseconds(kAnimationDurationInMs)));
-
- // LayerAnimator takes ownership of the sequences.
- layer()->GetAnimator()->ScheduleAnimation(opacity_sequence.release());
-}
-
-void AppListButton::StopLoadingAnimation() {
- layer()->GetAnimator()->StopAnimating();
-
- ui::ScopedLayerAnimationSettings settings(layer()->GetAnimator());
- settings.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kAnimationDurationInMs));
- layer()->SetOpacity(1.0f);
- layer()->SetTransform(gfx::Transform());
-}
-
-bool AppListButton::OnMousePressed(const ui::MouseEvent& event) {
- ImageButton::OnMousePressed(event);
- host_->PointerPressedOnButton(this, ShelfButtonHost::MOUSE, event);
- return true;
-}
-
-void AppListButton::OnMouseReleased(const ui::MouseEvent& event) {
- ImageButton::OnMouseReleased(event);
- host_->PointerReleasedOnButton(this, ShelfButtonHost::MOUSE, false);
-}
-
-void AppListButton::OnMouseCaptureLost() {
- host_->PointerReleasedOnButton(this, ShelfButtonHost::MOUSE, true);
- ImageButton::OnMouseCaptureLost();
-}
-
-bool AppListButton::OnMouseDragged(const ui::MouseEvent& event) {
- ImageButton::OnMouseDragged(event);
- host_->PointerDraggedOnButton(this, ShelfButtonHost::MOUSE, event);
- return true;
-}
-
-void AppListButton::OnMouseMoved(const ui::MouseEvent& event) {
- ImageButton::OnMouseMoved(event);
- host_->MouseMovedOverButton(this);
-}
-
-void AppListButton::OnMouseEntered(const ui::MouseEvent& event) {
- ImageButton::OnMouseEntered(event);
- host_->MouseEnteredButton(this);
-}
-
-void AppListButton::OnMouseExited(const ui::MouseEvent& event) {
- ImageButton::OnMouseExited(event);
- host_->MouseExitedButton(this);
-}
-
-void AppListButton::GetAccessibleState(ui::AccessibleViewState* state) {
- state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
- state->name = host_->GetAccessibleName(this);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/shelf/app_list_button.h b/chromium/ash/shelf/app_list_button.h
deleted file mode 100644
index 9b013de7e88..00000000000
--- a/chromium/ash/shelf/app_list_button.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_APP_LIST_BUTTON_H_
-#define ASH_SHELF_APP_LIST_BUTTON_H_
-
-#include "ui/views/controls/button/image_button.h"
-
-namespace ash {
-namespace internal {
-
-class ShelfButtonHost;
-
-// Button used for the AppList icon on the shelf.
-class AppListButton : public views::ImageButton {
- public:
- AppListButton(views::ButtonListener* listener, ShelfButtonHost* host);
- virtual ~AppListButton();
-
- void StartLoadingAnimation();
- void StopLoadingAnimation();
-
- protected:
- // views::ImageButton:
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
-
- private:
- ShelfButtonHost* host_;
-
- DISALLOW_COPY_AND_ASSIGN(AppListButton);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SHELF_APP_LIST_BUTTON_H_
diff --git a/chromium/ash/shelf/app_list_shelf_item_delegate.cc b/chromium/ash/shelf/app_list_shelf_item_delegate.cc
deleted file mode 100644
index 7013d2be1f3..00000000000
--- a/chromium/ash/shelf/app_list_shelf_item_delegate.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/app_list_shelf_item_delegate.h"
-
-#include "ash/shelf/shelf_model.h"
-#include "ash/shell.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-
-namespace ash {
-namespace internal {
-
-AppListShelfItemDelegate::AppListShelfItemDelegate() {
- LauncherItem app_list;
- app_list.type = TYPE_APP_LIST;
- Shell::GetInstance()->shelf_model()->Add(app_list);
-}
-
-AppListShelfItemDelegate::~AppListShelfItemDelegate() {
- // ShelfItemDelegateManager owns and destroys this class.
-}
-
-bool AppListShelfItemDelegate::ItemSelected(const ui::Event& event) {
- // Pass NULL here to show the app list in the currently active RootWindow.
- Shell::GetInstance()->ToggleAppList(NULL);
- return false;
-}
-
-base::string16 AppListShelfItemDelegate::GetTitle() {
- ShelfModel* model = Shell::GetInstance()->shelf_model();
- DCHECK(model);
- return model->status() == ShelfModel::STATUS_LOADING ?
- l10n_util::GetStringUTF16(IDS_AURA_APP_LIST_SYNCING_TITLE) :
- l10n_util::GetStringUTF16(IDS_AURA_APP_LIST_TITLE);
-}
-
-ui::MenuModel* AppListShelfItemDelegate::CreateContextMenu(
- aura::Window* root_window) {
- return NULL;
-}
-
-ShelfMenuModel* AppListShelfItemDelegate::CreateApplicationMenu(
- int event_flags) {
- // AppList does not show an application menu.
- return NULL;
-}
-
-bool AppListShelfItemDelegate::IsDraggable() {
- return false;
-}
-
-bool AppListShelfItemDelegate::ShouldShowTooltip() {
- return true;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/shelf/app_list_shelf_item_delegate.h b/chromium/ash/shelf/app_list_shelf_item_delegate.h
deleted file mode 100644
index 0396821b65b..00000000000
--- a/chromium/ash/shelf/app_list_shelf_item_delegate.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_APP_LIST_SHELF_ITEM_DELEGATE_H_
-#define ASH_SHELF_APP_LIST_SHELF_ITEM_DELEGATE_H_
-
-#include "ash/shelf/shelf_item_delegate.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-
-namespace ash {
-namespace internal {
-
-// ShelfItemDelegate for TYPE_APP_LIST.
-class AppListShelfItemDelegate : public ShelfItemDelegate {
- public:
- AppListShelfItemDelegate();
-
- virtual ~AppListShelfItemDelegate();
-
- // ShelfItemDelegate:
- virtual bool ItemSelected(const ui::Event& event) OVERRIDE;
- virtual base::string16 GetTitle() OVERRIDE;
- virtual ui::MenuModel* CreateContextMenu(aura::Window* root_window) OVERRIDE;
- virtual ShelfMenuModel* CreateApplicationMenu(int event_flags) OVERRIDE;
- virtual bool IsDraggable() OVERRIDE;
- virtual bool ShouldShowTooltip() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AppListShelfItemDelegate);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SHELF_APP_LIST_SHELF_ITEM_DELEGATE_H_
diff --git a/chromium/ash/shelf/background_animator.cc b/chromium/ash/shelf/background_animator.cc
deleted file mode 100644
index 8137d602893..00000000000
--- a/chromium/ash/shelf/background_animator.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/background_animator.h"
-
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-// Duration of the background animation.
-const int kBackgroundDurationMS = 1000;
-
-}
-
-BackgroundAnimator::BackgroundAnimator(BackgroundAnimatorDelegate* delegate,
- int min_alpha,
- int max_alpha)
- : delegate_(delegate),
- min_alpha_(min_alpha),
- max_alpha_(max_alpha),
- animation_(this),
- paints_background_(false),
- alpha_(min_alpha) {
- animation_.SetSlideDuration(kBackgroundDurationMS);
-}
-
-BackgroundAnimator::~BackgroundAnimator() {
-}
-
-void BackgroundAnimator::SetDuration(int time_in_ms) {
- animation_.SetSlideDuration(time_in_ms);
-}
-
-void BackgroundAnimator::SetPaintsBackground(
- bool value, BackgroundAnimatorChangeType type) {
- if (paints_background_ == value)
- return;
- paints_background_ = value;
- if (type == BACKGROUND_CHANGE_IMMEDIATE && !animation_.is_animating()) {
- animation_.Reset(value ? 1.0f : 0.0f);
- AnimationProgressed(&animation_);
- return;
- }
- if (paints_background_)
- animation_.Show();
- else
- animation_.Hide();
-}
-
-void BackgroundAnimator::AnimationProgressed(const gfx::Animation* animation) {
- int alpha = animation->CurrentValueBetween(min_alpha_, max_alpha_);
- if (alpha_ == alpha)
- return;
- alpha_ = alpha;
- delegate_->UpdateBackground(alpha_);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/shelf/background_animator.h b/chromium/ash/shelf/background_animator.h
deleted file mode 100644
index 805f7d5e5d2..00000000000
--- a/chromium/ash/shelf/background_animator.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_BACKGROUND_ANIMATOR_H_
-#define ASH_SHELF_BACKGROUND_ANIMATOR_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "ui/gfx/animation/animation_delegate.h"
-#include "ui/gfx/animation/slide_animation.h"
-
-namespace ash {
-
-// How the background can be changed.
-enum BackgroundAnimatorChangeType {
- BACKGROUND_CHANGE_ANIMATE,
- BACKGROUND_CHANGE_IMMEDIATE
-};
-
-namespace internal {
-
-// Delegate is notified any time the background changes.
-class ASH_EXPORT BackgroundAnimatorDelegate {
- public:
- virtual void UpdateBackground(int alpha) = 0;
-
- protected:
- virtual ~BackgroundAnimatorDelegate() {}
-};
-
-// BackgroundAnimator is used by the shelf to animate the background (alpha).
-class ASH_EXPORT BackgroundAnimator : public gfx::AnimationDelegate {
- public:
- BackgroundAnimator(BackgroundAnimatorDelegate* delegate,
- int min_alpha,
- int max_alpha);
- virtual ~BackgroundAnimator();
-
- // Sets the transition time in ms.
- void SetDuration(int time_in_ms);
-
- // Sets whether a background is rendered. Initial value is false. If |type|
- // is |CHANGE_IMMEDIATE| and an animation is not in progress this notifies
- // the delegate immediately (synchronously from this method).
- void SetPaintsBackground(bool value, BackgroundAnimatorChangeType type);
- bool paints_background() const { return paints_background_; }
-
- // Current alpha.
- int alpha() const { return alpha_; }
-
- // gfx::AnimationDelegate overrides:
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
-
- private:
- BackgroundAnimatorDelegate* delegate_;
-
- const int min_alpha_;
- const int max_alpha_;
-
- gfx::SlideAnimation animation_;
-
- // Whether the background is painted.
- bool paints_background_;
-
- // Current alpha value of the background.
- int alpha_;
-
- DISALLOW_COPY_AND_ASSIGN(BackgroundAnimator);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SHELF_BACKGROUND_ANIMATOR_H_
diff --git a/chromium/ash/shelf/overflow_bubble.cc b/chromium/ash/shelf/overflow_bubble.cc
deleted file mode 100644
index 35c885f338c..00000000000
--- a/chromium/ash/shelf/overflow_bubble.cc
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/overflow_bubble.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/shelf/overflow_bubble_view.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_view.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/system/tray/system_tray.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/events/event.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-OverflowBubble::OverflowBubble()
- : bubble_(NULL),
- anchor_(NULL),
- shelf_view_(NULL) {
-}
-
-OverflowBubble::~OverflowBubble() {
- Hide();
-}
-
-void OverflowBubble::Show(views::View* anchor, ShelfView* shelf_view) {
- Hide();
-
- bubble_ = new OverflowBubbleView();
- bubble_->InitOverflowBubble(anchor, shelf_view);
- shelf_view_ = shelf_view;
- anchor_ = anchor;
-
- Shell::GetInstance()->AddPreTargetHandler(this);
-
- RootWindowController::ForWindow(anchor->GetWidget()->GetNativeView())->
- GetSystemTray()->InitializeBubbleAnimations(bubble_->GetWidget());
- bubble_->GetWidget()->AddObserver(this);
- bubble_->GetWidget()->Show();
-}
-
-void OverflowBubble::Hide() {
- if (!IsShowing())
- return;
-
- Shell::GetInstance()->RemovePreTargetHandler(this);
- bubble_->GetWidget()->RemoveObserver(this);
- bubble_->GetWidget()->Close();
- bubble_ = NULL;
- anchor_ = NULL;
- shelf_view_ = NULL;
-}
-
-void OverflowBubble::HideBubbleAndRefreshButton() {
- if (!IsShowing())
- return;
-
- views::View* anchor = anchor_;
- Hide();
- // Update overflow button (|anchor|) status when overflow bubble is hidden
- // by outside event of overflow button.
- anchor->SchedulePaint();
-}
-
-void OverflowBubble::ProcessPressedEvent(ui::LocatedEvent* event) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- gfx::Point event_location_in_screen = event->location();
- aura::client::GetScreenPositionClient(target->GetRootWindow())->
- ConvertPointToScreen(target, &event_location_in_screen);
- if (!shelf_view_->IsShowingMenu() &&
- !bubble_->GetBoundsInScreen().Contains(event_location_in_screen) &&
- !anchor_->GetBoundsInScreen().Contains(event_location_in_screen)) {
- HideBubbleAndRefreshButton();
- }
-}
-
-void OverflowBubble::OnMouseEvent(ui::MouseEvent* event) {
- if (event->type() == ui::ET_MOUSE_PRESSED)
- ProcessPressedEvent(event);
-}
-
-void OverflowBubble::OnTouchEvent(ui::TouchEvent* event) {
- if (event->type() == ui::ET_TOUCH_PRESSED)
- ProcessPressedEvent(event);
-}
-
-void OverflowBubble::OnWidgetDestroying(views::Widget* widget) {
- DCHECK(widget == bubble_->GetWidget());
- bubble_ = NULL;
- anchor_ = NULL;
- shelf_view_ = NULL;
- ShelfLayoutManager::ForLauncher(
- widget->GetNativeView())->shelf_widget()->launcher()->SchedulePaint();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/shelf/overflow_bubble.h b/chromium/ash/shelf/overflow_bubble.h
deleted file mode 100644
index 26bdf7a855e..00000000000
--- a/chromium/ash/shelf/overflow_bubble.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_OVERFLOW_BUBBLE_H_
-#define ASH_SHELF_OVERFLOW_BUBBLE_H_
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/events/event_handler.h"
-#include "ui/views/widget/widget_observer.h"
-
-namespace ui {
-class LocatedEvent;
-}
-
-namespace views {
-class View;
-}
-
-namespace ash {
-
-namespace internal {
-
-class OverflowBubbleView;
-class ShelfLayoutManager;
-class ShelfView;
-
-// OverflowBubble displays the overflown launcher items in a bubble.
-class OverflowBubble : public ui::EventHandler,
- public views::WidgetObserver {
- public:
- OverflowBubble();
- virtual ~OverflowBubble();
-
- // Shows an bubble pointing to |anchor| with |shelf_view| as its content.
- void Show(views::View* anchor, ShelfView* shelf_view);
-
- void Hide();
-
- // This method as name indicates will hide bubble and schedule paint
- // for overflow button.
- void HideBubbleAndRefreshButton();
-
- bool IsShowing() const { return !!bubble_; }
- ShelfView* shelf_view() { return shelf_view_; }
- OverflowBubbleView* bubble_view() { return bubble_; }
-
- private:
- void ProcessPressedEvent(ui::LocatedEvent* event);
-
- // Overridden from ui::EventHandler:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
-
- // Overridden from views::WidgetObserver:
- virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
-
- OverflowBubbleView* bubble_; // Owned by views hierarchy.
- views::View* anchor_; // Owned by ShelfView.
- ShelfView* shelf_view_; // Owned by |bubble_|.
-
- DISALLOW_COPY_AND_ASSIGN(OverflowBubble);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SHELF_OVERFLOW_BUBBLE_H_
diff --git a/chromium/ash/shelf/overflow_bubble_view.cc b/chromium/ash/shelf/overflow_bubble_view.cc
deleted file mode 100644
index 67b483de9cb..00000000000
--- a/chromium/ash/shelf/overflow_bubble_view.cc
+++ /dev/null
@@ -1,229 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/overflow_bubble_view.h"
-
-#include <algorithm>
-
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_view.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ui/events/event.h"
-#include "ui/gfx/insets.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/bubble/bubble_frame_view.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-// Max bubble size to screen size ratio.
-const float kMaxBubbleSizeToScreenRatio = 0.5f;
-
-// Inner padding in pixels for shelf view inside bubble.
-const int kPadding = 2;
-
-// Padding space in pixels between ShelfView's left/top edge to its contents.
-const int kShelfViewLeadingInset = 8;
-
-} // namespace
-
-OverflowBubbleView::OverflowBubbleView()
- : shelf_view_(NULL) {
-}
-
-OverflowBubbleView::~OverflowBubbleView() {
-}
-
-void OverflowBubbleView::InitOverflowBubble(views::View* anchor,
- ShelfView* shelf_view) {
- // set_anchor_view needs to be called before GetShelfLayoutManagerForLauncher
- // can be called.
- SetAnchorView(anchor);
- set_arrow(GetBubbleArrow());
- set_background(NULL);
- set_color(SkColorSetARGB(kLauncherBackgroundAlpha, 0, 0, 0));
- set_margins(gfx::Insets(kPadding, kPadding, kPadding, kPadding));
- set_move_with_anchor(true);
- // Overflow bubble should not get focus. If it get focus when it is shown,
- // active state item is changed to running state.
- set_use_focusless(true);
-
- // Makes bubble view has a layer and clip its children layers.
- SetPaintToLayer(true);
- SetFillsBoundsOpaquely(false);
- layer()->SetMasksToBounds(true);
-
- shelf_view_ = shelf_view;
- AddChildView(shelf_view_);
-
- set_parent_window(Shell::GetContainer(
- anchor->GetWidget()->GetNativeWindow()->GetRootWindow(),
- internal::kShellWindowId_ShelfBubbleContainer));
- views::BubbleDelegateView::CreateBubble(this);
-}
-
-bool OverflowBubbleView::IsHorizontalAlignment() const {
- ShelfLayoutManager* shelf_layout_manager = GetShelfLayoutManagerForLauncher();
- return shelf_layout_manager ?
- shelf_layout_manager->IsHorizontalAlignment() :
- false;
-}
-
-const gfx::Size OverflowBubbleView::GetContentsSize() const {
- return static_cast<views::View*>(shelf_view_)->GetPreferredSize();
-}
-
-// Gets arrow location based on shelf alignment.
-views::BubbleBorder::Arrow OverflowBubbleView::GetBubbleArrow() const {
- ShelfLayoutManager* shelf_layout_manager = GetShelfLayoutManagerForLauncher();
- return shelf_layout_manager ?
- shelf_layout_manager->SelectValueForShelfAlignment(
- views::BubbleBorder::BOTTOM_LEFT,
- views::BubbleBorder::LEFT_TOP,
- views::BubbleBorder::RIGHT_TOP,
- views::BubbleBorder::TOP_LEFT) :
- views::BubbleBorder::NONE;
-}
-
-void OverflowBubbleView::ScrollByXOffset(int x_offset) {
- const gfx::Rect visible_bounds(GetContentsBounds());
- const gfx::Size contents_size(GetContentsSize());
-
- DCHECK_GE(contents_size.width(), visible_bounds.width());
- int x = std::min(contents_size.width() - visible_bounds.width(),
- std::max(0, scroll_offset_.x() + x_offset));
- scroll_offset_.set_x(x);
-}
-
-void OverflowBubbleView::ScrollByYOffset(int y_offset) {
- const gfx::Rect visible_bounds(GetContentsBounds());
- const gfx::Size contents_size(GetContentsSize());
-
- DCHECK_GE(contents_size.width(), visible_bounds.width());
- int y = std::min(contents_size.height() - visible_bounds.height(),
- std::max(0, scroll_offset_.y() + y_offset));
- scroll_offset_.set_y(y);
-}
-
-gfx::Size OverflowBubbleView::GetPreferredSize() {
- gfx::Size preferred_size = GetContentsSize();
-
- const gfx::Rect monitor_rect = Shell::GetScreen()->GetDisplayNearestPoint(
- GetAnchorRect().CenterPoint()).work_area();
- if (!monitor_rect.IsEmpty()) {
- if (IsHorizontalAlignment()) {
- preferred_size.set_width(std::min(
- preferred_size.width(),
- static_cast<int>(monitor_rect.width() *
- kMaxBubbleSizeToScreenRatio)));
- } else {
- preferred_size.set_height(std::min(
- preferred_size.height(),
- static_cast<int>(monitor_rect.height() *
- kMaxBubbleSizeToScreenRatio)));
- }
- }
-
- return preferred_size;
-}
-
-void OverflowBubbleView::Layout() {
- shelf_view_->SetBoundsRect(gfx::Rect(
- gfx::PointAtOffsetFromOrigin(-scroll_offset_), GetContentsSize()));
-}
-
-void OverflowBubbleView::ChildPreferredSizeChanged(views::View* child) {
- // When contents size is changed, ContentsBounds should be updated before
- // calculating scroll offset.
- SizeToContents();
-
- // Ensures |shelf_view_| is still visible.
- if (IsHorizontalAlignment())
- ScrollByXOffset(0);
- else
- ScrollByYOffset(0);
- Layout();
-}
-
-bool OverflowBubbleView::OnMouseWheel(const ui::MouseWheelEvent& event) {
- // The MouseWheelEvent was changed to support both X and Y offsets
- // recently, but the behavior of this function was retained to continue
- // using Y offsets only. Might be good to simply scroll in both
- // directions as in OverflowBubbleView::OnScrollEvent.
- if (IsHorizontalAlignment())
- ScrollByXOffset(-event.y_offset());
- else
- ScrollByYOffset(-event.y_offset());
- Layout();
-
- return true;
-}
-
-ShelfLayoutManager*
-OverflowBubbleView::GetShelfLayoutManagerForLauncher() const {
- return GetAnchorView() ?
- ShelfLayoutManager::ForLauncher(
- GetAnchorView()->GetWidget()->GetNativeView()) :
- NULL;
-}
-
-void OverflowBubbleView::OnScrollEvent(ui::ScrollEvent* event) {
- ScrollByXOffset(-event->x_offset());
- ScrollByYOffset(-event->y_offset());
- Layout();
- event->SetHandled();
-}
-
-gfx::Rect OverflowBubbleView::GetBubbleBounds() {
- views::BubbleBorder* border = GetBubbleFrameView()->bubble_border();
- gfx::Insets bubble_insets = border->GetInsets();
-
- const int border_size =
- views::BubbleBorder::is_arrow_on_horizontal(arrow()) ?
- bubble_insets.left() : bubble_insets.top();
- const int arrow_offset = border_size + kPadding + kShelfViewLeadingInset +
- ShelfLayoutManager::GetPreferredShelfSize() / 2;
-
- const gfx::Size content_size = GetPreferredSize();
- border->set_arrow_offset(arrow_offset);
-
- const gfx::Rect anchor_rect = GetAnchorRect();
- gfx::Rect bubble_rect = GetBubbleFrameView()->GetUpdatedWindowBounds(
- anchor_rect,
- content_size,
- false);
-
- gfx::Rect monitor_rect = Shell::GetScreen()->GetDisplayNearestPoint(
- anchor_rect.CenterPoint()).work_area();
-
- int offset = 0;
- if (views::BubbleBorder::is_arrow_on_horizontal(arrow())) {
- if (bubble_rect.x() < monitor_rect.x())
- offset = monitor_rect.x() - bubble_rect.x();
- else if (bubble_rect.right() > monitor_rect.right())
- offset = monitor_rect.right() - bubble_rect.right();
-
- bubble_rect.Offset(offset, 0);
- border->set_arrow_offset(anchor_rect.CenterPoint().x() - bubble_rect.x());
- } else {
- if (bubble_rect.y() < monitor_rect.y())
- offset = monitor_rect.y() - bubble_rect.y();
- else if (bubble_rect.bottom() > monitor_rect.bottom())
- offset = monitor_rect.bottom() - bubble_rect.bottom();
-
- bubble_rect.Offset(0, offset);
- border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y());
- }
-
- GetBubbleFrameView()->SchedulePaint();
- return bubble_rect;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/shelf/overflow_bubble_view.h b/chromium/ash/shelf/overflow_bubble_view.h
deleted file mode 100644
index f5bfdc12050..00000000000
--- a/chromium/ash/shelf/overflow_bubble_view.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_OVERFLOW_BUBBLE_VIEW_H_
-#define ASH_SHELF_OVERFLOW_BUBBLE_VIEW_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/views/bubble/bubble_delegate.h"
-
-namespace ash {
-
-namespace test {
-class OverflowBubbleViewTestAPI;
-}
-
-namespace internal {
-
-class ShelfLayoutManager;
-class ShelfView;
-
-// OverflowBubbleView hosts a ShelfView to display overflown items.
-// Exports to access this class from OverflowBubbleViewTestAPI.
-class ASH_EXPORT OverflowBubbleView : public views::BubbleDelegateView {
- public:
- OverflowBubbleView();
- virtual ~OverflowBubbleView();
-
- void InitOverflowBubble(views::View* anchor, ShelfView* shelf_view);
-
- // views::BubbleDelegateView overrides:
- virtual gfx::Rect GetBubbleBounds() OVERRIDE;
-
- private:
- friend class test::OverflowBubbleViewTestAPI;
-
- bool IsHorizontalAlignment() const;
-
- const gfx::Size GetContentsSize() const;
-
- // Gets arrow location based on shelf alignment.
- views::BubbleBorder::Arrow GetBubbleArrow() const;
-
- void ScrollByXOffset(int x_offset);
- void ScrollByYOffset(int y_offset);
-
- // views::View overrides:
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE;
- virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE;
-
- // ui::EventHandler overrides:
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
-
- ShelfLayoutManager* GetShelfLayoutManagerForLauncher() const;
-
- ShelfView* shelf_view_; // Owned by views hierarchy.
- gfx::Vector2d scroll_offset_;
-
- DISALLOW_COPY_AND_ASSIGN(OverflowBubbleView);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SHELF_OVERFLOW_BUBBLE_VIEW_H_
diff --git a/chromium/ash/shelf/overflow_button.cc b/chromium/ash/shelf/overflow_button.cc
deleted file mode 100644
index 66d5476a8dc..00000000000
--- a/chromium/ash/shelf/overflow_button.cc
+++ /dev/null
@@ -1,175 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/overflow_button.h"
-
-#include "ash/ash_switches.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "third_party/skia/include/core/SkPaint.h"
-#include "third_party/skia/include/core/SkPath.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/animation/throb_animation.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/image/image_skia_operations.h"
-#include "ui/gfx/skbitmap_operations.h"
-#include "ui/gfx/skia_util.h"
-#include "ui/gfx/transform.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-const int kButtonHoverAlpha = 150;
-
-const int kButtonCornerRadius = 2;
-
-const int kButtonHoverSize = 28;
-
-const int kBackgroundOffset = (48 - kButtonHoverSize) / 2;
-
-} // namesapce
-
-OverflowButton::OverflowButton(views::ButtonListener* listener)
- : CustomButton(listener),
- bottom_image_(NULL) {
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- bottom_image_ = rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW).ToImageSkia();
-
-
- SetAccessibilityFocusable(true);
- SetAccessibleName(l10n_util::GetStringUTF16(IDS_ASH_SHELF_OVERFLOW_NAME));
-}
-
-OverflowButton::~OverflowButton() {}
-
-void OverflowButton::OnShelfAlignmentChanged() {
- SchedulePaint();
-}
-
-void OverflowButton::PaintBackground(gfx::Canvas* canvas, int alpha) {
- gfx::Rect bounds(GetContentsBounds());
- gfx::Rect rect(0, 0, kButtonHoverSize, kButtonHoverSize);
- ShelfLayoutManager* shelf =
- ShelfLayoutManager::ForLauncher(GetWidget()->GetNativeView());
-
- // Nudge the background a little to line up right.
- if (shelf->IsHorizontalAlignment()) {
- rect.set_origin(gfx::Point(
- bounds.x() + ((bounds.width() - kButtonHoverSize) / 2) - 1,
- bounds.y() + kBackgroundOffset - 1));
-
- } else {
- rect.set_origin(gfx::Point(
- bounds.x() + kBackgroundOffset - 1,
- bounds.y() + ((bounds.height() - kButtonHoverSize) / 2) - 1));
- }
-
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setStyle(SkPaint::kFill_Style);
- paint.setColor(SkColorSetARGB(
- kButtonHoverAlpha * hover_animation_->GetCurrentValue(),
- 0, 0, 0));
-
- const SkScalar radius = SkIntToScalar(kButtonCornerRadius);
- SkPath path;
- path.addRoundRect(gfx::RectToSkRect(rect), radius, radius);
- canvas->DrawPath(path, paint);
-}
-
-void OverflowButton::OnPaint(gfx::Canvas* canvas) {
- ShelfLayoutManager* layout_manager = ShelfLayoutManager::ForLauncher(
- GetWidget()->GetNativeView());
- ShelfAlignment alignment = layout_manager->GetAlignment();
-
- gfx::Rect bounds(GetContentsBounds());
- if (ash::switches::UseAlternateShelfLayout()) {
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- int background_image_id = 0;
- if (layout_manager->shelf_widget()->launcher()->IsShowingOverflowBubble())
- background_image_id = IDR_AURA_NOTIFICATION_BACKGROUND_PRESSED;
- else if(layout_manager->shelf_widget()->GetDimsShelf())
- background_image_id = IDR_AURA_NOTIFICATION_BACKGROUND_ON_BLACK;
- else
- background_image_id = IDR_AURA_NOTIFICATION_BACKGROUND_NORMAL;
-
- const gfx::ImageSkia* background =
- rb.GetImageNamed(background_image_id).ToImageSkia();
- if (alignment == SHELF_ALIGNMENT_LEFT) {
- bounds = gfx::Rect(
- bounds.right() - background->width() -
- ShelfLayoutManager::kShelfItemInset,
- bounds.y() + (bounds.height() - background->height()) / 2,
- background->width(), background->height());
- } else if (alignment == SHELF_ALIGNMENT_RIGHT) {
- bounds = gfx::Rect(
- bounds.x() + ShelfLayoutManager::kShelfItemInset,
- bounds.y() + (bounds.height() - background->height()) / 2,
- background->width(), background->height());
- } else {
- bounds = gfx::Rect(
- bounds.x() + (bounds.width() - background->width()) / 2,
- bounds.y() + ShelfLayoutManager::kShelfItemInset,
- background->width(), background->height());
- }
- canvas->DrawImageInt(*background, bounds.x(), bounds.y());
- } else {
- if (alignment == SHELF_ALIGNMENT_BOTTOM) {
- bounds = gfx::Rect(
- bounds.x() + ((bounds.width() - kButtonHoverSize) / 2) - 1,
- bounds.y() + kBackgroundOffset - 1,
- kButtonHoverSize, kButtonHoverSize);
- } else {
- bounds = gfx::Rect(
- bounds.x() + kBackgroundOffset -1,
- bounds.y() + ((bounds.height() - kButtonHoverSize) / 2) -1,
- kButtonHoverSize, kButtonHoverSize);
- }
- if (hover_animation_->is_animating()) {
- PaintBackground(
- canvas,
- kButtonHoverAlpha * hover_animation_->GetCurrentValue());
- } else if (state() == STATE_HOVERED || state() == STATE_PRESSED) {
- PaintBackground(canvas, kButtonHoverAlpha);
- }
- }
-
- if (height() < kButtonHoverSize)
- return;
-
- const gfx::ImageSkia* image = NULL;
-
- switch(alignment) {
- case SHELF_ALIGNMENT_LEFT:
- if (left_image_.isNull()) {
- left_image_ = gfx::ImageSkiaOperations::CreateRotatedImage(
- *bottom_image_, SkBitmapOperations::ROTATION_90_CW);
- }
- image = &left_image_;
- break;
- case SHELF_ALIGNMENT_RIGHT:
- if (right_image_.isNull()) {
- right_image_ = gfx::ImageSkiaOperations::CreateRotatedImage(
- *bottom_image_, SkBitmapOperations::ROTATION_270_CW);
- }
- image = &right_image_;
- break;
- default:
- image = bottom_image_;
- break;
- }
-
- canvas->DrawImageInt(*image,
- bounds.x() + ((bounds.width() - image->width()) / 2),
- bounds.y() + ((bounds.height() - image->height()) / 2));
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/shelf/overflow_button.h b/chromium/ash/shelf/overflow_button.h
deleted file mode 100644
index 9e7350550a4..00000000000
--- a/chromium/ash/shelf/overflow_button.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_OVERFLOW_BUTTON_H_
-#define ASH_SHELF_OVERFLOW_BUTTON_H_
-
-#include "ash/shelf/shelf_types.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/views/controls/button/custom_button.h"
-
-namespace ash {
-namespace internal {
-
-// Shelf overflow chevron button.
-class OverflowButton : public views::CustomButton {
- public:
- explicit OverflowButton(views::ButtonListener* listener);
- virtual ~OverflowButton();
-
- void OnShelfAlignmentChanged();
-
- private:
- void PaintBackground(gfx::Canvas* canvas, int alpha);
-
- // views::View overrides:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
-
- // Left and right images are rotations of bottom_image and are
- // owned by the overflow button.
- gfx::ImageSkia left_image_;
- gfx::ImageSkia right_image_;
- // Bottom image is owned by the resource bundle.
- const gfx::ImageSkia* bottom_image_;
-
- DISALLOW_COPY_AND_ASSIGN(OverflowButton);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SHELF_OVERFLOW_BUTTON_H_
diff --git a/chromium/ash/shelf/scoped_observer_with_duplicated_sources.h b/chromium/ash/shelf/scoped_observer_with_duplicated_sources.h
deleted file mode 100644
index c3267128f19..00000000000
--- a/chromium/ash/shelf/scoped_observer_with_duplicated_sources.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SCOPED_OBSERVER_WITH_DUPLICATED_SOURCES_H_
-#define ASH_SHELF_SCOPED_OBSERVER_WITH_DUPLICATED_SOURCES_H_
-
-#include <map>
-
-#include "base/basictypes.h"
-#include "base/logging.h"
-
-// ScopedObserverWithDuplicatedSources is used to keep track of the set of
-// sources an object has attached itself to as an observer. When
-// ScopedObserverWithDuplicatedSources is destroyed it removes the object as an
-// observer from all sources it has been added to.
-// ScopedObserverWithDuplicatedSources adds |observer| once for a particular
-// source, no matter how many times Add() is invoked. Additionaly |observer| is
-// only removed once Remove() is invoked the same number of times as Add().
-
-template <class Source, class Observer>
-class ScopedObserverWithDuplicatedSources {
- public:
- explicit ScopedObserverWithDuplicatedSources(Observer* observer)
- : observer_(observer) {}
-
- ~ScopedObserverWithDuplicatedSources() {
- typename SourceToAddCountMap::const_iterator iter =
- counted_sources_.begin();
- for (; iter != counted_sources_.end(); ++iter)
- iter->first->RemoveObserver(observer_);
- }
-
- // Adds the object passed to the constructor only once as an observer on
- // |source|.
- void Add(Source* source) {
- if (counted_sources_.find(source) == counted_sources_.end())
- source->AddObserver(observer_);
- counted_sources_[source]++;
- }
-
- // Only remove the object passed to the constructor as an observer from
- // |source| when Remove() is invoked the same number of times as Add().
- void Remove(Source* source) {
- typename SourceToAddCountMap::iterator iter =
- counted_sources_.find(source);
- DCHECK(iter != counted_sources_.end() && iter->second > 0);
-
- if (--iter->second == 0) {
- counted_sources_.erase(source);
- source->RemoveObserver(observer_);
- }
- }
-
- bool IsObserving(Source* source) const {
- return counted_sources_.find(source) != counted_sources_.end();
- }
-
- private:
- typedef std::map<Source*, int> SourceToAddCountMap;
-
- Observer* observer_;
-
- // Map Source and its adding count.
- std::map<Source*, int> counted_sources_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedObserverWithDuplicatedSources);
-};
-
-#endif // ASH_SHELF_SCOPED_OBSERVER_WITH_DUPLICATED_SOURCES_H_
diff --git a/chromium/ash/shelf/scoped_observer_with_duplicated_sources_unittest.cc b/chromium/ash/shelf/scoped_observer_with_duplicated_sources_unittest.cc
deleted file mode 100644
index 82d2b83b78b..00000000000
--- a/chromium/ash/shelf/scoped_observer_with_duplicated_sources_unittest.cc
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/scoped_observer_with_duplicated_sources.h"
-
-#include "base/memory/scoped_ptr.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-class TestObserver {
- public:
- TestObserver() {}
- ~TestObserver() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TestObserver);
-};
-
-class TestSource {
- public:
- TestSource() : observer_count_(0) {}
- ~TestSource() {}
-
- void AddObserver(TestObserver* observer) {
- observer_count_++;
- }
- void RemoveObserver(TestObserver* observer) {
- observer_count_--;
- }
-
- int GetObserverCount() {
- return observer_count_;
- }
-
- private:
- int observer_count_;
-
- DISALLOW_COPY_AND_ASSIGN(TestSource);
-};
-
-TEST(ScopedObserverWithDuplicatedSourcesTest, DuplicatedSource) {
- TestObserver observer;
- TestSource source1;
- TestSource source2;
-
- ScopedObserverWithDuplicatedSources<TestSource, TestObserver>
- observers(&observer);
- EXPECT_EQ(0, source1.GetObserverCount());
- EXPECT_FALSE(observers.IsObserving(&source1));
- EXPECT_EQ(0, source2.GetObserverCount());
- EXPECT_FALSE(observers.IsObserving(&source2));
-
- // Add |source1|.
- observers.Add(&source1);
- EXPECT_EQ(1, source1.GetObserverCount());
- EXPECT_TRUE(observers.IsObserving(&source1));
- // AddObserver of TestSource is called only once.
- observers.Add(&source1);
- EXPECT_EQ(1, source1.GetObserverCount());
- EXPECT_TRUE(observers.IsObserving(&source1));
-
- // Add |source2|.
- observers.Add(&source2);
- EXPECT_EQ(1, source2.GetObserverCount());
- EXPECT_TRUE(observers.IsObserving(&source2));
-
- // Remove |source1|.
- observers.Remove(&source1);
- EXPECT_EQ(1, source1.GetObserverCount());
- EXPECT_TRUE(observers.IsObserving(&source1));
-
- // Remove |source2|.
- observers.Remove(&source2);
- EXPECT_EQ(0, source2.GetObserverCount());
- EXPECT_FALSE(observers.IsObserving(&source2));
-
- // Remove |source1| again.
- observers.Remove(&source1);
- // In this time, |observer| is removed from |source1|.
- EXPECT_EQ(0, source1.GetObserverCount());
- EXPECT_FALSE(observers.IsObserving(&source1));
-}
diff --git a/chromium/ash/shelf/shelf_alignment_menu.cc b/chromium/ash/shelf/shelf_alignment_menu.cc
deleted file mode 100644
index 3f77da133a5..00000000000
--- a/chromium/ash/shelf/shelf_alignment_menu.cc
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_alignment_menu.h"
-
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/shell.h"
-#include "grit/ash_strings.h"
-#include "ui/aura/window.h"
-#include "ui/base/l10n/l10n_util.h"
-
-namespace ash {
-
-ShelfAlignmentMenu::ShelfAlignmentMenu(aura::Window* root)
- : ui::SimpleMenuModel(NULL),
- root_window_(root) {
- DCHECK(root_window_);
- int align_group_id = 1;
- set_delegate(this);
- AddRadioItemWithStringId(MENU_ALIGN_LEFT,
- IDS_ASH_SHELF_CONTEXT_MENU_ALIGN_LEFT,
- align_group_id);
- AddRadioItemWithStringId(MENU_ALIGN_BOTTOM,
- IDS_ASH_SHELF_CONTEXT_MENU_ALIGN_BOTTOM,
- align_group_id);
- AddRadioItemWithStringId(MENU_ALIGN_RIGHT,
- IDS_ASH_SHELF_CONTEXT_MENU_ALIGN_RIGHT,
- align_group_id);
-}
-
-ShelfAlignmentMenu::~ShelfAlignmentMenu() {}
-
-bool ShelfAlignmentMenu::IsCommandIdChecked(int command_id) const {
- return internal::ShelfLayoutManager::ForLauncher(root_window_)->
- SelectValueForShelfAlignment(
- MENU_ALIGN_BOTTOM == command_id,
- MENU_ALIGN_LEFT == command_id,
- MENU_ALIGN_RIGHT == command_id,
- false);
-}
-
-bool ShelfAlignmentMenu::IsCommandIdEnabled(int command_id) const {
- return true;
-}
-
-bool ShelfAlignmentMenu::GetAcceleratorForCommandId(
- int command_id,
- ui::Accelerator* accelerator) {
- return false;
-}
-
-void ShelfAlignmentMenu::ExecuteCommand(int command_id, int event_flags) {
- switch (static_cast<MenuItem>(command_id)) {
- case MENU_ALIGN_LEFT:
- Shell::GetInstance()->metrics()->
- RecordUserMetricsAction(UMA_SHELF_ALIGNMENT_SET_LEFT);
- Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_LEFT,
- root_window_);
- break;
- case MENU_ALIGN_BOTTOM:
- Shell::GetInstance()->metrics()->
- RecordUserMetricsAction(UMA_SHELF_ALIGNMENT_SET_BOTTOM);
- Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_BOTTOM,
- root_window_);
- break;
- case MENU_ALIGN_RIGHT:
- Shell::GetInstance()->metrics()->
- RecordUserMetricsAction(UMA_SHELF_ALIGNMENT_SET_RIGHT);
- Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_RIGHT,
- root_window_);
- break;
- }
-}
-
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_alignment_menu.h b/chromium/ash/shelf/shelf_alignment_menu.h
deleted file mode 100644
index e7acce28315..00000000000
--- a/chromium/ash/shelf/shelf_alignment_menu.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_ALIGNMENT_MENU_H_
-#define ASH_SHELF_SHELF_ALIGNMENT_MENU_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "ui/base/models/simple_menu_model.h"
-
-namespace aura {
-class RootWindow;
-}
-
-namespace ash {
-
-// Submenu for choosing the alignment of the launcher.
-class ASH_EXPORT ShelfAlignmentMenu : public ui::SimpleMenuModel,
- public ui::SimpleMenuModel::Delegate {
- public:
- explicit ShelfAlignmentMenu(aura::Window* root);
- virtual ~ShelfAlignmentMenu();
-
- // ui::SimpleMenuModel::Delegate overrides:
- virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
- virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
- virtual bool GetAcceleratorForCommandId(
- int command_id,
- ui::Accelerator* accelerator) OVERRIDE;
- virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
-
- private:
- enum MenuItem {
- // Offset so as not to interfere with other menus.
- MENU_ALIGN_LEFT = 500,
- MENU_ALIGN_RIGHT,
- MENU_ALIGN_BOTTOM,
- };
-
- aura::Window* root_window_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfAlignmentMenu);
-};
-
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_ALIGNMENT_MENU_H_
diff --git a/chromium/ash/shelf/shelf_bezel_event_filter.cc b/chromium/ash/shelf/shelf_bezel_event_filter.cc
deleted file mode 100644
index 2c4f6485cd4..00000000000
--- a/chromium/ash/shelf/shelf_bezel_event_filter.cc
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_bezel_event_filter.h"
-
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shell.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ui/aura/window.h"
-
-namespace ash {
-namespace internal {
-
-ShelfBezelEventFilter::ShelfBezelEventFilter(
- ShelfLayoutManager* shelf)
- : shelf_(shelf),
- in_touch_drag_(false) {
- Shell::GetInstance()->AddPreTargetHandler(this);
-}
-
-ShelfBezelEventFilter::~ShelfBezelEventFilter() {
- Shell::GetInstance()->RemovePreTargetHandler(this);
-}
-
-void ShelfBezelEventFilter::OnGestureEvent(
- ui::GestureEvent* event) {
- gfx::Point point_in_screen(event->location());
- aura::Window* target = static_cast<aura::Window*>(event->target());
- wm::ConvertPointToScreen(target, &point_in_screen);
- gfx::Rect screen =
- Shell::GetScreen()->GetDisplayNearestPoint(point_in_screen).bounds();
- if ((!screen.Contains(point_in_screen) &&
- IsShelfOnBezel(screen, point_in_screen)) ||
- in_touch_drag_) {
- if (gesture_handler_.ProcessGestureEvent(*event)) {
- switch (event->type()) {
- case ui::ET_GESTURE_SCROLL_BEGIN:
- in_touch_drag_ = true;
- break;
- case ui::ET_GESTURE_SCROLL_END:
- case ui::ET_SCROLL_FLING_START:
- in_touch_drag_ = false;
- break;
- default:
- break;
- }
- event->StopPropagation();
- }
- }
-}
-
-bool ShelfBezelEventFilter::IsShelfOnBezel(
- const gfx::Rect& screen,
- const gfx::Point& point) const{
- switch (shelf_->GetAlignment()) {
- case SHELF_ALIGNMENT_BOTTOM:
- if (point.y() >= screen.bottom())
- return true;
- break;
- case SHELF_ALIGNMENT_LEFT:
- if (point.x() <= screen.x())
- return true;
- break;
- case SHELF_ALIGNMENT_TOP:
- if (point.y() <= screen.y())
- return true;
- break;
- case SHELF_ALIGNMENT_RIGHT:
- if (point.x() >= screen.right())
- return true;
- break;
- }
- return false;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_bezel_event_filter.h b/chromium/ash/shelf/shelf_bezel_event_filter.h
deleted file mode 100644
index 33d1f5e35b8..00000000000
--- a/chromium/ash/shelf/shelf_bezel_event_filter.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_BEZEL_EVENT_FILTER_H_
-#define ASH_SHELF_SHELF_BEZEL_EVENT_FILTER_H_
-
-#include "ash/wm/gestures/shelf_gesture_handler.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/rect.h"
-
-namespace ash {
-namespace internal {
-class ShelfLayoutManager;
-
-// Detects and forwards touch gestures that occur on a bezel sensor to the
-// shelf.
-class ShelfBezelEventFilter : public ui::EventHandler {
- public:
- explicit ShelfBezelEventFilter(ShelfLayoutManager* shelf);
- virtual ~ShelfBezelEventFilter();
-
- // Overridden from ui::EventHandler:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- private:
- bool IsShelfOnBezel(const gfx::Rect& screen,
- const gfx::Point& point) const;
-
- ShelfLayoutManager* shelf_; // non-owned
- bool in_touch_drag_;
- ShelfGestureHandler gesture_handler_;
- DISALLOW_COPY_AND_ASSIGN(ShelfBezelEventFilter);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_BEZEL_EVENT_FILTER_H_
diff --git a/chromium/ash/shelf/shelf_button.cc b/chromium/ash/shelf/shelf_button.cc
deleted file mode 100644
index dd3e3e90f6a..00000000000
--- a/chromium/ash/shelf/shelf_button.cc
+++ /dev/null
@@ -1,594 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_button.h"
-
-#include <algorithm>
-
-#include "ash/ash_constants.h"
-#include "ash/ash_switches.h"
-#include "ash/shelf/shelf_button_host.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "grit/ash_resources.h"
-#include "skia/ext/image_operations.h"
-#include "ui/base/accessibility/accessible_view_state.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/events/event_constants.h"
-#include "ui/gfx/animation/animation_delegate.h"
-#include "ui/gfx/animation/throb_animation.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/image/image.h"
-#include "ui/gfx/image/image_skia_operations.h"
-#include "ui/gfx/skbitmap_operations.h"
-#include "ui/views/controls/image_view.h"
-
-namespace {
-
-// Size of the bar. This is along the opposite axis of the shelf. For example,
-// if the shelf is aligned horizontally then this is the height of the bar.
-const int kBarSize = 3;
-const int kIconSize = 32;
-const int kHopSpacing = 2;
-const int kIconPad = 8;
-const int kAlternateIconPad = 5;
-const int kAlternateIconPadVertical = 6;
-const int kHopUpMS = 0;
-const int kHopDownMS = 200;
-const int kAttentionThrobDurationMS = 800;
-
-bool ShouldHop(int state) {
- return state & ash::internal::ShelfButton::STATE_HOVERED ||
- state & ash::internal::ShelfButton::STATE_ACTIVE ||
- state & ash::internal::ShelfButton::STATE_FOCUSED;
-}
-
-// Simple AnimationDelegate that owns a single ThrobAnimation instance to
-// keep all Draw Attention animations in sync.
-class ShelfButtonAnimation : public gfx::AnimationDelegate {
- public:
- class Observer {
- public:
- virtual void AnimationProgressed() = 0;
-
- protected:
- virtual ~Observer() {}
- };
-
- static ShelfButtonAnimation* GetInstance() {
- static ShelfButtonAnimation* s_instance = new ShelfButtonAnimation();
- return s_instance;
- }
-
- void AddObserver(Observer* observer) {
- observers_.AddObserver(observer);
- }
-
- void RemoveObserver(Observer* observer) {
- observers_.RemoveObserver(observer);
- if (!observers_.might_have_observers())
- animation_.Stop();
- }
-
- int GetAlpha() {
- return GetThrobAnimation().CurrentValueBetween(0, 255);
- }
-
- double GetAnimation() {
- return GetThrobAnimation().GetCurrentValue();
- }
-
- private:
- ShelfButtonAnimation()
- : animation_(this) {
- animation_.SetThrobDuration(kAttentionThrobDurationMS);
- animation_.SetTweenType(gfx::Tween::SMOOTH_IN_OUT);
- }
-
- virtual ~ShelfButtonAnimation() {
- }
-
- gfx::ThrobAnimation& GetThrobAnimation() {
- if (!animation_.is_animating()) {
- animation_.Reset();
- animation_.StartThrobbing(-1 /*throb indefinitely*/);
- }
- return animation_;
- }
-
- // gfx::AnimationDelegate
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE {
- if (animation != &animation_)
- return;
- if (!animation_.is_animating())
- return;
- FOR_EACH_OBSERVER(Observer, observers_, AnimationProgressed());
- }
-
- gfx::ThrobAnimation animation_;
- ObserverList<Observer> observers_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfButtonAnimation);
-};
-
-} // namespace
-
-namespace ash {
-namespace internal {
-
-////////////////////////////////////////////////////////////////////////////////
-// ShelfButton::BarView
-
-class ShelfButton::BarView : public views::ImageView,
- public ShelfButtonAnimation::Observer {
- public:
- BarView(ShelfButton* host)
- : host_(host),
- show_attention_(false) {
- }
-
- virtual ~BarView() {
- if (show_attention_)
- ShelfButtonAnimation::GetInstance()->RemoveObserver(this);
- }
-
- // View
- virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE {
- // Allow Mouse...() messages to go to the parent view.
- return false;
- }
-
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- if (show_attention_) {
- int alpha = ShelfButtonAnimation::GetInstance()->GetAlpha();
- canvas->SaveLayerAlpha(alpha);
- views::ImageView::OnPaint(canvas);
- canvas->Restore();
- } else {
- views::ImageView::OnPaint(canvas);
- }
- }
-
- // ShelfButtonAnimation::Observer
- virtual void AnimationProgressed() OVERRIDE {
- UpdateBounds();
- SchedulePaint();
- }
-
- void SetBarBoundsRect(const gfx::Rect& bounds) {
- base_bounds_ = bounds;
- UpdateBounds();
- }
-
- void ShowAttention(bool show) {
- if (show_attention_ != show) {
- show_attention_ = show;
- if (show_attention_)
- ShelfButtonAnimation::GetInstance()->AddObserver(this);
- else
- ShelfButtonAnimation::GetInstance()->RemoveObserver(this);
- }
- UpdateBounds();
- }
-
- private:
- void UpdateBounds() {
- gfx::Rect bounds = base_bounds_;
- if (show_attention_) {
- // Scale from .35 to 1.0 of the total width (which is wider than the
- // visible width of the image, so the animation "rests" briefly at full
- // visible width.
- double animation = ShelfButtonAnimation::GetInstance()->GetAnimation();
- double scale = (.35 + .65 * animation);
- if (host_->shelf_layout_manager()->GetAlignment() ==
- SHELF_ALIGNMENT_BOTTOM) {
- bounds.set_width(base_bounds_.width() * scale);
- int x_offset = (base_bounds_.width() - bounds.width()) / 2;
- bounds.set_x(base_bounds_.x() + x_offset);
- } else {
- bounds.set_height(base_bounds_.height() * scale);
- int y_offset = (base_bounds_.height() - bounds.height()) / 2;
- bounds.set_y(base_bounds_.y() + y_offset);
- }
- }
- SetBoundsRect(bounds);
- }
-
- ShelfButton* host_;
- bool show_attention_;
- gfx::Rect base_bounds_;
-
- DISALLOW_COPY_AND_ASSIGN(BarView);
-};
-
-////////////////////////////////////////////////////////////////////////////////
-// ShelfButton::IconView
-
-ShelfButton::IconView::IconView() : icon_size_(kIconSize) {
-}
-
-ShelfButton::IconView::~IconView() {
-}
-
-bool ShelfButton::IconView::HitTestRect(const gfx::Rect& rect) const {
- // Return false so that ShelfButton gets all the mouse events.
- return false;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// ShelfButton
-
-ShelfButton* ShelfButton::Create(views::ButtonListener* listener,
- ShelfButtonHost* host,
- ShelfLayoutManager* shelf_layout_manager) {
- ShelfButton* button = new ShelfButton(listener, host, shelf_layout_manager);
- button->Init();
- return button;
-}
-
-ShelfButton::ShelfButton(views::ButtonListener* listener,
- ShelfButtonHost* host,
- ShelfLayoutManager* shelf_layout_manager)
- : CustomButton(listener),
- host_(host),
- icon_view_(NULL),
- bar_(new BarView(this)),
- state_(STATE_NORMAL),
- shelf_layout_manager_(shelf_layout_manager),
- destroyed_flag_(NULL) {
- SetAccessibilityFocusable(true);
-
- const gfx::ShadowValue kShadows[] = {
- gfx::ShadowValue(gfx::Point(0, 2), 0, SkColorSetARGB(0x1A, 0, 0, 0)),
- gfx::ShadowValue(gfx::Point(0, 3), 1, SkColorSetARGB(0x1A, 0, 0, 0)),
- gfx::ShadowValue(gfx::Point(0, 0), 1, SkColorSetARGB(0x54, 0, 0, 0)),
- };
- icon_shadows_.assign(kShadows, kShadows + arraysize(kShadows));
-
- AddChildView(bar_);
-}
-
-ShelfButton::~ShelfButton() {
- if (destroyed_flag_)
- *destroyed_flag_ = true;
-}
-
-void ShelfButton::SetShadowedImage(const gfx::ImageSkia& image) {
- icon_view_->SetImage(gfx::ImageSkiaOperations::CreateImageWithDropShadow(
- image, icon_shadows_));
-}
-
-void ShelfButton::SetImage(const gfx::ImageSkia& image) {
- if (image.isNull()) {
- // TODO: need an empty image.
- icon_view_->SetImage(image);
- return;
- }
-
- if (icon_view_->icon_size() == 0) {
- SetShadowedImage(image);
- return;
- }
-
- // Resize the image maintaining our aspect ratio.
- int pref = icon_view_->icon_size();
- float aspect_ratio =
- static_cast<float>(image.width()) / static_cast<float>(image.height());
- int height = pref;
- int width = static_cast<int>(aspect_ratio * height);
- if (width > pref) {
- width = pref;
- height = static_cast<int>(width / aspect_ratio);
- }
-
- if (width == image.width() && height == image.height()) {
- SetShadowedImage(image);
- return;
- }
-
- SetShadowedImage(gfx::ImageSkiaOperations::CreateResizedImage(image,
- skia::ImageOperations::RESIZE_BEST, gfx::Size(width, height)));
-}
-
-const gfx::ImageSkia& ShelfButton::GetImage() const {
- return icon_view_->GetImage();
-}
-
-void ShelfButton::AddState(State state) {
- if (!(state_ & state)) {
- if (!ash::switches::UseAlternateShelfLayout() &&
- (ShouldHop(state) || !ShouldHop(state_))) {
- ui::ScopedLayerAnimationSettings scoped_setter(
- icon_view_->layer()->GetAnimator());
- scoped_setter.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kHopUpMS));
- }
- state_ |= state;
- Layout();
- if (state & STATE_ATTENTION)
- bar_->ShowAttention(true);
- }
-}
-
-void ShelfButton::ClearState(State state) {
- if (state_ & state) {
- if (!ash::switches::UseAlternateShelfLayout() &&
- (!ShouldHop(state) || ShouldHop(state_))) {
- ui::ScopedLayerAnimationSettings scoped_setter(
- icon_view_->layer()->GetAnimator());
- scoped_setter.SetTweenType(gfx::Tween::LINEAR);
- scoped_setter.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kHopDownMS));
- }
- state_ &= ~state;
- Layout();
- if (state & STATE_ATTENTION)
- bar_->ShowAttention(false);
- }
-}
-
-gfx::Rect ShelfButton::GetIconBounds() const {
- return icon_view_->bounds();
-}
-
-void ShelfButton::ShowContextMenu(const gfx::Point& p,
- ui::MenuSourceType source_type) {
- if (!context_menu_controller())
- return;
-
- bool destroyed = false;
- destroyed_flag_ = &destroyed;
-
- CustomButton::ShowContextMenu(p, source_type);
-
- if (!destroyed) {
- destroyed_flag_ = NULL;
- // The menu will not propagate mouse events while its shown. To address,
- // the hover state gets cleared once the menu was shown (and this was not
- // destroyed).
- ClearState(STATE_HOVERED);
- }
-}
-
-bool ShelfButton::OnMousePressed(const ui::MouseEvent& event) {
- CustomButton::OnMousePressed(event);
- host_->PointerPressedOnButton(this, ShelfButtonHost::MOUSE, event);
- return true;
-}
-
-void ShelfButton::OnMouseReleased(const ui::MouseEvent& event) {
- CustomButton::OnMouseReleased(event);
- host_->PointerReleasedOnButton(this, ShelfButtonHost::MOUSE, false);
-}
-
-void ShelfButton::OnMouseCaptureLost() {
- ClearState(STATE_HOVERED);
- host_->PointerReleasedOnButton(this, ShelfButtonHost::MOUSE, true);
- CustomButton::OnMouseCaptureLost();
-}
-
-bool ShelfButton::OnMouseDragged(const ui::MouseEvent& event) {
- CustomButton::OnMouseDragged(event);
- host_->PointerDraggedOnButton(this, ShelfButtonHost::MOUSE, event);
- return true;
-}
-
-void ShelfButton::OnMouseMoved(const ui::MouseEvent& event) {
- CustomButton::OnMouseMoved(event);
- host_->MouseMovedOverButton(this);
-}
-
-void ShelfButton::OnMouseEntered(const ui::MouseEvent& event) {
- AddState(STATE_HOVERED);
- CustomButton::OnMouseEntered(event);
- host_->MouseEnteredButton(this);
-}
-
-void ShelfButton::OnMouseExited(const ui::MouseEvent& event) {
- ClearState(STATE_HOVERED);
- CustomButton::OnMouseExited(event);
- host_->MouseExitedButton(this);
-}
-
-void ShelfButton::GetAccessibleState(ui::AccessibleViewState* state) {
- state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
- state->name = host_->GetAccessibleName(this);
-}
-
-void ShelfButton::Layout() {
- const gfx::Rect button_bounds(GetContentsBounds());
- int icon_pad = kIconPad;
- if (ash::switches::UseAlternateShelfLayout()) {
- icon_pad =
- shelf_layout_manager_->GetAlignment() != SHELF_ALIGNMENT_BOTTOM ?
- kAlternateIconPadVertical : kAlternateIconPad;
- }
- int x_offset = shelf_layout_manager_->PrimaryAxisValue(0, icon_pad);
- int y_offset = shelf_layout_manager_->PrimaryAxisValue(icon_pad, 0);
-
- int icon_width = std::min(kIconSize,
- button_bounds.width() - x_offset);
- int icon_height = std::min(kIconSize,
- button_bounds.height() - y_offset);
-
- // If on the left or top 'invert' the inset so the constant gap is on
- // the interior (towards the center of display) edge of the shelf.
- if (SHELF_ALIGNMENT_LEFT == shelf_layout_manager_->GetAlignment())
- x_offset = button_bounds.width() - (kIconSize + icon_pad);
-
- if (SHELF_ALIGNMENT_TOP == shelf_layout_manager_->GetAlignment())
- y_offset = button_bounds.height() - (kIconSize + icon_pad);
-
- if (ShouldHop(state_) && !ash::switches::UseAlternateShelfLayout()) {
- x_offset += shelf_layout_manager_->SelectValueForShelfAlignment(
- 0, kHopSpacing, -kHopSpacing, 0);
- y_offset += shelf_layout_manager_->SelectValueForShelfAlignment(
- -kHopSpacing, 0, 0, kHopSpacing);
- }
-
- // Center icon with respect to the secondary axis, and ensure
- // that the icon doesn't occlude the bar highlight.
- if (shelf_layout_manager_->IsHorizontalAlignment()) {
- x_offset = std::max(0, button_bounds.width() - icon_width) / 2;
- if (y_offset + icon_height + kBarSize > button_bounds.height())
- icon_height = button_bounds.height() - (y_offset + kBarSize);
- } else {
- y_offset = std::max(0, button_bounds.height() - icon_height) / 2;
- if (x_offset + icon_width + kBarSize > button_bounds.width())
- icon_width = button_bounds.width() - (x_offset + kBarSize);
- }
-
- icon_view_->SetBoundsRect(gfx::Rect(
- button_bounds.x() + x_offset,
- button_bounds.y() + y_offset,
- icon_width,
- icon_height));
-
- // Icon size has been incorrect when running
- // PanelLayoutManagerTest.PanelAlignmentSecondDisplay on valgrind bot, see
- // http://crbug.com/234854.
- DCHECK_LE(icon_width, kIconSize);
- DCHECK_LE(icon_height, kIconSize);
-
- bar_->SetBarBoundsRect(button_bounds);
-
- UpdateState();
-}
-
-void ShelfButton::ChildPreferredSizeChanged(views::View* child) {
- Layout();
-}
-
-void ShelfButton::OnFocus() {
- AddState(STATE_FOCUSED);
- CustomButton::OnFocus();
-}
-
-void ShelfButton::OnBlur() {
- ClearState(STATE_FOCUSED);
- CustomButton::OnBlur();
-}
-
-void ShelfButton::OnPaint(gfx::Canvas* canvas) {
- CustomButton::OnPaint(canvas);
- if (HasFocus()) {
- gfx::Rect paint_bounds(GetLocalBounds());
- paint_bounds.Inset(1, 1, 1, 1);
- canvas->DrawSolidFocusRect(paint_bounds, kFocusBorderColor);
- }
-}
-
-void ShelfButton::OnGestureEvent(ui::GestureEvent* event) {
- switch (event->type()) {
- case ui::ET_GESTURE_TAP_DOWN:
- AddState(STATE_HOVERED);
- return CustomButton::OnGestureEvent(event);
- case ui::ET_GESTURE_END:
- ClearState(STATE_HOVERED);
- return CustomButton::OnGestureEvent(event);
- case ui::ET_GESTURE_SCROLL_BEGIN:
- host_->PointerPressedOnButton(this, ShelfButtonHost::TOUCH, *event);
- event->SetHandled();
- return;
- case ui::ET_GESTURE_SCROLL_UPDATE:
- host_->PointerDraggedOnButton(this, ShelfButtonHost::TOUCH, *event);
- event->SetHandled();
- return;
- case ui::ET_GESTURE_SCROLL_END:
- case ui::ET_SCROLL_FLING_START:
- host_->PointerReleasedOnButton(this, ShelfButtonHost::TOUCH, false);
- event->SetHandled();
- return;
- default:
- return CustomButton::OnGestureEvent(event);
- }
-}
-
-void ShelfButton::Init() {
- icon_view_ = CreateIconView();
-
- // TODO: refactor the layers so each button doesn't require 2.
- icon_view_->SetPaintToLayer(true);
- icon_view_->SetFillsBoundsOpaquely(false);
- icon_view_->SetHorizontalAlignment(views::ImageView::CENTER);
- icon_view_->SetVerticalAlignment(views::ImageView::LEADING);
-
- AddChildView(icon_view_);
-}
-
-ShelfButton::IconView* ShelfButton::CreateIconView() {
- return new IconView;
-}
-
-bool ShelfButton::IsShelfHorizontal() const {
- return shelf_layout_manager_->IsHorizontalAlignment();
-}
-
-void ShelfButton::UpdateState() {
- UpdateBar();
-
- icon_view_->SetHorizontalAlignment(
- shelf_layout_manager_->PrimaryAxisValue(views::ImageView::CENTER,
- views::ImageView::LEADING));
- icon_view_->SetVerticalAlignment(
- shelf_layout_manager_->PrimaryAxisValue(views::ImageView::LEADING,
- views::ImageView::CENTER));
- SchedulePaint();
-}
-
-void ShelfButton::UpdateBar() {
- if (state_ & STATE_HIDDEN) {
- bar_->SetVisible(false);
- return;
- }
-
- int bar_id = 0;
- if (ash::switches::UseAlternateShelfLayout()) {
- if (state_ & STATE_ACTIVE)
- bar_id = IDR_AURA_LAUNCHER_UNDERLINE_ACTIVE_ALTERNATE;
- else if (state_ & STATE_RUNNING)
- bar_id = IDR_AURA_LAUNCHER_UNDERLINE_RUNNING_ALTERNATE;
- } else {
- if (state_ & (STATE_ACTIVE | STATE_ATTENTION))
- bar_id = IDR_AURA_LAUNCHER_UNDERLINE_ACTIVE;
- else if (state_ & (STATE_HOVERED | STATE_FOCUSED))
- bar_id = IDR_AURA_LAUNCHER_UNDERLINE_HOVER;
- else
- bar_id = IDR_AURA_LAUNCHER_UNDERLINE_RUNNING;
- }
-
- if (bar_id != 0) {
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- const gfx::ImageSkia* image = rb.GetImageNamed(bar_id).ToImageSkia();
- if (shelf_layout_manager_->GetAlignment() == SHELF_ALIGNMENT_BOTTOM) {
- bar_->SetImage(*image);
- } else {
- bar_->SetImage(gfx::ImageSkiaOperations::CreateRotatedImage(*image,
- shelf_layout_manager_->SelectValueForShelfAlignment(
- SkBitmapOperations::ROTATION_90_CW,
- SkBitmapOperations::ROTATION_90_CW,
- SkBitmapOperations::ROTATION_270_CW,
- SkBitmapOperations::ROTATION_180_CW)));
- }
- bar_->SetHorizontalAlignment(
- shelf_layout_manager_->SelectValueForShelfAlignment(
- views::ImageView::CENTER,
- views::ImageView::LEADING,
- views::ImageView::TRAILING,
- views::ImageView::CENTER));
- bar_->SetVerticalAlignment(
- shelf_layout_manager_->SelectValueForShelfAlignment(
- views::ImageView::TRAILING,
- views::ImageView::CENTER,
- views::ImageView::CENTER,
- views::ImageView::LEADING));
- bar_->SchedulePaint();
- }
-
- bar_->SetVisible(bar_id != 0 && state_ != STATE_NORMAL);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_button.h b/chromium/ash/shelf/shelf_button.h
deleted file mode 100644
index 60158f2ea95..00000000000
--- a/chromium/ash/shelf/shelf_button.h
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_BUTTON_H_
-#define ASH_SHELF_SHELF_BUTTON_H_
-
-#include "ash/ash_export.h"
-#include "ui/gfx/shadow_value.h"
-#include "ui/views/controls/button/custom_button.h"
-#include "ui/views/controls/image_view.h"
-
-namespace ash {
-namespace internal {
-
-class ShelfButtonHost;
-class ShelfLayoutManager;
-
-// Button used for items on the launcher, except for the AppList.
-class ASH_EXPORT ShelfButton : public views::CustomButton {
- public:
- // Used to indicate the current state of the button.
- enum State {
- // Nothing special. Usually represents an app shortcut item with no running
- // instance.
- STATE_NORMAL = 0,
- // Button has mouse hovering on it.
- STATE_HOVERED = 1 << 0,
- // Underlying LauncherItem has a running instance.
- STATE_RUNNING = 1 << 1,
- // Underlying LauncherItem is active (i.e. has focus).
- STATE_ACTIVE = 1 << 2,
- // Underlying LauncherItem needs user's attention.
- STATE_ATTENTION = 1 << 3,
- STATE_FOCUSED = 1 << 4,
- // Hide the status (temporarily for some animations).
- STATE_HIDDEN = 1 << 5,
- };
-
- virtual ~ShelfButton();
-
- // Called to create an instance of a ShelfButton.
- static ShelfButton* Create(views::ButtonListener* listener,
- ShelfButtonHost* host,
- ShelfLayoutManager* shelf_layout_manager);
-
- // Sets the image to display for this entry.
- void SetImage(const gfx::ImageSkia& image);
-
- // Retrieve the image to show proxy operations.
- const gfx::ImageSkia& GetImage() const;
-
- // |state| is or'd into the current state.
- void AddState(State state);
- void ClearState(State state);
- int state() const { return state_; }
- const ShelfLayoutManager* shelf_layout_manager() const {
- return shelf_layout_manager_;
- }
-
- // Returns the bounds of the icon.
- gfx::Rect GetIconBounds() const;
-
- // Overrides to views::CustomButton:
- virtual void ShowContextMenu(const gfx::Point& p,
- ui::MenuSourceType source_type) OVERRIDE;
-
- // View override - needed by unit test.
- virtual void OnMouseCaptureLost() OVERRIDE;
-
- protected:
- ShelfButton(views::ButtonListener* listener,
- ShelfButtonHost* host,
- ShelfLayoutManager* shelf_layout_manager);
-
- // Class that draws the icon part of a button, so it can be animated
- // independently of the rest. This can be subclassed to provide a custom
- // implementation, by overriding CreateIconView().
- class IconView : public views::ImageView {
- public:
- IconView();
- virtual ~IconView();
-
- void set_icon_size(int icon_size) { icon_size_ = icon_size; }
- int icon_size() const { return icon_size_; }
-
- // views::View overrides.
- virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE;
-
- private:
- // Set to non-zero to force icons to be resized to fit within a square,
- // while maintaining original proportions.
- int icon_size_;
-
- DISALLOW_COPY_AND_ASSIGN(IconView);
- };
-
- // View overrides:
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
-
- // ui::EventHandler overrides:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- // Sets the icon image with a shadow.
- void SetShadowedImage(const gfx::ImageSkia& bitmap);
- // Override for custom initialization.
- virtual void Init();
- // Override to subclass IconView.
- virtual IconView* CreateIconView();
- IconView* icon_view() const { return icon_view_; }
- ShelfButtonHost* host() const { return host_; }
-
- private:
- class BarView;
-
- // Returns true if the shelf is horizontal. If this returns false the shelf is
- // vertical.
- bool IsShelfHorizontal() const;
-
- // Updates the parts of the button to reflect the current |state_| and
- // alignment. This may add or remove views, layout and paint.
- void UpdateState();
-
- // Updates the status bar (bitmap, orientation, visibility).
- void UpdateBar();
-
- ShelfButtonHost* host_;
- IconView* icon_view_;
- // Draws a bar underneath the image to represent the state of the application.
- BarView* bar_;
- // The current state of the application, multiple values of AppState are or'd
- // together.
- int state_;
-
- ShelfLayoutManager* shelf_layout_manager_;
-
- gfx::ShadowValues icon_shadows_;
-
- // If non-null the destuctor sets this to true. This is set while the menu is
- // showing and used to detect if the menu was deleted while running.
- bool* destroyed_flag_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfButton);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_BUTTON_H_
diff --git a/chromium/ash/shelf/shelf_button_host.h b/chromium/ash/shelf/shelf_button_host.h
deleted file mode 100644
index d3b3fa25c59..00000000000
--- a/chromium/ash/shelf/shelf_button_host.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_BUTTON_HOST_H_
-#define ASH_SHELF_SHELF_BUTTON_HOST_H_
-
-#include "ash/ash_export.h"
-#include "base/strings/string16.h"
-
-namespace ui {
-class LocatedEvent;
-}
-
-namespace views {
-class View;
-}
-
-namespace ash {
-namespace internal {
-
-// The shelf buttons communicate back to the host by way of this interface.
-// This interface is used to enable reordering the items on the shelf.
-class ASH_EXPORT ShelfButtonHost {
- public:
- enum Pointer {
- NONE,
- DRAG_AND_DROP,
- MOUSE,
- TOUCH,
- };
-
- // Invoked when a pointer device is pressed on a view.
- virtual void PointerPressedOnButton(views::View* view,
- Pointer pointer,
- const ui::LocatedEvent& event) = 0;
-
- // Invoked when a pointer device is dragged over a view.
- virtual void PointerDraggedOnButton(views::View* view,
- Pointer pointer,
- const ui::LocatedEvent& event) = 0;
-
- // Invoked either if a pointer device is released or mouse capture canceled.
- virtual void PointerReleasedOnButton(views::View* view,
- Pointer pointer,
- bool canceled) = 0;
-
- // Invoked when the mouse moves on the item.
- virtual void MouseMovedOverButton(views::View* view) = 0;
-
- // Invoked when the mouse enters the item.
- virtual void MouseEnteredButton(views::View* view) = 0;
-
- // Invoked when the mouse exits the item.
- virtual void MouseExitedButton(views::View* view) = 0;
-
- // Invoked to get the accessible name of the item.
- virtual base::string16 GetAccessibleName(const views::View* view) = 0;
-
- protected:
- virtual ~ShelfButtonHost() {}
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_BUTTON_HOST_H_
diff --git a/chromium/ash/shelf/shelf_delegate.h b/chromium/ash/shelf/shelf_delegate.h
deleted file mode 100644
index e168c470277..00000000000
--- a/chromium/ash/shelf/shelf_delegate.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_DELEGATE_H_
-#define ASH_SHELF_SHELF_DELEGATE_H_
-
-#include "ash/ash_export.h"
-#include "ash/launcher/launcher_types.h"
-
-namespace ash {
-class Launcher;
-
-// Delegate for the Launcher.
-class ASH_EXPORT ShelfDelegate {
- public:
- // Launcher owns the delegate.
- virtual ~ShelfDelegate() {}
-
- // Callback used to allow delegate to perform initialization actions that
- // depend on the Launcher being in a known state.
- virtual void OnLauncherCreated(Launcher* launcher) = 0;
-
- // Callback used to inform the delegate that a specific launcher no longer
- // exists.
- virtual void OnLauncherDestroyed(Launcher* launcher) = 0;
-
- // Get the launcher ID from an application ID.
- virtual LauncherID GetLauncherIDForAppID(const std::string& app_id) = 0;
-
- // Get the application ID for a given launcher ID.
- virtual const std::string& GetAppIDForLauncherID(LauncherID id) = 0;
-
- // Pins an app with |app_id| to launcher. A running instance will get pinned.
- // In case there is no running instance a new launcher item is created and
- // pinned.
- virtual void PinAppWithID(const std::string& app_id) = 0;
-
- // Check if the app with |app_id_| is pinned to the launcher.
- virtual bool IsAppPinned(const std::string& app_id) = 0;
-
- // Checks whether the user is allowed to pin/unpin apps. Pinning may be
- // disallowed by policy in case there is a pre-defined set of pinned apps.
- virtual bool CanPin() const = 0;
-
- // Unpins app item with |app_id|.
- virtual void UnpinAppWithID(const std::string& app_id) = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_DELEGATE_H_
diff --git a/chromium/ash/shelf/shelf_icon_observer.h b/chromium/ash/shelf/shelf_icon_observer.h
deleted file mode 100644
index 8132a8939e8..00000000000
--- a/chromium/ash/shelf/shelf_icon_observer.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_ICON_OBSERVER_H_
-#define ASH_SHELF_SHELF_ICON_OBSERVER_H_
-
-#include "ash/ash_export.h"
-
-namespace ash {
-
-class ASH_EXPORT ShelfIconObserver {
- public:
- // Invoked when any icon on shelf changes position.
- virtual void OnShelfIconPositionsChanged() = 0;
-
- protected:
- virtual ~ShelfIconObserver() {}
-};
-
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_ICON_OBSERVER_H_
diff --git a/chromium/ash/shelf/shelf_item_delegate.h b/chromium/ash/shelf/shelf_item_delegate.h
deleted file mode 100644
index 72815cf80f6..00000000000
--- a/chromium/ash/shelf/shelf_item_delegate.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_ITEM_DELEGATE_H_
-#define ASH_SHELF_SHELF_ITEM_DELEGATE_H_
-
-#include "ash/ash_export.h"
-#include "base/strings/string16.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ui {
-class Event;
-class MenuModel;
-}
-
-namespace ash {
-
-class ShelfMenuModel;
-
-// Delegate for the LauncherItem.
-class ASH_EXPORT ShelfItemDelegate {
- public:
- virtual ~ShelfItemDelegate() {}
-
- // Invoked when the user clicks on a window entry in the launcher.
- // |event| is the click event. The |event| is dispatched by a view
- // and has an instance of |views::View| as the event target
- // but not |aura::Window|. If the |event| is of type KeyEvent, it is assumed
- // that this was triggered by keyboard action (Alt+<number>) and special
- // handling might happen.
- // Returns true if a new item was created.
- virtual bool ItemSelected(const ui::Event& event) = 0;
-
- // Returns the title to display.
- virtual base::string16 GetTitle() = 0;
-
- // Returns the context menumodel for the specified item on
- // |root_window|. Return NULL if there should be no context
- // menu. The caller takes ownership of the returned model.
- virtual ui::MenuModel* CreateContextMenu(aura::Window* root_window) = 0;
-
- // Returns the application menu model for the specified item. There are three
- // possible return values:
- // - A return of NULL indicates that no menu is wanted for this item.
- // - A return of a menu with one item means that only the name of the
- // application/item was added and there are no active applications.
- // Note: This is useful for hover menus which also show context help.
- // - A list containing the title and the active list of items.
- // The caller takes ownership of the returned model.
- // |event_flags| specifies the flags of the event which triggered this menu.
- virtual ShelfMenuModel* CreateApplicationMenu(int event_flags) = 0;
-
- // Whether the launcher item is draggable.
- virtual bool IsDraggable() = 0;
-
- // Returns true if a tooltip should be shown.
- virtual bool ShouldShowTooltip() = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_ITEM_DELEGATE_H_
diff --git a/chromium/ash/shelf/shelf_item_delegate_manager.cc b/chromium/ash/shelf/shelf_item_delegate_manager.cc
deleted file mode 100644
index 79124caac15..00000000000
--- a/chromium/ash/shelf/shelf_item_delegate_manager.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_item_delegate_manager.h"
-
-#include "ash/shelf/shelf_item_delegate.h"
-#include "ash/shelf/shelf_model.h"
-#include "ash/shell.h"
-#include "base/logging.h"
-#include "base/stl_util.h"
-
-namespace ash {
-
-ShelfItemDelegateManager::ShelfItemDelegateManager(ShelfModel* model)
- : model_(model) {
- DCHECK(model_);
- model_->AddObserver(this);
-}
-
-ShelfItemDelegateManager::~ShelfItemDelegateManager() {
- model_->RemoveObserver(this);
- STLDeleteContainerPairSecondPointers(id_to_item_delegate_map_.begin(),
- id_to_item_delegate_map_.end());
-}
-
-void ShelfItemDelegateManager::SetShelfItemDelegate(
- LauncherID id,
- scoped_ptr<ShelfItemDelegate> item_delegate) {
- // If another ShelfItemDelegate is already registered for |id|, we assume
- // that this request is replacing ShelfItemDelegate for |id| with
- // |item_delegate|.
- RemoveShelfItemDelegate(id);
- id_to_item_delegate_map_[id] = item_delegate.release();
-}
-
-ShelfItemDelegate* ShelfItemDelegateManager::GetShelfItemDelegate(
- LauncherID id) {
- if (model_->ItemIndexByID(id) != -1) {
- // Each LauncherItem has to have a ShelfItemDelegate.
- DCHECK(id_to_item_delegate_map_.find(id) != id_to_item_delegate_map_.end());
- return id_to_item_delegate_map_[id];
- }
- return NULL;
-}
-
-void ShelfItemDelegateManager::ShelfItemAdded(int index) {
-}
-
-void ShelfItemDelegateManager::ShelfItemRemoved(int index, LauncherID id) {
- RemoveShelfItemDelegate(id);
-}
-
-void ShelfItemDelegateManager::ShelfItemMoved(int start_index,
- int target_index) {
-}
-
-void ShelfItemDelegateManager::ShelfItemChanged(int index,
- const LauncherItem& old_item) {
-}
-
-void ShelfItemDelegateManager::ShelfStatusChanged() {
-}
-
-void ShelfItemDelegateManager::RemoveShelfItemDelegate(LauncherID id) {
- if (id_to_item_delegate_map_.find(id) != id_to_item_delegate_map_.end()) {
- delete id_to_item_delegate_map_[id];
- id_to_item_delegate_map_.erase(id);
- }
-}
-
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_item_delegate_manager.h b/chromium/ash/shelf/shelf_item_delegate_manager.h
deleted file mode 100644
index dc4df7339b1..00000000000
--- a/chromium/ash/shelf/shelf_item_delegate_manager.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_ITEM_DELEGATE_MANAGER_H_
-#define ASH_SHELF_SHELF_ITEM_DELEGATE_MANAGER_H_
-
-#include <map>
-
-#include "ash/ash_export.h"
-#include "ash/launcher/launcher_types.h"
-#include "ash/shelf/shelf_model_observer.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-
-namespace ash {
-class ShelfItemDelegate;
-class ShelfModel;
-
-namespace test {
-class ShelfItemDelegateManagerTestAPI;
-}
-
-// ShelfItemDelegateManager manages the set of ShelfItemDelegates for the
-// launcher. ShelfItemDelegateManager does not create ShelfItemDelegates,
-// rather it is expected that someone else invokes SetShelfItemDelegate
-// appropriately. On the other hand, ShelfItemDelegateManager destroys
-// ShelfItemDelegates when the corresponding item from the model is removed.
-class ASH_EXPORT ShelfItemDelegateManager : public ShelfModelObserver {
- public:
- explicit ShelfItemDelegateManager(ShelfModel* model);
- virtual ~ShelfItemDelegateManager();
-
- // Set |item_delegate| for |id| and take an ownership.
- void SetShelfItemDelegate(LauncherID id,
- scoped_ptr<ShelfItemDelegate> item_delegate);
-
- // Returns ShelfItemDelegate for |item_type|. Always returns non-NULL.
- ShelfItemDelegate* GetShelfItemDelegate(LauncherID id);
-
- // ShelfModelObserver overrides:
- virtual void ShelfItemAdded(int model_index) OVERRIDE;
- virtual void ShelfItemRemoved(int index, LauncherID id) OVERRIDE;
- virtual void ShelfItemMoved(int start_index, int targetindex) OVERRIDE;
- virtual void ShelfItemChanged(int index,
- const LauncherItem& old_item) OVERRIDE;
- virtual void ShelfStatusChanged() OVERRIDE;
-
- private:
- friend class test::ShelfItemDelegateManagerTestAPI;
-
- typedef std::map<LauncherID, ShelfItemDelegate*> LauncherIDToItemDelegateMap;
-
- // Remove and destroy ShelfItemDelegate for |id|.
- void RemoveShelfItemDelegate(LauncherID id);
-
- // Owned by Shell.
- ShelfModel* model_;
-
- LauncherIDToItemDelegateMap id_to_item_delegate_map_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfItemDelegateManager);
-};
-
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_ITEM_DELEGATE_MANAGER_H_
diff --git a/chromium/ash/shelf/shelf_layout_manager.cc b/chromium/ash/shelf/shelf_layout_manager.cc
deleted file mode 100644
index 9a74f3825ff..00000000000
--- a/chromium/ash/shelf/shelf_layout_manager.cc
+++ /dev/null
@@ -1,1171 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_layout_manager.h"
-
-#include <algorithm>
-#include <cmath>
-#include <cstring>
-#include <string>
-#include <vector>
-
-#include "ash/ash_switches.h"
-#include "ash/launcher/launcher.h"
-#include "ash/launcher/launcher_types.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shelf/shelf_bezel_event_filter.h"
-#include "ash/shelf/shelf_layout_manager_observer.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/wm/gestures/shelf_gesture_handler.h"
-#include "ash/wm/lock_state_controller.h"
-#include "ash/wm/mru_window_tracker.h"
-#include "ash/wm/window_animations.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace_controller.h"
-#include "base/auto_reset.h"
-#include "base/command_line.h"
-#include "base/command_line.h"
-#include "base/i18n/rtl.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/string_util.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/client/cursor_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/base/ui_base_switches.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animation_observer.h"
-#include "ui/compositor/layer_animator.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/events/event.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-// Delay before showing the launcher. This is after the mouse stops moving.
-const int kAutoHideDelayMS = 200;
-
-// To avoid hiding the shelf when the mouse transitions from a message bubble
-// into the shelf, the hit test area is enlarged by this amount of pixels to
-// keep the shelf from hiding.
-const int kNotificationBubbleGapHeight = 6;
-
-// The maximum size of the region on the display opposing the shelf managed by
-// this ShelfLayoutManager which can trigger showing the shelf.
-// For instance:
-// - Primary display is left of secondary display.
-// - Shelf is left aligned
-// - This ShelfLayoutManager manages the shelf for the secondary display.
-// |kMaxAutoHideShowShelfRegionSize| refers to the maximum size of the region
-// from the right edge of the primary display which can trigger showing the
-// auto hidden shelf. The region is used to make it easier to trigger showing
-// the auto hidden shelf when the shelf is on the boundary between displays.
-const int kMaxAutoHideShowShelfRegionSize = 10;
-
-ui::Layer* GetLayer(views::Widget* widget) {
- return widget->GetNativeView()->layer();
-}
-
-bool IsDraggingTrayEnabled() {
- static bool dragging_tray_allowed = CommandLine::ForCurrentProcess()->
- HasSwitch(ash::switches::kAshEnableTrayDragging);
- return dragging_tray_allowed;
-}
-
-} // namespace
-
-// static
-const int ShelfLayoutManager::kWorkspaceAreaVisibleInset = 2;
-
-// static
-const int ShelfLayoutManager::kWorkspaceAreaAutoHideInset = 5;
-
-// static
-const int ShelfLayoutManager::kAutoHideSize = 3;
-
-// static
-const int ShelfLayoutManager::kShelfSize = 47;
-
-// static
-const int ShelfLayoutManager::kShelfItemInset = 3;
-
-int ShelfLayoutManager::GetPreferredShelfSize() {
- return ash::switches::UseAlternateShelfLayout() ?
- ShelfLayoutManager::kShelfSize : kLauncherPreferredSize;
-}
-
-// ShelfLayoutManager::AutoHideEventFilter -------------------------------------
-
-// Notifies ShelfLayoutManager any time the mouse moves.
-class ShelfLayoutManager::AutoHideEventFilter : public ui::EventHandler {
- public:
- explicit AutoHideEventFilter(ShelfLayoutManager* shelf);
- virtual ~AutoHideEventFilter();
-
- // Returns true if the last mouse event was a mouse drag.
- bool in_mouse_drag() const { return in_mouse_drag_; }
-
- // Overridden from ui::EventHandler:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- private:
- ShelfLayoutManager* shelf_;
- bool in_mouse_drag_;
- ShelfGestureHandler gesture_handler_;
- DISALLOW_COPY_AND_ASSIGN(AutoHideEventFilter);
-};
-
-ShelfLayoutManager::AutoHideEventFilter::AutoHideEventFilter(
- ShelfLayoutManager* shelf)
- : shelf_(shelf),
- in_mouse_drag_(false) {
- Shell::GetInstance()->AddPreTargetHandler(this);
-}
-
-ShelfLayoutManager::AutoHideEventFilter::~AutoHideEventFilter() {
- Shell::GetInstance()->RemovePreTargetHandler(this);
-}
-
-void ShelfLayoutManager::AutoHideEventFilter::OnMouseEvent(
- ui::MouseEvent* event) {
- // This also checks IsShelfWindow() to make sure we don't attempt to hide the
- // shelf if the mouse down occurs on the shelf.
- in_mouse_drag_ = (event->type() == ui::ET_MOUSE_DRAGGED ||
- (in_mouse_drag_ && event->type() != ui::ET_MOUSE_RELEASED &&
- event->type() != ui::ET_MOUSE_CAPTURE_CHANGED)) &&
- !shelf_->IsShelfWindow(static_cast<aura::Window*>(event->target()));
- if (event->type() == ui::ET_MOUSE_MOVED)
- shelf_->UpdateAutoHideState();
- return;
-}
-
-void ShelfLayoutManager::AutoHideEventFilter::OnGestureEvent(
- ui::GestureEvent* event) {
- if (shelf_->IsShelfWindow(static_cast<aura::Window*>(event->target()))) {
- if (gesture_handler_.ProcessGestureEvent(*event))
- event->StopPropagation();
- }
-}
-
-// ShelfLayoutManager:UpdateShelfObserver --------------------------------------
-
-// UpdateShelfObserver is used to delay updating the background until the
-// animation completes.
-class ShelfLayoutManager::UpdateShelfObserver
- : public ui::ImplicitAnimationObserver {
- public:
- explicit UpdateShelfObserver(ShelfLayoutManager* shelf) : shelf_(shelf) {
- shelf_->update_shelf_observer_ = this;
- }
-
- void Detach() {
- shelf_ = NULL;
- }
-
- virtual void OnImplicitAnimationsCompleted() OVERRIDE {
- if (shelf_)
- shelf_->UpdateShelfBackground(BACKGROUND_CHANGE_ANIMATE);
- delete this;
- }
-
- private:
- virtual ~UpdateShelfObserver() {
- if (shelf_)
- shelf_->update_shelf_observer_ = NULL;
- }
-
- // Shelf we're in. NULL if deleted before we're deleted.
- ShelfLayoutManager* shelf_;
-
- DISALLOW_COPY_AND_ASSIGN(UpdateShelfObserver);
-};
-
-// ShelfLayoutManager ----------------------------------------------------------
-
-ShelfLayoutManager::ShelfLayoutManager(ShelfWidget* shelf)
- : root_window_(shelf->GetNativeView()->GetRootWindow()),
- updating_bounds_(false),
- auto_hide_behavior_(SHELF_AUTO_HIDE_BEHAVIOR_NEVER),
- alignment_(SHELF_ALIGNMENT_BOTTOM),
- shelf_(shelf),
- workspace_controller_(NULL),
- window_overlaps_shelf_(false),
- mouse_over_shelf_when_auto_hide_timer_started_(false),
- bezel_event_filter_(new ShelfBezelEventFilter(this)),
- gesture_drag_status_(GESTURE_DRAG_NONE),
- gesture_drag_amount_(0.f),
- gesture_drag_auto_hide_state_(SHELF_AUTO_HIDE_SHOWN),
- update_shelf_observer_(NULL) {
- Shell::GetInstance()->AddShellObserver(this);
- Shell::GetInstance()->lock_state_controller()->AddObserver(this);
- aura::client::GetActivationClient(root_window_)->AddObserver(this);
-}
-
-ShelfLayoutManager::~ShelfLayoutManager() {
- if (update_shelf_observer_)
- update_shelf_observer_->Detach();
-
- FOR_EACH_OBSERVER(ShelfLayoutManagerObserver, observers_, WillDeleteShelf());
- Shell::GetInstance()->RemoveShellObserver(this);
- Shell::GetInstance()->lock_state_controller()->RemoveObserver(this);
- aura::client::GetActivationClient(root_window_)->RemoveObserver(this);
-}
-
-void ShelfLayoutManager::SetAutoHideBehavior(ShelfAutoHideBehavior behavior) {
- if (auto_hide_behavior_ == behavior)
- return;
- auto_hide_behavior_ = behavior;
- UpdateVisibilityState();
- FOR_EACH_OBSERVER(ShelfLayoutManagerObserver, observers_,
- OnAutoHideBehaviorChanged(root_window_,
- auto_hide_behavior_));
-}
-
-void ShelfLayoutManager::PrepareForShutdown() {
- // Clear all event filters, otherwise sometimes those filters may catch
- // synthesized mouse event and cause crashes during the shutdown.
- set_workspace_controller(NULL);
- auto_hide_event_filter_.reset();
- bezel_event_filter_.reset();
-}
-
-bool ShelfLayoutManager::IsVisible() const {
- // status_area_widget() may be NULL during the shutdown.
- return shelf_->status_area_widget() &&
- shelf_->status_area_widget()->IsVisible() &&
- (state_.visibility_state == SHELF_VISIBLE ||
- (state_.visibility_state == SHELF_AUTO_HIDE &&
- state_.auto_hide_state == SHELF_AUTO_HIDE_SHOWN));
-}
-
-bool ShelfLayoutManager::SetAlignment(ShelfAlignment alignment) {
- if (alignment_ == alignment)
- return false;
-
- // This should not be called during the lock screen transitions.
- DCHECK(!Shell::GetInstance()->session_state_delegate()->IsScreenLocked());
- alignment_ = alignment;
- shelf_->SetAlignment(alignment);
- LayoutShelf();
- return true;
-}
-
-ShelfAlignment ShelfLayoutManager::GetAlignment() const {
- // When the screen is locked, the shelf is forced into bottom alignment.
- if (Shell::GetInstance()->session_state_delegate()->IsScreenLocked())
- return SHELF_ALIGNMENT_BOTTOM;
- return alignment_;
-}
-
-gfx::Rect ShelfLayoutManager::GetIdealBounds() {
- gfx::Rect bounds(
- ScreenAsh::GetDisplayBoundsInParent(shelf_->GetNativeView()));
- int width = 0, height = 0;
- GetShelfSize(&width, &height);
- return SelectValueForShelfAlignment(
- gfx::Rect(bounds.x(), bounds.bottom() - height, bounds.width(), height),
- gfx::Rect(bounds.x(), bounds.y(), width, bounds.height()),
- gfx::Rect(bounds.right() - width, bounds.y(), width, bounds.height()),
- gfx::Rect(bounds.x(), bounds.y(), bounds.width(), height));
-}
-
-void ShelfLayoutManager::LayoutShelf() {
- TargetBounds target_bounds;
- CalculateTargetBounds(state_, &target_bounds);
- UpdateBoundsAndOpacity(target_bounds, false, NULL);
-
- if (shelf_->launcher()) {
- // This is not part of UpdateBoundsAndOpacity() because
- // SetShelfViewBounds() sets the bounds immediately and does not animate.
- // The height of the ShelfView for a horizontal shelf and the width of
- // the ShelfView for a vertical shelf are set when |shelf_|'s bounds
- // are changed via UpdateBoundsAndOpacity(). This sets the origin and the
- // dimension in the other direction.
- shelf_->launcher()->SetShelfViewBounds(
- target_bounds.launcher_bounds_in_shelf);
- }
-}
-
-ShelfVisibilityState ShelfLayoutManager::CalculateShelfVisibility() {
- switch(auto_hide_behavior_) {
- case SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS:
- return SHELF_AUTO_HIDE;
- case SHELF_AUTO_HIDE_BEHAVIOR_NEVER:
- return SHELF_VISIBLE;
- case SHELF_AUTO_HIDE_ALWAYS_HIDDEN:
- return SHELF_HIDDEN;
- }
- return SHELF_VISIBLE;
-}
-
-void ShelfLayoutManager::UpdateVisibilityState() {
- // Bail out early when there is no |workspace_controller_|, which happens
- // during shutdown after PrepareForShutdown.
- if (!workspace_controller_)
- return;
-
- if (Shell::GetInstance()->session_state_delegate()->IsScreenLocked()) {
- SetState(SHELF_VISIBLE);
- } else {
- // TODO(zelidrag): Verify shelf drag animation still shows on the device
- // when we are in SHELF_AUTO_HIDE_ALWAYS_HIDDEN.
- WorkspaceWindowState window_state(workspace_controller_->GetWindowState());
- switch (window_state) {
- case WORKSPACE_WINDOW_STATE_FULL_SCREEN: {
- const aura::Window* fullscreen_window = GetRootWindowController(
- root_window_)->GetWindowForFullscreenMode();
- if (fullscreen_window && wm::GetWindowState(fullscreen_window)->
- hide_shelf_when_fullscreen()) {
- SetState(SHELF_HIDDEN);
- } else {
- // The shelf is sometimes not hidden when in immersive fullscreen.
- // Force the shelf to be auto hidden in this case.
- SetState(SHELF_AUTO_HIDE);
- }
- break;
- }
-
- case WORKSPACE_WINDOW_STATE_MAXIMIZED:
- SetState(CalculateShelfVisibility());
- break;
-
- case WORKSPACE_WINDOW_STATE_WINDOW_OVERLAPS_SHELF:
- case WORKSPACE_WINDOW_STATE_DEFAULT:
- SetState(CalculateShelfVisibility());
- SetWindowOverlapsShelf(window_state ==
- WORKSPACE_WINDOW_STATE_WINDOW_OVERLAPS_SHELF);
- break;
- }
- }
-}
-
-void ShelfLayoutManager::UpdateAutoHideState() {
- ShelfAutoHideState auto_hide_state =
- CalculateAutoHideState(state_.visibility_state);
- if (auto_hide_state != state_.auto_hide_state) {
- if (auto_hide_state == SHELF_AUTO_HIDE_HIDDEN) {
- // Hides happen immediately.
- SetState(state_.visibility_state);
- } else {
- if (!auto_hide_timer_.IsRunning()) {
- mouse_over_shelf_when_auto_hide_timer_started_ =
- shelf_->GetWindowBoundsInScreen().Contains(
- Shell::GetScreen()->GetCursorScreenPoint());
- }
- auto_hide_timer_.Start(
- FROM_HERE,
- base::TimeDelta::FromMilliseconds(kAutoHideDelayMS),
- this, &ShelfLayoutManager::UpdateAutoHideStateNow);
- }
- } else {
- StopAutoHideTimer();
- }
-}
-
-void ShelfLayoutManager::SetWindowOverlapsShelf(bool value) {
- window_overlaps_shelf_ = value;
- UpdateShelfBackground(BACKGROUND_CHANGE_ANIMATE);
-}
-
-void ShelfLayoutManager::AddObserver(ShelfLayoutManagerObserver* observer) {
- observers_.AddObserver(observer);
-}
-
-void ShelfLayoutManager::RemoveObserver(ShelfLayoutManagerObserver* observer) {
- observers_.RemoveObserver(observer);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// ShelfLayoutManager, Gesture dragging:
-
-void ShelfLayoutManager::StartGestureDrag(const ui::GestureEvent& gesture) {
- gesture_drag_status_ = GESTURE_DRAG_IN_PROGRESS;
- gesture_drag_amount_ = 0.f;
- gesture_drag_auto_hide_state_ = visibility_state() == SHELF_AUTO_HIDE ?
- auto_hide_state() : SHELF_AUTO_HIDE_SHOWN;
- UpdateShelfBackground(BACKGROUND_CHANGE_ANIMATE);
-}
-
-ShelfLayoutManager::DragState ShelfLayoutManager::UpdateGestureDrag(
- const ui::GestureEvent& gesture) {
- bool horizontal = IsHorizontalAlignment();
- gesture_drag_amount_ += horizontal ? gesture.details().scroll_y() :
- gesture.details().scroll_x();
- LayoutShelf();
-
- // Start reveling the status menu when:
- // - dragging up on an already visible shelf
- // - dragging up on a hidden shelf, but it is currently completely visible.
- if (horizontal && gesture.details().scroll_y() < 0) {
- int min_height = 0;
- if (gesture_drag_auto_hide_state_ == SHELF_AUTO_HIDE_HIDDEN && shelf_)
- min_height = shelf_->GetContentsView()->GetPreferredSize().height();
-
- if (min_height < shelf_->GetWindowBoundsInScreen().height() &&
- gesture.root_location().x() >=
- shelf_->status_area_widget()->GetWindowBoundsInScreen().x() &&
- IsDraggingTrayEnabled())
- return DRAG_TRAY;
- }
-
- return DRAG_SHELF;
-}
-
-void ShelfLayoutManager::CompleteGestureDrag(const ui::GestureEvent& gesture) {
- bool horizontal = IsHorizontalAlignment();
- bool should_change = false;
- if (gesture.type() == ui::ET_GESTURE_SCROLL_END) {
- // The visibility of the shelf changes only if the shelf was dragged X%
- // along the correct axis. If the shelf was already visible, then the
- // direction of the drag does not matter.
- const float kDragHideThreshold = 0.4f;
- gfx::Rect bounds = GetIdealBounds();
- float drag_ratio = fabs(gesture_drag_amount_) /
- (horizontal ? bounds.height() : bounds.width());
- if (gesture_drag_auto_hide_state_ == SHELF_AUTO_HIDE_SHOWN) {
- should_change = drag_ratio > kDragHideThreshold;
- } else {
- bool correct_direction = false;
- switch (GetAlignment()) {
- case SHELF_ALIGNMENT_BOTTOM:
- case SHELF_ALIGNMENT_RIGHT:
- correct_direction = gesture_drag_amount_ < 0;
- break;
- case SHELF_ALIGNMENT_LEFT:
- case SHELF_ALIGNMENT_TOP:
- correct_direction = gesture_drag_amount_ > 0;
- break;
- }
- should_change = correct_direction && drag_ratio > kDragHideThreshold;
- }
- } else if (gesture.type() == ui::ET_SCROLL_FLING_START) {
- if (gesture_drag_auto_hide_state_ == SHELF_AUTO_HIDE_SHOWN) {
- should_change = horizontal ? fabs(gesture.details().velocity_y()) > 0 :
- fabs(gesture.details().velocity_x()) > 0;
- } else {
- should_change = SelectValueForShelfAlignment(
- gesture.details().velocity_y() < 0,
- gesture.details().velocity_x() > 0,
- gesture.details().velocity_x() < 0,
- gesture.details().velocity_y() > 0);
- }
- } else {
- NOTREACHED();
- }
-
- if (!should_change) {
- CancelGestureDrag();
- return;
- }
- if (shelf_) {
- shelf_->Deactivate();
- shelf_->status_area_widget()->Deactivate();
- }
- gesture_drag_auto_hide_state_ =
- gesture_drag_auto_hide_state_ == SHELF_AUTO_HIDE_SHOWN ?
- SHELF_AUTO_HIDE_HIDDEN : SHELF_AUTO_HIDE_SHOWN;
- ShelfAutoHideBehavior new_auto_hide_behavior =
- gesture_drag_auto_hide_state_ == SHELF_AUTO_HIDE_SHOWN ?
- SHELF_AUTO_HIDE_BEHAVIOR_NEVER : SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS;
-
- // When in fullscreen and the shelf is forced to be auto hidden, the auto hide
- // behavior affects neither the visibility state nor the auto hide state. Set
- // |gesture_drag_status_| to GESTURE_DRAG_COMPLETE_IN_PROGRESS to set the auto
- // hide state to |gesture_drag_auto_hide_state_|.
- gesture_drag_status_ = GESTURE_DRAG_COMPLETE_IN_PROGRESS;
- if (auto_hide_behavior_ != new_auto_hide_behavior)
- SetAutoHideBehavior(new_auto_hide_behavior);
- else
- UpdateVisibilityState();
- gesture_drag_status_ = GESTURE_DRAG_NONE;
-}
-
-void ShelfLayoutManager::CancelGestureDrag() {
- gesture_drag_status_ = GESTURE_DRAG_CANCEL_IN_PROGRESS;
- UpdateVisibilityState();
- gesture_drag_status_ = GESTURE_DRAG_NONE;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// ShelfLayoutManager, aura::LayoutManager implementation:
-
-void ShelfLayoutManager::OnWindowResized() {
- LayoutShelf();
-}
-
-void ShelfLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
-}
-
-void ShelfLayoutManager::OnWillRemoveWindowFromLayout(aura::Window* child) {
-}
-
-void ShelfLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
-}
-
-void ShelfLayoutManager::OnChildWindowVisibilityChanged(aura::Window* child,
- bool visible) {
-}
-
-void ShelfLayoutManager::SetChildBounds(aura::Window* child,
- const gfx::Rect& requested_bounds) {
- SetChildBoundsDirect(child, requested_bounds);
- // We may contain other widgets (such as frame maximize bubble) but they don't
- // effect the layout in anyway.
- if (!updating_bounds_ &&
- ((shelf_->GetNativeView() == child) ||
- (shelf_->status_area_widget()->GetNativeView() == child))) {
- LayoutShelf();
- }
-}
-
-void ShelfLayoutManager::OnLockStateChanged(bool locked) {
- // Force the shelf to layout for alignment (bottom if locked, restore
- // the previous alignment otherwise).
- shelf_->SetAlignment(locked ? SHELF_ALIGNMENT_BOTTOM : alignment_);
- UpdateVisibilityState();
- LayoutShelf();
-}
-
-void ShelfLayoutManager::OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) {
- UpdateAutoHideStateNow();
-}
-
-bool ShelfLayoutManager::IsHorizontalAlignment() const {
- return GetAlignment() == SHELF_ALIGNMENT_BOTTOM ||
- GetAlignment() == SHELF_ALIGNMENT_TOP;
-}
-
-// static
-ShelfLayoutManager* ShelfLayoutManager::ForLauncher(aura::Window* window) {
- ShelfWidget* shelf = RootWindowController::ForLauncher(window)->shelf();
- return shelf ? shelf->shelf_layout_manager() : NULL;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// ShelfLayoutManager, private:
-
-ShelfLayoutManager::TargetBounds::TargetBounds() : opacity(0.0f) {}
-ShelfLayoutManager::TargetBounds::~TargetBounds() {}
-
-void ShelfLayoutManager::SetState(ShelfVisibilityState visibility_state) {
- if (!shelf_->GetNativeView())
- return;
-
- State state;
- state.visibility_state = visibility_state;
- state.auto_hide_state = CalculateAutoHideState(visibility_state);
- state.is_screen_locked =
- Shell::GetInstance()->session_state_delegate()->IsScreenLocked();
- state.window_state = workspace_controller_ ?
- workspace_controller_->GetWindowState() : WORKSPACE_WINDOW_STATE_DEFAULT;
-
- // Force an update because gesture drags affect the shelf bounds and we
- // should animate back to the normal bounds at the end of a gesture.
- bool force_update =
- (gesture_drag_status_ == GESTURE_DRAG_CANCEL_IN_PROGRESS ||
- gesture_drag_status_ == GESTURE_DRAG_COMPLETE_IN_PROGRESS);
-
- if (!force_update && state_.Equals(state))
- return; // Nothing changed.
-
- FOR_EACH_OBSERVER(ShelfLayoutManagerObserver, observers_,
- WillChangeVisibilityState(visibility_state));
-
- if (state.visibility_state == SHELF_AUTO_HIDE) {
- // When state is SHELF_AUTO_HIDE we need to track when the mouse is over the
- // launcher to unhide the shelf. AutoHideEventFilter does that for us.
- if (!auto_hide_event_filter_)
- auto_hide_event_filter_.reset(new AutoHideEventFilter(this));
- } else {
- auto_hide_event_filter_.reset(NULL);
- }
-
- StopAutoHideTimer();
-
- State old_state = state_;
- state_ = state;
-
- BackgroundAnimatorChangeType change_type = BACKGROUND_CHANGE_ANIMATE;
- bool delay_background_change = false;
-
- // Do not animate the background when:
- // - Going from a hidden / auto hidden shelf in fullscreen to a visible shelf
- // in maximized mode.
- // - Going from an auto hidden shelf in maximized mode to a visible shelf in
- // maximized mode.
- if (state.visibility_state == SHELF_VISIBLE &&
- state.window_state == WORKSPACE_WINDOW_STATE_MAXIMIZED &&
- old_state.visibility_state != SHELF_VISIBLE) {
- change_type = BACKGROUND_CHANGE_IMMEDIATE;
- } else {
- // Delay the animation when the shelf was hidden, and has just been made
- // visible (e.g. using a gesture-drag).
- if (state.visibility_state == SHELF_VISIBLE &&
- old_state.visibility_state == SHELF_AUTO_HIDE &&
- old_state.auto_hide_state == SHELF_AUTO_HIDE_HIDDEN) {
- delay_background_change = true;
- }
- }
-
- if (delay_background_change) {
- if (update_shelf_observer_)
- update_shelf_observer_->Detach();
- // UpdateShelfBackground deletes itself when the animation is done.
- update_shelf_observer_ = new UpdateShelfObserver(this);
- } else {
- UpdateShelfBackground(change_type);
- }
-
- shelf_->SetDimsShelf(
- state.visibility_state == SHELF_VISIBLE &&
- state.window_state == WORKSPACE_WINDOW_STATE_MAXIMIZED);
-
- TargetBounds target_bounds;
- CalculateTargetBounds(state_, &target_bounds);
- UpdateBoundsAndOpacity(target_bounds, true,
- delay_background_change ? update_shelf_observer_ : NULL);
-
- // OnAutoHideStateChanged Should be emitted when:
- // - firstly state changed to auto-hide from other state
- // - or, auto_hide_state has changed
- if ((old_state.visibility_state != state_.visibility_state &&
- state_.visibility_state == SHELF_AUTO_HIDE) ||
- old_state.auto_hide_state != state_.auto_hide_state) {
- FOR_EACH_OBSERVER(ShelfLayoutManagerObserver, observers_,
- OnAutoHideStateChanged(state_.auto_hide_state));
- }
-}
-
-void ShelfLayoutManager::UpdateBoundsAndOpacity(
- const TargetBounds& target_bounds,
- bool animate,
- ui::ImplicitAnimationObserver* observer) {
- base::AutoReset<bool> auto_reset_updating_bounds(&updating_bounds_, true);
-
- ui::ScopedLayerAnimationSettings launcher_animation_setter(
- GetLayer(shelf_)->GetAnimator());
- ui::ScopedLayerAnimationSettings status_animation_setter(
- GetLayer(shelf_->status_area_widget())->GetAnimator());
- if (animate) {
- launcher_animation_setter.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kCrossFadeDurationMS));
- launcher_animation_setter.SetTweenType(gfx::Tween::EASE_OUT);
- launcher_animation_setter.SetPreemptionStrategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- status_animation_setter.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kCrossFadeDurationMS));
- status_animation_setter.SetTweenType(gfx::Tween::EASE_OUT);
- status_animation_setter.SetPreemptionStrategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- } else {
- StopAnimating();
- launcher_animation_setter.SetTransitionDuration(base::TimeDelta());
- status_animation_setter.SetTransitionDuration(base::TimeDelta());
- }
- if (observer)
- status_animation_setter.AddObserver(observer);
-
- GetLayer(shelf_)->SetOpacity(target_bounds.opacity);
- shelf_->SetBounds(ScreenAsh::ConvertRectToScreen(
- shelf_->GetNativeView()->parent(),
- target_bounds.shelf_bounds_in_root));
-
- GetLayer(shelf_->status_area_widget())->SetOpacity(
- target_bounds.status_opacity);
- // TODO(harrym): Once status area widget is a child view of shelf
- // this can be simplified.
- gfx::Rect status_bounds = target_bounds.status_bounds_in_shelf;
- status_bounds.set_x(status_bounds.x() +
- target_bounds.shelf_bounds_in_root.x());
- status_bounds.set_y(status_bounds.y() +
- target_bounds.shelf_bounds_in_root.y());
- shelf_->status_area_widget()->SetBounds(
- ScreenAsh::ConvertRectToScreen(
- shelf_->status_area_widget()->GetNativeView()->parent(),
- status_bounds));
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
- root_window_, target_bounds.work_area_insets);
- UpdateHitTestBounds();
-}
-
-void ShelfLayoutManager::StopAnimating() {
- GetLayer(shelf_)->GetAnimator()->StopAnimating();
- GetLayer(shelf_->status_area_widget())->GetAnimator()->StopAnimating();
-}
-
-void ShelfLayoutManager::GetShelfSize(int* width, int* height) {
- *width = *height = 0;
- gfx::Size status_size(
- shelf_->status_area_widget()->GetWindowBoundsInScreen().size());
- if (IsHorizontalAlignment())
- *height = GetPreferredShelfSize();
- else
- *width = GetPreferredShelfSize();
-}
-
-void ShelfLayoutManager::AdjustBoundsBasedOnAlignment(int inset,
- gfx::Rect* bounds) const {
- bounds->Inset(SelectValueForShelfAlignment(
- gfx::Insets(0, 0, inset, 0),
- gfx::Insets(0, inset, 0, 0),
- gfx::Insets(0, 0, 0, inset),
- gfx::Insets(inset, 0, 0, 0)));
-}
-
-void ShelfLayoutManager::CalculateTargetBounds(
- const State& state,
- TargetBounds* target_bounds) {
- const gfx::Rect available_bounds(GetAvailableBounds());
- gfx::Rect status_size(
- shelf_->status_area_widget()->GetWindowBoundsInScreen().size());
- int shelf_width = 0, shelf_height = 0;
- GetShelfSize(&shelf_width, &shelf_height);
- if (IsHorizontalAlignment())
- shelf_width = available_bounds.width();
- else
- shelf_height = available_bounds.height();
-
- if (state.visibility_state == SHELF_AUTO_HIDE &&
- state.auto_hide_state == SHELF_AUTO_HIDE_HIDDEN) {
- // Auto-hidden shelf always starts with the default size. If a gesture-drag
- // is in progress, then the call to UpdateTargetBoundsForGesture() below
- // takes care of setting the height properly.
- if (IsHorizontalAlignment())
- shelf_height = kAutoHideSize;
- else
- shelf_width = kAutoHideSize;
- } else if (state.visibility_state == SHELF_HIDDEN ||
- !keyboard_bounds_.IsEmpty()) {
- if (IsHorizontalAlignment())
- shelf_height = 0;
- else
- shelf_width = 0;
- }
-
- target_bounds->shelf_bounds_in_root = SelectValueForShelfAlignment(
- gfx::Rect(available_bounds.x(), available_bounds.bottom() - shelf_height,
- available_bounds.width(), shelf_height),
- gfx::Rect(available_bounds.x(), available_bounds.y(),
- shelf_width, available_bounds.height()),
- gfx::Rect(available_bounds.right() - shelf_width, available_bounds.y(),
- shelf_width, available_bounds.height()),
- gfx::Rect(available_bounds.x(), available_bounds.y(),
- available_bounds.width(), shelf_height));
-
- int status_inset = std::max(0, GetPreferredShelfSize() -
- PrimaryAxisValue(status_size.height(), status_size.width()));
-
- if (ash::switches::UseAlternateShelfLayout()) {
- status_inset = 0;
- if (IsHorizontalAlignment())
- status_size.set_height(kShelfSize);
- else
- status_size.set_width(kShelfSize);
- }
-
- target_bounds->status_bounds_in_shelf = SelectValueForShelfAlignment(
- gfx::Rect(base::i18n::IsRTL() ? 0 : shelf_width - status_size.width(),
- status_inset, status_size.width(), status_size.height()),
- gfx::Rect(shelf_width - (status_size.width() + status_inset),
- shelf_height - status_size.height(), status_size.width(),
- status_size.height()),
- gfx::Rect(status_inset, shelf_height - status_size.height(),
- status_size.width(), status_size.height()),
- gfx::Rect(base::i18n::IsRTL() ? 0 : shelf_width - status_size.width(),
- shelf_height - (status_size.height() + status_inset),
- status_size.width(), status_size.height()));
-
- target_bounds->work_area_insets = SelectValueForShelfAlignment(
- gfx::Insets(0, 0, GetWorkAreaSize(state, shelf_height), 0),
- gfx::Insets(0, GetWorkAreaSize(state, shelf_width), 0, 0),
- gfx::Insets(0, 0, 0, GetWorkAreaSize(state, shelf_width)),
- gfx::Insets(GetWorkAreaSize(state, shelf_height), 0, 0, 0));
-
- // TODO(varkha): The functionality of managing insets for display areas
- // should probably be pushed to a separate component. This would simplify or
- // remove entirely the dependency on keyboard and dock.
-
- // Also push in the work area inset for the keyboard if it is visible.
- if (!keyboard_bounds_.IsEmpty()) {
- gfx::Insets keyboard_insets(0, 0, keyboard_bounds_.height(), 0);
- target_bounds->work_area_insets += keyboard_insets;
- }
-
- // Also push in the work area inset for the dock if it is visible.
- if (!dock_bounds_.IsEmpty()) {
- gfx::Insets dock_insets(
- 0, (dock_bounds_.x() > 0 ? 0 : dock_bounds_.width()),
- 0, (dock_bounds_.x() > 0 ? dock_bounds_.width() : 0));
- target_bounds->work_area_insets += dock_insets;
- }
-
- target_bounds->opacity =
- (gesture_drag_status_ == GESTURE_DRAG_IN_PROGRESS ||
- state.visibility_state == SHELF_VISIBLE ||
- state.visibility_state == SHELF_AUTO_HIDE) ? 1.0f : 0.0f;
- target_bounds->status_opacity =
- (state.visibility_state == SHELF_AUTO_HIDE &&
- state.auto_hide_state == SHELF_AUTO_HIDE_HIDDEN &&
- gesture_drag_status_ != GESTURE_DRAG_IN_PROGRESS) ?
- 0.0f : target_bounds->opacity;
-
- if (gesture_drag_status_ == GESTURE_DRAG_IN_PROGRESS)
- UpdateTargetBoundsForGesture(target_bounds);
-
- // This needs to happen after calling UpdateTargetBoundsForGesture(), because
- // that can change the size of the shelf.
- target_bounds->launcher_bounds_in_shelf = SelectValueForShelfAlignment(
- gfx::Rect(0, 0,
- shelf_width - status_size.width(),
- target_bounds->shelf_bounds_in_root.height()),
- gfx::Rect(0, 0, target_bounds->shelf_bounds_in_root.width(),
- shelf_height - status_size.height()),
- gfx::Rect(0, 0, target_bounds->shelf_bounds_in_root.width(),
- shelf_height - status_size.height()),
- gfx::Rect(0, 0,
- shelf_width - status_size.width(),
- target_bounds->shelf_bounds_in_root.height()));
-}
-
-void ShelfLayoutManager::UpdateTargetBoundsForGesture(
- TargetBounds* target_bounds) const {
- CHECK_EQ(GESTURE_DRAG_IN_PROGRESS, gesture_drag_status_);
- bool horizontal = IsHorizontalAlignment();
- const gfx::Rect& available_bounds(root_window_->bounds());
- int resistance_free_region = 0;
-
- if (gesture_drag_auto_hide_state_ == SHELF_AUTO_HIDE_HIDDEN &&
- visibility_state() == SHELF_AUTO_HIDE &&
- auto_hide_state() != SHELF_AUTO_HIDE_SHOWN) {
- // If the shelf was hidden when the drag started (and the state hasn't
- // changed since then, e.g. because the tray-menu was shown because of the
- // drag), then allow the drag some resistance-free region at first to make
- // sure the shelf sticks with the finger until the shelf is visible.
- resistance_free_region = GetPreferredShelfSize() - kAutoHideSize;
- }
-
- bool resist = SelectValueForShelfAlignment(
- gesture_drag_amount_ < -resistance_free_region,
- gesture_drag_amount_ > resistance_free_region,
- gesture_drag_amount_ < -resistance_free_region,
- gesture_drag_amount_ > resistance_free_region);
-
- float translate = 0.f;
- if (resist) {
- float diff = fabsf(gesture_drag_amount_) - resistance_free_region;
- diff = std::min(diff, sqrtf(diff));
- if (gesture_drag_amount_ < 0)
- translate = -resistance_free_region - diff;
- else
- translate = resistance_free_region + diff;
- } else {
- translate = gesture_drag_amount_;
- }
-
- if (horizontal) {
- // Move and size the launcher with the gesture.
- int shelf_height = target_bounds->shelf_bounds_in_root.height() - translate;
- shelf_height = std::max(shelf_height, kAutoHideSize);
- target_bounds->shelf_bounds_in_root.set_height(shelf_height);
- if (GetAlignment() == SHELF_ALIGNMENT_BOTTOM) {
- target_bounds->shelf_bounds_in_root.set_y(
- available_bounds.bottom() - shelf_height);
- }
-
- if (ash::switches::UseAlternateShelfLayout()) {
- target_bounds->status_bounds_in_shelf.set_y(0);
- } else {
- // The statusbar should be in the center of the shelf.
- gfx::Rect status_y = target_bounds->shelf_bounds_in_root;
- status_y.set_y(0);
- status_y.ClampToCenteredSize(
- target_bounds->status_bounds_in_shelf.size());
- target_bounds->status_bounds_in_shelf.set_y(status_y.y());
- }
- } else {
- // Move and size the launcher with the gesture.
- int shelf_width = target_bounds->shelf_bounds_in_root.width();
- bool right_aligned = GetAlignment() == SHELF_ALIGNMENT_RIGHT;
- if (right_aligned)
- shelf_width -= translate;
- else
- shelf_width += translate;
- shelf_width = std::max(shelf_width, kAutoHideSize);
- target_bounds->shelf_bounds_in_root.set_width(shelf_width);
- if (right_aligned) {
- target_bounds->shelf_bounds_in_root.set_x(
- available_bounds.right() - shelf_width);
- }
-
- if (ash::switches::UseAlternateShelfLayout()) {
- if (right_aligned)
- target_bounds->status_bounds_in_shelf.set_x(0);
- else
- target_bounds->status_bounds_in_shelf.set_x(
- target_bounds->shelf_bounds_in_root.width() -
- kShelfSize);
- } else {
- // The statusbar should be in the center of the shelf.
- gfx::Rect status_x = target_bounds->shelf_bounds_in_root;
- status_x.set_x(0);
- status_x.ClampToCenteredSize(
- target_bounds->status_bounds_in_shelf.size());
- target_bounds->status_bounds_in_shelf.set_x(status_x.x());
- }
- }
-}
-
-void ShelfLayoutManager::UpdateShelfBackground(
- BackgroundAnimatorChangeType type) {
- const ShelfBackgroundType background_type(GetShelfBackgroundType());
- shelf_->SetPaintsBackground(background_type, type);
- FOR_EACH_OBSERVER(ShelfLayoutManagerObserver, observers_,
- OnBackgroundUpdated(background_type, type));
-}
-
-ShelfBackgroundType ShelfLayoutManager::GetShelfBackgroundType() const {
- if (state_.visibility_state != SHELF_AUTO_HIDE &&
- state_.window_state == WORKSPACE_WINDOW_STATE_MAXIMIZED) {
- return SHELF_BACKGROUND_MAXIMIZED;
- }
-
- if (gesture_drag_status_ == GESTURE_DRAG_IN_PROGRESS ||
- (!state_.is_screen_locked && window_overlaps_shelf_) ||
- (state_.visibility_state == SHELF_AUTO_HIDE)) {
- return SHELF_BACKGROUND_OVERLAP;
- }
-
- return SHELF_BACKGROUND_DEFAULT;
-}
-
-void ShelfLayoutManager::UpdateAutoHideStateNow() {
- SetState(state_.visibility_state);
-
- // If the state did not change, the auto hide timer may still be running.
- StopAutoHideTimer();
-}
-
-void ShelfLayoutManager::StopAutoHideTimer() {
- auto_hide_timer_.Stop();
- mouse_over_shelf_when_auto_hide_timer_started_ = false;
-}
-
-gfx::Rect ShelfLayoutManager::GetAutoHideShowShelfRegionInScreen() const {
- gfx::Rect shelf_bounds_in_screen = shelf_->GetWindowBoundsInScreen();
- gfx::Vector2d offset = SelectValueForShelfAlignment(
- gfx::Vector2d(0, shelf_bounds_in_screen.height()),
- gfx::Vector2d(-kMaxAutoHideShowShelfRegionSize, 0),
- gfx::Vector2d(shelf_bounds_in_screen.width(), 0),
- gfx::Vector2d(0, -kMaxAutoHideShowShelfRegionSize));
-
- gfx::Rect show_shelf_region_in_screen = shelf_bounds_in_screen;
- show_shelf_region_in_screen += offset;
- if (IsHorizontalAlignment())
- show_shelf_region_in_screen.set_height(kMaxAutoHideShowShelfRegionSize);
- else
- show_shelf_region_in_screen.set_width(kMaxAutoHideShowShelfRegionSize);
-
- // TODO: Figure out if we need any special handling when the keyboard is
- // visible.
- return show_shelf_region_in_screen;
-}
-
-ShelfAutoHideState ShelfLayoutManager::CalculateAutoHideState(
- ShelfVisibilityState visibility_state) const {
- if (visibility_state != SHELF_AUTO_HIDE || !shelf_)
- return SHELF_AUTO_HIDE_HIDDEN;
-
- Shell* shell = Shell::GetInstance();
- if (shell->GetAppListTargetVisibility())
- return SHELF_AUTO_HIDE_SHOWN;
-
- if (shelf_->status_area_widget() &&
- shelf_->status_area_widget()->ShouldShowLauncher())
- return SHELF_AUTO_HIDE_SHOWN;
-
- if (shelf_->launcher() && shelf_->launcher()->IsShowingMenu())
- return SHELF_AUTO_HIDE_SHOWN;
-
- if (shelf_->launcher() && shelf_->launcher()->IsShowingOverflowBubble())
- return SHELF_AUTO_HIDE_SHOWN;
-
- if (shelf_->IsActive() || shelf_->status_area_widget()->IsActive())
- return SHELF_AUTO_HIDE_SHOWN;
-
- const std::vector<aura::Window*> windows =
- ash::MruWindowTracker::BuildWindowList(false);
-
- // Process the window list and check if there are any visible windows.
- bool visible_window = false;
- for (size_t i = 0; i < windows.size(); ++i) {
- if (windows[i] && windows[i]->IsVisible() &&
- !wm::GetWindowState(windows[i])->IsMinimized() &&
- root_window_ == windows[i]->GetRootWindow()) {
- visible_window = true;
- break;
- }
- }
- // If there are no visible windows do not hide the shelf.
- if (!visible_window)
- return SHELF_AUTO_HIDE_SHOWN;
-
- if (gesture_drag_status_ == GESTURE_DRAG_COMPLETE_IN_PROGRESS)
- return gesture_drag_auto_hide_state_;
-
- // Don't show if the user is dragging the mouse.
- if (auto_hide_event_filter_.get() && auto_hide_event_filter_->in_mouse_drag())
- return SHELF_AUTO_HIDE_HIDDEN;
-
- // Ignore the mouse position if mouse events are disabled.
- aura::client::CursorClient* cursor_client = aura::client::GetCursorClient(
- shelf_->GetNativeWindow()->GetRootWindow());
- if (!cursor_client->IsMouseEventsEnabled())
- return SHELF_AUTO_HIDE_HIDDEN;
-
- gfx::Rect shelf_region = shelf_->GetWindowBoundsInScreen();
- if (shelf_->status_area_widget() &&
- shelf_->status_area_widget()->IsMessageBubbleShown() &&
- IsVisible()) {
- // Increase the the hit test area to prevent the shelf from disappearing
- // when the mouse is over the bubble gap.
- ShelfAlignment alignment = GetAlignment();
- shelf_region.Inset(alignment == SHELF_ALIGNMENT_RIGHT ?
- -kNotificationBubbleGapHeight : 0,
- alignment == SHELF_ALIGNMENT_BOTTOM ?
- -kNotificationBubbleGapHeight : 0,
- alignment == SHELF_ALIGNMENT_LEFT ?
- -kNotificationBubbleGapHeight : 0,
- alignment == SHELF_ALIGNMENT_TOP ?
- -kNotificationBubbleGapHeight : 0);
- }
-
- gfx::Point cursor_position_in_screen =
- Shell::GetScreen()->GetCursorScreenPoint();
- if (shelf_region.Contains(cursor_position_in_screen))
- return SHELF_AUTO_HIDE_SHOWN;
-
- // When the shelf is auto hidden and the shelf is on the boundary between two
- // displays, it is hard to trigger showing the shelf. For instance, if a
- // user's primary display is left of their secondary display, it is hard to
- // unautohide a left aligned shelf on the secondary display.
- // It is hard because:
- // - It is hard to stop the cursor in the shelf "light bar" and not overshoot.
- // - The cursor is warped to the other display if the cursor gets to the edge
- // of the display.
- // Show the shelf if the cursor started on the shelf and the user overshot the
- // shelf slightly to make it easier to show the shelf in this situation. We
- // do not check |auto_hide_timer_|.IsRunning() because it returns false when
- // the timer's task is running.
- if ((state_.auto_hide_state == SHELF_AUTO_HIDE_SHOWN ||
- mouse_over_shelf_when_auto_hide_timer_started_) &&
- GetAutoHideShowShelfRegionInScreen().Contains(
- cursor_position_in_screen)) {
- return SHELF_AUTO_HIDE_SHOWN;
- }
-
- return SHELF_AUTO_HIDE_HIDDEN;
-}
-
-void ShelfLayoutManager::UpdateHitTestBounds() {
- gfx::Insets mouse_insets;
- gfx::Insets touch_insets;
- if (state_.visibility_state == SHELF_VISIBLE) {
- // Let clicks at the very top of the launcher through so windows can be
- // resized with the bottom-right corner and bottom edge.
- mouse_insets = GetInsetsForAlignment(kWorkspaceAreaVisibleInset);
- } else if (state_.visibility_state == SHELF_AUTO_HIDE) {
- // Extend the touch hit target out a bit to allow users to drag shelf out
- // while hidden.
- touch_insets = GetInsetsForAlignment(-kWorkspaceAreaAutoHideInset);
- }
-
- if (shelf_ && shelf_->GetNativeWindow())
- shelf_->GetNativeWindow()->SetHitTestBoundsOverrideOuter(mouse_insets,
- touch_insets);
- shelf_->status_area_widget()->GetNativeWindow()->
- SetHitTestBoundsOverrideOuter(mouse_insets, touch_insets);
-}
-
-bool ShelfLayoutManager::IsShelfWindow(aura::Window* window) {
- if (!window)
- return false;
- return (shelf_ && shelf_->GetNativeWindow()->Contains(window)) ||
- (shelf_->status_area_widget() &&
- shelf_->status_area_widget()->GetNativeWindow()->Contains(window));
-}
-
-int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const {
- if (state.visibility_state == SHELF_VISIBLE)
- return size;
- if (state.visibility_state == SHELF_AUTO_HIDE)
- return kAutoHideSize;
- return 0;
-}
-
-gfx::Rect ShelfLayoutManager::GetAvailableBounds() const {
- gfx::Rect bounds(root_window_->bounds());
- bounds.set_height(bounds.height() - keyboard_bounds_.height());
- return bounds;
-}
-
-void ShelfLayoutManager::OnKeyboardBoundsChanging(
- const gfx::Rect& keyboard_bounds) {
- keyboard_bounds_ = keyboard_bounds;
- OnWindowResized();
-}
-
-void ShelfLayoutManager::OnDockBoundsChanging(
- const gfx::Rect& dock_bounds,
- DockedWindowLayoutManagerObserver::Reason reason) {
- // Skip shelf layout in case docked notification originates from this class.
- if (reason == DISPLAY_INSETS_CHANGED)
- return;
- if (dock_bounds_ != dock_bounds) {
- dock_bounds_ = dock_bounds;
- OnWindowResized();
- UpdateVisibilityState();
- UpdateShelfBackground(BACKGROUND_CHANGE_ANIMATE);
- }
-}
-
-void ShelfLayoutManager::OnLockStateEvent(LockStateObserver::EventType event) {
- if (event == EVENT_LOCK_ANIMATION_STARTED) {
- // Hide the status area widget (using auto hide animation).
- base::AutoReset<ShelfVisibilityState> state(&state_.visibility_state,
- SHELF_HIDDEN);
- TargetBounds target_bounds;
- CalculateTargetBounds(state_, &target_bounds);
- UpdateBoundsAndOpacity(target_bounds, true, NULL);
- }
-}
-
-gfx::Insets ShelfLayoutManager::GetInsetsForAlignment(int distance) const {
- switch (GetAlignment()) {
- case SHELF_ALIGNMENT_BOTTOM:
- return gfx::Insets(distance, 0, 0, 0);
- case SHELF_ALIGNMENT_LEFT:
- return gfx::Insets(0, 0, 0, distance);
- case SHELF_ALIGNMENT_RIGHT:
- return gfx::Insets(0, distance, 0, 0);
- case SHELF_ALIGNMENT_TOP:
- return gfx::Insets(0, 0, distance, 0);
- }
- NOTREACHED();
- return gfx::Insets();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_layout_manager.h b/chromium/ash/shelf/shelf_layout_manager.h
deleted file mode 100644
index 5d0496b8f9b..00000000000
--- a/chromium/ash/shelf/shelf_layout_manager.h
+++ /dev/null
@@ -1,415 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_LAYOUT_MANAGER_H_
-#define ASH_SHELF_SHELF_LAYOUT_MANAGER_H_
-
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "ash/launcher/launcher.h"
-#include "ash/shelf/background_animator.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/shell_observer.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/wm/dock/docked_window_layout_manager_observer.h"
-#include "ash/wm/lock_state_observer.h"
-#include "ash/wm/workspace/workspace_types.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/logging.h"
-#include "base/observer_list.h"
-#include "base/timer/timer.h"
-#include "ui/aura/client/activation_change_observer.h"
-#include "ui/aura/layout_manager.h"
-#include "ui/gfx/insets.h"
-#include "ui/gfx/rect.h"
-#include "ui/keyboard/keyboard_controller.h"
-#include "ui/keyboard/keyboard_controller_observer.h"
-
-namespace aura {
-class RootWindow;
-}
-
-namespace ui {
-class GestureEvent;
-class ImplicitAnimationObserver;
-}
-
-namespace ash {
-class ScreenAsh;
-class ShelfLayoutManagerObserver;
-class ShelfWidget;
-FORWARD_DECLARE_TEST(WebNotificationTrayTest, PopupAndFullscreen);
-
-namespace internal {
-
-class PanelLayoutManagerTest;
-class ShelfBezelEventFilter;
-class ShelfLayoutManagerTest;
-class StatusAreaWidget;
-class WorkspaceController;
-
-// ShelfLayoutManager is the layout manager responsible for the launcher and
-// status widgets. The launcher is given the total available width and told the
-// width of the status area. This allows the launcher to draw the background and
-// layout to the status area.
-// To respond to bounds changes in the status area StatusAreaLayoutManager works
-// closely with ShelfLayoutManager.
-class ASH_EXPORT ShelfLayoutManager :
- public aura::LayoutManager,
- public ash::ShellObserver,
- public aura::client::ActivationChangeObserver,
- public DockedWindowLayoutManagerObserver,
- public keyboard::KeyboardControllerObserver,
- public LockStateObserver {
- public:
-
- // We reserve a small area on the edge of the workspace area to ensure that
- // the resize handle at the edge of the window can be hit.
- static const int kWorkspaceAreaVisibleInset;
-
- // When autohidden we extend the touch hit target onto the screen so that the
- // user can drag the shelf out.
- static const int kWorkspaceAreaAutoHideInset;
-
- // Size of the shelf when auto-hidden.
- static const int kAutoHideSize;
-
- // The size of the shelf when shown (currently only used in alternate
- // settings see ash::switches::UseAlternateShelfLayout).
- static const int kShelfSize;
-
- // Inset between the inner edge of the shelf (towards centre of screen), and
- // the launcher items, notifications, status area etc.
- static const int kShelfItemInset;
-
- // Returns the preferred size for the shelf (either kLauncherPreferredSize or
- // kShelfSize).
- static int GetPreferredShelfSize();
-
- explicit ShelfLayoutManager(ShelfWidget* shelf);
- virtual ~ShelfLayoutManager();
-
- // Sets the ShelfAutoHideBehavior. See enum description for details.
- void SetAutoHideBehavior(ShelfAutoHideBehavior behavior);
- ShelfAutoHideBehavior auto_hide_behavior() const {
- return auto_hide_behavior_;
- }
-
- // Sets the alignment. Returns true if the alignment is changed. Otherwise,
- // returns false.
- bool SetAlignment(ShelfAlignment alignment);
- // Returns the desired alignment for the current state, either the user's
- // set alignment (alignment_) or SHELF_ALIGNMENT_BOTTOM when the screen
- // is locked.
- ShelfAlignment GetAlignment() const;
-
- void set_workspace_controller(WorkspaceController* controller) {
- workspace_controller_ = controller;
- }
-
- bool updating_bounds() const { return updating_bounds_; }
-
- // Clears internal data for shutdown process.
- void PrepareForShutdown();
-
- // Returns whether the shelf and its contents (launcher, status) are visible
- // on the screen.
- bool IsVisible() const;
-
- // Returns the ideal bounds of the shelf assuming it is visible.
- gfx::Rect GetIdealBounds();
-
- // Returns the docked area bounds.
- const gfx::Rect& dock_bounds() const { return dock_bounds_; }
-
- // Stops any animations and sets the bounds of the launcher and status
- // widgets.
- void LayoutShelf();
-
- // Returns shelf visibility state based on current value of auto hide
- // behavior setting.
- ShelfVisibilityState CalculateShelfVisibility();
-
- // Updates the visibility state.
- void UpdateVisibilityState();
-
- // Invoked by the shelf/launcher when the auto-hide state may have changed.
- void UpdateAutoHideState();
-
- ShelfVisibilityState visibility_state() const {
- return state_.visibility_state;
- }
- ShelfAutoHideState auto_hide_state() const { return state_.auto_hide_state; }
-
- ShelfWidget* shelf_widget() { return shelf_; }
-
- // Sets whether any windows overlap the shelf. If a window overlaps the shelf
- // the shelf renders slightly differently.
- void SetWindowOverlapsShelf(bool value);
- bool window_overlaps_shelf() const { return window_overlaps_shelf_; }
-
- void AddObserver(ShelfLayoutManagerObserver* observer);
- void RemoveObserver(ShelfLayoutManagerObserver* observer);
-
- // Gesture dragging related functions:
- void StartGestureDrag(const ui::GestureEvent& gesture);
- enum DragState {
- DRAG_SHELF,
- DRAG_TRAY
- };
- // Returns DRAG_SHELF if the gesture should continue to drag the entire shelf.
- // Returns DRAG_TRAY if the gesture can start dragging the tray-bubble from
- // this point on.
- DragState UpdateGestureDrag(const ui::GestureEvent& gesture);
- void CompleteGestureDrag(const ui::GestureEvent& gesture);
- void CancelGestureDrag();
-
- // Overridden from aura::LayoutManager:
- virtual void OnWindowResized() OVERRIDE;
- virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE;
- virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE;
- virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE;
- virtual void OnChildWindowVisibilityChanged(aura::Window* child,
- bool visible) OVERRIDE;
- virtual void SetChildBounds(aura::Window* child,
- const gfx::Rect& requested_bounds) OVERRIDE;
-
- // Overridden from ash::ShellObserver:
- virtual void OnLockStateChanged(bool locked) OVERRIDE;
-
- // Overriden from aura::client::ActivationChangeObserver:
- virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) OVERRIDE;
-
- // Overridden from ash::LockStateObserver:
- virtual void OnLockStateEvent(LockStateObserver::EventType event) OVERRIDE;
-
- // TODO(harrym|oshima): These templates will be moved to
- // new Shelf class.
- // A helper function that provides a shortcut for choosing
- // values specific to a shelf alignment.
- template<typename T>
- T SelectValueForShelfAlignment(T bottom, T left, T right, T top) const {
- switch (GetAlignment()) {
- case SHELF_ALIGNMENT_BOTTOM:
- return bottom;
- case SHELF_ALIGNMENT_LEFT:
- return left;
- case SHELF_ALIGNMENT_RIGHT:
- return right;
- case SHELF_ALIGNMENT_TOP:
- return top;
- }
- NOTREACHED();
- return right;
- }
-
- template<typename T>
- T PrimaryAxisValue(T horizontal, T vertical) const {
- return IsHorizontalAlignment() ? horizontal : vertical;
- }
-
- // Is the shelf's alignment horizontal?
- bool IsHorizontalAlignment() const;
-
- // Returns a ShelfLayoutManager on the display which has a launcher for
- // given |window|. See RootWindowController::ForLauncher for more info.
- static ShelfLayoutManager* ForLauncher(aura::Window* window);
-
- private:
- class AutoHideEventFilter;
- class UpdateShelfObserver;
- friend class ash::ScreenAsh;
- friend class PanelLayoutManagerTest;
- friend class ShelfLayoutManagerTest;
- FRIEND_TEST_ALL_PREFIXES(ash::WebNotificationTrayTest, PopupAndFullscreen);
-
- struct TargetBounds {
- TargetBounds();
- ~TargetBounds();
-
- float opacity;
- float status_opacity;
- gfx::Rect shelf_bounds_in_root;
- gfx::Rect launcher_bounds_in_shelf;
- gfx::Rect status_bounds_in_shelf;
- gfx::Insets work_area_insets;
- };
-
- struct State {
- State() : visibility_state(SHELF_VISIBLE),
- auto_hide_state(SHELF_AUTO_HIDE_HIDDEN),
- window_state(WORKSPACE_WINDOW_STATE_DEFAULT),
- is_screen_locked(false) {}
-
- // Returns true if the two states are considered equal. As
- // |auto_hide_state| only matters if |visibility_state| is
- // |SHELF_AUTO_HIDE|, Equals() ignores the |auto_hide_state| as
- // appropriate.
- bool Equals(const State& other) const {
- return other.visibility_state == visibility_state &&
- (visibility_state != SHELF_AUTO_HIDE ||
- other.auto_hide_state == auto_hide_state) &&
- other.window_state == window_state &&
- other.is_screen_locked == is_screen_locked;
- }
-
- ShelfVisibilityState visibility_state;
- ShelfAutoHideState auto_hide_state;
- WorkspaceWindowState window_state;
- bool is_screen_locked;
- };
-
- // Sets the visibility of the shelf to |state|.
- void SetState(ShelfVisibilityState visibility_state);
-
- // Updates the bounds and opacity of the launcher and status widgets.
- // If |observer| is specified, it will be called back when the animations, if
- // any, are complete.
- void UpdateBoundsAndOpacity(const TargetBounds& target_bounds,
- bool animate,
- ui::ImplicitAnimationObserver* observer);
-
- // Stops any animations and progresses them to the end.
- void StopAnimating();
-
- // Returns the width (if aligned to the side) or height (if aligned to the
- // bottom).
- void GetShelfSize(int* width, int* height);
-
- // Insets |bounds| by |inset| on the edge the shelf is aligned to.
- void AdjustBoundsBasedOnAlignment(int inset, gfx::Rect* bounds) const;
-
- // Calculates the target bounds assuming visibility of |visible|.
- void CalculateTargetBounds(const State& state, TargetBounds* target_bounds);
-
- // Updates the target bounds if a gesture-drag is in progress. This is only
- // used by |CalculateTargetBounds()|.
- void UpdateTargetBoundsForGesture(TargetBounds* target_bounds) const;
-
- // Updates the background of the shelf.
- void UpdateShelfBackground(BackgroundAnimatorChangeType type);
-
- // Returns how the shelf background is painted.
- ShelfBackgroundType GetShelfBackgroundType() const;
-
- // Updates the auto hide state immediately.
- void UpdateAutoHideStateNow();
-
- // Stops the auto hide timer and clears
- // |mouse_over_shelf_when_auto_hide_timer_started_|.
- void StopAutoHideTimer();
-
- // Returns the bounds of an additional region which can trigger showing the
- // shelf. This region exists to make it easier to trigger showing the shelf
- // when the shelf is auto hidden and the shelf is on the boundary between
- // two displays.
- gfx::Rect GetAutoHideShowShelfRegionInScreen() const;
-
- // Returns the AutoHideState. This value is determined from the launcher and
- // tray.
- ShelfAutoHideState CalculateAutoHideState(
- ShelfVisibilityState visibility_state) const;
-
- // Updates the hit test bounds override for launcher and status area.
- void UpdateHitTestBounds();
-
- // Returns true if |window| is a descendant of the shelf.
- bool IsShelfWindow(aura::Window* window);
-
- int GetWorkAreaSize(const State& state, int size) const;
-
- // Return the bounds available in the parent, taking into account the bounds
- // of the keyboard if necessary.
- gfx::Rect GetAvailableBounds() const;
-
- // Overridden from keyboard::KeyboardControllerObserver:
- virtual void OnKeyboardBoundsChanging(
- const gfx::Rect& keyboard_bounds) OVERRIDE;
-
- // Overridden from DockedWindowLayoutManagerObserver:
- virtual void OnDockBoundsChanging(
- const gfx::Rect& dock_bounds,
- DockedWindowLayoutManagerObserver::Reason reason) OVERRIDE;
-
- // Generates insets for inward edge based on the current shelf alignment.
- gfx::Insets GetInsetsForAlignment(int distance) const;
-
- // The RootWindow is cached so that we don't invoke Shell::GetInstance() from
- // our destructor. We avoid that as at the time we're deleted Shell is being
- // deleted too.
- aura::Window* root_window_;
-
- // True when inside UpdateBoundsAndOpacity() method. Used to prevent calling
- // UpdateBoundsAndOpacity() again from SetChildBounds().
- bool updating_bounds_;
-
- // See description above setter.
- ShelfAutoHideBehavior auto_hide_behavior_;
-
- // See description above getter.
- ShelfAlignment alignment_;
-
- // Current state.
- State state_;
-
- ShelfWidget* shelf_;
-
- WorkspaceController* workspace_controller_;
-
- // Do any windows overlap the shelf? This is maintained by WorkspaceManager.
- bool window_overlaps_shelf_;
-
- base::OneShotTimer<ShelfLayoutManager> auto_hide_timer_;
-
- // Whether the mouse was over the shelf when the auto hide timer started.
- // False when neither the auto hide timer nor the timer task are running.
- bool mouse_over_shelf_when_auto_hide_timer_started_;
-
- // EventFilter used to detect when user moves the mouse over the launcher to
- // trigger showing the launcher.
- scoped_ptr<AutoHideEventFilter> auto_hide_event_filter_;
-
- // EventFilter used to detect when user issues a gesture on a bezel sensor.
- scoped_ptr<ShelfBezelEventFilter> bezel_event_filter_;
-
- ObserverList<ShelfLayoutManagerObserver> observers_;
-
- // The shelf reacts to gesture-drags, and can be set to auto-hide for certain
- // gestures. Some shelf behaviour (e.g. visibility state, background color
- // etc.) are affected by various stages of the drag. The enum keeps track of
- // the present status of the gesture drag.
- enum GestureDragStatus {
- GESTURE_DRAG_NONE,
- GESTURE_DRAG_IN_PROGRESS,
- GESTURE_DRAG_CANCEL_IN_PROGRESS,
- GESTURE_DRAG_COMPLETE_IN_PROGRESS
- };
- GestureDragStatus gesture_drag_status_;
-
- // Tracks the amount of the drag. The value is only valid when
- // |gesture_drag_status_| is set to GESTURE_DRAG_IN_PROGRESS.
- float gesture_drag_amount_;
-
- // Manage the auto-hide state during the gesture.
- ShelfAutoHideState gesture_drag_auto_hide_state_;
-
- // Used to delay updating shelf background.
- UpdateShelfObserver* update_shelf_observer_;
-
- // The bounds of the keyboard.
- gfx::Rect keyboard_bounds_;
-
- // The bounds of the dock.
- gfx::Rect dock_bounds_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_
diff --git a/chromium/ash/shelf/shelf_layout_manager_observer.h b/chromium/ash/shelf/shelf_layout_manager_observer.h
deleted file mode 100644
index 8a2d5830df7..00000000000
--- a/chromium/ash/shelf/shelf_layout_manager_observer.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_LAYOUT_MANAGER_OBSERVER_H_
-#define ASH_SHELF_SHELF_LAYOUT_MANAGER_OBSERVER_H_
-
-#include "ash/ash_export.h"
-#include "ash/shelf/background_animator.h"
-#include "ash/shelf/shelf_types.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-
-class ASH_EXPORT ShelfLayoutManagerObserver {
- public:
- virtual ~ShelfLayoutManagerObserver() {}
-
- // Called when the target ShelfLayoutManager will be deleted.
- virtual void WillDeleteShelf() {}
-
- // Called when the visibility change is scheduled.
- virtual void WillChangeVisibilityState(ShelfVisibilityState new_state) {}
-
- // Called when the auto hide state is changed.
- virtual void OnAutoHideStateChanged(ShelfAutoHideState new_state) {}
-
- // Called when the auto hide behavior is changed.
- virtual void OnAutoHideBehaviorChanged(aura::Window* root_window,
- ShelfAutoHideBehavior new_behavior) {}
-
- // Called when shelf background animation is started.
- virtual void OnBackgroundUpdated(
- ShelfBackgroundType background_type,
- BackgroundAnimatorChangeType change_type) {}
-};
-
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_OBSERVER_H_
diff --git a/chromium/ash/shelf/shelf_layout_manager_unittest.cc b/chromium/ash/shelf/shelf_layout_manager_unittest.cc
deleted file mode 100644
index 8dac93d1d2e..00000000000
--- a/chromium/ash/shelf/shelf_layout_manager_unittest.cc
+++ /dev/null
@@ -1,1926 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_layout_manager.h"
-
-#include "ash/accelerators/accelerator_controller.h"
-#include "ash/accelerators/accelerator_table.h"
-#include "ash/ash_switches.h"
-#include "ash/display/display_manager.h"
-#include "ash/focus_cycler.h"
-#include "ash/launcher/launcher.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shelf/shelf_layout_manager_observer.h"
-#include "ash/shelf/shelf_view.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/launcher_test_api.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "base/command_line.h"
-#include "base/strings/utf_string_conversions.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animator.h"
-#include "ui/compositor/scoped_animation_duration_scale_mode.h"
-#include "ui/gfx/animation/animation_container_element.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/fill_layout.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-#if defined(OS_WIN)
-#include "base/win/windows_version.h"
-#endif
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-void StepWidgetLayerAnimatorToEnd(views::Widget* widget) {
- gfx::AnimationContainerElement* element =
- static_cast<gfx::AnimationContainerElement*>(
- widget->GetNativeView()->layer()->GetAnimator());
- element->Step(base::TimeTicks::Now() + base::TimeDelta::FromSeconds(1));
-}
-
-ShelfWidget* GetShelfWidget() {
- return Shell::GetPrimaryRootWindowController()->shelf();
-}
-
-ShelfLayoutManager* GetShelfLayoutManager() {
- return Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager();
-}
-
-SystemTray* GetSystemTray() {
- return Shell::GetPrimaryRootWindowController()->GetSystemTray();
-}
-
-// Class which waits till the shelf finishes animating to the target size and
-// counts the number of animation steps.
-class ShelfAnimationWaiter : views::WidgetObserver {
- public:
- explicit ShelfAnimationWaiter(const gfx::Rect& target_bounds)
- : target_bounds_(target_bounds),
- animation_steps_(0),
- done_waiting_(false) {
- GetShelfWidget()->AddObserver(this);
- }
-
- virtual ~ShelfAnimationWaiter() {
- GetShelfWidget()->RemoveObserver(this);
- }
-
- // Wait till the shelf finishes animating to its expected bounds.
- void WaitTillDoneAnimating() {
- if (IsDoneAnimating())
- done_waiting_ = true;
- else
- base::MessageLoop::current()->Run();
- }
-
- // Returns true if the animation has completed and it was valid.
- bool WasValidAnimation() const {
- return done_waiting_ && animation_steps_ > 0;
- }
-
- private:
- // Returns true if shelf has finished animating to the target size.
- bool IsDoneAnimating() const {
- ShelfLayoutManager* layout_manager = GetShelfLayoutManager();
- gfx::Rect current_bounds = GetShelfWidget()->GetWindowBoundsInScreen();
- int size = layout_manager->PrimaryAxisValue(current_bounds.height(),
- current_bounds.width());
- int desired_size = layout_manager->PrimaryAxisValue(target_bounds_.height(),
- target_bounds_.width());
- return (size == desired_size);
- }
-
- // views::WidgetObserver override.
- virtual void OnWidgetBoundsChanged(views::Widget* widget,
- const gfx::Rect& new_bounds) OVERRIDE {
- if (done_waiting_)
- return;
-
- ++animation_steps_;
- if (IsDoneAnimating()) {
- done_waiting_ = true;
- base::MessageLoop::current()->Quit();
- }
- }
-
- gfx::Rect target_bounds_;
- int animation_steps_;
- bool done_waiting_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfAnimationWaiter);
-};
-
-class ShelfDragCallback {
- public:
- ShelfDragCallback(const gfx::Rect& not_visible, const gfx::Rect& visible)
- : not_visible_bounds_(not_visible),
- visible_bounds_(visible),
- was_visible_on_drag_start_(false) {
- EXPECT_EQ(not_visible_bounds_.bottom(), visible_bounds_.bottom());
- }
-
- virtual ~ShelfDragCallback() {
- }
-
- void ProcessScroll(ui::EventType type, const gfx::Vector2dF& delta) {
- if (GetShelfLayoutManager()->visibility_state() == ash::SHELF_HIDDEN)
- return;
-
- if (type == ui::ET_GESTURE_SCROLL_BEGIN) {
- scroll_ = gfx::Vector2dF();
- was_visible_on_drag_start_ = GetShelfLayoutManager()->IsVisible();
- return;
- }
-
- // The state of the shelf at the end of the gesture is tested separately.
- if (type == ui::ET_GESTURE_SCROLL_END)
- return;
-
- if (type == ui::ET_GESTURE_SCROLL_UPDATE)
- scroll_.Add(delta);
-
- gfx::Rect shelf_bounds = GetShelfWidget()->GetWindowBoundsInScreen();
- if (GetShelfLayoutManager()->IsHorizontalAlignment()) {
- EXPECT_EQ(not_visible_bounds_.bottom(), shelf_bounds.bottom());
- EXPECT_EQ(visible_bounds_.bottom(), shelf_bounds.bottom());
- } else if (SHELF_ALIGNMENT_RIGHT ==
- GetShelfLayoutManager()->GetAlignment()){
- EXPECT_EQ(not_visible_bounds_.right(), shelf_bounds.right());
- EXPECT_EQ(visible_bounds_.right(), shelf_bounds.right());
- } else if (SHELF_ALIGNMENT_LEFT ==
- GetShelfLayoutManager()->GetAlignment()) {
- EXPECT_EQ(not_visible_bounds_.x(), shelf_bounds.x());
- EXPECT_EQ(visible_bounds_.x(), shelf_bounds.x());
- }
-
- // if the shelf is being dimmed test dimmer bounds as well.
- if (GetShelfWidget()->GetDimsShelf())
- EXPECT_EQ(GetShelfWidget()->GetWindowBoundsInScreen(),
- GetShelfWidget()->GetDimmerBoundsForTest());
-
- // The shelf should never be smaller than the hidden state.
- EXPECT_GE(shelf_bounds.height(), not_visible_bounds_.height());
- float scroll_delta = GetShelfLayoutManager()->PrimaryAxisValue(
- scroll_.y(),
- scroll_.x());
- bool increasing_drag =
- GetShelfLayoutManager()->SelectValueForShelfAlignment(
- scroll_delta < 0,
- scroll_delta > 0,
- scroll_delta < 0,
- scroll_delta > 0);
- int shelf_size = GetShelfLayoutManager()->PrimaryAxisValue(
- shelf_bounds.height(),
- shelf_bounds.width());
- int visible_bounds_size = GetShelfLayoutManager()->PrimaryAxisValue(
- visible_bounds_.height(),
- visible_bounds_.width());
- int not_visible_bounds_size = GetShelfLayoutManager()->PrimaryAxisValue(
- not_visible_bounds_.height(),
- not_visible_bounds_.width());
- if (was_visible_on_drag_start_) {
- if (increasing_drag) {
- // If dragging inwards from the visible state, then the shelf should
- // increase in size, but not more than the scroll delta.
- EXPECT_LE(visible_bounds_size, shelf_size);
- EXPECT_LE(abs(shelf_size - visible_bounds_size),
- abs(scroll_delta));
- } else {
- if (shelf_size > not_visible_bounds_size) {
- // If dragging outwards from the visible state, then the shelf
- // should decrease in size, until it reaches the minimum size.
- EXPECT_EQ(shelf_size, visible_bounds_size - abs(scroll_delta));
- }
- }
- } else {
- if (fabs(scroll_delta) <
- visible_bounds_size - not_visible_bounds_size) {
- // Tests that the shelf sticks with the touch point during the drag
- // until the shelf is completely visible.
- EXPECT_EQ(shelf_size, not_visible_bounds_size + abs(scroll_delta));
- } else {
- // Tests that after the shelf is completely visible, the shelf starts
- // resisting the drag.
- EXPECT_LT(shelf_size, not_visible_bounds_size + abs(scroll_delta));
- }
- }
- }
-
- private:
- const gfx::Rect not_visible_bounds_;
- const gfx::Rect visible_bounds_;
- gfx::Vector2dF scroll_;
- bool was_visible_on_drag_start_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfDragCallback);
-};
-
-class ShelfLayoutObserverTest : public ShelfLayoutManagerObserver {
- public:
- ShelfLayoutObserverTest()
- : changed_auto_hide_state_(false) {
- }
-
- virtual ~ShelfLayoutObserverTest() {}
-
- bool changed_auto_hide_state() const { return changed_auto_hide_state_; }
-
- private:
- virtual void OnAutoHideStateChanged(
- ShelfAutoHideState new_state) OVERRIDE {
- changed_auto_hide_state_ = true;
- }
-
- bool changed_auto_hide_state_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfLayoutObserverTest);
-};
-
-// Trivial item implementation that tracks its views for testing.
-class TestItem : public SystemTrayItem {
- public:
- TestItem()
- : SystemTrayItem(GetSystemTray()),
- tray_view_(NULL),
- default_view_(NULL),
- detailed_view_(NULL),
- notification_view_(NULL) {}
-
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE {
- tray_view_ = new views::View;
- // Add a label so it has non-zero width.
- tray_view_->SetLayoutManager(new views::FillLayout);
- tray_view_->AddChildView(new views::Label(UTF8ToUTF16("Tray")));
- return tray_view_;
- }
-
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE {
- default_view_ = new views::View;
- default_view_->SetLayoutManager(new views::FillLayout);
- default_view_->AddChildView(new views::Label(UTF8ToUTF16("Default")));
- return default_view_;
- }
-
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE {
- detailed_view_ = new views::View;
- detailed_view_->SetLayoutManager(new views::FillLayout);
- detailed_view_->AddChildView(new views::Label(UTF8ToUTF16("Detailed")));
- return detailed_view_;
- }
-
- virtual views::View* CreateNotificationView(
- user::LoginStatus status) OVERRIDE {
- notification_view_ = new views::View;
- return notification_view_;
- }
-
- virtual void DestroyTrayView() OVERRIDE {
- tray_view_ = NULL;
- }
-
- virtual void DestroyDefaultView() OVERRIDE {
- default_view_ = NULL;
- }
-
- virtual void DestroyDetailedView() OVERRIDE {
- detailed_view_ = NULL;
- }
-
- virtual void DestroyNotificationView() OVERRIDE {
- notification_view_ = NULL;
- }
-
- virtual void UpdateAfterLoginStatusChange(
- user::LoginStatus status) OVERRIDE {}
-
- views::View* tray_view() const { return tray_view_; }
- views::View* default_view() const { return default_view_; }
- views::View* detailed_view() const { return detailed_view_; }
- views::View* notification_view() const { return notification_view_; }
-
- private:
- views::View* tray_view_;
- views::View* default_view_;
- views::View* detailed_view_;
- views::View* notification_view_;
-
- DISALLOW_COPY_AND_ASSIGN(TestItem);
-};
-
-} // namespace
-
-class ShelfLayoutManagerTest : public ash::test::AshTestBase {
- public:
- ShelfLayoutManagerTest() {}
-
- void SetState(ShelfLayoutManager* shelf,
- ShelfVisibilityState state) {
- shelf->SetState(state);
- }
-
- void UpdateAutoHideStateNow() {
- GetShelfLayoutManager()->UpdateAutoHideStateNow();
- }
-
- aura::Window* CreateTestWindow() {
- aura::Window* window = new aura::Window(NULL);
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- window->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window->Init(ui::LAYER_TEXTURED);
- ParentWindowInPrimaryRootWindow(window);
- return window;
- }
-
- views::Widget* CreateTestWidgetWithParams(
- const views::Widget::InitParams& params) {
- views::Widget* out = new views::Widget;
- out->Init(params);
- out->Show();
- return out;
- }
-
- // Create a simple widget attached to the current context (will
- // delete on TearDown).
- views::Widget* CreateTestWidget() {
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
- params.bounds = gfx::Rect(0, 0, 200, 200);
- params.context = CurrentContext();
- return CreateTestWidgetWithParams(params);
- }
-
- // Overridden from AshTestBase:
- virtual void SetUp() OVERRIDE {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshEnableTrayDragging);
- test::AshTestBase::SetUp();
- }
-
- void RunGestureDragTests(gfx::Vector2d);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManagerTest);
-};
-
-void ShelfLayoutManagerTest::RunGestureDragTests(gfx::Vector2d delta) {
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
- params.bounds = gfx::Rect(0, 0, 200, 200);
- params.context = CurrentContext();
- widget->Init(params);
- widget->Show();
- widget->Maximize();
-
- aura::Window* window = widget->GetNativeWindow();
- shelf->LayoutShelf();
-
- gfx::Rect shelf_shown = GetShelfWidget()->GetWindowBoundsInScreen();
- gfx::Rect bounds_shelf = window->bounds();
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
-
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- shelf->LayoutShelf();
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- gfx::Rect bounds_noshelf = window->bounds();
- gfx::Rect shelf_hidden = GetShelfWidget()->GetWindowBoundsInScreen();
-
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
- shelf->LayoutShelf();
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- const int kNumScrollSteps = 4;
- ShelfDragCallback handler(shelf_hidden, shelf_shown);
-
- // Swipe up on the shelf. This should not change any state.
- gfx::Point start = GetShelfWidget()->GetWindowBoundsInScreen().CenterPoint();
- gfx::Point end = start + delta;
-
- // Swipe down on the shelf to hide it.
- generator.GestureScrollSequenceWithCallback(start, end,
- base::TimeDelta::FromMilliseconds(10), kNumScrollSteps,
- base::Bind(&ShelfDragCallback::ProcessScroll,
- base::Unretained(&handler)));
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, shelf->auto_hide_behavior());
- EXPECT_NE(bounds_shelf.ToString(), window->bounds().ToString());
- EXPECT_NE(shelf_shown.ToString(),
- GetShelfWidget()->GetWindowBoundsInScreen().ToString());
-
- // Swipe up to show the shelf.
- generator.GestureScrollSequenceWithCallback(end, start,
- base::TimeDelta::FromMilliseconds(10), kNumScrollSteps,
- base::Bind(&ShelfDragCallback::ProcessScroll,
- base::Unretained(&handler)));
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_NEVER, shelf->auto_hide_behavior());
- EXPECT_EQ(bounds_shelf.ToString(), window->bounds().ToString());
- EXPECT_EQ(GetShelfWidget()->GetDimmerBoundsForTest(),
- GetShelfWidget()->GetWindowBoundsInScreen());
- EXPECT_EQ(shelf_shown.ToString(),
- GetShelfWidget()->GetWindowBoundsInScreen().ToString());
-
- // Swipe up again. The shelf should hide.
- end = start - delta;
- generator.GestureScrollSequenceWithCallback(start, end,
- base::TimeDelta::FromMilliseconds(10), kNumScrollSteps,
- base::Bind(&ShelfDragCallback::ProcessScroll,
- base::Unretained(&handler)));
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, shelf->auto_hide_behavior());
- EXPECT_EQ(shelf_hidden.ToString(),
- GetShelfWidget()->GetWindowBoundsInScreen().ToString());
-
- // Swipe up yet again to show it.
- end = start + delta;
- generator.GestureScrollSequenceWithCallback(end, start,
- base::TimeDelta::FromMilliseconds(10), kNumScrollSteps,
- base::Bind(&ShelfDragCallback::ProcessScroll,
- base::Unretained(&handler)));
-
- // Swipe down very little. It shouldn't change any state.
- if (GetShelfLayoutManager()->IsHorizontalAlignment())
- end.set_y(start.y() + shelf_shown.height() * 3 / 10);
- else if (SHELF_ALIGNMENT_LEFT == GetShelfLayoutManager()->GetAlignment())
- end.set_x(start.x() - shelf_shown.width() * 3 / 10);
- else if (SHELF_ALIGNMENT_RIGHT == GetShelfLayoutManager()->GetAlignment())
- end.set_x(start.x() + shelf_shown.width() * 3 / 10);
- generator.GestureScrollSequence(start, end,
- base::TimeDelta::FromMilliseconds(10), 5);
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_NEVER, shelf->auto_hide_behavior());
- EXPECT_EQ(bounds_shelf.ToString(), window->bounds().ToString());
- EXPECT_EQ(shelf_shown.ToString(),
- GetShelfWidget()->GetWindowBoundsInScreen().ToString());
-
- // Swipe down again to hide.
- end = start + delta;
- generator.GestureScrollSequenceWithCallback(start, end,
- base::TimeDelta::FromMilliseconds(10), kNumScrollSteps,
- base::Bind(&ShelfDragCallback::ProcessScroll,
- base::Unretained(&handler)));
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, shelf->auto_hide_behavior());
- EXPECT_EQ(GetShelfWidget()->GetDimmerBoundsForTest(), gfx::Rect());
- EXPECT_EQ(bounds_noshelf.ToString(), window->bounds().ToString());
- EXPECT_EQ(shelf_hidden.ToString(),
- GetShelfWidget()->GetWindowBoundsInScreen().ToString());
-
- // Swipe up in extended hit region to show it.
- gfx::Point extended_start = start;
- if (GetShelfLayoutManager()->IsHorizontalAlignment())
- extended_start.set_y(GetShelfWidget()->GetWindowBoundsInScreen().y() -1);
- else if (SHELF_ALIGNMENT_LEFT == GetShelfLayoutManager()->GetAlignment())
- extended_start.set_x(
- GetShelfWidget()->GetWindowBoundsInScreen().right() + 1);
- else if (SHELF_ALIGNMENT_RIGHT == GetShelfLayoutManager()->GetAlignment())
- extended_start.set_x(GetShelfWidget()->GetWindowBoundsInScreen().x() - 1);
- end = extended_start - delta;
- generator.GestureScrollSequenceWithCallback(extended_start, end,
- base::TimeDelta::FromMilliseconds(10), kNumScrollSteps,
- base::Bind(&ShelfDragCallback::ProcessScroll,
- base::Unretained(&handler)));
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_NEVER, shelf->auto_hide_behavior());
- EXPECT_EQ(bounds_shelf.ToString(), window->bounds().ToString());
- EXPECT_EQ(GetShelfWidget()->GetDimmerBoundsForTest(),
- GetShelfWidget()->GetWindowBoundsInScreen());
- EXPECT_EQ(shelf_shown.ToString(),
- GetShelfWidget()->GetWindowBoundsInScreen().ToString());
-
- // Swipe down again to hide.
- end = start + delta;
- generator.GestureScrollSequenceWithCallback(start, end,
- base::TimeDelta::FromMilliseconds(10), kNumScrollSteps,
- base::Bind(&ShelfDragCallback::ProcessScroll,
- base::Unretained(&handler)));
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, shelf->auto_hide_behavior());
- EXPECT_EQ(GetShelfWidget()->GetDimmerBoundsForTest(), gfx::Rect());
- EXPECT_EQ(bounds_noshelf.ToString(), window->bounds().ToString());
- EXPECT_EQ(shelf_hidden.ToString(),
- GetShelfWidget()->GetWindowBoundsInScreen().ToString());
-
- // Swipe up outside the hit area. This should not change anything.
- gfx::Point outside_start = gfx::Point(
- (GetShelfWidget()->GetWindowBoundsInScreen().x() +
- GetShelfWidget()->GetWindowBoundsInScreen().right())/2,
- GetShelfWidget()->GetWindowBoundsInScreen().y() - 50);
- end = outside_start + delta;
- generator.GestureScrollSequence(outside_start,
- end,
- base::TimeDelta::FromMilliseconds(10),
- kNumScrollSteps);
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, shelf->auto_hide_behavior());
- EXPECT_EQ(shelf_hidden.ToString(),
- GetShelfWidget()->GetWindowBoundsInScreen().ToString());
-
- // Swipe up from below the shelf where a bezel would be, this should show the
- // shelf.
- gfx::Point below_start = start;
- if (GetShelfLayoutManager()->IsHorizontalAlignment())
- below_start.set_y(GetShelfWidget()->GetWindowBoundsInScreen().bottom() + 1);
- else if (SHELF_ALIGNMENT_LEFT == GetShelfLayoutManager()->GetAlignment())
- below_start.set_x(
- GetShelfWidget()->GetWindowBoundsInScreen().x() - 1);
- else if (SHELF_ALIGNMENT_RIGHT == GetShelfLayoutManager()->GetAlignment())
- below_start.set_x(GetShelfWidget()->GetWindowBoundsInScreen().right() + 1);
- end = below_start - delta;
- generator.GestureScrollSequence(below_start,
- end,
- base::TimeDelta::FromMilliseconds(10),
- kNumScrollSteps);
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_NEVER, shelf->auto_hide_behavior());
- EXPECT_EQ(bounds_shelf.ToString(), window->bounds().ToString());
- EXPECT_EQ(GetShelfWidget()->GetDimmerBoundsForTest(),
- GetShelfWidget()->GetWindowBoundsInScreen());
- EXPECT_EQ(shelf_shown.ToString(),
- GetShelfWidget()->GetWindowBoundsInScreen().ToString());
-
- // Swipe down again to hide.
- end = start + delta;
- generator.GestureScrollSequenceWithCallback(start, end,
- base::TimeDelta::FromMilliseconds(10), kNumScrollSteps,
- base::Bind(&ShelfDragCallback::ProcessScroll,
- base::Unretained(&handler)));
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, shelf->auto_hide_behavior());
- EXPECT_EQ(GetShelfWidget()->GetDimmerBoundsForTest(), gfx::Rect());
- EXPECT_EQ(bounds_noshelf.ToString(), window->bounds().ToString());
- EXPECT_EQ(shelf_hidden.ToString(),
- GetShelfWidget()->GetWindowBoundsInScreen().ToString());
-
- // Put |widget| into fullscreen. Set the shelf to be auto hidden when |widget|
- // is fullscreen. (eg browser immersive fullscreen).
- widget->SetFullscreen(true);
- wm::GetWindowState(window)->set_hide_shelf_when_fullscreen(false);
- shelf->UpdateVisibilityState();
-
- gfx::Rect bounds_fullscreen = window->bounds();
- EXPECT_TRUE(widget->IsFullscreen());
- EXPECT_NE(bounds_noshelf.ToString(), bounds_fullscreen.ToString());
-
- // Swipe up. This should show the shelf.
- end = below_start - delta;
- generator.GestureScrollSequenceWithCallback(below_start, end,
- base::TimeDelta::FromMilliseconds(10), kNumScrollSteps,
- base::Bind(&ShelfDragCallback::ProcessScroll,
- base::Unretained(&handler)));
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_NEVER, shelf->auto_hide_behavior());
- EXPECT_EQ(shelf_shown.ToString(),
- GetShelfWidget()->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ(bounds_fullscreen.ToString(), window->bounds().ToString());
-
- // Swipe up again. This should hide the shelf.
- generator.GestureScrollSequenceWithCallback(below_start, end,
- base::TimeDelta::FromMilliseconds(10), kNumScrollSteps,
- base::Bind(&ShelfDragCallback::ProcessScroll,
- base::Unretained(&handler)));
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, shelf->auto_hide_behavior());
- EXPECT_EQ(shelf_hidden.ToString(),
- GetShelfWidget()->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ(bounds_fullscreen.ToString(), window->bounds().ToString());
-
- // Set the shelf to be hidden when |widget| is fullscreen. (eg tab fullscreen
- // with or without immersive browser fullscreen).
- wm::GetWindowState(window)->set_hide_shelf_when_fullscreen(true);
- shelf->UpdateVisibilityState();
- EXPECT_EQ(SHELF_HIDDEN, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, shelf->auto_hide_behavior());
-
- // Swipe-up. This should not change anything.
- end = start - delta;
- generator.GestureScrollSequenceWithCallback(below_start, end,
- base::TimeDelta::FromMilliseconds(10), kNumScrollSteps,
- base::Bind(&ShelfDragCallback::ProcessScroll,
- base::Unretained(&handler)));
- EXPECT_EQ(SHELF_HIDDEN, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, shelf->auto_hide_behavior());
- EXPECT_EQ(bounds_fullscreen.ToString(), window->bounds().ToString());
-
- // Close actually, otherwise further event may be affected since widget
- // is fullscreen status.
- widget->Close();
- RunAllPendingInMessageLoop();
-
- // The shelf should be shown because there are no more visible windows.
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, shelf->auto_hide_behavior());
-
- // Swipe-up to hide. This should have no effect because there are no visible
- // windows.
- end = below_start - delta;
- generator.GestureScrollSequenceWithCallback(below_start, end,
- base::TimeDelta::FromMilliseconds(10), kNumScrollSteps,
- base::Bind(&ShelfDragCallback::ProcessScroll,
- base::Unretained(&handler)));
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, shelf->auto_hide_behavior());
-}
-
-// Need to be implemented. http://crbug.com/111279.
-#if defined(OS_WIN)
-#define MAYBE_SetVisible DISABLED_SetVisible
-#else
-#define MAYBE_SetVisible SetVisible
-#endif
-// Makes sure SetVisible updates work area and widget appropriately.
-TEST_F(ShelfLayoutManagerTest, MAYBE_SetVisible) {
- ShelfWidget* shelf = GetShelfWidget();
- ShelfLayoutManager* manager = shelf->shelf_layout_manager();
- // Force an initial layout.
- manager->LayoutShelf();
- EXPECT_EQ(SHELF_VISIBLE, manager->visibility_state());
-
- gfx::Rect status_bounds(
- shelf->status_area_widget()->GetWindowBoundsInScreen());
- gfx::Rect launcher_bounds(
- shelf->GetWindowBoundsInScreen());
- int shelf_height = manager->GetIdealBounds().height();
- gfx::Screen* screen = Shell::GetScreen();
- gfx::Display display = screen->GetDisplayNearestWindow(
- Shell::GetPrimaryRootWindow());
- ASSERT_NE(-1, display.id());
- // Bottom inset should be the max of widget heights.
- EXPECT_EQ(shelf_height, display.GetWorkAreaInsets().bottom());
-
- // Hide the shelf.
- SetState(manager, SHELF_HIDDEN);
- // Run the animation to completion.
- StepWidgetLayerAnimatorToEnd(shelf);
- StepWidgetLayerAnimatorToEnd(shelf->status_area_widget());
- EXPECT_EQ(SHELF_HIDDEN, manager->visibility_state());
- display = screen->GetDisplayNearestWindow(
- Shell::GetPrimaryRootWindow());
-
- EXPECT_EQ(0, display.GetWorkAreaInsets().bottom());
-
- // Make sure the bounds of the two widgets changed.
- EXPECT_GE(shelf->GetNativeView()->bounds().y(),
- screen->GetPrimaryDisplay().bounds().bottom());
- EXPECT_GE(shelf->status_area_widget()->GetNativeView()->bounds().y(),
- screen->GetPrimaryDisplay().bounds().bottom());
-
- // And show it again.
- SetState(manager, SHELF_VISIBLE);
- // Run the animation to completion.
- StepWidgetLayerAnimatorToEnd(shelf);
- StepWidgetLayerAnimatorToEnd(shelf->status_area_widget());
- EXPECT_EQ(SHELF_VISIBLE, manager->visibility_state());
- display = screen->GetDisplayNearestWindow(
- Shell::GetPrimaryRootWindow());
- EXPECT_EQ(shelf_height, display.GetWorkAreaInsets().bottom());
-
- // Make sure the bounds of the two widgets changed.
- launcher_bounds = shelf->GetNativeView()->bounds();
- EXPECT_LT(launcher_bounds.y(),
- screen->GetPrimaryDisplay().bounds().bottom());
- status_bounds = shelf->status_area_widget()->GetNativeView()->bounds();
- EXPECT_LT(status_bounds.y(),
- screen->GetPrimaryDisplay().bounds().bottom());
-}
-
-// Makes sure shelf alignment is correct for lock screen.
-TEST_F(ShelfLayoutManagerTest, SideAlignmentInteractionWithLockScreen) {
- ShelfLayoutManager* manager = GetShelfWidget()->shelf_layout_manager();
- manager->SetAlignment(SHELF_ALIGNMENT_LEFT);
- EXPECT_EQ(SHELF_ALIGNMENT_LEFT, manager->GetAlignment());
- Shell::GetInstance()->session_state_delegate()->LockScreen();
- EXPECT_EQ(SHELF_ALIGNMENT_BOTTOM, manager->GetAlignment());
- Shell::GetInstance()->session_state_delegate()->UnlockScreen();
- EXPECT_EQ(SHELF_ALIGNMENT_LEFT, manager->GetAlignment());
-}
-
-// Makes sure LayoutShelf invoked while animating cleans things up.
-TEST_F(ShelfLayoutManagerTest, LayoutShelfWhileAnimating) {
- ShelfWidget* shelf = GetShelfWidget();
- // Force an initial layout.
- shelf->shelf_layout_manager()->LayoutShelf();
- EXPECT_EQ(SHELF_VISIBLE, shelf->shelf_layout_manager()->visibility_state());
-
- // Hide the shelf.
- SetState(shelf->shelf_layout_manager(), SHELF_HIDDEN);
- shelf->shelf_layout_manager()->LayoutShelf();
- EXPECT_EQ(SHELF_HIDDEN, shelf->shelf_layout_manager()->visibility_state());
- gfx::Display display = Shell::GetScreen()->GetDisplayNearestWindow(
- Shell::GetPrimaryRootWindow());
- EXPECT_EQ(0, display.GetWorkAreaInsets().bottom());
-
- // Make sure the bounds of the two widgets changed.
- EXPECT_GE(shelf->GetNativeView()->bounds().y(),
- Shell::GetScreen()->GetPrimaryDisplay().bounds().bottom());
- EXPECT_GE(shelf->status_area_widget()->GetNativeView()->bounds().y(),
- Shell::GetScreen()->GetPrimaryDisplay().bounds().bottom());
-}
-
-// Test that switching to a different visibility state does not restart the
-// shelf show / hide animation if it is already running. (crbug.com/250918)
-TEST_F(ShelfLayoutManagerTest, SetStateWhileAnimating) {
- ShelfWidget* shelf = GetShelfWidget();
- SetState(shelf->shelf_layout_manager(), SHELF_VISIBLE);
- gfx::Rect initial_shelf_bounds = shelf->GetWindowBoundsInScreen();
- gfx::Rect initial_status_bounds =
- shelf->status_area_widget()->GetWindowBoundsInScreen();
-
- ui::ScopedAnimationDurationScaleMode normal_animation_duration(
- ui::ScopedAnimationDurationScaleMode::SLOW_DURATION);
- SetState(shelf->shelf_layout_manager(), SHELF_HIDDEN);
- SetState(shelf->shelf_layout_manager(), SHELF_VISIBLE);
-
- gfx::Rect current_shelf_bounds = shelf->GetWindowBoundsInScreen();
- gfx::Rect current_status_bounds =
- shelf->status_area_widget()->GetWindowBoundsInScreen();
-
- const int small_change = initial_shelf_bounds.height() / 2;
- EXPECT_LE(
- std::abs(initial_shelf_bounds.height() - current_shelf_bounds.height()),
- small_change);
- EXPECT_LE(
- std::abs(initial_status_bounds.height() - current_status_bounds.height()),
- small_change);
-}
-
-// Makes sure the launcher is sized when the status area changes size.
-TEST_F(ShelfLayoutManagerTest, LauncherUpdatedWhenStatusAreaChangesSize) {
- Launcher* launcher = Launcher::ForPrimaryDisplay();
- ASSERT_TRUE(launcher);
- ShelfWidget* shelf_widget = GetShelfWidget();
- ASSERT_TRUE(shelf_widget);
- ASSERT_TRUE(shelf_widget->status_area_widget());
- shelf_widget->status_area_widget()->SetBounds(
- gfx::Rect(0, 0, 200, 200));
- EXPECT_EQ(200, shelf_widget->GetContentsView()->width() -
- test::LauncherTestAPI(launcher).shelf_view()->width());
-}
-
-
-#if defined(OS_WIN)
-// RootWindow and Display can't resize on Windows Ash. http://crbug.com/165962
-#define MAYBE_AutoHide DISABLED_AutoHide
-#else
-#define MAYBE_AutoHide AutoHide
-#endif
-
-// Various assertions around auto-hide.
-TEST_F(ShelfLayoutManagerTest, MAYBE_AutoHide) {
- aura::Window* root = Shell::GetPrimaryRootWindow();
- aura::test::EventGenerator generator(root, root);
- generator.MoveMouseTo(0, 0);
-
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- shelf->SetAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
- params.bounds = gfx::Rect(0, 0, 200, 200);
- params.context = CurrentContext();
- // Widget is now owned by the parent window.
- widget->Init(params);
- widget->Maximize();
- widget->Show();
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- // LayoutShelf() forces the animation to completion, at which point the
- // launcher should go off the screen.
- shelf->LayoutShelf();
- EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
- GetShelfWidget()->GetWindowBoundsInScreen().y());
- EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
- Shell::GetScreen()->GetDisplayNearestWindow(
- root).work_area().bottom());
-
- // Move the mouse to the bottom of the screen.
- generator.MoveMouseTo(0, root->bounds().bottom() - 1);
-
- // Shelf should be shown again (but it shouldn't have changed the work area).
- SetState(shelf, SHELF_AUTO_HIDE);
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
- shelf->LayoutShelf();
- EXPECT_EQ(root->bounds().bottom() - shelf->GetIdealBounds().height(),
- GetShelfWidget()->GetWindowBoundsInScreen().y());
- EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
- Shell::GetScreen()->GetDisplayNearestWindow(
- root).work_area().bottom());
-
- // Move mouse back up.
- generator.MoveMouseTo(0, 0);
- SetState(shelf, SHELF_AUTO_HIDE);
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- shelf->LayoutShelf();
- EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
- GetShelfWidget()->GetWindowBoundsInScreen().y());
-
- // Drag mouse to bottom of screen.
- generator.PressLeftButton();
- generator.MoveMouseTo(0, root->bounds().bottom() - 1);
- UpdateAutoHideStateNow();
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- generator.ReleaseLeftButton();
- generator.MoveMouseTo(1, root->bounds().bottom() - 1);
- UpdateAutoHideStateNow();
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
- generator.PressLeftButton();
- generator.MoveMouseTo(1, root->bounds().bottom() - 1);
- UpdateAutoHideStateNow();
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
-}
-
-// Test the behavior of the shelf when it is auto hidden and it is on the
-// boundary between the primary and the secondary display.
-TEST_F(ShelfLayoutManagerTest, AutoHideShelfOnScreenBoundary) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("800x600,800x600");
- DisplayLayout display_layout(DisplayLayout::RIGHT, 0);
- Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays(
- display_layout);
- // Put the primary monitor's shelf on the display boundary.
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- shelf->SetAlignment(SHELF_ALIGNMENT_RIGHT);
-
- // Create a window because the shelf is always shown when no windows are
- // visible.
- CreateTestWidget();
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- ASSERT_EQ(root_windows[0],
- GetShelfWidget()->GetNativeWindow()->GetRootWindow());
-
- shelf->SetAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
-
- int right_edge = root_windows[0]->GetBoundsInScreen().right() - 1;
- int y = root_windows[0]->GetBoundsInScreen().y();
-
- // Start off the mouse nowhere near the shelf; the shelf should be hidden.
- aura::test::EventGenerator& generator(GetEventGenerator());
- generator.MoveMouseTo(right_edge - 50, y);
- UpdateAutoHideStateNow();
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- // Moving the mouse over the light bar (but not to the edge of the screen)
- // should show the shelf.
- generator.MoveMouseTo(right_edge - 1, y);
- UpdateAutoHideStateNow();
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
- EXPECT_EQ(right_edge - 1, Shell::GetScreen()->GetCursorScreenPoint().x());
-
- // Moving the mouse off the light bar should hide the shelf.
- generator.MoveMouseTo(right_edge - 50, y);
- UpdateAutoHideStateNow();
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- // Moving the mouse to the right edge of the screen crossing the light bar
- // should show the shelf despite the mouse cursor getting warped to the
- // secondary display.
- generator.MoveMouseTo(right_edge - 1, y);
- generator.MoveMouseTo(right_edge, y);
- UpdateAutoHideStateNow();
- EXPECT_NE(right_edge - 1, Shell::GetScreen()->GetCursorScreenPoint().x());
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
-
- // Hide the shelf.
- generator.MoveMouseTo(right_edge - 50, y);
- UpdateAutoHideStateNow();
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- // Moving the mouse to the right edge of the screen crossing the light bar and
- // overshooting by a lot should keep the shelf hidden.
- generator.MoveMouseTo(right_edge - 1, y);
- generator.MoveMouseTo(right_edge + 50, y);
- UpdateAutoHideStateNow();
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- // Moving the mouse to the right edge of the screen crossing the light bar and
- // overshooting a bit should show the shelf.
- generator.MoveMouseTo(right_edge - 1, y);
- generator.MoveMouseTo(right_edge + 2, y);
- UpdateAutoHideStateNow();
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
-
- // Keeping the mouse close to the left edge of the secondary display after the
- // shelf is shown should keep the shelf shown.
- generator.MoveMouseTo(right_edge + 2, y + 1);
- UpdateAutoHideStateNow();
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
-
- // Moving the mouse far from the left edge of the secondary display should
- // hide the shelf.
- generator.MoveMouseTo(right_edge + 50, y);
- UpdateAutoHideStateNow();
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- // Moving to the left edge of the secondary display without first crossing
- // the primary display's right aligned shelf first should not show the shelf.
- generator.MoveMouseTo(right_edge + 2, y);
- UpdateAutoHideStateNow();
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-}
-
-// Assertions around the lock screen showing.
-TEST_F(ShelfLayoutManagerTest, VisibleWhenLockScreenShowing) {
- // Since ShelfLayoutManager queries for mouse location, move the mouse so
- // it isn't over the shelf.
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
- generator.MoveMouseTo(0, 0);
-
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- shelf->SetAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
- params.bounds = gfx::Rect(0, 0, 200, 200);
- params.context = CurrentContext();
- // Widget is now owned by the parent window.
- widget->Init(params);
- widget->Maximize();
- widget->Show();
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- aura::Window* root = Shell::GetPrimaryRootWindow();
- // LayoutShelf() forces the animation to completion, at which point the
- // launcher should go off the screen.
- shelf->LayoutShelf();
- EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
- GetShelfWidget()->GetWindowBoundsInScreen().y());
-
- aura::Window* lock_container = Shell::GetContainer(
- Shell::GetPrimaryRootWindow(),
- internal::kShellWindowId_LockScreenContainer);
-
- views::Widget* lock_widget = new views::Widget;
- views::Widget::InitParams lock_params(
- views::Widget::InitParams::TYPE_WINDOW);
- lock_params.bounds = gfx::Rect(0, 0, 200, 200);
- params.context = CurrentContext();
- lock_params.parent = lock_container;
- // Widget is now owned by the parent window.
- lock_widget->Init(lock_params);
- lock_widget->Maximize();
- lock_widget->Show();
-
- // Lock the screen.
- Shell::GetInstance()->session_state_delegate()->LockScreen();
- shelf->UpdateVisibilityState();
- // Showing a widget in the lock screen should force the shelf to be visibile.
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
-
- Shell::GetInstance()->session_state_delegate()->UnlockScreen();
- shelf->UpdateVisibilityState();
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
-}
-
-// Assertions around SetAutoHideBehavior.
-TEST_F(ShelfLayoutManagerTest, SetAutoHideBehavior) {
- // Since ShelfLayoutManager queries for mouse location, move the mouse so
- // it isn't over the shelf.
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
- generator.MoveMouseTo(0, 0);
-
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
- params.bounds = gfx::Rect(0, 0, 200, 200);
- params.context = CurrentContext();
- // Widget is now owned by the parent window.
- widget->Init(params);
- widget->Show();
- aura::Window* window = widget->GetNativeWindow();
- gfx::Rect display_bounds(
- Shell::GetScreen()->GetDisplayNearestWindow(window).bounds());
-
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
-
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
-
- widget->Maximize();
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
- EXPECT_EQ(Shell::GetScreen()->GetDisplayNearestWindow(
- window).work_area().bottom(),
- widget->GetWorkAreaBoundsInScreen().bottom());
-
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(Shell::GetScreen()->GetDisplayNearestWindow(
- window).work_area().bottom(),
- widget->GetWorkAreaBoundsInScreen().bottom());
-
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
- EXPECT_EQ(Shell::GetScreen()->GetDisplayNearestWindow(
- window).work_area().bottom(),
- widget->GetWorkAreaBoundsInScreen().bottom());
-}
-
-// Basic assertions around the dimming of the shelf.
-TEST_F(ShelfLayoutManagerTest, TestDimmingBehavior) {
- // Since ShelfLayoutManager queries for mouse location, move the mouse so
- // it isn't over the shelf.
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
- generator.MoveMouseTo(0, 0);
-
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- shelf->shelf_widget()->DisableDimmingAnimationsForTest();
-
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
- params.bounds = gfx::Rect(0, 0, 200, 200);
- params.context = CurrentContext();
- // Widget is now owned by the parent window.
- widget->Init(params);
- widget->Show();
- aura::Window* window = widget->GetNativeWindow();
- gfx::Rect display_bounds(
- Shell::GetScreen()->GetDisplayNearestWindow(window).bounds());
-
- gfx::Point off_shelf = display_bounds.CenterPoint();
- gfx::Point on_shelf =
- shelf->shelf_widget()->GetWindowBoundsInScreen().CenterPoint();
-
- // Test there is no dimming object active at this point.
- generator.MoveMouseTo(on_shelf.x(), on_shelf.y());
- EXPECT_EQ(-1, shelf->shelf_widget()->GetDimmingAlphaForTest());
- generator.MoveMouseTo(off_shelf.x(), off_shelf.y());
- EXPECT_EQ(-1, shelf->shelf_widget()->GetDimmingAlphaForTest());
-
- // After maximization, the shelf should be visible and the dimmer created.
- widget->Maximize();
-
- on_shelf = shelf->shelf_widget()->GetWindowBoundsInScreen().CenterPoint();
- EXPECT_LT(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
-
- // Moving the mouse off the shelf should dim the bar.
- generator.MoveMouseTo(off_shelf.x(), off_shelf.y());
- EXPECT_LT(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
-
- // Adding touch events outside the shelf should still keep the shelf in
- // dimmed state.
- generator.PressTouch();
- generator.MoveTouch(off_shelf);
- EXPECT_LT(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
- // Move the touch into the shelf area should undim.
- generator.MoveTouch(on_shelf);
- EXPECT_EQ(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
- generator.ReleaseTouch();
- // And a release dims again.
- EXPECT_LT(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
-
- // Moving the mouse on the shelf should undim the bar.
- generator.MoveMouseTo(on_shelf);
- EXPECT_EQ(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
-
- // No matter what the touch events do, the shelf should stay undimmed.
- generator.PressTouch();
- generator.MoveTouch(off_shelf);
- EXPECT_EQ(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
- generator.MoveTouch(on_shelf);
- EXPECT_EQ(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
- generator.MoveTouch(off_shelf);
- EXPECT_EQ(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
- generator.MoveTouch(on_shelf);
- generator.ReleaseTouch();
-
- // After restore, the dimming object should be deleted again.
- widget->Restore();
- EXPECT_EQ(-1, shelf->shelf_widget()->GetDimmingAlphaForTest());
-}
-
-// Assertions around the dimming of the shelf in conjunction with menus.
-TEST_F(ShelfLayoutManagerTest, TestDimmingBehaviorWithMenus) {
- // Since ShelfLayoutManager queries for mouse location, move the mouse so
- // it isn't over the shelf.
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
- generator.MoveMouseTo(0, 0);
-
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- shelf->shelf_widget()->DisableDimmingAnimationsForTest();
-
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
- params.bounds = gfx::Rect(0, 0, 200, 200);
- params.context = CurrentContext();
- // Widget is now owned by the parent window.
- widget->Init(params);
- widget->Show();
- aura::Window* window = widget->GetNativeWindow();
- gfx::Rect display_bounds(
- Shell::GetScreen()->GetDisplayNearestWindow(window).bounds());
-
- // After maximization, the shelf should be visible and the dimmer created.
- widget->Maximize();
-
- gfx::Point off_shelf = display_bounds.CenterPoint();
- gfx::Point on_shelf =
- shelf->shelf_widget()->GetWindowBoundsInScreen().CenterPoint();
-
- // Moving the mouse on the shelf should undim the bar.
- generator.MoveMouseTo(on_shelf.x(), on_shelf.y());
- EXPECT_EQ(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
-
- // Simulate a menu opening.
- shelf->shelf_widget()->ForceUndimming(true);
-
- // Moving the mouse off the shelf should not dim the bar.
- generator.MoveMouseTo(off_shelf.x(), off_shelf.y());
- EXPECT_EQ(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
-
- // No matter what the touch events do, the shelf should stay undimmed.
- generator.PressTouch();
- generator.MoveTouch(off_shelf);
- EXPECT_EQ(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
- generator.MoveTouch(on_shelf);
- EXPECT_EQ(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
- generator.MoveTouch(off_shelf);
- EXPECT_EQ(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
- generator.ReleaseTouch();
- EXPECT_EQ(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
-
- // "Closing the menu" should now turn off the menu since no event is inside
- // the shelf any longer.
- shelf->shelf_widget()->ForceUndimming(false);
- EXPECT_LT(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
-
- // Moving the mouse again on the shelf which should undim the bar again.
- // This time we check that the bar stays undimmed when the mouse remains on
- // the bar and the "menu gets closed".
- generator.MoveMouseTo(on_shelf.x(), on_shelf.y());
- EXPECT_EQ(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
- shelf->shelf_widget()->ForceUndimming(true);
- generator.MoveMouseTo(off_shelf.x(), off_shelf.y());
- EXPECT_EQ(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
- generator.MoveMouseTo(on_shelf.x(), on_shelf.y());
- EXPECT_EQ(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
- shelf->shelf_widget()->ForceUndimming(true);
- EXPECT_EQ(0, shelf->shelf_widget()->GetDimmingAlphaForTest());
-}
-
-// Verifies the shelf is visible when status/launcher is focused.
-TEST_F(ShelfLayoutManagerTest, VisibleWhenStatusOrLauncherFocused) {
- // Since ShelfLayoutManager queries for mouse location, move the mouse so
- // it isn't over the shelf.
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
- generator.MoveMouseTo(0, 0);
-
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
- params.bounds = gfx::Rect(0, 0, 200, 200);
- params.context = CurrentContext();
- // Widget is now owned by the parent window.
- widget->Init(params);
- widget->Show();
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- // Focus the launcher. Have to go through the focus cycler as normal focus
- // requests to it do nothing.
- GetShelfWidget()->GetFocusCycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
-
- widget->Activate();
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- // Trying to activate the status should fail, since we only allow activating
- // it when the user is using the keyboard (i.e. through FocusCycler).
- GetShelfWidget()->status_area_widget()->Activate();
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- GetShelfWidget()->GetFocusCycler()->RotateFocus(FocusCycler::FORWARD);
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
-}
-
-// Makes sure shelf will be visible when app list opens as shelf is in
-// SHELF_VISIBLE state,and toggling app list won't change shelf
-// visibility state.
-TEST_F(ShelfLayoutManagerTest, OpenAppListWithShelfVisibleState) {
- Shell* shell = Shell::GetInstance();
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- shelf->LayoutShelf();
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
-
- // Create a normal unmaximized windowm shelf should be visible.
- aura::Window* window = CreateTestWindow();
- window->SetBounds(gfx::Rect(0, 0, 100, 100));
- window->Show();
- EXPECT_FALSE(shell->GetAppListTargetVisibility());
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
-
- // Toggle app list to show, and the shelf stays visible.
- shell->ToggleAppList(NULL);
- EXPECT_TRUE(shell->GetAppListTargetVisibility());
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
-
- // Toggle app list to hide, and the shelf stays visible.
- shell->ToggleAppList(NULL);
- EXPECT_FALSE(shell->GetAppListTargetVisibility());
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
-}
-
-// Makes sure shelf will be shown with SHELF_AUTO_HIDE_SHOWN state
-// when app list opens as shelf is in SHELF_AUTO_HIDE state, and
-// toggling app list won't change shelf visibility state.
-TEST_F(ShelfLayoutManagerTest, OpenAppListWithShelfAutoHideState) {
- Shell* shell = Shell::GetInstance();
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- shelf->LayoutShelf();
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
-
- // Create a window and show it in maximized state.
- aura::Window* window = CreateTestWindow();
- window->SetBounds(gfx::Rect(0, 0, 100, 100));
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- window->Show();
- wm::ActivateWindow(window);
-
- EXPECT_FALSE(shell->GetAppListTargetVisibility());
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
-
- // Toggle app list to show.
- shell->ToggleAppList(NULL);
- // The shelf's auto hide state won't be changed until the timer fires, so
- // calling shell->UpdateShelfVisibility() is kind of manually helping it to
- // update the state.
- shell->UpdateShelfVisibility();
- EXPECT_TRUE(shell->GetAppListTargetVisibility());
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
-
- // Toggle app list to hide.
- shell->ToggleAppList(NULL);
- EXPECT_FALSE(shell->GetAppListTargetVisibility());
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
-}
-
-// Makes sure shelf will be hidden when app list opens as shelf is in HIDDEN
-// state, and toggling app list won't change shelf visibility state.
-TEST_F(ShelfLayoutManagerTest, OpenAppListWithShelfHiddenState) {
- Shell* shell = Shell::GetInstance();
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- // For shelf to be visible, app list is not open in initial state.
- shelf->LayoutShelf();
-
- // Create a window and make it full screen.
- aura::Window* window = CreateTestWindow();
- window->SetBounds(gfx::Rect(0, 0, 100, 100));
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- window->Show();
- wm::ActivateWindow(window);
-
- // App list and shelf is not shown.
- EXPECT_FALSE(shell->GetAppListTargetVisibility());
- EXPECT_EQ(SHELF_HIDDEN, shelf->visibility_state());
-
- // Toggle app list to show.
- shell->ToggleAppList(NULL);
- EXPECT_TRUE(shell->GetAppListTargetVisibility());
- EXPECT_EQ(SHELF_HIDDEN, shelf->visibility_state());
-
- // Toggle app list to hide.
- shell->ToggleAppList(NULL);
- EXPECT_FALSE(shell->GetAppListTargetVisibility());
- EXPECT_EQ(SHELF_HIDDEN, shelf->visibility_state());
-}
-
-// Tests that the shelf is only hidden for a fullscreen window at the front and
-// toggles visibility when another window is activated.
-TEST_F(ShelfLayoutManagerTest, FullscreenWindowInFrontHidesShelf) {
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
-
- // Create a window and make it full screen.
- aura::Window* window1 = CreateTestWindow();
- window1->SetBounds(gfx::Rect(0, 0, 100, 100));
- window1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- window1->Show();
-
- aura::Window* window2 = CreateTestWindow();
- window2->SetBounds(gfx::Rect(0, 0, 100, 100));
- window2->Show();
-
- wm::GetWindowState(window1)->Activate();
- EXPECT_EQ(SHELF_HIDDEN, shelf->visibility_state());
-
- wm::GetWindowState(window2)->Activate();
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
-
- wm::GetWindowState(window1)->Activate();
- EXPECT_EQ(SHELF_HIDDEN, shelf->visibility_state());
-}
-
-// Test the behavior of the shelf when a window on one display is fullscreen
-// but the other display has the active window.
-TEST_F(ShelfLayoutManagerTest, FullscreenWindowOnSecondDisplay) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("800x600,800x600");
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- Shell::RootWindowControllerList root_window_controllers =
- Shell::GetAllRootWindowControllers();
-
- // Create windows on either display.
- aura::Window* window1 = CreateTestWindow();
- window1->SetBoundsInScreen(
- gfx::Rect(0, 0, 100, 100),
- display_manager->GetDisplayAt(0));
- window1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- window1->Show();
-
- aura::Window* window2 = CreateTestWindow();
- window2->SetBoundsInScreen(
- gfx::Rect(800, 0, 100, 100),
- display_manager->GetDisplayAt(1));
- window2->Show();
-
- EXPECT_EQ(root_windows[0], window1->GetRootWindow());
- EXPECT_EQ(root_windows[1], window2->GetRootWindow());
-
- wm::GetWindowState(window2)->Activate();
- EXPECT_EQ(SHELF_HIDDEN,
- root_window_controllers[0]->GetShelfLayoutManager()->visibility_state());
- EXPECT_EQ(SHELF_VISIBLE,
- root_window_controllers[1]->GetShelfLayoutManager()->visibility_state());
-}
-
-
-#if defined(OS_WIN)
-// RootWindow and Display can't resize on Windows Ash. http://crbug.com/165962
-#define MAYBE_SetAlignment DISABLED_SetAlignment
-#else
-#define MAYBE_SetAlignment SetAlignment
-#endif
-
-// Tests SHELF_ALIGNMENT_(LEFT, RIGHT, TOP).
-TEST_F(ShelfLayoutManagerTest, MAYBE_SetAlignment) {
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- // Force an initial layout.
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
- shelf->LayoutShelf();
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
-
- shelf->SetAlignment(SHELF_ALIGNMENT_LEFT);
- gfx::Rect launcher_bounds(
- GetShelfWidget()->GetWindowBoundsInScreen());
- const gfx::Screen* screen = Shell::GetScreen();
- gfx::Display display =
- screen->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
- ASSERT_NE(-1, display.id());
- EXPECT_EQ(shelf->GetIdealBounds().width(),
- display.GetWorkAreaInsets().left());
- EXPECT_GE(
- launcher_bounds.width(),
- GetShelfWidget()->GetContentsView()->GetPreferredSize().width());
- EXPECT_EQ(SHELF_ALIGNMENT_LEFT, GetSystemTray()->shelf_alignment());
- StatusAreaWidget* status_area_widget = GetShelfWidget()->status_area_widget();
- gfx::Rect status_bounds(status_area_widget->GetWindowBoundsInScreen());
- EXPECT_GE(status_bounds.width(),
- status_area_widget->GetContentsView()->GetPreferredSize().width());
- EXPECT_EQ(shelf->GetIdealBounds().width(),
- display.GetWorkAreaInsets().left());
- EXPECT_EQ(0, display.GetWorkAreaInsets().top());
- EXPECT_EQ(0, display.GetWorkAreaInsets().bottom());
- EXPECT_EQ(0, display.GetWorkAreaInsets().right());
- EXPECT_EQ(display.bounds().x(), launcher_bounds.x());
- EXPECT_EQ(display.bounds().y(), launcher_bounds.y());
- EXPECT_EQ(display.bounds().height(), launcher_bounds.height());
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- display = screen->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
- EXPECT_EQ(ShelfLayoutManager::kAutoHideSize,
- display.GetWorkAreaInsets().left());
- EXPECT_EQ(ShelfLayoutManager::kAutoHideSize, display.work_area().x());
-
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
- shelf->SetAlignment(SHELF_ALIGNMENT_RIGHT);
- display = screen->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
- launcher_bounds = GetShelfWidget()->GetWindowBoundsInScreen();
- display = screen->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
- ASSERT_NE(-1, display.id());
- EXPECT_EQ(shelf->GetIdealBounds().width(),
- display.GetWorkAreaInsets().right());
- EXPECT_GE(launcher_bounds.width(),
- GetShelfWidget()->GetContentsView()->GetPreferredSize().width());
- EXPECT_EQ(SHELF_ALIGNMENT_RIGHT, GetSystemTray()->shelf_alignment());
- status_bounds = gfx::Rect(status_area_widget->GetWindowBoundsInScreen());
- EXPECT_GE(status_bounds.width(),
- status_area_widget->GetContentsView()->GetPreferredSize().width());
- EXPECT_EQ(shelf->GetIdealBounds().width(),
- display.GetWorkAreaInsets().right());
- EXPECT_EQ(0, display.GetWorkAreaInsets().top());
- EXPECT_EQ(0, display.GetWorkAreaInsets().bottom());
- EXPECT_EQ(0, display.GetWorkAreaInsets().left());
- EXPECT_EQ(display.work_area().right(), launcher_bounds.x());
- EXPECT_EQ(display.bounds().y(), launcher_bounds.y());
- EXPECT_EQ(display.bounds().height(), launcher_bounds.height());
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- display = screen->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
- EXPECT_EQ(ShelfLayoutManager::kAutoHideSize,
- display.GetWorkAreaInsets().right());
- EXPECT_EQ(ShelfLayoutManager::kAutoHideSize,
- display.bounds().right() - display.work_area().right());
-
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
- shelf->SetAlignment(SHELF_ALIGNMENT_TOP);
- display = screen->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
- launcher_bounds = GetShelfWidget()->GetWindowBoundsInScreen();
- display = screen->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
- ASSERT_NE(-1, display.id());
- EXPECT_EQ(shelf->GetIdealBounds().height(),
- display.GetWorkAreaInsets().top());
- EXPECT_GE(launcher_bounds.height(),
- GetShelfWidget()->GetContentsView()->GetPreferredSize().height());
- EXPECT_EQ(SHELF_ALIGNMENT_TOP, GetSystemTray()->shelf_alignment());
- status_bounds = gfx::Rect(status_area_widget->GetWindowBoundsInScreen());
- EXPECT_GE(status_bounds.height(),
- status_area_widget->GetContentsView()->GetPreferredSize().height());
- EXPECT_EQ(shelf->GetIdealBounds().height(),
- display.GetWorkAreaInsets().top());
- EXPECT_EQ(0, display.GetWorkAreaInsets().right());
- EXPECT_EQ(0, display.GetWorkAreaInsets().bottom());
- EXPECT_EQ(0, display.GetWorkAreaInsets().left());
- EXPECT_EQ(display.work_area().y(), launcher_bounds.bottom());
- EXPECT_EQ(display.bounds().x(), launcher_bounds.x());
- EXPECT_EQ(display.bounds().width(), launcher_bounds.width());
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- display = screen->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
- EXPECT_EQ(ShelfLayoutManager::kAutoHideSize,
- display.GetWorkAreaInsets().top());
- EXPECT_EQ(ShelfLayoutManager::kAutoHideSize,
- display.work_area().y() - display.bounds().y());
-}
-
-#if defined(OS_WIN)
-// RootWindow and Display can't resize on Windows Ash. http://crbug.com/165962
-#define MAYBE_GestureDrag DISABLED_GestureDrag
-#else
-#define MAYBE_GestureDrag GestureDrag
-#endif
-
-TEST_F(ShelfLayoutManagerTest, MAYBE_GestureDrag) {
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- {
- SCOPED_TRACE("BOTTOM");
- RunGestureDragTests(gfx::Vector2d(0, 120));
- }
-
- {
- SCOPED_TRACE("LEFT");
- shelf->SetAlignment(SHELF_ALIGNMENT_LEFT);
- RunGestureDragTests(gfx::Vector2d(-120, 0));
- }
-
- {
- SCOPED_TRACE("RIGHT");
- shelf->SetAlignment(SHELF_ALIGNMENT_RIGHT);
- RunGestureDragTests(gfx::Vector2d(120, 0));
- }
-}
-
-TEST_F(ShelfLayoutManagerTest, WindowVisibilityDisablesAutoHide) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("800x600,800x600");
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- shelf->LayoutShelf();
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
-
- // Create a visible window so auto-hide behavior is enforced
- views::Widget* dummy = CreateTestWidget();
-
- // Window visible => auto hide behaves normally.
- shelf->UpdateVisibilityState();
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- // Window minimized => auto hide disabled.
- dummy->Minimize();
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
-
- // Window closed => auto hide disabled.
- dummy->CloseNow();
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
-
- // Multiple window test
- views::Widget* window1 = CreateTestWidget();
- views::Widget* window2 = CreateTestWidget();
-
- // both visible => normal autohide
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- // either minimzed => normal autohide
- window2->Minimize();
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- window2->Restore();
- window1->Minimize();
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- // both minimized => disable auto hide
- window2->Minimize();
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
-
- // Test moving windows to/from other display.
- window2->Restore();
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- // Move to second display.
- window2->SetBounds(gfx::Rect(850, 50, 50, 50));
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
- // Move back to primary display.
- window2->SetBounds(gfx::Rect(50, 50, 50, 50));
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-}
-
-// Test that the shelf animates back to its normal position upon a user
-// completing a gesture drag.
-TEST_F(ShelfLayoutManagerTest, ShelfAnimatesWhenGestureComplete) {
- if (!SupportsHostWindowResize())
- return;
-
- // Test the shelf animates back to its original visible bounds when it is
- // dragged when there are no visible windows.
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
- gfx::Rect visible_bounds = GetShelfWidget()->GetWindowBoundsInScreen();
- {
- // Enable animations so that we can make sure that they occur.
- ui::ScopedAnimationDurationScaleMode regular_animations(
- ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- gfx::Rect shelf_bounds_in_screen =
- GetShelfWidget()->GetWindowBoundsInScreen();
- gfx::Point start(shelf_bounds_in_screen.CenterPoint());
- gfx::Point end(start.x(), shelf_bounds_in_screen.bottom());
- generator.GestureScrollSequence(start, end,
- base::TimeDelta::FromMilliseconds(10), 5);
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
-
- ShelfAnimationWaiter waiter(visible_bounds);
- // Wait till the animation completes and check that it occurred.
- waiter.WaitTillDoneAnimating();
- EXPECT_TRUE(waiter.WasValidAnimation());
- }
-
- // Create a visible window so auto-hide behavior is enforced.
- CreateTestWidget();
-
- // Get the bounds of the shelf when it is hidden.
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- gfx::Rect auto_hidden_bounds = GetShelfWidget()->GetWindowBoundsInScreen();
-
- {
- // Enable the animations so that we can make sure they do occur.
- ui::ScopedAnimationDurationScaleMode regular_animations(
- ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
-
- gfx::Point start =
- GetShelfWidget()->GetWindowBoundsInScreen().CenterPoint();
- gfx::Point end(start.x(), start.y() - 100);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
-
- // Test that the shelf animates to the visible bounds after a swipe up on
- // the auto hidden shelf.
- generator.GestureScrollSequence(start, end,
- base::TimeDelta::FromMilliseconds(10), 1);
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
- ShelfAnimationWaiter waiter1(visible_bounds);
- waiter1.WaitTillDoneAnimating();
- EXPECT_TRUE(waiter1.WasValidAnimation());
-
- // Test that the shelf animates to the auto hidden bounds after a swipe up
- // on the visible shelf.
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
- generator.GestureScrollSequence(start, end,
- base::TimeDelta::FromMilliseconds(10), 1);
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- ShelfAnimationWaiter waiter2(auto_hidden_bounds);
- waiter2.WaitTillDoneAnimating();
- EXPECT_TRUE(waiter2.WasValidAnimation());
- }
-}
-
-TEST_F(ShelfLayoutManagerTest, GestureRevealsTrayBubble) {
- if (!SupportsHostWindowResize())
- return;
-
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- shelf->LayoutShelf();
-
- // Create a visible window so auto-hide behavior is enforced.
- CreateTestWidget();
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- SystemTray* tray = GetSystemTray();
-
- // First, make sure the shelf is visible.
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
- EXPECT_FALSE(tray->HasSystemBubble());
-
- // Now, drag up on the tray to show the bubble.
- gfx::Point start = GetShelfWidget()->status_area_widget()->
- GetWindowBoundsInScreen().CenterPoint();
- gfx::Point end(start.x(), start.y() - 100);
- generator.GestureScrollSequence(start, end,
- base::TimeDelta::FromMilliseconds(10), 1);
- EXPECT_TRUE(tray->HasSystemBubble());
- tray->CloseSystemBubble();
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(tray->HasSystemBubble());
-
- // Drag again, but only a small amount, and slowly. The bubble should not be
- // visible.
- end.set_y(start.y() - 30);
- generator.GestureScrollSequence(start, end,
- base::TimeDelta::FromMilliseconds(500), 100);
- EXPECT_FALSE(tray->HasSystemBubble());
-
- // Now, hide the shelf.
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
-
- // Start a drag from the bezel, and drag up to show both the shelf and the
- // tray bubble.
- start.set_y(start.y() + 100);
- end.set_y(start.y() - 400);
- generator.GestureScrollSequence(start, end,
- base::TimeDelta::FromMilliseconds(10), 1);
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
- EXPECT_TRUE(tray->HasSystemBubble());
-}
-
-TEST_F(ShelfLayoutManagerTest, ShelfFlickerOnTrayActivation) {
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
-
- // Create a visible window so auto-hide behavior is enforced.
- CreateTestWidget();
-
- // Turn on auto-hide for the shelf.
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- // Show the status menu. That should make the shelf visible again.
- Shell::GetInstance()->accelerator_controller()->PerformAction(
- SHOW_SYSTEM_TRAY_BUBBLE, ui::Accelerator());
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
- EXPECT_TRUE(GetSystemTray()->HasSystemBubble());
-}
-
-TEST_F(ShelfLayoutManagerTest, WorkAreaChangeWorkspace) {
- // Make sure the shelf is always visible.
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
- shelf->LayoutShelf();
-
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
- params.bounds = gfx::Rect(0, 0, 200, 200);
- params.context = CurrentContext();
- views::Widget* widget_one = CreateTestWidgetWithParams(params);
- widget_one->Maximize();
-
- views::Widget* widget_two = CreateTestWidgetWithParams(params);
- widget_two->Maximize();
- widget_two->Activate();
-
- // Both windows are maximized. They should be of the same size.
- EXPECT_EQ(widget_one->GetNativeWindow()->bounds().ToString(),
- widget_two->GetNativeWindow()->bounds().ToString());
- int area_when_shelf_shown =
- widget_one->GetNativeWindow()->bounds().size().GetArea();
-
- // Now hide the shelf.
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
-
- // Both windows should be resized according to the shelf status.
- EXPECT_EQ(widget_one->GetNativeWindow()->bounds().ToString(),
- widget_two->GetNativeWindow()->bounds().ToString());
- // Resized to small.
- EXPECT_LT(area_when_shelf_shown,
- widget_one->GetNativeWindow()->bounds().size().GetArea());
-
- // Now show the shelf.
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
-
- // Again both windows should be of the same size.
- EXPECT_EQ(widget_one->GetNativeWindow()->bounds().ToString(),
- widget_two->GetNativeWindow()->bounds().ToString());
- EXPECT_EQ(area_when_shelf_shown,
- widget_one->GetNativeWindow()->bounds().size().GetArea());
-}
-
-// Confirm that the shelf is dimmed only when content is maximized and
-// shelf is not autohidden.
-TEST_F(ShelfLayoutManagerTest, Dimming) {
- GetShelfLayoutManager()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
- scoped_ptr<aura::Window> w1(CreateTestWindow());
- w1->Show();
- wm::ActivateWindow(w1.get());
-
- // Normal window doesn't dim shelf.
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- ShelfWidget* shelf = GetShelfWidget();
- EXPECT_FALSE(shelf->GetDimsShelf());
-
- // Maximized window does.
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- EXPECT_TRUE(shelf->GetDimsShelf());
-
- // Change back to normal stops dimming.
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- EXPECT_FALSE(shelf->GetDimsShelf());
-
- // Changing back to maximized dims again.
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- EXPECT_TRUE(shelf->GetDimsShelf());
-
- // Changing shelf to autohide stops dimming.
- GetShelfLayoutManager()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- EXPECT_FALSE(shelf->GetDimsShelf());
-}
-
-// Make sure that the shelf will not hide if the mouse is between a bubble and
-// the shelf.
-TEST_F(ShelfLayoutManagerTest, BubbleEnlargesShelfMouseHitArea) {
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- StatusAreaWidget* status_area_widget =
- Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget();
- SystemTray* tray = GetSystemTray();
-
- // Create a visible window so auto-hide behavior is enforced.
- CreateTestWidget();
-
- shelf->LayoutShelf();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
-
- // Make two iterations - first without a message bubble which should make
- // the shelf disappear and then with a message bubble which should keep it
- // visible.
- for (int i = 0; i < 2; i++) {
- // Make sure the shelf is visible and position the mouse over it. Then
- // allow auto hide.
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
- EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
- gfx::Point center =
- status_area_widget->GetWindowBoundsInScreen().CenterPoint();
- generator.MoveMouseTo(center.x(), center.y());
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- EXPECT_TRUE(shelf->IsVisible());
- if (!i) {
- // In our first iteration we make sure there is no bubble.
- tray->CloseSystemBubble();
- EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
- } else {
- // In our second iteration we show a bubble.
- TestItem *item = new TestItem;
- tray->AddTrayItem(item);
- tray->ShowNotificationView(item);
- EXPECT_TRUE(status_area_widget->IsMessageBubbleShown());
- }
- // Move the pointer over the edge of the shelf.
- generator.MoveMouseTo(
- center.x(), status_area_widget->GetWindowBoundsInScreen().y() - 8);
- shelf->UpdateVisibilityState();
- if (i) {
- EXPECT_TRUE(shelf->IsVisible());
- EXPECT_TRUE(status_area_widget->IsMessageBubbleShown());
- } else {
- EXPECT_FALSE(shelf->IsVisible());
- EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
- }
- }
-}
-
-TEST_F(ShelfLayoutManagerTest, ShelfBackgroundColor) {
- EXPECT_EQ(SHELF_BACKGROUND_DEFAULT, GetShelfWidget()->GetBackgroundType());
-
- scoped_ptr<aura::Window> w1(CreateTestWindow());
- w1->Show();
- wm::ActivateWindow(w1.get());
- EXPECT_EQ(SHELF_BACKGROUND_DEFAULT, GetShelfWidget()->GetBackgroundType());
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- EXPECT_EQ(SHELF_BACKGROUND_MAXIMIZED, GetShelfWidget()->GetBackgroundType());
-
- scoped_ptr<aura::Window> w2(CreateTestWindow());
- w2->Show();
- wm::ActivateWindow(w2.get());
- // Overlaps with shelf.
- w2->SetBounds(GetShelfLayoutManager()->GetIdealBounds());
-
- // Still background is 'maximized'.
- EXPECT_EQ(SHELF_BACKGROUND_MAXIMIZED, GetShelfWidget()->GetBackgroundType());
-
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
- EXPECT_EQ(SHELF_BACKGROUND_OVERLAP, GetShelfWidget()->GetBackgroundType());
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
- EXPECT_EQ(SHELF_BACKGROUND_DEFAULT, GetShelfWidget()->GetBackgroundType());
-
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- EXPECT_EQ(SHELF_BACKGROUND_MAXIMIZED, GetShelfWidget()->GetBackgroundType());
- w1.reset();
- EXPECT_EQ(SHELF_BACKGROUND_DEFAULT, GetShelfWidget()->GetBackgroundType());
-}
-
-// Verify that the shelf doesn't have the opaque background if it's auto-hide
-// status.
-TEST_F(ShelfLayoutManagerTest, ShelfBackgroundColorAutoHide) {
- EXPECT_EQ(SHELF_BACKGROUND_DEFAULT, GetShelfWidget ()->GetBackgroundType());
-
- GetShelfLayoutManager()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- scoped_ptr<aura::Window> w1(CreateTestWindow());
- w1->Show();
- wm::ActivateWindow(w1.get());
- EXPECT_EQ(SHELF_BACKGROUND_OVERLAP, GetShelfWidget()->GetBackgroundType());
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- EXPECT_EQ(SHELF_BACKGROUND_OVERLAP, GetShelfWidget()->GetBackgroundType());
-}
-
-#if defined(OS_CHROMEOS)
-#define MAYBE_StatusAreaHitBoxCoversEdge StatusAreaHitBoxCoversEdge
-#else
-#define MAYBE_StatusAreaHitBoxCoversEdge DISABLED_StatusAreaHitBoxCoversEdge
-#endif
-
-// Verify the hit bounds of the status area extend to the edge of the shelf.
-TEST_F(ShelfLayoutManagerTest, MAYBE_StatusAreaHitBoxCoversEdge) {
- UpdateDisplay("400x400");
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- StatusAreaWidget* status_area_widget =
- Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- generator.MoveMouseTo(399,399);
-
- // Test bottom right pixel for bottom alignment.
- EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
- generator.ClickLeftButton();
- EXPECT_TRUE(status_area_widget->IsMessageBubbleShown());
- generator.ClickLeftButton();
- EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
-
- // Test bottom right pixel for right alignment.
- shelf->SetAlignment(SHELF_ALIGNMENT_RIGHT);
- EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
- generator.ClickLeftButton();
- EXPECT_TRUE(status_area_widget->IsMessageBubbleShown());
- generator.ClickLeftButton();
- EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
-
- // Test bottom left pixel for left alignment.
- generator.MoveMouseTo(0, 399);
- shelf->SetAlignment(SHELF_ALIGNMENT_LEFT);
- EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
- generator.ClickLeftButton();
- EXPECT_TRUE(status_area_widget->IsMessageBubbleShown());
- generator.ClickLeftButton();
- EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_menu_model.h b/chromium/ash/shelf/shelf_menu_model.h
deleted file mode 100644
index 18e1dd033e7..00000000000
--- a/chromium/ash/shelf/shelf_menu_model.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_MENU_MODEL_H_
-#define ASH_SHELF_SHELF_MENU_MODEL_H_
-
-#include "ash/ash_export.h"
-#include "ui/base/models/simple_menu_model.h"
-
-namespace ash {
-
-// A special menu model which keeps track of an "active" menu item.
-class ASH_EXPORT ShelfMenuModel : public ui::SimpleMenuModel {
- public:
- explicit ShelfMenuModel(ui::SimpleMenuModel::Delegate* delegate)
- : ui::SimpleMenuModel(delegate) {}
-
- // Returns |true| when the given |command_id| is active and needs to be drawn
- // in a special state.
- virtual bool IsCommandActive(int command_id) const = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShelfMenuModel);
-};
-
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_MENU_MODEL_H_
diff --git a/chromium/ash/shelf/shelf_model.cc b/chromium/ash/shelf/shelf_model.cc
deleted file mode 100644
index d5d83f12e6a..00000000000
--- a/chromium/ash/shelf/shelf_model.cc
+++ /dev/null
@@ -1,191 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_model.h"
-
-#include <algorithm>
-
-#include "ash/ash_switches.h"
-#include "ash/shelf/shelf_model_observer.h"
-
-namespace ash {
-
-namespace {
-
-int LauncherItemTypeToWeight(LauncherItemType type) {
- if (ash::switches::UseAlternateShelfLayout()) {
- switch (type) {
- case TYPE_APP_LIST:
- // TODO(skuhne): If the app list item becomes movable again, this need
- // to be a fallthrough.
- return 0;
- case TYPE_BROWSER_SHORTCUT:
- case TYPE_APP_SHORTCUT:
- case TYPE_WINDOWED_APP:
- return 1;
- case TYPE_PLATFORM_APP:
- return 2;
- case TYPE_APP_PANEL:
- return 3;
- case TYPE_UNDEFINED:
- NOTREACHED() << "LauncherItemType must be set";
- return -1;
- }
- } else {
- switch (type) {
- case TYPE_BROWSER_SHORTCUT:
- case TYPE_APP_SHORTCUT:
- case TYPE_WINDOWED_APP:
- return 0;
- case TYPE_PLATFORM_APP:
- return 1;
- case TYPE_APP_LIST:
- return 2;
- case TYPE_APP_PANEL:
- return 3;
- case TYPE_UNDEFINED:
- NOTREACHED() << "LauncherItemType must be set";
- return -1;
- }
- }
-
- NOTREACHED() << "Invalid type " << type;
- return 1;
-}
-
-bool CompareByWeight(const LauncherItem& a, const LauncherItem& b) {
- return LauncherItemTypeToWeight(a.type) < LauncherItemTypeToWeight(b.type);
-}
-
-} // namespace
-
-ShelfModel::ShelfModel() : next_id_(1), status_(STATUS_NORMAL) {
-}
-
-ShelfModel::~ShelfModel() {
-}
-
-int ShelfModel::Add(const LauncherItem& item) {
- return AddAt(items_.size(), item);
-}
-
-int ShelfModel::AddAt(int index, const LauncherItem& item) {
- index = ValidateInsertionIndex(item.type, index);
- items_.insert(items_.begin() + index, item);
- items_[index].id = next_id_++;
- FOR_EACH_OBSERVER(ShelfModelObserver, observers_, ShelfItemAdded(index));
- return index;
-}
-
-void ShelfModel::RemoveItemAt(int index) {
- DCHECK(index >= 0 && index < item_count());
- // The app list and browser shortcut can't be removed.
- DCHECK(items_[index].type != TYPE_APP_LIST &&
- items_[index].type != TYPE_BROWSER_SHORTCUT);
- LauncherID id = items_[index].id;
- items_.erase(items_.begin() + index);
- FOR_EACH_OBSERVER(ShelfModelObserver, observers_,
- ShelfItemRemoved(index, id));
-}
-
-void ShelfModel::Move(int index, int target_index) {
- if (index == target_index)
- return;
- // TODO: this needs to enforce valid ranges.
- LauncherItem item(items_[index]);
- items_.erase(items_.begin() + index);
- items_.insert(items_.begin() + target_index, item);
- FOR_EACH_OBSERVER(ShelfModelObserver, observers_,
- ShelfItemMoved(index, target_index));
-}
-
-void ShelfModel::Set(int index, const LauncherItem& item) {
- DCHECK(index >= 0 && index < item_count());
- int new_index = item.type == items_[index].type ?
- index : ValidateInsertionIndex(item.type, index);
-
- LauncherItem old_item(items_[index]);
- items_[index] = item;
- items_[index].id = old_item.id;
- FOR_EACH_OBSERVER(ShelfModelObserver, observers_,
- ShelfItemChanged(index, old_item));
-
- // If the type changes confirm that the item is still in the right order.
- if (new_index != index) {
- // The move function works by removing one item and then inserting it at the
- // new location. However - by removing the item first the order will change
- // so that our target index needs to be corrected.
- // TODO(skuhne): Moving this into the Move function breaks lots of unit
- // tests. So several functions were already using this incorrectly.
- // That needs to be cleaned up.
- if (index < new_index)
- new_index--;
-
- Move(index, new_index);
- }
-}
-
-int ShelfModel::ItemIndexByID(LauncherID id) const {
- LauncherItems::const_iterator i = ItemByID(id);
- return i == items_.end() ? -1 : static_cast<int>(i - items_.begin());
-}
-
-int ShelfModel::GetItemIndexForType(LauncherItemType type) {
- for (size_t i = 0; i < items_.size(); ++i) {
- if (items_[i].type == type)
- return i;
- }
- return -1;
-}
-
-LauncherItems::const_iterator ShelfModel::ItemByID(int id) const {
- for (LauncherItems::const_iterator i = items_.begin();
- i != items_.end(); ++i) {
- if (i->id == id)
- return i;
- }
- return items_.end();
-}
-
-int ShelfModel::FirstPanelIndex() const {
- LauncherItem weight_dummy;
- weight_dummy.type = TYPE_APP_PANEL;
- return std::lower_bound(items_.begin(), items_.end(), weight_dummy,
- CompareByWeight) - items_.begin();
-}
-
-void ShelfModel::SetStatus(Status status) {
- if (status_ == status)
- return;
-
- status_ = status;
- FOR_EACH_OBSERVER(ShelfModelObserver, observers_, ShelfStatusChanged());
-}
-
-void ShelfModel::AddObserver(ShelfModelObserver* observer) {
- observers_.AddObserver(observer);
-}
-
-void ShelfModel::RemoveObserver(ShelfModelObserver* observer) {
- observers_.RemoveObserver(observer);
-}
-
-int ShelfModel::ValidateInsertionIndex(LauncherItemType type, int index) const {
- DCHECK(index >= 0 && index <= item_count() +
- (ash::switches::UseAlternateShelfLayout() ? 1 : 0));
-
- // Clamp |index| to the allowed range for the type as determined by |weight|.
- LauncherItem weight_dummy;
- weight_dummy.type = type;
- index = std::max(std::lower_bound(items_.begin(), items_.end(), weight_dummy,
- CompareByWeight) - items_.begin(),
- static_cast<LauncherItems::difference_type>(index));
- index = std::min(std::upper_bound(items_.begin(), items_.end(), weight_dummy,
- CompareByWeight) - items_.begin(),
- static_cast<LauncherItems::difference_type>(index));
-
- return index;
-}
-
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_model.h b/chromium/ash/shelf/shelf_model.h
deleted file mode 100644
index cf51a017da9..00000000000
--- a/chromium/ash/shelf/shelf_model.h
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_MODEL_H_
-#define ASH_SHELF_SHELF_MODEL_H_
-
-#include "ash/ash_export.h"
-#include "ash/launcher/launcher_types.h"
-#include "base/basictypes.h"
-#include "base/observer_list.h"
-
-namespace ash {
-
-class ShelfModelObserver;
-
-// Model used by ShelfView.
-class ASH_EXPORT ShelfModel {
- public:
- enum Status {
- STATUS_NORMAL,
- // A status that indicates apps are syncing/loading.
- STATUS_LOADING,
- };
-
- ShelfModel();
- ~ShelfModel();
-
- // Adds a new item to the model. Returns the resulting index.
- int Add(const LauncherItem& item);
-
- // Adds the item. |index| is the requested insertion index, which may be
- // modified to meet type-based ordering. Returns the actual insertion index.
- int AddAt(int index, const LauncherItem& item);
-
- // Removes the item at |index|.
- void RemoveItemAt(int index);
-
- // Moves the item at |index| to |target_index|. |target_index| is in terms
- // of the model *after* the item at |index| is removed.
- void Move(int index, int target_index);
-
- // Resets the item at the specified index. The item maintains its existing
- // id and type.
- void Set(int index, const LauncherItem& item);
-
- // Returns the index of the item by id.
- int ItemIndexByID(LauncherID id) const;
-
- // Returns the |index| of the item matching |type| in |items_|.
- // Returns -1 if the matching item is not found.
- // Note: Requires a linear search.
- int GetItemIndexForType(LauncherItemType type);
-
- // Returns the index of the first panel or the index where the first panel
- // would go if there are no panels.
- int FirstPanelIndex() const;
-
- // Returns the id assigned to the next item added.
- LauncherID next_id() const { return next_id_; }
-
- // Returns a reserved id which will not be used by the |ShelfModel|.
- LauncherID reserve_external_id() { return next_id_++; }
-
- // Returns an iterator into items() for the item with the specified id, or
- // items().end() if there is no item with the specified id.
- LauncherItems::const_iterator ItemByID(LauncherID id) const;
-
- const LauncherItems& items() const { return items_; }
- int item_count() const { return static_cast<int>(items_.size()); }
-
- void SetStatus(Status status);
- Status status() const { return status_; }
-
- void AddObserver(ShelfModelObserver* observer);
- void RemoveObserver(ShelfModelObserver* observer);
-
- private:
- // Makes sure |index| is in line with the type-based order of items. If that
- // is not the case, adjusts index by shifting it to the valid range and
- // returns the new value.
- int ValidateInsertionIndex(LauncherItemType type, int index) const;
-
- // ID assigned to the next item.
- LauncherID next_id_;
-
- LauncherItems items_;
- Status status_;
- ObserverList<ShelfModelObserver> observers_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfModel);
-};
-
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_MODEL_H_
diff --git a/chromium/ash/shelf/shelf_model_observer.h b/chromium/ash/shelf/shelf_model_observer.h
deleted file mode 100644
index 6d9f21fd2ff..00000000000
--- a/chromium/ash/shelf/shelf_model_observer.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_MODEL_OBSERVER_H_
-#define ASH_SHELF_SHELF_MODEL_OBSERVER_H_
-
-#include "ash/ash_export.h"
-#include "ash/launcher/launcher_types.h"
-
-namespace ash {
-
-struct LauncherItem;
-
-class ASH_EXPORT ShelfModelObserver {
- public:
- // Invoked after an item has been added to the model.
- virtual void ShelfItemAdded(int index) = 0;
-
- // Invoked after an item has been removed. |index| is the index the item was
- // at.
- virtual void ShelfItemRemoved(int index, LauncherID id) = 0;
-
- // Invoked after an item has been moved. See ShelfModel::Move() for details
- // of the arguments.
- virtual void ShelfItemMoved(int start_index, int target_index) = 0;
-
- // Invoked when the state of an item changes. |old_item| is the item
- // before the change.
- virtual void ShelfItemChanged(int index, const LauncherItem& old_item) = 0;
-
- // Invoked when shelf status is changed.
- virtual void ShelfStatusChanged() = 0;
-
- protected:
- virtual ~ShelfModelObserver() {}
-};
-
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_MODEL_OBSERVER_H_
diff --git a/chromium/ash/shelf/shelf_model_unittest.cc b/chromium/ash/shelf/shelf_model_unittest.cc
deleted file mode 100644
index be30167ae86..00000000000
--- a/chromium/ash/shelf/shelf_model_unittest.cc
+++ /dev/null
@@ -1,405 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_model.h"
-
-#include <set>
-#include <string>
-
-#include "ash/ash_switches.h"
-#include "ash/shelf/shelf_model_observer.h"
-#include "base/command_line.h"
-#include "base/strings/stringprintf.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace ash {
-
-namespace {
-
-// ShelfModelObserver implementation that tracks what message are invoked.
-class TestShelfModelObserver : public ShelfModelObserver {
- public:
- TestShelfModelObserver()
- : added_count_(0),
- removed_count_(0),
- changed_count_(0),
- moved_count_(0) {
- }
-
- // Returns a string description of the changes that have occurred since this
- // was last invoked. Resets state to initial state.
- std::string StateStringAndClear() {
- std::string result;
- AddToResult("added=%d", added_count_, &result);
- AddToResult("removed=%d", removed_count_, &result);
- AddToResult("changed=%d", changed_count_, &result);
- AddToResult("moved=%d", moved_count_, &result);
- added_count_ = removed_count_ = changed_count_ = moved_count_ = 0;
- return result;
- }
-
- // ShelfModelObserver overrides:
- virtual void ShelfItemAdded(int index) OVERRIDE {
- added_count_++;
- }
- virtual void ShelfItemRemoved(int index, LauncherID id) OVERRIDE {
- removed_count_++;
- }
- virtual void ShelfItemChanged(int index,
- const LauncherItem& old_item) OVERRIDE {
- changed_count_++;
- }
- virtual void ShelfItemMoved(int start_index, int target_index) OVERRIDE {
- moved_count_++;
- }
- virtual void ShelfStatusChanged() OVERRIDE {
- }
-
- private:
- void AddToResult(const std::string& format, int count, std::string* result) {
- if (!count)
- return;
- if (!result->empty())
- *result += " ";
- *result += base::StringPrintf(format.c_str(), count);
- }
-
- int added_count_;
- int removed_count_;
- int changed_count_;
- int moved_count_;
-
- DISALLOW_COPY_AND_ASSIGN(TestShelfModelObserver);
-};
-
-} // namespace
-
-class ShelfModelTest : public testing::Test {
- public:
- ShelfModelTest() {}
- virtual ~ShelfModelTest() {}
-
- virtual void SetUp() {
- model_.reset(new ShelfModel);
- observer_.reset(new TestShelfModelObserver);
- EXPECT_EQ(0, model_->item_count());
-
- LauncherItem item;
- item.type = TYPE_APP_LIST;
- model_->Add(item);
- EXPECT_EQ(1, model_->item_count());
-
- model_->AddObserver(observer_.get());
- }
-
- virtual void TearDown() {
- observer_.reset();
- model_.reset();
- }
-
- scoped_ptr<ShelfModel> model_;
- scoped_ptr<TestShelfModelObserver> observer_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShelfModelTest);
-};
-
-TEST_F(ShelfModelTest, BasicAssertions) {
- // Add an item.
- LauncherItem item;
- item.type = TYPE_APP_SHORTCUT;
- int index = model_->Add(item);
- EXPECT_EQ(2, model_->item_count());
- EXPECT_EQ("added=1", observer_->StateStringAndClear());
-
- // Change to a platform app item.
- LauncherID original_id = model_->items()[index].id;
- item.type = TYPE_PLATFORM_APP;
- model_->Set(index, item);
- EXPECT_EQ(original_id, model_->items()[index].id);
- EXPECT_EQ("changed=1", observer_->StateStringAndClear());
- EXPECT_EQ(TYPE_PLATFORM_APP, model_->items()[index].type);
-
- // Remove the item.
- model_->RemoveItemAt(index);
- EXPECT_EQ(1, model_->item_count());
- EXPECT_EQ("removed=1", observer_->StateStringAndClear());
-
- // Add an app item.
- item.type = TYPE_APP_SHORTCUT;
- index = model_->Add(item);
- observer_->StateStringAndClear();
-
- // Change everything.
- model_->Set(index, item);
- EXPECT_EQ("changed=1", observer_->StateStringAndClear());
- EXPECT_EQ(TYPE_APP_SHORTCUT, model_->items()[index].type);
-
- // Add another item.
- item.type = TYPE_APP_SHORTCUT;
- model_->Add(item);
- observer_->StateStringAndClear();
-
- // Move the second to the first.
- model_->Move(1, 0);
- EXPECT_EQ("moved=1", observer_->StateStringAndClear());
-
- // And back.
- model_->Move(0, 1);
- EXPECT_EQ("moved=1", observer_->StateStringAndClear());
-
- // Verifies all the items get unique ids.
- std::set<LauncherID> ids;
- for (int i = 0; i < model_->item_count(); ++i)
- ids.insert(model_->items()[i].id);
- EXPECT_EQ(model_->item_count(), static_cast<int>(ids.size()));
-}
-
-// Assertions around where items are added.
-TEST_F(ShelfModelTest, AddIndices) {
- // Insert browser short cut at index 1.
- LauncherItem browser_shortcut;
- browser_shortcut.type = TYPE_BROWSER_SHORTCUT;
- int browser_shortcut_index = model_->Add(browser_shortcut);
- EXPECT_EQ(1, browser_shortcut_index);
-
- // platform app items should be after browser shortcut.
- LauncherItem item;
- item.type = TYPE_PLATFORM_APP;
- int platform_app_index1 = model_->Add(item);
- EXPECT_EQ(2, platform_app_index1);
-
- // Add another platform app item, it should follow first.
- int platform_app_index2 = model_->Add(item);
- EXPECT_EQ(3, platform_app_index2);
-
- // APP_SHORTCUT priority is higher than PLATFORM_APP but same as
- // BROWSER_SHORTCUT. So APP_SHORTCUT is located after BROWSER_SHORCUT.
- item.type = TYPE_APP_SHORTCUT;
- int app_shortcut_index1 = model_->Add(item);
- EXPECT_EQ(2, app_shortcut_index1);
-
- item.type = TYPE_APP_SHORTCUT;
- int app_shortcut_index2 = model_->Add(item);
- EXPECT_EQ(3, app_shortcut_index2);
-
- // Check that AddAt() figures out the correct indexes for app shortcuts.
- // APP_SHORTCUT and BROWSER_SHORTCUT has the same weight.
- // So APP_SHORTCUT is located at index 0. And, BROWSER_SHORTCUT is located at
- // index 1.
- item.type = TYPE_APP_SHORTCUT;
- int app_shortcut_index3 = model_->AddAt(1, item);
- EXPECT_EQ(1, app_shortcut_index3);
-
- item.type = TYPE_APP_SHORTCUT;
- int app_shortcut_index4 = model_->AddAt(6, item);
- EXPECT_EQ(5, app_shortcut_index4);
-
- item.type = TYPE_APP_SHORTCUT;
- int app_shortcut_index5 = model_->AddAt(3, item);
- EXPECT_EQ(3, app_shortcut_index5);
-
- // Before there are any panels, no icons should be right aligned.
- EXPECT_EQ(model_->item_count(), model_->FirstPanelIndex());
-
- // Check that AddAt() figures out the correct indexes for platform apps and
- // panels.
- item.type = TYPE_PLATFORM_APP;
- int platform_app_index3 = model_->AddAt(3, item);
- EXPECT_EQ(7, platform_app_index3);
-
- item.type = TYPE_APP_PANEL;
- int app_panel_index1 = model_->AddAt(2, item);
- EXPECT_EQ(10, app_panel_index1);
-
- item.type = TYPE_PLATFORM_APP;
- int platform_app_index4 = model_->AddAt(11, item);
- EXPECT_EQ(10, platform_app_index4);
-
- item.type = TYPE_APP_PANEL;
- int app_panel_index2 = model_->AddAt(12, item);
- EXPECT_EQ(12, app_panel_index2);
-
- item.type = TYPE_PLATFORM_APP;
- int platform_app_index5 = model_->AddAt(7, item);
- EXPECT_EQ(7, platform_app_index5);
-
- item.type = TYPE_APP_PANEL;
- int app_panel_index3 = model_->AddAt(13, item);
- EXPECT_EQ(13, app_panel_index3);
-
- // Right aligned index should be the first app panel index.
- EXPECT_EQ(12, model_->FirstPanelIndex());
-
- EXPECT_EQ(TYPE_BROWSER_SHORTCUT, model_->items()[2].type);
- EXPECT_EQ(TYPE_APP_LIST, model_->items()[0].type);
-}
-
-// Assertions around where items are added.
-TEST_F(ShelfModelTest, AddIndicesForLegacyShelfLayout) {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshDisableAlternateShelfLayout);
-
- // Insert browser short cut at index 0.
- LauncherItem browser_shortcut;
- browser_shortcut.type = TYPE_BROWSER_SHORTCUT;
- int browser_shortcut_index = model_->Add(browser_shortcut);
- EXPECT_EQ(0, browser_shortcut_index);
-
- // platform app items should be after browser shortcut.
- LauncherItem item;
- item.type = TYPE_PLATFORM_APP;
- int platform_app_index1 = model_->Add(item);
- EXPECT_EQ(1, platform_app_index1);
-
- // Add another platform app item, it should follow first.
- int platform_app_index2 = model_->Add(item);
- EXPECT_EQ(2, platform_app_index2);
-
- // APP_SHORTCUT priority is higher than PLATFORM_APP but same as
- // BROWSER_SHORTCUT. So APP_SHORTCUT is located after BROWSER_SHORCUT.
- item.type = TYPE_APP_SHORTCUT;
- int app_shortcut_index1 = model_->Add(item);
- EXPECT_EQ(1, app_shortcut_index1);
-
- item.type = TYPE_APP_SHORTCUT;
- int app_shortcut_index2 = model_->Add(item);
- EXPECT_EQ(2, app_shortcut_index2);
-
- // Check that AddAt() figures out the correct indexes for app shortcuts.
- // APP_SHORTCUT and BROWSER_SHORTCUT has the same weight.
- // So APP_SHORTCUT is located at index 0. And, BROWSER_SHORTCUT is located at
- // index 1.
- item.type = TYPE_APP_SHORTCUT;
- int app_shortcut_index3 = model_->AddAt(0, item);
- EXPECT_EQ(0, app_shortcut_index3);
-
- item.type = TYPE_APP_SHORTCUT;
- int app_shortcut_index4 = model_->AddAt(5, item);
- EXPECT_EQ(4, app_shortcut_index4);
-
- item.type = TYPE_APP_SHORTCUT;
- int app_shortcut_index5 = model_->AddAt(2, item);
- EXPECT_EQ(2, app_shortcut_index5);
-
- // Before there are any panels, no icons should be right aligned.
- EXPECT_EQ(model_->item_count(), model_->FirstPanelIndex());
-
- // Check that AddAt() figures out the correct indexes for platform apps and
- // panels.
- item.type = TYPE_PLATFORM_APP;
- int platform_app_index3 = model_->AddAt(2, item);
- EXPECT_EQ(6, platform_app_index3);
-
- item.type = TYPE_APP_PANEL;
- int app_panel_index1 = model_->AddAt(2, item);
- EXPECT_EQ(10, app_panel_index1);
-
- item.type = TYPE_PLATFORM_APP;
- int platform_app_index4 = model_->AddAt(11, item);
- EXPECT_EQ(9, platform_app_index4);
-
- item.type = TYPE_APP_PANEL;
- int app_panel_index2 = model_->AddAt(12, item);
- EXPECT_EQ(12, app_panel_index2);
-
- item.type = TYPE_PLATFORM_APP;
- int platform_app_index5 = model_->AddAt(7, item);
- EXPECT_EQ(7, platform_app_index5);
-
- item.type = TYPE_APP_PANEL;
- int app_panel_index3 = model_->AddAt(13, item);
- EXPECT_EQ(13, app_panel_index3);
-
- // Right aligned index should be the first app panel index.
- EXPECT_EQ(12, model_->FirstPanelIndex());
-
- EXPECT_EQ(TYPE_BROWSER_SHORTCUT, model_->items()[1].type);
- EXPECT_EQ(TYPE_APP_LIST, model_->items()[model_->FirstPanelIndex() - 1].type);
-}
-
-// Assertions around id generation and usage.
-TEST_F(ShelfModelTest, LauncherIDTests) {
- // Get the next to use ID counter.
- LauncherID id = model_->next_id();
-
- // Calling this function multiple times does not change the returned ID.
- EXPECT_EQ(model_->next_id(), id);
-
- // Check that when we reserve a value it will be the previously retrieved ID,
- // but it will not change the item count and retrieving the next ID should
- // produce something new.
- EXPECT_EQ(model_->reserve_external_id(), id);
- EXPECT_EQ(1, model_->item_count());
- LauncherID id2 = model_->next_id();
- EXPECT_NE(id2, id);
-
- // Adding another item to the list should also produce a new ID.
- LauncherItem item;
- item.type = TYPE_PLATFORM_APP;
- model_->Add(item);
- EXPECT_NE(model_->next_id(), id2);
-}
-
-// This verifies that converting an existing item into a lower weight category
-// (e.g. shortcut to running but not pinned app) will move it to the proper
-// location. See crbug.com/248769.
-TEST_F(ShelfModelTest, CorrectMoveItemsWhenStateChange) {
- // The first item is the app list and last item is the browser.
- LauncherItem browser_shortcut;
- browser_shortcut.type = TYPE_BROWSER_SHORTCUT;
- int browser_shortcut_index = model_->Add(browser_shortcut);
- EXPECT_EQ(TYPE_APP_LIST, model_->items()[0].type);
- EXPECT_EQ(1, browser_shortcut_index);
-
- // Add three shortcuts. They should all be moved between the two.
- LauncherItem item;
- item.type = TYPE_APP_SHORTCUT;
- int app1_index = model_->Add(item);
- EXPECT_EQ(2, app1_index);
- int app2_index = model_->Add(item);
- EXPECT_EQ(3, app2_index);
- int app3_index = model_->Add(item);
- EXPECT_EQ(4, app3_index);
-
- // Now change the type of the second item and make sure that it is moving
- // behind the shortcuts.
- item.type = TYPE_PLATFORM_APP;
- model_->Set(app2_index, item);
-
- // The item should have moved in front of the app launcher.
- EXPECT_EQ(TYPE_PLATFORM_APP, model_->items()[4].type);
-}
-
-TEST_F(ShelfModelTest, CorrectMoveItemsWhenStateChangeForLegacyShelfLayout) {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshDisableAlternateShelfLayout);
-
- // The first item is the browser and the second item is app list.
- LauncherItem browser_shortcut;
- browser_shortcut.type = TYPE_BROWSER_SHORTCUT;
- int browser_shortcut_index = model_->Add(browser_shortcut);
- EXPECT_EQ(0, browser_shortcut_index);
- EXPECT_EQ(TYPE_APP_LIST, model_->items()[1].type);
-
- // Add three shortcuts. They should all be moved between the two.
- LauncherItem item;
- item.type = TYPE_APP_SHORTCUT;
- int app1_index = model_->Add(item);
- EXPECT_EQ(1, app1_index);
- int app2_index = model_->Add(item);
- EXPECT_EQ(2, app2_index);
- int app3_index = model_->Add(item);
- EXPECT_EQ(3, app3_index);
-
- // Now change the type of the second item and make sure that it is moving
- // behind the shortcuts.
- item.type = TYPE_PLATFORM_APP;
- model_->Set(app2_index, item);
-
- // The item should have moved in front of the app launcher.
- EXPECT_EQ(TYPE_PLATFORM_APP, model_->items()[3].type);
-}
-
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_navigator.cc b/chromium/ash/shelf/shelf_navigator.cc
deleted file mode 100644
index 0dc5dfd5379..00000000000
--- a/chromium/ash/shelf/shelf_navigator.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_navigator.h"
-
-#include "ash/shelf/shelf_model.h"
-
-namespace ash {
-
-namespace {
-
-// Returns true if accelerator processing should skip the launcher item with
-// the specified type.
-bool ShouldSkip(ash::LauncherItemType type) {
- return type == ash::TYPE_APP_LIST ||
- type == ash::TYPE_BROWSER_SHORTCUT ||
- type == ash::TYPE_APP_SHORTCUT ||
- type == ash::TYPE_WINDOWED_APP;
-}
-
-} // namespace
-
-int GetNextActivatedItemIndex(const ShelfModel& model,
- CycleDirection direction) {
- const ash::LauncherItems& items = model.items();
- int item_count = model.item_count();
- int current_index = -1;
- int first_running = -1;
-
- for (int i = 0; i < item_count; ++i) {
- const ash::LauncherItem& item = items[i];
- if (ShouldSkip(item.type))
- continue;
-
- if (item.status == ash::STATUS_RUNNING && first_running < 0)
- first_running = i;
-
- if (item.status == ash::STATUS_ACTIVE) {
- current_index = i;
- break;
- }
- }
-
- // If nothing is active, try to active the first running item.
- if (current_index < 0) {
- if (first_running >= 0)
- return first_running;
- else
- return -1;
- }
-
- int step = (direction == CYCLE_FORWARD) ? 1 : -1;
-
- // Find the next item and activate it.
- for (int i = (current_index + step + item_count) % item_count;
- i != current_index; i = (i + step + item_count) % item_count) {
- const ash::LauncherItem& item = items[i];
- if (ShouldSkip(item.type))
- continue;
-
- // Skip already active item.
- if (item.status == ash::STATUS_ACTIVE)
- continue;
-
- return i;
- }
-
- return -1;
-}
-
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_navigator.h b/chromium/ash/shelf/shelf_navigator.h
deleted file mode 100644
index b8ecfb3a17b..00000000000
--- a/chromium/ash/shelf/shelf_navigator.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_NAVIGATOR_H_
-#define ASH_SHELF_SHELF_NAVIGATOR_H_
-
-#include "ash/ash_export.h"
-#include "ash/launcher/launcher_types.h"
-
-namespace ash {
-
-class ShelfModel;
-
-// Scans the current shelf item and returns the index of the shelf item which
-// should be activated next for the specified |direction|. Returns -1 if fails
-// to find such item.
-ASH_EXPORT int GetNextActivatedItemIndex(const ShelfModel& model,
- CycleDirection direction);
-
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_NAVIGATOR_H_
diff --git a/chromium/ash/shelf/shelf_navigator_unittest.cc b/chromium/ash/shelf/shelf_navigator_unittest.cc
deleted file mode 100644
index c4f392d4abe..00000000000
--- a/chromium/ash/shelf/shelf_navigator_unittest.cc
+++ /dev/null
@@ -1,195 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_navigator.h"
-
-#include "ash/ash_switches.h"
-#include "ash/launcher/launcher.h"
-#include "ash/launcher/launcher_types.h"
-#include "ash/shelf/shelf_model.h"
-#include "base/command_line.h"
-#include "base/compiler_specific.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace ash {
-
-namespace {
-
-class LauncherNavigatorTest : public testing::Test {
- public:
- LauncherNavigatorTest() {}
-
- protected:
- virtual void SetUp() OVERRIDE {
- model_.reset(new ShelfModel);
-
- // Add APP_LIST for test.
- LauncherItem app_list;
- app_list.type = TYPE_APP_LIST;
- model_->Add(app_list);
-
- // Initially, applist launcher item is only created.
- int total_num = model_->item_count();
- EXPECT_EQ(1, total_num);
- EXPECT_TRUE(model_->items()[0].type == TYPE_APP_LIST);
-
- // Add BROWSER_SHORTCUT for test.
- LauncherItem browser_shortcut;
- browser_shortcut.type = TYPE_BROWSER_SHORTCUT;
- model_->Add(browser_shortcut);
- }
-
- void SetupMockShelfModel(LauncherItemType* types,
- int types_length,
- int focused_index) {
- for (int i = 0; i < types_length; ++i) {
- LauncherItem new_item;
- new_item.type = types[i];
- new_item.status =
- (types[i] == TYPE_PLATFORM_APP) ? STATUS_RUNNING : STATUS_CLOSED;
- model_->Add(new_item);
- }
-
- // Set the focused item.
- if (focused_index >= 0) {
- LauncherItem focused_item =model_->items()[focused_index];
- if (focused_item.type == TYPE_PLATFORM_APP) {
- focused_item.status = STATUS_ACTIVE;
- model_->Set(focused_index, focused_item);
- }
- }
- }
-
- const ShelfModel& model() { return *model_.get(); }
-
- private:
- scoped_ptr<ShelfModel> model_;
-
- DISALLOW_COPY_AND_ASSIGN(LauncherNavigatorTest);
-};
-
-class LauncherNavigatorLegacyShelfLayoutTest : public LauncherNavigatorTest {
- public:
- LauncherNavigatorLegacyShelfLayoutTest() : LauncherNavigatorTest() {}
-
- protected:
- virtual void SetUp() OVERRIDE {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshDisableAlternateShelfLayout);
- LauncherNavigatorTest::SetUp();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LauncherNavigatorLegacyShelfLayoutTest);
-};
-
-} // namespace
-
-TEST_F(LauncherNavigatorTest, BasicCycle) {
- // An app shortcut and three platform apps.
- LauncherItemType types[] = {
- TYPE_APP_SHORTCUT, TYPE_PLATFORM_APP, TYPE_PLATFORM_APP, TYPE_PLATFORM_APP,
- };
- // ShelfModel automatically adds BROWSER_SHORTCUT item at the
- // beginning, so '3' refers the first TYPE_PLATFORM_APP item.
- SetupMockShelfModel(types, arraysize(types), 3);
-
- EXPECT_EQ(4, GetNextActivatedItemIndex(model(), CYCLE_FORWARD));
-
- // Fourth one. It will skip the APP_SHORTCUT at the beginning of the list and
- // the APP_LIST item which is automatically added at the end of items.
- EXPECT_EQ(5, GetNextActivatedItemIndex(model(), CYCLE_BACKWARD));
-}
-
-TEST_F(LauncherNavigatorLegacyShelfLayoutTest, BasicCycle) {
- // An app shortcut and three platform apps.
- LauncherItemType types[] = {
- TYPE_APP_SHORTCUT, TYPE_PLATFORM_APP, TYPE_PLATFORM_APP, TYPE_PLATFORM_APP,
- };
- // ShelfModel automatically adds BROWSER_SHORTCUT item at the
- // beginning, so '2' refers the first TYPE_PLATFORM_APP item.
- SetupMockShelfModel(types, arraysize(types), 2);
-
- EXPECT_EQ(3, GetNextActivatedItemIndex(model(), CYCLE_FORWARD));
-
- // Fourth one. It will skip the APP_SHORTCUT at the beginning of the list and
- // the APP_LIST item which is automatically added at the end of items.
- EXPECT_EQ(4, GetNextActivatedItemIndex(model(), CYCLE_BACKWARD));
-}
-
-TEST_F(LauncherNavigatorTest, WrapToBeginning) {
- LauncherItemType types[] = {
- TYPE_APP_SHORTCUT, TYPE_PLATFORM_APP, TYPE_PLATFORM_APP, TYPE_PLATFORM_APP,
- };
- SetupMockShelfModel(types, arraysize(types), 5);
-
- // Second one. It skips the APP_LIST item at the end of the list,
- // wraps to the beginning, and skips BROWSER_SHORTCUT and APP_SHORTCUT
- // at the beginning of the list.
- EXPECT_EQ(3, GetNextActivatedItemIndex(model(), CYCLE_FORWARD));
-}
-
-TEST_F(LauncherNavigatorLegacyShelfLayoutTest, WrapToBeginning) {
- LauncherItemType types[] = {
- TYPE_APP_SHORTCUT, TYPE_PLATFORM_APP, TYPE_PLATFORM_APP, TYPE_PLATFORM_APP,
- };
- SetupMockShelfModel(types, arraysize(types), 4);
-
- // Second one. It skips the APP_LIST item at the end of the list,
- // wraps to the beginning, and skips BROWSER_SHORTCUT and APP_SHORTCUT
- // at the beginning of the list.
- EXPECT_EQ(2, GetNextActivatedItemIndex(model(), CYCLE_FORWARD));
-}
-
-TEST_F(LauncherNavigatorTest, Empty) {
- SetupMockShelfModel(NULL, 0, -1);
- EXPECT_EQ(-1, GetNextActivatedItemIndex(model(), CYCLE_FORWARD));
- EXPECT_EQ(-1, GetNextActivatedItemIndex(model(), CYCLE_BACKWARD));
-}
-
-TEST_F(LauncherNavigatorTest, SingleEntry) {
- LauncherItemType type = TYPE_PLATFORM_APP;
- SetupMockShelfModel(&type, 1, 2);
-
- // If there's only one item there and it is already active, there's no item
- // to be activated next.
- EXPECT_EQ(-1, GetNextActivatedItemIndex(model(), CYCLE_FORWARD));
- EXPECT_EQ(-1, GetNextActivatedItemIndex(model(), CYCLE_BACKWARD));
-}
-
-TEST_F(LauncherNavigatorLegacyShelfLayoutTest, SingleEntry) {
- LauncherItemType type = TYPE_PLATFORM_APP;
- SetupMockShelfModel(&type, 1, 1);
-
- // If there's only one item there and it is already active, there's no item
- // to be activated next.
- EXPECT_EQ(-1, GetNextActivatedItemIndex(model(), CYCLE_FORWARD));
- EXPECT_EQ(-1, GetNextActivatedItemIndex(model(), CYCLE_BACKWARD));
-}
-
-TEST_F(LauncherNavigatorTest, NoActive) {
- LauncherItemType types[] = {
- TYPE_PLATFORM_APP, TYPE_PLATFORM_APP,
- };
- // Special case: no items are 'STATUS_ACTIVE'.
- SetupMockShelfModel(types, arraysize(types), -1);
-
- // If there are no active status, pick the first running item as a fallback.
- EXPECT_EQ(2, GetNextActivatedItemIndex(model(), CYCLE_FORWARD));
- EXPECT_EQ(2, GetNextActivatedItemIndex(model(), CYCLE_BACKWARD));
-}
-
-TEST_F(LauncherNavigatorLegacyShelfLayoutTest, NoActive) {
- LauncherItemType types[] = {
- TYPE_PLATFORM_APP, TYPE_PLATFORM_APP,
- };
- // Special case: no items are 'STATUS_ACTIVE'.
- SetupMockShelfModel(types, arraysize(types), -1);
-
- // If there are no active status, pick the first running item as a fallback.
- EXPECT_EQ(1, GetNextActivatedItemIndex(model(), CYCLE_FORWARD));
- EXPECT_EQ(1, GetNextActivatedItemIndex(model(), CYCLE_BACKWARD));
-}
-
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_tooltip_manager.cc b/chromium/ash/shelf/shelf_tooltip_manager.cc
deleted file mode 100644
index dd20a178a2d..00000000000
--- a/chromium/ash/shelf/shelf_tooltip_manager.cc
+++ /dev/null
@@ -1,379 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_tooltip_manager.h"
-
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_view.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/window_animations.h"
-#include "base/bind.h"
-#include "base/message_loop/message_loop.h"
-#include "base/time/time.h"
-#include "base/timer/timer.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/events/event.h"
-#include "ui/events/event_constants.h"
-#include "ui/gfx/insets.h"
-#include "ui/views/bubble/bubble_delegate.h"
-#include "ui/views/bubble/bubble_frame_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/fill_layout.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-namespace {
-const int kTooltipTopBottomMargin = 3;
-const int kTooltipLeftRightMargin = 10;
-const int kTooltipAppearanceDelay = 1000; // msec
-const int kTooltipMinHeight = 29 - 2 * kTooltipTopBottomMargin;
-const SkColor kTooltipTextColor = SkColorSetRGB(0x22, 0x22, 0x22);
-
-// The maximum width of the tooltip bubble. Borrowed the value from
-// ash/tooltip/tooltip_controller.cc
-const int kTooltipMaxWidth = 250;
-
-// The offset for the tooltip bubble - making sure that the bubble is flush
-// with the shelf. The offset includes the arrow size in pixels as well as
-// the activation bar and other spacing elements.
-const int kArrowOffsetLeftRight = 11;
-const int kArrowOffsetTopBottom = 7;
-
-} // namespace
-
-// The implementation of tooltip of the launcher.
-class ShelfTooltipManager::ShelfTooltipBubble
- : public views::BubbleDelegateView {
- public:
- ShelfTooltipBubble(views::View* anchor,
- views::BubbleBorder::Arrow arrow,
- ShelfTooltipManager* host);
-
- void SetText(const base::string16& text);
- void Close();
-
- private:
- // views::WidgetDelegate overrides:
- virtual void WindowClosing() OVERRIDE;
-
- // views::View overrides:
- virtual gfx::Size GetPreferredSize() OVERRIDE;
-
- ShelfTooltipManager* host_;
- views::Label* label_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfTooltipBubble);
-};
-
-ShelfTooltipManager::ShelfTooltipBubble::ShelfTooltipBubble(
- views::View* anchor,
- views::BubbleBorder::Arrow arrow,
- ShelfTooltipManager* host)
- : views::BubbleDelegateView(anchor, arrow), host_(host) {
- // Make sure that the bubble follows the animation of the shelf.
- set_move_with_anchor(true);
- gfx::Insets insets = gfx::Insets(kArrowOffsetTopBottom,
- kArrowOffsetLeftRight,
- kArrowOffsetTopBottom,
- kArrowOffsetLeftRight);
- // Shelf items can have an asymmetrical border for spacing reasons.
- // Adjust anchor location for this.
- if (anchor->border())
- insets += anchor->border()->GetInsets();
-
- set_anchor_view_insets(insets);
- set_close_on_esc(false);
- set_close_on_deactivate(false);
- set_use_focusless(true);
- set_accept_events(false);
- set_margins(gfx::Insets(kTooltipTopBottomMargin, kTooltipLeftRightMargin,
- kTooltipTopBottomMargin, kTooltipLeftRightMargin));
- set_shadow(views::BubbleBorder::SMALL_SHADOW);
- SetLayoutManager(new views::FillLayout());
- // The anchor may not have the widget in tests.
- if (anchor->GetWidget() && anchor->GetWidget()->GetNativeView()) {
- aura::Window* root_window =
- anchor->GetWidget()->GetNativeView()->GetRootWindow();
- set_parent_window(ash::Shell::GetInstance()->GetContainer(
- root_window, ash::internal::kShellWindowId_SettingBubbleContainer));
- }
- label_ = new views::Label;
- label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- label_->SetEnabledColor(kTooltipTextColor);
- AddChildView(label_);
- views::BubbleDelegateView::CreateBubble(this);
-}
-
-void ShelfTooltipManager::ShelfTooltipBubble::SetText(
- const base::string16& text) {
- label_->SetText(text);
- SizeToContents();
-}
-
-void ShelfTooltipManager::ShelfTooltipBubble::Close() {
- if (GetWidget()) {
- host_ = NULL;
- GetWidget()->Close();
- }
-}
-
-void ShelfTooltipManager::ShelfTooltipBubble::WindowClosing() {
- views::BubbleDelegateView::WindowClosing();
- if (host_)
- host_->OnBubbleClosed(this);
-}
-
-gfx::Size ShelfTooltipManager::ShelfTooltipBubble::GetPreferredSize() {
- gfx::Size pref_size = views::BubbleDelegateView::GetPreferredSize();
- if (pref_size.height() < kTooltipMinHeight)
- pref_size.set_height(kTooltipMinHeight);
- if (pref_size.width() > kTooltipMaxWidth)
- pref_size.set_width(kTooltipMaxWidth);
- return pref_size;
-}
-
-ShelfTooltipManager::ShelfTooltipManager(
- ShelfLayoutManager* shelf_layout_manager,
- ShelfView* shelf_view)
- : view_(NULL),
- widget_(NULL),
- anchor_(NULL),
- shelf_layout_manager_(shelf_layout_manager),
- shelf_view_(shelf_view),
- weak_factory_(this) {
- if (shelf_layout_manager)
- shelf_layout_manager->AddObserver(this);
- if (Shell::HasInstance())
- Shell::GetInstance()->AddPreTargetHandler(this);
-}
-
-ShelfTooltipManager::~ShelfTooltipManager() {
- CancelHidingAnimation();
- Close();
- if (shelf_layout_manager_)
- shelf_layout_manager_->RemoveObserver(this);
- if (Shell::HasInstance())
- Shell::GetInstance()->RemovePreTargetHandler(this);
-}
-
-void ShelfTooltipManager::ShowDelayed(views::View* anchor,
- const base::string16& text) {
- if (view_) {
- if (timer_.get() && timer_->IsRunning()) {
- return;
- } else {
- CancelHidingAnimation();
- Close();
- }
- }
-
- if (shelf_layout_manager_ && !shelf_layout_manager_->IsVisible())
- return;
-
- CreateBubble(anchor, text);
- ResetTimer();
-}
-
-void ShelfTooltipManager::ShowImmediately(views::View* anchor,
- const base::string16& text) {
- if (view_) {
- if (timer_.get() && timer_->IsRunning())
- StopTimer();
- CancelHidingAnimation();
- Close();
- }
-
- if (shelf_layout_manager_ && !shelf_layout_manager_->IsVisible())
- return;
-
- CreateBubble(anchor, text);
- ShowInternal();
-}
-
-void ShelfTooltipManager::Close() {
- StopTimer();
- if (view_) {
- view_->Close();
- view_ = NULL;
- widget_ = NULL;
- }
-}
-
-void ShelfTooltipManager::OnBubbleClosed(views::BubbleDelegateView* view) {
- if (view == view_) {
- view_ = NULL;
- widget_ = NULL;
- }
-}
-
-void ShelfTooltipManager::UpdateArrow() {
- if (view_) {
- CancelHidingAnimation();
- Close();
- ShowImmediately(anchor_, text_);
- }
-}
-
-void ShelfTooltipManager::ResetTimer() {
- if (timer_.get() && timer_->IsRunning()) {
- timer_->Reset();
- return;
- }
-
- // We don't start the timer if the shelf isn't visible.
- if (shelf_layout_manager_ && !shelf_layout_manager_->IsVisible())
- return;
-
- CreateTimer(kTooltipAppearanceDelay);
-}
-
-void ShelfTooltipManager::StopTimer() {
- timer_.reset();
-}
-
-bool ShelfTooltipManager::IsVisible() {
- if (timer_.get() && timer_->IsRunning())
- return false;
-
- return widget_ && widget_->IsVisible();
-}
-
-void ShelfTooltipManager::CreateZeroDelayTimerForTest() {
- CreateTimer(0);
-}
-
-void ShelfTooltipManager::OnMouseEvent(ui::MouseEvent* event) {
- DCHECK(event);
- DCHECK(event->target());
- if (!widget_ || !widget_->IsVisible())
- return;
-
- DCHECK(view_);
- DCHECK(shelf_view_);
-
- // Pressing the mouse button anywhere should close the tooltip.
- if (event->type() == ui::ET_MOUSE_PRESSED) {
- CloseSoon();
- return;
- }
-
- aura::Window* target = static_cast<aura::Window*>(event->target());
- if (widget_->GetNativeWindow()->GetRootWindow() != target->GetRootWindow()) {
- CloseSoon();
- return;
- }
-
- gfx::Point location_in_shelf_view = event->location();
- aura::Window::ConvertPointToTarget(
- target, shelf_view_->GetWidget()->GetNativeWindow(),
- &location_in_shelf_view);
-
- if (shelf_view_->ShouldHideTooltip(location_in_shelf_view)) {
- // Because this mouse event may arrive to |view_|, here we just schedule
- // the closing event rather than directly calling Close().
- CloseSoon();
- }
-}
-
-void ShelfTooltipManager::OnTouchEvent(ui::TouchEvent* event) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- if (widget_ && widget_->IsVisible() && widget_->GetNativeWindow() != target)
- Close();
-}
-
-void ShelfTooltipManager::OnGestureEvent(ui::GestureEvent* event) {
- if (widget_ && widget_->IsVisible()) {
- // Because this mouse event may arrive to |view_|, here we just schedule
- // the closing event rather than directly calling Close().
- CloseSoon();
- }
-}
-
-void ShelfTooltipManager::OnCancelMode(ui::CancelModeEvent* event) {
- Close();
-}
-
-void ShelfTooltipManager::WillDeleteShelf() {
- shelf_layout_manager_ = NULL;
-}
-
-void ShelfTooltipManager::WillChangeVisibilityState(
- ShelfVisibilityState new_state) {
- if (new_state == SHELF_HIDDEN) {
- StopTimer();
- Close();
- }
-}
-
-void ShelfTooltipManager::OnAutoHideStateChanged(ShelfAutoHideState new_state) {
- if (new_state == SHELF_AUTO_HIDE_HIDDEN) {
- StopTimer();
- // AutoHide state change happens during an event filter, so immediate close
- // may cause a crash in the HandleMouseEvent() after the filter. So we just
- // schedule the Close here.
- CloseSoon();
- }
-}
-
-void ShelfTooltipManager::CancelHidingAnimation() {
- if (!widget_ || !widget_->GetNativeView())
- return;
-
- gfx::NativeView native_view = widget_->GetNativeView();
- views::corewm::SetWindowVisibilityAnimationTransition(
- native_view, views::corewm::ANIMATE_NONE);
-}
-
-void ShelfTooltipManager::CloseSoon() {
- base::MessageLoopForUI::current()->PostTask(
- FROM_HERE,
- base::Bind(&ShelfTooltipManager::Close, weak_factory_.GetWeakPtr()));
-}
-
-void ShelfTooltipManager::ShowInternal() {
- if (view_)
- view_->GetWidget()->Show();
-
- timer_.reset();
-}
-
-void ShelfTooltipManager::CreateBubble(views::View* anchor,
- const base::string16& text) {
- DCHECK(!view_);
-
- anchor_ = anchor;
- text_ = text;
- views::BubbleBorder::Arrow arrow =
- shelf_layout_manager_->SelectValueForShelfAlignment(
- views::BubbleBorder::BOTTOM_CENTER,
- views::BubbleBorder::LEFT_CENTER,
- views::BubbleBorder::RIGHT_CENTER,
- views::BubbleBorder::TOP_CENTER);
-
- view_ = new ShelfTooltipBubble(anchor, arrow, this);
- widget_ = view_->GetWidget();
- view_->SetText(text_);
-
- gfx::NativeView native_view = widget_->GetNativeView();
- views::corewm::SetWindowVisibilityAnimationType(
- native_view, views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL);
- views::corewm::SetWindowVisibilityAnimationTransition(
- native_view, views::corewm::ANIMATE_HIDE);
-}
-
-void ShelfTooltipManager::CreateTimer(int delay_in_ms) {
- base::OneShotTimer<ShelfTooltipManager>* new_timer =
- new base::OneShotTimer<ShelfTooltipManager>();
- new_timer->Start(FROM_HERE,
- base::TimeDelta::FromMilliseconds(delay_in_ms),
- this,
- &ShelfTooltipManager::ShowInternal);
- timer_.reset(new_timer);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_tooltip_manager.h b/chromium/ash/shelf/shelf_tooltip_manager.h
deleted file mode 100644
index 5bb5f0966bb..00000000000
--- a/chromium/ash/shelf/shelf_tooltip_manager.h
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_TOOLTIP_MANAGER_H_
-#define ASH_SHELF_SHELF_TOOLTIP_MANAGER_H_
-
-#include "ash/ash_export.h"
-#include "ash/shelf/shelf_layout_manager_observer.h"
-#include "ash/shelf/shelf_types.h"
-#include "base/basictypes.h"
-#include "base/memory/weak_ptr.h"
-#include "base/strings/string16.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/rect.h"
-#include "ui/views/bubble/bubble_border.h"
-#include "ui/views/bubble/bubble_delegate.h"
-
-namespace base {
-class Timer;
-}
-
-namespace views {
-class BubbleDelegateView;
-class Label;
-}
-
-namespace ash {
-namespace test {
-class ShelfTooltipManagerTest;
-class ShelfViewTest;
-}
-
-namespace internal {
-class ShelfView;
-class ShelfLayoutManager;
-
-// ShelfTooltipManager manages the tooltip balloon poping up on shelf items.
-class ASH_EXPORT ShelfTooltipManager : public ui::EventHandler,
- public ShelfLayoutManagerObserver {
- public:
- ShelfTooltipManager(ShelfLayoutManager* shelf_layout_manager,
- ShelfView* shelf_view);
- virtual ~ShelfTooltipManager();
-
- ShelfLayoutManager* shelf_layout_manager() { return shelf_layout_manager_; }
-
- // Called when the bubble is closed.
- void OnBubbleClosed(views::BubbleDelegateView* view);
-
- // Shows the tooltip after a delay. It also has the appearing animation.
- void ShowDelayed(views::View* anchor, const base::string16& text);
-
- // Shows the tooltip immediately. It omits the appearing animation.
- void ShowImmediately(views::View* anchor, const base::string16& text);
-
- // Closes the tooltip.
- void Close();
-
- // Changes the arrow location of the tooltip in case that the launcher
- // arrangement has changed.
- void UpdateArrow();
-
- // Resets the timer for the delayed showing |view_|. If the timer isn't
- // running, it starts a new timer.
- void ResetTimer();
-
- // Stops the timer for the delayed showing |view_|.
- void StopTimer();
-
- // Returns true if the tooltip is currently visible.
- bool IsVisible();
-
- // Returns the view to which the tooltip bubble is anchored. May be NULL.
- views::View* GetCurrentAnchorView() { return anchor_; }
-
- // Create an instant timer for test purposes.
- void CreateZeroDelayTimerForTest();
-
-protected:
- // ui::EventHandler overrides:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
- virtual void OnCancelMode(ui::CancelModeEvent* event) OVERRIDE;
-
- // ShelfLayoutManagerObserver overrides:
- virtual void WillDeleteShelf() OVERRIDE;
- virtual void WillChangeVisibilityState(
- ShelfVisibilityState new_state) OVERRIDE;
- virtual void OnAutoHideStateChanged(ShelfAutoHideState new_state) OVERRIDE;
-
- private:
- class ShelfTooltipBubble;
- friend class test::ShelfViewTest;
- friend class test::ShelfTooltipManagerTest;
-
- void CancelHidingAnimation();
- void CloseSoon();
- void ShowInternal();
- void CreateBubble(views::View* anchor, const base::string16& text);
- void CreateTimer(int delay_in_ms);
-
- ShelfTooltipBubble* view_;
- views::Widget* widget_;
- views::View* anchor_;
- base::string16 text_;
- scoped_ptr<base::Timer> timer_;
-
- ShelfLayoutManager* shelf_layout_manager_;
- ShelfView* shelf_view_;
-
- base::WeakPtrFactory<ShelfTooltipManager> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfTooltipManager);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_TOOLTIP_MANAGER_H_
diff --git a/chromium/ash/shelf/shelf_tooltip_manager_unittest.cc b/chromium/ash/shelf/shelf_tooltip_manager_unittest.cc
deleted file mode 100644
index 33792ec4c8d..00000000000
--- a/chromium/ash/shelf/shelf_tooltip_manager_unittest.cc
+++ /dev/null
@@ -1,286 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_tooltip_manager.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/launcher_test_api.h"
-#include "ash/wm/window_util.h"
-#include "base/strings/string16.h"
-#include "base/time/time.h"
-#include "ui/aura/root_window.h"
-#include "ui/events/event.h"
-#include "ui/events/event_constants.h"
-#include "ui/events/event_handler.h"
-#include "ui/events/keycodes/keyboard_codes.h"
-#include "ui/events/test/events_test_utils.h"
-#include "ui/views/widget/widget.h"
-
-namespace {
-
-void SetEventTarget(ui::EventTarget* target,
- ui::Event* event) {
- ui::Event::DispatcherApi dispatch_helper(event);
- dispatch_helper.set_target(target);
-}
-
-}
-
-namespace ash {
-namespace test {
-
-class ShelfTooltipManagerTest : public AshTestBase {
- public:
- ShelfTooltipManagerTest() {}
- virtual ~ShelfTooltipManagerTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- internal::RootWindowController* controller =
- Shell::GetPrimaryRootWindowController();
- tooltip_manager_.reset(new internal::ShelfTooltipManager(
- controller->GetShelfLayoutManager(),
- LauncherTestAPI(controller->shelf()->launcher()).shelf_view()));
- }
-
- virtual void TearDown() OVERRIDE {
- tooltip_manager_.reset();
- AshTestBase::TearDown();
- }
-
- void ShowDelayed() {
- CreateWidget();
- tooltip_manager_->ShowDelayed(dummy_anchor_.get(), base::string16());
- }
-
- void ShowImmediately() {
- CreateWidget();
- tooltip_manager_->ShowImmediately(dummy_anchor_.get(), base::string16());
- }
-
- bool TooltipIsVisible() {
- return tooltip_manager_->IsVisible();
- }
-
- bool IsTimerRunning() {
- return tooltip_manager_->timer_.get() != NULL;
- }
-
- ui::EventHandler* GetEventHandler() {
- return tooltip_manager_.get();
- }
-
- views::Widget* GetTooltipWidget() {
- return tooltip_manager_->widget_;
- }
-
- protected:
- scoped_ptr<views::Widget> widget_;
- scoped_ptr<views::View> dummy_anchor_;
- scoped_ptr<internal::ShelfTooltipManager> tooltip_manager_;
-
- private:
- void CreateWidget() {
- dummy_anchor_.reset(new views::View);
-
- widget_.reset(new views::Widget);
- views::Widget::InitParams params(
- views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.parent = Shell::GetContainer(
- Shell::GetPrimaryRootWindow(),
- ash::internal::kShellWindowId_ShelfContainer);
-
- widget_->Init(params);
- widget_->SetContentsView(dummy_anchor_.get());
- }
-
- DISALLOW_COPY_AND_ASSIGN(ShelfTooltipManagerTest);
-};
-
-TEST_F(ShelfTooltipManagerTest, ShowingBasics) {
- // ShowDelayed() should just start the timer instead of showing immediately.
- ShowDelayed();
- EXPECT_FALSE(TooltipIsVisible());
- EXPECT_TRUE(IsTimerRunning());
-
- ShowImmediately();
- EXPECT_TRUE(TooltipIsVisible());
- EXPECT_FALSE(IsTimerRunning());
-}
-
-TEST_F(ShelfTooltipManagerTest, HideWhenShelfIsHidden) {
- ShowImmediately();
- ASSERT_TRUE(TooltipIsVisible());
-
- // Create a full-screen window to hide the shelf.
- scoped_ptr<views::Widget> widget(new views::Widget);
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.context = CurrentContext();
- widget->Init(params);
- widget->SetFullscreen(true);
- widget->Show();
-
- // Once the shelf is hidden, the tooltip should be invisible.
- ASSERT_EQ(
- SHELF_HIDDEN,
- Shell::GetPrimaryRootWindowController()->
- GetShelfLayoutManager()->visibility_state());
- EXPECT_FALSE(TooltipIsVisible());
-
- // Do not show the view if the shelf is hidden.
- ShowImmediately();
- EXPECT_FALSE(TooltipIsVisible());
-
- // ShowDelayed() doesn't even start the timer for the hidden shelf.
- ShowDelayed();
- EXPECT_FALSE(IsTimerRunning());
-}
-
-TEST_F(ShelfTooltipManagerTest, HideWhenShelfIsAutoHide) {
- // Create a visible window so auto-hide behavior is enforced.
- views::Widget* dummy = new views::Widget;
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
- params.bounds = gfx::Rect(0, 0, 200, 200);
- params.context = CurrentContext();
- dummy->Init(params);
- dummy->Show();
-
- ShowImmediately();
- ASSERT_TRUE(TooltipIsVisible());
-
- internal::ShelfLayoutManager* shelf =
- Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager();
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- shelf->UpdateAutoHideState();
- ASSERT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- // Tooltip visibility change for auto hide may take time.
- EXPECT_TRUE(TooltipIsVisible());
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(TooltipIsVisible());
-
- // Do not show the view if the shelf is hidden.
- ShowImmediately();
- EXPECT_FALSE(TooltipIsVisible());
-
- // ShowDelayed doesn't even run the timer for the hidden shelf.
- ShowDelayed();
- EXPECT_FALSE(IsTimerRunning());
-}
-
-TEST_F(ShelfTooltipManagerTest, ShouldHideForEvents) {
- ShowImmediately();
- ASSERT_TRUE(TooltipIsVisible());
-
- aura::Window* root_window = Shell::GetInstance()->GetPrimaryRootWindow();
- ui::EventHandler* event_handler = GetEventHandler();
-
- // Should not hide for key events.
- ui::KeyEvent key_event(ui::ET_KEY_PRESSED, ui::VKEY_A, ui::EF_NONE, false);
- SetEventTarget(root_window, &key_event);
- event_handler->OnKeyEvent(&key_event);
- EXPECT_FALSE(key_event.handled());
- EXPECT_TRUE(TooltipIsVisible());
-
- // Should hide for touch events.
- ui::TouchEvent touch_event(
- ui::ET_TOUCH_PRESSED, gfx::Point(), 0, base::TimeDelta());
- SetEventTarget(root_window, &touch_event);
- event_handler->OnTouchEvent(&touch_event);
- EXPECT_FALSE(touch_event.handled());
- EXPECT_FALSE(TooltipIsVisible());
-
- // Shouldn't hide if the touch happens on the tooltip.
- ShowImmediately();
- views::Widget* tooltip_widget = GetTooltipWidget();
- SetEventTarget(tooltip_widget->GetNativeWindow(), &touch_event);
- event_handler->OnTouchEvent(&touch_event);
- EXPECT_FALSE(touch_event.handled());
- EXPECT_TRUE(TooltipIsVisible());
-
- // Should hide for gesture events.
- ui::GestureEvent gesture_event(
- ui::ET_GESTURE_BEGIN, 0, 0, ui::EF_NONE,
- base::TimeDelta::FromMilliseconds(base::Time::Now().ToDoubleT() * 1000),
- ui::GestureEventDetails(ui::ET_GESTURE_BEGIN, 0.0f, 0.0f), 0);
- SetEventTarget(tooltip_widget->GetNativeWindow(), &gesture_event);
- event_handler->OnGestureEvent(&gesture_event);
- EXPECT_FALSE(gesture_event.handled());
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(TooltipIsVisible());
-}
-
-TEST_F(ShelfTooltipManagerTest, HideForMouseMoveEvent) {
- ShowImmediately();
- ASSERT_TRUE(TooltipIsVisible());
-
- aura::Window* root_window = Shell::GetInstance()->GetPrimaryRootWindow();
- ui::EventHandler* event_handler = GetEventHandler();
-
- gfx::Rect tooltip_rect = GetTooltipWidget()->GetNativeWindow()->bounds();
- ASSERT_FALSE(tooltip_rect.IsEmpty());
-
- // Shouldn't hide if the mouse is in the tooltip.
- ui::MouseEvent mouse_event(ui::ET_MOUSE_MOVED, tooltip_rect.CenterPoint(),
- tooltip_rect.CenterPoint(), ui::EF_NONE);
- ui::LocatedEventTestApi test_api(&mouse_event);
-
- SetEventTarget(root_window, &mouse_event);
- event_handler->OnMouseEvent(&mouse_event);
- EXPECT_FALSE(mouse_event.handled());
- EXPECT_TRUE(TooltipIsVisible());
-
- // Should hide if the mouse is out of the tooltip.
- test_api.set_location(tooltip_rect.origin() + gfx::Vector2d(-1, -1));
- event_handler->OnMouseEvent(&mouse_event);
- EXPECT_FALSE(mouse_event.handled());
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(TooltipIsVisible());
-}
-
-// Checks that tooltip is hidden when mouse is pressed in anywhere.
-TEST_F(ShelfTooltipManagerTest, HideForMouseClickEvent) {
- ShowImmediately();
- ASSERT_TRUE(TooltipIsVisible());
-
- aura::Window* root_window = Shell::GetInstance()->GetPrimaryRootWindow();
- ui::EventHandler* event_handler = GetEventHandler();
-
- gfx::Rect tooltip_rect = GetTooltipWidget()->GetNativeWindow()->bounds();
- ASSERT_FALSE(tooltip_rect.IsEmpty());
-
- // Should hide if the mouse is pressed in the tooltip.
- ui::MouseEvent mouse_event(ui::ET_MOUSE_PRESSED, tooltip_rect.CenterPoint(),
- tooltip_rect.CenterPoint(), ui::EF_NONE);
-
- SetEventTarget(root_window, &mouse_event);
- event_handler->OnMouseEvent(&mouse_event);
- EXPECT_FALSE(mouse_event.handled());
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(TooltipIsVisible());
-
- // Should hide if the mouse is pressed outside of the tooltip.
- ShowImmediately();
- ASSERT_TRUE(TooltipIsVisible());
-
- ui::LocatedEventTestApi test_api(&mouse_event);
- test_api.set_location(tooltip_rect.origin() + gfx::Vector2d(-1, -1));
-
- SetEventTarget(root_window, &mouse_event);
- event_handler->OnMouseEvent(&mouse_event);
- EXPECT_FALSE(mouse_event.handled());
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(TooltipIsVisible());
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_types.h b/chromium/ash/shelf/shelf_types.h
deleted file mode 100644
index 4ee3b94c09a..00000000000
--- a/chromium/ash/shelf/shelf_types.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_TYPES_H_
-#define ASH_SHELF_SHELF_TYPES_H_
-
-namespace ash {
-
-enum ShelfAlignment {
- SHELF_ALIGNMENT_BOTTOM,
- SHELF_ALIGNMENT_LEFT,
- SHELF_ALIGNMENT_RIGHT,
- SHELF_ALIGNMENT_TOP,
-};
-
-enum ShelfAutoHideBehavior {
- // Always auto-hide.
- SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
-
- // Never auto-hide.
- SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
-
- // Always hide.
- SHELF_AUTO_HIDE_ALWAYS_HIDDEN,
-};
-
-enum ShelfVisibilityState {
- // Always visible.
- SHELF_VISIBLE,
-
- // A couple of pixels are reserved at the bottom for the shelf.
- SHELF_AUTO_HIDE,
-
- // Nothing is shown. Used for fullscreen windows.
- SHELF_HIDDEN,
-};
-
-enum ShelfAutoHideState {
- SHELF_AUTO_HIDE_SHOWN,
- SHELF_AUTO_HIDE_HIDDEN,
-};
-
-enum ShelfBackgroundType {
- // The default transparent background.
- SHELF_BACKGROUND_DEFAULT,
-
- // The background when a window is overlapping.
- SHELF_BACKGROUND_OVERLAP,
-
- // The background when a window is maximized.
- SHELF_BACKGROUND_MAXIMIZED,
-};
-
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_TYPES_H_
diff --git a/chromium/ash/shelf/shelf_util.cc b/chromium/ash/shelf/shelf_util.cc
deleted file mode 100644
index 77031d803ae..00000000000
--- a/chromium/ash/shelf/shelf_util.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_util.h"
-
-#include "ui/aura/window_property.h"
-
-DECLARE_WINDOW_PROPERTY_TYPE(ash::LauncherID);
-DECLARE_WINDOW_PROPERTY_TYPE(ash::LauncherItemDetails*);
-
-namespace ash {
-
-DEFINE_LOCAL_WINDOW_PROPERTY_KEY(LauncherID, kLauncherID, kInvalidLauncherID);
-
-// ash::LauncherItemDetails for kLauncherItemDetaildKey is owned by the window
-// and will be freed automatically.
-DEFINE_OWNED_WINDOW_PROPERTY_KEY(LauncherItemDetails,
- kLauncherItemDetailsKey,
- NULL);
-
-void SetLauncherIDForWindow(LauncherID id, aura::Window* window) {
- if (!window)
- return;
-
- window->SetProperty(kLauncherID, id);
-}
-
-LauncherID GetLauncherIDForWindow(aura::Window* window) {
- DCHECK(window);
- return window->GetProperty(kLauncherID);
-}
-
-void SetLauncherItemDetailsForWindow(aura::Window* window,
- const LauncherItemDetails& details) {
- // |item_details| is owned by |window|.
- LauncherItemDetails* item_details = new LauncherItemDetails(details);
- window->SetProperty(kLauncherItemDetailsKey, item_details);
-}
-
-void ClearLauncherItemDetailsForWindow(aura::Window* window) {
- window->ClearProperty(kLauncherItemDetailsKey);
-}
-
-const LauncherItemDetails* GetLauncherItemDetailsForWindow(
- aura::Window* window) {
- return window->GetProperty(kLauncherItemDetailsKey);
-}
-
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_util.h b/chromium/ash/shelf/shelf_util.h
deleted file mode 100644
index 6fb3d5efc13..00000000000
--- a/chromium/ash/shelf/shelf_util.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_UTIL_H_
-#define ASH_SHELF_SHELF_UTIL_H_
-
-#include "ash/ash_export.h"
-#include "ash/launcher/launcher_types.h"
-#include "ui/aura/window.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-
-extern const aura::WindowProperty<ash::LauncherItemDetails*>* const
- kLauncherItemDetailsKey;
-
-// Associates LauncherItem of |id| with specified |window|.
-ASH_EXPORT void SetLauncherIDForWindow(LauncherID id, aura::Window* window);
-
-// Returns the id of the LauncherItem associated with the specified |window|,
-// or 0 if there isn't one.
-// Note: Window of a tabbed browser will return the |LauncherID| of the
-// currently active tab.
-ASH_EXPORT LauncherID GetLauncherIDForWindow(aura::Window* window);
-
-// Sets LauncherItemDetails for |window|.
-ASH_EXPORT void SetLauncherItemDetailsForWindow(
- aura::Window* window,
- const LauncherItemDetails& details);
-
-// Clears LauncherItemDetails for |window|.
-// If |window| has a LauncherItem by SetLauncherItemDetailsForWindow(), it will
-// be removed.
-ASH_EXPORT void ClearLauncherItemDetailsForWindow(aura::Window* window);
-
-// Returns LauncherItemDetails for |window| or NULL if it doesn't have.
-// Returned LauncherItemDetails object is owned by the |window|.
-ASH_EXPORT const LauncherItemDetails* GetLauncherItemDetailsForWindow(
- aura::Window* window);
-
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_UTIL_H_
diff --git a/chromium/ash/shelf/shelf_view.cc b/chromium/ash/shelf/shelf_view.cc
deleted file mode 100644
index 3b7e204a877..00000000000
--- a/chromium/ash/shelf/shelf_view.cc
+++ /dev/null
@@ -1,2031 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_view.h"
-
-#include <algorithm>
-
-#include "ash/ash_constants.h"
-#include "ash/ash_switches.h"
-#include "ash/drag_drop/drag_image_view.h"
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/root_window_controller.h"
-#include "ash/scoped_target_root_window.h"
-#include "ash/shelf/alternate_app_list_button.h"
-#include "ash/shelf/app_list_button.h"
-#include "ash/shelf/overflow_bubble.h"
-#include "ash/shelf/overflow_bubble_view.h"
-#include "ash/shelf/overflow_button.h"
-#include "ash/shelf/shelf_button.h"
-#include "ash/shelf/shelf_delegate.h"
-#include "ash/shelf/shelf_icon_observer.h"
-#include "ash/shelf/shelf_item_delegate.h"
-#include "ash/shelf/shelf_item_delegate_manager.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_menu_model.h"
-#include "ash/shelf/shelf_model.h"
-#include "ash/shelf/shelf_tooltip_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "base/auto_reset.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/metrics/histogram.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/base/accessibility/accessible_view_state.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/models/simple_menu_model.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animator.h"
-#include "ui/compositor/scoped_animation_duration_scale_mode.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/point.h"
-#include "ui/views/animation/bounds_animator.h"
-#include "ui/views/border.h"
-#include "ui/views/controls/button/image_button.h"
-#include "ui/views/controls/menu/menu_model_adapter.h"
-#include "ui/views/controls/menu/menu_runner.h"
-#include "ui/views/focus/focus_search.h"
-#include "ui/views/view_model.h"
-#include "ui/views/view_model_utils.h"
-#include "ui/views/widget/widget.h"
-
-using gfx::Animation;
-using views::View;
-
-namespace ash {
-namespace internal {
-
-const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_BOTTOM = 0;
-const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_LEFT = 1;
-const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_RIGHT = 2;
-const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_COUNT = 3;
-
-// Default amount content is inset on the left edge.
-const int kDefaultLeadingInset = 8;
-
-// Minimum distance before drag starts.
-const int kMinimumDragDistance = 8;
-
-// Size between the buttons.
-const int kButtonSpacing = 4;
-const int kAlternateButtonSpacing = 10;
-
-// Size allocated to for each button.
-const int kButtonSize = 44;
-
-// Additional spacing for the left and right side of icons.
-const int kHorizontalIconSpacing = 2;
-
-// Inset for items which do not have an icon.
-const int kHorizontalNoIconInsetSpacing =
- kHorizontalIconSpacing + kDefaultLeadingInset;
-
-// The proportion of the launcher space reserved for non-panel icons. Panels
-// may flow into this space but will be put into the overflow bubble if there
-// is contention for the space.
-const float kReservedNonPanelIconProportion = 0.67f;
-
-// This is the command id of the menu item which contains the name of the menu.
-const int kCommandIdOfMenuName = 0;
-
-// The background color of the active item in the list.
-const SkColor kActiveListItemBackgroundColor = SkColorSetRGB(203 , 219, 241);
-
-// The background color of the active & hovered item in the list.
-const SkColor kFocusedActiveListItemBackgroundColor =
- SkColorSetRGB(193, 211, 236);
-
-// The text color of the caption item in a list.
-const SkColor kCaptionItemForegroundColor = SK_ColorBLACK;
-
-// The maximum allowable length of a menu line of an application menu in pixels.
-const int kMaximumAppMenuItemLength = 350;
-
-// The distance of the cursor from the outer rim of the shelf before it
-// separates.
-const int kRipOffDistance = 48;
-
-// The rip off drag and drop proxy image should get scaled by this factor.
-const float kDragAndDropProxyScale = 1.5f;
-
-// The opacity represents that this partially disappeared item will get removed.
-const float kDraggedImageOpacity = 0.5f;
-
-namespace {
-
-// The MenuModelAdapter gets slightly changed to adapt the menu appearance to
-// our requirements.
-class ShelfMenuModelAdapter : public views::MenuModelAdapter {
- public:
- explicit ShelfMenuModelAdapter(ShelfMenuModel* menu_model);
-
- // views::MenuModelAdapter:
- virtual const gfx::Font* GetLabelFont(int command_id) const OVERRIDE;
- virtual bool IsCommandEnabled(int id) const OVERRIDE;
- virtual void GetHorizontalIconMargins(int id,
- int icon_size,
- int* left_margin,
- int* right_margin) const OVERRIDE;
- virtual bool GetForegroundColor(int command_id,
- bool is_hovered,
- SkColor* override_color) const OVERRIDE;
- virtual bool GetBackgroundColor(int command_id,
- bool is_hovered,
- SkColor* override_color) const OVERRIDE;
- virtual int GetMaxWidthForMenu(views::MenuItemView* menu) OVERRIDE;
- virtual bool ShouldReserveSpaceForSubmenuIndicator() const OVERRIDE;
-
- private:
- ShelfMenuModel* menu_model_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfMenuModelAdapter);
-};
-
-ShelfMenuModelAdapter::ShelfMenuModelAdapter(ShelfMenuModel* menu_model)
- : MenuModelAdapter(menu_model),
- menu_model_(menu_model) {
-}
-
-const gfx::Font* ShelfMenuModelAdapter::GetLabelFont(int command_id) const {
- if (command_id != kCommandIdOfMenuName)
- return MenuModelAdapter::GetLabelFont(command_id);
-
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- return &rb.GetFont(ui::ResourceBundle::BoldFont);
-}
-
-bool ShelfMenuModelAdapter::IsCommandEnabled(int id) const {
- return id != kCommandIdOfMenuName;
-}
-
-bool ShelfMenuModelAdapter::GetForegroundColor(int command_id,
- bool is_hovered,
- SkColor* override_color) const {
- if (command_id != kCommandIdOfMenuName)
- return false;
-
- *override_color = kCaptionItemForegroundColor;
- return true;
-}
-
-bool ShelfMenuModelAdapter::GetBackgroundColor(int command_id,
- bool is_hovered,
- SkColor* override_color) const {
- if (!menu_model_->IsCommandActive(command_id))
- return false;
-
- *override_color = is_hovered ? kFocusedActiveListItemBackgroundColor :
- kActiveListItemBackgroundColor;
- return true;
-}
-
-void ShelfMenuModelAdapter::GetHorizontalIconMargins(int command_id,
- int icon_size,
- int* left_margin,
- int* right_margin) const {
- *left_margin = kHorizontalIconSpacing;
- *right_margin = (command_id != kCommandIdOfMenuName) ?
- kHorizontalIconSpacing : -(icon_size + kHorizontalNoIconInsetSpacing);
-}
-
-int ShelfMenuModelAdapter::GetMaxWidthForMenu(views::MenuItemView* menu) {
- return kMaximumAppMenuItemLength;
-}
-
-bool ShelfMenuModelAdapter::ShouldReserveSpaceForSubmenuIndicator() const {
- return false;
-}
-
-// Custom FocusSearch used to navigate the launcher in the order items are in
-// the ViewModel.
-class LauncherFocusSearch : public views::FocusSearch {
- public:
- explicit LauncherFocusSearch(views::ViewModel* view_model)
- : FocusSearch(NULL, true, true),
- view_model_(view_model) {}
- virtual ~LauncherFocusSearch() {}
-
- // views::FocusSearch overrides:
- virtual View* FindNextFocusableView(
- View* starting_view,
- bool reverse,
- Direction direction,
- bool check_starting_view,
- views::FocusTraversable** focus_traversable,
- View** focus_traversable_view) OVERRIDE {
- int index = view_model_->GetIndexOfView(starting_view);
- if (index == -1)
- return view_model_->view_at(0);
-
- if (reverse) {
- --index;
- if (index < 0)
- index = view_model_->view_size() - 1;
- } else {
- ++index;
- if (index >= view_model_->view_size())
- index = 0;
- }
- return view_model_->view_at(index);
- }
-
- private:
- views::ViewModel* view_model_;
-
- DISALLOW_COPY_AND_ASSIGN(LauncherFocusSearch);
-};
-
-// AnimationDelegate used when inserting a new item. This steadily increases the
-// opacity of the layer as the animation progress.
-class FadeInAnimationDelegate
- : public views::BoundsAnimator::OwnedAnimationDelegate {
- public:
- explicit FadeInAnimationDelegate(views::View* view) : view_(view) {}
- virtual ~FadeInAnimationDelegate() {}
-
- // AnimationDelegate overrides:
- virtual void AnimationProgressed(const Animation* animation) OVERRIDE {
- view_->layer()->SetOpacity(animation->GetCurrentValue());
- view_->layer()->ScheduleDraw();
- }
- virtual void AnimationEnded(const Animation* animation) OVERRIDE {
- view_->layer()->SetOpacity(1.0f);
- view_->layer()->ScheduleDraw();
- }
- virtual void AnimationCanceled(const Animation* animation) OVERRIDE {
- view_->layer()->SetOpacity(1.0f);
- view_->layer()->ScheduleDraw();
- }
-
- private:
- views::View* view_;
-
- DISALLOW_COPY_AND_ASSIGN(FadeInAnimationDelegate);
-};
-
-void ReflectItemStatus(const ash::LauncherItem& item, ShelfButton* button) {
- switch (item.status) {
- case STATUS_CLOSED:
- button->ClearState(ShelfButton::STATE_ACTIVE);
- button->ClearState(ShelfButton::STATE_RUNNING);
- button->ClearState(ShelfButton::STATE_ATTENTION);
- break;
- case STATUS_RUNNING:
- button->ClearState(ShelfButton::STATE_ACTIVE);
- button->AddState(ShelfButton::STATE_RUNNING);
- button->ClearState(ShelfButton::STATE_ATTENTION);
- break;
- case STATUS_ACTIVE:
- button->AddState(ShelfButton::STATE_ACTIVE);
- button->ClearState(ShelfButton::STATE_RUNNING);
- button->ClearState(ShelfButton::STATE_ATTENTION);
- break;
- case STATUS_ATTENTION:
- button->ClearState(ShelfButton::STATE_ACTIVE);
- button->ClearState(ShelfButton::STATE_RUNNING);
- button->AddState(ShelfButton::STATE_ATTENTION);
- break;
- }
-}
-
-} // namespace
-
-// AnimationDelegate used when deleting an item. This steadily decreased the
-// opacity of the layer as the animation progress.
-class ShelfView::FadeOutAnimationDelegate
- : public views::BoundsAnimator::OwnedAnimationDelegate {
- public:
- FadeOutAnimationDelegate(ShelfView* host, views::View* view)
- : shelf_view_(host),
- view_(view) {}
- virtual ~FadeOutAnimationDelegate() {}
-
- // AnimationDelegate overrides:
- virtual void AnimationProgressed(const Animation* animation) OVERRIDE {
- view_->layer()->SetOpacity(1 - animation->GetCurrentValue());
- view_->layer()->ScheduleDraw();
- }
- virtual void AnimationEnded(const Animation* animation) OVERRIDE {
- shelf_view_->OnFadeOutAnimationEnded();
- }
- virtual void AnimationCanceled(const Animation* animation) OVERRIDE {
- }
-
- private:
- ShelfView* shelf_view_;
- scoped_ptr<views::View> view_;
-
- DISALLOW_COPY_AND_ASSIGN(FadeOutAnimationDelegate);
-};
-
-// AnimationDelegate used to trigger fading an element in. When an item is
-// inserted this delegate is attached to the animation that expands the size of
-// the item. When done it kicks off another animation to fade the item in.
-class ShelfView::StartFadeAnimationDelegate
- : public views::BoundsAnimator::OwnedAnimationDelegate {
- public:
- StartFadeAnimationDelegate(ShelfView* host,
- views::View* view)
- : shelf_view_(host),
- view_(view) {}
- virtual ~StartFadeAnimationDelegate() {}
-
- // AnimationDelegate overrides:
- virtual void AnimationEnded(const Animation* animation) OVERRIDE {
- shelf_view_->FadeIn(view_);
- }
- virtual void AnimationCanceled(const Animation* animation) OVERRIDE {
- view_->layer()->SetOpacity(1.0f);
- }
-
- private:
- ShelfView* shelf_view_;
- views::View* view_;
-
- DISALLOW_COPY_AND_ASSIGN(StartFadeAnimationDelegate);
-};
-
-ShelfView::ShelfView(ShelfModel* model,
- ShelfDelegate* delegate,
- ShelfLayoutManager* manager)
- : model_(model),
- delegate_(delegate),
- view_model_(new views::ViewModel),
- first_visible_index_(0),
- last_visible_index_(-1),
- overflow_button_(NULL),
- owner_overflow_bubble_(NULL),
- drag_pointer_(NONE),
- drag_view_(NULL),
- drag_offset_(0),
- start_drag_index_(-1),
- context_menu_id_(0),
- leading_inset_(kDefaultLeadingInset),
- cancelling_drag_model_changed_(false),
- last_hidden_index_(0),
- closing_event_time_(base::TimeDelta()),
- got_deleted_(NULL),
- drag_and_drop_item_pinned_(false),
- drag_and_drop_launcher_id_(0),
- dragged_off_shelf_(false),
- snap_back_from_rip_off_view_(NULL),
- item_manager_(Shell::GetInstance()->shelf_item_delegate_manager()),
- layout_manager_(manager),
- overflow_mode_(false),
- main_shelf_(NULL),
- dragged_off_from_overflow_to_shelf_(false) {
- DCHECK(model_);
- bounds_animator_.reset(new views::BoundsAnimator(this));
- bounds_animator_->AddObserver(this);
- set_context_menu_controller(this);
- focus_search_.reset(new LauncherFocusSearch(view_model_.get()));
- tooltip_.reset(new ShelfTooltipManager(manager, this));
-}
-
-ShelfView::~ShelfView() {
- bounds_animator_->RemoveObserver(this);
- model_->RemoveObserver(this);
- // If we are inside the MenuRunner, we need to know if we were getting
- // deleted while it was running.
- if (got_deleted_)
- *got_deleted_ = true;
-}
-
-void ShelfView::Init() {
- model_->AddObserver(this);
-
- const LauncherItems& items(model_->items());
- for (LauncherItems::const_iterator i = items.begin(); i != items.end(); ++i) {
- views::View* child = CreateViewForItem(*i);
- child->SetPaintToLayer(true);
- view_model_->Add(child, static_cast<int>(i - items.begin()));
- AddChildView(child);
- }
- ShelfStatusChanged();
- overflow_button_ = new OverflowButton(this);
- overflow_button_->set_context_menu_controller(this);
- ConfigureChildView(overflow_button_);
- AddChildView(overflow_button_);
- UpdateFirstButtonPadding();
-
- // We'll layout when our bounds change.
-}
-
-void ShelfView::OnShelfAlignmentChanged() {
- UpdateFirstButtonPadding();
- overflow_button_->OnShelfAlignmentChanged();
- LayoutToIdealBounds();
- for (int i=0; i < view_model_->view_size(); ++i) {
- // TODO: remove when AppIcon is a Shelf Button.
- if (TYPE_APP_LIST == model_->items()[i].type &&
- !ash::switches::UseAlternateShelfLayout()) {
- static_cast<AppListButton*>(view_model_->view_at(i))->SetImageAlignment(
- layout_manager_->SelectValueForShelfAlignment(
- views::ImageButton::ALIGN_CENTER,
- views::ImageButton::ALIGN_LEFT,
- views::ImageButton::ALIGN_RIGHT,
- views::ImageButton::ALIGN_CENTER),
- layout_manager_->SelectValueForShelfAlignment(
- views::ImageButton::ALIGN_TOP,
- views::ImageButton::ALIGN_MIDDLE,
- views::ImageButton::ALIGN_MIDDLE,
- views::ImageButton::ALIGN_BOTTOM));
- }
- if (i >= first_visible_index_ && i <= last_visible_index_)
- view_model_->view_at(i)->Layout();
- }
- tooltip_->Close();
- if (overflow_bubble_)
- overflow_bubble_->Hide();
-}
-
-void ShelfView::SchedulePaintForAllButtons() {
- for (int i = 0; i < view_model_->view_size(); ++i) {
- if (i >= first_visible_index_ && i <= last_visible_index_)
- view_model_->view_at(i)->SchedulePaint();
- }
- if (overflow_button_ && overflow_button_->visible())
- overflow_button_->SchedulePaint();
-}
-
-gfx::Rect ShelfView::GetIdealBoundsOfItemIcon(LauncherID id) {
- int index = model_->ItemIndexByID(id);
- if (index == -1 || (index > last_visible_index_ &&
- index < model_->FirstPanelIndex()))
- return gfx::Rect();
- const gfx::Rect& ideal_bounds(view_model_->ideal_bounds(index));
- DCHECK_NE(TYPE_APP_LIST, model_->items()[index].type);
- ShelfButton* button = static_cast<ShelfButton*>(view_model_->view_at(index));
- gfx::Rect icon_bounds = button->GetIconBounds();
- return gfx::Rect(GetMirroredXWithWidthInView(
- ideal_bounds.x() + icon_bounds.x(), icon_bounds.width()),
- ideal_bounds.y() + icon_bounds.y(),
- icon_bounds.width(),
- icon_bounds.height());
-}
-
-void ShelfView::UpdatePanelIconPosition(LauncherID id,
- const gfx::Point& midpoint) {
- int current_index = model_->ItemIndexByID(id);
- int first_panel_index = model_->FirstPanelIndex();
- if (current_index < first_panel_index)
- return;
-
- gfx::Point midpoint_in_view(GetMirroredXInView(midpoint.x()),
- midpoint.y());
- int target_index = current_index;
- while (target_index > first_panel_index &&
- layout_manager_->PrimaryAxisValue(
- view_model_->ideal_bounds(target_index).x(),
- view_model_->ideal_bounds(target_index).y()) >
- layout_manager_->PrimaryAxisValue(midpoint_in_view.x(),
- midpoint_in_view.y())) {
- --target_index;
- }
- while (target_index < view_model_->view_size() - 1 &&
- layout_manager_->PrimaryAxisValue(
- view_model_->ideal_bounds(target_index).right(),
- view_model_->ideal_bounds(target_index).bottom()) <
- layout_manager_->PrimaryAxisValue(midpoint_in_view.x(),
- midpoint_in_view.y())) {
- ++target_index;
- }
- if (current_index != target_index)
- model_->Move(current_index, target_index);
-}
-
-bool ShelfView::IsShowingMenu() const {
- return (launcher_menu_runner_.get() &&
- launcher_menu_runner_->IsRunning());
-}
-
-bool ShelfView::IsShowingOverflowBubble() const {
- return overflow_bubble_.get() && overflow_bubble_->IsShowing();
-}
-
-views::View* ShelfView::GetAppListButtonView() const {
- for (int i = 0; i < model_->item_count(); ++i) {
- if (model_->items()[i].type == TYPE_APP_LIST)
- return view_model_->view_at(i);
- }
-
- NOTREACHED() << "Applist button not found";
- return NULL;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// ShelfView, FocusTraversable implementation:
-
-views::FocusSearch* ShelfView::GetFocusSearch() {
- return focus_search_.get();
-}
-
-views::FocusTraversable* ShelfView::GetFocusTraversableParent() {
- return parent()->GetFocusTraversable();
-}
-
-View* ShelfView::GetFocusTraversableParentView() {
- return this;
-}
-
-void ShelfView::CreateDragIconProxy(
- const gfx::Point& location_in_screen_coordinates,
- const gfx::ImageSkia& icon,
- views::View* replaced_view,
- const gfx::Vector2d& cursor_offset_from_center,
- float scale_factor) {
- drag_replaced_view_ = replaced_view;
- drag_image_.reset(new ash::internal::DragImageView(
- drag_replaced_view_->GetWidget()->GetNativeWindow()->GetRootWindow(),
- ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE));
- drag_image_->SetImage(icon);
- gfx::Size size = drag_image_->GetPreferredSize();
- size.set_width(size.width() * scale_factor);
- size.set_height(size.height() * scale_factor);
- drag_image_offset_ = gfx::Vector2d(size.width() / 2, size.height() / 2) +
- cursor_offset_from_center;
- gfx::Rect drag_image_bounds(
- location_in_screen_coordinates - drag_image_offset_,
- size);
- drag_image_->SetBoundsInScreen(drag_image_bounds);
- drag_image_->SetWidgetVisible(true);
-}
-
-void ShelfView::UpdateDragIconProxy(
- const gfx::Point& location_in_screen_coordinates) {
- drag_image_->SetScreenPosition(
- location_in_screen_coordinates - drag_image_offset_);
-}
-
-void ShelfView::DestroyDragIconProxy() {
- drag_image_.reset();
- drag_image_offset_ = gfx::Vector2d(0, 0);
-}
-
-bool ShelfView::StartDrag(const std::string& app_id,
- const gfx::Point& location_in_screen_coordinates) {
- // Bail if an operation is already going on - or the cursor is not inside.
- // This could happen if mouse / touch operations overlap.
- if (drag_and_drop_launcher_id_ ||
- !GetBoundsInScreen().Contains(location_in_screen_coordinates))
- return false;
-
- // If the AppsGridView (which was dispatching this event) was opened by our
- // button, ShelfView dragging operations are locked and we have to unlock.
- CancelDrag(-1);
- drag_and_drop_item_pinned_ = false;
- drag_and_drop_app_id_ = app_id;
- drag_and_drop_launcher_id_ =
- delegate_->GetLauncherIDForAppID(drag_and_drop_app_id_);
- // Check if the application is known and pinned - if not, we have to pin it so
- // that we can re-arrange the launcher order accordingly. Note that items have
- // to be pinned to give them the same (order) possibilities as a shortcut.
- // When an item is dragged from overflow to shelf, IsShowingOverflowBubble()
- // returns true. At this time, we don't need to pin the item.
- if (!IsShowingOverflowBubble() &&
- (!drag_and_drop_launcher_id_ ||
- !delegate_->IsAppPinned(app_id))) {
- delegate_->PinAppWithID(app_id);
- drag_and_drop_launcher_id_ =
- delegate_->GetLauncherIDForAppID(drag_and_drop_app_id_);
- if (!drag_and_drop_launcher_id_)
- return false;
- drag_and_drop_item_pinned_ = true;
- }
- views::View* drag_and_drop_view = view_model_->view_at(
- model_->ItemIndexByID(drag_and_drop_launcher_id_));
- DCHECK(drag_and_drop_view);
-
- // Since there is already an icon presented by the caller, we hide this item
- // for now. That has to be done by reducing the size since the visibility will
- // change once a regrouping animation is performed.
- pre_drag_and_drop_size_ = drag_and_drop_view->size();
- drag_and_drop_view->SetSize(gfx::Size());
-
- // First we have to center the mouse cursor over the item.
- gfx::Point pt = drag_and_drop_view->GetBoundsInScreen().CenterPoint();
- views::View::ConvertPointFromScreen(drag_and_drop_view, &pt);
- gfx::Point point_in_root = location_in_screen_coordinates;
- ash::wm::ConvertPointFromScreen(
- ash::wm::GetRootWindowAt(location_in_screen_coordinates),
- &point_in_root);
- ui::MouseEvent event(ui::ET_MOUSE_PRESSED, pt, point_in_root, 0);
- PointerPressedOnButton(drag_and_drop_view,
- ShelfButtonHost::DRAG_AND_DROP,
- event);
-
- // Drag the item where it really belongs.
- Drag(location_in_screen_coordinates);
- return true;
-}
-
-bool ShelfView::Drag(const gfx::Point& location_in_screen_coordinates) {
- if (!drag_and_drop_launcher_id_ ||
- !GetBoundsInScreen().Contains(location_in_screen_coordinates))
- return false;
-
- gfx::Point pt = location_in_screen_coordinates;
- views::View* drag_and_drop_view = view_model_->view_at(
- model_->ItemIndexByID(drag_and_drop_launcher_id_));
- ConvertPointFromScreen(drag_and_drop_view, &pt);
- gfx::Point point_in_root = location_in_screen_coordinates;
- ash::wm::ConvertPointFromScreen(
- ash::wm::GetRootWindowAt(location_in_screen_coordinates),
- &point_in_root);
- ui::MouseEvent event(ui::ET_MOUSE_DRAGGED, pt, point_in_root, 0);
- PointerDraggedOnButton(drag_and_drop_view,
- ShelfButtonHost::DRAG_AND_DROP,
- event);
- return true;
-}
-
-void ShelfView::EndDrag(bool cancel) {
- if (!drag_and_drop_launcher_id_)
- return;
-
- views::View* drag_and_drop_view = view_model_->view_at(
- model_->ItemIndexByID(drag_and_drop_launcher_id_));
- PointerReleasedOnButton(
- drag_and_drop_view, ShelfButtonHost::DRAG_AND_DROP, cancel);
-
- // Either destroy the temporarily created item - or - make the item visible.
- if (drag_and_drop_item_pinned_ && cancel)
- delegate_->UnpinAppWithID(drag_and_drop_app_id_);
- else if (drag_and_drop_view) {
- if (cancel) {
- // When a hosted drag gets canceled, the item can remain in the same slot
- // and it might have moved within the bounds. In that case the item need
- // to animate back to its correct location.
- AnimateToIdealBounds();
- } else {
- drag_and_drop_view->SetSize(pre_drag_and_drop_size_);
- }
- }
-
- drag_and_drop_launcher_id_ = 0;
-}
-
-void ShelfView::LayoutToIdealBounds() {
- if (bounds_animator_->IsAnimating()) {
- AnimateToIdealBounds();
- return;
- }
-
- IdealBounds ideal_bounds;
- CalculateIdealBounds(&ideal_bounds);
- views::ViewModelUtils::SetViewBoundsToIdealBounds(*view_model_);
- overflow_button_->SetBoundsRect(ideal_bounds.overflow_bounds);
-}
-
-void ShelfView::UpdateAllButtonsVisibilityInOverflowMode() {
- // The overflow button is not shown in overflow mode.
- overflow_button_->SetVisible(false);
- int last_button_index = model_->FirstPanelIndex() - 1;
- DCHECK_LT(last_visible_index_, view_model_->view_size());
- for (int i = 0; i < view_model_->view_size(); ++i) {
- bool visible = i >= first_visible_index_ &&
- i <= last_visible_index_;
- if (!ash::switches::UseAlternateShelfLayout())
- visible &= i != last_button_index;
-
- // To track the dragging of |drag_view_| continuously, its visibility
- // should be always true regardless of its position.
- if (dragged_off_from_overflow_to_shelf_ &&
- view_model_->view_at(i) == drag_view_)
- view_model_->view_at(i)->SetVisible(true);
- else
- view_model_->view_at(i)->SetVisible(visible);
- }
-}
-
-void ShelfView::CalculateIdealBounds(IdealBounds* bounds) {
- int available_size = layout_manager_->PrimaryAxisValue(width(), height());
- DCHECK(model_->item_count() == view_model_->view_size());
- if (!available_size)
- return;
-
- int first_panel_index = model_->FirstPanelIndex();
- int last_button_index = first_panel_index - 1;
-
- // Initial x,y values account both leading_inset in primary
- // coordinate and secondary coordinate based on the dynamic edge of the
- // launcher (eg top edge on bottom-aligned launcher).
- int inset = ash::switches::UseAlternateShelfLayout() ? 0 : leading_inset_;
- int x = layout_manager_->SelectValueForShelfAlignment(inset, 0, 0, inset);
- int y = layout_manager_->SelectValueForShelfAlignment(0, inset, inset, 0);
-
- int button_size = GetButtonSize();
- int button_spacing = GetButtonSpacing();
-
- int w = layout_manager_->PrimaryAxisValue(button_size, width());
- int h = layout_manager_->PrimaryAxisValue(height(), button_size);
- for (int i = 0; i < view_model_->view_size(); ++i) {
- if (i < first_visible_index_) {
- view_model_->set_ideal_bounds(i, gfx::Rect(x, y, 0, 0));
- continue;
- }
-
- view_model_->set_ideal_bounds(i, gfx::Rect(x, y, w, h));
- if (i != last_button_index) {
- x = layout_manager_->PrimaryAxisValue(x + w + button_spacing, x);
- y = layout_manager_->PrimaryAxisValue(y, y + h + button_spacing);
- }
- }
-
- if (is_overflow_mode()) {
- UpdateAllButtonsVisibilityInOverflowMode();
- return;
- }
-
- // To address Fitt's law, we make the first launcher button include the
- // leading inset (if there is one).
- if (!ash::switches::UseAlternateShelfLayout()) {
- if (view_model_->view_size() > 0) {
- view_model_->set_ideal_bounds(0, gfx::Rect(gfx::Size(
- layout_manager_->PrimaryAxisValue(inset + w, w),
- layout_manager_->PrimaryAxisValue(h, inset + h))));
- }
- }
-
- // Right aligned icons.
- int end_position = available_size - button_spacing;
- x = layout_manager_->PrimaryAxisValue(end_position, 0);
- y = layout_manager_->PrimaryAxisValue(0, end_position);
- for (int i = view_model_->view_size() - 1;
- i >= first_panel_index; --i) {
- x = layout_manager_->PrimaryAxisValue(x - w - button_spacing, x);
- y = layout_manager_->PrimaryAxisValue(y, y - h - button_spacing);
- view_model_->set_ideal_bounds(i, gfx::Rect(x, y, w, h));
- end_position = layout_manager_->PrimaryAxisValue(x, y);
- }
-
- // Icons on the left / top are guaranteed up to kLeftIconProportion of
- // the available space.
- int last_icon_position = layout_manager_->PrimaryAxisValue(
- view_model_->ideal_bounds(last_button_index).right(),
- view_model_->ideal_bounds(last_button_index).bottom())
- + button_size + inset;
- if (!ash::switches::UseAlternateShelfLayout())
- last_icon_position += button_size;
- int reserved_icon_space = available_size * kReservedNonPanelIconProportion;
- if (last_icon_position < reserved_icon_space)
- end_position = last_icon_position;
- else
- end_position = std::max(end_position, reserved_icon_space);
-
- bounds->overflow_bounds.set_size(
- gfx::Size(layout_manager_->PrimaryAxisValue(w, width()),
- layout_manager_->PrimaryAxisValue(height(), h)));
-
- if (ash::switches::UseAlternateShelfLayout()) {
- last_visible_index_ = DetermineLastVisibleIndex(
- end_position - button_size);
- } else {
- last_visible_index_ = DetermineLastVisibleIndex(
- end_position - inset - 2 * button_size);
- }
- last_hidden_index_ = DetermineFirstVisiblePanelIndex(end_position) - 1;
- bool show_overflow =
- ((ash::switches::UseAlternateShelfLayout() ? 0 : 1) +
- last_visible_index_ < last_button_index ||
- last_hidden_index_ >= first_panel_index);
-
- // Create Space for the overflow button
- if (show_overflow && ash::switches::UseAlternateShelfLayout() &&
- last_visible_index_ > 0 && last_visible_index_ < last_button_index)
- --last_visible_index_;
- for (int i = 0; i < view_model_->view_size(); ++i) {
- bool visible = i <= last_visible_index_ || i > last_hidden_index_;
- // Always show the app list.
- if (!ash::switches::UseAlternateShelfLayout())
- visible |= (i == last_button_index);
- // To receive drag event continously from |drag_view_| during the dragging
- // off from the shelf, don't make |drag_view_| invisible. It will be
- // eventually invisible and removed from the |view_model_| by
- // FinalizeRipOffDrag().
- if (dragged_off_shelf_ && view_model_->view_at(i) == drag_view_)
- continue;
- view_model_->view_at(i)->SetVisible(visible);
- }
-
- overflow_button_->SetVisible(show_overflow);
- if (show_overflow) {
- DCHECK_NE(0, view_model_->view_size());
- if (last_visible_index_ == -1) {
- x = layout_manager_->SelectValueForShelfAlignment(inset, 0, 0, inset);
- y = layout_manager_->SelectValueForShelfAlignment(0, inset, inset, 0);
- } else if (last_visible_index_ == last_button_index
- && !ash::switches::UseAlternateShelfLayout()) {
- x = view_model_->ideal_bounds(last_visible_index_).x();
- y = view_model_->ideal_bounds(last_visible_index_).y();
- } else {
- x = layout_manager_->PrimaryAxisValue(
- view_model_->ideal_bounds(last_visible_index_).right(),
- view_model_->ideal_bounds(last_visible_index_).x());
- y = layout_manager_->PrimaryAxisValue(
- view_model_->ideal_bounds(last_visible_index_).y(),
- view_model_->ideal_bounds(last_visible_index_).bottom());
- }
- // Set all hidden panel icon positions to be on the overflow button.
- for (int i = first_panel_index; i <= last_hidden_index_; ++i)
- view_model_->set_ideal_bounds(i, gfx::Rect(x, y, w, h));
-
- // Add more space between last visible item and overflow button.
- // Without this, two buttons look too close compared with other items.
- if (ash::switches::UseAlternateShelfLayout()) {
- x = layout_manager_->PrimaryAxisValue(x + button_spacing, x);
- y = layout_manager_->PrimaryAxisValue(y, y + button_spacing);
- }
-
- bounds->overflow_bounds.set_x(x);
- bounds->overflow_bounds.set_y(y);
- if (!ash::switches::UseAlternateShelfLayout()) {
- // Position app list after overflow button.
- gfx::Rect app_list_bounds = view_model_->ideal_bounds(last_button_index);
-
- x = layout_manager_->PrimaryAxisValue(x + w + button_spacing, x);
- y = layout_manager_->PrimaryAxisValue(y, y + h + button_spacing);
- app_list_bounds.set_x(x);
- app_list_bounds.set_y(y);
- view_model_->set_ideal_bounds(last_button_index, app_list_bounds);
- }
- if (overflow_bubble_.get() && overflow_bubble_->IsShowing())
- UpdateOverflowRange(overflow_bubble_->shelf_view());
- } else {
- if (overflow_bubble_)
- overflow_bubble_->Hide();
- }
-}
-
-int ShelfView::DetermineLastVisibleIndex(int max_value) const {
- int index = model_->FirstPanelIndex() - 1;
- while (index >= 0 &&
- layout_manager_->PrimaryAxisValue(
- view_model_->ideal_bounds(index).right(),
- view_model_->ideal_bounds(index).bottom()) > max_value) {
- index--;
- }
- return index;
-}
-
-int ShelfView::DetermineFirstVisiblePanelIndex(int min_value) const {
- int index = model_->FirstPanelIndex();
- while (index < view_model_->view_size() &&
- layout_manager_->PrimaryAxisValue(
- view_model_->ideal_bounds(index).right(),
- view_model_->ideal_bounds(index).bottom()) < min_value) {
- ++index;
- }
- return index;
-}
-
-void ShelfView::AddIconObserver(ShelfIconObserver* observer) {
- observers_.AddObserver(observer);
-}
-
-void ShelfView::RemoveIconObserver(ShelfIconObserver* observer) {
- observers_.RemoveObserver(observer);
-}
-
-void ShelfView::AnimateToIdealBounds() {
- IdealBounds ideal_bounds;
- CalculateIdealBounds(&ideal_bounds);
- for (int i = 0; i < view_model_->view_size(); ++i) {
- View* view = view_model_->view_at(i);
- bounds_animator_->AnimateViewTo(view, view_model_->ideal_bounds(i));
- // Now that the item animation starts, we have to make sure that the
- // padding of the first gets properly transferred to the new first item.
- if (i && view->border())
- view->set_border(NULL);
- else if (!i && !view->border())
- UpdateFirstButtonPadding();
- }
- overflow_button_->SetBoundsRect(ideal_bounds.overflow_bounds);
-}
-
-views::View* ShelfView::CreateViewForItem(const LauncherItem& item) {
- views::View* view = NULL;
- switch (item.type) {
- case TYPE_BROWSER_SHORTCUT:
- case TYPE_APP_SHORTCUT:
- case TYPE_WINDOWED_APP:
- case TYPE_PLATFORM_APP:
- case TYPE_APP_PANEL: {
- ShelfButton* button = ShelfButton::Create(this, this, layout_manager_);
- button->SetImage(item.image);
- ReflectItemStatus(item, button);
- view = button;
- break;
- }
-
- case TYPE_APP_LIST: {
- if (ash::switches::UseAlternateShelfLayout()) {
- view = new AlternateAppListButton(this,
- this,
- layout_manager_->shelf_widget());
- } else {
- // TODO(dave): turn this into a ShelfButton too.
- AppListButton* button = new AppListButton(this, this);
- button->SetImageAlignment(
- layout_manager_->SelectValueForShelfAlignment(
- views::ImageButton::ALIGN_CENTER,
- views::ImageButton::ALIGN_LEFT,
- views::ImageButton::ALIGN_RIGHT,
- views::ImageButton::ALIGN_CENTER),
- layout_manager_->SelectValueForShelfAlignment(
- views::ImageButton::ALIGN_TOP,
- views::ImageButton::ALIGN_MIDDLE,
- views::ImageButton::ALIGN_MIDDLE,
- views::ImageButton::ALIGN_BOTTOM));
- view = button;
- }
- break;
- }
-
- default:
- break;
- }
- view->set_context_menu_controller(this);
-
- DCHECK(view);
- ConfigureChildView(view);
- return view;
-}
-
-void ShelfView::FadeIn(views::View* view) {
- view->SetVisible(true);
- view->layer()->SetOpacity(0);
- AnimateToIdealBounds();
- bounds_animator_->SetAnimationDelegate(
- view, new FadeInAnimationDelegate(view), true);
-}
-
-void ShelfView::PrepareForDrag(Pointer pointer, const ui::LocatedEvent& event) {
- DCHECK(!dragging());
- DCHECK(drag_view_);
- drag_pointer_ = pointer;
- start_drag_index_ = view_model_->GetIndexOfView(drag_view_);
-
- if (start_drag_index_== -1) {
- CancelDrag(-1);
- return;
- }
-
- // If the item is no longer draggable, bail out.
- ShelfItemDelegate* item_delegate = item_manager_->GetShelfItemDelegate(
- model_->items()[start_drag_index_].id);
- if (!item_delegate->IsDraggable()) {
- CancelDrag(-1);
- return;
- }
-
- // Move the view to the front so that it appears on top of other views.
- ReorderChildView(drag_view_, -1);
- bounds_animator_->StopAnimatingView(drag_view_);
-}
-
-void ShelfView::ContinueDrag(const ui::LocatedEvent& event) {
- // Due to a syncing operation the application might have been removed.
- // Bail if it is gone.
- int current_index = view_model_->GetIndexOfView(drag_view_);
- DCHECK_NE(-1, current_index);
-
- ShelfItemDelegate* item_delegate = item_manager_->GetShelfItemDelegate(
- model_->items()[current_index].id);
- if (!item_delegate->IsDraggable()) {
- CancelDrag(-1);
- return;
- }
-
- // If this is not a drag and drop host operation and not the app list item,
- // check if the item got ripped off the shelf - if it did we are done.
- if (!drag_and_drop_launcher_id_ && ash::switches::UseDragOffShelf() &&
- RemovableByRipOff(current_index) != NOT_REMOVABLE) {
- if (HandleRipOffDrag(event))
- return;
- // The rip off handler could have changed the location of the item.
- current_index = view_model_->GetIndexOfView(drag_view_);
- }
-
- // TODO: I don't think this works correctly with RTL.
- gfx::Point drag_point(event.location());
- ConvertPointToTarget(drag_view_, this, &drag_point);
-
- // Constrain the location to the range of valid indices for the type.
- std::pair<int, int> indices(GetDragRange(current_index));
- int first_drag_index = indices.first;
- int last_drag_index = indices.second;
- // If the last index isn't valid, we're overflowing. Constrain to the app list
- // (which is the last visible item).
- if (first_drag_index < model_->FirstPanelIndex() &&
- last_drag_index > last_visible_index_)
- last_drag_index = last_visible_index_;
- int x = 0, y = 0;
- if (layout_manager_->IsHorizontalAlignment()) {
- x = std::max(view_model_->ideal_bounds(indices.first).x(),
- drag_point.x() - drag_offset_);
- x = std::min(view_model_->ideal_bounds(last_drag_index).right() -
- view_model_->ideal_bounds(current_index).width(),
- x);
- if (drag_view_->x() == x)
- return;
- drag_view_->SetX(x);
- } else {
- y = std::max(view_model_->ideal_bounds(indices.first).y(),
- drag_point.y() - drag_offset_);
- y = std::min(view_model_->ideal_bounds(last_drag_index).bottom() -
- view_model_->ideal_bounds(current_index).height(),
- y);
- if (drag_view_->y() == y)
- return;
- drag_view_->SetY(y);
- }
-
- int target_index =
- views::ViewModelUtils::DetermineMoveIndex(
- *view_model_, drag_view_,
- layout_manager_->IsHorizontalAlignment() ?
- views::ViewModelUtils::HORIZONTAL :
- views::ViewModelUtils::VERTICAL,
- x, y);
- target_index =
- std::min(indices.second, std::max(target_index, indices.first));
- if (target_index == current_index)
- return;
-
- // Change the model, the LauncherItemMoved() callback will handle the
- // |view_model_| update.
- model_->Move(current_index, target_index);
- bounds_animator_->StopAnimatingView(drag_view_);
-}
-
-bool ShelfView::HandleRipOffDrag(const ui::LocatedEvent& event) {
- int current_index = view_model_->GetIndexOfView(drag_view_);
- DCHECK_NE(-1, current_index);
- std::string dragged_app_id =
- delegate_->GetAppIDForLauncherID(model_->items()[current_index].id);
-
- gfx::Point screen_location = event.root_location();
- ash::wm::ConvertPointToScreen(GetWidget()->GetNativeWindow()->GetRootWindow(),
- &screen_location);
-
- // To avoid ugly forwards and backwards flipping we use different constants
- // for ripping off / re-inserting the items.
- if (dragged_off_shelf_) {
- // If the shelf/overflow bubble bounds contains |screen_location| we insert
- // the item back into the shelf.
- if (GetBoundsForDragInsertInScreen().Contains(screen_location)) {
- if (dragged_off_from_overflow_to_shelf_) {
- // During the dragging an item from Shelf to Overflow, it can enter here
- // directly because both are located very closly.
- main_shelf_->EndDrag(true);
- // Stops the animation of |drag_view_| and sets its bounds explicitly
- // becase ContinueDrag() stops its animation. Without this, unexpected
- // bounds will be set.
- bounds_animator_->StopAnimatingView(drag_view_);
- int drag_view_index = view_model_->GetIndexOfView(drag_view_);
- drag_view_->SetBoundsRect(view_model_->ideal_bounds(drag_view_index));
- dragged_off_from_overflow_to_shelf_ = false;
- }
- // Destroy our proxy view item.
- DestroyDragIconProxy();
- // Re-insert the item and return simply false since the caller will handle
- // the move as in any normal case.
- dragged_off_shelf_ = false;
- drag_view_->layer()->SetOpacity(1.0f);
- // The size of Overflow bubble should be updated immediately when an item
- // is re-inserted.
- if (is_overflow_mode())
- PreferredSizeChanged();
- return false;
- } else if (is_overflow_mode() &&
- main_shelf_->GetBoundsForDragInsertInScreen().Contains(
- screen_location)) {
- if (!dragged_off_from_overflow_to_shelf_) {
- dragged_off_from_overflow_to_shelf_ = true;
- drag_image_->SetOpacity(1.0f);
- main_shelf_->StartDrag(dragged_app_id, screen_location);
- } else {
- main_shelf_->Drag(screen_location);
- }
- } else if (dragged_off_from_overflow_to_shelf_) {
- // Makes the |drag_image_| partially disappear again.
- dragged_off_from_overflow_to_shelf_ = false;
- drag_image_->SetOpacity(kDraggedImageOpacity);
- main_shelf_->EndDrag(true);
- bounds_animator_->StopAnimatingView(drag_view_);
- int drag_view_index = view_model_->GetIndexOfView(drag_view_);
- drag_view_->SetBoundsRect(view_model_->ideal_bounds(drag_view_index));
- }
- // Move our proxy view item.
- UpdateDragIconProxy(screen_location);
- return true;
- }
- // Check if we are too far away from the shelf to enter the ripped off state.
- // Determine the distance to the shelf.
- int delta = CalculateShelfDistance(screen_location);
- if (delta > kRipOffDistance) {
- // Create a proxy view item which can be moved anywhere.
- ShelfButton* button = static_cast<ShelfButton*>(drag_view_);
- CreateDragIconProxy(event.root_location(),
- button->GetImage(),
- drag_view_,
- gfx::Vector2d(0, 0),
- kDragAndDropProxyScale);
- drag_view_->layer()->SetOpacity(0.0f);
- dragged_off_shelf_ = true;
- if (RemovableByRipOff(current_index) == REMOVABLE) {
- // Move the item to the front of the first panel item and hide it.
- // LauncherItemMoved() callback will handle the |view_model_| update and
- // call AnimateToIdealBounds().
- if (current_index != model_->FirstPanelIndex() - 1) {
- model_->Move(current_index, model_->FirstPanelIndex() - 1);
- StartFadeInLastVisibleItem();
- } else if (is_overflow_mode()) {
- // Overflow bubble should be shrunk when an item is ripped off.
- PreferredSizeChanged();
- }
- // Make the item partially disappear to show that it will get removed if
- // dropped.
- drag_image_->SetOpacity(kDraggedImageOpacity);
- }
- return true;
- }
- return false;
-}
-
-void ShelfView::FinalizeRipOffDrag(bool cancel) {
- if (!dragged_off_shelf_)
- return;
- // Make sure we do not come in here again.
- dragged_off_shelf_ = false;
-
- // Coming here we should always have a |drag_view_|.
- DCHECK(drag_view_);
- int current_index = view_model_->GetIndexOfView(drag_view_);
- // If the view isn't part of the model anymore (|current_index| == -1), a sync
- // operation must have removed it. In that case we shouldn't change the model
- // and only delete the proxy image.
- if (current_index == -1) {
- DestroyDragIconProxy();
- return;
- }
-
- // Set to true when the animation should snap back to where it was before.
- bool snap_back = false;
- // Items which cannot be dragged off will be handled as a cancel.
- if (!cancel) {
- if (dragged_off_from_overflow_to_shelf_) {
- dragged_off_from_overflow_to_shelf_ = false;
- main_shelf_->EndDrag(false);
- drag_view_->layer()->SetOpacity(1.0f);
- } else if (RemovableByRipOff(current_index) != REMOVABLE) {
- // Make sure we do not try to remove un-removable items like items which
- // were not pinned or have to be always there.
- cancel = true;
- snap_back = true;
- } else {
- // Make sure the item stays invisible upon removal.
- drag_view_->SetVisible(false);
- std::string app_id =
- delegate_->GetAppIDForLauncherID(model_->items()[current_index].id);
- delegate_->UnpinAppWithID(app_id);
- }
- }
- if (cancel || snap_back) {
- if (dragged_off_from_overflow_to_shelf_) {
- dragged_off_from_overflow_to_shelf_ = false;
- // Main shelf handles revert of dragged item.
- main_shelf_->EndDrag(true);
- drag_view_->layer()->SetOpacity(1.0f);
- } else if (!cancelling_drag_model_changed_) {
- // Only do something if the change did not come through a model change.
- gfx::Rect drag_bounds = drag_image_->GetBoundsInScreen();
- gfx::Point relative_to = GetBoundsInScreen().origin();
- gfx::Rect target(
- gfx::PointAtOffsetFromOrigin(drag_bounds.origin()- relative_to),
- drag_bounds.size());
- drag_view_->SetBoundsRect(target);
- // Hide the status from the active item since we snap it back now. Upon
- // animation end the flag gets cleared if |snap_back_from_rip_off_view_|
- // is set.
- snap_back_from_rip_off_view_ = drag_view_;
- ShelfButton* button = static_cast<ShelfButton*>(drag_view_);
- button->AddState(ShelfButton::STATE_HIDDEN);
- // When a canceling drag model is happening, the view model is diverged
- // from the menu model and movements / animations should not be done.
- model_->Move(current_index, start_drag_index_);
- AnimateToIdealBounds();
- }
- drag_view_->layer()->SetOpacity(1.0f);
- }
- DestroyDragIconProxy();
-}
-
-ShelfView::RemovableState ShelfView::RemovableByRipOff(int index) {
- DCHECK(index >= 0 && index < model_->item_count());
- LauncherItemType type = model_->items()[index].type;
- if (type == TYPE_APP_LIST || !delegate_->CanPin())
- return NOT_REMOVABLE;
- std::string app_id =
- delegate_->GetAppIDForLauncherID(model_->items()[index].id);
- // Note: Only pinned app shortcuts can be removed!
- return (type == TYPE_APP_SHORTCUT && delegate_->IsAppPinned(app_id)) ?
- REMOVABLE : DRAGGABLE;
-}
-
-bool ShelfView::SameDragType(LauncherItemType typea,
- LauncherItemType typeb) const {
- switch (typea) {
- case TYPE_APP_SHORTCUT:
- case TYPE_BROWSER_SHORTCUT:
- return (typeb == TYPE_APP_SHORTCUT || typeb == TYPE_BROWSER_SHORTCUT);
- case TYPE_APP_LIST:
- case TYPE_PLATFORM_APP:
- case TYPE_WINDOWED_APP:
- case TYPE_APP_PANEL:
- return typeb == typea;
- case TYPE_UNDEFINED:
- NOTREACHED() << "LauncherItemType must be set.";
- return false;
- }
- NOTREACHED();
- return false;
-}
-
-std::pair<int, int> ShelfView::GetDragRange(int index) {
- int min_index = -1;
- int max_index = -1;
- LauncherItemType type = model_->items()[index].type;
- for (int i = 0; i < model_->item_count(); ++i) {
- if (SameDragType(model_->items()[i].type, type)) {
- if (min_index == -1)
- min_index = i;
- max_index = i;
- }
- }
- return std::pair<int, int>(min_index, max_index);
-}
-
-void ShelfView::ConfigureChildView(views::View* view) {
- view->SetPaintToLayer(true);
- view->layer()->SetFillsBoundsOpaquely(false);
-}
-
-void ShelfView::ToggleOverflowBubble() {
- if (IsShowingOverflowBubble()) {
- overflow_bubble_->Hide();
- return;
- }
-
- if (!overflow_bubble_)
- overflow_bubble_.reset(new OverflowBubble());
-
- ShelfView* overflow_view =
- new ShelfView(model_, delegate_, layout_manager_);
- overflow_view->overflow_mode_ = true;
- overflow_view->Init();
- overflow_view->set_owner_overflow_bubble(overflow_bubble_.get());
- overflow_view->OnShelfAlignmentChanged();
- overflow_view->main_shelf_ = this;
- UpdateOverflowRange(overflow_view);
-
- overflow_bubble_->Show(overflow_button_, overflow_view);
-
- Shell::GetInstance()->UpdateShelfVisibility();
-}
-
-void ShelfView::UpdateFirstButtonPadding() {
- if (ash::switches::UseAlternateShelfLayout())
- return;
-
- // Creates an empty border for first launcher button to make included leading
- // inset act as the button's padding. This is only needed on button creation
- // and when shelf alignment changes.
- if (view_model_->view_size() > 0) {
- view_model_->view_at(0)->set_border(views::Border::CreateEmptyBorder(
- layout_manager_->PrimaryAxisValue(0, leading_inset_),
- layout_manager_->PrimaryAxisValue(leading_inset_, 0),
- 0,
- 0));
- }
-}
-
-void ShelfView::OnFadeOutAnimationEnded() {
- AnimateToIdealBounds();
- StartFadeInLastVisibleItem();
-}
-
-void ShelfView::StartFadeInLastVisibleItem() {
- // If overflow button is visible and there is a valid new last item, fading
- // the new last item in after sliding animation is finished.
- if (overflow_button_->visible() && last_visible_index_ >= 0) {
- views::View* last_visible_view = view_model_->view_at(last_visible_index_);
- last_visible_view->layer()->SetOpacity(0);
- bounds_animator_->SetAnimationDelegate(
- last_visible_view,
- new ShelfView::StartFadeAnimationDelegate(this, last_visible_view),
- true);
- }
-}
-
-void ShelfView::UpdateOverflowRange(ShelfView* overflow_view) {
- const int first_overflow_index = last_visible_index_ + 1;
- const int last_overflow_index = last_hidden_index_;
- DCHECK_LE(first_overflow_index, last_overflow_index);
- DCHECK_LT(last_overflow_index, view_model_->view_size());
-
- overflow_view->first_visible_index_ = first_overflow_index;
- overflow_view->last_visible_index_ = last_overflow_index;
-}
-
-int ShelfView::GetButtonSize() const {
- return ash::switches::UseAlternateShelfLayout() ?
- kButtonSize : kLauncherPreferredSize;
-}
-
-int ShelfView::GetButtonSpacing() const {
- return ash::switches::UseAlternateShelfLayout() ?
- kAlternateButtonSpacing : kButtonSpacing;
-}
-
-bool ShelfView::ShouldHideTooltip(const gfx::Point& cursor_location) {
- gfx::Rect active_bounds;
-
- for (int i = 0; i < child_count(); ++i) {
- views::View* child = child_at(i);
- if (child == overflow_button_)
- continue;
- if (!ShouldShowTooltipForView(child))
- continue;
-
- gfx::Rect child_bounds = child->GetMirroredBounds();
- active_bounds.Union(child_bounds);
- }
-
- return !active_bounds.Contains(cursor_location);
-}
-
-gfx::Rect ShelfView::GetVisibleItemsBoundsInScreen() {
- gfx::Size preferred_size = GetPreferredSize();
- gfx::Point origin(GetMirroredXWithWidthInView(0, preferred_size.width()), 0);
- ConvertPointToScreen(this, &origin);
- return gfx::Rect(origin, preferred_size);
-}
-
-gfx::Rect ShelfView::GetBoundsForDragInsertInScreen() {
- gfx::Size preferred_size;
- if (is_overflow_mode()) {
- DCHECK(owner_overflow_bubble_);
- gfx::Rect bubble_bounds =
- owner_overflow_bubble_->bubble_view()->GetBubbleBounds();
- preferred_size = bubble_bounds.size();
- } else {
- const int preferred_shelf_size = layout_manager_->GetPreferredShelfSize();
-
- const int last_button_index = view_model_->view_size() - 1;
- gfx::Rect last_button_bounds =
- view_model_->view_at(last_button_index)->bounds();
- if (overflow_button_->visible() &&
- model_->GetItemIndexForType(TYPE_APP_PANEL) == -1) {
- // When overflow button is visible and shelf has no panel items,
- // last_button_bounds should be overflow button's bounds.
- last_button_bounds = overflow_button_->bounds();
- }
-
- if (layout_manager_->IsHorizontalAlignment()) {
- preferred_size = gfx::Size(last_button_bounds.right() + leading_inset_,
- preferred_shelf_size);
- } else {
- preferred_size = gfx::Size(preferred_shelf_size,
- last_button_bounds.bottom() + leading_inset_);
- }
- }
- gfx::Point origin(GetMirroredXWithWidthInView(0, preferred_size.width()), 0);
-
- // In overflow mode, we should use OverflowBubbleView as a source for
- // converting |origin| to screen coordinates. When a scroll operation is
- // occurred in OverflowBubble, the bounds of ShelfView in OverflowBubble can
- // be changed.
- if (is_overflow_mode())
- ConvertPointToScreen(owner_overflow_bubble_->bubble_view(), &origin);
- else
- ConvertPointToScreen(this, &origin);
-
- return gfx::Rect(origin, preferred_size);
-}
-
-int ShelfView::CancelDrag(int modified_index) {
- FinalizeRipOffDrag(true);
- if (!drag_view_)
- return modified_index;
- bool was_dragging = dragging();
- int drag_view_index = view_model_->GetIndexOfView(drag_view_);
- drag_pointer_ = NONE;
- drag_view_ = NULL;
- if (drag_view_index == modified_index) {
- // The view that was being dragged is being modified. Don't do anything.
- return modified_index;
- }
- if (!was_dragging)
- return modified_index;
-
- // Restore previous position, tracking the position of the modified view.
- bool at_end = modified_index == view_model_->view_size();
- views::View* modified_view =
- (modified_index >= 0 && !at_end) ?
- view_model_->view_at(modified_index) : NULL;
- model_->Move(drag_view_index, start_drag_index_);
-
- // If the modified view will be at the end of the list, return the new end of
- // the list.
- if (at_end)
- return view_model_->view_size();
- return modified_view ? view_model_->GetIndexOfView(modified_view) : -1;
-}
-
-gfx::Size ShelfView::GetPreferredSize() {
- IdealBounds ideal_bounds;
- CalculateIdealBounds(&ideal_bounds);
-
- const int preferred_size = layout_manager_->GetPreferredShelfSize();
-
- int last_button_index = is_overflow_mode() ?
- last_visible_index_ : view_model_->view_size() - 1;
-
- // When an item is dragged off from the overflow bubble, it is moved to last
- // position and and changed to invisible. Overflow bubble size should be
- // shrunk to fit only for visible items.
- // If |dragged_off_from_overflow_to_shelf_| is set, there will be no invisible
- // items in the shelf.
- if (is_overflow_mode() &&
- dragged_off_shelf_ &&
- !dragged_off_from_overflow_to_shelf_ &&
- RemovableByRipOff(view_model_->GetIndexOfView(drag_view_)) == REMOVABLE)
- last_button_index--;
-
- const gfx::Rect last_button_bounds =
- last_button_index >= first_visible_index_ ?
- view_model_->ideal_bounds(last_button_index) :
- gfx::Rect(gfx::Size(preferred_size, preferred_size));
-
- if (layout_manager_->IsHorizontalAlignment()) {
- return gfx::Size(last_button_bounds.right() + leading_inset_,
- preferred_size);
- }
-
- return gfx::Size(preferred_size,
- last_button_bounds.bottom() + leading_inset_);
-}
-
-void ShelfView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
- LayoutToIdealBounds();
- FOR_EACH_OBSERVER(ShelfIconObserver, observers_,
- OnShelfIconPositionsChanged());
-
- if (IsShowingOverflowBubble())
- overflow_bubble_->Hide();
-}
-
-views::FocusTraversable* ShelfView::GetPaneFocusTraversable() {
- return this;
-}
-
-void ShelfView::GetAccessibleState(ui::AccessibleViewState* state) {
- state->role = ui::AccessibilityTypes::ROLE_TOOLBAR;
- state->name = l10n_util::GetStringUTF16(IDS_ASH_SHELF_ACCESSIBLE_NAME);
-}
-
-void ShelfView::OnGestureEvent(ui::GestureEvent* event) {
- if (gesture_handler_.ProcessGestureEvent(*event))
- event->StopPropagation();
-}
-
-void ShelfView::ShelfItemAdded(int model_index) {
- {
- base::AutoReset<bool> cancelling_drag(
- &cancelling_drag_model_changed_, true);
- model_index = CancelDrag(model_index);
- }
- views::View* view = CreateViewForItem(model_->items()[model_index]);
- AddChildView(view);
- // Hide the view, it'll be made visible when the animation is done. Using
- // opacity 0 here to avoid messing with CalculateIdealBounds which touches
- // the view's visibility.
- view->layer()->SetOpacity(0);
- view_model_->Add(view, model_index);
-
- // Give the button its ideal bounds. That way if we end up animating the
- // button before this animation completes it doesn't appear at some random
- // spot (because it was in the middle of animating from 0,0 0x0 to its
- // target).
- IdealBounds ideal_bounds;
- CalculateIdealBounds(&ideal_bounds);
- view->SetBoundsRect(view_model_->ideal_bounds(model_index));
-
- // The first animation moves all the views to their target position. |view|
- // is hidden, so it visually appears as though we are providing space for
- // it. When done we'll fade the view in.
- AnimateToIdealBounds();
- if (model_index <= last_visible_index_ ||
- model_index >= model_->FirstPanelIndex()) {
- bounds_animator_->SetAnimationDelegate(
- view, new StartFadeAnimationDelegate(this, view), true);
- } else {
- // Undo the hiding if animation does not run.
- view->layer()->SetOpacity(1.0f);
- }
-}
-
-void ShelfView::ShelfItemRemoved(int model_index, LauncherID id) {
- if (id == context_menu_id_)
- launcher_menu_runner_.reset();
- {
- base::AutoReset<bool> cancelling_drag(
- &cancelling_drag_model_changed_, true);
- model_index = CancelDrag(model_index);
- }
- views::View* view = view_model_->view_at(model_index);
- view_model_->Remove(model_index);
-
- // When the overflow bubble is visible, the overflow range needs to be set
- // before CalculateIdealBounds() gets called. Otherwise CalculateIdealBounds()
- // could trigger a LauncherItemChanged() by hiding the overflow bubble and
- // since the overflow bubble is not yet synced with the ShelfModel this
- // could cause a crash.
- if (overflow_bubble_ && overflow_bubble_->IsShowing()) {
- last_hidden_index_ = std::min(last_hidden_index_,
- view_model_->view_size() - 1);
- UpdateOverflowRange(overflow_bubble_->shelf_view());
- }
-
- if (view->visible()) {
- // The first animation fades out the view. When done we'll animate the rest
- // of the views to their target location.
- bounds_animator_->AnimateViewTo(view, view->bounds());
- bounds_animator_->SetAnimationDelegate(
- view, new FadeOutAnimationDelegate(this, view), true);
- } else {
- // We don't need to show a fade out animation for invisible |view|. When an
- // item is ripped out from the shelf, its |view| is already invisible.
- AnimateToIdealBounds();
- }
-
- // Close the tooltip because it isn't needed any longer and its anchor view
- // will be deleted soon.
- if (tooltip_->GetCurrentAnchorView() == view)
- tooltip_->Close();
-}
-
-void ShelfView::ShelfItemChanged(int model_index,
- const LauncherItem& old_item) {
- const LauncherItem& item(model_->items()[model_index]);
- if (old_item.type != item.type) {
- // Type changed, swap the views.
- model_index = CancelDrag(model_index);
- scoped_ptr<views::View> old_view(view_model_->view_at(model_index));
- bounds_animator_->StopAnimatingView(old_view.get());
- // Removing and re-inserting a view in our view model will strip the ideal
- // bounds from the item. To avoid recalculation of everything the bounds
- // get remembered and restored after the insertion to the previous value.
- gfx::Rect old_ideal_bounds = view_model_->ideal_bounds(model_index);
- view_model_->Remove(model_index);
- views::View* new_view = CreateViewForItem(item);
- AddChildView(new_view);
- view_model_->Add(new_view, model_index);
- view_model_->set_ideal_bounds(model_index, old_ideal_bounds);
- new_view->SetBoundsRect(old_view->bounds());
- return;
- }
-
- views::View* view = view_model_->view_at(model_index);
- switch (item.type) {
- case TYPE_BROWSER_SHORTCUT:
- // Fallthrough for the new Shelf since it needs to show the activation
- // change as well.
- case TYPE_APP_SHORTCUT:
- case TYPE_WINDOWED_APP:
- case TYPE_PLATFORM_APP:
- case TYPE_APP_PANEL: {
- ShelfButton* button = static_cast<ShelfButton*>(view);
- ReflectItemStatus(item, button);
- // The browser shortcut is currently not a "real" item and as such the
- // the image is bogous as well. We therefore keep the image as is for it.
- if (item.type != TYPE_BROWSER_SHORTCUT)
- button->SetImage(item.image);
- button->SchedulePaint();
- break;
- }
-
- default:
- break;
- }
-}
-
-void ShelfView::ShelfItemMoved(int start_index, int target_index) {
- view_model_->Move(start_index, target_index);
- // When cancelling a drag due to a launcher item being added, the currently
- // dragged item is moved back to its initial position. AnimateToIdealBounds
- // will be called again when the new item is added to the |view_model_| but
- // at this time the |view_model_| is inconsistent with the |model_|.
- if (!cancelling_drag_model_changed_)
- AnimateToIdealBounds();
-}
-
-void ShelfView::ShelfStatusChanged() {
- if (ash::switches::UseAlternateShelfLayout())
- return;
- AppListButton* app_list_button =
- static_cast<AppListButton*>(GetAppListButtonView());
- if (model_->status() == ShelfModel::STATUS_LOADING)
- app_list_button->StartLoadingAnimation();
- else
- app_list_button->StopLoadingAnimation();
-}
-
-void ShelfView::PointerPressedOnButton(views::View* view,
- Pointer pointer,
- const ui::LocatedEvent& event) {
- if (drag_view_)
- return;
-
- int index = view_model_->GetIndexOfView(view);
- if (index == -1)
- return;
-
- ShelfItemDelegate* item_delegate = item_manager_->GetShelfItemDelegate(
- model_->items()[index].id);
- if (view_model_->view_size() <= 1 || !item_delegate->IsDraggable())
- return; // View is being deleted or not draggable, ignore request.
-
- drag_view_ = view;
- drag_offset_ = layout_manager_->PrimaryAxisValue(event.x(), event.y());
- UMA_HISTOGRAM_ENUMERATION("Ash.ShelfAlignmentUsage",
- layout_manager_->SelectValueForShelfAlignment(
- SHELF_ALIGNMENT_UMA_ENUM_VALUE_BOTTOM,
- SHELF_ALIGNMENT_UMA_ENUM_VALUE_LEFT,
- SHELF_ALIGNMENT_UMA_ENUM_VALUE_RIGHT,
- -1),
- SHELF_ALIGNMENT_UMA_ENUM_VALUE_COUNT);
-}
-
-void ShelfView::PointerDraggedOnButton(views::View* view,
- Pointer pointer,
- const ui::LocatedEvent& event) {
- // To prepare all drag types (moving an item in the shelf and dragging off),
- // we should check the x-axis and y-axis offset.
- if (!dragging() && drag_view_ &&
- ((abs(event.x() - drag_offset_) >= kMinimumDragDistance) ||
- (abs(event.y() - drag_offset_) >= kMinimumDragDistance))) {
- PrepareForDrag(pointer, event);
- }
- if (drag_pointer_ == pointer)
- ContinueDrag(event);
-}
-
-void ShelfView::PointerReleasedOnButton(views::View* view,
- Pointer pointer,
- bool canceled) {
- if (canceled) {
- CancelDrag(-1);
- } else if (drag_pointer_ == pointer) {
- FinalizeRipOffDrag(false);
- drag_pointer_ = NONE;
- AnimateToIdealBounds();
- }
- // If the drag pointer is NONE, no drag operation is going on and the
- // drag_view can be released.
- if (drag_pointer_ == NONE)
- drag_view_ = NULL;
-}
-
-void ShelfView::MouseMovedOverButton(views::View* view) {
- if (!ShouldShowTooltipForView(view))
- return;
-
- if (!tooltip_->IsVisible())
- tooltip_->ResetTimer();
-}
-
-void ShelfView::MouseEnteredButton(views::View* view) {
- if (!ShouldShowTooltipForView(view))
- return;
-
- if (tooltip_->IsVisible()) {
- tooltip_->ShowImmediately(view, GetAccessibleName(view));
- } else {
- tooltip_->ShowDelayed(view, GetAccessibleName(view));
- }
-}
-
-void ShelfView::MouseExitedButton(views::View* view) {
- if (!tooltip_->IsVisible())
- tooltip_->StopTimer();
-}
-
-base::string16 ShelfView::GetAccessibleName(const views::View* view) {
- int view_index = view_model_->GetIndexOfView(view);
- // May be -1 while in the process of animating closed.
- if (view_index == -1)
- return base::string16();
-
- ShelfItemDelegate* item_delegate = item_manager_->GetShelfItemDelegate(
- model_->items()[view_index].id);
- return item_delegate->GetTitle();
-}
-
-void ShelfView::ButtonPressed(views::Button* sender, const ui::Event& event) {
- // Do not handle mouse release during drag.
- if (dragging())
- return;
-
- if (sender == overflow_button_) {
- ToggleOverflowBubble();
- return;
- }
-
- int view_index = view_model_->GetIndexOfView(sender);
- // May be -1 while in the process of animating closed.
- if (view_index == -1)
- return;
-
- // If the previous menu was closed by the same event as this one, we ignore
- // the call.
- if (!IsUsableEvent(event))
- return;
-
- {
- ScopedTargetRootWindow scoped_target(
- sender->GetWidget()->GetNativeView()->GetRootWindow());
- // Slow down activation animations if shift key is pressed.
- scoped_ptr<ui::ScopedAnimationDurationScaleMode> slowing_animations;
- if (event.IsShiftDown()) {
- slowing_animations.reset(new ui::ScopedAnimationDurationScaleMode(
- ui::ScopedAnimationDurationScaleMode::SLOW_DURATION));
- }
-
- // Collect usage statistics before we decide what to do with the click.
- switch (model_->items()[view_index].type) {
- case TYPE_APP_SHORTCUT:
- case TYPE_WINDOWED_APP:
- case TYPE_PLATFORM_APP:
- case TYPE_BROWSER_SHORTCUT:
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- UMA_LAUNCHER_CLICK_ON_APP);
- break;
-
- case TYPE_APP_LIST:
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- UMA_LAUNCHER_CLICK_ON_APPLIST_BUTTON);
- break;
-
- case TYPE_APP_PANEL:
- break;
-
- case TYPE_UNDEFINED:
- NOTREACHED() << "LauncherItemType must be set.";
- break;
- }
-
- ShelfItemDelegate* item_delegate =
- item_manager_->GetShelfItemDelegate(model_->items()[view_index].id);
- if (!item_delegate->ItemSelected(event))
- ShowListMenuForView(model_->items()[view_index], sender, event);
- }
-}
-
-bool ShelfView::ShowListMenuForView(const LauncherItem& item,
- views::View* source,
- const ui::Event& event) {
- scoped_ptr<ShelfMenuModel> menu_model;
- ShelfItemDelegate* item_delegate =
- item_manager_->GetShelfItemDelegate(item.id);
- menu_model.reset(item_delegate->CreateApplicationMenu(event.flags()));
-
- // Make sure we have a menu and it has at least two items in addition to the
- // application title and the 3 spacing separators.
- if (!menu_model.get() || menu_model->GetItemCount() <= 5)
- return false;
-
- ShowMenu(scoped_ptr<views::MenuModelAdapter>(
- new ShelfMenuModelAdapter(menu_model.get())),
- source,
- gfx::Point(),
- false,
- ui::GetMenuSourceTypeForEvent(event));
- return true;
-}
-
-void ShelfView::ShowContextMenuForView(views::View* source,
- const gfx::Point& point,
- ui::MenuSourceType source_type) {
- int view_index = view_model_->GetIndexOfView(source);
- // TODO(simon.hong81): Create LauncherContextMenu for applist in its
- // ShelfItemDelegate.
- if (view_index != -1 && model_->items()[view_index].type == TYPE_APP_LIST) {
- view_index = -1;
- }
-
- if (view_index == -1) {
- Shell::GetInstance()->ShowContextMenu(point, source_type);
- return;
- }
- scoped_ptr<ui::MenuModel> menu_model;
- ShelfItemDelegate* item_delegate = item_manager_->GetShelfItemDelegate(
- model_->items()[view_index].id);
- menu_model.reset(item_delegate->CreateContextMenu(
- source->GetWidget()->GetNativeView()->GetRootWindow()));
- if (!menu_model)
- return;
-
- base::AutoReset<LauncherID> reseter(
- &context_menu_id_,
- view_index == -1 ? 0 : model_->items()[view_index].id);
-
- ShowMenu(scoped_ptr<views::MenuModelAdapter>(
- new views::MenuModelAdapter(menu_model.get())),
- source,
- point,
- true,
- source_type);
-}
-
-void ShelfView::ShowMenu(scoped_ptr<views::MenuModelAdapter> menu_model_adapter,
- views::View* source,
- const gfx::Point& click_point,
- bool context_menu,
- ui::MenuSourceType source_type) {
- closing_event_time_ = base::TimeDelta();
- launcher_menu_runner_.reset(
- new views::MenuRunner(menu_model_adapter->CreateMenu()));
-
- ScopedTargetRootWindow scoped_target(
- source->GetWidget()->GetNativeView()->GetRootWindow());
-
- // Determine the menu alignment dependent on the shelf.
- views::MenuItemView::AnchorPosition menu_alignment =
- views::MenuItemView::TOPLEFT;
- gfx::Rect anchor_point = gfx::Rect(click_point, gfx::Size());
-
- ShelfWidget* shelf = RootWindowController::ForLauncher(
- GetWidget()->GetNativeView())->shelf();
- if (!context_menu) {
- // Application lists use a bubble.
- ash::ShelfAlignment align = shelf->GetAlignment();
- anchor_point = source->GetBoundsInScreen();
-
- // It is possible to invoke the menu while it is sliding into view. To cover
- // that case, the screen coordinates are offsetted by the animation delta.
- gfx::Vector2d offset =
- source->GetWidget()->GetNativeWindow()->bounds().origin() -
- source->GetWidget()->GetNativeWindow()->GetTargetBounds().origin();
- anchor_point.set_x(anchor_point.x() - offset.x());
- anchor_point.set_y(anchor_point.y() - offset.y());
-
- // Shelf items can have an asymmetrical border for spacing reasons.
- // Adjust anchor location for this.
- if (source->border())
- anchor_point.Inset(source->border()->GetInsets());
-
- switch (align) {
- case ash::SHELF_ALIGNMENT_BOTTOM:
- menu_alignment = views::MenuItemView::BUBBLE_ABOVE;
- break;
- case ash::SHELF_ALIGNMENT_LEFT:
- menu_alignment = views::MenuItemView::BUBBLE_RIGHT;
- break;
- case ash::SHELF_ALIGNMENT_RIGHT:
- menu_alignment = views::MenuItemView::BUBBLE_LEFT;
- break;
- case ash::SHELF_ALIGNMENT_TOP:
- menu_alignment = views::MenuItemView::BUBBLE_BELOW;
- break;
- }
- }
- // If this gets deleted while we are in the menu, the launcher will be gone
- // as well.
- bool got_deleted = false;
- got_deleted_ = &got_deleted;
-
- shelf->ForceUndimming(true);
- // NOTE: if you convert to HAS_MNEMONICS be sure and update menu building
- // code.
- if (launcher_menu_runner_->RunMenuAt(
- source->GetWidget(),
- NULL,
- anchor_point,
- menu_alignment,
- source_type,
- context_menu ? views::MenuRunner::CONTEXT_MENU : 0) ==
- views::MenuRunner::MENU_DELETED) {
- if (!got_deleted) {
- got_deleted_ = NULL;
- shelf->ForceUndimming(false);
- }
- return;
- }
- got_deleted_ = NULL;
- shelf->ForceUndimming(false);
-
- // If it is a context menu and we are showing overflow bubble
- // we want to hide overflow bubble.
- if (owner_overflow_bubble_)
- owner_overflow_bubble_->HideBubbleAndRefreshButton();
-
- // Unpinning an item will reset the |launcher_menu_runner_| before coming
- // here.
- if (launcher_menu_runner_)
- closing_event_time_ = launcher_menu_runner_->closing_event_time();
- Shell::GetInstance()->UpdateShelfVisibility();
-}
-
-void ShelfView::OnBoundsAnimatorProgressed(views::BoundsAnimator* animator) {
- FOR_EACH_OBSERVER(ShelfIconObserver, observers_,
- OnShelfIconPositionsChanged());
- PreferredSizeChanged();
-}
-
-void ShelfView::OnBoundsAnimatorDone(views::BoundsAnimator* animator) {
- if (snap_back_from_rip_off_view_ && animator == bounds_animator_) {
- if (!animator->IsAnimating(snap_back_from_rip_off_view_)) {
- // Coming here the animation of the ShelfButton is finished and the
- // previously hidden status can be shown again. Since the button itself
- // might have gone away or changed locations we check that the button
- // is still in the shelf and show its status again.
- for (int index = 0; index < view_model_->view_size(); index++) {
- views::View* view = view_model_->view_at(index);
- if (view == snap_back_from_rip_off_view_) {
- ShelfButton* button = static_cast<ShelfButton*>(view);
- button->ClearState(ShelfButton::STATE_HIDDEN);
- break;
- }
- }
- snap_back_from_rip_off_view_ = NULL;
- }
- }
-}
-
-bool ShelfView::IsUsableEvent(const ui::Event& event) {
- if (closing_event_time_ == base::TimeDelta())
- return true;
-
- base::TimeDelta delta =
- base::TimeDelta(event.time_stamp() - closing_event_time_);
- closing_event_time_ = base::TimeDelta();
- // TODO(skuhne): This time seems excessive, but it appears that the reposting
- // takes that long. Need to come up with a better way of doing this.
- return (delta.InMilliseconds() < 0 || delta.InMilliseconds() > 130);
-}
-
-const LauncherItem* ShelfView::LauncherItemForView(
- const views::View* view) const {
- int view_index = view_model_->GetIndexOfView(view);
- if (view_index == -1)
- return NULL;
- return &(model_->items()[view_index]);
-}
-
-bool ShelfView::ShouldShowTooltipForView(const views::View* view) const {
- if (view == GetAppListButtonView() &&
- Shell::GetInstance()->GetAppListWindow())
- return false;
- const LauncherItem* item = LauncherItemForView(view);
- if (!item)
- return true;
- ShelfItemDelegate* item_delegate =
- item_manager_->GetShelfItemDelegate(item->id);
- return item_delegate->ShouldShowTooltip();
-}
-
-int ShelfView::CalculateShelfDistance(const gfx::Point& coordinate) const {
- ShelfWidget* shelf = RootWindowController::ForLauncher(
- GetWidget()->GetNativeView())->shelf();
- ash::ShelfAlignment align = shelf->GetAlignment();
- const gfx::Rect bounds = GetBoundsInScreen();
- int distance = 0;
- switch (align) {
- case ash::SHELF_ALIGNMENT_BOTTOM:
- distance = bounds.y() - coordinate.y();
- break;
- case ash::SHELF_ALIGNMENT_LEFT:
- distance = coordinate.x() - bounds.right();
- break;
- case ash::SHELF_ALIGNMENT_RIGHT:
- distance = bounds.x() - coordinate.x();
- break;
- case ash::SHELF_ALIGNMENT_TOP:
- distance = coordinate.y() - bounds.bottom();
- break;
- }
- return distance > 0 ? distance : 0;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_view.h b/chromium/ash/shelf/shelf_view.h
deleted file mode 100644
index 1f090e612a4..00000000000
--- a/chromium/ash/shelf/shelf_view.h
+++ /dev/null
@@ -1,458 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_VIEW_H_
-#define ASH_SHELF_SHELF_VIEW_H_
-
-#include <utility>
-#include <vector>
-
-#include "ash/shelf/shelf_button_host.h"
-#include "ash/shelf/shelf_model_observer.h"
-#include "ash/wm/gestures/shelf_gesture_handler.h"
-#include "base/observer_list.h"
-#include "ui/app_list/views/app_list_drag_and_drop_host.h"
-#include "ui/views/animation/bounds_animator_observer.h"
-#include "ui/views/context_menu_controller.h"
-#include "ui/views/controls/button/button.h"
-#include "ui/views/focus/focus_manager.h"
-#include "ui/views/view.h"
-
-namespace views {
-class BoundsAnimator;
-class MenuModelAdapter;
-class MenuRunner;
-class ViewModel;
-}
-
-namespace ash {
-
-namespace test {
-class ShelfViewTestAPI;
-}
-
-class ShelfDelegate;
-class ShelfIconObserver;
-class ShelfItemDelegateManager;
-class ShelfModel;
-struct LauncherItem;
-
-namespace internal {
-
-class DragImageView;
-class OverflowBubble;
-class OverflowButton;
-class ShelfButton;
-class ShelfLayoutManager;
-class ShelfTooltipManager;
-
-extern const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_BOTTOM;
-extern const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_LEFT;
-extern const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_RIGHT;
-extern const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_COUNT;
-
-class ASH_EXPORT ShelfView : public views::View,
- public ShelfModelObserver,
- public views::ButtonListener,
- public ShelfButtonHost,
- public views::ContextMenuController,
- public views::FocusTraversable,
- public views::BoundsAnimatorObserver,
- public app_list::ApplicationDragAndDropHost {
- public:
- ShelfView(ShelfModel* model,
- ShelfDelegate* delegate,
- ShelfLayoutManager* manager);
- virtual ~ShelfView();
-
- ShelfTooltipManager* tooltip_manager() { return tooltip_.get(); }
-
- ShelfLayoutManager* shelf_layout_manager() { return layout_manager_; }
-
- ShelfModel* model() { return model_; }
-
- void Init();
-
- void OnShelfAlignmentChanged();
- void SchedulePaintForAllButtons();
-
- // Returns the ideal bounds of the specified item, or an empty rect if id
- // isn't know.
- gfx::Rect GetIdealBoundsOfItemIcon(LauncherID id);
-
- // Repositions the icon for the specified item by the midpoint of the window.
- void UpdatePanelIconPosition(LauncherID id, const gfx::Point& midpoint);
-
- void AddIconObserver(ShelfIconObserver* observer);
- void RemoveIconObserver(ShelfIconObserver* observer);
-
- // Returns true if we're showing a menu.
- bool IsShowingMenu() const;
-
- // Returns true if overflow bubble is shown.
- bool IsShowingOverflowBubble() const;
-
- // Sets owner overflow bubble instance from which this shelf view pops
- // out as overflow.
- void set_owner_overflow_bubble(OverflowBubble* owner) {
- owner_overflow_bubble_ = owner;
- }
-
- views::View* GetAppListButtonView() const;
-
- // Returns true if the mouse cursor exits the area for launcher tooltip.
- // There are thin gaps between launcher buttons but the tooltip shouldn't hide
- // in the gaps, but the tooltip should hide if the mouse moved totally outside
- // of the buttons area.
- bool ShouldHideTooltip(const gfx::Point& cursor_location);
-
- // Returns rectangle bounding all visible launcher items. Used screen
- // coordinate system.
- gfx::Rect GetVisibleItemsBoundsInScreen();
-
- // Overridden from FocusTraversable:
- virtual views::FocusSearch* GetFocusSearch() OVERRIDE;
- virtual FocusTraversable* GetFocusTraversableParent() OVERRIDE;
- virtual View* GetFocusTraversableParentView() OVERRIDE;
-
- // Overridden from app_list::ApplicationDragAndDropHost:
- virtual void CreateDragIconProxy(
- const gfx::Point& location_in_screen_coordinates,
- const gfx::ImageSkia& icon,
- views::View* replaced_view,
- const gfx::Vector2d& cursor_offset_from_center,
- float scale_factor) OVERRIDE;
- virtual void UpdateDragIconProxy(
- const gfx::Point& location_in_screen_coordinates) OVERRIDE;
- virtual void DestroyDragIconProxy() OVERRIDE;
- virtual bool StartDrag(
- const std::string& app_id,
- const gfx::Point& location_in_screen_coordinates) OVERRIDE;
- virtual bool Drag(const gfx::Point& location_in_screen_coordinates) OVERRIDE;
- virtual void EndDrag(bool cancel) OVERRIDE;
-
- // Return the view model for test purposes.
- const views::ViewModel* const view_model_for_test() const {
- return view_model_.get();
- }
-
- private:
- friend class ash::test::ShelfViewTestAPI;
-
- class FadeOutAnimationDelegate;
- class StartFadeAnimationDelegate;
-
- struct IdealBounds {
- gfx::Rect overflow_bounds;
- };
-
- enum RemovableState {
- REMOVABLE, // Item can be removed when dragged away.
- DRAGGABLE, // Item can be dragged, but will snap always back to origin.
- NOT_REMOVABLE, // Item is fixed and can never be removed.
- };
-
- // Returns true when this ShelfView is used for Overflow Bubble.
- // In this mode, it does not show app list, panel and overflow button.
- // Note:
- // * When Shelf can contain only one item (overflow button) due to very
- // small resolution screen, overflow bubble can show app list and panel
- // button.
- bool is_overflow_mode() const { return overflow_mode_; }
-
- bool dragging() const {
- return drag_pointer_ != NONE;
- }
-
- // Sets the bounds of each view to its ideal bounds.
- void LayoutToIdealBounds();
-
- // Update all button's visibility in overflow.
- void UpdateAllButtonsVisibilityInOverflowMode();
-
- // Calculates the ideal bounds. The bounds of each button corresponding to an
- // item in the model is set in |view_model_|.
- void CalculateIdealBounds(IdealBounds* bounds);
-
- // Returns the index of the last view whose max primary axis coordinate is
- // less than |max_value|. Returns -1 if nothing fits, or there are no views.
- int DetermineLastVisibleIndex(int max_value) const;
-
- // Returns the index of the first panel whose min primary axis coordinate is
- // at least |min_value|. Returns the index past the last panel if none fit.
- int DetermineFirstVisiblePanelIndex(int min_value) const;
-
- // Animates the bounds of each view to its ideal bounds.
- void AnimateToIdealBounds();
-
- // Creates the view used to represent |item|.
- views::View* CreateViewForItem(const LauncherItem& item);
-
- // Fades |view| from an opacity of 0 to 1. This is when adding a new item.
- void FadeIn(views::View* view);
-
- // Invoked when the pointer has moved enough to trigger a drag. Sets
- // internal state in preparation for the drag.
- void PrepareForDrag(Pointer pointer, const ui::LocatedEvent& event);
-
- // Invoked when the mouse is dragged. Updates the models as appropriate.
- void ContinueDrag(const ui::LocatedEvent& event);
-
- // Handles ripping off an item from the shelf. Returns true when the item got
- // removed.
- bool HandleRipOffDrag(const ui::LocatedEvent& event);
-
- // Finalize the rip off dragging by either |cancel| the action or validating.
- void FinalizeRipOffDrag(bool cancel);
-
- // Check if an item can be ripped off or not.
- RemovableState RemovableByRipOff(int index);
-
- // Returns true if |typea| and |typeb| should be in the same drag range.
- bool SameDragType(LauncherItemType typea, LauncherItemType typeb) const;
-
- // Returns the range (in the model) the item at the specified index can be
- // dragged to.
- std::pair<int, int> GetDragRange(int index);
-
- // If there is a drag operation in progress it's canceled. If |modified_index|
- // is valid, the new position of the corresponding item is returned.
- int CancelDrag(int modified_index);
-
- // Returns rectangle bounds used for drag insertion.
- // Note:
- // * When overflow button is visible, returns bounds from first item
- // to overflow button.
- // * When overflow button is visible and one or more panel items exists,
- // returns bounds from first item to last panel item.
- // * In the overflow mode, returns only bubble's bounds.
- gfx::Rect GetBoundsForDragInsertInScreen();
-
- // Common setup done for all children.
- void ConfigureChildView(views::View* view);
-
- // Toggles the overflow menu.
- void ToggleOverflowBubble();
-
- // Update first launcher button's padding. This method adds padding to the
- // first button to include the leading inset. It needs to be called once on
- // button creation and every time when shelf alignment is changed.
- void UpdateFirstButtonPadding();
-
- // Invoked after the fading out animation for item deletion is ended.
- void OnFadeOutAnimationEnded();
-
- // Fade in last visible item.
- void StartFadeInLastVisibleItem();
-
- // Updates the visible range of overflow items in |overflow_view|.
- void UpdateOverflowRange(ShelfView* overflow_view);
-
- // Returns the launcher button size.
- int GetButtonSize() const;
-
- // Returns the button spacing.
- int GetButtonSpacing() const;
-
- // Overridden from views::View:
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
- virtual FocusTraversable* GetPaneFocusTraversable() OVERRIDE;
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
-
- // Overridden from ui::EventHandler:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- // Overridden from ShelfModelObserver:
- virtual void ShelfItemAdded(int model_index) OVERRIDE;
- virtual void ShelfItemRemoved(int model_index, LauncherID id) OVERRIDE;
- virtual void ShelfItemChanged(int model_index,
- const LauncherItem& old_item) OVERRIDE;
- virtual void ShelfItemMoved(int start_index, int target_index) OVERRIDE;
- virtual void ShelfStatusChanged() OVERRIDE;
-
- // Overridden from ShelfButtonHost:
- virtual void PointerPressedOnButton(views::View* view,
- Pointer pointer,
- const ui::LocatedEvent& event) OVERRIDE;
- virtual void PointerDraggedOnButton(views::View* view,
- Pointer pointer,
- const ui::LocatedEvent& event) OVERRIDE;
- virtual void PointerReleasedOnButton(views::View* view,
- Pointer pointer,
- bool canceled) OVERRIDE;
- virtual void MouseMovedOverButton(views::View* view) OVERRIDE;
- virtual void MouseEnteredButton(views::View* view) OVERRIDE;
- virtual void MouseExitedButton(views::View* view) OVERRIDE;
- virtual base::string16 GetAccessibleName(const views::View* view) OVERRIDE;
-
- // Overridden from views::ButtonListener:
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
-
- // Show the list of all running items for this |item|. It will return true
- // when the menu was shown and false if there were no possible items to
- // choose from. |source| specifies the view which is responsible for showing
- // the menu, and the bubble will point towards it.
- // The |event_flags| are the flags of the event which triggered this menu.
- bool ShowListMenuForView(const LauncherItem& item,
- views::View* source,
- const ui::Event& event);
-
- // Overridden from views::ContextMenuController:
- virtual void ShowContextMenuForView(views::View* source,
- const gfx::Point& point,
- ui::MenuSourceType source_type) OVERRIDE;
-
- // Show either a context or normal click menu of given |menu_model_adapter|.
- // If |context_menu| is set, the displayed menu is a context menu and not
- // a menu listing one or more running applications.
- // The |click_point| is only used for |context_menu|'s.
- void ShowMenu(scoped_ptr<views::MenuModelAdapter> menu_model_adapter,
- views::View* source,
- const gfx::Point& click_point,
- bool context_menu,
- ui::MenuSourceType source_type);
-
- // Overridden from views::BoundsAnimatorObserver:
- virtual void OnBoundsAnimatorProgressed(
- views::BoundsAnimator* animator) OVERRIDE;
- virtual void OnBoundsAnimatorDone(views::BoundsAnimator* animator) OVERRIDE;
-
- // Returns false if the click which closed the previous menu is the click
- // which triggered this event.
- bool IsUsableEvent(const ui::Event& event);
-
- // Convenience accessor to model_->items().
- const LauncherItem* LauncherItemForView(const views::View* view) const;
-
- // Returns true if a tooltip should be shown for |view|.
- bool ShouldShowTooltipForView(const views::View* view) const;
-
- // Get the distance from the given |coordinate| to the closest point on this
- // launcher/shelf.
- int CalculateShelfDistance(const gfx::Point& coordinate) const;
-
- // The model; owned by Launcher.
- ShelfModel* model_;
-
- // Delegate; owned by Launcher.
- ShelfDelegate* delegate_;
-
- // Used to manage the set of active launcher buttons. There is a view per
- // item in |model_|.
- scoped_ptr<views::ViewModel> view_model_;
-
- // Index of first visible launcher item.
- int first_visible_index_;
-
- // Last index of a launcher button that is visible
- // (does not go into overflow).
- int last_visible_index_;
-
- scoped_ptr<views::BoundsAnimator> bounds_animator_;
-
- OverflowButton* overflow_button_;
-
- scoped_ptr<OverflowBubble> overflow_bubble_;
-
- OverflowBubble* owner_overflow_bubble_;
-
- scoped_ptr<ShelfTooltipManager> tooltip_;
-
- // Pointer device that initiated the current drag operation. If there is no
- // current dragging operation, this is NONE.
- Pointer drag_pointer_;
-
- // The view being dragged. This is set immediately when the mouse is pressed.
- // |dragging_| is set only if the mouse is dragged far enough.
- views::View* drag_view_;
-
- // X coordinate of the mouse down event in |drag_view_|s coordinates.
- int drag_offset_;
-
- // Index |drag_view_| was initially at.
- int start_drag_index_;
-
- // Used for the context menu of a particular item.
- LauncherID context_menu_id_;
-
- scoped_ptr<views::FocusSearch> focus_search_;
-
- scoped_ptr<views::MenuRunner> launcher_menu_runner_;
-
- ObserverList<ShelfIconObserver> observers_;
-
- // Amount content is inset on the left edge (or top edge for vertical
- // alignment).
- int leading_inset_;
-
- ShelfGestureHandler gesture_handler_;
-
- // True when an item being inserted or removed in the model cancels a drag.
- bool cancelling_drag_model_changed_;
-
- // Index of the last hidden launcher item. If there are no hidden items this
- // will be equal to last_visible_index_ + 1.
- int last_hidden_index_;
-
- // The timestamp of the event which closed the last menu - or 0.
- base::TimeDelta closing_event_time_;
-
- // When this object gets deleted while a menu is shown, this pointed
- // element will be set to false.
- bool* got_deleted_;
-
- // True if a drag and drop operation created/pinned the item in the launcher
- // and it needs to be deleted/unpinned again if the operation gets cancelled.
- bool drag_and_drop_item_pinned_;
-
- // The launcher item which is currently used for a drag and a drop operation
- // or 0 otherwise.
- LauncherID drag_and_drop_launcher_id_;
-
- // The application ID of the application which we drag and drop.
- std::string drag_and_drop_app_id_;
-
- // The original launcher item's size before the dragging operation.
- gfx::Size pre_drag_and_drop_size_;
-
- // The image proxy for drag operations when a drag and drop host exists and
- // the item can be dragged outside the app grid.
- scoped_ptr<ash::internal::DragImageView> drag_image_;
-
- // The cursor offset to the middle of the dragged item.
- gfx::Vector2d drag_image_offset_;
-
- // The view which gets replaced by our drag icon proxy.
- views::View* drag_replaced_view_;
-
- // True when the icon was dragged off the shelf.
- bool dragged_off_shelf_;
-
- // The rip off view when a snap back operation is underway.
- views::View* snap_back_from_rip_off_view_;
-
- // Holds ShelfItemDelegateManager.
- ShelfItemDelegateManager* item_manager_;
-
- // Holds ShelfLayoutManager.
- ShelfLayoutManager* layout_manager_;
-
- // True when this ShelfView is used for Overflow Bubble.
- bool overflow_mode_;
-
- // Holds a pointer to main ShelfView when a ShelfView is in overflow mode.
- ShelfView* main_shelf_;
-
- // True when ripped item from overflow bubble is entered into Shelf.
- bool dragged_off_from_overflow_to_shelf_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfView);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_VIEW_H_
diff --git a/chromium/ash/shelf/shelf_view_unittest.cc b/chromium/ash/shelf/shelf_view_unittest.cc
deleted file mode 100644
index ec1468ab10d..00000000000
--- a/chromium/ash/shelf/shelf_view_unittest.cc
+++ /dev/null
@@ -1,1782 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_view.h"
-
-#include <algorithm>
-#include <vector>
-
-#include "ash/ash_switches.h"
-#include "ash/launcher/launcher.h"
-#include "ash/launcher/launcher_types.h"
-#include "ash/root_window_controller.h"
-#include "ash/shelf/overflow_bubble.h"
-#include "ash/shelf/overflow_bubble_view.h"
-#include "ash/shelf/shelf_button.h"
-#include "ash/shelf/shelf_icon_observer.h"
-#include "ash/shelf/shelf_item_delegate_manager.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_model.h"
-#include "ash/shelf/shelf_tooltip_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/launcher_test_api.h"
-#include "ash/test/overflow_bubble_view_test_api.h"
-#include "ash/test/shelf_view_test_api.h"
-#include "ash/test/shell_test_api.h"
-#include "ash/test/test_shelf_delegate.h"
-#include "ash/test/test_shelf_item_delegate.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "base/basictypes.h"
-#include "base/command_line.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/strings/string_number_conversions.h"
-#include "grit/ash_resources.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/aura_test_base.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/window.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/compositor/layer.h"
-#include "ui/events/event.h"
-#include "ui/events/event_constants.h"
-#include "ui/views/view_model.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-namespace test {
-
-////////////////////////////////////////////////////////////////////////////////
-// ShelfIconObserver tests.
-
-class TestShelfIconObserver : public ShelfIconObserver {
- public:
- explicit TestShelfIconObserver(Launcher* launcher)
- : launcher_(launcher),
- change_notified_(false) {
- if (launcher_)
- launcher_->AddIconObserver(this);
- }
-
- virtual ~TestShelfIconObserver() {
- if (launcher_)
- launcher_->RemoveIconObserver(this);
- }
-
- // ShelfIconObserver implementation.
- virtual void OnShelfIconPositionsChanged() OVERRIDE {
- change_notified_ = true;
- }
-
- int change_notified() const { return change_notified_; }
- void Reset() { change_notified_ = false; }
-
- private:
- Launcher* launcher_;
- bool change_notified_;
-
- DISALLOW_COPY_AND_ASSIGN(TestShelfIconObserver);
-};
-
-class ShelfViewIconObserverTest : public AshTestBase {
- public:
- ShelfViewIconObserverTest() {}
- virtual ~ShelfViewIconObserverTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- Launcher* launcher = Launcher::ForPrimaryDisplay();
- observer_.reset(new TestShelfIconObserver(launcher));
-
- shelf_view_test_.reset(new ShelfViewTestAPI(
- LauncherTestAPI(launcher).shelf_view()));
- shelf_view_test_->SetAnimationDuration(1);
- }
-
- virtual void TearDown() OVERRIDE {
- observer_.reset();
- AshTestBase::TearDown();
- }
-
- TestShelfIconObserver* observer() { return observer_.get(); }
-
- ShelfViewTestAPI* shelf_view_test() {
- return shelf_view_test_.get();
- }
-
- Launcher* LauncherForSecondaryDisplay() {
- return Launcher::ForWindow(Shell::GetAllRootWindows()[1]);
- }
-
- private:
- scoped_ptr<TestShelfIconObserver> observer_;
- scoped_ptr<ShelfViewTestAPI> shelf_view_test_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfViewIconObserverTest);
-};
-
-TEST_F(ShelfViewIconObserverTest, AddRemove) {
- TestShelfDelegate* shelf_delegate = TestShelfDelegate::instance();
- ASSERT_TRUE(shelf_delegate);
-
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.bounds = gfx::Rect(0, 0, 200, 200);
- params.context = CurrentContext();
-
- scoped_ptr<views::Widget> widget(new views::Widget());
- widget->Init(params);
- shelf_delegate->AddLauncherItem(widget->GetNativeWindow());
- shelf_view_test()->RunMessageLoopUntilAnimationsDone();
- EXPECT_TRUE(observer()->change_notified());
- observer()->Reset();
-
- widget->Show();
- widget->GetNativeWindow()->parent()->RemoveChild(widget->GetNativeWindow());
- shelf_view_test()->RunMessageLoopUntilAnimationsDone();
- EXPECT_TRUE(observer()->change_notified());
- observer()->Reset();
-}
-
-// Sometimes fails on trybots on win7_aura. http://crbug.com/177135
-#if defined(OS_WIN)
-#define MAYBE_AddRemoveWithMultipleDisplays \
- DISABLED_AddRemoveWithMultipleDisplays
-#else
-#define MAYBE_AddRemoveWithMultipleDisplays \
- AddRemoveWithMultipleDisplays
-#endif
-// Make sure creating/deleting an window on one displays notifies a
-// launcher on external display as well as one on primary.
-TEST_F(ShelfViewIconObserverTest, MAYBE_AddRemoveWithMultipleDisplays) {
- UpdateDisplay("400x400,400x400");
- TestShelfIconObserver second_observer(LauncherForSecondaryDisplay());
-
- TestShelfDelegate* shelf_delegate = TestShelfDelegate::instance();
- ASSERT_TRUE(shelf_delegate);
-
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.bounds = gfx::Rect(0, 0, 200, 200);
- params.context = CurrentContext();
-
- scoped_ptr<views::Widget> widget(new views::Widget());
- widget->Init(params);
- shelf_delegate->AddLauncherItem(widget->GetNativeWindow());
- shelf_view_test()->RunMessageLoopUntilAnimationsDone();
- EXPECT_TRUE(observer()->change_notified());
- EXPECT_TRUE(second_observer.change_notified());
- observer()->Reset();
- second_observer.Reset();
-
- widget->GetNativeWindow()->parent()->RemoveChild(widget->GetNativeWindow());
- shelf_view_test()->RunMessageLoopUntilAnimationsDone();
- EXPECT_TRUE(observer()->change_notified());
- EXPECT_TRUE(second_observer.change_notified());
-
- observer()->Reset();
- second_observer.Reset();
-}
-
-TEST_F(ShelfViewIconObserverTest, BoundsChanged) {
- ShelfWidget* shelf = Shell::GetPrimaryRootWindowController()->shelf();
- Launcher* launcher = Launcher::ForPrimaryDisplay();
- gfx::Size shelf_size =
- shelf->GetWindowBoundsInScreen().size();
- shelf_size.set_width(shelf_size.width() / 2);
- ASSERT_GT(shelf_size.width(), 0);
- launcher->SetShelfViewBounds(gfx::Rect(shelf_size));
- // No animation happens for ShelfView bounds change.
- EXPECT_TRUE(observer()->change_notified());
- observer()->Reset();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// ShelfView tests.
-
-// Simple ShelfDelegate implmentation for ShelfViewTest.OverflowBubbleSize
-// and CheckDragAndDropFromOverflowBubbleToShelf
-class TestShelfDelegateForShelfView : public ShelfDelegate {
- public:
- explicit TestShelfDelegateForShelfView(ShelfModel* model)
- : model_(model) {}
- virtual ~TestShelfDelegateForShelfView() {}
-
- // ShelfDelegate overrides:
- virtual void OnLauncherCreated(Launcher* launcher) OVERRIDE {}
-
- virtual void OnLauncherDestroyed(Launcher* launcher) OVERRIDE {}
-
- virtual LauncherID GetLauncherIDForAppID(const std::string& app_id) OVERRIDE {
- LauncherID id = 0;
- EXPECT_TRUE(base::StringToInt(app_id, &id));
- return id;
- }
-
- virtual const std::string& GetAppIDForLauncherID(LauncherID id) OVERRIDE {
- // Use |app_id_| member variable because returning a reference to local
- // variable is not allowed.
- app_id_ = base::IntToString(id);
- return app_id_;
- }
-
- virtual void PinAppWithID(const std::string& app_id) OVERRIDE {
- }
-
- virtual bool IsAppPinned(const std::string& app_id) OVERRIDE {
- // Returns true for ShelfViewTest.OverflowBubbleSize. To test ripping off in
- // that test, an item is already pinned state.
- return true;
- }
-
- virtual bool CanPin() const OVERRIDE {
- return true;
- }
-
- virtual void UnpinAppWithID(const std::string& app_id) OVERRIDE {
- LauncherID id = 0;
- EXPECT_TRUE(base::StringToInt(app_id, &id));
- ASSERT_GT(id, 0);
- int index = model_->ItemIndexByID(id);
- ASSERT_GE(index, 0);
-
- model_->RemoveItemAt(index);
- }
-
- private:
- ShelfModel* model_;
-
- // Temp member variable for returning a value. See the comment in the
- // GetAppIDForLauncherID().
- std::string app_id_;
-
- DISALLOW_COPY_AND_ASSIGN(TestShelfDelegateForShelfView);
-};
-
-class ShelfViewTest : public AshTestBase {
- public:
- ShelfViewTest() : model_(NULL), shelf_view_(NULL), browser_index_(1) {}
- virtual ~ShelfViewTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- test::ShellTestApi test_api(Shell::GetInstance());
- model_ = test_api.shelf_model();
- Launcher* launcher = Launcher::ForPrimaryDisplay();
- shelf_view_ = test::LauncherTestAPI(launcher).shelf_view();
-
- // The bounds should be big enough for 4 buttons + overflow chevron.
- shelf_view_->SetBounds(0, 0, 500,
- internal::ShelfLayoutManager::GetPreferredShelfSize());
-
- test_api_.reset(new ShelfViewTestAPI(shelf_view_));
- test_api_->SetAnimationDuration(1); // Speeds up animation for test.
-
- item_manager_ = Shell::GetInstance()->shelf_item_delegate_manager();
- DCHECK(item_manager_);
-
- // Add browser shortcut launcher item at index 0 for test.
- AddBrowserShortcut();
- }
-
- virtual void TearDown() OVERRIDE {
- test_api_.reset();
- AshTestBase::TearDown();
- }
-
- protected:
- void CreateAndSetShelfItemDelegateForID(LauncherID id) {
- scoped_ptr<ShelfItemDelegate> delegate(new TestShelfItemDelegate(NULL));
- item_manager_->SetShelfItemDelegate(id, delegate.Pass());
- }
-
- LauncherID AddBrowserShortcut() {
- LauncherItem browser_shortcut;
- browser_shortcut.type = TYPE_BROWSER_SHORTCUT;
-
- LauncherID id = model_->next_id();
- model_->AddAt(browser_index_, browser_shortcut);
- CreateAndSetShelfItemDelegateForID(id);
- test_api_->RunMessageLoopUntilAnimationsDone();
- return id;
- }
-
- LauncherID AddAppShortcut() {
- LauncherItem item;
- item.type = TYPE_APP_SHORTCUT;
- item.status = STATUS_CLOSED;
-
- LauncherID id = model_->next_id();
- model_->Add(item);
- CreateAndSetShelfItemDelegateForID(id);
- test_api_->RunMessageLoopUntilAnimationsDone();
- return id;
- }
-
- LauncherID AddPanel() {
- LauncherID id = AddPanelNoWait();
- test_api_->RunMessageLoopUntilAnimationsDone();
- return id;
- }
-
- LauncherID AddPlatformAppNoWait() {
- LauncherItem item;
- item.type = TYPE_PLATFORM_APP;
- item.status = STATUS_RUNNING;
-
- LauncherID id = model_->next_id();
- model_->Add(item);
- CreateAndSetShelfItemDelegateForID(id);
- return id;
- }
-
- LauncherID AddPanelNoWait() {
- LauncherItem item;
- item.type = TYPE_APP_PANEL;
- item.status = STATUS_RUNNING;
-
- LauncherID id = model_->next_id();
- model_->Add(item);
- CreateAndSetShelfItemDelegateForID(id);
- return id;
- }
-
- LauncherID AddPlatformApp() {
- LauncherID id = AddPlatformAppNoWait();
- test_api_->RunMessageLoopUntilAnimationsDone();
- return id;
- }
-
- void RemoveByID(LauncherID id) {
- model_->RemoveItemAt(model_->ItemIndexByID(id));
- test_api_->RunMessageLoopUntilAnimationsDone();
- }
-
- internal::ShelfButton* GetButtonByID(LauncherID id) {
- int index = model_->ItemIndexByID(id);
- return test_api_->GetButton(index);
- }
-
- LauncherItem GetItemByID(LauncherID id) {
- LauncherItems::const_iterator items = model_->ItemByID(id);
- return *items;
- }
-
- void CheckModelIDs(
- const std::vector<std::pair<LauncherID, views::View*> >& id_map) {
- size_t map_index = 0;
- for (size_t model_index = 0;
- model_index < model_->items().size();
- ++model_index) {
- LauncherItem item = model_->items()[model_index];
- LauncherID id = item.id;
- EXPECT_EQ(id_map[map_index].first, id);
- EXPECT_EQ(id_map[map_index].second, GetButtonByID(id));
- ++map_index;
- }
- ASSERT_EQ(map_index, id_map.size());
- }
-
- void VerifyLauncherItemBoundsAreValid() {
- for (int i=0;i <= test_api_->GetLastVisibleIndex(); ++i) {
- if (test_api_->GetButton(i)) {
- gfx::Rect shelf_view_bounds = shelf_view_->GetLocalBounds();
- gfx::Rect item_bounds = test_api_->GetBoundsByIndex(i);
- EXPECT_TRUE(item_bounds.x() >= 0);
- EXPECT_TRUE(item_bounds.y() >= 0);
- EXPECT_TRUE(item_bounds.right() <= shelf_view_bounds.width());
- EXPECT_TRUE(item_bounds.bottom() <= shelf_view_bounds.height());
- }
- }
- }
-
- views::View* SimulateButtonPressed(
- internal::ShelfButtonHost::Pointer pointer,
- int button_index) {
- internal::ShelfButtonHost* button_host = shelf_view_;
- views::View* button = test_api_->GetButton(button_index);
- ui::MouseEvent click_event(ui::ET_MOUSE_PRESSED,
- button->bounds().origin(),
- button->GetBoundsInScreen().origin(), 0);
- button_host->PointerPressedOnButton(button, pointer, click_event);
- return button;
- }
-
- views::View* SimulateClick(internal::ShelfButtonHost::Pointer pointer,
- int button_index) {
- internal::ShelfButtonHost* button_host = shelf_view_;
- views::View* button = SimulateButtonPressed(pointer, button_index);
- button_host->PointerReleasedOnButton(button,
- internal::ShelfButtonHost::MOUSE,
- false);
- return button;
- }
-
- views::View* SimulateDrag(internal::ShelfButtonHost::Pointer pointer,
- int button_index,
- int destination_index) {
- internal::ShelfButtonHost* button_host = shelf_view_;
- views::View* button = SimulateButtonPressed(pointer, button_index);
-
- // Drag.
- views::View* destination = test_api_->GetButton(destination_index);
- ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED,
- destination->bounds().origin(),
- destination->GetBoundsInScreen().origin(), 0);
- button_host->PointerDraggedOnButton(button, pointer, drag_event);
- return button;
- }
-
- void SetupForDragTest(
- std::vector<std::pair<LauncherID, views::View*> >* id_map) {
- // Initialize |id_map| with the automatically-created launcher buttons.
- for (size_t i = 0; i < model_->items().size(); ++i) {
- internal::ShelfButton* button = test_api_->GetButton(i);
- id_map->push_back(std::make_pair(model_->items()[i].id, button));
- }
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(*id_map));
-
- // Add 5 app launcher buttons for testing.
- for (int i = 0; i < 5; ++i) {
- LauncherID id = AddAppShortcut();
- // App Icon is located at index 0, and browser shortcut is located at
- // index 1. So we should start to add app shortcut at index 2.
- id_map->insert(id_map->begin() + (i + browser_index_ + 1),
- std::make_pair(id, GetButtonByID(id)));
- }
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(*id_map));
- }
-
- views::View* GetTooltipAnchorView() {
- return shelf_view_->tooltip_manager()->anchor_;
- }
-
- void AddButtonsUntilOverflow() {
- int items_added = 0;
- while (!test_api_->IsOverflowButtonVisible()) {
- AddAppShortcut();
- ++items_added;
- ASSERT_LT(items_added, 10000);
- }
- }
-
- void ShowTooltip() {
- shelf_view_->tooltip_manager()->ShowInternal();
- }
-
- void TestDraggingAnItemFromOverflowToShelf(bool cancel) {
- test_api_->ShowOverflowBubble();
- ASSERT_TRUE(test_api_->overflow_bubble() &&
- test_api_->overflow_bubble()->IsShowing());
-
- ash::test::ShelfViewTestAPI test_api_for_overflow(
- test_api_->overflow_bubble()->shelf_view());
-
- int total_item_count = model_->item_count();
-
- int last_visible_item_id_in_shelf =
- model_->items()[test_api_->GetLastVisibleIndex()].id;
- int second_last_visible_item_id_in_shelf =
- model_->items()[test_api_->GetLastVisibleIndex() - 1].id;
- int first_visible_item_id_in_overflow =
- model_->items()[test_api_for_overflow.GetFirstVisibleIndex()].id;
- int second_last_visible_item_id_in_overflow =
- model_->items()[test_api_for_overflow.GetLastVisibleIndex() - 1].id;
-
- int drag_item_index =
- test_api_for_overflow.GetLastVisibleIndex();
- LauncherID drag_item_id = model_->items()[drag_item_index].id;
- internal::ShelfButton* drag_button =
- test_api_for_overflow.GetButton(drag_item_index);
- gfx::Point center_point_of_drag_item =
- drag_button->GetBoundsInScreen().CenterPoint();
-
- aura::test::EventGenerator generator(ash::Shell::GetPrimaryRootWindow(),
- center_point_of_drag_item);
- // Rip an item off to OverflowBubble.
- generator.PressLeftButton();
- gfx::Point rip_off_point(center_point_of_drag_item.x(), 0);
- generator.MoveMouseTo(rip_off_point);
- test_api_for_overflow.RunMessageLoopUntilAnimationsDone();
- ASSERT_TRUE(test_api_for_overflow.IsRippedOffFromShelf());
- ASSERT_FALSE(test_api_for_overflow.DraggedItemFromOverflowToShelf());
-
- // Move a dragged item into Shelf at |drop_index|.
- int drop_index = 1;
- gfx::Point drop_point =
- test_api_->GetButton(drop_index)->GetBoundsInScreen().CenterPoint();
- int item_width = test_api_for_overflow.GetButtonSize();
- // To insert at |drop_index|, more smaller x-axis value of |drop_point|
- // should be used.
- gfx::Point modified_drop_point(drop_point.x() - item_width / 4,
- drop_point.y());
- generator.MoveMouseTo(modified_drop_point);
- test_api_for_overflow.RunMessageLoopUntilAnimationsDone();
- test_api_->RunMessageLoopUntilAnimationsDone();
- ASSERT_TRUE(test_api_for_overflow.IsRippedOffFromShelf());
- ASSERT_TRUE(test_api_for_overflow.DraggedItemFromOverflowToShelf());
-
- if (cancel)
- drag_button->OnMouseCaptureLost();
- else
- generator.ReleaseLeftButton();
-
- test_api_for_overflow.RunMessageLoopUntilAnimationsDone();
- test_api_->RunMessageLoopUntilAnimationsDone();
- ASSERT_FALSE(test_api_for_overflow.IsRippedOffFromShelf());
- ASSERT_FALSE(test_api_for_overflow.DraggedItemFromOverflowToShelf());
-
- // Compare pre-stored items' id with newly positioned items' after dragging
- // is canceled or finished.
- if (cancel) {
- EXPECT_EQ(model_->items()[test_api_->GetLastVisibleIndex()].id,
- last_visible_item_id_in_shelf);
- EXPECT_EQ(model_->items()[test_api_->GetLastVisibleIndex() - 1].id,
- second_last_visible_item_id_in_shelf);
- EXPECT_EQ(
- model_->items()[test_api_for_overflow.GetFirstVisibleIndex()].id,
- first_visible_item_id_in_overflow);
- EXPECT_EQ(
- model_->items()[test_api_for_overflow.GetLastVisibleIndex() - 1].id,
- second_last_visible_item_id_in_overflow);
- } else {
- LauncherID drop_item_id = model_->items()[drop_index].id;
- EXPECT_EQ(drop_item_id, drag_item_id);
- EXPECT_EQ(model_->item_count(), total_item_count);
- EXPECT_EQ(
- model_->items()[test_api_for_overflow.GetFirstVisibleIndex()].id,
- last_visible_item_id_in_shelf);
- EXPECT_EQ(model_->items()[test_api_->GetLastVisibleIndex()].id,
- second_last_visible_item_id_in_shelf);
- EXPECT_EQ(
- model_->items()[test_api_for_overflow.GetFirstVisibleIndex() + 1].id,
- first_visible_item_id_in_overflow);
- EXPECT_EQ(model_->items()[test_api_for_overflow.GetLastVisibleIndex()].id,
- second_last_visible_item_id_in_overflow);
- }
- }
-
- ShelfModel* model_;
- internal::ShelfView* shelf_view_;
- int browser_index_;
- ShelfItemDelegateManager* item_manager_;
-
- scoped_ptr<ShelfViewTestAPI> test_api_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShelfViewTest);
-};
-
-class ShelfViewLegacyShelfLayoutTest : public ShelfViewTest {
- public:
- ShelfViewLegacyShelfLayoutTest() : ShelfViewTest() {
- browser_index_ = 0;
- }
-
- virtual ~ShelfViewLegacyShelfLayoutTest() {}
-
- virtual void SetUp() OVERRIDE {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshDisableAlternateShelfLayout);
- ShelfViewTest::SetUp();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShelfViewLegacyShelfLayoutTest);
-};
-
-class ScopedTextDirectionChange {
- public:
- ScopedTextDirectionChange(bool is_rtl)
- : is_rtl_(is_rtl) {
- original_locale_ = l10n_util::GetApplicationLocale(std::string());
- if (is_rtl_)
- base::i18n::SetICUDefaultLocale("he");
- CheckTextDirectionIsCorrect();
- }
-
- ~ScopedTextDirectionChange() {
- if (is_rtl_)
- base::i18n::SetICUDefaultLocale(original_locale_);
- }
-
- private:
- void CheckTextDirectionIsCorrect() {
- ASSERT_EQ(is_rtl_, base::i18n::IsRTL());
- }
-
- bool is_rtl_;
- std::string original_locale_;
-};
-
-class ShelfViewTextDirectionTest
- : public ShelfViewTest,
- public testing::WithParamInterface<bool> {
- public:
- ShelfViewTextDirectionTest() : text_direction_change_(GetParam()) {}
- virtual ~ShelfViewTextDirectionTest() {}
-
- virtual void SetUp() OVERRIDE {
- ShelfViewTest::SetUp();
- }
-
- virtual void TearDown() OVERRIDE {
- ShelfViewTest::TearDown();
- }
-
- private:
- ScopedTextDirectionChange text_direction_change_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfViewTextDirectionTest);
-};
-
-// Checks that the ideal item icon bounds match the view's bounds in the screen
-// in both LTR and RTL.
-TEST_P(ShelfViewTextDirectionTest, IdealBoundsOfItemIcon) {
- LauncherID id = AddPlatformApp();
- internal::ShelfButton* button = GetButtonByID(id);
- gfx::Rect item_bounds = button->GetBoundsInScreen();
- gfx::Point icon_offset = button->GetIconBounds().origin();
- item_bounds.Offset(icon_offset.OffsetFromOrigin());
- gfx::Rect ideal_bounds = shelf_view_->GetIdealBoundsOfItemIcon(id);
- gfx::Point screen_origin;
- views::View::ConvertPointToScreen(shelf_view_, &screen_origin);
- ideal_bounds.Offset(screen_origin.x(), screen_origin.y());
- EXPECT_EQ(item_bounds.x(), ideal_bounds.x());
- EXPECT_EQ(item_bounds.y(), ideal_bounds.y());
-}
-
-// Checks that shelf view contents are considered in the correct drag group.
-TEST_F(ShelfViewTest, EnforceDragType) {
- EXPECT_TRUE(test_api_->SameDragType(TYPE_PLATFORM_APP, TYPE_PLATFORM_APP));
- EXPECT_FALSE(test_api_->SameDragType(TYPE_PLATFORM_APP, TYPE_APP_SHORTCUT));
- EXPECT_FALSE(test_api_->SameDragType(TYPE_PLATFORM_APP,
- TYPE_BROWSER_SHORTCUT));
- EXPECT_FALSE(test_api_->SameDragType(TYPE_PLATFORM_APP, TYPE_WINDOWED_APP));
- EXPECT_FALSE(test_api_->SameDragType(TYPE_PLATFORM_APP, TYPE_APP_LIST));
- EXPECT_FALSE(test_api_->SameDragType(TYPE_PLATFORM_APP, TYPE_APP_PANEL));
-
- EXPECT_TRUE(test_api_->SameDragType(TYPE_APP_SHORTCUT, TYPE_APP_SHORTCUT));
- EXPECT_TRUE(test_api_->SameDragType(TYPE_APP_SHORTCUT,
- TYPE_BROWSER_SHORTCUT));
- EXPECT_FALSE(test_api_->SameDragType(TYPE_APP_SHORTCUT,
- TYPE_WINDOWED_APP));
- EXPECT_FALSE(test_api_->SameDragType(TYPE_APP_SHORTCUT, TYPE_APP_LIST));
- EXPECT_FALSE(test_api_->SameDragType(TYPE_APP_SHORTCUT, TYPE_APP_PANEL));
-
- EXPECT_TRUE(test_api_->SameDragType(TYPE_BROWSER_SHORTCUT,
- TYPE_BROWSER_SHORTCUT));
- EXPECT_FALSE(test_api_->SameDragType(TYPE_BROWSER_SHORTCUT,
- TYPE_WINDOWED_APP));
- EXPECT_FALSE(test_api_->SameDragType(TYPE_BROWSER_SHORTCUT, TYPE_APP_LIST));
- EXPECT_FALSE(test_api_->SameDragType(TYPE_BROWSER_SHORTCUT, TYPE_APP_PANEL));
-
- EXPECT_TRUE(test_api_->SameDragType(TYPE_WINDOWED_APP, TYPE_WINDOWED_APP));
- EXPECT_FALSE(test_api_->SameDragType(TYPE_WINDOWED_APP, TYPE_APP_LIST));
- EXPECT_FALSE(test_api_->SameDragType(TYPE_WINDOWED_APP, TYPE_APP_PANEL));
-
- EXPECT_TRUE(test_api_->SameDragType(TYPE_APP_LIST, TYPE_APP_LIST));
- EXPECT_FALSE(test_api_->SameDragType(TYPE_APP_LIST, TYPE_APP_PANEL));
-
- EXPECT_TRUE(test_api_->SameDragType(TYPE_APP_PANEL, TYPE_APP_PANEL));
-}
-
-// Adds platform app button until overflow and verifies that the last added
-// platform app button is hidden.
-TEST_F(ShelfViewTest, AddBrowserUntilOverflow) {
- // All buttons should be visible.
- ASSERT_EQ(test_api_->GetLastVisibleIndex() + 1,
- test_api_->GetButtonCount());
-
- // Add platform app button until overflow.
- int items_added = 0;
- LauncherID last_added = AddPlatformApp();
- while (!test_api_->IsOverflowButtonVisible()) {
- // Added button is visible after animation while in this loop.
- EXPECT_TRUE(GetButtonByID(last_added)->visible());
-
- last_added = AddPlatformApp();
- ++items_added;
- ASSERT_LT(items_added, 10000);
- }
-
- // The last added button should be invisible.
- EXPECT_FALSE(GetButtonByID(last_added)->visible());
-}
-
-// Adds one platform app button then adds app shortcut until overflow. Verifies
-// that the browser button gets hidden on overflow and last added app shortcut
-// is still visible.
-TEST_F(ShelfViewTest, AddAppShortcutWithBrowserButtonUntilOverflow) {
- // All buttons should be visible.
- ASSERT_EQ(test_api_->GetLastVisibleIndex() + 1,
- test_api_->GetButtonCount());
-
- LauncherID browser_button_id = AddPlatformApp();
-
- // Add app shortcut until overflow.
- int items_added = 0;
- LauncherID last_added = AddAppShortcut();
- while (!test_api_->IsOverflowButtonVisible()) {
- // Added button is visible after animation while in this loop.
- EXPECT_TRUE(GetButtonByID(last_added)->visible());
-
- last_added = AddAppShortcut();
- ++items_added;
- ASSERT_LT(items_added, 10000);
- }
-
- // And the platform app button is invisible.
- EXPECT_FALSE(GetButtonByID(browser_button_id)->visible());
-}
-
-TEST_F(ShelfViewLegacyShelfLayoutTest,
- AddAppShortcutWithBrowserButtonUntilOverflow) {
- // All buttons should be visible.
- ASSERT_EQ(test_api_->GetLastVisibleIndex() + 1,
- test_api_->GetButtonCount());
-
- LauncherID browser_button_id = AddPlatformApp();
-
- // Add app shortcut until overflow.
- int items_added = 0;
- LauncherID last_added = AddAppShortcut();
- while (!test_api_->IsOverflowButtonVisible()) {
- // Added button is visible after animation while in this loop.
- EXPECT_TRUE(GetButtonByID(last_added)->visible());
-
- last_added = AddAppShortcut();
- ++items_added;
- ASSERT_LT(items_added, 10000);
- }
-
- // The last added app short button should be visible.
- EXPECT_TRUE(GetButtonByID(last_added)->visible());
- // And the platform app button is invisible.
- EXPECT_FALSE(GetButtonByID(browser_button_id)->visible());
-}
-
-TEST_F(ShelfViewTest, AddPanelHidesPlatformAppButton) {
- ASSERT_EQ(test_api_->GetLastVisibleIndex() + 1,
- test_api_->GetButtonCount());
-
- // Add platform app button until overflow, remember last visible platform app
- // button.
- int items_added = 0;
- LauncherID first_added = AddPlatformApp();
- EXPECT_TRUE(GetButtonByID(first_added)->visible());
- while (true) {
- LauncherID added = AddPlatformApp();
- if (test_api_->IsOverflowButtonVisible()) {
- EXPECT_FALSE(GetButtonByID(added)->visible());
- RemoveByID(added);
- break;
- }
- ++items_added;
- ASSERT_LT(items_added, 10000);
- }
-
- LauncherID panel = AddPanel();
- EXPECT_TRUE(test_api_->IsOverflowButtonVisible());
-
- RemoveByID(panel);
- EXPECT_FALSE(test_api_->IsOverflowButtonVisible());
-}
-
-TEST_F(ShelfViewLegacyShelfLayoutTest, AddPanelHidesPlatformAppButton) {
- ASSERT_EQ(test_api_->GetLastVisibleIndex() + 1,
- test_api_->GetButtonCount());
-
- // Add platform app button until overflow, remember last visible platform app
- // button.
- int items_added = 0;
- LauncherID first_added = AddPlatformApp();
- EXPECT_TRUE(GetButtonByID(first_added)->visible());
- LauncherID last_visible = first_added;
- while (true) {
- LauncherID added = AddPlatformApp();
- if (test_api_->IsOverflowButtonVisible()) {
- EXPECT_FALSE(GetButtonByID(added)->visible());
- break;
- }
- last_visible = added;
- ++items_added;
- ASSERT_LT(items_added, 10000);
- }
-
- LauncherID panel = AddPanel();
- EXPECT_TRUE(GetButtonByID(panel)->visible());
- EXPECT_FALSE(GetButtonByID(last_visible)->visible());
-
- RemoveByID(panel);
- EXPECT_TRUE(GetButtonByID(last_visible)->visible());
-}
-
-// When there are more panels then platform app buttons we should hide panels
-// rather than platform apps.
-TEST_F(ShelfViewTest, PlatformAppHidesExcessPanels) {
- ASSERT_EQ(test_api_->GetLastVisibleIndex() + 1,
- test_api_->GetButtonCount());
-
- // Add platform app button.
- LauncherID platform_app = AddPlatformApp();
- LauncherID first_panel = AddPanel();
-
- EXPECT_TRUE(GetButtonByID(platform_app)->visible());
- EXPECT_TRUE(GetButtonByID(first_panel)->visible());
-
- // Add panels until there is an overflow.
- LauncherID last_panel = first_panel;
- int items_added = 0;
- while (!test_api_->IsOverflowButtonVisible()) {
- last_panel = AddPanel();
- ++items_added;
- ASSERT_LT(items_added, 10000);
- }
-
- // The first panel should now be hidden by the new platform apps needing
- // space.
- EXPECT_FALSE(GetButtonByID(first_panel)->visible());
- EXPECT_TRUE(GetButtonByID(last_panel)->visible());
- EXPECT_TRUE(GetButtonByID(platform_app)->visible());
-
- // Adding platform apps should eventually begin to hide platform apps. We will
- // add platform apps until either the last panel or platform app is hidden.
- items_added = 0;
- while (GetButtonByID(platform_app)->visible() &&
- GetButtonByID(last_panel)->visible()) {
- platform_app = AddPlatformApp();
- ++items_added;
- ASSERT_LT(items_added, 10000);
- }
- EXPECT_TRUE(GetButtonByID(last_panel)->visible());
- EXPECT_FALSE(GetButtonByID(platform_app)->visible());
-}
-
-// Adds button until overflow then removes first added one. Verifies that
-// the last added one changes from invisible to visible and overflow
-// chevron is gone.
-TEST_F(ShelfViewTest, RemoveButtonRevealsOverflowed) {
- // All buttons should be visible.
- ASSERT_EQ(test_api_->GetLastVisibleIndex() + 1,
- test_api_->GetButtonCount());
-
- // Add platform app buttons until overflow.
- int items_added = 0;
- LauncherID first_added = AddPlatformApp();
- LauncherID last_added = first_added;
- while (!test_api_->IsOverflowButtonVisible()) {
- last_added = AddPlatformApp();
- ++items_added;
- ASSERT_LT(items_added, 10000);
- }
-
- // Expect add more than 1 button. First added is visible and last is not.
- EXPECT_NE(first_added, last_added);
- EXPECT_TRUE(GetButtonByID(first_added)->visible());
- EXPECT_FALSE(GetButtonByID(last_added)->visible());
-
- // Remove first added.
- RemoveByID(first_added);
-
- // Last added button becomes visible and overflow chevron is gone.
- EXPECT_TRUE(GetButtonByID(last_added)->visible());
- EXPECT_EQ(1.0f, GetButtonByID(last_added)->layer()->opacity());
- EXPECT_FALSE(test_api_->IsOverflowButtonVisible());
-}
-
-// Verifies that remove last overflowed button should hide overflow chevron.
-TEST_F(ShelfViewTest, RemoveLastOverflowed) {
- // All buttons should be visible.
- ASSERT_EQ(test_api_->GetLastVisibleIndex() + 1,
- test_api_->GetButtonCount());
-
- // Add platform app button until overflow.
- int items_added = 0;
- LauncherID last_added = AddPlatformApp();
- while (!test_api_->IsOverflowButtonVisible()) {
- last_added = AddPlatformApp();
- ++items_added;
- ASSERT_LT(items_added, 10000);
- }
-
- RemoveByID(last_added);
- EXPECT_FALSE(test_api_->IsOverflowButtonVisible());
-}
-
-// Adds platform app button without waiting for animation to finish and verifies
-// that all added buttons are visible.
-TEST_F(ShelfViewTest, AddButtonQuickly) {
- // All buttons should be visible.
- ASSERT_EQ(test_api_->GetLastVisibleIndex() + 1,
- test_api_->GetButtonCount());
-
- // Add a few platform buttons quickly without wait for animation.
- int added_count = 0;
- while (!test_api_->IsOverflowButtonVisible()) {
- AddPlatformAppNoWait();
- ++added_count;
- ASSERT_LT(added_count, 10000);
- }
-
- // ShelfView should be big enough to hold at least 3 new buttons.
- ASSERT_GE(added_count, 3);
-
- // Wait for the last animation to finish.
- test_api_->RunMessageLoopUntilAnimationsDone();
-
- // Verifies non-overflow buttons are visible.
- for (int i = 0; i <= test_api_->GetLastVisibleIndex(); ++i) {
- internal::ShelfButton* button = test_api_->GetButton(i);
- if (button) {
- EXPECT_TRUE(button->visible()) << "button index=" << i;
- EXPECT_EQ(1.0f, button->layer()->opacity()) << "button index=" << i;
- }
- }
-}
-
-// Check that model changes are handled correctly while a launcher icon is being
-// dragged.
-TEST_F(ShelfViewTest, ModelChangesWhileDragging) {
- internal::ShelfButtonHost* button_host = shelf_view_;
-
- std::vector<std::pair<LauncherID, views::View*> > id_map;
- SetupForDragTest(&id_map);
-
- // Dragging browser shortcut at index 1.
- EXPECT_TRUE(model_->items()[1].type == TYPE_BROWSER_SHORTCUT);
- views::View* dragged_button = SimulateDrag(
- internal::ShelfButtonHost::MOUSE, 1, 3);
- std::rotate(id_map.begin() + 1,
- id_map.begin() + 2,
- id_map.begin() + 4);
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
- button_host->PointerReleasedOnButton(dragged_button,
- internal::ShelfButtonHost::MOUSE,
- false);
- EXPECT_TRUE(model_->items()[3].type == TYPE_BROWSER_SHORTCUT);
-
- // Dragging changes model order.
- dragged_button = SimulateDrag(internal::ShelfButtonHost::MOUSE, 1, 3);
- std::rotate(id_map.begin() + 1,
- id_map.begin() + 2,
- id_map.begin() + 4);
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
-
- // Cancelling the drag operation restores previous order.
- button_host->PointerReleasedOnButton(dragged_button,
- internal::ShelfButtonHost::MOUSE,
- true);
- std::rotate(id_map.begin() + 1,
- id_map.begin() + 3,
- id_map.begin() + 4);
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
-
- // Deleting an item keeps the remaining intact.
- dragged_button = SimulateDrag(internal::ShelfButtonHost::MOUSE, 1, 3);
- model_->RemoveItemAt(1);
- id_map.erase(id_map.begin() + 1);
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
- button_host->PointerReleasedOnButton(dragged_button,
- internal::ShelfButtonHost::MOUSE,
- false);
-
- // Adding a launcher item cancels the drag and respects the order.
- dragged_button = SimulateDrag(internal::ShelfButtonHost::MOUSE, 1, 3);
- LauncherID new_id = AddAppShortcut();
- id_map.insert(id_map.begin() + 6,
- std::make_pair(new_id, GetButtonByID(new_id)));
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
- button_host->PointerReleasedOnButton(dragged_button,
- internal::ShelfButtonHost::MOUSE,
- false);
-
- // Adding a launcher item at the end (i.e. a panel) canels drag and respects
- // the order.
- dragged_button = SimulateDrag(internal::ShelfButtonHost::MOUSE, 1, 3);
- new_id = AddPanel();
- id_map.insert(id_map.begin() + 7,
- std::make_pair(new_id, GetButtonByID(new_id)));
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
- button_host->PointerReleasedOnButton(dragged_button,
- internal::ShelfButtonHost::MOUSE,
- false);
-}
-
-TEST_F(ShelfViewLegacyShelfLayoutTest, ModelChangesWhileDragging) {
- internal::ShelfButtonHost* button_host = shelf_view_;
-
- std::vector<std::pair<LauncherID, views::View*> > id_map;
- SetupForDragTest(&id_map);
-
- // Dragging browser shortcut at index 0.
- EXPECT_TRUE(model_->items()[0].type == TYPE_BROWSER_SHORTCUT);
- views::View* dragged_button = SimulateDrag(
- internal::ShelfButtonHost::MOUSE, 0, 2);
- std::rotate(id_map.begin(),
- id_map.begin() + 1,
- id_map.begin() + 3);
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
- button_host->PointerReleasedOnButton(dragged_button,
- internal::ShelfButtonHost::MOUSE,
- false);
- EXPECT_TRUE(model_->items()[2].type == TYPE_BROWSER_SHORTCUT);
-
- // Dragging changes model order.
- dragged_button = SimulateDrag(internal::ShelfButtonHost::MOUSE, 0, 2);
- std::rotate(id_map.begin(),
- id_map.begin() + 1,
- id_map.begin() + 3);
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
-
- // Cancelling the drag operation restores previous order.
- button_host->PointerReleasedOnButton(dragged_button,
- internal::ShelfButtonHost::MOUSE,
- true);
- std::rotate(id_map.begin(),
- id_map.begin() + 2,
- id_map.begin() + 3);
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
-
- // Deleting an item keeps the remaining intact.
- dragged_button = SimulateDrag(internal::ShelfButtonHost::MOUSE, 0, 2);
- model_->RemoveItemAt(1);
- id_map.erase(id_map.begin() + 1);
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
- button_host->PointerReleasedOnButton(dragged_button,
- internal::ShelfButtonHost::MOUSE,
- false);
-
- // Adding a launcher item cancels the drag and respects the order.
- dragged_button = SimulateDrag(internal::ShelfButtonHost::MOUSE, 0, 2);
- LauncherID new_id = AddAppShortcut();
- id_map.insert(id_map.begin() + 5,
- std::make_pair(new_id, GetButtonByID(new_id)));
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
- button_host->PointerReleasedOnButton(dragged_button,
- internal::ShelfButtonHost::MOUSE,
- false);
-
- // Adding a launcher item at the end (i.e. a panel) canels drag and respects
- // the order.
- dragged_button = SimulateDrag(internal::ShelfButtonHost::MOUSE, 0, 2);
- new_id = AddPanel();
- id_map.insert(id_map.begin() + 7,
- std::make_pair(new_id, GetButtonByID(new_id)));
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
- button_host->PointerReleasedOnButton(dragged_button,
- internal::ShelfButtonHost::MOUSE,
- false);
-}
-
-// Check that 2nd drag from the other pointer would be ignored.
-TEST_F(ShelfViewTest, SimultaneousDrag) {
- internal::ShelfButtonHost* button_host = shelf_view_;
-
- std::vector<std::pair<LauncherID, views::View*> > id_map;
- SetupForDragTest(&id_map);
-
- // Start a mouse drag.
- views::View* dragged_button_mouse = SimulateDrag(
- internal::ShelfButtonHost::MOUSE, 1, 3);
- std::rotate(id_map.begin() + 1,
- id_map.begin() + 2,
- id_map.begin() + 4);
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
- // Attempt a touch drag before the mouse drag finishes.
- views::View* dragged_button_touch = SimulateDrag(
- internal::ShelfButtonHost::TOUCH, 4, 2);
-
- // Nothing changes since 2nd drag is ignored.
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
-
- // Finish the mouse drag.
- button_host->PointerReleasedOnButton(dragged_button_mouse,
- internal::ShelfButtonHost::MOUSE,
- false);
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
-
- // Now start a touch drag.
- dragged_button_touch = SimulateDrag(internal::ShelfButtonHost::TOUCH, 4, 2);
- std::rotate(id_map.begin() + 3,
- id_map.begin() + 4,
- id_map.begin() + 5);
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
-
- // And attempt a mouse drag before the touch drag finishes.
- dragged_button_mouse = SimulateDrag(internal::ShelfButtonHost::MOUSE, 1, 2);
-
- // Nothing changes since 2nd drag is ignored.
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
-
- button_host->PointerReleasedOnButton(dragged_button_touch,
- internal::ShelfButtonHost::TOUCH,
- false);
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
-}
-
-// Check that clicking first on one item and then dragging another works as
-// expected.
-TEST_F(ShelfViewTest, ClickOneDragAnother) {
- internal::ShelfButtonHost* button_host = shelf_view_;
-
- std::vector<std::pair<LauncherID, views::View*> > id_map;
- SetupForDragTest(&id_map);
-
- // A click on item 1 is simulated.
- SimulateClick(internal::ShelfButtonHost::MOUSE, 1);
-
- // Dragging browser index at 0 should change the model order correctly.
- EXPECT_TRUE(model_->items()[1].type == TYPE_BROWSER_SHORTCUT);
- views::View* dragged_button = SimulateDrag(
- internal::ShelfButtonHost::MOUSE, 1, 3);
- std::rotate(id_map.begin() + 1,
- id_map.begin() + 2,
- id_map.begin() + 4);
- ASSERT_NO_FATAL_FAILURE(CheckModelIDs(id_map));
- button_host->PointerReleasedOnButton(dragged_button,
- internal::ShelfButtonHost::MOUSE,
- false);
- EXPECT_TRUE(model_->items()[3].type == TYPE_BROWSER_SHORTCUT);
-}
-
-// Confirm that item status changes are reflected in the buttons.
-TEST_F(ShelfViewTest, LauncherItemStatus) {
- ASSERT_EQ(test_api_->GetLastVisibleIndex() + 1,
- test_api_->GetButtonCount());
-
- // Add platform app button.
- LauncherID last_added = AddPlatformApp();
- LauncherItem item = GetItemByID(last_added);
- int index = model_->ItemIndexByID(last_added);
- internal::ShelfButton* button = GetButtonByID(last_added);
- ASSERT_EQ(internal::ShelfButton::STATE_RUNNING, button->state());
- item.status = STATUS_ACTIVE;
- model_->Set(index, item);
- ASSERT_EQ(internal::ShelfButton::STATE_ACTIVE, button->state());
- item.status = STATUS_ATTENTION;
- model_->Set(index, item);
- ASSERT_EQ(internal::ShelfButton::STATE_ATTENTION, button->state());
-}
-
-TEST_F(ShelfViewLegacyShelfLayoutTest,
- LauncherItemPositionReflectedOnStateChanged) {
- ASSERT_EQ(test_api_->GetLastVisibleIndex() + 1,
- test_api_->GetButtonCount());
-
- // Add 2 items to the launcher.
- LauncherID item1_id = AddPlatformApp();
- LauncherID item2_id = AddPlatformAppNoWait();
- internal::ShelfButton* item1_button = GetButtonByID(item1_id);
- internal::ShelfButton* item2_button = GetButtonByID(item2_id);
-
- internal::ShelfButton::State state_mask =
- static_cast<internal::ShelfButton::State>(
- internal::ShelfButton::STATE_NORMAL |
- internal::ShelfButton::STATE_HOVERED |
- internal::ShelfButton::STATE_RUNNING |
- internal::ShelfButton::STATE_ACTIVE |
- internal::ShelfButton::STATE_ATTENTION |
- internal::ShelfButton::STATE_FOCUSED);
-
- // Clear the button states.
- item1_button->ClearState(state_mask);
- item2_button->ClearState(state_mask);
-
- // Since default alignment in tests is bottom, state is reflected in y-axis.
- ASSERT_EQ(item1_button->GetIconBounds().y(),
- item2_button->GetIconBounds().y());
- item1_button->AddState(internal::ShelfButton::STATE_HOVERED);
- ASSERT_NE(item1_button->GetIconBounds().y(),
- item2_button->GetIconBounds().y());
- item1_button->ClearState(internal::ShelfButton::STATE_HOVERED);
-}
-
-// Confirm that item status changes are reflected in the buttons
-// for platform apps.
-TEST_F(ShelfViewTest, LauncherItemStatusPlatformApp) {
- ASSERT_EQ(test_api_->GetLastVisibleIndex() + 1,
- test_api_->GetButtonCount());
-
- // Add platform app button.
- LauncherID last_added = AddPlatformApp();
- LauncherItem item = GetItemByID(last_added);
- int index = model_->ItemIndexByID(last_added);
- internal::ShelfButton* button = GetButtonByID(last_added);
- ASSERT_EQ(internal::ShelfButton::STATE_RUNNING, button->state());
- item.status = STATUS_ACTIVE;
- model_->Set(index, item);
- ASSERT_EQ(internal::ShelfButton::STATE_ACTIVE, button->state());
- item.status = STATUS_ATTENTION;
- model_->Set(index, item);
- ASSERT_EQ(internal::ShelfButton::STATE_ATTENTION, button->state());
-}
-
-// Confirm that launcher item bounds are correctly updated on shelf changes.
-TEST_F(ShelfViewTest, LauncherItemBoundsCheck) {
- VerifyLauncherItemBoundsAreValid();
- shelf_view_->shelf_layout_manager()->SetAutoHideBehavior(
- SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- test_api_->RunMessageLoopUntilAnimationsDone();
- VerifyLauncherItemBoundsAreValid();
- shelf_view_->shelf_layout_manager()->SetAutoHideBehavior(
- SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
- test_api_->RunMessageLoopUntilAnimationsDone();
- VerifyLauncherItemBoundsAreValid();
-}
-
-TEST_F(ShelfViewTest, ShelfTooltipTest) {
- ASSERT_EQ(test_api_->GetLastVisibleIndex() + 1,
- test_api_->GetButtonCount());
-
- // Prepare some items to the launcher.
- LauncherID app_button_id = AddAppShortcut();
- LauncherID platform_button_id = AddPlatformApp();
-
- internal::ShelfButton* app_button = GetButtonByID(app_button_id);
- internal::ShelfButton* platform_button = GetButtonByID(platform_button_id);
-
- internal::ShelfButtonHost* button_host = shelf_view_;
- internal::ShelfTooltipManager* tooltip_manager =
- shelf_view_->tooltip_manager();
-
- button_host->MouseEnteredButton(app_button);
- // There's a delay to show the tooltip, so it's not visible yet.
- EXPECT_FALSE(tooltip_manager->IsVisible());
- EXPECT_EQ(app_button, GetTooltipAnchorView());
-
- ShowTooltip();
- EXPECT_TRUE(tooltip_manager->IsVisible());
-
- // Once it's visible, it keeps visibility and is pointing to the same
- // item.
- button_host->MouseExitedButton(app_button);
- EXPECT_TRUE(tooltip_manager->IsVisible());
- EXPECT_EQ(app_button, GetTooltipAnchorView());
-
- // When entered to another item, it switches to the new item. There is no
- // delay for the visibility.
- button_host->MouseEnteredButton(platform_button);
- EXPECT_TRUE(tooltip_manager->IsVisible());
- EXPECT_EQ(platform_button, GetTooltipAnchorView());
-
- button_host->MouseExitedButton(platform_button);
- tooltip_manager->Close();
-
- // Next time: enter app_button -> move immediately to tab_button.
- button_host->MouseEnteredButton(app_button);
- button_host->MouseExitedButton(app_button);
- button_host->MouseEnteredButton(platform_button);
- EXPECT_FALSE(tooltip_manager->IsVisible());
- EXPECT_EQ(platform_button, GetTooltipAnchorView());
-}
-
-// Verify a fix for crash caused by a tooltip update for a deleted launcher
-// button, see crbug.com/288838.
-TEST_F(ShelfViewTest, RemovingItemClosesTooltip) {
- internal::ShelfButtonHost* button_host = shelf_view_;
- internal::ShelfTooltipManager* tooltip_manager =
- shelf_view_->tooltip_manager();
-
- // Add an item to the launcher.
- LauncherID app_button_id = AddAppShortcut();
- internal::ShelfButton* app_button = GetButtonByID(app_button_id);
-
- // Spawn a tooltip on that item.
- button_host->MouseEnteredButton(app_button);
- ShowTooltip();
- EXPECT_TRUE(tooltip_manager->IsVisible());
-
- // Remove the app shortcut while the tooltip is open. The tooltip should be
- // closed.
- RemoveByID(app_button_id);
- EXPECT_FALSE(tooltip_manager->IsVisible());
-
- // Change the shelf layout. This should not crash.
- Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_LEFT,
- Shell::GetPrimaryRootWindow());
-}
-
-// Changing the shelf alignment closes any open tooltip.
-TEST_F(ShelfViewTest, ShelfAlignmentClosesTooltip) {
- internal::ShelfButtonHost* button_host = shelf_view_;
- internal::ShelfTooltipManager* tooltip_manager =
- shelf_view_->tooltip_manager();
-
- // Add an item to the launcher.
- LauncherID app_button_id = AddAppShortcut();
- internal::ShelfButton* app_button = GetButtonByID(app_button_id);
-
- // Spawn a tooltip on the item.
- button_host->MouseEnteredButton(app_button);
- ShowTooltip();
- EXPECT_TRUE(tooltip_manager->IsVisible());
-
- // Changing shelf alignment hides the tooltip.
- Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_LEFT,
- Shell::GetPrimaryRootWindow());
- EXPECT_FALSE(tooltip_manager->IsVisible());
-}
-
-TEST_F(ShelfViewTest, ShouldHideTooltipTest) {
- LauncherID app_button_id = AddAppShortcut();
- LauncherID platform_button_id = AddPlatformApp();
-
- // The tooltip shouldn't hide if the mouse is on normal buttons.
- for (int i = 0; i < test_api_->GetButtonCount(); i++) {
- internal::ShelfButton* button = test_api_->GetButton(i);
- if (!button)
- continue;
-
- EXPECT_FALSE(shelf_view_->ShouldHideTooltip(
- button->GetMirroredBounds().CenterPoint()))
- << "ShelfView tries to hide on button " << i;
- }
-
- // The tooltip should not hide on the app-list button.
- views::View* app_list_button = shelf_view_->GetAppListButtonView();
- EXPECT_FALSE(shelf_view_->ShouldHideTooltip(
- app_list_button->GetMirroredBounds().CenterPoint()));
-
- // The tooltip shouldn't hide if the mouse is in the gap between two buttons.
- gfx::Rect app_button_rect = GetButtonByID(app_button_id)->GetMirroredBounds();
- gfx::Rect platform_button_rect =
- GetButtonByID(platform_button_id)->GetMirroredBounds();
- ASSERT_FALSE(app_button_rect.Intersects(platform_button_rect));
- EXPECT_FALSE(shelf_view_->ShouldHideTooltip(
- gfx::UnionRects(app_button_rect, platform_button_rect).CenterPoint()));
-
- // The tooltip should hide if it's outside of all buttons.
- gfx::Rect all_area;
- for (int i = 0; i < test_api_->GetButtonCount(); i++) {
- internal::ShelfButton* button = test_api_->GetButton(i);
- if (!button)
- continue;
-
- all_area.Union(button->GetMirroredBounds());
- }
- all_area.Union(shelf_view_->GetAppListButtonView()->GetMirroredBounds());
- EXPECT_FALSE(shelf_view_->ShouldHideTooltip(all_area.origin()));
- EXPECT_FALSE(shelf_view_->ShouldHideTooltip(
- gfx::Point(all_area.right() - 1, all_area.bottom() - 1)));
- EXPECT_TRUE(shelf_view_->ShouldHideTooltip(
- gfx::Point(all_area.right(), all_area.y())));
- EXPECT_TRUE(shelf_view_->ShouldHideTooltip(
- gfx::Point(all_area.x() - 1, all_area.y())));
- EXPECT_TRUE(shelf_view_->ShouldHideTooltip(
- gfx::Point(all_area.x(), all_area.y() - 1)));
- EXPECT_TRUE(shelf_view_->ShouldHideTooltip(
- gfx::Point(all_area.x(), all_area.bottom())));
-}
-
-TEST_F(ShelfViewTest, ShouldHideTooltipWithAppListWindowTest) {
- Shell::GetInstance()->ToggleAppList(NULL);
- ASSERT_TRUE(Shell::GetInstance()->GetAppListWindow());
-
- // The tooltip shouldn't hide if the mouse is on normal buttons.
- for (int i = 1; i < test_api_->GetButtonCount(); i++) {
- internal::ShelfButton* button = test_api_->GetButton(i);
- if (!button)
- continue;
-
- EXPECT_FALSE(shelf_view_->ShouldHideTooltip(
- button->GetMirroredBounds().CenterPoint()))
- << "ShelfView tries to hide on button " << i;
- }
-
- // The tooltip should hide on the app-list button.
- views::View* app_list_button = shelf_view_->GetAppListButtonView();
- EXPECT_TRUE(shelf_view_->ShouldHideTooltip(
- app_list_button->GetMirroredBounds().CenterPoint()));
-}
-
-// Test that by moving the mouse cursor off the button onto the bubble it closes
-// the bubble.
-TEST_F(ShelfViewTest, ShouldHideTooltipWhenHoveringOnTooltip) {
- internal::ShelfTooltipManager* tooltip_manager =
- shelf_view_->tooltip_manager();
- tooltip_manager->CreateZeroDelayTimerForTest();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
-
- // Move the mouse off any item and check that no tooltip is shown.
- generator.MoveMouseTo(gfx::Point(0, 0));
- EXPECT_FALSE(tooltip_manager->IsVisible());
-
- // Move the mouse over the button and check that it is visible.
- views::View* app_list_button = shelf_view_->GetAppListButtonView();
- gfx::Rect bounds = app_list_button->GetBoundsInScreen();
- generator.MoveMouseTo(bounds.CenterPoint());
- // Wait for the timer to go off.
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(tooltip_manager->IsVisible());
-
- // Move the mouse cursor slightly to the right of the item. The tooltip should
- // stay open.
- generator.MoveMouseBy(bounds.width() / 2 + 5, 0);
- // Make sure there is no delayed close.
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(tooltip_manager->IsVisible());
-
- // Move back - it should still stay open.
- generator.MoveMouseBy(-(bounds.width() / 2 + 5), 0);
- // Make sure there is no delayed close.
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(tooltip_manager->IsVisible());
-
- // Now move the mouse cursor slightly above the item - so that it is over the
- // tooltip bubble. Now it should disappear.
- generator.MoveMouseBy(0, -(bounds.height() / 2 + 5));
- // Wait until the delayed close kicked in.
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(tooltip_manager->IsVisible());
-}
-
-// Resizing shelf view while an add animation without fade-in is running,
-// which happens when overflow happens. App list button should end up in its
-// new ideal bounds.
-TEST_F(ShelfViewTest, ResizeDuringOverflowAddAnimation) {
- // All buttons should be visible.
- ASSERT_EQ(test_api_->GetLastVisibleIndex() + 1,
- test_api_->GetButtonCount());
-
- // Add buttons until overflow. Let the non-overflow add animations finish but
- // leave the last running.
- int items_added = 0;
- AddPlatformAppNoWait();
- while (!test_api_->IsOverflowButtonVisible()) {
- test_api_->RunMessageLoopUntilAnimationsDone();
- AddPlatformAppNoWait();
- ++items_added;
- ASSERT_LT(items_added, 10000);
- }
-
- // Resize shelf view with that animation running and stay overflown.
- gfx::Rect bounds = shelf_view_->bounds();
- bounds.set_width(bounds.width() - kLauncherPreferredSize);
- shelf_view_->SetBoundsRect(bounds);
- ASSERT_TRUE(test_api_->IsOverflowButtonVisible());
-
- // Finish the animation.
- test_api_->RunMessageLoopUntilAnimationsDone();
-
- // App list button should ends up in its new ideal bounds.
- const int app_list_button_index = test_api_->GetButtonCount() - 1;
- const gfx::Rect& app_list_ideal_bounds =
- test_api_->GetIdealBoundsByIndex(app_list_button_index);
- const gfx::Rect& app_list_bounds =
- test_api_->GetBoundsByIndex(app_list_button_index);
- EXPECT_EQ(app_list_bounds, app_list_ideal_bounds);
-}
-
-// Checks the overflow bubble size when an item is ripped off and re-inserted.
-TEST_F(ShelfViewTest, OverflowBubbleSize) {
- // Replace ShelfDelegate.
- test::ShellTestApi test_api(Shell::GetInstance());
- test_api.SetShelfDelegate(NULL);
- ShelfDelegate *delegate = new TestShelfDelegateForShelfView(model_);
- test_api.SetShelfDelegate(delegate);
- test::LauncherTestAPI(
- Launcher::ForPrimaryDisplay()).SetShelfDelegate(delegate);
- test_api_->SetShelfDelegate(delegate);
-
- AddButtonsUntilOverflow();
-
- // Show overflow bubble.
- test_api_->ShowOverflowBubble();
- ASSERT_TRUE(test_api_->overflow_bubble() &&
- test_api_->overflow_bubble()->IsShowing());
-
- ShelfViewTestAPI test_for_overflow_view(
- test_api_->overflow_bubble()->shelf_view());
-
- int ripped_index = test_for_overflow_view.GetLastVisibleIndex();
- gfx::Size bubble_size = test_for_overflow_view.GetPreferredSize();
- int item_width = test_for_overflow_view.GetButtonSize() +
- test_for_overflow_view.GetButtonSpacing();
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point());
- internal::ShelfButton* button =
- test_for_overflow_view.GetButton(ripped_index);
- // Rip off the last visible item.
- gfx::Point start_point = button->GetBoundsInScreen().CenterPoint();
- gfx::Point rip_off_point(start_point.x(), 0);
- generator.MoveMouseTo(start_point.x(), start_point.y());
- base::MessageLoop::current()->RunUntilIdle();
- generator.PressLeftButton();
- base::MessageLoop::current()->RunUntilIdle();
- generator.MoveMouseTo(rip_off_point.x(), rip_off_point.y());
- base::MessageLoop::current()->RunUntilIdle();
- test_for_overflow_view.RunMessageLoopUntilAnimationsDone();
-
- // Check the overflow bubble size when an item is ripped off.
- EXPECT_EQ(bubble_size.width() - item_width,
- test_for_overflow_view.GetPreferredSize().width());
- ASSERT_TRUE(test_api_->overflow_bubble() &&
- test_api_->overflow_bubble()->IsShowing());
-
- // Re-insert an item into the overflow bubble.
- int first_index = test_for_overflow_view.GetFirstVisibleIndex();
- button = test_for_overflow_view.GetButton(first_index);
-
- // Check the bubble size after an item is re-inserted.
- generator.MoveMouseTo(button->GetBoundsInScreen().CenterPoint());
- test_for_overflow_view.RunMessageLoopUntilAnimationsDone();
- EXPECT_EQ(bubble_size.width(),
- test_for_overflow_view.GetPreferredSize().width());
-
- generator.ReleaseLeftButton();
- test_for_overflow_view.RunMessageLoopUntilAnimationsDone();
- EXPECT_EQ(bubble_size.width(),
- test_for_overflow_view.GetPreferredSize().width());
-}
-
-// Check that the first item in the list follows Fitt's law by including the
-// first pixel and being therefore bigger then the others.
-TEST_F(ShelfViewLegacyShelfLayoutTest, CheckFittsLaw) {
- // All buttons should be visible.
- ASSERT_EQ(test_api_->GetLastVisibleIndex() + 1,
- test_api_->GetButtonCount());
- gfx::Rect ideal_bounds_0 = test_api_->GetIdealBoundsByIndex(0);
- gfx::Rect ideal_bounds_1 = test_api_->GetIdealBoundsByIndex(1);
- EXPECT_GT(ideal_bounds_0.width(), ideal_bounds_1.width());
-}
-
-// Check the drag insertion bounds of scrolled overflow bubble.
-TEST_F(ShelfViewTest, CheckDragInsertBoundsOfScrolledOverflowBubble) {
- UpdateDisplay("400x300");
-
- EXPECT_EQ(2, model_->item_count());
-
- AddButtonsUntilOverflow();
-
- // Show overflow bubble.
- test_api_->ShowOverflowBubble();
- ASSERT_TRUE(test_api_->overflow_bubble() &&
- test_api_->overflow_bubble()->IsShowing());
-
- int item_width = test_api_->GetButtonSize() +
- test_api_->GetButtonSpacing();
- internal::OverflowBubbleView* bubble_view =
- test_api_->overflow_bubble()->bubble_view();
- test::OverflowBubbleViewTestAPI bubble_view_api(bubble_view);
-
- // Add more buttons until OverflowBubble is scrollable and it has 3 invisible
- // items.
- while (bubble_view_api.GetContentsSize().width() <
- (bubble_view->GetContentsBounds().width() + 3 * item_width))
- AddAppShortcut();
-
- ASSERT_TRUE(test_api_->overflow_bubble() &&
- test_api_->overflow_bubble()->IsShowing());
-
- ShelfViewTestAPI test_for_overflow_view(
- test_api_->overflow_bubble()->shelf_view());
- int first_index = test_for_overflow_view.GetFirstVisibleIndex();
- int last_index = test_for_overflow_view.GetLastVisibleIndex();
-
- internal::ShelfButton* first_button =
- test_for_overflow_view.GetButton(first_index);
- internal::ShelfButton* last_button =
- test_for_overflow_view.GetButton(last_index);
- gfx::Point first_point = first_button->GetBoundsInScreen().CenterPoint();
- gfx::Point last_point = last_button->GetBoundsInScreen().CenterPoint();
- gfx::Rect drag_reinsert_bounds =
- test_for_overflow_view.GetBoundsForDragInsertInScreen();
- EXPECT_TRUE(drag_reinsert_bounds.Contains(first_point));
- EXPECT_FALSE(drag_reinsert_bounds.Contains(last_point));
-
- // Scrolls sufficiently to show last item.
- bubble_view_api.ScrollByXOffset(3 * item_width);
- drag_reinsert_bounds =
- test_for_overflow_view.GetBoundsForDragInsertInScreen();
- first_point = first_button->GetBoundsInScreen().CenterPoint();
- last_point = last_button->GetBoundsInScreen().CenterPoint();
- EXPECT_FALSE(drag_reinsert_bounds.Contains(first_point));
- EXPECT_TRUE(drag_reinsert_bounds.Contains(last_point));
-}
-
-// Check the drag insertion bounds of shelf view in multi monitor environment.
-TEST_F(ShelfViewTest, CheckDragInsertBoundsWithMultiMonitor) {
- // win8-aura doesn't support multiple display.
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("800x600,800x600");
- Launcher* secondary_launcher =
- Launcher::ForWindow(Shell::GetAllRootWindows()[1]);
- internal::ShelfView* shelf_view_for_secondary =
- test::LauncherTestAPI(secondary_launcher).shelf_view();
-
- // The bounds should be big enough for 4 buttons + overflow chevron.
- shelf_view_for_secondary->SetBounds(0, 0, 500,
- internal::ShelfLayoutManager::GetPreferredShelfSize());
-
- ShelfViewTestAPI test_api_for_secondary(shelf_view_for_secondary);
- // Speeds up animation for test.
- test_api_for_secondary.SetAnimationDuration(1);
-
- AddButtonsUntilOverflow();
-
- // Test #1: Test drag insertion bounds of primary shelf.
- // Show overflow bubble.
- test_api_->ShowOverflowBubble();
- ASSERT_TRUE(test_api_->overflow_bubble() &&
- test_api_->overflow_bubble()->IsShowing());
-
- ShelfViewTestAPI test_api_for_overflow_view(
- test_api_->overflow_bubble()->shelf_view());
-
- internal::ShelfButton* button = test_api_for_overflow_view.GetButton(
- test_api_for_overflow_view.GetLastVisibleIndex());
-
- // Checks that a point in shelf is contained in drag insert bounds.
- gfx::Point point_in_shelf_view = button->GetBoundsInScreen().CenterPoint();
- gfx::Rect drag_reinsert_bounds =
- test_api_for_overflow_view.GetBoundsForDragInsertInScreen();
- EXPECT_TRUE(drag_reinsert_bounds.Contains(point_in_shelf_view));
- // Checks that a point out of shelf is not contained in drag insert bounds.
- EXPECT_FALSE(drag_reinsert_bounds.Contains(
- gfx::Point(point_in_shelf_view.x(), 0)));
-
- // Test #2: Test drag insertion bounds of secondary shelf.
- // Show overflow bubble.
- test_api_for_secondary.ShowOverflowBubble();
- ASSERT_TRUE(test_api_for_secondary.overflow_bubble() &&
- test_api_for_secondary.overflow_bubble()->IsShowing());
-
- ShelfViewTestAPI test_api_for_overflow_view_of_secondary(
- test_api_for_secondary.overflow_bubble()->shelf_view());
-
- internal::ShelfButton* button_in_secondary =
- test_api_for_overflow_view_of_secondary.GetButton(
- test_api_for_overflow_view_of_secondary.GetLastVisibleIndex());
-
- // Checks that a point in shelf is contained in drag insert bounds.
- gfx::Point point_in_secondary_shelf_view =
- button_in_secondary->GetBoundsInScreen().CenterPoint();
- gfx::Rect drag_reinsert_bounds_in_secondary =
- test_api_for_overflow_view_of_secondary.GetBoundsForDragInsertInScreen();
- EXPECT_TRUE(drag_reinsert_bounds_in_secondary.Contains(
- point_in_secondary_shelf_view));
- // Checks that a point out of shelf is not contained in drag insert bounds.
- EXPECT_FALSE(drag_reinsert_bounds_in_secondary.Contains(
- gfx::Point(point_in_secondary_shelf_view.x(), 0)));
- // Checks that a point of overflow bubble in primary shelf should not be
- // contained by insert bounds of secondary shelf.
- EXPECT_FALSE(drag_reinsert_bounds_in_secondary.Contains(point_in_shelf_view));
-}
-
-// Checks the rip an item off from left aligned shelf in secondary monitor.
-TEST_F(ShelfViewTest, CheckRipOffFromLeftShelfAlignmentWithMultiMonitor) {
- // win8-aura doesn't support multiple display.
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("800x600,800x600");
- ASSERT_EQ(2U, Shell::GetAllRootWindows().size());
-
- aura::Window* second_root = Shell::GetAllRootWindows()[1];
-
- Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_LEFT, second_root);
- ASSERT_EQ(SHELF_ALIGNMENT_LEFT,
- Shell::GetInstance()->GetShelfAlignment(second_root));
-
- // Initially, app list and browser shortcut are added.
- EXPECT_EQ(2, model_->item_count());
- int browser_index = model_->GetItemIndexForType(TYPE_BROWSER_SHORTCUT);
- EXPECT_GT(browser_index, 0);
-
- Launcher* secondary_launcher = Launcher::ForWindow(second_root);
- internal::ShelfView* shelf_view_for_secondary =
- test::LauncherTestAPI(secondary_launcher).shelf_view();
-
- ShelfViewTestAPI test_api_for_secondary_shelf_view(shelf_view_for_secondary);
- internal::ShelfButton* button =
- test_api_for_secondary_shelf_view.GetButton(browser_index);
-
- // Fetch the start point of dragging.
- gfx::Point start_point = button->GetBoundsInScreen().CenterPoint();
- wm::ConvertPointFromScreen(second_root, &start_point);
-
- aura::test::EventGenerator generator(second_root, start_point);
-
- // Rip off the browser item.
- generator.PressLeftButton();
- generator.MoveMouseTo(start_point.x() + 400, start_point.y());
- test_api_for_secondary_shelf_view.RunMessageLoopUntilAnimationsDone();
- EXPECT_TRUE(test_api_for_secondary_shelf_view.IsRippedOffFromShelf());
-}
-
-// Checks various drag and drop operations from OverflowBubble to Shelf.
-TEST_F(ShelfViewTest, CheckDragAndDropFromOverflowBubbleToShelf) {
- // Replace LauncherDelegate.
- test::ShellTestApi test_api(Shell::GetInstance());
- test_api.SetShelfDelegate(NULL);
- ShelfDelegate *delegate = new TestShelfDelegateForShelfView(model_);
- test_api.SetShelfDelegate(delegate);
- test::LauncherTestAPI(
- Launcher::ForPrimaryDisplay()).SetShelfDelegate(delegate);
- test_api_->SetShelfDelegate(delegate);
-
- AddButtonsUntilOverflow();
-
- TestDraggingAnItemFromOverflowToShelf(false);
- TestDraggingAnItemFromOverflowToShelf(true);
-}
-
-class ShelfViewVisibleBoundsTest : public ShelfViewTest,
- public testing::WithParamInterface<bool> {
- public:
- ShelfViewVisibleBoundsTest() : text_direction_change_(GetParam()) {}
-
- void CheckAllItemsAreInBounds() {
- gfx::Rect visible_bounds = shelf_view_->GetVisibleItemsBoundsInScreen();
- gfx::Rect launcher_bounds = shelf_view_->GetBoundsInScreen();
- EXPECT_TRUE(launcher_bounds.Contains(visible_bounds));
- for (int i = 0; i < test_api_->GetButtonCount(); ++i)
- if (internal::ShelfButton* button = test_api_->GetButton(i))
- EXPECT_TRUE(visible_bounds.Contains(button->GetBoundsInScreen()));
- CheckAppListButtonIsInBounds();
- }
-
- void CheckAppListButtonIsInBounds() {
- gfx::Rect visible_bounds = shelf_view_->GetVisibleItemsBoundsInScreen();
- gfx::Rect app_list_button_bounds = shelf_view_->GetAppListButtonView()->
- GetBoundsInScreen();
- EXPECT_TRUE(visible_bounds.Contains(app_list_button_bounds));
- }
-
- private:
- ScopedTextDirectionChange text_direction_change_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfViewVisibleBoundsTest);
-};
-
-TEST_P(ShelfViewVisibleBoundsTest, ItemsAreInBounds) {
- // Adding elements leaving some empty space.
- for (int i = 0; i < 3; i++) {
- AddAppShortcut();
- }
- test_api_->RunMessageLoopUntilAnimationsDone();
- EXPECT_FALSE(test_api_->IsOverflowButtonVisible());
- CheckAllItemsAreInBounds();
- // Same for overflow case.
- while (!test_api_->IsOverflowButtonVisible()) {
- AddAppShortcut();
- }
- test_api_->RunMessageLoopUntilAnimationsDone();
- CheckAllItemsAreInBounds();
-}
-
-INSTANTIATE_TEST_CASE_P(LtrRtl, ShelfViewTextDirectionTest, testing::Bool());
-INSTANTIATE_TEST_CASE_P(VisibleBounds, ShelfViewVisibleBoundsTest,
- testing::Bool());
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_widget.cc b/chromium/ash/shelf/shelf_widget.cc
deleted file mode 100644
index 960e70c1376..00000000000
--- a/chromium/ash/shelf/shelf_widget.cc
+++ /dev/null
@@ -1,721 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_widget.h"
-
-#include "ash/ash_switches.h"
-#include "ash/focus_cycler.h"
-#include "ash/root_window_controller.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shelf/shelf_delegate.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_model.h"
-#include "ash/shelf/shelf_navigator.h"
-#include "ash/shelf/shelf_view.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/wm/status_area_layout_manager.h"
-#include "ash/wm/window_properties.h"
-#include "ash/wm/workspace_controller.h"
-#include "grit/ash_resources.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_observer.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/events/event_constants.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/image/image.h"
-#include "ui/gfx/image/image_skia_operations.h"
-#include "ui/gfx/skbitmap_operations.h"
-#include "ui/views/accessible_pane_view.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace {
-// Size of black border at bottom (or side) of launcher.
-const int kNumBlackPixels = 3;
-// Alpha to paint dimming image with.
-const int kDimAlpha = 128;
-
-// The time to dim and un-dim.
-const int kTimeToDimMs = 3000; // Slow in dimming.
-const int kTimeToUnDimMs = 200; // Fast in activating.
-
-// Class used to slightly dim shelf items when maximized and visible.
-class DimmerView : public views::View,
- public views::WidgetDelegate,
- ash::internal::BackgroundAnimatorDelegate {
- public:
- // If |disable_dimming_animations_for_test| is set, all alpha animations will
- // be performed instantly.
- DimmerView(ash::ShelfWidget* shelf_widget,
- bool disable_dimming_animations_for_test);
- virtual ~DimmerView();
-
- // Called by |DimmerEventFilter| when the mouse |hovered| state changes.
- void SetHovered(bool hovered);
-
- // Force the dimmer to be undimmed.
- void ForceUndimming(bool force);
-
- // views::WidgetDelegate overrides:
- virtual views::Widget* GetWidget() OVERRIDE {
- return View::GetWidget();
- }
- virtual const views::Widget* GetWidget() const OVERRIDE {
- return View::GetWidget();
- }
-
- // ash::internal::BackgroundAnimatorDelegate overrides:
- virtual void UpdateBackground(int alpha) OVERRIDE {
- alpha_ = alpha;
- SchedulePaint();
- }
-
- // views::View overrides:
- virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE;
-
- // A function to test the current alpha used.
- int get_dimming_alpha_for_test() { return alpha_; }
-
- private:
- // This class monitors mouse events to see if it is on top of the launcher.
- class DimmerEventFilter : public ui::EventHandler {
- public:
- explicit DimmerEventFilter(DimmerView* owner);
- virtual ~DimmerEventFilter();
-
- // Overridden from ui::EventHandler:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
-
- private:
- // The owning class.
- DimmerView* owner_;
-
- // TRUE if the mouse is inside the shelf.
- bool mouse_inside_;
-
- // TRUE if a touch event is inside the shelf.
- bool touch_inside_;
-
- DISALLOW_COPY_AND_ASSIGN(DimmerEventFilter);
- };
-
- // The owning shelf.
- ash::ShelfWidget* shelf_;
-
- // The alpha to use for covering the shelf.
- int alpha_;
-
- // True if the event filter claims that we should not be dimmed.
- bool is_hovered_;
-
- // True if someone forces us not to be dimmed (e.g. a menu is open).
- bool force_hovered_;
-
- // True if animations should be suppressed for a test.
- bool disable_dimming_animations_for_test_;
-
- // The animator for the background transitions.
- ash::internal::BackgroundAnimator background_animator_;
-
- // Notification of entering / exiting of the shelf area by mouse.
- scoped_ptr<DimmerEventFilter> event_filter_;
-
- DISALLOW_COPY_AND_ASSIGN(DimmerView);
-};
-
-DimmerView::DimmerView(ash::ShelfWidget* shelf_widget,
- bool disable_dimming_animations_for_test)
- : shelf_(shelf_widget),
- alpha_(kDimAlpha),
- is_hovered_(false),
- force_hovered_(false),
- disable_dimming_animations_for_test_(disable_dimming_animations_for_test),
- background_animator_(this, 0, kDimAlpha) {
- event_filter_.reset(new DimmerEventFilter(this));
- // Make sure it is undimmed at the beginning and then fire off the dimming
- // animation.
- background_animator_.SetPaintsBackground(false,
- ash::BACKGROUND_CHANGE_IMMEDIATE);
- SetHovered(false);
-}
-
-DimmerView::~DimmerView() {
-}
-
-void DimmerView::SetHovered(bool hovered) {
- // Remember the hovered state so that we can correct the state once a
- // possible force state has disappeared.
- is_hovered_ = hovered;
- // Undimm also if we were forced to by e.g. an open menu.
- hovered |= force_hovered_;
- background_animator_.SetDuration(hovered ? kTimeToUnDimMs : kTimeToDimMs);
- background_animator_.SetPaintsBackground(!hovered,
- disable_dimming_animations_for_test_ ?
- ash::BACKGROUND_CHANGE_IMMEDIATE : ash::BACKGROUND_CHANGE_ANIMATE);
-}
-
-void DimmerView::ForceUndimming(bool force) {
- bool previous = force_hovered_;
- force_hovered_ = force;
- // If the forced change does change the result we apply the change.
- if (is_hovered_ || force_hovered_ != is_hovered_ || previous)
- SetHovered(is_hovered_);
-}
-
-void DimmerView::OnPaintBackground(gfx::Canvas* canvas) {
- SkPaint paint;
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- gfx::ImageSkia launcher_background =
- *rb.GetImageNamed(IDR_AURA_LAUNCHER_DIMMING).ToImageSkia();
-
- if (shelf_->GetAlignment() != ash::SHELF_ALIGNMENT_BOTTOM) {
- launcher_background = gfx::ImageSkiaOperations::CreateRotatedImage(
- launcher_background,
- shelf_->shelf_layout_manager()->SelectValueForShelfAlignment(
- SkBitmapOperations::ROTATION_90_CW,
- SkBitmapOperations::ROTATION_90_CW,
- SkBitmapOperations::ROTATION_270_CW,
- SkBitmapOperations::ROTATION_180_CW));
- }
- paint.setAlpha(alpha_);
- canvas->DrawImageInt(
- launcher_background,
- 0, 0, launcher_background.width(), launcher_background.height(),
- 0, 0, width(), height(),
- false,
- paint);
-}
-
-DimmerView::DimmerEventFilter::DimmerEventFilter(DimmerView* owner)
- : owner_(owner),
- mouse_inside_(false),
- touch_inside_(false) {
- ash::Shell::GetInstance()->AddPreTargetHandler(this);
-}
-
-DimmerView::DimmerEventFilter::~DimmerEventFilter() {
- ash::Shell::GetInstance()->RemovePreTargetHandler(this);
-}
-
-void DimmerView::DimmerEventFilter::OnMouseEvent(ui::MouseEvent* event) {
- if (event->type() != ui::ET_MOUSE_MOVED &&
- event->type() != ui::ET_MOUSE_DRAGGED)
- return;
- bool inside = owner_->GetBoundsInScreen().Contains(event->root_location());
- if (mouse_inside_ || touch_inside_ != inside || touch_inside_)
- owner_->SetHovered(inside || touch_inside_);
- mouse_inside_ = inside;
-}
-
-void DimmerView::DimmerEventFilter::OnTouchEvent(ui::TouchEvent* event) {
- bool touch_inside = false;
- if (event->type() != ui::ET_TOUCH_RELEASED &&
- event->type() != ui::ET_TOUCH_CANCELLED)
- touch_inside = owner_->GetBoundsInScreen().Contains(event->root_location());
-
- if (mouse_inside_ || touch_inside_ != mouse_inside_ || touch_inside)
- owner_->SetHovered(mouse_inside_ || touch_inside);
- touch_inside_ = touch_inside;
-}
-
-} // namespace
-
-namespace ash {
-
-// The contents view of the Shelf. This view contains ShelfView and
-// sizes it to the width of the shelf minus the size of the status area.
-class ShelfWidget::DelegateView : public views::WidgetDelegate,
- public views::AccessiblePaneView,
- public internal::BackgroundAnimatorDelegate,
- public aura::WindowObserver {
- public:
- explicit DelegateView(ShelfWidget* shelf);
- virtual ~DelegateView();
-
- void set_focus_cycler(internal::FocusCycler* focus_cycler) {
- focus_cycler_ = focus_cycler;
- }
- internal::FocusCycler* focus_cycler() {
- return focus_cycler_;
- }
-
- ui::Layer* opaque_background() { return &opaque_background_; }
-
- // Set if the shelf area is dimmed (eg when a window is maximized).
- void SetDimmed(bool dimmed);
- bool GetDimmed() const;
-
- void SetParentLayer(ui::Layer* layer);
-
- // views::View overrides:
- virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE;
-
- // views::WidgetDelegateView overrides:
- virtual views::Widget* GetWidget() OVERRIDE {
- return View::GetWidget();
- }
- virtual const views::Widget* GetWidget() const OVERRIDE {
- return View::GetWidget();
- }
-
- virtual bool CanActivate() const OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual void ReorderChildLayers(ui::Layer* parent_layer) OVERRIDE;
- // This will be called when the parent local bounds change.
- virtual void OnBoundsChanged(const gfx::Rect& old_bounds) OVERRIDE;
-
- // aura::WindowObserver overrides:
- // This will be called when the shelf itself changes its absolute position.
- // Since the |dimmer_| panel needs to be placed in screen coordinates it needs
- // to be repositioned. The difference to the OnBoundsChanged call above is
- // that this gets also triggered when the shelf only moves.
- virtual void OnWindowBoundsChanged(aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
-
- // BackgroundAnimatorDelegate overrides:
- virtual void UpdateBackground(int alpha) OVERRIDE;
-
- // Force the shelf to be presented in an undimmed state.
- void ForceUndimming(bool force);
-
- // A function to test the current alpha used by the dimming bar. If there is
- // no dimmer active, the function will return -1.
- int GetDimmingAlphaForTest();
-
- // A function to test the bounds of the dimming bar. Returns gfx::Rect() if
- // the dimmer is inactive.
- gfx::Rect GetDimmerBoundsForTest();
-
- // Disable dimming animations for running tests. This needs to be called
- // prior to the creation of of the |dimmer_|.
- void disable_dimming_animations_for_test() {
- disable_dimming_animations_for_test_ = true;
- }
-
- private:
- ShelfWidget* shelf_;
- scoped_ptr<views::Widget> dimmer_;
- internal::FocusCycler* focus_cycler_;
- int alpha_;
- ui::Layer opaque_background_;
-
- // The view which does the dimming.
- DimmerView* dimmer_view_;
-
- // True if dimming animations should be turned off.
- bool disable_dimming_animations_for_test_;
-
- DISALLOW_COPY_AND_ASSIGN(DelegateView);
-};
-
-ShelfWidget::DelegateView::DelegateView(ShelfWidget* shelf)
- : shelf_(shelf),
- focus_cycler_(NULL),
- alpha_(0),
- opaque_background_(ui::LAYER_SOLID_COLOR),
- dimmer_view_(NULL),
- disable_dimming_animations_for_test_(false) {
- set_allow_deactivate_on_esc(true);
- opaque_background_.SetColor(SK_ColorBLACK);
- opaque_background_.SetBounds(GetLocalBounds());
- opaque_background_.SetOpacity(0.0f);
-}
-
-ShelfWidget::DelegateView::~DelegateView() {
- // Make sure that the dimmer goes away since it might have set an observer.
- SetDimmed(false);
-}
-
-void ShelfWidget::DelegateView::SetDimmed(bool value) {
- if (value == (dimmer_.get() != NULL))
- return;
-
- if (value) {
- dimmer_.reset(new views::Widget);
- views::Widget::InitParams params(
- views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- params.can_activate = false;
- params.accept_events = false;
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.parent = shelf_->GetNativeView();
- dimmer_->Init(params);
- dimmer_->GetNativeWindow()->SetName("ShelfDimmer");
- dimmer_->SetBounds(shelf_->GetWindowBoundsInScreen());
- // The launcher should not take focus when it is initially shown.
- dimmer_->set_focus_on_creation(false);
- dimmer_view_ = new DimmerView(shelf_, disable_dimming_animations_for_test_);
- dimmer_->SetContentsView(dimmer_view_);
- dimmer_->GetNativeView()->SetName("ShelfDimmerView");
- dimmer_->Show();
- shelf_->GetNativeView()->AddObserver(this);
- } else {
- // Some unit tests will come here with a destroyed window.
- if (shelf_->GetNativeView())
- shelf_->GetNativeView()->RemoveObserver(this);
- dimmer_view_ = NULL;
- dimmer_.reset(NULL);
- }
-}
-
-bool ShelfWidget::DelegateView::GetDimmed() const {
- return dimmer_.get() && dimmer_->IsVisible();
-}
-
-void ShelfWidget::DelegateView::SetParentLayer(ui::Layer* layer) {
- layer->Add(&opaque_background_);
- ReorderLayers();
-}
-
-void ShelfWidget::DelegateView::OnPaintBackground(gfx::Canvas* canvas) {
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- gfx::ImageSkia launcher_background =
- *rb.GetImageSkiaNamed(IDR_AURA_LAUNCHER_BACKGROUND);
- if (SHELF_ALIGNMENT_BOTTOM != shelf_->GetAlignment())
- launcher_background = gfx::ImageSkiaOperations::CreateRotatedImage(
- launcher_background,
- shelf_->shelf_layout_manager()->SelectValueForShelfAlignment(
- SkBitmapOperations::ROTATION_90_CW,
- SkBitmapOperations::ROTATION_90_CW,
- SkBitmapOperations::ROTATION_270_CW,
- SkBitmapOperations::ROTATION_180_CW));
- const gfx::Rect dock_bounds(shelf_->shelf_layout_manager()->dock_bounds());
- SkPaint paint;
- paint.setAlpha(alpha_);
- canvas->DrawImageInt(
- launcher_background,
- 0, 0, launcher_background.width(), launcher_background.height(),
- (SHELF_ALIGNMENT_BOTTOM == shelf_->GetAlignment() &&
- dock_bounds.x() == 0 && dock_bounds.width() > 0) ?
- dock_bounds.width() : 0, 0,
- SHELF_ALIGNMENT_BOTTOM == shelf_->GetAlignment() ?
- width() - dock_bounds.width() : width(), height(),
- false,
- paint);
- if (SHELF_ALIGNMENT_BOTTOM == shelf_->GetAlignment() &&
- dock_bounds.width() > 0) {
- // The part of the shelf background that is in the corner below the docked
- // windows close to the work area is an arched gradient that blends
- // vertically oriented docked background and horizontal shelf.
- gfx::ImageSkia launcher_corner =
- *rb.GetImageSkiaNamed(IDR_AURA_LAUNCHER_CORNER);
- if (dock_bounds.x() == 0) {
- launcher_corner = gfx::ImageSkiaOperations::CreateRotatedImage(
- launcher_corner, SkBitmapOperations::ROTATION_90_CW);
- }
- canvas->DrawImageInt(
- launcher_corner,
- 0, 0, launcher_corner.width(), launcher_corner.height(),
- dock_bounds.x() > 0 ? dock_bounds.x() : dock_bounds.width() - height(),
- 0,
- height(), height(),
- false,
- paint);
- // The part of the shelf background that is just below the docked windows
- // is drawn using the last (lowest) 1-pixel tall strip of the image asset.
- // This avoids showing the border 3D shadow between the shelf and the dock.
- canvas->DrawImageInt(
- launcher_background,
- 0, launcher_background.height() - 1, launcher_background.width(), 1,
- dock_bounds.x() > 0 ? dock_bounds.x() + height() : 0, 0,
- dock_bounds.width() - height(), height(),
- false,
- paint);
- }
- gfx::Rect black_rect =
- shelf_->shelf_layout_manager()->SelectValueForShelfAlignment(
- gfx::Rect(0, height() - kNumBlackPixels, width(), kNumBlackPixels),
- gfx::Rect(0, 0, kNumBlackPixels, height()),
- gfx::Rect(width() - kNumBlackPixels, 0, kNumBlackPixels, height()),
- gfx::Rect(0, 0, width(), kNumBlackPixels));
- canvas->FillRect(black_rect, SK_ColorBLACK);
-}
-
-bool ShelfWidget::DelegateView::CanActivate() const {
- // Allow to activate as fallback.
- if (shelf_->activating_as_fallback_)
- return true;
- // Allow to activate from the focus cycler.
- if (focus_cycler_ && focus_cycler_->widget_activating() == GetWidget())
- return true;
- // Disallow activating in other cases, especially when using mouse.
- return false;
-}
-
-void ShelfWidget::DelegateView::Layout() {
- for(int i = 0; i < child_count(); ++i) {
- if (shelf_->shelf_layout_manager()->IsHorizontalAlignment()) {
- child_at(i)->SetBounds(child_at(i)->x(), child_at(i)->y(),
- child_at(i)->width(), height());
- } else {
- child_at(i)->SetBounds(child_at(i)->x(), child_at(i)->y(),
- width(), child_at(i)->height());
- }
- }
-}
-
-void ShelfWidget::DelegateView::ReorderChildLayers(ui::Layer* parent_layer) {
- views::View::ReorderChildLayers(parent_layer);
- parent_layer->StackAtBottom(&opaque_background_);
-}
-
-void ShelfWidget::DelegateView::OnBoundsChanged(const gfx::Rect& old_bounds) {
- opaque_background_.SetBounds(GetLocalBounds());
- if (dimmer_)
- dimmer_->SetBounds(GetBoundsInScreen());
-}
-
-void ShelfWidget::DelegateView::OnWindowBoundsChanged(
- aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) {
- // Coming here the shelf got repositioned and since the |dimmer_| is placed
- // in screen coordinates and not relative to the parent it needs to be
- // repositioned accordingly.
- dimmer_->SetBounds(GetBoundsInScreen());
-}
-
-void ShelfWidget::DelegateView::ForceUndimming(bool force) {
- if (GetDimmed())
- dimmer_view_->ForceUndimming(force);
-}
-
-int ShelfWidget::DelegateView::GetDimmingAlphaForTest() {
- if (GetDimmed())
- return dimmer_view_->get_dimming_alpha_for_test();
- return -1;
-}
-
-gfx::Rect ShelfWidget::DelegateView::GetDimmerBoundsForTest() {
- if (GetDimmed())
- return dimmer_view_->GetBoundsInScreen();
- return gfx::Rect();
-}
-
-void ShelfWidget::DelegateView::UpdateBackground(int alpha) {
- alpha_ = alpha;
- SchedulePaint();
-}
-
-ShelfWidget::ShelfWidget(aura::Window* shelf_container,
- aura::Window* status_container,
- internal::WorkspaceController* workspace_controller)
- : delegate_view_(new DelegateView(this)),
- background_animator_(delegate_view_, 0, kLauncherBackgroundAlpha),
- activating_as_fallback_(false),
- window_container_(shelf_container) {
- views::Widget::InitParams params(
- views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.parent = shelf_container;
- params.delegate = delegate_view_;
- Init(params);
-
- // The shelf should not take focus when initially shown.
- set_focus_on_creation(false);
- SetContentsView(delegate_view_);
- delegate_view_->SetParentLayer(GetLayer());
-
- status_area_widget_ = new internal::StatusAreaWidget(status_container);
- status_area_widget_->CreateTrayViews();
- if (Shell::GetInstance()->session_state_delegate()->
- IsActiveUserSessionStarted()) {
- status_area_widget_->Show();
- }
- Shell::GetInstance()->focus_cycler()->AddWidget(status_area_widget_);
-
- shelf_layout_manager_ = new internal::ShelfLayoutManager(this);
- shelf_layout_manager_->AddObserver(this);
- shelf_container->SetLayoutManager(shelf_layout_manager_);
- shelf_layout_manager_->set_workspace_controller(workspace_controller);
- workspace_controller->SetShelf(shelf_layout_manager_);
-
- status_container->SetLayoutManager(
- new internal::StatusAreaLayoutManager(this));
-
- views::Widget::AddObserver(this);
-}
-
-ShelfWidget::~ShelfWidget() {
- RemoveObserver(this);
-}
-
-void ShelfWidget::SetPaintsBackground(
- ShelfBackgroundType background_type,
- BackgroundAnimatorChangeType change_type) {
- ui::Layer* opaque_background = delegate_view_->opaque_background();
- float target_opacity =
- (background_type == SHELF_BACKGROUND_MAXIMIZED) ? 1.0f : 0.0f;
- scoped_ptr<ui::ScopedLayerAnimationSettings> opaque_background_animation;
- if (change_type != BACKGROUND_CHANGE_IMMEDIATE) {
- opaque_background_animation.reset(new ui::ScopedLayerAnimationSettings(
- opaque_background->GetAnimator()));
- opaque_background_animation->SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kTimeToSwitchBackgroundMs));
- }
- opaque_background->SetOpacity(target_opacity);
-
- // TODO(mukai): use ui::Layer on both opaque_background and normal background
- // retire background_animator_ at all. It would be simpler.
- // See also DockedBackgroundWidget::SetPaintsBackground.
- background_animator_.SetPaintsBackground(
- background_type != SHELF_BACKGROUND_DEFAULT,
- change_type);
- delegate_view_->SchedulePaint();
-}
-
-ShelfBackgroundType ShelfWidget::GetBackgroundType() const {
- if (delegate_view_->opaque_background()->GetTargetOpacity() == 1.0f)
- return SHELF_BACKGROUND_MAXIMIZED;
- if (background_animator_.paints_background())
- return SHELF_BACKGROUND_OVERLAP;
-
- return SHELF_BACKGROUND_DEFAULT;
-}
-
-// static
-bool ShelfWidget::ShelfAlignmentAllowed() {
- if (!ash::switches::ShowShelfAlignmentMenu())
- return false;
- user::LoginStatus login_status =
- Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus();
-
- switch (login_status) {
- case user::LOGGED_IN_USER:
- case user::LOGGED_IN_OWNER:
- return true;
- case user::LOGGED_IN_LOCKED:
- case user::LOGGED_IN_PUBLIC:
- case user::LOGGED_IN_LOCALLY_MANAGED:
- case user::LOGGED_IN_GUEST:
- case user::LOGGED_IN_RETAIL_MODE:
- case user::LOGGED_IN_KIOSK_APP:
- case user::LOGGED_IN_NONE:
- return false;
- }
-
- DCHECK(false);
- return false;
-}
-
-ShelfAlignment ShelfWidget::GetAlignment() const {
- return shelf_layout_manager_->GetAlignment();
-}
-
-void ShelfWidget::SetAlignment(ShelfAlignment alignment) {
- if (launcher_)
- launcher_->SetAlignment(alignment);
- status_area_widget_->SetShelfAlignment(alignment);
- delegate_view_->SchedulePaint();
-}
-
-void ShelfWidget::SetDimsShelf(bool dimming) {
- delegate_view_->SetDimmed(dimming);
- // Repaint all children, allowing updates to reflect dimmed state eg:
- // status area background, app list button and overflow button.
- if (launcher_)
- launcher_->SchedulePaint();
- status_area_widget_->GetContentsView()->SchedulePaint();
-}
-
-bool ShelfWidget::GetDimsShelf() const {
- return delegate_view_->GetDimmed();
-}
-
-void ShelfWidget::CreateLauncher() {
- if (launcher_)
- return;
-
- Shell* shell = Shell::GetInstance();
- // This needs to be called before shelf_model().
- ShelfDelegate* shelf_delegate = shell->GetShelfDelegate();
- if (!shelf_delegate)
- return; // Not ready to create Launcher
-
- launcher_.reset(new Launcher(shell->shelf_model(),
- shell->GetShelfDelegate(),
- this));
- SetFocusCycler(shell->focus_cycler());
-
- // Inform the root window controller.
- internal::RootWindowController::ForWindow(window_container_)->
- OnLauncherCreated();
-
- launcher_->SetVisible(
- shell->session_state_delegate()->IsActiveUserSessionStarted());
- shelf_layout_manager_->LayoutShelf();
- Show();
-}
-
-bool ShelfWidget::IsLauncherVisible() const {
- return launcher_.get() && launcher_->IsVisible();
-}
-
-void ShelfWidget::SetLauncherVisibility(bool visible) {
- if (launcher_)
- launcher_->SetVisible(visible);
-}
-
-void ShelfWidget::SetFocusCycler(internal::FocusCycler* focus_cycler) {
- delegate_view_->set_focus_cycler(focus_cycler);
- if (focus_cycler)
- focus_cycler->AddWidget(this);
-}
-
-internal::FocusCycler* ShelfWidget::GetFocusCycler() {
- return delegate_view_->focus_cycler();
-}
-
-void ShelfWidget::ShutdownStatusAreaWidget() {
- if (status_area_widget_)
- status_area_widget_->Shutdown();
- status_area_widget_ = NULL;
-}
-
-void ShelfWidget::ForceUndimming(bool force) {
- delegate_view_->ForceUndimming(force);
-}
-
-void ShelfWidget::OnWidgetActivationChanged(views::Widget* widget,
- bool active) {
- activating_as_fallback_ = false;
- if (active)
- delegate_view_->SetPaneFocusAndFocusDefault();
- else
- delegate_view_->GetFocusManager()->ClearFocus();
-}
-
-int ShelfWidget::GetDimmingAlphaForTest() {
- if (delegate_view_)
- return delegate_view_->GetDimmingAlphaForTest();
- return -1;
-}
-
-gfx::Rect ShelfWidget::GetDimmerBoundsForTest() {
- if (delegate_view_)
- return delegate_view_->GetDimmerBoundsForTest();
- return gfx::Rect();
-}
-
-void ShelfWidget::DisableDimmingAnimationsForTest() {
- DCHECK(delegate_view_);
- return delegate_view_->disable_dimming_animations_for_test();
-}
-
-void ShelfWidget::WillDeleteShelf() {
- shelf_layout_manager_->RemoveObserver(this);
- shelf_layout_manager_ = NULL;
-}
-
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_widget.h b/chromium/ash/shelf/shelf_widget.h
deleted file mode 100644
index 6c9eeba63e3..00000000000
--- a/chromium/ash/shelf/shelf_widget.h
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_WIDGET_H_
-#define ASH_SHELF_SHELF_WIDGET_H_
-
-#include "ash/ash_export.h"
-#include "ash/shelf/background_animator.h"
-#include "ash/shelf/shelf_layout_manager_observer.h"
-#include "ash/shelf/shelf_types.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_observer.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-class Launcher;
-
-namespace internal {
-class FocusCycler;
-class StatusAreaWidget;
-class ShelfLayoutManager;
-class WorkspaceController;
-}
-
-class ASH_EXPORT ShelfWidget : public views::Widget,
- public views::WidgetObserver,
- public ShelfLayoutManagerObserver {
- public:
- ShelfWidget(
- aura::Window* shelf_container,
- aura::Window* status_container,
- internal::WorkspaceController* workspace_controller);
- virtual ~ShelfWidget();
-
- // Returns if shelf alignment option is enabled, and the user is able
- // to adjust the alignment (guest and supervised mode users cannot for
- // example).
- static bool ShelfAlignmentAllowed();
-
- void SetAlignment(ShelfAlignment alignmnet);
- ShelfAlignment GetAlignment() const;
-
- // Sets the shelf's background type.
- void SetPaintsBackground(ShelfBackgroundType background_type,
- BackgroundAnimatorChangeType change_type);
- ShelfBackgroundType GetBackgroundType() const;
-
- // Causes shelf items to be slightly dimmed (e.g. when a window is maximized).
- void SetDimsShelf(bool dimming);
- bool GetDimsShelf() const;
-
- internal::ShelfLayoutManager* shelf_layout_manager() {
- return shelf_layout_manager_;
- }
- Launcher* launcher() const { return launcher_.get(); }
- internal::StatusAreaWidget* status_area_widget() const {
- return status_area_widget_;
- }
-
- void CreateLauncher();
-
- // Set visibility of the launcher component of the shelf.
- void SetLauncherVisibility(bool visible);
- bool IsLauncherVisible() const;
-
- // Sets the focus cycler. Also adds the launcher to the cycle.
- void SetFocusCycler(internal::FocusCycler* focus_cycler);
- internal::FocusCycler* GetFocusCycler();
-
- // Called by the activation delegate, before the launcher is activated
- // when no other windows are visible.
- void WillActivateAsFallback() { activating_as_fallback_ = true; }
-
- aura::Window* window_container() { return window_container_; }
-
- // TODO(harrym): Remove when Status Area Widget is a child view.
- void ShutdownStatusAreaWidget();
-
- // Force the shelf to be presented in an undimmed state.
- void ForceUndimming(bool force);
-
- // Overridden from views::WidgetObserver:
- virtual void OnWidgetActivationChanged(
- views::Widget* widget, bool active) OVERRIDE;
-
- // A function to test the current alpha used by the dimming bar. If there is
- // no dimmer active, the function will return -1.
- int GetDimmingAlphaForTest();
-
- // A function to test the bounds of the dimming bar. Returns gfx::Rect() if
- // the dimmer is inactive.
- gfx::Rect GetDimmerBoundsForTest();
-
- // Disable dimming animations for running tests.
- void DisableDimmingAnimationsForTest();
-
- // ShelfLayoutManagerObserver overrides:
- virtual void WillDeleteShelf() OVERRIDE;
-
- private:
- class DelegateView;
-
- internal::ShelfLayoutManager* shelf_layout_manager_;
- scoped_ptr<Launcher> launcher_;
- internal::StatusAreaWidget* status_area_widget_;
-
- // delegate_view_ is attached to window_container_ and is cleaned up
- // during CloseChildWindows of the associated RootWindowController.
- DelegateView* delegate_view_;
- internal::BackgroundAnimator background_animator_;
- bool activating_as_fallback_;
- aura::Window* window_container_;
-};
-
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_WIDGET_H_
diff --git a/chromium/ash/shelf/shelf_widget_unittest.cc b/chromium/ash/shelf/shelf_widget_unittest.cc
deleted file mode 100644
index c4e9b875f6f..00000000000
--- a/chromium/ash/shelf/shelf_widget_unittest.cc
+++ /dev/null
@@ -1,194 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_widget.h"
-
-#include "ash/launcher/launcher.h"
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_button.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_model.h"
-#include "ash/shelf/shelf_view.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/launcher_test_api.h"
-#include "ash/test/shelf_view_test_api.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/root_window.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/corewm/corewm_switches.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-
-namespace {
-
-ShelfWidget* GetShelfWidget() {
- return Launcher::ForPrimaryDisplay()->shelf_widget();
-}
-
-internal::ShelfLayoutManager* GetShelfLayoutManager() {
- return GetShelfWidget()->shelf_layout_manager();
-}
-
-} // namespace
-
-typedef test::AshTestBase ShelfWidgetTest;
-
-// Shelf can't be activated on mouse click, but it is activable from
-// the focus cycler or as fallback.
-// TODO(mtomasz): make this test work with the FocusController.
-// crbug.com/285364.
-TEST_F(ShelfWidgetTest, DISABLED_ActivateAsFallback) {
- Launcher* launcher = Launcher::ForPrimaryDisplay();
- ShelfWidget* shelf_widget = launcher->shelf_widget();
- EXPECT_FALSE(shelf_widget->CanActivate());
-
- shelf_widget->WillActivateAsFallback();
- EXPECT_TRUE(shelf_widget->CanActivate());
-
- wm::ActivateWindow(shelf_widget->GetNativeWindow());
- EXPECT_FALSE(shelf_widget->CanActivate());
-}
-
-void TestLauncherAlignment(aura::Window* root,
- ShelfAlignment alignment,
- const std::string& expected) {
- Shell::GetInstance()->SetShelfAlignment(alignment, root);
- gfx::Screen* screen = gfx::Screen::GetScreenFor(root);
- EXPECT_EQ(expected,
- screen->GetDisplayNearestWindow(root).work_area().ToString());
-}
-
-TEST_F(ShelfWidgetTest, TestAlignment) {
- Launcher* launcher = Launcher::ForPrimaryDisplay();
- UpdateDisplay("400x400");
- ASSERT_TRUE(launcher);
- {
- SCOPED_TRACE("Single Bottom");
- TestLauncherAlignment(Shell::GetPrimaryRootWindow(),
- SHELF_ALIGNMENT_BOTTOM,
- "0,0 400x353");
- }
- {
- SCOPED_TRACE("Single Right");
- TestLauncherAlignment(Shell::GetPrimaryRootWindow(),
- SHELF_ALIGNMENT_RIGHT,
- "0,0 353x400");
- }
- {
- SCOPED_TRACE("Single Left");
- TestLauncherAlignment(Shell::GetPrimaryRootWindow(),
- SHELF_ALIGNMENT_LEFT,
- "47,0 353x400");
- }
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("300x300,500x500");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- {
- SCOPED_TRACE("Primary Bottom");
- TestLauncherAlignment(root_windows[0],
- SHELF_ALIGNMENT_BOTTOM,
- "0,0 300x253");
- }
- {
- SCOPED_TRACE("Primary Right");
- TestLauncherAlignment(root_windows[0],
- SHELF_ALIGNMENT_RIGHT,
- "0,0 253x300");
- }
- {
- SCOPED_TRACE("Primary Left");
- TestLauncherAlignment(root_windows[0],
- SHELF_ALIGNMENT_LEFT,
- "47,0 253x300");
- }
- {
- SCOPED_TRACE("Secondary Bottom");
- TestLauncherAlignment(root_windows[1],
- SHELF_ALIGNMENT_BOTTOM,
- "300,0 500x453");
- }
- {
- SCOPED_TRACE("Secondary Right");
- TestLauncherAlignment(root_windows[1],
- SHELF_ALIGNMENT_RIGHT,
- "300,0 453x500");
- }
- {
- SCOPED_TRACE("Secondary Left");
- TestLauncherAlignment(root_windows[1],
- SHELF_ALIGNMENT_LEFT,
- "347,0 453x500");
- }
-}
-
-// Makes sure the launcher is initially sized correctly.
-TEST_F(ShelfWidgetTest, LauncherInitiallySized) {
- ShelfWidget* shelf_widget = GetShelfWidget();
- Launcher* launcher = shelf_widget->launcher();
- ASSERT_TRUE(launcher);
- internal::ShelfLayoutManager* shelf_layout_manager = GetShelfLayoutManager();
- ASSERT_TRUE(shelf_layout_manager);
- ASSERT_TRUE(shelf_widget->status_area_widget());
- int status_width = shelf_widget->status_area_widget()->
- GetWindowBoundsInScreen().width();
- // Test only makes sense if the status is > 0, which it better be.
- EXPECT_GT(status_width, 0);
- EXPECT_EQ(status_width, shelf_widget->GetContentsView()->width() -
- test::LauncherTestAPI(launcher).shelf_view()->width());
-}
-
-// Verifies when the shell is deleted with a full screen window we don't crash.
-TEST_F(ShelfWidgetTest, DontReferenceLauncherAfterDeletion) {
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
- params.bounds = gfx::Rect(0, 0, 200, 200);
- params.context = CurrentContext();
- // Widget is now owned by the parent window.
- widget->Init(params);
- widget->SetFullscreen(true);
-}
-
-#if defined(OS_CHROMEOS)
-// Verifies launcher is created with correct size after user login and when its
-// container and status widget has finished sizing.
-// See http://crbug.com/252533
-TEST_F(ShelfWidgetTest, LauncherInitiallySizedAfterLogin) {
- SetUserLoggedIn(false);
- UpdateDisplay("300x200,400x300");
-
- ShelfWidget* shelf = NULL;
- Shell::RootWindowControllerList controllers(
- Shell::GetAllRootWindowControllers());
- for (Shell::RootWindowControllerList::const_iterator i = controllers.begin();
- i != controllers.end();
- ++i) {
- if (!(*i)->shelf()->launcher()) {
- shelf = (*i)->shelf();
- break;
- }
- }
- ASSERT_TRUE(shelf != NULL);
-
- SetUserLoggedIn(true);
- Shell::GetInstance()->CreateLauncher();
-
- Launcher* launcher = shelf->launcher();
- ASSERT_TRUE(launcher != NULL);
-
- const int status_width =
- shelf->status_area_widget()->GetWindowBoundsInScreen().width();
- EXPECT_GT(status_width, 0);
- EXPECT_EQ(status_width,
- shelf->GetContentsView()->width() -
- test::LauncherTestAPI(launcher).shelf_view()->width());
-}
-#endif
-
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_window_watcher.cc b/chromium/ash/shelf/shelf_window_watcher.cc
deleted file mode 100644
index b4e65e25a7b..00000000000
--- a/chromium/ash/shelf/shelf_window_watcher.cc
+++ /dev/null
@@ -1,224 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_window_watcher.h"
-
-#include "ash/display/display_controller.h"
-#include "ash/shelf/shelf_item_delegate_manager.h"
-#include "ash/shelf/shelf_model.h"
-#include "ash/shelf/shelf_util.h"
-#include "ash/shelf/shelf_window_watcher_item_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/window_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/window.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/gfx/screen.h"
-
-namespace {
-
-// Sets LauncherItem property by using the value of |details|.
-void SetLauncherItemDetailsForLauncherItem(
- ash::LauncherItem* item,
- const ash::LauncherItemDetails& details) {
- item->type = details.type;
- if (details.image_resource_id != ash::kInvalidImageResourceID) {
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- item->image = *rb.GetImageSkiaNamed(details.image_resource_id);
- }
-}
-
-// Returns true if |window| has a LauncherItem added by ShelfWindowWatcher.
-bool HasLauncherItemForWindow(aura::Window* window) {
- if (ash::GetLauncherItemDetailsForWindow(window) != NULL &&
- ash::GetLauncherIDForWindow(window) != ash::kInvalidLauncherID)
- return true;
- return false;
-}
-
-} // namespace
-
-namespace ash {
-namespace internal {
-
-ShelfWindowWatcher::RootWindowObserver::RootWindowObserver(
- ShelfWindowWatcher* window_watcher)
- : window_watcher_(window_watcher) {
-}
-
-ShelfWindowWatcher::RootWindowObserver::~RootWindowObserver() {
-}
-
-void ShelfWindowWatcher::RootWindowObserver::OnWindowDestroying(
- aura::Window* window) {
- window_watcher_->OnRootWindowRemoved(window);
-}
-
-ShelfWindowWatcher::ShelfWindowWatcher(
- ShelfModel* model,
- ShelfItemDelegateManager* item_delegate_manager)
- : model_(model),
- item_delegate_manager_(item_delegate_manager),
- root_window_observer_(this),
- observed_windows_(this),
- observed_root_windows_(&root_window_observer_),
- observed_activation_clients_(this) {
- // We can't assume all RootWindows have the same ActivationClient.
- // Add a RootWindow and its ActivationClient to the observed list.
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- for (aura::Window::Windows::const_iterator it = root_windows.begin();
- it != root_windows.end(); ++it)
- OnRootWindowAdded(*it);
-
- Shell::GetScreen()->AddObserver(this);
-}
-
-ShelfWindowWatcher::~ShelfWindowWatcher() {
- Shell::GetScreen()->RemoveObserver(this);
-}
-
-void ShelfWindowWatcher::AddLauncherItem(aura::Window* window) {
- const LauncherItemDetails* item_details =
- GetLauncherItemDetailsForWindow(window);
- LauncherItem item;
- LauncherID id = model_->next_id();
- item.status = ash::wm::IsActiveWindow(window) ? STATUS_ACTIVE: STATUS_RUNNING;
- SetLauncherItemDetailsForLauncherItem(&item, *item_details);
- SetLauncherIDForWindow(id, window);
- scoped_ptr<ShelfItemDelegate> item_delegate(
- new ShelfWindowWatcherItemDelegate(window));
- // |item_delegate| is owned by |item_delegate_manager_|.
- item_delegate_manager_->SetShelfItemDelegate(id, item_delegate.Pass());
- model_->Add(item);
-}
-
-void ShelfWindowWatcher::RemoveLauncherItem(aura::Window* window) {
- model_->RemoveItemAt(model_->ItemIndexByID(GetLauncherIDForWindow(window)));
- SetLauncherIDForWindow(kInvalidLauncherID, window);
-}
-
-void ShelfWindowWatcher::OnRootWindowAdded(aura::Window* root_window) {
- // |observed_activation_clients_| can have the same ActivationClient multiple
- // times - which would be handled by the |observed_activation_clients_|.
- observed_activation_clients_.Add(
- aura::client::GetActivationClient(root_window));
- observed_root_windows_.Add(root_window);
-
- aura::Window* default_container = Shell::GetContainer(
- root_window,
- kShellWindowId_DefaultContainer);
- observed_windows_.Add(default_container);
- for (size_t i = 0; i < default_container->children().size(); ++i)
- observed_windows_.Add(default_container->children()[i]);
-}
-
-void ShelfWindowWatcher::OnRootWindowRemoved(aura::Window* root_window) {
- observed_root_windows_.Remove(root_window);
- observed_activation_clients_.Remove(
- aura::client::GetActivationClient(root_window));
-}
-
-void ShelfWindowWatcher::UpdateLauncherItemStatus(aura::Window* window,
- bool is_active) {
- int index = GetLauncherItemIndexForWindow(window);
- DCHECK_GE(index, 0);
-
- LauncherItem item = model_->items()[index];
- item.status = is_active ? STATUS_ACTIVE : STATUS_RUNNING;
- model_->Set(index, item);
-}
-
-int ShelfWindowWatcher::GetLauncherItemIndexForWindow(
- aura::Window* window) const {
- return model_->ItemIndexByID(GetLauncherIDForWindow(window));
-}
-
-void ShelfWindowWatcher::OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) {
- if (gained_active && HasLauncherItemForWindow(gained_active))
- UpdateLauncherItemStatus(gained_active, true);
- if (lost_active && HasLauncherItemForWindow(lost_active))
- UpdateLauncherItemStatus(lost_active, false);
-}
-
-void ShelfWindowWatcher::OnWindowAdded(aura::Window* window) {
- observed_windows_.Add(window);
- // Add LauncherItem if |window| already has a LauncherItemDetails when it is
- // created. Don't make a new LauncherItem for the re-parented |window| that
- // already has a LauncherItem.
- if (GetLauncherIDForWindow(window) == ash::kInvalidLauncherID &&
- GetLauncherItemDetailsForWindow(window))
- AddLauncherItem(window);
-}
-
-void ShelfWindowWatcher::OnWillRemoveWindow(aura::Window* window) {
- // Remove a child window of default container and its item if it has.
- if (observed_windows_.IsObserving(window))
- observed_windows_.Remove(window);
-
- if (HasLauncherItemForWindow(window))
- RemoveLauncherItem(window);
-}
-
-void ShelfWindowWatcher::OnWindowDestroying(aura::Window* window) {
- // Remove the default container.
- if (observed_windows_.IsObserving(window))
- observed_windows_.Remove(window);
-}
-
-void ShelfWindowWatcher::OnWindowPropertyChanged(aura::Window* window,
- const void* key,
- intptr_t old) {
- if (key != kLauncherItemDetailsKey)
- return;
-
- if (GetLauncherItemDetailsForWindow(window) == NULL) {
- // Removes LauncherItem for |window| when it has a LauncherItem.
- if (reinterpret_cast<LauncherItemDetails*>(old) != NULL)
- RemoveLauncherItem(window);
- return;
- }
-
- // When LauncherItemDetails is changed, update LauncherItem.
- if (HasLauncherItemForWindow(window)) {
- int index = GetLauncherItemIndexForWindow(window);
- DCHECK_GE(index, 0);
- LauncherItem item = model_->items()[index];
- const LauncherItemDetails* details =
- GetLauncherItemDetailsForWindow(window);
- SetLauncherItemDetailsForLauncherItem(&item, *details);
- model_->Set(index, item);
- return;
- }
-
- // Creates a new LauncherItem for |window|.
- AddLauncherItem(window);
-}
-
-void ShelfWindowWatcher::OnDisplayBoundsChanged(const gfx::Display& display) {
-}
-
-void ShelfWindowWatcher::OnDisplayAdded(const gfx::Display& new_display) {
- // Add a new RootWindow and its ActivationClient to observed list.
- aura::Window* root_window = Shell::GetInstance()->display_controller()->
- GetRootWindowForDisplayId(new_display.id());
-
- // When the primary root window's display get removed, the existing root
- // window is taken over by the new display and the observer is already set.
- if (!observed_root_windows_.IsObserving(root_window))
- OnRootWindowAdded(root_window);
-}
-
-void ShelfWindowWatcher::OnDisplayRemoved(const gfx::Display& old_display) {
- // When this is called, RootWindow of |old_display| is already removed.
- // Instead, we remove an observer from RootWindow and ActivationClient in the
- // OnRootWindowDestroyed().
- // Do nothing here.
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_window_watcher.h b/chromium/ash/shelf/shelf_window_watcher.h
deleted file mode 100644
index 43ac4f0150e..00000000000
--- a/chromium/ash/shelf/shelf_window_watcher.h
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_WINDOW_WATCHER_H_
-#define ASH_SHELF_SHELF_WINDOW_WATCHER_H_
-
-#include "ash/shelf/scoped_observer_with_duplicated_sources.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/scoped_observer.h"
-#include "ui/aura/client/activation_change_observer.h"
-#include "ui/aura/window_observer.h"
-#include "ui/gfx/display_observer.h"
-
-namespace aura {
-
-class Window;
-
-namespace client {
-class ActivationClient;
-}
-
-} // namespace aura
-
-namespace ash {
-
-class ShelfModel;
-class ShelfItemDelegateManager;
-
-namespace internal {
-// ShelfWindowWatcher creates and handles a LauncherItem for windows that have
-// a LauncherItemDetails property in the default container.
-class ShelfWindowWatcher : public aura::client::ActivationChangeObserver,
- public aura::WindowObserver,
- public gfx::DisplayObserver {
- public:
- ShelfWindowWatcher(ShelfModel* model,
- ShelfItemDelegateManager* item_delegate_manager);
- virtual ~ShelfWindowWatcher();
-
- private:
- class RootWindowObserver : public aura::WindowObserver {
- public:
- explicit RootWindowObserver(ShelfWindowWatcher* window_watcher);
- virtual ~RootWindowObserver();
-
- private:
- // aura::WindowObserver overrides:
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
-
- // Owned by Shell.
- ShelfWindowWatcher* window_watcher_;
-
- DISALLOW_COPY_AND_ASSIGN(RootWindowObserver);
- };
-
- // Creates a LauncherItem for |window| that has LauncherItemDetails.
- void AddLauncherItem(aura::Window* window);
-
- // Removes a LauncherItem for |window|.
- void RemoveLauncherItem(aura::Window* window);
-
- // Adds observer to default container and ActivationClient of |root_window|.
- void OnRootWindowAdded(aura::Window* root_window);
-
- // Removes observer from ActivationClient of |root_window|.
- void OnRootWindowRemoved(aura::Window* root_window);
-
- // Updates the status of LauncherItem for |window|.
- void UpdateLauncherItemStatus(aura::Window* window, bool is_active);
-
- // Returns the index of LauncherItem associated with |window|.
- int GetLauncherItemIndexForWindow(aura::Window* window) const;
-
- // aura::client::ActivationChangeObserver overrides:
- virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) OVERRIDE;
-
- // aura::WindowObserver overrides:
- virtual void OnWindowAdded(aura::Window* window) OVERRIDE;
- virtual void OnWillRemoveWindow(aura::Window* window) OVERRIDE;
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
- virtual void OnWindowPropertyChanged(aura::Window* window,
- const void* key,
- intptr_t old) OVERRIDE;
-
- // gfx::DisplayObserver overrides:
- virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE;
- virtual void OnDisplayAdded(const gfx::Display& display) OVERRIDE;
- virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE;
-
- // Owned by Shell.
- ShelfModel* model_;
- ShelfItemDelegateManager* item_delegate_manager_;
-
- RootWindowObserver root_window_observer_;
-
- // Holds all observed windows.
- ScopedObserver<aura::Window, aura::WindowObserver> observed_windows_;
-
- // Holds all observed root windows.
- ScopedObserver<aura::Window, aura::WindowObserver> observed_root_windows_;
-
- // Holds all observed activation clients.
- ScopedObserverWithDuplicatedSources<aura::client::ActivationClient,
- aura::client::ActivationChangeObserver> observed_activation_clients_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfWindowWatcher);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_WINDOW_WATCHER_H_
diff --git a/chromium/ash/shelf/shelf_window_watcher_item_delegate.cc b/chromium/ash/shelf/shelf_window_watcher_item_delegate.cc
deleted file mode 100644
index 6c7cc6565dc..00000000000
--- a/chromium/ash/shelf/shelf_window_watcher_item_delegate.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_window_watcher_item_delegate.h"
-
-#include "ash/shelf/shelf_util.h"
-#include "ash/wm/window_state.h"
-#include "ui/aura/window.h"
-#include "ui/views/corewm/window_animations.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-ShelfWindowWatcherItemDelegate::ShelfWindowWatcherItemDelegate(
- aura::Window* window)
- : window_(window) {
-}
-
-ShelfWindowWatcherItemDelegate::~ShelfWindowWatcherItemDelegate() {
-}
-
-void ShelfWindowWatcherItemDelegate::Close() {
- views::Widget::GetWidgetForNativeWindow(window_)->Close();
-}
-
-bool ShelfWindowWatcherItemDelegate::ItemSelected(const ui::Event& event) {
- wm::WindowState* window_state = wm::GetWindowState(window_);
- if (window_state->IsActive()) {
- if (event.type() & ui::ET_KEY_RELEASED) {
- views::corewm::AnimateWindow(window_,
- views::corewm::WINDOW_ANIMATION_TYPE_BOUNCE);
- } else {
- window_state->Minimize();
- }
- } else {
- window_state->Activate();
- }
-
- return false;
-}
-
-base::string16 ShelfWindowWatcherItemDelegate::GetTitle() {
- return GetLauncherItemDetailsForWindow(window_)->title;
-}
-
-ui::MenuModel* ShelfWindowWatcherItemDelegate::CreateContextMenu(
- aura::Window* root_window) {
- // TODO(simonhong): Create ShelfItemContextMenu.
- return NULL;
-}
-
-ShelfMenuModel* ShelfWindowWatcherItemDelegate::CreateApplicationMenu(
- int event_flags) {
- return NULL;
-}
-
-bool ShelfWindowWatcherItemDelegate::IsDraggable() {
- return true;
-}
-
-bool ShelfWindowWatcherItemDelegate::ShouldShowTooltip() {
- return true;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/shelf/shelf_window_watcher_item_delegate.h b/chromium/ash/shelf/shelf_window_watcher_item_delegate.h
deleted file mode 100644
index 24723114e5e..00000000000
--- a/chromium/ash/shelf/shelf_window_watcher_item_delegate.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELF_SHELF_WINDOW_WATCHER_ITEM_DELEGATE_H_
-#define ASH_SHELF_SHELF_WINDOW_WATCHER_ITEM_DELEGATE_H_
-
-#include "ash/shelf/shelf_item_delegate.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-namespace internal {
-
-// ShelfItemDelegate for the items created by ShelfWindowWatcher.
-class ShelfWindowWatcherItemDelegate : public ShelfItemDelegate {
- public:
- explicit ShelfWindowWatcherItemDelegate(aura::Window* window);
-
- virtual ~ShelfWindowWatcherItemDelegate();
-
- // Closes the window associated with this item.
- void Close();
-
- private:
- // ShelfItemDelegate overrides:
- virtual bool ItemSelected(const ui::Event& event) OVERRIDE;
- virtual base::string16 GetTitle() OVERRIDE;
- virtual ui::MenuModel* CreateContextMenu(aura::Window* root_window) OVERRIDE;
- virtual ShelfMenuModel* CreateApplicationMenu(int event_flags) OVERRIDE;
- virtual bool IsDraggable() OVERRIDE;
- virtual bool ShouldShowTooltip() OVERRIDE;
-
- // Stores a Window associated with this item. Not owned.
- aura::Window* window_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfWindowWatcherItemDelegate);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_WINDOW_WATCHER_ITEM_DELEGATE_H_
diff --git a/chromium/ash/shelf/shelf_window_watcher_unittest.cc b/chromium/ash/shelf/shelf_window_watcher_unittest.cc
deleted file mode 100644
index 1217aae2e5e..00000000000
--- a/chromium/ash/shelf/shelf_window_watcher_unittest.cc
+++ /dev/null
@@ -1,175 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_window_watcher.h"
-
-#include "ash/launcher/launcher_types.h"
-#include "ash/shelf/shelf_model.h"
-#include "ash/shelf/shelf_util.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/shell_test_api.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/window.h"
-
-namespace ash {
-namespace internal {
-
-class ShelfWindowWatcherTest : public test::AshTestBase {
- public:
- ShelfWindowWatcherTest() : model_(NULL) {}
- virtual ~ShelfWindowWatcherTest() {}
-
- virtual void SetUp() OVERRIDE {
- test::AshTestBase::SetUp();
- model_ = test::ShellTestApi(Shell::GetInstance()).shelf_model();
- }
-
- virtual void TearDown() OVERRIDE {
- model_ = NULL;
- test::AshTestBase::TearDown();
- }
-
- ash::LauncherID CreateLauncherItem(aura::Window* window) {
- LauncherID id = model_->next_id();
- ash::LauncherItemDetails item_details;
- item_details.type = TYPE_PLATFORM_APP;
- SetLauncherItemDetailsForWindow(window, item_details);
- return id;
- }
-
- void UpdateLauncherItem(aura::Window* window) {
- }
-
- protected:
- ShelfModel* model_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShelfWindowWatcherTest);
-};
-
-TEST_F(ShelfWindowWatcherTest, CreateAndRemoveLauncherItem) {
- // ShelfModel only has an APP_LIST item.
- EXPECT_EQ(1, model_->item_count());
-
- scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithId(0));
- scoped_ptr<aura::Window> w2(CreateTestWindowInShellWithId(0));
-
- // Create a LauncherItem for w1.
- LauncherID id_w1 = CreateLauncherItem(w1.get());
- EXPECT_EQ(2, model_->item_count());
-
- int index_w1 = model_->ItemIndexByID(id_w1);
- EXPECT_EQ(STATUS_RUNNING, model_->items()[index_w1].status);
-
- // Create a LauncherItem for w2.
- LauncherID id_w2 = CreateLauncherItem(w2.get());
- EXPECT_EQ(3, model_->item_count());
-
- int index_w2 = model_->ItemIndexByID(id_w2);
- EXPECT_EQ(STATUS_RUNNING, model_->items()[index_w2].status);
-
- // LauncherItem is removed when assoicated window is destroyed.
- ClearLauncherItemDetailsForWindow(w1.get());
- EXPECT_EQ(2, model_->item_count());
- ClearLauncherItemDetailsForWindow(w2.get());
- EXPECT_EQ(1, model_->item_count());
- // Clears twice doesn't do anything.
- ClearLauncherItemDetailsForWindow(w2.get());
- EXPECT_EQ(1, model_->item_count());
-
-}
-
-TEST_F(ShelfWindowWatcherTest, ActivateWindow) {
- // ShelfModel only have APP_LIST item.
- EXPECT_EQ(1, model_->item_count());
- scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithId(0));
- scoped_ptr<aura::Window> w2(CreateTestWindowInShellWithId(0));
-
- // Create a LauncherItem for w1.
- LauncherID id_w1 = CreateLauncherItem(w1.get());
- EXPECT_EQ(2, model_->item_count());
- int index_w1 = model_->ItemIndexByID(id_w1);
- EXPECT_EQ(STATUS_RUNNING, model_->items()[index_w1].status);
-
- // Create a LauncherItem for w2.
- LauncherID id_w2 = CreateLauncherItem(w2.get());
- EXPECT_EQ(3, model_->item_count());
- int index_w2 = model_->ItemIndexByID(id_w2);
- EXPECT_EQ(STATUS_RUNNING, model_->items()[index_w1].status);
- EXPECT_EQ(STATUS_RUNNING, model_->items()[index_w2].status);
-
- // LauncherItem for w1 is active when w1 is activated.
- wm::ActivateWindow(w1.get());
- EXPECT_EQ(STATUS_ACTIVE, model_->items()[index_w1].status);
-
- // LauncherItem for w2 is active state when w2 is activated.
- wm::ActivateWindow(w2.get());
- EXPECT_EQ(STATUS_RUNNING, model_->items()[index_w1].status);
- EXPECT_EQ(STATUS_ACTIVE, model_->items()[index_w2].status);
-}
-
-TEST_F(ShelfWindowWatcherTest, UpdateWindowProperty) {
- // ShelfModel only has an APP_LIST item.
- EXPECT_EQ(1, model_->item_count());
-
- scoped_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
-
- // Create a LauncherItem for |window|.
- LauncherID id = CreateLauncherItem(window.get());
- EXPECT_EQ(2, model_->item_count());
-
- int index = model_->ItemIndexByID(id);
- EXPECT_EQ(STATUS_RUNNING, model_->items()[index].status);
-
- // Update LauncherItem for |window|.
- LauncherItemDetails details;
- details.type = TYPE_PLATFORM_APP;
-
- SetLauncherItemDetailsForWindow(window.get(), details);
- // No new item is created after updating a launcher item.
- EXPECT_EQ(2, model_->item_count());
- // index and id are not changed after updating a launcher item.
- EXPECT_EQ(index, model_->ItemIndexByID(id));
- EXPECT_EQ(id, model_->items()[index].id);
-}
-
-TEST_F(ShelfWindowWatcherTest, MaximizeAndRestoreWindow) {
- // ShelfModel only has an APP_LIST item.
- EXPECT_EQ(1, model_->item_count());
-
- scoped_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
- wm::WindowState* window_state = wm::GetWindowState(window.get());
-
- // Create a LauncherItem for |window|.
- LauncherID id = CreateLauncherItem(window.get());
- EXPECT_EQ(2, model_->item_count());
-
- int index = model_->ItemIndexByID(id);
- EXPECT_EQ(STATUS_RUNNING, model_->items()[index].status);
-
- // Maximize window |window|.
- EXPECT_FALSE(window_state->IsMaximized());
- window_state->Maximize();
- EXPECT_TRUE(window_state->IsMaximized());
- // No new item is created after maximizing a window |window|.
- EXPECT_EQ(2, model_->item_count());
- // index and id are not changed after maximizing a window |window|.
- EXPECT_EQ(index, model_->ItemIndexByID(id));
- EXPECT_EQ(id, model_->items()[index].id);
-
- // Restore window |window|.
- window_state->Restore();
- EXPECT_FALSE(window_state->IsMaximized());
- // No new item is created after restoring a window |window|.
- EXPECT_EQ(2, model_->item_count());
- // index and id are not changed after maximizing a window |window|.
- EXPECT_EQ(index, model_->ItemIndexByID(id));
- EXPECT_EQ(id, model_->items()[index].id);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/shell.cc b/chromium/ash/shell.cc
deleted file mode 100644
index 607601db082..00000000000
--- a/chromium/ash/shell.cc
+++ /dev/null
@@ -1,1040 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell.h"
-
-#include <algorithm>
-#include <string>
-
-#include "ash/accelerators/accelerator_controller.h"
-#include "ash/accelerators/accelerator_filter.h"
-#include "ash/accelerators/focus_manager_factory.h"
-#include "ash/accelerators/nested_dispatcher_controller.h"
-#include "ash/ash_switches.h"
-#include "ash/autoclick/autoclick_controller.h"
-#include "ash/caps_lock_delegate.h"
-#include "ash/desktop_background/desktop_background_controller.h"
-#include "ash/desktop_background/desktop_background_view.h"
-#include "ash/desktop_background/user_wallpaper_delegate.h"
-#include "ash/display/display_controller.h"
-#include "ash/display/display_manager.h"
-#include "ash/display/event_transformation_handler.h"
-#include "ash/display/mouse_cursor_event_filter.h"
-#include "ash/display/resolution_notification_controller.h"
-#include "ash/display/screen_position_controller.h"
-#include "ash/display/virtual_keyboard_window_controller.h"
-#include "ash/drag_drop/drag_drop_controller.h"
-#include "ash/first_run/first_run_helper_impl.h"
-#include "ash/focus_cycler.h"
-#include "ash/high_contrast/high_contrast_controller.h"
-#include "ash/host/root_window_host_factory.h"
-#include "ash/keyboard_uma_event_filter.h"
-#include "ash/magnifier/magnification_controller.h"
-#include "ash/magnifier/partial_magnification_controller.h"
-#include "ash/media_delegate.h"
-#include "ash/new_window_delegate.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shelf/app_list_shelf_item_delegate.h"
-#include "ash/shelf/shelf_delegate.h"
-#include "ash/shelf/shelf_item_delegate.h"
-#include "ash/shelf/shelf_item_delegate_manager.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_model.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shelf/shelf_window_watcher.h"
-#include "ash/shell_delegate.h"
-#include "ash/shell_factory.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/locale/locale_notification_controller.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/wm/app_list_controller.h"
-#include "ash/wm/ash_focus_rules.h"
-#include "ash/wm/ash_native_cursor_manager.h"
-#include "ash/wm/base_layout_manager.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ash/wm/custom_frame_view_ash.h"
-#include "ash/wm/event_client_impl.h"
-#include "ash/wm/event_rewriter_event_filter.h"
-#include "ash/wm/lock_state_controller.h"
-#include "ash/wm/mru_window_tracker.h"
-#include "ash/wm/overlay_event_filter.h"
-#include "ash/wm/overview/window_selector_controller.h"
-#include "ash/wm/power_button_controller.h"
-#include "ash/wm/resize_shadow_controller.h"
-#include "ash/wm/root_window_layout_manager.h"
-#include "ash/wm/screen_dimmer.h"
-#include "ash/wm/system_gesture_event_filter.h"
-#include "ash/wm/system_modal_container_event_filter.h"
-#include "ash/wm/system_modal_container_layout_manager.h"
-#include "ash/wm/user_activity_detector.h"
-#include "ash/wm/video_detector.h"
-#include "ash/wm/window_animations.h"
-#include "ash/wm/window_cycle_controller.h"
-#include "ash/wm/window_positioner.h"
-#include "ash/wm/window_properties.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace_controller.h"
-#include "base/bind.h"
-#include "base/command_line.h"
-#include "base/debug/leak_annotations.h"
-#include "base/debug/trace_event.h"
-#include "content/public/browser/user_metrics.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/client/user_action_client.h"
-#include "ui/aura/env.h"
-#include "ui/aura/layout_manager.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/base/ui_base_switches.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animator.h"
-#include "ui/events/event_target_iterator.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/gfx/screen.h"
-#include "ui/gfx/size.h"
-#include "ui/keyboard/keyboard.h"
-#include "ui/keyboard/keyboard_controller.h"
-#include "ui/keyboard/keyboard_switches.h"
-#include "ui/keyboard/keyboard_util.h"
-#include "ui/message_center/message_center.h"
-#include "ui/views/corewm/compound_event_filter.h"
-#include "ui/views/corewm/corewm_switches.h"
-#include "ui/views/corewm/focus_controller.h"
-#include "ui/views/corewm/input_method_event_filter.h"
-#include "ui/views/corewm/shadow_controller.h"
-#include "ui/views/corewm/tooltip_aura.h"
-#include "ui/views/corewm/tooltip_controller.h"
-#include "ui/views/corewm/visibility_controller.h"
-#include "ui/views/corewm/window_modality_controller.h"
-#include "ui/views/focus/focus_manager_factory.h"
-#include "ui/views/widget/native_widget_aura.h"
-#include "ui/views/widget/widget.h"
-
-#if defined(OS_CHROMEOS)
-#if defined(USE_X11)
-#include "ash/ash_constants.h"
-#include "ash/display/display_change_observer_chromeos.h"
-#include "ash/display/display_error_observer_chromeos.h"
-#include "ash/display/output_configurator_animation.h"
-#include "base/message_loop/message_pump_x11.h"
-#include "base/sys_info.h"
-#include "chromeos/display/output_configurator.h"
-#include "content/public/browser/gpu_data_manager.h"
-#include "gpu/config/gpu_feature_type.h"
-#endif // defined(USE_X11)
-#include "ash/system/chromeos/brightness/brightness_controller_chromeos.h"
-#include "ash/system/chromeos/power/power_event_observer.h"
-#include "ash/system/chromeos/power/power_status.h"
-#include "ash/system/chromeos/power/user_activity_notifier.h"
-#include "ash/system/chromeos/power/video_activity_notifier.h"
-#include "ash/wm/sticky_keys.h"
-#endif // defined(OS_CHROMEOS)
-
-namespace ash {
-
-namespace {
-
-using aura::Window;
-using views::Widget;
-
-// A Corewm VisibilityController subclass that calls the Ash animation routine
-// so we can pick up our extended animations. See ash/wm/window_animations.h.
-class AshVisibilityController : public views::corewm::VisibilityController {
- public:
- AshVisibilityController() {}
- virtual ~AshVisibilityController() {}
-
- private:
- // Overridden from views::corewm::VisibilityController:
- virtual bool CallAnimateOnChildWindowVisibilityChanged(
- aura::Window* window,
- bool visible) OVERRIDE {
- return AnimateOnChildWindowVisibilityChanged(window, visible);
- }
-
- DISALLOW_COPY_AND_ASSIGN(AshVisibilityController);
-};
-
-} // namespace
-
-// static
-Shell* Shell::instance_ = NULL;
-// static
-bool Shell::initially_hide_cursor_ = false;
-
-////////////////////////////////////////////////////////////////////////////////
-// Shell, public:
-
-// static
-Shell* Shell::CreateInstance(ShellDelegate* delegate) {
- CHECK(!instance_);
- instance_ = new Shell(delegate);
- instance_->Init();
- return instance_;
-}
-
-// static
-Shell* Shell::GetInstance() {
- DCHECK(instance_);
- return instance_;
-}
-
-// static
-bool Shell::HasInstance() {
- return !!instance_;
-}
-
-// static
-void Shell::DeleteInstance() {
- delete instance_;
- instance_ = NULL;
-}
-
-// static
-internal::RootWindowController* Shell::GetPrimaryRootWindowController() {
- return internal::GetRootWindowController(GetPrimaryRootWindow());
-}
-
-// static
-Shell::RootWindowControllerList Shell::GetAllRootWindowControllers() {
- return Shell::GetInstance()->display_controller()->
- GetAllRootWindowControllers();
-}
-
-// static
-aura::Window* Shell::GetPrimaryRootWindow() {
- return GetInstance()->display_controller()->GetPrimaryRootWindow();
-}
-
-// static
-aura::Window* Shell::GetTargetRootWindow() {
- Shell* shell = GetInstance();
- if (shell->scoped_target_root_window_)
- return shell->scoped_target_root_window_;
- return shell->target_root_window_;
-}
-
-// static
-gfx::Screen* Shell::GetScreen() {
- return gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_ALTERNATE);
-}
-
-// static
-aura::Window::Windows Shell::GetAllRootWindows() {
- return Shell::GetInstance()->display_controller()->
- GetAllRootWindows();
-}
-
-// static
-aura::Window* Shell::GetContainer(aura::Window* root_window,
- int container_id) {
- return root_window->GetChildById(container_id);
-}
-
-// static
-const aura::Window* Shell::GetContainer(const aura::Window* root_window,
- int container_id) {
- return root_window->GetChildById(container_id);
-}
-
-// static
-std::vector<aura::Window*> Shell::GetContainersFromAllRootWindows(
- int container_id,
- aura::Window* priority_root) {
- std::vector<aura::Window*> containers;
- aura::Window::Windows root_windows = GetAllRootWindows();
- for (aura::Window::Windows::const_iterator it = root_windows.begin();
- it != root_windows.end(); ++it) {
- aura::Window* container = (*it)->GetChildById(container_id);
- if (container) {
- if (priority_root && priority_root->Contains(container))
- containers.insert(containers.begin(), container);
- else
- containers.push_back(container);
- }
- }
- return containers;
-}
-
-void Shell::ShowContextMenu(const gfx::Point& location_in_screen,
- ui::MenuSourceType source_type) {
- // No context menus if there is no session with an active user.
- if (!session_state_delegate_->NumberOfLoggedInUsers())
- return;
- // No context menus when screen is locked.
- if (session_state_delegate_->IsScreenLocked())
- return;
-
- aura::Window* root =
- wm::GetRootWindowMatching(gfx::Rect(location_in_screen, gfx::Size()));
- internal::GetRootWindowController(root)->
- ShowContextMenu(location_in_screen, source_type);
-}
-
-void Shell::ToggleAppList(aura::Window* window) {
- // If the context window is not given, show it on the target root window.
- if (!window)
- window = GetTargetRootWindow();
- if (!app_list_controller_)
- app_list_controller_.reset(new internal::AppListController);
- app_list_controller_->SetVisible(!app_list_controller_->IsVisible(), window);
-}
-
-bool Shell::GetAppListTargetVisibility() const {
- return app_list_controller_.get() &&
- app_list_controller_->GetTargetVisibility();
-}
-
-aura::Window* Shell::GetAppListWindow() {
- return app_list_controller_.get() ? app_list_controller_->GetWindow() : NULL;
-}
-
-app_list::AppListView* Shell::GetAppListView() {
- return app_list_controller_.get() ? app_list_controller_->GetView() : NULL;
-}
-
-bool Shell::IsSystemModalWindowOpen() const {
- if (simulate_modal_window_open_for_testing_)
- return true;
- const std::vector<aura::Window*> containers = GetContainersFromAllRootWindows(
- internal::kShellWindowId_SystemModalContainer, NULL);
- for (std::vector<aura::Window*>::const_iterator cit = containers.begin();
- cit != containers.end(); ++cit) {
- for (aura::Window::Windows::const_iterator wit = (*cit)->children().begin();
- wit != (*cit)->children().end(); ++wit) {
- if ((*wit)->GetProperty(aura::client::kModalKey) ==
- ui::MODAL_TYPE_SYSTEM && (*wit)->TargetVisibility()) {
- return true;
- }
- }
- }
- return false;
-}
-
-views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView(
- views::Widget* widget) {
- // Use translucent-style window frames for dialogs.
- return new CustomFrameViewAsh(widget);
-}
-
-void Shell::RotateFocus(Direction direction) {
- focus_cycler_->RotateFocus(
- direction == FORWARD ? internal::FocusCycler::FORWARD :
- internal::FocusCycler::BACKWARD);
-}
-
-void Shell::SetDisplayWorkAreaInsets(Window* contains,
- const gfx::Insets& insets) {
- if (!display_controller_->UpdateWorkAreaOfDisplayNearestWindow(
- contains, insets)) {
- return;
- }
- FOR_EACH_OBSERVER(ShellObserver, observers_,
- OnDisplayWorkAreaInsetsChanged());
-}
-
-void Shell::OnLoginStateChanged(user::LoginStatus status) {
- FOR_EACH_OBSERVER(ShellObserver, observers_, OnLoginStateChanged(status));
-}
-
-void Shell::OnLoginUserProfilePrepared() {
- CreateLauncher();
- CreateKeyboard();
-}
-
-void Shell::UpdateAfterLoginStatusChange(user::LoginStatus status) {
- RootWindowControllerList controllers = GetAllRootWindowControllers();
- for (RootWindowControllerList::iterator iter = controllers.begin();
- iter != controllers.end(); ++iter)
- (*iter)->UpdateAfterLoginStatusChange(status);
-}
-
-void Shell::OnAppTerminating() {
- FOR_EACH_OBSERVER(ShellObserver, observers_, OnAppTerminating());
-}
-
-void Shell::OnLockStateChanged(bool locked) {
- FOR_EACH_OBSERVER(ShellObserver, observers_, OnLockStateChanged(locked));
-#ifndef NDEBUG
- // Make sure that there is no system modal in Lock layer when unlocked.
- if (!locked) {
- std::vector<aura::Window*> containers = GetContainersFromAllRootWindows(
- internal::kShellWindowId_LockSystemModalContainer,
- GetPrimaryRootWindow());
- for (std::vector<aura::Window*>::const_iterator iter = containers.begin();
- iter != containers.end(); ++iter) {
- DCHECK_EQ(0u, (*iter)->children().size());
- }
- }
-#endif
-}
-
-void Shell::CreateLauncher() {
- RootWindowControllerList controllers = GetAllRootWindowControllers();
- for (RootWindowControllerList::iterator iter = controllers.begin();
- iter != controllers.end(); ++iter)
- (*iter)->shelf()->CreateLauncher();
-}
-
-void Shell::CreateKeyboard() {
- // TODO(bshe): Primary root window controller may not be the controller to
- // attach virtual keyboard. See http://crbug.com/303429
- InitKeyboard();
- if (keyboard::IsKeyboardUsabilityExperimentEnabled()) {
- display_controller()->virtual_keyboard_window_controller()->
- ActivateKeyboard(keyboard_controller_.get());
- } else {
- GetPrimaryRootWindowController()->
- ActivateKeyboard(keyboard_controller_.get());
- }
-}
-
-void Shell::ShowLauncher() {
- RootWindowControllerList controllers = GetAllRootWindowControllers();
- for (RootWindowControllerList::iterator iter = controllers.begin();
- iter != controllers.end(); ++iter)
- (*iter)->ShowLauncher();
-}
-
-void Shell::AddShellObserver(ShellObserver* observer) {
- observers_.AddObserver(observer);
-}
-
-void Shell::RemoveShellObserver(ShellObserver* observer) {
- observers_.RemoveObserver(observer);
-}
-
-void Shell::UpdateShelfVisibility() {
- RootWindowControllerList controllers = GetAllRootWindowControllers();
- for (RootWindowControllerList::iterator iter = controllers.begin();
- iter != controllers.end(); ++iter)
- if ((*iter)->shelf())
- (*iter)->UpdateShelfVisibility();
-}
-
-void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior,
- aura::Window* root_window) {
- ash::internal::ShelfLayoutManager::ForLauncher(root_window)->
- SetAutoHideBehavior(behavior);
-}
-
-ShelfAutoHideBehavior Shell::GetShelfAutoHideBehavior(
- aura::Window* root_window) const {
- return ash::internal::ShelfLayoutManager::ForLauncher(root_window)->
- auto_hide_behavior();
-}
-
-void Shell::SetShelfAlignment(ShelfAlignment alignment,
- aura::Window* root_window) {
- if (ash::internal::ShelfLayoutManager::ForLauncher(root_window)->
- SetAlignment(alignment)) {
- FOR_EACH_OBSERVER(
- ShellObserver, observers_, OnShelfAlignmentChanged(root_window));
- }
-}
-
-ShelfAlignment Shell::GetShelfAlignment(aura::Window* root_window) {
- return internal::GetRootWindowController(root_window)->
- GetShelfLayoutManager()->GetAlignment();
-}
-
-void Shell::SetDimming(bool should_dim) {
- RootWindowControllerList controllers = GetAllRootWindowControllers();
- for (RootWindowControllerList::iterator iter = controllers.begin();
- iter != controllers.end(); ++iter)
- (*iter)->screen_dimmer()->SetDimming(should_dim);
-}
-
-void Shell::NotifyFullscreenStateChange(bool is_fullscreen,
- aura::Window* root_window) {
- FOR_EACH_OBSERVER(ShellObserver, observers_, OnFullscreenStateChanged(
- is_fullscreen, root_window));
-}
-
-void Shell::CreateModalBackground(aura::Window* window) {
- if (!modality_filter_) {
- modality_filter_.reset(new internal::SystemModalContainerEventFilter(this));
- AddPreTargetHandler(modality_filter_.get());
- }
- RootWindowControllerList controllers = GetAllRootWindowControllers();
- for (RootWindowControllerList::iterator iter = controllers.begin();
- iter != controllers.end(); ++iter)
- (*iter)->GetSystemModalLayoutManager(window)->CreateModalBackground();
-}
-
-void Shell::OnModalWindowRemoved(aura::Window* removed) {
- RootWindowControllerList controllers = GetAllRootWindowControllers();
- bool activated = false;
- for (RootWindowControllerList::iterator iter = controllers.begin();
- iter != controllers.end() && !activated; ++iter) {
- activated = (*iter)->GetSystemModalLayoutManager(removed)->
- ActivateNextModalWindow();
- }
- if (!activated) {
- RemovePreTargetHandler(modality_filter_.get());
- modality_filter_.reset();
- for (RootWindowControllerList::iterator iter = controllers.begin();
- iter != controllers.end(); ++iter)
- (*iter)->GetSystemModalLayoutManager(removed)->DestroyModalBackground();
- }
-}
-
-WebNotificationTray* Shell::GetWebNotificationTray() {
- return GetPrimaryRootWindowController()->shelf()->
- status_area_widget()->web_notification_tray();
-}
-
-bool Shell::HasPrimaryStatusArea() {
- ShelfWidget* shelf = GetPrimaryRootWindowController()->shelf();
- return shelf && shelf->status_area_widget();
-}
-
-SystemTray* Shell::GetPrimarySystemTray() {
- return GetPrimaryRootWindowController()->GetSystemTray();
-}
-
-ShelfDelegate* Shell::GetShelfDelegate() {
- if (!shelf_delegate_) {
- shelf_model_.reset(new ShelfModel);
- // Creates ShelfItemDelegateManager before ShelfDelegate.
- shelf_item_delegate_manager_.reset(
- new ShelfItemDelegateManager(shelf_model_.get()));
-
- shelf_delegate_.reset(delegate_->CreateShelfDelegate(shelf_model_.get()));
- scoped_ptr<ShelfItemDelegate> controller(
- new internal::AppListShelfItemDelegate);
-
- // Finding the shelf model's location of the app list and setting its
- // ShelfItemDelegate.
- int app_list_index = shelf_model_->GetItemIndexForType(TYPE_APP_LIST);
- DCHECK_GE(app_list_index, 0);
- LauncherID app_list_id = shelf_model_->items()[app_list_index].id;
- DCHECK(app_list_id);
- shelf_item_delegate_manager_->SetShelfItemDelegate(app_list_id,
- controller.Pass());
- shelf_window_watcher_.reset(new internal::ShelfWindowWatcher(
- shelf_model_.get(),
- shelf_item_delegate_manager_.get()));
- }
- return shelf_delegate_.get();
-}
-
-void Shell::SetTouchHudProjectionEnabled(bool enabled) {
- if (is_touch_hud_projection_enabled_ == enabled)
- return;
-
- is_touch_hud_projection_enabled_ = enabled;
- FOR_EACH_OBSERVER(ShellObserver, observers_,
- OnTouchHudProjectionToggled(enabled));
-}
-
-#if defined(OS_CHROMEOS)
-ash::FirstRunHelper* Shell::CreateFirstRunHelper() {
- return new ash::FirstRunHelperImpl;
-}
-#endif // defined(OS_CHROMEOS)
-
-void Shell::DoInitialWorkspaceAnimation() {
- return GetPrimaryRootWindowController()->workspace_controller()->
- DoInitialAnimation();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Shell, private:
-
-Shell::Shell(ShellDelegate* delegate)
- : screen_(new ScreenAsh),
- target_root_window_(NULL),
- scoped_target_root_window_(NULL),
- delegate_(delegate),
- window_positioner_(new WindowPositioner),
- activation_client_(NULL),
-#if defined(OS_CHROMEOS) && defined(USE_X11)
- output_configurator_(new chromeos::OutputConfigurator()),
-#endif // defined(OS_CHROMEOS) && defined(USE_X11)
- native_cursor_manager_(new AshNativeCursorManager),
- cursor_manager_(scoped_ptr<views::corewm::NativeCursorManager>(
- native_cursor_manager_)),
- simulate_modal_window_open_for_testing_(false),
- is_touch_hud_projection_enabled_(false) {
- DCHECK(delegate_.get());
- display_manager_.reset(new internal::DisplayManager);
-
- ANNOTATE_LEAKING_OBJECT_PTR(screen_); // see crbug.com/156466
- gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_);
- if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE))
- gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_);
- display_controller_.reset(new DisplayController);
-#if defined(OS_CHROMEOS) && defined(USE_X11)
- bool is_panel_fitting_disabled =
- content::GpuDataManager::GetInstance()->IsFeatureBlacklisted(
- gpu::GPU_FEATURE_TYPE_PANEL_FITTING);
-
- output_configurator_->Init(!is_panel_fitting_disabled);
- user_metrics_recorder_.reset(new UserMetricsRecorder);
-
- base::MessagePumpX11::Current()->AddDispatcherForRootWindow(
- output_configurator());
- // We can't do this with a root window listener because XI_HierarchyChanged
- // messages don't have a target window.
- base::MessagePumpX11::Current()->AddObserver(output_configurator());
-#endif // defined(OS_CHROMEOS)
-
-#if defined(OS_CHROMEOS)
- internal::PowerStatus::Initialize();
-#endif
-}
-
-Shell::~Shell() {
- TRACE_EVENT0("shutdown", "ash::Shell::Destructor");
-
- views::FocusManagerFactory::Install(NULL);
-
- // Remove the focus from any window. This will prevent overhead and side
- // effects (e.g. crashes) from changing focus during shutdown.
- // See bug crbug.com/134502.
- aura::client::GetFocusClient(GetPrimaryRootWindow())->FocusWindow(NULL);
-
- // Please keep in same order as in Init() because it's easy to miss one.
- if (window_modality_controller_)
- window_modality_controller_.reset();
- RemovePreTargetHandler(event_rewriter_filter_.get());
- RemovePreTargetHandler(user_activity_detector_.get());
- RemovePreTargetHandler(overlay_filter_.get());
- RemovePreTargetHandler(input_method_filter_.get());
- if (mouse_cursor_filter_)
- RemovePreTargetHandler(mouse_cursor_filter_.get());
- RemovePreTargetHandler(system_gesture_filter_.get());
- RemovePreTargetHandler(keyboard_metrics_filter_.get());
- RemovePreTargetHandler(event_transformation_handler_.get());
- RemovePreTargetHandler(accelerator_filter_.get());
-
- // TooltipController is deleted with the Shell so removing its references.
- RemovePreTargetHandler(tooltip_controller_.get());
-
- // AppList needs to be released before shelf layout manager, which is
- // destroyed with launcher container in the loop below. However, app list
- // container is now on top of launcher container and released after it.
- // TODO(xiyuan): Move it back when app list container is no longer needed.
- app_list_controller_.reset();
-
- // Destroy SystemTrayDelegate before destroying the status area(s).
- system_tray_delegate_->Shutdown();
- system_tray_delegate_.reset();
-
- locale_notification_controller_.reset();
-
- // Drag-and-drop must be canceled prior to close all windows.
- drag_drop_controller_.reset();
-
- // Controllers who have WindowObserver added must be deleted
- // before |display_controller_| is deleted.
-
-#if defined(OS_CHROMEOS)
- // VideoActivityNotifier must be deleted before |video_detector_| is
- // deleted because it's observing video activity through
- // VideoDetectorObserver interface.
- video_activity_notifier_.reset();
-#endif // defined(OS_CHROMEOS)
- video_detector_.reset();
-
- shadow_controller_.reset();
- resize_shadow_controller_.reset();
-
- window_selector_controller_.reset();
- window_cycle_controller_.reset();
- mru_window_tracker_.reset();
-
- // |shelf_window_watcher_| has a weak pointer to |shelf_Model_|
- // and has window observers.
- shelf_window_watcher_.reset();
-
- // Destroy all child windows including widgets.
- display_controller_->CloseChildWindows();
- display_controller_->CloseNonDesktopDisplay();
-
- // Chrome implementation of shelf delegate depends on FocusClient,
- // so must be deleted before |focus_client_|.
- shelf_delegate_.reset();
- focus_client_.reset();
-
- // Destroy SystemTrayNotifier after destroying SystemTray as TrayItems
- // needs to remove observers from it.
- system_tray_notifier_.reset();
-
- // These need a valid Shell instance to clean up properly, so explicitly
- // delete them before invalidating the instance.
- // Alphabetical. TODO(oshima): sort.
- magnification_controller_.reset();
- partial_magnification_controller_.reset();
- tooltip_controller_.reset();
- event_client_.reset();
- nested_dispatcher_controller_.reset();
- user_action_client_.reset();
- visibility_controller_.reset();
- // |shelf_item_delegate_manager_| observes |shelf_model_|. It must be
- // destroyed before |shelf_model_| is destroyed.
- shelf_item_delegate_manager_.reset();
- shelf_model_.reset();
-
- power_button_controller_.reset();
- lock_state_controller_.reset();
-
- resolution_notification_controller_.reset();
- desktop_background_controller_.reset();
-
- // This also deletes all RootWindows. Note that we invoke Shutdown() on
- // DisplayController before resetting |display_controller_|, since destruction
- // of its owned RootWindowControllers relies on the value.
- display_controller_->Shutdown();
- display_controller_.reset();
- screen_position_controller_.reset();
-
- keyboard_controller_.reset();
- accessibility_delegate_.reset();
- new_window_delegate_.reset();
- media_delegate_.reset();
-
-#if defined(OS_CHROMEOS) && defined(USE_X11)
- if (display_change_observer_)
- output_configurator_->RemoveObserver(display_change_observer_.get());
- if (output_configurator_animation_)
- output_configurator_->RemoveObserver(output_configurator_animation_.get());
- if (display_error_observer_)
- output_configurator_->RemoveObserver(display_error_observer_.get());
- base::MessagePumpX11::Current()->RemoveDispatcherForRootWindow(
- output_configurator());
- base::MessagePumpX11::Current()->RemoveObserver(output_configurator());
- display_change_observer_.reset();
-#endif // defined(OS_CHROMEOS)
-
-#if defined(OS_CHROMEOS)
- internal::PowerStatus::Shutdown();
-#endif
-
- DCHECK(instance_ == this);
- instance_ = NULL;
-}
-
-void Shell::Init() {
- CommandLine* command_line = CommandLine::ForCurrentProcess();
-
- delegate_->PreInit();
- if (keyboard::IsKeyboardUsabilityExperimentEnabled()) {
- display_manager_->SetSecondDisplayMode(
- internal::DisplayManager::VIRTUAL_KEYBOARD);
- }
- bool display_initialized = display_manager_->InitFromCommandLine();
-#if defined(OS_CHROMEOS) && defined(USE_X11)
- output_configurator_animation_.reset(
- new internal::OutputConfiguratorAnimation());
- output_configurator_->AddObserver(output_configurator_animation_.get());
-
- if (!display_initialized && base::SysInfo::IsRunningOnChromeOS()) {
- display_change_observer_.reset(new internal::DisplayChangeObserver);
- // Register |display_change_observer_| first so that the rest of
- // observer gets invoked after the root windows are configured.
- output_configurator_->AddObserver(display_change_observer_.get());
- display_error_observer_.reset(new internal::DisplayErrorObserver());
- output_configurator_->AddObserver(display_error_observer_.get());
- output_configurator_->set_state_controller(display_change_observer_.get());
- output_configurator_->set_mirroring_controller(display_manager_.get());
- output_configurator_->Start(
- delegate_->IsFirstRunAfterBoot() ? kChromeOsBootColor : 0);
- display_initialized = true;
- }
-#endif // defined(OS_CHROMEOS) && defined(USE_X11)
- if (!display_initialized)
- display_manager_->InitDefaultDisplay();
-
- // Install the custom factory first so that views::FocusManagers for Tray,
- // Launcher, and WallPaper could be created by the factory.
- views::FocusManagerFactory::Install(new AshFocusManagerFactory);
-
- // Env creates the compositor. Historically it seems to have been implicitly
- // initialized first by the ActivationController, but now that FocusController
- // no longer does this we need to do it explicitly.
- aura::Env::CreateInstance();
-
- // The WindowModalityController needs to be at the front of the input event
- // pretarget handler list to ensure that it processes input events when modal
- // windows are active.
- window_modality_controller_.reset(
- new views::corewm::WindowModalityController(this));
-
- AddPreTargetHandler(this);
-
- env_filter_.reset(new views::corewm::CompoundEventFilter);
- AddPreTargetHandler(env_filter_.get());
-
- views::corewm::FocusController* focus_controller =
- new views::corewm::FocusController(new wm::AshFocusRules);
- focus_client_.reset(focus_controller);
- activation_client_ = focus_controller;
- activation_client_->AddObserver(this);
- focus_cycler_.reset(new internal::FocusCycler());
-
- screen_position_controller_.reset(new internal::ScreenPositionController);
- root_window_host_factory_.reset(delegate_->CreateRootWindowHostFactory());
-
- display_controller_->Start();
- display_controller_->InitPrimaryDisplay();
- aura::Window* root_window = display_controller_->GetPrimaryRootWindow();
- target_root_window_ = root_window;
-
- resolution_notification_controller_.reset(
- new internal::ResolutionNotificationController);
-
- cursor_manager_.SetDisplay(DisplayController::GetPrimaryDisplay());
-
- nested_dispatcher_controller_.reset(new NestedDispatcherController);
- accelerator_controller_.reset(new AcceleratorController);
-
- // The order in which event filters are added is significant.
- event_rewriter_filter_.reset(new internal::EventRewriterEventFilter);
- AddPreTargetHandler(event_rewriter_filter_.get());
-
-#if defined(OS_CHROMEOS)
- // The StickyKeys event filter also rewrites events and must be added
- // before observers, but after the EventRewriterEventFilter.
- sticky_keys_.reset(new StickyKeys);
- AddPreTargetHandler(sticky_keys_.get());
-#endif
-
- // UserActivityDetector passes events to observers, so let them get
- // rewritten first.
- user_activity_detector_.reset(new UserActivityDetector);
- AddPreTargetHandler(user_activity_detector_.get());
-
- overlay_filter_.reset(new internal::OverlayEventFilter);
- AddPreTargetHandler(overlay_filter_.get());
- AddShellObserver(overlay_filter_.get());
-
- input_method_filter_.reset(new views::corewm::InputMethodEventFilter(
- root_window->GetDispatcher()->host()->GetAcceleratedWidget()));
- AddPreTargetHandler(input_method_filter_.get());
-
- accelerator_filter_.reset(new internal::AcceleratorFilter);
- AddPreTargetHandler(accelerator_filter_.get());
-
- event_transformation_handler_.reset(new internal::EventTransformationHandler);
- AddPreTargetHandler(event_transformation_handler_.get());
-
- system_gesture_filter_.reset(new internal::SystemGestureEventFilter);
- AddPreTargetHandler(system_gesture_filter_.get());
-
- keyboard_metrics_filter_.reset(new internal::KeyboardUMAEventFilter);
- AddPreTargetHandler(keyboard_metrics_filter_.get());
-
- // The keyboard system must be initialized before the RootWindowController is
- // created.
- if (keyboard::IsKeyboardEnabled())
- keyboard::InitializeKeyboard();
-
- lock_state_controller_.reset(new LockStateController);
- power_button_controller_.reset(new PowerButtonController(
- lock_state_controller_.get()));
- AddShellObserver(lock_state_controller_.get());
-
- drag_drop_controller_.reset(new internal::DragDropController);
- mouse_cursor_filter_.reset(new internal::MouseCursorEventFilter());
- PrependPreTargetHandler(mouse_cursor_filter_.get());
-
- // Create Controllers that may need root window.
- // TODO(oshima): Move as many controllers before creating
- // RootWindowController as possible.
- visibility_controller_.reset(new AshVisibilityController);
- user_action_client_.reset(delegate_->CreateUserActionClient());
-
- magnification_controller_.reset(
- MagnificationController::CreateInstance());
- mru_window_tracker_.reset(new MruWindowTracker(activation_client_));
-
- partial_magnification_controller_.reset(
- new PartialMagnificationController());
-
- autoclick_controller_.reset(AutoclickController::CreateInstance());
-
- high_contrast_controller_.reset(new HighContrastController);
- video_detector_.reset(new VideoDetector);
- window_cycle_controller_.reset(new WindowCycleController());
- window_selector_controller_.reset(new WindowSelectorController());
-
- tooltip_controller_.reset(
- new views::corewm::TooltipController(
- scoped_ptr<views::corewm::Tooltip>(
- new views::corewm::TooltipAura(gfx::SCREEN_TYPE_ALTERNATE))));
- AddPreTargetHandler(tooltip_controller_.get());
-
- event_client_.reset(new internal::EventClientImpl);
-
- // This controller needs to be set before SetupManagedWindowMode.
- desktop_background_controller_.reset(new DesktopBackgroundController());
- user_wallpaper_delegate_.reset(delegate_->CreateUserWallpaperDelegate());
-
- // StatusAreaWidget uses Shell's CapsLockDelegate.
- caps_lock_delegate_.reset(delegate_->CreateCapsLockDelegate());
-
- session_state_delegate_.reset(delegate_->CreateSessionStateDelegate());
- accessibility_delegate_.reset(delegate_->CreateAccessibilityDelegate());
- new_window_delegate_.reset(delegate_->CreateNewWindowDelegate());
- media_delegate_.reset(delegate_->CreateMediaDelegate());
-
- if (!command_line->HasSwitch(views::corewm::switches::kNoDropShadows)) {
- resize_shadow_controller_.reset(new internal::ResizeShadowController());
- shadow_controller_.reset(
- new views::corewm::ShadowController(activation_client_));
- }
-
- // Create system_tray_notifier_ before the delegate.
- system_tray_notifier_.reset(new ash::SystemTrayNotifier());
-
- // Initialize system_tray_delegate_ before initializing StatusAreaWidget.
- system_tray_delegate_.reset(delegate()->CreateSystemTrayDelegate());
- DCHECK(system_tray_delegate_.get());
-
- locale_notification_controller_.reset(
- new internal::LocaleNotificationController);
-
- // Initialize system_tray_delegate_ after StatusAreaWidget is created.
- system_tray_delegate_->Initialize();
-
- // TODO(oshima): Initialize all RootWindowControllers once, and
- // initialize controller/delegates above when initializing the
- // primary root window controller.
- internal::RootWindowController::CreateForPrimaryDisplay(
- root_window->GetDispatcher());
-
- display_controller_->InitSecondaryDisplays();
-
- // It needs to be created after RootWindowController has been created
- // (which calls OnWindowResized has been called, otherwise the
- // widget will not paint when restoring after a browser crash. Also it needs
- // to be created after InitSecondaryDisplays() to initialize the wallpapers in
- // the correct size.
- user_wallpaper_delegate_->InitializeWallpaper();
-
- if (initially_hide_cursor_)
- cursor_manager_.HideCursor();
- cursor_manager_.SetCursor(ui::kCursorPointer);
-
-#if defined(OS_CHROMEOS)
- // Set accelerator controller delegates.
- accelerator_controller_->SetBrightnessControlDelegate(
- scoped_ptr<ash::BrightnessControlDelegate>(
- new ash::system::BrightnessControllerChromeos).Pass());
-
- power_event_observer_.reset(new internal::PowerEventObserver());
- user_activity_notifier_.reset(
- new internal::UserActivityNotifier(user_activity_detector_.get()));
- video_activity_notifier_.reset(
- new internal::VideoActivityNotifier(video_detector_.get()));
-#endif
-
- weak_display_manager_factory_.reset(
- new base::WeakPtrFactory<internal::DisplayManager>(
- display_manager_.get()));
- // The compositor thread and main message loop have to be running in
- // order to create mirror window. Run it after the main message loop
- // is started.
- base::MessageLoopForUI::current()->PostTask(
- FROM_HERE,
- base::Bind(&internal::DisplayManager::CreateMirrorWindowIfAny,
- weak_display_manager_factory_->GetWeakPtr()));
-}
-
-void Shell::InitKeyboard() {
- if (keyboard::IsKeyboardEnabled()) {
- if (keyboard_controller_.get()) {
- RootWindowControllerList controllers = GetAllRootWindowControllers();
- for (RootWindowControllerList::iterator iter = controllers.begin();
- iter != controllers.end(); ++iter) {
- (*iter)->DeactivateKeyboard(keyboard_controller_.get());
- }
- }
- keyboard::KeyboardControllerProxy* proxy =
- delegate_->CreateKeyboardControllerProxy();
- keyboard_controller_.reset(
- new keyboard::KeyboardController(proxy));
- }
-}
-
-void Shell::InitRootWindow(aura::Window* root_window) {
- DCHECK(activation_client_);
- DCHECK(visibility_controller_.get());
- DCHECK(drag_drop_controller_.get());
- DCHECK(window_cycle_controller_.get());
-
- aura::client::SetFocusClient(root_window, focus_client_.get());
- input_method_filter_->SetInputMethodPropertyInRootWindow(root_window);
- aura::client::SetActivationClient(root_window, activation_client_);
- views::corewm::FocusController* focus_controller =
- static_cast<views::corewm::FocusController*>(activation_client_);
- root_window->AddPreTargetHandler(focus_controller);
- aura::client::SetVisibilityClient(root_window, visibility_controller_.get());
- aura::client::SetDragDropClient(root_window, drag_drop_controller_.get());
- aura::client::SetScreenPositionClient(root_window,
- screen_position_controller_.get());
- aura::client::SetCursorClient(root_window, &cursor_manager_);
- aura::client::SetTooltipClient(root_window, tooltip_controller_.get());
- aura::client::SetEventClient(root_window, event_client_.get());
-
- if (nested_dispatcher_controller_) {
- aura::client::SetDispatcherClient(root_window,
- nested_dispatcher_controller_.get());
- }
- if (user_action_client_)
- aura::client::SetUserActionClient(root_window, user_action_client_.get());
-}
-
-bool Shell::CanWindowReceiveEvents(aura::Window* window) {
- RootWindowControllerList controllers = GetAllRootWindowControllers();
- for (RootWindowControllerList::iterator iter = controllers.begin();
- iter != controllers.end(); ++iter) {
- internal::SystemModalContainerLayoutManager* layout_manager =
- (*iter)->GetSystemModalLayoutManager(window);
- if (layout_manager && layout_manager->CanWindowReceiveEvents(window))
- return true;
- }
- return false;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Shell, ui::EventTarget overrides:
-
-bool Shell::CanAcceptEvent(const ui::Event& event) {
- return true;
-}
-
-ui::EventTarget* Shell::GetParentTarget() {
- return aura::Env::GetInstance();
-}
-
-scoped_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const {
- return scoped_ptr<ui::EventTargetIterator>();
-}
-
-ui::EventTargeter* Shell::GetEventTargeter() {
- NOTREACHED();
- return NULL;
-}
-
-void Shell::OnEvent(ui::Event* event) {
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Shell, aura::client::ActivationChangeObserver implementation:
-
-void Shell::OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) {
- if (gained_active)
- target_root_window_ = gained_active->GetRootWindow();
-}
-
-} // namespace ash
diff --git a/chromium/ash/shell.h b/chromium/ash/shell.h
deleted file mode 100644
index 339c68c0200..00000000000
--- a/chromium/ash/shell.h
+++ /dev/null
@@ -1,711 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_H_
-#define ASH_SHELL_H_
-
-#include <utility>
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/system/user/login_status.h"
-#include "ash/wm/system_modal_container_event_filter_delegate.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/gtest_prod_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "base/observer_list.h"
-#include "ui/aura/client/activation_change_observer.h"
-#include "ui/aura/window.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/events/event_target.h"
-#include "ui/gfx/insets.h"
-#include "ui/gfx/screen.h"
-#include "ui/gfx/size.h"
-#include "ui/views/corewm/cursor_manager.h"
-
-class CommandLine;
-
-namespace app_list {
-class AppListView;
-}
-namespace aura {
-class EventFilter;
-class RootWindow;
-class Window;
-namespace client {
-class ActivationClient;
-class FocusClient;
-class UserActionClient;
-}
-}
-namespace chromeos {
-class OutputConfigurator;
-}
-
-namespace gfx {
-class ImageSkia;
-class Point;
-class Rect;
-}
-
-namespace keyboard {
-class KeyboardController;
-}
-
-namespace ui {
-class Layer;
-}
-namespace views {
-class NonClientFrameView;
-class Widget;
-namespace corewm {
-class CompoundEventFilter;
-class InputMethodEventFilter;
-class ShadowController;
-class TooltipController;
-class VisibilityController;
-class WindowModalityController;
-}
-}
-
-namespace ash {
-
-class AcceleratorController;
-class AccessibilityDelegate;
-class AshNativeCursorManager;
-class AutoclickController;
-class CapsLockDelegate;
-class DesktopBackgroundController;
-class DisplayController;
-class FirstRunHelper;
-class HighContrastController;
-class Launcher;
-class ShelfDelegate;
-class LockStateController;
-class MagnificationController;
-class MediaDelegate;
-class MruWindowTracker;
-class NestedDispatcherController;
-class NewWindowDelegate;
-class PartialMagnificationController;
-class PowerButtonController;
-class RootWindowHostFactory;
-class ScreenAsh;
-class SessionStateDelegate;
-class ShelfItemDelegateManager;
-class ShelfModel;
-class ShellDelegate;
-class ShellObserver;
-class StickyKeys;
-class SystemTray;
-class SystemTrayDelegate;
-class SystemTrayNotifier;
-class UserActivityDetector;
-class UserWallpaperDelegate;
-class VideoDetector;
-class WebNotificationTray;
-class WindowCycleController;
-class WindowPositioner;
-class WindowSelectorController;
-
-namespace internal {
-class AcceleratorFilter;
-class AppListController;
-class CaptureController;
-class DisplayChangeObserver;
-class DisplayErrorObserver;
-class DisplayManager;
-class DragDropController;
-class EventClientImpl;
-class EventRewriterEventFilter;
-class EventTransformationHandler;
-class FocusCycler;
-class KeyboardUMAEventFilter;
-class LocaleNotificationController;
-class MouseCursorEventFilter;
-class OutputConfiguratorAnimation;
-class OverlayEventFilter;
-class PowerEventObserver;
-class ResizeShadowController;
-class ResolutionNotificationController;
-class RootWindowController;
-class ScopedTargetRootWindow;
-class ScreenPositionController;
-class ShelfWindowWatcher;
-class SlowAnimationEventFilter;
-class StatusAreaWidget;
-class SystemGestureEventFilter;
-class SystemModalContainerEventFilter;
-class TouchObserverHUD;
-class UserActivityNotifier;
-class VideoActivityNotifier;
-}
-
-namespace shell {
-class WindowWatcher;
-}
-
-namespace test {
-class ShellTestApi;
-}
-
-// Shell is a singleton object that presents the Shell API and implements the
-// RootWindow's delegate interface.
-//
-// Upon creation, the Shell sets itself as the RootWindow's delegate, which
-// takes ownership of the Shell.
-class ASH_EXPORT Shell
- : public internal::SystemModalContainerEventFilterDelegate,
- public ui::EventTarget,
- public aura::client::ActivationChangeObserver {
- public:
- typedef std::vector<internal::RootWindowController*> RootWindowControllerList;
-
- enum Direction {
- FORWARD,
- BACKWARD
- };
-
- // A shell must be explicitly created so that it can call |Init()| with the
- // delegate set. |delegate| can be NULL (if not required for initialization).
- // Takes ownership of |delegate|.
- static Shell* CreateInstance(ShellDelegate* delegate);
-
- // Should never be called before |CreateInstance()|.
- static Shell* GetInstance();
-
- // Returns true if the ash shell has been instantiated.
- static bool HasInstance();
-
- static void DeleteInstance();
-
- // Returns the root window controller for the primary root window.
- // TODO(oshima): move this to |RootWindowController|
- static internal::RootWindowController* GetPrimaryRootWindowController();
-
- // Returns all root window controllers.
- // TODO(oshima): move this to |RootWindowController|
- static RootWindowControllerList GetAllRootWindowControllers();
-
- // Returns the primary root Window. The primary root Window is the one that
- // has a launcher.
- static aura::Window* GetPrimaryRootWindow();
-
- // Returns a root Window when used as a target when creating a new window.
- // The root window of the active window is used in most cases, but can
- // be overridden by using ScopedTargetRootWindow().
- // If you want to get the root Window of the active window, just use
- // |wm::GetActiveWindow()->GetRootWindow()|.
- static aura::Window* GetTargetRootWindow();
-
- // Returns the global Screen object that's always active in ash.
- static gfx::Screen* GetScreen();
-
- // Returns all root windows.
- static aura::Window::Windows GetAllRootWindows();
-
- static aura::Window* GetContainer(aura::Window* root_window,
- int container_id);
- static const aura::Window* GetContainer(const aura::Window* root_window,
- int container_id);
-
- // Returns the list of containers that match |container_id| in
- // all root windows. If |priority_root| is given, the container
- // in the |priority_root| will be inserted at the top of the list.
- static std::vector<aura::Window*> GetContainersFromAllRootWindows(
- int container_id,
- aura::Window* priority_root);
-
- void set_target_root_window(aura::Window* target_root_window) {
- target_root_window_ = target_root_window;
- }
-
- // Shows the context menu for the background and launcher at
- // |location_in_screen| (in screen coordinates).
- void ShowContextMenu(const gfx::Point& location_in_screen,
- ui::MenuSourceType source_type);
-
- // Toggles the app list. |window| specifies in which display the app
- // list should be shown. If this is NULL, the active root window
- // will be used.
- void ToggleAppList(aura::Window* anchor);
-
- // Returns app list target visibility.
- bool GetAppListTargetVisibility() const;
-
- // Returns app list window or NULL if it is not visible.
- aura::Window* GetAppListWindow();
-
- // Returns app list view or NULL if it is not visible.
- app_list::AppListView* GetAppListView();
-
- // Returns true if a system-modal dialog window is currently open.
- bool IsSystemModalWindowOpen() const;
-
- // For testing only: set simulation that a modal window is open
- void SimulateModalWindowOpenForTesting(bool modal_window_open) {
- simulate_modal_window_open_for_testing_ = modal_window_open;
- }
-
- // Creates a default views::NonClientFrameView for use by windows in the
- // Ash environment.
- views::NonClientFrameView* CreateDefaultNonClientFrameView(
- views::Widget* widget);
-
- // Rotates focus through containers that can receive focus.
- void RotateFocus(Direction direction);
-
- // Sets the work area insets of the display that contains |window|,
- // this notifies observers too.
- // TODO(sky): this no longer really replicates what happens and is unreliable.
- // Remove this.
- void SetDisplayWorkAreaInsets(aura::Window* window,
- const gfx::Insets& insets);
-
- // Called when the user logs in.
- void OnLoginStateChanged(user::LoginStatus status);
-
- // Called after the logged-in user's profile is ready.
- void OnLoginUserProfilePrepared();
-
- // Called when the login status changes.
- // TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
- void UpdateAfterLoginStatusChange(user::LoginStatus status);
-
- // Called when the application is exiting.
- void OnAppTerminating();
-
- // Called when the screen is locked (after the lock window is visible) or
- // unlocked.
- void OnLockStateChanged(bool locked);
-
- // Initializes |launcher_|. Does nothing if it's already initialized.
- void CreateLauncher();
-
- // Creates virtual keyboard. Deletes the old virtual keyboard if it's already
- // exist.
- void CreateKeyboard();
-
- // Show shelf view if it was created hidden (before session has started).
- void ShowLauncher();
-
- // Adds/removes observer.
- void AddShellObserver(ShellObserver* observer);
- void RemoveShellObserver(ShellObserver* observer);
-
- keyboard::KeyboardController* keyboard_controller() {
- return keyboard_controller_.get();
- }
-
- AcceleratorController* accelerator_controller() {
- return accelerator_controller_.get();
- }
-
- internal::DisplayManager* display_manager() {
- return display_manager_.get();
- }
- views::corewm::InputMethodEventFilter* input_method_filter() {
- return input_method_filter_.get();
- }
- views::corewm::CompoundEventFilter* env_filter() {
- return env_filter_.get();
- }
- views::corewm::TooltipController* tooltip_controller() {
- return tooltip_controller_.get();
- }
- internal::EventRewriterEventFilter* event_rewriter_filter() {
- return event_rewriter_filter_.get();
- }
- internal::OverlayEventFilter* overlay_filter() {
- return overlay_filter_.get();
- }
- DesktopBackgroundController* desktop_background_controller() {
- return desktop_background_controller_.get();
- }
- PowerButtonController* power_button_controller() {
- return power_button_controller_.get();
- }
- LockStateController* lock_state_controller() {
- return lock_state_controller_.get();
- }
- MruWindowTracker* mru_window_tracker() {
- return mru_window_tracker_.get();
- }
- UserActivityDetector* user_activity_detector() {
- return user_activity_detector_.get();
- }
- VideoDetector* video_detector() {
- return video_detector_.get();
- }
- WindowCycleController* window_cycle_controller() {
- return window_cycle_controller_.get();
- }
- WindowSelectorController* window_selector_controller() {
- return window_selector_controller_.get();
- }
- internal::FocusCycler* focus_cycler() {
- return focus_cycler_.get();
- }
- DisplayController* display_controller() {
- return display_controller_.get();
- }
- internal::MouseCursorEventFilter* mouse_cursor_filter() {
- return mouse_cursor_filter_.get();
- }
- internal::EventTransformationHandler* event_transformation_handler() {
- return event_transformation_handler_.get();
- }
- views::corewm::CursorManager* cursor_manager() { return &cursor_manager_; }
-
- ShellDelegate* delegate() { return delegate_.get(); }
-
- UserWallpaperDelegate* user_wallpaper_delegate() {
- return user_wallpaper_delegate_.get();
- }
-
- CapsLockDelegate* caps_lock_delegate() {
- return caps_lock_delegate_.get();
- }
-
- SessionStateDelegate* session_state_delegate() {
- return session_state_delegate_.get();
- }
-
- AccessibilityDelegate* accessibility_delegate() {
- return accessibility_delegate_.get();
- }
-
- NewWindowDelegate* new_window_delegate() {
- return new_window_delegate_.get();
- }
-
- MediaDelegate* media_delegate() {
- return media_delegate_.get();
- }
-
- HighContrastController* high_contrast_controller() {
- return high_contrast_controller_.get();
- }
-
- MagnificationController* magnification_controller() {
- return magnification_controller_.get();
- }
-
- PartialMagnificationController* partial_magnification_controller() {
- return partial_magnification_controller_.get();
- }
-
- AutoclickController* autoclick_controller() {
- return autoclick_controller_.get();
- }
-
- aura::client::ActivationClient* activation_client() {
- return activation_client_;
- }
-
- ShelfItemDelegateManager* shelf_item_delegate_manager() {
- return shelf_item_delegate_manager_.get();
- }
-
- ScreenAsh* screen() { return screen_; }
-
- // Force the shelf to query for it's current visibility state.
- void UpdateShelfVisibility();
-
- // TODO(oshima): Define an interface to access shelf/launcher
- // state, or just use Launcher.
-
- // Sets/gets the shelf auto-hide behavior on |root_window|.
- void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior,
- aura::Window* root_window);
- ShelfAutoHideBehavior GetShelfAutoHideBehavior(
- aura::Window* root_window) const;
-
- // Sets/gets shelf's alignment on |root_window|.
- void SetShelfAlignment(ShelfAlignment alignment,
- aura::Window* root_window);
- ShelfAlignment GetShelfAlignment(aura::Window* root_window);
-
- // Dims or undims the screen.
- void SetDimming(bool should_dim);
-
- // Notifies |observers_| when entering or exiting fullscreen mode in
- // |root_window|.
- void NotifyFullscreenStateChange(bool is_fullscreen,
- aura::Window* root_window);
-
- // Creates a modal background (a partially-opaque fullscreen window)
- // on all displays for |window|.
- void CreateModalBackground(aura::Window* window);
-
- // Called when a modal window is removed. It will activate
- // another modal window if any, or remove modal screens
- // on all displays.
- void OnModalWindowRemoved(aura::Window* removed);
-
- // Returns WebNotificationTray on the primary root window.
- WebNotificationTray* GetWebNotificationTray();
-
- // Does the primary display have status area?
- bool HasPrimaryStatusArea();
-
- // Returns the system tray on primary display.
- SystemTray* GetPrimarySystemTray();
-
- SystemTrayDelegate* system_tray_delegate() {
- return system_tray_delegate_.get();
- }
-
- SystemTrayNotifier* system_tray_notifier() {
- return system_tray_notifier_.get();
- }
-
- static void set_initially_hide_cursor(bool hide) {
- initially_hide_cursor_ = hide;
- }
-
- internal::ResizeShadowController* resize_shadow_controller() {
- return resize_shadow_controller_.get();
- }
-
- // Made available for tests.
- views::corewm::ShadowController* shadow_controller() {
- return shadow_controller_.get();
- }
-
- // Starts the animation that occurs on first login.
- void DoInitialWorkspaceAnimation();
-
-#if defined(OS_CHROMEOS) && defined(USE_X11)
- // TODO(oshima): Move these objects to DisplayController.
- chromeos::OutputConfigurator* output_configurator() {
- return output_configurator_.get();
- }
- internal::OutputConfiguratorAnimation* output_configurator_animation() {
- return output_configurator_animation_.get();
- }
- internal::DisplayErrorObserver* display_error_observer() {
- return display_error_observer_.get();
- }
-#endif // defined(OS_CHROMEOS) && defined(USE_X11)
-
- internal::ResolutionNotificationController*
- resolution_notification_controller() {
- return resolution_notification_controller_.get();
- }
-
- RootWindowHostFactory* root_window_host_factory() {
- return root_window_host_factory_.get();
- }
-
- ShelfModel* shelf_model() {
- return shelf_model_.get();
- }
-
- WindowPositioner* window_positioner() {
- return window_positioner_.get();
- }
-
- // Returns the launcher delegate, creating if necesary.
- ShelfDelegate* GetShelfDelegate();
-
- UserMetricsRecorder* metrics() {
- return user_metrics_recorder_.get();
- }
-
- void SetTouchHudProjectionEnabled(bool enabled);
-
- bool is_touch_hud_projection_enabled() const {
- return is_touch_hud_projection_enabled_;
- }
-
-#if defined(OS_CHROMEOS)
- // Creates instance of FirstRunHelper. Caller is responsible for deleting
- // returned object.
- ash::FirstRunHelper* CreateFirstRunHelper();
-
- StickyKeys* sticky_keys() {
- return sticky_keys_.get();
- }
-#endif // defined(OS_CHROMEOS)
-
- private:
- FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
- FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
- FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
- friend class internal::RootWindowController;
- friend class internal::ScopedTargetRootWindow;
- friend class test::ShellTestApi;
- friend class shell::WindowWatcher;
-
- typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair;
-
- // Takes ownership of |delegate|.
- explicit Shell(ShellDelegate* delegate);
- virtual ~Shell();
-
- void Init();
-
- // Initializes virtual keyboard controller.
- void InitKeyboard();
-
- // Initializes the root window so that it can host browser windows.
- void InitRootWindow(aura::Window* root_window);
-
- // ash::internal::SystemModalContainerEventFilterDelegate overrides:
- virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE;
-
- // Overridden from ui::EventTarget:
- virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE;
- virtual EventTarget* GetParentTarget() OVERRIDE;
- virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const OVERRIDE;
- virtual ui::EventTargeter* GetEventTargeter() OVERRIDE;
- virtual void OnEvent(ui::Event* event) OVERRIDE;
-
- // Overridden from aura::client::ActivationChangeObserver:
- virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) OVERRIDE;
-
- static Shell* instance_;
-
- // If set before the Shell is initialized, the mouse cursor will be hidden
- // when the screen is initially created.
- static bool initially_hide_cursor_;
-
- ScreenAsh* screen_;
-
- // When no explicit target display/RootWindow is given, new windows are
- // created on |scoped_target_root_window_| , unless NULL in
- // which case they are created on |target_root_window_|.
- // |target_root_window_| never becomes NULL during the session.
- aura::Window* target_root_window_;
- aura::Window* scoped_target_root_window_;
-
- // The CompoundEventFilter owned by aura::Env object.
- scoped_ptr<views::corewm::CompoundEventFilter> env_filter_;
-
- std::vector<WindowAndBoundsPair> to_restore_;
-
- scoped_ptr<UserMetricsRecorder> user_metrics_recorder_;
- scoped_ptr<keyboard::KeyboardController> keyboard_controller_;
- scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_;
- scoped_ptr<AcceleratorController> accelerator_controller_;
- scoped_ptr<ShellDelegate> delegate_;
- scoped_ptr<SystemTrayDelegate> system_tray_delegate_;
- scoped_ptr<SystemTrayNotifier> system_tray_notifier_;
- scoped_ptr<UserWallpaperDelegate> user_wallpaper_delegate_;
- scoped_ptr<CapsLockDelegate> caps_lock_delegate_;
- scoped_ptr<SessionStateDelegate> session_state_delegate_;
- scoped_ptr<AccessibilityDelegate> accessibility_delegate_;
- scoped_ptr<NewWindowDelegate> new_window_delegate_;
- scoped_ptr<MediaDelegate> media_delegate_;
- scoped_ptr<ShelfDelegate> shelf_delegate_;
- scoped_ptr<ShelfItemDelegateManager> shelf_item_delegate_manager_;
- scoped_ptr<internal::ShelfWindowWatcher> shelf_window_watcher_;
-
- scoped_ptr<ShelfModel> shelf_model_;
- scoped_ptr<WindowPositioner> window_positioner_;
-
- scoped_ptr<internal::AppListController> app_list_controller_;
-
- scoped_ptr<internal::DragDropController> drag_drop_controller_;
- scoped_ptr<internal::ResizeShadowController> resize_shadow_controller_;
- scoped_ptr<views::corewm::ShadowController> shadow_controller_;
- scoped_ptr<views::corewm::VisibilityController> visibility_controller_;
- scoped_ptr<views::corewm::WindowModalityController>
- window_modality_controller_;
- scoped_ptr<views::corewm::TooltipController> tooltip_controller_;
- scoped_ptr<DesktopBackgroundController> desktop_background_controller_;
- scoped_ptr<PowerButtonController> power_button_controller_;
- scoped_ptr<LockStateController> lock_state_controller_;
- scoped_ptr<MruWindowTracker> mru_window_tracker_;
- scoped_ptr<UserActivityDetector> user_activity_detector_;
- scoped_ptr<VideoDetector> video_detector_;
- scoped_ptr<WindowCycleController> window_cycle_controller_;
- scoped_ptr<WindowSelectorController> window_selector_controller_;
- scoped_ptr<internal::FocusCycler> focus_cycler_;
- scoped_ptr<DisplayController> display_controller_;
- scoped_ptr<HighContrastController> high_contrast_controller_;
- scoped_ptr<MagnificationController> magnification_controller_;
- scoped_ptr<PartialMagnificationController> partial_magnification_controller_;
- scoped_ptr<AutoclickController> autoclick_controller_;
- scoped_ptr<aura::client::FocusClient> focus_client_;
- scoped_ptr<aura::client::UserActionClient> user_action_client_;
- aura::client::ActivationClient* activation_client_;
- scoped_ptr<internal::MouseCursorEventFilter> mouse_cursor_filter_;
- scoped_ptr<internal::ScreenPositionController> screen_position_controller_;
- scoped_ptr<internal::SystemModalContainerEventFilter> modality_filter_;
- scoped_ptr<internal::EventClientImpl> event_client_;
- scoped_ptr<internal::EventTransformationHandler>
- event_transformation_handler_;
- scoped_ptr<RootWindowHostFactory> root_window_host_factory_;
-
- // An event filter that rewrites or drops an event.
- scoped_ptr<internal::EventRewriterEventFilter> event_rewriter_filter_;
-
- // An event filter that pre-handles key events while the partial
- // screenshot UI or the keyboard overlay is active.
- scoped_ptr<internal::OverlayEventFilter> overlay_filter_;
-
- // An event filter for logging keyboard-related metrics.
- scoped_ptr<internal::KeyboardUMAEventFilter> keyboard_metrics_filter_;
-
- // An event filter which handles system level gestures
- scoped_ptr<internal::SystemGestureEventFilter> system_gesture_filter_;
-
- // An event filter that pre-handles global accelerators.
- scoped_ptr<internal::AcceleratorFilter> accelerator_filter_;
-
- // An event filter that pre-handles all key events to send them to an IME.
- scoped_ptr<views::corewm::InputMethodEventFilter> input_method_filter_;
-
- scoped_ptr<internal::DisplayManager> display_manager_;
- scoped_ptr<base::WeakPtrFactory<internal::DisplayManager> >
- weak_display_manager_factory_;
-
- scoped_ptr<internal::LocaleNotificationController>
- locale_notification_controller_;
-
-#if defined(OS_CHROMEOS)
- scoped_ptr<internal::PowerEventObserver> power_event_observer_;
- scoped_ptr<internal::UserActivityNotifier> user_activity_notifier_;
- scoped_ptr<internal::VideoActivityNotifier> video_activity_notifier_;
- scoped_ptr<StickyKeys> sticky_keys_;
-#if defined(USE_X11)
- // Controls video output device state.
- scoped_ptr<chromeos::OutputConfigurator> output_configurator_;
- scoped_ptr<internal::OutputConfiguratorAnimation>
- output_configurator_animation_;
- scoped_ptr<internal::DisplayErrorObserver> display_error_observer_;
-
- // Listens for output changes and updates the display manager.
- scoped_ptr<internal::DisplayChangeObserver> display_change_observer_;
-#endif // defined(USE_X11)
-#endif // defined(OS_CHROMEOS)
-
- scoped_ptr<internal::ResolutionNotificationController>
- resolution_notification_controller_;
-
- // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
- // pointer to vend to test code.
- AshNativeCursorManager* native_cursor_manager_;
- views::corewm::CursorManager cursor_manager_;
-
- ObserverList<ShellObserver> observers_;
-
- // For testing only: simulate that a modal window is open
- bool simulate_modal_window_open_for_testing_;
-
- bool is_touch_hud_projection_enabled_;
-
- DISALLOW_COPY_AND_ASSIGN(Shell);
-};
-
-} // namespace ash
-
-#endif // ASH_SHELL_H_
diff --git a/chromium/ash/shell/DEPS b/chromium/ash/shell/DEPS
deleted file mode 100644
index 1108a456a1a..00000000000
--- a/chromium/ash/shell/DEPS
+++ /dev/null
@@ -1,5 +0,0 @@
-include_rules = [
- "+content/public",
- "+content/shell",
- "+sandbox",
-]
diff --git a/chromium/ash/shell/app_list.cc b/chromium/ash/shell/app_list.cc
deleted file mode 100644
index ad363071dd5..00000000000
--- a/chromium/ash/shell/app_list.cc
+++ /dev/null
@@ -1,359 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <string>
-
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell/example_factory.h"
-#include "ash/shell/toplevel_window.h"
-#include "ash/shell_delegate.h"
-#include "base/basictypes.h"
-#include "base/callback.h"
-#include "base/files/file_path.h"
-#include "base/i18n/case_conversion.h"
-#include "base/i18n/string_search.h"
-#include "base/strings/string_util.h"
-#include "base/strings/stringprintf.h"
-#include "base/strings/utf_string_conversions.h"
-#include "ui/app_list/app_list_item_list.h"
-#include "ui/app_list/app_list_item_model.h"
-#include "ui/app_list/app_list_model.h"
-#include "ui/app_list/app_list_view_delegate.h"
-#include "ui/app_list/search_box_model.h"
-#include "ui/app_list/search_result.h"
-#include "ui/app_list/speech_ui_model.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/font.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/gfx/rect.h"
-#include "ui/views/examples/examples_window_with_content.h"
-
-namespace ash {
-namespace shell {
-
-namespace {
-
-// WindowTypeLauncherItem is an app item of app list. It carries a window
-// launch type and launches corresponding example window when activated.
-class WindowTypeLauncherItem : public app_list::AppListItemModel {
- public:
- enum Type {
- TOPLEVEL_WINDOW = 0,
- NON_RESIZABLE_WINDOW,
- LOCK_SCREEN,
- WIDGETS_WINDOW,
- EXAMPLES_WINDOW,
- LAST_TYPE,
- };
-
- explicit WindowTypeLauncherItem(const std::string& id, Type type)
- : app_list::AppListItemModel(id),
- type_(type) {
- std::string title(GetTitle(type));
- SetIcon(GetIcon(type), false);
- SetTitleAndFullName(title, title);
- }
-
- static gfx::ImageSkia GetIcon(Type type) {
- static const SkColor kColors[] = {
- SK_ColorRED,
- SK_ColorGREEN,
- SK_ColorBLUE,
- SK_ColorYELLOW,
- SK_ColorCYAN,
- };
-
- const int kIconSize = 128;
- SkBitmap icon;
- icon.setConfig(SkBitmap::kARGB_8888_Config, kIconSize, kIconSize);
- icon.allocPixels();
- icon.eraseColor(kColors[static_cast<int>(type) % arraysize(kColors)]);
- return gfx::ImageSkia::CreateFrom1xBitmap(icon);
- }
-
- // The text below is not localized as this is an example code.
- static std::string GetTitle(Type type) {
- switch (type) {
- case TOPLEVEL_WINDOW:
- return "Create Window";
- case NON_RESIZABLE_WINDOW:
- return "Create Non-Resizable Window";
- case LOCK_SCREEN:
- return "Lock Screen";
- case WIDGETS_WINDOW:
- return "Show Example Widgets";
- case EXAMPLES_WINDOW:
- return "Open Views Examples Window";
- default:
- return "Unknown window type.";
- }
- }
-
- // The text below is not localized as this is an example code.
- static std::string GetDetails(Type type) {
- // Assigns details only to some types so that we see both one-line
- // and two-line results.
- switch (type) {
- case WIDGETS_WINDOW:
- return "Creates a window to show example widgets";
- case EXAMPLES_WINDOW:
- return "Creates a window to show views example.";
- default:
- return std::string();
- }
- }
-
- static void ActivateItem(Type type, int event_flags) {
- switch (type) {
- case TOPLEVEL_WINDOW: {
- ToplevelWindow::CreateParams params;
- params.can_resize = true;
- ToplevelWindow::CreateToplevelWindow(params);
- break;
- }
- case NON_RESIZABLE_WINDOW: {
- ToplevelWindow::CreateToplevelWindow(ToplevelWindow::CreateParams());
- break;
- }
- case LOCK_SCREEN: {
- Shell::GetInstance()->session_state_delegate()->LockScreen();
- break;
- }
- case WIDGETS_WINDOW: {
- CreateWidgetsWindow();
- break;
- }
- case EXAMPLES_WINDOW: {
- views::examples::ShowExamplesWindowWithContent(
- views::examples::DO_NOTHING_ON_CLOSE,
- Shell::GetInstance()->delegate()->GetActiveBrowserContext(),
- NULL);
- break;
- }
- default:
- break;
- }
- }
-
- // AppListItemModel
- virtual void Activate(int event_flags) OVERRIDE {
- ActivateItem(type_, event_flags);
- }
-
- private:
- Type type_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowTypeLauncherItem);
-};
-
-// ExampleSearchResult is an app list search result. It provides what icon to
-// show, what should title and details text look like. It also carries the
-// matching window launch type so that AppListViewDelegate knows how to open
-// it.
-class ExampleSearchResult : public app_list::SearchResult {
- public:
- ExampleSearchResult(WindowTypeLauncherItem::Type type,
- const base::string16& query)
- : type_(type) {
- SetIcon(WindowTypeLauncherItem::GetIcon(type_));
-
- base::string16 title = UTF8ToUTF16(WindowTypeLauncherItem::GetTitle(type_));
- set_title(title);
-
- Tags title_tags;
- const size_t match_len = query.length();
-
- // Highlight matching parts in title with bold.
- // Note the following is not a proper way to handle i18n string.
- title = base::i18n::ToLower(title);
- size_t match_start = title.find(query);
- while (match_start != base::string16::npos) {
- title_tags.push_back(Tag(Tag::MATCH,
- match_start,
- match_start + match_len));
- match_start = title.find(query, match_start + match_len);
- }
- set_title_tags(title_tags);
-
- base::string16 details =
- UTF8ToUTF16(WindowTypeLauncherItem::GetDetails(type_));
- set_details(details);
- Tags details_tags;
- details_tags.push_back(Tag(Tag::DIM, 0, details.length()));
- set_details_tags(details_tags);
- }
-
- WindowTypeLauncherItem::Type type() const { return type_; }
-
- private:
- WindowTypeLauncherItem::Type type_;
-
- DISALLOW_COPY_AND_ASSIGN(ExampleSearchResult);
-};
-
-class ExampleAppListViewDelegate : public app_list::AppListViewDelegate {
- public:
- ExampleAppListViewDelegate()
- : model_(new app_list::AppListModel) {
- PopulateApps(model_->item_list());
- DecorateSearchBox(model_->search_box());
- }
-
- private:
- void PopulateApps(app_list::AppListItemList* item_list) {
- for (int i = 0;
- i < static_cast<int>(WindowTypeLauncherItem::LAST_TYPE);
- ++i) {
- WindowTypeLauncherItem::Type type =
- static_cast<WindowTypeLauncherItem::Type>(i);
- std::string id = base::StringPrintf("%d", i);
- item_list->AddItem(new WindowTypeLauncherItem(id, type));
- }
- }
-
- gfx::ImageSkia CreateSearchBoxIcon() {
- const base::string16 icon_text = ASCIIToUTF16("ash");
- const gfx::Size icon_size(32, 32);
-
- gfx::Canvas canvas(icon_size, 1.0f, false /* is_opaque */);
- canvas.DrawStringInt(icon_text,
- gfx::Font(),
- SK_ColorBLACK,
- 0, 0, icon_size.width(), icon_size.height(),
- gfx::Canvas::TEXT_ALIGN_CENTER |
- gfx::Canvas::NO_SUBPIXEL_RENDERING);
-
- return gfx::ImageSkia(canvas.ExtractImageRep());
- }
-
- void DecorateSearchBox(app_list::SearchBoxModel* search_box_model) {
- search_box_model->SetIcon(CreateSearchBoxIcon());
- search_box_model->SetHintText(ASCIIToUTF16("Type to search..."));
- }
-
- // Overridden from app_list::AppListViewDelegate:
- virtual bool ForceNativeDesktop() const OVERRIDE {
- return false;
- }
-
- virtual void SetProfileByPath(const base::FilePath& profile_path) OVERRIDE {
- // Nothing needs to be done.
- }
-
- virtual const Users& GetUsers() const OVERRIDE {
- return users_;
- }
-
- virtual app_list::AppListModel* GetModel() OVERRIDE { return model_.get(); }
-
- virtual app_list::SigninDelegate* GetSigninDelegate() OVERRIDE {
- return NULL;
- }
-
- virtual app_list::SpeechUIModel* GetSpeechUI() OVERRIDE {
- return &speech_ui_;
- }
-
- virtual void GetShortcutPathForApp(
- const std::string& app_id,
- const base::Callback<void(const base::FilePath&)>& callback) OVERRIDE {
- callback.Run(base::FilePath());
- }
-
- virtual void OpenSearchResult(app_list::SearchResult* result,
- int event_flags) OVERRIDE {
- const ExampleSearchResult* example_result =
- static_cast<const ExampleSearchResult*>(result);
- WindowTypeLauncherItem::ActivateItem(example_result->type(), event_flags);
- }
-
- virtual void InvokeSearchResultAction(app_list::SearchResult* result,
- int action_index,
- int event_flags) OVERRIDE {
- NOTIMPLEMENTED();
- }
-
- virtual void StartSearch() OVERRIDE {
- base::string16 query;
- TrimWhitespace(model_->search_box()->text(), TRIM_ALL, &query);
- query = base::i18n::ToLower(query);
-
- model_->results()->DeleteAll();
- if (query.empty())
- return;
-
- for (int i = 0;
- i < static_cast<int>(WindowTypeLauncherItem::LAST_TYPE);
- ++i) {
- WindowTypeLauncherItem::Type type =
- static_cast<WindowTypeLauncherItem::Type>(i);
-
- base::string16 title =
- UTF8ToUTF16(WindowTypeLauncherItem::GetTitle(type));
- if (base::i18n::StringSearchIgnoringCaseAndAccents(
- query, title, NULL, NULL)) {
- model_->results()->Add(new ExampleSearchResult(type, query));
- }
- }
- }
-
- virtual void StopSearch() OVERRIDE {
- // Nothing needs to be done.
- }
-
- virtual void Dismiss() OVERRIDE {
- DCHECK(ash::Shell::HasInstance());
- if (Shell::GetInstance()->GetAppListTargetVisibility())
- Shell::GetInstance()->ToggleAppList(NULL);
- }
-
- virtual void ViewClosing() OVERRIDE {
- // Nothing needs to be done.
- }
-
- virtual gfx::ImageSkia GetWindowIcon() OVERRIDE {
- return gfx::ImageSkia();
- }
-
- virtual void OpenSettings() OVERRIDE {
- // Nothing needs to be done.
- }
-
- virtual void OpenHelp() OVERRIDE {
- // Nothing needs to be done.
- }
-
- virtual void OpenFeedback() OVERRIDE {
- // Nothing needs to be done.
- }
-
- virtual void ToggleSpeechRecognition() OVERRIDE {
- NOTIMPLEMENTED();
- }
-
- virtual void ShowForProfileByPath(
- const base::FilePath& profile_path) OVERRIDE {
- // Nothing needs to be done.
- }
-
- virtual content::WebContents* GetStartPageContents() OVERRIDE {
- return NULL;
- }
-
- scoped_ptr<app_list::AppListModel> model_;
- app_list::SpeechUIModel speech_ui_;
- Users users_;
-
- DISALLOW_COPY_AND_ASSIGN(ExampleAppListViewDelegate);
-};
-
-} // namespace
-
-app_list::AppListViewDelegate* CreateAppListViewDelegate() {
- return new ExampleAppListViewDelegate;
-}
-
-} // namespace shell
-} // namespace ash
diff --git a/chromium/ash/shell/bubble.cc b/chromium/ash/shell/bubble.cc
deleted file mode 100644
index c39f76a60f0..00000000000
--- a/chromium/ash/shell/bubble.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/strings/utf_string_conversions.h"
-#include "ui/views/bubble/bubble_border.h"
-#include "ui/views/bubble/bubble_delegate.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/fill_layout.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace shell {
-
-struct BubbleConfig {
- base::string16 label;
- views::View* anchor_view;
- views::BubbleBorder::Arrow arrow;
-};
-
-class ExampleBubbleDelegateView : public views::BubbleDelegateView {
- public:
- ExampleBubbleDelegateView(const BubbleConfig& config)
- : BubbleDelegateView(config.anchor_view, config.arrow),
- label_(config.label) {}
-
- virtual void Init() OVERRIDE {
- SetLayoutManager(new views::FillLayout());
- views::Label* label = new views::Label(label_);
- AddChildView(label);
- }
-
- private:
- base::string16 label_;
-};
-
-void CreatePointyBubble(views::View* anchor_view) {
- BubbleConfig config;
- config.label = ASCIIToUTF16("PointyBubble");
- config.anchor_view = anchor_view;
- config.arrow = views::BubbleBorder::TOP_LEFT;
- ExampleBubbleDelegateView* bubble = new ExampleBubbleDelegateView(config);
- views::BubbleDelegateView::CreateBubble(bubble)->Show();
-}
-
-} // namespace shell
-} // namespace ash
diff --git a/chromium/ash/shell/content_client/DEPS b/chromium/ash/shell/content_client/DEPS
deleted file mode 100644
index f71262e800a..00000000000
--- a/chromium/ash/shell/content_client/DEPS
+++ /dev/null
@@ -1,4 +0,0 @@
-include_rules = [
- "+content/public",
- "+content/shell",
-]
diff --git a/chromium/ash/shell/content_client/shell_browser_main_parts.cc b/chromium/ash/shell/content_client/shell_browser_main_parts.cc
deleted file mode 100644
index 478453de020..00000000000
--- a/chromium/ash/shell/content_client/shell_browser_main_parts.cc
+++ /dev/null
@@ -1,171 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell/content_client/shell_browser_main_parts.h"
-
-#include "ash/ash_switches.h"
-#include "ash/desktop_background/desktop_background_controller.h"
-#include "ash/shell.h"
-#include "ash/shell/shell_delegate_impl.h"
-#include "ash/shell/window_watcher.h"
-#include "ash/system/user/login_status.h"
-#include "base/bind.h"
-#include "base/command_line.h"
-#include "base/i18n/icu_util.h"
-#include "base/message_loop/message_loop.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/threading/thread.h"
-#include "base/threading/thread_restrictions.h"
-#include "content/public/common/content_switches.h"
-#include "content/shell/browser/shell_browser_context.h"
-#include "content/shell/browser/shell_net_log.h"
-#include "net/base/net_module.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/base/ui_base_paths.h"
-#include "ui/compositor/compositor.h"
-#include "ui/gfx/screen.h"
-#include "ui/message_center/message_center.h"
-#include "ui/views/focus/accelerator_handler.h"
-#include "ui/views/test/test_views_delegate.h"
-
-#if defined(USE_X11)
-#include "ui/events/x/touch_factory_x11.h"
-#endif
-
-#if defined(OS_CHROMEOS)
-#include "chromeos/audio/cras_audio_handler.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#endif
-
-namespace ash {
-namespace shell {
-void InitWindowTypeLauncher();
-
-namespace {
-
-class ShellViewsDelegate : public views::TestViewsDelegate {
- public:
- ShellViewsDelegate() {}
- virtual ~ShellViewsDelegate() {}
-
- // Overridden from views::TestViewsDelegate:
- virtual views::NonClientFrameView* CreateDefaultNonClientFrameView(
- views::Widget* widget) OVERRIDE {
- return ash::Shell::GetInstance()->CreateDefaultNonClientFrameView(widget);
- }
- virtual bool UseTransparentWindows() const OVERRIDE {
- // Ash uses transparent window frames.
- return true;
- }
- virtual void OnBeforeWidgetInit(
- views::Widget::InitParams* params,
- views::internal::NativeWidgetDelegate* delegate) OVERRIDE {
- if (params->native_widget)
- return;
-
- if (!params->parent && !params->context && params->top_level)
- params->context = Shell::GetPrimaryRootWindow();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShellViewsDelegate);
-};
-
-} // namespace
-
-ShellBrowserMainParts::ShellBrowserMainParts(
- const content::MainFunctionParams& parameters)
- : BrowserMainParts(),
- delegate_(NULL) {
-}
-
-ShellBrowserMainParts::~ShellBrowserMainParts() {
-}
-
-void ShellBrowserMainParts::PreMainMessageLoopStart() {
-#if defined(USE_X11)
- ui::TouchFactory::SetTouchDeviceListFromCommandLine();
-#endif
-}
-
-void ShellBrowserMainParts::PostMainMessageLoopStart() {
-#if defined(OS_CHROMEOS)
- chromeos::DBusThreadManager::Initialize();
-#endif
-}
-
-void ShellBrowserMainParts::PreMainMessageLoopRun() {
- net_log_.reset(new content::ShellNetLog());
- browser_context_.reset(new content::ShellBrowserContext(
- false, net_log_.get()));
-
- // A ViewsDelegate is required.
- if (!views::ViewsDelegate::views_delegate)
- views::ViewsDelegate::views_delegate = new ShellViewsDelegate;
-
- delegate_ = new ash::shell::ShellDelegateImpl;
- // The global message center state must be initialized absent
- // g_browser_process.
- message_center::MessageCenter::Initialize();
-
-#if defined(OS_CHROMEOS)
- // Create CrasAudioHandler for testing since g_browser_process
- // is absent.
- chromeos::CrasAudioHandler::InitializeForTesting();
-#endif
-
- ash::Shell::CreateInstance(delegate_);
- delegate_->set_browser_context(browser_context_.get());
- ash::Shell::GetInstance()->CreateLauncher();
- ash::Shell::GetInstance()->UpdateAfterLoginStatusChange(
- user::LOGGED_IN_USER);
-
- window_watcher_.reset(new ash::shell::WindowWatcher);
- gfx::Screen* screen = Shell::GetInstance()->GetScreen();
- screen->AddObserver(window_watcher_.get());
- delegate_->SetWatcher(window_watcher_.get());
-
- ash::shell::InitWindowTypeLauncher();
-
- Shell::GetInstance()->desktop_background_controller()->SetDefaultWallpaper(
- false /* is_guest */);
-
- ash::Shell::GetPrimaryRootWindow()->GetDispatcher()->host()->Show();
-}
-
-void ShellBrowserMainParts::PostMainMessageLoopRun() {
- gfx::Screen* screen = Shell::GetInstance()->GetScreen();
- screen->RemoveObserver(window_watcher_.get());
-
- window_watcher_.reset();
- delegate_->SetWatcher(NULL);
- delegate_ = NULL;
- ash::Shell::DeleteInstance();
- // The global message center state must be shutdown absent
- // g_browser_process.
- message_center::MessageCenter::Shutdown();
-
-#if defined(OS_CHROMEOS)
- chromeos::CrasAudioHandler::Shutdown();
-#endif
-
- aura::Env::DeleteInstance();
-
- // The keyboard may have created a WebContents. The WebContents is destroyed
- // with the UI, and it needs the BrowserContext to be alive during its
- // destruction. So destroy all of the UI elements before destroying the
- // browser context.
- browser_context_.reset();
-}
-
-bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) {
- base::MessageLoopForUI::current()->Run();
- return true;
-}
-
-} // namespace shell
-} // namespace ash
diff --git a/chromium/ash/shell/content_client/shell_browser_main_parts.h b/chromium/ash/shell/content_client/shell_browser_main_parts.h
deleted file mode 100644
index 768ee5e6c3c..00000000000
--- a/chromium/ash/shell/content_client/shell_browser_main_parts.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_CONTENT_CLIENT_EXAMPLES_BROWSER_MAIN_PARTS_H_
-#define ASH_SHELL_CONTENT_CLIENT_EXAMPLES_BROWSER_MAIN_PARTS_H_
-
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "content/public/browser/browser_main_parts.h"
-
-namespace base {
-class Thread;
-}
-
-namespace content {
-class ShellBrowserContext;
-struct MainFunctionParams;
-}
-
-namespace net {
-class NetLog;
-}
-
-namespace ash {
-namespace shell {
-
-class ShellDelegateImpl;
-class WindowWatcher;
-
-class ShellBrowserMainParts : public content::BrowserMainParts {
- public:
- explicit ShellBrowserMainParts(
- const content::MainFunctionParams& parameters);
- virtual ~ShellBrowserMainParts();
-
- // Overridden from content::BrowserMainParts:
- virtual void PreMainMessageLoopStart() OVERRIDE;
- virtual void PostMainMessageLoopStart() OVERRIDE;
- virtual void PreMainMessageLoopRun() OVERRIDE;
- virtual bool MainMessageLoopRun(int* result_code) OVERRIDE;
- virtual void PostMainMessageLoopRun() OVERRIDE;
-
- content::ShellBrowserContext* browser_context() {
- return browser_context_.get();
- }
-
- private:
- scoped_ptr<net::NetLog> net_log_;
- scoped_ptr<content::ShellBrowserContext> browser_context_;
- scoped_ptr<ash::shell::WindowWatcher> window_watcher_;
- ShellDelegateImpl* delegate_; // owned by Shell
-
- DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts);
-};
-
-} // namespace shell
-} // namespace ash
-
-#endif // ASH_SHELL_CONTENT_CLIENT_EXAMPLES_BROWSER_MAIN_PARTS_H_
diff --git a/chromium/ash/shell/content_client/shell_content_browser_client.cc b/chromium/ash/shell/content_client/shell_content_browser_client.cc
deleted file mode 100644
index ec24bc72a8e..00000000000
--- a/chromium/ash/shell/content_client/shell_content_browser_client.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell/content_client/shell_content_browser_client.h"
-
-#include "ash/shell/content_client/shell_browser_main_parts.h"
-#include "content/shell/browser/shell_browser_context.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-
-namespace ash {
-namespace shell {
-
-ShellContentBrowserClient::ShellContentBrowserClient()
- : shell_browser_main_parts_(NULL) {
-}
-
-ShellContentBrowserClient::~ShellContentBrowserClient() {
-}
-
-content::BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts(
- const content::MainFunctionParams& parameters) {
- shell_browser_main_parts_ = new ShellBrowserMainParts(parameters);
- return shell_browser_main_parts_;
-}
-
-net::URLRequestContextGetter* ShellContentBrowserClient::CreateRequestContext(
- content::BrowserContext* content_browser_context,
- content::ProtocolHandlerMap* protocol_handlers) {
- content::ShellBrowserContext* shell_context =
- static_cast<content::ShellBrowserContext*>(content_browser_context);
- return shell_context->CreateRequestContext(protocol_handlers);
-}
-
-content::ShellBrowserContext* ShellContentBrowserClient::browser_context() {
- return shell_browser_main_parts_->browser_context();
-}
-
-} // namespace examples
-} // namespace views
diff --git a/chromium/ash/shell/content_client/shell_content_browser_client.h b/chromium/ash/shell/content_client/shell_content_browser_client.h
deleted file mode 100644
index d90909aa656..00000000000
--- a/chromium/ash/shell/content_client/shell_content_browser_client.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_CONTENT_CLIENT_SHELL_CONTENT_BROWSER_CLIENT_H_
-#define ASH_SHELL_CONTENT_CLIENT_SHELL_CONTENT_BROWSER_CLIENT_H_
-
-#include <string>
-
-#include "base/compiler_specific.h"
-#include "content/public/browser/content_browser_client.h"
-
-namespace content {
-class ShellBrowserContext;
-class ShellBrowserMainParts;
-class ShellResourceDispatcherHostDelegate;
-}
-
-namespace ash {
-namespace shell {
-
-class ShellBrowserMainParts;
-
-class ShellContentBrowserClient : public content::ContentBrowserClient {
- public:
- ShellContentBrowserClient();
- virtual ~ShellContentBrowserClient();
-
- // Overridden from content::ContentBrowserClient:
- virtual content::BrowserMainParts* CreateBrowserMainParts(
- const content::MainFunctionParams& parameters) OVERRIDE;
- virtual net::URLRequestContextGetter* CreateRequestContext(
- content::BrowserContext* browser_context,
- content::ProtocolHandlerMap* protocol_handlers) OVERRIDE;
-
- content::ShellBrowserContext* browser_context();
-
- private:
- ShellBrowserMainParts* shell_browser_main_parts_;
-
- DISALLOW_COPY_AND_ASSIGN(ShellContentBrowserClient);
-};
-
-} // namespace shell
-} // namespace ash
-
-#endif // ASH_SHELL_CONTENT_CLIENT_SHELL_CONTENT_BROWSER_CLIENT_H_
diff --git a/chromium/ash/shell/content_client/shell_main_delegate.cc b/chromium/ash/shell/content_client/shell_main_delegate.cc
deleted file mode 100644
index 014fae1a2b8..00000000000
--- a/chromium/ash/shell/content_client/shell_main_delegate.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell/content_client/shell_main_delegate.h"
-
-#include "ash/shell/content_client/shell_content_browser_client.h"
-#include "base/command_line.h"
-#include "content/public/common/content_switches.h"
-#include "ui/base/resource/resource_bundle.h"
-
-namespace ash {
-namespace shell {
-
-ShellMainDelegate::ShellMainDelegate() {
-}
-
-ShellMainDelegate::~ShellMainDelegate() {
-}
-
-bool ShellMainDelegate::BasicStartupComplete(int* exit_code) {
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- std::string process_type =
- command_line.GetSwitchValueASCII(switches::kProcessType);
-
- content::SetContentClient(&content_client_);
-
- return false;
-}
-
-void ShellMainDelegate::PreSandboxStartup() {
- InitializeResourceBundle();
-}
-
-content::ContentBrowserClient* ShellMainDelegate::CreateContentBrowserClient() {
- browser_client_.reset(new ShellContentBrowserClient);
- return browser_client_.get();
-}
-
-void ShellMainDelegate::InitializeResourceBundle() {
- ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
-}
-
-} // namespace shell
-} // namespace ash
diff --git a/chromium/ash/shell/content_client/shell_main_delegate.h b/chromium/ash/shell/content_client/shell_main_delegate.h
deleted file mode 100644
index 2ac00514546..00000000000
--- a/chromium/ash/shell/content_client/shell_main_delegate.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_CONTENT_CLIENT_SHELL_MAIN_DELEGATE_H_
-#define ASH_SHELL_CONTENT_CLIENT_SHELL_MAIN_DELEGATE_H_
-
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "content/public/app/content_main_delegate.h"
-#include "content/shell/common/shell_content_client.h"
-
-namespace content {
-class ShellContentRendererClient;
-class ShellContentPluginClient;
-class ShellContentUtilityClient;
-}
-
-namespace ash {
-namespace shell {
-
-class ShellContentBrowserClient;
-
-class ShellMainDelegate : public content::ContentMainDelegate {
- public:
- ShellMainDelegate();
- virtual ~ShellMainDelegate();
-
- virtual bool BasicStartupComplete(int* exit_code) OVERRIDE;
- virtual void PreSandboxStartup() OVERRIDE;
- virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE;
-
- private:
- void InitializeResourceBundle();
-
- scoped_ptr<ShellContentBrowserClient> browser_client_;
- content::ShellContentClient content_client_;
-
- DISALLOW_COPY_AND_ASSIGN(ShellMainDelegate);
-};
-
-} // namespace shell
-} // namespace ash
-
-#endif // ASH_SHELL_CONTENT_CLIENT_SHELL_MAIN_DELEGATE_H_
diff --git a/chromium/ash/shell/context_menu.cc b/chromium/ash/shell/context_menu.cc
deleted file mode 100644
index 19ad408cb99..00000000000
--- a/chromium/ash/shell/context_menu.cc
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell/context_menu.h"
-
-#include "ash/launcher/launcher.h"
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/shell.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-
-namespace ash {
-namespace shell {
-
-ContextMenu::ContextMenu(aura::Window* root)
- : ui::SimpleMenuModel(NULL),
- root_window_(root),
- alignment_menu_(root) {
- DCHECK(root_window_);
- set_delegate(this);
- AddCheckItemWithStringId(MENU_AUTO_HIDE,
- IDS_ASH_SHELF_CONTEXT_MENU_AUTO_HIDE);
- AddSubMenuWithStringId(MENU_ALIGNMENT_MENU,
- IDS_ASH_SHELF_CONTEXT_MENU_POSITION,
- &alignment_menu_);
-}
-
-ContextMenu::~ContextMenu() {
-}
-
-bool ContextMenu::IsCommandIdChecked(int command_id) const {
- switch (command_id) {
- case MENU_AUTO_HIDE:
- return Shell::GetInstance()->GetShelfAutoHideBehavior(root_window_) ==
- ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS;
- default:
- return false;
- }
-}
-
-bool ContextMenu::IsCommandIdEnabled(int command_id) const {
- return true;
-}
-
-bool ContextMenu::GetAcceleratorForCommandId(
- int command_id,
- ui::Accelerator* accelerator) {
- return false;
-}
-
-void ContextMenu::ExecuteCommand(int command_id, int event_flags) {
- Shell* shell = Shell::GetInstance();
- switch (static_cast<MenuItem>(command_id)) {
- case MENU_AUTO_HIDE:
- shell->SetShelfAutoHideBehavior(
- shell->GetShelfAutoHideBehavior(root_window_) ==
- SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS ?
- SHELF_AUTO_HIDE_BEHAVIOR_NEVER :
- SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
- root_window_);
- break;
- case MENU_ALIGNMENT_MENU:
- break;
- }
-}
-
-} // namespace shell
-} // namespace ash
diff --git a/chromium/ash/shell/context_menu.h b/chromium/ash/shell/context_menu.h
deleted file mode 100644
index 32421ca5608..00000000000
--- a/chromium/ash/shell/context_menu.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_CONTEXT_MENU_H_
-#define ASH_SHELL_CONTEXT_MENU_H_
-
-#include "ash/shelf/shelf_alignment_menu.h"
-#include "ash/shelf/shelf_types.h"
-#include "base/basictypes.h"
-#include "ui/base/models/simple_menu_model.h"
-
-namespace aura {
-class RootWindow;
-}
-
-namespace ash {
-namespace shell {
-
-// Context menu for the ash_shell.
-class ContextMenu : public ui::SimpleMenuModel,
- public ui::SimpleMenuModel::Delegate {
- public:
- explicit ContextMenu(aura::Window* root);
- virtual ~ContextMenu();
-
- // ui::SimpleMenuModel::Delegate overrides:
- virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
- virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
- virtual bool GetAcceleratorForCommandId(
- int command_id,
- ui::Accelerator* accelerator) OVERRIDE;
- virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
-
- private:
- enum MenuItem {
- MENU_AUTO_HIDE,
- MENU_ALIGNMENT_MENU,
- };
-
- aura::Window* root_window_;
-
- ShelfAlignmentMenu alignment_menu_;
-
- DISALLOW_COPY_AND_ASSIGN(ContextMenu);
-};
-
-} // namespace shell
-} // namespace ash
-
-#endif // ASH_SHELL_CONTEXT_MENU_H_
diff --git a/chromium/ash/shell/example_factory.h b/chromium/ash/shell/example_factory.h
deleted file mode 100644
index 7510be14cb5..00000000000
--- a/chromium/ash/shell/example_factory.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_EXAMPLE_FACTORY_H_
-#define ASH_SHELL_EXAMPLE_FACTORY_H_
-
-namespace app_list {
-class AppListViewDelegate;
-}
-
-namespace views {
-class View;
-}
-
-namespace ash {
-namespace shell {
-
-void CreatePointyBubble(views::View* anchor_view);
-
-void CreateLockScreen();
-
-// Creates a window showing samples of commonly used widgets.
-void CreateWidgetsWindow();
-
-app_list::AppListViewDelegate* CreateAppListViewDelegate();
-
-} // namespace shell
-} // namespace ash
-
-#endif // ASH_SHELL_EXAMPLE_FACTORY_H_
diff --git a/chromium/ash/shell/keyboard_controller_proxy_stub.cc b/chromium/ash/shell/keyboard_controller_proxy_stub.cc
deleted file mode 100644
index 556e7aa4f1e..00000000000
--- a/chromium/ash/shell/keyboard_controller_proxy_stub.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell/keyboard_controller_proxy_stub.h"
-
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "ui/aura/window.h"
-#include "ui/views/corewm/input_method_event_filter.h"
-
-using namespace content;
-
-namespace ash {
-
-KeyboardControllerProxyStub::KeyboardControllerProxyStub() {
-}
-
-KeyboardControllerProxyStub::~KeyboardControllerProxyStub() {
-}
-
-aura::Window* KeyboardControllerProxyStub::GetKeyboardWindow() {
- if (!keyboard_) {
- keyboard_.reset(new aura::Window(&delegate_));
- keyboard_->Init(ui::LAYER_NOT_DRAWN);
- }
- return keyboard_.get();
-}
-
-BrowserContext* KeyboardControllerProxyStub::GetBrowserContext() {
- // TODO(oshima): investigate which profile to use.
- return Shell::GetInstance()->delegate()->GetActiveBrowserContext();
-}
-
-ui::InputMethod* KeyboardControllerProxyStub::GetInputMethod() {
- return Shell::GetInstance()->input_method_filter()->input_method();
-}
-
-void KeyboardControllerProxyStub::RequestAudioInput(
- WebContents* web_contents,
- const MediaStreamRequest& request,
- const MediaResponseCallback& callback) {
-}
-
-} // namespace ash
diff --git a/chromium/ash/shell/keyboard_controller_proxy_stub.h b/chromium/ash/shell/keyboard_controller_proxy_stub.h
deleted file mode 100644
index 39ddaf6e3ed..00000000000
--- a/chromium/ash/shell/keyboard_controller_proxy_stub.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_KEYBOARD_CONTROLLER_PROXY_STUB_H_
-#define ASH_SHELL_KEYBOARD_CONTROLLER_PROXY_STUB_H_
-
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/keyboard/keyboard_controller_proxy.h"
-
-namespace aura {
-class Window;
-} // namespace aura
-
-namespace ash {
-
-// Stub implementation of KeyboardControllerProxy
-class KeyboardControllerProxyStub : public keyboard::KeyboardControllerProxy {
- public:
- KeyboardControllerProxyStub();
- virtual ~KeyboardControllerProxyStub();
-
- virtual aura::Window* GetKeyboardWindow() OVERRIDE;
-
- private:
- // Overridden from keyboard::KeyboardControllerProxy:
- virtual content::BrowserContext* GetBrowserContext() OVERRIDE;
- virtual ui::InputMethod* GetInputMethod() OVERRIDE;
- virtual void RequestAudioInput(content::WebContents* web_contents,
- const content::MediaStreamRequest& request,
- const content::MediaResponseCallback& callback) OVERRIDE;
-
- aura::test::TestWindowDelegate delegate_;
- scoped_ptr<aura::Window> keyboard_;
-
- DISALLOW_COPY_AND_ASSIGN(KeyboardControllerProxyStub);
-};
-
-} // namespace ash
-
-#endif // ASH_SHELL_KEYBOARD_CONTROLLER_PROXY_STUB_H_
diff --git a/chromium/ash/shell/lock_view.cc b/chromium/ash/shell/lock_view.cc
deleted file mode 100644
index 7a95ea4393d..00000000000
--- a/chromium/ash/shell/lock_view.cc
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/shell/example_factory.h"
-#include "base/strings/utf_string_conversions.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/font.h"
-#include "ui/views/controls/button/label_button.h"
-#include "ui/views/corewm/tooltip_controller.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-using ash::Shell;
-
-namespace ash {
-namespace shell {
-
-class LockView : public views::WidgetDelegateView,
- public views::ButtonListener {
- public:
- LockView()
- : unlock_button_(new views::LabelButton(this, ASCIIToUTF16("Unlock"))) {
- unlock_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- AddChildView(unlock_button_);
- unlock_button_->SetFocusable(true);
- }
- virtual ~LockView() {}
-
- // Overridden from views::View:
- virtual gfx::Size GetPreferredSize() OVERRIDE {
- return gfx::Size(500, 400);
- }
-
- private:
- // Overridden from views::View:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- canvas->FillRect(GetLocalBounds(), SK_ColorYELLOW);
- base::string16 text = ASCIIToUTF16("LOCKED!");
- int string_width = font_.GetStringWidth(text);
- canvas->DrawStringInt(text, font_, SK_ColorRED, (width() - string_width)/ 2,
- (height() - font_.GetHeight()) / 2,
- string_width, font_.GetHeight());
- }
- virtual void Layout() OVERRIDE {
- gfx::Rect bounds = GetLocalBounds();
- gfx::Size ps = unlock_button_->GetPreferredSize();
- bounds.set_y(bounds.bottom() - ps.height() - 5);
- bounds.set_x((bounds.width() - ps.width()) / 2);
- bounds.set_size(ps);
- unlock_button_->SetBoundsRect(bounds);
- }
- virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE {
- if (details.is_add && details.child == this)
- unlock_button_->RequestFocus();
- }
-
- // Overridden from views::WidgetDelegateView:
- virtual void WindowClosing() OVERRIDE {
- Shell::GetInstance()->session_state_delegate()->UnlockScreen();
- }
-
- // Overridden from views::ButtonListener:
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE {
- DCHECK(sender == unlock_button_);
- GetWidget()->Close();
- }
-
- gfx::Font font_;
- views::LabelButton* unlock_button_;
-
- DISALLOW_COPY_AND_ASSIGN(LockView);
-};
-
-void CreateLockScreen() {
- LockView* lock_view = new LockView;
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params(
- views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- gfx::Size ps = lock_view->GetPreferredSize();
-
- gfx::Size root_window_size = Shell::GetPrimaryRootWindow()->bounds().size();
- params.bounds = gfx::Rect((root_window_size.width() - ps.width()) / 2,
- (root_window_size.height() - ps.height()) / 2,
- ps.width(), ps.height());
- params.delegate = lock_view;
- params.parent = Shell::GetContainer(
- Shell::GetPrimaryRootWindow(),
- internal::kShellWindowId_LockScreenContainer);
- widget->Init(params);
- widget->SetContentsView(lock_view);
- widget->Show();
- widget->GetNativeView()->SetName("LockView");
- widget->GetNativeView()->Focus();
-
- // TODO: it shouldn't be necessary to invoke UpdateTooltip() here.
- Shell::GetInstance()->tooltip_controller()->UpdateTooltip(
- widget->GetNativeView());
-}
-
-} // namespace shell
-} // namespace ash
diff --git a/chromium/ash/shell/panel_window.cc b/chromium/ash/shell/panel_window.cc
deleted file mode 100644
index 9593a4066f5..00000000000
--- a/chromium/ash/shell/panel_window.cc
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell/panel_window.h"
-
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/wm/panels/panel_frame_view.h"
-#include "base/strings/utf_string_conversions.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/canvas.h"
-#include "ui/views/widget/widget.h"
-
-namespace {
-const int kMinWidth = 100;
-const int kMinHeight = 100;
-const int kDefaultWidth = 200;
-const int kDefaultHeight = 300;
-}
-
-namespace ash {
-
-// static
-views::Widget* PanelWindow::CreatePanelWindow(const gfx::Rect& rect) {
- PanelWindow* panel_window = new PanelWindow("Example Panel Window");
- panel_window->params().bounds = rect;
- panel_window->params().context = Shell::GetPrimaryRootWindow();
- return panel_window->CreateWidget();
-}
-
-PanelWindow::PanelWindow(const std::string& name)
- : name_(name),
- params_(views::Widget::InitParams::TYPE_PANEL) {
- params_.delegate = this;
-}
-
-PanelWindow::~PanelWindow() {
-}
-
-views::Widget* PanelWindow::CreateWidget() {
- views::Widget* widget = new views::Widget;
-
- if (params().bounds.width() == 0)
- params().bounds.set_width(kDefaultWidth);
- if (params().bounds.height() == 0)
- params().bounds.set_height(kDefaultHeight);
- params().bounds = ScreenAsh::ConvertRectToScreen(
- Shell::GetTargetRootWindow(),
- params().bounds);
-
- widget->Init(params());
- widget->GetNativeView()->SetName(name_);
- widget->Show();
-
- return widget;
-}
-
-gfx::Size PanelWindow::GetPreferredSize() {
- return gfx::Size(kMinWidth, kMinHeight);
-}
-
-void PanelWindow::OnPaint(gfx::Canvas* canvas) {
- canvas->FillRect(GetLocalBounds(), SK_ColorGREEN);
-}
-
-base::string16 PanelWindow::GetWindowTitle() const {
- return ASCIIToUTF16(name_);
-}
-
-views::View* PanelWindow::GetContentsView() {
- return this;
-}
-
-bool PanelWindow::CanResize() const {
- return true;
-}
-
-bool PanelWindow::CanMaximize() const {
- return false;
-}
-
-views::NonClientFrameView* PanelWindow::CreateNonClientFrameView(
- views::Widget* widget) {
- return new PanelFrameView(widget, PanelFrameView::FRAME_NONE);
-}
-
-} // namespace ash
diff --git a/chromium/ash/shell/panel_window.h b/chromium/ash/shell/panel_window.h
deleted file mode 100644
index eefe5e3f4aa..00000000000
--- a/chromium/ash/shell/panel_window.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_PANEL_WINDOW_H_
-#define ASH_SHELL_PANEL_WINDOW_H_
-
-#include "base/basictypes.h"
-#include "ui/aura/aura_export.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-
-class PanelFrameView;
-
-// Example Class for panel windows (Widget::InitParams::TYPE_PANEL).
-// Instances of PanelWindow will get added to the PanelContainer top level
-// window which manages the panel layout through PanelLayoutManager.
-class PanelWindow : public views::WidgetDelegateView {
- public:
- explicit PanelWindow(const std::string& name);
- virtual ~PanelWindow();
-
- // Creates the widget for the panel window using |params_|.
- views::Widget* CreateWidget();
-
- const std::string& name() { return name_; }
- views::Widget::InitParams& params() { return params_; }
-
- // Creates a panel window and returns the associated widget.
- static views::Widget* CreatePanelWindow(const gfx::Rect& rect);
-
- private:
- // Overridden from views::View:
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
-
- // Overridden from views::WidgetDelegate:
- virtual base::string16 GetWindowTitle() const OVERRIDE;
- virtual View* GetContentsView() OVERRIDE;
- virtual bool CanResize() const OVERRIDE;
- virtual bool CanMaximize() const OVERRIDE;
- virtual views::NonClientFrameView* CreateNonClientFrameView(
- views::Widget* widget) OVERRIDE;
-
- std::string name_;
- views::Widget::InitParams params_;
-
- DISALLOW_COPY_AND_ASSIGN(PanelWindow);
-};
-
-} // namespace ash
-
-#endif // ASH_SHELL_PANEL_WINDOW_H_
diff --git a/chromium/ash/shell/shelf_delegate_impl.cc b/chromium/ash/shell/shelf_delegate_impl.cc
deleted file mode 100644
index 0112009c374..00000000000
--- a/chromium/ash/shell/shelf_delegate_impl.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell/shelf_delegate_impl.h"
-
-#include "ash/shell.h"
-#include "ash/shell/toplevel_window.h"
-#include "ash/shell/window_watcher.h"
-#include "ash/wm/window_util.h"
-#include "base/strings/string_util.h"
-#include "grit/ash_resources.h"
-
-namespace ash {
-namespace shell {
-
-ShelfDelegateImpl::ShelfDelegateImpl(WindowWatcher* watcher)
- : watcher_(watcher) {
-}
-
-ShelfDelegateImpl::~ShelfDelegateImpl() {
-}
-
-void ShelfDelegateImpl::OnLauncherCreated(Launcher* launcher) {
-}
-
-void ShelfDelegateImpl::OnLauncherDestroyed(Launcher* launcher) {
-}
-
-LauncherID ShelfDelegateImpl::GetLauncherIDForAppID(const std::string& app_id) {
- return 0;
-}
-
-const std::string& ShelfDelegateImpl::GetAppIDForLauncherID(LauncherID id) {
- return base::EmptyString();
-}
-
-void ShelfDelegateImpl::PinAppWithID(const std::string& app_id) {
-}
-
-bool ShelfDelegateImpl::IsAppPinned(const std::string& app_id) {
- return false;
-}
-
-bool ShelfDelegateImpl::CanPin() const {
- return false;
-}
-
-void ShelfDelegateImpl::UnpinAppWithID(const std::string& app_id) {
-}
-
-} // namespace shell
-} // namespace ash
diff --git a/chromium/ash/shell/shelf_delegate_impl.h b/chromium/ash/shell/shelf_delegate_impl.h
deleted file mode 100644
index ed6dc6d7d3c..00000000000
--- a/chromium/ash/shell/shelf_delegate_impl.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_SHELF_DELEGATE_IMPL_H_
-#define ASH_SHELL_SHELF_DELEGATE_IMPL_H_
-
-#include "ash/shelf/shelf_delegate.h"
-#include "base/compiler_specific.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-namespace shell {
-
-class WindowWatcher;
-
-class ShelfDelegateImpl : public ShelfDelegate {
- public:
- explicit ShelfDelegateImpl(WindowWatcher* watcher);
- virtual ~ShelfDelegateImpl();
-
- void set_watcher(WindowWatcher* watcher) { watcher_ = watcher; }
-
- // ShelfDelegate overrides:
- virtual void OnLauncherCreated(Launcher* launcher) OVERRIDE;
- virtual void OnLauncherDestroyed(Launcher* launcher) OVERRIDE;
- virtual LauncherID GetLauncherIDForAppID(const std::string& app_id) OVERRIDE;
- virtual const std::string& GetAppIDForLauncherID(LauncherID id) OVERRIDE;
- virtual void PinAppWithID(const std::string& app_id) OVERRIDE;
- virtual bool IsAppPinned(const std::string& app_id) OVERRIDE;
- virtual bool CanPin() const OVERRIDE;
- virtual void UnpinAppWithID(const std::string& app_id) OVERRIDE;
-
- private:
- // Used to update Launcher. Owned by main.
- WindowWatcher* watcher_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfDelegateImpl);
-};
-
-} // namespace shell
-} // namespace ash
-
-#endif // ASH_SHELL_SHELF_DELEGATE_IMPL_H_
diff --git a/chromium/ash/shell/shell_delegate_impl.cc b/chromium/ash/shell/shell_delegate_impl.cc
deleted file mode 100644
index 6c958391cbd..00000000000
--- a/chromium/ash/shell/shell_delegate_impl.cc
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell/shell_delegate_impl.h"
-
-#include "ash/accessibility_delegate.h"
-#include "ash/caps_lock_delegate_stub.h"
-#include "ash/default_accessibility_delegate.h"
-#include "ash/default_user_wallpaper_delegate.h"
-#include "ash/host/root_window_host_factory.h"
-#include "ash/media_delegate.h"
-#include "ash/new_window_delegate.h"
-#include "ash/session_state_delegate.h"
-#include "ash/session_state_delegate_stub.h"
-#include "ash/shell/context_menu.h"
-#include "ash/shell/example_factory.h"
-#include "ash/shell/keyboard_controller_proxy_stub.h"
-#include "ash/shell/shelf_delegate_impl.h"
-#include "ash/shell/toplevel_window.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/tray/default_system_tray_delegate.h"
-#include "ash/wm/window_state.h"
-#include "base/message_loop/message_loop.h"
-#include "ui/aura/window.h"
-#include "ui/views/corewm/input_method_event_filter.h"
-
-namespace ash {
-namespace shell {
-namespace {
-
-class NewWindowDelegateImpl : public NewWindowDelegate {
- public:
- NewWindowDelegateImpl() {}
- virtual ~NewWindowDelegateImpl() {}
-
- virtual void NewTab() OVERRIDE {}
- virtual void NewWindow(bool incognito) OVERRIDE {
- ash::shell::ToplevelWindow::CreateParams create_params;
- create_params.can_resize = true;
- create_params.can_maximize = true;
- ash::shell::ToplevelWindow::CreateToplevelWindow(create_params);
- }
- virtual void OpenFileManager() OVERRIDE {}
- virtual void OpenCrosh() OVERRIDE {}
- virtual void RestoreTab() OVERRIDE {}
- virtual void ShowKeyboardOverlay() OVERRIDE {}
- virtual void ShowTaskManager() OVERRIDE {}
- virtual void OpenFeedbackPage() OVERRIDE {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NewWindowDelegateImpl);
-};
-
-class MediaDelegateImpl : public MediaDelegate {
- public:
- MediaDelegateImpl() {}
- virtual ~MediaDelegateImpl() {}
-
- virtual void HandleMediaNextTrack() OVERRIDE {}
- virtual void HandleMediaPlayPause() OVERRIDE {}
- virtual void HandleMediaPrevTrack() OVERRIDE {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MediaDelegateImpl);
-};
-
-} // namespace
-
-ShellDelegateImpl::ShellDelegateImpl()
- : watcher_(NULL),
- shelf_delegate_(NULL),
- browser_context_(NULL) {
-}
-
-ShellDelegateImpl::~ShellDelegateImpl() {
-}
-
-void ShellDelegateImpl::SetWatcher(WindowWatcher* watcher) {
- watcher_ = watcher;
- if (shelf_delegate_)
- shelf_delegate_->set_watcher(watcher);
-}
-
-bool ShellDelegateImpl::IsFirstRunAfterBoot() const {
- return false;
-}
-
-bool ShellDelegateImpl::IsIncognitoAllowed() const {
- return true;
-}
-
-bool ShellDelegateImpl::IsMultiProfilesEnabled() const {
- return false;
-}
-
-bool ShellDelegateImpl::IsRunningInForcedAppMode() const {
- return false;
-}
-
-void ShellDelegateImpl::PreInit() {
-}
-
-void ShellDelegateImpl::Shutdown() {
-}
-
-void ShellDelegateImpl::Exit() {
- base::MessageLoopForUI::current()->Quit();
-}
-
-keyboard::KeyboardControllerProxy*
- ShellDelegateImpl::CreateKeyboardControllerProxy() {
- return new KeyboardControllerProxyStub();
-}
-
-content::BrowserContext* ShellDelegateImpl::GetActiveBrowserContext() {
- return browser_context_;
-}
-
-app_list::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() {
- return ash::shell::CreateAppListViewDelegate();
-}
-
-ShelfDelegate* ShellDelegateImpl::CreateShelfDelegate(ShelfModel* model) {
- shelf_delegate_ = new ShelfDelegateImpl(watcher_);
- return shelf_delegate_;
-}
-
-ash::SystemTrayDelegate* ShellDelegateImpl::CreateSystemTrayDelegate() {
- return new DefaultSystemTrayDelegate;
-}
-
-ash::UserWallpaperDelegate* ShellDelegateImpl::CreateUserWallpaperDelegate() {
- return new DefaultUserWallpaperDelegate();
-}
-
-ash::CapsLockDelegate* ShellDelegateImpl::CreateCapsLockDelegate() {
- return new CapsLockDelegateStub;
-}
-
-ash::SessionStateDelegate* ShellDelegateImpl::CreateSessionStateDelegate() {
- return new SessionStateDelegateStub;
-}
-
-ash::AccessibilityDelegate* ShellDelegateImpl::CreateAccessibilityDelegate() {
- return new internal::DefaultAccessibilityDelegate;
-}
-
-ash::NewWindowDelegate* ShellDelegateImpl::CreateNewWindowDelegate() {
- return new NewWindowDelegateImpl;
-}
-
-ash::MediaDelegate* ShellDelegateImpl::CreateMediaDelegate() {
- return new MediaDelegateImpl;
-}
-
-aura::client::UserActionClient* ShellDelegateImpl::CreateUserActionClient() {
- return NULL;
-}
-
-ui::MenuModel* ShellDelegateImpl::CreateContextMenu(aura::Window* root) {
- return new ContextMenu(root);
-}
-
-RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() {
- return RootWindowHostFactory::Create();
-}
-
-base::string16 ShellDelegateImpl::GetProductName() const {
- return base::string16();
-}
-
-} // namespace shell
-} // namespace ash
diff --git a/chromium/ash/shell/shell_delegate_impl.h b/chromium/ash/shell/shell_delegate_impl.h
deleted file mode 100644
index 473c42c5dbc..00000000000
--- a/chromium/ash/shell/shell_delegate_impl.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_SHELL_DELEGATE_IMPL_H_
-#define ASH_SHELL_SHELL_DELEGATE_IMPL_H_
-
-#include <string>
-
-#include "ash/shell_delegate.h"
-#include "base/compiler_specific.h"
-
-namespace content {
-class BrowserContext;
-}
-
-namespace keyboard {
-class KeyboardControllerProxy;
-}
-
-namespace ash {
-namespace shell {
-
-class ShelfDelegateImpl;
-class WindowWatcher;
-
-class ShellDelegateImpl : public ash::ShellDelegate {
- public:
- ShellDelegateImpl();
- virtual ~ShellDelegateImpl();
-
- void SetWatcher(WindowWatcher* watcher);
- void set_browser_context(content::BrowserContext* browser_context) {
- browser_context_ = browser_context;
- }
-
- virtual bool IsFirstRunAfterBoot() const OVERRIDE;
- virtual bool IsIncognitoAllowed() const OVERRIDE;
- virtual bool IsMultiProfilesEnabled() const OVERRIDE;
- virtual bool IsRunningInForcedAppMode() const OVERRIDE;
- virtual void PreInit() OVERRIDE;
- virtual void Shutdown() OVERRIDE;
- virtual void Exit() OVERRIDE;
- virtual keyboard::KeyboardControllerProxy*
- CreateKeyboardControllerProxy() OVERRIDE;
- virtual content::BrowserContext* GetActiveBrowserContext() OVERRIDE;
- virtual app_list::AppListViewDelegate* CreateAppListViewDelegate() OVERRIDE;
- virtual ShelfDelegate* CreateShelfDelegate(ShelfModel* model) OVERRIDE;
- virtual ash::SystemTrayDelegate* CreateSystemTrayDelegate() OVERRIDE;
- virtual ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() OVERRIDE;
- virtual ash::CapsLockDelegate* CreateCapsLockDelegate() OVERRIDE;
- virtual ash::SessionStateDelegate* CreateSessionStateDelegate() OVERRIDE;
- virtual ash::AccessibilityDelegate* CreateAccessibilityDelegate() OVERRIDE;
- virtual ash::NewWindowDelegate* CreateNewWindowDelegate() OVERRIDE;
- virtual ash::MediaDelegate* CreateMediaDelegate() OVERRIDE;
- virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE;
- virtual ui::MenuModel* CreateContextMenu(
- aura::Window* root_window) OVERRIDE;
- virtual RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE;
- virtual base::string16 GetProductName() const OVERRIDE;
-
- private:
- // Used to update Launcher. Owned by main.
- WindowWatcher* watcher_;
-
- ShelfDelegateImpl* shelf_delegate_;
- content::BrowserContext* browser_context_;
-
- DISALLOW_COPY_AND_ASSIGN(ShellDelegateImpl);
-};
-
-} // namespace shell
-} // namespace ash
-
-#endif // ASH_SHELL_SHELL_DELEGATE_IMPL_H_
diff --git a/chromium/ash/shell/shell_main.cc b/chromium/ash/shell/shell_main.cc
deleted file mode 100644
index b45ca5e9da3..00000000000
--- a/chromium/ash/shell/shell_main.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell/content_client/shell_main_delegate.h"
-#include "content/public/app/content_main.h"
-#include "sandbox/win/src/sandbox_types.h"
-#include "ui/views/corewm/transient_window_stacking_client.h"
-
-#if defined(OS_WIN)
-#include "content/public/app/startup_helper_win.h"
-#endif
-
-namespace {
-
-void CommonInit() {
- // SetWindowStackingClient() takes ownership of TransientWindowStackingClient.
- aura::client::SetWindowStackingClient(
- new views::corewm::TransientWindowStackingClient);
-}
-
-} // namespace
-
-#if defined(OS_WIN)
-int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) {
- sandbox::SandboxInterfaceInfo sandbox_info = {0};
- content::InitializeSandboxInfo(&sandbox_info);
- ash::shell::ShellMainDelegate delegate;
- CommonInit();
- return content::ContentMain(instance, &sandbox_info, &delegate);
-}
-#else
-int main(int argc, const char** argv) {
- ash::shell::ShellMainDelegate delegate;
- CommonInit();
- return content::ContentMain(argc, argv, &delegate);
-}
-#endif
diff --git a/chromium/ash/shell/shell_main_parts.cc b/chromium/ash/shell/shell_main_parts.cc
deleted file mode 100644
index 8cad410084e..00000000000
--- a/chromium/ash/shell/shell_main_parts.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell/shell_main_parts.h"
-
-#include "base/i18n/icu_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/base/ui_base_paths.h"
-
-namespace ash {
-namespace shell {
-
-void PreMainMessageLoopStart() {
- ui::RegisterPathProvider();
- base::i18n::InitializeICU();
- ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
-}
-
-} // namespace ash
-} // namespace shell
diff --git a/chromium/ash/shell/shell_main_parts.h b/chromium/ash/shell/shell_main_parts.h
deleted file mode 100644
index c0452e95d31..00000000000
--- a/chromium/ash/shell/shell_main_parts.h
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_SHELL_MAIN_PARTS_H_
-#define ASH_SHELL_SHELL_MAIN_PARTS_H_
-
-namespace ash {
-namespace shell {
-
-// Platform initializations prior to the start of the main message loop.
-void PreMainMessageLoopStart();
-
-} // namespace shell
-} // namespace ash
-
-#endif // ASH_SHELL_SHELL_MAIN_PARTS_H_
diff --git a/chromium/ash/shell/toplevel_window.cc b/chromium/ash/shell/toplevel_window.cc
deleted file mode 100644
index ea8b79fe528..00000000000
--- a/chromium/ash/shell/toplevel_window.cc
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell/toplevel_window.h"
-
-#include "ash/display/display_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/wm/window_positioner.h"
-#include "ash/wm/window_state.h"
-#include "base/strings/utf_string_conversions.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/canvas.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace shell {
-namespace {
-
-struct SavedState {
- gfx::Rect bounds;
- ui::WindowShowState show_state;
-};
-
-// The last window state in ash_shell. We don't bother deleting
-// this on shutdown.
-SavedState* saved_state = NULL;
-
-} // namespace
-
-ToplevelWindow::CreateParams::CreateParams()
- : can_resize(false),
- can_maximize(false) {
-}
-
-// static
-views::Widget* ToplevelWindow::CreateToplevelWindow(
- const CreateParams& params) {
- views::Widget* widget = views::Widget::CreateWindowWithContext(
- new ToplevelWindow(params), Shell::GetPrimaryRootWindow());
- widget->GetNativeView()->SetName("Examples:ToplevelWindow");
- wm::WindowState* window_state = wm::GetWindowState(widget->GetNativeView());
- window_state->set_window_position_managed(true);
- widget->Show();
- return widget;
-}
-
-// static
-void ToplevelWindow::ClearSavedStateForTest() {
- delete saved_state;
- saved_state = NULL;
-}
-
-ToplevelWindow::ToplevelWindow(const CreateParams& params) : params_(params) {
-}
-
-ToplevelWindow::~ToplevelWindow() {
-}
-
-void ToplevelWindow::OnPaint(gfx::Canvas* canvas) {
- canvas->FillRect(GetLocalBounds(), SK_ColorDKGRAY);
-}
-
-base::string16 ToplevelWindow::GetWindowTitle() const {
- return ASCIIToUTF16("Examples: Toplevel Window");
-}
-
-void ToplevelWindow::SaveWindowPlacement(const gfx::Rect& bounds,
- ui::WindowShowState show_state) {
- if (!saved_state)
- saved_state = new SavedState;
- saved_state->bounds = bounds;
- saved_state->show_state = show_state;
-}
-
-bool ToplevelWindow::GetSavedWindowPlacement(
- const views::Widget* widget,
- gfx::Rect* bounds,
- ui::WindowShowState* show_state) const {
- bool is_saved_bounds = !!saved_state;
- if (saved_state) {
- *bounds = saved_state->bounds;
- *show_state = saved_state->show_state;
- } else {
- // Initial default bounds.
- bounds->SetRect(10, 150, 300, 300);
- }
- ash::WindowPositioner::GetBoundsAndShowStateForNewWindow(
- ash::Shell::GetScreen(),
- NULL,
- is_saved_bounds,
- *show_state,
- bounds,
- show_state);
- return true;
-}
-
-views::View* ToplevelWindow::GetContentsView() {
- return this;
-}
-
-bool ToplevelWindow::CanResize() const {
- return params_.can_resize;
-}
-
-bool ToplevelWindow::CanMaximize() const {
- return params_.can_maximize;
-}
-
-} // namespace shell
-} // namespace ash
diff --git a/chromium/ash/shell/toplevel_window.h b/chromium/ash/shell/toplevel_window.h
deleted file mode 100644
index 8a31d269696..00000000000
--- a/chromium/ash/shell/toplevel_window.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_TOPLEVEL_WINDOW_H_
-#define ASH_SHELL_TOPLEVEL_WINDOW_H_
-
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-namespace shell {
-
-class ToplevelWindow : public views::WidgetDelegateView {
- public:
- struct CreateParams {
- CreateParams();
-
- bool can_resize;
- bool can_maximize;
- };
- static views::Widget* CreateToplevelWindow(
- const CreateParams& params);
-
- // Clears saved show state and bounds used to position
- // a new window.
- static void ClearSavedStateForTest();
-
- private:
- explicit ToplevelWindow(const CreateParams& params);
- virtual ~ToplevelWindow();
-
- // Overridden from views::View:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
-
- // Overridden from views::WidgetDelegate:
- virtual base::string16 GetWindowTitle() const OVERRIDE;
- virtual void SaveWindowPlacement(
- const gfx::Rect& bounds,
- ui::WindowShowState show_state) OVERRIDE;
- virtual bool GetSavedWindowPlacement(
- const views::Widget* widget,
- gfx::Rect* bounds,
- ui::WindowShowState* show_state) const OVERRIDE;
- virtual View* GetContentsView() OVERRIDE;
- virtual bool CanResize() const OVERRIDE;
- virtual bool CanMaximize() const OVERRIDE;
-
- const CreateParams params_;
-
- DISALLOW_COPY_AND_ASSIGN(ToplevelWindow);
-};
-
-} // namespace shell
-} // namespace ash
-
-#endif // ASH_SHELL_TOPLEVEL_WINDOW_H_
diff --git a/chromium/ash/shell/widgets.cc b/chromium/ash/shell/widgets.cc
deleted file mode 100644
index 01654906fbc..00000000000
--- a/chromium/ash/shell/widgets.cc
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell.h"
-#include "base/strings/utf_string_conversions.h" // ASCIIToUTF16
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/canvas.h"
-#include "ui/views/controls/button/checkbox.h"
-#include "ui/views/controls/button/label_button.h"
-#include "ui/views/controls/button/radio_button.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace {
-
-// Default window position.
-const int kWindowLeft = 170;
-const int kWindowTop = 200;
-
-// Default window size.
-const int kWindowWidth = 400;
-const int kWindowHeight = 400;
-
-// A window showing samples of commonly used widgets.
-class WidgetsWindow : public views::WidgetDelegateView {
- public:
- WidgetsWindow();
- virtual ~WidgetsWindow();
-
- // Overridden from views::View:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual gfx::Size GetPreferredSize() OVERRIDE;
-
- // Overridden from views::WidgetDelegate:
- virtual views::View* GetContentsView() OVERRIDE;
- virtual base::string16 GetWindowTitle() const OVERRIDE;
- virtual bool CanResize() const OVERRIDE;
-
- private:
- views::LabelButton* button_;
- views::LabelButton* disabled_button_;
- views::Checkbox* checkbox_;
- views::Checkbox* checkbox_disabled_;
- views::Checkbox* checkbox_checked_;
- views::Checkbox* checkbox_checked_disabled_;
- views::RadioButton* radio_button_;
- views::RadioButton* radio_button_disabled_;
- views::RadioButton* radio_button_selected_;
- views::RadioButton* radio_button_selected_disabled_;
-};
-
-WidgetsWindow::WidgetsWindow()
- : button_(new views::LabelButton(NULL, ASCIIToUTF16("Button"))),
- disabled_button_(
- new views::LabelButton(NULL, ASCIIToUTF16("Disabled button"))),
- checkbox_(new views::Checkbox(ASCIIToUTF16("Checkbox"))),
- checkbox_disabled_(new views::Checkbox(
- ASCIIToUTF16("Checkbox disabled"))),
- checkbox_checked_(new views::Checkbox(ASCIIToUTF16("Checkbox checked"))),
- checkbox_checked_disabled_(new views::Checkbox(
- ASCIIToUTF16("Checkbox checked disabled"))),
- radio_button_(new views::RadioButton(ASCIIToUTF16("Radio button"), 0)),
- radio_button_disabled_(new views::RadioButton(
- ASCIIToUTF16("Radio button disabled"), 0)),
- radio_button_selected_(new views::RadioButton(
- ASCIIToUTF16("Radio button selected"), 0)),
- radio_button_selected_disabled_(new views::RadioButton(
- ASCIIToUTF16("Radio button selected disabled"), 1)) {
- button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- AddChildView(button_);
- disabled_button_->SetEnabled(false);
- disabled_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- AddChildView(disabled_button_);
- AddChildView(checkbox_);
- checkbox_disabled_->SetEnabled(false);
- AddChildView(checkbox_disabled_);
- checkbox_checked_->SetChecked(true);
- AddChildView(checkbox_checked_);
- checkbox_checked_disabled_->SetChecked(true);
- checkbox_checked_disabled_->SetEnabled(false);
- AddChildView(checkbox_checked_disabled_);
- AddChildView(radio_button_);
- radio_button_disabled_->SetEnabled(false);
- AddChildView(radio_button_disabled_);
- radio_button_selected_->SetChecked(true);
- AddChildView(radio_button_selected_);
- radio_button_selected_disabled_->SetChecked(true);
- radio_button_selected_disabled_->SetEnabled(false);
- AddChildView(radio_button_selected_disabled_);
-}
-
-WidgetsWindow::~WidgetsWindow() {
-}
-
-void WidgetsWindow::OnPaint(gfx::Canvas* canvas) {
- canvas->FillRect(GetLocalBounds(), SK_ColorWHITE);
-}
-
-void WidgetsWindow::Layout() {
- const int kVerticalPad = 5;
- int left = 5;
- int top = kVerticalPad;
- for (int i = 0; i < child_count(); ++i) {
- views::View* view = child_at(i);
- gfx::Size preferred = view->GetPreferredSize();
- view->SetBounds(left, top, preferred.width(), preferred.height());
- top += preferred.height() + kVerticalPad;
- }
-}
-
-gfx::Size WidgetsWindow::GetPreferredSize() {
- return gfx::Size(kWindowWidth, kWindowHeight);
-}
-
-views::View* WidgetsWindow::GetContentsView() {
- return this;
-}
-
-base::string16 WidgetsWindow::GetWindowTitle() const {
- return ASCIIToUTF16("Examples: Widgets");
-}
-
-bool WidgetsWindow::CanResize() const {
- return true;
-}
-
-} // namespace
-
-namespace ash {
-namespace shell {
-
-void CreateWidgetsWindow() {
- gfx::Rect bounds(kWindowLeft, kWindowTop, kWindowWidth, kWindowHeight);
- views::Widget* widget =
- views::Widget::CreateWindowWithContextAndBounds(
- new WidgetsWindow, Shell::GetPrimaryRootWindow(), bounds);
- widget->GetNativeView()->SetName("WidgetsWindow");
- widget->Show();
-}
-
-} // namespace shell
-} // namespace ash
diff --git a/chromium/ash/shell/window_type_launcher.cc b/chromium/ash/shell/window_type_launcher.cc
deleted file mode 100644
index d245ecf367e..00000000000
--- a/chromium/ash/shell/window_type_launcher.cc
+++ /dev/null
@@ -1,399 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell/window_type_launcher.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/screensaver/screensaver_view.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell/example_factory.h"
-#include "ash/shell/panel_window.h"
-#include "ash/shell/toplevel_window.h"
-#include "ash/shell_delegate.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/system/web_notification/web_notification_tray.h"
-#include "base/bind.h"
-#include "base/strings/utf_string_conversions.h"
-#include "base/time/time.h"
-#include "content/public/browser/browser_thread.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/gfx/canvas.h"
-#include "ui/message_center/message_center.h"
-#include "ui/message_center/notification_types.h"
-#include "ui/views/controls/button/label_button.h"
-#include "ui/views/controls/menu/menu_item_view.h"
-#include "ui/views/controls/menu/menu_runner.h"
-#include "ui/views/corewm/shadow_types.h"
-#include "ui/views/examples/examples_window_with_content.h"
-#include "ui/views/layout/grid_layout.h"
-#include "ui/views/test/child_modal_window.h"
-#include "ui/views/widget/widget.h"
-
-using views::MenuItemView;
-using views::MenuRunner;
-
-namespace ash {
-namespace shell {
-
-namespace {
-
-SkColor g_colors[] = { SK_ColorRED,
- SK_ColorYELLOW,
- SK_ColorBLUE,
- SK_ColorGREEN };
-int g_color_index = 0;
-
-class ModalWindow : public views::WidgetDelegateView,
- public views::ButtonListener {
- public:
- explicit ModalWindow(ui::ModalType modal_type)
- : modal_type_(modal_type),
- color_(g_colors[g_color_index]),
- open_button_(new views::LabelButton(this, ASCIIToUTF16("Moar!"))) {
- ++g_color_index %= arraysize(g_colors);
- open_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- AddChildView(open_button_);
- }
- virtual ~ModalWindow() {
- }
-
- static void OpenModalWindow(aura::Window* parent, ui::ModalType modal_type) {
- views::Widget* widget =
- views::Widget::CreateWindowWithParent(new ModalWindow(modal_type),
- parent);
- widget->GetNativeView()->SetName("ModalWindow");
- widget->Show();
- }
-
- // Overridden from views::View:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- canvas->FillRect(GetLocalBounds(), color_);
- }
- virtual gfx::Size GetPreferredSize() OVERRIDE {
- return gfx::Size(200, 200);
- }
- virtual void Layout() OVERRIDE {
- gfx::Size open_ps = open_button_->GetPreferredSize();
- gfx::Rect local_bounds = GetLocalBounds();
- open_button_->SetBounds(
- 5, local_bounds.bottom() - open_ps.height() - 5,
- open_ps.width(), open_ps.height());
- }
-
- // Overridden from views::WidgetDelegate:
- virtual views::View* GetContentsView() OVERRIDE {
- return this;
- }
- virtual bool CanResize() const OVERRIDE {
- return true;
- }
- virtual base::string16 GetWindowTitle() const OVERRIDE {
- return ASCIIToUTF16("Modal Window");
- }
- virtual ui::ModalType GetModalType() const OVERRIDE {
- return modal_type_;
- }
-
- // Overridden from views::ButtonListener:
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE {
- DCHECK(sender == open_button_);
- OpenModalWindow(GetWidget()->GetNativeView(), modal_type_);
- }
-
- private:
- ui::ModalType modal_type_;
- SkColor color_;
- views::LabelButton* open_button_;
-
- DISALLOW_COPY_AND_ASSIGN(ModalWindow);
-};
-
-class NonModalTransient : public views::WidgetDelegateView {
- public:
- NonModalTransient()
- : color_(g_colors[g_color_index]) {
- ++g_color_index %= arraysize(g_colors);
- }
- virtual ~NonModalTransient() {
- }
-
- static void OpenNonModalTransient(aura::Window* parent) {
- views::Widget* widget =
- views::Widget::CreateWindowWithParent(new NonModalTransient, parent);
- widget->GetNativeView()->SetName("NonModalTransient");
- widget->Show();
- }
-
- static void ToggleNonModalTransient(aura::Window* parent) {
- if (!non_modal_transient_) {
- non_modal_transient_ =
- views::Widget::CreateWindowWithParent(new NonModalTransient, parent);
- non_modal_transient_->GetNativeView()->SetName("NonModalTransient");
- }
- if (non_modal_transient_->IsVisible())
- non_modal_transient_->Hide();
- else
- non_modal_transient_->Show();
- }
-
- // Overridden from views::View:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- canvas->FillRect(GetLocalBounds(), color_);
- }
- virtual gfx::Size GetPreferredSize() OVERRIDE {
- return gfx::Size(250, 250);
- }
-
- // Overridden from views::WidgetDelegate:
- virtual views::View* GetContentsView() OVERRIDE {
- return this;
- }
- virtual bool CanResize() const OVERRIDE {
- return true;
- }
- virtual base::string16 GetWindowTitle() const OVERRIDE {
- return ASCIIToUTF16("Non-Modal Transient");
- }
- virtual void DeleteDelegate() OVERRIDE {
- if (GetWidget() == non_modal_transient_)
- non_modal_transient_ = NULL;
-
- delete this;
- }
-
- private:
- SkColor color_;
-
- static views::Widget* non_modal_transient_;
-
- DISALLOW_COPY_AND_ASSIGN(NonModalTransient);
-};
-
-// static
-views::Widget* NonModalTransient::non_modal_transient_ = NULL;
-
-void AddViewToLayout(views::GridLayout* layout, views::View* view) {
- layout->StartRow(0, 0);
- layout->AddView(view);
- layout->AddPaddingRow(0, 5);
-}
-
-} // namespace
-
-void InitWindowTypeLauncher() {
- views::Widget* widget =
- views::Widget::CreateWindowWithContextAndBounds(
- new WindowTypeLauncher,
- Shell::GetPrimaryRootWindow(),
- gfx::Rect(120, 150, 300, 410));
- widget->GetNativeView()->SetName("WindowTypeLauncher");
- views::corewm::SetShadowType(widget->GetNativeView(),
- views::corewm::SHADOW_TYPE_RECTANGULAR);
- widget->Show();
-}
-
-WindowTypeLauncher::WindowTypeLauncher()
- : create_button_(new views::LabelButton(
- this, ASCIIToUTF16("Create Window"))),
- panel_button_(new views::LabelButton(
- this, ASCIIToUTF16("Create Panel"))),
- create_nonresizable_button_(new views::LabelButton(
- this, ASCIIToUTF16("Create Non-Resizable Window"))),
- bubble_button_(new views::LabelButton(
- this, ASCIIToUTF16("Create Pointy Bubble"))),
- lock_button_(new views::LabelButton(
- this, ASCIIToUTF16("Lock Screen"))),
- widgets_button_(new views::LabelButton(
- this, ASCIIToUTF16("Show Example Widgets"))),
- system_modal_button_(new views::LabelButton(
- this, ASCIIToUTF16("Open System Modal Window"))),
- window_modal_button_(new views::LabelButton(
- this, ASCIIToUTF16("Open Window Modal Window"))),
- child_modal_button_(new views::LabelButton(
- this, ASCIIToUTF16("Open Child Modal Window"))),
- transient_button_(new views::LabelButton(
- this, ASCIIToUTF16("Open Non-Modal Transient Window"))),
- examples_button_(new views::LabelButton(
- this, ASCIIToUTF16("Open Views Examples Window"))),
- show_hide_window_button_(new views::LabelButton(
- this, ASCIIToUTF16("Show/Hide a Window"))),
- show_screensaver_(new views::LabelButton(
- this, ASCIIToUTF16("Show the Screensaver [for 5 seconds]"))),
- show_web_notification_(new views::LabelButton(
- this, ASCIIToUTF16("Show a web/app notification"))) {
- create_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- panel_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- create_nonresizable_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- bubble_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- lock_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- widgets_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- system_modal_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- window_modal_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- child_modal_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- transient_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- examples_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- show_hide_window_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- show_screensaver_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
- show_web_notification_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
-
- views::GridLayout* layout = new views::GridLayout(this);
- layout->SetInsets(5, 5, 5, 5);
- SetLayoutManager(layout);
- views::ColumnSet* column_set = layout->AddColumnSet(0);
- column_set->AddColumn(views::GridLayout::LEADING,
- views::GridLayout::CENTER,
- 0,
- views::GridLayout::USE_PREF,
- 0,
- 0);
- AddViewToLayout(layout, create_button_);
- AddViewToLayout(layout, panel_button_);
- AddViewToLayout(layout, create_nonresizable_button_);
- AddViewToLayout(layout, bubble_button_);
- AddViewToLayout(layout, lock_button_);
- AddViewToLayout(layout, widgets_button_);
- AddViewToLayout(layout, system_modal_button_);
- AddViewToLayout(layout, window_modal_button_);
- AddViewToLayout(layout, child_modal_button_);
- AddViewToLayout(layout, transient_button_);
- AddViewToLayout(layout, examples_button_);
- AddViewToLayout(layout, show_hide_window_button_);
- AddViewToLayout(layout, show_screensaver_);
- AddViewToLayout(layout, show_web_notification_);
- set_context_menu_controller(this);
-}
-
-WindowTypeLauncher::~WindowTypeLauncher() {
-}
-
-void WindowTypeLauncher::OnPaint(gfx::Canvas* canvas) {
- canvas->FillRect(GetLocalBounds(), SK_ColorWHITE);
-}
-
-bool WindowTypeLauncher::OnMousePressed(const ui::MouseEvent& event) {
- // Overridden so we get OnMouseReleased and can show the context menu.
- return true;
-}
-
-views::View* WindowTypeLauncher::GetContentsView() {
- return this;
-}
-
-bool WindowTypeLauncher::CanResize() const {
- return true;
-}
-
-base::string16 WindowTypeLauncher::GetWindowTitle() const {
- return ASCIIToUTF16("Examples: Window Builder");
-}
-
-bool WindowTypeLauncher::CanMaximize() const {
- return true;
-}
-
-void WindowTypeLauncher::ButtonPressed(views::Button* sender,
- const ui::Event& event) {
- if (sender == create_button_) {
- ToplevelWindow::CreateParams params;
- params.can_resize = true;
- params.can_maximize = true;
- ToplevelWindow::CreateToplevelWindow(params);
- } else if (sender == panel_button_) {
- PanelWindow::CreatePanelWindow(gfx::Rect());
- } else if (sender == create_nonresizable_button_) {
- ToplevelWindow::CreateToplevelWindow(ToplevelWindow::CreateParams());
- } else if (sender == bubble_button_) {
- CreatePointyBubble(sender);
- } else if (sender == lock_button_) {
- Shell::GetInstance()->session_state_delegate()->LockScreen();
- } else if (sender == widgets_button_) {
- CreateWidgetsWindow();
- } else if (sender == system_modal_button_) {
- ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(),
- ui::MODAL_TYPE_SYSTEM);
- } else if (sender == window_modal_button_) {
- ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(),
- ui::MODAL_TYPE_WINDOW);
- } else if (sender == child_modal_button_) {
- views::test::CreateChildModalParent(
- GetWidget()->GetNativeView()->GetRootWindow());
- } else if (sender == transient_button_) {
- NonModalTransient::OpenNonModalTransient(GetWidget()->GetNativeView());
- } else if (sender == show_hide_window_button_) {
- NonModalTransient::ToggleNonModalTransient(GetWidget()->GetNativeView());
- } else if (sender == show_screensaver_) {
- ash::ShowScreensaver(GURL("http://www.google.com"));
- content::BrowserThread::PostDelayedTask(content::BrowserThread::UI,
- FROM_HERE,
- base::Bind(&ash::CloseScreensaver),
- base::TimeDelta::FromSeconds(5));
-
- } else if (sender == show_web_notification_) {
- scoped_ptr<message_center::Notification> notification;
- notification.reset(new message_center::Notification(
- message_center::NOTIFICATION_TYPE_SIMPLE,
- "id0",
- ASCIIToUTF16("Test Shell Web Notification"),
- ASCIIToUTF16("Notification message body."),
- gfx::Image(),
- ASCIIToUTF16("www.testshell.org"),
- message_center::NotifierId(
- message_center::NotifierId::APPLICATION, "test-id"),
- message_center::RichNotificationData(),
- NULL /* delegate */));
-
- ash::Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget()
- ->web_notification_tray()->message_center()
- ->AddNotification(notification.Pass());
- } else if (sender == examples_button_) {
- views::examples::ShowExamplesWindowWithContent(
- views::examples::DO_NOTHING_ON_CLOSE,
- Shell::GetInstance()->delegate()->GetActiveBrowserContext(),
- NULL);
- }
-}
-
-void WindowTypeLauncher::ExecuteCommand(int id, int event_flags) {
- switch (id) {
- case COMMAND_NEW_WINDOW:
- InitWindowTypeLauncher();
- break;
- case COMMAND_TOGGLE_FULLSCREEN:
- GetWidget()->SetFullscreen(!GetWidget()->IsFullscreen());
- break;
- default:
- break;
- }
-}
-
-void WindowTypeLauncher::ShowContextMenuForView(
- views::View* source,
- const gfx::Point& point,
- ui::MenuSourceType source_type) {
- MenuItemView* root = new MenuItemView(this);
- root->AppendMenuItem(COMMAND_NEW_WINDOW,
- ASCIIToUTF16("New Window"),
- MenuItemView::NORMAL);
- root->AppendMenuItem(COMMAND_TOGGLE_FULLSCREEN,
- ASCIIToUTF16("Toggle FullScreen"),
- MenuItemView::NORMAL);
- // MenuRunner takes ownership of root.
- menu_runner_.reset(new MenuRunner(root));
- if (menu_runner_->RunMenuAt(GetWidget(), NULL,
- gfx::Rect(point, gfx::Size()),
- MenuItemView::TOPLEFT,
- source_type,
- MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) ==
- MenuRunner::MENU_DELETED)
- return;
-}
-
-} // namespace shell
-} // namespace ash
diff --git a/chromium/ash/shell/window_type_launcher.h b/chromium/ash/shell/window_type_launcher.h
deleted file mode 100644
index 7a088d90c50..00000000000
--- a/chromium/ash/shell/window_type_launcher.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_WINDOW_TYPE_LAUNCHER_H_
-#define ASH_SHELL_WINDOW_TYPE_LAUNCHER_H_
-
-#include "ui/views/context_menu_controller.h"
-#include "ui/views/controls/button/button.h"
-#include "ui/views/controls/menu/menu_delegate.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace views {
-class MenuRunner;
-class LabelButton;
-}
-
-namespace ash {
-namespace shell {
-
-// The contents view/delegate of a window that shows some buttons that create
-// various window types.
-class WindowTypeLauncher : public views::WidgetDelegateView,
- public views::ButtonListener,
- public views::MenuDelegate,
- public views::ContextMenuController {
- public:
- WindowTypeLauncher();
- virtual ~WindowTypeLauncher();
-
- private:
- typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair;
-
- enum MenuCommands {
- COMMAND_NEW_WINDOW = 1,
- COMMAND_TOGGLE_FULLSCREEN = 3,
- };
-
- // Overridden from views::View:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
-
- // Overridden from views::WidgetDelegate:
- virtual views::View* GetContentsView() OVERRIDE;
- virtual bool CanResize() const OVERRIDE;
- virtual base::string16 GetWindowTitle() const OVERRIDE;
- virtual bool CanMaximize() const OVERRIDE;
-
- // Overridden from views::ButtonListener:
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
-
- // Overridden from views::MenuDelegate:
- virtual void ExecuteCommand(int id, int event_flags) OVERRIDE;
-
- // Override from views::ContextMenuController:
- virtual void ShowContextMenuForView(views::View* source,
- const gfx::Point& point,
- ui::MenuSourceType source_type) OVERRIDE;
-
- views::LabelButton* create_button_;
- views::LabelButton* create_persistant_button_;
- views::LabelButton* panel_button_;
- views::LabelButton* create_nonresizable_button_;
- views::LabelButton* bubble_button_;
- views::LabelButton* lock_button_;
- views::LabelButton* widgets_button_;
- views::LabelButton* system_modal_button_;
- views::LabelButton* window_modal_button_;
- views::LabelButton* child_modal_button_;
- views::LabelButton* transient_button_;
- views::LabelButton* examples_button_;
- views::LabelButton* show_hide_window_button_;
- views::LabelButton* show_screensaver_;
- views::LabelButton* show_web_notification_;
- scoped_ptr<views::MenuRunner> menu_runner_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowTypeLauncher);
-};
-
-} // namespace shell
-} // namespace ash
-
-#endif // ASH_SHELL_WINDOW_TYPE_LAUNCHER_H_
diff --git a/chromium/ash/shell/window_watcher.cc b/chromium/ash/shell/window_watcher.cc
deleted file mode 100644
index 988985a5e46..00000000000
--- a/chromium/ash/shell/window_watcher.cc
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell/window_watcher.h"
-
-#include "ash/display/display_controller.h"
-#include "ash/launcher/launcher.h"
-#include "ash/shelf/shelf_item_delegate_manager.h"
-#include "ash/shelf/shelf_model.h"
-#include "ash/shelf/shelf_util.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell/window_watcher_shelf_item_delegate.h"
-#include "ash/shell_window_ids.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/display.h"
-
-namespace ash {
-namespace shell {
-
-class WindowWatcher::WorkspaceWindowWatcher : public aura::WindowObserver {
- public:
- explicit WorkspaceWindowWatcher(WindowWatcher* watcher) : watcher_(watcher) {
- }
-
- virtual ~WorkspaceWindowWatcher() {
- }
-
- virtual void OnWindowAdded(aura::Window* new_window) OVERRIDE {
- new_window->AddObserver(watcher_);
- }
-
- virtual void OnWillRemoveWindow(aura::Window* window) OVERRIDE {
- DCHECK(window->children().empty());
- window->RemoveObserver(watcher_);
- }
-
- void RootWindowAdded(aura::Window* root) {
- aura::Window* panel_container = ash::Shell::GetContainer(
- root,
- internal::kShellWindowId_PanelContainer);
- panel_container->AddObserver(watcher_);
-
- aura::Window* container =
- Launcher::ForWindow(root)->shelf_widget()->window_container();
- container->AddObserver(this);
- for (size_t i = 0; i < container->children().size(); ++i)
- container->children()[i]->AddObserver(watcher_);
- }
-
- void RootWindowRemoved(aura::Window* root) {
- aura::Window* panel_container = ash::Shell::GetContainer(
- root,
- internal::kShellWindowId_PanelContainer);
- panel_container->RemoveObserver(watcher_);
-
- aura::Window* container =
- Launcher::ForWindow(root)->shelf_widget()->window_container();
- container->RemoveObserver(this);
- for (size_t i = 0; i < container->children().size(); ++i)
- container->children()[i]->RemoveObserver(watcher_);
- }
-
- private:
- WindowWatcher* watcher_;
-
- DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowWatcher);
-};
-
-WindowWatcher::WindowWatcher() {
- workspace_window_watcher_.reset(new WorkspaceWindowWatcher(this));
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- for (aura::Window::Windows::iterator iter = root_windows.begin();
- iter != root_windows.end(); ++ iter) {
- workspace_window_watcher_->RootWindowAdded(*iter);
- }
-}
-
-WindowWatcher::~WindowWatcher() {
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- for (aura::Window::Windows::iterator iter = root_windows.begin();
- iter != root_windows.end(); ++ iter) {
- workspace_window_watcher_->RootWindowRemoved(*iter);
- }
-}
-
-aura::Window* WindowWatcher::GetWindowByID(ash::LauncherID id) {
- IDToWindow::const_iterator i = id_to_window_.find(id);
- return i != id_to_window_.end() ? i->second : NULL;
-}
-
-// aura::WindowObserver overrides:
-void WindowWatcher::OnWindowAdded(aura::Window* new_window) {
- if (new_window->type() != aura::client::WINDOW_TYPE_NORMAL &&
- new_window->type() != aura::client::WINDOW_TYPE_PANEL)
- return;
-
- static int image_count = 0;
- ShelfModel* model = Shell::GetInstance()->shelf_model();
- LauncherItem item;
- item.type = new_window->type() == aura::client::WINDOW_TYPE_PANEL ?
- ash::TYPE_APP_PANEL : ash::TYPE_PLATFORM_APP;
- ash::LauncherID id = model->next_id();
- id_to_window_[id] = new_window;
-
- SkBitmap icon_bitmap;
- icon_bitmap.setConfig(SkBitmap::kARGB_8888_Config, 16, 16);
- icon_bitmap.allocPixels();
- icon_bitmap.eraseARGB(255,
- image_count == 0 ? 255 : 0,
- image_count == 1 ? 255 : 0,
- image_count == 2 ? 255 : 0);
- image_count = (image_count + 1) % 3;
- item.image = gfx::ImageSkia(gfx::ImageSkiaRep(icon_bitmap, 1.0f));
-
- model->Add(item);
-
- ShelfItemDelegateManager* manager =
- Shell::GetInstance()->shelf_item_delegate_manager();
- scoped_ptr<ShelfItemDelegate> delegate(
- new WindowWatcherShelfItemDelegate(id, this));
- manager->SetShelfItemDelegate(id, delegate.Pass());
- SetLauncherIDForWindow(id, new_window);
-}
-
-void WindowWatcher::OnWillRemoveWindow(aura::Window* window) {
- for (IDToWindow::iterator i = id_to_window_.begin();
- i != id_to_window_.end(); ++i) {
- if (i->second == window) {
- ShelfModel* model = Shell::GetInstance()->shelf_model();
- int index = model->ItemIndexByID(i->first);
- DCHECK_NE(-1, index);
- model->RemoveItemAt(index);
- id_to_window_.erase(i);
- break;
- }
- }
-}
-
-void WindowWatcher::OnDisplayBoundsChanged(const gfx::Display& display) {
-}
-
-void WindowWatcher::OnDisplayAdded(const gfx::Display& new_display) {
- aura::Window* root = Shell::GetInstance()->display_controller()->
- GetRootWindowForDisplayId(new_display.id());
- workspace_window_watcher_->RootWindowAdded(root);
-}
-
-void WindowWatcher::OnDisplayRemoved(const gfx::Display& old_display) {
- // All windows in the display has already been removed, so no need to
- // remove observers.
-}
-
-} // namespace shell
-} // namespace ash
diff --git a/chromium/ash/shell/window_watcher.h b/chromium/ash/shell/window_watcher.h
deleted file mode 100644
index fcda05a725f..00000000000
--- a/chromium/ash/shell/window_watcher.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_WINDOW_WATCHER_H_
-#define ASH_SHELL_WINDOW_WATCHER_H_
-
-#include <map>
-
-#include "ash/launcher/launcher_types.h"
-#include "base/compiler_specific.h"
-#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/window_observer.h"
-#include "ui/gfx/display_observer.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-namespace shell {
-
-// TODO(sky): fix this class, its a bit broke with workspace2.
-
-// WindowWatcher is responsible for listening for newly created windows and
-// creating items on the Shelf for them.
-class WindowWatcher : public aura::WindowObserver,
- public gfx::DisplayObserver {
- public:
- WindowWatcher();
- virtual ~WindowWatcher();
-
- aura::Window* GetWindowByID(ash::LauncherID id);
-
- // aura::WindowObserver overrides:
- virtual void OnWindowAdded(aura::Window* new_window) OVERRIDE;
- virtual void OnWillRemoveWindow(aura::Window* window) OVERRIDE;
-
- // gfx::DisplayObserver overrides:
- virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE;
- virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE;
- virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE;
-
- private:
- class WorkspaceWindowWatcher;
-
- typedef std::map<ash::LauncherID, aura::Window*> IDToWindow;
-
- // Maps from window to the id we gave it.
- IDToWindow id_to_window_;
-
- scoped_ptr<WorkspaceWindowWatcher> workspace_window_watcher_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowWatcher);
-};
-
-} // namespace shell
-} // namespace ash
-
-#endif // ASH_SHELL_WINDOW_WATCHER_H_
diff --git a/chromium/ash/shell/window_watcher_shelf_item_delegate.cc b/chromium/ash/shell/window_watcher_shelf_item_delegate.cc
deleted file mode 100644
index ecb4308c944..00000000000
--- a/chromium/ash/shell/window_watcher_shelf_item_delegate.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell/window_watcher_shelf_item_delegate.h"
-
-#include "ash/shell/window_watcher.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/window.h"
-
-namespace ash {
-namespace shell {
-
-WindowWatcherShelfItemDelegate::WindowWatcherShelfItemDelegate(
- LauncherID id,
- WindowWatcher* watcher)
- : id_(id), watcher_(watcher) {
- DCHECK_GT(id_, 0);
- DCHECK(watcher_);
-}
-
-WindowWatcherShelfItemDelegate::~WindowWatcherShelfItemDelegate() {
-}
-
-bool WindowWatcherShelfItemDelegate::ItemSelected(const ui::Event& event) {
- aura::Window* window = watcher_->GetWindowByID(id_);
- if (window->type() == aura::client::WINDOW_TYPE_PANEL)
- wm::MoveWindowToEventRoot(window, event);
- window->Show();
- wm::ActivateWindow(window);
- return false;
-}
-
-base::string16 WindowWatcherShelfItemDelegate::GetTitle() {
- return watcher_->GetWindowByID(id_)->title();
-}
-
-ui::MenuModel* WindowWatcherShelfItemDelegate::CreateContextMenu(
- aura::Window* root_window) {
- return NULL;
-}
-
-ShelfMenuModel* WindowWatcherShelfItemDelegate::CreateApplicationMenu(
- int event_flags) {
- return NULL;
-}
-
-bool WindowWatcherShelfItemDelegate::IsDraggable() {
- return true;
-}
-
-bool WindowWatcherShelfItemDelegate::ShouldShowTooltip() {
- return true;
-}
-
-} // namespace shell
-} // namespace ash
diff --git a/chromium/ash/shell/window_watcher_shelf_item_delegate.h b/chromium/ash/shell/window_watcher_shelf_item_delegate.h
deleted file mode 100644
index cf8f6a79315..00000000000
--- a/chromium/ash/shell/window_watcher_shelf_item_delegate.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_WINDOW_WATCHER_SHELF_ITEM_DELEGATE_H_
-#define ASH_SHELL_WINDOW_WATCHER_SHELF_ITEM_DELEGATE_H_
-
-#include "ash/launcher/launcher_types.h"
-#include "ash/shelf/shelf_item_delegate.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-
-namespace ash {
-namespace shell {
-
-class WindowWatcher;
-
-// ShelfItemDelegate implementation used by WindowWatcher.
-class WindowWatcherShelfItemDelegate : public ShelfItemDelegate {
- public:
- WindowWatcherShelfItemDelegate(LauncherID id, WindowWatcher* watcher);
- virtual ~WindowWatcherShelfItemDelegate();
-
- // ShelfItemDelegate:
- virtual bool ItemSelected(const ui::Event& event) OVERRIDE;
- virtual base::string16 GetTitle() OVERRIDE;
- virtual ui::MenuModel* CreateContextMenu(aura::Window* root_window) OVERRIDE;
- virtual ShelfMenuModel* CreateApplicationMenu(int event_flags) OVERRIDE;
- virtual bool IsDraggable() OVERRIDE;
- virtual bool ShouldShowTooltip() OVERRIDE;
-
- private:
- LauncherID id_;
- WindowWatcher* watcher_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowWatcherShelfItemDelegate);
-};
-
-} // namespace shell
-} // namespace ash
-
-#endif // ASH_SHELL_WINDOW_WATCHER_SHELF_ITEM_DELEGATE_H_
diff --git a/chromium/ash/shell/window_watcher_unittest.cc b/chromium/ash/shell/window_watcher_unittest.cc
deleted file mode 100644
index 31959e65eff..00000000000
--- a/chromium/ash/shell/window_watcher_unittest.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell/window_watcher.h"
-
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "ash/shell/shell_delegate_impl.h"
-#include "ash/system/user/login_status.h"
-#include "ash/test/ash_test_base.h"
-#include "ui/aura/root_window.h"
-
-namespace ash {
-
-typedef test::AshTestBase WindowWatcherTest;
-
-// This test verifies that shell can be torn down without causing failures
-// bug http://code.google.com/p/chromium/issues/detail?id=130332
-TEST_F(WindowWatcherTest, ShellDeleteInstance) {
- RunAllPendingInMessageLoop();
- scoped_ptr<ash::shell::WindowWatcher> window_watcher;
- Shell::DeleteInstance();
-
- shell::ShellDelegateImpl* delegate = new ash::shell::ShellDelegateImpl;
- Shell::CreateInstance(delegate);
- Shell::GetPrimaryRootWindow()->GetDispatcher()->host()->Show();
- Shell::GetInstance()->CreateLauncher();
- Shell::GetInstance()->UpdateAfterLoginStatusChange(
- user::LOGGED_IN_USER);
-
- window_watcher.reset(new ash::shell::WindowWatcher);
-
- delegate->SetWatcher(window_watcher.get());
- Shell::GetPrimaryRootWindow()->Hide();
- window_watcher.reset();
- delegate->SetWatcher(NULL);
-}
-
-} // namespace ash
diff --git a/chromium/ash/shell_delegate.h b/chromium/ash/shell_delegate.h
deleted file mode 100644
index 5fc991e77d3..00000000000
--- a/chromium/ash/shell_delegate.h
+++ /dev/null
@@ -1,141 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_DELEGATE_H_
-#define ASH_SHELL_DELEGATE_H_
-
-#include <string>
-
-#include "ash/ash_export.h"
-#include "ash/shell.h"
-#include "base/callback.h"
-#include "base/strings/string16.h"
-
-namespace app_list {
-class AppListViewDelegate;
-}
-
-namespace aura {
-class RootWindow;
-class Window;
-namespace client {
-class UserActionClient;
-}
-}
-
-namespace content {
-class BrowserContext;
-}
-
-namespace ui {
-class MenuModel;
-}
-
-namespace views {
-class Widget;
-}
-
-namespace keyboard {
-class KeyboardControllerProxy;
-}
-
-namespace ash {
-
-class AccessibilityDelegate;
-class CapsLockDelegate;
-class MediaDelegate;
-class NewWindowDelegate;
-class RootWindowHostFactory;
-class SessionStateDelegate;
-class ShelfDelegate;
-class ShelfModel;
-class SystemTrayDelegate;
-class UserWallpaperDelegate;
-struct LauncherItem;
-
-// Delegate of the Shell.
-class ASH_EXPORT ShellDelegate {
- public:
- // The Shell owns the delegate.
- virtual ~ShellDelegate() {}
-
- // Returns true if this is the first time that the shell has been run after
- // the system has booted. false is returned after the shell has been
- // restarted, typically due to logging in as a guest or logging out.
- virtual bool IsFirstRunAfterBoot() const = 0;
-
- // Returns true if multi-profiles feature is enabled.
- virtual bool IsMultiProfilesEnabled() const = 0;
-
- // Returns true if incognito mode is allowed for the user.
- // Incognito windows are restricted for supervised users.
- virtual bool IsIncognitoAllowed() const = 0;
-
- // Returns true if we're running in forced app mode.
- virtual bool IsRunningInForcedAppMode() const = 0;
-
- // Called before processing |Shell::Init()| so that the delegate
- // can perform tasks necessary before the shell is initialized.
- virtual void PreInit() = 0;
-
- // Shuts down the environment.
- virtual void Shutdown() = 0;
-
- // Invoked when the user uses Ctrl-Shift-Q to close chrome.
- virtual void Exit() = 0;
-
- // Create a shell-specific keyboard::KeyboardControllerProxy
- virtual keyboard::KeyboardControllerProxy*
- CreateKeyboardControllerProxy() = 0;
-
- // Get the active browser context. This will get us the active profile
- // in chrome.
- virtual content::BrowserContext* GetActiveBrowserContext() = 0;
-
- // Invoked to create an AppListViewDelegate. Shell takes the ownership of
- // the created delegate.
- virtual app_list::AppListViewDelegate* CreateAppListViewDelegate() = 0;
-
- // Creates a new ShelfDelegate. Shell takes ownership of the returned
- // value.
- virtual ShelfDelegate* CreateShelfDelegate(ShelfModel* model) = 0;
-
- // Creates a system-tray delegate. Shell takes ownership of the delegate.
- virtual SystemTrayDelegate* CreateSystemTrayDelegate() = 0;
-
- // Creates a user wallpaper delegate. Shell takes ownership of the delegate.
- virtual UserWallpaperDelegate* CreateUserWallpaperDelegate() = 0;
-
- // Creates a caps lock delegate. Shell takes ownership of the delegate.
- virtual CapsLockDelegate* CreateCapsLockDelegate() = 0;
-
- // Creates a session state delegate. Shell takes ownership of the delegate.
- virtual SessionStateDelegate* CreateSessionStateDelegate() = 0;
-
- // Creates a accessibility delegate. Shell takes ownership of the delegate.
- virtual AccessibilityDelegate* CreateAccessibilityDelegate() = 0;
-
- // Creates an application delegate. Shell takes ownership of the delegate.
- virtual NewWindowDelegate* CreateNewWindowDelegate() = 0;
-
- // Creates a media delegate. Shell takes ownership of the delegate.
- virtual MediaDelegate* CreateMediaDelegate() = 0;
-
- // Creates a user action client. Shell takes ownership of the object.
- virtual aura::client::UserActionClient* CreateUserActionClient() = 0;
-
- // Creates a menu model of the context for the |root_window|.
- virtual ui::MenuModel* CreateContextMenu(aura::Window* root_window) = 0;
-
- // Creates a root window host factory. Shell takes ownership of the returned
- // value.
- virtual RootWindowHostFactory* CreateRootWindowHostFactory() = 0;
-
- // Get the product name.
- virtual base::string16 GetProductName() const = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_SHELL_DELEGATE_H_
diff --git a/chromium/ash/shell_factory.h b/chromium/ash/shell_factory.h
deleted file mode 100644
index 041c4c1baec..00000000000
--- a/chromium/ash/shell_factory.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_FACTORY_H_
-#define ASH_SHELL_FACTORY_H_
-
-#include "ash/ash_export.h"
-
-namespace aura {
-class RootWindow;
-}
-
-namespace gfx {
-class ImageSkia;
-}
-
-namespace views {
-class View;
-class Widget;
-}
-
-// Declarations of shell component factory functions.
-
-namespace ash {
-
-namespace internal {
-views::Widget* CreateDesktopBackground(aura::Window* root_window,
- int container_id);
-
-ASH_EXPORT views::Widget* CreateStatusArea(views::View* contents);
-} // namespace internal
-
-} // namespace ash
-
-
-#endif // ASH_SHELL_FACTORY_H_
diff --git a/chromium/ash/shell_observer.h b/chromium/ash/shell_observer.h
deleted file mode 100644
index 9d1db021e0c..00000000000
--- a/chromium/ash/shell_observer.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_OBSERVER_H_
-#define ASH_SHELL_OBSERVER_H_
-
-#include "ash/ash_export.h"
-#include "ash/system/user/login_status.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-
-class ASH_EXPORT ShellObserver {
- public:
- // Invoked after the screen's work area insets changes.
- virtual void OnDisplayWorkAreaInsetsChanged() {}
-
- // Invoked when the user logs in.
- virtual void OnLoginStateChanged(user::LoginStatus status) {}
-
- // Invoked when the application is exiting.
- virtual void OnAppTerminating() {}
-
- // Invoked when the screen is locked (after the lock window is visible) or
- // unlocked.
- virtual void OnLockStateChanged(bool locked) {}
-
- // Invoked when the shelf alignment in |root_window| is changed.
- virtual void OnShelfAlignmentChanged(aura::Window* root_window) {}
-
- // Invoked when the projection touch HUD is toggled.
- virtual void OnTouchHudProjectionToggled(bool enabled) {}
-
- // Invoked when entering or exiting fullscreen mode in |root_window|.
- virtual void OnFullscreenStateChanged(bool is_fullscreen,
- aura::Window* root_window) {}
-
- protected:
- virtual ~ShellObserver() {}
-};
-
-} // namespace ash
-
-#endif // ASH_SHELL_OBSERVER_H_
diff --git a/chromium/ash/shell_unittest.cc b/chromium/ash/shell_unittest.cc
deleted file mode 100644
index e48460dabd4..00000000000
--- a/chromium/ash/shell_unittest.cc
+++ /dev/null
@@ -1,538 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell.h"
-
-#include <algorithm>
-#include <vector>
-
-#include "ash/ash_switches.h"
-#include "ash/desktop_background/desktop_background_widget_controller.h"
-#include "ash/display/mouse_cursor_event_filter.h"
-#include "ash/drag_drop/drag_drop_controller.h"
-#include "ash/launcher/launcher.h"
-#include "ash/root_window_controller.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell_delegate.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/shell_test_api.h"
-#include "ash/wm/root_window_layout_manager.h"
-#include "ash/wm/window_util.h"
-#include "base/strings/utf_string_conversions.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/test/test_event_handler.h"
-#include "ui/aura/window.h"
-#include "ui/base/models/simple_menu_model.h"
-#include "ui/events/test/events_test_utils.h"
-#include "ui/gfx/size.h"
-#include "ui/views/controls/menu/menu_controller.h"
-#include "ui/views/controls/menu/menu_runner.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-#include "ui/views/window/dialog_delegate.h"
-
-using aura::RootWindow;
-
-namespace ash {
-
-namespace {
-
-aura::Window* GetDefaultContainer() {
- return Shell::GetContainer(
- Shell::GetPrimaryRootWindow(),
- internal::kShellWindowId_DefaultContainer);
-}
-
-aura::Window* GetAlwaysOnTopContainer() {
- return Shell::GetContainer(
- Shell::GetPrimaryRootWindow(),
- internal::kShellWindowId_AlwaysOnTopContainer);
-}
-
-// Expect ALL the containers!
-void ExpectAllContainers() {
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- EXPECT_TRUE(Shell::GetContainer(
- root_window, internal::kShellWindowId_DesktopBackgroundContainer));
- EXPECT_TRUE(Shell::GetContainer(
- root_window, internal::kShellWindowId_DefaultContainer));
- EXPECT_TRUE(Shell::GetContainer(
- root_window, internal::kShellWindowId_AlwaysOnTopContainer));
- EXPECT_TRUE(Shell::GetContainer(
- root_window, internal::kShellWindowId_PanelContainer));
- EXPECT_TRUE(Shell::GetContainer(
- root_window, internal::kShellWindowId_ShelfContainer));
- EXPECT_TRUE(Shell::GetContainer(
- root_window, internal::kShellWindowId_SystemModalContainer));
- EXPECT_TRUE(Shell::GetContainer(
- root_window, internal::kShellWindowId_LockScreenBackgroundContainer));
- EXPECT_TRUE(Shell::GetContainer(
- root_window, internal::kShellWindowId_LockScreenContainer));
- EXPECT_TRUE(Shell::GetContainer(
- root_window, internal::kShellWindowId_LockSystemModalContainer));
- EXPECT_TRUE(Shell::GetContainer(
- root_window, internal::kShellWindowId_StatusContainer));
- EXPECT_TRUE(Shell::GetContainer(
- root_window, internal::kShellWindowId_MenuContainer));
- EXPECT_TRUE(Shell::GetContainer(
- root_window, internal::kShellWindowId_DragImageAndTooltipContainer));
- EXPECT_TRUE(Shell::GetContainer(
- root_window, internal::kShellWindowId_SettingBubbleContainer));
- EXPECT_TRUE(Shell::GetContainer(
- root_window, internal::kShellWindowId_OverlayContainer));
-}
-
-class ModalWindow : public views::WidgetDelegateView {
- public:
- ModalWindow() {}
- virtual ~ModalWindow() {}
-
- // Overridden from views::WidgetDelegate:
- virtual views::View* GetContentsView() OVERRIDE {
- return this;
- }
- virtual bool CanResize() const OVERRIDE {
- return true;
- }
- virtual base::string16 GetWindowTitle() const OVERRIDE {
- return ASCIIToUTF16("Modal Window");
- }
- virtual ui::ModalType GetModalType() const OVERRIDE {
- return ui::MODAL_TYPE_SYSTEM;
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ModalWindow);
-};
-
-class SimpleMenuDelegate : public ui::SimpleMenuModel::Delegate {
- public:
- SimpleMenuDelegate() {}
- virtual ~SimpleMenuDelegate() {}
-
- virtual bool IsCommandIdChecked(int command_id) const OVERRIDE {
- return false;
- }
-
- virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE {
- return true;
- }
-
- virtual bool GetAcceleratorForCommandId(
- int command_id,
- ui::Accelerator* accelerator) OVERRIDE {
- return false;
- }
-
- virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE {
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SimpleMenuDelegate);
-};
-
-} // namespace
-
-class ShellTest : public test::AshTestBase {
- public:
- views::Widget* CreateTestWindow(views::Widget::InitParams params) {
- views::Widget* widget = new views::Widget;
- params.context = CurrentContext();
- widget->Init(params);
- return widget;
- }
-
- void TestCreateWindow(views::Widget::InitParams::Type type,
- bool always_on_top,
- aura::Window* expected_container) {
- views::Widget::InitParams widget_params(type);
- widget_params.keep_on_top = always_on_top;
-
- views::Widget* widget = CreateTestWindow(widget_params);
- widget->Show();
-
- EXPECT_TRUE(
- expected_container->Contains(widget->GetNativeWindow()->parent())) <<
- "TestCreateWindow: type=" << type << ", always_on_top=" <<
- always_on_top;
-
- widget->Close();
- }
-
- void LockScreenAndVerifyMenuClosed() {
- // Verify a menu is open before locking.
- views::MenuController* menu_controller =
- views::MenuController::GetActiveInstance();
- DCHECK(menu_controller);
- EXPECT_EQ(views::MenuController::EXIT_NONE, menu_controller->exit_type());
-
- // Create a LockScreen window.
- views::Widget::InitParams widget_params(
- views::Widget::InitParams::TYPE_WINDOW);
- SessionStateDelegate* delegate =
- Shell::GetInstance()->session_state_delegate();
- delegate->LockScreen();
- views::Widget* lock_widget = CreateTestWindow(widget_params);
- ash::Shell::GetContainer(
- Shell::GetPrimaryRootWindow(),
- ash::internal::kShellWindowId_LockScreenContainer)->
- AddChild(lock_widget->GetNativeView());
- lock_widget->Show();
- EXPECT_TRUE(delegate->IsScreenLocked());
- EXPECT_TRUE(lock_widget->GetNativeView()->HasFocus());
-
- // Verify menu is closed.
- EXPECT_NE(views::MenuController::EXIT_NONE, menu_controller->exit_type());
- lock_widget->Close();
- delegate->UnlockScreen();
-
- // In case the menu wasn't closed, cancel the menu to exit the nested menu
- // run loop so that the test will not time out.
- menu_controller->CancelAll();
- }
-};
-
-TEST_F(ShellTest, CreateWindow) {
- // Normal window should be created in default container.
- TestCreateWindow(views::Widget::InitParams::TYPE_WINDOW,
- false, // always_on_top
- GetDefaultContainer());
- TestCreateWindow(views::Widget::InitParams::TYPE_POPUP,
- false, // always_on_top
- GetDefaultContainer());
-
- // Always-on-top window and popup are created in always-on-top container.
- TestCreateWindow(views::Widget::InitParams::TYPE_WINDOW,
- true, // always_on_top
- GetAlwaysOnTopContainer());
- TestCreateWindow(views::Widget::InitParams::TYPE_POPUP,
- true, // always_on_top
- GetAlwaysOnTopContainer());
-}
-
-TEST_F(ShellTest, ChangeAlwaysOnTop) {
- views::Widget::InitParams widget_params(
- views::Widget::InitParams::TYPE_WINDOW);
-
- // Creates a normal window
- views::Widget* widget = CreateTestWindow(widget_params);
- widget->Show();
-
- // It should be in default container.
- EXPECT_TRUE(GetDefaultContainer()->Contains(
- widget->GetNativeWindow()->parent()));
-
- // Flip always-on-top flag.
- widget->SetAlwaysOnTop(true);
- // And it should in always on top container now.
- EXPECT_EQ(GetAlwaysOnTopContainer(), widget->GetNativeWindow()->parent());
-
- // Flip always-on-top flag.
- widget->SetAlwaysOnTop(false);
- // It should go back to default container.
- EXPECT_TRUE(GetDefaultContainer()->Contains(
- widget->GetNativeWindow()->parent()));
-
- // Set the same always-on-top flag again.
- widget->SetAlwaysOnTop(false);
- // Should have no effect and we are still in the default container.
- EXPECT_TRUE(GetDefaultContainer()->Contains(
- widget->GetNativeWindow()->parent()));
-
- widget->Close();
-}
-
-TEST_F(ShellTest, CreateModalWindow) {
- views::Widget::InitParams widget_params(
- views::Widget::InitParams::TYPE_WINDOW);
-
- // Create a normal window.
- views::Widget* widget = CreateTestWindow(widget_params);
- widget->Show();
-
- // It should be in default container.
- EXPECT_TRUE(GetDefaultContainer()->Contains(
- widget->GetNativeWindow()->parent()));
-
- // Create a modal window.
- views::Widget* modal_widget = views::Widget::CreateWindowWithParent(
- new ModalWindow(), widget->GetNativeView());
- modal_widget->Show();
-
- // It should be in modal container.
- aura::Window* modal_container = Shell::GetContainer(
- Shell::GetPrimaryRootWindow(),
- internal::kShellWindowId_SystemModalContainer);
- EXPECT_EQ(modal_container, modal_widget->GetNativeWindow()->parent());
-
- modal_widget->Close();
- widget->Close();
-}
-
-class TestModalDialogDelegate : public views::DialogDelegateView {
- public:
- TestModalDialogDelegate() {}
-
- // Overridden from views::WidgetDelegate:
- virtual ui::ModalType GetModalType() const OVERRIDE {
- return ui::MODAL_TYPE_SYSTEM;
- }
-};
-
-TEST_F(ShellTest, CreateLockScreenModalWindow) {
- views::Widget::InitParams widget_params(
- views::Widget::InitParams::TYPE_WINDOW);
-
- // Create a normal window.
- views::Widget* widget = CreateTestWindow(widget_params);
- widget->Show();
- EXPECT_TRUE(widget->GetNativeView()->HasFocus());
-
- // It should be in default container.
- EXPECT_TRUE(GetDefaultContainer()->Contains(
- widget->GetNativeWindow()->parent()));
-
- Shell::GetInstance()->session_state_delegate()->LockScreen();
- // Create a LockScreen window.
- views::Widget* lock_widget = CreateTestWindow(widget_params);
- ash::Shell::GetContainer(
- Shell::GetPrimaryRootWindow(),
- ash::internal::kShellWindowId_LockScreenContainer)->
- AddChild(lock_widget->GetNativeView());
- lock_widget->Show();
- EXPECT_TRUE(lock_widget->GetNativeView()->HasFocus());
-
- // It should be in LockScreen container.
- aura::Window* lock_screen = Shell::GetContainer(
- Shell::GetPrimaryRootWindow(),
- ash::internal::kShellWindowId_LockScreenContainer);
- EXPECT_EQ(lock_screen, lock_widget->GetNativeWindow()->parent());
-
- // Create a modal window with a lock window as parent.
- views::Widget* lock_modal_widget = views::Widget::CreateWindowWithParent(
- new ModalWindow(), lock_widget->GetNativeView());
- lock_modal_widget->Show();
- EXPECT_TRUE(lock_modal_widget->GetNativeView()->HasFocus());
-
- // It should be in LockScreen modal container.
- aura::Window* lock_modal_container = Shell::GetContainer(
- Shell::GetPrimaryRootWindow(),
- ash::internal::kShellWindowId_LockSystemModalContainer);
- EXPECT_EQ(lock_modal_container,
- lock_modal_widget->GetNativeWindow()->parent());
-
- // Create a modal window with a normal window as parent.
- views::Widget* modal_widget = views::Widget::CreateWindowWithParent(
- new ModalWindow(), widget->GetNativeView());
- modal_widget->Show();
- // Window on lock screen shouldn't lost focus.
- EXPECT_FALSE(modal_widget->GetNativeView()->HasFocus());
- EXPECT_TRUE(lock_modal_widget->GetNativeView()->HasFocus());
-
- // It should be in non-LockScreen modal container.
- aura::Window* modal_container = Shell::GetContainer(
- Shell::GetPrimaryRootWindow(),
- ash::internal::kShellWindowId_SystemModalContainer);
- EXPECT_EQ(modal_container, modal_widget->GetNativeWindow()->parent());
-
- // Modal dialog without parent, caused crash see crbug.com/226141
- views::Widget* modal_dialog = views::DialogDelegate::CreateDialogWidget(
- new TestModalDialogDelegate(), CurrentContext(), NULL);
-
- modal_dialog->Show();
- EXPECT_FALSE(modal_dialog->GetNativeView()->HasFocus());
- EXPECT_TRUE(lock_modal_widget->GetNativeView()->HasFocus());
-
- modal_dialog->Close();
- modal_widget->Close();
- modal_widget->Close();
- lock_modal_widget->Close();
- lock_widget->Close();
- widget->Close();
-}
-
-TEST_F(ShellTest, IsScreenLocked) {
- SessionStateDelegate* delegate =
- Shell::GetInstance()->session_state_delegate();
- delegate->LockScreen();
- EXPECT_TRUE(delegate->IsScreenLocked());
- delegate->UnlockScreen();
- EXPECT_FALSE(delegate->IsScreenLocked());
-}
-
-TEST_F(ShellTest, LockScreenClosesActiveMenu) {
- SimpleMenuDelegate menu_delegate;
- scoped_ptr<ui::SimpleMenuModel> menu_model(
- new ui::SimpleMenuModel(&menu_delegate));
- menu_model->AddItem(0, ASCIIToUTF16("Menu item"));
- views::Widget* widget = ash::Shell::GetPrimaryRootWindowController()->
- wallpaper_controller()->widget();
- scoped_ptr<views::MenuRunner> menu_runner(
- new views::MenuRunner(menu_model.get()));
-
- // When MenuRunner runs a nested loop the LockScreenAndVerifyMenuClosed
- // command will fire, check the menu state and ensure the nested menu loop
- // is exited so that the test will terminate.
- base::MessageLoopForUI::current()->PostTask(FROM_HERE,
- base::Bind(&ShellTest::LockScreenAndVerifyMenuClosed,
- base::Unretained(this)));
-
- EXPECT_EQ(views::MenuRunner::NORMAL_EXIT,
- menu_runner->RunMenuAt(widget, NULL, gfx::Rect(),
- views::MenuItemView::TOPLEFT, ui::MENU_SOURCE_MOUSE,
- views::MenuRunner::CONTEXT_MENU));
-}
-
-TEST_F(ShellTest, ManagedWindowModeBasics) {
- // We start with the usual window containers.
- ExpectAllContainers();
- // Shelf is visible.
- ShelfWidget* launcher_widget = Launcher::ForPrimaryDisplay()->shelf_widget();
- EXPECT_TRUE(launcher_widget->IsVisible());
- // Shelf is at bottom-left of screen.
- EXPECT_EQ(0, launcher_widget->GetWindowBoundsInScreen().x());
- EXPECT_EQ(Shell::GetPrimaryRootWindow()->GetDispatcher()->host()->
- GetBounds().height(),
- launcher_widget->GetWindowBoundsInScreen().bottom());
- // We have a desktop background but not a bare layer.
- // TODO (antrim): enable once we find out why it fails component build.
- // internal::DesktopBackgroundWidgetController* background =
- // Shell::GetPrimaryRootWindow()->
- // GetProperty(internal::kWindowDesktopComponent);
- // EXPECT_TRUE(background);
- // EXPECT_TRUE(background->widget());
- // EXPECT_FALSE(background->layer());
-
- // Create a normal window. It is not maximized.
- views::Widget::InitParams widget_params(
- views::Widget::InitParams::TYPE_WINDOW);
- widget_params.bounds.SetRect(11, 22, 300, 400);
- views::Widget* widget = CreateTestWindow(widget_params);
- widget->Show();
- EXPECT_FALSE(widget->IsMaximized());
-
- // Clean up.
- widget->Close();
-}
-
-TEST_F(ShellTest, FullscreenWindowHidesShelf) {
- ExpectAllContainers();
-
- // Create a normal window. It is not maximized.
- views::Widget::InitParams widget_params(
- views::Widget::InitParams::TYPE_WINDOW);
- widget_params.bounds.SetRect(11, 22, 300, 400);
- views::Widget* widget = CreateTestWindow(widget_params);
- widget->Show();
- EXPECT_FALSE(widget->IsMaximized());
-
- // Shelf defaults to visible.
- EXPECT_EQ(
- SHELF_VISIBLE,
- Shell::GetPrimaryRootWindowController()->
- GetShelfLayoutManager()->visibility_state());
-
- // Fullscreen window hides it.
- widget->SetFullscreen(true);
- EXPECT_EQ(
- SHELF_HIDDEN,
- Shell::GetPrimaryRootWindowController()->
- GetShelfLayoutManager()->visibility_state());
-
- // Restoring the window restores it.
- widget->Restore();
- EXPECT_EQ(
- SHELF_VISIBLE,
- Shell::GetPrimaryRootWindowController()->
- GetShelfLayoutManager()->visibility_state());
-
- // Clean up.
- widget->Close();
-}
-
-// Various assertions around SetShelfAutoHideBehavior() and
-// GetShelfAutoHideBehavior().
-TEST_F(ShellTest, ToggleAutoHide) {
- scoped_ptr<aura::Window> window(new aura::Window(NULL));
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- window->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window->Init(ui::LAYER_TEXTURED);
- ParentWindowInPrimaryRootWindow(window.get());
- window->Show();
- wm::ActivateWindow(window.get());
-
- Shell* shell = Shell::GetInstance();
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- shell->SetShelfAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
- root_window);
- EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
- shell->GetShelfAutoHideBehavior(root_window));
- shell->SetShelfAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
- root_window);
- EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
- shell->GetShelfAutoHideBehavior(root_window));
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
- shell->GetShelfAutoHideBehavior(root_window));
- shell->SetShelfAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
- root_window);
- EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
- shell->GetShelfAutoHideBehavior(root_window));
- shell->SetShelfAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
- root_window);
- EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
- shell->GetShelfAutoHideBehavior(root_window));
-}
-
-TEST_F(ShellTest, TestPreTargetHandlerOrder) {
- Shell* shell = Shell::GetInstance();
- ui::EventTargetTestApi test_api(shell);
- test::ShellTestApi shell_test_api(shell);
-
- const ui::EventHandlerList& handlers = test_api.pre_target_handlers();
- EXPECT_EQ(handlers[0], shell->mouse_cursor_filter());
- EXPECT_EQ(handlers[1], shell_test_api.drag_drop_controller());
-}
-
-// Verifies an EventHandler added to Env gets notified from EventGenerator.
-TEST_F(ShellTest, EnvPreTargetHandler) {
- aura::test::TestEventHandler event_handler;
- aura::Env::GetInstance()->AddPreTargetHandler(&event_handler);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- generator.MoveMouseBy(1, 1);
- EXPECT_NE(0, event_handler.num_mouse_events());
- aura::Env::GetInstance()->RemovePreTargetHandler(&event_handler);
-}
-
-// This verifies WindowObservers are removed when a window is destroyed after
-// the Shell is destroyed. This scenario (aura::Windows being deleted after the
-// Shell) occurs if someone is holding a reference to an unparented Window, as
-// is the case with a RenderWidgetHostViewAura that isn't on screen. As long as
-// everything is ok, we won't crash. If there is a bug, window's destructor will
-// notify some deleted object (say VideoDetector or ActivationController) and
-// this will crash.
-class ShellTest2 : public test::AshTestBase {
- public:
- ShellTest2() {}
- virtual ~ShellTest2() {}
-
- protected:
- scoped_ptr<aura::Window> window_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShellTest2);
-};
-
-TEST_F(ShellTest2, DontCrashWhenWindowDeleted) {
- window_.reset(new aura::Window(NULL));
- window_->Init(ui::LAYER_NOT_DRAWN);
-}
-
-} // namespace ash
diff --git a/chromium/ash/shell_window_ids.h b/chromium/ash/shell_window_ids.h
deleted file mode 100644
index ab5fd2373d3..00000000000
--- a/chromium/ash/shell_window_ids.h
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SHELL_WINDOW_IDS_H_
-#define ASH_SHELL_WINDOW_IDS_H_
-
-// Declarations of ids of special shell windows.
-
-namespace ash {
-
-// TODO: we're using this in random places outside of ash, it shouldn't be in
-// internal.
-namespace internal {
-
-// A higher-level container that holds all of the containers stacked below
-// kShellWindowId_LockScreenContainer. Only used by PowerButtonController for
-// animating lower-level containers.
-const int kShellWindowId_NonLockScreenContainersContainer = 0;
-
-// A higher-level container that holds containers that hold lock-screen
-// windows. Only used by PowerButtonController for animating lower-level
-// containers.
-const int kShellWindowId_LockScreenContainersContainer = 1;
-
-// A higher-level container that holds containers that hold lock-screen-related
-// windows (which we want to display while the screen is locked; effectively
-// containers stacked above kShellWindowId_LockSystemModalContainer). Only used
-// by PowerButtonController for animating lower-level containers.
-const int kShellWindowId_LockScreenRelatedContainersContainer = 2;
-
-// A container used for windows of WINDOW_TYPE_CONTROL that have no parent.
-// This container is not visible.
-const int kShellWindowId_UnparentedControlContainer = 3;
-
-// The desktop background window.
-const int kShellWindowId_DesktopBackgroundContainer = 4;
-
-// The virtual keyboard container.
-const int kShellWindowId_VirtualKeyboardContainer = 5;
-
-// TODO(sky): rename kShellWindowId_DefaultContainer.
-
-// The container for standard top-level windows.
-const int kShellWindowId_DefaultContainer = 6;
-
-// The container for top-level windows with the 'always-on-top' flag set.
-const int kShellWindowId_AlwaysOnTopContainer = 7;
-
-// The container for windows docked to either side of the desktop.
-const int kShellWindowId_DockedContainer = 8;
-
-// The container for the shelf.
-const int kShellWindowId_ShelfContainer = 9;
-
-// The container for bubbles which float over the shelf.
-const int kShellWindowId_ShelfBubbleContainer = 10;
-
-// The container for panel windows.
-const int kShellWindowId_PanelContainer = 11;
-
-// The container for the app list.
-const int kShellWindowId_AppListContainer = 12;
-
-// The container for user-specific modal windows.
-const int kShellWindowId_SystemModalContainer = 13;
-
-// The container for input method components such like candidate windows. They
-// are almost panels but have no activations/focus, and they should appear over
-// the AppList and SystemModal dialogs.
-const int kShellWindowId_InputMethodContainer = 14;
-
-// The container for the lock screen background.
-const int kShellWindowId_LockScreenBackgroundContainer = 15;
-
-// The container for the lock screen.
-const int kShellWindowId_LockScreenContainer = 16;
-
-// The container for the lock screen modal windows.
-const int kShellWindowId_LockSystemModalContainer = 17;
-
-// The container for the status area.
-const int kShellWindowId_StatusContainer = 18;
-
-// The container for menus.
-const int kShellWindowId_MenuContainer = 19;
-
-// The container for drag/drop images and tooltips.
-const int kShellWindowId_DragImageAndTooltipContainer = 20;
-
-// The container for bubbles briefly overlaid onscreen to show settings changes
-// (volume, brightness, etc.).
-const int kShellWindowId_SettingBubbleContainer = 21;
-
-// The container for special components overlaid onscreen, such as the
-// region selector for partial screenshots.
-const int kShellWindowId_OverlayContainer = 22;
-
-// ID of the window created by PhantomWindowController or DragWindowController.
-const int kShellWindowId_PhantomWindow = 23;
-
-// The topmost container, used for power off animation.
-const int kShellWindowId_PowerButtonAnimationContainer = 24;
-
-} // namespace internal
-
-} // namespace ash
-
-
-#endif // ASH_SHELL_WINDOW_IDS_H_
diff --git a/chromium/ash/strings/ash_strings_am.xtb b/chromium/ash/strings/ash_strings_am.xtb
deleted file mode 100644
index 1c97f57c834..00000000000
--- a/chromium/ash/strings/ash_strings_am.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="am">
-<translation id="3595596368722241419">ባትሪ ሙሉ ነው</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> እና <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">የመተላለፊያ ሁኔታ</translation>
-<translation id="30155388420722288">የትርፍ ፍሰት አዝራር</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">ብሉቱዝ ነቅቷል</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> ወደ <ph name="ROTATION"/> ዞሯል</translation>
-<translation id="9074739597929991885">ብሉቱዝ</translation>
-<translation id="2268130516524549846">ብሉቱዝ ተሰናክሏል</translation>
-<translation id="7165320105431587207">አውታረ መረቡን ማዋቀር አልተሳካም</translation>
-<translation id="3775358506042162758">በአንድ ጊዜ ብዙ መግባት ላይ እስከ ሶስት መለያዎች ድረስ ብቻ ነው ሊኖርዎ የሚችለው።</translation>
-<translation id="370649949373421643">Wi-Fi ያንቁ</translation>
-<translation id="3626281679859535460">ብሩህነት</translation>
-<translation id="3621202678540785336">ግብዓት</translation>
-<translation id="595202126637698455">አፈጻጸም መከታተያ ነቅቷል</translation>
-<translation id="8054466585765276473">የባትሪ ጊዜን በማስላት ላይ።</translation>
-<translation id="7982789257301363584">አውታረ መረብ</translation>
-<translation id="5565793151875479467">ተኪ...</translation>
-<translation id="938582441709398163">የቁልፍ ሰሌዳ ተደራቢ</translation>
-<translation id="4387004326333427325">የማረጋገጫ ምስክር ወረቀት በርቀት ተቀባይነት አላገኘም</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> ጥራት ወደ <ph name="RESOLUTION"/> ተለውጧል</translation>
-<translation id="6943836128787782965">ኤች ቲ ቲ ፒ ማግኘት አልተሳካም</translation>
-<translation id="2297568595583585744">የሁኔታ መሳቢያ</translation>
-<translation id="1661867754829461514">ፒን ይጎድላል</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>፦ በመገናኘት ላይ...</translation>
-<translation id="40400351611212369">የአውታረ መረብ ማግበር ስህተት</translation>
-<translation id="4237016987259239829">የአውታረመረብ ግንኙነት ስህተት</translation>
-<translation id="2946640296642327832">ብሉቱዝን ያንቁ</translation>
-<translation id="6459472438155181876">ማያ ገጽ ወደ <ph name="DISPLAY_NAME"/> በመቀጠል ላይ</translation>
-<translation id="8206859287963243715">ሴሉላር</translation>
-<translation id="6596816719288285829">IP አድራሻ</translation>
-<translation id="4508265954913339219">ማግበር አልተሳካም</translation>
-<translation id="3621712662352432595">የድምጽ ቅንብሮች</translation>
-<translation id="1812696562331527143">የግብዓት ስልትዎ ወደ <ph name="INPUT_METHOD_ID"/> ተቀይሯል*(<ph name="BEGIN_LINK"/>3ኛ ወገን<ph name="END_LINK"/>)።
-ለመቀየር Shift + Alt ይጫኑ።</translation>
-<translation id="2127372758936585790">አነስተኛ ኃይል ያለው ባትሪ መሙያ</translation>
-<translation id="3846575436967432996">ምንም የአውታረ መረብ መረጃ አይገኝም</translation>
-<translation id="3026237328237090306">የተንቀሳቃሽ ስልክ ውሂብ ያዋቅሩ</translation>
-<translation id="5871632337994001636">መሳሪያዎችን ያስተዳድሩ...</translation>
-<translation id="785750925697875037">የተንቀሳቃሽ መለያ ይመልከቱ</translation>
-<translation id="153454903766751181">ተንቀሳቃሽ ሞደምን በማስጀመር ላይ...</translation>
-<translation id="4628814525959230255">የማያ ገጽዎ ቁጥጥር በHangouts በኩል ለ<ph name="HELPER_NAME"/> በማጋራት ላይ።</translation>
-<translation id="7864539943188674973">ብሉቱዝን ያሰናክሉ</translation>
-<translation id="939252827960237676">ቅጽበታዊ ገጽ እይታን ማስቀመጥ አልተቻለም</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">ለማዘመን ዳግም ያስጀምሩ</translation>
-<translation id="2268813581635650749">ሁሉንም ዘግተህ ውጣ</translation>
-<translation id="735745346212279324">የቪ ፒ ኤን ግንኙነት ተቋርጧል</translation>
-<translation id="7320906967354320621">ስራ ፈት</translation>
-<translation id="15373452373711364">ትልቅ የመዳፊት ጠቋሚ</translation>
-<translation id="3294437725009624529">እንግዳ</translation>
-<translation id="8190698733819146287">ቋንቋዎችን እና ግብአቶችን አብጅ...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">የመደርደሪያ አቀማመጥ</translation>
-<translation id="8676770494376880701">አነስተኛ ኃይል ያለው ባትሪ መሙያ ተገናኝቷል</translation>
-<translation id="7170041865419449892">ከክልል ውጪ</translation>
-<translation id="4804818685124855865">ግንኙነት አቋርጥ</translation>
-<translation id="2544853746127077729">የማረጋገጫ ምስክር ወረቀት በአውታረ መረቡ ተቀባይነት አላገኘም</translation>
-<translation id="5222676887888702881">ዘግተህ ውጣ</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">ውቅር</translation>
-<translation id="1272079795634619415">አቁም</translation>
-<translation id="4957722034734105353">ተጨማሪ ለመረዳት...</translation>
-<translation id="2964193600955408481">Wi-Fiን አሰናክል</translation>
-<translation id="4279490309300973883">በማንጸባረቅ ላይ</translation>
-<translation id="7973962044839454485">PPP ማረጋገጫ በተሳሳተ የተጠቃሚ ስም ወይም የይለፍ ቃል ምክንያት አልተሳካም</translation>
-<translation id="2509468283778169019">CAPS LOCK በርቷል</translation>
-<translation id="3892641579809465218">የውስጥ ማሳያ</translation>
-<translation id="7823564328645135659">ቅንብሮችዎ ከተመሳሰሉ በኋላ ቋንቋው ከ«<ph name="FROM_LOCALE"/> ወደ «<ph name="TO_LOCALE"/>» ተቀይሯል።</translation>
-<translation id="3368922792935385530">ተያይዟል</translation>
-<translation id="8340999562596018839">የተነገረ ግብረ መልስ</translation>
-<translation id="8654520615680304441">Wi-Fi አብራ...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">የግቤት ስልትዎ ወደ <ph name="INPUT_METHOD_ID"/> ተቀይሯል።
-ለመቀየር Shift + Alt ይጫኑ።</translation>
-<translation id="2562916301614567480">የግል አውታረ መረብ</translation>
-<translation id="6549021752953852991">ምንም የተንቀሳቃሽ ሞደም አውታረ መረብ አይገኝም</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">ውድ ማሳያ፣ ልንግባባ አልቻልንም። (ያ ማሳያ አይደገፍም)</translation>
-<translation id="6426039856985689743">የተንቀሳቃሽ ስልክ ውሂብን ያሰናክሉ</translation>
-<translation id="3087734570205094154">ግርጌ</translation>
-<translation id="3742055079367172538">ቅጽበታዊ ገጽ እይታ ተነስቷል</translation>
-<translation id="8878886163241303700">ማያ ገጽ በማስቀጠል ላይ</translation>
-<translation id="5271016907025319479">VPN አልተዋቀረም።</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (ብሉቱዝ)</translation>
-<translation id="3967919079500697218">ቅጽበታዊ-ገጽ እይታዎችን የማንሳት ችሎታ በአስተዳዳሪዎ ተሰናክሏል።</translation>
-<translation id="372094107052732682">ለመውጣት Ctrl+Shift+Qን ይጫኑ</translation>
-<translation id="6803622936009808957">ምንም የሚደገፉ ጥራቶች ስላልተገኙ ማሳያዎችን ማሳየት አልተቻለም። ይልቁንስ ወደ የተስፋፋ ዴስክቶፕ ሁነታ ተገብቷል።</translation>
-<translation id="1480041086352807611">የማሳያ ሁነታ</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% ይቀራል</translation>
-<translation id="9089416786594320554">የግቤት ስልቶች</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">«<ph name="NAME"/>»ን ማግበር የአውታረ መረብ ግንኙነት ያስፈልገዋል።</translation>
-<translation id="3963445509666917109">ድምጽ ማጉያ (ውስጣዊ)</translation>
-<translation id="2825619548187458965">መደርደሪያ</translation>
-<translation id="2614835198358683673">የእርስዎ Chromebook በርቶ ሳለ ባትሪ ላይሞላ ይችላል። ዋናውን ባትሪ መሙያ መጠቀሙን ያስቡበት።</translation>
-<translation id="1895658205118569222">አጥፋ</translation>
-<translation id="4430019312045809116">ድምፅ</translation>
-<translation id="8681498213689260554">ለማዘመን ዳግም ያስጀምሩና በሃይል ይጠቡ</translation>
-<translation id="4442424173763614572">የዲ ኤን ኤስ ፍለጋ አልተሳካም</translation>
-<translation id="7874779702599364982">የድምጸ ተያያዥ ሞደም አውታረ መረቦችን በመፈለግ ላይ...</translation>
-<translation id="583281660410589416">ያልታወቀ</translation>
-<translation id="1383876407941801731">ፍለጋ</translation>
-<translation id="3901991538546252627">ከ<ph name="NAME"/> ጋር በመገናኘት ላይ</translation>
-<translation id="2204305834655267233">የአውታረ መረብ መረጃ</translation>
-<translation id="1621499497873603021">ባትሪ ባዶ እስኪሆን ድረስ የቀረው ጊዜ፣ <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">ከእንግዳ ውጣ</translation>
-<translation id="8308637677604853869">ቀዳሚ ምናሌ</translation>
-<translation id="4666297444214622512">ወደ ሌላ መለያ መግባት አይቻልም።</translation>
-<translation id="3625258641415618104">ቅጽበታዊ-ገጽ እይታዎች ተሰናክለዋል</translation>
-<translation id="1346748346194534595">ቀኝ</translation>
-<translation id="1773212559869067373">የማረጋገጫ ምስክር ወረቀት በአካባቢው ተቀባይነት አላገኘም</translation>
-<translation id="8528322925433439945">ተንቀሳቃሽ ስልክ ...</translation>
-<translation id="7049357003967926684">ማህበር</translation>
-<translation id="8428213095426709021">ቅንብሮች</translation>
-<translation id="2372145515558759244">መተግበሪያዎችን በማመሳሰል ላይ...</translation>
-<translation id="7256405249507348194">ያልታወቀ ስህተት፦ <ph name="DESC"/></translation>
-<translation id="7925247922861151263">የAAA ማረጋገጥ አልተሳካም</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> ሙሉ እስኪሆን ድረስ</translation>
-<translation id="5787281376604286451">የተነገረ ግብረ መልስ ነቅቷል።
-ለማሰናከል Ctrl+Alt+Z ይጫኑ።</translation>
-<translation id="4479639480957787382">ኢተርኔት</translation>
-<translation id="6312403991423642364">ያልታወቀ የአውታረ መረብ ስህተት</translation>
-<translation id="1467432559032391204">ግራ</translation>
-<translation id="5543001071567407895">ኤስ ኤም ኤስ</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830"><ph name="NAME"/>ን በማግበር ላይ</translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">ራስ-ሰር ጠቅታዎች</translation>
-<translation id="1398853756734560583">አስፋ</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>፦ በመገናኘት ላይ...</translation>
-<translation id="252373100621549798">ያልታወቀ ማሳያ</translation>
-<translation id="1882897271359938046">ወደ <ph name="DISPLAY_NAME"/> በማንጸባረቅ ላይ</translation>
-<translation id="2727977024730340865">አነስተኛ ኃይል ወዳለው ባትሪ መሙያ ተሰክቷል። የባትሪ መሙላት አስተማማኝ ላይሆን ይችላል።</translation>
-<translation id="3784455785234192852">ቆልፍ</translation>
-<translation id="2805756323405976993">መተግበሪያዎች</translation>
-<translation id="1512064327686280138">የማግበር አለመሳካት</translation>
-<translation id="5097002363526479830">ከአውታረ መረብ «<ph name="NAME"/>» ጋር መገናኘት አልተሳካም፦ <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi ጠፍቷል።</translation>
-<translation id="2966449113954629791">የተሰጠዎት ሞባይል ውሂብ ጨርሰው ሊሆኑ ይችላሉ። ተጨማሪ ውሂብ ለመግዛት የ<ph name="NAME"/> ማስገበሪያ በር ይጎብኙ።</translation>
-<translation id="8132793192354020517">ከ<ph name="NAME"/> ጋር ተገናኝቷል</translation>
-<translation id="7052914147756339792">ልጣፍ አዘጋጅ...</translation>
-<translation id="8678698760965522072">የመስመር ላይ ሁኔታ</translation>
-<translation id="2532589005999780174">ባለከፍተኛ ንፅፅር ሁነታ</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>፣ <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">ውስጣዊ ስህተት</translation>
-<translation id="3019353588588144572">ባትሪ ሙሉ ኃይል እስኪኖረው ድረስ የሚቀረው ጊዜ፣ <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">የማያ ገጽ ማጉያ</translation>
-<translation id="7005812687360380971">አለመሳካት</translation>
-<translation id="882279321799040148">ለማየት ጠቅ ያድርጉ</translation>
-<translation id="1753067873202720523">የእርስዎ Chromebook በርቶ ሳለ ባትሪ ላይሞላ ይችላል።</translation>
-<translation id="5045550434625856497">ትክክል ያልሆነ የይለፍ ቃል</translation>
-<translation id="1602076796624386989">የተንቀሳቃሽ ስልክ ውሂብን ያንቁ</translation>
-<translation id="6981982820502123353">ተደራሽነት</translation>
-<translation id="3157931365184549694">እነበረበት መልስ</translation>
-<translation id="4274292172790327596">ያልታወቀ ስህተት</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">ጆሮ ማዳጀጫ</translation>
-<translation id="225680501294068881">መሣሪያዎችን በመቃኘት ላይ...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>፣ <ph name="DATE"/></translation>
-<translation id="737451040872859086">ማይክሮፎን (ውስጣዊ)</translation>
-<translation id="4448844063988177157">የWi-Fi አውታረ መረቦችን በመፈለግ ላይ…</translation>
-<translation id="8401662262483418323">ከ«<ph name="NAME"/>» ጋር መገናኘት አልተቻለም፦ <ph name="DETAILS"/>
-የአገልጋይ መልዕክት፦ <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">ስህተት ተከስቷል</translation>
-<translation id="7229570126336867161">ኢቪዲኦ ያስፈልጋል</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> በ<ph name="DOMAIN"/> የሚቀናበር ይፋዊ ክፍለ ጊዜ ነው</translation>
-<translation id="9044646465488564462">ከአውታረ መረብ ጋር መገናኘት አልተሳካም፦ <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">ከክፍለ-ጊዜ ውጣ</translation>
-<translation id="8454013096329229812">Wi-Fi በርቷል።</translation>
-<translation id="4872237917498892622">Alt+Search ወይም Shift</translation>
-<translation id="9201131092683066720">ባትሪው <ph name="PERCENTAGE"/>% ሙሉ ነው።</translation>
-<translation id="2983818520079887040">ቅንብሮች ...</translation>
-<translation id="3871838685472846647">በድምጸ ተያያዥ ሞደም የገበረ</translation>
-<translation id="1195412055398077112">ትርፍ ቅኝት</translation>
-<translation id="112308213915226829">መደርደሪያን በራስ ሰር ደብቅ</translation>
-<translation id="7573962313813535744">ትክል ሁነታ</translation>
-<translation id="8927026611342028580">መገናኘት ተጠይቋል</translation>
-<translation id="8300849813060516376">OTASP አልተሳካም</translation>
-<translation id="2792498699870441125">Alt+Search</translation>
-<translation id="8660803626959853127"><ph name="COUNT"/> ፋይል/ፋይሎችን በማመሳሰል ላይ</translation>
-<translation id="5958529069007801266">ክትትል የሚደረግበት ተጠቃሚ</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK ጠፍቷል</translation>
-<translation id="6248847161401822652">ለመተው Control Shift Qን ሁለት ጊዜ ይጫኑ።</translation>
-<translation id="6785414152754474415">ባትሪው <ph name="PERCENTAGE"/>% ሙሉ ሆኖ በተጨማሪም ኃይል እየሞላ ነው።</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>፦ በማግበር ላይ...</translation>
-<translation id="4895488851634969361">ባትሪው ሙሉ ነው።</translation>
-<translation id="5947494881799873997">አድህር</translation>
-<translation id="7593891976182323525">Search ወይም Shift</translation>
-<translation id="7649070708921625228">እገዛ</translation>
-<translation id="747833637904845037">የእርስዎ Chromebook ክዳኑ ተዘግቶ እንኳ ከውጫዊ ማሳያ ጋር እንደተገናኘ ይቆያል።</translation>
-<translation id="3050422059534974565">CAPS LOCK በርቷል።
-ለመሰረዝ Search ወይም Shift ይጫኑ።</translation>
-<translation id="397105322502079400">በማስላት ላይ...</translation>
-<translation id="158849752021629804">የቤት አውታረ መረብ ያስፈልጋል</translation>
-<translation id="6857811139397017780"><ph name="NETWORKSERVICE"/>ን አግብር</translation>
-<translation id="5864471791310927901">የDHCP ፍለጋ አልተሳካም</translation>
-<translation id="6692173217867674490">መጥፎ የይለፍ ሐረግ</translation>
-<translation id="6165508094623778733">ተጨማሪ ለመረዳት</translation>
-<translation id="9046895021617826162">ማገናኘት አልተሳካም</translation>
-<translation id="7168224885072002358">በ<ph name="TIMEOUT_SECONDS"/> ውስጥ ወደ ቀድሞው ጥራት በመመለስ ላይ</translation>
-<translation id="973896785707726617">ይህ ክፍለ ጊዜ በ<ph name="SESSION_TIME_REMAINING"/> ጊዜ ውስጥ ያልቃል። በራስ-ሰር እንዲወጡ ይደረጋሉ።</translation>
-<translation id="8372369524088641025">መጥፎ የWEP ቁልፍ</translation>
-<translation id="6636709850131805001">ያልታወቀ ሁኔታ</translation>
-<translation id="3573179567135747900">ወደ «<ph name="FROM_LOCALE"/>» መልሰህ ቀይር (ዳግም ማስጀመር ይፈልጋል)</translation>
-<translation id="8103386449138765447">የኤስ ኤም ኤስ መልዕክቶች፦ <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">የGoogle Drive ቅንብሮች...</translation>
-<translation id="7209101170223508707">CAPS LOCK በርቷል።
-ለመሰረዝ Alt+Search ወይም Shift ይጫኑ።</translation>
-<translation id="8940956008527784070">ባትሪ ዝቅተኛ ነው (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">ይቀበሉ</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> ቀርቷል</translation>
-<translation id="3009178788565917040">ውጽዓት</translation>
-<translation id="520760366042891468">የማያ ገጽዎን ቁጥጥር በHangouts በኩል በማጋራት ላይ።</translation>
-<translation id="8000066093800657092">ምንም አውታረ መረብ የለም</translation>
-<translation id="4015692727874266537">ሌላ መለያ ያስገቡ...</translation>
-<translation id="5941711191222866238">አሳንስ</translation>
-<translation id="6911468394164995108">ሌላ ይቀላቀሉ...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>፦ <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">እንኳን ደስ አለዎት! የእርስዎ «<ph name="NAME"/>» ውሂብ አገልግሎት ገባሪ ሆኖ ለመሄድ ዝግጁ ነው።</translation>
-<translation id="412065659894267608">ሙሉ እስኪሆን ድረስ <ph name="HOUR"/>ሰ <ph name="MINUTE"/>ደ</translation>
-<translation id="7297443947353982503">የተጠቃሚ ስም/ይለፍ ቃል ትክክል አይደለም ወይም EAP-auth አልተሳካም</translation>
-<translation id="6359806961507272919">ኤስ ኤም ኤስ ከ<ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">ድምጸ ተያያዥ ሞደም</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_ar.xtb b/chromium/ash/strings/ash_strings_ar.xtb
deleted file mode 100644
index 828ef3d05b2..00000000000
--- a/chromium/ash/strings/ash_strings_ar.xtb
+++ /dev/null
@@ -1,227 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="ar">
-<translation id="3595596368722241419">البطارية ممتلئة</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> و<ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">حالة المدخل</translation>
-<translation id="30155388420722288">زر التدفق</translation>
-<translation id="8673028979667498656">270 درجة</translation>
-<translation id="5571066253365925590">تم تمكين البلوتوث</translation>
-<translation id="6310121235600822547">تم تدوير <ph name="DISPLAY_NAME"/> إلى <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">بلوتوث</translation>
-<translation id="2268130516524549846">تم تعطيل البلوتوث</translation>
-<translation id="7165320105431587207">أخفقت تهيئة الشبكة</translation>
-<translation id="3775358506042162758">يُمكنك تسجيل الدخول المتعدد باستخدام ثلاثة حسابات كحد أقصى.</translation>
-<translation id="370649949373421643">‏تمكين Wi-Fi</translation>
-<translation id="3626281679859535460">السطوع</translation>
-<translation id="3621202678540785336">الإدخال</translation>
-<translation id="595202126637698455">تم تمكين تتبع مستوى الأداء</translation>
-<translation id="8054466585765276473">يجري حساب وقت البطارية.</translation>
-<translation id="7982789257301363584">الشبكة</translation>
-<translation id="5565793151875479467">الخادم الوكيل...</translation>
-<translation id="938582441709398163">تراكب لوحة المفاتيح</translation>
-<translation id="4387004326333427325">تم رفض شهادة المصادقة عن بُعد</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">تم تغيير درجة دقة <ph name="DISPLAY_NAME"/> إلى <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">‏أخفق الحصول على HTTP</translation>
-<translation id="2297568595583585744">علبة الحالة</translation>
-<translation id="1661867754829461514">رقم التعريف الشخصي غير موجود</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: جارٍ الاتصال...</translation>
-<translation id="40400351611212369">خطأ تنشيط الشبكة</translation>
-<translation id="4237016987259239829">خطأ في اتصال الشبكة</translation>
-<translation id="2946640296642327832">تمكين البلوتوث</translation>
-<translation id="6459472438155181876">تمديد الشاشة إلى <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">خلوي</translation>
-<translation id="6596816719288285829">‏عنوان IP</translation>
-<translation id="4508265954913339219">أخفقت عملية التنشيط</translation>
-<translation id="3621712662352432595">إعدادات الصوت</translation>
-<translation id="1812696562331527143">‏تم تغيير أسلوب الإدخال إلى <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>جهة خارجية<ph name="END_LINK"/>).
-اضغط على Shift + Alt للتبديل.</translation>
-<translation id="2127372758936585790">شاحن منخفض الطاقة</translation>
-<translation id="3846575436967432996">لا توجد معلومات متاحة حول الشبكة</translation>
-<translation id="3026237328237090306">إعداد بيانات الجوال</translation>
-<translation id="5871632337994001636">إدارة الأجهزة...</translation>
-<translation id="785750925697875037">عرض حساب الجوال</translation>
-<translation id="153454903766751181">جارٍ تهيئة المودم الخلوي...</translation>
-<translation id="4628814525959230255">‏مشاركة التحكم في الشاشة مع <ph name="HELPER_NAME"/> عبر Hangouts.</translation>
-<translation id="7864539943188674973">تعطيل البلوتوث</translation>
-<translation id="939252827960237676">أخفق حفظ لقطة الشاشة</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">إعادة التشغيل للتحديث</translation>
-<translation id="2268813581635650749">خروج الجميع</translation>
-<translation id="735745346212279324">تم قطع اتصال الشبكة الظاهرية الخاصة</translation>
-<translation id="7320906967354320621">في وضع الخمول</translation>
-<translation id="15373452373711364">مؤشر الماوس الكبير</translation>
-<translation id="3294437725009624529">ضيف</translation>
-<translation id="8190698733819146287">تخصيص اللغات والإدخال...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">وضع الرف</translation>
-<translation id="8676770494376880701">تمّ توصيل شاحن منخفض الطاقة</translation>
-<translation id="7170041865419449892">خارج النطاق</translation>
-<translation id="4804818685124855865">قطع الاتصال</translation>
-<translation id="2544853746127077729">تمّ رفض شهادة المصادقة بواسطة الشبكة</translation>
-<translation id="5222676887888702881">الخروج</translation>
-<translation id="2391579633712104609">180 درجة</translation>
-<translation id="2688477613306174402">تهيئة</translation>
-<translation id="1272079795634619415">إيقاف</translation>
-<translation id="4957722034734105353">مزيد من المعلومات...</translation>
-<translation id="2964193600955408481">‏تعطيل Wi-Fi</translation>
-<translation id="4279490309300973883">النسخ المطابق</translation>
-<translation id="7973962044839454485">‏أخفقت مصادقة PPP نظرًا لوجود خطأ في اسم المستخدم أو كلمة المرور</translation>
-<translation id="2509468283778169019">‏مفتاح CAPS LOCK قيد التشغيل</translation>
-<translation id="3892641579809465218">العرض الداخلي</translation>
-<translation id="7823564328645135659">تم تغيير اللغة من &quot;<ph name="FROM_LOCALE"/>&quot; إلى &quot;<ph name="TO_LOCALE"/>&quot; بعد مزامنة إعداداتك.</translation>
-<translation id="3368922792935385530">متصل</translation>
-<translation id="8340999562596018839">التعليقات المنطوقة</translation>
-<translation id="8654520615680304441">‏تشغيل شبكة Wi-Fi...</translation>
-<translation id="8828714802988429505">90 درجة</translation>
-<translation id="5825747213122829519">‏تم تغيير أسلوب الإدخال إلى <ph name="INPUT_METHOD_ID"/>.
-اضغط على Shift + Alt للتبديل.</translation>
-<translation id="2562916301614567480">الشبكة الخاصة</translation>
-<translation id="6549021752953852991">لا تتوفر شبكة خلوية</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">الشاشة لا تعمل. (هذه الشاشة غير متوافقة)</translation>
-<translation id="6426039856985689743">تعطيل بيانات الجوال</translation>
-<translation id="3087734570205094154">أسفل</translation>
-<translation id="3742055079367172538">تم التقاط لقطة الشاشة</translation>
-<translation id="8878886163241303700">توسيع الشاشة</translation>
-<translation id="5271016907025319479">لم تتم تهيئة الشبكة الظاهرية الخاصة.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (بلوتوث)</translation>
-<translation id="3967919079500697218">تم تعطيل إمكانية التقاط لقطات شاشة من قِبل المشرف..</translation>
-<translation id="372094107052732682">‏للإنهاء، اضغط على Ctrl+Shift+Q مرتين.</translation>
-<translation id="6803622936009808957">تعذر إجراء النسخ المطابق للعروض نظرًا لعدم العثور على درجات دقة متوافقة. تم الدخول إلى سطح المكتب الممتد بدلاً من ذلك.</translation>
-<translation id="1480041086352807611">الوضع التجريبي</translation>
-<translation id="3626637461649818317">باقٍ <ph name="PERCENTAGE"/>%</translation>
-<translation id="9089416786594320554">أساليب الإدخال</translation>
-<translation id="6247708409970142803">%<ph name="PERCENTAGE"/></translation>
-<translation id="2670531586141364277">يتطلب تنشيط '<ph name="NAME"/>' اتصالاً بالشبكة.</translation>
-<translation id="3963445509666917109">سماعة (داخلية)</translation>
-<translation id="2825619548187458965">الرف</translation>
-<translation id="2614835198358683673">‏قد لا يستجيب جهاز Chromebook لعملية الشحن وهو قيد التشغيل. مع مراعاة استخدام الشاحن المخصص للجهاز.</translation>
-<translation id="1895658205118569222">إيقاف التشغيل</translation>
-<translation id="4430019312045809116">مستوى الصوت</translation>
-<translation id="8681498213689260554">‏إعادة التشغيل وإجراء Powerwash للتحديث</translation>
-<translation id="4442424173763614572">أخفق البحث في نظام أسماء النطاقات</translation>
-<translation id="7874779702599364982">جارٍ البحث عن شبكات للهاتف الجوال...</translation>
-<translation id="583281660410589416">غير محدّد</translation>
-<translation id="1383876407941801731">البحث</translation>
-<translation id="3901991538546252627">جارٍ الاتصال بـ <ph name="NAME"/></translation>
-<translation id="2204305834655267233">معلومات الشبكة</translation>
-<translation id="1621499497873603021">الوقت المتبقي حتى تصبح البطارية فارغة <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">إنهاء جلسة الضيف</translation>
-<translation id="8308637677604853869">القائمة السابقة</translation>
-<translation id="4666297444214622512">يتعذّر تسجيل الدخول إلى حساب آخر.</translation>
-<translation id="3625258641415618104">تم تعطيل لقطات الشاشة</translation>
-<translation id="1346748346194534595">يمين</translation>
-<translation id="1773212559869067373">تمّ رفض شهادة المصادقة محليًا</translation>
-<translation id="8528322925433439945">الجوال ...</translation>
-<translation id="7049357003967926684">اقتران</translation>
-<translation id="8428213095426709021">الإعدادات</translation>
-<translation id="2372145515558759244">جارٍ مزامنة التطبيقات...</translation>
-<translation id="7256405249507348194">خطأ غير معروف: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">‏أخفق فحص AAA</translation>
-<translation id="8456362689280298700">حتى الاكتمال: <ph name="HOUR"/>:<ph name="MINUTE"/> ‏</translation>
-<translation id="5787281376604286451">‏تم تمكين التعليقات المنطوقة.
-يمكنك الضغط على Ctrl+Alt+Z لتعطيلها.</translation>
-<translation id="4479639480957787382">إيثرنت</translation>
-<translation id="6312403991423642364">خطأ غير معروف</translation>
-<translation id="1467432559032391204">اليسار</translation>
-<translation id="5543001071567407895">‏الرسائل القصيرة SMS</translation>
-<translation id="1957803754585243749">0 درجة</translation>
-<translation id="2354174487190027830">تنشيط <ph name="NAME"/></translation>
-<translation id="8814190375133053267">‏لاسلكي، Wi-Fi</translation>
-<translation id="1923539912171292317">النقرات التلقائية</translation>
-<translation id="1398853756734560583">تكبير</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: جارٍ التوصيل...</translation>
-<translation id="252373100621549798">شاشة عرض غير معروفة</translation>
-<translation id="1882897271359938046">نسخ إلى <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">تمّ توصيل شاحن منخفض الطاقة. لذا قد لا تكون عملية شحن البطارية جديرة بالثقة.</translation>
-<translation id="3784455785234192852">قفل</translation>
-<translation id="2805756323405976993">تطبيقات</translation>
-<translation id="1512064327686280138">إخفاق في عملية التنشيط</translation>
-<translation id="5097002363526479830">أخفق الاتصال بشبكة &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">‏تم إيقاف تشغيل Wi-Fi.</translation>
-<translation id="2966449113954629791">يبدو أنك قد استنفدت القدر المتاح لك من بيانات الجوّال. يُمكنك الانتقال إلى منفذ تنشيط <ph name="NAME"/> لشراء مزيد من البيانات.</translation>
-<translation id="8132793192354020517">تم الاتصال بالموقع <ph name="NAME"/></translation>
-<translation id="7052914147756339792">تعيين خلفية...</translation>
-<translation id="8678698760965522072">الحالة متصل</translation>
-<translation id="2532589005999780174">وضع التباين العالي</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>، <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">خطأ داخلي</translation>
-<translation id="3019353588588144572">الوقت المتبقي حتى يتم شحن البطارية بالكامل <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">مكبّر الشاشة</translation>
-<translation id="7005812687360380971">إخفاق</translation>
-<translation id="882279321799040148">انقر للعرض</translation>
-<translation id="1753067873202720523">‏قد يتعذر شحن جهاز Chromebook أثناء تشغيله.</translation>
-<translation id="5045550434625856497">كلمة مرور غير صحيحة</translation>
-<translation id="1602076796624386989">تمكين بيانات الجوال</translation>
-<translation id="6981982820502123353">إمكانية الدخول</translation>
-<translation id="3157931365184549694">استعادة</translation>
-<translation id="4274292172790327596">خطأ غير معروف</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">سماعة رأس</translation>
-<translation id="225680501294068881">جارٍ البحث عن أجهزة...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>، <ph name="DATE"/></translation>
-<translation id="737451040872859086">ميكروفون (داخلي)</translation>
-<translation id="4448844063988177157">‏جارِ البحث عن شبكات Wi-Fi...</translation>
-<translation id="8401662262483418323">أخفق الاتصال بـ &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/> رسالة الخادم: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">حدث خطأ</translation>
-<translation id="7229570126336867161">‏يلزم توفر EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> هي جلسة عامة يديرها <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">أخفق الاتصال بالشبكة: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">إنهاء الجلسة</translation>
-<translation id="8454013096329229812">‏تم تشغيل Wi-Fi.</translation>
-<translation id="4872237917498892622">‏Alt+مفتاح البحث أو Shift</translation>
-<translation id="9201131092683066720">اكتمل شحن <ph name="PERCENTAGE"/>% من البطارية.</translation>
-<translation id="2983818520079887040">الإعدادات...</translation>
-<translation id="3871838685472846647">تم تنشيط الخلوي</translation>
-<translation id="1195412055398077112">الخروج عن إطار الشاشة</translation>
-<translation id="112308213915226829">الإخفاء التلقائي للرف</translation>
-<translation id="7573962313813535744">وضع الإرساء</translation>
-<translation id="8927026611342028580">الاتصال مطلوب</translation>
-<translation id="8300849813060516376">‏أخفقت OTASP</translation>
-<translation id="2792498699870441125">‏Alt+مفتاح البحث</translation>
-<translation id="8660803626959853127">جارٍ مزامنة <ph name="COUNT"/> من الملفات</translation>
-<translation id="5958529069007801266">مستخدم يخضع للإدارة</translation>
-<translation id="3709443003275901162">‏‎9+‎‏</translation>
-<translation id="639644700271529076">‏مفتاح CAPS LOCK قيد الإيقاف</translation>
-<translation id="6248847161401822652">‏للإنهاء، اضغط على Control Shift Q مرتين.</translation>
-<translation id="6785414152754474415">اكتمل شحن <ph name="PERCENTAGE"/>% من البطارية ويجري شحنها.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: جارٍ التنشيط...</translation>
-<translation id="4895488851634969361">البطارية مملوءة.</translation>
-<translation id="5947494881799873997">التراجع عن الإجراء</translation>
-<translation id="7593891976182323525">‏مفتاح البحث أو Shift</translation>
-<translation id="7649070708921625228">مساعدة</translation>
-<translation id="747833637904845037">‏سيظل جهاز Chromebook قيد التشغيل أثناء توصيله بشاشة عرض خارجية، حتى في حالة إغلاق الغطاء.</translation>
-<translation id="3050422059534974565">‏المفتاح CAPS LOCK في وضع التشغيل، اضغط على مفتاح البحث أو المفتاح Shift لإلغاء التشغيل.</translation>
-<translation id="397105322502079400">جارٍ الحساب...</translation>
-<translation id="158849752021629804">يلزم توفر الشبكة الرئيسية</translation>
-<translation id="6857811139397017780">تنشيط <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">‏أخفق بحث DHCP</translation>
-<translation id="6692173217867674490">عبارة مرور غير صالحة</translation>
-<translation id="6165508094623778733">مزيد من المعلومات</translation>
-<translation id="9046895021617826162">أخفق الاتصال</translation>
-<translation id="7168224885072002358">سيتم الرجوع إلى درجة الدقة القديمة في غضون <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">ستنتهي هذه الجلسة في <ph name="SESSION_TIME_REMAINING"/>. سيتم الخروج تلقائيًا.</translation>
-<translation id="8372369524088641025">‏مفتاح WEP غير صالح</translation>
-<translation id="6636709850131805001">حالة غير معروفة</translation>
-<translation id="3573179567135747900">التغيير مرة أخرى إلى &quot;<ph name="FROM_LOCALE"/>&quot; (يتطلب إعادة التشغيل)</translation>
-<translation id="8103386449138765447">‏الرسائل القصيرة SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">‏إعدادات Google Drive...</translation>
-<translation id="7209101170223508707">‏المفتاح CAPS LOCK في وضع التشغيل. اضغط على Alt+مفتاح البحث، أو اضغط على المفتاح Shift لإلغاء التشغيل.</translation>
-<translation id="8940956008527784070">طاقة البطارية منخفضة (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">قبول</translation>
-<translation id="5102001756192215136">الوقت المتبقي: <ph name="HOUR"/>:<ph name="MINUTE"/> ‏</translation>
-<translation id="3009178788565917040">الإخراج</translation>
-<translation id="520760366042891468">‏مشاركة التحكم في الشاشة عبر Hangouts.</translation>
-<translation id="8000066093800657092">لا شبكة</translation>
-<translation id="4015692727874266537">تسجيل الدخول لحساب آخر...</translation>
-<translation id="5941711191222866238">تصغير</translation>
-<translation id="6911468394164995108">الانضمام إلى شبكة أخرى...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">تم تنشيط خدمة البيانات '<ph name="NAME"/>' وهي جاهزة للعمل.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/>س <ph name="MINUTE"/>د حتى الاكتمال</translation>
-<translation id="7297443947353982503">‏اسم المستخدم/كلمة المرور غير صحيحة أو أخفقت مصادقة EAP</translation>
-<translation id="6359806961507272919">‏رسالة قصيرة SMS من الهاتف رقم <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">شركة اتصالات</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_bg.xtb b/chromium/ash/strings/ash_strings_bg.xtb
deleted file mode 100644
index 86396c60e97..00000000000
--- a/chromium/ash/strings/ash_strings_bg.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="bg">
-<translation id="3595596368722241419">Батерията е заредена</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> и <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Състояние на портала</translation>
-<translation id="30155388420722288">Бутон „Препълване“</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth е активиран</translation>
-<translation id="6310121235600822547">Завъртяхте „<ph name="DISPLAY_NAME"/>“ на <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth е деактивиран</translation>
-<translation id="7165320105431587207">Конфигурирането на мрежата не бе успешно</translation>
-<translation id="3775358506042162758">В централизирания вход можете да имате най-много три профила.</translation>
-<translation id="370649949373421643">Активиране на Wi-Fi</translation>
-<translation id="3626281679859535460">Яркост</translation>
-<translation id="3621202678540785336">Вход</translation>
-<translation id="595202126637698455">Проследяването на ефективността е активирано</translation>
-<translation id="8054466585765276473">Издръжливостта на батерията се изчислява.</translation>
-<translation id="7982789257301363584">Мрежа</translation>
-<translation id="5565793151875479467">Прокси сървър...</translation>
-<translation id="938582441709398163">Наслагване върху клавиатурата</translation>
-<translation id="4387004326333427325">Сертификатът за удостоверяване бе отхвърлен отдалечено</translation>
-<translation id="6979158407327259162">Google Диск</translation>
-<translation id="3683428399328702079">Променихте разделителната способност на „<ph name="DISPLAY_NAME"/>“ на <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">Получаването на HTTP не бе успешно</translation>
-<translation id="2297568595583585744">Област на състоянието</translation>
-<translation id="1661867754829461514">Липсва PIN</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: Установява се връзка...</translation>
-<translation id="40400351611212369">Грешка при активиране на мрежата</translation>
-<translation id="4237016987259239829">Грешка при свързване към мрежата</translation>
-<translation id="2946640296642327832">Активиране на Bluetooth</translation>
-<translation id="6459472438155181876">Екранът се разширява на „<ph name="DISPLAY_NAME"/>“</translation>
-<translation id="8206859287963243715">Клетъчно</translation>
-<translation id="6596816719288285829">IP адрес</translation>
-<translation id="4508265954913339219">Активирането не бе успешно</translation>
-<translation id="3621712662352432595">Настройки за звука</translation>
-<translation id="1812696562331527143">Методът ви на въвеждане се промени на <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>трета страна<ph name="END_LINK"/>).
-Натиснете „Shift + Alt“, за да превключите.</translation>
-<translation id="2127372758936585790">Зарядно устройство с малка мощност</translation>
-<translation id="3846575436967432996">Не е налице информация за мрежата</translation>
-<translation id="3026237328237090306">Настройка на мобилните данни</translation>
-<translation id="5871632337994001636">Управление на устройствата...</translation>
-<translation id="785750925697875037">Преглед на мобилния профил</translation>
-<translation id="153454903766751181">Клетъчният модем се подготвя за работа...</translation>
-<translation id="4628814525959230255">Контролът върху екрана ви се споделя с/ъс <ph name="HELPER_NAME"/> чрез Hangouts.</translation>
-<translation id="7864539943188674973">Деактивиране на Bluetooth</translation>
-<translation id="939252827960237676">Запазването на екранната снимка не бе успешно</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Рестартирайте, за да актуализирате</translation>
-<translation id="2268813581635650749">Изход за всички</translation>
-<translation id="735745346212279324">Връзката с виртуалната частна мрежа (VPN) е прекъсната</translation>
-<translation id="7320906967354320621">Неактивна</translation>
-<translation id="15373452373711364">Голям курсор на мишката</translation>
-<translation id="3294437725009624529">Гост</translation>
-<translation id="8190698733819146287">Персонализиране на езиците и въвеждането...</translation>
-<translation id="1279938420744323401">„<ph name="DISPLAY_NAME"/>“ (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Позиция на лавицата</translation>
-<translation id="8676770494376880701">Свързано е зарядно устройство с малка мощност</translation>
-<translation id="7170041865419449892">Извън обхват</translation>
-<translation id="4804818685124855865">Изключване</translation>
-<translation id="2544853746127077729">Сертификатът за удостоверяване бе отхвърлен от мрежата</translation>
-<translation id="5222676887888702881">Изход</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Конфигурация</translation>
-<translation id="1272079795634619415">Стоп</translation>
-<translation id="4957722034734105353">Научете повече...</translation>
-<translation id="2964193600955408481">Деактивиране на Wi-Fi</translation>
-<translation id="4279490309300973883">Дублиране</translation>
-<translation id="7973962044839454485">Удостоверяването през PPP не бе успешно поради неправилно потребителско име или парола</translation>
-<translation id="2509468283778169019">„CAPS LOCK“ е включен</translation>
-<translation id="3892641579809465218">Показване на вътрешна информация</translation>
-<translation id="7823564328645135659">Езикът се промени от „<ph name="FROM_LOCALE"/>“ на „<ph name="TO_LOCALE"/>“ след синхронизирането на настройките ви.</translation>
-<translation id="3368922792935385530">Установена е връзка</translation>
-<translation id="8340999562596018839">Обратна връзка с говор</translation>
-<translation id="8654520615680304441">Включване на Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Методът ви на въвеждане се промени на <ph name="INPUT_METHOD_ID"/>.
-Натиснете „Shift + Alt“, за да превключите.</translation>
-<translation id="2562916301614567480">Частна мрежа</translation>
-<translation id="6549021752953852991">Няма налична клетъчна мрежа</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Уважаеми мониторе, нещата между нас не се получават. (Този монитор не се поддържа)</translation>
-<translation id="6426039856985689743">Деактивиране на мобилните данни</translation>
-<translation id="3087734570205094154">Най-долу</translation>
-<translation id="3742055079367172538">Направена бе екранна снимка</translation>
-<translation id="8878886163241303700">Разгъване на екрана</translation>
-<translation id="5271016907025319479">Виртуалната частна мрежа (VPN) не е конфигурирана.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Възможността за правене на екранни снимки е деактивирана от администратора ви.</translation>
-<translation id="372094107052732682">За изход натиснете два пъти Ctrl+Shift+Q.</translation>
-<translation id="6803622936009808957">Дисплеите не можаха да се дублират, тъй като не бяха намерени поддържани разделителни способности. Вместо това влязохте в режима за разширен работен плот.</translation>
-<translation id="1480041086352807611">Демонстрационен режим</translation>
-<translation id="3626637461649818317">Остава/т <ph name="PERCENTAGE"/>%</translation>
-<translation id="9089416786594320554">Методи за въвеждане</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">За активирането на „<ph name="NAME"/>“ се изисква връзка с мрежата.</translation>
-<translation id="3963445509666917109">Високоговорител (вътрешен)</translation>
-<translation id="2825619548187458965">Лавица</translation>
-<translation id="2614835198358683673">Възможно е вашият Chromebook да не се зарежда, докато е включен. Помислете за използване на официалното зарядно устройство.</translation>
-<translation id="1895658205118569222">Изключване</translation>
-<translation id="4430019312045809116">Звук</translation>
-<translation id="8681498213689260554">Рестартирайте и извършете Powerwash, за да актуализирате</translation>
-<translation id="4442424173763614572">Търсенето в DNS не бе успешно</translation>
-<translation id="7874779702599364982">Търсят се мобилни мрежи...</translation>
-<translation id="583281660410589416">Неизвестно</translation>
-<translation id="1383876407941801731">Търсене</translation>
-<translation id="3901991538546252627">Установява се връзка със: <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Информация за мрежата</translation>
-<translation id="1621499497873603021">Оставащо време до изразходването на батерията: <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Изход от сесията като гост</translation>
-<translation id="8308637677604853869">Предишно меню</translation>
-<translation id="4666297444214622512">Не може да влезете в друг профил.</translation>
-<translation id="3625258641415618104">Екранните снимки са деактивирани</translation>
-<translation id="1346748346194534595">Надясно</translation>
-<translation id="1773212559869067373">Сертификатът за удостоверяване бе отхвърлен локално</translation>
-<translation id="8528322925433439945">Мобилни мрежи...</translation>
-<translation id="7049357003967926684">Връзка</translation>
-<translation id="8428213095426709021">Настройки</translation>
-<translation id="2372145515558759244">Приложенията се синхронизират...</translation>
-<translation id="7256405249507348194">Неразпозната грешка: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Проверката за AAA не бе успешна</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> до пълно зареждане</translation>
-<translation id="5787281376604286451">Обратната връзка с говор е активирана.
-Натиснете „Ctrl+Alt+Z“, за да я деактивирате.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Неизвестна мрежова грешка</translation>
-<translation id="1467432559032391204">Наляво</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">„<ph name="NAME"/>“ се активира</translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Автоматични кликвания</translation>
-<translation id="1398853756734560583">Увеличаване</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: Установява се връзка...</translation>
-<translation id="252373100621549798">Неизвестен дисплей</translation>
-<translation id="1882897271359938046">Дублира се на „<ph name="DISPLAY_NAME"/>“</translation>
-<translation id="2727977024730340865">Използва се зарядно устройство с малка мощност. Зареждането на батерията може да не е надеждно.</translation>
-<translation id="3784455785234192852">Заключване</translation>
-<translation id="2805756323405976993">Приложения</translation>
-<translation id="1512064327686280138">Неуспех при активирането</translation>
-<translation id="5097002363526479830">Свързването с мрежата „<ph name="NAME"/>“ не бе успешно: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi е изключен.</translation>
-<translation id="2966449113954629791">Възможно е да сте изразходвали отпуснатите ви мобилни данни. Посетете портала за активиране „<ph name="NAME"/>“, за да купите още данни.</translation>
-<translation id="8132793192354020517">Установена е връзка с/ъс <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Задаване на тапет...</translation>
-<translation id="8678698760965522072">Състояние: Онлайн</translation>
-<translation id="2532589005999780174">Режим на висок контраст</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Вътрешна грешка</translation>
-<translation id="3019353588588144572">Оставащо време до пълното зареждане на батерията: <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Екранна лупа</translation>
-<translation id="7005812687360380971">Неуспех</translation>
-<translation id="882279321799040148">Кликнете, за да прегледате</translation>
-<translation id="1753067873202720523">Вашият Chromebook може да не се зарежда, докато е включен.</translation>
-<translation id="5045550434625856497">Неправилна парола</translation>
-<translation id="1602076796624386989">Активиране на мобилните данни</translation>
-<translation id="6981982820502123353">Достъпност</translation>
-<translation id="3157931365184549694">Възстановяване</translation>
-<translation id="4274292172790327596">Неразпозната грешка</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Слушалки</translation>
-<translation id="225680501294068881">Сканира се за устройства...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Микрофон (вътрешен)</translation>
-<translation id="4448844063988177157">Търсят се Wi-Fi мрежи...</translation>
-<translation id="8401662262483418323">Свързването с/ъс „<ph name="NAME"/>“ не бе успешно: <ph name="DETAILS"/>
-Съобщение от сървъра: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Възникна грешка</translation>
-<translation id="7229570126336867161">Необходим е EVDO</translation>
-<translation id="2999742336789313416">„<ph name="DISPLAY_NAME"/>“ е обществена сесия, управлявана от <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Свързването с мрежата не бе успешно: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Изход от сесията</translation>
-<translation id="8454013096329229812">Wi-Fi е включен.</translation>
-<translation id="4872237917498892622">„Alt + търсене“ или „Shift“</translation>
-<translation id="9201131092683066720">Батерията е <ph name="PERCENTAGE"/>% пълна.</translation>
-<translation id="2983818520079887040">Настройки...</translation>
-<translation id="3871838685472846647">Мобилната мрежа е активирана</translation>
-<translation id="1195412055398077112">допълнителна област</translation>
-<translation id="112308213915226829">Автоматично скриване на лавицата</translation>
-<translation id="7573962313813535744">Режим с докинг станция</translation>
-<translation id="8927026611342028580">Заявено е свързване</translation>
-<translation id="8300849813060516376">Безжичното осигуряване на услуга не бе успешно</translation>
-<translation id="2792498699870441125">Alt + търсене</translation>
-<translation id="8660803626959853127">Синхронизира/т се <ph name="COUNT"/> файл/а</translation>
-<translation id="5958529069007801266">Контролиран потребител</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">„CAPS LOCK“ е изключен</translation>
-<translation id="6248847161401822652">За изход натиснете два пъти Ctrl+Shift+Q.</translation>
-<translation id="6785414152754474415">Батерията е <ph name="PERCENTAGE"/>% пълна и се зарежда.</translation>
-<translation id="6267036997247669271">„<ph name="NAME"/>“: Активира се...</translation>
-<translation id="4895488851634969361">Батерията е пълна.</translation>
-<translation id="5947494881799873997">Възстановяване</translation>
-<translation id="7593891976182323525">„търсене“ или „Shift“</translation>
-<translation id="7649070708921625228">Помощ</translation>
-<translation id="747833637904845037">Докато е свързан с външен монитор, Chromebook ще остане включен дори при затворен капак.</translation>
-<translation id="3050422059534974565">„CAPS LOCK“ е включен.
-Натиснете „търсене“ или „Shift“, за да анулирате.</translation>
-<translation id="397105322502079400">Изчислява се...</translation>
-<translation id="158849752021629804">Необходима е собствена мрежа</translation>
-<translation id="6857811139397017780">Активиране на <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Търсенето на DHCP сървър не бе успешно</translation>
-<translation id="6692173217867674490">Паролата е неправилна</translation>
-<translation id="6165508094623778733">Научете повече</translation>
-<translation id="9046895021617826162">Свързването не бе успешно</translation>
-<translation id="7168224885072002358">Старата разделителна способност ще се възстанови след <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Тази сесия ще приключи след <ph name="SESSION_TIME_REMAINING"/>. Ще излезете автоматично от нея.</translation>
-<translation id="8372369524088641025">Ключът за WEP е неправилен</translation>
-<translation id="6636709850131805001">Неразпознато състояние</translation>
-<translation id="3573179567135747900">Връщане към „<ph name="FROM_LOCALE"/>“ (изисква рестартиране)</translation>
-<translation id="8103386449138765447">SMS съобщения: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Настройки за Google Диск...</translation>
-<translation id="7209101170223508707">„CAPS LOCK“ е включен.
-Натиснете „Alt + търсене“ или „Shift“, за да анулирате.</translation>
-<translation id="8940956008527784070">Батерията е изтощена (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Приемам</translation>
-<translation id="5102001756192215136">Остава/т <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Изход</translation>
-<translation id="520760366042891468">Контролът върху екрана ви се споделя чрез Hangouts.</translation>
-<translation id="8000066093800657092">Няма мрежа</translation>
-<translation id="4015692727874266537">Вход в друг профил...</translation>
-<translation id="5941711191222866238">Намаляване</translation>
-<translation id="6911468394164995108">Присъединяване другаде...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Поздравления! Услугата ви за данни „<ph name="NAME"/>“ е активирана и е готова за работа.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/> ч <ph name="MINUTE"/> м до пълно зареждане</translation>
-<translation id="7297443947353982503">Потребителското име или паролата са неправилни или удостоверяването през EAP не бе успешно</translation>
-<translation id="6359806961507272919">SMS от <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Оператор</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_bn.xtb b/chromium/ash/strings/ash_strings_bn.xtb
deleted file mode 100644
index d963ff6a925..00000000000
--- a/chromium/ash/strings/ash_strings_bn.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="bn">
-<translation id="3595596368722241419">ব্যাটারি পুরো চার্জ</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> এবং <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">পোর্টাল স্থিতি</translation>
-<translation id="30155388420722288">ওভারফ্লো বোতাম</translation>
-<translation id="8673028979667498656">২৭০°</translation>
-<translation id="5571066253365925590">ব্লুটুথ সক্ষমিত</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> <ph name="ROTATION"/> আবর্তিত হয়েছে</translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">ব্লুটুথ অক্ষমিত</translation>
-<translation id="7165320105431587207">নেটওয়ার্ক কনফিগার করা যায়নি</translation>
-<translation id="3775358506042162758">একাধিক সাইন ইনে আপনার কেবলমাত্র তিনটি অ্যাকাউন্ট থাকতে পারে৷</translation>
-<translation id="370649949373421643">Wi-fi সক্ষম করুন</translation>
-<translation id="3626281679859535460">উজ্জ্বলতা</translation>
-<translation id="3621202678540785336">ইনপুট</translation>
-<translation id="595202126637698455">কার্য-সম্পাদনা ট্রেস করা সক্ষম রয়েছে</translation>
-<translation id="8054466585765276473">ব্যাটারি সময় গণনা করা হচ্ছে।</translation>
-<translation id="7982789257301363584">নেটওয়ার্ক</translation>
-<translation id="5565793151875479467">প্রক্সি...</translation>
-<translation id="938582441709398163">কীবোর্ড ওভারলে</translation>
-<translation id="4387004326333427325">দূরবর্তী অবস্থান থেকে প্রমাণীকরণ শংসাপত্র প্রত্যাখ্যান করা হয়েছে</translation>
-<translation id="6979158407327259162">Google ড্রাইভ</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> এর রেসুলিউশান বদল করে <ph name="RESOLUTION"/> করা হয়েছে</translation>
-<translation id="6943836128787782965">HTTP ব্যর্থ হয়েছে</translation>
-<translation id="2297568595583585744">স্থিতি ট্রে</translation>
-<translation id="1661867754829461514">PIN হারিয়েছে</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: সংযুক্ত হচ্ছে...</translation>
-<translation id="40400351611212369">নেটওয়ার্ক সক্রিয়করণে ত্রুটি</translation>
-<translation id="4237016987259239829">নেটওয়ার্ক সংযোগ ত্রুটি</translation>
-<translation id="2946640296642327832">ব্লুটুথ সক্ষম করুন</translation>
-<translation id="6459472438155181876">স্ক্রীন <ph name="DISPLAY_NAME"/> তে প্রসারিত হচ্ছে</translation>
-<translation id="8206859287963243715">সেলুলার</translation>
-<translation id="6596816719288285829">IP ঠিকানা</translation>
-<translation id="4508265954913339219">সক্রিয়করণ ব্যর্থ</translation>
-<translation id="3621712662352432595">অডিও সেটিংস</translation>
-<translation id="1812696562331527143">আপনার ইনপুট পদ্ধতি <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>৩য় পক্ষ<ph name="END_LINK"/>) এ পরিবর্তিত হয়েছে৷
-স্যুইচ করতে Shift + Alt টিপুন৷</translation>
-<translation id="2127372758936585790">নিম্ন শক্তির চার্জার</translation>
-<translation id="3846575436967432996">কোনো নেটওয়ার্ক সংক্রান্ত তথ্য উপলব্ধ নেই</translation>
-<translation id="3026237328237090306">মোবাইল ডেটা সেটআপ করুন</translation>
-<translation id="5871632337994001636">ডিভাইসগুলি পরিচালন করুন...</translation>
-<translation id="785750925697875037">মোবাইল অ্যাকাউন্ট দেখুন</translation>
-<translation id="153454903766751181">সেলুলার মোডেম আরম্ভ করা হচ্ছে...</translation>
-<translation id="4628814525959230255">Hangouts এর মাধ্যমে <ph name="HELPER_NAME"/> এর সঙ্গে আপনার স্ক্রীন নিয়ন্ত্রণ ভাগ করা হচ্ছে৷</translation>
-<translation id="7864539943188674973">ব্লুটুথ অক্ষম করুন</translation>
-<translation id="939252827960237676">স্ক্রীনশট সংরক্ষণ করতে ব্যর্থ হয়েছে</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">আপডেট করার জন্য পুনরারম্ভ করুন</translation>
-<translation id="2268813581635650749">সবগুলি সাইন আউট করুন</translation>
-<translation id="735745346212279324">VPN সংযোগ বিচ্ছিন্ন করা হয়েছে</translation>
-<translation id="7320906967354320621">নিষ্ক্রিয়</translation>
-<translation id="15373452373711364">বড় মাউস কার্সার</translation>
-<translation id="3294437725009624529">অতিথি</translation>
-<translation id="8190698733819146287">ভাষা এবং ইনপুট কাস্টমাইজ করুন...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">শেল্ফ অবস্থান</translation>
-<translation id="8676770494376880701">নিম্ন শক্তির চার্জার সংযুক্ত করা হয়েছে</translation>
-<translation id="7170041865419449892">সীমার বাইরে</translation>
-<translation id="4804818685124855865">সংযোগ বিচ্ছিন্ন</translation>
-<translation id="2544853746127077729">নেটওয়ার্কের দ্বারা প্রমাণীকরণ শংসাপত্র প্রত্যাখ্যান করা হয়েছে</translation>
-<translation id="5222676887888702881">সাইন আউট</translation>
-<translation id="2391579633712104609">১৮০°</translation>
-<translation id="2688477613306174402">কনফিগারেশন</translation>
-<translation id="1272079795634619415">বন্ধ</translation>
-<translation id="4957722034734105353">আরো জানুন...</translation>
-<translation id="2964193600955408481">Wi-Fi অক্ষম করুন</translation>
-<translation id="4279490309300973883">অনুকরণ করা হচ্ছে</translation>
-<translation id="7973962044839454485">একটি ভুল ব্যবহারকারী নাম বা পাসওয়ার্ডের কারণে PPP প্রমাণীকরণ ব্যর্থ হয়েছে৷</translation>
-<translation id="2509468283778169019">CAPS LOCK চালু</translation>
-<translation id="3892641579809465218">অভ্যন্তরীণ প্রদর্শন</translation>
-<translation id="7823564328645135659">আপনার সেটিংস সিঙ্ক করার পরে ভাষা &quot;<ph name="FROM_LOCALE"/>&quot; থেকে &quot;<ph name="TO_LOCALE"/>&quot; এ পরিবর্তন করা হয়েছে৷</translation>
-<translation id="3368922792935385530">সংযুক্ত</translation>
-<translation id="8340999562596018839">কথ্য প্রতিক্রিয়া</translation>
-<translation id="8654520615680304441">Wi-Fi চালু করুন...</translation>
-<translation id="8828714802988429505">৯০°</translation>
-<translation id="5825747213122829519">আপনার ইনপুট পদ্ধতি <ph name="INPUT_METHOD_ID"/> এ পরিবর্তিত হয়েছে৷
-স্যুইচ করতে Shift + Alt টিপুন৷</translation>
-<translation id="2562916301614567480">ব্যক্তিগত নেটওয়ার্ক</translation>
-<translation id="6549021752953852991">কোনো সেলুলার নেটওয়ার্ক উপলব্ধ নেই</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Dear Monitor, it's not working out between us. (এই মনিটরটি সমর্থিত নয়)</translation>
-<translation id="6426039856985689743">মোবাইল ডেটা নিষ্ক্রিয় করুন</translation>
-<translation id="3087734570205094154">নীচে</translation>
-<translation id="3742055079367172538">স্ক্রীনশট নেওয়া হয়েছে</translation>
-<translation id="8878886163241303700">স্ক্রীন সম্প্রসারণ করা হচ্ছে</translation>
-<translation id="5271016907025319479">VPN কনফিগার করা নেই৷</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">স্ক্রীনশট নেওয়ার ক্ষমতা আপনার প্রশাসক দ্বারা অক্ষম করা হয়েছে৷</translation>
-<translation id="372094107052732682">প্রস্থান করার জন্য দুবার Ctrl+Shift+Q টিপুন৷</translation>
-<translation id="6803622936009808957">সমর্থিত রেসুলিউশানগুলি খুঁজে না পাওয়ায় মিরর প্রদর্শনগুলি করতে পারেনি৷ পরিবর্তে প্রসারিত ডেস্কটপ সক্ষম করা হয়েছে৷</translation>
-<translation id="1480041086352807611">নমুনা মোড</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% বাকি আছে</translation>
-<translation id="9089416786594320554">ইনপুট পদ্ধতিসমূহ</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">'<ph name="NAME"/>' এর সক্রিয়করণের জন্য একটি নেটওয়ার্ক সংযোগের প্রয়োজন৷</translation>
-<translation id="3963445509666917109">স্পিকার (অভ্যন্তরীণ)</translation>
-<translation id="2825619548187458965">শেল্ফ</translation>
-<translation id="2614835198358683673">চালু থাকার সময় আপনার Chromebook চার্জ নাও হতে পারে৷ এটির নিজস্ব চার্জার ব্যবহার করার কথা বিবেচনা করুন৷</translation>
-<translation id="1895658205118569222">বন্ধ করুন</translation>
-<translation id="4430019312045809116">ভলিউম</translation>
-<translation id="8681498213689260554">আপডেট করার জন্য আবার শুরু করুন এবং পাওয়ারওয়াশ করুন</translation>
-<translation id="4442424173763614572">DNS খোঁজ ব্যর্থ হয়েছে</translation>
-<translation id="7874779702599364982">সেলুলার নেটওয়ার্কগুলির জন্য অনুসন্ধান করছে...</translation>
-<translation id="583281660410589416">অজানা</translation>
-<translation id="1383876407941801731">অনুসন্ধান</translation>
-<translation id="3901991538546252627"><ph name="NAME"/>-এ সংযোগ করা হচ্ছে</translation>
-<translation id="2204305834655267233">নেটওয়ার্ক তথ্য</translation>
-<translation id="1621499497873603021">ব্যাটারি শেষ হতে <ph name="TIME_LEFT"/> সময় বাকি আছে</translation>
-<translation id="5980301590375426705">অতিথি থেকে প্রস্থান</translation>
-<translation id="8308637677604853869">পূর্ববর্তী মেনু</translation>
-<translation id="4666297444214622512">অন্য একটি অ্যাকাউন্টে সাইন ইন করতে পারবেন না৷</translation>
-<translation id="3625258641415618104">স্ক্রীনশট অক্ষম হয়েছে</translation>
-<translation id="1346748346194534595">ডান</translation>
-<translation id="1773212559869067373">স্থানীয়ভাবে প্রমাণীকরণ শংসাপত্র প্রত্যাখ্যান করা হয়েছে</translation>
-<translation id="8528322925433439945">মোবাইল ...</translation>
-<translation id="7049357003967926684">সমিতি</translation>
-<translation id="8428213095426709021">সেটিংস</translation>
-<translation id="2372145515558759244">অ্যাপ্লিকেশনগুলি সিঙ্ক হচ্ছে...</translation>
-<translation id="7256405249507348194">অস্বীকৃত ত্রুটি: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA যাচাই ব্যর্থ</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> বাকি পুরো চার্জ হতে</translation>
-<translation id="5787281376604286451">কথ্য প্রতিক্রিয়া সক্ষমিত৷
-অক্ষম করতে Ctrl + Alt + Z টিপুন৷</translation>
-<translation id="4479639480957787382">ইথারনেট</translation>
-<translation id="6312403991423642364">অজানা নেটওয়ার্ক ত্রুটি</translation>
-<translation id="1467432559032391204">বাম</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">০°</translation>
-<translation id="2354174487190027830"><ph name="NAME"/> সক্রিয় করা হচ্ছে</translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">স্বয়ংক্রিয় ক্লিকগুলি</translation>
-<translation id="1398853756734560583">বড় করুন</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: সংযুক্ত হচ্ছে...</translation>
-<translation id="252373100621549798">অজানা প্রদর্শন</translation>
-<translation id="1882897271359938046"><ph name="DISPLAY_NAME"/> তে প্রতিবিম্বিত হচ্ছে</translation>
-<translation id="2727977024730340865">একটি নিম্ন শক্তির চার্জার প্লাগইন করা হয়েছে৷ বিশ্বস্ত ব্যাটারি চার্জ নাও হতে পারে৷</translation>
-<translation id="3784455785234192852">লক করুন</translation>
-<translation id="2805756323405976993">Apps</translation>
-<translation id="1512064327686280138">সক্রিয়করণে ব্যর্থতা</translation>
-<translation id="5097002363526479830">নেটওয়ার্কের সাথে সংযোগ করতে ব্যর্থ '<ph name="NAME"/>': <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi বন্ধ আছে৷</translation>
-<translation id="2966449113954629791">আপনি হয়তো আপনার মোবাইল ডেটার প্রদত্ত পরিমান ব্যবহার করে ফেলেছেন৷ আরো ডেটা কিনতে <ph name="NAME"/> সক্রিয়করণ পোর্টালে যান৷</translation>
-<translation id="8132793192354020517"><ph name="NAME"/> তে সংযুক্ত</translation>
-<translation id="7052914147756339792">ওয়ালপেপার সেট করুন...</translation>
-<translation id="8678698760965522072">অনলাইন স্থিতি</translation>
-<translation id="2532589005999780174">উচ্চ কনট্রাস্ট মোড</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">অভ্যন্তরীণ ত্রুটি</translation>
-<translation id="3019353588588144572">ব্যাটারি পরিপূর্ণ চার্জ হতে, <ph name="TIME_REMAINING"/> সময় বাকি আছে</translation>
-<translation id="3473479545200714844">স্ক্রীন ম্যাগনিফায়ার</translation>
-<translation id="7005812687360380971">ব্যর্থতা</translation>
-<translation id="882279321799040148">দেখার জন্য ক্লিক করুন</translation>
-<translation id="1753067873202720523">চালু থাকার সময় আপনার Chromebook চার্জ নাও হতে পারে৷</translation>
-<translation id="5045550434625856497">ভুল পাসওয়ার্ড</translation>
-<translation id="1602076796624386989">মোবাইল ডেটা সক্রিয় করুন</translation>
-<translation id="6981982820502123353">অ্যাক্সেযোগ্যতা</translation>
-<translation id="3157931365184549694">পুনরুদ্ধার করুন</translation>
-<translation id="4274292172790327596">অস্বীকৃত ত্রুটি</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">হেডফোন</translation>
-<translation id="225680501294068881">ডিভাইসগুলির জন্য স্ক্যান করা হচ্ছে...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">মাইক্রোফোন (অভ্যন্তরীণ)</translation>
-<translation id="4448844063988177157">Wi-Fi নেটওয়ার্কগুলির জন্য অনুসন্ধান করুন...</translation>
-<translation id="8401662262483418323">'<ph name="NAME"/>' এর সাথে সংযোগ করা ব্যর্থ হয়েছে: <ph name="DETAILS"/>
-সার্ভার বার্তা: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">একটি ত্রুটি ঘটেছে</translation>
-<translation id="7229570126336867161">EVDO এর প্রয়োজন</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> হল <ph name="DOMAIN"/> এর দ্বারা পরিচালিত একটি সর্বজনীন সেশন</translation>
-<translation id="9044646465488564462">নেটওয়ার্কের সাথে সংযোগ করতে ব্যর্থ: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">সেশন থেকে প্রস্থান</translation>
-<translation id="8454013096329229812">Wi-Fi চালু আছে৷</translation>
-<translation id="4872237917498892622">Alt+Search অথবা Shift</translation>
-<translation id="9201131092683066720">ব্যাটারি <ph name="PERCENTAGE"/>% পূর্ণ৷</translation>
-<translation id="2983818520079887040">সেটিংস...</translation>
-<translation id="3871838685472846647">সেলুলার সক্রিয় করা হয়েছে</translation>
-<translation id="1195412055398077112">ওভারস্ক্যান</translation>
-<translation id="112308213915226829">শেল্ফ স্বয়ংক্রিয়ভাবে লুকান</translation>
-<translation id="7573962313813535744">ডকযুক্ত মোড</translation>
-<translation id="8927026611342028580">সংযুক্ত করার অনুরোধ করা হয়েছে</translation>
-<translation id="8300849813060516376">OTASP ব্যর্থ</translation>
-<translation id="2792498699870441125">Alt+Search</translation>
-<translation id="8660803626959853127"><ph name="COUNT"/>টি ফাইল (গুলি) সিঙ্ক হচ্ছে</translation>
-<translation id="5958529069007801266">তত্ত্বাবধানে থাকা ব্যবহারকারী</translation>
-<translation id="3709443003275901162">৯+</translation>
-<translation id="639644700271529076">CAPS LOCK বন্ধ আছে</translation>
-<translation id="6248847161401822652">প্রস্থান করার জন্য দুবার Control Shift Q টিপুন৷</translation>
-<translation id="6785414152754474415">ব্যাটারি <ph name="PERCENTAGE"/>% পূর্ণ এবং চার্জ হচ্ছে৷</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: সক্রিয় করা হচ্ছে...</translation>
-<translation id="4895488851634969361">ব্যাটারি পূর্ণ৷</translation>
-<translation id="5947494881799873997">ফেরান</translation>
-<translation id="7593891976182323525">Search অথবা Shift</translation>
-<translation id="7649070708921625228">সহায়তা</translation>
-<translation id="747833637904845037">একটি বাহ্যিক প্রদর্শনে সংযুক্ত থাকার সময়ে আপনার Chromebook চালু থাকে, এমনকি লিড বন্ধ করা থাকলেও৷</translation>
-<translation id="3050422059534974565">CAPS LOCK চালু আছে৷
-Search অথবা বাতিল করতে Shift টিপুন৷</translation>
-<translation id="397105322502079400">গণনা করা হচ্ছে...</translation>
-<translation id="158849752021629804">হোম নেটওয়ার্কের প্রয়োজন</translation>
-<translation id="6857811139397017780">সক্রিয় করুন <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">DHCP লুকআপ ব্যর্থ</translation>
-<translation id="6692173217867674490">খারাপ পাসফ্রেজ</translation>
-<translation id="6165508094623778733">আরো জানুন</translation>
-<translation id="9046895021617826162">সংযোগ ব্যর্থ হয়েছে</translation>
-<translation id="7168224885072002358"><ph name="TIMEOUT_SECONDS"/> এ পুরানো রেসুলিউশানে ফেরানো হচ্ছে</translation>
-<translation id="973896785707726617">এই সেশনটি <ph name="SESSION_TIME_REMAINING"/> এর মধ্যে সমাপ্ত হবে৷ আপনি স্বয়ংক্রিয়ভাবে সাইন আউট হয়ে যাবেন৷</translation>
-<translation id="8372369524088641025">খারাপ WEP কী</translation>
-<translation id="6636709850131805001">অস্বীকৃত স্থিতি</translation>
-<translation id="3573179567135747900">&quot;<ph name="FROM_LOCALE"/>&quot; তে ফেরান (পুনর্সূচনা প্রয়োজন)</translation>
-<translation id="8103386449138765447">SMS বার্তা: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Google ড্রাইভ সেটিংস ...</translation>
-<translation id="7209101170223508707">CAPS LOCK চালু আছে৷
-Alt+Search অথবা বাতিল করতে Shift টিপুন৷</translation>
-<translation id="8940956008527784070">(<ph name="PERCENTAGE"/>%) কম ব্যাটারি</translation>
-<translation id="4918086044614829423">স্বীকার</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> বাকি</translation>
-<translation id="3009178788565917040">আউটপুট</translation>
-<translation id="520760366042891468">Hangouts এর মাধ্যমে আপনার স্ক্রীন নিয়ন্ত্রণ ভাগ করা হচ্ছে৷</translation>
-<translation id="8000066093800657092">কোনও নেটওয়ার্ক নেই</translation>
-<translation id="4015692727874266537">অন্য একটি অ্যাকাউন্টে সাইন ইন করুন...</translation>
-<translation id="5941711191222866238">ছোট করুন</translation>
-<translation id="6911468394164995108">অন্যান্য যোগদান ...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">অভিনন্দন! আপনার '<ph name="NAME"/>' ডেটা পরিষেবা সক্রিয় করা হয়েছে এবং ব্যবহার করার জন্য প্রস্তুত৷</translation>
-<translation id="412065659894267608"><ph name="HOUR"/>ঘন্টা <ph name="MINUTE"/> মিনিট পর্যন্ত পূর্ণ</translation>
-<translation id="7297443947353982503">ব্যবহারকারীর নাম/পাসওয়ার্ড ভুল অথবা EAP-প্রমাণীকরণ ব্যর্থ হয়েছে</translation>
-<translation id="6359806961507272919"><ph name="PHONE_NUMBER"/>-এর থেকে SMS...</translation>
-<translation id="1244147615850840081">কেরিয়ার</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_ca.xtb b/chromium/ash/strings/ash_strings_ca.xtb
deleted file mode 100644
index 8184b331fd2..00000000000
--- a/chromium/ash/strings/ash_strings_ca.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="ca">
-<translation id="3595596368722241419">Bateria carregada.</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> i <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Estat del portal</translation>
-<translation id="30155388420722288">Botó de desbordament</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">S'ha activat el Bluetooth</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> s'ha canviat a <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">S'ha desactivat el Bluetooth</translation>
-<translation id="7165320105431587207">No s'ha pogut configurar la xarxa</translation>
-<translation id="3775358506042162758">Només podeu tenir tres comptes com a màxim en un inici de sessió múltiple.</translation>
-<translation id="370649949373421643">Activa la Wi-Fi</translation>
-<translation id="3626281679859535460">Brillantor</translation>
-<translation id="3621202678540785336">Entrada</translation>
-<translation id="595202126637698455">Seguiment del rendiment activat</translation>
-<translation id="8054466585765276473">S'està calculant el temps de la bateria.</translation>
-<translation id="7982789257301363584">Xarxa</translation>
-<translation id="5565793151875479467">Servidor intermediari...</translation>
-<translation id="938582441709398163">Superposició de teclat</translation>
-<translation id="4387004326333427325">S'ha rebutjat el certificat d'autenticació de manera remota</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">La resolució de <ph name="DISPLAY_NAME"/> ha canviat a <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">La sol·licitud HTTP ha fallat</translation>
-<translation id="2297568595583585744">Safata d'estat</translation>
-<translation id="1661867754829461514">Falta el PIN</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: s'està connectant...</translation>
-<translation id="40400351611212369">Error d'activació de xarxa</translation>
-<translation id="4237016987259239829">Error de connexió a la xarxa</translation>
-<translation id="2946640296642327832">Activa el Bluetooth</translation>
-<translation id="6459472438155181876">S'està ampliant la pantalla a <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Cel·lular</translation>
-<translation id="6596816719288285829">Adreça IP</translation>
-<translation id="4508265954913339219">S'ha produït un error en l'activació.</translation>
-<translation id="3621712662352432595">Configuració d'àudio</translation>
-<translation id="1812696562331527143">El mètode d'entrada ha canviat a <ph name="INPUT_METHOD_ID"/>* (<ph name="BEGIN_LINK"/>tercers<ph name="END_LINK"/>).
-Premeu Maj+Alt per canviar-lo.</translation>
-<translation id="2127372758936585790">Carregador de baix consum</translation>
-<translation id="3846575436967432996">No hi ha informació de xarxa disponible</translation>
-<translation id="3026237328237090306">Configura les dades mòbils</translation>
-<translation id="5871632337994001636">Gestiona els dispositius...</translation>
-<translation id="785750925697875037">Mostra el compte mòbil</translation>
-<translation id="153454903766751181">S'està inicialitzant el mòdem mòbil...</translation>
-<translation id="4628814525959230255">Comparteix el control de la pantalla amb <ph name="HELPER_NAME"/> mitjançant Hangouts.</translation>
-<translation id="7864539943188674973">Desactiva el Bluetooth</translation>
-<translation id="939252827960237676">S'ha produït un error en desar la captura de pantalla.</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Reinicia per actualitzar</translation>
-<translation id="2268813581635650749">Tanca la sessió de tots els usuaris</translation>
-<translation id="735745346212279324">VPN desconnectada</translation>
-<translation id="7320906967354320621">Inactiu</translation>
-<translation id="15373452373711364">Cursor del ratolí gran</translation>
-<translation id="3294437725009624529">Convidat</translation>
-<translation id="8190698733819146287">Personalitza els idiomes i l'entrada...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Posició del prestatge</translation>
-<translation id="8676770494376880701">S'ha connectat un carregador de baix consum</translation>
-<translation id="7170041865419449892">Fora de l'interval</translation>
-<translation id="4804818685124855865">Desconnecta</translation>
-<translation id="2544853746127077729">La xarxa ha rebutjat el certificat d'autenticació</translation>
-<translation id="5222676887888702881">Tanca la sessió</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Configuració</translation>
-<translation id="1272079795634619415">Atura</translation>
-<translation id="4957722034734105353">Més informació...</translation>
-<translation id="2964193600955408481">Desactiva la Wi-Fi</translation>
-<translation id="4279490309300973883">S'està creant una rèplica</translation>
-<translation id="7973962044839454485">L'autenticació de PPA ha fallat perquè el nom d'usuari o la contrasenya no eren correctes</translation>
-<translation id="2509468283778169019">BLOQ MAJ està activat.</translation>
-<translation id="3892641579809465218">Pantalla interna</translation>
-<translation id="7823564328645135659">L'idioma ha canviat de &quot;<ph name="FROM_LOCALE"/>&quot; a &quot;<ph name="TO_LOCALE"/>&quot; després de sincronitzar la vostra configuració.</translation>
-<translation id="3368922792935385530">Connectat</translation>
-<translation id="8340999562596018839">Comentaris de veu</translation>
-<translation id="8654520615680304441">Activa la Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">El mètode d'entrada ha canviat a <ph name="INPUT_METHOD_ID"/>.
-Premeu Maj+Alt per canviar-lo.</translation>
-<translation id="2562916301614567480">Xarxa privada</translation>
-<translation id="6549021752953852991">No hi ha cap xarxa mòbil disponible</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Estimat monitor, això no funciona. (El monitor no és compatible)</translation>
-<translation id="6426039856985689743">Desactiva les dades mòbils</translation>
-<translation id="3087734570205094154">Part inferior</translation>
-<translation id="3742055079367172538">Captura de pantalla feta</translation>
-<translation id="8878886163241303700">Ampliació de la pantalla</translation>
-<translation id="5271016907025319479">La VPN no està configurada.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">L'administrador ha desactivat l'opció per fer captures de pantalla.</translation>
-<translation id="372094107052732682">Premeu Ctrl+Maj+Q dues vegades per sortir.</translation>
-<translation id="6803622936009808957">No s'han pogut reflectir les pantalles, perquè no s'ha trobat cap resolució compatible. S'està entrant al mode d'escriptori ampliat.</translation>
-<translation id="1480041086352807611">Mode de demostració</translation>
-<translation id="3626637461649818317">Queda un <ph name="PERCENTAGE"/>%</translation>
-<translation id="9089416786594320554">Mètodes d'introducció</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">Per activar &quot;<ph name="NAME"/>&quot; cal una connexió a la xarxa.</translation>
-<translation id="3963445509666917109">Altaveu (intern)</translation>
-<translation id="2825619548187458965">Prestatge</translation>
-<translation id="2614835198358683673">És possible que el vostre Chromebook no es carregui mentre estigui encès. Proveu de fer servir un carregador oficial.</translation>
-<translation id="1895658205118569222">Aturada</translation>
-<translation id="4430019312045809116">Volum</translation>
-<translation id="8681498213689260554">Reinicieu i feu un Powerwash per actualitzar</translation>
-<translation id="4442424173763614572">La cerca de DNS ha fallat</translation>
-<translation id="7874779702599364982">S'estan cercant xarxes mòbils...</translation>
-<translation id="583281660410589416">Desconegut</translation>
-<translation id="1383876407941801731">Cerca</translation>
-<translation id="3901991538546252627">S'està connectant amb <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Informació de la xarxa</translation>
-<translation id="1621499497873603021">Temps que queda fins que no s'esgoti la bateria: <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Surt de la sessió de convidat</translation>
-<translation id="8308637677604853869">Menú anterior</translation>
-<translation id="4666297444214622512">No podeu iniciar la sessió en un altre compte.</translation>
-<translation id="3625258641415618104">Captures de pantalla desactivades</translation>
-<translation id="1346748346194534595">A la dreta</translation>
-<translation id="1773212559869067373">S'ha rebutjat el certificat d'autenticació de manera local</translation>
-<translation id="8528322925433439945">Xarxes mòbils...</translation>
-<translation id="7049357003967926684">Associació</translation>
-<translation id="8428213095426709021">Configuració</translation>
-<translation id="2372145515558759244">S'estan sincronitzant les aplicacions...</translation>
-<translation id="7256405249507348194">Error no reconegut: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Error en la comprovació d'AAA</translation>
-<translation id="8456362689280298700">Temps per a càrrega completa: <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="5787281376604286451">Els comentaris de veu estan activats.
-Premeu Ctrl+Alt+Z per desactivar-los.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Error de xarxa desconegut</translation>
-<translation id="1467432559032391204">A l'esquerra</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">S'està activant <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Clics automàtics</translation>
-<translation id="1398853756734560583">Maximitza</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: s'està connectant...</translation>
-<translation id="252373100621549798">Pantalla desconeguda</translation>
-<translation id="1882897271359938046">S'està replicant <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">S'ha connectat a un carregador de baix consum. És possible que la càrrega de la bateria no sigui fiable.</translation>
-<translation id="3784455785234192852">Bloqueja</translation>
-<translation id="2805756323405976993">Aplicacions</translation>
-<translation id="1512064327686280138">Error d'activació</translation>
-<translation id="5097002363526479830">S'ha produït un error en connectar amb la xarxa &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">La Wi-Fi està desactivada.</translation>
-<translation id="2966449113954629791">És possible que hàgiu esgotat la quantitat assignada de dades mòbils. Visiteu el portal d'activació <ph name="NAME"/> per comprar més dades.</translation>
-<translation id="8132793192354020517">Connectat a <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Defineix l'empaperat...</translation>
-<translation id="8678698760965522072">Estat en línia</translation>
-<translation id="2532589005999780174">Mode de contrast elevat</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Error intern</translation>
-<translation id="3019353588588144572">Temps restant fins que la bateria no estigui totalment carregada: <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Augment de pantalla</translation>
-<translation id="7005812687360380971">Error</translation>
-<translation id="882279321799040148">Feu clic per visualitzar-la.</translation>
-<translation id="1753067873202720523">Pot ser que el Chromebook no es carregui mentre estigui activat.</translation>
-<translation id="5045550434625856497">Contrasenya incorrecta</translation>
-<translation id="1602076796624386989">Activa les dades mòbils</translation>
-<translation id="6981982820502123353">Accessibilitat</translation>
-<translation id="3157931365184549694">Restaura</translation>
-<translation id="4274292172790327596">Error no reconegut</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Auricular</translation>
-<translation id="225680501294068881">S'estan cercant dispositius...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Micròfon (intern)</translation>
-<translation id="4448844063988177157">S'estan cercant xarxes Wi-Fi...</translation>
-<translation id="8401662262483418323">No s'ha pogut connectar amb &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/>
-Missatge del servidor: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">S'ha produït un error</translation>
-<translation id="7229570126336867161">Es necessita EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> és una sessió pública gestionada per <ph name="DOMAIN"/>.</translation>
-<translation id="9044646465488564462">S'ha produït un error en connectar amb la xarxa: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Tanca la sessió</translation>
-<translation id="8454013096329229812">La Wi-Fi està activada.</translation>
-<translation id="4872237917498892622">Alt+Cerca o Maj</translation>
-<translation id="9201131092683066720">La bateria està carregada fins al <ph name="PERCENTAGE"/>%.</translation>
-<translation id="2983818520079887040">Configuració...</translation>
-<translation id="3871838685472846647">Xarxa mòbil activada</translation>
-<translation id="1195412055398077112">sobreescaneig</translation>
-<translation id="112308213915226829">Amaga el prestatge automàticament</translation>
-<translation id="7573962313813535744">Mode acoblat</translation>
-<translation id="8927026611342028580">S'ha sol·licitat la connexió</translation>
-<translation id="8300849813060516376">Error d'OTASP</translation>
-<translation id="2792498699870441125">Alt+Cerca</translation>
-<translation id="8660803626959853127">Fitxers que s'estan sincronitzant: <ph name="COUNT"/></translation>
-<translation id="5958529069007801266">Usuari supervisat</translation>
-<translation id="3709443003275901162">Més de 9</translation>
-<translation id="639644700271529076">Bloq Maj està desactivat</translation>
-<translation id="6248847161401822652">Premeu Control+Maj+Q dues vegades per sortir.</translation>
-<translation id="6785414152754474415">La bateria està carregada fins al <ph name="PERCENTAGE"/>% i s'està carregant.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: s'està activant...</translation>
-<translation id="4895488851634969361">La bateria està carregada.</translation>
-<translation id="5947494881799873997">Reverteix</translation>
-<translation id="7593891976182323525">Cerca o Maj</translation>
-<translation id="7649070708921625228">Ajuda</translation>
-<translation id="747833637904845037">El Chromebook continuarà actiu mentre estigui connectat a una pantalla externa, tot i que es tanqui la tapa.</translation>
-<translation id="3050422059534974565">Bloq Maj està activat.
-Premeu Cerca o Maj per cancel·lar.</translation>
-<translation id="397105322502079400">S’està calculant...</translation>
-<translation id="158849752021629804">Es necessita una xarxa domèstica</translation>
-<translation id="6857811139397017780">Activa <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Error en la cerca de DHCP</translation>
-<translation id="6692173217867674490">Contrasenya no vàlida</translation>
-<translation id="6165508094623778733">Més informació</translation>
-<translation id="9046895021617826162">S'ha produït un error en la connexió</translation>
-<translation id="7168224885072002358">Es revertirà a la resolució anterior d'aquí a <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">La sessió finalitzarà d'aquí a <ph name="SESSION_TIME_REMAINING"/>. Es tancarà la sessió automàticament.</translation>
-<translation id="8372369524088641025">Clau WEP no vàlida</translation>
-<translation id="6636709850131805001">Estat no reconegut</translation>
-<translation id="3573179567135747900">Torna a canviar a &quot;<ph name="FROM_LOCALE"/>&quot; (requereix reiniciar)</translation>
-<translation id="8103386449138765447">Missatges SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Configuració de Google Drive...</translation>
-<translation id="7209101170223508707">Bloq Maj està activat.
-Premeu Alt+Cerca o Maj per cancel·lar.</translation>
-<translation id="8940956008527784070">Bateria baixa (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Accepta</translation>
-<translation id="5102001756192215136">Temps d'autonomia: <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Sortida</translation>
-<translation id="520760366042891468">Compartiu el control de la pantalla mitjançant Hangouts.</translation>
-<translation id="8000066093800657092">No hi ha xarxa</translation>
-<translation id="4015692727874266537">Inicia la sessió amb un altre compte...</translation>
-<translation id="5941711191222866238">Minimitza</translation>
-<translation id="6911468394164995108">Uneix-te a una altra...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Enhorabona. El servei de dades &quot;<ph name="NAME"/>&quot; s'ha activat i ja es pot fer servir.</translation>
-<translation id="412065659894267608">Falten <ph name="HOUR"/> h <ph name="MINUTE"/> min fins que estigui carregada completament</translation>
-<translation id="7297443947353982503">El nom d'usuari o la contrasenya és incorrecte o no s'ha pogut realitzar l'autorització d'EAP.</translation>
-<translation id="6359806961507272919">SMS de <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Operador</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_cs.xtb b/chromium/ash/strings/ash_strings_cs.xtb
deleted file mode 100644
index 1bfaeab672f..00000000000
--- a/chromium/ash/strings/ash_strings_cs.xtb
+++ /dev/null
@@ -1,227 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="cs">
-<translation id="3595596368722241419">Baterie je nabitá</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> a <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Stav portálu</translation>
-<translation id="30155388420722288">Tlačítko přetečení</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Rozhraní Bluetooth aktivováno</translation>
-<translation id="6310121235600822547">Displej <ph name="DISPLAY_NAME"/> byl otočen o <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Rozhraní Bluetooth deaktivováno</translation>
-<translation id="7165320105431587207">Konfigurace sítě se nezdařila</translation>
-<translation id="3775358506042162758">V rámci vícenásobného přihlášení lze používat maximálně tři účty.</translation>
-<translation id="370649949373421643">Povolit Wi-Fi</translation>
-<translation id="3626281679859535460">Jas</translation>
-<translation id="3621202678540785336">Vstup</translation>
-<translation id="595202126637698455">Sledování výkonu aktivováno</translation>
-<translation id="8054466585765276473">Výpočet doby výdrže baterie.</translation>
-<translation id="7982789257301363584">Síť</translation>
-<translation id="5565793151875479467">Server proxy...</translation>
-<translation id="938582441709398163">Překryvná klávesnice</translation>
-<translation id="4387004326333427325">Ověřovací certifikát byl vzdáleně odmítnut</translation>
-<translation id="6979158407327259162">Disk Google</translation>
-<translation id="3683428399328702079">Rozlišení displeje <ph name="DISPLAY_NAME"/> bylo změněno na <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">Příkaz GET protokolu HTTP se nezdařil.</translation>
-<translation id="2297568595583585744">Stavový panel</translation>
-<translation id="1661867754829461514">Chybí kód PIN</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: Připojování...</translation>
-<translation id="40400351611212369">Chyba aktivace sítě</translation>
-<translation id="4237016987259239829">Chyba připojení k síti</translation>
-<translation id="2946640296642327832">Zapnout Bluetooth</translation>
-<translation id="6459472438155181876">Rozšíření obrazovky na displej <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Mobil</translation>
-<translation id="6596816719288285829">IP adresa</translation>
-<translation id="4508265954913339219">Aktivace se nezdařila</translation>
-<translation id="3621712662352432595">Nastavení zvuku</translation>
-<translation id="1812696562331527143">Metoda zadávání se změnila na metodu <ph name="INPUT_METHOD_ID"/>* <ph name="BEGIN_LINK"/>třetí strany<ph name="END_LINK"/>. Přepnout ji můžete stisknutím klávesové zkratky Shift + Alt.</translation>
-<translation id="2127372758936585790">Nabíječka má příliš nízký výkon</translation>
-<translation id="3846575436967432996">Informace o síti nejsou k dispozici</translation>
-<translation id="3026237328237090306">Nastavení mobilního datového připojení</translation>
-<translation id="5871632337994001636">Spravovat zařízení...</translation>
-<translation id="785750925697875037">Zobrazit mobilní účet</translation>
-<translation id="153454903766751181">Inicializace mobilního modemu...</translation>
-<translation id="4628814525959230255">Sdílíte ovládání obrazovky s uživatelem <ph name="HELPER_NAME"/> (prostřednictvím služby Hangouts).</translation>
-<translation id="7864539943188674973">Vypnout Bluetooth</translation>
-<translation id="939252827960237676">Uložení snímku obrazovky se nezdařilo</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Restartovat a aktualizovat</translation>
-<translation id="2268813581635650749">Odhlásit vše</translation>
-<translation id="735745346212279324">Síť VPN je odpojena</translation>
-<translation id="7320906967354320621">Nečinnost</translation>
-<translation id="15373452373711364">Velký kurzor myši</translation>
-<translation id="3294437725009624529">Host</translation>
-<translation id="8190698733819146287">Personalizovat jazyky a zadávání...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Pozice na poličce</translation>
-<translation id="8676770494376880701">Byla připojena nabíječka s nízkým napětím</translation>
-<translation id="7170041865419449892">Mimo dosah</translation>
-<translation id="4804818685124855865">Odpojit</translation>
-<translation id="2544853746127077729">Ověřovací certifikát byl sítí odmítnut</translation>
-<translation id="5222676887888702881">Odhlásit se</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Konfigurace</translation>
-<translation id="1272079795634619415">Zastavit</translation>
-<translation id="4957722034734105353">Další informace...</translation>
-<translation id="2964193600955408481">Vypnout Wi-Fi</translation>
-<translation id="4279490309300973883">Zrcadlení</translation>
-<translation id="7973962044839454485">Ověření PPP se nezdařilo kvůli nesprávnému uživatelskému jménu nebo heslu</translation>
-<translation id="2509468283778169019">CAPS LOCK je zapnutý</translation>
-<translation id="3892641579809465218">Interní displej</translation>
-<translation id="7823564328645135659">Jazyk prohlížeče Chrome se po synchronizaci nastavení změnil z jazyka <ph name="FROM_LOCALE"/> na jazyk <ph name="TO_LOCALE"/>.</translation>
-<translation id="3368922792935385530">Připojeno</translation>
-<translation id="8340999562596018839">Hlasová odezva</translation>
-<translation id="8654520615680304441">Zapnout Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Metoda zadávání se změnila na metodu <ph name="INPUT_METHOD_ID"/>. Přepnout ji můžete stisknutím klávesové zkratky Shift + Alt.</translation>
-<translation id="2562916301614567480">Soukromá síť</translation>
-<translation id="6549021752953852991">Není k dispozici žádná mobilní síť.</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Drahý monitore, nějak to mezi námi nefunguje. (Monitor není podporován.)</translation>
-<translation id="6426039856985689743">Zakázat mobilní datové připojení</translation>
-<translation id="3087734570205094154">Až dolů</translation>
-<translation id="3742055079367172538">Byl vytvořen snímek obrazovky</translation>
-<translation id="8878886163241303700">Rozšíření obrazovky</translation>
-<translation id="5271016907025319479">Síť VPN není nakonfigurována.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Možnost pořizovat snímky obrazovky byla zakázána správcem.</translation>
-<translation id="372094107052732682">Práci ukončíte dvojitým stisknutím kombinace kláves Ctrl+Shift+Q.</translation>
-<translation id="6803622936009808957">Zobrazení nelze zrcadlit, protože nebyla nalezena podporovaná rozlišení. Místo toho se spustil režim rozšířené pracovní plochy.</translation>
-<translation id="1480041086352807611">Režim ukázky</translation>
-<translation id="3626637461649818317">Zbývá <ph name="PERCENTAGE"/> %</translation>
-<translation id="9089416786594320554">Metody zadávání dat</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/> %</translation>
-<translation id="2670531586141364277">Aktivace služby <ph name="NAME"/> vyžaduje připojení k síti.</translation>
-<translation id="3963445509666917109">Reproduktor (interní)</translation>
-<translation id="2825619548187458965">Polička</translation>
-<translation id="2614835198358683673">Když bude Chromebook zapnutý, možná se nebude nabíjet. Doporučujeme použít oficiální nabíječku.</translation>
-<translation id="1895658205118569222">Vypnout počítač</translation>
-<translation id="4430019312045809116">Hlasitost</translation>
-<translation id="8681498213689260554">Restartovat a aktualizovat pomocí funkce Powerwash</translation>
-<translation id="4442424173763614572">Nepodařilo se nalézt server DNS.</translation>
-<translation id="7874779702599364982">Vyhledávání mobilních sítí...</translation>
-<translation id="583281660410589416">Neznámý</translation>
-<translation id="1383876407941801731">Vyhledávání</translation>
-<translation id="3901991538546252627">Připojování k síti <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Informace o síti</translation>
-<translation id="1621499497873603021">Čas zbývající do vybití baterie: <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Odhlásit hosta</translation>
-<translation id="8308637677604853869">Předchozí nabídka</translation>
-<translation id="4666297444214622512">Nelze se přihlásit k jinému účtu.</translation>
-<translation id="3625258641415618104">Snímky obrazovky zakázány</translation>
-<translation id="1346748346194534595">Doprava</translation>
-<translation id="1773212559869067373">Ověřovací certifikát byl místně odmítnut</translation>
-<translation id="8528322925433439945">Mobilní sítě...</translation>
-<translation id="7049357003967926684">Přidružení</translation>
-<translation id="8428213095426709021">Nastavení</translation>
-<translation id="2372145515558759244">Synchronizace aplikací...</translation>
-<translation id="7256405249507348194">Neznámá chyba: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Selhala bezpečnostní kontrola AAA</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> do úplného nabití</translation>
-<translation id="5787281376604286451">Hlasová odezva je aktivní
-Stiskem kláves Ctrl+Alt+Z ji deaktivujete.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Neznámá chyba sítě</translation>
-<translation id="1467432559032391204">Doleva</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Aktivace sítě <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Automatická kliknutí</translation>
-<translation id="1398853756734560583">Maximalizovat</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: Připojování...</translation>
-<translation id="252373100621549798">Neznámý displej</translation>
-<translation id="1882897271359938046">Zrcadlení na displej <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Byla připojena nabíječka s nízkým výkonem. Nabíjení baterie nemusí probíhat spolehlivě.</translation>
-<translation id="3784455785234192852">Uzamknout</translation>
-<translation id="2805756323405976993">Aplikace</translation>
-<translation id="1512064327686280138">Aktivace se nezdařila</translation>
-<translation id="5097002363526479830">Připojení k síti <ph name="NAME"/> se nezdařilo: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Připojení Wi-Fi je vypnuto.</translation>
-<translation id="2966449113954629791">Pravděpodobně jste vyčerpali povolený objem mobilních datových přenosů. Chcete-li koupit více dat, navštivte aktivační portál <ph name="NAME"/>.</translation>
-<translation id="8132793192354020517">Připojeno k síti <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Nastavení tapety...</translation>
-<translation id="8678698760965522072">Stav online</translation>
-<translation id="2532589005999780174">Režim vysokého kontrastu</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Interní chyba</translation>
-<translation id="3019353588588144572">Čas zbývající do úplného nabití baterie: <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Lupa obrazovky</translation>
-<translation id="7005812687360380971">Selhání</translation>
-<translation id="882279321799040148">Kliknutím jej zobrazíte</translation>
-<translation id="1753067873202720523">Když bude Chromebook zapnutý, možná se nebude nabíjet.</translation>
-<translation id="5045550434625856497">Nesprávné heslo</translation>
-<translation id="1602076796624386989">Povolit mobilní datové připojení</translation>
-<translation id="6981982820502123353">Usnadnění</translation>
-<translation id="3157931365184549694">Obnovit</translation>
-<translation id="4274292172790327596">Neznámá chyba</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Sluchátka</translation>
-<translation id="225680501294068881">Vyhledávání zařízení…</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Mikrofon (interní)</translation>
-<translation id="4448844063988177157">Vyhledávání sítí Wi-Fi...</translation>
-<translation id="8401662262483418323">Připojení k položce <ph name="NAME"/> se nezdařilo: <ph name="DETAILS"/>
-Zpráva serveru: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Došlo k chybě</translation>
-<translation id="7229570126336867161">Je zapotřebí technologie EVDO.</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> je veřejná relace spravovaná doménou <ph name="DOMAIN"/>.</translation>
-<translation id="9044646465488564462">Připojení k síti se nezdařilo: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Ukončit relaci</translation>
-<translation id="8454013096329229812">Připojení Wi-Fi je zapnuto.</translation>
-<translation id="4872237917498892622">Alt + Vyhledávání nebo Shift</translation>
-<translation id="9201131092683066720">Baterie je nabita na <ph name="PERCENTAGE"/> %.</translation>
-<translation id="2983818520079887040">Nastavení...</translation>
-<translation id="3871838685472846647">Mobil aktivován</translation>
-<translation id="1195412055398077112">přesah obrazu</translation>
-<translation id="112308213915226829">Automaticky skrývat poličku</translation>
-<translation id="7573962313813535744">Ukotvený režim</translation>
-<translation id="8927026611342028580">Je vyžadováno připojení</translation>
-<translation id="8300849813060516376">Selhání OTASP</translation>
-<translation id="2792498699870441125">Alt + Vyhledávání</translation>
-<translation id="8660803626959853127">Synchronizace souborů (<ph name="COUNT"/>)</translation>
-<translation id="5958529069007801266">Dozorovaný uživatel</translation>
-<translation id="3709443003275901162">&gt;9</translation>
-<translation id="639644700271529076">CAPS LOCK je vypnutý</translation>
-<translation id="6248847161401822652">Práci ukončíte dvojitým stisknutím kombinace kláves Ctrl+Shift+Q.</translation>
-<translation id="6785414152754474415">Baterie je nabita na <ph name="PERCENTAGE"/> % a nabíjí se.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Probíhá aktivace...</translation>
-<translation id="4895488851634969361">Baterie je plně nabita.</translation>
-<translation id="5947494881799873997">Vrátit zpět</translation>
-<translation id="7593891976182323525">Vyhledávání nebo Shift</translation>
-<translation id="7649070708921625228">Nápověda</translation>
-<translation id="747833637904845037">Chromebook zůstane po připojení k externímu displeji zapnutý, a to i se zavřeným víkem.</translation>
-<translation id="3050422059534974565">CAPS LOCK je zapnutý. Vypnete jej stisknutím klávesy Vyhledávání nebo Shift.</translation>
-<translation id="397105322502079400">Probíhá výpočet…</translation>
-<translation id="158849752021629804">Je potřeba domácí síť</translation>
-<translation id="6857811139397017780">Aktivovat: <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Vyhledávání serveru DHCP selhalo.</translation>
-<translation id="6692173217867674490">Chybné přístupové heslo</translation>
-<translation id="6165508094623778733">Další informace</translation>
-<translation id="9046895021617826162">Připojení selhalo</translation>
-<translation id="7168224885072002358">Původní rozlišení bude obnoveno za <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Relace bude ukončena za <ph name="SESSION_TIME_REMAINING"/>. Poté budete automaticky odhlášeni.</translation>
-<translation id="8372369524088641025">Chybný klíč WEP</translation>
-<translation id="6636709850131805001">Neznámý stav</translation>
-<translation id="3573179567135747900">Změnit zpět na jazyk <ph name="FROM_LOCALE"/> (vyžaduje restart)</translation>
-<translation id="8103386449138765447">Zprávy SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Nastavení Disku Google...</translation>
-<translation id="7209101170223508707">CAPS LOCK je zapnutý.
-Vypnete jej stisknutím kombinace kláves Alt + Vyhledávání nebo Shift.</translation>
-<translation id="8940956008527784070">Slabá baterie (<ph name="PERCENTAGE"/> %)</translation>
-<translation id="4918086044614829423">Přijmout</translation>
-<translation id="5102001756192215136">Zbývá: <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Výstup</translation>
-<translation id="520760366042891468">Sdílíte ovládání obrazovky (prostřednictvím služby Hangouts).</translation>
-<translation id="8000066093800657092">Žádná síť</translation>
-<translation id="4015692727874266537">Přihlásit jiný účet...</translation>
-<translation id="5941711191222866238">Minimalizovat</translation>
-<translation id="6911468394164995108">Připojit k jiné...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Blahopřejeme! Datová služba <ph name="NAME"/> byla aktivována a je připravena k použití.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/> h <ph name="MINUTE"/> min do nabití</translation>
-<translation id="7297443947353982503">Neplatné uživatelské jméno/heslo nebo neúspěšná autorizace EAP</translation>
-<translation id="6359806961507272919">SMS z čísla <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Operátor</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_da.xtb b/chromium/ash/strings/ash_strings_da.xtb
deleted file mode 100644
index 5029c1beab5..00000000000
--- a/chromium/ash/strings/ash_strings_da.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="da">
-<translation id="3595596368722241419">Batteri fuldt</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> og <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Tilstand for portal</translation>
-<translation id="30155388420722288">Knappen Overflow</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth er aktiveret</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> er roteret til <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth er deaktiveret</translation>
-<translation id="7165320105431587207">Netværket kunne ikke konfigureres</translation>
-<translation id="3775358506042162758">Du kan kun have op til tre konti i samlet login fra flere konti.</translation>
-<translation id="370649949373421643">Aktivér Wi-Fi</translation>
-<translation id="3626281679859535460">Lysstyrke</translation>
-<translation id="3621202678540785336">Input</translation>
-<translation id="595202126637698455">Sporing af ydelsen er aktiveret</translation>
-<translation id="8054466585765276473">Beregner batteritid.</translation>
-<translation id="7982789257301363584">Netværk</translation>
-<translation id="5565793151875479467">Proxy...</translation>
-<translation id="938582441709398163">Tastaturoverlejring</translation>
-<translation id="4387004326333427325">Godkendelsescertifikatet blev afvist eksternt</translation>
-<translation id="6979158407327259162">Google Drev</translation>
-<translation id="3683428399328702079">Opløsningen for <ph name="DISPLAY_NAME"/> er ændret til <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">Det lykkedes ikke at hente HTTP</translation>
-<translation id="2297568595583585744">Statusbakke</translation>
-<translation id="1661867754829461514">Pinkode mangler</translation>
-<translation id="4508225577814909926"><ph name="NAME"/> : Opretter forbindelse...</translation>
-<translation id="40400351611212369">Fejl under aktivering af netværk</translation>
-<translation id="4237016987259239829">Netværkforbindelsesfejl</translation>
-<translation id="2946640296642327832">Aktivér Bluetooth</translation>
-<translation id="6459472438155181876">Udvider skærmen til <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Mobil</translation>
-<translation id="6596816719288285829">IP-adresse</translation>
-<translation id="4508265954913339219">Aktiveringen mislykkedes</translation>
-<translation id="3621712662352432595">Lydindstillinger</translation>
-<translation id="1812696562331527143">Din inputmetode er ændret til <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>tredjepart<ph name="END_LINK"/>).
-Tryk på Shift+Alt for at ændre den.</translation>
-<translation id="2127372758936585790">Oplader ved lav kraft</translation>
-<translation id="3846575436967432996">Der er ingen tilgængelige netværksoplysninger</translation>
-<translation id="3026237328237090306">Konfigurer mobildata</translation>
-<translation id="5871632337994001636">Administrer enheder...</translation>
-<translation id="785750925697875037">Vis mobilkonto</translation>
-<translation id="153454903766751181">Initialiserer mobilmodem...</translation>
-<translation id="4628814525959230255">Deler kontrollen over din skærm med <ph name="HELPER_NAME"/> via Hangouts.</translation>
-<translation id="7864539943188674973">Deaktiver Bluetooth</translation>
-<translation id="939252827960237676">Skærmbilledet kunne ikke gemmes</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Genstart for at opdatere</translation>
-<translation id="2268813581635650749">Log alle ud</translation>
-<translation id="735745346212279324">VPN afbrudt</translation>
-<translation id="7320906967354320621">Ikke aktiv</translation>
-<translation id="15373452373711364">Stor musemarkør</translation>
-<translation id="3294437725009624529">Gæst</translation>
-<translation id="8190698733819146287">Tilpas sprog og indtastning...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Hyldeplacering</translation>
-<translation id="8676770494376880701">Oplader med lav kraft er tilsluttet</translation>
-<translation id="7170041865419449892">Intet signal</translation>
-<translation id="4804818685124855865">Afbryd</translation>
-<translation id="2544853746127077729">Godkendelsescertifikatet blev afvist af netværk</translation>
-<translation id="5222676887888702881">Log ud</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Konfiguration</translation>
-<translation id="1272079795634619415">Stop</translation>
-<translation id="4957722034734105353">Flere oplysninger...</translation>
-<translation id="2964193600955408481">Deaktiver Wi-Fi</translation>
-<translation id="4279490309300973883">Spejling</translation>
-<translation id="7973962044839454485">PPP-godkendelsen mislykkedes på grund af forkert brugernavn eller adgangskode</translation>
-<translation id="2509468283778169019">CAPS LOCK er slået til</translation>
-<translation id="3892641579809465218">Internt display</translation>
-<translation id="7823564328645135659">Sproget er blevet ændret fra &quot;<ph name="FROM_LOCALE"/>&quot; til &quot;<ph name="TO_LOCALE"/>&quot;, efter at du har synkroniseret dine indstillinger.</translation>
-<translation id="3368922792935385530">Tilsluttet</translation>
-<translation id="8340999562596018839">Talefeedback</translation>
-<translation id="8654520615680304441">Slå Wi-Fi til...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Din inputmetode er ændret til <ph name="INPUT_METHOD_ID"/>.
-Tryk på Shift+Alt for at ændre den.</translation>
-<translation id="2562916301614567480">Privat netværk</translation>
-<translation id="6549021752953852991">Der er ingen tilgængelige mobilnetværk</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Kære Skærm. Det fungerer ikke mellem os. (Denne skærm understøttes ikke)</translation>
-<translation id="6426039856985689743">Deaktiver mobildata</translation>
-<translation id="3087734570205094154">Bund</translation>
-<translation id="3742055079367172538">Skærmbilledet blev taget</translation>
-<translation id="8878886163241303700">Udvider skærm</translation>
-<translation id="5271016907025319479">VPN er ikke konfigureret.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Din administrator har deaktiveret muligheden for at tage skærmbilleder.</translation>
-<translation id="372094107052732682">Tryk på Ctrl+Shift+Q to gange for at afslutte.</translation>
-<translation id="6803622936009808957">Skærmene kunne ikke spejles, da der ikke fandtes en understøttet opløsning. I stedet anvendes Udvidet skrivebord.</translation>
-<translation id="1480041086352807611">Demotilstand</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/> % tilbage</translation>
-<translation id="9089416786594320554">Indtastningsmetoder</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/> %</translation>
-<translation id="2670531586141364277">Aktivering af &quot;<ph name="NAME"/>&quot; kræver en netværksforbindelse.</translation>
-<translation id="3963445509666917109">Højttaler (indbygget)</translation>
-<translation id="2825619548187458965">Hylde</translation>
-<translation id="2614835198358683673">Din Chromebook oplades muligvis ikke, når den er tændt. Anvend eventuelt den officielle oplader.</translation>
-<translation id="1895658205118569222">Nedlukning</translation>
-<translation id="4430019312045809116">Lydstyrke</translation>
-<translation id="8681498213689260554">Genstart, og udfør PowerWash for at opdatere</translation>
-<translation id="4442424173763614572">DNS-opslag mislykkedes</translation>
-<translation id="7874779702599364982">Søger efter mobilnetværk...</translation>
-<translation id="583281660410589416">Ukendt</translation>
-<translation id="1383876407941801731">Søgning</translation>
-<translation id="3901991538546252627">Opretter forbindelse til <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Netværksoplysninger</translation>
-<translation id="1621499497873603021">Tid tilbage, indtil batteriet er tomt, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Afslut gæstesession</translation>
-<translation id="8308637677604853869">Forrige menu</translation>
-<translation id="4666297444214622512">Kan ikke logge ind på en anden konto.</translation>
-<translation id="3625258641415618104">Skærmbilleder er deaktiveret</translation>
-<translation id="1346748346194534595">Højre</translation>
-<translation id="1773212559869067373">Godkendelsescertifikatet blev afvist lokalt</translation>
-<translation id="8528322925433439945">Mobil...</translation>
-<translation id="7049357003967926684">Tilknytning</translation>
-<translation id="8428213095426709021">Indstillinger</translation>
-<translation id="2372145515558759244">Synkroniserer apps...</translation>
-<translation id="7256405249507348194">Ukendt fejl: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA-kontrol mislykkedes</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> indtil fuldt opladet</translation>
-<translation id="5787281376604286451">Talefeedback er aktiveret.
-Tryk på Ctrl+Alt+Z for at deaktivere dette.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Ukendt netværksfejl</translation>
-<translation id="1467432559032391204">Venstre</translation>
-<translation id="5543001071567407895">sms</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Aktiverer <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Automatiske klik</translation>
-<translation id="1398853756734560583">Maksimer</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: Opretter forbindelse...</translation>
-<translation id="252373100621549798">Ukendt skærm</translation>
-<translation id="1882897271359938046">Spejler mod <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Tilsluttet en oplader med lav kraft. Batteriopladningen er muligvis ikke pålidelig.</translation>
-<translation id="3784455785234192852">Lås</translation>
-<translation id="2805756323405976993">Applikationer</translation>
-<translation id="1512064327686280138">Aktiveringsfejl:</translation>
-<translation id="5097002363526479830">Der kunne ikke oprettes forbindelse til netværket &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi er slået fra.</translation>
-<translation id="2966449113954629791">Du har muligvis opbrugt den tilladte mobildatamængde. Gå til aktiveringsportalen for <ph name="NAME"/> for at købe mere data.</translation>
-<translation id="8132793192354020517">Forbundet til <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Angiv baggrundsbillede...</translation>
-<translation id="8678698760965522072">Onlinetilstand</translation>
-<translation id="2532589005999780174">Tilstanden Høj kontrast</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Intern fejl</translation>
-<translation id="3019353588588144572">Resterende tid, indtil batteriet er fuldt opladet, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Skærmforstørrer</translation>
-<translation id="7005812687360380971">Fejl:</translation>
-<translation id="882279321799040148">Klik for at se det</translation>
-<translation id="1753067873202720523">Din Chromebook oplades muligvis ikke, når den er tændt.</translation>
-<translation id="5045550434625856497">Ugyldig adgangskode</translation>
-<translation id="1602076796624386989">Aktivér mobildata</translation>
-<translation id="6981982820502123353">Hjælpefunktioner</translation>
-<translation id="3157931365184549694">Gendan</translation>
-<translation id="4274292172790327596">Fejlen genkendes ikke</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Hovedtelefon</translation>
-<translation id="225680501294068881">Scanner efter enheder...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/> d. <ph name="DATE"/></translation>
-<translation id="737451040872859086">Mikrofon (indbygget)</translation>
-<translation id="4448844063988177157">Søger efter Wi-Fi-netværk...</translation>
-<translation id="8401662262483418323">Der kunne ikke oprettes forbindelse til &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/>
-Servermeddelelse: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Der opstod en fejl</translation>
-<translation id="7229570126336867161">EVDO mangler</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> er en offentlig session administreret af <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Det var ikke muligt at oprette forbindelse til netværket: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Afslut session</translation>
-<translation id="8454013096329229812">Wi-Fi er slået til.</translation>
-<translation id="4872237917498892622">Alt+Søg eller Skift</translation>
-<translation id="9201131092683066720">Batteriet er <ph name="PERCENTAGE"/> % opladet.</translation>
-<translation id="2983818520079887040">Indstillinger...</translation>
-<translation id="3871838685472846647">Aktiveret for mobil</translation>
-<translation id="1195412055398077112">overscan</translation>
-<translation id="112308213915226829">Skjul hylde automatisk</translation>
-<translation id="7573962313813535744">Tilstanden Tilsluttet dockingstation</translation>
-<translation id="8927026611342028580">Der er anmodet om forbindelse</translation>
-<translation id="8300849813060516376">OTASP mislykkedes</translation>
-<translation id="2792498699870441125">Alt+Søg</translation>
-<translation id="8660803626959853127">Synkroniserer <ph name="COUNT"/> fil(er)</translation>
-<translation id="5958529069007801266">Overvåget bruger</translation>
-<translation id="3709443003275901162">9 eller flere</translation>
-<translation id="639644700271529076">CAPS LOCK er deaktiveret</translation>
-<translation id="6248847161401822652">Tryk på Ctrl+Shift+Q to gange for at afslutte.</translation>
-<translation id="6785414152754474415">Batteriet er <ph name="PERCENTAGE"/> % opladet og oplades nu.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Aktiverer...</translation>
-<translation id="4895488851634969361">Batteriet er helt opladet.</translation>
-<translation id="5947494881799873997">Fortryd</translation>
-<translation id="7593891976182323525">Søg eller skift</translation>
-<translation id="7649070708921625228">Hjælp</translation>
-<translation id="747833637904845037">Din Chromebook vil forblive tændt, når den er sluttet til en ekstern skærm, selv når låget er lukket.</translation>
-<translation id="3050422059534974565">CAPS LOCK er slået til.
-Tryk på Søg eller Skift for at annullere.</translation>
-<translation id="397105322502079400">Beregner...</translation>
-<translation id="158849752021629804">Hjemmenetværk mangler</translation>
-<translation id="6857811139397017780">Aktiver <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">DHCP-opslag mislykkedes</translation>
-<translation id="6692173217867674490">Ugyldig adgangssætning</translation>
-<translation id="6165508094623778733">Flere oplysninger</translation>
-<translation id="9046895021617826162">Forbindelsen mislykkedes</translation>
-<translation id="7168224885072002358">Fortryder og vender tilbage til den gamle opløsning om <ph name="TIMEOUT_SECONDS"/> sekunder.</translation>
-<translation id="973896785707726617">Denne session afsluttes om <ph name="SESSION_TIME_REMAINING"/>. Du logges automatisk ud.</translation>
-<translation id="8372369524088641025">Ugyldig WEP-nøgle</translation>
-<translation id="6636709850131805001">Tilstanden genkendes ikke</translation>
-<translation id="3573179567135747900">Skift tilbage til &quot;<ph name="FROM_LOCALE"/>&quot; (kræver genstart)</translation>
-<translation id="8103386449138765447">sms-beskeder: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Google Drev-indstillinger...</translation>
-<translation id="7209101170223508707">CAPS LOCK er slået til.
-Tryk på Alt+Søg eller Skift for at annullere.</translation>
-<translation id="8940956008527784070">Batteriniveauet er lavt (<ph name="PERCENTAGE"/> %)</translation>
-<translation id="4918086044614829423">Accepter</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> tilbage</translation>
-<translation id="3009178788565917040">Output</translation>
-<translation id="520760366042891468">Deler kontrollen over din skærm via Hangouts.</translation>
-<translation id="8000066093800657092">Intet netværk</translation>
-<translation id="4015692727874266537">Log ind på en anden konto...</translation>
-<translation id="5941711191222866238">Minimer</translation>
-<translation id="6911468394164995108">Find andre... </translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Datatjenesten &quot;<ph name="NAME"/>&quot; er blevet aktiveret og er klar til brug.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/> t <ph name="MINUTE"/> m, indtil det er fuldt opladet</translation>
-<translation id="7297443947353982503">Brugernavn/adgangskode er forkert, eller også mislykkedes EAP-godkendelsen</translation>
-<translation id="6359806961507272919">Sms fra <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Mobilselskab</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_de.xtb b/chromium/ash/strings/ash_strings_de.xtb
deleted file mode 100644
index 56511fe07a0..00000000000
--- a/chromium/ash/strings/ash_strings_de.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="de">
-<translation id="3595596368722241419">Akku voll</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> und <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Portal-Status</translation>
-<translation id="30155388420722288">Überlaufschaltfläche</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth aktiviert</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> wurde zu <ph name="ROTATION"/> gedreht.</translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth deaktiviert</translation>
-<translation id="7165320105431587207">Fehler beim Konfigurieren des Netzwerks</translation>
-<translation id="3775358506042162758">Bei der Mehrfachanmeldung sind maximal drei Konten zulässig.</translation>
-<translation id="370649949373421643">WLAN aktivieren</translation>
-<translation id="3626281679859535460">Helligkeit</translation>
-<translation id="3621202678540785336">Eingang</translation>
-<translation id="595202126637698455">Leistungsnachverfolgung aktiviert</translation>
-<translation id="8054466585765276473">Akku-Laufzeit wird berechnet.</translation>
-<translation id="7982789257301363584">Netzwerk</translation>
-<translation id="5565793151875479467">Proxy...</translation>
-<translation id="938582441709398163">Tastatur-Overlay</translation>
-<translation id="4387004326333427325">Remoteablehnung des Authentifizierungszertifikats</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">Auflösung von <ph name="DISPLAY_NAME"/> wurde zu <ph name="RESOLUTION"/> geändert.</translation>
-<translation id="6943836128787782965">HTTP-Abruf fehlgeschlagen</translation>
-<translation id="2297568595583585744">Statusleiste</translation>
-<translation id="1661867754829461514">PIN fehlt</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: Verbindung wird hergestellt...</translation>
-<translation id="40400351611212369">Fehler beim Aktivieren des Netzwerks</translation>
-<translation id="4237016987259239829">Fehler bei der Netzwerkverbindung</translation>
-<translation id="2946640296642327832">Bluetooth aktivieren</translation>
-<translation id="6459472438155181876">Bildschirm wird auf <ph name="DISPLAY_NAME"/> erweitert...</translation>
-<translation id="8206859287963243715">Mobil</translation>
-<translation id="6596816719288285829">IP-Adresse</translation>
-<translation id="4508265954913339219">Aktivierung fehlgeschlagen</translation>
-<translation id="3621712662352432595">Audioeinstellungen</translation>
-<translation id="1812696562331527143">Ihre Eingabemethode hat sich in <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>Drittanbieter<ph name="END_LINK"/>) geändert.
-Drücken Sie zum Wechseln Shift+Alt.</translation>
-<translation id="2127372758936585790">Schwachstrom-Ladegerät</translation>
-<translation id="3846575436967432996">Keine Netzwerkinformationen verfügbar</translation>
-<translation id="3026237328237090306">Mobilfunk einrichten</translation>
-<translation id="5871632337994001636">Geräte verwalten...</translation>
-<translation id="785750925697875037">Mobiles Konto aufrufen</translation>
-<translation id="153454903766751181">Mobilfunkmodem wird initialisiert...</translation>
-<translation id="4628814525959230255">Bildschirmfreigabe für <ph name="HELPER_NAME"/> über Hangouts</translation>
-<translation id="7864539943188674973">Bluetooth deaktivieren</translation>
-<translation id="939252827960237676">Screenshot konnte nicht gespeichert werden.</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Zum Aktualisieren neu starten</translation>
-<translation id="2268813581635650749">Alle abmelden</translation>
-<translation id="735745346212279324">VPN-Verbindung getrennt</translation>
-<translation id="7320906967354320621">Inaktiv</translation>
-<translation id="15373452373711364">Großer Cursor</translation>
-<translation id="3294437725009624529">Gast</translation>
-<translation id="8190698733819146287">Sprache und Eingabe anpassen...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Ablageposition</translation>
-<translation id="8676770494376880701">Schwachstrom-Ladegerät angeschlossen</translation>
-<translation id="7170041865419449892">Außerhalb des Bereichs</translation>
-<translation id="4804818685124855865">Verbindung trennen</translation>
-<translation id="2544853746127077729">Ablehnung des Authentifizierungszertifikats durch das Netzwerk</translation>
-<translation id="5222676887888702881">Abmelden</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Konfiguration</translation>
-<translation id="1272079795634619415">Stopp</translation>
-<translation id="4957722034734105353">Weitere Informationen...</translation>
-<translation id="2964193600955408481">WLAN deaktivieren</translation>
-<translation id="4279490309300973883">Spiegelung</translation>
-<translation id="7973962044839454485">Fehler bei PPP-Authentifizierung aufgrund eines falschen Nutzernamens oder Passworts</translation>
-<translation id="2509468283778169019">Feststelltaste An</translation>
-<translation id="3892641579809465218">Interne Anzeige</translation>
-<translation id="7823564328645135659">Nach der Synchronisierung Ihrer Einstellungen wurde die Sprache von &quot;<ph name="FROM_LOCALE"/>&quot; in &quot;<ph name="TO_LOCALE"/>&quot; geändert.</translation>
-<translation id="3368922792935385530">Verbunden</translation>
-<translation id="8340999562596018839">Gesprochenes Feedback</translation>
-<translation id="8654520615680304441">WLAN aktivieren...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Ihre Eingabemethode hat sich in <ph name="INPUT_METHOD_ID"/> geändert.
-Drücken Sie zum Wechseln Shift+Alt.</translation>
-<translation id="2562916301614567480">Privates Netzwerk</translation>
-<translation id="6549021752953852991">Kein Mobilfunknetz verfügbar</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Der Monitor wird nicht unterstützt.</translation>
-<translation id="6426039856985689743">Mobilfunk deaktivieren</translation>
-<translation id="3087734570205094154">Unten</translation>
-<translation id="3742055079367172538">Screenshot erstellt</translation>
-<translation id="8878886163241303700">Bildschirmerweiterung</translation>
-<translation id="5271016907025319479">VPN ist nicht konfiguriert.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Die Funktion zum Erfassen von Screenshots wurde vom Administrator deaktiviert.</translation>
-<translation id="372094107052732682">Drücken Sie zum Beenden zweimal Strg+Shift+Q.</translation>
-<translation id="6803622936009808957">Der Bildschirm konnte nicht gespiegelt werden, da die Auflösung nicht unterstützt wird. Stattdessen wurde der Modus für den erweiterten Desktop gestartet.</translation>
-<translation id="1480041086352807611">Demo-Modus</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/> % verbleibend</translation>
-<translation id="9089416786594320554">Eingabemethoden</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/> %</translation>
-<translation id="2670531586141364277">Zum Aktivieren von &quot;<ph name="NAME"/>&quot; ist eine Netzwerkverbindung erforderlich.</translation>
-<translation id="3963445509666917109">Lautsprecher (intern)</translation>
-<translation id="2825619548187458965">Ablage</translation>
-<translation id="2614835198358683673">Ihr Chromebook kann möglicherweise nicht geladen werden, während es eingeschaltet ist. Wir empfehlen die Verwendung des Originalladegeräts.</translation>
-<translation id="1895658205118569222">Herunterfahren</translation>
-<translation id="4430019312045809116">Lautstärke</translation>
-<translation id="8681498213689260554">Zum Aktualisieren Neustart und Powerwash durchführen</translation>
-<translation id="4442424173763614572">DNS-Suche fehlgeschlagen</translation>
-<translation id="7874779702599364982">Suche nach Mobilfunknetzen läuft...</translation>
-<translation id="583281660410589416">Unbekannt</translation>
-<translation id="1383876407941801731">Suche</translation>
-<translation id="3901991538546252627">Verbindung mit <ph name="NAME"/> wird hergestellt.</translation>
-<translation id="2204305834655267233">Netzwerkinformationen</translation>
-<translation id="1621499497873603021">Verbleibende Akku-Laufzeit: <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Gastsitzung beenden</translation>
-<translation id="8308637677604853869">Vorheriges Menü</translation>
-<translation id="4666297444214622512">Anmeldung in weiterem Konto nicht möglich</translation>
-<translation id="3625258641415618104">Screenshot-Funktion deaktiviert</translation>
-<translation id="1346748346194534595">Rechts</translation>
-<translation id="1773212559869067373">Lokale Ablehnung des Authentifizierungszertifikats</translation>
-<translation id="8528322925433439945">Mobil...</translation>
-<translation id="7049357003967926684">Verbindung</translation>
-<translation id="8428213095426709021">Einstellungen</translation>
-<translation id="2372145515558759244">Apps werden synchronisiert...</translation>
-<translation id="7256405249507348194">Unbekannter Fehler: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA-Prüfung fehlgeschlagen</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> bis voll aufgeladen</translation>
-<translation id="5787281376604286451">Gesprochenes Feedback ist aktiviert.
-Zum Deaktivieren Strg+Alt+Z drücken</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Unbekannter Netzwerkfehler</translation>
-<translation id="1467432559032391204">Links</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830"><ph name="NAME"/> wird aktiviert</translation>
-<translation id="8814190375133053267">WLAN</translation>
-<translation id="1923539912171292317">Automatische Klicks</translation>
-<translation id="1398853756734560583">Vergrößern</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: Verbindung wird hergestellt...</translation>
-<translation id="252373100621549798">Display unbekannt</translation>
-<translation id="1882897271359938046">Wird auf <ph name="DISPLAY_NAME"/> gespiegelt...</translation>
-<translation id="2727977024730340865">Das Gerät ist an ein Schwachstrom-Ladegerät angeschlossen. Möglicherweise kann der Akku nicht zuverlässig aufgeladen werden.</translation>
-<translation id="3784455785234192852">Sperren</translation>
-<translation id="2805756323405976993">Apps</translation>
-<translation id="1512064327686280138">Aktivierungsfehler</translation>
-<translation id="5097002363526479830">Fehler beim Herstellen einer Verbindung mit dem Netzwerk &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">WLAN ist deaktiviert.</translation>
-<translation id="2966449113954629791">Sie haben möglicherweise Ihr mobiles Datenkontingent aufgebraucht. Besuchen Sie das <ph name="NAME"/>-Aktivierungsportal, um weiteres Datenkontingent zu kaufen.</translation>
-<translation id="8132793192354020517">Verbunden mit <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Hintergrund ändern</translation>
-<translation id="8678698760965522072">Online-Status</translation>
-<translation id="2532589005999780174">Modus mit hohem Kontrast</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Interner Fehler</translation>
-<translation id="3019353588588144572">Verbleibende Zeit, bis der Akku vollständig geladen ist: <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Lupe</translation>
-<translation id="7005812687360380971">Fehler</translation>
-<translation id="882279321799040148">Zum Anzeigen klicken</translation>
-<translation id="1753067873202720523">Das Chromebook wird möglicherweise nicht geladen, während es eingeschaltet ist.</translation>
-<translation id="5045550434625856497">Falsches Passwort</translation>
-<translation id="1602076796624386989">Mobilfunk aktivieren</translation>
-<translation id="6981982820502123353">Bedienungshilfen</translation>
-<translation id="3157931365184549694">Wiederherstellen</translation>
-<translation id="4274292172790327596">Unbekannter Fehler</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Kopfhörer</translation>
-<translation id="225680501294068881">Nach Geräten wird gesucht...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Mikrofon (intern)</translation>
-<translation id="4448844063988177157">Suche nach WLAN-Netzwerken läuft...</translation>
-<translation id="8401662262483418323">Fehler bei der Verbindung mit &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/>
-Servernachricht: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Ein Fehler ist aufgetreten.</translation>
-<translation id="7229570126336867161">EVDO erforderlich</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> ist eine öffentliche Sitzung, die von <ph name="DOMAIN"/> verwaltet wird.</translation>
-<translation id="9044646465488564462">Fehler beim Herstellen einer Verbindung mit dem Netzwerk: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Sitzung beenden</translation>
-<translation id="8454013096329229812">WLAN ist aktiviert.</translation>
-<translation id="4872237917498892622">Alt+Suchen oder Shift</translation>
-<translation id="9201131092683066720">Akku ist zu <ph name="PERCENTAGE"/> % geladen.</translation>
-<translation id="2983818520079887040">Einstellungen...</translation>
-<translation id="3871838685472846647">Mobiler Datendienst aktiviert</translation>
-<translation id="1195412055398077112">Overscan</translation>
-<translation id="112308213915226829">Ablage automatisch ausblenden</translation>
-<translation id="7573962313813535744">Docking-Modus</translation>
-<translation id="8927026611342028580">Verbindung angefordert</translation>
-<translation id="8300849813060516376">OTASP fehlgeschlagen</translation>
-<translation id="2792498699870441125">Alt+Suchtaste</translation>
-<translation id="8660803626959853127"><ph name="COUNT"/> Datei(en) wird bzw. werden synchronisiert.</translation>
-<translation id="5958529069007801266">Betreuter Nutzer</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">Feststelltaste Aus</translation>
-<translation id="6248847161401822652">Drücken Sie zum Beenden zweimal Steuerung-Shift-Q.</translation>
-<translation id="6785414152754474415">Akku ist zu <ph name="PERCENTAGE"/> % geladen und wird geladen.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Wird aktiviert...</translation>
-<translation id="4895488851634969361">Akku ist vollständig geladen.</translation>
-<translation id="5947494881799873997">Rückgängig machen</translation>
-<translation id="7593891976182323525">Suchen oder Shift</translation>
-<translation id="7649070708921625228">Hilfe</translation>
-<translation id="747833637904845037">Wenn das Chromebook an einen externen Monitor angeschlossen ist, bleibt es auch bei geschlossenem Laptopdeckel aktiv.</translation>
-<translation id="3050422059534974565">Die Feststelltaste ist aktiviert.
-Drücken Sie die Such-Taste oder Shift, um die Aktivierung aufzuheben.</translation>
-<translation id="397105322502079400">Wird berechnet...</translation>
-<translation id="158849752021629804">Heimnetzwerk erforderlich</translation>
-<translation id="6857811139397017780"><ph name="NETWORKSERVICE"/> aktivieren</translation>
-<translation id="5864471791310927901">DHCP-Suche fehlgeschlagen</translation>
-<translation id="6692173217867674490">Ungültige Passphrase</translation>
-<translation id="6165508094623778733">Weitere Informationen</translation>
-<translation id="9046895021617826162">Verbindungsaufbau fehlgeschlagen</translation>
-<translation id="7168224885072002358">Alte Auflösung wird in <ph name="TIMEOUT_SECONDS"/> wiederhergestellt.</translation>
-<translation id="973896785707726617">Die Sitzung wird in <ph name="SESSION_TIME_REMAINING"/> beendet. Sie werden dann automatisch abgemeldet.</translation>
-<translation id="8372369524088641025">Ungültiger WEP-Schlüssel</translation>
-<translation id="6636709850131805001">Unbekannter Status</translation>
-<translation id="3573179567135747900">Zurücksetzen auf &quot;<ph name="FROM_LOCALE"/>&quot; (Neustart erforderlich)</translation>
-<translation id="8103386449138765447">SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Google Drive-Einstellungen...</translation>
-<translation id="7209101170223508707">Die Feststelltaste ist aktiviert.
-Drücken Sie Alt+Suchen oder Shift, um die Aktivierung aufzuheben.</translation>
-<translation id="8940956008527784070">Niedriger Akkustand (<ph name="PERCENTAGE"/> %)</translation>
-<translation id="4918086044614829423">Annehmen</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> verbleiben</translation>
-<translation id="3009178788565917040">Ausgang</translation>
-<translation id="520760366042891468">Bildschirmfreigabe über Hangouts</translation>
-<translation id="8000066093800657092">Nicht verbunden</translation>
-<translation id="4015692727874266537">Anderes Konto anmelden...</translation>
-<translation id="5941711191222866238">Verkleinern</translation>
-<translation id="6911468394164995108">Andere Netzwerke...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Herzlichen Glückwunsch! Ihr Datendienst &quot;<ph name="NAME"/>&quot; wurde aktiviert und ist einsatzbereit.</translation>
-<translation id="412065659894267608">In <ph name="HOUR"/> Std. <ph name="MINUTE"/> Min. vollständig aufgeladen</translation>
-<translation id="7297443947353982503">Nutzername/Passwort falsch oder Fehler bei EAP-Authentifizierung</translation>
-<translation id="6359806961507272919">SMS von <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Mobilfunkanbieter</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_el.xtb b/chromium/ash/strings/ash_strings_el.xtb
deleted file mode 100644
index 1ecad0ffe2f..00000000000
--- a/chromium/ash/strings/ash_strings_el.xtb
+++ /dev/null
@@ -1,229 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="el">
-<translation id="3595596368722241419">Μπαταρία πλήρης</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> και <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Κατάσταση πύλης</translation>
-<translation id="30155388420722288">Κουμπί επιπρόσθετης ροής</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Το Bluetooth έχει ενεργοποιηθεί</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> περιστράφηκε σε <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Το Bluetooth έχει απενεργοποιηθεί</translation>
-<translation id="7165320105431587207">Αποτυχία διαμόρφωσης δικτύου</translation>
-<translation id="3775358506042162758">Μπορείτε να συνδέεστε ταυτόχρονα με έως και τρεις λογαριασμούς.</translation>
-<translation id="370649949373421643">Ενεργοποίηση Wi-Fi</translation>
-<translation id="3626281679859535460">Φωτεινότητα</translation>
-<translation id="3621202678540785336">Είσοδος</translation>
-<translation id="595202126637698455">Η παρακολούθηση απόδοσης έχει ενεργοποιηθεί</translation>
-<translation id="8054466585765276473">Υπολογισμός χρόνου μπαταρίας που απομένει.</translation>
-<translation id="7982789257301363584">Δίκτυο</translation>
-<translation id="5565793151875479467">Διακομιστής μεσολάβησης...</translation>
-<translation id="938582441709398163">Επικάλυψη πληκτρολογίου</translation>
-<translation id="4387004326333427325">Το πιστοποιητικό ελέγχου ταυτότητας απορρίφθηκε απομακρυσμένα</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">Η ανάλυση <ph name="DISPLAY_NAME"/> άλλαξε σε <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">Η λήψη HTTP απέτυχε</translation>
-<translation id="2297568595583585744">Δίσκος κατάστασης</translation>
-<translation id="1661867754829461514">Απουσιάζει το PIN </translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: Σύνδεση…</translation>
-<translation id="40400351611212369">Σφάλμα ενεργοποίησης συστήματος</translation>
-<translation id="4237016987259239829">Σφάλμα σύνδεσης δικτύου</translation>
-<translation id="2946640296642327832">Ενεργοποίηση Bluetooth</translation>
-<translation id="6459472438155181876">Επέκταση οθόνης σε <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Κινητό</translation>
-<translation id="6596816719288285829">Διεύθυνση IP</translation>
-<translation id="4508265954913339219">Η ενεργοποίηση απέτυχε</translation>
-<translation id="3621712662352432595">Ρυθμίσεις ήχου</translation>
-<translation id="1812696562331527143">Η μέθοδος εισαγωγής σας έχει αλλάξει σε <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>τρίτου μέρους<ph name="END_LINK"/>).
-Πατήστε Shift + Alt για εναλλαγή.</translation>
-<translation id="2127372758936585790">Χαμηλή ισχύς φορτιστή</translation>
-<translation id="3846575436967432996">Δεν υπάρχουν διαθέσιμες πληροφορίες δικτύου</translation>
-<translation id="3026237328237090306">Ρύθμιση δεδομένων κινητής τηλεφωνίας</translation>
-<translation id="5871632337994001636">Διαχείριση συσκευών…</translation>
-<translation id="785750925697875037">Προβολή λογαριασμού κινητής τηλεφωνίας</translation>
-<translation id="153454903766751181">Εκκίνηση μόντεμ δικτύου κινητής τηλεφωνίας…</translation>
-<translation id="4628814525959230255">Μοιράζεστε τον έλεγχο της οθόνης σας με το χρήστη <ph name="HELPER_NAME"/> μέσω του Hangouts.</translation>
-<translation id="7864539943188674973">Απενεργοποίηση Bluetooth</translation>
-<translation id="939252827960237676">Αποτυχία αποθήκευσης στιγμιότυπου οθόνης</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Επανεκκίνηση για ενημέρωση</translation>
-<translation id="2268813581635650749">Αποσύνδεση όλων</translation>
-<translation id="735745346212279324">Το VPN αποσυνδέθηκε</translation>
-<translation id="7320906967354320621">Αδρανές</translation>
-<translation id="15373452373711364">Μεγάλος δείκτης ποντικιού</translation>
-<translation id="3294437725009624529">Επισκέπτης</translation>
-<translation id="8190698733819146287">Προσαρμογή γλωσσών και εισόδου...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Θέση ραφιού</translation>
-<translation id="8676770494376880701">Ο συνδεδεμένος φορτιστής παρέχει χαμηλή ισχύ</translation>
-<translation id="7170041865419449892">Εκτός εύρους τιμών</translation>
-<translation id="4804818685124855865">Αποσύνδεση</translation>
-<translation id="2544853746127077729">Το πιστοποιητικό ελέγχου ταυτότητας απορρίφθηκε από το δίκτυο</translation>
-<translation id="5222676887888702881">Έξοδος</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Διαμόρφωση</translation>
-<translation id="1272079795634619415">Διακοπή</translation>
-<translation id="4957722034734105353">Μάθετε περισσότερα…</translation>
-<translation id="2964193600955408481">Απενεργοποίηση Wi-Fi</translation>
-<translation id="4279490309300973883">Κατοπτρισμός</translation>
-<translation id="7973962044839454485">Αποτυχία ελέγχου ταυτότητας PPP λόγω εσφαλμένου ονόματος χρήστη ή κωδικού πρόσβασης</translation>
-<translation id="2509468283778169019">Το CAPS LOCK είναι ενεργοποιημένο</translation>
-<translation id="3892641579809465218">Εσωτερική οθόνη</translation>
-<translation id="7823564328645135659">Η γλώσσα του άλλαξε από &quot;<ph name="FROM_LOCALE"/>&quot; σε &quot;<ph name="TO_LOCALE"/>&quot; μετά τον συγχρονισμό των ρυθμίσεών σας.</translation>
-<translation id="3368922792935385530">Σε σύνδεση</translation>
-<translation id="8340999562596018839">Προφορικά σχόλια</translation>
-<translation id="8654520615680304441">Ενεργοποίηση Wi-Fi…</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Η μέθοδος εισαγωγής σας έχει αλλάξει σε <ph name="INPUT_METHOD_ID"/>.
-Πατήστε Shift + Alt για εναλλαγή.</translation>
-<translation id="2562916301614567480">Ιδιωτικό δίκτυο</translation>
-<translation id="6549021752953852991">Δεν υπάρχει διαθέσιμο δίκτυο κινητής τηλεφωνίας</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Αγαπητή οθόνη, κάτι δεν πάει καλά με εμάς. (Αυτή η οθόνη δεν υποστηρίζεται)</translation>
-<translation id="6426039856985689743">Απενεργοποίηση δεδομένων κινητής τηλεφωνίας</translation>
-<translation id="3087734570205094154">Κάτω</translation>
-<translation id="3742055079367172538">Το στιγμιότυπο οθόνης έχει ληφθεί</translation>
-<translation id="8878886163241303700">Επέκταση οθόνης</translation>
-<translation id="5271016907025319479">Το VPN δεν έχει διαμορφωθεί.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Η δυνατότητα λήψης στιγμιότυπων οθόνης έχει απενεργοποιηθεί από το διαχειριστή σας.</translation>
-<translation id="372094107052732682">Πατήστε Ctrl + Shift + Q δύο φορές για έξοδο.</translation>
-<translation id="6803622936009808957">Δεν ήταν δυνατός ο αντικατοπτρισμός των οθονών καθώς δεν βρέθηκαν υποστηριζόμενες αναλύσεις. Έχει ενεργοποιηθεί εναλλακτικά η εκτεταμένη επιφάνεια εργασίας.</translation>
-<translation id="1480041086352807611">Λειτουργία επίδειξης</translation>
-<translation id="3626637461649818317">Υπολείπεται <ph name="PERCENTAGE"/>%</translation>
-<translation id="9089416786594320554">Μέθοδοι εισαγωγής</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">Η ενεργοποίηση του &quot;<ph name="NAME"/>&quot; απαιτεί σύνδεση δικτύου.</translation>
-<translation id="3963445509666917109">Ηχείο (Εσωτερικό)</translation>
-<translation id="2825619548187458965">Ράφι</translation>
-<translation id="2614835198358683673">Το Chromebook ενδέχεται να μη φορτίζει ενώ είναι ενεργοποιημένο. Χρησιμοποιήστε τον αυθεντικό φορτιστή.</translation>
-<translation id="1895658205118569222">Τερματισμός λειτουργίας</translation>
-<translation id="4430019312045809116">Ένταση</translation>
-<translation id="8681498213689260554">Επανεκκίνηση και Powerwash για ενημέρωση</translation>
-<translation id="4442424173763614572">Η αναζήτηση DNS απέτυχε</translation>
-<translation id="7874779702599364982">Αναζήτηση για δίκτυα κινητής τηλεφωνίας…</translation>
-<translation id="583281660410589416">Άγνωστο</translation>
-<translation id="1383876407941801731">Αναζήτηση</translation>
-<translation id="3901991538546252627">Σύνδεση με <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Πληροφορίες δικτύου</translation>
-<translation id="1621499497873603021">Χρόνος που απομένει μέχρι να αδειάσει η μπαταρία, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Έξοδος επισκέπτη</translation>
-<translation id="8308637677604853869">Προηγούμενο μενού</translation>
-<translation id="4666297444214622512">Δεν είναι δυνατή η σύνδεση σε άλλο λογαριασμό.</translation>
-<translation id="3625258641415618104">Τα στιγμιότυπα οθόνης απενεργοποιήθηκαν</translation>
-<translation id="1346748346194534595">Δεξιά</translation>
-<translation id="1773212559869067373">Το πιστοποιητικό ελέγχου ταυτότητας απορρίφθηκε τοπικά</translation>
-<translation id="8528322925433439945">Κινητή τηλεφωνία...</translation>
-<translation id="7049357003967926684">Συσχετισμός</translation>
-<translation id="8428213095426709021">Ρυθμίσεις</translation>
-<translation id="2372145515558759244">Συγχρονισμός εφαρμογών…</translation>
-<translation id="7256405249507348194">Μη αναγνωρίσιμο σφάλμα: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Ο έλεγχος ΑΑΑ απέτυχε</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> μέχρι να γεμίσει</translation>
-<translation id="5787281376604286451">Τα προφορικά σχόλια έχουν ενεργοποιηθεί.
-Πατήστε Ctrl+Alt+Z για απενεργοποίηση.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Άγνωστο σφάλμα δικτύου</translation>
-<translation id="1467432559032391204">Αριστερά</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Ενεργοποίηση <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Αυτόματα κλικ</translation>
-<translation id="1398853756734560583">Μεγιστοποίηση</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: Σύνδεση…</translation>
-<translation id="252373100621549798">Άγνωστη οθόνη</translation>
-<translation id="1882897271359938046">Κατοπτρισμός σε <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Σύνδεση με φορτιστή χαμηλής ισχύος. Η φόρτιση της μπαταρίας ενδέχεται να μη γίνεται με αξιόπιστο τρόπο.</translation>
-<translation id="3784455785234192852">Κλείδωμα</translation>
-<translation id="2805756323405976993">Εφαρμογές</translation>
-<translation id="1512064327686280138">Αποτυχία ενεργοποίησης</translation>
-<translation id="5097002363526479830">Δεν ήταν δυνατή η σύνδεση στο δίκτυο '<ph name="NAME"/>': <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Το Wi-Fi έχει απενεργοποιηθεί.</translation>
-<translation id="2966449113954629791">Ενδέχεται να έχετε εξαντλήσει τα διαθέσιμα δεδομένα κινητής τηλεφωνίας. Επισκεφτείτε την πύλη ενεργοποίησης <ph name="NAME"/>, για να αγοράσετε περισσότερα δεδομένα.</translation>
-<translation id="8132793192354020517">Έγινε σύνδεση με το δίκτυο <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Ορισμός ταπετσαρίας...</translation>
-<translation id="8678698760965522072">Κατάσταση &quot;Σε σύνδεση&quot;</translation>
-<translation id="2532589005999780174">Λειτουργία υψηλής αντίθεσης</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Εσωτερικό σφάλμα</translation>
-<translation id="3019353588588144572">Χρόνος που απομένει μέχρι να φορτιστεί πλήρως η μπαταρία, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Μεγεθυντής οθόνης</translation>
-<translation id="7005812687360380971">Αποτυχία</translation>
-<translation id="882279321799040148">Κάντε κλικ για προβολή</translation>
-<translation id="1753067873202720523">Το Chromebook σας ενδέχεται να μη φορτίζει όταν είναι ενεργοποιημένο.</translation>
-<translation id="5045550434625856497">Λανθασμένος κωδικός πρόσβασης</translation>
-<translation id="1602076796624386989">Ενεργοποίηση δεδομένων κινητής τηλεφωνίας</translation>
-<translation id="6981982820502123353">Προσβασιμότητα</translation>
-<translation id="3157931365184549694">Επαναφορά</translation>
-<translation id="4274292172790327596">Μη αναγνωρίσιμο σφάλμα</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Ακουστικά</translation>
-<translation id="225680501294068881">Σάρωση για συσκευές…</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Μικρόφωνο (Εσωτερικό)</translation>
-<translation id="4448844063988177157">Αναζήτηση για δίκτυα Wi-Fi...</translation>
-<translation id="8401662262483418323">Αποτυχία σύνδεσης στο δίκτυο '<ph name="NAME"/>': <ph name="DETAILS"/> μήνυμα διακομιστή: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Παρουσιάστηκε σφάλμα</translation>
-<translation id="7229570126336867161">Απαιτείται EVDO</translation>
-<translation id="2999742336789313416">Το <ph name="DISPLAY_NAME"/> είναι μια δημόσια περίοδος σύνδεσης που διαχειρίζεται το <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Η σύνδεση στο δίκτυο απέτυχε: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Έξοδος από συνεδρία</translation>
-<translation id="8454013096329229812">Το Wi-Fi έχει ενεργοποιηθεί.</translation>
-<translation id="4872237917498892622">Alt+Search ή Shift</translation>
-<translation id="9201131092683066720">Η μπαταρία είναι πλήρης <ph name="PERCENTAGE"/>%.</translation>
-<translation id="2983818520079887040">Ρυθμίσεις...</translation>
-<translation id="3871838685472846647">Το κινητό ενεργοποιήθηκε</translation>
-<translation id="1195412055398077112">υπερσάρωση</translation>
-<translation id="112308213915226829">Αυτόματη απόκρυψη ραφιού</translation>
-<translation id="7573962313813535744">Λειτουργία βάσης σύνδεσης</translation>
-<translation id="8927026611342028580">Έχει υποβληθεί αίτημα σύνδεσης</translation>
-<translation id="8300849813060516376">Αποτυχία OTASP</translation>
-<translation id="2792498699870441125">Alt+Search</translation>
-<translation id="8660803626959853127">Συγχρονισμός <ph name="COUNT"/> αρχείων</translation>
-<translation id="5958529069007801266">Εποπτευόμενος χρήστης</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">Το CAPS LOCK είναι απενεργοποιημένο</translation>
-<translation id="6248847161401822652">Πατήστε Control Shift Q δύο φορές για έξοδο.</translation>
-<translation id="6785414152754474415">Η μπαταρία είναι πλήρης <ph name="PERCENTAGE"/>% και φορτίζει.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Ενεργοποίηση…</translation>
-<translation id="4895488851634969361">Η μπαταρία είναι πλήρης.</translation>
-<translation id="5947494881799873997">Επαναφορά</translation>
-<translation id="7593891976182323525">Search ή Shift</translation>
-<translation id="7649070708921625228">Βοήθεια</translation>
-<translation id="747833637904845037">Το Chromebook θα παραμείνει ενεργό ενώ βρίσκεται συνδεδεμένο σε εξωτερική οθόνη, ακόμα και με το καπάκι κλειστό.</translation>
-<translation id="3050422059534974565">Το πλήκτρο CAPS LOCK έχει ενεργοποιηθεί.
-Πατήστε Search ή Shift για ακύρωση.</translation>
-<translation id="397105322502079400">Υπολογισμός…</translation>
-<translation id="158849752021629804">Απαιτείται εγχώριο δίκτυο</translation>
-<translation id="6857811139397017780">Ενεργοποίηση <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Αποτυχία αναζήτησης DHCP</translation>
-<translation id="6692173217867674490">Εσφαλμένη κωδική φράση</translation>
-<translation id="6165508094623778733">Μάθετε περισσότερα</translation>
-<translation id="9046895021617826162">Η σύνδεση απέτυχε</translation>
-<translation id="7168224885072002358">Επαναφορά στην προηγούμενη ανάλυση σε <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Αυτή η περίοδος σύνδεσης θα λήξει αυτόματα σε <ph name="SESSION_TIME_REMAINING"/>. Θα αποσυνδεθείτε αυτόματα.</translation>
-<translation id="8372369524088641025">Εσφαλμένο κλειδί WEP</translation>
-<translation id="6636709850131805001">Μη αναγνωρίσιμη κατάσταση</translation>
-<translation id="3573179567135747900">Αλλάξτε το πάλι σε &quot;<ph name="FROM_LOCALE"/>&quot; (απαιτείται επανεκκίνηση)</translation>
-<translation id="8103386449138765447">Μηνύματα SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Ρυθμίσεις Google Drive...</translation>
-<translation id="7209101170223508707">Το πλήκτρο CAPS LOCK έχει ενεργοποιηθεί.
-Πατήστε Alt+Search ή Shift για ακύρωση.</translation>
-<translation id="8940956008527784070">Χαμηλή στάθμη μπαταρίας (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Αποδοχή</translation>
-<translation id="5102001756192215136">Απομένουν <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Έξοδος</translation>
-<translation id="520760366042891468">Γίνεται κοινή χρήση της οθόνης σας μέσω Hangouts.</translation>
-<translation id="8000066093800657092">Κανένα δίκτυο</translation>
-<translation id="4015692727874266537">Σύνδεση σε άλλο λογαριασμό…</translation>
-<translation id="5941711191222866238">Ελαχιστοποίηση</translation>
-<translation id="6911468394164995108">Συμμετοχή σε άλλο…</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Συγχαρητήρια! Η υπηρεσία δεδομένων &quot;<ph name="NAME"/>&quot; έχει ενεργοποιηθεί και είναι έτοιμη για χρήση.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/>ω <ph name="MINUTE"/>λ μέχρι να ολοκληρωθεί η φόρτιση</translation>
-<translation id="7297443947353982503">Εσφαλμένο όνομα χρήστη/κωδικός πρόσβασης ή αποτυχία EAP-auth</translation>
-<translation id="6359806961507272919">SMS από <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Εταιρεία κινητής τηλεφωνίας</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_en-GB.xtb b/chromium/ash/strings/ash_strings_en-GB.xtb
deleted file mode 100644
index 5824f330d49..00000000000
--- a/chromium/ash/strings/ash_strings_en-GB.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="en-GB">
-<translation id="3595596368722241419">Battery full</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> and <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Portal state</translation>
-<translation id="30155388420722288">Overflow Button</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth enabled</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> was rotated to <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth disabled</translation>
-<translation id="7165320105431587207">Failed to configure network</translation>
-<translation id="3775358506042162758">You can only have up to three accounts in multiple sign-in.</translation>
-<translation id="370649949373421643">Enable Wi-Fi</translation>
-<translation id="3626281679859535460">Brightness</translation>
-<translation id="3621202678540785336">Input</translation>
-<translation id="595202126637698455">Performance tracing enabled</translation>
-<translation id="8054466585765276473">Calculating battery time.</translation>
-<translation id="7982789257301363584">Network</translation>
-<translation id="5565793151875479467">Proxy...</translation>
-<translation id="938582441709398163">Keyboard Overlay</translation>
-<translation id="4387004326333427325">Authentication certificate rejected remotely</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> resolution was changed to <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">HTTP get failed</translation>
-<translation id="2297568595583585744">Status tray</translation>
-<translation id="1661867754829461514">PIN missing</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: Connecting...</translation>
-<translation id="40400351611212369">Network Activation Error</translation>
-<translation id="4237016987259239829">Network Connection Error</translation>
-<translation id="2946640296642327832">Enable Bluetooth</translation>
-<translation id="6459472438155181876">Extending screen to <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Mobile</translation>
-<translation id="6596816719288285829">IP Address</translation>
-<translation id="4508265954913339219">Activation failed</translation>
-<translation id="3621712662352432595">Audio Settings</translation>
-<translation id="1812696562331527143">Your input method has changed to <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>3rd party<ph name="END_LINK"/>).
-Press Shift + Alt to switch.</translation>
-<translation id="2127372758936585790">Low-power charger</translation>
-<translation id="3846575436967432996">No network information available</translation>
-<translation id="3026237328237090306">Set up mobile data</translation>
-<translation id="5871632337994001636">Manage devices...</translation>
-<translation id="785750925697875037">View mobile account</translation>
-<translation id="153454903766751181">Initialising mobile modem...</translation>
-<translation id="4628814525959230255">Sharing control of your screen with <ph name="HELPER_NAME"/> via Hangouts.</translation>
-<translation id="7864539943188674973">Disable Bluetooth</translation>
-<translation id="939252827960237676">Failed to save screenshot</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Restart to update</translation>
-<translation id="2268813581635650749">Sign out all</translation>
-<translation id="735745346212279324">VPN disconnected</translation>
-<translation id="7320906967354320621">Idle</translation>
-<translation id="15373452373711364">Large mouse cursor</translation>
-<translation id="3294437725009624529">Guest</translation>
-<translation id="8190698733819146287">Customise languages and input...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Shelf position</translation>
-<translation id="8676770494376880701">Low-power charger connected</translation>
-<translation id="7170041865419449892">Out of range</translation>
-<translation id="4804818685124855865">Disconnect</translation>
-<translation id="2544853746127077729">Authentication certificate rejected by network</translation>
-<translation id="5222676887888702881">Sign out</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Configuration</translation>
-<translation id="1272079795634619415">Stop</translation>
-<translation id="4957722034734105353">Learn more...</translation>
-<translation id="2964193600955408481">Disable Wi-Fi</translation>
-<translation id="4279490309300973883">Mirroring</translation>
-<translation id="7973962044839454485">PPP authentication failed due to an incorrect username or password</translation>
-<translation id="2509468283778169019">CAPS LOCK is on</translation>
-<translation id="3892641579809465218">Internal Display</translation>
-<translation id="7823564328645135659">The language has changed from &quot;<ph name="FROM_LOCALE"/>&quot; to &quot;<ph name="TO_LOCALE"/>&quot; after syncing your settings.</translation>
-<translation id="3368922792935385530">Connected</translation>
-<translation id="8340999562596018839">Spoken feedback</translation>
-<translation id="8654520615680304441">Turn Wi-Fi on...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Your input method has changed to <ph name="INPUT_METHOD_ID"/>.
-Press Shift + Alt to switch.</translation>
-<translation id="2562916301614567480">Private Network</translation>
-<translation id="6549021752953852991">No mobile network available</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Dear Monitor, it's not working out between us. (That monitor is not supported)</translation>
-<translation id="6426039856985689743">Disable mobile data</translation>
-<translation id="3087734570205094154">Bottom</translation>
-<translation id="3742055079367172538">Screenshot taken</translation>
-<translation id="8878886163241303700">Extending screen</translation>
-<translation id="5271016907025319479">VPN is not configured.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">The ability to take screenshots has been disabled by your administrator.</translation>
-<translation id="372094107052732682">Press Ctrl+Shift+Q twice to exit.</translation>
-<translation id="6803622936009808957">Could not mirror displays since no supported resolutions found. Entered extended desktop instead.</translation>
-<translation id="1480041086352807611">Demo mode</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% remaining</translation>
-<translation id="9089416786594320554">Input methods</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">Activation of '<ph name="NAME"/>' requires a network connection.</translation>
-<translation id="3963445509666917109">Speaker (Internal)</translation>
-<translation id="2825619548187458965">Shelf</translation>
-<translation id="2614835198358683673">Your Chromebook may not charge while it is turned on. Consider using the official charger.</translation>
-<translation id="1895658205118569222">Shutdown</translation>
-<translation id="4430019312045809116">volume</translation>
-<translation id="8681498213689260554">Restart and Powerwash to update</translation>
-<translation id="4442424173763614572">DNS lookup failed</translation>
-<translation id="7874779702599364982">Searching for cellular networks...</translation>
-<translation id="583281660410589416">Unknown</translation>
-<translation id="1383876407941801731">Search</translation>
-<translation id="3901991538546252627">Connecting to <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Network Info</translation>
-<translation id="1621499497873603021">Time left until battery is empty, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Exit guest</translation>
-<translation id="8308637677604853869">Previous menu</translation>
-<translation id="4666297444214622512">Can't sign into another account.</translation>
-<translation id="3625258641415618104">Screenshots disabled</translation>
-<translation id="1346748346194534595">Right</translation>
-<translation id="1773212559869067373">Authentication certificate rejected locally</translation>
-<translation id="8528322925433439945">Mobile ...</translation>
-<translation id="7049357003967926684">Association</translation>
-<translation id="8428213095426709021">Settings</translation>
-<translation id="2372145515558759244">Syncing apps...</translation>
-<translation id="7256405249507348194">Unrecognised error: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA check failed</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> until full</translation>
-<translation id="5787281376604286451">Spoken feedback is enabled.
-Press Ctrl+Alt+Z to disable.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Unknown network error</translation>
-<translation id="1467432559032391204">Left</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Activating <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Automatic clicks</translation>
-<translation id="1398853756734560583">Maximise</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: Connecting...</translation>
-<translation id="252373100621549798">Unknown Display</translation>
-<translation id="1882897271359938046">Mirroring to <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Plugged in to a low-power charger. Battery charging may not be reliable.</translation>
-<translation id="3784455785234192852">Lock</translation>
-<translation id="2805756323405976993">Apps</translation>
-<translation id="1512064327686280138">Activation failure</translation>
-<translation id="5097002363526479830">Failed to connect to the network '<ph name="NAME"/>': <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi is turned off.</translation>
-<translation id="2966449113954629791">You may have used up your mobile data allowance. Visit the <ph name="NAME"/> activation portal to buy more data.</translation>
-<translation id="8132793192354020517">Connected to <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Set wallpaper...</translation>
-<translation id="8678698760965522072">Online state</translation>
-<translation id="2532589005999780174">High contrast mode</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Internal error</translation>
-<translation id="3019353588588144572">Time remaining until battery is fully charged, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Screen magnifier</translation>
-<translation id="7005812687360380971">Failure</translation>
-<translation id="882279321799040148">Click to view</translation>
-<translation id="1753067873202720523">Your Chromebook may not charge while it is turned on.</translation>
-<translation id="5045550434625856497">Incorrect password</translation>
-<translation id="1602076796624386989">Enable mobile data</translation>
-<translation id="6981982820502123353">Accessibility</translation>
-<translation id="3157931365184549694">Restore</translation>
-<translation id="4274292172790327596">Unrecognised error</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Headphone</translation>
-<translation id="225680501294068881">Scanning for devices...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Microphone (Internal)</translation>
-<translation id="4448844063988177157">Searching for Wi-Fi networks...</translation>
-<translation id="8401662262483418323">Failed to connect to '<ph name="NAME"/>': <ph name="DETAILS"/>
-Server message: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">An error occurred</translation>
-<translation id="7229570126336867161">Need EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> is a public session managed by <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Failed to connect to network: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Exit session</translation>
-<translation id="8454013096329229812">Wi-Fi is turned on.</translation>
-<translation id="4872237917498892622">Alt+Search or Shift</translation>
-<translation id="9201131092683066720">Battery is <ph name="PERCENTAGE"/>% full.</translation>
-<translation id="2983818520079887040">Settings...</translation>
-<translation id="3871838685472846647">Mobile Activated</translation>
-<translation id="1195412055398077112">overscan</translation>
-<translation id="112308213915226829">Autohide shelf</translation>
-<translation id="7573962313813535744">Docked mode</translation>
-<translation id="8927026611342028580">Connect Requested</translation>
-<translation id="8300849813060516376">OTASP failed</translation>
-<translation id="2792498699870441125">Alt+Search</translation>
-<translation id="8660803626959853127">Syncing <ph name="COUNT"/> file(s)</translation>
-<translation id="5958529069007801266">Supervised user</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK is off</translation>
-<translation id="6248847161401822652">Press Control Shift Q twice to exit.</translation>
-<translation id="6785414152754474415">Battery is <ph name="PERCENTAGE"/>% full and charging.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Activating...</translation>
-<translation id="4895488851634969361">Battery is full.</translation>
-<translation id="5947494881799873997">Revert</translation>
-<translation id="7593891976182323525">Search or Shift</translation>
-<translation id="7649070708921625228">Help</translation>
-<translation id="747833637904845037">Your Chromebook will stay on while connected to an external display, even with the lid closed.</translation>
-<translation id="3050422059534974565">CAPS LOCK is on.
-Press Search or Shift to cancel.</translation>
-<translation id="397105322502079400">Calculating...</translation>
-<translation id="158849752021629804">Need home network</translation>
-<translation id="6857811139397017780">Activate <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">DHCP look-up failed</translation>
-<translation id="6692173217867674490">Bad passphrase</translation>
-<translation id="6165508094623778733">Learn more</translation>
-<translation id="9046895021617826162">Connection failed</translation>
-<translation id="7168224885072002358">Reverting to old resolution in <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">This session will end in <ph name="SESSION_TIME_REMAINING"/>. You will be automatically signed out.</translation>
-<translation id="8372369524088641025">Bad WEP key</translation>
-<translation id="6636709850131805001">Unrecognised state</translation>
-<translation id="3573179567135747900">Change back to &quot;<ph name="FROM_LOCALE"/>&quot; (requires restart)</translation>
-<translation id="8103386449138765447">SMS messages: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Google Drive settings</translation>
-<translation id="7209101170223508707">CAPS LOCK is on.
-Press Alt+Search or Shift to cancel.</translation>
-<translation id="8940956008527784070">Battery low (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Accept</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> left</translation>
-<translation id="3009178788565917040">Output</translation>
-<translation id="520760366042891468">Sharing control of your screen via Hangouts.</translation>
-<translation id="8000066093800657092">No network</translation>
-<translation id="4015692727874266537">Sign in another account...</translation>
-<translation id="5941711191222866238">Minimise</translation>
-<translation id="6911468394164995108">Join other ...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Congratulations! Your '<ph name="NAME"/>' data service has been activated and is ready to go.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/>h <ph name="MINUTE"/>m until full</translation>
-<translation id="7297443947353982503">Username/password incorrect or EAP-auth failed</translation>
-<translation id="6359806961507272919">SMS from <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Operator</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_es-419.xtb b/chromium/ash/strings/ash_strings_es-419.xtb
deleted file mode 100644
index 8a69a4f637f..00000000000
--- a/chromium/ash/strings/ash_strings_es-419.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="es-419">
-<translation id="3595596368722241419">Batería completa</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> y <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Estado de portal</translation>
-<translation id="30155388420722288">Botón de desbordamiento</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth activado</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> se giró a <ph name="ROTATION"/>.</translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth desactivado</translation>
-<translation id="7165320105431587207">Error al configurar la red</translation>
-<translation id="3775358506042162758">Solo puedes tener un máximo de tres cuentas en un acceso múltiple.</translation>
-<translation id="370649949373421643">Habilitar Wi-Fi</translation>
-<translation id="3626281679859535460">Brillo</translation>
-<translation id="3621202678540785336">Entrada</translation>
-<translation id="595202126637698455">Seguimiento de rendimiento habilitado</translation>
-<translation id="8054466585765276473">Calculando duración de la batería...</translation>
-<translation id="7982789257301363584">Red</translation>
-<translation id="5565793151875479467">Proxy...</translation>
-<translation id="938582441709398163">Superposición del teclado</translation>
-<translation id="4387004326333427325">Certificado de autenticación rechazado de forma remota</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">La resolución de <ph name="DISPLAY_NAME"/> se cambió por <ph name="RESOLUTION"/>.</translation>
-<translation id="6943836128787782965">Error al obtener HTTP</translation>
-<translation id="2297568595583585744">Bandeja de estado</translation>
-<translation id="1661867754829461514">Falta el número de PIN </translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: Conectando...</translation>
-<translation id="40400351611212369">Error de activación de red</translation>
-<translation id="4237016987259239829">Error de conexión de red</translation>
-<translation id="2946640296642327832">Activar Bluetooth</translation>
-<translation id="6459472438155181876">Ampliando pantalla para <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Celular</translation>
-<translation id="6596816719288285829">Dirección IP</translation>
-<translation id="4508265954913339219">Falló la activación</translation>
-<translation id="3621712662352432595">Configuración de audio</translation>
-<translation id="1812696562331527143">Tu método de introducción cambió a <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>tercero<ph name="END_LINK"/>).
-Para cambiarlo, presiona Shift + Alt.</translation>
-<translation id="2127372758936585790">Cargador de baja potencia</translation>
-<translation id="3846575436967432996">No hay información de red disponible.</translation>
-<translation id="3026237328237090306">Configurar datos de dispositivos móviles</translation>
-<translation id="5871632337994001636">Administrar dispositivos…</translation>
-<translation id="785750925697875037">Ver cuenta móvil</translation>
-<translation id="153454903766751181">Iniciando módem celular...</translation>
-<translation id="4628814525959230255">Compartir el control de la pantalla con <ph name="HELPER_NAME"/> a través de Hangouts</translation>
-<translation id="7864539943188674973">Desactivar Bluetooth</translation>
-<translation id="939252827960237676">No se pudo guardar la captura de pantalla.</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Reinicia para actualizar.</translation>
-<translation id="2268813581635650749">Salir de todo</translation>
-<translation id="735745346212279324">VPN desconectada</translation>
-<translation id="7320906967354320621">Inactivo</translation>
-<translation id="15373452373711364">Cursor del mouse grande</translation>
-<translation id="3294437725009624529">Invitado</translation>
-<translation id="8190698733819146287">Personalizar idiomas y la entrada de datos</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Posición de la biblioteca</translation>
-<translation id="8676770494376880701">Cargador de baja potencia conectado</translation>
-<translation id="7170041865419449892">Fuera de alcance</translation>
-<translation id="4804818685124855865">Desconectar</translation>
-<translation id="2544853746127077729">Certificado de autenticación rechazado por la red</translation>
-<translation id="5222676887888702881">Salir</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Configuración</translation>
-<translation id="1272079795634619415">Interrumpir</translation>
-<translation id="4957722034734105353">Más información...</translation>
-<translation id="2964193600955408481">Desactivar Wi-Fi</translation>
-<translation id="4279490309300973883">Duplicando</translation>
-<translation id="7973962044839454485">Falló la autenticación de PPP debido a un nombre de usuario o una contraseña incorrectos.</translation>
-<translation id="2509468283778169019">BLOQ MAYÚS está activado.</translation>
-<translation id="3892641579809465218">Pantalla interna</translation>
-<translation id="7823564328645135659">Después de sincronizar tu configuración, el idioma se cambió de &quot;<ph name="FROM_LOCALE"/>&quot; a &quot;<ph name="TO_LOCALE"/>&quot;.</translation>
-<translation id="3368922792935385530">Conectado</translation>
-<translation id="8340999562596018839">Comentarios por voz</translation>
-<translation id="8654520615680304441">Encender Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Tu método de introducción cambió a <ph name="INPUT_METHOD_ID"/>.
-Para cambiarlo, presiona Shift + Alt.</translation>
-<translation id="2562916301614567480">Red privada</translation>
-<translation id="6549021752953852991">No hay redes celulares disponibles.</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Querido Monitor, lo nuestro no funciona. (Este monitor no es compatible).</translation>
-<translation id="6426039856985689743">Inhabilitar datos de dispositivos móviles</translation>
-<translation id="3087734570205094154">Inferior</translation>
-<translation id="3742055079367172538">Captura de pantalla tomada</translation>
-<translation id="8878886163241303700">Ampliando pantalla</translation>
-<translation id="5271016907025319479">La VPN no está configurada.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Tu administrador inhabilitó la función para realizar capturas de pantalla.</translation>
-<translation id="372094107052732682">Presiona Ctrl+Mayús+Q dos veces para salir.</translation>
-<translation id="6803622936009808957">No se pudieron reflejar las pantallas porque no se encontraron resoluciones compatibles. En su lugar, se activó el escritorio extendido.</translation>
-<translation id="1480041086352807611">Modo demo</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% restante</translation>
-<translation id="9089416786594320554">Métodos de entrada</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">Para activar &quot;<ph name="NAME"/>&quot;, es necesaria una conexión de red.</translation>
-<translation id="3963445509666917109">Altavoz (interno)</translation>
-<translation id="2825619548187458965">Biblioteca</translation>
-<translation id="2614835198358683673">Es posible que tu Chromebook no se cargue mientras esté encendida. Te recomendamos que utilices el cargador oficial.</translation>
-<translation id="1895658205118569222">Cierre</translation>
-<translation id="4430019312045809116">Volumen</translation>
-<translation id="8681498213689260554">Reiniciar y aplicar Powerwash para actualizar</translation>
-<translation id="4442424173763614572">Error al buscar DNS</translation>
-<translation id="7874779702599364982">Buscando redes para celulares...</translation>
-<translation id="583281660410589416">Desconocido</translation>
-<translation id="1383876407941801731">Buscar</translation>
-<translation id="3901991538546252627">Conectando con: <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Información de red</translation>
-<translation id="1621499497873603021">Tiempo restante hasta que se agote la batería: <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Salir de la sesión de invitado</translation>
-<translation id="8308637677604853869">Menú anterior</translation>
-<translation id="4666297444214622512">No puedes acceder a otra cuenta.</translation>
-<translation id="3625258641415618104">Capturas de pantalla inhabilitadas</translation>
-<translation id="1346748346194534595">Derecha</translation>
-<translation id="1773212559869067373">Certificado de autenticación rechazado de forma local</translation>
-<translation id="8528322925433439945">Dispositivos móviles...</translation>
-<translation id="7049357003967926684">Asociación</translation>
-<translation id="8428213095426709021">Configuración</translation>
-<translation id="2372145515558759244">Sincronizando aplicaciones...</translation>
-<translation id="7256405249507348194">Error desconocido: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Falló la verificación de AAA</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> hasta completar</translation>
-<translation id="5787281376604286451">Los comentarios de voz están habilitados.
-Para inhabilitar esta opción, presiona Ctrl+Alt+Z.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Error de red desconocido</translation>
-<translation id="1467432559032391204">Izquierda</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Activación de <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Clics automáticos</translation>
-<translation id="1398853756734560583">Maximizar</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: Conectando...</translation>
-<translation id="252373100621549798">Pantalla desconocida</translation>
-<translation id="1882897271359938046">Copiando en <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Conexión a un cargador de baja potencia. Es posible que la carga de la batería no sea confiable.</translation>
-<translation id="3784455785234192852">Bloquear</translation>
-<translation id="2805756323405976993">Aplicaciones</translation>
-<translation id="1512064327686280138">Fallo en la activación</translation>
-<translation id="5097002363526479830">Error al conectar a la red &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi desactivada</translation>
-<translation id="2966449113954629791">Es posible que hayas agotado los datos móviles. Accede al portal de activación de <ph name="NAME"/> para comprar más datos.</translation>
-<translation id="8132793192354020517">Conectado a <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Establecer fondo de pantalla...</translation>
-<translation id="8678698760965522072">Estado en línea</translation>
-<translation id="2532589005999780174">Modo de contraste alto</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Error interno</translation>
-<translation id="3019353588588144572">Tiempo restante hasta que la batería esté completamente cargada: <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Lupa</translation>
-<translation id="7005812687360380971">Fallo</translation>
-<translation id="882279321799040148">Haz clic para verla.</translation>
-<translation id="1753067873202720523">Es posible que tu Chromebook no se cargue mientras esté encendida.</translation>
-<translation id="5045550434625856497">Contraseña incorrecta</translation>
-<translation id="1602076796624386989">Habilitar datos de dispositivos móviles</translation>
-<translation id="6981982820502123353">Accesibilidad</translation>
-<translation id="3157931365184549694">Restaurar</translation>
-<translation id="4274292172790327596">Error no reconocido</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Auriculares</translation>
-<translation id="225680501294068881">Buscando dispositivos...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Micrófono (interno)</translation>
-<translation id="4448844063988177157">Buscando redes Wi-Fi...</translation>
-<translation id="8401662262483418323">Error al conectarse a &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/>
-Mensaje del servidor: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Se ha producido un error</translation>
-<translation id="7229570126336867161">Se necesita EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> es una sesión pública administrada por <ph name="DOMAIN"/>.</translation>
-<translation id="9044646465488564462">Error al establecer conexión con la red: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Salir de la sesión</translation>
-<translation id="8454013096329229812">Wi-Fi activada</translation>
-<translation id="4872237917498892622">Alt+tecla de búsqueda o Mayús</translation>
-<translation id="9201131092683066720">La batería tiene un <ph name="PERCENTAGE"/> % de carga.</translation>
-<translation id="2983818520079887040">Configuración...</translation>
-<translation id="3871838685472846647">Celular activado</translation>
-<translation id="1195412055398077112">desajuste de dimensiones</translation>
-<translation id="112308213915226829">Ocultar la biblioteca automáticamente</translation>
-<translation id="7573962313813535744">Modo acoplado</translation>
-<translation id="8927026611342028580">Conexión solicitada</translation>
-<translation id="8300849813060516376">OTASP falló</translation>
-<translation id="2792498699870441125">Alt+tecla de búsqueda</translation>
-<translation id="8660803626959853127">Sincronizando <ph name="COUNT"/> archivo(s)</translation>
-<translation id="5958529069007801266">Usuario supervisado</translation>
-<translation id="3709443003275901162">Más de 9</translation>
-<translation id="639644700271529076">El bloqueo de mayúsculas está desactivado.</translation>
-<translation id="6248847161401822652">Presiona Control+Mayús+Q dos veces para salir.</translation>
-<translation id="6785414152754474415">La batería tiene un <ph name="PERCENTAGE"/> % de carga y se está cargando.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Activando...</translation>
-<translation id="4895488851634969361">La batería está completa.</translation>
-<translation id="5947494881799873997">Revertir</translation>
-<translation id="7593891976182323525">Tecla de búsqueda o Mayús</translation>
-<translation id="7649070708921625228">Ayuda</translation>
-<translation id="747833637904845037">La Chromebook permanecerá encendida mientras esté conectada a una pantalla externa, aunque bajes la tapa.</translation>
-<translation id="3050422059534974565">El BLOQUEO DE MAYÚSCULAS está activado.
-Presiona Mayús o la tecla de búsqueda para cancelar la operación.</translation>
-<translation id="397105322502079400">Calculando...</translation>
-<translation id="158849752021629804">Se necesita red local</translation>
-<translation id="6857811139397017780">Activar <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Falló la búsqueda de DHCP</translation>
-<translation id="6692173217867674490">Frase de contraseña no válida</translation>
-<translation id="6165508094623778733">Más información</translation>
-<translation id="9046895021617826162">No se pudo conectar</translation>
-<translation id="7168224885072002358">Se revertirá a la resolución anterior en <ph name="TIMEOUT_SECONDS"/>.</translation>
-<translation id="973896785707726617">Esta sesión finalizará en <ph name="SESSION_TIME_REMAINING"/>. Saldrás automáticamente.</translation>
-<translation id="8372369524088641025">Clave de WEP no válida</translation>
-<translation id="6636709850131805001">Estado no reconocido</translation>
-<translation id="3573179567135747900">Volver a &quot;<ph name="FROM_LOCALE"/>&quot; (debes reiniciar).</translation>
-<translation id="8103386449138765447">Mensajes SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Configuración de Google Drive...</translation>
-<translation id="7209101170223508707">El BLOQUEO DE MAYÚSCULAS está activado.
-Presiona Alt y la tecla de búsqueda o Mayús para cancelar la operación.</translation>
-<translation id="8940956008527784070">Batería baja (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Aceptar</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> restante</translation>
-<translation id="3009178788565917040">Salida</translation>
-<translation id="520760366042891468">Compartir el control de la pantalla a través de Hangouts</translation>
-<translation id="8000066093800657092">Sin red</translation>
-<translation id="4015692727874266537">Acceder a otra cuenta</translation>
-<translation id="5941711191222866238">Minimizar</translation>
-<translation id="6911468394164995108">Conectarte a otra red...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Se activó tu servicio de datos &quot;<ph name="NAME"/>&quot; y está listo para que lo uses.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/>h <ph name="MINUTE"/>min para completar la carga</translation>
-<translation id="7297443947353982503">Nombre de usuario o contraseña incorrectos o error de autenticación EAP</translation>
-<translation id="6359806961507272919">SMS de <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Proveedor de servicio celular</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_es.xtb b/chromium/ash/strings/ash_strings_es.xtb
deleted file mode 100644
index 9a36c14b76b..00000000000
--- a/chromium/ash/strings/ash_strings_es.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="es">
-<translation id="3595596368722241419">Batería al máximo</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> y <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Conectado vía portal</translation>
-<translation id="30155388420722288">Botón de flujo excesivo</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth habilitado</translation>
-<translation id="6310121235600822547">Se ha modificado la rotación de <ph name="DISPLAY_NAME"/> a <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth inhabilitado</translation>
-<translation id="7165320105431587207">Error al configurar la red</translation>
-<translation id="3775358506042162758">Solo puedes utilizar un máximo de tres cuentas en el inicio de sesión múltiple.</translation>
-<translation id="370649949373421643">Habilitar Wi-Fi</translation>
-<translation id="3626281679859535460">Brillo</translation>
-<translation id="3621202678540785336">Entrada</translation>
-<translation id="595202126637698455">Se ha habilitado el control del rendimiento</translation>
-<translation id="8054466585765276473">Calculando duración de la batería...</translation>
-<translation id="7982789257301363584">Red</translation>
-<translation id="5565793151875479467">Proxy...</translation>
-<translation id="938582441709398163">Superposición de teclado</translation>
-<translation id="4387004326333427325">Certificado de autenticación rechazado de forma remota</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">Se ha modificado la resolución de <ph name="DISPLAY_NAME"/> a <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">Error al obtener HTTP</translation>
-<translation id="2297568595583585744">Bandeja de estado</translation>
-<translation id="1661867754829461514">Falta el PIN.</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: conectando...</translation>
-<translation id="40400351611212369">Error de activación de red</translation>
-<translation id="4237016987259239829">Error de conexión de red</translation>
-<translation id="2946640296642327832">Habilitar Bluetooth</translation>
-<translation id="6459472438155181876">Ampliando pantalla para <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Móvil</translation>
-<translation id="6596816719288285829">Dirección IP</translation>
-<translation id="4508265954913339219">Error de activación</translation>
-<translation id="3621712662352432595">Configuración de audio</translation>
-<translation id="1812696562331527143">Tu método de entrada ha cambiado a <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>externo<ph name="END_LINK"/>).
-Para cambiarlo, pulsa Mayús + Alt.</translation>
-<translation id="2127372758936585790">Cargador de baja potencia</translation>
-<translation id="3846575436967432996">No hay información de red disponible.</translation>
-<translation id="3026237328237090306">Configurar datos móviles</translation>
-<translation id="5871632337994001636">Administrar dispositivos...</translation>
-<translation id="785750925697875037">Ver cuenta móvil</translation>
-<translation id="153454903766751181">Iniciando módem móvil...</translation>
-<translation id="4628814525959230255">Comparte el control de tu pantalla con <ph name="HELPER_NAME"/> a través de Hangouts.</translation>
-<translation id="7864539943188674973">Inhabilitar Bluetooth</translation>
-<translation id="939252827960237676">Error al guardar captura de pantalla</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Reinicia el sistema para actualizarlo.</translation>
-<translation id="2268813581635650749">Cerrar todas las sesiones</translation>
-<translation id="735745346212279324">VPN desconectada</translation>
-<translation id="7320906967354320621">Inactiva</translation>
-<translation id="15373452373711364">Cursor del ratón grande</translation>
-<translation id="3294437725009624529">Invitado</translation>
-<translation id="8190698733819146287">Personalizar idiomas...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Posición de la estantería</translation>
-<translation id="8676770494376880701">Cargador de baja potencia conectado</translation>
-<translation id="7170041865419449892">Fuera del alcance</translation>
-<translation id="4804818685124855865">Desvincular</translation>
-<translation id="2544853746127077729">Certificado de autenticación rechazado por la red</translation>
-<translation id="5222676887888702881">Cerrar sesión</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Configuración</translation>
-<translation id="1272079795634619415">Interrumpir</translation>
-<translation id="4957722034734105353">Más información...</translation>
-<translation id="2964193600955408481">Inhabilitar Wi-Fi</translation>
-<translation id="4279490309300973883">Duplicando</translation>
-<translation id="7973962044839454485">Se ha producido un error en la autenticación de PPP porque la contraseña o el nombre de usuario son incorrectos</translation>
-<translation id="2509468283778169019">Bloqueo de mayúsculas activado</translation>
-<translation id="3892641579809465218">Pantalla interna</translation>
-<translation id="7823564328645135659">El idioma ha cambiado de &quot;<ph name="FROM_LOCALE"/>&quot; a &quot;<ph name="TO_LOCALE"/>&quot; después de sincronizar tu configuración.</translation>
-<translation id="3368922792935385530">Con conexión</translation>
-<translation id="8340999562596018839">Mensajes de voz</translation>
-<translation id="8654520615680304441">Activar Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Tu método de entrada ha cambiado a <ph name="INPUT_METHOD_ID"/>.
-Para cambiarlo, pulsa Mayús + Alt.</translation>
-<translation id="2562916301614567480">Red privada</translation>
-<translation id="6549021752953852991">No hay ninguna red móvil disponible.</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Querido monitor, lo nuestro no funciona... (No se admite el uso de ese monitor).</translation>
-<translation id="6426039856985689743">Inhabilitar datos móviles</translation>
-<translation id="3087734570205094154">Inferior</translation>
-<translation id="3742055079367172538">Captura de pantalla hecha</translation>
-<translation id="8878886163241303700">Ampliando pantalla</translation>
-<translation id="5271016907025319479">VPN no configurada</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Tu administrador ha inhabilitado la función para realizar capturas de pantalla.</translation>
-<translation id="372094107052732682">Pulsa Ctrl+Mayús+Q dos veces para salir.</translation>
-<translation id="6803622936009808957">No se han podido duplicar las pantallas porque no se han encontrado resoluciones compatibles. Se ha utilizado el modo de escritorio ampliado en su lugar.</translation>
-<translation id="1480041086352807611">Modo demo</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% restante</translation>
-<translation id="9089416786594320554">Métodos de entrada</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">La activación de <ph name="NAME"/> requiere una conexión de red.</translation>
-<translation id="3963445509666917109">Altavoz (interno)</translation>
-<translation id="2825619548187458965">Estantería</translation>
-<translation id="2614835198358683673">Es posible que tu Chromebook no se cargue mientras esté activado. Te recomendamos que utilices el cargador oficial.</translation>
-<translation id="1895658205118569222">Cierre del navegador</translation>
-<translation id="4430019312045809116">Volumen</translation>
-<translation id="8681498213689260554">Reinicia y aplica la función de Powerwash para actualizar el sistema</translation>
-<translation id="4442424173763614572">Error al buscar DNS</translation>
-<translation id="7874779702599364982">Buscando redes móviles...</translation>
-<translation id="583281660410589416">Desconocido</translation>
-<translation id="1383876407941801731">Búsqueda</translation>
-<translation id="3901991538546252627">Conectando con: <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Información de red</translation>
-<translation id="1621499497873603021">Tiempo restante hasta que se agote la batería: <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Salir de la sesión de invitado</translation>
-<translation id="8308637677604853869">Menú anterior</translation>
-<translation id="4666297444214622512">No puedo iniciar sesión con otra cuenta.</translation>
-<translation id="3625258641415618104">Capturas de pantalla inhabilitadas</translation>
-<translation id="1346748346194534595">Derecha</translation>
-<translation id="1773212559869067373">Certificado de autenticación rechazado de forma local</translation>
-<translation id="8528322925433439945">Redes móviles...</translation>
-<translation id="7049357003967926684">Asociación</translation>
-<translation id="8428213095426709021">Configuración</translation>
-<translation id="2372145515558759244">Sincronizando aplicaciones...</translation>
-<translation id="7256405249507348194">Error no reconocido: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Error de comprobación de AAA</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> hasta cargarse</translation>
-<translation id="5787281376604286451">Los mensajes de voz están habilitados.
-Para inhabilitar esta opción, pulsa Ctrl+Alt+Z.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Error desconocido de red</translation>
-<translation id="1467432559032391204">Izquierda</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Activación de <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Clics automáticos</translation>
-<translation id="1398853756734560583">Maximizar</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: conectando...</translation>
-<translation id="252373100621549798">Pantalla desconocida</translation>
-<translation id="1882897271359938046">Copiando en <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Conectado a un cargador de baja potencia. Es posible que la carga de la batería no sea fiable.</translation>
-<translation id="3784455785234192852">Bloquear</translation>
-<translation id="2805756323405976993">Aplicaciones</translation>
-<translation id="1512064327686280138">Error de activación</translation>
-<translation id="5097002363526479830">Error al establecer conexión con la red &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">La conexión Wi-Fi está desactivada.</translation>
-<translation id="2966449113954629791">Es posible que hayas agotado los datos de tu plan de datos móviles. Accede al portal de activación de <ph name="NAME"/> para comprar más datos.</translation>
-<translation id="8132793192354020517">Conectado a <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Establecer fondo de pantalla...</translation>
-<translation id="8678698760965522072">Estado online</translation>
-<translation id="2532589005999780174">Modo de contraste alto</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Error interno</translation>
-<translation id="3019353588588144572">Tiempo restante hasta que se cargue la batería por completo: <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Lupa</translation>
-<translation id="7005812687360380971">Error</translation>
-<translation id="882279321799040148">Haz clic para verla</translation>
-<translation id="1753067873202720523">Es posible que el Chromebook no se cargue mientras esté encendido.</translation>
-<translation id="5045550434625856497">Contraseña incorrecta</translation>
-<translation id="1602076796624386989">Habilitar datos móviles</translation>
-<translation id="6981982820502123353">Accesibilidad</translation>
-<translation id="3157931365184549694">Restaurar</translation>
-<translation id="4274292172790327596">Error desconocido</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Auriculares</translation>
-<translation id="225680501294068881">Buscando dispositivos...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Micrófono (interno)</translation>
-<translation id="4448844063988177157">Buscando redes Wi-Fi...</translation>
-<translation id="8401662262483418323">Error al conectarse a &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/>
-Mensaje del servidor: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Se ha producido un error.</translation>
-<translation id="7229570126336867161">Es necesario el estándar EVDO.</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> es una sesión pública administrada por <ph name="DOMAIN"/>.</translation>
-<translation id="9044646465488564462">Error al establecer conexión con la red: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Cerrar sesión</translation>
-<translation id="8454013096329229812">La conexión Wi-Fi está activada.</translation>
-<translation id="4872237917498892622">Alt+tecla de búsqueda o Mayús</translation>
-<translation id="9201131092683066720">La batería está al <ph name="PERCENTAGE"/>%.</translation>
-<translation id="2983818520079887040">Configuración...</translation>
-<translation id="3871838685472846647">Móvil activado</translation>
-<translation id="1195412055398077112">reajustar</translation>
-<translation id="112308213915226829">Ocultar automáticamente estantería</translation>
-<translation id="7573962313813535744">Modo acoplado</translation>
-<translation id="8927026611342028580">Conexión solicitada</translation>
-<translation id="8300849813060516376">Error de OTASP</translation>
-<translation id="2792498699870441125">Alt+tecla de búsqueda</translation>
-<translation id="8660803626959853127">Sincronizando <ph name="COUNT"/> archivo(s)</translation>
-<translation id="5958529069007801266">Usuario supervisado</translation>
-<translation id="3709443003275901162">+9</translation>
-<translation id="639644700271529076">Bloqueo de mayúsculas desactivado</translation>
-<translation id="6248847161401822652">Pulsa Ctrl+Mayús+Q dos veces para salir.</translation>
-<translation id="6785414152754474415">La batería se está cargando y está al <ph name="PERCENTAGE"/>%.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Activando...</translation>
-<translation id="4895488851634969361">La batería está llena.</translation>
-<translation id="5947494881799873997">Deshacer</translation>
-<translation id="7593891976182323525">Tecla de búsqueda o Mayús</translation>
-<translation id="7649070708921625228">Ayuda</translation>
-<translation id="747833637904845037">Tu Chromebook permanecerá activado mientras esté conectado a una pantalla externa, aunque la tapa esté cerrada.</translation>
-<translation id="3050422059534974565">El BLOQUEO DE MAYÚSCULAS está activado.
-Pulsa Mayús o la tecla de búsqueda para cancelar la operación.</translation>
-<translation id="397105322502079400">Calculando...</translation>
-<translation id="158849752021629804">Es necesaria una red doméstica.</translation>
-<translation id="6857811139397017780">Activar <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Error de búsqueda de DHCP</translation>
-<translation id="6692173217867674490">Frase de contraseña incorrecta</translation>
-<translation id="6165508094623778733">Más información</translation>
-<translation id="9046895021617826162">Error de conexión</translation>
-<translation id="7168224885072002358">Restableciendo la resolución anterior en <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Esta sesión finalizará en <ph name="SESSION_TIME_REMAINING"/>. La sesión se cerrará automáticamente.</translation>
-<translation id="8372369524088641025">Clave WEP incorrecta</translation>
-<translation id="6636709850131805001">Estado desconocido</translation>
-<translation id="3573179567135747900">Cambiar de nuevo por &quot;<ph name="FROM_LOCALE"/>&quot; (requiere reiniciar)</translation>
-<translation id="8103386449138765447">Mensajes SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Configuración de Google Drive...</translation>
-<translation id="7209101170223508707">El BLOQUEO DE MAYÚSCULAS está activado.
-Pulsa Alt y la tecla de búsqueda o Mayús para cancelar la operación.</translation>
-<translation id="8940956008527784070">Poca batería (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Aceptar</translation>
-<translation id="5102001756192215136">Queda para <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Salida</translation>
-<translation id="520760366042891468">Comparte el control de tu pantalla a través de Hangouts.</translation>
-<translation id="8000066093800657092">Ninguna red</translation>
-<translation id="4015692727874266537">Inicia sesión con otra cuenta...</translation>
-<translation id="5941711191222866238">Minimizar</translation>
-<translation id="6911468394164995108">Conectarse a otra red...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">¡Enhorabuena! Tu servicio de datos <ph name="NAME"/> se ha activado y está listo para que lo uses.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/> h y <ph name="MINUTE"/> min para completar la carga</translation>
-<translation id="7297443947353982503">Nombre de usuario o contraseña incorrectos o error de autenticación EAP</translation>
-<translation id="6359806961507272919">SMS de <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Operador</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_et.xtb b/chromium/ash/strings/ash_strings_et.xtb
deleted file mode 100644
index b9651aeb736..00000000000
--- a/chromium/ash/strings/ash_strings_et.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="et">
-<translation id="3595596368722241419">Aku on täis</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> ja <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Portaali olek</translation>
-<translation id="30155388420722288">Ülevoolunupp</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth on lubatud</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> vahetati valikule <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth on keelatud</translation>
-<translation id="7165320105431587207">Võrgu seadistamine ebaõnnestus</translation>
-<translation id="3775358506042162758">Saate korraga sisse logida kuni kolmele kontole.</translation>
-<translation id="370649949373421643">Luba WiFi</translation>
-<translation id="3626281679859535460">Eredus</translation>
-<translation id="3621202678540785336">Sisend</translation>
-<translation id="595202126637698455">Toimivuse jälgimine on lubatud</translation>
-<translation id="8054466585765276473">Aku tööaja arvutamine.</translation>
-<translation id="7982789257301363584">Võrk</translation>
-<translation id="5565793151875479467">Puhverserver ...</translation>
-<translation id="938582441709398163">Klaviatuuri ülekate</translation>
-<translation id="4387004326333427325">Autentimissertifikaat lükati kaugühenduse kaudu tagasi</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">Ekraani <ph name="DISPLAY_NAME"/> eraldusvõimeks määrati <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">HTTP hankimine nurjus</translation>
-<translation id="2297568595583585744">Olekusalv</translation>
-<translation id="1661867754829461514">PIN-kood puudub</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: ühendamine ...</translation>
-<translation id="40400351611212369">Võrgu aktiveerimise viga</translation>
-<translation id="4237016987259239829">Võrguühenduse viga</translation>
-<translation id="2946640296642327832">Luba Bluetooth</translation>
-<translation id="6459472438155181876">Ekraani laiendamine seadmesse <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Mobiil</translation>
-<translation id="6596816719288285829">IP-aadress</translation>
-<translation id="4508265954913339219">Aktiveerimine nurjus</translation>
-<translation id="3621712662352432595">Heliseaded</translation>
-<translation id="1812696562331527143">Teie sisestusmeetod on nüüd <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>kolmas osapool<ph name="END_LINK"/>).
-Selle muutmiseks vajutage klahve Tõstuklahv + Alt.</translation>
-<translation id="2127372758936585790">Väikese energiakuluga laadija</translation>
-<translation id="3846575436967432996">Võrguteave ei ole saadaval</translation>
-<translation id="3026237328237090306">Seadista mobiilne andmeside</translation>
-<translation id="5871632337994001636">Seadmete haldamine ...</translation>
-<translation id="785750925697875037">Kuva mobiilikonto</translation>
-<translation id="153454903766751181">Mobiilimodemi lähtestamine ...</translation>
-<translation id="4628814525959230255">Teie ekraani juhtimist jagatakse Hangoutsi kaudu kasutajaga <ph name="HELPER_NAME"/>.</translation>
-<translation id="7864539943188674973">Keela Bluetooth</translation>
-<translation id="939252827960237676">Ekraanipilti ei õnnestunud salvestada</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Taaskäivitage värskendamiseks</translation>
-<translation id="2268813581635650749">Logi kõik kasutajad välja</translation>
-<translation id="735745346212279324">VPN-i ühendus on katkestatud</translation>
-<translation id="7320906967354320621">Tegevusetu</translation>
-<translation id="15373452373711364">Suur hiirekursor</translation>
-<translation id="3294437725009624529">Külaline</translation>
-<translation id="8190698733819146287">Keelte ja sisendi kohandamine...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Riiuli positsioon</translation>
-<translation id="8676770494376880701">Väikese energiakuluga laadija on ühendatud</translation>
-<translation id="7170041865419449892">Vahemikust väljas</translation>
-<translation id="4804818685124855865">Katkesta ühendus</translation>
-<translation id="2544853746127077729">Võrk lükkas autentimissertifikaadi tagasi</translation>
-<translation id="5222676887888702881">Logi välja</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Konfigureerimine</translation>
-<translation id="1272079795634619415">Peata</translation>
-<translation id="4957722034734105353">Lisateave ...</translation>
-<translation id="2964193600955408481">Keela WiFi</translation>
-<translation id="4279490309300973883">Peegeldamine</translation>
-<translation id="7973962044839454485">PPP autentimine ebaõnnestus vale kasutajanime või parooli tõttu</translation>
-<translation id="2509468283778169019">SUURTÄHELUKK on sisse lülitatud</translation>
-<translation id="3892641579809465218">Sisemine kuva</translation>
-<translation id="7823564328645135659">Pärast seadete sünkroonimist asendati <ph name="FROM_LOCALE"/> keel <ph name="TO_LOCALE"/> keelega.</translation>
-<translation id="3368922792935385530">Ühendatud</translation>
-<translation id="8340999562596018839">Suuline tagasiside</translation>
-<translation id="8654520615680304441">Lülita WiFi sisse ...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Teie sisestusmeetod on nüüd <ph name="INPUT_METHOD_ID"/>.
-Selle muutmiseks vajutage klahve Tõstuklahv + Alt.</translation>
-<translation id="2562916301614567480">Privaatvõrk</translation>
-<translation id="6549021752953852991">Mobiilivõrk pole saadaval</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Monitor, kahjuks ei tule meie koostööst midagi välja. (Seda monitori ei toetata)</translation>
-<translation id="6426039856985689743">Keela mobiilne andmeside</translation>
-<translation id="3087734570205094154">Alaserv</translation>
-<translation id="3742055079367172538">Ekraanipilt on tehtud</translation>
-<translation id="8878886163241303700">Ekraani laiendamine</translation>
-<translation id="5271016907025319479">VPN on seadistamata.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Teie administraator on ekraanipiltide tegemise keelanud.</translation>
-<translation id="372094107052732682">Väljumiseks vajutage kaks korda klahvikombinatsiooni Ctrl + tõstuklahv + Q.</translation>
-<translation id="6803622936009808957">Ei saanud kuvasid peegeldada, kuna toetatud eraldusvõimeid ei leitud. Selle asemel siseneti laiendatud töölaua režiimi.</translation>
-<translation id="1480041086352807611">Demorežiim</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% on jäänud</translation>
-<translation id="9089416786594320554">Sisestusviisid</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">Võrgu „<ph name="NAME"/>” aktiveerimine nõuab võrguühendust.</translation>
-<translation id="3963445509666917109">Kõlar (sisemine)</translation>
-<translation id="2825619548187458965">Riiul</translation>
-<translation id="2614835198358683673">Teie Chromebooki ei pruugita laadida, kui see on sisse lülitatud. Kaaluge ametliku laadija kasutamist.</translation>
-<translation id="1895658205118569222">Sulgemine</translation>
-<translation id="4430019312045809116">Helitugevus</translation>
-<translation id="8681498213689260554">Värskendamiseks tuleb arvuti taaskäivitada ja teha Powerwash</translation>
-<translation id="4442424173763614572">DNS-i otsing nurjus</translation>
-<translation id="7874779702599364982">Mobiilsidevõrkude otsimine ...</translation>
-<translation id="583281660410589416">Tundmatu</translation>
-<translation id="1383876407941801731">Otsing</translation>
-<translation id="3901991538546252627">Võrguga <ph name="NAME"/> ühenduse loomine</translation>
-<translation id="2204305834655267233">Võrguteave</translation>
-<translation id="1621499497873603021">Aku tühjenemiseni on aega <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Välju külastajaseansist</translation>
-<translation id="8308637677604853869">Eelmine menüü</translation>
-<translation id="4666297444214622512">Teisele kontole ei saa sisse logida.</translation>
-<translation id="3625258641415618104">Ekraanipildid on keelatud</translation>
-<translation id="1346748346194534595">Paremale</translation>
-<translation id="1773212559869067373">Autentimissertifikaat lükati kohalikult tagasi</translation>
-<translation id="8528322925433439945">Mobiil ...</translation>
-<translation id="7049357003967926684">Sidumine</translation>
-<translation id="8428213095426709021">Seaded</translation>
-<translation id="2372145515558759244">Rakenduste sünkroonimine ...</translation>
-<translation id="7256405249507348194">Tundmatu viga: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA kontrollimine nurjus</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> täislaadimiseni</translation>
-<translation id="5787281376604286451">Suuline tagasiside on lubatud.
-Keelamiseks vajutage klahvikombinatsiooni Ctrl+Alt+Z.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Tundmatu võrguviga</translation>
-<translation id="1467432559032391204">Vasakule</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Võrgu <ph name="NAME"/> aktiveerimine</translation>
-<translation id="8814190375133053267">WiFi</translation>
-<translation id="1923539912171292317">Automaatsed klikid</translation>
-<translation id="1398853756734560583">Maksimeeri</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: ühendamine ...</translation>
-<translation id="252373100621549798">Tundmatu ekraan</translation>
-<translation id="1882897271359938046">Peegeldamine asukohta <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Ühendatud väikese energiakuluga laadijaga. Aku laadimine võib olla ebastabiilne.</translation>
-<translation id="3784455785234192852">Lukusta</translation>
-<translation id="2805756323405976993">Rakendused</translation>
-<translation id="1512064327686280138">Aktiveerimise tõrge</translation>
-<translation id="5097002363526479830">Võrguga „<ph name="NAME"/>” ühenduse loomine ebaõnnestus: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">WiFi on välja lülitatud.</translation>
-<translation id="2966449113954629791">Võimalik, et olete oma mobiilse andmeside ära kasutanud. Andmesidet saate juurde osta aktiveerimisportaalis <ph name="NAME"/>.</translation>
-<translation id="8132793192354020517">Ühendus <ph name="NAME"/>iga</translation>
-<translation id="7052914147756339792">Määra taustapilt ...</translation>
-<translation id="8678698760965522072">Võrguühenduse olek</translation>
-<translation id="2532589005999780174">Suure kontrastsusega režiim</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Sisemine viga</translation>
-<translation id="3019353588588144572">Aku täitumiseni on aega <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Ekraanisuurendi</translation>
-<translation id="7005812687360380971">Tõrge</translation>
-<translation id="882279321799040148">Vaatamiseks klõpsake</translation>
-<translation id="1753067873202720523">Teie Chromebooki ei pruugita laadida, kui see on sisse lülitatud.</translation>
-<translation id="5045550434625856497">Vale parool</translation>
-<translation id="1602076796624386989">Luba mobiilne andmeside</translation>
-<translation id="6981982820502123353">Juurdepääsetavus</translation>
-<translation id="3157931365184549694">Taasta</translation>
-<translation id="4274292172790327596">Tundmatu viga</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Kõrvaklapid</translation>
-<translation id="225680501294068881">Seadmete skannimine ...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Mikrofon (sisemine)</translation>
-<translation id="4448844063988177157">WiFi võrkude otsimine ...</translation>
-<translation id="8401662262483418323">Võrguga <ph name="NAME"/> ühenduse loomine ebaõnnestus: <ph name="DETAILS"/>
-Serveri teade: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Tekkis viga</translation>
-<translation id="7229570126336867161">Vajalik EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> on avalik seanss, mida haldab <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Võrguga ühenduse loomine ebaõnnestus: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Välju seansist</translation>
-<translation id="8454013096329229812">WiFi on sisse lülitatud.</translation>
-<translation id="4872237917498892622">Alt + otsinguklahv või tõstuklahv</translation>
-<translation id="9201131092683066720">Aku on <ph name="PERCENTAGE"/>% täis.</translation>
-<translation id="2983818520079887040">Seaded...</translation>
-<translation id="3871838685472846647">Mobiil on aktiveeritud</translation>
-<translation id="1195412055398077112">liighälvitus</translation>
-<translation id="112308213915226829">Riiuli automaatne peitmine</translation>
-<translation id="7573962313813535744">Dokkimisrežiim</translation>
-<translation id="8927026611342028580">Ühenduse taotlus</translation>
-<translation id="8300849813060516376">OTASP nurjus</translation>
-<translation id="2792498699870441125">Alt + otsinguklahv</translation>
-<translation id="8660803626959853127"><ph name="COUNT"/> faili sünkroonimine</translation>
-<translation id="5958529069007801266">Valvatav kasutaja</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">SUURTÄHELUKK on välja lülitatud</translation>
-<translation id="6248847161401822652">Väljumiseks vajutage kaks korda klahvikombinatsiooni Ctrl + tõstuklahv + Q.</translation>
-<translation id="6785414152754474415">Aku on <ph name="PERCENTAGE"/>% täis ja seda laetakse.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: aktiveerimine ...</translation>
-<translation id="4895488851634969361">Aku on täis.</translation>
-<translation id="5947494881799873997">Ennista</translation>
-<translation id="7593891976182323525">Otsinguklahv või tõstuklahv</translation>
-<translation id="7649070708921625228">Abi</translation>
-<translation id="747833637904845037">Kui Chromebook on ühendatud välise ekraaniga, töötab see edasi ka klapi sulgemisel.</translation>
-<translation id="3050422059534974565">SUURTÄHELUKK on sisse lülitatud.
-Tühistamiseks vajutage otsinguklahvi või tõstuklahvi</translation>
-<translation id="397105322502079400">Arvutamine ...</translation>
-<translation id="158849752021629804">Vajalik koduvõrk</translation>
-<translation id="6857811139397017780">Aktiveeri <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">DHCP otsing nurjus</translation>
-<translation id="6692173217867674490">Halb parool</translation>
-<translation id="6165508094623778733">Lisateave</translation>
-<translation id="9046895021617826162">Ühendamine nurjus</translation>
-<translation id="7168224885072002358">Ekraan ennistatakse vanale eraldusvõimele <ph name="TIMEOUT_SECONDS"/> pärast</translation>
-<translation id="973896785707726617">Selle seansi lõpuni on jäänud <ph name="SESSION_TIME_REMAINING"/>. Teid logitakse automaatselt välja.</translation>
-<translation id="8372369524088641025">Halb WEP-võti</translation>
-<translation id="6636709850131805001">Tundmatu olek</translation>
-<translation id="3573179567135747900">Muuda tagasi seadele <ph name="FROM_LOCALE"/> (nõuab taaskäivitust)</translation>
-<translation id="8103386449138765447">SMS-id: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Google Drive'i seaded ...</translation>
-<translation id="7209101170223508707">SUURTÄHELUKK on sisse lülitatud.
-Tühistamiseks vajutage klahvikombinatsiooni Alt + otsinguklahv või tõstuklahv</translation>
-<translation id="8940956008527784070">Aku tühjeneb (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Nõustu</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> alles</translation>
-<translation id="3009178788565917040">Väljund</translation>
-<translation id="520760366042891468">Teie ekraani juhtimist jagatakse Hangoutsi kaudu.</translation>
-<translation id="8000066093800657092">Võrku pole</translation>
-<translation id="4015692727874266537">Logige sisse teise kontoga ...</translation>
-<translation id="5941711191222866238">Minimeeri</translation>
-<translation id="6911468394164995108">Liitu muu võrguga ...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Õnnitleme! Teie võrgu „<ph name="NAME"/>” andmeteenus on aktiveeritud ja kasutamiseks valmis.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/> h <ph name="MINUTE"/> min aku täitumiseni</translation>
-<translation id="7297443947353982503">Kasutajanimi/parool on vale või EAP-autentimine ebaõnnestus</translation>
-<translation id="6359806961507272919">SMS numbrilt <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Mobiilioperaator</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_fa.xtb b/chromium/ash/strings/ash_strings_fa.xtb
deleted file mode 100644
index 3513c23745b..00000000000
--- a/chromium/ash/strings/ash_strings_fa.xtb
+++ /dev/null
@@ -1,228 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="fa">
-<translation id="3595596368722241419">باتری پر است</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> و <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">وضعیت سایت</translation>
-<translation id="30155388420722288">دکمه سرریز</translation>
-<translation id="8673028979667498656">‎۲۷۰°‎</translation>
-<translation id="5571066253365925590">بلوتوث فعال شد</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> به <ph name="ROTATION"/> چرخانده شد</translation>
-<translation id="9074739597929991885">بلوتوث</translation>
-<translation id="2268130516524549846">بلوتوث غیرفعال است</translation>
-<translation id="7165320105431587207">پیکربندی شبکه انجام نشد</translation>
-<translation id="3775358506042162758">در ورود چندگانه به سیستم حداکثر می‌توانید از سه حساب استفاده کنید.</translation>
-<translation id="370649949373421643">‏فعال کردن Wi-Fi</translation>
-<translation id="3626281679859535460">روشنایی</translation>
-<translation id="3621202678540785336">ورودی</translation>
-<translation id="595202126637698455">ردیابی عملکرد فعال شد</translation>
-<translation id="8054466585765276473">درحال محاسبه زمان شارژ باتری.</translation>
-<translation id="7982789257301363584">شبکه</translation>
-<translation id="5565793151875479467">پراکسی...</translation>
-<translation id="938582441709398163">هم پوشانی صفحه‌کلید</translation>
-<translation id="4387004326333427325">گواهینامه تأیید اعتبار، از راه دور، رد شد</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">وضوح <ph name="DISPLAY_NAME"/> به <ph name="RESOLUTION"/> تغییر یافت</translation>
-<translation id="6943836128787782965">‏HTTP با خطا مواجه شد</translation>
-<translation id="2297568595583585744">سینی وضعیت</translation>
-<translation id="1661867754829461514">پین جا افتاده</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: در حال اتصال...</translation>
-<translation id="40400351611212369">خطا در فعال‌سازی شبکه</translation>
-<translation id="4237016987259239829">خطای اتصال شبکه</translation>
-<translation id="2946640296642327832">فعال کردن بلوتوث</translation>
-<translation id="6459472438155181876">گسترش صفحه به <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">سلولی</translation>
-<translation id="6596816719288285829">‏آدرس IP</translation>
-<translation id="4508265954913339219">فعالسازی انجام نشد</translation>
-<translation id="3621712662352432595">تنظیمات صوتی</translation>
-<translation id="1812696562331527143">‏روش ورودی شما به <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>شخص ثالث<ph name="END_LINK"/>) تغییر یافت. Shift + Alt را برای تعویض فشار دهید.</translation>
-<translation id="2127372758936585790">شارژر برق ضعیف</translation>
-<translation id="3846575436967432996">اطلاعات شبکه در دسترس نیست</translation>
-<translation id="3026237328237090306">تنظیم اطلاعات تلفن همراه</translation>
-<translation id="5871632337994001636">مدیریت دستگاه‌ها...</translation>
-<translation id="785750925697875037">مشاهده حساب تلفن همراه</translation>
-<translation id="153454903766751181">در حال راه‌اندازی مودم سلولی...</translation>
-<translation id="4628814525959230255">‏اشتراک‌گذاری کنترل صفحه نمایش‌تان با <ph name="HELPER_NAME"/> از طریق Hangouts.</translation>
-<translation id="7864539943188674973">غیرفعال کردن بلوتوث</translation>
-<translation id="939252827960237676">عکس از صفحه نمایش ذخیره نشد</translation>
-<translation id="1969011864782743497">‏<ph name="DEVICE_NAME"/> (‏USB)</translation>
-<translation id="3126069444801937830">راه‌اندازی مجدد برای به‌روزرسانی</translation>
-<translation id="2268813581635650749">خروج همه از سیستم</translation>
-<translation id="735745346212279324">‏VPN قطع شد</translation>
-<translation id="7320906967354320621">بدون فعالیت</translation>
-<translation id="15373452373711364">نشانگر موشواره بزرگ</translation>
-<translation id="3294437725009624529">مهمان</translation>
-<translation id="8190698733819146287">سفارشی کردن زبان‌ها و ورودی...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">موقعیت قفسه</translation>
-<translation id="8676770494376880701">شارژر برق متصل شده ضعیف است</translation>
-<translation id="7170041865419449892">خارج از محدوده</translation>
-<translation id="4804818685124855865">قطع اتصال</translation>
-<translation id="2544853746127077729">گواهینامه تأیید اعتبار توسط شبکه رد شد</translation>
-<translation id="5222676887888702881">خروج از سیستم</translation>
-<translation id="2391579633712104609">۱۸۰°</translation>
-<translation id="2688477613306174402">پیکربندی</translation>
-<translation id="1272079795634619415">توقف</translation>
-<translation id="4957722034734105353">اطلاعات بیشتر...</translation>
-<translation id="2964193600955408481">‏غیرفعال کردن Wi-Fi</translation>
-<translation id="4279490309300973883">بازتاب می‌شود</translation>
-<translation id="7973962044839454485">‏احراز هویت PPP به دلیل نام کاربری یا گذرواژه نادرست انجام نشد</translation>
-<translation id="2509468283778169019">‏CAPS LOCK روشن است</translation>
-<translation id="3892641579809465218">صفحه نمایش داخلی</translation>
-<translation id="7823564328645135659">بعد از همگام‌سازی تنظیمات شما، زبان از «<ph name="FROM_LOCALE"/>» به «<ph name="TO_LOCALE"/>» تغییر کرد.</translation>
-<translation id="3368922792935385530">متصل</translation>
-<translation id="8340999562596018839">بازخورد گفتاری</translation>
-<translation id="8654520615680304441">‏روشن کردن Wi-Fi در...</translation>
-<translation id="8828714802988429505">۹۰°</translation>
-<translation id="5825747213122829519">‏روش ورودی شما به <ph name="INPUT_METHOD_ID"/> تغییر یافت. Shift + Alt را برای تعویض فشار دهید.</translation>
-<translation id="2562916301614567480">شبکه خصوصی</translation>
-<translation id="6549021752953852991">هیچ شبکه سلولی دردسترس نیست</translation>
-<translation id="2982222131142145681">‏<ph name="DEVICE_NAME"/> (‏HDMI)</translation>
-<translation id="4379753398862151997">نمایشگر عزیز، ما برای هم ساخته نشده‌ایم. (این نمایشگر پشتیبانی نمی‌شود)</translation>
-<translation id="6426039856985689743">غیرفعال کردن اطلاعات تلفن همراه</translation>
-<translation id="3087734570205094154">پایین</translation>
-<translation id="3742055079367172538">عکس از صفحه نمایش گرفته شد</translation>
-<translation id="8878886163241303700">صفحه گسترش یافته است</translation>
-<translation id="5271016907025319479">‏VPN پیکربندی نشده است.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (بلوتوث)</translation>
-<translation id="3967919079500697218">سرپرست شما قابلیت عکس گرفتن از صفحه‌نمایش را غیرفعال کرده است.</translation>
-<translation id="372094107052732682">‏برای خروج Ctrl+Shift+Q را دو بار فشار دهید.</translation>
-<translation id="6803622936009808957">نمایش یک تصویر واحد در چند صفحه نمایش ممکن نیست زیرا وضوح تصویر پشتیبانی شده‌ای وجود ندارد. بجای آن حالت نمایش دسک‌تاپ چند بخشی استفاده می‌شود.</translation>
-<translation id="1480041086352807611">حالت نمایش</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>٪ باقیمانده</translation>
-<translation id="9089416786594320554">روش‌های ورودی</translation>
-<translation id="6247708409970142803">%<ph name="PERCENTAGE"/></translation>
-<translation id="2670531586141364277">فعال‌سازی «<ph name="NAME"/>» به اتصال شبکه نیاز دارد.</translation>
-<translation id="3963445509666917109">بلندگو (داخلی)</translation>
-<translation id="2825619548187458965">قفسه</translation>
-<translation id="2614835198358683673">‏وقتی Chromebook روشن است ممکن است شارژ نشود. از شارژر مخصوص دستگاه استفاده کنید.</translation>
-<translation id="1895658205118569222">بسته شدن</translation>
-<translation id="4430019312045809116">میزان صدا</translation>
-<translation id="8681498213689260554">‏راه‌اندازی مجدد و Powerwash برای به‌روزرسانی</translation>
-<translation id="4442424173763614572">‏جستجوی DNS انجام نشد</translation>
-<translation id="7874779702599364982">جستجو برای شبکه‌های تلفن همراه ...</translation>
-<translation id="583281660410589416">ناشناخته</translation>
-<translation id="1383876407941801731">جستجو</translation>
-<translation id="3901991538546252627">در حال اتصال به <ph name="NAME"/></translation>
-<translation id="2204305834655267233">اطلاعات شبکه</translation>
-<translation id="1621499497873603021">زمان باقیمانده تا خالی‌شدن شارژ باتری، <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">خروج از مهمان</translation>
-<translation id="8308637677604853869">منوی قبلی</translation>
-<translation id="4666297444214622512">ورود به حساب دیگر ممکن نیست.</translation>
-<translation id="3625258641415618104">عکس از صفحه‌نمایش غیرفعال است</translation>
-<translation id="1346748346194534595">راست</translation>
-<translation id="1773212559869067373">گواهینامه تأیید اعتبار به صورت محلی رد شد</translation>
-<translation id="8528322925433439945">تلفن همراه...</translation>
-<translation id="7049357003967926684">همراه کردن</translation>
-<translation id="8428213095426709021">تنظیمات</translation>
-<translation id="2372145515558759244">در حال همگام‌سازی برنامه‌ها…</translation>
-<translation id="7256405249507348194">خطای نامشخص: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">‏بررسی AAA انجام نشد</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> تا پر شود</translation>
-<translation id="5787281376604286451">‏بازخورد گفتاری فعال است.
-Ctrl+Alt+Z را فشار دید تا غیرفعال شود.</translation>
-<translation id="4479639480957787382">اترنت</translation>
-<translation id="6312403991423642364">خطای شبکه ناشناخته</translation>
-<translation id="1467432559032391204">چپ</translation>
-<translation id="5543001071567407895">پیامک</translation>
-<translation id="1957803754585243749">۰ درجه</translation>
-<translation id="2354174487190027830">فعال‌سازی <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">کلیک‌های خودکار</translation>
-<translation id="1398853756734560583">بزرگ کردن</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: در حال اتصال...</translation>
-<translation id="252373100621549798">نمایش ناشناخته</translation>
-<translation id="1882897271359938046">بازتاب به <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">باتری به شارژر برق ضعیف متصل است. شارژ باتری ممکن است قابل اطمینان نباشد.</translation>
-<translation id="3784455785234192852">قفل</translation>
-<translation id="2805756323405976993">برنامه‌ها</translation>
-<translation id="1512064327686280138">نقص در فعالسازی</translation>
-<translation id="5097002363526479830">اتصال ناموفق به شبکه &quot;<ph name="NAME"/>&quot;:<ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">‏Wi-Fi خاموش است.</translation>
-<translation id="2966449113954629791">ممکن است کلیه میزان مجاز داده‌‌های دستگاه همراهتان را مصرف کرده باشید. برای خرید داده بیشتر از پورتال فعال‌سازی <ph name="NAME"/> بازدید کنید.</translation>
-<translation id="8132793192354020517">متصل به <ph name="NAME"/></translation>
-<translation id="7052914147756339792">تنظیم کاغذدیواری...</translation>
-<translation id="8678698760965522072">حالت آنلاین</translation>
-<translation id="2532589005999780174">حالت کنتراست بالا</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>، <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">خطای داخلی</translation>
-<translation id="3019353588588144572">زمان باقی مانده تا شارژ کامل باتری، <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">ذره‌بین صفحه</translation>
-<translation id="7005812687360380971">نقص</translation>
-<translation id="882279321799040148">برای مشاهده کلیک کنید</translation>
-<translation id="1753067873202720523">‏ممکن است Chromebook شما هنگام روشن بودن شارژ نشود.</translation>
-<translation id="5045550434625856497">گذرواژه نامعتبر</translation>
-<translation id="1602076796624386989">فعال کردن اطلاعات تلفن همراه</translation>
-<translation id="6981982820502123353">قابلیت دسترسی</translation>
-<translation id="3157931365184549694">بازیابی</translation>
-<translation id="4274292172790327596">خطای ناشناس</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">هدفون</translation>
-<translation id="225680501294068881">درحال جستجو برای دستگاه‌ها...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>، <ph name="DATE"/></translation>
-<translation id="737451040872859086">میکروفن (داخلی)</translation>
-<translation id="4448844063988177157">‏در حال جستجوی شبکه‌های Wi-Fi...</translation>
-<translation id="8401662262483418323">اتصال به «<ph name="NAME"/>» ناموفق بود: <ph name="DETAILS"/>
-پیام سرور: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">یک خطا روی داد</translation>
-<translation id="7229570126336867161">‏EVDO مورد نیاز است</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> یک جلسه عمومی مدیریت‌شده توسط <ph name="DOMAIN"/> است</translation>
-<translation id="9044646465488564462">اتصال به شبکه انجام نشد: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">خروج از جلسه</translation>
-<translation id="8454013096329229812">‏Wi-Fi روشن است.</translation>
-<translation id="4872237917498892622">‏Alt+جستجو یا Shift</translation>
-<translation id="9201131092683066720">باتری <ph name="PERCENTAGE"/> درصد پر است.</translation>
-<translation id="2983818520079887040">تنظیمات...</translation>
-<translation id="3871838685472846647">شبکه تلفن همراه فعال شد</translation>
-<translation id="1195412055398077112">بزرگتر از صفحه</translation>
-<translation id="112308213915226829">پنهان کردن خودکار قفسه</translation>
-<translation id="7573962313813535744">حالت اتصال به پایه</translation>
-<translation id="8927026611342028580">درخواست اتصال</translation>
-<translation id="8300849813060516376">‏OTASP انجام نشد</translation>
-<translation id="2792498699870441125">‏Alt+جستجو</translation>
-<translation id="8660803626959853127">در حال همگام‌سازی فایل(های) <ph name="COUNT"/></translation>
-<translation id="5958529069007801266">کاربر نظارت‌شده</translation>
-<translation id="3709443003275901162">+۹</translation>
-<translation id="639644700271529076">‏CAPS LOCK خاموش است</translation>
-<translation id="6248847161401822652">‏برای خروج Control‏، Shift و Q را دو بار فشار دهید.</translation>
-<translation id="6785414152754474415">باتری <ph name="PERCENTAGE"/> درصد پر و درحال شارژ است.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: در حال فعال‌سازی…</translation>
-<translation id="4895488851634969361">باتری پر است.</translation>
-<translation id="5947494881799873997">برگرداندن</translation>
-<translation id="7593891976182323525">‏جستجو یا Shift</translation>
-<translation id="7649070708921625228">راهنما</translation>
-<translation id="747833637904845037">‏مادامیکه Chromebook به یک نمایشگر خارجی متصل است روشن باقی می‌ماند، حتی اگر بسته باشد.</translation>
-<translation id="3050422059534974565">‏CAPS LOCK روشن است.
-جستجو یا Shift را برای لغو فشار دهید.</translation>
-<translation id="397105322502079400">در حال محاسبه…</translation>
-<translation id="158849752021629804">شبکه خانگی مورد نیاز است</translation>
-<translation id="6857811139397017780">فعال سازی <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">‏بررسی DHCP انجام نشد</translation>
-<translation id="6692173217867674490">کلمه عبور نادرست</translation>
-<translation id="6165508094623778733">بیشتر بیاموزید</translation>
-<translation id="9046895021617826162">اتصال برقرار نشد</translation>
-<translation id="7168224885072002358">برگرداندن به وضوح قدیمی در <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">این جلسه در <ph name="SESSION_TIME_REMAINING"/> به اتمام خواهد رسید. به طور خودکار از سیستم خارج خواهید شد.</translation>
-<translation id="8372369524088641025">‏کلید WEP نادرست</translation>
-<translation id="6636709850131805001">حالت ناشناس</translation>
-<translation id="3573179567135747900">به &quot;<ph name="FROM_LOCALE"/>&quot; تغییر دهید (به راه‌اندازی دوباره نیاز دارد)</translation>
-<translation id="8103386449138765447">پیامک‌ها: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">‏تنظیمات Google Drive...</translation>
-<translation id="7209101170223508707">‏CAPS LOCK روشن است.
-Alt+جستجو یا Shift را برای لغو فشار دهید.</translation>
-<translation id="8940956008527784070">باتری ضعیف است (<ph name="PERCENTAGE"/>٪)</translation>
-<translation id="4918086044614829423">پذیرش</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> باقیمانده است</translation>
-<translation id="3009178788565917040">خروجی</translation>
-<translation id="520760366042891468">‏اشتراک‌گذاری کنترل صفحه نمایش شما از طریق Hangouts.</translation>
-<translation id="8000066093800657092">بدون شبکه</translation>
-<translation id="4015692727874266537">ورود به سیستم با حسابی دیگر...</translation>
-<translation id="5941711191222866238">کوچک کردن</translation>
-<translation id="6911468394164995108">پیوستن به شبکه دیگر…</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">تبریک می‌گوییم! خدمات داده «<ph name="NAME"/>» شما فعال شده است و آماده استفاده است.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/>ساعت <ph name="MINUTE"/>دقیقه مانده تا باتری شارژ شود</translation>
-<translation id="7297443947353982503">‏نام کاربری/گذرواژه نادرست است یا احراز هویت EAP ناموفق بود</translation>
-<translation id="6359806961507272919">پیامک از <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">شرکت مخابراتی</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_fi.xtb b/chromium/ash/strings/ash_strings_fi.xtb
deleted file mode 100644
index 0f8f7aa8968..00000000000
--- a/chromium/ash/strings/ash_strings_fi.xtb
+++ /dev/null
@@ -1,228 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="fi">
-<translation id="3595596368722241419">Akku täynnä</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Portaalitila</translation>
-<translation id="30155388420722288">Overflow-painike</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth käytössä</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> käännettiin asentoon <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth pois käytöstä</translation>
-<translation id="7165320105431587207">Verkon asetuksien määrittäminen epäonnistui</translation>
-<translation id="3775358506042162758">Sinulla voi olla enintään kolme tiliä useaan tiliin kirjautuessasi.</translation>
-<translation id="370649949373421643">Ota wifi käyttöön</translation>
-<translation id="3626281679859535460">Kirkkaus</translation>
-<translation id="3621202678540785336">Äänitulo:</translation>
-<translation id="595202126637698455">Tehokkuuden seuranta on käytössä</translation>
-<translation id="8054466585765276473">Lasketaan akun kesto.</translation>
-<translation id="7982789257301363584">Verkko</translation>
-<translation id="5565793151875479467">Välityspalvelin...</translation>
-<translation id="938582441709398163">Näppäimistön peitto</translation>
-<translation id="4387004326333427325">Todennusvarmenne on hylätty etäyhteyden kautta</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">Ruudun <ph name="DISPLAY_NAME"/> tarkkuudeksi vaihdettiin <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">HTTP get -toiminto epäonnistui</translation>
-<translation id="2297568595583585744">Tila-alue</translation>
-<translation id="1661867754829461514">PIN-koodi puuttuu</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: Yhdistetään…</translation>
-<translation id="40400351611212369">Verkon aktivointivirhe</translation>
-<translation id="4237016987259239829">Verkon yhteysvirhe</translation>
-<translation id="2946640296642327832">Ota Bluetooth käyttöön</translation>
-<translation id="6459472438155181876">Ruutua laajennetaan: <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Matkapuhelin</translation>
-<translation id="6596816719288285829">IP-osoite</translation>
-<translation id="4508265954913339219">Aktivointi epäonnistui</translation>
-<translation id="3621712662352432595">Ääniasetukset</translation>
-<translation id="1812696562331527143">Syöttötapa on vaihtunut. Uusi syöttötapa on <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>kolmas osapuoli<ph name="END_LINK"/>).
-Vaihda syöttötapaa painamalla Shift + Alt.</translation>
-<translation id="2127372758936585790">Pienitehoinen laturi</translation>
-<translation id="3846575436967432996">Verkon tietoja ei saatavilla</translation>
-<translation id="3026237328237090306">Määritä mobiilitiedonsiirron asetukset</translation>
-<translation id="5871632337994001636">Hallinnoi laitteita…</translation>
-<translation id="785750925697875037">Näytä mobiilitili</translation>
-<translation id="153454903766751181">Alustetaan matkapuhelinmodeemia…</translation>
-<translation id="4628814525959230255">Näytönhallinnan jakaminen henkilön <ph name="HELPER_NAME"/> kanssa Hangout-keskustelujen kautta.</translation>
-<translation id="7864539943188674973">Poista Bluetooth käytöstä</translation>
-<translation id="939252827960237676">Kuvakaappauksen tallentaminen epäonnistui</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Päivitä käynnistämällä uudelleen</translation>
-<translation id="2268813581635650749">Kirjaa kaikki ulos</translation>
-<translation id="735745346212279324">VPN-yhteys katkaistu</translation>
-<translation id="7320906967354320621">Ei käytössä</translation>
-<translation id="15373452373711364">Suuri hiiren osoitin</translation>
-<translation id="3294437725009624529">Vieras</translation>
-<translation id="8190698733819146287">Muokkaa kieliä ja syötettä...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Hyllyn sijainti</translation>
-<translation id="8676770494376880701">Pienitehoinen laturi kytketty</translation>
-<translation id="7170041865419449892">Katvealueella</translation>
-<translation id="4804818685124855865">Katkaise yhteys</translation>
-<translation id="2544853746127077729">Verkko on hylännyt todennusvarmenteen</translation>
-<translation id="5222676887888702881">Kirjaudu ulos</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Määritykset</translation>
-<translation id="1272079795634619415">Pysäytä</translation>
-<translation id="4957722034734105353">Lisätietoja...</translation>
-<translation id="2964193600955408481">Wifi pois käytöstä</translation>
-<translation id="4279490309300973883">Peilaus päällä</translation>
-<translation id="7973962044839454485">PPP-todennus epäonnistui virheellisen käyttäjänimen tai salasanan vuoksi</translation>
-<translation id="2509468283778169019">CAPS LOCK on päällä</translation>
-<translation id="3892641579809465218">Sisäinen näyttö</translation>
-<translation id="7823564328645135659">Käyttökieli on muutettu kielestä <ph name="FROM_LOCALE"/> kieleksi <ph name="TO_LOCALE"/> asetustesi synkronoinnin yhteydessä.</translation>
-<translation id="3368922792935385530">Yhdistetty</translation>
-<translation id="8340999562596018839">Äänipalaute</translation>
-<translation id="8654520615680304441">Ota wifi käyttöön…</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Syöttötapa on vaihtunut. Uusi syöttötapa on <ph name="INPUT_METHOD_ID"/>.
-Vaihda syöttötapaa painamalla Shift + Alt.</translation>
-<translation id="2562916301614567480">Yksityinen verkko</translation>
-<translation id="6549021752953852991">Matkapuhelinverkkoja ei ole käytettävissä</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Arvoisa näyttö, suhteemme ei toimi. (Näyttöä ei tueta)</translation>
-<translation id="6426039856985689743">Poista mobiilitiedonsiirto käytöstä</translation>
-<translation id="3087734570205094154">Alaosa</translation>
-<translation id="3742055079367172538">Kuvakaappaus otettu</translation>
-<translation id="8878886163241303700">Laajennettu näyttö</translation>
-<translation id="5271016907025319479">VPN-verkon asetuksia ei ole määritetty.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Järjestelmänvalvoja on poistanut käytöstä mahdollisuuden ottaa kuvakaappauksia.</translation>
-<translation id="372094107052732682">Lopeta painamalla kahdesti Ctrl+Shift+Q.</translation>
-<translation id="6803622936009808957">Näyttöjen peilaaminen ei onnistunut, sillä tuettua resoluutiota ei löytynyt. Sen sijaan valittiin työpöydän laajennus.</translation>
-<translation id="1480041086352807611">Esittelytila</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/> % jäljellä</translation>
-<translation id="9089416786594320554">Syöttötavat</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/> %</translation>
-<translation id="2670531586141364277">Verkon <ph name="NAME"/> aktivointi vaatii verkkoyhteyden.</translation>
-<translation id="3963445509666917109">Kaiutin (sisäinen)</translation>
-<translation id="2825619548187458965">Hylly</translation>
-<translation id="2614835198358683673">Chromebookisi ei välttämättä lataudu sen ollessa päällä. Harkitse virallisen laturin käyttämistä.</translation>
-<translation id="1895658205118569222">Sulkeminen</translation>
-<translation id="4430019312045809116">Äänenvoimakkuus</translation>
-<translation id="8681498213689260554">Käynnistä laite uudelleen ja suorita powerwash asentaaksesi päivitykset</translation>
-<translation id="4442424173763614572">DNS-haku epäonnistui</translation>
-<translation id="7874779702599364982">Haetaan matkapuhelinverkkoja…</translation>
-<translation id="583281660410589416">Tuntematon</translation>
-<translation id="1383876407941801731">Haku</translation>
-<translation id="3901991538546252627">Yhdistetään verkkoon <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Verkon tiedot</translation>
-<translation id="1621499497873603021">Akku on tyhjä <ph name="TIME_LEFT"/> kuluttua</translation>
-<translation id="5980301590375426705">Sulje vierastila</translation>
-<translation id="8308637677604853869">Edellinen valikko</translation>
-<translation id="4666297444214622512">Toiseen tiliin kirjautuminen ei onnistunut.</translation>
-<translation id="3625258641415618104">Kuvakaappaukset poissa käytöstä</translation>
-<translation id="1346748346194534595">Oikealle</translation>
-<translation id="1773212559869067373">Todennusvarmenne on hylätty paikallisesti</translation>
-<translation id="8528322925433439945">Mobiiliverkot...</translation>
-<translation id="7049357003967926684">Yhdistäminen</translation>
-<translation id="8428213095426709021">Asetukset</translation>
-<translation id="2372145515558759244">Synkronoidaan sovelluksia...</translation>
-<translation id="7256405249507348194">Tunnistamaton virhe: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA-testi epäonnistui</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> kunnes akku on ladattu</translation>
-<translation id="5787281376604286451">Äänipalaute on käytössä.
-Poista se käytöstä painamalla Ctrl+Alt+Z.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Tuntematon verkkovirhe</translation>
-<translation id="1467432559032391204">Vasemmalle</translation>
-<translation id="5543001071567407895">Tekstiviesti</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Aktivoidaan <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wifi</translation>
-<translation id="1923539912171292317">Automaattiset klikkaukset</translation>
-<translation id="1398853756734560583">Suurenna</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: Yhdistetään…</translation>
-<translation id="252373100621549798">Tuntematon näyttö</translation>
-<translation id="1882897271359938046">Peilataan: <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Pienitehoinen laturi kytketty. Akku ei ehkä lataudu luotettavasti.</translation>
-<translation id="3784455785234192852">Lukitse</translation>
-<translation id="2805756323405976993">Sovellukset</translation>
-<translation id="1512064327686280138">Aktivointivirhe</translation>
-<translation id="5097002363526479830">Yhteyden muodostaminen verkkoon &quot;<ph name="NAME"/>&quot; epäonnistui: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wifi ei ole käytössä.</translation>
-<translation id="2966449113954629791">Olet saattanut käyttää tiedonsiirtosaldosi loppuun. Käy <ph name="NAME"/>-aktivointiportaalissa ostamassa lisää saldoa.</translation>
-<translation id="8132793192354020517">Yhteys muodostettu verkkoon <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Aseta taustakuva...</translation>
-<translation id="8678698760965522072">Online-tila</translation>
-<translation id="2532589005999780174">Suuri kontrasti -tila</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Sisäinen virhe</translation>
-<translation id="3019353588588144572">Akku on ladattu <ph name="TIME_REMAINING"/> kuluttua</translation>
-<translation id="3473479545200714844">Ruudun suurentaminen</translation>
-<translation id="7005812687360380971">Virhe</translation>
-<translation id="882279321799040148">Näytä klikkaamalla</translation>
-<translation id="1753067873202720523">Chromebook ei välttämättä lataudu sen ollessa päällä.</translation>
-<translation id="5045550434625856497">Väärä salasana</translation>
-<translation id="1602076796624386989">Ota mobiilitiedonsiirto käyttöön</translation>
-<translation id="6981982820502123353">Esteettömyys</translation>
-<translation id="3157931365184549694">Palauta</translation>
-<translation id="4274292172790327596">Tunnistamaton virhe</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>.<ph name="MINUTES"/>.<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Kuulokkeet</translation>
-<translation id="225680501294068881">Etsitään laitteita...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Mikrofoni (sisäinen)</translation>
-<translation id="4448844063988177157">Haetaan wifi-verkkoja...</translation>
-<translation id="8401662262483418323">Yhteyden muodostaminen kohteeseen <ph name="NAME"/> ei onnistu: <ph name="DETAILS"/>
-Palvelimen viesti: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Tapahtui virhe</translation>
-<translation id="7229570126336867161">EVDO tarvitaan</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> on julkinen käyttökerta, jota hallinnoi <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Yhteyden muodostaminen verkkoon epäonnistui: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Sulje käyttökerta</translation>
-<translation id="8454013096329229812">Wifi on käytössä.</translation>
-<translation id="4872237917498892622">Alt + haku tai Shift</translation>
-<translation id="9201131092683066720">Akussa on virtaa <ph name="PERCENTAGE"/> %.</translation>
-<translation id="2983818520079887040">Asetukset...</translation>
-<translation id="3871838685472846647">Matkapuhelin aktivoitu</translation>
-<translation id="1195412055398077112">kuvasta rajataan pois osa</translation>
-<translation id="112308213915226829">Piilota hylly automaattisesti</translation>
-<translation id="7573962313813535744">Telakoitu tila</translation>
-<translation id="8927026611342028580">Yhdistä pyydetyt</translation>
-<translation id="8300849813060516376">OTASP epäonnistui</translation>
-<translation id="2792498699870441125">Alt + haku</translation>
-<translation id="8660803626959853127">Synkronoidaan <ph name="COUNT"/> tiedosto(a)</translation>
-<translation id="5958529069007801266">Valvottu käyttäjä</translation>
-<translation id="3709443003275901162">Yli 9</translation>
-<translation id="639644700271529076">CAPS LOCK on pois päältä</translation>
-<translation id="6248847161401822652">Lopeta painamalla kahdesti Control Shift Q.</translation>
-<translation id="6785414152754474415">Akussa on virtaa <ph name="PERCENTAGE"/> %, ja laite on kytketty laturiin.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: aktivoidaan…</translation>
-<translation id="4895488851634969361">Akku on täynnä.</translation>
-<translation id="5947494881799873997">Palauta</translation>
-<translation id="7593891976182323525">Haku tai Shift</translation>
-<translation id="7649070708921625228">Ohje</translation>
-<translation id="747833637904845037">Chromebookisi pysyy yhdistettynä ulkoiseen näyttöön, vaikka sen kansi olisi suljettu.</translation>
-<translation id="3050422059534974565">CAPS LOCK on päällä. Peruuta painamalla haku- tai Shift-näppäintä.</translation>
-<translation id="397105322502079400">Lasketaan...</translation>
-<translation id="158849752021629804">Kotiverkko tarvitaan</translation>
-<translation id="6857811139397017780">Aktivoi <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">DHCP-haku epäonnistui</translation>
-<translation id="6692173217867674490">Väärä tunnuslause</translation>
-<translation id="6165508094623778733">Lisätietoja</translation>
-<translation id="9046895021617826162">Yhdistäminen epäonnistui</translation>
-<translation id="7168224885072002358">Palautetaan vanha tarkkuus, aikaa palautukseen <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Istunnon loppumiseen on <ph name="SESSION_TIME_REMAINING"/>. Sinut kirjataan automaattisesti ulos.</translation>
-<translation id="8372369524088641025">Väärä WEP-avain</translation>
-<translation id="6636709850131805001">Tunnistamaton tila</translation>
-<translation id="3573179567135747900">Vaihda takaisin kieleksi <ph name="FROM_LOCALE"/> (vaatii uudelleenkäynnistyksen)</translation>
-<translation id="8103386449138765447">Tekstiviestit: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Google Driven asetukset...</translation>
-<translation id="7209101170223508707">CAPS LOCK on päällä. Peruuta painamalla Alt + hakupainike tai Shift.</translation>
-<translation id="8940956008527784070">Akku vähissä (<ph name="PERCENTAGE"/> %)</translation>
-<translation id="4918086044614829423">Hyväksy</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>.<ph name="MINUTE"/> jäljellä</translation>
-<translation id="3009178788565917040">Äänentoisto</translation>
-<translation id="520760366042891468">Näytön hallinnan jakaminen Hangout-keskustelujen kautta.</translation>
-<translation id="8000066093800657092">Ei verkkoa</translation>
-<translation id="4015692727874266537">Kirjaudu sisään toiseen tiliin…</translation>
-<translation id="5941711191222866238">Pienennä</translation>
-<translation id="6911468394164995108">Liity muuhun verkkoon...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Onnittelut! Tiedonsiirtopalvelusi <ph name="NAME"/> on aktivoitu ja käyttövalmis.</translation>
-<translation id="412065659894267608">Akku täynnä <ph name="HOUR"/> t <ph name="MINUTE"/> min kuluttua</translation>
-<translation id="7297443947353982503">Käyttäjänimi/salasana on virheellinen tai EAP-todennus epäonnistui</translation>
-<translation id="6359806961507272919">Tekstiviesti lähettäjältä <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Operaattori</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_fil.xtb b/chromium/ash/strings/ash_strings_fil.xtb
deleted file mode 100644
index f84b85ee497..00000000000
--- a/chromium/ash/strings/ash_strings_fil.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="fil">
-<translation id="3595596368722241419">Puno na ang baterya</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> at <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Katayuan ng portal</translation>
-<translation id="30155388420722288">Button na Overflow</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Pinapagana ang Bluetooth</translation>
-<translation id="6310121235600822547">Na-rotate ang <ph name="DISPLAY_NAME"/> sa <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Hindi pinagana ang Bluetooth</translation>
-<translation id="7165320105431587207">Nabigong ma-configure ang network</translation>
-<translation id="3775358506042162758">Maaari ka lang magkaroon ng hanggang sa tatlong account sa multiple na pag-sign-in.</translation>
-<translation id="370649949373421643">Paganahin ang Wi-Fi</translation>
-<translation id="3626281679859535460">Tingkad</translation>
-<translation id="3621202678540785336">Input</translation>
-<translation id="595202126637698455">Naka-enable ang pagte-trace sa pagganap</translation>
-<translation id="8054466585765276473">Kinakalkula ang oras ng baterya.</translation>
-<translation id="7982789257301363584">Network</translation>
-<translation id="5565793151875479467">Proxy...</translation>
-<translation id="938582441709398163">Overlay ng Keyboard</translation>
-<translation id="4387004326333427325">Remote na tinanggihan ang certificate sa pagpapatunay</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">Ginawang <ph name="RESOLUTION"/> ang resolution ng <ph name="DISPLAY_NAME"/></translation>
-<translation id="6943836128787782965">Nabigo ang pagkuha ng HTTP</translation>
-<translation id="2297568595583585744">Tray ng katayuan</translation>
-<translation id="1661867754829461514">Nawawala ang PIN</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: Kumokonekta...</translation>
-<translation id="40400351611212369">Error sa Pag-activate ng Network</translation>
-<translation id="4237016987259239829">Error sa Koneksyon ng Network</translation>
-<translation id="2946640296642327832">Paganahin ang Bluetooth</translation>
-<translation id="6459472438155181876">Pinapalawak ang screen sa <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Cellular</translation>
-<translation id="6596816719288285829">IP Address</translation>
-<translation id="4508265954913339219">Nabigo ang pag-activate</translation>
-<translation id="3621712662352432595">Mga Setting ng Audio</translation>
-<translation id="1812696562331527143">Naging <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>3rd party<ph name="END_LINK"/>) ang iyong pamamaraan ng pag-input.
-Pindutin ang Shift + Alt upang magpalit.</translation>
-<translation id="2127372758936585790">Low-power charger</translation>
-<translation id="3846575436967432996">Walang available na impormasyon sa network</translation>
-<translation id="3026237328237090306">I-setup ang mobile data</translation>
-<translation id="5871632337994001636">Pamahalaan ang mga device...</translation>
-<translation id="785750925697875037">Tingnan ang account sa mobile</translation>
-<translation id="153454903766751181">Sinisimulan ang cellular na modem...</translation>
-<translation id="4628814525959230255">Ibinahagi ang kontrol sa iyong screen kay <ph name="HELPER_NAME"/> sa pamamagitan ng Hangouts.</translation>
-<translation id="7864539943188674973">Huwag Paganahin ang Bluetooth</translation>
-<translation id="939252827960237676">Nabigong i-save ang screenshot</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">I-restart upang mag-update</translation>
-<translation id="2268813581635650749">I-sign out ang lahat</translation>
-<translation id="735745346212279324">Nakadiskonekta ang VPN</translation>
-<translation id="7320906967354320621">Hindi Ginagamit</translation>
-<translation id="15373452373711364">Malaking mouse cursor</translation>
-<translation id="3294437725009624529">Bisita</translation>
-<translation id="8190698733819146287">I-customize ang mga wika at input...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Posisyon ng shelf</translation>
-<translation id="8676770494376880701">Nakakabit ang low-power charger</translation>
-<translation id="7170041865419449892">Wala sa sakop</translation>
-<translation id="4804818685124855865">I-disconnect</translation>
-<translation id="2544853746127077729">Tinanggihan ng network ang certificate sa pagpapatunay</translation>
-<translation id="5222676887888702881">Mag-sign out</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Configuration</translation>
-<translation id="1272079795634619415">Stop</translation>
-<translation id="4957722034734105353">Matuto nang higit pa...</translation>
-<translation id="2964193600955408481">Huwag paganahin ang Wi-Fi</translation>
-<translation id="4279490309300973883">Nagmi-mirror</translation>
-<translation id="7973962044839454485">Nabigo ang pagpapatotoo sa PPP dahil sa hindi tamang username o password</translation>
-<translation id="2509468283778169019">Naka-on ang CAPS LOCK</translation>
-<translation id="3892641579809465218">Panloob na Display</translation>
-<translation id="7823564328645135659">Nagbago ang wika mula &quot;<ph name="FROM_LOCALE"/>&quot; patungong &quot;<ph name="TO_LOCALE"/>&quot; pagkatapos i-sync ang iyong mga setting.</translation>
-<translation id="3368922792935385530">Nakakonekta</translation>
-<translation id="8340999562596018839">Pasalitang feedback</translation>
-<translation id="8654520615680304441">I-on ang Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Naging <ph name="INPUT_METHOD_ID"/> ang iyong pamamaraan ng pag-input.
-Pindutin ang Shift + Alt upang magpalit.</translation>
-<translation id="2562916301614567480">Pribadong Network</translation>
-<translation id="6549021752953852991">Walang available na cellular na network</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Dear Monitor, it's not working out between us. (Hindi sinusuportahan ang monitor na iyan)</translation>
-<translation id="6426039856985689743">Huwag paganahin ang mobile data</translation>
-<translation id="3087734570205094154">Sa ilalim</translation>
-<translation id="3742055079367172538">Nakakuha na ng screenshot</translation>
-<translation id="8878886163241303700">Pinapalawak ang screen</translation>
-<translation id="5271016907025319479">Hindi naka-configure ang VPN.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Na-disable ng iyong administrator ang kakayahang kumuha ng mga screenshot.</translation>
-<translation id="372094107052732682">Pindutin ang Ctrl+Shift+Q nang dalawang beses upang lumabas.</translation>
-<translation id="6803622936009808957">Hindi ma-mirror ang mga display dahil walang mga sinusuportahang resolusyon na nakita. Pumasok na lang sa pinalawak na desktop.</translation>
-<translation id="1480041086352807611">Mode ng demo</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% ang natitira</translation>
-<translation id="9089416786594320554">Mga pamamaraan ng pag-input</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">Nangangailangan ng koneksyon sa network ang pag-activate ng '<ph name="NAME"/>.'</translation>
-<translation id="3963445509666917109">Speaker (Internal)</translation>
-<translation id="2825619548187458965">Shelf</translation>
-<translation id="2614835198358683673">Maaaring hindi mag-charge ang iyong Chromebook habang naka-on ito. Pag-isipang gamitin ang opisyal na charger.</translation>
-<translation id="1895658205118569222">Shutdown</translation>
-<translation id="4430019312045809116">Volume</translation>
-<translation id="8681498213689260554">I-restart at I-powerwash upang ma-update</translation>
-<translation id="4442424173763614572">Nabigo ang paghahanap sa DNS</translation>
-<translation id="7874779702599364982">Naghahanap ng mga cellular network...</translation>
-<translation id="583281660410589416">Hindi kilala</translation>
-<translation id="1383876407941801731">Paghahanap</translation>
-<translation id="3901991538546252627">Kumokonekta sa <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Impormasyon ng Network</translation>
-<translation id="1621499497873603021">Natitirang oras bago maubos ang baterya, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Lumabas sa session ng bisita</translation>
-<translation id="8308637677604853869">Nakaraang menu</translation>
-<translation id="4666297444214622512">Hindi makaka-sign in sa isa pang account.</translation>
-<translation id="3625258641415618104">Naka-disable ang mga screenshot</translation>
-<translation id="1346748346194534595">Kanan</translation>
-<translation id="1773212559869067373">Lokal na tinanggihan ang certificate ng pagpapatunay</translation>
-<translation id="8528322925433439945">Mobile ...</translation>
-<translation id="7049357003967926684">Kaugnayan</translation>
-<translation id="8428213095426709021">Mga Setting</translation>
-<translation id="2372145515558759244">Nagsi-sync ng apps...</translation>
-<translation id="7256405249507348194">Hindi nakikilalang error: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Nabigo ang pagsusuri sa AAA</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> hanggang mapuno</translation>
-<translation id="5787281376604286451">Pinagana ang pasalitang feedback.
-Pindutin ang Ctrl+Alt+Z upang huwag paganahin.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Hindi alam na error sa network</translation>
-<translation id="1467432559032391204">Kaliwa</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Ina-activate ang <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Mga awtomatikong pag-click</translation>
-<translation id="1398853756734560583">Maximize</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: Kumokonekta...</translation>
-<translation id="252373100621549798">Hindi Kilalang Display</translation>
-<translation id="1882897271359938046">Nagmi-mirror sa <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Naka-saksak sa isang low-power charger. Maaaring hindi maging tiyak ang pag-charge ng baterya.</translation>
-<translation id="3784455785234192852">I-lock</translation>
-<translation id="2805756323405976993">Apps</translation>
-<translation id="1512064327686280138">Pagkabigo ng pag-activate</translation>
-<translation id="5097002363526479830">Nabigong kumonekta sa network na '<ph name="NAME"/>': <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Naka-off ang Wi-Fi.</translation>
-<translation id="2966449113954629791">Maaaring naubos mo na ang iyong allowance sa mobile data. Bisitahin ang activation portal ng <ph name="NAME"/> upang bumili ng higit pang data.</translation>
-<translation id="8132793192354020517">Kumukonekta sa <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Magtakda ng wallpaper...</translation>
-<translation id="8678698760965522072">Katayuan online</translation>
-<translation id="2532589005999780174">High contrast mode</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Panloob na error</translation>
-<translation id="3019353588588144572">Natitirang oras bago ganap na ma-charge ang baterya, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Screen magnifier</translation>
-<translation id="7005812687360380971">Bigo</translation>
-<translation id="882279321799040148">I-click upang tingnan</translation>
-<translation id="1753067873202720523">Maaaring hindi mag-charge ang iyong Chromebook habang naka-on ito.</translation>
-<translation id="5045550434625856497">Hindi wastong password</translation>
-<translation id="1602076796624386989">Paganahin ang mobile data</translation>
-<translation id="6981982820502123353">Accessibility</translation>
-<translation id="3157931365184549694">Ipanumbalik</translation>
-<translation id="4274292172790327596">Di-kilalang error</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Headphone</translation>
-<translation id="225680501294068881">Nag-i-scan para sa mga device...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Microphone (Panloob)</translation>
-<translation id="4448844063988177157">Naghahanap ng mga network na Wi-Fi...</translation>
-<translation id="8401662262483418323">Nabigong kumonekta sa '<ph name="NAME"/>': <ph name="DETAILS"/>
-Mensahe mula sa server: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">May isang naganap na error</translation>
-<translation id="7229570126336867161">Kailangan ng EVDO</translation>
-<translation id="2999742336789313416">Ang <ph name="DISPLAY_NAME"/> ay isang pampublikong session na pinamamahalaan ng <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Nabigong kumonekta sa network: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Lumabas sa session</translation>
-<translation id="8454013096329229812">Naka-on ang Wi-Fi.</translation>
-<translation id="4872237917498892622">Alt+Search o Shift</translation>
-<translation id="9201131092683066720">Ang baterya ay <ph name="PERCENTAGE"/>% na puno.</translation>
-<translation id="2983818520079887040">Mga Setting...</translation>
-<translation id="3871838685472846647">Na-activate ang Cellular</translation>
-<translation id="1195412055398077112">overscan</translation>
-<translation id="112308213915226829">Awtomatikong itago ang shelf</translation>
-<translation id="7573962313813535744">Mode na naka-dock</translation>
-<translation id="8927026611342028580">Hiniling ang Koneksyon</translation>
-<translation id="8300849813060516376">Nabigo ang OTASP</translation>
-<translation id="2792498699870441125">Alt+Search</translation>
-<translation id="8660803626959853127">Nagsi-sync ng <ph name="COUNT"/> (na) file</translation>
-<translation id="5958529069007801266">Pinangangasiwaang user</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">Naka-off ang CAPS LOCK</translation>
-<translation id="6248847161401822652">Pindutin ang Control Shift Q nang dalawang beses upang lumabas.</translation>
-<translation id="6785414152754474415">Ang baterya ay <ph name="PERCENTAGE"/>% na puno at nagcha-charge.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Ina-activate...</translation>
-<translation id="4895488851634969361">Puno na ang baterya.</translation>
-<translation id="5947494881799873997">I-revert</translation>
-<translation id="7593891976182323525">Search or Shift</translation>
-<translation id="7649070708921625228">Tulong</translation>
-<translation id="747833637904845037">Mananatiling naka-on ang iyong Chromebook habang nakakonekta sa isang external na display, kahit na nakasara ang takip.</translation>
-<translation id="3050422059534974565">Naka-on ang CAPS LOCK.
-Pindutin ang Search o Shift upang kanselahin.</translation>
-<translation id="397105322502079400">Kinakalkula...</translation>
-<translation id="158849752021629804">Kailangan ng home network</translation>
-<translation id="6857811139397017780">I-activate <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Nabigo ang paghanap ng DHCP</translation>
-<translation id="6692173217867674490">Mahinang passphrase</translation>
-<translation id="6165508094623778733">Matuto nang higit pa</translation>
-<translation id="9046895021617826162">Nabigo ang pagkonekta</translation>
-<translation id="7168224885072002358">Magre-revert sa lumang resolution sa loob ng <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Magtatapos ang session na ito sa <ph name="SESSION_TIME_REMAINING"/>. Awtomatiko kang masa-sign out.</translation>
-<translation id="8372369524088641025">Mahinang WEP key</translation>
-<translation id="6636709850131805001">Di-kilalang katayuan</translation>
-<translation id="3573179567135747900">Palitan pabalik sa &quot;<ph name="FROM_LOCALE"/>&quot; (kailangang i-restart)</translation>
-<translation id="8103386449138765447">Mga mensaheng SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Mga setting ng Google Drive ...</translation>
-<translation id="7209101170223508707">Naka-on ang CAPS LOCK.
-Pindutin ang Alt+Search o Shift upang kanselahin.</translation>
-<translation id="8940956008527784070">Mahina na ang baterya (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Tanggapin</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> ang natitira</translation>
-<translation id="3009178788565917040">Output</translation>
-<translation id="520760366042891468">Ibinahagi ang kontrol sa iyong screen sa pamamagitan ng Hangouts.</translation>
-<translation id="8000066093800657092">Walang network</translation>
-<translation id="4015692727874266537">Mag-sign sa isa pang account...</translation>
-<translation id="5941711191222866238">Minimize</translation>
-<translation id="6911468394164995108">Sumali sa iba...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Binabati kita! Na-activate ang iyong serbisyo ng data ng '<ph name="NAME"/>' at handa nang gamitin.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/>o <ph name="MINUTE"/>m hanggang mapuno</translation>
-<translation id="7297443947353982503">Mali ang username/password o nabigo ang EAP-auth</translation>
-<translation id="6359806961507272919">SMS mula kay <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Carrier</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_fr.xtb b/chromium/ash/strings/ash_strings_fr.xtb
deleted file mode 100644
index b9c27e72edd..00000000000
--- a/chromium/ash/strings/ash_strings_fr.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="fr">
-<translation id="3595596368722241419">Batterie pleine</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> et <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">État du portail</translation>
-<translation id="30155388420722288">Bouton de dépassement de capacité</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth activé</translation>
-<translation id="6310121235600822547">L'écran &quot;<ph name="DISPLAY_NAME"/>&quot; a effectué une rotation de <ph name="ROTATION"/>.</translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth désactivé</translation>
-<translation id="7165320105431587207">Échec de la configuration du réseau.</translation>
-<translation id="3775358506042162758">Vous ne pouvez vous connecter qu'à trois comptes au maximum dans le cadre de la connexion multicompte.</translation>
-<translation id="370649949373421643">Activer le Wi-Fi</translation>
-<translation id="3626281679859535460">Luminosité</translation>
-<translation id="3621202678540785336">Entrée</translation>
-<translation id="595202126637698455">Suivi des performances activé</translation>
-<translation id="8054466585765276473">Calcul de l'autonomie de la batterie en cours…</translation>
-<translation id="7982789257301363584">Réseau</translation>
-<translation id="5565793151875479467">Proxy…</translation>
-<translation id="938582441709398163">Clavier en superposition</translation>
-<translation id="4387004326333427325">Certificat d'authentification rejeté à distance.</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">La résolution de l'écran &quot;<ph name="DISPLAY_NAME"/>&quot; est désormais définie sur <ph name="RESOLUTION"/>.</translation>
-<translation id="6943836128787782965">Échec de l'obtention HTTP.</translation>
-<translation id="2297568595583585744">Barre d'état</translation>
-<translation id="1661867754829461514">Code secret manquant</translation>
-<translation id="4508225577814909926"><ph name="NAME"/> : Connexion en cours…</translation>
-<translation id="40400351611212369">Erreur d'activation réseau</translation>
-<translation id="4237016987259239829">Erreur de connexion réseau</translation>
-<translation id="2946640296642327832">Activer le Bluetooth</translation>
-<translation id="6459472438155181876">Extension de l'écran pour <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Mobile</translation>
-<translation id="6596816719288285829">Adresse IP</translation>
-<translation id="4508265954913339219">Échec de l'activation</translation>
-<translation id="3621712662352432595">Paramètres audio</translation>
-<translation id="1812696562331527143">Votre mode de saisie a été remplacé par <ph name="INPUT_METHOD_ID"/>* (<ph name="BEGIN_LINK"/>tiers<ph name="END_LINK"/>).
-Appuyez sur Maj + Alt pour en utiliser un autre.</translation>
-<translation id="2127372758936585790">Chargeur de faible puissance</translation>
-<translation id="3846575436967432996">Aucune information disponible concernant le réseau</translation>
-<translation id="3026237328237090306">Configurer les données mobiles</translation>
-<translation id="5871632337994001636">Gérer les appareils…</translation>
-<translation id="785750925697875037">Afficher le compte mobile</translation>
-<translation id="153454903766751181">Initialisation du modem cellulaire en cours…</translation>
-<translation id="4628814525959230255">Partage du contrôle de votre écran avec <ph name="HELPER_NAME"/> via Hangouts</translation>
-<translation id="7864539943188674973">Désactiver le Bluetooth</translation>
-<translation id="939252827960237676">Échec d'enregistrement de la capture d'écran.</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Redémarrez pour mettre à jour</translation>
-<translation id="2268813581635650749">Déconnecter tous les utilisateurs</translation>
-<translation id="735745346212279324">VPN déconnecté</translation>
-<translation id="7320906967354320621">Inactif</translation>
-<translation id="15373452373711364">Grand curseur</translation>
-<translation id="3294437725009624529">Invité</translation>
-<translation id="8190698733819146287">Personnaliser les langues et la saisie...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Position de l'étagère</translation>
-<translation id="8676770494376880701">Chargeur de faible puissance connecté</translation>
-<translation id="7170041865419449892">Hors de portée</translation>
-<translation id="4804818685124855865">Se déconnecter</translation>
-<translation id="2544853746127077729">Certificat d'authentification rejeté par le réseau.</translation>
-<translation id="5222676887888702881">Déconnexion</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Configuration en cours</translation>
-<translation id="1272079795634619415">Arrêter</translation>
-<translation id="4957722034734105353">En savoir plus…</translation>
-<translation id="2964193600955408481">Désactiver le réseau Wi-Fi</translation>
-<translation id="4279490309300973883">Mise en miroir</translation>
-<translation id="7973962044839454485">Échec de l'authentification PPP en raison de la saisie d'un nom d'utilisateur ou d'un mot de passe erronés.</translation>
-<translation id="2509468283778169019">Touche VERR MAJ activée</translation>
-<translation id="3892641579809465218">Affichage interne</translation>
-<translation id="7823564328645135659">La langue utilisée est passée de &quot;<ph name="FROM_LOCALE"/>&quot; à &quot;<ph name="TO_LOCALE"/>&quot; après la synchronisation de vos paramètres.</translation>
-<translation id="3368922792935385530">Connecté</translation>
-<translation id="8340999562596018839">Commentaires audio</translation>
-<translation id="8654520615680304441">Activer le Wi-Fi…</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Votre mode de saisie a été remplacé par <ph name="INPUT_METHOD_ID"/>.
-Appuyez sur Maj + Alt pour en utiliser un autre.</translation>
-<translation id="2562916301614567480">Réseau privé</translation>
-<translation id="6549021752953852991">Aucun réseau mobile disponible</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Moniteur non compatible.</translation>
-<translation id="6426039856985689743">Désactiver les données mobiles</translation>
-<translation id="3087734570205094154">Bas</translation>
-<translation id="3742055079367172538">Capture d'écran réalisée</translation>
-<translation id="8878886163241303700">Extension de l'écran</translation>
-<translation id="5271016907025319479">VPN non configuré</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Votre administrateur a désactivé la fonctionnalité de capture d'écran.</translation>
-<translation id="372094107052732682">Pour quitter, appuyez deux fois sur Ctrl+Maj+Q.</translation>
-<translation id="6803622936009808957">Impossible de dupliquer les écrans, car aucune résolution compatible n'a été détectée. Le bureau étendu a été activé à la place.</translation>
-<translation id="1480041086352807611">Mode démonstration</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/> % restant(s)</translation>
-<translation id="9089416786594320554">Modes de saisie</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/> %</translation>
-<translation id="2670531586141364277">L'activation de &quot;<ph name="NAME"/>&quot; nécessite une connexion réseau.</translation>
-<translation id="3963445509666917109">Haut-parleur (interne)</translation>
-<translation id="2825619548187458965">Étagère</translation>
-<translation id="2614835198358683673">Votre Chromebook risque de ne pas charger lorsqu'il est allumé. Utilisez plutôt le chargeur officiel.</translation>
-<translation id="1895658205118569222">Arrêt.</translation>
-<translation id="4430019312045809116">Volume</translation>
-<translation id="8681498213689260554">Redémarrer, puis lancer Powerwash pour mettre à jour le système</translation>
-<translation id="4442424173763614572">Échec de la résolution DNS.</translation>
-<translation id="7874779702599364982">Recherche de réseaux cellulaires en cours…</translation>
-<translation id="583281660410589416">Inconnu</translation>
-<translation id="1383876407941801731">Recherche</translation>
-<translation id="3901991538546252627">Connexion à <ph name="NAME"/> en cours…</translation>
-<translation id="2204305834655267233">Informations réseau</translation>
-<translation id="1621499497873603021">Temps restant avant que la batterie ne soit vide : <ph name="TIME_LEFT"/>.</translation>
-<translation id="5980301590375426705">Fermer la session Invité</translation>
-<translation id="8308637677604853869">Menu précédent</translation>
-<translation id="4666297444214622512">Impossible de se connecter à un autre compte.</translation>
-<translation id="3625258641415618104">Captures d'écran désactivées</translation>
-<translation id="1346748346194534595">Vers la droite</translation>
-<translation id="1773212559869067373">Certificat d'authentification rejeté en local.</translation>
-<translation id="8528322925433439945">Mobile…</translation>
-<translation id="7049357003967926684">Association</translation>
-<translation id="8428213095426709021">Paramètres</translation>
-<translation id="2372145515558759244">Synchronisation des applications…</translation>
-<translation id="7256405249507348194">Erreur non reconnue : <ph name="DESC"/>.</translation>
-<translation id="7925247922861151263">Échec de la vérification AAA</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> de chargement</translation>
-<translation id="5787281376604286451">Les commentaires audio sont activés.
-Appuyez sur les touches Ctrl+Alt+Z pour les désactiver.</translation>
-<translation id="4479639480957787382">Ethernet </translation>
-<translation id="6312403991423642364">Erreur de réseau inconnue.</translation>
-<translation id="1467432559032391204">Vers la gauche</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Activation du réseau <ph name="NAME"/> en cours…</translation>
-<translation id="8814190375133053267">Wi-Fi </translation>
-<translation id="1923539912171292317">Clics automatiques</translation>
-<translation id="1398853756734560583">Agrandir</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/> : Connexion en cours…</translation>
-<translation id="252373100621549798">Écran inconnu</translation>
-<translation id="1882897271359938046">Mise en miroir pour <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">L'appareil est branché à un chargeur de faible puissance. Il se peut que la charge ne soit pas fiable.</translation>
-<translation id="3784455785234192852">Verrouiller</translation>
-<translation id="2805756323405976993">Applications</translation>
-<translation id="1512064327686280138">Échec de l'activation</translation>
-<translation id="5097002363526479830">Échec de la connexion au réseau &quot;<ph name="NAME"/>&quot; : <ph name="DETAILS"/>.</translation>
-<translation id="1850504506766569011">Le Wi-Fi est désactivé.</translation>
-<translation id="2966449113954629791">Il semble que vous ayez utilisé l'intégralité de votre quota de données mobiles. Accédez au portail d'activation <ph name="NAME"/> pour acheter des données supplémentaires.</translation>
-<translation id="8132793192354020517">Connecté à <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Définir un fond d'écran…</translation>
-<translation id="8678698760965522072">En ligne</translation>
-<translation id="2532589005999780174">Mode Contraste élevé</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Erreur interne.</translation>
-<translation id="3019353588588144572">Temps restant avant chargement complet de la batterie : <ph name="TIME_REMAINING"/>.</translation>
-<translation id="3473479545200714844">Loupe</translation>
-<translation id="7005812687360380971">Défaillance</translation>
-<translation id="882279321799040148">Cliquer ici pour afficher la capture d'écran</translation>
-<translation id="1753067873202720523">Votre Chromebook risque de ne pas se charger lorsqu'il est allumé.</translation>
-<translation id="5045550434625856497">Mot de passe incorrect.</translation>
-<translation id="1602076796624386989">Activer les données mobiles</translation>
-<translation id="6981982820502123353">Accessibilité</translation>
-<translation id="3157931365184549694">Restaurer</translation>
-<translation id="4274292172790327596">Erreur non reconnue</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Casque</translation>
-<translation id="225680501294068881">Recherche d'appareils en cours…</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/> <ph name="DATE"/></translation>
-<translation id="737451040872859086">Micro (interne)</translation>
-<translation id="4448844063988177157">Recherche de réseaux Wi-Fi...</translation>
-<translation id="8401662262483418323">Échec de la connexion à &quot;<ph name="NAME"/>&quot; : <ph name="DETAILS"/>.
-Message du serveur : <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Une erreur s'est produite.</translation>
-<translation id="7229570126336867161">Technologie EvDo requise</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> est une session publique gérée par <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Échec de la connexion au réseau : <ph name="DETAILS"/>.</translation>
-<translation id="7029814467594812963">Quitter la session</translation>
-<translation id="8454013096329229812">Le Wi-Fi est activé.</translation>
-<translation id="4872237917498892622">Alt + Recherche ou Maj</translation>
-<translation id="9201131092683066720">La batterie est chargée à <ph name="PERCENTAGE"/> %.</translation>
-<translation id="2983818520079887040">Paramètres...</translation>
-<translation id="3871838685472846647">Cellulaire activé</translation>
-<translation id="1195412055398077112">Surbalayage</translation>
-<translation id="112308213915226829">Masquer automatiquement l'étagère</translation>
-<translation id="7573962313813535744">Mode Dock</translation>
-<translation id="8927026611342028580">Connexion demandée</translation>
-<translation id="8300849813060516376">Échec de l'opération OTASP</translation>
-<translation id="2792498699870441125">Alt + Recherche</translation>
-<translation id="8660803626959853127">Synchronisation de <ph name="COUNT"/> fichier(s) en cours…</translation>
-<translation id="5958529069007801266">Utilisateur supervisé</translation>
-<translation id="3709443003275901162">Plus de 9</translation>
-<translation id="639644700271529076">La touche de verrouillage des majuscules est désactivée.</translation>
-<translation id="6248847161401822652">Pour quitter, appuyez deux fois sur Ctrl+Maj+Q.</translation>
-<translation id="6785414152754474415">La batterie est chargée à <ph name="PERCENTAGE"/> % et en charge.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/> : activation en cours…</translation>
-<translation id="4895488851634969361">La batterie est pleine.</translation>
-<translation id="5947494881799873997">Rétablir</translation>
-<translation id="7593891976182323525">Recherche ou Maj</translation>
-<translation id="7649070708921625228">Aide</translation>
-<translation id="747833637904845037">Votre Chromebook reste allumé tant qu'il est connecté à un écran externe, même avec le capot fermé.</translation>
-<translation id="3050422059534974565">Le VERROUILLAGE DES MAJUSCULES est activé.
-Appuyez sur Search ou Maj pour le désactiver.</translation>
-<translation id="397105322502079400">Calcul en cours…</translation>
-<translation id="158849752021629804">Réseau domestique requis</translation>
-<translation id="6857811139397017780">Activer <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Échec de la vérification DHCP</translation>
-<translation id="6692173217867674490">Mot de passe multiterme erroné</translation>
-<translation id="6165508094623778733">En savoir plus</translation>
-<translation id="9046895021617826162">Échec de la connexion</translation>
-<translation id="7168224885072002358">Rétablissement de la résolution précédente dans <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Cette session se terminera dans <ph name="SESSION_TIME_REMAINING"/>. Vous serez automatiquement déconnecté.</translation>
-<translation id="8372369524088641025">Clé WEP incorrecte</translation>
-<translation id="6636709850131805001">État non reconnu</translation>
-<translation id="3573179567135747900">Revenir à &quot;<ph name="FROM_LOCALE"/>&quot; (redémarrage requis)</translation>
-<translation id="8103386449138765447">Messages SMS : <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Paramètres Google Drive…</translation>
-<translation id="7209101170223508707">Le VERROUILLAGE DES MAJUSCULES est activé.
-Appuyez sur Alt + Recherche ou Maj pour le désactiver.</translation>
-<translation id="8940956008527784070">Batterie faible (<ph name="PERCENTAGE"/> %)</translation>
-<translation id="4918086044614829423">Accepter</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> d'autonomie</translation>
-<translation id="3009178788565917040">Sortie</translation>
-<translation id="520760366042891468">Partage du contrôle de votre écran via Hangouts</translation>
-<translation id="8000066093800657092">Aucun réseau détecté</translation>
-<translation id="4015692727874266537">Connecter un autre compte…</translation>
-<translation id="5941711191222866238">Réduire</translation>
-<translation id="6911468394164995108">Autre réseau…</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/> : <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Félicitations ! Votre service de données &quot;<ph name="NAME"/>&quot; a été activé et est prêt à être utilisé.</translation>
-<translation id="412065659894267608">Encore <ph name="HOUR"/> h <ph name="MINUTE"/> min de chargement</translation>
-<translation id="7297443947353982503">Nom d'utilisateur/mot de passe incorrect ou échec de l'authentification EAP.</translation>
-<translation id="6359806961507272919">SMS de <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Opérateur</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_gu.xtb b/chromium/ash/strings/ash_strings_gu.xtb
deleted file mode 100644
index dd010b9acc4..00000000000
--- a/chromium/ash/strings/ash_strings_gu.xtb
+++ /dev/null
@@ -1,229 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="gu">
-<translation id="3595596368722241419">બૅટરી પૂર્ણ ચાર્જ</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> અને <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">પોર્ટલ સ્ટેટ</translation>
-<translation id="30155388420722288">ઓવરફ્લો બટન</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth સક્ષમ છે</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> ને <ph name="ROTATION"/> પર ફેરવવામાં આવ્યું હતું</translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth અક્ષમ છે</translation>
-<translation id="7165320105431587207">નેટવર્ક ગોઠવવામાં નિષ્ફળ</translation>
-<translation id="3775358506042162758">તમે બહુવિધ સાઇન-ઇનમાં માત્ર ત્રણ એકાઉન્ટ્સ સુધી રાખી શકો છો.</translation>
-<translation id="370649949373421643">Wi-Fi સક્ષમ કરો</translation>
-<translation id="3626281679859535460">તેજ</translation>
-<translation id="3621202678540785336">ઇનપુટ</translation>
-<translation id="595202126637698455">ભજવણી ટ્રેસિંગ સક્ષમ</translation>
-<translation id="8054466585765276473">બેટરી સમયની ગણના કરે છે.</translation>
-<translation id="7982789257301363584">નેટવર્ક</translation>
-<translation id="5565793151875479467">પ્રોક્સી...</translation>
-<translation id="938582441709398163">કીબોર્ડ ઓવરલે</translation>
-<translation id="4387004326333427325">પ્રમાણીકરણ પ્રમાણપત્ર રિમોટલી નકારવામાં આવ્યું છે</translation>
-<translation id="6979158407327259162">Google ડ્રાઇવ</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> ને <ph name="RESOLUTION"/> પર બદલવામાં આવ્યું હતું</translation>
-<translation id="6943836128787782965">HTTP નિષ્ફળ ગયું</translation>
-<translation id="2297568595583585744">સ્થિતિ ટ્રે</translation>
-<translation id="1661867754829461514">PIN ખૂટે છે</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: કનેક્ટ કરી રહ્યું છે...</translation>
-<translation id="40400351611212369">નેટવર્ક સક્રિયકરણ ભૂલ</translation>
-<translation id="4237016987259239829">નેટવર્ક કનેક્શન ભૂલ</translation>
-<translation id="2946640296642327832">Bluetooth સક્ષમ કરો</translation>
-<translation id="6459472438155181876">સ્ક્રીનને <ph name="DISPLAY_NAME"/> પર વિસ્તૃત કરી રહ્યાં છે</translation>
-<translation id="8206859287963243715">સેલ્યુલર</translation>
-<translation id="6596816719288285829">IP સરનામું</translation>
-<translation id="4508265954913339219">સક્રિયતા નિષ્ફળ</translation>
-<translation id="3621712662352432595">ઑડિઓ સેટિંગ્સ</translation>
-<translation id="1812696562331527143">તમારી ઇનપુટ પદ્ધતિ <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>3જા પક્ષ<ph name="END_LINK"/>)માં બદલાઇ ગયેલ છે.
-સ્વિચ કરવા માટે Shift + Alt દબાવો.</translation>
-<translation id="2127372758936585790">નિમ્ન-પાવર ચાર્જર</translation>
-<translation id="3846575436967432996">કોઈ નેટવર્ક માહિતી ઉપલબ્ધ નથી</translation>
-<translation id="3026237328237090306">મોબાઇલ ડેટા સેટ કરો</translation>
-<translation id="5871632337994001636">ઉપકરણોનું સંચાલન કરો...</translation>
-<translation id="785750925697875037">મોબાઇલ એકાઉન્ટ જુઓ</translation>
-<translation id="153454903766751181">સેલ્યુલર મોડેમનો પ્રારંભ કરી રહ્યાં છે...</translation>
-<translation id="4628814525959230255">Hangouts દ્વારા <ph name="HELPER_NAME"/> સાથે તમારી સ્ક્રીનનું નિયંત્રણ શેર કરવું.</translation>
-<translation id="7864539943188674973">Bluetooth અક્ષમ કરો</translation>
-<translation id="939252827960237676">સ્ક્રીનશૉટ સાચવવામાં નિષ્ફળ રહ્યું</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">અપડેટ કરવા માટે પુનઃપ્રારંભ કરો</translation>
-<translation id="2268813581635650749">બધામાંથી સાઇન આઉટ કરો</translation>
-<translation id="735745346212279324">VPN ડિસ્કનેક્ટ કર્યું છે</translation>
-<translation id="7320906967354320621">નિષ્ક્રિય</translation>
-<translation id="15373452373711364">મોટું માઉસ કર્સર</translation>
-<translation id="3294437725009624529">અતિથિ</translation>
-<translation id="8190698733819146287">ભાષાઓ અને ઇનપુટને કસ્ટમાઇઝ કરો...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">શેલ્ફ સ્થિતી</translation>
-<translation id="8676770494376880701">નિમ્ન-પાવર ચાર્જર કનેક્ટ કર્યું છે</translation>
-<translation id="7170041865419449892">પહોંચ બહાર</translation>
-<translation id="4804818685124855865">ડિસ્કનેક્ટ કરો</translation>
-<translation id="2544853746127077729">નેટવર્ક દ્વારા પ્રમાણીકરણ પ્રમાણપત્ર નકારવામાં આવ્યું</translation>
-<translation id="5222676887888702881">સાઇન આઉટ</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">કન્ફિગરેશન</translation>
-<translation id="1272079795634619415">રોકો</translation>
-<translation id="4957722034734105353">વધુ જાણો...</translation>
-<translation id="2964193600955408481">Wi-Fi ને અક્ષમ કરો</translation>
-<translation id="4279490309300973883">પ્રતિબિંબત થઈ રહ્યું છે</translation>
-<translation id="7973962044839454485">ખોટા વપરાશકર્તાનામ અથવા પાસવર્ડને કારણે PPP પ્રમાણીકરણ નિષ્ફળ થયું</translation>
-<translation id="2509468283778169019">CAPS LOCK ચાલુ છે</translation>
-<translation id="3892641579809465218">આંતરિક પ્રદર્શન</translation>
-<translation id="7823564328645135659">તમારી સેટિંગ્સ સમન્વયિત કર્યા પછી ભાષા &quot;<ph name="FROM_LOCALE"/>&quot; થી &quot;<ph name="TO_LOCALE"/>&quot; માં બદલાઈ ગઈ છે.</translation>
-<translation id="3368922792935385530">કનેક્ટેડ</translation>
-<translation id="8340999562596018839">બોલાયેલ પ્રતિસાદ</translation>
-<translation id="8654520615680304441">Wi-Fi ચાલુ કરો...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">તમારી ઇનપુટ પદ્ધતિ <ph name="INPUT_METHOD_ID"/> માં બદલાઇ ગયેલ છે.
-સ્વિચ કરવા માટે Shift + Alt દબાવો.</translation>
-<translation id="2562916301614567480">ખાનગી નેટવર્ક</translation>
-<translation id="6549021752953852991">કોઇ સેલ્યુલર નેટવર્ક ઉપલબ્ધ નથી</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">પ્રિય મોનિટર, તે અમારી વચ્ચે કાર્ય કરી રહ્યું નથી. (તે મોનિટર સમર્થિત નથી)</translation>
-<translation id="6426039856985689743">મોબાઇલ ડેટાને અક્ષમ કરો</translation>
-<translation id="3087734570205094154">તળિયું</translation>
-<translation id="3742055079367172538">સ્ક્રીનશૉટ લેવાયો</translation>
-<translation id="8878886163241303700">સ્ક્રીનને વિસ્તૃત કરી રહ્યું છે</translation>
-<translation id="5271016907025319479">VPN ગોઠવેલું નથી.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">સ્ક્રીનશૉટ્સ લેવાની ક્ષમતા તમારા વ્યવસ્થાપક દ્વારા અક્ષમ કરવામાં આવી છે.</translation>
-<translation id="372094107052732682">છોડવા માટે બે વાર Ctrl+Shift+Q દબાવો.</translation>
-<translation id="6803622936009808957">કોઈ સમર્થિત રિઝોલ્યૂશન મળ્યું ન હોવાથી, પ્રદર્શનોને પ્રતિબિંબિત કરી શકાયા નથી. તેને બદલે વિસ્તૃત ડેસ્કટૉપ દાખલ કર્યું.</translation>
-<translation id="1480041086352807611">ડેમો મોડ</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% બાકી</translation>
-<translation id="9089416786594320554">ઇનપુટ પદ્ધતિઓ</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277"><ph name="NAME"/> ના સક્રિયકરણને નેટવર્ક કનેક્શનની જરૂર છે.</translation>
-<translation id="3963445509666917109">સ્પીકર (આંતરિક)</translation>
-<translation id="2825619548187458965">શેલ્ફ</translation>
-<translation id="2614835198358683673">જ્યારે તમારી Chromebook ચાલુ હોય ત્યારે તેને ચાર્જ કરી શકાશે નહીં. અધિકૃત ચાર્જરનો ઉપયોગ કરવાનું વિચારો.</translation>
-<translation id="1895658205118569222">બંધ કરો</translation>
-<translation id="4430019312045809116">વૉલ્યૂમ</translation>
-<translation id="8681498213689260554">અપડેટ કરવા માટે પુનઃપ્રારંભ કરો અને પાવરવૉશ કરો</translation>
-<translation id="4442424173763614572">DNS લુકઅપ નિષ્ફળ ગયું</translation>
-<translation id="7874779702599364982">સેલ્યુલર નેટવર્ક્સ માટે શોધી રહ્યું છે...</translation>
-<translation id="583281660410589416">અજ્ઞાત</translation>
-<translation id="1383876407941801731">શોધ</translation>
-<translation id="3901991538546252627"><ph name="NAME"/> થી કનેક્ટ કરી રહ્યું છે</translation>
-<translation id="2204305834655267233">નેટવર્ક માહિતી</translation>
-<translation id="1621499497873603021">બેટરી ખાલી થવામાં બાકી સમય, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">અતિથિથી બહાર નીકળો</translation>
-<translation id="8308637677604853869">પહેલાનું મેનૂ</translation>
-<translation id="4666297444214622512">બીજા એકાઉન્ટમાં સાઇન ઇન કરી શકતા નથી.</translation>
-<translation id="3625258641415618104">સ્ક્રીનશોટ્સ અક્ષમ કર્યા</translation>
-<translation id="1346748346194534595">જમણે</translation>
-<translation id="1773212559869067373">પ્રમાણીકરણ પ્રમાણપત્રને સ્થાનિક રૂપે નકારવામાં આવ્યું છે</translation>
-<translation id="8528322925433439945">મોબાઇલ ...</translation>
-<translation id="7049357003967926684">સંસ્થા</translation>
-<translation id="8428213095426709021">સેટિંગ્સ</translation>
-<translation id="2372145515558759244">એપ્લિકેશન્સને સમન્વયિત કરી રહ્યું છે...</translation>
-<translation id="7256405249507348194">અજ્ઞાત ભૂલ: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA તપાસ નિષ્ફળ</translation>
-<translation id="8456362689280298700">પૂર્ણ થવામાં <ph name="HOUR"/>:<ph name="MINUTE"/> બાકી</translation>
-<translation id="5787281376604286451">બોલાયેલ પ્રતિસાદ સક્ષમ છે. અક્ષમ કરવા માટે Ctrl + Alt + Z દબાવો.</translation>
-<translation id="4479639480957787382">ઇથરનેટ</translation>
-<translation id="6312403991423642364">અજ્ઞાત નેટવર્ક ભૂલ</translation>
-<translation id="1467432559032391204">ડાબું</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830"><ph name="NAME"/> ને સક્રિય કરી રહ્યું છે</translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">આપમેળે ક્લિક્સ</translation>
-<translation id="1398853756734560583">મોટું કરો</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: કનેક્ટ કરી રહ્યું છે...</translation>
-<translation id="252373100621549798">અજ્ઞાત પ્રદર્શન</translation>
-<translation id="1882897271359938046"><ph name="DISPLAY_NAME"/> પર પ્રતિબિંબિત થઈ રહ્યું છે</translation>
-<translation id="2727977024730340865">નિમ્ન-પાવર ચાર્જરમાં પ્લગ કરેલું છે. બૅટરી ચાર્જિંગ વિશ્વસનીય હશે નહીં.</translation>
-<translation id="3784455785234192852">લૉક</translation>
-<translation id="2805756323405976993">એપ્લિકેશન્સ</translation>
-<translation id="1512064327686280138">સક્રિયતા નિષ્ફળ</translation>
-<translation id="5097002363526479830">નેટવર્ક '<ph name="NAME"/>' થી કનેક્ટ કરવામાં નિષ્ફળ: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi બંધ છે.</translation>
-<translation id="2966449113954629791">તમે તમારા મોબાઇલ ડેટા ભથ્થાનો ઉપયોગ કર્યો હોઈ શકે છે. વધુ ડેટા ખરીદવા માટે <ph name="NAME"/> સક્રિયતા પોર્ટલની મુલાકાત લો.</translation>
-<translation id="8132793192354020517"><ph name="NAME"/> થી કનેક્ટેડ છે</translation>
-<translation id="7052914147756339792">વૉલપેપર સેટ કરો...</translation>
-<translation id="8678698760965522072">ઓનલાઇન સ્ટેટ</translation>
-<translation id="2532589005999780174">ઉચ્ચ કોન્ટ્રાસ્ટ મોડ</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">આંતરિક ભૂલ</translation>
-<translation id="3019353588588144572">બેટરી સંપૂર્ણપણે ચાર્જ થવામાં બાકી સમય, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">સ્ક્રીન બૃહદદર્શક</translation>
-<translation id="7005812687360380971">નિષ્ફળતા</translation>
-<translation id="882279321799040148">જોવા માટે ક્લિક કરો</translation>
-<translation id="1753067873202720523">જ્યારે તમારી Chromebook ચાલુ હોય ત્યારે તે ચાર્જ કરી શકાતી નથી.</translation>
-<translation id="5045550434625856497">ખોટો પાસવર્ડ</translation>
-<translation id="1602076796624386989">મોબાઇલ ડેટા સક્ષમ કરો</translation>
-<translation id="6981982820502123353">ઍક્સેસિબિલિટી</translation>
-<translation id="3157931365184549694">પુનઃસ્થાપિત કરો</translation>
-<translation id="4274292172790327596">અપરિચિત ભૂલ</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/> : <ph name="MINUTES"/> : <ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">હેડફોન</translation>
-<translation id="225680501294068881">ઉપકરણો માટે સ્કેન કરી રહ્યું છે...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">માઇક્રોફોન (આંતરિક)</translation>
-<translation id="4448844063988177157"> Wi-Fi નેટવર્ક્સ માટે શોધી રહ્યું છે... </translation>
-<translation id="8401662262483418323">'<ph name="NAME"/>' થી કનેક્ટ કરવામાં નિષ્ફળ થયું: <ph name="DETAILS"/>
-સર્વર સંદેશ: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">કોઈ ભૂલ આવી છે</translation>
-<translation id="7229570126336867161">EVDO ની જરૂર છે</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> એ <ph name="DOMAIN"/> દ્વારા સંચાલિત સાર્વજનિક સત્ર છે</translation>
-<translation id="9044646465488564462">નેટવર્કથી કનેક્ટ કરવામાં નિષ્ફળ: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">સત્રમાંથી બહાર નીકળો</translation>
-<translation id="8454013096329229812">Wi-Fi ચાલુ છે.</translation>
-<translation id="4872237917498892622">Alt+Search અથવા Shift</translation>
-<translation id="9201131092683066720">બેટરી <ph name="PERCENTAGE"/> % પૂર્ણ છે.</translation>
-<translation id="2983818520079887040">સેટિંગ્સ...</translation>
-<translation id="3871838685472846647">સેલ્યુલર સક્રિય કર્ય્રુ</translation>
-<translation id="1195412055398077112">ઓવરસ્કૅન</translation>
-<translation id="112308213915226829">સ્વતઃછુપાવો શેલ્ફ</translation>
-<translation id="7573962313813535744">ડોક કરેલ મોડ</translation>
-<translation id="8927026611342028580">કનેક્ટ કરવાની વિનંતી કરી છે</translation>
-<translation id="8300849813060516376">OTASP નિષ્ફળ</translation>
-<translation id="2792498699870441125">Alt+Search</translation>
-<translation id="8660803626959853127"><ph name="COUNT"/> ફાઇલને સમન્વયિત કરી રહ્યું છે</translation>
-<translation id="5958529069007801266">નિરીક્ષણ કરેલ વપરાશકર્તા</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK બંધ છે</translation>
-<translation id="6248847161401822652">છોડવા માટે બે વાર Control Shift Q દબાવો.</translation>
-<translation id="6785414152754474415">બેટરી <ph name="PERCENTAGE"/> % પૂર્ણ અને ચાર્જ થઈ રહી છે.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: સક્રિય કરી રહ્યું છે...</translation>
-<translation id="4895488851634969361">બેટરી સંપૂર્ણ છે.</translation>
-<translation id="5947494881799873997">પાછા ફરો</translation>
-<translation id="7593891976182323525">Search અથવા Shift</translation>
-<translation id="7649070708921625228">સહાય</translation>
-<translation id="747833637904845037">ઢાંકણું બંધ હોવા પર પણ, બાહ્ય પ્રદર્શન સાથે કનેક્ટ કર્યું હોય તે વખતે તમારી Chromebook ચાલુ રહેશે.</translation>
-<translation id="3050422059534974565">CAPS LOCK ચાલુ છે.
-રદ કરવા માટે Search અથવા Shift દબાવો.</translation>
-<translation id="397105322502079400">ગણના કરી રહ્યું છે...</translation>
-<translation id="158849752021629804">હોમ નેટવર્કની આવશ્યકતા છે</translation>
-<translation id="6857811139397017780">સક્રિય કરો <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">DHCP લુકઅપ નિષ્ફળ</translation>
-<translation id="6692173217867674490">ખરાબ પાસફ્રેઝ</translation>
-<translation id="6165508094623778733">વધુ જાણો</translation>
-<translation id="9046895021617826162">કનેક્ટ કરવું નિષ્ફળ</translation>
-<translation id="7168224885072002358">જૂના રિઝોલ્યુશન પર પાછા ફરી રહ્યાં છે <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">આ સત્ર <ph name="SESSION_TIME_REMAINING"/> માં સમાપ્ત થશે. તમને આપમેળે સાઇન આઉટ કરવામાં આવશે.</translation>
-<translation id="8372369524088641025">ખરાબ WEP કી</translation>
-<translation id="6636709850131805001">અપરિચિત સ્થિતિ</translation>
-<translation id="3573179567135747900">&quot;<ph name="FROM_LOCALE"/>&quot; પર પાછાં જાઓ (પુનર્પ્રારંભની જરૂર છે)</translation>
-<translation id="8103386449138765447">SMS સંદેશા: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Google ડ્રાઇવ સેટિંગ્સ...</translation>
-<translation id="7209101170223508707">CAPS LOCK ચાલુ છે.
-રદ કરવા માટે Alt+Search અથવા Shift દબાવો.</translation>
-<translation id="8940956008527784070">બૅટરી ઓછી (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">સ્વીકારો</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> બાકી</translation>
-<translation id="3009178788565917040">આઉટપુટ</translation>
-<translation id="520760366042891468">Hangouts દ્વારા તમારી સ્ક્રીનનું નિયંત્રણ શેર કરી રહ્યું છે.</translation>
-<translation id="8000066093800657092">નેટવર્ક નથી</translation>
-<translation id="4015692727874266537">બીજા એકાઉન્ટમાં સાઇન ઇન કરો...</translation>
-<translation id="5941711191222866238">નાનું કરો</translation>
-<translation id="6911468394164995108">અન્યથી જોડાઓ...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">અભિનંદન! તમારી '<ph name="NAME"/>' ડેટા સેવાને સક્રિય કરવામાં આવી છે અને આગળ વધવા માટે તૈયાર છે.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/>ક <ph name="MINUTE"/>મિ સુધીમાં પૂર્ણ</translation>
-<translation id="7297443947353982503">વપરાશકર્તાનામ/પાસવર્ડ ખોટો છે અથવા EAP-auth નિષ્ફળ થયું</translation>
-<translation id="6359806961507272919"><ph name="PHONE_NUMBER"/> તરફથી SMS</translation>
-<translation id="1244147615850840081">વાહક</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_hi.xtb b/chromium/ash/strings/ash_strings_hi.xtb
deleted file mode 100644
index 2a0076af9b8..00000000000
--- a/chromium/ash/strings/ash_strings_hi.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="hi">
-<translation id="3595596368722241419">बैटरी पूर्ण</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> और <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">पोर्टल स्थिति</translation>
-<translation id="30155388420722288">ओवरफ़्लो बटन</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth सक्षम किया गया</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> को <ph name="ROTATION"/> पर घुमाया गया</translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth अक्षम किया गया</translation>
-<translation id="7165320105431587207">नेटवर्क कॉन्फ़िगर करने में विफल</translation>
-<translation id="3775358506042162758">एकाधिक साइन-इन में आप तीन तक खाते रख सकते हैं.</translation>
-<translation id="370649949373421643">Wi-Fi सक्षम करें</translation>
-<translation id="3626281679859535460">चमक</translation>
-<translation id="3621202678540785336">इनपुट</translation>
-<translation id="595202126637698455">निष्पादन ट्रेसिंग सक्षम है</translation>
-<translation id="8054466585765276473">बैटरी समय की गणना की जा रही है.</translation>
-<translation id="7982789257301363584">नेटवर्क</translation>
-<translation id="5565793151875479467">प्रॉक्सी...</translation>
-<translation id="938582441709398163">कीबोर्ड ओवरले</translation>
-<translation id="4387004326333427325">प्रमाणीकरण प्रमाणपत्र को दूरस्थ रूप से अस्वीकार किया गया</translation>
-<translation id="6979158407327259162">Google डिस्क</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> रिज़ॉल्यूशन को <ph name="RESOLUTION"/> में बदल दिया गया</translation>
-<translation id="6943836128787782965">HTTP विफल हुआ</translation>
-<translation id="2297568595583585744">स्थिति ट्रे</translation>
-<translation id="1661867754829461514">पिन गुम</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: कनेक्ट हो रहा है...</translation>
-<translation id="40400351611212369">नेटवर्क सक्रियण त्रुटि</translation>
-<translation id="4237016987259239829">नेटवर्क कनेक्शन त्रुटि</translation>
-<translation id="2946640296642327832">Bluetooth सक्षम करें</translation>
-<translation id="6459472438155181876"><ph name="DISPLAY_NAME"/> पर स्क्रीन विस्तृत कर रहा है</translation>
-<translation id="8206859287963243715">सेलुलर</translation>
-<translation id="6596816719288285829">IP पता</translation>
-<translation id="4508265954913339219">सक्रियण विफल</translation>
-<translation id="3621712662352432595">ऑडियो सेटिंग</translation>
-<translation id="1812696562331527143">आपकी इनपुट विधि <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>तृतीय पक्ष<ph name="END_LINK"/>) में बदल गई है.
-स्विच करने के लिए Shift + Alt दबाएं.</translation>
-<translation id="2127372758936585790">कम-शक्ति वाला चार्जर</translation>
-<translation id="3846575436967432996">कोई नेटवर्क जानकारी उपलब्ध नहीं</translation>
-<translation id="3026237328237090306">मोबाइल डेटा सेट करें</translation>
-<translation id="5871632337994001636">उपकरणों को प्रबंधित करें...</translation>
-<translation id="785750925697875037">मोबाइल खाते देखें</translation>
-<translation id="153454903766751181">सेल्युलर मॉडम प्रारंभ हो रहा है...</translation>
-<translation id="4628814525959230255">Hangout के माध्यम से अपनी स्क्रीन <ph name="HELPER_NAME"/> के साथ साझा करना.</translation>
-<translation id="7864539943188674973">Bluetooth अक्षम करें</translation>
-<translation id="939252827960237676">स्क्रीनशॉट सहेजने में विफल</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">अपडेट करने के लिए पुनरारंभ करें</translation>
-<translation id="2268813581635650749">सभी प्रस्थान करें</translation>
-<translation id="735745346212279324">VPN डिस्कनेक्ट है</translation>
-<translation id="7320906967354320621">प्रयोग में नहीं</translation>
-<translation id="15373452373711364">बड़ा माउस कर्सर</translation>
-<translation id="3294437725009624529">अतिथि</translation>
-<translation id="8190698733819146287">भाषाएं और इनपुट कस्टमाइज़ करें...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">शेल्फ़ की स्थिति</translation>
-<translation id="8676770494376880701">कम-शक्ति वाला चार्जर</translation>
-<translation id="7170041865419449892">सीमा से बाहर</translation>
-<translation id="4804818685124855865">डिस्कनेक्ट करें</translation>
-<translation id="2544853746127077729">नेटवर्क द्वारा प्रमाणीकरण प्रमाणपत्र अस्वीकार किया गया</translation>
-<translation id="5222676887888702881">प्रस्थान करें</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">कॉन्फ़िगरेशन</translation>
-<translation id="1272079795634619415">रोकें</translation>
-<translation id="4957722034734105353">अधिक जानें...</translation>
-<translation id="2964193600955408481">Wi-Fi अक्षम करें</translation>
-<translation id="4279490309300973883">मिरर करना</translation>
-<translation id="7973962044839454485">किसी गलत उपयोगकर्ता नाम या पासवर्ड के कारण PPP प्रमाणीकरण विफल रहा</translation>
-<translation id="2509468283778169019">CAPS LOCK चालू है</translation>
-<translation id="3892641579809465218">आंतरिक डिस्प्ले</translation>
-<translation id="7823564328645135659">आपकी सेटिंग समन्वयित करने के बाद भाषा को &quot;<ph name="FROM_LOCALE"/>&quot; से &quot;<ph name="TO_LOCALE"/>&quot; में बदल दिया गया है.</translation>
-<translation id="3368922792935385530">कनेक्टेड</translation>
-<translation id="8340999562596018839">बोला जाने वाला फ़ीडबैक</translation>
-<translation id="8654520615680304441">Wi-Fi चालू करें...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">आपकी इनपुट विधि <ph name="INPUT_METHOD_ID"/> में बदल गई है.
-स्विच करने के लिए Shift + Alt दबाएं.</translation>
-<translation id="2562916301614567480">निजी नेटवर्क</translation>
-<translation id="6549021752953852991">कोई सेल्युलर नेटवर्क उपलब्ध नहीं</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Dear Monitor, it's not working out between us. (वह मॉनीटर समर्थित नहीं है)</translation>
-<translation id="6426039856985689743">मोबाइल डेटा अक्षम करें</translation>
-<translation id="3087734570205094154">नीचे</translation>
-<translation id="3742055079367172538">स्क्रीनशॉट लिया गया</translation>
-<translation id="8878886163241303700">स्क्रीन का विस्तार करना</translation>
-<translation id="5271016907025319479">VPN कॉन्फ़िगर नहीं किया गया है.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">स्क्रीनशॉट लेने की क्षमता को आपके व्यवस्थापक द्वारा अक्षम कर दिया गया है.</translation>
-<translation id="372094107052732682">छोड़ने के लिए Ctrl+Shift+Q दो बार दबाएं.</translation>
-<translation id="6803622936009808957">प्रदर्शनों को मिरर नहीं किया जा सका क्योंकि कोई समर्थित रिज़ॉल्यूशन नहीं मिला. इसके बजाय विस्तारित डेस्कटॉप में चला गया है.</translation>
-<translation id="1480041086352807611">डेमो मोड</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% शेष है</translation>
-<translation id="9089416786594320554">इनपुट पद्धतियां</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">'<ph name="NAME"/>' के सक्रियण हेतु नेटवर्क कनेक्शन आवश्यक है.</translation>
-<translation id="3963445509666917109">स्पीकर (आंतरिक)</translation>
-<translation id="2825619548187458965">शेल्फ़</translation>
-<translation id="2614835198358683673">हो सकता है चालू होने पर आपका Chromebook चार्ज न हो. आधिकारिक चार्जर उपयोग करें.</translation>
-<translation id="1895658205118569222">बंद करें</translation>
-<translation id="4430019312045809116">मात्रा</translation>
-<translation id="8681498213689260554">अपडेट करने के लिए पुनः प्रारंभ करें या पावरवॉश करें</translation>
-<translation id="4442424173763614572">DNS लुकअप विफल</translation>
-<translation id="7874779702599364982">सेलुलर नेटवर्क खोज रहा है...</translation>
-<translation id="583281660410589416">अज्ञात</translation>
-<translation id="1383876407941801731">खोज</translation>
-<translation id="3901991538546252627"><ph name="NAME"/> से कनेक्‍ट हो रहा है</translation>
-<translation id="2204305834655267233">नेटवर्क जानकारी</translation>
-<translation id="1621499497873603021">बैटरी के खाली होने में शेष समय, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">अतिथि सत्र से बाहर निकलें</translation>
-<translation id="8308637677604853869">पिछला मेनू</translation>
-<translation id="4666297444214622512">अन्य खाते में प्रवेश नहीं कर सकते.</translation>
-<translation id="3625258641415618104">स्क्रीनशॉट अक्षम हैं</translation>
-<translation id="1346748346194534595">दाएं</translation>
-<translation id="1773212559869067373">प्रमाणीकरण प्रमाणपत्र को स्थानीय रूप से अस्वीकार कर दिया गया</translation>
-<translation id="8528322925433439945">मोबाइल ...</translation>
-<translation id="7049357003967926684">संबद्धता</translation>
-<translation id="8428213095426709021">सेटिंग</translation>
-<translation id="2372145515558759244">ऐप्स समन्वयित किए जा रहे हैं...</translation>
-<translation id="7256405249507348194">अपरिचित त्रुटि: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA जांच विफल</translation>
-<translation id="8456362689280298700">पूरा होने में <ph name="HOUR"/>:<ph name="MINUTE"/> शेष</translation>
-<translation id="5787281376604286451">बोला जाने वाला फ़ीडबैक सक्षम है.
-अक्षम करने के लिए Ctrl+Alt+Z दबाएं.</translation>
-<translation id="4479639480957787382">इथरनेट</translation>
-<translation id="6312403991423642364">अज्ञात नेटवर्क त्रुटि</translation>
-<translation id="1467432559032391204">बाएं</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830"><ph name="NAME"/> सक्रिय हो रहा है</translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">स्वत: क्‍लिक</translation>
-<translation id="1398853756734560583">बड़ा करें</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: कनेक्ट हो रहा है...</translation>
-<translation id="252373100621549798">अज्ञात डिस्प्ले</translation>
-<translation id="1882897271359938046"><ph name="DISPLAY_NAME"/> पर मिरर कर रहा है</translation>
-<translation id="2727977024730340865">कम-शक्ति वाले चार्जर में प्लग इन करें. बैटरी चार्ज करना संभवत: विश्वसनीय नहीं होगा.</translation>
-<translation id="3784455785234192852">लॉक करें</translation>
-<translation id="2805756323405976993">ऐप्स </translation>
-<translation id="1512064327686280138">सक्रियण विफलता</translation>
-<translation id="5097002363526479830">नेटवर्क से कनेक्ट करने में विफल '<ph name="NAME"/>': <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi बंद है.</translation>
-<translation id="2966449113954629791">हो सकता है कि आपने अपनी मोबाइल डेटा छूट का उपयोग कर लिया हो. और डेटा खरीदने के लिए <ph name="NAME"/> सक्रियण पोर्टल पर जाएं.</translation>
-<translation id="8132793192354020517"><ph name="NAME"/> से कनेक्ट है</translation>
-<translation id="7052914147756339792">वॉलपेपर सेट करें...</translation>
-<translation id="8678698760965522072">ऑनलाइन स्थिति</translation>
-<translation id="2532589005999780174">उच्च कंट्रास्ट मोड</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">आंतरिक त्रुटि</translation>
-<translation id="3019353588588144572">बैटरी के पूरी तरह से चार्ज होने में शेष समय, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">स्क्रीन आवर्द्धक</translation>
-<translation id="7005812687360380971">विफलता</translation>
-<translation id="882279321799040148">देखने के लिए क्लिक करें</translation>
-<translation id="1753067873202720523">हो सकता है कि आपका Chrome बुक चालू होने पर चार्ज न हो.</translation>
-<translation id="5045550434625856497">गलत पासवर्ड</translation>
-<translation id="1602076796624386989">मोबाइल डेटा सक्षम करें</translation>
-<translation id="6981982820502123353">पहुंच क्षमता</translation>
-<translation id="3157931365184549694">पुनर्स्थापित करें</translation>
-<translation id="4274292172790327596">अपरिचित त्रुटि</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">हेडफ़ोन</translation>
-<translation id="225680501294068881">उपकरण स्कैन किए जा रहे हैं...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">माइक्रोफ़ोन (आंतरिक)</translation>
-<translation id="4448844063988177157">Wi-Fi नेटवर्क खोज रहा है...</translation>
-<translation id="8401662262483418323">'<ph name="NAME"/>' से कनेक्ट करने में असफल: <ph name="DETAILS"/>
-सर्वर संदेश: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">कोई त्रुटि आई</translation>
-<translation id="7229570126336867161">EVDO की आवश्यकता है</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/>, <ph name="DOMAIN"/> के द्वारा प्रबंधित एक सार्वजनिक सत्र है</translation>
-<translation id="9044646465488564462">नेटवर्क से कनेक्ट करने में विफल रहा: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">सत्र से बाहर निकलें</translation>
-<translation id="8454013096329229812">Wi-Fi चालू है.</translation>
-<translation id="4872237917498892622">Alt+Search या Shift</translation>
-<translation id="9201131092683066720">बैटरी <ph name="PERCENTAGE"/>% भरी हुई है.</translation>
-<translation id="2983818520079887040">सेटिंग...</translation>
-<translation id="3871838685472846647">सेलुलर सक्रिय किया गया</translation>
-<translation id="1195412055398077112">ओवरस्कैन</translation>
-<translation id="112308213915226829">शेल्फ़ को स्वत: छिपाएं</translation>
-<translation id="7573962313813535744">डॉक मोड</translation>
-<translation id="8927026611342028580">कनेक्ट करने का अनुरोध किया गया</translation>
-<translation id="8300849813060516376">OTASP विफल</translation>
-<translation id="2792498699870441125">Alt+Search</translation>
-<translation id="8660803626959853127"><ph name="COUNT"/> फ़ाइल/फ़ाइलें समन्वयित हो रही है/हो रही हैं</translation>
-<translation id="5958529069007801266">पर्यवेक्षित उपयोगकर्ता</translation>
-<translation id="3709443003275901162">9 से अधिक</translation>
-<translation id="639644700271529076">CAPS LOCK बंद है</translation>
-<translation id="6248847161401822652">छोड़ने के लिए Control Shift Q दो बार दबाएं.</translation>
-<translation id="6785414152754474415">बैटरी <ph name="PERCENTAGE"/>% भरी हुई है और चार्ज हो रही है.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: सक्रिय हो रहा है...</translation>
-<translation id="4895488851634969361">बैटरी भरी हुई है.</translation>
-<translation id="5947494881799873997">वापस लाएं</translation>
-<translation id="7593891976182323525">Search या Shift</translation>
-<translation id="7649070708921625228">सहायता</translation>
-<translation id="747833637904845037">किसी बाहरी डिस्प्ले से कनेक्ट रहते समय आपका Chrome बुक चालू रहेगा, भले ही उसका लिड बंद हो.</translation>
-<translation id="3050422059534974565">CAPS LOCK चालू है.
-रद्द करने के लिए Search या Shift दबाएं.</translation>
-<translation id="397105322502079400">गणना की जा रही है...</translation>
-<translation id="158849752021629804">होम नेटवर्क की आवश्यकता है</translation>
-<translation id="6857811139397017780"><ph name="NETWORKSERVICE"/> को सक्रिय करें</translation>
-<translation id="5864471791310927901">DHCP लुकअप विफल</translation>
-<translation id="6692173217867674490">ख़राब पासफ़्रेज़</translation>
-<translation id="6165508094623778733">अधिक जानें</translation>
-<translation id="9046895021617826162">कनेक्ट करना विफल</translation>
-<translation id="7168224885072002358"><ph name="TIMEOUT_SECONDS"/> में पुराने रिज़ॉल्यूशन में वापस लौट रहा है</translation>
-<translation id="973896785707726617">यह सत्र <ph name="SESSION_TIME_REMAINING"/> में समाप्त हो जाएगा. आपको स्वचालित रूप से प्रस्थान कर दिया जाएगा.</translation>
-<translation id="8372369524088641025">ख़राब WEP कुंजी</translation>
-<translation id="6636709850131805001">अपरिचित अवस्था</translation>
-<translation id="3573179567135747900">&quot;<ph name="FROM_LOCALE"/>&quot; में पुन: बदलें (पुनः आरंभ करने की आवश्यकता है)</translation>
-<translation id="8103386449138765447">SMS संदेश: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Google डिस्क सेटिंग...</translation>
-<translation id="7209101170223508707">CAPS LOCK चालू है.
-रद्द करने के लिए Alt+Search या Shift दबाएं.</translation>
-<translation id="8940956008527784070">बैटरी कम (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">स्वीकार करें</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> शेष</translation>
-<translation id="3009178788565917040">आउटपुट</translation>
-<translation id="520760366042891468">Hangout के माध्यम से अपनी स्क्रीन साझा करना.</translation>
-<translation id="8000066093800657092">नेटवर्क नहीं है</translation>
-<translation id="4015692727874266537">अन्य खाते में प्रवेश करें...</translation>
-<translation id="5941711191222866238">छोटा करें</translation>
-<translation id="6911468394164995108">अन्य में शामिल हों...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">बधाई हो! आपकी '<ph name="NAME"/>' डेटा सेवा सक्रिय हो गई है और अब वह चलने के लिए तैयार है.</translation>
-<translation id="412065659894267608">पूरी तरह से चार्ज होने में <ph name="HOUR"/>घं <ph name="MINUTE"/>मि शेष</translation>
-<translation id="7297443947353982503">उपयोगकर्ता नाम/पासवर्ड गलत या EAP-प्रमाणीकरण विफल रहा</translation>
-<translation id="6359806961507272919"><ph name="PHONE_NUMBER"/> से SMS</translation>
-<translation id="1244147615850840081">कैरियर</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_hr.xtb b/chromium/ash/strings/ash_strings_hr.xtb
deleted file mode 100644
index 4ce8c94c9b3..00000000000
--- a/chromium/ash/strings/ash_strings_hr.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="hr">
-<translation id="3595596368722241419">Baterija je puna</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> i <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Stanje mreže: Portal</translation>
-<translation id="30155388420722288">Gumb padajućeg izbornika</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth omogućen</translation>
-<translation id="6310121235600822547">Zaslon <ph name="DISPLAY_NAME"/> rotiran je za <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth onemogućen</translation>
-<translation id="7165320105431587207">Konfiguriranje mreže nije uspjelo</translation>
-<translation id="3775358506042162758">Možete imati najviše tri računa u višestrukoj prijavi.</translation>
-<translation id="370649949373421643">Omogući Wi-Fi</translation>
-<translation id="3626281679859535460">Svjetlina</translation>
-<translation id="3621202678540785336">Ulaz</translation>
-<translation id="595202126637698455">Omogućeno je praćenje izvedbe</translation>
-<translation id="8054466585765276473">Izračun vremena baterije.</translation>
-<translation id="7982789257301363584">Mreža</translation>
-<translation id="5565793151875479467">Proxy...</translation>
-<translation id="938582441709398163">Preklapanje tipkovnice</translation>
-<translation id="4387004326333427325">Certifikat za autentifikaciju odbijen je daljinski</translation>
-<translation id="6979158407327259162">Google disk</translation>
-<translation id="3683428399328702079">Razlučivost zaslona <ph name="DISPLAY_NAME"/> promijenjena je na <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">HTTP GET neuspješan</translation>
-<translation id="2297568595583585744">Ladica statusa</translation>
-<translation id="1661867754829461514">Nedostaje PIN</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: povezivanje...</translation>
-<translation id="40400351611212369">Pogreška aktivacije mreže</translation>
-<translation id="4237016987259239829">Pogreška mrežne veze</translation>
-<translation id="2946640296642327832">Omogući Bluetooth</translation>
-<translation id="6459472438155181876">Proširivanje zaslona na zaslon <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Mobitel</translation>
-<translation id="6596816719288285829">IP adresa</translation>
-<translation id="4508265954913339219">Aktivacija nije uspjela</translation>
-<translation id="3621712662352432595">Postavke zvuka</translation>
-<translation id="1812696562331527143">Vaš je način unosa promijenjen u <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>treća strana<ph name="END_LINK"/>).
-Pritisnite Shift + Alt za promjenu.</translation>
-<translation id="2127372758936585790">Punjač male snage</translation>
-<translation id="3846575436967432996">Informacije o mreži nisu dostupne</translation>
-<translation id="3026237328237090306">Postavi mobilne podatke</translation>
-<translation id="5871632337994001636">Upravljanje uređajima...</translation>
-<translation id="785750925697875037">Prikaz mobilnog računa</translation>
-<translation id="153454903766751181">Inicijaliziranje modema mobilne mreže...</translation>
-<translation id="4628814525959230255">Dijelite kontrolu nad zaslonom s korisnikom <ph name="HELPER_NAME"/> putem značajke Hangouts.</translation>
-<translation id="7864539943188674973">Onemogući Bluetooth</translation>
-<translation id="939252827960237676">Snimka zaslona nije spremljena</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Ponovo pokrenite za ažuriranje</translation>
-<translation id="2268813581635650749">Odjavi sve</translation>
-<translation id="735745346212279324">Veza s VPN-om prekinuta</translation>
-<translation id="7320906967354320621">U mirovanju</translation>
-<translation id="15373452373711364">Veliki pokazivač miša</translation>
-<translation id="3294437725009624529">Gost</translation>
-<translation id="8190698733819146287">Prilagodi jezike i unos...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Položaj police</translation>
-<translation id="8676770494376880701">Priključen je punjač male snage</translation>
-<translation id="7170041865419449892">Izvan raspona</translation>
-<translation id="4804818685124855865">Prekini vezu</translation>
-<translation id="2544853746127077729">Mreža je odbila certifikat za autentifikaciju</translation>
-<translation id="5222676887888702881">Odjava</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Konfiguracija</translation>
-<translation id="1272079795634619415">Zaustavi</translation>
-<translation id="4957722034734105353">Saznajte više...</translation>
-<translation id="2964193600955408481">Onemogući Wi-Fi</translation>
-<translation id="4279490309300973883">Zrcaljenje</translation>
-<translation id="7973962044839454485">PPP autentifikacija nije uspjela zbog netočnog korisničkog imena ili zaporke</translation>
-<translation id="2509468283778169019">Opcija CAPS LOCK uključena</translation>
-<translation id="3892641579809465218">Unutarnji zaslon</translation>
-<translation id="7823564328645135659">Jezik je promijenjen iz: &quot;<ph name="FROM_LOCALE"/>&quot; u: &quot;<ph name="TO_LOCALE"/>&quot; nakon sinkronizacije vaših postavki.</translation>
-<translation id="3368922792935385530">Spojeno</translation>
-<translation id="8340999562596018839">Govorne povratne informacije</translation>
-<translation id="8654520615680304441">Uključite Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Vaš je način unosa promijenjen u <ph name="INPUT_METHOD_ID"/>.
-Pritisnite Shift + Alt za promjenu.</translation>
-<translation id="2562916301614567480">Privatna mreža</translation>
-<translation id="6549021752953852991">Mobilne mreže nisu dostupne</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Dragi monitoru, naša veza neće uspjeti. (Taj monitor nije podržan)</translation>
-<translation id="6426039856985689743">Onemogući mobilne podatke</translation>
-<translation id="3087734570205094154">Donji</translation>
-<translation id="3742055079367172538">Izrađena je snimka zaslona</translation>
-<translation id="8878886163241303700">Produljenje zaslona</translation>
-<translation id="5271016907025319479">VPN nije konfiguriran.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Administrator je onemogućio izradu snimki zaslona.</translation>
-<translation id="372094107052732682">Pritisnite Ctrl + Shift + Q dvaput da biste odustali.</translation>
-<translation id="6803622936009808957">Nije bilo moguće zrcaliti zaslone jer nije pronađena nijedna podržana razlučivost. Umjesto toga proširena je radna površina.</translation>
-<translation id="1480041086352807611">Demonstracijski način</translation>
-<translation id="3626637461649818317">Preostalo <ph name="PERCENTAGE"/> %</translation>
-<translation id="9089416786594320554">Načini unosa</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">Za aktivaciju mreže &quot;<ph name="NAME"/>&quot; potrebna je mrežna veza.</translation>
-<translation id="3963445509666917109">Zvučnik (ugrađeni)</translation>
-<translation id="2825619548187458965">Polica</translation>
-<translation id="2614835198358683673">Chromebook se možda neće puniti dok je uključen. Savjetujemo upotrebu službenog punjača.</translation>
-<translation id="1895658205118569222">Isključivanje</translation>
-<translation id="4430019312045809116">Glasnoća</translation>
-<translation id="8681498213689260554">Ponovo pokrenite sustav i Powerwash za ažuriranje</translation>
-<translation id="4442424173763614572">Nije uspjelo pretraživanje DNS poslužitelja</translation>
-<translation id="7874779702599364982">Traženje mobilnih mreža...</translation>
-<translation id="583281660410589416">Nepoznato</translation>
-<translation id="1383876407941801731">Pretraživanje</translation>
-<translation id="3901991538546252627">Povezivanje s mrežom <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Podaci o mreži</translation>
-<translation id="1621499497873603021">Baterija će se isprazniti za <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Izlazak iz sesije gosta</translation>
-<translation id="8308637677604853869">Prethodni izbornik</translation>
-<translation id="4666297444214622512">Prijava na još jedan račun nije moguća.</translation>
-<translation id="3625258641415618104">Snimke zaslona onemogućene su</translation>
-<translation id="1346748346194534595">Udesno</translation>
-<translation id="1773212559869067373">Certifikat za autentifikaciju odbijen je lokalno</translation>
-<translation id="8528322925433439945">Mobilne mreže...</translation>
-<translation id="7049357003967926684">Udruživanje</translation>
-<translation id="8428213095426709021">Postavke</translation>
-<translation id="2372145515558759244">Sinkroniziranje aplikacija...</translation>
-<translation id="7256405249507348194">Neprepoznata pogreška: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Provjera AAA nije uspjela</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> do potpune napunjenosti</translation>
-<translation id="5787281376604286451">Omogućene su govorne povratne informacije.
-Pritisnite Ctrl + Alt + Z da biste ih onemogućili.</translation>
-<translation id="4479639480957787382">Eternet</translation>
-<translation id="6312403991423642364">Nepoznata mrežna pogreška</translation>
-<translation id="1467432559032391204">Ulijevo</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Aktiviranje mreže <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Automatski klikovi</translation>
-<translation id="1398853756734560583">Maksimiziraj</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: povezivanje...</translation>
-<translation id="252373100621549798">Nepoznati zaslon</translation>
-<translation id="1882897271359938046">Zrcaljenje na zaslon <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Uređaj je priključen na punjač male snage. Punjenje baterije možda nije pouzdano.</translation>
-<translation id="3784455785234192852">Zaključaj</translation>
-<translation id="2805756323405976993">Apps</translation>
-<translation id="1512064327686280138">Neuspjela aktivacija</translation>
-<translation id="5097002363526479830">Neuspješno povezivanje s mrežom &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi je isključen.</translation>
-<translation id="2966449113954629791">Vjerojatno ste potrošili dopuštenu količinu mobilnih podataka. Posjetite aktivacijski portal <ph name="NAME"/> kako biste kupili još podataka.</translation>
-<translation id="8132793192354020517">Povezano s <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Postavljanje pozadinske slike...</translation>
-<translation id="8678698760965522072">Stanje na mreži</translation>
-<translation id="2532589005999780174">Način visokog kontrasta</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Interna pogreška</translation>
-<translation id="3019353588588144572">Baterija će se napuniti za <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Povećalo</translation>
-<translation id="7005812687360380971">Neuspjeh</translation>
-<translation id="882279321799040148">Kliknite za prikaz</translation>
-<translation id="1753067873202720523">Chromebook se možda neće puniti dok je uključen.</translation>
-<translation id="5045550434625856497">Netočna zaporka</translation>
-<translation id="1602076796624386989">Omogući mobilne podatke</translation>
-<translation id="6981982820502123353">Dostupnost</translation>
-<translation id="3157931365184549694">Vrati</translation>
-<translation id="4274292172790327596">Neprepoznata pogreška</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Slušalice</translation>
-<translation id="225680501294068881">Pretraživanje uređaja...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Mikrofon (ugrađeni)</translation>
-<translation id="4448844063988177157">Traženje Wi-Fi mreža...</translation>
-<translation id="8401662262483418323">Povezivanje s mrežom &quot;<ph name="NAME"/>&quot; nije uspjelo: <ph name="DETAILS"/>
-Poruka poslužitelja: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Došlo je do pogreške</translation>
-<translation id="7229570126336867161">Potreban je EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> predstavlja javnu sesiju kojom upravlja domena <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Povezivanje s mrežom nije uspjelo: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Izlazak iz sesije</translation>
-<translation id="8454013096329229812">Wi-Fi je uključen.</translation>
-<translation id="4872237917498892622">Alt + Pretraživanje ili Shift</translation>
-<translation id="9201131092683066720">Baterija je <ph name="PERCENTAGE"/>% puna.</translation>
-<translation id="2983818520079887040">Postavke...</translation>
-<translation id="3871838685472846647">Mobilni je telefon aktiviran</translation>
-<translation id="1195412055398077112">rubno područje zaslona</translation>
-<translation id="112308213915226829">Automatski sakrij policu</translation>
-<translation id="7573962313813535744">Način rada u priključnoj stanici</translation>
-<translation id="8927026611342028580">Podnesen je zahtjev za povezivanje</translation>
-<translation id="8300849813060516376">OTASP nije uspio</translation>
-<translation id="2792498699870441125">Alt + Pretraživanje</translation>
-<translation id="8660803626959853127">Sinkroniziranje datoteka (<ph name="COUNT"/>)</translation>
-<translation id="5958529069007801266">Nadzirani korisnik</translation>
-<translation id="3709443003275901162">više od 9</translation>
-<translation id="639644700271529076">Tipka CAPS LOCK isključena</translation>
-<translation id="6248847161401822652">Pritisnite tipke Control, Shift i Q dvaput da biste odustali.</translation>
-<translation id="6785414152754474415">Baterija je <ph name="PERCENTAGE"/>% puna i puni se.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: aktiviranje...</translation>
-<translation id="4895488851634969361">Baterija je puna.</translation>
-<translation id="5947494881799873997">Vrati</translation>
-<translation id="7593891976182323525">Pretraživanje ili Shift</translation>
-<translation id="7649070708921625228">Pomoć</translation>
-<translation id="747833637904845037">Chromebook će ostati uključen dok je povezan s vanjskim zaslonom, čak i ako je poklopac zatvoren.</translation>
-<translation id="3050422059534974565">Uključena je opcija CAPS LOCK.
-Pritisnite tipke Pretraživanje ili Shift da biste ju isključili.</translation>
-<translation id="397105322502079400">Izračun u tijeku…</translation>
-<translation id="158849752021629804">Potrebna je matična mreža</translation>
-<translation id="6857811139397017780">Aktiviraj <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">DHCP pretraživanje nije uspjelo</translation>
-<translation id="6692173217867674490">Pogrešna zaporka</translation>
-<translation id="6165508094623778733">Saznajte više</translation>
-<translation id="9046895021617826162">Neuspjelo povezivanje</translation>
-<translation id="7168224885072002358">Vraćanje na staru razlučivost za <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Sesija će završiti za <ph name="SESSION_TIME_REMAINING"/>. Bit ćete automatski odjavljeni.</translation>
-<translation id="8372369524088641025">Neispravan WEP ključ</translation>
-<translation id="6636709850131805001">Neprepoznato stanje</translation>
-<translation id="3573179567135747900">Vratite na &quot;<ph name="FROM_LOCALE"/>&quot; (zahtijeva ponovno pokretanje)</translation>
-<translation id="8103386449138765447">SMS poruke: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Postavke Google diska...</translation>
-<translation id="7209101170223508707">Uključena je opcija CAPS LOCK.
-Pritisnite tipke Alt + Pretraživanje ili Shift da biste ju isključili.</translation>
-<translation id="8940956008527784070">Baterija je skoro prazna (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Prihvati</translation>
-<translation id="5102001756192215136">Preostalo <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Izlaz</translation>
-<translation id="520760366042891468">Dijelite kontrolu nad zaslonom putem značajke Hangouts.</translation>
-<translation id="8000066093800657092">Nema mreže</translation>
-<translation id="4015692727874266537">Prijavite se na još jedan račun...</translation>
-<translation id="5941711191222866238">Minimiziraj</translation>
-<translation id="6911468394164995108">Pridruži se drugoj...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Čestitamo! Podatkovna usluga &quot;<ph name="NAME"/>&quot; aktivirana je i spremna za pokret.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/> h <ph name="MINUTE"/> min do završetka punjenja</translation>
-<translation id="7297443947353982503">Netočno korisničko ime/zaporka ili neuspjela EAP autentifikacija</translation>
-<translation id="6359806961507272919">SMS šalje <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Davatelj usluge</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_hu.xtb b/chromium/ash/strings/ash_strings_hu.xtb
deleted file mode 100644
index 1d5b22e0eb1..00000000000
--- a/chromium/ash/strings/ash_strings_hu.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="hu">
-<translation id="3595596368722241419">Akkumulátor feltöltve</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> és <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Portál állapota</translation>
-<translation id="30155388420722288">Túlcsordulás gomb</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth engedélyezve</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> elfordult erre: <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth letiltva</translation>
-<translation id="7165320105431587207">Nem sikerült konfigurálni a hálózatot</translation>
-<translation id="3775358506042162758">Legfeljebb három fiókot használhat a többfiókos bejelentkezés során.</translation>
-<translation id="370649949373421643">Wi-Fi engedélyezése</translation>
-<translation id="3626281679859535460">Fényerő</translation>
-<translation id="3621202678540785336">Bemenet</translation>
-<translation id="595202126637698455">Teljesítménykövetés engedélyezve</translation>
-<translation id="8054466585765276473">Akkumulátor-időtartam kiszámítása.</translation>
-<translation id="7982789257301363584">Hálózat</translation>
-<translation id="5565793151875479467">Proxy...</translation>
-<translation id="938582441709398163">Billentyűzetkiosztás</translation>
-<translation id="4387004326333427325">A hitelesítési tanúsítvány távolról elutasítva</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> felbontása erre módosult: <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">A HTTP-lekérés nem sikerült</translation>
-<translation id="2297568595583585744">Állapottálca</translation>
-<translation id="1661867754829461514">Hiányzó PIN kód</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: csatlakozás...</translation>
-<translation id="40400351611212369">Hálózati aktivációs hiba</translation>
-<translation id="4237016987259239829">Hálózati kapcsolat hibája</translation>
-<translation id="2946640296642327832">Bluetooth engedélyezése</translation>
-<translation id="6459472438155181876">Képernyő kiterjesztése erre: <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Mobil</translation>
-<translation id="6596816719288285829">IP-cím</translation>
-<translation id="4508265954913339219">Aktiválás sikertelen</translation>
-<translation id="3621712662352432595">Hangbeállítások</translation>
-<translation id="1812696562331527143">A beviteli mód a következőre változott: <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>harmadik fél<ph name="END_LINK"/>).
-A váltáshoz nyomja meg a Shift + Alt billentyűkódot.</translation>
-<translation id="2127372758936585790">Kis teljesítményű töltő</translation>
-<translation id="3846575436967432996">Nem áll rendelkezésre hálózati információ</translation>
-<translation id="3026237328237090306">Mobiladatok beállítása</translation>
-<translation id="5871632337994001636">Eszközök kezelése...</translation>
-<translation id="785750925697875037">Mobil fiók megtekintése</translation>
-<translation id="153454903766751181">Mobilmodem inicializálása...</translation>
-<translation id="4628814525959230255"><ph name="HELPER_NAME"/> segéddel való képernyőmegosztás vezérlése a Hangoutson keresztül.</translation>
-<translation id="7864539943188674973">Bluetooth letiltása</translation>
-<translation id="939252827960237676">Nem sikerült menteni a képernyőképet.</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Indítsa újra a frissítéshez</translation>
-<translation id="2268813581635650749">Összes kijelentkeztetése</translation>
-<translation id="735745346212279324">A VPN nincs csatlakoztatva</translation>
-<translation id="7320906967354320621">Tétlen</translation>
-<translation id="15373452373711364">Nagy egérmutató</translation>
-<translation id="3294437725009624529">Vendég</translation>
-<translation id="8190698733819146287">Nyelvek és beviteli módok személyre szabása...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Polc pozíciója</translation>
-<translation id="8676770494376880701">Kis teljesítményű töltő csatlakoztatva</translation>
-<translation id="7170041865419449892">Tartományon kívül</translation>
-<translation id="4804818685124855865">Kapcsolat bontása</translation>
-<translation id="2544853746127077729">A hálózat elutasította a hitelesítési tanúsítványt</translation>
-<translation id="5222676887888702881">Kijelentkezés</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Konfiguráció</translation>
-<translation id="1272079795634619415">Leállítás</translation>
-<translation id="4957722034734105353">További információ...</translation>
-<translation id="2964193600955408481">Wi-Fi letiltása</translation>
-<translation id="4279490309300973883">Tükrözés</translation>
-<translation id="7973962044839454485">Nem sikerült a PPP-hitelesítés helytelen felhasználónév vagy jelszó miatt</translation>
-<translation id="2509468283778169019">A CAPS LOCK be van kapcsolva</translation>
-<translation id="3892641579809465218">Belső kijelző</translation>
-<translation id="7823564328645135659">A beállítások szinkronizálását követően &quot;<ph name="FROM_LOCALE"/>&quot; nyelvről &quot;<ph name="TO_LOCALE"/>&quot; nyelvre változott a nyelvi beállítás.</translation>
-<translation id="3368922792935385530">Kapcsolódva</translation>
-<translation id="8340999562596018839">Hangos visszajelzés</translation>
-<translation id="8654520615680304441">Wi-Fi bekapcsolása...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">A beviteli mód a következőre változott: <ph name="INPUT_METHOD_ID"/>.
-A váltáshoz nyomja meg a Shift + Alt billentyűkódot.</translation>
-<translation id="2562916301614567480">Magánhálózat</translation>
-<translation id="6549021752953852991">Nem érhető el mobilhálózat</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Kedves Monitor, mi nem illünk össze. (A monitor nem támogatott.)</translation>
-<translation id="6426039856985689743">Mobiladatok letiltása</translation>
-<translation id="3087734570205094154">Alja</translation>
-<translation id="3742055079367172538">Képernyőkép elkészítve</translation>
-<translation id="8878886163241303700">Kibővített képernyő</translation>
-<translation id="5271016907025319479">Nincs konfigurálva VPN.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">A képernyőkép-készítést letiltotta a rendszergazda.</translation>
-<translation id="372094107052732682">A kilépéshez nyomja meg kétszer a Ctrl+Shift+Q billentyűkódot.</translation>
-<translation id="6803622936009808957">A kijelzők tükrözése sikertelen, mivel nem található támogatott felbontás. Ehelyett kiterjesztett asztal módba váltott a rendszer.</translation>
-<translation id="1480041086352807611">Demó üzemmód</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% maradt</translation>
-<translation id="9089416786594320554">Beviteli módszerek</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">A(z) „<ph name="NAME"/>” aktiválásához hálózati kapcsolatra van szükség.</translation>
-<translation id="3963445509666917109">Hangszóró (belső)</translation>
-<translation id="2825619548187458965">Polc</translation>
-<translation id="2614835198358683673">Előfordulhat, hogy a Chromebook nem töltődik, amíg be van kapcsolva. Vegye fontolóra a gyári töltő használatát.</translation>
-<translation id="1895658205118569222">Kikapcsolás</translation>
-<translation id="4430019312045809116">Hangerő</translation>
-<translation id="8681498213689260554">Indítsa újra, és végezze el a Powerwash folyamatot a frissítéshez</translation>
-<translation id="4442424173763614572">A DNS keresése sikertelen</translation>
-<translation id="7874779702599364982">Mobilhálózatok keresése...</translation>
-<translation id="583281660410589416">Ismeretlen</translation>
-<translation id="1383876407941801731">Keresés</translation>
-<translation id="3901991538546252627">Csatlakozás a következőhöz: <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Hálózatinformáció</translation>
-<translation id="1621499497873603021">Akkumulátor lemerüléséig hátralévő idő: <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Kilépés a vendég munkamenetből</translation>
-<translation id="8308637677604853869">Előző menü</translation>
-<translation id="4666297444214622512">Nem lehet bejelentkezni még egy fiókba.</translation>
-<translation id="3625258641415618104">Képernyőképek letiltva</translation>
-<translation id="1346748346194534595">Jobbra</translation>
-<translation id="1773212559869067373">A hitelesítési tanúsítvány helyileg elutasítva</translation>
-<translation id="8528322925433439945">Mobil...</translation>
-<translation id="7049357003967926684">Társaság</translation>
-<translation id="8428213095426709021">Beállítások</translation>
-<translation id="2372145515558759244">Alkalmazások szinkronizálása...</translation>
-<translation id="7256405249507348194">Ismeretlen hiba: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA-ellenőrzés sikertelen</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> a teljes feltöltésig</translation>
-<translation id="5787281376604286451">Hangos visszajelzés engedélyezett.
-A tiltásához nyomja le a Ctrl+Alt+Z billentyűkombinációt.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Ismeretlen hálózati hiba</translation>
-<translation id="1467432559032391204">Balra</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830"><ph name="NAME"/> aktiválása</translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Automatikus kattintások</translation>
-<translation id="1398853756734560583">Teljes méret</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: csatlakozás...</translation>
-<translation id="252373100621549798">Ismeretlen kijelző</translation>
-<translation id="1882897271359938046">Tükrözés: <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Kis teljesítményű töltőt csatlakoztatott. Az akkumulátor töltése nem megbízható.</translation>
-<translation id="3784455785234192852">Zárolás</translation>
-<translation id="2805756323405976993">Programok</translation>
-<translation id="1512064327686280138">Aktiválási hiba</translation>
-<translation id="5097002363526479830">Nem sikerült csatlakozni a(z) <ph name="NAME"/> hálózathoz: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi kikapcsolva.</translation>
-<translation id="2966449113954629791">Valószínűleg elérte a mobiladat-használatra vonatkozó korlátozást. További adatforgalom vásárlásához keresse fel a(z) <ph name="NAME"/> aktiválási portált.</translation>
-<translation id="8132793192354020517">Csatlakozás a következőhöz megtörtént: <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Háttérkép beállítása...</translation>
-<translation id="8678698760965522072">Online</translation>
-<translation id="2532589005999780174">Nagy kontrasztú mód</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Belső hiba</translation>
-<translation id="3019353588588144572">Akkumulátor teljes feltöltéséig hátralévő idő: <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Képernyőnagyító</translation>
-<translation id="7005812687360380971">Sikertelen</translation>
-<translation id="882279321799040148">Kattintson a megtekintéshez</translation>
-<translation id="1753067873202720523">Előfordulhat, hogy a Chromebook nem töltődik, amíg be van kapcsolva.</translation>
-<translation id="5045550434625856497">Téves jelszó</translation>
-<translation id="1602076796624386989">Mobiladatok engedélyezése</translation>
-<translation id="6981982820502123353">Kisegítő lehetőségek</translation>
-<translation id="3157931365184549694">Visszaállítás</translation>
-<translation id="4274292172790327596">Azonosítatlan hiba</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Fülhallgató</translation>
-<translation id="225680501294068881">Eszközök keresése...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Mikrofon (belső)</translation>
-<translation id="4448844063988177157">Wi-Fi hálózatok keresése...</translation>
-<translation id="8401662262483418323">Nem sikerült a csatlakozás a következőhöz: „<ph name="NAME"/>”: <ph name="DETAILS"/>
-Szerverüzenet: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Hiba történt</translation>
-<translation id="7229570126336867161">EVDO szükséges</translation>
-<translation id="2999742336789313416">A(z) <ph name="DISPLAY_NAME"/> egy <ph name="DOMAIN"/> által kezelt nyilvános munkamenet</translation>
-<translation id="9044646465488564462">Nem sikerült csatlakozni a hálózathoz: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Kilépés a munkamenetből</translation>
-<translation id="8454013096329229812">Wi-Fi bekapcsolva.</translation>
-<translation id="4872237917498892622">Alt + Keresés vagy Shift</translation>
-<translation id="9201131092683066720">Az akkumulátor töltöttsége: <ph name="PERCENTAGE"/>%.</translation>
-<translation id="2983818520079887040">Beállítások...</translation>
-<translation id="3871838685472846647">Mobil aktiválva</translation>
-<translation id="1195412055398077112">túlpásztázás</translation>
-<translation id="112308213915226829">Polc automatikus elrejtése</translation>
-<translation id="7573962313813535744">Dokkolt mód</translation>
-<translation id="8927026611342028580">Csatlakozás kérelmezve</translation>
-<translation id="8300849813060516376">OTASP sikertelen</translation>
-<translation id="2792498699870441125">Alt + Keresés</translation>
-<translation id="8660803626959853127"><ph name="COUNT"/> fájl szinkronizálása</translation>
-<translation id="5958529069007801266">Felügyelt felhasználó</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">A CAPS LOCK ki van kapcsolva</translation>
-<translation id="6248847161401822652">A kilépéshez nyomja meg kétszer a Ctrl Shift Q billentyűkódot.</translation>
-<translation id="6785414152754474415">Az akkumulátor töltöttsége <ph name="PERCENTAGE"/>%, és töltődik.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: aktiválás...</translation>
-<translation id="4895488851634969361">Az akkumulátor feltöltve.</translation>
-<translation id="5947494881799873997">Visszavonás</translation>
-<translation id="7593891976182323525">Keresés vagy Shift</translation>
-<translation id="7649070708921625228">Súgó</translation>
-<translation id="747833637904845037">A Chromebook – ha külső monitort csatlakoztat hozzá – akkor is bekapcsolva marad, amikor lehajtja a fedelét.</translation>
-<translation id="3050422059534974565">A CAPS LOCK be van kapcsolva.
-Kikapcsolásához nyomja meg a Keresés vagy a Shift billentyűt.</translation>
-<translation id="397105322502079400">Számítás…</translation>
-<translation id="158849752021629804">Otthoni hálózat szükséges</translation>
-<translation id="6857811139397017780"><ph name="NETWORKSERVICE"/> aktiválása</translation>
-<translation id="5864471791310927901">DHCP-keresés sikertelen</translation>
-<translation id="6692173217867674490">Rossz összetett jelszó</translation>
-<translation id="6165508094623778733">További információ</translation>
-<translation id="9046895021617826162">Csatlakozás sikertelen</translation>
-<translation id="7168224885072002358">Visszaállítás a régi felbontásra <ph name="TIMEOUT_SECONDS"/> mp múlva</translation>
-<translation id="973896785707726617">A munkamenet <ph name="SESSION_TIME_REMAINING"/> múlva véget ér. Ekkor a rendszer automatikusan kijelentkezteti.</translation>
-<translation id="8372369524088641025">Hibás WEP kulcs</translation>
-<translation id="6636709850131805001">Azonosítatlan állam</translation>
-<translation id="3573179567135747900">Visszatérés ehhez: &quot;<ph name="FROM_LOCALE"/>&quot; (újraindítás szükséges)</translation>
-<translation id="8103386449138765447">SMS-üzenetek: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">A Google Drive beállításai...</translation>
-<translation id="7209101170223508707">A CAPS LOCK be van kapcsolva.
-Kikapcsolásához nyomja meg az Alt + Keresés vagy a Shift billentyűt.</translation>
-<translation id="8940956008527784070">Alacsony akkumulátortöltöttség (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Elfogadás</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> van hátra</translation>
-<translation id="3009178788565917040">Kimenet</translation>
-<translation id="520760366042891468">Képernyő megosztásának vezérlése a Hangoutson keresztül.</translation>
-<translation id="8000066093800657092">Nincs hálózat</translation>
-<translation id="4015692727874266537">Bejelentkezés másik fiókba...</translation>
-<translation id="5941711191222866238">Kicsinyítés</translation>
-<translation id="6911468394164995108">Csatlakozás másik hálózathoz...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Gratulálunk! „<ph name="NAME"/>” adatszolgáltatása aktív, és készen áll a használatra.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/> ó <ph name="MINUTE"/> p a teljes feltöltésig</translation>
-<translation id="7297443947353982503">Helytelen a felhasználónév vagy a jelszó, vagy nem sikerült az EAP-hitelesítés</translation>
-<translation id="6359806961507272919">SMS innen: <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Szállító</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_id.xtb b/chromium/ash/strings/ash_strings_id.xtb
deleted file mode 100644
index e588ae34d76..00000000000
--- a/chromium/ash/strings/ash_strings_id.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="id">
-<translation id="3595596368722241419">Baterai penuh</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> dan <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Status portal</translation>
-<translation id="30155388420722288">Tombol Luapan</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth diaktifkan</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> diputar ke <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth dinonaktifkan</translation>
-<translation id="7165320105431587207">Gagal mengonfigurasi jaringan</translation>
-<translation id="3775358506042162758">Anda hanya dapat memiliki paling banyak tiga akun dalam fitur masuk multipel.</translation>
-<translation id="370649949373421643">Aktifkan Wi-Fi</translation>
-<translation id="3626281679859535460">Kecerahan</translation>
-<translation id="3621202678540785336">Masukan</translation>
-<translation id="595202126637698455">Kinerja pelacakan aktif</translation>
-<translation id="8054466585765276473">Menghitung masa pakai baterai.</translation>
-<translation id="7982789257301363584">Jaringan</translation>
-<translation id="5565793151875479467">Proxy...</translation>
-<translation id="938582441709398163">Hamparan Keyboard</translation>
-<translation id="4387004326333427325">Sertifikat atutentikasi ditolak dari jarak jauh</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> resolusi diubah menjadi <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">HTTP gagal</translation>
-<translation id="2297568595583585744">Baki status</translation>
-<translation id="1661867754829461514">PIN hilang</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: Menyambung...</translation>
-<translation id="40400351611212369">Kesalahan Aktivasi Jaringan</translation>
-<translation id="4237016987259239829">Kesalahan Koneksi Jaringan</translation>
-<translation id="2946640296642327832">Aktifkan Bluetooth</translation>
-<translation id="6459472438155181876">Memperpanjang layar ke <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Seluler</translation>
-<translation id="6596816719288285829">Alamat IP</translation>
-<translation id="4508265954913339219">Aktivasi gagal</translation>
-<translation id="3621712662352432595">Setelan Audio</translation>
-<translation id="1812696562331527143">Metode masukan Anda telah berubah menjadi <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>pihak ketiga<ph name="END_LINK"/>).
-Tekan Shift + Alt untuk beralih.</translation>
-<translation id="2127372758936585790">Pengisi daya rendah</translation>
-<translation id="3846575436967432996">Tidak tersedia informasi jaringan</translation>
-<translation id="3026237328237090306">Siapkan data seluler</translation>
-<translation id="5871632337994001636">Mengelola perangkat...</translation>
-<translation id="785750925697875037">Lihat akun seluler</translation>
-<translation id="153454903766751181">Memulai modem seluler...</translation>
-<translation id="4628814525959230255">Berbagi kontrol layar Anda dengan <ph name="HELPER_NAME"/> melalui Hangouts.</translation>
-<translation id="7864539943188674973">Nonaktifkan Bluetooth</translation>
-<translation id="939252827960237676">Gagal menyimpan tangkapan layar</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Mulai ulang untuk memperbarui</translation>
-<translation id="2268813581635650749">Keluarkan semua pengguna</translation>
-<translation id="735745346212279324">VPN terputus</translation>
-<translation id="7320906967354320621">Menganggur</translation>
-<translation id="15373452373711364">Kursor mouse besar</translation>
-<translation id="3294437725009624529">Tamu</translation>
-<translation id="8190698733819146287">Sesuaikan bahasa dan masukan...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Posisi rak</translation>
-<translation id="8676770494376880701">Pengisi daya rendah terpasang</translation>
-<translation id="7170041865419449892">Di luar jangkauan</translation>
-<translation id="4804818685124855865">Putuskan</translation>
-<translation id="2544853746127077729">Sertifikat autentikasi ditolak oleh jaringan</translation>
-<translation id="5222676887888702881">Keluar</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Konfigurasi</translation>
-<translation id="1272079795634619415">Berhenti</translation>
-<translation id="4957722034734105353">Pelajari selengkapnya...</translation>
-<translation id="2964193600955408481">Nonaktifkan Wi-Fi</translation>
-<translation id="4279490309300973883">Mencerminkan</translation>
-<translation id="7973962044839454485">Autentifikasi PDB gagal karena nama pengguna dan sandi salah</translation>
-<translation id="2509468283778169019">CAPS LOCK aktif</translation>
-<translation id="3892641579809465218">Tampilan Internal</translation>
-<translation id="7823564328645135659">Bahasa telah diubah dari &quot;<ph name="FROM_LOCALE"/>&quot; menjadi &quot;<ph name="TO_LOCALE"/>&quot; setelah menyinkronkan setelan Anda.</translation>
-<translation id="3368922792935385530">Tersambung</translation>
-<translation id="8340999562596018839">Masukan lisan</translation>
-<translation id="8654520615680304441">Aktifkan Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Metode masukan Anda telah berubah menjadi <ph name="INPUT_METHOD_ID"/>.
-Tekan Shift + Alt untuk beralih.</translation>
-<translation id="2562916301614567480">Jaringan Pribadi</translation>
-<translation id="6549021752953852991">Jaringan seluler tidak tersedia</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Monitor, sayang sekali kita tidak bisa bekerja sama. (Monitor tersebut tidak didukung)</translation>
-<translation id="6426039856985689743">Nonaktifkan data seluler</translation>
-<translation id="3087734570205094154">Bawah</translation>
-<translation id="3742055079367172538">Tangkapan layar telah diambil</translation>
-<translation id="8878886163241303700">Memperluas layar</translation>
-<translation id="5271016907025319479">VPN belum dikonfigurasi.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Kemampuan untuk membuat tangkapan layar telah dinonaktifkan oleh administrator Anda.</translation>
-<translation id="372094107052732682">Tekan Ctrl+Shift+Q dua kali untuk keluar.</translation>
-<translation id="6803622936009808957">Tidak dapat menggandakan tampilan karena tidak ditemukan resolusi yang didukung. Memasuki desktop yang diperluas sebagai gantinya.</translation>
-<translation id="1480041086352807611">Mode demo</translation>
-<translation id="3626637461649818317">Sisa <ph name="PERCENTAGE"/>%</translation>
-<translation id="9089416786594320554">Metode masukan</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">Aktivasi '<ph name="NAME"/>' membutuhkan sambungan jaringan.</translation>
-<translation id="3963445509666917109">Pengeras Suara (Internal)</translation>
-<translation id="2825619548187458965">Rak</translation>
-<translation id="2614835198358683673">Chromebook Anda mungkin tidak mengisi daya saat sedang menyala. Pertimbangkan untuk menggunakan pengisi daya resmi.</translation>
-<translation id="1895658205118569222">Mati</translation>
-<translation id="4430019312045809116">Volume</translation>
-<translation id="8681498213689260554">Mulai Ulang dan Powerwash untuk memperbarui</translation>
-<translation id="4442424173763614572">Pencarian DNS gagal</translation>
-<translation id="7874779702599364982">Menelusuri jaringan seluler...</translation>
-<translation id="583281660410589416">Tidak diketahui</translation>
-<translation id="1383876407941801731">Penelusuran</translation>
-<translation id="3901991538546252627">Menyambung ke <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Info Jaringan</translation>
-<translation id="1621499497873603021">Waktu yang tersisa hingga baterai kosong, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Keluar dari sesi tamu</translation>
-<translation id="8308637677604853869">Menu sebelumnya</translation>
-<translation id="4666297444214622512">Tidak dapat masuk ke akun lain.</translation>
-<translation id="3625258641415618104">Tangkapan layar dinonaktifkan</translation>
-<translation id="1346748346194534595">Kanan</translation>
-<translation id="1773212559869067373">Sertifikat autentikasi ditolak secara lokal</translation>
-<translation id="8528322925433439945">Seluler ...</translation>
-<translation id="7049357003967926684">Kaitan</translation>
-<translation id="8428213095426709021">Setelan</translation>
-<translation id="2372145515558759244">Menyinkronkan aplikasi...</translation>
-<translation id="7256405249507348194">Kesalahan tidak dikenal: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Pemeriksaan AAA gagal</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>.<ph name="MINUTE"/> sampai penuh</translation>
-<translation id="5787281376604286451">Masukan lisan diaktifkan.
-Tekan Ctrl+Alt+Z untuk menonaktifkan.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Kesalahan jaringan tidak dikenal</translation>
-<translation id="1467432559032391204">Kiri</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Mengaktifkan <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Klik otomatis</translation>
-<translation id="1398853756734560583">Perbesar</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: Menyambung...</translation>
-<translation id="252373100621549798">Tampilan yang Tidak Diketahui</translation>
-<translation id="1882897271359938046">Mencerminkan ke <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Dipasang ke pengisi daya rendah. Pengisian daya baterai mungkin tidak dapat diandalkan.</translation>
-<translation id="3784455785234192852">Kunci</translation>
-<translation id="2805756323405976993">Apl</translation>
-<translation id="1512064327686280138">Kegagalan aktivasi</translation>
-<translation id="5097002363526479830">Gagal menyambung ke jaringan '<ph name="NAME"/>': <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi dinonaktifkan.</translation>
-<translation id="2966449113954629791">Data seluler Anda yang diizinkan mungkin telah habis. Kunjungi portal aktivasi <ph name="NAME"/> untuk membeli data lagi.</translation>
-<translation id="8132793192354020517">Tersambung ke <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Setel wallpaper...</translation>
-<translation id="8678698760965522072">Status online</translation>
-<translation id="2532589005999780174">Mode kontras tinggi</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Kesalahan internal</translation>
-<translation id="3019353588588144572">Waktu yang tersisa hingga baterai terisi penuh, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Kaca pembesar layar</translation>
-<translation id="7005812687360380971">Kegagalan</translation>
-<translation id="882279321799040148">Klik untuk melihat</translation>
-<translation id="1753067873202720523">Chromebook Anda mungkin tidak mengisi daya ketika sedang dinyalakan.</translation>
-<translation id="5045550434625856497">Sandi salah</translation>
-<translation id="1602076796624386989">Aktifkan data seluler</translation>
-<translation id="6981982820502123353">Aksesibilitas</translation>
-<translation id="3157931365184549694">Pulihkan</translation>
-<translation id="4274292172790327596">Kesalahan tak dikenal</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>.<ph name="MINUTES"/>.<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Headphone</translation>
-<translation id="225680501294068881">Memindai perangkat...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Mikrofon (Internal)</translation>
-<translation id="4448844063988177157">Menelusuri jaringan Wi-Fi...</translation>
-<translation id="8401662262483418323">Gagal tersambung ke '<ph name="NAME"/>': <ph name="DETAILS"/>
-Pesan server: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Terjadi kesalahan</translation>
-<translation id="7229570126336867161">Memerlukan EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> adalah sesi publik yang dikelola oleh <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Gagal menyambung ke jaringan: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Keluar dari sesi</translation>
-<translation id="8454013096329229812">Wi-Fi diaktifkan.</translation>
-<translation id="4872237917498892622">Alt+Telusuri atau Shift</translation>
-<translation id="9201131092683066720">Baterai terisi <ph name="PERCENTAGE"/>%.</translation>
-<translation id="2983818520079887040">Setelan...</translation>
-<translation id="3871838685472846647">Seluler Diaktifkan</translation>
-<translation id="1195412055398077112">pemindaian berlebih</translation>
-<translation id="112308213915226829">Sembunyikan otomatis rak</translation>
-<translation id="7573962313813535744">Mode digalangkan</translation>
-<translation id="8927026611342028580">Sambungan Diminta</translation>
-<translation id="8300849813060516376">OTASP gagal</translation>
-<translation id="2792498699870441125">Alt+Telusuri</translation>
-<translation id="8660803626959853127">Menyinkronkan <ph name="COUNT"/> file</translation>
-<translation id="5958529069007801266">Pengguna yang diawasi</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK tidak aktif</translation>
-<translation id="6248847161401822652">Tekan Control Shift Q dua kali untuk keluar.</translation>
-<translation id="6785414152754474415">Baterai sudah terisi <ph name="PERCENTAGE"/>% dan masih mengisi.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Mengaktifkan...</translation>
-<translation id="4895488851634969361">Baterai penuh.</translation>
-<translation id="5947494881799873997">Kembalikan</translation>
-<translation id="7593891976182323525">Telusuri atau Shift</translation>
-<translation id="7649070708921625228">Bantuan</translation>
-<translation id="747833637904845037">Chromebook Anda tetap menyala saat terhubung ke layar eksternal, bahkan saat penutupnya tertutup.</translation>
-<translation id="3050422059534974565">CAPS LOCK aktif.
-Tekan Telusuri atau Shift untuk membatalkan.</translation>
-<translation id="397105322502079400">Menghitung...</translation>
-<translation id="158849752021629804">Memerlukan jaringan rumah</translation>
-<translation id="6857811139397017780">Aktifkan <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Pencarian DHCP gagal</translation>
-<translation id="6692173217867674490">Frasa sandi yang buruk</translation>
-<translation id="6165508094623778733">Pelajari lebih lanjut</translation>
-<translation id="9046895021617826162">Gagal menyambung</translation>
-<translation id="7168224885072002358">Mengembalikan ke resolusi lama dalam <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Sesi ini akan berakhir dalam <ph name="SESSION_TIME_REMAINING"/>. Anda akan otomatis dikeluarkan.</translation>
-<translation id="8372369524088641025">Kunci WEP yang buruk</translation>
-<translation id="6636709850131805001">Keadaan yang tidak dikenal</translation>
-<translation id="3573179567135747900">Ubah kembali ke &quot;<ph name="FROM_LOCALE"/>&quot; (harus dinyalakan ulang)</translation>
-<translation id="8103386449138765447">Pesan SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Setelan Google Drive...</translation>
-<translation id="7209101170223508707">CAPS LOCK aktif.
-Tekan Alt+Telusuri atau Shift untuk membatalkan.</translation>
-<translation id="8940956008527784070">Baterai lemah (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Terima</translation>
-<translation id="5102001756192215136">Sisa <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Keluaran</translation>
-<translation id="520760366042891468">Berbagi kontrol layar Anda melalui Hangouts.</translation>
-<translation id="8000066093800657092">Tidak ada jaringan</translation>
-<translation id="4015692727874266537">Masuk ke akun lain...</translation>
-<translation id="5941711191222866238">Perkecil</translation>
-<translation id="6911468394164995108">Bergabung dengan lainnya...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Selamat! Layanan data '<ph name="NAME"/>' Anda telah diaktifkan dan siap digunakan.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/>j <ph name="MINUTE"/>m sampai penuh</translation>
-<translation id="7297443947353982503">Nama pengguna/sandi salah atau autentikasi EAP gagal</translation>
-<translation id="6359806961507272919">SMS dari <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Operator</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_it.xtb b/chromium/ash/strings/ash_strings_it.xtb
deleted file mode 100644
index 9c7cab9a2db..00000000000
--- a/chromium/ash/strings/ash_strings_it.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="it">
-<translation id="3595596368722241419">Batteria carica</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> e <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Stato portale</translation>
-<translation id="30155388420722288">Pulsante Overflow</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth attivo</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> è stato ruotato a <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth disattivo</translation>
-<translation id="7165320105431587207">Impossibile configurare la rete</translation>
-<translation id="3775358506042162758">Puoi avere massimo tre account per l'accesso simultaneo.</translation>
-<translation id="370649949373421643">Attiva Wi-Fi</translation>
-<translation id="3626281679859535460">Luminosità</translation>
-<translation id="3621202678540785336">Ingresso</translation>
-<translation id="595202126637698455">Rilevamento del rendimento attivo</translation>
-<translation id="8054466585765276473">Calcolo della durata della batteria.</translation>
-<translation id="7982789257301363584">Rete</translation>
-<translation id="5565793151875479467">Proxy...</translation>
-<translation id="938582441709398163">Overlay tastiera</translation>
-<translation id="4387004326333427325">Certificato di autenticazione rifiutato da remoto</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">La risoluzione di <ph name="DISPLAY_NAME"/> è stata modificata in: <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">Recupero HTTP non riuscito</translation>
-<translation id="2297568595583585744">Barra di stato</translation>
-<translation id="1661867754829461514">PIN mancante</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: connessione...</translation>
-<translation id="40400351611212369">Errore di attivazione della rete</translation>
-<translation id="4237016987259239829">Errore di connessione di rete</translation>
-<translation id="2946640296642327832">Attiva Bluetooth</translation>
-<translation id="6459472438155181876">Estensione dello schermo su <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Cellulare</translation>
-<translation id="6596816719288285829">Indirizzo IP</translation>
-<translation id="4508265954913339219">Attivazione non riuscita</translation>
-<translation id="3621712662352432595">Impostazioni audio</translation>
-<translation id="1812696562331527143">Il metodo di immissione è stato cambiato in <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>3a parte<ph name="END_LINK"/>).
-Premi Maiusc+Alt per cambiare metodo.</translation>
-<translation id="2127372758936585790">Caricabatterie a basso consumo</translation>
-<translation id="3846575436967432996">Nessuna informazione di rete disponibile</translation>
-<translation id="3026237328237090306">Configura dati mobili</translation>
-<translation id="5871632337994001636">Gestisci dispositivi...</translation>
-<translation id="785750925697875037">Visualizza account per cellulari</translation>
-<translation id="153454903766751181">Inizializzazione del modem per cellulari...</translation>
-<translation id="4628814525959230255">Condivisione del controllo dello schermo con <ph name="HELPER_NAME"/> tramite Hangouts.</translation>
-<translation id="7864539943188674973">Disattiva Bluetooth</translation>
-<translation id="939252827960237676">Salvataggio dello screenshot non riuscito</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Riavvia per aggiornare</translation>
-<translation id="2268813581635650749">Disconnetti tutti</translation>
-<translation id="735745346212279324">VPN scollegata</translation>
-<translation id="7320906967354320621">In pausa</translation>
-<translation id="15373452373711364">Puntatore del mouse grande</translation>
-<translation id="3294437725009624529">Ospite</translation>
-<translation id="8190698733819146287">Personalizza lingue e immissione...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Posizione shelf</translation>
-<translation id="8676770494376880701">Caricabatterie a basso consumo collegato</translation>
-<translation id="7170041865419449892">Fuori dal raggio d'azione</translation>
-<translation id="4804818685124855865">Disconnetti</translation>
-<translation id="2544853746127077729">Certificato di autenticazione rifiutato dalla rete</translation>
-<translation id="5222676887888702881">Esci</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Configurazione</translation>
-<translation id="1272079795634619415">Interrompi</translation>
-<translation id="4957722034734105353">Ulteriori informazioni...</translation>
-<translation id="2964193600955408481">Disattiva Wi-Fi</translation>
-<translation id="4279490309300973883">Mirroring</translation>
-<translation id="7973962044839454485">Autenticazione PPP non riuscita a causa di un nome utente o una password sbagliati</translation>
-<translation id="2509468283778169019">BLOC MAIUSC è attivo</translation>
-<translation id="3892641579809465218">Display interno</translation>
-<translation id="7823564328645135659">La lingua è stata modificata da &quot;<ph name="FROM_LOCALE"/>&quot; a &quot;<ph name="TO_LOCALE"/>&quot; dopo la sincronizzazione delle impostazioni.</translation>
-<translation id="3368922792935385530">Connessa</translation>
-<translation id="8340999562596018839">Feedback vocale</translation>
-<translation id="8654520615680304441">Attiva Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Il metodo di immissione è stato cambiato in <ph name="INPUT_METHOD_ID"/>.
-Premi Maiusc+Alt per cambiare metodo.</translation>
-<translation id="2562916301614567480">Rete privata</translation>
-<translation id="6549021752953852991">Nessuna rete cellulare disponibile</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Caro monitor, non funziona tra di noi (il monitor non è supportato).</translation>
-<translation id="6426039856985689743">Disattiva dati mobili</translation>
-<translation id="3087734570205094154">In basso</translation>
-<translation id="3742055079367172538">Screenshot acquisito</translation>
-<translation id="8878886163241303700">Estensione schermo</translation>
-<translation id="5271016907025319479">VPN non configurata.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">La possibilità di effettuare screenshot è stata disabilitata dal tuo amministratore.</translation>
-<translation id="372094107052732682">Per uscire premi due volte Ctrl+Maiusc+Q.</translation>
-<translation id="6803622936009808957">Impossibile duplicare i display perché non sono state trovate risoluzioni supportate. È stato attivato il desktop esteso.</translation>
-<translation id="1480041086352807611">Modalità Demo</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% rimanente</translation>
-<translation id="9089416786594320554">Metodi di immissione</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">L'attivazione di &quot;<ph name="NAME"/>&quot; richiede una connessione di rete.</translation>
-<translation id="3963445509666917109">Altoparlante (interno)</translation>
-<translation id="2825619548187458965">Shelf</translation>
-<translation id="2614835198358683673">Il Chromebook potrebbe non ricaricarsi mentre è accesso. Prova a utilizzare il caricabatterie ufficiale.</translation>
-<translation id="1895658205118569222">Chiusura</translation>
-<translation id="4430019312045809116">Volume</translation>
-<translation id="8681498213689260554">Riavvia ed esegui Powerwash per aggiornare</translation>
-<translation id="4442424173763614572">Ricerca DNS non riuscita</translation>
-<translation id="7874779702599364982">Ricerca reti cellulari...</translation>
-<translation id="583281660410589416">Sconosciuto</translation>
-<translation id="1383876407941801731">Ricerca</translation>
-<translation id="3901991538546252627">Connessione a: <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Informazioni di rete</translation>
-<translation id="1621499497873603021">Tempo rimanente all'esaurimento della batteria: <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Esci da sessione Ospite</translation>
-<translation id="8308637677604853869">Menu precedente</translation>
-<translation id="4666297444214622512">Impossibile accedere a un altro account.</translation>
-<translation id="3625258641415618104">Screenshot disabilitati</translation>
-<translation id="1346748346194534595">Destra</translation>
-<translation id="1773212559869067373">Certificato di autenticazione rifiutato localmente</translation>
-<translation id="8528322925433439945">Reti mobili...</translation>
-<translation id="7049357003967926684">Associazione</translation>
-<translation id="8428213095426709021">Impostazioni</translation>
-<translation id="2372145515558759244">Sincronizzazione applicazioni...</translation>
-<translation id="7256405249507348194">Errore non riconosciuto: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Controllo AAA non riuscito</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> al completamento</translation>
-<translation id="5787281376604286451">Feedback vocale attivato.
-Premi Ctrl+Alt+Z per disattivarlo.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Errore di rete sconosciuto</translation>
-<translation id="1467432559032391204">Sinistra</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Attivazione di <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Clic automatici</translation>
-<translation id="1398853756734560583">Ingrandisci</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: connessione...</translation>
-<translation id="252373100621549798">Display sconosciuto</translation>
-<translation id="1882897271359938046">Mirroring su <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Collegato a un caricabatterie a basso consumo. La carica della batteria potrebbe non essere affidabile.</translation>
-<translation id="3784455785234192852">Blocca</translation>
-<translation id="2805756323405976993">Applicazioni</translation>
-<translation id="1512064327686280138">Errore di attivazione</translation>
-<translation id="5097002363526479830">Connessione alla rete &quot;<ph name="NAME"/>&quot; non riuscita: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi non attivo.</translation>
-<translation id="2966449113954629791">Potresti avere esaurito la tua quota di dati mobili. Visita il portale di attivazione <ph name="NAME"/> per acquistare altri dati.</translation>
-<translation id="8132793192354020517">Connesso a <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Imposta sfondo...</translation>
-<translation id="8678698760965522072">Stato online</translation>
-<translation id="2532589005999780174">Modalità ad alto contrasto</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Errore interno</translation>
-<translation id="3019353588588144572">Tempo rimanente al caricamento completo della batteria: <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Ingrandimento dello schermo</translation>
-<translation id="7005812687360380971">Errore</translation>
-<translation id="882279321799040148">Fai clic per visualizzare</translation>
-<translation id="1753067873202720523">Il Chromebook potrebbe non ricaricarsi mentre è acceso.</translation>
-<translation id="5045550434625856497">Password non corretta</translation>
-<translation id="1602076796624386989">Attiva dati mobili</translation>
-<translation id="6981982820502123353">Accessibilità</translation>
-<translation id="3157931365184549694">Ripristina</translation>
-<translation id="4274292172790327596">Errore non riconosciuto</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Cuffia</translation>
-<translation id="225680501294068881">Ricerca dispositivi in corso...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Microfono (interno)</translation>
-<translation id="4448844063988177157">Ricerca di reti Wi-Fi in corso...</translation>
-<translation id="8401662262483418323">Impossibile collegarsi a &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/>
-Messaggio del server: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Si è verificato un errore</translation>
-<translation id="7229570126336867161">Occorre EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> è una sessione pubblica gestita da <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Connessione alla rete non riuscita: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Esci da sessione</translation>
-<translation id="8454013096329229812">Wi-Fi attivo.</translation>
-<translation id="4872237917498892622">Alt+tasto per la ricerca o Maiusc</translation>
-<translation id="9201131092683066720">Percentuale di caricamento della batteria: <ph name="PERCENTAGE"/>%.</translation>
-<translation id="2983818520079887040">Impostazioni...</translation>
-<translation id="3871838685472846647">Attivata tramite rete cellulare</translation>
-<translation id="1195412055398077112">overscan</translation>
-<translation id="112308213915226829">Nascondi automaticamente shelf</translation>
-<translation id="7573962313813535744">Modalità dock</translation>
-<translation id="8927026611342028580">Connessione richiesta</translation>
-<translation id="8300849813060516376">OTASP non riuscito</translation>
-<translation id="2792498699870441125">Alt+tasto per la ricerca</translation>
-<translation id="8660803626959853127">Sincronizzazione di <ph name="COUNT"/> file in corso</translation>
-<translation id="5958529069007801266">Utente supervisionato</translation>
-<translation id="3709443003275901162">Più di 9</translation>
-<translation id="639644700271529076">Funzione BLOC MAIUSC non attiva</translation>
-<translation id="6248847161401822652">Per uscire premi due volte Ctrl+Maiusc+Q.</translation>
-<translation id="6785414152754474415">Percentuale di caricamento batteria: <ph name="PERCENTAGE"/>%. La batteria è in carica.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: attivazione in corso...</translation>
-<translation id="4895488851634969361">La batteria è carica.</translation>
-<translation id="5947494881799873997">Ripristina</translation>
-<translation id="7593891976182323525">Tasto per la ricerca o Maiusc</translation>
-<translation id="7649070708921625228">Guida</translation>
-<translation id="747833637904845037">Il tuo Chromebook rimane attivo quando è collegato a un monitor esterno, anche con il coperchio chiuso.</translation>
-<translation id="3050422059534974565">La funzione BLOC MAIUSC è attiva.
-Premi il tasto per la ricerca o Maiusc per annullare.</translation>
-<translation id="397105322502079400">Calcolo in corso...</translation>
-<translation id="158849752021629804">Occorre una rete domestica</translation>
-<translation id="6857811139397017780">Attiva <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Ricerca DHCP non riuscita</translation>
-<translation id="6692173217867674490">Passphrase non valida</translation>
-<translation id="6165508094623778733">Ulteriori informazioni</translation>
-<translation id="9046895021617826162">Connessione non riuscita</translation>
-<translation id="7168224885072002358">Ripristino della risoluzione precedente tra <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Questa sessione terminerà fra <ph name="SESSION_TIME_REMAINING"/>. Verrà eseguita automaticamente la disconnessione.</translation>
-<translation id="8372369524088641025">Chiave WEP non valida</translation>
-<translation id="6636709850131805001">Stato non riconosciuto</translation>
-<translation id="3573179567135747900">Torna a &quot;<ph name="FROM_LOCALE"/>&quot; (è necessario riavviare)</translation>
-<translation id="8103386449138765447">Messaggi SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Impostazioni Google Drive...</translation>
-<translation id="7209101170223508707">La funzione BLOC MAIUSC è attiva.
-Premi Alt+tasto per la ricerca o Maiusc per annullare.</translation>
-<translation id="8940956008527784070">Batteria in esaurimento (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Accetto</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> rimanenti</translation>
-<translation id="3009178788565917040">Uscita</translation>
-<translation id="520760366042891468">Condivisione del controllo dello schermo tramite Hangouts.</translation>
-<translation id="8000066093800657092">Nessuna rete</translation>
-<translation id="4015692727874266537">Accedi a un altro account...</translation>
-<translation id="5941711191222866238">Riduci a icona</translation>
-<translation id="6911468394164995108">Connetti a un'altra...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Complimenti, il tuo servizio dati &quot;<ph name="NAME"/>&quot; è stato attivato ed è pronto all'uso.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/> h e <ph name="MINUTE"/> m per completare la ricarica</translation>
-<translation id="7297443947353982503">Nome utente/password errati o autenticazione EAP non riuscita</translation>
-<translation id="6359806961507272919">SMS da <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Gestore</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_iw.xtb b/chromium/ash/strings/ash_strings_iw.xtb
deleted file mode 100644
index 8bc51983d5f..00000000000
--- a/chromium/ash/strings/ash_strings_iw.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="iw">
-<translation id="3595596368722241419">סוללה מלאה</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> ו-<ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">מצב הפורטל</translation>
-<translation id="30155388420722288">לחצן גלישה</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">‏Bluetooth מופעל</translation>
-<translation id="6310121235600822547">בוצע סיבוב של <ph name="DISPLAY_NAME"/> אל <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">‏Bluetooth מושבת</translation>
-<translation id="7165320105431587207">כשל בהגדרת התצורה של הרשת</translation>
-<translation id="3775358506042162758">ניתן לכלול עד שלושה חשבונות בלבד בכניסה עם מספר חשבונות.</translation>
-<translation id="370649949373421643">‏הפעל Wi-Fi</translation>
-<translation id="3626281679859535460">בהירות</translation>
-<translation id="3621202678540785336">קלט</translation>
-<translation id="595202126637698455">מעקב אחר הביצועים מופעל</translation>
-<translation id="8054466585765276473">מחשב זמן סוללה</translation>
-<translation id="7982789257301363584">רשת</translation>
-<translation id="5565793151875479467">‏שרת proxy...</translation>
-<translation id="938582441709398163">שכבת על של מקלדת</translation>
-<translation id="4387004326333427325">אישור האימות נדחה מרחוק</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">הרזולוציה של <ph name="DISPLAY_NAME"/> שונתה ל-<ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">‏פעולת get של HTTP נכשלה</translation>
-<translation id="2297568595583585744">מגש סטטוס</translation>
-<translation id="1661867754829461514">‏חסר PIN</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: מתחבר...</translation>
-<translation id="40400351611212369">שגיאה בהפעלת רשת</translation>
-<translation id="4237016987259239829">שגיאת חיבור רשת</translation>
-<translation id="2946640296642327832">‏הפעל Bluetooth</translation>
-<translation id="6459472438155181876">מרחיב את המסך אל <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">סלולארי</translation>
-<translation id="6596816719288285829">‏כתובת IP</translation>
-<translation id="4508265954913339219">ההפעלה נכשלה</translation>
-<translation id="3621712662352432595">הגדרות אודיו</translation>
-<translation id="1812696562331527143">‏שיטת הקלט שלך השתנתה ל-‏<ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>צד שלישי<ph name="END_LINK"/>)‎.
- הקש Shift + Alt כדי להחליף.</translation>
-<translation id="2127372758936585790">מטען בעל מתח נמוך</translation>
-<translation id="3846575436967432996">אין מידע רשת זמין</translation>
-<translation id="3026237328237090306">הגדר נתונים לנייד</translation>
-<translation id="5871632337994001636">נהל מכשירים...</translation>
-<translation id="785750925697875037">הצג את חשבון הנייד</translation>
-<translation id="153454903766751181">מאתחל מודם סלולרי...</translation>
-<translation id="4628814525959230255">‏משתף את השליטה במסך שלך עם <ph name="HELPER_NAME"/> באמצעות Hangouts.</translation>
-<translation id="7864539943188674973">‏השבת Bluetooth</translation>
-<translation id="939252827960237676">שמירת צילום המסך נכשלה</translation>
-<translation id="1969011864782743497">‏<ph name="DEVICE_NAME"/>‏ (USB)</translation>
-<translation id="3126069444801937830">הפעל מחדש כדי לעדכן</translation>
-<translation id="2268813581635650749">הוצא את כולם</translation>
-<translation id="735745346212279324">‏VPN מנותק</translation>
-<translation id="7320906967354320621">לא פעילה</translation>
-<translation id="15373452373711364">סמן עכבר גדול</translation>
-<translation id="3294437725009624529">אורח</translation>
-<translation id="8190698733819146287">התאם אישית שפה וקלט...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/>‏ (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">מיקום המדף</translation>
-<translation id="8676770494376880701">חובר מטען בעל מתח נמוך</translation>
-<translation id="7170041865419449892">מחוץ לטווח</translation>
-<translation id="4804818685124855865">נתק</translation>
-<translation id="2544853746127077729">אישור האימות נדחה על ידי הרשת</translation>
-<translation id="5222676887888702881">יציאה</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">תצורה</translation>
-<translation id="1272079795634619415">הפסק</translation>
-<translation id="4957722034734105353">למידע נוסף...</translation>
-<translation id="2964193600955408481">‏השבת Wi-Fi</translation>
-<translation id="4279490309300973883">שיקוף</translation>
-<translation id="7973962044839454485">‏אימות PPP נכשל בשל שם משתמש או סיסמה שגויים</translation>
-<translation id="2509468283778169019">‏CAPS LOCK מופעל</translation>
-<translation id="3892641579809465218">תצוגה פנימית</translation>
-<translation id="7823564328645135659">‏שפת Chrome השתנתה מ&quot;<ph name="FROM_LOCALE"/>&quot; ל&quot;<ph name="TO_LOCALE"/>&quot; לאחר סנכרון ההגדרות.</translation>
-<translation id="3368922792935385530">מחובר</translation>
-<translation id="8340999562596018839">משוב קולי</translation>
-<translation id="8654520615680304441">‏הפעל את ה-Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">‏שיטת הקלט שלך השתנתה ל-<ph name="INPUT_METHOD_ID"/>.
- הקש Shift + Alt כדי להחליף.</translation>
-<translation id="2562916301614567480">רשת פרטית</translation>
-<translation id="6549021752953852991">אין רשת סלולרית זמינה</translation>
-<translation id="2982222131142145681">‏<ph name="DEVICE_NAME"/>‏ (HDMI)</translation>
-<translation id="4379753398862151997">צג יקר, זה לא עובד בינינו. (הצג אינו נתמך)</translation>
-<translation id="6426039856985689743">השבת נתונים לנייד</translation>
-<translation id="3087734570205094154">תחתית</translation>
-<translation id="3742055079367172538">צילום המסך בוצע</translation>
-<translation id="8878886163241303700">מסך מתרחב</translation>
-<translation id="5271016907025319479">‏לא הוגדר VPN.</translation>
-<translation id="3105990244222795498">‏<ph name="DEVICE_NAME"/>‏ (Bluetooth)</translation>
-<translation id="3967919079500697218">היכולת לצלם צילומי מסך הושבתה על-ידי מנהל המערכת שלך.</translation>
-<translation id="372094107052732682">‏לחץ על Ctrl+Shift+Q פעמיים כדי לצאת.</translation>
-<translation id="6803622936009808957">לא ניתן היה לשקף מסכים מכיוון שלא נמצאה רזולוציה נתמכת. במקום זאת התצוגה עברה למצב שולחן עבודה מורחב.</translation>
-<translation id="1480041086352807611">מצב הדגמה</translation>
-<translation id="3626637461649818317">‏<ph name="PERCENTAGE"/>%‎ נותרו</translation>
-<translation id="9089416786594320554">שיטות קלט</translation>
-<translation id="6247708409970142803">%<ph name="PERCENTAGE"/></translation>
-<translation id="2670531586141364277">הפעלה של '<ph name="NAME"/>' מצריכה חיבור לרשת.</translation>
-<translation id="3963445509666917109">רמקול (פנימי)</translation>
-<translation id="2825619548187458965">מדף</translation>
-<translation id="2614835198358683673">‏ייתכן שה-Chromebook שלך לא ייטען בזמן שהוא מופעל. מומלץ להשתמש במטען הראשי.</translation>
-<translation id="1895658205118569222">כיבוי</translation>
-<translation id="4430019312045809116">עוצמת קול</translation>
-<translation id="8681498213689260554">‏הפעל מחדש ובצע פעולת Powerwash כדי לעדכן</translation>
-<translation id="4442424173763614572">‏חיפוש ה-DNS נכשל</translation>
-<translation id="7874779702599364982">מחפש רשתות סלולריות...</translation>
-<translation id="583281660410589416">לא ידוע</translation>
-<translation id="1383876407941801731">חיפוש</translation>
-<translation id="3901991538546252627">מתחבר אל: <ph name="NAME"/></translation>
-<translation id="2204305834655267233">פרטי רשת</translation>
-<translation id="1621499497873603021">הזמן שנותר עד להתרוקנות הסוללה, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">צא מהפעלת אורח</translation>
-<translation id="8308637677604853869">התפריט הקודם</translation>
-<translation id="4666297444214622512">לא ניתן להיכנס לחשבון אחר.</translation>
-<translation id="3625258641415618104">צילומי מסך מושבתים</translation>
-<translation id="1346748346194534595">ימינה</translation>
-<translation id="1773212559869067373">אישור האימות נדחה מקומית</translation>
-<translation id="8528322925433439945">נייד ...</translation>
-<translation id="7049357003967926684">שיוך</translation>
-<translation id="8428213095426709021">הגדרות</translation>
-<translation id="2372145515558759244">מסנכרן יישומים...</translation>
-<translation id="7256405249507348194">שגיאה לא מזוהה: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">‏בדיקת AAA נכשלה</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> עד שמתמלא</translation>
-<translation id="5787281376604286451">‏משוב קולי מופעל.
-הקש Ctrl+Alt+Z כדי להשבית אותו.</translation>
-<translation id="4479639480957787382">אתרנט</translation>
-<translation id="6312403991423642364">שגיאת רשת לא ידועה</translation>
-<translation id="1467432559032391204">שמאלה</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">‎0°‎</translation>
-<translation id="2354174487190027830">מפעיל את <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">לחיצות אוטומטיות</translation>
-<translation id="1398853756734560583">הגדל</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: מתחבר...</translation>
-<translation id="252373100621549798">תצוגה לא ידועה</translation>
-<translation id="1882897271359938046">משקף אל <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">מחובר למטען בעל מתח נמוך. ייתכן שטעינת הסוללה לא תהיה אמינה.</translation>
-<translation id="3784455785234192852">נעילה</translation>
-<translation id="2805756323405976993">יישומים</translation>
-<translation id="1512064327686280138">כשל בהפעלה</translation>
-<translation id="5097002363526479830">ההתחברות לרשת נכשלה '<ph name="NAME"/>': <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">‏Wi-Fi כבוי.</translation>
-<translation id="2966449113954629791">ייתכן שהשתמשת בכל מכסת הנתונים לנייד שלך. בקר בפורטל ההפעלה של <ph name="NAME"/> לרכישת נתונים נוספים.</translation>
-<translation id="8132793192354020517">מחובר ל<ph name="NAME"/></translation>
-<translation id="7052914147756339792">הגדר טפט...</translation>
-<translation id="8678698760965522072">מצב מקוון</translation>
-<translation id="2532589005999780174">מצב ניגודיות גבוהה</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>‏, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">שגיאה פנימית</translation>
-<translation id="3019353588588144572">הזמן שנותר עד לטעינה מלאה של הסוללה, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">מגדיל התצוגה</translation>
-<translation id="7005812687360380971">כשל</translation>
-<translation id="882279321799040148">לחץ להצגה</translation>
-<translation id="1753067873202720523">‏ייתכן שמכשיר Chromebook שלך לא ייטען בזמן שהוא מופעל.</translation>
-<translation id="5045550434625856497">סיסמה שגויה</translation>
-<translation id="1602076796624386989">הפעל נתונים לנייד</translation>
-<translation id="6981982820502123353">נגישות</translation>
-<translation id="3157931365184549694">שחזר</translation>
-<translation id="4274292172790327596">שגיאה לא מזוהה</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">אוזניות</translation>
-<translation id="225680501294068881">סורק לאיתור מכשירים...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">מיקרופון (פנימי)</translation>
-<translation id="4448844063988177157">‏מחפש רשתות Wi-Fi...</translation>
-<translation id="8401662262483418323">הניסיון להתחבר אל '<ph name="NAME"/>' נכשל: <ph name="DETAILS"/>
-הודעת השרת: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">אירעה שגיאה</translation>
-<translation id="7229570126336867161">‏יש צורך ב-EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> היא הפעלה ציבורית המנוהלת על ידי <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">ההתחברות לרשת נכשלה: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">צא מההפעלה</translation>
-<translation id="8454013096329229812">‏Wi-Fi מופעל.</translation>
-<translation id="4872237917498892622">‏Alt + חיפוש או Shift</translation>
-<translation id="9201131092683066720">‏הסוללה טעונה ברמה של ‎<ph name="PERCENTAGE"/>%‎.</translation>
-<translation id="2983818520079887040">הגדרות...</translation>
-<translation id="3871838685472846647">סלולרי הופעל</translation>
-<translation id="1195412055398077112">סריקת יתר</translation>
-<translation id="112308213915226829">הסתרה אוטומטית של המדף</translation>
-<translation id="7573962313813535744">מצב מעוגן</translation>
-<translation id="8927026611342028580">נשלחה בקשה לחיבור</translation>
-<translation id="8300849813060516376">‏OTASP נכשל</translation>
-<translation id="2792498699870441125">‏Alt + חיפוש</translation>
-<translation id="8660803626959853127">מסנכרן <ph name="COUNT"/> קבצים</translation>
-<translation id="5958529069007801266">משתמש בפיקוח</translation>
-<translation id="3709443003275901162">‎9+‎</translation>
-<translation id="639644700271529076">‏CAPS LOCK כבוי</translation>
-<translation id="6248847161401822652">‏לחץ פעמיים על Control Shift Q כדי לצאת.</translation>
-<translation id="6785414152754474415">‏הסוללה טעונה ברמה של ‎<ph name="PERCENTAGE"/>%‎ ומתבצעת טעינה.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: מפעיל...</translation>
-<translation id="4895488851634969361">הסוללה טעונה במלואה.</translation>
-<translation id="5947494881799873997">חזרה לגרסה הקודמת</translation>
-<translation id="7593891976182323525">‏חיפוש או Shift</translation>
-<translation id="7649070708921625228">עזרה</translation>
-<translation id="747833637904845037">‏ה-Chromebook שלך יישאר מופעל כל עוד הוא מחובר לצג חיצוני, גם כשהמכסה שלו סגור.</translation>
-<translation id="3050422059534974565">‏CAPS LOCK פועל.
-הקש על 'חיפוש' או על Shift כדי לבטל.</translation>
-<translation id="397105322502079400">מחשב...</translation>
-<translation id="158849752021629804">יש צורך ברשת ביתית</translation>
-<translation id="6857811139397017780">הפעל את <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">‏חיפוש DHCP נכשל</translation>
-<translation id="6692173217867674490">משפט-סיסמה גרוע</translation>
-<translation id="6165508094623778733">למידע נוסף</translation>
-<translation id="9046895021617826162">החיבור נכשל</translation>
-<translation id="7168224885072002358">חוזר לרזולוציה הקודמת בעוד <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">הפעילות הזו באתר תסתיים בעוד <ph name="SESSION_TIME_REMAINING"/>. תנותק אוטומטית.</translation>
-<translation id="8372369524088641025">‏מקש WEP גרוע</translation>
-<translation id="6636709850131805001">מצב לא מזוהה</translation>
-<translation id="3573179567135747900">שנה בחזרה ל&quot;<ph name="FROM_LOCALE"/>&quot; (דורש הפעלה מחדש)</translation>
-<translation id="8103386449138765447">‏הודעות SMS‏: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">‏הגדרות Google Drive...</translation>
-<translation id="7209101170223508707">‏CAPS LOCK פועל.
-הקש על Alt + 'חיפוש' או Shift כדי לבטל.</translation>
-<translation id="8940956008527784070">‏סוללה חלשה (‎<ph name="PERCENTAGE"/>%‎)</translation>
-<translation id="4918086044614829423">אשר</translation>
-<translation id="5102001756192215136">נותרו <ph name="HOUR"/> <ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">פלט</translation>
-<translation id="520760366042891468">‏משתף את השליטה במסך שלך באמצעות Hangouts.</translation>
-<translation id="8000066093800657092">אין רשת</translation>
-<translation id="4015692727874266537">הכנס חשבון אחר...</translation>
-<translation id="5941711191222866238">מזער</translation>
-<translation id="6911468394164995108">הצטרף לרשת אחרת...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>‏: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">ברכותינו! שירות הנתונים שלך, '<ph name="NAME"/>', הופעל ומוכן לשימוש.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/> שעות ו-<ph name="MINUTE"/> דקות עד לטעינה מלאה</translation>
-<translation id="7297443947353982503">‏שם משתמש/סיסמה שגויים, או שאימות EAP נכשל</translation>
-<translation id="6359806961507272919">‏SMS מאת <ph name="PHONE_NUMBER"/> </translation>
-<translation id="1244147615850840081">ספק</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_ja.xtb b/chromium/ash/strings/ash_strings_ja.xtb
deleted file mode 100644
index 13dda6db3c6..00000000000
--- a/chromium/ash/strings/ash_strings_ja.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="ja">
-<translation id="3595596368722241419">バッテリー残量: 満</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">ポータル状態</translation>
-<translation id="30155388420722288">オーバーフロー ボタン</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth オン</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> を <ph name="ROTATION"/> に回転しました</translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth オフ</translation>
-<translation id="7165320105431587207">ネットワークを設定できませんでした</translation>
-<translation id="3775358506042162758">マルチ ログインできるアカウントは 3 つまでです。</translation>
-<translation id="370649949373421643">Wi-Fi を有効にする</translation>
-<translation id="3626281679859535460">輝度</translation>
-<translation id="3621202678540785336">入力</translation>
-<translation id="595202126637698455">パフォーマンス追跡機能が有効です</translation>
-<translation id="8054466585765276473">バッテリーの残り時間を計算しています。</translation>
-<translation id="7982789257301363584">ネットワーク</translation>
-<translation id="5565793151875479467">プロキシ...</translation>
-<translation id="938582441709398163">キーボード オーバーレイ</translation>
-<translation id="4387004326333427325">認証証明書がリモートで拒否されました</translation>
-<translation id="6979158407327259162">Google ドライブ</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> の解像度を <ph name="RESOLUTION"/> に変更しました</translation>
-<translation id="6943836128787782965">HTTP を取得できませんでした</translation>
-<translation id="2297568595583585744">ステータス トレイ</translation>
-<translation id="1661867754829461514">PIN がありません</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: 接続しています...</translation>
-<translation id="40400351611212369">ネットワーク有効化エラー</translation>
-<translation id="4237016987259239829">ネットワーク接続エラー</translation>
-<translation id="2946640296642327832">Bluetooth を有効にする</translation>
-<translation id="6459472438155181876"><ph name="DISPLAY_NAME"/> へ画面を拡張しています</translation>
-<translation id="8206859287963243715">携帯電話</translation>
-<translation id="6596816719288285829">IP アドレス</translation>
-<translation id="4508265954913339219">起動に失敗しました</translation>
-<translation id="3621712662352432595">オーディオ設定</translation>
-<translation id="1812696562331527143">入力方法を <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>サードパーティ<ph name="END_LINK"/>)に変更しました。
-切り替えるには Shift+Alt キーを押します。</translation>
-<translation id="2127372758936585790">低電力の充電器</translation>
-<translation id="3846575436967432996">利用可能なネットワーク情報がありません</translation>
-<translation id="3026237328237090306">モバイル データをセットアップ</translation>
-<translation id="5871632337994001636">デバイスを管理...</translation>
-<translation id="785750925697875037">モバイル アカウントを表示</translation>
-<translation id="153454903766751181">セルラー モデムを初期化しています...</translation>
-<translation id="4628814525959230255">ハングアウトを介して画面の制御を <ph name="HELPER_NAME"/> さんと共有しています。</translation>
-<translation id="7864539943188674973">Bluetooth を無効にする</translation>
-<translation id="939252827960237676">スクリーンショットを保存できませんでした</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/>(USB)</translation>
-<translation id="3126069444801937830">再起動して更新</translation>
-<translation id="2268813581635650749">すべてログアウト</translation>
-<translation id="735745346212279324">VPN が切断されました</translation>
-<translation id="7320906967354320621">待機中</translation>
-<translation id="15373452373711364">大きいマウス カーソル</translation>
-<translation id="3294437725009624529">ゲスト</translation>
-<translation id="8190698733819146287">言語と入力方法をカスタマイズ...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/>(<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">シェルフの位置</translation>
-<translation id="8676770494376880701">低電力の充電器に接続されています</translation>
-<translation id="7170041865419449892">圏外</translation>
-<translation id="4804818685124855865">切断</translation>
-<translation id="2544853746127077729">認証証明書がネットワークによって拒否されました</translation>
-<translation id="5222676887888702881">ログアウト</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">設定</translation>
-<translation id="1272079795634619415">中止</translation>
-<translation id="4957722034734105353">詳細...</translation>
-<translation id="2964193600955408481">Wi-Fi を無効にする</translation>
-<translation id="4279490309300973883">ミラーリングしています</translation>
-<translation id="7973962044839454485">ユーザー名またはパスワードが正しくないため、PPP 認証に失敗しました</translation>
-<translation id="2509468283778169019">Caps Lock がオンになっています</translation>
-<translation id="3892641579809465218">内蔵ディスプレイ</translation>
-<translation id="7823564328645135659">設定の同期後に言語が「<ph name="FROM_LOCALE"/>」から「<ph name="TO_LOCALE"/>」に変更されました。</translation>
-<translation id="3368922792935385530">接続済み</translation>
-<translation id="8340999562596018839">音声フィードバック</translation>
-<translation id="8654520615680304441">Wi-Fi をオンにしています...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">入力方法を <ph name="INPUT_METHOD_ID"/> に変更しました。
-切り替えるには Shift+Alt キーを押します。</translation>
-<translation id="2562916301614567480">プライベート ネットワーク</translation>
-<translation id="6549021752953852991">利用可能なセルラー ネットワークがありません</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/>(HDMI)</translation>
-<translation id="4379753398862151997">Dear Monitor, it's not working out between us.(このモニターはサポートされていません)</translation>
-<translation id="6426039856985689743">モバイル データを無効にする</translation>
-<translation id="3087734570205094154">下</translation>
-<translation id="3742055079367172538">スクリーンショット撮影完了</translation>
-<translation id="8878886163241303700">画面を拡張しています</translation>
-<translation id="5271016907025319479">VPN が設定されていません。</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/>(Bluetooth)</translation>
-<translation id="3967919079500697218">スクリーンショットを撮る機能は、管理者によって無効にされています。</translation>
-<translation id="372094107052732682">終了するには Ctrl+Shift+Q を 2 回押してください。</translation>
-<translation id="6803622936009808957">サポートされている解像度が見つからなかったため、ディスプレイをミラーリングできませんでした。代わりに拡張デスクトップ モードに切り替えました。</translation>
-<translation id="1480041086352807611">デモ モード</translation>
-<translation id="3626637461649818317">残り <ph name="PERCENTAGE"/>%</translation>
-<translation id="9089416786594320554">入力方法</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">「<ph name="NAME"/>」を有効にするにはネットワークに接続する必要があります。</translation>
-<translation id="3963445509666917109">スピーカー(内蔵)</translation>
-<translation id="2825619548187458965">シェルフ</translation>
-<translation id="2614835198358683673">この充電器がオンになっている間は、Chromebook が充電されない可能性があります。正規の充電器の使用をご検討ください。</translation>
-<translation id="1895658205118569222">シャットダウン</translation>
-<translation id="4430019312045809116">音量</translation>
-<translation id="8681498213689260554">更新のため、再起動して Powerwash を実行してください</translation>
-<translation id="4442424173763614572">DNS を検索できませんでした</translation>
-<translation id="7874779702599364982">携帯電話ネットワークを検索しています...</translation>
-<translation id="583281660410589416">不明</translation>
-<translation id="1383876407941801731">検索</translation>
-<translation id="3901991538546252627"><ph name="NAME"/> に接続しています</translation>
-<translation id="2204305834655267233">ネットワーク情報</translation>
-<translation id="1621499497873603021">バッテリーが空になるまであと: <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">ゲスト セッションを終了</translation>
-<translation id="8308637677604853869">前のメニュー</translation>
-<translation id="4666297444214622512">別のアカウントにログインすることはできません。</translation>
-<translation id="3625258641415618104">スクリーンショットが無効</translation>
-<translation id="1346748346194534595">右</translation>
-<translation id="1773212559869067373">認証証明書がローカルで拒否されました</translation>
-<translation id="8528322925433439945">モバイル...</translation>
-<translation id="7049357003967926684">アソシエーション</translation>
-<translation id="8428213095426709021">設定</translation>
-<translation id="2372145515558759244">アプリの同期中...</translation>
-<translation id="7256405249507348194">不明なエラー: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA を確認できませんでした</translation>
-<translation id="8456362689280298700">フル充電まで: <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="5787281376604286451">音声フィードバックが有効です。
-無効にするには Ctrl+Alt+Z を押してください。</translation>
-<translation id="4479639480957787382">イーサネット</translation>
-<translation id="6312403991423642364">ネットワークが不明なためエラーが発生しました</translation>
-<translation id="1467432559032391204">左</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830"><ph name="NAME"/> を有効にしています</translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">自動クリック</translation>
-<translation id="1398853756734560583">最大化</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: 接続しています...</translation>
-<translation id="252373100621549798">不明なディスプレイ</translation>
-<translation id="1882897271359938046"><ph name="DISPLAY_NAME"/> へミラーリング</translation>
-<translation id="2727977024730340865">低電力の充電器に接続しています。バッテリーが充電されない可能性があります。</translation>
-<translation id="3784455785234192852">ロック</translation>
-<translation id="2805756323405976993">アプリ</translation>
-<translation id="1512064327686280138">起動失敗</translation>
-<translation id="5097002363526479830">ネットワーク「<ph name="NAME"/>」に接続できませんでした: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi が無効になりました。</translation>
-<translation id="2966449113954629791">モバイル データの割り当て量をすべて使用している可能性があります。データを追加購入するには、<ph name="NAME"/> の有効化ポータルにアクセスしてください。</translation>
-<translation id="8132793192354020517"><ph name="NAME"/> に接続しました</translation>
-<translation id="7052914147756339792">壁紙を設定...</translation>
-<translation id="8678698760965522072">オンライン状態</translation>
-<translation id="2532589005999780174">ハイコントラスト モード</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>、<ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">内部エラー</translation>
-<translation id="3019353588588144572">バッテリーがフル充電されるまであと: <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">画面拡大鏡</translation>
-<translation id="7005812687360380971">失敗</translation>
-<translation id="882279321799040148">クリックして表示</translation>
-<translation id="1753067873202720523">このメッセージが表示されているときは、Chromebook の充電はできません。</translation>
-<translation id="5045550434625856497">パスワードが正しくありません</translation>
-<translation id="1602076796624386989">モバイル データを有効にする</translation>
-<translation id="6981982820502123353">アクセシビリティ</translation>
-<translation id="3157931365184549694">復元</translation>
-<translation id="4274292172790327596">不明なエラー</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">ヘッドホン</translation>
-<translation id="225680501294068881">デバイスをスキャンしています...</translation>
-<translation id="5597451508971090205"><ph name="DATE"/> (<ph name="SHORT_WEEKDAY"/>)</translation>
-<translation id="737451040872859086">マイク(内蔵)</translation>
-<translation id="4448844063988177157">Wi-Fi ネットワークを検出しています...</translation>
-<translation id="8401662262483418323">'<ph name="NAME"/>' への接続に失敗しました: <ph name="DETAILS"/>
-サーバー メッセージ: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">エラーが発生しました</translation>
-<translation id="7229570126336867161">EVDO が必要です</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> は <ph name="DOMAIN"/> が管理する公開セッションです</translation>
-<translation id="9044646465488564462">ネットワークに接続できませんでした: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">セッションを終了</translation>
-<translation id="8454013096329229812">Wi-Fi が有効になりました。</translation>
-<translation id="4872237917498892622">Alt+ 検索/Shift</translation>
-<translation id="9201131092683066720">バッテリー残量: <ph name="PERCENTAGE"/>%。</translation>
-<translation id="2983818520079887040">設定...</translation>
-<translation id="3871838685472846647">携帯電話が有効になりました</translation>
-<translation id="1195412055398077112">オーバースキャン</translation>
-<translation id="112308213915226829">シェルフを自動的に隠す</translation>
-<translation id="7573962313813535744">ドッキング モード</translation>
-<translation id="8927026611342028580">接続をリクエスト済み</translation>
-<translation id="8300849813060516376">OTASP に失敗しました</translation>
-<translation id="2792498699870441125">Alt+ 検索</translation>
-<translation id="8660803626959853127"><ph name="COUNT"/> 個のファイルを同期中</translation>
-<translation id="5958529069007801266">監視対象ユーザー</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CapsLock 機能はオフになっています</translation>
-<translation id="6248847161401822652">終了するには Ctrl+Shift+Q を 2 回押してください。</translation>
-<translation id="6785414152754474415">バッテリー残量: <ph name="PERCENTAGE"/>%、充電しています。</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: 有効にしています...</translation>
-<translation id="4895488851634969361">バッテリー残量: 満。</translation>
-<translation id="5947494881799873997">元に戻す</translation>
-<translation id="7593891976182323525">検索/Shift</translation>
-<translation id="7649070708921625228">ヘルプ</translation>
-<translation id="747833637904845037">Chromebook は、外部ディスプレイに接続されている間、フタが閉じていても電源はオンのままとなります。</translation>
-<translation id="3050422059534974565">CapsLock がオンになっています。
-検索/Shift キーを押すと解除されます。</translation>
-<translation id="397105322502079400">計算しています...</translation>
-<translation id="158849752021629804">ホーム ネットワークが必要です</translation>
-<translation id="6857811139397017780"><ph name="NETWORKSERVICE"/> を有効にする</translation>
-<translation id="5864471791310927901">DHCP を検索できませんでした</translation>
-<translation id="6692173217867674490">パスフレーズが正しくありません</translation>
-<translation id="6165508094623778733">詳しく見る</translation>
-<translation id="9046895021617826162">接続に失敗しました</translation>
-<translation id="7168224885072002358"><ph name="TIMEOUT_SECONDS"/> 秒後に元の解像度に戻ります</translation>
-<translation id="973896785707726617">このセッションはあと <ph name="SESSION_TIME_REMAINING"/>で終了します。終了すると、自動的にログアウトします。</translation>
-<translation id="8372369524088641025">WEP キーが正しくありません</translation>
-<translation id="6636709850131805001">不明な状態</translation>
-<translation id="3573179567135747900">「<ph name="FROM_LOCALE"/>」に戻します(再起動が必要です)</translation>
-<translation id="8103386449138765447">SMS メッセージ: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Google ドライブの設定...</translation>
-<translation id="7209101170223508707">CapsLock がオンになっています。
-Alt+ 検索/Shift キーを押すと解除されます。</translation>
-<translation id="8940956008527784070">バッテリー残量: 少(<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">承諾</translation>
-<translation id="5102001756192215136">残り時間: <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">出力</translation>
-<translation id="520760366042891468">ハングアウトを介して画面の制御を共有しています。</translation>
-<translation id="8000066093800657092">ネットワーク接続なし</translation>
-<translation id="4015692727874266537">別のアカウントにログイン...</translation>
-<translation id="5941711191222866238">最小化</translation>
-<translation id="6911468394164995108">他のネットワークに接続...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">「<ph name="NAME"/>」データ サービスが有効になり、使用できるようになりました。</translation>
-<translation id="412065659894267608">フル充電まで <ph name="HOUR"/> 時間 <ph name="MINUTE"/> 分</translation>
-<translation id="7297443947353982503">ユーザー名/パスワードが正しくないか、EAP 認証に失敗しました</translation>
-<translation id="6359806961507272919"><ph name="PHONE_NUMBER"/> の SMS</translation>
-<translation id="1244147615850840081">通信会社</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_kn.xtb b/chromium/ash/strings/ash_strings_kn.xtb
deleted file mode 100644
index db937d594fb..00000000000
--- a/chromium/ash/strings/ash_strings_kn.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="kn">
-<translation id="3595596368722241419">ಬ್ಯಾಟರಿ ಭರ್ತಿಯಾಗಿದೆ</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> ಮತ್ತು <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">ಪೋರ್ಟಲ್ ಸ್ಥಿತಿ</translation>
-<translation id="30155388420722288">ಅತ್ಯಧಿಕ ಬಟನ್</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth ಸಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> ಅನ್ನು <ph name="ROTATION"/> ಗೆ ತಿರುಗಿಸಲಾಗಿದೆ</translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ</translation>
-<translation id="7165320105431587207">ನೆಟ್‌ವರ್ಕ್ ಕಾನ್ಫಿಗರ್ ಮಾಡಲು ವಿಫಲವಾಗಿದೆ</translation>
-<translation id="3775358506042162758">ಬಹು ಸೈನ್-ಇನ್‌ನಲ್ಲಿ ನೀವು ಮೂರರಷ್ಟು ಖಾತೆಗಳನ್ನು ಮಾತ್ರ ಹೊಂದಬಹುದು.</translation>
-<translation id="370649949373421643">Wi-Fi ಅನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ</translation>
-<translation id="3626281679859535460">ಪ್ರಕಾಶಮಾನ</translation>
-<translation id="3621202678540785336">ಇನ್‌ಪುಟ್</translation>
-<translation id="595202126637698455">ಕಾರ್ಯಕ್ಷಮತೆ ಟ್ರೇಸಿಂಗ್ ಸಕ್ರಿಯಗೊಂಡಿದೆ</translation>
-<translation id="8054466585765276473">ಬ್ಯಾಟರಿ ಸಮಯವನ್ನು ಲೆಕ್ಕಾಚಾರ ಮಾಡಲಾಗುತ್ತಿದೆ.</translation>
-<translation id="7982789257301363584">ನೆಟ್‌ವರ್ಕ್</translation>
-<translation id="5565793151875479467">ಪ್ರಾಕ್ಸಿ...</translation>
-<translation id="938582441709398163">ಕೀಬೋರ್ಡ್ ಒವರ್‌ಲೇ</translation>
-<translation id="4387004326333427325">ದೃಢೀಕರಣ ಪ್ರಮಾಣಪತ್ರವನ್ನು ರಿಮೋಟ್ ಆಗಿ ತಿರಸ್ಕರಿಸಲಾಗಿದೆ</translation>
-<translation id="6979158407327259162">Google ಡ್ರೈವ್‌‌</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> ರೆಸಲ್ಯೂಷನ್ ಅನ್ನು <ph name="RESOLUTION"/> ಗೆ ಬದಲಿಸಲಾಗಿದೆ</translation>
-<translation id="6943836128787782965">HTTP ವಿಫಲವಾಗಿದೆ</translation>
-<translation id="2297568595583585744">ಸ್ಥಿತಿ ಟ್ರೆ</translation>
-<translation id="1661867754829461514">PIN ಕಾಣೆಯಾಗಿದೆ</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: ಸಂಪರ್ಕಿಸಲಾಗುತ್ತಿದೆ...</translation>
-<translation id="40400351611212369">ನೆಟ್‌ವರ್ಕ್ ಸಕ್ರಿಯತೆ ದೋಷ</translation>
-<translation id="4237016987259239829">ನೆಟ್‌ವರ್ಕ್ ಸಂಪರ್ಕದ ದೋಷ</translation>
-<translation id="2946640296642327832">bluetooth ಸಕ್ರಿಯಗೊಳಿಸಿ</translation>
-<translation id="6459472438155181876"><ph name="DISPLAY_NAME"/> ಗೆ ಪರದೆಯನ್ನು ವಿಸ್ತರಿಸಲಾಗುತ್ತಿದೆ</translation>
-<translation id="8206859287963243715">ಸೆಲ್ಯುಲಾರ್</translation>
-<translation id="6596816719288285829">IP ವಿಳಾಸ</translation>
-<translation id="4508265954913339219">ಸಕ್ರಿಯಗೊಳಿಸುವಿಕೆ ವಿಫಲವಾಗಿದೆ</translation>
-<translation id="3621712662352432595">ಆಡಿಯೊ ಸೆಟ್ಟಿಂಗ್‌ಗಳು</translation>
-<translation id="1812696562331527143">ನಿಮ್ಮ ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು <ph name="INPUT_METHOD_ID"/>* ಗೆ ಬದಲಾಯಿಸಲಾಗಿದೆ (<ph name="BEGIN_LINK"/>3ನೇ ವ್ಯಕ್ತಿ<ph name="END_LINK"/>).
-ಬದಲಿಸಲು Shift + Alt ಅನ್ನು ಒತ್ತಿರಿ.</translation>
-<translation id="2127372758936585790">ಕಡಿಮೆ ವಿದ್ಯುತ್ ಚಾರ್ಜರ್</translation>
-<translation id="3846575436967432996">ನೆಟ್‌ವರ್ಕ್ ಮಾಹಿತಿ ಲಭ್ಯವಿಲ್ಲ</translation>
-<translation id="3026237328237090306">ಮೊಬೈಲ್ ಡೇಟಾವನ್ನು ಹೊಂದಿಸಿ</translation>
-<translation id="5871632337994001636">ಸಾಧನಗಳನ್ನು ನಿರ್ವಹಿಸಿ...</translation>
-<translation id="785750925697875037">ಮೊಬೈಲ್ ಖಾತೆಯನ್ನು ವೀಕ್ಷಿಸಿ</translation>
-<translation id="153454903766751181">ಸೆಲ್ಯುಲಾರ್ ಮೋಡೆಮ್ ಅನ್ನು ಪ್ರಾರಂಭಿಸಲಾಗುತ್ತಿದೆ...</translation>
-<translation id="4628814525959230255">Hangouts ಮೂಲಕ <ph name="HELPER_NAME"/> ಅವರೊಂದಿಗೆ ನಿಮ್ಮ ಪರದೆಯ ನಿಯಂತ್ರಣವನ್ನು ಹಂಚಲಾಗುತ್ತಿದೆ.</translation>
-<translation id="7864539943188674973">bluetooth ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿ</translation>
-<translation id="939252827960237676">ಸ್ಕ್ರೀನ್‌ಶಾಟ್ ಉಳಿಸುವಲ್ಲಿ ವಿಫಲವಾಗಿದೆ</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">ನವೀಕರಿಸಲು ಮರುಪ್ರಾರಂಭಿಸಿ</translation>
-<translation id="2268813581635650749">ಎಲ್ಲವನ್ನೂ ಸೈನ್ ಔಟ್ ಮಾಡಿ</translation>
-<translation id="735745346212279324">VPN ಸಂಪರ್ಕ ಕಡಿತಗೊಳಿಸಲಾಗಿದೆ</translation>
-<translation id="7320906967354320621">ಕಾರ್ಯನಿರತವಾಗಿಲ್ಲ</translation>
-<translation id="15373452373711364">ದೊಡ್ಡ ಮೌಸ್ ಕರ್ಸರ್</translation>
-<translation id="3294437725009624529">ಅತಿಥಿ</translation>
-<translation id="8190698733819146287">ಭಾಷೆಗಳು ಮತ್ತು ಇನ್‌ಪುಟ್ ಅನ್ನು ಕಸ್ಟಮೈಸ್ ಮಾಡಿ...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">ಶೆಲ್ಫ್ ಸ್ಥಾನ</translation>
-<translation id="8676770494376880701">ಕಡಿಮೆ ವಿದ್ಯುತ್ ಚಾರ್ಜರ್ ಸಂಪರ್ಕಪಡಿಸಲಾಗಿದೆ</translation>
-<translation id="7170041865419449892">ವ್ಯಾಪ್ತಿಯ ಹೊರಗೆ</translation>
-<translation id="4804818685124855865">ಡಿಸ್‌ಕನೆಕ್ಟ್</translation>
-<translation id="2544853746127077729">ದೃಢೀಕರಣ ಪ್ರಮಾಣಪತ್ರವನ್ನು ನೆಟ್‌ವರ್ಕ್‌ನಿಂದ ತಿರಸ್ಕರಿಸಲಾಗಿದೆ</translation>
-<translation id="5222676887888702881">ಸೈನ್ ಔಟ್</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">ಕಾನ್ಫಿಗರೇಶನ್</translation>
-<translation id="1272079795634619415">ನಿಲ್ಲಿಸು</translation>
-<translation id="4957722034734105353">ಇನ್ನಷ್ಟು ತಿಳಿದುಕೊಳ್ಳಿ...</translation>
-<translation id="2964193600955408481">Wi-Fi ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿ</translation>
-<translation id="4279490309300973883">ಪ್ರತಿಬಿಂಬಿಸುವಿಕೆ</translation>
-<translation id="7973962044839454485">ತಪ್ಪಾದ ಬಳಕೆದಾರ ಹೆಸರು ಮತ್ತು ಪಾಸ್‌ವರ್ಡ್‌ನಿಂದಾಗಿ PPP ದೃಢೀಕರಣ ವಿಫಲವಾಗಿದೆ</translation>
-<translation id="2509468283778169019">CAPS LOCK ಆನ್ ಆಗಿದೆ</translation>
-<translation id="3892641579809465218">ಆಂತರಿಕ ಪ್ರದರ್ಶನ</translation>
-<translation id="7823564328645135659">ನಿಮ್ಮ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಸಿಂಕ್ ಮಾಡಿದ ನಂತರ ಭಾಷೆಯನ್ನು &quot;<ph name="FROM_LOCALE"/>&quot; ನಿಂದ &quot;<ph name="TO_LOCALE"/>&quot; ಗೆ ಬದಲಾಯಿಸಲಾಗಿದೆ.</translation>
-<translation id="3368922792935385530">ಸಂಪರ್ಕಿಸಲಾಗಿದೆ</translation>
-<translation id="8340999562596018839">ಮಾತನಾಡುವ ಪ್ರತಿಕ್ರಿಯೆ</translation>
-<translation id="8654520615680304441">Wi-Fi ಆನ್ ಮಾಡಿ...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519"><ph name="INPUT_METHOD_ID"/> ಗೆ ನಿಮ್ಮ ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು ಬದಲಾಯಿಸಲಾಗಿದೆ.
- ಬದಲಿಸಲು Shift + Alt ಕೀಲಿಯನ್ನು ಒತ್ತಿರಿ.</translation>
-<translation id="2562916301614567480">ಖಾಸಗಿ ನೆಟ್‌ವರ್ಕ್‌</translation>
-<translation id="6549021752953852991">ಯಾವುದೇ ಸೆಲ್ಯುಲಾರ್ ನೆಟ್‌ವರ್ಕ್ ಲಭ್ಯವಿಲ್ಲ</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">ಆತ್ಮೀಯ ಮಾನಿಟರ್, ನಮ್ಮ ನಡುವೆ ಸರಿಹೊಂದುತ್ತಿಲ್ಲ. (ಆ ಮಾನಿಟರ್ ಬೆಂಬಲಿಸುವುದಿಲ್ಲ)</translation>
-<translation id="6426039856985689743">ಮೊಬೈಲ್ ಡೇಟಾವನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿ</translation>
-<translation id="3087734570205094154">ಕೆಳಗೆ</translation>
-<translation id="3742055079367172538">ಸ್ಕ್ರಿನ್‌ಶಾಟ್ ತೆಗೆದುಕೊಳ್ಳಲಾಗಿದೆ</translation>
-<translation id="8878886163241303700">ಪರದೆಯನ್ನು ವಿಸ್ತರಿಸಲಾಗುತ್ತಿದೆ</translation>
-<translation id="5271016907025319479">VPN ಕಾನ್ಫಿಗರ್ ಮಾಡಲಾಗಿಲ್ಲ.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">ಸ್ಕ್ರೀನ್‌ಶಾಟ್‌ಗಳನ್ನು ತೆಗೆದುಕೊಳ್ಳುವ ಸಾಮರ್ಥ್ಯವನ್ನು ನಿಮ್ಮ ನಿರ್ವಾಹಕರಿಂದ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ.</translation>
-<translation id="372094107052732682">ತೊರೆಯಲು Ctrl+Shift+Q ಅನ್ನು ಎರಡು ಬಾರಿ ಒತ್ತಿರಿ.</translation>
-<translation id="6803622936009808957">ಯಾವುದೇ ಬೆಂಬಲಿತ ಪರಿಹಾರಗಳು ಕಂಡುಬರದ ಕಾರಣ ಪ್ರದರ್ಶನಗಳನ್ನು ಪ್ರತಿಬಿಂಬಿಸಲಾಗಲಿಲ್ಲ. ಬದಲಿಗೆ ವಿಸ್ತರಿತ ಡೆಸ್ಕ್‌ಟಾಪ್ ಅನ್ನು ನಮೂದಿಸಲಾಗಿದೆ.</translation>
-<translation id="1480041086352807611">ಡೆಮೋ ಮೋಡ್</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% ಉಳಿದಿದೆ</translation>
-<translation id="9089416786594320554">ಇನ್‌ಪುಟ್ ವಿಧಾನಗಳು</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">'<ph name="NAME"/>' ನ ಸಕ್ರಿಯತೆಗೆ ನೆಟ್‌ವರ್ಕ್ ಸಂಪರ್ಕ ಅಗತ್ಯವಿದೆ.</translation>
-<translation id="3963445509666917109">ಸ್ಪೀಕರ್ (ಆಂತರಿಕ)</translation>
-<translation id="2825619548187458965">ಶೆಲ್ಫ್</translation>
-<translation id="2614835198358683673">ನಿಮ್ಮ Chromebook ಆನ್ ಆಗಿರುವಾಗ ಅದು ಚಾರ್ಜ್ ಆಗುವುದಿಲ್ಲ. ಅಧಿಕೃತ ಚಾರ್ಜರ್ ಬಳಸಿ.</translation>
-<translation id="1895658205118569222">ಶಟ್‌ಡೌನ್</translation>
-<translation id="4430019312045809116">ವಾಲ್ಯೂಮ್</translation>
-<translation id="8681498213689260554">ನವೀಕರಿಸಲು ಮರುಪ್ರಾರಂಭಿಸಿ ಮತ್ತು ಪವರ್‌ವಾಶ್ ಮಾಡಿ</translation>
-<translation id="4442424173763614572">DNS ಲುಕಪ್ ವಿಫಲವಾಗಿದೆ</translation>
-<translation id="7874779702599364982">ಸೆಲ್ಯುಲರ್ ನೆಟ್‌ವರ್ಕ್‌ಗಳಿಗಾಗಿ ಹುಡುಕುತ್ತಿದೆ...</translation>
-<translation id="583281660410589416">ಅಜ್ಞಾತ</translation>
-<translation id="1383876407941801731">ಹುಡುಕಾಟ</translation>
-<translation id="3901991538546252627"><ph name="NAME"/> ಗೆ ಸಂಪರ್ಕಿಸಲಾಗುತ್ತಿದೆ</translation>
-<translation id="2204305834655267233">ನೆಟ್‌ವರ್ಕ್ ಮಾಹಿತಿ</translation>
-<translation id="1621499497873603021">ಬ್ಯಾಟರಿ ಖಾಲಿ ಆಗುವವರೆಗೆ ಉಳಿದಿರುವ ಸಮಯ, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">ಅತಿಥಿ ಸೆಶೆನ್‌ನಿಂದ ನಿರ್ಗಮಿಸು</translation>
-<translation id="8308637677604853869">ಹಿಂದಿನ ಮೆನು</translation>
-<translation id="4666297444214622512">ಮತ್ತೊಂದು ಖಾತೆಗೆ ಸೈನ್ ಇನ್ ಮಾಡಲಾಗುವುದಿಲ್ಲ.</translation>
-<translation id="3625258641415618104">ಸ್ಕ್ರೀನ್‌ಶಾಟ್‌ಗಳನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ</translation>
-<translation id="1346748346194534595">ಬಲಕ್ಕೆ</translation>
-<translation id="1773212559869067373">ದೃಢೀಕರಣ ಪ್ರಮಾಣಪತ್ರವನ್ನು ಸ್ಥಳೀಯವಾಗಿ ತಿರಸ್ಕರಿಸಲಾಗಿದೆ</translation>
-<translation id="8528322925433439945">ಮೊಬೈಲ್...</translation>
-<translation id="7049357003967926684">ಅಸೋಸಿಯೇಷನ್</translation>
-<translation id="8428213095426709021">ಸೆಟ್ಟಿಂಗ್‌ಗಳು</translation>
-<translation id="2372145515558759244">ಅಪ್ಲಿಕೇಶನ್‌ಗಳನ್ನು ಸಿಂಕ್ ಮಾಡಲಾಗುತ್ತಿದೆ...</translation>
-<translation id="7256405249507348194">ಗುರುತಿಸದಿರುವ ದೋಷ: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA ಪರಿಶೀಲನೆ ವಿಫಲವಾಗಿದೆ</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> ಪೂರ್ಣಗೊಳ್ಳುವವರೆಗೆ</translation>
-<translation id="5787281376604286451">ಮಾತನಾಡುವ ಪ್ರತಿಕ್ರಿಯೆ ಸಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ.
-ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲು Ctrl+Alt+Z ಒತ್ತಿರಿ.</translation>
-<translation id="4479639480957787382">ಈಥರ್ನೆಟ್</translation>
-<translation id="6312403991423642364">ಅಜ್ಞಾತ ನೆಟ್‌ವರ್ಕ್ ದೋಷ</translation>
-<translation id="1467432559032391204">ಎಡಕ್ಕೆ</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830"><ph name="NAME"/> ಅನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಲಾಗುತ್ತಿದೆ</translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">ಸ್ವಯಂಚಾಲಿತ ಕ್ಲಿಕ್‌ಗಳು</translation>
-<translation id="1398853756734560583">ಗರಿಷ್ಠಗೊಳಿಸು</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: ಸಂಪರ್ಕಿಸಲಾಗುತ್ತಿದೆ...</translation>
-<translation id="252373100621549798">ಅಜ್ಞಾತ ಪ್ರದರ್ಶನ</translation>
-<translation id="1882897271359938046"><ph name="DISPLAY_NAME"/> ಗೆ ಪ್ರತಿಬಿಂಬಿಸುತ್ತಿದೆ</translation>
-<translation id="2727977024730340865">ಕಡಿಮೆ ವಿದ್ಯುತ್ ಚಾರ್ಜರ್‌ಗೆ ಪ್ಲಗ್ ಮಾಡಲಾಗಿದೆ. ಬ್ಯಾಟರಿ ಚಾರ್ಜಿಂಗ್ ವಿಶ್ವಾಸಾರ್ಹವಾಗಿಲ್ಲದಿರಬಹುದು.</translation>
-<translation id="3784455785234192852">ಲಾಕ್ ಮಾಡಿ</translation>
-<translation id="2805756323405976993">ಅಪ್ಲಿಕೇಶನ್‌ಗಳು</translation>
-<translation id="1512064327686280138">ಸಕ್ರಿಯಗೊಳಿಸುವಿಕೆ ವಿಫಲವಾಗಿದೆ</translation>
-<translation id="5097002363526479830">'<ph name="NAME"/>' ನೆಟ್‌ವರ್ಕ್‌ಗೆ ಸಂಪರ್ಕಿಸಲು ವಿಫಲವಾಗಿದೆ: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi ಆಫ್ ಮಾಡಲಾಗಿದೆ.</translation>
-<translation id="2966449113954629791">ನಿಮ್ಮ ಮೊಬೈಲ್ ಡೇಟಾ ಭತ್ಯೆಯನ್ನು ನೀವು ಬಳಸಿರಬಹುದು. ಹೆಚ್ಚಿನ ಡೇಟಾವನ್ನು ಖರೀದಿಸಲು <ph name="NAME"/> ಸಕ್ರಿಯೀಕರಣ ಪೋರ್ಟಲ್‌ಗೆ ಭೇಟಿ ನೀಡಿ.</translation>
-<translation id="8132793192354020517"><ph name="NAME"/> ಗೆ ಸಂಪರ್ಕಗೊಂಡಿದೆ</translation>
-<translation id="7052914147756339792">ವಾಲ್‌ಪೇಪರ್ ಅನ್ನು ಹೊಂದಿಸಿ...</translation>
-<translation id="8678698760965522072">ಆನ್‌ಲೈನ್ ಸ್ಥಿತಿ</translation>
-<translation id="2532589005999780174">ಉನ್ನತ ಕಾಂಟ್ರಾಸ್ಟ್ ಮೋಡ್</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">ಆಂತರಿಕ ದೋಷ</translation>
-<translation id="3019353588588144572">ಬ್ಯಾಟರಿ ಪೂರ್ಣವಾಗಿ ಚಾರ್ಜ್ ಆಗುವವರೆಗೆ ಉಳಿದಿರುವ ಸಮಯ, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">ಪರದೆ ವರ್ಧಕ</translation>
-<translation id="7005812687360380971">ವೈಫಲ್ಯ</translation>
-<translation id="882279321799040148">ವೀಕ್ಷಿಸಲು ಕ್ಲಿಕ್ ಮಾಡಿ</translation>
-<translation id="1753067873202720523">ನಿಮ್ಮ Chromebook ಆನ್ ಆಗಿರುವಾಗ ಅದು ಚಾರ್ಜ್ ಆಗುವುದಿಲ್ಲ.</translation>
-<translation id="5045550434625856497">ತಪ್ಪಾದ ಪಾಸ್‌ವರ್ಡ್</translation>
-<translation id="1602076796624386989">ಮೊಬೈಲ್ ಡೇಟಾವನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ</translation>
-<translation id="6981982820502123353">ಪ್ರವೇಶಿಸುವಿಕೆ</translation>
-<translation id="3157931365184549694">ಪುನಃಸ್ಥಾಪನೆ</translation>
-<translation id="4274292172790327596">ಗುರುತಿಸದೆ ಇರುವ ದೋಷ</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">ಹೆಡ್‌ಫೋನ್</translation>
-<translation id="225680501294068881">ಸಾಧನಗಳಿಗಾಗಿ ಸ್ಕ್ಯಾನ್ ಮಾಡಲಾಗುತ್ತಿದೆ...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">ಮೈಕ್ರೊಫೋನ್ (ಆಂತರಿಕ)</translation>
-<translation id="4448844063988177157">Wi-Fi ನೆಟ್‌ವರ್ಕ್‌ಗಳಿಗಾಗಿ ಹುಡುಕಲಾಗುತ್ತಿದೆ...</translation>
-<translation id="8401662262483418323">'<ph name="NAME"/>' ಗೆ ಸಂಪರ್ಕಪಡಿಸಲು ವಿಫಲವಾಗಿದೆ: <ph name="DETAILS"/>
-ಸರ್ವರ್ ಸಂದೇಶ: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">ದೋಷವೊಂದು ಕಾಣಿಸಿಕೊಂಡಿದೆ</translation>
-<translation id="7229570126336867161">EVDO ಅಗತ್ಯವಿದೆ</translation>
-<translation id="2999742336789313416"><ph name="DOMAIN"/> ಮೂಲಕ ನಿರ್ವಹಿಸಲಾದ ಸಾರ್ವಜನಿಕ ಸೆಶನ್ <ph name="DISPLAY_NAME"/> ಆಗಿದೆ</translation>
-<translation id="9044646465488564462">ನೆಟ್‌ವರ್ಕ್‌ಗೆ ಸಂಪರ್ಕಿಸಲು ವಿಫಲವಾಗಿದೆ: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">ಸೆಶನ್‌ನಿಂದ ನಿರ್ಗಮಿಸು</translation>
-<translation id="8454013096329229812">Wi-Fi ಆನ್ ಮಾಡಲಾಗಿದೆ.</translation>
-<translation id="4872237917498892622">Alt+ಹುಡುಕಾಟ ಅಥವಾ Shift</translation>
-<translation id="9201131092683066720">ಬ್ಯಾಟರಿ <ph name="PERCENTAGE"/>% ಪೂರ್ಣವಾಗಿದೆ.</translation>
-<translation id="2983818520079887040">ಸೆಟ್ಟಿಂಗ್‌ಗಳು...</translation>
-<translation id="3871838685472846647">ಸೆಲ್ಯುಲಾರ್ ಅನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ</translation>
-<translation id="1195412055398077112">ಓವರ್‌ಸ್ಕ್ಯಾನ್</translation>
-<translation id="112308213915226829">ಶೆಲ್ಫ್ ಅನ್ನು ಸ್ವಯಂಮರೆಮಾಡು</translation>
-<translation id="7573962313813535744">ಪರಸ್ಪರ ಸಂಧಿಸುವ ಮೋಡ್</translation>
-<translation id="8927026611342028580">ಸಂಪರ್ಕವನ್ನು ವಿನಂತಿಸಲಾಗಿದೆ</translation>
-<translation id="8300849813060516376">OTASP ವಿಫಲವಾಗಿದೆ</translation>
-<translation id="2792498699870441125">Alt+ಹುಡುಕಾಟ</translation>
-<translation id="8660803626959853127"><ph name="COUNT"/> ಫೈಲ್‌(ಗಳ) ಅನ್ನು ಸಿಂಕ್ ಮಾಡಲಾಗುತ್ತಿದೆ</translation>
-<translation id="5958529069007801266">ಮೇಲ್ವಿಚಾರಣೆಯ ಬಳಕೆದಾರರು</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK ಆಫ್ ಆಗಿದೆ</translation>
-<translation id="6248847161401822652">ತೊರೆಯಲು Control Shift Q ಅನ್ನು ಎರಡು ಬಾರಿ ಒತ್ತಿರಿ.</translation>
-<translation id="6785414152754474415">ಬ್ಯಾಟರಿ <ph name="PERCENTAGE"/>% ಪೂರ್ಣಗೊಂಡಿದೆ ಮತ್ತು ಚಾರ್ಜ್ ಆಗುತ್ತಿದೆ.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: ಸಕ್ರಿಯಗೊಳಿಸಲಾಗುತ್ತಿದೆ...</translation>
-<translation id="4895488851634969361">ಬ್ಯಾಟರಿ ತುಂಬಿದೆ.</translation>
-<translation id="5947494881799873997">ಹಿಂತಿರುಗಿಸು</translation>
-<translation id="7593891976182323525">ಹುಡುಕಾಟ ಅಥವಾ Shift</translation>
-<translation id="7649070708921625228">ಸಹಾಯ</translation>
-<translation id="747833637904845037">ಒಂದು ಆಂತರಿಕ ಪ್ರದರ್ಶನಕ್ಕೆ ನಿಮ್ಮ Chromebook ಸಂಪರ್ಕಗೊಂಡಿರುವ ಸಂದರ್ಭದಲ್ಲಿ, ಲಿಡ್ ಮುಚ್ಚಲಾಗಿದ್ದರೂ ಕೂಡ ಅನ್ ಆಗಿಯೇ ಉಳಿದಿರುತ್ತದೆ.</translation>
-<translation id="3050422059534974565">CAPS LOCK ಆನ್ ಆಗಿದೆ.
-ರದ್ದುಗೊಳಿಸಲು ಹುಡುಕಾಟ ಅಥವಾ Shift ಕೀಲಿಯನ್ನು ಒತ್ತಿರಿ.</translation>
-<translation id="397105322502079400">ಎಣಿಸಲಾಗುತ್ತಿದೆ...</translation>
-<translation id="158849752021629804">ಹೋಮ್ ನೆಟ್‌ವರ್ಕ್ ಅಗತ್ಯವಿದೆ</translation>
-<translation id="6857811139397017780">ಸಕ್ರಿಯಗೊಳಿಸಿ<ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">DHCP ಲುಕಪ್ ವಿಫಲವಾಗಿದೆ</translation>
-<translation id="6692173217867674490">ಕೆಟ್ಟ ಪಾಸ್‌ಫ್ರೇಸ್</translation>
-<translation id="6165508094623778733">ಇನ್ನಷ್ಟು ತಿಳಿಯಿರಿ</translation>
-<translation id="9046895021617826162">ಸಂಪರ್ಕವು ವಿಫಲವಾಗಿದೆ</translation>
-<translation id="7168224885072002358"><ph name="TIMEOUT_SECONDS"/> ನಲ್ಲಿ ಹಳೆಯ ರೆಸಲ್ಯೂಷನ್‌ಗೆ ಹಿಂತಿರುಗಿಸಲಾಗುತ್ತಿದೆ</translation>
-<translation id="973896785707726617">ಈ ಸೆಷನ್ <ph name="SESSION_TIME_REMAINING"/> ರಲ್ಲಿ ಮುಕ್ತಾಯಗೊಳ್ಳುತ್ತದೆ. ನಿಮ್ಮನ್ನು ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಸೈನ್ ಔಟ್ ಮಾಡಲಾಗುತ್ತದೆ.</translation>
-<translation id="8372369524088641025">ಕೆಟ್ಟ WEP ಕೀ</translation>
-<translation id="6636709850131805001">ಅಂಗೀಕಾರವಲ್ಲದ ರಾಜ್ಯ</translation>
-<translation id="3573179567135747900">&quot;<ph name="FROM_LOCALE"/>&quot; ಗೆ ಮರುಬದಲಾಯಿಸಿ (ಮರುಪ್ರಾರಂಭಿಸುವ ಅಗತ್ಯವಿದೆ)</translation>
-<translation id="8103386449138765447">SMS ಸಂದೇಶಗಳು: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Google ಡ್ರೈವ್ ಸೆಟ್ಟಿಂಗ್‌ಗಳು...</translation>
-<translation id="7209101170223508707">CAPS LOCK ಆನ್ ಆಗಿದೆ.
-ರದ್ದುಗೊಳಿಸಲು Alt+ಹುಡುಕಾಟ ಅಥವಾ Shift ಕೀಲಿಯನ್ನು ಒತ್ತಿರಿ</translation>
-<translation id="8940956008527784070">ಬ್ಯಾಟರಿ ಕಡಿಮೆ (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">ಸಮ್ಮತಿಸು</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> ಉಳಿದಿದೆ</translation>
-<translation id="3009178788565917040">ಔಟ್‌ಪುಟ್</translation>
-<translation id="520760366042891468">Hangouts ಮೂಲಕ ನಿಮ್ಮ ಪರದೆಯ ನಿಯಂತ್ರಣವನ್ನು ಹಂಚಲಾಗುತ್ತಿದೆ.</translation>
-<translation id="8000066093800657092">ನೆಟ್‌ವರ್ಕ್ ಇಲ್ಲ</translation>
-<translation id="4015692727874266537">ಮತ್ತೊಂದು ಖಾತೆಗೆ ಸೈನ್ ಇನ್ ಮಾಡಿ...</translation>
-<translation id="5941711191222866238">ಕುಗ್ಗಿಸು</translation>
-<translation id="6911468394164995108">ಇತರರನ್ನು ಸೇರಿ...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">ಅಭಿನಂದನೆಗಳು! ನಿಮ್ಮ '<ph name="NAME"/>' ಡೇಟಾ ಸೇವೆಯನ್ನು ಕ್ರಿಯಾತ್ಮಕಗೊಳಿಸಲಾಗಿದೆ ಮತ್ತು ಮುಂದುವರೆಯಲು ಸಿದ್ಧವಾಗಿದೆ.</translation>
-<translation id="412065659894267608">ಪೂರ್ಣವಾಗುವವರಗೆ <ph name="HOUR"/>ಗಂ <ph name="MINUTE"/>ನಿ</translation>
-<translation id="7297443947353982503">ಬಳಕೆದಾರಹೆಸರು/ಪಾಸ್‌ವರ್ಡ್ ಸರಿಯಾಗಿಲ್ಲ ಅಥವಾ EAP-auth ವಿಫಲವಾಗಿದೆ</translation>
-<translation id="6359806961507272919"><ph name="PHONE_NUMBER"/> ನಿಂದ SMS</translation>
-<translation id="1244147615850840081">ವಾಹಕ</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_ko.xtb b/chromium/ash/strings/ash_strings_ko.xtb
deleted file mode 100644
index 788146ef2ed..00000000000
--- a/chromium/ash/strings/ash_strings_ko.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="ko">
-<translation id="3595596368722241419">배터리 충전 완료</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/>시간 <ph name="MINUTE"/>분</translation>
-<translation id="7880025619322806991">포털 상태</translation>
-<translation id="30155388420722288">오버플로 버튼</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">블루투스를 사용함</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/>(이)가 <ph name="ROTATION"/>(으)로 회전되었습니다.</translation>
-<translation id="9074739597929991885">블루투스</translation>
-<translation id="2268130516524549846">블루투스를 사용 안 함</translation>
-<translation id="7165320105431587207">네트워크를 설정하지 못했습니다.</translation>
-<translation id="3775358506042162758">멀티 로그인 시 계정은 최대 3개까지만 사용할 수 있습니다.</translation>
-<translation id="370649949373421643">Wi-Fi 사용</translation>
-<translation id="3626281679859535460">밝기</translation>
-<translation id="3621202678540785336">입력</translation>
-<translation id="595202126637698455">성능 추적 사용 중</translation>
-<translation id="8054466585765276473">배터리 시간 계산 중</translation>
-<translation id="7982789257301363584">네트워크</translation>
-<translation id="5565793151875479467">프록시...</translation>
-<translation id="938582441709398163">키보드 오버레이</translation>
-<translation id="4387004326333427325">인증서가 원격으로 거부됨</translation>
-<translation id="6979158407327259162">Google 드라이브</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> 해상도가 <ph name="RESOLUTION"/>(으)로 변경되었습니다.</translation>
-<translation id="6943836128787782965">HTTP 실패</translation>
-<translation id="2297568595583585744">상태 표시줄</translation>
-<translation id="1661867754829461514">PIN이 없습니다.</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: 연결하는 중...</translation>
-<translation id="40400351611212369">네트워크 활성화 오류</translation>
-<translation id="4237016987259239829">네트워크 연결 오류</translation>
-<translation id="2946640296642327832">블루투스 사용</translation>
-<translation id="6459472438155181876">화면을 <ph name="DISPLAY_NAME"/>(으)로 확장</translation>
-<translation id="8206859287963243715">휴대전화</translation>
-<translation id="6596816719288285829">IP 주소</translation>
-<translation id="4508265954913339219">활성화 실패</translation>
-<translation id="3621712662352432595">오디오 설정</translation>
-<translation id="1812696562331527143">입력 방법이 <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>타사<ph name="END_LINK"/>)(으)로 변경되었습니다.
-전환하려면 Shift+Alt를 누르세요.</translation>
-<translation id="2127372758936585790">저출력 충전기</translation>
-<translation id="3846575436967432996">네트워크 정보 없음</translation>
-<translation id="3026237328237090306">모바일 데이터 설정</translation>
-<translation id="5871632337994001636">기기 관리...</translation>
-<translation id="785750925697875037">모바일 계정 표시</translation>
-<translation id="153454903766751181">휴대전화 모뎀 초기화하는 중...</translation>
-<translation id="4628814525959230255">행아웃을 통해 화면 제어를 <ph name="HELPER_NAME"/>님과 공유 중</translation>
-<translation id="7864539943188674973">블루투스 사용 안 함</translation>
-<translation id="939252827960237676">캡처화면을 저장하지 못했습니다.</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/>(USB)</translation>
-<translation id="3126069444801937830">업데이트하려면 다시 시작</translation>
-<translation id="2268813581635650749">모두 로그아웃</translation>
-<translation id="735745346212279324">VPN 연결 끊김</translation>
-<translation id="7320906967354320621">대기</translation>
-<translation id="15373452373711364">큰 마우스 커서</translation>
-<translation id="3294437725009624529">손님</translation>
-<translation id="8190698733819146287">언어 및 입력 설정...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/>(<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">서가 정렬</translation>
-<translation id="8676770494376880701">저출력 충전기 연결됨</translation>
-<translation id="7170041865419449892">범위를 벗어났습니다.</translation>
-<translation id="4804818685124855865">연결 해제</translation>
-<translation id="2544853746127077729">인증서가 네트워크에 의해 거부됨</translation>
-<translation id="5222676887888702881">로그아웃</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">설정</translation>
-<translation id="1272079795634619415">중지</translation>
-<translation id="4957722034734105353">자세히 알아보기...</translation>
-<translation id="2964193600955408481">Wi-Fi 사용 안 함</translation>
-<translation id="4279490309300973883">미러링</translation>
-<translation id="7973962044839454485">사용자 이름 또는 비밀번호가 잘못되어 PPP 인증에 실패했습니다.</translation>
-<translation id="2509468283778169019">CAPS LOCK이 켜져 있습니다.</translation>
-<translation id="3892641579809465218">내부 디스플레이</translation>
-<translation id="7823564328645135659">설정을 동기화한 뒤 Chrome의 언어가 '<ph name="FROM_LOCALE"/>'에서 '<ph name="TO_LOCALE"/>'(으)로 변경되었습니다.</translation>
-<translation id="3368922792935385530">연결됨</translation>
-<translation id="8340999562596018839">음성 피드백</translation>
-<translation id="8654520615680304441">Wi-Fi 사용...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">입력 방법이 <ph name="INPUT_METHOD_ID"/>(으)로 변경되었습니다.
-전환하려면 Shift+Alt를 누르세요.</translation>
-<translation id="2562916301614567480">사설 네트워크</translation>
-<translation id="6549021752953852991">사용 가능한 휴대전화 네트워크가 없음</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/>(HDMI)</translation>
-<translation id="4379753398862151997">확장 데스크톱에 어울리지 않는 모니터네요. (지원되지 않는 모니터입니다.)</translation>
-<translation id="6426039856985689743">모바일 데이터 사용 안함</translation>
-<translation id="3087734570205094154">맨 아래</translation>
-<translation id="3742055079367172538">찍은 캡처화면</translation>
-<translation id="8878886163241303700">화면 확대</translation>
-<translation id="5271016907025319479">VPN이 구성되지 않았습니다.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/>(블루투스)</translation>
-<translation id="3967919079500697218">관리자가 스크린샷 캡쳐 기능을 사용 중지했습니다.</translation>
-<translation id="372094107052732682">종료하려면 Ctrl+Shift+Q를 두 번 누릅니다.</translation>
-<translation id="6803622936009808957">지원되는 해상도가 없으므로 디스플레이를 그대로 반영할 수 없습니다. 대신 확장 데스크톱을 시작했습니다.</translation>
-<translation id="1480041086352807611">데모 모드</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% 남음</translation>
-<translation id="9089416786594320554">입력 방법</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">네트워크를 연결하려면 '<ph name="NAME"/>' 활성화가 필수입니다.</translation>
-<translation id="3963445509666917109">스피커(내부)</translation>
-<translation id="2825619548187458965">서가</translation>
-<translation id="2614835198358683673">Chromebook이 켜져 있으면 충전되지 않을 수 있습니다. 공식 충전기를 사용해보세요.</translation>
-<translation id="1895658205118569222">종료</translation>
-<translation id="4430019312045809116">볼륨</translation>
-<translation id="8681498213689260554">업데이트하려면 다시 시작하고 Powerwash하세요.</translation>
-<translation id="4442424173763614572">DNS 조회 실패</translation>
-<translation id="7874779702599364982">휴대전화 네트워크를 검색하는 중...</translation>
-<translation id="583281660410589416">알 수 없음</translation>
-<translation id="1383876407941801731">검색</translation>
-<translation id="3901991538546252627"><ph name="NAME"/>에 연결 중</translation>
-<translation id="2204305834655267233">네트워크 정보</translation>
-<translation id="1621499497873603021">남은 배터리 사용 시간은 <ph name="TIME_LEFT"/>입니다.</translation>
-<translation id="5980301590375426705">손님 세션 종료</translation>
-<translation id="8308637677604853869">이전 메뉴</translation>
-<translation id="4666297444214622512">다른 계정에 로그인할 수 없습니다.</translation>
-<translation id="3625258641415618104">스크린샷 캡쳐 사용 중지됨</translation>
-<translation id="1346748346194534595">오른쪽</translation>
-<translation id="1773212559869067373">인증서가 로컬로 거부됨</translation>
-<translation id="8528322925433439945">모바일 ...</translation>
-<translation id="7049357003967926684">연결</translation>
-<translation id="8428213095426709021">설정</translation>
-<translation id="2372145515558759244">앱 동기화...</translation>
-<translation id="7256405249507348194">알 수 없는 오류(<ph name="DESC"/>)입니다.</translation>
-<translation id="7925247922861151263">AAA 확인 실패</translation>
-<translation id="8456362689280298700">충전 완료까지 <ph name="HOUR"/>:<ph name="MINUTE"/> 남음</translation>
-<translation id="5787281376604286451">음성 피드백을 사용할 수 있습니다.
-사용중지하려면 Ctrl+Alt+Z를 누르세요.</translation>
-<translation id="4479639480957787382">이더넷</translation>
-<translation id="6312403991423642364">알려지지 않은 네트워크 오류</translation>
-<translation id="1467432559032391204">왼쪽</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830"><ph name="NAME"/> 활성화 중</translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">자동 클릭</translation>
-<translation id="1398853756734560583">최대화</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: 연결하는 중...</translation>
-<translation id="252373100621549798">알 수 없는 디스플레이</translation>
-<translation id="1882897271359938046"><ph name="DISPLAY_NAME"/>에 미러링</translation>
-<translation id="2727977024730340865">저출력 충전기에 연결되었습니다. 배터리 충전 상태가 불안정합니다.</translation>
-<translation id="3784455785234192852">잠금</translation>
-<translation id="2805756323405976993">애플리케이션</translation>
-<translation id="1512064327686280138">활성화 실패</translation>
-<translation id="5097002363526479830">'<ph name="NAME"/>' 네트워크에 연결하지 못했습니다: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi가 꺼져 있습니다.</translation>
-<translation id="2966449113954629791">할당되 모바일 데이터를 모두 사용한 것 같습니다. 추가 데이터를 구입하려면 <ph name="NAME"/> 활성화 포털을 방문하세요.</translation>
-<translation id="8132793192354020517"><ph name="NAME"/>에 연결됨</translation>
-<translation id="7052914147756339792">배경화면 설정...</translation>
-<translation id="8678698760965522072">온라인 상태</translation>
-<translation id="2532589005999780174">고대비 모드</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">내부 오류</translation>
-<translation id="3019353588588144572">배터리 충전이 완료될 때까지 남은 시간은 <ph name="TIME_REMAINING"/>입니다.</translation>
-<translation id="3473479545200714844">화면 돋보기</translation>
-<translation id="7005812687360380971">실패</translation>
-<translation id="882279321799040148">클릭하여 보기</translation>
-<translation id="1753067873202720523">Chromebook이 켜져 있으면 충전되지 않을 수 있습니다.</translation>
-<translation id="5045550434625856497">비밀번호가 잘못되었습니다.</translation>
-<translation id="1602076796624386989">모바일 데이터 사용</translation>
-<translation id="6981982820502123353">접근성</translation>
-<translation id="3157931365184549694">복구</translation>
-<translation id="4274292172790327596">인식할 수 없는 오류</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">헤드폰</translation>
-<translation id="225680501294068881">기기 검색 중...</translation>
-<translation id="5597451508971090205"><ph name="DATE"/> <ph name="SHORT_WEEKDAY"/></translation>
-<translation id="737451040872859086">마이크(내부)</translation>
-<translation id="4448844063988177157">Wi-Fi 네트워크를 검색하는 중...</translation>
-<translation id="8401662262483418323">'<ph name="NAME"/>'에 연결하지 못함: <ph name="DETAILS"/>
-서버 메시지: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">오류가 발생했습니다.</translation>
-<translation id="7229570126336867161">EVDO가 필요합니다.</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/>은(는) <ph name="DOMAIN"/>에서 관리하는 공개 세션입니다.</translation>
-<translation id="9044646465488564462">네트워크 연결 실패: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">세션 종료</translation>
-<translation id="8454013096329229812">Wi-Fi가 켜져 있습니다.</translation>
-<translation id="4872237917498892622">Alt+검색 또는 Shift 키</translation>
-<translation id="9201131092683066720">배터리가 <ph name="PERCENTAGE"/>% 남았습니다.</translation>
-<translation id="2983818520079887040">설정...</translation>
-<translation id="3871838685472846647">휴대전화 활성화</translation>
-<translation id="1195412055398077112">오버스캔</translation>
-<translation id="112308213915226829">서가 자동 숨김</translation>
-<translation id="7573962313813535744">고정 모드</translation>
-<translation id="8927026611342028580">연결 요청됨</translation>
-<translation id="8300849813060516376">OTASP 실패</translation>
-<translation id="2792498699870441125">Alt+검색 키</translation>
-<translation id="8660803626959853127">파일 <ph name="COUNT"/>개를 동기화 중</translation>
-<translation id="5958529069007801266">관리 대상 사용자</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK이 꺼져 있음</translation>
-<translation id="6248847161401822652">종료하려면 Ctrl+Shift+Q를 두 번 누릅니다.</translation>
-<translation id="6785414152754474415">배터리가 <ph name="PERCENTAGE"/>% 충전되었으며 충전 중입니다.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: 활성화 중...</translation>
-<translation id="4895488851634969361">배터리 충전이 완료되었습니다.</translation>
-<translation id="5947494881799873997">되돌리기</translation>
-<translation id="7593891976182323525">검색 또는 Shift 키</translation>
-<translation id="7649070708921625228">도움말</translation>
-<translation id="747833637904845037">Chromebook이 외부 디스플레이에 연결되어 있는 동안은 덮개를 닫아도 전원이 켜진 채로 유지됩니다.</translation>
-<translation id="3050422059534974565">CAPS LOCK이 켜져 있습니다.
-취소하려면 검색 또는 Shift 키를 누릅니다.</translation>
-<translation id="397105322502079400">계산 중...</translation>
-<translation id="158849752021629804">홈 네크워크가 필요합니다.</translation>
-<translation id="6857811139397017780"><ph name="NETWORKSERVICE"/> 활성화</translation>
-<translation id="5864471791310927901">DHCP 조회 실패</translation>
-<translation id="6692173217867674490">잘못된 암호</translation>
-<translation id="6165508094623778733">자세히 알아보기</translation>
-<translation id="9046895021617826162">연결 실패</translation>
-<translation id="7168224885072002358"><ph name="TIMEOUT_SECONDS"/>초 후 기존 해상도로 돌아갑니다.</translation>
-<translation id="973896785707726617">이 세션은 <ph name="SESSION_TIME_REMAINING"/> 후에 종료되어 자동으로 로그아웃됩니다.</translation>
-<translation id="8372369524088641025">잘못된 WEP 키</translation>
-<translation id="6636709850131805001">인식할 수 없는 상태</translation>
-<translation id="3573179567135747900">'<ph name="FROM_LOCALE"/>'(으)로 다시 변경(다시 시작해야 함)</translation>
-<translation id="8103386449138765447">SMS 메시지: <ph name="MESSAGE_COUNT"/>개</translation>
-<translation id="5045002648206642691">Google 문서함 설정...</translation>
-<translation id="7209101170223508707">CAPS LOCK이 켜져 있습니다.
-취소하려면 Alt+검색 또는 Shift 키를 누릅니다.</translation>
-<translation id="8940956008527784070">배터리 부족(<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">수락</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> 남음</translation>
-<translation id="3009178788565917040">출력</translation>
-<translation id="520760366042891468">행아웃을 통해 화면 제어 권한 공유 중</translation>
-<translation id="8000066093800657092">네트워크 없음</translation>
-<translation id="4015692727874266537">다른 계정에 로그인...</translation>
-<translation id="5941711191222866238">최소화</translation>
-<translation id="6911468394164995108">다른 네트워크에 연결</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">축하합니다. '<ph name="NAME"/>' 데이터 서비스가 활성화되어 사용할 수 있습니다.</translation>
-<translation id="412065659894267608">충전 완료까지 <ph name="HOUR"/>시간 <ph name="MINUTE"/>분 남음</translation>
-<translation id="7297443947353982503">사용자 이름 또는 비밀번호가 잘못되었거나 EAP 인증에 실패했습니다.</translation>
-<translation id="6359806961507272919"><ph name="PHONE_NUMBER"/>에서 전송된 SMS</translation>
-<translation id="1244147615850840081">네트워크 사업자</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_lt.xtb b/chromium/ash/strings/ash_strings_lt.xtb
deleted file mode 100644
index 69a40ebdf30..00000000000
--- a/chromium/ash/strings/ash_strings_lt.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="lt">
-<translation id="3595596368722241419">Akumuliatorius įkrautas</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Portalo būsena</translation>
-<translation id="30155388420722288">Perpildymo mygtukas</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">„Bluetooth“ įgalinta</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> pakeista į <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">„Bluetooth“ neleidžiama</translation>
-<translation id="7165320105431587207">Nepavyko sukonfigūruoti tinklo</translation>
-<translation id="3775358506042162758">Naudodami kelių paskyrų funkciją, galite turėti iki trijų paskyrų.</translation>
-<translation id="370649949373421643">Įgalinti „Wi-Fi“</translation>
-<translation id="3626281679859535460">Skaistis</translation>
-<translation id="3621202678540785336">Įvestis</translation>
-<translation id="595202126637698455">Įgalintas našumo stebėjimas</translation>
-<translation id="8054466585765276473">Apskaičiuojamas laikas, likęs iki akumuliatoriaus išsikrovimo.</translation>
-<translation id="7982789257301363584">Tinklas</translation>
-<translation id="5565793151875479467">Įgaliotasis serveris...</translation>
-<translation id="938582441709398163">Klaviatūros perdanga</translation>
-<translation id="4387004326333427325">Autentifikavimo sertifikatas atmestas nuotoliniu būdu</translation>
-<translation id="6979158407327259162">„Google“ diskas</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> skyra pakeista į <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">Įvyko HTTP klaida</translation>
-<translation id="2297568595583585744">Būsenos dėklas</translation>
-<translation id="1661867754829461514">Trūksta PIN kodo</translation>
-<translation id="4508225577814909926">„<ph name="NAME"/>“: jungiamasi...</translation>
-<translation id="40400351611212369">Tinklo aktyvinimo klaida</translation>
-<translation id="4237016987259239829">Tinklo ryšio klaida</translation>
-<translation id="2946640296642327832">Įgalinti „Bluetooth“</translation>
-<translation id="6459472438155181876">Ekranas išplečiamas į <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Mobilusis</translation>
-<translation id="6596816719288285829">IP adresas</translation>
-<translation id="4508265954913339219">Nepavyko suaktyvinti</translation>
-<translation id="3621712662352432595">Garso nustatymai</translation>
-<translation id="1812696562331527143">Įvesties metodas pakeistas į <ph name="INPUT_METHOD_ID"/>* (<ph name="BEGIN_LINK"/>trečioji šalis<ph name="END_LINK"/>).
- Jei norite perjungti, paspauskite „Shift“ + „Alt“.</translation>
-<translation id="2127372758936585790">Mažos galios įkroviklis</translation>
-<translation id="3846575436967432996">Nėra tinklo informacijos</translation>
-<translation id="3026237328237090306">Nustatyti duomenis mobiliesiems</translation>
-<translation id="5871632337994001636">Tvarkyti įrenginius...</translation>
-<translation id="785750925697875037">Žiūrėti paskyrą mobiliesiems</translation>
-<translation id="153454903766751181">Inicijuojamas korinio ryšio modemas...</translation>
-<translation id="4628814525959230255">Jūsų ekrano valdymas bendrinamas su <ph name="HELPER_NAME"/> per „Hangout“.</translation>
-<translation id="7864539943188674973">Neleisti „Bluetooth“</translation>
-<translation id="939252827960237676">Išsaugant ekrano kopiją įvyko klaida</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Paleisti iš naujo, kad būtų atnaujinta</translation>
-<translation id="2268813581635650749">Atjungti visus</translation>
-<translation id="735745346212279324">VPN atjungtas</translation>
-<translation id="7320906967354320621">Neveikia</translation>
-<translation id="15373452373711364">Didelis pelės žymeklis</translation>
-<translation id="3294437725009624529">Svečias</translation>
-<translation id="8190698733819146287">Tinkinti kalbas ir įvestį...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Lentynos pozicija</translation>
-<translation id="8676770494376880701">Prijungtas mažos galios įkroviklis</translation>
-<translation id="7170041865419449892">Nepasiekiama</translation>
-<translation id="4804818685124855865">Atsijungti</translation>
-<translation id="2544853746127077729">Autentifikavimo sertifikatą atmetė tinklas</translation>
-<translation id="5222676887888702881">Atsijungti</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Konfigūracija</translation>
-<translation id="1272079795634619415">Sustabdyti</translation>
-<translation id="4957722034734105353">Sužinokite daugiau...</translation>
-<translation id="2964193600955408481">Neleisti „Wi-Fi“</translation>
-<translation id="4279490309300973883">Dubliuojama</translation>
-<translation id="7973962044839454485">Nepavyko autentifikuoti PGP dėl netinkamo naudotojo vardo ar slaptažodžio</translation>
-<translation id="2509468283778169019">DIDŽIŲJŲ RAIDŽIŲ RAŠYMAS įjungtas</translation>
-<translation id="3892641579809465218">Vidinė pateiktis</translation>
-<translation id="7823564328645135659">Po nustatymų sinchronizavimo kalba pakeista iš <ph name="FROM_LOCALE"/> į <ph name="TO_LOCALE"/>.</translation>
-<translation id="3368922792935385530">Prijungta</translation>
-<translation id="8340999562596018839">Žodiniai atsiliepimai</translation>
-<translation id="8654520615680304441">Įjungti „Wi-Fi“...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Įvesties metodas pakeistas į <ph name="INPUT_METHOD_ID"/>.
- Jei norite perjungti, paspauskite „Shift“ + „Alt“.</translation>
-<translation id="2562916301614567480">Privatus tinklas</translation>
-<translation id="6549021752953852991">Nėra jokių pasiekiamų korinio ryšio tinklų</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Mielas monitoriau, mums nepavyksta bendradarbiauti. (Tas monitorius nepalaikomas)</translation>
-<translation id="6426039856985689743">Neleisti duomenų mobiliesiems</translation>
-<translation id="3087734570205094154">Apačia</translation>
-<translation id="3742055079367172538">Ekrano kopija padaryta</translation>
-<translation id="8878886163241303700">Išplečiamas ekranas</translation>
-<translation id="5271016907025319479">VPN nesukonfigūruotas.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> („Bluetooth“)</translation>
-<translation id="3967919079500697218">Jūsų administratorius išjungė ekrano kopijų kūrimo funkciją.</translation>
-<translation id="372094107052732682">Jei norite išeiti, du kartus paspauskite „Ctrl“ + „Shift“ + Q.</translation>
-<translation id="6803622936009808957">Nepavyko dubliuoti vaizdų, nes nepavyko rasti palaikomų skyrų. Vietoje to įjungtas išplėstinio darbalaukio režimas.</translation>
-<translation id="1480041086352807611">Demonstracinės versijos režimas</translation>
-<translation id="3626637461649818317">Liko <ph name="PERCENTAGE"/> proc.</translation>
-<translation id="9089416786594320554">Įvesties metodai</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/> %</translation>
-<translation id="2670531586141364277">Norint suaktyvinti „<ph name="NAME"/>“ būtinas tinklo ryšys.</translation>
-<translation id="3963445509666917109">Garsiakalbis (vidinis)</translation>
-<translation id="2825619548187458965">Lentyna</translation>
-<translation id="2614835198358683673">„Chromebook“ gali nebūti įkraunamas, kai jis įjungtas. Apsvarstykite galimybę naudoti originalų įkroviklį.</translation>
-<translation id="1895658205118569222">Išjungimas</translation>
-<translation id="4430019312045809116">Apimtis</translation>
-<translation id="8681498213689260554">Kad atnaujintumėte, paleiskite iš naujo ir naudokite „Powerwash“</translation>
-<translation id="4442424173763614572">Įvyko DNS paieškos klaida</translation>
-<translation id="7874779702599364982">Ieškoma korinio ryšio tinklų...</translation>
-<translation id="583281660410589416">Nežinoma</translation>
-<translation id="1383876407941801731">Ieškoti</translation>
-<translation id="3901991538546252627">Jungiamasi prie „<ph name="NAME"/>“</translation>
-<translation id="2204305834655267233">Tinklo informacija</translation>
-<translation id="1621499497873603021">Laikas, likęs iki akumuliatoriaus išsikrovimo: <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Išeiti iš svečio režimo</translation>
-<translation id="8308637677604853869">Ankstesnis meniu</translation>
-<translation id="4666297444214622512">Negalima prisijungti prie kitos paskyros.</translation>
-<translation id="3625258641415618104">Ekrano kopijos išjungtos</translation>
-<translation id="1346748346194534595">Dešinė</translation>
-<translation id="1773212559869067373">Autentifikavimo sertifikatas atmestas vietiniu mastu</translation>
-<translation id="8528322925433439945">Mobilusis...</translation>
-<translation id="7049357003967926684">Bendrovė</translation>
-<translation id="8428213095426709021">Nustatymai</translation>
-<translation id="2372145515558759244">Sinchronizuojamos programos...</translation>
-<translation id="7256405249507348194">Neatpažinta klaida: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA patikra nepavyko</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>.<ph name="MINUTE"/> iki visiško įkrovimo</translation>
-<translation id="5787281376604286451">Žodiniai atsiliepimai įgalinti.
-Jei norite neleisti, paspauskite „Ctrl“ + „Alt“ + Z.</translation>
-<translation id="4479639480957787382">Eternetas</translation>
-<translation id="6312403991423642364">Nežinoma tinklo klaida</translation>
-<translation id="1467432559032391204">Kairė</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Aktyvinamas „<ph name="NAME"/>“</translation>
-<translation id="8814190375133053267">WI-Fi</translation>
-<translation id="1923539912171292317">Automatiniai paspaudimai</translation>
-<translation id="1398853756734560583">Išskleisti</translation>
-<translation id="2692809339924654275">„<ph name="BLUETOOTH"/>“: jungiamasi...</translation>
-<translation id="252373100621549798">Nežinoma pateiktis</translation>
-<translation id="1882897271359938046">Dubliuojama <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Prijungtas mažos galios įkroviklis. Akumuliatoriaus įkrovimas gali būti nepatikimas.</translation>
-<translation id="3784455785234192852">Užrakinti</translation>
-<translation id="2805756323405976993">Programos</translation>
-<translation id="1512064327686280138">Aktyvinimo triktis</translation>
-<translation id="5097002363526479830">Nepavyko prisijungti prie tinklo „<ph name="NAME"/>“: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">„Wi-Fi“ ryšys išjungtas.</translation>
-<translation id="2966449113954629791">Gali būti, kad pasiekėte mobiliojo ryšio duomenų apribojimą. Apsilankykite „<ph name="NAME"/>“ suaktyvinimo portale, kad įsigytumėte daugiau duomenų.</translation>
-<translation id="8132793192354020517">Prisijungta prie „<ph name="NAME"/>“</translation>
-<translation id="7052914147756339792">Nustatyti darbalaukio foną...</translation>
-<translation id="8678698760965522072">Būsena „Prisijungus“</translation>
-<translation id="2532589005999780174">Didelio kontrasto režimas</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Vidinė klaida</translation>
-<translation id="3019353588588144572">Laikas, likęs iki akumuliatoriaus įkrovimo: <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Ekrano didintuvas</translation>
-<translation id="7005812687360380971">Nepavyko</translation>
-<translation id="882279321799040148">Jei norite peržiūrėti, spustelėkite</translation>
-<translation id="1753067873202720523">„Chromebook“ gali būti neįkraunamas, kai jis įjungtas.</translation>
-<translation id="5045550434625856497">Netinkamas slaptažodis</translation>
-<translation id="1602076796624386989">Įgalinti duomenis mobiliesiems</translation>
-<translation id="6981982820502123353">Pritaikymas neįgaliesiems</translation>
-<translation id="3157931365184549694">Atkurti</translation>
-<translation id="4274292172790327596">Neatpažįstama klaida</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Ausinės</translation>
-<translation id="225680501294068881">Ieškoma įrenginių...</translation>
-<translation id="5597451508971090205"><ph name="DATE"/>, <ph name="SHORT_WEEKDAY"/></translation>
-<translation id="737451040872859086">Mikrofonas (vidinis)</translation>
-<translation id="4448844063988177157">Ieškoma „Wi-Fi“ tinklų...</translation>
-<translation id="8401662262483418323">Nepavyko prisijungti prie „<ph name="NAME"/>“: <ph name="DETAILS"/>
-Serverio pranešimas: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Įvyko klaida</translation>
-<translation id="7229570126336867161">Reikia EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> yra vieša sesija, valdoma <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Nepavyko prisijungti prie tinklo: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Išeiti iš sesijos</translation>
-<translation id="8454013096329229812">„Wi-Fi“ ryšys įjungtas.</translation>
-<translation id="4872237917498892622">„Alt“ + paieškos arba antrojo lygio klavišas</translation>
-<translation id="9201131092683066720">Likusi akumuliatoriaus įkrova: <ph name="PERCENTAGE"/> %.</translation>
-<translation id="2983818520079887040">Nustatymai...</translation>
-<translation id="3871838685472846647">Suaktyvintas korinis ryšys</translation>
-<translation id="1195412055398077112">sritis aplink vaizdo kraštus</translation>
-<translation id="112308213915226829">Automatiškai slėpti lentyną</translation>
-<translation id="7573962313813535744">Doko režimas</translation>
-<translation id="8927026611342028580">Pateikta prisijungimo užklausa</translation>
-<translation id="8300849813060516376">OTASP nepavyko</translation>
-<translation id="2792498699870441125">„Alt“ + paieškos klavišas</translation>
-<translation id="8660803626959853127">Sinchronizuojamas (-i) <ph name="COUNT"/> failas (-ai)</translation>
-<translation id="5958529069007801266">Prižiūrimas naudotojas</translation>
-<translation id="3709443003275901162">Daugiau nei 9</translation>
-<translation id="639644700271529076">DIDŽIŲJŲ RAIDŽIŲ RAŠYMAS išjungtas</translation>
-<translation id="6248847161401822652">Jei norite išeiti, du kartus paspauskite „Control“ + „Shift“ + Q.</translation>
-<translation id="6785414152754474415">Likusi akumuliatoriaus įkrova: <ph name="PERCENTAGE"/> %. Jis įkraunamas.</translation>
-<translation id="6267036997247669271">„<ph name="NAME"/>“: aktyvinama...</translation>
-<translation id="4895488851634969361">Akumuliatorius visiškai įkrautas.</translation>
-<translation id="5947494881799873997">Grąžinti</translation>
-<translation id="7593891976182323525">Paieškos arba antrojo lygio klavišas</translation>
-<translation id="7649070708921625228">Žinynas</translation>
-<translation id="747833637904845037">„Chromebook“ įrenginys bus įjungtas, kol bus prijungtas prie išorinio ekrano, net jei jis uždarytas.</translation>
-<translation id="3050422059534974565">DIDŽIŲJŲ RAIDŽIŲ RAŠYMAS įjungtas.
-Jei norite atšaukti, paspauskite paieškos arba antrojo lygio klavišą.</translation>
-<translation id="397105322502079400">Skaičiuojama...</translation>
-<translation id="158849752021629804">Reikalingas namų tinklas</translation>
-<translation id="6857811139397017780">Suaktyvinti „<ph name="NETWORKSERVICE"/>“</translation>
-<translation id="5864471791310927901">DHCP paieška nepavyko</translation>
-<translation id="6692173217867674490">Netinkama slaptafrazė</translation>
-<translation id="6165508094623778733">Sužinokite daugiau</translation>
-<translation id="9046895021617826162">Nepavyko prisijungti</translation>
-<translation id="7168224885072002358">Po <ph name="TIMEOUT_SECONDS"/> bus grąžinta sena skyra</translation>
-<translation id="973896785707726617">Ši sesija baigsis po <ph name="SESSION_TIME_REMAINING"/>. Būsite automatiškai atjungti.</translation>
-<translation id="8372369524088641025">Netinkamas WEP raktas</translation>
-<translation id="6636709850131805001">Neatpažinta būsena</translation>
-<translation id="3573179567135747900">Pakeisti atgal į „<ph name="FROM_LOCALE"/>“ (reikia paleisti iš naujo)</translation>
-<translation id="8103386449138765447">SMS pranešimų: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">„Google“ disko nustatymai...</translation>
-<translation id="7209101170223508707">DIDŽIŲJŲ RAIDŽIŲ RAŠYMAS įjungtas.
-Jei norite atšaukti, paspauskite „Alt“ + paieškos klavišas arba „Alt“ + antrojo lygio klavišas.</translation>
-<translation id="8940956008527784070">Akumuliatorius senka (<ph name="PERCENTAGE"/> %)</translation>
-<translation id="4918086044614829423">Priimti</translation>
-<translation id="5102001756192215136">Liko <ph name="HOUR"/>.<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Išvestis</translation>
-<translation id="520760366042891468">Jūsų ekrano valdymas bendrinamas per „Hangout“.</translation>
-<translation id="8000066093800657092">Tinklo nėra</translation>
-<translation id="4015692727874266537">Prisijungti prie kitos paskyros...</translation>
-<translation id="5941711191222866238">Sumažinti</translation>
-<translation id="6911468394164995108">Prisijungti prie kito...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Sveikiname! Jūsų „<ph name="NAME"/>“ duomenų paslauga buvo suaktyvinta ir yra paruošta naudoti.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/> val. <ph name="MINUTE"/> min. iki visiško įkrovimo</translation>
-<translation id="7297443947353982503">Naudotojo vardas / slaptažodis netinkamas arba EAP autentifikavimas nepavyko</translation>
-<translation id="6359806961507272919">SMS iš <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Operatorius</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_lv.xtb b/chromium/ash/strings/ash_strings_lv.xtb
deleted file mode 100644
index 060461fb765..00000000000
--- a/chromium/ash/strings/ash_strings_lv.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="lv">
-<translation id="3595596368722241419">Akumulators pilns</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> un <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Portāla statuss</translation>
-<translation id="30155388420722288">Pārpildes poga</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth iespējots</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> tika pagriezts šādi: <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth atspējots</translation>
-<translation id="7165320105431587207">Neizdevās konfigurēt tīklu</translation>
-<translation id="3775358506042162758">Vairākkārtējas pierakstīšanās laikā var izmantot ne vairāk kā trīs kontus.</translation>
-<translation id="370649949373421643">Iespējot Wi-Fi</translation>
-<translation id="3626281679859535460">Spilgtums</translation>
-<translation id="3621202678540785336">Ievade</translation>
-<translation id="595202126637698455">Veiktspējas izsekošana ir iespējota</translation>
-<translation id="8054466585765276473">Notiek akumulatora darbības ilguma aprēķināšana.</translation>
-<translation id="7982789257301363584">Tīkls</translation>
-<translation id="5565793151875479467">Starpniekserveris...</translation>
-<translation id="938582441709398163">Tastatūras pārklājums</translation>
-<translation id="4387004326333427325">Autentifikācijas sertifikāts tika attāli noraidīts.</translation>
-<translation id="6979158407327259162">Google disks</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> izšķirtspēja tika mainīta uz <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">Neizdevās iegūt HTTP</translation>
-<translation id="2297568595583585744">Statusa tekne</translation>
-<translation id="1661867754829461514">Trūkst PIN koda</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: notiek savienojuma izveide...</translation>
-<translation id="40400351611212369">Tīkla aktivizācijas kļūda</translation>
-<translation id="4237016987259239829">Tīkla savienojuma kļūda</translation>
-<translation id="2946640296642327832">Iespējot Bluetooth</translation>
-<translation id="6459472438155181876">Paplašina ekrānu uz: <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Mobilais tālrunis</translation>
-<translation id="6596816719288285829">IP adrese</translation>
-<translation id="4508265954913339219">Aktivizācija neizdevās</translation>
-<translation id="3621712662352432595">Audio iestatījumi</translation>
-<translation id="1812696562331527143">Ievades metode ir mainīta uz <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>trešā puse<ph name="END_LINK"/>).
-Lai to pārslēgtu, nospiediet taustiņu kombināciju Shift+Alt.</translation>
-<translation id="2127372758936585790">Lādētājs ar mazu strāvas padevi</translation>
-<translation id="3846575436967432996">Tīkla informācija nav pieejama.</translation>
-<translation id="3026237328237090306">Iestatīt mobilo datu pārraidi</translation>
-<translation id="5871632337994001636">Pārvaldīt ierīces...</translation>
-<translation id="785750925697875037">Skatīt mobilo kontu</translation>
-<translation id="153454903766751181">Notiek mobilā modema inicializēšana...</translation>
-<translation id="4628814525959230255">Ekrāna vadības kopīgošana ar lietotāju <ph name="HELPER_NAME"/>, izmantojot funkciju Hangouts.</translation>
-<translation id="7864539943188674973">Atspējot Bluetooth</translation>
-<translation id="939252827960237676">Neizdevās saglabāt ekrānuzņēmumu.</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Restartēt, lai atjauninātu</translation>
-<translation id="2268813581635650749">Izrakstīt visus</translation>
-<translation id="735745346212279324">VPN ir atvienots</translation>
-<translation id="7320906967354320621">Dīkstāve</translation>
-<translation id="15373452373711364">Liels peles kursors</translation>
-<translation id="3294437725009624529">Viesis</translation>
-<translation id="8190698733819146287">Pielāgot valodas un ievadi...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Plaukta pozīcija</translation>
-<translation id="8676770494376880701">Pievienots lādētājs ar mazu strāvas padevi</translation>
-<translation id="7170041865419449892">Ārpus diapazona</translation>
-<translation id="4804818685124855865">Atvienot</translation>
-<translation id="2544853746127077729">Tīkls noraidīja autentifikācijas sertifikātu.</translation>
-<translation id="5222676887888702881">Izrakstīties</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Konfigurācija</translation>
-<translation id="1272079795634619415">Apturēt</translation>
-<translation id="4957722034734105353">Uzzināt vairāk...</translation>
-<translation id="2964193600955408481">Atspējot Wi-Fi</translation>
-<translation id="4279490309300973883">Spoguļošana</translation>
-<translation id="7973962044839454485">PSP autentifikācija neizdevās nepareiza lietotājvārda un paroles dēļ.</translation>
-<translation id="2509468283778169019">Funkcija Caps Lock ir ieslēgta</translation>
-<translation id="3892641579809465218">Iekšējais displejs</translation>
-<translation id="7823564328645135659">Pēc jūsu iestatījumu sinhronizēšanas valoda ir mainīta no <ph name="FROM_LOCALE"/> uz <ph name="TO_LOCALE"/>.</translation>
-<translation id="3368922792935385530">pievienots</translation>
-<translation id="8340999562596018839">Balss komentāri</translation>
-<translation id="8654520615680304441">Ieslēgt Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Ievades metode ir mainīta uz <ph name="INPUT_METHOD_ID"/>.
-Lai to pārslēgtu, nospiediet taustiņu kombināciju Shift+Alt.</translation>
-<translation id="2562916301614567480">Privāts tīkls</translation>
-<translation id="6549021752953852991">Mobilais tīkls nav pieejams.</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Diemžēl monitoru nevar izmantot (tas netiek atbalstīts).</translation>
-<translation id="6426039856985689743">Atspējot mobilo datu pārraidi</translation>
-<translation id="3087734570205094154">Apakša</translation>
-<translation id="3742055079367172538">Ekrānuzņēmums ir uzņemts</translation>
-<translation id="8878886163241303700">Notiek ekrāna izvēršana</translation>
-<translation id="5271016907025319479">VPN nav konfigurēts.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Jūsu administrators ir atspējojis ekrānuzņēmumu veidošanu.</translation>
-<translation id="372094107052732682">Lai izietu, divas reizes nospiediet taustiņu kombināciju Ctrl+Shift+Q.</translation>
-<translation id="6803622936009808957">Nevarēja spoguļot displejus, jo netika atrasta atbalstīta izšķirtspēja. Tā vietā tika aktivizēts paplašinātās darbvirsmas režīms.</translation>
-<translation id="1480041086352807611">Demonstrācijas režīms</translation>
-<translation id="3626637461649818317">Atlikums: <ph name="PERCENTAGE"/>%</translation>
-<translation id="9089416786594320554">Ievades metodes</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277"><ph name="NAME"/> aktivizācijai ir nepieciešams tīkla savienojums.</translation>
-<translation id="3963445509666917109">Skaļrunis (iekšējais)</translation>
-<translation id="2825619548187458965">Plaukts</translation>
-<translation id="2614835198358683673">Jūsu Chromebook dators, iespējams, netiks uzlādēts, kamēr tas ir ieslēgts. Ieteicams izmantot oriģinālo lādētāju.</translation>
-<translation id="1895658205118569222">Izslēgšana</translation>
-<translation id="4430019312045809116">Skaļums</translation>
-<translation id="8681498213689260554">Lai atjauninātu, restartējiet un veiciet Powerwash</translation>
-<translation id="4442424173763614572">DNS uzmeklēšana neizdevās</translation>
-<translation id="7874779702599364982">Notiek mobilo sakaru tīklu meklēšana...</translation>
-<translation id="583281660410589416">Nezināms</translation>
-<translation id="1383876407941801731">Meklēšana</translation>
-<translation id="3901991538546252627">Notiek savienojuma izveide ar <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Tīkla informācija</translation>
-<translation id="1621499497873603021">Atlikušais akumulatora darbības laiks: <ph name="TIME_LEFT"/>.</translation>
-<translation id="5980301590375426705">Aizvērt viesa sesiju</translation>
-<translation id="8308637677604853869">Iepriekšējā izvēlne</translation>
-<translation id="4666297444214622512">Nevar pierakstīties citā kontā.</translation>
-<translation id="3625258641415618104">Ekrānuzņēmumi atspējoti</translation>
-<translation id="1346748346194534595">Pa labi</translation>
-<translation id="1773212559869067373">Autentifikācijas sertifikāts tika lokāli noraidīts.</translation>
-<translation id="8528322925433439945">Mobilās ierīces...</translation>
-<translation id="7049357003967926684">Saistība</translation>
-<translation id="8428213095426709021">Iestatījumi</translation>
-<translation id="2372145515558759244">Notiek lietotņu sinhronizēšana...</translation>
-<translation id="7256405249507348194">Neatpazīta kļūda: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA pārbaude neizdevās</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> jālādē</translation>
-<translation id="5787281376604286451">Balss komentāri ir iespējoti.
-Nospiediet Ctrl+Alt+Z, lai tos atspējotu.</translation>
-<translation id="4479639480957787382">tīkls Ethernet</translation>
-<translation id="6312403991423642364">Nezināma tīkla kļūda</translation>
-<translation id="1467432559032391204">Pa kreisi</translation>
-<translation id="5543001071567407895">Īsziņa</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Notiek <ph name="NAME"/> aktivizēšana.</translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Automātiskie klikšķi</translation>
-<translation id="1398853756734560583">Maksimizēt</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: notiek savienojuma izveide...</translation>
-<translation id="252373100621549798">Nezināms displejs</translation>
-<translation id="1882897271359938046">Spoguļo šeit: <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Pievienots lādētājs ar mazu strāvas padevi. Akumulatora uzlāde var nebūt uzticama.</translation>
-<translation id="3784455785234192852">Bloķēt</translation>
-<translation id="2805756323405976993">Lietotnes</translation>
-<translation id="1512064327686280138">Aktivizācijas kļūme</translation>
-<translation id="5097002363526479830">Neizdevās izveidot savienojumu ar tīklu <ph name="NAME"/>: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi tīkls ir izslēgts.</translation>
-<translation id="2966449113954629791">Iespējams, esat jau izmantojis savu mobilo datu atļauju. Lai iegādātos citus datus, apmeklējiet <ph name="NAME"/> aktivizācijas portālu.</translation>
-<translation id="8132793192354020517">Savienots ar <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Iestatīt fona tapeti...</translation>
-<translation id="8678698760965522072">Tiešsaistes statuss</translation>
-<translation id="2532589005999780174">Augsta kontrasta režīms</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Iekšēja kļūda</translation>
-<translation id="3019353588588144572">Pilnīgais uzlādei nepieciešamais laiks: <ph name="TIME_REMAINING"/>.</translation>
-<translation id="3473479545200714844">Ekrāna lupa</translation>
-<translation id="7005812687360380971">Kļūme</translation>
-<translation id="882279321799040148">Noklikšķiniet, lai skatītu.</translation>
-<translation id="1753067873202720523">Jūsu Chromebook dators, iespējams, netiks uzlādēts, kamēr tas ir ieslēgts.</translation>
-<translation id="5045550434625856497">Nepareiza parole</translation>
-<translation id="1602076796624386989">Iespējot mobilo datu pārraidi</translation>
-<translation id="6981982820502123353">Pieejamība</translation>
-<translation id="3157931365184549694">Atjaunot</translation>
-<translation id="4274292172790327596">Neatpazīta kļūda</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Austiņas</translation>
-<translation id="225680501294068881">Notiek ierīču meklēšana...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Mikrofons (iekšējais)</translation>
-<translation id="4448844063988177157">Notiek Wi-Fi tīklu meklēšana...</translation>
-<translation id="8401662262483418323">Neizdevās izveidot savienojumu ar “<ph name="NAME"/>”: <ph name="DETAILS"/>
-Servera ziņojums: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Radās kļūda</translation>
-<translation id="7229570126336867161">Nepieciešams EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> ir publiska sesija, kas tiek pārvaldīta domēnā <ph name="DOMAIN"/>.</translation>
-<translation id="9044646465488564462">Neizdevās izveidot savienojumu ar tīklu: <ph name="DETAILS"/>.</translation>
-<translation id="7029814467594812963">Iziet no sesijas</translation>
-<translation id="8454013096329229812">Wi-Fi tīkls ir ieslēgts.</translation>
-<translation id="4872237917498892622">Alt+Meklēt vai Shift</translation>
-<translation id="9201131092683066720">Akumulatora uzlādes līmenis: <ph name="PERCENTAGE"/>%</translation>
-<translation id="2983818520079887040">Iestatījumi...</translation>
-<translation id="3871838685472846647">Mobilais tālrunis aktivizēts</translation>
-<translation id="1195412055398077112">attēla izvērse</translation>
-<translation id="112308213915226829">Automātiski slēpt plauktu</translation>
-<translation id="7573962313813535744">Dokošanas režīms</translation>
-<translation id="8927026611342028580">Ir pieprasīta savienojuma izveide.</translation>
-<translation id="8300849813060516376">OTASP neizdevās</translation>
-<translation id="2792498699870441125">Alt+Meklēt</translation>
-<translation id="8660803626959853127">Notiek <ph name="COUNT"/> faila(-u) sinhronizēšana</translation>
-<translation id="5958529069007801266">Uzraudzīts lietotājs</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">Funkcija CAPS LOCK ir izslēgta.</translation>
-<translation id="6248847161401822652">Lai izietu, divas reizes nospiediet taustiņu kombināciju Ctrl+Shift+Q.</translation>
-<translation id="6785414152754474415">Akumulatora uzlādes līmenis: <ph name="PERCENTAGE"/>%; uzlāde tiek turpināta.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: notiek aktivizēšana...</translation>
-<translation id="4895488851634969361">Akumulators ir pilnībā uzlādēts.</translation>
-<translation id="5947494881799873997">Atjaunot</translation>
-<translation id="7593891976182323525">Meklēt vai Shift</translation>
-<translation id="7649070708921625228">Palīdzība</translation>
-<translation id="747833637904845037">Jūsu Chromebook dators kādu laiku būs savienots ar ārēju displeju, pat ja datora vāks būs aizvērts.</translation>
-<translation id="3050422059534974565">Ir ieslēgts BURTSLĒGS.
-Lai atceltu tā funkcionalitāti, nospiediet Meklēt vai Shift.</translation>
-<translation id="397105322502079400">Aprēķina...</translation>
-<translation id="158849752021629804">Nepieciešams mājas tīkls</translation>
-<translation id="6857811139397017780">Aktivizēt <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">DHCP uzmeklēšana neizdevās</translation>
-<translation id="6692173217867674490">Neatbilstoša ieejas frāze</translation>
-<translation id="6165508094623778733">Uzziniet vairāk</translation>
-<translation id="9046895021617826162">Savienojums neizdevās</translation>
-<translation id="7168224885072002358">Iepriekšējā izšķirtspēja tiks atgriezta pēc <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Atlikušais laiks līdz šīs sesijas beigām: <ph name="SESSION_TIME_REMAINING"/>. Jūs tiksiet automātiski izrakstīts.</translation>
-<translation id="8372369524088641025">Neatbilstoša WEP atslēga</translation>
-<translation id="6636709850131805001">Neatpazīts stāvoklis</translation>
-<translation id="3573179567135747900">Mainīt atpakaļ uz <ph name="FROM_LOCALE"/> (nepieciešama restartēšana)</translation>
-<translation id="8103386449138765447">Īsziņas: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Google diska iestatījumi...</translation>
-<translation id="7209101170223508707">Ir ieslēgts BURTSLĒGS.
-Lai atceltu tā funkcionalitāti, nospiediet Alt+Meklēt vai Shift.</translation>
-<translation id="8940956008527784070">Akumulators gandrīz tukšs (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Pieņemt</translation>
-<translation id="5102001756192215136">Atlicis: <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Izvade</translation>
-<translation id="520760366042891468">Ekrāna vadības kopīgošana, izmantojot funkciju Hangouts.</translation>
-<translation id="8000066093800657092">Nav tīkla</translation>
-<translation id="4015692727874266537">Pierakstīties citā kontā...</translation>
-<translation id="5941711191222866238">Minimizēt</translation>
-<translation id="6911468394164995108">Pievienoties citam...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Jūsu “<ph name="NAME"/>” datu pakalpojums ir veiksmīgi aktivizēts, un to var izmantot.</translation>
-<translation id="412065659894267608">Līdz pilnīgai uzlādei atlikušais laiks: <ph name="HOUR"/> h <ph name="MINUTE"/> min</translation>
-<translation id="7297443947353982503">Lietotājvārds/parole nav pareiza vai arī EAP autentifikācija neizdevās</translation>
-<translation id="6359806961507272919">SMS no <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Mobilo sakaru operators</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_ml.xtb b/chromium/ash/strings/ash_strings_ml.xtb
deleted file mode 100644
index 7472136bc2d..00000000000
--- a/chromium/ash/strings/ash_strings_ml.xtb
+++ /dev/null
@@ -1,229 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="ml">
-<translation id="3595596368722241419">ബാറ്ററി നിറഞ്ഞു</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/>, <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">പോര്‍ട്ടല്‍ അവസ്ഥ</translation>
-<translation id="30155388420722288">ഓവർഫ്ലോ ബട്ടൺ</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth പ്രാപ്‌തമാക്കി</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> എന്നതിനെ <ph name="ROTATION"/> എന്നതിലേയ്‌ക്ക് തിരിച്ചു</translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth അപ്രാപ്‌തമാക്കി</translation>
-<translation id="7165320105431587207">നെറ്റ്‌വർക്ക് കോൺഫിഗർ ചെയ്യുന്നതിൽ പരാജയപ്പെട്ടു</translation>
-<translation id="3775358506042162758">ഒന്നിലധികം സൈൻ ഇന്നുകളിൽ നിങ്ങൾക്ക് മൂന്ന് അക്കൗണ്ടുകൾ വരെ മാത്രമേ ഉണ്ടായിരിക്കാൻ പാടുള്ളൂ.</translation>
-<translation id="370649949373421643">Wi-fi പ്രാപ്‌തമാക്കുക</translation>
-<translation id="3626281679859535460">മിഴിവ്</translation>
-<translation id="3621202678540785336">ഇൻപുട്ട്</translation>
-<translation id="595202126637698455">പ്രകടനം പിന്തുടരൽ പ്രവർത്തനക്ഷമമാക്കി</translation>
-<translation id="8054466585765276473">ബാറ്ററി സമയം കണക്കാക്കുന്നു.</translation>
-<translation id="7982789257301363584">നെറ്റ്വര്‍ക്ക്</translation>
-<translation id="5565793151875479467">പ്രോക്‌സി...</translation>
-<translation id="938582441709398163">കീബോര്‍ഡ് ഓവര്‍ലേ</translation>
-<translation id="4387004326333427325">പ്രാമാണീകരണ സർട്ടിഫിക്കറ്റ് വിദൂരമായി നിരസിച്ചു</translation>
-<translation id="6979158407327259162">Google ഡ്രൈവ്</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> മിഴിവ് <ph name="RESOLUTION"/> എന്നതിലേയ്‌ക്ക് മാറ്റി</translation>
-<translation id="6943836128787782965">HTTP പരാജയപ്പെട്ടു</translation>
-<translation id="2297568595583585744">സ്റ്റാറ്റസ് ട്രേ</translation>
-<translation id="1661867754829461514">PIN കാണാനില്ല</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: കണക്റ്റുചെയ്യുന്നു...</translation>
-<translation id="40400351611212369">നെറ്റ്‌വർക്ക് സജീവമാക്കൽ പിശക്</translation>
-<translation id="4237016987259239829">നെറ്റ്വര്‍ക്ക് കണക്ഷന്‍ പിശക്</translation>
-<translation id="2946640296642327832">Bluetooth പ്രാപ്‌തമാക്കുക</translation>
-<translation id="6459472438155181876">സ്‌ക്രീൻ <ph name="DISPLAY_NAME"/> എന്നതിലേക്ക് വികസിപ്പിക്കുന്നു</translation>
-<translation id="8206859287963243715">സെല്ലുലാര്‍‌</translation>
-<translation id="6596816719288285829">IP വിലാസം</translation>
-<translation id="4508265954913339219">സജീവമാക്കല്‍ പരാജയപ്പെട്ടു</translation>
-<translation id="3621712662352432595">ഓഡിയോ ക്രമീകരണങ്ങൾ</translation>
-<translation id="1812696562331527143">നിങ്ങളുടെ ഇൻപുട്ട് രീതി <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>മൂന്നാം കക്ഷി<ph name="END_LINK"/>) എന്നതിലേയ്‌ക്ക് മാറ്റി.
-സ്വിച്ചുചെയ്യുന്നതിന് Shift + Alt അമർത്തുക.</translation>
-<translation id="2127372758936585790">കുറഞ്ഞ തോതിൽ വൈദ്യുതി പ്രവഹിക്കുന്ന ചാർജർ</translation>
-<translation id="3846575436967432996">നെറ്റ്‌വർക്ക് വിവരങ്ങളൊന്നും ലഭ്യമല്ല</translation>
-<translation id="3026237328237090306">മൊബൈൽ ഡാറ്റ സജ്ജമാക്കുക</translation>
-<translation id="5871632337994001636">ഉപകരണങ്ങൾ നിയന്ത്രിക്കുക...</translation>
-<translation id="785750925697875037">മൊബൈൽ അക്കൗണ്ട് കാണുക</translation>
-<translation id="153454903766751181">സെല്ലുലാർ മോഡം സമാരംഭിക്കുന്നു...</translation>
-<translation id="4628814525959230255">നിങ്ങളുടെ സ്‌ക്രീനിന്റെ നിയന്ത്രണം Hangouts വഴി <ph name="HELPER_NAME"/> എന്നതുമായി പങ്കിടുന്നു.</translation>
-<translation id="7864539943188674973">Bluetooth അപ്രാപ്‌തമാക്കുക</translation>
-<translation id="939252827960237676">സ്‌ക്രീൻഷോട്ട് സംരക്ഷിക്കുന്നതിൽ പരാജയപ്പെട്ടു</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">അപ്‌ഡേറ്റുചെയ്യുന്നതിന് പുനരാരംഭിക്കുക</translation>
-<translation id="2268813581635650749">എല്ലാം സൈൻ ഔട്ട് ചെയ്യുക</translation>
-<translation id="735745346212279324">VPN വിച്ഛേദിച്ചു</translation>
-<translation id="7320906967354320621">നിഷ്ക്രിയം</translation>
-<translation id="15373452373711364">വലിയ മൗസ് കഴ്‌സർ</translation>
-<translation id="3294437725009624529">അതിഥി</translation>
-<translation id="8190698733819146287">ഭാഷകള്‍‌ ഇച്ഛാനുസൃതമാക്കി നല്‍‌കുക...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">ഷെൽഫ് സ്ഥാനം</translation>
-<translation id="8676770494376880701">കുറഞ്ഞ തോതിൽ വൈദ്യുതി പ്രവഹിക്കുന്ന ചാർജർ കണക്റ്റുചെയ്‌തു</translation>
-<translation id="7170041865419449892">പരിധിയ്ക്ക് പുറത്താണ്</translation>
-<translation id="4804818685124855865">വിച്ഛേദിക്കുക</translation>
-<translation id="2544853746127077729">നെറ്റ്‌വർക്ക്, പ്രാമാണീകരണ സർട്ടിഫിക്കറ്റ് നിരസിച്ചു</translation>
-<translation id="5222676887888702881">പുറത്തുകടക്കുക</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">ക്രമീകരണം</translation>
-<translation id="1272079795634619415">നിര്‍ത്തുക</translation>
-<translation id="4957722034734105353">കൂടുതലറിയുക...</translation>
-<translation id="2964193600955408481">Wi-Fi അപ്രാപ്‌തമാക്കുക</translation>
-<translation id="4279490309300973883">മിററിംഗ്</translation>
-<translation id="7973962044839454485">തെറ്റായ ഉപയോക്തൃനാമമോ പാസ്‌വേഡോ കാരണം PPP പ്രാമാണീകരണം പരാജയപ്പെട്ടു</translation>
-<translation id="2509468283778169019">CAPS LOCK ഓൺ ആണ്</translation>
-<translation id="3892641579809465218">ആന്തരിക പ്രദർശനം</translation>
-<translation id="7823564328645135659">നിങ്ങളുടെ ക്രമീകരണങ്ങള്‍ സമന്വയിപ്പിച്ചതിന് ശേഷം ഭാഷ &quot;<ph name="FROM_LOCALE"/>&quot; എന്നതില്‍ നിന്ന് &quot;<ph name="TO_LOCALE"/>&quot; എന്നതിലേക്ക് മാറി.</translation>
-<translation id="3368922792935385530">ബന്ധിപ്പിച്ചു</translation>
-<translation id="8340999562596018839">സംഭാഷണ ഫീഡ്‌ബാക്ക്</translation>
-<translation id="8654520615680304441">Wi-Fi ഓണാക്കുക...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">നിങ്ങളുടെ ഇൻപുട്ട് രീതി <ph name="INPUT_METHOD_ID"/> എന്നതിലേയ്‌ക്ക് മാറ്റി. സ്വിച്ചുചെയ്യുന്നതിന് Shift + Alt അമർത്തുക.</translation>
-<translation id="2562916301614567480">സ്വകാര്യ നെറ്റ്‌വർക്ക്</translation>
-<translation id="6549021752953852991">സെല്ലുലാർ നെറ്റ്‌വർക്കൊന്നും ലഭ്യമല്ല</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">പ്രിയ മോണിറ്റർ, ഇത് നമുക്കിടയിൽ പ്രവർത്തിക്കുന്നില്ല. (ആ മോണിറ്റർ പിന്തുണയ്‌ക്കുന്നില്ല)</translation>
-<translation id="6426039856985689743">മൊബൈൽ ഡാറ്റ അപ്രാപ്‌തമാക്കുക</translation>
-<translation id="3087734570205094154">താഴെ</translation>
-<translation id="3742055079367172538">സ്‌ക്രീൻഷോട്ട് എടുത്തു</translation>
-<translation id="8878886163241303700">സ്‌ക്രീൻ വിപുലീകരിക്കുന്നു</translation>
-<translation id="5271016907025319479">VPN കോൺഫിഗർ ചെയ്‌തില്ല.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">സ്ക്രീൻഷോട്ടുകൾ എടുക്കാനുള്ള കഴിവ് നിങ്ങളുടെ അഡ്‌മിനിസ്ട്രേറ്റർ പ്രവർത്തനരഹിതമാക്കി.</translation>
-<translation id="372094107052732682">പുറത്തുപോകുന്നതിന് രണ്ടുതവണ Ctrl+Shift+Q അമർത്തുക.</translation>
-<translation id="6803622936009808957">പിന്തുണയ്‌ക്കുന്ന മിഴിവുകൾ കണ്ടെത്താത്തതിനാൽ പ്രദർശനങ്ങൾ പ്രതിഫലിപ്പിക്കാനായില്ല. പകരം വിപുലീകൃത ഡെസ്‌ക്‌ടോപ്പ് നൽകി.</translation>
-<translation id="1480041086352807611">ഡെമോ മോഡ്</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% ശേഷിക്കുന്നു</translation>
-<translation id="9089416786594320554">ഇൻപുട്ട് രീതികൾ</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">'<ph name="NAME"/>' സജീവമാക്കുന്നതിന് ഒരു നെറ്റ്‌വർക്ക് കണക്ഷൻ ആവശ്യമാണ്.</translation>
-<translation id="3963445509666917109">സ്‌പീക്കർ (ആന്തരികം)</translation>
-<translation id="2825619548187458965">ഷെൽഫ്</translation>
-<translation id="2614835198358683673">ഓണായിരിക്കുമ്പോൾ നിങ്ങളുടെ Chromebook ചാർജ് ചെയ്യാനിടയില്ല. ഔദ്യോഗിക ചാർജ്ജർ ഉപയോഗിക്കുന്നത് പരിഗണിക്കുക.</translation>
-<translation id="1895658205118569222">ഷട്ട്‌ഡൗൺ ചെയ്യുക</translation>
-<translation id="4430019312045809116">അളവ്</translation>
-<translation id="8681498213689260554">പുനരാരംഭിക്കുക, തുടർന്ന് അപ്‌ഡേറ്റുചെയ്യാൻ പവർവാഷുചെയ്യുക</translation>
-<translation id="4442424173763614572">DNS തിരയല്‍ പരാജയപ്പെട്ടു</translation>
-<translation id="7874779702599364982">സെല്ലുലാർ നെറ്റ്‌വർക്കുകൾക്കായി തിരയുന്നു...</translation>
-<translation id="583281660410589416">അജ്ഞാതം</translation>
-<translation id="1383876407941801731">തിരയൂ</translation>
-<translation id="3901991538546252627"><ph name="NAME"/> എന്നതിലേക്ക് കണക്റ്റുചെയ്യുന്നു</translation>
-<translation id="2204305834655267233">നെറ്റ്‌വർക്ക് വിവരം</translation>
-<translation id="1621499497873603021">ബാറ്ററി ശൂന്യമാകുന്നതിന് ശേഷിക്കുന്ന സമയം, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">അതിഥി സെഷനിൽ നിന്നും പുറത്തുകടക്കുക</translation>
-<translation id="8308637677604853869">മുൻ മെനു</translation>
-<translation id="4666297444214622512">മറ്റൊരു അക്കൗണ്ടിൽ സൈൻ ഇൻ ചെയ്യാനാകില്ല.</translation>
-<translation id="3625258641415618104">സ്‌ക്രീൻഷോട്ടുകൾ പ്രവർത്തനരഹിതമാക്കി</translation>
-<translation id="1346748346194534595">ശരി</translation>
-<translation id="1773212559869067373">പ്രാമാണീകരണ സർട്ടിഫിക്കറ്റ് പ്രാദേശികമായി നിരസിച്ചു</translation>
-<translation id="8528322925433439945">മൊബൈൽ ...</translation>
-<translation id="7049357003967926684">അസ്സോസിയേഷന്‍</translation>
-<translation id="8428213095426709021">ക്രമീകരണം</translation>
-<translation id="2372145515558759244">അപ്ലിക്കേഷനുകൾ സമന്വയിപ്പിക്കുന്നു...</translation>
-<translation id="7256405249507348194">തിരിച്ചറിയാനാകാത്ത പിശക്: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA പരിശോധന പരാജയപ്പെട്ടു</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> നിറയാൻ</translation>
-<translation id="5787281376604286451">സംഭാഷണ ഫീഡ്‌ബാക്ക് പ്രാപ്‌തമാക്കിയിരിക്കുന്നു.
-ഇത് അപ്രാപ്‌തമാക്കാൻ Ctrl+Alt+Z അമർത്തുക.</translation>
-<translation id="4479639480957787382">എതെര്‍‌നെറ്റ്</translation>
-<translation id="6312403991423642364">അറിയാത്ത നെറ്റ്‌വര്‍ക്ക് പിശക്</translation>
-<translation id="1467432559032391204">ഇടത്</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830"><ph name="NAME"/> സജീവമാക്കുന്നു</translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">യാന്ത്രിക ക്ലിക്കുകൾ</translation>
-<translation id="1398853756734560583">വലുതാക്കുക</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: കണക്റ്റുചെയ്യുന്നു...</translation>
-<translation id="252373100621549798">അജ്ഞാത പ്രദർശനം</translation>
-<translation id="1882897271359938046"><ph name="DISPLAY_NAME"/> എന്നതിലേക്ക് മിറർചെയ്യുന്നു</translation>
-<translation id="2727977024730340865">കുറഞ്ഞ തോതിൽ വൈദ്യുതി പ്രവഹിക്കുന്ന ചാർജ്ജറിലേക്ക് പ്ലഗ് ചെയ്‌തിരിക്കുന്നു. ബാറ്ററി ചാർജുചെയ്യൽ വിശ്വസനീയമാകണമെന്നില്ല.</translation>
-<translation id="3784455785234192852">ലോക്കുചെയ്യുക</translation>
-<translation id="2805756323405976993">അപ്ലിക്കേഷനുകള്‍</translation>
-<translation id="1512064327686280138">സജീവമാക്കല്‍ പരാജയപ്പെട്ടു</translation>
-<translation id="5097002363526479830">'<ph name="NAME"/>' നെറ്റ്‌വര്‍‌ക്കിലേക്ക് ബന്ധിപ്പിക്കുന്നതിൽ പരാജയപ്പെട്ടു: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi ഓഫുചെയ്‌തു.</translation>
-<translation id="2966449113954629791">നിങ്ങളുടെ മൊബൈൽ ഡാറ്റ അലവൻസ് പരമാവധി ഉപയോഗിച്ചിരിക്കാനിടയുണ്ട്. കൂടുതൽ ഡാറ്റ വാങ്ങാൻ <ph name="NAME"/> സജീവമാക്കൽ പോർട്ടൽ സന്ദർശിക്കുക.</translation>
-<translation id="8132793192354020517"><ph name="NAME"/> എന്നതിലേക്ക് ബന്ധിപ്പിച്ചു</translation>
-<translation id="7052914147756339792">വാൾപേപ്പർ സജ്ജമാക്കുക...</translation>
-<translation id="8678698760965522072">ഓണ്‍ലൈന്‍ അവസ്ഥ</translation>
-<translation id="2532589005999780174">ഉയർന്ന ദൃശ്യതീവ്രത മോഡ്</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">ആന്തരിക പിശക്</translation>
-<translation id="3019353588588144572">ബാറ്ററി പൂർണ്ണമായി ചാർജ്ജാകുന്നതിന് ശേഷിക്കുന്ന സമയം, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">സ്‌ക്രീൻ മാഗ്‌നിഫയർ</translation>
-<translation id="7005812687360380971">പരാജയം</translation>
-<translation id="882279321799040148">കാണുന്നതിന് ക്ലിക്കുചെയ്യുക</translation>
-<translation id="1753067873202720523">നിങ്ങളുടെ Chromebook ഓണായിരിക്കുമ്പോൾ ചാർജ്ജുചെയ്യാനിടയില്ല.</translation>
-<translation id="5045550434625856497">പാസ്‌വേഡ് തെറ്റാണ്</translation>
-<translation id="1602076796624386989">മൊബൈൽ ഡാറ്റ പ്രാപ്‌തമാക്കുക</translation>
-<translation id="6981982820502123353">പ്രവേശനക്ഷമത</translation>
-<translation id="3157931365184549694">പുനഃസ്ഥാപിക്കുക</translation>
-<translation id="4274292172790327596">തിരിച്ചറിയാത്ത പിശക്</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">ഹെഡ്‌ഫോൺ</translation>
-<translation id="225680501294068881">ഉപകരണങ്ങൾക്കായി സ്‌കാൻ ചെയ്യുന്നു...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">മൈക്രോഫോൺ (ആന്തരികം)</translation>
-<translation id="4448844063988177157">Wi-Fi ശൃംഖലകള്‍ക്കായി തിരയുന്നു...</translation>
-<translation id="8401662262483418323">'<ph name="NAME"/>' എന്നതിലേക്ക് കണക്റ്റുചെയ്യുന്നതിൽ പരാജയപ്പെട്ടു: <ph name="DETAILS"/>
-സെർവർ സന്ദേശം: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">ഒരു പിശക് സംഭവിച്ചു</translation>
-<translation id="7229570126336867161">EVDO ആവശ്യമുണ്ട്</translation>
-<translation id="2999742336789313416"><ph name="DOMAIN"/> നിയന്ത്രിക്കുന്ന എല്ലാവർക്കുമുള്ള ഒരു സെഷനാണ് <ph name="DISPLAY_NAME"/></translation>
-<translation id="9044646465488564462">നെറ്റ്‌വര്‍‌ക്കിലേക്ക് കണക്റ്റുചെയ്യുന്നതിൽ പരാജയപ്പെട്ടു: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">സെഷനിൽ നിന്ന് പുറത്തുകടക്കുക</translation>
-<translation id="8454013096329229812">Wi-Fi ഓൺ ചെയ്‌തു.</translation>
-<translation id="4872237917498892622">Alt+തിരയൽ അല്ലെങ്കിൽ Shift</translation>
-<translation id="9201131092683066720">ബാറ്ററി <ph name="PERCENTAGE"/>% നിറഞ്ഞു.</translation>
-<translation id="2983818520079887040">ക്രമീകരണങ്ങള്‍...</translation>
-<translation id="3871838685472846647">സെല്ലുലാർ സജീവമാക്കി</translation>
-<translation id="1195412055398077112">ഓവർസ്‌കാൻ</translation>
-<translation id="112308213915226829">ഷെൽഫ് യാന്ത്രികമായി മറയ്‌ക്കുക</translation>
-<translation id="7573962313813535744">ഡോക്കുചെയ്‌ത മോഡ്</translation>
-<translation id="8927026611342028580">കണക്റ്റുചെയ്യാൻ അഭ്യർത്ഥിച്ചു</translation>
-<translation id="8300849813060516376">OTASP പരാജയപ്പെട്ടു</translation>
-<translation id="2792498699870441125">Alt+തിരയൽ</translation>
-<translation id="8660803626959853127"><ph name="COUNT"/> ഫയൽ(കൾ) സമന്വയിപ്പിക്കുന്നു</translation>
-<translation id="5958529069007801266">സൂപ്പർവൈസുചെയ്‌ത ഉപയോക്താവ്</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK ഓഫാണ്</translation>
-<translation id="6248847161401822652">പുറത്തുപോകുന്നതിന് രണ്ടുതവണ Control Shift Q അമർത്തുക.</translation>
-<translation id="6785414152754474415">ബാറ്ററി <ph name="PERCENTAGE"/>% നിറഞ്ഞിരിക്കുന്നു, ചാർജുചെയ്യൽ തുടരുന്നു.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: സജീവമാക്കുന്നു...</translation>
-<translation id="4895488851634969361">ബാറ്ററി ചാർജുചെയ്യൽ പൂർണ്ണമായി.</translation>
-<translation id="5947494881799873997">പഴയപടിയാക്കുക</translation>
-<translation id="7593891976182323525">തിരയൽ അല്ലെങ്കിൽ Shift</translation>
-<translation id="7649070708921625228">സഹായം</translation>
-<translation id="747833637904845037">ലിഡ് അടച്ചിരിക്കുകയാണെങ്കിൽപ്പോലും, ഒരു ആന്തരിക ഡിസ്പ്ലേയിലേക്ക് കണക്റ്റുചെയ്‌തിരിക്കുമ്പോൾ നിങ്ങളുടെ Chromebook ഓണായി തുടരും.</translation>
-<translation id="3050422059534974565">CAPS LOCK ഓൺ ആണ്.
-റദ്ദാക്കുന്നതിന് തിരയൽ അല്ലെങ്കിൽ Shift അമർത്തുക.</translation>
-<translation id="397105322502079400">കണക്കാക്കുന്നു...</translation>
-<translation id="158849752021629804">ഹോം നെറ്റ്‍വര്‍ക്ക് ആവശ്യമുണ്ട്</translation>
-<translation id="6857811139397017780"><ph name="NETWORKSERVICE"/> സജീവമാക്കുക</translation>
-<translation id="5864471791310927901">DHCP തിരയല്‍ പരാജയപ്പെട്ടു</translation>
-<translation id="6692173217867674490">മോശം പാസ്ഫ്രെയ്സ്</translation>
-<translation id="6165508094623778733">കൂടുതല്‍ മനസിലാക്കുക</translation>
-<translation id="9046895021617826162">ബന്ധിപ്പിക്കല്‍ പരാജയപ്പെട്ടു</translation>
-<translation id="7168224885072002358"><ph name="TIMEOUT_SECONDS"/>-ൽ പഴയ മിഴിവിലേക്ക് പഴയപടിയാക്കുന്നു</translation>
-<translation id="973896785707726617"><ph name="SESSION_TIME_REMAINING"/> ആകുമ്പോൾ ഈ സെഷൻ അവസാനിക്കും. നിങ്ങൾ യാന്ത്രികമായി സൈൻ ഔട്ടാകും.</translation>
-<translation id="8372369524088641025">മോശം WEP കീ</translation>
-<translation id="6636709850131805001">തിരിച്ചറിയാത്ത അവസ്ഥ</translation>
-<translation id="3573179567135747900">&quot;<ph name="FROM_LOCALE"/>&quot; എന്നതിലേക്ക് തിരികെ മാറുക (റീസ്റ്റാര്‍ട്ട് ആവശ്യമാണ്)</translation>
-<translation id="8103386449138765447">SMS സന്ദേശങ്ങൾ: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Google ഡ്രൈവ് ക്രമീകരണങ്ങൾ...</translation>
-<translation id="7209101170223508707">CAPS LOCK ഓണാണ്.
-റദ്ദാക്കുന്നതിന് Alt+തിരയൽ അല്ലെങ്കിൽ Shift അമർത്തുക.</translation>
-<translation id="8940956008527784070">ബാറ്ററി കുറവാണ് (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">സ്വീകരിക്കുക</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> ശേഷിക്കുന്നു</translation>
-<translation id="3009178788565917040">ഔട്ട്പുട്ട്</translation>
-<translation id="520760366042891468">നിങ്ങളുടെ സ്‌ക്രീനിന്റെ നിയന്ത്രണം Hangouts വഴി പങ്കിടുന്നു.</translation>
-<translation id="8000066093800657092">നെറ്റ്‍വര്‍ക്ക് ഇല്ല</translation>
-<translation id="4015692727874266537">മറ്റൊരു അക്കൗണ്ടിൽ സൈൻ ഇൻ ചെയ്യുക...</translation>
-<translation id="5941711191222866238">ചെറുതാക്കുക‍</translation>
-<translation id="6911468394164995108">മറ്റുള്ളവ ചേർക്കുക...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">അഭിനന്ദനങ്ങൾ! നിങ്ങളുടെ '<ph name="NAME"/>' ഡാറ്റ സേവനം സജീവമായി, ഇത് പ്രവർത്തിക്കാൻ തയ്യാറാണ്.</translation>
-<translation id="412065659894267608">പൂർണ്ണമായും ചാർജാകുന്നതിന് <ph name="HOUR"/>മ <ph name="MINUTE"/>മി</translation>
-<translation id="7297443947353982503">ഉപയോക്തൃനാമം/പാസ്‌വേഡ് ശരിയല്ല അല്ലെങ്കിൽ EAP-പ്രാമാണീകരണം പരാജയപ്പെട്ടു</translation>
-<translation id="6359806961507272919"><ph name="PHONE_NUMBER"/> എന്നതില്‍ നിന്നുള്ള SMS</translation>
-<translation id="1244147615850840081">കാരിയര്‍</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_mr.xtb b/chromium/ash/strings/ash_strings_mr.xtb
deleted file mode 100644
index 9f98f2e0b22..00000000000
--- a/chromium/ash/strings/ash_strings_mr.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="mr">
-<translation id="3595596368722241419">बॅटरी पूर्ण चार्ज</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> आणि <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">पोर्टल राज्य</translation>
-<translation id="30155388420722288">ओव्हरफ्लो बटण</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth सक्षम</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> <ph name="ROTATION"/> वर फिरविले होते</translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth अक्षम</translation>
-<translation id="7165320105431587207">नेटवर्क कॉन्फिगर करण्यात अयशस्वी</translation>
-<translation id="3775358506042162758">आपल्याकडे एकाधिक साइन इनमध्ये फक्त तीन पर्यंत खाती असू शकतात.</translation>
-<translation id="370649949373421643">Wi-fi सक्षम करा</translation>
-<translation id="3626281679859535460">ब्राइटनेस</translation>
-<translation id="3621202678540785336">इनपुट</translation>
-<translation id="595202126637698455">कार्यप्रदर्शन ट्रेसिंग सक्षम केले</translation>
-<translation id="8054466585765276473">बॅटरी वेळ गणना करत आहे.</translation>
-<translation id="7982789257301363584">नेटवर्क</translation>
-<translation id="5565793151875479467">प्रॉक्सी...</translation>
-<translation id="938582441709398163">कीबोर्ड आच्छादन</translation>
-<translation id="4387004326333427325">प्रमाणीकरण प्रमाणपत्र दूरस्थपणे नाकारले</translation>
-<translation id="6979158407327259162">Google ड्राइव्ह</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> रिजोल्यूशन <ph name="RESOLUTION"/> वर बदलले होते</translation>
-<translation id="6943836128787782965">HTTP अयशस्वी झाले</translation>
-<translation id="2297568595583585744">स्थिती ट्रे</translation>
-<translation id="1661867754829461514">PIN गहाळ आहे </translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: कनेक्ट करत आहे...</translation>
-<translation id="40400351611212369">नेटवर्क सक्रियण त्रुटी</translation>
-<translation id="4237016987259239829">नेटवर्क कनेक्शन त्रुटी</translation>
-<translation id="2946640296642327832">Bluetooth सक्षम करा</translation>
-<translation id="6459472438155181876"><ph name="DISPLAY_NAME"/> मध्ये स्क्रीन विस्तृत करत आहे</translation>
-<translation id="8206859287963243715">सेल्यूलर</translation>
-<translation id="6596816719288285829">IP पत्ता</translation>
-<translation id="4508265954913339219">सक्रियन अयशस्वी</translation>
-<translation id="3621712662352432595">ऑडिओ सेटिंग्ज</translation>
-<translation id="1812696562331527143">आपली इनपुट पद्धत <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>तृतीय पक्षावर<ph name="END_LINK"/>)बदलली.
-स्‍विच करण्‍यासाठी Shift + Alt दाबा.</translation>
-<translation id="2127372758936585790">निम्न-उर्जेचे चार्जर</translation>
-<translation id="3846575436967432996">कोणतीही नेटवर्क माहिती उपलब्ध नाही</translation>
-<translation id="3026237328237090306">मोबाइल डेटा सेटअप करा</translation>
-<translation id="5871632337994001636">डिव्हाइस व्यवस्थापित करा...</translation>
-<translation id="785750925697875037">मोबाइल खाते पहा</translation>
-<translation id="153454903766751181">सेल्युलर मोडेम आरंभ करत आहे...</translation>
-<translation id="4628814525959230255">Hangouts द्वारे <ph name="HELPER_NAME"/> सह आपल्या स्क्रीनचे सामायिकरण नियंत्रण.</translation>
-<translation id="7864539943188674973">Bluetooth अक्षम करा</translation>
-<translation id="939252827960237676">स्क्रीनशॉट जतन करण्यात अयशस्वी</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">अद्यतनासाठी पुनर्प्रारंभ करा</translation>
-<translation id="2268813581635650749">सर्व साइन आउट करा</translation>
-<translation id="735745346212279324">VPN डिस्कनेक्ट केले</translation>
-<translation id="7320906967354320621">निष्क्रिय</translation>
-<translation id="15373452373711364">मोठा माउस कर्सर</translation>
-<translation id="3294437725009624529">अतिथी</translation>
-<translation id="8190698733819146287">भाषा आणि इनपुट सानुकूलित करा...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">शेल्फ स्थिती</translation>
-<translation id="8676770494376880701">निम्न-उर्जेचे चार्जर कनेक्ट केले</translation>
-<translation id="7170041865419449892">परिक्षेत्राबाहेर</translation>
-<translation id="4804818685124855865">‍डिस्कनेक्ट</translation>
-<translation id="2544853746127077729">प्रमाणीकरण प्रमाणपत्र नेटवर्कद्वारे नाकारले</translation>
-<translation id="5222676887888702881">साइन आउट करा</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">कॉन्फिगरेशन</translation>
-<translation id="1272079795634619415">थांबा</translation>
-<translation id="4957722034734105353">अधिक जाणून घ्या...</translation>
-<translation id="2964193600955408481">Wi-Fi अक्षम करा</translation>
-<translation id="4279490309300973883">मिररिंग</translation>
-<translation id="7973962044839454485">अयोग्य वापरकर्तानावामुळे किंवा संकेतशब्दामुळे PPP प्रमाणीकरण अयशस्वी झाले</translation>
-<translation id="2509468283778169019">CAPS LOCK सुरु आहे</translation>
-<translation id="3892641579809465218">अंतर्गत डिस्प्ले</translation>
-<translation id="7823564328645135659">आपली सेटिंग्ज समक्रमित केल्यानंतर भाषा &quot;<ph name="FROM_LOCALE"/>&quot; मधून &quot;<ph name="TO_LOCALE"/>&quot; मध्ये बदलली आहे.</translation>
-<translation id="3368922792935385530">कनेक्ट केले</translation>
-<translation id="8340999562596018839">संभाषण अभिप्राय</translation>
-<translation id="8654520615680304441">Wi-Fi चालू करा...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">आपली इनपुट पद्धत <ph name="INPUT_METHOD_ID"/> मध्ये बदलली आहे.
-स्विच करण्यासाठी Shift + Alt दाबा.</translation>
-<translation id="2562916301614567480">खाजगी नेटवर्क</translation>
-<translation id="6549021752953852991">कोणतेही सेल्युलर नेटवर्क उपलब्ध नाही</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">प्रिय मॉनिटर, हे आपल्या दरम्यान कार्य करत नाही. (तो मॉनिटर समर्थित नाही)</translation>
-<translation id="6426039856985689743">मोबाइल डेटा अक्षम करा</translation>
-<translation id="3087734570205094154">तळाकडील</translation>
-<translation id="3742055079367172538">स्क्रीनशॉट घेतला</translation>
-<translation id="8878886163241303700">स्क्रीन विस्तृत करत आहे</translation>
-<translation id="5271016907025319479">VPN कॉन्फिगर केलेले नाही.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">स्क्रीनशॉट घेण्याची क्षमता आपल्या प्रशासकाद्वारे अक्षम केली गेली आहे.</translation>
-<translation id="372094107052732682">बाहेर पडण्यासाठी Ctrl+Shift+Q दोनदा दाबा.</translation>
-<translation id="6803622936009808957">समर्थित रिजोल्यूशन न आढळल्यामुळे प्रदर्शने मिरर करू शकली नाहीत. त्याऐवजी विस्तारित डेस्कटॉप प्रविष्ट केला.</translation>
-<translation id="1480041086352807611">डेमो मोड</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% उर्वरित</translation>
-<translation id="9089416786594320554">इनपुट पद्धती</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">'<ph name="NAME"/>' च्या सक्रियणास नेटवर्क कनेक्शन आवश्यक आहे.</translation>
-<translation id="3963445509666917109">स्पीकर (अंतर्गत)</translation>
-<translation id="2825619548187458965">शेल्फ</translation>
-<translation id="2614835198358683673">आपले Chromebook चालू असताना ते चार्ज होऊ शकत नाही. अधिकृत चार्जर वापरण्याचा विचार करा.</translation>
-<translation id="1895658205118569222">बंद करा</translation>
-<translation id="4430019312045809116">व्हॉल्यूम</translation>
-<translation id="8681498213689260554">अद्यतनासाठी रीस्टार्ट करा आणि पॉवरवॉश करा</translation>
-<translation id="4442424173763614572">DNS लुकअप अयश्सवी</translation>
-<translation id="7874779702599364982">सेल्यूलर नेटवर्कसाठी शोधत आहे...</translation>
-<translation id="583281660410589416">अज्ञात</translation>
-<translation id="1383876407941801731">शोध</translation>
-<translation id="3901991538546252627"><ph name="NAME"/> वर कनेक्ट करीत आहे</translation>
-<translation id="2204305834655267233">नेटवर्क माहिती</translation>
-<translation id="1621499497873603021">बॅटरी रिक्त होईपर्यंत शिल्लक वेळ, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">अतिथी निर्गमन करा</translation>
-<translation id="8308637677604853869">मागील मेनू</translation>
-<translation id="4666297444214622512">दुसर्‍या खात्यामध्ये साइन इन करू शकत नाही.</translation>
-<translation id="3625258641415618104">स्क्रीनशॉट अक्षम केले</translation>
-<translation id="1346748346194534595">उजवे</translation>
-<translation id="1773212559869067373">प्रमाणीकरण प्रमाणपत्र स्थानिकपणे नाकारले</translation>
-<translation id="8528322925433439945">मोबाइल ...</translation>
-<translation id="7049357003967926684">संघटना</translation>
-<translation id="8428213095426709021">सेटिंग्ज</translation>
-<translation id="2372145515558759244">अ‍ॅप्स समक्रमित करत आहे...</translation>
-<translation id="7256405249507348194">अपरिचित त्रुटी: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA तपास अयशस्वी</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> बाकी पूर्ण होण्यात</translation>
-<translation id="5787281376604286451">संभाषण अभिप्राय सक्षम केला आहे.
-अक्षम करण्‍यासाठी Ctrl+Alt+Z दाबा.</translation>
-<translation id="4479639480957787382">इथरनेट</translation>
-<translation id="6312403991423642364">अज्ञात नेटवर्क त्रुटी</translation>
-<translation id="1467432559032391204">डावे</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830"><ph name="NAME"/> सक्रिय करत आहे</translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">स्वयंचलित क्लिक</translation>
-<translation id="1398853756734560583">वाढवा</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: कनेक्ट करत आहे...</translation>
-<translation id="252373100621549798">अज्ञात प्रदर्शन</translation>
-<translation id="1882897271359938046"><ph name="DISPLAY_NAME"/> वर मिरर करत आहे</translation>
-<translation id="2727977024730340865">एका निम्न-उर्जेच्या चार्जरवर प्लग इन केले. बॅटरी चार्जिंग विश्वसनीय असू शकत नाही.</translation>
-<translation id="3784455785234192852">लॉक करा</translation>
-<translation id="2805756323405976993">अनुप्रयोग</translation>
-<translation id="1512064327686280138">सक्रियन अयशस्वी</translation>
-<translation id="5097002363526479830">'<ph name="NAME"/>': नेटवर्कशी कनेक्ट करण्यात अयशस्वी. <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi बंद आहे.</translation>
-<translation id="2966449113954629791">आपण आपली मोबाईल डेटा सूट वापरली असू शकते. अधिक डेटा विकत घेण्यासाठी <ph name="NAME"/> सक्रियकरण पोर्टलला भेट द्या.</translation>
-<translation id="8132793192354020517"><ph name="NAME"/> शी कनेक्ट केलेले</translation>
-<translation id="7052914147756339792">वॉलपेपर सेट करा...</translation>
-<translation id="8678698760965522072">ऑनलाइन राज्य</translation>
-<translation id="2532589005999780174">उच्च तीव्रता मोड</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">अंतर्गत त्रुटी</translation>
-<translation id="3019353588588144572">बॅटरी पूर्णपणे चार्ज होईपर्यंत उर्वरित वेळ, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">स्क्रीन भिंग</translation>
-<translation id="7005812687360380971">बिघाड</translation>
-<translation id="882279321799040148">पाहण्यासाठी क्लिक करा</translation>
-<translation id="1753067873202720523">आपले Chromebook चालू असताना ते शुल्क आकारु शकत नाही.</translation>
-<translation id="5045550434625856497">अयोग्य संकेतशब्द</translation>
-<translation id="1602076796624386989">मोबाइल डेटा सक्षम करा</translation>
-<translation id="6981982820502123353">प्रवेशयोग्यता</translation>
-<translation id="3157931365184549694">पुनर्संचयित करा</translation>
-<translation id="4274292172790327596">अपरिचित त्रुटी</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">हेडफोन</translation>
-<translation id="225680501294068881">डिव्हाइसेससाठी स्कॅन करत आहे...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">मायक्रोफोन (अंतर्गत)</translation>
-<translation id="4448844063988177157">Wi-Fi नेटवर्कचा शोधत आहे...</translation>
-<translation id="8401662262483418323">'<ph name="NAME"/>' शी कनेक्ट करण्यात अयशस्वी: <ph name="DETAILS"/>
-सर्व्हर संदेश: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">एक त्रुटी आली आहे</translation>
-<translation id="7229570126336867161">EVDO आवश्यक आहे</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> हे <ph name="DOMAIN"/> द्वारे व्यवस्थापित कलेले एक सावर्जनिक सत्र आहे</translation>
-<translation id="9044646465488564462">नेटवर्कशी कनेक्ट करण्यात अयशस्वी: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">सत्र निर्गमन करा</translation>
-<translation id="8454013096329229812">Wi-Fi चालू आहे.</translation>
-<translation id="4872237917498892622">Alt+Search किंवा Shift</translation>
-<translation id="9201131092683066720">बॅटरी <ph name="PERCENTAGE"/>% भरली आहे.</translation>
-<translation id="2983818520079887040">सेटिंग्ज...</translation>
-<translation id="3871838685472846647">सेल्युलर सक्रिय केले</translation>
-<translation id="1195412055398077112">ओव्हरस्कॅन</translation>
-<translation id="112308213915226829">शेल्फ स्वयं लपवा</translation>
-<translation id="7573962313813535744">डॉक केलेला मोड</translation>
-<translation id="8927026611342028580">विनंती केलेले कनेक्ट करा</translation>
-<translation id="8300849813060516376">OTASP बिघडले</translation>
-<translation id="2792498699870441125">Alt+Search</translation>
-<translation id="8660803626959853127"><ph name="COUNT"/> फाईल(ली) समक्रमित करीत आहे</translation>
-<translation id="5958529069007801266">पर्यवेक्षी वापरकर्ता</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK बंद आहे</translation>
-<translation id="6248847161401822652">बाहेर पडण्यासाठी Control Shift Q दोनदा दाबा.</translation>
-<translation id="6785414152754474415">बॅटरी <ph name="PERCENTAGE"/>% भरली आहे आणि चार्ज होत आहे.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: सक्रिय करत आहे...</translation>
-<translation id="4895488851634969361">बॅटरी भरली आहे.</translation>
-<translation id="5947494881799873997">परत करा</translation>
-<translation id="7593891976182323525">Search किंवा Shift</translation>
-<translation id="7649070708921625228">मदत</translation>
-<translation id="747833637904845037">लिडसह बंद असले, तरीही आपले Chromebook बाह्य प्रदर्शनाशी कनेक्ट केलेले असताना चालू राहील.</translation>
-<translation id="3050422059534974565">CAPS LOCK चालू आहे.
-रद्द करण्यासाठी Search किंवा Shift दाबा.</translation>
-<translation id="397105322502079400">गणना करत आहे...</translation>
-<translation id="158849752021629804">मुख्यपृष्ठ नेटवर्क आवश्यक</translation>
-<translation id="6857811139397017780">सक्रिय करा<ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">DHCP लुकअप अयशस्वी</translation>
-<translation id="6692173217867674490">चुकीचा सांकेतिक वाक्यांश</translation>
-<translation id="6165508094623778733">अधिक जाणून घ्या</translation>
-<translation id="9046895021617826162">कनेक्ट करण्यात अयशस्वी</translation>
-<translation id="7168224885072002358"><ph name="TIMEOUT_SECONDS"/> मध्ये जुन्या रिजोल्यूशनवर परत करत आहे</translation>
-<translation id="973896785707726617">हे सत्र <ph name="SESSION_TIME_REMAINING"/> मध्ये समाप्त होईल. आपल्याला स्वयंचलितपणे साइन आउट केले जाईल.</translation>
-<translation id="8372369524088641025">खराब WEP की</translation>
-<translation id="6636709850131805001">अपरिचित राज्य</translation>
-<translation id="3573179567135747900">&quot;<ph name="FROM_LOCALE"/>&quot; मध्ये परत बदला (रीस्टार्ट करणे आवश्यक)</translation>
-<translation id="8103386449138765447">SMS संदेश: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Google ड्राइव्ह सेटिंग्ज...</translation>
-<translation id="7209101170223508707">CAPS LOCK चालू आहे.
-रद्द करण्यासाठी Alt+Search किंवा Shift दाबा.</translation>
-<translation id="8940956008527784070">बॅटरी कमी झाली (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">स्वीकारा</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> शिल्‍लक</translation>
-<translation id="3009178788565917040">आउटपुट</translation>
-<translation id="520760366042891468">Hangouts द्वारे आपल्या स्क्रीनचे नियंत्रण सामायिक करत आहे.</translation>
-<translation id="8000066093800657092">कोणतेही नेटवर्क नाही</translation>
-<translation id="4015692727874266537">दुसऱ्या खात्यात साइन इन करा...</translation>
-<translation id="5941711191222866238">लहान करा</translation>
-<translation id="6911468394164995108">दुसरीकडे सामील व्हा...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">अभिनंदन! आपली '<ph name="NAME"/>' डेटा सेवा सक्रिय केली गेली आहे आणि वापरण्यास सज्ज आहे.</translation>
-<translation id="412065659894267608">पूर्ण होईपर्यंत <ph name="HOUR"/>ता <ph name="MINUTE"/>मि</translation>
-<translation id="7297443947353982503">वापरकर्तानाव/संकेतशब्द चुकीचा किंवा EAP-प्रमाणीकरण अयशस्वी</translation>
-<translation id="6359806961507272919"><ph name="PHONE_NUMBER"/> कडून SMS</translation>
-<translation id="1244147615850840081">कॅरियर</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_ms.xtb b/chromium/ash/strings/ash_strings_ms.xtb
deleted file mode 100644
index be026837c5f..00000000000
--- a/chromium/ash/strings/ash_strings_ms.xtb
+++ /dev/null
@@ -1,229 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="ms">
-<translation id="3595596368722241419">Bateri penuh</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> dan <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Keadaan portal</translation>
-<translation id="30155388420722288">Butang Limpahan</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth didayakan</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> telah diputarkan ke <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth dilumpuhkan</translation>
-<translation id="7165320105431587207">Gagal mengkonfigurasi rangkaian</translation>
-<translation id="3775358506042162758">Anda hanya boleh mempunyai sehingga tiga akaun dalam log masuk berbilang.</translation>
-<translation id="370649949373421643">Dayakan Wi-Fi</translation>
-<translation id="3626281679859535460">Kecerahan</translation>
-<translation id="3621202678540785336">Input</translation>
-<translation id="595202126637698455">Penjejakan prestasi didayakan</translation>
-<translation id="8054466585765276473">Mengira tempoh bateri.</translation>
-<translation id="7982789257301363584">Rangkaian</translation>
-<translation id="5565793151875479467">Proksi...</translation>
-<translation id="938582441709398163">Tindihan Papan Kekunci</translation>
-<translation id="4387004326333427325">Sijil pengesahan ditolak dari jauh</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">Peleraian <ph name="DISPLAY_NAME"/> telah diubah kepada <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">HTTP gagal</translation>
-<translation id="2297568595583585744">Dulang status</translation>
-<translation id="1661867754829461514">PIN tiada</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: Menyambung...</translation>
-<translation id="40400351611212369">Ralat Pengaktifan Rangkaian</translation>
-<translation id="4237016987259239829">Ralat Sambungan Rangkaian</translation>
-<translation id="2946640296642327832">Dayakan Bluetooth</translation>
-<translation id="6459472438155181876">Melanjutkan skrin ke <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Selular</translation>
-<translation id="6596816719288285829">Alamat IP</translation>
-<translation id="4508265954913339219">Pengaktifan gagal</translation>
-<translation id="3621712662352432595">Tetapan Audio</translation>
-<translation id="1812696562331527143">Kaedah masukan anda telah ditukar kepada <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>pihak ke-3<ph name="END_LINK"/>).
-Tekan Shift + Alt untuk menukar.</translation>
-<translation id="2127372758936585790">Pengecas berkuasa rendah</translation>
-<translation id="3846575436967432996">Tiada maklumat rangkaian tersedia</translation>
-<translation id="3026237328237090306">Sediakan data mudah alih</translation>
-<translation id="5871632337994001636">Uruskan peranti...</translation>
-<translation id="785750925697875037">Lihat akaun mudah alih</translation>
-<translation id="153454903766751181">Memulakan modem selular...</translation>
-<translation id="4628814525959230255">Berkongsi kawalan skrin anda dengan <ph name="HELPER_NAME"/> melalui Hangouts.</translation>
-<translation id="7864539943188674973">Lumpuhkan Bluetooth</translation>
-<translation id="939252827960237676">Gagal menyimpan tangkapan skrin</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Mulakan semula untuk mengemas kini</translation>
-<translation id="2268813581635650749">Log keluar semua</translation>
-<translation id="735745346212279324">VPN diputuskan sambungan</translation>
-<translation id="7320906967354320621">Melahu</translation>
-<translation id="15373452373711364">Kursor tetikus besar</translation>
-<translation id="3294437725009624529">Tetamu</translation>
-<translation id="8190698733819146287">Sesuaikan bahasa dan input...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Kedudukan rak</translation>
-<translation id="8676770494376880701">Pengecas berkuasa rendah disambungkan</translation>
-<translation id="7170041865419449892">Di luar lingkungan</translation>
-<translation id="4804818685124855865">Putuskan sambungan</translation>
-<translation id="2544853746127077729">Sijil pengesahan ditolak oleh rangkaian</translation>
-<translation id="5222676887888702881">Log keluar</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Konfigurasi</translation>
-<translation id="1272079795634619415">Berhenti</translation>
-<translation id="4957722034734105353">Ketahui lebih lanjut...</translation>
-<translation id="2964193600955408481">Lumpuhkan Wi-Fi</translation>
-<translation id="4279490309300973883">Pencerminan</translation>
-<translation id="7973962044839454485">Pengesahan PPP gagal disebabkan oleh nama pengguna atau kata laluan yang salah</translation>
-<translation id="2509468283778169019">Kekunci CAPS LOCK dihidupkan</translation>
-<translation id="3892641579809465218">Paparan Dalaman</translation>
-<translation id="7823564328645135659">Bahasa telah ditukar daripada &quot;<ph name="FROM_LOCALE"/>&quot; kepada &quot;<ph name="TO_LOCALE"/>&quot; selepas menyegerakkan tetapan anda.</translation>
-<translation id="3368922792935385530">Disambungkan</translation>
-<translation id="8340999562596018839">Maklum balas dituturkan</translation>
-<translation id="8654520615680304441">Hidupkan Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Kaedah masukan anda telah ditukar kepada <ph name="INPUT_METHOD_ID"/>.
-Tekan Shift + Alt untuk menukar.</translation>
-<translation id="2562916301614567480">Rangkaian Persendirian</translation>
-<translation id="6549021752953852991">Tiada rangkaian selular tersedia</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Malang sekali, tidak wujud keserasian antara kita, Monitor. (Monitor itu tidak disokong)</translation>
-<translation id="6426039856985689743">Lumpuhkan data mudah alih</translation>
-<translation id="3087734570205094154">Bawah</translation>
-<translation id="3742055079367172538">Tangkapan skrin diambil</translation>
-<translation id="8878886163241303700">Meluaskan skrin</translation>
-<translation id="5271016907025319479">VPN tidak dikonfigurasi.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Keupayaan untuk mengambil tangkapan skrin telah dilumpuhkan oleh pentadbir anda.</translation>
-<translation id="372094107052732682">Tekan Ctrl+Shift+Q dua kali untuk keluar.</translation>
-<translation id="6803622936009808957">Tidak dapat membalikkan paparan memandangkan tiada peleraian disokong ditemui. Sebaliknya, memasuki mod desktop yang dilanjutkan.</translation>
-<translation id="1480041086352807611">Mod tunjuk cara</translation>
-<translation id="3626637461649818317">Tinggal <ph name="PERCENTAGE"/>%</translation>
-<translation id="9089416786594320554">Kaedah input</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">Pengaktifan '<ph name="NAME"/>' memerlukan sambungan rangkaian.</translation>
-<translation id="3963445509666917109">Pembesar Suara (Dalaman)</translation>
-<translation id="2825619548187458965">Rak</translation>
-<translation id="2614835198358683673">Chromebook anda tidak boleh dicas semasa dihidupkan. Pertimbangkan untuk menggunakan pengecas rasmi.</translation>
-<translation id="1895658205118569222">Tutup</translation>
-<translation id="4430019312045809116">Kelantangan</translation>
-<translation id="8681498213689260554">Mulakan semula dan Hapus Bersih untuk mengemas kini</translation>
-<translation id="4442424173763614572">Carian DNS gagal</translation>
-<translation id="7874779702599364982">Mencari rangkaian selular...</translation>
-<translation id="583281660410589416">Tidak diketahui</translation>
-<translation id="1383876407941801731">Cari</translation>
-<translation id="3901991538546252627">Menyambung ke <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Maklumat Rangkaian</translation>
-<translation id="1621499497873603021">Masa yang tinggal sehingga bateri kosong, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Keluar dari tetamu</translation>
-<translation id="8308637677604853869">Menu sebelumnya</translation>
-<translation id="4666297444214622512">Tidak boleh log masuk ke akaun lain.</translation>
-<translation id="3625258641415618104">Tangkapan skrin dilumpuhkan</translation>
-<translation id="1346748346194534595">Kanan</translation>
-<translation id="1773212559869067373">Sijil pengesahan ditolak secara setempat</translation>
-<translation id="8528322925433439945">Mudah alih ...</translation>
-<translation id="7049357003967926684">Persekutuan</translation>
-<translation id="8428213095426709021">Tetapan</translation>
-<translation id="2372145515558759244">Menyegerakkan aplikasi...</translation>
-<translation id="7256405249507348194">Ralat yang tidak dikenal pasti: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Gagal periksa AAA</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> sehingga penuh</translation>
-<translation id="5787281376604286451">Maklum balas dituturkan didayakan.
-Tekan Ctrl+Alt+Z untuk melumpuhkan.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Ralat rangkaian tidak diketahui</translation>
-<translation id="1467432559032391204">Kiri</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Mengaktifkan <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Klik automatik</translation>
-<translation id="1398853756734560583">Maksimumkan</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: Menyambung...</translation>
-<translation id="252373100621549798">Paparan Tidak Diketahui</translation>
-<translation id="1882897271359938046">Mencerminkan <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Dipalamkan pada pengecas berkuasa rendah. Pengecasan bateri mungkin tidak boleh diharapkan.</translation>
-<translation id="3784455785234192852">Kunci</translation>
-<translation id="2805756323405976993">Apl</translation>
-<translation id="1512064327686280138">Gagal pengaktifan</translation>
-<translation id="5097002363526479830">Gagal untuk bersambung ke rangkaian '<ph name="NAME"/>': <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi dimatikan.</translation>
-<translation id="2966449113954629791">Anda mungkin telah menggunakan peruntukan data mudah alih anda. Lawati <ph name="NAME"/>portal pengaktifan untuk membeli lebih banyak data.</translation>
-<translation id="8132793192354020517">Disambungkan ke <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Tetapkan kertas dinding...</translation>
-<translation id="8678698760965522072">Keadaan dalam talian</translation>
-<translation id="2532589005999780174">Mod kontras tinggi</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Ralat dalaman</translation>
-<translation id="3019353588588144572">Masa yang tinggal sehingga bateri dicas sepenuhnya, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Penggadang skrin</translation>
-<translation id="7005812687360380971">Kegagalan</translation>
-<translation id="882279321799040148">Klik untuk melihat</translation>
-<translation id="1753067873202720523">Chromebook anda mungkin tidak mengecas semasa dihidupkan.</translation>
-<translation id="5045550434625856497">Kata laluan tidak sah</translation>
-<translation id="1602076796624386989">Dayakan data mudah alih</translation>
-<translation id="6981982820502123353">Kebolehcapaian</translation>
-<translation id="3157931365184549694">Pulihkan</translation>
-<translation id="4274292172790327596">Ralat tidak dikenali</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Fon kepala</translation>
-<translation id="225680501294068881">Mengimbas untuk peranti...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Mikrofon (Dalaman)</translation>
-<translation id="4448844063988177157">Mencari rangkaian Wi-Fi...</translation>
-<translation id="8401662262483418323">Gagal untuk menyambung ke '<ph name="NAME"/>': <ph name="DETAILS"/>
-Mesej pelayan: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Ralat berlaku</translation>
-<translation id="7229570126336867161">Perlukan EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> ialah sesi awam yang diurus oleh <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Gagal bersambung ke rangkaian: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Keluar dari sesi</translation>
-<translation id="8454013096329229812">Wi-Fi dihidupkan.</translation>
-<translation id="4872237917498892622">Alt+Search atau Shift</translation>
-<translation id="9201131092683066720">Bateri <ph name="PERCENTAGE"/>% penuh.</translation>
-<translation id="2983818520079887040">Tetapan...</translation>
-<translation id="3871838685472846647">Selular diaktifkan</translation>
-<translation id="1195412055398077112">imbas lampau</translation>
-<translation id="112308213915226829">Autosembunyi rak</translation>
-<translation id="7573962313813535744">Mod dok</translation>
-<translation id="8927026611342028580">Sambungan Diminta</translation>
-<translation id="8300849813060516376">OTASP gagal</translation>
-<translation id="2792498699870441125">Alt+Search</translation>
-<translation id="8660803626959853127">Menyegerakkan <ph name="COUNT"/> fail</translation>
-<translation id="5958529069007801266">Pengguna diselia</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">Kekunci CAPS LOCK dimatikan</translation>
-<translation id="6248847161401822652">Tekan Control Shift Q dua kali untuk keluar.</translation>
-<translation id="6785414152754474415">Bateri <ph name="PERCENTAGE"/>% penuh dan sedang dicas.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Mengaktifkan...</translation>
-<translation id="4895488851634969361">Bateri penuh.</translation>
-<translation id="5947494881799873997">Berbalik</translation>
-<translation id="7593891976182323525">Search atau Shift</translation>
-<translation id="7649070708921625228">Bantuan</translation>
-<translation id="747833637904845037">Chromebook anda akan sentiasa hidup semasa disambungkan dengan paparan luar, walaupun penutupnya ditutup.</translation>
-<translation id="3050422059534974565">CAPS LOCK dihidupkan. Tekan Search atau Shift untuk membatalkan.</translation>
-<translation id="397105322502079400">Mengira...</translation>
-<translation id="158849752021629804">Perlukan rangkaian rumah</translation>
-<translation id="6857811139397017780">Aktifkan <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Carian DHCP gagal</translation>
-<translation id="6692173217867674490">Frasa laluan teruk</translation>
-<translation id="6165508094623778733">Ketahui lebih lanjut</translation>
-<translation id="9046895021617826162">Gagal disambungkan</translation>
-<translation id="7168224885072002358">Kembali kepada peleraian lama dalam <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Sesi ini akan berakhir dalam <ph name="SESSION_TIME_REMAINING"/>. Anda akan dilog keluar secara automatik.</translation>
-<translation id="8372369524088641025">Kekunci WEP teruk</translation>
-<translation id="6636709850131805001">Keadaan tidak dikenali</translation>
-<translation id="3573179567135747900">Tukar kembali kepada &quot;<ph name="FROM_LOCALE"/>&quot; (perlu dimulakan semula)</translation>
-<translation id="8103386449138765447">Mesej SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Tetapan Google Drive</translation>
-<translation id="7209101170223508707">CAPS LOCK dihidupkan.
-Tekan Alt+Search atau Shift untuk membatalkan.</translation>
-<translation id="8940956008527784070">Bateri lemah (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Terima</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> tinggal</translation>
-<translation id="3009178788565917040">Output</translation>
-<translation id="520760366042891468">Berkongsi kawalan skrin anda melalui Hangouts.</translation>
-<translation id="8000066093800657092">Tiada rangkaian</translation>
-<translation id="4015692727874266537">Log masuk akaun lain...</translation>
-<translation id="5941711191222866238">Minimumkan</translation>
-<translation id="6911468394164995108">Sertai yang lain...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Tahniah! Perkhidmatan data '<ph name="NAME"/>' anda telah diaktifkan dan sedia untuk digunakan.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/>j <ph name="MINUTE"/>m sehingga penuh</translation>
-<translation id="7297443947353982503">Nama pengguna/kata laluan tidak betul atau EAP-auth gagal</translation>
-<translation id="6359806961507272919">SMS daripada <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Pembawa</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_nl.xtb b/chromium/ash/strings/ash_strings_nl.xtb
deleted file mode 100644
index cbeda5435ba..00000000000
--- a/chromium/ash/strings/ash_strings_nl.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="nl">
-<translation id="3595596368722241419">Accu is vol</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> en <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Status van portal</translation>
-<translation id="30155388420722288">Overloopknop</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth ingeschakeld</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> is gedraaid naar <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth uitgeschakeld</translation>
-<translation id="7165320105431587207">Kan netwerk niet configureren</translation>
-<translation id="3775358506042162758">Je kunt maximaal drie accounts hebben in Toegang tot meerdere accounts</translation>
-<translation id="370649949373421643">Wifi inschakelen</translation>
-<translation id="3626281679859535460">Helderheid</translation>
-<translation id="3621202678540785336">Ingang</translation>
-<translation id="595202126637698455">Bijhouden van prestaties ingeschakeld</translation>
-<translation id="8054466585765276473">Accuduur berekenen.</translation>
-<translation id="7982789257301363584">Netwerk</translation>
-<translation id="5565793151875479467">Proxy...</translation>
-<translation id="938582441709398163">Overlay voor toetsenbord</translation>
-<translation id="4387004326333427325">Verificatiecertificaat afgewezen op afstand</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">De resolutie van <ph name="DISPLAY_NAME"/> is gewijzigd in <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">Ophalen van HTTP mislukt</translation>
-<translation id="2297568595583585744">Statussysteemvak</translation>
-<translation id="1661867754829461514">Pincode ontbreekt</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: verbinden...</translation>
-<translation id="40400351611212369">Fout bij netwerkactivering</translation>
-<translation id="4237016987259239829">Fout bij netwerkverbinding</translation>
-<translation id="2946640296642327832">Bluetooth inschakelen</translation>
-<translation id="6459472438155181876">Scherm uitbreiden naar <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Mobiel</translation>
-<translation id="6596816719288285829">IP-adres</translation>
-<translation id="4508265954913339219">Activering mislukt</translation>
-<translation id="3621712662352432595">Audio-instellingen</translation>
-<translation id="1812696562331527143">Je invoermethode is gewijzigd in <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>derden<ph name="END_LINK"/>).
-Druk op Shift + Alt om te schakelen.j</translation>
-<translation id="2127372758936585790">Laag-vermogen-lader</translation>
-<translation id="3846575436967432996">Geen netwerkinformatie beschikbaar</translation>
-<translation id="3026237328237090306">Mobiele gegevens instellen</translation>
-<translation id="5871632337994001636">Apparaten beheren...</translation>
-<translation id="785750925697875037">Mobiel account weergeven</translation>
-<translation id="153454903766751181">Mobiele modem initialiseren...</translation>
-<translation id="4628814525959230255">Controle over je scherm delen met <ph name="HELPER_NAME"/> via Hangouts.</translation>
-<translation id="7864539943188674973">Bluetooth uitschakelen</translation>
-<translation id="939252827960237676">Kan screenshot niet opslaan</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Opnieuw starten om updates uit te voeren</translation>
-<translation id="2268813581635650749">Alle gebruikers uitloggen</translation>
-<translation id="735745346212279324">Verbinding met VPN verbroken</translation>
-<translation id="7320906967354320621">Inactief</translation>
-<translation id="15373452373711364">Grote muisaanwijzer</translation>
-<translation id="3294437725009624529">Gast</translation>
-<translation id="8190698733819146287">Talen en invoer aanpassen...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Positie van plank</translation>
-<translation id="8676770494376880701">Laag-vermogen-lader aangesloten</translation>
-<translation id="7170041865419449892">Geen bereik</translation>
-<translation id="4804818685124855865">Verbinding verbreken</translation>
-<translation id="2544853746127077729">Verificatiecertificaat geweigerd door netwerk</translation>
-<translation id="5222676887888702881">Uitloggen</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Configuratie</translation>
-<translation id="1272079795634619415">Stop</translation>
-<translation id="4957722034734105353">Meer informatie...</translation>
-<translation id="2964193600955408481">Wifi uitschakelen</translation>
-<translation id="4279490309300973883">Mirroring</translation>
-<translation id="7973962044839454485">PPP-verificatie mislukt wegens een onjuiste gebruikersnaam of wachtwoord</translation>
-<translation id="2509468283778169019">CAPS LOCK is ingeschakeld</translation>
-<translation id="3892641579809465218">Interne display</translation>
-<translation id="7823564328645135659">Na het synchroniseren met je instellingen, is de taal gewijzigd van '<ph name="FROM_LOCALE"/>' in '<ph name="TO_LOCALE"/>'.</translation>
-<translation id="3368922792935385530">Verbonden</translation>
-<translation id="8340999562596018839">Gesproken feedback</translation>
-<translation id="8654520615680304441">Wifi inschakelen...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Je invoermethode is gewijzigd in <ph name="INPUT_METHOD_ID"/>.
-Druk op Shift + Alt om te schakelen.</translation>
-<translation id="2562916301614567480">Privénetwerk</translation>
-<translation id="6549021752953852991">Geen mobiel netwerk beschikbaar</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Het lijkt erop dat dit niet werkt. Het beeldscherm wordt niet ondersteund.</translation>
-<translation id="6426039856985689743">Mobiele gegevens uitschakelen</translation>
-<translation id="3087734570205094154">Onderaan</translation>
-<translation id="3742055079367172538">Screenshot gemaakt</translation>
-<translation id="8878886163241303700">Uitgebreid scherm</translation>
-<translation id="5271016907025319479">VPN is niet geconfigureerd.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Je beheerder heeft de mogelijkheid uitgeschakeld om screenshots te maken.</translation>
-<translation id="372094107052732682">Druk twee keer op Ctrl+Shift+Q om te stoppen.</translation>
-<translation id="6803622936009808957">Kan schermen niet spiegelen, omdat er geen ondersteunde resoluties zijn gevonden. Het uitgebreide bureaublad is geactiveerd.</translation>
-<translation id="1480041086352807611">Demomodus</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% resterend</translation>
-<translation id="9089416786594320554">Invoermethoden</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">Voor activering van '<ph name="NAME"/>' is een netwerkverbinding vereist.</translation>
-<translation id="3963445509666917109">Luidspreker (intern)</translation>
-<translation id="2825619548187458965">Plank</translation>
-<translation id="2614835198358683673">Je Chromebook wordt mogelijk niet opgeladen wanneer deze is ingeschakeld. Overweeg het gebruik van een officiële lader.</translation>
-<translation id="1895658205118569222">Uitschakeling</translation>
-<translation id="4430019312045809116">Volume</translation>
-<translation id="8681498213689260554">Start opnieuw op en voer Powerwash uit om bij te werken</translation>
-<translation id="4442424173763614572">DNS-lookup mislukt</translation>
-<translation id="7874779702599364982">Zoeken naar mobiele netwerken...</translation>
-<translation id="583281660410589416">Onbekend</translation>
-<translation id="1383876407941801731">Zoeken</translation>
-<translation id="3901991538546252627">Verbinding maken met <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Netwerkinfo</translation>
-<translation id="1621499497873603021">Resterende tijd totdat de accu leeg is: <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Gastsessie sluiten</translation>
-<translation id="8308637677604853869">Vorig menu</translation>
-<translation id="4666297444214622512">Kan niet inloggen op een ander account.</translation>
-<translation id="3625258641415618104">Screenshots uitgeschakeld</translation>
-<translation id="1346748346194534595">Rechts</translation>
-<translation id="1773212559869067373">Verificatiecertificaat lokaal geweigerd</translation>
-<translation id="8528322925433439945">Mobiel...</translation>
-<translation id="7049357003967926684">Verbinding</translation>
-<translation id="8428213095426709021">Instellingen</translation>
-<translation id="2372145515558759244">Apps synchroniseren...</translation>
-<translation id="7256405249507348194">Onbekende fout: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA-controle mislukt</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> tot vol</translation>
-<translation id="5787281376604286451">Gesproken feedback is ingeschakeld.
-Druk op Ctrl+Alt+Z om uit te schakelen.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Onbekende netwerkfout</translation>
-<translation id="1467432559032391204">Links</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830"><ph name="NAME"/> activeren</translation>
-<translation id="8814190375133053267">Wifi</translation>
-<translation id="1923539912171292317">Automatische klikken</translation>
-<translation id="1398853756734560583">Maximaliseren</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: verbinden...</translation>
-<translation id="252373100621549798">Onbekend display</translation>
-<translation id="1882897271359938046">Spiegelen naar <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Aangesloten op een laag-vermogen-lader. Opladen van de batterij mogelijk niet betrouwbaar.</translation>
-<translation id="3784455785234192852">Vergrendelen</translation>
-<translation id="2805756323405976993">Applicaties</translation>
-<translation id="1512064327686280138">Activering mislukt</translation>
-<translation id="5097002363526479830">Kan geen verbinding maken met het netwerk '<ph name="NAME"/>': <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wifi is uitgeschakeld.</translation>
-<translation id="2966449113954629791">Je hebt misschien je mobiele gegevensquotum verbruikt. Ga naar de activeringsportal van <ph name="NAME"/> om meer gegevens te kopen.</translation>
-<translation id="8132793192354020517">Verbonden met <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Achtergrond instellen...</translation>
-<translation id="8678698760965522072">Online status</translation>
-<translation id="2532589005999780174">Modus voor hoog contrast</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Interne fout</translation>
-<translation id="3019353588588144572">Resterende tijd totdat de accu volledig is opgeladen: <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Vergrootglas</translation>
-<translation id="7005812687360380971">Mislukt</translation>
-<translation id="882279321799040148">Klik om te bekijken</translation>
-<translation id="1753067873202720523">Je Chromebook wordt mogelijk niet opgeladen wanneer deze is ingeschakeld.</translation>
-<translation id="5045550434625856497">Onjuist wachtwoord</translation>
-<translation id="1602076796624386989">Mobiele gegevens inschakelen</translation>
-<translation id="6981982820502123353">Toegankelijkheid</translation>
-<translation id="3157931365184549694">Herstellen</translation>
-<translation id="4274292172790327596">Onbekende fout</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Hoofdtelefoon</translation>
-<translation id="225680501294068881">Scannen naar apparaten...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Microfoon (intern)</translation>
-<translation id="4448844063988177157">Zoeken naar wifi-netwerken...</translation>
-<translation id="8401662262483418323">Verbinding maken met '<ph name="NAME"/>' is mislukt: <ph name="DETAILS"/>
-Melding van de server: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Er is een fout opgetreden</translation>
-<translation id="7229570126336867161">EVDO vereist</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> is een openbare sessie die wordt beheerd door <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Kan geen verbinding maken met netwerk: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Sessie sluiten</translation>
-<translation id="8454013096329229812">Wifi is ingeschakeld.</translation>
-<translation id="4872237917498892622">Alt+Zoeken of Shift</translation>
-<translation id="9201131092683066720">De accu is <ph name="PERCENTAGE"/>% vol.</translation>
-<translation id="2983818520079887040">Instellingen...</translation>
-<translation id="3871838685472846647">Mobiel geactiveerd</translation>
-<translation id="1195412055398077112">overscan</translation>
-<translation id="112308213915226829">Plank automatisch verbergen</translation>
-<translation id="7573962313813535744">Gedockte modus</translation>
-<translation id="8927026611342028580">Verbinding aangevraagd</translation>
-<translation id="8300849813060516376">OTASP mislukt</translation>
-<translation id="2792498699870441125">Alt+Zoeken</translation>
-<translation id="8660803626959853127"><ph name="COUNT"/> bestand(en) synchroniseren</translation>
-<translation id="5958529069007801266">Bewaakte gebruiker</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK is uitgeschakeld</translation>
-<translation id="6248847161401822652">Druk twee keer op Control+Shift+Q om te stoppen.</translation>
-<translation id="6785414152754474415">De accu is <ph name="PERCENTAGE"/>% vol en wordt opgeladen.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: activeren...</translation>
-<translation id="4895488851634969361">De accu is vol.</translation>
-<translation id="5947494881799873997">Terugzetten</translation>
-<translation id="7593891976182323525">Zoeken of Shift</translation>
-<translation id="7649070708921625228">Help</translation>
-<translation id="747833637904845037">Je Chromebook blijft aan staan wanneer deze verbinding heeft met een extern scherm, zelfs als de klep is gesloten.</translation>
-<translation id="3050422059534974565">CAPS LOCK is ingeschakeld.
-Druk op Zoeken of Shift om te annuleren.</translation>
-<translation id="397105322502079400">Berekenen...</translation>
-<translation id="158849752021629804">Thuisnetwerk vereist</translation>
-<translation id="6857811139397017780"><ph name="NETWORKSERVICE"/> activeren</translation>
-<translation id="5864471791310927901">Opzoeken van DHCP mislukt</translation>
-<translation id="6692173217867674490">Onjuist wachtwoord</translation>
-<translation id="6165508094623778733">Meer informatie</translation>
-<translation id="9046895021617826162">Verbinding mislukt</translation>
-<translation id="7168224885072002358">Terugzetten naar oude resolutie over <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Deze sessie loopt af over <ph name="SESSION_TIME_REMAINING"/>. Je wordt automatisch uitgelogd.</translation>
-<translation id="8372369524088641025">Slechte WEP-sleutel</translation>
-<translation id="6636709850131805001">Niet-herkende staat</translation>
-<translation id="3573179567135747900">Teruggaan naar '<ph name="FROM_LOCALE"/>' (opnieuw starten vereist)</translation>
-<translation id="8103386449138765447">SMS-berichten: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Instellingen voor Google Drive...</translation>
-<translation id="7209101170223508707">CAPS LOCK is ingeschakeld.
-Druk op Alt+Zoeken of Shift om te annuleren.</translation>
-<translation id="8940956008527784070">Accu is bijna leeg (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Accepteren</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> resterend</translation>
-<translation id="3009178788565917040">Uitgang</translation>
-<translation id="520760366042891468">Controle over je scherm delen via Hangouts.</translation>
-<translation id="8000066093800657092">Geen netwerk</translation>
-<translation id="4015692727874266537">Inloggen op ander account...</translation>
-<translation id="5941711191222866238">Minimaliseren</translation>
-<translation id="6911468394164995108">Verbinding met ander netwerk maken...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Gefeliciteerd! Je gegevensservice '<ph name="NAME"/>' is geactiveerd en kan worden gebruikt.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/>u <ph name="MINUTE"/>m tot volledig opgeladen</translation>
-<translation id="7297443947353982503">Gebruikersnaam/wachtwoord onjuist of EAP-verificatie mislukt</translation>
-<translation id="6359806961507272919">Sms van <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Provider</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_no.xtb b/chromium/ash/strings/ash_strings_no.xtb
deleted file mode 100644
index 8ccd76f1dae..00000000000
--- a/chromium/ash/strings/ash_strings_no.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="no">
-<translation id="3595596368722241419">Batteriet er fullt</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> og <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Portaltilstand</translation>
-<translation id="30155388420722288">Overflyt-knappen</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth er aktivert</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> ble rotert til <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth er deaktivert</translation>
-<translation id="7165320105431587207">Kunne ikke konfigurere nettverket</translation>
-<translation id="3775358506042162758">Du kan bare ha opptil tre kontoer i flerpålogging.</translation>
-<translation id="370649949373421643">Aktivér Wi-Fi</translation>
-<translation id="3626281679859535460">Lysstyrke</translation>
-<translation id="3621202678540785336">Inndata</translation>
-<translation id="595202126637698455">Ytelsessporing er aktivert</translation>
-<translation id="8054466585765276473">Beregner batteritid.</translation>
-<translation id="7982789257301363584">Nettverk</translation>
-<translation id="5565793151875479467">Mellomtjener</translation>
-<translation id="938582441709398163">Tastaturbelegg</translation>
-<translation id="4387004326333427325">Autentiseringssertifikatet ble avvist eksternt</translation>
-<translation id="6979158407327259162">Google Disk</translation>
-<translation id="3683428399328702079">Oppløsningen for <ph name="DISPLAY_NAME"/> ble endret til <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">Henting av HTTP mislyktes</translation>
-<translation id="2297568595583585744">Status-felt</translation>
-<translation id="1661867754829461514">Personlig kode mangler</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: kobler til ...</translation>
-<translation id="40400351611212369">Nettverksaktiveringsfeil</translation>
-<translation id="4237016987259239829">Feil i nettverkstilkobling</translation>
-<translation id="2946640296642327832">Aktiver Bluetooth</translation>
-<translation id="6459472438155181876">Utvider skjermen til <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Mobil</translation>
-<translation id="6596816719288285829">IP-adresse</translation>
-<translation id="4508265954913339219">Aktiveringen mislyktes</translation>
-<translation id="3621712662352432595">Lydinnstillinger</translation>
-<translation id="1812696562331527143">Inndatametoden din er endret til <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>tredjepart<ph name="END_LINK"/>).
-Trykk på Shift + Alt for å bytte.</translation>
-<translation id="2127372758936585790">Lading med lav effekt</translation>
-<translation id="3846575436967432996">Ingen nettverksinformasjon tilgjengelig</translation>
-<translation id="3026237328237090306">Konfigurer mobildata</translation>
-<translation id="5871632337994001636">Administrer enheter</translation>
-<translation id="785750925697875037">Se mobilkontoen</translation>
-<translation id="153454903766751181">Starter mobilmodemet ...</translation>
-<translation id="4628814525959230255">Deling av skjermkontrollen din med <ph name="HELPER_NAME"/> via Hangouts.</translation>
-<translation id="7864539943188674973">Deaktiver Bluetooth</translation>
-<translation id="939252827960237676">Lagringen av skjermdumpen mislyktes</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Start på nytt for å oppdatere</translation>
-<translation id="2268813581635650749">Logg alle av</translation>
-<translation id="735745346212279324">VPN frakoblet</translation>
-<translation id="7320906967354320621">Ikke aktiv</translation>
-<translation id="15373452373711364">Stor markør</translation>
-<translation id="3294437725009624529">Gjest</translation>
-<translation id="8190698733819146287">Tilpass språk og inndata</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Hylleposisjon</translation>
-<translation id="8676770494376880701">Laveffektslader er tilkoblet</translation>
-<translation id="7170041865419449892">Utenfor rekkevidde</translation>
-<translation id="4804818685124855865">Koble fra</translation>
-<translation id="2544853746127077729">Autentiseringssertifikatet ble avvist av nettverket</translation>
-<translation id="5222676887888702881">Logg av</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Konfigurasjon</translation>
-<translation id="1272079795634619415">Stopp</translation>
-<translation id="4957722034734105353">Finn ut mer</translation>
-<translation id="2964193600955408481">Deaktiver Wi-Fi</translation>
-<translation id="4279490309300973883">Speiling</translation>
-<translation id="7973962044839454485">PPP-autentiseringen mislyktes på grunn av feil brukernavn eller passord</translation>
-<translation id="2509468283778169019">Caps Lock er på</translation>
-<translation id="3892641579809465218">Innebygd skjerm</translation>
-<translation id="7823564328645135659">Språket er endret fra <ph name="FROM_LOCALE"/> til <ph name="TO_LOCALE"/> etter synkronisering av innstillingene dine.</translation>
-<translation id="3368922792935385530">Tilkoblet</translation>
-<translation id="8340999562596018839">Talerespons</translation>
-<translation id="8654520615680304441">Slå på Wi-Fi</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Inndatametoden din er endret til <ph name="INPUT_METHOD_ID"/>.
-Trykk på Shift + Alt for å bytte.</translation>
-<translation id="2562916301614567480">Privat nettverk</translation>
-<translation id="6549021752953852991">Ingen tilgjengelige mobilnettverk.</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Kjære skjerm, det går ikke så bra mellom oss. (Skjermen støttes ikke)</translation>
-<translation id="6426039856985689743">Deaktiver mobildata</translation>
-<translation id="3087734570205094154">Bunn</translation>
-<translation id="3742055079367172538">Skjermdump tatt</translation>
-<translation id="8878886163241303700">Utvidet skjerm</translation>
-<translation id="5271016907025319479">VPN er ikke konfigurert.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Muligheten til å ta skjermdumper er deaktivert av administratoren.</translation>
-<translation id="372094107052732682">Trykk Ctrl+Shift+Q to ganger for å avslutte.</translation>
-<translation id="6803622936009808957">Kunne ikke speile skjermene fordi ingen støttede oppløsninger ble funnet. Utvidet skrivebord ble brukt i stedet.</translation>
-<translation id="1480041086352807611">Demo-modus</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% igjen</translation>
-<translation id="9089416786594320554">Inndatametoder</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/> %</translation>
-<translation id="2670531586141364277">Aktivering av <ph name="NAME"/> krever nettverkstilkobling.</translation>
-<translation id="3963445509666917109">Mikrofon (intern)</translation>
-<translation id="2825619548187458965">Hylle</translation>
-<translation id="2614835198358683673">Chromebook kan ikke lades mens den er slått på. Vurder å bruke den offisielle laderen.</translation>
-<translation id="1895658205118569222">Avslutning</translation>
-<translation id="4430019312045809116">Volum</translation>
-<translation id="8681498213689260554">Start på nytt og kjør Powerwash for å oppdatere</translation>
-<translation id="4442424173763614572">DNS-søk mislyktes</translation>
-<translation id="7874779702599364982">Søker etter mobilnettverk ...</translation>
-<translation id="583281660410589416">Ukjent</translation>
-<translation id="1383876407941801731">Søk</translation>
-<translation id="3901991538546252627">Kobler til <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Nettverksinformasjon</translation>
-<translation id="1621499497873603021">Gjenværende tid til batteriet er tomt – <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Avslutt gjesteøkten</translation>
-<translation id="8308637677604853869">Forrige meny</translation>
-<translation id="4666297444214622512">Kan ikke logge på en annen konto.</translation>
-<translation id="3625258641415618104">Skjermdumper er deaktivert</translation>
-<translation id="1346748346194534595">Høyre</translation>
-<translation id="1773212559869067373">Autentiseringssertifikatet ble avvist lokalt</translation>
-<translation id="8528322925433439945">Mobil</translation>
-<translation id="7049357003967926684">Tilknytning</translation>
-<translation id="8428213095426709021">Innstillinger</translation>
-<translation id="2372145515558759244">Synkroniserer programmer …</translation>
-<translation id="7256405249507348194">Ukjent feil: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA-kontroll mislyktes</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>.<ph name="MINUTE"/> til fulladet</translation>
-<translation id="5787281376604286451">Talerespons er aktivert.
-Trykk på Ctrl+Alt+Z for å deaktivere.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Ukjent nettverksfeil</translation>
-<translation id="1467432559032391204">Venstre</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Aktiverer <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Automatiske klikk</translation>
-<translation id="1398853756734560583">Maksimer</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: kobler til ...</translation>
-<translation id="252373100621549798">Ukjent skjerm</translation>
-<translation id="1882897271359938046">Speiler <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Tilkoblet laveffektslader. Batteriladingen kan være upålitelig.</translation>
-<translation id="3784455785234192852">Lås</translation>
-<translation id="2805756323405976993">Programmer</translation>
-<translation id="1512064327686280138">Aktiveringen mislyktes</translation>
-<translation id="5097002363526479830">Kunne ikke koble til nettverket «<ph name="NAME"/>»: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi er slått av.</translation>
-<translation id="2966449113954629791">Du kan ha brukt opp mobildatakvoten din. Gå til aktiveringsportalen for <ph name="NAME"/> for å kjøpe mer data.</translation>
-<translation id="8132793192354020517">Tilkoblet <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Angi bakgrunnsbilde</translation>
-<translation id="8678698760965522072">Tilkoblet tilstand</translation>
-<translation id="2532589005999780174">Høykontrastmodus</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Intern feil</translation>
-<translation id="3019353588588144572">Tid som gjenstår til batteriet er fulladet – <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Skjermforstørrer</translation>
-<translation id="7005812687360380971">Feil</translation>
-<translation id="882279321799040148">Klikk for å se den</translation>
-<translation id="1753067873202720523">Chromebook lades kanskje ikke mens den er slått på.</translation>
-<translation id="5045550434625856497">Feil passord</translation>
-<translation id="1602076796624386989">Aktivér mobildata</translation>
-<translation id="6981982820502123353">Tilgjengelighet</translation>
-<translation id="3157931365184549694">Gjenopprett</translation>
-<translation id="4274292172790327596">Ukjent feil</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Hodetelefon</translation>
-<translation id="225680501294068881">Leter etter enheter ...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/> <ph name="DATE"/></translation>
-<translation id="737451040872859086">Mikrofon (intern)</translation>
-<translation id="4448844063988177157">Søker etter Wi-Fi-nettverk ...</translation>
-<translation id="8401662262483418323">Kunne ikke koble til «<ph name="NAME"/>»: <ph name="DETAILS"/>
-Tjenermelding: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Det oppstod en feil</translation>
-<translation id="7229570126336867161">Krever EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> er en offentlig økt administrert av <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Kunne ikke koble til nettverket: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Avslutt økten</translation>
-<translation id="8454013096329229812">Wi-Fi er slått på.</translation>
-<translation id="4872237917498892622">Alt + Søk eller Shift</translation>
-<translation id="9201131092683066720">Batteriet er <ph name="PERCENTAGE"/> % fullt</translation>
-<translation id="2983818520079887040">Innstillinger</translation>
-<translation id="3871838685472846647">Mobil aktivert</translation>
-<translation id="1195412055398077112">overscan</translation>
-<translation id="112308213915226829">Skjul hylle automatisk</translation>
-<translation id="7573962313813535744">Dokket modus</translation>
-<translation id="8927026611342028580">Tilkobling har blitt forespurt</translation>
-<translation id="8300849813060516376">OTASP mislyktes</translation>
-<translation id="2792498699870441125">Alt + Søk</translation>
-<translation id="8660803626959853127">Synkroniserer <ph name="COUNT"/> fil(er)</translation>
-<translation id="5958529069007801266">Overvåket bruker</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK er av</translation>
-<translation id="6248847161401822652">Trykk Control+Shift+Q to ganger for å avslutte.</translation>
-<translation id="6785414152754474415">Batteriet er <ph name="PERCENTAGE"/> % fullt og til lading.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: aktiveres …</translation>
-<translation id="4895488851634969361">Batteriet er fullt.</translation>
-<translation id="5947494881799873997">Tilbakestill</translation>
-<translation id="7593891976182323525">Søk eller Shift</translation>
-<translation id="7649070708921625228">Hjelp</translation>
-<translation id="747833637904845037">Chromebook holder seg på mens den er koblet til en ekstern skjerm, selv når lokket er nede.</translation>
-<translation id="3050422059534974565">Caps Lock er på.
-Trykk på Søk eller Shift for å avbryte.</translation>
-<translation id="397105322502079400">Beregner …</translation>
-<translation id="158849752021629804">Trenger hjemmenettverk</translation>
-<translation id="6857811139397017780">Aktiver <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">DHCP-oppslag mislyktes</translation>
-<translation id="6692173217867674490">Feil passordfrase</translation>
-<translation id="6165508094623778733">Les mer</translation>
-<translation id="9046895021617826162">Tilkoblingen mislyktes</translation>
-<translation id="7168224885072002358">Går tilbake til den gamle oppløsningen om <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Denne økten slutter om <ph name="SESSION_TIME_REMAINING"/>. Du logges ut automatisk.</translation>
-<translation id="8372369524088641025">Feil WEP-nøkkel</translation>
-<translation id="6636709850131805001">Ikke gjenkjent tilstand</translation>
-<translation id="3573179567135747900">Endre tilbake til <ph name="FROM_LOCALE"/> (krever omstart)</translation>
-<translation id="8103386449138765447">SMS-meldinger: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Innstillinger for Google Disk</translation>
-<translation id="7209101170223508707">Caps Lock er på.
-Trykk på Alt + Søk eller Shift for å avbryte.</translation>
-<translation id="8940956008527784070">Lavt batterinivå (<ph name="PERCENTAGE"/> %)</translation>
-<translation id="4918086044614829423">Godta</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>.<ph name="MINUTE"/> gjenstår</translation>
-<translation id="3009178788565917040">Utdata</translation>
-<translation id="520760366042891468">Deler skjermkontrollen din via Hangouts.</translation>
-<translation id="8000066093800657092">Ingen nettverk</translation>
-<translation id="4015692727874266537">Logg på en annen konto</translation>
-<translation id="5941711191222866238">Minimer</translation>
-<translation id="6911468394164995108">Koble til annet</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Gratulerer! <ph name="NAME"/>-datatjenesten din er aktivert og klar til bruk.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/> t og <ph name="MINUTE"/> m til batteriet er ferdigladet</translation>
-<translation id="7297443947353982503">Brukernavn/passord er galt, eller så mislyktes EAP-autorisasjonen</translation>
-<translation id="6359806961507272919">Tekstmelding fra <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Operatør</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_pl.xtb b/chromium/ash/strings/ash_strings_pl.xtb
deleted file mode 100644
index eb3889a8c52..00000000000
--- a/chromium/ash/strings/ash_strings_pl.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="pl">
-<translation id="3595596368722241419">Bateria naładowana</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> i <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Stan portalu</translation>
-<translation id="30155388420722288">Przycisk akcji</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth włączony</translation>
-<translation id="6310121235600822547">Wyświetlacz <ph name="DISPLAY_NAME"/> został obrócony na <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth wyłączony</translation>
-<translation id="7165320105431587207">Nie można skonfigurować sieci</translation>
-<translation id="3775358506042162758">W wielokrotnym logowaniu możesz mieć najwyżej trzy konta.</translation>
-<translation id="370649949373421643">Włącz Wi-Fi</translation>
-<translation id="3626281679859535460">Jasność</translation>
-<translation id="3621202678540785336">Urządzenie wejściowe</translation>
-<translation id="595202126637698455">Śledzenie wydajności jest włączone</translation>
-<translation id="8054466585765276473">Obliczanie czasu pracy na baterii.</translation>
-<translation id="7982789257301363584">Sieć</translation>
-<translation id="5565793151875479467">Serwer proxy...</translation>
-<translation id="938582441709398163">Nakładka klawiatury</translation>
-<translation id="4387004326333427325">Certyfikat uwierzytelniania został odrzucony zdalnie</translation>
-<translation id="6979158407327259162">Dysk Google</translation>
-<translation id="3683428399328702079">Rozdzielczość wyświetlacza <ph name="DISPLAY_NAME"/> została zmieniona na <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">Wykonanie metody GET protokołu HTTP nie powiodło się.</translation>
-<translation id="2297568595583585744">Zasobnik stanu</translation>
-<translation id="1661867754829461514">Brak kodu PIN</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: łączę...</translation>
-<translation id="40400351611212369">Błąd aktywacji sieci</translation>
-<translation id="4237016987259239829">Błąd połączenia z siecią</translation>
-<translation id="2946640296642327832">Włącz Bluetooth</translation>
-<translation id="6459472438155181876">Rozszerzanie ekranu na <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Komórka</translation>
-<translation id="6596816719288285829">Adres IP</translation>
-<translation id="4508265954913339219">Aktywacja nie powiodła się</translation>
-<translation id="3621712662352432595">Ustawienia audio</translation>
-<translation id="1812696562331527143">Metoda wprowadzania została zmieniona na <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>innej firmy<ph name="END_LINK"/>).
-Naciśnij Shift + Alt, by ją przełączyć.</translation>
-<translation id="2127372758936585790">Ładowarka o małej mocy</translation>
-<translation id="3846575436967432996">Brak informacji o sieciach</translation>
-<translation id="3026237328237090306">Skonfiguruj komórkową transmisję danych</translation>
-<translation id="5871632337994001636">Zarządzaj urządzeniami...</translation>
-<translation id="785750925697875037">Wyświetl konto dla telefonów komórkowych</translation>
-<translation id="153454903766751181">Inicjuję modem komórkowy...</translation>
-<translation id="4628814525959230255">Udostępniasz ekran w Hangouts – <ph name="HELPER_NAME"/> kontroluje Twój komputer.</translation>
-<translation id="7864539943188674973">Wyłącz Bluetooth</translation>
-<translation id="939252827960237676">Nie można zapisać zrzutu ekranu</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Uruchom ponownie i zaktualizuj</translation>
-<translation id="2268813581635650749">Wyloguj wszystkich</translation>
-<translation id="735745346212279324">VPN odłączona</translation>
-<translation id="7320906967354320621">Bezczynna</translation>
-<translation id="15373452373711364">Duży kursor myszy</translation>
-<translation id="3294437725009624529">Gość</translation>
-<translation id="8190698733819146287">Dostosuj języki i metody wprowadzania...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Pozycja półki</translation>
-<translation id="8676770494376880701">Podłączono ładowarkę o małej mocy</translation>
-<translation id="7170041865419449892">Poza zasięgiem</translation>
-<translation id="4804818685124855865">Rozłącz</translation>
-<translation id="2544853746127077729">Certyfikat uwierzytelniania został odrzucony przez sieć</translation>
-<translation id="5222676887888702881">Wyloguj się</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Konfiguracja</translation>
-<translation id="1272079795634619415">Zatrzymaj</translation>
-<translation id="4957722034734105353">Więcej informacji...</translation>
-<translation id="2964193600955408481">Wyłącz Wi-Fi</translation>
-<translation id="4279490309300973883">Odbicie lustrzane</translation>
-<translation id="7973962044839454485">Uwierzytelnianie PPP nie powiodło się z powodu nieprawidłowej nazwy użytkownika lub hasła</translation>
-<translation id="2509468283778169019">CAPS LOCK jest włączony.</translation>
-<translation id="3892641579809465218">Wyświetlacz wewnętrzny</translation>
-<translation id="7823564328645135659">Po zsynchronizowaniu ustawień zmieniono język z „<ph name="FROM_LOCALE"/>” na „<ph name="TO_LOCALE"/>”.</translation>
-<translation id="3368922792935385530">Połączone</translation>
-<translation id="8340999562596018839">Potwierdzenia głosowe</translation>
-<translation id="8654520615680304441">Włącz Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Metoda wprowadzania została zmieniona na <ph name="INPUT_METHOD_ID"/>.
-Naciśnij Shift + Alt, by ją przełączyć.</translation>
-<translation id="2562916301614567480">Sieć prywatna</translation>
-<translation id="6549021752953852991">Brak dostępnych sieci komórkowych</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Drogi monitorze, nie układa się między nami. (Ten monitor jest nieobsługiwany)</translation>
-<translation id="6426039856985689743">Wyłącz komórkową transmisję danych</translation>
-<translation id="3087734570205094154">Na dół</translation>
-<translation id="3742055079367172538">Wykonano zrzut ekranu</translation>
-<translation id="8878886163241303700">Rozszerzony ekran</translation>
-<translation id="5271016907025319479">Sieć VPN jest nieskonfigurowana.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Możliwość robienia zrzutów ekranów została wyłączona przez administratora.</translation>
-<translation id="372094107052732682">Naciśnij dwukrotnie Ctrl+Shift+Q, by zakończyć.</translation>
-<translation id="6803622936009808957">Nie można wyświetlić odbicia lustrzanego, ponieważ nie znaleziono obsługiwanych rozdzielczości. Zamiast tego został włączony pulpit rozszerzony.</translation>
-<translation id="1480041086352807611">Tryb demo</translation>
-<translation id="3626637461649818317">Pozostało <ph name="PERCENTAGE"/>%</translation>
-<translation id="9089416786594320554">Wprowadzanie tekstu</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">Aktywacja <ph name="NAME"/> wymaga połączenia z siecią.</translation>
-<translation id="3963445509666917109">Głośnik (wewnętrzny)</translation>
-<translation id="2825619548187458965">Półka</translation>
-<translation id="2614835198358683673">Włączony Chromebook może nie być ładowany. Zalecamy użycie oryginalnej ładowarki.</translation>
-<translation id="1895658205118569222">Wyłączenie</translation>
-<translation id="4430019312045809116">Głośność</translation>
-<translation id="8681498213689260554">Uruchom ponownie i użyj funkcji Powerwash, by zaktualizować</translation>
-<translation id="4442424173763614572">Wyszukiwanie DNS nie powiodło się.</translation>
-<translation id="7874779702599364982">Szukam sieci komórkowych...</translation>
-<translation id="583281660410589416">Nieznany</translation>
-<translation id="1383876407941801731">Wyszukiwanie</translation>
-<translation id="3901991538546252627">Łączę z: <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Informacje o sieci</translation>
-<translation id="1621499497873603021">Czas pozostały do wyczerpania baterii: <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Zakończ sesję gościa</translation>
-<translation id="8308637677604853869">Poprzednie menu</translation>
-<translation id="4666297444214622512">Nie można zalogować się na kolejne konto.</translation>
-<translation id="3625258641415618104">Zrzuty ekranu wyłączone</translation>
-<translation id="1346748346194534595">W prawo</translation>
-<translation id="1773212559869067373">Certyfikat uwierzytelniania został odrzucony lokalnie</translation>
-<translation id="8528322925433439945">Komórkowe...</translation>
-<translation id="7049357003967926684">Powiązanie</translation>
-<translation id="8428213095426709021">Ustawienia</translation>
-<translation id="2372145515558759244">Synchronizuję aplikacje...</translation>
-<translation id="7256405249507348194">Nierozpoznany błąd: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Sprawdzenie AAA nie powiodło się</translation>
-<translation id="8456362689280298700">Do naładowania: <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="5787281376604286451">Potwierdzenia głosowe są włączone.
-Aby wyłączyć, naciśnij Ctrl+Alt+Z.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Nieznany błąd sieci</translation>
-<translation id="1467432559032391204">W lewo</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Aktywuję <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Automatyczne kliknięcia</translation>
-<translation id="1398853756734560583">Maksymalizuj</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: łączę...</translation>
-<translation id="252373100621549798">Nieznany wyświetlacz</translation>
-<translation id="1882897271359938046">Kopia na <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Podłączono ładowarkę o małej mocy. Ładowanie baterii może być nieprawidłowe.</translation>
-<translation id="3784455785234192852">Zablokuj</translation>
-<translation id="2805756323405976993">Aplikacje</translation>
-<translation id="1512064327686280138">Niepowodzenie aktywacji</translation>
-<translation id="5097002363526479830">Nie udało się połączyć z siecią „<ph name="NAME"/>”: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi wyłączone.</translation>
-<translation id="2966449113954629791">Możliwe, że wykorzystałeś już limit transferu danych przez sieć komórkową. Odwiedź portal aktywacji <ph name="NAME"/>, by zwiększyć limit.</translation>
-<translation id="8132793192354020517">Połączono z <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Ustaw tapetę...</translation>
-<translation id="8678698760965522072">Online</translation>
-<translation id="2532589005999780174">Tryb wysokiego kontrastu</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Błąd wewnętrzny</translation>
-<translation id="3019353588588144572">Czas pozostały do pełnego naładowania baterii: <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Lupa</translation>
-<translation id="7005812687360380971">Niepowodzenie</translation>
-<translation id="882279321799040148">Kliknij, by wyświetlić</translation>
-<translation id="1753067873202720523">Włączonego Chromebooka nie można ładować.</translation>
-<translation id="5045550434625856497">Nieprawidłowe hasło</translation>
-<translation id="1602076796624386989">Włącz komórkową transmisję danych</translation>
-<translation id="6981982820502123353">Ułatwienia dostępu</translation>
-<translation id="3157931365184549694">Przywróć</translation>
-<translation id="4274292172790327596">Nierozpoznany błąd</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Słuchawki</translation>
-<translation id="225680501294068881">Skanowanie w poszukiwaniu urządzeń...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Mikrofon (wewnętrzny)</translation>
-<translation id="4448844063988177157">Trwa wyszukiwanie sieci Wi-Fi...</translation>
-<translation id="8401662262483418323">Nie udało się połączyć z „<ph name="NAME"/>”: <ph name="DETAILS"/>
-Komunikat serwera: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Wystąpił błąd</translation>
-<translation id="7229570126336867161">Wymagana technologia EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> jest publiczną sesją zarządzaną przez <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Nie udało się połączyć z siecią: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Zakończ sesję</translation>
-<translation id="8454013096329229812">Wi-Fi włączone.</translation>
-<translation id="4872237917498892622">Alt+Szukaj lub Shift</translation>
-<translation id="9201131092683066720">Naładowanie baterii: <ph name="PERCENTAGE"/>%.</translation>
-<translation id="2983818520079887040">Ustawienia</translation>
-<translation id="3871838685472846647">Sieć komórkowa aktywna</translation>
-<translation id="1195412055398077112">nadmiarowość obrazu</translation>
-<translation id="112308213915226829">Autoukrywanie półki</translation>
-<translation id="7573962313813535744">Tryb dokowania</translation>
-<translation id="8927026611342028580">Poproszono o połączenie</translation>
-<translation id="8300849813060516376">Dostarczanie OTASP nie powiodło się</translation>
-<translation id="2792498699870441125">Alt+Szukaj</translation>
-<translation id="8660803626959853127">Synchronizacja: <ph name="COUNT"/> pliki(ów)</translation>
-<translation id="5958529069007801266">Użytkownik nadzorowany</translation>
-<translation id="3709443003275901162">Ponad 9</translation>
-<translation id="639644700271529076">CAPS LOCK jest wyłączony</translation>
-<translation id="6248847161401822652">Naciśnij dwukrotnie Control Shift Q, by zakończyć.</translation>
-<translation id="6785414152754474415">Naładowanie baterii: <ph name="PERCENTAGE"/>%. Trwa ładowanie.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: aktywuję...</translation>
-<translation id="4895488851634969361">Bateria jest pełna.</translation>
-<translation id="5947494881799873997">Przywróć</translation>
-<translation id="7593891976182323525">Szukaj lub Shift</translation>
-<translation id="7649070708921625228">Pomoc</translation>
-<translation id="747833637904845037">Chromebook pozostanie włączony, dopóki będzie podłączony do wyświetlacza zewnętrznego, nawet po zamknięciu pokrywy.</translation>
-<translation id="3050422059534974565">CAPS LOCK jest włączony.
-Naciśnij Szukaj lub Shift, by anulować.</translation>
-<translation id="397105322502079400">Obliczanie...</translation>
-<translation id="158849752021629804">Wymagana sieć macierzysta</translation>
-<translation id="6857811139397017780">Aktywuj usługę <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Wyszukiwanie DHCP nie powiodło się</translation>
-<translation id="6692173217867674490">Błędne hasło</translation>
-<translation id="6165508094623778733">Więcej informacji</translation>
-<translation id="9046895021617826162">Łączenie nie powiodło się</translation>
-<translation id="7168224885072002358">Powrót do wcześniejszej rozdzielczości za <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Ta sesja zakończy się za <ph name="SESSION_TIME_REMAINING"/>. Nastąpi automatyczne wylogowanie.</translation>
-<translation id="8372369524088641025">Błędny klucz WEP</translation>
-<translation id="6636709850131805001">Nierozpoznany stan</translation>
-<translation id="3573179567135747900">Zmień z powrotem na „<ph name="FROM_LOCALE"/>” (wymaga ponownego uruchomienia)</translation>
-<translation id="8103386449138765447">SMS-y: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Ustawienia Dysku Google...</translation>
-<translation id="7209101170223508707">CAPS LOCK jest włączony.
-Naciśnij Alt+Szukaj lub Shift, by anulować.</translation>
-<translation id="8940956008527784070">Niski stan baterii (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Akceptuj</translation>
-<translation id="5102001756192215136">Pozostało <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Urządzenie wyjściowe</translation>
-<translation id="520760366042891468">Udostępniasz ekran i kontrolę nad komputerem w Hangouts.</translation>
-<translation id="8000066093800657092">Brak sieci</translation>
-<translation id="4015692727874266537">Zaloguj się na kolejne konto...</translation>
-<translation id="5941711191222866238">Minimalizuj</translation>
-<translation id="6911468394164995108">Połącz z inną...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Gratulacje! Usługa transmisji danych „<ph name="NAME"/>” została aktywowana i można z niej korzystać.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/> godz. <ph name="MINUTE"/> min do pełnego naładowania</translation>
-<translation id="7297443947353982503">Niepoprawna nazwa użytkownika lub hasło albo uwierzytelnianie EAP nie powiodło się</translation>
-<translation id="6359806961507272919">Wiadomość SMS z numeru <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Operator</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_pt-BR.xtb b/chromium/ash/strings/ash_strings_pt-BR.xtb
deleted file mode 100644
index bc7ddd7ba0f..00000000000
--- a/chromium/ash/strings/ash_strings_pt-BR.xtb
+++ /dev/null
@@ -1,228 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="pt-BR">
-<translation id="3595596368722241419">Bateria carregada</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> e <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Estado do portal</translation>
-<translation id="30155388420722288">Botão de estouro</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth ativado</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> foi substituída por <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth desativado</translation>
-<translation id="7165320105431587207">Falha ao configurar rede</translation>
-<translation id="3775358506042162758">É possível ter até três contas em login múltiplo.</translation>
-<translation id="370649949373421643">Ativar Wi-Fi</translation>
-<translation id="3626281679859535460">Brilho</translation>
-<translation id="3621202678540785336">Entrada</translation>
-<translation id="595202126637698455">Rastreamento de desempenho ativado</translation>
-<translation id="8054466585765276473">Calculando duração da bateria.</translation>
-<translation id="7982789257301363584">Rede</translation>
-<translation id="5565793151875479467">Proxy...</translation>
-<translation id="938582441709398163">Sobreposição do teclado</translation>
-<translation id="4387004326333427325">Certificado de autenticação rejeitado remotamente</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">A resolução de <ph name="DISPLAY_NAME"/> foi alterada para <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">HTTP falhou</translation>
-<translation id="2297568595583585744">Bandeja de status</translation>
-<translation id="1661867754829461514">PIN ausente</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: conectando...</translation>
-<translation id="40400351611212369">Erro de ativação de rede</translation>
-<translation id="4237016987259239829">Erro de conexão da rede</translation>
-<translation id="2946640296642327832">Ativar bluetooth</translation>
-<translation id="6459472438155181876">Estendendo tela para <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Celular</translation>
-<translation id="6596816719288285829">Endereço IP</translation>
-<translation id="4508265954913339219">Falha na ativação</translation>
-<translation id="3621712662352432595">Configurações de áudio</translation>
-<translation id="1812696562331527143">Seu método de entrada mudou para <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>terceiros<ph name="END_LINK"/>).
-Pressione Shift + Alt para alternar.</translation>
-<translation id="2127372758936585790">Carregador de baixa potência</translation>
-<translation id="3846575436967432996">Não há informações de rede disponíveis</translation>
-<translation id="3026237328237090306">Configurar dados móveis</translation>
-<translation id="5871632337994001636">Gerenciar dispositivos...</translation>
-<translation id="785750925697875037">Exibir conta de celular</translation>
-<translation id="153454903766751181">Inicializando modem celular...</translation>
-<translation id="4628814525959230255">Compartilhando o controle de sua tela com <ph name="HELPER_NAME"/> por meio do Hangouts.</translation>
-<translation id="7864539943188674973">Desativar bluetooth</translation>
-<translation id="939252827960237676">Falha ao salvar a captura de tela</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Reiniciar para atualizar</translation>
-<translation id="2268813581635650749">Desconectar todos</translation>
-<translation id="735745346212279324">VPN desconectada</translation>
-<translation id="7320906967354320621">Inativo</translation>
-<translation id="15373452373711364">Cursor grande do mouse</translation>
-<translation id="3294437725009624529">Visitante</translation>
-<translation id="8190698733819146287">Personalizar idiomas e entrada...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Posição da estante</translation>
-<translation id="8676770494376880701">Carregador de baixa potência conectado</translation>
-<translation id="7170041865419449892">Fora de alcance</translation>
-<translation id="4804818685124855865">Desconectar</translation>
-<translation id="2544853746127077729">Certificado de autenticação rejeitado pela rede</translation>
-<translation id="5222676887888702881">Sair</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Configuração</translation>
-<translation id="1272079795634619415">Parar</translation>
-<translation id="4957722034734105353">Saiba mais...</translation>
-<translation id="2964193600955408481">Desativar Wi-Fi</translation>
-<translation id="4279490309300973883">Espelhamento</translation>
-<translation id="7973962044839454485">Falha da autenticação PPC devido a senha ou nome de usuário incorreto</translation>
-<translation id="2509468283778169019">CAPS LOCK está ativado</translation>
-<translation id="3892641579809465218">Display interno</translation>
-<translation id="7823564328645135659">O idioma foi alterado de &quot;<ph name="FROM_LOCALE"/>&quot; para &quot;<ph name="TO_LOCALE"/>&quot; após a sincronização de suas configurações.</translation>
-<translation id="3368922792935385530">Conectado</translation>
-<translation id="8340999562596018839">Feedback falado</translation>
-<translation id="8654520615680304441">Ativar Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Seu método de entrada mudou para <ph name="INPUT_METHOD_ID"/>.
-Pressione Shift + Alt para alternar.</translation>
-<translation id="2562916301614567480">Rede privada</translation>
-<translation id="6549021752953852991">Nenhuma rede celular disponível</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Prezado monitor, as coisas não estão dando certo entre nós (este monitor não é suportado).</translation>
-<translation id="6426039856985689743">Desativar dados móveis</translation>
-<translation id="3087734570205094154">Parte inferior</translation>
-<translation id="3742055079367172538">Captura de tela realizada</translation>
-<translation id="8878886163241303700">Tela ampla</translation>
-<translation id="5271016907025319479">A VPN não está configurada.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">A capacidade de fazer capturas de tela foi desativada pelo seu administrador.</translation>
-<translation id="372094107052732682">Pressione Ctrl+Shift+Q duas vezes para sair.</translation>
-<translation id="6803622936009808957">Não foi possível espelhar os displays porque não foram encontradas resoluções suportadas. Em vez disso, foi ativada a área de trabalho estendida.</translation>
-<translation id="1480041086352807611">Modo de demonstração</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% restante</translation>
-<translation id="9089416786594320554">Métodos de entrada</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">A ativação de &quot;<ph name="NAME"/>&quot; requer uma conexão com a rede.</translation>
-<translation id="3963445509666917109">Alto-falante (interno)</translation>
-<translation id="2825619548187458965">Estante</translation>
-<translation id="2614835198358683673">Seu Chromebook pode não carregar enquanto estiver ligado. Considere usar o carregador oficial.</translation>
-<translation id="1895658205118569222">Encerramento</translation>
-<translation id="4430019312045809116">Volume</translation>
-<translation id="8681498213689260554">Reiniciar e executar Powerwash para atualizar</translation>
-<translation id="4442424173763614572">A busca de DNS falhou</translation>
-<translation id="7874779702599364982">Procurando redes de celular...</translation>
-<translation id="583281660410589416">Desconhecido</translation>
-<translation id="1383876407941801731">Pesquisa</translation>
-<translation id="3901991538546252627">Conectando-se a <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Informações de rede</translation>
-<translation id="1621499497873603021">O tempo restante até que a bateria se esgote é de <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Sair da sessão de visitante</translation>
-<translation id="8308637677604853869">Menu anterior</translation>
-<translation id="4666297444214622512">Não é possível fazer login em outra conta.</translation>
-<translation id="3625258641415618104">Capturas de tela desativadas</translation>
-<translation id="1346748346194534595">Para a direita</translation>
-<translation id="1773212559869067373">Certificado de autenticação rejeitado localmente</translation>
-<translation id="8528322925433439945">Celular...</translation>
-<translation id="7049357003967926684">Associação</translation>
-<translation id="8428213095426709021">Configurações</translation>
-<translation id="2372145515558759244">Sincronizando aplicativos...</translation>
-<translation id="7256405249507348194">Erro não reconhecido: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Falha ao verificar AAA</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> para carga completa</translation>
-<translation id="5787281376604286451">O feedback falado está ativado.
-Pressione Ctrl+Alt+Z para desativá-lo.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Erro de rede desconhecido</translation>
-<translation id="1467432559032391204">Para a esquerda</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Ativando <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Cliques automáticos</translation>
-<translation id="1398853756734560583">Maximizar</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: conectando...</translation>
-<translation id="252373100621549798">Exibição desconhecida</translation>
-<translation id="1882897271359938046">Espelhamento de <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Conectado a um carregador de baixa potência. O carregamento da bateria pode não ser confiável.</translation>
-<translation id="3784455785234192852">Bloquear</translation>
-<translation id="2805756323405976993">Aplicativos</translation>
-<translation id="1512064327686280138">Falha na ativação</translation>
-<translation id="5097002363526479830">Falha na conexão à rede &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">O Wi-Fi está desligado.</translation>
-<translation id="2966449113954629791">Você pode ter usado a cota de dados do seu dispositivo móvel. Visite o portal de ativação do <ph name="NAME"/> para comprar mais dados.</translation>
-<translation id="8132793192354020517">Conectado à <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Definir plano de fundo...</translation>
-<translation id="8678698760965522072">Estado on-line</translation>
-<translation id="2532589005999780174">Modo de alto contraste</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Erro interno</translation>
-<translation id="3019353588588144572">O tempo restante até que a bateria esteja totalmente carregada é de <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Lupa</translation>
-<translation id="7005812687360380971">Falha</translation>
-<translation id="882279321799040148">Clique para visualizar</translation>
-<translation id="1753067873202720523">Seu Chromebook não pode ser carregado enquanto está ligado.</translation>
-<translation id="5045550434625856497">Senha incorreta</translation>
-<translation id="1602076796624386989">Ativar dados móveis</translation>
-<translation id="6981982820502123353">Acessibilidade</translation>
-<translation id="3157931365184549694">Restaurar</translation>
-<translation id="4274292172790327596">Erro desconhecido</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Fone de ouvido</translation>
-<translation id="225680501294068881">Procurando dispositivos...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Microfone (interno)</translation>
-<translation id="4448844063988177157">Procurando redes Wi-Fi...</translation>
-<translation id="8401662262483418323">Falha ao se conectar a &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/>
-Mensagem do servidor: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Ocorreu um erro</translation>
-<translation id="7229570126336867161">EVDO ausente</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> é uma sessão pública gerenciada por <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Falha na conexão à rede: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Sair da sessão</translation>
-<translation id="8454013096329229812">O Wi-Fi está ligado.</translation>
-<translation id="4872237917498892622">Alt + Pesquisar ou Shift</translation>
-<translation id="9201131092683066720">A bateria está <ph name="PERCENTAGE"/>% carregada.</translation>
-<translation id="2983818520079887040">Configurações...</translation>
-<translation id="3871838685472846647">Celular ativado</translation>
-<translation id="1195412055398077112">overscan</translation>
-<translation id="112308213915226829">Ocultar estante automaticamente</translation>
-<translation id="7573962313813535744">Modo ancorado</translation>
-<translation id="8927026611342028580">Conexão solicitada</translation>
-<translation id="8300849813060516376">Falha no OTASP</translation>
-<translation id="2792498699870441125">Alt + Pesquisar</translation>
-<translation id="8660803626959853127">Sincronizando <ph name="COUNT"/> arquivos</translation>
-<translation id="5958529069007801266">Usuário supervisionado</translation>
-<translation id="3709443003275901162">Mais de 9</translation>
-<translation id="639644700271529076">CAPS LOCK está desativado</translation>
-<translation id="6248847161401822652">Pressione Control+Shift+Q duas vezes para sair.</translation>
-<translation id="6785414152754474415">A bateria está <ph name="PERCENTAGE"/>% cheia e carregando.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Ativando...</translation>
-<translation id="4895488851634969361">A bateria está carregada.</translation>
-<translation id="5947494881799873997">Reverter</translation>
-<translation id="7593891976182323525">Pesquisar ou Shift</translation>
-<translation id="7649070708921625228">Ajuda</translation>
-<translation id="747833637904845037">Seu Chromebook permanecerá ligado enquanto estiver conectado a um display externo, mesmo com a tampa fechada.</translation>
-<translation id="3050422059534974565">A tecla CAPS LOCK está ativada. Pressione Pesquisar ou Shift para cancelar.</translation>
-<translation id="397105322502079400">Calculando...</translation>
-<translation id="158849752021629804">Rede doméstica ausente</translation>
-<translation id="6857811139397017780">Ativar <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Falha ao procurar DHCP</translation>
-<translation id="6692173217867674490">Senha incorreta</translation>
-<translation id="6165508094623778733">Saiba mais</translation>
-<translation id="9046895021617826162">Falha na conexão</translation>
-<translation id="7168224885072002358">Revertendo para resolução anterior em <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Esta sessão terminará em <ph name="SESSION_TIME_REMAINING"/>. Você será automaticamente desconectado.</translation>
-<translation id="8372369524088641025">Chave WEP incorreta</translation>
-<translation id="6636709850131805001">Estado não reconhecido</translation>
-<translation id="3573179567135747900">Voltar a &quot;<ph name="FROM_LOCALE"/>&quot; (exige reinicialização)</translation>
-<translation id="8103386449138765447">Mensagens SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Configurações do Google Drive...</translation>
-<translation id="7209101170223508707">A tecla CAPS LOCK está ativada. Pressione Alt + Pesquisar ou Shift para cancelar.</translation>
-<translation id="8940956008527784070">Nível de bateria baixo (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Aceitar</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> restantes</translation>
-<translation id="3009178788565917040">Saída</translation>
-<translation id="520760366042891468">Compartilhando o controle de sua tela por meio do Hangouts.</translation>
-<translation id="8000066093800657092">Sem rede</translation>
-<translation id="4015692727874266537">Fazer login em outra conta...</translation>
-<translation id="5941711191222866238">Minimizar</translation>
-<translation id="6911468394164995108">Conectar-se a outra...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Parabéns! Seu serviço de dados &quot;<ph name="NAME"/>&quot; foi ativado e está pronto para ser usado.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/>h<ph name="MINUTE"/>m até a carga total</translation>
-<translation id="7297443947353982503">Nome de usuário/senha incorretos ou falha de autenticação EAP</translation>
-<translation id="6359806961507272919">SMS de <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Operadora</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_pt-PT.xtb b/chromium/ash/strings/ash_strings_pt-PT.xtb
deleted file mode 100644
index 59cd6759e73..00000000000
--- a/chromium/ash/strings/ash_strings_pt-PT.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="pt-PT">
-<translation id="3595596368722241419">Bateria carregada</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> e <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Estado do portal</translation>
-<translation id="30155388420722288">Botão de Sobrecarga</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth ativado</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> foi rodado para <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth desativado</translation>
-<translation id="7165320105431587207">Não foi possível configurar a rede</translation>
-<translation id="3775358506042162758">Só pode ter três contas no máximo no início de sessão integrado.</translation>
-<translation id="370649949373421643">Ativar Wi-Fi</translation>
-<translation id="3626281679859535460">Brilho</translation>
-<translation id="3621202678540785336">Entrada</translation>
-<translation id="595202126637698455">Rastreio do desempenho ativado</translation>
-<translation id="8054466585765276473">A calcular tempo da bateria.</translation>
-<translation id="7982789257301363584">Rede</translation>
-<translation id="5565793151875479467">Proxy...</translation>
-<translation id="938582441709398163">Sobreposição do teclado</translation>
-<translation id="4387004326333427325">Certificado de autenticação rejeitado remotamente</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">A resolução de <ph name="DISPLAY_NAME"/> foi alterada para <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">A obtenção de HTTP falhou</translation>
-<translation id="2297568595583585744">Tabuleiro de estado</translation>
-<translation id="1661867754829461514">Falta o PIN</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: A ligar...</translation>
-<translation id="40400351611212369">Erro na Ativação de Rede</translation>
-<translation id="4237016987259239829">Erro de ligação à rede</translation>
-<translation id="2946640296642327832">Ativar Bluetooth</translation>
-<translation id="6459472438155181876">A prolongar ecrã para <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Telemóvel</translation>
-<translation id="6596816719288285829">Endereço IP</translation>
-<translation id="4508265954913339219">A activação falhou</translation>
-<translation id="3621712662352432595">Definições de Áudio</translation>
-<translation id="1812696562331527143">O seu método de introdução foi alterado para <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>terceiros<ph name="END_LINK"/>).
-Prima Shift + Alt para mudar.</translation>
-<translation id="2127372758936585790">Carregador de baixo consumo</translation>
-<translation id="3846575436967432996">Não existem informações de rede disponíveis</translation>
-<translation id="3026237328237090306">Configurar dados móveis</translation>
-<translation id="5871632337994001636">Gerir dispositivos...</translation>
-<translation id="785750925697875037">Ver conta do telemóvel</translation>
-<translation id="153454903766751181">A inicializar o modem celular...</translation>
-<translation id="4628814525959230255">Partilhar o controlo do seu ecrã com <ph name="HELPER_NAME"/> através do Hangouts.</translation>
-<translation id="7864539943188674973">Desativar Bluetooth</translation>
-<translation id="939252827960237676">Não foi possível guardar a captura de ecrã</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Reiniciar para atualizar</translation>
-<translation id="2268813581635650749">Terminar sessão de todos</translation>
-<translation id="735745346212279324">VPN desligado</translation>
-<translation id="7320906967354320621">Inactiva</translation>
-<translation id="15373452373711364">Cursor do rato grande</translation>
-<translation id="3294437725009624529">Convidado</translation>
-<translation id="8190698733819146287">Personalizar idiomas e introdução...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Posição da prateleira</translation>
-<translation id="8676770494376880701">Carregador de baixo consumo ligado</translation>
-<translation id="7170041865419449892">Fora de alcance</translation>
-<translation id="4804818685124855865">Desligar</translation>
-<translation id="2544853746127077729">Certificado de autenticação rejeitado pela rede</translation>
-<translation id="5222676887888702881">Terminar sessão</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Configuração</translation>
-<translation id="1272079795634619415">Parar</translation>
-<translation id="4957722034734105353">Saiba mais...</translation>
-<translation id="2964193600955408481">Desativar Wi-Fi</translation>
-<translation id="4279490309300973883">Espelhamento</translation>
-<translation id="7973962044839454485">Falha na autenticação PPP devido a um nome de utilizador ou palavra-passe incorretos</translation>
-<translation id="2509468283778169019">CAPS LOCK está ativado</translation>
-<translation id="3892641579809465218">Apresentação Interna</translation>
-<translation id="7823564328645135659">O idioma foi alterado de <ph name="FROM_LOCALE"/> para <ph name="TO_LOCALE"/> depois de sincronizar as suas definições.</translation>
-<translation id="3368922792935385530">Ligado</translation>
-<translation id="8340999562596018839">Respostas faladas</translation>
-<translation id="8654520615680304441">Ligar Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">O seu método de introdução foi alterado para <ph name="INPUT_METHOD_ID"/>.
-Prima Shift + Alt para mudar.</translation>
-<translation id="2562916301614567480">Rede Privada</translation>
-<translation id="6549021752953852991">Sem rede celular disponível</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Caro Monitor, não está a resultar entre nós. (Esse monitor não é suportado)</translation>
-<translation id="6426039856985689743">Desativar dados móveis</translation>
-<translation id="3087734570205094154">Parte inferior</translation>
-<translation id="3742055079367172538">Captura de ecrã efetuada</translation>
-<translation id="8878886163241303700">Ecrã alargado</translation>
-<translation id="5271016907025319479">A VPN não está configurada.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">A capacidade de criar capturas de ecrã foi desativada pelo seu administrador.</translation>
-<translation id="372094107052732682">Prima Ctrl+Shift+Q duas vezes para sair.</translation>
-<translation id="6803622936009808957">Não foi possível espelhar os ecrãs, porque não foram encontradas resoluções suportadas. Em vez disso, entrou no ambiente de trabalho expandido.</translation>
-<translation id="1480041086352807611">Modo de demonstração</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/> % restante</translation>
-<translation id="9089416786594320554">Métodos de introdução</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">A ativação de &quot;<ph name="NAME"/>&quot; necessita de uma ligação de rede.</translation>
-<translation id="3963445509666917109">Altifalante (interno)</translation>
-<translation id="2825619548187458965">Prateleira</translation>
-<translation id="2614835198358683673">É possível que não consiga carregar o seu Chromebook enquanto este se encontrar ligado. Considere utilizar o carregador oficial.</translation>
-<translation id="1895658205118569222">Encerrar</translation>
-<translation id="4430019312045809116">Volume</translation>
-<translation id="8681498213689260554">Reiniciar e Powerwash para atualizar</translation>
-<translation id="4442424173763614572">A procura de DNS falhou</translation>
-<translation id="7874779702599364982">A procurar redes celulares...</translation>
-<translation id="583281660410589416">Desconhecido</translation>
-<translation id="1383876407941801731">Pesquisa</translation>
-<translation id="3901991538546252627">A ligar a <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Informações da Rede</translation>
-<translation id="1621499497873603021">Tempo restante até a bateria terminar, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Sair da sessão de convidado</translation>
-<translation id="8308637677604853869">Menu anterior</translation>
-<translation id="4666297444214622512">Não é possível iniciar sessão noutra conta.</translation>
-<translation id="3625258641415618104">Capturas de ecrã desativadas</translation>
-<translation id="1346748346194534595">Direita</translation>
-<translation id="1773212559869067373">Certificado de autenticação rejeitado localmente</translation>
-<translation id="8528322925433439945">Telemóvel...</translation>
-<translation id="7049357003967926684">Associação</translation>
-<translation id="8428213095426709021">Definições</translation>
-<translation id="2372145515558759244">A sincronizar aplicações...</translation>
-<translation id="7256405249507348194">Erro não reconhecido: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">A verificação AAA falhou</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> até estar carregada</translation>
-<translation id="5787281376604286451">As respostas faladas estão ativadas.
-Prima Ctrl+Alt+Z para desativar.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Erro de rede desconhecido</translation>
-<translation id="1467432559032391204">Esquerda</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">A ativar <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Cliques automáticos</translation>
-<translation id="1398853756734560583">Maximizar</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: A ligar...</translation>
-<translation id="252373100621549798">Apresentação Desconhecida</translation>
-<translation id="1882897271359938046">A espelhar para <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Ligado a um carregador de baixo consumo. O carregamento da bateria pode não ser fiável.</translation>
-<translation id="3784455785234192852">Bloquear</translation>
-<translation id="2805756323405976993">Aplicações</translation>
-<translation id="1512064327686280138">Falha na activação</translation>
-<translation id="5097002363526479830">Falha ao ligar à rede &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">A ligação Wi-Fi está desativada.</translation>
-<translation id="2966449113954629791">Poderá ter atingido o limite de utilização dos dados móveis. Visite o portal de ativação <ph name="NAME"/> para comprar mais dados.</translation>
-<translation id="8132793192354020517">Ligado a <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Definir imagem de fundo...</translation>
-<translation id="8678698760965522072">Estado on-line</translation>
-<translation id="2532589005999780174">Modo de alto contraste</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Erro interno</translation>
-<translation id="3019353588588144572">Tempo restante até a bateria estar totalmente carregada: <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Lupa</translation>
-<translation id="7005812687360380971">Falha</translation>
-<translation id="882279321799040148">Clique para ver</translation>
-<translation id="1753067873202720523">O seu Chromebook pode não carregar enquanto estiver ligado.</translation>
-<translation id="5045550434625856497">Palavra-passe incorreta</translation>
-<translation id="1602076796624386989">Ativar dados móveis</translation>
-<translation id="6981982820502123353">Acessibilidade</translation>
-<translation id="3157931365184549694">Restaurar</translation>
-<translation id="4274292172790327596">Erro não reconhecido</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Auscultador</translation>
-<translation id="225680501294068881">A procurar dispositivos...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Microfone (interno)</translation>
-<translation id="4448844063988177157">A pesquisar redes Wi-Fi...</translation>
-<translation id="8401662262483418323">A ligação a &quot;<ph name="NAME"/>&quot; falhou: <ph name="DETAILS"/>
-Mensagem do servidor: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Ocorreu um erro</translation>
-<translation id="7229570126336867161">Requer EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> é uma sessão pública gerida por <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Não foi possível ligar à rede: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Sair da sessão</translation>
-<translation id="8454013096329229812">A ligação Wi-Fi está ativada.</translation>
-<translation id="4872237917498892622">Alt + Pesquisar ou Shift</translation>
-<translation id="9201131092683066720">A bateria está <ph name="PERCENTAGE"/>% cheia.</translation>
-<translation id="2983818520079887040">Definições...</translation>
-<translation id="3871838685472846647">Telemóvel Ativado</translation>
-<translation id="1195412055398077112">overscan</translation>
-<translation id="112308213915226829">Ocultar automaticamente a prateleira</translation>
-<translation id="7573962313813535744">Modo ancorado</translation>
-<translation id="8927026611342028580">Ligação Solicitada</translation>
-<translation id="8300849813060516376">O OTASP falhou</translation>
-<translation id="2792498699870441125">Alt + Pesquisar</translation>
-<translation id="8660803626959853127">A sincronizar <ph name="COUNT"/> ficheiro(s)</translation>
-<translation id="5958529069007801266">Utilizador supervisionado</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK está desativado</translation>
-<translation id="6248847161401822652">Prima Ctrl+Shift+Q duas vezes para sair.</translation>
-<translation id="6785414152754474415">A bateria está <ph name="PERCENTAGE"/>% cheia e a carregar.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: a ativar...</translation>
-<translation id="4895488851634969361">A bateria está carregada.</translation>
-<translation id="5947494881799873997">Reverter</translation>
-<translation id="7593891976182323525">Pesquisar ou Shift</translation>
-<translation id="7649070708921625228">Ajuda</translation>
-<translation id="747833637904845037">O Chromebook mantém-se aceso enquanto está ligado a um visor externo, mesmo com a tampa fechada.</translation>
-<translation id="3050422059534974565">CAPS LOCK ativado.
-Prima Pesquisar ou Shift para cancelar.</translation>
-<translation id="397105322502079400">A calcular...</translation>
-<translation id="158849752021629804">Requer rede doméstica</translation>
-<translation id="6857811139397017780">Activar <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">A procura DHCP falhou</translation>
-<translation id="6692173217867674490">Frase de acesso incorrecta</translation>
-<translation id="6165508094623778733">Saiba mais</translation>
-<translation id="9046895021617826162">A ligação falhou</translation>
-<translation id="7168224885072002358">A reverter para a resolução antiga dentro de <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Esta sessão irá terminar em <ph name="SESSION_TIME_REMAINING"/>. A sua sessão será automaticamente terminada.</translation>
-<translation id="8372369524088641025">Chave WEP incorrecta</translation>
-<translation id="6636709850131805001">Estado não reconhecido</translation>
-<translation id="3573179567135747900">Reverter alteração para <ph name="FROM_LOCALE"/> (requer reinicio)</translation>
-<translation id="8103386449138765447">Mensagens SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Definições do Google Drive...</translation>
-<translation id="7209101170223508707">CAPS LOCK ativado.
-Prima Alt + Pesquisar ou Shift para cancelar.</translation>
-<translation id="8940956008527784070">Bateria fraca (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Aceitar</translation>
-<translation id="5102001756192215136">Restam <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Saída</translation>
-<translation id="520760366042891468">Partilhar o controlo do seu ecrã através dos Hangouts.</translation>
-<translation id="8000066093800657092">Sem rede</translation>
-<translation id="4015692727874266537">Iniciar sessão numa conta adicional...</translation>
-<translation id="5941711191222866238">Minimizar</translation>
-<translation id="6911468394164995108">Aderir a outra...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Parabéns! O serviço de dados &quot;<ph name="NAME"/>&quot; foi ativado e está pronto a funcionar.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/>h <ph name="MINUTE"/>m até ficar completa</translation>
-<translation id="7297443947353982503">Nome de utilizador ou palavra-passe incorreto ou falha na autenticação EAP</translation>
-<translation id="6359806961507272919">SMS de <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Operador</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_ro.xtb b/chromium/ash/strings/ash_strings_ro.xtb
deleted file mode 100644
index 0537f704eab..00000000000
--- a/chromium/ash/strings/ash_strings_ro.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="ro">
-<translation id="3595596368722241419">Baterie încărcată</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Stare portal</translation>
-<translation id="30155388420722288">Butonul Overflow</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth activat</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> a fost rotit la <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth dezactivat</translation>
-<translation id="7165320105431587207">Rețeaua nu a putut fi configurată</translation>
-<translation id="3775358506042162758">Conectarea multiplă acceptă maximum trei conturi.</translation>
-<translation id="370649949373421643">Activați Wi-Fi</translation>
-<translation id="3626281679859535460">Luminozitate</translation>
-<translation id="3621202678540785336">Intrări</translation>
-<translation id="595202126637698455">Urmărirea performanței este activată</translation>
-<translation id="8054466585765276473">Se calculează durata bateriei.</translation>
-<translation id="7982789257301363584">Rețea</translation>
-<translation id="5565793151875479467">Proxy...</translation>
-<translation id="938582441709398163">Suprapunere a tastaturii</translation>
-<translation id="4387004326333427325">Certificatul de autentificare a fost respins de la distanță</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">Rezoluția <ph name="DISPLAY_NAME"/> a fost modificată la <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">Metoda GET a protocolului HTTP a eșuat</translation>
-<translation id="2297568595583585744">Bara de stare</translation>
-<translation id="1661867754829461514">Codul PIN lipsește</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: se conectează...</translation>
-<translation id="40400351611212369">Eroare de activare a rețelei</translation>
-<translation id="4237016987259239829">Eroare de conectare la rețea</translation>
-<translation id="2946640296642327832">Activați Bluetooth</translation>
-<translation id="6459472438155181876">Se extinde ecranul pe <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Celular</translation>
-<translation id="6596816719288285829">Adresă IP</translation>
-<translation id="4508265954913339219">Activarea nu a reușit</translation>
-<translation id="3621712662352432595">Setări audio</translation>
-<translation id="1812696562331527143">Metoda de introducere s-a schimbat la <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>terță parte<ph name="END_LINK"/>).
- Apăsați pe Shift + Alt pentru a comuta.</translation>
-<translation id="2127372758936585790">Încărcător de putere joasă</translation>
-<translation id="3846575436967432996">Nu sunt disponibile informații despre rețele</translation>
-<translation id="3026237328237090306">Configurați datele mobile</translation>
-<translation id="5871632337994001636">Gestionați dispozitivele...</translation>
-<translation id="785750925697875037">Afișați contul mobil</translation>
-<translation id="153454903766751181">Se inițializează modemul mobil...</translation>
-<translation id="4628814525959230255">În prezent, <ph name="HELPER_NAME"/> vă poate controla ecranul prin intermediul Hangouts.</translation>
-<translation id="7864539943188674973">Dezactivați Bluetooth</translation>
-<translation id="939252827960237676">Captura de ecran nu a putut fi salvată.</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Reporniți pentru a actualiza</translation>
-<translation id="2268813581635650749">Deconectați toți utilizatorii</translation>
-<translation id="735745346212279324">Rețea VPN deconectată</translation>
-<translation id="7320906967354320621">Inactivă</translation>
-<translation id="15373452373711364">Cursor de mouse mare</translation>
-<translation id="3294437725009624529">Invitat</translation>
-<translation id="8190698733819146287">Personalizați limbile și modul de introducere...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Poziție raft</translation>
-<translation id="8676770494376880701">A fost conectat un încărcător de putere joasă</translation>
-<translation id="7170041865419449892">Fără acoperire</translation>
-<translation id="4804818685124855865">Deconectați-vă</translation>
-<translation id="2544853746127077729">Certificatul de autentificare a fost respins de rețea</translation>
-<translation id="5222676887888702881">Deconectați-vă</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Configurare</translation>
-<translation id="1272079795634619415">Opriți</translation>
-<translation id="4957722034734105353">Aflați mai multe...</translation>
-<translation id="2964193600955408481">Dezactivați Wi-Fi</translation>
-<translation id="4279490309300973883">Oglindire</translation>
-<translation id="7973962044839454485">Autentificarea PPP nu a reușit, din cauza unui nume de utilizator sau a unei parole greșite</translation>
-<translation id="2509468283778169019">Tasta CAPS LOCK este activată</translation>
-<translation id="3892641579809465218">Afișaj intern</translation>
-<translation id="7823564328645135659">După sincronizarea setărilor, limba a fost modificată de la „<ph name="FROM_LOCALE"/>” la „<ph name="TO_LOCALE"/>”.</translation>
-<translation id="3368922792935385530">Conectat</translation>
-<translation id="8340999562596018839">Feedback vocal</translation>
-<translation id="8654520615680304441">Activați Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Metoda de introducere s-a schimbat la <ph name="INPUT_METHOD_ID"/>.
- Apăsați pe Shift + Alt pentru a comuta.</translation>
-<translation id="2562916301614567480">Rețea privată</translation>
-<translation id="6549021752953852991">Nicio rețea mobilă disponibilă</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Dear Monitor, it's not working out between us. (Monitorul respectiv nu este acceptat)</translation>
-<translation id="6426039856985689743">Dezactivați datele mobile</translation>
-<translation id="3087734570205094154">Jos</translation>
-<translation id="3742055079367172538">Captură de ecran efectuată</translation>
-<translation id="8878886163241303700">Ecran extins</translation>
-<translation id="5271016907025319479">Rețeaua VPN nu este configurată.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Capacitatea de a crea capturi de ecran a fost dezactivată de administrator.</translation>
-<translation id="372094107052732682">Apăsați de două ori Ctrl+Shift+Q pentru a ieși.</translation>
-<translation id="6803622936009808957">Afișajele nu au putut fi oglindite, deoarece nu au fost găsite rezoluții acceptate. Ați intrat, în schimb, în modul monitor extins.</translation>
-<translation id="1480041086352807611">Modul demonstrativ</translation>
-<translation id="3626637461649818317">Nivel disponibil: <ph name="PERCENTAGE"/>%</translation>
-<translation id="9089416786594320554">Metode de introducere</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/> %</translation>
-<translation id="2670531586141364277">Activarea rețelei „<ph name="NAME"/>” necesită o conexiune la rețea.</translation>
-<translation id="3963445509666917109">Difuzor (intern)</translation>
-<translation id="2825619548187458965">Raft</translation>
-<translation id="2614835198358683673">Este posibil ca laptopul Chromebook să nu se încarce în timp ce este pornit. Se recomandă să utilizați încărcătorul original.</translation>
-<translation id="1895658205118569222">Închideți</translation>
-<translation id="4430019312045809116">Volum</translation>
-<translation id="8681498213689260554">Pentru a actualiza, reporniți și efectuați Powerwash</translation>
-<translation id="4442424173763614572">Căutarea DNS a eșuat</translation>
-<translation id="7874779702599364982">Se caută rețele mobile...</translation>
-<translation id="583281660410589416">Necunoscut</translation>
-<translation id="1383876407941801731">Căutare</translation>
-<translation id="3901991538546252627">Se conectează la <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Informații despre rețea</translation>
-<translation id="1621499497873603021">Timp rămas până la descărcarea bateriei: <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Ieșiți din sesiunea pentru invitați</translation>
-<translation id="8308637677604853869">Meniul anterior</translation>
-<translation id="4666297444214622512">Nu vă mai puteți conecta la alt cont.</translation>
-<translation id="3625258641415618104">Capturile de ecran sunt dezactivate</translation>
-<translation id="1346748346194534595">Dreapta</translation>
-<translation id="1773212559869067373">Certificatul de autentificare a fost respins local</translation>
-<translation id="8528322925433439945">Rețele mobile...</translation>
-<translation id="7049357003967926684">Asociație</translation>
-<translation id="8428213095426709021">Setări</translation>
-<translation id="2372145515558759244">Se sincronizează aplicațiile...</translation>
-<translation id="7256405249507348194">Eroare nerecunoscută: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Verificarea AAA a eșuat</translation>
-<translation id="8456362689280298700">Se încarcă în: <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="5787281376604286451">Este activat feedbackul vocal.
-Apăsați Ctrl+Alt+Z pentru a-l dezactiva.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Eroare de rețea necunoscută</translation>
-<translation id="1467432559032391204">Stânga</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Se activează <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Clicuri automate</translation>
-<translation id="1398853756734560583">Maximizați</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: se conectează...</translation>
-<translation id="252373100621549798">Afișaj necunoscut</translation>
-<translation id="1882897271359938046">Se oglindește pe <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">V-ați conectat la un încărcător de putere joasă. Încărcarea bateriei poate fi nesigură.</translation>
-<translation id="3784455785234192852">Blocați</translation>
-<translation id="2805756323405976993">Google Apps</translation>
-<translation id="1512064327686280138">Activare nereușită</translation>
-<translation id="5097002363526479830">A eșuat conectarea la rețeaua „<ph name="NAME"/>”: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Conexiunea Wi-Fi este dezactivată.</translation>
-<translation id="2966449113954629791">Este posibil să fi epuizat datele mobile puse la dispoziție. Accesați portalul de activare <ph name="NAME"/> pentru a cumpăra mai multe date.</translation>
-<translation id="8132793192354020517">Conectat la <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Setați o imagine de fundal...</translation>
-<translation id="8678698760965522072">Stare online</translation>
-<translation id="2532589005999780174">Mod de contrast ridicat</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Eroare internă</translation>
-<translation id="3019353588588144572">Timp rămas până la încărcarea completă a bateriei: <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Lupă de ecran</translation>
-<translation id="7005812687360380971">Nereușită</translation>
-<translation id="882279321799040148">Dați clic pentru afișare</translation>
-<translation id="1753067873202720523">Chromebookul nu se poate încărca dacă este pornit.</translation>
-<translation id="5045550434625856497">Parolă incorectă</translation>
-<translation id="1602076796624386989">Activați datele mobile</translation>
-<translation id="6981982820502123353">Accesibilitate</translation>
-<translation id="3157931365184549694">Restabiliți</translation>
-<translation id="4274292172790327596">Eroare nerecunoscută</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Căști</translation>
-<translation id="225680501294068881">Se caută gadgeturi...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Microfon (intern)</translation>
-<translation id="4448844063988177157">Se caută rețele Wi-Fi...</translation>
-<translation id="8401662262483418323">Nu s-a putut stabili conexiunea la „<ph name="NAME"/>”: <ph name="DETAILS"/>
-Mesaj server: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">A apărut o eroare</translation>
-<translation id="7229570126336867161">Este necesar EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> este o sesiune publică gestionată de <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Conectarea la rețea nu s-a realizat: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Ieșiți din sesiune</translation>
-<translation id="8454013096329229812">Conexiunea Wi-Fi este activată.</translation>
-<translation id="4872237917498892622">Alt+Căutare sau Shift</translation>
-<translation id="9201131092683066720">Nivelul bateriei este de <ph name="PERCENTAGE"/>%.</translation>
-<translation id="2983818520079887040">Setări...</translation>
-<translation id="3871838685472846647">Mobil activat</translation>
-<translation id="1195412055398077112">suprascanare</translation>
-<translation id="112308213915226829">Ascundeți automat raftul</translation>
-<translation id="7573962313813535744">Modul andocat</translation>
-<translation id="8927026611342028580">Conectare solicitată</translation>
-<translation id="8300849813060516376">OTASP a eșuat</translation>
-<translation id="2792498699870441125">Alt+Căutare</translation>
-<translation id="8660803626959853127">Se sincronizează <ph name="COUNT"/> (de) fișiere</translation>
-<translation id="5958529069007801266">Utilizator monitorizat</translation>
-<translation id="3709443003275901162">Peste 9</translation>
-<translation id="639644700271529076">Tasta CAPS LOCK este dezactivată</translation>
-<translation id="6248847161401822652">Apăsați de două ori Control Shift Q pentru a ieși.</translation>
-<translation id="6785414152754474415">Nivelul bateriei este de <ph name="PERCENTAGE"/>% și se încarcă.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: se activează...</translation>
-<translation id="4895488851634969361">Bateria este încărcată complet.</translation>
-<translation id="5947494881799873997">Reveniți</translation>
-<translation id="7593891976182323525">Căutare sau Shift</translation>
-<translation id="7649070708921625228">Ajutor</translation>
-<translation id="747833637904845037">Chromebookul va continua să funcționeze cât timp este conectat la un afișaj extern, chiar și cu capacul închis.</translation>
-<translation id="3050422059534974565">Tasta CAPS LOCK este activată.
-Apăsați Căutare sau Shift pentru a anula.</translation>
-<translation id="397105322502079400">Se calculează...</translation>
-<translation id="158849752021629804">Este necesară rețeaua de domiciliu</translation>
-<translation id="6857811139397017780">Activați <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Căutarea DHCP a eșuat</translation>
-<translation id="6692173217867674490">Expresie de acces greșită</translation>
-<translation id="6165508094623778733">Aflați mai multe</translation>
-<translation id="9046895021617826162">Conectarea a eșuat</translation>
-<translation id="7168224885072002358">Se revine la rezoluția anterioară în <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Această sesiune se va încheia în <ph name="SESSION_TIME_REMAINING"/>. Veți fi deconectat(ă) automat.</translation>
-<translation id="8372369524088641025">Cheie WEP greșită</translation>
-<translation id="6636709850131805001">Stare nerecunoscută</translation>
-<translation id="3573179567135747900">Modificați înapoi la „<ph name="FROM_LOCALE"/>” (este necesară repornirea)</translation>
-<translation id="8103386449138765447">Mesaje SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Setări Disc Google...</translation>
-<translation id="7209101170223508707">Tasta CAPS LOCK este activată.
-Apăsați Alt+Căutare sau Shift pentru a anula.</translation>
-<translation id="8940956008527784070">Baterie slabă (<ph name="PERCENTAGE"/> %)</translation>
-<translation id="4918086044614829423">Accept</translation>
-<translation id="5102001756192215136">Timp rămas: <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Ieșiri</translation>
-<translation id="520760366042891468">În prezent, permiteți controlul la ecran prin intermediul Hangouts.</translation>
-<translation id="8000066093800657092">Nicio rețea</translation>
-<translation id="4015692727874266537">Conectați-vă la alt cont...</translation>
-<translation id="5941711191222866238">Minimizați</translation>
-<translation id="6911468394164995108">Conectați-vă la altă rețea...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Felicitări! Serviciul de date „<ph name="NAME"/>” a fost activat și este gata de utilizare.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/> h. <ph name="MINUTE"/> min. până la încărcare completă</translation>
-<translation id="7297443947353982503">Numele de utilizator sau parola sunt incorecte sau autentificarea EAP nu a reușit</translation>
-<translation id="6359806961507272919">SMS de la <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Operator</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_ru.xtb b/chromium/ash/strings/ash_strings_ru.xtb
deleted file mode 100644
index 2602f633a18..00000000000
--- a/chromium/ash/strings/ash_strings_ru.xtb
+++ /dev/null
@@ -1,229 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="ru">
-<translation id="3595596368722241419">Аккумулятор заряжен</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Состояние портала</translation>
-<translation id="30155388420722288">Кнопка переполнения</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth включен</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/>: положение изменено на <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth отключен</translation>
-<translation id="7165320105431587207">Не удалось настроить сеть</translation>
-<translation id="3775358506042162758">Множественный вход поддерживает не более трех аккаунтов.</translation>
-<translation id="370649949373421643">Включить Wi-Fi</translation>
-<translation id="3626281679859535460">Яркость</translation>
-<translation id="3621202678540785336">Вход</translation>
-<translation id="595202126637698455">Включено отслеживание эффективности</translation>
-<translation id="8054466585765276473">Подсчет оставшегося времени работы от батареи…</translation>
-<translation id="7982789257301363584">Сеть</translation>
-<translation id="5565793151875479467">Прокси-сервер…</translation>
-<translation id="938582441709398163">Накладка на клавиатуру</translation>
-<translation id="4387004326333427325">Сертификат аутентификации отклонен удаленно</translation>
-<translation id="6979158407327259162">Google Диск</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/>: установлено разрешение <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">Произошла ошибка запроса HTTP GET</translation>
-<translation id="2297568595583585744">Строка состояния</translation>
-<translation id="1661867754829461514">PIN-код отсутствует</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: соединение...</translation>
-<translation id="40400351611212369">Ошибка активации сети</translation>
-<translation id="4237016987259239829">Ошибка сетевого подключения</translation>
-<translation id="2946640296642327832">Включить Bluetooth</translation>
-<translation id="6459472438155181876">Расширение экрана на <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Сотовый</translation>
-<translation id="6596816719288285829">IP-адрес</translation>
-<translation id="4508265954913339219">Активация завершилась со сбоем</translation>
-<translation id="3621712662352432595">Настройки звука</translation>
-<translation id="1812696562331527143">Способ ввода изменен на <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>независимый разработчик<ph name="END_LINK"/>).
-Для переключения нажмите Shift + Alt.</translation>
-<translation id="2127372758936585790">Маломощное зарядное устройство</translation>
-<translation id="3846575436967432996">Информация о сетях недоступна</translation>
-<translation id="3026237328237090306">Настроить мобильную передачу данных</translation>
-<translation id="5871632337994001636">Управление устройствами...</translation>
-<translation id="785750925697875037">Просмотр мобильного аккаунта</translation>
-<translation id="153454903766751181">Инициализация сотового модема…</translation>
-<translation id="4628814525959230255">Доступ к экрану для <ph name="HELPER_NAME"/> в Hangouts.</translation>
-<translation id="7864539943188674973">Отключить Bluetooth</translation>
-<translation id="939252827960237676">Не удалось сохранить скриншот</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Перезагрузите, чтобы обновить</translation>
-<translation id="2268813581635650749">Выйти из всех аккаунтов</translation>
-<translation id="735745346212279324">VPN-соединение прервано</translation>
-<translation id="7320906967354320621">Не активно</translation>
-<translation id="15373452373711364">Большой курсор мыши</translation>
-<translation id="3294437725009624529">Гость</translation>
-<translation id="8190698733819146287">Настройка языков и ввода...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Положение полки</translation>
-<translation id="8676770494376880701">Подключено маломощное зарядное устройство</translation>
-<translation id="7170041865419449892">Выход за рамки диапазона</translation>
-<translation id="4804818685124855865">Отключиться</translation>
-<translation id="2544853746127077729">Сертификат аутентификации отклонен сетью</translation>
-<translation id="5222676887888702881">Выйти</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Конфигурация</translation>
-<translation id="1272079795634619415">Остановить</translation>
-<translation id="4957722034734105353">Подробнее…</translation>
-<translation id="2964193600955408481">Отключить Wi-Fi</translation>
-<translation id="4279490309300973883">Отражение</translation>
-<translation id="7973962044839454485">Не удалось выполнить аутентификацию PPP: неверное имя пользователя или пароль</translation>
-<translation id="2509468283778169019">Включен режим CAPS LOCK</translation>
-<translation id="3892641579809465218">Встроенный дисплей</translation>
-<translation id="7823564328645135659">В результате синхронизации настроек язык изменен. Теперь используется <ph name="TO_LOCALE"/>, а не <ph name="FROM_LOCALE"/>.</translation>
-<translation id="3368922792935385530">Подключено</translation>
-<translation id="8340999562596018839">Голосовое сопровождение</translation>
-<translation id="8654520615680304441">Включение Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Способ ввода изменен на <ph name="INPUT_METHOD_ID"/>.
-Для переключения нажмите Shift + Alt.</translation>
-<translation id="2562916301614567480">Частная сеть</translation>
-<translation id="6549021752953852991">Сеть не найдена</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Не удалось выполнить операцию.</translation>
-<translation id="6426039856985689743">Отключить мобильную передачу данных</translation>
-<translation id="3087734570205094154">Низ</translation>
-<translation id="3742055079367172538">Сделан скриншот</translation>
-<translation id="8878886163241303700">Раскрытый экран</translation>
-<translation id="5271016907025319479">VPN не настроена.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Функция создания скриншотов была отключена администратором.</translation>
-<translation id="372094107052732682">Чтобы выйти, дважды нажмите Ctrl + Shift + Q.</translation>
-<translation id="6803622936009808957">Не удалось дублировать изображение экрана, т. к. указанное разрешение не поддерживается. Включен режим расширенного рабочего стола.</translation>
-<translation id="1480041086352807611">Демонстрационный режим</translation>
-<translation id="3626637461649818317">Осталось <ph name="PERCENTAGE"/>%</translation>
-<translation id="9089416786594320554">Методы ввода</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">Для активации &quot;<ph name="NAME"/>&quot; требуется подключение к сети.</translation>
-<translation id="3963445509666917109">Динамик (внутренний)</translation>
-<translation id="2825619548187458965">Полка</translation>
-<translation id="2614835198358683673">Возможны проблемы при зарядке Chromebook. Рекомендуем использовать комплектное зарядное устройство.</translation>
-<translation id="1895658205118569222">Завершение работы</translation>
-<translation id="4430019312045809116">Объем</translation>
-<translation id="8681498213689260554">Чтобы обновить систему, перезапустите ее и выполните Powerwash</translation>
-<translation id="4442424173763614572">Произошла ошибка при поиске сервера DNS</translation>
-<translation id="7874779702599364982">Поиск сетей мобильной связи...</translation>
-<translation id="583281660410589416">неизвестно</translation>
-<translation id="1383876407941801731">Поиск</translation>
-<translation id="3901991538546252627">Подключение к <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Информация о сети</translation>
-<translation id="1621499497873603021">Оставшееся время работы от батареи: <ph name="TIME_LEFT"/>.</translation>
-<translation id="5980301590375426705">Выйти из гостевого режима</translation>
-<translation id="8308637677604853869">Предыдущее меню</translation>
-<translation id="4666297444214622512">Не удается войти ещё в один аккаунт.</translation>
-<translation id="3625258641415618104">Скриншоты отключены</translation>
-<translation id="1346748346194534595">Вправо</translation>
-<translation id="1773212559869067373">Сертификат аутентификации отклонен локально</translation>
-<translation id="8528322925433439945">Мобильные сети…</translation>
-<translation id="7049357003967926684">Связь</translation>
-<translation id="8428213095426709021">Настройки</translation>
-<translation id="2372145515558759244">Синхронизация приложений…</translation>
-<translation id="7256405249507348194">Неопознанная ошибка: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Сбой при проверке AAA</translation>
-<translation id="8456362689280298700">до полной зарядки: <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="5787281376604286451">Голосовое сопровождение включено. Чтобы отключить его, нажмите Ctrl + Alt + Z.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Неизвестная ошибка сети</translation>
-<translation id="1467432559032391204">Влево</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Активация <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Автоматическое нажатие</translation>
-<translation id="1398853756734560583">Развернуть</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: соединение...</translation>
-<translation id="252373100621549798">Неизвестный дисплей</translation>
-<translation id="1882897271359938046">Дублирование экрана в <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Подключено маломощное зарядное устройство. Возможны проблемы при зарядке.</translation>
-<translation id="3784455785234192852">Заблокировать</translation>
-<translation id="2805756323405976993">Приложения</translation>
-<translation id="1512064327686280138">Сбой активации</translation>
-<translation id="5097002363526479830">Не удалось подключиться к сети <ph name="NAME"/>: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi отключен</translation>
-<translation id="2966449113954629791">Возможно, вы использовали свой лимит мобильных данных. Зайдите на портал активации <ph name="NAME"/>, чтобы приобрести дополнительный объем данных.</translation>
-<translation id="8132793192354020517">Подключено к сети <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Выбрать обои</translation>
-<translation id="8678698760965522072">Состояние &quot;В сети&quot;</translation>
-<translation id="2532589005999780174">Режим высокой контрастности</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Внутренняя ошибка</translation>
-<translation id="3019353588588144572">Оставшееся время до полной зарядки батареи: <ph name="TIME_REMAINING"/>.</translation>
-<translation id="3473479545200714844">Лупа</translation>
-<translation id="7005812687360380971">Сбой</translation>
-<translation id="882279321799040148">Посмотреть</translation>
-<translation id="1753067873202720523">Возможны проблемы при зарядке Chromebook.</translation>
-<translation id="5045550434625856497">Неправильный пароль</translation>
-<translation id="1602076796624386989">Включить мобильную передачу данных</translation>
-<translation id="6981982820502123353">Специальные возможности</translation>
-<translation id="3157931365184549694">Восстановить</translation>
-<translation id="4274292172790327596">Нераспознанная ошибка</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Наушники</translation>
-<translation id="225680501294068881">Поиск устройств…</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Микрофон (внутренний)</translation>
-<translation id="4448844063988177157">Поиск сетей Wi-Fi...</translation>
-<translation id="8401662262483418323">Сбой подключения к службе &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/>
-Сообщение сервера: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Произошел сбой.</translation>
-<translation id="7229570126336867161">Необходимо наличие EV-DO</translation>
-<translation id="2999742336789313416">Открытый сеанс <ph name="DISPLAY_NAME"/> выполняется в домене <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Не удалось подключиться к сети: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Завершить сеанс</translation>
-<translation id="8454013096329229812">Wi-Fi включен</translation>
-<translation id="4872237917498892622">Alt + Search или Shift</translation>
-<translation id="9201131092683066720">Батарея заряжена на <ph name="PERCENTAGE"/>%.</translation>
-<translation id="2983818520079887040">Настройки...</translation>
-<translation id="3871838685472846647">Включена сотовая связь</translation>
-<translation id="1195412055398077112">Каемка экрана</translation>
-<translation id="112308213915226829">Автоматически скрывать полку</translation>
-<translation id="7573962313813535744">Закрепленный режим</translation>
-<translation id="8927026611342028580">Запрос на подключение отправлен</translation>
-<translation id="8300849813060516376">Сбой OTASP</translation>
-<translation id="2792498699870441125">Alt + Search</translation>
-<translation id="8660803626959853127">Синхронизация файлов (<ph name="COUNT"/>)</translation>
-<translation id="5958529069007801266">Контролируемый профиль</translation>
-<translation id="3709443003275901162">более 9</translation>
-<translation id="639644700271529076">CAPS LOCK отключен</translation>
-<translation id="6248847161401822652">Чтобы выйти, дважды нажмите Control + Shift + Q.</translation>
-<translation id="6785414152754474415">Батарея заряжена на <ph name="PERCENTAGE"/>% и подключена к источнику питания.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: выполняется активация...</translation>
-<translation id="4895488851634969361">Батарея полностью заряжена.</translation>
-<translation id="5947494881799873997">Отменить</translation>
-<translation id="7593891976182323525">Search или Shift</translation>
-<translation id="7649070708921625228">Справка</translation>
-<translation id="747833637904845037">При подключении к внешнему дисплею Chromebook не отключается, даже если его крышка закрыта.</translation>
-<translation id="3050422059534974565">Включен режим CAPS LOCK.
-Чтобы отключить его, нажмите Search или Shift.</translation>
-<translation id="397105322502079400">Вычисление…</translation>
-<translation id="158849752021629804">Необходима домашняя сеть</translation>
-<translation id="6857811139397017780">Активировать <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Поиск DHCP завершен со сбоем</translation>
-<translation id="6692173217867674490">Неправильная кодовая фраза</translation>
-<translation id="6165508094623778733">Подробнее...</translation>
-<translation id="9046895021617826162">Сбой подключения</translation>
-<translation id="7168224885072002358">Возврат к предыдущему разрешению через <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Сеанс будет завершен через <ph name="SESSION_TIME_REMAINING"/>. Произойдет автоматический выход из системы.</translation>
-<translation id="8372369524088641025">Недопустимый ключ WEP</translation>
-<translation id="6636709850131805001">Нераспознанное состояние</translation>
-<translation id="3573179567135747900">Вернуться к языку: &quot;<ph name="FROM_LOCALE"/>&quot; (потребуется перезагрузка)</translation>
-<translation id="8103386449138765447">SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Настройки Диска Google…</translation>
-<translation id="7209101170223508707">Включен режим CAPS LOCK.
-Чтобы отключить его, нажмите Alt + Search или Shift.</translation>
-<translation id="8940956008527784070">Низкий заряд батареи (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Принять</translation>
-<translation id="5102001756192215136">Осталось <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Выход</translation>
-<translation id="520760366042891468">Доступ к экрану в Hangouts.</translation>
-<translation id="8000066093800657092">Нет сети</translation>
-<translation id="4015692727874266537">Войти ещё в один аккаунт...</translation>
-<translation id="5941711191222866238">Свернуть</translation>
-<translation id="6911468394164995108">Подключиться к другой сети...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Поздравляем! Служба передачи данных &quot;<ph name="NAME"/>&quot; активирована и готова к работе.</translation>
-<translation id="412065659894267608">До полной зарядки: <ph name="HOUR"/> ч <ph name="MINUTE"/> мин</translation>
-<translation id="7297443947353982503">Либо вы ввели неверное имя пользователя или пароль, либо не удалось выполнить аутентификацию по протоколу EAP</translation>
-<translation id="6359806961507272919">SMS от <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Оператор связи</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_sk.xtb b/chromium/ash/strings/ash_strings_sk.xtb
deleted file mode 100644
index 4c1b3d0c8b5..00000000000
--- a/chromium/ash/strings/ash_strings_sk.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="sk">
-<translation id="3595596368722241419">Batéria je nabitá</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> a <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Stav portálu</translation>
-<translation id="30155388420722288">Tlačidlo pretečenia</translation>
-<translation id="8673028979667498656">270 °</translation>
-<translation id="5571066253365925590">Rozhranie Bluetooth je povolené</translation>
-<translation id="6310121235600822547">Obrazovka <ph name="DISPLAY_NAME"/> bola otočená o <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Rozhranie Bluetooth je zakázané</translation>
-<translation id="7165320105431587207">Sieť sa nepodarilo nakonfigurovať</translation>
-<translation id="3775358506042162758">V rámci viacnásobného prihlásenia môžete mať maximálne tri účty.</translation>
-<translation id="370649949373421643">Povoliť Wi-Fi</translation>
-<translation id="3626281679859535460">Jas</translation>
-<translation id="3621202678540785336">Vstup</translation>
-<translation id="595202126637698455">Sledovanie výkonnosti je povolené</translation>
-<translation id="8054466585765276473">Výpočet času výdrže batérie.</translation>
-<translation id="7982789257301363584">Sieť</translation>
-<translation id="5565793151875479467">Server proxy...</translation>
-<translation id="938582441709398163">Prekryvná vrstva klávesnice</translation>
-<translation id="4387004326333427325">Certifikát na overenie totožnosti bol zamietnutý na diaľku</translation>
-<translation id="6979158407327259162">Disk Google</translation>
-<translation id="3683428399328702079">Rozlíšenie obrazovky <ph name="DISPLAY_NAME"/> bolo zmenené na <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">Príkaz get protokolu HTTP zlyhal</translation>
-<translation id="2297568595583585744">Stavový panel</translation>
-<translation id="1661867754829461514">Chýba kód PIN</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: pripája sa...</translation>
-<translation id="40400351611212369">Chyba aktivácie siete</translation>
-<translation id="4237016987259239829">Chyba sieťového pripojenia</translation>
-<translation id="2946640296642327832">Povoliť rozhranie Bluetooth</translation>
-<translation id="6459472438155181876">Rozšírenie obrazovky na displej <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Mobilné</translation>
-<translation id="6596816719288285829">Adresa IP</translation>
-<translation id="4508265954913339219">Aktivácia zlyhala</translation>
-<translation id="3621712662352432595">Nastavenia zvuku</translation>
-<translation id="1812696562331527143">Metóda vstupu sa zmenila na <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>tretia strana<ph name="END_LINK"/>).
- Prepnete ju stlačením klávesov Shift + Alt.</translation>
-<translation id="2127372758936585790">Nabíjačka s nízkym výkonom</translation>
-<translation id="3846575436967432996">Informácie o sieti nie sú k dispozícii</translation>
-<translation id="3026237328237090306">Nastavenie mobilného dátového pripojenia</translation>
-<translation id="5871632337994001636">Spravovať zariadenia...</translation>
-<translation id="785750925697875037">Zobraziť mobilný účet</translation>
-<translation id="153454903766751181">Inicializácia mobilného modemu...</translation>
-<translation id="4628814525959230255">Zdieľanie ovládania obrazovky s používateľom <ph name="HELPER_NAME"/> prostredníctvom služby Hangouts.</translation>
-<translation id="7864539943188674973">Zakázať rozhranie Bluetooth</translation>
-<translation id="939252827960237676">Uloženie snímky obrazovky zlyhalo.</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Reštartovaním vykonáte aktualizáciu</translation>
-<translation id="2268813581635650749">Odhlásiť všetkých</translation>
-<translation id="735745346212279324">Sieť VPN je odpojená</translation>
-<translation id="7320906967354320621">Nečinná</translation>
-<translation id="15373452373711364">Veľký kurzor myši</translation>
-<translation id="3294437725009624529">Hosť</translation>
-<translation id="8190698733819146287">Prebieha prispôsobenie jazykov a vstupu...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Pozícia poličky</translation>
-<translation id="8676770494376880701">Pripojila sa nabíjačka s nízkym výkonom</translation>
-<translation id="7170041865419449892">Mimo rozsah</translation>
-<translation id="4804818685124855865">Odpojiť</translation>
-<translation id="2544853746127077729">Certifikát na overenie totožnosti bol zamietnutý sieťou</translation>
-<translation id="5222676887888702881">Odhlásiť sa</translation>
-<translation id="2391579633712104609">180 °</translation>
-<translation id="2688477613306174402">Konfigurácia</translation>
-<translation id="1272079795634619415">Zastaviť</translation>
-<translation id="4957722034734105353">Viac informácií...</translation>
-<translation id="2964193600955408481">Zakázať sieť Wi-Fi</translation>
-<translation id="4279490309300973883">Zrkadlenie</translation>
-<translation id="7973962044839454485">Overenie PKS zlyhalo z dôvodu nesprávneho používateľského mena alebo hesla</translation>
-<translation id="2509468283778169019">Kláves CAPS LOCK je zapnutý</translation>
-<translation id="3892641579809465218">Interný displej</translation>
-<translation id="7823564328645135659">Po synchronizácii vašich nastavení bol zmenený jazyk „<ph name="FROM_LOCALE"/>“ na jazyk „<ph name="TO_LOCALE"/>“.</translation>
-<translation id="3368922792935385530">Pripojené</translation>
-<translation id="8340999562596018839">Hlasová odozva</translation>
-<translation id="8654520615680304441">Zapnúť sieť Wi-Fi...</translation>
-<translation id="8828714802988429505">90 °</translation>
-<translation id="5825747213122829519">Metóda vstupu sa zmenila na <ph name="INPUT_METHOD_ID"/>.
- Prepnete ju stlačením klávesov Shift + Alt.</translation>
-<translation id="2562916301614567480">Súkromná sieť</translation>
-<translation id="6549021752953852991">K dispozícii nie je žiadna mobilná sieť</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Milý monitor, medzi nami to nefunguje. (Tento monitor sa nepodporuje)</translation>
-<translation id="6426039856985689743">Zakázať mobilné dátové pripojenie</translation>
-<translation id="3087734570205094154">Spodok</translation>
-<translation id="3742055079367172538">Vytvorila sa snímka obrazovky</translation>
-<translation id="8878886163241303700">Rozšírenie obrazovky</translation>
-<translation id="5271016907025319479">Sieť VPN nie je nakonfigurovaná.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Váš správca zakázal zaznamenávanie snímok obrazovky.</translation>
-<translation id="372094107052732682">Ak chcete skončiť, stlačte dvakrát kombináciu kláves Ctrl+Shift+Q.</translation>
-<translation id="6803622936009808957">Obraz na monitoroch sa nedá zrkadliť, pretože sa nenašli podporované rozlíšenia. Namiesto toho sa spustil režim rozšírenej pracovnej plochy.</translation>
-<translation id="1480041086352807611">Režim ukážky</translation>
-<translation id="3626637461649818317">Zostáva <ph name="PERCENTAGE"/> %</translation>
-<translation id="9089416786594320554">Metódy vstupu</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/> %</translation>
-<translation id="2670531586141364277">Aktivácia služby <ph name="NAME"/> vyžaduje sieťové pripojenie.</translation>
-<translation id="3963445509666917109">Reproduktor (vnútorný)</translation>
-<translation id="2825619548187458965">Polička</translation>
-<translation id="2614835198358683673">Chromebook sa nesmie dobíjať v čase, keď je zapnutý. Zvážte použitie oficiálnej nabíjačky.</translation>
-<translation id="1895658205118569222">Vypnúť</translation>
-<translation id="4430019312045809116">Hlasitosť</translation>
-<translation id="8681498213689260554">Aktualizáciu uskutočníte reštartovaním a použitím funkcie Powerwash</translation>
-<translation id="4442424173763614572">Vyhľadanie DNS zlyhalo</translation>
-<translation id="7874779702599364982">Prebieha vyhľadávanie mobilných sietí...</translation>
-<translation id="583281660410589416">Neznámy</translation>
-<translation id="1383876407941801731">Vyhľadávanie</translation>
-<translation id="3901991538546252627">Pripája sa k sieti <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Informácie o sieti</translation>
-<translation id="1621499497873603021">Čas zostávajúci do vybitia batérie: <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Ukončiť reláciu hosťa</translation>
-<translation id="8308637677604853869">Predchádzajúca ponuka</translation>
-<translation id="4666297444214622512">Nepodarilo sa prihlásiť do iného účtu.</translation>
-<translation id="3625258641415618104">Snímky obrazovky sú zakázané</translation>
-<translation id="1346748346194534595">Doprava</translation>
-<translation id="1773212559869067373">Certifikát na overenie totožnosti bol zamietnutý miestne</translation>
-<translation id="8528322925433439945">Mobilné siete...</translation>
-<translation id="7049357003967926684">Asociácia</translation>
-<translation id="8428213095426709021">Nastavenia</translation>
-<translation id="2372145515558759244">Prebieha synchronizácia aplikácií...</translation>
-<translation id="7256405249507348194">Nerozpoznaná chyba: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Kontrola AAA zlyhala</translation>
-<translation id="8456362689280298700">čas do úplného nabitia: <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="5787281376604286451">Hlasová odozva je povolená.
-Zakážete ju stlačením klávesov Ctrl+Alt+Z.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Neznáma chyba siete</translation>
-<translation id="1467432559032391204">Doľava</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Aktivujte sa sieť <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Automatické kliknutia</translation>
-<translation id="1398853756734560583">Maximalizovať</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: pripája sa...</translation>
-<translation id="252373100621549798">Neznáma obrazovka</translation>
-<translation id="1882897271359938046">Zrkadlenie na displej <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Batéria je zapojená do nabíjačky s nízkym výkonom. Nabíjanie batérie nemusí byť spoľahlivé.</translation>
-<translation id="3784455785234192852">Uzamknúť</translation>
-<translation id="2805756323405976993">Aplikácie</translation>
-<translation id="1512064327686280138">Zlyhanie aktivácie</translation>
-<translation id="5097002363526479830">K sieti „<ph name="NAME"/>“ sa nepodarilo pripojiť: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Pripojenie Wi-Fi je vypnuté.</translation>
-<translation id="2966449113954629791">Možno ste dosiahli povolený limit mobilných dát. Ďalšie údaje si môžete zakúpiť na aktivačnom portáli <ph name="NAME"/>.</translation>
-<translation id="8132793192354020517">Pripojené k stránke <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Nastavenie tapety...</translation>
-<translation id="8678698760965522072">Stav online</translation>
-<translation id="2532589005999780174">Režim s vysokým kontrastom</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Interná chyba</translation>
-<translation id="3019353588588144572">Čas zostávajúci do úplného nabitia batérie: <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Lupa</translation>
-<translation id="7005812687360380971">Zlyhanie</translation>
-<translation id="882279321799040148">Zobrazíte ju kliknutím tu</translation>
-<translation id="1753067873202720523">Keď bude Chromebook zapnutý, možno sa nedobije.</translation>
-<translation id="5045550434625856497">Nesprávne heslo</translation>
-<translation id="1602076796624386989">Povoliť mobilné dátové pripojenie</translation>
-<translation id="6981982820502123353">Dostupnosť</translation>
-<translation id="3157931365184549694">Obnoviť</translation>
-<translation id="4274292172790327596">Nerozpoznaná chyba</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Slúchadlo</translation>
-<translation id="225680501294068881">Hľadajú sa zariadenia...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Mikrofón (vnútorný)</translation>
-<translation id="4448844063988177157">Prebieha vyhľadávanie sietí Wi-Fi...</translation>
-<translation id="8401662262483418323">Nepodarilo sa pripojiť k účtu <ph name="NAME"/>: <ph name="DETAILS"/>
-Správa zo servera: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Vyskytla sa chyba</translation>
-<translation id="7229570126336867161">Je potrebné pripojenie EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> je verejná relácia spravovaná stránkami <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Nepodarilo sa pripojiť k sieti: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Ukončiť reláciu</translation>
-<translation id="8454013096329229812">Pripojenie Wi-Fi je zapnuté.</translation>
-<translation id="4872237917498892622">Alt + Hľadať alebo Shift</translation>
-<translation id="9201131092683066720">Batéria je nabitá na <ph name="PERCENTAGE"/> %.</translation>
-<translation id="2983818520079887040">Nastavenia...</translation>
-<translation id="3871838685472846647">Mobilná sieť sa aktivovala</translation>
-<translation id="1195412055398077112">presah obsahu</translation>
-<translation id="112308213915226829">Automatické skrývanie poličky</translation>
-<translation id="7573962313813535744">Režim v doku</translation>
-<translation id="8927026611342028580">Vyžaduje sa pripojenie</translation>
-<translation id="8300849813060516376">Zlyhanie služby OTASP</translation>
-<translation id="2792498699870441125">Alt + Hľadať</translation>
-<translation id="8660803626959853127">Synchronizácia súborov (<ph name="COUNT"/>)</translation>
-<translation id="5958529069007801266">Kontrolovaný používateľ</translation>
-<translation id="3709443003275901162">viac ako 9</translation>
-<translation id="639644700271529076">CAPS LOCK je vypnutý</translation>
-<translation id="6248847161401822652">Ak chcete skončiť, stlačte dvakrát kombináciu kláves Ctrl+Shift+Q.</translation>
-<translation id="6785414152754474415">Batéria je nabitá na <ph name="PERCENTAGE"/> % a nabíja sa.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Aktivuje sa...</translation>
-<translation id="4895488851634969361">Batéria je úplne nabitá.</translation>
-<translation id="5947494881799873997">Vrátiť</translation>
-<translation id="7593891976182323525">Hľadať alebo Shift</translation>
-<translation id="7649070708921625228">Pomocník</translation>
-<translation id="747833637904845037">Počas pripojenia k externému displeju zostane váš Chromebook zapnutý, dokonca aj keď bude zavretý.</translation>
-<translation id="3050422059534974565">Kláves CAPS LOCK je zapnutý.
-Ak ho chcete zrušiť, stlačte klávesy Hľadať alebo Shift.</translation>
-<translation id="397105322502079400">Prebieha výpočet...</translation>
-<translation id="158849752021629804">Je potrebná domáca sieť</translation>
-<translation id="6857811139397017780">Aktivovať zariadenie <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Vyhľadanie servera DHCP zlyhalo</translation>
-<translation id="6692173217867674490">Zlá prístupová fráza</translation>
-<translation id="6165508094623778733">Viac informácií</translation>
-<translation id="9046895021617826162">Zlyhanie pripojenia</translation>
-<translation id="7168224885072002358">Vrátenie starého rozlíšenia prebehne o <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Relácia sa ukončí o <ph name="SESSION_TIME_REMAINING"/>. Automaticky dôjde k odhláseniu.</translation>
-<translation id="8372369524088641025">Zlý kľúč WEP</translation>
-<translation id="6636709850131805001">Nerozpoznaný stav</translation>
-<translation id="3573179567135747900">Zmeniť späť na miestne nastavenie „<ph name="FROM_LOCALE"/>“ (vyžaduje sa reštart)</translation>
-<translation id="8103386449138765447">Správy SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Nastavenia služby Disk Google...</translation>
-<translation id="7209101170223508707">Kláves CAPS LOCK je zapnutý.
-Ak ho chcete zrušiť, stlačte klávesy Alt + Hľadať alebo Shift.</translation>
-<translation id="8940956008527784070">Kapacita batérie je nízka (<ph name="PERCENTAGE"/> %)</translation>
-<translation id="4918086044614829423">Prijať</translation>
-<translation id="5102001756192215136">zostáva <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Výstup</translation>
-<translation id="520760366042891468">Zdieľanie ovládania obrazovky prostredníctvom služby Hangouts.</translation>
-<translation id="8000066093800657092">Žiadna sieť</translation>
-<translation id="4015692727874266537">Prihláste sa do iného účtu...</translation>
-<translation id="5941711191222866238">Minimalizovať</translation>
-<translation id="6911468394164995108">Pripojiť k ďalšej...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Gratulujeme! Dátová služba <ph name="NAME"/> sa aktivovala a je pripravená na použitie.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/>h <ph name="MINUTE"/>min do nabitia</translation>
-<translation id="7297443947353982503">Používateľské meno alebo heslo je nesprávne alebo zlyhalo overenie EAP-auth</translation>
-<translation id="6359806961507272919">SMS z č. <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Operátor</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_sl.xtb b/chromium/ash/strings/ash_strings_sl.xtb
deleted file mode 100644
index c5b602349c6..00000000000
--- a/chromium/ash/strings/ash_strings_sl.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="sl">
-<translation id="3595596368722241419">Baterija je polna</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> in <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Stanje portala</translation>
-<translation id="30155388420722288">Gumb za presežek</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth omogočen</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> – zasuk na <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth onemogočen</translation>
-<translation id="7165320105431587207">Omrežja ni bilo mogoče konfigurirati</translation>
-<translation id="3775358506042162758">S prijavo z več računi lahko uporabljate samo tri račune.</translation>
-<translation id="370649949373421643">Omogoči Wi-Fi</translation>
-<translation id="3626281679859535460">Svetlost</translation>
-<translation id="3621202678540785336">Vhod</translation>
-<translation id="595202126637698455">Sledenje učinkovitosti delovanja je omogočeno</translation>
-<translation id="8054466585765276473">Izračunavanje časa trajanja akumulatorja.</translation>
-<translation id="7982789257301363584">Omrežje</translation>
-<translation id="5565793151875479467">Proxy ...</translation>
-<translation id="938582441709398163">Prekrivna tipkovnica</translation>
-<translation id="4387004326333427325">Potrdilo za preverjanje pristnosti je bilo zavrnjeno na oddaljeni lokaciji</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> – ločljivost je bila spremenjena na: <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">Ukaz HTTP get ni uspel</translation>
-<translation id="2297568595583585744">Pladenj stanja</translation>
-<translation id="1661867754829461514">Manjka PIN</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: vzpostavljanje povezave ...</translation>
-<translation id="40400351611212369">Napaka pri aktiviranju omrežja</translation>
-<translation id="4237016987259239829">Napaka omrežne povezave</translation>
-<translation id="2946640296642327832">Omogoči Bluetooth</translation>
-<translation id="6459472438155181876">Razširitev zaslon na <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Prenosni</translation>
-<translation id="6596816719288285829">Naslov IP</translation>
-<translation id="4508265954913339219">Aktiviranje ni uspelo</translation>
-<translation id="3621712662352432595">Nastavitve zvoka</translation>
-<translation id="1812696562331527143">Način vnosa se je spremenil v <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>drug ponudnik<ph name="END_LINK"/>).
-Pritisnite Shift + Alt, da ga preklopite.</translation>
-<translation id="2127372758936585790">Nizkoenergijski polnilnik</translation>
-<translation id="3846575436967432996">Ni podatkov o omrežju</translation>
-<translation id="3026237328237090306">Nastavitev mobilne podatkovne povezave</translation>
-<translation id="5871632337994001636">Upravljanje naprav ...</translation>
-<translation id="785750925697875037">Prikaz mobilnega računa</translation>
-<translation id="153454903766751181">Inicializacija modema za mobilno omrežje ...</translation>
-<translation id="4628814525959230255">Skupni nadzor zaslona z osebo <ph name="HELPER_NAME"/> prek klepetalnic Hangouts.</translation>
-<translation id="7864539943188674973">Onemogoči Bluetooth</translation>
-<translation id="939252827960237676">Posnetka zaslona ni bilo mogoče shraniti</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Znova zaženite za posodobitev</translation>
-<translation id="2268813581635650749">Odjava vseh</translation>
-<translation id="735745346212279324">Povezava z navideznim zasebnim omrežjem je prekinjena</translation>
-<translation id="7320906967354320621">Nedejavno</translation>
-<translation id="15373452373711364">Velik miškin kazalec</translation>
-<translation id="3294437725009624529">Gost</translation>
-<translation id="8190698733819146287">Prilagajanje jezikov in vnosa ...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Položaj police</translation>
-<translation id="8676770494376880701">Priključen je nizkoenergijski polnilnik</translation>
-<translation id="7170041865419449892">Zunaj dosega</translation>
-<translation id="4804818685124855865">Prekini povezavo</translation>
-<translation id="2544853746127077729">Omrežje je zavrnilo potrdilo za preverjanje pristnosti</translation>
-<translation id="5222676887888702881">Odjava</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Konfiguracija</translation>
-<translation id="1272079795634619415">Ustavi</translation>
-<translation id="4957722034734105353">Več o tem ...</translation>
-<translation id="2964193600955408481">Onemogoči Wi-Fi</translation>
-<translation id="4279490309300973883">Zrcaljenje</translation>
-<translation id="7973962044839454485">Preverjanje pristnosti PPP ni uspelo zaradi napačnega uporabniškega imena ali gesla</translation>
-<translation id="2509468283778169019">Tipka CAPS LOCK je vklopljena</translation>
-<translation id="3892641579809465218">Notranji zaslon</translation>
-<translation id="7823564328645135659">Po sinhronizaciji nastavitev se je jezik spremenil iz jezika »<ph name="FROM_LOCALE"/>« v jezik »<ph name="TO_LOCALE"/>«.</translation>
-<translation id="3368922792935385530">Povezano</translation>
-<translation id="8340999562596018839">Glasovni odziv</translation>
-<translation id="8654520615680304441">Vklop omrežja Wi-Fi ...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Način vnosa se je spremenil v <ph name="INPUT_METHOD_ID"/>.
-Pritisnite Shift + Alt, da ga preklopite.</translation>
-<translation id="2562916301614567480">Zasebno omrežje</translation>
-<translation id="6549021752953852991">Mobilno omrežje ni na voljo</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Dragi monitor, med nama se ne bo obneslo. (Ta monitor ni podprt)</translation>
-<translation id="6426039856985689743">Onemogoči mobilno podatkovno povezavo</translation>
-<translation id="3087734570205094154">Na dno</translation>
-<translation id="3742055079367172538">Posnetek zaslona je narejen</translation>
-<translation id="8878886163241303700">Razširjanje zaslona</translation>
-<translation id="5271016907025319479">VPN ni konfiguriran.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Skrbnik je onemogočil možnost izdelave posnetkov zaslona.</translation>
-<translation id="372094107052732682">Dvakrat pritisnite Ctrl + Shift + Q, če želite končati.</translation>
-<translation id="6803622936009808957">Zaslonov ni bilo mogoče zrcaliti, ker ni bilo najdene nobene podprte ločljivosti. Uporabljeno je razširjeno namizje.</translation>
-<translation id="1480041086352807611">Predstavitveni način</translation>
-<translation id="3626637461649818317">Preostane še <ph name="PERCENTAGE"/> %</translation>
-<translation id="9089416786594320554">Načini vnosa</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/> %</translation>
-<translation id="2670531586141364277">Če želite aktivirati omrežje »<ph name="NAME"/>«, mora biti vzpostavljena omrežna povezava.</translation>
-<translation id="3963445509666917109">Zvočnik (vgrajeni)</translation>
-<translation id="2825619548187458965">Polica</translation>
-<translation id="2614835198358683673">Vaš Chromebook se ne more polniti, ko je vklopljen. Priporočamo uporabo uradnega polnilnika.</translation>
-<translation id="1895658205118569222">Zaprt</translation>
-<translation id="4430019312045809116">Glasnost</translation>
-<translation id="8681498213689260554">Če želite posodobiti, znova zaženite in uporabite funkcijo Powerwash</translation>
-<translation id="4442424173763614572">Iskanje DNS ni uspelo</translation>
-<translation id="7874779702599364982">Iskanje mobilnih omrežij ...</translation>
-<translation id="583281660410589416">Neznano</translation>
-<translation id="1383876407941801731">Iskanje</translation>
-<translation id="3901991538546252627">Vzpostavljanje povezave z omrežjem <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Podatki o omrežju</translation>
-<translation id="1621499497873603021">Preostali čas do izpraznitve akumulatorja, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Zapusti sejo gosta</translation>
-<translation id="8308637677604853869">Prejšnji meni</translation>
-<translation id="4666297444214622512">V drug račun se ni mogoče prijaviti.</translation>
-<translation id="3625258641415618104">Posnetki zaslona so onemogočeni</translation>
-<translation id="1346748346194534595">V desno</translation>
-<translation id="1773212559869067373">Potrdilo za preverjanje pristnosti je bilo zavrnjeno lokalno</translation>
-<translation id="8528322925433439945">Mobilna ...</translation>
-<translation id="7049357003967926684">Povezava</translation>
-<translation id="8428213095426709021">Nastavitve</translation>
-<translation id="2372145515558759244">Sinhronizacija aplikacij ...</translation>
-<translation id="7256405249507348194">Neprepoznana napaka: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Preverjanje AAA ni uspelo</translation>
-<translation id="8456362689280298700">Čas polnjenja: še <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="5787281376604286451">Glasovni odziv je omogočen.
-Če ga želite onemogočiti, pritisnite Ctrl + Alt + Z.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Neznana napaka v omrežju</translation>
-<translation id="1467432559032391204">V levo</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Aktiviranje omrežja <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Samodejni kliki</translation>
-<translation id="1398853756734560583">Povečaj</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: vzpostavljanje povezave ...</translation>
-<translation id="252373100621549798">Neznan prikaz</translation>
-<translation id="1882897271359938046">Zrcaljenje na <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Priključen je nizkoenergijski polnilnik. Polnjenje akumulatorja morda ne bo zanesljivo.</translation>
-<translation id="3784455785234192852">Zakleni</translation>
-<translation id="2805756323405976993">Google Apps</translation>
-<translation id="1512064327686280138">Napaka pri aktiviranju</translation>
-<translation id="5097002363526479830">Povezava z omrežjem »<ph name="NAME"/>« ni uspela: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi je izklopljen.</translation>
-<translation id="2966449113954629791">Morda ste porabili dovoljeno količino prenosa podatkov v mobilnem omrežju. Večjo količino podatkov lahko kupite na portalu za aktiviranje <ph name="NAME"/>.</translation>
-<translation id="8132793192354020517">Povezava z <ph name="NAME"/> je vzpostavljena </translation>
-<translation id="7052914147756339792">Nastavi sliko za ozadje ...</translation>
-<translation id="8678698760965522072">Stanje s povezavo</translation>
-<translation id="2532589005999780174">Visokokontrastni način</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Notranja napaka</translation>
-<translation id="3019353588588144572">Preostali čas do napolnitve akumulatorja, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Lupa</translation>
-<translation id="7005812687360380971">Napaka</translation>
-<translation id="882279321799040148">Kliknite za prikaz</translation>
-<translation id="1753067873202720523">Vaš Chromebook se morda ne polni, ko je vklopljen.</translation>
-<translation id="5045550434625856497">Napačno geslo</translation>
-<translation id="1602076796624386989">Omogoči mobilno podatkovno povezavo</translation>
-<translation id="6981982820502123353">Pripomočki za osebe s posebnimi potrebami</translation>
-<translation id="3157931365184549694">Obnovi</translation>
-<translation id="4274292172790327596">Neprepoznana napaka</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Slušalke</translation>
-<translation id="225680501294068881">Iskanje naprav ...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Mikrofon (vgrajeni)</translation>
-<translation id="4448844063988177157">Iskanje omrežij Wi-Fi</translation>
-<translation id="8401662262483418323">Povezava s/z »<ph name="NAME"/>« ni bila mogoča: <ph name="DETAILS"/>
-Sporočilo strežnika: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Prišlo je do napake</translation>
-<translation id="7229570126336867161">Potreben je EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> je javna seja, ki jo upravlja <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Z omrežjem se ni bilo mogoče povezati: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Zapusti sejo</translation>
-<translation id="8454013096329229812">Wi-Fi je vklopljen.</translation>
-<translation id="4872237917498892622">Alt + iskanje ali Shift</translation>
-<translation id="9201131092683066720">Napolnjenost akumulatorja: <ph name="PERCENTAGE"/> %.</translation>
-<translation id="2983818520079887040">Nastavitve ...</translation>
-<translation id="3871838685472846647">Mobilna aktivirana</translation>
-<translation id="1195412055398077112">upodabljanje čez rob zaslona</translation>
-<translation id="112308213915226829">Samodejno skrivanje police</translation>
-<translation id="7573962313813535744">Zasidran način</translation>
-<translation id="8927026611342028580">Povezava zahtevana</translation>
-<translation id="8300849813060516376">Storitev OTASP ni uspela</translation>
-<translation id="2792498699870441125">Alt + iskanje</translation>
-<translation id="8660803626959853127">Sinhroniziranje toliko datotek: <ph name="COUNT"/> ...</translation>
-<translation id="5958529069007801266">Nadzorovan uporabnik</translation>
-<translation id="3709443003275901162">Več kot 9</translation>
-<translation id="639644700271529076">Tipka CAPS LOCK je izklopljena</translation>
-<translation id="6248847161401822652">Dvakrat pritisnite Ctrl + Shift + Q, če želite končati.</translation>
-<translation id="6785414152754474415">Napolnjenost akumulatorja: <ph name="PERCENTAGE"/> % – polnjenje še poteka.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Aktiviranje ...</translation>
-<translation id="4895488851634969361">Akumulator je poln.</translation>
-<translation id="5947494881799873997">Razveljavi</translation>
-<translation id="7593891976182323525">Iskanje ali Shift</translation>
-<translation id="7649070708921625228">Pomoč</translation>
-<translation id="747833637904845037">Ko je Chromebook priključen na zunanji zaslon, bo ostal vklopljen, tudi ko je pokrov zaprt.</translation>
-<translation id="3050422059534974565">Tipka CAPS LOCK je vklopljena.
-Pritisnite tipko za iskanje ali Shift, da jo prekličete.</translation>
-<translation id="397105322502079400">Izračunavanje …</translation>
-<translation id="158849752021629804">Potrebno je domače omrežje</translation>
-<translation id="6857811139397017780">Aktiviraj <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Iskanje DHCP-ja ni uspelo</translation>
-<translation id="6692173217867674490">Napačno geslo</translation>
-<translation id="6165508094623778733">Več o tem</translation>
-<translation id="9046895021617826162">Vzpostavljanje povezave ni uspelo</translation>
-<translation id="7168224885072002358">Ponastavitev na prejšnjo ločljivost čez <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Ta seja se bo končala čez <ph name="SESSION_TIME_REMAINING"/>. Samodejno boste odjavljeni.</translation>
-<translation id="8372369524088641025">Napačen ključ WEP</translation>
-<translation id="6636709850131805001">Neprepoznano stanje</translation>
-<translation id="3573179567135747900">Spremeni nazaj v jezik »<ph name="FROM_LOCALE"/>« (potreben vnovični zagon)</translation>
-<translation id="8103386449138765447">Sporočila SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Nastavitve za Google Drive ...</translation>
-<translation id="7209101170223508707">Tipka CAPS LOCK je vklopljena.
-Pritisnite Alt in tipko za iskanje ali Shift, da jo prekličete.</translation>
-<translation id="8940956008527784070">Akumulator je skoraj prazen (<ph name="PERCENTAGE"/> %)</translation>
-<translation id="4918086044614829423">Sprejmi</translation>
-<translation id="5102001756192215136">Še <ph name="HOUR"/>.<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Izhod</translation>
-<translation id="520760366042891468">Skupni nadzor zaslona prek klepetalnic Hangouts.</translation>
-<translation id="8000066093800657092">Ni omrežja</translation>
-<translation id="4015692727874266537">Prijava z drugim računom ...</translation>
-<translation id="5941711191222866238">Pomanjšaj</translation>
-<translation id="6911468394164995108">Pridružite se drugemu ...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Čestitamo. Podatkovna storitev omrežja »<ph name="NAME"/>« je aktivirana in lahko jo začnete uporabljati.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/> h <ph name="MINUTE"/> min do napolnjenosti</translation>
-<translation id="7297443947353982503">Napačno uporabniško ime/geslo ali preverjanje pristnosti EAP ni uspelo</translation>
-<translation id="6359806961507272919">SMS od <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Operater</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_sr.xtb b/chromium/ash/strings/ash_strings_sr.xtb
deleted file mode 100644
index d417829001f..00000000000
--- a/chromium/ash/strings/ash_strings_sr.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="sr">
-<translation id="3595596368722241419">Батерија је пуна</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> и <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Стање Портал</translation>
-<translation id="30155388420722288">Дугме за додатне опције</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth је омогућен</translation>
-<translation id="6310121235600822547">Екран <ph name="DISPLAY_NAME"/> је промењен у <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth је онемогућен</translation>
-<translation id="7165320105431587207">Конфигурација мреже није успела</translation>
-<translation id="3775358506042162758">Можете да имате највише три налога за вишеструко пријављивање.</translation>
-<translation id="370649949373421643">Омогући Wi-Fi</translation>
-<translation id="3626281679859535460">Осветљеност</translation>
-<translation id="3621202678540785336">Улаз</translation>
-<translation id="595202126637698455">Праћење учинка је омогућено</translation>
-<translation id="8054466585765276473">Израчунавање времена трајања батерије.</translation>
-<translation id="7982789257301363584">Мрежа</translation>
-<translation id="5565793151875479467">Прокси...</translation>
-<translation id="938582441709398163">Постављени елемент тастатуре</translation>
-<translation id="4387004326333427325">Сертификат за потврду аутентичности је одбијен даљински</translation>
-<translation id="6979158407327259162">Google диск</translation>
-<translation id="3683428399328702079">Резолуција <ph name="DISPLAY_NAME"/> је промењена у <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">HTTP get није успео</translation>
-<translation id="2297568595583585744">Палета статуса</translation>
-<translation id="1661867754829461514">Недостаје PIN</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: Повезивање...</translation>
-<translation id="40400351611212369">Грешка при активацији мреже</translation>
-<translation id="4237016987259239829">Грешка мрежне везе</translation>
-<translation id="2946640296642327832">Омогући Bluetooth</translation>
-<translation id="6459472438155181876">Проширивање екрана у <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Мобилни уређај</translation>
-<translation id="6596816719288285829">IP адреса</translation>
-<translation id="4508265954913339219">Активација није успела</translation>
-<translation id="3621712662352432595">Подешавања звука</translation>
-<translation id="1812696562331527143">Метод уноса је промењен у <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>трећа страна<ph name="END_LINK"/>).
-Притисните Shift + Alt да бисте пребацили.</translation>
-<translation id="2127372758936585790">Пуњач мале снаге</translation>
-<translation id="3846575436967432996">Нису доступне информације о мрежи</translation>
-<translation id="3026237328237090306">Подеси податке за мобилне уређаје</translation>
-<translation id="5871632337994001636">Управљај уређајима...</translation>
-<translation id="785750925697875037">Прикажи налог за мобилне уређаје</translation>
-<translation id="153454903766751181">Покретање модема за мобилну мрежу...</translation>
-<translation id="4628814525959230255">Контрола над екраном се дели са корисником <ph name="HELPER_NAME"/> преко Hangouts-а.</translation>
-<translation id="7864539943188674973">Онемогући Bluetooth</translation>
-<translation id="939252827960237676">Чување снимка екрана није успело</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Покрените поново да бисте ажурирали</translation>
-<translation id="2268813581635650749">Одјави све</translation>
-<translation id="735745346212279324">Веза са VPN-ом је прекинута</translation>
-<translation id="7320906967354320621">Неактивно</translation>
-<translation id="15373452373711364">Велики показивач миша</translation>
-<translation id="3294437725009624529">Гост</translation>
-<translation id="8190698733819146287">Прилагоди језике и унос...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Положај полице</translation>
-<translation id="8676770494376880701">Повезан је пуњач мале снаге</translation>
-<translation id="7170041865419449892">Изван опсега</translation>
-<translation id="4804818685124855865">Прекини везу</translation>
-<translation id="2544853746127077729">Мрежа је одбила сертификат за потврду аутентичности</translation>
-<translation id="5222676887888702881">Одјави ме</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Конфигурација</translation>
-<translation id="1272079795634619415">Заустави</translation>
-<translation id="4957722034734105353">Сазнајте више...</translation>
-<translation id="2964193600955408481">Онемогући Wi-Fi</translation>
-<translation id="4279490309300973883">Пресликавање</translation>
-<translation id="7973962044839454485">Провера аутентичности преко протокола PPP није успела због нетачног корисничког имена или лозинке</translation>
-<translation id="2509468283778169019">CAPS LOCK је укључен</translation>
-<translation id="3892641579809465218">Интерни екран</translation>
-<translation id="7823564328645135659">Језик је промењен са језика „<ph name="FROM_LOCALE"/>“ на „<ph name="TO_LOCALE"/>“ након синхронизације подешавања.</translation>
-<translation id="3368922792935385530">Повезан</translation>
-<translation id="8340999562596018839">Говорне повратне информације</translation>
-<translation id="8654520615680304441">Укључи Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Метод уноса је промењен у <ph name="INPUT_METHOD_ID"/>.
-Притисните Shift + Alt да бисте пребацили.</translation>
-<translation id="2562916301614567480">Приватна мрежа</translation>
-<translation id="6549021752953852991">Није доступна ниједна мобилна мрежа</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Драги мониторе, не иде нам. (Тај монитор није подржан)</translation>
-<translation id="6426039856985689743">Онемогући податке за мобилне уређаје</translation>
-<translation id="3087734570205094154">Дно</translation>
-<translation id="3742055079367172538">Снимак екрана је направљен</translation>
-<translation id="8878886163241303700">Проширени екран</translation>
-<translation id="5271016907025319479">VPN није конфигурисан.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Администратор је онемогућио опцију прављења снимака екрана.</translation>
-<translation id="372094107052732682">Притисните Ctrl+Shift+Q двапут да бисте изашли.</translation>
-<translation id="6803622936009808957">Није могуће пресликати екране зато што није пронађена ниједна подржана резолуција. Уместо тога, приказује се проширена радна површина.</translation>
-<translation id="1480041086352807611">Режим демонстрације</translation>
-<translation id="3626637461649818317">Преостало је <ph name="PERCENTAGE"/>%</translation>
-<translation id="9089416786594320554">Методи уноса</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">Активација мреже „<ph name="NAME"/>“ захтева мрежну везу.</translation>
-<translation id="3963445509666917109">Звучник (интерни)</translation>
-<translation id="2825619548187458965">Полица</translation>
-<translation id="2614835198358683673">Chromebook се можда неће пунити док је укључен. Размислите о коришћењу оригиналног пуњача.</translation>
-<translation id="1895658205118569222">Затварање</translation>
-<translation id="4430019312045809116">Јачина звука</translation>
-<translation id="8681498213689260554">Поново покрените и обавите Powerwash да бисте ажурирали</translation>
-<translation id="4442424173763614572">DNS претрага није успела</translation>
-<translation id="7874779702599364982">Претраживање мобилних мрежа...</translation>
-<translation id="583281660410589416">Непознато</translation>
-<translation id="1383876407941801731">Претрага</translation>
-<translation id="3901991538546252627">Повезивање са мрежом <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Информације о мрежи</translation>
-<translation id="1621499497873603021">Време које је преостало док се батерија не испразни, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Изађи из сесије госта</translation>
-<translation id="8308637677604853869">Претходни мени</translation>
-<translation id="4666297444214622512">Не можете да се пријавите на други налог.</translation>
-<translation id="3625258641415618104">Снимци екрана су онемогућени</translation>
-<translation id="1346748346194534595">Удесно</translation>
-<translation id="1773212559869067373">Сертификат за потврду аутентичности је одбијен локално</translation>
-<translation id="8528322925433439945">Мобилни ...</translation>
-<translation id="7049357003967926684">Повезивање</translation>
-<translation id="8428213095426709021">Подешавања</translation>
-<translation id="2372145515558759244">Синхронизовање апликација...</translation>
-<translation id="7256405249507348194">Непозната грешка: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Провера потврде идентитета, овлашћења и приступа није успела</translation>
-<translation id="8456362689280298700">Још <ph name="HOUR"/>:<ph name="MINUTE"/> док се не напуни</translation>
-<translation id="5787281376604286451">Говорне повратне информације су омогућене.
-Притисните Ctrl+Alt+Z да бисте их онемогућили.</translation>
-<translation id="4479639480957787382">Етернет</translation>
-<translation id="6312403991423642364">Непозната грешка на мрежи</translation>
-<translation id="1467432559032391204">Улево</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Активирање мреже <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Аутоматски кликови</translation>
-<translation id="1398853756734560583">Увећај</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: Повезивање...</translation>
-<translation id="252373100621549798">Непознати приказ</translation>
-<translation id="1882897271359938046">Пресликавање у <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Уређај је укључен у пуњач мале снаге. Пуњење батерије можда неће бити поуздано.</translation>
-<translation id="3784455785234192852">Закључај</translation>
-<translation id="2805756323405976993">Apps</translation>
-<translation id="1512064327686280138">Активација није успела</translation>
-<translation id="5097002363526479830">Повезивање са мрежом „<ph name="NAME"/>“ није успело: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi је искључен.</translation>
-<translation id="2966449113954629791">Можда сте искористили дозвољену количину података за мобилне уређаје. Посетите портал за активацију за <ph name="NAME"/> да бисте купили још података.</translation>
-<translation id="8132793192354020517">Успостављена је веза са <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Подеси позадину...</translation>
-<translation id="8678698760965522072">Стање На мрежи</translation>
-<translation id="2532589005999780174">Режим високог контраста</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Интерна грешка</translation>
-<translation id="3019353588588144572">Време које је преостало док се батерија у потпуности не напуни, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Лупа екрана</translation>
-<translation id="7005812687360380971">Није успело</translation>
-<translation id="882279321799040148">Кликните за приказ</translation>
-<translation id="1753067873202720523">Chromebook се можда неће пунити док је укључен.</translation>
-<translation id="5045550434625856497">Нетачна лозинка</translation>
-<translation id="1602076796624386989">Омогући податке за мобилне уређаје</translation>
-<translation id="6981982820502123353">Приступачност</translation>
-<translation id="3157931365184549694">Поново отвори</translation>
-<translation id="4274292172790327596">Непозната грешка</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Слушалице</translation>
-<translation id="225680501294068881">Скенирање уређаја...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/> <ph name="DATE"/></translation>
-<translation id="737451040872859086">Микрофон (интерни)</translation>
-<translation id="4448844063988177157">Тражење Wi-Fi мрежа...</translation>
-<translation id="8401662262483418323">Повезивање са „<ph name="NAME"/>“ није успело: <ph name="DETAILS"/>
-Порука сервера: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Дошло је до грешке</translation>
-<translation id="7229570126336867161">Потребан је EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> је јавна сесија којом управља <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Повезивање са мрежом није успело: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Изађи из сесије</translation>
-<translation id="8454013096329229812">Wi-Fi је укључен.</translation>
-<translation id="4872237917498892622">Alt + тастер за претрагу или Shift</translation>
-<translation id="9201131092683066720">Батерија је <ph name="PERCENTAGE"/>% пуна.</translation>
-<translation id="2983818520079887040">Подешавања...</translation>
-<translation id="3871838685472846647">Мобилни уређај је активиран</translation>
-<translation id="1195412055398077112">ивично подручје екрана</translation>
-<translation id="112308213915226829">Аутоматски сакриј полицу</translation>
-<translation id="7573962313813535744">Режим са базном станицом</translation>
-<translation id="8927026611342028580">Захтева се повезивање</translation>
-<translation id="8300849813060516376">OTASP није успео</translation>
-<translation id="2792498699870441125">Alt + тастер за претрагу</translation>
-<translation id="8660803626959853127">Синхронизовање <ph name="COUNT"/> датотеке(а)</translation>
-<translation id="5958529069007801266">Корисник под надзором</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK је искључен</translation>
-<translation id="6248847161401822652">Притисните Control Shift Q двапут да бисте изашли.</translation>
-<translation id="6785414152754474415">Батерија је <ph name="PERCENTAGE"/>% пуна и још увек се пуни.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Активирање...</translation>
-<translation id="4895488851634969361">Батерија је пуна.</translation>
-<translation id="5947494881799873997">Врати</translation>
-<translation id="7593891976182323525">Тастер за претрагу или Shift</translation>
-<translation id="7649070708921625228">Помоћ</translation>
-<translation id="747833637904845037">Chromebook ће остати укључен док је повезан са спољним екраном, чак и када је поклопац затворен.</translation>
-<translation id="3050422059534974565">CAPS LOCK је укључен.
-Притисните тастер за претрагу или Shift да бисте га отказали.</translation>
-<translation id="397105322502079400">Израчунавање...</translation>
-<translation id="158849752021629804">Потребна је матична мрежа</translation>
-<translation id="6857811139397017780">Активирај <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Проналажење DHCP-а није успело</translation>
-<translation id="6692173217867674490">Неисправна приступна фраза</translation>
-<translation id="6165508094623778733">Сазнајте више</translation>
-<translation id="9046895021617826162">Повезивање није успело</translation>
-<translation id="7168224885072002358">Враћање на стару резолуцију за <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Ова сесија ће се завршити за <ph name="SESSION_TIME_REMAINING"/>. Бићете аутоматски одјављени.</translation>
-<translation id="8372369524088641025">Неисправна WEP шифра</translation>
-<translation id="6636709850131805001">Непознато стање</translation>
-<translation id="3573179567135747900">Врати на „<ph name="FROM_LOCALE"/>“ (потребно је поновно покретање)</translation>
-<translation id="8103386449138765447">SMS поруке: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Подешавања Google диска...</translation>
-<translation id="7209101170223508707">CAPS LOCK је укључен.
-Притисните Alt + тастер за претрагу или Shift да бисте га отказали.</translation>
-<translation id="8940956008527784070">Батерија је скоро празна (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Прихвати</translation>
-<translation id="5102001756192215136">Преостало је <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Излаз</translation>
-<translation id="520760366042891468">Контрола над екраном се дели преко Hangouts-а.</translation>
-<translation id="8000066093800657092">Нема мреже</translation>
-<translation id="4015692727874266537">Пријави ме на други налог...</translation>
-<translation id="5941711191222866238">Смањи</translation>
-<translation id="6911468394164995108">Придружи ме другој...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Честитамо! Услуга преноса података „<ph name="NAME"/>“ је активирана и спремна за коришћење.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/> с <ph name="MINUTE"/> м до краја пуњења</translation>
-<translation id="7297443947353982503">Корисничко име/лозинка је нетачна или EAP потврда аутентичности није успела</translation>
-<translation id="6359806961507272919">SMS са броја <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Мобилни оператер</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_sv.xtb b/chromium/ash/strings/ash_strings_sv.xtb
deleted file mode 100644
index 241fd165681..00000000000
--- a/chromium/ash/strings/ash_strings_sv.xtb
+++ /dev/null
@@ -1,228 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="sv">
-<translation id="3595596368722241419">Batteriet är fulladdat</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> och <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Portalläge</translation>
-<translation id="30155388420722288">Överflödsknapp</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth aktiverad</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> byttes till <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth inaktiverad</translation>
-<translation id="7165320105431587207">Det gick inte att konfigurera nätverket</translation>
-<translation id="3775358506042162758">Du kan högst använda tre konton för multiinloggning.</translation>
-<translation id="370649949373421643">Aktivera Wi-Fi</translation>
-<translation id="3626281679859535460">Ljusstyrka</translation>
-<translation id="3621202678540785336">Ingång</translation>
-<translation id="595202126637698455">Resultatspårning aktiverat</translation>
-<translation id="8054466585765276473">Batteritiden beräknas.</translation>
-<translation id="7982789257301363584">Nätverk</translation>
-<translation id="5565793151875479467">Proxy ...</translation>
-<translation id="938582441709398163">Tangentbordsöverlägg</translation>
-<translation id="4387004326333427325">Autentiseringscertifikatet godkändes inte av fjärrvärden</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">Upplösningen för <ph name="DISPLAY_NAME"/> ändrades till <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">HTTP GET misslyckades</translation>
-<translation id="2297568595583585744">Statusfält</translation>
-<translation id="1661867754829461514">PIN saknas</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: ansluter ...</translation>
-<translation id="40400351611212369">Fel vid nätverksaktivering</translation>
-<translation id="4237016987259239829">Fel vid nätverksanslutning</translation>
-<translation id="2946640296642327832">Aktivera Bluetooth</translation>
-<translation id="6459472438155181876">Utöka skärmen till <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Mobil</translation>
-<translation id="6596816719288285829">IP-adress</translation>
-<translation id="4508265954913339219">Aktiveringen misslyckades</translation>
-<translation id="3621712662352432595">Ljudinställningar</translation>
-<translation id="1812696562331527143">Inmatningsmetoden har ändrats till <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>tredje part<ph name="END_LINK"/>).
- Tryck på Skift + Alt om du vill byta.</translation>
-<translation id="2127372758936585790">Laddning med låg effekt</translation>
-<translation id="3846575436967432996">Det finns ingen nätverksinformation</translation>
-<translation id="3026237328237090306">Konfigurera mobildata</translation>
-<translation id="5871632337994001636">Hantera enheter ...</translation>
-<translation id="785750925697875037">Visa mobilkonto</translation>
-<translation id="153454903766751181">Mobilt modem initieras ...</translation>
-<translation id="4628814525959230255">Delar kontrollen över din skärm med <ph name="HELPER_NAME"/> via Hangouts.</translation>
-<translation id="7864539943188674973">Inaktivera Bluetooth</translation>
-<translation id="939252827960237676">Det gick inte att spara skärmdumpen</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Starta om för att uppdatera</translation>
-<translation id="2268813581635650749">Logga ut alla</translation>
-<translation id="735745346212279324">VPN frånkopplat</translation>
-<translation id="7320906967354320621">Inaktiv</translation>
-<translation id="15373452373711364">Stor muspekare</translation>
-<translation id="3294437725009624529">Gäst</translation>
-<translation id="8190698733819146287">Anpassa språk och inmatning...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Hyllposition</translation>
-<translation id="8676770494376880701">Laddare med låg effekt ansluten</translation>
-<translation id="7170041865419449892">Utanför intervallet</translation>
-<translation id="4804818685124855865">Koppla från</translation>
-<translation id="2544853746127077729">Autentiseringscertifikatet godkändes inte av nätverket</translation>
-<translation id="5222676887888702881">Logga ut</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Konfiguration</translation>
-<translation id="1272079795634619415">Stopp</translation>
-<translation id="4957722034734105353">Läs mer ...</translation>
-<translation id="2964193600955408481">Inaktivera Wi-Fi</translation>
-<translation id="4279490309300973883">Spegling</translation>
-<translation id="7973962044839454485">PPP-autentisering misslyckades på grund av felaktigt användarnamn eller lösenord</translation>
-<translation id="2509468283778169019">CAPS LOCK är på</translation>
-<translation id="3892641579809465218">Intern bildskärm</translation>
-<translation id="7823564328645135659">Chromes språk har ändrats från <ph name="FROM_LOCALE"/> till <ph name="TO_LOCALE"/> efter synkronisering av dina inställningar.</translation>
-<translation id="3368922792935385530">Ansluten</translation>
-<translation id="8340999562596018839">Talad feedback</translation>
-<translation id="8654520615680304441">Aktivera Wi-Fi ...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Inmatningsmetoden har ändrats till <ph name="INPUT_METHOD_ID"/>.
- Tryck på Skift + Alt om du vill byta.</translation>
-<translation id="2562916301614567480">Privat nätverk</translation>
-<translation id="6549021752953852991">Det finns inget tillgängligt mobilt nätverk</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Det fungerar inte med den här skärmen. (Skärmen stöds inte.)</translation>
-<translation id="6426039856985689743">Inaktivera mobildata</translation>
-<translation id="3087734570205094154">Nederst</translation>
-<translation id="3742055079367172538">Skärmbilden har tagits</translation>
-<translation id="8878886163241303700">Utökad skärm</translation>
-<translation id="5271016907025319479">VPN är inte konfigurerat.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Möjligheten att ta skärmdumpar har inaktiverats av administratören.</translation>
-<translation id="372094107052732682">Avsluta genom att trycka på Ctrl + Skift + Q två gånger.</translation>
-<translation id="6803622936009808957">Det gick inte att spegla visningar eftersom inga upplösningar som stöds hittades. Utökat skrivbordsläge används i stället.</translation>
-<translation id="1480041086352807611">Demoläge</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/> % återstår</translation>
-<translation id="9089416786594320554">Inmatningsmetoder</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/> %</translation>
-<translation id="2670531586141364277">Aktivering av <ph name="NAME"/> kräver en nätverksanslutning.</translation>
-<translation id="3963445509666917109">Högtalare (inbyggd)</translation>
-<translation id="2825619548187458965">Hylla</translation>
-<translation id="2614835198358683673">Din Chromebook kanske inte laddas medan den är på. Överväg att använda den officiella laddaren.</translation>
-<translation id="1895658205118569222">Stängning</translation>
-<translation id="4430019312045809116">Volym</translation>
-<translation id="8681498213689260554">Starta om och utför en powerwash för att uppdatera</translation>
-<translation id="4442424173763614572">DNS-sökning misslyckades</translation>
-<translation id="7874779702599364982">Söker efter mobilnätverk ...</translation>
-<translation id="583281660410589416">Okänt</translation>
-<translation id="1383876407941801731">Sök</translation>
-<translation id="3901991538546252627">Ansluter till <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Nätverksinformation</translation>
-<translation id="1621499497873603021">Tid som återstår tills batteriet är tomt: <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Avsluta gästsession</translation>
-<translation id="8308637677604853869">Föregående meny</translation>
-<translation id="4666297444214622512">Det går inte att logga in på ett annat konto.</translation>
-<translation id="3625258641415618104">Skärmdumpar har inaktiverats</translation>
-<translation id="1346748346194534595">Höger</translation>
-<translation id="1773212559869067373">Autentiseringscertifikatet godkändes inte lokalt</translation>
-<translation id="8528322925433439945">Mobil ...</translation>
-<translation id="7049357003967926684">Association</translation>
-<translation id="8428213095426709021">Inställningar</translation>
-<translation id="2372145515558759244">Synkroniserar appar ...</translation>
-<translation id="7256405249507348194">Okänt fel: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Kontroll med AAA misslyckades</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> till fulladdat batteri</translation>
-<translation id="5787281376604286451">Talad feedback är aktiverad.
-Inaktivera genom att trycka Ctrl+Alt+Z.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Okänt nätverksfel</translation>
-<translation id="1467432559032391204">Vänster</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Aktiverar <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Automatiska klick</translation>
-<translation id="1398853756734560583">Maximera</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: ansluter ...</translation>
-<translation id="252373100621549798">Okänd visning</translation>
-<translation id="1882897271359938046">Spegling av <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Ansluten till en laddare med låg effekt. Batteriet kanske inte laddas ordentligt.</translation>
-<translation id="3784455785234192852">Lås</translation>
-<translation id="2805756323405976993">Appar</translation>
-<translation id="1512064327686280138">Aktiveringsfel</translation>
-<translation id="5097002363526479830">Det gick inte att ansluta till nätverket <ph name="NAME"/>: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi är inaktiverat.</translation>
-<translation id="2966449113954629791">Du kan ha använt din tillåtna mängd mobildata. Besök aktiveringsportalen <ph name="NAME"/> om du vill köpa mer data.</translation>
-<translation id="8132793192354020517">Ansluten till <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Ange bakgrund ...</translation>
-<translation id="8678698760965522072">Onlineläge</translation>
-<translation id="2532589005999780174">Högkontrastläge</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Internt fel</translation>
-<translation id="3019353588588144572">Tid som återstår tills batteriet är fulladdat: <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Skärmförstorare</translation>
-<translation id="7005812687360380971">Misslyckades</translation>
-<translation id="882279321799040148">Klicka för att visa</translation>
-<translation id="1753067873202720523">Din Chromebook kanske inte laddas medan den är på.</translation>
-<translation id="5045550434625856497">Felaktigt lösenord</translation>
-<translation id="1602076796624386989">Aktivera mobildata</translation>
-<translation id="6981982820502123353">Tillgänglighet</translation>
-<translation id="3157931365184549694">Återställ</translation>
-<translation id="4274292172790327596">Okänt fel</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Hörlurar</translation>
-<translation id="225680501294068881">Söker efter enheter ...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Mikrofon (inbyggd)</translation>
-<translation id="4448844063988177157">Söker efter Wi-Fi-nätverk...</translation>
-<translation id="8401662262483418323">Det gick inte att ansluta till <ph name="NAME"/>: <ph name="DETAILS"/>
-Meddelande från servern: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Det uppstod ett fel</translation>
-<translation id="7229570126336867161">Behöver EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> är en offentlig session som hanteras av <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Det gick inte att ansluta till nätverket: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Avsluta session</translation>
-<translation id="8454013096329229812">Wi-Fi är aktiverat.</translation>
-<translation id="4872237917498892622">Alt + Sök eller Skift</translation>
-<translation id="9201131092683066720">Batteriet är fullt till <ph name="PERCENTAGE"/> %.</translation>
-<translation id="2983818520079887040">Inställningar...</translation>
-<translation id="3871838685472846647">Mobil aktiverad</translation>
-<translation id="1195412055398077112">överskanning</translation>
-<translation id="112308213915226829">Dölj hyllan automatiskt</translation>
-<translation id="7573962313813535744">Dockat läge</translation>
-<translation id="8927026611342028580">Anslutning begärd</translation>
-<translation id="8300849813060516376">Det gick inte att etablera tjänsten over-the-air.</translation>
-<translation id="2792498699870441125">Alt + Sök</translation>
-<translation id="8660803626959853127">Synkroniserar <ph name="COUNT"/> filer</translation>
-<translation id="5958529069007801266">Övervakad användare</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK är av</translation>
-<translation id="6248847161401822652">Avsluta genom att trycka på Ctrl + Skift + Q två gånger.</translation>
-<translation id="6785414152754474415">Batteriet är fullt till <ph name="PERCENTAGE"/> % och laddas.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Aktiverar ...</translation>
-<translation id="4895488851634969361">Batteriet är fullt.</translation>
-<translation id="5947494881799873997">Återgå</translation>
-<translation id="7593891976182323525">Sök eller Skift</translation>
-<translation id="7649070708921625228">Hjälp</translation>
-<translation id="747833637904845037">Chromebook fortsätter att vara ansluten till en extern skärm även om locket är stängt.</translation>
-<translation id="3050422059534974565">CAPS LOCK är på. Avbryt genom att trycka på Sök eller Shift.</translation>
-<translation id="397105322502079400">Beräknar ...</translation>
-<translation id="158849752021629804">Behöver hemnätverk</translation>
-<translation id="6857811139397017780">Aktivera <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">DHCP-förfrågan misslyckades</translation>
-<translation id="6692173217867674490">Ogiltig lösenfras</translation>
-<translation id="6165508094623778733">Läs mer</translation>
-<translation id="9046895021617826162">Kunde inte ansluta</translation>
-<translation id="7168224885072002358">Återgår till den gamla upplösningen om <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Sessionen avslutas om <ph name="SESSION_TIME_REMAINING"/>. Du kommer att loggas ut automatiskt.</translation>
-<translation id="8372369524088641025">Felaktig WEP-nyckel</translation>
-<translation id="6636709850131805001">Okänt tillstånd</translation>
-<translation id="3573179567135747900">Byt tillbaka till &quot;<ph name="FROM_LOCALE"/>&quot; (kräver omstart)</translation>
-<translation id="8103386449138765447">SMS-meddelanden: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Inställningar för Google Drive ...</translation>
-<translation id="7209101170223508707">CAPS LOCK är på. Avbryt genom att trycka på Alt + Sök eller Skift.</translation>
-<translation id="8940956008527784070">Låg batterinivå (<ph name="PERCENTAGE"/> %)</translation>
-<translation id="4918086044614829423">Acceptera</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> kvar</translation>
-<translation id="3009178788565917040">Utgång</translation>
-<translation id="520760366042891468">Delar kontrollen över din skärm via Hangouts.</translation>
-<translation id="8000066093800657092">Inget nätverk</translation>
-<translation id="4015692727874266537">Logga in på ett annat konto …</translation>
-<translation id="5941711191222866238">Minimera</translation>
-<translation id="6911468394164995108">Anslut till andra ...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Grattis! Datatjänsten <ph name="NAME"/> har aktiverats och är klar att använda.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/> h <ph name="MINUTE"/> m till fulladdat</translation>
-<translation id="7297443947353982503">Användarnamnet eller lösenordet är felaktigt, eller så misslyckades EAP-auktoriseringen</translation>
-<translation id="6359806961507272919">SMS från <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Operatör</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_sw.xtb b/chromium/ash/strings/ash_strings_sw.xtb
deleted file mode 100644
index ed8a0aa2516..00000000000
--- a/chromium/ash/strings/ash_strings_sw.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="sw">
-<translation id="3595596368722241419">Betri imejaa</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> na <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Hali ya lango</translation>
-<translation id="30155388420722288">Kitufe Jalizi</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth imewezeshwa</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> ilizungushwa hadi <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth imelemazwa</translation>
-<translation id="7165320105431587207">Ilishindwa kusanidi mtandao</translation>
-<translation id="3775358506042162758">Unaweza tu kuwa na hadi akaunti tatu zilizoingiwa kwa wakati mmoja</translation>
-<translation id="370649949373421643">Wezesha Wi-Fi</translation>
-<translation id="3626281679859535460">Ung'aavu</translation>
-<translation id="3621202678540785336">Ingizo</translation>
-<translation id="595202126637698455">Ufuatiliaji wa utendaji umewashwa</translation>
-<translation id="8054466585765276473">Inakokotoa muda wa betri.</translation>
-<translation id="7982789257301363584">Mtandao</translation>
-<translation id="5565793151875479467">Proksi...</translation>
-<translation id="938582441709398163">Mtandazo wa Kibodi</translation>
-<translation id="4387004326333427325">Cheti cha uthibitishaji kimekataliwa kwa mbali</translation>
-<translation id="6979158407327259162">Hifadhi ya Google</translation>
-<translation id="3683428399328702079">Ubora wa <ph name="DISPLAY_NAME"/> ulibadilishwa hadi <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">HTTP imeshindikana</translation>
-<translation id="2297568595583585744">Treya ya hali</translation>
-<translation id="1661867754829461514">PIN inakosekana</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: Inaunganisha...</translation>
-<translation id="40400351611212369">Hitilafu ya Kuanza Kutumia Mtandao</translation>
-<translation id="4237016987259239829">Hitilafu ya Muunganisho wa Mtandao</translation>
-<translation id="2946640296642327832">Wezesha Bluetooth</translation>
-<translation id="6459472438155181876">Inapanua skrini kwenye <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Simu ya Mkononi</translation>
-<translation id="6596816719288285829">Anwani ya IP</translation>
-<translation id="4508265954913339219">Uamilisho umeshindikana</translation>
-<translation id="3621712662352432595">Mipangilio ya Sauti</translation>
-<translation id="1812696562331527143">Mbinu yako ingizo imebadilika hadi <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>mhusika mwingine<ph name="END_LINK"/>).
-Bonyeza Shift + Alt ili kubadilisha.</translation>
-<translation id="2127372758936585790">Chaja ya nguvu ya chini</translation>
-<translation id="3846575436967432996">Hakuna maelezo ya mtandao yanayopatikana</translation>
-<translation id="3026237328237090306">Sanidi data ya simu</translation>
-<translation id="5871632337994001636">Simamia vifaa...</translation>
-<translation id="785750925697875037">Ona akaunti ya simu ya mkononi</translation>
-<translation id="153454903766751181">Inaanzisha modemu ya simu za mkononi...</translation>
-<translation id="4628814525959230255">Inashiriki udhibiti wa skrini yako na <ph name="HELPER_NAME"/> kupitia Hangouts.</translation>
-<translation id="7864539943188674973">Lemaza Bluetooth</translation>
-<translation id="939252827960237676">Imeshindwa kuhifadhi picha ya skrini</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Anzisha upya ili kusasisha</translation>
-<translation id="2268813581635650749">Ondoa wote</translation>
-<translation id="735745346212279324">VPN imekatwa muunganisho</translation>
-<translation id="7320906967354320621">Tulivu</translation>
-<translation id="15373452373711364">Kishale kikubwa cha kipanya</translation>
-<translation id="3294437725009624529">Mgeni</translation>
-<translation id="8190698733819146287">Geuza lugha na uingizaji kukufaa...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Nafasi ya rafu</translation>
-<translation id="8676770494376880701">Chaja ya nguvu ya chini imeunganishwa</translation>
-<translation id="7170041865419449892">Nje ya eneo</translation>
-<translation id="4804818685124855865">Tenganisha</translation>
-<translation id="2544853746127077729">Cheti cha uthibitishaji kimekataliwa na mtandao</translation>
-<translation id="5222676887888702881">Ondoka</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Usanidi</translation>
-<translation id="1272079795634619415">Simamisha</translation>
-<translation id="4957722034734105353">Pata maelezo zaidi...</translation>
-<translation id="2964193600955408481">Lemaza Wi-Fi</translation>
-<translation id="4279490309300973883">Kuakisi</translation>
-<translation id="7973962044839454485">Uthibitishaji wa PPP ulishindwa kutokana na jina la mtumiaji na nenosiri lisilo sahihi</translation>
-<translation id="2509468283778169019">Caps Lock imewashwa.</translation>
-<translation id="3892641579809465218">Onyesho la Ndani</translation>
-<translation id="7823564328645135659">Lugha imebadilika kutoka &quot;<ph name="FROM_LOCALE"/> &quot;na kuwa&quot; <ph name="TO_LOCALE"/>&quot; baada ya kulinganisha mipangilio yako.</translation>
-<translation id="3368922792935385530">Umeunganishwa</translation>
-<translation id="8340999562596018839">Maoni ya yaliyotamkwa</translation>
-<translation id="8654520615680304441">Washa Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Mbinu ingizo yako imebadilika hadi <ph name="INPUT_METHOD_ID"/>.
-Bonyeza Shift + Alt ili kubadili.</translation>
-<translation id="2562916301614567480">Mtandao Binafsi</translation>
-<translation id="6549021752953852991">Hakuna mtandao wa simu za mkononi unaopatikana</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Mpendwa Kionyeshi, hali sio nzuri kati yetu. (Kionyeshi hiki hakiwezi kutumiwa)</translation>
-<translation id="6426039856985689743">Lemaza data ya simu</translation>
-<translation id="3087734570205094154">Chini</translation>
-<translation id="3742055079367172538">Picha ya skrini imepigwa</translation>
-<translation id="8878886163241303700">Kuongeza skrini</translation>
-<translation id="5271016907025319479">VPN haijasanidiwa.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Uwezo wa kupiga picha za skrini umezimwa na msimamizi wako.</translation>
-<translation id="372094107052732682">Bofya Ctrl + Shift + Q mara mbili ili kuacha.</translation>
-<translation id="6803622936009808957">Haikuweza kuakisi maonyesho kwa kuwa hakuna misongo inayoweza kutumiwa iliyopatikana. Badala yake imeingia eneo-kazi lililopanuliwa.</translation>
-<translation id="1480041086352807611">Modi ya kuonyesha</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% inayobaki</translation>
-<translation id="9089416786594320554">Mbinu Ingizo</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">Kuanza kutumia '<ph name="NAME"/>' kunahitaji muunganisho kwa mtandao.</translation>
-<translation id="3963445509666917109">Spika (Ya ndani)</translation>
-<translation id="2825619548187458965">Rafu</translation>
-<translation id="2614835198358683673">Chromebook yako huenda isichaji ikiwa imewashwa. Fikiria kutumia chaja rasmi.</translation>
-<translation id="1895658205118569222">Funga</translation>
-<translation id="4430019312045809116">Kiwango</translation>
-<translation id="8681498213689260554">Zima na uwashe na Powerwash ili kusasisha</translation>
-<translation id="4442424173763614572">Mwonekano wa DNS umeshindikana</translation>
-<translation id="7874779702599364982">Inatafuta mitandao ya simu za mkononi...</translation>
-<translation id="583281660410589416">Siojulikana</translation>
-<translation id="1383876407941801731">Tafuta</translation>
-<translation id="3901991538546252627">Inaunganisha kwenye <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Maelezo ya Mtandao</translation>
-<translation id="1621499497873603021">Muda unaosalia mpaka betri inapoisha, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Maliza Ugeni</translation>
-<translation id="8308637677604853869">Menyu ya awali</translation>
-<translation id="4666297444214622512">Huwezi kuingia katika akaunti nyingine.</translation>
-<translation id="3625258641415618104">Picha za skrini zimezimwa</translation>
-<translation id="1346748346194534595">Kulia</translation>
-<translation id="1773212559869067373">Cheti cha uthibitishaji kimekataliwa kindani</translation>
-<translation id="8528322925433439945">Simu ya mkononi ...</translation>
-<translation id="7049357003967926684">Muungano</translation>
-<translation id="8428213095426709021">Mipangilio</translation>
-<translation id="2372145515558759244">Inalandanisha programu...</translation>
-<translation id="7256405249507348194">Hitilafu isiyotambulika: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Ukaguzi wa AAA umeshindikana</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> mpaka ijae</translation>
-<translation id="5787281376604286451">Maoni yaliyotamkwa yamewashwa.
-Bonyeza Ctrl+Alt+Z ili ufunge.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Hitilafu isiyojulikana ya mtandao</translation>
-<translation id="1467432559032391204">Kushoto</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Inaanza kutumia <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Mibofyo ya kiotomatiki</translation>
-<translation id="1398853756734560583">Tanua</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: Inaunganisha...</translation>
-<translation id="252373100621549798">Onyesho Lisilojulikana</translation>
-<translation id="1882897271359938046">Inaakisi kwenye <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Imechomekwa katika chaja ya kawi ya chini. Huenda kuchaji kwa betri hakutakuwa kuzuri.</translation>
-<translation id="3784455785234192852">Funga</translation>
-<translation id="2805756323405976993">Programu</translation>
-<translation id="1512064327686280138">Kushindwa kwa uamilishaji</translation>
-<translation id="5097002363526479830">Imeshindwa kuunganisha kwenye mtandao '<ph name="NAME"/>': <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi imezimwa.</translation>
-<translation id="2966449113954629791">Huenda ulitumia kiwango chako chote cha data. Tembelea <ph name="NAME"/> kituo cha uwezeshaji ili ununue data zaidi.</translation>
-<translation id="8132793192354020517">Imeunganishwa kwenye <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Weka Mandhari...</translation>
-<translation id="8678698760965522072">Hali ya mtandaoni</translation>
-<translation id="2532589005999780174">Hali ya juu ya utofautishaji</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Hitilafu ya ndani</translation>
-<translation id="3019353588588144572">Muda unaosalia hadi betri itakapochajiwa kikamilifu, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Kikuza skrini</translation>
-<translation id="7005812687360380971">Imeshindwa</translation>
-<translation id="882279321799040148">Bofya ili kutazama</translation>
-<translation id="1753067873202720523">Huenda Chromebook yako isichaji ikiwa imewashwa.</translation>
-<translation id="5045550434625856497">Nenosiri lisilo sahihi</translation>
-<translation id="1602076796624386989">Wezesha data ya simu</translation>
-<translation id="6981982820502123353">Ufikiaji</translation>
-<translation id="3157931365184549694">Rejesha</translation>
-<translation id="4274292172790327596">Hitilafu Isiyotambulika</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Vipokea sauti</translation>
-<translation id="225680501294068881">Inatambazaa vifaa...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Maikrofoni (Ya Ndani)</translation>
-<translation id="4448844063988177157">Inatafuta mitandao ya Wi-Fi…</translation>
-<translation id="8401662262483418323">Ilishindwa kuunganisha kwenye ' <ph name="NAME"/> ': <ph name="DETAILS"/>
-Ujumbe wa seza: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Hitilafu imetokea</translation>
-<translation id="7229570126336867161">Inahitaji EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> ni kipindi cha kila mtu kinachodhibitiwa na <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Imeshindwa kuunganisha kwenye mtandao: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Toka kwenye kipindi</translation>
-<translation id="8454013096329229812">Wi-Fi imewashwa.</translation>
-<translation id="4872237917498892622">Alt + Utafutaji au Hama</translation>
-<translation id="9201131092683066720">Betri imejaa <ph name="PERCENTAGE"/>%.</translation>
-<translation id="2983818520079887040">Mipangilio...</translation>
-<translation id="3871838685472846647">Simu ya Mkononi Imewashwa</translation>
-<translation id="1195412055398077112">angalia kwa ujumla:</translation>
-<translation id="112308213915226829">Ficha rafu kiotomatiki</translation>
-<translation id="7573962313813535744">Hali ya kituo</translation>
-<translation id="8927026611342028580">Muunganisho Umeombwa</translation>
-<translation id="8300849813060516376">OTASP imeshindikana</translation>
-<translation id="2792498699870441125">Alt + Utafutaji</translation>
-<translation id="8660803626959853127">Inalinganisha faili <ph name="COUNT"/></translation>
-<translation id="5958529069007801266">Mtumiaji anayesimamiwa</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK imezimwa</translation>
-<translation id="6248847161401822652">Bofya &quot;Control&quot; na &quot;Shift&quot; na Q kwa pamoja mara mbili ili kuacha.</translation>
-<translation id="6785414152754474415">Betri imejaa <ph name="PERCENTAGE"/>% na inachaji.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Inaanza kutumia...</translation>
-<translation id="4895488851634969361">Betri imejaa.</translation>
-<translation id="5947494881799873997">Rejesha</translation>
-<translation id="7593891976182323525">Utafutaji au Hama</translation>
-<translation id="7649070708921625228">Usaidizi</translation>
-<translation id="747833637904845037">Chromebook yako itaendelea kukaa huku imeunganishwa kwenye onyesho la nje, hata kama kifuniko kimefungwa.</translation>
-<translation id="3050422059534974565">CAPS LOCK imeamilishwa.
-Bonyeza Alt + Utafutaji au Hama ili kughairi.</translation>
-<translation id="397105322502079400">Inakokotoa...</translation>
-<translation id="158849752021629804">Inahitaji mtandao wa nyumbani</translation>
-<translation id="6857811139397017780">Amilisha <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Mwonekano wa DHCP umeshindikana</translation>
-<translation id="6692173217867674490">Kaulisiri mbovu</translation>
-<translation id="6165508094623778733">Pata maelezo zaidi</translation>
-<translation id="9046895021617826162">Muunganisho umeshindikana</translation>
-<translation id="7168224885072002358">Inarejesha katika ubora wa zamani baada ya <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Kipindi hiki kitaisha katika <ph name="SESSION_TIME_REMAINING"/>. Utaondolewa kiotomatiki.</translation>
-<translation id="8372369524088641025">Kitufe kibovu cha WEP</translation>
-<translation id="6636709850131805001">Hali isiyotambulika</translation>
-<translation id="3573179567135747900">Badilisha hadi &quot;<ph name="FROM_LOCALE"/>&quot; (inahitaji uzime na uwashe)</translation>
-<translation id="8103386449138765447">Ujumbe wa SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Mipangilio ya Hifadhi ya Google...</translation>
-<translation id="7209101170223508707">CAPS LOCK imeamilishwa.
-Bonyeza Alt + Utafutaji au Hama ili kughairi.</translation>
-<translation id="8940956008527784070">Betri inaisha (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Kubali</translation>
-<translation id="5102001756192215136">Imesalia <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Towe</translation>
-<translation id="520760366042891468">Kushiriki udhibiti wa skrini yako kupitia Hangouts.</translation>
-<translation id="8000066093800657092">Hakuna mtandao</translation>
-<translation id="4015692727874266537">Ingia katika akaunti nyingine...</translation>
-<translation id="5941711191222866238">Punguza</translation>
-<translation id="6911468394164995108">Jiunge na mwingine...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Hongera! Huduma yako ya data ya '<ph name="NAME"/>' imeanza kutumika na iko tayari kwa matumizi.</translation>
-<translation id="412065659894267608">Saa<ph name="HOUR"/> dakika<ph name="MINUTE"/> ili ijae</translation>
-<translation id="7297443947353982503">Jina la mtumiaji/nenosiri sio sahihi au EAP-auth imeshindwa</translation>
-<translation id="6359806961507272919">SMS kutoka <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Mtoa huduma</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_ta.xtb b/chromium/ash/strings/ash_strings_ta.xtb
deleted file mode 100644
index 39cd7b40468..00000000000
--- a/chromium/ash/strings/ash_strings_ta.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="ta">
-<translation id="3595596368722241419">பேட்டரி நிரம்பியது</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> மற்றும் <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">போர்ட்டல் நிலை</translation>
-<translation id="30155388420722288">மிகைப்படுத்தி பொத்தான்</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth இயக்கப்பட்டது</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> <ph name="ROTATION"/> ஆகச் சுழற்றப்பட்டது</translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth முடக்கப்பட்டது</translation>
-<translation id="7165320105431587207">பிணையத்தை உள்ளமைப்பது தோல்வியடைந்தது</translation>
-<translation id="3775358506042162758">பல உள்நுழைவில் மூன்று கணக்குகள் வரை மட்டுமே வைத்திருக்கலாம்.</translation>
-<translation id="370649949373421643">Wi-fi ஐ இயக்கு</translation>
-<translation id="3626281679859535460">ஒளிர்வு</translation>
-<translation id="3621202678540785336">உள்ளீடு</translation>
-<translation id="595202126637698455">செயல்திறனைத் தடமறிதல் இயக்கப்பட்டுள்ளது</translation>
-<translation id="8054466585765276473">பேட்டரி நேரத்தைக் கணக்கிடுகிறது.</translation>
-<translation id="7982789257301363584">நெட்வொர்க்</translation>
-<translation id="5565793151875479467">ப்ராக்ஸி...</translation>
-<translation id="938582441709398163">விசைப்பலகை மேல்தோற்றம்</translation>
-<translation id="4387004326333427325">அங்கீகரிப்புச் சான்றிதழ் தொலைநிலையில் நிராகரிக்கப்பட்டது</translation>
-<translation id="6979158407327259162">Google இயக்ககம்</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> தெளிவுத்திறன் <ph name="RESOLUTION"/> க்கு மாற்றப்பட்டது</translation>
-<translation id="6943836128787782965">HTTP தோல்வியடைந்தது</translation>
-<translation id="2297568595583585744">நிலைத் தட்டு</translation>
-<translation id="1661867754829461514">PIN இல்லை</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: இணைக்கிறது...</translation>
-<translation id="40400351611212369">பிணைய செயலாக்கத்தின் பிழை</translation>
-<translation id="4237016987259239829">பிணைய இணைப்புப் பிழை</translation>
-<translation id="2946640296642327832">Bluetooth ஐ இயக்கு</translation>
-<translation id="6459472438155181876"><ph name="DISPLAY_NAME"/> க்கு திரை விரிவாக்கப்படுகிறது</translation>
-<translation id="8206859287963243715">செல்லுலர்</translation>
-<translation id="6596816719288285829">IP முகவரி</translation>
-<translation id="4508265954913339219">செயலாக்கம் தோல்வியுற்றது</translation>
-<translation id="3621712662352432595">ஆடியோ அமைப்புகள்</translation>
-<translation id="1812696562331527143">உங்கள் உள்ளீட்டு முறையானது <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>மூன்றாம் தரப்பு<ph name="END_LINK"/>) க்கு மாற்றப்பட்டது.
-மாற்ற Shift + Alt ஐ அழுத்தவும்.</translation>
-<translation id="2127372758936585790">குறைந்த சக்திகொண்ட சார்ஜர்</translation>
-<translation id="3846575436967432996">நெட்வொர்க் தகவல் எதுவும் இல்லை</translation>
-<translation id="3026237328237090306">மொபைல் தரவை அமை</translation>
-<translation id="5871632337994001636">சாதனங்களை நிர்வகி...</translation>
-<translation id="785750925697875037">மொபைல் கணக்கைப் பார்க்கவும்</translation>
-<translation id="153454903766751181">செல்லுலார் பயன்முறையைத் துவக்குகிறது...</translation>
-<translation id="4628814525959230255">Hangouts வழியாக <ph name="HELPER_NAME"/> உடன் உங்கள் திரையின் கட்டுப்பாட்டைப் பகிர்கிறது.</translation>
-<translation id="7864539943188674973">Bluetooth ஐ முடக்கு</translation>
-<translation id="939252827960237676">ஸ்கிரீன் ஷாட்டை சேமிப்பதில் தோல்வி</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">புதுப்பிக்க மீண்டும் தொடங்குக</translation>
-<translation id="2268813581635650749">அனைவரையும் வெளியேற்று</translation>
-<translation id="735745346212279324">VPN துண்டிக்கப்பட்டது</translation>
-<translation id="7320906967354320621">செயலின்றி</translation>
-<translation id="15373452373711364">பெரிய மவுஸ் இடஞ்சுட்டி</translation>
-<translation id="3294437725009624529">விருந்தினர்</translation>
-<translation id="8190698733819146287">மொழிகள் மற்றும் உள்ளீடைத் தனிப்பயனாக்கு...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">அடுக்கின் நிலை</translation>
-<translation id="8676770494376880701">குறைந்த சக்தியிலான சார்ஜர் இணைக்கப்பட்டுள்ளது</translation>
-<translation id="7170041865419449892">வரம்புக்கு வெளியே</translation>
-<translation id="4804818685124855865">தொடர்பைத் துண்டி</translation>
-<translation id="2544853746127077729">அங்கீகரிப்புச் சான்றிதழ் பிணையத்தால் நிராகரிக்கப்பட்டது</translation>
-<translation id="5222676887888702881">வெளியேறு</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">உள்ளமைவு</translation>
-<translation id="1272079795634619415">நிறுத்து</translation>
-<translation id="4957722034734105353">மேலும் அறிக...</translation>
-<translation id="2964193600955408481">Wi-Fi ஐ முடக்கு</translation>
-<translation id="4279490309300973883">பிரதிபலிக்கிறது</translation>
-<translation id="7973962044839454485">தவறான பயனர்பெயர் அல்லது கடவுச்சொல் காரணமாக PPP அங்கீகாரம் தோல்வியடைந்தது</translation>
-<translation id="2509468283778169019">CAPS LOCK இயக்கத்தில்</translation>
-<translation id="3892641579809465218">இணையக் காட்சி</translation>
-<translation id="7823564328645135659">உங்கள் அமைப்புகளை ஒத்திசைத்த பிறகு, மொழியானது &quot;<ph name="FROM_LOCALE"/>&quot; இலிருந்து &quot;<ph name="TO_LOCALE"/>&quot; க்கு மாற்றப்பட்டுள்ளது.</translation>
-<translation id="3368922792935385530">இணைக்கப்பட்டது</translation>
-<translation id="8340999562596018839">பேச்சுவடிவ கருத்து</translation>
-<translation id="8654520615680304441">Wi-Fi ஐ இயக்கு...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">உங்கள் உள்ளீட்டு முறையானது <ph name="INPUT_METHOD_ID"/> க்கு மாற்றப்பட்டது.
-மாற்ற Shift + Alt ஐ அழுத்தவும்.</translation>
-<translation id="2562916301614567480">தனிப்பட்ட நெட்வொர்க்</translation>
-<translation id="6549021752953852991">செல்லுலார் நெட்வொர்க் இல்லை</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">அந்த மானிட்டர் ஆதரிக்கப்படவில்லை.</translation>
-<translation id="6426039856985689743">மொபைல் தரவை முடக்கு</translation>
-<translation id="3087734570205094154">கீழே</translation>
-<translation id="3742055079367172538">ஸ்கிரீன் ஷாட் எடுக்கப்பட்டது</translation>
-<translation id="8878886163241303700">திரையை விரிவாக்குகிறது</translation>
-<translation id="5271016907025319479">VPN உள்ளமைக்கப்படவில்லை.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">ஸ்கிரீன் ஷாட்டுகள் எடுக்கும் திறனை உங்கள் நிர்வாகி முடக்கியுள்ளார்.</translation>
-<translation id="372094107052732682">வெளியேற Ctrl+Shift+Q ஐ இருமுறை அழுத்தவும்.</translation>
-<translation id="6803622936009808957">ஆதரிக்கும் தெளிவுகள் கிடைக்காததால் காட்சிகளைப் பிரதிபலிக்க முடியவில்லை. பதிலாக நீட்டிக்கப்பட்ட டெஸ்க்டாப்பிற்குச் சென்றது.</translation>
-<translation id="1480041086352807611">டெமோ பயன்முறை</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% மீதமுள்ளது</translation>
-<translation id="9089416786594320554">உள்ளீட்டு முறைகள்</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">'<ph name="NAME"/>' ஐச் செயல்படுத்துவதற்கு பிணைய இணைப்பு அவசியம்.</translation>
-<translation id="3963445509666917109">ஸ்பீக்கர் (உட்புறம்)</translation>
-<translation id="2825619548187458965">அடுக்கு</translation>
-<translation id="2614835198358683673">உங்கள் Chromebook இயக்கத்தில் இருக்கும்போது சார்ஜ் செய்ய முடியாது. அதிகாரப்பூர்வ சார்ஜரைப் பயன்படுத்தவும்.</translation>
-<translation id="1895658205118569222">நிறுத்தம்</translation>
-<translation id="4430019312045809116">அளவு</translation>
-<translation id="8681498213689260554">புதுப்பிப்பதற்கு மீண்டும் தொடங்கி, பவர்வாஷ் செய்க</translation>
-<translation id="4442424173763614572">DNS தேடுதல் தோல்வி</translation>
-<translation id="7874779702599364982">செல்லுலார் நெட்வொர்க்குகளைத் தேடுகிறது...</translation>
-<translation id="583281660410589416">அறியப்படாத</translation>
-<translation id="1383876407941801731">தேடு</translation>
-<translation id="3901991538546252627"><ph name="NAME"/> க்கு இணைக்கிறது</translation>
-<translation id="2204305834655267233">பிணைய தகவல்</translation>
-<translation id="1621499497873603021">இன்னும் <ph name="TIME_LEFT"/> இல் பேட்டரி காலியாகிவிடும்</translation>
-<translation id="5980301590375426705">விருந்தினரிலிருந்து வெளியேறவும்</translation>
-<translation id="8308637677604853869">முந்தைய மெனு</translation>
-<translation id="4666297444214622512">இன்னொரு கணக்கில் உள்நுழைய முடியாது.</translation>
-<translation id="3625258641415618104">ஸ்கிரீன்ஷாட்கள் முடக்கப்பட்டன</translation>
-<translation id="1346748346194534595">வலது</translation>
-<translation id="1773212559869067373">அங்கீகரிப்புச் சான்றிதழ் உள்ளிடையாக நிராகரிக்கப்பட்டது</translation>
-<translation id="8528322925433439945">மொபைல் ...</translation>
-<translation id="7049357003967926684">சங்கம்</translation>
-<translation id="8428213095426709021">அமைப்புகள்</translation>
-<translation id="2372145515558759244">பயன்பாடுகளை ஒத்திசைக்கிறது...</translation>
-<translation id="7256405249507348194">அறியப்படாத பிழை: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA சோதனை தோல்வியுற்றது</translation>
-<translation id="8456362689280298700">நிரம்ப <ph name="HOUR"/>:<ph name="MINUTE"/> உள்ளது</translation>
-<translation id="5787281376604286451">பேச்சுவடிவ கருத்து செயலாக்கப்பட்டது.
-முடக்க Ctrl+Alt+Z அழுத்தவும்.</translation>
-<translation id="4479639480957787382">ஈத்தர்நெட்</translation>
-<translation id="6312403991423642364">அறியப்படாத பிணையப் பிழை</translation>
-<translation id="1467432559032391204">இடது</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830"><ph name="NAME"/> ஐச் செயல்படுத்துகிறது</translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">தன்னியக்க கிளிக்குகள்</translation>
-<translation id="1398853756734560583">பெரிதாக்கு</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: இணைக்கிறது...</translation>
-<translation id="252373100621549798">அறியாதது</translation>
-<translation id="1882897271359938046"><ph name="DISPLAY_NAME"/> ஐப் பிரதிபலிக்கிறது</translation>
-<translation id="2727977024730340865">குறைந்த சக்தியிலான சார்ஜர் செருகப்பட்டுள்ளது. பேட்டரி சார்ஜிங் நம்பகமானதாக இல்லாமல் இருக்கலாம்.</translation>
-<translation id="3784455785234192852">பூட்டு</translation>
-<translation id="2805756323405976993">ஆப்ஸ்</translation>
-<translation id="1512064327686280138">செயலாக்கம் தோல்வி</translation>
-<translation id="5097002363526479830">'<ph name="NAME"/>' நெட்வொர்க்குடன் இணைப்பதில் தோல்வி: <ph name="DETAILS"/> </translation>
-<translation id="1850504506766569011">Wi-Fi முடக்கத்தில் உள்ளது.</translation>
-<translation id="2966449113954629791">உங்கள் மொபைல் தரவுப் படியை, நீங்கள் பயன்படுத்தியிருக்கலாம். கூடுதல் தரவை வாங்க, <ph name="NAME"/> செயல்பாடு போர்ட்டலைப் பார்வையிடவும்.</translation>
-<translation id="8132793192354020517"><ph name="NAME"/> உடன் இணைக்கப்பட்டது</translation>
-<translation id="7052914147756339792">வால்பேப்பரை அமை...</translation>
-<translation id="8678698760965522072">ஆன்லைன் நிலை</translation>
-<translation id="2532589005999780174">அதிக ஒளி மாறுபாட்டுப் பயன்முறை</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">அகப் பிழை</translation>
-<translation id="3019353588588144572"><ph name="TIME_REMAINING"/> இல் பேட்டரி முழுவதும் சார்ஜ் ஆகிவிடும்</translation>
-<translation id="3473479545200714844">திரை உருப்பெருக்கி</translation>
-<translation id="7005812687360380971">தோல்வி</translation>
-<translation id="882279321799040148">காண கிளிக் செய்க</translation>
-<translation id="1753067873202720523">உங்கள் Chromebook இயக்கத்தில் இருக்கும்போது சார்ஜ் செய்ய முடியாது.</translation>
-<translation id="5045550434625856497">தவறான கடவுச்சொல்</translation>
-<translation id="1602076796624386989">மொபைல் தரவை இயக்கு</translation>
-<translation id="6981982820502123353">அணுகல்தன்மை</translation>
-<translation id="3157931365184549694">மீட்டமை</translation>
-<translation id="4274292172790327596">அறியப்படாத பிழை</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">ஹெட்ஃபோன்</translation>
-<translation id="225680501294068881">சாதனங்களைக் கண்டறிகிறது...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">மைக்ரோஃபோன் (உட்புறம்)</translation>
-<translation id="4448844063988177157">Wi-Fi பிணையங்களைத் தேடுகிறது...</translation>
-<translation id="8401662262483418323">'<ph name="NAME"/>' உடன் இணைக்கத் தவறியது: <ph name="DETAILS"/>
-சேவையகச் செய்தி: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">ஒரு பிழை ஏற்பட்டது</translation>
-<translation id="7229570126336867161">EVDO தேவை</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> ஆனது <ph name="DOMAIN"/> ஆல் நிர்வகிக்கப்படும் பொது அமர்வாகும்</translation>
-<translation id="9044646465488564462">பிணையத்துடன் இணைப்பதில் தோல்வி: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">அமர்விலிருந்து வெளியேறவும்</translation>
-<translation id="8454013096329229812">Wi-Fi இயக்கத்தில் உள்ளது.</translation>
-<translation id="4872237917498892622">Alt+Search அல்லது Shift</translation>
-<translation id="9201131092683066720">பேட்டரி <ph name="PERCENTAGE"/>% நிரம்பியது.</translation>
-<translation id="2983818520079887040">அமைப்புகள்...</translation>
-<translation id="3871838685472846647">செல்லுலர் செயல்படுத்தப்பட்டது</translation>
-<translation id="1195412055398077112">ஓவர்ஸ்கேன்</translation>
-<translation id="112308213915226829">அடுக்கைத் தானாக மறை</translation>
-<translation id="7573962313813535744">டாக் செய்யப்பட்ட பயன்முறை</translation>
-<translation id="8927026611342028580">இணைக்க கோரப்பட்டது</translation>
-<translation id="8300849813060516376">OTASP தோல்வியுற்றது</translation>
-<translation id="2792498699870441125">Alt+Search</translation>
-<translation id="8660803626959853127"><ph name="COUNT"/> கோப்பு(களை) ஒத்திசைக்கிறது</translation>
-<translation id="5958529069007801266">கண்காணிக்கப்படும் பயனர்</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK முடக்கப்பட்டுள்ளது</translation>
-<translation id="6248847161401822652">வெளியேற Control Shift Q ஐ இருமுறை அழுத்தவும்.</translation>
-<translation id="6785414152754474415">பேட்டரி <ph name="PERCENTAGE"/>% நிரம்பியது, மேலும் சார்ஜ் ஆகிறது.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: செயல்படுத்துகிறது...</translation>
-<translation id="4895488851634969361">பேட்டரி நிரம்பியது.</translation>
-<translation id="5947494881799873997">மாற்றியமை</translation>
-<translation id="7593891976182323525">Search அல்லது Shift</translation>
-<translation id="7649070708921625228">உதவி</translation>
-<translation id="747833637904845037">உங்கள் Chromebook வெளிப்புறக் காட்சியுடன் இணைக்கப்படும்போது, மூடப்பட்ட மூடியுடன் இருக்கும்போதும் இயக்கத்தில் இருக்கும்.</translation>
-<translation id="3050422059534974565">CAPS LOCK இயக்கத்தில் உள்ளது.
-ரத்துசெய்ய Search அல்லது Shift ஐ அழுத்தவும்.</translation>
-<translation id="397105322502079400">கணக்கிடுகிறது...</translation>
-<translation id="158849752021629804">உள்ளூர் பிணையம் தேவை</translation>
-<translation id="6857811139397017780"><ph name="NETWORKSERVICE"/> ஐ செயல்படுத்து</translation>
-<translation id="5864471791310927901">DHCP பார்வையிடுதல் தோல்வி</translation>
-<translation id="6692173217867674490">மோசமான கடவுச்சொற்றொடர்</translation>
-<translation id="6165508094623778733">மேலும் அறிக</translation>
-<translation id="9046895021617826162">இணைப்பு தோல்வியடைந்தது</translation>
-<translation id="7168224885072002358"><ph name="TIMEOUT_SECONDS"/> வினாடிகளில் பழைய தெளிவுதிறனுக்கு மாற்றியமைக்கப்படும்</translation>
-<translation id="973896785707726617">இந்த அமர்வு <ph name="SESSION_TIME_REMAINING"/> நிமிடங்களில் முடியும். நீங்கள் தானாகவே வெளியேற்றப்படுவீர்கள்.</translation>
-<translation id="8372369524088641025">மோசமான WEP விசை</translation>
-<translation id="6636709850131805001">அறியப்படாத நிலை</translation>
-<translation id="3573179567135747900">&quot;<ph name="FROM_LOCALE"/>&quot; க்கு மீண்டும் மாற்று (மறுதொடக்கம் தேவை)</translation>
-<translation id="8103386449138765447">SMS செய்திகள்: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Google இயக்கக அமைப்புகள்...</translation>
-<translation id="7209101170223508707">CAPS LOCK இயக்கத்தில் உள்ளது.
-ரத்துசெய்ய Alt+Search அல்லது Shift ஐ அழுத்தவும்.</translation>
-<translation id="8940956008527784070">பேட்டரி குறைவு (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">ஏற்கிறேன்</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> உள்ளது</translation>
-<translation id="3009178788565917040">வெளியீடு</translation>
-<translation id="520760366042891468">Hangouts மூலமாக உங்கள் திரையின் கட்டுப்பாட்டைப் பகிர்கிறது.</translation>
-<translation id="8000066093800657092">நெட்வொர்க் இல்லை</translation>
-<translation id="4015692727874266537">இன்னொரு கணக்கில் உள்நுழைக...</translation>
-<translation id="5941711191222866238">சிறிதாக்கு</translation>
-<translation id="6911468394164995108">மற்றொன்றில் சேர்...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">வாழ்த்துகள்! உங்கள் '<ph name="NAME"/>' தரவு சேவை செயல்படுத்தப்பட்டது, அது பயன்படுத்துவதற்கு தயாராக உள்ளது.</translation>
-<translation id="412065659894267608">முழுவதும் சார்ஜ் ஆகும் நேரம் - <ph name="HOUR"/>ம <ph name="MINUTE"/>நி</translation>
-<translation id="7297443947353982503">பயனர்பெயர்/கடவுச்சொல் தவறானது அல்லது EAP-அங்கீகாரம் தோல்வி</translation>
-<translation id="6359806961507272919"><ph name="PHONE_NUMBER"/> என்ற எண்ணிலிருந்து வந்த SMS</translation>
-<translation id="1244147615850840081">சேவை வழங்குநர்</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_te.xtb b/chromium/ash/strings/ash_strings_te.xtb
deleted file mode 100644
index a7bf0f95852..00000000000
--- a/chromium/ash/strings/ash_strings_te.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="te">
-<translation id="3595596368722241419">బ్యాటరీ నిండింది</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> మరియు <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">పోర్టల్ స్థితి</translation>
-<translation id="30155388420722288">అతివ్యాప్తి బటన్</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth ప్రారంభించబడింది</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> <ph name="ROTATION"/>కి తిప్పబడింది</translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth నిలిపివేయబడింది</translation>
-<translation id="7165320105431587207">నెట్‌వర్క్‌ని కాన్ఫిగర్ చేయడంలో విఫలమైంది</translation>
-<translation id="3775358506042162758">మీరు బహుళ సైన్-ఇన్‌లో గరిష్టంగా మూడు ఖాతాలను మాత్రమే కలిగి ఉండవచ్చు.</translation>
-<translation id="370649949373421643">Wi-fiని ప్రారంభించు</translation>
-<translation id="3626281679859535460">ప్రకాశం</translation>
-<translation id="3621202678540785336">ఇన్‌పుట్</translation>
-<translation id="595202126637698455">పనితీరుని గుర్తించడం ప్రారంభించబడింది</translation>
-<translation id="8054466585765276473">బ్యాటరీ సమయాన్ని లెక్కిస్తోంది.</translation>
-<translation id="7982789257301363584">నెట్‌వర్క్</translation>
-<translation id="5565793151875479467">ప్రాక్సీ...</translation>
-<translation id="938582441709398163">కీబోర్డ్ అవలోకనం</translation>
-<translation id="4387004326333427325">ప్రామాణీకరణ ప్రమాణపత్రం రిమోట్‌లో తిరస్కరించబడింది</translation>
-<translation id="6979158407327259162">Google డిస్క్</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> రిజల్యూషన్ <ph name="RESOLUTION"/>కి మార్చబడింది</translation>
-<translation id="6943836128787782965">HTTP పొందడంలో విఫలమైంది</translation>
-<translation id="2297568595583585744">స్థితి ట్రే</translation>
-<translation id="1661867754829461514">PIN లేదు</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: కనెక్ట్ అవుతోంది...</translation>
-<translation id="40400351611212369">నెట్‌వర్క్‌ను సక్రియం చేయడంలో లోపం</translation>
-<translation id="4237016987259239829">నెట్‌వర్క్ కనెక్షన్ లోపం</translation>
-<translation id="2946640296642327832">Bluetoothని ప్రారంభించు</translation>
-<translation id="6459472438155181876"><ph name="DISPLAY_NAME"/>కు స్క్రీన్‌ను విస్తరిస్తోంది</translation>
-<translation id="8206859287963243715">సెల్యులార్</translation>
-<translation id="6596816719288285829">IP చిరునామా</translation>
-<translation id="4508265954913339219">సక్రియం చేయడం విఫలమైంది</translation>
-<translation id="3621712662352432595">ఆడియో సెట్టింగ్‌‍లు</translation>
-<translation id="1812696562331527143">మీ ఇన్‌పుట్ పద్ధతి <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>3వ పక్షం<ph name="END_LINK"/>)కు మార్చబడింది.
-మారడానికి Shift + Altను నొక్కండి.</translation>
-<translation id="2127372758936585790">తక్కువ-పవర్ గల ఛార్జర్</translation>
-<translation id="3846575436967432996">నెట్‌వర్క్ సమాచారం అందుబాటులో లేదు</translation>
-<translation id="3026237328237090306">మొబైల్ డేటాను సెటప్ చేయి</translation>
-<translation id="5871632337994001636">పరికరాలను నిర్వహించండి...</translation>
-<translation id="785750925697875037">మొబైల్ ఖాతాని వీక్షించండి</translation>
-<translation id="153454903766751181">సెల్యులార్ మోడెమ్‌ను ప్రారంభిస్తోంది...</translation>
-<translation id="4628814525959230255">మీ స్క్రీన్ యొక్క నియంత్రణ Hangouts ద్వారా <ph name="HELPER_NAME"/>తో భాగస్వామ్యం చేయబడుతోంది.</translation>
-<translation id="7864539943188674973">Bluetoothని నిలిపివేయి</translation>
-<translation id="939252827960237676">స్క్రీన్‌షాట్‌ను సేవ్ చేయడంలో విఫలమైంది</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">నవీకరించడానికి పునఃప్రారంభించండి</translation>
-<translation id="2268813581635650749">అందరినీ సైన్ అవుట్ చేయి</translation>
-<translation id="735745346212279324">VPN డిస్‌కనెక్ట్ చేయబడింది</translation>
-<translation id="7320906967354320621">ఖాళీగా ఉంది</translation>
-<translation id="15373452373711364">పెద్ద మౌస్ కర్సర్</translation>
-<translation id="3294437725009624529">అతిథి</translation>
-<translation id="8190698733819146287">భాషలను అనుకూలీకరించి, ఇన్‌పుట్ చెయ్యి...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">అర స్థానం</translation>
-<translation id="8676770494376880701">తక్కువ-పవర్ గల ఛార్జర్ కనెక్ట్ చేయబడింది</translation>
-<translation id="7170041865419449892">పరిధిని దాటింది</translation>
-<translation id="4804818685124855865">డిస్‌కనెక్ట్ చెయ్యి</translation>
-<translation id="2544853746127077729">ప్రామాణీకరణ ప్రమాణపత్రం నెట్‌వర్క్ ద్వారా తిరస్కరించబడింది</translation>
-<translation id="5222676887888702881">సైన్ ఔట్</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">కాన్ఫిగరేషన్</translation>
-<translation id="1272079795634619415">ఆపు</translation>
-<translation id="4957722034734105353">మరింత తెలుసుకోండి...</translation>
-<translation id="2964193600955408481">Wi-Fiని నిలిపివేయి</translation>
-<translation id="4279490309300973883">ప్రతిబింబిస్తుంది</translation>
-<translation id="7973962044839454485">వినియోగదారు పేరు లేదా పాస్‌వర్డ్ తప్పు అయినందున PPP ప్రామాణీకరణ విఫలమైంది</translation>
-<translation id="2509468283778169019">CAPS LOCK ఆన్‌లో ఉంది</translation>
-<translation id="3892641579809465218">అంతర్గత ప్రదర్శన</translation>
-<translation id="7823564328645135659">మీ సెట్టింగ్‌లను సమకాలీకరించిన తర్వాత Chrome యొక్క భాష &quot;<ph name="FROM_LOCALE"/>&quot; నుండి &quot;<ph name="TO_LOCALE"/>&quot;కి మార్చబడింది.</translation>
-<translation id="3368922792935385530">కనెక్ట్ అయింది</translation>
-<translation id="8340999562596018839">చదవబడే అభిప్రాయం</translation>
-<translation id="8654520615680304441">Wi-Fiని ప్రారంభించు...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">మీ ఇన్‌పుట్ పద్ధతి <ph name="INPUT_METHOD_ID"/>కు మార్చబడింది.
-మారడానికి Shift + Altను నొక్కండి.</translation>
-<translation id="2562916301614567480">ప్రైవేట్ నెట్‌వర్క్</translation>
-<translation id="6549021752953852991">సెల్యులార్ నెట్‌వర్క్ అందుబాటులో లేదు</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">ప్రియమైన మానిటర్, ఇది మన మధ్య పని చేయడం లేదు. (ఆ మానిటర్‌కు మద్దతు లేదు)</translation>
-<translation id="6426039856985689743">మొబైల్ డేటాను నిలిపివేయి</translation>
-<translation id="3087734570205094154">దిగువ</translation>
-<translation id="3742055079367172538">స్క్రీన్‌షాట్ తీసినప్పుడు</translation>
-<translation id="8878886163241303700">స్క్రీన్ విస్తరించబడుతోంది</translation>
-<translation id="5271016907025319479">VPN కాన్ఫిగర్ చేయబడలేదు.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (బ్లూటూత్)</translation>
-<translation id="3967919079500697218">మీ నిర్వాహకులు స్క్రీన్‌షాట్‌లను తీయగల సామర్థ్యాన్ని నిలిపివేసారు.</translation>
-<translation id="372094107052732682">నిష్క్రమించడానికి రెండుసార్లు Ctrl+Shift+Q నొక్కండి.</translation>
-<translation id="6803622936009808957">మద్దతు ఉన్న రిజల్యూషన్‌లు కనుగొనబడనందున ప్రదర్శనలను ప్రతిబింబించడం సాధ్యపడలేదు. దానికి బదులుగా విస్తారిత డెస్క్‌టాప్‌కు మారారు.</translation>
-<translation id="1480041086352807611">డెమో మోడ్</translation>
-<translation id="3626637461649818317"><ph name="PERCENTAGE"/>% మిగిలి ఉంది</translation>
-<translation id="9089416786594320554">ఇన్‌పుట్ పద్ధతులు</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">'<ph name="NAME"/>'ను సక్రియం చేయడానికి నెట్‌వర్క్ కనెక్షన్ అవసరం.</translation>
-<translation id="3963445509666917109">స్పీకర్ (అంతర్గతం)</translation>
-<translation id="2825619548187458965">అర</translation>
-<translation id="2614835198358683673">మీ Chromebook ప్రారంభించబడినప్పుడు ఛార్జ్ కాకపోవచ్చు. అధికారిక ఛార్జర్‌ను ఉపయోగించడానికి ప్రయత్నించండి.</translation>
-<translation id="1895658205118569222">షట్‌డౌన్</translation>
-<translation id="4430019312045809116">వాల్యూమ్</translation>
-<translation id="8681498213689260554">నవీకరించడానికి పునఃప్రారంభించి పవర్‌వాష్ చేయండి</translation>
-<translation id="4442424173763614572">DNS శోధన విఫలమైంది</translation>
-<translation id="7874779702599364982">సెల్యులార్ నెట్‌వర్క్‌ల కోసం శోధిస్తోంది...</translation>
-<translation id="583281660410589416">తెలియనిది</translation>
-<translation id="1383876407941801731">శోధన</translation>
-<translation id="3901991538546252627"><ph name="NAME"/>కి కనెక్ట్ చేస్తోంది</translation>
-<translation id="2204305834655267233">నెట్‌వర్క్ సమాచారం</translation>
-<translation id="1621499497873603021">బ్యాటరీ ఖాళీ కావడానికి మిగిలి ఉన్న సమయం, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">అతిథిగా నిష్క్రమించు</translation>
-<translation id="8308637677604853869">మునుపటి మెను</translation>
-<translation id="4666297444214622512">మరో ఖాతాకు సైన్ ఇన్ చేయలేరు.</translation>
-<translation id="3625258641415618104">స్క్రీన్‌షాట్‌లు నిలిపివేయబడ్డాయి</translation>
-<translation id="1346748346194534595">కుడి</translation>
-<translation id="1773212559869067373">ప్రామాణీకరణ ప్రమాణపత్రం స్థానికంగా తిరస్కరించబడింది</translation>
-<translation id="8528322925433439945">మొబైల్ ...</translation>
-<translation id="7049357003967926684">అసోసియేషన్</translation>
-<translation id="8428213095426709021">సెట్టింగ్‌లు</translation>
-<translation id="2372145515558759244">అనువర్తనాలను సమకాలీకరిస్తోంది...</translation>
-<translation id="7256405249507348194">గుర్తించబడని లోపం: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA తనిఖీ విఫలమైంది</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/>లో పూర్తవుతుంది</translation>
-<translation id="5787281376604286451">చదవబడే అభిప్రాయం ప్రారంభించబడింది.
-నిలిపివేయడానికి Ctrl+Alt+Zను నొక్కండి.</translation>
-<translation id="4479639480957787382">ఈథర్నెట్</translation>
-<translation id="6312403991423642364">తెలియని నెట్‌వర్క్ లోపం</translation>
-<translation id="1467432559032391204">ఎడమ</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830"><ph name="NAME"/>ని సక్రియం చేస్తోంది</translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">స్వయంచాలక క్లిక్‌లు</translation>
-<translation id="1398853756734560583">గరిష్ఠీకరించు</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: కనెక్ట్ అవుతోంది...</translation>
-<translation id="252373100621549798">తెలియని ప్రదర్శన</translation>
-<translation id="1882897271359938046"><ph name="DISPLAY_NAME"/>కు దర్పణం చేస్తోంది</translation>
-<translation id="2727977024730340865">తక్కువ-పవర్ గల ఛార్జర్‌కు ప్లగిన్ చేయబడింది. బ్యాటరీ ఛార్జింగ్ విశ్వసనీయంగా ఉండకపోవచ్చు.</translation>
-<translation id="3784455785234192852">లాక్ చేయి</translation>
-<translation id="2805756323405976993">Apps</translation>
-<translation id="1512064327686280138">సక్రియా విఫలం</translation>
-<translation id="5097002363526479830">'<ph name="NAME"/>'కు నెట్‌వర్క్‌కు కనెక్ట్ చేయడానికి విఫలమైంది: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi నిలిపివేయబడింది.</translation>
-<translation id="2966449113954629791">మీకు అనుమతించిన మొబైల్ డేటాను మీరు ఉపయోగించి ఉండవచ్చు. మరింత డేటాను కొనుగోలు చేయడానికి <ph name="NAME"/> సక్రియ పోర్టల్‌ను సందర్శించండి.</translation>
-<translation id="8132793192354020517"><ph name="NAME"/>కు కనెక్ట్ చేయబడింది</translation>
-<translation id="7052914147756339792">వాల్‌పేపర్‌ను సెట్ చేయి...</translation>
-<translation id="8678698760965522072">ఆన్‌లైన్ స్థితి</translation>
-<translation id="2532589005999780174">అధిక కాంట్రాస్ట్ మోడ్</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">అంతర్గత లోపం</translation>
-<translation id="3019353588588144572">బ్యాటరీ నిండటానికి పట్టే సమయం, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">స్క్రీన్ మాగ్నిఫైయర్</translation>
-<translation id="7005812687360380971">విఫలం</translation>
-<translation id="882279321799040148">వీక్షించడానికి క్లిక్ చేసినప్పుడు</translation>
-<translation id="1753067873202720523">మీ Chromebook ఆన్‌లో ఉన్నప్పుడు ఛార్జ్ కాకపోవచ్చు.</translation>
-<translation id="5045550434625856497">తప్పు పాస్‌వర్డ్</translation>
-<translation id="1602076796624386989">మొబైల్ డేటాను ప్రారంభించు</translation>
-<translation id="6981982820502123353">ప్రాప్యత</translation>
-<translation id="3157931365184549694">పునరుద్ధరించు</translation>
-<translation id="4274292172790327596">గుర్తించబడని లోపం</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">హెడ్‌ఫోన్</translation>
-<translation id="225680501294068881">పరికరాల కోసం స్కాన్ చేస్తోంది...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">మైక్రోఫోన్ (అంతర్గతం)</translation>
-<translation id="4448844063988177157">Wi-Fi నెట్‌వర్క్‌ల కోసం శోధిస్తోంది...</translation>
-<translation id="8401662262483418323">'<ph name="NAME"/>'కు కనెక్ట్ చేయడంలో విఫలమైంది: <ph name="DETAILS"/>
-సర్వర్ సందేశం: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">ఒక లోపం సంభవించింది</translation>
-<translation id="7229570126336867161">EVDO అవసరం</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> అనేది <ph name="DOMAIN"/> ద్వారా నిర్వహించబడుతున్న పబ్లిక్ సెషన్</translation>
-<translation id="9044646465488564462">నెట్‌వర్క్‌కు కనెక్ట్ చేయడంలో విఫలమైంది: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">సెషన్‌ని నిష్క్రమించు</translation>
-<translation id="8454013096329229812">Wi-Fi ప్రారంభించబడింది.</translation>
-<translation id="4872237917498892622">Alt+Search లేదా Shift</translation>
-<translation id="9201131092683066720">బ్యాటరీ <ph name="PERCENTAGE"/>% నిండింది.</translation>
-<translation id="2983818520079887040">సెట్టింగ్‌లు...</translation>
-<translation id="3871838685472846647">సెల్యులార్ సక్రియం చేయబడింది</translation>
-<translation id="1195412055398077112">ఓవర్‌స్కాన్</translation>
-<translation id="112308213915226829">అరను స్వయంచాలకంగా దాచు</translation>
-<translation id="7573962313813535744">డాక్ చేయబడిన మోడ్</translation>
-<translation id="8927026611342028580">కనెక్ట్ చేయడం అభ్యర్థించబడింది</translation>
-<translation id="8300849813060516376">OTASP విఫలమైంది</translation>
-<translation id="2792498699870441125">Alt+Search</translation>
-<translation id="8660803626959853127"><ph name="COUNT"/> ఫైల్(ల)ను సమకాలీకరిస్తోంది</translation>
-<translation id="5958529069007801266">పర్యవేక్షించబడే వినియోగదారు</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK ఆపివేయబడింది</translation>
-<translation id="6248847161401822652">నిష్క్రమించడానికి రెండుసార్లు Control Shift Q నొక్కండి.</translation>
-<translation id="6785414152754474415">బ్యాటరీ <ph name="PERCENTAGE"/>% నిండింది మరియు ఛార్జ్ అవుతోంది.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: సక్రియం చేస్తోంది...</translation>
-<translation id="4895488851634969361">బ్యాటరీ నిండింది.</translation>
-<translation id="5947494881799873997">తిరిగి పూర్వ స్థితికి మార్చు</translation>
-<translation id="7593891976182323525">Search లేదా Shift</translation>
-<translation id="7649070708921625228">సహాయం</translation>
-<translation id="747833637904845037">మీ Chromebook బాహ్య డిస్‌ప్లేకి కనెక్ట్ చేయబడినప్పుడు మూత మూసివేసి ఉన్నప్పటికీ కూడా అలాగే ఆన్‌లో ఉంటుంది.</translation>
-<translation id="3050422059534974565">CAPS LOCK ఆన్‌లో ఉంది.
-రద్దు చేయడానికి Search లేదా Shiftని నొక్కండి.</translation>
-<translation id="397105322502079400">గణిస్తోంది...</translation>
-<translation id="158849752021629804"> హోమ్ నెట్‌వర్క్ అవసరం</translation>
-<translation id="6857811139397017780"><ph name="NETWORKSERVICE"/>ని సక్రియం చెయ్యి</translation>
-<translation id="5864471791310927901">DHCP లుక్‌అప్ విఫలమైంది</translation>
-<translation id="6692173217867674490">తప్పుడు పాస్‌ఫ్రేజ్</translation>
-<translation id="6165508094623778733">మరింత తెలుసుకోండి</translation>
-<translation id="9046895021617826162">కనెక్ట్ విఫలమైంది</translation>
-<translation id="7168224885072002358"><ph name="TIMEOUT_SECONDS"/>లో తిరిగి పాత రిజల్యూషన్‌కి మార్చబడుతోంది</translation>
-<translation id="973896785707726617">ఈ సెషన్ <ph name="SESSION_TIME_REMAINING"/> తర్వాత ముగుస్తుంది. మీరు స్వయంచాలకంగా సైన్ అవుట్ చేయబడతారు.</translation>
-<translation id="8372369524088641025">తప్పుడు WEP కీ</translation>
-<translation id="6636709850131805001">గుర్తించబడని రాష్ట్రం</translation>
-<translation id="3573179567135747900">&quot;<ph name="FROM_LOCALE"/>&quot;కు వెనుకకి మార్చండి (పునఃప్రారంభం అవసరం)</translation>
-<translation id="8103386449138765447">SMS సందేశాలు: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Google డిస్క్ సెట్టింగ్‌లు...</translation>
-<translation id="7209101170223508707">CAPS LOCK ఆన్‌లో ఉంది.
-రద్దు చేయడానికి Alt+Search లేదా Shiftని నొక్కండి.</translation>
-<translation id="8940956008527784070">బ్యాటరీ తక్కువగా ఉంది (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">ఆమోదించు</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> మిగిలి ఉంది</translation>
-<translation id="3009178788565917040">అవుట్‌పుట్</translation>
-<translation id="520760366042891468">మీ స్క్రీన్ యొక్క నియంత్రణ Hangouts ద్వారా భాగస్వామ్యం చేయబడుతోంది.</translation>
-<translation id="8000066093800657092">ఏ నెట్‌వర్క్ లేదు</translation>
-<translation id="4015692727874266537">మరో ఖాతాతో సైన్ ఇన్ చేయి...</translation>
-<translation id="5941711191222866238">కనిష్టీకరించు</translation>
-<translation id="6911468394164995108">మరొక దానిలో చేరండి...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">అభినందనలు! మీ '<ph name="NAME"/>' డేటా సేవ సక్రియం చేయబడింది మరియు పని చేయడానికి సిద్ధంగా ఉంది.</translation>
-<translation id="412065659894267608">నిండే వరకు <ph name="HOUR"/>h <ph name="MINUTE"/>m అవుతుంది</translation>
-<translation id="7297443947353982503">వినియోగదారు పేరు/పాస్‌వర్డ్ తప్పు లేదా EAP-ప్రామాణీకరణ విఫలమైంది</translation>
-<translation id="6359806961507272919"><ph name="PHONE_NUMBER"/> నుండి SMS</translation>
-<translation id="1244147615850840081">కారియర్</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_th.xtb b/chromium/ash/strings/ash_strings_th.xtb
deleted file mode 100644
index 2e56ed93039..00000000000
--- a/chromium/ash/strings/ash_strings_th.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="th">
-<translation id="3595596368722241419">แบตเตอรี่เต็ม</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> กับ <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">สถานะพอร์ทัล</translation>
-<translation id="30155388420722288">ปุ่มแบบโอเวอร์โฟลว์</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">เปิดใช้งานบลูทูธแล้ว</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> หมุนเวียนเป็น <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">บลูทูธ</translation>
-<translation id="2268130516524549846">ปิดใช้งานบลูทูธแล้ว</translation>
-<translation id="7165320105431587207">ล้มเหลวในการกำหนดค่าเครือข่าย</translation>
-<translation id="3775358506042162758">คุณสามารถมีได้มากสุดสามบัญชีเท่านั้นในการลงชื่อเข้าสู่ระบบพร้อมกันหลายบัญชี</translation>
-<translation id="370649949373421643">เปิดใช้งาน Wi-Fi</translation>
-<translation id="3626281679859535460">ความสว่าง</translation>
-<translation id="3621202678540785336">อินพุต</translation>
-<translation id="595202126637698455">เปิดใช้งานการติดตามการปฏิบัติงานแล้ว</translation>
-<translation id="8054466585765276473">กำลังคำนวณเวลาใช้งานแบตเตอรี่</translation>
-<translation id="7982789257301363584">เครือข่าย</translation>
-<translation id="5565793151875479467">พร็อกซี...</translation>
-<translation id="938582441709398163">การวางซ้อนแป้นพิมพ์</translation>
-<translation id="4387004326333427325">ใบรับรองการตรวจสอบสิทธิ์ได้รับการปฏิเสธจากระยะไกล</translation>
-<translation id="6979158407327259162">Google ไดรฟ์</translation>
-<translation id="3683428399328702079">ความละเอียดของ <ph name="DISPLAY_NAME"/> เปลี่ยนเป็น <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">การรับ HTTP ล้มเหลว</translation>
-<translation id="2297568595583585744">ถาดสถานะ</translation>
-<translation id="1661867754829461514">ไม่พบ PIN</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: กำลังเชื่อมต่อ...</translation>
-<translation id="40400351611212369">ข้อผิดพลาดการเปิดใช้งานเครือข่าย</translation>
-<translation id="4237016987259239829">ข้อผิดพลาดการเชื่อมต่อเครือข่าย</translation>
-<translation id="2946640296642327832">เปิดใช้งานบลูทูธ</translation>
-<translation id="6459472438155181876">ขยายหน้าจอไปยัง <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">โทรศัพท์มือถือ</translation>
-<translation id="6596816719288285829">ที่อยู่ IP</translation>
-<translation id="4508265954913339219">การเปิดใช้งานล้มเหลว</translation>
-<translation id="3621712662352432595">การตั้งค่าเสียง</translation>
-<translation id="1812696562331527143">วิธีการป้อนข้อมูลของคุณเปลี่ยนแปลงเป็น <ph name="INPUT_METHOD_ID"/>* (<ph name="BEGIN_LINK"/>บุคคลที่สาม<ph name="END_LINK"/>)
-กด Shift + Alt เพื่อสลับ</translation>
-<translation id="2127372758936585790">ที่ชาร์จพลังงานต่ำ</translation>
-<translation id="3846575436967432996">ไม่มีข้อมูลเครือข่ายที่สามารถใช้งานได้</translation>
-<translation id="3026237328237090306">ตั้งค่าข้อมูลมือถือ</translation>
-<translation id="5871632337994001636">จัดการอุปกรณ์...</translation>
-<translation id="785750925697875037">ดูบัญชีมือถือ</translation>
-<translation id="153454903766751181">กำลังเริ่มต้นโมเด็มมือถือ...</translation>
-<translation id="4628814525959230255">กำลังแชร์การควบคุมหน้าจอของคุณด้วย <ph name="HELPER_NAME"/> ผ่านแฮงเอาท์</translation>
-<translation id="7864539943188674973">ปิดใช้งานบลูทูธ</translation>
-<translation id="939252827960237676">ไม่สามารถบันทึกภาพหน้าจอ</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">รีสตาร์ทเพื่ออัปเดต</translation>
-<translation id="2268813581635650749">ออกจากระบบทั้งหมด</translation>
-<translation id="735745346212279324">ยกเลิกการเชื่อมต่อ VPN แล้ว</translation>
-<translation id="7320906967354320621">ไม่ทำงาน</translation>
-<translation id="15373452373711364">เคอร์เซอร์เมาส์ขนาดใหญ่</translation>
-<translation id="3294437725009624529">ผู้มาเยือน</translation>
-<translation id="8190698733819146287">กำหนดค่าภาษาและการป้อนข้อมูล... </translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">ตำแหน่งของชั้นวาง</translation>
-<translation id="8676770494376880701">เชื่อมต่อกับที่ชาร์จพลังงานต่ำ</translation>
-<translation id="7170041865419449892">อยู่นอกระยะสัญญาณ</translation>
-<translation id="4804818685124855865">ตัดการเชื่อมต่อ</translation>
-<translation id="2544853746127077729">ใบรับรองการตรวจสอบสิทธิ์ได้รับการปฏิเสธจากเครือข่าย</translation>
-<translation id="5222676887888702881">ออกจากระบบ</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">การกำหนดค่า</translation>
-<translation id="1272079795634619415">หยุด</translation>
-<translation id="4957722034734105353">เรียนรู้เพิ่มเติม...</translation>
-<translation id="2964193600955408481">ปิดใช้งาน WiFi</translation>
-<translation id="4279490309300973883">กำลังแสดงผล</translation>
-<translation id="7973962044839454485">การตรวจสอบสิทธิ์ PPP ล้มเหลวเนื่องจากชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง</translation>
-<translation id="2509468283778169019">Caps Lock เปิดอยู่</translation>
-<translation id="3892641579809465218">จอแสดงผลภายใน</translation>
-<translation id="7823564328645135659">เปลี่ยนภาษาจาก &quot;<ph name="FROM_LOCALE"/>&quot; เป็น &quot;<ph name="TO_LOCALE"/>&quot; หลังจากซิงค์การตั้งค่าของคุณ</translation>
-<translation id="3368922792935385530">เชื่อมต่อแล้ว</translation>
-<translation id="8340999562596018839">การตอบสนองด้วยเสียง</translation>
-<translation id="8654520615680304441">เปิด WiFi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">วิธีการป้อนข้อมูลของคุณเปลี่ยนแปลงเป็น <ph name="INPUT_METHOD_ID"/> แล้ว
-กด Shift + Alt เพื่อสลับ</translation>
-<translation id="2562916301614567480">เครือข่ายส่วนบุคคล</translation>
-<translation id="6549021752953852991">ไม่มีเครือข่ายมือถือที่ใช้งานได้</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">จอภาพเอ๋ย เราร่วมงานกันไม่ได้ (จอภาพนั้นไม่ได้รับการสนับสนุน)</translation>
-<translation id="6426039856985689743">ปิดการใช้งานข้อมูลมือถือ</translation>
-<translation id="3087734570205094154">ด้านล่าง</translation>
-<translation id="3742055079367172538">ภาพหน้าจอที่บันทึก</translation>
-<translation id="8878886163241303700">กำลังขยายหน้าจอ</translation>
-<translation id="5271016907025319479">ไม่ได้กำหนดค่า VPN</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (บลูทูธ)</translation>
-<translation id="3967919079500697218">ความสามารถในการบันทึกภาพหน้าจอถูกปิดใช้โดยผู้ดูแลระบบ</translation>
-<translation id="372094107052732682">กด Ctrl+Shift+Q สองครั้งเพื่อออก</translation>
-<translation id="6803622936009808957">ไม่สามารถแสดงผลคู่ขนานได้เนื่องจากไม่พบความละเอียดที่สนับสนุน เข้าสู่เดสก์ท็อปแบบขยายแทน</translation>
-<translation id="1480041086352807611">โหมดสาธิต</translation>
-<translation id="3626637461649818317">เหลืออีก <ph name="PERCENTAGE"/>%</translation>
-<translation id="9089416786594320554">วิธีการป้อนข้อมูล</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">การเปิดใช้งานของ &quot;<ph name="NAME"/>&quot; จำเป็นต้องมีการเชื่อมต่อเครือข่าย</translation>
-<translation id="3963445509666917109">ลำโพง (ภายใน)</translation>
-<translation id="2825619548187458965">ชั้นวาง</translation>
-<translation id="2614835198358683673">Chromebook ของคุณอาจไม่ได้ชาร์จในขณะที่เปิดอยู่ ลองใช้ที่ชาร์จมาตรฐาน</translation>
-<translation id="1895658205118569222">ปิด</translation>
-<translation id="4430019312045809116">ระดับเสียง</translation>
-<translation id="8681498213689260554">รีสตาร์ทและ Powerwash เพื่ออัปเดต</translation>
-<translation id="4442424173763614572">การค้นหา DNS ล้มเหลว</translation>
-<translation id="7874779702599364982">กำลังค้นหาเครือข่ายโทรศัพท์มือถือ...</translation>
-<translation id="583281660410589416">ไม่รู้จัก</translation>
-<translation id="1383876407941801731">เครื่องมือค้นหา</translation>
-<translation id="3901991538546252627">กำลังเชื่อมต่อกับ <ph name="NAME"/></translation>
-<translation id="2204305834655267233">ข้อมูลเครือข่าย</translation>
-<translation id="1621499497873603021">เวลาที่เหลือกว่าแบตเตอรี่จะหมด, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">ออกจากเซสชันผู้มาเยือน</translation>
-<translation id="8308637677604853869">เมนูก่อนหน้า</translation>
-<translation id="4666297444214622512">ไม่สามารถลงชื่อเข้าใช้บัญชีอื่น</translation>
-<translation id="3625258641415618104">ปิดใช้การจับภาพหน้าจอ</translation>
-<translation id="1346748346194534595">ขวา</translation>
-<translation id="1773212559869067373">ใบรับรองการตรวจสอบสิทธิ์ได้รับการปฏิเสธในท้องถิ่น</translation>
-<translation id="8528322925433439945">มือถือ ...</translation>
-<translation id="7049357003967926684">การเชื่อมโยง</translation>
-<translation id="8428213095426709021">การตั้งค่า</translation>
-<translation id="2372145515558759244">กำลังซิงค์แอปพลิเคชัน...</translation>
-<translation id="7256405249507348194">ข้อผิดพลาดที่ไม่รู้จัก: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">การตรวจสอบ AAA ล้มเหลว</translation>
-<translation id="8456362689280298700">อีก <ph name="HOUR"/>:<ph name="MINUTE"/> จึงจะเต็ม</translation>
-<translation id="5787281376604286451">เปิดใช้งานการตอบสนองด้วยเสียงอยู่
-กด Ctrl+Alt+Z เพื่อปิดใช้งาน</translation>
-<translation id="4479639480957787382">อีเทอร์เน็ต</translation>
-<translation id="6312403991423642364">ข้อผิดพลาดเครือข่ายที่ไม่รู้จัก</translation>
-<translation id="1467432559032391204">ซ้าย</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">กำลังเปิดใช้งาน <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">การคลิกอัตโนมัติ</translation>
-<translation id="1398853756734560583">ย่อ</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: กำลังเชื่อมต่อ...</translation>
-<translation id="252373100621549798">หน้าจอที่ไม่รู้จัก</translation>
-<translation id="1882897271359938046">กำลังแสดงผลไปที่ <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">เสียบอยู่กับที่ชาร์จพลังงานต่ำ การชาร์จแบตเตอรี่อาจไม่น่าเชื่อถือ</translation>
-<translation id="3784455785234192852">ล็อก</translation>
-<translation id="2805756323405976993">Apps</translation>
-<translation id="1512064327686280138">การเปิดใช้งานล้มเหลว</translation>
-<translation id="5097002363526479830">ไม่สามารถเชื่อมต่อเครือข่าย &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">WiFi ปิดอยู่</translation>
-<translation id="2966449113954629791">คุณอาจใช้ข้อมูลมือถือตามปริมาณที่อนุญาตหมดแล้ว ไปที่พอร์ทัลการเปิดใช้งาน <ph name="NAME"/> เพื่อซื้อข้อมูลเพิ่มเติม</translation>
-<translation id="8132793192354020517">เชื่อมต่อกับ <ph name="NAME"/></translation>
-<translation id="7052914147756339792">ตั้งค่าวอลเปเปอร์...</translation>
-<translation id="8678698760965522072">สถานะออนไลน์</translation>
-<translation id="2532589005999780174">โหมดคอนทราสต์สูง</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">ข้อผิดพลาดภายใน</translation>
-<translation id="3019353588588144572">เวลาที่เหลือกว่าจะชาร์จแบตเตอรี่เต็ม, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">แว่นขยายหน้าจอ</translation>
-<translation id="7005812687360380971">ล้มเหลว</translation>
-<translation id="882279321799040148">คลิกเพื่อดู</translation>
-<translation id="1753067873202720523">Chromebook อาจไม่ชาร์จขณะที่เปิดอยู่</translation>
-<translation id="5045550434625856497">รหัสผ่านไม่ถูกต้อง</translation>
-<translation id="1602076796624386989">เปิดใช้งานข้อมูลมือถือ</translation>
-<translation id="6981982820502123353">การเข้าถึง</translation>
-<translation id="3157931365184549694">คืนค่า</translation>
-<translation id="4274292172790327596">ข้อผิดพลาดที่ไม่รู้จัก</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">ชุดหูฟัง</translation>
-<translation id="225680501294068881">กำลังสแกนหาอุปกรณ์...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">ไมโครโฟน (ภายใน)</translation>
-<translation id="4448844063988177157">กำลังค้นหาเครือข่าย Wi-Fi...</translation>
-<translation id="8401662262483418323">การเชื่อมต่อกับ &quot;<ph name="NAME"/>&quot; ล้มเหลว: <ph name="DETAILS"/>
-ข้อความเซิร์ฟเวอร์: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">มีข้อผิดพลาดเกิดขึ้น</translation>
-<translation id="7229570126336867161">ต้องใช้ EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> เป็นเซสชันสาธารณะซึ่งจัดการโดย <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">ไม่สามารถเชื่อมต่อเครือข่าย: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">ออกจากเซสชัน</translation>
-<translation id="8454013096329229812">WiFi เปิดอยู่</translation>
-<translation id="4872237917498892622">Alt+ค้นหา หรือ Shift</translation>
-<translation id="9201131092683066720">มีแบตเตอรี่ <ph name="PERCENTAGE"/>%</translation>
-<translation id="2983818520079887040">การตั้งค่า...</translation>
-<translation id="3871838685472846647">เปิดใช้งานโทรศัพท์มือถือแล้ว</translation>
-<translation id="1195412055398077112">โอเวอร์สแกน</translation>
-<translation id="112308213915226829">ซ่อนชั้นวางโดยอัตโนมัติ</translation>
-<translation id="7573962313813535744">โหมดเชื่อมต่อแท่นชาร์จ</translation>
-<translation id="8927026611342028580">ขอเชื่อมต่อ</translation>
-<translation id="8300849813060516376">OTASP ล้มเหลว</translation>
-<translation id="2792498699870441125">Alt+ค้นหา</translation>
-<translation id="8660803626959853127">กำลังซิงค์ <ph name="COUNT"/> ไฟล์</translation>
-<translation id="5958529069007801266">ผู้ใช้ภายใต้การดูแล</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK ปิดอยู่</translation>
-<translation id="6248847161401822652">กด Control Shift Q สองครั้งเพื่อออก</translation>
-<translation id="6785414152754474415">มีแบตเตอรี่ <ph name="PERCENTAGE"/>% และกำลังชาร์จ</translation>
-<translation id="6267036997247669271"><ph name="NAME"/> กำลังเปิดใช้งาน...</translation>
-<translation id="4895488851634969361">แบตเตอรี่เต็ม</translation>
-<translation id="5947494881799873997">ย้อนกลับ</translation>
-<translation id="7593891976182323525">ค้นหาหรือ Shift</translation>
-<translation id="7649070708921625228">ช่วยเหลือ</translation>
-<translation id="747833637904845037">Chromebook ของคุณจะยังคงเปิดอยู่ขณะเชื่อมต่อจอภาพภายนอก แม้จะปิดฝาอยู่</translation>
-<translation id="3050422059534974565">CAPS LOCK เปิดอยู่
-กด &quot;ค้นหา&quot; หรือ Shift เพื่อยกเิลิก</translation>
-<translation id="397105322502079400">กำลังคำนวณ...</translation>
-<translation id="158849752021629804">ต้องใช้เครือข่ายในประเทศ</translation>
-<translation id="6857811139397017780">เปิดใช้งาน <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">การค้นหา DHCP ล้มเหลว</translation>
-<translation id="6692173217867674490">ข้อความรหัสผ่านไม่ถูกต้อง</translation>
-<translation id="6165508094623778733">เรียนรู้เพิ่มเติม</translation>
-<translation id="9046895021617826162">การเชื่อมต่อล้มเหลว</translation>
-<translation id="7168224885072002358">เปลี่ยนกลับไปเป็นความละเอียดเดิมภายใน <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">เซสชันนี้จะสิ้นสุดใน <ph name="SESSION_TIME_REMAINING"/> ระบบจะลงชื่อออกให้คุณโดยอัตโนมัติ</translation>
-<translation id="8372369524088641025">คีย์ WEP ไม่ถูกต้อง</translation>
-<translation id="6636709850131805001">สถานะที่ไม่รู้จัก</translation>
-<translation id="3573179567135747900">เปลี่ยนกลับเป็น &quot;<ph name="FROM_LOCALE"/>&quot; (จำเป็นต้องรีสตาร์ต)</translation>
-<translation id="8103386449138765447">ข้อความ SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">การตั้งค่า Google ไดรฟ์...</translation>
-<translation id="7209101170223508707">CAPS LOCK เปิดอยู่
-กด Alt+ค้นหา หรือ Shift เพื่อยกเลิก</translation>
-<translation id="8940956008527784070">แบตเตอรี่ต่ำ (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">ยอมรับ</translation>
-<translation id="5102001756192215136">เหลืออีก <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">เอาต์พุต</translation>
-<translation id="520760366042891468">กำลังแชร์การควบคุมหน้าจอผ่านแฮงเอาท์</translation>
-<translation id="8000066093800657092">ไม่มีเครือข่าย</translation>
-<translation id="4015692727874266537">ลงชื่อเข้าใช้บัญชีอื่น...</translation>
-<translation id="5941711191222866238">ย่อ</translation>
-<translation id="6911468394164995108">เชื่อมต่อเครือข่ายอื่น...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">ขอแสดงความยินดี! บริการข้อมูล &quot;<ph name="NAME"/>&quot; ของคุณได้เปิดใช้งานและพร้อมใช้งานแล้ว</translation>
-<translation id="412065659894267608">อีก <ph name="HOUR"/>ชม. <ph name="MINUTE"/>นาทีจึงจะเต็ม</translation>
-<translation id="7297443947353982503">ชื่อผู้ใช้/รหัสผ่านไม่ถูกต้องหรือการตรวจสอบสิทธิ์ EAP ล้มเหลว</translation>
-<translation id="6359806961507272919">SMS จาก <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">ผู้ให้บริการ</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_tr.xtb b/chromium/ash/strings/ash_strings_tr.xtb
deleted file mode 100644
index 84a093c06f6..00000000000
--- a/chromium/ash/strings/ash_strings_tr.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="tr">
-<translation id="3595596368722241419">Pil tam dolu</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> ve <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Portal durumu</translation>
-<translation id="30155388420722288">Taşma Düğmesi</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth etkin</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> dönme ayarı <ph name="ROTATION"/> olarak değiştirildi</translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth devre dışı</translation>
-<translation id="7165320105431587207">Ağ yapılandırılamadı</translation>
-<translation id="3775358506042162758">Çoklu oturum açmada en fazla üç hesabınız olabilir.</translation>
-<translation id="370649949373421643">Kablosuzu Etkinleştir</translation>
-<translation id="3626281679859535460">Parlaklık</translation>
-<translation id="3621202678540785336">Giriş</translation>
-<translation id="595202126637698455">Performans izleme etkin</translation>
-<translation id="8054466585765276473">Pilin süresi hesaplanıyor.</translation>
-<translation id="7982789257301363584">Ağ</translation>
-<translation id="5565793151875479467">Proxy...</translation>
-<translation id="938582441709398163">Klavye Yer Paylaşımı</translation>
-<translation id="4387004326333427325">Kimlik doğrulama sertifikası uzaktan reddedildi</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> çözünürlüğü <ph name="RESOLUTION"/> olarak değiştirildi</translation>
-<translation id="6943836128787782965">HTTP get işlevi başarısız oldu</translation>
-<translation id="2297568595583585744">Durum tepsisi</translation>
-<translation id="1661867754829461514">PIN eksik</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: Bağlanıyor...</translation>
-<translation id="40400351611212369">Ağ Etkinleştirme Hatası</translation>
-<translation id="4237016987259239829">Ağ Bağlantısı Hatası</translation>
-<translation id="2946640296642327832">Bluetooth'u etkinleştir</translation>
-<translation id="6459472438155181876">Ekran şuraya genişletiliyor: <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Cep telefonu</translation>
-<translation id="6596816719288285829">IP Adresi</translation>
-<translation id="4508265954913339219">Etkinleştirme başarısız oldu</translation>
-<translation id="3621712662352432595">Ses Ayarları</translation>
-<translation id="1812696562331527143">Giriş yönteminiz <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>3. taraf<ph name="END_LINK"/>) olarak değiştirildi.
-Geçiş yapmak için ÜstKrktr + Alt tuşlarına basın.</translation>
-<translation id="2127372758936585790">Düşük güçlü şarj cihazı</translation>
-<translation id="3846575436967432996">Hiçbir ağ bilgisi yok</translation>
-<translation id="3026237328237090306">Mobil verileri ayarla</translation>
-<translation id="5871632337994001636">Cihazları yönet...</translation>
-<translation id="785750925697875037">Mobil hesabı görüntüle</translation>
-<translation id="153454903766751181">Hücresel modem başlatılıyor...</translation>
-<translation id="4628814525959230255">Ekranınızın denetimi Hangouts üzerinden <ph name="HELPER_NAME"/> ile paylaşılıyor.</translation>
-<translation id="7864539943188674973">Bluetooth'u devre dışı bırak</translation>
-<translation id="939252827960237676">Ekran görüntüsü kaydedilemedi</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Güncellemek için yeniden başlat</translation>
-<translation id="2268813581635650749">Tüm kullanıcıların oturumunu kapat</translation>
-<translation id="735745346212279324">VPN bağlantısı kesildi</translation>
-<translation id="7320906967354320621">Boşta</translation>
-<translation id="15373452373711364">Büyük fare imleci</translation>
-<translation id="3294437725009624529">Misafir</translation>
-<translation id="8190698733819146287">Dilleri ve girişi özelleştir...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Raf konumu</translation>
-<translation id="8676770494376880701">Düşük güçlü şarj cihazı bağlandı</translation>
-<translation id="7170041865419449892">Aralık dışında</translation>
-<translation id="4804818685124855865">Bağlantıyı kes</translation>
-<translation id="2544853746127077729">Kimlik doğrulama sertifikası ağ tarafından reddedildi</translation>
-<translation id="5222676887888702881">Çıkış</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Yapılandırma</translation>
-<translation id="1272079795634619415">Durdur</translation>
-<translation id="4957722034734105353">Daha fazla bilgi edinin...</translation>
-<translation id="2964193600955408481">Kablosuz bağlantıyı devre dışı bırak</translation>
-<translation id="4279490309300973883">Yansıtılıyor</translation>
-<translation id="7973962044839454485">Yanlış kullanıcı adı veya şifreden dolayı PPP kimlik doğrulaması başarısız oldu</translation>
-<translation id="2509468283778169019">CAPS LOCK açık</translation>
-<translation id="3892641579809465218">Dahili Ekran</translation>
-<translation id="7823564328645135659">Ayarlarınız senkronize edildikten sonra &quot;<ph name="FROM_LOCALE"/>&quot; olan dil &quot;<ph name="TO_LOCALE"/>&quot; olarak değiştirildi.</translation>
-<translation id="3368922792935385530">Bağlı</translation>
-<translation id="8340999562596018839">Sesli geri bildirim</translation>
-<translation id="8654520615680304441">Kablosuz'u aç...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Giriş yönteminiz <ph name="INPUT_METHOD_ID"/> olarak değiştirildi.
-Geçiş yapmak için ÜstKrktr + Alt tuşlarına basın.</translation>
-<translation id="2562916301614567480">Özel Ağ</translation>
-<translation id="6549021752953852991">Kullanılabilir hücresel ağ yok</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Sevgili Monitör, aramızdaki bu ilişki yürümüyor. (Bu monitör desteklenmiyor)</translation>
-<translation id="6426039856985689743">Mobil verileri devre dışı bırak</translation>
-<translation id="3087734570205094154">Alt</translation>
-<translation id="3742055079367172538">Ekran görüntüsü alındı</translation>
-<translation id="8878886163241303700">Genişletilmiş ekran</translation>
-<translation id="5271016907025319479">VPN yapılandırılmadı.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Ekran görüntüsü alabilme işlevi yöneticiniz tarafından devre dışı bırakılmıştır.</translation>
-<translation id="372094107052732682">Çıkmak için Ctrl+ÜstKrktr+Q tuşlarına iki kez basın.</translation>
-<translation id="6803622936009808957">Desteklenen bir çözünürlük bulunamadığı için ekranlar yansıtılamıyor. Bunun yerine genişletilmiş masaüstüne geçiliyor.</translation>
-<translation id="1480041086352807611">Demo modu</translation>
-<translation id="3626637461649818317">%<ph name="PERCENTAGE"/> kaldı</translation>
-<translation id="9089416786594320554">Giriş yöntemleri</translation>
-<translation id="6247708409970142803">%<ph name="PERCENTAGE"/></translation>
-<translation id="2670531586141364277">'<ph name="NAME"/>' ağının etkinleştirilmesi için ağ bağlantısı gereklidir.</translation>
-<translation id="3963445509666917109">Hoparlör (Dahili)</translation>
-<translation id="2825619548187458965">Raf</translation>
-<translation id="2614835198358683673">Chromebook'unuz açıkken şarj edilemeyebilir. Orijinal şarj cihazını kullanmayı düşünün.</translation>
-<translation id="1895658205118569222">Kapat</translation>
-<translation id="4430019312045809116">Ses</translation>
-<translation id="8681498213689260554">Güncellemek için yeniden başlatın ve Powerwash yapın</translation>
-<translation id="4442424173763614572">DNS arama başarısız oldu</translation>
-<translation id="7874779702599364982">Hücresel ağlar aranıyor...</translation>
-<translation id="583281660410589416">Bilinmiyor</translation>
-<translation id="1383876407941801731">Arama</translation>
-<translation id="3901991538546252627"><ph name="NAME"/> ağına bağlanılıyor</translation>
-<translation id="2204305834655267233">Ağ Bilgisi</translation>
-<translation id="1621499497873603021">Pilin boşalması için kalan süre, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Misafir oturumundan çık</translation>
-<translation id="8308637677604853869">Önceki menü</translation>
-<translation id="4666297444214622512">Başka bir hesapta oturum açılamıyor.</translation>
-<translation id="3625258641415618104">Ekran görüntüleri devre dışı</translation>
-<translation id="1346748346194534595">Sağa</translation>
-<translation id="1773212559869067373">Kimlik doğrulama sertifikası yerel olarak reddedildi</translation>
-<translation id="8528322925433439945">Mobile...</translation>
-<translation id="7049357003967926684">İlişki</translation>
-<translation id="8428213095426709021">Ayarlar</translation>
-<translation id="2372145515558759244">Uygulamalar senkronize ediliyor...</translation>
-<translation id="7256405249507348194">Tanınmayan hata: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA kontrolü başarısız oldu</translation>
-<translation id="8456362689280298700">Dolması için gereken süre: <ph name="HOUR"/>:<ph name="MINUTE"/> </translation>
-<translation id="5787281376604286451">Sesli geri bildirim etkin.
-Devre dışı bırakmak için Ctrl+Alt+Z tuşlarına basın.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Bilinmeyen ağ hatası</translation>
-<translation id="1467432559032391204">Sola</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830"><ph name="NAME"/> etkinleştiriliyor</translation>
-<translation id="8814190375133053267">Kablosuz</translation>
-<translation id="1923539912171292317">Otomatik tıklamalar</translation>
-<translation id="1398853756734560583">Büyüt</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: Bağlanıyor...</translation>
-<translation id="252373100621549798">Bilinmeyen Görünüm</translation>
-<translation id="1882897271359938046">Şuraya yansıtılıyor: <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Düşük güçlü bir şarj cihazına takıldı. Şarj durumu güvenilir olmayabilir.</translation>
-<translation id="3784455785234192852">Kilitle</translation>
-<translation id="2805756323405976993">Uygulamalar</translation>
-<translation id="1512064327686280138">Etkinleştirme hatası</translation>
-<translation id="5097002363526479830">'<ph name="NAME"/>' ağına bağlanamadı: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Kablosuz kapalı.</translation>
-<translation id="2966449113954629791">Mobil veri kullanım hakkınızı doldurmuş olabilirsiniz. Daha fazla veri satın almak için <ph name="NAME"/> etkinleştirme portalını ziyaret edin.</translation>
-<translation id="8132793192354020517"><ph name="NAME"/> ağına bağlanıldı</translation>
-<translation id="7052914147756339792">Duvar kağıdını ayarla...</translation>
-<translation id="8678698760965522072">Çevrimiçi durumu</translation>
-<translation id="2532589005999780174">Yüksek kontrast modu</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Dahili hata</translation>
-<translation id="3019353588588144572">Pilin tam olarak şarj olması için kalan süre, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Ekran büyüteci</translation>
-<translation id="7005812687360380971">Hata</translation>
-<translation id="882279321799040148">Görüntülemek için tıklayın</translation>
-<translation id="1753067873202720523">Chromebook'unuz açıkken şarj olmayabilir.</translation>
-<translation id="5045550434625856497">Yanlış şifre</translation>
-<translation id="1602076796624386989">Mobil verileri etkinleştir</translation>
-<translation id="6981982820502123353">Erişilebilirlik</translation>
-<translation id="3157931365184549694">Geri yükle</translation>
-<translation id="4274292172790327596">Tanınmayan hata</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Kulaklık</translation>
-<translation id="225680501294068881">Cihazlar taranıyor...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Mikrofon (Dahili)</translation>
-<translation id="4448844063988177157">Kablosuz ağlar aranıyor...</translation>
-<translation id="8401662262483418323">Şununla bağlantı kurulamadı: &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/>
-Sunucu mesajı: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Bir hata oluştu</translation>
-<translation id="7229570126336867161">EVDO gerekli</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/>, <ph name="DOMAIN"/> tarafından yönetilen herkese açık bir oturumdur</translation>
-<translation id="9044646465488564462">Şu ağa bağlanamadı: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Oturumdan çık</translation>
-<translation id="8454013096329229812">Kablosuz açık.</translation>
-<translation id="4872237917498892622">Alt+Arama veya Üst Karakter</translation>
-<translation id="9201131092683066720">Pil %<ph name="PERCENTAGE"/> dolu.</translation>
-<translation id="2983818520079887040">Ayarlar...</translation>
-<translation id="3871838685472846647">Cep Telefonu Etkinleştirildi</translation>
-<translation id="1195412055398077112">fazla tarama</translation>
-<translation id="112308213915226829">Rafı otomatik gizle</translation>
-<translation id="7573962313813535744">Yuva modu</translation>
-<translation id="8927026611342028580">Bağlantı İstendi</translation>
-<translation id="8300849813060516376">OTASP başarısız oldu</translation>
-<translation id="2792498699870441125">Alt+Arama</translation>
-<translation id="8660803626959853127"><ph name="COUNT"/> dosya senkronize ediliyor</translation>
-<translation id="5958529069007801266">Denetlenen kullanıcı</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK kapalı</translation>
-<translation id="6248847161401822652">Çıkmak için Ctrl+ÜstKrktr+Q tuşlarına iki kez basın.</translation>
-<translation id="6785414152754474415">Pil %<ph name="PERCENTAGE"/> dolu ve şarj oluyor.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Etkinleştiriliyor...</translation>
-<translation id="4895488851634969361">Pil dolu.</translation>
-<translation id="5947494881799873997">Geri döndür</translation>
-<translation id="7593891976182323525">Arama veya Üst Karakter</translation>
-<translation id="7649070708921625228">Yardım</translation>
-<translation id="747833637904845037">Chromebook'unuz harici bir ekrana bağlıyken (kapak kapalı olsa da) açık kalır.</translation>
-<translation id="3050422059534974565">CAPS LOCK açık.
-İptal için Arama veya Üst Karakter tuşlarına basın.</translation>
-<translation id="397105322502079400">Hesaplanııyor...</translation>
-<translation id="158849752021629804">Ev ağı gerekli</translation>
-<translation id="6857811139397017780">Şunu etkinleştir: <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">DHCP araması başarısız oldu</translation>
-<translation id="6692173217867674490">Hatalı parola</translation>
-<translation id="6165508094623778733">Daha fazla bilgi edinin</translation>
-<translation id="9046895021617826162">Bağlantı başarısız oldu</translation>
-<translation id="7168224885072002358"><ph name="TIMEOUT_SECONDS"/> saniye içinde eski çözünürlüğe dönülüyor</translation>
-<translation id="973896785707726617">Bu oturum <ph name="SESSION_TIME_REMAINING"/> içinde sona erecek. Oturumunuz otomatik olarak kapatılacaktır.</translation>
-<translation id="8372369524088641025">Hatalı WEP anahtarı</translation>
-<translation id="6636709850131805001">Tanınmayan durum</translation>
-<translation id="3573179567135747900">Tekrar &quot;<ph name="FROM_LOCALE"/>&quot; ayarına dön (yeniden başlatmak gerekir)</translation>
-<translation id="8103386449138765447">SMS mesajları: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Google Drive ayarları...</translation>
-<translation id="7209101170223508707">CAPS LOCK açık.
-İptal için Alt+Arama veya Üst Karakter tuşlarına basın.</translation>
-<translation id="8940956008527784070">Pil gücü az (%<ph name="PERCENTAGE"/>)</translation>
-<translation id="4918086044614829423">Kabul et</translation>
-<translation id="5102001756192215136"><ph name="HOUR"/>:<ph name="MINUTE"/> kaldı</translation>
-<translation id="3009178788565917040">Çıkış</translation>
-<translation id="520760366042891468">Ekranınızın denetimi Hangouts üzerinden paylaşılıyor.</translation>
-<translation id="8000066093800657092">Ağ yok</translation>
-<translation id="4015692727874266537">Başka bir hesapta oturum açın...</translation>
-<translation id="5941711191222866238">Simge durumuna küçült</translation>
-<translation id="6911468394164995108">Başka ağa katıl...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Tebrikler! '<ph name="NAME"/>' veri hizmetiniz etkinleştirildi ve kullanıma hazır.</translation>
-<translation id="412065659894267608">Tam dolana kadar <ph name="HOUR"/> sa <ph name="MINUTE"/> dk var</translation>
-<translation id="7297443947353982503">Kullanıcı adı/şifre yanlış veya EAP yetkilendirmesi başarısız oldu</translation>
-<translation id="6359806961507272919"><ph name="PHONE_NUMBER"/> numaradan SMS alındı</translation>
-<translation id="1244147615850840081">Operatör</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_uk.xtb b/chromium/ash/strings/ash_strings_uk.xtb
deleted file mode 100644
index 2143e47f8b9..00000000000
--- a/chromium/ash/strings/ash_strings_uk.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="uk">
-<translation id="3595596368722241419">Акумулятор заряджено</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> і <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Стан порталу</translation>
-<translation id="30155388420722288">Кнопка переповнення</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Bluetooth увімкнено</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> обернено на <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Bluetooth вимкнено</translation>
-<translation id="7165320105431587207">Помилка налаштування мережі</translation>
-<translation id="3775358506042162758">Паралельно можна входити не більше ніж у три облікові записи.</translation>
-<translation id="370649949373421643">Увімкнути Wi-Fi</translation>
-<translation id="3626281679859535460">Яскравість</translation>
-<translation id="3621202678540785336">Вхід</translation>
-<translation id="595202126637698455">Відстеження ефективності ввімкнено</translation>
-<translation id="8054466585765276473">Обчислення часу роботи акумулятора.</translation>
-<translation id="7982789257301363584">Мережа</translation>
-<translation id="5565793151875479467">Проксі-сервер...</translation>
-<translation id="938582441709398163">Розкладка клавіатури</translation>
-<translation id="4387004326333427325">Сертифікат автентифікації відхилений дистанційно</translation>
-<translation id="6979158407327259162">Диск Google</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/>: установлено роздільну здатність <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">Помилка HTTP</translation>
-<translation id="2297568595583585744">Контейтер стану</translation>
-<translation id="1661867754829461514">Відсутній PIN-код</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: Під’єднання…</translation>
-<translation id="40400351611212369">Помилка активації мережі</translation>
-<translation id="4237016987259239829">Помилка з'єднання з мережею</translation>
-<translation id="2946640296642327832">Увімкнути Bluetooth</translation>
-<translation id="6459472438155181876">Розширення екрана на <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Мобільний</translation>
-<translation id="6596816719288285829">ІР-адреса</translation>
-<translation id="4508265954913339219">Помилка активації</translation>
-<translation id="3621712662352432595">Налаштування звуку</translation>
-<translation id="1812696562331527143">Метод введення змінено на <ph name="INPUT_METHOD_ID"/>* (<ph name="BEGIN_LINK"/>третя сторона<ph name="END_LINK"/>).
-Щоб переключитися, натисніть Shift + Alt.</translation>
-<translation id="2127372758936585790">Зарядний пристрій низької потужності</translation>
-<translation id="3846575436967432996">Інформація про мережу не доступна</translation>
-<translation id="3026237328237090306">Налаштувати передавання мобільних даних</translation>
-<translation id="5871632337994001636">Керування пристроями…</translation>
-<translation id="785750925697875037">Переглянути обліковий запис для мобільних пристроїв</translation>
-<translation id="153454903766751181">Ініціалізація мобільного модема…</translation>
-<translation id="4628814525959230255">Спільний доступ до екрана для користувача <ph name="HELPER_NAME"/> через Hangouts.</translation>
-<translation id="7864539943188674973">Вимкнути Bluetooth</translation>
-<translation id="939252827960237676">Не вдалося зберегти знімок екрана</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Перезапустіть, щоб оновити</translation>
-<translation id="2268813581635650749">Вийти з усіх облікових записів</translation>
-<translation id="735745346212279324">VPN від’єднано</translation>
-<translation id="7320906967354320621">Простій</translation>
-<translation id="15373452373711364">Великий курсор миші</translation>
-<translation id="3294437725009624529">Гість</translation>
-<translation id="8190698733819146287">Налаштувати мови та введення тексту...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Розташування полиці</translation>
-<translation id="8676770494376880701">Зарядний пристрій низької потужності підключено</translation>
-<translation id="7170041865419449892">За межами досяжності</translation>
-<translation id="4804818685124855865">Від'єднатися</translation>
-<translation id="2544853746127077729">Сертифікат автентифікації відхилений мережею</translation>
-<translation id="5222676887888702881">Вийти</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Конфігурація</translation>
-<translation id="1272079795634619415">Зупинити</translation>
-<translation id="4957722034734105353">Докладніше...</translation>
-<translation id="2964193600955408481">Вимкнути Wi-Fi</translation>
-<translation id="4279490309300973883">Дзеркальне відображення</translation>
-<translation id="7973962044839454485">Помилка автентифікації PPP через неправильне ім’я користувача або пароль</translation>
-<translation id="2509468283778169019">Режим CAPS LOCK увімкнено</translation>
-<translation id="3892641579809465218">Внутрішній екран</translation>
-<translation id="7823564328645135659">Після синхронізації налаштувань мову змінено. Попередня: <ph name="FROM_LOCALE"/>, нова: <ph name="TO_LOCALE"/>.</translation>
-<translation id="3368922792935385530">Підключено</translation>
-<translation id="8340999562596018839">Голосові підказки</translation>
-<translation id="8654520615680304441">Увімкнення Wi-Fi…</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Метод введення змінено на <ph name="INPUT_METHOD_ID"/>.
-Щоб переключитися, натисніть Shift + Alt.</translation>
-<translation id="2562916301614567480">Приватна мережа</translation>
-<translation id="6549021752953852991">Мобільна мережа недоступна</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Прикро, але контакту з монітором немає. (Цей монітор не підтримується)</translation>
-<translation id="6426039856985689743">Вимкнути передавання мобільних даних</translation>
-<translation id="3087734570205094154">Низ</translation>
-<translation id="3742055079367172538">Знімок екрана зроблено</translation>
-<translation id="8878886163241303700">Розширення екрана</translation>
-<translation id="5271016907025319479">VPN не налаштовано.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Можливість робити знімки екрана вимкнено адміністратором.</translation>
-<translation id="372094107052732682">Двічі натисніть комбінацію клавіш Ctrl+Shift+Q, щоб вийти.</translation>
-<translation id="6803622936009808957">Не вдалося дублювати зображення екранів, оскільки не знайдено підтримувані значення роздільної здатності. Натомість запущено режим розширеного робочого столу.</translation>
-<translation id="1480041086352807611">Демонстраційний режим</translation>
-<translation id="3626637461649818317">Залишилося <ph name="PERCENTAGE"/>%</translation>
-<translation id="9089416786594320554">Методи введення</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">Для активації &quot;<ph name="NAME"/>&quot; потрібне з’єднання з мережею.</translation>
-<translation id="3963445509666917109">Динамік (внутрішній)</translation>
-<translation id="2825619548187458965">Полиця</translation>
-<translation id="2614835198358683673">Ваш Chromebook може не заряджатися, якщо ввімкнений. Спробуйте скористатися офіційним зарядним пристроєм.</translation>
-<translation id="1895658205118569222">Завершення роботи</translation>
-<translation id="4430019312045809116">Гучність</translation>
-<translation id="8681498213689260554">Щоб оновити, перезапустіть і скористайтеся функцією Powerwash</translation>
-<translation id="4442424173763614572">Помилка пошуку DNS</translation>
-<translation id="7874779702599364982">Пошук мобільних мереж…</translation>
-<translation id="583281660410589416">Невідомо</translation>
-<translation id="1383876407941801731">Пошук</translation>
-<translation id="3901991538546252627">Під’єднання до <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Інформація про мережу</translation>
-<translation id="1621499497873603021">До розрядження акумулятора залишилося <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Завершити сеанс у режимі гостя</translation>
-<translation id="8308637677604853869">Попереднє меню</translation>
-<translation id="4666297444214622512">Неможливо ввійти в інший обліковий запис.</translation>
-<translation id="3625258641415618104">Знімки екрана вимкнено</translation>
-<translation id="1346748346194534595">Праворуч</translation>
-<translation id="1773212559869067373">Сертифікат автентифікації відхилений локально</translation>
-<translation id="8528322925433439945">Мобільні ...</translation>
-<translation id="7049357003967926684">Пов'язування</translation>
-<translation id="8428213095426709021">Налаштування</translation>
-<translation id="2372145515558759244">Синхронізація програм...</translation>
-<translation id="7256405249507348194">Нерозпізнана помилка: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Помилка перевірки AAA</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> до повного зарядження</translation>
-<translation id="5787281376604286451">Голосові підказки ввімкнено.
-Натисніть Ctrl+Alt+Z, щоб вимкнути.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Невідома помилка мережі</translation>
-<translation id="1467432559032391204">Ліворуч</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Активація <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Автоматичні кліки</translation>
-<translation id="1398853756734560583">Збільшити</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: Під’єднання…</translation>
-<translation id="252373100621549798">Невідомий дисплей</translation>
-<translation id="1882897271359938046">Дзеркалювання на <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Підключено до зарядного пристрою низької потужності. Акумулятор може заряджатися неналежним чином.</translation>
-<translation id="3784455785234192852">Заблокувати</translation>
-<translation id="2805756323405976993">Додатки</translation>
-<translation id="1512064327686280138">Помилка активації</translation>
-<translation id="5097002363526479830">Не вдалося під’єднатися до мережі &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi вимкнено.</translation>
-<translation id="2966449113954629791">Можливо, ви використали свій ліміт мобільного передавання даних. Перейдіть на портал активації <ph name="NAME"/>, щоб придбати більший обсяг даних.</translation>
-<translation id="8132793192354020517">З'єднано з <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Установити фоновий малюнок...</translation>
-<translation id="8678698760965522072">Статус онлайн</translation>
-<translation id="2532589005999780174">Режим високого контрасту</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Внутрішня помилка</translation>
-<translation id="3019353588588144572">До повного зарядження акумулятора залишилося <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Лупа</translation>
-<translation id="7005812687360380971">Помилка</translation>
-<translation id="882279321799040148">Натисніть, щоб переглянути</translation>
-<translation id="1753067873202720523">Ваш Chromebook може не заряджатися, поки він увімкнений.</translation>
-<translation id="5045550434625856497">Неправильний пароль</translation>
-<translation id="1602076796624386989">Увімкнути передавання мобільних даних</translation>
-<translation id="6981982820502123353">Доступність</translation>
-<translation id="3157931365184549694">Відновити</translation>
-<translation id="4274292172790327596">Нерозпізнана помилка</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Навушники</translation>
-<translation id="225680501294068881">Пошук пристроїв...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Мікрофон (внутрішній)</translation>
-<translation id="4448844063988177157">Пошук Wi-Fi мереж...</translation>
-<translation id="8401662262483418323">Помилка під’єднання до мережі &quot;<ph name="NAME"/>&quot;: <ph name="DETAILS"/>
-Повідомлення сервера: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Сталася помилка</translation>
-<translation id="7229570126336867161">Потрібна мережа EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> – загальнодоступний сеанс, керований доменом <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Помилка під’єднання до мережі: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Завершити сеанс</translation>
-<translation id="8454013096329229812">Wi-Fi увімкнено.</translation>
-<translation id="4872237917498892622">Alt+клавіша пошуку або Shift</translation>
-<translation id="9201131092683066720">Акумулятор заряджений на <ph name="PERCENTAGE"/>%.</translation>
-<translation id="2983818520079887040">Налаштування...</translation>
-<translation id="3871838685472846647">Мобільне з’єднання активовано</translation>
-<translation id="1195412055398077112">облямівка екрана</translation>
-<translation id="112308213915226829">Автоматично ховати полицю</translation>
-<translation id="7573962313813535744">Режим док-станції</translation>
-<translation id="8927026611342028580">Подано запит на під’єднання</translation>
-<translation id="8300849813060516376">Помилка OTASP</translation>
-<translation id="2792498699870441125">Alt+клавіша пошуку</translation>
-<translation id="8660803626959853127">Синхронізація файлів (<ph name="COUNT"/>)</translation>
-<translation id="5958529069007801266">Контрольований користувач</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">Режим CAPS LOCK вимкнено</translation>
-<translation id="6248847161401822652">Двічі натисніть комбінацію клавіш Control Shift Q, щоб вийти.</translation>
-<translation id="6785414152754474415">Акумулятор заряджений на <ph name="PERCENTAGE"/>% і заряджається.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: активація…</translation>
-<translation id="4895488851634969361">Акумулятор заряджений.</translation>
-<translation id="5947494881799873997">Повернути</translation>
-<translation id="7593891976182323525">Клавіша пошуку або Shift</translation>
-<translation id="7649070708921625228">Довідка</translation>
-<translation id="747833637904845037">Під час під’єднання до зовнішнього екрана Chromebook залишатиметься ввімкненим, навіть якщо кришку закрито.</translation>
-<translation id="3050422059534974565">Клавішу CAPS LOCK увімкнено.
-Натисніть клавішу пошуку або Shift, щоб скасувати.</translation>
-<translation id="397105322502079400">Обчислення...</translation>
-<translation id="158849752021629804">Потрібна домашня мережа</translation>
-<translation id="6857811139397017780">Активувати <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Помилка пошуку DHCP</translation>
-<translation id="6692173217867674490">Погана парольна фраза</translation>
-<translation id="6165508094623778733">Докладніше</translation>
-<translation id="9046895021617826162">Помилка з'єднання</translation>
-<translation id="7168224885072002358">Попередня роздільна здатність повернеться через <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Сеанс закінчиться за <ph name="SESSION_TIME_REMAINING"/>. Ви вийдете автоматично.</translation>
-<translation id="8372369524088641025">Поганий WEP-ключ</translation>
-<translation id="6636709850131805001">Нерозпізнаний стан</translation>
-<translation id="3573179567135747900">Повернутися до мови &quot;<ph name="FROM_LOCALE"/>&quot; (потрібно перезавантажитися)</translation>
-<translation id="8103386449138765447">SMS повідомлень: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Налаштування Google Диска...</translation>
-<translation id="7209101170223508707">Клавішу CAPS LOCK увімкнено.
-Натисніть Alt+клавішу пошуку або Shift, щоб скасувати.</translation>
-<translation id="8940956008527784070">Низький заряд акумулятора (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Прийняти</translation>
-<translation id="5102001756192215136">Залишилося <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Вихід</translation>
-<translation id="520760366042891468">Спільний доступ до екрана через Hangouts.</translation>
-<translation id="8000066093800657092">Немає мережі</translation>
-<translation id="4015692727874266537">Увійти в інший обліковий запис…</translation>
-<translation id="5941711191222866238">Зменшити</translation>
-<translation id="6911468394164995108">Під’єднатися до іншої...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Вітаємо! Вашу службу передавання даних &quot;<ph name="NAME"/>&quot; активовано. Нею можна користуватися.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/> год. <ph name="MINUTE"/> хв. до повного зарядження</translation>
-<translation id="7297443947353982503">Неправильне ім’я користувача чи пароль або помилка автентифікації за протоколом EAP</translation>
-<translation id="6359806961507272919">SMS-повідомлення від <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Постачальник</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_vi.xtb b/chromium/ash/strings/ash_strings_vi.xtb
deleted file mode 100644
index de4d88e9fc4..00000000000
--- a/chromium/ash/strings/ash_strings_vi.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="vi">
-<translation id="3595596368722241419">Pin đầy</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> và <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">Trạng thái cổng</translation>
-<translation id="30155388420722288">Nút tràn</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">Đã bật bluetooth</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> đã được xoay vòng sang <ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">Bluetooth</translation>
-<translation id="2268130516524549846">Đã tắt bluetooth</translation>
-<translation id="7165320105431587207">Không định cấu hình mạng được</translation>
-<translation id="3775358506042162758">Bạn chỉ có thể có tối đa ba tài khoản khi đăng nhập nhiều tài khoản.</translation>
-<translation id="370649949373421643">Bật Wi-Fi</translation>
-<translation id="3626281679859535460">Độ sáng</translation>
-<translation id="3621202678540785336">Thiết bị vào</translation>
-<translation id="595202126637698455">Đã bật theo dõi hoạt động</translation>
-<translation id="8054466585765276473">Đang tính toán thời lượng pin.</translation>
-<translation id="7982789257301363584">Mạng</translation>
-<translation id="5565793151875479467">Proxy...</translation>
-<translation id="938582441709398163">Lớp phủ bàn phím</translation>
-<translation id="4387004326333427325">Chứng chỉ xác thực bị từ chối từ xa</translation>
-<translation id="6979158407327259162">Google Drive</translation>
-<translation id="3683428399328702079">Độ phân giải <ph name="DISPLAY_NAME"/> đã được chuyển thành <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">HTTP gặp lỗi</translation>
-<translation id="2297568595583585744">Khay trạng thái</translation>
-<translation id="1661867754829461514">Thiếu PIN</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>: Đang kết nối...</translation>
-<translation id="40400351611212369">Lỗi kích hoạt mạng</translation>
-<translation id="4237016987259239829">Lỗi Kết nối Mạng</translation>
-<translation id="2946640296642327832">Bật bluetooth</translation>
-<translation id="6459472438155181876">Đang mở rộng màn hình tới <ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">Di động</translation>
-<translation id="6596816719288285829">Địa chỉ IP</translation>
-<translation id="4508265954913339219">Kích hoạt không thành công</translation>
-<translation id="3621712662352432595">Cài đặt âm thanh</translation>
-<translation id="1812696562331527143">Phương thức nhập của bạn đã thay đổi thành <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>bên thứ ba<ph name="END_LINK"/>).
-Nhấn Shift + Alt để chuyển đổi.</translation>
-<translation id="2127372758936585790">Bộ sạc công suất thấp</translation>
-<translation id="3846575436967432996">Không có thông tin mạng</translation>
-<translation id="3026237328237090306">Thiết lập dữ liệu di động</translation>
-<translation id="5871632337994001636">Quản lý thiết bị...</translation>
-<translation id="785750925697875037">Xem tài khoản di động</translation>
-<translation id="153454903766751181">Đang khởi chạy modem di động...</translation>
-<translation id="4628814525959230255">Chia sẻ quyền kiểm soát màn hình của bạn với <ph name="HELPER_NAME"/> qua Hangouts.</translation>
-<translation id="7864539943188674973">Tắt bluetooth</translation>
-<translation id="939252827960237676">Không lưu được ảnh chụp màn hình</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">Khởi động lại để cập nhật</translation>
-<translation id="2268813581635650749">Đăng xuất tất cả</translation>
-<translation id="735745346212279324">Đã ngắt kết nối VPN</translation>
-<translation id="7320906967354320621">Rảnh</translation>
-<translation id="15373452373711364">Con trỏ chuột lớn</translation>
-<translation id="3294437725009624529">Khách</translation>
-<translation id="8190698733819146287">Tùy chỉnh ngôn ngữ và dữ liệu nhập...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">Vị trí giá</translation>
-<translation id="8676770494376880701">Đã kết nối bộ sạc công suất thấp</translation>
-<translation id="7170041865419449892">Ngoài vùng phủ sóng</translation>
-<translation id="4804818685124855865">Ngắt kết nối</translation>
-<translation id="2544853746127077729">Chứng chỉ xác thực bị mạng từ chối</translation>
-<translation id="5222676887888702881">Đăng xuất</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">Cấu hình</translation>
-<translation id="1272079795634619415">Dừng</translation>
-<translation id="4957722034734105353">Tìm hiểu thêm...</translation>
-<translation id="2964193600955408481">Tắt Wi-Fi</translation>
-<translation id="4279490309300973883">Đang phản chiếu</translation>
-<translation id="7973962044839454485">Xác thực PPP không thành công do tên người dùng hoặc mật khẩu không đúng</translation>
-<translation id="2509468283778169019">Đang bật CAPS LOCK</translation>
-<translation id="3892641579809465218">Màn hình nội bộ</translation>
-<translation id="7823564328645135659">Ngôn ngữ đã chuyển từ &quot;<ph name="FROM_LOCALE"/>&quot; thành &quot;<ph name="TO_LOCALE"/>&quot; sau khi đồng bộ hóa cài đặt của bạn.</translation>
-<translation id="3368922792935385530">Đã kết nối</translation>
-<translation id="8340999562596018839">Phản hồi nói</translation>
-<translation id="8654520615680304441">Bật Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">Phương thức nhập của bạn đã thay đổi thành <ph name="INPUT_METHOD_ID"/>.
-Nhấn Shift + Alt để chuyển đổi.</translation>
-<translation id="2562916301614567480">Mạng riêng</translation>
-<translation id="6549021752953852991">Không có mạng di động nào</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Rất tiếc, hệ thống không hoạt động giữa hai màn hình. (Màn hình đó không được hỗ trợ)</translation>
-<translation id="6426039856985689743">Tắt dữ liệu di động</translation>
-<translation id="3087734570205094154">Bên dưới</translation>
-<translation id="3742055079367172538">Ảnh màn hình đã chụp</translation>
-<translation id="8878886163241303700">Mở rộng màn hình</translation>
-<translation id="5271016907025319479">Mạng riêng ảo không được định cấu hình.</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (Bluetooth)</translation>
-<translation id="3967919079500697218">Quản trị viên của bạn đã tắt tính năng chụp ảnh màn hình.</translation>
-<translation id="372094107052732682">Nhấn Ctrl+Shift+Q hai lần để thoát.</translation>
-<translation id="6803622936009808957">Không thể phản chiếu màn hình do không tìm thấy độ phân giải được hỗ trợ. Thay vào đó, đã chuyển sang chế độ màn hình mở rộng.</translation>
-<translation id="1480041086352807611">Chế độ trình diễn</translation>
-<translation id="3626637461649818317">Còn lại <ph name="PERCENTAGE"/>%</translation>
-<translation id="9089416786594320554">Phương thức nhập</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">Cần phải có kết nối mạng để kích hoạt '<ph name="NAME"/>'</translation>
-<translation id="3963445509666917109">Loa (Bên trong)</translation>
-<translation id="2825619548187458965">Giá</translation>
-<translation id="2614835198358683673">Chromebook của bạn có thể không sạc khi đang bật. Hãy xem xét sử dụng bộ sạc chính thức.</translation>
-<translation id="1895658205118569222">Tắt</translation>
-<translation id="4430019312045809116">Âm lượng</translation>
-<translation id="8681498213689260554">Khởi động lại và powerwash để cập nhật</translation>
-<translation id="4442424173763614572">Tìm kiếm DNS không thành công</translation>
-<translation id="7874779702599364982">Đang tìm kiếm mạng di động...</translation>
-<translation id="583281660410589416">Không biết</translation>
-<translation id="1383876407941801731">Tìm kiếm</translation>
-<translation id="3901991538546252627">Đang kết nối với <ph name="NAME"/></translation>
-<translation id="2204305834655267233">Thông tin mạng</translation>
-<translation id="1621499497873603021">Thời gian còn lại cho đến khi pin hết, <ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">Thoát khỏi phiên khách</translation>
-<translation id="8308637677604853869">Trình đơn trước</translation>
-<translation id="4666297444214622512">Không thể đăng nhập tài khoản khác.</translation>
-<translation id="3625258641415618104">Đã tắt chụp ảnh màn hình</translation>
-<translation id="1346748346194534595">Phải</translation>
-<translation id="1773212559869067373">Chứng chỉ xác thực bị từ chối cục bộ</translation>
-<translation id="8528322925433439945">Di động ...</translation>
-<translation id="7049357003967926684">Liên kết</translation>
-<translation id="8428213095426709021">Cài đặt</translation>
-<translation id="2372145515558759244">Đang đồng bộ hóa ứng dụng...</translation>
-<translation id="7256405249507348194">Lỗi không xác định: <ph name="DESC"/></translation>
-<translation id="7925247922861151263">Không thể kiểm tra AAA</translation>
-<translation id="8456362689280298700"><ph name="HOUR"/>:<ph name="MINUTE"/> cho đến khi sạc đầy</translation>
-<translation id="5787281376604286451">Phản hồi nói được bật.
-Nhấn Ctrl+Alt+Z để tắt.</translation>
-<translation id="4479639480957787382">Ethernet</translation>
-<translation id="6312403991423642364">Lỗi mạng không xác định</translation>
-<translation id="1467432559032391204">Trái</translation>
-<translation id="5543001071567407895">SMS</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">Kích hoạt <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">Nhấp chuột tự động</translation>
-<translation id="1398853756734560583">Phóng to</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>: Đang kết nối...</translation>
-<translation id="252373100621549798">Màn hình không xác định</translation>
-<translation id="1882897271359938046">Đang phản chiếu tới <ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">Được cắm vào bộ sạc công suất thấp. Việc sạc pin có thể không được đảm bảo.</translation>
-<translation id="3784455785234192852">Khóa</translation>
-<translation id="2805756323405976993">Ứng dụng</translation>
-<translation id="1512064327686280138">Lỗi kích hoạt</translation>
-<translation id="5097002363526479830">Không thể kết nối với mạng '<ph name="NAME"/>': <ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi đang tắt.</translation>
-<translation id="2966449113954629791">Bạn có thể đã sử dụng hết dung lượng dữ liệu di động cho phép. Hãy truy cập cổng kích hoạt <ph name="NAME"/> để mua thêm dữ liệu.</translation>
-<translation id="8132793192354020517">Đã kết nối với <ph name="NAME"/></translation>
-<translation id="7052914147756339792">Đặt hình nền...</translation>
-<translation id="8678698760965522072">Trạng thái trực tuyến</translation>
-<translation id="2532589005999780174">Chế độ tương phản cao</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>, <ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">Lỗi nội bộ</translation>
-<translation id="3019353588588144572">Thời gian còn lại cho đến khi pin được sạc đầy, <ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">Phóng to màn hình</translation>
-<translation id="7005812687360380971">Lỗi</translation>
-<translation id="882279321799040148">Nhấp để xem</translation>
-<translation id="1753067873202720523">Chromebook có thể không sạc khi đang bật.</translation>
-<translation id="5045550434625856497">Mật khẩu sai</translation>
-<translation id="1602076796624386989">Bật dữ liệu di động</translation>
-<translation id="6981982820502123353">Khả năng truy cập</translation>
-<translation id="3157931365184549694">Khôi phục</translation>
-<translation id="4274292172790327596">Lỗi chưa được xác định</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">Tai nghe</translation>
-<translation id="225680501294068881">Đang quét tìm thiết bị...</translation>
-<translation id="5597451508971090205"><ph name="SHORT_WEEKDAY"/>, <ph name="DATE"/></translation>
-<translation id="737451040872859086">Micrô (Bên trong)</translation>
-<translation id="4448844063988177157">Đang tìm kiếm mạng Wi-Fi...</translation>
-<translation id="8401662262483418323">Không kết nối được với '<ph name="NAME"/>': <ph name="DETAILS"/>
-Thông báo máy chủ: <ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">Đã xảy ra lôi</translation>
-<translation id="7229570126336867161">Cần có EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> là phiên công khai được quản lý bởi <ph name="DOMAIN"/></translation>
-<translation id="9044646465488564462">Không kết nối được với mạng: <ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">Thoát khỏi phiên</translation>
-<translation id="8454013096329229812">Wi-Fi đang bật.</translation>
-<translation id="4872237917498892622">Alt+Search hoặc Shift</translation>
-<translation id="9201131092683066720">Pin đầy <ph name="PERCENTAGE"/>%.</translation>
-<translation id="2983818520079887040">Cài đặt...</translation>
-<translation id="3871838685472846647">Đã kích hoạt di động</translation>
-<translation id="1195412055398077112">quét quá mức</translation>
-<translation id="112308213915226829">Tự động ẩn giá</translation>
-<translation id="7573962313813535744">Chế độ được gắn đế</translation>
-<translation id="8927026611342028580">Yêu cầu kết nối</translation>
-<translation id="8300849813060516376">OTASP không thành công</translation>
-<translation id="2792498699870441125">Alt+Search</translation>
-<translation id="8660803626959853127">Đang đồng bộ hóa <ph name="COUNT"/> tệp</translation>
-<translation id="5958529069007801266">Người dùng được giám sát</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK tắt</translation>
-<translation id="6248847161401822652">Nhấn Control Shift Q hai lần để thoát.</translation>
-<translation id="6785414152754474415">Pin đầy <ph name="PERCENTAGE"/>% và đang sạc.</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>: Đang kích hoạt...</translation>
-<translation id="4895488851634969361">Pin đầy.</translation>
-<translation id="5947494881799873997">Hoàn nguyên</translation>
-<translation id="7593891976182323525">Search hoặc Shift</translation>
-<translation id="7649070708921625228">Trợ giúp</translation>
-<translation id="747833637904845037">Chromebook của bạn sẽ vẫn bật trong khi được kết nối với màn hình bên ngoài cho dù nắp bị đóng.</translation>
-<translation id="3050422059534974565">CAPS LOCK đang bật.
-Nhấn Search hoặc Shift để hủy.</translation>
-<translation id="397105322502079400">Đang tính...</translation>
-<translation id="158849752021629804">Cần mạng gia đình</translation>
-<translation id="6857811139397017780">Kích hoạt <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">Không thể tra cứu DHCP</translation>
-<translation id="6692173217867674490">Cụm mật khẩu sai</translation>
-<translation id="6165508094623778733">Tìm hiểu thêm</translation>
-<translation id="9046895021617826162">Kết nối không thành công</translation>
-<translation id="7168224885072002358">Sẽ hoàn nguyên về độ phân giải cũ sau <ph name="TIMEOUT_SECONDS"/></translation>
-<translation id="973896785707726617">Phiên này sẽ kết thúc sau <ph name="SESSION_TIME_REMAINING"/>. Bạn sẽ tự động bị đăng xuất.</translation>
-<translation id="8372369524088641025">Khóa WEP sai</translation>
-<translation id="6636709850131805001">Trạng thái không xác định</translation>
-<translation id="3573179567135747900">Thay đổi lại thành &quot;<ph name="FROM_LOCALE"/>&quot; (yêu cầu khởi động lại)</translation>
-<translation id="8103386449138765447">Tin nhắn SMS: <ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Cài đặt Google Drive...</translation>
-<translation id="7209101170223508707">CAPS LOCK đang bật.
-Nhấn Alt+Search hoặc Shift để hủy.</translation>
-<translation id="8940956008527784070">Pin yếu (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">Chấp nhận</translation>
-<translation id="5102001756192215136">Còn lại <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">Thiết bị ra</translation>
-<translation id="520760366042891468">Chia sẻ quyền kiểm soát màn hình của bạn qua Hangouts.</translation>
-<translation id="8000066093800657092">Không có mạng nào</translation>
-<translation id="4015692727874266537">Đăng nhập tài khoản khác...</translation>
-<translation id="5941711191222866238">Thu nhỏ</translation>
-<translation id="6911468394164995108">Tham gia mạng khác...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>: <ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">Xin chúc mừng! Dịch vụ dữ liệu '<ph name="NAME"/>' của bạn đã được kích hoạt và sẵn sàng sử dụng.</translation>
-<translation id="412065659894267608"><ph name="HOUR"/>g <ph name="MINUTE"/>p cho đến khi đầy</translation>
-<translation id="7297443947353982503">Tên người dùng/mật khẩu không đúng hoặc xác thực EAP không thành công</translation>
-<translation id="6359806961507272919">SMS từ <ph name="PHONE_NUMBER"/></translation>
-<translation id="1244147615850840081">Nhà cung cấp</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_zh-CN.xtb b/chromium/ash/strings/ash_strings_zh-CN.xtb
deleted file mode 100644
index ba9164d6c71..00000000000
--- a/chromium/ash/strings/ash_strings_zh-CN.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="zh-CN">
-<translation id="3595596368722241419">电池已充满</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> <ph name="MINUTE"/></translation>
-<translation id="7880025619322806991">“门户网站”状态</translation>
-<translation id="30155388420722288">溢出按钮</translation>
-<translation id="8673028979667498656">270°</translation>
-<translation id="5571066253365925590">蓝牙已启用</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/>已旋转为<ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">蓝牙</translation>
-<translation id="2268130516524549846">蓝牙已停用</translation>
-<translation id="7165320105431587207">无法配置网络</translation>
-<translation id="3775358506042162758">使用多帐户登录时,最多只能有 3 个帐户。</translation>
-<translation id="370649949373421643">启用 Wi-Fi</translation>
-<translation id="3626281679859535460">亮度</translation>
-<translation id="3621202678540785336">输入</translation>
-<translation id="595202126637698455">已启用性能跟踪</translation>
-<translation id="8054466585765276473">正在计算续航时间。</translation>
-<translation id="7982789257301363584">网络</translation>
-<translation id="5565793151875479467">代理...</translation>
-<translation id="938582441709398163">Overlay 键盘</translation>
-<translation id="4387004326333427325">身份验证证书遭到远程拒绝</translation>
-<translation id="6979158407327259162">Google 云端硬盘</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/>的分辨率已改为<ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">HTTP 获取请求失败</translation>
-<translation id="2297568595583585744">状态栏</translation>
-<translation id="1661867754829461514">缺少 PIN</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>:正在连接...</translation>
-<translation id="40400351611212369">网络激活错误</translation>
-<translation id="4237016987259239829">网络连接错误</translation>
-<translation id="2946640296642327832">启用蓝牙</translation>
-<translation id="6459472438155181876">正在将屏幕扩展到<ph name="DISPLAY_NAME"/></translation>
-<translation id="8206859287963243715">蜂窝网络设备</translation>
-<translation id="6596816719288285829">IP 地址</translation>
-<translation id="4508265954913339219">激活失败</translation>
-<translation id="3621712662352432595">音频设置</translation>
-<translation id="1812696562331527143">您的输入法已更改为“<ph name="INPUT_METHOD_ID"/>”*(<ph name="BEGIN_LINK"/>第三方<ph name="END_LINK"/>)。
-按 Shift + Alt 键可切换。</translation>
-<translation id="2127372758936585790">低功率充电器</translation>
-<translation id="3846575436967432996">没有可用的网络信息</translation>
-<translation id="3026237328237090306">设置移动数据</translation>
-<translation id="5871632337994001636">管理设备…</translation>
-<translation id="785750925697875037">查看移动帐户</translation>
-<translation id="153454903766751181">正在初始化蜂窝调制解调器...</translation>
-<translation id="4628814525959230255">通过环聊与<ph name="HELPER_NAME"/>共享您屏幕的控制权。</translation>
-<translation id="7864539943188674973">停用蓝牙</translation>
-<translation id="939252827960237676">无法保存屏幕截图</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">重新启动以进行更新</translation>
-<translation id="2268813581635650749">全部退出</translation>
-<translation id="735745346212279324">VPN 连接已断开</translation>
-<translation id="7320906967354320621">空闲</translation>
-<translation id="15373452373711364">大号鼠标光标</translation>
-<translation id="3294437725009624529">访客</translation>
-<translation id="8190698733819146287">自定义语言和输入法...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/>(<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">文件架位置</translation>
-<translation id="8676770494376880701">已连接低功率充电器</translation>
-<translation id="7170041865419449892">超出范围</translation>
-<translation id="4804818685124855865">断开连接</translation>
-<translation id="2544853746127077729">身份验证证书遭到网络拒绝</translation>
-<translation id="5222676887888702881">退出</translation>
-<translation id="2391579633712104609">180°</translation>
-<translation id="2688477613306174402">配置</translation>
-<translation id="1272079795634619415">停止</translation>
-<translation id="4957722034734105353">了解详情...</translation>
-<translation id="2964193600955408481">停用 Wi-Fi</translation>
-<translation id="4279490309300973883">正在镜像</translation>
-<translation id="7973962044839454485">用户名或密码不正确,导致 PPP 身份验证失败</translation>
-<translation id="2509468283778169019">CAPS LOCK 已打开</translation>
-<translation id="3892641579809465218">内部显示</translation>
-<translation id="7823564328645135659">同步了您的设置后,该语言已由“<ph name="FROM_LOCALE"/>”更改为“<ph name="TO_LOCALE"/>”。</translation>
-<translation id="3368922792935385530">已连接</translation>
-<translation id="8340999562596018839">语音反馈</translation>
-<translation id="8654520615680304441">启用 Wi-Fi...</translation>
-<translation id="8828714802988429505">90°</translation>
-<translation id="5825747213122829519">您的输入法已更改为“<ph name="INPUT_METHOD_ID"/>”。
-按 Shift + Alt 键可进行切换。</translation>
-<translation id="2562916301614567480">专用网</translation>
-<translation id="6549021752953852991">没有可用的蜂窝网络</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">嗨!显示器,咱们合不来。(系统不支持该显示器)</translation>
-<translation id="6426039856985689743">停用移动数据</translation>
-<translation id="3087734570205094154">底部</translation>
-<translation id="3742055079367172538">已完成屏幕截图</translation>
-<translation id="8878886163241303700">正在扩展屏幕</translation>
-<translation id="5271016907025319479">未配置 VPN。</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/>(蓝牙)</translation>
-<translation id="3967919079500697218">您的管理员已停用屏幕截图功能。</translation>
-<translation id="372094107052732682">连按两次 Ctrl+Shift+Q 即可退出。</translation>
-<translation id="6803622936009808957">找不到系统支持的分辨率,因此无法镜像显示屏。已改为进入扩展桌面。</translation>
-<translation id="1480041086352807611">演示模式</translation>
-<translation id="3626637461649818317">剩余电量:<ph name="PERCENTAGE"/>%</translation>
-<translation id="9089416786594320554">输入法</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">激活“<ph name="NAME"/>”需要连接网络。</translation>
-<translation id="3963445509666917109">扬声器(内部)</translation>
-<translation id="2825619548187458965">文件架</translation>
-<translation id="2614835198358683673">您的 Chromebook 在开启期间可能无法充电。建议您使用产品原装的充电器。</translation>
-<translation id="1895658205118569222">关闭</translation>
-<translation id="4430019312045809116">音量</translation>
-<translation id="8681498213689260554">重新启动并通过 Powerwash 来更新系统</translation>
-<translation id="4442424173763614572">DNS 查找失败</translation>
-<translation id="7874779702599364982">正在搜索蜂窝网络...</translation>
-<translation id="583281660410589416">未知</translation>
-<translation id="1383876407941801731">搜索</translation>
-<translation id="3901991538546252627">正在连接:<ph name="NAME"/></translation>
-<translation id="2204305834655267233">网络信息</translation>
-<translation id="1621499497873603021">电池电量将在 <ph name="TIME_LEFT"/>后耗尽</translation>
-<translation id="5980301590375426705">退出访客模式</translation>
-<translation id="8308637677604853869">上一菜单</translation>
-<translation id="4666297444214622512">无法登录到其他帐户。</translation>
-<translation id="3625258641415618104">已停用屏幕截图</translation>
-<translation id="1346748346194534595">向右</translation>
-<translation id="1773212559869067373">身份验证证书遭到本地拒绝</translation>
-<translation id="8528322925433439945">移动...</translation>
-<translation id="7049357003967926684">联盟</translation>
-<translation id="8428213095426709021">设置</translation>
-<translation id="2372145515558759244">正在同步应用...</translation>
-<translation id="7256405249507348194">无法识别的错误:<ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA 检查失败</translation>
-<translation id="8456362689280298700">电池充满还需 <ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="5787281376604286451">已启用语音反馈。
-按 Ctrl+Alt+Z 停用。</translation>
-<translation id="4479639480957787382">以太网</translation>
-<translation id="6312403991423642364">未知网络错误</translation>
-<translation id="1467432559032391204">向左</translation>
-<translation id="5543001071567407895">短信</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">正在激活“<ph name="NAME"/>”</translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">自动点击</translation>
-<translation id="1398853756734560583">最大化</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>:正在连接...</translation>
-<translation id="252373100621549798">未知展示广告</translation>
-<translation id="1882897271359938046">正在镜像到<ph name="DISPLAY_NAME"/></translation>
-<translation id="2727977024730340865">已插入低功率充电器;可能无法保证充电成功。</translation>
-<translation id="3784455785234192852">锁定</translation>
-<translation id="2805756323405976993">应用</translation>
-<translation id="1512064327686280138">激活失败</translation>
-<translation id="5097002363526479830">无法连接到网络“<ph name="NAME"/>”:<ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi 已关闭。</translation>
-<translation id="2966449113954629791">您的移动数据量可能已用完。请访问“<ph name="NAME"/>”激活门户网站,购买更多数据。</translation>
-<translation id="8132793192354020517">已连接到 <ph name="NAME"/></translation>
-<translation id="7052914147756339792">设置壁纸...</translation>
-<translation id="8678698760965522072">“在线”状态</translation>
-<translation id="2532589005999780174">高反差模式</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>,<ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">内部错误</translation>
-<translation id="3019353588588144572">电池电量将在 <ph name="TIME_REMAINING"/>后充满</translation>
-<translation id="3473479545200714844">屏幕放大镜</translation>
-<translation id="7005812687360380971">失败</translation>
-<translation id="882279321799040148">点击即可查看</translation>
-<translation id="1753067873202720523">您的 Chromebook 在处于打开状态时可能无法充电。</translation>
-<translation id="5045550434625856497">密码不正确</translation>
-<translation id="1602076796624386989">启用移动数据</translation>
-<translation id="6981982820502123353">辅助功能</translation>
-<translation id="3157931365184549694">恢复</translation>
-<translation id="4274292172790327596">未识别的错误</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">耳机</translation>
-<translation id="225680501294068881">正在查找设备...</translation>
-<translation id="5597451508971090205"><ph name="DATE"/><ph name="SHORT_WEEKDAY"/></translation>
-<translation id="737451040872859086">麦克风(内部)</translation>
-<translation id="4448844063988177157">正在搜索 Wi-Fi 网络...</translation>
-<translation id="8401662262483418323">无法连接到“<ph name="NAME"/>”:<ph name="DETAILS"/>
-服务器消息:<ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">出现错误</translation>
-<translation id="7229570126336867161">需要 EVDO</translation>
-<translation id="2999742336789313416">“<ph name="DISPLAY_NAME"/>”是由 <ph name="DOMAIN"/> 管理的公开会话</translation>
-<translation id="9044646465488564462">无法连接到网络:<ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">退出会话</translation>
-<translation id="8454013096329229812">Wi-Fi 已打开。</translation>
-<translation id="4872237917498892622">Alt + 搜索键或 Shift</translation>
-<translation id="9201131092683066720">电池电量为<ph name="PERCENTAGE"/>%。</translation>
-<translation id="2983818520079887040">设置...</translation>
-<translation id="3871838685472846647">蜂窝网络已激活</translation>
-<translation id="1195412055398077112">过扫描</translation>
-<translation id="112308213915226829">自动隐藏文件架</translation>
-<translation id="7573962313813535744">停靠模式</translation>
-<translation id="8927026611342028580">连接请求已发送</translation>
-<translation id="8300849813060516376">OTASP 失败</translation>
-<translation id="2792498699870441125">Alt + 搜索键</translation>
-<translation id="8660803626959853127">正在同步 <ph name="COUNT"/> 个文件</translation>
-<translation id="5958529069007801266">受监管用户</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">CAPS LOCK 已关闭</translation>
-<translation id="6248847161401822652">连按两次 Control+Shift+Q 即可退出。</translation>
-<translation id="6785414152754474415">电池电量为<ph name="PERCENTAGE"/>%(正在充电)。</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>:正在激活…</translation>
-<translation id="4895488851634969361">电池电量已满。</translation>
-<translation id="5947494881799873997">还原</translation>
-<translation id="7593891976182323525">搜索键或 Shift</translation>
-<translation id="7649070708921625228">帮助</translation>
-<translation id="747833637904845037">连接到外部显示器后,即使合上盖子,您的 Chromebook 仍会保持开启状态。</translation>
-<translation id="3050422059534974565">CAPS LOCK 已开启。
-按搜索键或 Shift 可取消。</translation>
-<translation id="397105322502079400">正在计算...</translation>
-<translation id="158849752021629804">需要家庭网络</translation>
-<translation id="6857811139397017780">激活 <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">DHCP 查找失败</translation>
-<translation id="6692173217867674490">密码错误</translation>
-<translation id="6165508094623778733">了解详情</translation>
-<translation id="9046895021617826162">连接失败</translation>
-<translation id="7168224885072002358"><ph name="TIMEOUT_SECONDS"/>秒后恢复到原分辨率</translation>
-<translation id="973896785707726617">该会话将在 <ph name="SESSION_TIME_REMAINING"/>后结束,到时您将自动退出。</translation>
-<translation id="8372369524088641025">WEP 密钥错误</translation>
-<translation id="6636709850131805001">未知状态</translation>
-<translation id="3573179567135747900">重新更改为“<ph name="FROM_LOCALE"/>”(需要重启)</translation>
-<translation id="8103386449138765447">短信数:<ph name="MESSAGE_COUNT"/> 条</translation>
-<translation id="5045002648206642691">Google 云端硬盘设置...</translation>
-<translation id="7209101170223508707">Caps Lock 已开启。
-按 Alt + 搜索键或 Shift 可取消。</translation>
-<translation id="8940956008527784070">电池电量不足 (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">接受</translation>
-<translation id="5102001756192215136">可用时长:<ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">输出</translation>
-<translation id="520760366042891468">通过环聊共享您屏幕的控制权。</translation>
-<translation id="8000066093800657092">未连接任何网络</translation>
-<translation id="4015692727874266537">登录其他帐户…</translation>
-<translation id="5941711191222866238">最小化</translation>
-<translation id="6911468394164995108">连接其他...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>:<ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">恭喜!“<ph name="NAME"/>”数据服务已激活,您可以开始使用了。</translation>
-<translation id="412065659894267608">还需要 <ph name="HOUR"/> 小时 <ph name="MINUTE"/> 分钟才能充满电</translation>
-<translation id="7297443947353982503">用户名/密码错误或 EAP 身份验证失败</translation>
-<translation id="6359806961507272919"><ph name="PHONE_NUMBER"/> 发来的短信</translation>
-<translation id="1244147615850840081">运营商</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/strings/ash_strings_zh-TW.xtb b/chromium/ash/strings/ash_strings_zh-TW.xtb
deleted file mode 100644
index b8fc18277f3..00000000000
--- a/chromium/ash/strings/ash_strings_zh-TW.xtb
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE translationbundle>
-<translationbundle lang="zh-TW">
-<translation id="3595596368722241419">電池已充滿</translation>
-<translation id="7814236020522506259"><ph name="HOUR"/> 小時 <ph name="MINUTE"/> 分鐘</translation>
-<translation id="7880025619322806991">入口網站狀態</translation>
-<translation id="30155388420722288">溢位按鈕</translation>
-<translation id="8673028979667498656">270 度</translation>
-<translation id="5571066253365925590">藍牙已啟用</translation>
-<translation id="6310121235600822547"><ph name="DISPLAY_NAME"/> 已旋轉到<ph name="ROTATION"/></translation>
-<translation id="9074739597929991885">藍牙</translation>
-<translation id="2268130516524549846">藍牙已停用</translation>
-<translation id="7165320105431587207">無法設定網路</translation>
-<translation id="3775358506042162758">多帳戶登入功能一次只能登入最多 3 個帳戶。</translation>
-<translation id="370649949373421643">啟用 Wi-Fi</translation>
-<translation id="3626281679859535460">亮度</translation>
-<translation id="3621202678540785336">輸入</translation>
-<translation id="595202126637698455">效能追蹤已啟用</translation>
-<translation id="8054466585765276473">正在計算電池使用時間。</translation>
-<translation id="7982789257301363584">網路</translation>
-<translation id="5565793151875479467">Proxy...</translation>
-<translation id="938582441709398163">鍵盤自訂快速鍵</translation>
-<translation id="4387004326333427325">遠端已拒絕驗證憑證</translation>
-<translation id="6979158407327259162">Google 雲端硬碟</translation>
-<translation id="3683428399328702079"><ph name="DISPLAY_NAME"/> 的解析度已變更為 <ph name="RESOLUTION"/></translation>
-<translation id="6943836128787782965">HTTP 擷取失敗</translation>
-<translation id="2297568595583585744">狀態匣</translation>
-<translation id="1661867754829461514">找不到 PIN</translation>
-<translation id="4508225577814909926"><ph name="NAME"/>:正在連線...</translation>
-<translation id="40400351611212369">網路啟用錯誤</translation>
-<translation id="4237016987259239829">網路連線錯誤</translation>
-<translation id="2946640296642327832">啟用藍牙</translation>
-<translation id="6459472438155181876">正在擴充 <ph name="DISPLAY_NAME"/> 畫面</translation>
-<translation id="8206859287963243715">手機</translation>
-<translation id="6596816719288285829">IP 位址</translation>
-<translation id="4508265954913339219">啟用失敗</translation>
-<translation id="3621712662352432595">音訊設定</translation>
-<translation id="1812696562331527143">您的輸入法已變更為 <ph name="INPUT_METHOD_ID"/>*(<ph name="BEGIN_LINK"/>第三方<ph name="END_LINK"/>)。
-按下 Shift + Alt 鍵即可切換。</translation>
-<translation id="2127372758936585790">低功率充電器</translation>
-<translation id="3846575436967432996">沒有可用的網路資訊</translation>
-<translation id="3026237328237090306">設定行動數據</translation>
-<translation id="5871632337994001636">管理裝置...</translation>
-<translation id="785750925697875037">查看行動帳戶</translation>
-<translation id="153454903766751181">正在初始化行動數據機...</translation>
-<translation id="4628814525959230255">透過 Hangouts 與 <ph name="HELPER_NAME"/> 分享螢幕控制權。</translation>
-<translation id="7864539943188674973">停用藍牙</translation>
-<translation id="939252827960237676">無法儲存螢幕擷取畫面</translation>
-<translation id="1969011864782743497"><ph name="DEVICE_NAME"/> (USB)</translation>
-<translation id="3126069444801937830">重新啟用即可更新</translation>
-<translation id="2268813581635650749">登出所有使用者</translation>
-<translation id="735745346212279324">已中斷 VPN 連線</translation>
-<translation id="7320906967354320621">閒置</translation>
-<translation id="15373452373711364">大型滑鼠游標</translation>
-<translation id="3294437725009624529">訪客</translation>
-<translation id="8190698733819146287">自訂語言與輸入法...</translation>
-<translation id="1279938420744323401"><ph name="DISPLAY_NAME"/> (<ph name="ANNOTATION"/>)</translation>
-<translation id="2942516765047364088">檔案櫃位置</translation>
-<translation id="8676770494376880701">已連接低功率充電器</translation>
-<translation id="7170041865419449892">超出範圍</translation>
-<translation id="4804818685124855865">中斷連線</translation>
-<translation id="2544853746127077729">網路已拒絕驗證憑證</translation>
-<translation id="5222676887888702881">登出</translation>
-<translation id="2391579633712104609">180 度</translation>
-<translation id="2688477613306174402">設定</translation>
-<translation id="1272079795634619415">停止</translation>
-<translation id="4957722034734105353">瞭解詳情...</translation>
-<translation id="2964193600955408481">停用 WiFi</translation>
-<translation id="4279490309300973883">鏡像</translation>
-<translation id="7973962044839454485">使用者名稱或密碼錯誤,導致 PPP 驗證失敗</translation>
-<translation id="2509468283778169019">大寫鍵已啟用</translation>
-<translation id="3892641579809465218">內部畫面</translation>
-<translation id="7823564328645135659">同步處理您的設定後,系統已將語言從「<ph name="FROM_LOCALE"/>」變更為「<ph name="TO_LOCALE"/>」。</translation>
-<translation id="3368922792935385530">已連線</translation>
-<translation id="8340999562596018839">互動朗讀</translation>
-<translation id="8654520615680304441">開啟 Wi-Fi...</translation>
-<translation id="8828714802988429505">90 度</translation>
-<translation id="5825747213122829519">您的輸入法已變更為 <ph name="INPUT_METHOD_ID"/>。
-按下 Shift + Alt 鍵即可切換。</translation>
-<translation id="2562916301614567480">私人網路</translation>
-<translation id="6549021752953852991">沒有可用的行動網路</translation>
-<translation id="2982222131142145681"><ph name="DEVICE_NAME"/> (HDMI)</translation>
-<translation id="4379753398862151997">Dear Monitor, it's not working out between us. (系統無法支援該顯示器)</translation>
-<translation id="6426039856985689743">停用行動數據</translation>
-<translation id="3087734570205094154">置底</translation>
-<translation id="3742055079367172538">已拍攝螢幕擷取畫面</translation>
-<translation id="8878886163241303700">延伸螢幕</translation>
-<translation id="5271016907025319479">尚未設定 VPN。</translation>
-<translation id="3105990244222795498"><ph name="DEVICE_NAME"/> (藍牙)</translation>
-<translation id="3967919079500697218">您的管理員已停用拍攝螢幕擷取畫面功能。</translation>
-<translation id="372094107052732682">按兩下 Ctrl+Shift+Q 鍵即可結束。</translation>
-<translation id="6803622936009808957">找不到系統支援的解析度,因此無法顯示鏡像。已改為進入延伸桌面。</translation>
-<translation id="1480041086352807611">示範模式</translation>
-<translation id="3626637461649818317">剩餘電量:<ph name="PERCENTAGE"/>%</translation>
-<translation id="9089416786594320554">輸入法</translation>
-<translation id="6247708409970142803"><ph name="PERCENTAGE"/>%</translation>
-<translation id="2670531586141364277">必須連上網路才能啟用「<ph name="NAME"/>」。</translation>
-<translation id="3963445509666917109">喇叭 (內部)</translation>
-<translation id="2825619548187458965">檔案櫃</translation>
-<translation id="2614835198358683673">您的 Chromebook 可能無法在開機時充電。建議您使用官方提供的充電器。</translation>
-<translation id="1895658205118569222">關閉</translation>
-<translation id="4430019312045809116">音量</translation>
-<translation id="8681498213689260554">重新啟動並恢復原廠設定以進行更新</translation>
-<translation id="4442424173763614572">DNS 查詢失敗</translation>
-<translation id="7874779702599364982">正在搜尋行動網路...</translation>
-<translation id="583281660410589416">不明</translation>
-<translation id="1383876407941801731">搜尋</translation>
-<translation id="3901991538546252627">正在連線至:<ph name="NAME"/></translation>
-<translation id="2204305834655267233">網路資訊</translation>
-<translation id="1621499497873603021">電池剩餘使用時間:<ph name="TIME_LEFT"/></translation>
-<translation id="5980301590375426705">結束訪客工作階段</translation>
-<translation id="8308637677604853869">前一個選單</translation>
-<translation id="4666297444214622512">無法登入其他帳戶。</translation>
-<translation id="3625258641415618104">已停用螢幕擷取畫面</translation>
-<translation id="1346748346194534595">向右</translation>
-<translation id="1773212559869067373">本機已拒絕驗證憑證</translation>
-<translation id="8528322925433439945">行動服務 ...</translation>
-<translation id="7049357003967926684">關聯</translation>
-<translation id="8428213095426709021">設定</translation>
-<translation id="2372145515558759244">正在同步處理應用程式...</translation>
-<translation id="7256405249507348194">無法辨識的錯誤:<ph name="DESC"/></translation>
-<translation id="7925247922861151263">AAA 檢查失敗</translation>
-<translation id="8456362689280298700">完成充電尚需 <ph name="HOUR"/> 小時 <ph name="MINUTE"/> 分鐘</translation>
-<translation id="5787281376604286451">互動朗讀功能已啟用。
-按下 Ctrl+Alt+Z 鍵即可停用。</translation>
-<translation id="4479639480957787382">乙太網路</translation>
-<translation id="6312403991423642364">不明的網路錯誤</translation>
-<translation id="1467432559032391204">向左</translation>
-<translation id="5543001071567407895">簡訊</translation>
-<translation id="1957803754585243749">0°</translation>
-<translation id="2354174487190027830">正在啟用 <ph name="NAME"/></translation>
-<translation id="8814190375133053267">Wi-Fi</translation>
-<translation id="1923539912171292317">自動點擊</translation>
-<translation id="1398853756734560583">放到最大</translation>
-<translation id="2692809339924654275"><ph name="BLUETOOTH"/>:正在連線...</translation>
-<translation id="252373100621549798">顯示器不明</translation>
-<translation id="1882897271359938046">正在建立 <ph name="DISPLAY_NAME"/> 鏡像</translation>
-<translation id="2727977024730340865">使用低功率充電器,可能導致充電狀態不穩定。</translation>
-<translation id="3784455785234192852">鎖定</translation>
-<translation id="2805756323405976993">應用程式</translation>
-<translation id="1512064327686280138">啟用失敗</translation>
-<translation id="5097002363526479830">無法連線至「<ph name="NAME"/>」:<ph name="DETAILS"/></translation>
-<translation id="1850504506766569011">Wi-Fi 已關閉。</translation>
-<translation id="2966449113954629791">您可能已用盡行動數據配額。造訪 <ph name="NAME"/> 啟用入口網站即可購買更多數據量。</translation>
-<translation id="8132793192354020517">已連線至 <ph name="NAME"/></translation>
-<translation id="7052914147756339792">設定桌布...</translation>
-<translation id="8678698760965522072">線上狀態</translation>
-<translation id="2532589005999780174">高反差模式</translation>
-<translation id="511445211639755999"><ph name="RESOLUTION"/>,<ph name="OVERSCAN"/></translation>
-<translation id="1119447706177454957">內部錯誤</translation>
-<translation id="3019353588588144572">電池剩餘充電時間:<ph name="TIME_REMAINING"/></translation>
-<translation id="3473479545200714844">畫面放大鏡</translation>
-<translation id="7005812687360380971">失敗</translation>
-<translation id="882279321799040148">按這裡瀏覽</translation>
-<translation id="1753067873202720523">您的 Chromebook 可能無法在開啟時充電。</translation>
-<translation id="5045550434625856497">密碼不正確</translation>
-<translation id="1602076796624386989">啟用行動數據</translation>
-<translation id="6981982820502123353">協助工具</translation>
-<translation id="3157931365184549694">還原</translation>
-<translation id="4274292172790327596">不明錯誤</translation>
-<translation id="4032485810211612751"><ph name="HOURS"/>:<ph name="MINUTES"/>:<ph name="SECONDS"/></translation>
-<translation id="5977415296283489383">耳機</translation>
-<translation id="225680501294068881">正在掃描裝置...</translation>
-<translation id="5597451508971090205"><ph name="DATE"/><ph name="SHORT_WEEKDAY"/></translation>
-<translation id="737451040872859086">麥克風 (內部)</translation>
-<translation id="4448844063988177157">正在搜尋 Wi-Fi 網路...</translation>
-<translation id="8401662262483418323">無法連線至「<ph name="NAME"/>」:<ph name="DETAILS"/>
-伺服器訊息:<ph name="SERVER_MSG"/></translation>
-<translation id="2475982808118771221">發生錯誤</translation>
-<translation id="7229570126336867161">需要 EVDO</translation>
-<translation id="2999742336789313416"><ph name="DISPLAY_NAME"/> 是受 <ph name="DOMAIN"/> 管理的公開工作階段</translation>
-<translation id="9044646465488564462">無法連線至網路:<ph name="DETAILS"/></translation>
-<translation id="7029814467594812963">結束工作階段</translation>
-<translation id="8454013096329229812">Wi-Fi 已開啟。</translation>
-<translation id="4872237917498892622">Alt + 搜尋鍵或 Shift 鍵</translation>
-<translation id="9201131092683066720">電池電量為 <ph name="PERCENTAGE"/>%。</translation>
-<translation id="2983818520079887040">設定...</translation>
-<translation id="3871838685472846647">行動網路已啟用</translation>
-<translation id="1195412055398077112">遮視區域</translation>
-<translation id="112308213915226829">自動隱藏檔案櫃</translation>
-<translation id="7573962313813535744">停駐模式</translation>
-<translation id="8927026611342028580">已要求連線</translation>
-<translation id="8300849813060516376">OTASP 失敗</translation>
-<translation id="2792498699870441125">Alt + 搜尋鍵</translation>
-<translation id="8660803626959853127">正在同步處理 <ph name="COUNT"/> 個檔案</translation>
-<translation id="5958529069007801266">受監管的使用者</translation>
-<translation id="3709443003275901162">9+</translation>
-<translation id="639644700271529076">大寫鍵已關閉</translation>
-<translation id="6248847161401822652">按兩下 Control、Shift 和 Q 鍵即可結束。</translation>
-<translation id="6785414152754474415">電池電量為 <ph name="PERCENTAGE"/>% (充電中)。</translation>
-<translation id="6267036997247669271"><ph name="NAME"/>:正在啟用...</translation>
-<translation id="4895488851634969361">電池電量已滿。</translation>
-<translation id="5947494881799873997">還原</translation>
-<translation id="7593891976182323525">搜尋鍵或 Shift 鍵</translation>
-<translation id="7649070708921625228">說明</translation>
-<translation id="747833637904845037">連接外部顯示器之後,Chromebook 將會保持開啟 (即使將上蓋闔上)。</translation>
-<translation id="3050422059534974565">大寫鍵已啟用。
-按下搜尋鍵或 Shift 鍵即可取消。</translation>
-<translation id="397105322502079400">計算中…</translation>
-<translation id="158849752021629804">需要家用網路</translation>
-<translation id="6857811139397017780">啟用 <ph name="NETWORKSERVICE"/></translation>
-<translation id="5864471791310927901">DHCP 查閱失敗</translation>
-<translation id="6692173217867674490">通關密語有誤</translation>
-<translation id="6165508094623778733">瞭解詳情</translation>
-<translation id="9046895021617826162">連線失敗</translation>
-<translation id="7168224885072002358">系統將在 <ph name="TIMEOUT_SECONDS"/> 秒後還原成原來的解析度</translation>
-<translation id="973896785707726617">這個工作階段將在 <ph name="SESSION_TIME_REMAINING"/>後結束,系統會自動將您登出。</translation>
-<translation id="8372369524088641025">WEP 金鑰有誤</translation>
-<translation id="6636709850131805001">不明狀態</translation>
-<translation id="3573179567135747900">改回「<ph name="FROM_LOCALE"/>」(需要重新啟動)</translation>
-<translation id="8103386449138765447">簡訊數:<ph name="MESSAGE_COUNT"/></translation>
-<translation id="5045002648206642691">Google 雲端硬碟設定...</translation>
-<translation id="7209101170223508707">大寫鍵已啟用。
-按下 Alt + 搜尋鍵或 Shift 鍵即可取消。</translation>
-<translation id="8940956008527784070">電池電量不足 (<ph name="PERCENTAGE"/>%)</translation>
-<translation id="4918086044614829423">接受</translation>
-<translation id="5102001756192215136">電量剩餘時間:<ph name="HOUR"/>:<ph name="MINUTE"/></translation>
-<translation id="3009178788565917040">輸出</translation>
-<translation id="520760366042891468">透過 Hangouts 分享螢幕控制權。</translation>
-<translation id="8000066093800657092">沒有網路</translation>
-<translation id="4015692727874266537">使用其他帳戶登入...</translation>
-<translation id="5941711191222866238">縮到最小</translation>
-<translation id="6911468394164995108">加入其他網路...</translation>
-<translation id="3678715477168044796"><ph name="DISPLAY_NAME"/>:<ph name="ANNOTATION"/></translation>
-<translation id="2563856802393254086">恭喜您!您的「<ph name="NAME"/>」數據服務已啟用,隨時可供使用。</translation>
-<translation id="412065659894267608">尚需 <ph name="HOUR"/> 小時 <ph name="MINUTE"/> 分鐘才能充滿電</translation>
-<translation id="7297443947353982503">使用者名稱/密碼錯誤或 EAP 驗證失敗</translation>
-<translation id="6359806961507272919">來自 <ph name="PHONE_NUMBER"/> 的簡訊</translation>
-<translation id="1244147615850840081">通訊業者</translation>
-</translationbundle> \ No newline at end of file
diff --git a/chromium/ash/system/DEPS b/chromium/ash/system/DEPS
deleted file mode 100644
index abf5b5f48c4..00000000000
--- a/chromium/ash/system/DEPS
+++ /dev/null
@@ -1,3 +0,0 @@
-include_rules = [
- "-chromeos",
-]
diff --git a/chromium/ash/system/OWNERS b/chromium/ash/system/OWNERS
deleted file mode 100644
index de76ad8ce46..00000000000
--- a/chromium/ash/system/OWNERS
+++ /dev/null
@@ -1,3 +0,0 @@
-sadrul@chromium.org
-stevenjb@chromium.org
-jennyz@chromium.org
diff --git a/chromium/ash/system/bluetooth/bluetooth_observer.h b/chromium/ash/system/bluetooth/bluetooth_observer.h
deleted file mode 100644
index 1c1bf4fa4d0..00000000000
--- a/chromium/ash/system/bluetooth/bluetooth_observer.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_BLUETOOTH_BLUETOOTH_OBSERVER_H_
-#define ASH_SYSTEM_BLUETOOTH_BLUETOOTH_OBSERVER_H_
-
-namespace ash {
-
-class BluetoothObserver {
- public:
- virtual ~BluetoothObserver() {}
-
- virtual void OnBluetoothRefresh() = 0;
- virtual void OnBluetoothDiscoveringChanged() = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_BLUETOOTH_BLUETOOTH_OBSERVER_H_
diff --git a/chromium/ash/system/bluetooth/tray_bluetooth.cc b/chromium/ash/system/bluetooth/tray_bluetooth.cc
deleted file mode 100644
index 9114118df83..00000000000
--- a/chromium/ash/system/bluetooth/tray_bluetooth.cc
+++ /dev/null
@@ -1,469 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/bluetooth/tray_bluetooth.h"
-
-#include "ash/shell.h"
-#include "ash/system/tray/fixed_sized_scroll_view.h"
-#include "ash/system/tray/hover_highlight_view.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/throbber_view.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_details_view.h"
-#include "ash/system/tray/tray_item_more.h"
-#include "ash/system/tray/tray_popup_header_button.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-
-namespace {
-
-// Updates bluetooth device |device| in the |list|. If it is new, append to the
-// end of the |list|; otherwise, keep it at the same place, but update the data
-// with new device info provided by |device|.
-void UpdateBluetoothDeviceList(BluetoothDeviceList* list,
- const BluetoothDeviceInfo& device) {
- for (BluetoothDeviceList::iterator it = list->begin(); it != list->end();
- ++it) {
- if ((*it).address == device.address) {
- *it = device;
- return;
- }
- }
-
- list->push_back(device);
-}
-
-// Removes the obsolete BluetoothDevices from |list|, if they are not in the
-// |new_list|.
-void RemoveObsoleteBluetoothDevicesFromList(
- BluetoothDeviceList* list,
- const std::set<std::string>& new_list) {
- for (BluetoothDeviceList::iterator it = list->begin(); it != list->end();
- ++it) {
- if (new_list.find((*it).address) == new_list.end()) {
- it = list->erase(it);
- if (it == list->end())
- return;
- }
- }
-}
-
-} // namespace
-
-class BluetoothDefaultView : public TrayItemMore {
- public:
- BluetoothDefaultView(SystemTrayItem* owner, bool show_more)
- : TrayItemMore(owner, show_more) {
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_BLUETOOTH).ToImageSkia());
- UpdateLabel();
- }
-
- virtual ~BluetoothDefaultView() {}
-
- void UpdateLabel() {
- ash::SystemTrayDelegate* delegate =
- ash::Shell::GetInstance()->system_tray_delegate();
- if (delegate->GetBluetoothAvailable()) {
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- const base::string16 label =
- rb.GetLocalizedString(delegate->GetBluetoothEnabled() ?
- IDS_ASH_STATUS_TRAY_BLUETOOTH_ENABLED :
- IDS_ASH_STATUS_TRAY_BLUETOOTH_DISABLED);
- SetLabel(label);
- SetAccessibleName(label);
- SetVisible(true);
- } else {
- SetVisible(false);
- }
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BluetoothDefaultView);
-};
-
-class BluetoothDetailedView : public TrayDetailsView,
- public ViewClickListener,
- public views::ButtonListener {
- public:
- BluetoothDetailedView(SystemTrayItem* owner, user::LoginStatus login)
- : TrayDetailsView(owner),
- login_(login),
- manage_devices_(NULL),
- toggle_bluetooth_(NULL),
- enable_bluetooth_(NULL),
- bluetooth_discovering_(false) {
- CreateItems();
- Update();
- }
-
- virtual ~BluetoothDetailedView() {
- // Stop discovering bluetooth devices when exiting BT detailed view.
- BluetoothStopDiscovering();
- }
-
- void Update() {
- BluetoothStartDiscovering();
- UpdateBlueToothDeviceList();
-
- // Update UI.
- UpdateDeviceScrollList();
- UpdateHeaderEntry();
- Layout();
- }
-
- private:
- void CreateItems() {
- CreateScrollableList();
- AppendSettingsEntries();
- AppendHeaderEntry();
- }
-
- void BluetoothStartDiscovering() {
- ash::SystemTrayDelegate* delegate =
- ash::Shell::GetInstance()->system_tray_delegate();
- bool bluetooth_enabled = delegate->GetBluetoothEnabled();
- if (!bluetooth_discovering_ && bluetooth_enabled) {
- bluetooth_discovering_ = true;
- delegate->BluetoothStartDiscovering();
- throbber_->Start();
- } else if(!bluetooth_enabled) {
- bluetooth_discovering_ = false;
- throbber_->Stop();
- }
- }
-
- void BluetoothStopDiscovering() {
- ash::SystemTrayDelegate* delegate =
- ash::Shell::GetInstance()->system_tray_delegate();
- if (delegate && bluetooth_discovering_) {
- bluetooth_discovering_ = false;
- delegate->BluetoothStopDiscovering();
- throbber_->Stop();
- }
- }
-
- void UpdateBlueToothDeviceList() {
- std::set<std::string> new_connecting_devices;
- std::set<std::string> new_connected_devices;
- std::set<std::string> new_paired_not_connected_devices;
- std::set<std::string> new_discovered_not_paired_devices;
-
- BluetoothDeviceList list;
- Shell::GetInstance()->system_tray_delegate()->
- GetAvailableBluetoothDevices(&list);
- for (size_t i = 0; i < list.size(); ++i) {
- if (list[i].connecting) {
- list[i].display_name = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_BLUETOOTH_CONNECTING, list[i].display_name);
- new_connecting_devices.insert(list[i].address);
- UpdateBluetoothDeviceList(&connecting_devices_, list[i]);
- } else if (list[i].connected && list[i].paired) {
- new_connected_devices.insert(list[i].address);
- UpdateBluetoothDeviceList(&connected_devices_, list[i]);
- } else if (list[i].paired) {
- new_paired_not_connected_devices.insert(list[i].address);
- UpdateBluetoothDeviceList(&paired_not_connected_devices_, list[i]);
- } else {
- new_discovered_not_paired_devices.insert(list[i].address);
- UpdateBluetoothDeviceList(&discovered_not_paired_devices_, list[i]);
- }
- }
- RemoveObsoleteBluetoothDevicesFromList(&connecting_devices_,
- new_connecting_devices);
- RemoveObsoleteBluetoothDevicesFromList(&connected_devices_,
- new_connected_devices);
- RemoveObsoleteBluetoothDevicesFromList(&paired_not_connected_devices_,
- new_paired_not_connected_devices);
- RemoveObsoleteBluetoothDevicesFromList(&discovered_not_paired_devices_,
- new_discovered_not_paired_devices);
- }
-
- void AppendHeaderEntry() {
- CreateSpecialRow(IDS_ASH_STATUS_TRAY_BLUETOOTH, this);
-
- if (login_ == user::LOGGED_IN_LOCKED)
- return;
-
- throbber_ = new ThrobberView;
- throbber_->SetTooltipText(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_BLUETOOTH_DISCOVERING));
- footer()->AddThrobber(throbber_);
-
- // Do not allow toggling bluetooth in the lock screen.
- ash::SystemTrayDelegate* delegate =
- ash::Shell::GetInstance()->system_tray_delegate();
- toggle_bluetooth_ = new TrayPopupHeaderButton(this,
- IDR_AURA_UBER_TRAY_BLUETOOTH_ENABLED,
- IDR_AURA_UBER_TRAY_BLUETOOTH_DISABLED,
- IDR_AURA_UBER_TRAY_BLUETOOTH_ENABLED_HOVER,
- IDR_AURA_UBER_TRAY_BLUETOOTH_DISABLED_HOVER,
- IDS_ASH_STATUS_TRAY_BLUETOOTH);
- toggle_bluetooth_->SetToggled(!delegate->GetBluetoothEnabled());
- toggle_bluetooth_->SetTooltipText(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DISABLE_BLUETOOTH));
- toggle_bluetooth_->SetToggledTooltipText(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ENABLE_BLUETOOTH));
- footer()->AddButton(toggle_bluetooth_);
- }
-
- void UpdateHeaderEntry() {
- if (toggle_bluetooth_) {
- toggle_bluetooth_->SetToggled(
- !ash::Shell::GetInstance()->system_tray_delegate()->
- GetBluetoothEnabled());
- }
- }
-
- void UpdateDeviceScrollList() {
- device_map_.clear();
- scroll_content()->RemoveAllChildViews(true);
- enable_bluetooth_ = NULL;
-
- ash::SystemTrayDelegate* delegate =
- ash::Shell::GetInstance()->system_tray_delegate();
- bool bluetooth_enabled = delegate->GetBluetoothEnabled();
- bool blueooth_available = delegate->GetBluetoothAvailable();
- if (blueooth_available && !bluetooth_enabled &&
- toggle_bluetooth_) {
- enable_bluetooth_ =
- AddScrollListItem(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ENABLE_BLUETOOTH),
- gfx::Font::NORMAL, false, true);
- }
-
- AppendSameTypeDevicesToScrollList(
- connected_devices_, true, true, bluetooth_enabled);
- AppendSameTypeDevicesToScrollList(
- connecting_devices_, true, false, bluetooth_enabled);
- AppendSameTypeDevicesToScrollList(
- paired_not_connected_devices_, false, false, bluetooth_enabled);
- if (discovered_not_paired_devices_.size() > 0)
- AddScrollSeparator();
- AppendSameTypeDevicesToScrollList(
- discovered_not_paired_devices_, false, false, bluetooth_enabled);
-
- // Show user Bluetooth state if there is no bluetooth devices in list.
- if (device_map_.size() == 0) {
- if (blueooth_available && bluetooth_enabled) {
- AddScrollListItem(
- l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_BLUETOOTH_DISCOVERING),
- gfx::Font::NORMAL, false, true);
- }
- }
-
- scroll_content()->SizeToPreferredSize();
- static_cast<views::View*>(scroller())->Layout();
- }
-
- void AppendSameTypeDevicesToScrollList(const BluetoothDeviceList& list,
- bool bold,
- bool checked,
- bool enabled) {
- for (size_t i = 0; i < list.size(); ++i) {
- HoverHighlightView* container = AddScrollListItem(
- list[i].display_name,
- bold? gfx::Font::BOLD : gfx::Font::NORMAL,
- checked, enabled);
- device_map_[container] = list[i].address;
- }
- }
-
- HoverHighlightView* AddScrollListItem(const base::string16& text,
- gfx::Font::FontStyle style,
- bool checked,
- bool enabled) {
- HoverHighlightView* container = new HoverHighlightView(this);
- views::Label* label = container->AddCheckableLabel(text, style, checked);
- label->SetEnabled(enabled);
- scroll_content()->AddChildView(container);
- return container;
- }
-
- // Add settings entries.
- void AppendSettingsEntries() {
- // Add bluetooth device requires a browser window, hide it for non logged in
- // user.
- if (login_ == user::LOGGED_IN_NONE ||
- login_ == user::LOGGED_IN_LOCKED)
- return;
-
- ash::SystemTrayDelegate* delegate =
- ash::Shell::GetInstance()->system_tray_delegate();
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- HoverHighlightView* container = new HoverHighlightView(this);
- container->AddLabel(
- rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BLUETOOTH_MANAGE_DEVICES),
- gfx::Font::NORMAL);
- container->SetEnabled(delegate->GetBluetoothAvailable());
- AddChildView(container);
- manage_devices_ = container;
- }
-
- // Returns true if the device with |device_id| is found in |device_list|,
- // and the display_name of the device will be returned in |display_name| if
- // it's not NULL.
- bool FoundDevice(const std::string& device_id,
- const BluetoothDeviceList& device_list,
- base::string16* display_name) {
- for (size_t i = 0; i < device_list.size(); ++i) {
- if (device_list[i].address == device_id) {
- if (display_name)
- *display_name = device_list[i].display_name;
- return true;
- }
- }
- return false;
- }
-
- // Updates UI of the clicked bluetooth device to show it is being connected
- // or disconnected if such an operation is going to be performed underway.
- void UpdateClickedDevice(std::string device_id, views::View* item_container) {
- base::string16 display_name;
- if (FoundDevice(device_id, paired_not_connected_devices_,
- &display_name)) {
- display_name = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_BLUETOOTH_CONNECTING, display_name);
-
- item_container->RemoveAllChildViews(true);
- static_cast<HoverHighlightView*>(item_container)->
- AddCheckableLabel(display_name, gfx::Font::BOLD, false);
- scroll_content()->SizeToPreferredSize();
- static_cast<views::View*>(scroller())->Layout();
- }
- }
-
- // Overridden from ViewClickListener.
- virtual void OnViewClicked(views::View* sender) OVERRIDE {
- ash::SystemTrayDelegate* delegate =
- ash::Shell::GetInstance()->system_tray_delegate();
- if (sender == footer()->content()) {
- TransitionToDefaultView();
- } else if (sender == manage_devices_) {
- delegate->ManageBluetoothDevices();
- } else if (sender == enable_bluetooth_) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- delegate->GetBluetoothEnabled() ?
- ash::UMA_STATUS_AREA_BLUETOOTH_DISABLED :
- ash::UMA_STATUS_AREA_BLUETOOTH_ENABLED);
- delegate->ToggleBluetooth();
- } else {
- if (!delegate->GetBluetoothEnabled())
- return;
- std::map<views::View*, std::string>::iterator find;
- find = device_map_.find(sender);
- if (find == device_map_.end())
- return;
- std::string device_id = find->second;
- if (FoundDevice(device_id, connecting_devices_, NULL))
- return;
- UpdateClickedDevice(device_id, sender);
- delegate->ConnectToBluetoothDevice(device_id);
- }
- }
-
- // Overridden from ButtonListener.
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE {
- ash::SystemTrayDelegate* delegate =
- ash::Shell::GetInstance()->system_tray_delegate();
- if (sender == toggle_bluetooth_)
- delegate->ToggleBluetooth();
- else
- NOTREACHED();
- }
-
- user::LoginStatus login_;
-
- std::map<views::View*, std::string> device_map_;
- views::View* manage_devices_;
- ThrobberView* throbber_;
- TrayPopupHeaderButton* toggle_bluetooth_;
- HoverHighlightView* enable_bluetooth_;
- BluetoothDeviceList connected_devices_;
- BluetoothDeviceList connecting_devices_;
- BluetoothDeviceList paired_not_connected_devices_;
- BluetoothDeviceList discovered_not_paired_devices_;
- bool bluetooth_discovering_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothDetailedView);
-};
-
-} // namespace tray
-
-TrayBluetooth::TrayBluetooth(SystemTray* system_tray)
- : SystemTrayItem(system_tray),
- default_(NULL),
- detailed_(NULL) {
- Shell::GetInstance()->system_tray_notifier()->AddBluetoothObserver(this);
-}
-
-TrayBluetooth::~TrayBluetooth() {
- Shell::GetInstance()->system_tray_notifier()->RemoveBluetoothObserver(this);
-}
-
-views::View* TrayBluetooth::CreateTrayView(user::LoginStatus status) {
- return NULL;
-}
-
-views::View* TrayBluetooth::CreateDefaultView(user::LoginStatus status) {
- CHECK(default_ == NULL);
- default_ = new tray::BluetoothDefaultView(
- this, status != user::LOGGED_IN_LOCKED);
- return default_;
-}
-
-views::View* TrayBluetooth::CreateDetailedView(user::LoginStatus status) {
- if (!Shell::GetInstance()->system_tray_delegate()->GetBluetoothAvailable())
- return NULL;
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_DETAILED_BLUETOOTH_VIEW);
- CHECK(detailed_ == NULL);
- detailed_ = new tray::BluetoothDetailedView(this, status);
- return detailed_;
-}
-
-void TrayBluetooth::DestroyTrayView() {
-}
-
-void TrayBluetooth::DestroyDefaultView() {
- default_ = NULL;
-}
-
-void TrayBluetooth::DestroyDetailedView() {
- detailed_ = NULL;
-}
-
-void TrayBluetooth::UpdateAfterLoginStatusChange(user::LoginStatus status) {
-}
-
-void TrayBluetooth::OnBluetoothRefresh() {
- if (default_)
- default_->UpdateLabel();
- else if (detailed_)
- detailed_->Update();
-}
-
-void TrayBluetooth::OnBluetoothDiscoveringChanged() {
- if (!detailed_)
- return;
- detailed_->Update();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/bluetooth/tray_bluetooth.h b/chromium/ash/system/bluetooth/tray_bluetooth.h
deleted file mode 100644
index 2e452c643d9..00000000000
--- a/chromium/ash/system/bluetooth/tray_bluetooth.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_BLUETOOTH_TRAY_BLUETOOTH_H_
-#define ASH_SYSTEM_BLUETOOTH_TRAY_BLUETOOTH_H_
-
-#include "ash/system/bluetooth/bluetooth_observer.h"
-#include "ash/system/tray/system_tray_item.h"
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-class BluetoothDefaultView;
-class BluetoothDetailedView;
-}
-
-class TrayBluetooth : public SystemTrayItem,
- public BluetoothObserver {
- public:
- explicit TrayBluetooth(SystemTray* system_tray);
- virtual ~TrayBluetooth();
-
- private:
- // Overridden from SystemTrayItem.
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyTrayView() OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
- virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
-
- // Overridden from BluetoothObserver.
- virtual void OnBluetoothRefresh() OVERRIDE;
- virtual void OnBluetoothDiscoveringChanged() OVERRIDE;
-
- tray::BluetoothDefaultView* default_;
- tray::BluetoothDetailedView* detailed_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayBluetooth);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_BLUETOOTH_TRAY_BLUETOOTH_H_
diff --git a/chromium/ash/system/brightness_control_delegate.h b/chromium/ash/system/brightness_control_delegate.h
deleted file mode 100644
index 55791ac6bb6..00000000000
--- a/chromium/ash/system/brightness_control_delegate.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_BRIGHTNESS_CONTROL_DELEGATE_H_
-#define ASH_SYSTEM_BRIGHTNESS_CONTROL_DELEGATE_H_
-
-#include "base/callback.h"
-
-namespace ui {
-class Accelerator;
-} // namespace ui
-
-namespace ash {
-
-// Delegate for controlling the brightness.
-class BrightnessControlDelegate {
- public:
- virtual ~BrightnessControlDelegate() {}
-
- // Handles an accelerator-driven request to decrease or increase the screen
- // brightness.
- virtual bool HandleBrightnessDown(const ui::Accelerator& accelerator) = 0;
- virtual bool HandleBrightnessUp(const ui::Accelerator& accelerator) = 0;
-
- // Requests that the brightness be set to |percent|, in the range
- // [0.0, 100.0]. |gradual| specifies whether the transition to the new
- // brightness should be animated or instantaneous.
- virtual void SetBrightnessPercent(double percent, bool gradual) = 0;
-
- // Asynchronously invokes |callback| with the current brightness, in the range
- // [0.0, 100.0].
- virtual void GetBrightnessPercent(
- const base::Callback<void(double)>& callback) = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_BRIGHTNESS_CONTROL_DELEGATE_H_
diff --git a/chromium/ash/system/chromeos/DEPS b/chromium/ash/system/chromeos/DEPS
deleted file mode 100644
index 79b8e8ba13b..00000000000
--- a/chromium/ash/system/chromeos/DEPS
+++ /dev/null
@@ -1,3 +0,0 @@
-include_rules = [
- "+chromeos",
-]
diff --git a/chromium/ash/system/chromeos/audio/tray_audio.cc b/chromium/ash/system/chromeos/audio/tray_audio.cc
deleted file mode 100644
index 7d26fc6b9e9..00000000000
--- a/chromium/ash/system/chromeos/audio/tray_audio.cc
+++ /dev/null
@@ -1,660 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/audio/tray_audio.h"
-
-#include <cmath>
-
-#include "ash/ash_constants.h"
-#include "ash/ash_switches.h"
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
-#include "ash/system/tray/actionable_view.h"
-#include "ash/system/tray/fixed_sized_scroll_view.h"
-#include "ash/system/tray/hover_highlight_view.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/volume_control_delegate.h"
-#include "base/strings/utf_string_conversions.h"
-#include "chromeos/audio/cras_audio_handler.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "third_party/skia/include/core/SkCanvas.h"
-#include "third_party/skia/include/core/SkPaint.h"
-#include "third_party/skia/include/core/SkRect.h"
-#include "third_party/skia/include/effects/SkGradientShader.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/image/image.h"
-#include "ui/gfx/image/image_skia_operations.h"
-#include "ui/views/controls/button/image_button.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/controls/slider.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/view.h"
-
-using chromeos::CrasAudioHandler;
-
-namespace ash {
-namespace internal {
-
-namespace {
-const int kVolumeImageWidth = 25;
-const int kVolumeImageHeight = 25;
-const int kBarSeparatorWidth = 25;
-const int kBarSeparatorHeight = 30;
-const int kSliderRightPaddingToVolumeViewEdge = 17;
-const int kExtraPaddingBetweenBarAndMore = 10;
-
-const int kNoAudioDeviceIcon = -1;
-
-// IDR_AURA_UBER_TRAY_VOLUME_LEVELS contains 5 images,
-// The one for mute is at the 0 index and the other
-// four are used for ascending volume levels.
-const int kVolumeLevels = 4;
-
-bool IsAudioMuted() {
- return CrasAudioHandler::Get()->IsOutputMuted();
-}
-
-float GetVolumeLevel() {
- return CrasAudioHandler::Get()->GetOutputVolumePercent() / 100.0f;
-}
-
-int GetAudioDeviceIconId(chromeos::AudioDeviceType type) {
- if (type == chromeos::AUDIO_TYPE_HEADPHONE)
- return IDR_AURA_UBER_TRAY_AUDIO_HEADPHONE;
- else if (type == chromeos::AUDIO_TYPE_USB)
- return IDR_AURA_UBER_TRAY_AUDIO_USB;
- else if (type == chromeos::AUDIO_TYPE_BLUETOOTH)
- return IDR_AURA_UBER_TRAY_AUDIO_BLUETOOTH;
- else if (type == chromeos::AUDIO_TYPE_HDMI)
- return IDR_AURA_UBER_TRAY_AUDIO_HDMI;
- else
- return kNoAudioDeviceIcon;
-}
-
-base::string16 GetAudioDeviceName(const chromeos::AudioDevice& device) {
- switch(device.type) {
- case chromeos::AUDIO_TYPE_HEADPHONE:
- return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_AUDIO_HEADPHONE);
- case chromeos::AUDIO_TYPE_INTERNAL_SPEAKER:
- return l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_AUDIO_INTERNAL_SPEAKER);
- case chromeos::AUDIO_TYPE_INTERNAL_MIC:
- return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_AUDIO_INTERNAL_MIC);
- case chromeos::AUDIO_TYPE_USB:
- return l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_AUDIO_USB_DEVICE,
- UTF8ToUTF16(device.display_name));
- case chromeos::AUDIO_TYPE_BLUETOOTH:
- return l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_AUDIO_BLUETOOTH_DEVICE,
- UTF8ToUTF16(device.display_name));
- case chromeos::AUDIO_TYPE_HDMI:
- return l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_AUDIO_HDMI_DEVICE,
- UTF8ToUTF16(device.display_name));
- default:
- return UTF8ToUTF16(device.display_name);
- }
-}
-
-} // namespace
-
-namespace tray {
-
-class VolumeButton : public views::ToggleImageButton {
- public:
- explicit VolumeButton(views::ButtonListener* listener)
- : views::ToggleImageButton(listener),
- image_index_(-1) {
- SetImageAlignment(ALIGN_CENTER, ALIGN_MIDDLE);
- image_ = ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- IDR_AURA_UBER_TRAY_VOLUME_LEVELS);
- SetPreferredSize(gfx::Size(kTrayPopupItemHeight, kTrayPopupItemHeight));
- Update();
- }
-
- virtual ~VolumeButton() {}
-
- void Update() {
- float level = GetVolumeLevel();
- int image_index = IsAudioMuted() ?
- 0 : (level == 1.0 ?
- kVolumeLevels :
- std::max(1, int(std::ceil(level * (kVolumeLevels - 1)))));
- if (image_index != image_index_) {
- gfx::Rect region(0, image_index * kVolumeImageHeight,
- kVolumeImageWidth, kVolumeImageHeight);
- gfx::ImageSkia image_skia = gfx::ImageSkiaOperations::ExtractSubset(
- *(image_.ToImageSkia()), region);
- SetImage(views::CustomButton::STATE_NORMAL, &image_skia);
- image_index_ = image_index;
- }
- SchedulePaint();
- }
-
- private:
- // Overridden from views::View.
- virtual gfx::Size GetPreferredSize() OVERRIDE {
- gfx::Size size = views::ToggleImageButton::GetPreferredSize();
- size.set_height(kTrayPopupItemHeight);
- return size;
- }
-
- gfx::Image image_;
- int image_index_;
-
- DISALLOW_COPY_AND_ASSIGN(VolumeButton);
-};
-
-class VolumeSlider : public views::Slider {
- public:
- explicit VolumeSlider(views::SliderListener* listener)
- : views::Slider(listener, views::Slider::HORIZONTAL) {
- set_focus_border_color(kFocusBorderColor);
- SetValue(GetVolumeLevel());
- SetAccessibleName(
- ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
- IDS_ASH_STATUS_TRAY_VOLUME));
- Update();
- }
- virtual ~VolumeSlider() {}
-
- void Update() {
- UpdateState(!IsAudioMuted());
- }
-
- DISALLOW_COPY_AND_ASSIGN(VolumeSlider);
-};
-
-// Vertical bar separator that can be placed on the VolumeView.
-class BarSeparator : public views::View {
- public:
- BarSeparator() {}
- virtual ~BarSeparator() {}
-
- // Overriden from views::View.
- virtual gfx::Size GetPreferredSize() OVERRIDE {
- return gfx::Size(kBarSeparatorWidth, kBarSeparatorHeight);
- }
-
- private:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- canvas->FillRect(gfx::Rect(width() / 2, 0, 1, height()),
- kButtonStrokeColor);
- }
-
- DISALLOW_COPY_AND_ASSIGN(BarSeparator);
-};
-
-class VolumeView : public ActionableView,
- public views::ButtonListener,
- public views::SliderListener {
- public:
- VolumeView(SystemTrayItem* owner, bool is_default_view)
- : owner_(owner),
- icon_(NULL),
- slider_(NULL),
- bar_(NULL),
- device_type_(NULL),
- more_(NULL),
- is_default_view_(is_default_view) {
- SetFocusable(false);
- SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
- kTrayPopupPaddingHorizontal, 0, kTrayPopupPaddingBetweenItems));
-
- icon_ = new VolumeButton(this);
- AddChildView(icon_);
-
- slider_ = new VolumeSlider(this);
- AddChildView(slider_);
-
- bar_ = new BarSeparator;
- AddChildView(bar_);
-
- device_type_ = new views::ImageView;
- AddChildView(device_type_);
-
- more_ = new views::ImageView;
- more_->EnableCanvasFlippingForRTLUI(true);
- more_->SetImage(ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- IDR_AURA_UBER_TRAY_MORE).ToImageSkia());
- AddChildView(more_);
-
- Update();
- }
-
- virtual ~VolumeView() {}
-
- void Update() {
- icon_->Update();
- slider_->Update();
- UpdateDeviceTypeAndMore();
- Layout();
- }
-
- // Sets volume level on slider_, |percent| is ranged from [0.00] to [1.00].
- void SetVolumeLevel(float percent) {
- // Slider's value is in finer granularity than audio volume level(0.01),
- // there will be a small discrepancy between slider's value and volume level
- // on audio side. To avoid the jittering in slider UI, do not set change
- // slider value if the change is less than 1%.
- if (std::abs(percent-slider_->value()) < 0.01)
- return;
- // The change in volume will be reflected via accessibility system events,
- // so we prevent the UI event from being sent here.
- slider_->set_enable_accessibility_events(false);
- slider_->SetValue(percent);
- // It is possible that the volume was (un)muted, but the actual volume level
- // did not change. In that case, setting the value of the slider won't
- // trigger an update. So explicitly trigger an update.
- Update();
- slider_->set_enable_accessibility_events(true);
- }
-
- private:
- // Updates bar_, device_type_ icon, and more_ buttons.
- void UpdateDeviceTypeAndMore() {
- if (!ash::switches::ShowAudioDeviceMenu() || !is_default_view_) {
- more_->SetVisible(false);
- bar_->SetVisible(false);
- device_type_->SetVisible(false);
- return;
- }
-
- CrasAudioHandler* audio_handler = CrasAudioHandler::Get();
- bool show_more = audio_handler->has_alternative_output() ||
- audio_handler->has_alternative_input();
- more_->SetVisible(show_more);
-
- // Show output device icon if necessary.
- chromeos::AudioDevice device;
- if (!audio_handler->GetActiveOutputDevice(&device))
- return;
- int device_icon = GetAudioDeviceIconId(device.type);
- bar_->SetVisible(show_more);
- if (device_icon != kNoAudioDeviceIcon) {
- device_type_->SetVisible(true);
- device_type_->SetImage(
- ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- device_icon).ToImageSkia());
- } else {
- device_type_->SetVisible(false);
- }
- }
-
- void HandleVolumeUp(int volume) {
- CrasAudioHandler* audio_handler = CrasAudioHandler::Get();
- audio_handler->SetOutputVolumePercent(volume);
- if (audio_handler->IsOutputMuted() &&
- !audio_handler->IsOutputVolumeBelowDefaultMuteLvel())
- audio_handler->SetOutputMute(false);
- }
-
- void HandleVolumeDown(int volume) {
- CrasAudioHandler* audio_handler = CrasAudioHandler::Get();
- audio_handler->SetOutputVolumePercent(volume);
- if (audio_handler->IsOutputVolumeBelowDefaultMuteLvel() &&
- !audio_handler->IsOutputMuted()) {
- audio_handler->SetOutputMute(true);
- } else if (!audio_handler->IsOutputVolumeBelowDefaultMuteLvel() &&
- audio_handler->IsOutputMuted()) {
- audio_handler->SetOutputMute(false);
- }
- }
-
- // Overridden from views::View.
- virtual void Layout() OVERRIDE {
- views::View::Layout();
-
- if (!more_->visible()) {
- int w = width() - slider_->bounds().x() -
- kSliderRightPaddingToVolumeViewEdge;
- slider_->SetSize(gfx::Size(w, slider_->height()));
- return;
- }
-
- // Make sure the chevron always has the full size.
- gfx::Size size = more_->GetPreferredSize();
- gfx::Rect bounds(size);
- bounds.set_x(width() - size.width() - kTrayPopupPaddingBetweenItems);
- bounds.set_y((height() - size.height()) / 2);
- more_->SetBoundsRect(bounds);
-
- // Layout either bar_ or device_type_ at the left of the more_ button.
- views::View* view_left_to_more;
- if (device_type_->visible())
- view_left_to_more = device_type_;
- else
- view_left_to_more = bar_;
- gfx::Size view_size = view_left_to_more->GetPreferredSize();
- gfx::Rect view_bounds(view_size);
- view_bounds.set_x(more_->bounds().x() - view_size.width() -
- kExtraPaddingBetweenBarAndMore);
- view_bounds.set_y((height() - view_size.height()) / 2);
- view_left_to_more->SetBoundsRect(view_bounds);
-
- // Layout vertical bar next to view_left_to_more if device_type_ is visible.
- if (device_type_->visible()) {
- gfx::Size bar_size = bar_->GetPreferredSize();
- gfx::Rect bar_bounds(bar_size);
- bar_bounds.set_x(view_left_to_more->bounds().x() - bar_size.width());
- bar_bounds.set_y((height() - bar_size.height()) / 2);
- bar_->SetBoundsRect(bar_bounds);
- }
-
- // Layout slider, calculate slider width.
- gfx::Rect slider_bounds = slider_->bounds();
- slider_bounds.set_width(
- bar_->bounds().x()
- - (device_type_->visible() ? 0 : kTrayPopupPaddingBetweenItems)
- - slider_bounds.x());
- slider_->SetBoundsRect(slider_bounds);
- }
-
- // Overridden from views::ButtonListener.
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE {
- CHECK(sender == icon_);
- bool mute_on = !IsAudioMuted();
- CrasAudioHandler::Get()->SetOutputMute(mute_on);
- if (!mute_on)
- CrasAudioHandler::Get()->AdjustOutputVolumeToAudibleLevel();
- }
-
- // Overridden from views:SliderListener.
- virtual void SliderValueChanged(views::Slider* sender,
- float value,
- float old_value,
- views::SliderChangeReason reason) OVERRIDE {
- if (reason == views::VALUE_CHANGED_BY_USER) {
- int volume = value * 100.0f;
- int old_volume = CrasAudioHandler::Get()->GetOutputVolumePercent();
- // Do not call change audio volume if the difference is less than
- // 1%, which is beyond cras audio api's granularity for output volume.
- if (std::abs(volume - old_volume) < 1)
- return;
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- is_default_view_ ?
- ash::UMA_STATUS_AREA_CHANGED_VOLUME_MENU :
- ash::UMA_STATUS_AREA_CHANGED_VOLUME_POPUP);
- if (volume > old_volume)
- HandleVolumeUp(volume);
- else
- HandleVolumeDown(volume);
- }
- icon_->Update();
- }
-
- // Overriden from ActionableView.
- virtual bool PerformAction(const ui::Event& event) OVERRIDE {
- if (!more_->visible())
- return false;
- owner_->TransitionDetailedView();
- return true;
- }
-
- SystemTrayItem* owner_;
- VolumeButton* icon_;
- VolumeSlider* slider_;
- BarSeparator* bar_;
- views::ImageView* device_type_;
- views::ImageView* more_;
- bool is_default_view_;
-
- DISALLOW_COPY_AND_ASSIGN(VolumeView);
-};
-
-class AudioDetailedView : public TrayDetailsView,
- public ViewClickListener {
- public:
- AudioDetailedView(SystemTrayItem* owner, user::LoginStatus login)
- : TrayDetailsView(owner),
- login_(login) {
- CreateItems();
- Update();
- }
-
- virtual ~AudioDetailedView() {
- }
-
- void Update() {
- UpdateAudioDevices();
- Layout();
- }
-
- private:
- void CreateItems() {
- CreateScrollableList();
- CreateHeaderEntry();
- }
-
- void CreateHeaderEntry() {
- CreateSpecialRow(IDS_ASH_STATUS_TRAY_AUDIO, this);
- }
-
- void UpdateAudioDevices() {
- output_devices_.clear();
- input_devices_.clear();
- chromeos::AudioDeviceList devices;
- CrasAudioHandler::Get()->GetAudioDevices(&devices);
- for (size_t i = 0; i < devices.size(); ++i) {
- if (devices[i].is_input)
- input_devices_.push_back(devices[i]);
- else
- output_devices_.push_back(devices[i]);
- }
- UpdateScrollableList();
- }
-
- void UpdateScrollableList() {
- scroll_content()->RemoveAllChildViews(true);
- device_map_.clear();
-
- // Add audio output devices.
- AddScrollListInfoItem(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_AUDIO_OUTPUT));
- for (size_t i = 0; i < output_devices_.size(); ++i) {
- HoverHighlightView* container = AddScrollListItem(
- GetAudioDeviceName(output_devices_[i]),
- gfx::Font::NORMAL,
- output_devices_[i].active); /* checkmark if active */
- device_map_[container] = output_devices_[i];
- }
-
- AddScrollSeparator();
-
- // Add audio input devices.
- AddScrollListInfoItem(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_AUDIO_INPUT));
- for (size_t i = 0; i < input_devices_.size(); ++i) {
- HoverHighlightView* container = AddScrollListItem(
- GetAudioDeviceName(input_devices_[i]),
- gfx::Font::NORMAL,
- input_devices_[i].active); /* checkmark if active */
- device_map_[container] = input_devices_[i];
- }
-
- scroll_content()->SizeToPreferredSize();
- scroller()->Layout();
- }
-
- void AddScrollListInfoItem(const string16& text) {
- views::Label* label = new views::Label(text);
-
- // Align info item with checkbox items
- int margin = kTrayPopupPaddingHorizontal +
- kTrayPopupDetailsLabelExtraLeftMargin;
- int left_margin = 0;
- int right_margin = 0;
- if (base::i18n::IsRTL())
- right_margin = margin;
- else
- left_margin = margin;
-
- label->set_border(views::Border::CreateEmptyBorder(
- ash::kTrayPopupPaddingBetweenItems,
- left_margin,
- ash::kTrayPopupPaddingBetweenItems,
- right_margin));
- label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- label->SetEnabledColor(SkColorSetARGB(192, 0, 0, 0));
- label->SetFont(label->font().DeriveFont(0, gfx::Font::BOLD));
-
- scroll_content()->AddChildView(label);
- }
-
- HoverHighlightView* AddScrollListItem(const string16& text,
- gfx::Font::FontStyle style,
- bool checked) {
- HoverHighlightView* container = new HoverHighlightView(this);
- container->AddCheckableLabel(text, style, checked);
- scroll_content()->AddChildView(container);
- return container;
- }
-
- // Overridden from ViewClickListener.
- virtual void OnViewClicked(views::View* sender) OVERRIDE {
- if (sender == footer()->content()) {
- TransitionToDefaultView();
- } else {
- AudioDeviceMap::iterator iter = device_map_.find(sender);
- if (iter == device_map_.end())
- return;
- chromeos::AudioDevice& device = iter->second;
- CrasAudioHandler::Get()->SwitchToDevice(device);
- }
- }
-
- typedef std::map<views::View*, chromeos::AudioDevice> AudioDeviceMap;
-
- user::LoginStatus login_;
- chromeos::AudioDeviceList output_devices_;
- chromeos::AudioDeviceList input_devices_;
- AudioDeviceMap device_map_;
-
- DISALLOW_COPY_AND_ASSIGN(AudioDetailedView);
-};
-
-} // namespace tray
-
-TrayAudio::TrayAudio(SystemTray* system_tray)
- : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_VOLUME_MUTE),
- volume_view_(NULL),
- audio_detail_(NULL),
- pop_up_volume_view_(false) {
- CrasAudioHandler::Get()->AddAudioObserver(this);
-}
-
-TrayAudio::~TrayAudio() {
- if (CrasAudioHandler::IsInitialized())
- CrasAudioHandler::Get()->RemoveAudioObserver(this);
-}
-
-bool TrayAudio::GetInitialVisibility() {
- return IsAudioMuted();
-}
-
-views::View* TrayAudio::CreateDefaultView(user::LoginStatus status) {
- volume_view_ = new tray::VolumeView(this, true);
- return volume_view_;
-}
-
-views::View* TrayAudio::CreateDetailedView(user::LoginStatus status) {
- if (!ash::switches::ShowAudioDeviceMenu() || pop_up_volume_view_) {
- volume_view_ = new tray::VolumeView(this, false);
- return volume_view_;
- } else {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_DETAILED_AUDIO_VIEW);
- audio_detail_ = new tray::AudioDetailedView(this, status);
- return audio_detail_;
- }
-}
-
-void TrayAudio::DestroyDefaultView() {
- volume_view_ = NULL;
-}
-
-void TrayAudio::DestroyDetailedView() {
- if (audio_detail_) {
- audio_detail_ = NULL;
- } else if (volume_view_) {
- volume_view_ = NULL;
- pop_up_volume_view_ = false;
- }
-}
-
-bool TrayAudio::ShouldHideArrow() const {
- return true;
-}
-
-bool TrayAudio::ShouldShowLauncher() const {
- return ash::switches::ShowAudioDeviceMenu() && !pop_up_volume_view_;
-}
-
-void TrayAudio::OnOutputVolumeChanged() {
- float percent = GetVolumeLevel();
- if (tray_view())
- tray_view()->SetVisible(GetInitialVisibility());
-
- if (volume_view_) {
- volume_view_->SetVolumeLevel(percent);
- SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds);
- return;
- }
- pop_up_volume_view_ = true;
- PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false);
-}
-
-void TrayAudio::OnOutputMuteChanged() {
- if (tray_view())
- tray_view()->SetVisible(GetInitialVisibility());
-
- if (volume_view_) {
- volume_view_->Update();
- SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds);
- } else {
- pop_up_volume_view_ = true;
- PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false);
- }
-}
-
-void TrayAudio::OnInputGainChanged() {
-}
-
-void TrayAudio::OnInputMuteChanged() {
-}
-
-void TrayAudio::OnAudioNodesChanged() {
- Update();
-}
-
-void TrayAudio::OnActiveOutputNodeChanged() {
- Update();
-}
-
-void TrayAudio::OnActiveInputNodeChanged() {
- Update();
-}
-
-void TrayAudio::Update() {
- if (tray_view())
- tray_view()->SetVisible(GetInitialVisibility());
- if (audio_detail_)
- audio_detail_->Update();
- if (volume_view_) {
- volume_view_->SetVolumeLevel(GetVolumeLevel());
- volume_view_->Update();
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/audio/tray_audio.h b/chromium/ash/system/chromeos/audio/tray_audio.h
deleted file mode 100644
index d055a54b037..00000000000
--- a/chromium/ash/system/chromeos/audio/tray_audio.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_H_
-#define ASH_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_H_
-
-#include "ash/system/tray/tray_image_item.h"
-#include "chromeos/audio/cras_audio_handler.h"
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-class VolumeView;
-class AudioDetailedView;
-}
-
-class TrayAudio : public TrayImageItem,
- public chromeos::CrasAudioHandler::AudioObserver {
- public:
- explicit TrayAudio(SystemTray* system_tray);
- virtual ~TrayAudio();
-
- private:
- // Overridden from TrayImageItem.
- virtual bool GetInitialVisibility() OVERRIDE;
-
- // Overridden from SystemTrayItem.
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
- virtual bool ShouldHideArrow() const OVERRIDE;
- virtual bool ShouldShowLauncher() const OVERRIDE;
-
- // Overridden from chromeos::CrasAudioHandler::AudioObserver.
- virtual void OnOutputVolumeChanged() OVERRIDE;
- virtual void OnOutputMuteChanged() OVERRIDE;
- virtual void OnInputGainChanged() OVERRIDE;
- virtual void OnInputMuteChanged() OVERRIDE;
- virtual void OnAudioNodesChanged() OVERRIDE;
- virtual void OnActiveOutputNodeChanged() OVERRIDE;
- virtual void OnActiveInputNodeChanged() OVERRIDE;
-
- void Update();
-
- tray::VolumeView* volume_view_;
- tray::AudioDetailedView* audio_detail_;
-
- // True if VolumeView should be created for accelerator pop up;
- // Otherwise, it should be created for detailed view in ash tray bubble.
- bool pop_up_volume_view_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayAudio);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_H_
diff --git a/chromium/ash/system/chromeos/brightness/brightness_controller_chromeos.cc b/chromium/ash/system/chromeos/brightness/brightness_controller_chromeos.cc
deleted file mode 100644
index 78d35df4bc7..00000000000
--- a/chromium/ash/system/chromeos/brightness/brightness_controller_chromeos.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/brightness/brightness_controller_chromeos.h"
-
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/power_manager_client.h"
-#include "content/public/browser/user_metrics.h"
-#include "ui/base/accelerators/accelerator.h"
-
-namespace ash {
-namespace system {
-
-bool BrightnessControllerChromeos::HandleBrightnessDown(
- const ui::Accelerator& accelerator) {
- if (accelerator.key_code() == ui::VKEY_BRIGHTNESS_DOWN)
- content::RecordAction(
- content::UserMetricsAction("Accel_BrightnessDown_F6"));
-
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
- DecreaseScreenBrightness(true);
- return true;
-}
-
-bool BrightnessControllerChromeos::HandleBrightnessUp(
- const ui::Accelerator& accelerator) {
- if (accelerator.key_code() == ui::VKEY_BRIGHTNESS_UP)
- content::RecordAction(content::UserMetricsAction("Accel_BrightnessUp_F7"));
-
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
- IncreaseScreenBrightness();
- return true;
-}
-
-void BrightnessControllerChromeos::SetBrightnessPercent(double percent,
- bool gradual) {
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
- SetScreenBrightnessPercent(percent, gradual);
-}
-
-void BrightnessControllerChromeos::GetBrightnessPercent(
- const base::Callback<void(double)>& callback) {
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
- GetScreenBrightnessPercent(callback);
-}
-
-} // namespace system
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/brightness/brightness_controller_chromeos.h b/chromium/ash/system/chromeos/brightness/brightness_controller_chromeos.h
deleted file mode 100644
index 111daf396b1..00000000000
--- a/chromium/ash/system/chromeos/brightness/brightness_controller_chromeos.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_BRIGHTNESS_BRIGHTNESS_CONTROLLER_CHROMEOS_H_
-#define ASH_SYSTEM_CHROMEOS_BRIGHTNESS_BRIGHTNESS_CONTROLLER_CHROMEOS_H_
-
-#include "ash/ash_export.h"
-#include "ash/system/brightness_control_delegate.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-
-namespace ash {
-namespace system {
-
-// A class which controls brightness when F6, F7 or a multimedia key for
-// brightness is pressed.
-class ASH_EXPORT BrightnessControllerChromeos
- : public ash::BrightnessControlDelegate {
- public:
- BrightnessControllerChromeos() {}
- virtual ~BrightnessControllerChromeos() {}
-
- // Overridden from ash::BrightnessControlDelegate:
- virtual bool HandleBrightnessDown(
- const ui::Accelerator& accelerator) OVERRIDE;
- virtual bool HandleBrightnessUp(const ui::Accelerator& accelerator) OVERRIDE;
- virtual void SetBrightnessPercent(double percent, bool gradual) OVERRIDE;
- virtual void GetBrightnessPercent(
- const base::Callback<void(double)>& callback) OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BrightnessControllerChromeos);
-};
-
-} // namespace system
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_BRIGHTNESS_BRIGHTNESS_CONTROLLER_CHROMEOS_H_
diff --git a/chromium/ash/system/chromeos/brightness/tray_brightness.cc b/chromium/ash/system/chromeos/brightness/tray_brightness.cc
deleted file mode 100644
index 98cace08577..00000000000
--- a/chromium/ash/system/chromeos/brightness/tray_brightness.cc
+++ /dev/null
@@ -1,232 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/brightness/tray_brightness.h"
-
-#include "ash/accelerators/accelerator_controller.h"
-#include "ash/ash_constants.h"
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
-#include "ash/system/brightness_control_delegate.h"
-#include "ash/system/tray/fixed_sized_image_view.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/tray_constants.h"
-#include "base/bind.h"
-#include "base/message_loop/message_loop.h"
-#include "base/strings/utf_string_conversions.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/power_manager_client.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image.h"
-#include "ui/views/controls/button/image_button.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/controls/slider.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/view.h"
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-
-namespace {
-
-// We don't let the screen brightness go lower than this when it's being
-// adjusted via the slider. Otherwise, if the user doesn't know about the
-// brightness keys, they may turn the backlight off and not know how to turn it
-// back on.
-const double kMinBrightnessPercent = 5.0;
-
-} // namespace
-
-class BrightnessView : public views::View,
- public views::SliderListener {
- public:
- explicit BrightnessView(double initial_percent)
- : dragging_(false),
- last_percent_(initial_percent) {
- SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
- kTrayPopupPaddingHorizontal, 0, kTrayPopupPaddingBetweenItems));
-
- views::ImageView* icon = new FixedSizedImageView(0, kTrayPopupItemHeight);
- gfx::Image image = ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- IDR_AURA_UBER_TRAY_BRIGHTNESS);
- icon->SetImage(image.ToImageSkia());
- AddChildView(icon);
-
- slider_ = new views::Slider(this, views::Slider::HORIZONTAL);
- slider_->set_focus_border_color(kFocusBorderColor);
- slider_->SetValue(static_cast<float>(initial_percent / 100.0));
- slider_->SetAccessibleName(
- ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
- IDS_ASH_STATUS_TRAY_BRIGHTNESS));
- AddChildView(slider_);
- }
-
- virtual ~BrightnessView() {}
-
- // |percent| is in the range [0.0, 100.0].
- void SetBrightnessPercent(double percent) {
- last_percent_ = percent;
- if (!dragging_)
- slider_->SetValue(static_cast<float>(percent / 100.0));
- }
-
- private:
- // Overridden from views::View.
- virtual void OnBoundsChanged(const gfx::Rect& old_bounds) OVERRIDE {
- int w = width() - slider_->x();
- slider_->SetSize(gfx::Size(w, slider_->height()));
- }
-
- // Overridden from views:SliderListener.
- virtual void SliderValueChanged(views::Slider* sender,
- float value,
- float old_value,
- views::SliderChangeReason reason) OVERRIDE {
- DCHECK_EQ(sender, slider_);
- if (reason != views::VALUE_CHANGED_BY_USER)
- return;
- AcceleratorController* ac = Shell::GetInstance()->accelerator_controller();
- if (ac->brightness_control_delegate()) {
- double percent = std::max(value * 100.0, kMinBrightnessPercent);
- ac->brightness_control_delegate()->SetBrightnessPercent(percent, true);
- }
- }
-
- // Overridden from views:SliderListener.
- virtual void SliderDragStarted(views::Slider* slider) OVERRIDE {
- DCHECK_EQ(slider, slider_);
- dragging_ = true;
- }
-
- // Overridden from views:SliderListener.
- virtual void SliderDragEnded(views::Slider* slider) OVERRIDE {
- DCHECK_EQ(slider, slider_);
- dragging_ = false;
- slider_->SetValue(static_cast<float>(last_percent_ / 100.0));
- }
-
- views::Slider* slider_;
-
- // Is |slider_| currently being dragged?
- bool dragging_;
-
- // Last brightness level that we observed, in the range [0.0, 100.0].
- double last_percent_;
-
- DISALLOW_COPY_AND_ASSIGN(BrightnessView);
-};
-
-} // namespace tray
-
-TrayBrightness::TrayBrightness(SystemTray* system_tray)
- : SystemTrayItem(system_tray),
- weak_ptr_factory_(this),
- brightness_view_(NULL),
- is_default_view_(false),
- current_percent_(100.0),
- got_current_percent_(false) {
- // Post a task to get the initial brightness; the BrightnessControlDelegate
- // isn't created yet.
- base::MessageLoopForUI::current()->PostTask(
- FROM_HERE,
- base::Bind(&TrayBrightness::GetInitialBrightness,
- weak_ptr_factory_.GetWeakPtr()));
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
- AddObserver(this);
-}
-
-TrayBrightness::~TrayBrightness() {
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
- RemoveObserver(this);
-}
-
-void TrayBrightness::GetInitialBrightness() {
- BrightnessControlDelegate* delegate =
- Shell::GetInstance()->accelerator_controller()->
- brightness_control_delegate();
- // Worrisome, but happens in unit tests, so don't log anything.
- if (!delegate)
- return;
- delegate->GetBrightnessPercent(
- base::Bind(&TrayBrightness::HandleInitialBrightness,
- weak_ptr_factory_.GetWeakPtr()));
-}
-
-void TrayBrightness::HandleInitialBrightness(double percent) {
- if (!got_current_percent_)
- HandleBrightnessChanged(percent, false);
-}
-
-views::View* TrayBrightness::CreateTrayView(user::LoginStatus status) {
- return NULL;
-}
-
-views::View* TrayBrightness::CreateDefaultView(user::LoginStatus status) {
- return NULL;
-}
-
-views::View* TrayBrightness::CreateDetailedView(user::LoginStatus status) {
- CHECK(brightness_view_ == NULL);
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_DETAILED_BRIGHTNESS_VIEW);
- brightness_view_ = new tray::BrightnessView(current_percent_);
- is_default_view_ = false;
- return brightness_view_;
-}
-
-void TrayBrightness::DestroyTrayView() {
-}
-
-void TrayBrightness::DestroyDefaultView() {
- if (is_default_view_)
- brightness_view_ = NULL;
-}
-
-void TrayBrightness::DestroyDetailedView() {
- if (!is_default_view_)
- brightness_view_ = NULL;
-}
-
-void TrayBrightness::UpdateAfterLoginStatusChange(user::LoginStatus status) {
-}
-
-bool TrayBrightness::ShouldHideArrow() const {
- return true;
-}
-
-bool TrayBrightness::ShouldShowLauncher() const {
- return false;
-}
-
-void TrayBrightness::BrightnessChanged(int level, bool user_initiated) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_BRIGHTNESS_CHANGED);
- double percent = static_cast<double>(level);
- HandleBrightnessChanged(percent, user_initiated);
-}
-
-void TrayBrightness::HandleBrightnessChanged(double percent,
- bool user_initiated) {
- current_percent_ = percent;
- got_current_percent_ = true;
-
- if (brightness_view_)
- brightness_view_->SetBrightnessPercent(percent);
- if (!user_initiated)
- return;
-
- if (brightness_view_)
- SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds);
- else
- PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/brightness/tray_brightness.h b/chromium/ash/system/chromeos/brightness/tray_brightness.h
deleted file mode 100644
index adabbc55d82..00000000000
--- a/chromium/ash/system/chromeos/brightness/tray_brightness.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_BRIGHTNESS_TRAY_BRIGHTNESS_H_
-#define ASH_SYSTEM_CHROMEOS_BRIGHTNESS_TRAY_BRIGHTNESS_H_
-
-#include "ash/system/tray/system_tray_item.h"
-#include "base/compiler_specific.h"
-#include "base/memory/weak_ptr.h"
-#include "chromeos/dbus/power_manager_client.h"
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-class BrightnessView;
-}
-
-class TrayBrightness : public SystemTrayItem,
- public chromeos::PowerManagerClient::Observer {
- public:
- explicit TrayBrightness(SystemTray* system_tray);
- virtual ~TrayBrightness();
-
- private:
- // Sends a request to get the current screen brightness so |current_percent_|
- // can be initialized.
- void GetInitialBrightness();
-
- // Updates |current_percent_| with the initial brightness requested by
- // GetInitialBrightness(), if we haven't seen the brightness already in the
- // meantime.
- void HandleInitialBrightness(double percent);
-
- // Overridden from SystemTrayItem.
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyTrayView() OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
- virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
- virtual bool ShouldHideArrow() const OVERRIDE;
- virtual bool ShouldShowLauncher() const OVERRIDE;
-
- // Overriden from PowerManagerClient::Observer.
- virtual void BrightnessChanged(int level, bool user_initiated) OVERRIDE;
-
- void HandleBrightnessChanged(double percent, bool user_initiated);
-
- base::WeakPtrFactory<TrayBrightness> weak_ptr_factory_;
-
- tray::BrightnessView* brightness_view_;
-
- // Was |brightness_view_| created for CreateDefaultView() rather than
- // CreateDetailedView()? Used to avoid resetting |brightness_view_|
- // inappropriately in DestroyDefaultView() or DestroyDetailedView().
- bool is_default_view_;
-
- // Brightness level in the range [0.0, 100.0] that we've heard about most
- // recently.
- double current_percent_;
-
- // Has |current_percent_| been initialized?
- bool got_current_percent_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayBrightness);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_BRIGHTNESS_TRAY_BRIGHTNESS_H_
diff --git a/chromium/ash/system/chromeos/enterprise/enterprise_domain_observer.h b/chromium/ash/system/chromeos/enterprise/enterprise_domain_observer.h
deleted file mode 100644
index 5df8a4262d8..00000000000
--- a/chromium/ash/system/chromeos/enterprise/enterprise_domain_observer.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_ENTERPISE_ENTERPRISE_DOMAIN_OBSERVER_H_
-#define ASH_SYSTEM_CHROMEOS_ENTERPISE_ENTERPRISE_DOMAIN_OBSERVER_H_
-
-namespace ash {
-
-class EnterpriseDomainObserver {
- public:
- virtual ~EnterpriseDomainObserver() {}
-
- virtual void OnEnterpriseDomainChanged() = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_ENTERPISE_ENTERPRISE_DOMAIN_OBSERVER_H_
-
diff --git a/chromium/ash/system/chromeos/enterprise/tray_enterprise.cc b/chromium/ash/system/chromeos/enterprise/tray_enterprise.cc
deleted file mode 100644
index 8fca1c6cb13..00000000000
--- a/chromium/ash/system/chromeos/enterprise/tray_enterprise.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/enterprise/tray_enterprise.h"
-
-#include "ash/shell.h"
-#include "ash/system/chromeos/label_tray_view.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/user/login_status.h"
-#include "base/logging.h"
-#include "grit/ash_resources.h"
-
-namespace ash {
-namespace internal {
-
-TrayEnterprise::TrayEnterprise(SystemTray* system_tray)
- : SystemTrayItem(system_tray),
- tray_view_(NULL) {
- Shell::GetInstance()->system_tray_notifier()->
- AddEnterpriseDomainObserver(this);
-}
-
-TrayEnterprise::~TrayEnterprise() {
- Shell::GetInstance()->system_tray_notifier()->
- RemoveEnterpriseDomainObserver(this);
-}
-
-void TrayEnterprise::UpdateEnterpriseMessage() {
- base::string16 message = Shell::GetInstance()->system_tray_delegate()->
- GetEnterpriseMessage();
- if (tray_view_)
- tray_view_->SetMessage(message);
-}
-
-views::View* TrayEnterprise::CreateDefaultView(user::LoginStatus status) {
- CHECK(tray_view_ == NULL);
- // For public accounts, enterprise ownership is indicated in the user details
- // instead.
- if (status == ash::user::LOGGED_IN_PUBLIC)
- return NULL;
- tray_view_ = new LabelTrayView(this, IDR_AURA_UBER_TRAY_ENTERPRISE_DARK);
- UpdateEnterpriseMessage();
- return tray_view_;
-}
-
-void TrayEnterprise::DestroyDefaultView() {
- tray_view_ = NULL;
-}
-
-void TrayEnterprise::OnEnterpriseDomainChanged() {
- UpdateEnterpriseMessage();
-}
-
-void TrayEnterprise::OnViewClicked(views::View* sender) {
- Shell::GetInstance()->system_tray_delegate()->ShowEnterpriseInfo();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/enterprise/tray_enterprise.h b/chromium/ash/system/chromeos/enterprise/tray_enterprise.h
deleted file mode 100644
index 697dfcd61d5..00000000000
--- a/chromium/ash/system/chromeos/enterprise/tray_enterprise.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_ENTERPRISE_TRAY_ENTERPRISE_H
-#define ASH_SYSTEM_CHROMEOS_ENTERPRISE_TRAY_ENTERPRISE_H
-
-#include "ash/system/chromeos/enterprise/enterprise_domain_observer.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "ash/system/tray/view_click_listener.h"
-
-namespace ash {
-class SystemTray;
-}
-
-namespace ash {
-namespace internal {
-
-class LabelTrayView;
-
-class TrayEnterprise : public SystemTrayItem,
- public ViewClickListener,
- public EnterpriseDomainObserver {
- public:
- explicit TrayEnterprise(SystemTray* system_tray);
- virtual ~TrayEnterprise();
-
- // If message is not empty updates content of default view, otherwise hides
- // tray items.
- void UpdateEnterpriseMessage();
-
- // Overridden from SystemTrayItem.
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
-
- // Overridden from EnterpriseDomainObserver.
- virtual void OnEnterpriseDomainChanged() OVERRIDE;
-
- // Overridden from ViewClickListener.
- virtual void OnViewClicked(views::View* sender) OVERRIDE;
-
- private:
- LabelTrayView* tray_view_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayEnterprise);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_ENTERPRISE_TRAY_ENTERPRISE_H
-
diff --git a/chromium/ash/system/chromeos/keyboard_brightness_controller.cc b/chromium/ash/system/chromeos/keyboard_brightness_controller.cc
deleted file mode 100644
index 15f91edccc0..00000000000
--- a/chromium/ash/system/chromeos/keyboard_brightness_controller.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/keyboard_brightness_controller.h"
-
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/power_manager_client.h"
-#include "content/public/browser/user_metrics.h"
-#include "ui/base/accelerators/accelerator.h"
-
-namespace ash {
-
-bool KeyboardBrightnessController::HandleKeyboardBrightnessDown(
- const ui::Accelerator& accelerator) {
- if (accelerator.key_code() == ui::VKEY_BRIGHTNESS_DOWN) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- UMA_ACCEL_KEYBOARD_BRIGHTNESS_DOWN_F6);
- }
-
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
- DecreaseKeyboardBrightness();
- return true;
-}
-
-bool KeyboardBrightnessController::HandleKeyboardBrightnessUp(
- const ui::Accelerator& accelerator) {
- if (accelerator.key_code() == ui::VKEY_BRIGHTNESS_UP) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- UMA_ACCEL_KEYBOARD_BRIGHTNESS_UP_F7);
- }
-
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
- IncreaseKeyboardBrightness();
- return true;
-}
-
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/keyboard_brightness_controller.h b/chromium/ash/system/chromeos/keyboard_brightness_controller.h
deleted file mode 100644
index 1afc94b1f6b..00000000000
--- a/chromium/ash/system/chromeos/keyboard_brightness_controller.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_KEYBOARD_BRIGHTNESS_CONTROLLER_H_
-#define ASH_SYSTEM_CHROMEOS_KEYBOARD_BRIGHTNESS_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-
-namespace ash {
-
-// A class which controls keyboard brightness when Alt+F6, Alt+F7 or a
-// multimedia key for keyboard brightness is pressed.
-class ASH_EXPORT KeyboardBrightnessController
- : public KeyboardBrightnessControlDelegate {
- public:
- KeyboardBrightnessController() {}
- virtual ~KeyboardBrightnessController() {}
-
- private:
- // Overridden from KeyboardBrightnessControlDelegate:
- virtual bool HandleKeyboardBrightnessDown(
- const ui::Accelerator& accelerator) OVERRIDE;
- virtual bool HandleKeyboardBrightnessUp(
- const ui::Accelerator& accelerator) OVERRIDE;
-
- DISALLOW_COPY_AND_ASSIGN(KeyboardBrightnessController);
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_KEYBOARD_BRIGHTNESS_CONTROLLER_H_
diff --git a/chromium/ash/system/chromeos/label_tray_view.cc b/chromium/ash/system/chromeos/label_tray_view.cc
deleted file mode 100644
index 0ae4604680e..00000000000
--- a/chromium/ash/system/chromeos/label_tray_view.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/label_tray_view.h"
-
-#include "ash/system/tray/hover_highlight_view.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/view_click_listener.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/font.h"
-#include "ui/views/border.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/fill_layout.h"
-
-namespace ash {
-namespace internal {
-
-LabelTrayView::LabelTrayView(ViewClickListener* click_listener,
- int icon_resource_id)
- : click_listener_(click_listener),
- icon_resource_id_(icon_resource_id) {
- SetLayoutManager(new views::FillLayout());
- SetVisible(false);
-}
-
-LabelTrayView::~LabelTrayView() {
-}
-
-void LabelTrayView::SetMessage(const base::string16& message) {
- if (message_ == message)
- return;
-
- message_ = message;
- RemoveAllChildViews(true);
- if (!message_.empty()) {
- AddChildView(CreateChildView(message_));
- SetVisible(true);
- } else {
- SetVisible(false);
- }
-}
-
-views::View* LabelTrayView::CreateChildView(
- const base::string16& message) const {
- HoverHighlightView* child = new HoverHighlightView(click_listener_);
- if (icon_resource_id_) {
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- const gfx::ImageSkia* icon = rb.GetImageSkiaNamed(icon_resource_id_);
- child->AddIconAndLabel(*icon, message, gfx::Font::NORMAL);
- child->set_border(
- views::Border::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal,
- 0, kTrayPopupPaddingHorizontal));
- child->text_label()->SetMultiLine(true);
- child->text_label()->SizeToFit(kTrayNotificationContentsWidth);
- } else {
- child->AddLabel(message, gfx::Font::NORMAL);
- child->text_label()->SetMultiLine(true);
- child->text_label()->SizeToFit(kTrayNotificationContentsWidth +
- kNotificationIconWidth);
- }
- child->text_label()->SetAllowCharacterBreak(true);
- child->SetExpandable(true);
- child->SetVisible(true);
- return child;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/label_tray_view.h b/chromium/ash/system/chromeos/label_tray_view.h
deleted file mode 100644
index b29c37bee56..00000000000
--- a/chromium/ash/system/chromeos/label_tray_view.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_LABEL_TRAY_VIEW_H_
-#define ASH_SYSTEM_CHROMEOS_LABEL_TRAY_VIEW_H_
-
-#include "base/strings/string16.h"
-#include "ui/views/view.h"
-
-namespace ash {
-namespace internal {
-
-class ViewClickListener;
-
-// View for simple information in tray. Automatically hides when message is
-// empty. Supports multiline messages.
-
-class LabelTrayView : public views::View {
- public:
- LabelTrayView(ViewClickListener* click_listener, int icon_resource_id);
- virtual ~LabelTrayView();
- void SetMessage(const base::string16& message);
- private:
- views::View* CreateChildView(const base::string16& message) const;
-
- ViewClickListener* click_listener_;
- int icon_resource_id_;
- base::string16 message_;
-
- DISALLOW_COPY_AND_ASSIGN(LabelTrayView);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_LABEL_TRAY_VIEW_H_
diff --git a/chromium/ash/system/chromeos/managed/tray_locally_managed_user.cc b/chromium/ash/system/chromeos/managed/tray_locally_managed_user.cc
deleted file mode 100644
index bd3e380b257..00000000000
--- a/chromium/ash/system/chromeos/managed/tray_locally_managed_user.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/managed/tray_locally_managed_user.h"
-
-#include "ash/shell.h"
-#include "ash/system/chromeos/label_tray_view.h"
-#include "ash/system/system_notifier.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/tray_notification_view.h"
-#include "ash/system/user/login_status.h"
-#include "base/callback.h"
-#include "base/logging.h"
-#include "grit/ash_resources.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/message_center/message_center.h"
-#include "ui/message_center/notification.h"
-#include "ui/message_center/notification_delegate.h"
-
-using message_center::Notification;
-
-namespace ash {
-namespace internal {
-
-const char TrayLocallyManagedUser::kNotificationId[] =
- "chrome://user/locally-managed";
-
-TrayLocallyManagedUser::TrayLocallyManagedUser(SystemTray* system_tray)
- : SystemTrayItem(system_tray),
- tray_view_(NULL),
- status_(ash::user::LOGGED_IN_NONE) {
-}
-
-TrayLocallyManagedUser::~TrayLocallyManagedUser() {
-}
-
-void TrayLocallyManagedUser::UpdateMessage() {
- base::string16 message = Shell::GetInstance()->system_tray_delegate()->
- GetLocallyManagedUserMessage();
- if (tray_view_)
- tray_view_->SetMessage(message);
- if (message_center::MessageCenter::Get()->HasNotification(kNotificationId))
- CreateOrUpdateNotification(message);
-}
-
-views::View* TrayLocallyManagedUser::CreateDefaultView(
- user::LoginStatus status) {
- CHECK(tray_view_ == NULL);
- if (status != ash::user::LOGGED_IN_LOCALLY_MANAGED)
- return NULL;
-
- tray_view_ = new LabelTrayView(this, IDR_AURA_UBER_TRAY_MANAGED_USER);
- UpdateMessage();
- return tray_view_;
-}
-
-void TrayLocallyManagedUser::DestroyDefaultView() {
- tray_view_ = NULL;
-}
-
-void TrayLocallyManagedUser::OnViewClicked(views::View* sender) {
- Shell::GetInstance()->system_tray_delegate()->ShowLocallyManagedUserInfo();
-}
-
-void TrayLocallyManagedUser::UpdateAfterLoginStatusChange(
- user::LoginStatus status) {
- if (status == status_)
- return;
- if (status == ash::user::LOGGED_IN_LOCALLY_MANAGED &&
- status_ != ash::user::LOGGED_IN_LOCKED) {
- SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate();
- CreateOrUpdateNotification(delegate->GetLocallyManagedUserMessage());
- }
- status_ = status;
-}
-
-void TrayLocallyManagedUser::CreateOrUpdateNotification(
- const base::string16& new_message) {
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- scoped_ptr<Notification> notification(
- message_center::Notification::CreateSystemNotification(
- kNotificationId,
- string16() /* no title */,
- new_message,
- bundle.GetImageNamed(IDR_AURA_UBER_TRAY_MANAGED_USER),
- system_notifier::kNotifierLocallyManagedUser,
- base::Closure() /* null callback */));
- message_center::MessageCenter::Get()->AddNotification(notification.Pass());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/managed/tray_locally_managed_user.h b/chromium/ash/system/chromeos/managed/tray_locally_managed_user.h
deleted file mode 100644
index a508ec39e66..00000000000
--- a/chromium/ash/system/chromeos/managed/tray_locally_managed_user.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_LOCALLY_MANAGED_TRAY_LOCALLY_MANAGED_USER_H
-#define ASH_SYSTEM_CHROMEOS_LOCALLY_MANAGED_TRAY_LOCALLY_MANAGED_USER_H
-
-#include "ash/ash_export.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "ash/system/tray/view_click_listener.h"
-#include "base/strings/string16.h"
-
-namespace ash {
-class SystemTray;
-
-namespace internal {
-
-class LabelTrayView;
-
-class ASH_EXPORT TrayLocallyManagedUser : public SystemTrayItem,
- public ViewClickListener {
- public:
- explicit TrayLocallyManagedUser(SystemTray* system_tray);
- virtual ~TrayLocallyManagedUser();
-
- // If message is not empty updates content of default view, otherwise hides
- // tray items.
- void UpdateMessage();
-
- // Overridden from SystemTrayItem.
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
-
- // Overridden from ViewClickListener.
- virtual void OnViewClicked(views::View* sender) OVERRIDE;
-
- private:
- friend class TrayLocallyManagedUserTest;
-
- static const char kNotificationId[];
-
- void CreateOrUpdateNotification(const base::string16& new_message);
-
- LabelTrayView* tray_view_;
- // Previous login status to avoid showing notification upon unlock.
- user::LoginStatus status_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayLocallyManagedUser);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_LOCALLY_MANAGED_TRAY_LOCALLY_MANAGED_USER_H
diff --git a/chromium/ash/system/chromeos/managed/tray_locally_managed_user_unittest.cc b/chromium/ash/system/chromeos/managed/tray_locally_managed_user_unittest.cc
deleted file mode 100644
index 46f60d13c93..00000000000
--- a/chromium/ash/system/chromeos/managed/tray_locally_managed_user_unittest.cc
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/managed/tray_locally_managed_user.h"
-
-#include "ash/shell.h"
-#include "ash/system/user/login_status.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/test_system_tray_delegate.h"
-#include "ui/message_center/message_center.h"
-#include "ui/message_center/notification.h"
-#include "ui/message_center/notification_list.h"
-#include "ui/message_center/notification_types.h"
-
-using message_center::NotificationList;
-
-namespace ash {
-namespace internal {
-
-class TrayLocallyManagedUserTest : public test::AshTestBase {
- public:
- TrayLocallyManagedUserTest() {}
- virtual ~TrayLocallyManagedUserTest() {}
-
- protected:
- message_center::Notification* GetPopup();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TrayLocallyManagedUserTest);
-};
-
-message_center::Notification* TrayLocallyManagedUserTest::GetPopup() {
- NotificationList::PopupNotifications popups =
- message_center::MessageCenter::Get()->GetPopupNotifications();
- for (NotificationList::PopupNotifications::const_iterator iter =
- popups.begin(); iter != popups.end(); ++iter) {
- if ((*iter)->id() == TrayLocallyManagedUser::kNotificationId)
- return *iter;
- }
- return NULL;
-}
-
-class TrayLocallyManagedUserInitialTest : public TrayLocallyManagedUserTest {
- public:
- TrayLocallyManagedUserInitialTest() {}
- virtual ~TrayLocallyManagedUserInitialTest() {}
-
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TrayLocallyManagedUserInitialTest);
-};
-
-void TrayLocallyManagedUserInitialTest::SetUp() {
- test::TestSystemTrayDelegate::SetInitialLoginStatus(
- user::LOGGED_IN_LOCALLY_MANAGED);
- test::AshTestBase::SetUp();
-}
-
-void TrayLocallyManagedUserInitialTest::TearDown() {
- test::AshTestBase::TearDown();
- // SetInitialLoginStatus() is reset in AshTestHelper::TearDown().
-}
-
-TEST_F(TrayLocallyManagedUserTest, LocallyManagedUserHasNotification) {
- test::TestSystemTrayDelegate* delegate =
- static_cast<test::TestSystemTrayDelegate*>(
- ash::Shell::GetInstance()->system_tray_delegate());
- delegate->SetLoginStatus(user::LOGGED_IN_LOCALLY_MANAGED);
-
- message_center::Notification* notification = GetPopup();
- ASSERT_NE(static_cast<message_center::Notification*>(NULL), notification);
- EXPECT_EQ(static_cast<int>(message_center::SYSTEM_PRIORITY),
- notification->rich_notification_data().priority);
-}
-
-TEST_F(TrayLocallyManagedUserInitialTest, LocallyManagedUserNoCrash) {
- // Initial login status is already LOCALLY_MANAGED, which should create
- // the notification and should not cause crashes.
- message_center::Notification* notification = GetPopup();
- ASSERT_NE(static_cast<message_center::Notification*>(NULL), notification);
- EXPECT_EQ(static_cast<int>(message_center::SYSTEM_PRIORITY),
- notification->rich_notification_data().priority);
-}
-
-} // namespace test
-} // namespace
diff --git a/chromium/ash/system/chromeos/network/network_connect.cc b/chromium/ash/system/chromeos/network/network_connect.cc
deleted file mode 100644
index d8f524aea43..00000000000
--- a/chromium/ash/system/chromeos/network/network_connect.cc
+++ /dev/null
@@ -1,579 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/network/network_connect.h"
-
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/system/chromeos/network/network_state_notifier.h"
-#include "ash/system/system_notifier.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "base/bind.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/strings/utf_string_conversions.h"
-#include "base/values.h"
-#include "chromeos/login/login_state.h"
-#include "chromeos/network/device_state.h"
-#include "chromeos/network/network_activation_handler.h"
-#include "chromeos/network/network_configuration_handler.h"
-#include "chromeos/network/network_connection_handler.h"
-#include "chromeos/network/network_event_log.h"
-#include "chromeos/network/network_handler_callbacks.h"
-#include "chromeos/network/network_profile.h"
-#include "chromeos/network/network_profile_handler.h"
-#include "chromeos/network/network_state.h"
-#include "chromeos/network/network_state_handler.h"
-#include "chromeos/network/shill_property_util.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "third_party/cros_system_api/dbus/service_constants.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/message_center/message_center.h"
-#include "ui/message_center/notification.h"
-
-using chromeos::DeviceState;
-using chromeos::NetworkConfigurationHandler;
-using chromeos::NetworkConnectionHandler;
-using chromeos::NetworkHandler;
-using chromeos::NetworkProfile;
-using chromeos::NetworkProfileHandler;
-using chromeos::NetworkState;
-using chromeos::NetworkStateHandler;
-using chromeos::NetworkTypePattern;
-
-namespace ash {
-
-namespace {
-
-// TODO(stevenjb): This should be in service_constants.h
-const char kErrorInProgress[] = "org.chromium.flimflam.Error.InProgress";
-
-// Returns true for carriers that can be activated through Shill instead of
-// through a WebUI dialog.
-bool IsDirectActivatedCarrier(const std::string& carrier) {
- if (carrier == shill::kCarrierSprint)
- return true;
- return false;
-}
-
-void ShowErrorNotification(const std::string& error_name,
- const std::string& shill_error,
- const std::string& service_path) {
- Shell::GetInstance()->system_tray_notifier()->network_state_notifier()->
- ShowNetworkConnectError(error_name, shill_error, service_path);
-}
-
-void HandleUnconfiguredNetwork(const std::string& service_path,
- gfx::NativeWindow parent_window) {
- const NetworkState* network = NetworkHandler::Get()->network_state_handler()->
- GetNetworkState(service_path);
- if (!network) {
- NET_LOG_ERROR("Configuring unknown network", service_path);
- return;
- }
-
- if (network->type() == shill::kTypeWifi) {
- // Only show the config view for secure networks, otherwise do nothing.
- if (network->security() != shill::kSecurityNone) {
- ash::Shell::GetInstance()->system_tray_delegate()->
- ShowNetworkConfigure(service_path, parent_window);
- }
- return;
- }
-
- if (network->type() == shill::kTypeWimax ||
- network->type() == shill::kTypeVPN) {
- ash::Shell::GetInstance()->system_tray_delegate()->
- ShowNetworkConfigure(service_path, parent_window);
- return;
- }
-
- if (network->type() == shill::kTypeCellular) {
- if (network->RequiresActivation()) {
- ash::network_connect::ActivateCellular(service_path);
- return;
- }
- if (network->cellular_out_of_credits()) {
- ash::network_connect::ShowMobileSetup(service_path);
- return;
- }
- // No special configure or setup for |network|, show the settings UI.
- if (chromeos::LoginState::Get()->IsUserLoggedIn()) {
- ash::Shell::GetInstance()->system_tray_delegate()->
- ShowNetworkSettings(service_path);
- }
- return;
- }
- NOTREACHED();
-}
-
-void OnConnectFailed(const std::string& service_path,
- gfx::NativeWindow parent_window,
- const std::string& error_name,
- scoped_ptr<base::DictionaryValue> error_data) {
- NET_LOG_ERROR("Connect Failed: " + error_name, service_path);
-
- if (!ash::Shell::HasInstance())
- return;
-
- // If a new connect attempt canceled this connect, no need to notify the user.
- if (error_name == NetworkConnectionHandler::kErrorConnectCanceled)
- return;
-
- if (error_name == shill::kErrorBadPassphrase ||
- error_name == NetworkConnectionHandler::kErrorPassphraseRequired ||
- error_name == NetworkConnectionHandler::kErrorConfigurationRequired ||
- error_name == NetworkConnectionHandler::kErrorAuthenticationRequired) {
- HandleUnconfiguredNetwork(service_path, parent_window);
- return;
- }
-
- if (error_name == NetworkConnectionHandler::kErrorCertificateRequired) {
- if (!ash::Shell::GetInstance()->system_tray_delegate()->EnrollNetwork(
- service_path, parent_window)) {
- HandleUnconfiguredNetwork(service_path, parent_window);
- }
- return;
- }
-
- if (error_name == NetworkConnectionHandler::kErrorActivationRequired) {
- network_connect::ActivateCellular(service_path);
- return;
- }
-
- if (error_name == NetworkConnectionHandler::kErrorConnected ||
- error_name == NetworkConnectionHandler::kErrorConnecting) {
- network_connect::ShowNetworkSettings(service_path);
- return;
- }
-
- // ConnectFailed or unknown error; show a notification.
- std::string shill_error;
- error_data.get()->GetString(
- chromeos::network_handler::kErrorDetail, &shill_error);
- ShowErrorNotification(error_name, shill_error, service_path);
-
- // Only show a configure dialog if there was a ConnectFailed error and the
- // screen is not locked.
- if (error_name != shill::kErrorConnectFailed ||
- Shell::GetInstance()->session_state_delegate()->IsScreenLocked())
- return;
-
- // If Shill reports an InProgress error, don't try to configure the network.
- std::string dbus_error_name;
- error_data.get()->GetString(
- chromeos::network_handler::kDbusErrorName, &dbus_error_name);
- if (dbus_error_name == kErrorInProgress)
- return;
-
- HandleUnconfiguredNetwork(service_path, parent_window);
-}
-
-void OnConnectSucceeded(const std::string& service_path) {
- NET_LOG_USER("Connect Succeeded", service_path);
- if (!ash::Shell::HasInstance())
- return;
- message_center::MessageCenter::Get()->RemoveNotification(
- network_connect::kNetworkConnectNotificationId, false /* not by user */);
-}
-
-// If |check_error_state| is true, error state for the network is checked,
-// otherwise any current error state is ignored (e.g. for recently configured
-// networks or repeat connect attempts). |parent_window| will be used to parent
-// any configuration UI on failure and may be NULL (in which case the default
-// window will be used).
-void CallConnectToNetwork(const std::string& service_path,
- bool check_error_state,
- gfx::NativeWindow parent_window) {
- if (!ash::Shell::HasInstance())
- return;
- message_center::MessageCenter::Get()->RemoveNotification(
- network_connect::kNetworkConnectNotificationId, false /* not by user */);
-
- NetworkHandler::Get()->network_connection_handler()->ConnectToNetwork(
- service_path,
- base::Bind(&OnConnectSucceeded, service_path),
- base::Bind(&OnConnectFailed, service_path, parent_window),
- check_error_state);
-}
-
-void OnActivateFailed(const std::string& service_path,
- const std::string& error_name,
- scoped_ptr<base::DictionaryValue> error_data) {
- NET_LOG_ERROR("Unable to activate network", service_path);
- ShowErrorNotification(
- network_connect::kErrorActivateFailed, "", service_path);
-}
-
-void OnActivateSucceeded(const std::string& service_path) {
- NET_LOG_USER("Activation Succeeded", service_path);
-}
-
-void OnConfigureFailed(const std::string& error_name,
- scoped_ptr<base::DictionaryValue> error_data) {
- NET_LOG_ERROR("Unable to configure network", "");
- ShowErrorNotification(
- NetworkConnectionHandler::kErrorConfigureFailed, "", "");
-}
-
-void OnConfigureSucceeded(const std::string& service_path) {
- NET_LOG_USER("Configure Succeeded", service_path);
- // After configuring a network, ignore any (possibly stale) error state.
- const bool check_error_state = false;
- const gfx::NativeWindow parent_window = NULL;
- CallConnectToNetwork(service_path, check_error_state, parent_window);
-}
-
-void SetPropertiesFailed(const std::string& desc,
- const std::string& service_path,
- const std::string& config_error_name,
- scoped_ptr<base::DictionaryValue> error_data) {
- NET_LOG_ERROR(desc + ": Failed: " + config_error_name, service_path);
- ShowErrorNotification(
- NetworkConnectionHandler::kErrorConfigureFailed, "", service_path);
-}
-
-void SetPropertiesToClear(base::DictionaryValue* properties_to_set,
- std::vector<std::string>* properties_to_clear) {
- // Move empty string properties to properties_to_clear.
- for (base::DictionaryValue::Iterator iter(*properties_to_set);
- !iter.IsAtEnd(); iter.Advance()) {
- std::string value_str;
- if (iter.value().GetAsString(&value_str) && value_str.empty())
- properties_to_clear->push_back(iter.key());
- }
- // Remove cleared properties from properties_to_set.
- for (std::vector<std::string>::iterator iter = properties_to_clear->begin();
- iter != properties_to_clear->end(); ++iter) {
- properties_to_set->RemoveWithoutPathExpansion(*iter, NULL);
- }
-}
-
-void ClearPropertiesAndConnect(
- const std::string& service_path,
- const std::vector<std::string>& properties_to_clear) {
- NET_LOG_USER("ClearPropertiesAndConnect", service_path);
- // After configuring a network, ignore any (possibly stale) error state.
- const bool check_error_state = false;
- const gfx::NativeWindow parent_window = NULL;
- NetworkHandler::Get()->network_configuration_handler()->ClearProperties(
- service_path,
- properties_to_clear,
- base::Bind(&CallConnectToNetwork,
- service_path, check_error_state,
- parent_window),
- base::Bind(&SetPropertiesFailed, "ClearProperties", service_path));
-}
-
-// Returns false if !shared and no valid profile is available, which will
-// trigger an error and abort.
-bool GetNetworkProfilePath(bool shared, std::string* profile_path) {
- if (shared) {
- *profile_path = NetworkProfileHandler::kSharedProfilePath;
- return true;
- }
-
- if (!chromeos::LoginState::Get()->IsUserAuthenticated()) {
- NET_LOG_ERROR("User profile specified before login", "");
- return false;
- }
-
- const NetworkProfile* profile =
- NetworkHandler::Get()->network_profile_handler()->
- GetDefaultUserProfile();
- if (!profile) {
- NET_LOG_ERROR("No user profile for unshared network configuration", "");
- return false;
- }
-
- *profile_path = profile->path;
- return true;
-}
-
-void ConfigureSetProfileSucceeded(
- const std::string& service_path,
- scoped_ptr<base::DictionaryValue> properties_to_set) {
- std::vector<std::string> properties_to_clear;
- SetPropertiesToClear(properties_to_set.get(), &properties_to_clear);
- NetworkHandler::Get()->network_configuration_handler()->SetProperties(
- service_path,
- *properties_to_set,
- base::Bind(&ClearPropertiesAndConnect,
- service_path,
- properties_to_clear),
- base::Bind(&SetPropertiesFailed, "SetProperties", service_path));
-}
-
-const NetworkState* GetNetworkState(const std::string& service_path) {
- return NetworkHandler::Get()->network_state_handler()->
- GetNetworkState(service_path);
-}
-
-} // namespace
-
-namespace network_connect {
-
-const char kNetworkConnectNotificationId[] =
- "chrome://settings/internet/connect";
-const char kNetworkActivateNotificationId[] =
- "chrome://settings/internet/activate";
-
-const char kErrorActivateFailed[] = "activate-failed";
-
-void ConnectToNetwork(const std::string& service_path,
- gfx::NativeWindow parent_window) {
- NET_LOG_USER("ConnectToNetwork", service_path);
- const NetworkState* network = GetNetworkState(service_path);
- if (network && !network->error().empty()) {
- NET_LOG_USER("Configure: " + network->error(), service_path);
- // If the network is in an error state, show the configuration UI directly
- // to avoid a spurious notification.
- HandleUnconfiguredNetwork(service_path, parent_window);
- return;
- }
- const bool check_error_state = true;
- CallConnectToNetwork(service_path, check_error_state, parent_window);
-}
-
-void SetTechnologyEnabled(const NetworkTypePattern& technology,
- bool enabled_state) {
- std::string log_string =
- base::StringPrintf("technology %s, target state: %s",
- technology.ToDebugString().c_str(),
- (enabled_state ? "ENABLED" : "DISABLED"));
- NET_LOG_USER("SetTechnologyEnabled", log_string);
- NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
- bool enabled = handler->IsTechnologyEnabled(technology);
- if (enabled_state == enabled) {
- NET_LOG_USER("Technology already in target state.", log_string);
- return;
- }
- if (enabled) {
- // User requested to disable the technology.
- handler->SetTechnologyEnabled(
- technology, false, chromeos::network_handler::ErrorCallback());
- return;
- }
- // If we're dealing with a mobile network, then handle SIM lock here.
- // SIM locking only applies to cellular, so the code below won't execute
- // if |technology| has been explicitly set to WiMAX.
- if (technology.MatchesPattern(NetworkTypePattern::Mobile())) {
- const DeviceState* mobile = handler->GetDeviceStateByType(technology);
- if (!mobile) {
- NET_LOG_ERROR("SetTechnologyEnabled with no device", log_string);
- return;
- }
- // The following only applies to cellular.
- if (mobile->type() == shill::kTypeCellular) {
- if (mobile->IsSimAbsent()) {
- // If this is true, then we have a cellular device with no SIM inserted.
- // TODO(armansito): Chrome should display a notification here, prompting
- // the user to insert a SIM card and restart the device to enable
- // cellular. See crbug.com/125171.
- NET_LOG_USER("Cannot enable cellular device without SIM.", log_string);
- return;
- }
- if (!mobile->sim_lock_type().empty()) {
- // A SIM has been inserted, but it is locked. Let the user unlock it
- // via the dialog.
- ash::Shell::GetInstance()->system_tray_delegate()->
- ShowMobileSimDialog();
- return;
- }
- }
- }
- handler->SetTechnologyEnabled(
- technology, true, chromeos::network_handler::ErrorCallback());
-}
-
-void ActivateCellular(const std::string& service_path) {
- NET_LOG_USER("ActivateCellular", service_path);
- const NetworkState* cellular = GetNetworkState(service_path);
- if (!cellular || cellular->type() != shill::kTypeCellular) {
- NET_LOG_ERROR("ActivateCellular with no Service", service_path);
- return;
- }
- const DeviceState* cellular_device =
- NetworkHandler::Get()->network_state_handler()->
- GetDeviceState(cellular->device_path());
- if (!cellular_device) {
- NET_LOG_ERROR("ActivateCellular with no Device", service_path);
- return;
- }
- if (!IsDirectActivatedCarrier(cellular_device->carrier())) {
- // For non direct activation, show the mobile setup dialog which can be
- // used to activate the network.
- ShowMobileSetup(service_path);
- return;
- }
- if (cellular->activation_state() == shill::kActivationStateActivated) {
- NET_LOG_ERROR("ActivateCellular for activated service", service_path);
- return;
- }
-
- NetworkHandler::Get()->network_activation_handler()->Activate(
- service_path,
- "", // carrier
- base::Bind(&OnActivateSucceeded, service_path),
- base::Bind(&OnActivateFailed, service_path));
-}
-
-void ShowMobileSetup(const std::string& service_path) {
- NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
- const NetworkState* cellular = handler->GetNetworkState(service_path);
- if (!cellular || cellular->type() != shill::kTypeCellular) {
- NET_LOG_ERROR("ShowMobileSetup without Cellular network", service_path);
- return;
- }
- if (cellular->activation_state() != shill::kActivationStateActivated &&
- cellular->activate_over_non_cellular_networks() &&
- !handler->DefaultNetwork()) {
- message_center::MessageCenter::Get()->AddNotification(
- message_center::Notification::CreateSystemNotification(
- kNetworkActivateNotificationId,
- l10n_util::GetStringUTF16(IDS_NETWORK_ACTIVATION_ERROR_TITLE),
- l10n_util::GetStringFUTF16(IDS_NETWORK_ACTIVATION_NEEDS_CONNECTION,
- UTF8ToUTF16(cellular->name())),
- ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- IDR_AURA_UBER_TRAY_CELLULAR_NETWORK_FAILED),
- ash::system_notifier::kNotifierNetwork,
- base::Bind(&ash::network_connect::ShowNetworkSettings,
- service_path)));
- return;
- }
- ash::Shell::GetInstance()->system_tray_delegate()->ShowMobileSetupDialog(
- service_path);
-}
-
-void ConfigureNetworkAndConnect(const std::string& service_path,
- const base::DictionaryValue& properties,
- bool shared) {
- NET_LOG_USER("ConfigureNetworkAndConnect", service_path);
-
- scoped_ptr<base::DictionaryValue> properties_to_set(properties.DeepCopy());
-
- std::string profile_path;
- if (!GetNetworkProfilePath(shared, &profile_path)) {
- ShowErrorNotification(
- NetworkConnectionHandler::kErrorConfigureFailed, "", service_path);
- return;
- }
- NetworkHandler::Get()->network_configuration_handler()->SetNetworkProfile(
- service_path, profile_path,
- base::Bind(&ConfigureSetProfileSucceeded,
- service_path, base::Passed(&properties_to_set)),
- base::Bind(&SetPropertiesFailed,
- "SetProfile: " + profile_path, service_path));
-}
-
-void CreateConfigurationAndConnect(base::DictionaryValue* properties,
- bool shared) {
- NET_LOG_USER("CreateConfigurationAndConnect", "");
- std::string profile_path;
- if (!GetNetworkProfilePath(shared, &profile_path)) {
- ShowErrorNotification(
- NetworkConnectionHandler::kErrorConfigureFailed, "", "");
- return;
- }
- properties->SetStringWithoutPathExpansion(
- shill::kProfileProperty, profile_path);
- NetworkHandler::Get()->network_configuration_handler()->CreateConfiguration(
- *properties,
- base::Bind(&OnConfigureSucceeded),
- base::Bind(&OnConfigureFailed));
-}
-
-string16 ErrorString(const std::string& error,
- const std::string& service_path) {
- if (error.empty())
- return string16();
- if (error == shill::kErrorOutOfRange)
- return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_OUT_OF_RANGE);
- if (error == shill::kErrorPinMissing)
- return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_PIN_MISSING);
- if (error == shill::kErrorDhcpFailed)
- return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_DHCP_FAILED);
- if (error == shill::kErrorConnectFailed)
- return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_CONNECT_FAILED);
- if (error == shill::kErrorBadPassphrase)
- return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_BAD_PASSPHRASE);
- if (error == shill::kErrorBadWEPKey)
- return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_BAD_WEPKEY);
- if (error == shill::kErrorActivationFailed) {
- return l10n_util::GetStringUTF16(
- IDS_CHROMEOS_NETWORK_ERROR_ACTIVATION_FAILED);
- }
- if (error == shill::kErrorNeedEvdo)
- return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_NEED_EVDO);
- if (error == shill::kErrorNeedHomeNetwork) {
- return l10n_util::GetStringUTF16(
- IDS_CHROMEOS_NETWORK_ERROR_NEED_HOME_NETWORK);
- }
- if (error == shill::kErrorOtaspFailed)
- return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_OTASP_FAILED);
- if (error == shill::kErrorAaaFailed)
- return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_AAA_FAILED);
- if (error == shill::kErrorInternal)
- return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_INTERNAL);
- if (error == shill::kErrorDNSLookupFailed) {
- return l10n_util::GetStringUTF16(
- IDS_CHROMEOS_NETWORK_ERROR_DNS_LOOKUP_FAILED);
- }
- if (error == shill::kErrorHTTPGetFailed) {
- return l10n_util::GetStringUTF16(
- IDS_CHROMEOS_NETWORK_ERROR_HTTP_GET_FAILED);
- }
- if (error == shill::kErrorIpsecPskAuthFailed) {
- return l10n_util::GetStringUTF16(
- IDS_CHROMEOS_NETWORK_ERROR_IPSEC_PSK_AUTH_FAILED);
- }
- if (error == shill::kErrorIpsecCertAuthFailed) {
- return l10n_util::GetStringUTF16(
- IDS_CHROMEOS_NETWORK_ERROR_CERT_AUTH_FAILED);
- }
- if (error == shill::kErrorEapAuthenticationFailed) {
- const NetworkState* network = GetNetworkState(service_path);
- // TLS always requires a client certificate, so show a cert auth
- // failed message for TLS. Other EAP methods do not generally require
- // a client certicate.
- if (network && network->eap_method() == shill::kEapMethodTLS) {
- return l10n_util::GetStringUTF16(
- IDS_CHROMEOS_NETWORK_ERROR_CERT_AUTH_FAILED);
- } else {
- return l10n_util::GetStringUTF16(
- IDS_CHROMEOS_NETWORK_ERROR_EAP_AUTH_FAILED);
- }
- }
- if (error == shill::kErrorEapLocalTlsFailed) {
- return l10n_util::GetStringUTF16(
- IDS_CHROMEOS_NETWORK_ERROR_EAP_LOCAL_TLS_FAILED);
- }
- if (error == shill::kErrorEapRemoteTlsFailed) {
- return l10n_util::GetStringUTF16(
- IDS_CHROMEOS_NETWORK_ERROR_EAP_REMOTE_TLS_FAILED);
- }
- if (error == shill::kErrorPppAuthFailed) {
- return l10n_util::GetStringUTF16(
- IDS_CHROMEOS_NETWORK_ERROR_PPP_AUTH_FAILED);
- }
-
- if (StringToLowerASCII(error) ==
- StringToLowerASCII(std::string(shill::kUnknownString))) {
- return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_UNKNOWN);
- }
- return l10n_util::GetStringFUTF16(IDS_NETWORK_UNRECOGNIZED_ERROR,
- UTF8ToUTF16(error));
-}
-
-void ShowNetworkSettings(const std::string& service_path) {
- if (!ash::Shell::HasInstance())
- return;
- ash::Shell::GetInstance()->system_tray_delegate()->ShowNetworkSettings(
- service_path);
-}
-
-} // network_connect
-} // ash
diff --git a/chromium/ash/system/chromeos/network/network_connect.h b/chromium/ash/system/chromeos/network/network_connect.h
deleted file mode 100644
index adf939de8b4..00000000000
--- a/chromium/ash/system/chromeos/network/network_connect.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_CONNECT_H
-#define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_CONNECT_H
-
-#include <string>
-
-#include "ash/ash_export.h"
-#include "base/strings/string16.h"
-#include "ui/gfx/native_widget_types.h" // gfx::NativeWindow
-
-namespace base {
-class DictionaryValue;
-}
-
-namespace chromeos {
-class NetworkTypePattern;
-}
-
-namespace ash {
-namespace network_connect {
-
-ASH_EXPORT extern const char kNetworkConnectNotificationId[];
-ASH_EXPORT extern const char kNetworkActivateNotificationId[];
-
-ASH_EXPORT extern const char kErrorActivateFailed[];
-
-// Requests a network connection and handles any errors and notifications.
-// |parent_window| is used to parent any UI on failure (e.g. for certificate
-// enrollment). If NULL, the default window will be used.
-ASH_EXPORT void ConnectToNetwork(const std::string& service_path,
- gfx::NativeWindow parent_window);
-
-// Enables or disables a network technology. If |technology| refers to cellular
-// and the device cannot be enabled due to a SIM lock, this function will
-// launch the SIM unlock dialog.
-ASH_EXPORT void SetTechnologyEnabled(
- const chromeos::NetworkTypePattern& technology,
- bool enabled_state);
-
-// Requests network activation and handles any errors and notifications.
-ASH_EXPORT void ActivateCellular(const std::string& service_path);
-
-// Determines whether or not a network requires a connection to activate or
-// setup and either shows a notification or opens the mobile setup dialog.
-ASH_EXPORT void ShowMobileSetup(const std::string& service_path);
-
-// Configures a network with a dictionary of Shill properties, then sends a
-// connect request. The profile is set according to 'shared' if allowed.
-ASH_EXPORT void ConfigureNetworkAndConnect(
- const std::string& service_path,
- const base::DictionaryValue& properties,
- bool shared);
-
-// Requests a new network configuration to be created from a dictionary of
-// Shill properties. The profile used is determined by |shared|.
-ASH_EXPORT void CreateConfigurationAndConnect(base::DictionaryValue* properties,
- bool shared);
-
-// Returns the localized string for shill error string |error|.
-ASH_EXPORT base::string16 ErrorString(const std::string& error,
- const std::string& service_path);
-
-// Shows the settings for the network specified by |service_path|. If empty,
-// or no matching network exists, shows the general internet settings page.
-ASH_EXPORT void ShowNetworkSettings(const std::string& service_path);
-
-} // network_connect
-} // ash
-
-#endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_CONNECT_H
diff --git a/chromium/ash/system/chromeos/network/network_detailed_view.h b/chromium/ash/system/chromeos/network/network_detailed_view.h
deleted file mode 100644
index fe7ac21db0e..00000000000
--- a/chromium/ash/system/chromeos/network/network_detailed_view.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_DETAILED_VIEW_H
-#define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_DETAILED_VIEW_H
-
-#include "ash/system/tray/tray_details_view.h"
-#include "chromeos/network/network_state_handler.h"
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-
-// Abstract base class for all NetworkDetailedView derived subclasses,
-// which includes NetworkWifiDetailedView and NetworkStateListDetailedView.
-class NetworkDetailedView : public TrayDetailsView {
- public:
- enum DetailedViewType {
- LIST_VIEW,
- STATE_LIST_VIEW,
- WIFI_VIEW,
- };
-
- explicit NetworkDetailedView(SystemTrayItem* owner)
- : TrayDetailsView(owner) {
- }
-
- virtual void Init() = 0;
-
- virtual DetailedViewType GetViewType() const = 0;
-
- // Called when network manager state has changed.
- // (Generic update for NetworkTray <> AshSystemTrayDelegate interface).
- virtual void ManagerChanged() = 0;
-
- // Called when the contents of the network list have changed.
- // (Called only from TrayNetworkStateObserver).
- virtual void NetworkListChanged() = 0;
-
- // Called when a network service property has changed.
- // (Called only from TrayNetworkStateObserver).
- virtual void NetworkServiceChanged(const chromeos::NetworkState* network) = 0;
-
- protected:
- virtual ~NetworkDetailedView() {}
-};
-
-} // namespace tray
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_DETAILED_VIEW_H
diff --git a/chromium/ash/system/chromeos/network/network_icon.cc b/chromium/ash/system/chromeos/network/network_icon.cc
deleted file mode 100644
index d3c489934a7..00000000000
--- a/chromium/ash/system/chromeos/network/network_icon.cc
+++ /dev/null
@@ -1,846 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/network/network_icon.h"
-
-#include "ash/shell.h"
-#include "ash/system/chromeos/network/network_icon_animation.h"
-#include "ash/system/chromeos/network/network_icon_animation_observer.h"
-#include "base/strings/utf_string_conversions.h"
-#include "chromeos/network/device_state.h"
-#include "chromeos/network/network_connection_handler.h"
-#include "chromeos/network/network_state.h"
-#include "chromeos/network/network_state_handler.h"
-#include "chromeos/network/shill_property_util.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "third_party/cros_system_api/dbus/service_constants.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/image/image_skia_operations.h"
-#include "ui/gfx/image/image_skia_source.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/size_conversions.h"
-
-using chromeos::DeviceState;
-using chromeos::NetworkConnectionHandler;
-using chromeos::NetworkHandler;
-using chromeos::NetworkState;
-using chromeos::NetworkStateHandler;
-using chromeos::NetworkTypePattern;
-
-namespace ash {
-namespace network_icon {
-
-namespace {
-
-//------------------------------------------------------------------------------
-// Struct to pass icon badges to NetworkIconImageSource.
-struct Badges {
- Badges()
- : top_left(NULL),
- top_right(NULL),
- bottom_left(NULL),
- bottom_right(NULL) {
- }
- const gfx::ImageSkia* top_left;
- const gfx::ImageSkia* top_right;
- const gfx::ImageSkia* bottom_left;
- const gfx::ImageSkia* bottom_right;
-};
-
-//------------------------------------------------------------------------------
-// class used for maintaining a map of network state and images.
-class NetworkIconImpl {
- public:
- explicit NetworkIconImpl(IconType icon_type);
-
- // Determines whether or not the associated network might be dirty and if so
- // updates and generates the icon. Does nothing if network no longer exists.
- void Update(const chromeos::NetworkState* network);
-
- const gfx::ImageSkia& image() const { return image_; }
-
- private:
- // Updates |strength_index_| for wireless networks. Returns true if changed.
- bool UpdateWirelessStrengthIndex(const chromeos::NetworkState* network);
-
- // Updates the local state for cellular networks. Returns true if changed.
- bool UpdateCellularState(const chromeos::NetworkState* network);
-
- // Updates the VPN badge. Returns true if changed.
- bool UpdateVPNBadge();
-
- // Gets |badges| based on |network| and the current state.
- void GetBadges(const NetworkState* network, Badges* badges);
-
- // Gets the appropriate icon and badges and composites the image.
- void GenerateImage(const chromeos::NetworkState* network);
-
- // Defines color theme and VPN badging
- const IconType icon_type_;
-
- // Cached state of the network when the icon was last generated.
- std::string state_;
-
- // Cached strength index of the network when the icon was last generated.
- int strength_index_;
-
- // Cached technology badge for the network when the icon was last generated.
- const gfx::ImageSkia* technology_badge_;
-
- // Cached vpn badge for the network when the icon was last generated.
- const gfx::ImageSkia* vpn_badge_;
-
- // Cached roaming state of the network when the icon was last generated.
- std::string roaming_state_;
-
- // Generated icon image.
- gfx::ImageSkia image_;
-
- DISALLOW_COPY_AND_ASSIGN(NetworkIconImpl);
-};
-
-//------------------------------------------------------------------------------
-// Maintain a static (global) icon map. Note: Icons are never destroyed;
-// it is assumed that a finite and reasonable number of network icons will be
-// created during a session.
-
-typedef std::map<std::string, NetworkIconImpl*> NetworkIconMap;
-
-NetworkIconMap* GetIconMapInstance(IconType icon_type, bool create) {
- typedef std::map<IconType, NetworkIconMap*> IconTypeMap;
- static IconTypeMap* s_icon_map = NULL;
- if (s_icon_map == NULL) {
- if (!create)
- return NULL;
- s_icon_map = new IconTypeMap;
- }
- if (s_icon_map->count(icon_type) == 0) {
- if (!create)
- return NULL;
- (*s_icon_map)[icon_type] = new NetworkIconMap;
- }
- return (*s_icon_map)[icon_type];
-}
-
-NetworkIconMap* GetIconMap(IconType icon_type) {
- return GetIconMapInstance(icon_type, true);
-}
-
-void PurgeIconMap(IconType icon_type,
- const std::set<std::string>& network_paths) {
- NetworkIconMap* icon_map = GetIconMapInstance(icon_type, false);
- if (!icon_map)
- return;
- for (NetworkIconMap::iterator loop_iter = icon_map->begin();
- loop_iter != icon_map->end(); ) {
- NetworkIconMap::iterator cur_iter = loop_iter++;
- if (network_paths.count(cur_iter->first) == 0) {
- delete cur_iter->second;
- icon_map->erase(cur_iter);
- }
- }
-}
-
-//------------------------------------------------------------------------------
-// Utilities for generating icon images.
-
-// 'NONE' will default to ARCS behavior where appropriate (e.g. no network or
-// if a new type gets added).
-enum ImageType {
- ARCS,
- BARS,
- NONE
-};
-
-// Amount to fade icons while connecting.
-const double kConnectingImageAlpha = 0.5;
-
-// Images for strength bars for wired networks.
-const int kNumBarsImages = 5;
-
-// Imagaes for strength arcs for wireless networks.
-const int kNumArcsImages = 5;
-
-// Number of discrete images to use for alpha fade animation
-const int kNumFadeImages = 10;
-
-//------------------------------------------------------------------------------
-// Classes for generating scaled images.
-
-const SkBitmap GetEmptyBitmap(const gfx::Size pixel_size) {
- typedef std::pair<int, int> SizeKey;
- typedef std::map<SizeKey, SkBitmap> SizeBitmapMap;
- static SizeBitmapMap* s_empty_bitmaps = new SizeBitmapMap;
-
- SizeKey key(pixel_size.width(), pixel_size.height());
-
- SizeBitmapMap::iterator iter = s_empty_bitmaps->find(key);
- if (iter != s_empty_bitmaps->end())
- return iter->second;
-
- SkBitmap empty;
- empty.setConfig(SkBitmap::kARGB_8888_Config, key.first, key.second);
- empty.allocPixels();
- empty.eraseARGB(0, 0, 0, 0);
- (*s_empty_bitmaps)[key] = empty;
- return empty;
-}
-
-class EmptyImageSource: public gfx::ImageSkiaSource {
- public:
- explicit EmptyImageSource(const gfx::Size& size)
- : size_(size) {
- }
-
- virtual gfx::ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
- gfx::Size pixel_size = gfx::ToFlooredSize(gfx::ScaleSize(size_, scale));
- SkBitmap empty_bitmap = GetEmptyBitmap(pixel_size);
- return gfx::ImageSkiaRep(empty_bitmap, scale);
- }
-
- private:
- const gfx::Size size_;
-
- DISALLOW_COPY_AND_ASSIGN(EmptyImageSource);
-};
-
-// This defines how we assemble a network icon.
-class NetworkIconImageSource : public gfx::ImageSkiaSource {
- public:
- NetworkIconImageSource(const gfx::ImageSkia& icon, const Badges& badges)
- : icon_(icon),
- badges_(badges) {
- }
- virtual ~NetworkIconImageSource() {}
-
- // TODO(pkotwicz): Figure out what to do when a new image resolution becomes
- // available.
- virtual gfx::ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
- gfx::ImageSkiaRep icon_rep = icon_.GetRepresentation(scale);
- if (icon_rep.is_null())
- return gfx::ImageSkiaRep();
- gfx::Canvas canvas(icon_rep, false);
- if (badges_.top_left)
- canvas.DrawImageInt(*badges_.top_left, 0, 0);
- if (badges_.top_right)
- canvas.DrawImageInt(*badges_.top_right,
- icon_.width() - badges_.top_right->width(), 0);
- if (badges_.bottom_left) {
- canvas.DrawImageInt(*badges_.bottom_left,
- 0, icon_.height() - badges_.bottom_left->height());
- }
- if (badges_.bottom_right) {
- canvas.DrawImageInt(*badges_.bottom_right,
- icon_.width() - badges_.bottom_right->width(),
- icon_.height() - badges_.bottom_right->height());
- }
- return canvas.ExtractImageRep();
- }
-
- private:
- const gfx::ImageSkia icon_;
- const Badges badges_;
-
- DISALLOW_COPY_AND_ASSIGN(NetworkIconImageSource);
-};
-
-//------------------------------------------------------------------------------
-// Utilities for extracting icon images.
-
-bool IconTypeIsDark(IconType icon_type) {
- return (icon_type != ICON_TYPE_TRAY);
-}
-
-bool IconTypeHasVPNBadge(IconType icon_type) {
- return (icon_type != ICON_TYPE_LIST);
-}
-
-int NumImagesForType(ImageType type) {
- return (type == BARS) ? kNumBarsImages : kNumArcsImages;
-}
-
-gfx::ImageSkia* BaseImageForType(ImageType image_type, IconType icon_type) {
- gfx::ImageSkia* image;
- if (image_type == BARS) {
- image = ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IconTypeIsDark(icon_type) ?
- IDR_AURA_UBER_TRAY_NETWORK_BARS_DARK :
- IDR_AURA_UBER_TRAY_NETWORK_BARS_LIGHT);
- } else {
- image = ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IconTypeIsDark(icon_type) ?
- IDR_AURA_UBER_TRAY_NETWORK_ARCS_DARK :
- IDR_AURA_UBER_TRAY_NETWORK_ARCS_LIGHT);
- }
- return image;
-}
-
-ImageType ImageTypeForNetworkType(const std::string& type) {
- if (type == shill::kTypeWifi)
- return ARCS;
- else if (type == shill::kTypeCellular || type == shill::kTypeWimax)
- return BARS;
- return NONE;
-}
-
-gfx::ImageSkia GetImageForIndex(ImageType image_type,
- IconType icon_type,
- int index) {
- int num_images = NumImagesForType(image_type);
- if (index < 0 || index >= num_images)
- return gfx::ImageSkia();
- gfx::ImageSkia* images = BaseImageForType(image_type, icon_type);
- int width = images->width();
- int height = images->height() / num_images;
- return gfx::ImageSkiaOperations::ExtractSubset(*images,
- gfx::Rect(0, index * height, width, height));
-}
-
-const gfx::ImageSkia GetConnectedImage(const std::string& type,
- IconType icon_type) {
- if (type == shill::kTypeVPN) {
- return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IDR_AURA_UBER_TRAY_NETWORK_VPN);
- }
- ImageType image_type = ImageTypeForNetworkType(type);
- const int connected_index = NumImagesForType(image_type) - 1;
- return GetImageForIndex(image_type, icon_type, connected_index);
-}
-
-const gfx::ImageSkia GetDisconnectedImage(const std::string& type,
- IconType icon_type) {
- if (type == shill::kTypeVPN) {
- // Note: same as connected image, shouldn't normally be seen.
- return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IDR_AURA_UBER_TRAY_NETWORK_VPN);
- }
- ImageType image_type = ImageTypeForNetworkType(type);
- const int disconnected_index = 0;
- return GetImageForIndex(image_type, icon_type, disconnected_index);
-}
-
-gfx::ImageSkia* ConnectingWirelessImage(ImageType image_type,
- IconType icon_type,
- double animation) {
- static gfx::ImageSkia* s_bars_images_dark[kNumBarsImages - 1];
- static gfx::ImageSkia* s_bars_images_light[kNumBarsImages - 1];
- static gfx::ImageSkia* s_arcs_images_dark[kNumArcsImages - 1];
- static gfx::ImageSkia* s_arcs_images_light[kNumArcsImages - 1];
- int image_count = NumImagesForType(image_type) - 1;
- int index = animation * nextafter(static_cast<float>(image_count), 0);
- index = std::max(std::min(index, image_count - 1), 0);
- gfx::ImageSkia** images;
- bool dark = IconTypeIsDark(icon_type);
- if (image_type == BARS)
- images = dark ? s_bars_images_dark : s_bars_images_light;
- else
- images = dark ? s_arcs_images_dark : s_arcs_images_light;
- if (!images[index]) {
- // Lazily cache images.
- gfx::ImageSkia source = GetImageForIndex(image_type, icon_type, index + 1);
- images[index] = new gfx::ImageSkia(
- gfx::ImageSkiaOperations::CreateBlendedImage(
- gfx::ImageSkia(new EmptyImageSource(source.size()), source.size()),
- source,
- kConnectingImageAlpha));
- }
- return images[index];
-}
-
-gfx::ImageSkia* ConnectingVpnImage(double animation) {
- int index = animation * nextafter(static_cast<float>(kNumFadeImages), 0);
- static gfx::ImageSkia* s_vpn_images[kNumFadeImages];
- if (!s_vpn_images[index]) {
- // Lazily cache images.
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- gfx::ImageSkia* icon = rb.GetImageSkiaNamed(IDR_AURA_UBER_TRAY_NETWORK_VPN);
- s_vpn_images[index] = new gfx::ImageSkia(
- gfx::ImageSkiaOperations::CreateBlendedImage(
- gfx::ImageSkia(new EmptyImageSource(icon->size()), icon->size()),
- *icon,
- animation));
- }
- return s_vpn_images[index];
-}
-
-gfx::ImageSkia* ConnectingVpnBadge(double animation) {
- int index = animation * nextafter(static_cast<float>(kNumFadeImages), 0);
- static gfx::ImageSkia* s_vpn_badges[kNumFadeImages];
- if (!s_vpn_badges[index]) {
- // Lazily cache images.
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- gfx::ImageSkia* icon =
- rb.GetImageSkiaNamed(IDR_AURA_UBER_TRAY_NETWORK_WIRED); // For size
- gfx::ImageSkia* badge =
- rb.GetImageSkiaNamed(IDR_AURA_UBER_TRAY_NETWORK_VPN_BADGE);
- s_vpn_badges[index] = new gfx::ImageSkia(
- gfx::ImageSkiaOperations::CreateBlendedImage(
- gfx::ImageSkia(new EmptyImageSource(icon->size()), icon->size()),
- *badge,
- animation));
- }
- return s_vpn_badges[index];
-}
-
-int StrengthIndex(int strength, int count) {
- // Return an index in the range [1, count-1].
- const float findex = (static_cast<float>(strength) / 100.0f) *
- nextafter(static_cast<float>(count - 1), 0);
- int index = 1 + static_cast<int>(findex);
- index = std::max(std::min(index, count - 1), 1);
- return index;
-}
-
-int GetStrengthIndex(const NetworkState* network) {
- ImageType image_type = ImageTypeForNetworkType(network->type());
- if (image_type == ARCS)
- return StrengthIndex(network->signal_strength(), kNumArcsImages);
- else if (image_type == BARS)
- return StrengthIndex(network->signal_strength(), kNumBarsImages);
- return 0;
-}
-
-const gfx::ImageSkia* BadgeForNetworkTechnology(const NetworkState* network,
- IconType icon_type) {
- const int kUnknownBadgeType = -1;
- int id = kUnknownBadgeType;
- const std::string& technology = network->network_technology();
- if (technology == shill::kNetworkTechnologyEvdo) {
- id = IconTypeIsDark(icon_type) ?
- IDR_AURA_UBER_TRAY_NETWORK_EVDO_DARK :
- IDR_AURA_UBER_TRAY_NETWORK_EVDO_LIGHT;
- } else if (technology == shill::kNetworkTechnology1Xrtt) {
- id = IDR_AURA_UBER_TRAY_NETWORK_1X;
- } else if (technology == shill::kNetworkTechnologyGprs) {
- id = IconTypeIsDark(icon_type) ?
- IDR_AURA_UBER_TRAY_NETWORK_GPRS_DARK :
- IDR_AURA_UBER_TRAY_NETWORK_GPRS_LIGHT;
- } else if (technology == shill::kNetworkTechnologyEdge) {
- id = IconTypeIsDark(icon_type) ?
- IDR_AURA_UBER_TRAY_NETWORK_EDGE_DARK :
- IDR_AURA_UBER_TRAY_NETWORK_EDGE_LIGHT;
- } else if (technology == shill::kNetworkTechnologyUmts) {
- id = IconTypeIsDark(icon_type) ?
- IDR_AURA_UBER_TRAY_NETWORK_3G_DARK :
- IDR_AURA_UBER_TRAY_NETWORK_3G_LIGHT;
- } else if (technology == shill::kNetworkTechnologyHspa) {
- id = IconTypeIsDark(icon_type) ?
- IDR_AURA_UBER_TRAY_NETWORK_HSPA_DARK :
- IDR_AURA_UBER_TRAY_NETWORK_HSPA_LIGHT;
- } else if (technology == shill::kNetworkTechnologyHspaPlus) {
- id = IconTypeIsDark(icon_type) ?
- IDR_AURA_UBER_TRAY_NETWORK_HSPA_PLUS_DARK :
- IDR_AURA_UBER_TRAY_NETWORK_HSPA_PLUS_LIGHT;
- } else if (technology == shill::kNetworkTechnologyLte) {
- id = IconTypeIsDark(icon_type) ?
- IDR_AURA_UBER_TRAY_NETWORK_LTE_DARK :
- IDR_AURA_UBER_TRAY_NETWORK_LTE_LIGHT;
- } else if (technology == shill::kNetworkTechnologyLteAdvanced) {
- id = IconTypeIsDark(icon_type) ?
- IDR_AURA_UBER_TRAY_NETWORK_LTE_ADVANCED_DARK :
- IDR_AURA_UBER_TRAY_NETWORK_LTE_ADVANCED_LIGHT;
- } else if (technology == shill::kNetworkTechnologyGsm) {
- id = IconTypeIsDark(icon_type) ?
- IDR_AURA_UBER_TRAY_NETWORK_GPRS_DARK :
- IDR_AURA_UBER_TRAY_NETWORK_GPRS_LIGHT;
- }
- if (id == kUnknownBadgeType)
- return NULL;
- else
- return ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(id);
-}
-
-const gfx::ImageSkia* BadgeForVPN(IconType icon_type) {
- return ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IDR_AURA_UBER_TRAY_NETWORK_VPN_BADGE);
-}
-
-gfx::ImageSkia GetIcon(const NetworkState* network,
- IconType icon_type,
- int strength_index) {
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- if (network->Matches(NetworkTypePattern::Ethernet())) {
- return *rb.GetImageSkiaNamed(IDR_AURA_UBER_TRAY_NETWORK_WIRED);
- } else if (network->Matches(NetworkTypePattern::Wireless())) {
- DCHECK(strength_index > 0);
- return GetImageForIndex(
- ImageTypeForNetworkType(network->type()), icon_type, strength_index);
- } else if (network->Matches(NetworkTypePattern::VPN())) {
- return *rb.GetImageSkiaNamed(IDR_AURA_UBER_TRAY_NETWORK_VPN);
- } else {
- LOG(WARNING) << "Request for icon for unsupported type: "
- << network->type();
- return *rb.GetImageSkiaNamed(IDR_AURA_UBER_TRAY_NETWORK_WIRED);
- }
-}
-
-//------------------------------------------------------------------------------
-// Get connecting images
-
-gfx::ImageSkia GetConnectingVpnImage(IconType icon_type) {
- NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
- const NetworkState* connected_network = NULL;
- if (icon_type == ICON_TYPE_TRAY) {
- connected_network =
- handler->ConnectedNetworkByType(NetworkTypePattern::NonVirtual());
- }
- double animation = NetworkIconAnimation::GetInstance()->GetAnimation();
-
- if (connected_network) {
- gfx::ImageSkia icon = GetImageForNetwork(connected_network, icon_type);
- Badges badges;
- badges.bottom_left = ConnectingVpnBadge(animation);
- return gfx::ImageSkia(
- new NetworkIconImageSource(icon, badges), icon.size());
- } else {
- gfx::ImageSkia* icon = ConnectingVpnImage(animation);
- return gfx::ImageSkia(
- new NetworkIconImageSource(*icon, Badges()), icon->size());
- }
-}
-
-gfx::ImageSkia GetConnectingImage(const std::string& network_type,
- IconType icon_type) {
- if (network_type == shill::kTypeVPN)
- return GetConnectingVpnImage(icon_type);
-
- ImageType image_type = ImageTypeForNetworkType(network_type);
- double animation = NetworkIconAnimation::GetInstance()->GetAnimation();
-
- gfx::ImageSkia* icon = ConnectingWirelessImage(
- image_type, icon_type, animation);
- return gfx::ImageSkia(
- new NetworkIconImageSource(*icon, Badges()), icon->size());
-}
-
-} // namespace
-
-//------------------------------------------------------------------------------
-// NetworkIconImpl
-
-NetworkIconImpl::NetworkIconImpl(IconType icon_type)
- : icon_type_(icon_type),
- strength_index_(-1),
- technology_badge_(NULL),
- vpn_badge_(NULL) {
- // Default image
- image_ = GetDisconnectedImage(shill::kTypeWifi, icon_type);
-}
-
-void NetworkIconImpl::Update(const NetworkState* network) {
- DCHECK(network);
- // Determine whether or not we need to update the icon.
- bool dirty = image_.isNull();
-
- // If the network state has changed, the icon needs updating.
- if (state_ != network->connection_state()) {
- state_ = network->connection_state();
- dirty = true;
- }
-
- if (network->Matches(NetworkTypePattern::Wireless()))
- dirty |= UpdateWirelessStrengthIndex(network);
-
- if (network->Matches(NetworkTypePattern::Cellular()))
- dirty |= UpdateCellularState(network);
-
- if (IconTypeHasVPNBadge(icon_type_) &&
- network->Matches(NetworkTypePattern::NonVirtual())) {
- dirty |= UpdateVPNBadge();
- }
-
- if (dirty) {
- // Set the icon and badges based on the network and generate the image.
- GenerateImage(network);
- }
-}
-
-bool NetworkIconImpl::UpdateWirelessStrengthIndex(const NetworkState* network) {
- int index = GetStrengthIndex(network);
- if (index != strength_index_) {
- strength_index_ = index;
- return true;
- }
- return false;
-}
-
-bool NetworkIconImpl::UpdateCellularState(const NetworkState* network) {
- bool dirty = false;
- const gfx::ImageSkia* technology_badge =
- BadgeForNetworkTechnology(network, icon_type_);
- if (technology_badge != technology_badge_) {
- technology_badge_ = technology_badge;
- dirty = true;
- }
- std::string roaming_state = network->roaming();
- if (roaming_state != roaming_state_) {
- roaming_state_ = roaming_state;
- dirty = true;
- }
- return dirty;
-}
-
-bool NetworkIconImpl::UpdateVPNBadge() {
- const NetworkState* vpn = NetworkHandler::Get()->network_state_handler()->
- ConnectedNetworkByType(NetworkTypePattern::VPN());
- if (vpn && vpn_badge_ == NULL) {
- vpn_badge_ = BadgeForVPN(icon_type_);
- return true;
- } else if (!vpn && vpn_badge_ != NULL) {
- vpn_badge_ = NULL;
- return true;
- }
- return false;
-}
-
-void NetworkIconImpl::GetBadges(const NetworkState* network, Badges* badges) {
- DCHECK(network);
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
-
- const std::string& type = network->type();
- if (type == shill::kTypeWifi) {
- if (network->security() != shill::kSecurityNone &&
- IconTypeIsDark(icon_type_)) {
- badges->bottom_right = rb.GetImageSkiaNamed(
- IDR_AURA_UBER_TRAY_NETWORK_SECURE_DARK);
- }
- } else if (type == shill::kTypeWimax) {
- technology_badge_ = rb.GetImageSkiaNamed(
- IconTypeIsDark(icon_type_) ?
- IDR_AURA_UBER_TRAY_NETWORK_4G_DARK :
- IDR_AURA_UBER_TRAY_NETWORK_4G_LIGHT);
- } else if (type == shill::kTypeCellular) {
- if (network->roaming() == shill::kRoamingStateRoaming) {
- // For networks that are always in roaming don't show roaming badge.
- const DeviceState* device =
- handler->GetDeviceState(network->device_path());
- LOG_IF(WARNING, !device) << "Could not find device state for "
- << network->device_path();
- if (!device || !device->provider_requires_roaming()) {
- badges->bottom_right = rb.GetImageSkiaNamed(
- IconTypeIsDark(icon_type_) ?
- IDR_AURA_UBER_TRAY_NETWORK_ROAMING_DARK :
- IDR_AURA_UBER_TRAY_NETWORK_ROAMING_LIGHT);
- }
- }
- }
- if (!network->IsConnectingState()) {
- badges->top_left = technology_badge_;
- badges->bottom_left = vpn_badge_;
- }
-}
-
-void NetworkIconImpl::GenerateImage(const NetworkState* network) {
- DCHECK(network);
- gfx::ImageSkia icon = GetIcon(network, icon_type_, strength_index_);
- Badges badges;
- GetBadges(network, &badges);
- image_ = gfx::ImageSkia(
- new NetworkIconImageSource(icon, badges), icon.size());
-}
-
-//------------------------------------------------------------------------------
-// Public interface
-
-gfx::ImageSkia GetImageForNetwork(const NetworkState* network,
- IconType icon_type) {
- DCHECK(network);
- // Handle connecting icons.
- if (network->IsConnectingState())
- return GetConnectingImage(network->type(), icon_type);
-
- // Find or add the icon.
- NetworkIconMap* icon_map = GetIconMap(icon_type);
- NetworkIconImpl* icon;
- NetworkIconMap::iterator iter = icon_map->find(network->path());
- if (iter == icon_map->end()) {
- icon = new NetworkIconImpl(icon_type);
- icon_map->insert(std::make_pair(network->path(), icon));
- } else {
- icon = iter->second;
- }
-
- // Update and return the icon's image.
- icon->Update(network);
- return icon->image();
-}
-
-gfx::ImageSkia GetImageForConnectedNetwork(IconType icon_type,
- const std::string& network_type) {
- return GetConnectedImage(network_type, icon_type);
-}
-
-gfx::ImageSkia GetImageForConnectingNetwork(IconType icon_type,
- const std::string& network_type) {
- return GetConnectingImage(network_type, icon_type);
-}
-
-gfx::ImageSkia GetImageForDisconnectedNetwork(IconType icon_type,
- const std::string& network_type) {
- return GetDisconnectedImage(network_type, icon_type);
-}
-
-base::string16 GetLabelForNetwork(const chromeos::NetworkState* network,
- IconType icon_type) {
- DCHECK(network);
- std::string activation_state = network->activation_state();
- if (icon_type == ICON_TYPE_LIST) {
- // Show "<network>: [Connecting|Activating]..."
- if (network->IsConnectingState()) {
- return l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_NETWORK_LIST_CONNECTING,
- UTF8ToUTF16(network->name()));
- }
- if (activation_state == shill::kActivationStateActivating) {
- return l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_NETWORK_LIST_ACTIVATING,
- UTF8ToUTF16(network->name()));
- }
- // Show "Activate <network>" in list view only.
- if (activation_state == shill::kActivationStateNotActivated ||
- activation_state == shill::kActivationStatePartiallyActivated) {
- return l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_NETWORK_LIST_ACTIVATE,
- UTF8ToUTF16(network->name()));
- }
- } else {
- // Show "[Connected to|Connecting to|Activating] <network>" (non-list view).
- if (network->IsConnectedState()) {
- return l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_NETWORK_CONNECTED, UTF8ToUTF16(network->name()));
- }
- if (network->IsConnectingState()) {
- return l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_NETWORK_CONNECTING, UTF8ToUTF16(network->name()));
- }
- if (activation_state == shill::kActivationStateActivating) {
- return l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_NETWORK_ACTIVATING, UTF8ToUTF16(network->name()));
- }
- }
-
- // Otherwise just show the network name or 'Ethernet'.
- if (network->Matches(NetworkTypePattern::Ethernet())) {
- return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ETHERNET);
- } else {
- return UTF8ToUTF16(network->name());
- }
-}
-
-int GetCellularUninitializedMsg() {
- static base::Time s_uninitialized_state_time;
- static int s_uninitialized_msg(0);
-
- NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
- if (handler->GetTechnologyState(NetworkTypePattern::Mobile())
- == NetworkStateHandler::TECHNOLOGY_UNINITIALIZED) {
- s_uninitialized_msg = IDS_ASH_STATUS_TRAY_INITIALIZING_CELLULAR;
- s_uninitialized_state_time = base::Time::Now();
- return s_uninitialized_msg;
- } else if (handler->GetScanningByType(NetworkTypePattern::Mobile())) {
- s_uninitialized_msg = IDS_ASH_STATUS_TRAY_CELLULAR_SCANNING;
- s_uninitialized_state_time = base::Time::Now();
- return s_uninitialized_msg;
- }
- // There can be a delay between leaving the Initializing state and when
- // a Cellular device shows up, so keep showing the initializing
- // animation for a bit to avoid flashing the disconnect icon.
- const int kInitializingDelaySeconds = 1;
- base::TimeDelta dtime = base::Time::Now() - s_uninitialized_state_time;
- if (dtime.InSeconds() < kInitializingDelaySeconds)
- return s_uninitialized_msg;
- return 0;
-}
-
-void GetDefaultNetworkImageAndLabel(IconType icon_type,
- gfx::ImageSkia* image,
- base::string16* label,
- bool* animating) {
- NetworkStateHandler* state_handler =
- NetworkHandler::Get()->network_state_handler();
- NetworkConnectionHandler* connect_handler =
- NetworkHandler::Get()->network_connection_handler();
- const NetworkState* connected_network =
- state_handler->ConnectedNetworkByType(NetworkTypePattern::NonVirtual());
- const NetworkState* connecting_network =
- state_handler->ConnectingNetworkByType(NetworkTypePattern::Wireless());
- if (!connecting_network && icon_type == ICON_TYPE_TRAY) {
- connecting_network =
- state_handler->ConnectingNetworkByType(NetworkTypePattern::VPN());
- }
-
- const NetworkState* network;
- // If we are connecting to a network, and there is either no connected
- // network, or the connection was user requested, use the connecting
- // network.
- if (connecting_network &&
- (!connected_network ||
- connect_handler->HasConnectingNetwork(connecting_network->path()))) {
- network = connecting_network;
- } else {
- network = connected_network;
- }
-
- // Don't show ethernet in the tray
- if (icon_type == ICON_TYPE_TRAY && network &&
- network->Matches(NetworkTypePattern::Ethernet())) {
- *image = gfx::ImageSkia();
- *animating = false;
- return;
- }
-
- if (!network) {
- // If no connecting network, check if we are activating a network.
- const NetworkState* mobile_network =
- state_handler->FirstNetworkByType(NetworkTypePattern::Mobile());
- if (mobile_network && (mobile_network->activation_state() ==
- shill::kActivationStateActivating)) {
- network = mobile_network;
- }
- }
- if (!network) {
- // If no connecting network, check for cellular initializing.
- int uninitialized_msg = GetCellularUninitializedMsg();
- if (uninitialized_msg != 0) {
- *image = GetImageForConnectingNetwork(icon_type, shill::kTypeCellular);
- if (label)
- *label = l10n_util::GetStringUTF16(uninitialized_msg);
- *animating = true;
- } else {
- // Otherwise show the disconnected wifi icon.
- *image = GetImageForDisconnectedNetwork(icon_type, shill::kTypeWifi);
- if (label) {
- *label = l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_NETWORK_NOT_CONNECTED);
- }
- *animating = false;
- }
- return;
- }
- *animating = network->IsConnectingState();
- // Get icon and label for connected or connecting network.
- *image = GetImageForNetwork(network, icon_type);
- if (label)
- *label = GetLabelForNetwork(network, icon_type);
-}
-
-void PurgeNetworkIconCache() {
- NetworkStateHandler::NetworkStateList networks;
- NetworkHandler::Get()->network_state_handler()->GetNetworkList(&networks);
- std::set<std::string> network_paths;
- for (NetworkStateHandler::NetworkStateList::iterator iter = networks.begin();
- iter != networks.end(); ++iter) {
- network_paths.insert((*iter)->path());
- }
- PurgeIconMap(ICON_TYPE_TRAY, network_paths);
- PurgeIconMap(ICON_TYPE_DEFAULT_VIEW, network_paths);
- PurgeIconMap(ICON_TYPE_LIST, network_paths);
-}
-
-} // namespace network_icon
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/network/network_icon.h b/chromium/ash/system/chromeos/network/network_icon.h
deleted file mode 100644
index 1f9b2c7e387..00000000000
--- a/chromium/ash/system/chromeos/network/network_icon.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_H_
-#define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_H_
-
-#include <string>
-
-#include "ash/ash_export.h"
-#include "base/strings/string16.h"
-#include "ui/gfx/image/image_skia.h"
-
-namespace chromeos {
-class NetworkState;
-}
-
-namespace ash {
-namespace network_icon {
-
-class AnimationObserver;
-
-// Type of icon which dictates color theme and VPN badging
-enum IconType {
- ICON_TYPE_TRAY, // light icons with VPN badges
- ICON_TYPE_DEFAULT_VIEW, // dark icons with VPN badges
- ICON_TYPE_LIST, // dark icons without VPN badges
-};
-
-// Gets the image for the network associated with |service_path|. |network| must
-// not be NULL. |icon_type| determines the color theme and whether or not to
-// show the VPN badge. This caches badged icons per network per |icon_type|.
-ASH_EXPORT gfx::ImageSkia GetImageForNetwork(
- const chromeos::NetworkState* network,
- IconType icon_type);
-
-// Gets the fulls strength image for a connected network type.
-ASH_EXPORT gfx::ImageSkia GetImageForConnectedNetwork(
- IconType icon_type,
- const std::string& network_type);
-
-// Gets the image for a connecting network type.
-ASH_EXPORT gfx::ImageSkia GetImageForConnectingNetwork(
- IconType icon_type,
- const std::string& network_type);
-
-// Gets the image for a disconnected network type.
-ASH_EXPORT gfx::ImageSkia GetImageForDisconnectedNetwork(
- IconType icon_type,
- const std::string& network_type);
-
-// Returns the label for |network| based on |icon_type|. |network| can be NULL.
-ASH_EXPORT base::string16 GetLabelForNetwork(
- const chromeos::NetworkState* network,
- IconType icon_type);
-
-// Updates and returns the appropriate message id if the cellular network
-// is uninitialized.
-ASH_EXPORT int GetCellularUninitializedMsg();
-
-// Gets the correct icon and label for |icon_type|. Also sets |animating|
-// based on whether or not the icon is animating (i.e. connecting).
-ASH_EXPORT void GetDefaultNetworkImageAndLabel(IconType icon_type,
- gfx::ImageSkia* image,
- base::string16* label,
- bool* animating);
-
-// Called when the list of networks changes. Retreives the list of networks
-// from the global NetworkStateHandler instance and removes cached entries
-// that are no longer in the list.
-ASH_EXPORT void PurgeNetworkIconCache();
-
-} // namespace network_icon
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_H_
diff --git a/chromium/ash/system/chromeos/network/network_icon_animation.cc b/chromium/ash/system/chromeos/network/network_icon_animation.cc
deleted file mode 100644
index 5065745c849..00000000000
--- a/chromium/ash/system/chromeos/network/network_icon_animation.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/network/network_icon_animation.h"
-
-#include "ash/system/chromeos/network/network_icon_animation_observer.h"
-
-namespace {
-const int kThrobDurationMs = 750; // Animation cycle length.
-}
-
-namespace ash {
-namespace network_icon {
-
-NetworkIconAnimation::NetworkIconAnimation()
- : animation_(this) {
- // Set up the animation throbber.
- animation_.SetThrobDuration(kThrobDurationMs);
- animation_.SetTweenType(gfx::Tween::LINEAR);
-}
-
-NetworkIconAnimation::~NetworkIconAnimation() {
-}
-
-void NetworkIconAnimation::AnimationProgressed(
- const gfx::Animation* animation) {
- if (animation != &animation_)
- return;
- FOR_EACH_OBSERVER(AnimationObserver, observers_, NetworkIconChanged());
-}
-
-double NetworkIconAnimation::GetAnimation() {
- if (!animation_.is_animating()) {
- animation_.Reset();
- animation_.StartThrobbing(-1 /*throb indefinitely*/);
- return 0;
- }
- return animation_.GetCurrentValue();
-}
-
-void NetworkIconAnimation::AddObserver(AnimationObserver* observer) {
- if (!observers_.HasObserver(observer))
- observers_.AddObserver(observer);
-}
-
-void NetworkIconAnimation::RemoveObserver(AnimationObserver* observer) {
- observers_.RemoveObserver(observer);
- if (!observers_.might_have_observers())
- animation_.Reset(); // Stops the animation and resets the current value.
-}
-
-// static
-NetworkIconAnimation* NetworkIconAnimation::GetInstance() {
- static NetworkIconAnimation* s_icon_animation =
- new NetworkIconAnimation();
- return s_icon_animation;
-}
-
-} // namespace network_icon
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/network/network_icon_animation.h b/chromium/ash/system/chromeos/network/network_icon_animation.h
deleted file mode 100644
index a34b80ed969..00000000000
--- a/chromium/ash/system/chromeos/network/network_icon_animation.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_ANIMATION_H_
-#define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_ANIMATION_H_
-
-#include <set>
-#include <string>
-
-#include "ash/ash_export.h"
-#include "base/observer_list.h"
-#include "ui/gfx/animation/animation_delegate.h"
-#include "ui/gfx/animation/throb_animation.h"
-
-namespace ash {
-namespace network_icon {
-
-class AnimationObserver;
-
-// Single instance class to handle icon animations and keep them in sync.
-class ASH_EXPORT NetworkIconAnimation : public gfx::AnimationDelegate {
- public:
- NetworkIconAnimation();
- virtual ~NetworkIconAnimation();
-
- // Returns the current animation value, [0-1].
- double GetAnimation();
-
- // The animation stops when all observers have been removed.
- // Be sure to remove observers when no associated icons are animating.
- void AddObserver(AnimationObserver* observer);
- void RemoveObserver(AnimationObserver* observer);
-
- // gfx::AnimationDelegate implementation.
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
-
- static NetworkIconAnimation* GetInstance();
-
- private:
- gfx::ThrobAnimation animation_;
- ObserverList<AnimationObserver> observers_;
-};
-
-} // namespace network_icon
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_ANIMATION_H_
diff --git a/chromium/ash/system/chromeos/network/network_icon_animation_observer.h b/chromium/ash/system/chromeos/network/network_icon_animation_observer.h
deleted file mode 100644
index 28a5c735d1b..00000000000
--- a/chromium/ash/system/chromeos/network/network_icon_animation_observer.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_ANIMATION_OBSERVER_H_
-#define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_ANIMATION_OBSERVER_H_
-
-#include "ash/ash_export.h"
-
-namespace ash {
-namespace network_icon {
-
-// Observer interface class for animating network icons.
-class ASH_EXPORT AnimationObserver {
- public:
- // Called when the image has changed due to animation. The callback should
- // trigger a call to GetImageForNetwork() to retrieve the image.
- virtual void NetworkIconChanged() = 0;
-
- protected:
- virtual ~AnimationObserver() {}
-};
-
-} // namespace network_icon
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_ANIMATION_OBSERVER_H_
diff --git a/chromium/ash/system/chromeos/network/network_observer.h b/chromium/ash/system/chromeos/network/network_observer.h
deleted file mode 100644
index 20473c7786c..00000000000
--- a/chromium/ash/system/chromeos/network/network_observer.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_OBSERVER_H
-#define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_OBSERVER_H
-
-#include <vector>
-
-#include "base/strings/string16.h"
-
-namespace ash {
-
-class NetworkObserver {
- public:
- virtual ~NetworkObserver() {}
-
- // Called to request toggling Wi-Fi enable/disable, e.g. from an accelerator.
- // NOTE: Toggling is asynchronous and subsequent calls to query the current
- // state may return the old value.
- virtual void RequestToggleWifi() = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_OBSERVER_H
diff --git a/chromium/ash/system/chromeos/network/network_state_list_detailed_view.cc b/chromium/ash/system/chromeos/network/network_state_list_detailed_view.cc
deleted file mode 100644
index ed2d0382b63..00000000000
--- a/chromium/ash/system/chromeos/network/network_state_list_detailed_view.cc
+++ /dev/null
@@ -1,896 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/network/network_state_list_detailed_view.h"
-
-#include "ash/ash_switches.h"
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/chromeos/network/network_connect.h"
-#include "ash/system/chromeos/network/network_icon.h"
-#include "ash/system/chromeos/network/network_icon_animation.h"
-#include "ash/system/chromeos/network/tray_network_state_observer.h"
-#include "ash/system/tray/fixed_sized_scroll_view.h"
-#include "ash/system/tray/hover_highlight_view.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_details_view.h"
-#include "ash/system/tray/tray_popup_header_button.h"
-#include "ash/system/tray/tray_popup_label_button.h"
-#include "base/command_line.h"
-#include "base/message_loop/message_loop.h"
-#include "base/strings/utf_string_conversions.h"
-#include "base/time/time.h"
-#include "chromeos/chromeos_switches.h"
-#include "chromeos/network/device_state.h"
-#include "chromeos/network/favorite_state.h"
-#include "chromeos/network/network_configuration_handler.h"
-#include "chromeos/network/network_state.h"
-#include "chromeos/network/network_state_handler.h"
-#include "chromeos/network/shill_property_util.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "third_party/cros_system_api/dbus/service_constants.h"
-#include "ui/aura/window.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/views/bubble/bubble_delegate.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/layout/fill_layout.h"
-#include "ui/views/widget/widget.h"
-
-using chromeos::DeviceState;
-using chromeos::FavoriteState;
-using chromeos::NetworkHandler;
-using chromeos::NetworkState;
-using chromeos::NetworkStateHandler;
-using chromeos::NetworkTypePattern;
-
-namespace ash {
-namespace internal {
-namespace tray {
-
-namespace {
-
-// Delay between scan requests.
-const int kRequestScanDelaySeconds = 10;
-
-// Create a label with the font size and color used in the network info bubble.
-views::Label* CreateInfoBubbleLabel(const base::string16& text) {
- views::Label* label = new views::Label(text);
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- label->SetFont(rb.GetFont(ui::ResourceBundle::SmallFont));
- label->SetEnabledColor(SkColorSetARGB(127, 0, 0, 0));
- return label;
-}
-
-// Create a label formatted for info items in the menu
-views::Label* CreateMenuInfoLabel(const base::string16& text) {
- views::Label* label = new views::Label(text);
- label->set_border(views::Border::CreateEmptyBorder(
- ash::kTrayPopupPaddingBetweenItems,
- ash::kTrayPopupPaddingHorizontal,
- ash::kTrayPopupPaddingBetweenItems, 0));
- label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- label->SetEnabledColor(SkColorSetARGB(192, 0, 0, 0));
- return label;
-}
-
-// Create a row of labels for the network info bubble.
-views::View* CreateInfoBubbleLine(const base::string16& text_label,
- const std::string& text_string) {
- views::View* view = new views::View;
- view->SetLayoutManager(
- new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 1));
- view->AddChildView(CreateInfoBubbleLabel(text_label));
- view->AddChildView(CreateInfoBubbleLabel(UTF8ToUTF16(": ")));
- view->AddChildView(CreateInfoBubbleLabel(UTF8ToUTF16(text_string)));
- return view;
-}
-
-} // namespace
-
-
-//------------------------------------------------------------------------------
-
-struct NetworkInfo {
- NetworkInfo(const std::string& path)
- : service_path(path),
- disable(false),
- highlight(false) {
- }
-
- std::string service_path;
- base::string16 label;
- gfx::ImageSkia image;
- bool disable;
- bool highlight;
-};
-
-//------------------------------------------------------------------------------
-
-// A bubble which displays network info.
-class NetworkStateListDetailedView::InfoBubble
- : public views::BubbleDelegateView {
- public:
- InfoBubble(views::View* anchor,
- views::View* content,
- NetworkStateListDetailedView* detailed_view)
- : views::BubbleDelegateView(anchor, views::BubbleBorder::TOP_RIGHT),
- detailed_view_(detailed_view) {
- set_use_focusless(true);
- set_parent_window(ash::Shell::GetContainer(
- anchor->GetWidget()->GetNativeWindow()->GetRootWindow(),
- ash::internal::kShellWindowId_SettingBubbleContainer));
- SetLayoutManager(new views::FillLayout());
- AddChildView(content);
- }
-
- virtual ~InfoBubble() {
- detailed_view_->OnInfoBubbleDestroyed();
- }
-
- virtual bool CanActivate() const OVERRIDE { return false; }
-
- private:
- // Not owned.
- NetworkStateListDetailedView* detailed_view_;
-
- DISALLOW_COPY_AND_ASSIGN(InfoBubble);
-};
-
-//------------------------------------------------------------------------------
-// NetworkStateListDetailedView
-
-NetworkStateListDetailedView::NetworkStateListDetailedView(
- SystemTrayItem* owner,
- ListType list_type,
- user::LoginStatus login)
- : NetworkDetailedView(owner),
- list_type_(list_type),
- login_(login),
- info_icon_(NULL),
- button_wifi_(NULL),
- button_mobile_(NULL),
- other_wifi_(NULL),
- turn_on_wifi_(NULL),
- other_mobile_(NULL),
- other_vpn_(NULL),
- toggle_debug_preferred_networks_(NULL),
- settings_(NULL),
- proxy_settings_(NULL),
- scanning_view_(NULL),
- no_wifi_networks_view_(NULL),
- no_cellular_networks_view_(NULL),
- info_bubble_(NULL) {
-}
-
-NetworkStateListDetailedView::~NetworkStateListDetailedView() {
- if (info_bubble_)
- info_bubble_->GetWidget()->CloseNow();
- network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this);
-}
-
-void NetworkStateListDetailedView::ManagerChanged() {
- UpdateNetworkList();
- UpdateHeaderButtons();
- UpdateNetworkExtra();
- Layout();
-}
-
-void NetworkStateListDetailedView::NetworkListChanged() {
- NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
- if (list_type_ == LIST_TYPE_DEBUG_PREFERRED) {
- NetworkStateHandler::FavoriteStateList favorite_list;
- handler->GetFavoriteList(&favorite_list);
- UpdatePreferred(favorite_list);
- } else {
- NetworkStateHandler::NetworkStateList network_list;
- handler->GetNetworkList(&network_list);
- UpdateNetworks(network_list);
- }
- UpdateNetworkList();
- UpdateHeaderButtons();
- UpdateNetworkExtra();
- Layout();
-}
-
-void NetworkStateListDetailedView::NetworkServiceChanged(
- const NetworkState* network) {
- UpdateNetworkList();
- Layout();
-}
-
-void NetworkStateListDetailedView::NetworkIconChanged() {
- UpdateNetworkList();
- Layout();
-}
-
-// Overridden from NetworkDetailedView:
-
-void NetworkStateListDetailedView::Init() {
- Reset();
- network_map_.clear();
- service_path_map_.clear();
- info_icon_ = NULL;
- button_wifi_ = NULL;
- button_mobile_ = NULL;
- other_wifi_ = NULL;
- turn_on_wifi_ = NULL;
- other_mobile_ = NULL;
- other_vpn_ = NULL;
- toggle_debug_preferred_networks_ = NULL;
- settings_ = NULL;
- proxy_settings_ = NULL;
- scanning_view_ = NULL;
- no_wifi_networks_view_ = NULL;
- no_cellular_networks_view_ = NULL;
-
- CreateScrollableList();
- CreateNetworkExtra();
- CreateHeaderEntry();
- CreateHeaderButtons();
-
- NetworkListChanged();
-
- CallRequestScan();
-}
-
-NetworkDetailedView::DetailedViewType
-NetworkStateListDetailedView::GetViewType() const {
- return STATE_LIST_VIEW;
-}
-
-// Views overrides
-
-void NetworkStateListDetailedView::ButtonPressed(views::Button* sender,
- const ui::Event& event) {
- if (sender == info_icon_) {
- ToggleInfoBubble();
- return;
- }
-
- // If the info bubble was visible, close it when some other item is clicked.
- ResetInfoBubble();
-
- NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
- ash::SystemTrayDelegate* delegate =
- ash::Shell::GetInstance()->system_tray_delegate();
- if (sender == button_wifi_) {
- bool enabled = handler->IsTechnologyEnabled(
- NetworkTypePattern::WiFi());
- handler->SetTechnologyEnabled(NetworkTypePattern::WiFi(),
- !enabled,
- chromeos::network_handler::ErrorCallback());
- } else if (sender == turn_on_wifi_) {
- handler->SetTechnologyEnabled(NetworkTypePattern::WiFi(),
- true,
- chromeos::network_handler::ErrorCallback());
- } else if (sender == button_mobile_) {
- ToggleMobile();
- } else if (sender == settings_) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- list_type_ == LIST_TYPE_VPN ?
- ash::UMA_STATUS_AREA_VPN_SETTINGS_CLICKED :
- ash::UMA_STATUS_AREA_NETWORK_SETTINGS_CLICKED);
- delegate->ShowNetworkSettings("");
- } else if (sender == proxy_settings_) {
- delegate->ChangeProxySettings();
- } else if (sender == other_mobile_) {
- delegate->ShowOtherNetworkDialog(shill::kTypeCellular);
- } else if (sender == toggle_debug_preferred_networks_) {
- list_type_ = (list_type_ == LIST_TYPE_NETWORK)
- ? LIST_TYPE_DEBUG_PREFERRED : LIST_TYPE_NETWORK;
- // Re-initialize this after processing the event.
- base::MessageLoopForUI::current()->PostTask(
- FROM_HERE,
- base::Bind(&NetworkStateListDetailedView::Init, AsWeakPtr()));
- } else if (sender == other_wifi_) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_NETWORK_JOIN_OTHER_CLICKED);
- delegate->ShowOtherNetworkDialog(shill::kTypeWifi);
- } else if (sender == other_vpn_) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_VPN_JOIN_OTHER_CLICKED);
- delegate->ShowOtherNetworkDialog(shill::kTypeVPN);
- } else {
- NOTREACHED();
- }
-}
-
-void NetworkStateListDetailedView::OnViewClicked(views::View* sender) {
- // If the info bubble was visible, close it when some other item is clicked.
- ResetInfoBubble();
-
- if (sender == footer()->content()) {
- TransitionToDefaultView();
- return;
- }
-
- if (login_ == user::LOGGED_IN_LOCKED)
- return;
-
- std::map<views::View*, std::string>::iterator found =
- network_map_.find(sender);
- if (found == network_map_.end())
- return;
-
- const std::string& service_path = found->second;
- if (list_type_ == LIST_TYPE_DEBUG_PREFERRED) {
- NetworkHandler::Get()->network_configuration_handler()->
- RemoveConfiguration(service_path,
- base::Bind(&base::DoNothing),
- chromeos::network_handler::ErrorCallback());
- return;
- }
-
- const NetworkState* network = NetworkHandler::Get()->network_state_handler()->
- GetNetworkState(service_path);
- if (!network || network->IsConnectedState() || network->IsConnectingState()) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- list_type_ == LIST_TYPE_VPN ?
- ash::UMA_STATUS_AREA_SHOW_NETWORK_CONNECTION_DETAILS :
- ash::UMA_STATUS_AREA_SHOW_VPN_CONNECTION_DETAILS);
- Shell::GetInstance()->system_tray_delegate()->ShowNetworkSettings(
- service_path);
- } else {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- list_type_ == LIST_TYPE_VPN ?
- ash::UMA_STATUS_AREA_CONNECT_TO_VPN :
- ash::UMA_STATUS_AREA_CONNECT_TO_CONFIGURED_NETWORK);
- ash::network_connect::ConnectToNetwork(service_path, NULL);
- }
-}
-
-// Create UI components.
-
-void NetworkStateListDetailedView::CreateHeaderEntry() {
- CreateSpecialRow(IDS_ASH_STATUS_TRAY_NETWORK, this);
-}
-
-void NetworkStateListDetailedView::CreateHeaderButtons() {
- if (list_type_ != LIST_TYPE_VPN) {
- button_wifi_ = new TrayPopupHeaderButton(
- this,
- IDR_AURA_UBER_TRAY_WIFI_ENABLED,
- IDR_AURA_UBER_TRAY_WIFI_DISABLED,
- IDR_AURA_UBER_TRAY_WIFI_ENABLED_HOVER,
- IDR_AURA_UBER_TRAY_WIFI_DISABLED_HOVER,
- IDS_ASH_STATUS_TRAY_WIFI);
- button_wifi_->SetTooltipText(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DISABLE_WIFI));
- button_wifi_->SetToggledTooltipText(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ENABLE_WIFI));
- footer()->AddButton(button_wifi_);
-
- button_mobile_ = new TrayPopupHeaderButton(
- this,
- IDR_AURA_UBER_TRAY_CELLULAR_ENABLED,
- IDR_AURA_UBER_TRAY_CELLULAR_DISABLED,
- IDR_AURA_UBER_TRAY_CELLULAR_ENABLED_HOVER,
- IDR_AURA_UBER_TRAY_CELLULAR_DISABLED_HOVER,
- IDS_ASH_STATUS_TRAY_CELLULAR);
- button_mobile_->SetTooltipText(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DISABLE_MOBILE));
- button_mobile_->SetToggledTooltipText(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ENABLE_MOBILE));
- footer()->AddButton(button_mobile_);
- }
-
- info_icon_ = new TrayPopupHeaderButton(
- this,
- IDR_AURA_UBER_TRAY_NETWORK_INFO,
- IDR_AURA_UBER_TRAY_NETWORK_INFO,
- IDR_AURA_UBER_TRAY_NETWORK_INFO_HOVER,
- IDR_AURA_UBER_TRAY_NETWORK_INFO_HOVER,
- IDS_ASH_STATUS_TRAY_NETWORK_INFO);
- info_icon_->SetTooltipText(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_NETWORK_INFO));
- footer()->AddButton(info_icon_);
-}
-
-void NetworkStateListDetailedView::CreateNetworkExtra() {
- if (login_ == user::LOGGED_IN_LOCKED)
- return;
-
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
-
- views::View* bottom_row = new views::View();
- views::BoxLayout* layout = new views::BoxLayout(
- views::BoxLayout::kHorizontal,
- kTrayMenuBottomRowPadding,
- kTrayMenuBottomRowPadding,
- kTrayMenuBottomRowPaddingBetweenItems);
- layout->set_spread_blank_space(true);
- bottom_row->SetLayoutManager(layout);
-
- if (list_type_ != LIST_TYPE_VPN) {
- other_wifi_ = new TrayPopupLabelButton(
- this, rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_OTHER_WIFI));
- bottom_row->AddChildView(other_wifi_);
-
- turn_on_wifi_ = new TrayPopupLabelButton(
- this, rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_TURN_ON_WIFI));
- bottom_row->AddChildView(turn_on_wifi_);
-
- other_mobile_ = new TrayPopupLabelButton(
- this, rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_OTHER_MOBILE));
- bottom_row->AddChildView(other_mobile_);
-
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- ash::switches::kAshDebugShowPreferredNetworks)) {
- // Debugging UI to view and remove favorites from the status area.
- std::string toggle_debug_preferred_label =
- (list_type_ == LIST_TYPE_DEBUG_PREFERRED) ? "Visible" : "Preferred";
- toggle_debug_preferred_networks_ = new TrayPopupLabelButton(
- this, UTF8ToUTF16(toggle_debug_preferred_label));
- bottom_row->AddChildView(toggle_debug_preferred_networks_);
- }
- } else {
- other_vpn_ = new TrayPopupLabelButton(
- this,
- ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
- IDS_ASH_STATUS_TRAY_OTHER_VPN));
- bottom_row->AddChildView(other_vpn_);
- }
-
- CreateSettingsEntry();
- DCHECK(settings_ || proxy_settings_);
- bottom_row->AddChildView(settings_ ? settings_ : proxy_settings_);
-
- AddChildView(bottom_row);
-}
-
-// Update UI components.
-
-void NetworkStateListDetailedView::UpdateHeaderButtons() {
- NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
- if (button_wifi_)
- UpdateTechnologyButton(button_wifi_, NetworkTypePattern::WiFi());
- if (button_mobile_) {
- UpdateTechnologyButton(button_mobile_, NetworkTypePattern::Mobile());
- }
- if (proxy_settings_)
- proxy_settings_->SetEnabled(handler->DefaultNetwork() != NULL);
-
- static_cast<views::View*>(footer())->Layout();
-}
-
-void NetworkStateListDetailedView::UpdateTechnologyButton(
- TrayPopupHeaderButton* button,
- const NetworkTypePattern& technology) {
- NetworkStateHandler::TechnologyState state =
- NetworkHandler::Get()->network_state_handler()->GetTechnologyState(
- technology);
- if (state == NetworkStateHandler::TECHNOLOGY_UNAVAILABLE) {
- button->SetVisible(false);
- return;
- }
- button->SetVisible(true);
- if (state == NetworkStateHandler::TECHNOLOGY_AVAILABLE) {
- button->SetEnabled(true);
- button->SetToggled(true);
- } else if (state == NetworkStateHandler::TECHNOLOGY_ENABLED) {
- button->SetEnabled(true);
- button->SetToggled(false);
- } else if (state == NetworkStateHandler::TECHNOLOGY_ENABLING) {
- button->SetEnabled(false);
- button->SetToggled(false);
- } else { // Initializing
- button->SetEnabled(false);
- button->SetToggled(true);
- }
-}
-
-void NetworkStateListDetailedView::UpdateNetworks(
- const NetworkStateHandler::NetworkStateList& networks) {
- DCHECK(list_type_ != LIST_TYPE_DEBUG_PREFERRED);
- network_list_.clear();
- for (NetworkStateHandler::NetworkStateList::const_iterator iter =
- networks.begin(); iter != networks.end(); ++iter) {
- const NetworkState* network = *iter;
- if ((list_type_ == LIST_TYPE_NETWORK &&
- network->type() != shill::kTypeVPN) ||
- (list_type_ == LIST_TYPE_VPN &&
- network->type() == shill::kTypeVPN)) {
- NetworkInfo* info = new NetworkInfo(network->path());
- network_list_.push_back(info);
- }
- }
-}
-
-void NetworkStateListDetailedView::UpdatePreferred(
- const NetworkStateHandler::FavoriteStateList& favorites) {
- DCHECK(list_type_ == LIST_TYPE_DEBUG_PREFERRED);
- network_list_.clear();
- for (NetworkStateHandler::FavoriteStateList::const_iterator iter =
- favorites.begin(); iter != favorites.end(); ++iter) {
- const FavoriteState* favorite = *iter;
- NetworkInfo* info = new NetworkInfo(favorite->path());
- network_list_.push_back(info);
- }
-}
-
-void NetworkStateListDetailedView::UpdateNetworkList() {
- NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
-
- // First, update state for all networks
- bool animating = false;
- for (size_t i = 0; i < network_list_.size(); ++i) {
- NetworkInfo* info = network_list_[i];
- const NetworkState* network =
- handler->GetNetworkState(info->service_path);
- if (network) {
- info->image = network_icon::GetImageForNetwork(
- network, network_icon::ICON_TYPE_LIST);
- info->label = network_icon::GetLabelForNetwork(
- network, network_icon::ICON_TYPE_LIST);
- info->highlight =
- network->IsConnectedState() || network->IsConnectingState();
- info->disable =
- network->activation_state() == shill::kActivationStateActivating;
- if (!animating && network->IsConnectingState())
- animating = true;
- } else if (list_type_ == LIST_TYPE_DEBUG_PREFERRED) {
- // Favorites that are visible will use the same display info as the
- // visible network. Non visible favorites will show the disconnected
- // icon and the name of the network.
- const FavoriteState* favorite =
- handler->GetFavoriteState(info->service_path);
- if (favorite) {
- info->image = network_icon::GetImageForDisconnectedNetwork(
- network_icon::ICON_TYPE_LIST, favorite->type());
- info->label = UTF8ToUTF16(favorite->name());
- }
- }
- }
- if (animating)
- network_icon::NetworkIconAnimation::GetInstance()->AddObserver(this);
- else
- network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this);
-
- // Get the updated list entries
- network_map_.clear();
- std::set<std::string> new_service_paths;
- bool needs_relayout = UpdateNetworkListEntries(&new_service_paths);
-
- // Remove old children
- std::set<std::string> remove_service_paths;
- for (ServicePathMap::const_iterator it = service_path_map_.begin();
- it != service_path_map_.end(); ++it) {
- if (new_service_paths.find(it->first) == new_service_paths.end()) {
- remove_service_paths.insert(it->first);
- network_map_.erase(it->second);
- scroll_content()->RemoveChildView(it->second);
- needs_relayout = true;
- }
- }
-
- for (std::set<std::string>::const_iterator remove_it =
- remove_service_paths.begin();
- remove_it != remove_service_paths.end(); ++remove_it) {
- service_path_map_.erase(*remove_it);
- }
-
- if (needs_relayout) {
- views::View* selected_view = NULL;
- for (ServicePathMap::const_iterator iter = service_path_map_.begin();
- iter != service_path_map_.end(); ++iter) {
- if (iter->second->hover()) {
- selected_view = iter->second;
- break;
- }
- }
- scroll_content()->SizeToPreferredSize();
- static_cast<views::View*>(scroller())->Layout();
- if (selected_view)
- scroll_content()->ScrollRectToVisible(selected_view->bounds());
- }
-}
-
-bool NetworkStateListDetailedView::CreateOrUpdateInfoLabel(
- int index, const base::string16& text, views::Label** label) {
- if (*label == NULL) {
- *label = CreateMenuInfoLabel(text);
- scroll_content()->AddChildViewAt(*label, index);
- return true;
- } else {
- (*label)->SetText(text);
- return OrderChild(*label, index);
- }
-}
-
-bool NetworkStateListDetailedView::UpdateNetworkChild(int index,
- const NetworkInfo* info) {
- bool needs_relayout = false;
- HoverHighlightView* container = NULL;
- ServicePathMap::const_iterator found =
- service_path_map_.find(info->service_path);
- gfx::Font::FontStyle font =
- info->highlight ? gfx::Font::BOLD : gfx::Font::NORMAL;
- if (found == service_path_map_.end()) {
- container = new HoverHighlightView(this);
- container->AddIconAndLabel(info->image, info->label, font);
- scroll_content()->AddChildViewAt(container, index);
- container->set_border(views::Border::CreateEmptyBorder(
- 0, kTrayPopupPaddingHorizontal, 0, 0));
- needs_relayout = true;
- } else {
- container = found->second;
- container->RemoveAllChildViews(true);
- container->AddIconAndLabel(info->image, info->label, font);
- container->Layout();
- container->SchedulePaint();
- needs_relayout = OrderChild(container, index);
- }
- if (info->disable)
- container->SetEnabled(false);
- network_map_[container] = info->service_path;
- service_path_map_[info->service_path] = container;
- return needs_relayout;
-}
-
-bool NetworkStateListDetailedView::OrderChild(views::View* view, int index) {
- if (scroll_content()->child_at(index) != view) {
- scroll_content()->ReorderChildView(view, index);
- return true;
- }
- return false;
-}
-
-bool NetworkStateListDetailedView::UpdateNetworkListEntries(
- std::set<std::string>* new_service_paths) {
- bool needs_relayout = false;
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
-
- // Insert child views
- int index = 0;
-
- // Highlighted networks
- for (size_t i = 0; i < network_list_.size(); ++i) {
- const NetworkInfo* info = network_list_[i];
- if (info->highlight) {
- if (UpdateNetworkChild(index++, info))
- needs_relayout = true;
- new_service_paths->insert(info->service_path);
- }
- }
-
- if (list_type_ == LIST_TYPE_NETWORK) {
- // Cellular initializing
- int status_message_id = network_icon::GetCellularUninitializedMsg();
- if (!status_message_id &&
- handler->IsTechnologyEnabled(NetworkTypePattern::Mobile()) &&
- !handler->FirstNetworkByType(NetworkTypePattern::Mobile())) {
- status_message_id = IDS_ASH_STATUS_TRAY_NO_CELLULAR_NETWORKS;
- }
- if (status_message_id) {
- base::string16 text = rb.GetLocalizedString(status_message_id);
- if (CreateOrUpdateInfoLabel(index++, text, &no_cellular_networks_view_))
- needs_relayout = true;
- } else if (no_cellular_networks_view_) {
- scroll_content()->RemoveChildView(no_cellular_networks_view_);
- no_cellular_networks_view_ = NULL;
- needs_relayout = true;
- }
-
- // "Wifi Enabled / Disabled"
- if (network_list_.empty()) {
- int message_id = handler->IsTechnologyEnabled(NetworkTypePattern::WiFi())
- ? IDS_ASH_STATUS_TRAY_NETWORK_WIFI_ENABLED
- : IDS_ASH_STATUS_TRAY_NETWORK_WIFI_DISABLED;
- base::string16 text = rb.GetLocalizedString(message_id);
- if (CreateOrUpdateInfoLabel(index++, text, &no_wifi_networks_view_))
- needs_relayout = true;
- } else if (no_wifi_networks_view_) {
- scroll_content()->RemoveChildView(no_wifi_networks_view_);
- no_wifi_networks_view_ = NULL;
- needs_relayout = true;
- }
-
- // "Wifi Scanning"
- if (handler->GetScanningByType(NetworkTypePattern::WiFi())) {
- base::string16 text =
- rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_WIFI_SCANNING_MESSAGE);
- if (CreateOrUpdateInfoLabel(index++, text, &scanning_view_))
- needs_relayout = true;
- } else if (scanning_view_ != NULL) {
- scroll_content()->RemoveChildView(scanning_view_);
- scanning_view_ = NULL;
- needs_relayout = true;
- }
- }
-
- // Un-highlighted networks
- for (size_t i = 0; i < network_list_.size(); ++i) {
- const NetworkInfo* info = network_list_[i];
- if (!info->highlight) {
- if (UpdateNetworkChild(index++, info))
- needs_relayout = true;
- new_service_paths->insert(info->service_path);
- }
- }
-
- // No networks or other messages (fallback)
- if (index == 0) {
- base::string16 text;
- if (list_type_ == LIST_TYPE_VPN)
- text = rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_NETWORK_NO_VPN);
- else
- text = rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_NO_NETWORKS);
- if (CreateOrUpdateInfoLabel(index++, text, &scanning_view_))
- needs_relayout = true;
- }
-
- return needs_relayout;
-}
-
-void NetworkStateListDetailedView::UpdateNetworkExtra() {
- if (login_ == user::LOGGED_IN_LOCKED)
- return;
-
- View* layout_parent = NULL; // All these buttons have the same parent.
- NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
- if (other_wifi_) {
- DCHECK(turn_on_wifi_);
- NetworkStateHandler::TechnologyState state =
- handler->GetTechnologyState(NetworkTypePattern::WiFi());
- if (state == NetworkStateHandler::TECHNOLOGY_UNAVAILABLE) {
- turn_on_wifi_->SetVisible(false);
- other_wifi_->SetVisible(false);
- } else {
- if (state == NetworkStateHandler::TECHNOLOGY_AVAILABLE) {
- turn_on_wifi_->SetVisible(true);
- turn_on_wifi_->SetEnabled(true);
- other_wifi_->SetVisible(false);
- } else if (state == NetworkStateHandler::TECHNOLOGY_ENABLED) {
- turn_on_wifi_->SetVisible(false);
- other_wifi_->SetVisible(true);
- } else {
- // Initializing or Enabling
- turn_on_wifi_->SetVisible(true);
- turn_on_wifi_->SetEnabled(false);
- other_wifi_->SetVisible(false);
- }
- }
- layout_parent = other_wifi_->parent();
- }
-
- if (other_mobile_) {
- bool show_other_mobile = false;
- NetworkStateHandler::TechnologyState state =
- handler->GetTechnologyState(NetworkTypePattern::Mobile());
- if (state != NetworkStateHandler::TECHNOLOGY_UNAVAILABLE) {
- const chromeos::DeviceState* device =
- handler->GetDeviceStateByType(NetworkTypePattern::Mobile());
- show_other_mobile = (device && device->support_network_scan());
- }
- if (show_other_mobile) {
- other_mobile_->SetVisible(true);
- other_mobile_->SetEnabled(
- state == NetworkStateHandler::TECHNOLOGY_ENABLED);
- } else {
- other_mobile_->SetVisible(false);
- }
- if (!layout_parent)
- layout_parent = other_wifi_->parent();
- }
-
- if (layout_parent)
- layout_parent->Layout();
-}
-
-void NetworkStateListDetailedView::CreateSettingsEntry() {
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- if (login_ != user::LOGGED_IN_NONE) {
- // Settings, only if logged in.
- settings_ = new TrayPopupLabelButton(
- this, rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_NETWORK_SETTINGS));
- } else {
- proxy_settings_ = new TrayPopupLabelButton(
- this,
- rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_NETWORK_PROXY_SETTINGS));
- }
-}
-
-void NetworkStateListDetailedView::ToggleInfoBubble() {
- if (ResetInfoBubble())
- return;
-
- info_bubble_ = new InfoBubble(
- info_icon_, CreateNetworkInfoView(), this);
- views::BubbleDelegateView::CreateBubble(info_bubble_)->Show();
-}
-
-bool NetworkStateListDetailedView::ResetInfoBubble() {
- if (!info_bubble_)
- return false;
- info_bubble_->GetWidget()->Close();
- info_bubble_ = NULL;
- return true;
-}
-
-void NetworkStateListDetailedView::OnInfoBubbleDestroyed() {
- info_bubble_ = NULL;
-}
-
-views::View* NetworkStateListDetailedView::CreateNetworkInfoView() {
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
-
- std::string ip_address("0.0.0.0");
- const NetworkState* network = handler->DefaultNetwork();
- if (network)
- ip_address = network->ip_address();
-
- views::View* container = new views::View;
- container->SetLayoutManager(
- new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 1));
- container->set_border(views::Border::CreateEmptyBorder(0, 5, 0, 5));
-
- std::string ethernet_address, wifi_address, vpn_address;
- if (list_type_ != LIST_TYPE_VPN) {
- ethernet_address = handler->FormattedHardwareAddressForType(
- NetworkTypePattern::Ethernet());
- wifi_address =
- handler->FormattedHardwareAddressForType(NetworkTypePattern::WiFi());
- } else {
- vpn_address =
- handler->FormattedHardwareAddressForType(NetworkTypePattern::VPN());
- }
-
- if (!ip_address.empty()) {
- container->AddChildView(CreateInfoBubbleLine(bundle.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_IP), ip_address));
- }
- if (!ethernet_address.empty()) {
- container->AddChildView(CreateInfoBubbleLine(bundle.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_ETHERNET), ethernet_address));
- }
- if (!wifi_address.empty()) {
- container->AddChildView(CreateInfoBubbleLine(bundle.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_WIFI), wifi_address));
- }
- if (!vpn_address.empty()) {
- container->AddChildView(CreateInfoBubbleLine(bundle.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_VPN), vpn_address));
- }
-
- // Avoid an empty bubble in the unlikely event that there is no network
- // information at all.
- if (!container->has_children()) {
- container->AddChildView(CreateInfoBubbleLabel(bundle.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_NO_NETWORKS)));
- }
-
- return container;
-}
-
-void NetworkStateListDetailedView::CallRequestScan() {
- VLOG(1) << "Requesting Network Scan.";
- NetworkHandler::Get()->network_state_handler()->RequestScan();
- // Periodically request a scan while this UI is open.
- base::MessageLoopForUI::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&NetworkStateListDetailedView::CallRequestScan, AsWeakPtr()),
- base::TimeDelta::FromSeconds(kRequestScanDelaySeconds));
-}
-
-void NetworkStateListDetailedView::ToggleMobile() {
- NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
- bool enabled =
- handler->IsTechnologyEnabled(NetworkTypePattern::Mobile());
- ash::network_connect::SetTechnologyEnabled(NetworkTypePattern::Mobile(),
- !enabled);
-}
-
-} // namespace tray
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/network/network_state_list_detailed_view.h b/chromium/ash/system/chromeos/network/network_state_list_detailed_view.h
deleted file mode 100644
index 4ad41638c16..00000000000
--- a/chromium/ash/system/chromeos/network/network_state_list_detailed_view.h
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_STATE_LIST_DETAILED_VIEW_H
-#define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_STATE_LIST_DETAILED_VIEW_H
-
-#include <map>
-#include <string>
-#include <vector>
-
-#include "ash/system/chromeos/network/network_detailed_view.h"
-#include "ash/system/chromeos/network/network_icon.h"
-#include "ash/system/chromeos/network/network_icon_animation_observer.h"
-#include "ash/system/tray/view_click_listener.h"
-#include "ash/system/user/login_status.h"
-#include "base/memory/scoped_vector.h"
-#include "base/memory/weak_ptr.h"
-#include "ui/views/controls/button/button.h"
-
-namespace chromeos {
-class NetworkTypePattern;
-}
-
-namespace views {
-class BubbleDelegateView;
-}
-
-namespace ash {
-
-class SystemTrayItem;
-
-namespace internal {
-
-class HoverHighlightView;
-class TrayPopupLabelButton;
-
-namespace tray {
-
-struct NetworkInfo;
-
-class NetworkStateListDetailedView
- : public NetworkDetailedView,
- public views::ButtonListener,
- public ViewClickListener,
- public network_icon::AnimationObserver,
- public base::SupportsWeakPtr<NetworkStateListDetailedView> {
- public:
- enum ListType {
- LIST_TYPE_NETWORK,
- LIST_TYPE_DEBUG_PREFERRED,
- LIST_TYPE_VPN
- };
-
- NetworkStateListDetailedView(SystemTrayItem* owner,
- ListType list_type,
- user::LoginStatus login);
- virtual ~NetworkStateListDetailedView();
-
- // Overridden from NetworkDetailedView:
- virtual void Init() OVERRIDE;
- virtual DetailedViewType GetViewType() const OVERRIDE;
- virtual void ManagerChanged() OVERRIDE;
- virtual void NetworkListChanged() OVERRIDE;
- virtual void NetworkServiceChanged(
- const chromeos::NetworkState* network) OVERRIDE;
-
- // network_icon::AnimationObserver overrides
- virtual void NetworkIconChanged() OVERRIDE;
-
- protected:
- // Overridden from ButtonListener.
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
-
- // Overridden from ViewClickListener.
- virtual void OnViewClicked(views::View* sender) OVERRIDE;
-
- private:
- class InfoBubble;
-
- typedef std::map<views::View*, std::string> NetworkMap;
- typedef std::map<std::string, HoverHighlightView*> ServicePathMap;
-
- // Create UI components.
- void CreateHeaderEntry();
- void CreateHeaderButtons();
- void CreateNetworkExtra();
-
- // Update UI components.
- void UpdateHeaderButtons();
- void UpdateTechnologyButton(TrayPopupHeaderButton* button,
- const chromeos::NetworkTypePattern& technology);
-
- void UpdateNetworks(
- const chromeos::NetworkStateHandler::NetworkStateList& networks);
- void UpdatePreferred(
- const chromeos::NetworkStateHandler::FavoriteStateList& favorites);
- void UpdateNetworkList();
- bool CreateOrUpdateInfoLabel(
- int index, const base::string16& text, views::Label** label);
- bool UpdateNetworkChild(int index, const NetworkInfo* info);
- bool OrderChild(views::View* view, int index);
- bool UpdateNetworkListEntries(std::set<std::string>* new_service_paths);
- void UpdateNetworkExtra();
-
- // Adds a settings entry when logged in, and an entry for changing proxy
- // settings otherwise.
- void CreateSettingsEntry();
-
- // Create and manage the network info bubble.
- void ToggleInfoBubble();
- bool ResetInfoBubble();
- void OnInfoBubbleDestroyed();
- views::View* CreateNetworkInfoView();
-
- // Periodically request a network scan.
- void CallRequestScan();
-
- // Handle toggile mobile action
- void ToggleMobile();
-
- // Type of list (all networks or vpn)
- ListType list_type_;
-
- // Track login state.
- user::LoginStatus login_;
-
- // A map of child views to their network service path.
- NetworkMap network_map_;
-
- // A map of network service paths to their view.
- ServicePathMap service_path_map_;
-
- // An owned list of network info.
- ScopedVector<NetworkInfo> network_list_;
-
- // Child views.
- TrayPopupHeaderButton* info_icon_;
- TrayPopupHeaderButton* button_wifi_;
- TrayPopupHeaderButton* button_mobile_;
- TrayPopupLabelButton* other_wifi_;
- TrayPopupLabelButton* turn_on_wifi_;
- TrayPopupLabelButton* other_mobile_;
- TrayPopupLabelButton* other_vpn_;
- TrayPopupLabelButton* toggle_debug_preferred_networks_;
- TrayPopupLabelButton* settings_;
- TrayPopupLabelButton* proxy_settings_;
- views::Label* scanning_view_;
- views::Label* no_wifi_networks_view_;
- views::Label* no_cellular_networks_view_;
-
- // A small bubble for displaying network info.
- views::BubbleDelegateView* info_bubble_;
-
- DISALLOW_COPY_AND_ASSIGN(NetworkStateListDetailedView);
-};
-
-} // namespace tray
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_STATE_LIST_DETAILED_VIEW
diff --git a/chromium/ash/system/chromeos/network/network_state_notifier.cc b/chromium/ash/system/chromeos/network/network_state_notifier.cc
deleted file mode 100644
index ac69a8ab559..00000000000
--- a/chromium/ash/system/chromeos/network/network_state_notifier.cc
+++ /dev/null
@@ -1,288 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/network/network_state_notifier.h"
-
-#include "ash/shell.h"
-#include "ash/system/chromeos/network/network_connect.h"
-#include "ash/system/system_notifier.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "base/strings/string16.h"
-#include "base/strings/string_util.h"
-#include "base/strings/utf_string_conversions.h"
-#include "chromeos/network/network_configuration_handler.h"
-#include "chromeos/network/network_connection_handler.h"
-#include "chromeos/network/network_event_log.h"
-#include "chromeos/network/network_state.h"
-#include "chromeos/network/network_state_handler.h"
-#include "chromeos/network/shill_property_util.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "third_party/cros_system_api/dbus/service_constants.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/message_center/message_center.h"
-#include "ui/message_center/notification.h"
-
-using chromeos::NetworkConnectionHandler;
-using chromeos::NetworkHandler;
-using chromeos::NetworkState;
-using chromeos::NetworkStateHandler;
-using chromeos::NetworkTypePattern;
-
-namespace {
-
-const char kNetworkOutOfCreditsNotificationId[] =
- "chrome://settings/internet/out-of-credits";
-
-const int kMinTimeBetweenOutOfCreditsNotifySeconds = 10 * 60;
-
-// Error messages based on |error_name|, not network_state->error().
-string16 GetConnectErrorString(const std::string& error_name) {
- if (error_name == NetworkConnectionHandler::kErrorNotFound)
- return l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_CONNECT_FAILED);
- if (error_name == NetworkConnectionHandler::kErrorConfigureFailed)
- return l10n_util::GetStringUTF16(
- IDS_CHROMEOS_NETWORK_ERROR_CONFIGURE_FAILED);
- if (error_name == ash::network_connect::kErrorActivateFailed)
- return l10n_util::GetStringUTF16(
- IDS_CHROMEOS_NETWORK_ERROR_ACTIVATION_FAILED);
- return string16();
-}
-
-void ShowErrorNotification(const std::string& notification_id,
- const std::string& network_type,
- const base::string16& title,
- const base::string16& message,
- const base::Closure& callback) {
- int icon_id = (network_type == shill::kTypeCellular) ?
- IDR_AURA_UBER_TRAY_CELLULAR_NETWORK_FAILED :
- IDR_AURA_UBER_TRAY_NETWORK_FAILED;
- const gfx::Image& icon =
- ui::ResourceBundle::GetSharedInstance().GetImageNamed(icon_id);
- message_center::MessageCenter::Get()->AddNotification(
- message_center::Notification::CreateSystemNotification(
- notification_id,
- title,
- message,
- icon,
- ash::system_notifier::kNotifierNetworkError,
- callback));
-}
-
-} // namespace
-
-namespace ash {
-
-NetworkStateNotifier::NetworkStateNotifier()
- : did_show_out_of_credits_(false),
- weak_ptr_factory_(this) {
- if (!NetworkHandler::IsInitialized())
- return;
- NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
- handler->AddObserver(this, FROM_HERE);
- UpdateDefaultNetwork(handler->DefaultNetwork());
-}
-
-NetworkStateNotifier::~NetworkStateNotifier() {
- if (!NetworkHandler::IsInitialized())
- return;
- NetworkHandler::Get()->network_state_handler()->RemoveObserver(
- this, FROM_HERE);
-}
-
-void NetworkStateNotifier::DefaultNetworkChanged(const NetworkState* network) {
- if (!UpdateDefaultNetwork(network))
- return;
- // If the default network changes to another network, allow the out of
- // credits notification to be shown again. A delay prevents the notification
- // from being shown too frequently (see below).
- if (network)
- did_show_out_of_credits_ = false;
-}
-
-void NetworkStateNotifier::NetworkPropertiesUpdated(
- const NetworkState* network) {
- if (network->type() != shill::kTypeCellular)
- return;
- UpdateCellularOutOfCredits(network);
- UpdateCellularActivating(network);
-}
-
-bool NetworkStateNotifier::UpdateDefaultNetwork(const NetworkState* network) {
- std::string default_network_path;
- if (network)
- default_network_path = network->path();
- if (default_network_path != last_default_network_) {
- last_default_network_ = default_network_path;
- return true;
- }
- return false;
-}
-
-void NetworkStateNotifier::UpdateCellularOutOfCredits(
- const NetworkState* cellular) {
- // Only display a notification if we are out of credits and have not already
- // shown a notification (or have since connected to another network type).
- if (!cellular->cellular_out_of_credits() || did_show_out_of_credits_)
- return;
-
- // Only display a notification if not connected, connecting, or waiting to
- // connect to another network.
- NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
- const NetworkState* default_network = handler->DefaultNetwork();
- if (default_network && default_network != cellular)
- return;
- if (handler->ConnectingNetworkByType(NetworkTypePattern::NonVirtual()) ||
- NetworkHandler::Get()->network_connection_handler()
- ->HasPendingConnectRequest())
- return;
-
- did_show_out_of_credits_ = true;
- base::TimeDelta dtime = base::Time::Now() - out_of_credits_notify_time_;
- if (dtime.InSeconds() > kMinTimeBetweenOutOfCreditsNotifySeconds) {
- out_of_credits_notify_time_ = base::Time::Now();
- string16 error_msg = l10n_util::GetStringFUTF16(
- IDS_NETWORK_OUT_OF_CREDITS_BODY,
- UTF8ToUTF16(cellular->name()));
- ShowErrorNotification(
- kNetworkOutOfCreditsNotificationId,
- cellular->type(),
- l10n_util::GetStringUTF16(IDS_NETWORK_OUT_OF_CREDITS_TITLE),
- error_msg,
- base::Bind(&network_connect::ShowNetworkSettings, cellular->path()));
- }
-}
-
-void NetworkStateNotifier::UpdateCellularActivating(
- const NetworkState* cellular) {
- // Keep track of any activating cellular network.
- std::string activation_state = cellular->activation_state();
- if (activation_state == shill::kActivationStateActivating) {
- cellular_activating_.insert(cellular->path());
- return;
- }
- // Only display a notification if this network was activating and is now
- // activated.
- if (!cellular_activating_.count(cellular->path()) ||
- activation_state != shill::kActivationStateActivated)
- return;
-
- cellular_activating_.erase(cellular->path());
- int icon_id;
- if (cellular->network_technology() == shill::kNetworkTechnologyLte)
- icon_id = IDR_AURA_UBER_TRAY_NOTIFICATION_LTE;
- else
- icon_id = IDR_AURA_UBER_TRAY_NOTIFICATION_3G;
- const gfx::Image& icon =
- ui::ResourceBundle::GetSharedInstance().GetImageNamed(icon_id);
- message_center::MessageCenter::Get()->AddNotification(
- message_center::Notification::CreateSystemNotification(
- ash::network_connect::kNetworkActivateNotificationId,
- l10n_util::GetStringUTF16(IDS_NETWORK_CELLULAR_ACTIVATED_TITLE),
- l10n_util::GetStringFUTF16(IDS_NETWORK_CELLULAR_ACTIVATED,
- UTF8ToUTF16((cellular->name()))),
- icon,
- system_notifier::kNotifierNetwork,
- base::Bind(&ash::network_connect::ShowNetworkSettings,
- cellular->path())));
-}
-
-void NetworkStateNotifier::ShowNetworkConnectError(
- const std::string& error_name,
- const std::string& shill_error,
- const std::string& service_path) {
- if (service_path.empty()) {
- base::DictionaryValue shill_properties;
- ShowConnectErrorNotification(error_name, shill_error, service_path,
- shill_properties);
- return;
- }
- // Get the up-to-date properties for the network and display the error.
- NetworkHandler::Get()->network_configuration_handler()->GetProperties(
- service_path,
- base::Bind(&NetworkStateNotifier::ConnectErrorPropertiesSucceeded,
- weak_ptr_factory_.GetWeakPtr(), error_name, shill_error),
- base::Bind(&NetworkStateNotifier::ConnectErrorPropertiesFailed,
- weak_ptr_factory_.GetWeakPtr(), error_name, shill_error,
- service_path));
-}
-
-void NetworkStateNotifier::ConnectErrorPropertiesSucceeded(
- const std::string& error_name,
- const std::string& shill_error,
- const std::string& service_path,
- const base::DictionaryValue& shill_properties) {
- ShowConnectErrorNotification(error_name, shill_error, service_path,
- shill_properties);
-}
-
-void NetworkStateNotifier::ConnectErrorPropertiesFailed(
- const std::string& error_name,
- const std::string& shill_error,
- const std::string& service_path,
- const std::string& shill_connect_error,
- scoped_ptr<base::DictionaryValue> shill_error_data) {
- base::DictionaryValue shill_properties;
- ShowConnectErrorNotification(error_name, shill_error, service_path,
- shill_properties);
-}
-
-void NetworkStateNotifier::ShowConnectErrorNotification(
- const std::string& error_name,
- const std::string& shill_error,
- const std::string& service_path,
- const base::DictionaryValue& shill_properties) {
- string16 error = GetConnectErrorString(error_name);
- if (error.empty()) {
- // Service.Error gets cleared shortly after State transitions to Failure,
- // so rely on |shill_error| unless empty.
- std::string network_error = shill_error;
- if (network_error.empty()) {
- shill_properties.GetStringWithoutPathExpansion(
- shill::kErrorProperty, &network_error);
- }
- error = network_connect::ErrorString(network_error, service_path);
- if (error.empty())
- error = l10n_util::GetStringUTF16(IDS_CHROMEOS_NETWORK_ERROR_UNKNOWN);
- }
- NET_LOG_ERROR("Connect error notification: " + UTF16ToUTF8(error),
- service_path);
-
- std::string network_name =
- chromeos::shill_property_util::GetNameFromProperties(service_path,
- shill_properties);
- std::string network_error_details;
- shill_properties.GetStringWithoutPathExpansion(
- shill::kErrorDetailsProperty, &network_error_details);
-
- string16 error_msg;
- if (!network_error_details.empty()) {
- // network_name should't be empty if network_error_details is set.
- error_msg = l10n_util::GetStringFUTF16(
- IDS_NETWORK_CONNECTION_ERROR_MESSAGE_WITH_SERVER_MESSAGE,
- UTF8ToUTF16(network_name), error,
- UTF8ToUTF16(network_error_details));
- } else if (network_name.empty()) {
- error_msg = l10n_util::GetStringFUTF16(
- IDS_NETWORK_CONNECTION_ERROR_MESSAGE_NO_NAME, error);
- } else {
- error_msg = l10n_util::GetStringFUTF16(
- IDS_NETWORK_CONNECTION_ERROR_MESSAGE,
- UTF8ToUTF16(network_name), error);
- }
-
- std::string network_type;
- shill_properties.GetStringWithoutPathExpansion(
- shill::kTypeProperty, &network_type);
-
- ShowErrorNotification(
- network_connect::kNetworkConnectNotificationId,
- network_type,
- l10n_util::GetStringUTF16(IDS_NETWORK_CONNECTION_ERROR_TITLE),
- error_msg,
- base::Bind(&network_connect::ShowNetworkSettings, service_path));
-}
-
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/network/network_state_notifier.h b/chromium/ash/system/chromeos/network/network_state_notifier.h
deleted file mode 100644
index 1a835bbbe9b..00000000000
--- a/chromium/ash/system/chromeos/network/network_state_notifier.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_STATE_NOTIFIER_H_
-#define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_STATE_NOTIFIER_H_
-
-#include <set>
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "base/time/time.h"
-#include "chromeos/network/network_state_handler_observer.h"
-
-namespace base {
-class DictionaryValue;
-}
-
-namespace chromeos {
-class NetworkState;
-}
-
-namespace ash {
-
-// This class has two purposes:
-// 1. ShowNetworkConnectError() gets called after any user initiated connect
-// failure. This will handle displaying an error notification.
-// TODO(stevenjb): convert this class to use the new MessageCenter
-// notification system.
-// 2. It observes NetworkState changes to generate notifications when a
-// Cellular network is out of credits.
-class ASH_EXPORT NetworkStateNotifier :
- public chromeos::NetworkStateHandlerObserver {
- public:
- NetworkStateNotifier();
- virtual ~NetworkStateNotifier();
-
- // NetworkStateHandlerObserver
- virtual void DefaultNetworkChanged(
- const chromeos::NetworkState* network) OVERRIDE;
- virtual void NetworkPropertiesUpdated(
- const chromeos::NetworkState* network) OVERRIDE;
-
- // Show a connection error notification. If |error_name| matches an error
- // defined in NetworkConnectionHandler for connect, configure, or activation
- // failed, then the associated message is shown, otherwise |shill_error|
- // is expected to contain Service.Error (which might get cleared before
- // GetProperties returns).
- void ShowNetworkConnectError(const std::string& error_name,
- const std::string& shill_error,
- const std::string& service_path);
-
- private:
- void ConnectErrorPropertiesSucceeded(
- const std::string& error_name,
- const std::string& shill_error,
- const std::string& service_path,
- const base::DictionaryValue& shill_properties);
- void ConnectErrorPropertiesFailed(
- const std::string& error_name,
- const std::string& shill_error,
- const std::string& service_path,
- const std::string& shill_connect_error,
- scoped_ptr<base::DictionaryValue> shill_error_data);
- void ShowConnectErrorNotification(
- const std::string& error_name,
- const std::string& shill_error,
- const std::string& service_path,
- const base::DictionaryValue& shill_properties);
-
- // Returns true if the default network changed.
- bool UpdateDefaultNetwork(const chromeos::NetworkState* network);
-
- // Helper methods to update state and check for notifications.
- void UpdateCellularOutOfCredits(const chromeos::NetworkState* cellular);
- void UpdateCellularActivating(const chromeos::NetworkState* cellular);
-
- std::string last_default_network_;
- bool did_show_out_of_credits_;
- base::Time out_of_credits_notify_time_;
- std::set<std::string> cellular_activating_;
- base::WeakPtrFactory<NetworkStateNotifier> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(NetworkStateNotifier);
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_STATE_NOTIFIER_H_
diff --git a/chromium/ash/system/chromeos/network/network_state_notifier_unittest.cc b/chromium/ash/system/chromeos/network/network_state_notifier_unittest.cc
deleted file mode 100644
index 998db5aa366..00000000000
--- a/chromium/ash/system/chromeos/network/network_state_notifier_unittest.cc
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/network/network_state_notifier.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/system/chromeos/network/network_connect.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/test/ash_test_base.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/shill_device_client.h"
-#include "chromeos/dbus/shill_service_client.h"
-#include "chromeos/login/login_state.h"
-#include "chromeos/network/network_handler.h"
-#include "third_party/cros_system_api/dbus/service_constants.h"
-#include "ui/message_center/message_center.h"
-
-namespace {
-
-ash::SystemTray* GetSystemTray() {
- return ash::Shell::GetPrimaryRootWindowController()->shelf()->
- status_area_widget()->system_tray();
-}
-
-} // namespace
-
-using chromeos::DBusThreadManager;
-using chromeos::ShillDeviceClient;
-using chromeos::ShillServiceClient;
-
-namespace ash {
-namespace test {
-
-class NetworkStateNotifierTest : public AshTestBase {
- public:
- NetworkStateNotifierTest() {}
- virtual ~NetworkStateNotifierTest() {}
-
- virtual void SetUp() OVERRIDE {
- DBusThreadManager::InitializeWithStub();
- chromeos::LoginState::Initialize();
- SetupDefaultShillState();
- chromeos::NetworkHandler::Initialize();
- RunAllPendingInMessageLoop();
- AshTestBase::SetUp();
- }
-
- virtual void TearDown() OVERRIDE {
- AshTestBase::TearDown();
- chromeos::LoginState::Shutdown();
- chromeos::NetworkHandler::Shutdown();
- DBusThreadManager::Shutdown();
- }
-
- protected:
- void SetupDefaultShillState() {
- RunAllPendingInMessageLoop();
- ShillDeviceClient::TestInterface* device_test =
- DBusThreadManager::Get()->GetShillDeviceClient()->GetTestInterface();
- device_test->ClearDevices();
- device_test->AddDevice("/device/stub_wifi_device1",
- shill::kTypeWifi, "stub_wifi_device1");
- device_test->AddDevice("/device/stub_cellular_device1",
- shill::kTypeCellular, "stub_cellular_device1");
-
- ShillServiceClient::TestInterface* service_test =
- DBusThreadManager::Get()->GetShillServiceClient()->GetTestInterface();
- service_test->ClearServices();
- const bool add_to_watchlist = true;
- const bool add_to_visible = true;
- // Create wifi and cellular networks and set to online.
- service_test->AddService("wifi1", "wifi1",
- shill::kTypeWifi, shill::kStateIdle,
- add_to_visible, add_to_watchlist);
- service_test->SetServiceProperty("wifi1",
- shill::kSecurityProperty,
- base::StringValue(shill::kSecurityWep));
- service_test->SetServiceProperty("wifi1",
- shill::kConnectableProperty,
- base::FundamentalValue(true));
- service_test->SetServiceProperty("wifi1",
- shill::kPassphraseProperty,
- base::StringValue("failure"));
- RunAllPendingInMessageLoop();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NetworkStateNotifierTest);
-};
-
-TEST_F(NetworkStateNotifierTest, ConnectionFailure) {
- EXPECT_FALSE(GetSystemTray()->HasNotificationBubble());
- ash::network_connect::ConnectToNetwork("wifi1", NULL /* owning_window */);
- RunAllPendingInMessageLoop();
- // Failure should spawn a notification.
- message_center::MessageCenter* message_center =
- message_center::MessageCenter::Get();
- EXPECT_TRUE(message_center->HasNotification(
- network_connect::kNetworkConnectNotificationId));
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/network/tray_network.cc b/chromium/ash/system/chromeos/network/tray_network.cc
deleted file mode 100644
index 4d2c82a2181..00000000000
--- a/chromium/ash/system/chromeos/network/tray_network.cc
+++ /dev/null
@@ -1,367 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/network/tray_network.h"
-
-#include "ash/ash_switches.h"
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
-#include "ash/system/chromeos/network/network_icon_animation.h"
-#include "ash/system/chromeos/network/network_state_list_detailed_view.h"
-#include "ash/system/chromeos/network/tray_network_state_observer.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_item_more.h"
-#include "ash/system/tray/tray_item_view.h"
-#include "ash/system/tray/tray_utils.h"
-#include "base/command_line.h"
-#include "base/strings/utf_string_conversions.h"
-#include "chromeos/network/network_state.h"
-#include "chromeos/network/network_state_handler.h"
-#include "chromeos/network/shill_property_util.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "third_party/cros_system_api/dbus/service_constants.h"
-#include "ui/base/accessibility/accessible_view_state.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/link.h"
-#include "ui/views/controls/link_listener.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/widget/widget.h"
-
-using chromeos::NetworkHandler;
-using chromeos::NetworkState;
-using chromeos::NetworkStateHandler;
-using chromeos::NetworkTypePattern;
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-
-class NetworkTrayView : public TrayItemView,
- public network_icon::AnimationObserver {
- public:
- explicit NetworkTrayView(TrayNetwork* network_tray)
- : TrayItemView(network_tray),
- network_tray_(network_tray) {
- SetLayoutManager(
- new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0));
-
- image_view_ = new views::ImageView;
- AddChildView(image_view_);
-
- UpdateNetworkStateHandlerIcon();
- }
-
- virtual ~NetworkTrayView() {
- network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this);
- }
-
- virtual const char* GetClassName() const OVERRIDE {
- return "NetworkTrayView";
- }
-
- void UpdateNetworkStateHandlerIcon() {
- NetworkStateHandler* handler =
- NetworkHandler::Get()->network_state_handler();
- gfx::ImageSkia image;
- base::string16 name;
- bool animating = false;
- network_icon::GetDefaultNetworkImageAndLabel(
- network_icon::ICON_TYPE_TRAY, &image, &name, &animating);
- bool show_in_tray = !image.isNull();
- UpdateIcon(show_in_tray, image);
- if (animating)
- network_icon::NetworkIconAnimation::GetInstance()->AddObserver(this);
- else
- network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this);
- // Update accessibility.
- const NetworkState* connected_network =
- handler->ConnectedNetworkByType(NetworkTypePattern::NonVirtual());
- if (connected_network)
- UpdateConnectionStatus(UTF8ToUTF16(connected_network->name()), true);
- else
- UpdateConnectionStatus(base::string16(), false);
- }
-
- void UpdateAlignment(ShelfAlignment alignment) {
- SetLayoutManager(new views::BoxLayout(
- alignment == SHELF_ALIGNMENT_BOTTOM ?
- views::BoxLayout::kHorizontal : views::BoxLayout::kVertical,
- 0, 0, 0));
- Layout();
- }
-
- // views::View override.
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE {
- state->name = connection_status_string_;
- state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
- }
-
- // network_icon::AnimationObserver
- virtual void NetworkIconChanged() OVERRIDE {
- UpdateNetworkStateHandlerIcon();
- }
-
- private:
- // Updates connection status and notifies accessibility event when necessary.
- void UpdateConnectionStatus(const base::string16& network_name,
- bool connected) {
- base::string16 new_connection_status_string;
- if (connected) {
- new_connection_status_string = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_NETWORK_CONNECTED, network_name);
- }
- if (new_connection_status_string != connection_status_string_) {
- connection_status_string_ = new_connection_status_string;
- if(!connection_status_string_.empty())
- NotifyAccessibilityEvent(ui::AccessibilityTypes::EVENT_ALERT, true);
- }
- }
-
- void UpdateIcon(bool tray_icon_visible, const gfx::ImageSkia& image) {
- image_view_->SetImage(image);
- SetVisible(tray_icon_visible);
- SchedulePaint();
- }
-
- TrayNetwork* network_tray_;
- views::ImageView* image_view_;
- base::string16 connection_status_string_;
-
- DISALLOW_COPY_AND_ASSIGN(NetworkTrayView);
-};
-
-class NetworkDefaultView : public TrayItemMore,
- public network_icon::AnimationObserver {
- public:
- NetworkDefaultView(TrayNetwork* network_tray, bool show_more)
- : TrayItemMore(network_tray, show_more),
- network_tray_(network_tray) {
- Update();
- }
-
- virtual ~NetworkDefaultView() {
- network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this);
- }
-
- void Update() {
- gfx::ImageSkia image;
- base::string16 label;
- bool animating = false;
- network_icon::GetDefaultNetworkImageAndLabel(
- network_icon::ICON_TYPE_DEFAULT_VIEW, &image, &label, &animating);
- if (animating)
- network_icon::NetworkIconAnimation::GetInstance()->AddObserver(this);
- else
- network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this);
- SetImage(&image);
- SetLabel(label);
- SetAccessibleName(label);
- }
-
- // network_icon::AnimationObserver
- virtual void NetworkIconChanged() OVERRIDE {
- Update();
- }
-
- private:
- TrayNetwork* network_tray_;
-
- DISALLOW_COPY_AND_ASSIGN(NetworkDefaultView);
-};
-
-class NetworkWifiDetailedView : public NetworkDetailedView {
- public:
- explicit NetworkWifiDetailedView(SystemTrayItem* owner)
- : NetworkDetailedView(owner) {
- SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
- kTrayPopupPaddingHorizontal,
- 10,
- kTrayPopupPaddingBetweenItems));
- image_view_ = new views::ImageView;
- AddChildView(image_view_);
-
- label_view_ = new views::Label();
- label_view_->SetMultiLine(true);
- label_view_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- AddChildView(label_view_);
-
- Update();
- }
-
- virtual ~NetworkWifiDetailedView() {
- }
-
- // Overridden from NetworkDetailedView:
-
- virtual void Init() OVERRIDE {
- }
-
- virtual NetworkDetailedView::DetailedViewType GetViewType() const OVERRIDE {
- return NetworkDetailedView::WIFI_VIEW;
- }
-
- virtual void ManagerChanged() OVERRIDE {
- Update();
- }
-
- virtual void NetworkListChanged() OVERRIDE {
- Update();
- }
-
- virtual void NetworkServiceChanged(
- const chromeos::NetworkState* network) OVERRIDE {
- }
-
- private:
- virtual void Layout() OVERRIDE {
- // Center both views vertically.
- views::View::Layout();
- image_view_->SetY(
- (height() - image_view_->GetPreferredSize().height()) / 2);
- label_view_->SetY(
- (height() - label_view_->GetPreferredSize().height()) / 2);
- }
-
- void Update() {
- bool wifi_enabled =
- NetworkHandler::Get()->network_state_handler()->IsTechnologyEnabled(
- NetworkTypePattern::WiFi());
- const int image_id = wifi_enabled ?
- IDR_AURA_UBER_TRAY_WIFI_ENABLED : IDR_AURA_UBER_TRAY_WIFI_DISABLED;
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- image_view_->SetImage(bundle.GetImageNamed(image_id).ToImageSkia());
-
- const int string_id = wifi_enabled ?
- IDS_ASH_STATUS_TRAY_NETWORK_WIFI_ENABLED :
- IDS_ASH_STATUS_TRAY_NETWORK_WIFI_DISABLED;
- label_view_->SetText(bundle.GetLocalizedString(string_id));
- label_view_->SizeToFit(kTrayPopupMinWidth -
- kTrayPopupPaddingHorizontal * 2 - kTrayPopupPaddingBetweenItems -
- kTrayPopupDetailsIconWidth);
- }
-
- views::ImageView* image_view_;
- views::Label* label_view_;
-
- DISALLOW_COPY_AND_ASSIGN(NetworkWifiDetailedView);
-};
-
-} // namespace tray
-
-TrayNetwork::TrayNetwork(SystemTray* system_tray)
- : SystemTrayItem(system_tray),
- tray_(NULL),
- default_(NULL),
- detailed_(NULL),
- request_wifi_view_(false) {
- network_state_observer_.reset(new TrayNetworkStateObserver(this));
- Shell::GetInstance()->system_tray_notifier()->AddNetworkObserver(this);
-}
-
-TrayNetwork::~TrayNetwork() {
- Shell::GetInstance()->system_tray_notifier()->RemoveNetworkObserver(this);
-}
-
-views::View* TrayNetwork::CreateTrayView(user::LoginStatus status) {
- CHECK(tray_ == NULL);
- if (!chromeos::NetworkHandler::IsInitialized())
- return NULL;
- tray_ = new tray::NetworkTrayView(this);
- return tray_;
-}
-
-views::View* TrayNetwork::CreateDefaultView(user::LoginStatus status) {
- CHECK(default_ == NULL);
- if (!chromeos::NetworkHandler::IsInitialized())
- return NULL;
- CHECK(tray_ != NULL);
- default_ = new tray::NetworkDefaultView(
- this, status != user::LOGGED_IN_LOCKED);
- return default_;
-}
-
-views::View* TrayNetwork::CreateDetailedView(user::LoginStatus status) {
- CHECK(detailed_ == NULL);
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_DETAILED_NETWORK_VIEW);
- if (!chromeos::NetworkHandler::IsInitialized())
- return NULL;
- if (request_wifi_view_) {
- detailed_ = new tray::NetworkWifiDetailedView(this);
- request_wifi_view_ = false;
- } else {
- detailed_ = new tray::NetworkStateListDetailedView(
- this, tray::NetworkStateListDetailedView::LIST_TYPE_NETWORK, status);
- detailed_->Init();
- }
- return detailed_;
-}
-
-void TrayNetwork::DestroyTrayView() {
- tray_ = NULL;
-}
-
-void TrayNetwork::DestroyDefaultView() {
- default_ = NULL;
-}
-
-void TrayNetwork::DestroyDetailedView() {
- detailed_ = NULL;
-}
-
-void TrayNetwork::UpdateAfterLoginStatusChange(user::LoginStatus status) {
-}
-
-void TrayNetwork::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
- if (tray_) {
- SetTrayImageItemBorder(tray_, alignment);
- tray_->UpdateAlignment(alignment);
- }
-}
-
-void TrayNetwork::RequestToggleWifi() {
- // This will always be triggered by a user action (e.g. keyboard shortcut)
- if (!detailed_ ||
- detailed_->GetViewType() == tray::NetworkDetailedView::WIFI_VIEW) {
- request_wifi_view_ = true;
- PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false);
- }
- NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
- bool enabled = handler->IsTechnologyEnabled(NetworkTypePattern::WiFi());
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- enabled ?
- ash::UMA_STATUS_AREA_DISABLE_WIFI :
- ash::UMA_STATUS_AREA_ENABLE_WIFI);
- handler->SetTechnologyEnabled(NetworkTypePattern::WiFi(),
- !enabled,
- chromeos::network_handler::ErrorCallback());
-}
-
-void TrayNetwork::NetworkStateChanged(bool list_changed) {
- if (tray_)
- tray_->UpdateNetworkStateHandlerIcon();
- if (default_)
- default_->Update();
- if (detailed_) {
- if (list_changed)
- detailed_->NetworkListChanged();
- else
- detailed_->ManagerChanged();
- }
-}
-
-void TrayNetwork::NetworkServiceChanged(const chromeos::NetworkState* network) {
- if (detailed_)
- detailed_->NetworkServiceChanged(network);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/network/tray_network.h b/chromium/ash/system/chromeos/network/tray_network.h
deleted file mode 100644
index 240c5c1a669..00000000000
--- a/chromium/ash/system/chromeos/network/tray_network.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_NETWORK_H
-#define ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_NETWORK_H
-
-#include <set>
-
-#include "ash/system/chromeos/network/network_icon.h"
-#include "ash/system/chromeos/network/network_observer.h"
-#include "ash/system/chromeos/network/tray_network_state_observer.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/time/time.h"
-
-namespace chromeos {
-class NetworkState;
-}
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-class NetworkDefaultView;
-class NetworkDetailedView;
-class NetworkTrayView;
-}
-
-class TrayNetwork : public SystemTrayItem,
- public NetworkObserver,
- public TrayNetworkStateObserver::Delegate {
- public:
- explicit TrayNetwork(SystemTray* system_tray);
- virtual ~TrayNetwork();
-
- tray::NetworkDetailedView* detailed() { return detailed_; }
-
- // SystemTrayItem
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyTrayView() OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
- virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
- virtual void UpdateAfterShelfAlignmentChange(
- ShelfAlignment alignment) OVERRIDE;
-
- // NetworkObserver
- virtual void RequestToggleWifi() OVERRIDE;
-
- // TrayNetworkStateObserver::Delegate
- virtual void NetworkStateChanged(bool list_changed) OVERRIDE;
- virtual void NetworkServiceChanged(
- const chromeos::NetworkState* network) OVERRIDE;
-
- private:
- tray::NetworkTrayView* tray_;
- tray::NetworkDefaultView* default_;
- tray::NetworkDetailedView* detailed_;
- bool request_wifi_view_;
- scoped_ptr<TrayNetworkStateObserver> network_state_observer_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayNetwork);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_NETWORK_H
diff --git a/chromium/ash/system/chromeos/network/tray_network_state_observer.cc b/chromium/ash/system/chromeos/network/tray_network_state_observer.cc
deleted file mode 100644
index d090762a190..00000000000
--- a/chromium/ash/system/chromeos/network/tray_network_state_observer.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/network/tray_network_state_observer.h"
-
-#include <set>
-#include <string>
-
-#include "ash/system/chromeos/network/network_icon.h"
-#include "base/location.h"
-#include "chromeos/network/network_state.h"
-#include "chromeos/network/network_state_handler.h"
-#include "third_party/cros_system_api/dbus/service_constants.h"
-
-using chromeos::NetworkHandler;
-
-namespace ash {
-namespace internal {
-
-TrayNetworkStateObserver::TrayNetworkStateObserver(Delegate* delegate)
- : delegate_(delegate) {
- if (NetworkHandler::IsInitialized()) {
- NetworkHandler::Get()->network_state_handler()->AddObserver(
- this, FROM_HERE);
- }
-}
-
-TrayNetworkStateObserver::~TrayNetworkStateObserver() {
- if (NetworkHandler::IsInitialized()) {
- NetworkHandler::Get()->network_state_handler()->RemoveObserver(
- this, FROM_HERE);
- }
-}
-
-void TrayNetworkStateObserver::NetworkListChanged() {
- delegate_->NetworkStateChanged(true);
- network_icon::PurgeNetworkIconCache();
-}
-
-void TrayNetworkStateObserver::DeviceListChanged() {
- delegate_->NetworkStateChanged(false);
-}
-
-void TrayNetworkStateObserver::DefaultNetworkChanged(
- const chromeos::NetworkState* network) {
- delegate_->NetworkStateChanged(true);
-}
-
-void TrayNetworkStateObserver::NetworkPropertiesUpdated(
- const chromeos::NetworkState* network) {
- if (network ==
- NetworkHandler::Get()->network_state_handler()->DefaultNetwork())
- delegate_->NetworkStateChanged(true);
- delegate_->NetworkServiceChanged(network);
-}
-
-} // namespace ash
-} // namespace internal
diff --git a/chromium/ash/system/chromeos/network/tray_network_state_observer.h b/chromium/ash/system/chromeos/network/tray_network_state_observer.h
deleted file mode 100644
index e2f47d10255..00000000000
--- a/chromium/ash/system/chromeos/network/tray_network_state_observer.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_NETWORK_STATE_OBSERVER_H
-#define ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_NETWORK_STATE_OBSERVER_H
-
-#include <string>
-
-#include "base/compiler_specific.h"
-#include "chromeos/network/network_state_handler_observer.h"
-
-namespace ash {
-namespace internal {
-
-class TrayNetworkStateObserver : public chromeos::NetworkStateHandlerObserver {
- public:
- class Delegate {
- public:
- // Called when the network state may have changed. If |list_changed| is
- // true then the list of networks may have changed.
- virtual void NetworkStateChanged(bool list_changed) = 0;
-
- // Called when the properties for |network| may have been updated.
- virtual void NetworkServiceChanged(
- const chromeos::NetworkState* network) = 0;
-
- protected:
- virtual ~Delegate() {}
- };
-
- explicit TrayNetworkStateObserver(Delegate* delegate);
-
- virtual ~TrayNetworkStateObserver();
-
- // NetworkStateHandlerObserver overrides.
- virtual void NetworkListChanged() OVERRIDE;
- virtual void DeviceListChanged() OVERRIDE;
- virtual void DefaultNetworkChanged(
- const chromeos::NetworkState* network) OVERRIDE;
- virtual void NetworkPropertiesUpdated(
- const chromeos::NetworkState* network) OVERRIDE;
-
- private:
- Delegate* delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayNetworkStateObserver);
-};
-
-} // namespace ash
-} // namespace internal
-
-#endif // ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_NETWORK_STATE_OBSERVER_H
diff --git a/chromium/ash/system/chromeos/network/tray_sms.cc b/chromium/ash/system/chromeos/network/tray_sms.cc
deleted file mode 100644
index 7b00c276e74..00000000000
--- a/chromium/ash/system/chromeos/network/tray_sms.cc
+++ /dev/null
@@ -1,420 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/network/tray_sms.h"
-
-#include "ash/shell.h"
-#include "ash/system/tray/fixed_sized_scroll_view.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_bubble.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_details_view.h"
-#include "ash/system/tray/tray_item_more.h"
-#include "ash/system/tray/tray_item_view.h"
-#include "ash/system/tray/tray_notification_view.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/utf_string_conversions.h"
-#include "chromeos/network/network_event_log.h"
-#include "chromeos/network/network_handler.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/views/bubble/tray_bubble_view.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/layout/fill_layout.h"
-#include "ui/views/layout/grid_layout.h"
-#include "ui/views/view.h"
-
-namespace {
-
-// Min height of the list of messages in the popup.
-const int kMessageListMinHeight = 200;
-// Top/bottom padding of the text items.
-const int kPaddingVertical = 10;
-
-const char kSmsNumberKey[] = "number";
-const char kSmsTextKey[] = "text";
-
-bool GetMessageFromDictionary(const base::DictionaryValue* message,
- std::string* number,
- std::string* text) {
- if (!message->GetStringWithoutPathExpansion(kSmsNumberKey, number))
- return false;
- if (!message->GetStringWithoutPathExpansion(kSmsTextKey, text))
- return false;
- return true;
-}
-
-} // namespace
-
-namespace ash {
-namespace internal {
-
-class TraySms::SmsDefaultView : public TrayItemMore {
- public:
- explicit SmsDefaultView(TraySms* owner)
- : TrayItemMore(owner, true) {
- SetImage(ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IDR_AURA_UBER_TRAY_SMS));
- Update();
- }
-
- virtual ~SmsDefaultView() {}
-
- void Update() {
- int message_count = static_cast<TraySms*>(owner())->messages().GetSize();
- base::string16 label = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_SMS_MESSAGES, base::IntToString16(message_count));
- SetLabel(label);
- SetAccessibleName(label);
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SmsDefaultView);
-};
-
-// An entry (row) in SmsDetailedView or NotificationView.
-class TraySms::SmsMessageView : public views::View,
- public views::ButtonListener {
- public:
- enum ViewType {
- VIEW_DETAILED,
- VIEW_NOTIFICATION
- };
-
- SmsMessageView(TraySms* owner,
- ViewType view_type,
- size_t index,
- const std::string& number,
- const std::string& message)
- : owner_(owner),
- index_(index) {
- number_label_ = new views::Label(
- l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_SMS_NUMBER,
- UTF8ToUTF16(number)));
- number_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- number_label_->SetFont(
- number_label_->font().DeriveFont(0, gfx::Font::BOLD));
-
- message_label_ = new views::Label(UTF8ToUTF16(message));
- message_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- message_label_->SetMultiLine(true);
-
- if (view_type == VIEW_DETAILED)
- LayoutDetailedView();
- else
- LayoutNotificationView();
- }
-
- virtual ~SmsMessageView() {
- }
-
- // Overridden from ButtonListener.
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE {
- owner_->RemoveMessage(index_);
- owner_->Update(false);
- }
-
- private:
- void LayoutDetailedView() {
- views::ImageButton* close_button = new views::ImageButton(this);
- close_button->SetImage(views::CustomButton::STATE_NORMAL,
- ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IDR_AURA_WINDOW_CLOSE));
- const int msg_width = owner_->system_tray()->GetSystemBubble()->
- bubble_view()->GetPreferredSize().width() -
- (kNotificationIconWidth + kTrayPopupPaddingHorizontal * 2);
- message_label_->SizeToFit(msg_width);
-
- views::GridLayout* layout = new views::GridLayout(this);
- SetLayoutManager(layout);
-
- views::ColumnSet* columns = layout->AddColumnSet(0);
-
- // Message
- columns->AddPaddingColumn(0, kTrayPopupPaddingHorizontal);
- columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL,
- 0 /* resize percent */,
- views::GridLayout::FIXED, msg_width, msg_width);
-
- // Close button
- columns->AddColumn(views::GridLayout::TRAILING, views::GridLayout::CENTER,
- 0, /* resize percent */
- views::GridLayout::FIXED,
- kNotificationIconWidth, kNotificationIconWidth);
-
-
- layout->AddPaddingRow(0, kPaddingVertical);
- layout->StartRow(0, 0);
- layout->AddView(number_label_);
- layout->AddView(close_button, 1, 2); // 2 rows for icon
- layout->StartRow(0, 0);
- layout->AddView(message_label_);
-
- layout->AddPaddingRow(0, kPaddingVertical);
- }
-
- void LayoutNotificationView() {
- SetLayoutManager(
- new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 1));
- AddChildView(number_label_);
- message_label_->SizeToFit(kTrayNotificationContentsWidth);
- AddChildView(message_label_);
- }
-
- TraySms* owner_;
- size_t index_;
- views::Label* number_label_;
- views::Label* message_label_;
-
- DISALLOW_COPY_AND_ASSIGN(SmsMessageView);
-};
-
-class TraySms::SmsDetailedView : public TrayDetailsView,
- public ViewClickListener {
- public:
- explicit SmsDetailedView(TraySms* owner)
- : TrayDetailsView(owner) {
- Init();
- Update();
- }
-
- virtual ~SmsDetailedView() {
- }
-
- void Init() {
- CreateScrollableList();
- CreateSpecialRow(IDS_ASH_STATUS_TRAY_SMS, this);
- }
-
- void Update() {
- UpdateMessageList();
- Layout();
- SchedulePaint();
- }
-
- // Overridden from views::View.
- virtual gfx::Size GetPreferredSize() OVERRIDE {
- gfx::Size preferred_size = TrayDetailsView::GetPreferredSize();
- if (preferred_size.height() < kMessageListMinHeight)
- preferred_size.set_height(kMessageListMinHeight);
- return preferred_size;
- }
-
- private:
- void UpdateMessageList() {
- const base::ListValue& messages =
- static_cast<TraySms*>(owner())->messages();
- scroll_content()->RemoveAllChildViews(true);
- for (size_t index = 0; index < messages.GetSize(); ++index) {
- const base::DictionaryValue* message = NULL;
- if (!messages.GetDictionary(index, &message)) {
- LOG(ERROR) << "SMS message not a dictionary at: " << index;
- continue;
- }
- std::string number, text;
- if (!GetMessageFromDictionary(message, &number, &text)) {
- LOG(ERROR) << "Error parsing SMS message";
- continue;
- }
- SmsMessageView* msgview = new SmsMessageView(
- static_cast<TraySms*>(owner()), SmsMessageView::VIEW_DETAILED, index,
- number, text);
- scroll_content()->AddChildView(msgview);
- }
- scroller()->Layout();
- }
-
- // Overridden from ViewClickListener.
- virtual void OnViewClicked(views::View* sender) OVERRIDE {
- if (sender == footer()->content())
- TransitionToDefaultView();
- }
-
- DISALLOW_COPY_AND_ASSIGN(SmsDetailedView);
-};
-
-class TraySms::SmsNotificationView : public TrayNotificationView {
- public:
- SmsNotificationView(TraySms* owner,
- size_t message_index,
- const std::string& number,
- const std::string& text)
- : TrayNotificationView(owner, IDR_AURA_UBER_TRAY_SMS),
- message_index_(message_index) {
- SmsMessageView* message_view = new SmsMessageView(
- owner, SmsMessageView::VIEW_NOTIFICATION, message_index_, number, text);
- InitView(message_view);
- }
-
- void Update(size_t message_index,
- const std::string& number,
- const std::string& text) {
- SmsMessageView* message_view = new SmsMessageView(
- tray_sms(), SmsMessageView::VIEW_NOTIFICATION,
- message_index_, number, text);
- UpdateView(message_view);
- }
-
- // Overridden from TrayNotificationView:
- virtual void OnClose() OVERRIDE {
- tray_sms()->RemoveMessage(message_index_);
- }
-
- virtual void OnClickAction() OVERRIDE {
- owner()->PopupDetailedView(0, true);
- }
-
- private:
- TraySms* tray_sms() {
- return static_cast<TraySms*>(owner());
- }
-
- size_t message_index_;
-
- DISALLOW_COPY_AND_ASSIGN(SmsNotificationView);
-};
-
-TraySms::TraySms(SystemTray* system_tray)
- : SystemTrayItem(system_tray),
- default_(NULL),
- detailed_(NULL),
- notification_(NULL) {
- // TODO(armansito): SMS could be a special case for cellular that requires a
- // user (perhaps the owner) to be logged in. If that is the case, then an
- // additional check should be done before subscribing for SMS notifications.
- if (chromeos::NetworkHandler::IsInitialized())
- chromeos::NetworkHandler::Get()->network_sms_handler()->AddObserver(this);
-}
-
-TraySms::~TraySms() {
- if (chromeos::NetworkHandler::IsInitialized()) {
- chromeos::NetworkHandler::Get()->network_sms_handler()->RemoveObserver(
- this);
- }
-}
-
-views::View* TraySms::CreateDefaultView(user::LoginStatus status) {
- CHECK(default_ == NULL);
- default_ = new SmsDefaultView(this);
- default_->SetVisible(!messages_.empty());
- return default_;
-}
-
-views::View* TraySms::CreateDetailedView(user::LoginStatus status) {
- CHECK(detailed_ == NULL);
- HideNotificationView();
- if (messages_.empty())
- return NULL;
- detailed_ = new SmsDetailedView(this);
- return detailed_;
-}
-
-views::View* TraySms::CreateNotificationView(user::LoginStatus status) {
- CHECK(notification_ == NULL);
- if (detailed_)
- return NULL;
- size_t index;
- std::string number, text;
- if (GetLatestMessage(&index, &number, &text))
- notification_ = new SmsNotificationView(this, index, number, text);
- return notification_;
-}
-
-void TraySms::DestroyDefaultView() {
- default_ = NULL;
-}
-
-void TraySms::DestroyDetailedView() {
- detailed_ = NULL;
-}
-
-void TraySms::DestroyNotificationView() {
- notification_ = NULL;
-}
-
-void TraySms::MessageReceived(const base::DictionaryValue& message) {
-
- std::string message_text;
- if (!message.GetStringWithoutPathExpansion(
- chromeos::NetworkSmsHandler::kTextKey, &message_text)) {
- NET_LOG_ERROR("SMS message contains no content.", "");
- return;
- }
- // TODO(armansito): A message might be due to a special "Message Waiting"
- // state that the message is in. Once SMS handling moves to shill, such
- // messages should be filtered there so that this check becomes unnecessary.
- if (message_text.empty()) {
- NET_LOG_DEBUG("SMS has empty content text. Ignoring.", "");
- return;
- }
- std::string message_number;
- if (!message.GetStringWithoutPathExpansion(
- chromeos::NetworkSmsHandler::kNumberKey, &message_number)) {
- NET_LOG_DEBUG("SMS contains no number. Ignoring.", "");
- return;
- }
-
- NET_LOG_DEBUG("Received SMS from: " + message_number + " with text: " +
- message_text, "");
-
- base::DictionaryValue* dict = new base::DictionaryValue();
- dict->SetString(kSmsNumberKey, message_number);
- dict->SetString(kSmsTextKey, message_text);
- messages_.Append(dict);
- Update(true);
-}
-
-bool TraySms::GetLatestMessage(size_t* index,
- std::string* number,
- std::string* text) {
- if (messages_.empty())
- return false;
- DictionaryValue* message;
- size_t message_index = messages_.GetSize() - 1;
- if (!messages_.GetDictionary(message_index, &message))
- return false;
- if (!GetMessageFromDictionary(message, number, text))
- return false;
- *index = message_index;
- return true;
-}
-
-void TraySms::RemoveMessage(size_t index) {
- if (index < messages_.GetSize())
- messages_.Remove(index, NULL);
-}
-
-void TraySms::Update(bool notify) {
- if (messages_.empty()) {
- if (default_)
- default_->SetVisible(false);
- if (detailed_)
- HideDetailedView();
- HideNotificationView();
- } else {
- if (default_) {
- default_->SetVisible(true);
- default_->Update();
- }
- if (detailed_)
- detailed_->Update();
- if (notification_) {
- size_t index;
- std::string number, text;
- if (GetLatestMessage(&index, &number, &text))
- notification_->Update(index, number, text);
- } else if (notify) {
- ShowNotificationView();
- }
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/network/tray_sms.h b/chromium/ash/system/chromeos/network/tray_sms.h
deleted file mode 100644
index 5a79360052a..00000000000
--- a/chromium/ash/system/chromeos/network/tray_sms.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_SMS_H
-#define ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_SMS_H
-
-#include <string>
-
-#include "ash/system/tray/system_tray_item.h"
-#include "base/values.h"
-#include "chromeos/network/network_sms_handler.h"
-
-namespace ash {
-namespace internal {
-
-class TraySms : public SystemTrayItem,
- public chromeos::NetworkSmsHandler::Observer {
- public:
- explicit TraySms(SystemTray* system_tray);
- virtual ~TraySms();
-
- // Overridden from SystemTrayItem.
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateNotificationView(
- user::LoginStatus status) OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
- virtual void DestroyNotificationView() OVERRIDE;
-
- // Overridden from chromeos::NetworkSmsHandler::Observer.
- virtual void MessageReceived(const base::DictionaryValue& message) OVERRIDE;
-
- protected:
- class SmsDefaultView;
- class SmsDetailedView;
- class SmsMessageView;
- class SmsNotificationView;
-
- // Gets the most recent message. Returns false if no messages or unable to
- // retrieve the numebr and text from the message.
- bool GetLatestMessage(size_t* index, std::string* number, std::string* text);
-
- // Removes message at |index| from message list.
- void RemoveMessage(size_t index);
-
- // Called when sms messages have changed (through
- // chromeos::NetworkSmsHandler::Observer).
- void Update(bool notify);
-
- base::ListValue& messages() { return messages_; }
-
- private:
- SmsDefaultView* default_;
- SmsDetailedView* detailed_;
- SmsNotificationView* notification_;
- base::ListValue messages_;
-
- DISALLOW_COPY_AND_ASSIGN(TraySms);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_SMS_H
diff --git a/chromium/ash/system/chromeos/network/tray_vpn.cc b/chromium/ash/system/chromeos/network/tray_vpn.cc
deleted file mode 100644
index d150626568f..00000000000
--- a/chromium/ash/system/chromeos/network/tray_vpn.cc
+++ /dev/null
@@ -1,180 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/network/tray_vpn.h"
-
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
-#include "ash/system/chromeos/network/network_icon_animation.h"
-#include "ash/system/chromeos/network/network_state_list_detailed_view.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_item_more.h"
-#include "ash/system/tray/tray_popup_label_button.h"
-#include "chromeos/network/network_state.h"
-#include "chromeos/network/network_state_handler.h"
-#include "chromeos/network/shill_property_util.h"
-#include "grit/ash_strings.h"
-#include "third_party/cros_system_api/dbus/service_constants.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-
-using chromeos::NetworkHandler;
-using chromeos::NetworkState;
-using chromeos::NetworkStateHandler;
-using chromeos::NetworkTypePattern;
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-
-class VpnDefaultView : public TrayItemMore,
- public network_icon::AnimationObserver {
- public:
- VpnDefaultView(SystemTrayItem* owner, bool show_more)
- : TrayItemMore(owner, show_more) {
- Update();
- }
-
- virtual ~VpnDefaultView() {
- network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this);
- }
-
- static bool ShouldShow() {
- // Do not show VPN line in uber tray bubble if VPN is not configured.
- NetworkStateHandler* handler =
- NetworkHandler::Get()->network_state_handler();
- const NetworkState* vpn =
- handler->FirstNetworkByType(NetworkTypePattern::VPN());
- return vpn != NULL;
- }
-
- void Update() {
- gfx::ImageSkia image;
- base::string16 label;
- bool animating = false;
- GetNetworkStateHandlerImageAndLabel(&image, &label, &animating);
- if (animating)
- network_icon::NetworkIconAnimation::GetInstance()->AddObserver(this);
- else
- network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this);
- SetImage(&image);
- SetLabel(label);
- SetAccessibleName(label);
- }
-
- // network_icon::AnimationObserver
- virtual void NetworkIconChanged() OVERRIDE {
- Update();
- }
-
- private:
- void GetNetworkStateHandlerImageAndLabel(gfx::ImageSkia* image,
- base::string16* label,
- bool* animating) {
- NetworkStateHandler* handler =
- NetworkHandler::Get()->network_state_handler();
- const NetworkState* vpn =
- handler->FirstNetworkByType(NetworkTypePattern::VPN());
- if (!vpn || (vpn->connection_state() == shill::kStateIdle)) {
- *image = network_icon::GetImageForDisconnectedNetwork(
- network_icon::ICON_TYPE_DEFAULT_VIEW, shill::kTypeVPN);
- if (label) {
- *label = l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_VPN_DISCONNECTED);
- }
- *animating = false;
- return;
- }
- *animating = vpn->IsConnectingState();
- *image = network_icon::GetImageForNetwork(
- vpn, network_icon::ICON_TYPE_DEFAULT_VIEW);
- if (label) {
- *label = network_icon::GetLabelForNetwork(
- vpn, network_icon::ICON_TYPE_DEFAULT_VIEW);
- }
- }
-
- DISALLOW_COPY_AND_ASSIGN(VpnDefaultView);
-};
-
-} // namespace tray
-
-TrayVPN::TrayVPN(SystemTray* system_tray)
- : SystemTrayItem(system_tray),
- default_(NULL),
- detailed_(NULL) {
- network_state_observer_.reset(new TrayNetworkStateObserver(this));
-}
-
-TrayVPN::~TrayVPN() {
-}
-
-views::View* TrayVPN::CreateTrayView(user::LoginStatus status) {
- return NULL;
-}
-
-views::View* TrayVPN::CreateDefaultView(user::LoginStatus status) {
- CHECK(default_ == NULL);
- if (!chromeos::NetworkHandler::IsInitialized())
- return NULL;
- if (status == user::LOGGED_IN_NONE)
- return NULL;
- if (!tray::VpnDefaultView::ShouldShow())
- return NULL;
-
- default_ = new tray::VpnDefaultView(this, status != user::LOGGED_IN_LOCKED);
- return default_;
-}
-
-views::View* TrayVPN::CreateDetailedView(user::LoginStatus status) {
- CHECK(detailed_ == NULL);
- if (!chromeos::NetworkHandler::IsInitialized())
- return NULL;
-
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_DETAILED_VPN_VIEW);
- detailed_ = new tray::NetworkStateListDetailedView(
- this, tray::NetworkStateListDetailedView::LIST_TYPE_VPN, status);
- detailed_->Init();
- return detailed_;
-}
-
-void TrayVPN::DestroyTrayView() {
-}
-
-void TrayVPN::DestroyDefaultView() {
- default_ = NULL;
-}
-
-void TrayVPN::DestroyDetailedView() {
- detailed_ = NULL;
-}
-
-void TrayVPN::UpdateAfterLoginStatusChange(user::LoginStatus status) {
-}
-
-void TrayVPN::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
-}
-
-void TrayVPN::NetworkStateChanged(bool list_changed) {
- if (default_)
- default_->Update();
- if (detailed_) {
- if (list_changed)
- detailed_->NetworkListChanged();
- else
- detailed_->ManagerChanged();
- }
-}
-
-void TrayVPN::NetworkServiceChanged(const chromeos::NetworkState* network) {
- if (detailed_)
- detailed_->NetworkServiceChanged(network);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/network/tray_vpn.h b/chromium/ash/system/chromeos/network/tray_vpn.h
deleted file mode 100644
index 1d16e54618e..00000000000
--- a/chromium/ash/system/chromeos/network/tray_vpn.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H
-#define ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H
-
-#include "ash/system/chromeos/network/tray_network_state_observer.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "base/memory/scoped_ptr.h"
-
-namespace ash {
-namespace internal {
-
-class TrayNetworkStateObserver;
-
-namespace tray {
-class NetworkDetailedView;
-class VpnDefaultView;
-class VpnDetailedView;
-}
-
-class TrayVPN : public SystemTrayItem,
- public TrayNetworkStateObserver::Delegate {
- public:
- explicit TrayVPN(SystemTray* system_tray);
- virtual ~TrayVPN();
-
- // SystemTrayItem
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyTrayView() OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
- virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
- virtual void UpdateAfterShelfAlignmentChange(
- ShelfAlignment alignment) OVERRIDE;
-
- // TrayNetworkStateObserver::Delegate
- virtual void NetworkStateChanged(bool list_changed) OVERRIDE;
- virtual void NetworkServiceChanged(
- const chromeos::NetworkState* network) OVERRIDE;
-
- private:
- tray::VpnDefaultView* default_;
- tray::NetworkDetailedView* detailed_;
- scoped_ptr<TrayNetworkStateObserver> network_state_observer_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayVPN);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H
diff --git a/chromium/ash/system/chromeos/power/power_event_observer.cc b/chromium/ash/system/chromeos/power/power_event_observer.cc
deleted file mode 100644
index c99ae50a6e0..00000000000
--- a/chromium/ash/system/chromeos/power/power_event_observer.cc
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/power/power_event_observer.h"
-
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/wm/power_button_controller.h"
-#include "ash/wm/user_activity_detector.h"
-#include "base/prefs/pref_service.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/display/output_configurator.h"
-
-namespace ash {
-namespace internal {
-
-PowerEventObserver::PowerEventObserver()
- : screen_locked_(false) {
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
- AddObserver(this);
- chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->
- AddObserver(this);
-}
-
-PowerEventObserver::~PowerEventObserver() {
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
- RemoveObserver(this);
- chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->
- RemoveObserver(this);
-}
-
-void PowerEventObserver::BrightnessChanged(int level, bool user_initiated) {
- Shell::GetInstance()->power_button_controller()->OnScreenBrightnessChanged(
- static_cast<double>(level));
-}
-
-void PowerEventObserver::SuspendImminent() {
- Shell* shell = Shell::GetInstance();
- SessionStateDelegate* delegate = shell->session_state_delegate();
-
- // If the lock-before-suspending pref is set, get a callback to block
- // suspend and ask the session manager to lock the screen.
- if (!screen_locked_ && delegate->ShouldLockScreenBeforeSuspending() &&
- delegate->CanLockScreen()) {
- screen_lock_callback_ = chromeos::DBusThreadManager::Get()->
- GetPowerManagerClient()->GetSuspendReadinessCallback();
- VLOG(1) << "Requesting screen lock from PowerEventObserver";
- chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->
- RequestLockScreen();
- }
-
- shell->user_activity_detector()->OnDisplayPowerChanging();
- shell->output_configurator()->SuspendDisplays();
-}
-
-void PowerEventObserver::SystemResumed(const base::TimeDelta& sleep_duration) {
- Shell::GetInstance()->output_configurator()->ResumeDisplays();
- Shell::GetInstance()->system_tray_notifier()->NotifyRefreshClock();
-}
-
-void PowerEventObserver::ScreenIsLocked() {
- screen_locked_ = true;
-
- // Stop blocking suspend after the screen is locked.
- if (!screen_lock_callback_.is_null()) {
- VLOG(1) << "Screen locked due to suspend";
- // Run the callback asynchronously. ScreenIsLocked() is currently
- // called asynchronously after RequestLockScreen(), but this guards
- // against it being made synchronous later.
- base::MessageLoop::current()->PostTask(FROM_HERE, screen_lock_callback_);
- screen_lock_callback_.Reset();
- } else {
- VLOG(1) << "Screen locked without suspend";
- }
-}
-
-void PowerEventObserver::ScreenIsUnlocked() {
- screen_locked_ = false;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/power/power_event_observer.h b/chromium/ash/system/chromeos/power/power_event_observer.h
deleted file mode 100644
index b35cb1beeeb..00000000000
--- a/chromium/ash/system/chromeos/power/power_event_observer.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_POWER_POWER_EVENT_OBSERVER_H_
-#define ASH_SYSTEM_CHROMEOS_POWER_POWER_EVENT_OBSERVER_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/callback.h"
-#include "base/compiler_specific.h"
-#include "chromeos/dbus/power_manager_client.h"
-#include "chromeos/dbus/session_manager_client.h"
-
-namespace ash {
-namespace internal {
-
-// A class that observes power-management-related events.
-class ASH_EXPORT PowerEventObserver
- : public chromeos::PowerManagerClient::Observer,
- public chromeos::SessionManagerClient::Observer {
- public:
- // This class registers/unregisters itself as an observer in ctor/dtor.
- PowerEventObserver();
- virtual ~PowerEventObserver();
-
- // chromeos::PowerManagerClient::Observer overrides:
- virtual void BrightnessChanged(int level, bool user_initiated) OVERRIDE;
- virtual void SuspendImminent() OVERRIDE;
- virtual void SystemResumed(const base::TimeDelta& sleep_duration) OVERRIDE;
-
- // chromeos::SessionManagerClient::Observer overrides.
- virtual void ScreenIsLocked() OVERRIDE;
- virtual void ScreenIsUnlocked() OVERRIDE;
-
- // Is the screen currently locked?
- bool screen_locked_;
-
- // If set, called when the lock screen has been shown to confirm that the
- // system is ready to be suspended.
- base::Closure screen_lock_callback_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PowerEventObserver);
-};
-
-} // namespace internal
-} // namespace chromeos
-
-#endif // ASH_SYSTEM_CHROMEOS_POWER_POWER_EVENT_OBSERVER_H_
diff --git a/chromium/ash/system/chromeos/power/power_event_observer_unittest.cc b/chromium/ash/system/chromeos/power/power_event_observer_unittest.cc
deleted file mode 100644
index a2282c3bb2c..00000000000
--- a/chromium/ash/system/chromeos/power/power_event_observer_unittest.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/power/power_event_observer.h"
-
-#include "ash/test/ash_test_base.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/time/time.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/power_manager_client.h"
-
-namespace ash {
-namespace internal {
-
-class PowerEventObserverTest : public test::AshTestBase {
- public:
- PowerEventObserverTest() {}
- virtual ~PowerEventObserverTest() {}
-
- // test::AshTestBase::SetUp() overrides:
- virtual void SetUp() OVERRIDE {
- test::AshTestBase::SetUp();
- observer_.reset(new PowerEventObserver());
- }
-
- virtual void TearDown() OVERRIDE {
- observer_.reset();
- test::AshTestBase::TearDown();
- }
-
- protected:
- scoped_ptr<PowerEventObserver> observer_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PowerEventObserverTest);
-};
-
-TEST_F(PowerEventObserverTest, LockBeforeSuspend) {
- chromeos::PowerManagerClient* client =
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient();
- ASSERT_EQ(0, client->GetNumPendingSuspendReadinessCallbacks());
-
- // Check that the observer requests a suspend-readiness callback when it hears
- // that the system is about to suspend.
- SetCanLockScreen(true);
- SetShouldLockScreenBeforeSuspending(true);
- observer_->SuspendImminent();
- EXPECT_EQ(1, client->GetNumPendingSuspendReadinessCallbacks());
-
- // It should run the callback when it hears that the screen is locked.
- observer_->ScreenIsLocked();
- RunAllPendingInMessageLoop();
- EXPECT_EQ(0, client->GetNumPendingSuspendReadinessCallbacks());
-
- // If the system is already locked, no callback should be requested.
- observer_->SystemResumed(base::TimeDelta());
- observer_->ScreenIsUnlocked();
- observer_->ScreenIsLocked();
- observer_->SuspendImminent();
- EXPECT_EQ(0, client->GetNumPendingSuspendReadinessCallbacks());
-
- // It also shouldn't request a callback if it isn't instructed to lock the
- // screen.
- observer_->SystemResumed(base::TimeDelta());
- SetShouldLockScreenBeforeSuspending(false);
- observer_->SuspendImminent();
- EXPECT_EQ(0, client->GetNumPendingSuspendReadinessCallbacks());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/power/power_status.cc b/chromium/ash/system/chromeos/power/power_status.cc
deleted file mode 100644
index b4b5d94ccf4..00000000000
--- a/chromium/ash/system/chromeos/power/power_status.cc
+++ /dev/null
@@ -1,301 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/power/power_status.h"
-
-#include <algorithm>
-#include <cmath>
-
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "base/logging.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/utf_string_conversions.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/power_manager_client.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/l10n/time_format.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image.h"
-#include "ui/gfx/image/image_skia_operations.h"
-#include "ui/gfx/rect.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-// Updates |proto| to ensure that its fields are consistent.
-void SanitizeProto(power_manager::PowerSupplyProperties* proto) {
- DCHECK(proto);
-
- if (proto->battery_state() ==
- power_manager::PowerSupplyProperties_BatteryState_FULL)
- proto->set_battery_percent(100.0);
-
- if (!proto->is_calculating_battery_time()) {
- const bool on_line_power = proto->external_power() !=
- power_manager::PowerSupplyProperties_ExternalPower_DISCONNECTED;
- if ((on_line_power && proto->battery_time_to_full_sec() < 0) ||
- (!on_line_power && proto->battery_time_to_empty_sec() < 0))
- proto->set_is_calculating_battery_time(true);
- }
-}
-
-base::string16 GetBatteryTimeAccessibilityString(int hour, int min) {
- DCHECK(hour || min);
- if (hour && !min) {
- return ui::TimeFormat::TimeDurationLong(base::TimeDelta::FromHours(hour));
- }
- if (min && !hour) {
- return ui::TimeFormat::TimeDurationLong(base::TimeDelta::FromMinutes(min));
- }
- return l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_BATTERY_TIME_ACCESSIBLE,
- ui::TimeFormat::TimeDurationLong(base::TimeDelta::FromHours(hour)),
- ui::TimeFormat::TimeDurationLong(base::TimeDelta::FromMinutes(min)));
-}
-
-static PowerStatus* g_power_status = NULL;
-
-// Minimum battery percentage rendered in UI.
-const int kMinBatteryPercent = 1;
-
-// Width and height of battery images.
-const int kBatteryImageHeight = 25;
-const int kBatteryImageWidth = 25;
-
-// Number of different power states.
-const int kNumPowerImages = 15;
-
-} // namespace
-
-const int PowerStatus::kMaxBatteryTimeToDisplaySec = 24 * 60 * 60;
-
-// static
-void PowerStatus::Initialize() {
- CHECK(!g_power_status);
- g_power_status = new PowerStatus();
-}
-
-// static
-void PowerStatus::Shutdown() {
- CHECK(g_power_status);
- delete g_power_status;
- g_power_status = NULL;
-}
-
-// static
-bool PowerStatus::IsInitialized() {
- return g_power_status != NULL;
-}
-
-// static
-PowerStatus* PowerStatus::Get() {
- CHECK(g_power_status) << "PowerStatus::Get() called before Initialize().";
- return g_power_status;
-}
-
-// static
-bool PowerStatus::ShouldDisplayBatteryTime(const base::TimeDelta& time) {
- return time >= base::TimeDelta::FromMinutes(1) &&
- time.InSeconds() <= kMaxBatteryTimeToDisplaySec;
-}
-
-// static
-void PowerStatus::SplitTimeIntoHoursAndMinutes(const base::TimeDelta& time,
- int* hours,
- int* minutes) {
- DCHECK(hours);
- DCHECK(minutes);
- *hours = time.InHours();
- const double seconds =
- (time - base::TimeDelta::FromHours(*hours)).InSecondsF();
- *minutes = static_cast<int>(seconds / 60.0 + 0.5);
-}
-
-void PowerStatus::AddObserver(Observer* observer) {
- DCHECK(observer);
- observers_.AddObserver(observer);
-}
-
-void PowerStatus::RemoveObserver(Observer* observer) {
- DCHECK(observer);
- observers_.RemoveObserver(observer);
-}
-
-void PowerStatus::RequestStatusUpdate() {
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
- RequestStatusUpdate();
-}
-
-bool PowerStatus::IsBatteryPresent() const {
- return proto_.battery_state() !=
- power_manager::PowerSupplyProperties_BatteryState_NOT_PRESENT;
-}
-
-bool PowerStatus::IsBatteryFull() const {
- return proto_.battery_state() ==
- power_manager::PowerSupplyProperties_BatteryState_FULL;
-}
-
-bool PowerStatus::IsBatteryCharging() const {
- return proto_.battery_state() ==
- power_manager::PowerSupplyProperties_BatteryState_CHARGING;
-}
-
-bool PowerStatus::IsBatteryDischargingOnLinePower() const {
- return IsLinePowerConnected() && proto_.battery_state() ==
- power_manager::PowerSupplyProperties_BatteryState_DISCHARGING;
-}
-
-double PowerStatus::GetBatteryPercent() const {
- return proto_.battery_percent();
-}
-
-int PowerStatus::GetRoundedBatteryPercent() const {
- return std::max(kMinBatteryPercent,
- static_cast<int>(GetBatteryPercent() + 0.5));
-}
-
-bool PowerStatus::IsBatteryTimeBeingCalculated() const {
- return proto_.is_calculating_battery_time();
-}
-
-base::TimeDelta PowerStatus::GetBatteryTimeToEmpty() const {
- return base::TimeDelta::FromSeconds(proto_.battery_time_to_empty_sec());
-}
-
-base::TimeDelta PowerStatus::GetBatteryTimeToFull() const {
- return base::TimeDelta::FromSeconds(proto_.battery_time_to_full_sec());
-}
-
-bool PowerStatus::IsLinePowerConnected() const {
- return proto_.external_power() !=
- power_manager::PowerSupplyProperties_ExternalPower_DISCONNECTED;
-}
-
-bool PowerStatus::IsMainsChargerConnected() const {
- return proto_.external_power() ==
- power_manager::PowerSupplyProperties_ExternalPower_AC;
-}
-
-bool PowerStatus::IsUsbChargerConnected() const {
- return proto_.external_power() ==
- power_manager::PowerSupplyProperties_ExternalPower_USB;
-}
-
-bool PowerStatus::IsOriginalSpringChargerConnected() const {
- return proto_.external_power() == power_manager::
- PowerSupplyProperties_ExternalPower_ORIGINAL_SPRING_CHARGER;
-}
-
-gfx::ImageSkia PowerStatus::GetBatteryImage(IconSet icon_set) const {
- gfx::Image all;
- if (IsUsbChargerConnected()) {
- all = ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- icon_set == ICON_DARK ?
- IDR_AURA_UBER_TRAY_POWER_SMALL_CHARGING_UNRELIABLE_DARK :
- IDR_AURA_UBER_TRAY_POWER_SMALL_CHARGING_UNRELIABLE);
- } else {
- all = ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- icon_set == ICON_DARK ?
- IDR_AURA_UBER_TRAY_POWER_SMALL_DARK : IDR_AURA_UBER_TRAY_POWER_SMALL);
- }
-
- // Get the horizontal offset in the battery icon array image. The USB /
- // "unreliable charging" image has a single column of icons; the other
- // image contains a "battery" column on the left and a "line power"
- // column on the right.
- int offset = IsUsbChargerConnected() ? 0 : (IsLinePowerConnected() ? 1 : 0);
-
- // Get the vertical offset corresponding to the current battery level.
- int index = -1;
- if (GetBatteryPercent() >= 100.0) {
- index = kNumPowerImages - 1;
- } else if (!IsBatteryPresent()) {
- index = kNumPowerImages;
- } else {
- index = static_cast<int>(
- GetBatteryPercent() / 100.0 * (kNumPowerImages - 1));
- index = std::max(std::min(index, kNumPowerImages - 2), 0);
- }
-
- gfx::Rect region(
- offset * kBatteryImageWidth, index * kBatteryImageHeight,
- kBatteryImageWidth, kBatteryImageHeight);
- return gfx::ImageSkiaOperations::ExtractSubset(*all.ToImageSkia(), region);
-}
-
-base::string16 PowerStatus::GetAccessibleNameString() const {
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- if (IsBatteryFull()) {
- return rb.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_BATTERY_FULL_CHARGE_ACCESSIBLE);
- }
-
- base::string16 battery_percentage_accessible = l10n_util::GetStringFUTF16(
- IsBatteryCharging() ?
- IDS_ASH_STATUS_TRAY_BATTERY_PERCENT_CHARGING_ACCESSIBLE :
- IDS_ASH_STATUS_TRAY_BATTERY_PERCENT_ACCESSIBLE,
- base::IntToString16(GetRoundedBatteryPercent()));
- base::string16 battery_time_accessible = base::string16();
- const base::TimeDelta time = IsBatteryCharging() ? GetBatteryTimeToFull() :
- GetBatteryTimeToEmpty();
-
- if (IsUsbChargerConnected()) {
- battery_time_accessible = rb.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_BATTERY_CHARGING_UNRELIABLE_ACCESSIBLE);
- } else if (IsBatteryTimeBeingCalculated()) {
- battery_time_accessible = rb.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_BATTERY_CALCULATING_ACCESSIBLE);
- } else if (ShouldDisplayBatteryTime(time) &&
- !IsBatteryDischargingOnLinePower()) {
- int hour = 0, min = 0;
- PowerStatus::SplitTimeIntoHoursAndMinutes(time, &hour, &min);
- base::string16 minute = min < 10 ?
- ASCIIToUTF16("0") + base::IntToString16(min) :
- base::IntToString16(min);
- battery_time_accessible =
- l10n_util::GetStringFUTF16(
- IsBatteryCharging() ?
- IDS_ASH_STATUS_TRAY_BATTERY_TIME_UNTIL_FULL_ACCESSIBLE :
- IDS_ASH_STATUS_TRAY_BATTERY_TIME_LEFT_ACCESSIBLE,
- GetBatteryTimeAccessibilityString(hour, min));
- }
- return battery_time_accessible.empty() ?
- battery_percentage_accessible :
- battery_percentage_accessible + ASCIIToUTF16(". ") +
- battery_time_accessible;
-}
-
-PowerStatus::PowerStatus() {
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
- AddObserver(this);
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
- RequestStatusUpdate();
-}
-
-PowerStatus::~PowerStatus() {
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
- RemoveObserver(this);
-}
-
-void PowerStatus::SetProtoForTesting(
- const power_manager::PowerSupplyProperties& proto) {
- proto_ = proto;
- SanitizeProto(&proto_);
-}
-
-void PowerStatus::PowerChanged(
- const power_manager::PowerSupplyProperties& proto) {
- proto_ = proto;
- SanitizeProto(&proto_);
- FOR_EACH_OBSERVER(Observer, observers_, OnPowerStatusChanged());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/power/power_status.h b/chromium/ash/system/chromeos/power/power_status.h
deleted file mode 100644
index e3060496401..00000000000
--- a/chromium/ash/system/chromeos/power/power_status.h
+++ /dev/null
@@ -1,158 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_
-#define ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/observer_list.h"
-#include "base/strings/string16.h"
-#include "base/time/time.h"
-#include "chromeos/dbus/power_manager/power_supply_properties.pb.h"
-#include "chromeos/dbus/power_manager_client.h"
-#include "ui/gfx/image/image_skia.h"
-
-namespace ash {
-namespace internal {
-
-// PowerStatus is a singleton that receives updates about the system's
-// power status from chromeos::PowerManagerClient and makes the information
-// available to interested classes within Ash.
-class ASH_EXPORT PowerStatus : public chromeos::PowerManagerClient::Observer {
- public:
- // Different styles of battery icons.
- enum IconSet {
- ICON_LIGHT,
- ICON_DARK
- };
-
- // Interface for classes that wish to be notified when the power status
- // has changed.
- class Observer {
- public:
- // Called when the power status changes.
- virtual void OnPowerStatusChanged() = 0;
-
- protected:
- virtual ~Observer() {}
- };
-
- // Maximum battery time-to-full or time-to-empty that should be displayed
- // in the UI. If the current is close to zero, battery time estimates can
- // get very large; avoid displaying these large numbers.
- static const int kMaxBatteryTimeToDisplaySec;
-
- // Sets the global instance. Must be called before any calls to Get().
- static void Initialize();
-
- // Destroys the global instance.
- static void Shutdown();
-
- // Returns true if the global instance is initialized.
- static bool IsInitialized();
-
- // Gets the global instance. Initialize must be called first.
- static PowerStatus* Get();
-
- // Returns true if |time|, a time returned by GetBatteryTimeToEmpty() or
- // GetBatteryTimeToFull(), should be displayed in the UI.
- // Less-than-a-minute or very large values aren't displayed.
- static bool ShouldDisplayBatteryTime(const base::TimeDelta& time);
-
- // Copies the hour and minute components of |time| to |hours| and |minutes|.
- // The minute component is rounded rather than truncated: a |time| value
- // corresponding to 92 seconds will produce a |minutes| value of 2, for
- // example.
- static void SplitTimeIntoHoursAndMinutes(const base::TimeDelta& time,
- int* hours,
- int* minutes);
-
- // Adds or removes an observer.
- void AddObserver(Observer* observer);
- void RemoveObserver(Observer* observer);
-
- // Requests updated status from the power manager.
- void RequestStatusUpdate();
-
- // Returns true if a battery is present.
- bool IsBatteryPresent() const;
-
- // Returns true if the battery is full. This also implies that a charger
- // is connected.
- bool IsBatteryFull() const;
-
- // Returns true if the battery is charging. Note that this implies that a
- // charger is connected but the converse is not necessarily true: the
- // battery may be discharging even while a (perhaps low-power) charger is
- // connected. Use Is*Connected() to test for the presence of a charger
- // and also see IsBatteryDischargingOnLinePower().
- bool IsBatteryCharging() const;
-
- // Returns true if the battery is discharging (or neither charging nor
- // discharging while not being full) while line power is connected.
- bool IsBatteryDischargingOnLinePower() const;
-
- // Returns the battery's remaining charge as a value in the range [0.0,
- // 100.0].
- double GetBatteryPercent() const;
-
- // Returns the battery's remaining charge, rounded to an integer with a
- // maximum value of 100.
- int GetRoundedBatteryPercent() const;
-
- // Returns true if the battery's time-to-full and time-to-empty estimates
- // should not be displayed because the power manager is still calculating
- // them.
- bool IsBatteryTimeBeingCalculated() const;
-
- // Returns the estimated time until the battery is empty (if line power
- // is disconnected) or full (if line power is connected). These estimates
- // should only be used if IsBatteryTimeBeingCalculated() returns false.
- base::TimeDelta GetBatteryTimeToEmpty() const;
- base::TimeDelta GetBatteryTimeToFull() const;
-
- // Returns true if line power (including a charger of any type) is connected.
- bool IsLinePowerConnected() const;
-
- // Returns true if an official, non-USB charger is connected.
- bool IsMainsChargerConnected() const;
-
- // Returns true if a USB charger (which is likely to only support a low
- // charging rate) is connected.
- bool IsUsbChargerConnected() const;
-
- // Returns true if an original spring charger is connected.
- bool IsOriginalSpringChargerConnected() const;
-
- // Returns the image that should be shown for the battery's current state.
- gfx::ImageSkia GetBatteryImage(IconSet icon_set) const;
-
- // Returns an string describing the current state for accessibility.
- base::string16 GetAccessibleNameString() const;
-
- // Updates |proto_|. Does not notify observers.
- void SetProtoForTesting(const power_manager::PowerSupplyProperties& proto);
-
- protected:
- PowerStatus();
- virtual ~PowerStatus();
-
- private:
- // Overriden from PowerManagerClient::Observer.
- virtual void PowerChanged(
- const power_manager::PowerSupplyProperties& proto) OVERRIDE;
-
- ObserverList<Observer> observers_;
-
- // Current state.
- power_manager::PowerSupplyProperties proto_;
-
- DISALLOW_COPY_AND_ASSIGN(PowerStatus);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_
diff --git a/chromium/ash/system/chromeos/power/power_status_unittest.cc b/chromium/ash/system/chromeos/power/power_status_unittest.cc
deleted file mode 100644
index ba9d2c11308..00000000000
--- a/chromium/ash/system/chromeos/power/power_status_unittest.cc
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/power/power_status.h"
-
-#include <set>
-#include <string>
-
-#include "base/command_line.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/cros_system_api/dbus/service_constants.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-class TestObserver : public PowerStatus::Observer {
- public:
- TestObserver() : power_changed_count_(0) {}
- virtual ~TestObserver() {}
-
- int power_changed_count() const { return power_changed_count_; }
-
- // PowerStatus::Observer overrides:
- virtual void OnPowerStatusChanged() OVERRIDE { ++power_changed_count_; }
-
- private:
- int power_changed_count_;
-
- DISALLOW_COPY_AND_ASSIGN(TestObserver);
-};
-
-} // namespace
-
-class PowerStatusTest : public testing::Test {
- public:
- PowerStatusTest() : power_status_(NULL) {}
- virtual ~PowerStatusTest() {}
-
- virtual void SetUp() OVERRIDE {
- chromeos::DBusThreadManager::InitializeWithStub();
- PowerStatus::Initialize();
- power_status_ = PowerStatus::Get();
- test_observer_.reset(new TestObserver);
- power_status_->AddObserver(test_observer_.get());
- }
-
- virtual void TearDown() OVERRIDE {
- power_status_->RemoveObserver(test_observer_.get());
- test_observer_.reset();
- PowerStatus::Shutdown();
- chromeos::DBusThreadManager::Shutdown();
- }
-
- protected:
- base::MessageLoopForUI message_loop_;
- PowerStatus* power_status_; // Not owned.
- scoped_ptr<TestObserver> test_observer_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PowerStatusTest);
-};
-
-TEST_F(PowerStatusTest, InitializeAndUpdate) {
- // Test that the initial power supply state should be acquired after
- // PowerStatus is instantiated. This depends on
- // PowerManagerClientStubImpl, which responds to power status update
- // requests, pretends there is a battery present, and generates some valid
- // power supply status data.
- message_loop_.RunUntilIdle();
- EXPECT_EQ(1, test_observer_->power_changed_count());
-
- // Test RequestUpdate, test_obsever_ should be notified for power suuply
- // status change.
- power_status_->RequestStatusUpdate();
- message_loop_.RunUntilIdle();
- EXPECT_EQ(2, test_observer_->power_changed_count());
-}
-
-TEST_F(PowerStatusTest, ShouldDisplayBatteryTime) {
- EXPECT_FALSE(PowerStatus::ShouldDisplayBatteryTime(
- base::TimeDelta::FromSeconds(-1)));
- EXPECT_FALSE(PowerStatus::ShouldDisplayBatteryTime(
- base::TimeDelta::FromSeconds(0)));
- EXPECT_FALSE(PowerStatus::ShouldDisplayBatteryTime(
- base::TimeDelta::FromSeconds(59)));
- EXPECT_TRUE(PowerStatus::ShouldDisplayBatteryTime(
- base::TimeDelta::FromSeconds(60)));
- EXPECT_TRUE(PowerStatus::ShouldDisplayBatteryTime(
- base::TimeDelta::FromSeconds(600)));
- EXPECT_TRUE(PowerStatus::ShouldDisplayBatteryTime(
- base::TimeDelta::FromSeconds(3600)));
- EXPECT_TRUE(PowerStatus::ShouldDisplayBatteryTime(
- base::TimeDelta::FromSeconds(
- PowerStatus::kMaxBatteryTimeToDisplaySec)));
- EXPECT_FALSE(PowerStatus::ShouldDisplayBatteryTime(
- base::TimeDelta::FromSeconds(
- PowerStatus::kMaxBatteryTimeToDisplaySec + 1)));
-}
-
-TEST_F(PowerStatusTest, SplitTimeIntoHoursAndMinutes) {
- int hours = 0, minutes = 0;
- PowerStatus::SplitTimeIntoHoursAndMinutes(
- base::TimeDelta::FromSeconds(0), &hours, &minutes);
- EXPECT_EQ(0, hours);
- EXPECT_EQ(0, minutes);
-
- PowerStatus::SplitTimeIntoHoursAndMinutes(
- base::TimeDelta::FromSeconds(60), &hours, &minutes);
- EXPECT_EQ(0, hours);
- EXPECT_EQ(1, minutes);
-
- PowerStatus::SplitTimeIntoHoursAndMinutes(
- base::TimeDelta::FromSeconds(3600), &hours, &minutes);
- EXPECT_EQ(1, hours);
- EXPECT_EQ(0, minutes);
-
- PowerStatus::SplitTimeIntoHoursAndMinutes(
- base::TimeDelta::FromSeconds(3600 + 60), &hours, &minutes);
- EXPECT_EQ(1, hours);
- EXPECT_EQ(1, minutes);
-
- PowerStatus::SplitTimeIntoHoursAndMinutes(
- base::TimeDelta::FromSeconds(7 * 3600 + 23 * 60), &hours, &minutes);
- EXPECT_EQ(7, hours);
- EXPECT_EQ(23, minutes);
-
- // Check that minutes are rounded.
- PowerStatus::SplitTimeIntoHoursAndMinutes(
- base::TimeDelta::FromSeconds(2 * 3600 + 3 * 60 + 30), &hours, &minutes);
- EXPECT_EQ(2, hours);
- EXPECT_EQ(4, minutes);
-
- PowerStatus::SplitTimeIntoHoursAndMinutes(
- base::TimeDelta::FromSeconds(2 * 3600 + 3 * 60 + 29), &hours, &minutes);
- EXPECT_EQ(2, hours);
- EXPECT_EQ(3, minutes);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/power/power_status_view.cc b/chromium/ash/system/chromeos/power/power_status_view.cc
deleted file mode 100644
index f0fe4b1397a..00000000000
--- a/chromium/ash/system/chromeos/power/power_status_view.cc
+++ /dev/null
@@ -1,221 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/power/power_status_view.h"
-
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "ash/system/chromeos/power/power_status.h"
-#include "ash/system/chromeos/power/tray_power.h"
-#include "ash/system/tray/fixed_sized_image_view.h"
-#include "ash/system/tray/tray_constants.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/utf_string_conversions.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/l10n/time_format.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/layout/grid_layout.h"
-
-namespace ash {
-namespace internal {
-
-// Padding between battery status text and battery icon on default view.
-const int kPaddingBetweenBatteryStatusAndIcon = 3;
-
-PowerStatusView::PowerStatusView(ViewType view_type,
- bool default_view_right_align)
- : default_view_right_align_(default_view_right_align),
- status_label_(NULL),
- time_label_(NULL),
- time_status_label_(NULL),
- percentage_label_(NULL),
- icon_(NULL),
- view_type_(view_type) {
- PowerStatus::Get()->AddObserver(this);
- if (view_type == VIEW_DEFAULT) {
- time_status_label_ = new views::Label;
- percentage_label_ = new views::Label;
- percentage_label_->SetEnabledColor(kHeaderTextColorNormal);
- LayoutDefaultView();
- } else {
- status_label_ = new views::Label;
- time_label_ = new views::Label;
- LayoutNotificationView();
- }
- OnPowerStatusChanged();
-}
-
-PowerStatusView::~PowerStatusView() {
- PowerStatus::Get()->RemoveObserver(this);
-}
-
-void PowerStatusView::OnPowerStatusChanged() {
- view_type_ == VIEW_DEFAULT ?
- UpdateTextForDefaultView() : UpdateTextForNotificationView();
-
- if (icon_) {
- icon_->SetImage(
- PowerStatus::Get()->GetBatteryImage(PowerStatus::ICON_DARK));
- icon_->SetVisible(true);
- }
-}
-
-void PowerStatusView::LayoutDefaultView() {
- if (default_view_right_align_) {
- views::BoxLayout* layout =
- new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0,
- kPaddingBetweenBatteryStatusAndIcon);
- SetLayoutManager(layout);
-
- AddChildView(percentage_label_);
- AddChildView(time_status_label_);
-
- icon_ = new views::ImageView;
- AddChildView(icon_);
- } else {
- // PowerStatusView is left aligned on the system tray pop up item.
- views::BoxLayout* layout =
- new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0,
- kTrayPopupPaddingBetweenItems);
- SetLayoutManager(layout);
-
- icon_ =
- new ash::internal::FixedSizedImageView(0, ash::kTrayPopupItemHeight);
- AddChildView(icon_);
-
- AddChildView(percentage_label_);
- AddChildView(time_status_label_);
- }
-}
-
-void PowerStatusView::LayoutNotificationView() {
- SetLayoutManager(
- new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 1));
- status_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- AddChildView(status_label_);
-
- time_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- AddChildView(time_label_);
-}
-
-void PowerStatusView::UpdateTextForDefaultView() {
- const PowerStatus& status = *PowerStatus::Get();
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- base::string16 battery_percentage;
- base::string16 battery_time_status;
-
- if (status.IsBatteryFull()) {
- battery_time_status =
- rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BATTERY_FULL);
- } else {
- battery_percentage = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_BATTERY_PERCENT_ONLY,
- base::IntToString16(status.GetRoundedBatteryPercent()));
- if (status.IsUsbChargerConnected()) {
- battery_time_status = rb.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_BATTERY_CHARGING_UNRELIABLE);
- } else if (status.IsBatteryTimeBeingCalculated()) {
- battery_time_status =
- rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BATTERY_CALCULATING);
- } else {
- base::TimeDelta time = status.IsBatteryCharging() ?
- status.GetBatteryTimeToFull() : status.GetBatteryTimeToEmpty();
- if (PowerStatus::ShouldDisplayBatteryTime(time) &&
- !status.IsBatteryDischargingOnLinePower()) {
- int hour = 0, min = 0;
- PowerStatus::SplitTimeIntoHoursAndMinutes(time, &hour, &min);
- base::string16 minute = min < 10 ?
- ASCIIToUTF16("0") + base::IntToString16(min) :
- base::IntToString16(min);
- battery_time_status =
- l10n_util::GetStringFUTF16(
- status.IsBatteryCharging() ?
- IDS_ASH_STATUS_TRAY_BATTERY_TIME_UNTIL_FULL_SHORT :
- IDS_ASH_STATUS_TRAY_BATTERY_TIME_LEFT_SHORT,
- base::IntToString16(hour),
- minute);
- }
- }
- battery_percentage = battery_time_status.empty() ?
- battery_percentage : battery_percentage + ASCIIToUTF16(" - ");
- }
- percentage_label_->SetVisible(!battery_percentage.empty());
- percentage_label_->SetText(battery_percentage);
- time_status_label_->SetVisible(!battery_time_status.empty());
- time_status_label_->SetText(battery_time_status);
-}
-
-void PowerStatusView::UpdateTextForNotificationView() {
- const PowerStatus& status = *PowerStatus::Get();
- if (status.IsBatteryFull()) {
- status_label_->SetText(
- ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
- IDS_ASH_STATUS_TRAY_BATTERY_FULL));
- } else {
- status_label_->SetText(
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_BATTERY_PERCENT,
- base::IntToString16(status.GetRoundedBatteryPercent())));
- }
-
- const base::TimeDelta time = status.IsBatteryCharging() ?
- status.GetBatteryTimeToFull() : status.GetBatteryTimeToEmpty();
-
- if (status.IsUsbChargerConnected()) {
- time_label_->SetText(
- ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
- IDS_ASH_STATUS_TRAY_BATTERY_CHARGING_UNRELIABLE));
- } else if (status.IsBatteryTimeBeingCalculated()) {
- time_label_->SetText(
- ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
- IDS_ASH_STATUS_TRAY_BATTERY_CALCULATING));
- } else if (PowerStatus::ShouldDisplayBatteryTime(time) &&
- !status.IsBatteryDischargingOnLinePower()) {
- int hour = 0, min = 0;
- PowerStatus::SplitTimeIntoHoursAndMinutes(time, &hour, &min);
- if (status.IsBatteryCharging()) {
- time_label_->SetText(
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_BATTERY_TIME_UNTIL_FULL,
- base::IntToString16(hour),
- base::IntToString16(min)));
- } else {
- // This is a low battery warning prompting the user in minutes.
- time_label_->SetText(ui::TimeFormat::TimeRemaining(
- base::TimeDelta::FromMinutes(hour * 60 + min)));
- }
- } else {
- time_label_->SetText(base::string16());
- }
-}
-
-void PowerStatusView::ChildPreferredSizeChanged(views::View* child) {
- PreferredSizeChanged();
-}
-
-gfx::Size PowerStatusView::GetPreferredSize() {
- gfx::Size size = views::View::GetPreferredSize();
- return gfx::Size(size.width(), kTrayPopupItemHeight);
-}
-
-int PowerStatusView::GetHeightForWidth(int width) {
- return kTrayPopupItemHeight;
-}
-
-void PowerStatusView::Layout() {
- views::View::Layout();
-
- // Move the time_status_label_ closer to percentage_label_.
- if (percentage_label_ && time_status_label_ &&
- percentage_label_->visible() && time_status_label_->visible()) {
- time_status_label_->SetX(percentage_label_->bounds().right() + 1);
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/power/power_status_view.h b/chromium/ash/system/chromeos/power/power_status_view.h
deleted file mode 100644
index 465da02b8a3..00000000000
--- a/chromium/ash/system/chromeos/power/power_status_view.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_
-#define ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_
-
-#include "ash/system/chromeos/power/power_status.h"
-#include "ui/views/view.h"
-
-namespace views {
-class ImageView;
-class Label;
-}
-
-namespace ash {
-namespace internal {
-
-class PowerStatusView : public views::View, public PowerStatus::Observer {
- public:
- enum ViewType {
- VIEW_DEFAULT,
- VIEW_NOTIFICATION
- };
-
- PowerStatusView(ViewType view_type, bool default_view_right_align);
- virtual ~PowerStatusView();
-
- // Overridden from views::View.
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual int GetHeightForWidth(int width) OVERRIDE;
- virtual void Layout() OVERRIDE;
-
- // Overridden from PowerStatus::Observer.
- virtual void OnPowerStatusChanged() OVERRIDE;
-
- private:
- void LayoutDefaultView();
- void LayoutNotificationView();
- void UpdateTextForDefaultView();
- void UpdateTextForNotificationView();
-
- // Overridden from views::View.
- virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE;
-
- // Layout default view UI items on the right side of system tray pop up item
- // if true; otherwise, layout the UI items on the left side.
- bool default_view_right_align_;
-
- // Labels used only for VIEW_NOTIFICATION.
- views::Label* status_label_;
- views::Label* time_label_;
-
- // Labels used only for VIEW_DEFAULT.
- views::Label* time_status_label_;
- views::Label* percentage_label_;
-
- // Battery status indicator icon.
- views::ImageView* icon_;
-
- ViewType view_type_;
-
- DISALLOW_COPY_AND_ASSIGN(PowerStatusView);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_
diff --git a/chromium/ash/system/chromeos/power/tray_power.cc b/chromium/ash/system/chromeos/power/tray_power.cc
deleted file mode 100644
index 1dedf4896e8..00000000000
--- a/chromium/ash/system/chromeos/power/tray_power.cc
+++ /dev/null
@@ -1,344 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/power/tray_power.h"
-
-#include "ash/ash_switches.h"
-#include "ash/shell.h"
-#include "ash/system/chromeos/power/power_status_view.h"
-#include "ash/system/date/date_view.h"
-#include "ash/system/system_notifier.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_notification_view.h"
-#include "ash/system/tray/tray_utils.h"
-#include "base/command_line.h"
-#include "base/metrics/histogram.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "third_party/icu/source/i18n/unicode/fieldpos.h"
-#include "third_party/icu/source/i18n/unicode/fmtable.h"
-#include "ui/base/accessibility/accessible_view_state.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/message_center/message_center.h"
-#include "ui/message_center/notification.h"
-#include "ui/views/controls/button/button.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/layout/fill_layout.h"
-#include "ui/views/layout/grid_layout.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-using message_center::MessageCenter;
-using message_center::Notification;
-
-namespace ash {
-namespace internal {
-namespace tray {
-
-// This view is used only for the tray.
-class PowerTrayView : public views::ImageView {
- public:
- PowerTrayView() {
- UpdateImage();
- }
-
- virtual ~PowerTrayView() {
- }
-
- // Overriden from views::View.
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE {
- state->name = accessible_name_;
- state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
- }
-
- void UpdateStatus(bool battery_alert) {
- UpdateImage();
- SetVisible(PowerStatus::Get()->IsBatteryPresent());
-
- if (battery_alert) {
- accessible_name_ = PowerStatus::Get()->GetAccessibleNameString();
- NotifyAccessibilityEvent(ui::AccessibilityTypes::EVENT_ALERT, true);
- }
- }
-
- private:
- void UpdateImage() {
- SetImage(PowerStatus::Get()->GetBatteryImage(PowerStatus::ICON_LIGHT));
- }
-
- base::string16 accessible_name_;
-
- DISALLOW_COPY_AND_ASSIGN(PowerTrayView);
-};
-
-class PowerNotificationView : public TrayNotificationView {
- public:
- explicit PowerNotificationView(TrayPower* owner)
- : TrayNotificationView(owner, 0) {
- power_status_view_ =
- new PowerStatusView(PowerStatusView::VIEW_NOTIFICATION, true);
- InitView(power_status_view_);
- }
-
- void UpdateStatus() {
- SetIconImage(PowerStatus::Get()->GetBatteryImage(PowerStatus::ICON_DARK));
- }
-
- private:
- PowerStatusView* power_status_view_;
-
- DISALLOW_COPY_AND_ASSIGN(PowerNotificationView);
-};
-
-} // namespace tray
-
-using tray::PowerNotificationView;
-
-const int TrayPower::kCriticalMinutes = 5;
-const int TrayPower::kLowPowerMinutes = 15;
-const int TrayPower::kNoWarningMinutes = 30;
-const int TrayPower::kCriticalPercentage = 5;
-const int TrayPower::kLowPowerPercentage = 10;
-const int TrayPower::kNoWarningPercentage = 15;
-
-TrayPower::TrayPower(SystemTray* system_tray, MessageCenter* message_center)
- : SystemTrayItem(system_tray),
- message_center_(message_center),
- power_tray_(NULL),
- notification_view_(NULL),
- notification_state_(NOTIFICATION_NONE),
- usb_charger_was_connected_(false),
- line_power_was_connected_(false) {
- PowerStatus::Get()->AddObserver(this);
-}
-
-TrayPower::~TrayPower() {
- PowerStatus::Get()->RemoveObserver(this);
-}
-
-views::View* TrayPower::CreateTrayView(user::LoginStatus status) {
- // There may not be enough information when this is created about whether
- // there is a battery or not. So always create this, and adjust visibility as
- // necessary.
- CHECK(power_tray_ == NULL);
- power_tray_ = new tray::PowerTrayView();
- power_tray_->UpdateStatus(false);
- return power_tray_;
-}
-
-views::View* TrayPower::CreateDefaultView(user::LoginStatus status) {
- // Make sure icon status is up-to-date. (Also triggers stub activation).
- PowerStatus::Get()->RequestStatusUpdate();
- return NULL;
-}
-
-views::View* TrayPower::CreateNotificationView(user::LoginStatus status) {
- CHECK(notification_view_ == NULL);
- if (!PowerStatus::Get()->IsBatteryPresent())
- return NULL;
-
- notification_view_ = new PowerNotificationView(this);
- notification_view_->UpdateStatus();
-
- return notification_view_;
-}
-
-void TrayPower::DestroyTrayView() {
- power_tray_ = NULL;
-}
-
-void TrayPower::DestroyDefaultView() {
-}
-
-void TrayPower::DestroyNotificationView() {
- notification_view_ = NULL;
-}
-
-void TrayPower::UpdateAfterLoginStatusChange(user::LoginStatus status) {
-}
-
-void TrayPower::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
- SetTrayImageItemBorder(power_tray_, alignment);
-}
-
-void TrayPower::OnPowerStatusChanged() {
- RecordChargerType();
-
- if (PowerStatus::Get()->IsOriginalSpringChargerConnected()) {
- ash::Shell::GetInstance()->system_tray_delegate()->
- ShowSpringChargerReplacementDialog();
- }
-
- bool battery_alert = UpdateNotificationState();
- if (power_tray_)
- power_tray_->UpdateStatus(battery_alert);
- if (notification_view_)
- notification_view_->UpdateStatus();
-
- // Factory testing may place the battery into unusual states.
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- ash::switches::kAshHideNotificationsForFactory))
- return;
-
- if (ash::switches::UseUsbChargerNotification())
- MaybeShowUsbChargerNotification();
-
- if (battery_alert)
- ShowNotificationView();
- else if (notification_state_ == NOTIFICATION_NONE)
- HideNotificationView();
-
- usb_charger_was_connected_ = PowerStatus::Get()->IsUsbChargerConnected();
- line_power_was_connected_ = PowerStatus::Get()->IsLinePowerConnected();
-}
-
-bool TrayPower::MaybeShowUsbChargerNotification() {
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- const char kNotificationId[] = "usb-charger";
- bool usb_charger_is_connected = PowerStatus::Get()->IsUsbChargerConnected();
-
- // Check for a USB charger being connected.
- if (usb_charger_is_connected && !usb_charger_was_connected_) {
- scoped_ptr<Notification> notification(new Notification(
- message_center::NOTIFICATION_TYPE_SIMPLE,
- kNotificationId,
- rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_LOW_POWER_CHARGER_TITLE),
- rb.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_LOW_POWER_CHARGER_MESSAGE_SHORT),
- rb.GetImageNamed(IDR_AURA_NOTIFICATION_LOW_POWER_CHARGER),
- base::string16(),
- message_center::NotifierId(
- message_center::NotifierId::SYSTEM_COMPONENT,
- system_notifier::kNotifierPower),
- message_center::RichNotificationData(),
- NULL));
- message_center_->AddNotification(notification.Pass());
- return true;
- }
-
- // Check for unplug of a USB charger while the USB charger notification is
- // showing.
- if (!usb_charger_is_connected && usb_charger_was_connected_) {
- message_center_->RemoveNotification(kNotificationId, false);
- return true;
- }
- return false;
-}
-
-bool TrayPower::UpdateNotificationState() {
- const PowerStatus& status = *PowerStatus::Get();
- if (!status.IsBatteryPresent() ||
- status.IsBatteryTimeBeingCalculated() ||
- status.IsMainsChargerConnected() ||
- status.IsOriginalSpringChargerConnected()) {
- notification_state_ = NOTIFICATION_NONE;
- return false;
- }
-
- return status.IsUsbChargerConnected() ?
- UpdateNotificationStateForRemainingPercentage() :
- UpdateNotificationStateForRemainingTime();
-}
-
-bool TrayPower::UpdateNotificationStateForRemainingTime() {
- // The notification includes a rounded minutes value, so round the estimate
- // received from the power manager to match.
- const int remaining_minutes = static_cast<int>(
- PowerStatus::Get()->GetBatteryTimeToEmpty().InSecondsF() / 60.0 + 0.5);
-
- if (remaining_minutes >= kNoWarningMinutes ||
- PowerStatus::Get()->IsBatteryFull()) {
- notification_state_ = NOTIFICATION_NONE;
- return false;
- }
-
- switch (notification_state_) {
- case NOTIFICATION_NONE:
- if (remaining_minutes <= kCriticalMinutes) {
- notification_state_ = NOTIFICATION_CRITICAL;
- return true;
- }
- if (remaining_minutes <= kLowPowerMinutes) {
- notification_state_ = NOTIFICATION_LOW_POWER;
- return true;
- }
- return false;
- case NOTIFICATION_LOW_POWER:
- if (remaining_minutes <= kCriticalMinutes) {
- notification_state_ = NOTIFICATION_CRITICAL;
- return true;
- }
- return false;
- case NOTIFICATION_CRITICAL:
- return false;
- }
- NOTREACHED();
- return false;
-}
-
-bool TrayPower::UpdateNotificationStateForRemainingPercentage() {
- // The notification includes a rounded percentage, so round the value received
- // from the power manager to match.
- const int remaining_percentage =
- PowerStatus::Get()->GetRoundedBatteryPercent();
-
- if (remaining_percentage >= kNoWarningPercentage ||
- PowerStatus::Get()->IsBatteryFull()) {
- notification_state_ = NOTIFICATION_NONE;
- return false;
- }
-
- switch (notification_state_) {
- case NOTIFICATION_NONE:
- if (remaining_percentage <= kCriticalPercentage) {
- notification_state_ = NOTIFICATION_CRITICAL;
- return true;
- }
- if (remaining_percentage <= kLowPowerPercentage) {
- notification_state_ = NOTIFICATION_LOW_POWER;
- return true;
- }
- return false;
- case NOTIFICATION_LOW_POWER:
- if (remaining_percentage <= kCriticalPercentage) {
- notification_state_ = NOTIFICATION_CRITICAL;
- return true;
- }
- return false;
- case NOTIFICATION_CRITICAL:
- return false;
- }
- NOTREACHED();
- return false;
-}
-
-void TrayPower::RecordChargerType() {
- if (!PowerStatus::Get()->IsLinePowerConnected() ||
- line_power_was_connected_)
- return;
-
- ChargerType current_charger = UNKNOWN_CHARGER;
- if (PowerStatus::Get()->IsMainsChargerConnected()) {
- current_charger = MAINS_CHARGER;
- } else if (PowerStatus::Get()->IsUsbChargerConnected()) {
- current_charger = USB_CHARGER;
- } else if (PowerStatus::Get()->IsOriginalSpringChargerConnected()) {
- current_charger =
- ash::Shell::GetInstance()->system_tray_delegate()->
- HasUserConfirmedSafeSpringCharger() ?
- SAFE_SPRING_CHARGER : UNCONFIRMED_SPRING_CHARGER;
- }
-
- if (current_charger != UNKNOWN_CHARGER) {
- UMA_HISTOGRAM_ENUMERATION("Power.ChargerType",
- current_charger,
- CHARGER_TYPE_COUNT);
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/power/tray_power.h b/chromium/ash/system/chromeos/power/tray_power.h
deleted file mode 100644
index d79ac5e400d..00000000000
--- a/chromium/ash/system/chromeos/power/tray_power.h
+++ /dev/null
@@ -1,117 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_
-#define ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_
-
-#include "ash/system/chromeos/power/power_status.h"
-#include "ash/system/tray/system_tray_item.h"
-
-class SkBitmap;
-
-namespace gfx {
-class Image;
-class ImageSkia;
-}
-
-namespace message_center {
-class MessageCenter;
-}
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-class PowerNotificationView;
-class PowerTrayView;
-}
-
-class ASH_EXPORT TrayPower : public SystemTrayItem,
- public PowerStatus::Observer {
- public:
- // Visible for testing.
- enum NotificationState {
- NOTIFICATION_NONE,
-
- // Low battery charge.
- NOTIFICATION_LOW_POWER,
-
- // Critically low battery charge.
- NOTIFICATION_CRITICAL,
- };
-
- // Time-based notification thresholds when on battery power.
- static const int kCriticalMinutes;
- static const int kLowPowerMinutes;
- static const int kNoWarningMinutes;
-
- // Percentage-based notification thresholds when using a low-power charger.
- static const int kCriticalPercentage;
- static const int kLowPowerPercentage;
- static const int kNoWarningPercentage;
-
- TrayPower(SystemTray* system_tray,
- message_center::MessageCenter* message_center);
- virtual ~TrayPower();
-
- private:
- friend class TrayPowerTest;
-
- // This enum is used for histogram. The existing values should not be removed,
- // and the new values should be added just before CHARGER_TYPE_COUNT.
- enum ChargerType{
- UNKNOWN_CHARGER,
- MAINS_CHARGER,
- USB_CHARGER,
- UNCONFIRMED_SPRING_CHARGER,
- SAFE_SPRING_CHARGER,
- CHARGER_TYPE_COUNT,
- };
-
- // Overridden from SystemTrayItem.
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateNotificationView(
- user::LoginStatus status) OVERRIDE;
- virtual void DestroyTrayView() OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyNotificationView() OVERRIDE;
- virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
- virtual void UpdateAfterShelfAlignmentChange(
- ShelfAlignment alignment) OVERRIDE;
-
- // Overridden from PowerStatus::Observer.
- virtual void OnPowerStatusChanged() OVERRIDE;
-
- // Show a notification that a low-power USB charger has been connected.
- // Returns true if a notification was shown or explicitly hidden.
- bool MaybeShowUsbChargerNotification();
-
- // Sets |notification_state_|. Returns true if a notification should be shown.
- bool UpdateNotificationState();
- bool UpdateNotificationStateForRemainingTime();
- bool UpdateNotificationStateForRemainingPercentage();
-
- // Records the charger type in UMA.
- void RecordChargerType();
-
- message_center::MessageCenter* message_center_; // Not owned.
- tray::PowerTrayView* power_tray_;
- tray::PowerNotificationView* notification_view_;
- NotificationState notification_state_;
-
- // Was a USB charger connected the last time OnPowerStatusChanged() was
- // called?
- bool usb_charger_was_connected_;
-
- // Was line power connected the last time onPowerStatusChanged() was called?
- bool line_power_was_connected_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayPower);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_
diff --git a/chromium/ash/system/chromeos/power/tray_power_unittest.cc b/chromium/ash/system/chromeos/power/tray_power_unittest.cc
deleted file mode 100644
index a5552fab5d2..00000000000
--- a/chromium/ash/system/chromeos/power/tray_power_unittest.cc
+++ /dev/null
@@ -1,236 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/power/tray_power.h"
-
-#include "ash/ash_switches.h"
-#include "ash/test/ash_test_base.h"
-#include "base/memory/scoped_ptr.h"
-#include "chromeos/dbus/power_manager/power_supply_properties.pb.h"
-#include "ui/message_center/fake_message_center.h"
-
-using message_center::Notification;
-using power_manager::PowerSupplyProperties;
-
-namespace {
-
-class MockMessageCenter : public message_center::FakeMessageCenter {
- public:
- MockMessageCenter() : add_count_(0), remove_count_(0) {}
- virtual ~MockMessageCenter() {}
-
- int add_count() const { return add_count_; }
- int remove_count() const { return remove_count_; }
-
- // message_center::FakeMessageCenter overrides:
- virtual void AddNotification(scoped_ptr<Notification> notification) OVERRIDE {
- add_count_++;
- }
- virtual void RemoveNotification(const std::string& id, bool by_user)
- OVERRIDE {
- remove_count_++;
- }
-
- private:
- int add_count_;
- int remove_count_;
-
- DISALLOW_COPY_AND_ASSIGN(MockMessageCenter);
-};
-
-} // namespace
-
-namespace ash {
-namespace internal {
-
-class TrayPowerTest : public test::AshTestBase {
- public:
- TrayPowerTest() {}
- virtual ~TrayPowerTest() {}
-
- MockMessageCenter* message_center() { return message_center_.get(); }
- TrayPower* tray_power() { return tray_power_.get(); }
-
- // test::AshTestBase::SetUp() overrides:
- virtual void SetUp() OVERRIDE {
- test::AshTestBase::SetUp();
- message_center_.reset(new MockMessageCenter());
- tray_power_.reset(new TrayPower(NULL, message_center_.get()));
- }
-
- virtual void TearDown() OVERRIDE {
- tray_power_.reset();
- message_center_.reset();
- test::AshTestBase::TearDown();
- }
-
- TrayPower::NotificationState notification_state() const {
- return tray_power_->notification_state_;
- }
-
- bool MaybeShowUsbChargerNotification(const PowerSupplyProperties& proto) {
- PowerStatus::Get()->SetProtoForTesting(proto);
- return tray_power_->MaybeShowUsbChargerNotification();
- }
-
- bool UpdateNotificationState(const PowerSupplyProperties& proto) {
- PowerStatus::Get()->SetProtoForTesting(proto);
- return tray_power_->UpdateNotificationState();
- }
-
- void SetUsbChargerConnected(bool connected) {
- tray_power_->usb_charger_was_connected_ = connected;
- }
-
- // Returns a discharging PowerSupplyProperties more appropriate for testing.
- static PowerSupplyProperties DefaultPowerSupplyProperties() {
- PowerSupplyProperties proto;
- proto.set_external_power(
- power_manager::PowerSupplyProperties_ExternalPower_DISCONNECTED);
- proto.set_battery_state(
- power_manager::PowerSupplyProperties_BatteryState_DISCHARGING);
- proto.set_battery_percent(50.0);
- proto.set_battery_time_to_empty_sec(3 * 60 * 60);
- proto.set_battery_time_to_full_sec(2 * 60 * 60);
- proto.set_is_calculating_battery_time(false);
- return proto;
- }
-
- private:
- scoped_ptr<MockMessageCenter> message_center_;
- scoped_ptr<TrayPower> tray_power_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayPowerTest);
-};
-
-TEST_F(TrayPowerTest, MaybeShowUsbChargerNotification) {
- PowerSupplyProperties discharging = DefaultPowerSupplyProperties();
- EXPECT_FALSE(MaybeShowUsbChargerNotification(discharging));
- EXPECT_EQ(0, message_center()->add_count());
- EXPECT_EQ(0, message_center()->remove_count());
-
- // Notification shows when connecting a USB charger.
- PowerSupplyProperties usb_connected = DefaultPowerSupplyProperties();
- usb_connected.set_external_power(
- power_manager::PowerSupplyProperties_ExternalPower_USB);
- EXPECT_TRUE(MaybeShowUsbChargerNotification(usb_connected));
- EXPECT_EQ(1, message_center()->add_count());
- EXPECT_EQ(0, message_center()->remove_count());
-
- // Change in charge does not trigger the notification again.
- PowerSupplyProperties more_charge = DefaultPowerSupplyProperties();
- more_charge.set_external_power(
- power_manager::PowerSupplyProperties_ExternalPower_USB);
- more_charge.set_battery_time_to_full_sec(60 * 60);
- more_charge.set_battery_percent(75.0);
- SetUsbChargerConnected(true);
- EXPECT_FALSE(MaybeShowUsbChargerNotification(more_charge));
- EXPECT_EQ(1, message_center()->add_count());
- EXPECT_EQ(0, message_center()->remove_count());
-
- // Disconnecting a USB charger with the notification showing should close
- // the notification.
- EXPECT_TRUE(MaybeShowUsbChargerNotification(discharging));
- EXPECT_EQ(1, message_center()->add_count());
- EXPECT_EQ(1, message_center()->remove_count());
-}
-
-TEST_F(TrayPowerTest, UpdateNotificationState) {
- // No notifications when no battery present.
- PowerSupplyProperties no_battery = DefaultPowerSupplyProperties();
- no_battery.set_external_power(
- power_manager::PowerSupplyProperties_ExternalPower_AC);
- no_battery.set_battery_state(
- power_manager::PowerSupplyProperties_BatteryState_NOT_PRESENT);
- EXPECT_FALSE(UpdateNotificationState(no_battery));
- EXPECT_EQ(TrayPower::NOTIFICATION_NONE, notification_state());
-
- // No notification when calculating remaining battery time.
- PowerSupplyProperties calculating = DefaultPowerSupplyProperties();
- calculating.set_is_calculating_battery_time(true);
- EXPECT_FALSE(UpdateNotificationState(calculating));
- EXPECT_EQ(TrayPower::NOTIFICATION_NONE, notification_state());
-
- // No notification when charging.
- PowerSupplyProperties charging = DefaultPowerSupplyProperties();
- charging.set_external_power(
- power_manager::PowerSupplyProperties_ExternalPower_AC);
- charging.set_battery_state(
- power_manager::PowerSupplyProperties_BatteryState_CHARGING);
- EXPECT_FALSE(UpdateNotificationState(charging));
- EXPECT_EQ(TrayPower::NOTIFICATION_NONE, notification_state());
-
- // When the rounded minutes-to-empty are above the threshold, no notification
- // should be shown.
- PowerSupplyProperties low = DefaultPowerSupplyProperties();
- low.set_battery_time_to_empty_sec(TrayPower::kLowPowerMinutes * 60 + 30);
- EXPECT_FALSE(UpdateNotificationState(low));
- EXPECT_EQ(TrayPower::NOTIFICATION_NONE, notification_state());
-
- // When the rounded value matches the threshold, the notification should
- // appear.
- low.set_battery_time_to_empty_sec(TrayPower::kLowPowerMinutes * 60 + 29);
- EXPECT_TRUE(UpdateNotificationState(low));
- EXPECT_EQ(TrayPower::NOTIFICATION_LOW_POWER, notification_state());
-
- // It should persist at lower values.
- low.set_battery_time_to_empty_sec(TrayPower::kLowPowerMinutes * 60 - 20);
- EXPECT_FALSE(UpdateNotificationState(low));
- EXPECT_EQ(TrayPower::NOTIFICATION_LOW_POWER, notification_state());
-
- // The critical low battery notification should be shown when the rounded
- // value is at the lower threshold.
- PowerSupplyProperties critical = DefaultPowerSupplyProperties();
- critical.set_battery_time_to_empty_sec(TrayPower::kCriticalMinutes * 60 + 29);
- EXPECT_TRUE(UpdateNotificationState(critical));
- EXPECT_EQ(TrayPower::NOTIFICATION_CRITICAL, notification_state());
-
- // The notification should be dismissed when the no-warning threshold is
- // reached.
- PowerSupplyProperties safe = DefaultPowerSupplyProperties();
- safe.set_battery_time_to_empty_sec(TrayPower::kNoWarningMinutes * 60 - 29);
- EXPECT_FALSE(UpdateNotificationState(safe));
- EXPECT_EQ(TrayPower::NOTIFICATION_NONE, notification_state());
-
- // Test that rounded percentages are used when a USB charger is connected.
- PowerSupplyProperties low_usb = DefaultPowerSupplyProperties();
- low_usb.set_external_power(
- power_manager::PowerSupplyProperties_ExternalPower_USB);
- low_usb.set_battery_percent(TrayPower::kLowPowerPercentage + 0.5);
- EXPECT_FALSE(UpdateNotificationState(low_usb));
- EXPECT_EQ(TrayPower::NOTIFICATION_NONE, notification_state());
-
- low_usb.set_battery_percent(TrayPower::kLowPowerPercentage + 0.49);
- EXPECT_TRUE(UpdateNotificationState(low_usb));
- EXPECT_EQ(TrayPower::NOTIFICATION_LOW_POWER, notification_state());
-
- PowerSupplyProperties critical_usb = DefaultPowerSupplyProperties();
- critical_usb.set_external_power(
- power_manager::PowerSupplyProperties_ExternalPower_USB);
- critical_usb.set_battery_percent(TrayPower::kCriticalPercentage + 0.2);
- EXPECT_TRUE(UpdateNotificationState(critical_usb));
- EXPECT_EQ(TrayPower::NOTIFICATION_CRITICAL, notification_state());
-
- PowerSupplyProperties safe_usb = DefaultPowerSupplyProperties();
- safe_usb.set_external_power(
- power_manager::PowerSupplyProperties_ExternalPower_USB);
- safe_usb.set_battery_percent(TrayPower::kNoWarningPercentage - 0.1);
- EXPECT_FALSE(UpdateNotificationState(safe_usb));
- EXPECT_EQ(TrayPower::NOTIFICATION_NONE, notification_state());
-
- // A notification shouldn't be shown when we're in the full state with an
- // original Spring charger connected: http://crbug.com/338376
- PowerSupplyProperties spring = DefaultPowerSupplyProperties();
- spring.set_external_power(power_manager::
- PowerSupplyProperties_ExternalPower_ORIGINAL_SPRING_CHARGER);
- spring.set_battery_state(
- power_manager::PowerSupplyProperties_BatteryState_FULL);
- spring.set_battery_time_to_empty_sec(0);
- spring.set_battery_time_to_full_sec(0);
- EXPECT_FALSE(UpdateNotificationState(spring));
- EXPECT_EQ(TrayPower::NOTIFICATION_NONE, notification_state());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/power/user_activity_notifier.cc b/chromium/ash/system/chromeos/power/user_activity_notifier.cc
deleted file mode 100644
index 921363ca72f..00000000000
--- a/chromium/ash/system/chromeos/power/user_activity_notifier.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/power/user_activity_notifier.h"
-
-#include "ash/shell.h"
-#include "ash/wm/user_activity_detector.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/power_manager_client.h"
-#include "ui/events/event.h"
-#include "ui/events/event_constants.h"
-#include "ui/events/keycodes/keyboard_codes_posix.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-// Minimum number of seconds between notifications.
-const int kNotifyIntervalSec = 5;
-
-} // namespace
-
-UserActivityNotifier::UserActivityNotifier(UserActivityDetector* detector)
- : detector_(detector) {
- detector_->AddObserver(this);
-}
-
-UserActivityNotifier::~UserActivityNotifier() {
- detector_->RemoveObserver(this);
-}
-
-void UserActivityNotifier::OnUserActivity(const ui::Event* event) {
- base::TimeTicks now = base::TimeTicks::Now();
- // InSeconds() truncates rather than rounding, so it's fine for this
- // comparison.
- if (last_notify_time_.is_null() ||
- (now - last_notify_time_).InSeconds() >= kNotifyIntervalSec) {
- power_manager::UserActivityType type = power_manager::USER_ACTIVITY_OTHER;
- if (event && event->type() == ui::ET_KEY_PRESSED) {
- switch (static_cast<const ui::KeyEvent*>(event)->key_code()) {
- case ui::VKEY_BRIGHTNESS_UP:
- type = power_manager::USER_ACTIVITY_BRIGHTNESS_UP_KEY_PRESS;
- break;
- case ui::VKEY_BRIGHTNESS_DOWN:
- type = power_manager::USER_ACTIVITY_BRIGHTNESS_DOWN_KEY_PRESS;
- break;
- default:
- break;
- }
- }
-
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
- NotifyUserActivity(type);
- last_notify_time_ = now;
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/power/user_activity_notifier.h b/chromium/ash/system/chromeos/power/user_activity_notifier.h
deleted file mode 100644
index 78b2c431144..00000000000
--- a/chromium/ash/system/chromeos/power/user_activity_notifier.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_POWER_USER_ACTIVITY_NOTIFIER_H_
-#define ASH_SYSTEM_CHROMEOS_POWER_USER_ACTIVITY_NOTIFIER_H_
-
-#include "ash/wm/user_activity_observer.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/time/time.h"
-
-namespace ash {
-
-class UserActivityDetector;
-
-namespace internal {
-
-// Notifies the power manager when the user is active.
-class UserActivityNotifier : public UserActivityObserver {
- public:
- explicit UserActivityNotifier(UserActivityDetector* detector);
- virtual ~UserActivityNotifier();
-
- // UserActivityObserver implementation.
- virtual void OnUserActivity(const ui::Event* event) OVERRIDE;
-
- private:
- UserActivityDetector* detector_; // not owned
-
- // Last time that the power manager was notified.
- base::TimeTicks last_notify_time_;
-
- DISALLOW_COPY_AND_ASSIGN(UserActivityNotifier);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_POWER_USER_ACTIVITY_NOTIFIER_H_
diff --git a/chromium/ash/system/chromeos/power/video_activity_notifier.cc b/chromium/ash/system/chromeos/power/video_activity_notifier.cc
deleted file mode 100644
index 0f9ec2555e3..00000000000
--- a/chromium/ash/system/chromeos/power/video_activity_notifier.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/power/video_activity_notifier.h"
-
-#include "ash/shell.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/power_manager_client.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-// Minimum number of seconds between notifications.
-const int kNotifyIntervalSec = 5;
-
-} // namespace
-
-VideoActivityNotifier::VideoActivityNotifier(VideoDetector* detector)
- : detector_(detector) {
- detector_->AddObserver(this);
-}
-
-VideoActivityNotifier::~VideoActivityNotifier() {
- detector_->RemoveObserver(this);
-}
-
-void VideoActivityNotifier::OnVideoDetected(bool is_fullscreen) {
- base::TimeTicks now = base::TimeTicks::Now();
- if (last_notify_time_.is_null() ||
- (now - last_notify_time_).InSeconds() >= kNotifyIntervalSec) {
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
- NotifyVideoActivity(is_fullscreen);
- last_notify_time_ = now;
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/power/video_activity_notifier.h b/chromium/ash/system/chromeos/power/video_activity_notifier.h
deleted file mode 100644
index 66569c4f7b7..00000000000
--- a/chromium/ash/system/chromeos/power/video_activity_notifier.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_POWER_VIDEO_ACTIVITY_NOTIFIER_H_
-#define ASH_SYSTEM_CHROMEOS_POWER_VIDEO_ACTIVITY_NOTIFIER_H_
-
-#include "ash/wm/video_detector.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/time/time.h"
-
-namespace ash {
-namespace internal {
-
-// Notifies the power manager when a video is playing.
-class VideoActivityNotifier : public VideoDetectorObserver {
- public:
- explicit VideoActivityNotifier(VideoDetector* detector);
- virtual ~VideoActivityNotifier();
-
- // VideoDetectorObserver implementation.
- virtual void OnVideoDetected(bool is_fullscreen) OVERRIDE;
-
- private:
- VideoDetector* detector_; // not owned
-
- // Last time that the power manager was notified.
- base::TimeTicks last_notify_time_;
-
- DISALLOW_COPY_AND_ASSIGN(VideoActivityNotifier);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_POWER_VIDEO_ACTIVITY_NOTIFIER_H_
diff --git a/chromium/ash/system/chromeos/screen_security/screen_capture_observer.h b/chromium/ash/system/chromeos/screen_security/screen_capture_observer.h
deleted file mode 100644
index 6fca492a16b..00000000000
--- a/chromium/ash/system/chromeos/screen_security/screen_capture_observer.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_SCREEN_CAPTURE_SCREEN_CAPTURE_OBSERVER_H_
-#define ASH_SYSTEM_CHROMEOS_SCREEN_CAPTURE_SCREEN_CAPTURE_OBSERVER_H_
-
-#include "base/callback.h"
-#include "base/strings/string16.h"
-
-namespace ash {
-
-class ScreenCaptureObserver {
- public:
- // Called when screen capture is started.
- virtual void OnScreenCaptureStart(
- const base::Closure& stop_callback,
- const base::string16& screen_capture_status) = 0;
-
- // Called when screen capture is stopped.
- virtual void OnScreenCaptureStop() = 0;
-
- protected:
- virtual ~ScreenCaptureObserver() {}
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_SCREEN_CAPTURE_SCREEN_CAPTURE_OBSERVER_H_
diff --git a/chromium/ash/system/chromeos/screen_security/screen_capture_tray_item.cc b/chromium/ash/system/chromeos/screen_security/screen_capture_tray_item.cc
deleted file mode 100644
index 92e930956b8..00000000000
--- a/chromium/ash/system/chromeos/screen_security/screen_capture_tray_item.cc
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/screen_security/screen_capture_tray_item.h"
-
-#include "ash/shell.h"
-#include "ash/system/system_notifier.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/message_center/message_center.h"
-#include "ui/message_center/notification.h"
-
-using message_center::Notification;
-
-namespace ash {
-namespace internal {
-namespace {
-
-const char kScreenCaptureNotificationId[] = "chrome://screen/capture";
-
-} // namespace
-
-ScreenCaptureTrayItem::ScreenCaptureTrayItem(SystemTray* system_tray)
- : ScreenTrayItem(system_tray) {
- Shell::GetInstance()->system_tray_notifier()->
- AddScreenCaptureObserver(this);
-}
-
-ScreenCaptureTrayItem::~ScreenCaptureTrayItem() {
- Shell::GetInstance()->system_tray_notifier()->
- RemoveScreenCaptureObserver(this);
-}
-
-views::View* ScreenCaptureTrayItem::CreateTrayView(user::LoginStatus status) {
- set_tray_view(
- new tray::ScreenTrayView(this, IDR_AURA_UBER_TRAY_SCREENSHARE));
- return tray_view();
-}
-
-views::View* ScreenCaptureTrayItem::CreateDefaultView(
- user::LoginStatus status) {
- set_default_view(new tray::ScreenStatusView(
- this,
- IDR_AURA_UBER_TRAY_SCREENSHARE_DARK,
- screen_capture_status_,
- l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_SCREEN_CAPTURE_STOP)));
- return default_view();
-}
-
-void ScreenCaptureTrayItem::CreateOrUpdateNotification() {
- message_center::RichNotificationData data;
- data.buttons.push_back(message_center::ButtonInfo(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SCREEN_CAPTURE_STOP)));
- ui::ResourceBundle& resource_bundle = ui::ResourceBundle::GetSharedInstance();
- scoped_ptr<Notification> notification(new Notification(
- message_center::NOTIFICATION_TYPE_SIMPLE,
- kScreenCaptureNotificationId,
- screen_capture_status_,
- base::string16() /* body is blank */,
- resource_bundle.GetImageNamed(IDR_AURA_UBER_TRAY_SCREENSHARE_DARK),
- base::string16() /* display_source */,
- message_center::NotifierId(
- message_center::NotifierId::SYSTEM_COMPONENT,
- system_notifier::kNotifierScreenCapture),
- data,
- new tray::ScreenNotificationDelegate(this)));
- notification->SetSystemPriority();
- message_center::MessageCenter::Get()->AddNotification(notification.Pass());
-}
-
-std::string ScreenCaptureTrayItem::GetNotificationId() {
- return kScreenCaptureNotificationId;
-}
-
-void ScreenCaptureTrayItem::OnScreenCaptureStart(
- const base::Closure& stop_callback,
- const base::string16& screen_capture_status) {
- screen_capture_status_ = screen_capture_status;
- Start(stop_callback);
-}
-
-void ScreenCaptureTrayItem::OnScreenCaptureStop() {
- // We do not need to run the stop callback when
- // screen capture is stopped externally.
- set_is_started(false);
- Update();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/screen_security/screen_capture_tray_item.h b/chromium/ash/system/chromeos/screen_security/screen_capture_tray_item.h
deleted file mode 100644
index 92f6c8a7117..00000000000
--- a/chromium/ash/system/chromeos/screen_security/screen_capture_tray_item.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_SCREEN_CAPTURE_SCREEN_CAPTURE_TRAY_ITEM_H_
-#define ASH_SYSTEM_CHROMEOS_SCREEN_CAPTURE_SCREEN_CAPTURE_TRAY_ITEM_H_
-
-#include "ash/system/chromeos/screen_security/screen_capture_observer.h"
-#include "ash/system/chromeos/screen_security/screen_tray_item.h"
-
-namespace views {
-class View;
-}
-
-namespace ash {
-namespace internal {
-
-class ASH_EXPORT ScreenCaptureTrayItem : public ScreenTrayItem,
- public ScreenCaptureObserver {
- public:
- explicit ScreenCaptureTrayItem(SystemTray* system_tray);
- virtual ~ScreenCaptureTrayItem();
-
- private:
- // Overridden from SystemTrayItem.
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
-
- // Overridden from ScreenTrayItem.
- virtual void CreateOrUpdateNotification() OVERRIDE;
- virtual std::string GetNotificationId() OVERRIDE;
-
- // Overridden from ScreenCaptureObserver.
- virtual void OnScreenCaptureStart(
- const base::Closure& stop_callback,
- const base::string16& screen_capture_status) OVERRIDE;
- virtual void OnScreenCaptureStop() OVERRIDE;
-
- base::string16 screen_capture_status_;
-
- DISALLOW_COPY_AND_ASSIGN(ScreenCaptureTrayItem);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_SCREEN_CAPTURE_SCREEN_CAPTURE_TRAY_ITEM_H_
diff --git a/chromium/ash/system/chromeos/screen_security/screen_share_observer.h b/chromium/ash/system/chromeos/screen_security/screen_share_observer.h
deleted file mode 100644
index fb6a556fa2c..00000000000
--- a/chromium/ash/system/chromeos/screen_security/screen_share_observer.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_SCREEN_SHARE_SCREEN_SHARE_OBSERVER_H_
-#define ASH_SYSTEM_CHROMEOS_SCREEN_SHARE_SCREEN_SHARE_OBSERVER_H_
-
-#include "base/callback.h"
-#include "base/strings/string16.h"
-
-namespace ash {
-
-class ScreenShareObserver {
- public:
- // Called when screen share is started.
- virtual void OnScreenShareStart(
- const base::Closure& stop_callback,
- const base::string16& helper_name) = 0;
-
- // Called when screen share is stopped.
- virtual void OnScreenShareStop() = 0;
-
- protected:
- virtual ~ScreenShareObserver() {}
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_SCREEN_SHARE_SCREEN_SHARE_OBSERVER_H_
diff --git a/chromium/ash/system/chromeos/screen_security/screen_share_tray_item.cc b/chromium/ash/system/chromeos/screen_security/screen_share_tray_item.cc
deleted file mode 100644
index 93d858a65a6..00000000000
--- a/chromium/ash/system/chromeos/screen_security/screen_share_tray_item.cc
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/screen_security/screen_share_tray_item.h"
-
-#include "ash/shell.h"
-#include "ash/system/system_notifier.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/message_center/message_center.h"
-#include "ui/message_center/notification.h"
-
-using message_center::Notification;
-
-namespace ash {
-namespace internal {
-namespace {
-
-const char kScreenShareNotificationId[] = "chrome://screen/share";
-
-}
-
-ScreenShareTrayItem::ScreenShareTrayItem(SystemTray* system_tray)
- : ScreenTrayItem(system_tray) {
- Shell::GetInstance()->system_tray_notifier()->
- AddScreenShareObserver(this);
-}
-
-ScreenShareTrayItem::~ScreenShareTrayItem() {
- Shell::GetInstance()->system_tray_notifier()->
- RemoveScreenShareObserver(this);
-}
-
-views::View* ScreenShareTrayItem::CreateTrayView(user::LoginStatus status) {
- set_tray_view(
- new tray::ScreenTrayView(this, IDR_AURA_UBER_TRAY_SCREENSHARE));
- return tray_view();
-}
-
-views::View* ScreenShareTrayItem::CreateDefaultView(user::LoginStatus status) {
- set_default_view(new tray::ScreenStatusView(
- this,
- IDR_AURA_UBER_TRAY_SCREENSHARE_DARK,
- l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_SCREEN_SHARE_BEING_HELPED),
- l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_SCREEN_SHARE_STOP)));
- return default_view();
-}
-
-void ScreenShareTrayItem::CreateOrUpdateNotification() {
- base::string16 help_label_text;
- if (!helper_name_.empty()) {
- help_label_text = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_SCREEN_SHARE_BEING_HELPED_NAME,
- helper_name_);
- } else {
- help_label_text = l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_SCREEN_SHARE_BEING_HELPED);
- }
-
- message_center::RichNotificationData data;
- data.buttons.push_back(message_center::ButtonInfo(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SCREEN_SHARE_STOP)));
- ui::ResourceBundle& resource_bundle = ui::ResourceBundle::GetSharedInstance();
- scoped_ptr<Notification> notification(new Notification(
- message_center::NOTIFICATION_TYPE_SIMPLE,
- kScreenShareNotificationId,
- help_label_text,
- base::string16() /* body is blank */,
- resource_bundle.GetImageNamed(IDR_AURA_UBER_TRAY_SCREENSHARE_DARK),
- base::string16() /* display_source */,
- message_center::NotifierId(
- message_center::NotifierId::SYSTEM_COMPONENT,
- system_notifier::kNotifierScreenShare),
- data,
- new tray::ScreenNotificationDelegate(this)));
- notification->SetSystemPriority();
- message_center::MessageCenter::Get()->AddNotification(notification.Pass());
-}
-
-std::string ScreenShareTrayItem::GetNotificationId() {
- return kScreenShareNotificationId;
-}
-
-void ScreenShareTrayItem::OnScreenShareStart(
- const base::Closure& stop_callback,
- const base::string16& helper_name) {
- helper_name_ = helper_name;
- Start(stop_callback);
-}
-
-void ScreenShareTrayItem::OnScreenShareStop() {
- // We do not need to run the stop callback
- // when screening is stopped externally.
- set_is_started(false);
- Update();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/screen_security/screen_share_tray_item.h b/chromium/ash/system/chromeos/screen_security/screen_share_tray_item.h
deleted file mode 100644
index 14f26e5667f..00000000000
--- a/chromium/ash/system/chromeos/screen_security/screen_share_tray_item.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_SCREEN_SHARE_SCREEN_SHARE_TRAY_ITEM_H_
-#define ASH_SYSTEM_CHROMEOS_SCREEN_SHARE_SCREEN_SHARE_TRAY_ITEM_H_
-
-#include "ash/system/chromeos/screen_security/screen_share_observer.h"
-#include "ash/system/chromeos/screen_security/screen_tray_item.h"
-
-namespace views {
-class View;
-}
-
-namespace ash {
-namespace internal {
-
-class ASH_EXPORT ScreenShareTrayItem : public ScreenTrayItem,
- public ScreenShareObserver {
- public:
- explicit ScreenShareTrayItem(SystemTray* system_tray);
- virtual ~ScreenShareTrayItem();
-
- private:
- // Overridden from SystemTrayItem.
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
-
- // Overridden from ScreenTrayItem.
- virtual void CreateOrUpdateNotification() OVERRIDE;
- virtual std::string GetNotificationId() OVERRIDE;
-
- // Overridden from ScreenShareObserver.
- virtual void OnScreenShareStart(
- const base::Closure& stop_callback,
- const base::string16& helper_name) OVERRIDE;
- virtual void OnScreenShareStop() OVERRIDE;
-
- base::string16 helper_name_;
-
- DISALLOW_COPY_AND_ASSIGN(ScreenShareTrayItem);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_SCREEN_SHARE_SCREEN_SHARE_TRAY_ITEM_H_
diff --git a/chromium/ash/system/chromeos/screen_security/screen_tray_item.cc b/chromium/ash/system/chromeos/screen_security/screen_tray_item.cc
deleted file mode 100644
index 7e7dc5fd0ee..00000000000
--- a/chromium/ash/system/chromeos/screen_security/screen_tray_item.cc
+++ /dev/null
@@ -1,214 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/screen_security/screen_tray_item.h"
-
-#include "ash/system/tray/fixed_sized_image_view.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/message_center/message_center.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-
-namespace {
-const int kStopButtonRightPadding = 18;
-} // namespace
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-
-// ScreenTrayView implementations.
-ScreenTrayView::ScreenTrayView(ScreenTrayItem* screen_tray_item, int icon_id)
- : TrayItemView(screen_tray_item),
- screen_tray_item_(screen_tray_item) {
- CreateImageView();
- image_view()->SetImage(ui::ResourceBundle::GetSharedInstance()
- .GetImageNamed(icon_id).ToImageSkia());
-
- Update();
-}
-
-ScreenTrayView::~ScreenTrayView() {
-}
-
-void ScreenTrayView::Update() {
- SetVisible(screen_tray_item_->is_started());
-}
-
-
-// ScreenStatusView implementations.
-ScreenStatusView::ScreenStatusView(ScreenTrayItem* screen_tray_item,
- int icon_id,
- const base::string16& label_text,
- const base::string16& stop_button_text)
- : screen_tray_item_(screen_tray_item),
- icon_(NULL),
- label_(NULL),
- stop_button_(NULL),
- icon_id_(icon_id),
- label_text_(label_text),
- stop_button_text_(stop_button_text) {
- CreateItems();
- Update();
-}
-
-ScreenStatusView::~ScreenStatusView() {
-}
-
-void ScreenStatusView::Layout() {
- views::View::Layout();
-
- // Give the stop button the space it requests.
- gfx::Size stop_size = stop_button_->GetPreferredSize();
- gfx::Rect stop_bounds(stop_size);
- stop_bounds.set_x(width() - stop_size.width() - kStopButtonRightPadding);
- stop_bounds.set_y((height() - stop_size.height()) / 2);
- stop_button_->SetBoundsRect(stop_bounds);
-
- // Adjust the label's bounds in case it got cut off by |stop_button_|.
- if (label_->bounds().Intersects(stop_button_->bounds())) {
- gfx::Rect label_bounds = label_->bounds();
- label_bounds.set_width(
- stop_button_->x() - kTrayPopupPaddingBetweenItems - label_->x());
- label_->SetBoundsRect(label_bounds);
- }
-}
-
-void ScreenStatusView::ButtonPressed(
- views::Button* sender,
- const ui::Event& event) {
- DCHECK(sender == stop_button_);
- screen_tray_item_->Stop();
-}
-
-void ScreenStatusView::CreateItems() {
- set_background(views::Background::CreateSolidBackground(kBackgroundColor));
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
- kTrayPopupPaddingHorizontal,
- 0,
- kTrayPopupPaddingBetweenItems));
- icon_ = new FixedSizedImageView(0, kTrayPopupItemHeight);
- icon_->SetImage(bundle.GetImageNamed(icon_id_).ToImageSkia());
- AddChildView(icon_);
- label_ = new views::Label;
- label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- label_->SetMultiLine(true);
- label_->SetText(label_text_);
- AddChildView(label_);
-
- stop_button_ = new TrayPopupLabelButton(this, stop_button_text_);
- AddChildView(stop_button_);
-}
-
-void ScreenStatusView::Update() {
- // Hide the notification bubble when the ash tray bubble opens.
- screen_tray_item_->HideNotificationView();
- SetVisible(screen_tray_item_->is_started());
-}
-
-ScreenNotificationDelegate::ScreenNotificationDelegate(
- ScreenTrayItem* screen_tray)
- : screen_tray_(screen_tray) {
-}
-
-ScreenNotificationDelegate::~ScreenNotificationDelegate() {
-}
-
-void ScreenNotificationDelegate::Display() {
-}
-
-void ScreenNotificationDelegate::Error() {
-}
-
-void ScreenNotificationDelegate::Close(bool by_user) {
-}
-
-void ScreenNotificationDelegate::Click() {
-}
-
-void ScreenNotificationDelegate::ButtonClick(int button_index) {
- DCHECK_EQ(0, button_index);
- screen_tray_->Stop();
-}
-
-} // namespace tray
-
-ScreenTrayItem::ScreenTrayItem(SystemTray* system_tray)
- : SystemTrayItem(system_tray),
- tray_view_(NULL),
- default_view_(NULL),
- is_started_(false),
- stop_callback_(base::Bind(&base::DoNothing)) {
-}
-
-ScreenTrayItem::~ScreenTrayItem() {}
-
-void ScreenTrayItem::Update() {
- if (tray_view_)
- tray_view_->Update();
- if (default_view_)
- default_view_->Update();
- if (is_started_) {
- CreateOrUpdateNotification();
- } else {
- message_center::MessageCenter::Get()->RemoveNotification(
- GetNotificationId(), false /* by_user */);
- }
-}
-
-void ScreenTrayItem::Start(const base::Closure& stop_callback) {
- stop_callback_ = stop_callback;
- is_started_ = true;
-
- if (tray_view_)
- tray_view_->Update();
-
- if (default_view_)
- default_view_->Update();
-
- if (!system_tray()->HasSystemBubbleType(
- SystemTrayBubble::BUBBLE_TYPE_DEFAULT)) {
- CreateOrUpdateNotification();
- }
-}
-
-void ScreenTrayItem::Stop() {
- is_started_ = false;
- Update();
-
- if (stop_callback_.is_null())
- return;
-
- base::Closure callback = stop_callback_;
- stop_callback_.Reset();
- callback.Run();
-}
-
-void ScreenTrayItem::DestroyTrayView() {
- tray_view_ = NULL;
-}
-
-void ScreenTrayItem::DestroyDefaultView() {
- default_view_ = NULL;
-}
-
-void ScreenTrayItem::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
- if (!tray_view_)
- return;
-
- // Center the item dependent on the orientation of the shelf.
- views::BoxLayout::Orientation layout =
- (alignment == ash::SHELF_ALIGNMENT_BOTTOM ||
- alignment == ash::SHELF_ALIGNMENT_TOP)
- ? views::BoxLayout::kHorizontal
- : views::BoxLayout::kVertical;
- tray_view_->SetLayoutManager(new views::BoxLayout(layout, 0, 0, 0));
- tray_view_->Layout();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/screen_security/screen_tray_item.h b/chromium/ash/system/chromeos/screen_security/screen_tray_item.h
deleted file mode 100644
index ddbb1264749..00000000000
--- a/chromium/ash/system/chromeos/screen_security/screen_tray_item.h
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_SCREEN_TRAY_ITEM_H_
-#define ASH_SYSTEM_CHROMEOS_SCREEN_TRAY_ITEM_H_
-
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/tray_item_view.h"
-#include "ash/system/tray/tray_notification_view.h"
-#include "ash/system/tray/tray_popup_label_button.h"
-#include "ui/message_center/notification_delegate.h"
-#include "ui/views/controls/button/button.h"
-#include "ui/views/controls/image_view.h"
-
-namespace views {
-class View;
-}
-
-namespace ash {
-namespace internal {
-
-class ScreenTrayItem;
-
-namespace tray {
-
-class ScreenTrayView : public TrayItemView {
- public:
- ScreenTrayView(ScreenTrayItem* screen_tray_item, int icon_id);
- virtual ~ScreenTrayView();
-
- void Update();
-
- private:
- ScreenTrayItem* screen_tray_item_;
-
- DISALLOW_COPY_AND_ASSIGN(ScreenTrayView);
-};
-
-class ScreenStatusView : public views::View,
- public views::ButtonListener {
- public:
- ScreenStatusView(ScreenTrayItem* screen_tray_item,
- int icon_id,
- const base::string16& label_text,
- const base::string16& stop_button_text);
- virtual ~ScreenStatusView();
-
- // Overridden from views::View.
- virtual void Layout() OVERRIDE;
-
- // Overridden from views::ButtonListener.
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
-
- void CreateItems();
- void Update();
-
- private:
- ScreenTrayItem* screen_tray_item_;
- views::ImageView* icon_;
- views::Label* label_;
- TrayPopupLabelButton* stop_button_;
- int icon_id_;
- base::string16 label_text_;
- base::string16 stop_button_text_;
-
- DISALLOW_COPY_AND_ASSIGN(ScreenStatusView);
-};
-
-class ScreenNotificationDelegate : public message_center::NotificationDelegate {
- public:
- explicit ScreenNotificationDelegate(ScreenTrayItem* screen_tray);
-
- // message_center::NotificationDelegate overrides:
- virtual void Display() OVERRIDE;
- virtual void Error() OVERRIDE;
- virtual void Close(bool by_user) OVERRIDE;
- virtual void Click() OVERRIDE;
- virtual void ButtonClick(int button_index) OVERRIDE;
-
- protected:
- virtual ~ScreenNotificationDelegate();
-
- private:
- ScreenTrayItem* screen_tray_;
-
- DISALLOW_COPY_AND_ASSIGN(ScreenNotificationDelegate);
-};
-
-} // namespace tray
-
-
-// The base tray item for screen capture and screen sharing. The
-// Start method brings up a notification and a tray item, and the user
-// can stop the screen capture/sharing by pressing the stop button.
-class ASH_EXPORT ScreenTrayItem : public SystemTrayItem {
- public:
- explicit ScreenTrayItem(SystemTray* system_tray);
- virtual ~ScreenTrayItem();
-
- tray::ScreenTrayView* tray_view() { return tray_view_; }
- void set_tray_view(tray::ScreenTrayView* tray_view) {
- tray_view_ = tray_view;
- }
-
- tray::ScreenStatusView* default_view() { return default_view_; }
- void set_default_view(tray::ScreenStatusView* default_view) {
- default_view_ = default_view;
- }
-
- bool is_started() const { return is_started_; }
- void set_is_started(bool is_started) { is_started_ = is_started; }
-
- void Update();
- void Start(const base::Closure& stop_callback);
- void Stop();
-
- // Creates or updates the notification for the tray item.
- virtual void CreateOrUpdateNotification() = 0;
-
- // Returns the id of the notification for the tray item.
- virtual std::string GetNotificationId() = 0;
-
- // Overridden from SystemTrayItem.
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE = 0;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE = 0;
- virtual void DestroyTrayView() OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void UpdateAfterShelfAlignmentChange(
- ShelfAlignment alignment) OVERRIDE;
-
- private:
- tray::ScreenTrayView* tray_view_;
- tray::ScreenStatusView* default_view_;
- bool is_started_;
- base::Closure stop_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(ScreenTrayItem);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_SCREEN_TRAY_ITEM_H_
diff --git a/chromium/ash/system/chromeos/screen_security/screen_tray_item_unittest.cc b/chromium/ash/system/chromeos/screen_security/screen_tray_item_unittest.cc
deleted file mode 100644
index 928dad7c1cc..00000000000
--- a/chromium/ash/system/chromeos/screen_security/screen_tray_item_unittest.cc
+++ /dev/null
@@ -1,226 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/screen_security/screen_tray_item.h"
-
-#include "ash/shell.h"
-#include "ash/system/chromeos/screen_security/screen_capture_tray_item.h"
-#include "ash/system/chromeos/screen_security/screen_share_tray_item.h"
-#include "ash/system/tray/tray_item_view.h"
-#include "ash/test/ash_test_base.h"
-#include "base/callback.h"
-#include "base/strings/utf_string_conversions.h"
-#include "ui/events/event.h"
-#include "ui/gfx/point.h"
-#include "ui/message_center/message_center.h"
-#include "ui/views/view.h"
-
-namespace ash {
-namespace internal {
-
-// Test with unicode strings.
-const char kTestScreenCaptureAppName[] =
- "\xE0\xB2\xA0\x5F\xE0\xB2\xA0 (Screen Capture Test)";
-const char kTestScreenShareHelperName[] =
- "\xE5\xAE\x8B\xE8\x85\xBE (Screen Share Test)";
-
-SystemTray* GetSystemTray() {
- return Shell::GetInstance()->GetPrimarySystemTray();
-}
-
-SystemTrayNotifier* GetSystemTrayNotifier() {
- return Shell::GetInstance()->system_tray_notifier();
-}
-
-void ClickViewCenter(views::View* view) {
- gfx::Point click_location_in_local =
- gfx::Point(view->width() / 2, view->height() / 2);
- view->OnMousePressed(ui::MouseEvent(ui::ET_MOUSE_PRESSED,
- click_location_in_local,
- click_location_in_local,
- ui::EF_NONE));
-}
-
-class ScreenTrayItemTest : public ash::test::AshTestBase {
- public:
- ScreenTrayItemTest()
- : tray_item_(NULL), stop_callback_hit_count_(0) {}
- virtual ~ScreenTrayItemTest() {}
-
- ScreenTrayItem* tray_item() { return tray_item_; }
- void set_tray_item(ScreenTrayItem* tray_item) { tray_item_ = tray_item; }
-
- int stop_callback_hit_count() const { return stop_callback_hit_count_; }
-
- virtual void SetUp() OVERRIDE {
- test::AshTestBase::SetUp();
- TrayItemView::DisableAnimationsForTest();
- }
-
- void StartSession() {
- tray_item_->Start(
- base::Bind(&ScreenTrayItemTest::StopCallback, base::Unretained(this)));
- }
-
- void StopSession() {
- tray_item_->Stop();
- }
-
- void StopCallback() {
- stop_callback_hit_count_++;
- }
-
- private:
- ScreenTrayItem* tray_item_;
- int stop_callback_hit_count_;
-
- DISALLOW_COPY_AND_ASSIGN(ScreenTrayItemTest);
-};
-
-class ScreenCaptureTest : public ScreenTrayItemTest {
- public:
- ScreenCaptureTest() {}
- virtual ~ScreenCaptureTest() {}
-
- virtual void SetUp() OVERRIDE {
- ScreenTrayItemTest::SetUp();
- // This tray item is owned by its parent system tray view and will
- // be deleted automatically when its parent is destroyed in AshTestBase.
- ScreenTrayItem* tray_item = new ScreenCaptureTrayItem(GetSystemTray());
- GetSystemTray()->AddTrayItem(tray_item);
- set_tray_item(tray_item);
- }
-
- DISALLOW_COPY_AND_ASSIGN(ScreenCaptureTest);
-};
-
-class ScreenShareTest : public ScreenTrayItemTest {
- public:
- ScreenShareTest() {}
- virtual ~ScreenShareTest() {}
-
- virtual void SetUp() OVERRIDE {
- ScreenTrayItemTest::SetUp();
- // This tray item is owned by its parent system tray view and will
- // be deleted automatically when its parent is destroyed in AshTestBase.
- ScreenTrayItem* tray_item = new ScreenShareTrayItem(GetSystemTray());
- GetSystemTray()->AddTrayItem(tray_item);
- set_tray_item(tray_item);
- }
-
- DISALLOW_COPY_AND_ASSIGN(ScreenShareTest);
-};
-
-void TestStartAndStop(ScreenTrayItemTest* test) {
- ScreenTrayItem* tray_item = test->tray_item();
-
- EXPECT_FALSE(tray_item->is_started());
- EXPECT_EQ(0, test->stop_callback_hit_count());
-
- test->StartSession();
- EXPECT_TRUE(tray_item->is_started());
-
- test->StopSession();
- EXPECT_FALSE(tray_item->is_started());
- EXPECT_EQ(1, test->stop_callback_hit_count());
-}
-
-TEST_F(ScreenCaptureTest, StartAndStop) { TestStartAndStop(this); }
-TEST_F(ScreenShareTest, StartAndStop) { TestStartAndStop(this); }
-
-void TestNotificationStartAndStop(ScreenTrayItemTest* test,
- const base::Closure& start_function,
- const base::Closure& stop_function) {
- ScreenTrayItem* tray_item = test->tray_item();
- EXPECT_FALSE(tray_item->is_started());
-
- start_function.Run();
- EXPECT_TRUE(tray_item->is_started());
-
- // The stop callback shouldn't be called because we stopped
- // through the notification system.
- stop_function.Run();
- EXPECT_FALSE(tray_item->is_started());
- EXPECT_EQ(0, test->stop_callback_hit_count());
-}
-
-TEST_F(ScreenCaptureTest, NotificationStartAndStop) {
- base::Closure start_function =
- base::Bind(&SystemTrayNotifier::NotifyScreenCaptureStart,
- base::Unretained(GetSystemTrayNotifier()),
- base::Bind(&ScreenTrayItemTest::StopCallback,
- base::Unretained(this)),
- base::UTF8ToUTF16(kTestScreenCaptureAppName));
-
- base::Closure stop_function =
- base::Bind(&SystemTrayNotifier::NotifyScreenCaptureStop,
- base::Unretained(GetSystemTrayNotifier()));
-
- TestNotificationStartAndStop(this, start_function, stop_function);
-}
-
-TEST_F(ScreenShareTest, NotificationStartAndStop) {
- base::Closure start_func =
- base::Bind(&SystemTrayNotifier::NotifyScreenShareStart,
- base::Unretained(GetSystemTrayNotifier()),
- base::Bind(&ScreenTrayItemTest::StopCallback,
- base::Unretained(this)),
- base::UTF8ToUTF16(kTestScreenShareHelperName));
-
- base::Closure stop_func =
- base::Bind(&SystemTrayNotifier::NotifyScreenShareStop,
- base::Unretained(GetSystemTrayNotifier()));
-
- TestNotificationStartAndStop(this, start_func, stop_func);
-}
-
-void TestNotificationView(ScreenTrayItemTest* test) {
- ScreenTrayItem* tray_item = test->tray_item();
-
- test->StartSession();
- message_center::MessageCenter* message_center =
- message_center::MessageCenter::Get();
- EXPECT_TRUE(message_center->HasNotification(tray_item->GetNotificationId()));
- test->StopSession();
-}
-
-TEST_F(ScreenCaptureTest, NotificationView) { TestNotificationView(this); }
-TEST_F(ScreenShareTest, NotificationView) { TestNotificationView(this); }
-
-void TestSystemTrayInteraction(ScreenTrayItemTest* test) {
- ScreenTrayItem* tray_item = test->tray_item();
- EXPECT_FALSE(tray_item->tray_view()->visible());
-
- const std::vector<SystemTrayItem*>& tray_items =
- GetSystemTray()->GetTrayItems();
- EXPECT_NE(std::find(tray_items.begin(), tray_items.end(), tray_item),
- tray_items.end());
-
- test->StartSession();
- EXPECT_TRUE(tray_item->tray_view()->visible());
-
- // The default view should be created in a new bubble.
- GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW);
- EXPECT_TRUE(tray_item->default_view());
- GetSystemTray()->CloseSystemBubble();
- EXPECT_FALSE(tray_item->default_view());
-
- test->StopSession();
- EXPECT_FALSE(tray_item->tray_view()->visible());
-
- // The default view should not be visible because session is stopped.
- GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW);
- EXPECT_FALSE(tray_item->default_view()->visible());
-}
-
-TEST_F(ScreenCaptureTest, SystemTrayInteraction) {
- TestSystemTrayInteraction(this);
-}
-
-TEST_F(ScreenShareTest, SystemTrayInteraction) {
- TestSystemTrayInteraction(this);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/settings/tray_settings.cc b/chromium/ash/system/chromeos/settings/tray_settings.cc
deleted file mode 100644
index 8868b7cf50d..00000000000
--- a/chromium/ash/system/chromeos/settings/tray_settings.cc
+++ /dev/null
@@ -1,172 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/settings/tray_settings.h"
-
-#include "ash/shell.h"
-#include "ash/system/chromeos/power/power_status.h"
-#include "ash/system/chromeos/power/power_status_view.h"
-#include "ash/system/tray/actionable_view.h"
-#include "ash/system/tray/fixed_sized_image_view.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/tray_constants.h"
-#include "base/logging.h"
-#include "base/strings/utf_string_conversions.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "ui/base/accessibility/accessible_view_state.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/layout/fill_layout.h"
-#include "ui/views/view.h"
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-
-class SettingsDefaultView : public ActionableView,
- public PowerStatus::Observer {
- public:
- explicit SettingsDefaultView(user::LoginStatus status)
- : login_status_(status),
- label_(NULL),
- power_status_view_(NULL) {
- PowerStatus::Get()->AddObserver(this);
- SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
- ash::kTrayPopupPaddingHorizontal, 0,
- ash::kTrayPopupPaddingBetweenItems));
-
- bool power_view_right_align = false;
- if (login_status_ != user::LOGGED_IN_NONE &&
- login_status_ != user::LOGGED_IN_LOCKED) {
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- views::ImageView* icon =
- new ash::internal::FixedSizedImageView(0, ash::kTrayPopupItemHeight);
- icon->SetImage(
- rb.GetImageNamed(IDR_AURA_UBER_TRAY_SETTINGS).ToImageSkia());
- AddChildView(icon);
-
- base::string16 text = rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_SETTINGS);
- label_ = new views::Label(text);
- AddChildView(label_);
- SetAccessibleName(text);
-
- power_view_right_align = true;
- }
-
- if (PowerStatus::Get()->IsBatteryPresent()) {
- power_status_view_ = new ash::internal::PowerStatusView(
- ash::internal::PowerStatusView::VIEW_DEFAULT, power_view_right_align);
- AddChildView(power_status_view_);
- OnPowerStatusChanged();
- }
- }
-
- virtual ~SettingsDefaultView() {
- PowerStatus::Get()->RemoveObserver(this);
- }
-
- // Overridden from ash::internal::ActionableView.
- virtual bool PerformAction(const ui::Event& event) OVERRIDE {
- if (login_status_ == user::LOGGED_IN_NONE ||
- login_status_ == user::LOGGED_IN_LOCKED)
- return false;
-
- ash::Shell::GetInstance()->system_tray_delegate()->ShowSettings();
- return true;
- }
-
- // Overridden from views::View.
- virtual void Layout() OVERRIDE {
- views::View::Layout();
-
- if (label_ && power_status_view_) {
- // Let the box-layout do the layout first. Then move power_status_view_
- // to right align if it is created.
- gfx::Size size = power_status_view_->GetPreferredSize();
- gfx::Rect bounds(size);
- bounds.set_x(width() - size.width() - ash::kTrayPopupPaddingBetweenItems);
- bounds.set_y((height() - size.height()) / 2);
- power_status_view_->SetBoundsRect(bounds);
- }
- }
-
- // Overridden from views::View.
- virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE {
- views::View::ChildPreferredSizeChanged(child);
- Layout();
- }
-
- // Overridden from PowerStatus::Observer.
- virtual void OnPowerStatusChanged() OVERRIDE {
- if (!PowerStatus::Get()->IsBatteryPresent())
- return;
-
- base::string16 accessible_name = label_ ?
- label_->text() + ASCIIToUTF16(", ") +
- PowerStatus::Get()->GetAccessibleNameString() :
- PowerStatus::Get()->GetAccessibleNameString();
- SetAccessibleName(accessible_name);
- }
-
- private:
- user::LoginStatus login_status_;
- views::Label* label_;
- ash::internal::PowerStatusView* power_status_view_;
-
- DISALLOW_COPY_AND_ASSIGN(SettingsDefaultView);
- };
-
-} // namespace tray
-
-TraySettings::TraySettings(SystemTray* system_tray)
- : SystemTrayItem(system_tray),
- default_view_(NULL) {
-}
-
-TraySettings::~TraySettings() {
-}
-
-views::View* TraySettings::CreateTrayView(user::LoginStatus status) {
- return NULL;
-}
-
-views::View* TraySettings::CreateDefaultView(user::LoginStatus status) {
- if ((status == user::LOGGED_IN_NONE || status == user::LOGGED_IN_LOCKED) &&
- !PowerStatus::Get()->IsBatteryPresent())
- return NULL;
-
- if (!ash::Shell::GetInstance()->system_tray_delegate()->ShouldShowSettings())
- return NULL;
-
- CHECK(default_view_ == NULL);
- default_view_ = new tray::SettingsDefaultView(status);
- return default_view_;
-}
-
-views::View* TraySettings::CreateDetailedView(user::LoginStatus status) {
- NOTIMPLEMENTED();
- return NULL;
-}
-
-void TraySettings::DestroyTrayView() {
-}
-
-void TraySettings::DestroyDefaultView() {
- default_view_ = NULL;
-}
-
-void TraySettings::DestroyDetailedView() {
-}
-
-void TraySettings::UpdateAfterLoginStatusChange(user::LoginStatus status) {
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/settings/tray_settings.h b/chromium/ash/system/chromeos/settings/tray_settings.h
deleted file mode 100644
index e48aad3b55d..00000000000
--- a/chromium/ash/system/chromeos/settings/tray_settings.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_SETTINGS_TRAY_SETTINGS_H_
-#define ASH_SYSTEM_CHROMEOS_SETTINGS_TRAY_SETTINGS_H_
-
-#include "ash/system/tray/system_tray_item.h"
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-class SettingsDefaultView;
-}
-
-class TraySettings : public SystemTrayItem {
- public:
- explicit TraySettings(SystemTray* system_tray);
- virtual ~TraySettings();
-
- private:
- // Overridden from SystemTrayItem
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyTrayView() OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
- virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
-
- tray::SettingsDefaultView* default_view_;
-
- DISALLOW_COPY_AND_ASSIGN(TraySettings);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_SETTINGS_TRAY_SETTINGS_H_
diff --git a/chromium/ash/system/chromeos/system_clock_observer.cc b/chromium/ash/system/chromeos/system_clock_observer.cc
deleted file mode 100644
index c5ab20c3d51..00000000000
--- a/chromium/ash/system/chromeos/system_clock_observer.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/system_clock_observer.h"
-
-#include "ash/shell.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-
-namespace ash {
-namespace internal {
-
-SystemClockObserver::SystemClockObserver() {
- chromeos::DBusThreadManager::Get()->GetSystemClockClient()
- ->AddObserver(this);
- chromeos::system::TimezoneSettings::GetInstance()->AddObserver(this);
-}
-
-SystemClockObserver::~SystemClockObserver() {
- chromeos::DBusThreadManager::Get()->GetSystemClockClient()
- ->RemoveObserver(this);
- chromeos::system::TimezoneSettings::GetInstance()->RemoveObserver(this);
-}
-
-void SystemClockObserver::SystemClockUpdated() {
- Shell::GetInstance()->system_tray_notifier()
- ->NotifySystemClockTimeUpdated();
-}
-
-void SystemClockObserver::TimezoneChanged(const icu::TimeZone& timezone) {
- Shell::GetInstance()->system_tray_notifier()->NotifyRefreshClock();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/system_clock_observer.h b/chromium/ash/system/chromeos/system_clock_observer.h
deleted file mode 100644
index e2625a8cf4c..00000000000
--- a/chromium/ash/system/chromeos/system_clock_observer.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_SYSTEM_CLOCK_OBSERVER_H_
-#define ASH_SYSTEM_CHROMEOS_SYSTEM_CLOCK_OBSERVER_H_
-
-#include "chromeos/dbus/system_clock_client.h"
-#include "chromeos/settings/timezone_settings.h"
-
-namespace ash {
-namespace internal {
-
-class SystemClockObserver
- : public chromeos::SystemClockClient::Observer,
- public chromeos::system::TimezoneSettings::Observer {
- public:
- SystemClockObserver();
- virtual ~SystemClockObserver();
-
- // chromeos::SystemClockClient::Observer
- virtual void SystemClockUpdated() OVERRIDE;
-
- // chromeos::system::TimezoneSettings::Observer
- virtual void TimezoneChanged(const icu::TimeZone& timezone) OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SystemClockObserver);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_SYSTEM_CLOCK_OBSERVER_H_
diff --git a/chromium/ash/system/chromeos/tray_display.cc b/chromium/ash/system/chromeos/tray_display.cc
deleted file mode 100644
index 35627e1ae2b..00000000000
--- a/chromium/ash/system/chromeos/tray_display.cc
+++ /dev/null
@@ -1,429 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/tray_display.h"
-
-#include "ash/display/display_controller.h"
-#include "ash/display/display_manager.h"
-#include "ash/shell.h"
-#include "ash/system/system_notifier.h"
-#include "ash/system/tray/actionable_view.h"
-#include "ash/system/tray/fixed_sized_image_view.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_notification_view.h"
-#include "base/bind.h"
-#include "base/strings/string_util.h"
-#include "base/strings/utf_string_conversions.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/message_center/message_center.h"
-#include "ui/message_center/notification.h"
-#include "ui/message_center/notification_delegate.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-
-using message_center::Notification;
-
-namespace ash {
-namespace internal {
-namespace {
-
-DisplayManager* GetDisplayManager() {
- return Shell::GetInstance()->display_manager();
-}
-
-base::string16 GetDisplayName(int64 display_id) {
- return UTF8ToUTF16(GetDisplayManager()->GetDisplayNameForId(display_id));
-}
-
-base::string16 GetDisplaySize(int64 display_id) {
- DisplayManager* display_manager = GetDisplayManager();
-
- const gfx::Display* display = &display_manager->GetDisplayForId(display_id);
-
- // We don't show display size for mirrored display. Fallback
- // to empty string if this happens on release build.
- bool mirrored_display = display_manager->mirrored_display_id() == display_id;
- DCHECK(!mirrored_display);
- if (mirrored_display)
- return base::string16();
-
- DCHECK(display->is_valid());
- return UTF8ToUTF16(display->size().ToString());
-}
-
-// Returns 1-line information for the specified display, like
-// "InternalDisplay: 1280x750"
-base::string16 GetDisplayInfoLine(int64 display_id) {
- const DisplayInfo& display_info =
- GetDisplayManager()->GetDisplayInfo(display_id);
- if (GetDisplayManager()->mirrored_display_id() == display_id)
- return GetDisplayName(display_id);
-
- base::string16 size_text = GetDisplaySize(display_id);
- base::string16 display_data;
- if (display_info.has_overscan()) {
- display_data = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ANNOTATION,
- size_text,
- l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ANNOTATION_OVERSCAN));
- } else {
- display_data = size_text;
- }
-
- return l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_SINGLE_DISPLAY,
- GetDisplayName(display_id),
- display_data);
-}
-
-base::string16 GetAllDisplayInfo() {
- DisplayManager* display_manager = GetDisplayManager();
- std::vector<base::string16> lines;
- int64 internal_id = gfx::Display::kInvalidDisplayID;
- // Make sure to show the internal display first.
- if (display_manager->HasInternalDisplay() &&
- display_manager->IsInternalDisplayId(
- display_manager->first_display_id())) {
- internal_id = display_manager->first_display_id();
- lines.push_back(GetDisplayInfoLine(internal_id));
- }
-
- for (size_t i = 0; i < display_manager->GetNumDisplays(); ++i) {
- int64 id = display_manager->GetDisplayAt(i).id();
- if (id == internal_id)
- continue;
- lines.push_back(GetDisplayInfoLine(id));
- }
-
- return JoinString(lines, '\n');
-}
-
-void OpenSettings() {
- // switch is intentionally introduced without default, to cause an error when
- // a new type of login status is introduced.
- switch (Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus()) {
- case user::LOGGED_IN_NONE:
- case user::LOGGED_IN_LOCKED:
- return;
-
- case user::LOGGED_IN_USER:
- case user::LOGGED_IN_OWNER:
- case user::LOGGED_IN_GUEST:
- case user::LOGGED_IN_RETAIL_MODE:
- case user::LOGGED_IN_PUBLIC:
- case user::LOGGED_IN_LOCALLY_MANAGED:
- case user::LOGGED_IN_KIOSK_APP:
- Shell::GetInstance()->system_tray_delegate()->ShowDisplaySettings();
- }
-}
-
-} // namespace
-
-const char TrayDisplay::kNotificationId[] = "chrome://settings/display";
-
-class DisplayView : public internal::ActionableView {
- public:
- explicit DisplayView() {
- SetLayoutManager(new views::BoxLayout(
- views::BoxLayout::kHorizontal,
- kTrayPopupPaddingHorizontal, 0,
- kTrayPopupPaddingBetweenItems));
-
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- image_ = new internal::FixedSizedImageView(0, kTrayPopupItemHeight);
- image_->SetImage(
- bundle.GetImageNamed(IDR_AURA_UBER_TRAY_DISPLAY).ToImageSkia());
- AddChildView(image_);
-
- label_ = new views::Label();
- label_->SetMultiLine(true);
- label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- AddChildView(label_);
- Update();
- }
-
- virtual ~DisplayView() {}
-
- void Update() {
- base::string16 message = GetTrayDisplayMessage(NULL);
- if (message.empty() && ShouldShowFirstDisplayInfo())
- message = GetDisplayInfoLine(GetDisplayManager()->first_display_id());
- SetVisible(!message.empty());
- label_->SetText(message);
- Layout();
- }
-
- const views::Label* label() const { return label_; }
-
- // Overridden from views::View.
- virtual bool GetTooltipText(const gfx::Point& p,
- base::string16* tooltip) const OVERRIDE {
- base::string16 tray_message = GetTrayDisplayMessage(NULL);
- base::string16 display_message = GetAllDisplayInfo();
- if (tray_message.empty() && display_message.empty())
- return false;
-
- *tooltip = tray_message + ASCIIToUTF16("\n") + display_message;
- return true;
- }
-
- // Returns the name of the currently connected external display.
- // This should not be used when the external display is used for
- // mirroring.
- static base::string16 GetExternalDisplayName() {
- DisplayManager* display_manager = GetDisplayManager();
- DCHECK(!display_manager->IsMirrored());
-
- int64 external_id = gfx::Display::kInvalidDisplayID;
- for (size_t i = 0; i < display_manager->GetNumDisplays(); ++i) {
- int64 id = display_manager->GetDisplayAt(i).id();
- if (id != gfx::Display::InternalDisplayId()) {
- external_id = id;
- break;
- }
- }
-
- if (external_id == gfx::Display::kInvalidDisplayID) {
- return l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_UNKNOWN_DISPLAY_NAME);
- }
-
- // The external display name may have an annotation of "(width x height)" in
- // case that the display is rotated or its resolution is changed.
- base::string16 name = GetDisplayName(external_id);
- const DisplayInfo& display_info =
- display_manager->GetDisplayInfo(external_id);
- if (display_info.rotation() != gfx::Display::ROTATE_0 ||
- display_info.configured_ui_scale() != 1.0f ||
- !display_info.overscan_insets_in_dip().empty()) {
- name = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ANNOTATED_NAME,
- name, GetDisplaySize(external_id));
- } else if (display_info.overscan_insets_in_dip().empty() &&
- display_info.has_overscan()) {
- name = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ANNOTATED_NAME,
- name, l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ANNOTATION_OVERSCAN));
- }
-
- return name;
- }
-
- static base::string16 GetTrayDisplayMessage(
- base::string16* additional_message_out) {
- DisplayManager* display_manager = GetDisplayManager();
- if (display_manager->GetNumDisplays() > 1) {
- if (GetDisplayManager()->HasInternalDisplay()) {
- return l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED, GetExternalDisplayName());
- }
- return l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED_NO_INTERNAL);
- }
-
- if (display_manager->IsMirrored()) {
- if (GetDisplayManager()->HasInternalDisplay()) {
- return l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_MIRRORING,
- GetDisplayName(display_manager->mirrored_display_id()));
- }
- return l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_MIRRORING_NO_INTERNAL);
- }
-
- int64 primary_id = Shell::GetScreen()->GetPrimaryDisplay().id();
- if (display_manager->HasInternalDisplay() &&
- !display_manager->IsInternalDisplayId(primary_id)) {
- if (additional_message_out) {
- *additional_message_out = l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_DOCKED_DESCRIPTION);
- }
- return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DISPLAY_DOCKED);
- }
-
- return base::string16();
- }
-
- private:
- bool ShouldShowFirstDisplayInfo() const {
- const DisplayInfo& display_info = GetDisplayManager()->GetDisplayInfo(
- GetDisplayManager()->first_display_id());
- return display_info.rotation() != gfx::Display::ROTATE_0 ||
- display_info.configured_ui_scale() != 1.0f ||
- !display_info.overscan_insets_in_dip().empty() ||
- display_info.has_overscan();
- }
-
- // Overridden from ActionableView.
- virtual bool PerformAction(const ui::Event& event) OVERRIDE {
- OpenSettings();
- return true;
- }
-
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE {
- int label_max_width = bounds().width() - kTrayPopupPaddingHorizontal * 2 -
- kTrayPopupPaddingBetweenItems - image_->GetPreferredSize().width();
- label_->SizeToFit(label_max_width);
- }
-
- views::ImageView* image_;
- views::Label* label_;
-
- DISALLOW_COPY_AND_ASSIGN(DisplayView);
-};
-
-TrayDisplay::TrayDisplay(SystemTray* system_tray)
- : SystemTrayItem(system_tray),
- default_(NULL) {
- Shell::GetInstance()->display_controller()->AddObserver(this);
- UpdateDisplayInfo(NULL);
-}
-
-TrayDisplay::~TrayDisplay() {
- Shell::GetInstance()->display_controller()->RemoveObserver(this);
-}
-
-void TrayDisplay::UpdateDisplayInfo(TrayDisplay::DisplayInfoMap* old_info) {
- if (old_info)
- old_info->swap(display_info_);
- display_info_.clear();
-
- DisplayManager* display_manager = GetDisplayManager();
- for (size_t i = 0; i < display_manager->GetNumDisplays(); ++i) {
- int64 id = display_manager->GetDisplayAt(i).id();
- display_info_[id] = display_manager->GetDisplayInfo(id);
- }
-}
-
-bool TrayDisplay::GetDisplayMessageForNotification(
- const TrayDisplay::DisplayInfoMap& old_info,
- base::string16* message_out,
- base::string16* additional_message_out) {
- // Display is added or removed. Use the same message as the one in
- // the system tray.
- if (display_info_.size() != old_info.size()) {
- *message_out = DisplayView::GetTrayDisplayMessage(additional_message_out);
- return true;
- }
-
- for (DisplayInfoMap::const_iterator iter = display_info_.begin();
- iter != display_info_.end(); ++iter) {
- DisplayInfoMap::const_iterator old_iter = old_info.find(iter->first);
- // The display's number is same but different displays. This happens
- // for the transition between docked mode and mirrored display. Falls back
- // to GetTrayDisplayMessage().
- if (old_iter == old_info.end()) {
- *message_out = DisplayView::GetTrayDisplayMessage(additional_message_out);
- return true;
- }
-
- if (iter->second.configured_ui_scale() !=
- old_iter->second.configured_ui_scale()) {
- *message_out = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_RESOLUTION_CHANGED,
- GetDisplayName(iter->first),
- GetDisplaySize(iter->first));
- return true;
- }
- if (iter->second.rotation() != old_iter->second.rotation()) {
- int rotation_text_id = 0;
- switch (iter->second.rotation()) {
- case gfx::Display::ROTATE_0:
- rotation_text_id = IDS_ASH_STATUS_TRAY_DISPLAY_STANDARD_ORIENTATION;
- break;
- case gfx::Display::ROTATE_90:
- rotation_text_id = IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_90;
- break;
- case gfx::Display::ROTATE_180:
- rotation_text_id = IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_180;
- break;
- case gfx::Display::ROTATE_270:
- rotation_text_id = IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_270;
- break;
- }
- *message_out = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ROTATED,
- GetDisplayName(iter->first),
- l10n_util::GetStringUTF16(rotation_text_id));
- return true;
- }
- }
-
- // Found nothing special
- return false;
-}
-
-void TrayDisplay::CreateOrUpdateNotification(
- const base::string16& message,
- const base::string16& additional_message) {
- // Always remove the notification to make sure the notification appears
- // as a popup in any situation.
- message_center::MessageCenter::Get()->RemoveNotification(
- kNotificationId, false /* by_user */);
-
- if (message.empty())
- return;
-
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- scoped_ptr<Notification> notification(new Notification(
- message_center::NOTIFICATION_TYPE_SIMPLE,
- kNotificationId,
- message,
- additional_message,
- bundle.GetImageNamed(IDR_AURA_UBER_TRAY_DISPLAY),
- base::string16(), // display_source
- message_center::NotifierId(
- message_center::NotifierId::SYSTEM_COMPONENT,
- system_notifier::kNotifierDisplay),
- message_center::RichNotificationData(),
- new message_center::HandleNotificationClickedDelegate(
- base::Bind(&OpenSettings))));
- message_center::MessageCenter::Get()->AddNotification(notification.Pass());
-}
-
-views::View* TrayDisplay::CreateDefaultView(user::LoginStatus status) {
- DCHECK(default_ == NULL);
- default_ = new DisplayView();
- return default_;
-}
-
-void TrayDisplay::DestroyDefaultView() {
- default_ = NULL;
-}
-
-void TrayDisplay::OnDisplayConfigurationChanged() {
- DisplayInfoMap old_info;
- UpdateDisplayInfo(&old_info);
-
- if (default_)
- default_->Update();
-
- if (!Shell::GetInstance()->system_tray_delegate()->
- ShouldShowDisplayNotification()) {
- return;
- }
-
- base::string16 message;
- base::string16 additional_message;
- if (GetDisplayMessageForNotification(old_info, &message, &additional_message))
- CreateOrUpdateNotification(message, additional_message);
-}
-
-base::string16 TrayDisplay::GetDefaultViewMessage() const {
- if (!default_ || !default_->visible())
- return base::string16();
-
- return static_cast<DisplayView*>(default_)->label()->text();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/tray_display.h b/chromium/ash/system/chromeos/tray_display.h
deleted file mode 100644
index 6689a9bbb8d..00000000000
--- a/chromium/ash/system/chromeos/tray_display.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_CHROMEOS_TRAY_DISPLAY_H_
-#define ASH_SYSTEM_CHROMEOS_TRAY_DISPLAY_H_
-
-#include <map>
-
-#include "ash/ash_export.h"
-#include "ash/display/display_controller.h"
-#include "ash/display/display_info.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "base/strings/string16.h"
-#include "ui/views/view.h"
-
-namespace ash {
-namespace test {
-class AshTestBase;
-}
-
-namespace internal {
-class DisplayView;
-
-class ASH_EXPORT TrayDisplay : public SystemTrayItem,
- public DisplayController::Observer {
- public:
- explicit TrayDisplay(SystemTray* system_tray);
- virtual ~TrayDisplay();
-
- // Overridden from DisplayControllerObserver:
- virtual void OnDisplayConfigurationChanged() OVERRIDE;
-
- private:
- friend class TrayDisplayTest;
-
- typedef std::map<int64, DisplayInfo> DisplayInfoMap;
-
- static const char kNotificationId[];
-
- // Scans the current display info and updates |display_info_|. Sets the
- // previous data to |old_info| if it's not NULL.
- void UpdateDisplayInfo(DisplayInfoMap* old_info);
-
- // Compares the current display settings with |old_info| and determine what
- // message should be shown for notification. Returns true if there's a
- // meaningful change. Note that it's possible to return true and set
- // |message_out| to empty, which means the notification should be removed. It
- // also sets |additional_message_out| which appears in the notification with
- // the |message_out|.
- bool GetDisplayMessageForNotification(
- const DisplayInfoMap& old_info,
- base::string16* message_out,
- base::string16* additional_message_out);
-
- // Creates or updates the display notification.
- void CreateOrUpdateNotification(const base::string16& message,
- const base::string16& additional_message);
-
- // Overridden from SystemTrayItem.
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
-
- // Test accessors.
- base::string16 GetDefaultViewMessage() const;
- const views::View* default_view() const {
- return reinterpret_cast<views::View*>(default_);
- }
-
- DisplayView* default_;
- DisplayInfoMap display_info_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayDisplay);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_CHROMEOS_TRAY_DISPLAY_H_
diff --git a/chromium/ash/system/chromeos/tray_display_unittest.cc b/chromium/ash/system/chromeos/tray_display_unittest.cc
deleted file mode 100644
index 8884da8bcbf..00000000000
--- a/chromium/ash/system/chromeos/tray_display_unittest.cc
+++ /dev/null
@@ -1,555 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/tray_display.h"
-
-#include "ash/display/display_manager.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/test_system_tray_delegate.h"
-#include "base/strings/string16.h"
-#include "base/strings/utf_string_conversions.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/gfx/display.h"
-#include "ui/message_center/message_center.h"
-#include "ui/message_center/notification.h"
-#include "ui/message_center/notification_list.h"
-#include "ui/views/controls/label.h"
-
-namespace ash {
-namespace internal {
-
-base::string16 GetTooltipText(const base::string16& headline,
- const base::string16& name1,
- const std::string& data1,
- const base::string16& name2,
- const std::string& data2) {
- std::vector<base::string16> lines;
- lines.push_back(headline);
- if (data1.empty()) {
- lines.push_back(name1);
- } else {
- lines.push_back(l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_SINGLE_DISPLAY,
- name1, UTF8ToUTF16(data1)));
- }
- if (!name2.empty()) {
- lines.push_back(l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_SINGLE_DISPLAY,
- name2, UTF8ToUTF16(data2)));
- }
- return JoinString(lines, '\n');
-}
-
-base::string16 GetMirroredTooltipText(const base::string16& headline,
- const base::string16& name,
- const std::string& data) {
- return GetTooltipText(headline, name, data, base::string16(), "");
-}
-
-base::string16 GetFirstDisplayName() {
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- return UTF8ToUTF16(display_manager->GetDisplayNameForId(
- display_manager->first_display_id()));
-}
-
-base::string16 GetSecondDisplayName() {
- return UTF8ToUTF16(
- Shell::GetInstance()->display_manager()->GetDisplayNameForId(
- ScreenAsh::GetSecondaryDisplay().id()));
-}
-
-base::string16 GetMirroredDisplayName() {
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- return UTF8ToUTF16(display_manager->GetDisplayNameForId(
- display_manager->mirrored_display_id()));
-}
-
-class TrayDisplayTest : public ash::test::AshTestBase {
- public:
- TrayDisplayTest();
- virtual ~TrayDisplayTest();
-
- virtual void SetUp() OVERRIDE;
-
- protected:
- SystemTray* tray() { return tray_; }
- TrayDisplay* tray_display() { return tray_display_; }
-
- void CloseNotification();
- bool IsDisplayVisibleInTray() const;
- base::string16 GetTrayDisplayText() const;
- base::string16 GetTrayDisplayTooltipText() const;
- base::string16 GetDisplayNotificationText() const;
- base::string16 GetDisplayNotificationAdditionalText() const;
-
- private:
- const message_center::Notification* GetDisplayNotification() const;
-
- // Weak reference, owned by Shell.
- SystemTray* tray_;
-
- // Weak reference, owned by |tray_|.
- TrayDisplay* tray_display_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayDisplayTest);
-};
-
-TrayDisplayTest::TrayDisplayTest() : tray_(NULL), tray_display_(NULL) {
-}
-
-TrayDisplayTest::~TrayDisplayTest() {
-}
-
-void TrayDisplayTest::SetUp() {
- ash::test::AshTestBase::SetUp();
- tray_ = Shell::GetPrimaryRootWindowController()->GetSystemTray();
- tray_display_ = new TrayDisplay(tray_);
- tray_->AddTrayItem(tray_display_);
-}
-
-void TrayDisplayTest::CloseNotification() {
- message_center::MessageCenter::Get()->RemoveNotification(
- TrayDisplay::kNotificationId, false);
- RunAllPendingInMessageLoop();
-}
-
-bool TrayDisplayTest::IsDisplayVisibleInTray() const {
- return tray_->HasSystemBubble() &&
- tray_display_->default_view() &&
- tray_display_->default_view()->visible();
-}
-
-base::string16 TrayDisplayTest::GetTrayDisplayText() const {
- return tray_display_->GetDefaultViewMessage();
-}
-
-base::string16 TrayDisplayTest::GetTrayDisplayTooltipText() const {
- if (!tray_display_->default_view())
- return base::string16();
-
- base::string16 tooltip;
- if (!tray_display_->default_view()->GetTooltipText(gfx::Point(), &tooltip))
- return base::string16();
- return tooltip;
-}
-
-base::string16 TrayDisplayTest::GetDisplayNotificationText() const {
- const message_center::Notification* notification = GetDisplayNotification();
- return notification ? notification->title() : base::string16();
-}
-
-base::string16 TrayDisplayTest::GetDisplayNotificationAdditionalText() const {
- const message_center::Notification* notification = GetDisplayNotification();
- return notification ? notification->message() : base::string16();
-}
-
-const message_center::Notification* TrayDisplayTest::GetDisplayNotification()
- const {
- const message_center::NotificationList::Notifications notifications =
- message_center::MessageCenter::Get()->GetVisibleNotifications();
- for (message_center::NotificationList::Notifications::const_iterator iter =
- notifications.begin(); iter != notifications.end(); ++iter) {
- if ((*iter)->id() == TrayDisplay::kNotificationId)
- return *iter;
- }
-
- return NULL;
-}
-
-TEST_F(TrayDisplayTest, NoInternalDisplay) {
- UpdateDisplay("400x400");
- tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
- EXPECT_FALSE(IsDisplayVisibleInTray());
-
- UpdateDisplay("400x400,200x200");
- tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
- EXPECT_TRUE(IsDisplayVisibleInTray());
- base::string16 expected = l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED_NO_INTERNAL);
- base::string16 first_name = GetFirstDisplayName();
- EXPECT_EQ(expected, GetTrayDisplayText());
- EXPECT_EQ(GetTooltipText(expected, GetFirstDisplayName(), "400x400",
- GetSecondDisplayName(), "200x200"),
- GetTrayDisplayTooltipText());
-
- // mirroring
- Shell::GetInstance()->display_manager()->SetSoftwareMirroring(true);
- UpdateDisplay("400x400,200x200");
- tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
- EXPECT_TRUE(IsDisplayVisibleInTray());
- expected = l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_MIRRORING_NO_INTERNAL);
- EXPECT_EQ(expected, GetTrayDisplayText());
- EXPECT_EQ(GetMirroredTooltipText(expected, GetFirstDisplayName(), "400x400"),
- GetTrayDisplayTooltipText());
-}
-
-TEST_F(TrayDisplayTest, InternalDisplay) {
- UpdateDisplay("400x400");
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- gfx::Display::SetInternalDisplayId(display_manager->first_display_id());
-
- tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
- EXPECT_FALSE(IsDisplayVisibleInTray());
-
- // Extended
- UpdateDisplay("400x400,200x200");
- string16 expected = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED, GetSecondDisplayName());
- tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
- EXPECT_TRUE(IsDisplayVisibleInTray());
- EXPECT_EQ(expected, GetTrayDisplayText());
- EXPECT_EQ(GetTooltipText(expected, GetFirstDisplayName(), "400x400",
- GetSecondDisplayName(), "200x200"),
- GetTrayDisplayTooltipText());
-
- // Mirroring
- display_manager->SetSoftwareMirroring(true);
- UpdateDisplay("400x400,200x200");
- tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
- EXPECT_TRUE(IsDisplayVisibleInTray());
-
- expected = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_MIRRORING, GetMirroredDisplayName());
- EXPECT_EQ(expected, GetTrayDisplayText());
- EXPECT_EQ(GetMirroredTooltipText(expected, GetFirstDisplayName(), "400x400"),
- GetTrayDisplayTooltipText());
-}
-
-TEST_F(TrayDisplayTest, InternalDisplayResized) {
- UpdateDisplay("400x400@1.5");
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- gfx::Display::SetInternalDisplayId(display_manager->first_display_id());
-
- // Shows the tray_display even though there's a single-display.
- tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
- EXPECT_TRUE(IsDisplayVisibleInTray());
- base::string16 internal_info = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_SINGLE_DISPLAY,
- GetFirstDisplayName(), UTF8ToUTF16("600x600"));
- EXPECT_EQ(internal_info, GetTrayDisplayText());
- EXPECT_EQ(GetTooltipText(base::string16(), GetFirstDisplayName(), "600x600",
- base::string16(), std::string()),
- GetTrayDisplayTooltipText());
-
- // Extended
- UpdateDisplay("400x400@1.5,200x200");
- tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
- EXPECT_TRUE(IsDisplayVisibleInTray());
- base::string16 expected = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED, GetSecondDisplayName());
- EXPECT_EQ(expected, GetTrayDisplayText());
- EXPECT_EQ(GetTooltipText(expected, GetFirstDisplayName(), "600x600",
- GetSecondDisplayName(), "200x200"),
- GetTrayDisplayTooltipText());
-
- // Mirroring
- display_manager->SetSoftwareMirroring(true);
- UpdateDisplay("400x400@1.5,200x200");
- tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
- EXPECT_TRUE(IsDisplayVisibleInTray());
- expected = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_MIRRORING, GetMirroredDisplayName());
- EXPECT_EQ(expected, GetTrayDisplayText());
- EXPECT_EQ(GetMirroredTooltipText(expected, GetFirstDisplayName(), "600x600"),
- GetTrayDisplayTooltipText());
-
- // Closed lid mode.
- display_manager->SetSoftwareMirroring(false);
- UpdateDisplay("400x400@1.5,200x200");
- gfx::Display::SetInternalDisplayId(ScreenAsh::GetSecondaryDisplay().id());
- UpdateDisplay("400x400@1.5");
- tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
- EXPECT_TRUE(IsDisplayVisibleInTray());
- expected = l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DISPLAY_DOCKED);
- EXPECT_EQ(expected, GetTrayDisplayText());
- EXPECT_EQ(
- GetTooltipText(
- expected, GetFirstDisplayName(), "600x600", base::string16(), ""),
- GetTrayDisplayTooltipText());
-}
-
-TEST_F(TrayDisplayTest, ExternalDisplayResized) {
- UpdateDisplay("400x400");
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- gfx::Display::SetInternalDisplayId(display_manager->first_display_id());
-
- // Shows the tray_display even though there's a single-display.
- tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
- EXPECT_FALSE(IsDisplayVisibleInTray());
-
- // Extended
- UpdateDisplay("400x400,200x200@1.5");
- const gfx::Display& secondary_display = ScreenAsh::GetSecondaryDisplay();
-
- tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
- EXPECT_TRUE(IsDisplayVisibleInTray());
- base::string16 expected = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED,
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ANNOTATED_NAME,
- GetSecondDisplayName(),
- UTF8ToUTF16(secondary_display.size().ToString())));
- EXPECT_EQ(expected, GetTrayDisplayText());
- EXPECT_EQ(GetTooltipText(expected, GetFirstDisplayName(), "400x400",
- GetSecondDisplayName(), "300x300"),
- GetTrayDisplayTooltipText());
-
- // Mirroring
- display_manager->SetSoftwareMirroring(true);
- UpdateDisplay("400x400,200x200@1.5");
- tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
- EXPECT_TRUE(IsDisplayVisibleInTray());
- expected = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_MIRRORING, GetMirroredDisplayName());
- EXPECT_EQ(expected, GetTrayDisplayText());
- EXPECT_EQ(GetMirroredTooltipText(expected, GetFirstDisplayName(), "400x400"),
- GetTrayDisplayTooltipText());
-}
-
-TEST_F(TrayDisplayTest, OverscanDisplay) {
- UpdateDisplay("400x400,300x300/o");
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- gfx::Display::SetInternalDisplayId(display_manager->first_display_id());
-
- tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
- EXPECT_TRUE(IsDisplayVisibleInTray());
-
- // /o creates the default overscan, and if overscan is set, the annotation
- // should be the size.
- base::string16 overscan = l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ANNOTATION_OVERSCAN);
- base::string16 headline = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED,
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ANNOTATED_NAME,
- GetSecondDisplayName(), UTF8ToUTF16("286x286")));
- std::string second_data = l10n_util::GetStringFUTF8(
- IDS_ASH_STATUS_TRAY_DISPLAY_ANNOTATION,
- UTF8ToUTF16("286x286"), overscan);
- EXPECT_EQ(GetTooltipText(headline, GetFirstDisplayName(), "400x400",
- GetSecondDisplayName(), second_data),
- GetTrayDisplayTooltipText());
-
- // reset the overscan.
- display_manager->SetOverscanInsets(
- ScreenAsh::GetSecondaryDisplay().id(), gfx::Insets());
- headline = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED,
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ANNOTATED_NAME,
- GetSecondDisplayName(), overscan));
- second_data = l10n_util::GetStringFUTF8(
- IDS_ASH_STATUS_TRAY_DISPLAY_ANNOTATION,
- UTF8ToUTF16("300x300"), overscan);
- EXPECT_EQ(GetTooltipText(headline, GetFirstDisplayName(), "400x400",
- GetSecondDisplayName(), second_data),
- GetTrayDisplayTooltipText());
-}
-
-TEST_F(TrayDisplayTest, UpdateDuringDisplayConfigurationChange) {
- tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
- EXPECT_FALSE(IsDisplayVisibleInTray());
-
- UpdateDisplay("400x400@1.5");
- EXPECT_TRUE(tray()->HasSystemBubble());
- EXPECT_TRUE(IsDisplayVisibleInTray());
- base::string16 internal_info = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_SINGLE_DISPLAY,
- GetFirstDisplayName(), UTF8ToUTF16("600x600"));
- EXPECT_EQ(internal_info, GetTrayDisplayText());
- EXPECT_EQ(GetTooltipText(base::string16(), GetFirstDisplayName(), "600x600",
- base::string16(), std::string()),
- GetTrayDisplayTooltipText());
-
- UpdateDisplay("400x400,200x200");
- EXPECT_TRUE(tray()->HasSystemBubble());
- EXPECT_TRUE(IsDisplayVisibleInTray());
- base::string16 expected = l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED_NO_INTERNAL);
- base::string16 first_name = GetFirstDisplayName();
- EXPECT_EQ(expected, GetTrayDisplayText());
- EXPECT_EQ(GetTooltipText(expected, GetFirstDisplayName(), "400x400",
- GetSecondDisplayName(), "200x200"),
- GetTrayDisplayTooltipText());
-
- UpdateDisplay("400x400@1.5");
- tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
-
- // Back to the default state, the display tray item should disappear.
- UpdateDisplay("400x400");
- EXPECT_TRUE(tray()->HasSystemBubble());
- EXPECT_FALSE(IsDisplayVisibleInTray());
-}
-
-TEST_F(TrayDisplayTest, DisplayNotifications) {
- test::TestSystemTrayDelegate* tray_delegate =
- static_cast<test::TestSystemTrayDelegate*>(
- Shell::GetInstance()->system_tray_delegate());
- tray_delegate->set_should_show_display_notification(true);
-
- UpdateDisplay("400x400");
- DisplayManager* display_manager = Shell::GetInstance()->display_manager();
- gfx::Display::SetInternalDisplayId(display_manager->first_display_id());
- EXPECT_TRUE(GetDisplayNotificationText().empty());
-
- // rotation.
- UpdateDisplay("400x400/r");
- EXPECT_EQ(
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ROTATED, GetFirstDisplayName(),
- l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_90)),
- GetDisplayNotificationText());
- EXPECT_TRUE(GetDisplayNotificationAdditionalText().empty());
-
- CloseNotification();
- UpdateDisplay("400x400");
- EXPECT_EQ(
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ROTATED, GetFirstDisplayName(),
- l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_STANDARD_ORIENTATION)),
- GetDisplayNotificationText());
- EXPECT_TRUE(GetDisplayNotificationAdditionalText().empty());
-
- // UI-scale
- CloseNotification();
- UpdateDisplay("400x400@1.5");
- EXPECT_EQ(
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_RESOLUTION_CHANGED,
- GetFirstDisplayName(), UTF8ToUTF16("600x600")),
- GetDisplayNotificationText());
- EXPECT_TRUE(GetDisplayNotificationAdditionalText().empty());
-
- // UI-scale to 1.0
- CloseNotification();
- UpdateDisplay("400x400");
- EXPECT_EQ(
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_RESOLUTION_CHANGED,
- GetFirstDisplayName(), UTF8ToUTF16("400x400")),
- GetDisplayNotificationText());
- EXPECT_TRUE(GetDisplayNotificationAdditionalText().empty());
-
- // No-update
- CloseNotification();
- UpdateDisplay("400x400");
- EXPECT_TRUE(GetDisplayNotificationText().empty());
- EXPECT_TRUE(GetDisplayNotificationAdditionalText().empty());
-
- // Extended.
- CloseNotification();
- UpdateDisplay("400x400,200x200");
- EXPECT_EQ(
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED, GetSecondDisplayName()),
- GetDisplayNotificationText());
- EXPECT_TRUE(GetDisplayNotificationAdditionalText().empty());
-
- // Mirroring.
- CloseNotification();
- display_manager->SetSoftwareMirroring(true);
- UpdateDisplay("400x400,200x200");
- EXPECT_EQ(
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_MIRRORING, GetMirroredDisplayName()),
- GetDisplayNotificationText());
- EXPECT_TRUE(GetDisplayNotificationAdditionalText().empty());
-
- // Back to extended.
- CloseNotification();
- display_manager->SetSoftwareMirroring(false);
- UpdateDisplay("400x400,200x200");
- EXPECT_EQ(
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED, GetSecondDisplayName()),
- GetDisplayNotificationText());
- EXPECT_TRUE(GetDisplayNotificationAdditionalText().empty());
-
- // Resize the first display.
- UpdateDisplay("400x400@1.5,200x200");
- EXPECT_EQ(
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_RESOLUTION_CHANGED,
- GetFirstDisplayName(), UTF8ToUTF16("600x600")),
- GetDisplayNotificationText());
- EXPECT_TRUE(GetDisplayNotificationAdditionalText().empty());
-
- // Rotate the second.
- UpdateDisplay("400x400@1.5,200x200/r");
- EXPECT_EQ(
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ROTATED,
- GetSecondDisplayName(),
- l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_90)),
- GetDisplayNotificationText());
- EXPECT_TRUE(GetDisplayNotificationAdditionalText().empty());
-
- // Enters closed lid mode.
- UpdateDisplay("400x400@1.5,200x200");
- gfx::Display::SetInternalDisplayId(ScreenAsh::GetSecondaryDisplay().id());
- UpdateDisplay("400x400@1.5");
- EXPECT_EQ(l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DISPLAY_DOCKED),
- GetDisplayNotificationText());
- EXPECT_EQ(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DISPLAY_DOCKED_DESCRIPTION),
- GetDisplayNotificationAdditionalText());
-}
-
-TEST_F(TrayDisplayTest, DisplayConfigurationChangedTwice) {
- test::TestSystemTrayDelegate* tray_delegate =
- static_cast<test::TestSystemTrayDelegate*>(
- Shell::GetInstance()->system_tray_delegate());
- tray_delegate->set_should_show_display_notification(true);
-
- UpdateDisplay("400x400,200x200");
- EXPECT_EQ(
- l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED_NO_INTERNAL),
- GetDisplayNotificationText());
-
- // OnDisplayConfigurationChanged() may be called more than once for a single
- // update display in case of primary is swapped or recovered from dock mode.
- // Should not remove the notification in such case.
- tray_display()->OnDisplayConfigurationChanged();
- EXPECT_EQ(
- l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED_NO_INTERNAL),
- GetDisplayNotificationText());
-
- // Back to the single display. It SHOULD remove the notification since the
- // information is stale.
- UpdateDisplay("400x400");
- EXPECT_TRUE(GetDisplayNotificationText().empty());
-}
-
-TEST_F(TrayDisplayTest, UpdateAfterSuppressDisplayNotification) {
- UpdateDisplay("400x400,200x200");
-
- test::TestSystemTrayDelegate* tray_delegate =
- static_cast<test::TestSystemTrayDelegate*>(
- Shell::GetInstance()->system_tray_delegate());
- tray_delegate->set_should_show_display_notification(true);
-
- // rotate the second.
- UpdateDisplay("400x400,200x200/r");
- EXPECT_EQ(
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ROTATED,
- GetSecondDisplayName(),
- l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_90)),
- GetDisplayNotificationText());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/tray_tracing.cc b/chromium/ash/system/chromeos/tray_tracing.cc
deleted file mode 100644
index eddeac7fcfa..00000000000
--- a/chromium/ash/system/chromeos/tray_tracing.cc
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/tray_tracing.h"
-
-#include "ash/shell.h"
-#include "ash/system/tray/actionable_view.h"
-#include "ash/system/tray/fixed_sized_image_view.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/tray_constants.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-
-class DefaultTracingView : public internal::ActionableView {
- public:
- DefaultTracingView() {
- SetLayoutManager(new views::BoxLayout(
- views::BoxLayout::kHorizontal,
- kTrayPopupPaddingHorizontal, 0,
- kTrayPopupPaddingBetweenItems));
-
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- image_ = new internal::FixedSizedImageView(0, kTrayPopupItemHeight);
- image_->SetImage(
- bundle.GetImageNamed(IDR_AURA_UBER_TRAY_TRACING).ToImageSkia());
- AddChildView(image_);
-
- label_ = new views::Label();
- label_->SetMultiLine(true);
- label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- label_->SetText(bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_TRACING));
- AddChildView(label_);
- }
-
- virtual ~DefaultTracingView() {}
-
- private:
- // Overridden from ActionableView.
- virtual bool PerformAction(const ui::Event& event) OVERRIDE {
- Shell::GetInstance()->system_tray_delegate()->ShowChromeSlow();
- return true;
- }
-
- views::ImageView* image_;
- views::Label* label_;
-
- DISALLOW_COPY_AND_ASSIGN(DefaultTracingView);
-};
-
-} // namespace tray
-
-////////////////////////////////////////////////////////////////////////////////
-// ash::internal::TrayTracing
-
-TrayTracing::TrayTracing(SystemTray* system_tray)
- : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_TRACING),
- default_(NULL) {
- DCHECK(Shell::GetInstance()->delegate());
- DCHECK(system_tray);
- Shell::GetInstance()->system_tray_notifier()->AddTracingObserver(this);
-}
-
-TrayTracing::~TrayTracing() {
- Shell::GetInstance()->system_tray_notifier()->RemoveTracingObserver(this);
-}
-
-void TrayTracing::SetTrayIconVisible(bool visible) {
- if (tray_view())
- tray_view()->SetVisible(visible);
-}
-
-bool TrayTracing::GetInitialVisibility() {
- return false;
-}
-
-views::View* TrayTracing::CreateDefaultView(user::LoginStatus status) {
- CHECK(default_ == NULL);
- if (tray_view() && tray_view()->visible())
- default_ = new tray::DefaultTracingView();
- return default_;
-}
-
-views::View* TrayTracing::CreateDetailedView(user::LoginStatus status) {
- return NULL;
-}
-
-void TrayTracing::DestroyDefaultView() {
- default_ = NULL;
-}
-
-void TrayTracing::DestroyDetailedView() {
-}
-
-void TrayTracing::OnTracingModeChanged(bool value) {
- SetTrayIconVisible(value);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/chromeos/tray_tracing.h b/chromium/ash/system/chromeos/tray_tracing.h
deleted file mode 100644
index f9491e1d903..00000000000
--- a/chromium/ash/system/chromeos/tray_tracing.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_TRACING_H_
-#define ASH_SYSTEM_TRAY_TRACING_H_
-
-#include "ash/ash_export.h"
-#include "ash/system/tray/tray_image_item.h"
-
-namespace views {
-class View;
-}
-
-namespace ash {
-
-class ASH_EXPORT TracingObserver {
- public:
- virtual ~TracingObserver() {}
-
- // Notifies when tracing mode changes.
- virtual void OnTracingModeChanged(bool value) = 0;
-};
-
-namespace internal {
-
-// This is the item that displays when users enable performance tracing at
-// chrome://slow. It alerts them that this mode is running, and provides an
-// easy way to open the page to disable it.
-class TrayTracing : public TrayImageItem,
- public TracingObserver {
- public:
- explicit TrayTracing(SystemTray* system_tray);
- virtual ~TrayTracing();
-
- private:
- void SetTrayIconVisible(bool visible);
-
- // Overridden from TrayImageItem.
- virtual bool GetInitialVisibility() OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
-
- // Overridden from TracingObserver.
- virtual void OnTracingModeChanged(bool value) OVERRIDE;
-
- views::View* default_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayTracing);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_TRACING_H_
diff --git a/chromium/ash/system/date/clock_observer.h b/chromium/ash/system/date/clock_observer.h
deleted file mode 100644
index 30465288bf7..00000000000
--- a/chromium/ash/system/date/clock_observer.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_DATE_CLOCK_OBSERVER_H_
-#define ASH_SYSTEM_DATE_CLOCK_OBSERVER_H_
-
-namespace ash {
-
-class ClockObserver {
- public:
- virtual ~ClockObserver() {}
-
- virtual void OnDateFormatChanged() = 0;
- virtual void OnSystemClockTimeUpdated() = 0;
-
- // Force a refresh (e.g. after the system is resumed).
- virtual void Refresh() = 0;
-};
-
-};
-
-#endif // ASH_SYSTEM_DATE_CLOCK_OBSERVER_H_
diff --git a/chromium/ash/system/date/date_view.cc b/chromium/ash/system/date/date_view.cc
deleted file mode 100644
index 63f3af35ce9..00000000000
--- a/chromium/ash/system/date/date_view.cc
+++ /dev/null
@@ -1,309 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/date/date_view.h"
-
-#include "ash/shell.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_utils.h"
-#include "base/i18n/rtl.h"
-#include "base/i18n/time_formatting.h"
-#include "base/strings/utf_string_conversions.h"
-#include "base/time/time.h"
-#include "grit/ash_strings.h"
-#include "third_party/icu/source/i18n/unicode/datefmt.h"
-#include "third_party/icu/source/i18n/unicode/dtptngen.h"
-#include "third_party/icu/source/i18n/unicode/smpdtfmt.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/views/border.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/layout/grid_layout.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-namespace tray {
-
-namespace {
-
-// Amount of slop to add into the timer to make sure we're into the next minute
-// when the timer goes off.
-const int kTimerSlopSeconds = 1;
-
-// Text color of the vertical clock minutes.
-const SkColor kVerticalClockMinuteColor = SkColorSetRGB(0xBA, 0xBA, 0xBA);
-
-// Padding between the left edge of the shelf and the left edge of the vertical
-// clock.
-const int kVerticalClockLeftPadding = 9;
-
-// Offset used to bring the minutes line closer to the hours line in the
-// vertical clock.
-const int kVerticalClockMinutesTopOffset = -4;
-
-base::string16 FormatDate(const base::Time& time) {
- icu::UnicodeString date_string;
- scoped_ptr<icu::DateFormat> formatter(
- icu::DateFormat::createDateInstance(icu::DateFormat::kMedium));
- formatter->format(static_cast<UDate>(time.ToDoubleT() * 1000), date_string);
- return base::string16(date_string.getBuffer(),
- static_cast<size_t>(date_string.length()));
-}
-
-base::string16 FormatDayOfWeek(const base::Time& time) {
- UErrorCode status = U_ZERO_ERROR;
- scoped_ptr<icu::DateTimePatternGenerator> generator(
- icu::DateTimePatternGenerator::createInstance(status));
- DCHECK(U_SUCCESS(status));
- const char kBasePattern[] = "EEE";
- icu::UnicodeString generated_pattern =
- generator->getBestPattern(icu::UnicodeString(kBasePattern), status);
- DCHECK(U_SUCCESS(status));
- icu::SimpleDateFormat simple_formatter(generated_pattern, status);
- DCHECK(U_SUCCESS(status));
- icu::UnicodeString date_string;
- simple_formatter.format(
- static_cast<UDate>(time.ToDoubleT() * 1000), date_string, status);
- DCHECK(U_SUCCESS(status));
- return base::string16(
- date_string.getBuffer(), static_cast<size_t>(date_string.length()));
-}
-
-views::Label* CreateLabel() {
- views::Label* label = new views::Label;
- label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255));
- return label;
-}
-
-} // namespace
-
-BaseDateTimeView::~BaseDateTimeView() {
- timer_.Stop();
-}
-
-void BaseDateTimeView::UpdateText() {
- base::Time now = base::Time::Now();
- UpdateTextInternal(now);
- SchedulePaint();
- SetTimer(now);
-}
-
-BaseDateTimeView::BaseDateTimeView() {
- SetTimer(base::Time::Now());
-}
-
-void BaseDateTimeView::SetTimer(const base::Time& now) {
- // Try to set the timer to go off at the next change of the minute. We don't
- // want to have the timer go off more than necessary since that will cause
- // the CPU to wake up and consume power.
- base::Time::Exploded exploded;
- now.LocalExplode(&exploded);
-
- // Often this will be called at minute boundaries, and we'll actually want
- // 60 seconds from now.
- int seconds_left = 60 - exploded.second;
- if (seconds_left == 0)
- seconds_left = 60;
-
- // Make sure that the timer fires on the next minute. Without this, if it is
- // called just a teeny bit early, then it will skip the next minute.
- seconds_left += kTimerSlopSeconds;
-
- timer_.Stop();
- timer_.Start(
- FROM_HERE, base::TimeDelta::FromSeconds(seconds_left),
- this, &BaseDateTimeView::UpdateText);
-}
-
-void BaseDateTimeView::ChildPreferredSizeChanged(views::View* child) {
- PreferredSizeChanged();
-}
-
-void BaseDateTimeView::OnLocaleChanged() {
- UpdateText();
-}
-
-DateView::DateView()
- : hour_type_(ash::Shell::GetInstance()->system_tray_delegate()->
- GetHourClockType()),
- actionable_(false) {
- SetLayoutManager(
- new views::BoxLayout(
- views::BoxLayout::kVertical, 0, 0, 0));
- date_label_ = CreateLabel();
- date_label_->SetEnabledColor(kHeaderTextColorNormal);
- UpdateTextInternal(base::Time::Now());
- AddChildView(date_label_);
- SetFocusable(actionable_);
-}
-
-DateView::~DateView() {
-}
-
-void DateView::SetActionable(bool actionable) {
- actionable_ = actionable;
- SetFocusable(actionable_);
-}
-
-void DateView::UpdateTimeFormat() {
- hour_type_ =
- ash::Shell::GetInstance()->system_tray_delegate()->GetHourClockType();
- UpdateText();
-}
-
-void DateView::UpdateTextInternal(const base::Time& now) {
- SetAccessibleName(
- base::TimeFormatFriendlyDate(now) +
- ASCIIToUTF16(", ") +
- base::TimeFormatTimeOfDayWithHourClockType(
- now, hour_type_, base::kKeepAmPm));
- date_label_->SetText(
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DATE, FormatDayOfWeek(now), FormatDate(now)));
-}
-
-bool DateView::PerformAction(const ui::Event& event) {
- if (!actionable_)
- return false;
-
- ash::Shell::GetInstance()->system_tray_delegate()->ShowDateSettings();
- return true;
-}
-
-void DateView::OnMouseEntered(const ui::MouseEvent& event) {
- if (!actionable_)
- return;
- date_label_->SetEnabledColor(kHeaderTextColorHover);
- SchedulePaint();
-}
-
-void DateView::OnMouseExited(const ui::MouseEvent& event) {
- if (!actionable_)
- return;
- date_label_->SetEnabledColor(kHeaderTextColorNormal);
- SchedulePaint();
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-TimeView::TimeView(TrayDate::ClockLayout clock_layout)
- : hour_type_(ash::Shell::GetInstance()->system_tray_delegate()->
- GetHourClockType()) {
- SetupLabels();
- UpdateTextInternal(base::Time::Now());
- UpdateClockLayout(clock_layout);
- SetFocusable(false);
-}
-
-TimeView::~TimeView() {
-}
-
-void TimeView::UpdateTimeFormat() {
- hour_type_ =
- ash::Shell::GetInstance()->system_tray_delegate()->GetHourClockType();
- UpdateText();
-}
-
-void TimeView::UpdateTextInternal(const base::Time& now) {
- // Just in case |now| is null, do NOT update time; otherwise, it will
- // crash icu code by calling into base::TimeFormatTimeOfDayWithHourClockType,
- // see details in crbug.com/147570.
- if (now.is_null()) {
- LOG(ERROR) << "Received null value from base::Time |now| in argument";
- return;
- }
-
- base::string16 current_time = base::TimeFormatTimeOfDayWithHourClockType(
- now, hour_type_, base::kDropAmPm);
- horizontal_label_->SetText(current_time);
- horizontal_label_->SetTooltipText(base::TimeFormatFriendlyDate(now));
-
- // Calculate vertical clock layout labels.
- size_t colon_pos = current_time.find(ASCIIToUTF16(":"));
- base::string16 hour = current_time.substr(0, colon_pos);
- base::string16 minute = current_time.substr(colon_pos + 1);
-
- // Sometimes pad single-digit hours with a zero for aesthetic reasons.
- if (hour.length() == 1 &&
- hour_type_ == base::k24HourClock &&
- !base::i18n::IsRTL())
- hour = ASCIIToUTF16("0") + hour;
-
- vertical_label_hours_->SetText(hour);
- vertical_label_minutes_->SetText(minute);
- Layout();
-}
-
-bool TimeView::PerformAction(const ui::Event& event) {
- return false;
-}
-
-bool TimeView::OnMousePressed(const ui::MouseEvent& event) {
- // Let the event fall through.
- return false;
-}
-
-void TimeView::UpdateClockLayout(TrayDate::ClockLayout clock_layout){
- SetBorder(clock_layout);
- if (clock_layout == TrayDate::HORIZONTAL_CLOCK) {
- RemoveChildView(vertical_label_hours_.get());
- RemoveChildView(vertical_label_minutes_.get());
- SetLayoutManager(
- new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0));
- AddChildView(horizontal_label_.get());
- } else {
- RemoveChildView(horizontal_label_.get());
- views::GridLayout* layout = new views::GridLayout(this);
- SetLayoutManager(layout);
- const int kColumnId = 0;
- views::ColumnSet* columns = layout->AddColumnSet(kColumnId);
- columns->AddPaddingColumn(0, kVerticalClockLeftPadding);
- columns->AddColumn(views::GridLayout::TRAILING, views::GridLayout::CENTER,
- 0, views::GridLayout::USE_PREF, 0, 0);
- layout->AddPaddingRow(0, kTrayLabelItemVerticalPaddingVerticalAlignment);
- layout->StartRow(0, kColumnId);
- layout->AddView(vertical_label_hours_.get());
- layout->StartRow(0, kColumnId);
- layout->AddView(vertical_label_minutes_.get());
- layout->AddPaddingRow(0, kTrayLabelItemVerticalPaddingVerticalAlignment);
- }
- Layout();
-}
-
-void TimeView::SetBorder(TrayDate::ClockLayout clock_layout) {
- if (clock_layout == TrayDate::HORIZONTAL_CLOCK)
- set_border(views::Border::CreateEmptyBorder(
- 0, kTrayLabelItemHorizontalPaddingBottomAlignment,
- 0, kTrayLabelItemHorizontalPaddingBottomAlignment));
- else
- set_border(NULL);
-}
-
-void TimeView::SetupLabels() {
- horizontal_label_.reset(CreateLabel());
- SetupLabel(horizontal_label_.get());
- vertical_label_hours_.reset(CreateLabel());
- SetupLabel(vertical_label_hours_.get());
- vertical_label_minutes_.reset(CreateLabel());
- SetupLabel(vertical_label_minutes_.get());
- vertical_label_minutes_->SetEnabledColor(kVerticalClockMinuteColor);
- // Pull the minutes up closer to the hours by using a negative top border.
- vertical_label_minutes_->set_border(
- views::Border::CreateEmptyBorder(
- kVerticalClockMinutesTopOffset, 0, 0, 0));
-}
-
-void TimeView::SetupLabel(views::Label* label) {
- label->set_owned_by_client();
- SetupLabelForTray(label);
- gfx::Font font = label->font();
- label->SetFont(font.DeriveFont(0, font.GetStyle() & ~gfx::Font::BOLD));
-}
-
-} // namespace tray
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/date/date_view.h b/chromium/ash/system/date/date_view.h
deleted file mode 100644
index b7a592b4625..00000000000
--- a/chromium/ash/system/date/date_view.h
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_DATE_DATE_VIEW_H_
-#define ASH_SYSTEM_DATE_DATE_VIEW_H_
-
-#include "ash/ash_export.h"
-#include "ash/system/date/tray_date.h"
-#include "ash/system/tray/actionable_view.h"
-#include "base/i18n/time_formatting.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/timer/timer.h"
-#include "ui/views/view.h"
-
-namespace views {
-class Label;
-}
-
-namespace ash {
-namespace internal {
-namespace tray {
-
-// Abstract base class containing common updating and layout code for the
-// DateView popup and the TimeView tray icon. Exported for tests.
-class ASH_EXPORT BaseDateTimeView : public ActionableView {
- public:
- virtual ~BaseDateTimeView();
-
- // Updates the displayed text for the current time and calls SetTimer().
- void UpdateText();
-
- protected:
- BaseDateTimeView();
-
- private:
- // Starts |timer_| to schedule the next update.
- void SetTimer(const base::Time& now);
-
- // Updates labels to display the current time.
- virtual void UpdateTextInternal(const base::Time& now) = 0;
-
- // Overridden from views::View.
- virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE;
- virtual void OnLocaleChanged() OVERRIDE;
-
- // Invokes UpdateText() when the displayed time should change.
- base::OneShotTimer<BaseDateTimeView> timer_;
-
- DISALLOW_COPY_AND_ASSIGN(BaseDateTimeView);
-};
-
-// Popup view used to display the date and day of week.
-class DateView : public BaseDateTimeView {
- public:
- DateView();
- virtual ~DateView();
-
- // Sets whether the view is actionable. An actionable date view gives visual
- // feedback on hover, can be focused by keyboard, and clicking/pressing space
- // or enter on the view shows date-related settings.
- void SetActionable(bool actionable);
-
- // Updates the format of the displayed time.
- void UpdateTimeFormat();
-
- private:
- // Overridden from BaseDateTimeView.
- virtual void UpdateTextInternal(const base::Time& now) OVERRIDE;
-
- // Overridden from ActionableView.
- virtual bool PerformAction(const ui::Event& event) OVERRIDE;
-
- // Overridden from views::View.
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
-
- views::Label* date_label_;
-
- // Time format (12/24hr) used for accessibility string.
- base::HourClockType hour_type_;
-
- bool actionable_;
-
- DISALLOW_COPY_AND_ASSIGN(DateView);
-};
-
-// Tray view used to display the current time.
-// Exported for tests.
-class ASH_EXPORT TimeView : public BaseDateTimeView {
- public:
- explicit TimeView(TrayDate::ClockLayout clock_layout);
- virtual ~TimeView();
-
- // Updates the format of the displayed time.
- void UpdateTimeFormat();
-
- // Updates clock layout.
- void UpdateClockLayout(TrayDate::ClockLayout clock_layout);
-
- private:
- friend class TimeViewTest;
-
- // Overridden from BaseDateTimeView.
- virtual void UpdateTextInternal(const base::Time& now) OVERRIDE;
-
- // Overridden from ActionableView.
- virtual bool PerformAction(const ui::Event& event) OVERRIDE;
-
- // Overridden from views::View.
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
-
- void SetBorder(TrayDate::ClockLayout clock_layout);
- void SetupLabels();
- void SetupLabel(views::Label* label);
-
- // Label text used for the normal horizontal shelf.
- scoped_ptr<views::Label> horizontal_label_;
-
- // The time label is split into two lines for the vertical shelf.
- scoped_ptr<views::Label> vertical_label_hours_;
- scoped_ptr<views::Label> vertical_label_minutes_;
-
- base::HourClockType hour_type_;
-
- DISALLOW_COPY_AND_ASSIGN(TimeView);
-};
-
-} // namespace tray
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_DATE_DATE_VIEW_H_
diff --git a/chromium/ash/system/date/date_view_unittest.cc b/chromium/ash/system/date/date_view_unittest.cc
deleted file mode 100644
index 931d220694e..00000000000
--- a/chromium/ash/system/date/date_view_unittest.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/date/date_view.h"
-
-#include "ash/test/ash_test_base.h"
-#include "ui/views/controls/label.h"
-
-namespace ash {
-namespace internal {
-namespace tray {
-
-class TimeViewTest : public ash::test::AshTestBase {
- public:
- TimeViewTest() {}
- virtual ~TimeViewTest() {}
-
- TimeView* time_view() { return time_view_.get(); }
-
- // Access to private fields of |time_view_|.
- views::Label* horizontal_label() {
- return time_view_->horizontal_label_.get();
- }
- views::Label* vertical_label_hours() {
- return time_view_->vertical_label_hours_.get();
- }
- views::Label* vertical_label_minutes() {
- return time_view_->vertical_label_minutes_.get();
- }
-
- // Creates a time view with horizontal or vertical |clock_layout|.
- void CreateTimeView(TrayDate::ClockLayout clock_layout) {
- time_view_.reset(new TimeView(clock_layout));
- }
-
- private:
- scoped_ptr<TimeView> time_view_;
-
- DISALLOW_COPY_AND_ASSIGN(TimeViewTest);
-};
-
-// Test the basics of the time view, mostly to ensure we don't leak memory.
-TEST_F(TimeViewTest, Basics) {
- // A newly created horizontal clock only has the horizontal label.
- CreateTimeView(TrayDate::HORIZONTAL_CLOCK);
- EXPECT_EQ(time_view(), horizontal_label()->parent());
- EXPECT_FALSE(vertical_label_hours()->parent());
- EXPECT_FALSE(vertical_label_minutes()->parent());
-
- // Switching the clock to vertical updates the labels.
- time_view()->UpdateClockLayout(TrayDate::VERTICAL_CLOCK);
- EXPECT_FALSE(horizontal_label()->parent());
- EXPECT_EQ(time_view(), vertical_label_hours()->parent());
- EXPECT_EQ(time_view(), vertical_label_minutes()->parent());
-
- // Switching back to horizontal updates the labels again.
- time_view()->UpdateClockLayout(TrayDate::HORIZONTAL_CLOCK);
- EXPECT_EQ(time_view(), horizontal_label()->parent());
- EXPECT_FALSE(vertical_label_hours()->parent());
- EXPECT_FALSE(vertical_label_minutes()->parent());
-}
-
-} // namespace tray
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/date/tray_date.cc b/chromium/ash/system/date/tray_date.cc
deleted file mode 100644
index c2a4b923646..00000000000
--- a/chromium/ash/system/date/tray_date.cc
+++ /dev/null
@@ -1,240 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/date/tray_date.h"
-
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "ash/system/date/date_view.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_item_view.h"
-#include "ash/system/tray/tray_popup_header_button.h"
-#include "base/i18n/time_formatting.h"
-#include "base/strings/stringprintf.h"
-#include "base/strings/utf_string_conversions.h"
-#include "base/time/time.h"
-#include "base/timer/timer.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "third_party/icu/source/i18n/unicode/datefmt.h"
-#include "third_party/icu/source/i18n/unicode/fieldpos.h"
-#include "third_party/icu/source/i18n/unicode/fmtable.h"
-#include "third_party/skia/include/core/SkRect.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/gfx/size.h"
-#include "ui/views/controls/button/button.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/layout/fill_layout.h"
-#include "ui/views/painter.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-#if defined(OS_CHROMEOS)
-#include "ash/system/chromeos/system_clock_observer.h"
-#endif
-
-namespace {
-
-const int kPaddingVertical = 19;
-
-} // namespace
-
-namespace ash {
-namespace internal {
-
-class DateDefaultView : public views::View,
- public views::ButtonListener {
- public:
- explicit DateDefaultView(ash::user::LoginStatus login)
- : help_(NULL),
- shutdown_(NULL),
- lock_(NULL),
- date_view_(NULL) {
- SetLayoutManager(new views::FillLayout);
-
- date_view_ = new tray::DateView();
- date_view_->set_border(views::Border::CreateEmptyBorder(kPaddingVertical,
- ash::kTrayPopupPaddingHorizontal,
- 0,
- 0));
- SpecialPopupRow* view = new SpecialPopupRow();
- view->SetContent(date_view_);
- AddChildView(view);
-
- if (login == ash::user::LOGGED_IN_LOCKED ||
- login == ash::user::LOGGED_IN_NONE)
- return;
-
- date_view_->SetActionable(true);
-
- help_ = new TrayPopupHeaderButton(this,
- IDR_AURA_UBER_TRAY_HELP,
- IDR_AURA_UBER_TRAY_HELP,
- IDR_AURA_UBER_TRAY_HELP_HOVER,
- IDR_AURA_UBER_TRAY_HELP_HOVER,
- IDS_ASH_STATUS_TRAY_HELP);
- help_->SetTooltipText(l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_HELP));
- view->AddButton(help_);
-
-#if !defined(OS_WIN)
- if (login != ash::user::LOGGED_IN_LOCKED &&
- login != ash::user::LOGGED_IN_RETAIL_MODE) {
- shutdown_ = new TrayPopupHeaderButton(this,
- IDR_AURA_UBER_TRAY_SHUTDOWN,
- IDR_AURA_UBER_TRAY_SHUTDOWN,
- IDR_AURA_UBER_TRAY_SHUTDOWN_HOVER,
- IDR_AURA_UBER_TRAY_SHUTDOWN_HOVER,
- IDS_ASH_STATUS_TRAY_SHUTDOWN);
- shutdown_->SetTooltipText(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SHUTDOWN));
- view->AddButton(shutdown_);
- }
-
- if (ash::Shell::GetInstance()->session_state_delegate()->CanLockScreen()) {
- lock_ = new TrayPopupHeaderButton(this,
- IDR_AURA_UBER_TRAY_LOCKSCREEN,
- IDR_AURA_UBER_TRAY_LOCKSCREEN,
- IDR_AURA_UBER_TRAY_LOCKSCREEN_HOVER,
- IDR_AURA_UBER_TRAY_LOCKSCREEN_HOVER,
- IDS_ASH_STATUS_TRAY_LOCK);
- lock_->SetTooltipText(
- l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_LOCK));
- view->AddButton(lock_);
- }
-#endif // !defined(OS_WIN)
- }
-
- virtual ~DateDefaultView() {}
-
- views::View* GetHelpButtonView() const {
- return help_;
- }
-
- tray::DateView* GetDateView() const {
- return date_view_;
- }
-
- private:
- // Overridden from views::ButtonListener.
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE {
- ash::Shell* shell = ash::Shell::GetInstance();
- ash::SystemTrayDelegate* tray_delegate = shell->system_tray_delegate();
- if (sender == help_) {
- shell->metrics()->RecordUserMetricsAction(ash::UMA_TRAY_HELP);
- tray_delegate->ShowHelp();
- } else if (sender == shutdown_) {
- shell->metrics()->RecordUserMetricsAction(ash::UMA_TRAY_SHUT_DOWN);
- tray_delegate->ShutDown();
- } else if (sender == lock_) {
- shell->metrics()->RecordUserMetricsAction(ash::UMA_TRAY_LOCK_SCREEN);
- tray_delegate->RequestLockScreen();
- } else {
- NOTREACHED();
- }
- }
-
- TrayPopupHeaderButton* help_;
- TrayPopupHeaderButton* shutdown_;
- TrayPopupHeaderButton* lock_;
- tray::DateView* date_view_;
-
- DISALLOW_COPY_AND_ASSIGN(DateDefaultView);
-};
-
-TrayDate::TrayDate(SystemTray* system_tray)
- : SystemTrayItem(system_tray),
- time_tray_(NULL),
- default_view_(NULL) {
-#if defined(OS_CHROMEOS)
- system_clock_observer_.reset(new SystemClockObserver());
-#endif
- Shell::GetInstance()->system_tray_notifier()->AddClockObserver(this);
-}
-
-TrayDate::~TrayDate() {
- Shell::GetInstance()->system_tray_notifier()->RemoveClockObserver(this);
-}
-
-views::View* TrayDate::GetHelpButtonView() const {
- if (!default_view_)
- return NULL;
- return default_view_->GetHelpButtonView();
-}
-
-views::View* TrayDate::CreateTrayView(user::LoginStatus status) {
- CHECK(time_tray_ == NULL);
- ClockLayout clock_layout =
- (system_tray()->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM ||
- system_tray()->shelf_alignment() == SHELF_ALIGNMENT_TOP) ?
- HORIZONTAL_CLOCK : VERTICAL_CLOCK;
- time_tray_ = new tray::TimeView(clock_layout);
- views::View* view = new TrayItemView(this);
- view->AddChildView(time_tray_);
- return view;
-}
-
-views::View* TrayDate::CreateDefaultView(user::LoginStatus status) {
- default_view_ = new DateDefaultView(status);
- return default_view_;
-}
-
-views::View* TrayDate::CreateDetailedView(user::LoginStatus status) {
- return NULL;
-}
-
-void TrayDate::DestroyTrayView() {
- time_tray_ = NULL;
-}
-
-void TrayDate::DestroyDefaultView() {
- default_view_ = NULL;
-}
-
-void TrayDate::DestroyDetailedView() {
-}
-
-void TrayDate::UpdateAfterLoginStatusChange(user::LoginStatus status) {
-}
-
-void TrayDate::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
- if (time_tray_) {
- ClockLayout clock_layout = (alignment == SHELF_ALIGNMENT_BOTTOM ||
- alignment == SHELF_ALIGNMENT_TOP) ?
- HORIZONTAL_CLOCK : VERTICAL_CLOCK;
- time_tray_->UpdateClockLayout(clock_layout);
- }
-}
-
-void TrayDate::OnDateFormatChanged() {
- if (time_tray_)
- time_tray_->UpdateTimeFormat();
- if (default_view_)
- default_view_->GetDateView()->UpdateTimeFormat();
-}
-
-void TrayDate::OnSystemClockTimeUpdated() {
- if (time_tray_)
- time_tray_->UpdateTimeFormat();
- if (default_view_)
- default_view_->GetDateView()->UpdateTimeFormat();
-}
-
-void TrayDate::Refresh() {
- if (time_tray_)
- time_tray_->UpdateText();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/date/tray_date.h b/chromium/ash/system/date/tray_date.h
deleted file mode 100644
index 6d5825b5880..00000000000
--- a/chromium/ash/system/date/tray_date.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_DATE_TRAY_DATE_H_
-#define ASH_SYSTEM_DATE_TRAY_DATE_H_
-
-#include "ash/system/date/clock_observer.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "base/memory/scoped_ptr.h"
-
-namespace views {
-class Label;
-}
-
-namespace ash {
-namespace internal {
-
-#if defined(OS_CHROMEOS)
-class SystemClockObserver;
-#endif
-class DateDefaultView;
-
-namespace tray {
-class TimeView;
-}
-
-class TrayDate : public SystemTrayItem,
- public ClockObserver {
- public:
- enum ClockLayout {
- HORIZONTAL_CLOCK,
- VERTICAL_CLOCK,
- };
- explicit TrayDate(SystemTray* system_tray);
- virtual ~TrayDate();
-
- // Returns view for help button if it is exists. Returns NULL otherwise.
- views::View* GetHelpButtonView() const;
-
- private:
- // Overridden from SystemTrayItem.
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyTrayView() OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
- virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
- virtual void UpdateAfterShelfAlignmentChange(
- ShelfAlignment alignment) OVERRIDE;
-
- // Overridden from ClockObserver.
- virtual void OnDateFormatChanged() OVERRIDE;
- virtual void OnSystemClockTimeUpdated() OVERRIDE;
- virtual void Refresh() OVERRIDE;
-
- void SetupLabelForTimeTray(views::Label* label);
-
- tray::TimeView* time_tray_;
- DateDefaultView* default_view_;
-
-#if defined(OS_CHROMEOS)
- scoped_ptr<SystemClockObserver> system_clock_observer_;
-#endif
-
- DISALLOW_COPY_AND_ASSIGN(TrayDate);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_DATE_TRAY_DATE_H_
diff --git a/chromium/ash/system/drive/drive_observer.h b/chromium/ash/system/drive/drive_observer.h
deleted file mode 100644
index a721dd44fc7..00000000000
--- a/chromium/ash/system/drive/drive_observer.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_DRIVE_DRIVE_OBSERVER_H_
-#define ASH_SYSTEM_DRIVE_DRIVE_OBSERVER_H_
-
-#include "ash/system/tray/system_tray_delegate.h"
-
-namespace ash {
-
-class DriveObserver {
- public:
- virtual void OnDriveJobUpdated(const DriveOperationStatus& status) = 0;
-
- protected:
- virtual ~DriveObserver() {}
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_DRIVE_DRIVE_OBSERVER_H_
diff --git a/chromium/ash/system/drive/tray_drive.cc b/chromium/ash/system/drive/tray_drive.cc
deleted file mode 100644
index b246d52a7bf..00000000000
--- a/chromium/ash/system/drive/tray_drive.cc
+++ /dev/null
@@ -1,517 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/drive/tray_drive.h"
-
-#include <vector>
-
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
-#include "ash/system/tray/fixed_sized_scroll_view.h"
-#include "ash/system/tray/hover_highlight_view.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_details_view.h"
-#include "ash/system/tray/tray_item_more.h"
-#include "ash/system/tray/tray_item_view.h"
-#include "base/logging.h"
-#include "base/stl_util.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/utf_string_conversions.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/font.h"
-#include "ui/gfx/image/image.h"
-#include "ui/views/controls/button/image_button.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/controls/progress_bar.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/layout/grid_layout.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-
-namespace internal {
-
-namespace {
-
-const int kSidePadding = 8;
-const int kHorizontalPadding = 6;
-const int kVerticalPadding = 6;
-const int kTopPadding = 6;
-const int kBottomPadding = 10;
-const int kProgressBarWidth = 100;
-const int kProgressBarHeight = 11;
-const int64 kHideDelayInMs = 1000;
-
-base::string16 GetTrayLabel(const ash::DriveOperationStatusList& list) {
- return l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_DRIVE_SYNCING,
- base::IntToString16(static_cast<int>(list.size())));
-}
-
-scoped_ptr<ash::DriveOperationStatusList> GetCurrentOperationList() {
- ash::SystemTrayDelegate* delegate =
- ash::Shell::GetInstance()->system_tray_delegate();
- scoped_ptr<ash::DriveOperationStatusList> list(
- new ash::DriveOperationStatusList);
- delegate->GetDriveOperationStatusList(list.get());
- return list.Pass();
-}
-
-}
-
-namespace tray {
-
-class DriveDefaultView : public TrayItemMore {
- public:
- DriveDefaultView(SystemTrayItem* owner,
- const DriveOperationStatusList* list)
- : TrayItemMore(owner, true) {
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
-
- SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_DRIVE).ToImageSkia());
- Update(list);
- }
-
- virtual ~DriveDefaultView() {}
-
- void Update(const DriveOperationStatusList* list) {
- DCHECK(list);
- base::string16 label = GetTrayLabel(*list);
- SetLabel(label);
- SetAccessibleName(label);
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DriveDefaultView);
-};
-
-class DriveDetailedView : public TrayDetailsView,
- public ViewClickListener {
- public:
- DriveDetailedView(SystemTrayItem* owner,
- const DriveOperationStatusList* list)
- : TrayDetailsView(owner),
- settings_(NULL),
- in_progress_img_(NULL),
- done_img_(NULL),
- failed_img_(NULL) {
- in_progress_img_ = ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IDR_AURA_UBER_TRAY_DRIVE);
- done_img_ = ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IDR_AURA_UBER_TRAY_DRIVE_DONE);
- failed_img_ = ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IDR_AURA_UBER_TRAY_DRIVE_FAILED);
-
- Update(list);
- }
-
- virtual ~DriveDetailedView() {
- STLDeleteValues(&update_map_);
- }
-
- void Update(const DriveOperationStatusList* list) {
- AppendOperationList(list);
- AppendSettings();
- AppendHeaderEntry(list);
-
- SchedulePaint();
- }
-
- private:
-
- class OperationProgressBar : public views::ProgressBar {
- public:
- OperationProgressBar() {}
- private:
-
- // Overridden from View:
- virtual gfx::Size GetPreferredSize() OVERRIDE {
- return gfx::Size(kProgressBarWidth, kProgressBarHeight);
- }
-
- DISALLOW_COPY_AND_ASSIGN(OperationProgressBar);
- };
-
- class RowView : public HoverHighlightView,
- public views::ButtonListener {
- public:
- RowView(DriveDetailedView* parent,
- ash::DriveOperationStatus::OperationState state,
- double progress,
- const base::FilePath& file_path,
- int32 operation_id)
- : HoverHighlightView(parent),
- container_(parent),
- status_img_(NULL),
- label_container_(NULL),
- progress_bar_(NULL),
- cancel_button_(NULL),
- operation_id_(operation_id) {
- // Status image.
- status_img_ = new views::ImageView();
- AddChildView(status_img_);
-
- label_container_ = new views::View();
- label_container_->SetLayoutManager(new views::BoxLayout(
- views::BoxLayout::kVertical, 0, 0, kVerticalPadding));
-#if defined(OS_POSIX)
- base::string16 file_label = UTF8ToUTF16(file_path.BaseName().value());
-#elif defined(OS_WIN)
- base::string16 file_label = WideToUTF16(file_path.BaseName().value());
-#endif
- views::Label* label = new views::Label(file_label);
- label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- label_container_->AddChildView(label);
- // Add progress bar.
- progress_bar_ = new OperationProgressBar();
- label_container_->AddChildView(progress_bar_);
-
- AddChildView(label_container_);
-
- cancel_button_ = new views::ImageButton(this);
- cancel_button_->SetImage(views::ImageButton::STATE_NORMAL,
- ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IDR_AURA_UBER_TRAY_DRIVE_CANCEL));
- cancel_button_->SetImage(views::ImageButton::STATE_HOVERED,
- ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IDR_AURA_UBER_TRAY_DRIVE_CANCEL_HOVER));
-
- UpdateStatus(state, progress);
- AddChildView(cancel_button_);
- }
-
- void UpdateStatus(ash::DriveOperationStatus::OperationState state,
- double progress) {
- status_img_->SetImage(container_->GetImageForState(state));
- progress_bar_->SetValue(progress);
- cancel_button_->SetVisible(
- state == ash::DriveOperationStatus::OPERATION_NOT_STARTED ||
- state == ash::DriveOperationStatus::OPERATION_IN_PROGRESS);
- }
-
- private:
-
- // views::View overrides.
- virtual gfx::Size GetPreferredSize() OVERRIDE {
- return gfx::Size(
- status_img_->GetPreferredSize().width() +
- label_container_->GetPreferredSize().width() +
- cancel_button_->GetPreferredSize().width() +
- 2 * kSidePadding + 2 * kHorizontalPadding,
- std::max(status_img_->GetPreferredSize().height(),
- std::max(label_container_->GetPreferredSize().height(),
- cancel_button_->GetPreferredSize().height())) +
- kTopPadding + kBottomPadding);
- }
-
- virtual void Layout() OVERRIDE {
- gfx::Rect child_area(GetLocalBounds());
- if (child_area.IsEmpty())
- return;
-
- int pos_x = child_area.x() + kSidePadding;
- int pos_y = child_area.y() + kTopPadding;
-
- gfx::Rect bounds_status(
- gfx::Point(pos_x,
- pos_y + (child_area.height() - kTopPadding -
- kBottomPadding -
- status_img_->GetPreferredSize().height())/2),
- status_img_->GetPreferredSize());
- status_img_->SetBoundsRect(
- gfx::IntersectRects(bounds_status, child_area));
- pos_x += status_img_->bounds().width() + kHorizontalPadding;
-
- gfx::Rect bounds_label(pos_x,
- pos_y,
- child_area.width() - 2 * kSidePadding -
- 2 * kHorizontalPadding -
- status_img_->GetPreferredSize().width() -
- cancel_button_->GetPreferredSize().width(),
- label_container_->GetPreferredSize().height());
- label_container_->SetBoundsRect(
- gfx::IntersectRects(bounds_label, child_area));
- pos_x += label_container_->bounds().width() + kHorizontalPadding;
-
- gfx::Rect bounds_button(
- gfx::Point(pos_x,
- pos_y + (child_area.height() - kTopPadding -
- kBottomPadding -
- cancel_button_->GetPreferredSize().height())/2),
- cancel_button_->GetPreferredSize());
- cancel_button_->SetBoundsRect(
- gfx::IntersectRects(bounds_button, child_area));
- }
-
- // views::ButtonListener overrides.
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE {
- DCHECK(sender == cancel_button_);
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_DRIVE_CANCEL_OPERATION);
- container_->OnCancelOperation(operation_id_);
- }
-
- DriveDetailedView* container_;
- views::ImageView* status_img_;
- views::View* label_container_;
- views::ProgressBar* progress_bar_;
- views::ImageButton* cancel_button_;
- int32 operation_id_;
-
- DISALLOW_COPY_AND_ASSIGN(RowView);
- };
-
- void AppendHeaderEntry(const DriveOperationStatusList* list) {
- if (footer())
- return;
- CreateSpecialRow(IDS_ASH_STATUS_TRAY_DRIVE, this);
- }
-
- gfx::ImageSkia* GetImageForState(
- ash::DriveOperationStatus::OperationState state) {
- switch (state) {
- case ash::DriveOperationStatus::OPERATION_NOT_STARTED:
- case ash::DriveOperationStatus::OPERATION_IN_PROGRESS:
- return in_progress_img_;
- case ash::DriveOperationStatus::OPERATION_COMPLETED:
- return done_img_;
- case ash::DriveOperationStatus::OPERATION_FAILED:
- return failed_img_;
- }
- return failed_img_;
- }
-
- void OnCancelOperation(int32 operation_id) {
- SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate();
- delegate->CancelDriveOperation(operation_id);
- }
-
- void AppendOperationList(const DriveOperationStatusList* list) {
- if (!scroller())
- CreateScrollableList();
-
- // Apply the update.
- std::set<base::FilePath> new_set;
- bool item_list_changed = false;
- for (DriveOperationStatusList::const_iterator it = list->begin();
- it != list->end(); ++it) {
- const DriveOperationStatus& operation = *it;
-
- new_set.insert(operation.file_path);
- std::map<base::FilePath, RowView*>::iterator existing_item =
- update_map_.find(operation.file_path);
-
- if (existing_item != update_map_.end()) {
- existing_item->second->UpdateStatus(operation.state,
- operation.progress);
- } else {
- RowView* row_view = new RowView(this,
- operation.state,
- operation.progress,
- operation.file_path,
- operation.id);
-
- update_map_[operation.file_path] = row_view;
- scroll_content()->AddChildView(row_view);
- item_list_changed = true;
- }
- }
-
- // Remove items from the list that haven't been added or modified with this
- // update batch.
- std::set<base::FilePath> remove_set;
- for (std::map<base::FilePath, RowView*>::iterator update_iter =
- update_map_.begin();
- update_iter != update_map_.end(); ++update_iter) {
- if (new_set.find(update_iter->first) == new_set.end()) {
- remove_set.insert(update_iter->first);
- }
- }
-
- for (std::set<base::FilePath>::iterator removed_iter = remove_set.begin();
- removed_iter != remove_set.end(); ++removed_iter) {
- delete update_map_[*removed_iter];
- update_map_.erase(*removed_iter);
- item_list_changed = true;
- }
-
- if (item_list_changed)
- scroller()->Layout();
-
- // Close the details if there is really nothing to show there anymore.
- if (new_set.empty() && GetWidget())
- GetWidget()->Close();
- }
-
- void AppendSettings() {
- if (settings_)
- return;
-
- HoverHighlightView* container = new HoverHighlightView(this);
- container->AddLabel(ui::ResourceBundle::GetSharedInstance().
- GetLocalizedString(IDS_ASH_STATUS_TRAY_DRIVE_SETTINGS),
- gfx::Font::NORMAL);
- AddChildView(container);
- settings_ = container;
- }
-
- // Overridden from ViewClickListener.
- virtual void OnViewClicked(views::View* sender) OVERRIDE {
- SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate();
- if (sender == footer()->content()) {
- TransitionToDefaultView();
- } else if (sender == settings_) {
- delegate->ShowDriveSettings();
- }
- }
-
- // Maps operation entries to their file paths.
- std::map<base::FilePath, RowView*> update_map_;
- views::View* settings_;
- gfx::ImageSkia* in_progress_img_;
- gfx::ImageSkia* done_img_;
- gfx::ImageSkia* failed_img_;
-
- DISALLOW_COPY_AND_ASSIGN(DriveDetailedView);
-};
-
-} // namespace tray
-
-TrayDrive::TrayDrive(SystemTray* system_tray) :
- TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_DRIVE_LIGHT),
- default_(NULL),
- detailed_(NULL) {
- Shell::GetInstance()->system_tray_notifier()->AddDriveObserver(this);
-}
-
-TrayDrive::~TrayDrive() {
- Shell::GetInstance()->system_tray_notifier()->RemoveDriveObserver(this);
-}
-
-bool TrayDrive::GetInitialVisibility() {
- return false;
-}
-
-views::View* TrayDrive::CreateDefaultView(user::LoginStatus status) {
- DCHECK(!default_);
-
- if (status != user::LOGGED_IN_USER && status != user::LOGGED_IN_OWNER)
- return NULL;
-
- // If the list is empty AND the tray icon is invisible (= not in the margin
- // duration of delayed item hiding), don't show the item.
- scoped_ptr<DriveOperationStatusList> list(GetCurrentOperationList());
- if (list->empty() && !tray_view()->visible())
- return NULL;
-
- default_ = new tray::DriveDefaultView(this, list.get());
- return default_;
-}
-
-views::View* TrayDrive::CreateDetailedView(user::LoginStatus status) {
- DCHECK(!detailed_);
-
- if (status != user::LOGGED_IN_USER && status != user::LOGGED_IN_OWNER)
- return NULL;
-
- // If the list is empty AND the tray icon is invisible (= not in the margin
- // duration of delayed item hiding), don't show the item.
- scoped_ptr<DriveOperationStatusList> list(GetCurrentOperationList());
- if (list->empty() && !tray_view()->visible())
- return NULL;
-
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_DETAILED_DRIVE_VIEW);
- detailed_ = new tray::DriveDetailedView(this, list.get());
- return detailed_;
-}
-
-void TrayDrive::DestroyDefaultView() {
- default_ = NULL;
-}
-
-void TrayDrive::DestroyDetailedView() {
- detailed_ = NULL;
-}
-
-void TrayDrive::UpdateAfterLoginStatusChange(user::LoginStatus status) {
- if (status == user::LOGGED_IN_USER || status == user::LOGGED_IN_OWNER)
- return;
-
- tray_view()->SetVisible(false);
- DestroyDefaultView();
- DestroyDetailedView();
-}
-
-void TrayDrive::OnDriveJobUpdated(const DriveOperationStatus& status) {
- // The Drive job list manager changed its notification interface *not* to send
- // the whole list of operations each time, to clarify which operation is
- // updated and to reduce redundancy.
- //
- // TrayDrive should be able to benefit from the change, but for now, to
- // incrementally migrate to the new way with minimum diffs, we still get the
- // list of operations each time the event is fired.
- // TODO(kinaba) http://crbug.com/128079 clean it up.
- scoped_ptr<DriveOperationStatusList> list(GetCurrentOperationList());
- bool is_new_item = true;
- for (size_t i = 0; i < list->size(); ++i) {
- if ((*list)[i].id == status.id) {
- (*list)[i] = status;
- is_new_item = false;
- break;
- }
- }
- if (is_new_item)
- list->push_back(status);
-
- // Check if all the operations are in the finished state.
- bool all_jobs_finished = true;
- for (size_t i = 0; i < list->size(); ++i) {
- if ((*list)[i].state != DriveOperationStatus::OPERATION_COMPLETED &&
- (*list)[i].state != DriveOperationStatus::OPERATION_FAILED) {
- all_jobs_finished = false;
- break;
- }
- }
-
- if (all_jobs_finished) {
- // If all the jobs ended, the tray item will be hidden after a certain
- // amount of delay. This is to avoid flashes between sequentially executed
- // Drive operations (see crbug/165679).
- hide_timer_.Start(FROM_HERE,
- base::TimeDelta::FromMilliseconds(kHideDelayInMs),
- this,
- &TrayDrive::HideIfNoOperations);
- return;
- }
-
- // If the list is non-empty, stop the hiding timer (if any).
- hide_timer_.Stop();
-
- tray_view()->SetVisible(true);
- if (default_)
- default_->Update(list.get());
- if (detailed_)
- detailed_->Update(list.get());
-}
-
-void TrayDrive::HideIfNoOperations() {
- DriveOperationStatusList empty_list;
-
- tray_view()->SetVisible(false);
- if (default_)
- default_->Update(&empty_list);
- if (detailed_)
- detailed_->Update(&empty_list);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/drive/tray_drive.h b/chromium/ash/system/drive/tray_drive.h
deleted file mode 100644
index 6550fdeda8e..00000000000
--- a/chromium/ash/system/drive/tray_drive.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_DRIVE_TRAY_DRIVE_H_
-#define ASH_SYSTEM_DRIVE_TRAY_DRIVE_H_
-
-#include "ash/system/drive/drive_observer.h"
-#include "ash/system/tray/tray_image_item.h"
-#include "base/timer/timer.h"
-
-namespace views {
-class Label;
-}
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-class DriveTrayView;
-class DriveDefaultView;
-class DriveDetailedView;
-}
-
-class TrayDrive : public TrayImageItem,
- public DriveObserver {
- public:
- explicit TrayDrive(SystemTray* system_tray);
- virtual ~TrayDrive();
-
- private:
- // Overridden from TrayImageItem.
- virtual bool GetInitialVisibility() OVERRIDE;
-
- // Overridden from SystemTrayItem.
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
- virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
-
- // Overridden from DriveObserver.
- virtual void OnDriveJobUpdated(const DriveOperationStatus& status) OVERRIDE;
-
- // Delayed hiding of the tray item after encountering an empty operation list.
- void HideIfNoOperations();
-
- tray::DriveDefaultView* default_;
- tray::DriveDetailedView* detailed_;
- base::OneShotTimer<TrayDrive> hide_timer_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayDrive);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_DRIVE_TRAY_DRIVE_H_
diff --git a/chromium/ash/system/ime/ime_observer.h b/chromium/ash/system/ime/ime_observer.h
deleted file mode 100644
index aee74aea2ba..00000000000
--- a/chromium/ash/system/ime/ime_observer.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_IME_IME_OBSERVER_H_
-#define ASH_SYSTEM_IME_IME_OBSERVER_H_
-
-namespace ash {
-
-class IMEObserver {
- public:
- virtual ~IMEObserver() {}
-
- // Notify the observer that the IME state has changed, and should be
- // refreshed. |show_message| indicates whether the user should be alerted of
- // the change.
- virtual void OnIMERefresh(bool show_message) = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_IME_IME_OBSERVER_H_
diff --git a/chromium/ash/system/ime/tray_ime.cc b/chromium/ash/system/ime/tray_ime.cc
deleted file mode 100644
index c558e27ed1e..00000000000
--- a/chromium/ash/system/ime/tray_ime.cc
+++ /dev/null
@@ -1,321 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/ime/tray_ime.h"
-
-#include <vector>
-
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/system/system_notifier.h"
-#include "ash/system/tray/hover_highlight_view.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_details_view.h"
-#include "ash/system/tray/tray_item_more.h"
-#include "ash/system/tray/tray_item_view.h"
-#include "ash/system/tray/tray_utils.h"
-#include "base/logging.h"
-#include "base/strings/utf_string_conversions.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/font.h"
-#include "ui/gfx/image/image.h"
-#include "ui/message_center/message_center.h"
-#include "ui/message_center/notification.h"
-#include "ui/message_center/notification_delegate.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/widget/widget.h"
-
-using message_center::Notification;
-
-namespace {
-
-const char kIMENotificationId[] = "chrome://settings/ime";
-
-} // namespace
-
-namespace ash {
-namespace internal {
-namespace tray {
-
-class IMEDefaultView : public TrayItemMore {
- public:
- explicit IMEDefaultView(SystemTrayItem* owner)
- : TrayItemMore(owner, true) {
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
-
- SetImage(bundle.GetImageNamed(
- IDR_AURA_UBER_TRAY_IME).ToImageSkia());
-
- IMEInfo info;
- Shell::GetInstance()->system_tray_delegate()->GetCurrentIME(&info);
- UpdateLabel(info);
- }
-
- virtual ~IMEDefaultView() {}
-
- void UpdateLabel(const IMEInfo& info) {
- SetLabel(info.name);
- SetAccessibleName(info.name);
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(IMEDefaultView);
-};
-
-class IMEDetailedView : public TrayDetailsView,
- public ViewClickListener {
- public:
- IMEDetailedView(SystemTrayItem* owner, user::LoginStatus login)
- : TrayDetailsView(owner),
- login_(login) {
- SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate();
- IMEInfoList list;
- delegate->GetAvailableIMEList(&list);
- IMEPropertyInfoList property_list;
- delegate->GetCurrentIMEProperties(&property_list);
- Update(list, property_list);
- }
-
- virtual ~IMEDetailedView() {}
-
- void Update(const IMEInfoList& list,
- const IMEPropertyInfoList& property_list) {
- Reset();
-
- AppendIMEList(list);
- if (!property_list.empty())
- AppendIMEProperties(property_list);
- if (login_ != user::LOGGED_IN_NONE && login_ != user::LOGGED_IN_LOCKED)
- AppendSettings();
- AppendHeaderEntry();
-
- Layout();
- SchedulePaint();
- }
-
- private:
- void AppendHeaderEntry() {
- CreateSpecialRow(IDS_ASH_STATUS_TRAY_IME, this);
- }
-
- void AppendIMEList(const IMEInfoList& list) {
- ime_map_.clear();
- CreateScrollableList();
- for (size_t i = 0; i < list.size(); i++) {
- HoverHighlightView* container = new HoverHighlightView(this);
- container->AddLabel(list[i].name,
- list[i].selected ? gfx::Font::BOLD : gfx::Font::NORMAL);
- scroll_content()->AddChildView(container);
- ime_map_[container] = list[i].id;
- }
- }
-
- void AppendIMEProperties(const IMEPropertyInfoList& property_list) {
- property_map_.clear();
- for (size_t i = 0; i < property_list.size(); i++) {
- HoverHighlightView* container = new HoverHighlightView(this);
- container->AddLabel(
- property_list[i].name,
- property_list[i].selected ? gfx::Font::BOLD : gfx::Font::NORMAL);
- if (i == 0)
- container->set_border(views::Border::CreateSolidSidedBorder(1, 0, 0, 0,
- kBorderLightColor));
- scroll_content()->AddChildView(container);
- property_map_[container] = property_list[i].key;
- }
- }
-
- void AppendSettings() {
- HoverHighlightView* container = new HoverHighlightView(this);
- container->AddLabel(ui::ResourceBundle::GetSharedInstance().
- GetLocalizedString(IDS_ASH_STATUS_TRAY_IME_SETTINGS),
- gfx::Font::NORMAL);
- AddChildView(container);
- settings_ = container;
- }
-
- // Overridden from ViewClickListener.
- virtual void OnViewClicked(views::View* sender) OVERRIDE {
- SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate();
- if (sender == footer()->content()) {
- TransitionToDefaultView();
- } else if (sender == settings_) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_IME_SHOW_DETAILED);
- delegate->ShowIMESettings();
- } else {
- std::map<views::View*, std::string>::const_iterator ime_find;
- ime_find = ime_map_.find(sender);
- if (ime_find != ime_map_.end()) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_IME_SWITCH_MODE);
- std::string ime_id = ime_find->second;
- delegate->SwitchIME(ime_id);
- GetWidget()->Close();
- } else {
- std::map<views::View*, std::string>::const_iterator prop_find;
- prop_find = property_map_.find(sender);
- if (prop_find != property_map_.end()) {
- const std::string key = prop_find->second;
- delegate->ActivateIMEProperty(key);
- GetWidget()->Close();
- }
- }
- }
- }
-
- user::LoginStatus login_;
-
- std::map<views::View*, std::string> ime_map_;
- std::map<views::View*, std::string> property_map_;
- views::View* settings_;
-
- DISALLOW_COPY_AND_ASSIGN(IMEDetailedView);
-};
-
-} // namespace tray
-
-TrayIME::TrayIME(SystemTray* system_tray)
- : SystemTrayItem(system_tray),
- tray_label_(NULL),
- default_(NULL),
- detailed_(NULL),
- message_shown_(false) {
- Shell::GetInstance()->system_tray_notifier()->AddIMEObserver(this);
-}
-
-TrayIME::~TrayIME() {
- Shell::GetInstance()->system_tray_notifier()->RemoveIMEObserver(this);
- message_center::MessageCenter::Get()->RemoveNotification(
- kIMENotificationId, false /* by_user */);
-}
-
-void TrayIME::UpdateTrayLabel(const IMEInfo& current, size_t count) {
- if (tray_label_) {
- if (current.third_party) {
- tray_label_->label()->SetText(current.short_name + UTF8ToUTF16("*"));
- } else {
- tray_label_->label()->SetText(current.short_name);
- }
- tray_label_->SetVisible(count > 1);
- SetTrayLabelItemBorder(tray_label_, system_tray()->shelf_alignment());
- tray_label_->Layout();
- }
-}
-
-void TrayIME::UpdateOrCreateNotification() {
- message_center::MessageCenter* message_center =
- message_center::MessageCenter::Get();
-
- if (!message_center->HasNotification(kIMENotificationId) && message_shown_)
- return;
-
- SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate();
- IMEInfo current;
- delegate->GetCurrentIME(&current);
-
- ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- scoped_ptr<Notification> notification(new Notification(
- message_center::NOTIFICATION_TYPE_SIMPLE,
- kIMENotificationId,
- // TODO(zork): Use IDS_ASH_STATUS_TRAY_THIRD_PARTY_IME_TURNED_ON_BUBBLE
- // for third party IMEs
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_IME_TURNED_ON_BUBBLE,
- current.medium_name),
- base::string16(), // message
- bundle.GetImageNamed(IDR_AURA_UBER_TRAY_IME),
- base::string16(), // display_source
- message_center::NotifierId(
- message_center::NotifierId::SYSTEM_COMPONENT,
- system_notifier::kNotifierInputMethod),
- message_center::RichNotificationData(),
- new message_center::HandleNotificationClickedDelegate(
- base::Bind(&TrayIME::PopupDetailedView,
- base::Unretained(this), 0, true))));
- message_center->AddNotification(notification.Pass());
- message_shown_ = true;
-}
-
-views::View* TrayIME::CreateTrayView(user::LoginStatus status) {
- CHECK(tray_label_ == NULL);
- tray_label_ = new TrayItemView(this);
- tray_label_->CreateLabel();
- SetupLabelForTray(tray_label_->label());
- // Hide IME tray when it is created, it will be updated when it is notified
- // for IME refresh event.
- tray_label_->SetVisible(false);
- return tray_label_;
-}
-
-views::View* TrayIME::CreateDefaultView(user::LoginStatus status) {
- SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate();
- IMEInfoList list;
- IMEPropertyInfoList property_list;
- delegate->GetAvailableIMEList(&list);
- delegate->GetCurrentIMEProperties(&property_list);
- if (list.size() <= 1 && property_list.size() <= 1)
- return NULL;
- CHECK(default_ == NULL);
- default_ = new tray::IMEDefaultView(this);
- return default_;
-}
-
-views::View* TrayIME::CreateDetailedView(user::LoginStatus status) {
- CHECK(detailed_ == NULL);
- detailed_ = new tray::IMEDetailedView(this, status);
- return detailed_;
-}
-
-void TrayIME::DestroyTrayView() {
- tray_label_ = NULL;
-}
-
-void TrayIME::DestroyDefaultView() {
- default_ = NULL;
-}
-
-void TrayIME::DestroyDetailedView() {
- detailed_ = NULL;
-}
-
-void TrayIME::UpdateAfterLoginStatusChange(user::LoginStatus status) {
-}
-
-void TrayIME::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
- SetTrayLabelItemBorder(tray_label_, alignment);
- tray_label_->Layout();
-}
-
-void TrayIME::OnIMERefresh(bool show_message) {
- SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate();
- IMEInfoList list;
- IMEInfo current;
- IMEPropertyInfoList property_list;
- delegate->GetCurrentIME(&current);
- delegate->GetAvailableIMEList(&list);
- delegate->GetCurrentIMEProperties(&property_list);
-
- UpdateTrayLabel(current, list.size());
-
- if (default_)
- default_->UpdateLabel(current);
- if (detailed_)
- detailed_->Update(list, property_list);
-
- if (list.size() > 1 && show_message)
- UpdateOrCreateNotification();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/ime/tray_ime.h b/chromium/ash/system/ime/tray_ime.h
deleted file mode 100644
index b237ae15abc..00000000000
--- a/chromium/ash/system/ime/tray_ime.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_IME_TRAY_IME_H_
-#define ASH_SYSTEM_IME_TRAY_IME_H_
-
-#include "ash/system/ime/ime_observer.h"
-#include "ash/system/tray/system_tray_item.h"
-
-namespace views {
-class Label;
-}
-
-namespace ash {
-
-struct IMEInfo;
-
-namespace internal {
-
-namespace tray {
-class IMEDefaultView;
-class IMEDetailedView;
-class IMENotificationView;
-}
-
-class TrayItemView;
-
-class TrayIME : public SystemTrayItem,
- public IMEObserver {
- public:
- explicit TrayIME(SystemTray* system_tray);
- virtual ~TrayIME();
-
- private:
- void UpdateTrayLabel(const IMEInfo& info, size_t count);
-
- // Update the content of the existing IME notification, or create a new one if
- // necessary. IME notification should be created only once in a session, i.e.
- // if an IME notification is created and removed already, it doesn't create a
- // new one.
- void UpdateOrCreateNotification();
-
- // Overridden from SystemTrayItem.
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyTrayView() OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
- virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
- virtual void UpdateAfterShelfAlignmentChange(
- ShelfAlignment alignment) OVERRIDE;
-
- // Overridden from IMEObserver.
- virtual void OnIMERefresh(bool show_message) OVERRIDE;
-
- TrayItemView* tray_label_;
- tray::IMEDefaultView* default_;
- tray::IMEDetailedView* detailed_;
-
- bool message_shown_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayIME);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_IME_TRAY_IME_H_
diff --git a/chromium/ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h b/chromium/ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h
deleted file mode 100644
index 96edf84f4d5..00000000000
--- a/chromium/ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_KEYBOARD_BRIGHTNESS_KEYBOARD_BRIGHTNESS_CONTROL_DELEGATE_H_
-#define ASH_SYSTEM_KEYBOARD_BRIGHTNESS_KEYBOARD_BRIGHTNESS_CONTROL_DELEGATE_H_
-
-namespace ui {
-class Accelerator;
-} // namespace ui
-
-namespace ash {
-
-// Delegate for controlling the keyboard brightness.
-class KeyboardBrightnessControlDelegate {
- public:
- virtual ~KeyboardBrightnessControlDelegate() {}
-
- // Handles an accelerator-driven request to decrease or increase the keyboard
- // brightness. Returns true if the brightness is changed.
- virtual bool HandleKeyboardBrightnessDown(
- const ui::Accelerator& accelerator) = 0;
- virtual bool HandleKeyboardBrightnessUp(
- const ui::Accelerator& accelerator) = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_KEYBOARD_BRIGHTNESS_KEYBOARD_BRIGHTNESS_CONTROL_DELEGATE_H_
diff --git a/chromium/ash/system/locale/locale_notification_controller.cc b/chromium/ash/system/locale/locale_notification_controller.cc
deleted file mode 100644
index 419baafb404..00000000000
--- a/chromium/ash/system/locale/locale_notification_controller.cc
+++ /dev/null
@@ -1,129 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/locale/locale_notification_controller.h"
-
-#include "ash/shell.h"
-#include "ash/system/system_notifier.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "base/strings/string16.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/message_center/message_center.h"
-#include "ui/message_center/notification.h"
-#include "ui/message_center/notification_delegate.h"
-#include "ui/message_center/notification_types.h"
-
-using message_center::Notification;
-
-namespace ash {
-namespace internal {
-namespace {
-
-const char kLocaleChangeNotificationId[] = "chrome://settings/locale";
-
-class LocaleNotificationDelegate : public message_center::NotificationDelegate {
- public:
- explicit LocaleNotificationDelegate(LocaleObserver::Delegate* delegate);
-
- protected:
- virtual ~LocaleNotificationDelegate();
-
- // message_center::NotificationDelegate overrides:
- virtual void Display() OVERRIDE;
- virtual void Error() OVERRIDE;
- virtual void Close(bool by_user) OVERRIDE;
- virtual bool HasClickedListener() OVERRIDE;
- virtual void Click() OVERRIDE;
- virtual void ButtonClick(int button_index) OVERRIDE;
-
- private:
- LocaleObserver::Delegate* delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(LocaleNotificationDelegate);
-};
-
-LocaleNotificationDelegate::LocaleNotificationDelegate(
- LocaleObserver::Delegate* delegate)
- : delegate_(delegate) {
- DCHECK(delegate_);
-}
-
-LocaleNotificationDelegate::~LocaleNotificationDelegate() {
-}
-
-void LocaleNotificationDelegate::Display() {
-}
-
-void LocaleNotificationDelegate::Error() {
-}
-
-void LocaleNotificationDelegate::Close(bool by_user) {
- delegate_->AcceptLocaleChange();
-}
-
-bool LocaleNotificationDelegate::HasClickedListener() {
- return true;
-}
-
-void LocaleNotificationDelegate::Click() {
- delegate_->AcceptLocaleChange();
-}
-
-void LocaleNotificationDelegate::ButtonClick(int button_index) {
- DCHECK_EQ(0, button_index);
- delegate_->RevertLocaleChange();
-}
-
-} // namespace
-
-LocaleNotificationController::LocaleNotificationController()
- : delegate_(NULL) {
- Shell::GetInstance()->system_tray_notifier()->AddLocaleObserver(this);
-}
-
-LocaleNotificationController::~LocaleNotificationController() {
- Shell::GetInstance()->system_tray_notifier()->RemoveLocaleObserver(this);
-}
-
-void LocaleNotificationController::OnLocaleChanged(
- LocaleObserver::Delegate* delegate,
- const std::string& cur_locale,
- const std::string& from_locale,
- const std::string& to_locale) {
- if (!delegate)
- return;
-
- base::string16 from = l10n_util::GetDisplayNameForLocale(
- from_locale, cur_locale, true);
- base::string16 to = l10n_util::GetDisplayNameForLocale(
- to_locale, cur_locale, true);
-
- message_center::RichNotificationData optional;
- optional.buttons.push_back(message_center::ButtonInfo(
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_LOCALE_REVERT_MESSAGE, from)));
- optional.never_timeout = true;
-
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- scoped_ptr<Notification> notification(new Notification(
- message_center::NOTIFICATION_TYPE_SIMPLE,
- kLocaleChangeNotificationId,
- base::string16() /* title */,
- l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_LOCALE_CHANGE_MESSAGE, from, to),
- bundle.GetImageNamed(IDR_AURA_UBER_TRAY_LOCALE),
- base::string16() /* display_source */,
- message_center::NotifierId(
- message_center::NotifierId::SYSTEM_COMPONENT,
- system_notifier::kNotifierLocale),
- optional,
- new LocaleNotificationDelegate(delegate)));
- message_center::MessageCenter::Get()->AddNotification(notification.Pass());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/locale/locale_notification_controller.h b/chromium/ash/system/locale/locale_notification_controller.h
deleted file mode 100644
index d23895c8206..00000000000
--- a/chromium/ash/system/locale/locale_notification_controller.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_LOCALE_LOCALE_NOTIFICATION_CONTROLLER_H_
-#define ASH_SYSTEM_LOCALE_LOCALE_NOTIFICATION_CONTROLLER_H_
-
-#include <string>
-
-#include "ash/system/locale/locale_observer.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-
-namespace ash {
-namespace internal {
-
-// Observes the locale change and creates rich notification for the change.
-class LocaleNotificationController : public LocaleObserver {
- public:
- LocaleNotificationController();
- virtual ~LocaleNotificationController();
-
- private:
- // Overridden from LocaleObserver.
- virtual void OnLocaleChanged(LocaleObserver::Delegate* delegate,
- const std::string& cur_locale,
- const std::string& from_locale,
- const std::string& to_locale) OVERRIDE;
-
- LocaleObserver::Delegate* delegate_;
- std::string cur_locale_;
- std::string from_locale_;
- std::string to_locale_;
-
- DISALLOW_COPY_AND_ASSIGN(LocaleNotificationController);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_LOCALE_LOCALE_NOTIFICATION_CONTROLLER_H_
diff --git a/chromium/ash/system/locale/locale_observer.h b/chromium/ash/system/locale/locale_observer.h
deleted file mode 100644
index 939bd60faa9..00000000000
--- a/chromium/ash/system/locale/locale_observer.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_LOCALE_LOCALE_OBSERVER_H_
-#define ASH_SYSTEM_LOCALE_LOCALE_OBSERVER_H_
-
-#include "ash/ash_export.h"
-
-namespace ash {
-
-class ASH_EXPORT LocaleObserver {
- public:
- class Delegate {
- public:
- virtual ~Delegate() {}
-
- virtual void AcceptLocaleChange() = 0;
- virtual void RevertLocaleChange() = 0;
- };
-
- virtual ~LocaleObserver() {}
-
- virtual void OnLocaleChanged(Delegate* delegate,
- const std::string& cur_locale,
- const std::string& from_locale,
- const std::string& to_locale) = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_LOCALE_LOCALE_OBSERVER_H_
diff --git a/chromium/ash/system/logout_button/logout_button_observer.h b/chromium/ash/system/logout_button/logout_button_observer.h
deleted file mode 100644
index 9234c7d758d..00000000000
--- a/chromium/ash/system/logout_button/logout_button_observer.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_LOGOUT_BUTTON_LOGOUT_BUTTON_OBSERVER_H_
-#define ASH_SYSTEM_LOGOUT_BUTTON_LOGOUT_BUTTON_OBSERVER_H_
-
-namespace ash {
-
-// Observer for the value of the kShowLogoutButtonInTray pref that determines
-// whether a logout button should be shown in the system tray during a session.
-class LogoutButtonObserver {
- public:
- virtual ~LogoutButtonObserver() {}
-
- // Called when the value of the kShowLogoutButtonInTray pref changes.
- virtual void OnShowLogoutButtonInTrayChanged(bool show) = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_LOGOUT_BUTTON_LOGOUT_BUTTON_OBSERVER_H_
diff --git a/chromium/ash/system/logout_button/logout_button_tray.cc b/chromium/ash/system/logout_button/logout_button_tray.cc
deleted file mode 100644
index c06073040c5..00000000000
--- a/chromium/ash/system/logout_button/logout_button_tray.cc
+++ /dev/null
@@ -1,158 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/logout_button/logout_button_tray.h"
-
-#include "ash/shelf/shelf_types.h"
-#include "ash/shell.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_utils.h"
-#include "base/logging.h"
-#include "grit/ash_resources.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "ui/events/event.h"
-#include "ui/gfx/font.h"
-#include "ui/gfx/insets.h"
-#include "ui/gfx/size.h"
-#include "ui/views/bubble/tray_bubble_view.h"
-#include "ui/views/controls/button/label_button.h"
-#include "ui/views/controls/button/label_button_border.h"
-#include "ui/views/painter.h"
-
-namespace ash {
-
-namespace internal {
-
-namespace {
-
-const int kLogoutButtonHorizontalExtraPadding = 7;
-
-const int kLogoutButtonNormalImages[] = {
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_TOP_LEFT,
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_TOP,
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_TOP_RIGHT,
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_LEFT,
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_CENTER,
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_RIGHT,
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_BOTTOM_LEFT,
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_BOTTOM,
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_NORMAL_BOTTOM_RIGHT
-};
-
-const int kLogoutButtonPushedImages[] = {
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_TOP_LEFT,
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_TOP,
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_TOP_RIGHT,
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_LEFT,
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_CENTER,
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_RIGHT,
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_BOTTOM_LEFT,
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_BOTTOM,
- IDR_AURA_UBER_TRAY_LOGOUT_BUTTON_PUSHED_BOTTOM_RIGHT
-};
-
-class LogoutButton : public views::LabelButton {
- public:
- LogoutButton(views::ButtonListener* listener);
- virtual ~LogoutButton();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LogoutButton);
-};
-
-} // namespace
-
-LogoutButton::LogoutButton(views::ButtonListener* listener)
- : views::LabelButton(listener, base::string16()) {
- SetupLabelForTray(label());
- SetFont(GetFont().DeriveFont(0, gfx::Font::NORMAL));
- for (size_t state = 0; state < views::Button::STATE_COUNT; ++state)
- SetTextColor(static_cast<views::Button::ButtonState>(state), SK_ColorWHITE);
-
- views::LabelButtonBorder* border =
- new views::LabelButtonBorder(views::Button::STYLE_TEXTBUTTON);
- border->SetPainter(false, views::Button::STATE_NORMAL,
- views::Painter::CreateImageGridPainter(kLogoutButtonNormalImages));
- border->SetPainter(false, views::Button::STATE_HOVERED,
- views::Painter::CreateImageGridPainter(kLogoutButtonNormalImages));
- border->SetPainter(false, views::Button::STATE_PRESSED,
- views::Painter::CreateImageGridPainter(kLogoutButtonPushedImages));
- gfx::Insets insets = border->GetInsets();
- insets += gfx::Insets(0, kLogoutButtonHorizontalExtraPadding,
- 0, kLogoutButtonHorizontalExtraPadding);
- border->set_insets(insets);
- set_border(border);
- set_animate_on_state_change(false);
-
- set_min_size(gfx::Size(0, GetShelfItemHeight()));
-}
-
-LogoutButton::~LogoutButton() {
-}
-
-LogoutButtonTray::LogoutButtonTray(StatusAreaWidget* status_area_widget)
- : TrayBackgroundView(status_area_widget),
- button_(NULL),
- login_status_(user::LOGGED_IN_NONE),
- show_logout_button_in_tray_(false) {
- button_ = new LogoutButton(this);
- tray_container()->AddChildView(button_);
- tray_container()->set_border(NULL);
- Shell::GetInstance()->system_tray_notifier()->AddLogoutButtonObserver(this);
-}
-
-LogoutButtonTray::~LogoutButtonTray() {
- Shell::GetInstance()->system_tray_notifier()->
- RemoveLogoutButtonObserver(this);
-}
-
-void LogoutButtonTray::SetShelfAlignment(ShelfAlignment alignment) {
- TrayBackgroundView::SetShelfAlignment(alignment);
- tray_container()->set_border(NULL);
-}
-
-base::string16 LogoutButtonTray::GetAccessibleNameForTray() {
- return button_->GetText();
-}
-
-void LogoutButtonTray::HideBubbleWithView(
- const views::TrayBubbleView* bubble_view) {
-}
-
-bool LogoutButtonTray::ClickedOutsideBubble() {
- return false;
-}
-
-void LogoutButtonTray::OnShowLogoutButtonInTrayChanged(bool show) {
- show_logout_button_in_tray_ = show;
- UpdateVisibility();
-}
-
-void LogoutButtonTray::ButtonPressed(views::Button* sender,
- const ui::Event& event) {
- DCHECK_EQ(sender, button_);
- Shell::GetInstance()->system_tray_delegate()->SignOut();
-}
-
-void LogoutButtonTray::UpdateAfterLoginStatusChange(
- user::LoginStatus login_status) {
- login_status_ = login_status;
- const base::string16 title =
- GetLocalizedSignOutStringForStatus(login_status, false);
- button_->SetText(title);
- button_->SetAccessibleName(title);
- UpdateVisibility();
-}
-
-void LogoutButtonTray::UpdateVisibility() {
- SetVisible(show_logout_button_in_tray_ &&
- login_status_ != user::LOGGED_IN_NONE &&
- login_status_ != user::LOGGED_IN_LOCKED);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/logout_button/logout_button_tray.h b/chromium/ash/system/logout_button/logout_button_tray.h
deleted file mode 100644
index 5683e5e2654..00000000000
--- a/chromium/ash/system/logout_button/logout_button_tray.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_LOGOUT_BUTTON_LOGOUT_BUTTON_TRAY_H_
-#define ASH_SYSTEM_LOGOUT_BUTTON_LOGOUT_BUTTON_TRAY_H_
-
-#include "ash/system/logout_button/logout_button_observer.h"
-#include "ash/system/tray/tray_background_view.h"
-#include "ash/system/user/login_status.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/views/controls/button/button.h"
-
-namespace views {
-class LabelButton;
-}
-
-namespace ash {
-namespace internal {
-
-class StatusAreaWidget;
-
-// Adds a logout button to the launcher's status area if enabled by the
-// kShowLogoutButtonInTray pref.
-class LogoutButtonTray : public TrayBackgroundView,
- public LogoutButtonObserver,
- public views::ButtonListener {
- public:
- explicit LogoutButtonTray(StatusAreaWidget* status_area_widget);
- virtual ~LogoutButtonTray();
-
- // TrayBackgroundView:
- virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE;
- virtual base::string16 GetAccessibleNameForTray() OVERRIDE;
- virtual void HideBubbleWithView(
- const views::TrayBubbleView* bubble_view) OVERRIDE;
- virtual bool ClickedOutsideBubble() OVERRIDE;
-
- // LogoutButtonObserver:
- virtual void OnShowLogoutButtonInTrayChanged(bool show) OVERRIDE;
-
- // views::ButtonListener:
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
-
- void UpdateAfterLoginStatusChange(user::LoginStatus login_status);
-
- private:
- void UpdateVisibility();
-
- views::LabelButton* button_; // Not owned.
- user::LoginStatus login_status_;
- bool show_logout_button_in_tray_;
-
- DISALLOW_COPY_AND_ASSIGN(LogoutButtonTray);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_LOGOUT_BUTTON_LOGOUT_BUTTON_TRAY_H_
diff --git a/chromium/ash/system/monitor/tray_monitor.cc b/chromium/ash/system/monitor/tray_monitor.cc
deleted file mode 100644
index bc3d532ea55..00000000000
--- a/chromium/ash/system/monitor/tray_monitor.cc
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/monitor/tray_monitor.h"
-
-#include "ash/system/tray/tray_item_view.h"
-#include "base/process/memory.h"
-#include "base/process/process_metrics.h"
-#include "base/strings/stringprintf.h"
-#include "base/strings/utf_string_conversions.h"
-#include "content/public/browser/gpu_data_manager.h"
-#include "ui/base/text/bytes_formatting.h"
-#include "ui/views/border.h"
-#include "ui/views/controls/label.h"
-
-namespace {
-const int kRefreshTimeoutMs = 1000;
-}
-
-namespace ash {
-namespace internal {
-
-TrayMonitor::TrayMonitor(SystemTray* system_tray)
- : SystemTrayItem(system_tray),
- label_(NULL) {
- refresh_timer_.Start(FROM_HERE,
- base::TimeDelta::FromMilliseconds(kRefreshTimeoutMs),
- this, &TrayMonitor::OnTimer);
-}
-
-TrayMonitor::~TrayMonitor() {
- label_ = NULL;
-}
-
-views::View* TrayMonitor::CreateTrayView(user::LoginStatus status) {
- TrayItemView* view = new TrayItemView(this);
- view->CreateLabel();
- label_ = view->label();
- label_->SetAutoColorReadabilityEnabled(false);
- label_->SetEnabledColor(SK_ColorWHITE);
- label_->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255));
- label_->SetShadowColors(SkColorSetARGB(64, 0, 0, 0),
- SkColorSetARGB(64, 0, 0, 0));
- label_->SetShadowOffset(0, 1);
- label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- label_->SetFont(label_->font().DeriveFont(-2));
- return view;
-}
-
-void TrayMonitor::DestroyTrayView() {
- label_ = NULL;
-}
-
-void TrayMonitor::OnTimer() {
- content::GpuDataManager::GetGpuProcessHandlesCallback callback =
- base::Bind(&TrayMonitor::OnGotHandles, base::Unretained(this));
- refresh_timer_.Stop();
- content::GpuDataManager::GetInstance()->GetGpuProcessHandles(callback);
-}
-
-void TrayMonitor::OnGotHandles(const std::list<base::ProcessHandle>& handles) {
- base::SystemMemoryInfoKB mem_info;
- base::GetSystemMemoryInfo(&mem_info);
- std::string output;
- base::string16 free_bytes =
- ui::FormatBytes(static_cast<int64>(mem_info.free) * 1024);
- output = base::StringPrintf("free: %s", UTF16ToUTF8(free_bytes).c_str());
-#if defined(OS_CHROMEOS)
- if (mem_info.gem_size != -1) {
- base::string16 gem_size = ui::FormatBytes(mem_info.gem_size);
- output += base::StringPrintf(" gmem: %s", UTF16ToUTF8(gem_size).c_str());
- if (mem_info.gem_objects != -1)
- output += base::StringPrintf(" gobjects: %d", mem_info.gem_objects);
- }
-#endif
- size_t total_private_bytes = 0, total_shared_bytes = 0;
- for (std::list<base::ProcessHandle>::const_iterator i = handles.begin();
- i != handles.end(); ++i) {
- base::ProcessMetrics* pm = base::ProcessMetrics::CreateProcessMetrics(*i);
- size_t private_bytes, shared_bytes;
- pm->GetMemoryBytes(&private_bytes, &shared_bytes);
- total_private_bytes += private_bytes;
- total_shared_bytes += shared_bytes;
- delete pm;
- }
- base::string16 private_size = ui::FormatBytes(total_private_bytes);
- base::string16 shared_size = ui::FormatBytes(total_shared_bytes);
-
- output += base::StringPrintf("\nGPU private: %s shared: %s",
- UTF16ToUTF8(private_size).c_str(),
- UTF16ToUTF8(shared_size).c_str());
- label_->SetText(UTF8ToUTF16(output));
- refresh_timer_.Start(FROM_HERE,
- base::TimeDelta::FromMilliseconds(kRefreshTimeoutMs),
- this, &TrayMonitor::OnTimer);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/monitor/tray_monitor.h b/chromium/ash/system/monitor/tray_monitor.h
deleted file mode 100644
index 31c4f146cda..00000000000
--- a/chromium/ash/system/monitor/tray_monitor.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_DATE_TRAY_MONITOR_H_
-#define ASH_SYSTEM_DATE_TRAY_MONITOR_H_
-
-#include <list>
-
-#include "ash/system/tray/system_tray_item.h"
-#include "base/process/process.h"
-#include "base/timer/timer.h"
-
-namespace views {
-class Label;
-}
-
-namespace ash {
-namespace internal {
-
-class TrayMonitor : public SystemTrayItem {
- public:
- explicit TrayMonitor(SystemTray* system_tray);
- virtual ~TrayMonitor();
-
- private:
- // Overridden from SystemTrayItem.
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyTrayView() OVERRIDE;
-
- void OnTimer();
- void OnGotHandles(const std::list<base::ProcessHandle>& handles);
-
- views::Label* label_;
- base::RepeatingTimer<TrayMonitor> refresh_timer_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayMonitor);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_DATE_TRAY_MONITOR_H_
diff --git a/chromium/ash/system/session_length_limit/session_length_limit_observer.h b/chromium/ash/system/session_length_limit/session_length_limit_observer.h
deleted file mode 100644
index 3fcba64d7e1..00000000000
--- a/chromium/ash/system/session_length_limit/session_length_limit_observer.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_SESSION_LENGTH_LIMIT_SESSION_LENGTH_LIMIT_OBSERVER_H_
-#define ASH_SYSTEM_SESSION_LENGTH_LIMIT_SESSION_LENGTH_LIMIT_OBSERVER_H_
-
-#include "ash/ash_export.h"
-
-namespace ash {
-
-// Observer for the session length limit.
-class ASH_EXPORT SessionLengthLimitObserver {
- public:
- virtual ~SessionLengthLimitObserver() {}
-
- // Called when the session start time is updated.
- virtual void OnSessionStartTimeChanged() = 0;
-
- // Called when the session length limit is updated.
- virtual void OnSessionLengthLimitChanged() = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_SESSION_LENGTH_LIMIT_SESSION_LENGTH_LIMIT_OBSERVER_H_
diff --git a/chromium/ash/system/session_length_limit/tray_session_length_limit.cc b/chromium/ash/system/session_length_limit/tray_session_length_limit.cc
deleted file mode 100644
index 81425afbade..00000000000
--- a/chromium/ash/system/session_length_limit/tray_session_length_limit.cc
+++ /dev/null
@@ -1,386 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/session_length_limit/tray_session_length_limit.h"
-
-#include <algorithm>
-
-#include "ash/shelf/shelf_types.h"
-#include "ash/shell.h"
-#include "ash/system/system_notifier.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_utils.h"
-#include "base/location.h"
-#include "base/logging.h"
-#include "base/strings/string16.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/utf_string_conversions.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/l10n/time_format.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/font.h"
-#include "ui/message_center/message_center.h"
-#include "ui/message_center/notification.h"
-#include "ui/views/border.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/layout/grid_layout.h"
-#include "ui/views/view.h"
-
-using message_center::Notification;
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-// If the remaining session time falls below this threshold, the user should be
-// informed that the session is about to expire.
-const int kExpiringSoonThresholdInSeconds = 5 * 60; // 5 minutes.
-
-// Color in which the remaining session time is normally shown.
-const SkColor kRemainingTimeColor = SK_ColorWHITE;
-// Color in which the remaining session time is shown when it is expiring soon.
-const SkColor kRemainingTimeExpiringSoonColor = SK_ColorRED;
-
-views::Label* CreateAndSetupLabel() {
- views::Label* label = new views::Label;
- label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- SetupLabelForTray(label);
- gfx::Font font = label->font();
- label->SetFont(font.DeriveFont(0, font.GetStyle() & ~gfx::Font::BOLD));
- return label;
-}
-
-base::string16 IntToTwoDigitString(int value) {
- DCHECK_GE(value, 0);
- DCHECK_LE(value, 99);
- if (value < 10)
- return ASCIIToUTF16("0") + base::IntToString16(value);
- return base::IntToString16(value);
-}
-
-base::string16 FormatRemainingSessionTimeNotification(
- const base::TimeDelta& remaining_session_time) {
- return l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_REMAINING_SESSION_TIME_NOTIFICATION,
- ui::TimeFormat::TimeDurationLong(remaining_session_time));
-}
-
-// Creates, or updates the notification for session length timeout with
-// |remaining_time|. |state_changed| is true when its internal state has been
-// changed from another.
-void CreateOrUpdateNotification(const std::string& notification_id,
- const base::TimeDelta& remaining_time,
- bool state_changed) {
- message_center::MessageCenter* message_center =
- message_center::MessageCenter::Get();
-
- // Do not create a new notification if no state has changed. It may happen
- // when the notification is already closed by the user, see crbug.com/285941.
- if (!state_changed && !message_center->HasNotification(notification_id))
- return;
-
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- message_center::RichNotificationData data;
- // Makes the spoken feedback only when the state has been changed.
- data.should_make_spoken_feedback_for_popup_updates = state_changed;
- scoped_ptr<Notification> notification(new Notification(
- message_center::NOTIFICATION_TYPE_SIMPLE,
- notification_id,
- FormatRemainingSessionTimeNotification(remaining_time),
- base::string16() /* message */,
- bundle.GetImageNamed(IDR_AURA_UBER_TRAY_SESSION_LENGTH_LIMIT_TIMER),
- base::string16() /* display_source */,
- message_center::NotifierId(
- message_center::NotifierId::SYSTEM_COMPONENT,
- system_notifier::kNotifierSessionLengthTimeout),
- data,
- NULL /* delegate */));
- notification->SetSystemPriority();
- message_center::MessageCenter::Get()->AddNotification(notification.Pass());
-}
-
-} // namespace
-
-namespace tray {
-
-class RemainingSessionTimeTrayView : public views::View {
- public:
- RemainingSessionTimeTrayView(const TraySessionLengthLimit* owner,
- ShelfAlignment shelf_alignment);
- virtual ~RemainingSessionTimeTrayView();
-
- void UpdateClockLayout(ShelfAlignment shelf_alignment);
- void Update();
-
- private:
- void SetBorder(ShelfAlignment shelf_alignment);
-
- const TraySessionLengthLimit* owner_;
-
- views::Label* horizontal_layout_label_;
- views::Label* vertical_layout_label_hours_left_;
- views::Label* vertical_layout_label_hours_right_;
- views::Label* vertical_layout_label_minutes_left_;
- views::Label* vertical_layout_label_minutes_right_;
- views::Label* vertical_layout_label_seconds_left_;
- views::Label* vertical_layout_label_seconds_right_;
-
- DISALLOW_COPY_AND_ASSIGN(RemainingSessionTimeTrayView);
-};
-
-RemainingSessionTimeTrayView::RemainingSessionTimeTrayView(
- const TraySessionLengthLimit* owner,
- ShelfAlignment shelf_alignment)
- : owner_(owner),
- horizontal_layout_label_(NULL),
- vertical_layout_label_hours_left_(NULL),
- vertical_layout_label_hours_right_(NULL),
- vertical_layout_label_minutes_left_(NULL),
- vertical_layout_label_minutes_right_(NULL),
- vertical_layout_label_seconds_left_(NULL),
- vertical_layout_label_seconds_right_(NULL) {
- UpdateClockLayout(shelf_alignment);
-}
-
-RemainingSessionTimeTrayView::~RemainingSessionTimeTrayView() {
-}
-
-void RemainingSessionTimeTrayView::UpdateClockLayout(
- ShelfAlignment shelf_alignment) {
- SetBorder(shelf_alignment);
- const bool horizontal_layout = (shelf_alignment == SHELF_ALIGNMENT_BOTTOM ||
- shelf_alignment == SHELF_ALIGNMENT_TOP);
- if (horizontal_layout && !horizontal_layout_label_) {
- // Remove labels used for vertical layout.
- RemoveAllChildViews(true);
- vertical_layout_label_hours_left_ = NULL;
- vertical_layout_label_hours_right_ = NULL;
- vertical_layout_label_minutes_left_ = NULL;
- vertical_layout_label_minutes_right_ = NULL;
- vertical_layout_label_seconds_left_ = NULL;
- vertical_layout_label_seconds_right_ = NULL;
-
- // Create label used for horizontal layout.
- horizontal_layout_label_ = CreateAndSetupLabel();
-
- // Construct layout.
- SetLayoutManager(
- new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0));
- AddChildView(horizontal_layout_label_);
-
- } else if (!horizontal_layout && horizontal_layout_label_) {
- // Remove label used for horizontal layout.
- RemoveAllChildViews(true);
- horizontal_layout_label_ = NULL;
-
- // Create labels used for vertical layout.
- vertical_layout_label_hours_left_ = CreateAndSetupLabel();
- vertical_layout_label_hours_right_ = CreateAndSetupLabel();
- vertical_layout_label_minutes_left_ = CreateAndSetupLabel();
- vertical_layout_label_minutes_right_ = CreateAndSetupLabel();
- vertical_layout_label_seconds_left_ = CreateAndSetupLabel();
- vertical_layout_label_seconds_right_ = CreateAndSetupLabel();
-
- // Construct layout.
- views::GridLayout* layout = new views::GridLayout(this);
- SetLayoutManager(layout);
- views::ColumnSet* columns = layout->AddColumnSet(0);
- columns->AddPaddingColumn(0, 6);
- columns->AddColumn(views::GridLayout::CENTER, views::GridLayout::CENTER,
- 0, views::GridLayout::USE_PREF, 0, 0);
- columns->AddColumn(views::GridLayout::CENTER, views::GridLayout::CENTER,
- 0, views::GridLayout::USE_PREF, 0, 0);
- layout->AddPaddingRow(0, kTrayLabelItemVerticalPaddingVerticalAlignment);
- layout->StartRow(0, 0);
- layout->AddView(vertical_layout_label_hours_left_);
- layout->AddView(vertical_layout_label_hours_right_);
- layout->StartRow(0, 0);
- layout->AddView(vertical_layout_label_minutes_left_);
- layout->AddView(vertical_layout_label_minutes_right_);
- layout->StartRow(0, 0);
- layout->AddView(vertical_layout_label_seconds_left_);
- layout->AddView(vertical_layout_label_seconds_right_);
- layout->AddPaddingRow(0, kTrayLabelItemVerticalPaddingVerticalAlignment);
- }
- Update();
-}
-
-void RemainingSessionTimeTrayView::Update() {
- const TraySessionLengthLimit::LimitState limit_state =
- owner_->GetLimitState();
-
- if (limit_state == TraySessionLengthLimit::LIMIT_NONE) {
- SetVisible(false);
- return;
- }
-
- int seconds = owner_->GetRemainingSessionTime().InSeconds();
- // If the remaining session time is 100 hours or more, show 99:59:59 instead.
- seconds = std::min(seconds, 100 * 60 * 60 - 1); // 100 hours - 1 second.
- int minutes = seconds / 60;
- seconds %= 60;
- const int hours = minutes / 60;
- minutes %= 60;
-
- const base::string16 hours_str = IntToTwoDigitString(hours);
- const base::string16 minutes_str = IntToTwoDigitString(minutes);
- const base::string16 seconds_str = IntToTwoDigitString(seconds);
- const SkColor color =
- limit_state == TraySessionLengthLimit::LIMIT_EXPIRING_SOON ?
- kRemainingTimeExpiringSoonColor : kRemainingTimeColor;
-
- if (horizontal_layout_label_) {
- horizontal_layout_label_->SetText(l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_REMAINING_SESSION_TIME,
- hours_str, minutes_str, seconds_str));
- horizontal_layout_label_->SetEnabledColor(color);
- } else if (vertical_layout_label_hours_left_) {
- vertical_layout_label_hours_left_->SetText(hours_str.substr(0, 1));
- vertical_layout_label_hours_right_->SetText(hours_str.substr(1, 1));
- vertical_layout_label_minutes_left_->SetText(minutes_str.substr(0, 1));
- vertical_layout_label_minutes_right_->SetText(minutes_str.substr(1, 1));
- vertical_layout_label_seconds_left_->SetText(seconds_str.substr(0, 1));
- vertical_layout_label_seconds_right_->SetText(seconds_str.substr(1, 1));
- vertical_layout_label_hours_left_->SetEnabledColor(color);
- vertical_layout_label_hours_right_->SetEnabledColor(color);
- vertical_layout_label_minutes_left_->SetEnabledColor(color);
- vertical_layout_label_minutes_right_->SetEnabledColor(color);
- vertical_layout_label_seconds_left_->SetEnabledColor(color);
- vertical_layout_label_seconds_right_->SetEnabledColor(color);
- }
-
- Layout();
- SetVisible(true);
-}
-
-void RemainingSessionTimeTrayView::SetBorder(ShelfAlignment shelf_alignment) {
- if (shelf_alignment == SHELF_ALIGNMENT_BOTTOM ||
- shelf_alignment == SHELF_ALIGNMENT_TOP) {
- set_border(views::Border::CreateEmptyBorder(
- 0, kTrayLabelItemHorizontalPaddingBottomAlignment,
- 0, kTrayLabelItemHorizontalPaddingBottomAlignment));
- } else {
- set_border(NULL);
- }
-}
-
-} // namespace tray
-
-// static
-const char TraySessionLengthLimit::kNotificationId[] =
- "chrome://session/timeout";
-
-TraySessionLengthLimit::TraySessionLengthLimit(SystemTray* system_tray)
- : SystemTrayItem(system_tray),
- tray_view_(NULL),
- limit_state_(LIMIT_NONE) {
- Shell::GetInstance()->system_tray_notifier()->
- AddSessionLengthLimitObserver(this);
- Update();
-}
-
-TraySessionLengthLimit::~TraySessionLengthLimit() {
- Shell::GetInstance()->system_tray_notifier()->
- RemoveSessionLengthLimitObserver(this);
-}
-
-views::View* TraySessionLengthLimit::CreateTrayView(user::LoginStatus status) {
- CHECK(tray_view_ == NULL);
- tray_view_ = new tray::RemainingSessionTimeTrayView(
- this, system_tray()->shelf_alignment());
- return tray_view_;
-}
-
-void TraySessionLengthLimit::DestroyTrayView() {
- tray_view_ = NULL;
-}
-
-void TraySessionLengthLimit::UpdateAfterShelfAlignmentChange(
- ShelfAlignment alignment) {
- if (tray_view_)
- tray_view_->UpdateClockLayout(alignment);
-}
-
-void TraySessionLengthLimit::OnSessionStartTimeChanged() {
- Update();
-}
-
-void TraySessionLengthLimit::OnSessionLengthLimitChanged() {
- Update();
-}
-
-TraySessionLengthLimit::LimitState
- TraySessionLengthLimit::GetLimitState() const {
- return limit_state_;
-}
-
-base::TimeDelta TraySessionLengthLimit::GetRemainingSessionTime() const {
- return remaining_session_time_;
-}
-
-void TraySessionLengthLimit::Update() {
- SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate();
- const LimitState previous_limit_state = limit_state_;
- if (!delegate->GetSessionStartTime(&session_start_time_) ||
- !delegate->GetSessionLengthLimit(&limit_)) {
- remaining_session_time_ = base::TimeDelta();
- limit_state_ = LIMIT_NONE;
- timer_.reset();
- } else {
- remaining_session_time_ = std::max(
- limit_ - (base::TimeTicks::Now() - session_start_time_),
- base::TimeDelta());
- limit_state_ = remaining_session_time_.InSeconds() <=
- kExpiringSoonThresholdInSeconds ? LIMIT_EXPIRING_SOON : LIMIT_SET;
- if (!timer_)
- timer_.reset(new base::RepeatingTimer<TraySessionLengthLimit>);
- if (!timer_->IsRunning()) {
- // Start a timer that will update the remaining session time every second.
- timer_->Start(FROM_HERE,
- base::TimeDelta::FromSeconds(1),
- this,
- &TraySessionLengthLimit::Update);
- }
- }
-
- switch (limit_state_) {
- case LIMIT_NONE:
- message_center::MessageCenter::Get()->RemoveNotification(
- kNotificationId, false /* by_user */);
- break;
- case LIMIT_SET:
- CreateOrUpdateNotification(
- kNotificationId,
- remaining_session_time_,
- previous_limit_state == LIMIT_NONE);
- break;
- case LIMIT_EXPIRING_SOON:
- CreateOrUpdateNotification(
- kNotificationId,
- remaining_session_time_,
- previous_limit_state == LIMIT_NONE ||
- previous_limit_state == LIMIT_SET);
- break;
- }
-
- // Update the tray view last so that it can check whether the notification
- // view is currently visible or not.
- if (tray_view_)
- tray_view_->Update();
-}
-
-bool TraySessionLengthLimit::IsTrayViewVisibleForTest() {
- return tray_view_ && tray_view_->visible();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/session_length_limit/tray_session_length_limit.h b/chromium/ash/system/session_length_limit/tray_session_length_limit.h
deleted file mode 100644
index 6fcd76ef45a..00000000000
--- a/chromium/ash/system/session_length_limit/tray_session_length_limit.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_SESSION_LENGTH_LIMIT_TRAY_SESSION_LENGTH_LIMIT_H_
-#define ASH_SYSTEM_SESSION_LENGTH_LIMIT_TRAY_SESSION_LENGTH_LIMIT_H_
-
-#include "ash/system/session_length_limit/session_length_limit_observer.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/time/time.h"
-#include "base/timer/timer.h"
-
-namespace ash {
-
-namespace test {
-class TraySessionLengthLimitTest;
-}
-
-namespace internal {
-
-namespace tray {
-class RemainingSessionTimeTrayView;
-}
-
-// Adds a countdown timer to the system tray if the session length is limited.
-class ASH_EXPORT TraySessionLengthLimit : public SystemTrayItem,
- public SessionLengthLimitObserver {
- public:
- enum LimitState {
- LIMIT_NONE,
- LIMIT_SET,
- LIMIT_EXPIRING_SOON
- };
-
- explicit TraySessionLengthLimit(SystemTray* system_tray);
- virtual ~TraySessionLengthLimit();
-
- // SystemTrayItem:
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyTrayView() OVERRIDE;
- virtual void UpdateAfterShelfAlignmentChange(
- ShelfAlignment alignment) OVERRIDE;
-
- // SessionLengthLimitObserver:
- virtual void OnSessionStartTimeChanged() OVERRIDE;
- virtual void OnSessionLengthLimitChanged() OVERRIDE;
-
- LimitState GetLimitState() const;
- base::TimeDelta GetRemainingSessionTime() const;
-
- private:
- friend class test::TraySessionLengthLimitTest;
-
- static const char kNotificationId[];
-
- void Update();
-
- bool IsTrayViewVisibleForTest();
-
- tray::RemainingSessionTimeTrayView* tray_view_;
-
- LimitState limit_state_;
- base::TimeTicks session_start_time_;
- base::TimeDelta limit_;
- base::TimeDelta remaining_session_time_;
- scoped_ptr<base::RepeatingTimer<TraySessionLengthLimit> > timer_;
-
- DISALLOW_COPY_AND_ASSIGN(TraySessionLengthLimit);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_SESSION_LENGTH_LIMIT_TRAY_SESSION_LENGTH_LIMIT_H_
diff --git a/chromium/ash/system/session_length_limit/tray_session_length_limit_unittest.cc b/chromium/ash/system/session_length_limit/tray_session_length_limit_unittest.cc
deleted file mode 100644
index 2b05de9c381..00000000000
--- a/chromium/ash/system/session_length_limit/tray_session_length_limit_unittest.cc
+++ /dev/null
@@ -1,195 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/session_length_limit/tray_session_length_limit.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/test_system_tray_delegate.h"
-#include "base/time/time.h"
-#include "ui/message_center/message_center.h"
-#include "ui/message_center/notification.h"
-#include "ui/message_center/notification_types.h"
-
-namespace ash {
-namespace test {
-
-class TraySessionLengthLimitTest : public AshTestBase {
- public:
- TraySessionLengthLimitTest() {}
- virtual ~TraySessionLengthLimitTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- SystemTray* system_tray =
- Shell::GetPrimaryRootWindowController()->GetSystemTray();
- tray_session_length_limit_ = new internal::TraySessionLengthLimit(
- system_tray);
- system_tray->AddTrayItem(tray_session_length_limit_);
- }
-
- virtual void TearDown() OVERRIDE {
- AshTestBase::TearDown();
- }
-
- protected:
- void UpdateSessionLengthLimitInMin(int mins) {
- GetSystemTrayDelegate()->SetSessionLengthLimitForTest(
- base::TimeDelta::FromMinutes(mins));
- tray_session_length_limit_->OnSessionLengthLimitChanged();
- }
-
- message_center::Notification* GetNotification() {
- const message_center::NotificationList::Notifications& notifications =
- message_center::MessageCenter::Get()->GetVisibleNotifications();
- for (message_center::NotificationList::Notifications::const_iterator iter =
- notifications.begin(); iter != notifications.end(); ++iter) {
- if ((*iter)->id() == internal::TraySessionLengthLimit::kNotificationId)
- return *iter;
- }
- return NULL;
- }
-
- void ClearSessionLengthLimit() {
- GetSystemTrayDelegate()->ClearSessionLengthLimit();
- tray_session_length_limit_->OnSessionLengthLimitChanged();
- }
-
- void RemoveNotification() {
- message_center::MessageCenter::Get()->RemoveNotification(
- internal::TraySessionLengthLimit::kNotificationId, true /* by_user */);
- }
-
- internal::TraySessionLengthLimit* tray_session_length_limit() {
- return tray_session_length_limit_;
- }
-
- bool IsTrayViewVisible() {
- return tray_session_length_limit_->IsTrayViewVisibleForTest();
- }
-
- private:
- // Weak reference, owned by the SystemTray.
- internal::TraySessionLengthLimit* tray_session_length_limit_;
-
- DISALLOW_COPY_AND_ASSIGN(TraySessionLengthLimitTest);
-};
-
-TEST_F(TraySessionLengthLimitTest, TrayView) {
- // No session limit.
- EXPECT_FALSE(IsTrayViewVisible());
-
- // Limit is 15 min.
- UpdateSessionLengthLimitInMin(15);
- EXPECT_EQ(internal::TraySessionLengthLimit::LIMIT_SET,
- tray_session_length_limit()->GetLimitState());
- EXPECT_TRUE(IsTrayViewVisible());
-
- // Limit is 3 min.
- UpdateSessionLengthLimitInMin(3);
- EXPECT_EQ(internal::TraySessionLengthLimit::LIMIT_EXPIRING_SOON,
- tray_session_length_limit()->GetLimitState());
- EXPECT_TRUE(IsTrayViewVisible());
-
- // Nothing left.
- UpdateSessionLengthLimitInMin(0);
- EXPECT_EQ(internal::TraySessionLengthLimit::LIMIT_EXPIRING_SOON,
- tray_session_length_limit()->GetLimitState());
- EXPECT_TRUE(IsTrayViewVisible());
-
- // Checks the behavior in case the limit goes negative.
- UpdateSessionLengthLimitInMin(-5);
- EXPECT_EQ(internal::TraySessionLengthLimit::LIMIT_EXPIRING_SOON,
- tray_session_length_limit()->GetLimitState());
- EXPECT_TRUE(IsTrayViewVisible());
-
- // Clears the session length limit, the TrayView should get invisible.
- ClearSessionLengthLimit();
- ASSERT_EQ(internal::TraySessionLengthLimit::LIMIT_NONE,
- tray_session_length_limit()->GetLimitState());
- EXPECT_FALSE(IsTrayViewVisible());
-}
-
-TEST_F(TraySessionLengthLimitTest, Notification) {
- // No notifications when no session limit.
- EXPECT_FALSE(GetNotification());
-
- // Limit is 15 min.
- UpdateSessionLengthLimitInMin(15);
- message_center::Notification* notification = GetNotification();
- EXPECT_TRUE(notification);
- EXPECT_EQ(message_center::SYSTEM_PRIORITY, notification->priority());
- base::string16 first_content = notification->title();
- // Should read the content.
- EXPECT_TRUE(notification->rich_notification_data().
- should_make_spoken_feedback_for_popup_updates);
-
- // Limit is 10 min.
- UpdateSessionLengthLimitInMin(10);
- notification = GetNotification();
- EXPECT_TRUE(notification);
- EXPECT_EQ(message_center::SYSTEM_PRIORITY, notification->priority());
- // The content should be updated.
- EXPECT_NE(first_content, notification->title());
- // Should NOT read, because just update the remaining time.
- EXPECT_FALSE(notification->rich_notification_data().
- should_make_spoken_feedback_for_popup_updates);
-
- // Limit is 3 min.
- UpdateSessionLengthLimitInMin(3);
- notification = GetNotification();
- EXPECT_TRUE(notification);
- EXPECT_EQ(message_center::SYSTEM_PRIORITY, notification->priority());
- // Should read the content again because the state has changed.
- EXPECT_TRUE(notification->rich_notification_data().
- should_make_spoken_feedback_for_popup_updates);
-
- // Session length limit is updated to longer. This should not read the
- // notification content again.
- UpdateSessionLengthLimitInMin(15);
- notification = GetNotification();
- EXPECT_TRUE(notification);
- EXPECT_EQ(message_center::SYSTEM_PRIORITY, notification->priority());
- // Should not read again because the state has changed to longer.
- EXPECT_FALSE(notification->rich_notification_data().
- should_make_spoken_feedback_for_popup_updates);
-
- // Clears the limit: the notification should be gone.
- ClearSessionLengthLimit();
- EXPECT_FALSE(GetNotification());
-}
-
-TEST_F(TraySessionLengthLimitTest, RemoveNotification) {
- // Limit is 15 min.
- UpdateSessionLengthLimitInMin(15);
- EXPECT_TRUE(GetNotification());
-
- // Limit is 14 min.
- UpdateSessionLengthLimitInMin(14);
- EXPECT_TRUE(GetNotification());
-
- // Removes the notification.
- RemoveNotification();
- EXPECT_FALSE(GetNotification());
-
- // Limit is 13 min. The notification should not re-appear.
- UpdateSessionLengthLimitInMin(13);
- EXPECT_FALSE(GetNotification());
-
- // Limit is 3 min. The notification should re-appear because of state change.
- UpdateSessionLengthLimitInMin(3);
- EXPECT_TRUE(GetNotification());
-
- RemoveNotification();
-
- // Session length limit is updated to longer state. This should not re-appear
- // the notification.
- UpdateSessionLengthLimitInMin(15);
- EXPECT_FALSE(GetNotification());
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/system/status_area_widget.cc b/chromium/ash/system/status_area_widget.cc
deleted file mode 100644
index 19649b1731d..00000000000
--- a/chromium/ash/system/status_area_widget.cc
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/status_area_widget.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/bluetooth/bluetooth_observer.h"
-#include "ash/system/logout_button/logout_button_tray.h"
-#include "ash/system/status_area_widget_delegate.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/web_notification/web_notification_tray.h"
-#include "ash/wm/window_properties.h"
-#include "base/i18n/time_formatting.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-
-namespace internal {
-
-const char StatusAreaWidget::kNativeViewName[] = "StatusAreaWidget";
-
-StatusAreaWidget::StatusAreaWidget(aura::Window* status_container)
- : status_area_widget_delegate_(new internal::StatusAreaWidgetDelegate),
- system_tray_(NULL),
- web_notification_tray_(NULL),
- logout_button_tray_(NULL),
- login_status_(user::LOGGED_IN_NONE) {
- views::Widget::InitParams params(
- views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- params.delegate = status_area_widget_delegate_;
- params.parent = status_container;
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- Init(params);
- set_focus_on_creation(false);
- SetContentsView(status_area_widget_delegate_);
- GetNativeView()->SetName(kNativeViewName);
-}
-
-StatusAreaWidget::~StatusAreaWidget() {
-}
-
-void StatusAreaWidget::CreateTrayViews() {
- AddSystemTray();
- AddWebNotificationTray();
- AddLogoutButtonTray();
- SystemTrayDelegate* delegate =
- ash::Shell::GetInstance()->system_tray_delegate();
- DCHECK(delegate);
- // Initialize after all trays have been created.
- if (system_tray_)
- system_tray_->InitializeTrayItems(delegate);
- if (web_notification_tray_)
- web_notification_tray_->Initialize();
- if (logout_button_tray_)
- logout_button_tray_->Initialize();
- UpdateAfterLoginStatusChange(delegate->GetUserLoginStatus());
-}
-
-void StatusAreaWidget::Shutdown() {
- // Destroy the trays early, causing them to be removed from the view
- // hierarchy. Do not used scoped pointers since we don't want to destroy them
- // in the destructor if Shutdown() is not called (e.g. in tests).
- delete logout_button_tray_;
- logout_button_tray_ = NULL;
- delete web_notification_tray_;
- web_notification_tray_ = NULL;
- delete system_tray_;
- system_tray_ = NULL;
-}
-
-bool StatusAreaWidget::ShouldShowLauncher() const {
- if ((system_tray_ && system_tray_->ShouldShowLauncher()) ||
- (web_notification_tray_ &&
- web_notification_tray_->ShouldBlockLauncherAutoHide()))
- return true;
-
- if (!RootWindowController::ForLauncher(GetNativeView())->shelf()->IsVisible())
- return false;
-
- // If the launcher is currently visible, don't hide the launcher if the mouse
- // is in any of the notification bubbles.
- return (system_tray_ && system_tray_->IsMouseInNotificationBubble()) ||
- (web_notification_tray_ &&
- web_notification_tray_->IsMouseInNotificationBubble());
-}
-
-bool StatusAreaWidget::IsMessageBubbleShown() const {
- return ((system_tray_ && system_tray_->IsAnyBubbleVisible()) ||
- (web_notification_tray_ &&
- web_notification_tray_->IsMessageCenterBubbleVisible()));
-}
-
-void StatusAreaWidget::OnNativeWidgetActivationChanged(bool active) {
- Widget::OnNativeWidgetActivationChanged(active);
- if (active)
- status_area_widget_delegate_->SetPaneFocusAndFocusDefault();
-}
-
-void StatusAreaWidget::AddSystemTray() {
- system_tray_ = new SystemTray(this);
- status_area_widget_delegate_->AddTray(system_tray_);
-}
-
-void StatusAreaWidget::AddWebNotificationTray() {
- web_notification_tray_ = new WebNotificationTray(this);
- status_area_widget_delegate_->AddTray(web_notification_tray_);
-}
-
-void StatusAreaWidget::AddLogoutButtonTray() {
- logout_button_tray_ = new LogoutButtonTray(this);
- status_area_widget_delegate_->AddTray(logout_button_tray_);
-}
-
-void StatusAreaWidget::SetShelfAlignment(ShelfAlignment alignment) {
- status_area_widget_delegate_->set_alignment(alignment);
- if (system_tray_)
- system_tray_->SetShelfAlignment(alignment);
- if (web_notification_tray_)
- web_notification_tray_->SetShelfAlignment(alignment);
- if (logout_button_tray_)
- logout_button_tray_->SetShelfAlignment(alignment);
- status_area_widget_delegate_->UpdateLayout();
-}
-
-void StatusAreaWidget::SetHideSystemNotifications(bool hide) {
- if (system_tray_)
- system_tray_->SetHideNotifications(hide);
-}
-
-void StatusAreaWidget::UpdateAfterLoginStatusChange(
- user::LoginStatus login_status) {
- if (login_status_ == login_status)
- return;
- login_status_ = login_status;
- if (system_tray_)
- system_tray_->UpdateAfterLoginStatusChange(login_status);
- if (web_notification_tray_)
- web_notification_tray_->UpdateAfterLoginStatusChange(login_status);
- if (logout_button_tray_)
- logout_button_tray_->UpdateAfterLoginStatusChange(login_status);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/status_area_widget.h b/chromium/ash/system/status_area_widget.h
deleted file mode 100644
index 731eed1c130..00000000000
--- a/chromium/ash/system/status_area_widget.h
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_STATUS_AREA_WIDGET_H_
-#define ASH_SYSTEM_STATUS_AREA_WIDGET_H_
-
-#include "ash/ash_export.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/system/user/login_status.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-
-class ShellDelegate;
-class SystemTray;
-class WebNotificationTray;
-
-namespace internal {
-
-class LogoutButtonTray;
-class StatusAreaWidgetDelegate;
-
-class ASH_EXPORT StatusAreaWidget : public views::Widget {
- public:
- static const char kNativeViewName[];
-
- explicit StatusAreaWidget(aura::Window* status_container);
- virtual ~StatusAreaWidget();
-
- // Creates the SystemTray, WebNotificationTray and LogoutButtonTray.
- void CreateTrayViews();
-
- // Destroys the system tray and web notification tray. Called before
- // tearing down the windows to avoid shutdown ordering issues.
- void Shutdown();
-
- // Update the alignment of the widget and tray views.
- void SetShelfAlignment(ShelfAlignment alignment);
-
- // Set the visibility of system notifications.
- void SetHideSystemNotifications(bool hide);
-
- // Called by the client when the login status changes. Caches login_status
- // and calls UpdateAfterLoginStatusChange for the system tray and the web
- // notification tray.
- void UpdateAfterLoginStatusChange(user::LoginStatus login_status);
-
- internal::StatusAreaWidgetDelegate* status_area_widget_delegate() {
- return status_area_widget_delegate_;
- }
- SystemTray* system_tray() { return system_tray_; }
- WebNotificationTray* web_notification_tray() {
- return web_notification_tray_;
- }
-
- user::LoginStatus login_status() const { return login_status_; }
-
- // Returns true if the launcher should be visible. This is used when the
- // launcher is configured to auto-hide and test if the shelf should force
- // the launcher to remain visible.
- bool ShouldShowLauncher() const;
-
- // True if any message bubble is shown.
- bool IsMessageBubbleShown() const;
-
- // Overridden from views::Widget:
- virtual void OnNativeWidgetActivationChanged(bool active) OVERRIDE;
-
- private:
- void AddSystemTray();
- void AddWebNotificationTray();
- void AddLogoutButtonTray();
-
- // Weak pointers to View classes that are parented to StatusAreaWidget:
- internal::StatusAreaWidgetDelegate* status_area_widget_delegate_;
- SystemTray* system_tray_;
- WebNotificationTray* web_notification_tray_;
- LogoutButtonTray* logout_button_tray_;
- user::LoginStatus login_status_;
-
- DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_STATUS_AREA_WIDGET_H_
diff --git a/chromium/ash/system/status_area_widget_delegate.cc b/chromium/ash/system/status_area_widget_delegate.cc
deleted file mode 100644
index c1c62f39084..00000000000
--- a/chromium/ash/system/status_area_widget_delegate.cc
+++ /dev/null
@@ -1,158 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/status_area_widget_delegate.h"
-
-#include "ash/ash_export.h"
-#include "ash/ash_switches.h"
-#include "ash/focus_cycler.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/tray/tray_constants.h"
-#include "base/strings/utf_string_conversions.h"
-#include "ui/aura/root_window.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/image/image.h"
-#include "ui/views/accessible_pane_view.h"
-#include "ui/views/layout/grid_layout.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-namespace {
-
-const int kStatusTrayOffsetFromScreenEdge = 4;
-
-}
-
-StatusAreaWidgetDelegate::StatusAreaWidgetDelegate()
- : focus_cycler_for_testing_(NULL),
- alignment_(SHELF_ALIGNMENT_BOTTOM) {
- // Allow the launcher to surrender the focus to another window upon
- // navigation completion by the user.
- set_allow_deactivate_on_esc(true);
-}
-
-StatusAreaWidgetDelegate::~StatusAreaWidgetDelegate() {
-}
-
-void StatusAreaWidgetDelegate::SetFocusCyclerForTesting(
- const FocusCycler* focus_cycler) {
- focus_cycler_for_testing_ = focus_cycler;
-}
-
-views::View* StatusAreaWidgetDelegate::GetDefaultFocusableChild() {
- return child_at(0);
-}
-
-views::Widget* StatusAreaWidgetDelegate::GetWidget() {
- return View::GetWidget();
-}
-
-const views::Widget* StatusAreaWidgetDelegate::GetWidget() const {
- return View::GetWidget();
-}
-
-void StatusAreaWidgetDelegate::OnGestureEvent(ui::GestureEvent* event) {
- if (gesture_handler_.ProcessGestureEvent(*event))
- event->StopPropagation();
- else
- views::AccessiblePaneView::OnGestureEvent(event);
-}
-
-bool StatusAreaWidgetDelegate::CanActivate() const {
- // We don't want mouse clicks to activate us, but we need to allow
- // activation when the user is using the keyboard (FocusCycler).
- const FocusCycler* focus_cycler = focus_cycler_for_testing_ ?
- focus_cycler_for_testing_ : Shell::GetInstance()->focus_cycler();
- return focus_cycler->widget_activating() == GetWidget();
-}
-
-void StatusAreaWidgetDelegate::DeleteDelegate() {
-}
-
-void StatusAreaWidgetDelegate::AddTray(views::View* tray) {
- SetLayoutManager(NULL); // Reset layout manager before adding a child.
- AddChildView(tray);
- // Set the layout manager with the new list of children.
- UpdateLayout();
-}
-
-void StatusAreaWidgetDelegate::UpdateLayout() {
- // Use a grid layout so that the trays can be centered in each cell, and
- // so that the widget gets laid out correctly when tray sizes change.
- views::GridLayout* layout = new views::GridLayout(this);
- SetLayoutManager(layout);
-
- views::ColumnSet* columns = layout->AddColumnSet(0);
- if (alignment_ == SHELF_ALIGNMENT_BOTTOM ||
- alignment_ == SHELF_ALIGNMENT_TOP) {
- // Alternate shelf layout insets are all handled by tray_background_view.
- if (!ash::switches::UseAlternateShelfLayout()) {
- if (alignment_ == SHELF_ALIGNMENT_TOP)
- layout->SetInsets(kStatusTrayOffsetFromScreenEdge, 0, 0, 0);
- else
- layout->SetInsets(0, 0, kStatusTrayOffsetFromScreenEdge, 0);
- }
- bool is_first_visible_child = true;
- for (int c = 0; c < child_count(); ++c) {
- views::View* child = child_at(c);
- if (!child->visible())
- continue;
- if (!is_first_visible_child)
- columns->AddPaddingColumn(0, GetTraySpacing());
- is_first_visible_child = false;
- columns->AddColumn(views::GridLayout::CENTER, views::GridLayout::FILL,
- 0, /* resize percent */
- views::GridLayout::USE_PREF, 0, 0);
- }
- layout->StartRow(0, 0);
- for (int c = child_count() - 1; c >= 0; --c) {
- views::View* child = child_at(c);
- if (child->visible())
- layout->AddView(child);
- }
- } else {
- if (!ash::switches::UseAlternateShelfLayout()) {
- if (alignment_ == SHELF_ALIGNMENT_LEFT)
- layout->SetInsets(0, kStatusTrayOffsetFromScreenEdge, 0, 0);
- else
- layout->SetInsets(0, 0, 0, kStatusTrayOffsetFromScreenEdge);
- }
- columns->AddColumn(views::GridLayout::FILL, views::GridLayout::CENTER,
- 0, /* resize percent */
- views::GridLayout::USE_PREF, 0, 0);
- bool is_first_visible_child = true;
- for (int c = child_count() - 1; c >= 0; --c) {
- views::View* child = child_at(c);
- if (!child->visible())
- continue;
- if (!is_first_visible_child)
- layout->AddPaddingRow(0, GetTraySpacing());
- is_first_visible_child = false;
- layout->StartRow(0, 0);
- layout->AddView(child);
- }
- }
- Layout();
- UpdateWidgetSize();
-}
-
-void StatusAreaWidgetDelegate::ChildPreferredSizeChanged(View* child) {
- // Need to resize the window when trays or items are added/removed.
- UpdateWidgetSize();
-}
-
-void StatusAreaWidgetDelegate::ChildVisibilityChanged(View* child) {
- UpdateLayout();
-}
-
-void StatusAreaWidgetDelegate::UpdateWidgetSize() {
- if (GetWidget())
- GetWidget()->SetSize(GetPreferredSize());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/status_area_widget_delegate.h b/chromium/ash/system/status_area_widget_delegate.h
deleted file mode 100644
index 751c31beced..00000000000
--- a/chromium/ash/system/status_area_widget_delegate.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_STATUS_AREA_WIDGET_DELEGATE_H_
-#define ASH_SYSTEM_STATUS_AREA_WIDGET_DELEGATE_H_
-
-#include "ash/ash_export.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/wm/gestures/shelf_gesture_handler.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/views/accessible_pane_view.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-namespace internal {
-
-class FocusCycler;
-
-class ASH_EXPORT StatusAreaWidgetDelegate : public views::AccessiblePaneView,
- public views::WidgetDelegate {
- public:
- StatusAreaWidgetDelegate();
- virtual ~StatusAreaWidgetDelegate();
-
- // Add a tray view to the widget (e.g. system tray, web notifications).
- void AddTray(views::View* tray);
-
- // Called whenever layout might change (e.g. alignment changed).
- void UpdateLayout();
-
- // Sets the focus cycler.
- void SetFocusCyclerForTesting(const FocusCycler* focus_cycler);
-
- void set_alignment(ShelfAlignment alignment) { alignment_ = alignment; }
-
- // Overridden from views::AccessiblePaneView.
- virtual View* GetDefaultFocusableChild() OVERRIDE;
-
- // Overridden from views::View:
- virtual views::Widget* GetWidget() OVERRIDE;
- virtual const views::Widget* GetWidget() const OVERRIDE;
-
- // Overridden from ui::EventHandler:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- // views::WidgetDelegate overrides:
- virtual bool CanActivate() const OVERRIDE;
- virtual void DeleteDelegate() OVERRIDE;
-
- protected:
- // Overridden from views::View:
- virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE;
- virtual void ChildVisibilityChanged(views::View* child) OVERRIDE;
-
- private:
- void UpdateWidgetSize();
-
- const FocusCycler* focus_cycler_for_testing_;
- ShelfAlignment alignment_;
-
- ShelfGestureHandler gesture_handler_;
-
- DISALLOW_COPY_AND_ASSIGN(StatusAreaWidgetDelegate);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_STATUS_AREA_WIDGET_DELEGATE_H_
diff --git a/chromium/ash/system/system_notifier.cc b/chromium/ash/system/system_notifier.cc
deleted file mode 100644
index e4d65d27338..00000000000
--- a/chromium/ash/system/system_notifier.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/system_notifier.h"
-
-#include "base/logging.h"
-
-namespace ash {
-namespace system_notifier {
-
-namespace {
-
-// See http://dev.chromium.org/chromium-os/chromiumos-design-docs/
-// system-notifications for the reasoning.
-const char* kAlwaysShownNotifierIds[] = {
- kNotifierDisplay,
- kNotifierDisplayError,
- kNotifierPower,
- NULL
-};
-
-const char* kAshSystemNotifiers[] = {
- kNotifierDisplay,
- kNotifierDisplayResolutionChange,
- kNotifierDisplayError,
- kNotifierInputMethod,
- kNotifierLocale,
- kNotifierLocallyManagedUser,
- kNotifierMultiProfileFirstRun,
- kNotifierNetwork,
- kNotifierNetworkError,
- kNotifierScreenshot,
- kNotifierScreenCapture,
- kNotifierScreenShare,
- kNotifierSessionLengthTimeout,
- kNotifierPower,
- NULL
-};
-
-bool MatchSystemNotifierId(const message_center::NotifierId& notifier_id,
- const char* id_list[]) {
- if (notifier_id.type != message_center::NotifierId::SYSTEM_COMPONENT)
- return false;
-
- for (size_t i = 0; id_list[i] != NULL; ++i) {
- if (notifier_id.id == id_list[i])
- return true;
- }
- return false;
-}
-
-} // namespace
-
-const char kNotifierDisplay[] = "ash.display";
-const char kNotifierDisplayResolutionChange[] = "ash.display.resolution-change";
-const char kNotifierDisplayError[] = "ash.display.error";
-const char kNotifierInputMethod[] = "ash.input-method";
-const char kNotifierLocale[] = "ash.locale";
-const char kNotifierLocallyManagedUser[] = "ash.locally-managed-user";
-const char kNotifierMultiProfileFirstRun[] = "ash.multi-profile.first-run";
-const char kNotifierNetwork[] = "ash.network";
-const char kNotifierNetworkError[] = "ash.network.error";
-const char kNotifierScreenshot[] = "ash.screenshot";
-const char kNotifierScreenCapture[] = "ash.screen-capture";
-const char kNotifierScreenShare[] = "ash.screen-share";
-const char kNotifierSessionLengthTimeout[] = "ash.session-length-timeout";
-const char kNotifierPower[] = "ash.power";
-
-bool ShouldAlwaysShowPopups(const message_center::NotifierId& notifier_id) {
- return MatchSystemNotifierId(notifier_id, kAlwaysShownNotifierIds);
-}
-
-bool IsAshSystemNotifier(const message_center::NotifierId& notifier_id) {
- return MatchSystemNotifierId(notifier_id, kAshSystemNotifiers);
-}
-
-} // namespace system_notifier
-} // namespace ash
diff --git a/chromium/ash/system/system_notifier.h b/chromium/ash/system/system_notifier.h
deleted file mode 100644
index 53ac77db7d5..00000000000
--- a/chromium/ash/system/system_notifier.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_SYSTEM_NOTIFIER_H_
-#define ASH_SYSTEM_SYSTEM_NOTIFIER_H_
-
-#include <string>
-
-#include "ash/ash_export.h"
-#include "ui/message_center/notifier_settings.h"
-
-namespace ash {
-namespace system_notifier {
-
-// The list of ash system notifier IDs. Alphabetical order.
-ASH_EXPORT extern const char kNotifierDisplay[];
-ASH_EXPORT extern const char kNotifierDisplayResolutionChange[];
-ASH_EXPORT extern const char kNotifierDisplayError[];
-ASH_EXPORT extern const char kNotifierInputMethod[];
-ASH_EXPORT extern const char kNotifierLocale[];
-ASH_EXPORT extern const char kNotifierLocallyManagedUser[];
-ASH_EXPORT extern const char kNotifierMultiProfileFirstRun[];
-ASH_EXPORT extern const char kNotifierNetwork[];
-ASH_EXPORT extern const char kNotifierNetworkError[];
-ASH_EXPORT extern const char kNotifierScreenshot[];
-ASH_EXPORT extern const char kNotifierScreenCapture[];
-ASH_EXPORT extern const char kNotifierScreenShare[];
-ASH_EXPORT extern const char kNotifierSessionLengthTimeout[];
-ASH_EXPORT extern const char kNotifierPower[];
-
-// Returns true if notifications from |notifier_id| should always appear as
-// popups. "Always appear" means the popups should appear even in login screen,
-// lock screen, or fullscreen state.
-ASH_EXPORT bool ShouldAlwaysShowPopups(
- const message_center::NotifierId& notifier_id);
-
-// Returns true if |notifier_id| is the system notifier from Ash.
-ASH_EXPORT bool IsAshSystemNotifier(
- const message_center::NotifierId& notifier_id);
-
-} // namespace system_notifier
-} // namespace ash
-
-#endif // ASH_SYSTEM_SYSTEM_NOTIFIER_H_
diff --git a/chromium/ash/system/tray/actionable_view.cc b/chromium/ash/system/tray/actionable_view.cc
deleted file mode 100644
index 261cefd30a1..00000000000
--- a/chromium/ash/system/tray/actionable_view.cc
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/actionable_view.h"
-
-#include "ash/ash_constants.h"
-#include "ui/base/accessibility/accessible_view_state.h"
-#include "ui/gfx/canvas.h"
-
-namespace ash {
-namespace internal {
-
-// static
-const char ActionableView::kViewClassName[] = "tray/ActionableView";
-
-ActionableView::ActionableView()
- : has_capture_(false) {
- SetFocusable(true);
-}
-
-ActionableView::~ActionableView() {
-}
-
-void ActionableView::OnPaintFocus(gfx::Canvas* canvas) {
- gfx::Rect rect(GetFocusBounds());
- rect.Inset(1, 1, 3, 2);
- canvas->DrawSolidFocusRect(rect, kFocusBorderColor);
-}
-
-gfx::Rect ActionableView::GetFocusBounds() {
- return GetLocalBounds();
-}
-
-const char* ActionableView::GetClassName() const {
- return kViewClassName;
-}
-
-bool ActionableView::OnKeyPressed(const ui::KeyEvent& event) {
- if (event.key_code() == ui::VKEY_SPACE ||
- event.key_code() == ui::VKEY_RETURN) {
- return PerformAction(event);
- }
- return false;
-}
-
-bool ActionableView::OnMousePressed(const ui::MouseEvent& event) {
- // Return true so that this view starts capturing the events.
- has_capture_ = true;
- return true;
-}
-
-void ActionableView::OnMouseReleased(const ui::MouseEvent& event) {
- if (has_capture_ && GetLocalBounds().Contains(event.location()))
- PerformAction(event);
-}
-
-void ActionableView::OnMouseCaptureLost() {
- has_capture_ = false;
-}
-
-void ActionableView::SetAccessibleName(const base::string16& name) {
- accessible_name_ = name;
-}
-
-void ActionableView::GetAccessibleState(ui::AccessibleViewState* state) {
- state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
- state->name = accessible_name_;
-}
-
-void ActionableView::OnPaint(gfx::Canvas* canvas) {
- View::OnPaint(canvas);
- if (HasFocus())
- OnPaintFocus(canvas);
-}
-
-void ActionableView::OnFocus() {
- View::OnFocus();
- // We render differently when focused.
- SchedulePaint();
-}
-
-void ActionableView::OnBlur() {
- View::OnBlur();
- // We render differently when focused.
- SchedulePaint();
-}
-
-void ActionableView::OnGestureEvent(ui::GestureEvent* event) {
- if (event->type() == ui::ET_GESTURE_TAP && PerformAction(*event))
- event->SetHandled();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/actionable_view.h b/chromium/ash/system/tray/actionable_view.h
deleted file mode 100644
index f2b3ec1deba..00000000000
--- a/chromium/ash/system/tray/actionable_view.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_ACTIONABLE_VIEW_H_
-#define ASH_SYSTEM_TRAY_ACTIONABLE_VIEW_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/views/view.h"
-
-namespace ash {
-namespace internal {
-
-// A focusable view that performs an action when user clicks on it, or presses
-// enter or space when focused. Note that the action is triggered on mouse-up,
-// instead of on mouse-down. So if user presses the mouse on the view, then
-// moves the mouse out of the view and then releases, then the action will not
-// be performed.
-// Exported for SystemTray.
-class ASH_EXPORT ActionableView : public views::View {
- public:
- static const char kViewClassName[];
-
- ActionableView();
-
- virtual ~ActionableView();
-
- void SetAccessibleName(const base::string16& name);
- const base::string16& accessible_name() const { return accessible_name_; }
-
- protected:
- void OnPaintFocus(gfx::Canvas* canvas);
-
- // Returns the bounds to paint the focus rectangle in.
- virtual gfx::Rect GetFocusBounds();
-
- // Performs an action when user clicks on the view (on mouse-press event), or
- // presses a key when this view is in focus. Returns true if the event has
- // been handled and an action was performed. Returns false otherwise.
- virtual bool PerformAction(const ui::Event& event) = 0;
-
- // Overridden from views::View.
- virtual const char* GetClassName() const OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
-
- // Overridden from ui::EventHandler.
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- private:
- base::string16 accessible_name_;
- bool has_capture_;
-
- DISALLOW_COPY_AND_ASSIGN(ActionableView);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_ACTIONABLE_VIEW_H_
diff --git a/chromium/ash/system/tray/default_system_tray_delegate.cc b/chromium/ash/system/tray/default_system_tray_delegate.cc
deleted file mode 100644
index 37836f0277f..00000000000
--- a/chromium/ash/system/tray/default_system_tray_delegate.cc
+++ /dev/null
@@ -1,279 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/default_system_tray_delegate.h"
-
-#include <string>
-
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/volume_control_delegate.h"
-#include "base/message_loop/message_loop.h"
-#include "base/time/time.h"
-
-namespace ash {
-
-namespace {
-
-class DefaultVolumnControlDelegate : public VolumeControlDelegate {
- public:
- DefaultVolumnControlDelegate() {}
- virtual ~DefaultVolumnControlDelegate() {}
-
- virtual bool HandleVolumeMute(const ui::Accelerator& accelerator) OVERRIDE {
- return true;
- }
- virtual bool HandleVolumeDown(const ui::Accelerator& accelerator) OVERRIDE {
- return true;
- }
- virtual bool HandleVolumeUp(const ui::Accelerator& accelerator) OVERRIDE {
- return true;
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DefaultVolumnControlDelegate);
-};
-
-} // namespace
-
-DefaultSystemTrayDelegate::DefaultSystemTrayDelegate()
- : bluetooth_enabled_(true),
- volume_control_delegate_(new DefaultVolumnControlDelegate) {
-}
-
-DefaultSystemTrayDelegate::~DefaultSystemTrayDelegate() {
-}
-
-void DefaultSystemTrayDelegate::Initialize() {
-}
-
-void DefaultSystemTrayDelegate::Shutdown() {
-}
-
-bool DefaultSystemTrayDelegate::GetTrayVisibilityOnStartup() {
- return true;
-}
-
-user::LoginStatus DefaultSystemTrayDelegate::GetUserLoginStatus() const {
- return user::LOGGED_IN_USER;
-}
-
-bool DefaultSystemTrayDelegate::IsOobeCompleted() const {
- return true;
-}
-
-void DefaultSystemTrayDelegate::ChangeProfilePicture() {
-}
-
-const std::string DefaultSystemTrayDelegate::GetEnterpriseDomain() const {
- return std::string();
-}
-
-const base::string16 DefaultSystemTrayDelegate::GetEnterpriseMessage() const {
- return string16();
-}
-
-const std::string
-DefaultSystemTrayDelegate::GetLocallyManagedUserManager() const {
- return std::string();
-}
-
-const base::string16
-DefaultSystemTrayDelegate::GetLocallyManagedUserManagerName()
- const {
- return string16();
-}
-
-const base::string16 DefaultSystemTrayDelegate::GetLocallyManagedUserMessage()
- const {
- return string16();
-}
-
-bool DefaultSystemTrayDelegate::SystemShouldUpgrade() const {
- return true;
-}
-
-base::HourClockType DefaultSystemTrayDelegate::GetHourClockType() const {
- return base::k24HourClock;
-}
-
-void DefaultSystemTrayDelegate::ShowSettings() {
-}
-
-bool DefaultSystemTrayDelegate::ShouldShowSettings() {
- return true;
-}
-
-void DefaultSystemTrayDelegate::ShowDateSettings() {
-}
-
-void DefaultSystemTrayDelegate::ShowNetworkSettings(
- const std::string& service_path) {
-}
-
-void DefaultSystemTrayDelegate::ShowBluetoothSettings() {
-}
-
-void DefaultSystemTrayDelegate::ShowDisplaySettings() {
-}
-
-void DefaultSystemTrayDelegate::ShowChromeSlow() {
-}
-
-bool DefaultSystemTrayDelegate::ShouldShowDisplayNotification() {
- return false;
-}
-
-void DefaultSystemTrayDelegate::ShowDriveSettings() {
-}
-
-void DefaultSystemTrayDelegate::ShowIMESettings() {
-}
-
-void DefaultSystemTrayDelegate::ShowHelp() {
-}
-
-void DefaultSystemTrayDelegate::ShowAccessibilityHelp() {
-}
-
-void DefaultSystemTrayDelegate::ShowAccessibilitySettings() {
-}
-
-void DefaultSystemTrayDelegate::ShowPublicAccountInfo() {
-}
-
-void DefaultSystemTrayDelegate::ShowEnterpriseInfo() {
-}
-
-void DefaultSystemTrayDelegate::ShowLocallyManagedUserInfo() {
-}
-
-void DefaultSystemTrayDelegate::ShowUserLogin() {
-}
-
-void DefaultSystemTrayDelegate::ShowSpringChargerReplacementDialog() {
-}
-
-bool DefaultSystemTrayDelegate::HasUserConfirmedSafeSpringCharger() {
- return false;
-}
-
-void DefaultSystemTrayDelegate::ShutDown() {
-}
-
-void DefaultSystemTrayDelegate::SignOut() {
-}
-
-void DefaultSystemTrayDelegate::RequestLockScreen() {
-}
-
-void DefaultSystemTrayDelegate::RequestRestartForUpdate() {
-}
-
-void DefaultSystemTrayDelegate::GetAvailableBluetoothDevices(
- BluetoothDeviceList* list) {
-}
-
-void DefaultSystemTrayDelegate::BluetoothStartDiscovering() {
-}
-
-void DefaultSystemTrayDelegate::BluetoothStopDiscovering() {
-}
-
-void DefaultSystemTrayDelegate::ConnectToBluetoothDevice(
- const std::string& address) {
-}
-
-void DefaultSystemTrayDelegate::GetCurrentIME(IMEInfo* info) {
-}
-
-void DefaultSystemTrayDelegate::GetAvailableIMEList(IMEInfoList* list) {
-}
-
-void DefaultSystemTrayDelegate::GetCurrentIMEProperties(
- IMEPropertyInfoList* list) {
-}
-
-void DefaultSystemTrayDelegate::SwitchIME(const std::string& ime_id) {
-}
-
-void DefaultSystemTrayDelegate::ActivateIMEProperty(const std::string& key) {
-}
-
-void DefaultSystemTrayDelegate::CancelDriveOperation(int32 operation_id) {
-}
-
-void DefaultSystemTrayDelegate::GetDriveOperationStatusList(
- ash::DriveOperationStatusList*) {
-}
-
-void DefaultSystemTrayDelegate::ShowNetworkConfigure(
- const std::string& network_id,
- gfx::NativeWindow parent_window) {
-}
-
-bool DefaultSystemTrayDelegate::EnrollNetwork(const std::string& network_id,
- gfx::NativeWindow parent_window) {
- return true;
-}
-
-void DefaultSystemTrayDelegate::ManageBluetoothDevices() {
-}
-
-void DefaultSystemTrayDelegate::ToggleBluetooth() {
- bluetooth_enabled_ = !bluetooth_enabled_;
-}
-
-bool DefaultSystemTrayDelegate::IsBluetoothDiscovering() {
- return false;
-}
-
-void DefaultSystemTrayDelegate::ShowMobileSimDialog() {
-}
-
-void DefaultSystemTrayDelegate::ShowMobileSetupDialog(
- const std::string& service_path) {
-}
-
-void DefaultSystemTrayDelegate::ShowOtherNetworkDialog(
- const std::string& type) {
-}
-
-bool DefaultSystemTrayDelegate::GetBluetoothAvailable() {
- return true;
-}
-
-bool DefaultSystemTrayDelegate::GetBluetoothEnabled() {
- return bluetooth_enabled_;
-}
-
-void DefaultSystemTrayDelegate::ChangeProxySettings() {
-}
-
-VolumeControlDelegate* DefaultSystemTrayDelegate::GetVolumeControlDelegate()
- const {
- return volume_control_delegate_.get();
-}
-
-void DefaultSystemTrayDelegate::SetVolumeControlDelegate(
- scoped_ptr<VolumeControlDelegate> delegate) {
- volume_control_delegate_ = delegate.Pass();
-}
-
-bool DefaultSystemTrayDelegate::GetSessionStartTime(
- base::TimeTicks* session_start_time) {
- return false;
-}
-
-bool DefaultSystemTrayDelegate::GetSessionLengthLimit(
- base::TimeDelta* session_length_limit) {
- return false;
-}
-
-int DefaultSystemTrayDelegate::GetSystemTrayMenuWidth() {
- // This is the default width for English languages.
- return 300;
-}
-
-} // namespace ash
diff --git a/chromium/ash/system/tray/default_system_tray_delegate.h b/chromium/ash/system/tray/default_system_tray_delegate.h
deleted file mode 100644
index f85b6ca2cd4..00000000000
--- a/chromium/ash/system/tray/default_system_tray_delegate.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_DEFAULT_SYSTEM_TRAY_DELEGATE_H_
-#define ASH_SYSTEM_TRAY_DEFAULT_SYSTEM_TRAY_DELEGATE_H_
-
-#include "ash/ash_export.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-
-namespace ash {
-
-class ASH_EXPORT DefaultSystemTrayDelegate : public SystemTrayDelegate {
- public:
- DefaultSystemTrayDelegate();
- virtual ~DefaultSystemTrayDelegate();
-
- // Overridden from SystemTrayDelegate:
- virtual void Initialize() OVERRIDE;
- virtual void Shutdown() OVERRIDE;
- virtual bool GetTrayVisibilityOnStartup() OVERRIDE;
- virtual user::LoginStatus GetUserLoginStatus() const OVERRIDE;
- virtual bool IsOobeCompleted() const OVERRIDE;
- virtual void ChangeProfilePicture() OVERRIDE;
- virtual const std::string GetEnterpriseDomain() const OVERRIDE;
- virtual const base::string16 GetEnterpriseMessage() const OVERRIDE;
- virtual const std::string GetLocallyManagedUserManager() const OVERRIDE;
- virtual const base::string16 GetLocallyManagedUserManagerName() const
- OVERRIDE;
- virtual const base::string16 GetLocallyManagedUserMessage() const OVERRIDE;
- virtual bool SystemShouldUpgrade() const OVERRIDE;
- virtual base::HourClockType GetHourClockType() const OVERRIDE;
- virtual void ShowSettings() OVERRIDE;
- virtual bool ShouldShowSettings() OVERRIDE;
- virtual void ShowDateSettings() OVERRIDE;
- virtual void ShowNetworkSettings(const std::string& service_path) OVERRIDE;
- virtual void ShowBluetoothSettings() OVERRIDE;
- virtual void ShowDisplaySettings() OVERRIDE;
- virtual void ShowChromeSlow() OVERRIDE;
- virtual bool ShouldShowDisplayNotification() OVERRIDE;
- virtual void ShowDriveSettings() OVERRIDE;
- virtual void ShowIMESettings() OVERRIDE;
- virtual void ShowHelp() OVERRIDE;
- virtual void ShowAccessibilityHelp() OVERRIDE;
- virtual void ShowAccessibilitySettings() OVERRIDE;
- virtual void ShowPublicAccountInfo() OVERRIDE;
- virtual void ShowEnterpriseInfo() OVERRIDE;
- virtual void ShowLocallyManagedUserInfo() OVERRIDE;
- virtual void ShowUserLogin() OVERRIDE;
- virtual void ShowSpringChargerReplacementDialog() OVERRIDE;
- virtual bool HasUserConfirmedSafeSpringCharger() OVERRIDE;
- virtual void ShutDown() OVERRIDE;
- virtual void SignOut() OVERRIDE;
- virtual void RequestLockScreen() OVERRIDE;
- virtual void RequestRestartForUpdate() OVERRIDE;
- virtual void GetAvailableBluetoothDevices(BluetoothDeviceList* list) OVERRIDE;
- virtual void BluetoothStartDiscovering() OVERRIDE;
- virtual void BluetoothStopDiscovering() OVERRIDE;
- virtual void ConnectToBluetoothDevice(const std::string& address) OVERRIDE;
- virtual void GetCurrentIME(IMEInfo* info) OVERRIDE;
- virtual void GetAvailableIMEList(IMEInfoList* list) OVERRIDE;
- virtual void GetCurrentIMEProperties(IMEPropertyInfoList* list) OVERRIDE;
- virtual void SwitchIME(const std::string& ime_id) OVERRIDE;
- virtual void ActivateIMEProperty(const std::string& key) OVERRIDE;
- virtual void CancelDriveOperation(int32 operation_id) OVERRIDE;
- virtual void GetDriveOperationStatusList(
- ash::DriveOperationStatusList*) OVERRIDE;
- virtual void ShowNetworkConfigure(const std::string& network_id,
- gfx::NativeWindow parent_window) OVERRIDE;
- virtual bool EnrollNetwork(const std::string& network_id,
- gfx::NativeWindow parent_window) OVERRIDE;
- virtual void ManageBluetoothDevices() OVERRIDE;
- virtual void ToggleBluetooth() OVERRIDE;
- virtual bool IsBluetoothDiscovering() OVERRIDE;
- virtual void ShowMobileSimDialog() OVERRIDE;
- virtual void ShowMobileSetupDialog(const std::string& service_path) OVERRIDE;
- virtual void ShowOtherNetworkDialog(const std::string& type) OVERRIDE;
- virtual bool GetBluetoothAvailable() OVERRIDE;
- virtual bool GetBluetoothEnabled() OVERRIDE;
- virtual void ChangeProxySettings() OVERRIDE;
- virtual VolumeControlDelegate* GetVolumeControlDelegate() const OVERRIDE;
- virtual void SetVolumeControlDelegate(
- scoped_ptr<VolumeControlDelegate> delegate) OVERRIDE;
- virtual bool GetSessionStartTime(
- base::TimeTicks* session_start_time) OVERRIDE;
- virtual bool GetSessionLengthLimit(
- base::TimeDelta* session_length_limit) OVERRIDE;
- virtual int GetSystemTrayMenuWidth() OVERRIDE;
-
- private:
- bool bluetooth_enabled_;
- scoped_ptr<VolumeControlDelegate> volume_control_delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(DefaultSystemTrayDelegate);
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_DEFAULT_SYSTEM_TRAY_DELEGATE_H_
diff --git a/chromium/ash/system/tray/fixed_sized_image_view.cc b/chromium/ash/system/tray/fixed_sized_image_view.cc
deleted file mode 100644
index d0d49b92f21..00000000000
--- a/chromium/ash/system/tray/fixed_sized_image_view.cc
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/fixed_sized_image_view.h"
-
-namespace ash {
-namespace internal {
-
-FixedSizedImageView::FixedSizedImageView(int width, int height)
- : width_(width),
- height_(height) {
- SetHorizontalAlignment(views::ImageView::CENTER);
- SetVerticalAlignment(views::ImageView::CENTER);
-}
-
-FixedSizedImageView::~FixedSizedImageView() {
-}
-
-gfx::Size FixedSizedImageView::GetPreferredSize() {
- gfx::Size size = views::ImageView::GetPreferredSize();
- return gfx::Size(width_ ? width_ : size.width(),
- height_ ? height_ : size.height());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/fixed_sized_image_view.h b/chromium/ash/system/tray/fixed_sized_image_view.h
deleted file mode 100644
index 1e5c7cda785..00000000000
--- a/chromium/ash/system/tray/fixed_sized_image_view.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_FIXED_SIZED_IMAGE_VIEW_H_
-#define ASH_SYSTEM_TRAY_FIXED_SIZED_IMAGE_VIEW_H_
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/views/controls/image_view.h"
-
-namespace ash {
-namespace internal {
-
-// An image view with a specified width and height (kTrayPopupDetailsIconWidth).
-// If the specified width or height is zero, then the image size is used for
-// that dimension.
-class FixedSizedImageView : public views::ImageView {
- public:
- FixedSizedImageView(int width, int height);
- virtual ~FixedSizedImageView();
-
- private:
- virtual gfx::Size GetPreferredSize() OVERRIDE;
-
- int width_;
- int height_;
-
- DISALLOW_COPY_AND_ASSIGN(FixedSizedImageView);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_FIXED_SIZED_IMAGE_VIEW_H_
diff --git a/chromium/ash/system/tray/fixed_sized_scroll_view.cc b/chromium/ash/system/tray/fixed_sized_scroll_view.cc
deleted file mode 100644
index d3fff9ad1ae..00000000000
--- a/chromium/ash/system/tray/fixed_sized_scroll_view.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/fixed_sized_scroll_view.h"
-
-namespace ash {
-namespace internal {
-
-FixedSizedScrollView::FixedSizedScrollView() {
- set_notify_enter_exit_on_child(true);
-}
-
-FixedSizedScrollView::~FixedSizedScrollView() {
-}
-
-void FixedSizedScrollView::SetContentsView(views::View* view) {
- SetContents(view);
- view->SetBoundsRect(gfx::Rect(view->GetPreferredSize()));
-}
-
-void FixedSizedScrollView::SetFixedSize(const gfx::Size& size) {
- if (fixed_size_ == size)
- return;
- fixed_size_ = size;
- PreferredSizeChanged();
-}
-
-gfx::Size FixedSizedScrollView::GetPreferredSize() {
- gfx::Size size = fixed_size_.IsEmpty() ?
- contents()->GetPreferredSize() : fixed_size_;
- gfx::Insets insets = GetInsets();
- size.Enlarge(insets.width(), insets.height());
- return size;
-}
-
-void FixedSizedScrollView::Layout() {
- gfx::Rect bounds = gfx::Rect(contents()->GetPreferredSize());
- bounds.set_width(std::max(0, width() - GetScrollBarWidth()));
- contents()->SetBoundsRect(bounds);
-
- views::ScrollView::Layout();
- if (!vertical_scroll_bar()->visible()) {
- gfx::Rect bounds = contents()->bounds();
- bounds.set_width(bounds.width() + GetScrollBarWidth());
- contents()->SetBoundsRect(bounds);
- }
-}
-
-void FixedSizedScrollView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
- gfx::Rect bounds = gfx::Rect(contents()->GetPreferredSize());
- bounds.set_width(std::max(0, width() - GetScrollBarWidth()));
- contents()->SetBoundsRect(bounds);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/fixed_sized_scroll_view.h b/chromium/ash/system/tray/fixed_sized_scroll_view.h
deleted file mode 100644
index aff53c217a6..00000000000
--- a/chromium/ash/system/tray/fixed_sized_scroll_view.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_FIXED_SIZED_SCROLL_VIEW_H_
-#define ASH_SYSTEM_TRAY_FIXED_SIZED_SCROLL_VIEW_H_
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/views/controls/scroll_view.h"
-
-namespace ash {
-namespace internal {
-
-// A custom scroll-view that has a specified dimension.
-class FixedSizedScrollView : public views::ScrollView {
- public:
- FixedSizedScrollView();
- virtual ~FixedSizedScrollView();
-
- void SetContentsView(views::View* view);
-
- // Change the fixed size of the view. Invalidates the layout (by calling
- // PreferredSizeChanged()).
- void SetFixedSize(const gfx::Size& size);
-
- void set_fixed_size(const gfx::Size& size) { fixed_size_ = size; }
-
- // Overridden from views::View:
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual void Layout() OVERRIDE;
-
- protected:
- // Overridden from views::View:
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
-
- private:
- gfx::Size fixed_size_;
-
- DISALLOW_COPY_AND_ASSIGN(FixedSizedScrollView);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_FIXED_SIZED_SCROLL_VIEW_H_
diff --git a/chromium/ash/system/tray/hover_highlight_view.cc b/chromium/ash/system/tray/hover_highlight_view.cc
deleted file mode 100644
index 8afa2de4003..00000000000
--- a/chromium/ash/system/tray/hover_highlight_view.cc
+++ /dev/null
@@ -1,188 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/hover_highlight_view.h"
-
-#include "ash/system/tray/fixed_sized_image_view.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/view_click_listener.h"
-#include "grit/ui_resources.h"
-#include "ui/base/accessibility/accessible_view_state.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/canvas.h"
-#include "ui/views/border.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/layout/fill_layout.h"
-
-namespace {
-
-const int kCheckLabelPadding = 4;
-
-} // namespace
-
-namespace ash {
-namespace internal {
-
-HoverHighlightView::HoverHighlightView(ViewClickListener* listener)
- : listener_(listener),
- text_label_(NULL),
- highlight_color_(kHoverBackgroundColor),
- default_color_(0),
- text_highlight_color_(0),
- text_default_color_(0),
- hover_(false),
- expandable_(false),
- checkable_(false),
- checked_(false) {
- set_notify_enter_exit_on_child(true);
-}
-
-HoverHighlightView::~HoverHighlightView() {
-}
-
-void HoverHighlightView::AddIconAndLabel(const gfx::ImageSkia& image,
- const base::string16& text,
- gfx::Font::FontStyle style) {
- SetLayoutManager(new views::BoxLayout(
- views::BoxLayout::kHorizontal, 0, 3, kTrayPopupPaddingBetweenItems));
- views::ImageView* image_view =
- new FixedSizedImageView(kTrayPopupDetailsIconWidth, 0);
- image_view->SetImage(image);
- AddChildView(image_view);
-
- text_label_ = new views::Label(text);
- text_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- text_label_->SetFont(text_label_->font().DeriveFont(0, style));
- if (text_default_color_)
- text_label_->SetEnabledColor(text_default_color_);
- AddChildView(text_label_);
-
- SetAccessibleName(text);
-}
-
-views::Label* HoverHighlightView::AddLabel(const base::string16& text,
- gfx::Font::FontStyle style) {
- SetLayoutManager(new views::FillLayout());
- text_label_ = new views::Label(text);
- int margin = kTrayPopupPaddingHorizontal +
- kTrayPopupDetailsLabelExtraLeftMargin;
- int left_margin = 0;
- int right_margin = 0;
- if (base::i18n::IsRTL())
- right_margin = margin;
- else
- left_margin = margin;
- text_label_->set_border(
- views::Border::CreateEmptyBorder(5, left_margin, 5, right_margin));
- text_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- text_label_->SetFont(text_label_->font().DeriveFont(0, style));
- // Do not set alpha value in disable color. It will have issue with elide
- // blending filter in disabled state for rendering label text color.
- text_label_->SetDisabledColor(SkColorSetARGB(255, 127, 127, 127));
- if (text_default_color_)
- text_label_->SetEnabledColor(text_default_color_);
- AddChildView(text_label_);
-
- SetAccessibleName(text);
- return text_label_;
-}
-
-views::Label* HoverHighlightView::AddCheckableLabel(const base::string16& text,
- gfx::Font::FontStyle style,
- bool checked) {
- checkable_ = true;
- checked_ = checked;
- if (checked) {
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- const gfx::ImageSkia* check =
- rb.GetImageNamed(IDR_MENU_CHECK).ToImageSkia();
- int margin = kTrayPopupPaddingHorizontal +
- kTrayPopupDetailsLabelExtraLeftMargin - kCheckLabelPadding;
- SetLayoutManager(new views::BoxLayout(
- views::BoxLayout::kHorizontal, 0, 3, kCheckLabelPadding));
- views::ImageView* image_view = new FixedSizedImageView(margin, 0);
- image_view->SetImage(check);
- image_view->SetHorizontalAlignment(views::ImageView::TRAILING);
- AddChildView(image_view);
-
- text_label_ = new views::Label(text);
- text_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- text_label_->SetFont(text_label_->font().DeriveFont(0, style));
- text_label_->SetDisabledColor(SkColorSetARGB(127, 0, 0, 0));
- if (text_default_color_)
- text_label_->SetEnabledColor(text_default_color_);
- AddChildView(text_label_);
-
- SetAccessibleName(text);
- return text_label_;
- }
- return AddLabel(text, style);
-}
-
-void HoverHighlightView::SetExpandable(bool expandable) {
- if (expandable != expandable_) {
- expandable_ = expandable;
- InvalidateLayout();
- }
-}
-
-bool HoverHighlightView::PerformAction(const ui::Event& event) {
- if (!listener_)
- return false;
- listener_->OnViewClicked(this);
- return true;
-}
-
-void HoverHighlightView::GetAccessibleState(ui::AccessibleViewState* state) {
- ActionableView::GetAccessibleState(state);
-
- if (checkable_) {
- state->role = ui::AccessibilityTypes::ROLE_CHECKBUTTON;
- state->state = checked_ ? ui::AccessibilityTypes::STATE_CHECKED : 0;
- }
-}
-
-gfx::Size HoverHighlightView::GetPreferredSize() {
- gfx::Size size = ActionableView::GetPreferredSize();
- if (!expandable_ || size.height() < kTrayPopupItemHeight)
- size.set_height(kTrayPopupItemHeight);
- return size;
-}
-
-int HoverHighlightView::GetHeightForWidth(int width) {
- return GetPreferredSize().height();
-}
-
-void HoverHighlightView::OnMouseEntered(const ui::MouseEvent& event) {
- hover_ = true;
- if (text_highlight_color_ && text_label_)
- text_label_->SetEnabledColor(text_highlight_color_);
- SchedulePaint();
-}
-
-void HoverHighlightView::OnMouseExited(const ui::MouseEvent& event) {
- hover_ = false;
- if (text_default_color_ && text_label_)
- text_label_->SetEnabledColor(text_default_color_);
- SchedulePaint();
-}
-
-void HoverHighlightView::OnEnabledChanged() {
- for (int i = 0; i < child_count(); ++i)
- child_at(i)->SetEnabled(enabled());
-}
-
-void HoverHighlightView::OnPaintBackground(gfx::Canvas* canvas) {
- canvas->DrawColor(hover_ ? highlight_color_ : default_color_);
-}
-
-void HoverHighlightView::OnFocus() {
- ScrollRectToVisible(gfx::Rect(gfx::Point(), size()));
- ActionableView::OnFocus();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/hover_highlight_view.h b/chromium/ash/system/tray/hover_highlight_view.h
deleted file mode 100644
index e19c3ef77f1..00000000000
--- a/chromium/ash/system/tray/hover_highlight_view.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_
-#define ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_
-
-#include "ash/system/tray/actionable_view.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/gfx/font.h"
-
-namespace views {
-class Label;
-}
-
-namespace ash {
-namespace internal {
-
-class ViewClickListener;
-
-// A view that changes background color on hover, and triggers a callback in the
-// associated ViewClickListener on click. The view can also be forced to
-// maintain a fixed height.
-class HoverHighlightView : public ActionableView {
- public:
- explicit HoverHighlightView(ViewClickListener* listener);
- virtual ~HoverHighlightView();
-
- // Convenience function for adding an icon and a label. This also sets the
- // accessible name.
- void AddIconAndLabel(const gfx::ImageSkia& image,
- const base::string16& text,
- gfx::Font::FontStyle style);
-
- // Convenience function for adding a label with padding on the left for a
- // blank icon. This also sets the accessible name.
- // Returns label after parenting it.
- views::Label* AddLabel(const base::string16& text,
- gfx::Font::FontStyle style);
-
- // Convenience function for adding an optional check and a label. In the
- // absence of a check, padding is added to align with checked items.
- // Returns label after parenting it.
- views::Label* AddCheckableLabel(const base::string16& text,
- gfx::Font::FontStyle style,
- bool checked);
-
- // Allows view to expand its height.
- // Size of unexapandable view is fixed and equals to kTrayPopupItemHeight.
- void SetExpandable(bool expandable);
-
- void set_highlight_color(SkColor color) { highlight_color_ = color; }
- void set_default_color(SkColor color) { default_color_ = color; }
- void set_text_highlight_color(SkColor c) { text_highlight_color_ = c; }
- void set_text_default_color(SkColor color) { text_default_color_ = color; }
-
- views::Label* text_label() { return text_label_; }
-
- bool hover() const { return hover_; }
-
- private:
- // Overridden from ActionableView:
- virtual bool PerformAction(const ui::Event& event) OVERRIDE;
-
- // Overridden from views::View.
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual int GetHeightForWidth(int width) OVERRIDE;
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnEnabledChanged() OVERRIDE;
- virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
-
- ViewClickListener* listener_;
- views::Label* text_label_;
- SkColor highlight_color_;
- SkColor default_color_;
- SkColor text_highlight_color_;
- SkColor text_default_color_;
- bool hover_;
- bool expandable_;
- bool checkable_;
- bool checked_;
-
- DISALLOW_COPY_AND_ASSIGN(HoverHighlightView);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_
diff --git a/chromium/ash/system/tray/special_popup_row.cc b/chromium/ash/system/tray/special_popup_row.cc
deleted file mode 100644
index fd10f4721bd..00000000000
--- a/chromium/ash/system/tray/special_popup_row.cc
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/special_popup_row.h"
-
-#include "ash/system/tray/hover_highlight_view.h"
-#include "ash/system/tray/throbber_view.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_popup_header_button.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/rect.h"
-#include "ui/views/background.h"
-#include "ui/views/border.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/painter.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-const int kIconPaddingLeft = 5;
-const int kSpecialPopupRowHeight = 55;
-const int kBorderHeight = 1;
-const SkColor kBorderColor = SkColorSetRGB(0xaa, 0xaa, 0xaa);
-
-views::View* CreatePopupHeaderButtonsContainer() {
- views::View* view = new views::View;
- view->SetLayoutManager(new
- views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, -1));
- view->set_border(views::Border::CreateEmptyBorder(0, 0, 0, 5));
- return view;
-}
-
-} // namespace
-
-SpecialPopupRow::SpecialPopupRow()
- : content_(NULL),
- button_container_(NULL) {
- set_background(views::Background::CreateSolidBackground(
- kHeaderBackgroundColor));
- set_border(views::Border::CreateSolidSidedBorder(
- kBorderHeight, 0, 0, 0, kBorderColor));
- SetLayoutManager(
- new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0));
-}
-
-SpecialPopupRow::~SpecialPopupRow() {
-}
-
-void SpecialPopupRow::SetTextLabel(int string_id, ViewClickListener* listener) {
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- HoverHighlightView* container = new HoverHighlightView(listener);
- container->SetLayoutManager(new
- views::BoxLayout(views::BoxLayout::kHorizontal, 0, 3, kIconPaddingLeft));
-
- container->set_highlight_color(SkColorSetARGB(0, 0, 0, 0));
- container->set_default_color(SkColorSetARGB(0, 0, 0, 0));
- container->set_text_highlight_color(kHeaderTextColorHover);
- container->set_text_default_color(kHeaderTextColorNormal);
-
- container->AddIconAndLabel(
- *rb.GetImageNamed(IDR_AURA_UBER_TRAY_LESS).ToImageSkia(),
- rb.GetLocalizedString(string_id),
- gfx::Font::BOLD);
-
- container->set_border(views::Border::CreateEmptyBorder(0,
- kTrayPopupPaddingHorizontal, 0, 0));
-
- container->SetAccessibleName(
- rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_PREVIOUS_MENU));
- SetContent(container);
-}
-
-void SpecialPopupRow::SetContent(views::View* view) {
- CHECK(!content_);
- content_ = view;
- AddChildViewAt(content_, 0);
-}
-
-void SpecialPopupRow::AddButton(TrayPopupHeaderButton* button) {
- if (!button_container_) {
- button_container_ = CreatePopupHeaderButtonsContainer();
- AddChildView(button_container_);
- }
- button_container_->AddChildView(button);
-}
-
-void SpecialPopupRow::AddThrobber(ThrobberView* throbber) {
- if (!button_container_) {
- button_container_ = CreatePopupHeaderButtonsContainer();
- AddChildView(button_container_);
- }
- button_container_->AddChildView(throbber);
-}
-
-gfx::Size SpecialPopupRow::GetPreferredSize() {
- gfx::Size size = views::View::GetPreferredSize();
- size.set_height(kSpecialPopupRowHeight);
- return size;
-}
-
-int SpecialPopupRow::GetHeightForWidth(int width) {
- return kSpecialPopupRowHeight;
-}
-
-void SpecialPopupRow::Layout() {
- views::View::Layout();
- gfx::Rect content_bounds = GetContentsBounds();
- if (content_bounds.IsEmpty())
- return;
- if (!button_container_) {
- content_->SetBoundsRect(GetContentsBounds());
- return;
- }
-
- gfx::Rect bounds(button_container_->GetPreferredSize());
- bounds.set_height(content_bounds.height());
- gfx::Rect container_bounds = content_bounds;
- container_bounds.ClampToCenteredSize(bounds.size());
- container_bounds.set_x(content_bounds.width() - container_bounds.width());
- button_container_->SetBoundsRect(container_bounds);
-
- bounds = content_->bounds();
- bounds.set_width(button_container_->x());
- content_->SetBoundsRect(bounds);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/special_popup_row.h b/chromium/ash/system/tray/special_popup_row.h
deleted file mode 100644
index ee068e4eb8a..00000000000
--- a/chromium/ash/system/tray/special_popup_row.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_SPECIAL_POPUP_ROW_H_
-#define ASH_SYSTEM_TRAY_SPECIAL_POPUP_ROW_H_
-
-#include "ui/gfx/size.h"
-#include "ui/views/view.h"
-
-namespace views {
-class Label;
-}
-
-namespace ash {
-namespace internal {
-
-class ThrobberView;
-class TrayItemView;
-class TrayPopupHeaderButton;
-class ViewClickListener;
-
-// The 'special' looking row in the uber-tray popups. This is usually the bottom
-// row in the popups, and has a fixed height.
-class SpecialPopupRow : public views::View {
- public:
- SpecialPopupRow();
- virtual ~SpecialPopupRow();
-
- void SetTextLabel(int string_id, ViewClickListener* listener);
- void SetContent(views::View* view);
-
- void AddButton(TrayPopupHeaderButton* button);
- void AddThrobber(ThrobberView* throbber);
-
- views::View* content() const { return content_; }
-
- private:
- // Overridden from views::View.
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual int GetHeightForWidth(int width) OVERRIDE;
- virtual void Layout() OVERRIDE;
-
- views::View* content_;
- views::View* button_container_;
- views::Label* text_label_;
-
- DISALLOW_COPY_AND_ASSIGN(SpecialPopupRow);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_SPECIAL_POPUP_ROW_H_
diff --git a/chromium/ash/system/tray/system_tray.cc b/chromium/ash/system/tray/system_tray.cc
deleted file mode 100644
index cee88472837..00000000000
--- a/chromium/ash/system/tray/system_tray.cc
+++ /dev/null
@@ -1,732 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/system_tray.h"
-
-#include "ash/ash_switches.h"
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shell.h"
-#include "ash/shell/panel_window.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/bluetooth/tray_bluetooth.h"
-#include "ash/system/date/tray_date.h"
-#include "ash/system/drive/tray_drive.h"
-#include "ash/system/ime/tray_ime.h"
-#include "ash/system/monitor/tray_monitor.h"
-#include "ash/system/session_length_limit/tray_session_length_limit.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "ash/system/tray/tray_bubble_wrapper.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray_accessibility.h"
-#include "ash/system/tray_caps_lock.h"
-#include "ash/system/tray_update.h"
-#include "ash/system/user/login_status.h"
-#include "ash/system/user/tray_user.h"
-#include "ash/system/user/tray_user_separator.h"
-#include "ash/system/web_notification/web_notification_tray.h"
-#include "base/command_line.h"
-#include "base/logging.h"
-#include "base/strings/utf_string_conversions.h"
-#include "base/timer/timer.h"
-#include "grit/ash_strings.h"
-#include "ui/aura/root_window.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/compositor/layer.h"
-#include "ui/events/event_constants.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/screen.h"
-#include "ui/gfx/skia_util.h"
-#include "ui/views/border.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/layout/fill_layout.h"
-#include "ui/views/view.h"
-
-#if defined(OS_CHROMEOS)
-#include "ash/system/chromeos/audio/tray_audio.h"
-#include "ash/system/chromeos/brightness/tray_brightness.h"
-#include "ash/system/chromeos/enterprise/tray_enterprise.h"
-#include "ash/system/chromeos/managed/tray_locally_managed_user.h"
-#include "ash/system/chromeos/network/tray_network.h"
-#include "ash/system/chromeos/network/tray_sms.h"
-#include "ash/system/chromeos/network/tray_vpn.h"
-#include "ash/system/chromeos/power/tray_power.h"
-#include "ash/system/chromeos/screen_security/screen_capture_tray_item.h"
-#include "ash/system/chromeos/screen_security/screen_share_tray_item.h"
-#include "ash/system/chromeos/settings/tray_settings.h"
-#include "ash/system/chromeos/tray_display.h"
-#include "ash/system/chromeos/tray_tracing.h"
-#include "ui/message_center/message_center.h"
-#endif
-
-using views::TrayBubbleView;
-
-namespace ash {
-
-// The minimum width of the system tray menu width.
-const int kMinimumSystemTrayMenuWidth = 300;
-
-namespace internal {
-
-// Class to initialize and manage the SystemTrayBubble and TrayBubbleWrapper
-// instances for a bubble.
-
-class SystemBubbleWrapper {
- public:
- // Takes ownership of |bubble|.
- explicit SystemBubbleWrapper(internal::SystemTrayBubble* bubble)
- : bubble_(bubble),
- is_persistent_(false) {
- }
-
- // Initializes the bubble view and creates |bubble_wrapper_|.
- void InitView(TrayBackgroundView* tray,
- views::View* anchor,
- TrayBubbleView::InitParams* init_params,
- bool is_persistent) {
- DCHECK(anchor);
- user::LoginStatus login_status =
- Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus();
- bubble_->InitView(anchor, login_status, init_params);
- bubble_wrapper_.reset(
- new internal::TrayBubbleWrapper(tray, bubble_->bubble_view()));
- if (ash::switches::UseAlternateShelfLayout()) {
- // The system bubble should not have an arrow.
- bubble_->bubble_view()->SetArrowPaintType(
- views::BubbleBorder::PAINT_NONE);
- }
- is_persistent_ = is_persistent;
-
- // If ChromeVox is enabled, focus the default item if no item is focused.
- if (Shell::GetInstance()->accessibility_delegate()->
- IsSpokenFeedbackEnabled()) {
- bubble_->FocusDefaultIfNeeded();
- }
- }
-
- // Convenience accessors:
- SystemTrayBubble* bubble() const { return bubble_.get(); }
- SystemTrayBubble::BubbleType bubble_type() const {
- return bubble_->bubble_type();
- }
- TrayBubbleView* bubble_view() const { return bubble_->bubble_view(); }
- bool is_persistent() const { return is_persistent_; }
-
- private:
- scoped_ptr<internal::SystemTrayBubble> bubble_;
- scoped_ptr<internal::TrayBubbleWrapper> bubble_wrapper_;
- bool is_persistent_;
-
- DISALLOW_COPY_AND_ASSIGN(SystemBubbleWrapper);
-};
-
-} // namespace internal
-
-// SystemTray
-
-using internal::SystemTrayBubble;
-
-SystemTray::SystemTray(internal::StatusAreaWidget* status_area_widget)
- : internal::TrayBackgroundView(status_area_widget),
- items_(),
- default_bubble_height_(0),
- hide_notifications_(false),
- full_system_tray_menu_(false),
- tray_accessibility_(NULL),
- tray_date_(NULL) {
- SetContentsBackground();
-}
-
-SystemTray::~SystemTray() {
- // Destroy any child views that might have back pointers before ~View().
- system_bubble_.reset();
- notification_bubble_.reset();
- for (std::vector<SystemTrayItem*>::iterator it = items_.begin();
- it != items_.end();
- ++it) {
- (*it)->DestroyTrayView();
- }
-}
-
-void SystemTray::InitializeTrayItems(SystemTrayDelegate* delegate) {
- internal::TrayBackgroundView::Initialize();
- CreateItems(delegate);
-}
-
-void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
-#if !defined(OS_WIN)
- AddTrayItem(new internal::TraySessionLengthLimit(this));
- // Create user items for each possible user.
- ash::Shell* shell = ash::Shell::GetInstance();
- int maximum_user_profiles =
- shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers();
- for (int i = 0; i < maximum_user_profiles; i++) {
- internal::TrayUser* tray_user = new internal::TrayUser(this, i);
- AddTrayItem(tray_user);
- user_items_.push_back(tray_user);
- }
- if (maximum_user_profiles > 1) {
- // Add a special double line separator between users and the rest of the
- // menu if more then one user is logged in.
- AddTrayItem(new internal::TrayUserSeparator(this));
- }
-#endif
-
- tray_accessibility_ = new internal::TrayAccessibility(this);
- tray_date_ = new internal::TrayDate(this);
-
-#if defined(OS_CHROMEOS)
- AddTrayItem(new internal::TrayEnterprise(this));
- AddTrayItem(new internal::TrayLocallyManagedUser(this));
- AddTrayItem(new internal::TrayIME(this));
- AddTrayItem(tray_accessibility_);
- AddTrayItem(new internal::TrayTracing(this));
- AddTrayItem(
- new internal::TrayPower(this, message_center::MessageCenter::Get()));
- AddTrayItem(new internal::TrayNetwork(this));
- AddTrayItem(new internal::TrayVPN(this));
- AddTrayItem(new internal::TraySms(this));
- AddTrayItem(new internal::TrayBluetooth(this));
- AddTrayItem(new internal::TrayDrive(this));
- AddTrayItem(new internal::TrayDisplay(this));
- AddTrayItem(new internal::ScreenCaptureTrayItem(this));
- AddTrayItem(new internal::ScreenShareTrayItem(this));
- AddTrayItem(new internal::TrayAudio(this));
- AddTrayItem(new internal::TrayBrightness(this));
- AddTrayItem(new internal::TrayCapsLock(this));
- AddTrayItem(new internal::TraySettings(this));
- AddTrayItem(new internal::TrayUpdate(this));
- AddTrayItem(tray_date_);
-#elif defined(OS_WIN)
- AddTrayItem(tray_accessibility_);
- AddTrayItem(new internal::TrayUpdate(this));
- AddTrayItem(tray_date_);
-#elif defined(OS_LINUX)
- AddTrayItem(new internal::TrayIME(this));
- AddTrayItem(tray_accessibility_);
- AddTrayItem(new internal::TrayBluetooth(this));
- AddTrayItem(new internal::TrayDrive(this));
- AddTrayItem(new internal::TrayCapsLock(this));
- AddTrayItem(new internal::TrayUpdate(this));
- AddTrayItem(tray_date_);
-#endif
-
-#if defined(OS_LINUX)
- CommandLine* cmd = CommandLine::ForCurrentProcess();
- if (cmd->HasSwitch(ash::switches::kAshEnableMemoryMonitor))
- AddTrayItem(new internal::TrayMonitor(this));
-#endif
-
- SetVisible(ash::Shell::GetInstance()->system_tray_delegate()->
- GetTrayVisibilityOnStartup());
-}
-
-void SystemTray::AddTrayItem(SystemTrayItem* item) {
- items_.push_back(item);
-
- SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate();
- views::View* tray_item = item->CreateTrayView(delegate->GetUserLoginStatus());
- item->UpdateAfterShelfAlignmentChange(shelf_alignment());
-
- if (tray_item) {
- tray_container()->AddChildViewAt(tray_item, 0);
- PreferredSizeChanged();
- tray_item_map_[item] = tray_item;
- }
-}
-
-void SystemTray::RemoveTrayItem(SystemTrayItem* item) {
- NOTIMPLEMENTED();
-}
-
-const std::vector<SystemTrayItem*>& SystemTray::GetTrayItems() const {
- return items_.get();
-}
-
-const std::vector<internal::TrayUser*>& SystemTray::GetTrayUserItems() const {
- return user_items_;
-}
-
-void SystemTray::ShowDefaultView(BubbleCreationType creation_type) {
- ShowDefaultViewWithOffset(
- creation_type,
- TrayBubbleView::InitParams::kArrowDefaultOffset,
- false);
-}
-
-void SystemTray::ShowPersistentDefaultView() {
- ShowItems(items_.get(),
- false,
- false,
- BUBBLE_CREATE_NEW,
- TrayBubbleView::InitParams::kArrowDefaultOffset,
- true);
-}
-
-void SystemTray::ShowDetailedView(SystemTrayItem* item,
- int close_delay,
- bool activate,
- BubbleCreationType creation_type) {
- std::vector<SystemTrayItem*> items;
- items.push_back(item);
- ShowItems(items, true, activate, creation_type, GetTrayXOffset(item), false);
- if (system_bubble_)
- system_bubble_->bubble()->StartAutoCloseTimer(close_delay);
-}
-
-void SystemTray::SetDetailedViewCloseDelay(int close_delay) {
- if (HasSystemBubbleType(SystemTrayBubble::BUBBLE_TYPE_DETAILED))
- system_bubble_->bubble()->StartAutoCloseTimer(close_delay);
-}
-
-void SystemTray::HideDetailedView(SystemTrayItem* item) {
- if (item != detailed_item_)
- return;
- DestroySystemBubble();
- UpdateNotificationBubble();
-}
-
-void SystemTray::ShowNotificationView(SystemTrayItem* item) {
- if (std::find(notification_items_.begin(), notification_items_.end(), item)
- != notification_items_.end())
- return;
- notification_items_.push_back(item);
- UpdateNotificationBubble();
-}
-
-void SystemTray::HideNotificationView(SystemTrayItem* item) {
- std::vector<SystemTrayItem*>::iterator found_iter =
- std::find(notification_items_.begin(), notification_items_.end(), item);
- if (found_iter == notification_items_.end())
- return;
- notification_items_.erase(found_iter);
- // Only update the notification bubble if visible (i.e. don't create one).
- if (notification_bubble_)
- UpdateNotificationBubble();
-}
-
-void SystemTray::UpdateAfterLoginStatusChange(user::LoginStatus login_status) {
- DestroySystemBubble();
- UpdateNotificationBubble();
-
- for (std::vector<SystemTrayItem*>::iterator it = items_.begin();
- it != items_.end();
- ++it) {
- (*it)->UpdateAfterLoginStatusChange(login_status);
- }
-
- // Items default to SHELF_ALIGNMENT_BOTTOM. Update them if the initial
- // position of the shelf differs.
- if (shelf_alignment() != SHELF_ALIGNMENT_BOTTOM)
- UpdateAfterShelfAlignmentChange(shelf_alignment());
-
- SetVisible(true);
- PreferredSizeChanged();
-}
-
-void SystemTray::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
- for (std::vector<SystemTrayItem*>::iterator it = items_.begin();
- it != items_.end();
- ++it) {
- (*it)->UpdateAfterShelfAlignmentChange(alignment);
- }
-}
-
-void SystemTray::SetHideNotifications(bool hide_notifications) {
- if (notification_bubble_)
- notification_bubble_->bubble()->SetVisible(!hide_notifications);
- hide_notifications_ = hide_notifications;
-}
-
-bool SystemTray::ShouldShowLauncher() const {
- return system_bubble_.get() && system_bubble_->bubble()->ShouldShowLauncher();
-}
-
-bool SystemTray::HasSystemBubble() const {
- return system_bubble_.get() != NULL;
-}
-
-bool SystemTray::HasNotificationBubble() const {
- return notification_bubble_.get() != NULL;
-}
-
-internal::SystemTrayBubble* SystemTray::GetSystemBubble() {
- if (!system_bubble_)
- return NULL;
- return system_bubble_->bubble();
-}
-
-bool SystemTray::IsAnyBubbleVisible() const {
- return ((system_bubble_.get() &&
- system_bubble_->bubble()->IsVisible()) ||
- (notification_bubble_.get() &&
- notification_bubble_->bubble()->IsVisible()));
-}
-
-bool SystemTray::IsMouseInNotificationBubble() const {
- if (!notification_bubble_)
- return false;
- return notification_bubble_->bubble_view()->GetBoundsInScreen().Contains(
- Shell::GetScreen()->GetCursorScreenPoint());
-}
-
-bool SystemTray::CloseSystemBubble() const {
- if (!system_bubble_)
- return false;
- system_bubble_->bubble()->Close();
- return true;
-}
-
-views::View* SystemTray::GetHelpButtonView() const {
- return tray_date_->GetHelpButtonView();
-}
-
-bool SystemTray::CloseNotificationBubbleForTest() const {
- if (!notification_bubble_)
- return false;
- notification_bubble_->bubble()->Close();
- return true;
-}
-
-// Private methods.
-
-bool SystemTray::HasSystemBubbleType(SystemTrayBubble::BubbleType type) {
- DCHECK(type != SystemTrayBubble::BUBBLE_TYPE_NOTIFICATION);
- return system_bubble_.get() && system_bubble_->bubble_type() == type;
-}
-
-void SystemTray::DestroySystemBubble() {
- CloseSystemBubbleAndDeactivateSystemTray();
- detailed_item_ = NULL;
- UpdateWebNotifications();
-}
-
-void SystemTray::DestroyNotificationBubble() {
- if (notification_bubble_) {
- notification_bubble_.reset();
- UpdateWebNotifications();
- }
-}
-
-int SystemTray::GetTrayXOffset(SystemTrayItem* item) const {
- // Don't attempt to align the arrow if the shelf is on the left or right.
- if (shelf_alignment() != SHELF_ALIGNMENT_BOTTOM &&
- shelf_alignment() != SHELF_ALIGNMENT_TOP)
- return TrayBubbleView::InitParams::kArrowDefaultOffset;
-
- std::map<SystemTrayItem*, views::View*>::const_iterator it =
- tray_item_map_.find(item);
- if (it == tray_item_map_.end())
- return TrayBubbleView::InitParams::kArrowDefaultOffset;
-
- const views::View* item_view = it->second;
- if (item_view->bounds().IsEmpty()) {
- // The bounds of item could be still empty if it does not have a visible
- // tray view. In that case, use the default (minimum) offset.
- return TrayBubbleView::InitParams::kArrowDefaultOffset;
- }
-
- gfx::Point point(item_view->width() / 2, 0);
- ConvertPointToWidget(item_view, &point);
- return point.x();
-}
-
-void SystemTray::ShowDefaultViewWithOffset(BubbleCreationType creation_type,
- int arrow_offset,
- bool persistent) {
- if (creation_type != BUBBLE_USE_EXISTING) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_MENU_OPENED);
- }
- ShowItems(items_.get(), false, true, creation_type, arrow_offset, persistent);
-}
-
-void SystemTray::ShowItems(const std::vector<SystemTrayItem*>& items,
- bool detailed,
- bool can_activate,
- BubbleCreationType creation_type,
- int arrow_offset,
- bool persistent) {
- // No system tray bubbles in kiosk mode.
- if (Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus() ==
- ash::user::LOGGED_IN_KIOSK_APP) {
- return;
- }
-
- // Destroy any existing bubble and create a new one.
- SystemTrayBubble::BubbleType bubble_type = detailed ?
- SystemTrayBubble::BUBBLE_TYPE_DETAILED :
- SystemTrayBubble::BUBBLE_TYPE_DEFAULT;
-
- // Destroy the notification bubble here so that it doesn't get rebuilt
- // while we add items to the main bubble_ (e.g. in HideNotificationView).
- notification_bubble_.reset();
- if (system_bubble_.get() && creation_type == BUBBLE_USE_EXISTING) {
- system_bubble_->bubble()->UpdateView(items, bubble_type);
- // If ChromeVox is enabled, focus the default item if no item is focused.
- if (Shell::GetInstance()->accessibility_delegate()->
- IsSpokenFeedbackEnabled()) {
- system_bubble_->bubble()->FocusDefaultIfNeeded();
- }
- } else {
- // Remember if the menu is a single property (like e.g. volume) or the
- // full tray menu. Note that in case of the |BUBBLE_USE_EXISTING| case
- // above, |full_system_tray_menu_| does not get changed since the fact that
- // the menu is full (or not) doesn't change even if a "single property"
- // (like network) replaces most of the menu.
- full_system_tray_menu_ = items.size() > 1;
- // The menu width is fixed, and it is a per language setting.
- int menu_width = std::max(kMinimumSystemTrayMenuWidth,
- Shell::GetInstance()->system_tray_delegate()->GetSystemTrayMenuWidth());
-
- TrayBubbleView::InitParams init_params(TrayBubbleView::ANCHOR_TYPE_TRAY,
- GetAnchorAlignment(),
- menu_width,
- kTrayPopupMaxWidth);
- init_params.can_activate = can_activate;
- init_params.first_item_has_no_margin =
- ash::switches::UseAlternateShelfLayout();
- if (detailed) {
- // This is the case where a volume control or brightness control bubble
- // is created.
- init_params.max_height = default_bubble_height_;
- init_params.arrow_color = kBackgroundColor;
- } else {
- init_params.arrow_color = kHeaderBackgroundColor;
- }
- init_params.arrow_offset = arrow_offset;
- if (bubble_type == SystemTrayBubble::BUBBLE_TYPE_DEFAULT)
- init_params.close_on_deactivate = !persistent;
- // For Volume and Brightness we don't want to show an arrow when
- // they are shown in a bubble by themselves.
- init_params.arrow_paint_type = views::BubbleBorder::PAINT_NORMAL;
- if (items.size() == 1 && items[0]->ShouldHideArrow())
- init_params.arrow_paint_type = views::BubbleBorder::PAINT_TRANSPARENT;
- SystemTrayBubble* bubble = new SystemTrayBubble(this, items, bubble_type);
- system_bubble_.reset(new internal::SystemBubbleWrapper(bubble));
- system_bubble_->InitView(this, tray_container(), &init_params, persistent);
- }
- // Save height of default view for creating detailed views directly.
- if (!detailed)
- default_bubble_height_ = system_bubble_->bubble_view()->height();
-
- if (detailed && items.size() > 0)
- detailed_item_ = items[0];
- else
- detailed_item_ = NULL;
-
- UpdateNotificationBubble(); // State changed, re-create notifications.
- if (!notification_bubble_)
- UpdateWebNotifications();
- GetShelfLayoutManager()->UpdateAutoHideState();
-
- // When we show the system menu in our alternate shelf layout, we need to
- // tint the background.
- if (full_system_tray_menu_)
- SetDrawBackgroundAsActive(true);
-}
-
-void SystemTray::UpdateNotificationBubble() {
- // Only show the notification bubble if we have notifications.
- if (notification_items_.empty()) {
- DestroyNotificationBubble();
- return;
- }
- // Destroy the existing bubble before constructing a new one.
- notification_bubble_.reset();
- SystemTrayBubble* notification_bubble;
- notification_bubble = new SystemTrayBubble(
- this, notification_items_, SystemTrayBubble::BUBBLE_TYPE_NOTIFICATION);
- views::View* anchor;
- TrayBubbleView::AnchorType anchor_type;
- // Tray items might want to show notifications while we are creating and
- // initializing the |system_bubble_| - but it might not be fully initialized
- // when coming here - this would produce a crashed like crbug.com/247416.
- // As such we check the existence of the widget here.
- if (system_bubble_.get() &&
- system_bubble_->bubble_view() &&
- system_bubble_->bubble_view()->GetWidget()) {
- anchor = system_bubble_->bubble_view();
- anchor_type = TrayBubbleView::ANCHOR_TYPE_BUBBLE;
- } else {
- anchor = tray_container();
- anchor_type = TrayBubbleView::ANCHOR_TYPE_TRAY;
- }
- TrayBubbleView::InitParams init_params(anchor_type,
- GetAnchorAlignment(),
- kTrayPopupMinWidth,
- kTrayPopupMaxWidth);
- init_params.first_item_has_no_margin =
- ash::switches::UseAlternateShelfLayout();
- init_params.arrow_color = kBackgroundColor;
- init_params.arrow_offset = GetTrayXOffset(notification_items_[0]);
- notification_bubble_.reset(
- new internal::SystemBubbleWrapper(notification_bubble));
- notification_bubble_->InitView(this, anchor, &init_params, false);
-
- if (notification_bubble->bubble_view()->child_count() == 0) {
- // It is possible that none of the items generated actual notifications.
- DestroyNotificationBubble();
- return;
- }
- if (hide_notifications_)
- notification_bubble->SetVisible(false);
- else
- UpdateWebNotifications();
-}
-
-void SystemTray::UpdateWebNotifications() {
- TrayBubbleView* bubble_view = NULL;
- if (notification_bubble_)
- bubble_view = notification_bubble_->bubble_view();
- else if (system_bubble_)
- bubble_view = system_bubble_->bubble_view();
-
- int height = 0;
- if (bubble_view) {
- gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(
- bubble_view->GetWidget()->GetNativeView()).work_area();
- if (GetShelfLayoutManager()->GetAlignment() != SHELF_ALIGNMENT_TOP) {
- height = std::max(
- 0, work_area.height() - bubble_view->GetBoundsInScreen().y());
- } else {
- height = std::max(
- 0, bubble_view->GetBoundsInScreen().bottom() - work_area.y());
- }
- }
- status_area_widget()->web_notification_tray()->SetSystemTrayHeight(height);
-}
-
-void SystemTray::SetShelfAlignment(ShelfAlignment alignment) {
- if (alignment == shelf_alignment())
- return;
- internal::TrayBackgroundView::SetShelfAlignment(alignment);
- UpdateAfterShelfAlignmentChange(alignment);
- // Destroy any existing bubble so that it is rebuilt correctly.
- CloseSystemBubbleAndDeactivateSystemTray();
- // Rebuild any notification bubble.
- if (notification_bubble_) {
- notification_bubble_.reset();
- UpdateNotificationBubble();
- }
-}
-
-void SystemTray::AnchorUpdated() {
- if (notification_bubble_) {
- notification_bubble_->bubble_view()->UpdateBubble();
- // Ensure that the notification buble is above the launcher/status area.
- notification_bubble_->bubble_view()->GetWidget()->StackAtTop();
- UpdateBubbleViewArrow(notification_bubble_->bubble_view());
- }
- if (system_bubble_) {
- system_bubble_->bubble_view()->UpdateBubble();
- UpdateBubbleViewArrow(system_bubble_->bubble_view());
- }
-}
-
-base::string16 SystemTray::GetAccessibleNameForTray() {
- return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ACCESSIBLE_NAME);
-}
-
-void SystemTray::BubbleResized(const TrayBubbleView* bubble_view) {
- UpdateWebNotifications();
-}
-
-void SystemTray::HideBubbleWithView(const TrayBubbleView* bubble_view) {
- if (system_bubble_.get() && bubble_view == system_bubble_->bubble_view()) {
- DestroySystemBubble();
- UpdateNotificationBubble(); // State changed, re-create notifications.
- GetShelfLayoutManager()->UpdateAutoHideState();
- } else if (notification_bubble_.get() &&
- bubble_view == notification_bubble_->bubble_view()) {
- DestroyNotificationBubble();
- }
-}
-
-bool SystemTray::ClickedOutsideBubble() {
- if (!system_bubble_ || system_bubble_->is_persistent())
- return false;
- HideBubbleWithView(system_bubble_->bubble_view());
- return true;
-}
-
-void SystemTray::BubbleViewDestroyed() {
- if (system_bubble_) {
- system_bubble_->bubble()->DestroyItemViews();
- system_bubble_->bubble()->BubbleViewDestroyed();
- }
-}
-
-void SystemTray::OnMouseEnteredView() {
- if (system_bubble_)
- system_bubble_->bubble()->StopAutoCloseTimer();
-}
-
-void SystemTray::OnMouseExitedView() {
- if (system_bubble_)
- system_bubble_->bubble()->RestartAutoCloseTimer();
-}
-
-base::string16 SystemTray::GetAccessibleNameForBubble() {
- return GetAccessibleNameForTray();
-}
-
-gfx::Rect SystemTray::GetAnchorRect(
- views::Widget* anchor_widget,
- TrayBubbleView::AnchorType anchor_type,
- TrayBubbleView::AnchorAlignment anchor_alignment) {
- return GetBubbleAnchorRect(anchor_widget, anchor_type, anchor_alignment);
-}
-
-void SystemTray::HideBubble(const TrayBubbleView* bubble_view) {
- HideBubbleWithView(bubble_view);
-}
-
-views::View* SystemTray::GetTrayItemViewForTest(SystemTrayItem* item) {
- std::map<SystemTrayItem*, views::View*>::iterator it =
- tray_item_map_.find(item);
- return it == tray_item_map_.end() ? NULL : it->second;
-}
-
-void SystemTray::AddTrayUserItemForTest(internal::TrayUser* tray_user) {
- AddTrayItem(tray_user);
- user_items_.push_back(tray_user);
-}
-
-bool SystemTray::PerformAction(const ui::Event& event) {
- // If we're already showing the default view, hide it; otherwise, show it
- // (and hide any popup that's currently shown).
- if (HasSystemBubbleType(SystemTrayBubble::BUBBLE_TYPE_DEFAULT)) {
- system_bubble_->bubble()->Close();
- } else {
- int arrow_offset = TrayBubbleView::InitParams::kArrowDefaultOffset;
- if (event.IsMouseEvent() || event.type() == ui::ET_GESTURE_TAP) {
- const ui::LocatedEvent& located_event =
- static_cast<const ui::LocatedEvent&>(event);
- if (shelf_alignment() == SHELF_ALIGNMENT_BOTTOM ||
- shelf_alignment() == SHELF_ALIGNMENT_TOP) {
- gfx::Point point(located_event.x(), 0);
- ConvertPointToWidget(this, &point);
- arrow_offset = point.x();
- }
- }
- ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset, false);
- }
- return true;
-}
-
-void SystemTray::CloseSystemBubbleAndDeactivateSystemTray() {
- system_bubble_.reset();
- // When closing a system bubble with the alternate shelf layout, we need to
- // turn off the active tinting of the shelf.
- if (full_system_tray_menu_) {
- SetDrawBackgroundAsActive(false);
- full_system_tray_menu_ = false;
- }
-}
-
-} // namespace ash
diff --git a/chromium/ash/system/tray/system_tray.h b/chromium/ash/system/tray/system_tray.h
deleted file mode 100644
index 7b1681d1733..00000000000
--- a/chromium/ash/system/tray/system_tray.h
+++ /dev/null
@@ -1,247 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_
-#define ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_
-
-#include "ash/ash_export.h"
-#include "ash/system/tray/system_tray_bubble.h"
-#include "ash/system/tray/tray_background_view.h"
-#include "ash/system/user/login_status.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/scoped_vector.h"
-#include "ui/views/bubble/tray_bubble_view.h"
-#include "ui/views/view.h"
-
-#include <map>
-#include <vector>
-
-namespace ash {
-
-class SystemTrayDelegate;
-class SystemTrayItem;
-
-namespace internal {
-class SystemBubbleWrapper;
-class TrayAccessibility;
-class TrayDate;
-class TrayUser;
-}
-
-// There are different methods for creating bubble views.
-enum BubbleCreationType {
- BUBBLE_CREATE_NEW, // Closes any existing bubble and creates a new one.
- BUBBLE_USE_EXISTING, // Uses any existing bubble, or creates a new one.
-};
-
-class ASH_EXPORT SystemTray : public internal::TrayBackgroundView,
- public views::TrayBubbleView::Delegate {
- public:
- explicit SystemTray(internal::StatusAreaWidget* status_area_widget);
- virtual ~SystemTray();
-
- // Calls TrayBackgroundView::Initialize(), creates the tray items, and
- // adds them to SystemTrayNotifier.
- void InitializeTrayItems(SystemTrayDelegate* delegate);
-
- // Adds a new item in the tray.
- void AddTrayItem(SystemTrayItem* item);
-
- // Removes an existing tray item.
- void RemoveTrayItem(SystemTrayItem* item);
-
- // Returns all tray items that has been added to system tray.
- const std::vector<SystemTrayItem*>& GetTrayItems() const;
-
- // Returns all tray user items that were added to the system tray.
- const std::vector<internal::TrayUser*>& GetTrayUserItems() const;
-
- // Shows the default view of all items.
- void ShowDefaultView(BubbleCreationType creation_type);
-
- // Shows default view that ingnores outside clicks and activation loss.
- void ShowPersistentDefaultView();
-
- // Shows details of a particular item. If |close_delay_in_seconds| is
- // non-zero, then the view is automatically closed after the specified time.
- void ShowDetailedView(SystemTrayItem* item,
- int close_delay_in_seconds,
- bool activate,
- BubbleCreationType creation_type);
-
- // Continue showing the existing detailed view, if any, for |close_delay|
- // seconds.
- void SetDetailedViewCloseDelay(int close_delay);
-
- // Hides the detailed view for |item|.
- void HideDetailedView(SystemTrayItem* item);
-
- // Shows the notification view for |item|.
- void ShowNotificationView(SystemTrayItem* item);
-
- // Hides the notification view for |item|.
- void HideNotificationView(SystemTrayItem* item);
-
- // Updates the items when the login status of the system changes.
- void UpdateAfterLoginStatusChange(user::LoginStatus login_status);
-
- // Updates the items when the shelf alignment changes.
- void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment);
-
- // Temporarily hides/unhides the notification bubble.
- void SetHideNotifications(bool hidden);
-
- // Returns true if the launcher should be forced visible when auto-hidden.
- bool ShouldShowLauncher() const;
-
- // Returns true if there is a system bubble (already visible or in the process
- // of being created).
- bool HasSystemBubble() const;
-
- // Returns true if there is a notification bubble.
- bool HasNotificationBubble() const;
-
- // Returns true if the system_bubble_ exists and is of type |type|.
- bool HasSystemBubbleType(internal::SystemTrayBubble::BubbleType type);
-
- // Returns a pointer to the system bubble or NULL if none.
- internal::SystemTrayBubble* GetSystemBubble();
-
- // Returns true if any bubble is visible.
- bool IsAnyBubbleVisible() const;
-
- // Returns true if the mouse is inside the notification bubble.
- bool IsMouseInNotificationBubble() const;
-
- // Closes system bubble and returns true if it did exist.
- bool CloseSystemBubble() const;
-
- // Returns view for help button if default view is shown. Returns NULL
- // otherwise.
- views::View* GetHelpButtonView() const;
-
- // Accessors for testing.
-
- // Returns true if the bubble exists.
- bool CloseNotificationBubbleForTest() const;
-
- // Overridden from TrayBackgroundView.
- virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE;
- virtual void AnchorUpdated() OVERRIDE;
- virtual base::string16 GetAccessibleNameForTray() OVERRIDE;
- virtual void BubbleResized(const views::TrayBubbleView* bubble_view) OVERRIDE;
- virtual void HideBubbleWithView(
- const views::TrayBubbleView* bubble_view) OVERRIDE;
- virtual bool ClickedOutsideBubble() OVERRIDE;
-
- // Overridden from message_center::TrayBubbleView::Delegate.
- virtual void BubbleViewDestroyed() OVERRIDE;
- virtual void OnMouseEnteredView() OVERRIDE;
- virtual void OnMouseExitedView() OVERRIDE;
- virtual base::string16 GetAccessibleNameForBubble() OVERRIDE;
- virtual gfx::Rect GetAnchorRect(views::Widget* anchor_widget,
- AnchorType anchor_type,
- AnchorAlignment anchor_alignment) OVERRIDE;
- virtual void HideBubble(const views::TrayBubbleView* bubble_view) OVERRIDE;
-
- internal::TrayAccessibility* GetTrayAccessibilityForTest() {
- return tray_accessibility_;
- }
-
- // Get the tray item view (or NULL) for a given |tray_item| in a unit test.
- views::View* GetTrayItemViewForTest(SystemTrayItem* tray_item);
-
- // Add a tray user item for testing purposes. Note: The passed |tray_user|
- // will be owned by the SystemTray after the call.
- void AddTrayUserItemForTest(internal::TrayUser* tray_user);
-
- private:
- // Creates the default set of items for the sytem tray.
- void CreateItems(SystemTrayDelegate* delegate);
-
- // Resets |system_bubble_| and clears any related state.
- void DestroySystemBubble();
-
- // Resets |notification_bubble_| and clears any related state.
- void DestroyNotificationBubble();
-
- // Calculates the x-offset for the item in the tray. Returns -1 if its tray
- // item view is not visible.
- int GetTrayXOffset(SystemTrayItem* item) const;
-
- // Shows the default view and its arrow position is shifted by |x_offset|.
- void ShowDefaultViewWithOffset(BubbleCreationType creation_type,
- int x_offset,
- bool persistent);
-
- // Constructs or re-constructs |system_bubble_| and populates it with |items|.
- // Specify |change_tray_status| to true if want to change the tray background
- // status.
- void ShowItems(const std::vector<SystemTrayItem*>& items,
- bool details,
- bool activate,
- BubbleCreationType creation_type,
- int x_offset,
- bool persistent);
-
- // Constructs or re-constructs |notification_bubble_| and populates it with
- // |notification_items_|, or destroys it if there are no notification items.
- void UpdateNotificationBubble();
-
- // Checks the current status of the system tray and updates the web
- // notification tray according to the current status.
- void UpdateWebNotifications();
-
- // Deactivate the system tray in the shelf if it was active before.
- void CloseSystemBubbleAndDeactivateSystemTray();
-
- const ScopedVector<SystemTrayItem>& items() const { return items_; }
-
- // Overridden from internal::ActionableView.
- virtual bool PerformAction(const ui::Event& event) OVERRIDE;
-
- // Owned items.
- ScopedVector<SystemTrayItem> items_;
-
- // User items - note, this is a subset of the |items_| list. Note that no
- // item in this list needs to be deleted.
- std::vector<internal::TrayUser*> user_items_;
-
- // Pointers to members of |items_|.
- SystemTrayItem* detailed_item_;
- std::vector<SystemTrayItem*> notification_items_;
-
- // Mappings of system tray item and it's view in the tray.
- std::map<SystemTrayItem*, views::View*> tray_item_map_;
-
- // Bubble for default and detailed views.
- scoped_ptr<internal::SystemBubbleWrapper> system_bubble_;
-
- // Bubble for notifications.
- scoped_ptr<internal::SystemBubbleWrapper> notification_bubble_;
-
- // Keep track of the default view height so that when we create detailed
- // views directly (e.g. from a notification) we know what height to use.
- int default_bubble_height_;
-
- // Set to true when system notifications should be hidden (e.g. web
- // notification bubble is visible).
- bool hide_notifications_;
-
- // This is true when the displayed system tray menu is a full tray menu,
- // otherwise a single line item menu like the volume slider is shown.
- // Note that the value is only valid when |system_bubble_| is true.
- bool full_system_tray_menu_;
-
- internal::TrayAccessibility* tray_accessibility_; // not owned
- internal::TrayDate* tray_date_;
-
- DISALLOW_COPY_AND_ASSIGN(SystemTray);
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_
diff --git a/chromium/ash/system/tray/system_tray_bubble.cc b/chromium/ash/system/tray/system_tray_bubble.cc
deleted file mode 100644
index 1aa60bc5541..00000000000
--- a/chromium/ash/system/tray/system_tray_bubble.cc
+++ /dev/null
@@ -1,388 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/system_tray_bubble.h"
-
-#include "ash/shell.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "ash/system/tray/tray_bubble_wrapper.h"
-#include "ash/system/tray/tray_constants.h"
-#include "base/message_loop/message_loop.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animation_observer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/gfx/canvas.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-using views::TrayBubbleView;
-
-namespace ash {
-
-namespace {
-
-// Normally a detailed view is the same size as the default view. However,
-// when showing a detailed view directly (e.g. clicking on a notification),
-// we may not know the height of the default view, or the default view may
-// be too short, so we use this as a default and minimum height for any
-// detailed view.
-const int kDetailedBubbleMaxHeight = kTrayPopupItemHeight * 5;
-
-// Duration of swipe animation used when transitioning from a default to
-// detailed view or vice versa.
-const int kSwipeDelayMS = 150;
-
-// A view with some special behaviour for tray items in the popup:
-// - optionally changes background color on hover.
-class TrayPopupItemContainer : public views::View {
- public:
- TrayPopupItemContainer(views::View* view,
- bool change_background,
- bool draw_border)
- : hover_(false),
- change_background_(change_background) {
- set_notify_enter_exit_on_child(true);
- if (draw_border) {
- set_border(
- views::Border::CreateSolidSidedBorder(0, 0, 1, 0, kBorderLightColor));
- }
- views::BoxLayout* layout = new views::BoxLayout(
- views::BoxLayout::kVertical, 0, 0, 0);
- layout->set_spread_blank_space(true);
- SetLayoutManager(layout);
- SetPaintToLayer(view->layer() != NULL);
- if (view->layer())
- SetFillsBoundsOpaquely(view->layer()->fills_bounds_opaquely());
- AddChildView(view);
- SetVisible(view->visible());
- }
-
- virtual ~TrayPopupItemContainer() {}
-
- private:
- // Overridden from views::View.
- virtual void ChildVisibilityChanged(View* child) OVERRIDE {
- if (visible() == child->visible())
- return;
- SetVisible(child->visible());
- PreferredSizeChanged();
- }
-
- virtual void ChildPreferredSizeChanged(View* child) OVERRIDE {
- PreferredSizeChanged();
- }
-
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE {
- hover_ = true;
- SchedulePaint();
- }
-
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE {
- hover_ = false;
- SchedulePaint();
- }
-
- virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE {
- if (child_count() == 0)
- return;
-
- views::View* view = child_at(0);
- if (!view->background()) {
- canvas->FillRect(gfx::Rect(size()), (hover_ && change_background_) ?
- kHoverBackgroundColor : kBackgroundColor);
- }
- }
-
- bool hover_;
- bool change_background_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayPopupItemContainer);
-};
-
-// Implicit animation observer that deletes itself and the layer at the end of
-// the animation.
-class AnimationObserverDeleteLayer : public ui::ImplicitAnimationObserver {
- public:
- explicit AnimationObserverDeleteLayer(ui::Layer* layer)
- : layer_(layer) {
- }
-
- virtual ~AnimationObserverDeleteLayer() {
- }
-
- virtual void OnImplicitAnimationsCompleted() OVERRIDE {
- base::MessageLoopForUI::current()->DeleteSoon(FROM_HERE, this);
- }
-
- private:
- scoped_ptr<ui::Layer> layer_;
-
- DISALLOW_COPY_AND_ASSIGN(AnimationObserverDeleteLayer);
-};
-
-} // namespace
-
-namespace internal {
-
-// SystemTrayBubble
-
-SystemTrayBubble::SystemTrayBubble(
- ash::SystemTray* tray,
- const std::vector<ash::SystemTrayItem*>& items,
- BubbleType bubble_type)
- : tray_(tray),
- bubble_view_(NULL),
- items_(items),
- bubble_type_(bubble_type),
- autoclose_delay_(0) {
-}
-
-SystemTrayBubble::~SystemTrayBubble() {
- DestroyItemViews();
- // Reset the host pointer in bubble_view_ in case its destruction is deferred.
- if (bubble_view_)
- bubble_view_->reset_delegate();
-}
-
-void SystemTrayBubble::UpdateView(
- const std::vector<ash::SystemTrayItem*>& items,
- BubbleType bubble_type) {
- DCHECK(bubble_type != BUBBLE_TYPE_NOTIFICATION);
-
- scoped_ptr<ui::Layer> scoped_layer;
- if (bubble_type != bubble_type_) {
- base::TimeDelta swipe_duration =
- base::TimeDelta::FromMilliseconds(kSwipeDelayMS);
- scoped_layer.reset(bubble_view_->RecreateLayer());
- // Keep the reference to layer as we need it after releasing it.
- ui::Layer* layer = scoped_layer.get();
- DCHECK(layer);
- layer->SuppressPaint();
-
- // When transitioning from detailed view to default view, animate the
- // existing view (slide out towards the right).
- if (bubble_type == BUBBLE_TYPE_DEFAULT) {
- ui::ScopedLayerAnimationSettings settings(layer->GetAnimator());
- settings.AddObserver(
- new AnimationObserverDeleteLayer(scoped_layer.release()));
- settings.SetTransitionDuration(swipe_duration);
- settings.SetTweenType(gfx::Tween::EASE_OUT);
- gfx::Transform transform;
- transform.Translate(layer->bounds().width(), 0.0);
- layer->SetTransform(transform);
- }
-
- {
- // Add a shadow layer to make the old layer darker as the animation
- // progresses.
- ui::Layer* shadow = new ui::Layer(ui::LAYER_SOLID_COLOR);
- shadow->SetColor(SK_ColorBLACK);
- shadow->SetOpacity(0.01f);
- shadow->SetBounds(layer->bounds());
- layer->Add(shadow);
- layer->StackAtTop(shadow);
- {
- // Animate the darkening effect a little longer than the swipe-in. This
- // is to make sure the darkening animation does not end up finishing
- // early, because the dark layer goes away at the end of the animation,
- // and there is a brief moment when the old view is still visible, but
- // it does not have the shadow layer on top.
- ui::ScopedLayerAnimationSettings settings(shadow->GetAnimator());
- settings.AddObserver(new AnimationObserverDeleteLayer(shadow));
- settings.SetTransitionDuration(swipe_duration +
- base::TimeDelta::FromMilliseconds(150));
- settings.SetTweenType(gfx::Tween::LINEAR);
- shadow->SetOpacity(0.15f);
- }
- }
- }
-
- DestroyItemViews();
- bubble_view_->RemoveAllChildViews(true);
-
- items_ = items;
- bubble_type_ = bubble_type;
- CreateItemViews(
- Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus());
-
- // Close bubble view if we failed to create the item view.
- if (!bubble_view_->has_children()) {
- Close();
- return;
- }
-
- bubble_view_->GetWidget()->GetContentsView()->Layout();
- // Make sure that the bubble is large enough for the default view.
- if (bubble_type_ == BUBBLE_TYPE_DEFAULT) {
- bubble_view_->SetMaxHeight(0); // Clear max height limit.
- }
-
- if (scoped_layer) {
- // When transitioning from default view to detailed view, animate the new
- // view (slide in from the right).
- if (bubble_type == BUBBLE_TYPE_DETAILED) {
- ui::Layer* new_layer = bubble_view_->layer();
-
- // Make sure the new layer is stacked above the old layer during the
- // animation.
- new_layer->parent()->StackAbove(new_layer, scoped_layer.get());
-
- gfx::Rect bounds = new_layer->bounds();
- gfx::Transform transform;
- transform.Translate(bounds.width(), 0.0);
- new_layer->SetTransform(transform);
- {
- ui::ScopedLayerAnimationSettings settings(new_layer->GetAnimator());
- settings.AddObserver(
- new AnimationObserverDeleteLayer(scoped_layer.release()));
- settings.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kSwipeDelayMS));
- settings.SetTweenType(gfx::Tween::EASE_OUT);
- new_layer->SetTransform(gfx::Transform());
- }
- }
- }
-}
-
-void SystemTrayBubble::InitView(views::View* anchor,
- user::LoginStatus login_status,
- TrayBubbleView::InitParams* init_params) {
- DCHECK(bubble_view_ == NULL);
-
- if (bubble_type_ == BUBBLE_TYPE_DETAILED &&
- init_params->max_height < kDetailedBubbleMaxHeight) {
- init_params->max_height = kDetailedBubbleMaxHeight;
- } else if (bubble_type_ == BUBBLE_TYPE_NOTIFICATION) {
- init_params->close_on_deactivate = false;
- }
- bubble_view_ = TrayBubbleView::Create(
- tray_->GetBubbleWindowContainer(), anchor, tray_, init_params);
- bubble_view_->set_adjust_if_offscreen(false);
- CreateItemViews(login_status);
-
- if (bubble_view_->CanActivate()) {
- bubble_view_->NotifyAccessibilityEvent(
- ui::AccessibilityTypes::EVENT_ALERT, true);
- }
-}
-
-void SystemTrayBubble::FocusDefaultIfNeeded() {
- views::FocusManager* manager = bubble_view_->GetFocusManager();
- if (!manager || manager->GetFocusedView())
- return;
-
- views::View* view = manager->GetNextFocusableView(NULL, NULL, false, false);
- if (view)
- view->RequestFocus();
-}
-
-void SystemTrayBubble::DestroyItemViews() {
- for (std::vector<ash::SystemTrayItem*>::iterator it = items_.begin();
- it != items_.end();
- ++it) {
- switch (bubble_type_) {
- case BUBBLE_TYPE_DEFAULT:
- (*it)->DestroyDefaultView();
- break;
- case BUBBLE_TYPE_DETAILED:
- (*it)->DestroyDetailedView();
- break;
- case BUBBLE_TYPE_NOTIFICATION:
- (*it)->DestroyNotificationView();
- break;
- }
- }
-}
-
-void SystemTrayBubble::BubbleViewDestroyed() {
- bubble_view_ = NULL;
-}
-
-void SystemTrayBubble::StartAutoCloseTimer(int seconds) {
- autoclose_.Stop();
- autoclose_delay_ = seconds;
- if (autoclose_delay_) {
- autoclose_.Start(FROM_HERE,
- base::TimeDelta::FromSeconds(autoclose_delay_),
- this, &SystemTrayBubble::Close);
- }
-}
-
-void SystemTrayBubble::StopAutoCloseTimer() {
- autoclose_.Stop();
-}
-
-void SystemTrayBubble::RestartAutoCloseTimer() {
- if (autoclose_delay_)
- StartAutoCloseTimer(autoclose_delay_);
-}
-
-void SystemTrayBubble::Close() {
- tray_->HideBubbleWithView(bubble_view());
-}
-
-void SystemTrayBubble::SetVisible(bool is_visible) {
- if (!bubble_view_)
- return;
- views::Widget* bubble_widget = bubble_view_->GetWidget();
- if (is_visible)
- bubble_widget->Show();
- else
- bubble_widget->Hide();
-}
-
-bool SystemTrayBubble::IsVisible() {
- return bubble_view() && bubble_view()->GetWidget()->IsVisible();
-}
-
-bool SystemTrayBubble::ShouldShowLauncher() const {
- for (std::vector<ash::SystemTrayItem*>::const_iterator it = items_.begin();
- it != items_.end();
- ++it) {
- if ((*it)->ShouldShowLauncher())
- return true;
- }
- return false;
-}
-
-void SystemTrayBubble::CreateItemViews(user::LoginStatus login_status) {
- std::vector<views::View*> item_views;
- views::View* focus_view = NULL;
- for (size_t i = 0; i < items_.size(); ++i) {
- views::View* view = NULL;
- switch (bubble_type_) {
- case BUBBLE_TYPE_DEFAULT:
- view = items_[i]->CreateDefaultView(login_status);
- if (items_[i]->restore_focus())
- focus_view = view;
- break;
- case BUBBLE_TYPE_DETAILED:
- view = items_[i]->CreateDetailedView(login_status);
- break;
- case BUBBLE_TYPE_NOTIFICATION:
- view = items_[i]->CreateNotificationView(login_status);
- break;
- }
- if (view)
- item_views.push_back(view);
- }
-
- bool is_default_bubble = bubble_type_ == BUBBLE_TYPE_DEFAULT;
- for (size_t i = 0; i < item_views.size(); ++i) {
- // For default view, draw bottom border for each item, except the last
- // 2 items, which are the bottom header row and the one just above it.
- bubble_view_->AddChildView(new TrayPopupItemContainer(
- item_views[i], is_default_bubble,
- is_default_bubble && (i < item_views.size() - 2)));
- }
- if (focus_view)
- focus_view->RequestFocus();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/system_tray_bubble.h b/chromium/ash/system/tray/system_tray_bubble.h
deleted file mode 100644
index b84c3ea022e..00000000000
--- a/chromium/ash/system/tray/system_tray_bubble.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_BUBBLE_H_
-#define ASH_SYSTEM_TRAY_SYSTEM_TRAY_BUBBLE_H_
-
-#include "ash/system/user/login_status.h"
-#include "base/base_export.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/timer/timer.h"
-#include "ui/views/bubble/tray_bubble_view.h"
-
-#include <vector>
-
-namespace ash {
-
-class SystemTray;
-class SystemTrayItem;
-
-namespace internal {
-
-class SystemTrayBubble {
- public:
- enum BubbleType {
- BUBBLE_TYPE_DEFAULT,
- BUBBLE_TYPE_DETAILED,
- BUBBLE_TYPE_NOTIFICATION
- };
-
- SystemTrayBubble(ash::SystemTray* tray,
- const std::vector<ash::SystemTrayItem*>& items,
- BubbleType bubble_type);
- virtual ~SystemTrayBubble();
-
- // Change the items displayed in the bubble.
- void UpdateView(const std::vector<ash::SystemTrayItem*>& items,
- BubbleType bubble_type);
-
- // Creates |bubble_view_| and a child views for each member of |items_|.
- // Also creates |bubble_wrapper_|. |init_params| may be modified.
- void InitView(views::View* anchor,
- user::LoginStatus login_status,
- views::TrayBubbleView::InitParams* init_params);
-
- // Focus the default item if no item is focused. Othewise, do nothing.
- void FocusDefaultIfNeeded();
-
- BubbleType bubble_type() const { return bubble_type_; }
- views::TrayBubbleView* bubble_view() const { return bubble_view_; }
-
- void DestroyItemViews();
- void BubbleViewDestroyed();
- void StartAutoCloseTimer(int seconds);
- void StopAutoCloseTimer();
- void RestartAutoCloseTimer();
- void Close();
- void SetVisible(bool is_visible);
- bool IsVisible();
-
- // Returns true if any of the SystemTrayItems return true from
- // ShouldShowLauncher().
- bool ShouldShowLauncher() const;
-
- private:
- void CreateItemViews(user::LoginStatus login_status);
-
- ash::SystemTray* tray_;
- views::TrayBubbleView* bubble_view_;
- std::vector<ash::SystemTrayItem*> items_;
- BubbleType bubble_type_;
-
- int autoclose_delay_;
- base::OneShotTimer<SystemTrayBubble> autoclose_;
-
- DISALLOW_COPY_AND_ASSIGN(SystemTrayBubble);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_BUBBLE_H_
diff --git a/chromium/ash/system/tray/system_tray_delegate.cc b/chromium/ash/system/tray/system_tray_delegate.cc
deleted file mode 100644
index 084e1587661..00000000000
--- a/chromium/ash/system/tray/system_tray_delegate.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/system_tray_delegate.h"
-
-namespace ash {
-
-NetworkIconInfo::NetworkIconInfo()
- : connecting(false),
- connected(false),
- tray_icon_visible(true),
- is_cellular(false) {
-}
-
-NetworkIconInfo::~NetworkIconInfo() {
-}
-
-BluetoothDeviceInfo::BluetoothDeviceInfo()
- : connected(false),
- connecting(false),
- paired(false) {
-}
-
-BluetoothDeviceInfo::~BluetoothDeviceInfo() {
-}
-
-DriveOperationStatus::DriveOperationStatus()
- : id(-1),
- progress(0.0),
- type(OPERATION_DOWNLOAD),
- state(OPERATION_NOT_STARTED) {
-}
-
-DriveOperationStatus::~DriveOperationStatus() {
-}
-
-IMEInfo::IMEInfo()
- : selected(false),
- third_party(false) {
-}
-
-IMEInfo::~IMEInfo() {
-}
-
-IMEPropertyInfo::IMEPropertyInfo()
- : selected(false) {
-}
-
-IMEPropertyInfo::~IMEPropertyInfo() {
-}
-
-} // namespace ash
diff --git a/chromium/ash/system/tray/system_tray_delegate.h b/chromium/ash/system/tray/system_tray_delegate.h
deleted file mode 100644
index ee325dd95ba..00000000000
--- a/chromium/ash/system/tray/system_tray_delegate.h
+++ /dev/null
@@ -1,321 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_
-#define ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_
-
-#include <string>
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "ash/system/user/login_status.h"
-#include "base/files/file_path.h"
-#include "base/i18n/time_formatting.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/strings/string16.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/gfx/native_widget_types.h"
-
-namespace base {
-class TimeDelta;
-class TimeTicks;
-}
-
-namespace ash {
-
-struct ASH_EXPORT NetworkIconInfo {
- NetworkIconInfo();
- ~NetworkIconInfo();
-
- bool highlight() const { return connected || connecting; }
-
- bool connecting;
- bool connected;
- bool tray_icon_visible;
- gfx::ImageSkia image;
- base::string16 name;
- base::string16 description;
- std::string service_path;
- bool is_cellular;
-};
-
-struct ASH_EXPORT BluetoothDeviceInfo {
- BluetoothDeviceInfo();
- ~BluetoothDeviceInfo();
-
- std::string address;
- base::string16 display_name;
- bool connected;
- bool connecting;
- bool paired;
-};
-
-typedef std::vector<BluetoothDeviceInfo> BluetoothDeviceList;
-
-// Structure that packs progress information of each operation.
-struct ASH_EXPORT DriveOperationStatus {
- enum OperationType {
- OPERATION_UPLOAD,
- OPERATION_DOWNLOAD
- };
-
- enum OperationState {
- OPERATION_NOT_STARTED,
- OPERATION_IN_PROGRESS,
- OPERATION_COMPLETED,
- OPERATION_FAILED,
- };
-
- DriveOperationStatus();
- ~DriveOperationStatus();
-
- // Unique ID for the operation.
- int32 id;
-
- // File path.
- base::FilePath file_path;
- // Current operation completion progress [0.0 - 1.0].
- double progress;
- OperationType type;
- OperationState state;
-};
-
-typedef std::vector<DriveOperationStatus> DriveOperationStatusList;
-
-
-struct ASH_EXPORT IMEPropertyInfo {
- IMEPropertyInfo();
- ~IMEPropertyInfo();
-
- bool selected;
- std::string key;
- base::string16 name;
-};
-
-typedef std::vector<IMEPropertyInfo> IMEPropertyInfoList;
-
-struct ASH_EXPORT IMEInfo {
- IMEInfo();
- ~IMEInfo();
-
- bool selected;
- bool third_party;
- std::string id;
- base::string16 name;
- base::string16 medium_name;
- base::string16 short_name;
-};
-
-typedef std::vector<IMEInfo> IMEInfoList;
-
-class VolumeControlDelegate;
-
-class ASH_EXPORT SystemTrayDelegate {
- public:
- virtual ~SystemTrayDelegate() {}
-
- // Called after SystemTray has been instantiated.
- virtual void Initialize() = 0;
-
- // Called before SystemTray is destroyed.
- virtual void Shutdown() = 0;
-
- // Returns true if system tray should be visible on startup.
- virtual bool GetTrayVisibilityOnStartup() = 0;
-
- // Gets information about the active user.
- virtual user::LoginStatus GetUserLoginStatus() const = 0;
- virtual bool IsOobeCompleted() const = 0;
-
- // Shows UI for changing user's profile picture.
- virtual void ChangeProfilePicture() = 0;
-
- // Returns the domain that manages the device, if it is enterprise-enrolled.
- virtual const std::string GetEnterpriseDomain() const = 0;
-
- // Returns notification for enterprise enrolled devices.
- virtual const base::string16 GetEnterpriseMessage() const = 0;
-
- // Returns the display email of user that manages current
- // locally managed user.
- virtual const std::string GetLocallyManagedUserManager() const = 0;
-
- // Returns the name of user that manages current locally managed user.
- virtual const base::string16 GetLocallyManagedUserManagerName() const = 0;
-
- // Returns notification for locally managed users.
- virtual const base::string16 GetLocallyManagedUserMessage() const = 0;
-
- // Returns whether a system upgrade is available.
- virtual bool SystemShouldUpgrade() const = 0;
-
- // Returns the desired hour clock type.
- virtual base::HourClockType GetHourClockType() const = 0;
-
- // Shows settings.
- virtual void ShowSettings() = 0;
-
- // Returns true if settings menu item should appear.
- virtual bool ShouldShowSettings() = 0;
-
- // Shows the settings related to date, timezone etc.
- virtual void ShowDateSettings() = 0;
-
- // Shows the settings related to network. If |service_path| is not empty,
- // show the settings for that network.
- virtual void ShowNetworkSettings(const std::string& service_path) = 0;
-
- // Shows the settings related to bluetooth.
- virtual void ShowBluetoothSettings() = 0;
-
- // Shows settings related to multiple displays.
- virtual void ShowDisplaySettings() = 0;
-
- // Shows the page that lets you disable performance tracing.
- virtual void ShowChromeSlow() = 0;
-
- // Returns true if the notification for the display configuration change
- // should appear.
- virtual bool ShouldShowDisplayNotification() = 0;
-
- // Shows settings related to Google Drive.
- virtual void ShowDriveSettings() = 0;
-
- // Shows settings related to input methods.
- virtual void ShowIMESettings() = 0;
-
- // Shows help.
- virtual void ShowHelp() = 0;
-
- // Show accessilibity help.
- virtual void ShowAccessibilityHelp() = 0;
-
- // Show the settings related to accessilibity.
- virtual void ShowAccessibilitySettings() = 0;
-
- // Shows more information about public account mode.
- virtual void ShowPublicAccountInfo() = 0;
-
- // Shows information about enterprise enrolled devices.
- virtual void ShowEnterpriseInfo() = 0;
-
- // Shows information about locally managed users.
- virtual void ShowLocallyManagedUserInfo() = 0;
-
- // Shows login UI to add other users to this session.
- virtual void ShowUserLogin() = 0;
-
- // Shows the spring charger replacement dialog if necessary.
- virtual void ShowSpringChargerReplacementDialog() = 0;
-
- // True if user has confirmed using safe spring charger.
- virtual bool HasUserConfirmedSafeSpringCharger() = 0;
-
- // Attempts to shut down the system.
- virtual void ShutDown() = 0;
-
- // Attempts to sign out the user.
- virtual void SignOut() = 0;
-
- // Attempts to lock the screen.
- virtual void RequestLockScreen() = 0;
-
- // Attempts to restart the system for update.
- virtual void RequestRestartForUpdate() = 0;
-
- // Returns a list of available bluetooth devices.
- virtual void GetAvailableBluetoothDevices(BluetoothDeviceList* devices) = 0;
-
- // Requests bluetooth start discovering devices.
- virtual void BluetoothStartDiscovering() = 0;
-
- // Requests bluetooth stop discovering devices.
- virtual void BluetoothStopDiscovering() = 0;
-
- // Connect to a specific bluetooth device.
- virtual void ConnectToBluetoothDevice(const std::string& address) = 0;
-
- // Returns true if bluetooth adapter is discovering bluetooth devices.
- virtual bool IsBluetoothDiscovering() = 0;
-
- // Returns the currently selected IME.
- virtual void GetCurrentIME(IMEInfo* info) = 0;
-
- // Returns a list of availble IMEs.
- virtual void GetAvailableIMEList(IMEInfoList* list) = 0;
-
- // Returns a list of properties for the currently selected IME.
- virtual void GetCurrentIMEProperties(IMEPropertyInfoList* list) = 0;
-
- // Switches to the selected input method.
- virtual void SwitchIME(const std::string& ime_id) = 0;
-
- // Activates an IME property.
- virtual void ActivateIMEProperty(const std::string& key) = 0;
-
- // Cancels ongoing drive operation.
- virtual void CancelDriveOperation(int32 operation_id) = 0;
-
- // Returns information about the ongoing drive operations.
- virtual void GetDriveOperationStatusList(
- DriveOperationStatusList* list) = 0;
-
- // Shows UI to configure or activate the network specified by |network_id|,
- // which may include showing Payment or Portal UI when appropriate.
- // |parent_window| is used to parent any configuration UI. If NULL a default
- // window will be used.
- virtual void ShowNetworkConfigure(const std::string& network_id,
- gfx::NativeWindow parent_window) = 0;
-
- // Shows UI to enroll the network specified by |network_id| if appropriate
- // and returns true, otherwise returns false. |parent_window| is used
- // to parent any configuration UI. If NULL a default window will be used.
- virtual bool EnrollNetwork(const std::string& network_id,
- gfx::NativeWindow parent_window) = 0;
-
- // Shows UI to manage bluetooth devices.
- virtual void ManageBluetoothDevices() = 0;
-
- // Toggles bluetooth.
- virtual void ToggleBluetooth() = 0;
-
- // Shows UI to unlock a mobile sim.
- virtual void ShowMobileSimDialog() = 0;
-
- // Shows UI to setup a mobile network.
- virtual void ShowMobileSetupDialog(const std::string& service_path) = 0;
-
- // Shows UI to connect to an unlisted network of type |type|. On Chrome OS
- // |type| corresponds to a Shill network type.
- virtual void ShowOtherNetworkDialog(const std::string& type) = 0;
-
- // Returns whether bluetooth capability is available.
- virtual bool GetBluetoothAvailable() = 0;
-
- // Returns whether bluetooth is enabled.
- virtual bool GetBluetoothEnabled() = 0;
-
- // Shows UI for changing proxy settings.
- virtual void ChangeProxySettings() = 0;
-
- // Returns VolumeControlDelegate.
- virtual VolumeControlDelegate* GetVolumeControlDelegate() const = 0;
-
- // Sets VolumeControlDelegate.
- virtual void SetVolumeControlDelegate(
- scoped_ptr<VolumeControlDelegate> delegate) = 0;
-
- // Retrieves the session start time. Returns |false| if the time is not set.
- virtual bool GetSessionStartTime(base::TimeTicks* session_start_time) = 0;
-
- // Retrieves the session length limit. Returns |false| if no limit is set.
- virtual bool GetSessionLengthLimit(base::TimeDelta* session_length_limit) = 0;
-
- // Get the system tray menu size in pixels (dependent on the language).
- virtual int GetSystemTrayMenuWidth() = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_
diff --git a/chromium/ash/system/tray/system_tray_item.cc b/chromium/ash/system/tray/system_tray_item.cc
deleted file mode 100644
index f5d5b717c74..00000000000
--- a/chromium/ash/system/tray/system_tray_item.cc
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/system_tray_item.h"
-
-#include "ash/shell.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ui/views/view.h"
-
-namespace ash {
-
-SystemTrayItem::SystemTrayItem(SystemTray* system_tray)
- : system_tray_(system_tray),
- restore_focus_(false) {
-}
-
-SystemTrayItem::~SystemTrayItem() {
-}
-
-views::View* SystemTrayItem::CreateTrayView(user::LoginStatus status) {
- return NULL;
-}
-
-views::View* SystemTrayItem::CreateDefaultView(user::LoginStatus status) {
- return NULL;
-}
-
-views::View* SystemTrayItem::CreateDetailedView(user::LoginStatus status) {
- return NULL;
-}
-
-views::View* SystemTrayItem::CreateNotificationView(user::LoginStatus status) {
- return NULL;
-}
-
-void SystemTrayItem::DestroyTrayView() {
-}
-
-void SystemTrayItem::DestroyDefaultView() {
-}
-
-void SystemTrayItem::DestroyDetailedView() {
-}
-
-void SystemTrayItem::DestroyNotificationView() {
-}
-
-void SystemTrayItem::TransitionDetailedView() {
- system_tray()->ShowDetailedView(this, 0, true, BUBBLE_USE_EXISTING);
-}
-
-void SystemTrayItem::UpdateAfterLoginStatusChange(user::LoginStatus status) {
-}
-
-void SystemTrayItem::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
-}
-
-void SystemTrayItem::PopupDetailedView(int for_seconds, bool activate) {
- // Never show a detailed view during OOBE, e.g. from a notification.
- if (!Shell::GetInstance()->system_tray_delegate()->IsOobeCompleted())
- return;
- system_tray()->ShowDetailedView(
- this, for_seconds, activate, BUBBLE_CREATE_NEW);
-}
-
-void SystemTrayItem::SetDetailedViewCloseDelay(int for_seconds) {
- system_tray()->SetDetailedViewCloseDelay(for_seconds);
-}
-
-void SystemTrayItem::HideDetailedView() {
- system_tray()->HideDetailedView(this);
-}
-
-void SystemTrayItem::ShowNotificationView() {
- system_tray()->ShowNotificationView(this);
-}
-
-void SystemTrayItem::HideNotificationView() {
- system_tray()->HideNotificationView(this);
-}
-
-bool SystemTrayItem::ShouldHideArrow() const {
- return false;
-}
-
-bool SystemTrayItem::ShouldShowLauncher() const {
- return true;
-}
-
-} // namespace ash
diff --git a/chromium/ash/system/tray/system_tray_item.h b/chromium/ash/system/tray/system_tray_item.h
deleted file mode 100644
index b42f3f5b35f..00000000000
--- a/chromium/ash/system/tray/system_tray_item.h
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_
-#define ASH_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_
-
-#include "ash/ash_export.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/system/user/login_status.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-
-namespace views {
-class View;
-}
-
-namespace ash {
-
-class SystemTray;
-
-namespace internal {
-class TrayItemView;
-}
-
-class ASH_EXPORT SystemTrayItem {
- public:
- explicit SystemTrayItem(SystemTray* system_tray);
- virtual ~SystemTrayItem();
-
- // Create* functions may return NULL if nothing should be displayed for the
- // type of view. The default implementations return NULL.
-
- // Returns a view to be displayed in the system tray. If this returns NULL,
- // then this item is not displayed in the tray.
- // NOTE: The returned view should almost always be a TrayItemView, which
- // automatically resizes the widget when the size of the view changes, and
- // adds animation when the visibility of the view changes. If a view wants to
- // avoid this behavior, then it should not be a TrayItemView.
- virtual views::View* CreateTrayView(user::LoginStatus status);
-
- // Returns a view for the item to be displayed in the list. This view can be
- // displayed with a number of other tray items, so this should not be too
- // big.
- virtual views::View* CreateDefaultView(user::LoginStatus status);
-
- // Returns a detailed view for the item. This view is displayed standalone.
- virtual views::View* CreateDetailedView(user::LoginStatus status);
-
- // Returns a notification view for the item. This view is displayed with
- // other notifications and should be the same size as default views.
- virtual views::View* CreateNotificationView(user::LoginStatus status);
-
- // These functions are called when the corresponding view item is about to be
- // removed. An item should do appropriate cleanup in these functions.
- // The default implementation does nothing.
- virtual void DestroyTrayView();
- virtual void DestroyDefaultView();
- virtual void DestroyDetailedView();
- virtual void DestroyNotificationView();
-
- // Updates the tray view (if applicable) when the user's login status changes.
- // It is not necessary the update the default or detailed view, since the
- // default/detailed popup is closed when login status changes. The default
- // implementation does nothing.
- virtual void UpdateAfterLoginStatusChange(user::LoginStatus status);
-
- // Updates the tray view (if applicable) when shelf's alignment changes.
- // The default implementation does nothing.
- virtual void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment);
-
- // Shows the detailed view for this item. If the main popup for the tray is
- // currently visible, then making this call would use the existing window to
- // display the detailed item. The detailed item will inherit the bounds of the
- // existing window.
- // If there is no existing view, then this is equivalent to calling
- // PopupDetailedView(0, true).
- void TransitionDetailedView();
-
- // Pops up the detailed view for this item. An item can request to show its
- // detailed view using this function (e.g. from an observer callback when
- // something, e.g. volume, network availability etc. changes). If
- // |for_seconds| is non-zero, then the popup is closed after the specified
- // time.
- void PopupDetailedView(int for_seconds, bool activate);
-
- // Continue showing the currently-shown detailed view, if any, for
- // |for_seconds| seconds. The caller is responsible for checking that the
- // currently-shown view is for this item.
- void SetDetailedViewCloseDelay(int for_seconds);
-
- // Hides the detailed view for this item.
- void HideDetailedView();
-
- // Shows a notification for this item.
- void ShowNotificationView();
-
- // Hides the notification for this item.
- void HideNotificationView();
-
- // Returns true if item should hide the arrow.
- virtual bool ShouldHideArrow() const;
-
- // Returns true if this item needs to force the launcher to be visible when
- // the launcher is in the auto-hide state. Default is true.
- virtual bool ShouldShowLauncher() const;
-
- // Returns the system tray that this item belongs to.
- SystemTray* system_tray() const { return system_tray_; }
-
- bool restore_focus() const { return restore_focus_; }
- void set_restore_focus(bool restore_focus) {
- restore_focus_ = restore_focus;
- }
-
- private:
- SystemTray* system_tray_;
- bool restore_focus_;
-
- DISALLOW_COPY_AND_ASSIGN(SystemTrayItem);
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_
diff --git a/chromium/ash/system/tray/system_tray_notifier.cc b/chromium/ash/system/tray/system_tray_notifier.cc
deleted file mode 100644
index e2035ad357f..00000000000
--- a/chromium/ash/system/tray/system_tray_notifier.cc
+++ /dev/null
@@ -1,316 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/system_tray_notifier.h"
-
-#if defined(OS_CHROMEOS)
-#include "ash/system/chromeos/network/network_state_notifier.h"
-#endif
-
-namespace ash {
-
-SystemTrayNotifier::SystemTrayNotifier() {
-#if defined(OS_CHROMEOS)
- network_state_notifier_.reset(new NetworkStateNotifier());
-#endif
-}
-
-SystemTrayNotifier::~SystemTrayNotifier() {
-}
-
-void SystemTrayNotifier::AddAccessibilityObserver(
- AccessibilityObserver* observer) {
- accessibility_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveAccessibilityObserver(
- AccessibilityObserver* observer) {
- accessibility_observers_.RemoveObserver(observer);
-}
-
-void SystemTrayNotifier::AddBluetoothObserver(BluetoothObserver* observer) {
- bluetooth_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveBluetoothObserver(BluetoothObserver* observer) {
- bluetooth_observers_.RemoveObserver(observer);
-}
-
-void SystemTrayNotifier::AddCapsLockObserver(CapsLockObserver* observer) {
- caps_lock_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveCapsLockObserver(CapsLockObserver* observer) {
- caps_lock_observers_.RemoveObserver(observer);
-}
-
-void SystemTrayNotifier::AddClockObserver(ClockObserver* observer) {
- clock_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveClockObserver(ClockObserver* observer) {
- clock_observers_.RemoveObserver(observer);
-}
-
-void SystemTrayNotifier::AddDriveObserver(DriveObserver* observer) {
- drive_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveDriveObserver(DriveObserver* observer) {
- drive_observers_.RemoveObserver(observer);
-}
-
-void SystemTrayNotifier::AddIMEObserver(IMEObserver* observer) {
- ime_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveIMEObserver(IMEObserver* observer) {
- ime_observers_.RemoveObserver(observer);
-}
-
-void SystemTrayNotifier::AddLocaleObserver(LocaleObserver* observer) {
- locale_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveLocaleObserver(LocaleObserver* observer) {
- locale_observers_.RemoveObserver(observer);
-}
-
-void SystemTrayNotifier::AddLogoutButtonObserver(
- LogoutButtonObserver* observer) {
- logout_button_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveLogoutButtonObserver(
- LogoutButtonObserver* observer) {
- logout_button_observers_.RemoveObserver(observer);
-}
-
-void SystemTrayNotifier::AddSessionLengthLimitObserver(
- SessionLengthLimitObserver* observer) {
- session_length_limit_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveSessionLengthLimitObserver(
- SessionLengthLimitObserver* observer) {
- session_length_limit_observers_.RemoveObserver(observer);
-}
-
-void SystemTrayNotifier::AddTracingObserver(TracingObserver* observer) {
- tracing_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveTracingObserver(TracingObserver* observer) {
- tracing_observers_.RemoveObserver(observer);
-}
-
-void SystemTrayNotifier::AddUpdateObserver(UpdateObserver* observer) {
- update_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveUpdateObserver(UpdateObserver* observer) {
- update_observers_.RemoveObserver(observer);
-}
-
-void SystemTrayNotifier::AddUserObserver(UserObserver* observer) {
- user_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveUserObserver(UserObserver* observer) {
- user_observers_.RemoveObserver(observer);
-}
-
-#if defined(OS_CHROMEOS)
-
-void SystemTrayNotifier::AddNetworkObserver(NetworkObserver* observer) {
- network_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveNetworkObserver(NetworkObserver* observer) {
- network_observers_.RemoveObserver(observer);
-}
-
-void SystemTrayNotifier::AddEnterpriseDomainObserver(
- EnterpriseDomainObserver* observer) {
- enterprise_domain_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveEnterpriseDomainObserver(
- EnterpriseDomainObserver* observer) {
- enterprise_domain_observers_.RemoveObserver(observer);
-}
-
-void SystemTrayNotifier::AddScreenCaptureObserver(
- ScreenCaptureObserver* observer) {
- screen_capture_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveScreenCaptureObserver(
- ScreenCaptureObserver* observer) {
- screen_capture_observers_.RemoveObserver(observer);
-}
-
-void SystemTrayNotifier::AddScreenShareObserver(
- ScreenShareObserver* observer) {
- screen_share_observers_.AddObserver(observer);
-}
-
-void SystemTrayNotifier::RemoveScreenShareObserver(
- ScreenShareObserver* observer) {
- screen_share_observers_.RemoveObserver(observer);
-}
-#endif
-
-void SystemTrayNotifier::NotifyAccessibilityModeChanged(
- AccessibilityNotificationVisibility notify) {
- FOR_EACH_OBSERVER(
- AccessibilityObserver,
- accessibility_observers_,
- OnAccessibilityModeChanged(notify));
-}
-
-void SystemTrayNotifier::NotifyTracingModeChanged(bool value) {
- FOR_EACH_OBSERVER(
- TracingObserver,
- tracing_observers_,
- OnTracingModeChanged(value));
-}
-
-void SystemTrayNotifier::NotifyRefreshBluetooth() {
- FOR_EACH_OBSERVER(BluetoothObserver,
- bluetooth_observers_,
- OnBluetoothRefresh());
-}
-
-void SystemTrayNotifier::NotifyBluetoothDiscoveringChanged() {
- FOR_EACH_OBSERVER(BluetoothObserver,
- bluetooth_observers_,
- OnBluetoothDiscoveringChanged());
-}
-
-void SystemTrayNotifier::NotifyCapsLockChanged(
- bool enabled,
- bool search_mapped_to_caps_lock) {
- FOR_EACH_OBSERVER(CapsLockObserver,
- caps_lock_observers_,
- OnCapsLockChanged(enabled, search_mapped_to_caps_lock));
-}
-
-void SystemTrayNotifier::NotifyRefreshClock() {
- FOR_EACH_OBSERVER(ClockObserver, clock_observers_, Refresh());
-}
-
-void SystemTrayNotifier::NotifyDateFormatChanged() {
- FOR_EACH_OBSERVER(ClockObserver,
- clock_observers_,
- OnDateFormatChanged());
-}
-
-void SystemTrayNotifier::NotifySystemClockTimeUpdated() {
- FOR_EACH_OBSERVER(ClockObserver,
- clock_observers_,
- OnSystemClockTimeUpdated());
-}
-
-void SystemTrayNotifier::NotifyDriveJobUpdated(
- const DriveOperationStatus& status) {
- FOR_EACH_OBSERVER(DriveObserver,
- drive_observers_,
- OnDriveJobUpdated(status));
-}
-
-void SystemTrayNotifier::NotifyRefreshIME(bool show_message) {
- FOR_EACH_OBSERVER(IMEObserver,
- ime_observers_,
- OnIMERefresh(show_message));
-}
-
-void SystemTrayNotifier::NotifyShowLoginButtonChanged(bool show_login_button) {
- FOR_EACH_OBSERVER(LogoutButtonObserver,
- logout_button_observers_,
- OnShowLogoutButtonInTrayChanged(show_login_button));
-}
-
-void SystemTrayNotifier::NotifyLocaleChanged(
- LocaleObserver::Delegate* delegate,
- const std::string& cur_locale,
- const std::string& from_locale,
- const std::string& to_locale) {
- FOR_EACH_OBSERVER(
- LocaleObserver,
- locale_observers_,
- OnLocaleChanged(delegate, cur_locale, from_locale, to_locale));
-}
-
-void SystemTrayNotifier::NotifySessionStartTimeChanged() {
- FOR_EACH_OBSERVER(SessionLengthLimitObserver,
- session_length_limit_observers_,
- OnSessionStartTimeChanged());
-}
-
-void SystemTrayNotifier::NotifySessionLengthLimitChanged() {
- FOR_EACH_OBSERVER(SessionLengthLimitObserver,
- session_length_limit_observers_,
- OnSessionLengthLimitChanged());
-}
-
-void SystemTrayNotifier::NotifyUpdateRecommended(
- UpdateObserver::UpdateSeverity severity) {
- FOR_EACH_OBSERVER(UpdateObserver,
- update_observers_,
- OnUpdateRecommended(severity));
-}
-
-void SystemTrayNotifier::NotifyUserUpdate() {
- FOR_EACH_OBSERVER(UserObserver,
- user_observers_,
- OnUserUpdate());
-}
-
-void SystemTrayNotifier::NotifyUserAddedToSession() {
- FOR_EACH_OBSERVER(UserObserver,
- user_observers_,
- OnUserAddedToSession());
-}
-
-#if defined(OS_CHROMEOS)
-
-void SystemTrayNotifier::NotifyRequestToggleWifi() {
- FOR_EACH_OBSERVER(NetworkObserver,
- network_observers_,
- RequestToggleWifi());
-}
-
-void SystemTrayNotifier::NotifyEnterpriseDomainChanged() {
- FOR_EACH_OBSERVER(EnterpriseDomainObserver, enterprise_domain_observers_,
- OnEnterpriseDomainChanged());
-}
-
-void SystemTrayNotifier::NotifyScreenCaptureStart(
- const base::Closure& stop_callback,
- const base::string16& sharing_app_name) {
- FOR_EACH_OBSERVER(ScreenCaptureObserver, screen_capture_observers_,
- OnScreenCaptureStart(stop_callback, sharing_app_name));
-}
-
-void SystemTrayNotifier::NotifyScreenCaptureStop() {
- FOR_EACH_OBSERVER(ScreenCaptureObserver, screen_capture_observers_,
- OnScreenCaptureStop());
-}
-
-void SystemTrayNotifier::NotifyScreenShareStart(
- const base::Closure& stop_callback,
- const base::string16& helper_name) {
- FOR_EACH_OBSERVER(ScreenShareObserver, screen_share_observers_,
- OnScreenShareStart(stop_callback, helper_name));
-}
-
-void SystemTrayNotifier::NotifyScreenShareStop() {
- FOR_EACH_OBSERVER(ScreenShareObserver, screen_share_observers_,
- OnScreenShareStop());
-}
-
-#endif // OS_CHROMEOS
-
-} // namespace ash
diff --git a/chromium/ash/system/tray/system_tray_notifier.h b/chromium/ash/system/tray/system_tray_notifier.h
deleted file mode 100644
index 3d7fb0e63e0..00000000000
--- a/chromium/ash/system/tray/system_tray_notifier.h
+++ /dev/null
@@ -1,156 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
-#define ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
-
-#include <string>
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "ash/system/bluetooth/bluetooth_observer.h"
-#include "ash/system/chromeos/tray_tracing.h"
-#include "ash/system/date/clock_observer.h"
-#include "ash/system/drive/drive_observer.h"
-#include "ash/system/ime/ime_observer.h"
-#include "ash/system/locale/locale_observer.h"
-#include "ash/system/logout_button/logout_button_observer.h"
-#include "ash/system/session_length_limit/session_length_limit_observer.h"
-#include "ash/system/tray_accessibility.h"
-#include "ash/system/tray_caps_lock.h"
-#include "ash/system/user/update_observer.h"
-#include "ash/system/user/user_observer.h"
-#include "base/observer_list.h"
-
-#if defined(OS_CHROMEOS)
-#include "ash/system/chromeos/enterprise/enterprise_domain_observer.h"
-#include "ash/system/chromeos/network/network_observer.h"
-#include "ash/system/chromeos/screen_security/screen_capture_observer.h"
-#include "ash/system/chromeos/screen_security/screen_share_observer.h"
-#endif
-
-namespace ash {
-
-#if defined(OS_CHROMEOS)
-class NetworkStateNotifier;
-#endif
-
-class ASH_EXPORT SystemTrayNotifier {
-public:
- SystemTrayNotifier();
- ~SystemTrayNotifier();
-
- void AddAccessibilityObserver(AccessibilityObserver* observer);
- void RemoveAccessibilityObserver(AccessibilityObserver* observer);
-
- void AddBluetoothObserver(BluetoothObserver* observer);
- void RemoveBluetoothObserver(BluetoothObserver* observer);
-
- void AddCapsLockObserver(CapsLockObserver* observer);
- void RemoveCapsLockObserver(CapsLockObserver* observer);
-
- void AddClockObserver(ClockObserver* observer);
- void RemoveClockObserver(ClockObserver* observer);
-
- void AddDriveObserver(DriveObserver* observer);
- void RemoveDriveObserver(DriveObserver* observer);
-
- void AddIMEObserver(IMEObserver* observer);
- void RemoveIMEObserver(IMEObserver* observer);
-
- void AddLocaleObserver(LocaleObserver* observer);
- void RemoveLocaleObserver(LocaleObserver* observer);
-
- void AddLogoutButtonObserver(LogoutButtonObserver* observer);
- void RemoveLogoutButtonObserver(LogoutButtonObserver* observer);
-
- void AddSessionLengthLimitObserver(SessionLengthLimitObserver* observer);
- void RemoveSessionLengthLimitObserver(SessionLengthLimitObserver* observer);
-
- void AddTracingObserver(TracingObserver* observer);
- void RemoveTracingObserver(TracingObserver* observer);
-
- void AddUpdateObserver(UpdateObserver* observer);
- void RemoveUpdateObserver(UpdateObserver* observer);
-
- void AddUserObserver(UserObserver* observer);
- void RemoveUserObserver(UserObserver* observer);
-
-#if defined(OS_CHROMEOS)
- void AddNetworkObserver(NetworkObserver* observer);
- void RemoveNetworkObserver(NetworkObserver* observer);
-
- void AddEnterpriseDomainObserver(EnterpriseDomainObserver* observer);
- void RemoveEnterpriseDomainObserver(EnterpriseDomainObserver* observer);
-
- void AddScreenCaptureObserver(ScreenCaptureObserver* observer);
- void RemoveScreenCaptureObserver(ScreenCaptureObserver* observer);
-
- void AddScreenShareObserver(ScreenShareObserver* observer);
- void RemoveScreenShareObserver(ScreenShareObserver* observer);
-#endif
-
- void NotifyAccessibilityModeChanged(
- AccessibilityNotificationVisibility notify);
- void NotifyTracingModeChanged(bool value);
- void NotifyRefreshBluetooth();
- void NotifyBluetoothDiscoveringChanged();
- void NotifyCapsLockChanged(bool enabled, bool search_mapped_to_caps_lock);
- void NotifyRefreshClock();
- void NotifyDateFormatChanged();
- void NotifySystemClockTimeUpdated();
- void NotifyDriveJobUpdated(const DriveOperationStatus& status);
- void NotifyRefreshIME(bool show_message);
- void NotifyShowLoginButtonChanged(bool show_login_button);
- void NotifyLocaleChanged(LocaleObserver::Delegate* delegate,
- const std::string& cur_locale,
- const std::string& from_locale,
- const std::string& to_locale);
- void NotifySessionStartTimeChanged();
- void NotifySessionLengthLimitChanged();
- void NotifyUpdateRecommended(UpdateObserver::UpdateSeverity severity);
- void NotifyUserUpdate();
- void NotifyUserAddedToSession();
-#if defined(OS_CHROMEOS)
- void NotifyRequestToggleWifi();
- void NotifyEnterpriseDomainChanged();
- void NotifyScreenCaptureStart(const base::Closure& stop_callback,
- const base::string16& sharing_app_name);
- void NotifyScreenCaptureStop();
- void NotifyScreenShareStart(const base::Closure& stop_callback,
- const base::string16& helper_name);
- void NotifyScreenShareStop();
-
- NetworkStateNotifier* network_state_notifier() {
- return network_state_notifier_.get();
- }
-#endif
-
- private:
- ObserverList<AccessibilityObserver> accessibility_observers_;
- ObserverList<BluetoothObserver> bluetooth_observers_;
- ObserverList<CapsLockObserver> caps_lock_observers_;
- ObserverList<ClockObserver> clock_observers_;
- ObserverList<DriveObserver> drive_observers_;
- ObserverList<IMEObserver> ime_observers_;
- ObserverList<LocaleObserver> locale_observers_;
- ObserverList<LogoutButtonObserver> logout_button_observers_;
- ObserverList<SessionLengthLimitObserver> session_length_limit_observers_;
- ObserverList<TracingObserver> tracing_observers_;
- ObserverList<UpdateObserver> update_observers_;
- ObserverList<UserObserver> user_observers_;
-#if defined(OS_CHROMEOS)
- ObserverList<NetworkObserver> network_observers_;
- ObserverList<EnterpriseDomainObserver> enterprise_domain_observers_;
- ObserverList<ScreenCaptureObserver> screen_capture_observers_;
- ObserverList<ScreenShareObserver> screen_share_observers_;
- scoped_ptr<NetworkStateNotifier> network_state_notifier_;
-#endif
-
- DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier);
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_NOTIFIER_H_
diff --git a/chromium/ash/system/tray/system_tray_unittest.cc b/chromium/ash/system/tray/system_tray_unittest.cc
deleted file mode 100644
index 779975ac621..00000000000
--- a/chromium/ash/system/tray/system_tray_unittest.cc
+++ /dev/null
@@ -1,421 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/system_tray.h"
-
-#include <vector>
-
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/window_util.h"
-#include "base/run_loop.h"
-#include "base/strings/utf_string_conversions.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/window.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/fill_layout.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-#if defined(OS_WIN)
-#include "base/win/windows_version.h"
-#endif
-
-namespace ash {
-namespace test {
-
-namespace {
-
-SystemTray* GetSystemTray() {
- return Shell::GetPrimaryRootWindowController()->shelf()->
- status_area_widget()->system_tray();
-}
-
-// Trivial item implementation that tracks its views for testing.
-class TestItem : public SystemTrayItem {
- public:
- TestItem() : SystemTrayItem(GetSystemTray()), tray_view_(NULL) {}
-
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE {
- tray_view_ = new views::View;
- // Add a label so it has non-zero width.
- tray_view_->SetLayoutManager(new views::FillLayout);
- tray_view_->AddChildView(new views::Label(UTF8ToUTF16("Tray")));
- return tray_view_;
- }
-
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE {
- default_view_ = new views::View;
- default_view_->SetLayoutManager(new views::FillLayout);
- default_view_->AddChildView(new views::Label(UTF8ToUTF16("Default")));
- return default_view_;
- }
-
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE {
- detailed_view_ = new views::View;
- detailed_view_->SetLayoutManager(new views::FillLayout);
- detailed_view_->AddChildView(new views::Label(UTF8ToUTF16("Detailed")));
- return detailed_view_;
- }
-
- virtual views::View* CreateNotificationView(
- user::LoginStatus status) OVERRIDE {
- notification_view_ = new views::View;
- return notification_view_;
- }
-
- virtual void DestroyTrayView() OVERRIDE {
- tray_view_ = NULL;
- }
-
- virtual void DestroyDefaultView() OVERRIDE {
- default_view_ = NULL;
- }
-
- virtual void DestroyDetailedView() OVERRIDE {
- detailed_view_ = NULL;
- }
-
- virtual void DestroyNotificationView() OVERRIDE {
- notification_view_ = NULL;
- }
-
- virtual void UpdateAfterLoginStatusChange(
- user::LoginStatus status) OVERRIDE {
- }
-
- views::View* tray_view() const { return tray_view_; }
- views::View* default_view() const { return default_view_; }
- views::View* detailed_view() const { return detailed_view_; }
- views::View* notification_view() const { return notification_view_; }
-
- private:
- views::View* tray_view_;
- views::View* default_view_;
- views::View* detailed_view_;
- views::View* notification_view_;
-};
-
-// Trivial item implementation that returns NULL from tray/default/detailed
-// view creation methods.
-class TestNoViewItem : public SystemTrayItem {
- public:
- TestNoViewItem() : SystemTrayItem(GetSystemTray()) {}
-
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE {
- return NULL;
- }
-
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE {
- return NULL;
- }
-
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE {
- return NULL;
- }
-
- virtual views::View* CreateNotificationView(
- user::LoginStatus status) OVERRIDE {
- return NULL;
- }
-
- virtual void DestroyTrayView() OVERRIDE {}
- virtual void DestroyDefaultView() OVERRIDE {}
- virtual void DestroyDetailedView() OVERRIDE {}
- virtual void DestroyNotificationView() OVERRIDE {}
- virtual void UpdateAfterLoginStatusChange(
- user::LoginStatus status) OVERRIDE {
- }
-};
-
-} // namespace
-
-typedef AshTestBase SystemTrayTest;
-
-TEST_F(SystemTrayTest, SystemTrayDefaultView) {
- SystemTray* tray = GetSystemTray();
- ASSERT_TRUE(tray->GetWidget());
-
- tray->ShowDefaultView(BUBBLE_CREATE_NEW);
-
- // Ensure that closing the bubble destroys it.
- ASSERT_TRUE(tray->CloseSystemBubble());
- RunAllPendingInMessageLoop();
- ASSERT_FALSE(tray->CloseSystemBubble());
-}
-
-// Opening and closing the bubble should change the coloring of the tray.
-TEST_F(SystemTrayTest, SystemTrayColoring) {
- SystemTray* tray = GetSystemTray();
- ASSERT_TRUE(tray->GetWidget());
- // At the beginning the tray coloring is not active.
- ASSERT_FALSE(tray->draw_background_as_active());
-
- // Showing the system bubble should show the background as active.
- tray->ShowDefaultView(BUBBLE_CREATE_NEW);
- ASSERT_TRUE(tray->draw_background_as_active());
-
- // Closing the system menu should change the coloring back to normal.
- ASSERT_TRUE(tray->CloseSystemBubble());
- RunAllPendingInMessageLoop();
- ASSERT_FALSE(tray->draw_background_as_active());
-}
-
-// Closing the system bubble through an alignment change should change the
-// system tray coloring back to normal.
-TEST_F(SystemTrayTest, SystemTrayColoringAfterAlignmentChange) {
- SystemTray* tray = GetSystemTray();
- ASSERT_TRUE(tray->GetWidget());
- internal::ShelfLayoutManager* manager =
- Shell::GetPrimaryRootWindowController()->shelf()->shelf_layout_manager();
- manager->SetAlignment(SHELF_ALIGNMENT_BOTTOM);
- // At the beginning the tray coloring is not active.
- ASSERT_FALSE(tray->draw_background_as_active());
-
- // Showing the system bubble should show the background as active.
- tray->ShowDefaultView(BUBBLE_CREATE_NEW);
- ASSERT_TRUE(tray->draw_background_as_active());
-
- // Changing the alignment should close the system bubble and change the
- // background color.
- manager->SetAlignment(SHELF_ALIGNMENT_LEFT);
- ASSERT_FALSE(tray->draw_background_as_active());
- RunAllPendingInMessageLoop();
- // The bubble should already be closed by now.
- ASSERT_FALSE(tray->CloseSystemBubble());
-}
-
-TEST_F(SystemTrayTest, SystemTrayTestItems) {
- SystemTray* tray = GetSystemTray();
- ASSERT_TRUE(tray->GetWidget());
-
- TestItem* test_item = new TestItem;
- TestItem* detailed_item = new TestItem;
- tray->AddTrayItem(test_item);
- tray->AddTrayItem(detailed_item);
-
- // Check items have been added
- const std::vector<SystemTrayItem*>& items = tray->GetTrayItems();
- ASSERT_TRUE(
- std::find(items.begin(), items.end(), test_item) != items.end());
- ASSERT_TRUE(
- std::find(items.begin(), items.end(), detailed_item) != items.end());
-
- // Ensure the tray views are created.
- ASSERT_TRUE(test_item->tray_view() != NULL);
- ASSERT_TRUE(detailed_item->tray_view() != NULL);
-
- // Ensure a default views are created.
- tray->ShowDefaultView(BUBBLE_CREATE_NEW);
- ASSERT_TRUE(test_item->default_view() != NULL);
- ASSERT_TRUE(detailed_item->default_view() != NULL);
-
- // Show the detailed view, ensure it's created and the default view destroyed.
- tray->ShowDetailedView(detailed_item, 0, false, BUBBLE_CREATE_NEW);
- RunAllPendingInMessageLoop();
- ASSERT_TRUE(test_item->default_view() == NULL);
- ASSERT_TRUE(detailed_item->detailed_view() != NULL);
-
- // Show the default view, ensure it's created and the detailed view destroyed.
- tray->ShowDefaultView(BUBBLE_CREATE_NEW);
- RunAllPendingInMessageLoop();
- ASSERT_TRUE(test_item->default_view() != NULL);
- ASSERT_TRUE(detailed_item->detailed_view() == NULL);
-}
-
-TEST_F(SystemTrayTest, SystemTrayNoViewItems) {
- SystemTray* tray = GetSystemTray();
- ASSERT_TRUE(tray->GetWidget());
-
- // Verify that no crashes occur on items lacking some views.
- TestNoViewItem* no_view_item = new TestNoViewItem;
- tray->AddTrayItem(no_view_item);
- tray->ShowDefaultView(BUBBLE_CREATE_NEW);
- tray->ShowDetailedView(no_view_item, 0, false, BUBBLE_USE_EXISTING);
- RunAllPendingInMessageLoop();
-}
-
-TEST_F(SystemTrayTest, TrayWidgetAutoResizes) {
- SystemTray* tray = GetSystemTray();
- ASSERT_TRUE(tray->GetWidget());
-
- // Add an initial tray item so that the tray gets laid out correctly.
- TestItem* initial_item = new TestItem;
- tray->AddTrayItem(initial_item);
-
- gfx::Size initial_size = tray->GetWidget()->GetWindowBoundsInScreen().size();
-
- TestItem* new_item = new TestItem;
- tray->AddTrayItem(new_item);
-
- gfx::Size new_size = tray->GetWidget()->GetWindowBoundsInScreen().size();
-
- // Adding the new item should change the size of the tray.
- EXPECT_NE(initial_size.ToString(), new_size.ToString());
-
- // Hiding the tray view of the new item should also change the size of the
- // tray.
- new_item->tray_view()->SetVisible(false);
- EXPECT_EQ(initial_size.ToString(),
- tray->GetWidget()->GetWindowBoundsInScreen().size().ToString());
-
- new_item->tray_view()->SetVisible(true);
- EXPECT_EQ(new_size.ToString(),
- tray->GetWidget()->GetWindowBoundsInScreen().size().ToString());
-}
-
-TEST_F(SystemTrayTest, SystemTrayNotifications) {
- SystemTray* tray = GetSystemTray();
- ASSERT_TRUE(tray->GetWidget());
-
- TestItem* test_item = new TestItem;
- TestItem* detailed_item = new TestItem;
- tray->AddTrayItem(test_item);
- tray->AddTrayItem(detailed_item);
-
- // Ensure the tray views are created.
- ASSERT_TRUE(test_item->tray_view() != NULL);
- ASSERT_TRUE(detailed_item->tray_view() != NULL);
-
- // Ensure a notification view is created.
- tray->ShowNotificationView(test_item);
- ASSERT_TRUE(test_item->notification_view() != NULL);
-
- // Show the default view, notification view should remain.
- tray->ShowDefaultView(BUBBLE_CREATE_NEW);
- RunAllPendingInMessageLoop();
- ASSERT_TRUE(test_item->notification_view() != NULL);
-
- // Show the detailed view, ensure the notificaiton view remains.
- tray->ShowDetailedView(detailed_item, 0, false, BUBBLE_CREATE_NEW);
- RunAllPendingInMessageLoop();
- ASSERT_TRUE(detailed_item->detailed_view() != NULL);
- ASSERT_TRUE(test_item->notification_view() != NULL);
-
- // Hide the detailed view, ensure the notification view still exists.
- ASSERT_TRUE(tray->CloseSystemBubble());
- RunAllPendingInMessageLoop();
- ASSERT_TRUE(detailed_item->detailed_view() == NULL);
- ASSERT_TRUE(test_item->notification_view() != NULL);
-}
-
-TEST_F(SystemTrayTest, BubbleCreationTypesTest) {
- SystemTray* tray = GetSystemTray();
- ASSERT_TRUE(tray->GetWidget());
-
- TestItem* test_item = new TestItem;
- tray->AddTrayItem(test_item);
-
- // Ensure the tray views are created.
- ASSERT_TRUE(test_item->tray_view() != NULL);
-
- // Show the default view, ensure the notification view is destroyed.
- tray->ShowDefaultView(BUBBLE_CREATE_NEW);
- RunAllPendingInMessageLoop();
-
- views::Widget* widget = test_item->default_view()->GetWidget();
- gfx::Rect bubble_bounds = widget->GetWindowBoundsInScreen();
-
- tray->ShowDetailedView(test_item, 0, true, BUBBLE_USE_EXISTING);
- RunAllPendingInMessageLoop();
-
- EXPECT_FALSE(test_item->default_view());
-
- EXPECT_EQ(bubble_bounds.ToString(), test_item->detailed_view()->GetWidget()->
- GetWindowBoundsInScreen().ToString());
- EXPECT_EQ(widget, test_item->detailed_view()->GetWidget());
-
- tray->ShowDefaultView(BUBBLE_USE_EXISTING);
- RunAllPendingInMessageLoop();
-
- EXPECT_EQ(bubble_bounds.ToString(), test_item->default_view()->GetWidget()->
- GetWindowBoundsInScreen().ToString());
- EXPECT_EQ(widget, test_item->default_view()->GetWidget());
-}
-
-// Tests that the tray is laid out properly and is fully contained within
-// the shelf.
-TEST_F(SystemTrayTest, TrayBoundsInWidget) {
- internal::ShelfLayoutManager* manager =
- Shell::GetPrimaryRootWindowController()->shelf()->shelf_layout_manager();
- internal::StatusAreaWidget* widget =
- Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget();
- SystemTray* tray = widget->system_tray();
-
- // Test in bottom alignment.
- manager->SetAlignment(SHELF_ALIGNMENT_BOTTOM);
- gfx::Rect window_bounds = widget->GetWindowBoundsInScreen();
- gfx::Rect tray_bounds = tray->GetBoundsInScreen();
- EXPECT_TRUE(window_bounds.bottom() >= tray_bounds.bottom());
- EXPECT_TRUE(window_bounds.right() >= tray_bounds.right());
- EXPECT_TRUE(window_bounds.x() >= tray_bounds.x());
- EXPECT_TRUE(window_bounds.y() >= tray_bounds.y());
-
- // Test in the left alignment.
- manager->SetAlignment(SHELF_ALIGNMENT_LEFT);
- window_bounds = widget->GetWindowBoundsInScreen();
- tray_bounds = tray->GetBoundsInScreen();
- EXPECT_TRUE(window_bounds.bottom() >= tray_bounds.bottom());
- EXPECT_TRUE(window_bounds.right() >= tray_bounds.right());
- EXPECT_TRUE(window_bounds.x() >= tray_bounds.x());
- EXPECT_TRUE(window_bounds.y() >= tray_bounds.y());
-
- // Test in the right alignment.
- manager->SetAlignment(SHELF_ALIGNMENT_LEFT);
- window_bounds = widget->GetWindowBoundsInScreen();
- tray_bounds = tray->GetBoundsInScreen();
- EXPECT_TRUE(window_bounds.bottom() >= tray_bounds.bottom());
- EXPECT_TRUE(window_bounds.right() >= tray_bounds.right());
- EXPECT_TRUE(window_bounds.x() >= tray_bounds.x());
- EXPECT_TRUE(window_bounds.y() >= tray_bounds.y());
-}
-
-TEST_F(SystemTrayTest, PersistentBubble) {
- SystemTray* tray = GetSystemTray();
- ASSERT_TRUE(tray->GetWidget());
-
- TestItem* test_item = new TestItem;
- tray->AddTrayItem(test_item);
-
- scoped_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
-
- // Tests for usual default view.
- // Activating window.
- tray->ShowDefaultView(BUBBLE_CREATE_NEW);
- ASSERT_TRUE(tray->HasSystemBubble());
- wm::ActivateWindow(window.get());
- base::RunLoop().RunUntilIdle();
- ASSERT_FALSE(tray->HasSystemBubble());
-
- tray->ShowDefaultView(BUBBLE_CREATE_NEW);
- ASSERT_TRUE(tray->HasSystemBubble());
- {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point(5, 5));
- generator.ClickLeftButton();
- ASSERT_FALSE(tray->HasSystemBubble());
- }
-
- // Same tests for persistent default view.
- tray->ShowPersistentDefaultView();
- ASSERT_TRUE(tray->HasSystemBubble());
- wm::ActivateWindow(window.get());
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(tray->HasSystemBubble());
-
- {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point(5, 5));
- generator.ClickLeftButton();
- ASSERT_TRUE(tray->HasSystemBubble());
- }
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/system/tray/throbber_view.cc b/chromium/ash/system/tray/throbber_view.cc
deleted file mode 100644
index 2c2cc206904..00000000000
--- a/chromium/ash/system/tray/throbber_view.cc
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/throbber_view.h"
-
-#include "ash/system/tray/tray_constants.h"
-#include "grit/ash_resources.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-// Time in ms per throbber frame.
-const int kThrobberFrameMs = 30;
-
-// Duration for showing/hiding animation in milliseconds.
-const int kThrobberAnimationDurationMs = 200;
-
-} // namespace
-
-SystemTrayThrobber::SystemTrayThrobber(int frame_delay_ms)
- : views::SmoothedThrobber(frame_delay_ms) {
-}
-
-SystemTrayThrobber::~SystemTrayThrobber() {
-}
-
-void SystemTrayThrobber::SetTooltipText(const base::string16& tooltip_text) {
- tooltip_text_ = tooltip_text;
-}
-
-bool SystemTrayThrobber::GetTooltipText(const gfx::Point& p,
- base::string16* tooltip) const {
- if (tooltip_text_.empty())
- return false;
-
- *tooltip = tooltip_text_;
- return true;
-}
-
-ThrobberView::ThrobberView() {
- throbber_ = new SystemTrayThrobber(kThrobberFrameMs);
- throbber_->SetFrames(ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- IDR_AURA_CROS_DEFAULT_THROBBER).ToImageSkia());
- throbber_->set_stop_delay_ms(kThrobberAnimationDurationMs);
- AddChildView(throbber_);
-
- SetPaintToLayer(true);
- layer()->SetFillsBoundsOpaquely(false);
- layer()->SetOpacity(0.0);
-}
-
-ThrobberView::~ThrobberView() {
-}
-
-gfx::Size ThrobberView::GetPreferredSize() {
- return gfx::Size(ash::kTrayPopupItemHeight, ash::kTrayPopupItemHeight);
-}
-
-void ThrobberView::Layout() {
- View* child = child_at(0);
- gfx::Size ps = child->GetPreferredSize();
- child->SetBounds((width() - ps.width()) / 2,
- (height() - ps.height()) / 2,
- ps.width(), ps.height());
- SizeToPreferredSize();
-}
-
-bool ThrobberView::GetTooltipText(const gfx::Point& p,
- base::string16* tooltip) const {
- if (tooltip_text_.empty())
- return false;
-
- *tooltip = tooltip_text_;
- return true;
-}
-
-void ThrobberView::Start() {
- ScheduleAnimation(true);
- throbber_->Start();
-}
-
-void ThrobberView::Stop() {
- ScheduleAnimation(false);
- throbber_->Stop();
-}
-
-void ThrobberView::SetTooltipText(const base::string16& tooltip_text) {
- tooltip_text_ = tooltip_text;
- throbber_->SetTooltipText(tooltip_text);
-}
-
-void ThrobberView::ScheduleAnimation(bool start_throbber) {
- // Stop any previous animation.
- layer()->GetAnimator()->StopAnimating();
-
- ui::ScopedLayerAnimationSettings animation(layer()->GetAnimator());
- animation.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kThrobberAnimationDurationMs));
-
- layer()->SetOpacity(start_throbber ? 1.0 : 0.0);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/throbber_view.h b/chromium/ash/system/tray/throbber_view.h
deleted file mode 100644
index 0f2663280e2..00000000000
--- a/chromium/ash/system/tray/throbber_view.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_THROBBER_VIEW_H_
-#define ASH_SYSTEM_TRAY_THROBBER_VIEW_H_
-
-#include "ui/gfx/size.h"
-#include "ui/views/controls/throbber.h"
-#include "ui/views/view.h"
-
-namespace ash {
-namespace internal {
-
-// A SmoothedThrobber with tooltip.
-class SystemTrayThrobber : public views::SmoothedThrobber {
- public:
- SystemTrayThrobber(int frame_delay_ms);
- virtual ~SystemTrayThrobber();
-
- void SetTooltipText(const base::string16& tooltip_text);
-
- // Overriden from views::View.
- virtual bool GetTooltipText(
- const gfx::Point& p, base::string16* tooltip) const OVERRIDE;
-
- private:
- // The current tooltip text.
- base::string16 tooltip_text_;
-
- DISALLOW_COPY_AND_ASSIGN(SystemTrayThrobber);
-};
-
-// A View containing a SystemTrayThrobber with animation for starting/stopping.
-class ThrobberView : public views::View {
- public:
- ThrobberView();
- virtual ~ThrobberView();
-
- void Start();
- void Stop();
- void SetTooltipText(const base::string16& tooltip_text);
-
- // Overriden from views::View.
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual bool GetTooltipText(
- const gfx::Point& p, base::string16* tooltip) const OVERRIDE;
-
- private:
- // Schedules animation for starting/stopping throbber.
- void ScheduleAnimation(bool start_throbber);
-
- SystemTrayThrobber* throbber_;
-
- // The current tooltip text.
- base::string16 tooltip_text_;
-
- DISALLOW_COPY_AND_ASSIGN(ThrobberView);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_THROBBER_VIEW_H_
diff --git a/chromium/ash/system/tray/tray_background_view.cc b/chromium/ash/system/tray/tray_background_view.cc
deleted file mode 100644
index 80cac07e364..00000000000
--- a/chromium/ash/system/tray/tray_background_view.cc
+++ /dev/null
@@ -1,634 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/tray_background_view.h"
-
-#include "ash/ash_switches.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/system/status_area_widget_delegate.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_event_filter.h"
-#include "ash/wm/window_animations.h"
-#include "grit/ash_resources.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/base/accessibility/accessible_view_state.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/gfx/image/image_skia_operations.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/screen.h"
-#include "ui/gfx/skia_util.h"
-#include "ui/views/background.h"
-#include "ui/views/layout/box_layout.h"
-
-namespace {
-
-const int kTrayBackgroundAlpha = 100;
-const int kTrayBackgroundHoverAlpha = 150;
-const SkColor kTrayBackgroundPressedColor = SkColorSetRGB(66, 129, 244);
-
-// Adjust the size of TrayContainer with additional padding.
-const int kTrayContainerVerticalPaddingBottomAlignment = 1;
-const int kTrayContainerHorizontalPaddingBottomAlignment = 1;
-const int kTrayContainerVerticalPaddingVerticalAlignment = 1;
-const int kTrayContainerHorizontalPaddingVerticalAlignment = 1;
-
-const int kAnimationDurationForPopupMS = 200;
-
-} // namespace
-
-using views::TrayBubbleView;
-
-namespace ash {
-namespace internal {
-
-// static
-const char TrayBackgroundView::kViewClassName[] = "tray/TrayBackgroundView";
-
-// Used to track when the anchor widget changes position on screen so that the
-// bubble position can be updated.
-class TrayBackgroundView::TrayWidgetObserver : public views::WidgetObserver {
- public:
- explicit TrayWidgetObserver(TrayBackgroundView* host)
- : host_(host) {
- }
-
- virtual void OnWidgetBoundsChanged(views::Widget* widget,
- const gfx::Rect& new_bounds) OVERRIDE {
- host_->AnchorUpdated();
- }
-
- virtual void OnWidgetVisibilityChanged(views::Widget* widget,
- bool visible) OVERRIDE {
- host_->AnchorUpdated();
- }
-
- private:
- TrayBackgroundView* host_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayWidgetObserver);
-};
-
-class TrayBackground : public views::Background {
- public:
- const static int kImageTypeDefault = 0;
- const static int kImageTypeOnBlack = 1;
- const static int kImageTypePressed = 2;
- const static int kNumStates = 3;
-
- const static int kImageHorizontal = 0;
- const static int kImageVertical = 1;
- const static int kNumOrientations = 2;
-
- explicit TrayBackground(TrayBackgroundView* tray_background_view) :
- tray_background_view_(tray_background_view) {
- set_alpha(kTrayBackgroundAlpha);
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- leading_images_[kImageHorizontal][kImageTypeDefault] =
- rb.GetImageNamed(IDR_AURA_TRAY_BG_HORIZ_LEFT).ToImageSkia();
- middle_images_[kImageHorizontal][kImageTypeDefault] =
- rb.GetImageNamed(IDR_AURA_TRAY_BG_HORIZ_CENTER).ToImageSkia();
- trailing_images_[kImageHorizontal][kImageTypeDefault] =
- rb.GetImageNamed(IDR_AURA_TRAY_BG_HORIZ_RIGHT).ToImageSkia();
-
- leading_images_[kImageHorizontal][kImageTypeOnBlack] =
- rb.GetImageNamed(IDR_AURA_TRAY_BG_HORIZ_LEFT_ONBLACK).ToImageSkia();
- middle_images_[kImageHorizontal][kImageTypeOnBlack] =
- rb.GetImageNamed(IDR_AURA_TRAY_BG_HORIZ_CENTER_ONBLACK).ToImageSkia();
- trailing_images_[kImageHorizontal][kImageTypeOnBlack] =
- rb.GetImageNamed(IDR_AURA_TRAY_BG_HORIZ_RIGHT_ONBLACK).ToImageSkia();
-
- leading_images_[kImageHorizontal][kImageTypePressed] =
- rb.GetImageNamed(IDR_AURA_TRAY_BG_HORIZ_LEFT_PRESSED).ToImageSkia();
- middle_images_[kImageHorizontal][kImageTypePressed] =
- rb.GetImageNamed(IDR_AURA_TRAY_BG_HORIZ_CENTER_PRESSED).ToImageSkia();
- trailing_images_[kImageHorizontal][kImageTypePressed] =
- rb.GetImageNamed(IDR_AURA_TRAY_BG_HORIZ_RIGHT_PRESSED).ToImageSkia();
-
- leading_images_[kImageVertical][kImageTypeDefault] =
- rb.GetImageNamed(IDR_AURA_TRAY_BG_VERTICAL_TOP).ToImageSkia();
- middle_images_[kImageVertical][kImageTypeDefault] =
- rb.GetImageNamed(
- IDR_AURA_TRAY_BG_VERTICAL_CENTER).ToImageSkia();
- trailing_images_[kImageVertical][kImageTypeDefault] =
- rb.GetImageNamed(IDR_AURA_TRAY_BG_VERTICAL_BOTTOM).ToImageSkia();
-
- leading_images_[kImageVertical][kImageTypeOnBlack] =
- rb.GetImageNamed(IDR_AURA_TRAY_BG_VERTICAL_TOP_ONBLACK).ToImageSkia();
- middle_images_[kImageVertical][kImageTypeOnBlack] =
- rb.GetImageNamed(
- IDR_AURA_TRAY_BG_VERTICAL_CENTER_ONBLACK).ToImageSkia();
- trailing_images_[kImageVertical][kImageTypeOnBlack] =
- rb.GetImageNamed(
- IDR_AURA_TRAY_BG_VERTICAL_BOTTOM_ONBLACK).ToImageSkia();
-
- leading_images_[kImageVertical][kImageTypePressed] =
- rb.GetImageNamed(IDR_AURA_TRAY_BG_VERTICAL_TOP_PRESSED).ToImageSkia();
- middle_images_[kImageVertical][kImageTypePressed] =
- rb.GetImageNamed(
- IDR_AURA_TRAY_BG_VERTICAL_CENTER_PRESSED).ToImageSkia();
- trailing_images_[kImageVertical][kImageTypePressed] =
- rb.GetImageNamed(
- IDR_AURA_TRAY_BG_VERTICAL_BOTTOM_PRESSED).ToImageSkia();
- }
-
- virtual ~TrayBackground() {}
-
- SkColor color() { return color_; }
- void set_color(SkColor color) { color_ = color; }
- void set_alpha(int alpha) { color_ = SkColorSetARGB(alpha, 0, 0, 0); }
-
- private:
- ShelfWidget* GetShelfWidget() const {
- return RootWindowController::ForWindow(tray_background_view_->
- status_area_widget()->GetNativeWindow())->shelf();
- }
-
- void PaintForAlternateShelf(gfx::Canvas* canvas, views::View* view) const {
- int orientation = kImageHorizontal;
- ShelfWidget* shelf_widget = GetShelfWidget();
- if (shelf_widget &&
- !shelf_widget->shelf_layout_manager()->IsHorizontalAlignment())
- orientation = kImageVertical;
-
- int state = kImageTypeDefault;
- if (tray_background_view_->draw_background_as_active())
- state = kImageTypePressed;
- else if (shelf_widget && shelf_widget->GetDimsShelf())
- state = kImageTypeOnBlack;
- else
- state = kImageTypeDefault;
-
- const gfx::ImageSkia* leading = leading_images_[orientation][state];
- const gfx::ImageSkia* middle = middle_images_[orientation][state];
- const gfx::ImageSkia* trailing = trailing_images_[orientation][state];
-
- gfx::Rect bounds(view->GetLocalBounds());
- gfx::Point leading_location, trailing_location;
- gfx::Rect middle_bounds;
-
- if (orientation == kImageHorizontal) {
- leading_location = gfx::Point(0, 0);
- trailing_location = gfx::Point(bounds.width() - trailing->width(), 0);
- middle_bounds = gfx::Rect(
- leading->width(),
- 0,
- bounds.width() - (leading->width() + trailing->width()),
- bounds.height());
- } else {
- leading_location = gfx::Point(0, 0);
- trailing_location = gfx::Point(0, bounds.height() - trailing->height());
- middle_bounds = gfx::Rect(
- 0,
- leading->height(),
- bounds.width(),
- bounds.height() - (leading->height() + trailing->height()));
- }
-
- canvas->DrawImageInt(*leading,
- leading_location.x(),
- leading_location.y());
-
- canvas->DrawImageInt(*trailing,
- trailing_location.x(),
- trailing_location.y());
-
- canvas->TileImageInt(*middle,
- middle_bounds.x(),
- middle_bounds.y(),
- middle_bounds.width(),
- middle_bounds.height());
- }
-
- // Overridden from views::Background.
- virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE {
- if (ash::switches::UseAlternateShelfLayout()) {
- PaintForAlternateShelf(canvas, view);
- } else {
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setStyle(SkPaint::kFill_Style);
- paint.setColor(color_);
- SkPath path;
- gfx::Rect bounds(view->GetLocalBounds());
- SkScalar radius = SkIntToScalar(kTrayRoundedBorderRadius);
- path.addRoundRect(gfx::RectToSkRect(bounds), radius, radius);
- canvas->DrawPath(path, paint);
- }
- }
-
- SkColor color_;
- // Reference to the TrayBackgroundView for which this is a background.
- TrayBackgroundView* tray_background_view_;
-
- // References to the images used as backgrounds, they are owned by the
- // resource bundle class.
- const gfx::ImageSkia* leading_images_[kNumOrientations][kNumStates];
- const gfx::ImageSkia* middle_images_[kNumOrientations][kNumStates];
- const gfx::ImageSkia* trailing_images_[kNumOrientations][kNumStates];
-
- DISALLOW_COPY_AND_ASSIGN(TrayBackground);
-};
-
-TrayBackgroundView::TrayContainer::TrayContainer(ShelfAlignment alignment)
- : alignment_(alignment) {
- UpdateLayout();
-}
-
-void TrayBackgroundView::TrayContainer::SetAlignment(ShelfAlignment alignment) {
- if (alignment_ == alignment)
- return;
- alignment_ = alignment;
- UpdateLayout();
-}
-
-gfx::Size TrayBackgroundView::TrayContainer::GetPreferredSize() {
- if (size_.IsEmpty())
- return views::View::GetPreferredSize();
- return size_;
-}
-
-void TrayBackgroundView::TrayContainer::ChildPreferredSizeChanged(
- views::View* child) {
- PreferredSizeChanged();
-}
-
-void TrayBackgroundView::TrayContainer::ChildVisibilityChanged(View* child) {
- PreferredSizeChanged();
-}
-
-void TrayBackgroundView::TrayContainer::ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) {
- if (details.parent == this)
- PreferredSizeChanged();
-}
-
-void TrayBackgroundView::TrayContainer::UpdateLayout() {
- // Adjust the size of status tray dark background by adding additional
- // empty border.
- if (alignment_ == SHELF_ALIGNMENT_BOTTOM ||
- alignment_ == SHELF_ALIGNMENT_TOP) {
- int vertical_padding = kTrayContainerVerticalPaddingBottomAlignment;
- int horizontal_padding = kTrayContainerHorizontalPaddingBottomAlignment;
- if (ash::switches::UseAlternateShelfLayout()) {
- vertical_padding = kPaddingFromEdgeOfShelf;
- horizontal_padding = kPaddingFromEdgeOfShelf;
- }
- set_border(views::Border::CreateEmptyBorder(
- vertical_padding,
- horizontal_padding,
- vertical_padding,
- horizontal_padding));
-
- views::BoxLayout* layout =
- new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0);
- layout->set_spread_blank_space(true);
- views::View::SetLayoutManager(layout);
- } else {
- int vertical_padding = kTrayContainerVerticalPaddingVerticalAlignment;
- int horizontal_padding = kTrayContainerHorizontalPaddingVerticalAlignment;
- if (ash::switches::UseAlternateShelfLayout()) {
- vertical_padding = kPaddingFromEdgeOfShelf;
- horizontal_padding = kPaddingFromEdgeOfShelf;
- }
- set_border(views::Border::CreateEmptyBorder(
- vertical_padding,
- horizontal_padding,
- vertical_padding,
- horizontal_padding));
-
- views::BoxLayout* layout =
- new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0);
- layout->set_spread_blank_space(true);
- views::View::SetLayoutManager(layout);
- }
- PreferredSizeChanged();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// TrayBackgroundView
-
-TrayBackgroundView::TrayBackgroundView(
- internal::StatusAreaWidget* status_area_widget)
- : status_area_widget_(status_area_widget),
- tray_container_(NULL),
- shelf_alignment_(SHELF_ALIGNMENT_BOTTOM),
- background_(NULL),
- hide_background_animator_(this, 0, kTrayBackgroundAlpha),
- hover_background_animator_(
- this, 0, kTrayBackgroundHoverAlpha - kTrayBackgroundAlpha),
- hovered_(false),
- draw_background_as_active_(false),
- widget_observer_(new TrayWidgetObserver(this)) {
- set_notify_enter_exit_on_child(true);
-
- // Initially we want to paint the background, but without the hover effect.
- hide_background_animator_.SetPaintsBackground(
- true, BACKGROUND_CHANGE_IMMEDIATE);
- hover_background_animator_.SetPaintsBackground(
- false, BACKGROUND_CHANGE_IMMEDIATE);
-
- tray_container_ = new TrayContainer(shelf_alignment_);
- SetContents(tray_container_);
- tray_event_filter_.reset(new TrayEventFilter);
-}
-
-TrayBackgroundView::~TrayBackgroundView() {
- if (GetWidget())
- GetWidget()->RemoveObserver(widget_observer_.get());
-}
-
-void TrayBackgroundView::Initialize() {
- GetWidget()->AddObserver(widget_observer_.get());
- SetBorder();
-}
-
-const char* TrayBackgroundView::GetClassName() const {
- return kViewClassName;
-}
-
-void TrayBackgroundView::OnMouseEntered(const ui::MouseEvent& event) {
- hovered_ = true;
- if (!background_ || draw_background_as_active_ ||
- ash::switches::UseAlternateShelfLayout())
- return;
- hover_background_animator_.SetPaintsBackground(
- true, BACKGROUND_CHANGE_ANIMATE);
-}
-
-void TrayBackgroundView::OnMouseExited(const ui::MouseEvent& event) {
- hovered_ = false;
- if (!background_ || draw_background_as_active_ ||
- ash::switches::UseAlternateShelfLayout())
- return;
- hover_background_animator_.SetPaintsBackground(
- false, BACKGROUND_CHANGE_ANIMATE);
-}
-
-void TrayBackgroundView::ChildPreferredSizeChanged(views::View* child) {
- PreferredSizeChanged();
-}
-
-void TrayBackgroundView::GetAccessibleState(ui::AccessibleViewState* state) {
- state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
- state->name = GetAccessibleNameForTray();
-}
-
-void TrayBackgroundView::AboutToRequestFocusFromTabTraversal(bool reverse) {
- // Return focus to the login view. See crbug.com/120500.
- views::View* v = GetNextFocusableView();
- if (v)
- v->AboutToRequestFocusFromTabTraversal(reverse);
-}
-
-bool TrayBackgroundView::PerformAction(const ui::Event& event) {
- return false;
-}
-
-gfx::Rect TrayBackgroundView::GetFocusBounds() {
- // The tray itself expands to the right and bottom edge of the screen to make
- // sure clicking on the edges brings up the popup. However, the focus border
- // should be only around the container.
- return GetContentsBounds();
-}
-
-void TrayBackgroundView::UpdateBackground(int alpha) {
- // The animator should never fire when the alternate shelf layout is used.
- if (!background_ || draw_background_as_active_)
- return;
- DCHECK(!ash::switches::UseAlternateShelfLayout());
- background_->set_alpha(hide_background_animator_.alpha() +
- hover_background_animator_.alpha());
- SchedulePaint();
-}
-
-void TrayBackgroundView::SetContents(views::View* contents) {
- SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
- AddChildView(contents);
-}
-
-void TrayBackgroundView::SetPaintsBackground(
- bool value, BackgroundAnimatorChangeType change_type) {
- DCHECK(!ash::switches::UseAlternateShelfLayout());
- hide_background_animator_.SetPaintsBackground(value, change_type);
-}
-
-void TrayBackgroundView::SetContentsBackground() {
- background_ = new internal::TrayBackground(this);
- tray_container_->set_background(background_);
-}
-
-ShelfLayoutManager* TrayBackgroundView::GetShelfLayoutManager() {
- return ShelfLayoutManager::ForLauncher(GetWidget()->GetNativeView());
-}
-
-void TrayBackgroundView::SetShelfAlignment(ShelfAlignment alignment) {
- shelf_alignment_ = alignment;
- SetBorder();
- tray_container_->SetAlignment(alignment);
-}
-
-void TrayBackgroundView::SetBorder() {
- views::View* parent = status_area_widget_->status_area_widget_delegate();
- // Tray views are laid out right-to-left or bottom-to-top
- bool on_edge = (this == parent->child_at(0));
- int left_edge, top_edge, right_edge, bottom_edge;
- if (ash::switches::UseAlternateShelfLayout()) {
- if (shelf_alignment() == SHELF_ALIGNMENT_BOTTOM) {
- top_edge = ShelfLayoutManager::kShelfItemInset;
- left_edge = 0;
- bottom_edge = ShelfLayoutManager::GetPreferredShelfSize() -
- ShelfLayoutManager::kShelfItemInset - GetShelfItemHeight();
- right_edge = on_edge ? kPaddingFromEdgeOfShelf : 0;
- } else if (shelf_alignment() == SHELF_ALIGNMENT_LEFT) {
- top_edge = 0;
- left_edge = ShelfLayoutManager::GetPreferredShelfSize() -
- ShelfLayoutManager::kShelfItemInset - GetShelfItemHeight();
- bottom_edge = on_edge ? kPaddingFromEdgeOfShelf : 0;
- right_edge = ShelfLayoutManager::kShelfItemInset;
- } else { // SHELF_ALIGNMENT_RIGHT
- top_edge = 0;
- left_edge = ShelfLayoutManager::kShelfItemInset;
- bottom_edge = on_edge ? kPaddingFromEdgeOfShelf : 0;
- right_edge = ShelfLayoutManager::GetPreferredShelfSize() -
- ShelfLayoutManager::kShelfItemInset - GetShelfItemHeight();
- }
- } else {
- // Change the border padding for different shelf alignment.
- if (shelf_alignment() == SHELF_ALIGNMENT_BOTTOM) {
- top_edge = 0;
- left_edge = 0;
- bottom_edge = on_edge ? kPaddingFromBottomOfScreenBottomAlignment :
- kPaddingFromBottomOfScreenBottomAlignment - 1;
- right_edge = on_edge ? kPaddingFromRightEdgeOfScreenBottomAlignment : 0;
- } else if (shelf_alignment() == SHELF_ALIGNMENT_TOP) {
- top_edge = on_edge ? kPaddingFromBottomOfScreenBottomAlignment :
- kPaddingFromBottomOfScreenBottomAlignment - 1;
- left_edge = 0;
- bottom_edge = 0;
- right_edge = on_edge ? kPaddingFromRightEdgeOfScreenBottomAlignment : 0;
- } else if (shelf_alignment() == SHELF_ALIGNMENT_LEFT) {
- top_edge = 0;
- left_edge = kPaddingFromOuterEdgeOfLauncherVerticalAlignment;
- bottom_edge = on_edge ? kPaddingFromBottomOfScreenVerticalAlignment : 0;
- right_edge = kPaddingFromInnerEdgeOfLauncherVerticalAlignment;
- } else {
- top_edge = 0;
- left_edge = kPaddingFromInnerEdgeOfLauncherVerticalAlignment;
- bottom_edge = on_edge ? kPaddingFromBottomOfScreenVerticalAlignment : 0;
- right_edge = kPaddingFromOuterEdgeOfLauncherVerticalAlignment;
- }
- }
- set_border(views::Border::CreateEmptyBorder(
- top_edge, left_edge, bottom_edge, right_edge));
-}
-
-void TrayBackgroundView::InitializeBubbleAnimations(
- views::Widget* bubble_widget) {
- views::corewm::SetWindowVisibilityAnimationType(
- bubble_widget->GetNativeWindow(),
- views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE);
- views::corewm::SetWindowVisibilityAnimationTransition(
- bubble_widget->GetNativeWindow(),
- views::corewm::ANIMATE_HIDE);
- views::corewm::SetWindowVisibilityAnimationDuration(
- bubble_widget->GetNativeWindow(),
- base::TimeDelta::FromMilliseconds(kAnimationDurationForPopupMS));
-}
-
-aura::Window* TrayBackgroundView::GetBubbleWindowContainer() const {
- return ash::Shell::GetContainer(
- tray_container()->GetWidget()->GetNativeWindow()->GetRootWindow(),
- ash::internal::kShellWindowId_SettingBubbleContainer);
-}
-
-gfx::Rect TrayBackgroundView::GetBubbleAnchorRect(
- views::Widget* anchor_widget,
- TrayBubbleView::AnchorType anchor_type,
- TrayBubbleView::AnchorAlignment anchor_alignment) const {
- gfx::Rect rect;
- if (anchor_widget && anchor_widget->IsVisible()) {
- rect = anchor_widget->GetWindowBoundsInScreen();
- if (anchor_type == TrayBubbleView::ANCHOR_TYPE_TRAY) {
- if (anchor_alignment == TrayBubbleView::ANCHOR_ALIGNMENT_BOTTOM) {
- bool rtl = base::i18n::IsRTL();
- if (!ash::switches::UseAlternateShelfLayout()) {
- rect.Inset(
- rtl ? kPaddingFromRightEdgeOfScreenBottomAlignment : 0,
- kTrayBubbleAnchorTopInsetBottomAnchor,
- rtl ? 0 : kPaddingFromRightEdgeOfScreenBottomAlignment,
- kPaddingFromBottomOfScreenBottomAlignment);
- } else {
- rect.Inset(
- rtl ? kAlternateLayoutBubblePaddingHorizontalSide : 0,
- kAlternateLayoutBubblePaddingHorizontalBottom,
- rtl ? 0 : kAlternateLayoutBubblePaddingHorizontalSide,
- 0);
- }
- } else if (anchor_alignment == TrayBubbleView::ANCHOR_ALIGNMENT_LEFT) {
- if (!ash::switches::UseAlternateShelfLayout()) {
- rect.Inset(0, 0, kPaddingFromInnerEdgeOfLauncherVerticalAlignment + 5,
- kPaddingFromBottomOfScreenVerticalAlignment);
- } else {
- rect.Inset(0, 0, kAlternateLayoutBubblePaddingVerticalSide + 4,
- kAlternateLayoutBubblePaddingVerticalBottom);
- }
- } else {
- if (!ash::switches::UseAlternateShelfLayout()) {
- rect.Inset(kPaddingFromInnerEdgeOfLauncherVerticalAlignment + 1,
- 0, 0, kPaddingFromBottomOfScreenVerticalAlignment);
- } else {
- rect.Inset(kAlternateLayoutBubblePaddingVerticalSide, 0, 0,
- kAlternateLayoutBubblePaddingVerticalBottom);
- }
- }
- } else if (anchor_type == TrayBubbleView::ANCHOR_TYPE_BUBBLE) {
- // Invert the offsets to align with the bubble below.
- // Note that with the alternate shelf layout the tips are not shown and
- // the offsets for left and right alignment do not need to be applied.
- int vertical_alignment = ash::switches::UseAlternateShelfLayout() ?
- 0 :
- kPaddingFromInnerEdgeOfLauncherVerticalAlignment;
- int horizontal_alignment = ash::switches::UseAlternateShelfLayout() ?
- kAlternateLayoutBubblePaddingVerticalBottom :
- kPaddingFromBottomOfScreenVerticalAlignment;
- if (anchor_alignment == TrayBubbleView::ANCHOR_ALIGNMENT_LEFT)
- rect.Inset(vertical_alignment, 0, 0, horizontal_alignment);
- else if (anchor_alignment == TrayBubbleView::ANCHOR_ALIGNMENT_RIGHT)
- rect.Inset(0, 0, vertical_alignment, horizontal_alignment);
- }
- }
-
- // TODO(jennyz): May need to add left/right alignment in the following code.
- if (rect.IsEmpty()) {
- aura::Window* target_root = anchor_widget ?
- anchor_widget->GetNativeView()->GetRootWindow() :
- Shell::GetPrimaryRootWindow();
- rect = target_root->bounds();
- rect = gfx::Rect(
- base::i18n::IsRTL() ? kPaddingFromRightEdgeOfScreenBottomAlignment :
- rect.width() - kPaddingFromRightEdgeOfScreenBottomAlignment,
- rect.height() - kPaddingFromBottomOfScreenBottomAlignment,
- 0, 0);
- rect = ScreenAsh::ConvertRectToScreen(target_root, rect);
- }
- return rect;
-}
-
-TrayBubbleView::AnchorAlignment TrayBackgroundView::GetAnchorAlignment() const {
- switch (shelf_alignment_) {
- case SHELF_ALIGNMENT_BOTTOM:
- return TrayBubbleView::ANCHOR_ALIGNMENT_BOTTOM;
- case SHELF_ALIGNMENT_LEFT:
- return TrayBubbleView::ANCHOR_ALIGNMENT_LEFT;
- case SHELF_ALIGNMENT_RIGHT:
- return TrayBubbleView::ANCHOR_ALIGNMENT_RIGHT;
- case SHELF_ALIGNMENT_TOP:
- return TrayBubbleView::ANCHOR_ALIGNMENT_TOP;
- }
- NOTREACHED();
- return TrayBubbleView::ANCHOR_ALIGNMENT_BOTTOM;
-}
-
-void TrayBackgroundView::SetDrawBackgroundAsActive(bool visible) {
- draw_background_as_active_ = visible;
- if (!background_ || !switches::UseAlternateShelfLayout())
- return;
-
- // Do not change gradually, changing color between grey and blue is weird.
- if (draw_background_as_active_)
- background_->set_color(kTrayBackgroundPressedColor);
- else if (hovered_)
- background_->set_alpha(kTrayBackgroundHoverAlpha);
- else
- background_->set_alpha(kTrayBackgroundAlpha);
- SchedulePaint();
-}
-
-void TrayBackgroundView::UpdateBubbleViewArrow(
- views::TrayBubbleView* bubble_view) {
- if (switches::UseAlternateShelfLayout())
- return;
-
- aura::Window* root_window =
- bubble_view->GetWidget()->GetNativeView()->GetRootWindow();
- ash::internal::ShelfLayoutManager* shelf =
- ShelfLayoutManager::ForLauncher(root_window);
- bubble_view->SetArrowPaintType(
- (shelf && shelf->IsVisible()) ?
- views::BubbleBorder::PAINT_NORMAL :
- views::BubbleBorder::PAINT_TRANSPARENT);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/tray_background_view.h b/chromium/ash/system/tray/tray_background_view.h
deleted file mode 100644
index 5adaf4ec0c7..00000000000
--- a/chromium/ash/system/tray/tray_background_view.h
+++ /dev/null
@@ -1,189 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_
-#define ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_
-
-#include "ash/ash_export.h"
-#include "ash/shelf/background_animator.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/system/tray/actionable_view.h"
-#include "ui/views/bubble/tray_bubble_view.h"
-
-namespace ash {
-namespace internal {
-
-class ShelfLayoutManager;
-class StatusAreaWidget;
-class TrayEventFilter;
-class TrayBackground;
-
-// Base class for children of StatusAreaWidget: SystemTray, WebNotificationTray,
-// LogoutButtonTray.
-// This class handles setting and animating the background when the Launcher
-// his shown/hidden. It also inherits from ActionableView so that the tray
-// items can override PerformAction when clicked on.
-class ASH_EXPORT TrayBackgroundView : public ActionableView,
- public BackgroundAnimatorDelegate {
- public:
- static const char kViewClassName[];
-
- // Base class for tray containers. Sets the border and layout. The container
- // auto-resizes the widget when necessary.
- class TrayContainer : public views::View {
- public:
- explicit TrayContainer(ShelfAlignment alignment);
- virtual ~TrayContainer() {}
-
- void SetAlignment(ShelfAlignment alignment);
-
- void set_size(const gfx::Size& size) { size_ = size; }
-
- // Overridden from views::View.
- virtual gfx::Size GetPreferredSize() OVERRIDE;
-
- protected:
- // Overridden from views::View.
- virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE;
- virtual void ChildVisibilityChanged(View* child) OVERRIDE;
- virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE;
-
- private:
- void UpdateLayout();
-
- ShelfAlignment alignment_;
- gfx::Size size_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayContainer);
- };
-
- explicit TrayBackgroundView(internal::StatusAreaWidget* status_area_widget);
- virtual ~TrayBackgroundView();
-
- // Called after the tray has been added to the widget containing it.
- virtual void Initialize();
-
- // Overridden from views::View.
- virtual const char* GetClassName() const OVERRIDE;
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
- virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE;
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
- virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE;
-
- // Overridden from internal::ActionableView.
- virtual bool PerformAction(const ui::Event& event) OVERRIDE;
- virtual gfx::Rect GetFocusBounds() OVERRIDE;
-
- // Overridden from internal::BackgroundAnimatorDelegate.
- virtual void UpdateBackground(int alpha) OVERRIDE;
-
- // Called whenever the shelf alignment changes.
- virtual void SetShelfAlignment(ShelfAlignment alignment);
-
- // Called when the anchor (tray or bubble) may have moved or changed.
- virtual void AnchorUpdated() {}
-
- // Called from GetAccessibleState, must return a valid accessible name.
- virtual base::string16 GetAccessibleNameForTray() = 0;
-
- // Called when the bubble is resized.
- virtual void BubbleResized(const views::TrayBubbleView* bubble_view) {}
-
- // Hides the bubble associated with |bubble_view|. Called when the widget
- // is closed.
- virtual void HideBubbleWithView(const views::TrayBubbleView* bubble_view) = 0;
-
- // Called by the bubble wrapper when a click event occurs outside the bubble.
- // May close the bubble. Returns true if the event is handled.
- virtual bool ClickedOutsideBubble() = 0;
-
- // Sets |contents| as a child.
- void SetContents(views::View* contents);
-
- // Creates and sets contents background to |background_|.
- void SetContentsBackground();
-
- // Sets whether the tray paints a background. Default is true, but is set to
- // false if a window overlaps the shelf.
- void SetPaintsBackground(bool value,
- BackgroundAnimatorChangeType change_type);
-
- // Initializes animations for the bubble.
- void InitializeBubbleAnimations(views::Widget* bubble_widget);
-
- // Returns the window hosting the bubble.
- aura::Window* GetBubbleWindowContainer() const;
-
- // Returns the anchor rect for the bubble.
- gfx::Rect GetBubbleAnchorRect(
- views::Widget* anchor_widget,
- views::TrayBubbleView::AnchorType anchor_type,
- views::TrayBubbleView::AnchorAlignment anchor_alignment) const;
-
- // Returns the bubble anchor alignment based on |shelf_alignment_|.
- views::TrayBubbleView::AnchorAlignment GetAnchorAlignment() const;
-
- // Forces the background to be drawn active if set to true.
- void SetDrawBackgroundAsActive(bool visible);
-
- // Returns true when the the background was overridden to be drawn as active.
- bool draw_background_as_active() const {return draw_background_as_active_; }
-
- StatusAreaWidget* status_area_widget() {
- return status_area_widget_;
- }
- const StatusAreaWidget* status_area_widget() const {
- return status_area_widget_;
- }
- TrayContainer* tray_container() const { return tray_container_; }
- ShelfAlignment shelf_alignment() const { return shelf_alignment_; }
- TrayEventFilter* tray_event_filter() { return tray_event_filter_.get(); }
-
- ShelfLayoutManager* GetShelfLayoutManager();
-
- // Updates the arrow visibility based on the launcher visibility.
- void UpdateBubbleViewArrow(views::TrayBubbleView* bubble_view);
-
- private:
- class TrayWidgetObserver;
-
- // Called from Initialize after all status area trays have been created.
- // Sets the border based on the position of the view.
- void SetBorder();
-
- // Unowned pointer to parent widget.
- StatusAreaWidget* status_area_widget_;
-
- // Convenience pointer to the contents view.
- TrayContainer* tray_container_;
-
- // Shelf alignment.
- ShelfAlignment shelf_alignment_;
-
- // Owned by the view passed to SetContents().
- internal::TrayBackground* background_;
-
- // Animators for the background. They are only used for the old shelf layout.
- internal::BackgroundAnimator hide_background_animator_;
- internal::BackgroundAnimator hover_background_animator_;
-
- // True if the background gets hovered.
- bool hovered_;
-
- // This variable stores the activation override which will tint the background
- // differently if set to true.
- bool draw_background_as_active_;
-
- scoped_ptr<TrayWidgetObserver> widget_observer_;
- scoped_ptr<TrayEventFilter> tray_event_filter_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_
diff --git a/chromium/ash/system/tray/tray_bar_button_with_title.cc b/chromium/ash/system/tray/tray_bar_button_with_title.cc
deleted file mode 100644
index 0fd94d84892..00000000000
--- a/chromium/ash/system/tray/tray_bar_button_with_title.cc
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/tray_bar_button_with_title.h"
-
-#include "ash/system/tray/tray_constants.h"
-#include "base/memory/scoped_ptr.h"
-#include "grit/ui_resources.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/painter.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-const int kBarImagesActive[] = {
- IDR_SLIDER_ACTIVE_LEFT,
- IDR_SLIDER_ACTIVE_CENTER,
- IDR_SLIDER_ACTIVE_RIGHT,
-};
-
-const int kBarImagesDisabled[] = {
- IDR_SLIDER_DISABLED_LEFT,
- IDR_SLIDER_DISABLED_CENTER,
- IDR_SLIDER_DISABLED_RIGHT,
-};
-
-} // namespace
-
-class TrayBarButtonWithTitle::TrayBarButton : public views::View {
- public:
- TrayBarButton(const int bar_active_images[], const int bar_disabled_images[])
- : views::View(),
- bar_active_images_(bar_active_images),
- bar_disabled_images_(bar_disabled_images),
- painter_(new views::HorizontalPainter(bar_active_images_)){
- }
- virtual ~TrayBarButton() {}
-
- // Overriden from views::View:
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- painter_->Paint(canvas, size());
- }
-
- void Update(bool control_on) {
- painter_.reset(new views::HorizontalPainter(
- control_on ? bar_active_images_ : bar_disabled_images_));
- SchedulePaint();
- }
-
- private:
- const int* bar_active_images_;
- const int* bar_disabled_images_;
- scoped_ptr<views::HorizontalPainter> painter_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayBarButton);
-};
-
-TrayBarButtonWithTitle::TrayBarButtonWithTitle(views::ButtonListener* listener,
- int title_id,
- int width)
- : views::CustomButton(listener),
- image_(new TrayBarButton(kBarImagesActive, kBarImagesDisabled)),
- title_(NULL),
- width_(width) {
- AddChildView(image_);
- if (title_id != -1) {
- title_ = new views::Label;
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- base::string16 text = rb.GetLocalizedString(title_id);
- title_->SetText(text);
- AddChildView(title_);
- }
-
- image_height_ = ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- kBarImagesActive[0]).ToImageSkia()->height();
-}
-
-TrayBarButtonWithTitle::~TrayBarButtonWithTitle() {}
-
-void TrayBarButtonWithTitle::UpdateButton(bool control_on) {
- image_->Update(control_on);
-}
-
-gfx::Size TrayBarButtonWithTitle::GetPreferredSize() {
- return gfx::Size(width_, kTrayPopupItemHeight);
-}
-
-void TrayBarButtonWithTitle::Layout() {
- gfx::Rect rect(GetContentsBounds());
- int bar_image_y = rect.height() / 2 - image_height_ / 2;
- gfx::Rect bar_image_rect(rect.x(),
- bar_image_y,
- rect.width(),
- image_height_);
- image_->SetBoundsRect(bar_image_rect);
- if (title_) {
- // The image_ has some empty space below the bar image, move the title
- // a little bit up to look closer to the bar.
- gfx::Size title_size = title_->GetPreferredSize();
- title_->SetBounds(rect.x(),
- bar_image_y + image_height_ - 3,
- rect.width(),
- title_size.height());
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/tray_bar_button_with_title.h b/chromium/ash/system/tray/tray_bar_button_with_title.h
deleted file mode 100644
index 8b63d4f8fa7..00000000000
--- a/chromium/ash/system/tray/tray_bar_button_with_title.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_TRAY_BAR_BUTTON_WITH_TITLE_H_
-#define ASH_SYSTEM_TRAY_TRAY_BAR_BUTTON_WITH_TITLE_H_
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/views/controls/button/custom_button.h"
-
-namespace views {
-class Label;
-}
-
-namespace ash {
-namespace internal {
-
-// A button with a bar image and title text below the bar image. These buttons
-// will be used in audio and brightness control UI, which can be toggled with
-// on/off states.
-class TrayBarButtonWithTitle : public views::CustomButton {
- public:
- TrayBarButtonWithTitle(views::ButtonListener* listener,
- int title_id,
- int width);
- virtual ~TrayBarButtonWithTitle();
-
- void UpdateButton(bool control_on);
-
- private:
- class TrayBarButton;
-
- // Overridden from views::CustomButton:
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual void Layout() OVERRIDE;
-
- TrayBarButton* image_;
- views::Label* title_;
- int width_;
- int image_height_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayBarButtonWithTitle);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_TRAY_BAR_BUTTON_WITH_TITLE_H_
diff --git a/chromium/ash/system/tray/tray_bubble_wrapper.cc b/chromium/ash/system/tray/tray_bubble_wrapper.cc
deleted file mode 100644
index 2bcb07bb3de..00000000000
--- a/chromium/ash/system/tray/tray_bubble_wrapper.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/tray_bubble_wrapper.h"
-
-#include "ash/system/tray/tray_background_view.h"
-#include "ash/system/tray/tray_event_filter.h"
-#include "ash/wm/window_properties.h"
-#include "ui/aura/client/capture_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/views/bubble/tray_bubble_view.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-TrayBubbleWrapper::TrayBubbleWrapper(TrayBackgroundView* tray,
- views::TrayBubbleView* bubble_view)
- : tray_(tray),
- bubble_view_(bubble_view) {
- bubble_widget_ = views::BubbleDelegateView::CreateBubble(bubble_view_);
- bubble_widget_->AddObserver(this);
-
- tray_->InitializeBubbleAnimations(bubble_widget_);
- tray_->UpdateBubbleViewArrow(bubble_view_);
- bubble_view_->InitializeAndShowBubble();
-
- tray->tray_event_filter()->AddWrapper(this);
-}
-
-TrayBubbleWrapper::~TrayBubbleWrapper() {
- tray_->tray_event_filter()->RemoveWrapper(this);
- if (bubble_widget_) {
- bubble_widget_->RemoveObserver(this);
- bubble_widget_->Close();
- }
-}
-
-void TrayBubbleWrapper::OnWidgetDestroying(views::Widget* widget) {
- CHECK_EQ(bubble_widget_, widget);
- bubble_widget_->RemoveObserver(this);
- bubble_widget_ = NULL;
-
- // Although the bubble is already closed, the next mouse release event
- // will invoke PerformAction which reopens the bubble again. To prevent the
- // reopen, the mouse capture of |tray_| has to be released.
- // See crbug.com/177075
- aura::client::CaptureClient* capture_client = aura::client::GetCaptureClient(
- tray_->GetWidget()->GetNativeView()->GetRootWindow());
- if (capture_client)
- capture_client->ReleaseCapture(tray_->GetWidget()->GetNativeView());
- tray_->HideBubbleWithView(bubble_view_); // May destroy |bubble_view_|
-}
-
-void TrayBubbleWrapper::OnWidgetBoundsChanged(views::Widget* widget,
- const gfx::Rect& new_bounds) {
- DCHECK_EQ(bubble_widget_, widget);
- tray_->BubbleResized(bubble_view_);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/tray_bubble_wrapper.h b/chromium/ash/system/tray/tray_bubble_wrapper.h
deleted file mode 100644
index 9ce443a8b30..00000000000
--- a/chromium/ash/system/tray/tray_bubble_wrapper.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_TRAY_BUBBLE_WRAPPER_H_
-#define ASH_SYSTEM_TRAY_TRAY_BUBBLE_WRAPPER_H_
-
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/views/widget/widget_observer.h"
-
-namespace views {
-class TrayBubbleView;
-}
-
-namespace ash {
-namespace internal {
-
-class TrayBackgroundView;
-class TrayEventFilter;
-
-// Creates and manages the Widget and EventFilter components of a bubble.
-
-class TrayBubbleWrapper : public views::WidgetObserver {
- public:
- TrayBubbleWrapper(TrayBackgroundView* tray,
- views::TrayBubbleView* bubble_view);
- virtual ~TrayBubbleWrapper();
-
- // views::WidgetObserver overrides:
- virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
- virtual void OnWidgetBoundsChanged(views::Widget* widget,
- const gfx::Rect& new_bounds) OVERRIDE;
-
- const TrayBackgroundView* tray() const { return tray_; }
- TrayBackgroundView* tray() { return tray_; }
- const views::TrayBubbleView* bubble_view() const { return bubble_view_; }
- const views::Widget* bubble_widget() const { return bubble_widget_; }
-
- private:
- TrayBackgroundView* tray_;
- views::TrayBubbleView* bubble_view_; // unowned
- views::Widget* bubble_widget_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayBubbleWrapper);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_TRAY_BUBBLE_WRAPPER_H_
diff --git a/chromium/ash/system/tray/tray_constants.cc b/chromium/ash/system/tray/tray_constants.cc
deleted file mode 100644
index db769ef6678..00000000000
--- a/chromium/ash/system/tray/tray_constants.cc
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/tray_constants.h"
-
-#include "ash/ash_switches.h"
-#include "third_party/skia/include/core/SkColor.h"
-
-namespace ash {
-
-const int kPaddingFromRightEdgeOfScreenBottomAlignment = 7;
-const int kPaddingFromBottomOfScreenBottomAlignment = 7;
-const int kPaddingFromOuterEdgeOfLauncherVerticalAlignment = 8;
-const int kPaddingFromInnerEdgeOfLauncherVerticalAlignment = 9;
-const int kPaddingFromBottomOfScreenVerticalAlignment = 10;
-
-// Padding used to position the system menu relative to the status area.
-const int kAlternateLayoutBubblePaddingHorizontalBottom = 6;
-const int kAlternateLayoutBubblePaddingHorizontalSide = 10;
-const int kAlternateLayoutBubblePaddingVerticalBottom = 3;
-const int kAlternateLayoutBubblePaddingVerticalSide = 15;
-
-const int kPaddingFromEdgeOfShelf = 3;
-
-// Top inset of system tray bubble for bottom anchor alignment.
-const int kTrayBubbleAnchorTopInsetBottomAnchor = 3;
-
-const int kTrayImageItemHorizontalPaddingBottomAlignment = 1;
-const int kTrayImageItemHorizontalPaddingVerticalAlignment = 1;
-const int kTrayImageItemVerticalPaddingVerticalAlignment = 1;
-
-const int kTrayLabelItemHorizontalPaddingBottomAlignment = 7;
-
-// Vertical padding between status tray items when the shelf is vertical.
-const int kTrayLabelItemVerticalPaddingVerticalAlignment = 4;
-
-const int kTrayMenuBottomRowPadding = 5;
-const int kTrayMenuBottomRowPaddingBetweenItems = -1;
-
-const int kTrayPopupAutoCloseDelayInSeconds = 2;
-const int kTrayPopupAutoCloseDelayForTextInSeconds = 5;
-const int kTrayPopupPaddingHorizontal = 18;
-const int kTrayPopupPaddingBetweenItems = 10;
-const int kTrayPopupTextSpacingVertical = 4;
-
-const int kTrayPopupItemHeight = 48;
-const int kTrayPopupDetailsIconWidth = 25;
-const int kTrayPopupDetailsLabelExtraLeftMargin = 8;
-const int kTrayPopupScrollSeparatorHeight = 15;
-const int kTrayRoundedBorderRadius = 2;
-const int kTrayBarButtonWidth = 39;
-
-const SkColor kBackgroundColor = SkColorSetRGB(0xfe, 0xfe, 0xfe);
-const SkColor kHoverBackgroundColor = SkColorSetRGB(0xf3, 0xf3, 0xf3);
-const SkColor kPublicAccountBackgroundColor = SkColorSetRGB(0xf8, 0xe5, 0xb6);
-const SkColor kPublicAccountUserCardTextColor = SkColorSetRGB(0x66, 0x66, 0x66);
-const SkColor kPublicAccountUserCardNameColor = SK_ColorBLACK;
-
-const SkColor kHeaderBackgroundColor = SkColorSetRGB(0xf5, 0xf5, 0xf5);
-
-const SkColor kBorderDarkColor = SkColorSetRGB(0xaa, 0xaa, 0xaa);
-const SkColor kBorderLightColor = SkColorSetRGB(0xeb, 0xeb, 0xeb);
-const SkColor kButtonStrokeColor = SkColorSetRGB(0xdd, 0xdd, 0xdd);
-
-const SkColor kHeaderTextColorNormal = SkColorSetARGB(0x7f, 0, 0, 0);
-const SkColor kHeaderTextColorHover = SkColorSetARGB(0xd3, 0, 0, 0);
-
-const int kTrayPopupMinWidth = 300;
-const int kTrayPopupMaxWidth = 500;
-const int kNotificationIconWidth = 40;
-const int kNotificationButtonWidth = 32;
-const int kTrayNotificationContentsWidth = kTrayPopupMinWidth -
- (kNotificationIconWidth + kNotificationButtonWidth +
- (kTrayPopupPaddingHorizontal / 2) * 3);
-const int kTraySpacing = 8;
-const int kAlternateTraySpacing = 4;
-const int kShelfItemHeight = 31;
-const int kAlternateShelfItemHeight = 38;
-
-int GetTraySpacing() {
- return ash::switches::UseAlternateShelfLayout() ?
- kAlternateTraySpacing : kTraySpacing;
-}
-
-int GetShelfItemHeight() {
- return ash::switches::UseAlternateShelfLayout() ?
- kAlternateShelfItemHeight : kShelfItemHeight;
-}
-
-} // namespace ash
diff --git a/chromium/ash/system/tray/tray_constants.h b/chromium/ash/system/tray/tray_constants.h
deleted file mode 100644
index d5187f38fa5..00000000000
--- a/chromium/ash/system/tray/tray_constants.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_TRAY_CONSTANTS_H_
-#define ASH_SYSTEM_TRAY_TRAY_CONSTANTS_H_
-
-typedef unsigned int SkColor;
-
-namespace ash {
-
-extern const int kPaddingFromRightEdgeOfScreenBottomAlignment;
-extern const int kPaddingFromBottomOfScreenBottomAlignment;
-extern const int kPaddingFromOuterEdgeOfLauncherVerticalAlignment;
-extern const int kPaddingFromInnerEdgeOfLauncherVerticalAlignment;
-extern const int kPaddingFromBottomOfScreenVerticalAlignment;
-
-extern const int kAlternateLayoutBubblePaddingHorizontalBottom;
-extern const int kAlternateLayoutBubblePaddingHorizontalSide;
-extern const int kAlternateLayoutBubblePaddingVerticalBottom;
-extern const int kAlternateLayoutBubblePaddingVerticalSide;
-
-extern const int kPaddingFromEdgeOfShelf;
-extern const int kTrayBubbleAnchorTopInsetBottomAnchor;
-
-extern const int kTrayImageItemHorizontalPaddingBottomAlignment;
-extern const int kTrayImageItemHorizontalPaddingVerticalAlignment;
-extern const int kTrayImageItemVerticalPaddingVerticalAlignment;
-
-extern const int kTrayLabelItemHorizontalPaddingBottomAlignment;
-extern const int kTrayLabelItemVerticalPaddingVerticalAlignment;
-
-extern const int kTrayMenuBottomRowPadding;
-extern const int kTrayMenuBottomRowPaddingBetweenItems;
-
-extern const int kTrayPopupAutoCloseDelayInSeconds;
-extern const int kTrayPopupAutoCloseDelayForTextInSeconds;
-extern const int kTrayPopupPaddingHorizontal;
-extern const int kTrayPopupPaddingBetweenItems;
-extern const int kTrayPopupTextSpacingVertical;
-
-extern const int kTrayPopupItemHeight;
-extern const int kTrayPopupDetailsIconWidth;
-extern const int kTrayPopupDetailsLabelExtraLeftMargin;
-extern const int kTrayPopupScrollSeparatorHeight;
-extern const int kTrayRoundedBorderRadius;
-extern const int kTrayBarButtonWidth;
-
-extern const SkColor kBackgroundColor;
-extern const SkColor kHoverBackgroundColor;
-extern const SkColor kPublicAccountBackgroundColor;
-extern const SkColor kPublicAccountUserCardTextColor;
-extern const SkColor kPublicAccountUserCardNameColor;
-
-extern const SkColor kHeaderBackgroundColor;
-
-extern const SkColor kBorderDarkColor;
-extern const SkColor kBorderLightColor;
-extern const SkColor kButtonStrokeColor;
-
-extern const SkColor kHeaderTextColorNormal;
-extern const SkColor kHeaderTextColorHover;
-
-extern const int kTrayPopupMinWidth;
-extern const int kTrayPopupMaxWidth;
-extern const int kNotificationIconWidth;
-extern const int kNotificationButtonWidth;
-extern const int kTrayNotificationContentsWidth;
-
-// Returns kTraySpacing or kAlternateTraySpacing as applicable
-// (Determined by ash::switches::UseAlternateShelfLayout).
-int GetTraySpacing();
-
-// Returns kShelfItemHeight or kAlternateShelfItemHeight as applicable
-// (Determined by ash::switches::UseAlternateShelfLayout).
-int GetShelfItemHeight();
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_TRAY_CONSTANTS_H_
diff --git a/chromium/ash/system/tray/tray_details_view.cc b/chromium/ash/system/tray/tray_details_view.cc
deleted file mode 100644
index 72efe4ffe0b..00000000000
--- a/chromium/ash/system/tray/tray_details_view.cc
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/tray_details_view.h"
-
-#include "ash/system/tray/fixed_sized_scroll_view.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ui/gfx/canvas.h"
-#include "ui/views/background.h"
-#include "ui/views/border.h"
-#include "ui/views/controls/scroll_view.h"
-#include "ui/views/layout/box_layout.h"
-
-namespace ash {
-namespace internal {
-
-class ScrollSeparator : public views::View {
- public:
- ScrollSeparator() {}
-
- virtual ~ScrollSeparator() {}
-
- private:
- // Overriden from views::View.
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- canvas->FillRect(gfx::Rect(0, height() / 2, width(), 1), kBorderLightColor);
- }
- virtual gfx::Size GetPreferredSize() OVERRIDE {
- return gfx::Size(1, kTrayPopupScrollSeparatorHeight);
- }
-
- DISALLOW_COPY_AND_ASSIGN(ScrollSeparator);
-};
-
-class ScrollBorder : public views::Border {
- public:
- ScrollBorder() {}
- virtual ~ScrollBorder() {}
-
- void set_visible(bool visible) { visible_ = visible; }
-
- private:
- // Overridden from views::Border.
- virtual void Paint(const views::View& view, gfx::Canvas* canvas) OVERRIDE {
- if (!visible_)
- return;
- canvas->FillRect(gfx::Rect(0, view.height() - 1, view.width(), 1),
- kBorderLightColor);
- }
-
- virtual gfx::Insets GetInsets() const OVERRIDE {
- return gfx::Insets(0, 0, 1, 0);
- }
-
- virtual gfx::Size GetMinimumSize() const OVERRIDE {
- return gfx::Size(0, 1);
- }
-
- bool visible_;
-
- DISALLOW_COPY_AND_ASSIGN(ScrollBorder);
-};
-
-TrayDetailsView::TrayDetailsView(SystemTrayItem* owner)
- : owner_(owner),
- footer_(NULL),
- scroller_(NULL),
- scroll_content_(NULL),
- scroll_border_(NULL) {
- SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical,
- 0, 0, 0));
- set_background(views::Background::CreateSolidBackground(kBackgroundColor));
-}
-
-TrayDetailsView::~TrayDetailsView() {
-}
-
-void TrayDetailsView::CreateSpecialRow(int string_id,
- ViewClickListener* listener) {
- DCHECK(!footer_);
- footer_ = new SpecialPopupRow();
- footer_->SetTextLabel(string_id, listener);
- AddChildViewAt(footer_, child_count());
-}
-
-void TrayDetailsView::CreateScrollableList() {
- DCHECK(!scroller_);
- scroll_content_ = new views::View;
- scroll_content_->SetLayoutManager(new views::BoxLayout(
- views::BoxLayout::kVertical, 0, 0, 1));
- scroller_ = new FixedSizedScrollView;
- scroller_->SetContentsView(scroll_content_);
-
- // Note: |scroller_| takes ownership of |scroll_border_|.
- scroll_border_ = new ScrollBorder;
- scroller_->set_border(scroll_border_);
-
- AddChildView(scroller_);
-}
-
-void TrayDetailsView::AddScrollSeparator() {
- DCHECK(scroll_content_);
- // Do not draw the separator if it is the very first item
- // in the scrollable list.
- if (scroll_content_->has_children())
- scroll_content_->AddChildView(new ScrollSeparator);
-}
-
-void TrayDetailsView::Reset() {
- RemoveAllChildViews(true);
- footer_ = NULL;
- scroller_ = NULL;
- scroll_content_ = NULL;
-}
-
-void TrayDetailsView::TransitionToDefaultView() {
- // Cache pointer to owner in this function scope. TrayDetailsView will be
- // deleted after called ShowDefaultView.
- SystemTrayItem* owner = owner_;
- if (footer_ && footer_->content() && footer_->content()->HasFocus())
- owner->set_restore_focus(true);
- owner->system_tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
- owner->set_restore_focus(false);
-}
-
-void TrayDetailsView::Layout() {
- if (!scroller_ || !footer_ || bounds().IsEmpty()) {
- views::View::Layout();
- return;
- }
-
- scroller_->set_fixed_size(gfx::Size());
- gfx::Size size = GetPreferredSize();
-
- // Set the scroller to fill the space above the bottom row, so that the
- // bottom row of the detailed view will always stay just above the footer.
- gfx::Size scroller_size = scroll_content_->GetPreferredSize();
- scroller_->set_fixed_size(gfx::Size(
- width() + scroller_->GetScrollBarWidth(),
- scroller_size.height() - (size.height() - height())));
-
- views::View::Layout();
- // Always make sure the footer element is bottom aligned.
- gfx::Rect fbounds = footer_->bounds();
- fbounds.set_y(height() - footer_->height());
- footer_->SetBoundsRect(fbounds);
-}
-
-void TrayDetailsView::OnPaintBorder(gfx::Canvas* canvas) {
- if (scroll_border_) {
- int index = GetIndexOf(scroller_);
- if (index < child_count() - 1 && child_at(index + 1) != footer_)
- scroll_border_->set_visible(true);
- else
- scroll_border_->set_visible(false);
- }
-
- views::View::OnPaintBorder(canvas);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/tray_details_view.h b/chromium/ash/system/tray/tray_details_view.h
deleted file mode 100644
index 28e9082c58f..00000000000
--- a/chromium/ash/system/tray/tray_details_view.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_
-#define ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_
-
-#include "ash/ash_export.h"
-#include "ash/system/tray/special_popup_row.h"
-#include "ui/views/view.h"
-
-namespace views {
-class ScrollView;
-}
-
-namespace ash {
-
-class SystemTrayItem;
-
-namespace internal {
-
-class FixedSizedScrollView;
-class ScrollBorder;
-class ViewClickListener;
-
-class ASH_EXPORT TrayDetailsView : public views::View {
- public:
- explicit TrayDetailsView(SystemTrayItem* owner);
- virtual ~TrayDetailsView();
-
- // Creates a row with special highlighting etc. This is typically the
- // bottom-most row in the popup.
- void CreateSpecialRow(int string_id, ViewClickListener* listener);
-
- // Creates a scrollable list. The list has a border at the bottom if there is
- // any other view between the list and the footer row at the bottom.
- void CreateScrollableList();
-
- // Adds a separator in scrollable list.
- void AddScrollSeparator();
-
- // Removes (and destroys) all child views.
- void Reset();
-
- // Transition to default view from details view. If |footer_| has focus before
- // transition, the default view should focus on the owner of this details
- // view.
- void TransitionToDefaultView();
-
- SystemTrayItem* owner() const { return owner_; }
- SpecialPopupRow* footer() const { return footer_; }
- FixedSizedScrollView* scroller() const { return scroller_; }
- views::View* scroll_content() const { return scroll_content_; }
-
- protected:
- // Overridden from views::View.
- virtual void Layout() OVERRIDE;
- virtual void OnPaintBorder(gfx::Canvas* canvas) OVERRIDE;
-
- private:
- SystemTrayItem* owner_;
- SpecialPopupRow* footer_;
- FixedSizedScrollView* scroller_;
- views::View* scroll_content_;
- ScrollBorder* scroll_border_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayDetailsView);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_
diff --git a/chromium/ash/system/tray/tray_details_view_unittest.cc b/chromium/ash/system/tray/tray_details_view_unittest.cc
deleted file mode 100644
index c608120411a..00000000000
--- a/chromium/ash/system/tray/tray_details_view_unittest.cc
+++ /dev/null
@@ -1,149 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/tray_details_view.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "ash/system/tray/tray_details_view.h"
-#include "ash/system/tray/view_click_listener.h"
-#include "ash/test/ash_test_base.h"
-#include "base/run_loop.h"
-#include "grit/ash_strings.h"
-#include "ui/aura/window.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace test {
-
-namespace {
-
-SystemTray* GetSystemTray() {
- return Shell::GetPrimaryRootWindowController()->shelf()->
- status_area_widget()->system_tray();
-}
-
-class TestDetailsView : public internal::TrayDetailsView,
- public internal::ViewClickListener {
- public:
- explicit TestDetailsView(SystemTrayItem* owner)
- : internal::TrayDetailsView(owner) {}
-
- virtual ~TestDetailsView() {}
-
- void CreateFooterAndFocus() {
- // Uses bluetooth label for testing purpose. It can be changed to any
- // string_id.
- CreateSpecialRow(IDS_ASH_STATUS_TRAY_BLUETOOTH, this);
- footer()->content()->RequestFocus();
- }
-
- // Overridden from internal::ViewClickListener:
- virtual void OnViewClicked(views::View* sender) OVERRIDE {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TestDetailsView);
-};
-
-// Trivial item implementation that tracks its views for testing.
-class TestItem : public SystemTrayItem {
- public:
- TestItem() : SystemTrayItem(GetSystemTray()), tray_view_(NULL) {}
-
- // Overridden from SystemTrayItem:
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE {
- tray_view_ = new views::View;
- return tray_view_;
- }
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE {
- default_view_ = new views::View;
- default_view_->SetFocusable(true);
- return default_view_;
- }
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE {
- detailed_view_ = new TestDetailsView(this);
- return detailed_view_;
- }
- virtual void DestroyTrayView() OVERRIDE {
- tray_view_ = NULL;
- }
- virtual void DestroyDefaultView() OVERRIDE {
- default_view_ = NULL;
- }
- virtual void DestroyDetailedView() OVERRIDE {
- detailed_view_ = NULL;
- }
-
- views::View* tray_view() const { return tray_view_; }
- views::View* default_view() const { return default_view_; }
- TestDetailsView* detailed_view() const { return detailed_view_; }
-
- private:
- views::View* tray_view_;
- views::View* default_view_;
- TestDetailsView* detailed_view_;
-
- DISALLOW_COPY_AND_ASSIGN(TestItem);
-};
-
-} // namespace
-
-typedef AshTestBase TrayDetailsViewTest;
-
-TEST_F(TrayDetailsViewTest, TransitionToDefaultViewTest) {
- SystemTray* tray = GetSystemTray();
- ASSERT_TRUE(tray->GetWidget());
-
- TestItem* test_item_1 = new TestItem;
- TestItem* test_item_2 = new TestItem;
- tray->AddTrayItem(test_item_1);
- tray->AddTrayItem(test_item_2);
-
- // Ensure the tray views are created.
- ASSERT_TRUE(test_item_1->tray_view() != NULL);
- ASSERT_TRUE(test_item_2->tray_view() != NULL);
-
- // Show the default view.
- tray->ShowDefaultView(BUBBLE_CREATE_NEW);
- RunAllPendingInMessageLoop();
-
- // Show the detailed view of item 2.
- tray->ShowDetailedView(test_item_2, 0, true, BUBBLE_USE_EXISTING);
- EXPECT_TRUE(test_item_2->detailed_view());
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(test_item_2->default_view());
-
- // Transition back to default view, the default view of item 2 should have
- // focus.
- test_item_2->detailed_view()->CreateFooterAndFocus();
- test_item_2->detailed_view()->TransitionToDefaultView();
- RunAllPendingInMessageLoop();
-
- EXPECT_TRUE(test_item_2->default_view());
- EXPECT_FALSE(test_item_2->detailed_view());
- EXPECT_TRUE(test_item_2->default_view()->HasFocus());
-
- // Show the detailed view of item 2 again.
- tray->ShowDetailedView(test_item_2, 0, true, BUBBLE_USE_EXISTING);
- EXPECT_TRUE(test_item_2->detailed_view());
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(test_item_2->default_view());
-
- // Transition back to default view, the default view of item 2 should NOT have
- // focus.
- test_item_2->detailed_view()->TransitionToDefaultView();
- RunAllPendingInMessageLoop();
-
- EXPECT_TRUE(test_item_2->default_view());
- EXPECT_FALSE(test_item_2->detailed_view());
- EXPECT_FALSE(test_item_2->default_view()->HasFocus());
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/system/tray/tray_empty.cc b/chromium/ash/system/tray/tray_empty.cc
deleted file mode 100644
index f15f7b31e73..00000000000
--- a/chromium/ash/system/tray/tray_empty.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/tray_empty.h"
-
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/background.h"
-#include "ui/views/border.h"
-#include "ui/views/view.h"
-
-namespace {
-
-class EmptyBackground : public views::Background {
- public:
- EmptyBackground() {}
- virtual ~EmptyBackground() {}
-
- private:
- virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE {
- }
-
- DISALLOW_COPY_AND_ASSIGN(EmptyBackground);
-};
-
-}
-
-namespace ash {
-namespace internal {
-
-TrayEmpty::TrayEmpty(SystemTray* system_tray)
- : SystemTrayItem(system_tray) {
-}
-
-TrayEmpty::~TrayEmpty() {}
-
-views::View* TrayEmpty::CreateTrayView(user::LoginStatus status) {
- return NULL;
-}
-
-views::View* TrayEmpty::CreateDefaultView(user::LoginStatus status) {
- if (status == user::LOGGED_IN_NONE)
- return NULL;
-
- views::View* view = new views::View;
- view->set_background(new EmptyBackground());
- view->set_border(views::Border::CreateEmptyBorder(10, 0, 0, 0));
- view->SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical,
- 0, 0, 0));
- view->SetPaintToLayer(true);
- view->SetFillsBoundsOpaquely(false);
- return view;
-}
-
-views::View* TrayEmpty::CreateDetailedView(user::LoginStatus status) {
- return NULL;
-}
-
-void TrayEmpty::DestroyTrayView() {}
-
-void TrayEmpty::DestroyDefaultView() {}
-
-void TrayEmpty::DestroyDetailedView() {}
-
-void TrayEmpty::UpdateAfterLoginStatusChange(user::LoginStatus status) {}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/tray_empty.h b/chromium/ash/system/tray/tray_empty.h
deleted file mode 100644
index a7575cf46e3..00000000000
--- a/chromium/ash/system/tray/tray_empty.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_TRAY_EMPTY_H_
-#define ASH_SYSTEM_TRAY_TRAY_EMPTY_H_
-
-#include "ash/system/tray/system_tray_item.h"
-
-namespace ash {
-namespace internal {
-
-class TrayEmpty : public SystemTrayItem {
- public:
- explicit TrayEmpty(SystemTray* system_tray);
- virtual ~TrayEmpty();
-
- private:
- // Overridden from SystemTrayItem.
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyTrayView() OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
- virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
-
- DISALLOW_COPY_AND_ASSIGN(TrayEmpty);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_TRAY_EMPTY_H_
diff --git a/chromium/ash/system/tray/tray_event_filter.cc b/chromium/ash/system/tray/tray_event_filter.cc
deleted file mode 100644
index 676c8b6346c..00000000000
--- a/chromium/ash/system/tray/tray_event_filter.cc
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/tray_event_filter.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/tray/tray_background_view.h"
-#include "ash/system/tray/tray_bubble_wrapper.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_event_filter.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-TrayEventFilter::TrayEventFilter() {
-}
-
-TrayEventFilter::~TrayEventFilter() {
- DCHECK(wrappers_.empty());
-}
-
-void TrayEventFilter::AddWrapper(TrayBubbleWrapper* wrapper) {
- bool was_empty = wrappers_.empty();
- wrappers_.insert(wrapper);
- if (was_empty && !wrappers_.empty())
- ash::Shell::GetInstance()->AddPreTargetHandler(this);
-}
-
-void TrayEventFilter::RemoveWrapper(TrayBubbleWrapper* wrapper) {
- wrappers_.erase(wrapper);
- if (wrappers_.empty())
- ash::Shell::GetInstance()->RemovePreTargetHandler(this);
-}
-
-void TrayEventFilter::OnMouseEvent(ui::MouseEvent* event) {
- if (event->type() == ui::ET_MOUSE_PRESSED &&
- ProcessLocatedEvent(event)) {
- event->StopPropagation();
- }
-}
-
-void TrayEventFilter::OnTouchEvent(ui::TouchEvent* event) {
- if (event->type() == ui::ET_TOUCH_PRESSED && ProcessLocatedEvent(event))
- event->StopPropagation();
-}
-
-bool TrayEventFilter::ProcessLocatedEvent(ui::LocatedEvent* event) {
- if (event->target()) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- // Don't process events that occurred inside an embedded menu.
- internal::RootWindowController* root_controller =
- internal::GetRootWindowController(target->GetRootWindow());
- if (root_controller && root_controller->GetContainer(
- internal::kShellWindowId_MenuContainer)->Contains(target)) {
- return false;
- }
- }
-
- // Check the boundary for all wrappers, and do not handle the event if it
- // happens inside of any of those wrappers.
- for (std::set<TrayBubbleWrapper*>::const_iterator iter = wrappers_.begin();
- iter != wrappers_.end(); ++iter) {
- const TrayBubbleWrapper* wrapper = *iter;
- const views::Widget* bubble_widget = wrapper->bubble_widget();
- if (!bubble_widget)
- continue;
-
- gfx::Rect bounds = bubble_widget->GetWindowBoundsInScreen();
- bounds.Inset(wrapper->bubble_view()->GetBorderInsets());
- aura::Window* root = bubble_widget->GetNativeView()->GetRootWindow();
- aura::client::ScreenPositionClient* screen_position_client =
- aura::client::GetScreenPositionClient(root);
- gfx::Point screen_point(event->root_location());
- screen_position_client->ConvertPointToScreen(root, &screen_point);
-
- if (bounds.Contains(screen_point))
- return false;
- if (wrapper->tray()) {
- // If the user clicks on the parent tray, don't process the event here,
- // let the tray logic handle the event and determine show/hide behavior.
- bounds = wrapper->tray()->GetBoundsInScreen();
- if (bounds.Contains(screen_point))
- return false;
- }
- }
-
- // Handle clicking outside the bubble and tray and return true if the
- // event was handled.
- // Cannot iterate |wrappers_| directly, because clicking outside will remove
- // the wrapper, which shrinks |wrappers_| unsafely.
- std::set<TrayBackgroundView*> trays;
- for (std::set<TrayBubbleWrapper*>::iterator iter = wrappers_.begin();
- iter != wrappers_.end(); ++iter) {
- trays.insert((*iter)->tray());
- }
- bool handled = false;
- for (std::set<TrayBackgroundView*>::iterator iter = trays.begin();
- iter != trays.end(); ++iter) {
- handled |= (*iter)->ClickedOutsideBubble();
- }
- return handled;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/tray_event_filter.h b/chromium/ash/system/tray/tray_event_filter.h
deleted file mode 100644
index 40593155c2c..00000000000
--- a/chromium/ash/system/tray/tray_event_filter.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_TRAY_EVENT_FILTER_H_
-#define ASH_SYSTEM_TRAY_TRAY_EVENT_FILTER_H_
-
-#include <set>
-
-#include "base/basictypes.h"
-#include "ui/events/event.h"
-#include "ui/events/event_handler.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-namespace internal {
-
-class TrayBubbleWrapper;
-
-// Handles events for a tray bubble.
-
-class TrayEventFilter : public ui::EventHandler {
- public:
- explicit TrayEventFilter();
- virtual ~TrayEventFilter();
-
- void AddWrapper(TrayBubbleWrapper* wrapper);
- void RemoveWrapper(TrayBubbleWrapper* wrapper);
-
- // Overridden from ui::EventHandler.
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
-
- private:
- // Returns true if the event is handled.
- bool ProcessLocatedEvent(ui::LocatedEvent* event);
-
- std::set<TrayBubbleWrapper*> wrappers_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayEventFilter);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_TRAY_EVENT_FILTER_H_
diff --git a/chromium/ash/system/tray/tray_image_item.cc b/chromium/ash/system/tray/tray_image_item.cc
deleted file mode 100644
index 7c5e216c942..00000000000
--- a/chromium/ash/system/tray/tray_image_item.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/tray_image_item.h"
-
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/tray_item_view.h"
-#include "ash/system/tray/tray_utils.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/layout/box_layout.h"
-
-namespace ash {
-namespace internal {
-
-TrayImageItem::TrayImageItem(SystemTray* system_tray, int resource_id)
- : SystemTrayItem(system_tray),
- resource_id_(resource_id),
- tray_view_(NULL) {
-}
-
-TrayImageItem::~TrayImageItem() {}
-
-views::View* TrayImageItem::tray_view() {
- return tray_view_;
-}
-
-void TrayImageItem::SetImageFromResourceId(int resource_id) {
- resource_id_ = resource_id;
- if (!tray_view_)
- return;
- tray_view_->image_view()->SetImage(ui::ResourceBundle::GetSharedInstance().
- GetImageNamed(resource_id_).ToImageSkia());
-}
-
-views::View* TrayImageItem::CreateTrayView(user::LoginStatus status) {
- CHECK(tray_view_ == NULL);
- tray_view_ = new TrayItemView(this);
- tray_view_->CreateImageView();
- tray_view_->image_view()->SetImage(ui::ResourceBundle::GetSharedInstance().
- GetImageNamed(resource_id_).ToImageSkia());
- tray_view_->SetVisible(GetInitialVisibility());
- SetItemAlignment(system_tray()->shelf_alignment());
- return tray_view_;
-}
-
-views::View* TrayImageItem::CreateDefaultView(user::LoginStatus status) {
- return NULL;
-}
-
-views::View* TrayImageItem::CreateDetailedView(user::LoginStatus status) {
- return NULL;
-}
-
-void TrayImageItem::UpdateAfterLoginStatusChange(user::LoginStatus status) {
-}
-
-void TrayImageItem::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
- SetTrayImageItemBorder(tray_view_, alignment);
- SetItemAlignment(alignment);
-}
-
-void TrayImageItem::DestroyTrayView() {
- tray_view_ = NULL;
-}
-
-void TrayImageItem::DestroyDefaultView() {
-}
-
-void TrayImageItem::DestroyDetailedView() {
-}
-
-void TrayImageItem::SetItemAlignment(ShelfAlignment alignment) {
- // Center the item dependent on the orientation of the shelf.
- views::BoxLayout::Orientation layout = views::BoxLayout::kHorizontal;
- switch (alignment) {
- case ash::SHELF_ALIGNMENT_BOTTOM:
- case ash::SHELF_ALIGNMENT_TOP:
- layout = views::BoxLayout::kHorizontal;
- break;
- case ash::SHELF_ALIGNMENT_LEFT:
- case ash::SHELF_ALIGNMENT_RIGHT:
- layout = views::BoxLayout::kVertical;
- break;
- }
- tray_view_->SetLayoutManager(new views::BoxLayout(layout, 0, 0, 0));
- tray_view_->Layout();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/tray_image_item.h b/chromium/ash/system/tray/tray_image_item.h
deleted file mode 100644
index 6dea5c8372f..00000000000
--- a/chromium/ash/system/tray/tray_image_item.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_
-#define ASH_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_
-
-#include "ash/system/tray/system_tray_item.h"
-
-namespace views {
-class ImageView;
-}
-
-namespace ash {
-namespace internal {
-
-class TrayItemView;
-
-class TrayImageItem : public SystemTrayItem {
- public:
- TrayImageItem(SystemTray* system_tray, int resource_id);
- virtual ~TrayImageItem();
-
- views::View* tray_view();
-
- // Changes the icon of the tray-view to the specified resource.
- void SetImageFromResourceId(int resource_id);
-
- protected:
- virtual bool GetInitialVisibility() = 0;
-
- // Overridden from SystemTrayItem.
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyTrayView() OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
- virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
- virtual void UpdateAfterShelfAlignmentChange(
- ShelfAlignment alignment) OVERRIDE;
-
- private:
- // Set the alignment of the image depending on the shelf alignment.
- void SetItemAlignment(ShelfAlignment alignment);
-
- int resource_id_;
- TrayItemView* tray_view_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayImageItem);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_TRAY_IMAGE_ITEM_H_
diff --git a/chromium/ash/system/tray/tray_item_more.cc b/chromium/ash/system/tray/tray_item_more.cc
deleted file mode 100644
index 9284b47d053..00000000000
--- a/chromium/ash/system/tray/tray_item_more.cc
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/tray_item_more.h"
-
-#include "ash/system/tray/fixed_sized_image_view.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "ash/system/tray/tray_constants.h"
-#include "grit/ash_resources.h"
-#include "ui/base/accessibility/accessible_view_state.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-
-namespace ash {
-namespace internal {
-
-TrayItemMore::TrayItemMore(SystemTrayItem* owner, bool show_more)
- : owner_(owner),
- show_more_(show_more),
- icon_(NULL),
- label_(NULL),
- more_(NULL) {
- SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
- kTrayPopupPaddingHorizontal, 0, kTrayPopupPaddingBetweenItems));
-
- icon_ = new FixedSizedImageView(0, kTrayPopupItemHeight);
- AddChildView(icon_);
-
- label_ = new views::Label;
- label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- AddChildView(label_);
-
- if (show_more) {
- more_ = new views::ImageView;
- more_->EnableCanvasFlippingForRTLUI(true);
- more_->SetImage(ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- IDR_AURA_UBER_TRAY_MORE).ToImageSkia());
- AddChildView(more_);
- }
-}
-
-TrayItemMore::~TrayItemMore() {
-}
-
-void TrayItemMore::SetLabel(const base::string16& label) {
- label_->SetText(label);
- Layout();
- SchedulePaint();
-}
-
-void TrayItemMore::SetImage(const gfx::ImageSkia* image_skia) {
- icon_->SetImage(image_skia);
- SchedulePaint();
-}
-
-void TrayItemMore::SetAccessibleName(const base::string16& name) {
- accessible_name_ = name;
-}
-
-void TrayItemMore::ReplaceIcon(views::View* view) {
- delete icon_;
- icon_ = NULL;
- AddChildViewAt(view, 0);
-}
-
-bool TrayItemMore::PerformAction(const ui::Event& event) {
- if (!show_more_)
- return false;
-
- owner()->TransitionDetailedView();
- return true;
-}
-
-void TrayItemMore::Layout() {
- // Let the box-layout do the layout first. Then move the '>' arrow to right
- // align.
- views::View::Layout();
-
- if (!show_more_)
- return;
-
- // Make sure the chevron always has the full size.
- gfx::Size size = more_->GetPreferredSize();
- gfx::Rect bounds(size);
- bounds.set_x(width() - size.width() - kTrayPopupPaddingBetweenItems);
- bounds.set_y((height() - size.height()) / 2);
- more_->SetBoundsRect(bounds);
-
- // Adjust the label's bounds in case it got cut off by |more_|.
- if (label_->bounds().Intersects(more_->bounds())) {
- gfx::Rect bounds = label_->bounds();
- bounds.set_width(more_->x() - kTrayPopupPaddingBetweenItems - label_->x());
- label_->SetBoundsRect(bounds);
- }
-}
-
-void TrayItemMore::GetAccessibleState(ui::AccessibleViewState* state) {
- state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
- state->name = accessible_name_;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/tray_item_more.h b/chromium/ash/system/tray/tray_item_more.h
deleted file mode 100644
index 49287240d40..00000000000
--- a/chromium/ash/system/tray/tray_item_more.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_
-#define ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_
-
-#include "ash/system/tray/actionable_view.h"
-#include "ui/views/view.h"
-
-namespace views {
-class ImageView;
-class Label;
-class View;
-}
-
-namespace ash {
-
-class SystemTrayItem;
-
-namespace internal {
-
-// A view with a chevron ('>') on the right edge. Clicking on the view brings up
-// the detailed view of the tray-item that owns it.
-class TrayItemMore : public ActionableView {
- public:
- TrayItemMore(SystemTrayItem* owner, bool show_more);
- virtual ~TrayItemMore();
-
- SystemTrayItem* owner() const { return owner_; }
-
- void SetLabel(const base::string16& label);
- void SetImage(const gfx::ImageSkia* image_skia);
- void SetAccessibleName(const base::string16& name);
-
- protected:
- // Replaces the default icon (on the left of the label), and allows a custom
- // view to be placed there. Once the default icon is replaced, |SetImage|
- // should never be called.
- void ReplaceIcon(views::View* view);
-
- private:
- // Overridden from ActionableView.
- virtual bool PerformAction(const ui::Event& event) OVERRIDE;
-
- // Overridden from views::View.
- virtual void Layout() OVERRIDE;
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
-
- SystemTrayItem* owner_;
- // True if |more_| should be shown.
- bool show_more_;
- views::ImageView* icon_;
- views::Label* label_;
- views::ImageView* more_;
- base::string16 accessible_name_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayItemMore);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_
diff --git a/chromium/ash/system/tray/tray_item_view.cc b/chromium/ash/system/tray/tray_item_view.cc
deleted file mode 100644
index 9a7a75c4378..00000000000
--- a/chromium/ash/system/tray/tray_item_view.cc
+++ /dev/null
@@ -1,141 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/tray_item_view.h"
-
-#include "ash/shelf/shelf_types.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "ui/compositor/layer.h"
-#include "ui/gfx/animation/slide_animation.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/widget/widget.h"
-
-namespace {
-const int kTrayIconHeight = 29;
-const int kTrayIconWidth = 29;
-const int kTrayItemAnimationDurationMS = 200;
-
-// Animations can be disabled for testing.
-bool animations_enabled = true;
-}
-
-namespace ash {
-namespace internal {
-
-TrayItemView::TrayItemView(SystemTrayItem* owner)
- : owner_(owner),
- label_(NULL),
- image_view_(NULL) {
- SetPaintToLayer(true);
- SetFillsBoundsOpaquely(false);
- SetLayoutManager(
- new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0));
-}
-
-TrayItemView::~TrayItemView() {}
-
-// static
-void TrayItemView::DisableAnimationsForTest() {
- animations_enabled = false;
-}
-
-void TrayItemView::CreateLabel() {
- label_ = new views::Label;
- AddChildView(label_);
-}
-
-void TrayItemView::CreateImageView() {
- image_view_ = new views::ImageView;
- AddChildView(image_view_);
-}
-
-void TrayItemView::SetVisible(bool set_visible) {
- if (!GetWidget() || !animations_enabled) {
- views::View::SetVisible(set_visible);
- return;
- }
-
- if (!animation_) {
- animation_.reset(new gfx::SlideAnimation(this));
- animation_->SetSlideDuration(GetAnimationDurationMS());
- animation_->SetTweenType(gfx::Tween::LINEAR);
- animation_->Reset(visible() ? 1.0 : 0.0);
- }
-
- if (!set_visible) {
- animation_->Hide();
- AnimationProgressed(animation_.get());
- } else {
- animation_->Show();
- AnimationProgressed(animation_.get());
- views::View::SetVisible(true);
- }
-}
-
-gfx::Size TrayItemView::DesiredSize() {
- return views::View::GetPreferredSize();
-}
-
-int TrayItemView::GetAnimationDurationMS() {
- return kTrayItemAnimationDurationMS;
-}
-
-gfx::Size TrayItemView::GetPreferredSize() {
- gfx::Size size = DesiredSize();
- if (owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM ||
- owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_TOP)
- size.set_height(kTrayIconHeight);
- else
- size.set_width(kTrayIconWidth);
- if (!animation_.get() || !animation_->is_animating())
- return size;
- if (owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM ||
- owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_TOP) {
- size.set_width(std::max(1,
- static_cast<int>(size.width() * animation_->GetCurrentValue())));
- } else {
- size.set_height(std::max(1,
- static_cast<int>(size.height() * animation_->GetCurrentValue())));
- }
- return size;
-}
-
-int TrayItemView::GetHeightForWidth(int width) {
- return GetPreferredSize().height();
-}
-
-void TrayItemView::ChildPreferredSizeChanged(views::View* child) {
- PreferredSizeChanged();
-}
-
-void TrayItemView::AnimationProgressed(const gfx::Animation* animation) {
- gfx::Transform transform;
- if (owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM ||
- owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_TOP) {
- transform.Translate(0, animation->CurrentValueBetween(
- static_cast<double>(height()) / 2, 0.));
- } else {
- transform.Translate(animation->CurrentValueBetween(
- static_cast<double>(width() / 2), 0.), 0);
- }
- transform.Scale(animation->GetCurrentValue(),
- animation->GetCurrentValue());
- layer()->SetTransform(transform);
- PreferredSizeChanged();
-}
-
-void TrayItemView::AnimationEnded(const gfx::Animation* animation) {
- if (animation->GetCurrentValue() < 0.1)
- views::View::SetVisible(false);
-}
-
-void TrayItemView::AnimationCanceled(const gfx::Animation* animation) {
- AnimationEnded(animation);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/tray_item_view.h b/chromium/ash/system/tray/tray_item_view.h
deleted file mode 100644
index 761e918791c..00000000000
--- a/chromium/ash/system/tray/tray_item_view.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_TRAY_ITEM_VIEW_H_
-#define ASH_SYSTEM_TRAY_TRAY_ITEM_VIEW_H_
-
-#include "ash/ash_export.h"
-#include "ui/gfx/animation/animation_delegate.h"
-#include "ui/views/view.h"
-
-namespace gfx {
-class SlideAnimation;
-}
-
-namespace views {
-class ImageView;
-class Label;
-}
-
-namespace ash {
-
-class SystemTrayItem;
-
-namespace internal {
-
-// Base-class for items in the tray. It makes sure the widget is updated
-// correctly when the visibility/size of the tray item changes. It also adds
-// animation when showing/hiding the item in the tray.
-class ASH_EXPORT TrayItemView : public views::View,
- public gfx::AnimationDelegate {
- public:
- explicit TrayItemView(SystemTrayItem* owner);
- virtual ~TrayItemView();
-
- static void DisableAnimationsForTest();
-
- // Convenience function for creating a child Label or ImageView.
- void CreateLabel();
- void CreateImageView();
-
- SystemTrayItem* owner() const { return owner_; }
- views::Label* label() const { return label_; }
- views::ImageView* image_view() const { return image_view_; }
-
- // Overridden from views::View.
- virtual void SetVisible(bool visible) OVERRIDE;
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual int GetHeightForWidth(int width) OVERRIDE;
-
- protected:
- // Makes sure the widget relayouts after the size/visibility of the view
- // changes.
- void ApplyChange();
-
- // This should return the desired size of the view. For most views, this
- // returns GetPreferredSize. But since this class overrides GetPreferredSize
- // for animation purposes, we allow a different way to get this size, and do
- // not allow GetPreferredSize to be overridden.
- virtual gfx::Size DesiredSize();
-
- // The default animation duration is 200ms. But each view can customize this.
- virtual int GetAnimationDurationMS();
-
- private:
- // Overridden from views::View.
- virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
-
- // Overridden from gfx::AnimationDelegate.
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
- virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
- virtual void AnimationCanceled(const gfx::Animation* animation) OVERRIDE;
-
- SystemTrayItem* owner_;
- scoped_ptr<gfx::SlideAnimation> animation_;
- views::Label* label_;
- views::ImageView* image_view_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayItemView);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_TRAY_ITEM_VIEW_H_
diff --git a/chromium/ash/system/tray/tray_notification_view.cc b/chromium/ash/system/tray/tray_notification_view.cc
deleted file mode 100644
index c09589285ea..00000000000
--- a/chromium/ash/system/tray/tray_notification_view.cc
+++ /dev/null
@@ -1,172 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/tray_notification_view.h"
-
-#include "ash/system/tray/system_tray_item.h"
-#include "ash/system/tray/tray_constants.h"
-#include "grit/ash_strings.h"
-#include "grit/ui_resources.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/views/background.h"
-#include "ui/views/controls/button/image_button.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/layout/grid_layout.h"
-
-namespace ash {
-namespace internal {
-
-TrayNotificationView::TrayNotificationView(SystemTrayItem* owner, int icon_id)
- : owner_(owner),
- icon_id_(icon_id),
- icon_(NULL) {
-}
-
-TrayNotificationView::~TrayNotificationView() {
-}
-
-void TrayNotificationView::InitView(views::View* contents) {
- set_background(views::Background::CreateSolidBackground(kBackgroundColor));
-
- views::GridLayout* layout = new views::GridLayout(this);
- SetLayoutManager(layout);
-
- views::ImageButton* close_button = new views::ImageButton(this);
- close_button->SetImage(views::CustomButton::STATE_NORMAL,
- ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IDR_MESSAGE_CLOSE));
- close_button->SetImageAlignment(views::ImageButton::ALIGN_CENTER,
- views::ImageButton::ALIGN_MIDDLE);
-
- icon_ = new views::ImageView;
- if (icon_id_ != 0) {
- icon_->SetImage(
- ResourceBundle::GetSharedInstance().GetImageSkiaNamed(icon_id_));
- }
-
- views::ColumnSet* columns = layout->AddColumnSet(0);
-
- columns->AddPaddingColumn(0, kTrayPopupPaddingHorizontal / 2);
-
- // Icon
- columns->AddColumn(views::GridLayout::CENTER, views::GridLayout::CENTER,
- 0, /* resize percent */
- views::GridLayout::FIXED,
- kNotificationIconWidth, kNotificationIconWidth);
-
- columns->AddPaddingColumn(0, kTrayPopupPaddingHorizontal / 2);
-
- // Contents
- columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL,
- 100, /* resize percent */
- views::GridLayout::FIXED,
- kTrayNotificationContentsWidth,
- kTrayNotificationContentsWidth);
-
- columns->AddPaddingColumn(0, kTrayPopupPaddingHorizontal / 2);
-
- // Close button
- columns->AddColumn(views::GridLayout::CENTER, views::GridLayout::LEADING,
- 0, /* resize percent */
- views::GridLayout::FIXED,
- kNotificationButtonWidth, kNotificationButtonWidth);
-
- // Layout rows
- layout->AddPaddingRow(0, kTrayPopupPaddingBetweenItems);
- layout->StartRow(0, 0);
- layout->AddView(icon_);
- layout->AddView(contents);
- layout->AddView(close_button);
- layout->AddPaddingRow(0, kTrayPopupPaddingBetweenItems);
-}
-
-void TrayNotificationView::SetIconImage(const gfx::ImageSkia& image) {
- icon_->SetImage(image);
- SchedulePaint();
-}
-
-const gfx::ImageSkia& TrayNotificationView::GetIconImage() const {
- return icon_->GetImage();
-}
-
-void TrayNotificationView::UpdateView(views::View* new_contents) {
- RemoveAllChildViews(true);
- InitView(new_contents);
- Layout();
- PreferredSizeChanged();
- SchedulePaint();
-}
-
-void TrayNotificationView::UpdateViewAndImage(views::View* new_contents,
- const gfx::ImageSkia& image) {
- RemoveAllChildViews(true);
- InitView(new_contents);
- icon_->SetImage(image);
- Layout();
- PreferredSizeChanged();
- SchedulePaint();
-}
-
-void TrayNotificationView::StartAutoCloseTimer(int seconds) {
- autoclose_.Stop();
- autoclose_delay_ = seconds;
- if (autoclose_delay_) {
- autoclose_.Start(FROM_HERE,
- base::TimeDelta::FromSeconds(autoclose_delay_),
- this, &TrayNotificationView::HandleClose);
- }
-}
-
-void TrayNotificationView::StopAutoCloseTimer() {
- autoclose_.Stop();
-}
-
-void TrayNotificationView::RestartAutoCloseTimer() {
- if (autoclose_delay_)
- StartAutoCloseTimer(autoclose_delay_);
-}
-
-void TrayNotificationView::ButtonPressed(views::Button* sender,
- const ui::Event& event) {
- HandleClose();
-}
-
-bool TrayNotificationView::OnMousePressed(const ui::MouseEvent& event) {
- HandleClickAction();
- return true;
-}
-
-void TrayNotificationView::OnGestureEvent(ui::GestureEvent* event) {
- SlideOutView::OnGestureEvent(event);
- if (event->handled())
- return;
- if (event->type() != ui::ET_GESTURE_TAP)
- return;
- HandleClickAction();
- event->SetHandled();
-}
-
-void TrayNotificationView::OnClose() {
-}
-
-void TrayNotificationView::OnClickAction() {
-}
-
-void TrayNotificationView::OnSlideOut() {
- owner_->HideNotificationView();
-}
-
-void TrayNotificationView::HandleClose() {
- OnClose();
- owner_->HideNotificationView();
-}
-
-void TrayNotificationView::HandleClickAction() {
- HandleClose();
- OnClickAction();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/tray_notification_view.h b/chromium/ash/system/tray/tray_notification_view.h
deleted file mode 100644
index 314b8aad7d2..00000000000
--- a/chromium/ash/system/tray/tray_notification_view.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_TRAY_NOTIFICATION_VIEW_H_
-#define ASH_SYSTEM_TRAY_TRAY_NOTIFICATION_VIEW_H_
-
-#include "base/timer/timer.h"
-#include "ui/views/controls/button/image_button.h"
-#include "ui/views/controls/slide_out_view.h"
-
-namespace gfx {
-class ImageSkia;
-}
-
-namespace views {
-class ImageView;
-}
-
-namespace ash {
-
-class SystemTrayItem;
-
-namespace internal {
-
-// A view for closable notification views, laid out like:
-// -------------------
-// | icon contents x |
-// ----------------v--
-// The close button will call OnClose() when clicked.
-class TrayNotificationView : public views::SlideOutView,
- public views::ButtonListener {
- public:
- // If icon_id is 0, no icon image will be set. SetIconImage can be called
- // to later set the icon image.
- TrayNotificationView(SystemTrayItem* owner, int icon_id);
- virtual ~TrayNotificationView();
-
- // InitView must be called once with the contents to be displayed.
- void InitView(views::View* contents);
-
- // Sets/updates the icon image.
- void SetIconImage(const gfx::ImageSkia& image);
-
- // Gets the icons image.
- const gfx::ImageSkia& GetIconImage() const;
-
- // Replaces the contents view.
- void UpdateView(views::View* new_contents);
-
- // Replaces the contents view and updates the icon image.
- void UpdateViewAndImage(views::View* new_contents,
- const gfx::ImageSkia& image);
-
- // Autoclose timer operations.
- void StartAutoCloseTimer(int seconds);
- void StopAutoCloseTimer();
- void RestartAutoCloseTimer();
-
- // Overridden from ButtonListener.
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
-
- // Overridden from views::View.
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
-
- // Overridden from ui::EventHandler.
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- protected:
- // Called when the close button is pressed. Does nothing by default.
- virtual void OnClose();
- // Called when the notification is clicked on. Does nothing by default.
- virtual void OnClickAction();
-
- // Overridden from views::SlideOutView.
- virtual void OnSlideOut() OVERRIDE;
-
- SystemTrayItem* owner() { return owner_; }
-
- private:
- void HandleClose();
- void HandleClickAction();
-
- SystemTrayItem* owner_;
- int icon_id_;
- views::ImageView* icon_;
-
- int autoclose_delay_;
- base::OneShotTimer<TrayNotificationView> autoclose_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayNotificationView);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_TRAY_NOTIFICATION_VIEW_H_
diff --git a/chromium/ash/system/tray/tray_popup_header_button.cc b/chromium/ash/system/tray/tray_popup_header_button.cc
deleted file mode 100644
index d19cbc54823..00000000000
--- a/chromium/ash/system/tray/tray_popup_header_button.cc
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/tray_popup_header_button.h"
-
-#include "ash/ash_constants.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/canvas.h"
-#include "ui/views/painter.h"
-
-namespace ash {
-namespace internal {
-
-// static
-const char TrayPopupHeaderButton::kViewClassName[] =
- "tray/TrayPopupHeaderButton";
-
-TrayPopupHeaderButton::TrayPopupHeaderButton(views::ButtonListener* listener,
- int enabled_resource_id,
- int disabled_resource_id,
- int enabled_resource_id_hover,
- int disabled_resource_id_hover,
- int accessible_name_id)
- : views::ToggleImageButton(listener) {
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- SetImage(views::Button::STATE_NORMAL,
- bundle.GetImageNamed(enabled_resource_id).ToImageSkia());
- SetToggledImage(views::Button::STATE_NORMAL,
- bundle.GetImageNamed(disabled_resource_id).ToImageSkia());
- SetImage(views::Button::STATE_HOVERED,
- bundle.GetImageNamed(enabled_resource_id_hover).ToImageSkia());
- SetToggledImage(views::Button::STATE_HOVERED,
- bundle.GetImageNamed(disabled_resource_id_hover).ToImageSkia());
- SetImageAlignment(views::ImageButton::ALIGN_CENTER,
- views::ImageButton::ALIGN_MIDDLE);
- SetAccessibleName(bundle.GetLocalizedString(accessible_name_id));
- SetFocusable(true);
- set_request_focus_on_press(false);
-
- SetFocusPainter(views::Painter::CreateSolidFocusPainter(
- kFocusBorderColor,
- gfx::Insets(1, 2, 2, 3)));
-}
-
-TrayPopupHeaderButton::~TrayPopupHeaderButton() {}
-
-const char* TrayPopupHeaderButton::GetClassName() const {
- return kViewClassName;
-}
-
-gfx::Size TrayPopupHeaderButton::GetPreferredSize() {
- return gfx::Size(ash::kTrayPopupItemHeight, ash::kTrayPopupItemHeight);
-}
-
-void TrayPopupHeaderButton::OnPaintBorder(gfx::Canvas* canvas) {
- // Just the left border.
- const int kBorderHeight = 25;
- int padding = (height() - kBorderHeight) / 2;
- canvas->FillRect(gfx::Rect(0, padding, 1, height() - padding * 2),
- ash::kBorderDarkColor);
-}
-
-void TrayPopupHeaderButton::StateChanged() {
- SchedulePaint();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/tray_popup_header_button.h b/chromium/ash/system/tray/tray_popup_header_button.h
deleted file mode 100644
index 37849bc2e97..00000000000
--- a/chromium/ash/system/tray/tray_popup_header_button.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_TRAY_POPUP_HEADER_BUTTON_H_
-#define ASH_SYSTEM_TRAY_TRAY_POPUP_HEADER_BUTTON_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/views/controls/button/image_button.h"
-
-namespace ash {
-namespace internal {
-
-// A ToggleImageButton with fixed size, paddings and hover effects. These
-// buttons are used in the header.
-class ASH_EXPORT TrayPopupHeaderButton : public views::ToggleImageButton {
- public:
- static const char kViewClassName[];
-
- TrayPopupHeaderButton(views::ButtonListener* listener,
- int enabled_resource_id,
- int disabled_resource_id,
- int enabled_resource_id_hover,
- int disabled_resource_id_hover,
- int accessible_name_id);
- virtual ~TrayPopupHeaderButton();
-
- private:
- // Overridden from views::View:
- virtual const char* GetClassName() const OVERRIDE;
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual void OnPaintBorder(gfx::Canvas* canvas) OVERRIDE;
-
- // Overridden from views::CustomButton:
- virtual void StateChanged() OVERRIDE;
-
- DISALLOW_COPY_AND_ASSIGN(TrayPopupHeaderButton);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_TRAY_POPUP_HEADER_BUTTON_H_
diff --git a/chromium/ash/system/tray/tray_popup_label_button.cc b/chromium/ash/system/tray/tray_popup_label_button.cc
deleted file mode 100644
index 5b00c02a060..00000000000
--- a/chromium/ash/system/tray/tray_popup_label_button.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/tray_popup_label_button.h"
-
-#include "ash/ash_constants.h"
-#include "ash/system/tray/tray_popup_label_button_border.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/rect.h"
-#include "ui/views/painter.h"
-
-namespace ash {
-namespace internal {
-
-TrayPopupLabelButton::TrayPopupLabelButton(views::ButtonListener* listener,
- const base::string16& text)
- : views::LabelButton(listener, text) {
- set_border(new TrayPopupLabelButtonBorder);
- SetFocusable(true);
- set_request_focus_on_press(false);
- set_animate_on_state_change(false);
- SetHorizontalAlignment(gfx::ALIGN_CENTER);
- SetFocusPainter(views::Painter::CreateSolidFocusPainter(
- kFocusBorderColor,
- gfx::Insets(1, 1, 2, 2)));
-}
-
-TrayPopupLabelButton::~TrayPopupLabelButton() {}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/tray_popup_label_button.h b/chromium/ash/system/tray/tray_popup_label_button.h
deleted file mode 100644
index a1f9db6b7b4..00000000000
--- a/chromium/ash/system/tray/tray_popup_label_button.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_TRAY_POPUP_LABEL_BUTTON_H_
-#define ASH_SYSTEM_TRAY_TRAY_POPUP_LABEL_BUTTON_H_
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/strings/string16.h"
-#include "ui/views/controls/button/label_button.h"
-
-namespace ash {
-namespace internal {
-
-// A label button with custom alignment, border and focus border.
-class TrayPopupLabelButton : public views::LabelButton {
- public:
- TrayPopupLabelButton(views::ButtonListener* listener,
- const base::string16& text);
- virtual ~TrayPopupLabelButton();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TrayPopupLabelButton);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_TRAY_POPUP_LABEL_BUTTON_H_
diff --git a/chromium/ash/system/tray/tray_popup_label_button_border.cc b/chromium/ash/system/tray/tray_popup_label_button_border.cc
deleted file mode 100644
index d5be6bcc324..00000000000
--- a/chromium/ash/system/tray/tray_popup_label_button_border.cc
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/tray_popup_label_button_border.h"
-
-#include "base/i18n/rtl.h"
-#include "grit/ash_resources.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/vector2d.h"
-#include "ui/native_theme/native_theme.h"
-#include "ui/views/controls/button/label_button.h"
-#include "ui/views/native_theme_delegate.h"
-
-namespace ash {
-namespace internal {
-
-TrayPopupLabelButtonBorder::TrayPopupLabelButtonBorder()
- : LabelButtonBorder(views::Button::STYLE_TEXTBUTTON) {
- const int kTrayPopupLabelButtonBorderImagesNormal[] = {
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_NORMAL_BACKGROUND,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_NORMAL_BACKGROUND,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_NORMAL_BACKGROUND,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_NORMAL_BACKGROUND,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_NORMAL_BACKGROUND,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_NORMAL_BACKGROUND,
- };
- SetPainter(false, views::Button::STATE_NORMAL,
- views::Painter::CreateImageGridPainter(
- kTrayPopupLabelButtonBorderImagesNormal));
- SetPainter(false, views::Button::STATE_DISABLED,
- views::Painter::CreateImageGridPainter(
- kTrayPopupLabelButtonBorderImagesNormal));
-
- const int kTrayPopupLabelButtonBorderImagesHovered[] = {
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_HOVER_BACKGROUND,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_BORDER,
- };
- SetPainter(false, views::Button::STATE_HOVERED,
- views::Painter::CreateImageGridPainter(
- kTrayPopupLabelButtonBorderImagesHovered));
- SetPainter(false, views::Button::STATE_PRESSED,
- views::Painter::CreateImageGridPainter(
- kTrayPopupLabelButtonBorderImagesHovered));
-
- const int kTrayPopupLabelButtonPaddingHorizontal = 16;
- const int kTrayPopupLabelButtonPaddingVertical = 8;
- set_insets(gfx::Insets(kTrayPopupLabelButtonPaddingVertical,
- kTrayPopupLabelButtonPaddingHorizontal,
- kTrayPopupLabelButtonPaddingVertical,
- kTrayPopupLabelButtonPaddingHorizontal));
-}
-
-TrayPopupLabelButtonBorder::~TrayPopupLabelButtonBorder() {}
-
-void TrayPopupLabelButtonBorder::Paint(const views::View& view,
- gfx::Canvas* canvas) {
- const views::NativeThemeDelegate* native_theme_delegate =
- static_cast<const views::LabelButton*>(&view);
- ui::NativeTheme::ExtraParams extra;
- const ui::NativeTheme::State state =
- native_theme_delegate->GetThemeState(&extra);
- if (state == ui::NativeTheme::kNormal ||
- state == ui::NativeTheme::kDisabled) {
- // In normal and disabled state, the border is a vertical bar separating the
- // button from the preceding sibling. If this button is its parent's first
- // visible child, the separator bar should be omitted.
- const views::View* first_visible_child = NULL;
- for (int i = 0; i < view.parent()->child_count(); ++i) {
- const views::View* child = view.parent()->child_at(i);
- if (child->visible()) {
- first_visible_child = child;
- break;
- }
- }
- if (first_visible_child == &view)
- return;
- }
- if (base::i18n::IsRTL()) {
- canvas->Save();
- canvas->Translate(gfx::Vector2d(view.width(), 0));
- canvas->Scale(-1, 1);
- LabelButtonBorder::Paint(view, canvas);
- canvas->Restore();
- } else {
- LabelButtonBorder::Paint(view, canvas);
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/tray_popup_label_button_border.h b/chromium/ash/system/tray/tray_popup_label_button_border.h
deleted file mode 100644
index 04e5c7356d8..00000000000
--- a/chromium/ash/system/tray/tray_popup_label_button_border.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_TRAY_POPUP_LABEL_BUTTON_BORDER_H_
-#define ASH_SYSTEM_TRAY_TRAY_POPUP_LABEL_BUTTON_BORDER_H_
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/views/controls/button/label_button_border.h"
-
-namespace ash {
-namespace internal {
-
-// A border for label buttons that paints a vertical separator in normal state
-// and a custom hover effect in hovered or pressed state.
-class TrayPopupLabelButtonBorder : public views::LabelButtonBorder {
- public:
- TrayPopupLabelButtonBorder();
- virtual ~TrayPopupLabelButtonBorder();
-
- // views::LabelButtonBorder:
- virtual void Paint(const views::View& view, gfx::Canvas* canvas) OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TrayPopupLabelButtonBorder);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_TRAY_POPUP_LABEL_BUTTON_BORDER_H_
diff --git a/chromium/ash/system/tray/tray_utils.cc b/chromium/ash/system/tray/tray_utils.cc
deleted file mode 100644
index 34582b6fb5e..00000000000
--- a/chromium/ash/system/tray/tray_utils.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray/tray_utils.h"
-
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_item_view.h"
-#include "ui/gfx/font.h"
-#include "ui/views/border.h"
-#include "ui/views/controls/label.h"
-
-namespace ash {
-namespace internal {
-
-void SetupLabelForTray(views::Label* label) {
- // Making label_font static to avoid the time penalty of DeriveFont for
- // all but the first call.
- static const gfx::Font label_font(gfx::Font().DeriveFont(1, gfx::Font::BOLD));
- label->SetFont(label_font);
- label->SetAutoColorReadabilityEnabled(false);
- label->SetEnabledColor(SK_ColorWHITE);
- label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255));
- label->SetShadowColors(SkColorSetARGB(64, 0, 0, 0),
- SkColorSetARGB(64, 0, 0, 0));
- label->SetShadowOffset(0, 1);
-}
-
-void SetTrayImageItemBorder(views::View* tray_view,
- ShelfAlignment alignment) {
- if (alignment == SHELF_ALIGNMENT_BOTTOM ||
- alignment == SHELF_ALIGNMENT_TOP) {
- tray_view->set_border(views::Border::CreateEmptyBorder(
- 0, kTrayImageItemHorizontalPaddingBottomAlignment,
- 0, kTrayImageItemHorizontalPaddingBottomAlignment));
- } else {
- tray_view->set_border(views::Border::CreateEmptyBorder(
- kTrayImageItemVerticalPaddingVerticalAlignment,
- kTrayImageItemHorizontalPaddingVerticalAlignment,
- kTrayImageItemVerticalPaddingVerticalAlignment,
- kTrayImageItemHorizontalPaddingVerticalAlignment));
- }
-}
-
-void SetTrayLabelItemBorder(TrayItemView* tray_view,
- ShelfAlignment alignment) {
- if (alignment == SHELF_ALIGNMENT_BOTTOM ||
- alignment == SHELF_ALIGNMENT_TOP) {
- tray_view->set_border(views::Border::CreateEmptyBorder(
- 0, kTrayLabelItemHorizontalPaddingBottomAlignment,
- 0, kTrayLabelItemHorizontalPaddingBottomAlignment));
- } else {
- // Center the label for vertical launcher alignment.
- int horizontal_padding = std::max(0,
- (tray_view->GetPreferredSize().width() -
- tray_view->label()->GetPreferredSize().width()) / 2);
- tray_view->set_border(views::Border::CreateEmptyBorder(
- kTrayLabelItemVerticalPaddingVerticalAlignment,
- horizontal_padding,
- kTrayLabelItemVerticalPaddingVerticalAlignment,
- horizontal_padding));
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray/tray_utils.h b/chromium/ash/system/tray/tray_utils.h
deleted file mode 100644
index 412fb97d8da..00000000000
--- a/chromium/ash/system/tray/tray_utils.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_TRAY_UTILS_H_
-#define ASH_SYSTEM_TRAY_TRAY_UTILS_H_
-
-#include "ash/shelf/shelf_types.h"
-
-namespace views {
-class Label;
-class View;
-}
-
-namespace ash {
-namespace internal {
-
-class TrayItemView;
-
-// Sets up a Label properly for the tray (sets color, font etc.).
-void SetupLabelForTray(views::Label* label);
-
-// TODO(jennyz): refactor these two functions to SystemTrayItem.
-// Sets the empty border of an image tray item for adjusting the space
-// around it.
-void SetTrayImageItemBorder(views::View* tray_view, ShelfAlignment alignment);
-// Sets the empty border around a label tray item for adjusting the space
-// around it.
-void SetTrayLabelItemBorder(TrayItemView* tray_view,
- ShelfAlignment alignment);
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_TRAY_UTILS_H_
diff --git a/chromium/ash/system/tray/view_click_listener.h b/chromium/ash/system/tray/view_click_listener.h
deleted file mode 100644
index b5f4bb886f0..00000000000
--- a/chromium/ash/system/tray/view_click_listener.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_VIEW_CLICK_LISTENER_H_
-#define ASH_SYSTEM_TRAY_VIEW_CLICK_LISTENER_H_
-
-namespace views {
-class View;
-}
-
-namespace ash {
-namespace internal {
-
-class ViewClickListener {
- public:
- virtual void OnViewClicked(views::View* sender) = 0;
-
- protected:
- virtual ~ViewClickListener() {}
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_VIEW_CLICK_LISTENER_H_
diff --git a/chromium/ash/system/tray_accessibility.cc b/chromium/ash/system/tray_accessibility.cc
deleted file mode 100644
index 8b1902df5e6..00000000000
--- a/chromium/ash/system/tray_accessibility.cc
+++ /dev/null
@@ -1,396 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray_accessibility.h"
-
-#include "ash/accessibility_delegate.h"
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
-#include "ash/system/tray/hover_highlight_view.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_details_view.h"
-#include "ash/system/tray/tray_item_more.h"
-#include "ash/system/tray/tray_notification_view.h"
-#include "ash/system/tray/tray_popup_label_button.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-enum AccessibilityState {
- A11Y_NONE = 0,
- A11Y_SPOKEN_FEEDBACK = 1 << 0,
- A11Y_HIGH_CONTRAST = 1 << 1,
- A11Y_SCREEN_MAGNIFIER = 1 << 2,
- A11Y_LARGE_CURSOR = 1 << 3,
- A11Y_AUTOCLICK = 1 << 4,
-};
-
-uint32 GetAccessibilityState() {
- AccessibilityDelegate* delegate =
- Shell::GetInstance()->accessibility_delegate();
- uint32 state = A11Y_NONE;
- if (delegate->IsSpokenFeedbackEnabled())
- state |= A11Y_SPOKEN_FEEDBACK;
- if (delegate->IsHighContrastEnabled())
- state |= A11Y_HIGH_CONTRAST;
- if (delegate->IsMagnifierEnabled())
- state |= A11Y_SCREEN_MAGNIFIER;
- if (delegate->IsLargeCursorEnabled())
- state |= A11Y_LARGE_CURSOR;
- if (delegate->IsAutoclickEnabled())
- state |= A11Y_AUTOCLICK;
- return state;
-}
-
-user::LoginStatus GetCurrentLoginStatus() {
- return Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus();
-}
-
-} // namespace
-
-namespace tray {
-
-class DefaultAccessibilityView : public TrayItemMore {
- public:
- explicit DefaultAccessibilityView(SystemTrayItem* owner)
- : TrayItemMore(owner, true) {
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_ACCESSIBILITY_DARK).
- ToImageSkia());
- base::string16 label = bundle.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_ACCESSIBILITY);
- SetLabel(label);
- SetAccessibleName(label);
- }
-
- virtual ~DefaultAccessibilityView() {
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DefaultAccessibilityView);
-};
-
-class AccessibilityPopupView : public TrayNotificationView {
- public:
- AccessibilityPopupView(SystemTrayItem* owner)
- : TrayNotificationView(owner, IDR_AURA_UBER_TRAY_ACCESSIBILITY_DARK) {
- InitView(GetLabel());
- }
-
- private:
- views::Label* GetLabel() {
- views::Label* label = new views::Label(
- l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_SPOKEN_FEEDBACK_ENABLED_BUBBLE));
- label->SetMultiLine(true);
- label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- return label;
- }
-
- DISALLOW_COPY_AND_ASSIGN(AccessibilityPopupView);
-};
-
-////////////////////////////////////////////////////////////////////////////////
-// ash::internal::tray::AccessibilityDetailedView
-
-AccessibilityDetailedView::AccessibilityDetailedView(
- SystemTrayItem* owner, user::LoginStatus login) :
- TrayDetailsView(owner),
- spoken_feedback_view_(NULL),
- high_contrast_view_(NULL),
- screen_magnifier_view_(NULL),
- large_cursor_view_(NULL),
- help_view_(NULL),
- settings_view_(NULL),
- autoclick_view_(NULL),
- spoken_feedback_enabled_(false),
- high_contrast_enabled_(false),
- screen_magnifier_enabled_(false),
- large_cursor_enabled_(false),
- autoclick_enabled_(false),
- login_(login) {
-
- Reset();
-
- AppendAccessibilityList();
- AppendHelpEntries();
- CreateSpecialRow(IDS_ASH_STATUS_TRAY_ACCESSIBILITY_TITLE, this);
-
- Layout();
-}
-
-void AccessibilityDetailedView::AppendAccessibilityList() {
- CreateScrollableList();
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
-
- AccessibilityDelegate* delegate =
- Shell::GetInstance()->accessibility_delegate();
- spoken_feedback_enabled_ = delegate->IsSpokenFeedbackEnabled();
- spoken_feedback_view_ = AddScrollListItem(
- bundle.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SPOKEN_FEEDBACK),
- spoken_feedback_enabled_ ? gfx::Font::BOLD : gfx::Font::NORMAL,
- spoken_feedback_enabled_);
-
- // Large Cursor item is shown only in Login screen.
- if (login_ == user::LOGGED_IN_NONE) {
- large_cursor_enabled_ = delegate->IsLargeCursorEnabled();
- large_cursor_view_ = AddScrollListItem(
- bundle.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_ACCESSIBILITY_LARGE_CURSOR),
- large_cursor_enabled_ ? gfx::Font::BOLD : gfx::Font::NORMAL,
- large_cursor_enabled_);
- }
-
- high_contrast_enabled_ = delegate->IsHighContrastEnabled();
- high_contrast_view_ = AddScrollListItem(
- bundle.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_ACCESSIBILITY_HIGH_CONTRAST_MODE),
- high_contrast_enabled_ ? gfx::Font::BOLD : gfx::Font::NORMAL,
- high_contrast_enabled_);
- screen_magnifier_enabled_ = delegate->IsMagnifierEnabled();
- screen_magnifier_view_ = AddScrollListItem(
- bundle.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SCREEN_MAGNIFIER),
- screen_magnifier_enabled_ ? gfx::Font::BOLD : gfx::Font::NORMAL,
- screen_magnifier_enabled_);
-
- // Don't show autoclick option at login screen.
- if (login_ != user::LOGGED_IN_NONE) {
- autoclick_enabled_ = delegate->IsAutoclickEnabled();
- autoclick_view_ = AddScrollListItem(
- bundle.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_ACCESSIBILITY_AUTOCLICK),
- autoclick_enabled_ ? gfx::Font::BOLD : gfx::Font::NORMAL,
- autoclick_enabled_);
- }
-}
-
-void AccessibilityDetailedView::AppendHelpEntries() {
- // Currently the help page requires a browser window.
- // TODO(yoshiki): show this even on login/lock screen. crbug.com/158286
- if (login_ == user::LOGGED_IN_NONE ||
- login_ == user::LOGGED_IN_LOCKED)
- return;
-
- views::View* bottom_row = new View();
- views::BoxLayout* layout = new
- views::BoxLayout(views::BoxLayout::kHorizontal,
- kTrayMenuBottomRowPadding,
- kTrayMenuBottomRowPadding,
- kTrayMenuBottomRowPaddingBetweenItems);
- layout->set_spread_blank_space(true);
- bottom_row->SetLayoutManager(layout);
-
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
-
- TrayPopupLabelButton* help = new TrayPopupLabelButton(
- this,
- bundle.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_ACCESSIBILITY_LEARN_MORE));
- bottom_row->AddChildView(help);
- help_view_ = help;
-
- TrayPopupLabelButton* settings = new TrayPopupLabelButton(
- this,
- bundle.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SETTINGS));
- bottom_row->AddChildView(settings);
- settings_view_ = settings;
-
- AddChildView(bottom_row);
-}
-
-HoverHighlightView* AccessibilityDetailedView::AddScrollListItem(
- const base::string16& text,
- gfx::Font::FontStyle style,
- bool checked) {
- HoverHighlightView* container = new HoverHighlightView(this);
- container->AddCheckableLabel(text, style, checked);
- scroll_content()->AddChildView(container);
- return container;
-}
-
-void AccessibilityDetailedView::OnViewClicked(views::View* sender) {
- AccessibilityDelegate* delegate =
- Shell::GetInstance()->accessibility_delegate();
- if (sender == footer()->content()) {
- TransitionToDefaultView();
- } else if (sender == spoken_feedback_view_) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- delegate->IsSpokenFeedbackEnabled() ?
- ash::UMA_STATUS_AREA_DISABLE_SPOKEN_FEEDBACK :
- ash::UMA_STATUS_AREA_ENABLE_SPOKEN_FEEDBACK);
- delegate->ToggleSpokenFeedback(ash::A11Y_NOTIFICATION_NONE);
- } else if (sender == high_contrast_view_) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- delegate->IsHighContrastEnabled() ?
- ash::UMA_STATUS_AREA_DISABLE_HIGH_CONTRAST :
- ash::UMA_STATUS_AREA_ENABLE_HIGH_CONTRAST);
- delegate->ToggleHighContrast();
- } else if (sender == screen_magnifier_view_) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- delegate->IsMagnifierEnabled() ?
- ash::UMA_STATUS_AREA_DISABLE_MAGNIFIER :
- ash::UMA_STATUS_AREA_ENABLE_MAGNIFIER);
- delegate->SetMagnifierEnabled(!delegate->IsMagnifierEnabled());
- } else if (large_cursor_view_ && sender == large_cursor_view_) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- delegate->IsLargeCursorEnabled() ?
- ash::UMA_STATUS_AREA_DISABLE_LARGE_CURSOR :
- ash::UMA_STATUS_AREA_ENABLE_LARGE_CURSOR);
- delegate->SetLargeCursorEnabled(!delegate->IsLargeCursorEnabled());
- } else if (autoclick_view_ && sender == autoclick_view_) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- delegate->IsAutoclickEnabled() ?
- ash::UMA_STATUS_AREA_DISABLE_AUTO_CLICK :
- ash::UMA_STATUS_AREA_ENABLE_AUTO_CLICK);
- delegate->SetAutoclickEnabled(!delegate->IsAutoclickEnabled());
- }
-}
-
-void AccessibilityDetailedView::ButtonPressed(views::Button* sender,
- const ui::Event& event) {
- SystemTrayDelegate* tray_delegate =
- Shell::GetInstance()->system_tray_delegate();
- if (sender == help_view_)
- tray_delegate->ShowAccessibilityHelp();
- else if (sender == settings_view_)
- tray_delegate->ShowAccessibilitySettings();
-}
-
-} // namespace tray
-
-////////////////////////////////////////////////////////////////////////////////
-// ash::internal::TrayAccessibility
-
-TrayAccessibility::TrayAccessibility(SystemTray* system_tray)
- : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_ACCESSIBILITY),
- default_(NULL),
- detailed_popup_(NULL),
- detailed_menu_(NULL),
- request_popup_view_(false),
- tray_icon_visible_(false),
- login_(GetCurrentLoginStatus()),
- previous_accessibility_state_(GetAccessibilityState()),
- show_a11y_menu_on_lock_screen_(true) {
- DCHECK(Shell::GetInstance()->delegate());
- DCHECK(system_tray);
- Shell::GetInstance()->system_tray_notifier()->AddAccessibilityObserver(this);
-}
-
-TrayAccessibility::~TrayAccessibility() {
- Shell::GetInstance()->system_tray_notifier()->
- RemoveAccessibilityObserver(this);
-}
-
-void TrayAccessibility::SetTrayIconVisible(bool visible) {
- if (tray_view())
- tray_view()->SetVisible(visible);
- tray_icon_visible_ = visible;
-}
-
-tray::AccessibilityDetailedView* TrayAccessibility::CreateDetailedMenu() {
- return new tray::AccessibilityDetailedView(this, login_);
-}
-
-bool TrayAccessibility::GetInitialVisibility() {
- // Shows accessibility icon if any accessibility feature is enabled.
- // Otherwise, doen't show it.
- return GetAccessibilityState() != A11Y_NONE;
-}
-
-views::View* TrayAccessibility::CreateDefaultView(user::LoginStatus status) {
- CHECK(default_ == NULL);
-
- // Shows accessibility menu if:
- // - on login screen (not logged in);
- // - "Enable accessibility menu" on chrome://settings is checked;
- // - or any of accessibility features is enabled
- // Otherwise, not shows it.
- AccessibilityDelegate* delegate =
- Shell::GetInstance()->accessibility_delegate();
- if (login_ != user::LOGGED_IN_NONE &&
- !delegate->ShouldShowAccessibilityMenu() &&
- // On login screen, keeps the initial visibility of the menu.
- (status != user::LOGGED_IN_LOCKED || !show_a11y_menu_on_lock_screen_))
- return NULL;
-
- CHECK(default_ == NULL);
- default_ = new tray::DefaultAccessibilityView(this);
-
- return default_;
-}
-
-views::View* TrayAccessibility::CreateDetailedView(user::LoginStatus status) {
- CHECK(detailed_popup_ == NULL);
- CHECK(detailed_menu_ == NULL);
-
- if (request_popup_view_) {
- detailed_popup_ = new tray::AccessibilityPopupView(this);
- request_popup_view_ = false;
- return detailed_popup_;
- } else {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_DETAILED_ACCESSABILITY);
- detailed_menu_ = CreateDetailedMenu();
- return detailed_menu_;
- }
-}
-
-void TrayAccessibility::DestroyDefaultView() {
- default_ = NULL;
-}
-
-void TrayAccessibility::DestroyDetailedView() {
- detailed_popup_ = NULL;
- detailed_menu_ = NULL;
-}
-
-void TrayAccessibility::UpdateAfterLoginStatusChange(user::LoginStatus status) {
- // Stores the a11y feature status on just entering the lock screen.
- if (login_ != user::LOGGED_IN_LOCKED && status == user::LOGGED_IN_LOCKED)
- show_a11y_menu_on_lock_screen_ = (GetAccessibilityState() != A11Y_NONE);
-
- login_ = status;
- SetTrayIconVisible(GetInitialVisibility());
-}
-
-void TrayAccessibility::OnAccessibilityModeChanged(
- AccessibilityNotificationVisibility notify) {
- SetTrayIconVisible(GetInitialVisibility());
-
- uint32 accessibility_state = GetAccessibilityState();
- if ((notify == ash::A11Y_NOTIFICATION_SHOW) &&
- !(previous_accessibility_state_ & A11Y_SPOKEN_FEEDBACK) &&
- (accessibility_state & A11Y_SPOKEN_FEEDBACK)) {
- // Shows popup if |notify| is true and the spoken feedback is being enabled.
- request_popup_view_ = true;
- PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false);
- } else {
- if (detailed_popup_)
- detailed_popup_->GetWidget()->Close();
- if (detailed_menu_)
- detailed_menu_->GetWidget()->Close();
- }
-
- previous_accessibility_state_ = accessibility_state;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray_accessibility.h b/chromium/ash/system/tray_accessibility.h
deleted file mode 100644
index a3f53cbfec2..00000000000
--- a/chromium/ash/system/tray_accessibility.h
+++ /dev/null
@@ -1,137 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_ACCESSIBILITY_H_
-#define ASH_SYSTEM_TRAY_ACCESSIBILITY_H_
-
-#include "ash/accessibility_delegate.h"
-#include "ash/shell_observer.h"
-#include "ash/system/tray/tray_details_view.h"
-#include "ash/system/tray/tray_image_item.h"
-#include "ash/system/tray/view_click_listener.h"
-#include "base/gtest_prod_util.h"
-#include "ui/gfx/font.h"
-#include "ui/views/controls/button/button.h"
-
-namespace chromeos {
-class TrayAccessibilityTest;
-}
-
-namespace views {
-class Button;
-class ImageView;
-class View;
-}
-
-namespace ash {
-
-class SystemTrayItem;
-
-class ASH_EXPORT AccessibilityObserver {
- public:
- virtual ~AccessibilityObserver() {}
-
- // Notifies when accessibilty mode changes.
- virtual void OnAccessibilityModeChanged(
- AccessibilityNotificationVisibility notify) = 0;
-};
-
-namespace internal {
-
-class HoverHighlightView;
-
-namespace tray {
-
-class AccessibilityPopupView;
-
-class AccessibilityDetailedView : public TrayDetailsView,
- public ViewClickListener,
- public views::ButtonListener,
- public ShellObserver {
- public:
- explicit AccessibilityDetailedView(SystemTrayItem* owner,
- user::LoginStatus login);
- virtual ~AccessibilityDetailedView() {}
-
- private:
- // Add the accessibility feature list.
- void AppendAccessibilityList();
-
- // Add help entries.
- void AppendHelpEntries();
-
- HoverHighlightView* AddScrollListItem(const base::string16& text,
- gfx::Font::FontStyle style,
- bool checked);
- // Overridden from ViewClickListener.
- virtual void OnViewClicked(views::View* sender) OVERRIDE;
- // Overridden from ButtonListener.
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
-
- views::View* spoken_feedback_view_;
- views::View* high_contrast_view_;
- views::View* screen_magnifier_view_;;
- views::View* large_cursor_view_;;
- views::View* help_view_;
- views::View* settings_view_;
- views::View* autoclick_view_;
-
- bool spoken_feedback_enabled_;
- bool high_contrast_enabled_;
- bool screen_magnifier_enabled_;
- bool large_cursor_enabled_;
- bool autoclick_enabled_;
- user::LoginStatus login_;
-
- friend class chromeos::TrayAccessibilityTest;
- DISALLOW_COPY_AND_ASSIGN(AccessibilityDetailedView);
-};
-
-} // namespace tray
-
-class TrayAccessibility : public TrayImageItem,
- public AccessibilityObserver {
- public:
- explicit TrayAccessibility(SystemTray* system_tray);
- virtual ~TrayAccessibility();
-
- private:
- void SetTrayIconVisible(bool visible);
- tray::AccessibilityDetailedView* CreateDetailedMenu();
-
- // Overridden from TrayImageItem.
- virtual bool GetInitialVisibility() OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
- virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
-
- // Overridden from AccessibilityObserver.
- virtual void OnAccessibilityModeChanged(
- AccessibilityNotificationVisibility notify) OVERRIDE;
-
- views::View* default_;
- tray::AccessibilityPopupView* detailed_popup_;
- tray::AccessibilityDetailedView* detailed_menu_;
-
- bool request_popup_view_;
- bool tray_icon_visible_;
- user::LoginStatus login_;
-
- // Bitmap of values from AccessibilityState enum.
- uint32 previous_accessibility_state_;
-
- // A11y feature status on just entering the lock screen.
- bool show_a11y_menu_on_lock_screen_;
-
- friend class chromeos::TrayAccessibilityTest;
- DISALLOW_COPY_AND_ASSIGN(TrayAccessibility);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_ACCESSIBILITY_H_
diff --git a/chromium/ash/system/tray_caps_lock.cc b/chromium/ash/system/tray_caps_lock.cc
deleted file mode 100644
index ce7b976f0ec..00000000000
--- a/chromium/ash/system/tray_caps_lock.cc
+++ /dev/null
@@ -1,201 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray_caps_lock.h"
-
-#include "ash/caps_lock_delegate.h"
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
-#include "ash/system/tray/actionable_view.h"
-#include "ash/system/tray/fixed_sized_image_view.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/tray_constants.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/base/accessibility/accessible_view_state.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-class CapsLockDefaultView : public ActionableView {
- public:
- CapsLockDefaultView()
- : text_label_(new views::Label),
- shortcut_label_(new views::Label) {
- SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
- kTrayPopupPaddingHorizontal,
- 0,
- kTrayPopupPaddingBetweenItems));
-
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- FixedSizedImageView* image =
- new FixedSizedImageView(0, kTrayPopupItemHeight);
- image->SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_CAPS_LOCK_DARK).
- ToImageSkia());
- AddChildView(image);
-
- text_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- AddChildView(text_label_);
-
- shortcut_label_->SetEnabled(false);
- AddChildView(shortcut_label_);
- }
-
- virtual ~CapsLockDefaultView() {}
-
- // Updates the label text and the shortcut text.
- void Update(bool caps_lock_enabled, bool search_mapped_to_caps_lock) {
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- const int text_string_id = caps_lock_enabled ?
- IDS_ASH_STATUS_TRAY_CAPS_LOCK_ENABLED :
- IDS_ASH_STATUS_TRAY_CAPS_LOCK_DISABLED;
- text_label_->SetText(bundle.GetLocalizedString(text_string_id));
-
- int shortcut_string_id = 0;
- if (caps_lock_enabled) {
- shortcut_string_id = search_mapped_to_caps_lock ?
- IDS_ASH_STATUS_TRAY_CAPS_LOCK_SHORTCUT_SEARCH_OR_SHIFT :
- IDS_ASH_STATUS_TRAY_CAPS_LOCK_SHORTCUT_ALT_SEARCH_OR_SHIFT;
- } else {
- shortcut_string_id = search_mapped_to_caps_lock ?
- IDS_ASH_STATUS_TRAY_CAPS_LOCK_SHORTCUT_SEARCH :
- IDS_ASH_STATUS_TRAY_CAPS_LOCK_SHORTCUT_ALT_SEARCH;
- }
- shortcut_label_->SetText(bundle.GetLocalizedString(shortcut_string_id));
-
- Layout();
- }
-
- private:
- // Overridden from views::View:
- virtual void Layout() OVERRIDE {
- views::View::Layout();
-
- // Align the shortcut text with the right end
- const int old_x = shortcut_label_->x();
- const int new_x =
- width() - shortcut_label_->width() - kTrayPopupPaddingHorizontal;
- shortcut_label_->SetX(new_x);
- const gfx::Size text_size = text_label_->size();
- text_label_->SetSize(gfx::Size(text_size.width() + new_x - old_x,
- text_size.height()));
- }
-
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE {
- state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
- state->name = text_label_->text();
- }
-
- // Overridden from ActionableView:
- virtual bool PerformAction(const ui::Event& event) OVERRIDE {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- Shell::GetInstance()->caps_lock_delegate()->IsCapsLockEnabled() ?
- ash::UMA_STATUS_AREA_CAPS_LOCK_DISABLED_BY_CLICK :
- ash::UMA_STATUS_AREA_CAPS_LOCK_ENABLED_BY_CLICK);
- Shell::GetInstance()->caps_lock_delegate()->ToggleCapsLock();
- return true;
- }
-
- views::Label* text_label_;
- views::Label* shortcut_label_;
-
- DISALLOW_COPY_AND_ASSIGN(CapsLockDefaultView);
-};
-
-TrayCapsLock::TrayCapsLock(SystemTray* system_tray)
- : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_CAPS_LOCK),
- default_(NULL),
- detailed_(NULL),
- search_mapped_to_caps_lock_(false),
- caps_lock_enabled_(
- Shell::GetInstance()->caps_lock_delegate()->IsCapsLockEnabled()),
- message_shown_(false) {
- Shell::GetInstance()->system_tray_notifier()->AddCapsLockObserver(this);
-}
-
-TrayCapsLock::~TrayCapsLock() {
- Shell::GetInstance()->system_tray_notifier()->RemoveCapsLockObserver(this);
-}
-
-bool TrayCapsLock::GetInitialVisibility() {
- return Shell::GetInstance()->caps_lock_delegate()->IsCapsLockEnabled();
-}
-
-views::View* TrayCapsLock::CreateDefaultView(user::LoginStatus status) {
- if (!caps_lock_enabled_)
- return NULL;
- DCHECK(default_ == NULL);
- default_ = new CapsLockDefaultView;
- default_->Update(caps_lock_enabled_, search_mapped_to_caps_lock_);
- return default_;
-}
-
-views::View* TrayCapsLock::CreateDetailedView(user::LoginStatus status) {
- DCHECK(detailed_ == NULL);
- detailed_ = new views::View;
-
- detailed_->SetLayoutManager(new
- views::BoxLayout(views::BoxLayout::kHorizontal,
- kTrayPopupPaddingHorizontal, 10, kTrayPopupPaddingBetweenItems));
-
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- views::ImageView* image = new views::ImageView;
- image->SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_CAPS_LOCK_DARK).
- ToImageSkia());
-
- detailed_->AddChildView(image);
-
- const int string_id = search_mapped_to_caps_lock_ ?
- IDS_ASH_STATUS_TRAY_CAPS_LOCK_CANCEL_BY_SEARCH :
- IDS_ASH_STATUS_TRAY_CAPS_LOCK_CANCEL_BY_ALT_SEARCH;
- views::Label* label = new views::Label(bundle.GetLocalizedString(string_id));
- label->SetMultiLine(true);
- label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- detailed_->AddChildView(label);
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_CAPS_LOCK_DETAILED);
-
- return detailed_;
-}
-
-void TrayCapsLock::DestroyDefaultView() {
- default_ = NULL;
-}
-
-void TrayCapsLock::DestroyDetailedView() {
- detailed_ = NULL;
-}
-
-void TrayCapsLock::OnCapsLockChanged(bool enabled,
- bool search_mapped_to_caps_lock) {
- if (tray_view())
- tray_view()->SetVisible(enabled);
-
- caps_lock_enabled_ = enabled;
- search_mapped_to_caps_lock_ = search_mapped_to_caps_lock;
-
- if (default_) {
- default_->Update(enabled, search_mapped_to_caps_lock);
- } else {
- if (enabled) {
- if (!message_shown_) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_CAPS_LOCK_POPUP);
- PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false);
- message_shown_ = true;
- }
- } else if (detailed_) {
- detailed_->GetWidget()->Close();
- }
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray_caps_lock.h b/chromium/ash/system/tray_caps_lock.h
deleted file mode 100644
index a9e32b2bb73..00000000000
--- a/chromium/ash/system/tray_caps_lock.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_CAPS_LOCK_H_
-#define ASH_SYSTEM_TRAY_CAPS_LOCK_H_
-
-#include "ash/system/tray/tray_image_item.h"
-
-namespace views {
-class ImageView;
-class View;
-}
-
-namespace ash {
-
-class ASH_EXPORT CapsLockObserver {
- public:
- virtual ~CapsLockObserver() {}
-
- virtual void OnCapsLockChanged(bool enabled,
- bool search_mapped_to_caps_lock) = 0;
-};
-
-namespace internal {
-
-class CapsLockDefaultView;
-
-class TrayCapsLock : public TrayImageItem,
- public CapsLockObserver {
- public:
- explicit TrayCapsLock(SystemTray* system_tray);
- virtual ~TrayCapsLock();
-
- private:
- // Overridden from TrayImageItem.
- virtual bool GetInitialVisibility() OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
-
- // Overridden from CapsLockObserver.
- virtual void OnCapsLockChanged(bool enabled,
- bool search_mapped_to_caps_lock) OVERRIDE;
-
- CapsLockDefaultView* default_;
- views::View* detailed_;
-
- bool search_mapped_to_caps_lock_;
- bool caps_lock_enabled_;
- bool message_shown_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayCapsLock);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_CAPS_LOCK_H_
diff --git a/chromium/ash/system/tray_update.cc b/chromium/ash/system/tray_update.cc
deleted file mode 100644
index e01dd97fcb2..00000000000
--- a/chromium/ash/system/tray_update.cc
+++ /dev/null
@@ -1,205 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray_update.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/system/tray/fixed_sized_image_view.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/tray_constants.h"
-#include "base/time/time.h"
-#include "base/timer/timer.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "ui/aura/window.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animation_observer.h"
-#include "ui/compositor/layer_animation_sequence.h"
-#include "ui/gfx/image/image.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/widget/widget.h"
-
-namespace {
-
-// How many seconds should we wait before showing the nag reminder?
-const int kUpdateNaggingTimeSeconds = 24 * 60 * 60;
-
-// How long should the nag reminder be displayed?
-const int kShowUpdateNaggerForSeconds = 15;
-
-int DecideResource(ash::UpdateObserver::UpdateSeverity severity, bool dark) {
- switch (severity) {
- case ash::UpdateObserver::UPDATE_NORMAL:
- return dark ? IDR_AURA_UBER_TRAY_UPDATE_DARK:
- IDR_AURA_UBER_TRAY_UPDATE;
-
- case ash::UpdateObserver::UPDATE_LOW_GREEN:
- return dark ? IDR_AURA_UBER_TRAY_UPDATE_DARK_GREEN :
- IDR_AURA_UBER_TRAY_UPDATE_GREEN;
-
- case ash::UpdateObserver::UPDATE_HIGH_ORANGE:
- return dark ? IDR_AURA_UBER_TRAY_UPDATE_DARK_ORANGE :
- IDR_AURA_UBER_TRAY_UPDATE_ORANGE;
-
- case ash::UpdateObserver::UPDATE_SEVERE_RED:
- return dark ? IDR_AURA_UBER_TRAY_UPDATE_DARK_RED :
- IDR_AURA_UBER_TRAY_UPDATE_RED;
- }
-
- NOTREACHED() << "Unknown update severity level.";
- return 0;
-}
-
-class UpdateView : public ash::internal::ActionableView {
- public:
- explicit UpdateView(ash::UpdateObserver::UpdateSeverity severity) {
- SetLayoutManager(new
- views::BoxLayout(views::BoxLayout::kHorizontal,
- ash::kTrayPopupPaddingHorizontal, 0,
- ash::kTrayPopupPaddingBetweenItems));
-
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- views::ImageView* image =
- new ash::internal::FixedSizedImageView(0, ash::kTrayPopupItemHeight);
- image->SetImage(bundle.GetImageNamed(DecideResource(severity, true)).
- ToImageSkia());
-
- AddChildView(image);
- AddChildView(new views::Label(
- bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE)));
- SetAccessibleName(bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE));
- }
-
- virtual ~UpdateView() {}
-
- private:
- // Overridden from ActionableView.
- virtual bool PerformAction(const ui::Event& event) OVERRIDE {
- ash::Shell::GetInstance()->
- system_tray_delegate()->RequestRestartForUpdate();
- return true;
- }
-
- DISALLOW_COPY_AND_ASSIGN(UpdateView);
-};
-
-}
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-
-class UpdateNagger : public ui::LayerAnimationObserver {
- public:
- explicit UpdateNagger(SystemTrayItem* owner)
- : owner_(owner) {
- RestartTimer();
- owner_->system_tray()->GetWidget()->GetNativeView()->layer()->
- GetAnimator()->AddObserver(this);
- }
-
- virtual ~UpdateNagger() {
- internal::StatusAreaWidget* status_area =
- Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget();
- if (status_area) {
- status_area->system_tray()->GetWidget()->GetNativeView()->layer()->
- GetAnimator()->RemoveObserver(this);
- }
- }
-
- void RestartTimer() {
- timer_.Stop();
- timer_.Start(FROM_HERE,
- base::TimeDelta::FromSeconds(kUpdateNaggingTimeSeconds),
- this,
- &UpdateNagger::Nag);
- }
-
- private:
- void Nag() {
- owner_->PopupDetailedView(kShowUpdateNaggerForSeconds, false);
- }
-
- // Overridden from ui::LayerAnimationObserver.
- virtual void OnLayerAnimationEnded(
- ui::LayerAnimationSequence* sequence) OVERRIDE {
- // TODO(oshima): Find out if the updator will be shown on non
- // primary display.
- if (Shell::GetPrimaryRootWindowController()->shelf()->IsVisible())
- timer_.Stop();
- else if (!timer_.IsRunning())
- RestartTimer();
- }
-
- virtual void OnLayerAnimationAborted(
- ui::LayerAnimationSequence* sequence) OVERRIDE {}
-
- virtual void OnLayerAnimationScheduled(
- ui::LayerAnimationSequence* sequence) OVERRIDE {}
-
- SystemTrayItem* owner_;
- base::OneShotTimer<UpdateNagger> timer_;
-
- DISALLOW_COPY_AND_ASSIGN(UpdateNagger);
-};
-
-} // namespace tray
-
-TrayUpdate::TrayUpdate(SystemTray* system_tray)
- : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_UPDATE),
- severity_(UpdateObserver::UPDATE_NORMAL) {
- Shell::GetInstance()->system_tray_notifier()->AddUpdateObserver(this);
-}
-
-TrayUpdate::~TrayUpdate() {
- Shell::GetInstance()->system_tray_notifier()->RemoveUpdateObserver(this);
-}
-
-bool TrayUpdate::GetInitialVisibility() {
- return Shell::GetInstance()->system_tray_delegate()->SystemShouldUpgrade();
-}
-
-views::View* TrayUpdate::CreateDefaultView(user::LoginStatus status) {
- if (!Shell::GetInstance()->system_tray_delegate()->SystemShouldUpgrade())
- return NULL;
- return new UpdateView(severity_);
-}
-
-views::View* TrayUpdate::CreateDetailedView(user::LoginStatus status) {
- return CreateDefaultView(status);
-}
-
-void TrayUpdate::DestroyDetailedView() {
- if (nagger_) {
- // The nagger was being displayed. Now that the detailed view is being
- // closed, that means either the user clicks on it to restart, or the user
- // didn't click on it to restart. In either case, start the timer to show
- // the nag reminder again after the specified time.
- nagger_->RestartTimer();
- }
-}
-
-void TrayUpdate::OnUpdateRecommended(UpdateObserver::UpdateSeverity severity) {
- severity_ = severity;
- SetImageFromResourceId(DecideResource(severity_, false));
- tray_view()->SetVisible(true);
- if (!Shell::GetPrimaryRootWindowController()->shelf()->IsVisible() &&
- !nagger_.get()) {
- // The shelf is not visible, and there is no nagger scheduled.
- nagger_.reset(new tray::UpdateNagger(this));
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/tray_update.h b/chromium/ash/system/tray_update.h
deleted file mode 100644
index 123cde19f3b..00000000000
--- a/chromium/ash/system/tray_update.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_UPDATE_H_
-#define ASH_SYSTEM_TRAY_UPDATE_H_
-
-#include "ash/system/tray/tray_image_item.h"
-#include "ash/system/user/update_observer.h"
-#include "base/memory/scoped_ptr.h"
-
-namespace views {
-class View;
-}
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-class UpdateNagger;
-}
-
-class TrayUpdate : public TrayImageItem,
- public UpdateObserver {
- public:
- explicit TrayUpdate(SystemTray* system_tray);
- virtual ~TrayUpdate();
-
- private:
- // Overridden from TrayImageItem.
- virtual bool GetInitialVisibility() OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
-
- // Overridden from UpdateObserver.
- virtual void OnUpdateRecommended(UpdateSeverity severity) OVERRIDE;
-
- // Used to nag the user in case the tray has been hidden too long with an
- // unseen update notification.
- scoped_ptr<tray::UpdateNagger> nagger_;
-
- UpdateObserver::UpdateSeverity severity_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayUpdate);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_UPDATE_H_
diff --git a/chromium/ash/system/user/login_status.cc b/chromium/ash/system/user/login_status.cc
deleted file mode 100644
index 93678fd2d3d..00000000000
--- a/chromium/ash/system/user/login_status.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/user/login_status.h"
-
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "base/strings/string_util.h"
-#include "base/strings/utf_string_conversions.h"
-#include "grit/ash_strings.h"
-#include "ui/base/resource/resource_bundle.h"
-
-namespace ash {
-namespace user {
-
-base::string16 GetLocalizedSignOutStringForStatus(LoginStatus status,
- bool multiline) {
- int message_id;
- switch (status) {
- case LOGGED_IN_GUEST:
- message_id = IDS_ASH_STATUS_TRAY_EXIT_GUEST;
- break;
- case LOGGED_IN_RETAIL_MODE:
- message_id = IDS_ASH_STATUS_TRAY_EXIT_KIOSK;
- break;
- case LOGGED_IN_PUBLIC:
- message_id = IDS_ASH_STATUS_TRAY_EXIT_PUBLIC;
- break;
- default:
- if (ash::Shell::GetInstance()->session_state_delegate()->
- NumberOfLoggedInUsers() > 1) {
- message_id = IDS_ASH_STATUS_TRAY_SIGN_OUT_ALL;
- } else {
- message_id = IDS_ASH_STATUS_TRAY_SIGN_OUT;
- }
- break;
- }
- base::string16 message =
- ui::ResourceBundle::GetSharedInstance().GetLocalizedString(message_id);
- // Desirable line breaking points are marked using \n. As the resource
- // framework does not evaluate escape sequences, the \n need to be explicitly
- // handled. Depending on the value of |multiline|, actual line breaks or
- // spaces are substituted.
- base::string16 newline = multiline ? ASCIIToUTF16("\n") : ASCIIToUTF16(" ");
- ReplaceSubstringsAfterOffset(&message, 0, ASCIIToUTF16("\\n"), newline);
- return message;
-}
-
-} // namespace user
-} // namespace ash
diff --git a/chromium/ash/system/user/login_status.h b/chromium/ash/system/user/login_status.h
deleted file mode 100644
index d08a1604a06..00000000000
--- a/chromium/ash/system/user/login_status.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_USER_LOGIN_STATUS_H_
-#define ASH_SYSTEM_USER_LOGIN_STATUS_H_
-
-#include "base/strings/string16.h"
-
-namespace ash {
-namespace user {
-
-enum LoginStatus {
- LOGGED_IN_NONE, // Not logged in
- LOGGED_IN_LOCKED, // A user has locked the screen
- LOGGED_IN_USER, // A regular user is logged in
- LOGGED_IN_OWNER, // The owner of the device is logged in
- LOGGED_IN_GUEST, // A guest is logged in (i.e. incognito)
- LOGGED_IN_RETAIL_MODE, // Is in retail mode
- LOGGED_IN_PUBLIC, // A public account is logged in
- LOGGED_IN_LOCALLY_MANAGED, // A locally managed user is logged in
- LOGGED_IN_KIOSK_APP // Is in kiosk app mode
-};
-
-base::string16 GetLocalizedSignOutStringForStatus(LoginStatus status,
- bool multiline);
-
-} // namespace user
-} // namespace ash
-
-#endif // ASH_SYSTEM_USER_LOGIN_STATUS_H_
diff --git a/chromium/ash/system/user/tray_user.cc b/chromium/ash/system/user/tray_user.cc
deleted file mode 100644
index ff14fe168c0..00000000000
--- a/chromium/ash/system/user/tray_user.cc
+++ /dev/null
@@ -1,1425 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/user/tray_user.h"
-
-#include <algorithm>
-#include <climits>
-#include <vector>
-
-#include "ash/ash_switches.h"
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/multi_profile_uma.h"
-#include "ash/popup_message.h"
-#include "ash/root_window_controller.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_item_view.h"
-#include "ash/system/tray/tray_popup_label_button.h"
-#include "ash/system/tray/tray_popup_label_button_border.h"
-#include "ash/system/tray/tray_utils.h"
-#include "base/i18n/rtl.h"
-#include "base/logging.h"
-#include "base/memory/scoped_vector.h"
-#include "base/strings/string16.h"
-#include "base/strings/string_util.h"
-#include "base/strings/utf_string_conversions.h"
-#include "grit/ash_resources.h"
-#include "grit/ash_strings.h"
-#include "skia/ext/image_operations.h"
-#include "third_party/skia/include/core/SkCanvas.h"
-#include "third_party/skia/include/core/SkPaint.h"
-#include "third_party/skia/include/core/SkPath.h"
-#include "ui/aura/window.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/font_list.h"
-#include "ui/gfx/image/image.h"
-#include "ui/gfx/image/image_skia_operations.h"
-#include "ui/gfx/insets.h"
-#include "ui/gfx/range/range.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/render_text.h"
-#include "ui/gfx/size.h"
-#include "ui/gfx/skia_util.h"
-#include "ui/gfx/text_elider.h"
-#include "ui/gfx/text_utils.h"
-#include "ui/views/border.h"
-#include "ui/views/bubble/tray_bubble_view.h"
-#include "ui/views/controls/button/button.h"
-#include "ui/views/controls/button/custom_button.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/controls/link.h"
-#include "ui/views/controls/link_listener.h"
-#include "ui/views/corewm/shadow_types.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/layout/fill_layout.h"
-#include "ui/views/mouse_watcher.h"
-#include "ui/views/painter.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-namespace {
-
-const int kUserDetailsVerticalPadding = 5;
-const int kUserCardVerticalPadding = 10;
-const int kProfileRoundedCornerRadius = 2;
-const int kUserIconSize = 27;
-const int kUserIconLargeSize = 32;
-const int kUserIconLargeCornerRadius = 2;
-const int kUserLabelToIconPadding = 5;
-// When using multi login, this spacing is added between user icons.
-const int kTrayLabelSpacing = 1;
-
-// When a hover border is used, it is starting this many pixels before the icon
-// position.
-const int kTrayUserTileHoverBorderInset = 10;
-
-// The border color of the user button.
-const SkColor kBorderColor = 0xffdcdcdc;
-
-// The invisible word joiner character, used as a marker to indicate the start
-// and end of the user's display name in the public account user card's text.
-const char16 kDisplayNameMark[] = { 0x2060, 0 };
-
-const int kPublicAccountLogoutButtonBorderImagesNormal[] = {
- IDR_AURA_TRAY_POPUP_PUBLIC_ACCOUNT_LOGOUT_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_NORMAL_BACKGROUND,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_NORMAL_BACKGROUND,
- IDR_AURA_TRAY_POPUP_PUBLIC_ACCOUNT_LOGOUT_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_NORMAL_BACKGROUND,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_NORMAL_BACKGROUND,
- IDR_AURA_TRAY_POPUP_PUBLIC_ACCOUNT_LOGOUT_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_NORMAL_BACKGROUND,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_NORMAL_BACKGROUND,
-};
-
-const int kPublicAccountLogoutButtonBorderImagesHovered[] = {
- IDR_AURA_TRAY_POPUP_PUBLIC_ACCOUNT_LOGOUT_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_PUBLIC_ACCOUNT_LOGOUT_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_PUBLIC_ACCOUNT_LOGOUT_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_PUBLIC_ACCOUNT_LOGOUT_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_LABEL_BUTTON_HOVER_BACKGROUND,
- IDR_AURA_TRAY_POPUP_PUBLIC_ACCOUNT_LOGOUT_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_PUBLIC_ACCOUNT_LOGOUT_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_PUBLIC_ACCOUNT_LOGOUT_BUTTON_BORDER,
- IDR_AURA_TRAY_POPUP_PUBLIC_ACCOUNT_LOGOUT_BUTTON_BORDER,
-};
-
-// Offsetting the popup message relative to the tray menu.
-const int kPopupMessageOffset = 25;
-
-// Switch to a user with the given |user_index|.
-void SwitchUser(ash::MultiProfileIndex user_index) {
- // Do not switch users when the log screen is presented.
- if (ash::Shell::GetInstance()->session_state_delegate()->
- IsUserSessionBlocked())
- return;
-
- DCHECK(user_index > 0);
- ash::SessionStateDelegate* delegate =
- ash::Shell::GetInstance()->session_state_delegate();
- ash::MultiProfileUMA::RecordSwitchActiveUser(
- ash::MultiProfileUMA::SWITCH_ACTIVE_USER_BY_TRAY);
- delegate->SwitchActiveUser(delegate->GetUserID(user_index));
-}
-
-} // namespace
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-
-// A custom image view with rounded edges.
-class RoundedImageView : public views::View {
- public:
- // Constructs a new rounded image view with rounded corners of radius
- // |corner_radius|. If |active_user| is set, the icon will be drawn in
- // full colors - otherwise it will fade into the background.
- RoundedImageView(int corner_radius, bool active_user);
- virtual ~RoundedImageView();
-
- // Set the image that should be displayed. The image contents is copied to the
- // receiver's image.
- void SetImage(const gfx::ImageSkia& img, const gfx::Size& size);
-
- // Set the radii of the corners independently.
- void SetCornerRadii(int top_left,
- int top_right,
- int bottom_right,
- int bottom_left);
-
- private:
- // Overridden from views::View.
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
-
- gfx::ImageSkia image_;
- gfx::ImageSkia resized_;
- gfx::Size image_size_;
- int corner_radius_[4];
-
- // True if the given user is the active user and the icon should get
- // painted as active.
- bool active_user_;
-
- DISALLOW_COPY_AND_ASSIGN(RoundedImageView);
-};
-
-// An inactive user view which can be clicked to make active. Note that this
-// "button" does not show as a button any click or hover changes.
-class UserSwitcherView : public RoundedImageView {
- public:
- UserSwitcherView(int corner_radius, MultiProfileIndex user_index);
- virtual ~UserSwitcherView() {}
-
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
-
- private:
- // The user index to activate when the item was clicked. Note that this
- // index refers to the LRU list of logged in users.
- MultiProfileIndex user_index_;
-
- DISALLOW_COPY_AND_ASSIGN(UserSwitcherView);
-};
-
-// The user details shown in public account mode. This is essentially a label
-// but with custom painting code as the text is styled with multiple colors and
-// contains a link.
-class PublicAccountUserDetails : public views::View,
- public views::LinkListener {
- public:
- PublicAccountUserDetails(SystemTrayItem* owner, int used_width);
- virtual ~PublicAccountUserDetails();
-
- private:
- // Overridden from views::View.
- virtual void Layout() OVERRIDE;
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
-
- // Overridden from views::LinkListener.
- virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
-
- // Calculate a preferred size that ensures the label text and the following
- // link do not wrap over more than three lines in total for aesthetic reasons
- // if possible.
- void CalculatePreferredSize(SystemTrayItem* owner, int used_width);
-
- base::string16 text_;
- views::Link* learn_more_;
- gfx::Size preferred_size_;
- ScopedVector<gfx::RenderText> lines_;
-
- DISALLOW_COPY_AND_ASSIGN(PublicAccountUserDetails);
-};
-
-// The button which holds the user card in case of multi profile.
-class UserCard : public views::CustomButton {
- public:
- UserCard(views::ButtonListener* listener, bool active_user);
- virtual ~UserCard();
-
- // Called when the border should remain even in the non highlighted state.
- void ForceBorderVisible(bool show);
-
- // Overridden from views::View
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
-
- // Check if the item is hovered.
- bool is_hovered_for_test() {return button_hovered_; }
-
- private:
- // Change the hover/active state of the "button" when the status changes.
- void ShowActive();
-
- // True if this is the active user.
- bool is_active_user_;
-
- // True if button is hovered.
- bool button_hovered_;
-
- // True if the border should be visible.
- bool show_border_;
-
- DISALLOW_COPY_AND_ASSIGN(UserCard);
-};
-
-class UserViewMouseWatcherHost : public views::MouseWatcherHost {
-public:
- explicit UserViewMouseWatcherHost(const gfx::Rect& screen_area)
- : screen_area_(screen_area) {}
- virtual ~UserViewMouseWatcherHost() {}
-
- // Implementation of MouseWatcherHost.
- virtual bool Contains(const gfx::Point& screen_point,
- views::MouseWatcherHost::MouseEventType type) OVERRIDE {
- return screen_area_.Contains(screen_point);
- }
-
-private:
- gfx::Rect screen_area_;
-
- DISALLOW_COPY_AND_ASSIGN(UserViewMouseWatcherHost);
-};
-
-// The view of a user item.
-class UserView : public views::View,
- public views::ButtonListener,
- public views::MouseWatcherListener {
- public:
- UserView(SystemTrayItem* owner,
- ash::user::LoginStatus login,
- MultiProfileIndex index);
- virtual ~UserView();
-
- // Overridden from MouseWatcherListener:
- virtual void MouseMovedOutOfHost() OVERRIDE;
-
- TrayUser::TestState GetStateForTest() const;
- gfx::Rect GetBoundsInScreenOfUserButtonForTest();
-
- private:
- // Overridden from views::View.
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual int GetHeightForWidth(int width) OVERRIDE;
- virtual void Layout() OVERRIDE;
-
- // Overridden from views::ButtonListener.
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
-
- void AddLogoutButton(user::LoginStatus login);
- void AddUserCard(SystemTrayItem* owner, user::LoginStatus login);
-
- // Create a user icon representation for the user card.
- views::View* CreateIconForUserCard(user::LoginStatus login);
-
- // Create the additional user card content for the retail logged in mode.
- void AddLoggedInRetailModeUserCardContent();
-
- // Create the additional user card content for the public mode.
- void AddLoggedInPublicModeUserCardContent(SystemTrayItem* owner);
-
- // Create the menu option to add another user. If |disabled| is set the user
- // cannot actively click on the item.
- void ToggleAddUserMenuOption();
-
- // Returns true when multi profile is supported.
- bool SupportsMultiProfile();
-
- MultiProfileIndex multiprofile_index_;
- // The view of the user card.
- views::View* user_card_view_;
-
- // This is the owner system tray item of this view.
- SystemTrayItem* owner_;
-
- // True if |user_card_view_| is a |UserView| - otherwise it is only a
- // |views::View|.
- bool is_user_card_;
- views::View* logout_button_;
- scoped_ptr<PopupMessage> popup_message_;
- scoped_ptr<views::Widget> add_menu_option_;
-
- // True when the add user panel is visible but not activatable.
- bool add_user_visible_but_disabled_;
-
- // The mouse watcher which takes care of out of window hover events.
- scoped_ptr<views::MouseWatcher> mouse_watcher_;
-
- DISALLOW_COPY_AND_ASSIGN(UserView);
-};
-
-// The menu item view which gets shown when the user clicks in multi profile
-// mode onto the user item.
-class AddUserView : public views::CustomButton,
- public views::ButtonListener {
- public:
- // The |owner| is the view for which this view gets created. The |listener|
- // will get notified when this item gets clicked.
- AddUserView(UserCard* owner, views::ButtonListener* listener);
- virtual ~AddUserView();
-
- // Get the anchor view for a message.
- views::View* anchor() { return anchor_; }
-
- // Overridden from views::ButtonListener.
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
-
- private:
- // Overridden from views::View.
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual int GetHeightForWidth(int width) OVERRIDE;
- virtual void Layout() OVERRIDE;
-
- // Create the additional client content for this item.
- void AddContent();
-
- // This is the content we create and show.
- views::View* add_user_;
-
- // This listener will get informed when someone clicks on this button.
- views::ButtonListener* listener_;
-
- // This is the owner view of this item.
- UserCard* owner_;
-
- // The anchor view for targetted bubble messages.
- views::View* anchor_;
-
- DISALLOW_COPY_AND_ASSIGN(AddUserView);
-};
-
-RoundedImageView::RoundedImageView(int corner_radius, bool active_user)
- : active_user_(active_user) {
- for (int i = 0; i < 4; ++i)
- corner_radius_[i] = corner_radius;
-}
-
-RoundedImageView::~RoundedImageView() {}
-
-void RoundedImageView::SetImage(const gfx::ImageSkia& img,
- const gfx::Size& size) {
- image_ = img;
- image_size_ = size;
-
- // Try to get the best image quality for the avatar.
- resized_ = gfx::ImageSkiaOperations::CreateResizedImage(image_,
- skia::ImageOperations::RESIZE_BEST, size);
- if (GetWidget() && visible()) {
- PreferredSizeChanged();
- SchedulePaint();
- }
-}
-
-void RoundedImageView::SetCornerRadii(int top_left,
- int top_right,
- int bottom_right,
- int bottom_left) {
- corner_radius_[0] = top_left;
- corner_radius_[1] = top_right;
- corner_radius_[2] = bottom_right;
- corner_radius_[3] = bottom_left;
-}
-
-gfx::Size RoundedImageView::GetPreferredSize() {
- return gfx::Size(image_size_.width() + GetInsets().width(),
- image_size_.height() + GetInsets().height());
-}
-
-void RoundedImageView::OnPaint(gfx::Canvas* canvas) {
- View::OnPaint(canvas);
- gfx::Rect image_bounds(size());
- image_bounds.ClampToCenteredSize(GetPreferredSize());
- image_bounds.Inset(GetInsets());
- const SkScalar kRadius[8] = {
- SkIntToScalar(corner_radius_[0]),
- SkIntToScalar(corner_radius_[0]),
- SkIntToScalar(corner_radius_[1]),
- SkIntToScalar(corner_radius_[1]),
- SkIntToScalar(corner_radius_[2]),
- SkIntToScalar(corner_radius_[2]),
- SkIntToScalar(corner_radius_[3]),
- SkIntToScalar(corner_radius_[3])
- };
- SkPath path;
- path.addRoundRect(gfx::RectToSkRect(image_bounds), kRadius);
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setXfermodeMode(active_user_ ? SkXfermode::kSrcOver_Mode :
- SkXfermode::kLuminosity_Mode);
- canvas->DrawImageInPath(resized_, image_bounds.x(), image_bounds.y(),
- path, paint);
-}
-
-UserSwitcherView::UserSwitcherView(int corner_radius,
- MultiProfileIndex user_index)
- : RoundedImageView(corner_radius, false),
- user_index_(user_index) {
- SetEnabled(true);
-}
-
-void UserSwitcherView::OnMouseEvent(ui::MouseEvent* event) {
- if (event->type() == ui::ET_MOUSE_PRESSED) {
- SwitchUser(user_index_);
- event->SetHandled();
- }
-}
-
-void UserSwitcherView::OnTouchEvent(ui::TouchEvent* event) {
- if (event->type() == ui::ET_TOUCH_PRESSED) {
- SwitchUser(user_index_);
- event->SetHandled();
- }
-}
-
-PublicAccountUserDetails::PublicAccountUserDetails(SystemTrayItem* owner,
- int used_width)
- : learn_more_(NULL) {
- const int inner_padding =
- kTrayPopupPaddingHorizontal - kTrayPopupPaddingBetweenItems;
- const bool rtl = base::i18n::IsRTL();
- set_border(views::Border::CreateEmptyBorder(
- kUserDetailsVerticalPadding, rtl ? 0 : inner_padding,
- kUserDetailsVerticalPadding, rtl ? inner_padding : 0));
-
- // Retrieve the user's display name and wrap it with markers.
- // Note that since this is a public account it always has to be the primary
- // user.
- base::string16 display_name =
- Shell::GetInstance()->session_state_delegate()->GetUserDisplayName(0);
- base::RemoveChars(display_name, kDisplayNameMark, &display_name);
- display_name = kDisplayNameMark[0] + display_name + kDisplayNameMark[0];
- // Retrieve the domain managing the device and wrap it with markers.
- base::string16 domain = UTF8ToUTF16(
- Shell::GetInstance()->system_tray_delegate()->GetEnterpriseDomain());
- base::RemoveChars(domain, kDisplayNameMark, &domain);
- base::i18n::WrapStringWithLTRFormatting(&domain);
- // Retrieve the label text, inserting the display name and domain.
- text_ = l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_PUBLIC_LABEL,
- display_name, domain);
-
- learn_more_ = new views::Link(l10n_util::GetStringUTF16(IDS_ASH_LEARN_MORE));
- learn_more_->SetUnderline(false);
- learn_more_->set_listener(this);
- AddChildView(learn_more_);
-
- CalculatePreferredSize(owner, used_width);
-}
-
-PublicAccountUserDetails::~PublicAccountUserDetails() {}
-
-void PublicAccountUserDetails::Layout() {
- lines_.clear();
- const gfx::Rect contents_area = GetContentsBounds();
- if (contents_area.IsEmpty())
- return;
-
- // Word-wrap the label text.
- const gfx::FontList font_list;
- std::vector<base::string16> lines;
- gfx::ElideRectangleText(text_, font_list, contents_area.width(),
- contents_area.height(), gfx::ELIDE_LONG_WORDS,
- &lines);
- // Loop through the lines, creating a renderer for each.
- gfx::Point position = contents_area.origin();
- gfx::Range display_name(gfx::Range::InvalidRange());
- for (std::vector<base::string16>::const_iterator it = lines.begin();
- it != lines.end(); ++it) {
- gfx::RenderText* line = gfx::RenderText::CreateInstance();
- line->SetDirectionalityMode(gfx::DIRECTIONALITY_FROM_UI);
- line->SetText(*it);
- const gfx::Size size(contents_area.width(), line->GetStringSize().height());
- line->SetDisplayRect(gfx::Rect(position, size));
- position.set_y(position.y() + size.height());
-
- // Set the default text color for the line.
- line->SetColor(kPublicAccountUserCardTextColor);
-
- // If a range of the line contains the user's display name, apply a custom
- // text color to it.
- if (display_name.is_empty())
- display_name.set_start(it->find(kDisplayNameMark));
- if (!display_name.is_empty()) {
- display_name.set_end(
- it->find(kDisplayNameMark, display_name.start() + 1));
- gfx::Range line_range(0, it->size());
- line->ApplyColor(kPublicAccountUserCardNameColor,
- display_name.Intersect(line_range));
- // Update the range for the next line.
- if (display_name.end() >= line_range.end())
- display_name.set_start(0);
- else
- display_name = gfx::Range::InvalidRange();
- }
-
- lines_.push_back(line);
- }
-
- // Position the link after the label text, separated by a space. If it does
- // not fit onto the last line of the text, wrap the link onto its own line.
- const gfx::Size last_line_size = lines_.back()->GetStringSize();
- const int space_width = gfx::GetStringWidth(ASCIIToUTF16(" "), font_list);
- const gfx::Size link_size = learn_more_->GetPreferredSize();
- if (contents_area.width() - last_line_size.width() >=
- space_width + link_size.width()) {
- position.set_x(position.x() + last_line_size.width() + space_width);
- position.set_y(position.y() - last_line_size.height());
- }
- position.set_y(position.y() - learn_more_->GetInsets().top());
- gfx::Rect learn_more_bounds(position, link_size);
- learn_more_bounds.Intersect(contents_area);
- if (base::i18n::IsRTL()) {
- const gfx::Insets insets = GetInsets();
- learn_more_bounds.Offset(insets.right() - insets.left(), 0);
- }
- learn_more_->SetBoundsRect(learn_more_bounds);
-}
-
-gfx::Size PublicAccountUserDetails::GetPreferredSize() {
- return preferred_size_;
-}
-
-void PublicAccountUserDetails::OnPaint(gfx::Canvas* canvas) {
- for (ScopedVector<gfx::RenderText>::const_iterator it = lines_.begin();
- it != lines_.end(); ++it) {
- (*it)->Draw(canvas);
- }
- views::View::OnPaint(canvas);
-}
-
-void PublicAccountUserDetails::LinkClicked(views::Link* source,
- int event_flags) {
- DCHECK_EQ(source, learn_more_);
- Shell::GetInstance()->system_tray_delegate()->ShowPublicAccountInfo();
-}
-
-void PublicAccountUserDetails::CalculatePreferredSize(SystemTrayItem* owner,
- int used_width) {
- const gfx::FontList font_list;
- const gfx::Size link_size = learn_more_->GetPreferredSize();
- const int space_width = gfx::GetStringWidth(ASCIIToUTF16(" "), font_list);
- const gfx::Insets insets = GetInsets();
- views::TrayBubbleView* bubble_view =
- owner->system_tray()->GetSystemBubble()->bubble_view();
- int min_width = std::max(
- link_size.width(),
- bubble_view->GetPreferredSize().width() - (used_width + insets.width()));
- int max_width = std::min(
- gfx::GetStringWidth(text_, font_list) + space_width + link_size.width(),
- bubble_view->GetMaximumSize().width() - (used_width + insets.width()));
- // Do a binary search for the minimum width that ensures no more than three
- // lines are needed. The lower bound is the minimum of the current bubble
- // width and the width of the link (as no wrapping is permitted inside the
- // link). The upper bound is the maximum of the largest allowed bubble width
- // and the sum of the label text and link widths when put on a single line.
- std::vector<base::string16> lines;
- while (min_width < max_width) {
- lines.clear();
- const int width = (min_width + max_width) / 2;
- const bool too_narrow =
- gfx::ElideRectangleText(text_, font_list, width, INT_MAX,
- gfx::TRUNCATE_LONG_WORDS, &lines) != 0;
- int line_count = lines.size();
- if (!too_narrow && line_count == 3 &&
- width - gfx::GetStringWidth(lines.back(), font_list) <=
- space_width + link_size.width())
- ++line_count;
- if (too_narrow || line_count > 3)
- min_width = width + 1;
- else
- max_width = width;
- }
-
- // Calculate the corresponding height and set the preferred size.
- lines.clear();
- gfx::ElideRectangleText(
- text_, font_list, min_width, INT_MAX, gfx::TRUNCATE_LONG_WORDS, &lines);
- int line_count = lines.size();
- if (min_width - gfx::GetStringWidth(lines.back(), font_list) <=
- space_width + link_size.width()) {
- ++line_count;
- }
- const int line_height = font_list.GetHeight();
- const int link_extra_height = std::max(
- link_size.height() - learn_more_->GetInsets().top() - line_height, 0);
- preferred_size_ = gfx::Size(
- min_width + insets.width(),
- line_count * line_height + link_extra_height + insets.height());
-
- bubble_view->SetWidth(preferred_size_.width() + used_width);
-}
-
-UserCard::UserCard(views::ButtonListener* listener, bool active_user)
- : CustomButton(listener),
- is_active_user_(active_user),
- button_hovered_(false),
- show_border_(false) {
- if (is_active_user_) {
- set_background(
- views::Background::CreateSolidBackground(kBackgroundColor));
- ShowActive();
- }
-}
-
-UserCard::~UserCard() {}
-
-void UserCard::ForceBorderVisible(bool show) {
- show_border_ = show;
- ShowActive();
-}
-
-void UserCard::OnMouseEntered(const ui::MouseEvent& event) {
- if (is_active_user_) {
- button_hovered_ = true;
- background()->SetNativeControlColor(kHoverBackgroundColor);
- ShowActive();
- }
-}
-
-void UserCard::OnMouseExited(const ui::MouseEvent& event) {
- if (is_active_user_) {
- button_hovered_ = false;
- background()->SetNativeControlColor(kBackgroundColor);
- ShowActive();
- }
-}
-
-void UserCard::ShowActive() {
- int width = button_hovered_ || show_border_ ? 1 : 0;
- set_border(views::Border::CreateSolidSidedBorder(width, width, width, 1,
- kBorderColor));
- SchedulePaint();
-}
-
-UserView::UserView(SystemTrayItem* owner,
- user::LoginStatus login,
- MultiProfileIndex index)
- : multiprofile_index_(index),
- user_card_view_(NULL),
- owner_(owner),
- is_user_card_(false),
- logout_button_(NULL),
- add_user_visible_but_disabled_(false) {
- CHECK_NE(user::LOGGED_IN_NONE, login);
- if (!index) {
- // Only the logged in user will have a background. All other users will have
- // to allow the TrayPopupContainer highlighting the menu line.
- set_background(views::Background::CreateSolidBackground(
- login == user::LOGGED_IN_PUBLIC ? kPublicAccountBackgroundColor :
- kBackgroundColor));
- }
- SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0,
- kTrayPopupPaddingBetweenItems));
- // The logout button must be added before the user card so that the user card
- // can correctly calculate the remaining available width.
- // Note that only the current multiprofile user gets a button.
- if (!multiprofile_index_)
- AddLogoutButton(login);
- AddUserCard(owner, login);
-}
-
-UserView::~UserView() {}
-
-void UserView::MouseMovedOutOfHost() {
- popup_message_.reset();
- mouse_watcher_.reset();
- add_menu_option_.reset();
-}
-
-TrayUser::TestState UserView::GetStateForTest() const {
- if (add_menu_option_.get()) {
- return add_user_visible_but_disabled_ ? TrayUser::ACTIVE_BUT_DISABLED :
- TrayUser::ACTIVE;
- }
-
- if (!is_user_card_)
- return TrayUser::SHOWN;
-
- return static_cast<UserCard*>(user_card_view_)->is_hovered_for_test() ?
- TrayUser::HOVERED : TrayUser::SHOWN;
-}
-
-gfx::Rect UserView::GetBoundsInScreenOfUserButtonForTest() {
- DCHECK(user_card_view_);
- return user_card_view_->GetBoundsInScreen();
-}
-
-gfx::Size UserView::GetPreferredSize() {
- gfx::Size size = views::View::GetPreferredSize();
- // Only the active user panel will be forced to a certain height.
- if (!multiprofile_index_) {
- size.set_height(std::max(size.height(),
- kTrayPopupItemHeight + GetInsets().height()));
- }
- return size;
-}
-
-int UserView::GetHeightForWidth(int width) {
- return GetPreferredSize().height();
-}
-
-void UserView::Layout() {
- gfx::Rect contents_area(GetContentsBounds());
- if (user_card_view_ && logout_button_) {
- // Give the logout button the space it requests.
- gfx::Rect logout_area = contents_area;
- logout_area.ClampToCenteredSize(logout_button_->GetPreferredSize());
- logout_area.set_x(contents_area.right() - logout_area.width());
-
- // Give the remaining space to the user card.
- gfx::Rect user_card_area = contents_area;
- int remaining_width = contents_area.width() - logout_area.width();
- if (SupportsMultiProfile()) {
- // In multiprofile case |user_card_view_| and |logout_button_| have to
- // have the same height.
- int y = std::min(user_card_area.y(), logout_area.y());
- int height = std::max(user_card_area.height(), logout_area.height());
- logout_area.set_y(y);
- logout_area.set_height(height);
- user_card_area.set_y(y);
- user_card_area.set_height(height);
-
- // In multiprofile mode we have also to increase the size of the card by
- // the size of the border to make it overlap with the logout button.
- user_card_area.set_width(std::max(0, remaining_width + 1));
-
- // To make the logout button symmetrical with the user card we also make
- // the button longer by the same size the hover area in front of the icon
- // got inset.
- logout_area.set_width(logout_area.width() +
- kTrayUserTileHoverBorderInset);
- } else {
- // In all other modes we have to make sure that there is enough spacing
- // between the two.
- remaining_width -= kTrayPopupPaddingBetweenItems;
- }
- user_card_area.set_width(remaining_width);
- user_card_view_->SetBoundsRect(user_card_area);
- logout_button_->SetBoundsRect(logout_area);
- } else if (user_card_view_) {
- user_card_view_->SetBoundsRect(contents_area);
- } else if (logout_button_) {
- logout_button_->SetBoundsRect(contents_area);
- }
-}
-
-void UserView::ButtonPressed(views::Button* sender, const ui::Event& event) {
- if (sender == logout_button_) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_STATUS_AREA_SIGN_OUT);
- Shell::GetInstance()->system_tray_delegate()->SignOut();
- } else if (sender == user_card_view_ && SupportsMultiProfile()) {
- if (!multiprofile_index_) {
- ToggleAddUserMenuOption();
- } else {
- SwitchUser(multiprofile_index_);
- // Since the user list is about to change the system menu should get
- // closed.
- owner_->system_tray()->CloseSystemBubble();
- }
- } else if (add_menu_option_.get() &&
- sender == add_menu_option_->GetContentsView()) {
- // Let the user add another account to the session.
- MultiProfileUMA::RecordSigninUser(MultiProfileUMA::SIGNIN_USER_BY_TRAY);
- Shell::GetInstance()->system_tray_delegate()->ShowUserLogin();
- } else {
- NOTREACHED();
- }
-}
-
-void UserView::AddLogoutButton(user::LoginStatus login) {
- const base::string16 title = user::GetLocalizedSignOutStringForStatus(login,
- true);
- TrayPopupLabelButton* logout_button = new TrayPopupLabelButton(this, title);
- logout_button->SetAccessibleName(title);
- logout_button_ = logout_button;
- // In public account mode, the logout button border has a custom color.
- if (login == user::LOGGED_IN_PUBLIC) {
- TrayPopupLabelButtonBorder* border =
- static_cast<TrayPopupLabelButtonBorder*>(logout_button_->border());
- border->SetPainter(false, views::Button::STATE_NORMAL,
- views::Painter::CreateImageGridPainter(
- kPublicAccountLogoutButtonBorderImagesNormal));
- border->SetPainter(false, views::Button::STATE_HOVERED,
- views::Painter::CreateImageGridPainter(
- kPublicAccountLogoutButtonBorderImagesHovered));
- border->SetPainter(false, views::Button::STATE_PRESSED,
- views::Painter::CreateImageGridPainter(
- kPublicAccountLogoutButtonBorderImagesHovered));
- }
- AddChildView(logout_button_);
-}
-
-void UserView::AddUserCard(SystemTrayItem* owner, user::LoginStatus login) {
- // Add padding around the panel.
- set_border(views::Border::CreateEmptyBorder(
- kUserCardVerticalPadding, kTrayPopupPaddingHorizontal,
- kUserCardVerticalPadding, kTrayPopupPaddingHorizontal));
-
- if (SupportsMultiProfile() && login != user::LOGGED_IN_RETAIL_MODE) {
- user_card_view_ = new UserCard(this, multiprofile_index_ == 0);
- is_user_card_ = true;
- } else {
- user_card_view_ = new views::View();
- is_user_card_ = false;
- }
-
- user_card_view_->SetLayoutManager(new views::BoxLayout(
- views::BoxLayout::kHorizontal, 0, 0 , kTrayPopupPaddingBetweenItems));
- AddChildViewAt(user_card_view_, 0);
-
- if (login == user::LOGGED_IN_RETAIL_MODE) {
- AddLoggedInRetailModeUserCardContent();
- return;
- }
-
- // The entire user card should trigger hover (the inner items get disabled).
- user_card_view_->SetEnabled(true);
- user_card_view_->set_notify_enter_exit_on_child(true);
-
- if (login == user::LOGGED_IN_PUBLIC) {
- AddLoggedInPublicModeUserCardContent(owner);
- return;
- }
-
- views::View* icon = CreateIconForUserCard(login);
- user_card_view_->AddChildView(icon);
-
- // To allow the border to start before the icon, reduce the size before and
- // add an inset to the icon to get the spacing.
- if (multiprofile_index_ == 0 && SupportsMultiProfile()) {
- icon->set_border(views::Border::CreateEmptyBorder(
- 0, kTrayUserTileHoverBorderInset, 0, 0));
- set_border(views::Border::CreateEmptyBorder(
- kUserCardVerticalPadding,
- kTrayPopupPaddingHorizontal - kTrayUserTileHoverBorderInset,
- kUserCardVerticalPadding,
- kTrayPopupPaddingHorizontal));
- }
- SessionStateDelegate* delegate =
- Shell::GetInstance()->session_state_delegate();
- views::Label* username = NULL;
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- if (!multiprofile_index_) {
- base::string16 user_name_string =
- login == user::LOGGED_IN_GUEST ?
- bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_GUEST_LABEL) :
- delegate->GetUserDisplayName(multiprofile_index_);
- if (!user_name_string.empty()) {
- username = new views::Label(user_name_string);
- username->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- }
- }
-
- views::Label* additional = NULL;
- if (login != user::LOGGED_IN_GUEST) {
- base::string16 user_email_string =
- login == user::LOGGED_IN_LOCALLY_MANAGED ?
- bundle.GetLocalizedString(
- IDS_ASH_STATUS_TRAY_LOCALLY_MANAGED_LABEL) :
- UTF8ToUTF16(delegate->GetUserEmail(multiprofile_index_));
- if (!user_email_string.empty()) {
- additional = new views::Label(user_email_string);
- additional->SetFontList(
- bundle.GetFontList(ui::ResourceBundle::SmallFont));
- additional->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- }
- }
-
- // Adjust text properties dependent on if it is an active or inactive user.
- if (multiprofile_index_) {
- // Fade the text of non active users to 50%.
- SkColor text_color = additional->enabled_color();
- text_color = SkColorSetA(text_color, SkColorGetA(text_color) / 2);
- if (additional)
- additional->SetDisabledColor(text_color);
- if (username)
- username->SetDisabledColor(text_color);
- }
-
- if (additional && username) {
- views::View* details = new views::View;
- details->SetLayoutManager(new views::BoxLayout(
- views::BoxLayout::kVertical, 0, kUserDetailsVerticalPadding, 0));
- details->AddChildView(username);
- details->AddChildView(additional);
- user_card_view_->AddChildView(details);
- } else {
- if (username)
- user_card_view_->AddChildView(username);
- if (additional)
- user_card_view_->AddChildView(additional);
- }
-}
-
-views::View* UserView::CreateIconForUserCard(user::LoginStatus login) {
- RoundedImageView* icon = new RoundedImageView(kProfileRoundedCornerRadius,
- multiprofile_index_ == 0);
- icon->SetEnabled(false);
- if (login == user::LOGGED_IN_GUEST) {
- icon->SetImage(*ui::ResourceBundle::GetSharedInstance().
- GetImageNamed(IDR_AURA_UBER_TRAY_GUEST_ICON).ToImageSkia(),
- gfx::Size(kUserIconSize, kUserIconSize));
- } else {
- icon->SetImage(
- Shell::GetInstance()->session_state_delegate()->
- GetUserImage(multiprofile_index_),
- gfx::Size(kUserIconSize, kUserIconSize));
- }
- return icon;
-}
-
-void UserView::AddLoggedInRetailModeUserCardContent() {
- views::Label* details = new views::Label;
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- details->SetText(
- bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_KIOSK_LABEL));
- details->set_border(views::Border::CreateEmptyBorder(0, 4, 0, 1));
- details->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- user_card_view_->AddChildView(details);
-}
-
-void UserView::AddLoggedInPublicModeUserCardContent(SystemTrayItem* owner) {
- user_card_view_->AddChildView(CreateIconForUserCard(user::LOGGED_IN_PUBLIC));
- user_card_view_->AddChildView(new PublicAccountUserDetails(
- owner, GetPreferredSize().width() + kTrayPopupPaddingBetweenItems));
-}
-
-void UserView::ToggleAddUserMenuOption() {
- if (add_menu_option_.get()) {
- popup_message_.reset();
- mouse_watcher_.reset();
- add_menu_option_.reset();
- return;
- }
-
- // Note: We do not need to install a global event handler to delete this
- // item since it will destroyed automatically before the menu / user menu item
- // gets destroyed..
- const SessionStateDelegate* session_state_delegate =
- Shell::GetInstance()->session_state_delegate();
- add_user_visible_but_disabled_ =
- session_state_delegate->NumberOfLoggedInUsers() >=
- session_state_delegate->GetMaximumNumberOfLoggedInUsers();
- add_menu_option_.reset(new views::Widget);
- views::Widget::InitParams params;
- params.type = views::Widget::InitParams::TYPE_TOOLTIP;
- params.keep_on_top = true;
- params.context = this->GetWidget()->GetNativeWindow();
- params.accept_events = true;
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- add_menu_option_->Init(params);
- add_menu_option_->SetOpacity(0xFF);
- add_menu_option_->GetNativeWindow()->set_owned_by_parent(false);
- SetShadowType(add_menu_option_->GetNativeView(),
- views::corewm::SHADOW_TYPE_NONE);
-
- // Position it below our user card.
- gfx::Rect bounds = user_card_view_->GetBoundsInScreen();
- bounds.set_y(bounds.y() + bounds.height());
- add_menu_option_->SetBounds(bounds);
-
- // Show the content.
- AddUserView* add_user_view = new AddUserView(
- static_cast<UserCard*>(user_card_view_), this);
- add_menu_option_->SetContentsView(add_user_view);
- add_menu_option_->SetAlwaysOnTop(true);
- add_menu_option_->Show();
- if (add_user_visible_but_disabled_) {
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- popup_message_.reset(new PopupMessage(
- bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_CAPTION_CANNOT_ADD_USER),
- bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_MESSAGE_CANNOT_ADD_USER),
- PopupMessage::ICON_WARNING,
- add_user_view->anchor(),
- views::BubbleBorder::TOP_LEFT,
- gfx::Size(parent()->bounds().width() - kPopupMessageOffset, 0),
- 2 * kPopupMessageOffset));
- }
- // Find the screen area which encloses both elements and sets then a mouse
- // watcher which will close the "menu".
- gfx::Rect area = user_card_view_->GetBoundsInScreen();
- area.set_height(2 * area.height());
- mouse_watcher_.reset(new views::MouseWatcher(
- new UserViewMouseWatcherHost(area),
- this));
- mouse_watcher_->Start();
-}
-
-bool UserView::SupportsMultiProfile() {
- // We do not want to see any multi profile additions to a user view when the
- // log in screen is shown.
- return Shell::GetInstance()->delegate()->IsMultiProfilesEnabled() &&
- !Shell::GetInstance()->session_state_delegate()->IsUserSessionBlocked();
-}
-
-AddUserView::AddUserView(UserCard* owner, views::ButtonListener* listener)
- : CustomButton(listener_),
- add_user_(NULL),
- listener_(listener),
- owner_(owner),
- anchor_(NULL) {
- AddContent();
- owner_->ForceBorderVisible(true);
-}
-
-AddUserView::~AddUserView() {
- owner_->ForceBorderVisible(false);
-}
-
-gfx::Size AddUserView::GetPreferredSize() {
- return owner_->bounds().size();
-}
-
-int AddUserView::GetHeightForWidth(int width) {
- return owner_->bounds().size().height();
-}
-
-void AddUserView::Layout() {
- gfx::Rect contents_area(GetContentsBounds());
- add_user_->SetBoundsRect(contents_area);
-}
-
-void AddUserView::ButtonPressed(views::Button* sender, const ui::Event& event) {
- if (add_user_ == sender)
- listener_->ButtonPressed(this, event);
- else
- NOTREACHED();
-}
-
-void AddUserView::AddContent() {
- set_notify_enter_exit_on_child(true);
-
- const SessionStateDelegate* delegate =
- Shell::GetInstance()->session_state_delegate();
- bool enable = delegate->NumberOfLoggedInUsers() <
- delegate->GetMaximumNumberOfLoggedInUsers();
-
- SetLayoutManager(new views::FillLayout());
- set_background(views::Background::CreateSolidBackground(kBackgroundColor));
-
- // Add padding around the panel.
- set_border(views::Border::CreateSolidBorder(1, kBorderColor));
-
- add_user_ = new UserCard(this, enable);
- add_user_->set_border(views::Border::CreateEmptyBorder(
- kUserCardVerticalPadding,
- kTrayPopupPaddingHorizontal- kTrayUserTileHoverBorderInset,
- kUserCardVerticalPadding,
- kTrayPopupPaddingHorizontal- kTrayUserTileHoverBorderInset));
-
- add_user_->SetLayoutManager(new views::BoxLayout(
- views::BoxLayout::kHorizontal, 0, 0 , kTrayPopupPaddingBetweenItems));
- AddChildViewAt(add_user_, 0);
-
- // Add the [+] icon which is also the anchor for messages.
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- RoundedImageView* icon = new RoundedImageView(kProfileRoundedCornerRadius,
- true);
- anchor_ = icon;
- icon->SetImage(*ui::ResourceBundle::GetSharedInstance().
- GetImageNamed(IDR_AURA_UBER_TRAY_ADD_MULTIPROFILE_USER).ToImageSkia(),
- gfx::Size(kUserIconSize, kUserIconSize));
- add_user_->AddChildView(icon);
-
- // Add the command text.
- views::Label* command_label = new views::Label(
- bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_SIGN_IN_ANOTHER_ACCOUNT));
- command_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- add_user_->AddChildView(command_label);
-}
-
-} // namespace tray
-
-TrayUser::TrayUser(SystemTray* system_tray, MultiProfileIndex index)
- : SystemTrayItem(system_tray),
- multiprofile_index_(index),
- user_(NULL),
- layout_view_(NULL),
- avatar_(NULL),
- label_(NULL) {
- Shell::GetInstance()->system_tray_notifier()->AddUserObserver(this);
-}
-
-TrayUser::~TrayUser() {
- Shell::GetInstance()->system_tray_notifier()->RemoveUserObserver(this);
-}
-
-TrayUser::TestState TrayUser::GetStateForTest() const {
- if (!user_)
- return HIDDEN;
- return user_->GetStateForTest();
-}
-
-bool TrayUser::CanDropWindowHereToTransferToUser(
- const gfx::Point& point_in_screen) {
- // Check that this item is shown in the system tray (which means it must have
- // a view there) and that the user it represents is not the current user (in
- // which case |GetTrayIndex()| would return NULL).
- if (!layout_view_ || !GetTrayIndex())
- return false;
- return layout_view_->GetBoundsInScreen().Contains(point_in_screen);
-}
-
-bool TrayUser::TransferWindowToUser(aura::Window* window) {
- SessionStateDelegate* session_state_delegate =
- ash::Shell::GetInstance()->session_state_delegate();
- return session_state_delegate->TransferWindowToDesktopOfUser(window,
- GetTrayIndex());
-}
-
-gfx::Rect TrayUser::GetUserPanelBoundsInScreenForTest() const {
- DCHECK(user_);
- return user_->GetBoundsInScreenOfUserButtonForTest();
-}
-
-views::View* TrayUser::CreateTrayView(user::LoginStatus status) {
- CHECK(layout_view_ == NULL);
- // When the full multi profile mode is used, only the active user will be
- // shown in the system tray, otherwise all users which are logged in.
- if (GetTrayIndex() && switches::UseFullMultiProfileMode())
- return NULL;
-
- layout_view_ = new views::View();
- layout_view_->SetLayoutManager(
- new views::BoxLayout(views::BoxLayout::kHorizontal,
- 0, 0, kUserLabelToIconPadding));
- UpdateAfterLoginStatusChange(status);
- return layout_view_;
-}
-
-views::View* TrayUser::CreateDefaultView(user::LoginStatus status) {
- if (status == user::LOGGED_IN_NONE)
- return NULL;
- const SessionStateDelegate* session_state_delegate =
- Shell::GetInstance()->session_state_delegate();
-
- // If the screen is locked show only the currently active user.
- if (multiprofile_index_ && session_state_delegate->IsUserSessionBlocked())
- return NULL;
-
- CHECK(user_ == NULL);
-
- int logged_in_users = session_state_delegate->NumberOfLoggedInUsers();
-
- // Do not show more UserView's then there are logged in users.
- if (multiprofile_index_ >= logged_in_users)
- return NULL;
-
- user_ = new tray::UserView(this, status, multiprofile_index_);
- return user_;
-}
-
-views::View* TrayUser::CreateDetailedView(user::LoginStatus status) {
- return NULL;
-}
-
-void TrayUser::DestroyTrayView() {
- layout_view_ = NULL;
- avatar_ = NULL;
- label_ = NULL;
-}
-
-void TrayUser::DestroyDefaultView() {
- user_ = NULL;
-}
-
-void TrayUser::DestroyDetailedView() {
-}
-
-void TrayUser::UpdateAfterLoginStatusChange(user::LoginStatus status) {
- // Only the active user is represented in the tray.
- if (!layout_view_)
- return;
- if (GetTrayIndex() > 0 && !ash::switches::UseMultiUserTray())
- return;
- bool need_label = false;
- bool need_avatar = false;
- switch (status) {
- case user::LOGGED_IN_LOCKED:
- case user::LOGGED_IN_USER:
- case user::LOGGED_IN_OWNER:
- case user::LOGGED_IN_PUBLIC:
- need_avatar = true;
- break;
- case user::LOGGED_IN_LOCALLY_MANAGED:
- need_avatar = true;
- need_label = true;
- break;
- case user::LOGGED_IN_GUEST:
- need_label = true;
- break;
- case user::LOGGED_IN_RETAIL_MODE:
- case user::LOGGED_IN_KIOSK_APP:
- case user::LOGGED_IN_NONE:
- break;
- }
-
- if ((need_avatar != (avatar_ != NULL)) ||
- (need_label != (label_ != NULL))) {
- layout_view_->RemoveAllChildViews(true);
- if (need_label) {
- label_ = new views::Label;
- SetupLabelForTray(label_);
- layout_view_->AddChildView(label_);
- } else {
- label_ = NULL;
- }
- if (need_avatar) {
- MultiProfileIndex tray_index = GetTrayIndex();
- if (!tray_index) {
- // The active user (index #0) will always be the first.
- avatar_ = new tray::RoundedImageView(kProfileRoundedCornerRadius, true);
- } else {
- // All other users will be inactive users.
- avatar_ = new tray::UserSwitcherView(kProfileRoundedCornerRadius,
- tray_index);
- }
- layout_view_->AddChildView(avatar_);
- } else {
- avatar_ = NULL;
- }
- }
-
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- if (status == user::LOGGED_IN_LOCALLY_MANAGED) {
- label_->SetText(
- bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_LOCALLY_MANAGED_LABEL));
- } else if (status == user::LOGGED_IN_GUEST) {
- label_->SetText(bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_GUEST_LABEL));
- }
-
- if (avatar_ && switches::UseAlternateShelfLayout()) {
- int corner_radius = GetTrayItemRadius();
- avatar_->SetCornerRadii(0, corner_radius, corner_radius, 0);
- avatar_->set_border(NULL);
- }
- UpdateAvatarImage(status);
-
- // Update layout after setting label_ and avatar_ with new login status.
- UpdateLayoutOfItem();
-}
-
-void TrayUser::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
- // Inactive users won't have a layout.
- if (!layout_view_)
- return;
- int corner_radius = GetTrayItemRadius();
- if (alignment == SHELF_ALIGNMENT_BOTTOM ||
- alignment == SHELF_ALIGNMENT_TOP) {
- if (avatar_) {
- if (switches::UseAlternateShelfLayout()) {
- if (multiprofile_index_) {
- avatar_->set_border(
- views::Border::CreateEmptyBorder(0, kTrayLabelSpacing, 0, 0));
- } else {
- avatar_->set_border(NULL);
- }
- avatar_->SetCornerRadii(0, corner_radius, corner_radius, 0);
- } else {
- avatar_->set_border(views::Border::CreateEmptyBorder(
- 0, kTrayImageItemHorizontalPaddingBottomAlignment + 2,
- 0, kTrayImageItemHorizontalPaddingBottomAlignment));
- }
- }
- if (label_) {
- label_->set_border(views::Border::CreateEmptyBorder(
- 0, kTrayLabelItemHorizontalPaddingBottomAlignment,
- 0, kTrayLabelItemHorizontalPaddingBottomAlignment));
- }
- layout_view_->SetLayoutManager(
- new views::BoxLayout(views::BoxLayout::kHorizontal,
- 0, 0, kUserLabelToIconPadding));
- } else {
- if (avatar_) {
- if (switches::UseAlternateShelfLayout()) {
- if (multiprofile_index_) {
- avatar_->set_border(
- views::Border::CreateEmptyBorder(kTrayLabelSpacing, 0, 0, 0));
- } else {
- avatar_->set_border(NULL);
- }
- avatar_->SetCornerRadii(0, 0, corner_radius, corner_radius);
- } else {
- SetTrayImageItemBorder(avatar_, alignment);
- }
- }
- if (label_) {
- label_->set_border(views::Border::CreateEmptyBorder(
- kTrayLabelItemVerticalPaddingVerticalAlignment,
- kTrayLabelItemHorizontalPaddingBottomAlignment,
- kTrayLabelItemVerticalPaddingVerticalAlignment,
- kTrayLabelItemHorizontalPaddingBottomAlignment));
- }
- layout_view_->SetLayoutManager(
- new views::BoxLayout(views::BoxLayout::kVertical,
- 0, 0, kUserLabelToIconPadding));
- }
-}
-
-void TrayUser::OnUserUpdate() {
- UpdateAvatarImage(Shell::GetInstance()->system_tray_delegate()->
- GetUserLoginStatus());
-}
-
-void TrayUser::OnUserAddedToSession() {
- SessionStateDelegate* session_state_delegate =
- Shell::GetInstance()->session_state_delegate();
- // Only create views for user items which are logged in.
- if (GetTrayIndex() >= session_state_delegate->NumberOfLoggedInUsers())
- return;
-
- // Enforce a layout change that newly added items become visible.
- UpdateLayoutOfItem();
-
- // Update the user item.
- UpdateAvatarImage(
- Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus());
-}
-
-void TrayUser::UpdateAvatarImage(user::LoginStatus status) {
- SessionStateDelegate* session_state_delegate =
- Shell::GetInstance()->session_state_delegate();
- if (!avatar_ ||
- GetTrayIndex() >= session_state_delegate->NumberOfLoggedInUsers())
- return;
-
- int icon_size = switches::UseAlternateShelfLayout() ?
- kUserIconLargeSize : kUserIconSize;
-
- avatar_->SetImage(
- Shell::GetInstance()->session_state_delegate()->GetUserImage(
- GetTrayIndex()),
- gfx::Size(icon_size, icon_size));
-
- // Unit tests might come here with no images for some users.
- if (avatar_->size().IsEmpty())
- avatar_->SetSize(gfx::Size(icon_size, icon_size));
-}
-
-MultiProfileIndex TrayUser::GetTrayIndex() {
- Shell* shell = Shell::GetInstance();
- // If multi profile is not enabled we can use the normal index.
- if (!shell->delegate()->IsMultiProfilesEnabled())
- return multiprofile_index_;
- // In case of multi profile we need to mirror the indices since the system
- // tray items are in the reverse order then the menu items.
- return shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers() -
- 1 - multiprofile_index_;
-}
-
-int TrayUser::GetTrayItemRadius() {
- SessionStateDelegate* delegate =
- Shell::GetInstance()->session_state_delegate();
- bool is_last_item = GetTrayIndex() == (delegate->NumberOfLoggedInUsers() - 1);
- return is_last_item ? kUserIconLargeCornerRadius : 0;
-}
-
-void TrayUser::UpdateLayoutOfItem() {
- internal::RootWindowController* controller =
- internal::GetRootWindowController(
- system_tray()->GetWidget()->GetNativeWindow()->GetRootWindow());
- if (controller && controller->shelf()) {
- UpdateAfterShelfAlignmentChange(
- controller->GetShelfLayoutManager()->GetAlignment());
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/user/tray_user.h b/chromium/ash/system/user/tray_user.h
deleted file mode 100644
index 079bf75e4f7..00000000000
--- a/chromium/ash/system/user/tray_user.h
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_USER_TRAY_USER_H_
-#define ASH_SYSTEM_USER_TRAY_USER_H_
-
-#include "ash/ash_export.h"
-#include "ash/session_state_delegate.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "ash/system/user/user_observer.h"
-#include "base/compiler_specific.h"
-
-namespace gfx {
-class Rect;
-class Point;
-}
-
-namespace views {
-class ImageView;
-class Label;
-}
-
-namespace ash {
-namespace internal {
-
-namespace tray {
-class UserView;
-class RoundedImageView;
-}
-
-class ASH_EXPORT TrayUser : public SystemTrayItem,
- public UserObserver {
- public:
- // The given |multiprofile_index| is the user number in a multi profile
- // scenario. Index #0 is the running user, the other indices are other logged
- // in users (if there are any). Depending on the multi user mode, there will
- // be either one (index #0) or all users be visible in the system tray.
- TrayUser(SystemTray* system_tray, MultiProfileIndex index);
- virtual ~TrayUser();
-
- // Allows unit tests to see if the item was created.
- enum TestState {
- HIDDEN, // The item is hidden.
- SHOWN, // The item gets presented to the user.
- HOVERED, // The item is hovered and presented to the user.
- ACTIVE, // The item was clicked and can add a user.
- ACTIVE_BUT_DISABLED // The item was clicked anc cannot add a user.
- };
- TestState GetStateForTest() const;
-
- // Checks if a drag and drop operation would be able to land a window on this
- // |point_in_screen|.
- bool CanDropWindowHereToTransferToUser(const gfx::Point& point_in_screen);
-
- // Try to re-parent the |window| to a new owner. Returns true if the window
- // got transfered.
- bool TransferWindowToUser(aura::Window* window);
-
- // Returns the bounds of the user panel in screen coordinates.
- // Note: This only works when the panel shown.
- gfx::Rect GetUserPanelBoundsInScreenForTest() const;
-
- private:
- // Overridden from SystemTrayItem.
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyTrayView() OVERRIDE;
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE;
- virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
- virtual void UpdateAfterShelfAlignmentChange(
- ShelfAlignment alignment) OVERRIDE;
-
- // Overridden from UserObserver.
- virtual void OnUserUpdate() OVERRIDE;
- virtual void OnUserAddedToSession() OVERRIDE;
-
- void UpdateAvatarImage(user::LoginStatus status);
-
- // Get the user index which should be used for the tray icon of this item.
- MultiProfileIndex GetTrayIndex();
-
- // Return the radius for the tray item to use.
- int GetTrayItemRadius();
-
- // Updates the layout of this item.
- void UpdateLayoutOfItem();
-
- // The user index to use.
- MultiProfileIndex multiprofile_index_;
-
- tray::UserView* user_;
-
- // View that contains label and/or avatar.
- views::View* layout_view_;
- tray::RoundedImageView* avatar_;
- views::Label* label_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayUser);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_USER_TRAY_USER_H_
diff --git a/chromium/ash/system/user/tray_user_separator.cc b/chromium/ash/system/user/tray_user_separator.cc
deleted file mode 100644
index dc63bff9f4d..00000000000
--- a/chromium/ash/system/user/tray_user_separator.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/user/tray_user_separator.h"
-
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ui/views/view.h"
-
-namespace ash {
-namespace internal {
-
-TrayUserSeparator::TrayUserSeparator(SystemTray* system_tray)
- : SystemTrayItem(system_tray),
- separator_shown_(false) {
-}
-
-views::View* TrayUserSeparator::CreateTrayView(user::LoginStatus status) {
- return NULL;
-}
-
-views::View* TrayUserSeparator::CreateDefaultView(user::LoginStatus status) {
- if (status == user::LOGGED_IN_NONE)
- return NULL;
-
- const SessionStateDelegate* session_state_delegate =
- Shell::GetInstance()->session_state_delegate();
-
- // If the screen is locked, or only a single user is shown, show nothing.
- if (session_state_delegate->IsUserSessionBlocked() ||
- session_state_delegate->NumberOfLoggedInUsers() < 2)
- return NULL;
-
- separator_shown_ = true;
- return new views::View();
-}
-
-views::View* TrayUserSeparator::CreateDetailedView(user::LoginStatus status) {
- return NULL;
-}
-
-void TrayUserSeparator::DestroyDefaultView() {
- separator_shown_ = false;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/user/tray_user_separator.h b/chromium/ash/system/user/tray_user_separator.h
deleted file mode 100644
index 62e52092d8a..00000000000
--- a/chromium/ash/system/user/tray_user_separator.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_USER_TRAY_USER_SEPARATOR_H_
-#define ASH_SYSTEM_USER_TRAY_USER_SEPARATOR_H_
-
-#include "ash/ash_export.h"
-#include "ash/system/tray/system_tray_item.h"
-
-namespace ash {
-namespace internal {
-
-// This tray item is showing an additional separator line between the logged in
-// users and the rest of the system tray menu. The separator will only be shown
-// when there are at least two users logged in.
-class ASH_EXPORT TrayUserSeparator : public SystemTrayItem {
- public:
- explicit TrayUserSeparator(SystemTray* system_tray);
- virtual ~TrayUserSeparator() {}
-
- // Returns true if the separator gets shown.
- bool separator_shown() { return separator_shown_; }
-
- private:
- // Overridden from SystemTrayItem.
- virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
- virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
- virtual void DestroyTrayView() OVERRIDE {}
- virtual void DestroyDefaultView() OVERRIDE;
- virtual void DestroyDetailedView() OVERRIDE {}
- virtual void UpdateAfterLoginStatusChange(
- user::LoginStatus status) OVERRIDE {}
- virtual void UpdateAfterShelfAlignmentChange(
- ShelfAlignment alignment) OVERRIDE {}
-
- // True if the separator gets shown.
- bool separator_shown_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayUserSeparator);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_USER_TRAY_USER_SEPARATOR_H_
diff --git a/chromium/ash/system/user/tray_user_unittest.cc b/chromium/ash/system/user/tray_user_unittest.cc
deleted file mode 100644
index ad6966104f8..00000000000
--- a/chromium/ash/system/user/tray_user_unittest.cc
+++ /dev/null
@@ -1,320 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <vector>
-
-#include "ash/ash_switches.h"
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/user/tray_user.h"
-#include "ash/system/user/tray_user_separator.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/test_session_state_delegate.h"
-#include "ash/test/test_shell_delegate.h"
-#include "base/command_line.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/gfx/animation/animation_container_element.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-#if defined(OS_CHROMEOS)
-#include "ash/system/tray/system_tray_notifier.h"
-#endif
-
-namespace ash {
-namespace internal {
-
-class TrayUserTest : public ash::test::AshTestBase {
- public:
- TrayUserTest();
-
- // testing::Test:
- virtual void SetUp() OVERRIDE;
-
- // This has to be called prior to first use with the proper configuration.
- void InitializeParameters(int users_logged_in, bool multiprofile);
-
- // Show the system tray menu using the provided event generator.
- void ShowTrayMenu(aura::test::EventGenerator* generator);
-
- // Move the mouse over the user item.
- void MoveOverUserItem(aura::test::EventGenerator* generator, int index);
-
- // Click on the user item. Note that the tray menu needs to be shown.
- void ClickUserItem(aura::test::EventGenerator* generator, int index);
-
- // Accessors to various system components.
- ShelfLayoutManager* shelf() { return shelf_; }
- SystemTray* tray() { return tray_; }
- ash::test::TestSessionStateDelegate* delegate() { return delegate_; }
- ash::internal::TrayUser* tray_user(int index) { return tray_user_[index]; }
- ash::internal::TrayUserSeparator* tray_user_separator() {
- return tray_user_separator_;
- }
-
- private:
- ShelfLayoutManager* shelf_;
- SystemTray* tray_;
- ash::test::TestSessionStateDelegate* delegate_;
-
- // Note that the ownership of these items is on the shelf.
- std::vector<ash::internal::TrayUser*> tray_user_;
-
- // The separator between the tray users and the rest of the menu.
- // Note: The item will get owned by the shelf.
- TrayUserSeparator* tray_user_separator_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayUserTest);
-};
-
-#if defined(OS_CHROMEOS)
-// The tray user test which tests functionality where multiple tray items are
-// visible in the system tray.
-class MultiTrayUserTest : public TrayUserTest {
- public:
- MultiTrayUserTest() {}
-
- virtual void SetUp() OVERRIDE {
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- command_line->AppendSwitch(ash::switches::kAshEnableMultiUserTray);
- TrayUserTest::SetUp();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MultiTrayUserTest);
-};
-#endif
-
-TrayUserTest::TrayUserTest()
- : shelf_(NULL),
- tray_(NULL),
- delegate_(NULL),
- tray_user_separator_(NULL) {
-}
-
-void TrayUserTest::SetUp() {
- ash::test::AshTestBase::SetUp();
- shelf_ = Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager();
- tray_ = Shell::GetPrimaryRootWindowController()->GetSystemTray();
- delegate_ = static_cast<ash::test::TestSessionStateDelegate*>(
- ash::Shell::GetInstance()->session_state_delegate());
-}
-
-void TrayUserTest::InitializeParameters(int users_logged_in,
- bool multiprofile) {
- // Show the shelf.
- shelf()->LayoutShelf();
- shelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
-
- // Set our default assumptions. Note that it is sufficient to set these
- // after everything was created.
- delegate_->set_logged_in_users(users_logged_in);
- ash::test::TestShellDelegate* shell_delegate =
- static_cast<ash::test::TestShellDelegate*>(
- ash::Shell::GetInstance()->delegate());
- shell_delegate->set_multi_profiles_enabled(multiprofile);
-
- // Instead of using the existing tray panels we create new ones which makes
- // the access easier.
- for (int i = 0; i < delegate_->GetMaximumNumberOfLoggedInUsers(); i++) {
- tray_user_.push_back(new ash::internal::TrayUser(tray_, i));
- tray_->AddTrayItem(tray_user_[i]);
- }
- // We then add also the separator.
- tray_user_separator_ = new ash::internal::TrayUserSeparator(tray_);
- tray_->AddTrayItem(tray_user_separator_);
-}
-
-void TrayUserTest::ShowTrayMenu(aura::test::EventGenerator* generator) {
- gfx::Point center = tray()->GetBoundsInScreen().CenterPoint();
-
- generator->MoveMouseTo(center.x(), center.y());
- EXPECT_FALSE(tray()->IsAnyBubbleVisible());
- generator->ClickLeftButton();
-}
-
-void TrayUserTest::MoveOverUserItem(aura::test::EventGenerator* generator,
- int index) {
- gfx::Point center =
- tray_user(index)->GetUserPanelBoundsInScreenForTest().CenterPoint();
-
- generator->MoveMouseTo(center.x(), center.y());
-}
-
-void TrayUserTest::ClickUserItem(aura::test::EventGenerator* generator,
- int index) {
- MoveOverUserItem(generator, index);
- generator->ClickLeftButton();
-}
-
-// Make sure that in single user mode the user panel cannot be activated and no
-// separators are being created.
-TEST_F(TrayUserTest, SingleUserModeDoesNotAllowAddingUser) {
- InitializeParameters(1, false);
-
- // Move the mouse over the status area and click to open the status menu.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
-
- EXPECT_FALSE(tray()->IsAnyBubbleVisible());
-
- for (int i = 0; i < delegate()->GetMaximumNumberOfLoggedInUsers(); i++)
- EXPECT_EQ(ash::internal::TrayUser::HIDDEN,
- tray_user(i)->GetStateForTest());
- EXPECT_FALSE(tray_user_separator()->separator_shown());
-
- ShowTrayMenu(&generator);
-
- EXPECT_TRUE(tray()->HasSystemBubble());
- EXPECT_TRUE(tray()->IsAnyBubbleVisible());
-
- for (int i = 0; i < delegate()->GetMaximumNumberOfLoggedInUsers(); i++)
- EXPECT_EQ(i == 0 ? ash::internal::TrayUser::SHOWN :
- ash::internal::TrayUser::HIDDEN,
- tray_user(i)->GetStateForTest());
- EXPECT_FALSE(tray_user_separator()->separator_shown());
- tray()->CloseSystemBubble();
-}
-
-#if defined(OS_CHROMEOS)
-// Make sure that in multi user mode the user panel can be activated and there
-// will be one panel for each user plus one additional separator at the end.
-// Note: the mouse watcher (for automatic closing upon leave) cannot be tested
-// here since it does not work with the event system in unit tests.
-TEST_F(TrayUserTest, MutiUserModeDoesNotAllowToAddUser) {
- InitializeParameters(1, true);
-
- // Move the mouse over the status area and click to open the status menu.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- generator.set_async(false);
-
- int max_users = delegate()->GetMaximumNumberOfLoggedInUsers();
- // Checking now for each amount of users that the correct is done.
- for (int j = 1; j < max_users; j++) {
- // Set the number of logged in users.
- delegate()->set_logged_in_users(j);
-
- // Verify that nothing is shown.
- EXPECT_FALSE(tray()->IsAnyBubbleVisible());
- for (int i = 0; i < max_users; i++)
- EXPECT_FALSE(tray_user(i)->GetStateForTest());
- EXPECT_FALSE(tray_user_separator()->separator_shown());
- // After clicking on the tray the menu should get shown and for each logged
- // in user we should get a visible item. In addition, the separator should
- // show up when we reach more then one user.
- ShowTrayMenu(&generator);
-
- EXPECT_TRUE(tray()->HasSystemBubble());
- EXPECT_TRUE(tray()->IsAnyBubbleVisible());
- for (int i = 0; i < max_users; i++) {
- EXPECT_EQ(i < j ? ash::internal::TrayUser::SHOWN :
- ash::internal::TrayUser::HIDDEN,
- tray_user(i)->GetStateForTest());
- }
-
- // Check the visibility of the separator.
- EXPECT_EQ(j > 1 ? true : false, tray_user_separator()->separator_shown());
-
- // Move the mouse over the user item and it should hover.
- MoveOverUserItem(&generator, 0);
- EXPECT_EQ(ash::internal::TrayUser::HOVERED,
- tray_user(0)->GetStateForTest());
- for (int i = 1; i < max_users; i++) {
- EXPECT_EQ(i < j ? ash::internal::TrayUser::SHOWN :
- ash::internal::TrayUser::HIDDEN,
- tray_user(i)->GetStateForTest());
- }
-
- // Check that clicking the button allows to add item if we have still room
- // for one more user.
- ClickUserItem(&generator, 0);
- EXPECT_EQ(j == max_users ?
- ash::internal::TrayUser::ACTIVE_BUT_DISABLED :
- ash::internal::TrayUser::ACTIVE,
- tray_user(0)->GetStateForTest());
-
- // Click the button again to see that the menu goes away.
- ClickUserItem(&generator, 0);
- EXPECT_EQ(ash::internal::TrayUser::HOVERED,
- tray_user(0)->GetStateForTest());
-
- // Close and check that everything is deleted.
- tray()->CloseSystemBubble();
- EXPECT_FALSE(tray()->IsAnyBubbleVisible());
- for (int i = 0; i < delegate()->GetMaximumNumberOfLoggedInUsers(); i++)
- EXPECT_EQ(ash::internal::TrayUser::HIDDEN,
- tray_user(i)->GetStateForTest());
- }
-}
-
-// Make sure that user changing gets properly executed.
-TEST_F(TrayUserTest, MutiUserModeButtonClicks) {
- // Have two users.
- InitializeParameters(2, true);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- ShowTrayMenu(&generator);
-
- // Switch to a new user - which has a capitalized name.
- ClickUserItem(&generator, 1);
- EXPECT_EQ(delegate()->get_activated_user(), delegate()->GetUserID(1));
- // Since the name is capitalized, the email should be different then the
- // user_id.
- EXPECT_NE(delegate()->get_activated_user(), delegate()->GetUserEmail(1));
- tray()->CloseSystemBubble();
-}
-
-// Make sure that we show items for all users in the tray accordingly.
-TEST_F(MultiTrayUserTest, CheckTrayUserItems) {
- InitializeParameters(1, true);
-
- int max_users = delegate()->GetMaximumNumberOfLoggedInUsers();
- // Checking now for each amount of users that the proper items are visible in
- // the tray. The proper item is hereby:
- // 2 -> User #1
- // 1 -> User #2
- // 0 -> User #3
- // Note: Tray items are required to populate system tray items as well as the
- // system tray menu. The system tray menu changes it's appearance with the
- // addition of more users, but the system tray does not create new items after
- // it got created.
- for (int present_users = 1; present_users <= max_users; ++present_users) {
- // We simulate the user addition by telling the delegate the new number of
- // users, then change all user tray items and finally tell the tray to
- // re-layout itself.
- delegate()->set_logged_in_users(present_users);
- Shell::GetInstance()->system_tray_notifier()->NotifyUserAddedToSession();
- tray()->Layout();
-
- // Check that the tray items are being shown in the reverse order.
- for (int i = 0; i < max_users; i++) {
- gfx::Rect rect =
- tray()->GetTrayItemViewForTest(tray_user(i))->GetBoundsInScreen();
- if (max_users - 1 - i < present_users)
- EXPECT_FALSE(rect.IsEmpty());
- else
- EXPECT_TRUE(rect.IsEmpty());
- }
- }
-
- // Click on the last item to see that the user changes.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- generator.set_async(false);
-
- // Switch to a new user - again, note that we have to click on the reverse
- // item in the list. Since the first clickable item is 1, we get user #2.
- gfx::Point point =
- tray()->GetTrayItemViewForTest(tray_user(1))->
- GetBoundsInScreen().CenterPoint();
-
- generator.MoveMouseTo(point.x(), point.y());
- generator.ClickLeftButton();
- EXPECT_EQ(delegate()->get_activated_user(), delegate()->GetUserID(1));
-}
-
-#endif
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/system/user/update_observer.h b/chromium/ash/system/user/update_observer.h
deleted file mode 100644
index e509f62d3cb..00000000000
--- a/chromium/ash/system/user/update_observer.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_USER_UPDATE_OBSERVER_H_
-#define ASH_SYSTEM_USER_UPDATE_OBSERVER_H_
-
-#include "ash/ash_export.h"
-
-namespace ash {
-
-class ASH_EXPORT UpdateObserver {
- public:
- enum UpdateSeverity {
- UPDATE_NORMAL,
- UPDATE_LOW_GREEN,
- UPDATE_HIGH_ORANGE,
- UPDATE_SEVERE_RED,
- };
-
- virtual ~UpdateObserver() {}
-
- virtual void OnUpdateRecommended(UpdateSeverity severity) = 0;
-};
-
-} // namespace ash
-
-#endif //ASH_SYSTEM_USER_UPDATE_OBSERVER_H_
diff --git a/chromium/ash/system/user/user_observer.h b/chromium/ash/system/user/user_observer.h
deleted file mode 100644
index 64c2b9de40f..00000000000
--- a/chromium/ash/system/user/user_observer.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_USER_USER_OBSERVER_H_
-#define ASH_SYSTEM_USER_USER_OBSERVER_H_
-
-#include "ash/ash_export.h"
-
-namespace ash {
-
-class ASH_EXPORT UserObserver {
- public:
- virtual ~UserObserver() {}
-
- // A user got updated / changed.
- virtual void OnUserUpdate() = 0;
-
- // A user was added to the existing session.
- virtual void OnUserAddedToSession() = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_USER_USER_OBSERVER_H_
diff --git a/chromium/ash/system/web_notification/web_notification_tray.cc b/chromium/ash/system/web_notification/web_notification_tray.cc
deleted file mode 100644
index b0b75d87dfc..00000000000
--- a/chromium/ash/system/web_notification/web_notification_tray.cc
+++ /dev/null
@@ -1,624 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/web_notification/web_notification_tray.h"
-
-#include "ash/ash_switches.h"
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_layout_manager_observer.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/tray_background_view.h"
-#include "ash/system/tray/tray_bubble_wrapper.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_utils.h"
-#include "base/auto_reset.h"
-#include "base/i18n/number_formatting.h"
-#include "base/i18n/rtl.h"
-#include "base/strings/utf_string_conversions.h"
-#include "grit/ash_strings.h"
-#include "grit/ui_strings.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/gfx/screen.h"
-#include "ui/message_center/message_center_style.h"
-#include "ui/message_center/message_center_tray_delegate.h"
-#include "ui/message_center/message_center_util.h"
-#include "ui/message_center/views/message_bubble_base.h"
-#include "ui/message_center/views/message_center_bubble.h"
-#include "ui/message_center/views/message_popup_collection.h"
-#include "ui/views/bubble/tray_bubble_view.h"
-#include "ui/views/controls/button/custom_button.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/controls/menu/menu_runner.h"
-#include "ui/views/layout/fill_layout.h"
-
-#if defined(OS_CHROMEOS)
-
-namespace message_center {
-
-MessageCenterTrayDelegate* CreateMessageCenterTray() {
- // On Windows+Ash the Tray will not be hosted in ash::Shell.
- NOTREACHED();
- return NULL;
-}
-
-} // namespace message_center
-
-#endif // defined(OS_CHROMEOS)
-
-namespace ash {
-namespace {
-
-// Menu commands
-const int kToggleQuietMode = 0;
-const int kEnableQuietModeDay = 2;
-
-}
-
-namespace internal {
-namespace {
-
-const SkColor kWebNotificationColorNoUnread = SkColorSetA(SK_ColorWHITE, 128);
-const SkColor kWebNotificationColorWithUnread = SK_ColorWHITE;
-
-}
-
-// Observes the change of work area (including temporary change by auto-hide)
-// and notifies MessagePopupCollection.
-class WorkAreaObserver : public ShelfLayoutManagerObserver,
- public ShellObserver {
- public:
- WorkAreaObserver();
- virtual ~WorkAreaObserver();
-
- void SetSystemTrayHeight(int height);
-
- // Starts observing |shelf| and shell and sends the change to |collection|.
- void StartObserving(message_center::MessagePopupCollection* collection,
- aura::Window* root_window);
-
- // Stops the observing session.
- void StopObserving();
-
- // Overridden from ShellObserver:
- virtual void OnDisplayWorkAreaInsetsChanged() OVERRIDE;
-
- // Overridden from ShelfLayoutManagerObserver:
- virtual void OnAutoHideStateChanged(ShelfAutoHideState new_state) OVERRIDE;
-
- private:
- // Updates |shelf_| from |root_window_|.
- void UpdateShelf();
-
- message_center::MessagePopupCollection* collection_;
- aura::Window* root_window_;
- ShelfLayoutManager* shelf_;
- int system_tray_height_;
-
- DISALLOW_COPY_AND_ASSIGN(WorkAreaObserver);
-};
-
-WorkAreaObserver::WorkAreaObserver()
- : collection_(NULL),
- root_window_(NULL),
- shelf_(NULL),
- system_tray_height_(0) {
-}
-
-WorkAreaObserver::~WorkAreaObserver() {
- StopObserving();
-}
-
-void WorkAreaObserver::SetSystemTrayHeight(int height) {
- system_tray_height_ = height;
-
- // If the shelf is shown during auto-hide state, the distance from the edge
- // should be reduced by the height of shelf's shown height.
- if (shelf_ && shelf_->visibility_state() == SHELF_AUTO_HIDE &&
- shelf_->auto_hide_state() == SHELF_AUTO_HIDE_SHOWN) {
- system_tray_height_ -= ShelfLayoutManager::GetPreferredShelfSize() -
- ShelfLayoutManager::kAutoHideSize;
- }
-
- if (system_tray_height_ > 0 && ash::switches::UseAlternateShelfLayout())
- system_tray_height_ += message_center::kMarginBetweenItems;
-
- if (!shelf_)
- return;
-
- OnAutoHideStateChanged(shelf_->auto_hide_state());
-}
-
-void WorkAreaObserver::StartObserving(
- message_center::MessagePopupCollection* collection,
- aura::Window* root_window) {
- DCHECK(collection);
- collection_ = collection;
- root_window_ = root_window;
- UpdateShelf();
- Shell::GetInstance()->AddShellObserver(this);
- if (system_tray_height_ > 0)
- OnAutoHideStateChanged(shelf_->auto_hide_state());
-}
-
-void WorkAreaObserver::StopObserving() {
- Shell::GetInstance()->RemoveShellObserver(this);
- if (shelf_)
- shelf_->RemoveObserver(this);
- collection_ = NULL;
- shelf_ = NULL;
-}
-
-void WorkAreaObserver::OnDisplayWorkAreaInsetsChanged() {
- UpdateShelf();
-
- collection_->OnDisplayBoundsChanged(
- Shell::GetScreen()->GetDisplayNearestWindow(
- shelf_->shelf_widget()->GetNativeView()));
-}
-
-void WorkAreaObserver::OnAutoHideStateChanged(ShelfAutoHideState new_state) {
- gfx::Display display = Shell::GetScreen()->GetDisplayNearestWindow(
- shelf_->shelf_widget()->GetNativeView());
- gfx::Rect work_area = display.work_area();
- int width = 0;
- if ((shelf_->visibility_state() == SHELF_AUTO_HIDE) &&
- new_state == SHELF_AUTO_HIDE_SHOWN) {
- // Since the work_area is already reduced by kAutoHideSize, the inset width
- // should be just the difference.
- width = ShelfLayoutManager::GetPreferredShelfSize() -
- ShelfLayoutManager::kAutoHideSize;
- }
- work_area.Inset(shelf_->SelectValueForShelfAlignment(
- gfx::Insets(0, 0, width, 0),
- gfx::Insets(0, width, 0, 0),
- gfx::Insets(0, 0, 0, width),
- gfx::Insets(width, 0, 0, 0)));
- if (system_tray_height_ > 0) {
- work_area.set_height(
- std::max(0, work_area.height() - system_tray_height_));
- if (shelf_->GetAlignment() == SHELF_ALIGNMENT_TOP)
- work_area.set_y(work_area.y() + system_tray_height_);
- }
- collection_->SetDisplayInfo(work_area, display.bounds());
-}
-
-void WorkAreaObserver::UpdateShelf() {
- if (shelf_)
- return;
-
- shelf_ = ShelfLayoutManager::ForLauncher(root_window_);
- if (shelf_)
- shelf_->AddObserver(this);
-}
-
-// Class to initialize and manage the WebNotificationBubble and
-// TrayBubbleWrapper instances for a bubble.
-class WebNotificationBubbleWrapper {
- public:
- // Takes ownership of |bubble| and creates |bubble_wrapper_|.
- WebNotificationBubbleWrapper(WebNotificationTray* tray,
- message_center::MessageBubbleBase* bubble) {
- bubble_.reset(bubble);
- views::TrayBubbleView::AnchorAlignment anchor_alignment =
- tray->GetAnchorAlignment();
- views::TrayBubbleView::InitParams init_params =
- bubble->GetInitParams(anchor_alignment);
- views::View* anchor = tray->tray_container();
- if (anchor_alignment == views::TrayBubbleView::ANCHOR_ALIGNMENT_BOTTOM) {
- gfx::Point bounds(anchor->width() / 2, 0);
- views::View::ConvertPointToWidget(anchor, &bounds);
- init_params.arrow_offset = bounds.x();
- }
- views::TrayBubbleView* bubble_view = views::TrayBubbleView::Create(
- tray->GetBubbleWindowContainer(), anchor, tray, &init_params);
- if (ash::switches::UseAlternateShelfLayout())
- bubble_view->SetArrowPaintType(views::BubbleBorder::PAINT_NONE);
- bubble_wrapper_.reset(new TrayBubbleWrapper(tray, bubble_view));
- bubble->InitializeContents(bubble_view);
- }
-
- message_center::MessageBubbleBase* bubble() const { return bubble_.get(); }
-
- // Convenience accessors.
- views::TrayBubbleView* bubble_view() const { return bubble_->bubble_view(); }
-
- private:
- scoped_ptr<message_center::MessageBubbleBase> bubble_;
- scoped_ptr<internal::TrayBubbleWrapper> bubble_wrapper_;
-
- DISALLOW_COPY_AND_ASSIGN(WebNotificationBubbleWrapper);
-};
-
-class WebNotificationButton : public views::CustomButton {
- public:
- WebNotificationButton(views::ButtonListener* listener)
- : views::CustomButton(listener),
- is_bubble_visible_(false),
- unread_count_(0) {
- SetLayoutManager(new views::FillLayout);
- unread_label_ = new views::Label();
- SetupLabelForTray(unread_label_);
- AddChildView(unread_label_);
- }
-
- void SetBubbleVisible(bool visible) {
- if (visible == is_bubble_visible_)
- return;
-
- is_bubble_visible_ = visible;
- UpdateIconVisibility();
- }
-
- void SetUnreadCount(int unread_count) {
- // base::FormatNumber doesn't convert to arabic numeric characters.
- // TODO(mukai): use ICU to support conversion for such locales.
- unread_count_ = unread_count;
- // TODO(mukai): move NINE_PLUS message to ui_strings, it doesn't need to be
- // in ash_strings.
- unread_label_->SetText((unread_count > 9) ?
- l10n_util::GetStringUTF16(IDS_ASH_NOTIFICATION_UNREAD_COUNT_NINE_PLUS) :
- base::FormatNumber(unread_count));
- UpdateIconVisibility();
- }
-
- protected:
- // Overridden from views::ImageButton:
- virtual gfx::Size GetPreferredSize() OVERRIDE {
- const int notification_item_size = GetShelfItemHeight();
- return gfx::Size(notification_item_size, notification_item_size);
- }
-
- virtual int GetHeightForWidth(int width) OVERRIDE {
- return GetPreferredSize().height();
- }
-
- private:
- void UpdateIconVisibility() {
- unread_label_->SetEnabledColor(
- (!is_bubble_visible_ && unread_count_ > 0) ?
- kWebNotificationColorWithUnread : kWebNotificationColorNoUnread);
- SchedulePaint();
- }
-
- bool is_bubble_visible_;
- int unread_count_;
-
- views::Label* unread_label_;
-
- DISALLOW_COPY_AND_ASSIGN(WebNotificationButton);
-};
-
-} // namespace internal
-
-WebNotificationTray::WebNotificationTray(
- internal::StatusAreaWidget* status_area_widget)
- : TrayBackgroundView(status_area_widget),
- button_(NULL),
- show_message_center_on_unlock_(false),
- should_update_tray_content_(false),
- should_block_shelf_auto_hide_(false) {
- button_ = new internal::WebNotificationButton(this);
- button_->set_triggerable_event_flags(
- ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON);
- tray_container()->AddChildView(button_);
- SetContentsBackground();
- tray_container()->set_border(NULL);
- SetVisible(false);
- message_center_tray_.reset(new message_center::MessageCenterTray(
- this,
- message_center::MessageCenter::Get()));
- work_area_observer_.reset(new internal::WorkAreaObserver());
- OnMessageCenterTrayChanged();
-}
-
-WebNotificationTray::~WebNotificationTray() {
- // Release any child views that might have back pointers before ~View().
- message_center_bubble_.reset();
- popup_collection_.reset();
- work_area_observer_.reset();
-}
-
-// Public methods.
-
-bool WebNotificationTray::ShowMessageCenterInternal(bool show_settings) {
- if (!ShouldShowMessageCenter())
- return false;
-
- should_block_shelf_auto_hide_ = true;
- message_center::MessageCenterBubble* message_center_bubble =
- new message_center::MessageCenterBubble(
- message_center(),
- message_center_tray_.get(),
- ash::switches::UseAlternateShelfLayout());
-
- int max_height = 0;
- aura::Window* status_area_window = status_area_widget()->GetNativeView();
- switch (GetShelfLayoutManager()->GetAlignment()) {
- case SHELF_ALIGNMENT_BOTTOM: {
- gfx::Rect shelf_bounds = GetShelfLayoutManager()->GetIdealBounds();
- max_height = shelf_bounds.y();
- break;
- }
- case SHELF_ALIGNMENT_TOP: {
- aura::Window* root = status_area_window->GetRootWindow();
- max_height =
- root->bounds().height() - status_area_window->bounds().height();
- break;
- }
- case SHELF_ALIGNMENT_LEFT:
- case SHELF_ALIGNMENT_RIGHT: {
- // Assume that the bottom line of the status area widget and the bubble
- // are aligned.
- max_height = status_area_window->GetBoundsInRootWindow().bottom();
- break;
- }
- default:
- NOTREACHED();
- }
-
- message_center_bubble->SetMaxHeight(std::max(0,
- max_height - GetTraySpacing()));
- if (show_settings)
- message_center_bubble->SetSettingsVisible();
- message_center_bubble_.reset(
- new internal::WebNotificationBubbleWrapper(this, message_center_bubble));
-
- status_area_widget()->SetHideSystemNotifications(true);
- GetShelfLayoutManager()->UpdateAutoHideState();
- button_->SetBubbleVisible(true);
- SetDrawBackgroundAsActive(true);
- return true;
-}
-
-bool WebNotificationTray::ShowMessageCenter() {
- return ShowMessageCenterInternal(false /* show_settings */);
-}
-
-void WebNotificationTray::HideMessageCenter() {
- if (!message_center_bubble())
- return;
- SetDrawBackgroundAsActive(false);
- message_center_bubble_.reset();
- should_block_shelf_auto_hide_ = false;
- show_message_center_on_unlock_ = false;
- status_area_widget()->SetHideSystemNotifications(false);
- GetShelfLayoutManager()->UpdateAutoHideState();
- button_->SetBubbleVisible(false);
-}
-
-void WebNotificationTray::SetSystemTrayHeight(int height) {
- work_area_observer_->SetSystemTrayHeight(height);
-}
-
-bool WebNotificationTray::ShowPopups() {
- if (message_center_bubble())
- return false;
-
- popup_collection_.reset(new message_center::MessagePopupCollection(
- ash::Shell::GetContainer(
- GetWidget()->GetNativeView()->GetRootWindow(),
- internal::kShellWindowId_StatusContainer),
- message_center(),
- message_center_tray_.get(),
- ash::switches::UseAlternateShelfLayout()));
- work_area_observer_->StartObserving(
- popup_collection_.get(), GetWidget()->GetNativeView()->GetRootWindow());
- return true;
-}
-
-void WebNotificationTray::HidePopups() {
- DCHECK(popup_collection_.get());
-
- popup_collection_->MarkAllPopupsShown();
- popup_collection_.reset();
- work_area_observer_->StopObserving();
-}
-
-// Private methods.
-
-bool WebNotificationTray::ShouldShowMessageCenter() {
- return status_area_widget()->login_status() != user::LOGGED_IN_LOCKED &&
- !(status_area_widget()->system_tray() &&
- status_area_widget()->system_tray()->HasNotificationBubble());
-}
-
-bool WebNotificationTray::ShouldBlockLauncherAutoHide() const {
- return should_block_shelf_auto_hide_;
-}
-
-bool WebNotificationTray::IsMessageCenterBubbleVisible() const {
- return (message_center_bubble() &&
- message_center_bubble()->bubble()->IsVisible());
-}
-
-bool WebNotificationTray::IsMouseInNotificationBubble() const {
- return false;
-}
-
-void WebNotificationTray::ShowMessageCenterBubble() {
- if (!IsMessageCenterBubbleVisible())
- message_center_tray_->ShowMessageCenterBubble();
-}
-
-void WebNotificationTray::UpdateAfterLoginStatusChange(
- user::LoginStatus login_status) {
- OnMessageCenterTrayChanged();
-}
-
-void WebNotificationTray::SetShelfAlignment(ShelfAlignment alignment) {
- if (alignment == shelf_alignment())
- return;
- internal::TrayBackgroundView::SetShelfAlignment(alignment);
- tray_container()->set_border(NULL);
- // Destroy any existing bubble so that it will be rebuilt correctly.
- message_center_tray_->HideMessageCenterBubble();
- message_center_tray_->HidePopupBubble();
-}
-
-void WebNotificationTray::AnchorUpdated() {
- if (message_center_bubble()) {
- message_center_bubble()->bubble_view()->UpdateBubble();
- UpdateBubbleViewArrow(message_center_bubble()->bubble_view());
- }
-}
-
-base::string16 WebNotificationTray::GetAccessibleNameForTray() {
- return l10n_util::GetStringUTF16(
- IDS_MESSAGE_CENTER_ACCESSIBLE_NAME);
-}
-
-void WebNotificationTray::HideBubbleWithView(
- const views::TrayBubbleView* bubble_view) {
- if (message_center_bubble() &&
- bubble_view == message_center_bubble()->bubble_view()) {
- message_center_tray_->HideMessageCenterBubble();
- } else if (popup_collection_.get()) {
- message_center_tray_->HidePopupBubble();
- }
-}
-
-bool WebNotificationTray::PerformAction(const ui::Event& event) {
- if (message_center_bubble())
- message_center_tray_->HideMessageCenterBubble();
- else
- message_center_tray_->ShowMessageCenterBubble();
- return true;
-}
-
-void WebNotificationTray::BubbleViewDestroyed() {
- if (message_center_bubble())
- message_center_bubble()->bubble()->BubbleViewDestroyed();
-}
-
-void WebNotificationTray::OnMouseEnteredView() {}
-
-void WebNotificationTray::OnMouseExitedView() {}
-
-base::string16 WebNotificationTray::GetAccessibleNameForBubble() {
- return GetAccessibleNameForTray();
-}
-
-gfx::Rect WebNotificationTray::GetAnchorRect(
- views::Widget* anchor_widget,
- views::TrayBubbleView::AnchorType anchor_type,
- views::TrayBubbleView::AnchorAlignment anchor_alignment) {
- return GetBubbleAnchorRect(anchor_widget, anchor_type, anchor_alignment);
-}
-
-void WebNotificationTray::HideBubble(const views::TrayBubbleView* bubble_view) {
- HideBubbleWithView(bubble_view);
-}
-
-bool WebNotificationTray::ShowNotifierSettings() {
- if (message_center_bubble()) {
- static_cast<message_center::MessageCenterBubble*>(
- message_center_bubble()->bubble())->SetSettingsVisible();
- return true;
- }
- return ShowMessageCenterInternal(true /* show_settings */);
-}
-
-message_center::MessageCenterTray* WebNotificationTray::GetMessageCenterTray() {
- return message_center_tray_.get();
-}
-
-bool WebNotificationTray::IsCommandIdChecked(int command_id) const {
- if (command_id != kToggleQuietMode)
- return false;
- return message_center()->IsQuietMode();
-}
-
-bool WebNotificationTray::IsCommandIdEnabled(int command_id) const {
- return true;
-}
-
-bool WebNotificationTray::GetAcceleratorForCommandId(
- int command_id,
- ui::Accelerator* accelerator) {
- return false;
-}
-
-void WebNotificationTray::ExecuteCommand(int command_id, int event_flags) {
- if (command_id == kToggleQuietMode) {
- bool in_quiet_mode = message_center()->IsQuietMode();
- message_center()->SetQuietMode(!in_quiet_mode);
- return;
- }
- base::TimeDelta expires_in = command_id == kEnableQuietModeDay ?
- base::TimeDelta::FromDays(1):
- base::TimeDelta::FromHours(1);
- message_center()->EnterQuietModeWithExpire(expires_in);
-}
-
-void WebNotificationTray::ButtonPressed(views::Button* sender,
- const ui::Event& event) {
- DCHECK_EQ(button_, sender);
- PerformAction(event);
-}
-
-void WebNotificationTray::OnMessageCenterTrayChanged() {
- // Do not update the tray contents directly. Multiple change events can happen
- // consecutively, and calling Update in the middle of those events will show
- // intermediate unread counts for a moment.
- should_update_tray_content_ = true;
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&WebNotificationTray::UpdateTrayContent, AsWeakPtr()));
-}
-
-void WebNotificationTray::UpdateTrayContent() {
- if (!should_update_tray_content_)
- return;
- should_update_tray_content_ = false;
-
- message_center::MessageCenter* message_center =
- message_center_tray_->message_center();
- button_->SetUnreadCount(message_center->UnreadNotificationCount());
- if (IsMessageCenterBubbleVisible())
- button_->SetState(views::CustomButton::STATE_PRESSED);
- else
- button_->SetState(views::CustomButton::STATE_NORMAL);
- SetVisible((status_area_widget()->login_status() != user::LOGGED_IN_NONE) &&
- (status_area_widget()->login_status() != user::LOGGED_IN_LOCKED) &&
- (message_center->NotificationCount() > 0));
- Layout();
- SchedulePaint();
-}
-
-bool WebNotificationTray::ClickedOutsideBubble() {
- // Only hide the message center
- if (!message_center_bubble())
- return false;
-
- message_center_tray_->HideMessageCenterBubble();
- return true;
-}
-
-message_center::MessageCenter* WebNotificationTray::message_center() const {
- return message_center_tray_->message_center();
-}
-
-// Methods for testing
-
-bool WebNotificationTray::IsPopupVisible() const {
- return message_center_tray_->popups_visible();
-}
-
-message_center::MessageCenterBubble*
-WebNotificationTray::GetMessageCenterBubbleForTest() {
- if (!message_center_bubble())
- return NULL;
- return static_cast<message_center::MessageCenterBubble*>(
- message_center_bubble()->bubble());
-}
-
-} // namespace ash
diff --git a/chromium/ash/system/web_notification/web_notification_tray.h b/chromium/ash/system/web_notification/web_notification_tray.h
deleted file mode 100644
index e08afbc8d10..00000000000
--- a/chromium/ash/system/web_notification/web_notification_tray.h
+++ /dev/null
@@ -1,187 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_
-#define ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_
-
-#include "ash/ash_export.h"
-#include "ash/system/tray/tray_background_view.h"
-#include "ash/system/user/login_status.h"
-#include "base/gtest_prod_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "ui/base/models/simple_menu_model.h"
-#include "ui/message_center/message_center_tray.h"
-#include "ui/message_center/message_center_tray_delegate.h"
-#include "ui/views/bubble/tray_bubble_view.h"
-#include "ui/views/controls/button/button.h"
-
-// Status area tray for showing browser and app notifications. This hosts
-// a MessageCenter class which manages the notification list. This class
-// contains the Ash specific tray implementation.
-//
-// Note: These are not related to system notifications (i.e NotificationView
-// generated by SystemTrayItem). Visibility of one notification type or other
-// is controlled by StatusAreaWidget.
-
-namespace views {
-class ImageButton;
-class MenuRunner;
-}
-
-namespace message_center {
-class MessageBubbleBase;
-class MessageCenter;
-class MessageCenterBubble;
-class MessagePopupCollection;
-}
-
-namespace ash {
-namespace internal {
-class StatusAreaWidget;
-class WebNotificationBubbleWrapper;
-class WebNotificationButton;
-class WorkAreaObserver;
-}
-
-class ASH_EXPORT WebNotificationTray
- : public internal::TrayBackgroundView,
- public views::TrayBubbleView::Delegate,
- public message_center::MessageCenterTrayDelegate,
- public views::ButtonListener,
- public base::SupportsWeakPtr<WebNotificationTray>,
- public ui::SimpleMenuModel::Delegate {
- public:
- explicit WebNotificationTray(
- internal::StatusAreaWidget* status_area_widget);
- virtual ~WebNotificationTray();
-
- // Sets the height of the system tray from the edge of the work area so that
- // the notification popups don't overlap with the tray. Passes 0 if no UI is
- // shown in the system tray side.
- void SetSystemTrayHeight(int height);
-
- // Returns true if it should block the auto hide behavior of the launcher.
- bool ShouldBlockLauncherAutoHide() const;
-
- // Returns true if the message center bubble is visible.
- bool IsMessageCenterBubbleVisible() const;
-
- // Returns true if the mouse is inside the notification bubble.
- bool IsMouseInNotificationBubble() const;
-
- // Shows the message center bubble.
- void ShowMessageCenterBubble();
-
- // Called when the login status is changed.
- void UpdateAfterLoginStatusChange(user::LoginStatus login_status);
-
- // Overridden from TrayBackgroundView.
- virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE;
- virtual void AnchorUpdated() OVERRIDE;
- virtual base::string16 GetAccessibleNameForTray() OVERRIDE;
- virtual void HideBubbleWithView(
- const views::TrayBubbleView* bubble_view) OVERRIDE;
- virtual bool ClickedOutsideBubble() OVERRIDE;
-
- // Overridden from internal::ActionableView.
- virtual bool PerformAction(const ui::Event& event) OVERRIDE;
-
- // Overridden from views::TrayBubbleView::Delegate.
- virtual void BubbleViewDestroyed() OVERRIDE;
- virtual void OnMouseEnteredView() OVERRIDE;
- virtual void OnMouseExitedView() OVERRIDE;
- virtual base::string16 GetAccessibleNameForBubble() OVERRIDE;
- virtual gfx::Rect GetAnchorRect(views::Widget* anchor_widget,
- AnchorType anchor_type,
- AnchorAlignment anchor_alignment) OVERRIDE;
- virtual void HideBubble(const views::TrayBubbleView* bubble_view) OVERRIDE;
-
- // Overridden from ButtonListener.
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
-
- // Overridden from MessageCenterTrayDelegate.
- virtual void OnMessageCenterTrayChanged() OVERRIDE;
- virtual bool ShowMessageCenter() OVERRIDE;
- virtual void HideMessageCenter() OVERRIDE;
- virtual bool ShowPopups() OVERRIDE;
- virtual void HidePopups() OVERRIDE;
- virtual bool ShowNotifierSettings() OVERRIDE;
- virtual message_center::MessageCenterTray* GetMessageCenterTray() OVERRIDE;
-
- // Overridden from SimpleMenuModel::Delegate.
- virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
- virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
- virtual bool GetAcceleratorForCommandId(
- int command_id,
- ui::Accelerator* accelerator) OVERRIDE;
- virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
-
- message_center::MessageCenter* message_center() const;
-
- private:
- friend class WebNotificationTrayTest;
-
- FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotifications);
- FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotificationPopupBubble);
- FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest,
- ManyMessageCenterNotifications);
- FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, ManyPopupNotifications);
- FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, PopupShownOnBothDisplays);
- FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, PopupAndSystemTray);
- FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, PopupAndAutoHideShelf);
-
- void UpdateTrayContent();
-
- // The actual process to show the message center. Set |show_settings| to true
- // if the message center should be initialized with the settings visible.
- // Returns true if the center is successfully created.
- bool ShowMessageCenterInternal(bool show_settings);
-
- // Queries login status and the status area widget to determine visibility of
- // the message center.
- bool ShouldShowMessageCenter();
-
- // Returns true if it should show the quiet mode menu.
- bool ShouldShowQuietModeMenu(const ui::Event& event);
-
- // Shows the quiet mode menu.
- void ShowQuietModeMenu(const ui::Event& event);
-
- // Creates the menu model for quiet mode and returns it.
- ui::MenuModel* CreateQuietModeMenu();
-
- internal::WebNotificationBubbleWrapper* message_center_bubble() const {
- return message_center_bubble_.get();
- }
-
- // Testing accessors.
- bool IsPopupVisible() const;
- message_center::MessageCenterBubble* GetMessageCenterBubbleForTest();
-
- scoped_ptr<message_center::MessageCenterTray> message_center_tray_;
- scoped_ptr<internal::WebNotificationBubbleWrapper> message_center_bubble_;
- scoped_ptr<message_center::MessagePopupCollection> popup_collection_;
- internal::WebNotificationButton* button_;
-
- bool show_message_center_on_unlock_;
-
- bool should_update_tray_content_;
-
- // True when the shelf auto hide behavior has to be blocked. Previously
- // this was done by checking |message_center_bubble_| but actually
- // the check can be called when creating this object, so it would cause
- // flickers of the shelf from hidden to shown. See: crbug.com/181213
- bool should_block_shelf_auto_hide_;
-
- // Observes the work area for |popup_collection_| and notifies to it.
- scoped_ptr<internal::WorkAreaObserver> work_area_observer_;
-
- DISALLOW_COPY_AND_ASSIGN(WebNotificationTray);
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_
diff --git a/chromium/ash/system/web_notification/web_notification_tray_unittest.cc b/chromium/ash/system/web_notification/web_notification_tray_unittest.cc
deleted file mode 100644
index b64e2b8f7f4..00000000000
--- a/chromium/ash/system/web_notification/web_notification_tray_unittest.cc
+++ /dev/null
@@ -1,487 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/web_notification/web_notification_tray.h"
-
-#include <vector>
-
-#include "ash/display/display_manager.h"
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_item.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/test_system_tray_delegate.h"
-#include "ash/wm/window_state.h"
-#include "base/strings/stringprintf.h"
-#include "base/strings/utf_string_conversions.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-#include "ui/message_center/message_center_style.h"
-#include "ui/message_center/message_center_tray.h"
-#include "ui/message_center/message_center_util.h"
-#include "ui/message_center/notification_list.h"
-#include "ui/message_center/notification_types.h"
-#include "ui/message_center/views/message_center_bubble.h"
-#include "ui/message_center/views/message_popup_collection.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/fill_layout.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-
-namespace {
-
-WebNotificationTray* GetTray() {
- return Shell::GetPrimaryRootWindowController()->shelf()->
- status_area_widget()->web_notification_tray();
-}
-
-WebNotificationTray* GetSecondaryTray() {
- internal::RootWindowController* primary_controller =
- Shell::GetPrimaryRootWindowController();
- Shell::RootWindowControllerList controllers =
- Shell::GetAllRootWindowControllers();
- for (size_t i = 0; i < controllers.size(); ++i) {
- if (controllers[i] != primary_controller) {
- return controllers[i]->shelf()->
- status_area_widget()->web_notification_tray();
- }
- }
-
- return NULL;
-}
-
-message_center::MessageCenter* GetMessageCenter() {
- return GetTray()->message_center();
-}
-
-SystemTray* GetSystemTray() {
- return Shell::GetPrimaryRootWindowController()->shelf()->
- status_area_widget()->system_tray();
-}
-
-// Trivial item implementation for testing PopupAndSystemTray test case.
-class TestItem : public SystemTrayItem {
- public:
- TestItem() : SystemTrayItem(GetSystemTray()) {}
-
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE {
- views::View* default_view = new views::View;
- default_view->SetLayoutManager(new views::FillLayout);
- default_view->AddChildView(new views::Label(UTF8ToUTF16("Default")));
- return default_view;
- }
-
- virtual views::View* CreateNotificationView(
- user::LoginStatus status) OVERRIDE {
- return new views::View;
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TestItem);
-};
-
-} // namespace
-
-class WebNotificationTrayTest : public test::AshTestBase {
- public:
- WebNotificationTrayTest() {}
- virtual ~WebNotificationTrayTest() {}
-
- virtual void TearDown() OVERRIDE {
- GetMessageCenter()->RemoveAllNotifications(false);
- test::AshTestBase::TearDown();
- }
-
- protected:
- void AddNotification(const std::string& id) {
- scoped_ptr<message_center::Notification> notification;
- notification.reset(new message_center::Notification(
- message_center::NOTIFICATION_TYPE_SIMPLE,
- id,
- ASCIIToUTF16("Test Web Notification"),
- ASCIIToUTF16("Notification message body."),
- gfx::Image(),
- ASCIIToUTF16("www.test.org"),
- message_center::NotifierId(),
- message_center::RichNotificationData(),
- NULL /* delegate */));
- GetMessageCenter()->AddNotification(notification.Pass());
- }
-
- void UpdateNotification(const std::string& old_id,
- const std::string& new_id) {
- scoped_ptr<message_center::Notification> notification;
- notification.reset(new message_center::Notification(
- message_center::NOTIFICATION_TYPE_SIMPLE,
- new_id,
- ASCIIToUTF16("Updated Web Notification"),
- ASCIIToUTF16("Updated message body."),
- gfx::Image(),
- ASCIIToUTF16("www.test.org"),
- message_center::NotifierId(),
- message_center::RichNotificationData(),
- NULL /* delegate */));
- GetMessageCenter()->UpdateNotification(old_id, notification.Pass());
- }
-
- void RemoveNotification(const std::string& id) {
- GetMessageCenter()->RemoveNotification(id, false);
- }
-
- views::Widget* GetWidget() {
- return GetTray()->GetWidget();
- }
-
- gfx::Rect GetPopupWorkArea() {
- return GetPopupWorkAreaForTray(GetTray());
- }
-
- gfx::Rect GetPopupWorkAreaForTray(WebNotificationTray* tray) {
- return tray->popup_collection_->work_area_;
- }
-
- bool IsPopupVisible() {
- return GetTray()->IsPopupVisible();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WebNotificationTrayTest);
-};
-
-TEST_F(WebNotificationTrayTest, WebNotifications) {
- // TODO(mukai): move this test case to ui/message_center.
- ASSERT_TRUE(GetWidget());
-
- // Add a notification.
- AddNotification("test_id1");
- EXPECT_EQ(1u, GetMessageCenter()->NotificationCount());
- EXPECT_TRUE(GetMessageCenter()->HasNotification("test_id1"));
- AddNotification("test_id2");
- AddNotification("test_id2");
- EXPECT_EQ(2u, GetMessageCenter()->NotificationCount());
- EXPECT_TRUE(GetMessageCenter()->HasNotification("test_id2"));
-
- // Ensure that updating a notification does not affect the count.
- UpdateNotification("test_id2", "test_id3");
- UpdateNotification("test_id3", "test_id3");
- EXPECT_EQ(2u, GetMessageCenter()->NotificationCount());
- EXPECT_FALSE(GetMessageCenter()->HasNotification("test_id2"));
-
- // Ensure that Removing the first notification removes it from the tray.
- RemoveNotification("test_id1");
- EXPECT_FALSE(GetMessageCenter()->HasNotification("test_id1"));
- EXPECT_EQ(1u, GetMessageCenter()->NotificationCount());
-
- // Remove the remianing notification.
- RemoveNotification("test_id3");
- EXPECT_EQ(0u, GetMessageCenter()->NotificationCount());
- EXPECT_FALSE(GetMessageCenter()->HasNotification("test_id3"));
-}
-
-TEST_F(WebNotificationTrayTest, WebNotificationPopupBubble) {
- // TODO(mukai): move this test case to ui/message_center.
- ASSERT_TRUE(GetWidget());
-
- // Adding a notification should show the popup bubble.
- AddNotification("test_id1");
- EXPECT_TRUE(GetTray()->IsPopupVisible());
-
- // Updating a notification should not hide the popup bubble.
- AddNotification("test_id2");
- UpdateNotification("test_id2", "test_id3");
- EXPECT_TRUE(GetTray()->IsPopupVisible());
-
- // Removing the first notification should not hide the popup bubble.
- RemoveNotification("test_id1");
- EXPECT_TRUE(GetTray()->IsPopupVisible());
-
- // Removing the visible notification should hide the popup bubble.
- RemoveNotification("test_id3");
- EXPECT_FALSE(GetTray()->IsPopupVisible());
-
- // Now test that we can show multiple popups and then show the message center.
- AddNotification("test_id4");
- AddNotification("test_id5");
- EXPECT_TRUE(GetTray()->IsPopupVisible());
-
- GetTray()->message_center_tray_->ShowMessageCenterBubble();
- GetTray()->message_center_tray_->HideMessageCenterBubble();
-
- EXPECT_FALSE(GetTray()->IsPopupVisible());
-}
-
-using message_center::NotificationList;
-
-
-// Flakily fails. http://crbug.com/229791
-TEST_F(WebNotificationTrayTest, DISABLED_ManyMessageCenterNotifications) {
- // Add the max visible notifications +1, ensure the correct visible number.
- size_t notifications_to_add =
- message_center::kMaxVisibleMessageCenterNotifications + 1;
- for (size_t i = 0; i < notifications_to_add; ++i) {
- std::string id = base::StringPrintf("test_id%d", static_cast<int>(i));
- AddNotification(id);
- }
- bool shown = GetTray()->message_center_tray_->ShowMessageCenterBubble();
- EXPECT_TRUE(shown);
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(GetTray()->message_center_bubble() != NULL);
- EXPECT_EQ(notifications_to_add,
- GetMessageCenter()->NotificationCount());
- EXPECT_EQ(message_center::kMaxVisibleMessageCenterNotifications,
- GetTray()->GetMessageCenterBubbleForTest()->
- NumMessageViewsForTest());
-}
-
-// Flakily times out. http://crbug.com/229792
-TEST_F(WebNotificationTrayTest, DISABLED_ManyPopupNotifications) {
- // Add the max visible popup notifications +1, ensure the correct num visible.
- size_t notifications_to_add =
- message_center::kMaxVisiblePopupNotifications + 1;
- for (size_t i = 0; i < notifications_to_add; ++i) {
- std::string id = base::StringPrintf("test_id%d", static_cast<int>(i));
- AddNotification(id);
- }
- GetTray()->ShowPopups();
- EXPECT_TRUE(GetTray()->IsPopupVisible());
- EXPECT_EQ(notifications_to_add,
- GetMessageCenter()->NotificationCount());
- NotificationList::PopupNotifications popups =
- GetMessageCenter()->GetPopupNotifications();
- EXPECT_EQ(message_center::kMaxVisiblePopupNotifications, popups.size());
-}
-
-#if defined(OS_CHROMEOS)
-// Display notification is ChromeOS only.
-#define MAYBE_PopupShownOnBothDisplays PopupShownOnBothDisplays
-#define MAYBE_PopupAndSystemTrayMultiDisplay PopupAndSystemTrayMultiDisplay
-#else
-#define MAYBE_PopupShownOnBothDisplays DISABLED_PopupShownOnBothDisplays
-#define MAYBE_PopupAndSystemTrayMultiDisplay \
- DISABLED_PopupAndSystemTrayMultiDisplay
-#endif
-
-// Verifies if the notification appears on both displays when extended mode.
-TEST_F(WebNotificationTrayTest, MAYBE_PopupShownOnBothDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- // Enables to appear the notification for display changes.
- test::TestSystemTrayDelegate* tray_delegate =
- static_cast<test::TestSystemTrayDelegate*>(
- Shell::GetInstance()->system_tray_delegate());
- tray_delegate->set_should_show_display_notification(true);
-
- UpdateDisplay("400x400,200x200");
- // UpdateDisplay() creates the display notifications, so popup is visible.
- EXPECT_TRUE(GetTray()->IsPopupVisible());
- WebNotificationTray* secondary_tray = GetSecondaryTray();
- ASSERT_TRUE(secondary_tray);
- EXPECT_TRUE(secondary_tray->IsPopupVisible());
-
- // Transition to mirroring and then back to extended display, which recreates
- // root window controller and shelf with having notifications. This code
- // verifies it doesn't cause crash and popups are still visible. See
- // http://crbug.com/263664
- internal::DisplayManager* display_manager =
- Shell::GetInstance()->display_manager();
-
- display_manager->SetSecondDisplayMode(internal::DisplayManager::MIRRORING);
- UpdateDisplay("400x400,200x200");
- EXPECT_TRUE(GetTray()->IsPopupVisible());
- EXPECT_FALSE(GetSecondaryTray());
-
- display_manager->SetSecondDisplayMode(internal::DisplayManager::EXTENDED);
- UpdateDisplay("400x400,200x200");
- EXPECT_TRUE(GetTray()->IsPopupVisible());
- secondary_tray = GetSecondaryTray();
- ASSERT_TRUE(secondary_tray);
- EXPECT_TRUE(secondary_tray->IsPopupVisible());
-}
-
-#if defined(OS_CHROMEOS)
-// PopupAndSystemTray may fail in platforms other than ChromeOS because the
-// RootWindow's bound can be bigger than gfx::Display's work area so that
-// openingsystem tray doesn't affect at all the work area of popups.
-#define MAYBE_PopupAndSystemTray PopupAndSystemTray
-#define MAYBE_PopupAndAutoHideShelf PopupAndAutoHideShelf
-#define MAYBE_PopupAndFullscreen PopupAndFullscreen
-#else
-#define MAYBE_PopupAndSystemTray DISABLED_PopupAndSystemTray
-#define MAYBE_PopupAndAutoHideShelf DISABLED_PopupAndAutoHideShelf
-#define MAYBE_PopupAndFullscreen DISABLED_PopupAndFullscreen
-#endif
-
-TEST_F(WebNotificationTrayTest, MAYBE_PopupAndSystemTray) {
- TestItem* test_item = new TestItem;
- GetSystemTray()->AddTrayItem(test_item);
-
- AddNotification("test_id");
- EXPECT_TRUE(GetTray()->IsPopupVisible());
- gfx::Rect work_area = GetPopupWorkArea();
-
- // System tray is created, the popup's work area should be narrowed but still
- // visible.
- GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW);
- EXPECT_TRUE(GetTray()->IsPopupVisible());
- gfx::Rect work_area_with_tray = GetPopupWorkArea();
- EXPECT_GT(work_area.size().GetArea(), work_area_with_tray.size().GetArea());
-
- // System tray notification is also created, the popup's work area is narrowed
- // even more, but still visible.
- GetSystemTray()->ShowNotificationView(test_item);
- EXPECT_TRUE(GetTray()->IsPopupVisible());
- gfx::Rect work_area_with_tray_notificaiton = GetPopupWorkArea();
- EXPECT_GT(work_area.size().GetArea(),
- work_area_with_tray_notificaiton.size().GetArea());
- EXPECT_GT(work_area_with_tray.size().GetArea(),
- work_area_with_tray_notificaiton.size().GetArea());
-
- // Close system tray, only system tray notifications.
- GetSystemTray()->ClickedOutsideBubble();
- EXPECT_TRUE(GetTray()->IsPopupVisible());
- gfx::Rect work_area_with_notification = GetPopupWorkArea();
- EXPECT_GT(work_area.size().GetArea(),
- work_area_with_notification.size().GetArea());
- EXPECT_LT(work_area_with_tray_notificaiton.size().GetArea(),
- work_area_with_notification.size().GetArea());
-
- // Close the system tray notifications.
- GetSystemTray()->HideNotificationView(test_item);
- EXPECT_TRUE(GetTray()->IsPopupVisible());
- EXPECT_EQ(work_area.ToString(), GetPopupWorkArea().ToString());
-}
-
-TEST_F(WebNotificationTrayTest, MAYBE_PopupAndAutoHideShelf) {
- AddNotification("test_id");
- EXPECT_TRUE(GetTray()->IsPopupVisible());
- gfx::Rect work_area = GetPopupWorkArea();
-
- // Shelf's auto-hide state won't be HIDDEN unless window exists.
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(1, 2, 3, 4)));
- internal::ShelfLayoutManager* shelf =
- Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager();
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
-
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- gfx::Rect work_area_auto_hidden = GetPopupWorkArea();
- EXPECT_LT(work_area.size().GetArea(), work_area_auto_hidden.size().GetArea());
-
- // Close the window, which shows the shelf.
- window.reset();
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
- gfx::Rect work_area_auto_shown = GetPopupWorkArea();
- EXPECT_EQ(work_area.ToString(), work_area_auto_shown.ToString());
-
- // Create the system tray during auto-hide.
- window.reset(CreateTestWindowInShellWithBounds(gfx::Rect(1, 2, 3, 4)));
- TestItem* test_item = new TestItem;
- GetSystemTray()->AddTrayItem(test_item);
- GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW);
-
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
- EXPECT_TRUE(GetTray()->IsPopupVisible());
- gfx::Rect work_area_with_tray = GetPopupWorkArea();
- EXPECT_GT(work_area_auto_shown.size().GetArea(),
- work_area_with_tray.size().GetArea());
-
- // Create tray notification.
- GetSystemTray()->ShowNotificationView(test_item);
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
- gfx::Rect work_area_with_tray_notification = GetPopupWorkArea();
- EXPECT_GT(work_area_with_tray.size().GetArea(),
- work_area_with_tray_notification.size().GetArea());
-
- // Close the system tray.
- GetSystemTray()->ClickedOutsideBubble();
- shelf->UpdateAutoHideState();
- RunAllPendingInMessageLoop();
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- gfx::Rect work_area_hidden_with_tray_notification = GetPopupWorkArea();
- EXPECT_LT(work_area_with_tray_notification.size().GetArea(),
- work_area_hidden_with_tray_notification.size().GetArea());
- EXPECT_GT(work_area_auto_hidden.size().GetArea(),
- work_area_hidden_with_tray_notification.size().GetArea());
-
- // Close the window again, which shows the shelf.
- window.reset();
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
- gfx::Rect work_area_shown_with_tray_notification = GetPopupWorkArea();
- EXPECT_GT(work_area_hidden_with_tray_notification.size().GetArea(),
- work_area_shown_with_tray_notification.size().GetArea());
- EXPECT_GT(work_area_auto_shown.size().GetArea(),
- work_area_shown_with_tray_notification.size().GetArea());
-}
-
-TEST_F(WebNotificationTrayTest, MAYBE_PopupAndFullscreen) {
- AddNotification("test_id");
- EXPECT_TRUE(IsPopupVisible());
- gfx::Rect work_area = GetPopupWorkArea();
-
- // Checks the work area for normal auto-hidden state.
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(1, 2, 3, 4)));
- internal::ShelfLayoutManager* shelf =
- Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager();
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- gfx::Rect work_area_auto_hidden = GetPopupWorkArea();
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
-
- // Put |window| into fullscreen without forcing the shelf to hide. Currently,
- // this is used by immersive fullscreen and forces the shelf to be auto
- // hidden.
- wm::GetWindowState(window.get())->set_hide_shelf_when_fullscreen(false);
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- RunAllPendingInMessageLoop();
-
- // The work area for auto-hidden status of fullscreen is a bit larger
- // since it doesn't even have the 3-pixel width.
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- gfx::Rect work_area_fullscreen_hidden = GetPopupWorkArea();
- EXPECT_EQ(work_area_auto_hidden.ToString(),
- work_area_fullscreen_hidden.ToString());
-
- // Move the mouse cursor at the bottom, which shows the shelf.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- gfx::Point bottom_right =
- Shell::GetScreen()->GetPrimaryDisplay().bounds().bottom_right();
- bottom_right.Offset(-1, -1);
- generator.MoveMouseTo(bottom_right);
- shelf->UpdateAutoHideStateNow();
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
- EXPECT_EQ(work_area.ToString(), GetPopupWorkArea().ToString());
-
- generator.MoveMouseTo(work_area.CenterPoint());
- shelf->UpdateAutoHideStateNow();
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- EXPECT_EQ(work_area_auto_hidden.ToString(), GetPopupWorkArea().ToString());
-}
-
-TEST_F(WebNotificationTrayTest, MAYBE_PopupAndSystemTrayMultiDisplay) {
- UpdateDisplay("800x600,600x400");
-
- AddNotification("test_id");
- gfx::Rect work_area = GetPopupWorkArea();
- gfx::Rect work_area_second = GetPopupWorkAreaForTray(GetSecondaryTray());
-
- // System tray is created on the primary display. The popups in the secondary
- // tray aren't affected.
- GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW);
- EXPECT_GT(work_area.size().GetArea(), GetPopupWorkArea().size().GetArea());
- EXPECT_EQ(work_area_second.ToString(),
- GetPopupWorkAreaForTray(GetSecondaryTray()).ToString());
-}
-
-} // namespace ash
diff --git a/chromium/ash/tooltips/tooltip_controller_unittest.cc b/chromium/ash/tooltips/tooltip_controller_unittest.cc
deleted file mode 100644
index 0b020474061..00000000000
--- a/chromium/ash/tooltips/tooltip_controller_unittest.cc
+++ /dev/null
@@ -1,179 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "base/strings/utf_string_conversions.h"
-#include "ui/aura/client/tooltip_client.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/window.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/font.h"
-#include "ui/gfx/point.h"
-#include "ui/views/corewm/tooltip_controller.h"
-#include "ui/views/corewm/tooltip_controller_test_helper.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-using views::corewm::TooltipController;
-using views::corewm::test::TooltipTestView;
-using views::corewm::test::TooltipControllerTestHelper;
-
-// The tests in this file exercise bits of TooltipController that are hard to
-// test outside of ash. Meaning these tests require the shell and related things
-// to be installed.
-
-namespace ash {
-namespace test {
-
-namespace {
-
-views::Widget* CreateNewWidgetWithBoundsOn(int display,
- const gfx::Rect& bounds) {
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params;
- params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS;
- params.accept_events = true;
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.context = Shell::GetAllRootWindows().at(display);
- params.child = true;
- params.bounds = bounds;
- widget->Init(params);
- widget->Show();
- return widget;
-}
-
-views::Widget* CreateNewWidgetOn(int display) {
- return CreateNewWidgetWithBoundsOn(display, gfx::Rect());
-}
-
-void AddViewToWidgetAndResize(views::Widget* widget, views::View* view) {
- if (!widget->GetContentsView()) {
- views::View* contents_view = new views::View;
- widget->SetContentsView(contents_view);
- }
-
- views::View* contents_view = widget->GetContentsView();
- contents_view->AddChildView(view);
- view->SetBounds(contents_view->width(), 0, 100, 100);
- gfx::Rect contents_view_bounds = contents_view->bounds();
- contents_view_bounds.Union(view->bounds());
- contents_view->SetBoundsRect(contents_view_bounds);
- widget->SetBounds(gfx::Rect(widget->GetWindowBoundsInScreen().origin(),
- contents_view_bounds.size()));
-}
-
-TooltipController* GetController() {
- return static_cast<TooltipController*>(
- aura::client::GetTooltipClient(Shell::GetPrimaryRootWindow()));
-}
-
-} // namespace
-
-class TooltipControllerTest : public AshTestBase {
- public:
- TooltipControllerTest() {}
- virtual ~TooltipControllerTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- helper_.reset(new TooltipControllerTestHelper(GetController()));
- }
-
- protected:
- scoped_ptr<TooltipControllerTestHelper> helper_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TooltipControllerTest);
-};
-
-TEST_F(TooltipControllerTest, NonNullTooltipClient) {
- EXPECT_TRUE(aura::client::GetTooltipClient(Shell::GetPrimaryRootWindow())
- != NULL);
- EXPECT_EQ(base::string16(), helper_->GetTooltipText());
- EXPECT_EQ(NULL, helper_->GetTooltipWindow());
- EXPECT_FALSE(helper_->IsTooltipVisible());
-}
-
-TEST_F(TooltipControllerTest, HideTooltipWhenCursorHidden) {
- scoped_ptr<views::Widget> widget(CreateNewWidgetOn(0));
- TooltipTestView* view = new TooltipTestView;
- AddViewToWidgetAndResize(widget.get(), view);
- view->set_tooltip_text(ASCIIToUTF16("Tooltip Text"));
- EXPECT_EQ(base::string16(), helper_->GetTooltipText());
- EXPECT_EQ(NULL, helper_->GetTooltipWindow());
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- generator.MoveMouseRelativeTo(widget->GetNativeView(),
- view->bounds().CenterPoint());
- base::string16 expected_tooltip = ASCIIToUTF16("Tooltip Text");
-
- // Fire tooltip timer so tooltip becomes visible.
- helper_->FireTooltipTimer();
- EXPECT_TRUE(helper_->IsTooltipVisible());
-
- // Hide the cursor and check again.
- ash::Shell::GetInstance()->cursor_manager()->DisableMouseEvents();
- helper_->FireTooltipTimer();
- EXPECT_FALSE(helper_->IsTooltipVisible());
-
- // Show the cursor and re-check.
- RunAllPendingInMessageLoop();
- ash::Shell::GetInstance()->cursor_manager()->EnableMouseEvents();
- RunAllPendingInMessageLoop();
- helper_->FireTooltipTimer();
- EXPECT_TRUE(helper_->IsTooltipVisible());
-}
-
-TEST_F(TooltipControllerTest, TooltipsOnMultiDisplayShouldNotCrash) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("1000x600,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- scoped_ptr<views::Widget> widget1(CreateNewWidgetWithBoundsOn(
- 0, gfx::Rect(10, 10, 100, 100)));
- TooltipTestView* view1 = new TooltipTestView;
- AddViewToWidgetAndResize(widget1.get(), view1);
- view1->set_tooltip_text(ASCIIToUTF16("Tooltip Text for view 1"));
- EXPECT_EQ(widget1->GetNativeView()->GetRootWindow(), root_windows[0]);
-
- scoped_ptr<views::Widget> widget2(CreateNewWidgetWithBoundsOn(
- 1, gfx::Rect(1200, 10, 100, 100)));
- TooltipTestView* view2 = new TooltipTestView;
- AddViewToWidgetAndResize(widget2.get(), view2);
- view2->set_tooltip_text(ASCIIToUTF16("Tooltip Text for view 2"));
- EXPECT_EQ(widget2->GetNativeView()->GetRootWindow(), root_windows[1]);
-
- // Show tooltip on second display.
- aura::test::EventGenerator generator(root_windows[1]);
- generator.MoveMouseRelativeTo(widget2->GetNativeView(),
- view2->bounds().CenterPoint());
- helper_->FireTooltipTimer();
- EXPECT_TRUE(helper_->IsTooltipVisible());
-
- // Get rid of secondary display. This destroy's the tooltip's aura window. If
- // we have handled this case, we will not crash in the following statement.
- UpdateDisplay("1000x600");
-#if !defined(OS_WIN)
- // TODO(cpu): Detangle the window destruction notification. Currently
- // the TooltipController::OnWindowDestroyed is not being called then the
- // display is torn down so the tooltip is is still there.
- EXPECT_FALSE(helper_->IsTooltipVisible());
-#endif
- EXPECT_EQ(widget2->GetNativeView()->GetRootWindow(), root_windows[0]);
-
- // The tooltip should create a new aura window for itself, so we should still
- // be able to show tooltips on the primary display.
- aura::test::EventGenerator generator1(root_windows[0]);
- generator1.MoveMouseRelativeTo(widget1->GetNativeView(),
- view1->bounds().CenterPoint());
- helper_->FireTooltipTimer();
- EXPECT_TRUE(helper_->IsTooltipVisible());
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/touch/touch_hud_debug.cc b/chromium/ash/touch/touch_hud_debug.cc
deleted file mode 100644
index 32392ff040b..00000000000
--- a/chromium/ash/touch/touch_hud_debug.cc
+++ /dev/null
@@ -1,490 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/touch/touch_hud_debug.h"
-
-#include "ash/display/display_manager.h"
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "base/json/json_string_value_serializer.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/stringprintf.h"
-#include "base/strings/utf_string_conversions.h"
-#include "third_party/skia/include/core/SkPath.h"
-#include "ui/aura/root_window.h"
-#include "ui/events/event.h"
-#include "ui/gfx/animation/animation_delegate.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/size.h"
-#include "ui/gfx/transform.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/widget/widget.h"
-
-#if defined(USE_X11)
-#include <X11/extensions/XInput2.h>
-#include <X11/Xlib.h>
-
-#include "ui/events/x/device_data_manager.h"
-#endif
-
-namespace ash {
-namespace internal {
-
-const int kPointRadius = 20;
-const SkColor kColors[] = {
- SK_ColorYELLOW,
- SK_ColorGREEN,
- SK_ColorRED,
- SK_ColorBLUE,
- SK_ColorGRAY,
- SK_ColorMAGENTA,
- SK_ColorCYAN,
- SK_ColorWHITE,
- SK_ColorBLACK,
- SkColorSetRGB(0xFF, 0x8C, 0x00),
- SkColorSetRGB(0x8B, 0x45, 0x13),
- SkColorSetRGB(0xFF, 0xDE, 0xAD),
-};
-const int kAlpha = 0x60;
-const int kMaxPaths = arraysize(kColors);
-const int kReducedScale = 10;
-
-const char* GetTouchEventLabel(ui::EventType type) {
- switch (type) {
- case ui::ET_UNKNOWN:
- return " ";
- case ui::ET_TOUCH_PRESSED:
- return "P";
- case ui::ET_TOUCH_MOVED:
- return "M";
- case ui::ET_TOUCH_RELEASED:
- return "R";
- case ui::ET_TOUCH_CANCELLED:
- return "C";
- default:
- break;
- }
- return "?";
-}
-
-int GetTrackingId(const ui::TouchEvent& event) {
- if (!event.HasNativeEvent())
- return 0;
-#if defined(USE_XI2_MT)
- ui::DeviceDataManager* manager = ui::DeviceDataManager::GetInstance();
- double tracking_id;
- if (manager->GetEventData(*event.native_event(),
- ui::DeviceDataManager::DT_TOUCH_TRACKING_ID,
- &tracking_id)) {
- return static_cast<int>(tracking_id);
- }
-#endif
- return 0;
-}
-
-int GetSourceDeviceId(const ui::TouchEvent& event) {
- if (!event.HasNativeEvent())
- return 0;
-#if defined(USE_X11)
- XEvent* xev = event.native_event();
- return static_cast<XIDeviceEvent*>(xev->xcookie.data)->sourceid;
-#endif
- return 0;
-}
-
-// A TouchPointLog represents a single touch-event of a touch point.
-struct TouchPointLog {
- public:
- explicit TouchPointLog(const ui::TouchEvent& touch)
- : id(touch.touch_id()),
- type(touch.type()),
- location(touch.root_location()),
- timestamp(touch.time_stamp().InMillisecondsF()),
- radius_x(touch.radius_x()),
- radius_y(touch.radius_y()),
- pressure(touch.force()),
- tracking_id(GetTrackingId(touch)),
- source_device(GetSourceDeviceId(touch)) {
- }
-
- // Populates a dictionary value with all the information about the touch
- // point.
- scoped_ptr<DictionaryValue> GetAsDictionary() const {
- scoped_ptr<DictionaryValue> value(new DictionaryValue());
-
- value->SetInteger("id", id);
- value->SetString("type", std::string(GetTouchEventLabel(type)));
- value->SetString("location", location.ToString());
- value->SetDouble("timestamp", timestamp);
- value->SetDouble("radius_x", radius_x);
- value->SetDouble("radius_y", radius_y);
- value->SetDouble("pressure", pressure);
- value->SetInteger("tracking_id", tracking_id);
- value->SetInteger("source_device", source_device);
-
- return value.Pass();
- }
-
- int id;
- ui::EventType type;
- gfx::Point location;
- double timestamp;
- float radius_x;
- float radius_y;
- float pressure;
- int tracking_id;
- int source_device;
-};
-
-// A TouchTrace keeps track of all the touch events of a single touch point
-// (starting from a touch-press and ending at a touch-release or touch-cancel).
-class TouchTrace {
- public:
- typedef std::vector<TouchPointLog>::iterator iterator;
- typedef std::vector<TouchPointLog>::const_iterator const_iterator;
- typedef std::vector<TouchPointLog>::reverse_iterator reverse_iterator;
- typedef std::vector<TouchPointLog>::const_reverse_iterator
- const_reverse_iterator;
-
- TouchTrace() {
- }
-
- void AddTouchPoint(const ui::TouchEvent& touch) {
- log_.push_back(TouchPointLog(touch));
- }
-
- const std::vector<TouchPointLog>& log() const { return log_; }
-
- bool active() const {
- return !log_.empty() && log_.back().type != ui::ET_TOUCH_RELEASED &&
- log_.back().type != ui::ET_TOUCH_CANCELLED;
- }
-
- // Returns a list containing data from all events for the touch point.
- scoped_ptr<ListValue> GetAsList() const {
- scoped_ptr<ListValue> list(new ListValue());
- for (const_iterator i = log_.begin(); i != log_.end(); ++i)
- list->Append((*i).GetAsDictionary().release());
- return list.Pass();
- }
-
- void Reset() {
- log_.clear();
- }
-
- private:
- std::vector<TouchPointLog> log_;
-
- DISALLOW_COPY_AND_ASSIGN(TouchTrace);
-};
-
-// A TouchLog keeps track of all touch events of all touch points.
-class TouchLog {
- public:
- TouchLog() : next_trace_index_(0) {
- }
-
- void AddTouchPoint(const ui::TouchEvent& touch) {
- if (touch.type() == ui::ET_TOUCH_PRESSED)
- StartTrace(touch);
- AddToTrace(touch);
- }
-
- void Reset() {
- next_trace_index_ = 0;
- for (int i = 0; i < kMaxPaths; ++i)
- traces_[i].Reset();
- }
-
- scoped_ptr<ListValue> GetAsList() const {
- scoped_ptr<ListValue> list(new ListValue());
- for (int i = 0; i < kMaxPaths; ++i) {
- if (!traces_[i].log().empty())
- list->Append(traces_[i].GetAsList().release());
- }
- return list.Pass();
- }
-
- int GetTraceIndex(int touch_id) const {
- return touch_id_to_trace_index_.at(touch_id);
- }
-
- const TouchTrace* traces() const {
- return traces_;
- }
-
- private:
- void StartTrace(const ui::TouchEvent& touch) {
- // Find the first inactive spot; otherwise, overwrite the one
- // |next_trace_index_| is pointing to.
- int old_trace_index = next_trace_index_;
- do {
- if (!traces_[next_trace_index_].active())
- break;
- next_trace_index_ = (next_trace_index_ + 1) % kMaxPaths;
- } while (next_trace_index_ != old_trace_index);
- int touch_id = touch.touch_id();
- traces_[next_trace_index_].Reset();
- touch_id_to_trace_index_[touch_id] = next_trace_index_;
- next_trace_index_ = (next_trace_index_ + 1) % kMaxPaths;
- }
-
- void AddToTrace(const ui::TouchEvent& touch) {
- int touch_id = touch.touch_id();
- int trace_index = touch_id_to_trace_index_[touch_id];
- traces_[trace_index].AddTouchPoint(touch);
- }
-
- TouchTrace traces_[kMaxPaths];
- int next_trace_index_;
-
- std::map<int, int> touch_id_to_trace_index_;
-
- DISALLOW_COPY_AND_ASSIGN(TouchLog);
-};
-
-// TouchHudCanvas draws touch traces in |FULLSCREEN| and |REDUCED_SCALE| modes.
-class TouchHudCanvas : public views::View {
- public:
- explicit TouchHudCanvas(const TouchLog& touch_log)
- : touch_log_(touch_log),
- scale_(1) {
- SetPaintToLayer(true);
- SetFillsBoundsOpaquely(false);
-
- paint_.setStyle(SkPaint::kFill_Style);
- }
-
- virtual ~TouchHudCanvas() {}
-
- void SetScale(int scale) {
- if (scale_ == scale)
- return;
- scale_ = scale;
- gfx::Transform transform;
- transform.Scale(1. / scale_, 1. / scale_);
- layer()->SetTransform(transform);
- }
-
- int scale() const { return scale_; }
-
- void TouchPointAdded(int touch_id) {
- int trace_index = touch_log_.GetTraceIndex(touch_id);
- const TouchTrace& trace = touch_log_.traces()[trace_index];
- const TouchPointLog& point = trace.log().back();
- if (point.type == ui::ET_TOUCH_PRESSED)
- StartedTrace(trace_index);
- if (point.type != ui::ET_TOUCH_CANCELLED)
- AddedPointToTrace(trace_index);
- }
-
- void Clear() {
- for (int i = 0; i < kMaxPaths; ++i)
- paths_[i].reset();
-
- SchedulePaint();
- }
-
- private:
- void StartedTrace(int trace_index) {
- paths_[trace_index].reset();
- colors_[trace_index] = SkColorSetA(kColors[trace_index], kAlpha);
- }
-
- void AddedPointToTrace(int trace_index) {
- const TouchTrace& trace = touch_log_.traces()[trace_index];
- const TouchPointLog& point = trace.log().back();
- const gfx::Point& location = point.location;
- SkScalar x = SkIntToScalar(location.x());
- SkScalar y = SkIntToScalar(location.y());
- SkPoint last;
- if (!paths_[trace_index].getLastPt(&last) || x != last.x() ||
- y != last.y()) {
- paths_[trace_index].addCircle(x, y, SkIntToScalar(kPointRadius));
- SchedulePaint();
- }
- }
-
- // Overridden from views::View.
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- for (int i = 0; i < kMaxPaths; ++i) {
- if (paths_[i].countPoints() == 0)
- continue;
- paint_.setColor(colors_[i]);
- canvas->DrawPath(paths_[i], paint_);
- }
- }
-
- SkPaint paint_;
-
- const TouchLog& touch_log_;
- SkPath paths_[kMaxPaths];
- SkColor colors_[kMaxPaths];
-
- int scale_;
-
- DISALLOW_COPY_AND_ASSIGN(TouchHudCanvas);
-};
-
-TouchHudDebug::TouchHudDebug(aura::Window* initial_root)
- : TouchObserverHUD(initial_root),
- mode_(FULLSCREEN),
- touch_log_(new TouchLog()),
- canvas_(NULL),
- label_container_(NULL) {
- const gfx::Display& display =
- Shell::GetInstance()->display_manager()->GetDisplayForId(display_id());
-
- views::View* content = widget()->GetContentsView();
-
- canvas_ = new TouchHudCanvas(*touch_log_);
- content->AddChildView(canvas_);
-
- const gfx::Size& display_size = display.size();
- canvas_->SetSize(display_size);
-
- label_container_ = new views::View;
- label_container_->SetLayoutManager(new views::BoxLayout(
- views::BoxLayout::kVertical, 0, 0, 0));
-
- for (int i = 0; i < kMaxTouchPoints; ++i) {
- touch_labels_[i] = new views::Label;
- touch_labels_[i]->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255));
- touch_labels_[i]->SetShadowColors(SK_ColorWHITE,
- SK_ColorWHITE);
- touch_labels_[i]->SetShadowOffset(1, 1);
- label_container_->AddChildView(touch_labels_[i]);
- }
- label_container_->SetX(0);
- label_container_->SetY(display_size.height() / kReducedScale);
- label_container_->SetSize(label_container_->GetPreferredSize());
- label_container_->SetVisible(false);
- content->AddChildView(label_container_);
-}
-
-TouchHudDebug::~TouchHudDebug() {
-}
-
-// static
-scoped_ptr<DictionaryValue> TouchHudDebug::GetAllAsDictionary() {
- scoped_ptr<DictionaryValue> value(new DictionaryValue());
- aura::Window::Windows roots = Shell::GetInstance()->GetAllRootWindows();
- for (aura::Window::Windows::iterator iter = roots.begin();
- iter != roots.end(); ++iter) {
- internal::RootWindowController* controller = GetRootWindowController(*iter);
- internal::TouchHudDebug* hud = controller->touch_hud_debug();
- if (hud) {
- scoped_ptr<ListValue> list = hud->GetLogAsList();
- if (!list->empty())
- value->Set(base::Int64ToString(hud->display_id()), list.release());
- }
- }
- return value.Pass();
-}
-
-void TouchHudDebug::ChangeToNextMode() {
- switch (mode_) {
- case FULLSCREEN:
- SetMode(REDUCED_SCALE);
- break;
- case REDUCED_SCALE:
- SetMode(INVISIBLE);
- break;
- case INVISIBLE:
- SetMode(FULLSCREEN);
- break;
- }
-}
-
-scoped_ptr<ListValue> TouchHudDebug::GetLogAsList() const {
- return touch_log_->GetAsList();
-}
-
-void TouchHudDebug::Clear() {
- if (widget()->IsVisible()) {
- canvas_->Clear();
- for (int i = 0; i < kMaxTouchPoints; ++i)
- touch_labels_[i]->SetText(string16());
- label_container_->SetSize(label_container_->GetPreferredSize());
- }
-}
-
-void TouchHudDebug::SetMode(Mode mode) {
- if (mode_ == mode)
- return;
- mode_ = mode;
- switch (mode) {
- case FULLSCREEN:
- label_container_->SetVisible(false);
- canvas_->SetVisible(true);
- canvas_->SetScale(1);
- canvas_->SchedulePaint();
- widget()->Show();
- break;
- case REDUCED_SCALE:
- label_container_->SetVisible(true);
- canvas_->SetVisible(true);
- canvas_->SetScale(kReducedScale);
- canvas_->SchedulePaint();
- widget()->Show();
- break;
- case INVISIBLE:
- widget()->Hide();
- break;
- }
-}
-
-void TouchHudDebug::UpdateTouchPointLabel(int index) {
- int trace_index = touch_log_->GetTraceIndex(index);
- const TouchTrace& trace = touch_log_->traces()[trace_index];
- TouchTrace::const_reverse_iterator point = trace.log().rbegin();
- ui::EventType touch_status = point->type;
- float touch_radius = std::max(point->radius_x, point->radius_y);
- while (point != trace.log().rend() && point->type == ui::ET_TOUCH_CANCELLED)
- point++;
- DCHECK(point != trace.log().rend());
- gfx::Point touch_position = point->location;
-
- std::string string = base::StringPrintf("%2d: %s %s (%.4f)",
- index,
- GetTouchEventLabel(touch_status),
- touch_position.ToString().c_str(),
- touch_radius);
- touch_labels_[index]->SetText(UTF8ToUTF16(string));
-}
-
-void TouchHudDebug::OnTouchEvent(ui::TouchEvent* event) {
- if (event->touch_id() >= kMaxTouchPoints)
- return;
-
- touch_log_->AddTouchPoint(*event);
- canvas_->TouchPointAdded(event->touch_id());
- UpdateTouchPointLabel(event->touch_id());
- label_container_->SetSize(label_container_->GetPreferredSize());
-}
-
-void TouchHudDebug::OnDisplayBoundsChanged(const gfx::Display& display) {
- TouchObserverHUD::OnDisplayBoundsChanged(display);
-
- if (display.id() != display_id())
- return;
- const gfx::Size& size = display.size();
- canvas_->SetSize(size);
- label_container_->SetY(size.height() / kReducedScale);
-}
-
-void TouchHudDebug::SetHudForRootWindowController(
- RootWindowController* controller) {
- controller->set_touch_hud_debug(this);
-}
-
-void TouchHudDebug::UnsetHudForRootWindowController(
- RootWindowController* controller) {
- controller->set_touch_hud_debug(NULL);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/touch/touch_hud_debug.h b/chromium/ash/touch/touch_hud_debug.h
deleted file mode 100644
index dbda29dbdfb..00000000000
--- a/chromium/ash/touch/touch_hud_debug.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_TOUCH_TOUCH_HUD_DEBUG_H_
-#define ASH_TOUCH_TOUCH_HUD_DEBUG_H_
-
-#include <map>
-
-#include "ash/ash_export.h"
-#include "ash/touch/touch_observer_hud.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/values.h"
-
-namespace views {
-class Label;
-class View;
-}
-
-namespace ash {
-namespace internal {
-
-class TouchHudCanvas;
-class TouchLog;
-
-// A heads-up display to show touch traces on the screen and log touch events.
-// As a derivative of TouchObserverHUD, objects of this class manage their own
-// lifetime.
-class ASH_EXPORT TouchHudDebug : public TouchObserverHUD {
- public:
- enum Mode {
- FULLSCREEN,
- REDUCED_SCALE,
- INVISIBLE,
- };
-
- explicit TouchHudDebug(aura::Window* initial_root);
-
- // Returns the log of touch events for all displays as a dictionary mapping id
- // of each display to its touch log.
- static scoped_ptr<DictionaryValue> GetAllAsDictionary();
-
- // Changes the display mode (e.g. scale, visibility). Calling this repeatedly
- // cycles between a fixed number of display modes.
- void ChangeToNextMode();
-
- // Returns log of touch events as a list value. Each item in the list is a
- // trace of one touch point.
- scoped_ptr<ListValue> GetLogAsList() const;
-
- Mode mode() const { return mode_; }
-
- // Overriden from TouchObserverHUD.
- virtual void Clear() OVERRIDE;
-
- private:
- virtual ~TouchHudDebug();
-
- void SetMode(Mode mode);
-
- void UpdateTouchPointLabel(int index);
-
- // Overriden from TouchObserverHUD.
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE;
- virtual void SetHudForRootWindowController(
- RootWindowController* controller) OVERRIDE;
- virtual void UnsetHudForRootWindowController(
- RootWindowController* controller) OVERRIDE;
-
- static const int kMaxTouchPoints = 32;
-
- Mode mode_;
-
- scoped_ptr<TouchLog> touch_log_;
-
- TouchHudCanvas* canvas_;
- views::View* label_container_;
- views::Label* touch_labels_[kMaxTouchPoints];
-
- DISALLOW_COPY_AND_ASSIGN(TouchHudDebug);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_TOUCH_TOUCH_HUD_DEBUG_H_
diff --git a/chromium/ash/touch/touch_hud_projection.cc b/chromium/ash/touch/touch_hud_projection.cc
deleted file mode 100644
index 615a3721514..00000000000
--- a/chromium/ash/touch/touch_hud_projection.cc
+++ /dev/null
@@ -1,189 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/touch/touch_hud_projection.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "third_party/skia/include/effects/SkGradientShader.h"
-#include "ui/events/event.h"
-#include "ui/gfx/animation/animation_delegate.h"
-#include "ui/gfx/animation/linear_animation.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/size.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-const int kPointRadius = 20;
-const SkColor kProjectionFillColor = SkColorSetRGB(0xF5, 0xF5, 0xDC);
-const SkColor kProjectionStrokeColor = SK_ColorGRAY;
-const int kProjectionAlpha = 0xB0;
-const int kFadeoutDurationInMs = 250;
-const int kFadeoutFrameRate = 60;
-
-// TouchPointView draws a single touch point. This object manages its own
-// lifetime and deletes itself upon fade-out completion or whenever |Remove()|
-// is explicitly called.
-class TouchPointView : public views::View,
- public gfx::AnimationDelegate,
- public views::WidgetObserver {
- public:
- explicit TouchPointView(views::Widget* parent_widget)
- : circle_center_(kPointRadius + 1, kPointRadius + 1),
- gradient_center_(SkPoint::Make(kPointRadius + 1,
- kPointRadius + 1)) {
- SetPaintToLayer(true);
- SetFillsBoundsOpaquely(false);
-
- SetSize(gfx::Size(2 * kPointRadius + 2, 2 * kPointRadius + 2));
-
- stroke_paint_.setStyle(SkPaint::kStroke_Style);
- stroke_paint_.setColor(kProjectionStrokeColor);
-
- gradient_colors_[0] = kProjectionFillColor;
- gradient_colors_[1] = kProjectionStrokeColor;
-
- gradient_pos_[0] = SkFloatToScalar(0.9f);
- gradient_pos_[1] = SkFloatToScalar(1.0f);
-
- parent_widget->GetContentsView()->AddChildView(this);
-
- parent_widget->AddObserver(this);
- }
-
- void UpdateTouch(const ui::TouchEvent& touch) {
- if (touch.type() == ui::ET_TOUCH_RELEASED ||
- touch.type() == ui::ET_TOUCH_CANCELLED) {
- fadeout_.reset(new gfx::LinearAnimation(kFadeoutDurationInMs,
- kFadeoutFrameRate,
- this));
- fadeout_->Start();
- } else {
- SetX(parent()->GetMirroredXInView(touch.root_location().x()) -
- kPointRadius - 1);
- SetY(touch.root_location().y() - kPointRadius - 1);
- }
- }
-
- void Remove() {
- delete this;
- }
-
- private:
- virtual ~TouchPointView() {
- GetWidget()->RemoveObserver(this);
- parent()->RemoveChildView(this);
- }
-
- // Overridden from views::View.
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- int alpha = kProjectionAlpha;
- if (fadeout_)
- alpha = static_cast<int>(fadeout_->CurrentValueBetween(alpha, 0));
- fill_paint_.setAlpha(alpha);
- stroke_paint_.setAlpha(alpha);
- SkShader* shader = SkGradientShader::CreateRadial(
- gradient_center_,
- SkIntToScalar(kPointRadius),
- gradient_colors_,
- gradient_pos_,
- arraysize(gradient_colors_),
- SkShader::kMirror_TileMode,
- NULL);
- fill_paint_.setShader(shader);
- shader->unref();
- canvas->DrawCircle(circle_center_, SkIntToScalar(kPointRadius),
- fill_paint_);
- canvas->DrawCircle(circle_center_, SkIntToScalar(kPointRadius),
- stroke_paint_);
- }
-
- // Overridden from gfx::AnimationDelegate.
- virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE {
- DCHECK_EQ(fadeout_.get(), animation);
- delete this;
- }
-
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE {
- DCHECK_EQ(fadeout_.get(), animation);
- SchedulePaint();
- }
-
- virtual void AnimationCanceled(const gfx::Animation* animation) OVERRIDE {
- AnimationEnded(animation);
- }
-
- // Overridden from views::WidgetObserver.
- virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE {
- if (fadeout_)
- fadeout_->Stop();
- else
- Remove();
- }
-
- const gfx::Point circle_center_;
- const SkPoint gradient_center_;
-
- SkPaint fill_paint_;
- SkPaint stroke_paint_;
- SkColor gradient_colors_[2];
- SkScalar gradient_pos_[2];
-
- scoped_ptr<gfx::Animation> fadeout_;
-
- DISALLOW_COPY_AND_ASSIGN(TouchPointView);
-};
-
-TouchHudProjection::TouchHudProjection(aura::Window* initial_root)
- : TouchObserverHUD(initial_root) {
-}
-
-TouchHudProjection::~TouchHudProjection() {
-}
-
-void TouchHudProjection::Clear() {
- for (std::map<int, TouchPointView*>::iterator iter = points_.begin();
- iter != points_.end(); iter++)
- iter->second->Remove();
- points_.clear();
-}
-
-void TouchHudProjection::OnTouchEvent(ui::TouchEvent* event) {
- if (event->type() == ui::ET_TOUCH_PRESSED) {
- TouchPointView* point = new TouchPointView(widget());
- point->UpdateTouch(*event);
- std::pair<std::map<int, TouchPointView*>::iterator, bool> result =
- points_.insert(std::make_pair(event->touch_id(), point));
- // If a |TouchPointView| is already mapped to the touch id, remove it and
- // replace it with the new one.
- if (!result.second) {
- result.first->second->Remove();
- result.first->second = point;
- }
- } else {
- std::map<int, TouchPointView*>::iterator iter =
- points_.find(event->touch_id());
- if (iter != points_.end()) {
- iter->second->UpdateTouch(*event);
- if (event->type() == ui::ET_TOUCH_RELEASED ||
- event->type() == ui::ET_TOUCH_CANCELLED)
- points_.erase(iter);
- }
- }
-}
-
-void TouchHudProjection::SetHudForRootWindowController(
- RootWindowController* controller) {
- controller->set_touch_hud_projection(this);
-}
-
-void TouchHudProjection::UnsetHudForRootWindowController(
- RootWindowController* controller) {
- controller->set_touch_hud_projection(NULL);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/touch/touch_hud_projection.h b/chromium/ash/touch/touch_hud_projection.h
deleted file mode 100644
index 59e86c8de1b..00000000000
--- a/chromium/ash/touch/touch_hud_projection.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_TOUCH_TOUCH_HUD_PROJECTION_H_
-#define ASH_TOUCH_TOUCH_HUD_PROJECTION_H_
-
-#include <map>
-
-#include "ash/touch/touch_observer_hud.h"
-
-namespace ash {
-namespace internal {
-
-class TouchPointView;
-
-// A heads-up display to show active touch points on the screen. As a derivative
-// of TouchObserverHUD, objects of this class manage their own lifetime.
-class TouchHudProjection : public TouchObserverHUD {
- public:
- explicit TouchHudProjection(aura::Window* initial_root);
-
- // Overriden from TouchObserverHUD.
- virtual void Clear() OVERRIDE;
-
- private:
- friend class TouchHudProjectionTest;
-
- virtual ~TouchHudProjection();
-
- // Overriden from TouchObserverHUD.
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual void SetHudForRootWindowController(
- RootWindowController* controller) OVERRIDE;
- virtual void UnsetHudForRootWindowController(
- RootWindowController* controller) OVERRIDE;
-
- std::map<int, TouchPointView*> points_;
-
- DISALLOW_COPY_AND_ASSIGN(TouchHudProjection);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_TOUCH_TOUCH_HUD_PROJECTION_H_
diff --git a/chromium/ash/touch/touch_observer_hud.cc b/chromium/ash/touch/touch_observer_hud.cc
deleted file mode 100644
index ff66e2c8cc7..00000000000
--- a/chromium/ash/touch/touch_observer_hud.cc
+++ /dev/null
@@ -1,150 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/touch/touch_observer_hud.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/root_window_settings.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ui/aura/root_window.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/screen.h"
-#include "ui/gfx/size.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-TouchObserverHUD::TouchObserverHUD(aura::Window* initial_root)
- : display_id_(GetRootWindowSettings(initial_root)->display_id),
- root_window_(initial_root),
- widget_(NULL) {
- const gfx::Display& display =
- Shell::GetInstance()->display_manager()->GetDisplayForId(display_id_);
-
- views::View* content = new views::View;
-
- const gfx::Size& display_size = display.size();
- content->SetSize(display_size);
-
- widget_ = new views::Widget();
- views::Widget::InitParams
- params(views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- params.can_activate = false;
- params.accept_events = false;
- params.bounds = display.bounds();
- params.parent = Shell::GetContainer(
- root_window_,
- internal::kShellWindowId_OverlayContainer);
- widget_->Init(params);
- widget_->SetContentsView(content);
- widget_->StackAtTop();
- widget_->Show();
-
- widget_->AddObserver(this);
-
- // Observe changes in display size and mode to update touch HUD.
- Shell::GetScreen()->AddObserver(this);
-#if defined(OS_CHROMEOS)
- Shell::GetInstance()->output_configurator()->AddObserver(this);
-#endif // defined(OS_CHROMEOS)
-
- Shell::GetInstance()->display_controller()->AddObserver(this);
- root_window_->AddPreTargetHandler(this);
-}
-
-TouchObserverHUD::~TouchObserverHUD() {
- Shell::GetInstance()->display_controller()->RemoveObserver(this);
-
-#if defined(OS_CHROMEOS)
- Shell::GetInstance()->output_configurator()->RemoveObserver(this);
-#endif // defined(OS_CHROMEOS)
- Shell::GetScreen()->RemoveObserver(this);
-
- widget_->RemoveObserver(this);
-}
-
-void TouchObserverHUD::Clear() {
-}
-
-void TouchObserverHUD::Remove() {
- root_window_->RemovePreTargetHandler(this);
-
- RootWindowController* controller = GetRootWindowController(root_window_);
- UnsetHudForRootWindowController(controller);
-
- widget_->CloseNow();
-}
-
-void TouchObserverHUD::OnTouchEvent(ui::TouchEvent* /*event*/) {
-}
-
-void TouchObserverHUD::OnWidgetDestroying(views::Widget* widget) {
- DCHECK_EQ(widget, widget_);
- delete this;
-}
-
-void TouchObserverHUD::OnDisplayBoundsChanged(const gfx::Display& display) {
- if (display.id() != display_id_)
- return;
- widget_->SetSize(display.size());
-}
-
-void TouchObserverHUD::OnDisplayAdded(const gfx::Display& new_display) {}
-
-void TouchObserverHUD::OnDisplayRemoved(const gfx::Display& old_display) {
- if (old_display.id() != display_id_)
- return;
- widget_->CloseNow();
-}
-
-#if defined(OS_CHROMEOS)
-void TouchObserverHUD::OnDisplayModeChanged(
- const std::vector<chromeos::OutputConfigurator::OutputSnapshot>& outputs) {
- // Clear touch HUD for any change in display mode (single, dual extended, dual
- // mirrored, ...).
- Clear();
-}
-#endif // defined(OS_CHROMEOS)
-
-void TouchObserverHUD::OnDisplayConfigurationChanging() {
- if (!root_window_)
- return;
-
- root_window_->RemovePreTargetHandler(this);
-
- RootWindowController* controller = GetRootWindowController(root_window_);
- UnsetHudForRootWindowController(controller);
-
- views::Widget::ReparentNativeView(
- widget_->GetNativeView(),
- Shell::GetContainer(root_window_,
- internal::kShellWindowId_UnparentedControlContainer));
-
- root_window_ = NULL;
-}
-
-void TouchObserverHUD::OnDisplayConfigurationChanged() {
- if (root_window_)
- return;
-
- root_window_ = Shell::GetInstance()->display_controller()->
- GetRootWindowForDisplayId(display_id_);
-
- views::Widget::ReparentNativeView(
- widget_->GetNativeView(),
- Shell::GetContainer(root_window_,
- internal::kShellWindowId_OverlayContainer));
-
- RootWindowController* controller = GetRootWindowController(root_window_);
- SetHudForRootWindowController(controller);
-
- root_window_->AddPreTargetHandler(this);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/touch/touch_observer_hud.h b/chromium/ash/touch/touch_observer_hud.h
deleted file mode 100644
index 4e74e760727..00000000000
--- a/chromium/ash/touch/touch_observer_hud.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_TOUCH_TOUCH_OBSERVER_HUD_H_
-#define ASH_TOUCH_TOUCH_OBSERVER_HUD_H_
-
-#include "ash/ash_export.h"
-#include "ash/display/display_controller.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/display_observer.h"
-#include "ui/views/widget/widget_observer.h"
-
-#if defined(OS_CHROMEOS)
-#include "chromeos/display/output_configurator.h"
-#endif // defined(OS_CHROMEOS)
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-namespace internal {
-
-// An event filter which handles system level gesture events. Objects of this
-// class manage their own lifetime.
-class ASH_EXPORT TouchObserverHUD
- : public ui::EventHandler,
- public views::WidgetObserver,
- public gfx::DisplayObserver,
-#if defined(OS_CHROMEOS)
- public chromeos::OutputConfigurator::Observer,
-#endif // defined(OS_CHROMEOS)
- public DisplayController::Observer {
- public:
- // Called to clear touch points and traces from the screen. Default
- // implementation does nothing. Sub-classes should implement appropriately.
- virtual void Clear();
-
- // Removes the HUD from the screen.
- void Remove();
-
- int64 display_id() const { return display_id_; }
-
- protected:
- explicit TouchObserverHUD(aura::Window* initial_root);
-
- virtual ~TouchObserverHUD();
-
- virtual void SetHudForRootWindowController(
- RootWindowController* controller) = 0;
- virtual void UnsetHudForRootWindowController(
- RootWindowController* controller) = 0;
-
- views::Widget* widget() { return widget_; }
-
- // Overriden from ui::EventHandler.
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
-
- // Overridden from views::WidgetObserver.
- virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
-
- // Overridden from gfx::DisplayObserver.
- virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE;
- virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE;
- virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE;
-
-#if defined(OS_CHROMEOS)
- // Overriden from chromeos::OutputConfigurator::Observer.
- virtual void OnDisplayModeChanged(
- const std::vector<chromeos::OutputConfigurator::OutputSnapshot>& outputs)
- OVERRIDE;
-#endif // defined(OS_CHROMEOS)
-
- // Overriden form DisplayController::Observer.
- virtual void OnDisplayConfigurationChanging() OVERRIDE;
- virtual void OnDisplayConfigurationChanged() OVERRIDE;
-
- private:
- friend class TouchHudTestBase;
-
- const int64 display_id_;
- aura::Window* root_window_;
-
- views::Widget* widget_;
-
- DISALLOW_COPY_AND_ASSIGN(TouchObserverHUD);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_TOUCH_TOUCH_OBSERVER_HUD_H_
diff --git a/chromium/ash/touch/touch_observer_hud_unittest.cc b/chromium/ash/touch/touch_observer_hud_unittest.cc
deleted file mode 100644
index 90328a85667..00000000000
--- a/chromium/ash/touch/touch_observer_hud_unittest.cc
+++ /dev/null
@@ -1,597 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/touch/touch_observer_hud.h"
-
-#include "ash/ash_switches.h"
-#include "ash/display/display_manager.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/display_manager_test_api.h"
-#include "ash/touch/touch_hud_debug.h"
-#include "ash/touch/touch_hud_projection.h"
-#include "base/command_line.h"
-#include "base/format_macros.h"
-#include "base/strings/stringprintf.h"
-#include "ui/aura/window.h"
-
-namespace ash {
-namespace internal {
-
-class TouchHudTestBase : public test::AshTestBase {
- public:
- TouchHudTestBase() {}
- virtual ~TouchHudTestBase() {}
-
- virtual void SetUp() OVERRIDE {
- test::AshTestBase::SetUp();
-
- // Initialize display infos. They should be initialized after Ash
- // environment is set up, i.e., after test::AshTestBase::SetUp().
- internal_display_id_ = test::DisplayManagerTestApi(GetDisplayManager()).
- SetFirstDisplayAsInternalDisplay();
- external_display_id_ = 10;
- mirrored_display_id_ = 11;
-
- internal_display_info_ =
- CreateDisplayInfo(internal_display_id_, gfx::Rect(0, 0, 500, 500));
- external_display_info_ =
- CreateDisplayInfo(external_display_id_, gfx::Rect(1, 1, 100, 100));
- mirrored_display_info_ =
- CreateDisplayInfo(mirrored_display_id_, gfx::Rect(0, 0, 100, 100));
- }
-
- gfx::Display GetPrimaryDisplay() {
- return Shell::GetScreen()->GetPrimaryDisplay();
- }
-
- const gfx::Display& GetSecondaryDisplay() {
- return ScreenAsh::GetSecondaryDisplay();
- }
-
- void SetupSingleDisplay() {
- display_info_list_.clear();
- display_info_list_.push_back(internal_display_info_);
- GetDisplayManager()->OnNativeDisplaysChanged(display_info_list_);
- }
-
- void SetupDualDisplays() {
- display_info_list_.clear();
- display_info_list_.push_back(internal_display_info_);
- display_info_list_.push_back(external_display_info_);
- GetDisplayManager()->OnNativeDisplaysChanged(display_info_list_);
- }
-
- void SetInternalAsPrimary() {
- const gfx::Display& internal_display =
- GetDisplayManager()->GetDisplayForId(internal_display_id_);
- GetDisplayController()->SetPrimaryDisplay(internal_display);
- }
-
- void SetExternalAsPrimary() {
- const gfx::Display& external_display =
- GetDisplayManager()->GetDisplayForId(external_display_id_);
- GetDisplayController()->SetPrimaryDisplay(external_display);
- }
-
- void MirrorDisplays() {
- DCHECK_EQ(2U, display_info_list_.size());
- DCHECK_EQ(internal_display_id_, display_info_list_[0].id());
- DCHECK_EQ(external_display_id_, display_info_list_[1].id());
- display_info_list_[1] = mirrored_display_info_;
- GetDisplayManager()->OnNativeDisplaysChanged(display_info_list_);
- }
-
- void UnmirrorDisplays() {
- DCHECK_EQ(2U, display_info_list_.size());
- DCHECK_EQ(internal_display_id_, display_info_list_[0].id());
- DCHECK_EQ(mirrored_display_id_, display_info_list_[1].id());
- display_info_list_[1] = external_display_info_;
- GetDisplayManager()->OnNativeDisplaysChanged(display_info_list_);
- }
-
- void RemoveInternalDisplay() {
- DCHECK_LT(0U, display_info_list_.size());
- DCHECK_EQ(internal_display_id_, display_info_list_[0].id());
- display_info_list_.erase(display_info_list_.begin());
- GetDisplayManager()->OnNativeDisplaysChanged(display_info_list_);
- }
-
- void RemoveExternalDisplay() {
- DCHECK_EQ(2U, display_info_list_.size());
- display_info_list_.pop_back();
- GetDisplayManager()->OnNativeDisplaysChanged(display_info_list_);
- }
-
- void AddInternalDisplay() {
- DCHECK_EQ(0U, display_info_list_.size());
- display_info_list_.push_back(internal_display_info_);
- GetDisplayManager()->OnNativeDisplaysChanged(display_info_list_);
- }
-
- void AddExternalDisplay() {
- DCHECK_EQ(1U, display_info_list_.size());
- display_info_list_.push_back(external_display_info_);
- GetDisplayManager()->OnNativeDisplaysChanged(display_info_list_);
- }
-
- int64 internal_display_id() const {
- return internal_display_id_;
- }
-
- int64 external_display_id() const {
- return external_display_id_;
- }
-
- protected:
- DisplayManager* GetDisplayManager() {
- return Shell::GetInstance()->display_manager();
- }
-
- DisplayController* GetDisplayController() {
- return Shell::GetInstance()->display_controller();
- }
-
- const gfx::Display& GetInternalDisplay() {
- return GetDisplayManager()->GetDisplayForId(internal_display_id_);
- }
-
- const gfx::Display& GetExternalDisplay() {
- return GetDisplayManager()->GetDisplayForId(external_display_id_);
- }
-
- aura::Window* GetInternalRootWindow() {
- return GetDisplayController()->GetRootWindowForDisplayId(
- internal_display_id_);
- }
-
- aura::Window* GetExternalRootWindow() {
- return GetDisplayController()->GetRootWindowForDisplayId(
- external_display_id_);
- }
-
- aura::Window* GetPrimaryRootWindow() {
- const gfx::Display& display = GetPrimaryDisplay();
- return GetDisplayController()->GetRootWindowForDisplayId(display.id());
- }
-
- aura::Window* GetSecondaryRootWindow() {
- const gfx::Display& display = GetSecondaryDisplay();
- return GetDisplayController()->GetRootWindowForDisplayId(display.id());
- }
-
- internal::RootWindowController* GetInternalRootController() {
- aura::Window* root = GetInternalRootWindow();
- return GetRootWindowController(root);
- }
-
- internal::RootWindowController* GetExternalRootController() {
- aura::Window* root = GetExternalRootWindow();
- return GetRootWindowController(root);
- }
-
- internal::RootWindowController* GetPrimaryRootController() {
- aura::Window* root = GetPrimaryRootWindow();
- return GetRootWindowController(root);
- }
-
- internal::RootWindowController* GetSecondaryRootController() {
- aura::Window* root = GetSecondaryRootWindow();
- return GetRootWindowController(root);
- }
-
- DisplayInfo CreateDisplayInfo(int64 id, const gfx::Rect& bounds) {
- DisplayInfo info(id, base::StringPrintf("x-%" PRId64, id), false);
- info.SetBounds(bounds);
- return info;
- }
-
- aura::Window* GetRootWindowForTouchHud(internal::TouchObserverHUD* hud) {
- return hud->root_window_;
- }
-
- views::Widget* GetWidgetForTouchHud(internal::TouchObserverHUD* hud) {
- return hud->widget_;
- }
-
- int64 internal_display_id_;
- int64 external_display_id_;
- int64 mirrored_display_id_;
- DisplayInfo internal_display_info_;
- DisplayInfo external_display_info_;
- DisplayInfo mirrored_display_info_;
-
- std::vector<DisplayInfo> display_info_list_;
-
- DISALLOW_COPY_AND_ASSIGN(TouchHudTestBase);
-};
-
-class TouchHudDebugTest : public TouchHudTestBase {
- public:
- TouchHudDebugTest() {}
- virtual ~TouchHudDebugTest() {}
-
- virtual void SetUp() OVERRIDE {
- // Add ash-touch-hud flag to enable debug touch HUD. This flag should be set
- // before Ash environment is set up, i.e., before TouchHudTestBase::SetUp().
- CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshTouchHud);
-
- TouchHudTestBase::SetUp();
- }
-
- void CheckInternalDisplay() {
- EXPECT_NE(static_cast<internal::TouchObserverHUD*>(NULL),
- GetInternalTouchHudDebug());
- EXPECT_EQ(internal_display_id(), GetInternalTouchHudDebug()->display_id());
- EXPECT_EQ(GetInternalRootWindow(),
- GetRootWindowForTouchHud(GetInternalTouchHudDebug()));
- EXPECT_EQ(GetInternalRootWindow(),
- GetWidgetForTouchHud(GetInternalTouchHudDebug())->
- GetNativeView()->GetRootWindow());
- EXPECT_EQ(GetInternalDisplay().size(),
- GetWidgetForTouchHud(GetInternalTouchHudDebug())->
- GetWindowBoundsInScreen().size());
- }
-
- void CheckExternalDisplay() {
- EXPECT_NE(static_cast<internal::TouchHudDebug*>(NULL),
- GetExternalTouchHudDebug());
- EXPECT_EQ(external_display_id(), GetExternalTouchHudDebug()->display_id());
- EXPECT_EQ(GetExternalRootWindow(),
- GetRootWindowForTouchHud(GetExternalTouchHudDebug()));
- EXPECT_EQ(GetExternalRootWindow(),
- GetWidgetForTouchHud(GetExternalTouchHudDebug())->
- GetNativeView()->GetRootWindow());
- EXPECT_EQ(GetExternalDisplay().size(),
- GetWidgetForTouchHud(GetExternalTouchHudDebug())->
- GetWindowBoundsInScreen().size());
- }
-
- private:
- internal::TouchHudDebug* GetInternalTouchHudDebug() {
- return GetInternalRootController()->touch_hud_debug();
- }
-
- internal::TouchHudDebug* GetExternalTouchHudDebug() {
- return GetExternalRootController()->touch_hud_debug();
- }
-
- internal::TouchHudDebug* GetPrimaryTouchHudDebug() {
- return GetPrimaryRootController()->touch_hud_debug();
- }
-
- internal::TouchHudDebug* GetSecondaryTouchHudDebug() {
- return GetSecondaryRootController()->touch_hud_debug();
- }
-
- DISALLOW_COPY_AND_ASSIGN(TouchHudDebugTest);
-};
-
-class TouchHudProjectionTest : public TouchHudTestBase {
- public:
- TouchHudProjectionTest() {}
- virtual ~TouchHudProjectionTest() {}
-
- void EnableTouchHudProjection() {
- Shell::GetInstance()->SetTouchHudProjectionEnabled(true);
- }
-
- void DisableTouchHudProjection() {
- Shell::GetInstance()->SetTouchHudProjectionEnabled(false);
- }
-
- internal::TouchHudProjection* GetInternalTouchHudProjection() {
- return GetInternalRootController()->touch_hud_projection();
- }
-
- int GetInternalTouchPointsCount() {
- return GetInternalTouchHudProjection()->points_.size();
- }
-
- void SendTouchEventToInternalHud(ui::EventType type,
- const gfx::Point& location,
- int touch_id) {
- ui::TouchEvent event(type, location, touch_id, event_time);
- GetInternalTouchHudProjection()->OnTouchEvent(&event);
-
- // Advance time for next event.
- event_time += base::TimeDelta::FromMilliseconds(100);
- }
-
- private:
- base::TimeDelta event_time;
-
- DISALLOW_COPY_AND_ASSIGN(TouchHudProjectionTest);
-};
-
-// Checks if debug touch HUD is correctly initialized for a single display.
-TEST_F(TouchHudDebugTest, SingleDisplay) {
- // Setup a single display setting.
- SetupSingleDisplay();
-
- // Check if touch HUD is set correctly and associated with appropriate
- // display.
- CheckInternalDisplay();
-}
-
-// Checks if debug touch HUDs are correctly initialized for two displays.
-TEST_F(TouchHudDebugTest, DualDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- // Setup a dual display setting.
- SetupDualDisplays();
-
- // Check if touch HUDs are set correctly and associated with appropriate
- // displays.
- CheckInternalDisplay();
- CheckExternalDisplay();
-}
-
-// Checks if debug touch HUDs are correctly handled when primary display is
-// changed.
-TEST_F(TouchHudDebugTest, SwapPrimaryDisplay) {
- if (!SupportsMultipleDisplays())
- return;
-
- // Setup a dual display setting.
- SetupDualDisplays();
-
- // Set the primary display to the external one.
- SetExternalAsPrimary();
-
- // Check if displays' touch HUDs are not swapped as root windows are.
- EXPECT_EQ(external_display_id(), GetPrimaryDisplay().id());
- EXPECT_EQ(internal_display_id(), GetSecondaryDisplay().id());
- CheckInternalDisplay();
- CheckExternalDisplay();
-
- // Set the primary display back to the internal one.
- SetInternalAsPrimary();
-
- // Check if displays' touch HUDs are not swapped back as root windows are.
- EXPECT_EQ(internal_display_id(), GetPrimaryDisplay().id());
- EXPECT_EQ(external_display_id(), GetSecondaryDisplay().id());
- CheckInternalDisplay();
- CheckExternalDisplay();
-}
-
-// Checks if debug touch HUDs are correctly handled when displays are mirrored.
-TEST_F(TouchHudDebugTest, MirrorDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- // Setup a dual display setting.
- SetupDualDisplays();
-
- // Mirror displays.
- MirrorDisplays();
-
- // Check if the internal display is intact.
- EXPECT_EQ(internal_display_id(), GetPrimaryDisplay().id());
- CheckInternalDisplay();
-
- // Unmirror displays.
- UnmirrorDisplays();
-
- // Check if external display is added back correctly.
- EXPECT_EQ(internal_display_id(), GetPrimaryDisplay().id());
- EXPECT_EQ(external_display_id(), GetSecondaryDisplay().id());
- CheckInternalDisplay();
- CheckExternalDisplay();
-}
-
-// Checks if debug touch HUDs are correctly handled when displays are mirrored
-// after setting the external display as the primary one.
-TEST_F(TouchHudDebugTest, SwapPrimaryThenMirrorDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- // Setup a dual display setting.
- SetupDualDisplays();
-
- // Set the primary display to the external one.
- SetExternalAsPrimary();
-
- // Mirror displays.
- MirrorDisplays();
-
- // Check if the internal display is set as the primary one.
- EXPECT_EQ(internal_display_id(), GetPrimaryDisplay().id());
- CheckInternalDisplay();
-
- // Unmirror displays.
- UnmirrorDisplays();
-
- // Check if the external display is added back as the primary display and
- // touch HUDs are set correctly.
- EXPECT_EQ(external_display_id(), GetPrimaryDisplay().id());
- EXPECT_EQ(internal_display_id(), GetSecondaryDisplay().id());
- CheckInternalDisplay();
- CheckExternalDisplay();
-}
-
-// Checks if debug touch HUDs are correctly handled when the external display,
-// which is the secondary one, is removed.
-TEST_F(TouchHudDebugTest, RemoveSecondaryDisplay) {
- if (!SupportsMultipleDisplays())
- return;
-
- // Setup a dual display setting.
- SetupDualDisplays();
-
- // Remove external display which is the secondary one.
- RemoveExternalDisplay();
-
- // Check if the internal display is intact.
- EXPECT_EQ(internal_display_id(), GetPrimaryDisplay().id());
- CheckInternalDisplay();
-
- // Add external display back.
- AddExternalDisplay();
-
- // Check if displays' touch HUDs are set correctly.
- EXPECT_EQ(internal_display_id(), GetPrimaryDisplay().id());
- EXPECT_EQ(external_display_id(), GetSecondaryDisplay().id());
- CheckInternalDisplay();
- CheckExternalDisplay();
-}
-
-// Checks if debug touch HUDs are correctly handled when the external display,
-// which is set as the primary display, is removed.
-TEST_F(TouchHudDebugTest, RemovePrimaryDisplay) {
- if (!SupportsMultipleDisplays())
- return;
-
- // Setup a dual display setting.
- SetupDualDisplays();
-
- // Set the primary display to the external one.
- SetExternalAsPrimary();
-
- // Remove the external display which is the primary display.
- RemoveExternalDisplay();
-
- // Check if the internal display is set as the primary one.
- EXPECT_EQ(internal_display_id(), GetPrimaryDisplay().id());
- CheckInternalDisplay();
-
- // Add the external display back.
- AddExternalDisplay();
-
- // Check if the external display is set as primary and touch HUDs are set
- // correctly.
- EXPECT_EQ(external_display_id(), GetPrimaryDisplay().id());
- EXPECT_EQ(internal_display_id(), GetSecondaryDisplay().id());
- CheckInternalDisplay();
- CheckExternalDisplay();
-}
-
-// Checks if debug touch HUDs are correctly handled when all displays are
-// removed.
-TEST_F(TouchHudDebugTest, Headless) {
- if (!SupportsMultipleDisplays())
- return;
-
- // Setup a single display setting.
- SetupSingleDisplay();
-
- // Remove the only display which is the internal one.
- RemoveInternalDisplay();
-
- // Add the internal display back.
- AddInternalDisplay();
-
- // Check if the display's touch HUD is set correctly.
- EXPECT_EQ(internal_display_id(), GetPrimaryDisplay().id());
- CheckInternalDisplay();
-}
-
-// Checks projection touch HUD with a sequence of touch-pressed, touch-moved,
-// and touch-released events.
-TEST_F(TouchHudProjectionTest, TouchMoveRelease) {
- SetupSingleDisplay();
- EXPECT_EQ(NULL, GetInternalTouchHudProjection());
-
- EnableTouchHudProjection();
- EXPECT_NE(static_cast<internal::TouchHudProjection*>(NULL),
- GetInternalTouchHudProjection());
- EXPECT_EQ(0, GetInternalTouchPointsCount());
-
- SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1);
- EXPECT_EQ(1, GetInternalTouchPointsCount());
-
- SendTouchEventToInternalHud(ui::ET_TOUCH_MOVED, gfx::Point(10, 20), 1);
- EXPECT_EQ(1, GetInternalTouchPointsCount());
-
- SendTouchEventToInternalHud(ui::ET_TOUCH_RELEASED, gfx::Point(10, 20), 1);
- EXPECT_EQ(0, GetInternalTouchPointsCount());
-
- // Disabling projection touch HUD shoud remove it without crashing.
- DisableTouchHudProjection();
- EXPECT_EQ(NULL, GetInternalTouchHudProjection());
-}
-
-// Checks projection touch HUD with a sequence of touch-pressed, touch-moved,
-// and touch-cancelled events.
-TEST_F(TouchHudProjectionTest, TouchMoveCancel) {
- SetupSingleDisplay();
- EXPECT_EQ(NULL, GetInternalTouchHudProjection());
-
- EnableTouchHudProjection();
- EXPECT_NE(static_cast<internal::TouchHudProjection*>(NULL),
- GetInternalTouchHudProjection());
- EXPECT_EQ(0, GetInternalTouchPointsCount());
-
- SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1);
- EXPECT_EQ(1, GetInternalTouchPointsCount());
-
- SendTouchEventToInternalHud(ui::ET_TOUCH_MOVED, gfx::Point(10, 20), 1);
- EXPECT_EQ(1, GetInternalTouchPointsCount());
-
- SendTouchEventToInternalHud(ui::ET_TOUCH_CANCELLED, gfx::Point(10, 20), 1);
- EXPECT_EQ(0, GetInternalTouchPointsCount());
-
- // Disabling projection touch HUD shoud remove it without crashing.
- DisableTouchHudProjection();
- EXPECT_EQ(NULL, GetInternalTouchHudProjection());
-}
-
-// Checks projection touch HUD with two simultaneous touches.
-TEST_F(TouchHudProjectionTest, DoubleTouch) {
- SetupSingleDisplay();
- EXPECT_EQ(NULL, GetInternalTouchHudProjection());
-
- EnableTouchHudProjection();
- EXPECT_NE(static_cast<internal::TouchHudProjection*>(NULL),
- GetInternalTouchHudProjection());
- EXPECT_EQ(0, GetInternalTouchPointsCount());
-
- SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1);
- EXPECT_EQ(1, GetInternalTouchPointsCount());
-
- SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(20, 10), 2);
- EXPECT_EQ(2, GetInternalTouchPointsCount());
-
- SendTouchEventToInternalHud(ui::ET_TOUCH_MOVED, gfx::Point(10, 20), 1);
- EXPECT_EQ(2, GetInternalTouchPointsCount());
-
- SendTouchEventToInternalHud(ui::ET_TOUCH_MOVED, gfx::Point(20, 20), 2);
- EXPECT_EQ(2, GetInternalTouchPointsCount());
-
- SendTouchEventToInternalHud(ui::ET_TOUCH_RELEASED, gfx::Point(10, 20), 1);
- EXPECT_EQ(1, GetInternalTouchPointsCount());
-
- SendTouchEventToInternalHud(ui::ET_TOUCH_RELEASED, gfx::Point(20, 20), 2);
- EXPECT_EQ(0, GetInternalTouchPointsCount());
-
- // Disabling projection touch HUD shoud remove it without crashing.
- DisableTouchHudProjection();
- EXPECT_EQ(NULL, GetInternalTouchHudProjection());
-}
-
-// Checks if turning off touch HUD projection while touching the screen is
-// handled correctly.
-TEST_F(TouchHudProjectionTest, DisableWhileTouching) {
- SetupSingleDisplay();
- EXPECT_EQ(NULL, GetInternalTouchHudProjection());
-
- EnableTouchHudProjection();
- EXPECT_NE(static_cast<internal::TouchHudProjection*>(NULL),
- GetInternalTouchHudProjection());
- EXPECT_EQ(0, GetInternalTouchPointsCount());
-
- SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1);
- EXPECT_EQ(1, GetInternalTouchPointsCount());
-
- // Disabling projection touch HUD shoud remove it without crashing.
- DisableTouchHudProjection();
- EXPECT_EQ(NULL, GetInternalTouchHudProjection());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/touch/touch_uma.cc b/chromium/ash/touch/touch_uma.cc
deleted file mode 100644
index 6f970ac7804..00000000000
--- a/chromium/ash/touch/touch_uma.cc
+++ /dev/null
@@ -1,445 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/touch/touch_uma.h"
-
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
-#include "base/metrics/histogram.h"
-#include "base/strings/stringprintf.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_property.h"
-#include "ui/events/event.h"
-#include "ui/events/event_utils.h"
-#include "ui/gfx/point_conversions.h"
-
-#if defined(USE_XI2_MT)
-#include <X11/extensions/XInput2.h>
-#include <X11/Xlib.h>
-#endif
-
-namespace {
-
-enum UMAEventType {
- UMA_ET_UNKNOWN,
- UMA_ET_TOUCH_RELEASED,
- UMA_ET_TOUCH_PRESSED,
- UMA_ET_TOUCH_MOVED,
- UMA_ET_TOUCH_STATIONARY,
- UMA_ET_TOUCH_CANCELLED,
- UMA_ET_GESTURE_SCROLL_BEGIN,
- UMA_ET_GESTURE_SCROLL_END,
- UMA_ET_GESTURE_SCROLL_UPDATE,
- UMA_ET_GESTURE_TAP,
- UMA_ET_GESTURE_TAP_DOWN,
- UMA_ET_GESTURE_BEGIN,
- UMA_ET_GESTURE_END,
- UMA_ET_GESTURE_DOUBLE_TAP,
- UMA_ET_GESTURE_TRIPLE_TAP,
- UMA_ET_GESTURE_TWO_FINGER_TAP,
- UMA_ET_GESTURE_PINCH_BEGIN,
- UMA_ET_GESTURE_PINCH_END,
- UMA_ET_GESTURE_PINCH_UPDATE,
- UMA_ET_GESTURE_LONG_PRESS,
- UMA_ET_GESTURE_MULTIFINGER_SWIPE,
- UMA_ET_SCROLL,
- UMA_ET_SCROLL_FLING_START,
- UMA_ET_SCROLL_FLING_CANCEL,
- UMA_ET_GESTURE_MULTIFINGER_SWIPE_3,
- UMA_ET_GESTURE_MULTIFINGER_SWIPE_4P, // 4+ fingers
- UMA_ET_GESTURE_SCROLL_UPDATE_2,
- UMA_ET_GESTURE_SCROLL_UPDATE_3,
- UMA_ET_GESTURE_SCROLL_UPDATE_4P,
- UMA_ET_GESTURE_PINCH_UPDATE_3,
- UMA_ET_GESTURE_PINCH_UPDATE_4P,
- UMA_ET_GESTURE_LONG_TAP,
- UMA_ET_GESTURE_SHOW_PRESS,
- UMA_ET_GESTURE_TAP_CANCEL,
- // NOTE: Add new event types only immediately above this line. Make sure to
- // update the enum list in tools/metrics/histogram/histograms.xml accordingly.
- UMA_ET_COUNT
-};
-
-struct WindowTouchDetails {
- // Move and start times of the touch points. The key is the touch-id.
- std::map<int, base::TimeDelta> last_move_time_;
- std::map<int, base::TimeDelta> last_start_time_;
-
- // The first and last positions of the touch points.
- std::map<int, gfx::Point> start_touch_position_;
- std::map<int, gfx::Point> last_touch_position_;
-
- // Last time-stamp of the last touch-end event.
- base::TimeDelta last_release_time_;
-
- // Stores the time of the last touch released on this window (if there was a
- // multi-touch gesture on the window, then this is the release-time of the
- // last touch on the window).
- base::TimeDelta last_mt_time_;
-};
-
-DEFINE_OWNED_WINDOW_PROPERTY_KEY(WindowTouchDetails,
- kWindowTouchDetails,
- NULL);
-
-
-UMAEventType UMAEventTypeFromEvent(const ui::Event& event) {
- switch (event.type()) {
- case ui::ET_TOUCH_RELEASED:
- return UMA_ET_TOUCH_RELEASED;
- case ui::ET_TOUCH_PRESSED:
- return UMA_ET_TOUCH_PRESSED;
- case ui::ET_TOUCH_MOVED:
- return UMA_ET_TOUCH_MOVED;
- case ui::ET_TOUCH_STATIONARY:
- return UMA_ET_TOUCH_STATIONARY;
- case ui::ET_TOUCH_CANCELLED:
- return UMA_ET_TOUCH_CANCELLED;
- case ui::ET_GESTURE_SCROLL_BEGIN:
- return UMA_ET_GESTURE_SCROLL_BEGIN;
- case ui::ET_GESTURE_SCROLL_END:
- return UMA_ET_GESTURE_SCROLL_END;
- case ui::ET_GESTURE_SCROLL_UPDATE: {
- const ui::GestureEvent& gesture =
- static_cast<const ui::GestureEvent&>(event);
- if (gesture.details().touch_points() >= 4)
- return UMA_ET_GESTURE_SCROLL_UPDATE_4P;
- else if (gesture.details().touch_points() == 3)
- return UMA_ET_GESTURE_SCROLL_UPDATE_3;
- else if (gesture.details().touch_points() == 2)
- return UMA_ET_GESTURE_SCROLL_UPDATE_2;
- return UMA_ET_GESTURE_SCROLL_UPDATE;
- }
- case ui::ET_GESTURE_TAP: {
- const ui::GestureEvent& gesture =
- static_cast<const ui::GestureEvent&>(event);
- int tap_count = gesture.details().tap_count();
- if (tap_count == 1)
- return UMA_ET_GESTURE_TAP;
- if (tap_count == 2)
- return UMA_ET_GESTURE_DOUBLE_TAP;
- if (tap_count == 3)
- return UMA_ET_GESTURE_TRIPLE_TAP;
- NOTREACHED() << "Received tap with tapcount " << tap_count;
- return UMA_ET_UNKNOWN;
- }
- case ui::ET_GESTURE_TAP_DOWN:
- return UMA_ET_GESTURE_TAP_DOWN;
- case ui::ET_GESTURE_BEGIN:
- return UMA_ET_GESTURE_BEGIN;
- case ui::ET_GESTURE_END:
- return UMA_ET_GESTURE_END;
- case ui::ET_GESTURE_TWO_FINGER_TAP:
- return UMA_ET_GESTURE_TWO_FINGER_TAP;
- case ui::ET_GESTURE_PINCH_BEGIN:
- return UMA_ET_GESTURE_PINCH_BEGIN;
- case ui::ET_GESTURE_PINCH_END:
- return UMA_ET_GESTURE_PINCH_END;
- case ui::ET_GESTURE_PINCH_UPDATE: {
- const ui::GestureEvent& gesture =
- static_cast<const ui::GestureEvent&>(event);
- if (gesture.details().touch_points() >= 4)
- return UMA_ET_GESTURE_PINCH_UPDATE_4P;
- else if (gesture.details().touch_points() == 3)
- return UMA_ET_GESTURE_PINCH_UPDATE_3;
- return UMA_ET_GESTURE_PINCH_UPDATE;
- }
- case ui::ET_GESTURE_LONG_PRESS:
- return UMA_ET_GESTURE_LONG_PRESS;
- case ui::ET_GESTURE_LONG_TAP:
- return UMA_ET_GESTURE_LONG_TAP;
- case ui::ET_GESTURE_MULTIFINGER_SWIPE: {
- const ui::GestureEvent& gesture =
- static_cast<const ui::GestureEvent&>(event);
- if (gesture.details().touch_points() >= 4)
- return UMA_ET_GESTURE_MULTIFINGER_SWIPE_4P;
- else if (gesture.details().touch_points() == 3)
- return UMA_ET_GESTURE_MULTIFINGER_SWIPE_3;
- return UMA_ET_GESTURE_MULTIFINGER_SWIPE;
- }
- case ui::ET_GESTURE_TAP_CANCEL:
- return UMA_ET_GESTURE_TAP_CANCEL;
- case ui::ET_GESTURE_SHOW_PRESS:
- return UMA_ET_GESTURE_SHOW_PRESS;
- case ui::ET_SCROLL:
- return UMA_ET_SCROLL;
- case ui::ET_SCROLL_FLING_START:
- return UMA_ET_SCROLL_FLING_START;
- case ui::ET_SCROLL_FLING_CANCEL:
- return UMA_ET_SCROLL_FLING_CANCEL;
- default:
- NOTREACHED();
- return UMA_ET_UNKNOWN;
- }
-}
-
-}
-
-namespace ash {
-
-// static
-TouchUMA* TouchUMA::GetInstance() {
- return Singleton<TouchUMA>::get();
-}
-
-void TouchUMA::RecordGestureEvent(aura::Window* target,
- const ui::GestureEvent& event) {
- UMA_HISTOGRAM_ENUMERATION("Ash.GestureCreated",
- UMAEventTypeFromEvent(event),
- UMA_ET_COUNT);
-
- GestureActionType action = FindGestureActionType(target, event);
- RecordGestureAction(action);
-
- if (event.type() == ui::ET_GESTURE_END &&
- event.details().touch_points() == 2) {
- WindowTouchDetails* details = target->GetProperty(kWindowTouchDetails);
- if (!details) {
- LOG(ERROR) << "Window received gesture events without receiving any touch"
- " events";
- return;
- }
- details->last_mt_time_ = event.time_stamp();
- }
-}
-
-void TouchUMA::RecordGestureAction(GestureActionType action) {
- if (action == GESTURE_UNKNOWN || action >= GESTURE_ACTION_COUNT)
- return;
- UMA_HISTOGRAM_ENUMERATION("Ash.GestureTarget", action,
- GESTURE_ACTION_COUNT);
-}
-
-void TouchUMA::RecordTouchEvent(aura::Window* target,
- const ui::TouchEvent& event) {
- UMA_HISTOGRAM_CUSTOM_COUNTS("Ash.TouchRadius",
- static_cast<int>(std::max(event.radius_x(), event.radius_y())),
- 1, 500, 100);
-
- UpdateBurstData(event);
-
- WindowTouchDetails* details = target->GetProperty(kWindowTouchDetails);
- if (!details) {
- details = new WindowTouchDetails;
- target->SetProperty(kWindowTouchDetails, details);
- }
-
- // Record the location of the touch points.
- const int kBucketCountForLocation = 100;
- const gfx::Rect bounds = target->GetRootWindow()->bounds();
- const int bucket_size_x = std::max(1,
- bounds.width() / kBucketCountForLocation);
- const int bucket_size_y = std::max(1,
- bounds.height() / kBucketCountForLocation);
-
- gfx::Point position = event.root_location();
-
- // Prefer raw event location (when available) over calibrated location.
- if (event.HasNativeEvent()) {
-#if defined(USE_XI2_MT)
- XEvent* xevent = event.native_event();
- CHECK_EQ(GenericEvent, xevent->type);
- XIEvent* xievent = static_cast<XIEvent*>(xevent->xcookie.data);
- if (xievent->evtype == XI_TouchBegin ||
- xievent->evtype == XI_TouchUpdate ||
- xievent->evtype == XI_TouchEnd) {
- XIDeviceEvent* device_event =
- static_cast<XIDeviceEvent*>(xevent->xcookie.data);
- position.SetPoint(static_cast<int>(device_event->event_x),
- static_cast<int>(device_event->event_y));
- } else {
- position = ui::EventLocationFromNative(event.native_event());
- }
-#else
- position = ui::EventLocationFromNative(event.native_event());
-#endif
- position = gfx::ToFlooredPoint(
- gfx::ScalePoint(position, 1. / target->layer()->device_scale_factor()));
- }
-
- position.set_x(std::min(bounds.width() - 1, std::max(0, position.x())));
- position.set_y(std::min(bounds.height() - 1, std::max(0, position.y())));
-
- UMA_HISTOGRAM_CUSTOM_COUNTS("Ash.TouchPositionX",
- position.x() / bucket_size_x,
- 0, kBucketCountForLocation, kBucketCountForLocation + 1);
- UMA_HISTOGRAM_CUSTOM_COUNTS("Ash.TouchPositionY",
- position.y() / bucket_size_y,
- 0, kBucketCountForLocation, kBucketCountForLocation + 1);
-
- if (event.type() == ui::ET_TOUCH_PRESSED) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- UMA_TOUCHSCREEN_TAP_DOWN);
-
- details->last_start_time_[event.touch_id()] = event.time_stamp();
- details->start_touch_position_[event.touch_id()] = event.root_location();
- details->last_touch_position_[event.touch_id()] = event.location();
-
- if (details->last_release_time_.ToInternalValue()) {
- // Measuring the interval between a touch-release and the next
- // touch-start is probably less useful when doing multi-touch (e.g.
- // gestures, or multi-touch friendly apps). So count this only if the user
- // hasn't done any multi-touch during the last 30 seconds.
- base::TimeDelta diff = event.time_stamp() - details->last_mt_time_;
- if (diff.InSeconds() > 30) {
- base::TimeDelta gap = event.time_stamp() - details->last_release_time_;
- UMA_HISTOGRAM_COUNTS_10000("Ash.TouchStartAfterEnd",
- gap.InMilliseconds());
- }
- }
-
- // Record the number of touch-points currently active for the window.
- const int kMaxTouchPoints = 10;
- UMA_HISTOGRAM_CUSTOM_COUNTS("Ash.ActiveTouchPoints",
- details->last_start_time_.size(),
- 1, kMaxTouchPoints, kMaxTouchPoints + 1);
- } else if (event.type() == ui::ET_TOUCH_RELEASED) {
- if (details->last_start_time_.count(event.touch_id())) {
- base::TimeDelta duration = event.time_stamp() -
- details->last_start_time_[event.touch_id()];
- UMA_HISTOGRAM_TIMES("Ash.TouchDuration2", duration);
-
- // Look for touches that were [almost] stationary for a long time.
- const double kLongStationaryTouchDuration = 10;
- const int kLongStationaryTouchDistanceSquared = 100;
- if (duration.InSecondsF() > kLongStationaryTouchDuration) {
- gfx::Vector2d distance = event.root_location() -
- details->start_touch_position_[event.touch_id()];
- if (distance.LengthSquared() < kLongStationaryTouchDistanceSquared) {
- UMA_HISTOGRAM_CUSTOM_COUNTS("Ash.StationaryTouchDuration",
- duration.InSeconds(),
- kLongStationaryTouchDuration,
- 1000,
- 20);
- }
- }
- }
- details->last_start_time_.erase(event.touch_id());
- details->last_move_time_.erase(event.touch_id());
- details->start_touch_position_.erase(event.touch_id());
- details->last_touch_position_.erase(event.touch_id());
- details->last_release_time_ = event.time_stamp();
- } else if (event.type() == ui::ET_TOUCH_MOVED) {
- int distance = 0;
- if (details->last_touch_position_.count(event.touch_id())) {
- gfx::Point lastpos = details->last_touch_position_[event.touch_id()];
- distance = abs(lastpos.x() - event.x()) + abs(lastpos.y() - event.y());
- }
-
- if (details->last_move_time_.count(event.touch_id())) {
- base::TimeDelta move_delay = event.time_stamp() -
- details->last_move_time_[event.touch_id()];
- UMA_HISTOGRAM_CUSTOM_COUNTS("Ash.TouchMoveInterval",
- move_delay.InMilliseconds(),
- 1, 50, 25);
- }
-
- UMA_HISTOGRAM_CUSTOM_COUNTS("Ash.TouchMoveSteps", distance, 1, 1000, 50);
-
- details->last_move_time_[event.touch_id()] = event.time_stamp();
- details->last_touch_position_[event.touch_id()] = event.location();
- }
-}
-
-TouchUMA::TouchUMA()
- : touch_in_progress_(false),
- burst_length_(0) {
-}
-
-TouchUMA::~TouchUMA() {
-}
-
-void TouchUMA::UpdateBurstData(const ui::TouchEvent& event) {
- if (event.type() == ui::ET_TOUCH_PRESSED) {
- if (!touch_in_progress_) {
- base::TimeDelta difference = event.time_stamp() - last_touch_down_time_;
- if (difference > base::TimeDelta::FromMilliseconds(250)) {
- if (burst_length_) {
- UMA_HISTOGRAM_COUNTS_100("Ash.TouchStartBurst",
- std::min(burst_length_, 100));
- }
- burst_length_ = 1;
- } else {
- ++burst_length_;
- }
- }
- touch_in_progress_ = true;
- last_touch_down_time_ = event.time_stamp();
- } else if (event.type() == ui::ET_TOUCH_RELEASED) {
- if (!aura::Env::GetInstance()->is_touch_down())
- touch_in_progress_ = false;
- }
-}
-
-TouchUMA::GestureActionType TouchUMA::FindGestureActionType(
- aura::Window* window,
- const ui::GestureEvent& event) {
- if (!window || window->GetRootWindow() == window) {
- if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN)
- return GESTURE_BEZEL_SCROLL;
- if (event.type() == ui::ET_GESTURE_BEGIN)
- return GESTURE_BEZEL_DOWN;
- return GESTURE_UNKNOWN;
- }
-
- std::string name = window ? window->name() : std::string();
-
- const char kDesktopBackgroundView[] = "DesktopBackgroundView";
- if (name == kDesktopBackgroundView) {
- if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN)
- return GESTURE_DESKTOP_SCROLL;
- if (event.type() == ui::ET_GESTURE_PINCH_BEGIN)
- return GESTURE_DESKTOP_PINCH;
- return GESTURE_UNKNOWN;
- }
-
- const char kWebPage[] = "RenderWidgetHostViewAura";
- if (name == kWebPage) {
- if (event.type() == ui::ET_GESTURE_PINCH_BEGIN)
- return GESTURE_WEBPAGE_PINCH;
- if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN)
- return GESTURE_WEBPAGE_SCROLL;
- if (event.type() == ui::ET_GESTURE_TAP)
- return GESTURE_WEBPAGE_TAP;
- return GESTURE_UNKNOWN;
- }
-
- views::Widget* widget = views::Widget::GetWidgetForNativeView(window);
- if (!widget)
- return GESTURE_UNKNOWN;
-
- views::View* view = widget->GetRootView()->
- GetEventHandlerForPoint(event.location());
- if (!view)
- return GESTURE_UNKNOWN;
-
- name = view->GetClassName();
-
- const char kTabStrip[] = "TabStrip";
- const char kTab[] = "BrowserTab";
- if (name == kTabStrip || name == kTab) {
- if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN)
- return GESTURE_TABSTRIP_SCROLL;
- if (event.type() == ui::ET_GESTURE_PINCH_BEGIN)
- return GESTURE_TABSTRIP_PINCH;
- if (event.type() == ui::ET_GESTURE_TAP)
- return GESTURE_TABSTRIP_TAP;
- return GESTURE_UNKNOWN;
- }
-
- const char kOmnibox[] = "BrowserOmniboxViewViews";
- if (name == kOmnibox) {
- if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN)
- return GESTURE_OMNIBOX_SCROLL;
- if (event.type() == ui::ET_GESTURE_PINCH_BEGIN)
- return GESTURE_OMNIBOX_PINCH;
- return GESTURE_UNKNOWN;
- }
-
- return GESTURE_UNKNOWN;
-}
-
-} // namespace ash
diff --git a/chromium/ash/touch/touch_uma.h b/chromium/ash/touch/touch_uma.h
deleted file mode 100644
index 3e2c7fda3ec..00000000000
--- a/chromium/ash/touch/touch_uma.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_TOUCH_TOUCH_OBSERVER_UMA_H_
-#define ASH_TOUCH_TOUCH_OBSERVER_UMA_H_
-
-#include <map>
-
-#include "ash/shell.h"
-#include "base/memory/singleton.h"
-#include "ui/gfx/point.h"
-#include "ui/views/widget/widget.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-
-// Records some touch/gesture event specific details (e.g. what gestures are
-// targetted to which components etc.)
-class ASH_EXPORT TouchUMA {
- public:
- enum GestureActionType {
- GESTURE_UNKNOWN,
- GESTURE_OMNIBOX_PINCH,
- GESTURE_OMNIBOX_SCROLL,
- GESTURE_TABSTRIP_PINCH,
- GESTURE_TABSTRIP_SCROLL,
- GESTURE_BEZEL_SCROLL,
- GESTURE_DESKTOP_SCROLL,
- GESTURE_DESKTOP_PINCH,
- GESTURE_WEBPAGE_PINCH,
- GESTURE_WEBPAGE_SCROLL,
- GESTURE_WEBPAGE_TAP,
- GESTURE_TABSTRIP_TAP,
- GESTURE_BEZEL_DOWN,
- GESTURE_TABSWITCH_TAP,
- GESTURE_TABNOSWITCH_TAP,
- GESTURE_TABCLOSE_TAP,
- GESTURE_NEWTAB_TAP,
- GESTURE_ROOTVIEWTOP_TAP,
- GESTURE_FRAMEMAXIMIZE_TAP,
- GESTURE_FRAMEVIEW_TAP,
- GESTURE_MAXIMIZE_DOUBLETAP,
- // NOTE: Add new action types only immediately above this line. Also,
- // make sure the enum list in tools/histogram/histograms.xml is
- // updated with any change in here.
- GESTURE_ACTION_COUNT
- };
-
- // Returns the singleton instance.
- static TouchUMA* GetInstance();
-
- void RecordGestureEvent(aura::Window* target,
- const ui::GestureEvent& event);
- void RecordGestureAction(GestureActionType action);
- void RecordTouchEvent(aura::Window* target,
- const ui::TouchEvent& event);
-
- private:
- friend struct DefaultSingletonTraits<TouchUMA>;
-
- TouchUMA();
- ~TouchUMA();
-
- void UpdateBurstData(const ui::TouchEvent& event);
- GestureActionType FindGestureActionType(aura::Window* window,
- const ui::GestureEvent& event);
-
- // These are used to measure the number of touch-start events we receive in a
- // quick succession, regardless of the target window.
- bool touch_in_progress_;
- int burst_length_;
- base::TimeDelta last_touch_down_time_;
-
- DISALLOW_COPY_AND_ASSIGN(TouchUMA);
-};
-
-} // namespace ash
-
-#endif // ASH_TOUCH_TOUCH_OBSERVER_UMA_H_
diff --git a/chromium/ash/volume_control_delegate.h b/chromium/ash/volume_control_delegate.h
deleted file mode 100644
index a33a206d454..00000000000
--- a/chromium/ash/volume_control_delegate.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_VOLUME_CONTROL_DELEGATE_H_
-#define ASH_VOLUME_CONTROL_DELEGATE_H_
-
-namespace ui {
-class Accelerator;
-} // namespace ui
-
-namespace ash {
-
-// Delegate for controlling the volume.
-class VolumeControlDelegate {
- public:
- virtual ~VolumeControlDelegate() {}
-
- virtual bool HandleVolumeMute(const ui::Accelerator& accelerator) = 0;
- virtual bool HandleVolumeDown(const ui::Accelerator& accelerator) = 0;
- virtual bool HandleVolumeUp(const ui::Accelerator& accelerator) = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_VOLUME_CONTROL_DELEGATE_H_
diff --git a/chromium/ash/wm/always_on_top_controller.cc b/chromium/ash/wm/always_on_top_controller.cc
deleted file mode 100644
index 44776feb313..00000000000
--- a/chromium/ash/wm/always_on_top_controller.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/always_on_top_controller.h"
-
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/window.h"
-
-namespace ash {
-namespace internal {
-
-AlwaysOnTopController::AlwaysOnTopController()
- : always_on_top_container_(NULL) {
-}
-
-AlwaysOnTopController::~AlwaysOnTopController() {
- if (always_on_top_container_)
- always_on_top_container_->RemoveObserver(this);
-}
-
-void AlwaysOnTopController::SetAlwaysOnTopContainer(
- aura::Window* always_on_top_container) {
- // Container should be empty.
- DCHECK(always_on_top_container->children().empty());
-
- // We are not handling any containers yet.
- DCHECK(always_on_top_container_ == NULL);
-
- always_on_top_container_ = always_on_top_container;
- always_on_top_container_->AddObserver(this);
-}
-
-aura::Window* AlwaysOnTopController::GetContainer(aura::Window* window) const {
- DCHECK(always_on_top_container_);
- if (window->GetProperty(aura::client::kAlwaysOnTopKey))
- return always_on_top_container_;
- return Shell::GetContainer(always_on_top_container_->GetRootWindow(),
- kShellWindowId_DefaultContainer);
-}
-
-void AlwaysOnTopController::OnWindowAdded(aura::Window* child) {
- // Observe direct child of the containers.
- if (child->parent() == always_on_top_container_)
- child->AddObserver(this);
-}
-
-void AlwaysOnTopController::OnWillRemoveWindow(aura::Window* child) {
- child->RemoveObserver(this);
-}
-
-void AlwaysOnTopController::OnWindowPropertyChanged(aura::Window* window,
- const void* key,
- intptr_t old) {
- if (key == aura::client::kAlwaysOnTopKey) {
- DCHECK(window->type() == aura::client::WINDOW_TYPE_NORMAL ||
- window->type() == aura::client::WINDOW_TYPE_POPUP);
- aura::Window* container = GetContainer(window);
- if (window->parent() != container)
- container->AddChild(window);
- }
-}
-
-void AlwaysOnTopController::OnWindowDestroyed(aura::Window* window) {
- if (window == always_on_top_container_)
- always_on_top_container_ = NULL;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/always_on_top_controller.h b/chromium/ash/wm/always_on_top_controller.h
deleted file mode 100644
index 57fbf99e171..00000000000
--- a/chromium/ash/wm/always_on_top_controller.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_ALWAYS_ON_TOP_CONTROLLER_H_
-#define ASH_WM_ALWAYS_ON_TOP_CONTROLLER_H_
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/aura/window_observer.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-namespace internal {
-
-// AlwaysOnTopController puts window into proper containers based on its
-// 'AlwaysOnTop' property. That is, putting a window into the worskpace
-// container if its "AlwaysOnTop" property is false. Otherwise, put it in
-// |always_on_top_container_|.
-class AlwaysOnTopController : public aura::WindowObserver {
- public:
- AlwaysOnTopController();
- virtual ~AlwaysOnTopController();
-
- // Sets the container for always on top windows.
- void SetAlwaysOnTopContainer(aura::Window* always_on_top_container);
-
- // Gets container for given |window| based on its "AlwaysOnTop" property.
- aura::Window* GetContainer(aura::Window* window) const;
-
- private:
- // Overridden from aura::WindowObserver:
- virtual void OnWindowAdded(aura::Window* child) OVERRIDE;
- virtual void OnWillRemoveWindow(aura::Window* child) OVERRIDE;
- virtual void OnWindowPropertyChanged(aura::Window* window,
- const void* key,
- intptr_t old) OVERRIDE;
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
-
- aura::Window* always_on_top_container_;
-
- DISALLOW_COPY_AND_ASSIGN(AlwaysOnTopController);
-};
-
-} // namepsace internal
-} // namepsace ash
-
-#endif // ASH_WM_ALWAYS_ON_TOP_CONTROLLER_H_
diff --git a/chromium/ash/wm/app_list_controller.cc b/chromium/ash/wm/app_list_controller.cc
deleted file mode 100644
index 2f0ce0420f3..00000000000
--- a/chromium/ash/wm/app_list_controller.cc
+++ /dev/null
@@ -1,439 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/app_list_controller.h"
-
-#include "ash/ash_switches.h"
-#include "ash/launcher/launcher.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "ash/shell_window_ids.h"
-#include "base/command_line.h"
-#include "ui/app_list/app_list_constants.h"
-#include "ui/app_list/pagination_model.h"
-#include "ui/app_list/views/app_list_view.h"
-#include "ui/aura/client/focus_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/events/event.h"
-#include "ui/gfx/transform_util.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-// Duration for show/hide animation in milliseconds.
-const int kAnimationDurationMs = 200;
-
-// Offset in pixels to animation away/towards the launcher.
-const int kAnimationOffset = 8;
-
-// The maximum shift in pixels when over-scroll happens.
-const int kMaxOverScrollShift = 48;
-
-// The minimal anchor position offset to make sure that the bubble is still on
-// the screen with 8 pixels spacing on the left / right. This constant is a
-// result of minimal bubble arrow sizes and offsets.
-const int kMinimalAnchorPositionOffset = 57;
-
-ui::Layer* GetLayer(views::Widget* widget) {
- return widget->GetNativeView()->layer();
-}
-
-// Gets arrow location based on shelf alignment.
-views::BubbleBorder::Arrow GetBubbleArrow(aura::Window* window) {
- DCHECK(Shell::HasInstance());
- return ShelfLayoutManager::ForLauncher(window)->
- SelectValueForShelfAlignment(
- views::BubbleBorder::BOTTOM_CENTER,
- views::BubbleBorder::LEFT_CENTER,
- views::BubbleBorder::RIGHT_CENTER,
- views::BubbleBorder::TOP_CENTER);
-}
-
-// Offset given |rect| towards shelf.
-gfx::Rect OffsetTowardsShelf(const gfx::Rect& rect, views::Widget* widget) {
- DCHECK(Shell::HasInstance());
- ShelfAlignment shelf_alignment = Shell::GetInstance()->GetShelfAlignment(
- widget->GetNativeView()->GetRootWindow());
- gfx::Rect offseted(rect);
- switch (shelf_alignment) {
- case SHELF_ALIGNMENT_BOTTOM:
- offseted.Offset(0, kAnimationOffset);
- break;
- case SHELF_ALIGNMENT_LEFT:
- offseted.Offset(-kAnimationOffset, 0);
- break;
- case SHELF_ALIGNMENT_RIGHT:
- offseted.Offset(kAnimationOffset, 0);
- break;
- case SHELF_ALIGNMENT_TOP:
- offseted.Offset(0, -kAnimationOffset);
- break;
- }
-
- return offseted;
-}
-
-// Using |button_bounds|, determine the anchor offset so that the bubble gets
-// shown above the shelf (used for the alternate shelf theme).
-gfx::Vector2d GetAnchorPositionOffsetToShelf(
- const gfx::Rect& button_bounds, views::Widget* widget) {
- DCHECK(Shell::HasInstance());
- ShelfAlignment shelf_alignment = Shell::GetInstance()->GetShelfAlignment(
- widget->GetNativeView()->GetRootWindow());
- gfx::Point anchor(button_bounds.CenterPoint());
- switch (shelf_alignment) {
- case SHELF_ALIGNMENT_TOP:
- case SHELF_ALIGNMENT_BOTTOM:
- if (base::i18n::IsRTL()) {
- int screen_width = widget->GetWorkAreaBoundsInScreen().width();
- return gfx::Vector2d(
- std::min(screen_width - kMinimalAnchorPositionOffset - anchor.x(),
- 0), 0);
- }
- return gfx::Vector2d(
- std::max(kMinimalAnchorPositionOffset - anchor.x(), 0), 0);
- case SHELF_ALIGNMENT_LEFT:
- return gfx::Vector2d(
- 0, std::max(kMinimalAnchorPositionOffset - anchor.y(), 0));
- case SHELF_ALIGNMENT_RIGHT:
- return gfx::Vector2d(
- 0, std::max(kMinimalAnchorPositionOffset - anchor.y(), 0));
- default:
- NOTREACHED();
- return gfx::Vector2d();
- }
-}
-
-} // namespace
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, public:
-
-AppListController::AppListController()
- : pagination_model_(new app_list::PaginationModel),
- is_visible_(false),
- view_(NULL),
- should_snap_back_(false) {
- Shell::GetInstance()->AddShellObserver(this);
- pagination_model_->AddObserver(this);
-}
-
-AppListController::~AppListController() {
- // Ensures app list view goes before the controller since pagination model
- // lives in the controller and app list view would access it on destruction.
- if (view_ && view_->GetWidget())
- view_->GetWidget()->CloseNow();
-
- Shell::GetInstance()->RemoveShellObserver(this);
- pagination_model_->RemoveObserver(this);
-}
-
-void AppListController::SetVisible(bool visible, aura::Window* window) {
- if (visible == is_visible_)
- return;
-
- is_visible_ = visible;
-
- // App list needs to know the new shelf layout in order to calculate its
- // UI layout when AppListView visibility changes.
- Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager()->
- UpdateAutoHideState();
-
- if (view_) {
- // Our widget is currently active. When the animation completes we'll hide
- // the widget, changing activation. If a menu is shown before the animation
- // completes then the activation change triggers the menu to close. By
- // deactivating now we ensure there is no activation change when the
- // animation completes and any menus stay open.
- if (!visible)
- view_->GetWidget()->Deactivate();
- ScheduleAnimation();
- } else if (is_visible_) {
- // AppListModel and AppListViewDelegate are owned by AppListView. They
- // will be released with AppListView on close.
- app_list::AppListView* view = new app_list::AppListView(
- Shell::GetInstance()->delegate()->CreateAppListViewDelegate());
- aura::Window* root_window = window->GetRootWindow();
- aura::Window* container = GetRootWindowController(root_window)->
- GetContainer(kShellWindowId_AppListContainer);
- if (ash::switches::UseAlternateShelfLayout()) {
- gfx::Rect applist_button_bounds = Launcher::ForWindow(container)->
- GetAppListButtonView()->GetBoundsInScreen();
- // We need the location of the button within the local screen.
- applist_button_bounds = ash::ScreenAsh::ConvertRectFromScreen(
- root_window,
- applist_button_bounds);
- view->InitAsBubbleAttachedToAnchor(
- container,
- pagination_model_.get(),
- Launcher::ForWindow(container)->GetAppListButtonView(),
- GetAnchorPositionOffsetToShelf(applist_button_bounds,
- Launcher::ForWindow(container)->GetAppListButtonView()->
- GetWidget()),
- GetBubbleArrow(container),
- true /* border_accepts_events */);
- view->SetArrowPaintType(views::BubbleBorder::PAINT_NONE);
- } else {
- view->InitAsBubbleAttachedToAnchor(
- container,
- pagination_model_.get(),
- Launcher::ForWindow(container)->GetAppListButtonView(),
- gfx::Vector2d(),
- GetBubbleArrow(container),
- true /* border_accepts_events */);
- }
- SetView(view);
- // By setting us as DnD recipient, the app list knows that we can
- // handle items.
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- ash::switches::kAshDisableDragAndDropAppListToLauncher)) {
- SetDragAndDropHostOfCurrentAppList(
- Launcher::ForWindow(window)->GetDragAndDropHostForAppList());
- }
- }
- // Update applist button status when app list visibility is changed.
- Launcher::ForWindow(window)->GetAppListButtonView()->SchedulePaint();
-}
-
-bool AppListController::IsVisible() const {
- return view_ && view_->GetWidget()->IsVisible();
-}
-
-aura::Window* AppListController::GetWindow() {
- return is_visible_ && view_ ? view_->GetWidget()->GetNativeWindow() : NULL;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, private:
-
-void AppListController::SetDragAndDropHostOfCurrentAppList(
- app_list::ApplicationDragAndDropHost* drag_and_drop_host) {
- if (view_ && is_visible_)
- view_->SetDragAndDropHostOfCurrentAppList(drag_and_drop_host);
-}
-
-void AppListController::SetView(app_list::AppListView* view) {
- DCHECK(view_ == NULL);
- DCHECK(is_visible_);
-
- view_ = view;
- views::Widget* widget = view_->GetWidget();
- widget->AddObserver(this);
- Shell::GetInstance()->AddPreTargetHandler(this);
- Launcher::ForWindow(widget->GetNativeWindow())->AddIconObserver(this);
- widget->GetNativeView()->GetRootWindow()->AddObserver(this);
- aura::client::GetFocusClient(widget->GetNativeView())->AddObserver(this);
-
- view_->ShowWhenReady();
-}
-
-void AppListController::ResetView() {
- if (!view_)
- return;
-
- views::Widget* widget = view_->GetWidget();
- widget->RemoveObserver(this);
- GetLayer(widget)->GetAnimator()->RemoveObserver(this);
- Shell::GetInstance()->RemovePreTargetHandler(this);
- Launcher::ForWindow(widget->GetNativeWindow())->RemoveIconObserver(this);
- widget->GetNativeView()->GetRootWindow()->RemoveObserver(this);
- aura::client::GetFocusClient(widget->GetNativeView())->RemoveObserver(this);
- view_ = NULL;
-}
-
-void AppListController::ScheduleAnimation() {
- // Stop observing previous animation.
- StopObservingImplicitAnimations();
-
- views::Widget* widget = view_->GetWidget();
- ui::Layer* layer = GetLayer(widget);
- layer->GetAnimator()->StopAnimating();
-
- gfx::Rect target_bounds;
- if (is_visible_) {
- target_bounds = widget->GetWindowBoundsInScreen();
- widget->SetBounds(OffsetTowardsShelf(target_bounds, widget));
- } else {
- target_bounds = OffsetTowardsShelf(widget->GetWindowBoundsInScreen(),
- widget);
- }
-
- ui::ScopedLayerAnimationSettings animation(layer->GetAnimator());
- animation.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(
- is_visible_ ? 0 : kAnimationDurationMs));
- animation.AddObserver(this);
-
- layer->SetOpacity(is_visible_ ? 1.0 : 0.0);
- widget->SetBounds(target_bounds);
-}
-
-void AppListController::ProcessLocatedEvent(ui::LocatedEvent* event) {
- // If the event happened on a menu, then the event should not close the app
- // list.
- aura::Window* target = static_cast<aura::Window*>(event->target());
- if (target) {
- RootWindowController* root_controller =
- GetRootWindowController(target->GetRootWindow());
- if (root_controller) {
- aura::Window* menu_container = root_controller->GetContainer(
- ash::internal::kShellWindowId_MenuContainer);
- if (menu_container->Contains(target))
- return;
- aura::Window* keyboard_container = root_controller->GetContainer(
- ash::internal::kShellWindowId_VirtualKeyboardContainer);
- if (keyboard_container->Contains(target))
- return;
- }
- }
-
- if (view_ && is_visible_) {
- aura::Window* window = view_->GetWidget()->GetNativeView();
- gfx::Point window_local_point(event->root_location());
- aura::Window::ConvertPointToTarget(window->GetRootWindow(),
- window,
- &window_local_point);
- // Use HitTest to respect the hit test mask of the bubble.
- if (!window->HitTest(window_local_point))
- SetVisible(false, window);
- }
-}
-
-void AppListController::UpdateBounds() {
- if (view_ && is_visible_)
- view_->UpdateBounds();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, aura::EventFilter implementation:
-
-void AppListController::OnMouseEvent(ui::MouseEvent* event) {
- if (event->type() == ui::ET_MOUSE_PRESSED)
- ProcessLocatedEvent(event);
-}
-
-void AppListController::OnGestureEvent(ui::GestureEvent* event) {
- if (event->type() == ui::ET_GESTURE_TAP_DOWN)
- ProcessLocatedEvent(event);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, aura::FocusObserver implementation:
-
-void AppListController::OnWindowFocused(aura::Window* gained_focus,
- aura::Window* lost_focus) {
- if (view_ && is_visible_) {
- aura::Window* applist_window = view_->GetWidget()->GetNativeView();
- aura::Window* applist_container = applist_window->parent();
-
- if (applist_container->Contains(lost_focus) &&
- (!gained_focus || !applist_container->Contains(gained_focus))) {
- SetVisible(false, applist_window);
- }
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, aura::WindowObserver implementation:
-void AppListController::OnWindowBoundsChanged(aura::Window* root,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) {
- UpdateBounds();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, ui::ImplicitAnimationObserver implementation:
-
-void AppListController::OnImplicitAnimationsCompleted() {
- if (is_visible_ )
- view_->GetWidget()->Activate();
- else
- view_->GetWidget()->Close();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, views::WidgetObserver implementation:
-
-void AppListController::OnWidgetDestroying(views::Widget* widget) {
- DCHECK(view_->GetWidget() == widget);
- if (is_visible_)
- SetVisible(false, widget->GetNativeView());
- ResetView();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, ShellObserver implementation:
-void AppListController::OnShelfAlignmentChanged(aura::Window* root_window) {
- if (view_)
- view_->SetBubbleArrow(GetBubbleArrow(view_->GetWidget()->GetNativeView()));
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, ShelfIconObserver implementation:
-
-void AppListController::OnShelfIconPositionsChanged() {
- UpdateBounds();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, PaginationModelObserver implementation:
-
-void AppListController::TotalPagesChanged() {
-}
-
-void AppListController::SelectedPageChanged(int old_selected,
- int new_selected) {
-}
-
-void AppListController::TransitionStarted() {
-}
-
-void AppListController::TransitionChanged() {
- // |view_| could be NULL when app list is closed with a running transition.
- if (!view_)
- return;
-
- const app_list::PaginationModel::Transition& transition =
- pagination_model_->transition();
- if (pagination_model_->is_valid_page(transition.target_page))
- return;
-
- views::Widget* widget = view_->GetWidget();
- ui::LayerAnimator* widget_animator = GetLayer(widget)->GetAnimator();
- if (!pagination_model_->IsRevertingCurrentTransition()) {
- // Update cached |view_bounds_| if it is the first over-scroll move and
- // widget does not have running animations.
- if (!should_snap_back_ && !widget_animator->is_animating())
- view_bounds_ = widget->GetWindowBoundsInScreen();
-
- const int current_page = pagination_model_->selected_page();
- const int dir = transition.target_page > current_page ? -1 : 1;
-
- const double progress = 1.0 - pow(1.0 - transition.progress, 4);
- const int shift = kMaxOverScrollShift * progress * dir;
-
- gfx::Rect shifted(view_bounds_);
- shifted.set_x(shifted.x() + shift);
- widget->SetBounds(shifted);
- should_snap_back_ = true;
- } else if (should_snap_back_) {
- should_snap_back_ = false;
- ui::ScopedLayerAnimationSettings animation(widget_animator);
- animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds(
- app_list::kOverscrollPageTransitionDurationMs));
- widget->SetBounds(view_bounds_);
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/app_list_controller.h b/chromium/ash/wm/app_list_controller.h
deleted file mode 100644
index 2e4175839ed..00000000000
--- a/chromium/ash/wm/app_list_controller.h
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_APP_LIST_CONTROLLER_H_
-#define ASH_WM_APP_LIST_CONTROLLER_H_
-
-#include "ash/shelf/shelf_icon_observer.h"
-#include "ash/shell_observer.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/timer/timer.h"
-#include "ui/app_list/pagination_model_observer.h"
-#include "ui/aura/client/focus_change_observer.h"
-#include "ui/aura/window_observer.h"
-#include "ui/compositor/layer_animation_observer.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/rect.h"
-#include "ui/views/widget/widget_observer.h"
-
-namespace app_list {
-class ApplicationDragAndDropHost;
-class AppListView;
-class PaginationModel;
-}
-
-namespace ui {
-class LocatedEvent;
-}
-
-namespace ash {
-namespace test {
-class AppListControllerTestApi;
-}
-
-namespace internal {
-
-// AppListController is a controller that manages app list UI for shell.
-// It creates AppListView and schedules showing/hiding animation.
-// While the UI is visible, it monitors things such as app list widget's
-// activation state and desktop mouse click to auto dismiss the UI.
-class AppListController : public ui::EventHandler,
- public aura::client::FocusChangeObserver,
- public aura::WindowObserver,
- public ui::ImplicitAnimationObserver,
- public views::WidgetObserver,
- public ShellObserver,
- public ShelfIconObserver,
- public app_list::PaginationModelObserver {
- public:
- AppListController();
- virtual ~AppListController();
-
- // Show/hide app list window. The |window| is used to deterime in
- // which display (in which the |window| exists) the app list should
- // be shown.
- void SetVisible(bool visible, aura::Window* window);
-
- // Whether app list window is visible (shown or being shown).
- bool IsVisible() const;
-
- // Returns target visibility. This differs from IsVisible() if an animation
- // is ongoing.
- bool GetTargetVisibility() const { return is_visible_; }
-
- // Returns app list window or NULL if it is not visible.
- aura::Window* GetWindow();
-
- // Returns app list view or NULL if it is not visible.
- app_list::AppListView* GetView() { return view_; }
-
- private:
- friend class test::AppListControllerTestApi;
-
- // If |drag_and_drop_host| is not NULL it will be called upon drag and drop
- // operations outside the application list.
- void SetDragAndDropHostOfCurrentAppList(
- app_list::ApplicationDragAndDropHost* drag_and_drop_host);
-
- // Sets the app list view and attempts to show it.
- void SetView(app_list::AppListView* view);
-
- // Forgets the view.
- void ResetView();
-
- // Starts show/hide animation.
- void ScheduleAnimation();
-
- void ProcessLocatedEvent(ui::LocatedEvent* event);
-
- // Makes app list bubble update its bounds.
- void UpdateBounds();
-
- // ui::EventHandler overrides:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- // aura::client::FocusChangeObserver overrides:
- virtual void OnWindowFocused(aura::Window* gained_focus,
- aura::Window* lost_focus) OVERRIDE;
-
- // aura::WindowObserver overrides:
- virtual void OnWindowBoundsChanged(aura::Window* root,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
-
- // ui::ImplicitAnimationObserver overrides:
- virtual void OnImplicitAnimationsCompleted() OVERRIDE;
-
- // views::WidgetObserver overrides:
- virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
-
- // ShellObserver overrides:
- virtual void OnShelfAlignmentChanged(aura::Window* root_window) OVERRIDE;
-
- // ShelfIconObserver overrides:
- virtual void OnShelfIconPositionsChanged() OVERRIDE;
-
- // app_list::PaginationModelObserver overrides:
- virtual void TotalPagesChanged() OVERRIDE;
- virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE;
- virtual void TransitionStarted() OVERRIDE;
- virtual void TransitionChanged() OVERRIDE;
-
- scoped_ptr<app_list::PaginationModel> pagination_model_;
-
- // Whether we should show or hide app list widget.
- bool is_visible_;
-
- // The AppListView this class manages, owned by its widget.
- app_list::AppListView* view_;
-
- // Cached bounds of |view_| for snapping back animation after over-scroll.
- gfx::Rect view_bounds_;
-
- // Whether should schedule snap back animation.
- bool should_snap_back_;
-
- DISALLOW_COPY_AND_ASSIGN(AppListController);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_APP_LIST_CONTROLLER_H_
diff --git a/chromium/ash/wm/app_list_controller_unittest.cc b/chromium/ash/wm/app_list_controller_unittest.cc
deleted file mode 100644
index 5d370489334..00000000000
--- a/chromium/ash/wm/app_list_controller_unittest.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/test_shell_delegate.h"
-#include "ash/wm/window_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-
-namespace ash {
-
-typedef test::AshTestBase AppListControllerTest;
-
-// Tests that app launcher hides when focus moves to a normal window.
-TEST_F(AppListControllerTest, HideOnFocusOut) {
- Shell::GetInstance()->ToggleAppList(NULL);
- EXPECT_TRUE(Shell::GetInstance()->GetAppListTargetVisibility());
-
- scoped_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
- wm::ActivateWindow(window.get());
-
- EXPECT_FALSE(Shell::GetInstance()->GetAppListTargetVisibility());
-}
-
-// Tests that app launcher remains visible when focus is moved to a different
-// window in kShellWindowId_AppListContainer.
-TEST_F(AppListControllerTest, RemainVisibleWhenFocusingToApplistContainer) {
- Shell::GetInstance()->ToggleAppList(NULL);
- EXPECT_TRUE(Shell::GetInstance()->GetAppListTargetVisibility());
-
- aura::Window* applist_container = Shell::GetContainer(
- Shell::GetPrimaryRootWindow(),
- internal::kShellWindowId_AppListContainer);
- scoped_ptr<aura::Window> window(
- aura::test::CreateTestWindowWithId(0, applist_container));
- wm::ActivateWindow(window.get());
-
- EXPECT_TRUE(Shell::GetInstance()->GetAppListTargetVisibility());
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/ash_focus_rules.cc b/chromium/ash/wm/ash_focus_rules.cc
deleted file mode 100644
index 453436df730..00000000000
--- a/chromium/ash/wm/ash_focus_rules.cc
+++ /dev/null
@@ -1,168 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/ash_focus_rules.h"
-
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/window_state.h"
-#include "ui/aura/window.h"
-
-namespace ash {
-namespace wm {
-namespace {
-
-// These are the list of container ids of containers which may contain windows
-// that need to be activated in the order that they should be activated.
-const int kWindowContainerIds[] = {
- internal::kShellWindowId_OverlayContainer,
- internal::kShellWindowId_LockSystemModalContainer,
- internal::kShellWindowId_SettingBubbleContainer,
- internal::kShellWindowId_LockScreenContainer,
- internal::kShellWindowId_SystemModalContainer,
- internal::kShellWindowId_AlwaysOnTopContainer,
- internal::kShellWindowId_AppListContainer,
- internal::kShellWindowId_DefaultContainer,
-
- // Docked, panel, launcher and status are intentionally checked after other
- // containers even though these layers are higher. The user expects their
- // windows to be focused before these elements.
- internal::kShellWindowId_DockedContainer,
- internal::kShellWindowId_PanelContainer,
- internal::kShellWindowId_ShelfContainer,
- internal::kShellWindowId_StatusContainer,
-};
-
-bool BelongsToContainerWithEqualOrGreaterId(const aura::Window* window,
- int container_id) {
- for (; window; window = window->parent()) {
- if (window->id() >= container_id)
- return true;
- }
- return false;
-}
-
-} // namespace
-
-////////////////////////////////////////////////////////////////////////////////
-// AshFocusRules, public:
-
-AshFocusRules::AshFocusRules() {
-}
-
-AshFocusRules::~AshFocusRules() {
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AshFocusRules, views::corewm::FocusRules:
-
-bool AshFocusRules::SupportsChildActivation(aura::Window* window) const {
- if (window->id() == internal::kShellWindowId_DefaultContainer)
- return true;
-
- for (size_t i = 0; i < arraysize(kWindowContainerIds); i++) {
- if (window->id() == kWindowContainerIds[i])
- return true;
- }
- return false;
-}
-
-bool AshFocusRules::IsWindowConsideredVisibleForActivation(
- aura::Window* window) const {
- if (BaseFocusRules::IsWindowConsideredVisibleForActivation(window))
- return true;
-
- // Minimized windows are hidden in their minimized state, but they can always
- // be activated.
- if (wm::GetWindowState(window)->IsMinimized())
- return true;
-
- return window->TargetVisibility() && (window->parent()->id() ==
- internal::kShellWindowId_DefaultContainer || window->parent()->id() ==
- internal::kShellWindowId_LockScreenContainer);
-}
-
-bool AshFocusRules::CanActivateWindow(aura::Window* window) const {
- // Clearing activation is always permissible.
- if (!window)
- return true;
-
- if (!BaseFocusRules::CanActivateWindow(window))
- return false;
-
- if (Shell::GetInstance()->IsSystemModalWindowOpen()) {
- return BelongsToContainerWithEqualOrGreaterId(
- window, internal::kShellWindowId_SystemModalContainer);
- }
-
- return true;
-}
-
-aura::Window* AshFocusRules::GetNextActivatableWindow(
- aura::Window* ignore) const {
- DCHECK(ignore);
-
- int starting_container_index = 0;
- // If the container of the window losing focus is in the list, start from that
- // container.
- aura::Window* root = ignore->GetRootWindow();
- if (!root)
- root = Shell::GetTargetRootWindow();
- int container_count = static_cast<int>(arraysize(kWindowContainerIds));
- for (int i = 0; ignore && i < container_count; i++) {
- aura::Window* container = Shell::GetContainer(root, kWindowContainerIds[i]);
- if (container && container->Contains(ignore)) {
- starting_container_index = i;
- break;
- }
- }
-
- // Look for windows to focus in |ignore|'s container. If none are found, we
- // look in all the containers in front of |ignore|'s container, then all
- // behind.
- aura::Window* window = NULL;
- for (int i = starting_container_index; !window && i < container_count; i++)
- window = GetTopmostWindowToActivateForContainerIndex(i, ignore);
- if (!window && starting_container_index > 0) {
- for (int i = starting_container_index - 1; !window && i >= 0; i--)
- window = GetTopmostWindowToActivateForContainerIndex(i, ignore);
- }
- return window;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AshFocusRules, private:
-
-aura::Window* AshFocusRules::GetTopmostWindowToActivateForContainerIndex(
- int index,
- aura::Window* ignore) const {
- aura::Window* window = NULL;
- aura::Window* root = ignore ? ignore->GetRootWindow() : NULL;
- aura::Window::Windows containers = Shell::GetContainersFromAllRootWindows(
- kWindowContainerIds[index], root);
- for (aura::Window::Windows::const_iterator iter = containers.begin();
- iter != containers.end() && !window; ++iter) {
- window = GetTopmostWindowToActivateInContainer((*iter), ignore);
- }
- return window;
-}
-
-aura::Window* AshFocusRules::GetTopmostWindowToActivateInContainer(
- aura::Window* container,
- aura::Window* ignore) const {
- for (aura::Window::Windows::const_reverse_iterator i =
- container->children().rbegin();
- i != container->children().rend();
- ++i) {
- WindowState* window_state = GetWindowState(*i);
- if (*i != ignore &&
- window_state->CanActivate() &&
- !window_state->IsMinimized())
- return *i;
- }
- return NULL;
-}
-
-} // namespace wm
-} // namespace ash
diff --git a/chromium/ash/wm/ash_focus_rules.h b/chromium/ash/wm/ash_focus_rules.h
deleted file mode 100644
index f53a70b33a6..00000000000
--- a/chromium/ash/wm/ash_focus_rules.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_ASH_FOCUS_RULES_H_
-#define ASH_WM_ASH_FOCUS_RULES_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/views/corewm/base_focus_rules.h"
-
-namespace ash {
-namespace wm {
-
-class ASH_EXPORT AshFocusRules : public views::corewm::BaseFocusRules {
- public:
- AshFocusRules();
- virtual ~AshFocusRules();
-
- private:
- // Overridden from views::corewm::BaseFocusRules:
- virtual bool SupportsChildActivation(aura::Window* window) const OVERRIDE;
- virtual bool IsWindowConsideredVisibleForActivation(
- aura::Window* window) const OVERRIDE;
- virtual bool CanActivateWindow(aura::Window* window) const OVERRIDE;
- virtual aura::Window* GetNextActivatableWindow(
- aura::Window* ignore) const OVERRIDE;
-
- aura::Window* GetTopmostWindowToActivateForContainerIndex(
- int index,
- aura::Window* ignore) const;
- aura::Window* GetTopmostWindowToActivateInContainer(
- aura::Window* container,
- aura::Window* ignore) const;
-
- DISALLOW_COPY_AND_ASSIGN(AshFocusRules);
-};
-
-} // namespace wm
-} // namespace ash
-
-#endif // ASH_WM_ASH_FOCUS_RULES_H_
diff --git a/chromium/ash/wm/ash_native_cursor_manager.cc b/chromium/ash/wm/ash_native_cursor_manager.cc
deleted file mode 100644
index d31579280d1..00000000000
--- a/chromium/ash/wm/ash_native_cursor_manager.cc
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/ash_native_cursor_manager.h"
-
-#include "ash/display/display_controller.h"
-#include "ash/display/mirror_window_controller.h"
-#include "ash/shell.h"
-#include "ash/wm/image_cursors.h"
-#include "base/logging.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/base/cursor/cursor.h"
-
-namespace ash {
-namespace {
-
-void SetCursorOnAllRootWindows(gfx::NativeCursor cursor) {
- aura::Window::Windows root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- for (aura::Window::Windows::iterator iter = root_windows.begin();
- iter != root_windows.end(); ++iter)
- (*iter)->GetDispatcher()->SetCursor(cursor);
-#if defined(OS_CHROMEOS)
- Shell::GetInstance()->display_controller()->
- mirror_window_controller()->SetMirroredCursor(cursor);
-#endif
-}
-
-void NotifyCursorVisibilityChange(bool visible) {
- aura::Window::Windows root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- for (aura::Window::Windows::iterator iter = root_windows.begin();
- iter != root_windows.end(); ++iter)
- (*iter)->GetDispatcher()->OnCursorVisibilityChanged(visible);
-#if defined(OS_CHROMEOS)
- Shell::GetInstance()->display_controller()->mirror_window_controller()->
- SetMirroredCursorVisibility(visible);
-#endif
-}
-
-void NotifyMouseEventsEnableStateChange(bool enabled) {
- aura::Window::Windows root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- for (aura::Window::Windows::iterator iter = root_windows.begin();
- iter != root_windows.end(); ++iter)
- (*iter)->GetDispatcher()->OnMouseEventsEnableStateChanged(enabled);
- // Mirror window never process events.
-}
-
-} // namespace
-
-AshNativeCursorManager::AshNativeCursorManager()
- : image_cursors_(new ImageCursors) {
-}
-
-AshNativeCursorManager::~AshNativeCursorManager() {
-}
-
-void AshNativeCursorManager::SetDisplay(
- const gfx::Display& display,
- views::corewm::NativeCursorManagerDelegate* delegate) {
- if (image_cursors_->SetDisplay(display))
- SetCursor(delegate->GetCursor(), delegate);
-}
-
-void AshNativeCursorManager::SetCursor(
- gfx::NativeCursor cursor,
- views::corewm::NativeCursorManagerDelegate* delegate) {
- gfx::NativeCursor new_cursor = cursor;
- image_cursors_->SetPlatformCursor(&new_cursor);
- new_cursor.set_device_scale_factor(
- image_cursors_->GetDisplay().device_scale_factor());
-
- delegate->CommitCursor(new_cursor);
-
- if (delegate->IsCursorVisible())
- SetCursorOnAllRootWindows(new_cursor);
-}
-
-void AshNativeCursorManager::SetCursorSet(
- ui::CursorSetType cursor_set,
- views::corewm::NativeCursorManagerDelegate* delegate) {
- image_cursors_->SetCursorSet(cursor_set);
- delegate->CommitCursorSet(cursor_set);
-
- // Sets the cursor to reflect the scale change immediately.
- if (delegate->IsCursorVisible())
- SetCursor(delegate->GetCursor(), delegate);
-}
-
-void AshNativeCursorManager::SetScale(
- float scale,
- views::corewm::NativeCursorManagerDelegate* delegate) {
- image_cursors_->SetScale(scale);
- delegate->CommitScale(scale);
-
- // Sets the cursor to reflect the scale change immediately.
- SetCursor(delegate->GetCursor(), delegate);
-}
-
-void AshNativeCursorManager::SetVisibility(
- bool visible,
- views::corewm::NativeCursorManagerDelegate* delegate) {
- delegate->CommitVisibility(visible);
-
- if (visible) {
- SetCursor(delegate->GetCursor(), delegate);
- } else {
- gfx::NativeCursor invisible_cursor(ui::kCursorNone);
- image_cursors_->SetPlatformCursor(&invisible_cursor);
- SetCursorOnAllRootWindows(invisible_cursor);
- }
-
- NotifyCursorVisibilityChange(visible);
-}
-
-void AshNativeCursorManager::SetMouseEventsEnabled(
- bool enabled,
- views::corewm::NativeCursorManagerDelegate* delegate) {
- delegate->CommitMouseEventsEnabled(enabled);
-
- if (enabled) {
- aura::Env::GetInstance()->set_last_mouse_location(
- disabled_cursor_location_);
- } else {
- disabled_cursor_location_ = aura::Env::GetInstance()->last_mouse_location();
- }
-
- SetVisibility(delegate->IsCursorVisible(), delegate);
- NotifyMouseEventsEnableStateChange(enabled);
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/ash_native_cursor_manager.h b/chromium/ash/wm/ash_native_cursor_manager.h
deleted file mode 100644
index f307b1663d7..00000000000
--- a/chromium/ash/wm/ash_native_cursor_manager.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_ASH_NATIVE_CURSOR_MANAGER_H_
-#define ASH_WM_ASH_NATIVE_CURSOR_MANAGER_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/strings/string16.h"
-#include "ui/gfx/native_widget_types.h"
-#include "ui/gfx/point.h"
-#include "ui/views/corewm/native_cursor_manager.h"
-#include "ui/views/corewm/native_cursor_manager_delegate.h"
-
-namespace ash {
-
-namespace test {
-class CursorManagerTestApi;
-}
-
-class ImageCursors;
-
-// This does the ash-specific setting of cursor details like cursor
-// visibility. It communicates back with the CursorManager through the
-// NativeCursorManagerDelegate interface, which receives messages about what
-// changes were acted on.
-class ASH_EXPORT AshNativeCursorManager
- : public views::corewm::NativeCursorManager {
- public:
- AshNativeCursorManager();
- virtual ~AshNativeCursorManager();
-
- private:
- friend class test::CursorManagerTestApi;
-
- // Overridden from views::corewm::NativeCursorManager:
- virtual void SetDisplay(
- const gfx::Display& display,
- views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
- virtual void SetCursor(
- gfx::NativeCursor cursor,
- views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
- virtual void SetVisibility(
- bool visible,
- views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
- virtual void SetScale(
- float scale,
- views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
- virtual void SetCursorSet(
- ui::CursorSetType cursor_set,
- views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
- virtual void SetMouseEventsEnabled(
- bool enabled,
- views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
-
- // The cursor location where the cursor was disabled.
- gfx::Point disabled_cursor_location_;
-
- scoped_ptr<ImageCursors> image_cursors_;
-
- DISALLOW_COPY_AND_ASSIGN(AshNativeCursorManager);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_ASH_NATIVE_CURSOR_MANAGER_H_
diff --git a/chromium/ash/wm/ash_native_cursor_manager_interactive_uitest.cc b/chromium/ash/wm/ash_native_cursor_manager_interactive_uitest.cc
deleted file mode 100644
index 19e3bc4e04b..00000000000
--- a/chromium/ash/wm/ash_native_cursor_manager_interactive_uitest.cc
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-#include "ash/wm/ash_native_cursor_manager.h"
-
-#include "ash/display/display_info.h"
-#include "ash/display/display_manager.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/cursor_manager_test_api.h"
-#include "base/run_loop.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/base/test/ui_controls.h"
-
-#if defined(USE_X11)
-#include <X11/Xlib.h>
-
-#include "base/message_loop/message_pump_x11.h"
-#endif
-
-namespace ash {
-
-using views::corewm::CursorManager;
-typedef test::AshTestBase AshNativeCursorManagerTest;
-
-namespace {
-
-internal::DisplayInfo CreateDisplayInfo(int64 id,
- const gfx::Rect& bounds,
- float device_scale_factor) {
- internal::DisplayInfo info(id, "", false);
- info.SetBounds(bounds);
- info.set_device_scale_factor(device_scale_factor);
- return info;
-}
-
-void MoveMouseSync(aura::Window* window, int x, int y) {
-#if defined(USE_X11)
- XWarpPointer(base::MessagePumpX11::GetDefaultXDisplay(),
- None,
- window->GetDispatcher()->host()->GetAcceleratedWidget(),
- 0, 0, 0, 0,
- x, y);
-#endif
- // Send and wait for a key event to make sure that mouse
- // events are fully processed.
- base::RunLoop loop;
- ui_controls::SendKeyPressNotifyWhenDone(
- window,
- ui::VKEY_SPACE,
- false,
- false,
- false,
- false,
- loop.QuitClosure());
- loop.Run();
-}
-
-} // namespace
-
-#if defined(USE_X11)
-#define MAYBE_CursorChangeOnEnterNotify CursorChangeOnEnterNotify
-#else
-#define MAYBE_CursorChangeOnEnterNotify DISABLED_CursorChangeOnEnterNotify
-#endif
-
-TEST_F(AshNativeCursorManagerTest, MAYBE_CursorChangeOnEnterNotify) {
- CursorManager* cursor_manager = Shell::GetInstance()->cursor_manager();
- test::CursorManagerTestApi test_api(cursor_manager);
-
- internal::DisplayManager* display_manager =
- Shell::GetInstance()->display_manager();
- internal::DisplayInfo display_info1 =
- CreateDisplayInfo(10, gfx::Rect(0, 0, 500, 300), 1.0f);
- internal::DisplayInfo display_info2 =
- CreateDisplayInfo(20, gfx::Rect(500, 0, 500, 300), 2.0f);
- std::vector<internal::DisplayInfo> display_info_list;
- display_info_list.push_back(display_info1);
- display_info_list.push_back(display_info2);
- display_manager->OnNativeDisplaysChanged(display_info_list);
-
- MoveMouseSync(Shell::GetAllRootWindows()[0], 10, 10);
- EXPECT_EQ(1.0f, test_api.GetDisplay().device_scale_factor());
-
- MoveMouseSync(Shell::GetAllRootWindows()[0], 600, 10);
- EXPECT_EQ(2.0f, test_api.GetDisplay().device_scale_factor());
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/ash_native_cursor_manager_unittest.cc b/chromium/ash/wm/ash_native_cursor_manager_unittest.cc
deleted file mode 100644
index 6ca1bf2b3ec..00000000000
--- a/chromium/ash/wm/ash_native_cursor_manager_unittest.cc
+++ /dev/null
@@ -1,206 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/ash_native_cursor_manager.h"
-
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/cursor_manager_test_api.h"
-#include "ash/wm/image_cursors.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/screen.h"
-
-#if defined(OS_WIN)
-#include "base/win/windows_version.h"
-#include "ui/base/cursor/cursor_loader_win.h"
-#endif
-
-using views::corewm::CursorManager;
-
-namespace ash {
-namespace test {
-
-namespace {
-
-// A delegate for recording a mouse event location.
-class MouseEventLocationDelegate : public aura::test::TestWindowDelegate {
- public:
- MouseEventLocationDelegate() {}
- virtual ~MouseEventLocationDelegate() {}
-
- gfx::Point GetMouseEventLocationAndReset() {
- gfx::Point p = mouse_event_location_;
- mouse_event_location_.SetPoint(-100, -100);
- return p;
- }
-
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
- mouse_event_location_ = event->location();
- event->SetHandled();
- }
-
- private:
- gfx::Point mouse_event_location_;
-
- DISALLOW_COPY_AND_ASSIGN(MouseEventLocationDelegate);
-};
-
-} // namespace
-
-typedef test::AshTestBase AshNativeCursorManagerTest;
-
-TEST_F(AshNativeCursorManagerTest, LockCursor) {
- CursorManager* cursor_manager = Shell::GetInstance()->cursor_manager();
- CursorManagerTestApi test_api(cursor_manager);
- gfx::Display display(0);
-#if defined(OS_WIN)
- ui::CursorLoaderWin::SetCursorResourceModule(L"ash_unittests.exe");
-#endif
- cursor_manager->SetCursor(ui::kCursorCopy);
- EXPECT_EQ(ui::kCursorCopy, test_api.GetCurrentCursor().native_type());
- display.set_device_scale_factor(2.0f);
- display.set_rotation(gfx::Display::ROTATE_90);
- cursor_manager->SetScale(2.5f);
- cursor_manager->SetDisplay(display);
- EXPECT_EQ(2.5f, test_api.GetCurrentScale());
- EXPECT_EQ(2.0f, test_api.GetDisplay().device_scale_factor());
- EXPECT_EQ(ui::CURSOR_SET_NORMAL, test_api.GetCurrentCursorSet());
- EXPECT_EQ(gfx::Display::ROTATE_90, test_api.GetDisplay().rotation());
- EXPECT_TRUE(test_api.GetCurrentCursor().platform());
-
- cursor_manager->LockCursor();
- EXPECT_TRUE(cursor_manager->IsCursorLocked());
-
- // Cursor type does not change while cursor is locked.
- EXPECT_EQ(ui::CURSOR_SET_NORMAL, test_api.GetCurrentCursorSet());
- cursor_manager->SetCursorSet(ui::CURSOR_SET_NORMAL);
- EXPECT_EQ(ui::CURSOR_SET_NORMAL, test_api.GetCurrentCursorSet());
- cursor_manager->SetCursorSet(ui::CURSOR_SET_LARGE);
- EXPECT_EQ(ui::CURSOR_SET_LARGE, test_api.GetCurrentCursorSet());
- cursor_manager->SetCursorSet(ui::CURSOR_SET_NORMAL);
- EXPECT_EQ(ui::CURSOR_SET_NORMAL, test_api.GetCurrentCursorSet());
-
- // Cusror scale does change even while cursor is locked.
- EXPECT_EQ(2.5f, test_api.GetCurrentScale());
- cursor_manager->SetScale(1.f);
- EXPECT_EQ(1.f, test_api.GetCurrentScale());
- cursor_manager->SetScale(1.5f);
- EXPECT_EQ(1.5f, test_api.GetCurrentScale());
-
- // Cursor type does not change while cursor is locked.
- cursor_manager->SetCursor(ui::kCursorPointer);
- EXPECT_EQ(ui::kCursorCopy, test_api.GetCurrentCursor().native_type());
-
- // Device scale factor and rotation do change even while cursor is locked.
- display.set_device_scale_factor(1.0f);
- display.set_rotation(gfx::Display::ROTATE_180);
- cursor_manager->SetDisplay(display);
- EXPECT_EQ(1.0f, test_api.GetDisplay().device_scale_factor());
- EXPECT_EQ(gfx::Display::ROTATE_180, test_api.GetDisplay().rotation());
-
- cursor_manager->UnlockCursor();
- EXPECT_FALSE(cursor_manager->IsCursorLocked());
-
- // Cursor type changes to the one specified while cursor is locked.
- EXPECT_EQ(1.5f, test_api.GetCurrentScale());
- EXPECT_EQ(ui::kCursorPointer, test_api.GetCurrentCursor().native_type());
- EXPECT_EQ(1.0f, test_api.GetDisplay().device_scale_factor());
- EXPECT_TRUE(test_api.GetCurrentCursor().platform());
-}
-
-TEST_F(AshNativeCursorManagerTest, SetCursor) {
- CursorManager* cursor_manager = Shell::GetInstance()->cursor_manager();
- CursorManagerTestApi test_api(cursor_manager);
-#if defined(OS_WIN)
- ui::CursorLoaderWin::SetCursorResourceModule(L"ash_unittests.exe");
-#endif
- cursor_manager->SetCursor(ui::kCursorCopy);
- EXPECT_EQ(ui::kCursorCopy, test_api.GetCurrentCursor().native_type());
- EXPECT_TRUE(test_api.GetCurrentCursor().platform());
- cursor_manager->SetCursor(ui::kCursorPointer);
- EXPECT_EQ(ui::kCursorPointer, test_api.GetCurrentCursor().native_type());
- EXPECT_TRUE(test_api.GetCurrentCursor().platform());
-}
-
-TEST_F(AshNativeCursorManagerTest, SetCursorSet) {
- CursorManager* cursor_manager = Shell::GetInstance()->cursor_manager();
- CursorManagerTestApi test_api(cursor_manager);
-
- EXPECT_EQ(ui::CURSOR_SET_NORMAL, test_api.GetCurrentCursorSet());
-
- cursor_manager->SetCursorSet(ui::CURSOR_SET_NORMAL);
- EXPECT_EQ(ui::CURSOR_SET_NORMAL, test_api.GetCurrentCursorSet());
-
- cursor_manager->SetCursorSet(ui::CURSOR_SET_LARGE);
- EXPECT_EQ(ui::CURSOR_SET_LARGE, test_api.GetCurrentCursorSet());
-
- cursor_manager->SetCursorSet(ui::CURSOR_SET_NORMAL);
- EXPECT_EQ(ui::CURSOR_SET_NORMAL, test_api.GetCurrentCursorSet());
-}
-
-TEST_F(AshNativeCursorManagerTest, SetScale) {
- CursorManager* cursor_manager = Shell::GetInstance()->cursor_manager();
- CursorManagerTestApi test_api(cursor_manager);
-
- EXPECT_EQ(1.f, test_api.GetCurrentScale());
-
- cursor_manager->SetScale(2.5f);
- EXPECT_EQ(2.5f, test_api.GetCurrentScale());
-
- cursor_manager->SetScale(1.f);
- EXPECT_EQ(1.f, test_api.GetCurrentScale());
-}
-
-TEST_F(AshNativeCursorManagerTest, SetDeviceScaleFactorAndRotation) {
- CursorManager* cursor_manager = Shell::GetInstance()->cursor_manager();
- CursorManagerTestApi test_api(cursor_manager);
-
- gfx::Display display(0);
- display.set_device_scale_factor(2.0f);
- cursor_manager->SetDisplay(display);
- EXPECT_EQ(2.0f, test_api.GetDisplay().device_scale_factor());
- EXPECT_EQ(gfx::Display::ROTATE_0, test_api.GetDisplay().rotation());
-
- display.set_device_scale_factor(1.0f);
- display.set_rotation(gfx::Display::ROTATE_270);
- cursor_manager->SetDisplay(display);
- EXPECT_EQ(1.0f, test_api.GetDisplay().device_scale_factor());
- EXPECT_EQ(gfx::Display::ROTATE_270, test_api.GetDisplay().rotation());
-}
-
-TEST_F(AshNativeCursorManagerTest, DisabledQueryMouseLocation) {
- aura::Window* root_window = Shell::GetInstance()->GetPrimaryRootWindow();
-#if defined(OS_WIN)
- if (base::win::GetVersion() < base::win::VERSION_WIN8)
- return;
- // On Windows 8 the ASH environment has two processes, the viewer process
- // which runs in Windows 8 mode and the browser process. The initialization
- // happens when the viewer process connects to the browser channel and sends
- // the initial IPC message.
- RunAllPendingInMessageLoop();
-#endif
- root_window->MoveCursorTo(gfx::Point(10, 10));
-#if defined(OS_WIN)
- // The MoveCursor operation on Windows 8 is implemented in the viewer process
- // which is notified by an IPC message to perform the MoveCursor operation.
- // We need to ensure that the IPC is delivered to the viewer process and it
- // the ACK is sent back from the viewer indicating that the operation
- // completed.
- Sleep(100);
- RunAllPendingInMessageLoop();
-#endif
- aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher();
- gfx::Point mouse_location;
- EXPECT_TRUE(dispatcher->host()->QueryMouseLocation(&mouse_location));
- EXPECT_EQ("10,10", mouse_location.ToString());
- Shell::GetInstance()->cursor_manager()->DisableMouseEvents();
- EXPECT_FALSE(dispatcher->host()->QueryMouseLocation(&mouse_location));
- EXPECT_EQ("0,0", mouse_location.ToString());
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/wm/base_layout_manager.cc b/chromium/ash/wm/base_layout_manager.cc
deleted file mode 100644
index 5070654ae8d..00000000000
--- a/chromium/ash/wm/base_layout_manager.cc
+++ /dev/null
@@ -1,281 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/base_layout_manager.h"
-
-#include "ash/screen_ash.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shell.h"
-#include "ash/wm/window_animations.h"
-#include "ash/wm/window_properties.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/workspace_window_resizer.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/window.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/compositor/layer.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/corewm/corewm_switches.h"
-#include "ui/views/corewm/window_util.h"
-
-namespace ash {
-namespace internal {
-
-/////////////////////////////////////////////////////////////////////////////
-// BaseLayoutManager, public:
-
-BaseLayoutManager::BaseLayoutManager(aura::Window* root_window)
- : root_window_(root_window) {
- Shell::GetInstance()->activation_client()->AddObserver(this);
- Shell::GetInstance()->AddShellObserver(this);
- root_window_->AddObserver(this);
-}
-
-BaseLayoutManager::~BaseLayoutManager() {
- if (root_window_)
- root_window_->RemoveObserver(this);
- for (WindowSet::const_iterator i = windows_.begin(); i != windows_.end(); ++i)
- (*i)->RemoveObserver(this);
- Shell::GetInstance()->RemoveShellObserver(this);
- Shell::GetInstance()->activation_client()->RemoveObserver(this);
-}
-
-// static
-gfx::Rect BaseLayoutManager::BoundsWithScreenEdgeVisible(
- aura::Window* window,
- const gfx::Rect& restore_bounds) {
- gfx::Rect max_bounds =
- ash::ScreenAsh::GetMaximizedWindowBoundsInParent(window);
- // If the restore_bounds are more than 1 grid step away from the size the
- // window would be when maximized, inset it.
- max_bounds.Inset(ash::internal::WorkspaceWindowResizer::kScreenEdgeInset,
- ash::internal::WorkspaceWindowResizer::kScreenEdgeInset);
- if (restore_bounds.Contains(max_bounds))
- return max_bounds;
- return restore_bounds;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// BaseLayoutManager, aura::LayoutManager overrides:
-
-void BaseLayoutManager::OnWindowResized() {
-}
-
-void BaseLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
- windows_.insert(child);
- child->AddObserver(this);
- wm::WindowState* window_state = wm::GetWindowState(child);
- window_state->AddObserver(this);
-
- // Only update the bounds if the window has a show state that depends on the
- // workspace area.
- if (window_state->IsMaximizedOrFullscreen())
- UpdateBoundsFromShowState(window_state);
-}
-
-void BaseLayoutManager::OnWillRemoveWindowFromLayout(aura::Window* child) {
- windows_.erase(child);
- child->RemoveObserver(this);
- wm::GetWindowState(child)->RemoveObserver(this);
-}
-
-void BaseLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
-}
-
-void BaseLayoutManager::OnChildWindowVisibilityChanged(aura::Window* child,
- bool visible) {
- wm::WindowState* window_state = wm::GetWindowState(child);
- // Attempting to show a minimized window. Unminimize it.
- if (visible && window_state->IsMinimized())
- window_state->Unminimize();
-}
-
-void BaseLayoutManager::SetChildBounds(aura::Window* child,
- const gfx::Rect& requested_bounds) {
- gfx::Rect child_bounds(requested_bounds);
- wm::WindowState* window_state = wm::GetWindowState(child);
- // Some windows rely on this to set their initial bounds.
- if (window_state->IsMaximized())
- child_bounds = ScreenAsh::GetMaximizedWindowBoundsInParent(child);
- else if (window_state->IsFullscreen())
- child_bounds = ScreenAsh::GetDisplayBoundsInParent(child);
- SetChildBoundsDirect(child, child_bounds);
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// BaseLayoutManager, aura::WindowObserver overrides:
-
-void BaseLayoutManager::OnWindowDestroying(aura::Window* window) {
- if (root_window_ == window) {
- root_window_->RemoveObserver(this);
- root_window_ = NULL;
- }
-}
-
-void BaseLayoutManager::OnWindowBoundsChanged(aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) {
- if (root_window_ == window)
- AdjustAllWindowsBoundsForWorkAreaChange(ADJUST_WINDOW_DISPLAY_SIZE_CHANGED);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// BaseLayoutManager, aura::client::ActivationChangeObserver implementation:
-
-void BaseLayoutManager::OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) {
- wm::WindowState* window_state = wm::GetWindowState(gained_active);
- if (window_state && window_state->IsMinimized() &&
- !gained_active->IsVisible()) {
- window_state->Unminimize();
- DCHECK(!window_state->IsMinimized());
- }
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// BaseLayoutManager, ash::ShellObserver overrides:
-
-void BaseLayoutManager::OnDisplayWorkAreaInsetsChanged() {
- AdjustAllWindowsBoundsForWorkAreaChange(
- ADJUST_WINDOW_WORK_AREA_INSETS_CHANGED);
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// BaseLayoutManager, ash::wm::WindowStateObserver overrides:
-
-void BaseLayoutManager::OnWindowShowTypeChanged(wm::WindowState* window_state,
- wm::WindowShowType old_type) {
- ui::WindowShowState old_state = ToWindowShowState(old_type);
- ui::WindowShowState new_state = window_state->GetShowState();
-
- if (old_state != new_state && old_state != ui::SHOW_STATE_MINIMIZED &&
- !window_state->HasRestoreBounds() &&
- ((new_state == ui::SHOW_STATE_MAXIMIZED &&
- old_state != ui::SHOW_STATE_FULLSCREEN) ||
- (new_state == ui::SHOW_STATE_FULLSCREEN &&
- old_state != ui::SHOW_STATE_MAXIMIZED))) {
- window_state->SetRestoreBoundsInParent(window_state->window()->bounds());
- }
-
- UpdateBoundsFromShowState(window_state);
- ShowStateChanged(window_state, old_state);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// BaseLayoutManager, protected:
-
-void BaseLayoutManager::ShowStateChanged(
- wm::WindowState* window_state,
- ui::WindowShowState last_show_state) {
- if (window_state->IsMinimized()) {
- if (last_show_state == ui::SHOW_STATE_MINIMIZED)
- return;
-
- // Save the previous show state so that we can correctly restore it.
- window_state->window()->SetProperty(aura::client::kRestoreShowStateKey,
- last_show_state);
- views::corewm::SetWindowVisibilityAnimationType(
- window_state->window(), WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE);
-
- // Hide the window.
- window_state->window()->Hide();
- // Activate another window.
- if (window_state->IsActive())
- window_state->Deactivate();
- } else if ((window_state->window()->TargetVisibility() ||
- last_show_state == ui::SHOW_STATE_MINIMIZED) &&
- !window_state->window()->layer()->visible()) {
- // The layer may be hidden if the window was previously minimized. Make
- // sure it's visible.
- window_state->window()->Show();
- if (last_show_state == ui::SHOW_STATE_MINIMIZED &&
- !window_state->IsMaximizedOrFullscreen()) {
- window_state->set_always_restores_to_restore_bounds(false);
- }
- }
-}
-
-void BaseLayoutManager::AdjustAllWindowsBoundsForWorkAreaChange(
- AdjustWindowReason reason) {
- // Don't do any adjustments of the insets while we are in screen locked mode.
- // This would happen if the launcher was auto hidden before the login screen
- // was shown and then gets shown when the login screen gets presented.
- if (reason == ADJUST_WINDOW_WORK_AREA_INSETS_CHANGED &&
- Shell::GetInstance()->session_state_delegate()->IsScreenLocked())
- return;
-
- // If a user plugs an external display into a laptop running Aura the
- // display size will change. Maximized windows need to resize to match.
- // We also do this when developers running Aura on a desktop manually resize
- // the host window.
- // We also need to do this when the work area insets changes.
- for (WindowSet::const_iterator it = windows_.begin();
- it != windows_.end();
- ++it) {
- AdjustWindowBoundsForWorkAreaChange(wm::GetWindowState(*it), reason);
- }
-}
-
-void BaseLayoutManager::AdjustWindowBoundsForWorkAreaChange(
- wm::WindowState* window_state,
- AdjustWindowReason reason) {
- aura::Window* window = window_state->window();
- if (window_state->IsMaximized()) {
- SetChildBoundsDirect(
- window, ScreenAsh::GetMaximizedWindowBoundsInParent(window));
- } else if (window_state->IsFullscreen()) {
- SetChildBoundsDirect(
- window, ScreenAsh::GetDisplayBoundsInParent(window));
- } else {
- // The work area may be smaller than the full screen.
- gfx::Rect display_rect =
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(window);
- // Put as much of the window as possible within the display area.
- gfx::Rect bounds = window->bounds();
- bounds.AdjustToFit(display_rect);
- window->SetBounds(bounds);
- }
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// BaseLayoutManager, private:
-
-void BaseLayoutManager::UpdateBoundsFromShowState(
- wm::WindowState* window_state) {
- aura::Window* window = window_state->window();
- switch (window_state->GetShowState()) {
- case ui::SHOW_STATE_DEFAULT:
- case ui::SHOW_STATE_NORMAL: {
- if (window_state->HasRestoreBounds()) {
- gfx::Rect bounds_in_parent = window_state->GetRestoreBoundsInParent();
- SetChildBoundsDirect(window,
- BoundsWithScreenEdgeVisible(window,
- bounds_in_parent));
- }
- window_state->ClearRestoreBounds();
- break;
- }
-
- case ui::SHOW_STATE_MAXIMIZED:
- SetChildBoundsDirect(
- window, ScreenAsh::GetMaximizedWindowBoundsInParent(window));
- break;
-
- case ui::SHOW_STATE_FULLSCREEN:
- // Don't animate the full-screen window transition.
- // TODO(jamescook): Use animation here. Be sure the lock screen works.
- SetChildBoundsDirect(window,
- ScreenAsh::GetDisplayBoundsInParent(window));
- break;
-
- default:
- break;
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/base_layout_manager.h b/chromium/ash/wm/base_layout_manager.h
deleted file mode 100644
index 6f74e4c8f94..00000000000
--- a/chromium/ash/wm/base_layout_manager.h
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_BASE_LAYOUT_MANAGER_H_
-#define ASH_WM_BASE_LAYOUT_MANAGER_H_
-
-#include <set>
-
-#include "ash/ash_export.h"
-#include "ash/shell_observer.h"
-#include "ash/wm/window_state_observer.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/aura/client/activation_change_observer.h"
-#include "ui/aura/layout_manager.h"
-#include "ui/aura/window_observer.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/events/event_handler.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-namespace wm {
-class WindowState;
-}
-
-namespace internal {
-
-// BaseLayoutManager is the simplest possible implementation for a window
-// layout manager. It listens for changes to kShowStateKey and resizes the
-// window appropriately. Subclasses should be sure to invoke the base class
-// for adding and removing windows, otherwise show state will not be tracked
-// properly.
-class ASH_EXPORT BaseLayoutManager
- : public aura::LayoutManager,
- public aura::WindowObserver,
- public aura::client::ActivationChangeObserver,
- public ShellObserver,
- public wm::WindowStateObserver {
- public:
- typedef std::set<aura::Window*> WindowSet;
-
- explicit BaseLayoutManager(aura::Window* root_window);
- virtual ~BaseLayoutManager();
-
- const WindowSet& windows() const { return windows_; }
-
- // Given a |window| and tentative |restore_bounds|, returns new bounds that
- // ensure that at least a few pixels of the screen background are visible
- // outside the edges of the window.
- static gfx::Rect BoundsWithScreenEdgeVisible(aura::Window* window,
- const gfx::Rect& restore_bounds);
-
- // aura::LayoutManager overrides:
- virtual void OnWindowResized() OVERRIDE;
- virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE;
- virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE;
- virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE;
- virtual void OnChildWindowVisibilityChanged(aura::Window* child,
- bool visible) OVERRIDE;
- virtual void SetChildBounds(aura::Window* child,
- const gfx::Rect& requested_bounds) OVERRIDE;
-
- // aura::WindowObserver overrides:
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
- virtual void OnWindowBoundsChanged(aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
-
- // aura::client::ActivationChangeObserver overrides:
- virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) OVERRIDE;
-
- // ash::ShellObserver overrides:
- virtual void OnDisplayWorkAreaInsetsChanged() OVERRIDE;
-
- // wm::WindowStateObserver overrides:
- virtual void OnWindowShowTypeChanged(wm::WindowState* window_state,
- wm::WindowShowType type) OVERRIDE;
-
- protected:
- enum AdjustWindowReason {
- ADJUST_WINDOW_DISPLAY_SIZE_CHANGED,
- ADJUST_WINDOW_WORK_AREA_INSETS_CHANGED,
- };
-
- // Invoked from OnWindowPropertyChanged() if |kShowStateKey| changes.
- virtual void ShowStateChanged(wm::WindowState* window_state,
- ui::WindowShowState last_show_state);
-
- // Adjusts the window's bounds when the display area changes for given
- // window. This happens when the display size, work area insets or
- // the display on which the window exists has changed.
- // If this is called for a display size change (i.e. |reason|
- // is ADJUST_WINDOW_DISPLAY_SIZE_CHANGED), the non-maximized/non-fullscreen
- // windows are readjusted to make sure the window is completely within the
- // display region. Otherwise, it makes sure at least some parts of the window
- // is on display.
- virtual void AdjustAllWindowsBoundsForWorkAreaChange(
- AdjustWindowReason reason);
-
- // Adjusts the sizes of the specific window in respond to a screen change or
- // display-area size change.
- virtual void AdjustWindowBoundsForWorkAreaChange(
- wm::WindowState* window_state,
- AdjustWindowReason reason);
-
- aura::Window* root_window() { return root_window_; }
-
- private:
- // Update window bounds based on a change in show state.
- void UpdateBoundsFromShowState(wm::WindowState* controller);
-
- // Set of windows we're listening to.
- WindowSet windows_;
-
- aura::Window* root_window_;
-
- DISALLOW_COPY_AND_ASSIGN(BaseLayoutManager);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_BASE_LAYOUT_MANAGER_H_
diff --git a/chromium/ash/wm/base_layout_manager_unittest.cc b/chromium/ash/wm/base_layout_manager_unittest.cc
deleted file mode 100644
index 9f4b9ed12fe..00000000000
--- a/chromium/ash/wm/base_layout_manager_unittest.cc
+++ /dev/null
@@ -1,313 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/base_layout_manager.h"
-
-#include "ash/screen_ash.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/workspace_window_resizer.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/gfx/insets.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-
-namespace {
-
-class BaseLayoutManagerTest : public test::AshTestBase {
- public:
- BaseLayoutManagerTest() {}
- virtual ~BaseLayoutManagerTest() {}
-
- virtual void SetUp() OVERRIDE {
- test::AshTestBase::SetUp();
- UpdateDisplay("800x600");
- aura::Window* default_container = Shell::GetContainer(
- Shell::GetPrimaryRootWindow(),
- internal::kShellWindowId_DefaultContainer);
- default_container->SetLayoutManager(new internal::BaseLayoutManager(
- Shell::GetPrimaryRootWindow()));
- }
-
- aura::Window* CreateTestWindow(const gfx::Rect& bounds) {
- return CreateTestWindowInShellWithBounds(bounds);
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BaseLayoutManagerTest);
-};
-
-// Tests normal->maximize->normal.
-TEST_F(BaseLayoutManagerTest, Maximize) {
- gfx::Rect bounds(100, 100, 200, 200);
- scoped_ptr<aura::Window> window(CreateTestWindow(bounds));
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- // Maximized window fills the work area, not the whole display.
- EXPECT_EQ(
- ScreenAsh::GetMaximizedWindowBoundsInParent(window.get()).ToString(),
- window->bounds().ToString());
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- EXPECT_EQ(bounds.ToString(), window->bounds().ToString());
-}
-
-// Tests normal->minimize->normal.
-TEST_F(BaseLayoutManagerTest, Minimize) {
- gfx::Rect bounds(100, 100, 200, 200);
- scoped_ptr<aura::Window> window(CreateTestWindow(bounds));
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
- // Note: Currently minimize doesn't do anything except set the state.
- // See crbug.com/104571.
- EXPECT_EQ(bounds.ToString(), window->bounds().ToString());
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- EXPECT_EQ(bounds.ToString(), window->bounds().ToString());
-}
-
-// A WindowDelegate which sets the focus when the window
-// becomes visible.
-class FocusDelegate : public aura::test::TestWindowDelegate {
- public:
- FocusDelegate()
- : window_(NULL),
- show_state_(ui::SHOW_STATE_END) {
- }
- virtual ~FocusDelegate() {}
-
- void set_window(aura::Window* window) { window_ = window; }
-
- // aura::test::TestWindowDelegate overrides:
- virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE {
- if (window_) {
- if (visible)
- window_->Focus();
- show_state_ = window_->GetProperty(aura::client::kShowStateKey);
- }
- }
-
- ui::WindowShowState GetShowStateAndReset() {
- ui::WindowShowState ret = show_state_;
- show_state_ = ui::SHOW_STATE_END;
- return ret;
- }
-
- private:
- aura::Window* window_;
- ui::WindowShowState show_state_;
-
- DISALLOW_COPY_AND_ASSIGN(FocusDelegate);
-};
-
-// Make sure that the window's show state is correct in
-// |WindowDelegate::OnWindowTargetVisibilityChanged|, and setting
-// focus in this callback doesn't cause DCHECK error. See
-// crbug.com/168383.
-TEST_F(BaseLayoutManagerTest, FocusDuringUnminimize) {
- FocusDelegate delegate;
- scoped_ptr<aura::Window> window(CreateTestWindowInShellWithDelegate(
- &delegate, 0, gfx::Rect(100, 100, 100, 100)));
- delegate.set_window(window.get());
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
- EXPECT_FALSE(window->IsVisible());
- EXPECT_EQ(ui::SHOW_STATE_MINIMIZED, delegate.GetShowStateAndReset());
- window->Show();
- EXPECT_TRUE(window->IsVisible());
- EXPECT_EQ(ui::SHOW_STATE_DEFAULT, delegate.GetShowStateAndReset());
-}
-
-// Tests maximized window size during root window resize.
-TEST_F(BaseLayoutManagerTest, MaximizeRootWindowResize) {
- gfx::Rect bounds(100, 100, 200, 200);
- scoped_ptr<aura::Window> window(CreateTestWindow(bounds));
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- gfx::Rect initial_work_area_bounds =
- ScreenAsh::GetMaximizedWindowBoundsInParent(window.get());
- EXPECT_EQ(initial_work_area_bounds.ToString(), window->bounds().ToString());
- // Enlarge the root window. We should still match the work area size.
- UpdateDisplay("900x700");
- EXPECT_EQ(
- ScreenAsh::GetMaximizedWindowBoundsInParent(window.get()).ToString(),
- window->bounds().ToString());
- EXPECT_NE(
- initial_work_area_bounds.ToString(),
- ScreenAsh::GetMaximizedWindowBoundsInParent(window.get()).ToString());
-}
-
-// Tests normal->fullscreen->normal.
-TEST_F(BaseLayoutManagerTest, Fullscreen) {
- gfx::Rect bounds(100, 100, 200, 200);
- scoped_ptr<aura::Window> window(CreateTestWindow(bounds));
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- // Fullscreen window fills the whole display.
- EXPECT_EQ(Shell::GetScreen()->GetDisplayNearestWindow(
- window.get()).bounds().ToString(),
- window->bounds().ToString());
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- EXPECT_EQ(bounds.ToString(), window->bounds().ToString());
-}
-
-// Tests fullscreen window size during root window resize.
-TEST_F(BaseLayoutManagerTest, FullscreenRootWindowResize) {
- gfx::Rect bounds(100, 100, 200, 200);
- scoped_ptr<aura::Window> window(CreateTestWindow(bounds));
- // Fullscreen window fills the whole display.
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- EXPECT_EQ(Shell::GetScreen()->GetDisplayNearestWindow(
- window.get()).bounds().ToString(),
- window->bounds().ToString());
- // Enlarge the root window. We should still match the display size.
- UpdateDisplay("800x600");
- EXPECT_EQ(Shell::GetScreen()->GetDisplayNearestWindow(
- window.get()).bounds().ToString(),
- window->bounds().ToString());
-}
-
-// Tests that when the screen gets smaller the windows aren't bigger than
-// the screen.
-TEST_F(BaseLayoutManagerTest, RootWindowResizeShrinksWindows) {
- scoped_ptr<aura::Window> window(
- CreateTestWindow(gfx::Rect(10, 20, 500, 400)));
- gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(
- window.get()).work_area();
- // Invariant: Window is smaller than work area.
- EXPECT_LE(window->bounds().width(), work_area.width());
- EXPECT_LE(window->bounds().height(), work_area.height());
-
- // Make the root window narrower than our window.
- UpdateDisplay("300x400");
- work_area = Shell::GetScreen()->GetDisplayNearestWindow(
- window.get()).work_area();
- EXPECT_LE(window->bounds().width(), work_area.width());
- EXPECT_LE(window->bounds().height(), work_area.height());
-
- // Make the root window shorter than our window.
- UpdateDisplay("300x200");
- work_area = Shell::GetScreen()->GetDisplayNearestWindow(
- window.get()).work_area();
- EXPECT_LE(window->bounds().width(), work_area.width());
- EXPECT_LE(window->bounds().height(), work_area.height());
-
- // Enlarging the root window does not change the window bounds.
- gfx::Rect old_bounds = window->bounds();
- UpdateDisplay("800x600");
- EXPECT_EQ(old_bounds.width(), window->bounds().width());
- EXPECT_EQ(old_bounds.height(), window->bounds().height());
-}
-
-// Tests that a maximized window with too-large restore bounds will be restored
-// to smaller than the full work area.
-TEST_F(BaseLayoutManagerTest, BoundsWithScreenEdgeVisible) {
- // Create a window with bounds that fill the screen.
- gfx::Rect bounds = Shell::GetScreen()->GetPrimaryDisplay().bounds();
- scoped_ptr<aura::Window> window(CreateTestWindow(bounds));
- // Maximize it, which writes the old bounds to restore bounds.
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- // Restore it.
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- // It should have the default maximized window bounds, inset by the grid size.
- int grid_size = internal::WorkspaceWindowResizer::kScreenEdgeInset;
- gfx::Rect max_bounds =
- ash::ScreenAsh::GetMaximizedWindowBoundsInParent(window.get());
- max_bounds.Inset(grid_size, grid_size);
- EXPECT_EQ(max_bounds.ToString(), window->bounds().ToString());
-}
-
-// Verifies maximizing sets the restore bounds, and restoring
-// restores the bounds.
-TEST_F(BaseLayoutManagerTest, MaximizeSetsRestoreBounds) {
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(1, 2, 3, 4)));
- wm::WindowState* window_state = wm::GetWindowState(window.get());
-
- // Maximize it, which will keep the previous restore bounds.
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- EXPECT_EQ("1,2 3x4", window_state->GetRestoreBoundsInParent().ToString());
-
- // Restore it, which should restore bounds and reset restore bounds.
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- EXPECT_EQ("1,2 3x4", window->bounds().ToString());
- EXPECT_FALSE(window_state->HasRestoreBounds());
-}
-
-// Verifies maximizing keeps the restore bounds if set.
-TEST_F(BaseLayoutManagerTest, MaximizeResetsRestoreBounds) {
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(1, 2, 3, 4)));
-
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- window_state->SetRestoreBoundsInParent(gfx::Rect(10, 11, 12, 13));
-
- // Maximize it, which will keep the previous restore bounds.
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- EXPECT_EQ("10,11 12x13", window_state->GetRestoreBoundsInParent().ToString());
-}
-
-// Verifies that the restore bounds do not get reset when restoring to a
-// maximzied state from a minimized state.
-TEST_F(BaseLayoutManagerTest, BoundsAfterRestoringToMaximizeFromMinimize) {
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(1, 2, 3, 4)));
- gfx::Rect bounds(10, 15, 25, 35);
- window->SetBounds(bounds);
-
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- // Maximize it, which should reset restore bounds.
- window_state->Maximize();
- EXPECT_EQ(bounds.ToString(),
- window_state->GetRestoreBoundsInParent().ToString());
-
- // Minimize the window. The restore bounds should not change.
- window_state->Minimize();
- EXPECT_EQ(bounds.ToString(),
- window_state->GetRestoreBoundsInParent().ToString());
-
- // Show the window again. The window should be maximized, and the restore
- // bounds should not change.
- window->Show();
- EXPECT_EQ(bounds.ToString(),
- window_state->GetRestoreBoundsInParent().ToString());
- EXPECT_TRUE(window_state->IsMaximized());
-
- window_state->Restore();
- EXPECT_EQ(bounds.ToString(), window->bounds().ToString());
-}
-
-// Verify if the window is not resized during screen lock. See: crbug.com/173127
-TEST_F(BaseLayoutManagerTest, NotResizeWhenScreenIsLocked) {
- SetCanLockScreen(true);
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(1, 2, 3, 4)));
- // window with AlwaysOnTop will be managed by BaseLayoutManager.
- window->SetProperty(aura::client::kAlwaysOnTopKey, true);
- window->Show();
-
- internal::ShelfLayoutManager* shelf =
- internal::ShelfLayoutManager::ForLauncher(window.get());
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
-
- window->SetBounds(ScreenAsh::GetMaximizedWindowBoundsInParent(window.get()));
- gfx::Rect window_bounds = window->bounds();
- EXPECT_EQ(
- ScreenAsh::GetMaximizedWindowBoundsInParent(window.get()).ToString(),
- window_bounds.ToString());
-
- Shell::GetInstance()->session_state_delegate()->LockScreen();
- shelf->UpdateVisibilityState();
- EXPECT_NE(
- ScreenAsh::GetMaximizedWindowBoundsInParent(window.get()).ToString(),
- window_bounds.ToString());
-
- Shell::GetInstance()->session_state_delegate()->UnlockScreen();
- shelf->UpdateVisibilityState();
- EXPECT_EQ(window_bounds.ToString(), window->bounds().ToString());
-}
-
-} // namespace
-} // namespace ash
diff --git a/chromium/ash/wm/boot_splash_screen_chromeos.cc b/chromium/ash/wm/boot_splash_screen_chromeos.cc
deleted file mode 100644
index ca862fa6218..00000000000
--- a/chromium/ash/wm/boot_splash_screen_chromeos.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/boot_splash_screen_chromeos.h"
-
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/base/x/x11_util.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_type.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/gfx/canvas.h"
-
-namespace ash {
-namespace internal {
-
-// ui::LayerDelegate that copies the aura host window's content to a ui::Layer.
-class BootSplashScreen::CopyHostContentLayerDelegate
- : public ui::LayerDelegate {
- public:
- explicit CopyHostContentLayerDelegate(aura::RootWindow* root_window)
- : root_window_(root_window) {
- }
-
- virtual ~CopyHostContentLayerDelegate() {}
-
- // ui::LayerDelegate overrides:
- virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE {
- // It'd be safer to copy the area to a canvas in the constructor and then
- // copy from that canvas to this one here, but this appears to work (i.e. we
- // only call this before we draw our first frame) and it saves us an extra
- // copy.
- // TODO(derat): Instead of copying the data, use GLX_EXT_texture_from_pixmap
- // to create a zero-copy texture (when possible):
- // https://codereview.chromium.org/10543125
- ui::CopyAreaToCanvas(root_window_->host()->GetAcceleratedWidget(),
- root_window_->host()->GetBounds(), gfx::Point(), canvas);
- }
-
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {}
-
- virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE {
- return base::Closure();
- }
-
- private:
- aura::RootWindow* root_window_; // not owned
-
- DISALLOW_COPY_AND_ASSIGN(CopyHostContentLayerDelegate);
-};
-
-BootSplashScreen::BootSplashScreen(aura::RootWindow* root_window)
- : layer_delegate_(new CopyHostContentLayerDelegate(root_window)),
- layer_(new ui::Layer(ui::LAYER_TEXTURED)) {
- layer_->set_delegate(layer_delegate_.get());
-
- ui::Layer* root_layer = root_window->window()->layer();
- layer_->SetBounds(gfx::Rect(root_layer->bounds().size()));
- root_layer->Add(layer_.get());
- root_layer->StackAtTop(layer_.get());
-}
-
-BootSplashScreen::~BootSplashScreen() {
-}
-
-void BootSplashScreen::StartHideAnimation(base::TimeDelta duration) {
- ui::ScopedLayerAnimationSettings settings(layer_->GetAnimator());
- settings.SetTransitionDuration(duration);
- settings.SetPreemptionStrategy(ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS);
- layer_->SetOpacity(0.0f);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/boot_splash_screen_chromeos.h b/chromium/ash/wm/boot_splash_screen_chromeos.h
deleted file mode 100644
index e844275ad5f..00000000000
--- a/chromium/ash/wm/boot_splash_screen_chromeos.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_BOOT_SPLASH_SCREEN_CHROMEOS_H_
-#define ASH_WM_BOOT_SPLASH_SCREEN_CHROMEOS_H_
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/time/time.h"
-
-namespace aura {
-class RootWindow;
-}
-
-namespace ui {
-class Layer;
-class LayerDelegate;
-}
-
-namespace ash {
-namespace internal {
-
-// BootSplashScreen manages a ui::Layer, stacked at the top of the root layer's
-// children, that displays a copy of the initial contents of the host window.
-// This allows us to continue displaying the Chrome OS boot splash screen (which
-// is displayed before Ash starts) after the compositor has taken over so we can
-// animate the transition between the splash screen and the login screen.
-class BootSplashScreen {
- public:
- explicit BootSplashScreen(aura::RootWindow* root_window);
- ~BootSplashScreen();
-
- // Begins animating |layer_|'s opacity to 0 over |duration|.
- void StartHideAnimation(base::TimeDelta duration);
-
- private:
- class CopyHostContentLayerDelegate;
-
- // Copies the host window's content to |layer_|.
- scoped_ptr<CopyHostContentLayerDelegate> layer_delegate_;
-
- scoped_ptr<ui::Layer> layer_;
-
- DISALLOW_COPY_AND_ASSIGN(BootSplashScreen);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_BOOT_SPLASH_SCREEN_CHROMEOS_H_
diff --git a/chromium/ash/wm/caption_buttons/alternate_frame_size_button.cc b/chromium/ash/wm/caption_buttons/alternate_frame_size_button.cc
deleted file mode 100644
index 24f9a0ad90b..00000000000
--- a/chromium/ash/wm/caption_buttons/alternate_frame_size_button.cc
+++ /dev/null
@@ -1,211 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/caption_buttons/alternate_frame_size_button.h"
-
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
-#include "ash/touch/touch_uma.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/workspace/snap_sizer.h"
-#include "ui/gfx/vector2d.h"
-#include "ui/views/widget/widget.h"
-
-namespace {
-
-// The default delay between the user pressing the size button and the buttons
-// adjacent to the size button morphing into buttons for snapping left and
-// right.
-const int kSetButtonsToSnapModeDelayMs = 150;
-
-// The amount that a user can overshoot the snap left / snap right button and
-// keep the snap left / snap right button pressed.
-const int kPressedHitBoundsExpandX = 200;
-const int kPressedHitBoundsExpandY = 50;
-
-} // namespace
-
-namespace ash {
-
-AlternateFrameSizeButton::AlternateFrameSizeButton(
- views::ButtonListener* listener,
- views::Widget* frame,
- AlternateFrameSizeButtonDelegate* delegate)
- : FrameCaptionButton(listener, CAPTION_BUTTON_ICON_MAXIMIZE_RESTORE),
- frame_(frame),
- delegate_(delegate),
- set_buttons_to_snap_mode_delay_ms_(kSetButtonsToSnapModeDelayMs),
- in_snap_mode_(false),
- snap_type_(SNAP_NONE) {
-}
-
-AlternateFrameSizeButton::~AlternateFrameSizeButton() {
-}
-
-bool AlternateFrameSizeButton::OnMousePressed(const ui::MouseEvent& event) {
- // The minimize and close buttons are set to snap left and right when snapping
- // is enabled. Do not enable snapping if the minimize button is not visible.
- // The close button is always visible.
- if (IsTriggerableEvent(event) &&
- !in_snap_mode_ &&
- delegate_->IsMinimizeButtonVisible()) {
- StartSetButtonsToSnapModeTimer(event);
- }
- FrameCaptionButton::OnMousePressed(event);
- return true;
-}
-
-bool AlternateFrameSizeButton::OnMouseDragged(const ui::MouseEvent& event) {
- UpdatePressedButton(event);
- FrameCaptionButton::OnMouseDragged(event);
- return true;
-}
-
-void AlternateFrameSizeButton::OnMouseReleased(const ui::MouseEvent& event) {
- if (!IsTriggerableEvent(event) || !CommitSnap(event))
- FrameCaptionButton::OnMouseReleased(event);
-}
-
-void AlternateFrameSizeButton::OnMouseCaptureLost() {
- SetButtonsToNormalMode(AlternateFrameSizeButtonDelegate::ANIMATE_YES);
- FrameCaptionButton::OnMouseCaptureLost();
-}
-
-void AlternateFrameSizeButton::OnGestureEvent(ui::GestureEvent* event) {
- if (event->details().touch_points() > 1) {
- SetButtonsToNormalMode(AlternateFrameSizeButtonDelegate::ANIMATE_YES);
- return;
- }
-
- if (event->type() == ui::ET_GESTURE_TAP_DOWN) {
- StartSetButtonsToSnapModeTimer(*event);
- // Go through FrameCaptionButton's handling so that the button gets pressed.
- FrameCaptionButton::OnGestureEvent(event);
- return;
- }
-
- if (event->type() == ui::ET_GESTURE_SCROLL_BEGIN ||
- event->type() == ui::ET_GESTURE_SCROLL_UPDATE) {
- UpdatePressedButton(*event);
- event->SetHandled();
- return;
- }
-
- if (event->type() == ui::ET_GESTURE_TAP ||
- event->type() == ui::ET_GESTURE_SCROLL_END ||
- event->type() == ui::ET_SCROLL_FLING_START ||
- event->type() == ui::ET_GESTURE_END) {
- if (CommitSnap(*event)) {
- if (event->type() == ui::ET_GESTURE_TAP) {
- TouchUMA::GetInstance()->RecordGestureAction(
- TouchUMA::GESTURE_FRAMEMAXIMIZE_TAP);
- }
- event->SetHandled();
- return;
- }
- }
-
- FrameCaptionButton::OnGestureEvent(event);
-}
-
-void AlternateFrameSizeButton::StartSetButtonsToSnapModeTimer(
- const ui::LocatedEvent& event) {
- set_buttons_to_snap_mode_timer_event_location_ = event.location();
- if (set_buttons_to_snap_mode_delay_ms_ == 0) {
- SetButtonsToSnapMode();
- } else {
- set_buttons_to_snap_mode_timer_.Start(
- FROM_HERE,
- base::TimeDelta::FromMilliseconds(set_buttons_to_snap_mode_delay_ms_),
- this,
- &AlternateFrameSizeButton::SetButtonsToSnapMode);
- }
-}
-
-void AlternateFrameSizeButton::SetButtonsToSnapMode() {
- if (in_snap_mode_)
- return;
- in_snap_mode_ = true;
- delegate_->SetButtonIcons(CAPTION_BUTTON_ICON_LEFT_SNAPPED,
- CAPTION_BUTTON_ICON_RIGHT_SNAPPED,
- AlternateFrameSizeButtonDelegate::ANIMATE_YES);
-}
-
-void AlternateFrameSizeButton::UpdatePressedButton(
- const ui::LocatedEvent& event) {
- if (!in_snap_mode_) {
- // Set the buttons adjacent to the size button to snap left and right early
- // if the user drags past the drag threshold.
- // |set_buttons_to_snap_mode_timer_| is checked to avoid entering the snap
- // mode as a result of an unsupported drag type (e.g. only the right mouse
- // button is pressed).
- gfx::Vector2d delta(
- event.location() - set_buttons_to_snap_mode_timer_event_location_);
- if (!set_buttons_to_snap_mode_timer_.IsRunning() ||
- !views::View::ExceededDragThreshold(delta)) {
- return;
- }
- SetButtonsToSnapMode();
- }
-
- gfx::Point event_location_in_screen(event.location());
- views::View::ConvertPointToScreen(this, &event_location_in_screen);
-
- gfx::Insets pressed_button_hittest_insets(-kPressedHitBoundsExpandY,
- -kPressedHitBoundsExpandX,
- -kPressedHitBoundsExpandY,
- -kPressedHitBoundsExpandX);
- const FrameCaptionButton* pressed_button = delegate_->PressButtonAt(
- event_location_in_screen, pressed_button_hittest_insets);
- snap_type_ = SNAP_NONE;
- if (pressed_button) {
- switch (pressed_button->icon()) {
- case CAPTION_BUTTON_ICON_LEFT_SNAPPED:
- snap_type_ = SNAP_LEFT;
- break;
- case CAPTION_BUTTON_ICON_RIGHT_SNAPPED:
- snap_type_ = SNAP_RIGHT;
- break;
- case CAPTION_BUTTON_ICON_MAXIMIZE_RESTORE:
- // snap_type_ = SNAP_NONE
- break;
- case CAPTION_BUTTON_ICON_MINIMIZE:
- case CAPTION_BUTTON_ICON_CLOSE:
- NOTREACHED();
- break;
- }
- }
-}
-
-bool AlternateFrameSizeButton::CommitSnap(const ui::LocatedEvent& event) {
- // The position of |event| may be different than the position of the previous
- // event.
- UpdatePressedButton(event);
-
- if (in_snap_mode_ &&
- (snap_type_ == SNAP_LEFT || snap_type_ == SNAP_RIGHT)) {
- using internal::SnapSizer;
- SnapSizer::SnapWindow(ash::wm::GetWindowState(frame_->GetNativeWindow()),
- snap_type_ == SNAP_LEFT ?
- SnapSizer::LEFT_EDGE : SnapSizer::RIGHT_EDGE);
- ash::Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- snap_type_ == SNAP_LEFT ?
- ash::UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE_LEFT :
- ash::UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE_RIGHT);
- SetButtonsToNormalMode(AlternateFrameSizeButtonDelegate::ANIMATE_NO);
- return true;
- }
- SetButtonsToNormalMode(AlternateFrameSizeButtonDelegate::ANIMATE_YES);
- return false;
-}
-
-void AlternateFrameSizeButton::SetButtonsToNormalMode(
- AlternateFrameSizeButtonDelegate::Animate animate) {
- in_snap_mode_ = false;
- snap_type_ = SNAP_NONE;
- set_buttons_to_snap_mode_timer_.Stop();
- delegate_->SetButtonsToNormal(animate);
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/caption_buttons/alternate_frame_size_button.h b/chromium/ash/wm/caption_buttons/alternate_frame_size_button.h
deleted file mode 100644
index 586eabbeb99..00000000000
--- a/chromium/ash/wm/caption_buttons/alternate_frame_size_button.h
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_H_
-#define ASH_WM_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_H_
-
-#include "ash/ash_export.h"
-#include "ash/wm/caption_buttons/alternate_frame_size_button_delegate.h"
-#include "ash/wm/caption_buttons/frame_caption_button.h"
-#include "ash/wm/workspace/snap_types.h"
-#include "base/timer/timer.h"
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-class AlternateFrameSizeButtonDelegate;
-
-// The maximize/restore button when using the alternate button style.
-// When the mouse is pressed over the size button or the size button is touched:
-// - The minimize and close buttons are set to snap left and snap right
-// respectively.
-// - The pressed button is updated during the drag to reflect the button
-// underneath the mouse cursor. (The size button is potentially unpressed).
-// When the drag terminates, the action for the pressed button is executed.
-// For the sake of simplicity, the size button is the event handler for a click
-// starting on the size button and the entire drag (including when the size
-// button is unpressed).
-class ASH_EXPORT AlternateFrameSizeButton : public FrameCaptionButton {
- public:
- AlternateFrameSizeButton(views::ButtonListener* listener,
- views::Widget* frame,
- AlternateFrameSizeButtonDelegate* delegate);
-
- virtual ~AlternateFrameSizeButton();
-
- // views::CustomButton overrides:
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- void set_delay_to_set_buttons_to_snap_mode(int delay_ms) {
- set_buttons_to_snap_mode_delay_ms_ = delay_ms;
- }
-
- private:
- // Starts |set_buttons_to_snap_mode_timer_|.
- void StartSetButtonsToSnapModeTimer(const ui::LocatedEvent& event);
-
- // Sets the buttons adjacent to the size button to snap left and right.
- void SetButtonsToSnapMode();
-
- // Updates the pressed button based on |event_location|.
- void UpdatePressedButton(const ui::LocatedEvent& event);
-
- // Snaps |frame_| according to |snap_type_|. Returns true if |frame_| was
- // snapped.
- bool CommitSnap(const ui::LocatedEvent& event);
-
- // Sets the buttons adjacent to the size button to minimize and close again.
- // Clears any state set while snapping was enabled. |animate| indicates
- // whether the buttons should animate back to their original icons.
- void SetButtonsToNormalMode(
- AlternateFrameSizeButtonDelegate::Animate animate);
-
- // Widget that the size button acts on.
- views::Widget* frame_;
-
- // Not owned.
- AlternateFrameSizeButtonDelegate* delegate_;
-
- // Location of the event which started |set_buttons_to_snap_mode_timer_| in
- // view coordinates.
- gfx::Point set_buttons_to_snap_mode_timer_event_location_;
-
- // The delay between the user pressing the size button and the buttons
- // adjacent to the size button morphing into buttons for snapping left and
- // right.
- int set_buttons_to_snap_mode_delay_ms_;
-
- base::OneShotTimer<AlternateFrameSizeButton> set_buttons_to_snap_mode_timer_;
-
- // Whether the buttons adjacent to the size button snap the window left and
- // right.
- bool in_snap_mode_;
-
- // The action of the currently pressed button. If |snap_type_| == SNAP_NONE,
- // the size button's default action is run when clicked.
- SnapType snap_type_;
-
- DISALLOW_COPY_AND_ASSIGN(AlternateFrameSizeButton);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_H_
diff --git a/chromium/ash/wm/caption_buttons/alternate_frame_size_button_delegate.h b/chromium/ash/wm/caption_buttons/alternate_frame_size_button_delegate.h
deleted file mode 100644
index c1472b21bf1..00000000000
--- a/chromium/ash/wm/caption_buttons/alternate_frame_size_button_delegate.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_DELEGATE_H_
-#define ASH_WM_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_DELEGATE_H_
-
-#include "ash/ash_export.h"
-#include "ash/wm/caption_buttons/caption_button_types.h"
-
-namespace gfx {
-class Insets;
-class Point;
-}
-
-namespace ash {
-class FrameCaptionButton;
-
-// Delegate interface for AlternateFrameSizeButton.
-class ASH_EXPORT AlternateFrameSizeButtonDelegate {
- public:
- enum Animate {
- ANIMATE_YES,
- ANIMATE_NO
- };
-
- // Returns whether the minimize button is visible.
- virtual bool IsMinimizeButtonVisible() const = 0;
-
- // Reset the caption button views::Button::ButtonState back to normal. If
- // |animate| is ANIMATE_YES, the buttons will crossfade back to their
- // original icons.
- virtual void SetButtonsToNormal(Animate animate) = 0;
-
- // Sets the minimize and close button icons. The buttons will crossfade to
- // their new icons if |animate| is ANIMATE_YES.
- virtual void SetButtonIcons(CaptionButtonIcon left_button_action,
- CaptionButtonIcon right_button_action,
- Animate animate) = 0;
-
- // Presses the button at |position_in_screen| and unpresses any other pressed
- // caption buttons.
- // |pressed_button_hittest_insets| indicates how much the hittest insets for
- // the currently pressed button should be expanded if no button was found at
- // |position_in_screen| using the normal button hittest insets.
- // Returns the button which was pressed.
- virtual const FrameCaptionButton* PressButtonAt(
- const gfx::Point& position_in_screen,
- const gfx::Insets& pressed_button_hittest_insets) const = 0;
-
- protected:
- virtual ~AlternateFrameSizeButtonDelegate() {}
-};
-
-} // namespace ash
-
-#endif // ASH_WM_CAPTION_BUTTONS_ALTERNATE_FRAME_SIZE_BUTTON_DELEGATE_H_
diff --git a/chromium/ash/wm/caption_buttons/alternate_frame_size_button_unittest.cc b/chromium/ash/wm/caption_buttons/alternate_frame_size_button_unittest.cc
deleted file mode 100644
index 75c0f50604b..00000000000
--- a/chromium/ash/wm/caption_buttons/alternate_frame_size_button_unittest.cc
+++ /dev/null
@@ -1,367 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/caption_buttons/alternate_frame_size_button.h"
-
-#include "ash/ash_switches.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/caption_buttons/frame_caption_button.h"
-#include "ash/wm/caption_buttons/frame_caption_button_container_view.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/workspace/snap_sizer.h"
-#include "base/command_line.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/window.h"
-#include "ui/events/gestures/gesture_configuration.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-namespace test {
-
-namespace {
-
-class TestWidgetDelegate : public views::WidgetDelegateView {
- public:
- TestWidgetDelegate() {}
- virtual ~TestWidgetDelegate() {}
-
- // Overridden from views::WidgetDelegate:
- virtual views::View* GetContentsView() OVERRIDE {
- return this;
- }
- virtual bool CanResize() const OVERRIDE {
- return true;
- }
- virtual bool CanMaximize() const OVERRIDE {
- return true;
- }
-
- ash::FrameCaptionButtonContainerView* caption_button_container() {
- return caption_button_container_;
- }
-
- private:
- // Overridden from views::View:
- virtual void Layout() OVERRIDE {
- caption_button_container_->Layout();
-
- // Right align the caption button container.
- gfx::Size preferred_size = caption_button_container_->GetPreferredSize();
- caption_button_container_->SetBounds(width() - preferred_size.width(), 0,
- preferred_size.width(), preferred_size.height());
- }
-
- virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE {
- if (details.is_add && details.child == this) {
- caption_button_container_ = new FrameCaptionButtonContainerView(
- GetWidget(), FrameCaptionButtonContainerView::MINIMIZE_ALLOWED);
- AddChildView(caption_button_container_);
- }
- }
-
- // Not owned.
- ash::FrameCaptionButtonContainerView* caption_button_container_;
-
- DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate);
-};
-
-} // namespace
-
-class AlternateFrameSizeButtonTest : public AshTestBase {
- public:
- AlternateFrameSizeButtonTest() {}
- virtual ~AlternateFrameSizeButtonTest() {}
-
- // Returns the center point of |view| in screen coordinates.
- gfx::Point CenterPointInScreen(views::View* view) {
- return view->GetBoundsInScreen().CenterPoint();
- }
-
- // Returns true if the window is snapped to |edge|.
- bool IsSnapped(internal::SnapSizer::Edge edge) const {
- ash::wm::WindowShowType show_type = window_state()->window_show_type();
- if (edge == internal::SnapSizer::LEFT_EDGE)
- return show_type == ash::wm::SHOW_TYPE_LEFT_SNAPPED;
- else
- return show_type == ash::wm::SHOW_TYPE_RIGHT_SNAPPED;
- }
-
- // Returns true if all three buttons are in the normal state.
- bool AllButtonsInNormalState() const {
- return minimize_button_->state() == views::Button::STATE_NORMAL &&
- size_button_->state() == views::Button::STATE_NORMAL &&
- close_button_->state() == views::Button::STATE_NORMAL;
- }
-
- // Creates a widget with |delegate|. The returned widget takes ownership of
- // |delegate|.
- views::Widget* CreateWidget(views::WidgetDelegate* delegate) {
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params(
- views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- params.context = CurrentContext();
- params.delegate = delegate;
- params.bounds = gfx::Rect(10, 10, 100, 100);
- widget->Init(params);
- widget->Show();
- return widget;
- }
-
- // AshTestBase overrides:
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
-
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- command_line->AppendSwitch(
- switches::kAshEnableAlternateFrameCaptionButtonStyle);
- CHECK(!command_line->HasSwitch(switches::kAshMultipleSnapWindowWidths));
-
- TestWidgetDelegate* delegate = new TestWidgetDelegate();
- window_state_ = ash::wm::GetWindowState(
- CreateWidget(delegate)->GetNativeWindow());
-
- FrameCaptionButtonContainerView::TestApi test(
- delegate->caption_button_container());
-
- minimize_button_ = test.minimize_button();
- size_button_ = test.size_button();
- static_cast<AlternateFrameSizeButton*>(
- size_button_)->set_delay_to_set_buttons_to_snap_mode(0);
- close_button_ = test.close_button();
- }
-
- ash::wm::WindowState* window_state() { return window_state_; }
- const ash::wm::WindowState* window_state() const { return window_state_; }
-
- FrameCaptionButton* minimize_button() { return minimize_button_; }
- FrameCaptionButton* size_button() { return size_button_; }
- FrameCaptionButton* close_button() { return close_button_; }
-
- private:
- // Not owned.
- ash::wm::WindowState* window_state_;
- FrameCaptionButton* minimize_button_;
- FrameCaptionButton* size_button_;
- FrameCaptionButton* close_button_;
-
- DISALLOW_COPY_AND_ASSIGN(AlternateFrameSizeButtonTest);
-};
-
-// Tests that pressing the left mouse button or tapping down on the size button
-// puts the button into the pressed state.
-TEST_F(AlternateFrameSizeButtonTest, PressedState) {
- aura::test::EventGenerator& generator = GetEventGenerator();
- generator.MoveMouseTo(CenterPointInScreen(size_button()));
- generator.PressLeftButton();
- EXPECT_EQ(views::Button::STATE_PRESSED, size_button()->state());
- generator.ReleaseLeftButton();
- RunAllPendingInMessageLoop();
- EXPECT_EQ(views::Button::STATE_NORMAL, size_button()->state());
-
- generator.MoveMouseTo(CenterPointInScreen(size_button()));
- generator.PressTouchId(3);
- EXPECT_EQ(views::Button::STATE_PRESSED, size_button()->state());
- generator.ReleaseTouchId(3);
- RunAllPendingInMessageLoop();
- EXPECT_EQ(views::Button::STATE_NORMAL, size_button()->state());
-}
-
-// Tests that clicking on the size button toggles between the maximized and
-// normal state.
-TEST_F(AlternateFrameSizeButtonTest, ClickSizeButtonTogglesMaximize) {
- EXPECT_FALSE(window_state()->IsMaximized());
-
- aura::test::EventGenerator& generator = GetEventGenerator();
- generator.MoveMouseTo(CenterPointInScreen(size_button()));
- generator.ClickLeftButton();
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(window_state()->IsMaximized());
-
- generator.MoveMouseTo(CenterPointInScreen(size_button()));
- generator.ClickLeftButton();
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(window_state()->IsMaximized());
-
- generator.GestureTapAt(CenterPointInScreen(size_button()));
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(window_state()->IsMaximized());
-
- generator.GestureTapAt(CenterPointInScreen(size_button()));
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(window_state()->IsMaximized());
-}
-
-// Test that clicking + dragging to a button adjacent to the size button snaps
-// the window left or right.
-TEST_F(AlternateFrameSizeButtonTest, ButtonDrag) {
- EXPECT_TRUE(window_state()->IsNormalShowState());
- EXPECT_FALSE(window_state()->IsSnapped());
-
- // 1) Test by dragging the mouse.
- // Snap right.
- aura::test::EventGenerator& generator = GetEventGenerator();
- generator.MoveMouseTo(CenterPointInScreen(size_button()));
- generator.PressLeftButton();
- generator.MoveMouseTo(CenterPointInScreen(close_button()));
- generator.ReleaseLeftButton();
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsSnapped(internal::SnapSizer::RIGHT_EDGE));
-
- // Snap left.
- generator.MoveMouseTo(CenterPointInScreen(size_button()));
- generator.PressLeftButton();
- generator.MoveMouseTo(CenterPointInScreen(minimize_button()));
- generator.ReleaseLeftButton();
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsSnapped(internal::SnapSizer::LEFT_EDGE));
-
- // 2) Test with scroll gestures.
- // Snap right.
- generator.GestureScrollSequence(
- CenterPointInScreen(size_button()),
- CenterPointInScreen(close_button()),
- base::TimeDelta::FromMilliseconds(100),
- 3);
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsSnapped(internal::SnapSizer::RIGHT_EDGE));
-
- // Snap left.
- generator.GestureScrollSequence(
- CenterPointInScreen(size_button()),
- CenterPointInScreen(minimize_button()),
- base::TimeDelta::FromMilliseconds(100),
- 3);
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsSnapped(internal::SnapSizer::LEFT_EDGE));
-
- // 3) Test with tap gestures.
- const int touch_default_radius =
- ui::GestureConfiguration::default_radius();
- ui::GestureConfiguration::set_default_radius(0);
- // Snap right.
- generator.MoveMouseTo(CenterPointInScreen(size_button()));
- generator.PressMoveAndReleaseTouchTo(CenterPointInScreen(close_button()));
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsSnapped(internal::SnapSizer::RIGHT_EDGE));
- // Snap left.
- generator.MoveMouseTo(CenterPointInScreen(size_button()));
- generator.PressMoveAndReleaseTouchTo(CenterPointInScreen(minimize_button()));
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsSnapped(internal::SnapSizer::LEFT_EDGE));
- ui::GestureConfiguration::set_default_radius(touch_default_radius);
-}
-
-// Test that clicking, dragging, and overshooting the minimize button a bit
-// horizontally still snaps the window left.
-TEST_F(AlternateFrameSizeButtonTest, SnapLeftOvershootMinimize) {
- EXPECT_TRUE(window_state()->IsNormalShowState());
- EXPECT_FALSE(window_state()->IsSnapped());
-
- aura::test::EventGenerator& generator = GetEventGenerator();
- generator.MoveMouseTo(CenterPointInScreen(size_button()));
-
- generator.PressLeftButton();
- // Move to the minimize button.
- generator.MoveMouseTo(CenterPointInScreen(minimize_button()));
- // Overshoot the minimize button.
- generator.MoveMouseBy(-minimize_button()->width(), 0);
- generator.ReleaseLeftButton();
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsSnapped(internal::SnapSizer::LEFT_EDGE));
-}
-
-// Test that right clicking the size button has no effect.
-TEST_F(AlternateFrameSizeButtonTest, RightMouseButton) {
- EXPECT_TRUE(window_state()->IsNormalShowState());
- EXPECT_FALSE(window_state()->IsSnapped());
-
- aura::test::EventGenerator& generator = GetEventGenerator();
- generator.MoveMouseTo(CenterPointInScreen(size_button()));
- generator.PressRightButton();
- generator.ReleaseRightButton();
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(window_state()->IsNormalShowState());
- EXPECT_FALSE(window_state()->IsSnapped());
-}
-
-// Test that upon releasing the mouse button after having pressed the size
-// button
-// - The state of all the caption buttons is reset.
-// - The icon displayed by all of the caption buttons is reset.
-TEST_F(AlternateFrameSizeButtonTest, ResetButtonsAfterClick) {
- EXPECT_EQ(CAPTION_BUTTON_ICON_MINIMIZE, minimize_button()->icon());
- EXPECT_EQ(CAPTION_BUTTON_ICON_CLOSE, close_button()->icon());
- EXPECT_TRUE(AllButtonsInNormalState());
-
- // Pressing the size button should result in the size button being pressed and
- // the minimize and close button icons changing.
- aura::test::EventGenerator& generator = GetEventGenerator();
- generator.MoveMouseTo(CenterPointInScreen(size_button()));
- generator.PressLeftButton();
- EXPECT_EQ(views::Button::STATE_NORMAL, minimize_button()->state());
- EXPECT_EQ(views::Button::STATE_PRESSED, size_button()->state());
- EXPECT_EQ(views::Button::STATE_NORMAL, close_button()->state());
- EXPECT_EQ(CAPTION_BUTTON_ICON_LEFT_SNAPPED, minimize_button()->icon());
- EXPECT_EQ(CAPTION_BUTTON_ICON_RIGHT_SNAPPED, close_button()->icon());
-
- // Dragging the mouse over the minimize button should press the minimize
- // button and the minimize and close button icons should stay changed.
- generator.MoveMouseTo(CenterPointInScreen(minimize_button()));
- EXPECT_EQ(views::Button::STATE_PRESSED, minimize_button()->state());
- EXPECT_EQ(views::Button::STATE_NORMAL, size_button()->state());
- EXPECT_EQ(views::Button::STATE_NORMAL, close_button()->state());
- EXPECT_EQ(CAPTION_BUTTON_ICON_LEFT_SNAPPED, minimize_button()->icon());
- EXPECT_EQ(CAPTION_BUTTON_ICON_RIGHT_SNAPPED, close_button()->icon());
-
- // Release the mouse, snapping the window left.
- generator.ReleaseLeftButton();
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsSnapped(internal::SnapSizer::LEFT_EDGE));
-
- // None of the buttons should stay pressed and the buttons should have their
- // regular icons.
- EXPECT_TRUE(AllButtonsInNormalState());
- EXPECT_EQ(CAPTION_BUTTON_ICON_MINIMIZE, minimize_button()->icon());
- EXPECT_EQ(CAPTION_BUTTON_ICON_CLOSE, close_button()->icon());
-
- // Repeat test but release button where it does not affect the window's state
- // because the code path is different.
- generator.MoveMouseTo(CenterPointInScreen(size_button()));
- generator.PressLeftButton();
- EXPECT_EQ(views::Button::STATE_NORMAL, minimize_button()->state());
- EXPECT_EQ(views::Button::STATE_PRESSED, size_button()->state());
- EXPECT_EQ(views::Button::STATE_NORMAL, close_button()->state());
- EXPECT_EQ(CAPTION_BUTTON_ICON_LEFT_SNAPPED, minimize_button()->icon());
- EXPECT_EQ(CAPTION_BUTTON_ICON_RIGHT_SNAPPED, close_button()->icon());
-
- const gfx::Rect& kWorkAreaBoundsInScreen =
- ash::Shell::GetScreen()->GetPrimaryDisplay().work_area();
- generator.MoveMouseTo(kWorkAreaBoundsInScreen.bottom_left());
-
- // None of the buttons should be pressed because we are really far away from
- // any of the caption buttons. The minimize and close button icons should
- // be changed because the mouse is pressed.
- EXPECT_TRUE(AllButtonsInNormalState());
- EXPECT_EQ(CAPTION_BUTTON_ICON_LEFT_SNAPPED, minimize_button()->icon());
- EXPECT_EQ(CAPTION_BUTTON_ICON_RIGHT_SNAPPED, close_button()->icon());
-
- // Release the mouse. The window should stay snapped left.
- generator.ReleaseLeftButton();
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsSnapped(internal::SnapSizer::LEFT_EDGE));
-
- // The buttons should stay unpressed and the buttons should now have their
- // regular icons.
- EXPECT_TRUE(AllButtonsInNormalState());
- EXPECT_EQ(CAPTION_BUTTON_ICON_MINIMIZE, minimize_button()->icon());
- EXPECT_EQ(CAPTION_BUTTON_ICON_CLOSE, close_button()->icon());
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/wm/caption_buttons/bubble_contents_button_row.cc b/chromium/ash/wm/caption_buttons/bubble_contents_button_row.cc
deleted file mode 100644
index 6eb9062599e..00000000000
--- a/chromium/ash/wm/caption_buttons/bubble_contents_button_row.cc
+++ /dev/null
@@ -1,216 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/caption_buttons/bubble_contents_button_row.h"
-
-#include "ash/wm/caption_buttons/maximize_bubble_controller.h"
-#include "ash/wm/caption_buttons/maximize_bubble_controller_bubble.h"
-#include "grit/ash_resources.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/views/controls/button/image_button.h"
-#include "ui/views/layout/box_layout.h"
-
-
-namespace ash {
-
-// BubbleDialogButton ---------------------------------------------------------
-
-// The image button gets overridden to be able to capture mouse hover events.
-// The constructor also assigns all button states and adds |this| as a child of
-// |button_row|.
-class BubbleDialogButton : public views::ImageButton {
- public:
- explicit BubbleDialogButton(BubbleContentsButtonRow* button_row,
- int normal_image,
- int hovered_image,
- int pressed_image);
- virtual ~BubbleDialogButton();
-
- // views::ImageButton:
- virtual void OnMouseCaptureLost() OVERRIDE;
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
-
- private:
- // The creating class which needs to get notified in case of a hover event.
- BubbleContentsButtonRow* button_row_;
-
- DISALLOW_COPY_AND_ASSIGN(BubbleDialogButton);
-};
-
-BubbleDialogButton::BubbleDialogButton(
- BubbleContentsButtonRow* button_row,
- int normal_image,
- int hovered_image,
- int pressed_image)
- : views::ImageButton(button_row),
- button_row_(button_row) {
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- SetImage(views::CustomButton::STATE_NORMAL,
- rb.GetImageSkiaNamed(normal_image));
- SetImage(views::CustomButton::STATE_HOVERED,
- rb.GetImageSkiaNamed(hovered_image));
- SetImage(views::CustomButton::STATE_PRESSED,
- rb.GetImageSkiaNamed(pressed_image));
- button_row->AddChildView(this);
-}
-
-BubbleDialogButton::~BubbleDialogButton() {
-}
-
-void BubbleDialogButton::OnMouseCaptureLost() {
- button_row_->ButtonHovered(NULL);
- views::ImageButton::OnMouseCaptureLost();
-}
-
-void BubbleDialogButton::OnMouseEntered(const ui::MouseEvent& event) {
- button_row_->ButtonHovered(this);
- views::ImageButton::OnMouseEntered(event);
-}
-
-void BubbleDialogButton::OnMouseExited(const ui::MouseEvent& event) {
- button_row_->ButtonHovered(NULL);
- views::ImageButton::OnMouseExited(event);
-}
-
-bool BubbleDialogButton::OnMouseDragged(const ui::MouseEvent& event) {
- if (!button_row_->bubble()->controller())
- return false;
-
- // Remove the phantom window when we leave the button.
- gfx::Point screen_location(event.location());
- View::ConvertPointToScreen(this, &screen_location);
- if (!GetBoundsInScreen().Contains(screen_location))
- button_row_->ButtonHovered(NULL);
- else
- button_row_->ButtonHovered(this);
-
- // Pass the event on to the normal handler.
- return views::ImageButton::OnMouseDragged(event);
-}
-
-
-// BubbleContentsButtonRow ----------------------------------------------------
-
-BubbleContentsButtonRow::BubbleContentsButtonRow(
- MaximizeBubbleControllerBubble* bubble)
- : bubble_(bubble),
- left_button_(NULL),
- minimize_button_(NULL),
- right_button_(NULL) {
- SetLayoutManager(new views::BoxLayout(
- views::BoxLayout::kHorizontal, 0, 0,
- MaximizeBubbleControllerBubble::kLayoutSpacing));
- set_background(views::Background::CreateSolidBackground(
- MaximizeBubbleControllerBubble::kBubbleBackgroundColor));
-
- if (base::i18n::IsRTL()) {
- AddMaximizeRightButton();
- AddMinimizeButton();
- AddMaximizeLeftButton();
- } else {
- AddMaximizeLeftButton();
- AddMinimizeButton();
- AddMaximizeRightButton();
- }
-}
-
-BubbleContentsButtonRow::~BubbleContentsButtonRow() {
-}
-
-void BubbleContentsButtonRow::ButtonPressed(views::Button* sender,
- const ui::Event& event) {
- // While shutting down, the connection to the owner might already be broken.
- if (!bubble_->controller())
- return;
- if (sender == left_button_) {
- bubble_->controller()->OnButtonClicked(
- (bubble_->controller()->maximize_type() == FRAME_STATE_SNAP_LEFT) ?
- SNAP_RESTORE : SNAP_LEFT);
- } else if (sender == minimize_button_) {
- bubble_->controller()->OnButtonClicked(SNAP_MINIMIZE);
- } else {
- DCHECK(sender == right_button_);
- bubble_->controller()->OnButtonClicked(
- (bubble_->controller()->maximize_type() == FRAME_STATE_SNAP_RIGHT) ?
- SNAP_RESTORE : SNAP_RIGHT);
- }
-}
-
-void BubbleContentsButtonRow::ButtonHovered(BubbleDialogButton* sender) {
- // While shutting down, the connection to the owner might already be broken.
- if (!bubble_->controller())
- return;
- if (sender == left_button_) {
- bubble_->controller()->OnButtonHover(
- (bubble_->controller()->maximize_type() == FRAME_STATE_SNAP_LEFT) ?
- SNAP_RESTORE : SNAP_LEFT);
- } else if (sender == minimize_button_) {
- bubble_->controller()->OnButtonHover(SNAP_MINIMIZE);
- } else if (sender == right_button_) {
- bubble_->controller()->OnButtonHover(
- (bubble_->controller()->maximize_type() == FRAME_STATE_SNAP_RIGHT) ?
- SNAP_RESTORE : SNAP_RIGHT);
- } else {
- bubble_->controller()->OnButtonHover(SNAP_NONE);
- }
-}
-
-views::CustomButton* BubbleContentsButtonRow::GetButtonForUnitTest(
- SnapType state) {
- switch (state) {
- case SNAP_LEFT:
- return left_button_;
- case SNAP_MINIMIZE:
- return minimize_button_;
- case SNAP_RIGHT:
- return right_button_;
- default:
- NOTREACHED();
- return NULL;
- }
-}
-
-void BubbleContentsButtonRow::AddMaximizeLeftButton() {
- if (bubble_->controller()->maximize_type() == FRAME_STATE_SNAP_LEFT) {
- left_button_ = new BubbleDialogButton(
- this,
- IDR_AURA_WINDOW_POSITION_LEFT_RESTORE,
- IDR_AURA_WINDOW_POSITION_LEFT_RESTORE_H,
- IDR_AURA_WINDOW_POSITION_LEFT_RESTORE_P);
- } else {
- left_button_ = new BubbleDialogButton(
- this,
- IDR_AURA_WINDOW_POSITION_LEFT,
- IDR_AURA_WINDOW_POSITION_LEFT_H,
- IDR_AURA_WINDOW_POSITION_LEFT_P);
- }
-}
-
-void BubbleContentsButtonRow::AddMaximizeRightButton() {
- if (bubble_->controller()->maximize_type() == FRAME_STATE_SNAP_RIGHT) {
- right_button_ = new BubbleDialogButton(
- this,
- IDR_AURA_WINDOW_POSITION_RIGHT_RESTORE,
- IDR_AURA_WINDOW_POSITION_RIGHT_RESTORE_H,
- IDR_AURA_WINDOW_POSITION_RIGHT_RESTORE_P);
- } else {
- right_button_ = new BubbleDialogButton(
- this,
- IDR_AURA_WINDOW_POSITION_RIGHT,
- IDR_AURA_WINDOW_POSITION_RIGHT_H,
- IDR_AURA_WINDOW_POSITION_RIGHT_P);
- }
-}
-
-void BubbleContentsButtonRow::AddMinimizeButton() {
- minimize_button_ = new BubbleDialogButton(
- this,
- IDR_AURA_WINDOW_POSITION_MIDDLE,
- IDR_AURA_WINDOW_POSITION_MIDDLE_H,
- IDR_AURA_WINDOW_POSITION_MIDDLE_P);
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/caption_buttons/bubble_contents_button_row.h b/chromium/ash/wm/caption_buttons/bubble_contents_button_row.h
deleted file mode 100644
index 5f6e8d15ee7..00000000000
--- a/chromium/ash/wm/caption_buttons/bubble_contents_button_row.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_CAPTION_BUTTONS_BUBBLE_CONTENTS_BUTTON_ROW_H_
-#define ASH_WM_CAPTION_BUTTONS_BUBBLE_CONTENTS_BUTTON_ROW_H_
-
-#include "ash/wm/workspace/snap_types.h"
-#include "ui/views/controls/button/button.h"
-
-namespace views {
-class CustomButton;
-}
-
-namespace ash {
-
-class BubbleDialogButton;
-class MaximizeBubbleControllerBubble;
-
-// A class that creates all buttons and puts them into a view.
-class BubbleContentsButtonRow : public views::View,
- public views::ButtonListener {
- public:
- explicit BubbleContentsButtonRow(MaximizeBubbleControllerBubble* bubble);
- virtual ~BubbleContentsButtonRow();
-
- // views::ButtonListener:
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
-
- // Called from BubbleDialogButton.
- void ButtonHovered(BubbleDialogButton* sender);
-
- // Added for unit test: Retrieve the button for an action.
- // |state| can be either SNAP_LEFT, SNAP_RIGHT or SNAP_MINIMIZE.
- views::CustomButton* GetButtonForUnitTest(SnapType state);
-
- MaximizeBubbleControllerBubble* bubble() { return bubble_; }
-
- private:
- // Functions to add the left and right maximize / restore buttons.
- void AddMaximizeLeftButton();
- void AddMaximizeRightButton();
- void AddMinimizeButton();
-
- // The owning object which gets notifications.
- MaximizeBubbleControllerBubble* bubble_;
-
- // The created buttons for our menu.
- BubbleDialogButton* left_button_;
- BubbleDialogButton* minimize_button_;
- BubbleDialogButton* right_button_;
-
- DISALLOW_COPY_AND_ASSIGN(BubbleContentsButtonRow);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_CAPTION_BUTTONS_BUBBLE_CONTENTS_BUTTON_ROW_H_
diff --git a/chromium/ash/wm/caption_buttons/caption_button_types.h b/chromium/ash/wm/caption_buttons/caption_button_types.h
deleted file mode 100644
index b34a8615083..00000000000
--- a/chromium/ash/wm/caption_buttons/caption_button_types.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_CAPTION_BUTTONS_CAPTION_BUTTON_TYPES_H_
-#define ASH_WM_CAPTION_BUTTONS_CAPTION_BUTTON_TYPES_H_
-
-namespace ash {
-
-// These are the types of maximization we know.
-enum MaximizeBubbleFrameState {
- FRAME_STATE_NONE = 0,
- FRAME_STATE_FULL = 1, // This is the full maximized state.
- FRAME_STATE_SNAP_LEFT = 2,
- FRAME_STATE_SNAP_RIGHT = 3
-};
-
-// These are the icon types that a caption button can have. The size button's
-// action (SnapType) can be different from its icon.
-enum CaptionButtonIcon {
- CAPTION_BUTTON_ICON_MINIMIZE,
- CAPTION_BUTTON_ICON_MAXIMIZE_RESTORE,
- CAPTION_BUTTON_ICON_CLOSE,
- CAPTION_BUTTON_ICON_LEFT_SNAPPED,
- CAPTION_BUTTON_ICON_RIGHT_SNAPPED,
-};
-
-} // namespace ash
-
-#endif // ASH_WM_CAPTION_BUTTONS_CAPTION_BUTTON_TYPES_H_
diff --git a/chromium/ash/wm/caption_buttons/frame_caption_button.cc b/chromium/ash/wm/caption_buttons/frame_caption_button.cc
deleted file mode 100644
index 5a6a8356831..00000000000
--- a/chromium/ash/wm/caption_buttons/frame_caption_button.cc
+++ /dev/null
@@ -1,177 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/caption_buttons/frame_caption_button.h"
-
-#include "grit/ash_resources.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/animation/slide_animation.h"
-#include "ui/gfx/canvas.h"
-
-namespace ash {
-
-namespace {
-
-// The duration of the crossfade animation when swapping the button's icon.
-const int kCrossfadeDurationMs = 200;
-
-} // namespace
-
-// static
-const char FrameCaptionButton::kViewClassName[] = "FrameCaptionButton";
-
-FrameCaptionButton::FrameCaptionButton(views::ButtonListener* listener,
- CaptionButtonIcon icon)
- : ImageButton(listener),
- icon_(icon),
- style_(STYLE_SHORT_RESTORED),
- last_paint_scale_(1.0f),
- animation_(new gfx::SlideAnimation(this)) {
- animation_->Reset(1);
- UpdateImages();
-}
-
-FrameCaptionButton::~FrameCaptionButton() {
-}
-
-void FrameCaptionButton::SetIcon(CaptionButtonIcon icon, Animate animate) {
- if (icon_ == icon)
- return;
-
- if (animate == ANIMATE_YES) {
- gfx::Canvas canvas(size(), last_paint_scale_, false);
- OnPaint(&canvas);
- crossfade_image_ = gfx::ImageSkia(canvas.ExtractImageRep());
-
- icon_ = icon;
- UpdateImages();
-
- animation_->Reset(0);
- animation_->SetSlideDuration(kCrossfadeDurationMs);
- animation_->Show();
- } else {
- animation_->Reset(1);
- icon_ = icon;
- UpdateImages();
- }
-}
-
-void FrameCaptionButton::SetStyle(Style style) {
- if (style_ == style)
- return;
- animation_->Reset(1);
- style_ = style;
- UpdateImages();
-}
-
-const char* FrameCaptionButton::GetClassName() const {
- return kViewClassName;
-}
-
-void FrameCaptionButton::OnPaint(gfx::Canvas* canvas) {
- last_paint_scale_ = canvas->image_scale();
- int alpha = static_cast<int>(animation_->GetCurrentValue() * 255);
- int crossfade_alpha = 255 - alpha;
- if (crossfade_alpha > 0 && !crossfade_image_.isNull()) {
- gfx::Canvas composed_canvas(size(), last_paint_scale_, false);
- SkPaint paint;
- paint.setAlpha(crossfade_alpha);
- paint.setXfermodeMode(SkXfermode::kPlus_Mode);
- composed_canvas.DrawImageInt(crossfade_image_, 0, 0, paint);
- paint.setAlpha(alpha);
- ImageButton::OnPaint(&composed_canvas);
-
- canvas->DrawImageInt(
- gfx::ImageSkia(composed_canvas.ExtractImageRep()), 0, 0);
- } else {
- ImageButton::OnPaint(canvas);
- }
-}
-
-void FrameCaptionButton::OnGestureEvent(ui::GestureEvent* event) {
- // ImageButton does not become pressed when the user drags off and then back
- // onto the button. Make FrameCaptionButton pressed in this case because this
- // behavior is more consistent with AlternateFrameSizeButton.
- if (event->type() == ui::ET_GESTURE_SCROLL_BEGIN ||
- event->type() == ui::ET_GESTURE_SCROLL_UPDATE) {
- if (HitTestPoint(event->location())) {
- SetState(STATE_PRESSED);
- RequestFocus();
- event->StopPropagation();
- } else {
- SetState(STATE_NORMAL);
- }
- } else if (event->type() == ui::ET_GESTURE_SCROLL_END) {
- if (HitTestPoint(event->location())) {
- SetState(STATE_HOVERED);
- NotifyClick(*event);
- event->StopPropagation();
- }
- }
- ImageButton::OnGestureEvent(event);
-}
-
-void FrameCaptionButton::StateChanged() {
- if (state_ == STATE_HOVERED || state_ == STATE_PRESSED)
- animation_->Reset(1);
-}
-
-void FrameCaptionButton::UpdateImages() {
- switch (icon_) {
- case CAPTION_BUTTON_ICON_MINIMIZE:
- SetImages(IDR_AURA_WINDOW_MINIMIZE_SHORT,
- IDR_AURA_WINDOW_MINIMIZE_SHORT_H,
- IDR_AURA_WINDOW_MINIMIZE_SHORT_P);
- break;
- case CAPTION_BUTTON_ICON_MAXIMIZE_RESTORE:
- case CAPTION_BUTTON_ICON_LEFT_SNAPPED:
- case CAPTION_BUTTON_ICON_RIGHT_SNAPPED:
- if (style_ == STYLE_SHORT_MAXIMIZED_OR_FULLSCREEN) {
- SetImages(IDR_AURA_WINDOW_MAXIMIZED_RESTORE2,
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_H,
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_P);
- } else if (style_ == STYLE_SHORT_RESTORED) {
- SetImages(IDR_AURA_WINDOW_MAXIMIZED_RESTORE,
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE_H,
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE_P);
- } else {
- SetImages(IDR_AURA_WINDOW_MAXIMIZE,
- IDR_AURA_WINDOW_MAXIMIZE_H,
- IDR_AURA_WINDOW_MAXIMIZE_P);
- }
- break;
- case CAPTION_BUTTON_ICON_CLOSE:
- if (style_ == STYLE_SHORT_MAXIMIZED_OR_FULLSCREEN) {
- SetImages(IDR_AURA_WINDOW_MAXIMIZED_CLOSE2,
- IDR_AURA_WINDOW_MAXIMIZED_CLOSE2_H,
- IDR_AURA_WINDOW_MAXIMIZED_CLOSE2_P);
- } else if (style_ == STYLE_SHORT_RESTORED) {
- SetImages(IDR_AURA_WINDOW_MAXIMIZED_CLOSE,
- IDR_AURA_WINDOW_MAXIMIZED_CLOSE_H,
- IDR_AURA_WINDOW_MAXIMIZED_CLOSE_P);
- } else {
- SetImages(IDR_AURA_WINDOW_CLOSE,
- IDR_AURA_WINDOW_CLOSE_H,
- IDR_AURA_WINDOW_CLOSE_P);
- }
- break;
- }
-
- SchedulePaint();
-}
-
-void FrameCaptionButton::SetImages(int normal_image_id,
- int hot_image_id,
- int pushed_image_id) {
- ui::ResourceBundle& resource_bundle = ui::ResourceBundle::GetSharedInstance();
- SetImage(STATE_NORMAL, resource_bundle.GetImageSkiaNamed(normal_image_id));
- SetImage(STATE_HOVERED, resource_bundle.GetImageSkiaNamed(hot_image_id));
- SetImage(STATE_PRESSED, resource_bundle.GetImageSkiaNamed(pushed_image_id));
-}
-
-void FrameCaptionButton::AnimationProgressed(const gfx::Animation* animation) {
- SchedulePaint();
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/caption_buttons/frame_caption_button.h b/chromium/ash/wm/caption_buttons/frame_caption_button.h
deleted file mode 100644
index 61ed922241b..00000000000
--- a/chromium/ash/wm/caption_buttons/frame_caption_button.h
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_H_
-#define ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_H_
-
-#include "ash/ash_export.h"
-#include "ash/wm/caption_buttons/caption_button_types.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/views/controls/button/image_button.h"
-
-namespace gfx {
-class SlideAnimation;
-}
-
-namespace ash {
-
-// Base class for the window caption buttons (minimize, maximize, restore,
-// close).
-class ASH_EXPORT FrameCaptionButton : public views::ImageButton {
- public:
- enum Animate {
- ANIMATE_YES,
- ANIMATE_NO
- };
-
- enum Style {
- // Restored tabbed browser windows.
- STYLE_TALL_RESTORED,
-
- // All other restored windows.
- STYLE_SHORT_RESTORED,
-
- // Maximized or fullscreen windows.
- STYLE_SHORT_MAXIMIZED_OR_FULLSCREEN
- };
-
- static const char kViewClassName[];
-
- FrameCaptionButton(views::ButtonListener* listener, CaptionButtonIcon icon);
- virtual ~FrameCaptionButton();
-
- // Sets the button's icon. If |animate| is ANIMATE_YES, the button crossfades
- // to the new icon.
- void SetIcon(CaptionButtonIcon icon, Animate animate);
-
- // Sets the button's style. The transition to the new style is not animated.
- void SetStyle(Style style);
-
- // views::View overrides:
- virtual const char* GetClassName() const OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
-
- CaptionButtonIcon icon() const {
- return icon_;
- }
-
- protected:
- // views::CustomButton overrides:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
- virtual void StateChanged() OVERRIDE;
-
- private:
- // Updates the button's images based on the current icon and style.
- void UpdateImages();
-
- // Sets the button's images based on the given ids.
- void SetImages(int normal_image_id, int hot_image_id, int pushed_image_id);
-
- // gfx::AnimationDelegate override:
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
-
- // The button's current icon.
- CaptionButtonIcon icon_;
-
- // The button's current style.
- Style style_;
-
- // The scale at which the button was previously painted.
- float last_paint_scale_;
-
- // The image to crossfade from.
- gfx::ImageSkia crossfade_image_;
-
- scoped_ptr<gfx::SlideAnimation> animation_;
-
- DISALLOW_COPY_AND_ASSIGN(FrameCaptionButton);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_H_
diff --git a/chromium/ash/wm/caption_buttons/frame_caption_button_container_view.cc b/chromium/ash/wm/caption_buttons/frame_caption_button_container_view.cc
deleted file mode 100644
index 1ac3a2625ae..00000000000
--- a/chromium/ash/wm/caption_buttons/frame_caption_button_container_view.cc
+++ /dev/null
@@ -1,276 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/caption_buttons/frame_caption_button_container_view.h"
-
-#include "ash/ash_switches.h"
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
-#include "ash/wm/caption_buttons/alternate_frame_size_button.h"
-#include "ash/wm/caption_buttons/frame_caption_button.h"
-#include "ash/wm/caption_buttons/frame_maximize_button.h"
-#include "grit/ash_resources.h"
-#include "grit/ui_strings.h" // Accessibility names
-#include "ui/base/hit_test.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/compositor/scoped_animation_duration_scale_mode.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/insets.h"
-#include "ui/gfx/point.h"
-#include "ui/views/controls/button/image_button.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-
-namespace {
-
-// The distance between buttons.
-const int kDistanceBetweenButtons = -1;
-
-// Converts |point| from |src| to |dst| and hittests against |dst|.
-bool ConvertPointToViewAndHitTest(const views::View* src,
- const views::View* dst,
- const gfx::Point& point) {
- gfx::Point converted(point);
- views::View::ConvertPointToTarget(src, dst, &converted);
- return dst->HitTestPoint(converted);
-}
-
-} // namespace
-
-// static
-const char FrameCaptionButtonContainerView::kViewClassName[] =
- "FrameCaptionButtonContainerView";
-
-FrameCaptionButtonContainerView::FrameCaptionButtonContainerView(
- views::Widget* frame,
- MinimizeAllowed minimize_allowed)
- : frame_(frame),
- header_style_(HEADER_STYLE_SHORT),
- minimize_button_(NULL),
- size_button_(NULL),
- close_button_(NULL) {
- bool alternate_style = switches::UseAlternateFrameCaptionButtonStyle();
-
- // Insert the buttons left to right.
- minimize_button_ = new FrameCaptionButton(this, CAPTION_BUTTON_ICON_MINIMIZE);
- minimize_button_->SetAccessibleName(
- l10n_util::GetStringUTF16(IDS_APP_ACCNAME_MINIMIZE));
- // Hide |minimize_button_| when using the non-alternate button style because
- // |size_button_| is capable of minimizing in this case.
- minimize_button_->SetVisible(
- minimize_allowed == MINIMIZE_ALLOWED &&
- (alternate_style || !frame_->widget_delegate()->CanMaximize()));
- AddChildView(minimize_button_);
-
- if (alternate_style)
- size_button_ = new AlternateFrameSizeButton(this, frame, this);
- else
- size_button_ = new FrameMaximizeButton(this, frame);
- size_button_->SetAccessibleName(
- l10n_util::GetStringUTF16(IDS_APP_ACCNAME_MAXIMIZE));
- size_button_->SetVisible(frame_->widget_delegate()->CanMaximize());
- AddChildView(size_button_);
-
- close_button_ = new FrameCaptionButton(this, CAPTION_BUTTON_ICON_CLOSE);
- close_button_->SetAccessibleName(
- l10n_util::GetStringUTF16(IDS_APP_ACCNAME_CLOSE));
- AddChildView(close_button_);
-
- button_separator_ = ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- IDR_AURA_WINDOW_BUTTON_SEPARATOR).AsImageSkia();
-}
-
-FrameCaptionButtonContainerView::~FrameCaptionButtonContainerView() {
-}
-
-FrameMaximizeButton*
-FrameCaptionButtonContainerView::GetOldStyleSizeButton() {
- return switches::UseAlternateFrameCaptionButtonStyle() ?
- NULL : static_cast<FrameMaximizeButton*>(size_button_);
-}
-
-void FrameCaptionButtonContainerView::ResetWindowControls() {
- SetButtonsToNormal(ANIMATE_NO);
-}
-
-int FrameCaptionButtonContainerView::NonClientHitTest(
- const gfx::Point& point) const {
- if (close_button_->visible() &&
- ConvertPointToViewAndHitTest(this, close_button_, point)) {
- return HTCLOSE;
- } else if (size_button_->visible() &&
- ConvertPointToViewAndHitTest(this, size_button_, point)) {
- return HTMAXBUTTON;
- } else if (minimize_button_->visible() &&
- ConvertPointToViewAndHitTest(this, minimize_button_, point)) {
- return HTMINBUTTON;
- }
- return HTNOWHERE;
-}
-
-gfx::Size FrameCaptionButtonContainerView::GetPreferredSize() {
- int width = 0;
- bool first_visible = true;
- for (int i = 0; i < child_count(); ++i) {
- views::View* child = child_at(i);
- if (!child->visible())
- continue;
-
- width += child_at(i)->GetPreferredSize().width();
- if (!first_visible)
- width += kDistanceBetweenButtons;
- first_visible = false;
- }
- return gfx::Size(width, close_button_->GetPreferredSize().height());
-}
-
-void FrameCaptionButtonContainerView::Layout() {
- FrameCaptionButton::Style style = FrameCaptionButton::STYLE_SHORT_RESTORED;
- if (header_style_ == HEADER_STYLE_SHORT) {
- if (frame_->IsMaximized() || frame_->IsFullscreen())
- style = FrameCaptionButton::STYLE_SHORT_MAXIMIZED_OR_FULLSCREEN;
- // Else: FrameCaptionButton::STYLE_SHORT_RESTORED;
- } else {
- style = FrameCaptionButton::STYLE_TALL_RESTORED;
- }
-
- minimize_button_->SetStyle(style);
- size_button_->SetStyle(style);
- close_button_->SetStyle(style);
-
- int x = 0;
- for (int i = 0; i < child_count(); ++i) {
- views::View* child = child_at(i);
- if (!child->visible())
- continue;
-
- gfx::Size size = child->GetPreferredSize();
- child->SetBounds(x, 0, size.width(), size.height());
- x += size.width() + kDistanceBetweenButtons;
- }
-}
-
-const char* FrameCaptionButtonContainerView::GetClassName() const {
- return kViewClassName;
-}
-
-void FrameCaptionButtonContainerView::OnPaint(gfx::Canvas* canvas) {
- views::View::OnPaint(canvas);
-
- // The alternate button style does not paint the button separator.
- if (!switches::UseAlternateFrameCaptionButtonStyle()) {
- // We should have at most two visible buttons. The button separator is
- // always painted underneath the close button regardless of whether a
- // button other than the close button is visible.
- gfx::Rect divider(close_button_->bounds().origin(),
- button_separator_.size());
- canvas->DrawImageInt(button_separator_,
- GetMirroredXForRect(divider),
- divider.y());
- }
-}
-
-void FrameCaptionButtonContainerView::ButtonPressed(views::Button* sender,
- const ui::Event& event) {
- // When shift-clicking, slow down animations for visual debugging.
- // We used to do this via an event filter that looked for the shift key being
- // pressed but this interfered with several normal keyboard shortcuts.
- scoped_ptr<ui::ScopedAnimationDurationScaleMode> slow_duration_mode;
- if (event.IsShiftDown()) {
- slow_duration_mode.reset(new ui::ScopedAnimationDurationScaleMode(
- ui::ScopedAnimationDurationScaleMode::SLOW_DURATION));
- }
-
- // Abort any animations of the button icons.
- SetButtonsToNormal(ANIMATE_NO);
-
- ash::UserMetricsAction action =
- ash::UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_MINIMIZE;
- if (sender == minimize_button_) {
- frame_->Minimize();
- } else if (sender == size_button_) {
- if (frame_->IsFullscreen()) { // Can be clicked in immersive fullscreen.
- frame_->SetFullscreen(false);
- action = ash::UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_EXIT_FULLSCREEN;
- } else if (frame_->IsMaximized()) {
- frame_->Restore();
- action = ash::UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_RESTORE;
- } else {
- frame_->Maximize();
- action = ash::UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_MAXIMIZE;
- }
- } else if(sender == close_button_) {
- frame_->Close();
- action = ash::UMA_WINDOW_CLOSE_BUTTON_CLICK;
- } else {
- return;
- }
- ash::Shell::GetInstance()->metrics()->RecordUserMetricsAction(action);
-}
-
-bool FrameCaptionButtonContainerView::IsMinimizeButtonVisible() const {
- return minimize_button_->visible();
-}
-
-void FrameCaptionButtonContainerView::SetButtonsToNormal(Animate animate) {
- SetButtonIcons(CAPTION_BUTTON_ICON_MINIMIZE, CAPTION_BUTTON_ICON_CLOSE,
- animate);
- minimize_button_->SetState(views::Button::STATE_NORMAL);
- size_button_->SetState(views::Button::STATE_NORMAL);
- close_button_->SetState(views::Button::STATE_NORMAL);
-}
-
-void FrameCaptionButtonContainerView::SetButtonIcons(
- CaptionButtonIcon minimize_button_icon,
- CaptionButtonIcon close_button_icon,
- Animate animate) {
- FrameCaptionButton::Animate fcb_animate = (animate == ANIMATE_YES) ?
- FrameCaptionButton::ANIMATE_YES : FrameCaptionButton::ANIMATE_NO;
- minimize_button_->SetIcon(minimize_button_icon, fcb_animate);
- close_button_->SetIcon(close_button_icon, fcb_animate);
-}
-
-const FrameCaptionButton*
-FrameCaptionButtonContainerView::PressButtonAt(
- const gfx::Point& position_in_screen,
- const gfx::Insets& pressed_hittest_outer_insets) const {
- DCHECK(switches::UseAlternateFrameCaptionButtonStyle());
- gfx::Point position(position_in_screen);
- views::View::ConvertPointFromScreen(this, &position);
-
- FrameCaptionButton* buttons[] = {
- close_button_, size_button_, minimize_button_
- };
- FrameCaptionButton* pressed_button = NULL;
- for (size_t i = 0; i < arraysize(buttons); ++i) {
- FrameCaptionButton* button = buttons[i];
- if (!button->visible())
- continue;
-
- if (button->state() == views::Button::STATE_PRESSED) {
- gfx::Rect expanded_bounds = button->bounds();
- expanded_bounds.Inset(pressed_hittest_outer_insets);
- if (expanded_bounds.Contains(position)) {
- pressed_button = button;
- // Do not break in order to give preference to buttons which are
- // closer to |position_in_screen| than the currently pressed button.
- // TODO(pkotwicz): Make the caption buttons not overlap.
- }
- } else if (ConvertPointToViewAndHitTest(this, button, position)) {
- pressed_button = button;
- break;
- }
- }
-
- for (size_t i = 0; i < arraysize(buttons); ++i) {
- buttons[i]->SetState(buttons[i] == pressed_button ?
- views::Button::STATE_PRESSED : views::Button::STATE_NORMAL);
- }
- return pressed_button;
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/caption_buttons/frame_caption_button_container_view.h b/chromium/ash/wm/caption_buttons/frame_caption_button_container_view.h
deleted file mode 100644
index 4fd663b5d70..00000000000
--- a/chromium/ash/wm/caption_buttons/frame_caption_button_container_view.h
+++ /dev/null
@@ -1,136 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_
-#define ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_
-
-#include "ash/ash_export.h"
-#include "ash/wm/caption_buttons/alternate_frame_size_button_delegate.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/views/controls/button/button.h"
-#include "ui/views/view.h"
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-class FrameCaptionButton;
-class FrameMaximizeButton;
-
-// Container view for the frame caption buttons. It performs the appropriate
-// action when a caption button is clicked.
-class ASH_EXPORT FrameCaptionButtonContainerView
- : public views::View,
- public views::ButtonListener,
- public AlternateFrameSizeButtonDelegate {
- public:
- static const char kViewClassName[];
-
- // Whether the frame can be minimized (either via the maximize/restore button
- // or via a dedicated button).
- enum MinimizeAllowed {
- MINIMIZE_ALLOWED,
- MINIMIZE_DISALLOWED
- };
- enum HeaderStyle {
- // Default.
- HEADER_STYLE_SHORT,
-
- // Restored tabbed browser windows.
- HEADER_STYLE_TALL
- };
-
- // |frame| is the views::Widget that the caption buttons act on.
- // |minimize_allowed| indicates whether the frame can be minimized (either via
- // the maximize/restore button or via a dedicated button).
- FrameCaptionButtonContainerView(views::Widget* frame,
- MinimizeAllowed minimize_allowed);
- virtual ~FrameCaptionButtonContainerView();
-
- // For testing.
- class TestApi {
- public:
- explicit TestApi(FrameCaptionButtonContainerView* container_view)
- : container_view_(container_view) {
- }
-
- FrameCaptionButton* minimize_button() const {
- return container_view_->minimize_button_;
- }
-
- FrameCaptionButton* size_button() const {
- return container_view_->size_button_;
- }
-
- FrameCaptionButton* close_button() const {
- return container_view_->close_button_;
- }
-
- private:
- FrameCaptionButtonContainerView* container_view_;
-
- DISALLOW_COPY_AND_ASSIGN(TestApi);
- };
-
- // Returns the size button if using the old caption button style, returns NULL
- // otherwise.
- FrameMaximizeButton* GetOldStyleSizeButton();
-
- // Tell the window controls to reset themselves to the normal state.
- void ResetWindowControls();
-
- // Determines the window HT* code for the caption button at |point|. Returns
- // HTNOWHERE if |point| is not over any of the caption buttons. |point| must
- // be in the coordinates of the FrameCaptionButtonContainerView.
- int NonClientHitTest(const gfx::Point& point) const;
-
- // Sets the header style.
- void set_header_style(HeaderStyle header_style) {
- header_style_ = header_style;
- }
-
- // views::View overrides:
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
-
- private:
- friend class FrameCaptionButtonContainerViewTest;
-
- // views::ButtonListener override:
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
-
- // AlternateFrameSizeButton::Delegate overrides:
- virtual bool IsMinimizeButtonVisible() const OVERRIDE;
- virtual void SetButtonsToNormal(Animate animate) OVERRIDE;
- virtual void SetButtonIcons(CaptionButtonIcon minimize_button_icon,
- CaptionButtonIcon close_button_icon,
- Animate animate) OVERRIDE;
- virtual const FrameCaptionButton* PressButtonAt(
- const gfx::Point& position_in_screen,
- const gfx::Insets& pressed_hittest_outer_insets) const OVERRIDE;
-
- // The widget that the buttons act on.
- views::Widget* frame_;
-
- // The close button separator.
- gfx::ImageSkia button_separator_;
-
- HeaderStyle header_style_;
-
- // The buttons. In the normal button style, at most one of |minimize_button_|
- // and |size_button_| is visible.
- FrameCaptionButton* minimize_button_;
- FrameCaptionButton* size_button_;
- FrameCaptionButton* close_button_;
-
- DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView);
-};
-
-} // namesapace ash
-
-#endif // ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_
diff --git a/chromium/ash/wm/caption_buttons/frame_caption_button_container_view_unittest.cc b/chromium/ash/wm/caption_buttons/frame_caption_button_container_view_unittest.cc
deleted file mode 100644
index 589123125e9..00000000000
--- a/chromium/ash/wm/caption_buttons/frame_caption_button_container_view_unittest.cc
+++ /dev/null
@@ -1,276 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/caption_buttons/frame_caption_button_container_view.h"
-
-#include "ash/ash_switches.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/caption_buttons/frame_caption_button.h"
-#include "base/command_line.h"
-#include "grit/ash_resources.h"
-#include "ui/aura/root_window.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/views/border.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-
-namespace {
-
-class TestWidgetDelegate : public views::WidgetDelegateView {
- public:
- TestWidgetDelegate(bool can_maximize) : can_maximize_(can_maximize) {
- }
- virtual ~TestWidgetDelegate() {
- }
-
- virtual bool CanMaximize() const OVERRIDE {
- return can_maximize_;
- }
-
- private:
- bool can_maximize_;
-
- DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate);
-};
-
-} // namespace
-
-class FrameCaptionButtonContainerViewTest : public ash::test::AshTestBase {
- public:
- enum MaximizeAllowed {
- MAXIMIZE_ALLOWED,
- MAXIMIZE_DISALLOWED
- };
-
- FrameCaptionButtonContainerViewTest() {
- }
-
- virtual ~FrameCaptionButtonContainerViewTest() {
- }
-
- // Creates a widget which allows maximizing based on |maximize_allowed|.
- // The caller takes ownership of the returned widget.
- views::Widget* CreateTestWidget(
- MaximizeAllowed maximize_allowed) WARN_UNUSED_RESULT {
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params;
- params.delegate = new TestWidgetDelegate(
- maximize_allowed == MAXIMIZE_ALLOWED);
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.context = CurrentContext();
- widget->Init(params);
- return widget;
- }
-
- // Tests that |leftmost| and |rightmost| are at |container|'s edges.
- bool CheckButtonsAtEdges(FrameCaptionButtonContainerView* container,
- const ash::FrameCaptionButton& leftmost,
- const ash::FrameCaptionButton& rightmost) {
- gfx::Rect expected(container->GetPreferredSize());
-
- gfx::Rect container_size(container->GetPreferredSize());
- if (leftmost.y() == rightmost.y() &&
- leftmost.height() == rightmost.height() &&
- leftmost.x() == expected.x() &&
- leftmost.y() == expected.y() &&
- leftmost.height() == expected.height() &&
- rightmost.bounds().right() == expected.right()) {
- return true;
- }
-
- LOG(ERROR) << "Buttons " << leftmost.bounds().ToString() << " "
- << rightmost.bounds().ToString() << " not at edges of "
- << expected.ToString();
- return false;
- }
-
- // Returns true if the images for |button|'s states match the passed in ids.
- bool ImagesMatch(ash::FrameCaptionButton* button,
- int normal_image_id,
- int hovered_image_id,
- int pressed_image_id) {
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- gfx::ImageSkia* normal = rb.GetImageSkiaNamed(normal_image_id);
- gfx::ImageSkia* hovered = rb.GetImageSkiaNamed(hovered_image_id);
- gfx::ImageSkia* pressed = rb.GetImageSkiaNamed(pressed_image_id);
- using views::Button;
- gfx::ImageSkia actual_normal = button->GetImage(Button::STATE_NORMAL);
- gfx::ImageSkia actual_hovered = button->GetImage(Button::STATE_HOVERED);
- gfx::ImageSkia actual_pressed = button->GetImage(Button::STATE_PRESSED);
- return actual_normal.BackedBySameObjectAs(*normal) &&
- actual_hovered.BackedBySameObjectAs(*hovered) &&
- actual_pressed.BackedBySameObjectAs(*pressed);
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerViewTest);
-};
-
-class FrameCaptionButtonContainerViewTestOldStyle
- : public FrameCaptionButtonContainerViewTest {
- public:
- FrameCaptionButtonContainerViewTestOldStyle() {
- }
-
- virtual ~FrameCaptionButtonContainerViewTestOldStyle() {
- }
-
- virtual void SetUp() OVERRIDE {
- FrameCaptionButtonContainerViewTest::SetUp();
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kAshDisableAlternateFrameCaptionButtonStyle);
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerViewTestOldStyle);
-};
-
-// Test how the allowed actions affect which caption buttons are visible.
-TEST_F(FrameCaptionButtonContainerViewTestOldStyle, ButtonVisibility) {
- // The minimize button should be hidden when both minimizing and maximizing
- // are allowed because the size button can do both.
- scoped_ptr<views::Widget> widget_can_maximize(
- CreateTestWidget(MAXIMIZE_ALLOWED));
- FrameCaptionButtonContainerView container1(widget_can_maximize.get(),
- FrameCaptionButtonContainerView::MINIMIZE_ALLOWED);
- container1.Layout();
- FrameCaptionButtonContainerView::TestApi t1(&container1);
- EXPECT_FALSE(t1.minimize_button()->visible());
- EXPECT_TRUE(t1.size_button()->visible());
- EXPECT_TRUE(t1.close_button()->visible());
- EXPECT_TRUE(CheckButtonsAtEdges(
- &container1, *t1.size_button(), *t1.close_button()));
-
- // The minimize button should be visible when minimizing is allowed but
- // maximizing is disallowed.
- scoped_ptr<views::Widget> widget_cannot_maximize(
- CreateTestWidget(MAXIMIZE_DISALLOWED));
- FrameCaptionButtonContainerView container2(widget_cannot_maximize.get(),
- FrameCaptionButtonContainerView::MINIMIZE_ALLOWED);
- container2.Layout();
- FrameCaptionButtonContainerView::TestApi t2(&container2);
- EXPECT_TRUE(t2.minimize_button()->visible());
- EXPECT_FALSE(t2.size_button()->visible());
- EXPECT_TRUE(t2.close_button()->visible());
- EXPECT_TRUE(CheckButtonsAtEdges(
- &container2, *t2.minimize_button(), *t2.close_button()));
-
- // Neither the minimize button nor the size button should be visible when
- // neither minimizing nor maximizing are allowed.
- FrameCaptionButtonContainerView container3(widget_cannot_maximize.get(),
- FrameCaptionButtonContainerView::MINIMIZE_DISALLOWED);
- container3.Layout();
- FrameCaptionButtonContainerView::TestApi t3(&container3);
- EXPECT_FALSE(t3.minimize_button()->visible());
- EXPECT_FALSE(t3.size_button()->visible());
- EXPECT_TRUE(t3.close_button()->visible());
- EXPECT_TRUE(CheckButtonsAtEdges(
- &container3, *t3.close_button(), *t3.close_button()));
-}
-
-// Test how the header style affects which images are used for the buttons.
-TEST_F(FrameCaptionButtonContainerViewTestOldStyle, HeaderStyle) {
- scoped_ptr<views::Widget> widget(CreateTestWidget(MAXIMIZE_ALLOWED));
- FrameCaptionButtonContainerView container(widget.get(),
- FrameCaptionButtonContainerView::MINIMIZE_ALLOWED);
- FrameCaptionButtonContainerView::TestApi t(&container);
-
- // Tall header style.
- container.set_header_style(
- FrameCaptionButtonContainerView::HEADER_STYLE_TALL);
- container.Layout();
- EXPECT_TRUE(ImagesMatch(t.size_button(),
- IDR_AURA_WINDOW_MAXIMIZE,
- IDR_AURA_WINDOW_MAXIMIZE_H,
- IDR_AURA_WINDOW_MAXIMIZE_P));
- EXPECT_TRUE(ImagesMatch(t.close_button(),
- IDR_AURA_WINDOW_CLOSE,
- IDR_AURA_WINDOW_CLOSE_H,
- IDR_AURA_WINDOW_CLOSE_P));
-
- // Short header style.
- container.set_header_style(
- FrameCaptionButtonContainerView::HEADER_STYLE_SHORT);
- container.Layout();
- EXPECT_TRUE(ImagesMatch(t.size_button(),
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE,
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE_H,
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE_P));
- EXPECT_TRUE(ImagesMatch(t.close_button(),
- IDR_AURA_WINDOW_MAXIMIZED_CLOSE,
- IDR_AURA_WINDOW_MAXIMIZED_CLOSE_H,
- IDR_AURA_WINDOW_MAXIMIZED_CLOSE_P));
-
- // Maximized short header style.
- widget->Maximize();
- container.Layout();
- EXPECT_TRUE(ImagesMatch(t.size_button(),
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE2,
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_H,
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_P));
- EXPECT_TRUE(ImagesMatch(t.close_button(),
- IDR_AURA_WINDOW_MAXIMIZED_CLOSE2,
- IDR_AURA_WINDOW_MAXIMIZED_CLOSE2_H,
- IDR_AURA_WINDOW_MAXIMIZED_CLOSE2_P));
-
- // The buttons are visible during a reveal of the top-of-window views in
- // immersive fullscreen. They should use the same images as maximized.
- widget->SetFullscreen(true);
- container.Layout();
- EXPECT_TRUE(ImagesMatch(t.size_button(),
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE2,
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_H,
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_P));
- EXPECT_TRUE(ImagesMatch(t.close_button(),
- IDR_AURA_WINDOW_MAXIMIZED_CLOSE2,
- IDR_AURA_WINDOW_MAXIMIZED_CLOSE2_H,
- IDR_AURA_WINDOW_MAXIMIZED_CLOSE2_P));
-}
-
-class FrameCaptionButtonContainerViewTestAlternateStyle
- : public FrameCaptionButtonContainerViewTest {
- public:
- FrameCaptionButtonContainerViewTestAlternateStyle() {
- }
-
- virtual ~FrameCaptionButtonContainerViewTestAlternateStyle() {
- }
-
- virtual void SetUp() OVERRIDE {
- FrameCaptionButtonContainerViewTest::SetUp();
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kAshEnableAlternateFrameCaptionButtonStyle);
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerViewTestAlternateStyle);
-};
-
-// Test how the alternate button style affects which buttons are visible in the
-// default case.
-TEST_F(FrameCaptionButtonContainerViewTestAlternateStyle, ButtonVisibility) {
- // Using the alternate caption button style is dependant on all snapped
- // windows being 50% of the screen's width.
- if (!switches::UseAlternateFrameCaptionButtonStyle())
- return;
-
- // Both the minimize button and the maximize button should be visible when
- // both minimizing and maximizing are allowed when using the alternate
- // button style.
- scoped_ptr<views::Widget> widget_can_maximize(
- CreateTestWidget(MAXIMIZE_ALLOWED));
- FrameCaptionButtonContainerView container(widget_can_maximize.get(),
- FrameCaptionButtonContainerView::MINIMIZE_ALLOWED);
- container.Layout();
- FrameCaptionButtonContainerView::TestApi t(&container);
- EXPECT_TRUE(t.minimize_button()->visible());
- EXPECT_TRUE(t.size_button()->visible());
- EXPECT_TRUE(t.close_button()->visible());
- EXPECT_TRUE(CheckButtonsAtEdges(
- &container, *t.minimize_button(), *t.close_button()));
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/caption_buttons/frame_maximize_button.cc b/chromium/ash/wm/caption_buttons/frame_maximize_button.cc
deleted file mode 100644
index d2f24f01d90..00000000000
--- a/chromium/ash/wm/caption_buttons/frame_maximize_button.cc
+++ /dev/null
@@ -1,591 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/caption_buttons/frame_maximize_button.h"
-
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/touch/touch_uma.h"
-#include "ash/wm/caption_buttons/frame_maximize_button_observer.h"
-#include "ash/wm/caption_buttons/maximize_bubble_controller.h"
-#include "ash/wm/window_animations.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/workspace/phantom_window_controller.h"
-#include "ash/wm/workspace/snap_sizer.h"
-#include "grit/ash_strings.h"
-#include "ui/aura/window.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/events/event.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/image/image.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/window/non_client_view.h"
-
-using ash::internal::SnapSizer;
-
-namespace ash {
-
-namespace {
-
-// Delay before forcing an update of the snap location.
-const int kUpdateDelayMS = 400;
-
-// The delay of the bubble appearance.
-const int kBubbleAppearanceDelayMS = 500;
-
-// The minimum sanp size in percent of the screen width.
-const int kMinSnapSizePercent = 50;
-}
-
-// EscapeEventFilter is installed on the RootWindow to track when the escape key
-// is pressed. We use an EventFilter for this as the FrameMaximizeButton
-// normally does not get focus.
-class FrameMaximizeButton::EscapeEventFilter : public ui::EventHandler {
- public:
- explicit EscapeEventFilter(FrameMaximizeButton* button);
- virtual ~EscapeEventFilter();
-
- // EventFilter overrides:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
-
- private:
- FrameMaximizeButton* button_;
-
- DISALLOW_COPY_AND_ASSIGN(EscapeEventFilter);
-};
-
-FrameMaximizeButton::EscapeEventFilter::EscapeEventFilter(
- FrameMaximizeButton* button)
- : button_(button) {
- Shell::GetInstance()->AddPreTargetHandler(this);
-}
-
-FrameMaximizeButton::EscapeEventFilter::~EscapeEventFilter() {
- Shell::GetInstance()->RemovePreTargetHandler(this);
-}
-
-void FrameMaximizeButton::EscapeEventFilter::OnKeyEvent(
- ui::KeyEvent* event) {
- if (event->type() == ui::ET_KEY_PRESSED &&
- event->key_code() == ui::VKEY_ESCAPE) {
- button_->Cancel(false);
- }
-}
-
-// FrameMaximizeButton ---------------------------------------------------------
-
-FrameMaximizeButton::FrameMaximizeButton(views::ButtonListener* listener,
- views::Widget* frame)
- : FrameCaptionButton(listener, CAPTION_BUTTON_ICON_MAXIMIZE_RESTORE),
- frame_(frame),
- observing_frame_(false),
- is_snap_enabled_(false),
- exceeded_drag_threshold_(false),
- press_is_gesture_(false),
- snap_type_(SNAP_NONE),
- bubble_appearance_delay_ms_(kBubbleAppearanceDelayMS) {
- // TODO(sky): nuke this. It's temporary while we don't have good images.
- SetImageAlignment(ALIGN_LEFT, ALIGN_BOTTOM);
-}
-
-FrameMaximizeButton::~FrameMaximizeButton() {
- // Before the window gets destroyed, the maximizer dialog needs to be shut
- // down since it would otherwise call into a deleted object.
- maximizer_.reset();
- if (observing_frame_)
- OnWindowDestroying(frame_->GetNativeWindow());
-}
-
-void FrameMaximizeButton::AddObserver(FrameMaximizeButtonObserver* observer) {
- observer_list_.AddObserver(observer);
-}
-
-void FrameMaximizeButton::RemoveObserver(
- FrameMaximizeButtonObserver* observer) {
- observer_list_.RemoveObserver(observer);
-}
-
-void FrameMaximizeButton::SnapButtonHovered(SnapType type) {
- // Make sure to only show hover operations when no button is pressed and
- // a similar snap operation in progress does not get re-applied.
- if (is_snap_enabled_ || (type == snap_type_ && snap_sizer_))
- return;
- // Prime the mouse location with the center of the (local) button.
- press_location_ = gfx::Point(width() / 2, height() / 2);
- // Then get an adjusted mouse position to initiate the effect.
- gfx::Point location = press_location_;
- switch (type) {
- case SNAP_LEFT:
- location.set_x(location.x() - width());
- break;
- case SNAP_RIGHT:
- location.set_x(location.x() + width());
- break;
- case SNAP_MINIMIZE:
- location.set_y(location.y() + height());
- break;
- case SNAP_RESTORE:
- // Simulate a mouse button move over the according button.
- if (GetMaximizeBubbleFrameState() == FRAME_STATE_SNAP_LEFT)
- location.set_x(location.x() - width());
- else if (GetMaximizeBubbleFrameState() == FRAME_STATE_SNAP_RIGHT)
- location.set_x(location.x() + width());
- break;
- case SNAP_MAXIMIZE:
- break;
- case SNAP_NONE:
- Cancel(true);
- return;
- default:
- // We should not come here.
- NOTREACHED();
- }
- // Note: There is no hover with touch - we can therefore pass false for touch
- // operations.
- UpdateSnap(location, true, false);
-}
-
-void FrameMaximizeButton::ExecuteSnapAndCloseMenu(SnapType snap_type) {
- // We can come here with no snap type set in case that the mouse opened the
- // maximize button and a touch event "touched" a button.
- if (snap_type_ == SNAP_NONE)
- SnapButtonHovered(snap_type);
-
- Cancel(true);
- // Tell our menu to close.
- maximizer_.reset();
- snap_type_ = snap_type;
- // Since Snap might destroy |this|, but the snap_sizer needs to be destroyed,
- // The ownership of the snap_sizer is taken now.
- scoped_ptr<SnapSizer> snap_sizer(snap_sizer_.release());
- Snap(snap_sizer.get());
-}
-
-void FrameMaximizeButton::OnMaximizeBubbleShown(views::Widget* bubble) {
- FOR_EACH_OBSERVER(FrameMaximizeButtonObserver,
- observer_list_,
- OnMaximizeBubbleShown(bubble));
-}
-
-void FrameMaximizeButton::DestroyMaximizeMenu() {
- Cancel(false);
-}
-
-void FrameMaximizeButton::OnWindowBoundsChanged(
- aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) {
- Cancel(false);
-}
-
-void FrameMaximizeButton::OnWindowPropertyChanged(aura::Window* window,
- const void* key,
- intptr_t old) {
- Cancel(false);
-}
-
-void FrameMaximizeButton::OnWindowDestroying(aura::Window* window) {
- maximizer_.reset();
- if (observing_frame_) {
- CHECK_EQ(frame_->GetNativeWindow(), window);
- frame_->GetNativeWindow()->RemoveObserver(this);
- frame_->RemoveObserver(this);
- observing_frame_ = false;
- }
-}
-
-void FrameMaximizeButton::OnWidgetActivationChanged(views::Widget* widget,
- bool active) {
- // Upon losing focus, the bubble menu and the phantom window should hide.
- if (!active)
- Cancel(false);
-}
-
-bool FrameMaximizeButton::OnMousePressed(const ui::MouseEvent& event) {
- // If we are already in a mouse click / drag operation, a second button down
- // call will cancel (this addresses crbug.com/143755).
- if (is_snap_enabled_) {
- Cancel(false);
- } else {
- is_snap_enabled_ = event.IsOnlyLeftMouseButton();
- if (is_snap_enabled_)
- ProcessStartEvent(event);
- }
- ImageButton::OnMousePressed(event);
- return true;
-}
-
-void FrameMaximizeButton::OnMouseEntered(const ui::MouseEvent& event) {
- ImageButton::OnMouseEntered(event);
- if (!maximizer_) {
- DCHECK(GetWidget());
- if (!observing_frame_) {
- observing_frame_ = true;
- frame_->GetNativeWindow()->AddObserver(this);
- frame_->AddObserver(this);
- }
- maximizer_.reset(new MaximizeBubbleController(
- this,
- GetMaximizeBubbleFrameState(),
- bubble_appearance_delay_ms_));
- }
-}
-
-void FrameMaximizeButton::OnMouseExited(const ui::MouseEvent& event) {
- ImageButton::OnMouseExited(event);
- // Remove the bubble menu when the button is not pressed and the mouse is not
- // within the bubble.
- if (!is_snap_enabled_ && maximizer_) {
- if (maximizer_->GetBubbleWindow()) {
- gfx::Point screen_location = Shell::GetScreen()->GetCursorScreenPoint();
- if (!maximizer_->GetBubbleWindow()->GetBoundsInScreen().Contains(
- screen_location)) {
- maximizer_.reset();
- // Make sure that all remaining snap hover states get removed.
- SnapButtonHovered(SNAP_NONE);
- }
- } else {
- // The maximize dialog does not show up immediately after creating the
- // |maximizer_|. Destroy the dialog therefore before it shows up.
- maximizer_.reset();
- }
- }
-}
-
-bool FrameMaximizeButton::OnMouseDragged(const ui::MouseEvent& event) {
- if (is_snap_enabled_)
- ProcessUpdateEvent(event);
- return ImageButton::OnMouseDragged(event);
-}
-
-void FrameMaximizeButton::OnMouseReleased(const ui::MouseEvent& event) {
- maximizer_.reset();
- bool snap_was_enabled = is_snap_enabled_;
- if (!ProcessEndEvent(event) && snap_was_enabled)
- ImageButton::OnMouseReleased(event);
- // At this point |this| might be already destroyed.
-}
-
-void FrameMaximizeButton::OnMouseCaptureLost() {
- Cancel(false);
- ImageButton::OnMouseCaptureLost();
-}
-
-void FrameMaximizeButton::OnGestureEvent(ui::GestureEvent* event) {
- if (event->type() == ui::ET_GESTURE_TAP_DOWN) {
- is_snap_enabled_ = true;
- ProcessStartEvent(*event);
- event->SetHandled();
- return;
- }
-
- if (event->type() == ui::ET_GESTURE_TAP ||
- (event->type() == ui::ET_GESTURE_SCROLL_END && is_snap_enabled_) ||
- event->type() == ui::ET_SCROLL_FLING_START) {
- // The position of the event may have changed from the previous event (both
- // for TAP and SCROLL_END). So it is necessary to update the snap-state for
- // the current event.
- ProcessUpdateEvent(*event);
- if (event->type() == ui::ET_GESTURE_TAP) {
- snap_type_ = SnapTypeForLocation(event->location());
- TouchUMA::GetInstance()->RecordGestureAction(
- TouchUMA::GESTURE_FRAMEMAXIMIZE_TAP);
- }
- ProcessEndEvent(*event);
- event->SetHandled();
- return;
- }
-
- if (is_snap_enabled_) {
- if (event->type() == ui::ET_GESTURE_END &&
- event->details().touch_points() == 1) {
- // The position of the event may have changed from the previous event. So
- // it is necessary to update the snap-state for the current event.
- ProcessUpdateEvent(*event);
- snap_type_ = SnapTypeForLocation(event->location());
- ProcessEndEvent(*event);
- event->SetHandled();
- return;
- }
-
- if (event->type() == ui::ET_GESTURE_SCROLL_UPDATE ||
- event->type() == ui::ET_GESTURE_SCROLL_BEGIN) {
- ProcessUpdateEvent(*event);
- event->SetHandled();
- return;
- }
- }
-
- ImageButton::OnGestureEvent(event);
-}
-
-void FrameMaximizeButton::SetVisible(bool visible) {
- views::View::SetVisible(visible);
-}
-
-void FrameMaximizeButton::ProcessStartEvent(const ui::LocatedEvent& event) {
- DCHECK(is_snap_enabled_);
- // Prepare the help menu.
- if (!maximizer_) {
- maximizer_.reset(new MaximizeBubbleController(
- this,
- GetMaximizeBubbleFrameState(),
- bubble_appearance_delay_ms_));
- } else {
- // If the menu did not show up yet, we delay it even a bit more.
- maximizer_->DelayCreation();
- }
- snap_sizer_.reset(NULL);
- InstallEventFilter();
- snap_type_ = SNAP_NONE;
- press_location_ = event.location();
- press_is_gesture_ = event.IsGestureEvent();
- exceeded_drag_threshold_ = false;
- update_timer_.Start(
- FROM_HERE,
- base::TimeDelta::FromMilliseconds(kUpdateDelayMS),
- this,
- &FrameMaximizeButton::UpdateSnapFromEventLocation);
-}
-
-void FrameMaximizeButton::ProcessUpdateEvent(const ui::LocatedEvent& event) {
- DCHECK(is_snap_enabled_);
- if (!exceeded_drag_threshold_) {
- exceeded_drag_threshold_ = views::View::ExceededDragThreshold(
- event.location() - press_location_);
- }
- if (exceeded_drag_threshold_)
- UpdateSnap(event.location(), false, event.IsGestureEvent());
-}
-
-bool FrameMaximizeButton::ProcessEndEvent(const ui::LocatedEvent& event) {
- update_timer_.Stop();
- UninstallEventFilter();
- bool should_snap = is_snap_enabled_;
- is_snap_enabled_ = false;
-
- // Remove our help bubble.
- maximizer_.reset();
-
- if (!should_snap || snap_type_ == SNAP_NONE)
- return false;
-
- SetState(views::CustomButton::STATE_NORMAL);
- // SetState will not call SchedulePaint() if state was already set to
- // STATE_NORMAL during a drag.
- SchedulePaint();
- phantom_window_.reset();
- // Since Snap might destroy |this|, but the snap_sizer needs to be destroyed,
- // The ownership of the snap_sizer is taken now.
- scoped_ptr<SnapSizer> snap_sizer(snap_sizer_.release());
- Snap(snap_sizer.get());
- return true;
-}
-
-void FrameMaximizeButton::Cancel(bool keep_menu_open) {
- if (!keep_menu_open) {
- maximizer_.reset();
- UninstallEventFilter();
- is_snap_enabled_ = false;
- snap_sizer_.reset();
- }
- phantom_window_.reset();
- snap_type_ = SNAP_NONE;
- update_timer_.Stop();
- SchedulePaint();
-}
-
-void FrameMaximizeButton::InstallEventFilter() {
- if (escape_event_filter_)
- return;
-
- escape_event_filter_.reset(new EscapeEventFilter(this));
-}
-
-void FrameMaximizeButton::UninstallEventFilter() {
- escape_event_filter_.reset(NULL);
-}
-
-void FrameMaximizeButton::UpdateSnapFromEventLocation() {
- // If the drag threshold has been exceeded the snap location is up to date.
- if (exceeded_drag_threshold_)
- return;
- exceeded_drag_threshold_ = true;
- UpdateSnap(press_location_, false, press_is_gesture_);
-}
-
-void FrameMaximizeButton::UpdateSnap(const gfx::Point& location,
- bool select_default,
- bool is_touch) {
- SnapType type = SnapTypeForLocation(location);
- if (type == snap_type_) {
- if (snap_sizer_) {
- snap_sizer_->Update(LocationForSnapSizer(location));
- phantom_window_->Show(ScreenAsh::ConvertRectToScreen(
- frame_->GetNativeView()->parent(),
- snap_sizer_->target_bounds()));
- }
- return;
- }
-
- snap_type_ = type;
- snap_sizer_.reset();
- SchedulePaint();
-
- if (snap_type_ == SNAP_NONE) {
- phantom_window_.reset();
- return;
- }
-
- if (snap_type_ == SNAP_LEFT || snap_type_ == SNAP_RIGHT) {
- SnapSizer::Edge snap_edge = snap_type_ == SNAP_LEFT ?
- SnapSizer::LEFT_EDGE : SnapSizer::RIGHT_EDGE;
- SnapSizer::InputType input_type =
- is_touch ? SnapSizer::TOUCH_MAXIMIZE_BUTTON_INPUT :
- SnapSizer::OTHER_INPUT;
- snap_sizer_.reset(new SnapSizer(
- wm::GetWindowState(frame_->GetNativeWindow()),
- LocationForSnapSizer(location),
- snap_edge,
- input_type));
- if (select_default)
- snap_sizer_->SelectDefaultSizeAndDisableResize();
- }
- if (!phantom_window_) {
- phantom_window_.reset(new internal::PhantomWindowController(
- frame_->GetNativeWindow()));
- }
- if (maximizer_) {
- phantom_window_->set_phantom_below_window(maximizer_->GetBubbleWindow());
- maximizer_->SetSnapType(snap_type_);
- }
- phantom_window_->Show(
- ScreenBoundsForType(snap_type_, *snap_sizer_.get()));
-}
-
-SnapType FrameMaximizeButton::SnapTypeForLocation(
- const gfx::Point& location) const {
- MaximizeBubbleFrameState maximize_type = GetMaximizeBubbleFrameState();
- gfx::Vector2d delta(location - press_location_);
- if (!views::View::ExceededDragThreshold(delta))
- return maximize_type != FRAME_STATE_FULL ? SNAP_MAXIMIZE : SNAP_RESTORE;
- if (delta.x() < 0 && delta.y() > delta.x() && delta.y() < -delta.x())
- return maximize_type == FRAME_STATE_SNAP_LEFT ? SNAP_RESTORE : SNAP_LEFT;
- if (delta.x() > 0 && delta.y() > -delta.x() && delta.y() < delta.x())
- return maximize_type == FRAME_STATE_SNAP_RIGHT ? SNAP_RESTORE : SNAP_RIGHT;
- if (delta.y() > 0)
- return SNAP_MINIMIZE;
- return maximize_type != FRAME_STATE_FULL ? SNAP_MAXIMIZE : SNAP_RESTORE;
-}
-
-gfx::Rect FrameMaximizeButton::ScreenBoundsForType(
- SnapType type,
- const SnapSizer& snap_sizer) const {
- aura::Window* window = frame_->GetNativeWindow();
- switch (type) {
- case SNAP_LEFT:
- case SNAP_RIGHT:
- return ScreenAsh::ConvertRectToScreen(window->parent(),
- snap_sizer.target_bounds());
- case SNAP_MAXIMIZE:
- return ScreenAsh::ConvertRectToScreen(
- window->parent(),
- ScreenAsh::GetMaximizedWindowBoundsInParent(window));
- case SNAP_MINIMIZE: {
- gfx::Rect rect = GetMinimizeAnimationTargetBoundsInScreen(window);
- if (!rect.IsEmpty()) {
- // PhantomWindowController insets slightly, outset it so the phantom
- // doesn't appear inset.
- rect.Inset(-8, -8);
- }
- return rect;
- }
- case SNAP_RESTORE: {
- wm::WindowState* window_state = wm::GetWindowState(window);
- return window_state->HasRestoreBounds() ?
- window_state->GetRestoreBoundsInScreen() :
- frame_->GetWindowBoundsInScreen();
- }
- case SNAP_NONE:
- NOTREACHED();
- }
- return gfx::Rect();
-}
-
-gfx::Point FrameMaximizeButton::LocationForSnapSizer(
- const gfx::Point& location) const {
- gfx::Point result(location);
- views::View::ConvertPointToScreen(this, &result);
- return result;
-}
-
-void FrameMaximizeButton::Snap(SnapSizer* snap_sizer) {
- Shell* shell = Shell::GetInstance();
- switch (snap_type_) {
- case SNAP_LEFT:
- case SNAP_RIGHT: {
- snap_sizer->SnapWindowToTargetBounds();
- shell->metrics()->RecordUserMetricsAction(
- snap_type_ == SNAP_LEFT ?
- UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE_LEFT :
- UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE_RIGHT);
- break;
- }
- case SNAP_MAXIMIZE:
- frame_->Maximize();
- shell->metrics()->RecordUserMetricsAction(
- UMA_WINDOW_MAXIMIZE_BUTTON_MAXIMIZE);
- break;
- case SNAP_MINIMIZE:
- frame_->Minimize();
- shell->metrics()->RecordUserMetricsAction(
- UMA_WINDOW_MAXIMIZE_BUTTON_MINIMIZE);
- break;
- case SNAP_RESTORE:
- frame_->Restore();
- shell->metrics()->RecordUserMetricsAction(
- UMA_WINDOW_MAXIMIZE_BUTTON_RESTORE);
- break;
- case SNAP_NONE:
- NOTREACHED();
- }
-}
-
-MaximizeBubbleFrameState
-FrameMaximizeButton::GetMaximizeBubbleFrameState() const {
- wm::WindowState* window_state =
- wm::GetWindowState(frame_->GetNativeWindow());
- // When there are no restore bounds, we are in normal mode.
- if (!window_state->HasRestoreBounds())
- return FRAME_STATE_NONE;
- // The normal maximized test can be used.
- if (frame_->IsMaximized())
- return FRAME_STATE_FULL;
- // For Left/right maximize we need to check the dimensions.
- gfx::Rect bounds = frame_->GetWindowBoundsInScreen();
- gfx::Rect screen = Shell::GetScreen()->GetDisplayNearestWindow(
- frame_->GetNativeView()).work_area();
- if (bounds.width() < (screen.width() * kMinSnapSizePercent) / 100)
- return FRAME_STATE_NONE;
- // We might still have a horizontally filled window at this point which we
- // treat as no special state.
- if (bounds.y() != screen.y() || bounds.height() != screen.height())
- return FRAME_STATE_NONE;
-
- // We have to be in a maximize mode at this point.
- if (bounds.x() == screen.x())
- return FRAME_STATE_SNAP_LEFT;
- if (bounds.right() == screen.right())
- return FRAME_STATE_SNAP_RIGHT;
- // If we come here, it is likely caused by the fact that the
- // "VerticalResizeDoubleClick" stored a restore rectangle. In that case
- // we allow all maximize operations (and keep the restore rectangle).
- return FRAME_STATE_NONE;
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/caption_buttons/frame_maximize_button.h b/chromium/ash/wm/caption_buttons/frame_maximize_button.h
deleted file mode 100644
index a1bb991a98f..00000000000
--- a/chromium/ash/wm/caption_buttons/frame_maximize_button.h
+++ /dev/null
@@ -1,193 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_H_
-#define ASH_WM_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_H_
-
-#include "ash/ash_export.h"
-#include "ash/wm/caption_buttons/caption_button_types.h"
-#include "ash/wm/caption_buttons/frame_caption_button.h"
-#include "ash/wm/workspace/snap_types.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/observer_list.h"
-#include "base/timer/timer.h"
-#include "ui/aura/window_observer.h"
-#include "ui/views/widget/widget_observer.h"
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-class FrameMaximizeButtonObserver;
-
-namespace internal {
-class PhantomWindowController;
-class SnapSizer;
-}
-
-class MaximizeBubbleController;
-
-// Button used for the maximize control on the frame. Handles snapping logic.
-class ASH_EXPORT FrameMaximizeButton : public FrameCaptionButton,
- public views::WidgetObserver,
- public aura::WindowObserver {
- public:
- FrameMaximizeButton(views::ButtonListener* listener,
- views::Widget* frame);
- virtual ~FrameMaximizeButton();
-
- void AddObserver(FrameMaximizeButtonObserver* observer);
- void RemoveObserver(FrameMaximizeButtonObserver* observer);
-
- // Updates |snap_type_| based on a a given snap type. This is used by
- // external hover events from the button menu.
- void SnapButtonHovered(SnapType type);
-
- // The user clicked the |type| button and the action needs to be performed,
- // which will at the same time close the window.
- void ExecuteSnapAndCloseMenu(SnapType type);
-
- // Called by the MaximizeBubbleController when the maximize bubble is shown.
- void OnMaximizeBubbleShown(views::Widget* bubble);
-
- // Remove the maximize menu from the screen (and destroy it).
- void DestroyMaximizeMenu();
-
- // Returns true when the user clicks and drags the button.
- bool is_snap_enabled() const { return is_snap_enabled_; }
-
- // WindowObserver overrides:
- virtual void OnWindowBoundsChanged(aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
- virtual void OnWindowPropertyChanged(aura::Window* window,
- const void* key,
- intptr_t old) OVERRIDE;
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
-
- // WidgetObserver overrides:
- virtual void OnWidgetActivationChanged(views::Widget* widget,
- bool active) OVERRIDE;
-
- // ImageButton overrides:
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
-
- // ui::EventHandler overrides:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- // views::View overwrite:
- virtual void SetVisible(bool visible) OVERRIDE;
-
- // Unit test overwrite: Change the UI delay used for the bubble show up.
- void set_bubble_appearance_delay_ms(int bubble_appearance_delay_ms) {
- bubble_appearance_delay_ms_ = bubble_appearance_delay_ms;
- }
-
- // Unit test accessor for the maximize bubble.
- MaximizeBubbleController* maximizer() { return maximizer_.get(); }
-
- // Unit test to see if phantom window is open.
- bool phantom_window_open() { return phantom_window_.get() != NULL; }
-
- private:
- class EscapeEventFilter;
-
- // Initializes the snap-gesture based on the event. This should only be called
- // when the event is confirmed to have started a snap gesture.
- void ProcessStartEvent(const ui::LocatedEvent& event);
-
- // Updates the snap-state based on the current event. This should only be
- // called after the snap gesture has already started.
- void ProcessUpdateEvent(const ui::LocatedEvent& event);
-
- // Returns true if the window was snapped. Returns false otherwise.
- bool ProcessEndEvent(const ui::LocatedEvent& event);
-
- // Cancels snap behavior. If |keep_menu_open| is set, a possibly opened
- // bubble help will remain open.
- void Cancel(bool keep_menu_open);
-
- // Installs/uninstalls an EventFilter to track when escape is pressed.
- void InstallEventFilter();
- void UninstallEventFilter();
-
- // Updates the snap position from the event location. This is invoked by
- // |update_timer_|.
- void UpdateSnapFromEventLocation();
-
- // Updates |snap_type_| based on a mouse drag. If |select_default| is set,
- // the single button click default setting of the snap sizer should be used.
- // Set |is_touch| to true to make touch snapping at the corners possible.
- void UpdateSnap(const gfx::Point& location,
- bool select_default,
- bool is_touch);
-
- // Returns the type of snap based on the specified location.
- SnapType SnapTypeForLocation(const gfx::Point& location) const;
-
- // Returns the bounds of the resulting window for the specified type.
- gfx::Rect ScreenBoundsForType(SnapType type,
- const internal::SnapSizer& snap_sizer) const;
-
- // Converts location to screen coordinates and returns it. These are the
- // coordinates used by the SnapSizer.
- gfx::Point LocationForSnapSizer(const gfx::Point& location) const;
-
- // Snaps the window to the current snap position.
- void Snap(internal::SnapSizer* snap_sizer);
-
- // Determine the maximize type of this window.
- MaximizeBubbleFrameState GetMaximizeBubbleFrameState() const;
-
- // Widget that the maximize button acts on. This is different than the widget
- // which contains the button in the case of AppNonClientFrameViewAsh.
- views::Widget* frame_;
-
- // True if we have put observers on |frame_|.
- bool observing_frame_;
-
- // Renders the snap position.
- scoped_ptr<internal::PhantomWindowController> phantom_window_;
-
- // Is snapping enabled? Set on press so that in drag we know whether we
- // should show the snap locations.
- bool is_snap_enabled_;
-
- // Did the user drag far enough to trigger snapping?
- bool exceeded_drag_threshold_;
-
- // Location of the press.
- gfx::Point press_location_;
-
- // True if the press was triggered by a gesture/touch.
- bool press_is_gesture_;
-
- // Current snap type.
- SnapType snap_type_;
-
- scoped_ptr<internal::SnapSizer> snap_sizer_;
-
- scoped_ptr<EscapeEventFilter> escape_event_filter_;
-
- base::OneShotTimer<FrameMaximizeButton> update_timer_;
-
- scoped_ptr<MaximizeBubbleController> maximizer_;
-
- // The delay of the bubble appearance.
- int bubble_appearance_delay_ms_;
-
- ObserverList<FrameMaximizeButtonObserver> observer_list_;
-
- DISALLOW_COPY_AND_ASSIGN(FrameMaximizeButton);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_H_
diff --git a/chromium/ash/wm/caption_buttons/frame_maximize_button_observer.h b/chromium/ash/wm/caption_buttons/frame_maximize_button_observer.h
deleted file mode 100644
index 1962f60416c..00000000000
--- a/chromium/ash/wm/caption_buttons/frame_maximize_button_observer.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_OBSERVER_H_
-#define ASH_WM_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_OBSERVER_H_
-
-#include "ash/ash_export.h"
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-
-class ASH_EXPORT FrameMaximizeButtonObserver {
- public:
- virtual ~FrameMaximizeButtonObserver() {}
-
- // Called when the maximize button's help bubble is shown.
- virtual void OnMaximizeBubbleShown(views::Widget* bubble) = 0;
-};
-
-} // namespace ash
-
-#endif // ASH_WM_CAPTION_BUTTONS_FRAME_MAXIMIZE_BUTTON_OBSERVER_H_
diff --git a/chromium/ash/wm/caption_buttons/frame_maximize_button_unittest.cc b/chromium/ash/wm/caption_buttons/frame_maximize_button_unittest.cc
deleted file mode 100644
index c0fd2a0a8a9..00000000000
--- a/chromium/ash/wm/caption_buttons/frame_maximize_button_unittest.cc
+++ /dev/null
@@ -1,878 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/caption_buttons/frame_maximize_button.h"
-
-#include "ash/ash_switches.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/caption_buttons/frame_caption_button_container_view.h"
-#include "ash/wm/caption_buttons/maximize_bubble_controller.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/snap_sizer.h"
-#include "base/command_line.h"
-#include "ui/aura/client/focus_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/window.h"
-#include "ui/events/event_utils.h"
-#include "ui/events/gestures/gesture_configuration.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-namespace test {
-
-namespace {
-
-class CancelCallbackHandler {
- public:
- CancelCallbackHandler(int update_events_before_cancel,
- FrameMaximizeButton* maximize_button) :
- update_events_before_cancel_(update_events_before_cancel),
- maximize_button_(maximize_button) {}
- virtual ~CancelCallbackHandler() {}
-
- void CountedCancelCallback(ui::EventType event_type,
- const gfx::Vector2dF& pos) {
- if (event_type == ui::ET_GESTURE_SCROLL_UPDATE &&
- !(--update_events_before_cancel_)) {
- // Make sure that we are in the middle of a resizing operation, cancel it
- // and then test that it is exited.
- EXPECT_TRUE(maximize_button_->is_snap_enabled());
- maximize_button_->DestroyMaximizeMenu();
- EXPECT_FALSE(maximize_button_->is_snap_enabled());
- }
- }
-
- private:
- // When this counter reaches 0, the gesture maximize action gets cancelled.
- int update_events_before_cancel_;
-
- // The maximize button which needs to get informed of the gesture termination.
- FrameMaximizeButton* maximize_button_;
-
- DISALLOW_COPY_AND_ASSIGN(CancelCallbackHandler);
-};
-
-class TestWidgetDelegate : public views::WidgetDelegateView {
- public:
- TestWidgetDelegate() {}
- virtual ~TestWidgetDelegate() {}
-
- // views::WidgetDelegate overrides:
- virtual views::View* GetContentsView() OVERRIDE {
- return this;
- }
- virtual bool CanResize() const OVERRIDE {
- return true;
- }
- virtual bool CanMaximize() const OVERRIDE {
- return true;
- }
-
- ash::FrameCaptionButtonContainerView* caption_button_container() {
- return caption_button_container_;
- }
-
- private:
- // Overridden from views::View:
- virtual void Layout() OVERRIDE {
- caption_button_container_->Layout();
-
- // Right align the caption button container.
- gfx::Size preferred_size = caption_button_container_->GetPreferredSize();
- caption_button_container_->SetBounds(width() - preferred_size.width(), 0,
- preferred_size.width(), preferred_size.height());
- }
-
- virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE {
- if (details.is_add && details.child == this) {
- caption_button_container_ = new FrameCaptionButtonContainerView(
- GetWidget(), FrameCaptionButtonContainerView::MINIMIZE_ALLOWED);
- AddChildView(caption_button_container_);
- }
- }
-
- // Not owned.
- ash::FrameCaptionButtonContainerView* caption_button_container_;
-
- DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate);
-};
-
-} // namespace
-
-class FrameMaximizeButtonTest : public ash::test::AshTestBase {
- public:
- FrameMaximizeButtonTest() {}
- virtual ~FrameMaximizeButtonTest() {}
-
- // The returned widget takes ownership of |delegate|.
- views::Widget* CreateWidget(views::WidgetDelegate* delegate) {
- views::Widget::InitParams params(
- views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- views::Widget* widget = new views::Widget;
- params.context = CurrentContext();
- params.delegate = delegate;
- params.bounds = gfx::Rect(10, 10, 100, 100);
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- widget->Init(params);
- widget->Show();
- return widget;
- }
-
- void CloseWidget() {
- if (widget_)
- widget_->CloseNow();
- widget_ = NULL;
- }
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
-
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kAshDisableAlternateFrameCaptionButtonStyle);
-
- TestWidgetDelegate* delegate = new TestWidgetDelegate();
- widget_ = CreateWidget(delegate);
- FrameCaptionButtonContainerView* caption_button_container =
- delegate->caption_button_container();
-
- FrameCaptionButtonContainerView::TestApi test(caption_button_container);
- maximize_button_ = static_cast<FrameMaximizeButton*>(
- test.size_button());
- }
-
- virtual void TearDown() OVERRIDE {
- CloseWidget();
- AshTestBase::TearDown();
- }
-
- views::Widget* widget() { return widget_; }
-
- FrameMaximizeButton* maximize_button() { return maximize_button_; }
-
- private:
- views::Widget* widget_;
- FrameMaximizeButton* maximize_button_;
-
- DISALLOW_COPY_AND_ASSIGN(FrameMaximizeButtonTest);
-};
-
-// Tests that clicking on the resize-button toggles between maximize and normal
-// state.
-TEST_F(FrameMaximizeButtonTest, ResizeButtonToggleMaximize) {
- wm::WindowState* window_state =
- wm::GetWindowState(widget()->GetNativeWindow());
- views::View* view = maximize_button();
- gfx::Point center = view->GetBoundsInScreen().CenterPoint();
-
- aura::test::EventGenerator generator(
- window_state->window()->GetRootWindow(), center);
-
- EXPECT_FALSE(window_state->IsMaximized());
-
- generator.ClickLeftButton();
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(window_state->IsMaximized());
-
- center = view->GetBoundsInScreen().CenterPoint();
- generator.MoveMouseTo(center);
- generator.ClickLeftButton();
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(window_state->IsMaximized());
-
- generator.GestureTapAt(view->GetBoundsInScreen().CenterPoint());
- EXPECT_TRUE(window_state->IsMaximized());
-
- generator.GestureTapAt(view->GetBoundsInScreen().CenterPoint());
- EXPECT_FALSE(window_state->IsMaximized());
-
- generator.GestureTapDownAndUp(view->GetBoundsInScreen().CenterPoint());
- EXPECT_TRUE(window_state->IsMaximized());
-
- generator.GestureTapDownAndUp(view->GetBoundsInScreen().CenterPoint());
- EXPECT_FALSE(window_state->IsMaximized());
-}
-
-#if defined(OS_WIN)
-// RootWindow and Display can't resize on Windows Ash. http://crbug.com/165962
-#define MAYBE_ResizeButtonDrag DISABLED_ResizeButtonDrag
-#else
-#define MAYBE_ResizeButtonDrag ResizeButtonDrag
-#endif
-
-// Tests that click+dragging on the resize-button tiles or minimizes the window.
-TEST_F(FrameMaximizeButtonTest, MAYBE_ResizeButtonDrag) {
- aura::Window* window = widget()->GetNativeWindow();
- views::View* view = maximize_button();
- gfx::Point center = view->GetBoundsInScreen().CenterPoint();
-
- aura::test::EventGenerator generator(window->GetRootWindow(), center);
-
- wm::WindowState* window_state = wm::GetWindowState(window);
- EXPECT_TRUE(window_state->IsNormalShowState());
-
- // Snap right.
- {
- generator.PressLeftButton();
- generator.MoveMouseBy(10, 0);
- generator.ReleaseLeftButton();
- RunAllPendingInMessageLoop();
-
- EXPECT_FALSE(window_state->IsMaximized());
- EXPECT_FALSE(window_state->IsMinimized());
- internal::SnapSizer sizer(window_state, center,
- internal::SnapSizer::RIGHT_EDGE,
- internal::SnapSizer::OTHER_INPUT);
- EXPECT_EQ(sizer.target_bounds().ToString(), window->bounds().ToString());
- }
-
- // Snap left.
- {
- center = view->GetBoundsInScreen().CenterPoint();
- generator.MoveMouseTo(center);
- generator.PressLeftButton();
- generator.MoveMouseBy(-10, 0);
- generator.ReleaseLeftButton();
- RunAllPendingInMessageLoop();
-
- EXPECT_FALSE(window_state->IsMaximized());
- EXPECT_FALSE(window_state->IsMinimized());
- internal::SnapSizer sizer(window_state, center,
- internal::SnapSizer::LEFT_EDGE,
- internal::SnapSizer::OTHER_INPUT);
- EXPECT_EQ(sizer.target_bounds().ToString(), window->bounds().ToString());
- }
-
- // Minimize.
- {
- center = view->GetBoundsInScreen().CenterPoint();
- generator.MoveMouseTo(center);
- generator.PressLeftButton();
- generator.MoveMouseBy(0, 10);
- generator.ReleaseLeftButton();
- RunAllPendingInMessageLoop();
-
- EXPECT_TRUE(window_state->IsMinimized());
- }
-
- window_state->Restore();
-
- // Now test the same behaviour for gesture events.
-
- // Snap right.
- {
- center = view->GetBoundsInScreen().CenterPoint();
- gfx::Point end = center;
- end.Offset(80, 0);
- generator.GestureScrollSequence(center, end,
- base::TimeDelta::FromMilliseconds(100),
- 3);
- RunAllPendingInMessageLoop();
-
- EXPECT_FALSE(window_state->IsMaximized());
- EXPECT_FALSE(window_state->IsMinimized());
- // This is a short resizing distance and different touch behavior
- // applies which leads in half of the screen being used.
- EXPECT_EQ("400,0 400x553", window->bounds().ToString());
- }
-
- // Snap left.
- {
- center = view->GetBoundsInScreen().CenterPoint();
- gfx::Point end = center;
- end.Offset(-80, 0);
- generator.GestureScrollSequence(center, end,
- base::TimeDelta::FromMilliseconds(100),
- 3);
- RunAllPendingInMessageLoop();
-
- EXPECT_FALSE(window_state->IsMaximized());
- EXPECT_FALSE(window_state->IsMinimized());
- internal::SnapSizer sizer(window_state, center,
- internal::SnapSizer::LEFT_EDGE,
- internal::SnapSizer::OTHER_INPUT);
- EXPECT_EQ(sizer.target_bounds().ToString(), window->bounds().ToString());
- }
-
- // Minimize.
- {
- center = view->GetBoundsInScreen().CenterPoint();
- gfx::Point end = center;
- end.Offset(0, 40);
- generator.GestureScrollSequence(center, end,
- base::TimeDelta::FromMilliseconds(100),
- 3);
- RunAllPendingInMessageLoop();
-
- EXPECT_TRUE(window_state->IsMinimized());
- }
-
- // Test with gesture events.
-}
-
-#if defined(OS_WIN)
-// RootWindow and Display can't resize on Windows Ash. http://crbug.com/165962
-#define MAYBE_TouchDragResizeCloseToCornerDiffersFromMouse \
- DISABLED_TouchDragResizeCloseToCornerDiffersFromMouse
-#else
-#define MAYBE_TouchDragResizeCloseToCornerDiffersFromMouse \
- TouchDragResizeCloseToCornerDiffersFromMouse
-#endif
-
-// Tests Left/Right snapping with resize button touch dragging - which should
-// trigger dependent on the available drag distance.
-TEST_F(FrameMaximizeButtonTest,
- MAYBE_TouchDragResizeCloseToCornerDiffersFromMouse) {
- // The test is uninteresting when windows can only be snapped to a single
- // width because snapping the window via mouse and touch results in the same
- // final bounds.
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshMultipleSnapWindowWidths)) {
- return;
- }
-
- aura::Window* window = widget()->GetNativeWindow();
- views::View* view = maximize_button();
-
- gfx::Rect work_area = widget()->GetWorkAreaBoundsInScreen();
- gfx::Rect bounds = window->bounds();
- bounds.set_x(work_area.width() - bounds.width());
- widget()->SetBounds(bounds);
-
- gfx::Point start_point = view->GetBoundsInScreen().CenterPoint();
- // We want to move all the way to the right (the few pixels we have).
- gfx::Point end_point = gfx::Point(work_area.width(), start_point.y());
-
- aura::test::EventGenerator generator(window->GetRootWindow(), start_point);
- wm::WindowState* window_state = wm::GetWindowState(window);
-
- EXPECT_TRUE(window_state->IsNormalShowState());
-
- // Snap right with a touch drag.
- generator.GestureScrollSequence(start_point,
- end_point,
- base::TimeDelta::FromMilliseconds(100),
- 10);
- RunAllPendingInMessageLoop();
-
- EXPECT_FALSE(window_state->IsMaximized());
- EXPECT_FALSE(window_state->IsMinimized());
- gfx::Rect touch_result = window->bounds();
- EXPECT_NE(bounds.ToString(), touch_result.ToString());
-
- // Set the position back to where it was before and re-try with a mouse.
- widget()->SetBounds(bounds);
-
- generator.MoveMouseTo(start_point);
- generator.PressLeftButton();
- generator.MoveMouseTo(end_point, 10);
- generator.ReleaseLeftButton();
- RunAllPendingInMessageLoop();
-
- EXPECT_FALSE(window_state->IsMaximized());
- EXPECT_FALSE(window_state->IsMinimized());
- gfx::Rect mouse_result = window->bounds();
-
- // The difference between the two operations should be that the mouse
- // operation should have just started to resize and the touch operation is
- // already all the way down to the smallest possible size.
- EXPECT_NE(mouse_result.ToString(), touch_result.ToString());
- EXPECT_GT(mouse_result.width(), touch_result.width());
-}
-
-// Test that closing the (browser) window with an opened balloon does not
-// crash the system. In other words: Make sure that shutting down the frame
-// destroys the opened balloon in an orderly fashion.
-TEST_F(FrameMaximizeButtonTest, MaximizeButtonExternalShutDown) {
- aura::Window* window = widget()->GetNativeWindow();
- ash::FrameMaximizeButton* maximize_button =
- FrameMaximizeButtonTest::maximize_button();
- maximize_button->set_bubble_appearance_delay_ms(0);
- gfx::Point button_pos = maximize_button->GetBoundsInScreen().CenterPoint();
- gfx::Point off_pos(button_pos.x() + 100, button_pos.y() + 100);
-
- aura::test::EventGenerator generator(window->GetRootWindow(), off_pos);
- EXPECT_FALSE(maximize_button->maximizer());
- EXPECT_TRUE(wm::GetWindowState(window)->IsNormalShowState());
-
- // Move the mouse cursor over the button to bring up the maximizer bubble.
- generator.MoveMouseTo(button_pos);
- EXPECT_TRUE(maximize_button->maximizer());
-
- // Even though the widget is closing the bubble menu should not crash upon
- // its delayed destruction.
- CloseWidget();
-}
-
-// Test that maximizing the browser after hovering in does not crash the system
-// when the observer gets removed in the bubble destruction process.
-TEST_F(FrameMaximizeButtonTest, MaximizeOnHoverThenClick) {
- aura::Window* window = widget()->GetNativeWindow();
- ash::FrameMaximizeButton* maximize_button =
- FrameMaximizeButtonTest::maximize_button();
- maximize_button->set_bubble_appearance_delay_ms(0);
- gfx::Point button_pos = maximize_button->GetBoundsInScreen().CenterPoint();
- gfx::Point off_pos(button_pos.x() + 100, button_pos.y() + 100);
-
- aura::test::EventGenerator generator(window->GetRootWindow(), off_pos);
- EXPECT_FALSE(maximize_button->maximizer());
- EXPECT_TRUE(wm::GetWindowState(window)->IsNormalShowState());
-
- // Move the mouse cursor over the button to bring up the maximizer bubble.
- generator.MoveMouseTo(button_pos);
- EXPECT_TRUE(maximize_button->maximizer());
- generator.ClickLeftButton();
- EXPECT_TRUE(wm::GetWindowState(window)->IsMaximized());
-}
-
-// Test that hovering over a button in the balloon dialog will show the phantom
-// window. Moving then away from the button will hide it again. Then check that
-// pressing and dragging the button itself off the button will also release the
-// phantom window.
-TEST_F(FrameMaximizeButtonTest, MaximizeLeftButtonDragOut) {
- aura::Window* window = widget()->GetNativeWindow();
- ash::FrameMaximizeButton* maximize_button =
- FrameMaximizeButtonTest::maximize_button();
- maximize_button->set_bubble_appearance_delay_ms(0);
- gfx::Point button_pos = maximize_button->GetBoundsInScreen().CenterPoint();
- gfx::Point off_pos(button_pos.x() + 100, button_pos.y() + 100);
-
- aura::test::EventGenerator generator(window->GetRootWindow(), off_pos);
- EXPECT_FALSE(maximize_button->maximizer());
- EXPECT_TRUE(wm::GetWindowState(window)->IsNormalShowState());
- EXPECT_FALSE(maximize_button->phantom_window_open());
-
- // Move the mouse cursor over the button to bring up the maximizer bubble.
- generator.MoveMouseTo(button_pos);
- EXPECT_TRUE(maximize_button->maximizer());
-
- // Move the mouse over the left maximize button.
- gfx::Point left_max_pos = maximize_button->maximizer()->
- GetButtonForUnitTest(SNAP_LEFT)->GetBoundsInScreen().CenterPoint();
-
- generator.MoveMouseTo(left_max_pos);
- // Expect the phantom window to be open.
- EXPECT_TRUE(maximize_button->phantom_window_open());
-
- // Move away to see the window being destroyed.
- generator.MoveMouseTo(off_pos);
- EXPECT_FALSE(maximize_button->phantom_window_open());
-
- // Move back over the button.
- generator.MoveMouseTo(button_pos);
- generator.MoveMouseTo(left_max_pos);
- EXPECT_TRUE(maximize_button->phantom_window_open());
-
- // Press button and drag out of dialog.
- generator.PressLeftButton();
- generator.MoveMouseTo(off_pos);
- generator.ReleaseLeftButton();
-
- // Check that the phantom window is also gone.
- EXPECT_FALSE(maximize_button->phantom_window_open());
-}
-
-// Test that clicking a button in the maximizer bubble (in this case the
-// maximize left button) will do the requested action.
-TEST_F(FrameMaximizeButtonTest, MaximizeLeftByButton) {
- aura::Window* window = widget()->GetNativeWindow();
-
- ash::FrameMaximizeButton* maximize_button =
- FrameMaximizeButtonTest::maximize_button();
- maximize_button->set_bubble_appearance_delay_ms(0);
- gfx::Point button_pos = maximize_button->GetBoundsInScreen().CenterPoint();
- gfx::Point off_pos(button_pos.x() + 100, button_pos.y() + 100);
-
- aura::test::EventGenerator generator(window->GetRootWindow(), off_pos);
- EXPECT_FALSE(maximize_button->maximizer());
- EXPECT_TRUE(wm::GetWindowState(window)->IsNormalShowState());
- EXPECT_FALSE(maximize_button->phantom_window_open());
-
- // Move the mouse cursor over the button to bring up the maximizer bubble.
- generator.MoveMouseTo(button_pos);
- EXPECT_TRUE(maximize_button->maximizer());
-
- // Move the mouse over the left maximize button.
- gfx::Point left_max_pos = maximize_button->maximizer()->
- GetButtonForUnitTest(SNAP_LEFT)->GetBoundsInScreen().CenterPoint();
- generator.MoveMouseTo(left_max_pos);
- EXPECT_TRUE(maximize_button->phantom_window_open());
- generator.ClickLeftButton();
-
- EXPECT_FALSE(maximize_button->maximizer());
- EXPECT_FALSE(maximize_button->phantom_window_open());
-
- wm::WindowState* window_state = wm::GetWindowState(window);
- EXPECT_FALSE(window_state->IsMaximized());
- EXPECT_FALSE(window_state->IsMinimized());
- internal::SnapSizer sizer(window_state, button_pos,
- internal::SnapSizer::LEFT_EDGE,
- internal::SnapSizer::OTHER_INPUT);
- sizer.SelectDefaultSizeAndDisableResize();
- EXPECT_EQ(sizer.target_bounds().ToString(), window->bounds().ToString());
-}
-
-// Test that the activation focus does not change when the bubble gets shown.
-TEST_F(FrameMaximizeButtonTest, MaximizeKeepFocus) {
- aura::Window* window = widget()->GetNativeWindow();
- ash::FrameMaximizeButton* maximize_button =
- FrameMaximizeButtonTest::maximize_button();
- maximize_button->set_bubble_appearance_delay_ms(0);
- gfx::Point button_pos = maximize_button->GetBoundsInScreen().CenterPoint();
- gfx::Point off_pos(button_pos.x() + 100, button_pos.y() + 100);
-
- aura::test::EventGenerator generator(window->GetRootWindow(), off_pos);
- EXPECT_FALSE(maximize_button->maximizer());
- EXPECT_TRUE(wm::GetWindowState(window)->IsNormalShowState());
-
- aura::Window* active =
- aura::client::GetFocusClient(window)->GetFocusedWindow();
-
- // Move the mouse cursor over the button to bring up the maximizer bubble.
- generator.MoveMouseTo(button_pos);
- EXPECT_TRUE(maximize_button->maximizer());
-
- // Check that the focused window is still the same.
- EXPECT_EQ(active, aura::client::GetFocusClient(window)->GetFocusedWindow());
-}
-
-TEST_F(FrameMaximizeButtonTest, MaximizeTap) {
- aura::Window* window = widget()->GetNativeWindow();
- aura::Window* root_window = window->GetRootWindow();
- ash::FrameMaximizeButton* maximize_button =
- FrameMaximizeButtonTest::maximize_button();
- gfx::Point button_pos = maximize_button->GetBoundsInScreen().CenterPoint();
-
- const int touch_default_radius =
- ui::GestureConfiguration::default_radius();
- ui::GestureConfiguration::set_default_radius(0);
-
- aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher();
- const int kTouchId = 2;
- ui::TouchEvent press(ui::ET_TOUCH_PRESSED,
- button_pos,
- kTouchId,
- ui::EventTimeForNow());
- dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
-
- button_pos.Offset(9, 8);
- ui::TouchEvent release(
- ui::ET_TOUCH_RELEASED,
- button_pos,
- kTouchId,
- press.time_stamp() + base::TimeDelta::FromMilliseconds(50));
- dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
-
- ui::GestureConfiguration::set_default_radius(touch_default_radius);
-}
-
-// Test that only the left button will activate the maximize button.
-TEST_F(FrameMaximizeButtonTest, OnlyLeftButtonMaximizes) {
- aura::Window* window = widget()->GetNativeWindow();
- ash::FrameMaximizeButton* maximize_button =
- FrameMaximizeButtonTest::maximize_button();
- maximize_button->set_bubble_appearance_delay_ms(0);
- gfx::Point button_pos = maximize_button->GetBoundsInScreen().CenterPoint();
- gfx::Point off_pos(button_pos.x() + 100, button_pos.y() + 100);
-
- aura::test::EventGenerator generator(window->GetRootWindow(), off_pos);
- EXPECT_FALSE(maximize_button->maximizer());
- wm::WindowState* window_state = wm::GetWindowState(window);
- EXPECT_TRUE(window_state->IsNormalShowState());
- EXPECT_FALSE(window_state->IsMaximized());
-
- // Move the mouse cursor over the button.
- generator.MoveMouseTo(button_pos);
- EXPECT_TRUE(maximize_button->maximizer());
- EXPECT_FALSE(maximize_button->phantom_window_open());
-
- // After pressing the left button the button should get triggered.
- generator.PressLeftButton();
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(maximize_button->is_snap_enabled());
- EXPECT_FALSE(window_state->IsMaximized());
-
- // Pressing the right button then should cancel the operation.
- generator.PressRightButton();
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(maximize_button->maximizer());
-
- // After releasing the second button the window shouldn't be maximized.
- generator.ReleaseRightButton();
- generator.ReleaseLeftButton();
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(window_state->IsMaximized());
-
- // Second experiment: Starting with right should also not trigger.
- generator.MoveMouseTo(off_pos);
- generator.MoveMouseTo(button_pos);
- EXPECT_TRUE(maximize_button->maximizer());
-
- // Pressing first the right button should not activate.
- generator.PressRightButton();
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(maximize_button->is_snap_enabled());
-
- // Pressing then additionally the left button shouldn't activate either.
- generator.PressLeftButton();
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(maximize_button->is_snap_enabled());
- generator.ReleaseRightButton();
- generator.ReleaseLeftButton();
- EXPECT_FALSE(window_state->IsMaximized());
-}
-
-// Click a button of window maximize functionality.
-// If |snap_type| is SNAP_NONE the FrameMaximizeButton gets clicked, otherwise
-// the associated snap button.
-// |Window| is the window which owns the maximize button.
-// |maximize_button| is the FrameMaximizeButton which controls the window.
-void ClickMaxButton(
- ash::FrameMaximizeButton* maximize_button,
- aura::Window* window,
- SnapType snap_type) {
- gfx::Point button_pos = maximize_button->GetBoundsInScreen().CenterPoint();
- gfx::Point off_pos(button_pos.x() + 100, button_pos.y() + 100);
-
- aura::test::EventGenerator generator(window->GetRootWindow(), off_pos);
- generator.MoveMouseTo(off_pos);
- EXPECT_FALSE(maximize_button->maximizer());
- EXPECT_FALSE(maximize_button->phantom_window_open());
-
- // Move the mouse cursor over the button.
- generator.MoveMouseTo(button_pos);
- EXPECT_TRUE(maximize_button->maximizer());
- EXPECT_FALSE(maximize_button->phantom_window_open());
-
- if (snap_type != SNAP_NONE) {
- gfx::Point left_max_pos = maximize_button->maximizer()->
- GetButtonForUnitTest(snap_type)->GetBoundsInScreen().CenterPoint();
- generator.MoveMouseTo(left_max_pos);
- EXPECT_TRUE(maximize_button->phantom_window_open());
- }
- // After pressing the left button the button should get triggered.
- generator.ClickLeftButton();
- EXPECT_FALSE(maximize_button->maximizer());
-}
-
-// Test that the restore from left/right maximize is properly done.
-TEST_F(FrameMaximizeButtonTest, MaximizeLeftRestore) {
- aura::Window* window = widget()->GetNativeWindow();
- gfx::Rect initial_bounds = widget()->GetWindowBoundsInScreen();
- ash::FrameMaximizeButton* maximize_button =
- FrameMaximizeButtonTest::maximize_button();
- maximize_button->set_bubble_appearance_delay_ms(0);
-
- ClickMaxButton(maximize_button, window, SNAP_LEFT);
- wm::WindowState* window_state = wm::GetWindowState(window);
- // The window should not be maximized.
- EXPECT_FALSE(window_state->IsMaximized());
- // But the bounds should be different.
- gfx::Rect new_bounds = widget()->GetWindowBoundsInScreen();
- EXPECT_EQ(0, new_bounds.x());
- EXPECT_EQ(0, new_bounds.y());
-
- // Now click the same button again to see that it restores.
- ClickMaxButton(maximize_button, window, SNAP_LEFT);
- // But the bounds should be restored.
- new_bounds = widget()->GetWindowBoundsInScreen();
- EXPECT_EQ(new_bounds.x(), initial_bounds.x());
- EXPECT_EQ(new_bounds.y(), initial_bounds.x());
- EXPECT_EQ(new_bounds.width(), initial_bounds.width());
- EXPECT_EQ(new_bounds.height(), initial_bounds.height());
- // Make sure that there is no restore rectangle left.
- EXPECT_FALSE(window_state->HasRestoreBounds());
-}
-
-// Maximize, left/right maximize and then restore should works.
-TEST_F(FrameMaximizeButtonTest, MaximizeMaximizeLeftRestore) {
- aura::Window* window = widget()->GetNativeWindow();
- gfx::Rect initial_bounds = widget()->GetWindowBoundsInScreen();
- ash::FrameMaximizeButton* maximize_button =
- FrameMaximizeButtonTest::maximize_button();
- maximize_button->set_bubble_appearance_delay_ms(0);
-
- ClickMaxButton(maximize_button, window, SNAP_NONE);
-
- wm::WindowState* window_state = wm::GetWindowState(window);
- EXPECT_TRUE(window_state->IsMaximized());
-
- ClickMaxButton(maximize_button, window, SNAP_LEFT);
- EXPECT_FALSE(window_state->IsMaximized());
- gfx::Rect new_bounds = widget()->GetWindowBoundsInScreen();
- EXPECT_EQ(0, new_bounds.x());
- EXPECT_EQ(0, new_bounds.y());
-
- // Now click the same button again to see that it restores.
- ClickMaxButton(maximize_button, window, SNAP_LEFT);
- RunAllPendingInMessageLoop();
- // But the bounds should be restored.
- new_bounds = widget()->GetWindowBoundsInScreen();
- EXPECT_EQ(new_bounds.x(), initial_bounds.x());
- EXPECT_EQ(new_bounds.y(), initial_bounds.x());
- EXPECT_EQ(new_bounds.width(), initial_bounds.width());
- EXPECT_EQ(new_bounds.height(), initial_bounds.height());
- // Make sure that there is no restore rectangle left.
- EXPECT_FALSE(window_state->HasRestoreBounds());
-}
-
-// Left/right maximize, maximize and then restore should work.
-TEST_F(FrameMaximizeButtonTest, MaximizeSnapLeftRestore) {
- aura::Window* window = widget()->GetNativeWindow();
- gfx::Rect initial_bounds = widget()->GetWindowBoundsInScreen();
- ash::FrameMaximizeButton* maximize_button =
- FrameMaximizeButtonTest::maximize_button();
- maximize_button->set_bubble_appearance_delay_ms(0);
-
- ClickMaxButton(maximize_button, window, SNAP_LEFT);
-
- wm::WindowState* window_state = wm::GetWindowState(window);
- EXPECT_FALSE(window_state->IsMaximized());
-
- ClickMaxButton(maximize_button, window, SNAP_NONE);
- EXPECT_TRUE(window_state->IsMaximized());
-
- ClickMaxButton(maximize_button, window, SNAP_NONE);
- EXPECT_FALSE(window_state->IsMaximized());
- gfx::Rect new_bounds = widget()->GetWindowBoundsInScreen();
- EXPECT_EQ(new_bounds.x(), initial_bounds.x());
- EXPECT_EQ(new_bounds.y(), initial_bounds.x());
- EXPECT_EQ(new_bounds.width(), initial_bounds.width());
- EXPECT_EQ(new_bounds.height(), initial_bounds.height());
- // Make sure that there is no restore rectangle left.
- EXPECT_FALSE(window_state->HasRestoreBounds());
-}
-
-// Test that minimizing the window per keyboard closes the maximize bubble.
-TEST_F(FrameMaximizeButtonTest, MinimizePerKeyClosesBubble) {
- aura::Window* window = widget()->GetNativeWindow();
- ash::FrameMaximizeButton* maximize_button =
- FrameMaximizeButtonTest::maximize_button();
-
- gfx::Point button_pos = maximize_button->GetBoundsInScreen().CenterPoint();
- gfx::Point off_pos(button_pos.x() + 100, button_pos.y() + 100);
-
- aura::test::EventGenerator generator(window->GetRootWindow(), off_pos);
- generator.MoveMouseTo(off_pos);
- EXPECT_FALSE(maximize_button->maximizer());
-
- // Move the mouse cursor over the maximize button.
- generator.MoveMouseTo(button_pos);
- EXPECT_TRUE(maximize_button->maximizer());
-
- // We simulate the keystroke by calling minimizeWindow directly.
- wm::WindowState* window_state = wm::GetWindowState(window);
- window_state->Minimize();
-
- EXPECT_TRUE(window_state->IsMinimized());
- EXPECT_FALSE(maximize_button->maximizer());
-}
-
-// Tests that dragging down on the maximize button minimizes the window.
-TEST_F(FrameMaximizeButtonTest, MaximizeButtonDragDownMinimizes) {
- aura::Window* window = widget()->GetNativeWindow();
- ash::FrameMaximizeButton* maximize_button =
- FrameMaximizeButtonTest::maximize_button();
-
- wm::WindowState* window_state = wm::GetWindowState(window);
- // Drag down on a maximized window.
- window_state->Maximize();
- EXPECT_TRUE(window_state->IsMaximized());
- gfx::Point button_pos = maximize_button->GetBoundsInScreen().CenterPoint();
- gfx::Point off_pos(button_pos.x(), button_pos.y() + 100);
-
- aura::test::EventGenerator generator(window->GetRootWindow());
- generator.GestureScrollSequence(button_pos, off_pos,
- base::TimeDelta::FromMilliseconds(0), 1);
-
- EXPECT_TRUE(window_state->IsMinimized());
- EXPECT_FALSE(maximize_button->maximizer());
-
- // Drag down on a restored window.
- window_state->Restore();
-
- button_pos = maximize_button->GetBoundsInScreen().CenterPoint();
- off_pos = gfx::Point(button_pos.x(), button_pos.y() + 200);
- generator.GestureScrollSequence(button_pos, off_pos,
- base::TimeDelta::FromMilliseconds(10), 1);
- EXPECT_TRUE(window_state->IsMinimized());
- EXPECT_FALSE(maximize_button->maximizer());
-}
-
-// Tests that dragging Left and pressing ESC does properly abort.
-TEST_F(FrameMaximizeButtonTest, MaximizeButtonDragLeftEscapeExits) {
- aura::Window* window = widget()->GetNativeWindow();
- gfx::Rect initial_bounds = widget()->GetWindowBoundsInScreen();
- ash::FrameMaximizeButton* maximize_button =
- FrameMaximizeButtonTest::maximize_button();
-
- gfx::Point button_pos = maximize_button->GetBoundsInScreen().CenterPoint();
- gfx::Point off_pos(button_pos.x() - button_pos.x() / 2, button_pos.y());
-
- const int kGestureSteps = 10;
- CancelCallbackHandler cancel_handler(kGestureSteps / 2, maximize_button);
- aura::test::EventGenerator generator(window->GetRootWindow());
- generator.GestureScrollSequenceWithCallback(
- button_pos,
- off_pos,
- base::TimeDelta::FromMilliseconds(0),
- kGestureSteps,
- base::Bind(&CancelCallbackHandler::CountedCancelCallback,
- base::Unretained(&cancel_handler)));
-
- // Check that there was no size change.
- EXPECT_EQ(widget()->GetWindowBoundsInScreen().size().ToString(),
- initial_bounds.size().ToString());
- // Check that there is no phantom window left open.
- EXPECT_FALSE(maximize_button->phantom_window_open());
-}
-
-// Test that hovering over a button in the maximizer bubble and switching
-// activation without moving the mouse properly aborts.
-TEST_F(FrameMaximizeButtonTest, LossOfActivationWhileMaximizeBubbleOpenAborts) {
- aura::Window* window = widget()->GetNativeWindow();
- ash::FrameMaximizeButton* maximize_button =
- FrameMaximizeButtonTest::maximize_button();
- maximize_button->set_bubble_appearance_delay_ms(0);
-
- gfx::Rect initial_bounds = window->GetBoundsInScreen();
- EXPECT_TRUE(wm::GetWindowState(window)->IsNormalShowState());
- EXPECT_TRUE(widget()->IsActive());
-
- // Move the mouse over the maximize button in order to bring up the maximizer
- // bubble.
- gfx::Point button_pos = maximize_button->GetBoundsInScreen().CenterPoint();
- gfx::Point off_pos(button_pos.x() + 100, button_pos.y() + 100);
- aura::test::EventGenerator generator(window->GetRootWindow(), off_pos);
- generator.MoveMouseTo(button_pos);
- EXPECT_TRUE(maximize_button->maximizer());
-
- // Hover the mouse over the left maximize button in the maximizer bubble to
- // show the phantom window.
- gfx::Point left_max_pos = maximize_button->maximizer()->
- GetButtonForUnitTest(SNAP_LEFT)->GetBoundsInScreen().CenterPoint();
- generator.MoveMouseTo(left_max_pos);
- EXPECT_TRUE(maximize_button->phantom_window_open());
-
- // Change activation by creating a new window. This could be done via an
- // accelerator. The root window takes ownership of |just_created|.
- views::Widget* just_created = views::Widget::CreateWindowWithContextAndBounds(
- NULL, widget()->GetNativeWindow(), gfx::Rect(100, 100));
- just_created->Show();
- just_created->Activate();
- EXPECT_FALSE(widget()->IsActive());
-
- // Test that we have properly reset the state of the now inactive window.
- EXPECT_FALSE(maximize_button->maximizer());
- EXPECT_FALSE(maximize_button->phantom_window_open());
- EXPECT_TRUE(wm::GetWindowState(window)->IsNormalShowState());
- EXPECT_EQ(initial_bounds.ToString(), window->GetBoundsInScreen().ToString());
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/wm/caption_buttons/maximize_bubble_controller.cc b/chromium/ash/wm/caption_buttons/maximize_bubble_controller.cc
deleted file mode 100644
index f01d0e22783..00000000000
--- a/chromium/ash/wm/caption_buttons/maximize_bubble_controller.cc
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/caption_buttons/maximize_bubble_controller.h"
-
-#include "ash/wm/caption_buttons/frame_maximize_button.h"
-#include "ash/wm/caption_buttons/maximize_bubble_controller_bubble.h"
-#include "base/timer/timer.h"
-
-
-namespace ash {
-
-MaximizeBubbleController::MaximizeBubbleController(
- FrameMaximizeButton* frame_maximize_button,
- MaximizeBubbleFrameState maximize_type,
- int appearance_delay_ms)
- : frame_maximize_button_(frame_maximize_button),
- bubble_(NULL),
- maximize_type_(maximize_type),
- snap_type_for_creation_(SNAP_NONE),
- appearance_delay_ms_(appearance_delay_ms) {
- // Create the task which will create the bubble delayed.
- base::OneShotTimer<MaximizeBubbleController>* new_timer =
- new base::OneShotTimer<MaximizeBubbleController>();
- // Note: Even if there was no delay time given, we need to have a timer.
- new_timer->Start(
- FROM_HERE,
- base::TimeDelta::FromMilliseconds(
- appearance_delay_ms_ ? appearance_delay_ms_ : 10),
- this,
- &MaximizeBubbleController::CreateBubble);
- timer_.reset(new_timer);
- if (!appearance_delay_ms_)
- CreateBubble();
-}
-
-MaximizeBubbleController::~MaximizeBubbleController() {
- // Note: The destructor only gets initiated through the owner.
- timer_.reset();
- if (bubble_) {
- bubble_->ControllerRequestsCloseAndDelete();
- bubble_ = NULL;
- }
-}
-
-void MaximizeBubbleController::SetSnapType(SnapType snap_type) {
- if (bubble_) {
- bubble_->SetSnapType(snap_type);
- } else {
- // The bubble has not been created yet. This can occur if bubble creation is
- // delayed.
- snap_type_for_creation_ = snap_type;
- }
-}
-
-aura::Window* MaximizeBubbleController::GetBubbleWindow() {
- return bubble_ ? bubble_->GetBubbleWindow() : NULL;
-}
-
-void MaximizeBubbleController::DelayCreation() {
- if (timer_.get() && timer_->IsRunning())
- timer_->Reset();
-}
-
-void MaximizeBubbleController::OnButtonClicked(SnapType snap_type) {
- frame_maximize_button_->ExecuteSnapAndCloseMenu(snap_type);
-}
-
-void MaximizeBubbleController::OnButtonHover(SnapType snap_type) {
- frame_maximize_button_->SnapButtonHovered(snap_type);
-}
-
-views::CustomButton* MaximizeBubbleController::GetButtonForUnitTest(
- SnapType state) {
- return bubble_ ? bubble_->GetButtonForUnitTest(state) : NULL;
-}
-
-void MaximizeBubbleController::RequestDestructionThroughOwner() {
- // Tell the parent to destroy us (if this didn't happen yet).
- if (timer_) {
- timer_.reset(NULL);
- // Informs the owner that the menu is gone and requests |this| destruction.
- frame_maximize_button_->DestroyMaximizeMenu();
- // Note: After this call |this| is destroyed.
- }
-}
-
-void MaximizeBubbleController::CreateBubble() {
- if (!bubble_) {
- bubble_ = new MaximizeBubbleControllerBubble(this, appearance_delay_ms_,
- snap_type_for_creation_);
- frame_maximize_button_->OnMaximizeBubbleShown(bubble_->GetWidget());
- }
-
- timer_->Stop();
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/caption_buttons/maximize_bubble_controller.h b/chromium/ash/wm/caption_buttons/maximize_bubble_controller.h
deleted file mode 100644
index 53a07dd2955..00000000000
--- a/chromium/ash/wm/caption_buttons/maximize_bubble_controller.h
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_H_
-#define ASH_WM_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "ash/wm/caption_buttons/caption_button_types.h"
-#include "ash/wm/workspace/snap_types.h"
-#include "base/memory/scoped_ptr.h"
-
-namespace aura {
-class Window;
-}
-
-namespace base {
-class Timer;
-}
-
-namespace views {
-class CustomButton;
-}
-
-namespace ash {
-
-class FrameMaximizeButton;
-class MaximizeBubbleControllerBubble;
-
-// A class which shows a helper UI for the maximize button after a delay.
-class ASH_EXPORT MaximizeBubbleController {
- public:
- MaximizeBubbleController(FrameMaximizeButton* frame_maximize_button,
- MaximizeBubbleFrameState maximize_type,
- int appearance_delay_ms);
- // Called from the outside to destroy the interface to the UI visuals.
- // The visuals will then delete when possible (maybe asynchronously).
- virtual ~MaximizeBubbleController();
-
- // Update the UI visuals to reflect the previewed |snap_type| snapping state.
- void SetSnapType(SnapType snap_type);
-
- // To achieve proper Z-sorting with the snap animation, this window will be
- // presented above the phantom window.
- aura::Window* GetBubbleWindow();
-
- // Reset the delay of the menu creation (if it was not created yet).
- void DelayCreation();
-
- // Called to tell the owning FrameMaximizeButton that a button was clicked.
- void OnButtonClicked(SnapType snap_type);
-
- // Called to tell the the owning FrameMaximizeButton that the hover status
- // for a button has changed. |snap_type| can be either SNAP_LEFT, SNAP_RIGHT,
- // SNAP_MINIMIZE or SNAP_NONE.
- void OnButtonHover(SnapType snap_type);
-
- // Get the owning FrameMaximizeButton.
- FrameMaximizeButton* frame_maximize_button() {
- return frame_maximize_button_;
- }
-
- // The status of the associated window: Maximized or normal.
- MaximizeBubbleFrameState maximize_type() const { return maximize_type_; }
-
- // A unit test function to return buttons of the sub menu. |state| can be
- // either SNAP_LEFT, SNAP_RIGHT or SNAP_MINIMIZE.
- views::CustomButton* GetButtonForUnitTest(SnapType state);
-
- // Called from the the Bubble class to destroy itself: It tells the owning
- // object that it will destroy itself asynchronously. The owner will then
- // destroy |this|.
- void RequestDestructionThroughOwner();
-
- private:
- // The function which creates the bubble once the delay is elapsed.
- void CreateBubble();
-
- // The owning button which is also the anchor for the menu.
- FrameMaximizeButton* frame_maximize_button_;
-
- // The bubble menu.
- MaximizeBubbleControllerBubble* bubble_;
-
- // The current maximize state of the owning window.
- const MaximizeBubbleFrameState maximize_type_;
-
- // The snap type with which the bubble is created. This is needed because the
- // creation of the bubble can be delayed and SetSnapType() may be called
- // before the bubble is created.
- SnapType snap_type_for_creation_;
-
- // The timer for the delayed creation of the menu.
- scoped_ptr<base::Timer> timer_;
-
- // The appearance delay in ms (delay and fade in & fade out delay).
- const int appearance_delay_ms_;
-
- DISALLOW_COPY_AND_ASSIGN(MaximizeBubbleController);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_H_
diff --git a/chromium/ash/wm/caption_buttons/maximize_bubble_controller_bubble.cc b/chromium/ash/wm/caption_buttons/maximize_bubble_controller_bubble.cc
deleted file mode 100644
index d109a419265..00000000000
--- a/chromium/ash/wm/caption_buttons/maximize_bubble_controller_bubble.cc
+++ /dev/null
@@ -1,498 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/caption_buttons/maximize_bubble_controller_bubble.h"
-
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/caption_buttons/bubble_contents_button_row.h"
-#include "ash/wm/caption_buttons/frame_maximize_button.h"
-#include "ash/wm/caption_buttons/maximize_bubble_controller.h"
-#include "grit/ash_strings.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/animation/animation.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/path.h"
-#include "ui/views/bubble/bubble_frame_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/mouse_watcher.h"
-
-
-namespace ash {
-
-// BubbleContentsView ---------------------------------------------------------
-
-// A class which creates the content of the bubble: The buttons, and the label.
-class BubbleContentsView : public views::View {
- public:
- BubbleContentsView(MaximizeBubbleControllerBubble* bubble,
- SnapType initial_snap_type);
- virtual ~BubbleContentsView();
-
- // Set the label content to reflect the currently selected |snap_type|.
- // This function can be executed through the frame maximize button as well as
- // through hover operations.
- void SetSnapType(SnapType snap_type);
-
- // Added for unit test: Retrieve the button for an action.
- // |state| can be either SNAP_LEFT, SNAP_RIGHT or SNAP_MINIMIZE.
- views::CustomButton* GetButtonForUnitTest(SnapType state);
-
- private:
- // The owning class.
- MaximizeBubbleControllerBubble* bubble_;
-
- // The object which owns all the buttons.
- BubbleContentsButtonRow* buttons_view_;
-
- // The label object which shows the user the selected action.
- views::Label* label_view_;
-
- DISALLOW_COPY_AND_ASSIGN(BubbleContentsView);
-};
-
-BubbleContentsView::BubbleContentsView(
- MaximizeBubbleControllerBubble* bubble,
- SnapType initial_snap_type)
- : bubble_(bubble),
- buttons_view_(NULL),
- label_view_(NULL) {
- SetLayoutManager(new views::BoxLayout(
- views::BoxLayout::kVertical, 0, 0,
- MaximizeBubbleControllerBubble::kLayoutSpacing));
- set_background(views::Background::CreateSolidBackground(
- MaximizeBubbleControllerBubble::kBubbleBackgroundColor));
-
- buttons_view_ = new BubbleContentsButtonRow(bubble);
- AddChildView(buttons_view_);
-
- label_view_ = new views::Label();
- SetSnapType(initial_snap_type);
- label_view_->SetBackgroundColor(
- MaximizeBubbleControllerBubble::kBubbleBackgroundColor);
- const SkColor kBubbleTextColor = SK_ColorWHITE;
- label_view_->SetEnabledColor(kBubbleTextColor);
- const int kLabelSpacing = 4;
- label_view_->set_border(views::Border::CreateEmptyBorder(
- kLabelSpacing, 0, kLabelSpacing, 0));
- AddChildView(label_view_);
-}
-
-BubbleContentsView::~BubbleContentsView() {
-}
-
-// Set the label content to reflect the currently selected |snap_type|.
-// This function can be executed through the frame maximize button as well as
-// through hover operations.
-void BubbleContentsView::SetSnapType(SnapType snap_type) {
- if (!bubble_->controller())
- return;
-
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- int id = 0;
- switch (snap_type) {
- case SNAP_LEFT:
- id = IDS_ASH_SNAP_WINDOW_LEFT;
- break;
- case SNAP_RIGHT:
- id = IDS_ASH_SNAP_WINDOW_RIGHT;
- break;
- case SNAP_MAXIMIZE:
- DCHECK_NE(FRAME_STATE_FULL, bubble_->controller()->maximize_type());
- id = IDS_ASH_MAXIMIZE_WINDOW;
- break;
- case SNAP_MINIMIZE:
- id = IDS_ASH_MINIMIZE_WINDOW;
- break;
- case SNAP_RESTORE:
- DCHECK_NE(FRAME_STATE_NONE, bubble_->controller()->maximize_type());
- id = IDS_ASH_RESTORE_WINDOW;
- break;
- default:
- // If nothing is selected, we automatically select the click operation.
- id = bubble_->controller()->maximize_type() == FRAME_STATE_FULL ?
- IDS_ASH_RESTORE_WINDOW : IDS_ASH_MAXIMIZE_WINDOW;
- break;
- }
- label_view_->SetText(rb.GetLocalizedString(id));
-}
-
-views::CustomButton* BubbleContentsView::GetButtonForUnitTest(SnapType state) {
- return buttons_view_->GetButtonForUnitTest(state);
-}
-
-
-// MaximizeBubbleBorder -------------------------------------------------------
-
-namespace {
-
-const int kLineWidth = 1;
-const int kArrowHeight = 10;
-const int kArrowWidth = 20;
-
-} // namespace
-
-class MaximizeBubbleBorder : public views::BubbleBorder {
- public:
- MaximizeBubbleBorder(views::View* content_view, views::View* anchor);
-
- virtual ~MaximizeBubbleBorder() {}
-
- // Get the mouse active area of the window.
- void GetMask(gfx::Path* mask);
-
- // views::BubbleBorder:
- virtual gfx::Rect GetBounds(const gfx::Rect& position_relative_to,
- const gfx::Size& contents_size) const OVERRIDE;
- virtual void Paint(const views::View& view, gfx::Canvas* canvas) OVERRIDE;
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
-
- private:
- // Note: Animations can continue after then main window frame was destroyed.
- // To avoid this problem, the owning screen metrics get extracted upon
- // creation.
- gfx::Size anchor_size_;
- gfx::Point anchor_screen_origin_;
- views::View* content_view_;
-
- DISALLOW_COPY_AND_ASSIGN(MaximizeBubbleBorder);
-};
-
-MaximizeBubbleBorder::MaximizeBubbleBorder(views::View* content_view,
- views::View* anchor)
- : views::BubbleBorder(
- views::BubbleBorder::TOP_RIGHT, views::BubbleBorder::NO_SHADOW,
- MaximizeBubbleControllerBubble::kBubbleBackgroundColor),
- anchor_size_(anchor->size()),
- anchor_screen_origin_(0, 0),
- content_view_(content_view) {
- views::View::ConvertPointToScreen(anchor, &anchor_screen_origin_);
- set_alignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE);
-}
-
-void MaximizeBubbleBorder::GetMask(gfx::Path* mask) {
- gfx::Insets inset = GetInsets();
- // Note: Even though the tip could be added as activatable, it is left out
- // since it would not change the action behavior in any way plus it makes
- // more sense to keep the focus on the underlying button for clicks.
- int left = inset.left() - kLineWidth;
- int right = inset.left() + content_view_->width() + kLineWidth;
- int top = inset.top() - kLineWidth;
- int bottom = inset.top() + content_view_->height() + kLineWidth;
- mask->moveTo(left, top);
- mask->lineTo(right, top);
- mask->lineTo(right, bottom);
- mask->lineTo(left, bottom);
- mask->lineTo(left, top);
- mask->close();
-}
-
-gfx::Rect MaximizeBubbleBorder::GetBounds(
- const gfx::Rect& position_relative_to,
- const gfx::Size& contents_size) const {
- gfx::Size border_size(contents_size);
- gfx::Insets insets = GetInsets();
- border_size.Enlarge(insets.width(), insets.height());
-
- // Position the bubble to center the box on the anchor.
- int x = (anchor_size_.width() - border_size.width()) / 2;
- // Position the bubble under the anchor, overlapping the arrow with it.
- int y = anchor_size_.height() - insets.top();
-
- gfx::Point view_origin(x + anchor_screen_origin_.x(),
- y + anchor_screen_origin_.y());
-
- return gfx::Rect(view_origin, border_size);
-}
-
-void MaximizeBubbleBorder::Paint(const views::View& view, gfx::Canvas* canvas) {
- gfx::Insets inset = GetInsets();
-
- // Draw the border line around everything.
- int y = inset.top();
- // Top
- canvas->FillRect(gfx::Rect(inset.left(),
- y - kLineWidth,
- content_view_->width(),
- kLineWidth),
- MaximizeBubbleControllerBubble::kBubbleBackgroundColor);
- // Bottom
- canvas->FillRect(gfx::Rect(inset.left(),
- y + content_view_->height(),
- content_view_->width(),
- kLineWidth),
- MaximizeBubbleControllerBubble::kBubbleBackgroundColor);
- // Left
- canvas->FillRect(gfx::Rect(inset.left() - kLineWidth,
- y - kLineWidth,
- kLineWidth,
- content_view_->height() + 2 * kLineWidth),
- MaximizeBubbleControllerBubble::kBubbleBackgroundColor);
- // Right
- canvas->FillRect(gfx::Rect(inset.left() + content_view_->width(),
- y - kLineWidth,
- kLineWidth,
- content_view_->height() + 2 * kLineWidth),
- MaximizeBubbleControllerBubble::kBubbleBackgroundColor);
-
- // Draw the arrow afterwards covering the border.
- SkPath path;
- path.incReserve(4);
- // The center of the tip should be in the middle of the button.
- int tip_x = inset.left() + content_view_->width() / 2;
- int left_base_x = tip_x - kArrowWidth / 2;
- int left_base_y = y;
- int tip_y = left_base_y - kArrowHeight;
- path.moveTo(SkIntToScalar(left_base_x), SkIntToScalar(left_base_y));
- path.lineTo(SkIntToScalar(tip_x), SkIntToScalar(tip_y));
- path.lineTo(SkIntToScalar(left_base_x + kArrowWidth),
- SkIntToScalar(left_base_y));
-
- SkPaint paint;
- paint.setStyle(SkPaint::kFill_Style);
- paint.setColor(MaximizeBubbleControllerBubble::kBubbleBackgroundColor);
- canvas->DrawPath(path, paint);
-}
-
-gfx::Size MaximizeBubbleBorder::GetMinimumSize() const {
- return gfx::Size(kLineWidth * 2 + kArrowWidth,
- std::max(kLineWidth, kArrowHeight) + kLineWidth);
-}
-
-
-// BubbleMouseWatcherHost -----------------------------------------------------
-
-// The mouse watcher host which makes sure that the bubble does not get closed
-// while the mouse cursor is over the maximize button or the balloon content.
-// Note: This object gets destroyed when the MouseWatcher gets destroyed.
-class BubbleMouseWatcherHost: public views::MouseWatcherHost {
- public:
- explicit BubbleMouseWatcherHost(MaximizeBubbleControllerBubble* bubble);
- virtual ~BubbleMouseWatcherHost();
-
- // views::MouseWatcherHost:
- virtual bool Contains(const gfx::Point& screen_point,
- views::MouseWatcherHost::MouseEventType type) OVERRIDE;
- private:
- MaximizeBubbleControllerBubble* bubble_;
-
- DISALLOW_COPY_AND_ASSIGN(BubbleMouseWatcherHost);
-};
-
-BubbleMouseWatcherHost::BubbleMouseWatcherHost(
- MaximizeBubbleControllerBubble* bubble)
- : bubble_(bubble) {
-}
-
-BubbleMouseWatcherHost::~BubbleMouseWatcherHost() {
-}
-
-bool BubbleMouseWatcherHost::Contains(
- const gfx::Point& screen_point,
- views::MouseWatcherHost::MouseEventType type) {
- return bubble_->Contains(screen_point, type);
-}
-
-
-// MaximizeBubbleControllerBubble ---------------------------------------------
-
-// static
-const SkColor MaximizeBubbleControllerBubble::kBubbleBackgroundColor =
- 0xFF141414;
-const int MaximizeBubbleControllerBubble::kLayoutSpacing = -1;
-
-MaximizeBubbleControllerBubble::MaximizeBubbleControllerBubble(
- MaximizeBubbleController* owner,
- int appearance_delay_ms,
- SnapType initial_snap_type)
- : views::BubbleDelegateView(owner->frame_maximize_button(),
- views::BubbleBorder::TOP_RIGHT),
- shutting_down_(false),
- owner_(owner),
- bubble_widget_(NULL),
- contents_view_(NULL),
- bubble_border_(NULL),
- appearance_delay_ms_(appearance_delay_ms) {
- set_margins(gfx::Insets());
-
- // The window needs to be owned by the root so that the SnapSizer does not
- // cover it upon animation.
- aura::Window* parent = Shell::GetContainer(
- Shell::GetTargetRootWindow(),
- internal::kShellWindowId_ShelfContainer);
- set_parent_window(parent);
-
- set_notify_enter_exit_on_child(true);
- set_adjust_if_offscreen(false);
- SetPaintToLayer(true);
- set_color(kBubbleBackgroundColor);
- set_close_on_deactivate(false);
- set_background(
- views::Background::CreateSolidBackground(kBubbleBackgroundColor));
-
- SetLayoutManager(new views::BoxLayout(
- views::BoxLayout::kVertical, 0, 0, kLayoutSpacing));
-
- contents_view_ = new BubbleContentsView(this, initial_snap_type);
- AddChildView(contents_view_);
-
- // Note that the returned widget has an observer which points to our
- // functions.
- bubble_widget_ = views::BubbleDelegateView::CreateBubble(this);
- bubble_widget_->set_focus_on_creation(false);
-
- SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE);
- bubble_widget_->non_client_view()->frame_view()->set_background(NULL);
-
- bubble_border_ = new MaximizeBubbleBorder(this, GetAnchorView());
- GetBubbleFrameView()->SetBubbleBorder(bubble_border_);
- GetBubbleFrameView()->set_background(NULL);
-
- // Recalculate size with new border.
- SizeToContents();
-
- if (!appearance_delay_ms_)
- GetWidget()->Show();
- else
- StartFade(true);
-
- ash::Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_WINDOW_MAXIMIZE_BUTTON_SHOW_BUBBLE);
-
- mouse_watcher_.reset(new views::MouseWatcher(
- new BubbleMouseWatcherHost(this),
- this));
- mouse_watcher_->Start();
-}
-
-MaximizeBubbleControllerBubble::~MaximizeBubbleControllerBubble() {
-}
-
-aura::Window* MaximizeBubbleControllerBubble::GetBubbleWindow() {
- return bubble_widget_ ? bubble_widget_->GetNativeWindow() : NULL;
-}
-
-gfx::Rect MaximizeBubbleControllerBubble::GetAnchorRect() {
- if (!owner_)
- return gfx::Rect();
-
- gfx::Rect anchor_rect =
- owner_->frame_maximize_button()->GetBoundsInScreen();
- return anchor_rect;
-}
-
-void MaximizeBubbleControllerBubble::AnimationProgressed(
- const gfx::Animation* animation) {
- // First do everything needed for the fade by calling the base function.
- BubbleDelegateView::AnimationProgressed(animation);
- // When fading in we are done.
- if (!shutting_down_)
- return;
- // Upon fade out an additional shift is required.
- const int kBubbleAnimationOffsetY = 5;
- int shift = animation->CurrentValueBetween(kBubbleAnimationOffsetY, 0);
- gfx::Rect rect = initial_position_;
-
- rect.set_y(rect.y() + shift);
- bubble_widget_->GetNativeWindow()->SetBounds(rect);
-}
-
-bool MaximizeBubbleControllerBubble::CanActivate() const {
- return false;
-}
-
-bool MaximizeBubbleControllerBubble::WidgetHasHitTestMask() const {
- return bubble_border_ != NULL;
-}
-
-void MaximizeBubbleControllerBubble::GetWidgetHitTestMask(
- gfx::Path* mask) const {
- DCHECK(mask);
- DCHECK(bubble_border_);
- bubble_border_->GetMask(mask);
-}
-
-void MaximizeBubbleControllerBubble::MouseMovedOutOfHost() {
- if (!owner_ || shutting_down_)
- return;
- // When we leave the bubble, we might be still be in gesture mode or over
- // the maximize button. So only close if none of the other cases apply.
- if (!owner_->frame_maximize_button()->is_snap_enabled()) {
- gfx::Point screen_location = Shell::GetScreen()->GetCursorScreenPoint();
- if (!owner_->frame_maximize_button()->GetBoundsInScreen().Contains(
- screen_location)) {
- owner_->RequestDestructionThroughOwner();
- }
- }
-}
-
-bool MaximizeBubbleControllerBubble::Contains(
- const gfx::Point& screen_point,
- views::MouseWatcherHost::MouseEventType type) {
- if (!owner_ || shutting_down_)
- return false;
- bool inside_button =
- owner_->frame_maximize_button()->GetBoundsInScreen().Contains(
- screen_point);
- if (!owner_->frame_maximize_button()->is_snap_enabled() && inside_button) {
- SetSnapType(controller()->maximize_type() == FRAME_STATE_FULL ?
- SNAP_RESTORE : SNAP_MAXIMIZE);
- return true;
- }
- // Check if either a gesture is taking place (=> bubble stays no matter what
- // the mouse does) or the mouse is over the maximize button or the bubble
- // content.
- return (owner_->frame_maximize_button()->is_snap_enabled() ||
- inside_button ||
- contents_view_->GetBoundsInScreen().Contains(screen_point));
-}
-
-gfx::Size MaximizeBubbleControllerBubble::GetPreferredSize() {
- return contents_view_->GetPreferredSize();
-}
-
-void MaximizeBubbleControllerBubble::OnWidgetDestroying(views::Widget* widget) {
- if (bubble_widget_ == widget) {
- mouse_watcher_->Stop();
-
- if (owner_) {
- // If the bubble destruction was triggered by some other external
- // influence then ourselves, the owner needs to be informed that the menu
- // is gone.
- shutting_down_ = true;
- owner_->RequestDestructionThroughOwner();
- owner_ = NULL;
- }
- }
- BubbleDelegateView::OnWidgetDestroying(widget);
-}
-
-void MaximizeBubbleControllerBubble::ControllerRequestsCloseAndDelete() {
- // This only gets called from the owning base class once it is deleted.
- if (shutting_down_)
- return;
- shutting_down_ = true;
- owner_ = NULL;
-
- // Close the widget asynchronously after the hide animation is finished.
- initial_position_ = bubble_widget_->GetNativeWindow()->bounds();
- if (!appearance_delay_ms_)
- bubble_widget_->CloseNow();
- else
- StartFade(false);
-}
-
-void MaximizeBubbleControllerBubble::SetSnapType(SnapType snap_type) {
- if (contents_view_)
- contents_view_->SetSnapType(snap_type);
-}
-
-views::CustomButton* MaximizeBubbleControllerBubble::GetButtonForUnitTest(
- SnapType state) {
- return contents_view_->GetButtonForUnitTest(state);
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/caption_buttons/maximize_bubble_controller_bubble.h b/chromium/ash/wm/caption_buttons/maximize_bubble_controller_bubble.h
deleted file mode 100644
index dfb25efa08c..00000000000
--- a/chromium/ash/wm/caption_buttons/maximize_bubble_controller_bubble.h
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_BUBBLE_H_
-#define ASH_WM_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_BUBBLE_H_
-
-#include "ash/wm/workspace/snap_types.h"
-#include "ui/views/bubble/bubble_delegate.h"
-#include "ui/views/mouse_watcher.h"
-
-namespace views {
-class CustomButton;
-}
-
-namespace ash {
-
-class BubbleContentsView;
-class MaximizeBubbleBorder;
-class MaximizeBubbleController;
-
-// The class which creates and manages the bubble menu element.
-// It creates a 'bubble border' and the content accordingly.
-// Note: Since the SnapSizer will show animations on top of the maximize button
-// this menu gets created as a separate window and the SnapSizer will be
-// created underneath this window.
-class MaximizeBubbleControllerBubble : public views::BubbleDelegateView,
- public views::MouseWatcherListener {
- public:
- static const SkColor kBubbleBackgroundColor;
- static const int kLayoutSpacing; // The spacing between two buttons.
-
- MaximizeBubbleControllerBubble(MaximizeBubbleController* owner,
- int appearance_delay_ms,
- SnapType initial_snap_type);
- virtual ~MaximizeBubbleControllerBubble();
-
- // The window of the menu under which the SnapSizer will get created.
- aura::Window* GetBubbleWindow();
-
- // Overridden from views::BubbleDelegateView.
- virtual gfx::Rect GetAnchorRect() OVERRIDE;
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
- virtual bool CanActivate() const OVERRIDE;
-
- // Overridden from views::WidgetDelegateView.
- virtual bool WidgetHasHitTestMask() const OVERRIDE;
- virtual void GetWidgetHitTestMask(gfx::Path* mask) const OVERRIDE;
-
- // Implementation of MouseWatcherListener.
- virtual void MouseMovedOutOfHost() OVERRIDE;
-
- // Implementation of MouseWatcherHost.
- virtual bool Contains(const gfx::Point& screen_point,
- views::MouseWatcherHost::MouseEventType type);
-
- // Overridden from views::View.
- virtual gfx::Size GetPreferredSize() OVERRIDE;
-
- // Overridden from views::Widget::Observer.
- virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
-
- // Called from the controller class to indicate that the menu should get
- // destroyed.
- virtual void ControllerRequestsCloseAndDelete();
-
- // Called from the owning class to change the menu content to the given
- // |snap_type| so that the user knows what is selected.
- void SetSnapType(SnapType snap_type);
-
- // Get the owning MaximizeBubbleController. This might return NULL in case
- // of an asynchronous shutdown.
- MaximizeBubbleController* controller() const { return owner_; }
-
- // Added for unit test: Retrieve the button for an action.
- // |state| can be either SNAP_LEFT, SNAP_RIGHT or SNAP_MINIMIZE.
- views::CustomButton* GetButtonForUnitTest(SnapType state);
-
- private:
- // True if the shut down has been initiated.
- bool shutting_down_;
-
- // Our owning class.
- MaximizeBubbleController* owner_;
-
- // The widget which contains our menu and the bubble border.
- views::Widget* bubble_widget_;
-
- // The content accessor of the menu.
- BubbleContentsView* contents_view_;
-
- // The bubble border.
- MaximizeBubbleBorder* bubble_border_;
-
- // The rectangle before the animation starts.
- gfx::Rect initial_position_;
-
- // The mouse watcher which takes care of out of window hover events.
- scoped_ptr<views::MouseWatcher> mouse_watcher_;
-
- // The fade delay - if 0 it will show / hide immediately.
- const int appearance_delay_ms_;
-
- DISALLOW_COPY_AND_ASSIGN(MaximizeBubbleControllerBubble);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_CAPTION_BUTTONS_MAXIMIZE_BUBBLE_CONTROLLER_BUBBLE_H_
diff --git a/chromium/ash/wm/coordinate_conversion.cc b/chromium/ash/wm/coordinate_conversion.cc
deleted file mode 100644
index 448bd0fcbef..00000000000
--- a/chromium/ash/wm/coordinate_conversion.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/coordinate_conversion.h"
-
-#include "ash/display/display_controller.h"
-#include "ash/shell.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/point.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-namespace wm {
-
-aura::Window* GetRootWindowAt(const gfx::Point& point) {
- const gfx::Display& display =
- Shell::GetScreen()->GetDisplayNearestPoint(point);
- DCHECK(display.is_valid());
- // TODO(yusukes): Move coordinate_conversion.cc and .h to ui/aura/ once
- // GetRootWindowForDisplayId() is moved to aura::Env.
- return Shell::GetInstance()->display_controller()->
- GetRootWindowForDisplayId(display.id());
-}
-
-aura::Window* GetRootWindowMatching(const gfx::Rect& rect) {
- const gfx::Display& display = Shell::GetScreen()->GetDisplayMatching(rect);
- return Shell::GetInstance()->display_controller()->
- GetRootWindowForDisplayId(display.id());
-}
-
-void ConvertPointToScreen(aura::Window* window, gfx::Point* point) {
- aura::client::GetScreenPositionClient(window->GetRootWindow())->
- ConvertPointToScreen(window, point);
-}
-
-void ConvertPointFromScreen(aura::Window* window,
- gfx::Point* point_in_screen) {
- aura::client::GetScreenPositionClient(window->GetRootWindow())->
- ConvertPointFromScreen(window, point_in_screen);
-}
-
-} // namespace wm
-} // namespace ash
diff --git a/chromium/ash/wm/coordinate_conversion.h b/chromium/ash/wm/coordinate_conversion.h
deleted file mode 100644
index f5c1af8d20f..00000000000
--- a/chromium/ash/wm/coordinate_conversion.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_COORDINATE_CONVERSION_H_
-#define ASH_WM_COORDINATE_CONVERSION_H_
-
-#include "ash/ash_export.h"
-
-namespace aura {
-class Window;
-} // namespace gfx
-
-namespace gfx {
-class Point;
-class Rect;
-} // namespace gfx
-
-namespace ash {
-namespace wm {
-
-// Returns the RootWindow at |point| in the virtual screen coordinates.
-// Returns NULL if the root window does not exist at the given
-// point.
-ASH_EXPORT aura::Window* GetRootWindowAt(const gfx::Point& point);
-
-// Returns the RootWindow that shares the most area with |rect| in
-// the virtual scren coordinates.
-ASH_EXPORT aura::Window* GetRootWindowMatching(const gfx::Rect& rect);
-
-// Converts the |point| from a given |window|'s coordinates into the screen
-// coordinates.
-ASH_EXPORT void ConvertPointToScreen(aura::Window* window, gfx::Point* point);
-
-// Converts the |point| from the screen coordinates to a given |window|'s
-// coordinates.
-ASH_EXPORT void ConvertPointFromScreen(aura::Window* window,
- gfx::Point* point_in_screen);
-
-} // namespace wm
-} // namespace ash
-
-#endif // ASH_WM_COORDINATE_CONVERSION_H_
diff --git a/chromium/ash/wm/custom_frame_view_ash.cc b/chromium/ash/wm/custom_frame_view_ash.cc
deleted file mode 100644
index 5617bd4006c..00000000000
--- a/chromium/ash/wm/custom_frame_view_ash.cc
+++ /dev/null
@@ -1,502 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/custom_frame_view_ash.h"
-
-#include "ash/ash_switches.h"
-#include "ash/wm/caption_buttons/frame_caption_button_container_view.h"
-#include "ash/wm/caption_buttons/frame_maximize_button.h"
-#include "ash/wm/caption_buttons/frame_maximize_button_observer.h"
-#include "ash/wm/frame_border_hit_test_controller.h"
-#include "ash/wm/header_painter.h"
-#include "ash/wm/immersive_fullscreen_controller.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_state_delegate.h"
-#include "base/command_line.h"
-#include "grit/ash_resources.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_observer.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/font.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/size.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/native_widget_aura.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-#include "ui/views/widget/widget_deletion_observer.h"
-
-namespace {
-
-const gfx::Font& GetTitleFont() {
- static gfx::Font* title_font = NULL;
- if (!title_font)
- title_font = new gfx::Font(views::NativeWidgetAura::GetWindowTitleFont());
- return *title_font;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// CustomFrameViewAshWindowStateDelegate
-
-// Handles a user's fullscreen request (Shift+F4/F4). Puts the window into
-// immersive fullscreen if the kAshEnableImmersiveFullscreenForAllWindows
-// flag is set.
-class CustomFrameViewAshWindowStateDelegate
- : public ash::wm::WindowStateDelegate,
- public ash::wm::WindowStateObserver,
- public aura::WindowObserver {
- public:
- CustomFrameViewAshWindowStateDelegate(
- ash::wm::WindowState* window_state,
- ash::CustomFrameViewAsh* custom_frame_view)
- : window_state_(NULL) {
-#if defined(OS_CHROMEOS)
- // TODO(pkotwicz): Investigate if immersive fullscreen can be enabled for
- // Windows Ash.
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- ash::switches::kAshEnableImmersiveFullscreenForAllWindows)) {
- immersive_fullscreen_controller_.reset(
- new ash::ImmersiveFullscreenController);
- custom_frame_view->InitImmersiveFullscreenControllerForView(
- immersive_fullscreen_controller_.get());
-
- // Add a window state observer to exit fullscreen properly in case
- // fullscreen is exited without going through
- // WindowState::ToggleFullscreen(). This is the case when exiting
- // immersive fullscreen via the "Restore" window control.
- // TODO(pkotwicz): This is a hack. Remove ASAP. http://crbug.com/319048
- window_state_ = window_state;
- window_state_->AddObserver(this);
- window_state_->window()->AddObserver(this);
- }
-#endif
- }
- virtual ~CustomFrameViewAshWindowStateDelegate() {
- if (window_state_) {
- window_state_->RemoveObserver(this);
- window_state_->window()->RemoveObserver(this);
- }
- }
- private:
- // Overridden from ash::wm::WindowStateDelegate:
- virtual bool ToggleFullscreen(ash::wm::WindowState* window_state) OVERRIDE {
- bool enter_fullscreen = !window_state->IsFullscreen();
- if (enter_fullscreen) {
- window_state->window()->SetProperty(aura::client::kShowStateKey,
- ui::SHOW_STATE_FULLSCREEN);
- } else {
- window_state->Restore();
- }
- if (immersive_fullscreen_controller_) {
- immersive_fullscreen_controller_->SetEnabled(
- ash::ImmersiveFullscreenController::WINDOW_TYPE_OTHER,
- enter_fullscreen);
- }
- return true;
- }
- // Overridden from aura::WindowObserver:
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE {
- window_state_->RemoveObserver(this);
- window_state_->window()->RemoveObserver(this);
- window_state_ = NULL;
- }
- // Overridden from ash::wm::WindowStateObserver:
- virtual void OnWindowShowTypeChanged(
- ash::wm::WindowState* window_state,
- ash::wm::WindowShowType old_type) OVERRIDE {
- if (!window_state->IsFullscreen() &&
- !window_state->IsMinimized() &&
- immersive_fullscreen_controller_.get() &&
- immersive_fullscreen_controller_->IsEnabled()) {
- immersive_fullscreen_controller_->SetEnabled(
- ash::ImmersiveFullscreenController::WINDOW_TYPE_OTHER,
- false);
- }
- }
-
- ash::wm::WindowState* window_state_;
- scoped_ptr<ash::ImmersiveFullscreenController>
- immersive_fullscreen_controller_;
-
- DISALLOW_COPY_AND_ASSIGN(CustomFrameViewAshWindowStateDelegate);
-};
-
-} // namespace
-
-namespace ash {
-
-///////////////////////////////////////////////////////////////////////////////
-// CustomFrameViewAsh::HeaderView
-
-// View which paints the header. It slides off and on screen in immersive
-// fullscreen.
-class CustomFrameViewAsh::HeaderView
- : public views::View,
- public ImmersiveFullscreenController::Delegate,
- public FrameMaximizeButtonObserver {
- public:
- // |frame| is the widget that the caption buttons act on.
- explicit HeaderView(views::Widget* frame);
- virtual ~HeaderView();
-
- // Schedules a repaint for the entire title.
- void SchedulePaintForTitle();
-
- // Tells the window controls to reset themselves to the normal state.
- void ResetWindowControls();
-
- // Returns the amount of the view's pixels which should be on screen.
- int GetPreferredOnScreenHeight() const;
-
- // Returns the view's preferred height.
- int GetPreferredHeight() const;
-
- // Returns the view's minimum width.
- int GetMinimumWidth() const;
-
- // views::View overrides:
- virtual void Layout() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
-
- // Sets whether the header should be painted as active.
- void set_paint_as_active(bool paint_as_active) {
- paint_as_active_ = paint_as_active;
- }
-
- HeaderPainter* header_painter() {
- return header_painter_.get();
- }
-
- private:
- // ImmersiveFullscreenController::Delegate overrides:
- virtual void OnImmersiveRevealStarted() OVERRIDE;
- virtual void OnImmersiveRevealEnded() OVERRIDE;
- virtual void OnImmersiveFullscreenExited() OVERRIDE;
- virtual void SetVisibleFraction(double visible_fraction) OVERRIDE;
- virtual std::vector<gfx::Rect> GetVisibleBoundsInScreen() const OVERRIDE;
-
- // FrameMaximizeButtonObserver overrides:
- virtual void OnMaximizeBubbleShown(views::Widget* bubble) OVERRIDE;
-
- // The widget that the caption buttons act on.
- views::Widget* frame_;
-
- // Helper for painting the header.
- scoped_ptr<HeaderPainter> header_painter_;
-
- // View which contains the window caption buttons.
- FrameCaptionButtonContainerView* caption_button_container_;
-
- // The maximize bubble widget. |maximize_bubble_| may be non-NULL but have
- // been already destroyed.
- views::Widget* maximize_bubble_;
-
- // Keeps track of whether |maximize_bubble_| is still alive.
- scoped_ptr<views::WidgetDeletionObserver> maximize_bubble_lifetime_observer_;
-
- // Whether the header should be painted as active.
- bool paint_as_active_;
-
- // The fraction of the header's height which is visible while in fullscreen.
- // This value is meaningless when not in fullscreen.
- double fullscreen_visible_fraction_;
-
- DISALLOW_COPY_AND_ASSIGN(HeaderView);
-};
-
-CustomFrameViewAsh::HeaderView::HeaderView(views::Widget* frame)
- : frame_(frame),
- header_painter_(new ash::HeaderPainter),
- caption_button_container_(NULL),
- maximize_bubble_(NULL),
- paint_as_active_(false),
- fullscreen_visible_fraction_(0) {
- // Unfortunately, there is no views::WidgetDelegate::CanMinimize(). Assume
- // that the window frame can be minimized if it can be maximized.
- FrameCaptionButtonContainerView::MinimizeAllowed minimize_allowed =
- frame_->widget_delegate()->CanMaximize() ?
- FrameCaptionButtonContainerView::MINIMIZE_ALLOWED :
- FrameCaptionButtonContainerView::MINIMIZE_DISALLOWED;
- caption_button_container_ = new FrameCaptionButtonContainerView(frame_,
- minimize_allowed);
- AddChildView(caption_button_container_);
- FrameMaximizeButton* frame_maximize_button =
- caption_button_container_->GetOldStyleSizeButton();
- if (frame_maximize_button)
- frame_maximize_button->AddObserver(this);
-
- header_painter_->Init(frame_, this, NULL, caption_button_container_);
-}
-
-CustomFrameViewAsh::HeaderView::~HeaderView() {
- FrameMaximizeButton* frame_maximize_button =
- caption_button_container_->GetOldStyleSizeButton();
- if (frame_maximize_button)
- frame_maximize_button->RemoveObserver(this);
-}
-
-void CustomFrameViewAsh::HeaderView::SchedulePaintForTitle() {
- header_painter_->SchedulePaintForTitle(GetTitleFont());
-}
-
-void CustomFrameViewAsh::HeaderView::ResetWindowControls() {
- caption_button_container_->ResetWindowControls();
-}
-
-int CustomFrameViewAsh::HeaderView::GetPreferredOnScreenHeight() const {
- if (frame_->IsFullscreen()) {
- return static_cast<int>(
- GetPreferredHeight() * fullscreen_visible_fraction_);
- }
- return GetPreferredHeight();
-}
-
-int CustomFrameViewAsh::HeaderView::GetPreferredHeight() const {
- // Reserve enough space to see the buttons and the separator line.
- return caption_button_container_->bounds().bottom() +
- header_painter_->HeaderContentSeparatorSize();
-}
-
-int CustomFrameViewAsh::HeaderView::GetMinimumWidth() const {
- return header_painter_->GetMinimumHeaderWidth();
-}
-
-void CustomFrameViewAsh::HeaderView::Layout() {
- header_painter_->LayoutHeader(true);
- header_painter_->set_header_height(GetPreferredHeight());
-}
-
-void CustomFrameViewAsh::HeaderView::OnPaint(gfx::Canvas* canvas) {
- int theme_image_id = 0;
- if (frame_->IsMaximized() || frame_->IsFullscreen())
- theme_image_id = IDR_AURA_WINDOW_HEADER_BASE_MINIMAL;
- else if (paint_as_active_)
- theme_image_id = IDR_AURA_WINDOW_HEADER_BASE_ACTIVE;
- else
- theme_image_id = IDR_AURA_WINDOW_HEADER_BASE_INACTIVE;
-
- header_painter_->PaintHeader(
- canvas,
- paint_as_active_ ? HeaderPainter::ACTIVE : HeaderPainter::INACTIVE,
- theme_image_id,
- 0);
- header_painter_->PaintTitleBar(canvas, GetTitleFont());
- header_painter_->PaintHeaderContentSeparator(canvas);
-}
-
-void CustomFrameViewAsh::HeaderView::OnImmersiveRevealStarted() {
- fullscreen_visible_fraction_ = 0;
- SetPaintToLayer(true);
- parent()->Layout();
-}
-
-void CustomFrameViewAsh::HeaderView::OnImmersiveRevealEnded() {
- fullscreen_visible_fraction_ = 0;
- SetPaintToLayer(false);
- parent()->Layout();
-}
-
-void CustomFrameViewAsh::HeaderView::OnImmersiveFullscreenExited() {
- fullscreen_visible_fraction_ = 0;
- SetPaintToLayer(false);
- parent()->Layout();
-}
-
-void CustomFrameViewAsh::HeaderView::SetVisibleFraction(
- double visible_fraction) {
- if (fullscreen_visible_fraction_ != visible_fraction) {
- fullscreen_visible_fraction_ = visible_fraction;
- parent()->Layout();
- }
-}
-
-std::vector<gfx::Rect>
-CustomFrameViewAsh::HeaderView::GetVisibleBoundsInScreen() const {
- // TODO(pkotwicz): Implement views::View::ConvertRectToScreen().
- gfx::Rect visible_bounds(GetVisibleBounds());
- gfx::Point visible_origin_in_screen(visible_bounds.origin());
- views::View::ConvertPointToScreen(this, &visible_origin_in_screen);
- std::vector<gfx::Rect> bounds_in_screen;
- bounds_in_screen.push_back(
- gfx::Rect(visible_origin_in_screen, visible_bounds.size()));
- if (maximize_bubble_lifetime_observer_.get() &&
- maximize_bubble_lifetime_observer_->IsWidgetAlive()) {
- bounds_in_screen.push_back(maximize_bubble_->GetWindowBoundsInScreen());
- }
- return bounds_in_screen;
-}
-
-void CustomFrameViewAsh::HeaderView::OnMaximizeBubbleShown(
- views::Widget* bubble) {
- maximize_bubble_ = bubble;
- maximize_bubble_lifetime_observer_.reset(
- new views::WidgetDeletionObserver(bubble));
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// CustomFrameViewAsh::OverlayView
-
-// View which takes up the entire widget and contains the HeaderView. HeaderView
-// is a child of OverlayView to avoid creating a larger texture than necessary
-// when painting the HeaderView to its own layer.
-class CustomFrameViewAsh::OverlayView : public views::View {
- public:
- explicit OverlayView(HeaderView* header_view);
- virtual ~OverlayView();
-
- // views::View override:
- virtual void Layout() OVERRIDE;
- virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE;
-
- private:
- HeaderView* header_view_;
-
- DISALLOW_COPY_AND_ASSIGN(OverlayView);
-};
-
-CustomFrameViewAsh::OverlayView::OverlayView(HeaderView* header_view)
- : header_view_(header_view) {
- AddChildView(header_view);
-}
-
-CustomFrameViewAsh::OverlayView::~OverlayView() {
-}
-
-void CustomFrameViewAsh::OverlayView::Layout() {
- int onscreen_height = header_view_->GetPreferredOnScreenHeight();
- if (onscreen_height == 0) {
- header_view_->SetVisible(false);
- } else {
- int height = header_view_->GetPreferredHeight();
- header_view_->SetBounds(0, onscreen_height - height, width(), height);
- header_view_->SetVisible(true);
- }
-}
-
-bool CustomFrameViewAsh::OverlayView::HitTestRect(const gfx::Rect& rect) const {
- // Grab events in the header view. Return false for other events so that they
- // can be handled by the client view.
- return header_view_->HitTestRect(rect);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// CustomFrameViewAsh, public:
-
-// static
-const char CustomFrameViewAsh::kViewClassName[] = "CustomFrameViewAsh";
-
-CustomFrameViewAsh::CustomFrameViewAsh(views::Widget* frame)
- : frame_(frame),
- header_view_(new HeaderView(frame)),
- frame_border_hit_test_controller_(
- new FrameBorderHitTestController(frame_)) {
- // |header_view_| is set as the non client view's overlay view so that it can
- // overlay the web contents in immersive fullscreen.
- frame->non_client_view()->SetOverlayView(new OverlayView(header_view_));
-
- // A delegate for a more complex way of fullscreening the window may already
- // be set. This is the case for packaged apps.
- wm::WindowState* window_state = wm::GetWindowState(frame->GetNativeWindow());
- if (!window_state->HasDelegate()) {
- window_state->SetDelegate(scoped_ptr<wm::WindowStateDelegate>(
- new CustomFrameViewAshWindowStateDelegate(
- window_state, this)).Pass());
- }
-}
-
-CustomFrameViewAsh::~CustomFrameViewAsh() {
-}
-
-void CustomFrameViewAsh::InitImmersiveFullscreenControllerForView(
- ImmersiveFullscreenController* immersive_fullscreen_controller) {
- immersive_fullscreen_controller->Init(header_view_, frame_, header_view_);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// CustomFrameViewAsh, views::NonClientFrameView overrides:
-
-gfx::Rect CustomFrameViewAsh::GetBoundsForClientView() const {
- int top_height = NonClientTopBorderHeight();
- return HeaderPainter::GetBoundsForClientView(top_height, bounds());
-}
-
-gfx::Rect CustomFrameViewAsh::GetWindowBoundsForClientBounds(
- const gfx::Rect& client_bounds) const {
- int top_height = NonClientTopBorderHeight();
- return HeaderPainter::GetWindowBoundsForClientBounds(top_height,
- client_bounds);
-}
-
-int CustomFrameViewAsh::NonClientHitTest(const gfx::Point& point) {
- return FrameBorderHitTestController::NonClientHitTest(this,
- header_view_->header_painter(), point);
-}
-
-void CustomFrameViewAsh::GetWindowMask(const gfx::Size& size,
- gfx::Path* window_mask) {
- // No window masks in Aura.
-}
-
-void CustomFrameViewAsh::ResetWindowControls() {
- header_view_->ResetWindowControls();
-}
-
-void CustomFrameViewAsh::UpdateWindowIcon() {
-}
-
-void CustomFrameViewAsh::UpdateWindowTitle() {
- header_view_->SchedulePaintForTitle();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// CustomFrameViewAsh, views::View overrides:
-
-gfx::Size CustomFrameViewAsh::GetPreferredSize() {
- gfx::Size pref = frame_->client_view()->GetPreferredSize();
- gfx::Rect bounds(0, 0, pref.width(), pref.height());
- return frame_->non_client_view()->GetWindowBoundsForClientBounds(
- bounds).size();
-}
-
-const char* CustomFrameViewAsh::GetClassName() const {
- return kViewClassName;
-}
-
-gfx::Size CustomFrameViewAsh::GetMinimumSize() {
- gfx::Size min_client_view_size(frame_->client_view()->GetMinimumSize());
- return gfx::Size(
- std::max(header_view_->GetMinimumWidth(), min_client_view_size.width()),
- NonClientTopBorderHeight() + min_client_view_size.height());
-}
-
-gfx::Size CustomFrameViewAsh::GetMaximumSize() {
- return frame_->client_view()->GetMaximumSize();
-}
-
-void CustomFrameViewAsh::SchedulePaintInRect(const gfx::Rect& r) {
- // The HeaderView is not a child of CustomFrameViewAsh. Redirect the paint to
- // HeaderView instead.
- header_view_->set_paint_as_active(ShouldPaintAsActive());
- header_view_->SchedulePaint();
-}
-
-bool CustomFrameViewAsh::HitTestRect(const gfx::Rect& rect) const {
- // NonClientView hit tests the NonClientFrameView first instead of going in
- // z-order. Return false so that events get to the OverlayView.
- return false;
-}
-
-views::View* CustomFrameViewAsh::GetHeaderView() {
- return header_view_;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// CustomFrameViewAsh, private:
-
-int CustomFrameViewAsh::NonClientTopBorderHeight() const {
- return frame_->IsFullscreen() ? 0 : header_view_->GetPreferredHeight();
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/custom_frame_view_ash.h b/chromium/ash/wm/custom_frame_view_ash.h
deleted file mode 100644
index 8242b246856..00000000000
--- a/chromium/ash/wm/custom_frame_view_ash.h
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_CUSTOM_FRAME_VIEW_ASH_H_
-#define ASH_WM_CUSTOM_FRAME_VIEW_ASH_H_
-
-#include "ash/ash_export.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/views/window/non_client_view.h"
-
-namespace ash {
-class FrameBorderHitTestController;
-class HeaderPainter;
-class ImmersiveFullscreenController;
-}
-namespace gfx {
-class Font;
-}
-namespace views {
-class Widget;
-}
-
-namespace ash {
-
-// A NonClientFrameView used for packaged apps, dialogs and other non-browser
-// windows. It supports immersive fullscreen. When in immersive fullscreen, the
-// client view takes up the entire widget and the window header is an overlay.
-// The window header overlay slides onscreen when the user hovers the mouse at
-// the top of the screen. See also views::CustomFrameView and
-// BrowserNonClientFrameViewAsh.
-class ASH_EXPORT CustomFrameViewAsh : public views::NonClientFrameView {
- public:
- // Internal class name.
- static const char kViewClassName[];
-
- explicit CustomFrameViewAsh(views::Widget* frame);
- virtual ~CustomFrameViewAsh();
-
- // Inits |immersive_fullscreen_controller| so that the controller reveals
- // and hides |header_view_| in immersive fullscreen.
- // CustomFrameViewAsh does not take ownership of
- // |immersive_fullscreen_controller|.
- void InitImmersiveFullscreenControllerForView(
- ImmersiveFullscreenController* immersive_fullscreen_controller);
-
- // views::NonClientFrameView overrides:
- virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
- virtual gfx::Rect GetWindowBoundsForClientBounds(
- const gfx::Rect& client_bounds) const OVERRIDE;
- virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
- virtual void GetWindowMask(const gfx::Size& size,
- gfx::Path* window_mask) OVERRIDE;
- virtual void ResetWindowControls() OVERRIDE;
- virtual void UpdateWindowIcon() OVERRIDE;
- virtual void UpdateWindowTitle() OVERRIDE;
-
- // views::View overrides:
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual const char* GetClassName() const OVERRIDE;
- virtual gfx::Size GetMinimumSize() OVERRIDE;
- virtual gfx::Size GetMaximumSize() OVERRIDE;
- virtual void SchedulePaintInRect(const gfx::Rect& r) OVERRIDE;
- virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE;
-
- // Get the view of the header.
- views::View* GetHeaderView();
-
- private:
- class OverlayView;
-
- // Height from top of window to top of client area.
- int NonClientTopBorderHeight() const;
-
- // Not owned.
- views::Widget* frame_;
-
- // View which contains the title and window controls.
- class HeaderView;
- HeaderView* header_view_;
-
- // Updates the hittest bounds overrides based on the window show type.
- scoped_ptr<FrameBorderHitTestController> frame_border_hit_test_controller_;
-
- DISALLOW_COPY_AND_ASSIGN(CustomFrameViewAsh);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_CUSTOM_FRAME_VIEW_ASH_H_
diff --git a/chromium/ash/wm/default_window_resizer.cc b/chromium/ash/wm/default_window_resizer.cc
deleted file mode 100644
index 41bc1fdd328..00000000000
--- a/chromium/ash/wm/default_window_resizer.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/default_window_resizer.h"
-
-#include "ash/shell.h"
-#include "ash/wm/window_state.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/env.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-
-DefaultWindowResizer::~DefaultWindowResizer() {
- ash::Shell::GetInstance()->cursor_manager()->UnlockCursor();
-}
-
-// static
-DefaultWindowResizer*
-DefaultWindowResizer::Create(aura::Window* window,
- const gfx::Point& location,
- int window_component,
- aura::client::WindowMoveSource source) {
- Details details(window, location, window_component, source);
- return details.is_resizable ? new DefaultWindowResizer(details) : NULL;
-}
-
-void DefaultWindowResizer::Drag(const gfx::Point& location, int event_flags) {
- gfx::Rect bounds(CalculateBoundsForDrag(details_, location));
- if (bounds != details_.window->bounds()) {
- if (!did_move_or_resize_ && !details_.restore_bounds.IsEmpty())
- wm::GetWindowState(details_.window)->ClearRestoreBounds();
- did_move_or_resize_ = true;
- details_.window->SetBounds(bounds);
- }
-}
-
-void DefaultWindowResizer::CompleteDrag(int event_flags) {
-}
-
-void DefaultWindowResizer::RevertDrag() {
- if (!did_move_or_resize_)
- return;
-
- details_.window->SetBounds(details_.initial_bounds_in_parent);
-
- if (!details_.restore_bounds.IsEmpty())
- wm::GetWindowState(details_.window)->SetRestoreBoundsInScreen(
- details_.restore_bounds);
-}
-
-aura::Window* DefaultWindowResizer::GetTarget() {
- return details_.window;
-}
-
-const gfx::Point& DefaultWindowResizer::GetInitialLocation() const {
- return details_.initial_location_in_parent;
-}
-
-DefaultWindowResizer::DefaultWindowResizer(const Details& details)
- : details_(details),
- did_move_or_resize_(false) {
- DCHECK(details_.is_resizable);
- ash::Shell::GetInstance()->cursor_manager()->LockCursor();
-}
-
-} // namespace aura
diff --git a/chromium/ash/wm/default_window_resizer.h b/chromium/ash/wm/default_window_resizer.h
deleted file mode 100644
index 621acd39f3b..00000000000
--- a/chromium/ash/wm/default_window_resizer.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_DEFAULT_WINDOW_RESIZER_H_
-#define ASH_WM_DEFAULT_WINDOW_RESIZER_H_
-
-#include "ash/wm/window_resizer.h"
-#include "base/compiler_specific.h"
-
-namespace ash {
-
-// WindowResizer is used by ToplevelWindowEventFilter to handle dragging, moving
-// or resizing a window. All coordinates passed to this are in the parent
-// windows coordiantes.
-class ASH_EXPORT DefaultWindowResizer : public WindowResizer {
- public:
- virtual ~DefaultWindowResizer();
-
- // Creates a new DefaultWindowResizer. The caller takes ownership of the
- // returned object. Returns NULL if not resizable.
- static DefaultWindowResizer* Create(aura::Window* window,
- const gfx::Point& location,
- int window_component,
- aura::client::WindowMoveSource source);
-
- // Returns true if the drag will result in changing the window in anyway.
- bool is_resizable() const { return details_.is_resizable; }
-
- bool changed_size() const {
- return !(details_.bounds_change & kBoundsChange_Repositions);
- }
- aura::Window* target_window() const { return details_.window; }
-
- // WindowResizer:
- virtual void Drag(const gfx::Point& location, int event_flags) OVERRIDE;
- virtual void CompleteDrag(int event_flags) OVERRIDE;
- virtual void RevertDrag() OVERRIDE;
- virtual aura::Window* GetTarget() OVERRIDE;
- virtual const gfx::Point& GetInitialLocation() const OVERRIDE;
-
- private:
- explicit DefaultWindowResizer(const Details& details);
-
- const Details details_;
-
- // Set to true once Drag() is invoked and the bounds of the window change.
- bool did_move_or_resize_;
-
- DISALLOW_COPY_AND_ASSIGN(DefaultWindowResizer);
-};
-
-} // namespace aura
-
-#endif // ASH_WM_DEFAULT_WINDOW_RESIZER_H_
diff --git a/chromium/ash/wm/dock/OWNERS b/chromium/ash/wm/dock/OWNERS
deleted file mode 100644
index 55fd0c2bc27..00000000000
--- a/chromium/ash/wm/dock/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-varkha@chromium.org
diff --git a/chromium/ash/wm/dock/dock_types.h b/chromium/ash/wm/dock/dock_types.h
deleted file mode 100644
index e2ebaab1f75..00000000000
--- a/chromium/ash/wm/dock/dock_types.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_DOCK_DOCK_TYPES_H_
-#define ASH_WM_DOCK_DOCK_TYPES_H_
-
-namespace ash {
-
-namespace internal {
-
-// Possible values of which side of the screen the windows are docked at.
-// This is used by DockedwindowLayoutManager and DockedWindowResizer to
-// implement docking behavior including magnetism while dragging windows into
-// or out of the docked windows area.
-enum DockedAlignment {
- // No docked windows.
- DOCKED_ALIGNMENT_NONE,
-
- // Some windows are already docked on the left side of the screen.
- DOCKED_ALIGNMENT_LEFT,
-
- // Some windows are already docked on the right side of the screen.
- DOCKED_ALIGNMENT_RIGHT,
-};
-
-// User action recorded for use in UMA histograms.
-enum DockedAction {
- DOCKED_ACTION_NONE, // Regular drag of undocked window. Not recorded.
- DOCKED_ACTION_DOCK, // Dragged and docked a window.
- DOCKED_ACTION_UNDOCK, // Dragged and undocked a window.
- DOCKED_ACTION_RESIZE, // Resized a docked window.
- DOCKED_ACTION_REORDER, // Possibly reordered docked windows.
- DOCKED_ACTION_EVICT, // A docked window could not stay docked.
- DOCKED_ACTION_MAXIMIZE, // Maximized a docked window.
- DOCKED_ACTION_MINIMIZE, // Minimized a docked window.
- DOCKED_ACTION_RESTORE, // Restored a docked window that was minimized.
- DOCKED_ACTION_CLOSE, // Closed a window while it was docked.
- DOCKED_ACTION_COUNT, // Maximum value of this enum for histograms use.
-};
-
-// Event source for the docking user action (when known).
-enum DockedActionSource {
- DOCKED_ACTION_SOURCE_UNKNOWN,
- DOCKED_ACTION_SOURCE_MOUSE,
- DOCKED_ACTION_SOURCE_TOUCH,
-
- // Maximum value of this enum for histograms use.
- DOCKED_ACTION_SOURCE_COUNT,
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_DOCK_DOCK_TYPES_H_
diff --git a/chromium/ash/wm/dock/docked_window_layout_manager.cc b/chromium/ash/wm/dock/docked_window_layout_manager.cc
deleted file mode 100644
index 3298f05602f..00000000000
--- a/chromium/ash/wm/dock/docked_window_layout_manager.cc
+++ /dev/null
@@ -1,1240 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/dock/docked_window_layout_manager.h"
-
-#include "ash/ash_switches.h"
-#include "ash/launcher/launcher.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ash/wm/window_animations.h"
-#include "ash/wm/window_properties.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace_controller.h"
-#include "base/auto_reset.h"
-#include "base/command_line.h"
-#include "base/metrics/histogram.h"
-#include "grit/ash_resources.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "third_party/skia/include/core/SkPaint.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/client/focus_client.h"
-#include "ui/aura/client/window_tree_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/image/image_skia_operations.h"
-#include "ui/gfx/rect.h"
-#include "ui/views/background.h"
-
-namespace ash {
-namespace internal {
-
-// Minimum, maximum width of the dock area and a width of the gap
-// static
-const int DockedWindowLayoutManager::kMaxDockWidth = 360;
-// static
-const int DockedWindowLayoutManager::kMinDockWidth = 200;
-// static
-const int DockedWindowLayoutManager::kMinDockGap = 2;
-// static
-const int DockedWindowLayoutManager::kIdealWidth = 250;
-const int kMinimumHeight = 250;
-const int kSlideDurationMs = 120;
-const int kFadeDurationMs = 60;
-const int kMinimizeDurationMs = 720;
-
-class DockedBackgroundWidget : public views::Widget,
- public internal::BackgroundAnimatorDelegate {
- public:
- explicit DockedBackgroundWidget(aura::Window* container)
- : alignment_(DOCKED_ALIGNMENT_NONE),
- background_animator_(this, 0, kLauncherBackgroundAlpha),
- alpha_(0),
- opaque_background_(ui::LAYER_SOLID_COLOR) {
- InitWidget(container);
- }
-
- // Sets widget bounds and sizes opaque background layer to fill the widget.
- void SetBackgroundBounds(const gfx::Rect bounds, DockedAlignment alignment) {
- SetBounds(bounds);
- opaque_background_.SetBounds(gfx::Rect(bounds.size()));
- alignment_ = alignment;
- }
-
- // Sets the docked area background type and starts transition animation.
- void SetPaintsBackground(
- ShelfBackgroundType background_type,
- BackgroundAnimatorChangeType change_type) {
- float target_opacity =
- (background_type == SHELF_BACKGROUND_MAXIMIZED) ? 1.0f : 0.0f;
- scoped_ptr<ui::ScopedLayerAnimationSettings> opaque_background_animation;
- if (change_type != BACKGROUND_CHANGE_IMMEDIATE) {
- opaque_background_animation.reset(new ui::ScopedLayerAnimationSettings(
- opaque_background_.GetAnimator()));
- opaque_background_animation->SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kTimeToSwitchBackgroundMs));
- }
- opaque_background_.SetOpacity(target_opacity);
-
- // TODO(varkha): use ui::Layer on both opaque_background and normal
- // background retire background_animator_ at all. It would be simpler.
- // See also ShelfWidget::SetPaintsBackground.
- background_animator_.SetPaintsBackground(
- background_type != SHELF_BACKGROUND_DEFAULT,
- change_type);
- SchedulePaintInRect(gfx::Rect(GetWindowBoundsInScreen().size()));
- }
-
- // views::Widget:
- virtual void OnNativeWidgetPaint(gfx::Canvas* canvas) OVERRIDE {
- const gfx::ImageSkia& launcher_background(
- alignment_ == DOCKED_ALIGNMENT_LEFT ?
- launcher_background_left_ : launcher_background_right_);
- gfx::Rect rect = gfx::Rect(GetWindowBoundsInScreen().size());
- SkPaint paint;
- paint.setAlpha(alpha_);
- canvas->DrawImageInt(
- launcher_background,
- 0, 0, launcher_background.width(), launcher_background.height(),
- alignment_ == DOCKED_ALIGNMENT_LEFT ?
- rect.width() - launcher_background.width() : 0, 0,
- launcher_background.width(), rect.height(),
- false,
- paint);
- canvas->DrawImageInt(
- launcher_background,
- alignment_ == DOCKED_ALIGNMENT_LEFT ?
- 0 : launcher_background.width() - 1, 0,
- 1, launcher_background.height(),
- alignment_ == DOCKED_ALIGNMENT_LEFT ?
- 0 : launcher_background.width(), 0,
- rect.width() - launcher_background.width(), rect.height(),
- false,
- paint);
- }
-
- // BackgroundAnimatorDelegate:
- virtual void UpdateBackground(int alpha) OVERRIDE {
- alpha_ = alpha;
- SchedulePaintInRect(gfx::Rect(GetWindowBoundsInScreen().size()));
- }
-
- private:
- void InitWidget(aura::Window* parent) {
- views::Widget::InitParams params;
- params.type = views::Widget::InitParams::TYPE_POPUP;
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- params.can_activate = false;
- params.keep_on_top = false;
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.parent = parent;
- params.accept_events = false;
- set_focus_on_creation(false);
- Init(params);
- GetNativeWindow()->SetProperty(internal::kStayInSameRootWindowKey, true);
- opaque_background_.SetColor(SK_ColorBLACK);
- opaque_background_.SetBounds(gfx::Rect(GetWindowBoundsInScreen().size()));
- opaque_background_.SetOpacity(0.0f);
- GetNativeWindow()->layer()->Add(&opaque_background_);
- Hide();
-
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- gfx::ImageSkia launcher_background =
- *rb.GetImageSkiaNamed(IDR_AURA_LAUNCHER_BACKGROUND);
- launcher_background_left_ = gfx::ImageSkiaOperations::CreateRotatedImage(
- launcher_background, SkBitmapOperations::ROTATION_90_CW);
- launcher_background_right_ = gfx::ImageSkiaOperations::CreateRotatedImage(
- launcher_background, SkBitmapOperations::ROTATION_270_CW);
- }
-
- DockedAlignment alignment_;
-
- // The animator for the background transitions.
- internal::BackgroundAnimator background_animator_;
-
- // The alpha to use for drawing image assets covering the docked background.
- int alpha_;
-
- // Solid black background that can be made fully opaque.
- ui::Layer opaque_background_;
-
- // Backgrounds created from shelf background by 90 or 270 degree rotation.
- gfx::ImageSkia launcher_background_left_;
- gfx::ImageSkia launcher_background_right_;
-
- DISALLOW_COPY_AND_ASSIGN(DockedBackgroundWidget);
-};
-
-namespace {
-
-// Returns true if a window is a popup or a transient child.
-bool IsPopupOrTransient(const aura::Window* window) {
- return (window->type() == aura::client::WINDOW_TYPE_POPUP ||
- window->transient_parent());
-}
-
-// Certain windows (minimized, hidden or popups) do not matter to docking.
-bool IsUsedByLayout(const aura::Window* window) {
- return (window->IsVisible() &&
- !wm::GetWindowState(window)->IsMinimized() &&
- !IsPopupOrTransient(window));
-}
-
-void UndockWindow(aura::Window* window) {
- gfx::Rect previous_bounds = window->bounds();
- aura::Window* old_parent = window->parent();
- aura::client::ParentWindowWithContext(window, window, gfx::Rect());
- if (window->parent() != old_parent)
- wm::ReparentTransientChildrenOfChild(window, old_parent, window->parent());
- // Start maximize or fullscreen (affecting packaged apps) animation from
- // previous window bounds.
- window->layer()->SetBounds(previous_bounds);
-}
-
-// Returns width that is as close as possible to |target_width| while being
-// consistent with docked min and max restrictions and respects the |window|'s
-// minimum and maximum size.
-int GetWindowWidthCloseTo(const aura::Window* window, int target_width) {
- if (!wm::GetWindowState(window)->CanResize()) {
- DCHECK_LE(window->bounds().width(),
- DockedWindowLayoutManager::kMaxDockWidth);
- return window->bounds().width();
- }
- int width = std::max(DockedWindowLayoutManager::kMinDockWidth,
- std::min(target_width,
- DockedWindowLayoutManager::kMaxDockWidth));
- if (window->delegate()) {
- if (window->delegate()->GetMinimumSize().width() != 0)
- width = std::max(width, window->delegate()->GetMinimumSize().width());
- if (window->delegate()->GetMaximumSize().width() != 0)
- width = std::min(width, window->delegate()->GetMaximumSize().width());
- }
- DCHECK_LE(width, DockedWindowLayoutManager::kMaxDockWidth);
- return width;
-}
-
-// Returns height that is as close as possible to |target_height| while
-// respecting the |window|'s minimum and maximum size.
-int GetWindowHeightCloseTo(const aura::Window* window, int target_height) {
- if (!wm::GetWindowState(window)->CanResize())
- return window->bounds().height();
- int minimum_height = kMinimumHeight;
- int maximum_height = 0;
- const aura::WindowDelegate* delegate(window->delegate());
- if (delegate) {
- if (delegate->GetMinimumSize().height() != 0) {
- minimum_height = std::max(kMinimumHeight,
- delegate->GetMinimumSize().height());
- }
- if (delegate->GetMaximumSize().height() != 0)
- maximum_height = delegate->GetMaximumSize().height();
- }
- if (minimum_height)
- target_height = std::max(target_height, minimum_height);
- if (maximum_height)
- target_height = std::min(target_height, maximum_height);
- return target_height;
-}
-
-// A functor used to sort the windows in order of their minimum height.
-struct CompareMinimumHeight {
- bool operator()(WindowWithHeight win1, WindowWithHeight win2) {
- return GetWindowHeightCloseTo(win1.window(), 0) <
- GetWindowHeightCloseTo(win2.window(), 0);
- }
-};
-
-// A functor used to sort the windows in order of their center Y position.
-// |delta| is a pre-calculated distance from the bottom of one window to the top
-// of the next. Its value can be positive (gap) or negative (overlap).
-// Half of |delta| is used as a transition point at which windows could ideally
-// swap positions.
-struct CompareWindowPos {
- CompareWindowPos(aura::Window* dragged_window, float delta)
- : dragged_window_(dragged_window),
- delta_(delta / 2) {}
-
- bool operator()(WindowWithHeight window_with_height1,
- WindowWithHeight window_with_height2) {
- // Use target coordinates since animations may be active when windows are
- // reordered.
- aura::Window* win1(window_with_height1.window());
- aura::Window* win2(window_with_height2.window());
- gfx::Rect win1_bounds = ScreenAsh::ConvertRectToScreen(
- win1->parent(), win1->GetTargetBounds());
- gfx::Rect win2_bounds = ScreenAsh::ConvertRectToScreen(
- win2->parent(), win2->GetTargetBounds());
- win1_bounds.set_height(window_with_height1.height_);
- win2_bounds.set_height(window_with_height2.height_);
- // If one of the windows is the |dragged_window_| attempt to make an
- // earlier swap between the windows than just based on their centers.
- // This is possible if the dragged window is at least as tall as the other
- // window.
- if (win1 == dragged_window_)
- return compare_two_windows(win1_bounds, win2_bounds);
- if (win2 == dragged_window_)
- return !compare_two_windows(win2_bounds, win1_bounds);
- // Otherwise just compare the centers.
- return win1_bounds.CenterPoint().y() < win2_bounds.CenterPoint().y();
- }
-
- // Based on center point tries to deduce where the drag is coming from.
- // When dragging from below up the transition point is lower.
- // When dragging from above down the transition point is higher.
- bool compare_bounds(const gfx::Rect dragged, const gfx::Rect other) {
- if (dragged.CenterPoint().y() < other.CenterPoint().y())
- return dragged.CenterPoint().y() < other.y() - delta_;
- return dragged.CenterPoint().y() < other.bottom() + delta_;
- }
-
- // Performs comparison both ways and selects stable result.
- bool compare_two_windows(const gfx::Rect bounds1, const gfx::Rect bounds2) {
- // Try comparing windows in both possible orders and see if the comparison
- // is stable.
- bool result1 = compare_bounds(bounds1, bounds2);
- bool result2 = compare_bounds(bounds2, bounds1);
- if (result1 != result2)
- return result1;
-
- // Otherwise it is not possible to be sure that the windows will not bounce.
- // In this case just compare the centers.
- return bounds1.CenterPoint().y() < bounds2.CenterPoint().y();
- }
-
- private:
- aura::Window* dragged_window_;
- float delta_;
-};
-
-} // namespace
-
-////////////////////////////////////////////////////////////////////////////////
-// A class that observes launcher shelf for bounds changes.
-class DockedWindowLayoutManager::ShelfWindowObserver : public WindowObserver {
- public:
- explicit ShelfWindowObserver(
- DockedWindowLayoutManager* docked_layout_manager)
- : docked_layout_manager_(docked_layout_manager) {
- DCHECK(docked_layout_manager_->launcher()->shelf_widget());
- docked_layout_manager_->launcher()->shelf_widget()->GetNativeView()
- ->AddObserver(this);
- }
-
- virtual ~ShelfWindowObserver() {
- if (docked_layout_manager_->launcher() &&
- docked_layout_manager_->launcher()->shelf_widget())
- docked_layout_manager_->launcher()->shelf_widget()->GetNativeView()
- ->RemoveObserver(this);
- }
-
- // aura::WindowObserver:
- virtual void OnWindowBoundsChanged(aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE {
- shelf_bounds_in_screen_ = ScreenAsh::ConvertRectToScreen(
- window->parent(), new_bounds);
- docked_layout_manager_->OnShelfBoundsChanged();
- }
-
- const gfx::Rect& shelf_bounds_in_screen() const {
- return shelf_bounds_in_screen_;
- }
-
- private:
- DockedWindowLayoutManager* docked_layout_manager_;
- gfx::Rect shelf_bounds_in_screen_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfWindowObserver);
-};
-
-////////////////////////////////////////////////////////////////////////////////
-// DockedWindowLayoutManager public implementation:
-DockedWindowLayoutManager::DockedWindowLayoutManager(
- aura::Window* dock_container, WorkspaceController* workspace_controller)
- : dock_container_(dock_container),
- in_layout_(false),
- dragged_window_(NULL),
- is_dragged_window_docked_(false),
- is_dragged_from_dock_(false),
- launcher_(NULL),
- workspace_controller_(workspace_controller),
- in_fullscreen_(workspace_controller_->GetWindowState() ==
- WORKSPACE_WINDOW_STATE_FULL_SCREEN),
- docked_width_(0),
- alignment_(DOCKED_ALIGNMENT_NONE),
- last_active_window_(NULL),
- last_action_time_(base::Time::Now()),
- background_widget_(new DockedBackgroundWidget(dock_container_)) {
- DCHECK(dock_container);
- aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())->
- AddObserver(this);
- Shell::GetInstance()->AddShellObserver(this);
-}
-
-DockedWindowLayoutManager::~DockedWindowLayoutManager() {
- Shutdown();
-}
-
-void DockedWindowLayoutManager::Shutdown() {
- if (launcher_ && launcher_->shelf_widget()) {
- ShelfLayoutManager* shelf_layout_manager = ShelfLayoutManager::ForLauncher(
- launcher_->shelf_widget()->GetNativeWindow());
- shelf_layout_manager->RemoveObserver(this);
- shelf_observer_.reset();
- }
- launcher_ = NULL;
- for (size_t i = 0; i < dock_container_->children().size(); ++i) {
- aura::Window* child = dock_container_->children()[i];
- child->RemoveObserver(this);
- wm::GetWindowState(child)->RemoveObserver(this);
- }
- aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())->
- RemoveObserver(this);
- Shell::GetInstance()->RemoveShellObserver(this);
-}
-
-void DockedWindowLayoutManager::AddObserver(
- DockedWindowLayoutManagerObserver* observer) {
- observer_list_.AddObserver(observer);
-}
-
-void DockedWindowLayoutManager::RemoveObserver(
- DockedWindowLayoutManagerObserver* observer) {
- observer_list_.RemoveObserver(observer);
-}
-
-void DockedWindowLayoutManager::StartDragging(aura::Window* window) {
- DCHECK(!dragged_window_);
- dragged_window_ = window;
- DCHECK(!IsPopupOrTransient(window));
- // Start observing a window unless it is docked container's child in which
- // case it is already observed.
- if (dragged_window_->parent() != dock_container_) {
- dragged_window_->AddObserver(this);
- wm::GetWindowState(dragged_window_)->AddObserver(this);
- }
- is_dragged_from_dock_ = window->parent() == dock_container_;
- DCHECK(!is_dragged_window_docked_);
-}
-
-void DockedWindowLayoutManager::DockDraggedWindow(aura::Window* window) {
- DCHECK(!IsPopupOrTransient(window));
- OnDraggedWindowDocked(window);
- Relayout();
-}
-
-void DockedWindowLayoutManager::UndockDraggedWindow() {
- DCHECK(!IsPopupOrTransient(dragged_window_));
- OnDraggedWindowUndocked();
- Relayout();
- UpdateDockBounds(DockedWindowLayoutManagerObserver::CHILD_CHANGED);
- is_dragged_from_dock_ = false;
-}
-
-void DockedWindowLayoutManager::FinishDragging(DockedAction action,
- DockedActionSource source) {
- DCHECK(dragged_window_);
- DCHECK(!IsPopupOrTransient(dragged_window_));
- if (is_dragged_window_docked_)
- OnDraggedWindowUndocked();
- DCHECK (!is_dragged_window_docked_);
- // Stop observing a window unless it is docked container's child in which
- // case it needs to keep being observed after the drag completes.
- if (dragged_window_->parent() != dock_container_) {
- dragged_window_->RemoveObserver(this);
- wm::GetWindowState(dragged_window_)->RemoveObserver(this);
- if (last_active_window_ == dragged_window_)
- last_active_window_ = NULL;
- } else {
- // A window is no longer dragged and is a child.
- // When a window becomes a child at drag start this is
- // the only opportunity we will have to enforce a window
- // count limit so do it here.
- MaybeMinimizeChildrenExcept(dragged_window_);
- }
- dragged_window_ = NULL;
- dragged_bounds_ = gfx::Rect();
- Relayout();
- UpdateDockBounds(DockedWindowLayoutManagerObserver::CHILD_CHANGED);
- RecordUmaAction(action, source);
-}
-
-void DockedWindowLayoutManager::SetLauncher(ash::Launcher* launcher) {
- DCHECK(!launcher_);
- launcher_ = launcher;
- if (launcher_->shelf_widget()) {
- ShelfLayoutManager* shelf_layout_manager = ShelfLayoutManager::ForLauncher(
- launcher_->shelf_widget()->GetNativeWindow());
- shelf_layout_manager->AddObserver(this);
- shelf_observer_.reset(new ShelfWindowObserver(this));
- }
-}
-
-DockedAlignment DockedWindowLayoutManager::GetAlignmentOfWindow(
- const aura::Window* window) const {
- const gfx::Rect& bounds(window->GetBoundsInScreen());
-
- // Test overlap with an existing docked area first.
- if (docked_bounds_.Intersects(bounds) &&
- alignment_ != DOCKED_ALIGNMENT_NONE) {
- // A window is being added to other docked windows (on the same side).
- return alignment_;
- }
-
- const gfx::Rect container_bounds = dock_container_->GetBoundsInScreen();
- if (bounds.x() <= container_bounds.x() &&
- bounds.right() > container_bounds.x()) {
- return DOCKED_ALIGNMENT_LEFT;
- } else if (bounds.x() < container_bounds.right() &&
- bounds.right() >= container_bounds.right()) {
- return DOCKED_ALIGNMENT_RIGHT;
- }
- return DOCKED_ALIGNMENT_NONE;
-}
-
-DockedAlignment DockedWindowLayoutManager::CalculateAlignment() const {
- // Find a child that is not being dragged and is not a popup.
- // If such exists the current alignment is returned - even if some of the
- // children are hidden or minimized (so they can be restored without losing
- // the docked state).
- for (size_t i = 0; i < dock_container_->children().size(); ++i) {
- aura::Window* window(dock_container_->children()[i]);
- if (window != dragged_window_ && !IsPopupOrTransient(window))
- return alignment_;
- }
- // No docked windows remain other than possibly the window being dragged.
- // Return |NONE| to indicate that windows may get docked on either side.
- return DOCKED_ALIGNMENT_NONE;
-}
-
-bool DockedWindowLayoutManager::CanDockWindow(aura::Window* window,
- SnapType edge) {
- if (!switches::UseDockedWindows())
- return false;
- // Don't allow interactive docking of windows with transient parents such as
- // modal browser dialogs.
- if (IsPopupOrTransient(window))
- return false;
- // If a window is wide and cannot be resized down to maximum width allowed
- // then it cannot be docked.
- // TODO(varkha). Prevent windows from changing size programmatically while
- // they are docked. The size will take effect only once a window is undocked.
- // See http://crbug.com/307792.
- if (window->bounds().width() > kMaxDockWidth &&
- (!wm::GetWindowState(window)->CanResize() ||
- (window->delegate() &&
- window->delegate()->GetMinimumSize().width() != 0 &&
- window->delegate()->GetMinimumSize().width() > kMaxDockWidth))) {
- return false;
- }
- // If a window is tall and cannot be resized down to maximum height allowed
- // then it cannot be docked.
- const gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(dock_container_).work_area();
- if (GetWindowHeightCloseTo(window, work_area.height() - 2 * kMinDockGap) >
- work_area.height() - 2 * kMinDockGap) {
- return false;
- }
- // Cannot dock on the other size from an existing dock.
- const DockedAlignment alignment = CalculateAlignment();
- if ((edge == SNAP_LEFT && alignment == DOCKED_ALIGNMENT_RIGHT) ||
- (edge == SNAP_RIGHT && alignment == DOCKED_ALIGNMENT_LEFT)) {
- return false;
- }
- // Do not allow docking on the same side as launcher shelf.
- ShelfAlignment shelf_alignment = SHELF_ALIGNMENT_BOTTOM;
- if (launcher_)
- shelf_alignment = launcher_->alignment();
- if ((edge == SNAP_LEFT && shelf_alignment == SHELF_ALIGNMENT_LEFT) ||
- (edge == SNAP_RIGHT && shelf_alignment == SHELF_ALIGNMENT_RIGHT)) {
- return false;
- }
- return true;
-}
-
-void DockedWindowLayoutManager::OnShelfBoundsChanged() {
- Relayout();
- UpdateDockBounds(DockedWindowLayoutManagerObserver::DISPLAY_INSETS_CHANGED);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// DockedWindowLayoutManager, aura::LayoutManager implementation:
-void DockedWindowLayoutManager::OnWindowResized() {
- MaybeMinimizeChildrenExcept(dragged_window_);
- Relayout();
- // When screen resizes update the insets even when dock width or alignment
- // does not change.
- UpdateDockBounds(DockedWindowLayoutManagerObserver::DISPLAY_RESIZED);
-}
-
-void DockedWindowLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
- if (IsPopupOrTransient(child))
- return;
- // Dragged windows are already observed by StartDragging and do not change
- // docked alignment during the drag.
- if (child == dragged_window_)
- return;
- // If this is the first window getting docked - update alignment.
- if (alignment_ == DOCKED_ALIGNMENT_NONE) {
- alignment_ = GetAlignmentOfWindow(child);
- DCHECK(alignment_ != DOCKED_ALIGNMENT_NONE);
- }
- MaybeMinimizeChildrenExcept(child);
- child->AddObserver(this);
- wm::GetWindowState(child)->AddObserver(this);
- Relayout();
- UpdateDockBounds(DockedWindowLayoutManagerObserver::CHILD_CHANGED);
-}
-
-void DockedWindowLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
- if (IsPopupOrTransient(child))
- return;
- // Dragged windows are stopped being observed by FinishDragging and do not
- // change alignment during the drag. They also cannot be set to be the
- // |last_active_window_|.
- if (child == dragged_window_)
- return;
- // If this is the last window, set alignment and maximize the workspace.
- if (!IsAnyWindowDocked()) {
- alignment_ = DOCKED_ALIGNMENT_NONE;
- UpdateDockedWidth(0);
- }
- if (last_active_window_ == child)
- last_active_window_ = NULL;
- child->RemoveObserver(this);
- wm::GetWindowState(child)->RemoveObserver(this);
- Relayout();
- UpdateDockBounds(DockedWindowLayoutManagerObserver::CHILD_CHANGED);
-}
-
-void DockedWindowLayoutManager::OnChildWindowVisibilityChanged(
- aura::Window* child,
- bool visible) {
- if (IsPopupOrTransient(child))
- return;
- if (visible)
- wm::GetWindowState(child)->Restore();
- Relayout();
- UpdateDockBounds(DockedWindowLayoutManagerObserver::CHILD_CHANGED);
-}
-
-void DockedWindowLayoutManager::SetChildBounds(
- aura::Window* child,
- const gfx::Rect& requested_bounds) {
- // Whenever one of our windows is moved or resized enforce layout.
- SetChildBoundsDirect(child, requested_bounds);
- if (IsPopupOrTransient(child))
- return;
- ShelfLayoutManager* shelf_layout = internal::ShelfLayoutManager::ForLauncher(
- dock_container_);
- if (shelf_layout)
- shelf_layout->UpdateVisibilityState();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// DockedWindowLayoutManager, ash::ShellObserver implementation:
-
-void DockedWindowLayoutManager::OnDisplayWorkAreaInsetsChanged() {
- Relayout();
- UpdateDockBounds(DockedWindowLayoutManagerObserver::DISPLAY_INSETS_CHANGED);
- MaybeMinimizeChildrenExcept(dragged_window_);
-}
-
-void DockedWindowLayoutManager::OnFullscreenStateChanged(
- bool is_fullscreen, aura::Window* root_window) {
- if (dock_container_->GetRootWindow() != root_window)
- return;
- // Entering fullscreen mode (including immersive) hides docked windows.
- in_fullscreen_ = workspace_controller_->GetWindowState() ==
- WORKSPACE_WINDOW_STATE_FULL_SCREEN;
- {
- // prevent Relayout from getting called multiple times during this
- base::AutoReset<bool> auto_reset_in_layout(&in_layout_, true);
- // Use a copy of children array because a call to MinimizeDockedWindow or
- // RestoreDockedWindow can change order.
- aura::Window::Windows children(dock_container_->children());
- for (aura::Window::Windows::const_iterator iter = children.begin();
- iter != children.end(); ++iter) {
- aura::Window* window(*iter);
- if (IsPopupOrTransient(window))
- continue;
- wm::WindowState* window_state = wm::GetWindowState(window);
- if (in_fullscreen_) {
- if (window->IsVisible())
- MinimizeDockedWindow(window_state);
- } else {
- if (!window_state->IsMinimized())
- RestoreDockedWindow(window_state);
- }
- }
- }
- Relayout();
- UpdateDockBounds(DockedWindowLayoutManagerObserver::CHILD_CHANGED);
-}
-
-void DockedWindowLayoutManager::OnShelfAlignmentChanged(
- aura::Window* root_window) {
- if (dock_container_->GetRootWindow() != root_window)
- return;
-
- if (!launcher_ || !launcher_->shelf_widget())
- return;
-
- if (alignment_ == DOCKED_ALIGNMENT_NONE)
- return;
-
- // Do not allow launcher and dock on the same side. Switch side that
- // the dock is attached to and move all dock windows to that new side.
- ShelfAlignment shelf_alignment = launcher_->shelf_widget()->GetAlignment();
- if (alignment_ == DOCKED_ALIGNMENT_LEFT &&
- shelf_alignment == SHELF_ALIGNMENT_LEFT) {
- alignment_ = DOCKED_ALIGNMENT_RIGHT;
- } else if (alignment_ == DOCKED_ALIGNMENT_RIGHT &&
- shelf_alignment == SHELF_ALIGNMENT_RIGHT) {
- alignment_ = DOCKED_ALIGNMENT_LEFT;
- }
- Relayout();
- UpdateDockBounds(DockedWindowLayoutManagerObserver::SHELF_ALIGNMENT_CHANGED);
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// DockedWindowLayoutManager, ShelfLayoutManagerObserver implementation:
-void DockedWindowLayoutManager::OnBackgroundUpdated(
- ShelfBackgroundType background_type,
- BackgroundAnimatorChangeType change_type) {
- background_widget_->SetPaintsBackground(background_type, change_type);
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// DockedWindowLayoutManager, WindowStateObserver implementation:
-
-void DockedWindowLayoutManager::OnWindowShowTypeChanged(
- wm::WindowState* window_state,
- wm::WindowShowType old_type) {
- aura::Window* window = window_state->window();
- if (IsPopupOrTransient(window))
- return;
- // The window property will still be set, but no actual change will occur
- // until OnFullscreenStateChange is called when exiting fullscreen.
- if (in_fullscreen_)
- return;
- if (window_state->IsMinimized()) {
- MinimizeDockedWindow(window_state);
- } else if (window_state->IsMaximizedOrFullscreen() ||
- window_state->IsSnapped()) {
- if (window != dragged_window_) {
- UndockWindow(window);
- RecordUmaAction(DOCKED_ACTION_MAXIMIZE, DOCKED_ACTION_SOURCE_UNKNOWN);
- }
- } else if (old_type == wm::SHOW_TYPE_MINIMIZED) {
- RestoreDockedWindow(window_state);
- }
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// DockedWindowLayoutManager, WindowObserver implementation:
-
-void DockedWindowLayoutManager::OnWindowBoundsChanged(
- aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) {
- // Only relayout if the dragged window would get docked.
- if (window == dragged_window_ && is_dragged_window_docked_)
- Relayout();
-}
-
-void DockedWindowLayoutManager::OnWindowVisibilityChanging(
- aura::Window* window, bool visible) {
- if (IsPopupOrTransient(window))
- return;
- int animation_type = views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_DEFAULT;
- if (visible) {
- animation_type = views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_DROP;
- views::corewm::SetWindowVisibilityAnimationDuration(
- window, base::TimeDelta::FromMilliseconds(kFadeDurationMs));
- } else if (wm::GetWindowState(window)->IsMinimized()) {
- animation_type = WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE;
- }
- views::corewm::SetWindowVisibilityAnimationType(window, animation_type);
-}
-
-void DockedWindowLayoutManager::OnWindowDestroying(aura::Window* window) {
- if (dragged_window_ == window) {
- FinishDragging(DOCKED_ACTION_NONE, DOCKED_ACTION_SOURCE_UNKNOWN);
- DCHECK(!dragged_window_);
- DCHECK (!is_dragged_window_docked_);
- }
- if (window == last_active_window_)
- last_active_window_ = NULL;
- RecordUmaAction(DOCKED_ACTION_CLOSE, DOCKED_ACTION_SOURCE_UNKNOWN);
-}
-
-
-////////////////////////////////////////////////////////////////////////////////
-// DockedWindowLayoutManager, aura::client::ActivationChangeObserver
-// implementation:
-
-void DockedWindowLayoutManager::OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) {
- if (gained_active && IsPopupOrTransient(gained_active))
- return;
- // Ignore if the window that is not managed by this was activated.
- aura::Window* ancestor = NULL;
- for (aura::Window* parent = gained_active;
- parent; parent = parent->parent()) {
- if (parent->parent() == dock_container_) {
- ancestor = parent;
- break;
- }
- }
- if (ancestor)
- UpdateStacking(ancestor);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// DockedWindowLayoutManager private implementation:
-
-void DockedWindowLayoutManager::MaybeMinimizeChildrenExcept(
- aura::Window* child) {
- // Minimize any windows that don't fit without overlap.
- const gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(dock_container_).work_area();
- int available_room = work_area.height() - kMinDockGap;
- if (child)
- available_room -= (GetWindowHeightCloseTo(child, 0) + kMinDockGap);
- // Use a copy of children array because a call to Minimize can change order.
- aura::Window::Windows children(dock_container_->children());
- aura::Window::Windows::const_reverse_iterator iter = children.rbegin();
- while (iter != children.rend()) {
- aura::Window* window(*iter++);
- if (window == child || !IsUsedByLayout(window))
- continue;
- int room_needed = GetWindowHeightCloseTo(window, 0) + kMinDockGap;
- if (available_room > room_needed) {
- available_room -= room_needed;
- } else {
- // Slow down minimizing animations. Lock duration so that it is not
- // overridden by other ScopedLayerAnimationSettings down the stack.
- ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator());
- settings.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kMinimizeDurationMs));
- settings.LockTransitionDuration();
- wm::GetWindowState(window)->Minimize();
- }
- }
-}
-
-void DockedWindowLayoutManager::MinimizeDockedWindow(
- wm::WindowState* window_state) {
- DCHECK(!IsPopupOrTransient(window_state->window()));
- window_state->window()->Hide();
- if (window_state->IsActive())
- window_state->Deactivate();
- RecordUmaAction(DOCKED_ACTION_MINIMIZE, DOCKED_ACTION_SOURCE_UNKNOWN);
-}
-
-void DockedWindowLayoutManager::RestoreDockedWindow(
- wm::WindowState* window_state) {
- aura::Window* window = window_state->window();
- DCHECK(!IsPopupOrTransient(window));
- // Always place restored window at the bottom shuffling the other windows up.
- // TODO(varkha): add a separate container for docked windows to keep track
- // of ordering.
- gfx::Display display = Shell::GetScreen()->GetDisplayNearestWindow(
- dock_container_);
- const gfx::Rect work_area = display.work_area();
-
- // Evict the window if it can no longer be docked because of its height.
- if (!CanDockWindow(window, SNAP_NONE)) {
- UndockWindow(window);
- RecordUmaAction(DOCKED_ACTION_EVICT, DOCKED_ACTION_SOURCE_UNKNOWN);
- return;
- }
- gfx::Rect bounds(window->bounds());
- bounds.set_y(work_area.bottom());
- window->SetBounds(bounds);
- window->Show();
- MaybeMinimizeChildrenExcept(window);
- RecordUmaAction(DOCKED_ACTION_RESTORE, DOCKED_ACTION_SOURCE_UNKNOWN);
-}
-
-void DockedWindowLayoutManager::RecordUmaAction(DockedAction action,
- DockedActionSource source) {
- if (action == DOCKED_ACTION_NONE)
- return;
- UMA_HISTOGRAM_ENUMERATION("Ash.Dock.Action", action, DOCKED_ACTION_COUNT);
- UMA_HISTOGRAM_ENUMERATION("Ash.Dock.ActionSource", source,
- DOCKED_ACTION_SOURCE_COUNT);
- base::Time time_now = base::Time::Now();
- base::TimeDelta time_between_use = time_now - last_action_time_;
- UMA_HISTOGRAM_CUSTOM_COUNTS("Ash.Dock.TimeBetweenUse",
- time_between_use.InSeconds(),
- 1,
- base::TimeDelta::FromHours(10).InSeconds(),
- 100);
- last_action_time_ = time_now;
- int docked_all_count = 0;
- int docked_visible_count = 0;
- int docked_panels_count = 0;
- int large_windows_count = 0;
- for (size_t i = 0; i < dock_container_->children().size(); ++i) {
- const aura::Window* window(dock_container_->children()[i]);
- if (IsPopupOrTransient(window))
- continue;
- docked_all_count++;
- if (!IsUsedByLayout(window))
- continue;
- docked_visible_count++;
- if (window->type() == aura::client::WINDOW_TYPE_PANEL)
- docked_panels_count++;
- const wm::WindowState* window_state = wm::GetWindowState(window);
- if (window_state->HasRestoreBounds()) {
- const gfx::Rect restore_bounds = window_state->GetRestoreBoundsInScreen();
- if (restore_bounds.width() > kMaxDockWidth)
- large_windows_count++;
- }
- }
- UMA_HISTOGRAM_COUNTS_100("Ash.Dock.ItemsAll", docked_all_count);
- UMA_HISTOGRAM_COUNTS_100("Ash.Dock.ItemsLarge", large_windows_count);
- UMA_HISTOGRAM_COUNTS_100("Ash.Dock.ItemsPanels", docked_panels_count);
- UMA_HISTOGRAM_COUNTS_100("Ash.Dock.ItemsVisible", docked_visible_count);
-}
-
-void DockedWindowLayoutManager::UpdateDockedWidth(int width) {
- if (docked_width_ == width)
- return;
- docked_width_ = width;
- UMA_HISTOGRAM_COUNTS_10000("Ash.Dock.Width", docked_width_);
-}
-
-void DockedWindowLayoutManager::OnDraggedWindowDocked(aura::Window* window) {
- DCHECK(!is_dragged_window_docked_);
- is_dragged_window_docked_ = true;
-
- // If there are no other docked windows update alignment.
- if (!IsAnyWindowDocked())
- alignment_ = DOCKED_ALIGNMENT_NONE;
-}
-
-void DockedWindowLayoutManager::OnDraggedWindowUndocked() {
- // If this is the first window getting docked - update alignment.
- if (!IsAnyWindowDocked())
- alignment_ = GetAlignmentOfWindow(dragged_window_);
-
- DCHECK (is_dragged_window_docked_);
- is_dragged_window_docked_ = false;
-}
-
-bool DockedWindowLayoutManager::IsAnyWindowDocked() {
- return CalculateAlignment() != DOCKED_ALIGNMENT_NONE;
-}
-
-void DockedWindowLayoutManager::Relayout() {
- if (in_layout_)
- return;
- if (alignment_ == DOCKED_ALIGNMENT_NONE && !is_dragged_window_docked_)
- return;
- base::AutoReset<bool> auto_reset_in_layout(&in_layout_, true);
-
- gfx::Rect dock_bounds = dock_container_->GetBoundsInScreen();
- aura::Window* active_window = NULL;
- std::vector<WindowWithHeight> visible_windows;
- for (size_t i = 0; i < dock_container_->children().size(); ++i) {
- aura::Window* window(dock_container_->children()[i]);
-
- if (!IsUsedByLayout(window) || window == dragged_window_)
- continue;
-
- // If the shelf is currently hidden (full-screen mode), hide window until
- // full-screen mode is exited.
- if (in_fullscreen_) {
- // The call to Hide does not set the minimize property, so the window will
- // be restored when the shelf becomes visible again.
- window->Hide();
- continue;
- }
- if (window->HasFocus() ||
- window->Contains(
- aura::client::GetFocusClient(window)->GetFocusedWindow())) {
- DCHECK(!active_window);
- active_window = window;
- }
- visible_windows.push_back(WindowWithHeight(window));
- }
- // Consider docked dragged_window_ when fanning out other child windows.
- if (is_dragged_window_docked_) {
- visible_windows.push_back(WindowWithHeight(dragged_window_));
- DCHECK(!active_window);
- active_window = dragged_window_;
- }
-
- // Position docked windows as well as the window being dragged.
- gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(dock_container_).work_area();
- if (shelf_observer_)
- work_area.Subtract(shelf_observer_->shelf_bounds_in_screen());
- int available_room = CalculateWindowHeightsAndRemainingRoom(work_area,
- &visible_windows);
- FanOutChildren(work_area,
- CalculateIdealWidth(visible_windows),
- available_room,
- &visible_windows);
-
- // After the first Relayout allow the windows to change their order easier
- // since we know they are docked.
- is_dragged_from_dock_ = true;
- UpdateStacking(active_window);
-}
-
-int DockedWindowLayoutManager::CalculateWindowHeightsAndRemainingRoom(
- const gfx::Rect work_area,
- std::vector<WindowWithHeight>* visible_windows) {
- int available_room = work_area.height() - kMinDockGap;
- int remaining_windows = visible_windows->size();
-
- // Sort windows by their minimum heights and calculate target heights.
- std::sort(visible_windows->begin(), visible_windows->end(),
- CompareMinimumHeight());
- // Distribute the free space among the docked windows. Since the windows are
- // sorted (tall windows first) we can now assume that any window which
- // required more space than the current window will have already been
- // accounted for previously in this loop, so we can safely give that window
- // its proportional share of the remaining space.
- for (std::vector<WindowWithHeight>::reverse_iterator iter =
- visible_windows->rbegin();
- iter != visible_windows->rend(); ++iter) {
- iter->height_ = GetWindowHeightCloseTo(
- iter->window(), available_room / remaining_windows - kMinDockGap);
- available_room -= (iter->height_ + kMinDockGap);
- remaining_windows--;
- }
- return available_room;
-}
-
-int DockedWindowLayoutManager::CalculateIdealWidth(
- const std::vector<WindowWithHeight>& visible_windows) {
- int smallest_max_width = kMaxDockWidth;
- int largest_min_width = kMinDockWidth;
- // Ideal width of the docked area is as close to kIdealWidth as possible
- // while still respecting the minimum and maximum width restrictions on the
- // individual docked windows as well as the width that was possibly set by a
- // user (which needs to be preserved when dragging and rearranging windows).
- for (std::vector<WindowWithHeight>::const_iterator iter =
- visible_windows.begin();
- iter != visible_windows.end(); ++iter) {
- const aura::Window* window = iter->window();
- int min_window_width = window->bounds().width();
- int max_window_width = min_window_width;
- if (!wm::GetWindowState(window)->bounds_changed_by_user()) {
- min_window_width = GetWindowWidthCloseTo(window, kMinDockWidth);
- max_window_width = GetWindowWidthCloseTo(window, kMaxDockWidth);
- }
- largest_min_width = std::max(largest_min_width, min_window_width);
- smallest_max_width = std::min(smallest_max_width, max_window_width);
- }
- int ideal_width = std::max(largest_min_width,
- std::min(smallest_max_width, kIdealWidth));
- // Restrict docked area width regardless of window restrictions.
- ideal_width = std::max(std::min(ideal_width, kMaxDockWidth), kMinDockWidth);
- return ideal_width;
-}
-
-void DockedWindowLayoutManager::FanOutChildren(
- const gfx::Rect& work_area,
- int ideal_docked_width,
- int available_room,
- std::vector<WindowWithHeight>* visible_windows) {
- gfx::Rect dock_bounds = dock_container_->GetBoundsInScreen();
-
- // Calculate initial vertical offset and the gap or overlap between windows.
- const int num_windows = visible_windows->size();
- const float delta = kMinDockGap + (float)available_room /
- ((available_room > 0 || num_windows <= 1) ?
- num_windows + 1 : num_windows - 1);
- float y_pos = work_area.y() + ((delta > 0) ? delta : kMinDockGap);
-
- // Docked area is shown only if there is at least one non-dragged visible
- // docked window.
- int new_width = ideal_docked_width;
- if (visible_windows->empty() ||
- (visible_windows->size() == 1 &&
- (*visible_windows)[0].window() == dragged_window_)) {
- new_width = 0;
- }
- UpdateDockedWidth(new_width);
- // Sort windows by their center positions and fan out overlapping
- // windows.
- std::sort(visible_windows->begin(), visible_windows->end(),
- CompareWindowPos(is_dragged_from_dock_ ? dragged_window_ : NULL,
- delta));
- for (std::vector<WindowWithHeight>::iterator iter = visible_windows->begin();
- iter != visible_windows->end(); ++iter) {
- aura::Window* window = iter->window();
- gfx::Rect bounds = ScreenAsh::ConvertRectToScreen(
- window->parent(), window->GetTargetBounds());
- // A window is extended or shrunk to be as close as possible to the ideal
- // docked area width. Windows that were resized by a user are kept at their
- // existing size.
- // This also enforces the min / max restrictions on the docked area width.
- bounds.set_width(GetWindowWidthCloseTo(
- window,
- wm::GetWindowState(window)->bounds_changed_by_user() ?
- bounds.width() : ideal_docked_width));
- DCHECK_LE(bounds.width(), ideal_docked_width);
-
- DockedAlignment alignment = alignment_;
- if (alignment == DOCKED_ALIGNMENT_NONE && window == dragged_window_) {
- alignment = GetAlignmentOfWindow(window);
- if (alignment == DOCKED_ALIGNMENT_NONE)
- bounds.set_size(gfx::Size());
- }
-
- // Fan out windows evenly distributing the overlap or remaining free space.
- bounds.set_height(iter->height_);
- bounds.set_y(std::max(work_area.y(),
- std::min(work_area.bottom() - bounds.height(),
- static_cast<int>(y_pos + 0.5))));
- y_pos += bounds.height() + delta;
-
- // All docked windows other than the one currently dragged remain stuck
- // to the screen edge (flush with the edge or centered in the dock area).
- switch (alignment) {
- case DOCKED_ALIGNMENT_LEFT:
- bounds.set_x(dock_bounds.x() +
- (ideal_docked_width - bounds.width()) / 2);
- break;
- case DOCKED_ALIGNMENT_RIGHT:
- bounds.set_x(dock_bounds.right() -
- (ideal_docked_width + bounds.width()) / 2);
- break;
- case DOCKED_ALIGNMENT_NONE:
- break;
- }
- if (window == dragged_window_) {
- dragged_bounds_ = bounds;
- continue;
- }
- // If the following asserts it is probably because not all the children
- // have been removed when dock was closed.
- DCHECK_NE(alignment_, DOCKED_ALIGNMENT_NONE);
- bounds = ScreenAsh::ConvertRectFromScreen(dock_container_, bounds);
- if (bounds != window->GetTargetBounds()) {
- ui::Layer* layer = window->layer();
- ui::ScopedLayerAnimationSettings slide_settings(layer->GetAnimator());
- slide_settings.SetPreemptionStrategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- slide_settings.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kSlideDurationMs));
- SetChildBoundsDirect(window, bounds);
- }
- }
-}
-
-void DockedWindowLayoutManager::UpdateDockBounds(
- DockedWindowLayoutManagerObserver::Reason reason) {
- int dock_inset = docked_width_ + (docked_width_ > 0 ? kMinDockGap : 0);
- const gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(dock_container_).work_area();
- gfx::Rect bounds = gfx::Rect(
- alignment_ == DOCKED_ALIGNMENT_RIGHT && dock_inset > 0 ?
- dock_container_->bounds().right() - dock_inset:
- dock_container_->bounds().x(),
- dock_container_->bounds().y(),
- dock_inset,
- work_area.height());
- docked_bounds_ = bounds +
- dock_container_->GetBoundsInScreen().OffsetFromOrigin();
- FOR_EACH_OBSERVER(
- DockedWindowLayoutManagerObserver,
- observer_list_,
- OnDockBoundsChanging(bounds, reason));
- // Show or hide background for docked area.
- gfx::Rect background_bounds(docked_bounds_);
- if (shelf_observer_)
- background_bounds.Subtract(shelf_observer_->shelf_bounds_in_screen());
- background_widget_->SetBackgroundBounds(background_bounds, alignment_);
- if (docked_width_ > 0)
- background_widget_->Show();
- else
- background_widget_->Hide();
-}
-
-void DockedWindowLayoutManager::UpdateStacking(aura::Window* active_window) {
- if (!active_window) {
- if (!last_active_window_)
- return;
- active_window = last_active_window_;
- }
-
- // Windows are stacked like a deck of cards:
- // ,------.
- // |,------.|
- // |,------.|
- // | active |
- // | window |
- // |`------'|
- // |`------'|
- // `------'
- // Use the middle of each window to figure out how to stack the window.
- // This allows us to update the stacking when a window is being dragged around
- // by the titlebar.
- std::map<int, aura::Window*> window_ordering;
- for (aura::Window::Windows::const_iterator it =
- dock_container_->children().begin();
- it != dock_container_->children().end(); ++it) {
- if (!IsUsedByLayout(*it) ||
- ((*it) == dragged_window_ && !is_dragged_window_docked_)) {
- continue;
- }
- gfx::Rect bounds = (*it)->bounds();
- window_ordering.insert(std::make_pair(bounds.y() + bounds.height() / 2,
- *it));
- }
- int active_center_y = active_window->bounds().CenterPoint().y();
-
- aura::Window* previous_window = NULL;
- for (std::map<int, aura::Window*>::const_iterator it =
- window_ordering.begin();
- it != window_ordering.end() && it->first < active_center_y; ++it) {
- if (previous_window)
- dock_container_->StackChildAbove(it->second, previous_window);
- previous_window = it->second;
- }
- for (std::map<int, aura::Window*>::const_reverse_iterator it =
- window_ordering.rbegin();
- it != window_ordering.rend() && it->first > active_center_y; ++it) {
- if (previous_window)
- dock_container_->StackChildAbove(it->second, previous_window);
- previous_window = it->second;
- }
-
- if (previous_window && active_window->parent() == dock_container_)
- dock_container_->StackChildAbove(active_window, previous_window);
- if (active_window != dragged_window_)
- last_active_window_ = active_window;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// keyboard::KeyboardControllerObserver implementation:
-
-void DockedWindowLayoutManager::OnKeyboardBoundsChanging(
- const gfx::Rect& keyboard_bounds) {
- // This bounds change will have caused a change to the Shelf which does not
- // propagate automatically to this class, so manually recalculate bounds.
- Relayout();
- UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/dock/docked_window_layout_manager.h b/chromium/ash/wm/dock/docked_window_layout_manager.h
deleted file mode 100644
index 8894bed42fa..00000000000
--- a/chromium/ash/wm/dock/docked_window_layout_manager.h
+++ /dev/null
@@ -1,309 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_
-#define ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_
-
-#include "ash/ash_export.h"
-#include "ash/shelf/shelf_layout_manager_observer.h"
-#include "ash/shell_observer.h"
-#include "ash/wm/dock/dock_types.h"
-#include "ash/wm/dock/docked_window_layout_manager_observer.h"
-#include "ash/wm/window_state_observer.h"
-#include "ash/wm/workspace/snap_types.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/gtest_prod_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/observer_list.h"
-#include "base/time/time.h"
-#include "ui/aura/client/activation_change_observer.h"
-#include "ui/aura/layout_manager.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_observer.h"
-#include "ui/gfx/rect.h"
-#include "ui/keyboard/keyboard_controller_observer.h"
-
-namespace aura {
-class Window;
-}
-
-namespace gfx {
-class Point;
-}
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-class Launcher;
-
-namespace internal {
-class DockedBackgroundWidget;
-class DockedWindowLayoutManagerObserver;
-class DockedWindowResizerTest;
-class ShelfLayoutManager;
-class WorkspaceController;
-
-struct WindowWithHeight {
- explicit WindowWithHeight(aura::Window* window) :
- window_(window),
- height_(window->bounds().height()) { }
- aura::Window* window() { return window_; }
- const aura::Window* window() const { return window_; }
- aura::Window* window_;
- int height_;
-};
-
-// DockedWindowLayoutManager is responsible for organizing windows when they are
-// docked to the side of a screen. It is associated with a specific container
-// window (i.e. kShellWindowId_DockContainer) and controls the layout of any
-// windows added to that container.
-//
-// The constructor takes a |dock_container| argument which is expected to set
-// its layout manager to this instance, e.g.:
-// dock_container->SetLayoutManager(
-// new DockedWindowLayoutManager(dock_container));
-//
-// TODO(varkha): extend BaseLayoutManager instead of LayoutManager to inherit
-// common functionality.
-class ASH_EXPORT DockedWindowLayoutManager
- : public aura::LayoutManager,
- public ash::ShellObserver,
- public aura::WindowObserver,
- public aura::client::ActivationChangeObserver,
- public keyboard::KeyboardControllerObserver,
- public ShelfLayoutManagerObserver,
- public wm::WindowStateObserver {
- public:
- // Maximum width of the docked windows area.
- static const int kMaxDockWidth;
-
- // Minimum width of the docked windows area.
- static const int kMinDockWidth;
-
- DockedWindowLayoutManager(aura::Window* dock_container,
- WorkspaceController* workspace_controller);
- virtual ~DockedWindowLayoutManager();
-
- // Disconnects observers before container windows get destroyed.
- void Shutdown();
-
- // Management of the observer list.
- virtual void AddObserver(DockedWindowLayoutManagerObserver* observer);
- virtual void RemoveObserver(DockedWindowLayoutManagerObserver* observer);
-
- // Called by a DockedWindowResizer to update which window is being dragged.
- // Starts observing the window unless it is a child.
- void StartDragging(aura::Window* window);
-
- // Called by a DockedWindowResizer when a dragged window is docked.
- void DockDraggedWindow(aura::Window* window);
-
- // Called by a DockedWindowResizer when a dragged window is no longer docked.
- void UndockDraggedWindow();
-
- // Called by a DockedWindowResizer when a window is no longer being dragged.
- // Stops observing the window unless it is a child.
- // Records |action| by |source| in UMA.
- void FinishDragging(DockedAction action, DockedActionSource source);
-
- ash::Launcher* launcher() { return launcher_; }
- void SetLauncher(ash::Launcher* launcher);
-
- // Calculates if a window is touching the screen edges and returns edge.
- DockedAlignment GetAlignmentOfWindow(const aura::Window* window) const;
-
- // Used to snap docked windows to the side of screen during drag.
- DockedAlignment CalculateAlignment() const;
-
- // Returns true when a window can be docked. Windows cannot be docked at the
- // edge used by the launcher shelf or the edge opposite from existing dock.
- bool CanDockWindow(aura::Window* window, SnapType edge);
-
- aura::Window* dock_container() const { return dock_container_; }
-
- // Returns current bounding rectangle of docked windows area.
- const gfx::Rect& docked_bounds() const { return docked_bounds_; }
-
- // Returns last known coordinates of |dragged_window_| after Relayout.
- const gfx::Rect dragged_bounds() const { return dragged_bounds_;}
-
- // Returns true if currently dragged window is docked at the screen edge.
- bool is_dragged_window_docked() const { return is_dragged_window_docked_; }
-
- // Updates docked layout when launcher shelf bounds change.
- void OnShelfBoundsChanged();
-
- // aura::LayoutManager:
- virtual void OnWindowResized() OVERRIDE;
- virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE;
- virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE {}
- virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE;
- virtual void OnChildWindowVisibilityChanged(aura::Window* child,
- bool visibile) OVERRIDE;
- virtual void SetChildBounds(aura::Window* child,
- const gfx::Rect& requested_bounds) OVERRIDE;
-
- // ash::ShellObserver:
- virtual void OnDisplayWorkAreaInsetsChanged() OVERRIDE;
- virtual void OnFullscreenStateChanged(bool is_fullscreen,
- aura::Window* root_window) OVERRIDE;
- virtual void OnShelfAlignmentChanged(aura::Window* root_window) OVERRIDE;
-
- // ShelfLayoutManagerObserver:
- virtual void OnBackgroundUpdated(
- ShelfBackgroundType background_type,
- BackgroundAnimatorChangeType change_type) OVERRIDE;
-
- // wm::WindowStateObserver:
- virtual void OnWindowShowTypeChanged(wm::WindowState* window_state,
- wm::WindowShowType old_type) OVERRIDE;
-
- // aura::WindowObserver:
- virtual void OnWindowBoundsChanged(aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
- virtual void OnWindowVisibilityChanging(aura::Window* window,
- bool visible) OVERRIDE;
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
-
- // aura::client::ActivationChangeObserver:
- virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) OVERRIDE;
-
- private:
- class ShelfWindowObserver;
- friend class DockedWindowLayoutManagerTest;
- friend class DockedWindowResizerTest;
-
- // Width of the gap between the docked windows and a workspace.
- static const int kMinDockGap;
-
- // Ideal (starting) width of the dock.
- static const int kIdealWidth;
-
- // Keep at most kMaxVisibleWindows visible in the dock and minimize the rest
- // (except for |child|).
- void MaybeMinimizeChildrenExcept(aura::Window* child);
-
- // Minimize / restore window and relayout.
- void MinimizeDockedWindow(wm::WindowState* window_state);
- void RestoreDockedWindow(wm::WindowState* window_state);
-
- // Record user-initiated |action| by |source| in UMA metrics.
- void RecordUmaAction(DockedAction action, DockedActionSource source);
-
- // Updates |docked_width_| and UMA histograms.
- void UpdateDockedWidth(int width);
-
- // Updates docked layout state when a window gets inside the dock.
- void OnDraggedWindowDocked(aura::Window* window);
-
- // Updates docked layout state when a window gets outside the dock.
- void OnDraggedWindowUndocked();
-
- // Returns true if there are any windows currently docked.
- bool IsAnyWindowDocked();
-
- // Called whenever the window layout might change.
- void Relayout();
-
- // Calculates target heights (and fills it in |visible_windows| array) such
- // that the vertical space is fairly distributed among the windows taking
- // into account their minimum and maximum size. Returns free vertical space
- // (positive value) that remains after resizing all windows or deficit
- // (negative value) if not all the windows fit.
- int CalculateWindowHeightsAndRemainingRoom(
- const gfx::Rect work_area,
- std::vector<WindowWithHeight>* visible_windows);
-
- // Calculate ideal width for the docked area. It will get used to adjust the
- // dragged window or other windows as necessary.
- int CalculateIdealWidth(const std::vector<WindowWithHeight>& visible_windows);
-
- // Fan out windows evenly distributing the overlap or remaining free space.
- // Adjust the widths of the windows trying to make them all same. If this
- // is not possible, center the windows in the docked area.
- void FanOutChildren(const gfx::Rect& work_area,
- int ideal_docked_width,
- int available_room,
- std::vector<WindowWithHeight>* visible_windows);
-
- // Updates |docked_bounds_| and workspace insets when bounds of docked windows
- // area change. Passing |reason| to observers allows selectively skipping
- // notifications.
- void UpdateDockBounds(DockedWindowLayoutManagerObserver::Reason reason);
-
- // Called whenever the window stacking order needs to be updated (e.g. focus
- // changes or a window is moved).
- void UpdateStacking(aura::Window* active_window);
-
- // keyboard::KeyboardControllerObserver:
- virtual void OnKeyboardBoundsChanging(
- const gfx::Rect& keyboard_bounds) OVERRIDE;
-
- // Parent window associated with this layout manager.
- aura::Window* dock_container_;
- // Protect against recursive calls to Relayout().
- bool in_layout_;
-
- // A window that is being dragged (whether docked or not).
- // Windows are tracked by docked layout manager only if they are docked;
- // however we need to know if a window is being dragged in order to avoid
- // positioning it or even considering it for layout.
- aura::Window* dragged_window_;
-
- // True if the window being dragged is currently docked.
- bool is_dragged_window_docked_;
-
- // Previously docked windows use a more relaxed dragging sorting algorithm
- // that uses assumption that a window starts being dragged out of position
- // that was previously established in Relayout. This allows easier reordering.
- bool is_dragged_from_dock_;
-
- // The launcher to respond to launcher alignment changes.
- Launcher* launcher_;
-
- // Workspace controller that can be checked for fullscreen mode.
- WorkspaceController* workspace_controller_;
- // Tracks if any window in the same root window is in fullscreen mode.
- bool in_fullscreen_;
- // Current width of the dock.
- int docked_width_;
-
- // Last bounds that were sent to observers.
- gfx::Rect docked_bounds_;
-
- // Target bounds of a docked window being dragged.
- gfx::Rect dragged_bounds_;
-
- // Side of the screen that the dock is positioned at.
- DockedAlignment alignment_;
-
- // The last active window. Used to maintain stacking order even if no windows
- // are currently focused.
- aura::Window* last_active_window_;
-
- // Timestamp of the last user-initiated action that changed docked state.
- // Used in UMA metrics.
- base::Time last_action_time_;
-
- // Observes launcher shelf for bounds changes.
- scoped_ptr<ShelfWindowObserver> shelf_observer_;
-
- // Widget used to paint a background for the docked area.
- scoped_ptr<DockedBackgroundWidget> background_widget_;
-
- // Observers of dock bounds changes.
- ObserverList<DockedWindowLayoutManagerObserver> observer_list_;
-
- DISALLOW_COPY_AND_ASSIGN(DockedWindowLayoutManager);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_
diff --git a/chromium/ash/wm/dock/docked_window_layout_manager_observer.h b/chromium/ash/wm/dock/docked_window_layout_manager_observer.h
deleted file mode 100644
index f5297533c9f..00000000000
--- a/chromium/ash/wm/dock/docked_window_layout_manager_observer.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_OBSERVER_H_
-#define UI_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_OBSERVER_H_
-
-#include "ash/ash_export.h"
-
-namespace gfx {
-class Rect;
-}
-
-namespace ash {
-namespace internal {
-
-// Observers to the DockedWindowLayoutManager are notified of significant
-// events that occur with the docked windows, such as the bounds change.
-class ASH_EXPORT DockedWindowLayoutManagerObserver {
- public:
- // Reason for notification. Allows selectively ignoring notifications to
- // prevent a notification loop.
- enum Reason {
- CHILD_CHANGED,
- DISPLAY_RESIZED,
- DISPLAY_INSETS_CHANGED,
- SHELF_ALIGNMENT_CHANGED,
- KEYBOARD_BOUNDS_CHANGING
- };
- // Called after the dock bounds are changed.
- virtual void OnDockBoundsChanging(const gfx::Rect& new_bounds,
- Reason reason) = 0;
-
- protected:
- virtual ~DockedWindowLayoutManagerObserver() {}
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // UI_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_OBSERVER_H_
diff --git a/chromium/ash/wm/dock/docked_window_layout_manager_unittest.cc b/chromium/ash/wm/dock/docked_window_layout_manager_unittest.cc
deleted file mode 100644
index 54e642a3086..00000000000
--- a/chromium/ash/wm/dock/docked_window_layout_manager_unittest.cc
+++ /dev/null
@@ -1,819 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/dock/docked_window_layout_manager.h"
-
-#include "ash/ash_switches.h"
-#include "ash/launcher/launcher.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_model.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/launcher_test_api.h"
-#include "ash/test/shelf_view_test_api.h"
-#include "ash/test/shell_test_api.h"
-#include "ash/test/test_shelf_delegate.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ash/wm/panels/panel_layout_manager.h"
-#include "ash/wm/window_resizer.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "base/basictypes.h"
-#include "base/command_line.h"
-#include "base/strings/string_number_conversions.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/aura/window.h"
-#include "ui/base/hit_test.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-class DockedWindowLayoutManagerTest
- : public test::AshTestBase,
- public testing::WithParamInterface<aura::client::WindowType> {
- public:
- DockedWindowLayoutManagerTest() : window_type_(GetParam()) {}
- virtual ~DockedWindowLayoutManagerTest() {}
-
- virtual void SetUp() OVERRIDE {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshEnableDockedWindows);
- AshTestBase::SetUp();
- UpdateDisplay("600x600");
- ASSERT_TRUE(test::TestShelfDelegate::instance());
-
- shelf_view_test_.reset(new test::ShelfViewTestAPI(
- test::LauncherTestAPI(Launcher::ForPrimaryDisplay()).shelf_view()));
- shelf_view_test_->SetAnimationDuration(1);
- }
-
- protected:
- enum DockedEdge {
- DOCKED_EDGE_NONE,
- DOCKED_EDGE_LEFT,
- DOCKED_EDGE_RIGHT,
- };
-
- int min_dock_gap() const { return DockedWindowLayoutManager::kMinDockGap; }
- int ideal_width() const { return DockedWindowLayoutManager::kIdealWidth; }
- int docked_width(const DockedWindowLayoutManager* layout_manager) const {
- return layout_manager->docked_width_;
- }
-
- aura::Window* CreateTestWindow(const gfx::Rect& bounds) {
- aura::Window* window = CreateTestWindowInShellWithDelegateAndType(
- NULL, window_type_, 0, bounds);
- if (window_type_ == aura::client::WINDOW_TYPE_PANEL) {
- test::TestShelfDelegate* shelf_delegate =
- test::TestShelfDelegate::instance();
- shelf_delegate->AddLauncherItem(window);
- PanelLayoutManager* manager =
- static_cast<PanelLayoutManager*>(GetPanelContainer(window)->
- layout_manager());
- manager->Relayout();
- }
- return window;
- }
-
- aura::Window* CreateTestWindowWithDelegate(
- const gfx::Rect& bounds,
- aura::test::TestWindowDelegate* delegate) {
- aura::Window* window = CreateTestWindowInShellWithDelegateAndType(
- delegate, window_type_, 0, bounds);
- if (window_type_ == aura::client::WINDOW_TYPE_PANEL) {
- test::TestShelfDelegate* shelf_delegate =
- test::TestShelfDelegate::instance();
- shelf_delegate->AddLauncherItem(window);
- PanelLayoutManager* manager =
- static_cast<PanelLayoutManager*>(GetPanelContainer(window)->
- layout_manager());
- manager->Relayout();
- }
- return window;
- }
-
- aura::Window* GetPanelContainer(aura::Window* panel) {
- return Shell::GetContainer(panel->GetRootWindow(),
- internal::kShellWindowId_PanelContainer);
- }
-
- static WindowResizer* CreateSomeWindowResizer(
- aura::Window* window,
- const gfx::Point& point_in_parent,
- int window_component) {
- return CreateWindowResizer(
- window,
- point_in_parent,
- window_component,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE).release();
- }
-
- void DragStart(aura::Window* window) {
- DragStartAtOffsetFromwindowOrigin(window, 0, 0);
- }
-
- void DragStartAtOffsetFromwindowOrigin(aura::Window* window,
- int dx, int dy) {
- initial_location_in_parent_ =
- window->bounds().origin() + gfx::Vector2d(dx, dy);
- resizer_.reset(CreateSomeWindowResizer(window,
- initial_location_in_parent_,
- HTCAPTION));
- ASSERT_TRUE(resizer_.get());
- }
-
- void DragMove(int dx, int dy) {
- resizer_->Drag(initial_location_in_parent_ + gfx::Vector2d(dx, dy), 0);
- }
-
- void DragEnd() {
- resizer_->CompleteDrag(0);
- resizer_.reset();
- }
-
- void DragRevert() {
- resizer_->RevertDrag();
- resizer_.reset();
- }
-
- // Panels are parented by panel container during drags.
- // Docked windows are parented by dock container during drags.
- // All other windows that we are testing here have default container as a
- // parent.
- int CorrectContainerIdDuringDrag() {
- if (window_type_ == aura::client::WINDOW_TYPE_PANEL)
- return internal::kShellWindowId_PanelContainer;
- return internal::kShellWindowId_DockedContainer;
- }
-
- // Test dragging the window vertically (to detach if it is a panel) and then
- // horizontally to the edge with an added offset from the edge of |dx|.
- void DragRelativeToEdge(DockedEdge edge,
- aura::Window* window,
- int dx) {
- DragVerticallyAndRelativeToEdge(
- edge,
- window,
- dx,
- window_type_ == aura::client::WINDOW_TYPE_PANEL ? -100 : 20);
- }
-
- void DragToVerticalPositionAndToEdge(DockedEdge edge,
- aura::Window* window,
- int y) {
- DragToVerticalPositionRelativeToEdge(edge, window, 0, y);
- }
-
- void DragToVerticalPositionRelativeToEdge(DockedEdge edge,
- aura::Window* window,
- int dx,
- int y) {
- gfx::Rect initial_bounds = window->GetBoundsInScreen();
- DragVerticallyAndRelativeToEdge(edge, window, dx, y - initial_bounds.y());
- }
-
- // Detach if our window is a panel, then drag it vertically by |dy| and
- // horizontally to the edge with an added offset from the edge of |dx|.
- void DragVerticallyAndRelativeToEdge(DockedEdge edge,
- aura::Window* window,
- int dx, int dy) {
- gfx::Rect initial_bounds = window->GetBoundsInScreen();
- // avoid snap by clicking away from the border
- ASSERT_NO_FATAL_FAILURE(DragStartAtOffsetFromwindowOrigin(window, 25, 5));
-
- gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(window).work_area();
- gfx::Point initial_location_in_screen = initial_location_in_parent_;
- wm::ConvertPointToScreen(window->parent(), &initial_location_in_screen);
- // Drag the window left or right to the edge (or almost to it).
- if (edge == DOCKED_EDGE_LEFT)
- dx += work_area.x() - initial_location_in_screen.x();
- else if (edge == DOCKED_EDGE_RIGHT)
- dx += work_area.right() - 1 - initial_location_in_screen.x();
- DragMove(dx, dy);
- EXPECT_EQ(CorrectContainerIdDuringDrag(), window->parent()->id());
- // Release the mouse and the panel should be attached to the dock.
- DragEnd();
-
- // x-coordinate can get adjusted by snapping or sticking.
- // y-coordinate could be changed by possible automatic layout if docked.
- if (window->parent()->id() != internal::kShellWindowId_DockedContainer &&
- !wm::GetWindowState(window)->HasRestoreBounds()) {
- EXPECT_EQ(initial_bounds.y() + dy, window->GetBoundsInScreen().y());
- }
- }
-
- private:
- scoped_ptr<WindowResizer> resizer_;
- scoped_ptr<test::ShelfViewTestAPI> shelf_view_test_;
- aura::client::WindowType window_type_;
-
- // Location at start of the drag in |window->parent()|'s coordinates.
- gfx::Point initial_location_in_parent_;
-
- DISALLOW_COPY_AND_ASSIGN(DockedWindowLayoutManagerTest);
-};
-
-// Tests that a created window is successfully added to the dock
-// layout manager.
-TEST_P(DockedWindowLayoutManagerTest, AddOneWindow) {
- if (!SupportsHostWindowResize())
- return;
-
- gfx::Rect bounds(0, 0, 201, 201);
- scoped_ptr<aura::Window> window(CreateTestWindow(bounds));
- DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0);
-
- // The window should be attached and docked at the right edge.
- // Its width should shrink or grow to ideal width.
- EXPECT_EQ(window->GetRootWindow()->bounds().right(),
- window->GetBoundsInScreen().right());
- EXPECT_EQ(ideal_width(), window->bounds().width());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-}
-
-// Tests that with a window docked on the left the auto-placing logic in
-// RearrangeVisibleWindowOnShow places windows flush with work area edges.
-TEST_P(DockedWindowLayoutManagerTest, AutoPlacingLeft) {
- if (!SupportsHostWindowResize())
- return;
-
- gfx::Rect bounds(0, 0, 201, 201);
- scoped_ptr<aura::Window> window(CreateTestWindow(bounds));
- DragRelativeToEdge(DOCKED_EDGE_LEFT, window.get(), 0);
-
- // The window should be attached and snapped to the right side of the screen.
- EXPECT_EQ(window->GetRootWindow()->bounds().x(),
- window->GetBoundsInScreen().x());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-
- DockedWindowLayoutManager* manager = static_cast<DockedWindowLayoutManager*>(
- window->parent()->layout_manager());
-
- // Create two additional windows and test their auto-placement
- scoped_ptr<aura::Window> window1(CreateTestWindowInShellWithId(1));
- gfx::Rect desktop_area = window1->parent()->bounds();
- wm::GetWindowState(window1.get())->set_window_position_managed(true);
- window1->Hide();
- window1->SetBounds(gfx::Rect(250, 32, 231, 320));
- window1->Show();
- // |window1| should be centered in work area.
- EXPECT_EQ(base::IntToString(
- docked_width(manager) + min_dock_gap() +
- (desktop_area.width() - docked_width(manager) -
- min_dock_gap() - window1->bounds().width()) / 2) +
- ",32 231x320", window1->bounds().ToString());
-
- scoped_ptr<aura::Window> window2(CreateTestWindowInShellWithId(2));
- wm::GetWindowState(window2.get())->set_window_position_managed(true);
- // To avoid any auto window manager changes due to SetBounds, the window
- // gets first hidden and then shown again.
- window2->Hide();
- window2->SetBounds(gfx::Rect(250, 48, 150, 300));
- window2->Show();
-
- // |window1| should be flush left and |window2| flush right.
- EXPECT_EQ(
- base::IntToString(docked_width(manager) + min_dock_gap()) +
- ",32 231x320", window1->bounds().ToString());
- EXPECT_EQ(
- base::IntToString(
- desktop_area.width() - window2->bounds().width()) +
- ",48 150x300", window2->bounds().ToString());
-}
-
-// Tests that with a window docked on the right the auto-placing logic in
-// RearrangeVisibleWindowOnShow places windows flush with work area edges.
-TEST_P(DockedWindowLayoutManagerTest, AutoPlacingRight) {
- if (!SupportsHostWindowResize())
- return;
-
- gfx::Rect bounds(0, 0, 201, 201);
- scoped_ptr<aura::Window> window(CreateTestWindow(bounds));
- DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0);
-
- // The window should be attached and snapped to the right side of the screen.
- EXPECT_EQ(window->GetRootWindow()->bounds().right(),
- window->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-
- DockedWindowLayoutManager* manager = static_cast<DockedWindowLayoutManager*>(
- window->parent()->layout_manager());
-
- // Create two additional windows and test their auto-placement
- scoped_ptr<aura::Window> window1(CreateTestWindowInShellWithId(1));
- gfx::Rect desktop_area = window1->parent()->bounds();
- wm::GetWindowState(window1.get())->set_window_position_managed(true);
- window1->Hide();
- window1->SetBounds(gfx::Rect(16, 32, 231, 320));
- window1->Show();
-
- // |window1| should be centered in work area.
- EXPECT_EQ(base::IntToString(
- (desktop_area.width() - docked_width(manager) -
- min_dock_gap() - window1->bounds().width()) / 2) +
- ",32 231x320", window1->bounds().ToString());
-
- scoped_ptr<aura::Window> window2(CreateTestWindowInShellWithId(2));
- wm::GetWindowState(window2.get())->set_window_position_managed(true);
- // To avoid any auto window manager changes due to SetBounds, the window
- // gets first hidden and then shown again.
- window2->Hide();
- window2->SetBounds(gfx::Rect(32, 48, 256, 512));
- window2->Show();
-
- // |window1| should be flush left and |window2| flush right.
- EXPECT_EQ("0,32 231x320", window1->bounds().ToString());
- EXPECT_EQ(
- base::IntToString(
- desktop_area.width() - window2->bounds().width() -
- docked_width(manager) - min_dock_gap()) +
- ",48 256x512", window2->bounds().ToString());
-}
-
-// Tests that with a window docked on the right the auto-placing logic in
-// RearrangeVisibleWindowOnShow places windows flush with work area edges.
-// Test case for the secondary screen.
-TEST_P(DockedWindowLayoutManagerTest, AutoPlacingRightSecondScreen) {
- if (!SupportsMultipleDisplays() || !SupportsHostWindowResize())
- return;
-
- // Create two screen layout.
- UpdateDisplay("600x600,600x600");
-
- gfx::Rect bounds(600, 0, 201, 201);
- scoped_ptr<aura::Window> window(CreateTestWindow(bounds));
- // Drag pointer to the right edge of the second screen.
- DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0);
-
- // The window should be attached and snapped to the right side of the screen.
- EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(),
- window->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-
- DockedWindowLayoutManager* manager = static_cast<DockedWindowLayoutManager*>(
- window->parent()->layout_manager());
-
- // Create two additional windows and test their auto-placement
- bounds = gfx::Rect(616, 32, 231, 320);
- scoped_ptr<aura::Window> window1(
- CreateTestWindowInShellWithDelegate(NULL, 1, bounds));
- gfx::Rect desktop_area = window1->parent()->bounds();
- wm::GetWindowState(window1.get())->set_window_position_managed(true);
- window1->Hide();
- window1->Show();
-
- // |window1| should be centered in work area.
- EXPECT_EQ(base::IntToString(
- 600 + (desktop_area.width() - docked_width(manager) -
- min_dock_gap() - window1->bounds().width()) / 2) +
- ",32 231x320", window1->GetBoundsInScreen().ToString());
-
- bounds = gfx::Rect(632, 48, 256, 512);
- scoped_ptr<aura::Window> window2(
- CreateTestWindowInShellWithDelegate(NULL, 2, bounds));
- wm::GetWindowState(window2.get())->set_window_position_managed(true);
- // To avoid any auto window manager changes due to SetBounds, the window
- // gets first hidden and then shown again.
- window2->Hide();
- window2->Show();
-
- // |window1| should be flush left and |window2| flush right.
- EXPECT_EQ("600,32 231x320", window1->GetBoundsInScreen().ToString());
- EXPECT_EQ(
- base::IntToString(
- 600 + desktop_area.width() - window2->bounds().width() -
- docked_width(manager) - min_dock_gap()) +
- ",48 256x512", window2->GetBoundsInScreen().ToString());
-}
-
-// Adds two windows and tests that the gaps are evenly distributed.
-TEST_P(DockedWindowLayoutManagerTest, AddTwoWindows) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- scoped_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 210, 202)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 300);
-
- // The windows should be attached and snapped to the right side of the screen.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(w2->GetRootWindow()->bounds().right(),
- w2->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
-
- // Test that the gaps differ at most by a single pixel.
- gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
- int gap1 = w1->GetBoundsInScreen().y();
- int gap2 = w2->GetBoundsInScreen().y() - w1->GetBoundsInScreen().bottom();
- int gap3 = work_area.bottom() - w2->GetBoundsInScreen().bottom();
- EXPECT_NEAR(gap1, min_dock_gap(), 1);
- EXPECT_NEAR(gap2, min_dock_gap(), 1);
- EXPECT_NEAR(gap3, min_dock_gap(), 1);
-}
-
-// Adds two non-overlapping windows and tests layout after a drag.
-TEST_P(DockedWindowLayoutManagerTest, TwoWindowsDragging) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- scoped_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 210, 202)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 300);
-
- // The windows should be attached and snapped to the right side of the screen.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(w2->GetRootWindow()->bounds().right(),
- w2->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
-
- // Drag w2 above w1.
- ASSERT_NO_FATAL_FAILURE(DragStartAtOffsetFromwindowOrigin(w2.get(), 0, 20));
- DragMove(0, -w2->bounds().height() / 2 - min_dock_gap() - 1);
- DragEnd();
-
- // Test the new windows order and that the gaps differ at most by a pixel.
- gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
- int gap1 = w2->GetBoundsInScreen().y() - work_area.y();
- int gap2 = w1->GetBoundsInScreen().y() - w2->GetBoundsInScreen().bottom();
- int gap3 = work_area.bottom() - w1->GetBoundsInScreen().bottom();
- EXPECT_NEAR(gap1, min_dock_gap(), 1);
- EXPECT_NEAR(gap2, min_dock_gap(), 1);
- EXPECT_NEAR(gap3, min_dock_gap(), 1);
-}
-
-// Adds three overlapping windows and tests layout after a drag.
-TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsDragging) {
- if (!SupportsHostWindowResize())
- return;
- UpdateDisplay("600x1000");
-
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 310)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- scoped_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 210, 310)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 500);
- scoped_ptr<aura::Window> w3(CreateTestWindow(gfx::Rect(0, 0, 220, 310)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w3.get(), 600);
-
- // All windows should be attached and snapped to the right side of the screen.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(w2->GetRootWindow()->bounds().right(),
- w2->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
- EXPECT_EQ(w3->GetRootWindow()->bounds().right(),
- w3->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w3->parent()->id());
-
- // Test that the top and bottom windows are clamped in work area and
- // that the gaps between the windows differ at most by a pixel.
- gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
- int gap1 = w1->GetBoundsInScreen().y() - work_area.y();
- int gap2 = w2->GetBoundsInScreen().y() - w1->GetBoundsInScreen().bottom();
- int gap3 = w3->GetBoundsInScreen().y() - w2->GetBoundsInScreen().bottom();
- int gap4 = work_area.bottom() - w3->GetBoundsInScreen().bottom();
- EXPECT_NEAR(gap1, min_dock_gap(), 1);
- EXPECT_NEAR(gap2, min_dock_gap(), 1);
- EXPECT_NEAR(gap3, min_dock_gap(), 1);
- EXPECT_NEAR(gap4, min_dock_gap(), 1);
-
- // Drag w1 below the point where w1 and w2 would swap places. This point is
- // half way between the tops of those two windows.
- // A bit more vertical drag is needed to account for a window bounds changing
- // to its restore bounds during the drag.
- ASSERT_NO_FATAL_FAILURE(DragStartAtOffsetFromwindowOrigin(w1.get(), 0, 20));
- DragMove(0, min_dock_gap() + w2->bounds().height() / 2 + 10);
-
- // During the drag the windows get rearranged and the top and the bottom
- // should be limited by the work area + |kMinDockGap|.
- EXPECT_EQ(min_dock_gap(), w2->GetBoundsInScreen().y());
- EXPECT_GT(w1->GetBoundsInScreen().y(), w2->GetBoundsInScreen().y());
- EXPECT_EQ(min_dock_gap(),
- work_area.bottom() - w3->GetBoundsInScreen().bottom());
- DragEnd();
-
- // Test the new windows order and that the gaps differ at most by a pixel.
- gap1 = w2->GetBoundsInScreen().y() - work_area.y();
- gap2 = w1->GetBoundsInScreen().y() - w2->GetBoundsInScreen().bottom();
- gap3 = w3->GetBoundsInScreen().y() - w1->GetBoundsInScreen().bottom();
- gap4 = work_area.bottom() - w3->GetBoundsInScreen().bottom();
- EXPECT_NEAR(gap1, min_dock_gap(), 1);
- EXPECT_NEAR(gap2, min_dock_gap(), 1);
- EXPECT_NEAR(gap3, min_dock_gap(), 1);
- EXPECT_NEAR(gap4, min_dock_gap(), 1);
-}
-
-// Adds three windows in bottom display and tests layout after a drag.
-TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsDraggingSecondScreen) {
- if (!SupportsMultipleDisplays() || !SupportsHostWindowResize())
- return;
-
- // Create two screen vertical layout.
- UpdateDisplay("600x1000,600x1000");
- // Layout the secondary display to the bottom of the primary.
- DisplayLayout layout(DisplayLayout::BOTTOM, 0);
- ASSERT_GT(Shell::GetScreen()->GetNumDisplays(), 1);
- Shell::GetInstance()->display_manager()->
- SetLayoutForCurrentDisplays(layout);
-
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 1000, 201, 310)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 1000 + 20);
- scoped_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 1000, 210, 310)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 1000 + 500);
- scoped_ptr<aura::Window> w3(CreateTestWindow(gfx::Rect(0, 1000, 220, 310)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w3.get(), 1000 + 600);
-
- // All windows should be attached and snapped to the right side of the screen.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(w2->GetRootWindow()->bounds().right(),
- w2->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
- EXPECT_EQ(w3->GetRootWindow()->bounds().right(),
- w3->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w3->parent()->id());
-
- gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
- // Test that the top and bottom windows are clamped in work area and
- // that the overlaps between the windows differ at most by a pixel.
- int gap1 = w1->GetBoundsInScreen().y() - work_area.y();
- int gap2 = w2->GetBoundsInScreen().y() - w1->GetBoundsInScreen().bottom();
- int gap3 = w3->GetBoundsInScreen().y() - w2->GetBoundsInScreen().bottom();
- int gap4 = work_area.bottom() - w3->GetBoundsInScreen().bottom();
- EXPECT_NEAR(gap1, min_dock_gap(), 1);
- EXPECT_NEAR(gap2, min_dock_gap(), 1);
- EXPECT_NEAR(gap3, min_dock_gap(), 1);
- EXPECT_NEAR(gap4, min_dock_gap(), 1);
-
- // Drag w1 below the point where w1 and w2 would swap places. This point is
- // half way between the tops of those two windows.
- // A bit more vertical drag is needed to account for a window bounds changing
- // to its restore bounds during the drag.
- ASSERT_NO_FATAL_FAILURE(DragStartAtOffsetFromwindowOrigin(w1.get(), 0, 20));
- DragMove(0, min_dock_gap() + w2->bounds().height() / 2 + 10);
-
- // During the drag the windows get rearranged and the top and the bottom
- // should be limited by the work area + |kMinDockGap|.
- EXPECT_EQ(work_area.y() + min_dock_gap(), w2->GetBoundsInScreen().y());
- EXPECT_GT(w1->GetBoundsInScreen().y(), w2->GetBoundsInScreen().y());
- EXPECT_EQ(min_dock_gap(),
- work_area.bottom() - w3->GetBoundsInScreen().bottom());
- DragEnd();
-
- // Test the new windows order and that the overlaps differ at most by a pixel.
- gap1 = w2->GetBoundsInScreen().y() - work_area.y();
- gap2 = w1->GetBoundsInScreen().y() - w2->GetBoundsInScreen().bottom();
- gap3 = w3->GetBoundsInScreen().y() - w1->GetBoundsInScreen().bottom();
- gap4 = work_area.bottom() - w3->GetBoundsInScreen().bottom();
- EXPECT_NEAR(gap1, min_dock_gap(), 1);
- EXPECT_NEAR(gap2, min_dock_gap(), 1);
- EXPECT_NEAR(gap3, min_dock_gap(), 1);
- EXPECT_NEAR(gap4, min_dock_gap(), 1);
-}
-
-// Tests that a second window added to the dock is resized to match.
-TEST_P(DockedWindowLayoutManagerTest, TwoWindowsWidthNew) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- scoped_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 280, 202)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- // The first window should get resized to ideal width.
- EXPECT_EQ(ideal_width(), w1->bounds().width());
-
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 300);
- // The second window should get resized to the existing dock.
- EXPECT_EQ(ideal_width(), w2->bounds().width());
-}
-
-// Tests that a first non-resizable window added to the dock is not resized.
-TEST_P(DockedWindowLayoutManagerTest, TwoWindowsWidthNonResizableFirst) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- w1->SetProperty(aura::client::kCanResizeKey, false);
- scoped_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 280, 202)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- // The first window should not get resized.
- EXPECT_EQ(201, w1->bounds().width());
-
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 300);
- // The second window should get resized to the first window's width.
- EXPECT_EQ(w1->bounds().width(), w2->bounds().width());
-}
-
-// Tests that a second non-resizable window added to the dock is not resized.
-TEST_P(DockedWindowLayoutManagerTest, TwoWindowsWidthNonResizableSecond) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- scoped_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 280, 202)));
- w2->SetProperty(aura::client::kCanResizeKey, false);
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- // The first window should get resized to ideal width.
- EXPECT_EQ(ideal_width(), w1->bounds().width());
-
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 300);
- // The second window should not get resized.
- EXPECT_EQ(280, w2->bounds().width());
-
- // The first window should get resized again - to match the second window.
- EXPECT_EQ(w1->bounds().width(), w2->bounds().width());
-}
-
-// Test that restrictions on minimum and maximum width of windows are honored.
-TEST_P(DockedWindowLayoutManagerTest, TwoWindowsWidthRestrictions) {
- if (!SupportsHostWindowResize())
- return;
-
- aura::test::TestWindowDelegate delegate1;
- delegate1.set_maximum_size(gfx::Size(240, 0));
- scoped_ptr<aura::Window> w1(CreateTestWindowWithDelegate(
- gfx::Rect(0, 0, 201, 201), &delegate1));
- aura::test::TestWindowDelegate delegate2;
- delegate2.set_minimum_size(gfx::Size(260, 0));
- scoped_ptr<aura::Window> w2(CreateTestWindowWithDelegate(
- gfx::Rect(0, 0, 280, 202), &delegate2));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- // The first window should get resized to its maximum width.
- EXPECT_EQ(240, w1->bounds().width());
-
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 300);
- // The second window should get resized to its minimum width.
- EXPECT_EQ(260, w2->bounds().width());
-
- // The first window should be centered relative to the second.
- EXPECT_EQ(w1->bounds().CenterPoint().x(), w2->bounds().CenterPoint().x());
-}
-
-// Test that restrictions on minimum width of windows are honored.
-TEST_P(DockedWindowLayoutManagerTest, WidthMoreThanMax) {
- if (!SupportsHostWindowResize())
- return;
-
- aura::test::TestWindowDelegate delegate;
- delegate.set_minimum_size(gfx::Size(400, 0));
- scoped_ptr<aura::Window> window(CreateTestWindowWithDelegate(
- gfx::Rect(0, 0, 400, 201), &delegate));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, window.get(), 20);
-
- // Secondary drag ensures that we are testing the minimum size restriction
- // and not just failure to get past the tiling step in SnapSizer.
- ASSERT_NO_FATAL_FAILURE(DragStartAtOffsetFromwindowOrigin(window.get(),
- 25, 5));
- DragMove(150,0);
- DragEnd();
-
- // The window should not get docked even though it is dragged past the edge.
- EXPECT_NE(window->GetRootWindow()->bounds().right(),
- window->GetBoundsInScreen().right());
- EXPECT_NE(internal::kShellWindowId_DockedContainer, window->parent()->id());
-}
-
-// Docks three windows and tests that the very first window gets minimized.
-TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsMinimize) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- scoped_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 210, 202)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 200);
- scoped_ptr<aura::Window> w3(CreateTestWindow(gfx::Rect(0, 0, 220, 204)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w3.get(), 300);
-
- // The last two windows should be attached and snapped to the right edge.
- EXPECT_EQ(w2->GetRootWindow()->bounds().right(),
- w2->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
- EXPECT_EQ(w3->GetRootWindow()->bounds().right(),
- w3->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w3->parent()->id());
-
- // The first window should get minimized but parented by the dock container.
- EXPECT_TRUE(wm::GetWindowState(w1.get())->IsMinimized());
- EXPECT_TRUE(wm::GetWindowState(w2.get())->IsNormalShowState());
- EXPECT_TRUE(wm::GetWindowState(w3.get())->IsNormalShowState());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
-}
-
-// Docks up to three windows and tests that they split vertical space.
-TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsSplitHeightEvenly) {
- if (!SupportsHostWindowResize())
- return;
-
- UpdateDisplay("600x1000");
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- scoped_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 210, 202)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 200);
-
- // The two windows should be attached and snapped to the right edge.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(w2->GetRootWindow()->bounds().right(),
- w2->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
-
- // The two windows should be same size vertically and almost 1/2 of work area.
- gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
- EXPECT_NEAR(w1->GetBoundsInScreen().height(),
- w2->GetBoundsInScreen().height(),
- 1);
- EXPECT_NEAR(work_area.height() / 2, w1->GetBoundsInScreen().height(),
- min_dock_gap() * 2);
-
- // Create and dock the third window.
- scoped_ptr<aura::Window> w3(CreateTestWindow(gfx::Rect(0, 0, 220, 204)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w3.get(), 300);
-
- // All three windows should be docked and snapped to the right edge.
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w3->parent()->id());
-
- // All windows should be near same size vertically and about 1/3 of work area.
- EXPECT_NEAR(w1->GetBoundsInScreen().height(),
- w2->GetBoundsInScreen().height(),
- 1);
- EXPECT_NEAR(w2->GetBoundsInScreen().height(),
- w3->GetBoundsInScreen().height(),
- 1);
- EXPECT_NEAR(work_area.height() / 3, w1->GetBoundsInScreen().height(),
- min_dock_gap() * 2);
-}
-
-// Docks two windows and tests that restrictions on vertical size are honored.
-TEST_P(DockedWindowLayoutManagerTest, TwoWindowsHeightRestrictions) {
- if (!SupportsHostWindowResize())
- return;
-
- // The first window is fixed height.
- aura::test::TestWindowDelegate delegate1;
- delegate1.set_minimum_size(gfx::Size(0, 300));
- delegate1.set_maximum_size(gfx::Size(0, 300));
- scoped_ptr<aura::Window> w1(CreateTestWindowWithDelegate(
- gfx::Rect(0, 0, 201, 300), &delegate1));
- // The second window has maximum height.
- aura::test::TestWindowDelegate delegate2;
- delegate2.set_maximum_size(gfx::Size(0, 100));
- scoped_ptr<aura::Window> w2(CreateTestWindowWithDelegate(
- gfx::Rect(0, 0, 280, 90), &delegate2));
-
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 200);
-
- // The two windows should be attached and snapped to the right edge.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(w2->GetRootWindow()->bounds().right(),
- w2->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
-
- // The two windows should have their heights restricted.
- EXPECT_EQ(300, w1->GetBoundsInScreen().height());
- EXPECT_EQ(100, w2->GetBoundsInScreen().height());
-
- // w1 should be more than half of the work area height (even with a margin).
- // w2 should be less than half of the work area height (even with a margin).
- gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
- EXPECT_GT(w1->GetBoundsInScreen().height(), work_area.height() / 2 + 10);
- EXPECT_LT(w2->GetBoundsInScreen().height(), work_area.height() / 2 - 10);
-}
-
-// Tests run twice - on both panels and normal windows
-INSTANTIATE_TEST_CASE_P(NormalOrPanel,
- DockedWindowLayoutManagerTest,
- testing::Values(aura::client::WINDOW_TYPE_NORMAL,
- aura::client::WINDOW_TYPE_PANEL));
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/dock/docked_window_resizer.cc b/chromium/ash/wm/dock/docked_window_resizer.cc
deleted file mode 100644
index cd06beec370..00000000000
--- a/chromium/ash/wm/dock/docked_window_resizer.cc
+++ /dev/null
@@ -1,337 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/dock/docked_window_resizer.h"
-
-#include "ash/display/display_controller.h"
-#include "ash/launcher/launcher.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ash/wm/dock/docked_window_layout_manager.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/magnetism_matcher.h"
-#include "ash/wm/workspace/workspace_window_resizer.h"
-#include "base/command_line.h"
-#include "base/memory/weak_ptr.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/client/window_tree_client.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-DockedWindowLayoutManager* GetDockedLayoutManagerAtPoint(
- const gfx::Point& point) {
- gfx::Display display = ScreenAsh::FindDisplayContainingPoint(point);
- if (!display.is_valid())
- return NULL;
- aura::Window* root = Shell::GetInstance()->display_controller()->
- GetRootWindowForDisplayId(display.id());
- aura::Window* dock_container = Shell::GetContainer(
- root, kShellWindowId_DockedContainer);
- return static_cast<DockedWindowLayoutManager*>(
- dock_container->layout_manager());
-}
-
-} // namespace
-
-DockedWindowResizer::~DockedWindowResizer() {
-}
-
-// static
-DockedWindowResizer*
-DockedWindowResizer::Create(WindowResizer* next_window_resizer,
- aura::Window* window,
- const gfx::Point& location,
- int window_component,
- aura::client::WindowMoveSource source) {
- Details details(window, location, window_component, source);
- return details.is_resizable ?
- new DockedWindowResizer(next_window_resizer, details) : NULL;
-}
-
-void DockedWindowResizer::Drag(const gfx::Point& location, int event_flags) {
- last_location_ = location;
- wm::ConvertPointToScreen(GetTarget()->parent(), &last_location_);
- if (!did_move_or_resize_) {
- did_move_or_resize_ = true;
- StartedDragging();
- }
- gfx::Point offset;
- gfx::Rect bounds(CalculateBoundsForDrag(details_, location));
- MaybeSnapToEdge(bounds, &offset);
- gfx::Point modified_location(location);
- modified_location.Offset(offset.x(), offset.y());
-
- base::WeakPtr<DockedWindowResizer> resizer(weak_ptr_factory_.GetWeakPtr());
- next_window_resizer_->Drag(modified_location, event_flags);
- if (!resizer)
- return;
-
- DockedWindowLayoutManager* new_dock_layout =
- GetDockedLayoutManagerAtPoint(last_location_);
- if (new_dock_layout && new_dock_layout != dock_layout_) {
- // The window is being dragged to a new display. If the previous
- // container is the current parent of the window it will be informed of
- // the end of drag when the window is reparented, otherwise let the
- // previous container know the drag is complete. If we told the
- // window's parent that the drag was complete it would begin
- // positioning the window.
- if (is_docked_ && dock_layout_->is_dragged_window_docked())
- dock_layout_->UndockDraggedWindow();
- if (dock_layout_ != initial_dock_layout_)
- dock_layout_->FinishDragging(
- DOCKED_ACTION_NONE,
- details_.source == aura::client::WINDOW_MOVE_SOURCE_MOUSE ?
- DOCKED_ACTION_SOURCE_MOUSE : DOCKED_ACTION_SOURCE_TOUCH);
- is_docked_ = false;
- dock_layout_ = new_dock_layout;
- // The window's initial layout manager already knows that the drag is
- // in progress for this window.
- if (new_dock_layout != initial_dock_layout_)
- new_dock_layout->StartDragging(GetTarget());
- }
- // Window could get docked by the WorkspaceWindowResizer, update the state.
- is_docked_ = dock_layout_->is_dragged_window_docked();
- // Whenever a window is dragged out of the dock it will be auto-sized
- // in the dock if it gets docked again.
- if (!is_docked_)
- was_bounds_changed_by_user_ = false;
-}
-
-void DockedWindowResizer::CompleteDrag(int event_flags) {
- // The root window can change when dragging into a different screen.
- next_window_resizer_->CompleteDrag(event_flags);
- FinishedDragging();
-}
-
-void DockedWindowResizer::RevertDrag() {
- next_window_resizer_->RevertDrag();
- // Restore docked state to what it was before the drag if necessary.
- if (is_docked_ != was_docked_) {
- is_docked_ = was_docked_;
- if (is_docked_)
- dock_layout_->DockDraggedWindow(GetTarget());
- else
- dock_layout_->UndockDraggedWindow();
- }
- FinishedDragging();
-}
-
-aura::Window* DockedWindowResizer::GetTarget() {
- return next_window_resizer_->GetTarget();
-}
-
-const gfx::Point& DockedWindowResizer::GetInitialLocation() const {
- return details_.initial_location_in_parent;
-}
-
-DockedWindowResizer::DockedWindowResizer(WindowResizer* next_window_resizer,
- const Details& details)
- : details_(details),
- next_window_resizer_(next_window_resizer),
- dock_layout_(NULL),
- initial_dock_layout_(NULL),
- did_move_or_resize_(false),
- was_docked_(false),
- is_docked_(false),
- was_bounds_changed_by_user_(
- wm::GetWindowState(details.window)->bounds_changed_by_user()),
- weak_ptr_factory_(this) {
- DCHECK(details_.is_resizable);
- aura::Window* dock_container = Shell::GetContainer(
- details.window->GetRootWindow(),
- kShellWindowId_DockedContainer);
- dock_layout_ = static_cast<DockedWindowLayoutManager*>(
- dock_container->layout_manager());
- initial_dock_layout_ = dock_layout_;
- was_docked_ = details.window->parent() == dock_container;
- is_docked_ = was_docked_;
-}
-
-void DockedWindowResizer::MaybeSnapToEdge(const gfx::Rect& bounds,
- gfx::Point* offset) {
- // Windows only snap magnetically when they were previously docked.
- if (!was_docked_)
- return;
- DockedAlignment dock_alignment = dock_layout_->CalculateAlignment();
- gfx::Rect dock_bounds = ScreenAsh::ConvertRectFromScreen(
- GetTarget()->parent(),
- dock_layout_->dock_container()->GetBoundsInScreen());
-
- // Short-range magnetism when retaining docked state. Same constant as in
- // MagnetismMatcher is used for consistency.
- const int kSnapToDockDistance = MagnetismMatcher::kMagneticDistance;
-
- if (dock_alignment == DOCKED_ALIGNMENT_LEFT ||
- dock_alignment == DOCKED_ALIGNMENT_NONE) {
- const int distance = bounds.x() - dock_bounds.x();
- if (distance < kSnapToDockDistance && distance > 0) {
- offset->set_x(-distance);
- return;
- }
- }
- if (dock_alignment == DOCKED_ALIGNMENT_RIGHT ||
- dock_alignment == DOCKED_ALIGNMENT_NONE) {
- const int distance = dock_bounds.right() - bounds.right();
- if (distance < kSnapToDockDistance && distance > 0)
- offset->set_x(distance);
- }
-}
-
-void DockedWindowResizer::StartedDragging() {
- // During resizing the window width is preserved by DockedwindowLayoutManager.
- wm::WindowState* window_state = wm::GetWindowState(GetTarget());
- if (is_docked_ &&
- (details_.bounds_change & WindowResizer::kBoundsChange_Resizes)) {
- window_state->set_bounds_changed_by_user(true);
- }
-
- // Tell the dock layout manager that we are dragging this window.
- // At this point we are not yet animating the window as it may not be
- // inside the docked area.
- dock_layout_->StartDragging(GetTarget());
- // Reparent workspace windows during the drag to elevate them above workspace.
- // Other windows for which the DockedWindowResizer is instantiated include
- // panels and windows that are already docked. Those do not need reparenting.
- if (GetTarget()->type() != aura::client::WINDOW_TYPE_PANEL &&
- GetTarget()->parent()->id() == kShellWindowId_DefaultContainer) {
- // The window is going to be reparented - avoid completing the drag.
- window_state->set_continue_drag_after_reparent(true);
-
- // Reparent the window into the docked windows container in order to get it
- // on top of other docked windows.
- aura::Window* docked_container = Shell::GetContainer(
- GetTarget()->GetRootWindow(),
- kShellWindowId_DockedContainer);
- wm::ReparentChildWithTransientChildren(GetTarget(),
- GetTarget()->parent(),
- docked_container);
- }
- if (is_docked_)
- dock_layout_->DockDraggedWindow(GetTarget());
-}
-
-void DockedWindowResizer::FinishedDragging() {
- if (!did_move_or_resize_)
- return;
- did_move_or_resize_ = false;
- aura::Window* window = GetTarget();
- wm::WindowState* window_state = wm::GetWindowState(window);
- const bool is_attached_panel =
- window->type() == aura::client::WINDOW_TYPE_PANEL &&
- window_state->panel_attached();
- const bool is_resized =
- (details_.bounds_change & WindowResizer::kBoundsChange_Resizes) != 0;
-
- // When drag is completed the dragged docked window is resized to the bounds
- // calculated by the layout manager that conform to other docked windows.
- if (!is_attached_panel && is_docked_ && !is_resized) {
- gfx::Rect bounds = ScreenAsh::ConvertRectFromScreen(
- window->parent(), dock_layout_->dragged_bounds());
- if (!bounds.IsEmpty() && bounds.width() != window->bounds().width()) {
- window->SetBounds(bounds);
- }
- }
- // If a window has restore bounds, update the restore origin and width but not
- // the height (since the height is auto-calculated for the docked windows).
- if (is_resized && is_docked_ && window_state->HasRestoreBounds()) {
- gfx::Rect restore_bounds = window->GetBoundsInScreen();
- restore_bounds.set_height(
- window_state->GetRestoreBoundsInScreen().height());
- window_state->SetRestoreBoundsInScreen(restore_bounds);
- }
-
- // Check if the window needs to be docked or returned to workspace.
- DockedAction action = MaybeReparentWindowOnDragCompletion(is_resized,
- is_attached_panel);
- dock_layout_->FinishDragging(
- action,
- details_.source == aura::client::WINDOW_MOVE_SOURCE_MOUSE ?
- DOCKED_ACTION_SOURCE_MOUSE : DOCKED_ACTION_SOURCE_TOUCH);
-
- // If we started the drag in one root window and moved into another root
- // but then canceled the drag we may need to inform the original layout
- // manager that the drag is finished.
- if (initial_dock_layout_ != dock_layout_)
- initial_dock_layout_->FinishDragging(
- DOCKED_ACTION_NONE,
- details_.source == aura::client::WINDOW_MOVE_SOURCE_MOUSE ?
- DOCKED_ACTION_SOURCE_MOUSE : DOCKED_ACTION_SOURCE_TOUCH);
- is_docked_ = false;
-}
-
-DockedAction DockedWindowResizer::MaybeReparentWindowOnDragCompletion(
- bool is_resized, bool is_attached_panel) {
- aura::Window* window = GetTarget();
-
- // Check if the window needs to be docked or returned to workspace.
- DockedAction action = DOCKED_ACTION_NONE;
- aura::Window* dock_container = Shell::GetContainer(
- window->GetRootWindow(),
- kShellWindowId_DockedContainer);
- if ((is_resized || !is_attached_panel) &&
- is_docked_ != (window->parent() == dock_container)) {
- if (is_docked_) {
- wm::ReparentChildWithTransientChildren(window,
- window->parent(),
- dock_container);
- action = DOCKED_ACTION_DOCK;
- } else if (window->parent()->id() == kShellWindowId_DockedContainer) {
- // Reparent the window back to workspace.
- // We need to be careful to give ParentWindowWithContext a location in
- // the right root window (matching the logic in DragWindowResizer) based
- // on which root window a mouse pointer is in. We want to undock into the
- // right screen near the edge of a multiscreen setup (based on where the
- // mouse is).
- gfx::Rect near_last_location(last_location_, gfx::Size());
- // Reparenting will cause Relayout and possible dock shrinking.
- aura::Window* previous_parent = window->parent();
- aura::client::ParentWindowWithContext(window, window, near_last_location);
- if (window->parent() != previous_parent) {
- wm::ReparentTransientChildrenOfChild(window,
- previous_parent,
- window->parent());
- }
- action = was_docked_ ? DOCKED_ACTION_UNDOCK : DOCKED_ACTION_NONE;
- }
- } else {
- // Docked state was not changed but still need to record a UMA action.
- if (is_resized && is_docked_ && was_docked_)
- action = DOCKED_ACTION_RESIZE;
- else if (is_docked_ && was_docked_)
- action = DOCKED_ACTION_REORDER;
- else if (is_docked_ && !was_docked_)
- action = DOCKED_ACTION_DOCK;
- else
- action = DOCKED_ACTION_NONE;
- }
- // When a window is newly docked it is auto-sized by docked layout adjusting
- // to other windows. If it is just dragged (but not resized) while being
- // docked it is auto-sized unless it has been resized while being docked
- // before.
- if (is_docked_) {
- wm::GetWindowState(window)->set_bounds_changed_by_user(
- was_docked_ && (is_resized || was_bounds_changed_by_user_));
- }
- return action;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/dock/docked_window_resizer.h b/chromium/ash/wm/dock/docked_window_resizer.h
deleted file mode 100644
index 929259e59ea..00000000000
--- a/chromium/ash/wm/dock/docked_window_resizer.h
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_DOCK_DOCK_WINDOW_RESIZER_H_
-#define ASH_WM_DOCK_DOCK_WINDOW_RESIZER_H_
-
-#include "ash/wm/dock/dock_types.h"
-#include "ash/wm/window_resizer.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-
-namespace gfx {
-class Point;
-class Rect;
-}
-
-namespace aura {
-class RootWindow;
-}
-
-namespace ash {
-namespace internal {
-
-class DockedWindowLayoutManager;
-
-// DockWindowResizer is used by ToplevelWindowEventFilter to handle dragging,
-// moving or resizing of a window while it is docked to the side of a screen.
-class ASH_EXPORT DockedWindowResizer : public WindowResizer {
- public:
- virtual ~DockedWindowResizer();
-
- // Creates a new DockWindowResizer. The caller takes ownership of the
- // returned object. The ownership of |next_window_resizer| is taken by the
- // returned object. Returns NULL if not resizable.
- static DockedWindowResizer* Create(WindowResizer* next_window_resizer,
- aura::Window* window,
- const gfx::Point& location,
- int window_component,
- aura::client::WindowMoveSource source);
-
- // WindowResizer:
- virtual void Drag(const gfx::Point& location, int event_flags) OVERRIDE;
- virtual void CompleteDrag(int event_flags) OVERRIDE;
- virtual void RevertDrag() OVERRIDE;
- virtual aura::Window* GetTarget() OVERRIDE;
- virtual const gfx::Point& GetInitialLocation() const OVERRIDE;
-
- private:
- // Creates DockWindowResizer that adds the ability to attach / detach
- // windows to / from the dock. This object takes ownership of
- // |next_window_resizer|.
- DockedWindowResizer(WindowResizer* next_window_resizer,
- const Details& details);
-
- // If the provided window bounds should snap to the side of a screen,
- // returns the offset that gives the necessary adjustment to snap.
- void MaybeSnapToEdge(const gfx::Rect& bounds, gfx::Point* offset);
-
- // Tracks the window's initial position and attachment at the start of a drag
- // and informs the DockLayoutManager that a drag has started if necessary.
- void StartedDragging();
-
- // Informs the DockLayoutManager that the drag is complete if it was informed
- // of the drag start.
- void FinishedDragging();
-
- // Reparents dragged window as necessary to the docked container or back to
- // workspace at the end of the drag. Calculates and returns action taken that
- // can be reported in UMA stats. |is_resized| reports if the window is merely
- // being resized rather than repositioned. |attached_panel| is necessary to
- // avoid docking panels that have been attached to the launcher shelf at the
- // end of the drag.
- DockedAction MaybeReparentWindowOnDragCompletion(bool is_resized,
- bool is_attached_panel);
-
- const Details details_;
-
- gfx::Point last_location_;
-
- // Wraps a window resizer and adds detaching / reattaching during drags.
- scoped_ptr<WindowResizer> next_window_resizer_;
-
- // Dock container window.
- internal::DockedWindowLayoutManager* dock_layout_;
- internal::DockedWindowLayoutManager* initial_dock_layout_;
-
- // Set to true once Drag() is invoked and the bounds of the window change.
- bool did_move_or_resize_;
-
- // Set to true if the window that is being dragged was docked before drag.
- bool was_docked_;
-
- // True if the dragged window is docked during the drag.
- bool is_docked_;
-
- // True if the dragged window had |bounds_changed_by_user| before the drag.
- // Cleared whenever the target window gets dragged outside of the docked area.
- bool was_bounds_changed_by_user_;
-
- base::WeakPtrFactory<DockedWindowResizer> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(DockedWindowResizer);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_DOCK_DOCK_WINDOW_RESIZER_H_
diff --git a/chromium/ash/wm/dock/docked_window_resizer_unittest.cc b/chromium/ash/wm/dock/docked_window_resizer_unittest.cc
deleted file mode 100644
index 9bfe7217f96..00000000000
--- a/chromium/ash/wm/dock/docked_window_resizer_unittest.cc
+++ /dev/null
@@ -1,1436 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/dock/docked_window_resizer.h"
-
-#include "ash/ash_switches.h"
-#include "ash/launcher/launcher.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_model.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/cursor_manager_test_api.h"
-#include "ash/test/shell_test_api.h"
-#include "ash/test/test_shelf_delegate.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ash/wm/dock/docked_window_layout_manager.h"
-#include "ash/wm/drag_window_resizer.h"
-#include "ash/wm/panels/panel_layout_manager.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/snap_sizer.h"
-#include "base/command_line.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/client/window_tree_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-class DockedWindowResizerTest
- : public test::AshTestBase,
- public testing::WithParamInterface<aura::client::WindowType> {
- public:
- DockedWindowResizerTest() : model_(NULL), window_type_(GetParam()) {}
- virtual ~DockedWindowResizerTest() {}
-
- virtual void SetUp() OVERRIDE {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshEnableDockedWindows);
- AshTestBase::SetUp();
- UpdateDisplay("600x400");
- test::ShellTestApi test_api(Shell::GetInstance());
- model_ = test_api.shelf_model();
- }
-
- virtual void TearDown() OVERRIDE {
- AshTestBase::TearDown();
- }
-
- protected:
- enum DockedEdge {
- DOCKED_EDGE_NONE,
- DOCKED_EDGE_LEFT,
- DOCKED_EDGE_RIGHT,
- };
-
- int ideal_width() const { return DockedWindowLayoutManager::kIdealWidth; }
- int min_dock_gap() const { return DockedWindowLayoutManager::kMinDockGap; }
- int max_width() const { return DockedWindowLayoutManager::kMaxDockWidth; }
- int docked_width(const DockedWindowLayoutManager* layout_manager) const {
- return layout_manager->docked_width_;
- }
- int docked_alignment(const DockedWindowLayoutManager* layout_manager) const {
- return layout_manager->alignment_;
- }
- aura::Window* CreateTestWindow(const gfx::Rect& bounds) {
- aura::Window* window = CreateTestWindowInShellWithDelegateAndType(
- &delegate_,
- window_type_,
- 0,
- bounds);
- if (window_type_ == aura::client::WINDOW_TYPE_PANEL) {
- test::TestShelfDelegate* shelf_delegate =
- test::TestShelfDelegate::instance();
- shelf_delegate->AddLauncherItem(window);
- PanelLayoutManager* manager =
- static_cast<PanelLayoutManager*>(
- Shell::GetContainer(window->GetRootWindow(),
- internal::kShellWindowId_PanelContainer)->
- layout_manager());
- manager->Relayout();
- }
- return window;
- }
-
- aura::Window* CreateModalWindow(const gfx::Rect& bounds) {
- aura::Window* window = new aura::Window(&delegate_);
- window->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_SYSTEM);
- window->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window->Init(ui::LAYER_TEXTURED);
- window->Show();
-
- if (bounds.IsEmpty()) {
- ParentWindowInPrimaryRootWindow(window);
- } else {
- gfx::Display display =
- Shell::GetScreen()->GetDisplayMatching(bounds);
- aura::Window* root = ash::Shell::GetInstance()->display_controller()->
- GetRootWindowForDisplayId(display.id());
- gfx::Point origin = bounds.origin();
- wm::ConvertPointFromScreen(root, &origin);
- window->SetBounds(gfx::Rect(origin, bounds.size()));
- aura::client::ParentWindowWithContext(window, root, bounds);
- }
- return window;
- }
-
- static WindowResizer* CreateSomeWindowResizer(
- aura::Window* window,
- const gfx::Point& point_in_parent,
- int window_component) {
- return CreateWindowResizer(
- window,
- point_in_parent,
- window_component,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE).release();
- }
-
- void DragStart(aura::Window* window) {
- DragStartAtOffsetFromWindowOrigin(window, 0, 0);
- }
-
- void DragStartAtOffsetFromWindowOrigin(aura::Window* window,
- int dx, int dy) {
- initial_location_in_parent_ =
- window->bounds().origin() + gfx::Vector2d(dx, dy);
- resizer_.reset(CreateSomeWindowResizer(window,
- initial_location_in_parent_,
- HTCAPTION));
- ASSERT_TRUE(resizer_.get());
- }
-
- void ResizeStartAtOffsetFromWindowOrigin(aura::Window* window,
- int dx, int dy,
- int window_component) {
- initial_location_in_parent_ =
- window->bounds().origin() + gfx::Vector2d(dx, dy);
- resizer_.reset(CreateSomeWindowResizer(window,
- initial_location_in_parent_,
- window_component));
- ASSERT_TRUE(resizer_.get());
- }
-
- void DragMove(int dx, int dy) {
- resizer_->Drag(initial_location_in_parent_ + gfx::Vector2d(dx, dy), 0);
- }
-
- void DragEnd() {
- resizer_->CompleteDrag(0);
- resizer_.reset();
- }
-
- void DragRevert() {
- resizer_->RevertDrag();
- resizer_.reset();
- }
-
- // Panels are parented by panel container during drags.
- // All other windows that are tested here are parented by dock container
- // during drags.
- int CorrectContainerIdDuringDrag() {
- if (window_type_ == aura::client::WINDOW_TYPE_PANEL)
- return internal::kShellWindowId_PanelContainer;
- return internal::kShellWindowId_DockedContainer;
- }
-
- // Test dragging the window vertically (to detach if it is a panel) and then
- // horizontally to the edge with an added offset from the edge of |dx|.
- void DragRelativeToEdge(DockedEdge edge,
- aura::Window* window,
- int dx) {
- DragVerticallyAndRelativeToEdge(
- edge,
- window,
- dx, window_type_ == aura::client::WINDOW_TYPE_PANEL ? -100 : 20,
- 25, 5);
- }
-
- void DragToVerticalPositionAndToEdge(DockedEdge edge,
- aura::Window* window,
- int y) {
- DragToVerticalPositionRelativeToEdge(edge, window, 0, y);
- }
-
- void DragToVerticalPositionRelativeToEdge(DockedEdge edge,
- aura::Window* window,
- int dx,
- int y) {
- gfx::Rect initial_bounds = window->GetBoundsInScreen();
- DragVerticallyAndRelativeToEdge(edge,
- window,
- dx, y - initial_bounds.y(),
- 25, 5);
- }
-
- // Detach if our window is a panel, then drag it vertically by |dy| and
- // horizontally to the edge with an added offset from the edge of |dx|.
- void DragVerticallyAndRelativeToEdge(DockedEdge edge,
- aura::Window* window,
- int dx, int dy,
- int grab_x, int grab_y) {
- gfx::Rect initial_bounds = window->GetBoundsInScreen();
- // avoid snap by clicking away from the border
- ASSERT_NO_FATAL_FAILURE(DragStartAtOffsetFromWindowOrigin(window,
- grab_x, grab_y));
-
- gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(window).work_area();
- gfx::Point initial_location_in_screen = initial_location_in_parent_;
- wm::ConvertPointToScreen(window->parent(), &initial_location_in_screen);
- // Drag the window left or right to the edge (or almost to it).
- if (edge == DOCKED_EDGE_LEFT)
- dx += work_area.x() - initial_location_in_screen.x();
- else if (edge == DOCKED_EDGE_RIGHT)
- dx += work_area.right() - 1 - initial_location_in_screen.x();
- DragMove(dx, dy);
- EXPECT_EQ(CorrectContainerIdDuringDrag(), window->parent()->id());
- // Release the mouse and the panel should be attached to the dock.
- DragEnd();
-
- // x-coordinate can get adjusted by snapping or sticking.
- // y-coordinate could be changed by possible automatic layout if docked.
- if (window->parent()->id() != internal::kShellWindowId_DockedContainer &&
- !wm::GetWindowState(window)->HasRestoreBounds()) {
- EXPECT_EQ(initial_bounds.y() + dy, window->GetBoundsInScreen().y());
- }
- }
-
- bool test_panels() const {
- return window_type_ == aura::client::WINDOW_TYPE_PANEL;
- }
-
- const gfx::Point& initial_location_in_parent() const {
- return initial_location_in_parent_;
- }
-
- private:
- scoped_ptr<WindowResizer> resizer_;
- ShelfModel* model_;
- aura::client::WindowType window_type_;
- aura::test::TestWindowDelegate delegate_;
-
- // Location at start of the drag in |window->parent()|'s coordinates.
- gfx::Point initial_location_in_parent_;
-
- DISALLOW_COPY_AND_ASSIGN(DockedWindowResizerTest);
-};
-
-// Verifies a window can be dragged and attached to the dock.
-TEST_P(DockedWindowResizerTest, AttachRightPrecise) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0);
-
- // The window should be docked at the right edge.
- EXPECT_EQ(window->GetRootWindow()->bounds().right(),
- window->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-}
-
-// Verifies a window can be dragged and attached to the dock
-// even if pointer overshoots the screen edge by a few pixels (sticky edge)
-TEST_P(DockedWindowResizerTest, AttachRightOvershoot) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), +4);
-
- // The window should be docked at the right edge.
- EXPECT_EQ(window->GetRootWindow()->bounds().right(),
- window->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-}
-
-// Verifies a window can be dragged and then if a pointer is not quite reaching
-// the screen edge the window does not get docked and stays in the desktop.
-TEST_P(DockedWindowResizerTest, AttachRightUndershoot) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- // Grabbing at 70px ensures that at least 30% of the window is in screen,
- // otherwise the window would be adjusted in
- // WorkspaceLayoutManager::AdjustWindowBoundsWhenAdded.
- const int kGrabOffsetX = 70;
- const int kUndershootBy = 1;
- DragVerticallyAndRelativeToEdge(DOCKED_EDGE_RIGHT,
- window.get(),
- -kUndershootBy, test_panels() ? -100 : 20,
- kGrabOffsetX, 5);
-
- // The window right should be past the screen edge but not docked.
- // Initial touch point is 70px to the right which helps to find where the edge
- // should be.
- EXPECT_EQ(window->GetRootWindow()->bounds().right() +
- window->bounds().width() - kGrabOffsetX - kUndershootBy - 1,
- window->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer,
- window->parent()->id());
-}
-
-// Verifies a window can be dragged and attached to the dock.
-TEST_P(DockedWindowResizerTest, AttachLeftPrecise) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- DragRelativeToEdge(DOCKED_EDGE_LEFT, window.get(), 0);
-
- // The window should be docked at the left edge.
- EXPECT_EQ(window->GetRootWindow()->bounds().x(),
- window->GetBoundsInScreen().x());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-}
-
-// Verifies a window can be dragged and attached to the dock
-// even if pointer overshoots the screen edge by a few pixels (sticky edge)
-TEST_P(DockedWindowResizerTest, AttachLeftOvershoot) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- DragRelativeToEdge(DOCKED_EDGE_LEFT, window.get(), -4);
-
- // The window should be docked at the left edge.
- EXPECT_EQ(window->GetRootWindow()->bounds().x(),
- window->GetBoundsInScreen().x());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-}
-
-// Verifies a window can be dragged and then if a pointer is not quite reaching
-// the screen edge the window does not get docked and stays in the desktop.
-TEST_P(DockedWindowResizerTest, AttachLeftUndershoot) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- gfx::Rect initial_bounds(window->bounds());
- DragRelativeToEdge(DOCKED_EDGE_LEFT, window.get(), 1);
-
- // The window should be crossing the screen edge but not docked.
- int expected_x = initial_bounds.x() - initial_location_in_parent().x() + 1;
- EXPECT_EQ(expected_x, window->GetBoundsInScreen().x());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer,
- window->parent()->id());
-}
-
-// Dock on the right side, change shelf alignment, check that windows move to
-// the opposite side.
-TEST_P(DockedWindowResizerTest, AttachRightChangeShelf) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0);
-
- // The window should be docked at the right edge.
- EXPECT_EQ(window->GetRootWindow()->bounds().right(),
- window->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-
- // set launcher shelf to be aligned on the right
- ash::Shell* shell = ash::Shell::GetInstance();
- shell->SetShelfAlignment(SHELF_ALIGNMENT_RIGHT,
- shell->GetPrimaryRootWindow());
- // The window should have moved and get attached to the left dock.
- EXPECT_EQ(window->GetRootWindow()->bounds().x(),
- window->GetBoundsInScreen().x());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-
- // set launcher shelf to be aligned on the left
- shell->SetShelfAlignment(SHELF_ALIGNMENT_LEFT,
- shell->GetPrimaryRootWindow());
- // The window should have moved and get attached to the right edge.
- EXPECT_EQ(window->GetRootWindow()->bounds().right(),
- window->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-
- // set launcher shelf to be aligned at the bottom
- shell->SetShelfAlignment(SHELF_ALIGNMENT_BOTTOM,
- shell->GetPrimaryRootWindow());
- // The window should stay in the right edge.
- EXPECT_EQ(window->GetRootWindow()->bounds().right(),
- window->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-}
-
-// Dock on the right side, try to undock, then drag more to really undock
-TEST_P(DockedWindowResizerTest, AttachTryDetach) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> window(CreateTestWindow(
- gfx::Rect(0, 0, ideal_width() + 10, 201)));
- DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0);
-
- // The window should be docked at the right edge.
- // Its width should shrink to ideal width.
- EXPECT_EQ(window->GetRootWindow()->bounds().right(),
- window->GetBoundsInScreen().right());
- EXPECT_EQ(ideal_width(), window->GetBoundsInScreen().width());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-
- // Try to detach by dragging left less than kSnapToDockDistance.
- // The window should stay docked.
- ASSERT_NO_FATAL_FAILURE(DragStartAtOffsetFromWindowOrigin(
- window.get(), 10, 0));
- DragMove(-4, -10);
- // Release the mouse and the window should be still attached to the dock.
- DragEnd();
-
- // The window should be still attached to the right edge.
- EXPECT_EQ(window->GetRootWindow()->bounds().right(),
- window->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-
- // Try to detach by dragging left by kSnapToDockDistance or more.
- // The window should get undocked.
- const int left_edge = window->bounds().x();
- ASSERT_NO_FATAL_FAILURE(DragStart(window.get()));
- DragMove(-32, -10);
- // Release the mouse and the window should be no longer attached to the dock.
- DragEnd();
-
- // The window should be floating on the desktop again and moved to the left.
- EXPECT_EQ(left_edge - 32, window->GetBoundsInScreen().x());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer,
- window->parent()->id());
-}
-
-// Minimize a docked window, then restore it and check that it is still docked.
-TEST_P(DockedWindowResizerTest, AttachMinimizeRestore) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0);
-
- // The window should be docked at the right edge.
- EXPECT_EQ(window->GetRootWindow()->bounds().right(),
- window->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- // Minimize the window, it should be hidden.
- window_state->Minimize();
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(window->IsVisible());
- EXPECT_TRUE(window_state->IsMinimized());
- // Restore the window; window should be visible.
- window_state->Restore();
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(window->IsVisible());
- EXPECT_TRUE(window_state->IsNormalShowState());
-}
-
-// Maximize a docked window and check that it is maximized and no longer docked.
-TEST_P(DockedWindowResizerTest, AttachMaximize) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0);
-
- // The window should be docked at the right edge.
- EXPECT_EQ(window->GetRootWindow()->bounds().right(),
- window->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- // Maximize the window, it should get undocked and maximized in a desktop.
- window_state->Maximize();
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(window->IsVisible());
- EXPECT_TRUE(window_state->IsMaximized());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id());
-}
-
-// Dock two windows, undock one, check that the other one is still docked.
-TEST_P(DockedWindowResizerTest, AttachTwoWindows) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- scoped_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 50);
-
- // Both windows should be docked at the right edge.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
-
- EXPECT_EQ(w2->GetRootWindow()->bounds().right(),
- w2->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
-
- // Detach by dragging left (should get undocked).
- const int left_edge = w2->bounds().x();
- ASSERT_NO_FATAL_FAILURE(DragStart(w2.get()));
- // Drag up as well to avoid attaching panels to launcher shelf.
- DragMove(-32, -100);
- // Release the mouse and the window should be no longer attached to the edge.
- DragEnd();
-
- // The first window should be still docked.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
-
- // The window should be floating on the desktop again and moved to the left.
- EXPECT_EQ(left_edge - 32, w2->GetBoundsInScreen().x());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer,
- w2->parent()->id());
-}
-
-// Create two windows, dock one and change shelf to auto-hide.
-TEST_P(DockedWindowResizerTest, AttachOneAutoHideShelf) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
-
- // w1 should be docked at the right edge.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
-
- scoped_ptr<aura::Window> w2(CreateTestWindowInShellWithDelegateAndType(
- NULL, aura::client::WINDOW_TYPE_NORMAL, 0, gfx::Rect(20, 20, 150, 20)));
- wm::GetWindowState(w2.get())->Maximize();
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id());
- EXPECT_TRUE(wm::GetWindowState(w2.get())->IsMaximized());
-
- gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
- DockedWindowLayoutManager* manager =
- static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager());
-
- // Docked window should be centered vertically in the work area.
- EXPECT_EQ(work_area.CenterPoint().y(), w1->bounds().CenterPoint().y());
- // Docked background should extend to the bottom of work area.
- EXPECT_EQ(work_area.bottom(), manager->docked_bounds().bottom());
-
- // set launcher shelf to be aligned on the right
- ash::Shell* shell = ash::Shell::GetInstance();
- shell->SetShelfAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
- shell->GetPrimaryRootWindow());
- work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
- // Docked window should be centered vertically in the work area.
- EXPECT_EQ(work_area.CenterPoint().y(), w1->bounds().CenterPoint().y());
- // Docked background should extend to the bottom of work area.
- EXPECT_EQ(work_area.bottom(), manager->docked_bounds().bottom());
-}
-
-// Dock one window, try to dock another window on the opposite side (should not
-// dock).
-TEST_P(DockedWindowResizerTest, AttachOnTwoSides) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- scoped_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- gfx::Rect initial_bounds(w2->bounds());
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_LEFT, w2.get(), 50);
-
- // The first window should be docked at the right edge.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
-
- // The second window should be near the left edge but not snapped.
- // Normal window will get side-maximized while panels will not.
- int expected_x = test_panels() ?
- (initial_bounds.x() - initial_location_in_parent().x()) : 0;
- EXPECT_EQ(expected_x, w2->GetBoundsInScreen().x());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id());
-}
-
-// Tests that reverting a drag restores docked state if a window was docked.
-TEST_P(DockedWindowResizerTest, RevertDragRestoresAttachment) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0);
-
- // The window should be docked at the right edge.
- EXPECT_EQ(window->GetRootWindow()->bounds().right(),
- window->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-
- // Drag the window out but revert the drag
- ASSERT_NO_FATAL_FAILURE(DragStart(window.get()));
- DragMove(-50, 0);
- DragRevert();
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-
- // Detach window.
- ASSERT_NO_FATAL_FAILURE(DragStart(window.get()));
- DragMove(-50, 0);
- DragEnd();
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer,
- window->parent()->id());
-}
-
-// Tests that reverting drag restores undocked state if a window was not docked.
-TEST_P(DockedWindowResizerTest, RevertDockedDragRevertsAttachment) {
- if (!SupportsHostWindowResize())
- return;
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- int previous_container_id = window->parent()->id();
- // Drag the window out but revert the drag
- ASSERT_NO_FATAL_FAILURE(DragStart(window.get()));
- DragMove(-50 - window->bounds().x(), 50 - window->bounds().y());
- EXPECT_EQ(CorrectContainerIdDuringDrag(), window->parent()->id());
- DragRevert();
- EXPECT_EQ(previous_container_id, window->parent()->id());
-}
-
-// Move a docked window to the second display
-TEST_P(DockedWindowResizerTest, DragAcrossDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("800x800,800x800");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- EXPECT_EQ(2, static_cast<int>(root_windows.size()));
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- gfx::Rect initial_bounds = window->GetBoundsInScreen();
- EXPECT_EQ(root_windows[0], window->GetRootWindow());
-
- DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0);
- // The window should be docked at the right edge.
- EXPECT_EQ(window->GetRootWindow()->bounds().right(),
- window->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
-
- // Try dragging to the right - enough to get it peeking at the other screen
- // but not enough to land in the other screen.
- // The window should stay on the left screen.
- ASSERT_NO_FATAL_FAILURE(DragStart(window.get()));
- DragMove(100, 0);
- EXPECT_EQ(CorrectContainerIdDuringDrag(), window->parent()->id());
- DragEnd();
- EXPECT_EQ(window->GetRootWindow()->bounds().right(),
- window->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer,
- window->parent()->id());
- EXPECT_EQ(root_windows[0], window->GetRootWindow());
-
- // Undock and move to the right - enough to get the mouse pointer past the
- // edge of the screen and into the second screen. The window should now be
- // in the second screen and not docked.
- ASSERT_NO_FATAL_FAILURE(DragStartAtOffsetFromWindowOrigin(
- window.get(),
- window->bounds().width()/2 + 10,
- 0));
- DragMove(window->bounds().width()/2 - 5, 0);
- EXPECT_EQ(CorrectContainerIdDuringDrag(), window->parent()->id());
- DragEnd();
- EXPECT_NE(window->GetRootWindow()->bounds().right(),
- window->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer,
- window->parent()->id());
- EXPECT_EQ(root_windows[1], window->GetRootWindow());
-
- // Keep dragging it to the right until its left edge touches the screen edge.
- // The window should now be in the second screen and not docked.
- ASSERT_NO_FATAL_FAILURE(DragStartAtOffsetFromWindowOrigin(
- window.get(),
- window->bounds().width()/2 + 10,
- 0));
- DragMove(window->GetRootWindow()->GetBoundsInScreen().x() -
- window->GetBoundsInScreen().x(),
- 0);
- EXPECT_EQ(CorrectContainerIdDuringDrag(), window->parent()->id());
- DragEnd();
- EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().x(),
- window->GetBoundsInScreen().x());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id());
- EXPECT_EQ(root_windows[1], window->GetRootWindow());
-}
-
-// Dock two windows, undock one.
-// Test the docked windows area size and default container resizing.
-TEST_P(DockedWindowResizerTest, AttachTwoWindowsDetachOne) {
- if (!SupportsHostWindowResize())
- return;
- UpdateDisplay("600x600");
-
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- scoped_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 210, 201)));
- // Work area should cover the whole screen.
- EXPECT_EQ(ScreenAsh::GetDisplayBoundsInParent(w2.get()).width(),
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(w2.get()).width());
-
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- // A window should be docked at the right edge.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- DockedWindowLayoutManager* manager =
- static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager());
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
-
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 100);
- // Both windows should now be docked at the right edge.
- EXPECT_EQ(w2->GetRootWindow()->bounds().right(),
- w2->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
- // Dock width should be set to a wider window.
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- EXPECT_EQ(std::max(w1->bounds().width(), w2->bounds().width()),
- docked_width(manager));
-
- // Try to detach by dragging left a bit (should not get undocked).
- // This would normally detach a single docked window but since we have another
- // window and the mouse pointer does not leave the dock area the window
- // should stay docked.
- ASSERT_NO_FATAL_FAILURE(DragStartAtOffsetFromWindowOrigin(w2.get(), 60, 0));
- // Drag up as well as left to avoid attaching panels to launcher shelf.
- DragMove(-40, -40);
- // Release the mouse and the window should be still attached to the edge.
- DragEnd();
-
- // The first window should be still docked.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
-
- // The second window should be still docked.
- EXPECT_EQ(w2->GetRootWindow()->bounds().right(),
- w2->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
-
- // Detach by dragging left more (should get undocked).
- const int left_edge = w2->bounds().x();
- ASSERT_NO_FATAL_FAILURE(DragStartAtOffsetFromWindowOrigin(
- w2.get(),
- w2->bounds().width()/2 + 10,
- 0));
- // Drag up as well to avoid attaching panels to launcher shelf.
- const int drag_x = -(w2->bounds().width()/2 + 20);
- DragMove(drag_x, -100);
- // Release the mouse and the window should be no longer attached to the edge.
- DragEnd();
-
- // The second window should be floating on the desktop again.
- EXPECT_EQ(left_edge + drag_x, w2->bounds().x());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id());
- // Dock width should be set to remaining single docked window.
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
-}
-
-// Dock one of the windows. Maximize other testing desktop resizing.
-TEST_P(DockedWindowResizerTest, AttachWindowMaximizeOther) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- scoped_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 210, 201)));
- // Work area should cover the whole screen.
- EXPECT_EQ(ScreenAsh::GetDisplayBoundsInParent(w2.get()).width(),
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(w2.get()).width());
-
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- // A window should be docked at the right edge.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- DockedWindowLayoutManager* manager =
- static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager());
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
-
- ASSERT_NO_FATAL_FAILURE(DragStartAtOffsetFromWindowOrigin(w2.get(), 25, 5));
- DragMove(w2->GetRootWindow()->bounds().right()
- -w2->bounds().width()
- -(w2->bounds().width()/2 + 20)
- -w2->bounds().x(),
- 50 - w2->bounds().y());
- DragEnd();
- // The first window should be still docked.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
-
- // The second window should be floating on the desktop.
- EXPECT_EQ(w2->GetRootWindow()->bounds().right() -
- (w2->bounds().width()/2 + 20),
- w2->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id());
- // Dock width should be set to remaining single docked window.
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
- // Desktop work area should now shrink.
- EXPECT_EQ(ScreenAsh::GetDisplayBoundsInParent(w2.get()).width() -
- docked_width(manager) - min_dock_gap(),
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(w2.get()).width());
-
- // Maximize the second window - Maximized area should be shrunk.
- const gfx::Rect restored_bounds = w2->bounds();
- wm::WindowState* w2_state = wm::GetWindowState(w2.get());
- w2_state->Maximize();
- EXPECT_EQ(ScreenAsh::GetDisplayBoundsInParent(w2.get()).width() -
- docked_width(manager) - min_dock_gap(),
- w2->bounds().width());
-
- // Detach the first window (this should require very little drag).
- ASSERT_NO_FATAL_FAILURE(DragStart(w1.get()));
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- DragMove(-35, 10);
- // Alignment is set to "NONE" when drag starts.
- EXPECT_EQ(DOCKED_ALIGNMENT_NONE, docked_alignment(manager));
- // Release the mouse and the window should be no longer attached to the edge.
- DragEnd();
- EXPECT_EQ(DOCKED_ALIGNMENT_NONE, docked_alignment(manager));
- // Dock should get shrunk and desktop should get expanded.
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w1->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id());
- EXPECT_EQ(DOCKED_ALIGNMENT_NONE, docked_alignment(manager));
- EXPECT_EQ(0, docked_width(manager));
- // The second window should now get resized and take up the whole screen.
- EXPECT_EQ(ScreenAsh::GetDisplayBoundsInParent(w2.get()).width(),
- w2->bounds().width());
-
- // Dock the first window to the left edge.
- // Click at an offset from origin to prevent snapping.
- ASSERT_NO_FATAL_FAILURE(DragStartAtOffsetFromWindowOrigin(w1.get(), 10, 0));
- // Drag left to get pointer touching the screen edge.
- DragMove(-w1->bounds().x() - 10, 0);
- // Alignment set to "NONE" during the drag of the window when none are docked.
- EXPECT_EQ(DOCKED_ALIGNMENT_NONE, docked_alignment(manager));
- // Release the mouse and the window should be now attached to the edge.
- DragEnd();
- // Dock should get expanded and desktop should get shrunk.
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(DOCKED_ALIGNMENT_LEFT, docked_alignment(manager));
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
- // Second window should still be in the desktop.
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id());
- // Maximized window should be shrunk.
- EXPECT_EQ(ScreenAsh::GetDisplayBoundsInParent(w2.get()).width() -
- docked_width(manager) - min_dock_gap(),
- w2->bounds().width());
-
- // Unmaximize the second window.
- w2_state->Restore();
- // Its bounds should get restored.
- EXPECT_EQ(restored_bounds, w2->bounds());
-}
-
-// Dock one window. Test the sticky behavior near screen or desktop edge.
-TEST_P(DockedWindowResizerTest, AttachOneTestSticky) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- scoped_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 210, 201)));
- // Work area should cover the whole screen.
- EXPECT_EQ(ScreenAsh::GetDisplayBoundsInParent(w2.get()).width(),
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(w2.get()).width());
-
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_LEFT, w1.get(), 20);
- // A window should be docked at the left edge.
- EXPECT_EQ(w1->GetRootWindow()->bounds().x(),
- w1->GetBoundsInScreen().x());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- DockedWindowLayoutManager* manager =
- static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager());
- // The first window should be docked.
- EXPECT_EQ(w1->GetRootWindow()->bounds().x(),
- w1->GetBoundsInScreen().x());
- // Dock width should be set to that of a single docked window.
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(DOCKED_ALIGNMENT_LEFT, docked_alignment(manager));
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
-
- // Position second window in the desktop 20px to the right of the docked w1.
- DragToVerticalPositionRelativeToEdge(DOCKED_EDGE_LEFT,
- w2.get(),
- 20 + 25 -
- min_dock_gap(),
- 50);
- // The second window should be floating on the desktop.
- EXPECT_EQ(w2->GetRootWindow()->bounds().x() + (w1->bounds().right() + 20),
- w2->GetBoundsInScreen().x());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id());
- // Dock width should be set to that of a single docked window.
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(DOCKED_ALIGNMENT_LEFT, docked_alignment(manager));
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
-
- // Drag w2 almost to the dock, the mouse pointer not quite reaching the dock.
- ASSERT_NO_FATAL_FAILURE(DragStartAtOffsetFromWindowOrigin(w2.get(), 10, 0));
- DragMove(1 + docked_width(manager) - w2->bounds().x(), 0);
- // Alignment set to "LEFT" during the drag because dock has a window in it.
- EXPECT_EQ(DOCKED_ALIGNMENT_LEFT, docked_alignment(manager));
- // Release the mouse and the window should not be attached to the edge.
- DragEnd();
- // Dock should still have only one window in it.
- EXPECT_EQ(DOCKED_ALIGNMENT_LEFT, docked_alignment(manager));
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
- // The second window should still be in the desktop.
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id());
-
- // Drag w2 by a bit more - it should resist the drag (stuck edges)
- int start_x = w2->bounds().x();
- ASSERT_NO_FATAL_FAILURE(DragStartAtOffsetFromWindowOrigin(w2.get(), 100, 5));
- DragMove(-2, 0);
- // Window should not actually move.
- EXPECT_EQ(start_x, w2->bounds().x());
- // Alignment set to "LEFT" during the drag because dock has a window in it.
- EXPECT_EQ(DOCKED_ALIGNMENT_LEFT, docked_alignment(manager));
- // Release the mouse and the window should not be attached to the edge.
- DragEnd();
- // Window should be still where it was before the last drag started.
- EXPECT_EQ(start_x, w2->bounds().x());
- // Dock should still have only one window in it
- EXPECT_EQ(DOCKED_ALIGNMENT_LEFT, docked_alignment(manager));
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
- // The second window should still be in the desktop
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id());
-
- // Drag w2 by more than the stuck threshold and drop it into the dock.
- ASSERT_NO_FATAL_FAILURE(DragStart(w2.get()));
- DragMove(-100, 0);
- // Window should actually move.
- EXPECT_NE(start_x, w2->bounds().x());
- // Alignment set to "LEFT" during the drag because dock has a window in it.
- EXPECT_EQ(DOCKED_ALIGNMENT_LEFT, docked_alignment(manager));
- // Release the mouse and the window should be attached to the edge.
- DragEnd();
- // Both windows are docked now.
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
- // Dock should get expanded and desktop should get shrunk.
- EXPECT_EQ(DOCKED_ALIGNMENT_LEFT, docked_alignment(manager));
- EXPECT_EQ(std::max(w1->bounds().width(), w2->bounds().width()),
- docked_width(manager));
- // Desktop work area should now shrink by dock width.
- EXPECT_EQ(ScreenAsh::GetDisplayBoundsInParent(w2.get()).width() -
- docked_width(manager) - min_dock_gap(),
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(w2.get()).width());
-}
-
-// Dock two windows, resize one.
-// Test the docked windows area size and remaining desktop resizing.
-TEST_P(DockedWindowResizerTest, ResizeOneOfTwoWindows) {
- if (!SupportsHostWindowResize())
- return;
-
- // Wider display to start since panels are limited to half the display width.
- UpdateDisplay("1000x600");
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- scoped_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 210, 201)));
- // Work area should cover the whole screen.
- EXPECT_EQ(ScreenAsh::GetDisplayBoundsInParent(w2.get()).width(),
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(w2.get()).width());
-
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- // A window should be docked at the right edge.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- DockedWindowLayoutManager* manager =
- static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager());
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
-
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 100);
- // Both windows should now be docked at the right edge.
- EXPECT_EQ(w2->GetRootWindow()->bounds().right(),
- w2->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
- // Dock width should be set to a wider window.
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- EXPECT_EQ(std::max(w1->bounds().width(), w2->bounds().width()),
- docked_width(manager));
-
- // Resize the first window left by a bit and test that the dock expands.
- int previous_width = w1->bounds().width();
- const int kResizeSpan1 = 30;
- ASSERT_NO_FATAL_FAILURE(ResizeStartAtOffsetFromWindowOrigin(w1.get(),
- 0, 20,
- HTLEFT));
- DragMove(-kResizeSpan1, 0);
- // Alignment set to "RIGHT" during the drag because dock has a window in it.
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- // Release the mouse and the window should be attached to the edge.
- DragEnd();
- // Dock should still have both windows in it.
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- // w1 is now wider than before. The dock should expand and be as wide as w1.
- EXPECT_EQ(previous_width + kResizeSpan1, w1->bounds().width());
- // Both windows should get resized since they both don't have min/max size.
- EXPECT_EQ(w1->bounds().width(), w2->bounds().width());
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
- // Desktop work area should shrink.
- EXPECT_EQ(ScreenAsh::GetDisplayBoundsInParent(w2.get()).width() -
- docked_width(manager) - min_dock_gap(),
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(w2.get()).width());
-
- // Resize the first window left by more than the dock maximum width.
- // This should cause the window width to be restricted by maximum dock width.
- previous_width = w1->bounds().width();
- const int kResizeSpan2 = 250;
- ASSERT_NO_FATAL_FAILURE(ResizeStartAtOffsetFromWindowOrigin(w1.get(),
- 0, 20,
- HTLEFT));
- DragMove(-kResizeSpan2, 0);
- // Alignment set to "RIGHT" during the drag because dock has a window in it.
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- // Release the mouse and the window should be attached to the edge.
- DragEnd();
- // Dock should still have both windows in it.
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- // w1 is now as wide as the maximum dock width and the dock should get
- // resized to the maximum width.
- EXPECT_EQ(max_width(), w1->bounds().width());
- // Both windows should get resized since they both don't have min/max size.
- EXPECT_EQ(w1->bounds().width(), w2->bounds().width());
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
- // Desktop work area should shrink.
- EXPECT_EQ(ScreenAsh::GetDisplayBoundsInParent(w2.get()).width() -
- docked_width(manager) - min_dock_gap(),
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(w2.get()).width());
-
- // Resize the first window right to get it completely inside the docked area.
- previous_width = w1->bounds().width();
- const int kResizeSpan3 = 100;
- ASSERT_NO_FATAL_FAILURE(ResizeStartAtOffsetFromWindowOrigin(w1.get(),
- 0, 20,
- HTLEFT));
- DragMove(kResizeSpan3, 0);
- // Alignment set to "RIGHT" during the drag because dock has a window in it.
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- // Release the mouse and the window should be docked.
- DragEnd();
- // Dock should still have both windows in it.
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- // w1 should be narrower than before by the length of the drag.
- EXPECT_EQ(previous_width - kResizeSpan3, w1->bounds().width());
- // Both windows should get resized since they both don't have min/max size.
- EXPECT_EQ(w1->bounds().width(), w2->bounds().width());
- // The dock should be as wide as w1 or w2.
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
- // Desktop work area should shrink.
- EXPECT_EQ(ScreenAsh::GetDisplayBoundsInParent(w2.get()).width() -
- docked_width(manager) - min_dock_gap(),
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(w2.get()).width());
-
- // Resize the first window left to be overhang again.
- previous_width = w1->bounds().width();
- ASSERT_NO_FATAL_FAILURE(ResizeStartAtOffsetFromWindowOrigin(w1.get(),
- 0, 20,
- HTLEFT));
- DragMove(-kResizeSpan3, 0);
- DragEnd();
- EXPECT_EQ(previous_width + kResizeSpan3, w1->bounds().width());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- // Docked area should be as wide as possible (maximum) and same as w1.
- EXPECT_EQ(max_width(), docked_width(manager));
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
-
- // Undock the first window. Docked area should shrink to its ideal size.
- ASSERT_NO_FATAL_FAILURE(DragStart(w1.get()));
- // Drag up as well to avoid attaching panels to launcher shelf.
- DragMove(-(400 - 210), -100);
- // Alignment set to "RIGHT" since we have another window docked.
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- // Release the mouse and the window should be no longer attached to the edge.
- DragEnd();
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w1->parent()->id());
- // Dock should be as wide as w2 (and same as ideal width).
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- EXPECT_EQ(ideal_width(), docked_width(manager));
- EXPECT_EQ(w2->bounds().width(), docked_width(manager));
- // The second window should be still docked.
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
- // Desktop work area should be inset.
- EXPECT_EQ(ScreenAsh::GetDisplayBoundsInParent(w1.get()).width() -
- docked_width(manager) - min_dock_gap(),
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(w1.get()).width());
-}
-
-// Dock a window, resize it and test that undocking it preserves the width.
-TEST_P(DockedWindowResizerTest, ResizingKeepsWidth) {
- if (!SupportsHostWindowResize())
- return;
-
- // Wider display to start since panels are limited to half the display width.
- UpdateDisplay("1000x600");
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
-
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- // A window should be docked at the right edge.
- EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- DockedWindowLayoutManager* manager =
- static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager());
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
-
- // Resize the window left by a bit and test that the dock expands.
- int previous_width = w1->bounds().width();
- const int kResizeSpan1 = 30;
- ASSERT_NO_FATAL_FAILURE(ResizeStartAtOffsetFromWindowOrigin(w1.get(),
- 0, 20,
- HTLEFT));
- DragMove(-kResizeSpan1, 0);
- // Alignment set to "RIGHT" during the drag because the only docked window
- // is being dragged.
- EXPECT_EQ(DOCKED_ALIGNMENT_NONE, docked_alignment(manager));
- // Release the mouse and the window should be attached to the edge.
- DragEnd();
- // A window should get docked.
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- // w1 is now wider and the dock should expand to be as wide as w1.
- EXPECT_EQ(previous_width + kResizeSpan1, w1->bounds().width());
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
-
- // Undock by dragging almost to the left edge.
- DragToVerticalPositionRelativeToEdge(DOCKED_EDGE_LEFT, w1.get(), 100, 20);
- // Width should be preserved.
- EXPECT_EQ(previous_width + kResizeSpan1, w1->bounds().width());
- // Height should be restored to what it was originally.
- EXPECT_EQ(201, w1->bounds().height());
-
- // Dock again.
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- // Width should be reset to initial ideal width (25px).
- EXPECT_EQ(ideal_width(), w1->bounds().width());
-
- // Undock again by dragging left.
- DragToVerticalPositionRelativeToEdge(DOCKED_EDGE_LEFT, w1.get(), 100, 20);
- // Width should be reset to what it was last time the window was not docked.
- EXPECT_EQ(previous_width + kResizeSpan1, w1->bounds().width());
- // Height should be restored to what it was originally.
- EXPECT_EQ(201, w1->bounds().height());
-}
-
-// Dock two windows, resize one. Test the docked windows area size.
-TEST_P(DockedWindowResizerTest, ResizeTwoWindows) {
- if (!SupportsHostWindowResize())
- return;
-
- // Wider display to start since panels are limited to half the display width.
- UpdateDisplay("1000x600");
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- scoped_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 210, 201)));
-
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 100);
- // Both windows should now be docked at the right edge.
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
- // Dock width should be set to ideal width.
- DockedWindowLayoutManager* manager =
- static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager());
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- EXPECT_EQ(ideal_width(), docked_width(manager));
-
- // Resize the first window left by a bit and test that the dock expands.
- int previous_width = w1->bounds().width();
- const int kResizeSpan1 = 30;
- ASSERT_NO_FATAL_FAILURE(ResizeStartAtOffsetFromWindowOrigin(w1.get(),
- 0, 20,
- HTLEFT));
- DragMove(-kResizeSpan1, 0);
- DragEnd();
- // w1 is now wider than before.
- EXPECT_EQ(previous_width + kResizeSpan1, w1->bounds().width());
- // Both windows should get resized since they both don't have min/max size.
- EXPECT_EQ(w1->bounds().width(), w2->bounds().width());
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
-
- // Resize the second window left by a bit more and test that the dock expands.
- previous_width = w2->bounds().width();
- ASSERT_NO_FATAL_FAILURE(ResizeStartAtOffsetFromWindowOrigin(w2.get(),
- 0, 20,
- HTLEFT));
- DragMove(-kResizeSpan1, 0);
- DragEnd();
- // Only w2 should get wider since w1 was resized by a user.
- EXPECT_EQ(previous_width + kResizeSpan1, w2->bounds().width());
- // w1 should stays same size as before since it was resized by a user.
- EXPECT_EQ(previous_width, w1->bounds().width());
- EXPECT_EQ(w2->bounds().width(), docked_width(manager));
-
- // Undock w2 and then dock it back.
- DragToVerticalPositionRelativeToEdge(DOCKED_EDGE_RIGHT, w2.get(), -400, 100);
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w2->parent()->id());
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 100);
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
- // w2 should become same width as w1.
- EXPECT_EQ(w1->bounds().width(), w2->bounds().width());
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
-
- // Make w1 even wider.
- ASSERT_NO_FATAL_FAILURE(ResizeStartAtOffsetFromWindowOrigin(w1.get(),
- 0, 20,
- HTLEFT));
- DragMove(-kResizeSpan1, 0);
- DragEnd();
- // Making w1 wider should make both windows wider since w2 no longer remembers
- // user width.
- EXPECT_EQ(w1->bounds().width(), w2->bounds().width());
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
-}
-
-// Tests that dragging a window down to shelf attaches a panel but does not
-// attach a regular window.
-TEST_P(DockedWindowResizerTest, DragToShelf) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- // Work area should cover the whole screen.
- EXPECT_EQ(ScreenAsh::GetDisplayBoundsInParent(w1.get()).width(),
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(w1.get()).width());
-
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- // A window should be docked at the right edge.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- DockedWindowLayoutManager* manager =
- static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager());
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
-
- // Detach and drag down to shelf.
- ASSERT_NO_FATAL_FAILURE(DragStart(w1.get()));
- DragMove(-40, 0);
- // Alignment is set to "NONE" when drag starts.
- EXPECT_EQ(DOCKED_ALIGNMENT_NONE, docked_alignment(manager));
- // Release the mouse and the window should be no longer attached to the edge.
- DragEnd();
- EXPECT_EQ(DOCKED_ALIGNMENT_NONE, docked_alignment(manager));
-
- // Drag down almost to shelf. A panel will snap, a regular window won't.
- ShelfWidget* shelf = Launcher::ForPrimaryDisplay()->shelf_widget();
- const int shelf_y = shelf->GetWindowBoundsInScreen().y();
- const int kDistanceFromShelf = 10;
- ASSERT_NO_FATAL_FAILURE(DragStart(w1.get()));
- DragMove(0, -kDistanceFromShelf + shelf_y - w1->bounds().bottom());
- DragEnd();
- if (test_panels()) {
- // The panel should be touching the shelf and attached.
- EXPECT_EQ(shelf_y, w1->bounds().bottom());
- EXPECT_TRUE(wm::GetWindowState(w1.get())->panel_attached());
- } else {
- // The window should not be touching the shelf.
- EXPECT_EQ(shelf_y - kDistanceFromShelf, w1->bounds().bottom());
- }
-}
-
-// Tests that docking and undocking a |window| with a transient child properly
-// maintains the parent of that transient child to be the same as the |window|.
-TEST_P(DockedWindowResizerTest, DragWindowWithTransientChild) {
- if (!SupportsHostWindowResize())
- return;
-
- // Create a window with a transient child.
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- scoped_ptr<aura::Window> child(CreateTestWindowInShellWithDelegateAndType(
- NULL, aura::client::WINDOW_TYPE_NORMAL, 0, gfx::Rect(20, 20, 150, 20)));
- window->AddTransientChild(child.get());
- if (window->parent() != child->parent())
- window->parent()->AddChild(child.get());
- EXPECT_EQ(window.get(), child->transient_parent());
-
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, window.get(), 20);
-
- // A window should be docked at the right edge.
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, child->parent()->id());
-
- // Drag the child - it should move freely and stay where it is dragged.
- ASSERT_NO_FATAL_FAILURE(DragStart(child.get()));
- DragMove(500, 20);
- DragEnd();
- EXPECT_EQ(gfx::Point(20 + 500, 20 + 20).ToString(),
- child->GetBoundsInScreen().origin().ToString());
-
- // Undock the window by dragging left.
- ASSERT_NO_FATAL_FAILURE(DragStart(window.get()));
- DragMove(-32, -10);
- DragEnd();
-
- // The window should be undocked and the transient child should be reparented.
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, child->parent()->id());
- // The child should not have moved.
- EXPECT_EQ(gfx::Point(20 + 500, 20 + 20).ToString(),
- child->GetBoundsInScreen().origin().ToString());
-}
-
-// Tests that reparenting windows during the drag does not affect system modal
-// windows that are transient children of the dragged windows.
-TEST_P(DockedWindowResizerTest, DragWindowWithModalTransientChild) {
- if (!SupportsHostWindowResize())
- return;
-
- // Create a window.
- scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- gfx::Rect bounds(window->bounds());
-
- // Start dragging the window.
- ASSERT_NO_FATAL_FAILURE(DragStart(window.get()));
- gfx::Vector2d move_vector(40, test_panels() ? -60 : 60);
- DragMove(move_vector.x(), move_vector.y());
- EXPECT_EQ(CorrectContainerIdDuringDrag(), window->parent()->id());
-
- // While still dragging create a modal window and make it a transient child of
- // the |window|.
- scoped_ptr<aura::Window> child(CreateModalWindow(gfx::Rect(20, 20, 150, 20)));
- window->AddTransientChild(child.get());
- EXPECT_EQ(window.get(), child->transient_parent());
- EXPECT_EQ(internal::kShellWindowId_SystemModalContainer,
- child->parent()->id());
-
- // End the drag, the |window| should have moved (if it is a panel it will
- // no longer be attached to the shelf since we dragged it above).
- DragEnd();
- bounds.Offset(move_vector);
- EXPECT_EQ(bounds.ToString(), window->GetBoundsInScreen().ToString());
-
- // The original |window| should be in the default container (not docked or
- // attached).
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id());
- // The transient |child| should still be in system modal container.
- EXPECT_EQ(internal::kShellWindowId_SystemModalContainer,
- child->parent()->id());
- // The |child| should not have moved.
- EXPECT_EQ(gfx::Point(20, 20).ToString(),
- child->GetBoundsInScreen().origin().ToString());
- // The |child| should still be a transient child of |window|.
- EXPECT_EQ(window.get(), child->transient_parent());
-}
-
-// Tests that side snapping a window undocks it, closes the dock and then snaps.
-TEST_P(DockedWindowResizerTest, SideSnapDocked) {
- if (!SupportsHostWindowResize() || test_panels())
- return;
-
- scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
- wm::WindowState* window_state = wm::GetWindowState(w1.get());
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- // A window should be docked at the right edge.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- DockedWindowLayoutManager* manager =
- static_cast<DockedWindowLayoutManager*>(w1->parent()->layout_manager());
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
- EXPECT_TRUE(window_state->IsDocked());
- EXPECT_FALSE(window_state->IsSnapped());
-
- // Side snap at right edge.
- internal::SnapSizer::SnapWindow(window_state,
- internal::SnapSizer::RIGHT_EDGE);
- // The window should be snapped at the right edge and the dock should close.
- gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(w1.get()));
- EXPECT_EQ(0, docked_width(manager));
- EXPECT_EQ(work_area.height(), w1->bounds().height());
- EXPECT_EQ(work_area.right(), w1->bounds().right());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w1->parent()->id());
- EXPECT_FALSE(window_state->IsDocked());
- EXPECT_TRUE(window_state->IsSnapped());
-
- // Dock again.
- DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
- // A window should be docked at the right edge.
- EXPECT_EQ(w1->GetRootWindow()->bounds().right(),
- w1->GetBoundsInScreen().right());
- EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
- EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, docked_alignment(manager));
- EXPECT_EQ(w1->bounds().width(), docked_width(manager));
- EXPECT_TRUE(window_state->IsDocked());
- EXPECT_FALSE(window_state->IsSnapped());
-
- // Side snap at left edge.
- internal::SnapSizer::SnapWindow(window_state,
- internal::SnapSizer::LEFT_EDGE);
- // The window should be snapped at the right edge and the dock should close.
- EXPECT_EQ(work_area.ToString(),
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(w1.get()).ToString());
- EXPECT_EQ(0, docked_width(manager));
- EXPECT_EQ(work_area.height(), w1->bounds().height());
- EXPECT_EQ(work_area.x(), w1->bounds().x());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, w1->parent()->id());
- EXPECT_FALSE(window_state->IsDocked());
- EXPECT_TRUE(window_state->IsSnapped());
-}
-
-// Tests run twice - on both panels and normal windows
-INSTANTIATE_TEST_CASE_P(NormalOrPanel,
- DockedWindowResizerTest,
- testing::Values(aura::client::WINDOW_TYPE_NORMAL,
- aura::client::WINDOW_TYPE_PANEL));
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/drag_window_controller.cc b/chromium/ash/wm/drag_window_controller.cc
deleted file mode 100644
index 937af3b0abf..00000000000
--- a/chromium/ash/wm/drag_window_controller.cc
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/drag_window_controller.h"
-
-#include "ash/shell_window_ids.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/views/corewm/shadow_types.h"
-#include "ui/views/corewm/window_util.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-DragWindowController::DragWindowController(aura::Window* window)
- : window_(window),
- drag_widget_(NULL),
- layer_(NULL) {
-}
-
-DragWindowController::~DragWindowController() {
- Hide();
-}
-
-void DragWindowController::SetDestinationDisplay(
- const gfx::Display& dst_display) {
- dst_display_ = dst_display;
-}
-
-void DragWindowController::Show() {
- if (!drag_widget_)
- CreateDragWidget(window_->GetBoundsInScreen());
- drag_widget_->Show();
-}
-
-void DragWindowController::SetBounds(const gfx::Rect& bounds) {
- DCHECK(drag_widget_);
- bounds_ = bounds;
- SetBoundsInternal(bounds);
-}
-
-void DragWindowController::Hide() {
- if (drag_widget_) {
- drag_widget_->Close();
- drag_widget_ = NULL;
- }
- if (layer_) {
- views::corewm::DeepDeleteLayers(layer_);
- layer_ = NULL;
- }
-}
-
-void DragWindowController::SetOpacity(float opacity) {
- DCHECK(drag_widget_);
- ui::Layer* layer = drag_widget_->GetNativeWindow()->layer();
- ui::ScopedLayerAnimationSettings scoped_setter(layer->GetAnimator());
- layer->SetOpacity(opacity);
-}
-
-void DragWindowController::CreateDragWidget(const gfx::Rect& bounds) {
- DCHECK(!drag_widget_);
- drag_widget_ = new views::Widget;
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- params.parent = window_->parent();
- params.can_activate = false;
- params.keep_on_top = true;
- drag_widget_->set_focus_on_creation(false);
- drag_widget_->Init(params);
- drag_widget_->SetVisibilityChangedAnimationsEnabled(false);
- drag_widget_->GetNativeWindow()->SetName("DragWindow");
- drag_widget_->GetNativeWindow()->set_id(kShellWindowId_PhantomWindow);
- // Show shadow for the dragging window.
- SetShadowType(drag_widget_->GetNativeWindow(),
- views::corewm::SHADOW_TYPE_RECTANGULAR);
- SetBoundsInternal(bounds);
- drag_widget_->StackAbove(window_);
-
- RecreateWindowLayers();
- aura::Window* window = drag_widget_->GetNativeWindow();
- layer_->SetVisible(true);
- window->layer()->Add(layer_);
- window->layer()->StackAtTop(layer_);
-
- // Show the widget after all the setups.
- drag_widget_->Show();
-
- // Fade the window in.
- ui::Layer* widget_layer = drag_widget_->GetNativeWindow()->layer();
- widget_layer->SetOpacity(0);
- ui::ScopedLayerAnimationSettings scoped_setter(widget_layer->GetAnimator());
- widget_layer->SetOpacity(1);
-}
-
-void DragWindowController::SetBoundsInternal(const gfx::Rect& bounds) {
- aura::Window* window = drag_widget_->GetNativeWindow();
- aura::client::ScreenPositionClient* screen_position_client =
- aura::client::GetScreenPositionClient(window->GetRootWindow());
- if (screen_position_client && dst_display_.is_valid())
- screen_position_client->SetBounds(window, bounds, dst_display_);
- else
- drag_widget_->SetBounds(bounds);
-}
-
-void DragWindowController::RecreateWindowLayers() {
- DCHECK(!layer_);
- layer_ = views::corewm::RecreateWindowLayers(window_, true);
- layer_->set_delegate(window_->layer()->delegate());
- // Place the layer at (0, 0) of the DragWindowController's window.
- gfx::Rect layer_bounds = layer_->bounds();
- layer_bounds.set_origin(gfx::Point(0, 0));
- layer_->SetBounds(layer_bounds);
- layer_->SetVisible(false);
- // Detach it from the current container.
- layer_->parent()->Remove(layer_);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/drag_window_controller.h b/chromium/ash/wm/drag_window_controller.h
deleted file mode 100644
index 08e115de217..00000000000
--- a/chromium/ash/wm/drag_window_controller.h
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_DRAG_WINDOW_CONTROLLER_H_
-#define ASH_WM_DRAG_WINDOW_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/gtest_prod_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/rect.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ui {
-class Layer;
-}
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-namespace internal {
-
-// DragWindowController is responsible for showing a semi-transparent window
-// while dragging a window across displays.
-class ASH_EXPORT DragWindowController {
- public:
- explicit DragWindowController(aura::Window* window);
- virtual ~DragWindowController();
-
- // Sets the display where the window is placed after the window is dropped.
- void SetDestinationDisplay(const gfx::Display& dst_display);
-
- // Shows the drag window at the specified location (coordinates of the
- // parent). If |layer| is non-NULL, it is shown on top of the drag window.
- // |layer| is owned by the caller.
- // This does not immediately show the window.
- void Show();
-
- // Hides the drag window.
- void Hide();
-
- // This is used to set bounds for the drag window immediately. This should
- // be called only when the drag window is already visible.
- void SetBounds(const gfx::Rect& bounds);
-
- // Sets the opacity of the drag window.
- void SetOpacity(float opacity);
-
- private:
- FRIEND_TEST_ALL_PREFIXES(DragWindowResizerTest, DragWindowController);
-
- // Creates and shows the |drag_widget_| at |bounds|.
- // |layer| is shown on top of the drag window if it is non-NULL.
- // |layer| is not owned by this object.
- void CreateDragWidget(const gfx::Rect& bounds);
-
- // Sets bounds of the drag window. The window is shown on |dst_display_|
- // if its id() is valid. Otherwise, a display nearest to |bounds| is chosen.
- void SetBoundsInternal(const gfx::Rect& bounds);
-
- // Recreates a fresh layer for |window_| and all its child windows.
- void RecreateWindowLayers();
-
- // Window the drag window is placed beneath.
- aura::Window* window_;
-
- // The display where the drag is placed. When dst_display_.id() is
- // kInvalidDisplayID (i.e. the default), a display nearest to the current
- // |bounds_| is automatically used.
- gfx::Display dst_display_;
-
- // Initially the bounds of |window_|. Each time Show() is invoked
- // |start_bounds_| is then reset to the bounds of |drag_widget_| and
- // |bounds_| is set to the value passed into Show(). The animation animates
- // between these two values.
- gfx::Rect bounds_;
-
- views::Widget* drag_widget_;
-
- // The copy of window_->layer() and its children. This object is the owner of
- // the layer.
- ui::Layer* layer_;
-
- DISALLOW_COPY_AND_ASSIGN(DragWindowController);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_DRAG_WINDOW_CONTROLLER_H_
diff --git a/chromium/ash/wm/drag_window_resizer.cc b/chromium/ash/wm/drag_window_resizer.cc
deleted file mode 100644
index 000d1198419..00000000000
--- a/chromium/ash/wm/drag_window_resizer.cc
+++ /dev/null
@@ -1,277 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/drag_window_resizer.h"
-
-#include "ash/display/mouse_cursor_event_filter.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/user/tray_user.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ash/wm/drag_window_controller.h"
-#include "ash/wm/window_state.h"
-#include "base/memory/weak_ptr.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-// The maximum opacity of the drag phantom window.
-const float kMaxOpacity = 0.8f;
-
-// The opacity of the window when dragging it over a user item in the tray.
-const float kOpacityWhenDraggedOverUserIcon = 0.4f;
-
-// Returns true if Ash has more than one root window.
-bool HasSecondaryRootWindow() {
- return Shell::GetAllRootWindows().size() > 1;
-}
-
-// When there are two root windows, returns one of the root windows which is not
-// |root_window|. Returns NULL if only one root window exists.
-aura::Window* GetAnotherRootWindow(aura::Window* root_window) {
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- if (root_windows.size() < 2)
- return NULL;
- DCHECK_EQ(2U, root_windows.size());
- if (root_windows[0] == root_window)
- return root_windows[1];
- return root_windows[0];
-}
-
-} // namespace
-
-// static
-DragWindowResizer* DragWindowResizer::instance_ = NULL;
-
-DragWindowResizer::~DragWindowResizer() {
- if (GetTarget())
- wm::GetWindowState(GetTarget())->set_window_resizer_(NULL);
- Shell* shell = Shell::GetInstance();
- shell->mouse_cursor_filter()->set_mouse_warp_mode(
- MouseCursorEventFilter::WARP_ALWAYS);
- shell->mouse_cursor_filter()->HideSharedEdgeIndicator();
- if (instance_ == this)
- instance_ = NULL;
-}
-
-// static
-DragWindowResizer* DragWindowResizer::Create(
- WindowResizer* next_window_resizer,
- aura::Window* window,
- const gfx::Point& location,
- int window_component,
- aura::client::WindowMoveSource source) {
- Details details(window, location, window_component, source);
- return details.is_resizable ?
- new DragWindowResizer(next_window_resizer, details) : NULL;
-}
-
-void DragWindowResizer::Drag(const gfx::Point& location, int event_flags) {
- base::WeakPtr<DragWindowResizer> resizer(weak_ptr_factory_.GetWeakPtr());
-
- // If we are on top of a window to desktop transfer button, we move the window
- // temporarily back to where it was initially and make it semi-transparent.
- GetTarget()->layer()->SetOpacity(
- GetTrayUserItemAtPoint(location) ? kOpacityWhenDraggedOverUserIcon :
- details_.initial_opacity);
-
- next_window_resizer_->Drag(location, event_flags);
-
- if (!resizer)
- return;
-
- last_mouse_location_ = location;
- // Show a phantom window for dragging in another root window.
- if (HasSecondaryRootWindow()) {
- gfx::Point location_in_screen = location;
- wm::ConvertPointToScreen(GetTarget()->parent(), &location_in_screen);
- const bool in_original_root =
- wm::GetRootWindowAt(location_in_screen) == GetTarget()->GetRootWindow();
- UpdateDragWindow(GetTarget()->bounds(), in_original_root);
- } else {
- drag_window_controller_.reset();
- }
-}
-
-void DragWindowResizer::CompleteDrag(int event_flags) {
- if (TryDraggingToNewUser())
- return;
-
- next_window_resizer_->CompleteDrag(event_flags);
-
- GetTarget()->layer()->SetOpacity(details_.initial_opacity);
- drag_window_controller_.reset();
-
- // Check if the destination is another display.
- gfx::Point last_mouse_location_in_screen = last_mouse_location_;
- wm::ConvertPointToScreen(GetTarget()->parent(),
- &last_mouse_location_in_screen);
- gfx::Screen* screen = Shell::GetScreen();
- const gfx::Display dst_display =
- screen->GetDisplayNearestPoint(last_mouse_location_in_screen);
-
- if (dst_display.id() !=
- screen->GetDisplayNearestWindow(GetTarget()->GetRootWindow()).id()) {
- const gfx::Rect dst_bounds =
- ScreenAsh::ConvertRectToScreen(GetTarget()->parent(),
- GetTarget()->bounds());
- GetTarget()->SetBoundsInScreen(dst_bounds, dst_display);
- }
-}
-
-void DragWindowResizer::RevertDrag() {
- next_window_resizer_->RevertDrag();
-
- drag_window_controller_.reset();
- GetTarget()->layer()->SetOpacity(details_.initial_opacity);
-}
-
-aura::Window* DragWindowResizer::GetTarget() {
- return next_window_resizer_->GetTarget();
-}
-
-const gfx::Point& DragWindowResizer::GetInitialLocation() const {
- return details_.initial_location_in_parent;
-}
-
-DragWindowResizer::DragWindowResizer(WindowResizer* next_window_resizer,
- const Details& details)
- : next_window_resizer_(next_window_resizer),
- details_(details),
- weak_ptr_factory_(this) {
- // The pointer should be confined in one display during resizing a window
- // because the window cannot span two displays at the same time anyway. The
- // exception is window/tab dragging operation. During that operation,
- // |mouse_warp_mode_| should be set to WARP_DRAG so that the user could move a
- // window/tab to another display.
- MouseCursorEventFilter* mouse_cursor_filter =
- Shell::GetInstance()->mouse_cursor_filter();
- mouse_cursor_filter->set_mouse_warp_mode(
- ShouldAllowMouseWarp() ?
- MouseCursorEventFilter::WARP_DRAG : MouseCursorEventFilter::WARP_NONE);
- if (ShouldAllowMouseWarp()) {
- mouse_cursor_filter->ShowSharedEdgeIndicator(
- details.window->GetRootWindow());
- }
- instance_ = this;
-}
-
-void DragWindowResizer::UpdateDragWindow(const gfx::Rect& bounds,
- bool in_original_root) {
- if (details_.window_component != HTCAPTION || !ShouldAllowMouseWarp())
- return;
-
- // It's available. Show a phantom window on the display if needed.
- aura::Window* another_root =
- GetAnotherRootWindow(GetTarget()->GetRootWindow());
- const gfx::Rect root_bounds_in_screen(another_root->GetBoundsInScreen());
- const gfx::Rect bounds_in_screen =
- ScreenAsh::ConvertRectToScreen(GetTarget()->parent(), bounds);
- gfx::Rect bounds_in_another_root =
- gfx::IntersectRects(root_bounds_in_screen, bounds_in_screen);
- const float fraction_in_another_window =
- (bounds_in_another_root.width() * bounds_in_another_root.height()) /
- static_cast<float>(bounds.width() * bounds.height());
-
- if (fraction_in_another_window > 0) {
- if (!drag_window_controller_) {
- drag_window_controller_.reset(
- new DragWindowController(GetTarget()));
- // Always show the drag phantom on the |another_root| window.
- drag_window_controller_->SetDestinationDisplay(
- Shell::GetScreen()->GetDisplayNearestWindow(another_root));
- drag_window_controller_->Show();
- } else {
- // No animation.
- drag_window_controller_->SetBounds(bounds_in_screen);
- }
- const float phantom_opacity =
- !in_original_root ? 1 : (kMaxOpacity * fraction_in_another_window);
- const float window_opacity =
- in_original_root ? 1 : (kMaxOpacity * (1 - fraction_in_another_window));
- drag_window_controller_->SetOpacity(phantom_opacity);
- GetTarget()->layer()->SetOpacity(window_opacity);
- } else {
- drag_window_controller_.reset();
- GetTarget()->layer()->SetOpacity(1.0f);
- }
-}
-
-bool DragWindowResizer::ShouldAllowMouseWarp() {
- return (details_.window_component == HTCAPTION) &&
- !GetTarget()->transient_parent() &&
- (GetTarget()->type() == aura::client::WINDOW_TYPE_NORMAL ||
- GetTarget()->type() == aura::client::WINDOW_TYPE_PANEL);
-}
-
-TrayUser* DragWindowResizer::GetTrayUserItemAtPoint(
- const gfx::Point& point_in_screen) {
- // Unit tests might not have an ash shell.
- if (!ash::Shell::GetInstance())
- return NULL;
-
- // Check that this is a drag move operation from a suitable window.
- if (details_.window_component != HTCAPTION ||
- GetTarget()->transient_parent() ||
- (GetTarget()->type() != aura::client::WINDOW_TYPE_NORMAL &&
- GetTarget()->type() != aura::client::WINDOW_TYPE_PANEL &&
- GetTarget()->type() != aura::client::WINDOW_TYPE_POPUP))
- return NULL;
-
- // We only allow to drag the window onto a tray of it's own RootWindow.
- SystemTray* tray = internal::GetRootWindowController(
- details_.window->GetRootWindow())->GetSystemTray();
-
- // Again - unit tests might not have a tray.
- if (!tray)
- return NULL;
-
- const std::vector<internal::TrayUser*> tray_users = tray->GetTrayUserItems();
- if (tray_users.size() <= 1)
- return NULL;
-
- std::vector<internal::TrayUser*>::const_iterator it = tray_users.begin();
- for (; it != tray_users.end(); ++it) {
- if ((*it)->CanDropWindowHereToTransferToUser(point_in_screen))
- return *it;
- }
- return NULL;
-}
-
-bool DragWindowResizer::TryDraggingToNewUser() {
- TrayUser* tray_user = GetTrayUserItemAtPoint(last_mouse_location_);
- // No need to try dragging if there is no user.
- if (!tray_user)
- return false;
-
- // We have to avoid a brief flash caused by the RevertDrag operation.
- // To do this, we first set the opacity of our target window to 0, so that no
- // matter what the RevertDrag does the window will stay hidden. Then transfer
- // the window to the new owner (which will hide it). RevertDrag will then do
- // it's thing and return the transparency to its original value.
- int old_opacity = GetTarget()->layer()->opacity();
- GetTarget()->layer()->SetOpacity(0);
- GetTarget()->SetBounds(details_.initial_bounds_in_parent);
- if (!tray_user->TransferWindowToUser(details_.window)) {
- GetTarget()->layer()->SetOpacity(old_opacity);
- return false;
- }
- RevertDrag();
- return true;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/drag_window_resizer.h b/chromium/ash/wm/drag_window_resizer.h
deleted file mode 100644
index f88e0779f27..00000000000
--- a/chromium/ash/wm/drag_window_resizer.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_DRAG_WINDOW_RESIZER_H_
-#define ASH_WM_DRAG_WINDOW_RESIZER_H_
-
-#include "ash/wm/window_resizer.h"
-#include "base/compiler_specific.h"
-#include "base/gtest_prod_util.h"
-#include "base/memory/weak_ptr.h"
-#include "ui/gfx/point.h"
-
-namespace ash {
-namespace internal {
-
-class DragWindowController;
-class TrayUser;
-
-// DragWindowResizer is a decorator of WindowResizer and adds the ability to
-// drag windows across displays.
-class ASH_EXPORT DragWindowResizer : public WindowResizer {
- public:
- virtual ~DragWindowResizer();
-
- // Creates a new DragWindowResizer. The caller takes ownership of the
- // returned object. The ownership of |next_window_resizer| is taken by the
- // returned object. Returns NULL if not resizable.
- static DragWindowResizer* Create(WindowResizer* next_window_resizer,
- aura::Window* window,
- const gfx::Point& location,
- int window_component,
- aura::client::WindowMoveSource source);
-
- // WindowResizer:
- virtual void Drag(const gfx::Point& location, int event_flags) OVERRIDE;
- virtual void CompleteDrag(int event_flags) OVERRIDE;
- virtual void RevertDrag() OVERRIDE;
- virtual aura::Window* GetTarget() OVERRIDE;
- virtual const gfx::Point& GetInitialLocation() const OVERRIDE;
-
- private:
- FRIEND_TEST_ALL_PREFIXES(DragWindowResizerTest, DragWindowController);
-
- // Creates DragWindowResizer that adds the ability of dragging windows across
- // displays to |next_window_resizer|. This object takes the ownership of
- // |next_window_resizer|.
- explicit DragWindowResizer(WindowResizer* next_window_resizer,
- const Details& details);
-
- // Updates the bounds of the phantom window for window dragging. Set true on
- // |in_original_root| if the pointer is still in |window()->GetRootWindow()|.
- void UpdateDragWindow(const gfx::Rect& bounds, bool in_original_root);
-
- // Returns true if we should allow the mouse pointer to warp.
- bool ShouldAllowMouseWarp();
-
- // Get the user drop target underneath the given |point_in_screen| or NULL.
- TrayUser* GetTrayUserItemAtPoint(const gfx::Point& point_in_screen);
-
- // Check if a completed drag might cause the window to change active desktops.
- // If the call was causing a "transfer of ownership to another desktop" and it
- // will return false indicating that no further processing is needed.
- bool TryDraggingToNewUser();
-
- scoped_ptr<WindowResizer> next_window_resizer_;
-
- // Shows a semi-transparent image of the window being dragged.
- scoped_ptr<DragWindowController> drag_window_controller_;
-
- const Details details_;
-
- gfx::Point last_mouse_location_;
-
- // Current instance for use by the DragWindowResizerTest.
- static DragWindowResizer* instance_;
-
- base::WeakPtrFactory<DragWindowResizer> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(DragWindowResizer);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_DRAG_WINDOW_RESIZER_H_
diff --git a/chromium/ash/wm/drag_window_resizer_unittest.cc b/chromium/ash/wm/drag_window_resizer_unittest.cc
deleted file mode 100644
index 04e00f2f87e..00000000000
--- a/chromium/ash/wm/drag_window_resizer_unittest.cc
+++ /dev/null
@@ -1,674 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/drag_window_resizer.h"
-
-#include "ash/display/mouse_cursor_event_filter.h"
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/cursor_manager_test_api.h"
-#include "ash/wm/drag_window_controller.h"
-#include "ash/wm/window_util.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/stringprintf.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/gfx/insets.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/widget/widget.h"
-
-#if defined(OS_CHROMEOS)
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/user/tray_user.h"
-#include "ash/test/test_session_state_delegate.h"
-#include "ash/test/test_shell_delegate.h"
-#endif
-
-namespace ash {
-namespace internal {
-namespace {
-
-const int kRootHeight = 600;
-
-} // namespace
-
-class DragWindowResizerTest : public test::AshTestBase {
- public:
- DragWindowResizerTest() {}
- virtual ~DragWindowResizerTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- UpdateDisplay(base::StringPrintf("800x%d", kRootHeight));
-
- aura::Window* root = Shell::GetPrimaryRootWindow();
- gfx::Rect root_bounds(root->bounds());
- EXPECT_EQ(kRootHeight, root_bounds.height());
- EXPECT_EQ(800, root_bounds.width());
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
- window_.reset(new aura::Window(&delegate_));
- window_->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window_->Init(ui::LAYER_NOT_DRAWN);
- ParentWindowInPrimaryRootWindow(window_.get());
- window_->set_id(1);
-
- always_on_top_window_.reset(new aura::Window(&delegate2_));
- always_on_top_window_->SetType(aura::client::WINDOW_TYPE_NORMAL);
- always_on_top_window_->SetProperty(aura::client::kAlwaysOnTopKey, true);
- always_on_top_window_->Init(ui::LAYER_NOT_DRAWN);
- ParentWindowInPrimaryRootWindow(always_on_top_window_.get());
- always_on_top_window_->set_id(2);
-
- system_modal_window_.reset(new aura::Window(&delegate3_));
- system_modal_window_->SetType(aura::client::WINDOW_TYPE_NORMAL);
- system_modal_window_->SetProperty(aura::client::kModalKey,
- ui::MODAL_TYPE_SYSTEM);
- system_modal_window_->Init(ui::LAYER_NOT_DRAWN);
- ParentWindowInPrimaryRootWindow(system_modal_window_.get());
- system_modal_window_->set_id(3);
-
- transient_child_ = new aura::Window(&delegate4_);
- transient_child_->SetType(aura::client::WINDOW_TYPE_NORMAL);
- transient_child_->Init(ui::LAYER_NOT_DRAWN);
- ParentWindowInPrimaryRootWindow(transient_child_);
- transient_child_->set_id(4);
-
- transient_parent_.reset(new aura::Window(&delegate5_));
- transient_parent_->SetType(aura::client::WINDOW_TYPE_NORMAL);
- transient_parent_->Init(ui::LAYER_NOT_DRAWN);
- ParentWindowInPrimaryRootWindow(transient_parent_.get());
- transient_parent_->AddTransientChild(transient_child_);
- transient_parent_->set_id(5);
-
- panel_window_.reset(new aura::Window(&delegate6_));
- panel_window_->SetType(aura::client::WINDOW_TYPE_PANEL);
- panel_window_->Init(ui::LAYER_NOT_DRAWN);
- ParentWindowInPrimaryRootWindow(panel_window_.get());
- }
-
- virtual void TearDown() OVERRIDE {
- window_.reset();
- always_on_top_window_.reset();
- system_modal_window_.reset();
- transient_parent_.reset();
- panel_window_.reset();
- AshTestBase::TearDown();
- }
-
- protected:
- gfx::Point CalculateDragPoint(const WindowResizer& resizer,
- int delta_x,
- int delta_y) const {
- gfx::Point location = resizer.GetInitialLocation();
- location.set_x(location.x() + delta_x);
- location.set_y(location.y() + delta_y);
- return location;
- }
-
- internal::ShelfLayoutManager* shelf_layout_manager() {
- return Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager();
- }
-
- static WindowResizer* CreateDragWindowResizer(
- aura::Window* window,
- const gfx::Point& point_in_parent,
- int window_component) {
- return CreateWindowResizer(
- window,
- point_in_parent,
- window_component,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE).release();
- }
-
- bool WarpMouseCursorIfNecessary(aura::Window* target_root,
- const gfx::Point& point_in_screen) {
- MouseCursorEventFilter* event_filter =
- Shell::GetInstance()->mouse_cursor_filter();
- bool is_warped = event_filter->WarpMouseCursorIfNecessary(target_root,
- point_in_screen);
- event_filter->reset_was_mouse_warped_for_test();
- return is_warped;
- }
-
- aura::test::TestWindowDelegate delegate_;
- aura::test::TestWindowDelegate delegate2_;
- aura::test::TestWindowDelegate delegate3_;
- aura::test::TestWindowDelegate delegate4_;
- aura::test::TestWindowDelegate delegate5_;
- aura::test::TestWindowDelegate delegate6_;
-
- scoped_ptr<aura::Window> window_;
- scoped_ptr<aura::Window> always_on_top_window_;
- scoped_ptr<aura::Window> system_modal_window_;
- scoped_ptr<aura::Window> panel_window_;
- aura::Window* transient_child_;
- scoped_ptr<aura::Window> transient_parent_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DragWindowResizerTest);
-};
-
-// Verifies a window can be moved from the primary display to another.
-TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- // The secondary display is logically on the right, but on the system (e.g. X)
- // layer, it's below the primary one. See UpdateDisplay() in ash_test_base.cc.
- UpdateDisplay("800x600,800x600");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- ASSERT_EQ(2U, root_windows.size());
-
- window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
- EXPECT_EQ(root_windows[0], window_->GetRootWindow());
- {
- // Grab (0, 0) of the window.
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- // Drag the pointer to the right. Once it reaches the right edge of the
- // primary display, it warps to the secondary.
- resizer->Drag(CalculateDragPoint(*resizer, 800, 10), 0);
- resizer->CompleteDrag(0);
- // The whole window is on the secondary display now. The parent should be
- // changed.
- EXPECT_EQ(root_windows[1], window_->GetRootWindow());
- EXPECT_EQ("0,10 50x60", window_->bounds().ToString());
- }
-
- window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
- EXPECT_EQ(root_windows[0], window_->GetRootWindow());
- {
- // Grab (0, 0) of the window and move the pointer to (790, 10).
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 795, 10), 0);
- // Window should be adjusted for minimum visibility (10px) during the drag.
- EXPECT_EQ("790,10 50x60", window_->bounds().ToString());
- resizer->CompleteDrag(0);
- // Since the pointer is still on the primary root window, the parent should
- // not be changed.
- // Window origin should be adjusted for minimum visibility (10px).
- EXPECT_EQ(root_windows[0], window_->GetRootWindow());
- EXPECT_EQ("790,10 50x60", window_->bounds().ToString());
- }
-
- window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
- EXPECT_EQ(root_windows[0], window_->GetRootWindow());
- {
- // Grab the top-right edge of the window and move the pointer to (0, 10)
- // in the secondary root window's coordinates.
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window_.get(), gfx::Point(49, 0), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 751, 10), ui::EF_CONTROL_DOWN);
- resizer->CompleteDrag(0);
- // Since the pointer is on the secondary, the parent should be changed
- // even though only small fraction of the window is within the secondary
- // root window's bounds.
- EXPECT_EQ(root_windows[1], window_->GetRootWindow());
- // Window origin should be adjusted for minimum visibility (10px).
- int expected_x = -50 + 10;
- EXPECT_EQ(base::IntToString(expected_x) + ",10 50x60",
- window_->bounds().ToString());
- }
-}
-
-// Verifies that dragging the active window to another display makes the new
-// root window the active root window.
-TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplaysActiveRoot) {
- if (!SupportsMultipleDisplays())
- return;
-
- // The secondary display is logically on the right, but on the system (e.g. X)
- // layer, it's below the primary one. See UpdateDisplay() in ash_test_base.cc.
- UpdateDisplay("800x600,800x600");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- ASSERT_EQ(2U, root_windows.size());
-
- aura::test::TestWindowDelegate delegate;
- scoped_ptr<aura::Window> window(new aura::Window(&delegate));
- window->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window->Init(ui::LAYER_TEXTURED);
- ParentWindowInPrimaryRootWindow(window.get());
- window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
- window->Show();
- EXPECT_TRUE(ash::wm::CanActivateWindow(window.get()));
- ash::wm::ActivateWindow(window.get());
- EXPECT_EQ(root_windows[0], window->GetRootWindow());
- EXPECT_EQ(root_windows[0], ash::Shell::GetTargetRootWindow());
- {
- // Grab (0, 0) of the window.
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- // Drag the pointer to the right. Once it reaches the right edge of the
- // primary display, it warps to the secondary.
- resizer->Drag(CalculateDragPoint(*resizer, 800, 10), 0);
- resizer->CompleteDrag(0);
- // The whole window is on the secondary display now. The parent should be
- // changed.
- EXPECT_EQ(root_windows[1], window->GetRootWindow());
- EXPECT_EQ(root_windows[1], ash::Shell::GetTargetRootWindow());
- }
-}
-
-// Verifies a window can be moved from the secondary display to primary.
-TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplaysRightToLeft) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("800x600,800x600");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- ASSERT_EQ(2U, root_windows.size());
-
- window_->SetBoundsInScreen(
- gfx::Rect(800, 00, 50, 60),
- Shell::GetScreen()->GetDisplayNearestWindow(root_windows[1]));
- EXPECT_EQ(root_windows[1], window_->GetRootWindow());
- {
- // Grab (0, 0) of the window.
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- // Move the mouse near the right edge, (798, 0), of the primary display.
- resizer->Drag(CalculateDragPoint(*resizer, -2, 0), ui::EF_CONTROL_DOWN);
- resizer->CompleteDrag(0);
- EXPECT_EQ(root_windows[0], window_->GetRootWindow());
- // Window origin should be adjusted for minimum visibility (10px).
- int expected_x = 800 - 10;
- EXPECT_EQ(base::IntToString(expected_x) + ",0 50x60",
- window_->bounds().ToString());
- }
-}
-
-// Verifies the drag window is shown correctly.
-TEST_F(DragWindowResizerTest, DragWindowController) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("800x600,800x600");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- ASSERT_EQ(2U, root_windows.size());
-
- window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
- EXPECT_EQ(root_windows[0], window_->GetRootWindow());
- EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
- {
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- internal::DragWindowResizer* drag_resizer = DragWindowResizer::instance_;
- ASSERT_TRUE(drag_resizer);
- EXPECT_FALSE(drag_resizer->drag_window_controller_.get());
-
- // The pointer is inside the primary root. The drag window controller
- // should be NULL.
- resizer->Drag(CalculateDragPoint(*resizer, 10, 10), 0);
- EXPECT_FALSE(drag_resizer->drag_window_controller_.get());
-
- // The window spans both root windows.
- resizer->Drag(CalculateDragPoint(*resizer, 798, 10), 0);
- DragWindowController* controller =
- drag_resizer->drag_window_controller_.get();
- ASSERT_TRUE(controller);
-
- ASSERT_TRUE(controller->drag_widget_);
- ui::Layer* drag_layer =
- controller->drag_widget_->GetNativeWindow()->layer();
- ASSERT_TRUE(drag_layer);
- // Check if |resizer->layer_| is properly set to the drag widget.
- const std::vector<ui::Layer*>& layers = drag_layer->children();
- EXPECT_FALSE(layers.empty());
- EXPECT_EQ(controller->layer_, layers.back());
-
- // |window_| should be opaque since the pointer is still on the primary
- // root window. The drag window should be semi-transparent.
- EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
- ASSERT_TRUE(controller->drag_widget_);
- EXPECT_GT(1.0f, drag_layer->opacity());
-
- // Enter the pointer to the secondary display.
- resizer->Drag(CalculateDragPoint(*resizer, 800, 10), 0);
- controller = drag_resizer->drag_window_controller_.get();
- ASSERT_TRUE(controller);
- // |window_| should be transparent, and the drag window should be opaque.
- EXPECT_GT(1.0f, window_->layer()->opacity());
- EXPECT_FLOAT_EQ(1.0f, drag_layer->opacity());
-
- resizer->CompleteDrag(0);
- EXPECT_EQ(root_windows[1], window_->GetRootWindow());
- EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
- }
-
- // Do the same test with RevertDrag().
- window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
- EXPECT_EQ(root_windows[0], window_->GetRootWindow());
- EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
- {
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- internal::DragWindowResizer* drag_resizer = DragWindowResizer::instance_;
- ASSERT_TRUE(drag_resizer);
- EXPECT_FALSE(drag_resizer->drag_window_controller_.get());
-
- resizer->Drag(CalculateDragPoint(*resizer, 0, 610), 0);
- resizer->RevertDrag();
- EXPECT_EQ(root_windows[0], window_->GetRootWindow());
- EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
- }
-}
-
-// Verifies if the resizer sets and resets
-// MouseCursorEventFilter::mouse_warp_mode_ as expected.
-TEST_F(DragWindowResizerTest, WarpMousePointer) {
- MouseCursorEventFilter* event_filter =
- Shell::GetInstance()->mouse_cursor_filter();
- ASSERT_TRUE(event_filter);
- window_->SetBounds(gfx::Rect(0, 0, 50, 60));
-
- EXPECT_EQ(MouseCursorEventFilter::WARP_ALWAYS,
- event_filter->mouse_warp_mode_);
- {
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window_.get(), gfx::Point(), HTCAPTION));
- // While dragging a window, warp should be allowed.
- EXPECT_EQ(MouseCursorEventFilter::WARP_DRAG,
- event_filter->mouse_warp_mode_);
- resizer->CompleteDrag(0);
- }
- EXPECT_EQ(MouseCursorEventFilter::WARP_ALWAYS,
- event_filter->mouse_warp_mode_);
-
- {
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window_.get(), gfx::Point(), HTCAPTION));
- EXPECT_EQ(MouseCursorEventFilter::WARP_DRAG,
- event_filter->mouse_warp_mode_);
- resizer->RevertDrag();
- }
- EXPECT_EQ(MouseCursorEventFilter::WARP_ALWAYS,
- event_filter->mouse_warp_mode_);
-
- {
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window_.get(), gfx::Point(), HTRIGHT));
- // While resizing a window, warp should NOT be allowed.
- EXPECT_EQ(MouseCursorEventFilter::WARP_NONE,
- event_filter->mouse_warp_mode_);
- resizer->CompleteDrag(0);
- }
- EXPECT_EQ(MouseCursorEventFilter::WARP_ALWAYS,
- event_filter->mouse_warp_mode_);
-
- {
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window_.get(), gfx::Point(), HTRIGHT));
- EXPECT_EQ(MouseCursorEventFilter::WARP_NONE,
- event_filter->mouse_warp_mode_);
- resizer->RevertDrag();
- }
- EXPECT_EQ(MouseCursorEventFilter::WARP_ALWAYS,
- event_filter->mouse_warp_mode_);
-}
-
-// Verifies cursor's device scale factor is updated whe a window is moved across
-// root windows with different device scale factors (http://crbug.com/154183).
-TEST_F(DragWindowResizerTest, CursorDeviceScaleFactor) {
- if (!SupportsMultipleDisplays())
- return;
-
- // The secondary display is logically on the right, but on the system (e.g. X)
- // layer, it's below the primary one. See UpdateDisplay() in ash_test_base.cc.
- UpdateDisplay("400x400,800x800*2");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- ASSERT_EQ(2U, root_windows.size());
-
- test::CursorManagerTestApi cursor_test_api(
- Shell::GetInstance()->cursor_manager());
- // Move window from the root window with 1.0 device scale factor to the root
- // window with 2.0 device scale factor.
- {
- window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
- EXPECT_EQ(root_windows[0], window_->GetRootWindow());
- // Grab (0, 0) of the window.
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window_.get(), gfx::Point(), HTCAPTION));
- EXPECT_EQ(1.0f, cursor_test_api.GetDisplay().device_scale_factor());
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
- WarpMouseCursorIfNecessary(root_windows[0], gfx::Point(399, 200));
- EXPECT_EQ(2.0f, cursor_test_api.GetDisplay().device_scale_factor());
- resizer->CompleteDrag(0);
- EXPECT_EQ(2.0f, cursor_test_api.GetDisplay().device_scale_factor());
- }
-
- // Move window from the root window with 2.0 device scale factor to the root
- // window with 1.0 device scale factor.
- {
- window_->SetBoundsInScreen(
- gfx::Rect(600, 0, 50, 60),
- Shell::GetScreen()->GetDisplayNearestWindow(root_windows[1]));
- EXPECT_EQ(root_windows[1], window_->GetRootWindow());
- // Grab (0, 0) of the window.
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window_.get(), gfx::Point(), HTCAPTION));
- EXPECT_EQ(2.0f, cursor_test_api.GetDisplay().device_scale_factor());
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, -200, 200), 0);
- WarpMouseCursorIfNecessary(root_windows[1], gfx::Point(400, 200));
- EXPECT_EQ(1.0f, cursor_test_api.GetDisplay().device_scale_factor());
- resizer->CompleteDrag(0);
- EXPECT_EQ(1.0f, cursor_test_api.GetDisplay().device_scale_factor());
- }
-}
-
-// Verifies several kinds of windows can be moved across displays.
-TEST_F(DragWindowResizerTest, MoveWindowAcrossDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- // The secondary display is logically on the right, but on the system (e.g. X)
- // layer, it's below the primary one. See UpdateDisplay() in ash_test_base.cc.
- UpdateDisplay("400x400,400x400");
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- ASSERT_EQ(2U, root_windows.size());
-
- // Normal window can be moved across display.
- {
- aura::Window* window = window_.get();
- window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
- // Grab (0, 0) of the window.
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window, gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
- EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0],
- gfx::Point(399, 200)));
- resizer->CompleteDrag(0);
- }
-
- // Always on top window can be moved across display.
- {
- aura::Window* window = always_on_top_window_.get();
- window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
- // Grab (0, 0) of the window.
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window, gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
- EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0],
- gfx::Point(399, 200)));
- resizer->CompleteDrag(0);
- }
-
- // System modal window can be moved across display.
- {
- aura::Window* window = system_modal_window_.get();
- window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
- // Grab (0, 0) of the window.
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window, gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
- EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0],
- gfx::Point(399, 200)));
- resizer->CompleteDrag(0);
- }
-
- // Transient window cannot be moved across display.
- {
- aura::Window* window = transient_child_;
- window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
- // Grab (0, 0) of the window.
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window, gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
- EXPECT_FALSE(WarpMouseCursorIfNecessary(
- root_windows[0],
- gfx::Point(399, 200)));
- resizer->CompleteDrag(0);
- }
-
- // The parent of transient window can be moved across display.
- {
- aura::Window* window = transient_parent_.get();
- window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
- // Grab (0, 0) of the window.
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window, gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
- EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0],
- gfx::Point(399, 200)));
- resizer->CompleteDrag(0);
- }
-
- // Panel window can be moved across display.
- {
- aura::Window* window = panel_window_.get();
- window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
- // Grab (0, 0) of the window.
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window, gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
- EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0],
- gfx::Point(399, 200)));
- resizer->CompleteDrag(0);
- }
-}
-
-#if defined(OS_CHROMEOS)
-// Checks that moving a window to another desktop will properly set and reset
-// the transparency.
-TEST_F(DragWindowResizerTest, DragToOtherDesktopOpacity) {
- // Set up a few things we need for multi profile.
- ash::test::TestSessionStateDelegate* session_delegate =
- static_cast<ash::test::TestSessionStateDelegate*>(
- ash::Shell::GetInstance()->session_state_delegate());
- session_delegate->set_logged_in_users(2);
- ash::test::TestShellDelegate* shell_delegate =
- static_cast<ash::test::TestShellDelegate*>(
- ash::Shell::GetInstance()->delegate());
- shell_delegate->set_multi_profiles_enabled(true);
-
- // Create one other user where we can drag our stuff onto.
- SystemTray* tray = Shell::GetPrimaryRootWindowController()->GetSystemTray();
- TrayUser* tray_user = new TrayUser(tray, 1);
- tray->AddTrayUserItemForTest(tray_user);
-
- // Move the view somewhere where we can hit it.
- views::View* view = tray->GetTrayItemViewForTest(tray_user);
- view->SetBounds(80, 0, 20, 20);
- gfx::Point center = view->GetBoundsInScreen().CenterPoint();
-
- gfx::Rect initial_bounds = gfx::Rect(0, 0, 50, 60);
- // Drag the window over the icon and let it drop. Test that the window's
- // layer gets transparent and reverts back.
- {
- aura::Window* window = window_.get();
- window->SetBoundsInScreen(initial_bounds,
- Shell::GetScreen()->GetPrimaryDisplay());
- // Grab (0, 0) of the window.
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window, gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- EXPECT_EQ(1.0, window->layer()->opacity());
- resizer->Drag(center, 0);
- EXPECT_NE(1.0, window->layer()->opacity());
- EXPECT_EQ(0, session_delegate->num_transfer_to_desktop_of_user_calls());
- resizer->CompleteDrag(0);
- EXPECT_EQ(1.0, window->layer()->opacity());
- EXPECT_EQ(1, session_delegate->num_transfer_to_desktop_of_user_calls());
- EXPECT_EQ(initial_bounds.ToString(), window->bounds().ToString());
- }
-
- // Drag the window over the icon and cancel the operation. Test that the
- // window's layer gets transparent and reverts back.
- {
- aura::Window* window = window_.get();
- window->SetBoundsInScreen(initial_bounds,
- Shell::GetScreen()->GetPrimaryDisplay());
- // Grab (0, 0) of the window.
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window, gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- EXPECT_EQ(1.0, window->layer()->opacity());
- resizer->Drag(center, 0);
- EXPECT_NE(1.0, window->layer()->opacity());
- resizer->RevertDrag();
- EXPECT_EQ(1.0, window->layer()->opacity());
- EXPECT_EQ(1, session_delegate->num_transfer_to_desktop_of_user_calls());
- EXPECT_EQ(initial_bounds.ToString(), window->bounds().ToString());
- }
-
- // Drag the window over the icon and somewhere else and see that it properly
- // reverts its transparency.
- {
- aura::Window* window = window_.get();
- window->SetBoundsInScreen(initial_bounds,
- Shell::GetScreen()->GetPrimaryDisplay());
- // Grab (0, 0) of the window.
- scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
- window, gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- EXPECT_EQ(1.0, window->layer()->opacity());
- resizer->Drag(center, 0);
- EXPECT_NE(1.0, window->layer()->opacity());
- resizer->Drag(gfx::Point(), 0);
- EXPECT_EQ(1.0, window->layer()->opacity());
- resizer->CompleteDrag(0);
- EXPECT_EQ(1, session_delegate->num_transfer_to_desktop_of_user_calls());
- EXPECT_NE(initial_bounds.ToString(), window->bounds().ToString());
- }
-}
-#endif
-
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/event_client_impl.cc b/chromium/ash/wm/event_client_impl.cc
deleted file mode 100644
index fbf5f86eda3..00000000000
--- a/chromium/ash/wm/event_client_impl.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/event_client_impl.h"
-
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ui/aura/window.h"
-#include "ui/keyboard/keyboard_util.h"
-
-namespace ash {
-namespace internal {
-
-EventClientImpl::EventClientImpl() {
-}
-
-EventClientImpl::~EventClientImpl() {
-}
-
-bool EventClientImpl::CanProcessEventsWithinSubtree(
- const aura::Window* window) const {
- const aura::Window* root_window = window ? window->GetRootWindow() : NULL;
- if (!root_window ||
- !Shell::GetInstance()->session_state_delegate()->IsUserSessionBlocked()) {
- return true;
- }
-
- const aura::Window* lock_screen_containers = Shell::GetContainer(
- root_window,
- kShellWindowId_LockScreenContainersContainer);
- const aura::Window* lock_background_containers = Shell::GetContainer(
- root_window,
- kShellWindowId_LockScreenBackgroundContainer);
- const aura::Window* lock_screen_related_containers = Shell::GetContainer(
- root_window,
- kShellWindowId_LockScreenRelatedContainersContainer);
- bool can_process_events = (window->Contains(lock_screen_containers) &&
- window->Contains(lock_background_containers) &&
- window->Contains(lock_screen_related_containers)) ||
- lock_screen_containers->Contains(window) ||
- lock_background_containers->Contains(window) ||
- lock_screen_related_containers->Contains(window);
- if (keyboard::IsKeyboardEnabled()) {
- const aura::Window* virtual_keyboard_container = Shell::GetContainer(
- root_window,
- kShellWindowId_VirtualKeyboardContainer);
- can_process_events |= (window->Contains(virtual_keyboard_container) ||
- virtual_keyboard_container->Contains(window));
- }
- return can_process_events;
-}
-
-ui::EventTarget* EventClientImpl::GetToplevelEventTarget() {
- return Shell::GetInstance();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/event_client_impl.h b/chromium/ash/wm/event_client_impl.h
deleted file mode 100644
index b38228be942..00000000000
--- a/chromium/ash/wm/event_client_impl.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_EVENT_CLIENT_IMPL_H_
-#define ASH_WM_EVENT_CLIENT_IMPL_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/aura/client/event_client.h"
-
-namespace ash {
-namespace internal {
-
-class EventClientImpl : public aura::client::EventClient {
- public:
- EventClientImpl();
- virtual ~EventClientImpl();
-
- private:
- // Overridden from aura::client::EventClient:
- virtual bool CanProcessEventsWithinSubtree(
- const aura::Window* window) const OVERRIDE;
- virtual ui::EventTarget* GetToplevelEventTarget() OVERRIDE;
-
- DISALLOW_COPY_AND_ASSIGN(EventClientImpl);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_EVENT_CLIENT_IMPL_H_
diff --git a/chromium/ash/wm/event_rewriter_event_filter.cc b/chromium/ash/wm/event_rewriter_event_filter.cc
deleted file mode 100644
index dd87e2a48a0..00000000000
--- a/chromium/ash/wm/event_rewriter_event_filter.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/event_rewriter_event_filter.h"
-
-#include "ash/event_rewriter_delegate.h"
-#include "base/logging.h"
-#include "ui/events/event.h"
-
-namespace ash {
-namespace internal {
-
-EventRewriterEventFilter::EventRewriterEventFilter() {}
-
-EventRewriterEventFilter::~EventRewriterEventFilter() {}
-
-void EventRewriterEventFilter::SetEventRewriterDelegate(
- scoped_ptr<EventRewriterDelegate> delegate) {
- delegate_ = delegate.Pass();
-}
-
-void EventRewriterEventFilter::OnKeyEvent(ui::KeyEvent* event) {
- if (!delegate_)
- return;
-
- // Do not consume a translated key event which is generated by an IME.
- if (event->type() == ui::ET_TRANSLATED_KEY_PRESS ||
- event->type() == ui::ET_TRANSLATED_KEY_RELEASE) {
- return;
- }
-
- switch (delegate_->RewriteOrFilterKeyEvent(event)) {
- case EventRewriterDelegate::ACTION_REWRITE_EVENT:
- break;
- case EventRewriterDelegate::ACTION_DROP_EVENT:
- event->StopPropagation();
- break;
- }
-}
-
-void EventRewriterEventFilter::OnMouseEvent(ui::MouseEvent* event) {
- if (!delegate_)
- return;
-
- switch (delegate_->RewriteOrFilterLocatedEvent(event)) {
- case EventRewriterDelegate::ACTION_REWRITE_EVENT:
- break;
- case EventRewriterDelegate::ACTION_DROP_EVENT:
- event->StopPropagation();
- break;
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/event_rewriter_event_filter.h b/chromium/ash/wm/event_rewriter_event_filter.h
deleted file mode 100644
index 86f7f538119..00000000000
--- a/chromium/ash/wm/event_rewriter_event_filter.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_EVENT_REWRITER_EVENT_FILTER_
-#define ASH_WM_EVENT_REWRITER_EVENT_FILTER_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/events/event_handler.h"
-
-namespace ash {
-
-class EventRewriterDelegate;
-
-namespace internal {
-
-// An event filter that rewrites or drops an event.
-class ASH_EXPORT EventRewriterEventFilter : public ui::EventHandler {
- public:
- EventRewriterEventFilter();
- virtual ~EventRewriterEventFilter();
-
- void SetEventRewriterDelegate(scoped_ptr<EventRewriterDelegate> delegate);
-
- private:
- // Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
-
- scoped_ptr<EventRewriterDelegate> delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(EventRewriterEventFilter);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_EVENT_REWRITER_EVENT_FILTER_
diff --git a/chromium/ash/wm/frame_border_hit_test_controller.cc b/chromium/ash/wm/frame_border_hit_test_controller.cc
deleted file mode 100644
index 28a57266715..00000000000
--- a/chromium/ash/wm/frame_border_hit_test_controller.cc
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/frame_border_hit_test_controller.h"
-
-#include "ash/ash_constants.h"
-#include "ash/wm/header_painter.h"
-#include "ash/wm/window_state.h"
-#include "ui/aura/env.h"
-#include "ui/aura/window.h"
-#include "ui/base/hit_test.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-#include "ui/views/window/non_client_view.h"
-
-namespace ash {
-
-FrameBorderHitTestController::FrameBorderHitTestController(views::Widget* frame)
- : frame_window_(frame->GetNativeWindow()) {
- gfx::Insets mouse_outer_insets(-kResizeOutsideBoundsSize,
- -kResizeOutsideBoundsSize,
- -kResizeOutsideBoundsSize,
- -kResizeOutsideBoundsSize);
- gfx::Insets touch_outer_insets = mouse_outer_insets.Scale(
- kResizeOutsideBoundsScaleForTouch);
- // Ensure we get resize cursors for a few pixels outside our bounds.
- frame_window_->SetHitTestBoundsOverrideOuter(mouse_outer_insets,
- touch_outer_insets);
- // Ensure we get resize cursors just inside our bounds as well.
- UpdateHitTestBoundsOverrideInner();
-
- frame_window_->AddObserver(this);
- ash::wm::GetWindowState(frame_window_)->AddObserver(this);
-}
-
-FrameBorderHitTestController::~FrameBorderHitTestController() {
- if (frame_window_) {
- frame_window_->RemoveObserver(this);
- ash::wm::GetWindowState(frame_window_)->RemoveObserver(this);
- }
-}
-
-// static
-int FrameBorderHitTestController::NonClientHitTest(
- views::NonClientFrameView* view,
- HeaderPainter* header_painter,
- const gfx::Point& point) {
- gfx::Rect expanded_bounds = view->bounds();
- int outside_bounds = kResizeOutsideBoundsSize;
-
- if (aura::Env::GetInstance()->is_touch_down())
- outside_bounds *= kResizeOutsideBoundsScaleForTouch;
- expanded_bounds.Inset(-outside_bounds, -outside_bounds);
-
- if (!expanded_bounds.Contains(point))
- return HTNOWHERE;
-
- // Check the frame first, as we allow a small area overlapping the contents
- // to be used for resize handles.
- views::Widget* frame = view->GetWidget();
- bool can_ever_resize = frame->widget_delegate()->CanResize();
- // Don't allow overlapping resize handles when the window is maximized or
- // fullscreen, as it can't be resized in those states.
- int resize_border =
- frame->IsMaximized() || frame->IsFullscreen() ? 0 :
- kResizeInsideBoundsSize;
- int frame_component = view->GetHTComponentForFrame(point,
- resize_border,
- resize_border,
- kResizeAreaCornerSize,
- kResizeAreaCornerSize,
- can_ever_resize);
- if (frame_component != HTNOWHERE)
- return frame_component;
-
- int client_component = frame->client_view()->NonClientHitTest(point);
- if (client_component != HTNOWHERE)
- return client_component;
-
- return header_painter->NonClientHitTest(point);
-}
-
-void FrameBorderHitTestController::UpdateHitTestBoundsOverrideInner() {
- // Maximized and fullscreen windows don't want resize handles overlapping the
- // content area, because when the user moves the cursor to the right screen
- // edge we want them to be able to hit the scroll bar.
- if (wm::GetWindowState(frame_window_)->IsMaximizedOrFullscreen()) {
- frame_window_->set_hit_test_bounds_override_inner(gfx::Insets());
- } else {
- frame_window_->set_hit_test_bounds_override_inner(
- gfx::Insets(kResizeInsideBoundsSize, kResizeInsideBoundsSize,
- kResizeInsideBoundsSize, kResizeInsideBoundsSize));
- }
-}
-
-void FrameBorderHitTestController::OnWindowShowTypeChanged(
- wm::WindowState* window_state,
- wm::WindowShowType old_type) {
- UpdateHitTestBoundsOverrideInner();
-}
-
-void FrameBorderHitTestController::OnWindowDestroying(aura::Window* window) {
- frame_window_->RemoveObserver(this);
- ash::wm::GetWindowState(frame_window_)->RemoveObserver(this);
- frame_window_ = NULL;
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/frame_border_hit_test_controller.h b/chromium/ash/wm/frame_border_hit_test_controller.h
deleted file mode 100644
index 21fe9cf0305..00000000000
--- a/chromium/ash/wm/frame_border_hit_test_controller.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_FRAME_BORDER_HITTEST_CONTROLLER_H_
-#define ASH_WM_FRAME_BORDER_HITTEST_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "ash/wm/window_state_observer.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/aura/window_observer.h"
-
-namespace gfx {
-class Point;
-}
-
-namespace views {
-class NonClientFrameView;
-class Widget;
-}
-
-namespace ash {
-class HeaderPainter;
-
-// Class which manages the hittest override bounds for |frame|. The override
-// bounds are used to ensure that the resize cursors are shown when the user
-// hovers over |frame|'s edges.
-class ASH_EXPORT FrameBorderHitTestController : public wm::WindowStateObserver,
- public aura::WindowObserver {
- public:
- explicit FrameBorderHitTestController(views::Widget* frame);
- virtual ~FrameBorderHitTestController();
-
- // Does the non client hit test on behalf of |view|. |point| must be in the
- // coordinates of |view|'s widget.
- static int NonClientHitTest(views::NonClientFrameView* view,
- HeaderPainter* header_painter,
- const gfx::Point& point);
-
- private:
- // Updates the size of the region inside of |window_| in which the resize
- // handles are shown based on |window_|'s show type.
- void UpdateHitTestBoundsOverrideInner();
-
- // WindowStateObserver override:
- virtual void OnWindowShowTypeChanged(wm::WindowState* window_state,
- wm::WindowShowType old_type) OVERRIDE;
- // WindowObserver override:
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
-
- // The window whose hittest override bounds are being managed.
- aura::Window* frame_window_;
-
- DISALLOW_COPY_AND_ASSIGN(FrameBorderHitTestController);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_FRAME_BORDER_HITTEST_CONTROLLER_H_
diff --git a/chromium/ash/wm/gestures/OWNERS b/chromium/ash/wm/gestures/OWNERS
deleted file mode 100644
index b8e32c10903..00000000000
--- a/chromium/ash/wm/gestures/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-sadrul@chromium.org
diff --git a/chromium/ash/wm/gestures/long_press_affordance_handler.cc b/chromium/ash/wm/gestures/long_press_affordance_handler.cc
deleted file mode 100644
index 2a96f0707f0..00000000000
--- a/chromium/ash/wm/gestures/long_press_affordance_handler.cc
+++ /dev/null
@@ -1,370 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/gestures/long_press_affordance_handler.h"
-
-#include "ash/display/display_controller.h"
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "third_party/skia/include/core/SkPaint.h"
-#include "third_party/skia/include/core/SkPath.h"
-#include "third_party/skia/include/core/SkRect.h"
-#include "third_party/skia/include/effects/SkGradientShader.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/events/gestures/gesture_configuration.h"
-#include "ui/events/gestures/gesture_util.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/screen.h"
-#include "ui/gfx/transform.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-namespace {
-
-const int kAffordanceOuterRadius = 60;
-const int kAffordanceInnerRadius = 50;
-
-// Angles from x-axis at which the outer and inner circles start.
-const int kAffordanceOuterStartAngle = -109;
-const int kAffordanceInnerStartAngle = -65;
-
-const int kAffordanceGlowWidth = 20;
-// The following is half width to avoid division by 2.
-const int kAffordanceArcWidth = 3;
-
-// Start and end values for various animations.
-const double kAffordanceScaleStartValue = 0.8;
-const double kAffordanceScaleEndValue = 1.0;
-const double kAffordanceShrinkScaleEndValue = 0.5;
-const double kAffordanceOpacityStartValue = 0.1;
-const double kAffordanceOpacityEndValue = 0.5;
-const int kAffordanceAngleStartValue = 0;
-// The end angle is a bit greater than 360 to make sure the circle completes at
-// the end of the animation.
-const int kAffordanceAngleEndValue = 380;
-const int kAffordanceDelayBeforeShrinkMs = 200;
-const int kAffordanceShrinkAnimationDurationMs = 100;
-
-// Visual constants.
-const SkColor kAffordanceGlowStartColor = SkColorSetARGB(24, 255, 255, 255);
-const SkColor kAffordanceGlowEndColor = SkColorSetARGB(0, 255, 255, 255);
-const SkColor kAffordanceArcColor = SkColorSetARGB(80, 0, 0, 0);
-const int kAffordanceFrameRateHz = 60;
-
-views::Widget* CreateAffordanceWidget(aura::Window* root_window) {
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params;
- params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS;
- params.keep_on_top = true;
- params.accept_events = false;
- params.can_activate = false;
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.context = root_window;
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- widget->Init(params);
- widget->SetOpacity(0xFF);
- GetRootWindowController(root_window)->GetContainer(
- kShellWindowId_OverlayContainer)->AddChild(widget->GetNativeWindow());
- return widget;
-}
-
-void PaintAffordanceArc(gfx::Canvas* canvas,
- gfx::Point& center,
- int radius,
- int start_angle,
- int end_angle) {
- SkPaint paint;
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(2 * kAffordanceArcWidth);
- paint.setColor(kAffordanceArcColor);
- paint.setAntiAlias(true);
-
- SkPath arc_path;
- arc_path.addArc(SkRect::MakeXYWH(center.x() - radius,
- center.y() - radius,
- 2 * radius,
- 2 * radius),
- start_angle, end_angle);
- canvas->DrawPath(arc_path, paint);
-}
-
-void PaintAffordanceGlow(gfx::Canvas* canvas,
- gfx::Point& center,
- int start_radius,
- int end_radius,
- SkColor* colors,
- SkScalar* pos,
- int num_colors) {
- SkPoint sk_center;
- int radius = (end_radius + start_radius) / 2;
- int glow_width = end_radius - start_radius;
- sk_center.iset(center.x(), center.y());
- skia::RefPtr<SkShader> shader = skia::AdoptRef(
- SkGradientShader::CreateTwoPointRadial(
- sk_center,
- SkIntToScalar(start_radius),
- sk_center,
- SkIntToScalar(end_radius),
- colors,
- pos,
- num_colors,
- SkShader::kClamp_TileMode));
- DCHECK(shader);
- SkPaint paint;
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(glow_width);
- paint.setShader(shader.get());
- paint.setAntiAlias(true);
- SkPath arc_path;
- arc_path.addArc(SkRect::MakeXYWH(center.x() - radius,
- center.y() - radius,
- 2 * radius,
- 2 * radius),
- 0, 360);
- canvas->DrawPath(arc_path, paint);
-}
-
-} // namespace
-
-// View of the LongPressAffordanceHandler. Draws the actual contents and
-// updates as the animation proceeds. It also maintains the views::Widget that
-// the animation is shown in.
-class LongPressAffordanceHandler::LongPressAffordanceView
- : public views::View {
- public:
- LongPressAffordanceView(const gfx::Point& event_location,
- aura::Window* root_window)
- : views::View(),
- widget_(CreateAffordanceWidget(root_window)),
- current_angle_(kAffordanceAngleStartValue),
- current_scale_(kAffordanceScaleStartValue) {
- widget_->SetContentsView(this);
- widget_->SetAlwaysOnTop(true);
-
- // We are owned by the LongPressAffordance.
- set_owned_by_client();
- gfx::Point point = event_location;
- aura::client::GetScreenPositionClient(root_window)->ConvertPointToScreen(
- root_window, &point);
- widget_->SetBounds(gfx::Rect(
- point.x() - (kAffordanceOuterRadius + kAffordanceGlowWidth),
- point.y() - (kAffordanceOuterRadius + kAffordanceGlowWidth),
- GetPreferredSize().width(),
- GetPreferredSize().height()));
- widget_->Show();
- widget_->GetNativeView()->layer()->SetOpacity(kAffordanceOpacityStartValue);
- }
-
- virtual ~LongPressAffordanceView() {
- }
-
- void UpdateWithGrowAnimation(gfx::Animation* animation) {
- // Update the portion of the circle filled so far and re-draw.
- current_angle_ = animation->CurrentValueBetween(kAffordanceAngleStartValue,
- kAffordanceAngleEndValue);
- current_scale_ = animation->CurrentValueBetween(kAffordanceScaleStartValue,
- kAffordanceScaleEndValue);
- widget_->GetNativeView()->layer()->SetOpacity(
- animation->CurrentValueBetween(kAffordanceOpacityStartValue,
- kAffordanceOpacityEndValue));
- SchedulePaint();
- }
-
- void UpdateWithShrinkAnimation(gfx::Animation* animation) {
- current_scale_ = animation->CurrentValueBetween(kAffordanceScaleEndValue,
- kAffordanceShrinkScaleEndValue);
- widget_->GetNativeView()->layer()->SetOpacity(
- animation->CurrentValueBetween(kAffordanceOpacityEndValue,
- kAffordanceOpacityStartValue));
- SchedulePaint();
- }
-
- private:
- // Overridden from views::View.
- virtual gfx::Size GetPreferredSize() OVERRIDE {
- return gfx::Size(2 * (kAffordanceOuterRadius + kAffordanceGlowWidth),
- 2 * (kAffordanceOuterRadius + kAffordanceGlowWidth));
- }
-
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- gfx::Point center(GetPreferredSize().width() / 2,
- GetPreferredSize().height() / 2);
- canvas->Save();
-
- gfx::Transform scale;
- scale.Scale(current_scale_, current_scale_);
- // We want to scale from the center.
- canvas->Translate(center.OffsetFromOrigin());
- canvas->Transform(scale);
- canvas->Translate(-center.OffsetFromOrigin());
-
- // Paint affordance glow
- int start_radius = kAffordanceInnerRadius - kAffordanceGlowWidth;
- int end_radius = kAffordanceOuterRadius + kAffordanceGlowWidth;
- const int num_colors = 3;
- SkScalar pos[num_colors] = {0, 0.5, 1};
- SkColor colors[num_colors] = {kAffordanceGlowEndColor,
- kAffordanceGlowStartColor, kAffordanceGlowEndColor};
- PaintAffordanceGlow(canvas, center, start_radius, end_radius, colors, pos,
- num_colors);
-
- // Paint inner circle.
- PaintAffordanceArc(canvas, center, kAffordanceInnerRadius,
- kAffordanceInnerStartAngle, -current_angle_);
- // Paint outer circle.
- PaintAffordanceArc(canvas, center, kAffordanceOuterRadius,
- kAffordanceOuterStartAngle, current_angle_);
-
- canvas->Restore();
- }
-
- scoped_ptr<views::Widget> widget_;
- int current_angle_;
- double current_scale_;
-
- DISALLOW_COPY_AND_ASSIGN(LongPressAffordanceView);
-};
-
-////////////////////////////////////////////////////////////////////////////////
-// LongPressAffordanceHandler, public
-
-LongPressAffordanceHandler::LongPressAffordanceHandler()
- : gfx::LinearAnimation(kAffordanceFrameRateHz, NULL),
- tap_down_target_(NULL),
- current_animation_type_(NONE) {}
-
-LongPressAffordanceHandler::~LongPressAffordanceHandler() {
- StopAffordance();
-}
-
-void LongPressAffordanceHandler::ProcessEvent(aura::Window* target,
- ui::GestureEvent* event) {
- // Once we have a target, we are only interested in events with that target.
- if (tap_down_target_ && tap_down_target_ != target)
- return;
- switch (event->type()) {
- case ui::ET_GESTURE_TAP_DOWN: {
- // Start timer that will start animation on "semi-long-press".
- tap_down_location_ = event->root_location();
- SetTapDownTarget(target);
- current_animation_type_ = GROW_ANIMATION;
- int64 timer_start_time_ms =
- ui::GestureConfiguration::semi_long_press_time_in_seconds() * 1000;
- timer_.Start(FROM_HERE,
- base::TimeDelta::FromMilliseconds(timer_start_time_ms),
- this,
- &LongPressAffordanceHandler::StartAnimation);
- break;
- }
- case ui::ET_GESTURE_TAP:
- case ui::ET_GESTURE_TAP_CANCEL:
- StopAffordance();
- break;
- case ui::ET_GESTURE_LONG_PRESS:
- End();
- break;
- default:
- break;
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// LongPressAffordanceHandler, private
-
-void LongPressAffordanceHandler::StartAnimation() {
- switch (current_animation_type_) {
- case GROW_ANIMATION: {
- aura::Window* root_window = tap_down_target_->GetRootWindow();
- if (!root_window) {
- StopAffordance();
- return;
- }
- view_.reset(new LongPressAffordanceView(tap_down_location_, root_window));
- SetDuration(
- ui::GestureConfiguration::long_press_time_in_seconds() * 1000 -
- ui::GestureConfiguration::semi_long_press_time_in_seconds() * 1000 -
- kAffordanceDelayBeforeShrinkMs);
- Start();
- break;
- }
- case SHRINK_ANIMATION:
- SetDuration(kAffordanceShrinkAnimationDurationMs);
- Start();
- break;
- default:
- NOTREACHED();
- break;
- }
-}
-
-void LongPressAffordanceHandler::StopAffordance() {
- if (timer_.IsRunning())
- timer_.Stop();
- // Since, Animation::Stop() calls AnimationStopped(), we need to reset the
- // |current_animation_type_| before Stop(), otherwise AnimationStopped() may
- // start the timer again.
- current_animation_type_ = NONE;
- Stop();
- view_.reset();
- SetTapDownTarget(NULL);
-}
-
-void LongPressAffordanceHandler::SetTapDownTarget(aura::Window* target) {
- if (tap_down_target_ == target)
- return;
-
- if (tap_down_target_)
- tap_down_target_->RemoveObserver(this);
- tap_down_target_ = target;
- if (tap_down_target_)
- tap_down_target_->AddObserver(this);
-}
-
-void LongPressAffordanceHandler::AnimateToState(double state) {
- DCHECK(view_.get());
- switch (current_animation_type_) {
- case GROW_ANIMATION:
- view_->UpdateWithGrowAnimation(this);
- break;
- case SHRINK_ANIMATION:
- view_->UpdateWithShrinkAnimation(this);
- break;
- default:
- NOTREACHED();
- break;
- }
-}
-
-void LongPressAffordanceHandler::AnimationStopped() {
- switch (current_animation_type_) {
- case GROW_ANIMATION:
- current_animation_type_ = SHRINK_ANIMATION;
- timer_.Start(FROM_HERE,
- base::TimeDelta::FromMilliseconds(kAffordanceDelayBeforeShrinkMs),
- this, &LongPressAffordanceHandler::StartAnimation);
- break;
- case SHRINK_ANIMATION:
- current_animation_type_ = NONE;
- // fall through to reset the view.
- default:
- view_.reset();
- SetTapDownTarget(NULL);
- break;
- }
-}
-
-void LongPressAffordanceHandler::OnWindowDestroying(aura::Window* window) {
- DCHECK_EQ(tap_down_target_, window);
- StopAffordance();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/gestures/long_press_affordance_handler.h b/chromium/ash/wm/gestures/long_press_affordance_handler.h
deleted file mode 100644
index fa0337aee8f..00000000000
--- a/chromium/ash/wm/gestures/long_press_affordance_handler.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_GESTURES_LONG_PRESS_AFFORDANCE_HANDLER_H_
-#define ASH_WM_GESTURES_LONG_PRESS_AFFORDANCE_HANDLER_H_
-
-#include "base/timer/timer.h"
-#include "ui/aura/window_observer.h"
-#include "ui/gfx/animation/linear_animation.h"
-#include "ui/gfx/point.h"
-
-namespace ui {
-class GestureEvent;
-}
-
-namespace ash {
-
-namespace test {
-class SystemGestureEventFilterTest;
-}
-
-namespace internal {
-
-// LongPressAffordanceHandler displays an animated affordance that is shown
-// on a TAP_DOWN gesture. The animation sequence consists of two parts:
-// The first part is a grow animation that starts at semi-long-press and
-// completes on a long-press gesture. The affordance animates to full size
-// during grow animation.
-// The second part is a shrink animation that start after grow and shrinks the
-// affordance out of view.
-class LongPressAffordanceHandler : public gfx::LinearAnimation,
- public aura::WindowObserver {
- public:
- LongPressAffordanceHandler();
- virtual ~LongPressAffordanceHandler();
-
- // Displays or removes long press affordance according to the |event|.
- void ProcessEvent(aura::Window* target, ui::GestureEvent* event);
-
- private:
- friend class ash::test::SystemGestureEventFilterTest;
-
- class LongPressAffordanceView;
-
- enum LongPressAnimationType {
- NONE,
- GROW_ANIMATION,
- SHRINK_ANIMATION,
- };
-
- void StartAnimation();
- void StopAffordance();
- void SetTapDownTarget(aura::Window* target);
-
- // Overridden from gfx::LinearAnimation.
- virtual void AnimateToState(double state) OVERRIDE;
- virtual void AnimationStopped() OVERRIDE;
-
- // Overridden from aura::WindowObserver.
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
-
- scoped_ptr<LongPressAffordanceView> view_;
- gfx::Point tap_down_location_;
- base::OneShotTimer<LongPressAffordanceHandler> timer_;
- aura::Window* tap_down_target_;
- LongPressAnimationType current_animation_type_;
-
- DISALLOW_COPY_AND_ASSIGN(LongPressAffordanceHandler);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_GESTURES_LONG_PRESS_AFFORDANCE_HANDLER_H_
diff --git a/chromium/ash/wm/gestures/overview_gesture_handler.cc b/chromium/ash/wm/gestures/overview_gesture_handler.cc
deleted file mode 100644
index ebff8e680bc..00000000000
--- a/chromium/ash/wm/gestures/overview_gesture_handler.cc
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/gestures/overview_gesture_handler.h"
-
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ash/wm/overview/window_selector_controller.h"
-#include "ui/aura/window.h"
-#include "ui/events/event.h"
-#include "ui/events/event_constants.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-// The number of pixels from the top of the screen (a virtual bezel) to allow
-// the overview swipe down gesture to begin within. Note this does not actually
-// prevent handling of the touches so a fullscreen page which consumes these can
-// prevent entering overview with a swipe down.
-const int kTopBezelExtraPixels = 5;
-
-// The threshold before engaging overview on a three finger swipe on the
-// touchpad.
-const float kSwipeThresholdPixels = 300;
-
-} // namespace;
-
-OverviewGestureHandler::OverviewGestureHandler()
- : in_top_bezel_gesture_(false),
- scroll_x_(0),
- scroll_y_(0) {
-}
-
-OverviewGestureHandler::~OverviewGestureHandler() {
-}
-
-bool OverviewGestureHandler::ProcessScrollEvent(const ui::ScrollEvent& event) {
- if (event.type() == ui::ET_SCROLL_FLING_START ||
- event.type() == ui::ET_SCROLL_FLING_CANCEL ||
- event.finger_count() != 3) {
- scroll_x_ = scroll_y_ = 0;
- return false;
- }
-
- scroll_x_ += event.x_offset();
- scroll_y_ += event.y_offset();
-
- // Horizontal swiping is ignored.
- if (std::fabs(scroll_x_) >= std::fabs(scroll_y_)) {
- scroll_x_ = scroll_y_ = 0;
- return false;
- }
-
- // Only allow swipe up to enter overview, down to exit. Ignore extra swiping
- // in the wrong direction.
- Shell* shell = Shell::GetInstance();
- if (shell->window_selector_controller()->IsSelecting()) {
- if (scroll_y_ < 0)
- scroll_x_ = scroll_y_ = 0;
- if (scroll_y_ < kSwipeThresholdPixels)
- return false;
- } else {
- if (scroll_y_ > 0)
- scroll_x_ = scroll_y_ = 0;
- if (scroll_y_ > -kSwipeThresholdPixels)
- return false;
- }
-
- // Reset scroll amount on toggling.
- scroll_x_ = scroll_y_ = 0;
- shell->metrics()->RecordUserMetricsAction(UMA_TOUCHPAD_GESTURE_OVERVIEW);
- shell->window_selector_controller()->ToggleOverview();
- return true;
-}
-
-bool OverviewGestureHandler::ProcessGestureEvent(
- const ui::GestureEvent& event) {
- // Detect at the beginning of any gesture whether it begins on the top bezel.
- if (event.type() == ui::ET_GESTURE_BEGIN &&
- event.details().touch_points() == 1) {
- gfx::Point point_in_screen(event.location());
- aura::Window* target = static_cast<aura::Window*>(event.target());
- wm::ConvertPointToScreen(target, &point_in_screen);
- in_top_bezel_gesture_ = !Shell::GetScreen()->GetDisplayNearestPoint(
- point_in_screen).bounds().y() + kTopBezelExtraPixels >
- point_in_screen.y();
- return false;
- }
-
- if (!in_top_bezel_gesture_ ||
- event.type() != ui::ET_GESTURE_MULTIFINGER_SWIPE ||
- !event.details().swipe_down() ||
- event.details().touch_points() != 3) {
- return false;
- }
-
- Shell* shell = Shell::GetInstance();
- shell->metrics()->RecordUserMetricsAction(UMA_GESTURE_OVERVIEW);
- shell->window_selector_controller()->ToggleOverview();
- return true;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/gestures/overview_gesture_handler.h b/chromium/ash/wm/gestures/overview_gesture_handler.h
deleted file mode 100644
index 8b9fde50224..00000000000
--- a/chromium/ash/wm/gestures/overview_gesture_handler.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_GESTURES_OVERVIEW_GESTURE_HANDLER_H_
-#define ASH_WM_GESTURES_OVERVIEW_GESTURE_HANDLER_H_
-
-#include "base/basictypes.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ui {
-class GestureEvent;
-class ScrollEvent;
-}
-
-namespace ash {
-namespace internal {
-
-// This handles a 3-finger swipe down gesture from the top of the screen to
-// enter overview mode.
-class OverviewGestureHandler {
- public:
- OverviewGestureHandler();
- virtual ~OverviewGestureHandler();
-
- // Processes a scroll event and may start overview. Returns true if the event
- // has been handled and should not be processed further, false otherwise.
- bool ProcessScrollEvent(const ui::ScrollEvent& event);
-
- // Processes a gesture event and may start overview. Returns true if the event
- // has been handled and should not be processed any farther, false otherwise.
- bool ProcessGestureEvent(const ui::GestureEvent& event);
-
- private:
- // True if the current/last gesture began in the top bezel.
- bool in_top_bezel_gesture_;
-
- // The total distance scrolled with three fingers.
- float scroll_x_;
- float scroll_y_;
-
- DISALLOW_COPY_AND_ASSIGN(OverviewGestureHandler);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_GESTURES_OVERVIEW_GESTURE_HANDLER_H_
diff --git a/chromium/ash/wm/gestures/overview_gesture_handler_unittest.cc b/chromium/ash/wm/gestures/overview_gesture_handler_unittest.cc
deleted file mode 100644
index e3eddbd2539..00000000000
--- a/chromium/ash/wm/gestures/overview_gesture_handler_unittest.cc
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/overview/window_selector_controller.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-
-namespace ash {
-namespace internal {
-
-class OverviewGestureHandlerTest : public test::AshTestBase {
- public:
- OverviewGestureHandlerTest() {}
- virtual ~OverviewGestureHandlerTest() {}
-
- aura::Window* CreateWindow(const gfx::Rect& bounds) {
- return CreateTestWindowInShellWithDelegate(&delegate_, -1, bounds);
- }
-
- bool IsSelecting() {
- return ash::Shell::GetInstance()->window_selector_controller()->
- IsSelecting();
- }
-
- private:
- aura::test::TestWindowDelegate delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(OverviewGestureHandlerTest);
-};
-
-// Tests a swipe up with three fingers to enter and a swipe down to exit
-// overview.
-TEST_F(OverviewGestureHandlerTest, VerticalSwipes) {
- gfx::Rect bounds(0, 0, 400, 400);
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- aura::test::EventGenerator generator(root_window, root_window);
- generator.ScrollSequence(gfx::Point(), base::TimeDelta::FromMilliseconds(5),
- 0, -500, 100, 3);
- EXPECT_TRUE(IsSelecting());
-
- // Swiping up again does nothing.
- generator.ScrollSequence(gfx::Point(), base::TimeDelta::FromMilliseconds(5),
- 0, -500, 100, 3);
- EXPECT_TRUE(IsSelecting());
-
- // Swiping down exits.
- generator.ScrollSequence(gfx::Point(), base::TimeDelta::FromMilliseconds(5),
- 0, 500, 100, 3);
- EXPECT_FALSE(IsSelecting());
-
- // Swiping down again does nothing.
- generator.ScrollSequence(gfx::Point(), base::TimeDelta::FromMilliseconds(5),
- 0, 500, 100, 3);
- EXPECT_FALSE(IsSelecting());
-}
-
-// Tests that a mostly horizontal swipe does not trigger overview.
-TEST_F(OverviewGestureHandlerTest, HorizontalSwipes) {
- gfx::Rect bounds(0, 0, 400, 400);
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- aura::test::EventGenerator generator(root_window, root_window);
- generator.ScrollSequence(gfx::Point(), base::TimeDelta::FromMilliseconds(5),
- 600, -500, 100, 3);
- EXPECT_FALSE(IsSelecting());
-
- generator.ScrollSequence(gfx::Point(), base::TimeDelta::FromMilliseconds(5),
- -600, -500, 100, 3);
- EXPECT_FALSE(IsSelecting());
-}
-
-// Tests a swipe up with three fingers without releasing followed by a swipe
-// down by a lesser amount which should still be enough to exit.
-TEST_F(OverviewGestureHandlerTest, SwipeUpDownWithoutReleasing) {
- gfx::Rect bounds(0, 0, 400, 400);
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- aura::test::EventGenerator generator(root_window, root_window);
- base::TimeDelta timestamp = base::TimeDelta::FromInternalValue(
- base::TimeTicks::Now().ToInternalValue());
- gfx::Point start;
- int num_fingers = 3;
- base::TimeDelta step_delay(base::TimeDelta::FromMilliseconds(5));
- ui::ScrollEvent fling_cancel(ui::ET_SCROLL_FLING_CANCEL,
- start,
- timestamp,
- 0,
- 0, 0,
- 0, 0,
- num_fingers);
- generator.Dispatch(&fling_cancel);
-
- // Scroll up by 1000px.
- for (int i = 0; i < 100; ++i) {
- timestamp += step_delay;
- ui::ScrollEvent move(ui::ET_SCROLL,
- start,
- timestamp,
- 0,
- 0, -10,
- 0, -10,
- num_fingers);
- generator.Dispatch(&move);
- }
-
- EXPECT_TRUE(IsSelecting());
-
- // Without releasing scroll back down by 600px.
- for (int i = 0; i < 60; ++i) {
- timestamp += step_delay;
- ui::ScrollEvent move(ui::ET_SCROLL,
- start,
- timestamp,
- 0,
- 0, 10,
- 0, 10,
- num_fingers);
- generator.Dispatch(&move);
- }
-
- EXPECT_FALSE(IsSelecting());
- ui::ScrollEvent fling_start(ui::ET_SCROLL_FLING_START,
- start,
- timestamp,
- 0,
- 0, 10,
- 0, 10,
- num_fingers);
- generator.Dispatch(&fling_start);
-}
-
-// Tests a swipe down from the top of the screen to enter and exit overview.
-TEST_F(OverviewGestureHandlerTest, GestureSwipe) {
- gfx::Rect bounds(0, 0, 400, 400);
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- aura::test::EventGenerator generator(root_window, root_window);
- gfx::Point start_points[3];
- start_points[0] = start_points[1] = start_points[2] = gfx::Point();
- generator.GestureMultiFingerScroll(3, start_points, 5, 10, 0, 100);
- EXPECT_TRUE(IsSelecting());
-
- generator.GestureMultiFingerScroll(3, start_points, 5, 10, 0, 100);
- EXPECT_FALSE(IsSelecting());
-}
-
-// Tests that a swipe down from the top of a window doesn't enter overview.
-// http://crbug.com/313859
-TEST_F(OverviewGestureHandlerTest, GestureSwipeTopOfWindow) {
- gfx::Rect bounds(100, 100, 400, 400);
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- aura::test::EventGenerator generator(root_window, window2.get());
- gfx::Point start_points[3];
- start_points[0] = start_points[1] = start_points[2] = gfx::Point(105, 105);
- generator.GestureMultiFingerScroll(3, start_points, 5, 10, 0, 100);
- EXPECT_FALSE(IsSelecting());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/gestures/shelf_gesture_handler.cc b/chromium/ash/wm/gestures/shelf_gesture_handler.cc
deleted file mode 100644
index f9fb1b8d43c..00000000000
--- a/chromium/ash/wm/gestures/shelf_gesture_handler.cc
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/gestures/shelf_gesture_handler.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/wm/gestures/tray_gesture_handler.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/gfx/transform.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-ShelfGestureHandler::ShelfGestureHandler()
- : drag_in_progress_(false) {
-}
-
-ShelfGestureHandler::~ShelfGestureHandler() {
-}
-
-bool ShelfGestureHandler::ProcessGestureEvent(const ui::GestureEvent& event) {
- Shell* shell = Shell::GetInstance();
- if (!shell->session_state_delegate()->NumberOfLoggedInUsers() ||
- shell->session_state_delegate()->IsScreenLocked()) {
- // The gestures are disabled in the lock/login screen.
- return false;
- }
-
- // TODO(oshima): Find the root window controller from event's location.
- RootWindowController* controller = Shell::GetPrimaryRootWindowController();
-
- ShelfLayoutManager* shelf = controller->GetShelfLayoutManager();
-
- const aura::Window* fullscreen = controller->GetWindowForFullscreenMode();
- if (fullscreen &&
- ash::wm::GetWindowState(fullscreen)->hide_shelf_when_fullscreen()) {
- return false;
- }
-
- if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN) {
- drag_in_progress_ = true;
- shelf->StartGestureDrag(event);
- return true;
- }
-
- if (!drag_in_progress_)
- return false;
-
- if (event.type() == ui::ET_GESTURE_SCROLL_UPDATE) {
- if (tray_handler_) {
- if (!tray_handler_->UpdateGestureDrag(event))
- tray_handler_.reset();
- } else if (shelf->UpdateGestureDrag(event) ==
- ShelfLayoutManager::DRAG_TRAY) {
- tray_handler_.reset(new TrayGestureHandler());
- }
-
- return true;
- }
-
- drag_in_progress_ = false;
-
- if (event.type() == ui::ET_GESTURE_SCROLL_END ||
- event.type() == ui::ET_SCROLL_FLING_START) {
- if (tray_handler_) {
- tray_handler_->CompleteGestureDrag(event);
- tray_handler_.reset();
- }
-
- shelf->CompleteGestureDrag(event);
- return true;
- }
-
- // Unexpected event. Reset the state and let the event fall through.
- shelf->CancelGestureDrag();
- return false;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/gestures/shelf_gesture_handler.h b/chromium/ash/wm/gestures/shelf_gesture_handler.h
deleted file mode 100644
index 90dfd7c923e..00000000000
--- a/chromium/ash/wm/gestures/shelf_gesture_handler.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_GESTURES_SHELF_GESTURE_HANDLER_H_
-#define ASH_WM_GESTURES_SHELF_GESTURE_HANDLER_H_
-
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-
-namespace ui {
-class GestureEvent;
-}
-
-namespace ash {
-namespace internal {
-
-class TrayGestureHandler;
-
-// This manages gestures on the shelf (e.g. launcher, status tray) that affects
-// the shelf visibility.
-class ShelfGestureHandler {
- public:
- ShelfGestureHandler();
- virtual ~ShelfGestureHandler();
-
- // Processes a gesture event and updates the status of the shelf when
- // appropriate. Returns true of the gesture has been handled and it should not
- // be processed any farther, false otherwise.
- bool ProcessGestureEvent(const ui::GestureEvent& event);
-
- private:
- bool drag_in_progress_;
-
- scoped_ptr<TrayGestureHandler> tray_handler_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfGestureHandler);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_GESTURES_SHELF_GESTURE_HANDLER_H_
diff --git a/chromium/ash/wm/gestures/system_pinch_handler.cc b/chromium/ash/wm/gestures/system_pinch_handler.cc
deleted file mode 100644
index 2c066161304..00000000000
--- a/chromium/ash/wm/gestures/system_pinch_handler.cc
+++ /dev/null
@@ -1,142 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/gestures/system_pinch_handler.h"
-
-#include "ash/launcher/launcher.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/wm/window_animations.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/snap_sizer.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/events/event_constants.h"
-#include "ui/events/gestures/gesture_types.h"
-#include "ui/gfx/rect.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-const double kPinchThresholdForMaximize = 1.5;
-const double kPinchThresholdForMinimize = 0.7;
-
-namespace ash {
-namespace internal {
-
-const int SystemPinchHandler::kSystemGesturePoints = 4;
-
-SystemPinchHandler::SystemPinchHandler(aura::Window* target)
- : target_(target),
- phantom_(target),
- phantom_state_(PHANTOM_WINDOW_NORMAL),
- pinch_factor_(1.) {
- widget_ = views::Widget::GetWidgetForNativeWindow(target_);
-}
-
-SystemPinchHandler::~SystemPinchHandler() {
-}
-
-SystemGestureStatus SystemPinchHandler::ProcessGestureEvent(
- const ui::GestureEvent& event) {
- // The target has changed, somehow. Let's bale.
- if (!widget_ || !widget_->widget_delegate()->CanResize())
- return SYSTEM_GESTURE_END;
- wm::WindowState* window_state = wm::GetWindowState(target_);
- switch (event.type()) {
- case ui::ET_GESTURE_END: {
- if (event.details().touch_points() > kSystemGesturePoints)
- break;
-
- if (phantom_state_ == PHANTOM_WINDOW_MAXIMIZED) {
- if (!window_state->IsMaximizedOrFullscreen())
- window_state->Maximize();
- } else if (phantom_state_ == PHANTOM_WINDOW_MINIMIZED) {
- if (window_state->IsMaximizedOrFullscreen()) {
- window_state->Restore();
- } else {
- window_state->Minimize();
-
- // NOTE: Minimizing the window will cause this handler to be
- // destroyed. So do not access anything from |this| from here.
- return SYSTEM_GESTURE_END;
- }
- }
- return SYSTEM_GESTURE_END;
- }
-
- case ui::ET_GESTURE_PINCH_UPDATE: {
- // The PINCH_UPDATE events contain incremental scaling updates.
- pinch_factor_ *= event.details().scale();
- gfx::Rect bounds =
- GetPhantomWindowScreenBounds(target_, event.location());
- if (phantom_state_ != PHANTOM_WINDOW_NORMAL || phantom_.IsShowing())
- phantom_.Show(bounds);
- break;
- }
-
- case ui::ET_GESTURE_MULTIFINGER_SWIPE: {
- phantom_.Hide();
- pinch_factor_ = 1.0;
- phantom_state_ = PHANTOM_WINDOW_NORMAL;
-
- if (event.details().swipe_left() || event.details().swipe_right()) {
- // Snap for left/right swipes.
- ui::ScopedLayerAnimationSettings settings(
- target_->layer()->GetAnimator());
- internal::SnapSizer::SnapWindow(window_state,
- event.details().swipe_left() ? internal::SnapSizer::LEFT_EDGE :
- internal::SnapSizer::RIGHT_EDGE);
- } else if (event.details().swipe_up()) {
- if (!window_state->IsMaximizedOrFullscreen())
- window_state->Maximize();
- } else if (event.details().swipe_down()) {
- window_state->Minimize();
- } else {
- NOTREACHED() << "Swipe happened without a direction.";
- }
- break;
- }
-
- default:
- break;
- }
-
- return SYSTEM_GESTURE_PROCESSED;
-}
-
-gfx::Rect SystemPinchHandler::GetPhantomWindowScreenBounds(
- aura::Window* window,
- const gfx::Point& point) {
- if (pinch_factor_ > kPinchThresholdForMaximize) {
- phantom_state_ = PHANTOM_WINDOW_MAXIMIZED;
- return ScreenAsh::ConvertRectToScreen(
- target_->parent(),
- ScreenAsh::GetMaximizedWindowBoundsInParent(target_));
- }
-
- if (pinch_factor_ < kPinchThresholdForMinimize) {
- wm::WindowState* window_state = wm::GetWindowState(window);
- if (window_state->IsMaximizedOrFullscreen()) {
- if (window_state->HasRestoreBounds()) {
- phantom_state_ = PHANTOM_WINDOW_MINIMIZED;
- return window_state->GetRestoreBoundsInScreen();
- }
- return window->bounds();
- }
-
- gfx::Rect rect = GetMinimizeAnimationTargetBoundsInScreen(target_);
- if (!rect.IsEmpty())
- rect.Inset(-8, -8);
- phantom_state_ = PHANTOM_WINDOW_MINIMIZED;
- return rect;
- }
-
- phantom_state_ = PHANTOM_WINDOW_NORMAL;
- return window->bounds();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/gestures/system_pinch_handler.h b/chromium/ash/wm/gestures/system_pinch_handler.h
deleted file mode 100644
index d5c5a0eade9..00000000000
--- a/chromium/ash/wm/gestures/system_pinch_handler.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_GESTURES_SYSTEM_PINCH_HANDLER_H_
-#define ASH_WM_GESTURES_SYSTEM_PINCH_HANDLER_H_
-
-#include "ash/wm/workspace/phantom_window_controller.h"
-
-namespace aura {
-class Window;
-}
-
-namespace gfx {
-class Point;
-}
-
-namespace ui {
-class GestureEvent;
-}
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-namespace internal {
-
-enum SystemGestureStatus {
- SYSTEM_GESTURE_PROCESSED, // The system gesture has been processed.
- SYSTEM_GESTURE_IGNORED, // The system gesture was ignored.
- SYSTEM_GESTURE_END, // Marks the end of the sytem gesture.
-};
-
-// This handles 4+ finger pinch gestures to maximize/minimize/restore windows.
-class SystemPinchHandler {
- public:
- explicit SystemPinchHandler(aura::Window* target);
- virtual ~SystemPinchHandler();
-
- // Processes a gesture event. Returns SYSTEM_GESTURE_PROCESSED if the gesture
- // event has been processed. Returns SYSTEM_GESTURE_END if the gesture event
- // has been processed, and marks the end of the gesture sequence (i.e. the
- // handler should receive no more input events).
- SystemGestureStatus ProcessGestureEvent(const ui::GestureEvent& event);
-
- static const int kSystemGesturePoints;
-
- private:
- // Returns the appropriate bounds for the phantom window depending on the
- // state of the window, the state of the gesture sequence, and the current
- // event location.
- gfx::Rect GetPhantomWindowScreenBounds(aura::Window* window,
- const gfx::Point& point);
-
- enum PhantomWindowState {
- PHANTOM_WINDOW_NORMAL,
- PHANTOM_WINDOW_MAXIMIZED,
- PHANTOM_WINDOW_MINIMIZED,
- };
-
- aura::Window* target_;
- views::Widget* widget_;
-
- // A phantom window is used to provide visual cues for
- // pinch-to-resize/maximize/minimize gestures.
- PhantomWindowController phantom_;
-
- // When the phantom window is in minimized or maximized state, moving the
- // target window should not move the phantom window. So |phantom_state_| is
- // used to track the state of the phantom window.
- PhantomWindowState phantom_state_;
-
- // PINCH_UPDATE events include incremental pinch-amount. But it is necessary
- // to keep track of the overall pinch-amount. |pinch_factor_| is used for
- // that.
- double pinch_factor_;
-
- DISALLOW_COPY_AND_ASSIGN(SystemPinchHandler);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_GESTURES_SYSTEM_PINCH_HANDLER_H_
diff --git a/chromium/ash/wm/gestures/tray_gesture_handler.cc b/chromium/ash/wm/gestures/tray_gesture_handler.cc
deleted file mode 100644
index 0d2e8cfdd6d..00000000000
--- a/chromium/ash/wm/gestures/tray_gesture_handler.cc
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/gestures/tray_gesture_handler.h"
-
-#include "ash/shell.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_bubble.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/events/event.h"
-#include "ui/gfx/transform.h"
-#include "ui/views/widget/widget.h"
-
-const int kMinBubbleHeight = 13;
-
-namespace ash {
-namespace internal {
-
-TrayGestureHandler::TrayGestureHandler()
- : widget_(NULL),
- gesture_drag_amount_(0) {
- // TODO(oshima): Support multiple display case.
- SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray();
- tray->ShowDefaultView(BUBBLE_CREATE_NEW);
- SystemTrayBubble* bubble = tray->GetSystemBubble();
- if (!bubble)
- return;
- bubble->bubble_view()->set_gesture_dragging(true);
- widget_ = bubble->bubble_view()->GetWidget();
- widget_->AddObserver(this);
-
- gfx::Rect bounds = widget_->GetWindowBoundsInScreen();
- int height_change = bounds.height() - kMinBubbleHeight;
- bounds.set_height(kMinBubbleHeight);
- bounds.set_y(bounds.y() + height_change);
- widget_->SetBounds(bounds);
-}
-
-TrayGestureHandler::~TrayGestureHandler() {
- if (widget_)
- widget_->RemoveObserver(this);
-}
-
-bool TrayGestureHandler::UpdateGestureDrag(const ui::GestureEvent& event) {
- CHECK_EQ(ui::ET_GESTURE_SCROLL_UPDATE, event.type());
- if (!widget_)
- return false;
-
- gesture_drag_amount_ += event.details().scroll_y();
- if (gesture_drag_amount_ > 0 && gesture_drag_amount_ < kMinBubbleHeight) {
- widget_->Close();
- return false;
- }
-
- gfx::Rect bounds = widget_->GetWindowBoundsInScreen();
- int new_height = std::min(
- kMinBubbleHeight + std::max(0, static_cast<int>(-gesture_drag_amount_)),
- widget_->GetContentsView()->GetPreferredSize().height());
- int height_change = bounds.height() - new_height;
- bounds.set_height(new_height);
- bounds.set_y(bounds.y() + height_change);
- widget_->SetBounds(bounds);
- return true;
-}
-
-void TrayGestureHandler::CompleteGestureDrag(const ui::GestureEvent& event) {
- if (!widget_)
- return;
-
- widget_->RemoveObserver(this);
-
- // Close the widget if it hasn't been dragged enough.
- bool should_close = false;
- int height = widget_->GetWindowBoundsInScreen().height();
- int preferred_height =
- widget_->GetContentsView()->GetPreferredSize().height();
- if (event.type() == ui::ET_GESTURE_SCROLL_END) {
- const float kMinThresholdGestureDrag = 0.4f;
- if (height < preferred_height * kMinThresholdGestureDrag)
- should_close = true;
- } else if (event.type() == ui::ET_SCROLL_FLING_START) {
- const float kMinThresholdGestureDragExposeFling = 0.25f;
- const float kMinThresholdGestureFling = 1000.f;
- if (height < preferred_height * kMinThresholdGestureDragExposeFling &&
- event.details().velocity_y() > -kMinThresholdGestureFling)
- should_close = true;
- } else {
- NOTREACHED();
- }
-
- if (should_close) {
- widget_->Close();
- } else {
- SystemTrayBubble* bubble =
- Shell::GetInstance()->GetPrimarySystemTray()->GetSystemBubble();
- if (bubble)
- bubble->bubble_view()->set_gesture_dragging(false);
- }
-}
-
-void TrayGestureHandler::OnWidgetDestroying(views::Widget* widget) {
- CHECK_EQ(widget_, widget);
- widget_ = NULL;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/gestures/tray_gesture_handler.h b/chromium/ash/wm/gestures/tray_gesture_handler.h
deleted file mode 100644
index 34f033b35f0..00000000000
--- a/chromium/ash/wm/gestures/tray_gesture_handler.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_GESTURES_TRAY_GESTURE_HANDLER_H_
-#define ASH_WM_GESTURES_TRAY_GESTURE_HANDLER_H_
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/views/widget/widget_observer.h"
-
-namespace ui {
-class GestureEvent;
-}
-
-namespace ash {
-namespace internal {
-
-// Handles gesture events on the shelf to show the system tray bubble.
-class TrayGestureHandler : public views::WidgetObserver {
- public:
- TrayGestureHandler();
- virtual ~TrayGestureHandler();
-
- // Handles a gesture-update event and updates the dragging state of the tray
- // bubble. Returns true if the handler can continue to process gesture events
- // for the bubble. Returns false if it should no longer receive gesture
- // events.
- bool UpdateGestureDrag(const ui::GestureEvent& event);
-
- void CompleteGestureDrag(const ui::GestureEvent& event);
-
- private:
- virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
-
- // The widget for the tray-bubble.
- views::Widget* widget_;
-
- // The amount that has been dragged.
- float gesture_drag_amount_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayGestureHandler);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_GESTURES_TRAY_GESTURE_HANDLER_H_
diff --git a/chromium/ash/wm/gestures/two_finger_drag_handler.cc b/chromium/ash/wm/gestures/two_finger_drag_handler.cc
deleted file mode 100644
index 5cf98a68ab8..00000000000
--- a/chromium/ash/wm/gestures/two_finger_drag_handler.cc
+++ /dev/null
@@ -1,216 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/gestures/two_finger_drag_handler.h"
-
-#include "ash/wm/window_resizer.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/snap_sizer.h"
-#include "ui/aura/client/window_types.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/base/hit_test.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/events/event.h"
-#include "ui/events/event_constants.h"
-
-namespace {
-
-bool IsTopEdge(int component) {
- return component == HTTOPLEFT ||
- component == HTTOP ||
- component == HTTOPRIGHT;
-}
-
-bool IsBottomEdge(int component) {
- return component == HTBOTTOMLEFT ||
- component == HTBOTTOM ||
- component == HTBOTTOMRIGHT;
-}
-
-bool IsRightEdge(int component) {
- return component == HTTOPRIGHT ||
- component == HTRIGHT ||
- component == HTBOTTOMRIGHT;
-}
-
-bool IsLeftEdge(int component) {
- return component == HTTOPLEFT ||
- component == HTLEFT ||
- component == HTBOTTOMLEFT;
-}
-
-bool IsSomeEdge(int component) {
- switch (component) {
- case HTTOPLEFT:
- case HTTOP:
- case HTTOPRIGHT:
- case HTRIGHT:
- case HTBOTTOMRIGHT:
- case HTBOTTOM:
- case HTBOTTOMLEFT:
- case HTLEFT:
- return true;
- }
- return false;
-}
-
-// Returns whether a window-move should be allowed depending on the hit-test
-// results of the two fingers.
-bool WindowComponentsAllowMoving(int component1, int component2) {
- return ((IsTopEdge(component1) && IsTopEdge(component2)) ||
- (IsBottomEdge(component1) && IsBottomEdge(component2)) ||
- (IsLeftEdge(component1) && IsLeftEdge(component2)) ||
- (IsRightEdge(component1) && IsRightEdge(component2)) ||
- (!IsSomeEdge(component1) && !IsSomeEdge(component2)));
-}
-
-} // namespace
-
-namespace ash {
-namespace internal {
-
-TwoFingerDragHandler::TwoFingerDragHandler()
- : first_finger_hittest_(HTNOWHERE),
- in_gesture_drag_(false) {
-}
-
-TwoFingerDragHandler::~TwoFingerDragHandler() {
-}
-
-bool TwoFingerDragHandler::ProcessGestureEvent(aura::Window* target,
- const ui::GestureEvent& event) {
- if (!target->delegate())
- return false;
-
- if (event.type() == ui::ET_GESTURE_BEGIN &&
- event.details().touch_points() == 1) {
- first_finger_hittest_ =
- target->delegate()->GetNonClientComponent(event.location());
- return false;
- }
-
- wm::WindowState* window_state = wm::GetWindowState(target);
-
- if (event.type() == ui::ET_GESTURE_BEGIN &&
- event.details().touch_points() == 2) {
- if (!in_gesture_drag_ && window_state->IsNormalShowState() &&
- target->type() == aura::client::WINDOW_TYPE_NORMAL) {
- if (WindowComponentsAllowMoving(first_finger_hittest_,
- target->delegate()->GetNonClientComponent(event.location()))) {
- in_gesture_drag_ = true;
- target->AddObserver(this);
- // Only create a new WindowResizer if one doesn't already exist
- // for the target window.
- window_resizer_ = CreateWindowResizer(
- target,
- event.details().bounding_box().CenterPoint(),
- HTCAPTION,
- aura::client::WINDOW_MOVE_SOURCE_TOUCH);
- return true;
- }
- }
-
- return false;
- }
-
- if (!in_gesture_drag_) {
- // Consume all two-finger gestures on a normal window.
- return event.details().touch_points() == 2 &&
- target->type() == aura::client::WINDOW_TYPE_NORMAL &&
- window_state->IsNormalShowState();
- }
- // Since |in_gesture_drag_| is true a resizer was either created above or
- // it was created elsewhere and can be found in |window_state|.
- WindowResizer* any_window_resizer = window_resizer_ ?
- window_resizer_.get() : window_state->window_resizer();
- DCHECK(any_window_resizer);
-
- if (target != any_window_resizer->GetTarget())
- return false;
-
- switch (event.type()) {
- case ui::ET_GESTURE_BEGIN:
- if (event.details().touch_points() > 2) {
- if (window_resizer_)
- window_resizer_->CompleteDrag(event.flags());
- Reset(target);
- }
- return false;
-
- case ui::ET_GESTURE_SCROLL_BEGIN:
- case ui::ET_GESTURE_PINCH_BEGIN:
- case ui::ET_GESTURE_SCROLL_END:
- return true;
-
- case ui::ET_GESTURE_MULTIFINGER_SWIPE: {
- // For a swipe, the window either maximizes, minimizes, or snaps. In this
- // case, complete the drag, and do the appropriate action.
- if (window_resizer_)
- window_resizer_->CompleteDrag(event.flags());
- Reset(target);
- if (event.details().swipe_up()) {
- if (window_state->CanMaximize())
- window_state->Maximize();
- } else if (event.details().swipe_down() && window_state->CanMinimize()) {
- window_state->Minimize();
- } else if (window_state->CanSnap()) {
- ui::ScopedLayerAnimationSettings scoped_setter(
- target->layer()->GetAnimator());
- scoped_setter.SetPreemptionStrategy(
- ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS);
- internal::SnapSizer::SnapWindow(window_state,
- event.details().swipe_left() ? internal::SnapSizer::LEFT_EDGE :
- internal::SnapSizer::RIGHT_EDGE);
- }
- return true;
- }
-
- case ui::ET_GESTURE_PINCH_UPDATE:
- case ui::ET_GESTURE_SCROLL_UPDATE:
- any_window_resizer->Drag(event.details().bounding_box().CenterPoint(),
- event.flags());
- return true;
-
- case ui::ET_GESTURE_PINCH_END:
- if (window_resizer_)
- window_resizer_->CompleteDrag(event.flags());
- Reset(target);
- return true;
-
- case ui::ET_GESTURE_END:
- if (event.details().touch_points() == 2) {
- if (window_resizer_)
- window_resizer_->RevertDrag();
- Reset(target);
- return true;
- }
- break;
-
- default:
- break;
- }
-
- return false;
-}
-
-void TwoFingerDragHandler::Reset(aura::Window* window) {
- window->RemoveObserver(this);
- window_resizer_.reset();
- in_gesture_drag_ = false;
-}
-
-void TwoFingerDragHandler::OnWindowVisibilityChanged(aura::Window* window,
- bool visible) {
- Reset(window);
-}
-
-void TwoFingerDragHandler::OnWindowDestroying(aura::Window* window) {
- Reset(window);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/gestures/two_finger_drag_handler.h b/chromium/ash/wm/gestures/two_finger_drag_handler.h
deleted file mode 100644
index 11b7f51e582..00000000000
--- a/chromium/ash/wm/gestures/two_finger_drag_handler.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_GESTURES_TWO_FINGER_DRAG_HANDLER_H_
-#define ASH_WM_GESTURES_TWO_FINGER_DRAG_HANDLER_H_
-
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/window_observer.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ui {
-class GestureEvent;
-}
-
-namespace ash {
-
-class WindowResizer;
-
-namespace internal {
-
-// This handles 2-finger drag gestures to move toplevel windows.
-class TwoFingerDragHandler : public aura::WindowObserver {
- public:
- TwoFingerDragHandler();
- virtual ~TwoFingerDragHandler();
-
- // Processes a gesture event and starts a drag, or updates/ends an in-progress
- // drag. Returns true if the event has been handled and should not be
- // processed any farther, false otherwise.
- bool ProcessGestureEvent(aura::Window* target, const ui::GestureEvent& event);
-
- private:
- void Reset(aura::Window* window);
-
- // Overridden from aura::WindowObserver.
- virtual void OnWindowVisibilityChanged(aura::Window* window,
- bool visible) OVERRIDE;
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
-
- int first_finger_hittest_;
-
- // Set to true while a drag initiated with two-finger gesture is in progress.
- bool in_gesture_drag_;
-
- scoped_ptr<WindowResizer> window_resizer_;
-
- DISALLOW_COPY_AND_ASSIGN(TwoFingerDragHandler);
-};
-
-}
-} // namespace ash
-
-#endif // ASH_WM_GESTURES_TWO_FINGER_DRAG_HANDLER_H_
diff --git a/chromium/ash/wm/header_painter.cc b/chromium/ash/wm/header_painter.cc
deleted file mode 100644
index bf87015b177..00000000000
--- a/chromium/ash/wm/header_painter.cc
+++ /dev/null
@@ -1,583 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/header_painter.h"
-
-#include <vector>
-
-#include "ash/root_window_controller.h"
-#include "ash/wm/caption_buttons/frame_caption_button_container_view.h"
-#include "ash/wm/solo_window_tracker.h"
-#include "base/logging.h" // DCHECK
-#include "grit/ash_resources.h"
-#include "third_party/skia/include/core/SkCanvas.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "third_party/skia/include/core/SkPaint.h"
-#include "third_party/skia/include/core/SkPath.h"
-#include "ui/aura/window.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/base/theme_provider.h"
-#include "ui/gfx/animation/slide_animation.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/font.h"
-#include "ui/gfx/image/image.h"
-#include "ui/gfx/screen.h"
-#include "ui/gfx/skia_util.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-using aura::Window;
-using views::Widget;
-
-namespace {
-// Space between left edge of window and popup window icon.
-const int kIconOffsetX = 9;
-// Height and width of window icon.
-const int kIconSize = 16;
-// Space between the title text and the caption buttons.
-const int kTitleLogoSpacing = 5;
-// Space between window icon and title text.
-const int kTitleIconOffsetX = 5;
-// Space between window edge and title text, when there is no icon.
-const int kTitleNoIconOffsetX = 8;
-// Color for the non-maximized window title text.
-const SkColor kNonMaximizedWindowTitleTextColor = SkColorSetRGB(40, 40, 40);
-// Color for the maximized window title text.
-const SkColor kMaximizedWindowTitleTextColor = SK_ColorWHITE;
-// Size of header/content separator line below the header image.
-const int kHeaderContentSeparatorSize = 1;
-// Color of header bottom edge line.
-const SkColor kHeaderContentSeparatorColor = SkColorSetRGB(128, 128, 128);
-// In the pre-Ash era the web content area had a frame along the left edge, so
-// user-generated theme images for the new tab page assume they are shifted
-// right relative to the header. Now that we have removed the left edge frame
-// we need to copy the theme image for the window header from a few pixels
-// inset to preserve alignment with the NTP image, or else we'll break a bunch
-// of existing themes. We do something similar on OS X for the same reason.
-const int kThemeFrameImageInsetX = 5;
-// Duration of crossfade animation for activating and deactivating frame.
-const int kActivationCrossfadeDurationMs = 200;
-// Alpha/opacity value for fully-opaque headers.
-const int kFullyOpaque = 255;
-
-// Tiles an image into an area, rounding the top corners. Samples |image|
-// starting |image_inset_x| pixels from the left of the image.
-void TileRoundRect(gfx::Canvas* canvas,
- const gfx::ImageSkia& image,
- const SkPaint& paint,
- const gfx::Rect& bounds,
- int top_left_corner_radius,
- int top_right_corner_radius,
- int image_inset_x) {
- SkRect rect = gfx::RectToSkRect(bounds);
- const SkScalar kTopLeftRadius = SkIntToScalar(top_left_corner_radius);
- const SkScalar kTopRightRadius = SkIntToScalar(top_right_corner_radius);
- SkScalar radii[8] = {
- kTopLeftRadius, kTopLeftRadius, // top-left
- kTopRightRadius, kTopRightRadius, // top-right
- 0, 0, // bottom-right
- 0, 0}; // bottom-left
- SkPath path;
- path.addRoundRect(rect, radii, SkPath::kCW_Direction);
- canvas->DrawImageInPath(image, -image_inset_x, 0, path, paint);
-}
-
-// Tiles |frame_image| and |frame_overlay_image| into an area, rounding the top
-// corners.
-void PaintFrameImagesInRoundRect(gfx::Canvas* canvas,
- const gfx::ImageSkia* frame_image,
- const gfx::ImageSkia* frame_overlay_image,
- const SkPaint& paint,
- const gfx::Rect& bounds,
- int corner_radius,
- int image_inset_x) {
- SkXfermode::Mode normal_mode;
- SkXfermode::AsMode(NULL, &normal_mode);
-
- // If |paint| is using an unusual SkXfermode::Mode (this is the case while
- // crossfading), we must create a new canvas to overlay |frame_image| and
- // |frame_overlay_image| using |normal_mode| and then paint the result
- // using the unusual mode. We try to avoid this because creating a new
- // browser-width canvas is expensive.
- bool fast_path = (!frame_overlay_image ||
- SkXfermode::IsMode(paint.getXfermode(), normal_mode));
- if (fast_path) {
- TileRoundRect(canvas, *frame_image, paint, bounds, corner_radius,
- corner_radius, image_inset_x);
-
- if (frame_overlay_image) {
- // Adjust |bounds| such that |frame_overlay_image| is not tiled.
- gfx::Rect overlay_bounds = bounds;
- overlay_bounds.Intersect(
- gfx::Rect(bounds.origin(), frame_overlay_image->size()));
- int top_left_corner_radius = corner_radius;
- int top_right_corner_radius = corner_radius;
- if (overlay_bounds.width() < bounds.width() - corner_radius)
- top_right_corner_radius = 0;
- TileRoundRect(canvas, *frame_overlay_image, paint, overlay_bounds,
- top_left_corner_radius, top_right_corner_radius, 0);
- }
- } else {
- gfx::Canvas temporary_canvas(bounds.size(), canvas->image_scale(), false);
- temporary_canvas.TileImageInt(*frame_image,
- image_inset_x, 0,
- 0, 0,
- bounds.width(), bounds.height());
- temporary_canvas.DrawImageInt(*frame_overlay_image, 0, 0);
- TileRoundRect(canvas, gfx::ImageSkia(temporary_canvas.ExtractImageRep()),
- paint, bounds, corner_radius, corner_radius, 0);
- }
-}
-
-} // namespace
-
-namespace ash {
-
-// static
-int HeaderPainter::kActiveWindowOpacity = 255; // 1.0
-int HeaderPainter::kInactiveWindowOpacity = 255; // 1.0
-int HeaderPainter::kSoloWindowOpacity = 77; // 0.3
-
-///////////////////////////////////////////////////////////////////////////////
-// HeaderPainter, public:
-
-HeaderPainter::HeaderPainter()
- : frame_(NULL),
- header_view_(NULL),
- window_icon_(NULL),
- caption_button_container_(NULL),
- window_(NULL),
- header_height_(0),
- top_left_corner_(NULL),
- top_edge_(NULL),
- top_right_corner_(NULL),
- header_left_edge_(NULL),
- header_right_edge_(NULL),
- previous_theme_frame_id_(0),
- previous_theme_frame_overlay_id_(0),
- previous_opacity_(0),
- crossfade_theme_frame_id_(0),
- crossfade_theme_frame_overlay_id_(0),
- crossfade_opacity_(0) {}
-
-HeaderPainter::~HeaderPainter() {
- // Sometimes we are destroyed before the window closes, so ensure we clean up.
- if (window_)
- window_->RemoveObserver(this);
-}
-
-void HeaderPainter::Init(
- views::Widget* frame,
- views::View* header_view,
- views::View* window_icon,
- FrameCaptionButtonContainerView* caption_button_container) {
- DCHECK(frame);
- DCHECK(header_view);
- // window_icon may be NULL.
- DCHECK(caption_button_container);
- frame_ = frame;
- header_view_ = header_view;
- window_icon_ = window_icon;
- caption_button_container_ = caption_button_container;
-
- // Window frame image parts.
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- top_left_corner_ =
- rb.GetImageNamed(IDR_AURA_WINDOW_HEADER_SHADE_TOP_LEFT).ToImageSkia();
- top_edge_ =
- rb.GetImageNamed(IDR_AURA_WINDOW_HEADER_SHADE_TOP).ToImageSkia();
- top_right_corner_ =
- rb.GetImageNamed(IDR_AURA_WINDOW_HEADER_SHADE_TOP_RIGHT).ToImageSkia();
- header_left_edge_ =
- rb.GetImageNamed(IDR_AURA_WINDOW_HEADER_SHADE_LEFT).ToImageSkia();
- header_right_edge_ =
- rb.GetImageNamed(IDR_AURA_WINDOW_HEADER_SHADE_RIGHT).ToImageSkia();
-
- window_ = frame->GetNativeWindow();
-
- // Observer removes itself in OnWindowDestroying() below, or in the destructor
- // if we go away before the window.
- window_->AddObserver(this);
-
- // Solo-window header updates are handled by the WorkspaceLayoutManager when
- // this window is added to the desktop.
-}
-
-// static
-gfx::Rect HeaderPainter::GetBoundsForClientView(
- int header_height,
- const gfx::Rect& window_bounds) {
- gfx::Rect client_bounds(window_bounds);
- client_bounds.Inset(0, header_height, 0, 0);
- return client_bounds;
-}
-
-// static
-gfx::Rect HeaderPainter::GetWindowBoundsForClientBounds(
- int header_height,
- const gfx::Rect& client_bounds) {
- gfx::Rect window_bounds(client_bounds);
- window_bounds.Inset(0, -header_height, 0, 0);
- if (window_bounds.y() < 0)
- window_bounds.set_y(0);
- return window_bounds;
-}
-
-int HeaderPainter::NonClientHitTest(const gfx::Point& point) const {
- gfx::Point point_in_header_view(point);
- views::View::ConvertPointFromWidget(header_view_, &point_in_header_view);
- if (!GetHeaderLocalBounds().Contains(point_in_header_view))
- return HTNOWHERE;
- if (caption_button_container_->visible()) {
- gfx::Point point_in_caption_button_container(point);
- views::View::ConvertPointFromWidget(caption_button_container_,
- &point_in_caption_button_container);
- int component = caption_button_container_->NonClientHitTest(
- point_in_caption_button_container);
- if (component != HTNOWHERE)
- return component;
- }
- // Caption is a safe default.
- return HTCAPTION;
-}
-
-int HeaderPainter::GetMinimumHeaderWidth() const {
- // Ensure we have enough space for the window icon and buttons. We allow
- // the title string to collapse to zero width.
- return GetTitleOffsetX() +
- caption_button_container_->GetMinimumSize().width();
-}
-
-int HeaderPainter::GetRightInset() const {
- return caption_button_container_->GetPreferredSize().width();
-}
-
-int HeaderPainter::GetThemeBackgroundXInset() const {
- return kThemeFrameImageInsetX;
-}
-
-void HeaderPainter::PaintHeader(gfx::Canvas* canvas,
- HeaderMode header_mode,
- int theme_frame_id,
- int theme_frame_overlay_id) {
- bool initial_paint = (previous_theme_frame_id_ == 0);
- if (!initial_paint &&
- (previous_theme_frame_id_ != theme_frame_id ||
- previous_theme_frame_overlay_id_ != theme_frame_overlay_id)) {
- aura::Window* parent = frame_->GetNativeWindow()->parent();
- // Don't animate the header if the parent (a workspace) is already
- // animating. Doing so results in continually painting during the animation
- // and gives a slower frame rate.
- // TODO(sky): expose a better way to determine this rather than assuming
- // the parent is a workspace.
- bool parent_animating = parent &&
- (parent->layer()->GetAnimator()->IsAnimatingProperty(
- ui::LayerAnimationElement::OPACITY) ||
- parent->layer()->GetAnimator()->IsAnimatingProperty(
- ui::LayerAnimationElement::VISIBILITY));
- if (!parent_animating) {
- crossfade_animation_.reset(new gfx::SlideAnimation(this));
- crossfade_theme_frame_id_ = previous_theme_frame_id_;
- crossfade_theme_frame_overlay_id_ = previous_theme_frame_overlay_id_;
- crossfade_opacity_ = previous_opacity_;
- crossfade_animation_->SetSlideDuration(kActivationCrossfadeDurationMs);
- crossfade_animation_->Show();
- } else {
- crossfade_animation_.reset();
- }
- }
-
- int opacity =
- GetHeaderOpacity(header_mode, theme_frame_id, theme_frame_overlay_id);
- ui::ThemeProvider* theme_provider = frame_->GetThemeProvider();
- gfx::ImageSkia* theme_frame = theme_provider->GetImageSkiaNamed(
- theme_frame_id);
- gfx::ImageSkia* theme_frame_overlay = NULL;
- if (theme_frame_overlay_id != 0) {
- theme_frame_overlay = theme_provider->GetImageSkiaNamed(
- theme_frame_overlay_id);
- }
-
- int corner_radius = GetHeaderCornerRadius();
- SkPaint paint;
-
- if (crossfade_animation_.get() && crossfade_animation_->is_animating()) {
- gfx::ImageSkia* crossfade_theme_frame =
- theme_provider->GetImageSkiaNamed(crossfade_theme_frame_id_);
- gfx::ImageSkia* crossfade_theme_frame_overlay = NULL;
- if (crossfade_theme_frame_overlay_id_ != 0) {
- crossfade_theme_frame_overlay = theme_provider->GetImageSkiaNamed(
- crossfade_theme_frame_overlay_id_);
- }
- if (!crossfade_theme_frame ||
- (crossfade_theme_frame_overlay_id_ != 0 &&
- !crossfade_theme_frame_overlay)) {
- // Reset the animation. This case occurs when the user switches the theme
- // that they are using.
- crossfade_animation_.reset();
- paint.setAlpha(opacity);
- } else {
- double current_value = crossfade_animation_->GetCurrentValue();
- int old_alpha = (1 - current_value) * crossfade_opacity_;
- int new_alpha = current_value * opacity;
-
- // Draw the old header background, clipping the corners to be rounded.
- paint.setAlpha(old_alpha);
- paint.setXfermodeMode(SkXfermode::kPlus_Mode);
- PaintFrameImagesInRoundRect(canvas,
- crossfade_theme_frame,
- crossfade_theme_frame_overlay,
- paint,
- GetHeaderLocalBounds(),
- corner_radius,
- GetThemeBackgroundXInset());
-
- paint.setAlpha(new_alpha);
- }
- } else {
- paint.setAlpha(opacity);
- }
-
- // Draw the header background, clipping the corners to be rounded.
- PaintFrameImagesInRoundRect(canvas,
- theme_frame,
- theme_frame_overlay,
- paint,
- GetHeaderLocalBounds(),
- corner_radius,
- GetThemeBackgroundXInset());
-
- previous_theme_frame_id_ = theme_frame_id;
- previous_theme_frame_overlay_id_ = theme_frame_overlay_id;
- previous_opacity_ = opacity;
-
- // We don't need the extra lightness in the edges when we're at the top edge
- // of the screen or when the header's corners are not rounded.
- //
- // TODO(sky): this isn't quite right. What we really want is a method that
- // returns bounds ignoring transforms on certain windows (such as workspaces)
- // and is relative to the root.
- if (frame_->GetNativeWindow()->bounds().y() == 0 || corner_radius == 0)
- return;
-
- // Draw the top corners and edge.
- int top_left_width = top_left_corner_->width();
- int top_left_height = top_left_corner_->height();
- canvas->DrawImageInt(*top_left_corner_,
- 0, 0, top_left_width, top_left_height,
- 0, 0, top_left_width, top_left_height,
- false);
- canvas->TileImageInt(*top_edge_,
- top_left_width,
- 0,
- header_view_->width() - top_left_width - top_right_corner_->width(),
- top_edge_->height());
- int top_right_height = top_right_corner_->height();
- canvas->DrawImageInt(*top_right_corner_,
- 0, 0,
- top_right_corner_->width(), top_right_height,
- header_view_->width() - top_right_corner_->width(), 0,
- top_right_corner_->width(), top_right_height,
- false);
-
- // Header left edge.
- int header_left_height = theme_frame->height() - top_left_height;
- canvas->TileImageInt(*header_left_edge_,
- 0, top_left_height,
- header_left_edge_->width(), header_left_height);
-
- // Header right edge.
- int header_right_height = theme_frame->height() - top_right_height;
- canvas->TileImageInt(*header_right_edge_,
- header_view_->width() - header_right_edge_->width(),
- top_right_height,
- header_right_edge_->width(),
- header_right_height);
-
- // We don't draw edges around the content area. Web content goes flush
- // to the edge of the window.
-}
-
-void HeaderPainter::PaintHeaderContentSeparator(gfx::Canvas* canvas) {
- canvas->FillRect(gfx::Rect(0,
- header_height_ - kHeaderContentSeparatorSize,
- header_view_->width(),
- kHeaderContentSeparatorSize),
- kHeaderContentSeparatorColor);
-}
-
-int HeaderPainter::HeaderContentSeparatorSize() const {
- return kHeaderContentSeparatorSize;
-}
-
-void HeaderPainter::PaintTitleBar(gfx::Canvas* canvas,
- const gfx::Font& title_font) {
- // The window icon is painted by its own views::View.
- views::WidgetDelegate* delegate = frame_->widget_delegate();
- if (delegate && delegate->ShouldShowWindowTitle()) {
- gfx::Rect title_bounds = GetTitleBounds(title_font);
- SkColor title_color = (frame_->IsMaximized() || frame_->IsFullscreen()) ?
- kMaximizedWindowTitleTextColor : kNonMaximizedWindowTitleTextColor;
- canvas->DrawStringInt(delegate->GetWindowTitle(),
- title_font,
- title_color,
- header_view_->GetMirroredXForRect(title_bounds),
- title_bounds.y(),
- title_bounds.width(),
- title_bounds.height(),
- gfx::Canvas::NO_SUBPIXEL_RENDERING);
- }
-}
-
-void HeaderPainter::LayoutHeader(bool shorter_layout) {
- caption_button_container_->set_header_style(shorter_layout ?
- FrameCaptionButtonContainerView::HEADER_STYLE_SHORT :
- FrameCaptionButtonContainerView::HEADER_STYLE_TALL);
- caption_button_container_->Layout();
-
- gfx::Size caption_button_container_size =
- caption_button_container_->GetPreferredSize();
- caption_button_container_->SetBounds(
- header_view_->width() - caption_button_container_size.width(),
- 0,
- caption_button_container_size.width(),
- caption_button_container_size.height());
-
- if (window_icon_) {
- // Vertically center the window icon with respect to the caption button
- // container.
- int icon_offset_y =
- GetCaptionButtonContainerCenterY() - window_icon_->height() / 2;
- window_icon_->SetBounds(kIconOffsetX, icon_offset_y, kIconSize, kIconSize);
- }
-}
-
-void HeaderPainter::SchedulePaintForTitle(const gfx::Font& title_font) {
- header_view_->SchedulePaintInRect(GetTitleBounds(title_font));
-}
-
-void HeaderPainter::OnThemeChanged() {
- // We do not cache the images for |previous_theme_frame_id_| and
- // |previous_theme_frame_overlay_id_|. Changing the theme changes the images
- // returned from ui::ThemeProvider for |previous_theme_frame_id_|
- // and |previous_theme_frame_overlay_id_|. Reset the image ids to prevent
- // starting a crossfade animation with these images.
- previous_theme_frame_id_ = 0;
- previous_theme_frame_overlay_id_ = 0;
-
- if (crossfade_animation_.get() && crossfade_animation_->is_animating()) {
- crossfade_animation_.reset();
- header_view_->SchedulePaintInRect(GetHeaderLocalBounds());
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// aura::WindowObserver overrides:
-
-void HeaderPainter::OnWindowDestroying(aura::Window* destroying) {
- DCHECK_EQ(window_, destroying);
-
- // Must be removed here and not in the destructor, as the aura::Window is
- // already destroyed when our destructor runs.
- window_->RemoveObserver(this);
-
- window_ = NULL;
-}
-
-void HeaderPainter::OnWindowBoundsChanged(aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) {
- // TODO(sky): this isn't quite right. What we really want is a method that
- // returns bounds ignoring transforms on certain windows (such as workspaces).
- if ((!frame_->IsMaximized() && !frame_->IsFullscreen()) &&
- ((old_bounds.y() == 0 && new_bounds.y() != 0) ||
- (old_bounds.y() != 0 && new_bounds.y() == 0))) {
- SchedulePaintForHeader();
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// gfx::AnimationDelegate overrides:
-
-void HeaderPainter::AnimationProgressed(const gfx::Animation* animation) {
- header_view_->SchedulePaintInRect(GetHeaderLocalBounds());
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// HeaderPainter, private:
-
-gfx::Rect HeaderPainter::GetHeaderLocalBounds() const {
- return gfx::Rect(header_view_->width(), header_height_);
-}
-
-int HeaderPainter::GetTitleOffsetX() const {
- return window_icon_ ?
- window_icon_->bounds().right() + kTitleIconOffsetX :
- kTitleNoIconOffsetX;
-}
-
-int HeaderPainter::GetCaptionButtonContainerCenterY() const {
- return caption_button_container_->y() +
- caption_button_container_->height() / 2;
-}
-
-int HeaderPainter::GetHeaderCornerRadius() const {
- bool square_corners = (frame_->IsMaximized() || frame_->IsFullscreen());
- const int kCornerRadius = 2;
- return square_corners ? 0 : kCornerRadius;
-}
-
-int HeaderPainter::GetHeaderOpacity(
- HeaderMode header_mode,
- int theme_frame_id,
- int theme_frame_overlay_id) const {
- // User-provided themes are painted fully opaque.
- ui::ThemeProvider* theme_provider = frame_->GetThemeProvider();
- if (theme_provider->HasCustomImage(theme_frame_id) ||
- (theme_frame_overlay_id != 0 &&
- theme_provider->HasCustomImage(theme_frame_overlay_id))) {
- return kFullyOpaque;
- }
-
- // Maximized and fullscreen windows are fully opaque.
- if (frame_->IsMaximized() || frame_->IsFullscreen())
- return kFullyOpaque;
-
- // Solo header is very transparent.
- ash::SoloWindowTracker* solo_window_tracker =
- internal::RootWindowController::ForWindow(window_)->solo_window_tracker();
- if (solo_window_tracker &&
- solo_window_tracker->GetWindowWithSoloHeader() == window_) {
- return kSoloWindowOpacity;
- }
-
- // Otherwise, change transparency based on window activation status.
- if (header_mode == ACTIVE)
- return kActiveWindowOpacity;
- return kInactiveWindowOpacity;
-}
-
-void HeaderPainter::SchedulePaintForHeader() {
- int top_left_height = top_left_corner_->height();
- int top_right_height = top_right_corner_->height();
- header_view_->SchedulePaintInRect(
- gfx::Rect(0, 0, header_view_->width(),
- std::max(top_left_height, top_right_height)));
-}
-
-gfx::Rect HeaderPainter::GetTitleBounds(const gfx::Font& title_font) {
- int title_x = GetTitleOffsetX();
- // Center the text with respect to the caption button container. This way it
- // adapts to the caption button height and aligns exactly with the window
- // icon. Don't use |window_icon_| for this computation as it may be NULL.
- int title_y = GetCaptionButtonContainerCenterY() - title_font.GetHeight() / 2;
- return gfx::Rect(
- title_x,
- std::max(0, title_y),
- std::max(0, caption_button_container_->x() - kTitleLogoSpacing - title_x),
- title_font.GetHeight());
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/header_painter.h b/chromium/ash/wm/header_painter.h
deleted file mode 100644
index accc6e370d6..00000000000
--- a/chromium/ash/wm/header_painter.h
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_HEADER_PAINTER_H_
-#define ASH_WM_HEADER_PAINTER_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h" // OVERRIDE
-#include "base/gtest_prod_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/window_observer.h"
-#include "ui/gfx/animation/animation_delegate.h"
-#include "ui/gfx/rect.h"
-
-namespace aura {
-class Window;
-}
-namespace gfx {
-class Canvas;
-class Font;
-class ImageSkia;
-class Point;
-class Size;
-class SlideAnimation;
-}
-namespace views {
-class View;
-class Widget;
-}
-
-namespace ash {
-class FrameCaptionButtonContainerView;
-
-// Helper class for painting the window header.
-class ASH_EXPORT HeaderPainter : public aura::WindowObserver,
- public gfx::AnimationDelegate {
- public:
- // Opacity values for the window header in various states, from 0 to 255.
- static int kActiveWindowOpacity;
- static int kInactiveWindowOpacity;
- static int kSoloWindowOpacity;
-
- enum HeaderMode {
- ACTIVE,
- INACTIVE
- };
-
- HeaderPainter();
- virtual ~HeaderPainter();
-
- // None of the parameters are owned.
- void Init(views::Widget* frame,
- views::View* header_view,
- views::View* window_icon,
- FrameCaptionButtonContainerView* caption_button_container);
-
- // Returns the bounds of the client view for a window with |header_height|
- // and |window_bounds|. The return value and |window_bounds| are in the
- // views::NonClientView's coordinates.
- static gfx::Rect GetBoundsForClientView(int header_height,
- const gfx::Rect& window_bounds);
-
- // Returns the bounds of the window given |header_height| and |client_bounds|.
- // The return value and |client_bounds| are in the views::NonClientView's
- // coordinates.
- static gfx::Rect GetWindowBoundsForClientBounds(
- int header_height,
- const gfx::Rect& client_bounds);
-
- // Determines the window HT* code at |point|. Returns HTNOWHERE if |point| is
- // not within the top |header_height_| of |header_view_|. |point| is in the
- // coordinates of |header_view_|'s widget. The client view must be hittested
- // before calling this method because a browser's tabs are in the top
- // |header_height_| of |header_view_|.
- int NonClientHitTest(const gfx::Point& point) const;
-
- // Returns the header's minimum width.
- int GetMinimumHeaderWidth() const;
-
- // Returns the inset from the right edge.
- int GetRightInset() const;
-
- // Returns the amount that the theme background should be inset.
- int GetThemeBackgroundXInset() const;
-
- // Paints the header.
- // |theme_frame_overlay_id| is 0 if no overlay image should be used.
- void PaintHeader(gfx::Canvas* canvas,
- HeaderMode header_mode,
- int theme_frame_id,
- int theme_frame_overlay_id);
-
- // Paints the header/content separator line. Exists as a separate function
- // because some windows with complex headers (e.g. browsers with tab strips)
- // need to draw their own line.
- void PaintHeaderContentSeparator(gfx::Canvas* canvas);
-
- // Returns size of the header/content separator line in pixels.
- int HeaderContentSeparatorSize() const;
-
- // Paint the title bar, primarily the title string.
- void PaintTitleBar(gfx::Canvas* canvas, const gfx::Font& title_font);
-
- // Performs layout for the header based on whether we want the shorter
- // appearance. |shorter_layout| is typically used for maximized windows, but
- // not always.
- void LayoutHeader(bool shorter_layout);
-
- // Sets the height of the header. The height of the header affects painting,
- // and non client hit tests. It does not affect layout.
- void set_header_height(int header_height) {
- header_height_ = header_height;
- }
-
- // Returns the header height.
- int header_height() const {
- return header_height_;
- }
-
- // Schedule a re-paint of the entire title.
- void SchedulePaintForTitle(const gfx::Font& title_font);
-
- // Called when the browser theme changes.
- void OnThemeChanged();
-
- // aura::WindowObserver overrides:
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
- virtual void OnWindowBoundsChanged(aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
-
- // Overridden from gfx::AnimationDelegate
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
-
- private:
- FRIEND_TEST_ALL_PREFIXES(HeaderPainterTest, GetHeaderOpacity);
- FRIEND_TEST_ALL_PREFIXES(HeaderPainterTest, TitleIconAlignment);
-
- // Returns the header bounds in the coordinates of |header_view_|. The header
- // is assumed to be positioned at the top left corner of |header_view_| and to
- // have the same width as |header_view_|.
- gfx::Rect GetHeaderLocalBounds() const;
-
- // Returns the offset between window left edge and title string.
- int GetTitleOffsetX() const;
-
- // Returns the vertical center of the caption button container in window
- // coordinates.
- int GetCaptionButtonContainerCenterY() const;
-
- // Returns the opacity value used to paint the header.
- // |theme_frame_overlay_id| is 0 if no overlay image is used.
- int GetHeaderOpacity(HeaderMode header_mode,
- int theme_frame_id,
- int theme_frame_overlay_id) const;
-
- // Returns the radius of the header's top corners.
- int GetHeaderCornerRadius() const;
-
- // Schedules a paint for the header. Used when transitioning from no header to
- // a header (or other way around).
- void SchedulePaintForHeader();
-
- // Get the bounds for the title. The provided |title_font| is used to
- // determine the correct dimensions.
- gfx::Rect GetTitleBounds(const gfx::Font& title_font);
-
- // Not owned
- views::Widget* frame_;
- views::View* header_view_;
- views::View* window_icon_; // May be NULL.
- FrameCaptionButtonContainerView* caption_button_container_;
- aura::Window* window_;
-
- // The height of the header.
- int header_height_;
-
- // Window frame header/caption parts.
- const gfx::ImageSkia* top_left_corner_;
- const gfx::ImageSkia* top_edge_;
- const gfx::ImageSkia* top_right_corner_;
- const gfx::ImageSkia* header_left_edge_;
- const gfx::ImageSkia* header_right_edge_;
-
- // Image ids and opacity last used for painting header.
- int previous_theme_frame_id_;
- int previous_theme_frame_overlay_id_;
- int previous_opacity_;
-
- // Image ids and opacity we are crossfading from.
- int crossfade_theme_frame_id_;
- int crossfade_theme_frame_overlay_id_;
- int crossfade_opacity_;
-
- scoped_ptr<gfx::SlideAnimation> crossfade_animation_;
-
- DISALLOW_COPY_AND_ASSIGN(HeaderPainter);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_HEADER_PAINTER_H_
diff --git a/chromium/ash/wm/header_painter_unittest.cc b/chromium/ash/wm/header_painter_unittest.cc
deleted file mode 100644
index 8ce8917a581..00000000000
--- a/chromium/ash/wm/header_painter_unittest.cc
+++ /dev/null
@@ -1,155 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/header_painter.h"
-
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/caption_buttons/frame_caption_button_container_view.h"
-#include "ash/wm/window_state.h"
-#include "base/memory/scoped_ptr.h"
-#include "grit/ash_resources.h"
-#include "ui/gfx/font.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/window/non_client_view.h"
-
-using ash::HeaderPainter;
-using views::NonClientFrameView;
-using views::Widget;
-
-namespace {
-
-// Modifies the values of kInactiveWindowOpacity, kActiveWindowOpacity, and
-// kSoloWindowOpacity for the lifetime of the class. This is useful so that
-// the constants each have different values.
-class ScopedOpacityConstantModifier {
- public:
- ScopedOpacityConstantModifier()
- : initial_active_window_opacity_(
- ash::HeaderPainter::kActiveWindowOpacity),
- initial_inactive_window_opacity_(
- ash::HeaderPainter::kInactiveWindowOpacity),
- initial_solo_window_opacity_(ash::HeaderPainter::kSoloWindowOpacity) {
- ash::HeaderPainter::kActiveWindowOpacity = 100;
- ash::HeaderPainter::kInactiveWindowOpacity = 120;
- ash::HeaderPainter::kSoloWindowOpacity = 140;
- }
- ~ScopedOpacityConstantModifier() {
- ash::HeaderPainter::kActiveWindowOpacity = initial_active_window_opacity_;
- ash::HeaderPainter::kInactiveWindowOpacity =
- initial_inactive_window_opacity_;
- ash::HeaderPainter::kSoloWindowOpacity = initial_solo_window_opacity_;
- }
-
- private:
- int initial_active_window_opacity_;
- int initial_inactive_window_opacity_;
- int initial_solo_window_opacity_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedOpacityConstantModifier);
-};
-
-// Creates a new HeaderPainter with empty buttons. Caller owns the memory.
-HeaderPainter* CreateTestPainter(Widget* widget) {
- HeaderPainter* painter = new HeaderPainter();
- NonClientFrameView* frame_view = widget->non_client_view()->frame_view();
- ash::FrameCaptionButtonContainerView* container =
- new ash::FrameCaptionButtonContainerView(
- widget,
- ash::FrameCaptionButtonContainerView::MINIMIZE_ALLOWED);
- // Add the container to the widget's non-client frame view so that it will be
- // deleted when the widget is destroyed.
- frame_view->AddChildView(container);
- painter->Init(widget, frame_view, NULL, container);
- return painter;
-}
-
-} // namespace
-
-namespace ash {
-
-class HeaderPainterTest : public ash::test::AshTestBase {
- public:
- // Creates a test widget that owns its native widget.
- Widget* CreateTestWidget() {
- Widget* widget = new Widget;
- Widget::InitParams params;
- params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.context = CurrentContext();
- widget->Init(params);
- return widget;
- }
-};
-
-TEST_F(HeaderPainterTest, GetHeaderOpacity) {
- // Create a widget and a painter for it.
- scoped_ptr<Widget> w1(CreateTestWidget());
- scoped_ptr<HeaderPainter> p1(CreateTestPainter(w1.get()));
- w1->Show();
-
- // Modify the values of the opacity constants so that they each have a
- // different value.
- ScopedOpacityConstantModifier opacity_constant_modifier;
-
- // Solo active window has solo window opacity.
- EXPECT_EQ(HeaderPainter::kSoloWindowOpacity,
- p1->GetHeaderOpacity(HeaderPainter::ACTIVE,
- IDR_AURA_WINDOW_HEADER_BASE_ACTIVE,
- 0));
-
- // Create a second widget and painter.
- scoped_ptr<Widget> w2(CreateTestWidget());
- scoped_ptr<HeaderPainter> p2(CreateTestPainter(w2.get()));
- w2->Show();
-
- // Active window has active window opacity.
- EXPECT_EQ(HeaderPainter::kActiveWindowOpacity,
- p2->GetHeaderOpacity(HeaderPainter::ACTIVE,
- IDR_AURA_WINDOW_HEADER_BASE_ACTIVE,
- 0));
-
- // Inactive window has inactive window opacity.
- EXPECT_EQ(HeaderPainter::kInactiveWindowOpacity,
- p2->GetHeaderOpacity(HeaderPainter::INACTIVE,
- IDR_AURA_WINDOW_HEADER_BASE_INACTIVE,
- 0));
-
- // Regular maximized windows are fully opaque.
- wm::GetWindowState(w1->GetNativeWindow())->Maximize();
- EXPECT_EQ(255,
- p1->GetHeaderOpacity(HeaderPainter::ACTIVE,
- IDR_AURA_WINDOW_HEADER_BASE_ACTIVE,
- 0));
-}
-
-// Ensure the title text is vertically aligned with the window icon.
-TEST_F(HeaderPainterTest, TitleIconAlignment) {
- scoped_ptr<Widget> w(CreateTestWidget());
- HeaderPainter p;
- ash::FrameCaptionButtonContainerView container(w.get(),
- ash::FrameCaptionButtonContainerView::MINIMIZE_ALLOWED);
- views::View window_icon;
- window_icon.SetBounds(0, 0, 16, 16);
- p.Init(w.get(),
- w->non_client_view()->frame_view(),
- &window_icon,
- &container);
- w->SetBounds(gfx::Rect(0, 0, 500, 500));
- w->Show();
-
- // Title and icon are aligned when shorter_header is false.
- p.LayoutHeader(false);
- gfx::Font default_font;
- gfx::Rect large_header_title_bounds = p.GetTitleBounds(default_font);
- EXPECT_EQ(window_icon.bounds().CenterPoint().y(),
- large_header_title_bounds.CenterPoint().y());
-
- // Title and icon are aligned when shorter_header is true.
- p.LayoutHeader(true);
- gfx::Rect short_header_title_bounds = p.GetTitleBounds(default_font);
- EXPECT_EQ(window_icon.bounds().CenterPoint().y(),
- short_header_title_bounds.CenterPoint().y());
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/image_cursors.cc b/chromium/ash/wm/image_cursors.cc
deleted file mode 100644
index e63bece7ffd..00000000000
--- a/chromium/ash/wm/image_cursors.cc
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/image_cursors.h"
-
-#include <float.h>
-
-#include "base/logging.h"
-#include "base/strings/string16.h"
-#include "ui/base/cursor/cursor.h"
-#include "ui/base/cursor/cursor_loader.h"
-#include "ui/base/cursor/cursors_aura.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/point.h"
-
-namespace ash {
-
-const int kImageCursorIds[] = {
- ui::kCursorNull,
- ui::kCursorPointer,
- ui::kCursorNoDrop,
- ui::kCursorNotAllowed,
- ui::kCursorCopy,
- ui::kCursorHand,
- ui::kCursorMove,
- ui::kCursorNorthEastResize,
- ui::kCursorSouthWestResize,
- ui::kCursorSouthEastResize,
- ui::kCursorNorthWestResize,
- ui::kCursorNorthResize,
- ui::kCursorSouthResize,
- ui::kCursorEastResize,
- ui::kCursorWestResize,
- ui::kCursorIBeam,
- ui::kCursorAlias,
- ui::kCursorCell,
- ui::kCursorContextMenu,
- ui::kCursorCross,
- ui::kCursorHelp,
- ui::kCursorVerticalText,
- ui::kCursorZoomIn,
- ui::kCursorZoomOut,
- ui::kCursorRowResize,
- ui::kCursorColumnResize,
- ui::kCursorEastWestResize,
- ui::kCursorNorthSouthResize,
- ui::kCursorNorthEastSouthWestResize,
- ui::kCursorNorthWestSouthEastResize,
- ui::kCursorGrab,
- ui::kCursorGrabbing,
-};
-
-const int kAnimatedCursorIds[] = {
- ui::kCursorWait,
- ui::kCursorProgress
-};
-
-ImageCursors::ImageCursors() : scale_(1.f), cursor_set_(ui::CURSOR_SET_NORMAL) {
-}
-
-ImageCursors::~ImageCursors() {
-}
-
-gfx::Display ImageCursors::GetDisplay() const {
- if (!cursor_loader_) {
- NOTREACHED();
- // Returning default on release build as it's not serious enough to crash
- // even if this ever happens.
- return gfx::Display();
- }
- return cursor_loader_->display();
-}
-
-bool ImageCursors::SetDisplay(const gfx::Display& display) {
- float device_scale_factor = display.device_scale_factor();
- if (!cursor_loader_) {
- cursor_loader_.reset(ui::CursorLoader::Create());
- cursor_loader_->set_scale(scale_);
- } else if (cursor_loader_->display().rotation() == display.rotation() &&
- cursor_loader_->display().device_scale_factor() ==
- device_scale_factor) {
- return false;
- }
-
- cursor_loader_->set_display(display);
- ReloadCursors();
- return true;
-}
-
-void ImageCursors::ReloadCursors() {
- const gfx::Display& display = cursor_loader_->display();
- float device_scale_factor = display.device_scale_factor();
-
- cursor_loader_->UnloadAll();
-
- for (size_t i = 0; i < arraysize(kImageCursorIds); ++i) {
- int resource_id = -1;
- gfx::Point hot_point;
- bool success = ui::GetCursorDataFor(cursor_set_,
- kImageCursorIds[i],
- device_scale_factor,
- &resource_id,
- &hot_point);
- DCHECK(success);
- cursor_loader_->LoadImageCursor(kImageCursorIds[i], resource_id, hot_point);
- }
- for (size_t i = 0; i < arraysize(kAnimatedCursorIds); ++i) {
- int resource_id = -1;
- gfx::Point hot_point;
- bool success = ui::GetAnimatedCursorDataFor(cursor_set_,
- kAnimatedCursorIds[i],
- device_scale_factor,
- &resource_id,
- &hot_point);
- DCHECK(success);
- cursor_loader_->LoadAnimatedCursor(kAnimatedCursorIds[i],
- resource_id,
- hot_point,
- ui::kAnimatedCursorFrameDelayMs);
- }
-}
-
-void ImageCursors::SetScale(float scale) {
- if (scale < FLT_EPSILON) {
- NOTREACHED() << "Scale must be bigger than 0.";
- scale = 1.0f;
- }
-
- scale_ = scale;
-
- if (cursor_loader_.get()) {
- cursor_loader_->set_scale(scale);
- ReloadCursors();
- }
-}
-
-void ImageCursors::SetCursorSet(ui::CursorSetType cursor_set) {
- if (cursor_set_ == cursor_set)
- return;
-
- cursor_set_ = cursor_set;
-
- if (cursor_loader_.get())
- ReloadCursors();
-}
-
-void ImageCursors::SetPlatformCursor(gfx::NativeCursor* cursor) {
- cursor_loader_->SetPlatformCursor(cursor);
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/image_cursors.h b/chromium/ash/wm/image_cursors.h
deleted file mode 100644
index 55bc34c0c44..00000000000
--- a/chromium/ash/wm/image_cursors.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_IMAGE_CURSORS_H_
-#define ASH_WM_IMAGE_CURSORS_H_
-
-#include "ash/ash_export.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/strings/string16.h"
-#include "ui/base/cursor/cursor.h"
-#include "ui/gfx/native_widget_types.h"
-
-namespace gfx {
-class Display;
-}
-
-namespace ui {
-class CursorLoader;
-}
-
-namespace ash {
-
-// A utility class that provides cursors for NativeCursors for which we have
-// image resources.
-class ASH_EXPORT ImageCursors {
- public:
- ImageCursors();
- ~ImageCursors();
-
- // Returns the display the cursors are loaded for. The display must
- // be set by SetDisplay before using this.
- gfx::Display GetDisplay() const;
-
- // Sets the display the cursors are loaded for. The device scale factor
- // determines the size of the image to load, and the rotation of the display
- // determines if the image and its host point has to be retated.
- // Returns true if the cursor image is reloaded.
- bool SetDisplay(const gfx::Display& display);
-
- // Sets the scale of the mouse cursor icon.
- void SetScale(float scale);
-
- // Sets the type of the mouse cursor icon.
- void SetCursorSet(ui::CursorSetType cursor_set);
-
- // Sets the platform cursor based on the native type of |cursor|.
- void SetPlatformCursor(gfx::NativeCursor* cursor);
-
- private:
- // Reloads the all loaded cursors in the cursor loader.
- void ReloadCursors();
-
- scoped_ptr<ui::CursorLoader> cursor_loader_;
- float scale_;
- ui::CursorSetType cursor_set_;
-
- DISALLOW_COPY_AND_ASSIGN(ImageCursors);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_IMAGE_CURSORS_H_
diff --git a/chromium/ash/wm/immersive_fullscreen_controller.cc b/chromium/ash/wm/immersive_fullscreen_controller.cc
deleted file mode 100644
index 701096edfd0..00000000000
--- a/chromium/ash/wm/immersive_fullscreen_controller.cc
+++ /dev/null
@@ -1,931 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/immersive_fullscreen_controller.h"
-
-#include <set>
-
-#include "ash/shell.h"
-#include "ash/wm/window_state.h"
-#include "base/metrics/histogram.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/client/capture_client.h"
-#include "ui/aura/client/cursor_client.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/animation/slide_animation.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/point.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/bubble/bubble_delegate.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-using views::View;
-
-namespace ash {
-
-namespace {
-
-// Duration for the reveal show/hide slide animation. The slower duration is
-// used for the initial slide out to give the user more change to see what
-// happened.
-const int kRevealSlowAnimationDurationMs = 400;
-const int kRevealFastAnimationDurationMs = 200;
-
-// The delay in milliseconds between the mouse stopping at the top edge of the
-// screen and the top-of-window views revealing.
-const int kMouseRevealDelayMs = 200;
-
-// The maximum amount of pixels that the cursor can move for the cursor to be
-// considered "stopped". This allows the user to reveal the top-of-window views
-// without holding the cursor completely still.
-const int kMouseRevealXThresholdPixels = 3;
-
-// How many pixels a gesture can start away from |top_container_| when in
-// closed state and still be considered near it. This is needed to overcome
-// issues with poor location values near the edge of the display.
-const int kNearTopContainerDistance = 8;
-
-// Used to multiply x value of an update in check to determine if gesture is
-// vertical. This is used to make sure that gesture is close to vertical instead
-// of just more vertical then horizontal.
-const int kSwipeVerticalThresholdMultiplier = 3;
-
-// The height in pixels of the region above the top edge of the display which
-// hosts the immersive fullscreen window in which mouse events are ignored
-// (cannot reveal or unreveal the top-of-window views).
-// See ShouldIgnoreMouseEventAtLocation() for more details.
-const int kHeightOfDeadRegionAboveTopContainer = 10;
-
-// The height in pixels of the region below the top edge of the display in which
-// the mouse can trigger revealing the top-of-window views. The height must be
-// greater than 1px because the top pixel is used to trigger moving the cursor
-// between displays if the user has a vertical display layout (primary display
-// above/below secondary display).
-const int kMouseRevealBoundsHeight = 3;
-
-// Returns the BubbleDelegateView corresponding to |maybe_bubble| if
-// |maybe_bubble| is a bubble.
-views::BubbleDelegateView* AsBubbleDelegate(aura::Window* maybe_bubble) {
- if (!maybe_bubble)
- return NULL;
- views::Widget* widget = views::Widget::GetWidgetForNativeView(maybe_bubble);
- if (!widget)
- return NULL;
- return widget->widget_delegate()->AsBubbleDelegate();
-}
-
-// Returns true if |maybe_transient| is a transient child of |toplevel|.
-bool IsWindowTransientChildOf(aura::Window* maybe_transient,
- aura::Window* toplevel) {
- if (!maybe_transient || !toplevel)
- return false;
-
- for (aura::Window* window = maybe_transient; window;
- window = window->transient_parent()) {
- if (window == toplevel)
- return true;
- }
- return false;
-}
-
-// Returns the location of |event| in screen coordinates.
-gfx::Point GetEventLocationInScreen(const ui::LocatedEvent& event) {
- gfx::Point location_in_screen = event.location();
- aura::Window* target = static_cast<aura::Window*>(event.target());
- aura::client::ScreenPositionClient* screen_position_client =
- aura::client::GetScreenPositionClient(target->GetRootWindow());
- screen_position_client->ConvertPointToScreen(target, &location_in_screen);
- return location_in_screen;
-}
-
-// Returns the bounds of the display nearest to |window| in screen coordinates.
-gfx::Rect GetDisplayBoundsInScreen(aura::Window* window) {
- return Shell::GetScreen()->GetDisplayNearestWindow(window).bounds();
-}
-
-} // namespace
-
-////////////////////////////////////////////////////////////////////////////////
-
-// Class which keeps the top-of-window views revealed as long as one of the
-// bubbles it is observing is visible. The logic to keep the top-of-window
-// views revealed based on the visibility of bubbles anchored to
-// children of |ImmersiveFullscreenController::top_container_| is separate from
-// the logic related to |ImmersiveFullscreenController::focus_revealed_lock_|
-// so that bubbles which are not activatable and bubbles which do not close
-// upon deactivation also keep the top-of-window views revealed for the
-// duration of their visibility.
-class ImmersiveFullscreenController::BubbleManager
- : public aura::WindowObserver {
- public:
- explicit BubbleManager(ImmersiveFullscreenController* controller);
- virtual ~BubbleManager();
-
- // Start / stop observing changes to |bubble|'s visibility.
- void StartObserving(aura::Window* bubble);
- void StopObserving(aura::Window* bubble);
-
- private:
- // Updates |revealed_lock_| based on whether any of |bubbles_| is visible.
- void UpdateRevealedLock();
-
- // aura::WindowObserver overrides:
- virtual void OnWindowVisibilityChanged(aura::Window* window,
- bool visible) OVERRIDE;
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
-
- ImmersiveFullscreenController* controller_;
-
- std::set<aura::Window*> bubbles_;
-
- // Lock which keeps the top-of-window views revealed based on whether any of
- // |bubbles_| is visible.
- scoped_ptr<ImmersiveRevealedLock> revealed_lock_;
-
- DISALLOW_COPY_AND_ASSIGN(BubbleManager);
-};
-
-ImmersiveFullscreenController::BubbleManager::BubbleManager(
- ImmersiveFullscreenController* controller)
- : controller_(controller) {
-}
-
-ImmersiveFullscreenController::BubbleManager::~BubbleManager() {
- for (std::set<aura::Window*>::const_iterator it = bubbles_.begin();
- it != bubbles_.end(); ++it) {
- (*it)->RemoveObserver(this);
- }
-}
-
-void ImmersiveFullscreenController::BubbleManager::StartObserving(
- aura::Window* bubble) {
- if (bubbles_.insert(bubble).second) {
- bubble->AddObserver(this);
- UpdateRevealedLock();
- }
-}
-
-void ImmersiveFullscreenController::BubbleManager::StopObserving(
- aura::Window* bubble) {
- if (bubbles_.erase(bubble)) {
- bubble->RemoveObserver(this);
- UpdateRevealedLock();
- }
-}
-
-void ImmersiveFullscreenController::BubbleManager::UpdateRevealedLock() {
- bool has_visible_bubble = false;
- for (std::set<aura::Window*>::const_iterator it = bubbles_.begin();
- it != bubbles_.end(); ++it) {
- if ((*it)->IsVisible()) {
- has_visible_bubble = true;
- break;
- }
- }
-
- bool was_revealed = controller_->IsRevealed();
- if (has_visible_bubble) {
- if (!revealed_lock_.get()) {
- // Reveal the top-of-window views without animating because it looks
- // weird for the top-of-window views to animate and the bubble not to
- // animate along with the top-of-window views.
- revealed_lock_.reset(controller_->GetRevealedLock(
- ImmersiveFullscreenController::ANIMATE_REVEAL_NO));
- }
- } else {
- revealed_lock_.reset();
- }
-
- if (!was_revealed && revealed_lock_.get()) {
- // Currently, there is no nice way for bubbles to reposition themselves
- // whenever the anchor view moves. Tell the bubbles to reposition themselves
- // explicitly instead. The hidden bubbles are also repositioned because
- // BubbleDelegateView does not reposition its widget as a result of a
- // visibility change.
- for (std::set<aura::Window*>::const_iterator it = bubbles_.begin();
- it != bubbles_.end(); ++it) {
- AsBubbleDelegate(*it)->OnAnchorBoundsChanged();
- }
- }
-}
-
-void ImmersiveFullscreenController::BubbleManager::OnWindowVisibilityChanged(
- aura::Window*,
- bool visible) {
- UpdateRevealedLock();
-}
-
-void ImmersiveFullscreenController::BubbleManager::OnWindowDestroying(
- aura::Window* window) {
- StopObserving(window);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-ImmersiveFullscreenController::ImmersiveFullscreenController()
- : delegate_(NULL),
- top_container_(NULL),
- widget_(NULL),
- native_window_(NULL),
- observers_enabled_(false),
- enabled_(false),
- reveal_state_(CLOSED),
- revealed_lock_count_(0),
- mouse_x_when_hit_top_in_screen_(-1),
- gesture_begun_(false),
- animation_(new gfx::SlideAnimation(this)),
- animations_disabled_for_test_(false),
- weak_ptr_factory_(this) {
-}
-
-ImmersiveFullscreenController::~ImmersiveFullscreenController() {
- EnableWindowObservers(false);
-}
-
-void ImmersiveFullscreenController::Init(Delegate* delegate,
- views::Widget* widget,
- views::View* top_container) {
- delegate_ = delegate;
- top_container_ = top_container;
- widget_ = widget;
- native_window_ = widget_->GetNativeWindow();
-}
-
-void ImmersiveFullscreenController::SetEnabled(WindowType window_type,
- bool enabled) {
- if (enabled_ == enabled)
- return;
- enabled_ = enabled;
-
- EnableWindowObservers(enabled_);
-
- // Auto hide the shelf in immersive fullscreen instead of hiding it.
- wm::GetWindowState(native_window_)->set_hide_shelf_when_fullscreen(!enabled);
- Shell::GetInstance()->UpdateShelfVisibility();
-
- if (enabled_) {
- // Animate enabling immersive mode by sliding out the top-of-window views.
- // No animation occurs if a lock is holding the top-of-window views open.
-
- // Do a reveal to set the initial state for the animation. (And any
- // required state in case the animation cannot run because of a lock holding
- // the top-of-window views open.)
- MaybeStartReveal(ANIMATE_NO);
-
- // Reset the located event and the focus revealed locks so that they do not
- // affect whether the top-of-window views are hidden.
- located_event_revealed_lock_.reset();
- focus_revealed_lock_.reset();
-
- // Try doing the animation.
- MaybeEndReveal(ANIMATE_SLOW);
-
- if (reveal_state_ == REVEALED) {
- // Reveal was unsuccessful. Reacquire the revealed locks if appropriate.
- UpdateLocatedEventRevealedLock(NULL);
- UpdateFocusRevealedLock();
- } else {
- // Clearing focus is important because it closes focus-related popups like
- // the touch selection handles.
- widget_->GetFocusManager()->ClearFocus();
- }
- } else {
- // Stop cursor-at-top tracking.
- top_edge_hover_timer_.Stop();
- reveal_state_ = CLOSED;
-
- delegate_->OnImmersiveFullscreenExited();
- }
-
- if (enabled_) {
- UMA_HISTOGRAM_ENUMERATION("Ash.ImmersiveFullscreen.WindowType",
- window_type,
- WINDOW_TYPE_COUNT);
- }
-}
-
-bool ImmersiveFullscreenController::IsEnabled() const {
- return enabled_;
-}
-
-bool ImmersiveFullscreenController::IsRevealed() const {
- return enabled_ && reveal_state_ != CLOSED;
-}
-
-ImmersiveRevealedLock* ImmersiveFullscreenController::GetRevealedLock(
- AnimateReveal animate_reveal) {
- return new ImmersiveRevealedLock(weak_ptr_factory_.GetWeakPtr(),
- animate_reveal);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Testing interface:
-
-void ImmersiveFullscreenController::SetupForTest() {
- DCHECK(!enabled_);
- animations_disabled_for_test_ = true;
-
- // Move the mouse off of the top-of-window views so that it does not keep the
- // top-of-window views revealed.
- std::vector<gfx::Rect> bounds_in_screen(
- delegate_->GetVisibleBoundsInScreen());
- DCHECK(!bounds_in_screen.empty());
- int bottommost_in_screen = bounds_in_screen[0].bottom();
- for (size_t i = 1; i < bounds_in_screen.size(); ++i) {
- if (bounds_in_screen[i].bottom() > bottommost_in_screen)
- bottommost_in_screen = bounds_in_screen[i].bottom();
- }
- gfx::Point cursor_pos(0, bottommost_in_screen + 100);
- aura::Env::GetInstance()->set_last_mouse_location(cursor_pos);
- UpdateLocatedEventRevealedLock(NULL);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// ui::EventHandler overrides:
-
-void ImmersiveFullscreenController::OnMouseEvent(ui::MouseEvent* event) {
- if (!enabled_)
- return;
-
- if (event->type() != ui::ET_MOUSE_MOVED &&
- event->type() != ui::ET_MOUSE_PRESSED &&
- event->type() != ui::ET_MOUSE_RELEASED &&
- event->type() != ui::ET_MOUSE_CAPTURE_CHANGED) {
- return;
- }
-
- // Mouse hover can initiate revealing the top-of-window views while |widget_|
- // is inactive.
-
- if (reveal_state_ == SLIDING_OPEN || reveal_state_ == REVEALED) {
- top_edge_hover_timer_.Stop();
- UpdateLocatedEventRevealedLock(event);
- } else if (event->type() != ui::ET_MOUSE_CAPTURE_CHANGED) {
- // Trigger a reveal if the cursor pauses at the top of the screen for a
- // while.
- UpdateTopEdgeHoverTimer(event);
- }
-}
-
-void ImmersiveFullscreenController::OnTouchEvent(ui::TouchEvent* event) {
- if (!enabled_ || event->type() != ui::ET_TOUCH_PRESSED)
- return;
-
- // Touch should not initiate revealing the top-of-window views while |widget_|
- // is inactive.
- if (!widget_->IsActive())
- return;
-
- UpdateLocatedEventRevealedLock(event);
-}
-
-void ImmersiveFullscreenController::OnGestureEvent(ui::GestureEvent* event) {
- if (!enabled_)
- return;
-
- // Touch gestures should not initiate revealing the top-of-window views while
- // |widget_| is inactive.
- if (!widget_->IsActive())
- return;
-
- switch (event->type()) {
- case ui::ET_GESTURE_SCROLL_BEGIN:
- if (ShouldHandleGestureEvent(GetEventLocationInScreen(*event))) {
- gesture_begun_ = true;
- // Do not consume the event. Otherwise, we end up consuming all
- // ui::ET_GESTURE_SCROLL_BEGIN events in the top-of-window views
- // when the top-of-window views are revealed.
- }
- break;
- case ui::ET_GESTURE_SCROLL_UPDATE:
- if (gesture_begun_) {
- if (UpdateRevealedLocksForSwipe(GetSwipeType(event)))
- event->SetHandled();
- gesture_begun_ = false;
- }
- break;
- case ui::ET_GESTURE_SCROLL_END:
- case ui::ET_SCROLL_FLING_START:
- gesture_begun_ = false;
- break;
- default:
- break;
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// views::FocusChangeListener overrides:
-
-void ImmersiveFullscreenController::OnWillChangeFocus(
- views::View* focused_before,
- views::View* focused_now) {
-}
-
-void ImmersiveFullscreenController::OnDidChangeFocus(
- views::View* focused_before,
- views::View* focused_now) {
- UpdateFocusRevealedLock();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// views::WidgetObserver overrides:
-
-void ImmersiveFullscreenController::OnWidgetDestroying(views::Widget* widget) {
- EnableWindowObservers(false);
- native_window_ = NULL;
-
- // Set |enabled_| to false such that any calls to MaybeStartReveal() and
- // MaybeEndReveal() have no effect.
- enabled_ = false;
-}
-
-void ImmersiveFullscreenController::OnWidgetActivationChanged(
- views::Widget* widget,
- bool active) {
- UpdateFocusRevealedLock();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// gfx::AnimationDelegate overrides:
-
-void ImmersiveFullscreenController::AnimationEnded(
- const gfx::Animation* animation) {
- if (reveal_state_ == SLIDING_OPEN) {
- OnSlideOpenAnimationCompleted();
- } else if (reveal_state_ == SLIDING_CLOSED) {
- OnSlideClosedAnimationCompleted();
- }
-}
-
-void ImmersiveFullscreenController::AnimationProgressed(
- const gfx::Animation* animation) {
- delegate_->SetVisibleFraction(animation->GetCurrentValue());
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// aura::WindowObserver overrides:
-
-void ImmersiveFullscreenController::OnAddTransientChild(aura::Window* window,
- aura::Window* transient) {
- views::BubbleDelegateView* bubble_delegate = AsBubbleDelegate(transient);
- if (bubble_delegate &&
- bubble_delegate->GetAnchorView() &&
- top_container_->Contains(bubble_delegate->GetAnchorView())) {
- // Observe the aura::Window because the BubbleDelegateView may not be
- // parented to the widget's root view yet so |bubble_delegate->GetWidget()|
- // may still return NULL.
- bubble_manager_->StartObserving(transient);
- }
-}
-
-void ImmersiveFullscreenController::OnRemoveTransientChild(
- aura::Window* window,
- aura::Window* transient) {
- bubble_manager_->StopObserving(transient);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// ash::ImmersiveRevealedLock::Delegate overrides:
-
-void ImmersiveFullscreenController::LockRevealedState(
- AnimateReveal animate_reveal) {
- ++revealed_lock_count_;
- Animate animate = (animate_reveal == ANIMATE_REVEAL_YES) ?
- ANIMATE_FAST : ANIMATE_NO;
- MaybeStartReveal(animate);
-}
-
-void ImmersiveFullscreenController::UnlockRevealedState() {
- --revealed_lock_count_;
- DCHECK_GE(revealed_lock_count_, 0);
- if (revealed_lock_count_ == 0) {
- // Always animate ending the reveal fast.
- MaybeEndReveal(ANIMATE_FAST);
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// private:
-
-void ImmersiveFullscreenController::EnableWindowObservers(bool enable) {
- if (observers_enabled_ == enable)
- return;
- observers_enabled_ = enable;
-
- views::FocusManager* focus_manager = widget_->GetFocusManager();
-
- if (enable) {
- widget_->AddObserver(this);
- focus_manager->AddFocusChangeListener(this);
- Shell::GetInstance()->AddPreTargetHandler(this);
- native_window_->AddObserver(this);
-
- RecreateBubbleManager();
- } else {
- widget_->RemoveObserver(this);
- focus_manager->RemoveFocusChangeListener(this);
- Shell::GetInstance()->RemovePreTargetHandler(this);
- native_window_->RemoveObserver(this);
-
- // We have stopped observing whether transient children are added or removed
- // to |native_window_|. The set of bubbles that BubbleManager is observing
- // will become stale really quickly. Destroy BubbleManager and recreate it
- // when we start observing |native_window_| again.
- bubble_manager_.reset();
-
- animation_->Stop();
- }
-}
-
-void ImmersiveFullscreenController::UpdateTopEdgeHoverTimer(
- ui::MouseEvent* event) {
- DCHECK(enabled_);
- DCHECK(reveal_state_ == SLIDING_CLOSED || reveal_state_ == CLOSED);
-
- // Check whether |native_window_| is the event target's parent window instead
- // of checking for activation. This allows the timer to be started when
- // |widget_| is inactive but prevents starting the timer if the mouse is over
- // a portion of the top edge obscured by an unrelated widget.
- if (!top_edge_hover_timer_.IsRunning() &&
- !native_window_->Contains(static_cast<aura::Window*>(event->target()))) {
- return;
- }
-
- // Mouse hover should not initiate revealing the top-of-window views while a
- // window has mouse capture.
- if (aura::client::GetCaptureWindow(native_window_))
- return;
-
- gfx::Point location_in_screen = GetEventLocationInScreen(*event);
- if (ShouldIgnoreMouseEventAtLocation(location_in_screen))
- return;
-
- // Stop the timer if the cursor left the top edge or is on a different
- // display.
- gfx::Rect hit_bounds_in_screen = GetDisplayBoundsInScreen(native_window_);
- hit_bounds_in_screen.set_height(kMouseRevealBoundsHeight);
- if (!hit_bounds_in_screen.Contains(location_in_screen)) {
- top_edge_hover_timer_.Stop();
- return;
- }
-
- // The cursor is now at the top of the screen. Consider the cursor "not
- // moving" even if it moves a little bit because users don't have perfect
- // pointing precision. (The y position is not tested because
- // |hit_bounds_in_screen| is short.)
- if (top_edge_hover_timer_.IsRunning() &&
- abs(location_in_screen.x() - mouse_x_when_hit_top_in_screen_) <=
- kMouseRevealXThresholdPixels)
- return;
-
- // Start the reveal if the cursor doesn't move for some amount of time.
- mouse_x_when_hit_top_in_screen_ = location_in_screen.x();
- top_edge_hover_timer_.Stop();
- // Timer is stopped when |this| is destroyed, hence Unretained() is safe.
- top_edge_hover_timer_.Start(
- FROM_HERE,
- base::TimeDelta::FromMilliseconds(kMouseRevealDelayMs),
- base::Bind(
- &ImmersiveFullscreenController::AcquireLocatedEventRevealedLock,
- base::Unretained(this)));
-}
-
-void ImmersiveFullscreenController::UpdateLocatedEventRevealedLock(
- ui::LocatedEvent* event) {
- if (!enabled_)
- return;
- DCHECK(!event || event->IsMouseEvent() || event->IsTouchEvent());
-
- // Neither the mouse nor touch can initiate a reveal when the top-of-window
- // views are sliding closed or are closed with the following exceptions:
- // - Hovering at y = 0 which is handled in OnMouseEvent().
- // - Doing a SWIPE_OPEN edge gesture which is handled in OnGestureEvent().
- if (reveal_state_ == CLOSED || reveal_state_ == SLIDING_CLOSED)
- return;
-
- // For the sake of simplicity, ignore |widget_|'s activation in computing
- // whether the top-of-window views should stay revealed. Ideally, the
- // top-of-window views would stay revealed only when the mouse cursor is
- // hovered above a non-obscured portion of the top-of-window views. The
- // top-of-window views may be partially obscured when |widget_| is inactive.
-
- // Ignore all events while a window has capture. This keeps the top-of-window
- // views revealed during a drag.
- if (aura::client::GetCaptureWindow(native_window_))
- return;
-
- gfx::Point location_in_screen;
- if (event && event->type() != ui::ET_MOUSE_CAPTURE_CHANGED) {
- location_in_screen = GetEventLocationInScreen(*event);
- } else {
- aura::client::CursorClient* cursor_client = aura::client::GetCursorClient(
- native_window_->GetRootWindow());
- if (!cursor_client->IsMouseEventsEnabled()) {
- // If mouse events are disabled, the user's last interaction was probably
- // via touch. Do no do further processing in this case as there is no easy
- // way of retrieving the position of the user's last touch.
- return;
- }
- location_in_screen = aura::Env::GetInstance()->last_mouse_location();
- }
-
- if ((!event || event->IsMouseEvent()) &&
- ShouldIgnoreMouseEventAtLocation(location_in_screen)) {
- return;
- }
-
- // The visible bounds of |top_container_| should be contained in
- // |hit_bounds_in_screen|.
- std::vector<gfx::Rect> hit_bounds_in_screen =
- delegate_->GetVisibleBoundsInScreen();
- bool keep_revealed = false;
- for (size_t i = 0; i < hit_bounds_in_screen.size(); ++i) {
- // Allow the cursor to move slightly off the top-of-window views before
- // sliding closed. In the case of ImmersiveModeControllerAsh, this helps
- // when the user is attempting to click on the bookmark bar and overshoots
- // slightly.
- if (event && event->type() == ui::ET_MOUSE_MOVED) {
- const int kBoundsOffsetY = 8;
- hit_bounds_in_screen[i].Inset(0, 0, 0, -kBoundsOffsetY);
- }
-
- if (hit_bounds_in_screen[i].Contains(location_in_screen)) {
- keep_revealed = true;
- break;
- }
- }
-
- if (keep_revealed)
- AcquireLocatedEventRevealedLock();
- else
- located_event_revealed_lock_.reset();
-}
-
-void ImmersiveFullscreenController::AcquireLocatedEventRevealedLock() {
- // CAUTION: Acquiring the lock results in a reentrant call to
- // AcquireLocatedEventRevealedLock() when
- // |ImmersiveFullscreenController::animations_disabled_for_test_| is true.
- if (!located_event_revealed_lock_.get())
- located_event_revealed_lock_.reset(GetRevealedLock(ANIMATE_REVEAL_YES));
-}
-
-void ImmersiveFullscreenController::UpdateFocusRevealedLock() {
- if (!enabled_)
- return;
-
- bool hold_lock = false;
- if (widget_->IsActive()) {
- views::View* focused_view = widget_->GetFocusManager()->GetFocusedView();
- if (top_container_->Contains(focused_view))
- hold_lock = true;
- } else {
- aura::Window* active_window = aura::client::GetActivationClient(
- native_window_->GetRootWindow())->GetActiveWindow();
- views::BubbleDelegateView* bubble_delegate =
- AsBubbleDelegate(active_window);
- if (bubble_delegate && bubble_delegate->anchor_widget()) {
- // BubbleManager will already have locked the top-of-window views if the
- // bubble is anchored to a child of |top_container_|. Don't acquire
- // |focus_revealed_lock_| here for the sake of simplicity.
- // Note: Instead of checking for the existence of the |anchor_view|,
- // the existence of the |anchor_widget| is performed to avoid the case
- // where the view is already gone (and the widget is still running).
- } else {
- // The currently active window is not |native_window_| and it is not a
- // bubble with an anchor view. The top-of-window views should be revealed
- // if:
- // 1) The active window is a transient child of |native_window_|.
- // 2) The top-of-window views are already revealed. This restriction
- // prevents a transient window opened by the web contents while the
- // top-of-window views are hidden from from initiating a reveal.
- // The top-of-window views will stay revealed till |native_window_| is
- // reactivated.
- if (IsRevealed() &&
- IsWindowTransientChildOf(active_window, native_window_)) {
- hold_lock = true;
- }
- }
- }
-
- if (hold_lock) {
- if (!focus_revealed_lock_.get())
- focus_revealed_lock_.reset(GetRevealedLock(ANIMATE_REVEAL_YES));
- } else {
- focus_revealed_lock_.reset();
- }
-}
-
-bool ImmersiveFullscreenController::UpdateRevealedLocksForSwipe(
- SwipeType swipe_type) {
- if (!enabled_ || swipe_type == SWIPE_NONE)
- return false;
-
- // Swipes while |native_window_| is inactive should have been filtered out in
- // OnGestureEvent().
- DCHECK(widget_->IsActive());
-
- if (reveal_state_ == SLIDING_CLOSED || reveal_state_ == CLOSED) {
- if (swipe_type == SWIPE_OPEN && !located_event_revealed_lock_.get()) {
- located_event_revealed_lock_.reset(GetRevealedLock(ANIMATE_REVEAL_YES));
- return true;
- }
- } else {
- if (swipe_type == SWIPE_CLOSE) {
- // Attempt to end the reveal. If other code is holding onto a lock, the
- // attempt will be unsuccessful.
- located_event_revealed_lock_.reset();
- focus_revealed_lock_.reset();
-
- if (reveal_state_ == SLIDING_CLOSED || reveal_state_ == CLOSED) {
- widget_->GetFocusManager()->ClearFocus();
- return true;
- }
-
- // Ending the reveal was unsuccessful. Reaquire the locks if appropriate.
- UpdateLocatedEventRevealedLock(NULL);
- UpdateFocusRevealedLock();
- }
- }
- return false;
-}
-
-int ImmersiveFullscreenController::GetAnimationDuration(Animate animate) const {
- switch (animate) {
- case ANIMATE_NO:
- return 0;
- case ANIMATE_SLOW:
- return kRevealSlowAnimationDurationMs;
- case ANIMATE_FAST:
- return kRevealFastAnimationDurationMs;
- }
- NOTREACHED();
- return 0;
-}
-
-void ImmersiveFullscreenController::MaybeStartReveal(Animate animate) {
- if (!enabled_)
- return;
-
- if (animations_disabled_for_test_)
- animate = ANIMATE_NO;
-
- // Callers with ANIMATE_NO expect this function to synchronously reveal the
- // top-of-window views.
- if (reveal_state_ == REVEALED ||
- (reveal_state_ == SLIDING_OPEN && animate != ANIMATE_NO)) {
- return;
- }
-
- RevealState previous_reveal_state = reveal_state_;
- reveal_state_ = SLIDING_OPEN;
- if (previous_reveal_state == CLOSED) {
- delegate_->OnImmersiveRevealStarted();
-
- // Do not do any more processing if OnImmersiveRevealStarted() changed
- // |reveal_state_|.
- if (reveal_state_ != SLIDING_OPEN)
- return;
- }
- // Slide in the reveal view.
- if (animate == ANIMATE_NO) {
- animation_->Reset(1);
- OnSlideOpenAnimationCompleted();
- } else {
- animation_->SetSlideDuration(GetAnimationDuration(animate));
- animation_->Show();
- }
-}
-
-void ImmersiveFullscreenController::OnSlideOpenAnimationCompleted() {
- DCHECK_EQ(SLIDING_OPEN, reveal_state_);
- reveal_state_ = REVEALED;
- delegate_->SetVisibleFraction(1);
-
- // The user may not have moved the mouse since the reveal was initiated.
- // Update the revealed lock to reflect the mouse's current state.
- UpdateLocatedEventRevealedLock(NULL);
-}
-
-void ImmersiveFullscreenController::MaybeEndReveal(Animate animate) {
- if (!enabled_ || revealed_lock_count_ != 0)
- return;
-
- if (animations_disabled_for_test_)
- animate = ANIMATE_NO;
-
- // Callers with ANIMATE_NO expect this function to synchronously close the
- // top-of-window views.
- if (reveal_state_ == CLOSED ||
- (reveal_state_ == SLIDING_CLOSED && animate != ANIMATE_NO)) {
- return;
- }
-
- reveal_state_ = SLIDING_CLOSED;
- int duration_ms = GetAnimationDuration(animate);
- if (duration_ms > 0) {
- animation_->SetSlideDuration(duration_ms);
- animation_->Hide();
- } else {
- animation_->Reset(0);
- OnSlideClosedAnimationCompleted();
- }
-}
-
-void ImmersiveFullscreenController::OnSlideClosedAnimationCompleted() {
- DCHECK_EQ(SLIDING_CLOSED, reveal_state_);
- reveal_state_ = CLOSED;
- delegate_->OnImmersiveRevealEnded();
-}
-
-ImmersiveFullscreenController::SwipeType
-ImmersiveFullscreenController::GetSwipeType(ui::GestureEvent* event) const {
- if (event->type() != ui::ET_GESTURE_SCROLL_UPDATE)
- return SWIPE_NONE;
- // Make sure that it is a clear vertical gesture.
- if (abs(event->details().scroll_y()) <=
- kSwipeVerticalThresholdMultiplier * abs(event->details().scroll_x()))
- return SWIPE_NONE;
- if (event->details().scroll_y() < 0)
- return SWIPE_CLOSE;
- else if (event->details().scroll_y() > 0)
- return SWIPE_OPEN;
- return SWIPE_NONE;
-}
-
-bool ImmersiveFullscreenController::ShouldIgnoreMouseEventAtLocation(
- const gfx::Point& location) const {
- // Ignore mouse events in the region immediately above the top edge of the
- // display. This is to handle the case of a user with a vertical display
- // layout (primary display above/below secondary display) and the immersive
- // fullscreen window on the bottom display. It is really hard to trigger a
- // reveal in this case because:
- // - It is hard to stop the cursor in the top |kMouseRevealBoundsHeight|
- // pixels of the bottom display.
- // - The cursor is warped to the top display if the cursor gets to the top
- // edge of the bottom display.
- // Mouse events are ignored in the bottom few pixels of the top display
- // (Mouse events in this region cannot start or end a reveal). This allows a
- // user to overshoot the top of the bottom display and still reveal the
- // top-of-window views.
- gfx::Rect dead_region = GetDisplayBoundsInScreen(native_window_);
- dead_region.set_y(dead_region.y() - kHeightOfDeadRegionAboveTopContainer);
- dead_region.set_height(kHeightOfDeadRegionAboveTopContainer);
- return dead_region.Contains(location);
-}
-
-bool ImmersiveFullscreenController::ShouldHandleGestureEvent(
- const gfx::Point& location) const {
- DCHECK(widget_->IsActive());
- if (reveal_state_ == REVEALED) {
- std::vector<gfx::Rect> hit_bounds_in_screen(
- delegate_->GetVisibleBoundsInScreen());
- for (size_t i = 0; i < hit_bounds_in_screen.size(); ++i) {
- if (hit_bounds_in_screen[i].Contains(location))
- return true;
- }
- return false;
- }
-
- // When the top-of-window views are not fully revealed, handle gestures which
- // start in the top few pixels of the screen.
- gfx::Rect hit_bounds_in_screen(GetDisplayBoundsInScreen(native_window_));
- hit_bounds_in_screen.set_height(kNearTopContainerDistance);
- if (hit_bounds_in_screen.Contains(location))
- return true;
-
- // There may be a bezel sensor off screen logically above
- // |hit_bounds_in_screen|. The check for the event not contained by the
- // closest screen ensures that the event is from a valid bezel (as opposed to
- // another screen in an extended desktop).
- gfx::Rect screen_bounds =
- Shell::GetScreen()->GetDisplayNearestPoint(location).bounds();
- return (!screen_bounds.Contains(location) &&
- location.y() < hit_bounds_in_screen.y() &&
- location.x() >= hit_bounds_in_screen.x() &&
- location.x() < hit_bounds_in_screen.right());
-}
-
-void ImmersiveFullscreenController::RecreateBubbleManager() {
- bubble_manager_.reset(new BubbleManager(this));
- const std::vector<aura::Window*> transient_children =
- native_window_->transient_children();
- for (size_t i = 0; i < transient_children.size(); ++i) {
- aura::Window* transient_child = transient_children[i];
- views::BubbleDelegateView* bubble_delegate =
- AsBubbleDelegate(transient_child);
- if (bubble_delegate &&
- bubble_delegate->GetAnchorView() &&
- top_container_->Contains(bubble_delegate->GetAnchorView())) {
- bubble_manager_->StartObserving(transient_child);
- }
- }
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/immersive_fullscreen_controller.h b/chromium/ash/wm/immersive_fullscreen_controller.h
deleted file mode 100644
index 9b6b600b168..00000000000
--- a/chromium/ash/wm/immersive_fullscreen_controller.h
+++ /dev/null
@@ -1,298 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_
-#define ASH_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_
-
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "ash/wm/immersive_revealed_lock.h"
-#include "base/timer/timer.h"
-#include "ui/aura/window_observer.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/animation/animation_delegate.h"
-#include "ui/views/focus/focus_manager.h"
-#include "ui/views/widget/widget_observer.h"
-
-namespace aura {
-class Window;
-}
-
-namespace gfx {
-class Point;
-class Rect;
-class SlideAnimation;
-}
-
-namespace ui {
-class LocatedEvent;
-}
-
-namespace views {
-class View;
-class Widget;
-}
-
-namespace ash {
-
-class ASH_EXPORT ImmersiveFullscreenController
- : public gfx::AnimationDelegate,
- public ui::EventHandler,
- public views::FocusChangeListener,
- public views::WidgetObserver,
- public aura::WindowObserver,
- public ImmersiveRevealedLock::Delegate {
- public:
- // The enum is used for an enumerated histogram. New items should be only
- // added to the end.
- enum WindowType {
- WINDOW_TYPE_OTHER,
- WINDOW_TYPE_BROWSER,
- WINDOW_TYPE_HOSTED_APP,
- WINDOW_TYPE_PACKAGED_APP,
- WINDOW_TYPE_COUNT
- };
-
- class Delegate {
- public:
- // Called when a reveal of the top-of-window views starts.
- virtual void OnImmersiveRevealStarted() = 0;
-
- // Called when the top-of-window views have finished closing. This call
- // implies a visible fraction of 0. SetVisibleFraction(0) may not be called
- // prior to OnImmersiveRevealEnded().
- virtual void OnImmersiveRevealEnded() = 0;
-
- // Called as a result of disabling immersive fullscreen via SetEnabled().
- virtual void OnImmersiveFullscreenExited() = 0;
-
- // Called to update the fraction of the top-of-window views height which is
- // visible.
- virtual void SetVisibleFraction(double visible_fraction) = 0;
-
- // Returns a list of rects whose union makes up the top-of-window views.
- // The returned list is used for hittesting when the top-of-window views
- // are revealed. GetVisibleBoundsInScreen() must return a valid value when
- // not in immersive fullscreen for the sake of SetupForTest().
- virtual std::vector<gfx::Rect> GetVisibleBoundsInScreen() const = 0;
-
- protected:
- virtual ~Delegate() {}
- };
-
- ImmersiveFullscreenController();
- virtual ~ImmersiveFullscreenController();
-
- // Initializes the controller. Must be called prior to enabling immersive
- // fullscreen via SetEnabled(). |top_container| is used to keep the
- // top-of-window views revealed when a child of |top_container| has focus.
- // |top_container| does not affect which mouse and touch events keep the
- // top-of-window views revealed.
- void Init(Delegate* delegate,
- views::Widget* widget,
- views::View* top_container);
-
- // Enables or disables immersive fullscreen.
- // |window_type| is the type of window which is put in immersive fullscreen.
- // It is only used for histogramming.
- void SetEnabled(WindowType window_type, bool enable);
-
- // Returns true if |native_window_| is in immersive fullscreen.
- bool IsEnabled() const;
-
- // Returns true if |native_window_| is in immersive fullscreen and the
- // top-of-window views are fully or partially visible.
- bool IsRevealed() const;
-
- // Returns a lock which will keep the top-of-window views revealed for its
- // lifetime. Several locks can be obtained. When all of the locks are
- // destroyed, if immersive fullscreen is enabled and there is nothing else
- // keeping the top-of-window views revealed, the top-of-window views will be
- // closed. This method always returns a valid lock regardless of whether
- // immersive fullscreen is enabled. The lock's lifetime can span immersive
- // fullscreen being enabled / disabled. If acquiring the lock causes a reveal,
- // the top-of-window views will animate according to |animate_reveal|. The
- // caller takes ownership of the returned lock.
- ImmersiveRevealedLock* GetRevealedLock(
- AnimateReveal animate_reveal) WARN_UNUSED_RESULT;
-
- // Disables animations and moves the mouse so that it is not over the
- // top-of-window views for the sake of testing.
- void SetupForTest();
-
- // ui::EventHandler overrides:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- // views::FocusChangeObserver overrides:
- virtual void OnWillChangeFocus(views::View* focused_before,
- views::View* focused_now) OVERRIDE;
- virtual void OnDidChangeFocus(views::View* focused_before,
- views::View* focused_now) OVERRIDE;
-
- // views::WidgetObserver overrides:
- virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
- virtual void OnWidgetActivationChanged(views::Widget* widget,
- bool active) OVERRIDE;
-
- // gfx::AnimationDelegate overrides:
- virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
-
- // aura::WindowObserver overrides:
- virtual void OnAddTransientChild(aura::Window* window,
- aura::Window* transient) OVERRIDE;
- virtual void OnRemoveTransientChild(aura::Window* window,
- aura::Window* transient) OVERRIDE;
-
- // ash::ImmersiveRevealedLock::Delegate overrides:
- virtual void LockRevealedState(AnimateReveal animate_reveal) OVERRIDE;
- virtual void UnlockRevealedState() OVERRIDE;
-
- private:
- friend class ImmersiveFullscreenControllerTest;
-
- enum Animate {
- ANIMATE_NO,
- ANIMATE_SLOW,
- ANIMATE_FAST,
- };
- enum RevealState {
- CLOSED,
- SLIDING_OPEN,
- REVEALED,
- SLIDING_CLOSED,
- };
- enum SwipeType {
- SWIPE_OPEN,
- SWIPE_CLOSE,
- SWIPE_NONE
- };
-
- // Enables or disables observers for mouse, touch, focus, and activation.
- void EnableWindowObservers(bool enable);
-
- // Updates |top_edge_hover_timer_| based on a mouse |event|. If the mouse is
- // hovered at the top of the screen the timer is started. If the mouse moves
- // away from the top edge, or moves too much in the x direction, the timer is
- // stopped.
- void UpdateTopEdgeHoverTimer(ui::MouseEvent* event);
-
- // Updates |located_event_revealed_lock_| based on the current mouse state and
- // the current touch state.
- // |event| is NULL if the source event is not known.
- void UpdateLocatedEventRevealedLock(ui::LocatedEvent* event);
-
- // Acquires |located_event_revealed_lock_| if it is not already held.
- void AcquireLocatedEventRevealedLock();
-
- // Updates |focus_revealed_lock_| based on the currently active view and the
- // currently active widget.
- void UpdateFocusRevealedLock();
-
- // Update |located_event_revealed_lock_| and |focus_revealed_lock_| as a
- // result of a gesture of |swipe_type|. Returns true if any locks were
- // acquired or released.
- bool UpdateRevealedLocksForSwipe(SwipeType swipe_type);
-
- // Returns the animation duration given |animate|.
- int GetAnimationDuration(Animate animate) const;
-
- // Temporarily reveals the top-of-window views while in immersive mode,
- // hiding them when the cursor exits the area of the top views. If |animate|
- // is not ANIMATE_NO, slides in the view, otherwise shows it immediately.
- void MaybeStartReveal(Animate animate);
-
- // Called when the animation to slide open the top-of-window views has
- // completed.
- void OnSlideOpenAnimationCompleted();
-
- // Hides the top-of-window views if immersive mode is enabled and nothing is
- // keeping them revealed. Optionally animates.
- void MaybeEndReveal(Animate animate);
-
- // Called when the animation to slide out the top-of-window views has
- // completed.
- void OnSlideClosedAnimationCompleted();
-
- // Returns the type of swipe given |event|.
- SwipeType GetSwipeType(ui::GestureEvent* event) const;
-
- // Returns true if a mouse event at |location_in_screen| should be ignored.
- // Ignored mouse events should not contribute to revealing or unrevealing the
- // top-of-window views.
- bool ShouldIgnoreMouseEventAtLocation(
- const gfx::Point& location_in_screen) const;
-
- // True when |location| is "near" to the top container. When the top container
- // is not closed "near" means within the displayed bounds or above it. When
- // the top container is closed "near" means either within the displayed
- // bounds, above it, or within a few pixels below it. This allow the container
- // to steal enough pixels to detect a swipe in and handles the case that there
- // is a bezel sensor above the top container.
- bool ShouldHandleGestureEvent(const gfx::Point& location) const;
-
- // Recreate |bubble_manager_| and start observing any bubbles anchored to a
- // child of |top_container_|.
- void RecreateBubbleManager();
-
- // Not owned.
- Delegate* delegate_;
- views::View* top_container_;
- views::Widget* widget_;
- aura::Window* native_window_;
-
- // True if the observers have been enabled.
- bool observers_enabled_;
-
- // True when in immersive fullscreen.
- bool enabled_;
-
- // State machine for the revealed/closed animations.
- RevealState reveal_state_;
-
- int revealed_lock_count_;
-
- // Timer to track cursor being held at the top edge of the screen.
- base::OneShotTimer<ImmersiveFullscreenController> top_edge_hover_timer_;
-
- // The cursor x position in screen coordinates when the cursor first hit the
- // top edge of the screen.
- int mouse_x_when_hit_top_in_screen_;
-
- // Tracks if the controller has seen a ET_GESTURE_SCROLL_BEGIN, without the
- // following events.
- bool gesture_begun_;
-
- // Lock which keeps the top-of-window views revealed based on the current
- // mouse state and the current touch state. Acquiring the lock is used to
- // trigger a reveal when the user moves the mouse to the top of the screen
- // and when the user does a SWIPE_OPEN edge gesture.
- scoped_ptr<ImmersiveRevealedLock> located_event_revealed_lock_;
-
- // Lock which keeps the top-of-window views revealed based on the focused view
- // and the active widget. Acquiring the lock never triggers a reveal because
- // a view is not focusable till a reveal has made it visible.
- scoped_ptr<ImmersiveRevealedLock> focus_revealed_lock_;
-
- // The animation which controls sliding the top-of-window views in and out.
- scoped_ptr<gfx::SlideAnimation> animation_;
-
- // Whether the animations are disabled for testing.
- bool animations_disabled_for_test_;
-
- // Manages bubbles which are anchored to a child of |top_container_|.
- class BubbleManager;
- scoped_ptr<BubbleManager> bubble_manager_;
-
- base::WeakPtrFactory<ImmersiveFullscreenController> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(ImmersiveFullscreenController);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_
diff --git a/chromium/ash/wm/immersive_fullscreen_controller_unittest.cc b/chromium/ash/wm/immersive_fullscreen_controller_unittest.cc
deleted file mode 100644
index 7e50916d227..00000000000
--- a/chromium/ash/wm/immersive_fullscreen_controller_unittest.cc
+++ /dev/null
@@ -1,958 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/immersive_fullscreen_controller.h"
-
-#include "ash/display/display_manager.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/client/cursor_client.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/animation/slide_animation.h"
-#include "ui/views/bubble/bubble_delegate.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-// For now, immersive fullscreen is Chrome OS only.
-#if defined(OS_CHROMEOS)
-
-namespace ash {
-
-namespace {
-
-class MockImmersiveFullscreenControllerDelegate
- : public ImmersiveFullscreenController::Delegate {
- public:
- MockImmersiveFullscreenControllerDelegate(views::View* top_container_view)
- : top_container_view_(top_container_view),
- enabled_(false),
- visible_fraction_(1) {
- }
- virtual ~MockImmersiveFullscreenControllerDelegate() {}
-
- // ImmersiveFullscreenController::Delegate overrides:
- virtual void OnImmersiveRevealStarted() OVERRIDE {
- enabled_ = true;
- visible_fraction_ = 0;
- }
- virtual void OnImmersiveRevealEnded() OVERRIDE {
- visible_fraction_ = 0;
- }
- virtual void OnImmersiveFullscreenExited() OVERRIDE {
- enabled_ = false;
- visible_fraction_ = 1;
- }
- virtual void SetVisibleFraction(double visible_fraction) OVERRIDE {
- visible_fraction_ = visible_fraction;
- }
- virtual std::vector<gfx::Rect> GetVisibleBoundsInScreen() const OVERRIDE {
- std::vector<gfx::Rect> bounds_in_screen;
- bounds_in_screen.push_back(top_container_view_->GetBoundsInScreen());
- return bounds_in_screen;
- }
-
- bool is_enabled() const {
- return enabled_;
- }
-
- double visible_fraction() const {
- return visible_fraction_;
- }
-
- private:
- views::View* top_container_view_;
- bool enabled_;
- double visible_fraction_;
-
- DISALLOW_COPY_AND_ASSIGN(MockImmersiveFullscreenControllerDelegate);
-};
-
-} // namespace
-
-/////////////////////////////////////////////////////////////////////////////
-
-class ImmersiveFullscreenControllerTest : public ash::test::AshTestBase {
- public:
- enum Modality {
- MODALITY_MOUSE,
- MODALITY_TOUCH,
- MODALITY_GESTURE
- };
-
- ImmersiveFullscreenControllerTest() : widget_(NULL), top_container_(NULL) {}
- virtual ~ImmersiveFullscreenControllerTest() {}
-
- ImmersiveFullscreenController* controller() {
- return controller_.get();
- }
-
- views::View* top_container() {
- return top_container_;
- }
-
- aura::Window* window() {
- return widget_->GetNativeWindow();
- }
-
- MockImmersiveFullscreenControllerDelegate* delegate() {
- return delegate_.get();
- }
-
- // Access to private data from the controller.
- bool top_edge_hover_timer_running() const {
- return controller_->top_edge_hover_timer_.IsRunning();
- }
- int mouse_x_when_hit_top() const {
- return controller_->mouse_x_when_hit_top_in_screen_;
- }
-
- // ash::test::AshTestBase overrides:
- virtual void SetUp() OVERRIDE {
- ash::test::AshTestBase::SetUp();
-
- widget_ = new views::Widget();
- views::Widget::InitParams params;
- params.context = CurrentContext();
- widget_->Init(params);
- widget_->Show();
-
- window()->SetProperty(aura::client::kShowStateKey,
- ui::SHOW_STATE_FULLSCREEN);
-
- top_container_ = new views::View();
- top_container_->SetBounds(
- 0, 0, widget_->GetWindowBoundsInScreen().width(), 100);
- top_container_->SetFocusable(true);
- widget_->GetContentsView()->AddChildView(top_container_);
-
- delegate_.reset(
- new MockImmersiveFullscreenControllerDelegate(top_container_));
- controller_.reset(new ImmersiveFullscreenController);
- controller_->Init(delegate_.get(), widget_, top_container_);
- controller_->SetupForTest();
-
- // The mouse is moved so that it is not over |top_container_| by
- // AshTestBase.
- }
-
- // Enables / disables immersive fullscreen.
- void SetEnabled(bool enabled) {
- controller_->SetEnabled(ImmersiveFullscreenController::WINDOW_TYPE_OTHER,
- enabled);
- }
-
- // Attempt to reveal the top-of-window views via |modality|.
- // The top-of-window views can only be revealed via mouse hover or a gesture.
- void AttemptReveal(Modality modality) {
- ASSERT_NE(modality, MODALITY_TOUCH);
- AttemptRevealStateChange(true, modality);
- }
-
- // Attempt to unreveal the top-of-window views via |modality|. The
- // top-of-window views can be unrevealed via any modality.
- void AttemptUnreveal(Modality modality) {
- AttemptRevealStateChange(false, modality);
- }
-
- // Sets whether the mouse is hovered above |top_container_|.
- // SetHovered(true) moves the mouse over the |top_container_| but does not
- // move it to the top of the screen so will not initiate a reveal.
- void SetHovered(bool is_mouse_hovered) {
- MoveMouse(0, is_mouse_hovered ? 10 : top_container_->height() + 100);
- }
-
- // Move the mouse to the given coordinates. The coordinates should be in
- // |top_container_| coordinates.
- void MoveMouse(int x, int y) {
- gfx::Point screen_position(x, y);
- views::View::ConvertPointToScreen(top_container_, &screen_position);
- GetEventGenerator().MoveMouseTo(screen_position.x(), screen_position.y());
-
- // If the top edge timer started running as a result of the mouse move, run
- // the task which occurs after the timer delay. This reveals the
- // top-of-window views synchronously if the mouse is hovered at the top of
- // the screen.
- if (controller()->top_edge_hover_timer_.IsRunning()) {
- controller()->top_edge_hover_timer_.user_task().Run();
- controller()->top_edge_hover_timer_.Stop();
- }
- }
-
- private:
- // Attempt to change the revealed state to |revealed| via |modality|.
- void AttemptRevealStateChange(bool revealed, Modality modality) {
- // Compute the event position in |top_container_| coordinates.
- gfx::Point event_position(0, revealed ? 0 : top_container_->height() + 100);
- switch (modality) {
- case MODALITY_MOUSE: {
- MoveMouse(event_position.x(), event_position.y());
- break;
- }
- case MODALITY_TOUCH: {
- gfx::Point screen_position = event_position;
- views::View::ConvertPointToScreen(top_container_, &screen_position);
-
- aura::test::EventGenerator& event_generator(GetEventGenerator());
- event_generator.MoveTouch(event_position);
- event_generator.PressTouch();
- event_generator.ReleaseTouch();
- break;
- }
- case MODALITY_GESTURE: {
- aura::client::GetCursorClient(CurrentContext())->DisableMouseEvents();
- ImmersiveFullscreenController::SwipeType swipe_type = revealed ?
- ImmersiveFullscreenController::SWIPE_OPEN :
- ImmersiveFullscreenController::SWIPE_CLOSE;
- controller_->UpdateRevealedLocksForSwipe(swipe_type);
- break;
- }
- }
- }
-
- scoped_ptr<ImmersiveFullscreenController> controller_;
- scoped_ptr<MockImmersiveFullscreenControllerDelegate> delegate_;
- views::Widget* widget_; // Owned by the native widget.
- views::View* top_container_; // Owned by |root_view_|.
-
- DISALLOW_COPY_AND_ASSIGN(ImmersiveFullscreenControllerTest);
-};
-
-// Test the initial state and that the delegate gets notified of the
-// top-of-window views getting hidden and revealed.
-TEST_F(ImmersiveFullscreenControllerTest, Delegate) {
- // Initial state.
- EXPECT_FALSE(controller()->IsEnabled());
- EXPECT_FALSE(controller()->IsRevealed());
- EXPECT_FALSE(delegate()->is_enabled());
-
- // Enabling initially hides the top views.
- SetEnabled(true);
- EXPECT_TRUE(controller()->IsEnabled());
- EXPECT_FALSE(controller()->IsRevealed());
- EXPECT_TRUE(delegate()->is_enabled());
- EXPECT_EQ(0, delegate()->visible_fraction());
-
- // Revealing shows the top views.
- AttemptReveal(MODALITY_MOUSE);
- EXPECT_TRUE(controller()->IsEnabled());
- EXPECT_TRUE(controller()->IsRevealed());
- EXPECT_TRUE(delegate()->is_enabled());
- EXPECT_EQ(1, delegate()->visible_fraction());
-
- // Disabling ends the immersive reveal.
- SetEnabled(false);
- EXPECT_FALSE(controller()->IsEnabled());
- EXPECT_FALSE(controller()->IsRevealed());
- EXPECT_FALSE(delegate()->is_enabled());
-}
-
-// GetRevealedLock() specific tests.
-TEST_F(ImmersiveFullscreenControllerTest, RevealedLock) {
- scoped_ptr<ImmersiveRevealedLock> lock1;
- scoped_ptr<ImmersiveRevealedLock> lock2;
-
- // Immersive fullscreen is not on by default.
- EXPECT_FALSE(controller()->IsEnabled());
-
- // 1) Test acquiring and releasing a revealed state lock while immersive
- // fullscreen is disabled. Acquiring or releasing the lock should have no
- // effect till immersive fullscreen is enabled.
- lock1.reset(controller()->GetRevealedLock(
- ImmersiveFullscreenController::ANIMATE_REVEAL_NO));
- EXPECT_FALSE(controller()->IsEnabled());
- EXPECT_FALSE(controller()->IsRevealed());
-
- // Immersive fullscreen should start in the revealed state due to the lock.
- SetEnabled(true);
- EXPECT_TRUE(controller()->IsEnabled());
- EXPECT_TRUE(controller()->IsRevealed());
-
- SetEnabled(false);
- EXPECT_FALSE(controller()->IsEnabled());
- EXPECT_FALSE(controller()->IsRevealed());
-
- lock1.reset();
- EXPECT_FALSE(controller()->IsEnabled());
- EXPECT_FALSE(controller()->IsRevealed());
-
- // Immersive fullscreen should start in the closed state because the lock is
- // no longer held.
- SetEnabled(true);
- EXPECT_TRUE(controller()->IsEnabled());
- EXPECT_FALSE(controller()->IsRevealed());
-
- // 2) Test that acquiring a lock reveals the top-of-window views if they are
- // hidden.
- lock1.reset(controller()->GetRevealedLock(
- ImmersiveFullscreenController::ANIMATE_REVEAL_NO));
- EXPECT_TRUE(controller()->IsRevealed());
-
- // 3) Test that the top-of-window views are only hidden when all of the locks
- // are released.
- lock2.reset(controller()->GetRevealedLock(
- ImmersiveFullscreenController::ANIMATE_REVEAL_NO));
- lock1.reset();
- EXPECT_TRUE(controller()->IsRevealed());
-
- lock2.reset();
- EXPECT_FALSE(controller()->IsRevealed());
-}
-
-// Test mouse event processing for top-of-screen reveal triggering.
-TEST_F(ImmersiveFullscreenControllerTest, OnMouseEvent) {
- // Set up initial state.
- UpdateDisplay("800x600,800x600");
- ash::DisplayLayout display_layout(ash::DisplayLayout::RIGHT, 0);
- ash::Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays(
- display_layout);
-
- // Set up initial state.
- SetEnabled(true);
- ASSERT_TRUE(controller()->IsEnabled());
- ASSERT_FALSE(controller()->IsRevealed());
-
- aura::test::EventGenerator& event_generator(GetEventGenerator());
-
- gfx::Rect top_container_bounds_in_screen =
- top_container()->GetBoundsInScreen();
- // A position along the top edge of TopContainerView in screen coordinates.
- gfx::Point top_edge_pos(top_container_bounds_in_screen.x() + 100,
- top_container_bounds_in_screen.y());
-
- // Mouse wheel event does nothing.
- ui::MouseEvent wheel(
- ui::ET_MOUSEWHEEL, top_edge_pos, top_edge_pos, ui::EF_NONE);
- event_generator.Dispatch(&wheel);
- EXPECT_FALSE(top_edge_hover_timer_running());
-
- // Move to top edge of screen starts hover timer running. We cannot use
- // MoveMouse() because MoveMouse() stops the timer if it started running.
- event_generator.MoveMouseTo(top_edge_pos);
- EXPECT_TRUE(top_edge_hover_timer_running());
- EXPECT_EQ(top_edge_pos.x(), mouse_x_when_hit_top());
-
- // Moving |ImmersiveFullscreenControllerTest::kMouseRevealBoundsHeight| down
- // from the top edge stops it.
- event_generator.MoveMouseBy(0, 3);
- EXPECT_FALSE(top_edge_hover_timer_running());
-
- // Moving back to the top starts the timer again.
- event_generator.MoveMouseTo(top_edge_pos);
- EXPECT_TRUE(top_edge_hover_timer_running());
- EXPECT_EQ(top_edge_pos.x(), mouse_x_when_hit_top());
-
- // Slight move to the right keeps the timer running for the same hit point.
- event_generator.MoveMouseBy(1, 0);
- EXPECT_TRUE(top_edge_hover_timer_running());
- EXPECT_EQ(top_edge_pos.x(), mouse_x_when_hit_top());
-
- // Moving back to the left also keeps the timer running.
- event_generator.MoveMouseBy(-1, 0);
- EXPECT_TRUE(top_edge_hover_timer_running());
- EXPECT_EQ(top_edge_pos.x(), mouse_x_when_hit_top());
-
- // Large move right restarts the timer (so it is still running) and considers
- // this a new hit at the top.
- event_generator.MoveMouseTo(top_edge_pos.x() + 100, top_edge_pos.y());
- EXPECT_TRUE(top_edge_hover_timer_running());
- EXPECT_EQ(top_edge_pos.x() + 100, mouse_x_when_hit_top());
-
- // Moving off the top edge horizontally stops the timer.
- event_generator.MoveMouseTo(top_container_bounds_in_screen.right() + 1,
- top_container_bounds_in_screen.y());
- EXPECT_FALSE(top_edge_hover_timer_running());
-
- // Once revealed, a move just a little below the top container doesn't end a
- // reveal.
- AttemptReveal(MODALITY_MOUSE);
- event_generator.MoveMouseTo(top_container_bounds_in_screen.x(),
- top_container_bounds_in_screen.bottom() + 1);
- EXPECT_TRUE(controller()->IsRevealed());
-
- // Once revealed, clicking just below the top container ends the reveal.
- event_generator.ClickLeftButton();
- EXPECT_FALSE(controller()->IsRevealed());
-
- // Moving a lot below the top container ends a reveal.
- AttemptReveal(MODALITY_MOUSE);
- EXPECT_TRUE(controller()->IsRevealed());
- event_generator.MoveMouseTo(top_container_bounds_in_screen.x(),
- top_container_bounds_in_screen.bottom() + 50);
- EXPECT_FALSE(controller()->IsRevealed());
-
- // The mouse position cannot cause a reveal when the top container's widget
- // has capture.
- views::Widget* widget = top_container()->GetWidget();
- widget->SetCapture(top_container());
- AttemptReveal(MODALITY_MOUSE);
- EXPECT_FALSE(controller()->IsRevealed());
- widget->ReleaseCapture();
-
- // The mouse position cannot end the reveal while the top container's widget
- // has capture.
- AttemptReveal(MODALITY_MOUSE);
- EXPECT_TRUE(controller()->IsRevealed());
- widget->SetCapture(top_container());
- event_generator.MoveMouseTo(top_container_bounds_in_screen.x(),
- top_container_bounds_in_screen.bottom() + 51);
- EXPECT_TRUE(controller()->IsRevealed());
-
- // Releasing capture should end the reveal.
- widget->ReleaseCapture();
- EXPECT_FALSE(controller()->IsRevealed());
-}
-
-// Test mouse event processing for top-of-screen reveal triggering when the
-// top container's widget is inactive.
-TEST_F(ImmersiveFullscreenControllerTest, Inactive) {
- // Set up initial state.
- views::Widget* popup_widget = views::Widget::CreateWindowWithContextAndBounds(
- NULL,
- CurrentContext(),
- gfx::Rect(0, 0, 200, 200));
- popup_widget->Show();
- ASSERT_FALSE(top_container()->GetWidget()->IsActive());
-
- SetEnabled(true);
- ASSERT_TRUE(controller()->IsEnabled());
- ASSERT_FALSE(controller()->IsRevealed());
-
- gfx::Rect top_container_bounds_in_screen =
- top_container()->GetBoundsInScreen();
- gfx::Rect popup_bounds_in_screen = popup_widget->GetWindowBoundsInScreen();
- ASSERT_EQ(top_container_bounds_in_screen.origin().ToString(),
- popup_bounds_in_screen.origin().ToString());
- ASSERT_GT(top_container_bounds_in_screen.right(),
- popup_bounds_in_screen.right());
-
- // The top-of-window views should stay hidden if the cursor is at the top edge
- // but above an obscured portion of the top-of-window views.
- MoveMouse(popup_bounds_in_screen.x(),
- top_container_bounds_in_screen.y());
- EXPECT_FALSE(controller()->IsRevealed());
-
- // The top-of-window views should reveal if the cursor is at the top edge and
- // above an unobscured portion of the top-of-window views.
- MoveMouse(top_container_bounds_in_screen.right() - 1,
- top_container_bounds_in_screen.y());
- EXPECT_TRUE(controller()->IsRevealed());
-
- // The top-of-window views should stay revealed if the cursor is moved off
- // of the top edge.
- MoveMouse(top_container_bounds_in_screen.right() - 1,
- top_container_bounds_in_screen.bottom() - 1);
- EXPECT_TRUE(controller()->IsRevealed());
-
- // Moving way off of the top-of-window views should end the immersive reveal.
- MoveMouse(top_container_bounds_in_screen.right() - 1,
- top_container_bounds_in_screen.bottom() + 50);
- EXPECT_FALSE(controller()->IsRevealed());
-
- // Moving way off of the top-of-window views in a region where the
- // top-of-window views are obscured should also end the immersive reveal.
- // Ideally, the immersive reveal would end immediately when the cursor moves
- // to an obscured portion of the top-of-window views.
- MoveMouse(top_container_bounds_in_screen.right() - 1,
- top_container_bounds_in_screen.y());
- EXPECT_TRUE(controller()->IsRevealed());
- MoveMouse(top_container_bounds_in_screen.x(),
- top_container_bounds_in_screen.bottom() + 50);
- EXPECT_FALSE(controller()->IsRevealed());
-}
-
-// Test mouse event processing for top-of-screen reveal triggering when the user
-// has a vertical display layout (primary display above/below secondary display)
-// and the immersive fullscreen window is on the bottom display.
-TEST_F(ImmersiveFullscreenControllerTest, MouseEventsVerticalDisplayLayout) {
- if (!SupportsMultipleDisplays())
- return;
-
- // Set up initial state.
- UpdateDisplay("800x600,800x600");
- ash::DisplayLayout display_layout(ash::DisplayLayout::TOP, 0);
- ash::Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays(
- display_layout);
-
- SetEnabled(true);
- ASSERT_TRUE(controller()->IsEnabled());
- ASSERT_FALSE(controller()->IsRevealed());
-
- aura::Window::Windows root_windows = ash::Shell::GetAllRootWindows();
- ASSERT_EQ(root_windows[0],
- top_container()->GetWidget()->GetNativeWindow()->GetRootWindow());
-
- gfx::Rect primary_root_window_bounds_in_screen =
- root_windows[0]->GetBoundsInScreen();
- // Do not set |x| to the root window's x position because the display's
- // corners have special behavior.
- int x = primary_root_window_bounds_in_screen.x() + 10;
- // The y position of the top edge of the primary display.
- int y_top_edge = primary_root_window_bounds_in_screen.y();
-
- aura::test::EventGenerator& event_generator(GetEventGenerator());
-
- // Moving right below the top edge starts the hover timer running. We
- // cannot use MoveMouse() because MoveMouse() stops the timer if it started
- // running.
- event_generator.MoveMouseTo(x, y_top_edge + 1);
- EXPECT_TRUE(top_edge_hover_timer_running());
- EXPECT_EQ(y_top_edge + 1,
- aura::Env::GetInstance()->last_mouse_location().y());
-
- // The timer should continue running if the user moves the mouse to the top
- // edge even though the mouse is warped to the secondary display.
- event_generator.MoveMouseTo(x, y_top_edge);
- EXPECT_TRUE(top_edge_hover_timer_running());
- EXPECT_NE(y_top_edge,
- aura::Env::GetInstance()->last_mouse_location().y());
-
- // The timer should continue running if the user overshoots the top edge
- // a bit.
- event_generator.MoveMouseTo(x, y_top_edge - 2);
- EXPECT_TRUE(top_edge_hover_timer_running());
-
- // The timer should stop running if the user overshoots the top edge by
- // a lot.
- event_generator.MoveMouseTo(x, y_top_edge - 20);
- EXPECT_FALSE(top_edge_hover_timer_running());
-
- // The timer should not start if the user moves the mouse to the bottom of the
- // secondary display without crossing the top edge first.
- event_generator.MoveMouseTo(x, y_top_edge - 2);
-
- // Reveal the top-of-window views by overshooting the top edge slightly.
- event_generator.MoveMouseTo(x, y_top_edge + 1);
- // MoveMouse() runs the timer task.
- MoveMouse(x, y_top_edge - 2);
- EXPECT_TRUE(controller()->IsRevealed());
-
- // The top-of-window views should stay revealed if the user moves the mouse
- // around in the bottom region of the secondary display.
- event_generator.MoveMouseTo(x + 10, y_top_edge - 3);
- EXPECT_TRUE(controller()->IsRevealed());
-
- // The top-of-window views should hide if the user moves the mouse away from
- // the bottom region of the secondary display.
- event_generator.MoveMouseTo(x, y_top_edge - 20);
- EXPECT_FALSE(controller()->IsRevealed());
-
- // Test that it is possible to reveal the top-of-window views by overshooting
- // the top edge slightly when the top container's widget is not active.
- views::Widget* popup_widget = views::Widget::CreateWindowWithContextAndBounds(
- NULL,
- CurrentContext(),
- gfx::Rect(0, 200, 100, 100));
- popup_widget->Show();
- ASSERT_FALSE(top_container()->GetWidget()->IsActive());
- ASSERT_FALSE(top_container()->GetBoundsInScreen().Intersects(
- popup_widget->GetWindowBoundsInScreen()));
- event_generator.MoveMouseTo(x, y_top_edge + 1);
- MoveMouse(x, y_top_edge - 2);
- EXPECT_TRUE(controller()->IsRevealed());
-}
-
-// Test behavior when the mouse becomes hovered without moving.
-TEST_F(ImmersiveFullscreenControllerTest, MouseHoveredWithoutMoving) {
- SetEnabled(true);
- scoped_ptr<ImmersiveRevealedLock> lock;
-
- // 1) Test that if the mouse becomes hovered without the mouse moving due to a
- // lock causing the top-of-window views to be revealed (and the mouse
- // happening to be near the top of the screen), the top-of-window views do not
- // hide till the mouse moves off of the top-of-window views.
- SetHovered(true);
- EXPECT_FALSE(controller()->IsRevealed());
- lock.reset(controller()->GetRevealedLock(
- ImmersiveFullscreenController::ANIMATE_REVEAL_NO));
- EXPECT_TRUE(controller()->IsRevealed());
- lock.reset();
- EXPECT_TRUE(controller()->IsRevealed());
- SetHovered(false);
- EXPECT_FALSE(controller()->IsRevealed());
-
- // 2) Test that if the mouse becomes hovered without moving because of a
- // reveal in ImmersiveFullscreenController::SetEnabled(true) and there are no
- // locks keeping the top-of-window views revealed, that mouse hover does not
- // prevent the top-of-window views from closing.
- SetEnabled(false);
- SetHovered(true);
- EXPECT_FALSE(controller()->IsRevealed());
- SetEnabled(true);
- EXPECT_FALSE(controller()->IsRevealed());
-
- // 3) Test that if the mouse becomes hovered without moving because of a
- // reveal in ImmersiveFullscreenController::SetEnabled(true) and there is a
- // lock keeping the top-of-window views revealed, that the top-of-window views
- // do not hide till the mouse moves off of the top-of-window views.
- SetEnabled(false);
- SetHovered(true);
- lock.reset(controller()->GetRevealedLock(
- ImmersiveFullscreenController::ANIMATE_REVEAL_NO));
- EXPECT_FALSE(controller()->IsRevealed());
- SetEnabled(true);
- EXPECT_TRUE(controller()->IsRevealed());
- lock.reset();
- EXPECT_TRUE(controller()->IsRevealed());
- SetHovered(false);
- EXPECT_FALSE(controller()->IsRevealed());
-}
-
-// Test revealing the top-of-window views using one modality and ending
-// the reveal via another. For instance, initiating the reveal via a SWIPE_OPEN
-// edge gesture, switching to using the mouse and ending the reveal by moving
-// the mouse off of the top-of-window views.
-TEST_F(ImmersiveFullscreenControllerTest, DifferentModalityEnterExit) {
- SetEnabled(true);
- EXPECT_TRUE(controller()->IsEnabled());
- EXPECT_FALSE(controller()->IsRevealed());
-
- // Initiate reveal via gesture, end reveal via mouse.
- AttemptReveal(MODALITY_GESTURE);
- EXPECT_TRUE(controller()->IsRevealed());
- MoveMouse(1, 1);
- EXPECT_TRUE(controller()->IsRevealed());
- AttemptUnreveal(MODALITY_MOUSE);
- EXPECT_FALSE(controller()->IsRevealed());
-
- // Initiate reveal via gesture, end reveal via touch.
- AttemptReveal(MODALITY_GESTURE);
- EXPECT_TRUE(controller()->IsRevealed());
- AttemptUnreveal(MODALITY_TOUCH);
- EXPECT_FALSE(controller()->IsRevealed());
-
- // Initiate reveal via mouse, end reveal via gesture.
- AttemptReveal(MODALITY_MOUSE);
- EXPECT_TRUE(controller()->IsRevealed());
- AttemptUnreveal(MODALITY_GESTURE);
- EXPECT_FALSE(controller()->IsRevealed());
-
- // Initiate reveal via mouse, end reveal via touch.
- AttemptReveal(MODALITY_MOUSE);
- EXPECT_TRUE(controller()->IsRevealed());
- AttemptUnreveal(MODALITY_TOUCH);
- EXPECT_FALSE(controller()->IsRevealed());
-}
-
-// Test when the SWIPE_CLOSE edge gesture closes the top-of-window views.
-TEST_F(ImmersiveFullscreenControllerTest, EndRevealViaGesture) {
- SetEnabled(true);
- EXPECT_TRUE(controller()->IsEnabled());
- EXPECT_FALSE(controller()->IsRevealed());
-
- // A gesture should be able to close the top-of-window views when
- // top-of-window views have focus.
- AttemptReveal(MODALITY_MOUSE);
- top_container()->RequestFocus();
- EXPECT_TRUE(controller()->IsRevealed());
- AttemptUnreveal(MODALITY_GESTURE);
- EXPECT_FALSE(controller()->IsRevealed());
-
- // The top-of-window views should no longer have focus. Clearing focus is
- // important because it closes focus-related popup windows like the touch
- // selection handles.
- EXPECT_FALSE(top_container()->HasFocus());
-
- // If some other code is holding onto a lock, a gesture should not be able to
- // end the reveal.
- AttemptReveal(MODALITY_MOUSE);
- scoped_ptr<ImmersiveRevealedLock> lock(controller()->GetRevealedLock(
- ImmersiveFullscreenController::ANIMATE_REVEAL_NO));
- EXPECT_TRUE(controller()->IsRevealed());
- AttemptUnreveal(MODALITY_GESTURE);
- EXPECT_TRUE(controller()->IsRevealed());
- lock.reset();
- EXPECT_FALSE(controller()->IsRevealed());
-}
-
-// Do not test under windows because focus testing is not reliable on
-// Windows. (crbug.com/79493)
-#if !defined(OS_WIN)
-
-// Test how focus and activation affects whether the top-of-window views are
-// revealed.
-TEST_F(ImmersiveFullscreenControllerTest, Focus) {
- // Add views to the view hierarchy which we will focus and unfocus during the
- // test.
- views::View* child_view = new views::View();
- child_view->SetBounds(0, 0, 10, 10);
- child_view->SetFocusable(true);
- top_container()->AddChildView(child_view);
- views::View* unrelated_view = new views::View();
- unrelated_view->SetBounds(0, 100, 10, 10);
- unrelated_view->SetFocusable(true);
- top_container()->parent()->AddChildView(unrelated_view);
- views::FocusManager* focus_manager =
- top_container()->GetWidget()->GetFocusManager();
-
- SetEnabled(true);
-
- // 1) Test that the top-of-window views stay revealed as long as either a
- // |child_view| has focus or the mouse is hovered above the top-of-window
- // views.
- AttemptReveal(MODALITY_MOUSE);
- child_view->RequestFocus();
- focus_manager->ClearFocus();
- EXPECT_TRUE(controller()->IsRevealed());
- child_view->RequestFocus();
- SetHovered(false);
- EXPECT_TRUE(controller()->IsRevealed());
- focus_manager->ClearFocus();
- EXPECT_FALSE(controller()->IsRevealed());
-
- // 2) Test that focusing |unrelated_view| hides the top-of-window views.
- // Note: In this test we can cheat and trigger a reveal via focus because
- // the top container does not hide when the top-of-window views are not
- // revealed.
- child_view->RequestFocus();
- EXPECT_TRUE(controller()->IsRevealed());
- unrelated_view->RequestFocus();
- EXPECT_FALSE(controller()->IsRevealed());
-
- // 3) Test that a loss of focus of |child_view| to |unrelated_view|
- // while immersive mode is disabled is properly registered.
- child_view->RequestFocus();
- EXPECT_TRUE(controller()->IsRevealed());
- SetEnabled(false);
- EXPECT_FALSE(controller()->IsRevealed());
- unrelated_view->RequestFocus();
- SetEnabled(true);
- EXPECT_FALSE(controller()->IsRevealed());
-
- // Repeat test but with a revealed lock acquired when immersive mode is
- // disabled because the code path is different.
- child_view->RequestFocus();
- EXPECT_TRUE(controller()->IsRevealed());
- SetEnabled(false);
- scoped_ptr<ImmersiveRevealedLock> lock(controller()->GetRevealedLock(
- ImmersiveFullscreenController::ANIMATE_REVEAL_NO));
- EXPECT_FALSE(controller()->IsRevealed());
- unrelated_view->RequestFocus();
- SetEnabled(true);
- EXPECT_TRUE(controller()->IsRevealed());
- lock.reset();
- EXPECT_FALSE(controller()->IsRevealed());
-}
-
-// Test how transient windows affect whether the top-of-window views are
-// revealed.
-TEST_F(ImmersiveFullscreenControllerTest, Transient) {
- views::Widget* top_container_widget = top_container()->GetWidget();
-
- SetEnabled(true);
- ASSERT_FALSE(controller()->IsRevealed());
-
- // 1) Test that a transient window which is not a bubble does not trigger a
- // reveal but does keep the top-of-window views revealed if they are already
- // revealed.
- views::Widget::InitParams transient_params;
- transient_params.ownership =
- views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- transient_params.parent = top_container_widget->GetNativeView();
- transient_params.bounds = gfx::Rect(0, 100, 100, 100);
- scoped_ptr<views::Widget> transient_widget(new views::Widget());
- transient_widget->Init(transient_params);
-
- EXPECT_FALSE(controller()->IsRevealed());
- AttemptReveal(MODALITY_MOUSE);
- EXPECT_TRUE(controller()->IsRevealed());
- transient_widget->Show();
- SetHovered(false);
- EXPECT_TRUE(controller()->IsRevealed());
- transient_widget.reset();
- EXPECT_FALSE(controller()->IsRevealed());
-
- // 2) Test that activating a non-transient window does not keep the
- // top-of-window views revealed.
- views::Widget::InitParams non_transient_params;
- non_transient_params.ownership =
- views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- non_transient_params.context = top_container_widget->GetNativeView();
- non_transient_params.bounds = gfx::Rect(0, 100, 100, 100);
- scoped_ptr<views::Widget> non_transient_widget(new views::Widget());
- non_transient_widget->Init(non_transient_params);
-
- EXPECT_FALSE(controller()->IsRevealed());
- AttemptReveal(MODALITY_MOUSE);
- EXPECT_TRUE(controller()->IsRevealed());
- non_transient_widget->Show();
- SetHovered(false);
- EXPECT_FALSE(controller()->IsRevealed());
-}
-
-// Test how bubbles affect whether the top-of-window views are revealed.
-TEST_F(ImmersiveFullscreenControllerTest, Bubbles) {
- scoped_ptr<ImmersiveRevealedLock> revealed_lock;
- views::Widget* top_container_widget = top_container()->GetWidget();
-
- // Add views to the view hierarchy to which we will anchor bubbles.
- views::View* child_view = new views::View();
- child_view->SetBounds(0, 0, 10, 10);
- top_container()->AddChildView(child_view);
- views::View* unrelated_view = new views::View();
- unrelated_view->SetBounds(0, 100, 10, 10);
- top_container()->parent()->AddChildView(unrelated_view);
-
- SetEnabled(true);
- ASSERT_FALSE(controller()->IsRevealed());
-
- // 1) Test that a bubble anchored to a child of the top container triggers
- // a reveal and keeps the top-of-window views revealed for the duration of
- // its visibility.
- views::Widget* bubble_widget1(views::BubbleDelegateView::CreateBubble(
- new views::BubbleDelegateView(child_view, views::BubbleBorder::NONE)));
- bubble_widget1->Show();
- EXPECT_TRUE(controller()->IsRevealed());
-
- // Activating |top_container_widget| will close |bubble_widget1|.
- top_container_widget->Activate();
- AttemptReveal(MODALITY_MOUSE);
- revealed_lock.reset(controller()->GetRevealedLock(
- ImmersiveFullscreenController::ANIMATE_REVEAL_NO));
- EXPECT_TRUE(controller()->IsRevealed());
-
- views::Widget* bubble_widget2 = views::BubbleDelegateView::CreateBubble(
- new views::BubbleDelegateView(child_view, views::BubbleBorder::NONE));
- bubble_widget2->Show();
- EXPECT_TRUE(controller()->IsRevealed());
- revealed_lock.reset();
- SetHovered(false);
- EXPECT_TRUE(controller()->IsRevealed());
- bubble_widget2->Close();
- EXPECT_FALSE(controller()->IsRevealed());
-
- // 2) Test that transitioning from keeping the top-of-window views revealed
- // because of a bubble to keeping the top-of-window views revealed because of
- // mouse hover by activating |top_container_widget| works.
- views::Widget* bubble_widget3 = views::BubbleDelegateView::CreateBubble(
- new views::BubbleDelegateView(child_view, views::BubbleBorder::NONE));
- bubble_widget3->Show();
- SetHovered(true);
- EXPECT_TRUE(controller()->IsRevealed());
- top_container_widget->Activate();
- EXPECT_TRUE(controller()->IsRevealed());
-
- // 3) Test that the top-of-window views stay revealed as long as at least one
- // bubble anchored to a child of the top container is visible.
- SetHovered(false);
- EXPECT_FALSE(controller()->IsRevealed());
-
- views::BubbleDelegateView* bubble_delegate4(new views::BubbleDelegateView(
- child_view, views::BubbleBorder::NONE));
- bubble_delegate4->set_use_focusless(true);
- views::Widget* bubble_widget4(views::BubbleDelegateView::CreateBubble(
- bubble_delegate4));
- bubble_widget4->Show();
-
- views::BubbleDelegateView* bubble_delegate5(new views::BubbleDelegateView(
- child_view, views::BubbleBorder::NONE));
- bubble_delegate5->set_use_focusless(true);
- views::Widget* bubble_widget5(views::BubbleDelegateView::CreateBubble(
- bubble_delegate5));
- bubble_widget5->Show();
-
- EXPECT_TRUE(controller()->IsRevealed());
- bubble_widget4->Hide();
- EXPECT_TRUE(controller()->IsRevealed());
- bubble_widget5->Hide();
- EXPECT_FALSE(controller()->IsRevealed());
- bubble_widget5->Show();
- EXPECT_TRUE(controller()->IsRevealed());
-
- // 4) Test that visibility changes which occur while immersive fullscreen is
- // disabled are handled upon reenabling immersive fullscreen.
- SetEnabled(false);
- bubble_widget5->Hide();
- SetEnabled(true);
- EXPECT_FALSE(controller()->IsRevealed());
-
- // We do not need |bubble_widget4| or |bubble_widget5| anymore, close them.
- bubble_widget4->Close();
- bubble_widget5->Close();
-
- // 5) Test that a bubble added while immersive fullscreen is disabled is
- // handled upon reenabling immersive fullscreen.
- SetEnabled(false);
-
- views::Widget* bubble_widget6 = views::BubbleDelegateView::CreateBubble(
- new views::BubbleDelegateView(child_view, views::BubbleBorder::NONE));
- bubble_widget6->Show();
-
- SetEnabled(true);
- EXPECT_TRUE(controller()->IsRevealed());
-
- bubble_widget6->Close();
-
- // 6) Test that a bubble which is not anchored to a child of the
- // TopContainerView does not trigger a reveal or keep the
- // top-of-window views revealed if they are already revealed.
- views::Widget* bubble_widget7 = views::BubbleDelegateView::CreateBubble(
- new views::BubbleDelegateView(unrelated_view, views::BubbleBorder::NONE));
- bubble_widget7->Show();
- EXPECT_FALSE(controller()->IsRevealed());
-
- // Activating |top_container_widget| will close |bubble_widget6|.
- top_container_widget->Activate();
- AttemptReveal(MODALITY_MOUSE);
- EXPECT_TRUE(controller()->IsRevealed());
-
- views::Widget* bubble_widget8 = views::BubbleDelegateView::CreateBubble(
- new views::BubbleDelegateView(unrelated_view, views::BubbleBorder::NONE));
- bubble_widget8->Show();
- SetHovered(false);
- EXPECT_FALSE(controller()->IsRevealed());
- bubble_widget8->Close();
-}
-
-#endif // defined(OS_WIN)
-
-// Test that the shelf is set to auto hide as long as the window is in
-// immersive fullscreen and that the shelf's state before entering immersive
-// fullscreen is restored upon exiting immersive fullscreen.
-TEST_F(ImmersiveFullscreenControllerTest, Shelf) {
- ash::internal::ShelfLayoutManager* shelf =
- ash::Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager();
-
- // Shelf is visible by default.
- window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- ASSERT_FALSE(controller()->IsEnabled());
- ASSERT_EQ(ash::SHELF_VISIBLE, shelf->visibility_state());
-
- // Entering immersive fullscreen sets the shelf to auto hide.
- window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- SetEnabled(true);
- EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state());
-
- // Disabling immersive fullscreen puts it back.
- SetEnabled(false);
- window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- ASSERT_FALSE(controller()->IsEnabled());
- EXPECT_EQ(ash::SHELF_VISIBLE, shelf->visibility_state());
-
- // The user could toggle the shelf auto-hide behavior.
- shelf->SetAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state());
-
- // Entering immersive fullscreen keeps auto-hide.
- window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- SetEnabled(true);
- EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state());
-
- // Disabling immersive fullscreen maintains the user's auto-hide selection.
- SetEnabled(false);
- window()->SetProperty(aura::client::kShowStateKey,
- ui::SHOW_STATE_NORMAL);
- EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state());
-}
-
-} // namespase ash
-
-#endif // defined(OS_CHROMEOS)
diff --git a/chromium/ash/wm/immersive_revealed_lock.cc b/chromium/ash/wm/immersive_revealed_lock.cc
deleted file mode 100644
index 052c2131790..00000000000
--- a/chromium/ash/wm/immersive_revealed_lock.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/immersive_revealed_lock.h"
-
-namespace ash {
-
-ImmersiveRevealedLock::ImmersiveRevealedLock(
- const base::WeakPtr<Delegate>& delegate,
- Delegate::AnimateReveal animate_reveal)
- : delegate_(delegate) {
- delegate_->LockRevealedState(animate_reveal);
-}
-
-ImmersiveRevealedLock::~ImmersiveRevealedLock() {
- if (delegate_)
- delegate_->UnlockRevealedState();
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/immersive_revealed_lock.h b/chromium/ash/wm/immersive_revealed_lock.h
deleted file mode 100644
index a7dbea51bc2..00000000000
--- a/chromium/ash/wm/immersive_revealed_lock.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_IMMERSIVE_REVEALED_LOCK_H_
-#define ASH_WM_IMMERSIVE_REVEALED_LOCK_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/memory/weak_ptr.h"
-
-namespace ash {
-
-// Class which keeps the top-of-window views revealed for the duration of its
-// lifetime. If acquiring the lock causes a reveal, the top-of-window views
-// will animate according to the |animate_reveal| parameter passed in the
-// constructor. See ImmersiveFullscreenController::GetRevealedLock() for more
-// details.
-class ASH_EXPORT ImmersiveRevealedLock {
- public:
- class ASH_EXPORT Delegate {
- public:
- enum AnimateReveal {
- ANIMATE_REVEAL_YES,
- ANIMATE_REVEAL_NO
- };
-
- virtual void LockRevealedState(AnimateReveal animate_reveal) = 0;
- virtual void UnlockRevealedState() = 0;
-
- protected:
- virtual ~Delegate() {}
- };
-
- ImmersiveRevealedLock(const base::WeakPtr<Delegate>& delegate,
- Delegate::AnimateReveal animate_reveal);
- ~ImmersiveRevealedLock();
-
- private:
- base::WeakPtr<Delegate> delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(ImmersiveRevealedLock);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_IMMERSIVE_REVEALED_LOCK_H_
diff --git a/chromium/ash/wm/lock_state_controller.cc b/chromium/ash/wm/lock_state_controller.cc
deleted file mode 100644
index cffbb6bd577..00000000000
--- a/chromium/ash/wm/lock_state_controller.cc
+++ /dev/null
@@ -1,674 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/lock_state_controller.h"
-
-#include <algorithm>
-
-#include "ash/accessibility_delegate.h"
-#include "ash/ash_switches.h"
-#include "ash/cancel_mode.h"
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/session_state_animator.h"
-#include "base/bind_helpers.h"
-#include "base/command_line.h"
-#include "base/timer/timer.h"
-#include "content/public/browser/user_metrics.h"
-#include "ui/aura/root_window.h"
-#include "ui/compositor/layer_animation_sequence.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/views/corewm/compound_event_filter.h"
-
-#if defined(OS_CHROMEOS)
-#include "base/sys_info.h"
-#include "media/audio/sounds/sounds_manager.h"
-#endif
-
-#if defined(OS_CHROMEOS)
-using media::SoundsManager;
-#endif
-
-namespace ash {
-
-namespace {
-
-const int kMaxShutdownSoundDurationMs = 1500;
-
-aura::Window* GetBackground() {
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- return Shell::GetContainer(root_window,
- internal::kShellWindowId_DesktopBackgroundContainer);
-}
-
-bool IsBackgroundHidden() {
- return !GetBackground()->IsVisible();
-}
-
-void ShowBackground() {
- ui::ScopedLayerAnimationSettings settings(
- GetBackground()->layer()->GetAnimator());
- settings.SetTransitionDuration(base::TimeDelta());
- GetBackground()->Show();
-}
-
-void HideBackground() {
- ui::ScopedLayerAnimationSettings settings(
- GetBackground()->layer()->GetAnimator());
- settings.SetTransitionDuration(base::TimeDelta());
- GetBackground()->Hide();
-}
-
-// This observer is intended to use in cases when some action has to be taken
-// once some animation successfully completes (i.e. it was not aborted).
-// Observer will count a number of sequences it is attached to, and a number of
-// finished sequences (either Ended or Aborted). Once these two numbers are
-// equal, observer will delete itself, calling callback passed to constructor if
-// there were no aborted animations.
-// This way it can be either used to wait for some animation to be finished in
-// multiple layers, to wait once a sequence of animations is finished in one
-// layer or the mixture of both.
-class AnimationFinishedObserver : public ui::LayerAnimationObserver {
- public:
- explicit AnimationFinishedObserver(base::Closure &callback)
- : callback_(callback),
- sequences_attached_(0),
- sequences_completed_(0),
- paused_(false) {
- }
-
- // Pauses observer: no checks will be made while paused. It can be used when
- // a sequence has some immediate animations in the beginning, and for
- // animations that can be tested with flag that makes all animations
- // immediate.
- void Pause() {
- paused_ = true;
- }
-
- // Unpauses observer. It does a check and calls callback if conditions are
- // met.
- void Unpause() {
- if (!paused_)
- return;
- paused_ = false;
- if (sequences_completed_ == sequences_attached_) {
- callback_.Run();
- delete this;
- }
- }
-
- private:
- virtual ~AnimationFinishedObserver() {
- }
-
- // LayerAnimationObserver implementation
- virtual void OnLayerAnimationEnded(
- ui::LayerAnimationSequence* sequence) OVERRIDE {
- sequences_completed_++;
- if ((sequences_completed_ == sequences_attached_) && !paused_) {
- callback_.Run();
- delete this;
- }
- }
-
- virtual void OnLayerAnimationAborted(
- ui::LayerAnimationSequence* sequence) OVERRIDE {
- sequences_completed_++;
- if ((sequences_completed_ == sequences_attached_) && !paused_)
- delete this;
- }
-
- virtual void OnLayerAnimationScheduled(
- ui::LayerAnimationSequence* sequence) OVERRIDE {
- }
-
- virtual void OnAttachedToSequence(
- ui::LayerAnimationSequence* sequence) OVERRIDE {
- LayerAnimationObserver::OnAttachedToSequence(sequence);
- sequences_attached_++;
- }
-
- // Callback to be called.
- base::Closure callback_;
-
- // Number of sequences this observer was attached to.
- int sequences_attached_;
-
- // Number of sequences either ended or aborted.
- int sequences_completed_;
-
- bool paused_;
-
- DISALLOW_COPY_AND_ASSIGN(AnimationFinishedObserver);
-};
-
-} // namespace
-
-const int LockStateController::kLockTimeoutMs = 400;
-const int LockStateController::kShutdownTimeoutMs = 400;
-const int LockStateController::kLockFailTimeoutMs = 8000;
-const int LockStateController::kLockToShutdownTimeoutMs = 150;
-const int LockStateController::kShutdownRequestDelayMs = 50;
-
-LockStateController::TestApi::TestApi(LockStateController* controller)
- : controller_(controller) {
-}
-
-LockStateController::TestApi::~TestApi() {
-}
-
-LockStateController::LockStateController()
- : animator_(new internal::SessionStateAnimator()),
- login_status_(user::LOGGED_IN_NONE),
- system_is_locked_(false),
- shutting_down_(false),
- shutdown_after_lock_(false),
- animating_lock_(false),
- can_cancel_lock_animation_(false) {
- Shell::GetPrimaryRootWindow()->GetDispatcher()->AddRootWindowObserver(this);
-}
-
-LockStateController::~LockStateController() {
- Shell::GetPrimaryRootWindow()->GetDispatcher()->RemoveRootWindowObserver(
- this);
-}
-
-void LockStateController::SetDelegate(LockStateControllerDelegate* delegate) {
- delegate_.reset(delegate);
-}
-
-void LockStateController::AddObserver(LockStateObserver* observer) {
- observers_.AddObserver(observer);
-}
-
-void LockStateController::RemoveObserver(LockStateObserver* observer) {
- observers_.RemoveObserver(observer);
-}
-
-bool LockStateController::HasObserver(LockStateObserver* observer) {
- return observers_.HasObserver(observer);
-}
-
-void LockStateController::StartLockAnimation(
- bool shutdown_after_lock) {
- if (animating_lock_)
- return;
- shutdown_after_lock_ = shutdown_after_lock;
- can_cancel_lock_animation_ = true;
-
- StartCancellablePreLockAnimation();
-}
-
-void LockStateController::StartShutdownAnimation() {
- StartCancellableShutdownAnimation();
-}
-
-void LockStateController::StartLockAnimationAndLockImmediately() {
- if (animating_lock_)
- return;
- StartImmediatePreLockAnimation(true /* request_lock_on_completion */);
-}
-
-bool LockStateController::LockRequested() {
- return lock_fail_timer_.IsRunning();
-}
-
-bool LockStateController::ShutdownRequested() {
- return shutting_down_;
-}
-
-bool LockStateController::CanCancelLockAnimation() {
- return can_cancel_lock_animation_;
-}
-
-void LockStateController::CancelLockAnimation() {
- if (!CanCancelLockAnimation())
- return;
- shutdown_after_lock_ = false;
- animating_lock_ = false;
- CancelPreLockAnimation();
-}
-
-bool LockStateController::CanCancelShutdownAnimation() {
- return pre_shutdown_timer_.IsRunning() ||
- shutdown_after_lock_ ||
- lock_to_shutdown_timer_.IsRunning();
-}
-
-void LockStateController::CancelShutdownAnimation() {
- if (!CanCancelShutdownAnimation())
- return;
- if (lock_to_shutdown_timer_.IsRunning()) {
- lock_to_shutdown_timer_.Stop();
- return;
- }
- if (shutdown_after_lock_) {
- shutdown_after_lock_ = false;
- return;
- }
-
- animator_->StartGlobalAnimation(
- internal::SessionStateAnimator::ANIMATION_UNDO_GRAYSCALE_BRIGHTNESS,
- internal::SessionStateAnimator::ANIMATION_SPEED_REVERT_SHUTDOWN);
- pre_shutdown_timer_.Stop();
-}
-
-void LockStateController::OnStartingLock() {
- if (shutting_down_ || system_is_locked_)
- return;
- if (animating_lock_)
- return;
- StartImmediatePreLockAnimation(false /* request_lock_on_completion */);
-}
-
-void LockStateController::RequestShutdown() {
- if (shutting_down_)
- return;
-
- shutting_down_ = true;
-
- Shell* shell = ash::Shell::GetInstance();
- shell->cursor_manager()->HideCursor();
-
- animator_->StartGlobalAnimation(
- internal::SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS,
- internal::SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN);
- StartRealShutdownTimer(true);
-}
-
-void LockStateController::OnLockScreenHide(
- base::Callback<void(void)>& callback) {
- StartUnlockAnimationBeforeUIDestroyed(callback);
-}
-
-void LockStateController::SetLockScreenDisplayedCallback(
- const base::Closure& callback) {
- lock_screen_displayed_callback_ = callback;
-}
-
-void LockStateController::OnRootWindowHostCloseRequested(
- const aura::RootWindow*) {
- Shell::GetInstance()->delegate()->Exit();
-}
-
-void LockStateController::OnLoginStateChanged(
- user::LoginStatus status) {
- if (status != user::LOGGED_IN_LOCKED)
- login_status_ = status;
- system_is_locked_ = (status == user::LOGGED_IN_LOCKED);
-}
-
-void LockStateController::OnAppTerminating() {
- // If we hear that Chrome is exiting but didn't request it ourselves, all we
- // can really hope for is that we'll have time to clear the screen.
- // This is also the case when the user signs off.
- if (!shutting_down_) {
- shutting_down_ = true;
- Shell* shell = ash::Shell::GetInstance();
- shell->cursor_manager()->HideCursor();
- shell->cursor_manager()->LockCursor();
- animator_->StartAnimation(
- internal::SessionStateAnimator::kAllContainersMask,
- internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY,
- internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE);
- }
-}
-
-void LockStateController::OnLockStateChanged(bool locked) {
- if (shutting_down_ || (system_is_locked_ == locked))
- return;
-
- system_is_locked_ = locked;
-
- if (locked) {
- StartPostLockAnimation();
- lock_fail_timer_.Stop();
- } else {
- StartUnlockAnimationAfterUIDestroyed();
- }
-}
-
-void LockStateController::OnLockFailTimeout() {
- DCHECK(!system_is_locked_);
- // Undo lock animation.
- StartUnlockAnimationAfterUIDestroyed();
-}
-
-void LockStateController::StartLockToShutdownTimer() {
- shutdown_after_lock_ = false;
- lock_to_shutdown_timer_.Stop();
- lock_to_shutdown_timer_.Start(
- FROM_HERE,
- base::TimeDelta::FromMilliseconds(kLockToShutdownTimeoutMs),
- this, &LockStateController::OnLockToShutdownTimeout);
-}
-
-void LockStateController::OnLockToShutdownTimeout() {
- DCHECK(system_is_locked_);
- StartCancellableShutdownAnimation();
-}
-
-void LockStateController::StartPreShutdownAnimationTimer() {
- pre_shutdown_timer_.Stop();
- pre_shutdown_timer_.Start(
- FROM_HERE,
- animator_->
- GetDuration(internal::SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN),
- this,
- &LockStateController::OnPreShutdownAnimationTimeout);
-}
-
-void LockStateController::OnPreShutdownAnimationTimeout() {
- shutting_down_ = true;
-
- Shell* shell = ash::Shell::GetInstance();
- shell->cursor_manager()->HideCursor();
-
- StartRealShutdownTimer(false);
-}
-
-void LockStateController::StartRealShutdownTimer(bool with_animation_time) {
- base::TimeDelta duration =
- base::TimeDelta::FromMilliseconds(kShutdownRequestDelayMs);
- if (with_animation_time) {
- duration += animator_->GetDuration(
- internal::SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN);
- }
-
-#if defined(OS_CHROMEOS)
- const AccessibilityDelegate* const delegate =
- Shell::GetInstance()->accessibility_delegate();
- base::TimeDelta sound_duration = delegate->PlayShutdownSound();
- sound_duration =
- std::min(sound_duration,
- base::TimeDelta::FromMilliseconds(kMaxShutdownSoundDurationMs));
- duration = std::max(duration, sound_duration);
-#endif
-
- real_shutdown_timer_.Start(
- FROM_HERE, duration, this, &LockStateController::OnRealShutdownTimeout);
-}
-
-void LockStateController::OnRealShutdownTimeout() {
- DCHECK(shutting_down_);
-#if defined(OS_CHROMEOS)
- if (!base::SysInfo::IsRunningOnChromeOS()) {
- ShellDelegate* delegate = Shell::GetInstance()->delegate();
- if (delegate) {
- delegate->Exit();
- return;
- }
- }
-#endif
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- UMA_ACCEL_SHUT_DOWN_POWER_BUTTON);
- delegate_->RequestShutdown();
-}
-
-void LockStateController::StartCancellableShutdownAnimation() {
- Shell* shell = ash::Shell::GetInstance();
- // Hide cursor, but let it reappear if the mouse moves.
- shell->cursor_manager()->HideCursor();
-
- animator_->StartGlobalAnimation(
- internal::SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS,
- internal::SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN);
- StartPreShutdownAnimationTimer();
-}
-
-void LockStateController::StartImmediatePreLockAnimation(
- bool request_lock_on_completion) {
- animating_lock_ = true;
-
- StoreUnlockedProperties();
-
- base::Closure next_animation_starter =
- base::Bind(&LockStateController::PreLockAnimationFinished,
- base::Unretained(this), request_lock_on_completion);
- AnimationFinishedObserver* observer =
- new AnimationFinishedObserver(next_animation_starter);
-
- observer->Pause();
-
- animator_->StartAnimationWithObserver(
- internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS,
- internal::SessionStateAnimator::ANIMATION_LIFT,
- internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS,
- observer);
- animator_->StartAnimationWithObserver(
- internal::SessionStateAnimator::LAUNCHER,
- internal::SessionStateAnimator::ANIMATION_FADE_OUT,
- internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS,
- observer);
- // Hide the screen locker containers so we can raise them later.
- animator_->StartAnimation(
- internal::SessionStateAnimator::LOCK_SCREEN_CONTAINERS,
- internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY,
- internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE);
- AnimateBackgroundAppearanceIfNecessary(
- internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS,
- observer);
-
- observer->Unpause();
-
- DispatchCancelMode();
- FOR_EACH_OBSERVER(LockStateObserver, observers_,
- OnLockStateEvent(LockStateObserver::EVENT_LOCK_ANIMATION_STARTED));
-}
-
-void LockStateController::StartCancellablePreLockAnimation() {
- animating_lock_ = true;
- StoreUnlockedProperties();
-
- base::Closure next_animation_starter =
- base::Bind(&LockStateController::PreLockAnimationFinished,
- base::Unretained(this), true /* request_lock */);
- AnimationFinishedObserver* observer =
- new AnimationFinishedObserver(next_animation_starter);
-
- observer->Pause();
-
- animator_->StartAnimationWithObserver(
- internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS,
- internal::SessionStateAnimator::ANIMATION_LIFT,
- internal::SessionStateAnimator::ANIMATION_SPEED_UNDOABLE,
- observer);
- animator_->StartAnimationWithObserver(
- internal::SessionStateAnimator::LAUNCHER,
- internal::SessionStateAnimator::ANIMATION_FADE_OUT,
- internal::SessionStateAnimator::ANIMATION_SPEED_UNDOABLE,
- observer);
- // Hide the screen locker containers so we can raise them later.
- animator_->StartAnimation(
- internal::SessionStateAnimator::LOCK_SCREEN_CONTAINERS,
- internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY,
- internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE);
- AnimateBackgroundAppearanceIfNecessary(
- internal::SessionStateAnimator::ANIMATION_SPEED_UNDOABLE,
- observer);
-
- DispatchCancelMode();
- FOR_EACH_OBSERVER(LockStateObserver, observers_,
- OnLockStateEvent(LockStateObserver::EVENT_PRELOCK_ANIMATION_STARTED));
- observer->Unpause();
-}
-
-void LockStateController::CancelPreLockAnimation() {
- base::Closure next_animation_starter =
- base::Bind(&LockStateController::LockAnimationCancelled,
- base::Unretained(this));
- AnimationFinishedObserver* observer =
- new AnimationFinishedObserver(next_animation_starter);
-
- observer->Pause();
-
- animator_->StartAnimationWithObserver(
- internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS,
- internal::SessionStateAnimator::ANIMATION_UNDO_LIFT,
- internal::SessionStateAnimator::ANIMATION_SPEED_UNDO_MOVE_WINDOWS,
- observer);
- animator_->StartAnimationWithObserver(
- internal::SessionStateAnimator::LAUNCHER,
- internal::SessionStateAnimator::ANIMATION_FADE_IN,
- internal::SessionStateAnimator::ANIMATION_SPEED_UNDO_MOVE_WINDOWS,
- observer);
- AnimateBackgroundHidingIfNecessary(
- internal::SessionStateAnimator::ANIMATION_SPEED_UNDO_MOVE_WINDOWS,
- observer);
-
- observer->Unpause();
-}
-
-void LockStateController::StartPostLockAnimation() {
- base::Closure next_animation_starter =
- base::Bind(&LockStateController::PostLockAnimationFinished,
- base::Unretained(this));
-
- AnimationFinishedObserver* observer =
- new AnimationFinishedObserver(next_animation_starter);
-
- observer->Pause();
- animator_->StartAnimationWithObserver(
- internal::SessionStateAnimator::LOCK_SCREEN_CONTAINERS,
- internal::SessionStateAnimator::ANIMATION_RAISE_TO_SCREEN,
- internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS,
- observer);
- observer->Unpause();
-}
-
-void LockStateController::StartUnlockAnimationBeforeUIDestroyed(
- base::Closure& callback) {
- animator_->StartAnimationWithCallback(
- internal::SessionStateAnimator::LOCK_SCREEN_CONTAINERS,
- internal::SessionStateAnimator::ANIMATION_LIFT,
- internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS,
- callback);
-}
-
-void LockStateController::StartUnlockAnimationAfterUIDestroyed() {
- base::Closure next_animation_starter =
- base::Bind(&LockStateController::UnlockAnimationAfterUIDestroyedFinished,
- base::Unretained(this));
-
- AnimationFinishedObserver* observer =
- new AnimationFinishedObserver(next_animation_starter);
-
- observer->Pause();
-
- animator_->StartAnimationWithObserver(
- internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS,
- internal::SessionStateAnimator::ANIMATION_DROP,
- internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS,
- observer);
- animator_->StartAnimationWithObserver(
- internal::SessionStateAnimator::LAUNCHER,
- internal::SessionStateAnimator::ANIMATION_FADE_IN,
- internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS,
- observer);
- AnimateBackgroundHidingIfNecessary(
- internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS,
- observer);
- observer->Unpause();
-}
-
-void LockStateController::LockAnimationCancelled() {
- can_cancel_lock_animation_ = false;
- RestoreUnlockedProperties();
-}
-
-void LockStateController::PreLockAnimationFinished(bool request_lock) {
- can_cancel_lock_animation_ = false;
-
- if (request_lock) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- shutdown_after_lock_ ?
- UMA_ACCEL_LOCK_SCREEN_POWER_BUTTON :
- UMA_ACCEL_LOCK_SCREEN_LOCK_BUTTON);
- delegate_->RequestLockScreen();
- }
-
- lock_fail_timer_.Start(
- FROM_HERE,
- base::TimeDelta::FromMilliseconds(kLockFailTimeoutMs),
- this,
- &LockStateController::OnLockFailTimeout);
-}
-
-void LockStateController::PostLockAnimationFinished() {
- animating_lock_ = false;
-
- FOR_EACH_OBSERVER(LockStateObserver, observers_,
- OnLockStateEvent(LockStateObserver::EVENT_LOCK_ANIMATION_FINISHED));
- if (!lock_screen_displayed_callback_.is_null()) {
- lock_screen_displayed_callback_.Run();
- lock_screen_displayed_callback_.Reset();
- }
- if (shutdown_after_lock_) {
- shutdown_after_lock_ = false;
- StartLockToShutdownTimer();
- }
-}
-
-void LockStateController::UnlockAnimationAfterUIDestroyedFinished() {
- RestoreUnlockedProperties();
-}
-
-void LockStateController::StoreUnlockedProperties() {
- if (!unlocked_properties_) {
- unlocked_properties_.reset(new UnlockedStateProperties());
- unlocked_properties_->background_is_hidden = IsBackgroundHidden();
- }
- if (unlocked_properties_->background_is_hidden) {
- // Hide background so that it can be animated later.
- animator_->StartAnimation(
- internal::SessionStateAnimator::DESKTOP_BACKGROUND,
- internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY,
- internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE);
- ShowBackground();
- }
-}
-
-void LockStateController::RestoreUnlockedProperties() {
- if (!unlocked_properties_)
- return;
- if (unlocked_properties_->background_is_hidden) {
- HideBackground();
- // Restore background visibility.
- animator_->StartAnimation(
- internal::SessionStateAnimator::DESKTOP_BACKGROUND,
- internal::SessionStateAnimator::ANIMATION_FADE_IN,
- internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE);
- }
- unlocked_properties_.reset();
-}
-
-void LockStateController::AnimateBackgroundAppearanceIfNecessary(
- internal::SessionStateAnimator::AnimationSpeed speed,
- ui::LayerAnimationObserver* observer) {
- if (unlocked_properties_.get() &&
- unlocked_properties_->background_is_hidden) {
- animator_->StartAnimationWithObserver(
- internal::SessionStateAnimator::DESKTOP_BACKGROUND,
- internal::SessionStateAnimator::ANIMATION_FADE_IN,
- speed,
- observer);
- }
-}
-
-void LockStateController::AnimateBackgroundHidingIfNecessary(
- internal::SessionStateAnimator::AnimationSpeed speed,
- ui::LayerAnimationObserver* observer) {
- if (unlocked_properties_.get() &&
- unlocked_properties_->background_is_hidden) {
- animator_->StartAnimationWithObserver(
- internal::SessionStateAnimator::DESKTOP_BACKGROUND,
- internal::SessionStateAnimator::ANIMATION_FADE_OUT,
- speed,
- observer);
- }
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/lock_state_controller.h b/chromium/ash/wm/lock_state_controller.h
deleted file mode 100644
index c2e7a6aab60..00000000000
--- a/chromium/ash/wm/lock_state_controller.h
+++ /dev/null
@@ -1,328 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_LOCK_STATE_CONTROLLER_H_
-#define ASH_WM_LOCK_STATE_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "ash/shell_observer.h"
-#include "ash/wm/lock_state_observer.h"
-#include "ash/wm/session_state_animator.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/observer_list.h"
-#include "base/time/time.h"
-#include "base/timer/timer.h"
-#include "ui/aura/root_window_observer.h"
-
-namespace gfx {
-class Rect;
-class Size;
-}
-
-namespace ui {
-class Layer;
-}
-
-namespace ash {
-
-namespace test {
-class LockStateControllerTest;
-class PowerButtonControllerTest;
-}
-
-// Performs system-related functions on behalf of LockStateController.
-class ASH_EXPORT LockStateControllerDelegate {
- public:
- LockStateControllerDelegate() {}
- virtual ~LockStateControllerDelegate() {}
-
- virtual void RequestLockScreen() = 0;
- virtual void RequestShutdown() = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LockStateControllerDelegate);
-};
-
-// Displays onscreen animations and locks or suspends the system in response to
-// the power button being pressed or released.
-// Lock workflow:
-// Entry points:
-// * StartLockAnimation (bool shutdown after lock) - starts lock that can be
-// cancelled.
-// * StartLockAnimationAndLockImmediately - starts uninterruptible lock
-// animation.
-// This leads to call of either StartImmediatePreLockAnimation or
-// StartCancellablePreLockAnimation. Once they complete
-// PreLockAnimationFinished is called, and system lock is requested.
-// Once system locks and lock UI is created, OnLockStateChanged is called, and
-// StartPostLockAnimation is called. In PostLockAnimationFinished two
-// things happen : EVENT_LOCK_ANIMATION_FINISHED notification is sent (it
-// triggers third part of animation within lock UI), and check for continuing to
-// shutdown is made.
-//
-// Unlock workflow:
-// WebUI does first part of animation, and calls OnLockScreenHide(callback) that
-// triggers StartUnlockAnimationBeforeUIDestroyed(callback). Once callback is
-// called at the end of the animation, lock UI is deleted, system unlocks, and
-// OnLockStateChanged is called. It leads to
-// StartUnlockAnimationAfterUIDestroyed.
-class ASH_EXPORT LockStateController : public aura::RootWindowObserver,
- public ShellObserver {
- public:
- // Amount of time that the power button needs to be held before we lock the
- // screen.
- static const int kLockTimeoutMs;
-
- // Amount of time that the power button needs to be held before we shut down.
- static const int kShutdownTimeoutMs;
-
- // Amount of time to wait for our lock requests to be honored before giving
- // up.
- static const int kLockFailTimeoutMs;
-
- // When the button has been held continuously from the unlocked state, amount
- // of time that we wait after the screen locker window is shown before
- // starting the pre-shutdown animation.
- static const int kLockToShutdownTimeoutMs;
-
- // Additional time (beyond kFastCloseAnimMs) to wait after starting the
- // fast-close shutdown animation before actually requesting shutdown, to give
- // the animation time to finish.
- static const int kShutdownRequestDelayMs;
-
- // Helper class used by tests to access internal state.
- class ASH_EXPORT TestApi {
- public:
- explicit TestApi(LockStateController* controller);
-
- virtual ~TestApi();
-
- bool lock_fail_timer_is_running() const {
- return controller_->lock_fail_timer_.IsRunning();
- }
- bool lock_to_shutdown_timer_is_running() const {
- return controller_->lock_to_shutdown_timer_.IsRunning();
- }
- bool shutdown_timer_is_running() const {
- return controller_->pre_shutdown_timer_.IsRunning();
- }
- bool real_shutdown_timer_is_running() const {
- return controller_->real_shutdown_timer_.IsRunning();
- }
- bool is_animating_lock() const {
- return controller_->animating_lock_;
- }
- bool is_lock_cancellable() const {
- return controller_->CanCancelLockAnimation();
- }
-
- void trigger_lock_fail_timeout() {
- controller_->OnLockFailTimeout();
- controller_->lock_fail_timer_.Stop();
- }
- void trigger_lock_to_shutdown_timeout() {
- controller_->OnLockToShutdownTimeout();
- controller_->lock_to_shutdown_timer_.Stop();
- }
- void trigger_shutdown_timeout() {
- controller_->OnPreShutdownAnimationTimeout();
- controller_->pre_shutdown_timer_.Stop();
- }
- void trigger_real_shutdown_timeout() {
- controller_->OnRealShutdownTimeout();
- controller_->real_shutdown_timer_.Stop();
- }
- private:
- LockStateController* controller_; // not owned
-
- DISALLOW_COPY_AND_ASSIGN(TestApi);
- };
-
- LockStateController();
- virtual ~LockStateController();
-
- // Takes ownership of |delegate|.
- void SetDelegate(LockStateControllerDelegate* delegate);
-
- void AddObserver(LockStateObserver* observer);
- void RemoveObserver(LockStateObserver* observer);
- bool HasObserver(LockStateObserver* observer);
-
- // Starts locking (with slow animation) that can be cancelled.
- // After locking and |kLockToShutdownTimeoutMs| StartShutdownAnimation()
- // will be called unless CancelShutdownAnimation() is called, if
- // |shutdown_after_lock| is true.
- void StartLockAnimation(bool shutdown_after_lock);
-
- // Starts shutting down (with slow animation) that can be cancelled.
- void StartShutdownAnimation();
-
- // Starts usual lock animation, but locks immediately.
- // Unlike StartLockAnimation it does no lead to StartShutdownAnimation.
- void StartLockAnimationAndLockImmediately();
-
- // Returns true if we have requested system to lock, but haven't received
- // confirmation yet.
- bool LockRequested();
-
- // Returns true if we are shutting down.
- bool ShutdownRequested();
-
- // Returns true if we are within cancellable lock timeframe.
- bool CanCancelLockAnimation();
-
- // Cancels locking and reverts lock animation.
- void CancelLockAnimation();
-
- // Returns true if we are within cancellable shutdown timeframe.
- bool CanCancelShutdownAnimation();
-
- // Cancels shutting down and reverts shutdown animation.
- void CancelShutdownAnimation();
-
- // Called when Chrome gets a request to display the lock screen.
- void OnStartingLock();
-
- // Displays the shutdown animation and requests shutdown when it's done.
- void RequestShutdown();
-
- // Called when ScreenLocker is ready to close, but not yet destroyed.
- // Can be used to display "hiding" animations on unlock.
- // |callback| will be called when all animations are done.
- void OnLockScreenHide(base::Closure& callback);
-
- // Sets up the callback that should be called once lock animation is finished.
- // Callback is guaranteed to be called once and then discarded.
- void SetLockScreenDisplayedCallback(const base::Closure& callback);
-
- // RootWindowObserver override:
- virtual void OnRootWindowHostCloseRequested(
- const aura::RootWindow* root) OVERRIDE;
-
- // ShellObserver overrides:
- virtual void OnLoginStateChanged(user::LoginStatus status) OVERRIDE;
- virtual void OnAppTerminating() OVERRIDE;
- virtual void OnLockStateChanged(bool locked) OVERRIDE;
-
- private:
- friend class test::PowerButtonControllerTest;
- friend class test::LockStateControllerTest;
-
- struct UnlockedStateProperties {
- bool background_is_hidden;
- };
-
- // Reverts the pre-lock animation, reports the error.
- void OnLockFailTimeout();
-
- // Starts timer for gap between lock and shutdown.
- void StartLockToShutdownTimer();
-
- // Calls StartShutdownAnimation().
- void OnLockToShutdownTimeout();
-
- // Starts timer for undoable shutdown animation.
- void StartPreShutdownAnimationTimer();
-
- // Calls StartRealShutdownTimer().
- void OnPreShutdownAnimationTimeout();
-
- // Starts timer for final shutdown animation.
- // If |with_animation_time| is true, it will also include time of "fade to
- // white" shutdown animation.
- void StartRealShutdownTimer(bool with_animation_time);
-
- // Requests that the machine be shut down.
- void OnRealShutdownTimeout();
-
- // Starts shutdown animation that can be cancelled and starts pre-shutdown
- // timer.
- void StartCancellableShutdownAnimation();
-
- // If |request_lock_on_completion| is true, a lock request will be sent
- // after the pre-lock animation completes. (The pre-lock animation is
- // also displayed in response to already-in-progress lock requests; in
- // these cases an additional lock request is undesirable.)
- void StartImmediatePreLockAnimation(bool request_lock_on_completion);
- void StartCancellablePreLockAnimation();
- void CancelPreLockAnimation();
- void StartPostLockAnimation();
- // This method calls |callback| when animation completes.
- void StartUnlockAnimationBeforeUIDestroyed(base::Closure &callback);
- void StartUnlockAnimationAfterUIDestroyed();
-
- // These methods are called when corresponding animation completes.
- void LockAnimationCancelled();
- void PreLockAnimationFinished(bool request_lock);
- void PostLockAnimationFinished();
- void UnlockAnimationAfterUIDestroyedFinished();
-
- // Stores properties of UI that have to be temporarily modified while locking.
- void StoreUnlockedProperties();
- void RestoreUnlockedProperties();
-
- // Fades in background layer with |speed| if it was hidden in unlocked state.
- void AnimateBackgroundAppearanceIfNecessary(
- ash::internal::SessionStateAnimator::AnimationSpeed speed,
- ui::LayerAnimationObserver* observer);
-
- // Fades out background layer with |speed| if it was hidden in unlocked state.
- void AnimateBackgroundHidingIfNecessary(
- ash::internal::SessionStateAnimator::AnimationSpeed speed,
- ui::LayerAnimationObserver* observer);
-
- scoped_ptr<internal::SessionStateAnimator> animator_;
-
- scoped_ptr<LockStateControllerDelegate> delegate_;
-
- ObserverList<LockStateObserver> observers_;
-
- // The current login status, or original login status from before we locked.
- user::LoginStatus login_status_;
-
- // Current lock status.
- bool system_is_locked_;
-
- // Are we in the process of shutting the machine down?
- bool shutting_down_;
-
- // Indicates whether controller should proceed to (cancellable) shutdown after
- // locking.
- bool shutdown_after_lock_;
-
- // Indicates that controller displays lock animation.
- bool animating_lock_;
-
- // Indicates that lock animation can be undone.
- bool can_cancel_lock_animation_;
-
- scoped_ptr<UnlockedStateProperties> unlocked_properties_;
-
- // Started when we request that the screen be locked. When it fires, we
- // assume that our request got dropped.
- base::OneShotTimer<LockStateController> lock_fail_timer_;
-
- // Started when the screen is locked while the power button is held. Adds a
- // delay between the appearance of the lock screen and the beginning of the
- // pre-shutdown animation.
- base::OneShotTimer<LockStateController> lock_to_shutdown_timer_;
-
- // Started when we begin displaying the pre-shutdown animation. When it
- // fires, we start the shutdown animation and get ready to request shutdown.
- base::OneShotTimer<LockStateController> pre_shutdown_timer_;
-
- // Started when we display the shutdown animation. When it fires, we actually
- // request shutdown. Gives the animation time to complete before Chrome, X,
- // etc. are shut down.
- base::OneShotTimer<LockStateController> real_shutdown_timer_;
-
- base::Closure lock_screen_displayed_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(LockStateController);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_LOCK_STATE_CONTROLLER_H_
diff --git a/chromium/ash/wm/lock_state_controller_unittest.cc b/chromium/ash/wm/lock_state_controller_unittest.cc
deleted file mode 100644
index 5290457d212..00000000000
--- a/chromium/ash/wm/lock_state_controller_unittest.cc
+++ /dev/null
@@ -1,1056 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/lock_state_controller.h"
-
-#include "ash/ash_switches.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/test_shell_delegate.h"
-#include "ash/wm/power_button_controller.h"
-#include "ash/wm/session_state_animator.h"
-#include "base/command_line.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/time/time.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/compositor/layer_animator.h"
-#include "ui/compositor/scoped_animation_duration_scale_mode.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/size.h"
-
-#if defined(OS_WIN)
-#include "base/win/windows_version.h"
-#endif
-
-namespace ash {
-
-using internal::SessionStateAnimator;
-
-namespace test {
-
-namespace {
-
-bool cursor_visible() {
- return ash::Shell::GetInstance()->cursor_manager()->IsCursorVisible();
-}
-
-void CheckCalledCallback(bool* flag) {
- if (flag)
- (*flag) = true;
-}
-
-aura::Window* GetContainer(int container ) {
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- return Shell::GetContainer(root_window, container);
-}
-
-bool IsBackgroundHidden() {
- return !GetContainer(internal::kShellWindowId_DesktopBackgroundContainer)->
- IsVisible();
-}
-
-void HideBackground() {
- ui::ScopedLayerAnimationSettings settings(
- GetContainer(internal::kShellWindowId_DesktopBackgroundContainer)->
- layer()->GetAnimator());
- settings.SetTransitionDuration(base::TimeDelta());
- GetContainer(internal::kShellWindowId_DesktopBackgroundContainer)->Hide();
-}
-
-} // namespace
-
-// Fake implementation of PowerButtonControllerDelegate that just logs requests
-// to lock the screen and shut down the device.
-class TestLockStateControllerDelegate : public LockStateControllerDelegate {
- public:
- TestLockStateControllerDelegate()
- : num_lock_requests_(0),
- num_shutdown_requests_(0) {}
-
- int num_lock_requests() const { return num_lock_requests_; }
- int num_shutdown_requests() const { return num_shutdown_requests_; }
-
- // LockStateControllerDelegate implementation.
- virtual void RequestLockScreen() OVERRIDE {
- num_lock_requests_++;
- }
- virtual void RequestShutdown() OVERRIDE {
- num_shutdown_requests_++;
- }
-
- private:
- int num_lock_requests_;
- int num_shutdown_requests_;
-
- DISALLOW_COPY_AND_ASSIGN(TestLockStateControllerDelegate);
-};
-
-class LockStateControllerTest : public AshTestBase {
- public:
- LockStateControllerTest() : controller_(NULL), delegate_(NULL) {}
- virtual ~LockStateControllerTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
-
- // We would control animations in a fine way:
- animation_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode(
- ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION));
- // TODO(antrim) : restore
- // animator_helper_ = ui::test::CreateLayerAnimatorHelperForTest();
-
- // Temporary disable animations so that observer is always called, and
- // no leaks happen during tests.
- animation_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode(
- ui::ScopedAnimationDurationScaleMode::ZERO_DURATION));
- // TODO(antrim): once there is a way to mock time and run animations, make
- // sure that animations are finished even in simple tests.
-
- delegate_ = new TestLockStateControllerDelegate;
- controller_ = Shell::GetInstance()->power_button_controller();
- lock_state_controller_ = static_cast<LockStateController*>(
- Shell::GetInstance()->lock_state_controller());
- lock_state_controller_->SetDelegate(delegate_); // transfers ownership
- test_api_.reset(new LockStateController::TestApi(lock_state_controller_));
- animator_api_.reset(
- new SessionStateAnimator::TestApi(lock_state_controller_->
- animator_.get()));
- shell_delegate_ = reinterpret_cast<TestShellDelegate*>(
- ash::Shell::GetInstance()->delegate());
- session_state_delegate_ = Shell::GetInstance()->session_state_delegate();
- }
-
- virtual void TearDown() {
- // TODO(antrim) : restore
- // animator_helper_->AdvanceUntilDone();
- AshTestBase::TearDown();
- }
-
- protected:
- void GenerateMouseMoveEvent() {
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow());
- generator.MoveMouseTo(10, 10);
- }
-
- int NumShutdownRequests() {
- return delegate_->num_shutdown_requests() +
- shell_delegate_->num_exit_requests();
- }
-
- void Advance(SessionStateAnimator::AnimationSpeed speed) {
- // TODO (antrim) : restore
- // animator_helper_->Advance(SessionStateAnimator::GetDuration(speed));
- }
-
- void AdvancePartially(SessionStateAnimator::AnimationSpeed speed,
- float factor) {
-// TODO (antrim) : restore
-// base::TimeDelta duration = SessionStateAnimator::GetDuration(speed);
-// base::TimeDelta partial_duration =
-// base::TimeDelta::FromInternalValue(duration.ToInternalValue() * factor);
-// animator_helper_->Advance(partial_duration);
- }
-
- void ExpectPreLockAnimationStarted() {
- //TODO (antrim) : restore EXPECT_TRUE(animator_helper_->IsAnimating());
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS,
- SessionStateAnimator::ANIMATION_LIFT));
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::LAUNCHER,
- SessionStateAnimator::ANIMATION_FADE_OUT));
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::LOCK_SCREEN_CONTAINERS,
- SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY));
- EXPECT_TRUE(test_api_->is_animating_lock());
- }
-
- void ExpectPreLockAnimationCancel() {
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS,
- SessionStateAnimator::ANIMATION_DROP));
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::LAUNCHER,
- SessionStateAnimator::ANIMATION_FADE_IN));
- }
-
- void ExpectPreLockAnimationFinished() {
- //TODO (antrim) : restore EXPECT_FALSE(animator_helper_->IsAnimating());
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS,
- SessionStateAnimator::ANIMATION_LIFT));
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::LAUNCHER,
- SessionStateAnimator::ANIMATION_FADE_OUT));
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::LOCK_SCREEN_CONTAINERS,
- SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY));
- }
-
- void ExpectPostLockAnimationStarted() {
- //TODO (antrim) : restore EXPECT_TRUE(animator_helper_->IsAnimating());
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::LOCK_SCREEN_CONTAINERS,
- SessionStateAnimator::ANIMATION_RAISE_TO_SCREEN));
- }
-
- void ExpectPastLockAnimationFinished() {
- //TODO (antrim) : restore EXPECT_FALSE(animator_helper_->IsAnimating());
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::LOCK_SCREEN_CONTAINERS,
- SessionStateAnimator::ANIMATION_RAISE_TO_SCREEN));
- }
-
- void ExpectUnlockBeforeUIDestroyedAnimationStarted() {
- //TODO (antrim) : restore EXPECT_TRUE(animator_helper_->IsAnimating());
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::LOCK_SCREEN_CONTAINERS,
- SessionStateAnimator::ANIMATION_LIFT));
- }
-
- void ExpectUnlockBeforeUIDestroyedAnimationFinished() {
- //TODO (antrim) : restore EXPECT_FALSE(animator_helper_->IsAnimating());
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::LOCK_SCREEN_CONTAINERS,
- SessionStateAnimator::ANIMATION_LIFT));
- }
-
- void ExpectUnlockAfterUIDestroyedAnimationStarted() {
- //TODO (antrim) : restore EXPECT_TRUE(animator_helper_->IsAnimating());
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS,
- SessionStateAnimator::ANIMATION_DROP));
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::LAUNCHER,
- SessionStateAnimator::ANIMATION_FADE_IN));
- }
-
- void ExpectUnlockAfterUIDestroyedAnimationFinished() {
- //TODO (antrim) : restore EXPECT_FALSE(animator_helper_->IsAnimating());
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS,
- SessionStateAnimator::ANIMATION_DROP));
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::LAUNCHER,
- SessionStateAnimator::ANIMATION_FADE_IN));
- }
-
- void ExpectShutdownAnimationStarted() {
- //TODO (antrim) : restore EXPECT_TRUE(animator_helper_->IsAnimating());
- EXPECT_TRUE(
- animator_api_->RootWindowIsAnimated(
- SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS));
- }
-
- void ExpectShutdownAnimationFinished() {
- //TODO (antrim) : restore EXPECT_FALSE(animator_helper_->IsAnimating());
- EXPECT_TRUE(
- animator_api_->RootWindowIsAnimated(
- SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS));
- }
-
- void ExpectShutdownAnimationCancel() {
- //TODO (antrim) : restore EXPECT_TRUE(animator_helper_->IsAnimating());
- EXPECT_TRUE(
- animator_api_->RootWindowIsAnimated(
- SessionStateAnimator::ANIMATION_UNDO_GRAYSCALE_BRIGHTNESS));
- }
-
- void ExpectBackgroundIsShowing() {
- //TODO (antrim) : restore EXPECT_TRUE(animator_helper_->IsAnimating());
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::DESKTOP_BACKGROUND,
- SessionStateAnimator::ANIMATION_FADE_IN));
- }
-
- void ExpectBackgroundIsHiding() {
- //TODO (antrim) : restore EXPECT_TRUE(animator_helper_->IsAnimating());
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::DESKTOP_BACKGROUND,
- SessionStateAnimator::ANIMATION_FADE_OUT));
- }
-
- void ExpectUnlockedState() {
- //TODO (antrim) : restore EXPECT_FALSE(animator_helper_->IsAnimating());
- EXPECT_FALSE(session_state_delegate_->IsScreenLocked());
-
- aura::Window::Windows containers;
-
- SessionStateAnimator::GetContainers(
- SessionStateAnimator::LAUNCHER |
- SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS,
- &containers);
- for (aura::Window::Windows::const_iterator it = containers.begin();
- it != containers.end(); ++it) {
- aura::Window* window = *it;
- ui::Layer* layer = window->layer();
- EXPECT_EQ(1.0f, layer->opacity());
- EXPECT_EQ(0.0f, layer->layer_brightness());
- EXPECT_EQ(0.0f, layer->layer_saturation());
- EXPECT_EQ(gfx::Transform(), layer->transform());
- }
- }
-
- void ExpectLockedState() {
- //TODO (antrim) : restore EXPECT_FALSE(animator_helper_->IsAnimating());
- EXPECT_TRUE(session_state_delegate_->IsScreenLocked());
-
- aura::Window::Windows containers;
-
- SessionStateAnimator::GetContainers(
- SessionStateAnimator::LOCK_SCREEN_RELATED_CONTAINERS |
- SessionStateAnimator::LOCK_SCREEN_CONTAINERS,
- &containers);
- for (aura::Window::Windows::const_iterator it = containers.begin();
- it != containers.end(); ++it) {
- aura::Window* window = *it;
- ui::Layer* layer = window->layer();
- EXPECT_EQ(1.0f, layer->opacity());
- EXPECT_EQ(0.0f, layer->layer_brightness());
- EXPECT_EQ(0.0f, layer->layer_saturation());
- EXPECT_EQ(gfx::Transform(), layer->transform());
- }
- }
-
- void PressPowerButton() {
- controller_->OnPowerButtonEvent(true, base::TimeTicks::Now());
- //TODO (antrim) : restore animator_helper_->Advance(base::TimeDelta());
- }
-
- void ReleasePowerButton() {
- controller_->OnPowerButtonEvent(false, base::TimeTicks::Now());
- //TODO (antrim) : restore animator_helper_->Advance(base::TimeDelta());
- }
-
- void PressLockButton() {
- controller_->OnLockButtonEvent(true, base::TimeTicks::Now());
- }
-
- void ReleaseLockButton() {
- controller_->OnLockButtonEvent(false, base::TimeTicks::Now());
- }
-
- void SystemLocks() {
- lock_state_controller_->OnLockStateChanged(true);
- session_state_delegate_->LockScreen();
- //TODO (antrim) : restore animator_helper_->Advance(base::TimeDelta());
- }
-
- void SuccessfulAuthentication(bool* call_flag) {
- base::Closure closure = base::Bind(&CheckCalledCallback, call_flag);
- lock_state_controller_->OnLockScreenHide(closure);
- //TODO (antrim) : restore animator_helper_->Advance(base::TimeDelta());
- }
-
- void SystemUnlocks() {
- lock_state_controller_->OnLockStateChanged(false);
- session_state_delegate_->UnlockScreen();
- //TODO (antrim) : restore animator_helper_->Advance(base::TimeDelta());
- }
-
- void Initialize(bool legacy_button, user::LoginStatus status) {
- controller_->set_has_legacy_power_button_for_test(legacy_button);
- lock_state_controller_->OnLoginStateChanged(status);
- SetUserLoggedIn(status != user::LOGGED_IN_NONE);
- if (status == user::LOGGED_IN_GUEST)
- SetCanLockScreen(false);
- lock_state_controller_->OnLockStateChanged(false);
- }
-
- PowerButtonController* controller_; // not owned
- LockStateController* lock_state_controller_; // not owned
- TestLockStateControllerDelegate* delegate_; // not owned
- TestShellDelegate* shell_delegate_; // not owned
- SessionStateDelegate* session_state_delegate_; // not owned
-
- scoped_ptr<ui::ScopedAnimationDurationScaleMode> animation_duration_mode_;
- scoped_ptr<LockStateController::TestApi> test_api_;
- scoped_ptr<SessionStateAnimator::TestApi> animator_api_;
- // TODO(antrim) : restore
-// scoped_ptr<ui::test::AnimationContainerTestHelper> animator_helper_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LockStateControllerTest);
-};
-
-// Test the lock-to-shutdown flow for non-Chrome-OS hardware that doesn't
-// correctly report power button releases. We should lock immediately the first
-// time the button is pressed and shut down when it's pressed from the locked
-// state.
-// TODO(antrim): Reenable this: http://crbug.com/167048
-TEST_F(LockStateControllerTest, DISABLED_LegacyLockAndShutDown) {
- Initialize(true, user::LOGGED_IN_USER);
-
- ExpectUnlockedState();
-
- // We should request that the screen be locked immediately after seeing the
- // power button get pressed.
- PressPowerButton();
-
- ExpectPreLockAnimationStarted();
-
- EXPECT_FALSE(test_api_->is_lock_cancellable());
-
- Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
-
- ExpectPreLockAnimationFinished();
- EXPECT_EQ(1, delegate_->num_lock_requests());
-
- // Notify that we locked successfully.
- lock_state_controller_->OnStartingLock();
- // We had that animation already.
- //TODO (antrim) : restore
- // EXPECT_FALSE(animator_helper_->IsAnimating());
-
- SystemLocks();
-
- ExpectPostLockAnimationStarted();
- Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
- ExpectPastLockAnimationFinished();
-
- // We shouldn't progress towards the shutdown state, however.
- EXPECT_FALSE(test_api_->lock_to_shutdown_timer_is_running());
- EXPECT_FALSE(test_api_->shutdown_timer_is_running());
-
- ReleasePowerButton();
-
- // Hold the button again and check that we start shutting down.
- PressPowerButton();
-
- ExpectShutdownAnimationStarted();
-
- EXPECT_EQ(0, NumShutdownRequests());
- // Make sure a mouse move event won't show the cursor.
- GenerateMouseMoveEvent();
- EXPECT_FALSE(cursor_visible());
-
- EXPECT_TRUE(test_api_->real_shutdown_timer_is_running());
- test_api_->trigger_real_shutdown_timeout();
- EXPECT_EQ(1, NumShutdownRequests());
-}
-
-// Test that we start shutting down immediately if the power button is pressed
-// while we're not logged in on an unofficial system.
-TEST_F(LockStateControllerTest, LegacyNotLoggedIn) {
- Initialize(true, user::LOGGED_IN_NONE);
-
- PressPowerButton();
- ExpectShutdownAnimationStarted();
-
- EXPECT_TRUE(test_api_->real_shutdown_timer_is_running());
-}
-
-// Test that we start shutting down immediately if the power button is pressed
-// while we're logged in as a guest on an unofficial system.
-TEST_F(LockStateControllerTest, LegacyGuest) {
- Initialize(true, user::LOGGED_IN_GUEST);
-
- PressPowerButton();
- ExpectShutdownAnimationStarted();
-
- EXPECT_TRUE(test_api_->real_shutdown_timer_is_running());
-}
-
-// When we hold the power button while the user isn't logged in, we should shut
-// down the machine directly.
-TEST_F(LockStateControllerTest, ShutdownWhenNotLoggedIn) {
- Initialize(false, user::LOGGED_IN_NONE);
-
- // Press the power button and check that we start the shutdown timer.
- PressPowerButton();
- EXPECT_FALSE(test_api_->is_animating_lock());
- EXPECT_TRUE(test_api_->shutdown_timer_is_running());
- ExpectShutdownAnimationStarted();
-
- AdvancePartially(SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN, 0.5f);
-
- // Release the power button before the shutdown timer fires.
- ReleasePowerButton();
-
- EXPECT_FALSE(test_api_->shutdown_timer_is_running());
- ExpectShutdownAnimationCancel();
-
- AdvancePartially(SessionStateAnimator::ANIMATION_SPEED_REVERT, 0.5f);
-
- // Press the button again and make the shutdown timeout fire this time.
- // Check that we start the timer for actually requesting the shutdown.
- PressPowerButton();
-
- EXPECT_TRUE(test_api_->shutdown_timer_is_running());
-
- Advance(SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN);
- ExpectShutdownAnimationFinished();
- test_api_->trigger_shutdown_timeout();
-
- EXPECT_TRUE(test_api_->real_shutdown_timer_is_running());
- EXPECT_EQ(0, NumShutdownRequests());
-
- // When the timout fires, we should request a shutdown.
- test_api_->trigger_real_shutdown_timeout();
-
- EXPECT_EQ(1, NumShutdownRequests());
-}
-
-// Test that we lock the screen and deal with unlocking correctly.
-// TODO(antrim): Reenable this: http://crbug.com/167048
-TEST_F(LockStateControllerTest, DISABLED_LockAndUnlock) {
- Initialize(false, user::LOGGED_IN_USER);
-
- ExpectUnlockedState();
-
- // Press the power button and check that the lock timer is started and that we
- // start lifting the non-screen-locker containers.
- PressPowerButton();
-
- ExpectPreLockAnimationStarted();
- EXPECT_TRUE(test_api_->is_lock_cancellable());
- EXPECT_EQ(0, delegate_->num_lock_requests());
-
- Advance(SessionStateAnimator::ANIMATION_SPEED_UNDOABLE);
- ExpectPreLockAnimationFinished();
-
- EXPECT_EQ(1, delegate_->num_lock_requests());
-
- // Notify that we locked successfully.
- lock_state_controller_->OnStartingLock();
- // We had that animation already.
- //TODO (antrim) : restore EXPECT_FALSE(animator_helper_->IsAnimating());
-
- SystemLocks();
-
- ExpectPostLockAnimationStarted();
- Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
- ExpectPastLockAnimationFinished();
-
- // When we release the power button, the lock-to-shutdown timer should be
- // stopped.
- ExpectLockedState();
- EXPECT_TRUE(test_api_->lock_to_shutdown_timer_is_running());
- ReleasePowerButton();
- ExpectLockedState();
- EXPECT_FALSE(test_api_->lock_to_shutdown_timer_is_running());
-
- // Notify that the screen has been unlocked. We should show the
- // non-screen-locker windows.
- bool called = false;
- SuccessfulAuthentication(&called);
-
- ExpectUnlockBeforeUIDestroyedAnimationStarted();
- EXPECT_FALSE(called);
- Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
- ExpectUnlockBeforeUIDestroyedAnimationFinished();
-
- EXPECT_TRUE(called);
-
- SystemUnlocks();
-
- ExpectUnlockAfterUIDestroyedAnimationStarted();
- Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
- ExpectUnlockAfterUIDestroyedAnimationFinished();
-
- ExpectUnlockedState();
-}
-
-// Test that we deal with cancelling lock correctly.
-// TODO(antrim): Reenable this: http://crbug.com/167048
-TEST_F(LockStateControllerTest, DISABLED_LockAndCancel) {
- Initialize(false, user::LOGGED_IN_USER);
-
- ExpectUnlockedState();
-
- // Press the power button and check that the lock timer is started and that we
- // start lifting the non-screen-locker containers.
- PressPowerButton();
-
- ExpectPreLockAnimationStarted();
- EXPECT_TRUE(test_api_->is_lock_cancellable());
-
- // forward only half way through
- AdvancePartially(SessionStateAnimator::ANIMATION_SPEED_UNDOABLE, 0.5f);
-
- gfx::Transform transform_before_button_released =
- GetContainer(internal::kShellWindowId_DefaultContainer)->
- layer()->transform();
-
- // Release the button before the lock timer fires.
- ReleasePowerButton();
-
- ExpectPreLockAnimationCancel();
-
- gfx::Transform transform_after_button_released =
- GetContainer(internal::kShellWindowId_DefaultContainer)->
- layer()->transform();
- // Expect no flickering, animation should proceed from mid-state.
- EXPECT_EQ(transform_before_button_released, transform_after_button_released);
-
- Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
- ExpectUnlockedState();
- EXPECT_EQ(0, delegate_->num_lock_requests());
-}
-
-// Test that we deal with cancelling lock correctly.
-// TODO(antrim): Reenable this: http://crbug.com/167048
-TEST_F(LockStateControllerTest,
- DISABLED_LockAndCancelAndLockAgain) {
- Initialize(false, user::LOGGED_IN_USER);
-
- ExpectUnlockedState();
-
- // Press the power button and check that the lock timer is started and that we
- // start lifting the non-screen-locker containers.
- PressPowerButton();
-
- ExpectPreLockAnimationStarted();
- EXPECT_TRUE(test_api_->is_lock_cancellable());
-
- // forward only half way through
- AdvancePartially(SessionStateAnimator::ANIMATION_SPEED_UNDOABLE, 0.5f);
-
- // Release the button before the lock timer fires.
- ReleasePowerButton();
- ExpectPreLockAnimationCancel();
-
- AdvancePartially(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, 0.5f);
-
- PressPowerButton();
- ExpectPreLockAnimationStarted();
- EXPECT_TRUE(test_api_->is_lock_cancellable());
-
- AdvancePartially(SessionStateAnimator::ANIMATION_SPEED_UNDOABLE, 0.6f);
-
- EXPECT_EQ(0, delegate_->num_lock_requests());
- ExpectPreLockAnimationStarted();
-
- AdvancePartially(SessionStateAnimator::ANIMATION_SPEED_UNDOABLE, 0.6f);
- ExpectPreLockAnimationFinished();
- EXPECT_EQ(1, delegate_->num_lock_requests());
-}
-
-// Hold the power button down from the unlocked state to eventual shutdown.
-// TODO(antrim): Reenable this: http://crbug.com/167048
-TEST_F(LockStateControllerTest, DISABLED_LockToShutdown) {
- Initialize(false, user::LOGGED_IN_USER);
-
- // Hold the power button and lock the screen.
- PressPowerButton();
- EXPECT_TRUE(test_api_->is_animating_lock());
-
- Advance(SessionStateAnimator::ANIMATION_SPEED_UNDOABLE);
- SystemLocks();
- Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
-
- // When the lock-to-shutdown timeout fires, we should start the shutdown
- // timer.
- EXPECT_TRUE(test_api_->lock_to_shutdown_timer_is_running());
-
- test_api_->trigger_lock_to_shutdown_timeout();
-
- ExpectShutdownAnimationStarted();
- EXPECT_TRUE(test_api_->shutdown_timer_is_running());
-
- // Fire the shutdown timeout and check that we request shutdown.
- Advance(SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN);
- ExpectShutdownAnimationFinished();
- test_api_->trigger_shutdown_timeout();
-
- EXPECT_TRUE(test_api_->real_shutdown_timer_is_running());
- EXPECT_EQ(0, NumShutdownRequests());
- test_api_->trigger_real_shutdown_timeout();
- EXPECT_EQ(1, NumShutdownRequests());
-}
-
-// Hold the power button down from the unlocked state to eventual shutdown,
-// then release the button while system does locking.
-TEST_F(LockStateControllerTest, CancelLockToShutdown) {
- Initialize(false, user::LOGGED_IN_USER);
-
- PressPowerButton();
-
- // Hold the power button and lock the screen.
- EXPECT_TRUE(test_api_->is_animating_lock());
-
- Advance(SessionStateAnimator::ANIMATION_SPEED_UNDOABLE);
- SystemLocks();
- AdvancePartially(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, 0.5f);
-
- // Power button is released while system attempts to lock.
- ReleasePowerButton();
-
- Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
-
- EXPECT_FALSE(lock_state_controller_->ShutdownRequested());
- EXPECT_FALSE(test_api_->lock_to_shutdown_timer_is_running());
- EXPECT_FALSE(test_api_->shutdown_timer_is_running());
-}
-
-// Test that we handle the case where lock requests are ignored.
-// TODO(antrim): Reenable this: http://crbug.com/167048
-TEST_F(LockStateControllerTest, DISABLED_Lock) {
- // We require animations to have a duration for this test.
- ui::ScopedAnimationDurationScaleMode normal_duration_mode(
- ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
-
- Initialize(false, user::LOGGED_IN_USER);
-
- // Hold the power button and lock the screen.
- PressPowerButton();
- ExpectPreLockAnimationStarted();
-
- Advance(SessionStateAnimator::ANIMATION_SPEED_UNDOABLE);
-
- EXPECT_EQ(1, delegate_->num_lock_requests());
- EXPECT_TRUE(test_api_->lock_fail_timer_is_running());
- // We shouldn't start the lock-to-shutdown timer until the screen has actually
- // been locked and this was animated.
- EXPECT_FALSE(test_api_->lock_to_shutdown_timer_is_running());
-
- // Act as if the request timed out. We should restore the windows.
- test_api_->trigger_lock_fail_timeout();
-
- ExpectUnlockAfterUIDestroyedAnimationStarted();
- Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
- ExpectUnlockAfterUIDestroyedAnimationFinished();
- ExpectUnlockedState();
-}
-
-// Test the basic operation of the lock button (not logged in).
-TEST_F(LockStateControllerTest, LockButtonBasicNotLoggedIn) {
- // The lock button shouldn't do anything if we aren't logged in.
- Initialize(false, user::LOGGED_IN_NONE);
-
- PressLockButton();
- EXPECT_FALSE(test_api_->is_animating_lock());
- ReleaseLockButton();
- EXPECT_EQ(0, delegate_->num_lock_requests());
-}
-
-// Test the basic operation of the lock button (guest).
-TEST_F(LockStateControllerTest, LockButtonBasicGuest) {
- // The lock button shouldn't do anything when we're logged in as a guest.
- Initialize(false, user::LOGGED_IN_GUEST);
-
- PressLockButton();
- EXPECT_FALSE(test_api_->is_animating_lock());
- ReleaseLockButton();
- EXPECT_EQ(0, delegate_->num_lock_requests());
-}
-
-// Test the basic operation of the lock button.
-// TODO(antrim): Reenable this: http://crbug.com/167048
-TEST_F(LockStateControllerTest, DISABLED_LockButtonBasic) {
- // If we're logged in as a regular user, we should start the lock timer and
- // the pre-lock animation.
- Initialize(false, user::LOGGED_IN_USER);
-
- PressLockButton();
- ExpectPreLockAnimationStarted();
- AdvancePartially(SessionStateAnimator::ANIMATION_SPEED_UNDOABLE, 0.5f);
-
- // If the button is released immediately, we shouldn't lock the screen.
- ReleaseLockButton();
- ExpectPreLockAnimationCancel();
- Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
-
- ExpectUnlockedState();
- EXPECT_EQ(0, delegate_->num_lock_requests());
-
- // Press the button again and let the lock timeout fire. We should request
- // that the screen be locked.
- PressLockButton();
- ExpectPreLockAnimationStarted();
- Advance(SessionStateAnimator::ANIMATION_SPEED_UNDOABLE);
- EXPECT_EQ(1, delegate_->num_lock_requests());
-
- // Pressing the lock button while we have a pending lock request shouldn't do
- // anything.
- ReleaseLockButton();
- PressLockButton();
- ExpectPreLockAnimationFinished();
- ReleaseLockButton();
-
- // Pressing the button also shouldn't do anything after the screen is locked.
- SystemLocks();
- ExpectPostLockAnimationStarted();
-
- PressLockButton();
- ReleaseLockButton();
- ExpectPostLockAnimationStarted();
-
- Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
- ExpectPastLockAnimationFinished();
-
- PressLockButton();
- ReleaseLockButton();
- ExpectPastLockAnimationFinished();
-}
-
-// Test that the power button takes priority over the lock button.
-// TODO(antrim): Reenable this: http://crbug.com/167048
-TEST_F(LockStateControllerTest,
- DISABLED_PowerButtonPreemptsLockButton) {
- Initialize(false, user::LOGGED_IN_USER);
-
- // While the lock button is down, hold the power button.
- PressLockButton();
- ExpectPreLockAnimationStarted();
- PressPowerButton();
- ExpectPreLockAnimationStarted();
-
- AdvancePartially(SessionStateAnimator::ANIMATION_SPEED_UNDOABLE, 0.5f);
-
- // The lock timer shouldn't be stopped when the lock button is released.
- ReleaseLockButton();
- ExpectPreLockAnimationStarted();
- ReleasePowerButton();
- ExpectPreLockAnimationCancel();
-
- Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
- ExpectUnlockedState();
-
- // Now press the power button first and then the lock button.
- PressPowerButton();
- ExpectPreLockAnimationStarted();
- PressLockButton();
- ExpectPreLockAnimationStarted();
-
- AdvancePartially(SessionStateAnimator::ANIMATION_SPEED_UNDOABLE, 0.5f);
-
- // Releasing the power button should stop the lock timer.
- ReleasePowerButton();
- ExpectPreLockAnimationCancel();
- ReleaseLockButton();
- ExpectPreLockAnimationCancel();
-}
-
-// When the screen is locked without going through the usual power-button
-// slow-close path (e.g. via the wrench menu), test that we still show the
-// fast-close animation.
-TEST_F(LockStateControllerTest, LockWithoutButton) {
- Initialize(false, user::LOGGED_IN_USER);
- lock_state_controller_->OnStartingLock();
-
- ExpectPreLockAnimationStarted();
- EXPECT_FALSE(test_api_->is_lock_cancellable());
-
- // TODO(antrim): After time-faking is fixed, let the pre-lock animation
- // complete here and check that delegate_->num_lock_requests() is 0 to
- // prevent http://crbug.com/172487 from regressing.
-}
-
-// When we hear that the process is exiting but we haven't had a chance to
-// display an animation, we should just blank the screen.
-TEST_F(LockStateControllerTest, ShutdownWithoutButton) {
- Initialize(false, user::LOGGED_IN_USER);
- lock_state_controller_->OnAppTerminating();
-
- EXPECT_TRUE(
- animator_api_->ContainersAreAnimated(
- SessionStateAnimator::kAllContainersMask,
- SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY));
- GenerateMouseMoveEvent();
- EXPECT_FALSE(cursor_visible());
-}
-
-// Test that we display the fast-close animation and shut down when we get an
-// outside request to shut down (e.g. from the login or lock screen).
-TEST_F(LockStateControllerTest, RequestShutdownFromLoginScreen) {
- Initialize(false, user::LOGGED_IN_NONE);
-
- lock_state_controller_->RequestShutdown();
-
- ExpectShutdownAnimationStarted();
- Advance(SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN);
-
- GenerateMouseMoveEvent();
- EXPECT_FALSE(cursor_visible());
-
- EXPECT_EQ(0, NumShutdownRequests());
- EXPECT_TRUE(test_api_->real_shutdown_timer_is_running());
- test_api_->trigger_real_shutdown_timeout();
- EXPECT_EQ(1, NumShutdownRequests());
-}
-
-TEST_F(LockStateControllerTest, RequestShutdownFromLockScreen) {
- Initialize(false, user::LOGGED_IN_USER);
-
- SystemLocks();
- Advance(SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN);
- ExpectPastLockAnimationFinished();
-
- lock_state_controller_->RequestShutdown();
-
- ExpectShutdownAnimationStarted();
- Advance(SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN);
-
- GenerateMouseMoveEvent();
- EXPECT_FALSE(cursor_visible());
-
- EXPECT_EQ(0, NumShutdownRequests());
- EXPECT_TRUE(test_api_->real_shutdown_timer_is_running());
- test_api_->trigger_real_shutdown_timeout();
- EXPECT_EQ(1, NumShutdownRequests());
-}
-
-// TODO(antrim): Reenable this: http://crbug.com/167048
-TEST_F(LockStateControllerTest,
- DISABLED_RequestAndCancelShutdownFromLockScreen) {
- Initialize(false, user::LOGGED_IN_USER);
-
- SystemLocks();
- Advance(SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN);
- ExpectLockedState();
-
- // Press the power button and check that we start the shutdown timer.
- PressPowerButton();
- EXPECT_FALSE(test_api_->is_animating_lock());
- EXPECT_TRUE(test_api_->shutdown_timer_is_running());
-
- ExpectShutdownAnimationStarted();
-
- AdvancePartially(SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN, 0.5f);
-
- float grayscale_before_button_release =
- Shell::GetPrimaryRootWindow()->layer()->layer_grayscale();
-
- // Release the power button before the shutdown timer fires.
- ReleasePowerButton();
-
- EXPECT_FALSE(test_api_->shutdown_timer_is_running());
-
- ExpectShutdownAnimationCancel();
-
- float grayscale_after_button_release =
- Shell::GetPrimaryRootWindow()->layer()->layer_grayscale();
- // Expect no flickering in undo animation.
- EXPECT_EQ(grayscale_before_button_release, grayscale_after_button_release);
-
- Advance(SessionStateAnimator::ANIMATION_SPEED_REVERT);
- ExpectLockedState();
-}
-
-// Test that we ignore power button presses when the screen is turned off.
-TEST_F(LockStateControllerTest, IgnorePowerButtonIfScreenIsOff) {
- Initialize(false, user::LOGGED_IN_USER);
-
- // When the screen brightness is at 0%, we shouldn't do anything in response
- // to power button presses.
- controller_->OnScreenBrightnessChanged(0.0);
-
- PressPowerButton();
- EXPECT_FALSE(test_api_->is_animating_lock());
- ReleasePowerButton();
-
- // After increasing the brightness to 10%, we should start the timer like
- // usual.
- controller_->OnScreenBrightnessChanged(10.0);
-
- PressPowerButton();
- EXPECT_TRUE(test_api_->is_animating_lock());
-}
-
-// Test that hidden background appears and revers correctly on lock/cancel.
-// TODO(antrim): Reenable this: http://crbug.com/167048
-TEST_F(LockStateControllerTest, DISABLED_TestHiddenBackgroundLockCancel) {
- Initialize(false, user::LOGGED_IN_USER);
- HideBackground();
-
- EXPECT_TRUE(IsBackgroundHidden());
- ExpectUnlockedState();
- PressPowerButton();
-
- ExpectPreLockAnimationStarted();
- EXPECT_FALSE(IsBackgroundHidden());
- ExpectBackgroundIsShowing();
-
- // Forward only half way through.
- AdvancePartially(SessionStateAnimator::ANIMATION_SPEED_UNDOABLE, 0.5f);
-
- // Release the button before the lock timer fires.
- ReleasePowerButton();
- ExpectPreLockAnimationCancel();
- ExpectBackgroundIsHiding();
- EXPECT_FALSE(IsBackgroundHidden());
-
- Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
-
- ExpectUnlockedState();
- EXPECT_TRUE(IsBackgroundHidden());
-}
-
-// Test that hidden background appears and revers correctly on lock/unlock.
-// TODO(antrim): Reenable this: http://crbug.com/167048
-TEST_F(LockStateControllerTest, DISABLED_TestHiddenBackgroundLockUnlock) {
- Initialize(false, user::LOGGED_IN_USER);
- HideBackground();
-
- EXPECT_TRUE(IsBackgroundHidden());
- ExpectUnlockedState();
-
- // Press the power button and check that the lock timer is started and that we
- // start lifting the non-screen-locker containers.
- PressPowerButton();
-
- ExpectPreLockAnimationStarted();
- EXPECT_FALSE(IsBackgroundHidden());
- ExpectBackgroundIsShowing();
-
- Advance(SessionStateAnimator::ANIMATION_SPEED_UNDOABLE);
-
- ExpectPreLockAnimationFinished();
-
- SystemLocks();
-
- ReleasePowerButton();
-
- ExpectPostLockAnimationStarted();
- Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
- ExpectPastLockAnimationFinished();
-
- ExpectLockedState();
-
- SuccessfulAuthentication(NULL);
-
- ExpectUnlockBeforeUIDestroyedAnimationStarted();
- Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
- ExpectUnlockBeforeUIDestroyedAnimationFinished();
-
- SystemUnlocks();
-
- ExpectUnlockAfterUIDestroyedAnimationStarted();
- ExpectBackgroundIsHiding();
- EXPECT_FALSE(IsBackgroundHidden());
-
- Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
- ExpectUnlockAfterUIDestroyedAnimationFinished();
- EXPECT_TRUE(IsBackgroundHidden());
-
- ExpectUnlockedState();
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/wm/lock_state_observer.h b/chromium/ash/wm/lock_state_observer.h
deleted file mode 100644
index d247e828347..00000000000
--- a/chromium/ash/wm/lock_state_observer.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_LOCK_STATE_OBSERVER_H_
-#define ASH_WM_LOCK_STATE_OBSERVER_H_
-
-#include "ash/ash_export.h"
-
-namespace ash {
-
-// Interface for classes that want to be notified by LockStateController when
-// session-related events occur.
-class ASH_EXPORT LockStateObserver {
- public:
- enum EventType {
- EVENT_PRELOCK_ANIMATION_STARTED,
- EVENT_LOCK_ANIMATION_STARTED,
- EVENT_LOCK_ANIMATION_FINISHED,
- };
-
- virtual void OnLockStateEvent(EventType event) = 0;
- virtual ~LockStateObserver() {}
-};
-
-} // namespace ash
-
-#endif // ASH_WM_LOCK_STATE_OBSERVER_H_
diff --git a/chromium/ash/wm/mru_window_tracker.cc b/chromium/ash/wm/mru_window_tracker.cc
deleted file mode 100644
index 4ed9a1df723..00000000000
--- a/chromium/ash/wm/mru_window_tracker.cc
+++ /dev/null
@@ -1,198 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/mru_window_tracker.h"
-
-#include <algorithm>
-
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/window_cycle_list.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace_controller.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/events/event.h"
-#include "ui/events/event_handler.h"
-
-namespace ash {
-
-namespace {
-
-// Adds the windows that can be cycled through for the specified window id to
-// |windows|.
-void AddTrackedWindows(aura::Window* root,
- int container_id,
- MruWindowTracker::WindowList* windows) {
- aura::Window* container = Shell::GetContainer(root, container_id);
- const MruWindowTracker::WindowList& children(container->children());
- windows->insert(windows->end(), children.begin(), children.end());
-}
-
-// Returns true if |window| is a container whose windows can be cycled to.
-bool IsSwitchableContainer(aura::Window* window) {
- if (!window)
- return false;
- for (size_t i = 0; i < kSwitchableWindowContainerIdsLength; ++i) {
- if (window->id() == kSwitchableWindowContainerIds[i])
- return true;
- }
- return false;
-}
-
-// Returns whether |w1| should be considered less recently used than |w2|. This
-// is used for a stable sort to move minimized windows to the LRU end of the
-// list.
-bool CompareWindowState(aura::Window* w1, aura::Window* w2) {
- return ash::wm::IsWindowMinimized(w1) && !ash::wm::IsWindowMinimized(w2);
-}
-
-// Returns a list of windows ordered by their stacking order.
-// If |mru_windows| is passed, these windows are moved to the front of the list.
-// If |top_most_at_end|, the list is returned in descending (bottom-most / least
-// recently used) order.
-MruWindowTracker::WindowList BuildWindowListInternal(
- const std::list<aura::Window*>* mru_windows,
- bool top_most_at_end) {
- MruWindowTracker::WindowList windows;
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- aura::Window* active_root = Shell::GetTargetRootWindow();
- for (aura::Window::Windows::const_iterator iter = root_windows.begin();
- iter != root_windows.end(); ++iter) {
- if (*iter == active_root)
- continue;
- for (size_t i = 0; i < kSwitchableWindowContainerIdsLength; ++i)
- AddTrackedWindows(*iter, kSwitchableWindowContainerIds[i], &windows);
- }
-
- // Add windows in the active root windows last so that the topmost window
- // in the active root window becomes the front of the list.
- for (size_t i = 0; i < kSwitchableWindowContainerIdsLength; ++i)
- AddTrackedWindows(active_root, kSwitchableWindowContainerIds[i], &windows);
-
- // Removes unfocusable windows.
- MruWindowTracker::WindowList::iterator last =
- std::remove_if(
- windows.begin(),
- windows.end(),
- std::not1(std::ptr_fun(ash::wm::CanActivateWindow)));
- windows.erase(last, windows.end());
-
- // Put the windows in the mru_windows list at the head, if it's available.
- if (mru_windows) {
- // Iterate through the list backwards, so that we can move each window to
- // the front of the windows list as we find them.
- for (std::list<aura::Window*>::const_reverse_iterator ix =
- mru_windows->rbegin();
- ix != mru_windows->rend(); ++ix) {
- // Exclude windows in non-switchable containers and those which cannot
- // be activated.
- if (!IsSwitchableContainer((*ix)->parent()) ||
- !ash::wm::CanActivateWindow(*ix)) {
- continue;
- }
-
- MruWindowTracker::WindowList::iterator window =
- std::find(windows.begin(), windows.end(), *ix);
- if (window != windows.end()) {
- windows.erase(window);
- windows.push_back(*ix);
- }
- }
- }
-
- // Move minimized windows to the beginning (LRU end) of the list.
- std::stable_sort(windows.begin(), windows.end(), CompareWindowState);
-
- // Window cycling expects the topmost window at the front of the list.
- if (!top_most_at_end)
- std::reverse(windows.begin(), windows.end());
-
- return windows;
-}
-
-} // namespace
-
-const int kSwitchableWindowContainerIds[] = {
- internal::kShellWindowId_DefaultContainer,
- internal::kShellWindowId_AlwaysOnTopContainer,
- internal::kShellWindowId_PanelContainer
-};
-
-const size_t kSwitchableWindowContainerIdsLength =
- arraysize(kSwitchableWindowContainerIds);
-
-//////////////////////////////////////////////////////////////////////////////
-// MruWindowTracker, public:
-
-MruWindowTracker::MruWindowTracker(
- aura::client::ActivationClient* activation_client)
- : activation_client_(activation_client),
- ignore_window_activations_(false) {
- activation_client_->AddObserver(this);
-}
-
-MruWindowTracker::~MruWindowTracker() {
- for (std::list<aura::Window*>::iterator iter = mru_windows_.begin();
- iter != mru_windows_.end(); ++iter) {
- (*iter)->RemoveObserver(this);
- }
-
- activation_client_->RemoveObserver(this);
-}
-
-// static
-MruWindowTracker::WindowList MruWindowTracker::BuildWindowList(
- bool top_most_at_end) {
- return BuildWindowListInternal(NULL, top_most_at_end);
-}
-
-MruWindowTracker::WindowList MruWindowTracker::BuildMruWindowList() {
- return BuildWindowListInternal(&mru_windows_, false);
-}
-
-void MruWindowTracker::SetIgnoreActivations(bool ignore) {
- ignore_window_activations_ = ignore;
-
- // If no longer ignoring window activations, move currently active window
- // to front.
- if (!ignore)
- SetActiveWindow(wm::GetActiveWindow());
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// MruWindowTracker, private:
-
-void MruWindowTracker::SetActiveWindow(aura::Window* active_window) {
- if (!active_window)
- return;
-
- std::list<aura::Window*>::iterator iter =
- std::find(mru_windows_.begin(), mru_windows_.end(), active_window);
- // Observe all newly tracked windows.
- if (iter == mru_windows_.end())
- active_window->AddObserver(this);
- else
- mru_windows_.erase(iter);
- // TODO(flackr): Remove this check if this doesn't fire for a while. This
- // should verify that all tracked windows start with a layer, see
- // http://crbug.com/291354.
- CHECK(active_window->layer());
- mru_windows_.push_front(active_window);
-}
-
-void MruWindowTracker::OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) {
- if (!ignore_window_activations_)
- SetActiveWindow(gained_active);
-}
-
-void MruWindowTracker::OnWindowDestroying(aura::Window* window) {
- mru_windows_.remove(window);
- window->RemoveObserver(this);
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/mru_window_tracker.h b/chromium/ash/wm/mru_window_tracker.h
deleted file mode 100644
index 1569a98841d..00000000000
--- a/chromium/ash/wm/mru_window_tracker.h
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_MRU_WINDOW_TRACKER_H_
-#define ASH_WM_MRU_WINDOW_TRACKER_H_
-
-#include <list>
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/client/activation_change_observer.h"
-#include "ui/aura/window_observer.h"
-
-namespace aura {
-class RootWindow;
-class Window;
-namespace client {
-class ActivationClient;
-}
-}
-
-namespace ash {
-
-// List of containers which contain windows that can be switched to.
-ASH_EXPORT extern const int kSwitchableWindowContainerIds[];
-
-// The number of elements in kSwitchableWindowContainerIds.
-ASH_EXPORT extern const size_t kSwitchableWindowContainerIdsLength;
-
-// Maintains a most recently used list of windows. This is used for window
-// cycling using Alt+Tab and overview mode.
-class ASH_EXPORT MruWindowTracker
- : public aura::client::ActivationChangeObserver,
- public aura::WindowObserver {
- public:
- typedef std::vector<aura::Window*> WindowList;
-
- explicit MruWindowTracker(
- aura::client::ActivationClient* activation_client);
- virtual ~MruWindowTracker();
-
- // Returns the set of windows which can be cycled through. This method creates
- // the vector based on the current set of windows across all valid root
- // windows. As a result it is not necessarily the same as the set of
- // windows being iterated over.
- // If |top_most_at_end| the window list will return in ascending (lowest
- // window in stacking order first) order instead of the default descending
- // (top most window first) order.
- static WindowList BuildWindowList(bool top_most_at_end);
-
- // Returns the set of windows which can be cycled through using the tracked
- // list of most recently used windows.
- WindowList BuildMruWindowList();
-
- // Starts or stops ignoring window activations. If no longer ignoring
- // activations the currently active window is moved to the front of the
- // MRU window list. Used by WindowCycleList to avoid adding all cycled
- // windows to the front of the MRU window list.
- void SetIgnoreActivations(bool ignore);
-
- private:
- // Updates the mru_windows_ list to insert/move |active_window| at/to the
- // front.
- void SetActiveWindow(aura::Window* active_window);
-
- // Overridden from aura::client::ActivationChangeObserver:
- virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) OVERRIDE;
-
- // Overridden from WindowObserver:
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
-
- // List of windows that have been activated in containers that we cycle
- // through, sorted by most recently used.
- std::list<aura::Window*> mru_windows_;
-
- aura::client::ActivationClient* activation_client_;
-
- bool ignore_window_activations_;
-
- DISALLOW_COPY_AND_ASSIGN(MruWindowTracker);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_MRU_WINDOW_TRACKER_H_
diff --git a/chromium/ash/wm/mru_window_tracker_unittest.cc b/chromium/ash/wm/mru_window_tracker_unittest.cc
deleted file mode 100644
index 924060db7b5..00000000000
--- a/chromium/ash/wm/mru_window_tracker_unittest.cc
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/test_shelf_delegate.h"
-#include "ash/wm/mru_window_tracker.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "base/compiler_specific.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/aura/window.h"
-
-namespace ash {
-namespace internal {
-
-class MruWindowTrackerTest : public test::AshTestBase {
- public:
- MruWindowTrackerTest() {}
- virtual ~MruWindowTrackerTest() {}
-
- aura::Window* CreateWindow() {
- return CreateTestWindowInShellWithBounds(gfx::Rect(0, 0, 400, 400));
- }
-
- ash::MruWindowTracker* mru_window_tracker() {
- return Shell::GetInstance()->mru_window_tracker();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MruWindowTrackerTest);
-};
-
-// Basic test that the activation order is tracked.
-TEST_F(MruWindowTrackerTest, Basic) {
- scoped_ptr<aura::Window> w1(CreateWindow());
- scoped_ptr<aura::Window> w2(CreateWindow());
- scoped_ptr<aura::Window> w3(CreateWindow());
- wm::ActivateWindow(w3.get());
- wm::ActivateWindow(w2.get());
- wm::ActivateWindow(w1.get());
-
- MruWindowTracker::WindowList window_list =
- mru_window_tracker()->BuildMruWindowList();
- EXPECT_EQ(w1.get(), window_list[0]);
- EXPECT_EQ(w2.get(), window_list[1]);
- EXPECT_EQ(w3.get(), window_list[2]);
-}
-
-// Test that minimized windows are considered least recently used (but kept in
-// correct relative order).
-TEST_F(MruWindowTrackerTest, MinimizedWindowsAreLru) {
- scoped_ptr<aura::Window> w1(CreateWindow());
- scoped_ptr<aura::Window> w2(CreateWindow());
- scoped_ptr<aura::Window> w3(CreateWindow());
- scoped_ptr<aura::Window> w4(CreateWindow());
- scoped_ptr<aura::Window> w5(CreateWindow());
- scoped_ptr<aura::Window> w6(CreateWindow());
- wm::ActivateWindow(w6.get());
- wm::ActivateWindow(w5.get());
- wm::ActivateWindow(w4.get());
- wm::ActivateWindow(w3.get());
- wm::ActivateWindow(w2.get());
- wm::ActivateWindow(w1.get());
-
- wm::GetWindowState(w1.get())->Minimize();
- wm::GetWindowState(w4.get())->Minimize();
- wm::GetWindowState(w5.get())->Minimize();
-
- // Expect the relative order of minimized windows to remain the same, but all
- // minimized windows to be at the end of the list.
- MruWindowTracker::WindowList window_list =
- mru_window_tracker()->BuildMruWindowList();
- EXPECT_EQ(w2.get(), window_list[0]);
- EXPECT_EQ(w3.get(), window_list[1]);
- EXPECT_EQ(w6.get(), window_list[2]);
- EXPECT_EQ(w1.get(), window_list[3]);
- EXPECT_EQ(w4.get(), window_list[4]);
- EXPECT_EQ(w5.get(), window_list[5]);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/overlay_event_filter.cc b/chromium/ash/wm/overlay_event_filter.cc
deleted file mode 100644
index ed4f3161eed..00000000000
--- a/chromium/ash/wm/overlay_event_filter.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/overlay_event_filter.h"
-
-#include "ash/wm/partial_screenshot_view.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/events/event.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-OverlayEventFilter::OverlayEventFilter()
- : delegate_(NULL) {
-}
-
-OverlayEventFilter::~OverlayEventFilter() {
- delegate_ = NULL;
-}
-
-void OverlayEventFilter::OnKeyEvent(ui::KeyEvent* event) {
- if (!delegate_)
- return;
-
- // Do not consume a translated key event which is generated by an IME (e.g.,
- // ui::VKEY_PROCESSKEY) since the key event is generated in response to a key
- // press or release before showing the ovelay. This is important not to
- // confuse key event handling JavaScript code in a page.
- if (event->type() == ui::ET_TRANSLATED_KEY_PRESS ||
- event->type() == ui::ET_TRANSLATED_KEY_RELEASE) {
- return;
- }
-
- if (delegate_ && delegate_->IsCancelingKeyEvent(event))
- Cancel();
-
- // Pass key events only when they are sent to a child of the delegate's
- // window.
- aura::Window* target = static_cast<aura::Window*>(event->target());
- if (!delegate_ || !delegate_->GetWindow() ||
- !delegate_->GetWindow()->Contains(target))
- event->StopPropagation();
-}
-
-void OverlayEventFilter::OnLoginStateChanged(
- user::LoginStatus status) {
- Cancel();
-}
-
-void OverlayEventFilter::OnAppTerminating() {
- Cancel();
-}
-
-void OverlayEventFilter::OnLockStateChanged(bool locked) {
- Cancel();
-}
-
-void OverlayEventFilter::Activate(Delegate* delegate) {
- delegate_ = delegate;
-}
-
-void OverlayEventFilter::Deactivate() {
- delegate_ = NULL;
-}
-
-void OverlayEventFilter::Cancel() {
- if (delegate_)
- delegate_->Cancel();
-}
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/overlay_event_filter.h b/chromium/ash/wm/overlay_event_filter.h
deleted file mode 100644
index 0d5afb6974a..00000000000
--- a/chromium/ash/wm/overlay_event_filter.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_OVERLAY_EVENT_FILTER_H_
-#define ASH_WM_OVERLAY_EVENT_FILTER_H_
-
-#include "ash/shell_observer.h"
-#include "base/compiler_specific.h"
-#include "ui/aura/window.h"
-#include "ui/events/event_handler.h"
-
-namespace ash {
-namespace internal {
-
-// EventFilter for the "overlay window", which intercepts events before they are
-// processed by the usual path (e.g. the partial screenshot UI, the keyboard
-// overlay). It does nothing the first time, but works when |Activate()| is
-// called. The main task of this event filter is just to stop propagation
-// of any key events during activation, and also signal cancellation when keys
-// for canceling are pressed.
-class OverlayEventFilter : public ui::EventHandler,
- public ShellObserver {
- public:
- // Windows that need to receive events from OverlayEventFilter implement this.
- class Delegate {
- public:
- // Invoked when OverlayEventFilter needs to stop handling events.
- virtual void Cancel() = 0;
-
- // Returns true if the overlay should be canceled in response to |event|.
- virtual bool IsCancelingKeyEvent(ui::KeyEvent* event) = 0;
-
- // Returns the window that needs to receive events. NULL if no window needs
- // to receive key events from OverlayEventFilter.
- virtual aura::Window* GetWindow() = 0;
- };
-
- OverlayEventFilter();
- virtual ~OverlayEventFilter();
-
- // Starts the filtering of events. It also notifies the specified
- // |delegate| when a key event means cancel (like Esc). It holds the
- // pointer to the specified |delegate| until Deactivate() is called, but
- // does not take ownership.
- void Activate(Delegate* delegate);
-
- // Ends the filtering of events.
- void Deactivate();
-
- // Cancels the partial screenshot UI. Do nothing if it's not activated.
- void Cancel();
-
- // ui::EventHandler overrides:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
-
- // ShellObserver overrides:
- virtual void OnLoginStateChanged(user::LoginStatus status) OVERRIDE;
- virtual void OnAppTerminating() OVERRIDE;
- virtual void OnLockStateChanged(bool locked) OVERRIDE;
-
- private:
- Delegate* delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(OverlayEventFilter);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_OVERLAY_EVENT_FILTER_H_
diff --git a/chromium/ash/wm/overview/scoped_transform_overview_window.cc b/chromium/ash/wm/overview/scoped_transform_overview_window.cc
deleted file mode 100644
index 507df0c581f..00000000000
--- a/chromium/ash/wm/overview/scoped_transform_overview_window.cc
+++ /dev/null
@@ -1,267 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/overview/scoped_transform_overview_window.h"
-
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/wm/overview/scoped_window_copy.h"
-#include "ash/wm/window_state.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/gfx/animation/tween.h"
-#include "ui/views/corewm/window_animations.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-
-namespace {
-
-// The animation settings used for window selector animations.
-class WindowSelectorAnimationSettings
- : public ui::ScopedLayerAnimationSettings {
- public:
- WindowSelectorAnimationSettings(aura::Window* window) :
- ui::ScopedLayerAnimationSettings(window->layer()->GetAnimator()) {
- SetPreemptionStrategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- SetTransitionDuration(base::TimeDelta::FromMilliseconds(
- ScopedTransformOverviewWindow::kTransitionMilliseconds));
- SetTweenType(gfx::Tween::EASE_OUT);
- }
-
- virtual ~WindowSelectorAnimationSettings() {
- }
-};
-
-void SetTransformOnWindow(aura::Window* window,
- const gfx::Transform& transform,
- bool animate) {
- if (animate) {
- WindowSelectorAnimationSettings animation_settings(window);
- window->SetTransform(transform);
- } else {
- window->SetTransform(transform);
- }
-}
-
-gfx::Transform TranslateTransformOrigin(const gfx::Vector2d& new_origin,
- const gfx::Transform& transform) {
- gfx::Transform result;
- result.Translate(-new_origin.x(), -new_origin.y());
- result.PreconcatTransform(transform);
- result.Translate(new_origin.x(), new_origin.y());
- return result;
-}
-
-void SetTransformOnWindowAndAllTransientChildren(
- aura::Window* window,
- const gfx::Transform& transform,
- bool animate) {
- SetTransformOnWindow(window, transform, animate);
-
- aura::Window::Windows transient_children = window->transient_children();
- for (aura::Window::Windows::iterator iter = transient_children.begin();
- iter != transient_children.end(); ++iter) {
- aura::Window* transient_child = *iter;
- gfx::Rect window_bounds = window->bounds();
- gfx::Rect child_bounds = transient_child->bounds();
- gfx::Transform transient_window_transform(
- TranslateTransformOrigin(child_bounds.origin() - window_bounds.origin(),
- transform));
- SetTransformOnWindow(transient_child, transient_window_transform, animate);
- }
-}
-
-aura::Window* GetModalTransientParent(aura::Window* window) {
- if (window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_WINDOW)
- return window->transient_parent();
- return NULL;
-}
-
-} // namespace
-
-const int ScopedTransformOverviewWindow::kTransitionMilliseconds = 200;
-
-ScopedTransformOverviewWindow::ScopedTransformOverviewWindow(
- aura::Window* window)
- : window_(window),
- minimized_(window->GetProperty(aura::client::kShowStateKey) ==
- ui::SHOW_STATE_MINIMIZED),
- ignored_by_shelf_(ash::wm::GetWindowState(window)->ignored_by_shelf()),
- overview_started_(false),
- original_transform_(window->layer()->GetTargetTransform()) {
-}
-
-ScopedTransformOverviewWindow::~ScopedTransformOverviewWindow() {
- if (window_) {
- WindowSelectorAnimationSettings animation_settings(window_);
- gfx::Transform transform;
- SetTransformOnWindowAndTransientChildren(original_transform_, true);
- if (minimized_ && window_->GetProperty(aura::client::kShowStateKey) !=
- ui::SHOW_STATE_MINIMIZED) {
- // Setting opacity 0 and visible false ensures that the property change
- // to SHOW_STATE_MINIMIZED will not animate the window from its original
- // bounds to the minimized position.
- // Hiding the window needs to be done before the target opacity is 0,
- // otherwise the layer's visibility will not be updated
- // (See VisibilityController::UpdateLayerVisibility).
- window_->Hide();
- window_->layer()->SetOpacity(0);
- window_->SetProperty(aura::client::kShowStateKey,
- ui::SHOW_STATE_MINIMIZED);
- }
- ash::wm::GetWindowState(window_)->set_ignored_by_shelf(ignored_by_shelf_);
- }
-}
-
-bool ScopedTransformOverviewWindow::Contains(const aura::Window* target) const {
- for (ScopedVector<ScopedWindowCopy>::const_iterator iter =
- window_copies_.begin(); iter != window_copies_.end(); ++iter) {
- if ((*iter)->GetWindow()->Contains(target))
- return true;
- }
- aura::Window* window = window_;
- while (window) {
- if (window->Contains(target))
- return true;
- window = GetModalTransientParent(window);
- }
- return false;
-}
-
-gfx::Rect ScopedTransformOverviewWindow::GetBoundsInScreen() const {
- gfx::Rect bounds;
- aura::Window* window = window_;
- while (window) {
- bounds.Union(ScreenAsh::ConvertRectToScreen(window->parent(),
- window->GetTargetBounds()));
- window = GetModalTransientParent(window);
- }
- return bounds;
-}
-
-void ScopedTransformOverviewWindow::RestoreWindow() {
- if (minimized_ && window_->GetProperty(aura::client::kShowStateKey) ==
- ui::SHOW_STATE_MINIMIZED) {
- window_->Show();
- }
-}
-
-void ScopedTransformOverviewWindow::RestoreWindowOnExit() {
- minimized_ = false;
- original_transform_ = gfx::Transform();
-}
-
-void ScopedTransformOverviewWindow::OnWindowDestroyed() {
- window_ = NULL;
-}
-
-gfx::Rect ScopedTransformOverviewWindow::ShrinkRectToFitPreservingAspectRatio(
- const gfx::Rect& rect,
- const gfx::Rect& bounds) {
- DCHECK(!rect.IsEmpty());
- DCHECK(!bounds.IsEmpty());
- float scale = std::min(1.0f,
- std::min(static_cast<float>(bounds.width()) / rect.width(),
- static_cast<float>(bounds.height()) / rect.height()));
- return gfx::Rect(bounds.x() + 0.5 * (bounds.width() - scale * rect.width()),
- bounds.y() + 0.5 * (bounds.height() - scale * rect.height()),
- rect.width() * scale,
- rect.height() * scale);
-}
-
-gfx::Transform ScopedTransformOverviewWindow::GetTransformForRect(
- const gfx::Rect& src_rect,
- const gfx::Rect& dst_rect) {
- DCHECK(!src_rect.IsEmpty());
- DCHECK(!dst_rect.IsEmpty());
- gfx::Transform transform;
- transform.Translate(dst_rect.x() - src_rect.x(),
- dst_rect.y() - src_rect.y());
- transform.Scale(static_cast<float>(dst_rect.width()) / src_rect.width(),
- static_cast<float>(dst_rect.height()) / src_rect.height());
- return transform;
-}
-
-void ScopedTransformOverviewWindow::SetTransform(
- aura::Window* root_window,
- const gfx::Transform& transform,
- bool animate) {
- DCHECK(overview_started_);
-
- if (root_window != window_->GetRootWindow()) {
- if (!window_copies_.empty()) {
- bool bounds_or_hierarchy_changed = false;
- aura::Window* window = window_;
- for (ScopedVector<ScopedWindowCopy>::reverse_iterator iter =
- window_copies_.rbegin();
- !bounds_or_hierarchy_changed && iter != window_copies_.rend();
- ++iter, window = GetModalTransientParent(window)) {
- if (!window) {
- bounds_or_hierarchy_changed = true;
- } else if ((*iter)->GetWindow()->GetBoundsInScreen() !=
- window->GetBoundsInScreen()) {
- bounds_or_hierarchy_changed = true;
- }
- }
- // Clearing the window copies array will force it to be recreated.
- // TODO(flackr): If only the position changed and not the size,
- // update the existing window copy's position and continue to use it.
- if (bounds_or_hierarchy_changed)
- window_copies_.clear();
- }
- if (window_copies_.empty()) {
- // TODO(flackr): Create copies of the transient children windows as well.
- // Currently they will only be visible on the window's initial display.
- CopyWindowAndTransientParents(root_window, window_);
- }
- }
- SetTransformOnWindowAndTransientChildren(transform, animate);
-}
-
-void ScopedTransformOverviewWindow::CopyWindowAndTransientParents(
- aura::Window* target_root,
- aura::Window* window) {
- aura::Window* modal_parent = GetModalTransientParent(window);
- if (modal_parent)
- CopyWindowAndTransientParents(target_root, modal_parent);
- window_copies_.push_back(new ScopedWindowCopy(target_root, window));
-}
-
-void ScopedTransformOverviewWindow::SetTransformOnWindowAndTransientChildren(
- const gfx::Transform& transform,
- bool animate) {
- gfx::Point origin(GetBoundsInScreen().origin());
- aura::Window* window = window_;
- while (window->transient_parent())
- window = window->transient_parent();
- for (ScopedVector<ScopedWindowCopy>::const_iterator iter =
- window_copies_.begin(); iter != window_copies_.end(); ++iter) {
- SetTransformOnWindow(
- (*iter)->GetWindow(),
- TranslateTransformOrigin(ScreenAsh::ConvertRectToScreen(
- (*iter)->GetWindow()->parent(),
- (*iter)->GetWindow()->GetTargetBounds()).origin() - origin,
- transform),
- animate);
- }
- SetTransformOnWindowAndAllTransientChildren(
- window,
- TranslateTransformOrigin(ScreenAsh::ConvertRectToScreen(
- window->parent(), window->GetTargetBounds()).origin() - origin,
- transform),
- animate);
-}
-
-void ScopedTransformOverviewWindow::PrepareForOverview() {
- DCHECK(!overview_started_);
- overview_started_ = true;
- ash::wm::GetWindowState(window_)->set_ignored_by_shelf(true);
- RestoreWindow();
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/overview/scoped_transform_overview_window.h b/chromium/ash/wm/overview/scoped_transform_overview_window.h
deleted file mode 100644
index 2bc1b0f61f9..00000000000
--- a/chromium/ash/wm/overview/scoped_transform_overview_window.h
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_
-#define ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_
-
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_vector.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/transform.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ui {
-class Layer;
-}
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-
-class ScopedWindowCopy;
-
-// Manages a window in the overview mode. This class allows transforming the
-// window with a helper to determine the best fit in certain bounds and
-// copies the window if being moved to another display. The window's state is
-// restored on destruction of this object.
-class ScopedTransformOverviewWindow {
- public:
- // The duration of transitions used for window transforms.
- static const int kTransitionMilliseconds;
-
- // Returns |rect| having been shrunk to fit within |bounds| (preserving the
- // aspect ratio).
- static gfx::Rect ShrinkRectToFitPreservingAspectRatio(
- const gfx::Rect& rect,
- const gfx::Rect& bounds);
-
- // Returns the transform turning |src_rect| into |dst_rect|.
- static gfx::Transform GetTransformForRect(const gfx::Rect& src_rect,
- const gfx::Rect& dst_rect);
-
- explicit ScopedTransformOverviewWindow(aura::Window* window);
- virtual ~ScopedTransformOverviewWindow();
-
- // Returns true if this window selector window contains the |target|. This is
- // used to determine if an event targetted this window.
- bool Contains(const aura::Window* target) const;
-
- // Returns the original bounds of all transformed windows.
- gfx::Rect GetBoundsInScreen() const;
-
- // Restores the window if it was minimized.
- void RestoreWindow();
-
- // Restores this window on exit rather than returning it to a minimized state
- // if it was minimized on entering overview mode.
- void RestoreWindowOnExit();
-
- // Informs the ScopedTransformOverviewWindow that the window being watched was
- // destroyed. This resets the internal window pointer to avoid calling
- // anything on the window at destruction time.
- void OnWindowDestroyed();
-
- // Prepares for overview mode by doing any necessary actions before entering.
- virtual void PrepareForOverview();
-
- // Sets |transform| on the window and a copy of the window if the target
- // |root_window| is not the window's root window. If |animate| the transform
- // is animated in, otherwise it is immediately applied.
- void SetTransform(aura::Window* root_window,
- const gfx::Transform& transform,
- bool animate);
-
- aura::Window* window() const { return window_; }
-
- private:
- // Creates copies of |window| and all of its modal transient parents on the
- // root window |target_root|.
- void CopyWindowAndTransientParents(aura::Window* target_root,
- aura::Window* window);
-
- // Applies the |transform| to the overview window and all of its transient
- // children using animations. If |animate| the transform is animated in,
- // otherwise it is applied immediately.
- void SetTransformOnWindowAndTransientChildren(const gfx::Transform& transform,
- bool animate);
-
- // A weak pointer to the real window in the overview.
- aura::Window* window_;
-
- // Copies of the window and transient parents for a different root window.
- ScopedVector<ScopedWindowCopy> window_copies_;
-
- // If true, the window was minimized and should be restored if the window
- // was not selected.
- bool minimized_;
-
- // Tracks if this window was ignored by the shelf.
- bool ignored_by_shelf_;
-
- // True if the window has been transformed for overview mode.
- bool overview_started_;
-
- // The original transform of the window before entering overview mode.
- gfx::Transform original_transform_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedTransformOverviewWindow);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_
diff --git a/chromium/ash/wm/overview/scoped_window_copy.cc b/chromium/ash/wm/overview/scoped_window_copy.cc
deleted file mode 100644
index 660b2845964..00000000000
--- a/chromium/ash/wm/overview/scoped_window_copy.cc
+++ /dev/null
@@ -1,178 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/overview/scoped_window_copy.h"
-
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer_animation_observer.h"
-#include "ui/gfx/display.h"
-#include "ui/views/corewm/shadow_types.h"
-#include "ui/views/corewm/window_util.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-
-namespace {
-
-// Creates a copy of |window| with |recreated_layer| in the |target_root|.
-views::Widget* CreateCopyOfWindow(aura::Window* target_root,
- aura::Window* src_window,
- ui::Layer* recreated_layer) {
- // Save and remove the transform from the layer to later reapply to both the
- // source and newly created copy window.
- gfx::Transform transform = recreated_layer->transform();
- recreated_layer->SetTransform(gfx::Transform());
-
- src_window->SetTransform(transform);
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- params.parent = src_window->parent();
- params.can_activate = false;
- params.keep_on_top = true;
- widget->set_focus_on_creation(false);
- widget->Init(params);
- widget->SetVisibilityChangedAnimationsEnabled(false);
- std::string name = src_window->name() + " (Copy)";
- widget->GetNativeWindow()->SetName(name);
- views::corewm::SetShadowType(widget->GetNativeWindow(),
- views::corewm::SHADOW_TYPE_RECTANGULAR);
-
- // Set the bounds in the target root window.
- gfx::Display target_display =
- Shell::GetScreen()->GetDisplayNearestWindow(target_root);
- aura::client::ScreenPositionClient* screen_position_client =
- aura::client::GetScreenPositionClient(src_window->GetRootWindow());
- if (screen_position_client && target_display.is_valid()) {
- screen_position_client->SetBounds(widget->GetNativeWindow(),
- src_window->GetBoundsInScreen(), target_display);
- } else {
- widget->SetBounds(src_window->GetBoundsInScreen());
- }
- widget->StackAbove(src_window);
-
- // Move the |recreated_layer| to the newly created window.
- recreated_layer->set_delegate(src_window->layer()->delegate());
- gfx::Rect layer_bounds = recreated_layer->bounds();
- layer_bounds.set_origin(gfx::Point(0, 0));
- recreated_layer->SetBounds(layer_bounds);
- recreated_layer->SetVisible(false);
- recreated_layer->parent()->Remove(recreated_layer);
-
- aura::Window* window = widget->GetNativeWindow();
- recreated_layer->SetVisible(true);
- window->layer()->Add(recreated_layer);
- window->layer()->StackAtTop(recreated_layer);
- window->layer()->SetOpacity(1);
- window->SetTransform(transform);
- window->Show();
- return widget;
-}
-
-} // namespace
-
-// An observer which closes the widget and deletes the layer after an
-// animation finishes.
-class CleanupWidgetAfterAnimationObserver : public ui::LayerAnimationObserver {
- public:
- CleanupWidgetAfterAnimationObserver(views::Widget* widget, ui::Layer* layer);
-
- // Takes ownership of the widget. At this point the class will delete itself
- // and clean up the layer when there are no pending animations.
- void TakeOwnershipOfWidget();
-
- // ui::LayerAnimationObserver:
- virtual void OnLayerAnimationEnded(
- ui::LayerAnimationSequence* sequence) OVERRIDE;
- virtual void OnLayerAnimationAborted(
- ui::LayerAnimationSequence* sequence) OVERRIDE;
- virtual void OnLayerAnimationScheduled(
- ui::LayerAnimationSequence* sequence) OVERRIDE;
-
- private:
- virtual ~CleanupWidgetAfterAnimationObserver();
-
- // If the necessary conditions have been satisfied to destruct this
- // class, deletes itself and cleans up the widget and layer.
- void MaybeDestruct();
-
- views::Widget* widget_;
- ui::Layer* layer_;
- bool owns_widget_;
- int pending_animations_;
-
- DISALLOW_COPY_AND_ASSIGN(CleanupWidgetAfterAnimationObserver);
-};
-
-CleanupWidgetAfterAnimationObserver::CleanupWidgetAfterAnimationObserver(
- views::Widget* widget,
- ui::Layer* layer)
- : widget_(widget),
- layer_(layer),
- owns_widget_(false),
- pending_animations_(0) {
- widget_->GetNativeWindow()->layer()->GetAnimator()->AddObserver(this);
-}
-
-void CleanupWidgetAfterAnimationObserver::TakeOwnershipOfWidget() {
- owns_widget_ = true;
- MaybeDestruct();
-}
-
-void CleanupWidgetAfterAnimationObserver::OnLayerAnimationEnded(
- ui::LayerAnimationSequence* sequence) {
- pending_animations_--;
- MaybeDestruct();
-}
-
-void CleanupWidgetAfterAnimationObserver::OnLayerAnimationAborted(
- ui::LayerAnimationSequence* sequence) {
- pending_animations_--;
- MaybeDestruct();
-}
-
-void CleanupWidgetAfterAnimationObserver::OnLayerAnimationScheduled(
- ui::LayerAnimationSequence* sequence) {
- pending_animations_++;
-}
-
-CleanupWidgetAfterAnimationObserver::~CleanupWidgetAfterAnimationObserver() {
- widget_->GetNativeWindow()->layer()->GetAnimator()->RemoveObserver(this);
- widget_->Close();
- widget_ = NULL;
- if (layer_) {
- views::corewm::DeepDeleteLayers(layer_);
- layer_ = NULL;
- }
-}
-
-void CleanupWidgetAfterAnimationObserver::MaybeDestruct() {
- if (pending_animations_ || !owns_widget_)
- return;
- delete this;
-}
-
-ScopedWindowCopy::ScopedWindowCopy(aura::Window* target_root,
- aura::Window* src_window) {
- layer_ = views::corewm::RecreateWindowLayers(src_window, true);
- widget_ = CreateCopyOfWindow(target_root, src_window, layer_);
- cleanup_observer_ = new CleanupWidgetAfterAnimationObserver(widget_, layer_);
-}
-
-ScopedWindowCopy::~ScopedWindowCopy() {
- // The cleanup observer will delete itself and the window when any pending
- // animations have completed.
- cleanup_observer_->TakeOwnershipOfWidget();
-}
-
-aura::Window* ScopedWindowCopy::GetWindow() {
- return widget_->GetNativeWindow();
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/overview/scoped_window_copy.h b/chromium/ash/wm/overview/scoped_window_copy.h
deleted file mode 100644
index d5da4458e92..00000000000
--- a/chromium/ash/wm/overview/scoped_window_copy.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_OVERVIEW_SCOPED_WINDOW_COPY_H_
-#define ASH_WM_OVERVIEW_SCOPED_WINDOW_COPY_H_
-
-#include "base/basictypes.h"
-
-namespace aura {
-class RootWindow;
-class Window;
-}
-
-namespace ui {
-class Layer;
-}
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-
-class CleanupWidgetAfterAnimationObserver;
-
-// ScopedWindowCopy copies a window and will clean up the copied layers after
-// the class goes out of scope and the last animation has finished.
-class ScopedWindowCopy {
- public:
- ScopedWindowCopy(aura::Window* target_root, aura::Window* src_window);
- ~ScopedWindowCopy();
-
- aura::Window* GetWindow();
-
- private:
- // A weak pointer to a copy of the source window owned by cleanup_observer_.
- views::Widget* widget_;
-
- // A weak pointer to the deep copy of the source window's layers owned by
- // cleanup_observer_.
- ui::Layer* layer_;
-
- // A weak pointer to an animation observer which owns itself. When the
- // ScopedWindowCopy is destroyed The animation observer will clean up the
- // widget, layer and itself once any pending animations have completed.
- CleanupWidgetAfterAnimationObserver* cleanup_observer_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedWindowCopy);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_OVERVIEW_SCOPED_WINDOW_COPY_H_
diff --git a/chromium/ash/wm/overview/window_overview.cc b/chromium/ash/wm/overview/window_overview.cc
deleted file mode 100644
index a7df1f7a458..00000000000
--- a/chromium/ash/wm/overview/window_overview.cc
+++ /dev/null
@@ -1,444 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/overview/window_overview.h"
-
-#include <algorithm>
-
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/mru_window_tracker.h"
-#include "ash/wm/overview/scoped_transform_overview_window.h"
-#include "ash/wm/overview/window_selector.h"
-#include "ash/wm/overview/window_selector_item.h"
-#include "base/metrics/histogram.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "ui/aura/client/cursor_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/events/event.h"
-#include "ui/views/background.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-
-namespace {
-
-// Conceptually the window overview is a table or grid of cells having this
-// fixed aspect ratio. The number of columns is determined by maximizing the
-// area of them based on the number of windows.
-const float kCardAspectRatio = 4.0f / 3.0f;
-
-// In the conceptual overview table, the window margin is the space reserved
-// around the window within the cell. This margin does not overlap so the
-// closest distance between adjacent windows will be twice this amount.
-const int kWindowMargin = 30;
-
-// The minimum number of cards along the major axis (i.e. horizontally on a
-// landscape orientation).
-const int kMinCardsMajor = 3;
-
-// The duration of transition animations on the overview selector.
-const int kOverviewSelectorTransitionMilliseconds = 100;
-
-// The color and opacity of the overview selector.
-const SkColor kWindowOverviewSelectionColor = SK_ColorBLACK;
-const float kWindowOverviewSelectionOpacity = 0.5f;
-
-// The padding or amount of the window selector widget visible around the edges
-// of the currently selected window.
-const int kWindowOverviewSelectionPadding = 25;
-
-// A comparator for locating a given target window.
-struct WindowSelectorItemComparator
- : public std::unary_function<WindowSelectorItem*, bool> {
- explicit WindowSelectorItemComparator(const aura::Window* target_window)
- : target(target_window) {
- }
-
- bool operator()(WindowSelectorItem* window) const {
- return window->TargetedWindow(target) != NULL;
- }
-
- const aura::Window* target;
-};
-
-// An observer which holds onto the passed widget until the animation is
-// complete.
-class CleanupWidgetAfterAnimationObserver : public ui::LayerAnimationObserver {
- public:
- explicit CleanupWidgetAfterAnimationObserver(
- scoped_ptr<views::Widget> widget);
-
- // ui::LayerAnimationObserver:
- virtual void OnLayerAnimationEnded(
- ui::LayerAnimationSequence* sequence) OVERRIDE;
- virtual void OnLayerAnimationAborted(
- ui::LayerAnimationSequence* sequence) OVERRIDE;
- virtual void OnLayerAnimationScheduled(
- ui::LayerAnimationSequence* sequence) OVERRIDE;
-
- private:
- virtual ~CleanupWidgetAfterAnimationObserver();
-
- scoped_ptr<views::Widget> widget_;
-
- DISALLOW_COPY_AND_ASSIGN(CleanupWidgetAfterAnimationObserver);
-};
-
-CleanupWidgetAfterAnimationObserver::CleanupWidgetAfterAnimationObserver(
- scoped_ptr<views::Widget> widget)
- : widget_(widget.Pass()) {
- widget_->GetNativeWindow()->layer()->GetAnimator()->AddObserver(this);
-}
-
-CleanupWidgetAfterAnimationObserver::~CleanupWidgetAfterAnimationObserver() {
- widget_->GetNativeWindow()->layer()->GetAnimator()->RemoveObserver(this);
-}
-
-void CleanupWidgetAfterAnimationObserver::OnLayerAnimationEnded(
- ui::LayerAnimationSequence* sequence) {
- delete this;
-}
-
-void CleanupWidgetAfterAnimationObserver::OnLayerAnimationAborted(
- ui::LayerAnimationSequence* sequence) {
- delete this;
-}
-
-void CleanupWidgetAfterAnimationObserver::OnLayerAnimationScheduled(
- ui::LayerAnimationSequence* sequence) {
-}
-
-} // namespace
-
-WindowOverview::WindowOverview(WindowSelector* window_selector,
- WindowSelectorItemList* windows,
- aura::Window* single_root_window)
- : window_selector_(window_selector),
- windows_(windows),
- selection_index_(0),
- single_root_window_(single_root_window),
- overview_start_time_(base::Time::Now()),
- cursor_client_(NULL) {
- for (WindowSelectorItemList::iterator iter = windows_->begin();
- iter != windows_->end(); ++iter) {
- (*iter)->PrepareForOverview();
- }
- PositionWindows();
- DCHECK(!windows_->empty());
- cursor_client_ = aura::client::GetCursorClient(
- windows_->front()->GetRootWindow());
- if (cursor_client_) {
- cursor_client_->SetCursor(ui::kCursorPointer);
- cursor_client_->ShowCursor();
- // TODO(flackr): Only prevent cursor changes for windows in the overview.
- // This will be easier to do without exposing the overview mode code if the
- // cursor changes are moved to ToplevelWindowEventHandler::HandleMouseMoved
- // as suggested there.
- cursor_client_->LockCursor();
- }
- ash::Shell::GetInstance()->PrependPreTargetHandler(this);
- Shell* shell = Shell::GetInstance();
- shell->metrics()->RecordUserMetricsAction(UMA_WINDOW_OVERVIEW);
- HideAndTrackNonOverviewWindows();
-}
-
-WindowOverview::~WindowOverview() {
- const aura::WindowTracker::Windows hidden_windows = hidden_windows_.windows();
- for (aura::WindowTracker::Windows::const_iterator iter =
- hidden_windows.begin(); iter != hidden_windows.end(); ++iter) {
- ui::ScopedLayerAnimationSettings settings(
- (*iter)->layer()->GetAnimator());
- settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds(
- ScopedTransformOverviewWindow::kTransitionMilliseconds));
- settings.SetPreemptionStrategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- (*iter)->Show();
- (*iter)->layer()->SetOpacity(1);
- }
- if (cursor_client_)
- cursor_client_->UnlockCursor();
- ash::Shell::GetInstance()->RemovePreTargetHandler(this);
- UMA_HISTOGRAM_MEDIUM_TIMES(
- "Ash.WindowSelector.TimeInOverview",
- base::Time::Now() - overview_start_time_);
-}
-
-void WindowOverview::SetSelection(size_t index) {
- gfx::Rect target_bounds(GetSelectionBounds(index));
-
- if (selection_widget_) {
- // If the selection widget is already active, determine the animation to
- // use to animate the widget to the new bounds.
- int change = static_cast<int>(index) - static_cast<int>(selection_index_);
- int windows = static_cast<int>(windows_->size());
- // If moving from the first to the last or last to the first index,
- // convert the delta to be +/- 1.
- if (windows > 2 && abs(change) == windows - 1) {
- if (change < 0)
- change += windows;
- else
- change -= windows;
- }
- if (selection_index_ < windows_->size() &&
- (*windows_)[selection_index_]->target_bounds().y() !=
- (*windows_)[index]->target_bounds().y() &&
- abs(change) == 1) {
- // The selection has changed forward or backwards by one with a change
- // in the height of the target. In this case create a new selection widget
- // to fade in on the new position and animate and fade out the old one.
- gfx::Display dst_display = gfx::Screen::GetScreenFor(
- selection_widget_->GetNativeWindow())->GetDisplayMatching(
- target_bounds);
- gfx::Vector2d fade_out_direction(
- change * ((*windows_)[selection_index_]->target_bounds().width() +
- 2 * kWindowMargin), 0);
- aura::Window* old_selection = selection_widget_->GetNativeWindow();
-
- // CleanupWidgetAfterAnimationObserver will delete itself (and the
- // widget) when the animation is complete.
- new CleanupWidgetAfterAnimationObserver(selection_widget_.Pass());
- ui::ScopedLayerAnimationSettings animation_settings(
- old_selection->layer()->GetAnimator());
- animation_settings.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(
- kOverviewSelectorTransitionMilliseconds));
- animation_settings.SetPreemptionStrategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- old_selection->SetBoundsInScreen(
- GetSelectionBounds(selection_index_) + fade_out_direction,
- dst_display);
- old_selection->layer()->SetOpacity(0);
- InitializeSelectionWidget();
- selection_widget_->GetNativeWindow()->SetBoundsInScreen(
- target_bounds - fade_out_direction, dst_display);
- }
- ui::ScopedLayerAnimationSettings animation_settings(
- selection_widget_->GetNativeWindow()->layer()->GetAnimator());
- animation_settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds(
- kOverviewSelectorTransitionMilliseconds));
- animation_settings.SetPreemptionStrategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- selection_widget_->SetBounds(target_bounds);
- selection_widget_->GetNativeWindow()->layer()->SetOpacity(
- kWindowOverviewSelectionOpacity);
- } else {
- InitializeSelectionWidget();
- selection_widget_->SetBounds(target_bounds);
- selection_widget_->GetNativeWindow()->layer()->SetOpacity(
- kWindowOverviewSelectionOpacity);
- }
- selection_index_ = index;
-}
-
-void WindowOverview::OnWindowsChanged() {
- PositionWindows();
-}
-
-void WindowOverview::MoveToSingleRootWindow(aura::Window* root_window) {
- single_root_window_ = root_window;
- PositionWindows();
-}
-
-void WindowOverview::OnKeyEvent(ui::KeyEvent* event) {
- if (GetTargetedWindow(static_cast<aura::Window*>(event->target())))
- event->StopPropagation();
- if (event->type() != ui::ET_KEY_PRESSED)
- return;
-
- if (event->key_code() == ui::VKEY_ESCAPE)
- window_selector_->CancelSelection();
-}
-
-void WindowOverview::OnMouseEvent(ui::MouseEvent* event) {
- aura::Window* target = GetEventTarget(event);
- if (!target)
- return;
-
- event->StopPropagation();
- if (event->type() != ui::ET_MOUSE_RELEASED)
- return;
-
- window_selector_->SelectWindow(target);
-}
-
-void WindowOverview::OnScrollEvent(ui::ScrollEvent* event) {
- // Set the handled flag to prevent delivering scroll events to the window but
- // still allowing other pretarget handlers to process the scroll event.
- if (GetTargetedWindow(static_cast<aura::Window*>(event->target())))
- event->SetHandled();
-}
-
-void WindowOverview::OnTouchEvent(ui::TouchEvent* event) {
- // Existing touches should be allowed to continue. This prevents getting
- // stuck in a gesture or with pressed fingers being tracked elsewhere.
- if (event->type() != ui::ET_TOUCH_PRESSED)
- return;
-
- aura::Window* target = GetEventTarget(event);
- if (!target)
- return;
-
- // TODO(flackr): StopPropogation prevents generation of gesture events.
- // We should find a better way to prevent events from being delivered to
- // the window, perhaps a transparent window in front of the target window
- // or using EventClientImpl::CanProcessEventsWithinSubtree and then a tap
- // gesture could be used to activate the window.
- event->SetHandled();
- window_selector_->SelectWindow(target);
-}
-
-aura::Window* WindowOverview::GetEventTarget(ui::LocatedEvent* event) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- // If the target window doesn't actually contain the event location (i.e.
- // mouse down over the window and mouse up elsewhere) then do not select the
- // window.
- if (!target->HitTest(event->location()))
- return NULL;
-
- return GetTargetedWindow(target);
-}
-
-aura::Window* WindowOverview::GetTargetedWindow(aura::Window* window) {
- for (WindowSelectorItemList::iterator iter = windows_->begin();
- iter != windows_->end(); ++iter) {
- aura::Window* selected = (*iter)->TargetedWindow(window);
- if (selected)
- return selected;
- }
- return NULL;
-}
-
-void WindowOverview::HideAndTrackNonOverviewWindows() {
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- for (aura::Window::Windows::const_iterator root_iter = root_windows.begin();
- root_iter != root_windows.end(); ++root_iter) {
- for (size_t i = 0; i < kSwitchableWindowContainerIdsLength; ++i) {
- aura::Window* container = Shell::GetContainer(*root_iter,
- kSwitchableWindowContainerIds[i]);
- // Copy the children list as it can change during iteration.
- aura::Window::Windows children(container->children());
- for (aura::Window::Windows::const_iterator iter = children.begin();
- iter != children.end(); ++iter) {
- if (GetTargetedWindow(*iter) || !(*iter)->IsVisible())
- continue;
- ui::ScopedLayerAnimationSettings settings(
- (*iter)->layer()->GetAnimator());
- settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds(
- ScopedTransformOverviewWindow::kTransitionMilliseconds));
- settings.SetPreemptionStrategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- (*iter)->Hide();
- (*iter)->layer()->SetOpacity(0);
- hidden_windows_.Add(*iter);
- }
- }
- }
-}
-
-void WindowOverview::PositionWindows() {
- if (single_root_window_) {
- std::vector<WindowSelectorItem*> windows;
- for (WindowSelectorItemList::iterator iter = windows_->begin();
- iter != windows_->end(); ++iter) {
- windows.push_back(*iter);
- }
- PositionWindowsOnRoot(single_root_window_, windows);
- } else {
- aura::Window::Windows root_window_list = Shell::GetAllRootWindows();
- for (size_t i = 0; i < root_window_list.size(); ++i)
- PositionWindowsFromRoot(root_window_list[i]);
- }
-}
-
-void WindowOverview::PositionWindowsFromRoot(aura::Window* root_window) {
- std::vector<WindowSelectorItem*> windows;
- for (WindowSelectorItemList::iterator iter = windows_->begin();
- iter != windows_->end(); ++iter) {
- if ((*iter)->GetRootWindow() == root_window)
- windows.push_back(*iter);
- }
- PositionWindowsOnRoot(root_window, windows);
-}
-
-void WindowOverview::PositionWindowsOnRoot(
- aura::Window* root_window,
- const std::vector<WindowSelectorItem*>& windows) {
- if (windows.empty())
- return;
-
- gfx::Size window_size;
- gfx::Rect total_bounds = ScreenAsh::ConvertRectToScreen(root_window,
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(
- Shell::GetContainer(root_window,
- internal::kShellWindowId_DefaultContainer)));
-
- // Find the minimum number of windows per row that will fit all of the
- // windows on screen.
- size_t columns = std::max(
- total_bounds.width() > total_bounds.height() ? kMinCardsMajor : 1,
- static_cast<int>(ceil(sqrt(total_bounds.width() * windows.size() /
- (kCardAspectRatio * total_bounds.height())))));
- size_t rows = ((windows.size() + columns - 1) / columns);
- window_size.set_width(std::min(
- static_cast<int>(total_bounds.width() / columns),
- static_cast<int>(total_bounds.height() * kCardAspectRatio / rows)));
- window_size.set_height(window_size.width() / kCardAspectRatio);
-
- // Calculate the X and Y offsets necessary to center the grid.
- int x_offset = total_bounds.x() + ((windows.size() >= columns ? 0 :
- (columns - windows.size()) * window_size.width()) +
- (total_bounds.width() - columns * window_size.width())) / 2;
- int y_offset = total_bounds.y() + (total_bounds.height() -
- rows * window_size.height()) / 2;
- for (size_t i = 0; i < windows.size(); ++i) {
- gfx::Transform transform;
- int column = i % columns;
- int row = i / columns;
- gfx::Rect target_bounds(window_size.width() * column + x_offset,
- window_size.height() * row + y_offset,
- window_size.width(),
- window_size.height());
- target_bounds.Inset(kWindowMargin, kWindowMargin);
- windows[i]->SetBounds(root_window, target_bounds);
- }
-}
-
-void WindowOverview::InitializeSelectionWidget() {
- selection_widget_.reset(new views::Widget);
- views::Widget::InitParams params;
- params.type = views::Widget::InitParams::TYPE_POPUP;
- params.can_activate = false;
- params.keep_on_top = false;
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.opacity = views::Widget::InitParams::OPAQUE_WINDOW;
- params.parent = Shell::GetContainer(
- single_root_window_ ? single_root_window_ :
- windows_->front()->GetRootWindow(),
- internal::kShellWindowId_DefaultContainer);
- params.accept_events = false;
- selection_widget_->set_focus_on_creation(false);
- selection_widget_->Init(params);
- views::View* content_view = new views::View;
- content_view->set_background(
- views::Background::CreateSolidBackground(kWindowOverviewSelectionColor));
- selection_widget_->SetContentsView(content_view);
- selection_widget_->Show();
- selection_widget_->GetNativeWindow()->parent()->StackChildAtBottom(
- selection_widget_->GetNativeWindow());
- selection_widget_->GetNativeWindow()->layer()->SetOpacity(0);
-}
-
-gfx::Rect WindowOverview::GetSelectionBounds(size_t index) {
- gfx::Rect bounds((*windows_)[index]->bounds());
- bounds.Inset(-kWindowOverviewSelectionPadding,
- -kWindowOverviewSelectionPadding);
- return bounds;
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/overview/window_overview.h b/chromium/ash/wm/overview/window_overview.h
deleted file mode 100644
index 5c771818e20..00000000000
--- a/chromium/ash/wm/overview/window_overview.h
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_OVERVIEW_WINDOW_OVERVIEW_H_
-#define ASH_WM_OVERVIEW_WINDOW_OVERVIEW_H_
-
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/scoped_vector.h"
-#include "base/time/time.h"
-#include "ui/aura/window_tracker.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/rect.h"
-
-namespace aura {
-class Window;
-namespace client {
-class CursorClient;
-}
-} // namespace aura
-
-namespace ui {
-class LocatedEvent;
-}
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-
-class WindowSelector;
-class WindowSelectorItem;
-
-// The WindowOverview shows a grid of all of your windows and allows selecting
-// a window by clicking or tapping on it. It also displays a selection widget
-// used to indicate the current selection when alt-tabbing between windows.
-class WindowOverview : public ui::EventHandler {
- public:
- typedef ScopedVector<WindowSelectorItem> WindowSelectorItemList;
-
- // Enters an overview mode displaying |windows| and dispatches methods
- // on |window_selector| when a window is selected or selection is canceled.
- // If |single_root_window| is not NULL, all windows will be positioned on the
- // given root window.
- WindowOverview(WindowSelector* window_selector,
- WindowSelectorItemList* windows,
- aura::Window* single_root_window);
- virtual ~WindowOverview();
-
- // Sets the selected window to be the window in position |index|.
- void SetSelection(size_t index);
-
- // Dispatched when the list of windows has changed.
- void OnWindowsChanged();
-
- // Moves the overview to only |root_window|.
- void MoveToSingleRootWindow(aura::Window* root_window);
-
- // ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
-
- private:
- // Returns the target of |event| or NULL if the event is not targeted at
- // any of the windows in the selector.
- aura::Window* GetEventTarget(ui::LocatedEvent* event);
-
- // Returns the top-level window selected by targeting |window| or NULL if
- // no overview window was found for |window|.
- aura::Window* GetTargetedWindow(aura::Window* window);
-
- // Hide and track all hidden windows not in overview.
- void HideAndTrackNonOverviewWindows();
-
- // Position all of the windows based on the current selection mode.
- void PositionWindows();
- // Position all of the windows from |root_window| on |root_window|.
- void PositionWindowsFromRoot(aura::Window* root_window);
- // Position all of the |windows| to fit on the |root_window|.
- void PositionWindowsOnRoot(aura::Window* root_window,
- const std::vector<WindowSelectorItem*>& windows);
-
- // Creates the selection widget.
- void InitializeSelectionWidget();
-
- // Returns the bounds for the selection widget for the windows_ at |index|.
- gfx::Rect GetSelectionBounds(size_t index);
-
- // Weak pointer to the window selector which owns this class.
- WindowSelector* window_selector_;
-
- // A weak pointer to the collection of windows in the overview wrapped by a
- // helper class which restores their state and helps transform them to other
- // root windows.
- WindowSelectorItemList* windows_;
-
- // Widget indicating which window is currently selected.
- scoped_ptr<views::Widget> selection_widget_;
-
- // Index of the currently selected window. This is used to determine when the
- // selection changes rows and use a different animation.
- size_t selection_index_;
-
- // If NULL, each root window displays an overview of the windows in that
- // display. Otherwise, all windows are in a single overview on
- // |single_root_window_|.
- aura::Window* single_root_window_;
-
- // The time when overview was started.
- base::Time overview_start_time_;
-
- // The cursor client used to lock the current cursor during overview.
- aura::client::CursorClient* cursor_client_;
-
- // Tracks windows which were hidden because they were not part of the
- // overview.
- aura::WindowTracker hidden_windows_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowOverview);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_OVERVIEW_WINDOW_OVERVIEW_H_
diff --git a/chromium/ash/wm/overview/window_selector.cc b/chromium/ash/wm/overview/window_selector.cc
deleted file mode 100644
index f4d8bd08f69..00000000000
--- a/chromium/ash/wm/overview/window_selector.cc
+++ /dev/null
@@ -1,521 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/overview/window_selector.h"
-
-#include <algorithm>
-
-#include "ash/ash_switches.h"
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "ash/wm/mru_window_tracker.h"
-#include "ash/wm/overview/window_overview.h"
-#include "ash/wm/overview/window_selector_delegate.h"
-#include "ash/wm/overview/window_selector_panels.h"
-#include "ash/wm/overview/window_selector_window.h"
-#include "ash/wm/window_state.h"
-#include "base/auto_reset.h"
-#include "base/command_line.h"
-#include "base/metrics/histogram.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/timer/timer.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/client/focus_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_observer.h"
-#include "ui/events/event.h"
-#include "ui/events/event_handler.h"
-
-namespace ash {
-
-namespace {
-
-// The time from when the user pressed alt+tab while still holding alt before
-// overview is engaged.
-const int kOverviewDelayOnCycleMilliseconds = 10000;
-
-// If the delay before overview is less than or equal to this threshold the
-// initial monitor is used for multi-display overview, otherwise the monitor
-// of the currently selected window is used.
-const int kOverviewDelayInitialMonitorThreshold = 100;
-
-// The maximum amount of time allowed for the delay before overview on cycling.
-// If the specified time exceeds this the timer will not be started.
-const int kMaxOverviewDelayOnCycleMilliseconds = 10000;
-
-int GetOverviewDelayOnCycleMilliseconds() {
- static int value = -1;
- if (value == -1) {
- value = kOverviewDelayOnCycleMilliseconds;
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshOverviewDelayOnAltTab)) {
- if (!base::StringToInt(CommandLine::ForCurrentProcess()->
- GetSwitchValueASCII(switches::kAshOverviewDelayOnAltTab), &value)) {
- LOG(ERROR) << "Expected int value for "
- << switches::kAshOverviewDelayOnAltTab;
- }
- }
- }
- return value;
-}
-
-// A comparator for locating a given selectable window.
-struct WindowSelectorItemComparator
- : public std::unary_function<WindowSelectorItem*, bool> {
- explicit WindowSelectorItemComparator(const aura::Window* window)
- : window_(window) {
- }
-
- bool operator()(WindowSelectorItem* window) const {
- return window->HasSelectableWindow(window_);
- }
-
- const aura::Window* window_;
-};
-
-// A comparator for locating a selectable window given a targeted window.
-struct WindowSelectorItemTargetComparator
- : public std::unary_function<WindowSelectorItem*, bool> {
- explicit WindowSelectorItemTargetComparator(const aura::Window* target_window)
- : target(target_window) {
- }
-
- bool operator()(WindowSelectorItem* window) const {
- return window->TargetedWindow(target) != NULL;
- }
-
- const aura::Window* target;
-};
-
-// A comparator for locating a selector item for a given root.
-struct WindowSelectorItemForRoot
- : public std::unary_function<WindowSelectorItem*, bool> {
- explicit WindowSelectorItemForRoot(const aura::Window* root)
- : root_window(root) {
- }
-
- bool operator()(WindowSelectorItem* item) const {
- return item->GetRootWindow() == root_window;
- }
-
- const aura::Window* root_window;
-};
-
-// Filter to watch for the termination of a keyboard gesture to cycle through
-// multiple windows.
-class WindowSelectorEventFilter : public ui::EventHandler {
- public:
- WindowSelectorEventFilter(WindowSelector* selector);
- virtual ~WindowSelectorEventFilter();
-
- // Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
-
- private:
- // A weak pointer to the WindowSelector which owns this instance.
- WindowSelector* selector_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowSelectorEventFilter);
-};
-
-// Watch for all keyboard events by filtering the root window.
-WindowSelectorEventFilter::WindowSelectorEventFilter(WindowSelector* selector)
- : selector_(selector) {
- Shell::GetInstance()->AddPreTargetHandler(this);
-}
-
-WindowSelectorEventFilter::~WindowSelectorEventFilter() {
- Shell::GetInstance()->RemovePreTargetHandler(this);
-}
-
-void WindowSelectorEventFilter::OnKeyEvent(ui::KeyEvent* event) {
- // Views uses VKEY_MENU for both left and right Alt keys.
- if (event->key_code() == ui::VKEY_MENU &&
- event->type() == ui::ET_KEY_RELEASED) {
- selector_->SelectWindow();
- // Warning: |this| will be deleted from here on.
- }
-}
-
-// Triggers a shelf visibility update on all root window controllers.
-void UpdateShelfVisibility() {
- Shell::RootWindowControllerList root_window_controllers =
- Shell::GetInstance()->GetAllRootWindowControllers();
- for (Shell::RootWindowControllerList::iterator iter =
- root_window_controllers.begin();
- iter != root_window_controllers.end(); ++iter) {
- (*iter)->UpdateShelfVisibility();
- }
-}
-
-// Returns the window immediately below |window| in the current container.
-aura::Window* GetWindowBelow(aura::Window* window) {
- aura::Window* parent = window->parent();
- if (!parent)
- return NULL;
- aura::Window* below = NULL;
- for (aura::Window::Windows::const_iterator iter = parent->children().begin();
- iter != parent->children().end(); ++iter) {
- if (*iter == window)
- return below;
- below = *iter;
- }
- NOTREACHED();
- return NULL;
-}
-
-} // namespace
-
-// This class restores and moves a window to the front of the stacking order for
-// the duration of the class's scope.
-class ScopedShowWindow : public aura::WindowObserver {
- public:
- ScopedShowWindow();
- virtual ~ScopedShowWindow();
-
- // Show |window| at the top of the stacking order.
- void Show(aura::Window* window);
-
- // Cancel restoring the window on going out of scope.
- void CancelRestore();
-
- aura::Window* window() { return window_; }
-
- // aura::WindowObserver:
- virtual void OnWillRemoveWindow(aura::Window* window) OVERRIDE;
-
- private:
- // The window being shown.
- aura::Window* window_;
-
- // The window immediately below where window_ belongs.
- aura::Window* stack_window_above_;
-
- // If true, minimize window_ on going out of scope.
- bool minimized_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedShowWindow);
-};
-
-ScopedShowWindow::ScopedShowWindow()
- : window_(NULL),
- stack_window_above_(NULL),
- minimized_(false) {
-}
-
-void ScopedShowWindow::Show(aura::Window* window) {
- DCHECK(!window_);
- window_ = window;
- stack_window_above_ = GetWindowBelow(window);
- minimized_ = wm::GetWindowState(window)->IsMinimized();
- window_->parent()->AddObserver(this);
- window_->Show();
- wm::GetWindowState(window_)->Activate();
-}
-
-ScopedShowWindow::~ScopedShowWindow() {
- if (window_) {
- window_->parent()->RemoveObserver(this);
-
- // Restore window's stacking position.
- if (stack_window_above_)
- window_->parent()->StackChildAbove(window_, stack_window_above_);
- else
- window_->parent()->StackChildAtBottom(window_);
-
- // Restore minimized state.
- if (minimized_)
- wm::GetWindowState(window_)->Minimize();
- }
-}
-
-void ScopedShowWindow::CancelRestore() {
- if (!window_)
- return;
- window_->parent()->RemoveObserver(this);
- window_ = stack_window_above_ = NULL;
-}
-
-void ScopedShowWindow::OnWillRemoveWindow(aura::Window* window) {
- if (window == window_) {
- CancelRestore();
- } else if (window == stack_window_above_) {
- // If the window this window was above is removed, use the next window down
- // as the restore marker.
- stack_window_above_ = GetWindowBelow(stack_window_above_);
- }
-}
-
-WindowSelector::WindowSelector(const WindowList& windows,
- WindowSelector::Mode mode,
- WindowSelectorDelegate* delegate)
- : mode_(mode),
- timer_enabled_(GetOverviewDelayOnCycleMilliseconds() <
- kMaxOverviewDelayOnCycleMilliseconds),
- start_overview_timer_(FROM_HERE,
- base::TimeDelta::FromMilliseconds(
- GetOverviewDelayOnCycleMilliseconds()),
- this, &WindowSelector::StartOverview),
- delegate_(delegate),
- selected_window_(0),
- restore_focus_window_(aura::client::GetFocusClient(
- Shell::GetPrimaryRootWindow())->GetFocusedWindow()),
- ignore_activations_(false) {
- DCHECK(delegate_);
-
- if (restore_focus_window_)
- restore_focus_window_->AddObserver(this);
-
- std::vector<WindowSelectorPanels*> panels_items;
- for (size_t i = 0; i < windows.size(); ++i) {
- WindowSelectorItem* item = NULL;
- if (windows[i] != restore_focus_window_)
- windows[i]->AddObserver(this);
- observed_windows_.insert(windows[i]);
-
- if (windows[i]->type() == aura::client::WINDOW_TYPE_PANEL &&
- wm::GetWindowState(windows[i])->panel_attached()) {
- // Attached panel windows are grouped into a single overview item per
- // root window (display).
- std::vector<WindowSelectorPanels*>::iterator iter =
- std::find_if(panels_items.begin(), panels_items.end(),
- WindowSelectorItemForRoot(windows[i]->GetRootWindow()));
- WindowSelectorPanels* panels_item = NULL;
- if (iter == panels_items.end()) {
- panels_item = new WindowSelectorPanels();
- panels_items.push_back(panels_item);
- windows_.push_back(panels_item);
- } else {
- panels_item = *iter;
- }
- panels_item->AddWindow(windows[i]);
- item = panels_item;
- } else {
- item = new WindowSelectorWindow(windows[i]);
- windows_.push_back(item);
- }
- // Verify that the window has been added to an item in overview.
- CHECK(item->TargetedWindow(windows[i]));
- }
- UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.Items", windows_.size());
-
- // Observe window activations and switchable containers on all root windows
- // for newly created windows during overview.
- Shell::GetInstance()->activation_client()->AddObserver(this);
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- for (aura::Window::Windows::const_iterator iter = root_windows.begin();
- iter != root_windows.end(); ++iter) {
- for (size_t i = 0; i < kSwitchableWindowContainerIdsLength; ++i) {
- aura::Window* container = Shell::GetContainer(*iter,
- kSwitchableWindowContainerIds[i]);
- container->AddObserver(this);
- observed_windows_.insert(container);
- }
- }
-
- if (mode == WindowSelector::CYCLE) {
- cycle_start_time_ = base::Time::Now();
- event_handler_.reset(new WindowSelectorEventFilter(this));
- if (timer_enabled_)
- start_overview_timer_.Reset();
- } else {
- StartOverview();
- }
-}
-
-WindowSelector::~WindowSelector() {
- ResetFocusRestoreWindow(true);
- for (std::set<aura::Window*>::iterator iter = observed_windows_.begin();
- iter != observed_windows_.end(); ++iter) {
- (*iter)->RemoveObserver(this);
- }
- Shell::GetInstance()->activation_client()->RemoveObserver(this);
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- window_overview_.reset();
- // Clearing the window list resets the ignored_by_shelf flag on the windows.
- windows_.clear();
- UpdateShelfVisibility();
-
- if (!cycle_start_time_.is_null()) {
- UMA_HISTOGRAM_MEDIUM_TIMES("Ash.WindowSelector.CycleTime",
- base::Time::Now() - cycle_start_time_);
- }
-}
-
-void WindowSelector::Step(WindowSelector::Direction direction) {
- DCHECK(!windows_.empty());
- // Upgrade to CYCLE mode if currently in OVERVIEW mode.
- if (mode_ != CYCLE) {
- event_handler_.reset(new WindowSelectorEventFilter(this));
- DCHECK(window_overview_);
- // Set the initial selection window to animate to the new selection.
- window_overview_->SetSelection(selected_window_);
- window_overview_->MoveToSingleRootWindow(
- windows_[selected_window_]->GetRootWindow());
- mode_ = CYCLE;
- }
-
- selected_window_ = (selected_window_ + windows_.size() +
- (direction == WindowSelector::FORWARD ? 1 : -1)) % windows_.size();
- if (window_overview_) {
- window_overview_->SetSelection(selected_window_);
- } else {
- base::AutoReset<bool> restoring_focus(&ignore_activations_, true);
- showing_window_.reset(new ScopedShowWindow);
- showing_window_->Show(windows_[selected_window_]->SelectionWindow());
- if (timer_enabled_)
- start_overview_timer_.Reset();
- }
-}
-
-void WindowSelector::SelectWindow() {
- SelectWindow(windows_[selected_window_]->SelectionWindow());
-}
-
-void WindowSelector::SelectWindow(aura::Window* window) {
- ResetFocusRestoreWindow(false);
- if (showing_window_ && showing_window_->window() == window)
- showing_window_->CancelRestore();
- ScopedVector<WindowSelectorItem>::iterator iter =
- std::find_if(windows_.begin(), windows_.end(),
- WindowSelectorItemTargetComparator(window));
- DCHECK(iter != windows_.end());
- // The selected window should not be minimized when window selection is
- // ended.
- (*iter)->RestoreWindowOnExit(window);
- delegate_->OnWindowSelected(window);
-}
-
-void WindowSelector::CancelSelection() {
- delegate_->OnSelectionCanceled();
-}
-
-void WindowSelector::OnWindowAdded(aura::Window* new_window) {
- if (new_window->type() != aura::client::WINDOW_TYPE_NORMAL &&
- new_window->type() != aura::client::WINDOW_TYPE_PANEL) {
- return;
- }
-
- for (size_t i = 0; i < kSwitchableWindowContainerIdsLength; ++i) {
- if (new_window->parent()->id() == kSwitchableWindowContainerIds[i] &&
- !new_window->transient_parent()) {
- // The new window is in one of the switchable containers, abort overview.
- CancelSelection();
- return;
- }
- }
-}
-
-void WindowSelector::OnWindowDestroying(aura::Window* window) {
- // window is one of a container, the restore_focus_window and/or
- // one of the selectable windows in overview.
- ScopedVector<WindowSelectorItem>::iterator iter =
- std::find_if(windows_.begin(), windows_.end(),
- WindowSelectorItemComparator(window));
- window->RemoveObserver(this);
- observed_windows_.erase(window);
- if (window == restore_focus_window_)
- restore_focus_window_ = NULL;
- if (iter == windows_.end())
- return;
-
- (*iter)->RemoveWindow(window);
- // If there are still windows in this selector entry then the overview is
- // still active and the active selection remains the same.
- if (!(*iter)->empty())
- return;
-
- size_t deleted_index = iter - windows_.begin();
- windows_.erase(iter);
- if (windows_.empty()) {
- CancelSelection();
- return;
- }
- if (window_overview_)
- window_overview_->OnWindowsChanged();
- if (mode_ == CYCLE && selected_window_ >= deleted_index) {
- if (selected_window_ > deleted_index)
- selected_window_--;
- selected_window_ = selected_window_ % windows_.size();
- if (window_overview_)
- window_overview_->SetSelection(selected_window_);
- }
-}
-
-void WindowSelector::OnWindowBoundsChanged(aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) {
- if (!window_overview_)
- return;
-
- ScopedVector<WindowSelectorItem>::iterator iter =
- std::find_if(windows_.begin(), windows_.end(),
- WindowSelectorItemTargetComparator(window));
- DCHECK(window == restore_focus_window_ || iter != windows_.end());
- if (iter == windows_.end())
- return;
-
- // Immediately finish any active bounds animation.
- window->layer()->GetAnimator()->StopAnimatingProperty(
- ui::LayerAnimationElement::BOUNDS);
-
- // Recompute the transform for the window.
- (*iter)->RecomputeWindowTransforms();
-}
-
-void WindowSelector::OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) {
- if (ignore_activations_ || !gained_active)
- return;
- // Don't restore focus on exit if a window was just activated.
- ResetFocusRestoreWindow(false);
- CancelSelection();
-}
-
-void WindowSelector::OnAttemptToReactivateWindow(aura::Window* request_active,
- aura::Window* actual_active) {
- if (ignore_activations_)
- return;
- // Don't restore focus on exit if a window was just activated.
- ResetFocusRestoreWindow(false);
- CancelSelection();
-}
-
-void WindowSelector::StartOverview() {
- DCHECK(!window_overview_);
- // Remove focus from active window before entering overview.
- aura::client::GetFocusClient(
- Shell::GetPrimaryRootWindow())->FocusWindow(NULL);
-
- aura::Window* overview_root = NULL;
- if (mode_ == CYCLE) {
- overview_root = GetOverviewDelayOnCycleMilliseconds() <=
- kOverviewDelayInitialMonitorThreshold ?
- windows_.front()->GetRootWindow() :
- windows_[selected_window_]->GetRootWindow();
- }
- window_overview_.reset(new WindowOverview(this, &windows_, overview_root));
- if (mode_ == CYCLE)
- window_overview_->SetSelection(selected_window_);
- UpdateShelfVisibility();
-}
-
-void WindowSelector::ResetFocusRestoreWindow(bool focus) {
- if (!restore_focus_window_)
- return;
- if (focus) {
- base::AutoReset<bool> restoring_focus(&ignore_activations_, true);
- restore_focus_window_->Focus();
- }
- // If the window is in the observed_windows_ list it needs to continue to be
- // observed.
- if (observed_windows_.find(restore_focus_window_) ==
- observed_windows_.end()) {
- restore_focus_window_->RemoveObserver(this);
- }
- restore_focus_window_ = NULL;
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/overview/window_selector.h b/chromium/ash/wm/overview/window_selector.h
deleted file mode 100644
index faee73d1d72..00000000000
--- a/chromium/ash/wm/overview/window_selector.h
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_
-#define ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_
-
-#include <set>
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/scoped_vector.h"
-#include "base/timer/timer.h"
-#include "ui/aura/client/activation_change_observer.h"
-#include "ui/aura/window_observer.h"
-
-namespace aura {
-class RootWindow;
-}
-
-namespace ui {
-class EventHandler;
-}
-
-namespace ash {
-
-namespace internal {
-class WindowSelectorTest;
-}
-
-class ScopedShowWindow;
-class WindowOverview;
-class WindowSelectorDelegate;
-class WindowSelectorItem;
-
-// The WindowSelector allows selecting a window by alt-tabbing (CYCLE mode) or
-// by clicking or tapping on it (OVERVIEW mode). A WindowOverview will be shown
-// in OVERVIEW mode or if the user lingers on a window while alt tabbing.
-class ASH_EXPORT WindowSelector
- : public aura::WindowObserver,
- public aura::client::ActivationChangeObserver {
- public:
- enum Direction {
- FORWARD,
- BACKWARD
- };
- enum Mode {
- CYCLE,
- OVERVIEW
- };
-
- typedef std::vector<aura::Window*> WindowList;
-
- WindowSelector(const WindowList& windows,
- Mode mode,
- WindowSelectorDelegate* delegate);
- virtual ~WindowSelector();
-
- // Step to the next window in |direction|.
- void Step(Direction direction);
-
- // Choose the currently selected window.
- void SelectWindow();
-
- // Choose |window| from the available windows to select.
- void SelectWindow(aura::Window* window);
-
- // Cancels window selection.
- void CancelSelection();
-
- Mode mode() { return mode_; }
-
- // aura::WindowObserver:
- virtual void OnWindowAdded(aura::Window* new_window) OVERRIDE;
- virtual void OnWindowBoundsChanged(aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
-
- // Overridden from aura::client::ActivationChangeObserver:
- virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) OVERRIDE;
- virtual void OnAttemptToReactivateWindow(
- aura::Window* request_active,
- aura::Window* actual_active) OVERRIDE;
-
- private:
- friend class internal::WindowSelectorTest;
-
- // Begins positioning windows such that all windows are visible on the screen.
- void StartOverview();
-
- // Resets the stored window from RemoveFocusAndSetRestoreWindow to NULL. If
- // |focus|, restores focus to the stored window.
- void ResetFocusRestoreWindow(bool focus);
-
- // The collection of items in the overview wrapped by a helper class which
- // restores their state and helps transform them to other root windows.
- ScopedVector<WindowSelectorItem> windows_;
-
- // Tracks observed windows.
- std::set<aura::Window*> observed_windows_;
-
- // The window selection mode.
- Mode mode_;
-
- // An event handler listening for the release of the alt key during alt-tab
- // cycling.
- scoped_ptr<ui::EventHandler> event_handler_;
-
- // The currently selected window being shown (temporarily brought to the front
- // of the stacking order and made visible).
- scoped_ptr<ScopedShowWindow> showing_window_;
-
- bool timer_enabled_;
- base::DelayTimer<WindowSelector> start_overview_timer_;
- scoped_ptr<WindowOverview> window_overview_;
-
- // The time when window cycling was started.
- base::Time cycle_start_time_;
-
- // Weak pointer to the selector delegate which will be called when a
- // selection is made.
- WindowSelectorDelegate* delegate_;
-
- // Index of the currently selected window if the mode is CYCLE.
- size_t selected_window_;
-
- // A weak pointer to the window which was focused on beginning window
- // selection. If window selection is canceled the focus should be restored to
- // this window.
- aura::Window* restore_focus_window_;
-
- // True when performing operations that may cause window activations. This is
- // used to prevent handling the resulting expected activation.
- bool ignore_activations_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowSelector);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_
diff --git a/chromium/ash/wm/overview/window_selector_controller.cc b/chromium/ash/wm/overview/window_selector_controller.cc
deleted file mode 100644
index e80490e421c..00000000000
--- a/chromium/ash/wm/overview/window_selector_controller.cc
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/overview/window_selector_controller.h"
-
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/root_window_controller.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/wm/mru_window_tracker.h"
-#include "ash/wm/overview/window_selector.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "base/metrics/histogram.h"
-#include "ui/aura/window.h"
-
-namespace ash {
-
-WindowSelectorController::WindowSelectorController() {
-}
-
-WindowSelectorController::~WindowSelectorController() {
-}
-
-// static
-bool WindowSelectorController::CanSelect() {
- // Don't allow a window overview if the screen is locked or a modal dialog is
- // open.
- return !Shell::GetInstance()->session_state_delegate()->IsScreenLocked() &&
- !Shell::GetInstance()->IsSystemModalWindowOpen();
-}
-
-void WindowSelectorController::ToggleOverview() {
- if (IsSelecting()) {
- OnSelectionCanceled();
- } else {
- std::vector<aura::Window*> windows = ash::Shell::GetInstance()->
- mru_window_tracker()->BuildMruWindowList();
- // Don't enter overview mode with no windows.
- if (windows.empty())
- return;
-
- window_selector_.reset(
- new WindowSelector(windows, WindowSelector::OVERVIEW, this));
- OnSelectionStarted();
- }
-}
-
-void WindowSelectorController::HandleCycleWindow(
- WindowSelector::Direction direction) {
- if (!CanSelect())
- return;
-
- if (!IsSelecting()) {
- std::vector<aura::Window*> windows = ash::Shell::GetInstance()->
- mru_window_tracker()->BuildMruWindowList();
- // Don't cycle with no windows.
- if (windows.empty())
- return;
-
- window_selector_.reset(
- new WindowSelector(windows, WindowSelector::CYCLE, this));
- OnSelectionStarted();
- }
- window_selector_->Step(direction);
-}
-
-bool WindowSelectorController::IsSelecting() {
- return window_selector_.get() != NULL;
-}
-
-void WindowSelectorController::OnWindowSelected(aura::Window* window) {
- window_selector_.reset();
- wm::ActivateWindow(window);
- last_selection_time_ = base::Time::Now();
- Shell::GetInstance()->mru_window_tracker()->SetIgnoreActivations(false);
-}
-
-void WindowSelectorController::OnSelectionCanceled() {
- window_selector_.reset();
- last_selection_time_ = base::Time::Now();
- Shell::GetInstance()->mru_window_tracker()->SetIgnoreActivations(false);
-}
-
-void WindowSelectorController::OnSelectionStarted() {
- Shell::GetInstance()->mru_window_tracker()->SetIgnoreActivations(true);
- Shell* shell = Shell::GetInstance();
- shell->metrics()->RecordUserMetricsAction(UMA_WINDOW_SELECTION);
- if (!last_selection_time_.is_null()) {
- UMA_HISTOGRAM_LONG_TIMES(
- "Ash.WindowSelector.TimeBetweenUse",
- base::Time::Now() - last_selection_time_);
- }
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/overview/window_selector_controller.h b/chromium/ash/wm/overview/window_selector_controller.h
deleted file mode 100644
index 2bd9697a31a..00000000000
--- a/chromium/ash/wm/overview/window_selector_controller.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_
-#define ASH_WM_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_
-
-#include <list>
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "ash/wm/overview/window_selector.h"
-#include "ash/wm/overview/window_selector_delegate.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/time/time.h"
-#include "ui/aura/window_observer.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-
-namespace internal {
-class WindowSelectorTest;
-}
-
-class WindowSelector;
-
-// Manages a window selector which displays an overview of all windows and
-// allows selecting a window to activate it.
-class ASH_EXPORT WindowSelectorController
- : public WindowSelectorDelegate {
- public:
- WindowSelectorController();
- virtual ~WindowSelectorController();
-
- // Returns true if selecting windows in an overview is enabled. This is false
- // at certain times, such as when the lock screen is visible.
- static bool CanSelect();
-
- // Enters overview mode. This is essentially the window cycling mode however
- // not released on releasing the alt key and allows selecting with the mouse
- // or touch rather than keypresses.
- void ToggleOverview();
-
- // Cycles between windows in the given |direction|. It is assumed that the
- // alt key is held down and a key filter is installed to watch for alt being
- // released.
- void HandleCycleWindow(WindowSelector::Direction direction);
-
- // Returns true if window selection mode is active.
- bool IsSelecting();
-
- // WindowSelectorDelegate:
- virtual void OnWindowSelected(aura::Window* window) OVERRIDE;
- virtual void OnSelectionCanceled() OVERRIDE;
-
- private:
- friend class internal::WindowSelectorTest;
-
- // Dispatched when window selection begins.
- void OnSelectionStarted();
-
- scoped_ptr<WindowSelector> window_selector_;
- base::Time last_selection_time_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowSelectorController);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_
diff --git a/chromium/ash/wm/overview/window_selector_delegate.h b/chromium/ash/wm/overview/window_selector_delegate.h
deleted file mode 100644
index 2bce3ca3fd7..00000000000
--- a/chromium/ash/wm/overview/window_selector_delegate.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_OVERVIEW_WINDOW_SELECTOR_DELEGATE_H_
-#define ASH_WM_OVERVIEW_WINDOW_SELECTOR_DELEGATE_H_
-
-#include "ash/ash_export.h"
-#include "base/compiler_specific.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-
-// Implement this class to handle the selection event from WindowSelector.
-class ASH_EXPORT WindowSelectorDelegate {
- public:
- // Invoked when a window is selected.
- virtual void OnWindowSelected(aura::Window* window) = 0;
-
- // Invoked if selection is canceled.
- virtual void OnSelectionCanceled() = 0;
-
- protected:
- virtual ~WindowSelectorDelegate() {}
-};
-
-} // namespace ash
-
-#endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_DELEGATE_H_
diff --git a/chromium/ash/wm/overview/window_selector_item.cc b/chromium/ash/wm/overview/window_selector_item.cc
deleted file mode 100644
index a2c25b617e9..00000000000
--- a/chromium/ash/wm/overview/window_selector_item.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/overview/window_selector_item.h"
-#include "base/auto_reset.h"
-#include "ui/aura/window.h"
-
-namespace ash {
-
-WindowSelectorItem::WindowSelectorItem()
- : root_window_(NULL),
- in_bounds_update_(false) {
-}
-
-WindowSelectorItem::~WindowSelectorItem() {
-}
-
-void WindowSelectorItem::SetBounds(aura::Window* root_window,
- const gfx::Rect& target_bounds) {
- if (in_bounds_update_)
- return;
- base::AutoReset<bool> auto_reset_in_bounds_update(&in_bounds_update_, true);
- root_window_ = root_window;
- target_bounds_ = target_bounds;
- SetItemBounds(root_window, target_bounds, true);
-}
-
-void WindowSelectorItem::RecomputeWindowTransforms() {
- if (in_bounds_update_ || target_bounds_.IsEmpty())
- return;
- DCHECK(root_window_);
- base::AutoReset<bool> auto_reset_in_bounds_update(&in_bounds_update_, true);
- SetItemBounds(root_window_, target_bounds_, false);
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/overview/window_selector_item.h b/chromium/ash/wm/overview/window_selector_item.h
deleted file mode 100644
index 0ea7178976a..00000000000
--- a/chromium/ash/wm/overview/window_selector_item.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_
-#define ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_
-
-#include "base/compiler_specific.h"
-#include "ui/gfx/rect.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-
-// This class represents an item in overview mode. An item can have one or more
-// windows, of which only one can be activated by keyboard (i.e. alt+tab) but
-// any can be selected with a pointer (touch or mouse).
-class WindowSelectorItem {
- public:
- WindowSelectorItem();
- virtual ~WindowSelectorItem();
-
- // Returns the root window on which this item is shown.
- virtual aura::Window* GetRootWindow() = 0;
-
- // Returns true if the window selector item has |window| as a selectable
- // window.
- virtual bool HasSelectableWindow(const aura::Window* window) = 0;
-
- // Returns the targeted window given the event |target| window.
- // Returns NULL if no Window in this item was selected.
- virtual aura::Window* TargetedWindow(const aura::Window* target) = 0;
-
- // Restores |window| on exiting window overview rather than returning it
- // to its previous state.
- virtual void RestoreWindowOnExit(aura::Window* window) = 0;
-
- // Returns the |window| to activate on selecting of this item.
- virtual aura::Window* SelectionWindow() = 0;
-
- // Removes |window| from this item. Check empty() after calling this to see
- // if the entire item is now empty.
- virtual void RemoveWindow(const aura::Window* window) = 0;
-
- // Returns true if this item has no more selectable windows (i.e. after
- // calling RemoveWindow for the last contained window).
- virtual bool empty() const = 0;
-
- // Dispatched before beginning window overview. This will do any necessary
- // one time actions such as restoring minimized windows.
- virtual void PrepareForOverview() = 0;
-
- // Sets the bounds of this window selector item to |target_bounds| in the
- // |root_window| root window.
- void SetBounds(aura::Window* root_window,
- const gfx::Rect& target_bounds);
-
- // Recomputes the positions for the windows in this selection item. This is
- // dispatched when the bounds of a window change.
- void RecomputeWindowTransforms();
-
- const gfx::Rect& bounds() { return bounds_; }
- const gfx::Rect& target_bounds() { return target_bounds_; }
-
- protected:
- // Sets the bounds of this selector item to |target_bounds| in |root_window|.
- // If |animate| the windows are animated from their current location.
- virtual void SetItemBounds(aura::Window* root_window,
- const gfx::Rect& target_bounds,
- bool animate) = 0;
-
- // Sets the bounds used by the selector item's windows.
- void set_bounds(const gfx::Rect& bounds) { bounds_ = bounds; }
-
- private:
- // The root window this item is being displayed on.
- aura::Window* root_window_;
-
- // The target bounds this selector item is fit within.
- gfx::Rect target_bounds_;
-
- // The actual bounds of the window(s) for this item. The aspect ratio of
- // window(s) are maintained so they may not fill the target_bounds_.
- gfx::Rect bounds_;
-
- // True if running SetItemBounds. This prevents recursive calls resulting from
- // the bounds update when calling views::corewm::RecreateWindowLayers to copy
- // a window layer for display on another monitor.
- bool in_bounds_update_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_
diff --git a/chromium/ash/wm/overview/window_selector_panels.cc b/chromium/ash/wm/overview/window_selector_panels.cc
deleted file mode 100644
index 914b84866de..00000000000
--- a/chromium/ash/wm/overview/window_selector_panels.cc
+++ /dev/null
@@ -1,184 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/overview/window_selector_panels.h"
-
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/overview/scoped_transform_overview_window.h"
-#include "ash/wm/panels/panel_layout_manager.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animation_observer.h"
-#include "ui/compositor/layer_animation_sequence.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-
-namespace {
-
-const int kPanelCalloutFadeInDurationMilliseconds = 50;
-
-// This class extends ScopedTransformOverviewMode to hide and show the callout
-// widget for a panel window when entering / leaving overview mode.
-class ScopedTransformPanelWindow : public ScopedTransformOverviewWindow {
- public:
- ScopedTransformPanelWindow(aura::Window* window);
- virtual ~ScopedTransformPanelWindow();
-
- // ScopedTransformOverviewWindow overrides:
- virtual void PrepareForOverview() OVERRIDE;
-
- private:
- // Returns the callout widget for the transformed panel.
- views::Widget* GetCalloutWidget();
-
- // Restores the callout visibility.
- void RestoreCallout();
-
- // Trigger relayout
- void Relayout();
-
- bool callout_visible_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedTransformPanelWindow);
-};
-
-ScopedTransformPanelWindow::ScopedTransformPanelWindow(aura::Window* window)
- : ScopedTransformOverviewWindow(window) {
-}
-
-ScopedTransformPanelWindow::~ScopedTransformPanelWindow() {
- // window() will be NULL if the window was destroyed.
- if (window())
- RestoreCallout();
-}
-
-void ScopedTransformPanelWindow::PrepareForOverview() {
- ScopedTransformOverviewWindow::PrepareForOverview();
- GetCalloutWidget()->GetLayer()->SetOpacity(0.0f);
-}
-
-views::Widget* ScopedTransformPanelWindow::GetCalloutWidget() {
- DCHECK(window()->parent()->id() == internal::kShellWindowId_PanelContainer);
- internal::PanelLayoutManager* panel_layout_manager =
- static_cast<internal::PanelLayoutManager*>(
- window()->parent()->layout_manager());
- return panel_layout_manager->GetCalloutWidgetForPanel(window());
-}
-
-void ScopedTransformPanelWindow::RestoreCallout() {
- scoped_ptr<ui::LayerAnimationSequence> sequence(
- new ui::LayerAnimationSequence);
- ui::LayerAnimationElement::AnimatableProperties paused_properties;
- paused_properties.insert(ui::LayerAnimationElement::OPACITY);
- sequence->AddElement(ui::LayerAnimationElement::CreatePauseElement(
- paused_properties, base::TimeDelta::FromMilliseconds(
- ScopedTransformOverviewWindow::kTransitionMilliseconds)));
- sequence->AddElement(ui::LayerAnimationElement::CreateOpacityElement(1,
- base::TimeDelta::FromMilliseconds(
- kPanelCalloutFadeInDurationMilliseconds)));
- GetCalloutWidget()->GetLayer()->GetAnimator()->StartAnimation(
- sequence.release());
-}
-
-} // namespace
-
-WindowSelectorPanels::WindowSelectorPanels() {
-}
-
-WindowSelectorPanels::~WindowSelectorPanels() {
-}
-
-void WindowSelectorPanels::AddWindow(aura::Window* window) {
- transform_windows_.push_back(new ScopedTransformPanelWindow(window));
-}
-
-aura::Window* WindowSelectorPanels::GetRootWindow() {
- return transform_windows_.front()->window()->GetRootWindow();
-}
-
-bool WindowSelectorPanels::HasSelectableWindow(const aura::Window* window) {
- for (WindowList::const_iterator iter = transform_windows_.begin();
- iter != transform_windows_.end(); ++iter) {
- if ((*iter)->window() == window)
- return true;
- }
- return false;
-}
-
-aura::Window* WindowSelectorPanels::TargetedWindow(const aura::Window* target) {
- for (WindowList::const_iterator iter = transform_windows_.begin();
- iter != transform_windows_.end(); ++iter) {
- if ((*iter)->Contains(target))
- return (*iter)->window();
- }
- return NULL;
-}
-
-void WindowSelectorPanels::RestoreWindowOnExit(aura::Window* window) {
- for (WindowList::iterator iter = transform_windows_.begin();
- iter != transform_windows_.end(); ++iter) {
- if ((*iter)->Contains(window)) {
- (*iter)->RestoreWindowOnExit();
- break;
- }
- }
-}
-
-aura::Window* WindowSelectorPanels::SelectionWindow() {
- return transform_windows_.front()->window();
-}
-
-void WindowSelectorPanels::RemoveWindow(const aura::Window* window) {
- for (WindowList::iterator iter = transform_windows_.begin();
- iter != transform_windows_.end(); ++iter) {
- if ((*iter)->window() == window) {
- (*iter)->OnWindowDestroyed();
- transform_windows_.erase(iter);
- break;
- }
- }
-}
-
-bool WindowSelectorPanels::empty() const {
- return transform_windows_.empty();
-}
-
-void WindowSelectorPanels::PrepareForOverview() {
- for (WindowList::iterator iter = transform_windows_.begin();
- iter != transform_windows_.end(); ++iter) {
- (*iter)->PrepareForOverview();
- }
-}
-
-void WindowSelectorPanels::SetItemBounds(aura::Window* root_window,
- const gfx::Rect& target_bounds,
- bool animate) {
- gfx::Rect bounding_rect;
- for (WindowList::iterator iter = transform_windows_.begin();
- iter != transform_windows_.end(); ++iter) {
- bounding_rect.Union((*iter)->GetBoundsInScreen());
- }
- set_bounds(ScopedTransformOverviewWindow::
- ShrinkRectToFitPreservingAspectRatio(bounding_rect, target_bounds));
- gfx::Transform bounding_transform =
- ScopedTransformOverviewWindow::GetTransformForRect(bounding_rect,
- bounds());
- for (WindowList::iterator iter = transform_windows_.begin();
- iter != transform_windows_.end(); ++iter) {
- gfx::Transform transform;
- gfx::Rect bounds = (*iter)->GetBoundsInScreen();
- transform.Translate(bounding_rect.x() - bounds.x(),
- bounding_rect.y() - bounds.y());
- transform.PreconcatTransform(bounding_transform);
- transform.Translate(bounds.x() - bounding_rect.x(),
- bounds.y() - bounding_rect.y());
- (*iter)->SetTransform(root_window, transform, animate);
- }
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/overview/window_selector_panels.h b/chromium/ash/wm/overview/window_selector_panels.h
deleted file mode 100644
index 88c31a24719..00000000000
--- a/chromium/ash/wm/overview/window_selector_panels.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_OVERVIEW_WINDOW_SELECTOR_PANELS_H_
-#define ASH_WM_OVERVIEW_WINDOW_SELECTOR_PANELS_H_
-
-#include "ash/wm/overview/window_selector_item.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_vector.h"
-#include "ui/gfx/rect.h"
-
-namespace ash {
-
-class ScopedTransformOverviewWindow;
-
-// This class implements a window selector item containing one or more attached
-// panel windows. These panels are grouped into a single overview item in
-// overview mode and the callout arrows are hidden at this point.
-class WindowSelectorPanels : public WindowSelectorItem {
- public:
- WindowSelectorPanels();
- virtual ~WindowSelectorPanels();
-
- // Adds |window| to the selector item. This window should be an attached
- // panel window.
- void AddWindow(aura::Window* window);
-
- // WindowSelectorItem:
- virtual aura::Window* GetRootWindow() OVERRIDE;
- virtual bool HasSelectableWindow(const aura::Window* window) OVERRIDE;
- virtual aura::Window* TargetedWindow(const aura::Window* target) OVERRIDE;
- virtual void RestoreWindowOnExit(aura::Window* window) OVERRIDE;
- virtual aura::Window* SelectionWindow() OVERRIDE;
- virtual void RemoveWindow(const aura::Window* window) OVERRIDE;
- virtual bool empty() const OVERRIDE;
- virtual void PrepareForOverview() OVERRIDE;
- virtual void SetItemBounds(aura::Window* root_window,
- const gfx::Rect& target_bounds,
- bool animate) OVERRIDE;
-
- private:
- typedef ScopedVector<ScopedTransformOverviewWindow> WindowList;
- WindowList transform_windows_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowSelectorPanels);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_PANELS_H_
diff --git a/chromium/ash/wm/overview/window_selector_unittest.cc b/chromium/ash/wm/overview/window_selector_unittest.cc
deleted file mode 100644
index 199f4a72c20..00000000000
--- a/chromium/ash/wm/overview/window_selector_unittest.cc
+++ /dev/null
@@ -1,998 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/launcher/launcher.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/launcher_test_api.h"
-#include "ash/test/shelf_view_test_api.h"
-#include "ash/test/shell_test_api.h"
-#include "ash/test/test_shelf_delegate.h"
-#include "ash/wm/mru_window_tracker.h"
-#include "ash/wm/overview/window_selector.h"
-#include "ash/wm/overview/window_selector_controller.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_vector.h"
-#include "base/run_loop.h"
-#include "ui/aura/client/activation_delegate.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/client/cursor_client.h"
-#include "ui/aura/client/focus_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/scoped_animation_duration_scale_mode.h"
-#include "ui/gfx/rect_conversions.h"
-#include "ui/gfx/transform.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-class NonActivatableActivationDelegate
- : public aura::client::ActivationDelegate {
- public:
- virtual bool ShouldActivate() const OVERRIDE {
- return false;
- }
-};
-
-bool IsWindowAbove(aura::Window* w1, aura::Window* w2) {
- aura::Window* parent = w1->parent();
- DCHECK_EQ(parent, w2->parent());
- for (aura::Window::Windows::const_iterator iter = parent->children().begin();
- iter != parent->children().end(); ++iter) {
- if (*iter == w1)
- return false;
- if (*iter == w2)
- return true;
- }
- NOTREACHED();
- return false;
-}
-
-aura::Window* GetWindowByName(aura::Window* container,
- const std::string& name) {
- aura::Window* window = NULL;
- for (aura::Window::Windows::const_iterator iter =
- container->children().begin(); iter != container->children().end();
- ++iter) {
- if ((*iter)->name() == name) {
- // The name should be unique.
- DCHECK(!window);
- window = *iter;
- }
- }
- return window;
-}
-
-// Returns the copy of |window| created for overview. It is found using the
-// window name which should be the same as the source window's name with a
-// special suffix, and in the same container as the source window.
-aura::Window* GetCopyWindow(aura::Window* window) {
- aura::Window* copy_window = NULL;
- std::string copy_name = window->name() + " (Copy)";
- std::vector<aura::Window*> containers(
- Shell::GetContainersFromAllRootWindows(window->parent()->id(), NULL));
- for (std::vector<aura::Window*>::iterator iter = containers.begin();
- iter != containers.end(); ++iter) {
- aura::Window* found = GetWindowByName(*iter, copy_name);
- if (found) {
- // There should only be one copy window.
- DCHECK(!copy_window);
- copy_window = found;
- }
- }
- return copy_window;
-}
-
-} // namespace
-
-class WindowSelectorTest : public test::AshTestBase {
- public:
- WindowSelectorTest() {}
- virtual ~WindowSelectorTest() {}
-
- virtual void SetUp() OVERRIDE {
- test::AshTestBase::SetUp();
- ASSERT_TRUE(test::TestShelfDelegate::instance());
-
- shelf_view_test_.reset(new test::ShelfViewTestAPI(
- test::LauncherTestAPI(Launcher::ForPrimaryDisplay()).shelf_view()));
- shelf_view_test_->SetAnimationDuration(1);
- }
-
- aura::Window* CreateWindow(const gfx::Rect& bounds) {
- return CreateTestWindowInShellWithDelegate(&delegate_, -1, bounds);
- }
-
- aura::Window* CreateNonActivatableWindow(const gfx::Rect& bounds) {
- aura::Window* window = CreateWindow(bounds);
- aura::client::SetActivationDelegate(window,
- &non_activatable_activation_delegate_);
- EXPECT_FALSE(ash::wm::CanActivateWindow(window));
- return window;
- }
-
- aura::Window* CreatePanelWindow(const gfx::Rect& bounds) {
- aura::Window* window = CreateTestWindowInShellWithDelegateAndType(
- NULL, aura::client::WINDOW_TYPE_PANEL, 0, bounds);
- test::TestShelfDelegate::instance()->AddLauncherItem(window);
- shelf_view_test()->RunMessageLoopUntilAnimationsDone();
- return window;
- }
-
- bool WindowsOverlapping(aura::Window* window1, aura::Window* window2) {
- gfx::RectF window1_bounds = GetTransformedTargetBounds(window1);
- gfx::RectF window2_bounds = GetTransformedTargetBounds(window2);
- return window1_bounds.Intersects(window2_bounds);
- }
-
- void ToggleOverview() {
- ash::Shell::GetInstance()->window_selector_controller()->ToggleOverview();
- }
-
- void Cycle(WindowSelector::Direction direction) {
- ash::Shell::GetInstance()->window_selector_controller()->
- HandleCycleWindow(direction);
- }
-
- void StopCycling() {
- ash::Shell::GetInstance()->window_selector_controller()->window_selector_->
- SelectWindow();
- }
-
- void FireOverviewStartTimer() {
- // Calls the method to start overview mode which is normally called by the
- // timer. The timer will still fire and call this method triggering the
- // DCHECK that overview mode was not already started, except that we call
- // StopCycling before the timer has a chance to fire.
- ash::Shell::GetInstance()->window_selector_controller()->window_selector_->
- StartOverview();
- }
-
- gfx::Transform GetTransformRelativeTo(gfx::PointF origin,
- const gfx::Transform& transform) {
- gfx::Transform t;
- t.Translate(origin.x(), origin.y());
- t.PreconcatTransform(transform);
- t.Translate(-origin.x(), -origin.y());
- return t;
- }
-
- gfx::RectF GetTransformedBounds(aura::Window* window) {
- gfx::RectF bounds(ash::ScreenAsh::ConvertRectToScreen(
- window->parent(), window->layer()->bounds()));
- gfx::Transform transform(GetTransformRelativeTo(bounds.origin(),
- window->layer()->transform()));
- transform.TransformRect(&bounds);
- return bounds;
- }
-
- gfx::RectF GetTransformedTargetBounds(aura::Window* window) {
- gfx::RectF bounds(ash::ScreenAsh::ConvertRectToScreen(
- window->parent(), window->layer()->GetTargetBounds()));
- gfx::Transform transform(GetTransformRelativeTo(bounds.origin(),
- window->layer()->GetTargetTransform()));
- transform.TransformRect(&bounds);
- return bounds;
- }
-
- void ClickWindow(aura::Window* window) {
- aura::test::EventGenerator event_generator(window->GetRootWindow(), window);
- gfx::RectF target = GetTransformedBounds(window);
- event_generator.ClickLeftButton();
- }
-
- bool IsSelecting() {
- return ash::Shell::GetInstance()->window_selector_controller()->
- IsSelecting();
- }
-
- aura::Window* GetFocusedWindow() {
- return aura::client::GetFocusClient(
- Shell::GetPrimaryRootWindow())->GetFocusedWindow();
- }
-
- test::ShelfViewTestAPI* shelf_view_test() {
- return shelf_view_test_.get();
- }
-
- private:
- aura::test::TestWindowDelegate delegate_;
- NonActivatableActivationDelegate non_activatable_activation_delegate_;
- scoped_ptr<test::ShelfViewTestAPI> shelf_view_test_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowSelectorTest);
-};
-
-// Tests entering overview mode with two windows and selecting one.
-TEST_F(WindowSelectorTest, Basic) {
- gfx::Rect bounds(0, 0, 400, 400);
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- scoped_ptr<aura::Window> panel1(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> panel2(CreatePanelWindow(bounds));
- EXPECT_TRUE(WindowsOverlapping(window1.get(), window2.get()));
- EXPECT_TRUE(WindowsOverlapping(panel1.get(), panel2.get()));
- wm::ActivateWindow(window2.get());
- EXPECT_FALSE(wm::IsActiveWindow(window1.get()));
- EXPECT_TRUE(wm::IsActiveWindow(window2.get()));
- EXPECT_EQ(window2.get(), GetFocusedWindow());
- // Hide the cursor before entering overview to test that it will be shown.
- aura::client::GetCursorClient(root_window)->HideCursor();
-
- // In overview mode the windows should no longer overlap and focus should
- // be removed from the window.
- ToggleOverview();
- EXPECT_EQ(NULL, GetFocusedWindow());
- EXPECT_FALSE(WindowsOverlapping(window1.get(), window2.get()));
- EXPECT_FALSE(WindowsOverlapping(window1.get(), panel1.get()));
- // Panels 1 and 2 should still be overlapping being in a single selector
- // item.
- EXPECT_TRUE(WindowsOverlapping(panel1.get(), panel2.get()));
-
- // The cursor should be visible and locked as a pointer
- EXPECT_EQ(ui::kCursorPointer,
- root_window->GetDispatcher()->last_cursor().native_type());
- EXPECT_TRUE(aura::client::GetCursorClient(root_window)->IsCursorLocked());
- EXPECT_TRUE(aura::client::GetCursorClient(root_window)->IsCursorVisible());
-
- // Clicking window 1 should activate it.
- ClickWindow(window1.get());
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
- EXPECT_FALSE(wm::IsActiveWindow(window2.get()));
- EXPECT_EQ(window1.get(), GetFocusedWindow());
-
- // Cursor should have been unlocked.
- EXPECT_FALSE(aura::client::GetCursorClient(root_window)->IsCursorLocked());
-}
-
-// Tests entering overview mode with two windows and selecting one.
-TEST_F(WindowSelectorTest, FullscreenWindow) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- scoped_ptr<aura::Window> panel1(CreatePanelWindow(bounds));
- wm::ActivateWindow(window1.get());
-
- wm::GetWindowState(window1.get())->ToggleFullscreen();
- // The panel is hidden in fullscreen mode.
- EXPECT_FALSE(panel1->IsVisible());
- EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen());
-
- // Enter overview and select the fullscreen window.
- ToggleOverview();
-
- // The panel becomes temporarily visible for the overview.
- EXPECT_TRUE(panel1->IsVisible());
- ClickWindow(window1.get());
-
- // The window is still fullscreen as it was selected. The panel should again
- // be hidden.
- EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen());
- EXPECT_FALSE(panel1->IsVisible());
-
- // Entering overview and selecting another window, the previous window remains
- // fullscreen.
- // TODO(flackr): Currently the panel remains hidden, but should become visible
- // again.
- ToggleOverview();
- ClickWindow(window2.get());
- EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen());
-}
-
-// Tests that the shelf dimming state is removed while in overview and restored
-// on exiting overview.
-TEST_F(WindowSelectorTest, OverviewUndimsShelf) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- wm::WindowState* window_state = wm::GetWindowState(window1.get());
- window_state->Maximize();
- ash::ShelfWidget* shelf = Shell::GetPrimaryRootWindowController()->shelf();
- EXPECT_TRUE(shelf->GetDimsShelf());
- ToggleOverview();
- EXPECT_FALSE(shelf->GetDimsShelf());
- ToggleOverview();
- EXPECT_TRUE(shelf->GetDimsShelf());
-}
-
-// Tests that beginning window selection hides the app list.
-TEST_F(WindowSelectorTest, SelectingHidesAppList) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- Shell::GetInstance()->ToggleAppList(NULL);
- EXPECT_TRUE(Shell::GetInstance()->GetAppListTargetVisibility());
- ToggleOverview();
- EXPECT_FALSE(Shell::GetInstance()->GetAppListTargetVisibility());
- ToggleOverview();
-
- // The app list uses an animation to fade out. If it is toggled on immediately
- // after being removed the old widget is re-used and it does not gain focus.
- // When running under normal circumstances this shouldn't be possible, but
- // it is in a test without letting the message loop run.
- RunAllPendingInMessageLoop();
-
- Shell::GetInstance()->ToggleAppList(NULL);
- EXPECT_TRUE(Shell::GetInstance()->GetAppListTargetVisibility());
- Cycle(WindowSelector::FORWARD);
- EXPECT_FALSE(Shell::GetInstance()->GetAppListTargetVisibility());
- StopCycling();
-}
-
-// Tests that a minimized window's visibility and layer visibility is correctly
-// changed when entering overview and restored when leaving overview mode.
-TEST_F(WindowSelectorTest, MinimizedWindowVisibility) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- wm::WindowState* window_state = wm::GetWindowState(window1.get());
- window_state->Minimize();
- EXPECT_FALSE(window1->IsVisible());
- EXPECT_FALSE(window1->layer()->GetTargetVisibility());
- {
- ui::ScopedAnimationDurationScaleMode normal_duration_mode(
- ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
- ToggleOverview();
- EXPECT_TRUE(window1->IsVisible());
- EXPECT_TRUE(window1->layer()->GetTargetVisibility());
- }
- {
- ui::ScopedAnimationDurationScaleMode normal_duration_mode(
- ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
- ToggleOverview();
- EXPECT_FALSE(window1->IsVisible());
- EXPECT_FALSE(window1->layer()->GetTargetVisibility());
- }
-}
-
-// Tests that a bounds change during overview is corrected for.
-TEST_F(WindowSelectorTest, BoundsChangeDuringOverview) {
- scoped_ptr<aura::Window> window(CreateWindow(gfx::Rect(0, 0, 400, 400)));
- ToggleOverview();
- gfx::Rect overview_bounds =
- ToEnclosingRect(GetTransformedTargetBounds(window.get()));
- window->SetBounds(gfx::Rect(200, 0, 200, 200));
- gfx::Rect new_overview_bounds =
- ToEnclosingRect(GetTransformedTargetBounds(window.get()));
- EXPECT_EQ(overview_bounds.x(), new_overview_bounds.x());
- EXPECT_EQ(overview_bounds.y(), new_overview_bounds.y());
- EXPECT_EQ(overview_bounds.width(), new_overview_bounds.width());
- EXPECT_EQ(overview_bounds.height(), new_overview_bounds.height());
- ToggleOverview();
-}
-
-// Tests entering overview mode with three windows and cycling through them.
-TEST_F(WindowSelectorTest, BasicCycle) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- scoped_ptr<aura::Window> window3(CreateWindow(bounds));
- wm::ActivateWindow(window3.get());
- wm::ActivateWindow(window2.get());
- wm::ActivateWindow(window1.get());
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
- EXPECT_FALSE(wm::IsActiveWindow(window2.get()));
- EXPECT_FALSE(wm::IsActiveWindow(window3.get()));
-
- Cycle(WindowSelector::FORWARD);
- EXPECT_TRUE(IsSelecting());
- EXPECT_TRUE(wm::IsActiveWindow(window2.get()));
-
- Cycle(WindowSelector::FORWARD);
- EXPECT_TRUE(wm::IsActiveWindow(window3.get()));
-
- StopCycling();
- EXPECT_FALSE(IsSelecting());
- EXPECT_FALSE(wm::IsActiveWindow(window1.get()));
- EXPECT_FALSE(wm::IsActiveWindow(window2.get()));
- EXPECT_TRUE(wm::IsActiveWindow(window3.get()));
-}
-
-// Tests that cycling through windows preserves the window stacking order.
-TEST_F(WindowSelectorTest, CyclePreservesStackingOrder) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- scoped_ptr<aura::Window> window3(CreateWindow(bounds));
- wm::ActivateWindow(window3.get());
- wm::ActivateWindow(window2.get());
- wm::ActivateWindow(window1.get());
- // Window order from top to bottom is 1, 2, 3.
- EXPECT_TRUE(IsWindowAbove(window1.get(), window2.get()));
- EXPECT_TRUE(IsWindowAbove(window2.get(), window3.get()));
-
- // On window 2.
- Cycle(WindowSelector::FORWARD);
- EXPECT_TRUE(IsWindowAbove(window2.get(), window1.get()));
- EXPECT_TRUE(IsWindowAbove(window1.get(), window3.get()));
-
- // On window 3.
- Cycle(WindowSelector::FORWARD);
- EXPECT_TRUE(IsWindowAbove(window3.get(), window1.get()));
- EXPECT_TRUE(IsWindowAbove(window1.get(), window2.get()));
-
- // Back on window 1.
- Cycle(WindowSelector::FORWARD);
- EXPECT_TRUE(IsWindowAbove(window1.get(), window2.get()));
- EXPECT_TRUE(IsWindowAbove(window2.get(), window3.get()));
- StopCycling();
-}
-
-// Tests that cycling through windows shows and minimizes windows as they
-// are passed.
-TEST_F(WindowSelectorTest, CyclePreservesMinimization) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- wm::ActivateWindow(window2.get());
- wm::GetWindowState(window2.get())->Minimize();
- wm::ActivateWindow(window1.get());
- EXPECT_TRUE(wm::IsWindowMinimized(window2.get()));
-
- // On window 2.
- Cycle(WindowSelector::FORWARD);
- EXPECT_FALSE(wm::IsWindowMinimized(window2.get()));
-
- // Back on window 1.
- Cycle(WindowSelector::FORWARD);
- EXPECT_TRUE(wm::IsWindowMinimized(window2.get()));
-
- StopCycling();
- EXPECT_TRUE(wm::IsWindowMinimized(window2.get()));
-}
-
-// Tests beginning cycling while in overview mode.
-TEST_F(WindowSelectorTest, OverviewTransitionToCycle) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- wm::ActivateWindow(window2.get());
- wm::ActivateWindow(window1.get());
-
- ToggleOverview();
- Cycle(WindowSelector::FORWARD);
- StopCycling();
-
- EXPECT_TRUE(wm::IsActiveWindow(window2.get()));
- EXPECT_FALSE(wm::IsActiveWindow(window1.get()));
- EXPECT_EQ(window2.get(), GetFocusedWindow());
-}
-
-// Tests cycles between panel and normal windows.
-TEST_F(WindowSelectorTest, CyclePanels) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- scoped_ptr<aura::Window> panel1(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> panel2(CreatePanelWindow(bounds));
- wm::ActivateWindow(window2.get());
- wm::ActivateWindow(window1.get());
- wm::ActivateWindow(panel2.get());
- wm::ActivateWindow(panel1.get());
- EXPECT_TRUE(wm::IsActiveWindow(panel1.get()));
-
- // Cycling once should select window1 since the panels are grouped into a
- // single selectable item.
- Cycle(WindowSelector::FORWARD);
- StopCycling();
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
-
- // Cycling again should select the most recently used panel.
- Cycle(WindowSelector::FORWARD);
- StopCycling();
- EXPECT_TRUE(wm::IsActiveWindow(panel1.get()));
-}
-
-// Tests the visibility of panel windows during cycling.
-TEST_F(WindowSelectorTest, CyclePanelVisibility) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> panel1(CreatePanelWindow(bounds));
- wm::ActivateWindow(panel1.get());
- wm::ActivateWindow(window1.get());
-
- Cycle(WindowSelector::FORWARD);
- FireOverviewStartTimer();
- EXPECT_EQ(1.0f, panel1->layer()->GetTargetOpacity());
- StopCycling();
-}
-
-// Tests cycles between panel and normal windows.
-TEST_F(WindowSelectorTest, CyclePanelsDestroyed) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- scoped_ptr<aura::Window> window3(CreateWindow(bounds));
- scoped_ptr<aura::Window> panel1(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> panel2(CreatePanelWindow(bounds));
- wm::ActivateWindow(window3.get());
- wm::ActivateWindow(panel2.get());
- wm::ActivateWindow(panel1.get());
- wm::ActivateWindow(window2.get());
- wm::ActivateWindow(window1.get());
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
-
- // Cycling once highlights window2.
- Cycle(WindowSelector::FORWARD);
- // All panels are destroyed.
- panel1.reset();
- panel2.reset();
- // Cycling again should now select window3.
- Cycle(WindowSelector::FORWARD);
- StopCycling();
- EXPECT_TRUE(wm::IsActiveWindow(window3.get()));
-}
-
-// Tests cycles between panel and normal windows.
-TEST_F(WindowSelectorTest, CycleMruPanelDestroyed) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- scoped_ptr<aura::Window> panel1(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> panel2(CreatePanelWindow(bounds));
- wm::ActivateWindow(panel2.get());
- wm::ActivateWindow(panel1.get());
- wm::ActivateWindow(window2.get());
- wm::ActivateWindow(window1.get());
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
-
- // Cycling once highlights window2.
- Cycle(WindowSelector::FORWARD);
- // Panel 1 is the next item as the MRU panel, removing it should make panel 2
- // the next window to be selected.
- panel1.reset();
- // Cycling again should now select window3.
- Cycle(WindowSelector::FORWARD);
- StopCycling();
- EXPECT_TRUE(wm::IsActiveWindow(panel2.get()));
-}
-
-// Tests that a newly created window aborts overview.
-TEST_F(WindowSelectorTest, NewWindowCancelsOveriew) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- ToggleOverview();
- EXPECT_TRUE(IsSelecting());
-
- // A window being created should exit overview mode.
- scoped_ptr<aura::Window> window3(CreateWindow(bounds));
- EXPECT_FALSE(IsSelecting());
-}
-
-// Tests that a window activation exits overview mode.
-TEST_F(WindowSelectorTest, ActivationCancelsOveriew) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- window2->Focus();
- ToggleOverview();
- EXPECT_TRUE(IsSelecting());
-
- // A window being activated should exit overview mode.
- window1->Focus();
- EXPECT_FALSE(IsSelecting());
-
- // window1 should be focused after exiting even though window2 was focused on
- // entering overview because we exited due to an activation.
- EXPECT_EQ(window1.get(), GetFocusedWindow());
-}
-
-// Verifies that overview mode only begins after a delay when cycling.
-TEST_F(WindowSelectorTest, CycleOverviewDelay) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- EXPECT_TRUE(WindowsOverlapping(window1.get(), window2.get()));
-
- // When cycling first starts, the windows will still be overlapping.
- Cycle(WindowSelector::FORWARD);
- EXPECT_TRUE(IsSelecting());
- EXPECT_TRUE(WindowsOverlapping(window1.get(), window2.get()));
-
- // Once the overview timer fires, the windows should no longer overlap.
- FireOverviewStartTimer();
- EXPECT_FALSE(WindowsOverlapping(window1.get(), window2.get()));
- StopCycling();
-}
-
-// Tests that exiting overview mode without selecting a window restores focus
-// to the previously focused window.
-TEST_F(WindowSelectorTest, CancelRestoresFocus) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window(CreateWindow(bounds));
- wm::ActivateWindow(window.get());
- EXPECT_EQ(window.get(), GetFocusedWindow());
-
- // In overview mode, focus should be removed.
- ToggleOverview();
- EXPECT_EQ(NULL, GetFocusedWindow());
-
- // If canceling overview mode, focus should be restored.
- ToggleOverview();
- EXPECT_EQ(window.get(), GetFocusedWindow());
-}
-
-// Tests that overview mode is exited if the last remaining window is destroyed.
-TEST_F(WindowSelectorTest, LastWindowDestroyed) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- ToggleOverview();
-
- window1.reset();
- window2.reset();
- EXPECT_FALSE(IsSelecting());
-}
-
-// Tests that entering overview mode restores a window to its original
-// target location.
-TEST_F(WindowSelectorTest, QuickReentryRestoresInitialTransform) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window(CreateWindow(bounds));
- gfx::Rect initial_bounds = ToEnclosingRect(
- GetTransformedBounds(window.get()));
- ToggleOverview();
- // Quickly exit and reenter overview mode. The window should still be
- // animating when we reenter. We cannot short circuit animations for this but
- // we also don't have to wait for them to complete.
- {
- ui::ScopedAnimationDurationScaleMode normal_duration_mode(
- ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
- ToggleOverview();
- ToggleOverview();
- }
- EXPECT_NE(initial_bounds, ToEnclosingRect(
- GetTransformedTargetBounds(window.get())));
- ToggleOverview();
- EXPECT_FALSE(IsSelecting());
- EXPECT_EQ(initial_bounds, ToEnclosingRect(
- GetTransformedTargetBounds(window.get())));
-}
-
-// Tests that non-activatable windows are hidden when entering overview mode.
-TEST_F(WindowSelectorTest, NonActivatableWindowsHidden) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- scoped_ptr<aura::Window> non_activatable_window(
- CreateNonActivatableWindow(Shell::GetPrimaryRootWindow()->bounds()));
- EXPECT_TRUE(non_activatable_window->IsVisible());
- ToggleOverview();
- EXPECT_FALSE(non_activatable_window->IsVisible());
- ToggleOverview();
- EXPECT_TRUE(non_activatable_window->IsVisible());
-
- // Test that a window behind the fullscreen non-activatable window can be
- // clicked.
- non_activatable_window->parent()->StackChildAtTop(
- non_activatable_window.get());
- ToggleOverview();
- ClickWindow(window1.get());
- EXPECT_FALSE(IsSelecting());
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
-}
-
-// Tests that windows with modal child windows are transformed with the modal
-// child even though not activatable themselves.
-TEST_F(WindowSelectorTest, ModalChild) {
- gfx::Rect bounds(0, 0, 400, 400);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds));
- scoped_ptr<aura::Window> child1(CreateWindow(bounds));
- child1->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
- window1->AddTransientChild(child1.get());
- EXPECT_EQ(window1->parent(), child1->parent());
- ToggleOverview();
- EXPECT_TRUE(window1->IsVisible());
- EXPECT_TRUE(child1->IsVisible());
- EXPECT_EQ(ToEnclosingRect(GetTransformedTargetBounds(child1.get())),
- ToEnclosingRect(GetTransformedTargetBounds(window1.get())));
- ToggleOverview();
-}
-
-// Tests that clicking a modal window's parent activates the modal window in
-// overview.
-TEST_F(WindowSelectorTest, ClickModalWindowParent) {
- scoped_ptr<aura::Window> window1(CreateWindow(gfx::Rect(0, 0, 180, 180)));
- scoped_ptr<aura::Window> child1(CreateWindow(gfx::Rect(200, 0, 180, 180)));
- child1->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
- window1->AddTransientChild(child1.get());
- EXPECT_FALSE(WindowsOverlapping(window1.get(), child1.get()));
- EXPECT_EQ(window1->parent(), child1->parent());
- ToggleOverview();
- // Given that their relative positions are preserved, the windows should still
- // not overlap.
- EXPECT_FALSE(WindowsOverlapping(window1.get(), child1.get()));
- ClickWindow(window1.get());
- EXPECT_FALSE(IsSelecting());
-
- // Clicking on window1 should activate child1.
- EXPECT_TRUE(wm::IsActiveWindow(child1.get()));
-}
-
-// Tests that windows remain on the display they are currently on in overview
-// mode.
-TEST_F(WindowSelectorTest, MultipleDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("600x400,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- gfx::Rect bounds1(0, 0, 400, 400);
- gfx::Rect bounds2(650, 0, 400, 400);
-
- scoped_ptr<aura::Window> window1(CreateWindow(bounds1));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds1));
- scoped_ptr<aura::Window> window3(CreateWindow(bounds2));
- scoped_ptr<aura::Window> window4(CreateWindow(bounds2));
- scoped_ptr<aura::Window> panel1(CreatePanelWindow(bounds1));
- scoped_ptr<aura::Window> panel2(CreatePanelWindow(bounds1));
- scoped_ptr<aura::Window> panel3(CreatePanelWindow(bounds2));
- scoped_ptr<aura::Window> panel4(CreatePanelWindow(bounds2));
- EXPECT_EQ(root_windows[0], window1->GetRootWindow());
- EXPECT_EQ(root_windows[0], window2->GetRootWindow());
- EXPECT_EQ(root_windows[1], window3->GetRootWindow());
- EXPECT_EQ(root_windows[1], window4->GetRootWindow());
-
- EXPECT_EQ(root_windows[0], panel1->GetRootWindow());
- EXPECT_EQ(root_windows[0], panel2->GetRootWindow());
- EXPECT_EQ(root_windows[1], panel3->GetRootWindow());
- EXPECT_EQ(root_windows[1], panel4->GetRootWindow());
-
- // In overview mode, each window remains in the same root window.
- ToggleOverview();
- EXPECT_EQ(root_windows[0], window1->GetRootWindow());
- EXPECT_EQ(root_windows[0], window2->GetRootWindow());
- EXPECT_EQ(root_windows[1], window3->GetRootWindow());
- EXPECT_EQ(root_windows[1], window4->GetRootWindow());
- EXPECT_EQ(root_windows[0], panel1->GetRootWindow());
- EXPECT_EQ(root_windows[0], panel2->GetRootWindow());
- EXPECT_EQ(root_windows[1], panel3->GetRootWindow());
- EXPECT_EQ(root_windows[1], panel4->GetRootWindow());
-
- EXPECT_TRUE(root_windows[0]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(window1.get()))));
- EXPECT_TRUE(root_windows[0]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(window2.get()))));
- EXPECT_TRUE(root_windows[1]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(window3.get()))));
- EXPECT_TRUE(root_windows[1]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(window4.get()))));
-
- EXPECT_TRUE(root_windows[0]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(panel1.get()))));
- EXPECT_TRUE(root_windows[0]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(panel2.get()))));
- EXPECT_TRUE(root_windows[1]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(panel3.get()))));
- EXPECT_TRUE(root_windows[1]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(panel4.get()))));
- EXPECT_TRUE(WindowsOverlapping(panel1.get(), panel2.get()));
- EXPECT_TRUE(WindowsOverlapping(panel3.get(), panel4.get()));
- EXPECT_FALSE(WindowsOverlapping(panel1.get(), panel3.get()));
-}
-
-// Verifies that the single display overview used during alt tab cycling uses
-// the display of the selected window by default.
-TEST_F(WindowSelectorTest, CycleOverviewUsesCurrentDisplay) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("400x400,400x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- scoped_ptr<aura::Window> window1(CreateWindow(gfx::Rect(0, 0, 100, 100)));
- scoped_ptr<aura::Window> window2(CreateWindow(gfx::Rect(450, 0, 100, 100)));
- EXPECT_EQ(root_windows[0], window1->GetRootWindow());
- EXPECT_EQ(root_windows[1], window2->GetRootWindow());
- wm::ActivateWindow(window2.get());
- wm::ActivateWindow(window1.get());
- EXPECT_EQ(root_windows[0], Shell::GetTargetRootWindow());
-
- Cycle(WindowSelector::FORWARD);
- FireOverviewStartTimer();
-
- EXPECT_TRUE(root_windows[1]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(window1.get()))));
- EXPECT_TRUE(root_windows[1]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(window2.get()))));
- StopCycling();
-}
-
-// Verifies that the windows being shown on another display are copied.
-TEST_F(WindowSelectorTest, CycleMultipleDisplaysCopiesWindows) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("400x400,400x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- gfx::Rect root1_rect(0, 0, 100, 100);
- gfx::Rect root2_rect(450, 0, 100, 100);
- scoped_ptr<aura::Window> unmoved1(CreateWindow(root2_rect));
- scoped_ptr<aura::Window> unmoved2(CreateWindow(root2_rect));
- scoped_ptr<aura::Window> moved1_trans_parent(CreateWindow(root1_rect));
- scoped_ptr<aura::Window> moved1(CreateWindow(root1_rect));
- unmoved1->SetName("unmoved1");
- unmoved2->SetName("unmoved2");
- moved1->SetName("moved1");
- moved1->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
- moved1_trans_parent->AddTransientChild(moved1.get());
- moved1_trans_parent->SetName("moved1_trans_parent");
-
- EXPECT_EQ(root_windows[0], moved1->GetRootWindow());
- EXPECT_EQ(root_windows[0], moved1_trans_parent->GetRootWindow());
- EXPECT_EQ(root_windows[1], unmoved1->GetRootWindow());
- EXPECT_EQ(root_windows[1], unmoved2->GetRootWindow());
- wm::ActivateWindow(unmoved2.get());
- wm::ActivateWindow(unmoved1.get());
-
- Cycle(WindowSelector::FORWARD);
- FireOverviewStartTimer();
-
- // All windows are moved to second root window.
- EXPECT_TRUE(root_windows[1]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(unmoved1.get()))));
- EXPECT_TRUE(root_windows[1]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(unmoved2.get()))));
- EXPECT_TRUE(root_windows[1]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(moved1.get()))));
- EXPECT_TRUE(root_windows[1]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(moved1_trans_parent.get()))));
-
- // unmoved1 and unmoved2 were already on the correct display and should not
- // have been copied.
- EXPECT_TRUE(!GetCopyWindow(unmoved1.get()));
- EXPECT_TRUE(!GetCopyWindow(unmoved2.get()));
-
- // moved1 and its transient parent moved1_trans_parent should have also been
- // copied for displaying on root_windows[1].
- aura::Window* copy1 = GetCopyWindow(moved1.get());
- aura::Window* copy1_trans_parent = GetCopyWindow(moved1_trans_parent.get());
- ASSERT_FALSE(!copy1);
- ASSERT_FALSE(!copy1_trans_parent);
-
- // Verify that the bounds and transform of the copy match the original window
- // but that it is on the other root window.
- EXPECT_EQ(root_windows[1], copy1->GetRootWindow());
- EXPECT_EQ(moved1->GetBoundsInScreen().ToString(),
- copy1->GetBoundsInScreen().ToString());
- EXPECT_EQ(moved1->layer()->GetTargetTransform().ToString(),
- copy1->layer()->GetTargetTransform().ToString());
- StopCycling();
-
- // After cycling the copy windows should have been destroyed.
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(!GetCopyWindow(moved1.get()));
- EXPECT_TRUE(!GetCopyWindow(moved1_trans_parent.get()));
-}
-
-// Tests that beginning to cycle from overview mode moves windows to the
-// active display.
-TEST_F(WindowSelectorTest, MultipleDisplaysOverviewTransitionToCycle) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("400x400,400x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- scoped_ptr<aura::Window> window1(CreateWindow(gfx::Rect(0, 0, 100, 100)));
- scoped_ptr<aura::Window> window2(CreateWindow(gfx::Rect(450, 0, 100, 100)));
- EXPECT_EQ(root_windows[0], window1->GetRootWindow());
- EXPECT_EQ(root_windows[1], window2->GetRootWindow());
- wm::ActivateWindow(window2.get());
- wm::ActivateWindow(window1.get());
-
- ToggleOverview();
- EXPECT_TRUE(root_windows[0]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(window1.get()))));
- EXPECT_TRUE(root_windows[1]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(window2.get()))));
-
- Cycle(WindowSelector::FORWARD);
- EXPECT_TRUE(root_windows[0]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(window1.get()))));
- EXPECT_TRUE(root_windows[0]->GetBoundsInScreen().Contains(
- ToEnclosingRect(GetTransformedTargetBounds(window2.get()))));
- StopCycling();
-}
-
-// Tests that a bounds change during overview is corrected for.
-TEST_F(WindowSelectorTest, BoundsChangeDuringCycleOnOtherDisplay) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("400x400,400x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- scoped_ptr<aura::Window> window1(CreateWindow(gfx::Rect(0, 0, 100, 100)));
- scoped_ptr<aura::Window> window2(CreateWindow(gfx::Rect(450, 0, 100, 100)));
- scoped_ptr<aura::Window> window3(CreateWindow(gfx::Rect(450, 0, 100, 100)));
- EXPECT_EQ(root_windows[0], window1->GetRootWindow());
- EXPECT_EQ(root_windows[1], window2->GetRootWindow());
- EXPECT_EQ(root_windows[1], window3->GetRootWindow());
- wm::ActivateWindow(window1.get());
- wm::ActivateWindow(window2.get());
- wm::ActivateWindow(window3.get());
-
- Cycle(WindowSelector::FORWARD);
- FireOverviewStartTimer();
-
- gfx::Rect overview_bounds(
- ToEnclosingRect(GetTransformedTargetBounds(window1.get())));
- EXPECT_TRUE(root_windows[1]->GetBoundsInScreen().Contains(overview_bounds));
-
- // Change the position and size of window1 (being displayed on the second
- // root window) and it should remain within the same bounds.
- window1->SetBounds(gfx::Rect(100, 0, 200, 200));
- gfx::Rect new_overview_bounds =
- ToEnclosingRect(GetTransformedTargetBounds(window1.get()));
- EXPECT_EQ(overview_bounds.x(), new_overview_bounds.x());
- EXPECT_EQ(overview_bounds.y(), new_overview_bounds.y());
- EXPECT_EQ(overview_bounds.width(), new_overview_bounds.width());
- EXPECT_EQ(overview_bounds.height(), new_overview_bounds.height());
- StopCycling();
-}
-
-// Tests shutting down during overview.
-TEST_F(WindowSelectorTest, Shutdown) {
- gfx::Rect bounds(0, 0, 400, 400);
- // These windows will be deleted when the test exits and the Shell instance
- // is shut down.
- aura::Window* window1(CreateWindow(bounds));
- aura::Window* window2(CreateWindow(bounds));
- aura::Window* window3(CreatePanelWindow(bounds));
- aura::Window* window4(CreatePanelWindow(bounds));
-
- wm::ActivateWindow(window4);
- wm::ActivateWindow(window3);
- wm::ActivateWindow(window2);
- wm::ActivateWindow(window1);
-
- ToggleOverview();
-}
-
-// Tests removing a display during overview.
-TEST_F(WindowSelectorTest, RemoveDisplay) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("400x400,400x400");
- gfx::Rect bounds1(0, 0, 100, 100);
- gfx::Rect bounds2(450, 0, 100, 100);
- scoped_ptr<aura::Window> window1(CreateWindow(bounds1));
- scoped_ptr<aura::Window> window2(CreateWindow(bounds2));
- scoped_ptr<aura::Window> window3(CreatePanelWindow(bounds1));
- scoped_ptr<aura::Window> window4(CreatePanelWindow(bounds2));
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- EXPECT_EQ(root_windows[0], window1->GetRootWindow());
- EXPECT_EQ(root_windows[1], window2->GetRootWindow());
- EXPECT_EQ(root_windows[0], window3->GetRootWindow());
- EXPECT_EQ(root_windows[1], window4->GetRootWindow());
-
- wm::ActivateWindow(window4.get());
- wm::ActivateWindow(window3.get());
- wm::ActivateWindow(window2.get());
- wm::ActivateWindow(window1.get());
-
- ToggleOverview();
- EXPECT_TRUE(IsSelecting());
- UpdateDisplay("400x400");
- EXPECT_FALSE(IsSelecting());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/overview/window_selector_window.cc b/chromium/ash/wm/overview/window_selector_window.cc
deleted file mode 100644
index ea8241678dc..00000000000
--- a/chromium/ash/wm/overview/window_selector_window.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/overview/window_selector_window.h"
-
-#include "ui/aura/window.h"
-
-namespace ash {
-
-WindowSelectorWindow::WindowSelectorWindow(aura::Window* window)
- : transform_window_(window) {
-}
-
-WindowSelectorWindow::~WindowSelectorWindow() {
-}
-
-aura::Window* WindowSelectorWindow::GetRootWindow() {
- return transform_window_.window()->GetRootWindow();
-}
-
-bool WindowSelectorWindow::HasSelectableWindow(const aura::Window* window) {
- return transform_window_.window() == window;
-}
-
-aura::Window* WindowSelectorWindow::TargetedWindow(const aura::Window* target) {
- if (transform_window_.Contains(target))
- return transform_window_.window();
- return NULL;
-}
-
-void WindowSelectorWindow::RestoreWindowOnExit(aura::Window* window) {
- transform_window_.RestoreWindowOnExit();
-}
-
-aura::Window* WindowSelectorWindow::SelectionWindow() {
- return transform_window_.window();
-}
-
-void WindowSelectorWindow::RemoveWindow(const aura::Window* window) {
- DCHECK_EQ(transform_window_.window(), window);
- transform_window_.OnWindowDestroyed();
-}
-
-bool WindowSelectorWindow::empty() const {
- return transform_window_.window() == NULL;
-}
-
-void WindowSelectorWindow::PrepareForOverview() {
- transform_window_.PrepareForOverview();
-}
-
-void WindowSelectorWindow::SetItemBounds(aura::Window* root_window,
- const gfx::Rect& target_bounds,
- bool animate) {
- gfx::Rect src_rect = transform_window_.GetBoundsInScreen();
- set_bounds(ScopedTransformOverviewWindow::
- ShrinkRectToFitPreservingAspectRatio(src_rect, target_bounds));
- transform_window_.SetTransform(root_window,
- ScopedTransformOverviewWindow::GetTransformForRect(src_rect, bounds()),
- animate);
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/overview/window_selector_window.h b/chromium/ash/wm/overview/window_selector_window.h
deleted file mode 100644
index 5662f2907ce..00000000000
--- a/chromium/ash/wm/overview/window_selector_window.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_OVERVIEW_WINDOW_SELECTOR_WINDOW_H_
-#define ASH_WM_OVERVIEW_WINDOW_SELECTOR_WINDOW_H_
-
-#include "ash/wm/overview/scoped_transform_overview_window.h"
-#include "ash/wm/overview/window_selector_item.h"
-#include "base/compiler_specific.h"
-#include "ui/gfx/rect.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-
-// This implements a window overview item with a single window which can be
-// selected.
-class WindowSelectorWindow : public WindowSelectorItem {
- public:
- WindowSelectorWindow(aura::Window* window);
- virtual ~WindowSelectorWindow();
-
- // WindowSelectorItem:
- virtual aura::Window* GetRootWindow() OVERRIDE;
- virtual bool HasSelectableWindow(const aura::Window* window) OVERRIDE;
- virtual aura::Window* TargetedWindow(const aura::Window* target) OVERRIDE;
- virtual void RestoreWindowOnExit(aura::Window* window) OVERRIDE;
- virtual aura::Window* SelectionWindow() OVERRIDE;
- virtual void RemoveWindow(const aura::Window* window) OVERRIDE;
- virtual bool empty() const OVERRIDE;
- virtual void PrepareForOverview() OVERRIDE;
- virtual void SetItemBounds(aura::Window* root_window,
- const gfx::Rect& target_bounds,
- bool animate) OVERRIDE;
-
- private:
- ScopedTransformOverviewWindow transform_window_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowSelectorWindow);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_WINDOW_H_
diff --git a/chromium/ash/wm/panels/OWNERS b/chromium/ash/wm/panels/OWNERS
deleted file mode 100644
index c9dc2b8e06b..00000000000
--- a/chromium/ash/wm/panels/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-flackr@chromium.org
-stevenjb@chromium.org
diff --git a/chromium/ash/wm/panels/panel_frame_view.cc b/chromium/ash/wm/panels/panel_frame_view.cc
deleted file mode 100644
index 3c01e520f9d..00000000000
--- a/chromium/ash/wm/panels/panel_frame_view.cc
+++ /dev/null
@@ -1,148 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/panels/panel_frame_view.h"
-
-#include "ash/wm/caption_buttons/frame_caption_button_container_view.h"
-#include "ash/wm/frame_border_hit_test_controller.h"
-#include "ash/wm/header_painter.h"
-#include "grit/ash_resources.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/font.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/widget/native_widget_aura.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-
-// static
-const char PanelFrameView::kViewClassName[] = "PanelFrameView";
-
-PanelFrameView::PanelFrameView(views::Widget* frame, FrameType frame_type)
- : frame_(frame),
- caption_button_container_(NULL),
- window_icon_(NULL),
- title_font_(gfx::Font(views::NativeWidgetAura::GetWindowTitleFont())),
- frame_border_hit_test_controller_(
- new FrameBorderHitTestController(frame_)) {
- DCHECK(!frame_->widget_delegate()->CanMaximize());
- if (frame_type != FRAME_NONE)
- InitHeaderPainter();
-}
-
-PanelFrameView::~PanelFrameView() {
-}
-
-const char* PanelFrameView::GetClassName() const {
- return kViewClassName;
-}
-
-void PanelFrameView::InitHeaderPainter() {
- header_painter_.reset(new HeaderPainter);
-
- caption_button_container_ = new FrameCaptionButtonContainerView(frame_,
- FrameCaptionButtonContainerView::MINIMIZE_ALLOWED);
- AddChildView(caption_button_container_);
-
- if (frame_->widget_delegate()->ShouldShowWindowIcon()) {
- window_icon_ = new views::ImageView();
- AddChildView(window_icon_);
- }
-
- header_painter_->Init(frame_, this, window_icon_, caption_button_container_);
-}
-
-int PanelFrameView::NonClientTopBorderHeight() const {
- if (!header_painter_)
- return 0;
- // Reserve enough space to see the buttons and the separator line.
- return caption_button_container_->bounds().bottom() +
- header_painter_->HeaderContentSeparatorSize();
-}
-
-gfx::Size PanelFrameView::GetMinimumSize() {
- if (!header_painter_)
- return gfx::Size();
- gfx::Size min_client_view_size(frame_->client_view()->GetMinimumSize());
- return gfx::Size(
- std::max(header_painter_->GetMinimumHeaderWidth(),
- min_client_view_size.width()),
- NonClientTopBorderHeight() + min_client_view_size.height());
-}
-
-void PanelFrameView::Layout() {
- if (!header_painter_)
- return;
- header_painter_->LayoutHeader(true);
- header_painter_->set_header_height(NonClientTopBorderHeight());
-}
-
-void PanelFrameView::GetWindowMask(const gfx::Size&, gfx::Path*) {
- // Nothing.
-}
-
-void PanelFrameView::ResetWindowControls() {
- NOTIMPLEMENTED();
-}
-
-void PanelFrameView::UpdateWindowIcon() {
- if (!window_icon_)
- return;
- views::WidgetDelegate* delegate = frame_->widget_delegate();
- if (delegate)
- window_icon_->SetImage(delegate->GetWindowIcon());
- window_icon_->SchedulePaint();
-}
-
-void PanelFrameView::UpdateWindowTitle() {
- if (!header_painter_)
- return;
- header_painter_->SchedulePaintForTitle(title_font_);
-}
-
-int PanelFrameView::NonClientHitTest(const gfx::Point& point) {
- if (!header_painter_)
- return HTNOWHERE;
- return FrameBorderHitTestController::NonClientHitTest(this,
- header_painter_.get(), point);
-}
-
-void PanelFrameView::OnPaint(gfx::Canvas* canvas) {
- if (!header_painter_)
- return;
- bool paint_as_active = ShouldPaintAsActive();
- int theme_frame_id = 0;
- if (paint_as_active)
- theme_frame_id = IDR_AURA_WINDOW_HEADER_BASE_ACTIVE;
- else
- theme_frame_id = IDR_AURA_WINDOW_HEADER_BASE_INACTIVE;
-
- header_painter_->PaintHeader(
- canvas,
- paint_as_active ? HeaderPainter::ACTIVE : HeaderPainter::INACTIVE,
- theme_frame_id,
- 0);
- header_painter_->PaintTitleBar(canvas, title_font_);
- header_painter_->PaintHeaderContentSeparator(canvas);
-}
-
-gfx::Rect PanelFrameView::GetBoundsForClientView() const {
- if (!header_painter_)
- return bounds();
- return HeaderPainter::GetBoundsForClientView(
- NonClientTopBorderHeight(), bounds());
-}
-
-gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds(
- const gfx::Rect& client_bounds) const {
- if (!header_painter_)
- return client_bounds;
- return HeaderPainter::GetWindowBoundsForClientBounds(
- NonClientTopBorderHeight(), client_bounds);
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/panels/panel_frame_view.h b/chromium/ash/wm/panels/panel_frame_view.h
deleted file mode 100644
index 6bb27f5b47d..00000000000
--- a/chromium/ash/wm/panels/panel_frame_view.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_PANELS_PANEL_FRAME_VIEW_H_
-#define ASH_WM_PANELS_PANEL_FRAME_VIEW_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "ui/gfx/font.h"
-#include "ui/views/window/non_client_view.h"
-
-namespace views {
-class ImageView;
-}
-
-namespace ash {
-
-class FrameCaptionButtonContainerView;
-class FrameBorderHitTestController;
-class HeaderPainter;
-
-class ASH_EXPORT PanelFrameView : public views::NonClientFrameView {
- public:
- // Internal class name.
- static const char kViewClassName[];
-
- enum FrameType {
- FRAME_NONE,
- FRAME_ASH
- };
-
- PanelFrameView(views::Widget* frame, FrameType frame_type);
- virtual ~PanelFrameView();
-
- // Overridden from views::View:
- virtual const char* GetClassName() const OVERRIDE;
-
- private:
- void InitHeaderPainter();
-
- // Height from top of window to top of client area.
- int NonClientTopBorderHeight() const;
-
- // Overridden from views::NonClientFrameView:
- virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
- virtual gfx::Rect GetWindowBoundsForClientBounds(
- const gfx::Rect& client_bounds) const OVERRIDE;
- virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
- virtual void GetWindowMask(const gfx::Size& size,
- gfx::Path* window_mask) OVERRIDE;
- virtual void ResetWindowControls() OVERRIDE;
- virtual void UpdateWindowIcon() OVERRIDE;
- virtual void UpdateWindowTitle() OVERRIDE;
-
- // Overridden from views::View:
- virtual gfx::Size GetMinimumSize() OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
-
- // Child View class describing the panel's title bar behavior
- // and buttons, owned by the view hierarchy
- views::Widget* frame_;
- FrameCaptionButtonContainerView* caption_button_container_;
- views::ImageView* window_icon_;
- gfx::Rect client_view_bounds_;
- const gfx::Font title_font_;
-
- // Helper class for painting the header.
- scoped_ptr<HeaderPainter> header_painter_;
-
- // Updates the hittest bounds overrides based on the window show type.
- scoped_ptr<FrameBorderHitTestController> frame_border_hit_test_controller_;
-
- DISALLOW_COPY_AND_ASSIGN(PanelFrameView);
-};
-
-}
-
-#endif // ASH_WM_PANELS_PANEL_FRAME_VIEW_H_
diff --git a/chromium/ash/wm/panels/panel_layout_manager.cc b/chromium/ash/wm/panels/panel_layout_manager.cc
deleted file mode 100644
index ec7027b6129..00000000000
--- a/chromium/ash/wm/panels/panel_layout_manager.cc
+++ /dev/null
@@ -1,895 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/panels/panel_layout_manager.h"
-
-#include <algorithm>
-#include <map>
-
-#include "ash/launcher/launcher.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/window_animations.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "base/auto_reset.h"
-#include "base/bind.h"
-#include "base/bind_helpers.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "third_party/skia/include/core/SkPaint.h"
-#include "third_party/skia/include/core/SkPath.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/client/focus_client.h"
-#include "ui/aura/client/window_tree_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_tracker.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/vector2d.h"
-#include "ui/views/background.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-const int kPanelIdealSpacing = 4;
-
-const float kMaxHeightFactor = .80f;
-const float kMaxWidthFactor = .50f;
-
-// Duration for panel animations.
-const int kPanelSlideDurationMilliseconds = 50;
-const int kCalloutFadeDurationMilliseconds = 50;
-
-// Offset used when sliding panel in/out of the launcher. Used for minimizing,
-// restoring and the initial showing of a panel.
-const int kPanelSlideInOffset = 20;
-
-// Callout arrow dimensions.
-const int kArrowWidth = 18;
-const int kArrowHeight = 9;
-
-class CalloutWidgetBackground : public views::Background {
- public:
- CalloutWidgetBackground() : alignment_(SHELF_ALIGNMENT_BOTTOM) {
- }
-
- virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE {
- SkPath path;
- switch (alignment_) {
- case SHELF_ALIGNMENT_BOTTOM:
- path.moveTo(SkIntToScalar(0), SkIntToScalar(0));
- path.lineTo(SkIntToScalar(kArrowWidth / 2),
- SkIntToScalar(kArrowHeight));
- path.lineTo(SkIntToScalar(kArrowWidth), SkIntToScalar(0));
- break;
- case SHELF_ALIGNMENT_LEFT:
- path.moveTo(SkIntToScalar(kArrowHeight), SkIntToScalar(kArrowWidth));
- path.lineTo(SkIntToScalar(0), SkIntToScalar(kArrowWidth / 2));
- path.lineTo(SkIntToScalar(kArrowHeight), SkIntToScalar(0));
- break;
- case SHELF_ALIGNMENT_TOP:
- path.moveTo(SkIntToScalar(0), SkIntToScalar(kArrowHeight));
- path.lineTo(SkIntToScalar(kArrowWidth / 2), SkIntToScalar(0));
- path.lineTo(SkIntToScalar(kArrowWidth), SkIntToScalar(kArrowHeight));
- break;
- case SHELF_ALIGNMENT_RIGHT:
- path.moveTo(SkIntToScalar(0), SkIntToScalar(0));
- path.lineTo(SkIntToScalar(kArrowHeight),
- SkIntToScalar(kArrowWidth / 2));
- path.lineTo(SkIntToScalar(0), SkIntToScalar(kArrowWidth));
- break;
- }
- // Hard code the arrow color for now.
- SkPaint paint;
- paint.setStyle(SkPaint::kFill_Style);
- paint.setColor(SkColorSetARGB(0xff, 0xe5, 0xe5, 0xe5));
- canvas->DrawPath(path, paint);
- }
-
- ShelfAlignment alignment() {
- return alignment_;
- }
-
- void set_alignment(ShelfAlignment alignment) {
- alignment_ = alignment;
- }
-
- private:
- ShelfAlignment alignment_;
-
- DISALLOW_COPY_AND_ASSIGN(CalloutWidgetBackground);
-};
-
-struct VisiblePanelPositionInfo {
- VisiblePanelPositionInfo()
- : min_major(0),
- max_major(0),
- major_pos(0),
- major_length(0),
- window(NULL),
- slide_in(false) {}
-
- int min_major;
- int max_major;
- int major_pos;
- int major_length;
- aura::Window* window;
- bool slide_in;
-};
-
-bool CompareWindowMajor(const VisiblePanelPositionInfo& win1,
- const VisiblePanelPositionInfo& win2) {
- return win1.major_pos < win2.major_pos;
-}
-
-void FanOutPanels(std::vector<VisiblePanelPositionInfo>::iterator first,
- std::vector<VisiblePanelPositionInfo>::iterator last) {
- int num_panels = last - first;
- if (num_panels == 1) {
- (*first).major_pos = std::max((*first).min_major, std::min(
- (*first).max_major, (*first).major_pos));
- }
- if (num_panels <= 1)
- return;
-
- if (num_panels == 2) {
- // If there are two adjacent overlapping windows, separate them by the
- // minimum major_length necessary.
- std::vector<VisiblePanelPositionInfo>::iterator second = first + 1;
- int separation = (*first).major_length / 2 + (*second).major_length / 2 +
- kPanelIdealSpacing;
- int overlap = (*first).major_pos + separation - (*second).major_pos;
- (*first).major_pos = std::max((*first).min_major,
- (*first).major_pos - overlap / 2);
- (*second).major_pos = std::min((*second).max_major,
- (*first).major_pos + separation);
- // Recalculate the first panel position in case the second one was
- // constrained on the right.
- (*first).major_pos = std::max((*first).min_major,
- (*second).major_pos - separation);
- return;
- }
-
- // If there are more than two overlapping windows, fan them out from minimum
- // position to maximum position equally spaced.
- int delta = ((*(last - 1)).max_major - (*first).min_major) / (num_panels - 1);
- int major_pos = (*first).min_major;
- for (std::vector<VisiblePanelPositionInfo>::iterator iter = first;
- iter != last; ++iter) {
- (*iter).major_pos = std::max((*iter).min_major,
- std::min((*iter).max_major, major_pos));
- major_pos += delta;
- }
-}
-
-bool BoundsAdjacent(const gfx::Rect& bounds1, const gfx::Rect& bounds2) {
- return bounds1.x() == bounds2.right() ||
- bounds1.y() == bounds2.bottom() ||
- bounds1.right() == bounds2.x() ||
- bounds1.bottom() == bounds2.y();
-}
-
-gfx::Vector2d GetSlideInAnimationOffset(ShelfAlignment alignment) {
- gfx::Vector2d offset;
- switch (alignment) {
- case SHELF_ALIGNMENT_BOTTOM:
- offset.set_y(kPanelSlideInOffset);
- break;
- case SHELF_ALIGNMENT_LEFT:
- offset.set_x(-kPanelSlideInOffset);
- break;
- case SHELF_ALIGNMENT_RIGHT:
- offset.set_x(kPanelSlideInOffset);
- break;
- case SHELF_ALIGNMENT_TOP:
- offset.set_y(-kPanelSlideInOffset);
- break;
- }
- return offset;
-}
-
-} // namespace
-
-class PanelCalloutWidget : public views::Widget {
- public:
- explicit PanelCalloutWidget(aura::Window* container)
- : background_(NULL) {
- InitWidget(container);
- }
-
- void SetAlignment(ShelfAlignment alignment) {
- gfx::Rect callout_bounds = GetWindowBoundsInScreen();
- if (alignment == SHELF_ALIGNMENT_BOTTOM ||
- alignment == SHELF_ALIGNMENT_TOP) {
- callout_bounds.set_width(kArrowWidth);
- callout_bounds.set_height(kArrowHeight);
- } else {
- callout_bounds.set_width(kArrowHeight);
- callout_bounds.set_height(kArrowWidth);
- }
- GetNativeWindow()->SetBounds(callout_bounds);
- if (background_->alignment() != alignment) {
- background_->set_alignment(alignment);
- SchedulePaintInRect(gfx::Rect(gfx::Point(), callout_bounds.size()));
- }
- }
-
- private:
- void InitWidget(aura::Window* parent) {
- views::Widget::InitParams params;
- params.type = views::Widget::InitParams::TYPE_POPUP;
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- params.can_activate = false;
- params.keep_on_top = true;
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.parent = parent;
- params.bounds = ScreenAsh::ConvertRectToScreen(parent, gfx::Rect());
- params.bounds.set_width(kArrowWidth);
- params.bounds.set_height(kArrowHeight);
- // Why do we need this and can_activate = false?
- set_focus_on_creation(false);
- Init(params);
- DCHECK_EQ(GetNativeView()->GetRootWindow(), parent->GetRootWindow());
- views::View* content_view = new views::View;
- background_ = new CalloutWidgetBackground;
- content_view->set_background(background_);
- SetContentsView(content_view);
- GetNativeWindow()->layer()->SetOpacity(0);
- }
-
- // Weak pointer owned by this widget's content view.
- CalloutWidgetBackground* background_;
-
- DISALLOW_COPY_AND_ASSIGN(PanelCalloutWidget);
-};
-
-////////////////////////////////////////////////////////////////////////////////
-// PanelLayoutManager public implementation:
-PanelLayoutManager::PanelLayoutManager(aura::Window* panel_container)
- : panel_container_(panel_container),
- in_add_window_(false),
- in_layout_(false),
- dragged_panel_(NULL),
- launcher_(NULL),
- shelf_layout_manager_(NULL),
- last_active_panel_(NULL),
- weak_factory_(this) {
- DCHECK(panel_container);
- aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())->
- AddObserver(this);
- Shell::GetInstance()->display_controller()->AddObserver(this);
- Shell::GetInstance()->AddShellObserver(this);
-}
-
-PanelLayoutManager::~PanelLayoutManager() {
- Shutdown();
-}
-
-void PanelLayoutManager::Shutdown() {
- if (shelf_layout_manager_)
- shelf_layout_manager_->RemoveObserver(this);
- shelf_layout_manager_ = NULL;
- for (PanelList::iterator iter = panel_windows_.begin();
- iter != panel_windows_.end(); ++iter) {
- delete iter->callout_widget;
- }
- panel_windows_.clear();
- if (launcher_)
- launcher_->RemoveIconObserver(this);
- launcher_ = NULL;
- aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())->
- RemoveObserver(this);
- Shell::GetInstance()->display_controller()->RemoveObserver(this);
- Shell::GetInstance()->RemoveShellObserver(this);
-}
-
-void PanelLayoutManager::StartDragging(aura::Window* panel) {
- DCHECK(!dragged_panel_);
- dragged_panel_ = panel;
- Relayout();
-}
-
-void PanelLayoutManager::FinishDragging() {
- dragged_panel_ = NULL;
- Relayout();
-}
-
-void PanelLayoutManager::SetLauncher(ash::Launcher* launcher) {
- DCHECK(!launcher_);
- DCHECK(!shelf_layout_manager_);
- launcher_ = launcher;
- launcher_->AddIconObserver(this);
- if (launcher_->shelf_widget()) {
- shelf_layout_manager_ = ash::internal::ShelfLayoutManager::ForLauncher(
- launcher_->shelf_widget()->GetNativeWindow());
- WillChangeVisibilityState(shelf_layout_manager_->visibility_state());
- shelf_layout_manager_->AddObserver(this);
- }
-}
-
-void PanelLayoutManager::ToggleMinimize(aura::Window* panel) {
- DCHECK(panel->parent() == panel_container_);
- wm::WindowState* window_state = wm::GetWindowState(panel);
- if (window_state->IsMinimized())
- window_state->Restore();
- else
- window_state->Minimize();
-}
-
-views::Widget* PanelLayoutManager::GetCalloutWidgetForPanel(
- aura::Window* panel) {
- DCHECK(panel->parent() == panel_container_);
- PanelList::iterator found =
- std::find(panel_windows_.begin(), panel_windows_.end(), panel);
- DCHECK(found != panel_windows_.end());
- return found->callout_widget;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// PanelLayoutManager, aura::LayoutManager implementation:
-void PanelLayoutManager::OnWindowResized() {
- Relayout();
-}
-
-void PanelLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
- if (child->type() == aura::client::WINDOW_TYPE_POPUP)
- return;
- if (in_add_window_)
- return;
- base::AutoReset<bool> auto_reset_in_add_window(&in_add_window_, true);
- if (!wm::GetWindowState(child)->panel_attached()) {
- // This should only happen when a window is added to panel container as a
- // result of bounds change from within the application during a drag.
- // If so we have already stopped the drag and should reparent the panel
- // back to appropriate container and ignore it.
- // TODO(varkha): Updating bounds during a drag can cause problems and a more
- // general solution is needed. See http://crbug.com/251813 .
- aura::Window* old_parent = child->parent();
- aura::client::ParentWindowWithContext(
- child, child, child->GetRootWindow()->GetBoundsInScreen());
- wm::ReparentTransientChildrenOfChild(child, old_parent, child->parent());
- DCHECK(child->parent()->id() != kShellWindowId_PanelContainer);
- return;
- }
- PanelInfo panel_info;
- panel_info.window = child;
- panel_info.callout_widget = new PanelCalloutWidget(panel_container_);
- if (child != dragged_panel_) {
- // Set the panel to 0 opacity until it has been positioned to prevent it
- // from flashing briefly at position (0, 0).
- child->layer()->SetOpacity(0);
- panel_info.slide_in = true;
- }
- panel_windows_.push_back(panel_info);
- child->AddObserver(this);
- wm::GetWindowState(child)->AddObserver(this);
- Relayout();
-}
-
-void PanelLayoutManager::OnWillRemoveWindowFromLayout(aura::Window* child) {
-}
-
-void PanelLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
- if (child->type() == aura::client::WINDOW_TYPE_POPUP)
- return;
- PanelList::iterator found =
- std::find(panel_windows_.begin(), panel_windows_.end(), child);
- if (found != panel_windows_.end()) {
- delete found->callout_widget;
- panel_windows_.erase(found);
- }
- child->RemoveObserver(this);
- wm::GetWindowState(child)->RemoveObserver(this);
-
- if (dragged_panel_ == child)
- dragged_panel_ = NULL;
-
- if (last_active_panel_ == child)
- last_active_panel_ = NULL;
-
- Relayout();
-}
-
-void PanelLayoutManager::OnChildWindowVisibilityChanged(aura::Window* child,
- bool visible) {
- Relayout();
-}
-
-void PanelLayoutManager::SetChildBounds(aura::Window* child,
- const gfx::Rect& requested_bounds) {
- gfx::Rect bounds(requested_bounds);
- const gfx::Rect& max_bounds = panel_container_->GetRootWindow()->bounds();
- const int max_width = max_bounds.width() * kMaxWidthFactor;
- const int max_height = max_bounds.height() * kMaxHeightFactor;
- if (bounds.width() > max_width)
- bounds.set_width(max_width);
- if (bounds.height() > max_height)
- bounds.set_height(max_height);
-
- // Reposition dragged panel in the panel order.
- if (dragged_panel_ == child) {
- PanelList::iterator dragged_panel_iter =
- std::find(panel_windows_.begin(), panel_windows_.end(), dragged_panel_);
- DCHECK(dragged_panel_iter != panel_windows_.end());
- PanelList::iterator new_position;
- for (new_position = panel_windows_.begin();
- new_position != panel_windows_.end();
- ++new_position) {
- const gfx::Rect& bounds = (*new_position).window->bounds();
- if (bounds.x() + bounds.width()/2 <= requested_bounds.x()) break;
- }
- if (new_position != dragged_panel_iter) {
- PanelInfo dragged_panel_info = *dragged_panel_iter;
- panel_windows_.erase(dragged_panel_iter);
- panel_windows_.insert(new_position, dragged_panel_info);
- }
- }
-
- SetChildBoundsDirect(child, bounds);
- Relayout();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// PanelLayoutManager, ShelfIconObserver implementation:
-
-void PanelLayoutManager::OnShelfIconPositionsChanged() {
- // TODO: As this is called for every animation step now. Relayout needs to be
- // updated to use current icon position instead of use the ideal bounds so
- // that the panels slide with their icons instead of jumping.
- Relayout();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// PanelLayoutManager, ash::ShellObserver implementation:
-
-void PanelLayoutManager::OnShelfAlignmentChanged(aura::Window* root_window) {
- if (panel_container_->GetRootWindow() == root_window)
- Relayout();
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// PanelLayoutManager, WindowObserver implementation:
-
-void PanelLayoutManager::OnWindowShowTypeChanged(
- wm::WindowState* window_state,
- wm::WindowShowType old_type) {
- // If the shelf is currently hidden then windows will not actually be shown
- // but the set to restore when the shelf becomes visible is updated.
- if (restore_windows_on_shelf_visible_) {
- if (window_state->IsMinimized()) {
- MinimizePanel(window_state->window());
- restore_windows_on_shelf_visible_->Remove(window_state->window());
- } else {
- restore_windows_on_shelf_visible_->Add(window_state->window());
- }
- return;
- }
-
- if (window_state->IsMinimized())
- MinimizePanel(window_state->window());
- else
- RestorePanel(window_state->window());
-}
-
-void PanelLayoutManager::OnWindowVisibilityChanged(
- aura::Window* window, bool visible) {
- if (visible)
- wm::GetWindowState(window)->Restore();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// PanelLayoutManager, aura::client::ActivationChangeObserver implementation:
-
-void PanelLayoutManager::OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) {
- // Ignore if the panel that is not managed by this was activated.
- if (gained_active &&
- gained_active->type() == aura::client::WINDOW_TYPE_PANEL &&
- gained_active->parent() == panel_container_) {
- UpdateStacking(gained_active);
- UpdateCallouts();
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// PanelLayoutManager, DisplayController::Observer implementation:
-
-void PanelLayoutManager::OnDisplayConfigurationChanged() {
- Relayout();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// PanelLayoutManager, ShelfLayoutManagerObserver implementation:
-
-void PanelLayoutManager::WillChangeVisibilityState(
- ShelfVisibilityState new_state) {
- // On entering / leaving full screen mode the shelf visibility state is
- // changed to / from SHELF_HIDDEN. In this state, panel windows should hide
- // to allow the full-screen application to use the full screen.
- bool shelf_hidden = new_state == ash::SHELF_HIDDEN;
- if (!shelf_hidden) {
- if (restore_windows_on_shelf_visible_) {
- scoped_ptr<aura::WindowTracker> restore_windows(
- restore_windows_on_shelf_visible_.Pass());
- for (aura::WindowTracker::Windows::const_iterator iter =
- restore_windows->windows().begin(); iter !=
- restore_windows->windows().end(); ++iter) {
- RestorePanel(*iter);
- }
- }
- return;
- }
-
- if (restore_windows_on_shelf_visible_)
- return;
- scoped_ptr<aura::WindowTracker> minimized_windows(new aura::WindowTracker);
- for (PanelList::iterator iter = panel_windows_.begin();
- iter != panel_windows_.end(); ++iter) {
- if (iter->window->IsVisible()) {
- minimized_windows->Add(iter->window);
- wm::GetWindowState(iter->window)->Minimize();
- }
- }
- restore_windows_on_shelf_visible_ = minimized_windows.Pass();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// PanelLayoutManager private implementation:
-
-void PanelLayoutManager::MinimizePanel(aura::Window* panel) {
- views::corewm::SetWindowVisibilityAnimationType(
- panel, WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE);
- ui::Layer* layer = panel->layer();
- ui::ScopedLayerAnimationSettings panel_slide_settings(layer->GetAnimator());
- panel_slide_settings.SetPreemptionStrategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- panel_slide_settings.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kPanelSlideDurationMilliseconds));
- gfx::Rect bounds(panel->bounds());
- bounds.Offset(GetSlideInAnimationOffset(
- launcher_->shelf_widget()->GetAlignment()));
- SetChildBoundsDirect(panel, bounds);
- panel->Hide();
- PanelList::iterator found =
- std::find(panel_windows_.begin(), panel_windows_.end(), panel);
- if (found != panel_windows_.end()) {
- layer->SetOpacity(0);
- // The next time the window is visible it should slide into place.
- found->slide_in = true;
- }
- if (wm::IsActiveWindow(panel))
- wm::DeactivateWindow(panel);
- Relayout();
-}
-
-void PanelLayoutManager::RestorePanel(aura::Window* panel) {
- panel->Show();
- Relayout();
-}
-
-void PanelLayoutManager::Relayout() {
- if (!launcher_ || !launcher_->shelf_widget())
- return;
-
- if (in_layout_)
- return;
- base::AutoReset<bool> auto_reset_in_layout(&in_layout_, true);
-
- ShelfAlignment alignment = launcher_->shelf_widget()->GetAlignment();
- bool horizontal = alignment == SHELF_ALIGNMENT_TOP ||
- alignment == SHELF_ALIGNMENT_BOTTOM;
- gfx::Rect launcher_bounds = ash::ScreenAsh::ConvertRectFromScreen(
- panel_container_, launcher_->shelf_widget()->GetWindowBoundsInScreen());
- int panel_start_bounds = kPanelIdealSpacing;
- int panel_end_bounds = horizontal ?
- panel_container_->bounds().width() - kPanelIdealSpacing :
- panel_container_->bounds().height() - kPanelIdealSpacing;
- aura::Window* active_panel = NULL;
- std::vector<VisiblePanelPositionInfo> visible_panels;
- for (PanelList::iterator iter = panel_windows_.begin();
- iter != panel_windows_.end(); ++iter) {
- aura::Window* panel = iter->window;
- iter->callout_widget->SetAlignment(alignment);
-
- // Consider the dragged panel as part of the layout as long as it is
- // touching the launcher.
- if (!panel->IsVisible() ||
- (panel == dragged_panel_ &&
- !BoundsAdjacent(panel->bounds(), launcher_bounds))) {
- continue;
- }
-
- // If the shelf is currently hidden (full-screen mode), minimize panel until
- // full-screen mode is exited.
- if (restore_windows_on_shelf_visible_) {
- wm::GetWindowState(panel)->Minimize();
- restore_windows_on_shelf_visible_->Add(panel);
- continue;
- }
-
- gfx::Rect icon_bounds =
- launcher_->GetScreenBoundsOfItemIconForWindow(panel);
-
- // If both the icon width and height are 0 then there is no icon in the
- // launcher. If the launcher is hidden, one of the height or width will be
- // 0 but the position in the launcher and major dimension is still reported
- // correctly and the panel can be aligned above where the hidden icon is.
- if (icon_bounds.width() == 0 && icon_bounds.height() == 0)
- continue;
-
- if (panel->HasFocus() ||
- panel->Contains(
- aura::client::GetFocusClient(panel)->GetFocusedWindow())) {
- DCHECK(!active_panel);
- active_panel = panel;
- }
- icon_bounds = ScreenAsh::ConvertRectFromScreen(panel_container_,
- icon_bounds);
- gfx::Point icon_origin = icon_bounds.origin();
- VisiblePanelPositionInfo position_info;
- int icon_start = horizontal ? icon_origin.x() : icon_origin.y();
- int icon_end = icon_start + (horizontal ? icon_bounds.width() :
- icon_bounds.height());
- position_info.major_length = horizontal ?
- panel->bounds().width() : panel->bounds().height();
- position_info.min_major = std::max(
- panel_start_bounds + position_info.major_length / 2,
- icon_end - position_info.major_length / 2);
- position_info.max_major = std::min(
- icon_start + position_info.major_length / 2,
- panel_end_bounds - position_info.major_length / 2);
- position_info.major_pos = (icon_start + icon_end) / 2;
- position_info.window = panel;
- position_info.slide_in = iter->slide_in;
- iter->slide_in = false;
- visible_panels.push_back(position_info);
- }
-
- // Sort panels by their X positions and fan out groups of overlapping panels.
- // The fan out method may result in new overlapping panels however given that
- // the panels start at least a full panel width apart this overlap will
- // never completely obscure a panel.
- // TODO(flackr): Rearrange panels if new overlaps are introduced.
- std::sort(visible_panels.begin(), visible_panels.end(), CompareWindowMajor);
- size_t first_overlapping_panel = 0;
- for (size_t i = 1; i < visible_panels.size(); ++i) {
- if (visible_panels[i - 1].major_pos +
- visible_panels[i - 1].major_length / 2 < visible_panels[i].major_pos -
- visible_panels[i].major_length / 2) {
- FanOutPanels(visible_panels.begin() + first_overlapping_panel,
- visible_panels.begin() + i);
- first_overlapping_panel = i;
- }
- }
- FanOutPanels(visible_panels.begin() + first_overlapping_panel,
- visible_panels.end());
-
- for (size_t i = 0; i < visible_panels.size(); ++i) {
- if (visible_panels[i].window == dragged_panel_)
- continue;
- bool slide_in = visible_panels[i].slide_in;
- gfx::Rect bounds = visible_panels[i].window->GetTargetBounds();
- switch (alignment) {
- case SHELF_ALIGNMENT_BOTTOM:
- bounds.set_y(launcher_bounds.y() - bounds.height());
- break;
- case SHELF_ALIGNMENT_LEFT:
- bounds.set_x(launcher_bounds.right());
- break;
- case SHELF_ALIGNMENT_RIGHT:
- bounds.set_x(launcher_bounds.x() - bounds.width());
- break;
- case SHELF_ALIGNMENT_TOP:
- bounds.set_y(launcher_bounds.bottom());
- break;
- }
- bool on_launcher = visible_panels[i].window->GetTargetBounds() == bounds;
-
- if (horizontal) {
- bounds.set_x(visible_panels[i].major_pos -
- visible_panels[i].major_length / 2);
- } else {
- bounds.set_y(visible_panels[i].major_pos -
- visible_panels[i].major_length / 2);
- }
-
- ui::Layer* layer = visible_panels[i].window->layer();
- if (slide_in) {
- // New windows shift up from the launcher into position.
- gfx::Rect initial_bounds(bounds);
- initial_bounds.Offset(GetSlideInAnimationOffset(alignment));
- SetChildBoundsDirect(visible_panels[i].window, initial_bounds);
- // Set on launcher so that the panel animates into its target position.
- on_launcher = true;
- }
-
- if (on_launcher) {
- ui::ScopedLayerAnimationSettings panel_slide_settings(
- layer->GetAnimator());
- panel_slide_settings.SetPreemptionStrategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- panel_slide_settings.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kPanelSlideDurationMilliseconds));
- SetChildBoundsDirect(visible_panels[i].window, bounds);
- if (slide_in)
- layer->SetOpacity(1);
- } else {
- // If the launcher moved don't animate, move immediately to the new
- // target location.
- SetChildBoundsDirect(visible_panels[i].window, bounds);
- }
- }
-
- UpdateStacking(active_panel);
- UpdateCallouts();
-}
-
-void PanelLayoutManager::UpdateStacking(aura::Window* active_panel) {
- if (!active_panel) {
- if (!last_active_panel_)
- return;
- active_panel = last_active_panel_;
- }
-
- ShelfAlignment alignment = launcher_->alignment();
- bool horizontal = alignment == SHELF_ALIGNMENT_TOP ||
- alignment == SHELF_ALIGNMENT_BOTTOM;
-
- // We want to to stack the panels like a deck of cards:
- // ,--,--,--,-------.--.--.
- // | | | | | | |
- // | | | | | | |
- //
- // We use the middle of each panel to figure out how to stack the panels. This
- // allows us to update the stacking when a panel is being dragged around by
- // the titlebar--even though it doesn't update the launcher icon positions, we
- // still want the visual effect.
- std::map<int, aura::Window*> window_ordering;
- for (PanelList::const_iterator it = panel_windows_.begin();
- it != panel_windows_.end(); ++it) {
- gfx::Rect bounds = it->window->bounds();
- window_ordering.insert(std::make_pair(horizontal ?
- bounds.x() + bounds.width() / 2 :
- bounds.y() + bounds.height() / 2,
- it->window));
- }
-
- aura::Window* previous_panel = NULL;
- for (std::map<int, aura::Window*>::const_iterator it =
- window_ordering.begin();
- it != window_ordering.end() && it->second != active_panel; ++it) {
- if (previous_panel)
- panel_container_->StackChildAbove(it->second, previous_panel);
- previous_panel = it->second;
- }
-
- previous_panel = NULL;
- for (std::map<int, aura::Window*>::const_reverse_iterator it =
- window_ordering.rbegin();
- it != window_ordering.rend() && it->second != active_panel; ++it) {
- if (previous_panel)
- panel_container_->StackChildAbove(it->second, previous_panel);
- previous_panel = it->second;
- }
-
- panel_container_->StackChildAtTop(active_panel);
- if (dragged_panel_ && dragged_panel_->parent() == panel_container_)
- panel_container_->StackChildAtTop(dragged_panel_);
- last_active_panel_ = active_panel;
-}
-
-void PanelLayoutManager::UpdateCallouts() {
- ShelfAlignment alignment = launcher_->alignment();
- bool horizontal = alignment == SHELF_ALIGNMENT_TOP ||
- alignment == SHELF_ALIGNMENT_BOTTOM;
-
- for (PanelList::iterator iter = panel_windows_.begin();
- iter != panel_windows_.end(); ++iter) {
- aura::Window* panel = iter->window;
- views::Widget* callout_widget = iter->callout_widget;
-
- gfx::Rect current_bounds = panel->GetBoundsInScreen();
- gfx::Rect bounds = ScreenAsh::ConvertRectToScreen(panel->parent(),
- panel->GetTargetBounds());
- gfx::Rect icon_bounds =
- launcher_->GetScreenBoundsOfItemIconForWindow(panel);
- if (icon_bounds.IsEmpty() || !panel->layer()->GetTargetVisibility() ||
- panel == dragged_panel_) {
- callout_widget->Hide();
- callout_widget->GetNativeWindow()->layer()->SetOpacity(0);
- continue;
- }
-
- gfx::Rect callout_bounds = callout_widget->GetWindowBoundsInScreen();
- gfx::Vector2d slide_vector = bounds.origin() - current_bounds.origin();
- int slide_distance = horizontal ? slide_vector.x() : slide_vector.y();
- int distance_until_over_panel = 0;
- if (horizontal) {
- callout_bounds.set_x(
- icon_bounds.x() + (icon_bounds.width() - callout_bounds.width()) / 2);
- distance_until_over_panel = std::max(
- current_bounds.x() - callout_bounds.x(),
- callout_bounds.right() - current_bounds.right());
- } else {
- callout_bounds.set_y(
- icon_bounds.y() + (icon_bounds.height() -
- callout_bounds.height()) / 2);
- distance_until_over_panel = std::max(
- current_bounds.y() - callout_bounds.y(),
- callout_bounds.bottom() - current_bounds.bottom());
- }
- switch (alignment) {
- case SHELF_ALIGNMENT_BOTTOM:
- callout_bounds.set_y(bounds.bottom());
- break;
- case SHELF_ALIGNMENT_LEFT:
- callout_bounds.set_x(bounds.x() - callout_bounds.width());
- break;
- case SHELF_ALIGNMENT_RIGHT:
- callout_bounds.set_x(bounds.right());
- break;
- case SHELF_ALIGNMENT_TOP:
- callout_bounds.set_y(bounds.y() - callout_bounds.height());
- break;
- }
- callout_bounds = ScreenAsh::ConvertRectFromScreen(
- callout_widget->GetNativeWindow()->parent(),
- callout_bounds);
-
- SetChildBoundsDirect(callout_widget->GetNativeWindow(), callout_bounds);
- panel_container_->StackChildAbove(callout_widget->GetNativeWindow(),
- panel);
- callout_widget->Show();
-
- ui::Layer* layer = callout_widget->GetNativeWindow()->layer();
- // If the panel is not over the callout position or has just become visible
- // then fade in the callout.
- if ((distance_until_over_panel > 0 || layer->GetTargetOpacity() < 1) &&
- panel->layer()->GetTargetTransform().IsIdentity()) {
- if (distance_until_over_panel > 0 &&
- slide_distance >= distance_until_over_panel) {
- layer->SetOpacity(0);
- // If the panel is not yet over the callout, then delay fading in
- // the callout until after the panel should be over it.
- int delay = kPanelSlideDurationMilliseconds *
- distance_until_over_panel / slide_distance;
- layer->SetOpacity(0);
- layer->GetAnimator()->StopAnimating();
- layer->GetAnimator()->SchedulePauseForProperties(
- base::TimeDelta::FromMilliseconds(delay),
- ui::LayerAnimationElement::OPACITY);
- }
- {
- ui::ScopedLayerAnimationSettings callout_settings(layer->GetAnimator());
- callout_settings.SetPreemptionStrategy(
- ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS);
- callout_settings.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(
- kCalloutFadeDurationMilliseconds));
- layer->SetOpacity(1);
- }
- }
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// keyboard::KeyboardControllerObserver implementation:
-
-void PanelLayoutManager::OnKeyboardBoundsChanging(
- const gfx::Rect& keyboard_bounds) {
- // This bounds change will have caused a change to the Shelf which does not
- // propogate automatically to this class, so manually recalculate bounds.
- OnWindowResized();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/panels/panel_layout_manager.h b/chromium/ash/wm/panels/panel_layout_manager.h
deleted file mode 100644
index 042d285cb1d..00000000000
--- a/chromium/ash/wm/panels/panel_layout_manager.h
+++ /dev/null
@@ -1,196 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_PANELS_PANEL_LAYOUT_MANAGER_H_
-#define ASH_WM_PANELS_PANEL_LAYOUT_MANAGER_H_
-
-#include <list>
-
-#include "ash/ash_export.h"
-#include "ash/display/display_controller.h"
-#include "ash/shelf/shelf_icon_observer.h"
-#include "ash/shelf/shelf_layout_manager_observer.h"
-#include "ash/shell_observer.h"
-#include "ash/wm/window_state_observer.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "ui/aura/client/activation_change_observer.h"
-#include "ui/aura/layout_manager.h"
-#include "ui/aura/window_observer.h"
-#include "ui/keyboard/keyboard_controller.h"
-#include "ui/keyboard/keyboard_controller_observer.h"
-
-namespace aura {
-class Window;
-class WindowTracker;
-}
-
-namespace gfx {
-class Rect;
-}
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-class Launcher;
-
-namespace internal {
-class PanelCalloutWidget;
-class ShelfLayoutManager;
-
-// PanelLayoutManager is responsible for organizing panels within the
-// workspace. It is associated with a specific container window (i.e.
-// kShellWindowId_PanelContainer) and controls the layout of any windows
-// added to that container.
-//
-// The constructor takes a |panel_container| argument which is expected to set
-// its layout manager to this instance, e.g.:
-// panel_container->SetLayoutManager(new PanelLayoutManager(panel_container));
-
-class ASH_EXPORT PanelLayoutManager
- : public aura::LayoutManager,
- public ShelfIconObserver,
- public ShellObserver,
- public aura::WindowObserver,
- public aura::client::ActivationChangeObserver,
- public keyboard::KeyboardControllerObserver,
- public DisplayController::Observer,
- public ShelfLayoutManagerObserver,
- public wm::WindowStateObserver {
- public:
- explicit PanelLayoutManager(aura::Window* panel_container);
- virtual ~PanelLayoutManager();
-
- // Call Shutdown() before deleting children of panel_container.
- void Shutdown();
-
- void StartDragging(aura::Window* panel);
- void FinishDragging();
-
- void ToggleMinimize(aura::Window* panel);
-
- // Returns the callout widget (arrow) for |panel|.
- views::Widget* GetCalloutWidgetForPanel(aura::Window* panel);
-
- ash::Launcher* launcher() { return launcher_; }
- void SetLauncher(ash::Launcher* launcher);
-
- // Overridden from aura::LayoutManager:
- virtual void OnWindowResized() OVERRIDE;
- virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE;
- virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE;
- virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE;
- virtual void OnChildWindowVisibilityChanged(aura::Window* child,
- bool visibile) OVERRIDE;
- virtual void SetChildBounds(aura::Window* child,
- const gfx::Rect& requested_bounds) OVERRIDE;
-
- // Overridden from ShelfIconObserver
- virtual void OnShelfIconPositionsChanged() OVERRIDE;
-
- // Overridden from ShellObserver
- virtual void OnShelfAlignmentChanged(aura::Window* root_window) OVERRIDE;
-
- // Overridden from ash::wm::WindowStateObserver
- virtual void OnWindowShowTypeChanged(wm::WindowState* window_state,
- wm::WindowShowType old_type) OVERRIDE;
-
- // Overridden from aura::WindowObserver
- virtual void OnWindowVisibilityChanged(aura::Window* window,
- bool visible) OVERRIDE;
-
- // Overridden from aura::client::ActivationChangeObserver
- virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) OVERRIDE;
-
- // Overridden from DisplayController::Observer
- virtual void OnDisplayConfigurationChanged() OVERRIDE;
-
- // Overridden from ShelfLayoutManagerObserver
- virtual void WillChangeVisibilityState(
- ShelfVisibilityState new_state) OVERRIDE;
-
- private:
- friend class PanelLayoutManagerTest;
- friend class PanelWindowResizerTest;
- friend class DockedWindowResizerTest;
- friend class DockedWindowLayoutManagerTest;
-
- views::Widget* CreateCalloutWidget();
-
- struct PanelInfo{
- PanelInfo() : window(NULL), callout_widget(NULL), slide_in(false) {}
-
- bool operator==(const aura::Window* other_window) const {
- return window == other_window;
- }
-
- // A weak pointer to the panel window.
- aura::Window* window;
- // The callout widget for this panel. This pointer must be managed
- // manually as this structure is used in a std::list. See
- // http://www.chromium.org/developers/smart-pointer-guidelines
- PanelCalloutWidget* callout_widget;
-
- // True on new and restored panel windows until the panel has been
- // positioned. The first time Relayout is called the panel will slide into
- // position and this will be set to false.
- bool slide_in;
- };
-
- typedef std::list<PanelInfo> PanelList;
-
- void MinimizePanel(aura::Window* panel);
- void RestorePanel(aura::Window* panel);
-
- // Called whenever the panel layout might change.
- void Relayout();
-
- // Called whenever the panel stacking order needs to be updated (e.g. focus
- // changes or a panel is moved).
- void UpdateStacking(aura::Window* active_panel);
-
- // Update the callout arrows for all managed panels.
- void UpdateCallouts();
-
- // Overridden from keyboard::KeyboardControllerObserver:
- virtual void OnKeyboardBoundsChanging(
- const gfx::Rect& keyboard_bounds) OVERRIDE;
-
- // Parent window associated with this layout manager.
- aura::Window* panel_container_;
- // Protect against recursive calls to OnWindowAddedToLayout().
- bool in_add_window_;
- // Protect against recursive calls to Relayout().
- bool in_layout_;
- // Ordered list of unowned pointers to panel windows.
- PanelList panel_windows_;
- // The panel being dragged.
- aura::Window* dragged_panel_;
- // The launcher we are observing for launcher icon changes.
- Launcher* launcher_;
- // The shelf layout manager being observed for visibility changes.
- ShelfLayoutManager* shelf_layout_manager_;
-
- // When not NULL, the shelf is hidden (i.e. full screen) and this tracks the
- // set of panel windows which have been temporarily hidden and need to be
- // restored when the shelf becomes visible again.
- scoped_ptr<aura::WindowTracker> restore_windows_on_shelf_visible_;
-
- // The last active panel. Used to maintain stacking order even if no panels
- // are currently focused.
- aura::Window* last_active_panel_;
- base::WeakPtrFactory<PanelLayoutManager> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_PANELS_PANEL_LAYOUT_MANAGER_H_
diff --git a/chromium/ash/wm/panels/panel_layout_manager_unittest.cc b/chromium/ash/wm/panels/panel_layout_manager_unittest.cc
deleted file mode 100644
index 5351afa2b1c..00000000000
--- a/chromium/ash/wm/panels/panel_layout_manager_unittest.cc
+++ /dev/null
@@ -1,800 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/panels/panel_layout_manager.h"
-
-#include "ash/ash_switches.h"
-#include "ash/launcher/launcher.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_button.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_model.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/shelf/shelf_util.h"
-#include "ash/shelf/shelf_view.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/launcher_test_api.h"
-#include "ash/test/shelf_view_test_api.h"
-#include "ash/test/shell_test_api.h"
-#include "ash/test/test_shelf_delegate.h"
-#include "ash/wm/mru_window_tracker.h"
-#include "ash/wm/window_util.h"
-#include "base/basictypes.h"
-#include "base/command_line.h"
-#include "base/compiler_specific.h"
-#include "base/i18n/rtl.h"
-#include "base/run_loop.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/views/corewm/corewm_switches.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-using aura::test::WindowIsAbove;
-
-class PanelLayoutManagerTest : public test::AshTestBase {
- public:
- PanelLayoutManagerTest() {}
- virtual ~PanelLayoutManagerTest() {}
-
- virtual void SetUp() OVERRIDE {
- test::AshTestBase::SetUp();
- ASSERT_TRUE(test::TestShelfDelegate::instance());
-
- shelf_view_test_.reset(new test::ShelfViewTestAPI(
- GetShelfView(Launcher::ForPrimaryDisplay())));
- shelf_view_test_->SetAnimationDuration(1);
- }
-
- aura::Window* CreateNormalWindow(const gfx::Rect& bounds) {
- return CreateTestWindowInShellWithBounds(bounds);
- }
-
- aura::Window* CreatePanelWindow(const gfx::Rect& bounds) {
- aura::Window* window = CreateTestWindowInShellWithDelegateAndType(
- NULL,
- aura::client::WINDOW_TYPE_PANEL,
- 0,
- bounds);
- test::TestShelfDelegate* shelf_delegate =
- test::TestShelfDelegate::instance();
- shelf_delegate->AddLauncherItem(window);
- PanelLayoutManager* manager = static_cast<PanelLayoutManager*>(
- GetPanelContainer(window)->layout_manager());
- manager->Relayout();
- shelf_view_test()->RunMessageLoopUntilAnimationsDone();
- return window;
- }
-
- aura::Window* GetPanelContainer(aura::Window* panel) {
- return Shell::GetContainer(panel->GetRootWindow(),
- internal::kShellWindowId_PanelContainer);
- }
-
- views::Widget* GetCalloutWidgetForPanel(aura::Window* panel) {
- PanelLayoutManager* manager =
- static_cast<PanelLayoutManager*>(GetPanelContainer(panel)->
- layout_manager());
- DCHECK(manager);
- PanelLayoutManager::PanelList::iterator found = std::find(
- manager->panel_windows_.begin(), manager->panel_windows_.end(),
- panel);
- DCHECK(found != manager->panel_windows_.end());
- DCHECK(found->callout_widget);
- return reinterpret_cast<views::Widget*>(found->callout_widget);
- }
-
- void PanelInScreen(aura::Window* panel) {
- gfx::Rect panel_bounds = panel->GetBoundsInRootWindow();
- gfx::Point root_point = gfx::Point(panel_bounds.x(), panel_bounds.y());
- gfx::Display display = ScreenAsh::FindDisplayContainingPoint(root_point);
-
- gfx::Rect panel_bounds_in_screen = panel->GetBoundsInScreen();
- gfx::Point screen_bottom_right = gfx::Point(
- panel_bounds_in_screen.right(),
- panel_bounds_in_screen.bottom());
- gfx::Rect display_bounds = display.bounds();
- EXPECT_TRUE(screen_bottom_right.x() < display_bounds.width() &&
- screen_bottom_right.y() < display_bounds.height());
- }
-
- void PanelsNotOverlapping(aura::Window* panel1, aura::Window* panel2) {
- // Waits until all shelf view animations are done.
- shelf_view_test()->RunMessageLoopUntilAnimationsDone();
- gfx::Rect window1_bounds = panel1->GetBoundsInRootWindow();
- gfx::Rect window2_bounds = panel2->GetBoundsInRootWindow();
-
- EXPECT_FALSE(window1_bounds.Intersects(window2_bounds));
- }
-
- // TODO(dcheng): This should be const, but GetScreenBoundsOfItemIconForWindow
- // takes a non-const Window. We can probably fix that.
- void IsPanelAboveLauncherIcon(aura::Window* panel) {
- // Waits until all shelf view animations are done.
- shelf_view_test()->RunMessageLoopUntilAnimationsDone();
-
- Launcher* launcher =
- RootWindowController::ForLauncher(panel)->shelf()->launcher();
- gfx::Rect icon_bounds = launcher->GetScreenBoundsOfItemIconForWindow(panel);
- ASSERT_FALSE(icon_bounds.width() == 0 && icon_bounds.height() == 0);
-
- gfx::Rect window_bounds = panel->GetBoundsInScreen();
- ASSERT_LT(icon_bounds.width(), window_bounds.width());
- ASSERT_LT(icon_bounds.height(), window_bounds.height());
- gfx::Rect launcher_bounds = launcher->shelf_widget()->
- GetWindowBoundsInScreen();
- ShelfAlignment alignment = GetAlignment(panel->GetRootWindow());
-
- if (IsHorizontal(alignment)) {
- // The horizontal bounds of the panel window should contain the bounds of
- // the launcher icon.
- EXPECT_LE(window_bounds.x(), icon_bounds.x());
- EXPECT_GE(window_bounds.right(), icon_bounds.right());
- } else {
- // The vertical bounds of the panel window should contain the bounds of
- // the launcher icon.
- EXPECT_LE(window_bounds.y(), icon_bounds.y());
- EXPECT_GE(window_bounds.bottom(), icon_bounds.bottom());
- }
-
- switch (alignment) {
- case SHELF_ALIGNMENT_BOTTOM:
- EXPECT_EQ(launcher_bounds.y(), window_bounds.bottom());
- break;
- case SHELF_ALIGNMENT_LEFT:
- EXPECT_EQ(launcher_bounds.right(), window_bounds.x());
- break;
- case SHELF_ALIGNMENT_RIGHT:
- EXPECT_EQ(launcher_bounds.x(), window_bounds.right());
- break;
- case SHELF_ALIGNMENT_TOP:
- EXPECT_EQ(launcher_bounds.bottom(), window_bounds.y());
- break;
- }
- }
-
- void IsCalloutAboveLauncherIcon(aura::Window* panel) {
- // Flush the message loop, since callout updates use a delayed task.
- base::RunLoop().RunUntilIdle();
- views::Widget* widget = GetCalloutWidgetForPanel(panel);
-
- Launcher* launcher =
- RootWindowController::ForLauncher(panel)->shelf()->launcher();
- gfx::Rect icon_bounds = launcher->GetScreenBoundsOfItemIconForWindow(panel);
- ASSERT_FALSE(icon_bounds.IsEmpty());
-
- gfx::Rect panel_bounds = panel->GetBoundsInScreen();
- gfx::Rect callout_bounds = widget->GetWindowBoundsInScreen();
- ASSERT_FALSE(icon_bounds.IsEmpty());
-
- EXPECT_TRUE(widget->IsVisible());
-
- ShelfAlignment alignment = GetAlignment(panel->GetRootWindow());
- switch (alignment) {
- case SHELF_ALIGNMENT_BOTTOM:
- EXPECT_EQ(panel_bounds.bottom(), callout_bounds.y());
- break;
- case SHELF_ALIGNMENT_LEFT:
- EXPECT_EQ(panel_bounds.x(), callout_bounds.right());
- break;
- case SHELF_ALIGNMENT_RIGHT:
- EXPECT_EQ(panel_bounds.right(), callout_bounds.x());
- break;
- case SHELF_ALIGNMENT_TOP:
- EXPECT_EQ(panel_bounds.y(), callout_bounds.bottom());
- break;
- }
-
- if (IsHorizontal(alignment)) {
- EXPECT_NEAR(icon_bounds.CenterPoint().x(),
- widget->GetWindowBoundsInScreen().CenterPoint().x(),
- 1);
- } else {
- EXPECT_NEAR(icon_bounds.CenterPoint().y(),
- widget->GetWindowBoundsInScreen().CenterPoint().y(),
- 1);
- }
- }
-
- bool IsPanelCalloutVisible(aura::Window* panel) {
- views::Widget* widget = GetCalloutWidgetForPanel(panel);
- return widget->IsVisible();
- }
-
- test::ShelfViewTestAPI* shelf_view_test() {
- return shelf_view_test_.get();
- }
-
- // Clicks the launcher items on |shelf_view| that is
- /// associated with given |window|.
- void ClickLauncherItemForWindow(ShelfView* shelf_view,
- aura::Window* window) {
- test::ShelfViewTestAPI test_api(shelf_view);
- test_api.SetAnimationDuration(1);
- test_api.RunMessageLoopUntilAnimationsDone();
- ShelfModel* model = test::ShellTestApi(Shell::GetInstance()).shelf_model();
- int index = model->ItemIndexByID(GetLauncherIDForWindow(window));
- gfx::Rect bounds = test_api.GetButton(index)->GetBoundsInScreen();
-
- aura::test::EventGenerator& event_generator = GetEventGenerator();
- event_generator.MoveMouseTo(bounds.CenterPoint());
- event_generator.ClickLeftButton();
-
- test_api.RunMessageLoopUntilAnimationsDone();
- }
-
- void SetAlignment(aura::Window* root_window, ShelfAlignment alignment) {
- ash::Shell* shell = ash::Shell::GetInstance();
- shell->SetShelfAlignment(alignment, root_window);
- }
-
- ShelfAlignment GetAlignment(aura::Window* root_window) {
- ash::Shell* shell = ash::Shell::GetInstance();
- return shell->GetShelfAlignment(root_window);
- }
-
- void SetShelfAutoHideBehavior(aura::Window* window,
- ShelfAutoHideBehavior behavior) {
- internal::ShelfLayoutManager* shelf =
- RootWindowController::ForWindow(window)->shelf()->
- shelf_layout_manager();
- shelf->SetAutoHideBehavior(behavior);
- ShelfView* shelf_view = GetShelfView(Launcher::ForWindow(window));
- test::ShelfViewTestAPI test_api(shelf_view);
- test_api.RunMessageLoopUntilAnimationsDone();
- }
-
- void SetShelfVisibilityState(aura::Window* window,
- ShelfVisibilityState visibility_state) {
- internal::ShelfLayoutManager* shelf =
- RootWindowController::ForWindow(window)->shelf()->
- shelf_layout_manager();
- shelf->SetState(visibility_state);
- }
-
- internal::ShelfView* GetShelfView(Launcher* launcher) {
- return test::LauncherTestAPI(launcher).shelf_view();
- }
-
- private:
- scoped_ptr<test::ShelfViewTestAPI> shelf_view_test_;
-
- bool IsHorizontal(ShelfAlignment alignment) {
- return alignment == SHELF_ALIGNMENT_BOTTOM ||
- alignment == SHELF_ALIGNMENT_TOP;
- }
-
- DISALLOW_COPY_AND_ASSIGN(PanelLayoutManagerTest);
-};
-
-class PanelLayoutManagerTextDirectionTest
- : public PanelLayoutManagerTest,
- public testing::WithParamInterface<bool> {
- public:
- PanelLayoutManagerTextDirectionTest() : is_rtl_(GetParam()) {}
- virtual ~PanelLayoutManagerTextDirectionTest() {}
-
- virtual void SetUp() OVERRIDE {
- original_locale = l10n_util::GetApplicationLocale(std::string());
- if (is_rtl_)
- base::i18n::SetICUDefaultLocale("he");
- PanelLayoutManagerTest::SetUp();
- ASSERT_EQ(is_rtl_, base::i18n::IsRTL());
- }
-
- virtual void TearDown() OVERRIDE {
- if (is_rtl_)
- base::i18n::SetICUDefaultLocale(original_locale);
- PanelLayoutManagerTest::TearDown();
- }
-
- private:
- bool is_rtl_;
- std::string original_locale;
-
- DISALLOW_COPY_AND_ASSIGN(PanelLayoutManagerTextDirectionTest);
-};
-
-// Tests that a created panel window is above the launcher icon in LTR and RTL.
-TEST_P(PanelLayoutManagerTextDirectionTest, AddOnePanel) {
- gfx::Rect bounds(0, 0, 201, 201);
- scoped_ptr<aura::Window> window(CreatePanelWindow(bounds));
- EXPECT_EQ(GetPanelContainer(window.get()), window->parent());
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(window.get()));
- EXPECT_NO_FATAL_FAILURE(IsCalloutAboveLauncherIcon(window.get()));
-}
-
-// Tests that a created panel window is successfully aligned over a hidden
-// launcher icon.
-TEST_F(PanelLayoutManagerTest, PanelAlignsToHiddenLauncherIcon) {
- gfx::Rect bounds(0, 0, 201, 201);
- SetShelfAutoHideBehavior(Shell::GetPrimaryRootWindow(),
- SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- scoped_ptr<aura::Window> normal_window(CreateNormalWindow(bounds));
- scoped_ptr<aura::Window> window(CreatePanelWindow(bounds));
- EXPECT_EQ(GetPanelContainer(window.get()), window->parent());
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(window.get()));
-}
-
-TEST_F(PanelLayoutManagerTest, PanelAlignsToHiddenLauncherIconSecondDisplay) {
- if (!SupportsMultipleDisplays())
- return;
-
- // Keep the displays wide so that launchers have enough
- // space for launcher buttons.
- UpdateDisplay("400x400,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- scoped_ptr<aura::Window> normal_window(
- CreateNormalWindow(gfx::Rect(450, 0, 100, 100)));
- scoped_ptr<aura::Window> panel(CreatePanelWindow(gfx::Rect(400, 0, 50, 50)));
- EXPECT_EQ(root_windows[1], panel->GetRootWindow());
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(panel.get()));
- gfx::Rect shelf_visible_position = panel->GetBoundsInScreen();
-
- SetShelfAutoHideBehavior(root_windows[1],
- SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- // Expect the panel X position to remain the same after the shelf is hidden
- // but the Y to move down.
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(panel.get()));
- EXPECT_EQ(shelf_visible_position.x(), panel->GetBoundsInScreen().x());
- EXPECT_GT(panel->GetBoundsInScreen().y(), shelf_visible_position.y());
-}
-
-// Tests interactions between multiple panels
-TEST_F(PanelLayoutManagerTest, MultiplePanelsAreAboveIcons) {
- gfx::Rect odd_bounds(0, 0, 201, 201);
- gfx::Rect even_bounds(0, 0, 200, 200);
-
- scoped_ptr<aura::Window> w1(CreatePanelWindow(odd_bounds));
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(w1.get()));
-
- scoped_ptr<aura::Window> w2(CreatePanelWindow(even_bounds));
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(w1.get()));
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(w2.get()));
-
- scoped_ptr<aura::Window> w3(CreatePanelWindow(odd_bounds));
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(w1.get()));
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(w2.get()));
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(w3.get()));
-}
-
-TEST_F(PanelLayoutManagerTest, MultiplePanelStacking) {
- gfx::Rect bounds(0, 0, 201, 201);
- scoped_ptr<aura::Window> w1(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w2(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w3(CreatePanelWindow(bounds));
-
- // Default stacking order.
- EXPECT_TRUE(WindowIsAbove(w3.get(), w2.get()));
- EXPECT_TRUE(WindowIsAbove(w2.get(), w1.get()));
-
- // Changing the active window should update the stacking order.
- wm::ActivateWindow(w1.get());
- shelf_view_test()->RunMessageLoopUntilAnimationsDone();
- EXPECT_TRUE(WindowIsAbove(w1.get(), w2.get()));
- EXPECT_TRUE(WindowIsAbove(w2.get(), w3.get()));
-
- wm::ActivateWindow(w2.get());
- shelf_view_test()->RunMessageLoopUntilAnimationsDone();
- EXPECT_TRUE(WindowIsAbove(w1.get(), w3.get()));
- EXPECT_TRUE(WindowIsAbove(w2.get(), w3.get()));
- EXPECT_TRUE(WindowIsAbove(w2.get(), w1.get()));
-
- wm::ActivateWindow(w3.get());
- EXPECT_TRUE(WindowIsAbove(w3.get(), w2.get()));
- EXPECT_TRUE(WindowIsAbove(w2.get(), w1.get()));
-}
-
-TEST_F(PanelLayoutManagerTest, MultiplePanelStackingVertical) {
- // set launcher shelf to be aligned on the right
- SetAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_RIGHT);
-
- // Size panels in such a way that ordering them by X coordinate would cause
- // stacking order to be incorrect. Test that stacking order is based on Y.
- scoped_ptr<aura::Window> w1(CreatePanelWindow(gfx::Rect(0, 0, 210, 201)));
- scoped_ptr<aura::Window> w2(CreatePanelWindow(gfx::Rect(0, 0, 220, 201)));
- scoped_ptr<aura::Window> w3(CreatePanelWindow(gfx::Rect(0, 0, 200, 201)));
-
- // Default stacking order.
- EXPECT_TRUE(WindowIsAbove(w3.get(), w2.get()));
- EXPECT_TRUE(WindowIsAbove(w2.get(), w1.get()));
-
- // Changing the active window should update the stacking order.
- wm::ActivateWindow(w1.get());
- shelf_view_test()->RunMessageLoopUntilAnimationsDone();
- EXPECT_TRUE(WindowIsAbove(w1.get(), w2.get()));
- EXPECT_TRUE(WindowIsAbove(w2.get(), w3.get()));
-
- wm::ActivateWindow(w2.get());
- shelf_view_test()->RunMessageLoopUntilAnimationsDone();
- EXPECT_TRUE(WindowIsAbove(w1.get(), w3.get()));
- EXPECT_TRUE(WindowIsAbove(w2.get(), w3.get()));
- EXPECT_TRUE(WindowIsAbove(w2.get(), w1.get()));
-
- wm::ActivateWindow(w3.get());
- EXPECT_TRUE(WindowIsAbove(w3.get(), w2.get()));
- EXPECT_TRUE(WindowIsAbove(w2.get(), w1.get()));
-}
-
-TEST_F(PanelLayoutManagerTest, MultiplePanelCallout) {
- gfx::Rect bounds(0, 0, 200, 200);
- scoped_ptr<aura::Window> w1(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w2(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w3(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w4(CreateNormalWindow(gfx::Rect()));
- shelf_view_test()->RunMessageLoopUntilAnimationsDone();
- EXPECT_TRUE(IsPanelCalloutVisible(w1.get()));
- EXPECT_TRUE(IsPanelCalloutVisible(w2.get()));
- EXPECT_TRUE(IsPanelCalloutVisible(w3.get()));
- wm::ActivateWindow(w1.get());
- EXPECT_NO_FATAL_FAILURE(IsCalloutAboveLauncherIcon(w1.get()));
- wm::ActivateWindow(w2.get());
- EXPECT_NO_FATAL_FAILURE(IsCalloutAboveLauncherIcon(w2.get()));
- wm::ActivateWindow(w3.get());
- EXPECT_NO_FATAL_FAILURE(IsCalloutAboveLauncherIcon(w3.get()));
- wm::ActivateWindow(w4.get());
- wm::ActivateWindow(w3.get());
- EXPECT_NO_FATAL_FAILURE(IsCalloutAboveLauncherIcon(w3.get()));
- w3.reset();
- EXPECT_NO_FATAL_FAILURE(IsCalloutAboveLauncherIcon(w2.get()));
-}
-
-// Tests removing panels.
-TEST_F(PanelLayoutManagerTest, RemoveLeftPanel) {
- gfx::Rect bounds(0, 0, 201, 201);
- scoped_ptr<aura::Window> w1(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w2(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w3(CreatePanelWindow(bounds));
-
- // At this point, windows should be stacked with 1 < 2 < 3
- wm::ActivateWindow(w1.get());
- shelf_view_test()->RunMessageLoopUntilAnimationsDone();
- // Now, windows should be stacked 1 > 2 > 3
- w1.reset();
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(w2.get()));
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(w3.get()));
- EXPECT_TRUE(WindowIsAbove(w2.get(), w3.get()));
-}
-
-TEST_F(PanelLayoutManagerTest, RemoveMiddlePanel) {
- gfx::Rect bounds(0, 0, 201, 201);
- scoped_ptr<aura::Window> w1(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w2(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w3(CreatePanelWindow(bounds));
-
- // At this point, windows should be stacked with 1 < 2 < 3
- wm::ActivateWindow(w2.get());
- // Windows should be stacked 1 < 2 > 3
- w2.reset();
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(w1.get()));
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(w3.get()));
- EXPECT_TRUE(WindowIsAbove(w3.get(), w1.get()));
-}
-
-TEST_F(PanelLayoutManagerTest, RemoveRightPanel) {
- gfx::Rect bounds(0, 0, 201, 201);
- scoped_ptr<aura::Window> w1(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w2(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w3(CreatePanelWindow(bounds));
-
- // At this point, windows should be stacked with 1 < 2 < 3
- wm::ActivateWindow(w3.get());
- // Order shouldn't change.
- w3.reset();
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(w1.get()));
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(w2.get()));
- EXPECT_TRUE(WindowIsAbove(w2.get(), w1.get()));
-}
-
-TEST_F(PanelLayoutManagerTest, RemoveNonActivePanel) {
- gfx::Rect bounds(0, 0, 201, 201);
- scoped_ptr<aura::Window> w1(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w2(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w3(CreatePanelWindow(bounds));
-
- // At this point, windows should be stacked with 1 < 2 < 3
- wm::ActivateWindow(w2.get());
- // Windows should be stacked 1 < 2 > 3
- w1.reset();
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(w2.get()));
- EXPECT_NO_FATAL_FAILURE(IsPanelAboveLauncherIcon(w3.get()));
- EXPECT_TRUE(WindowIsAbove(w2.get(), w3.get()));
-}
-
-TEST_F(PanelLayoutManagerTest, SplitView) {
- gfx::Rect bounds(0, 0, 90, 201);
- scoped_ptr<aura::Window> w1(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w2(CreatePanelWindow(bounds));
-
- EXPECT_NO_FATAL_FAILURE(PanelsNotOverlapping(w1.get(), w2.get()));
-}
-
-#if defined(OS_WIN)
-// RootWindow and Display can't resize on Windows Ash. http://crbug.com/165962
-#define MAYBE_SplitViewOverlapWhenLarge DISABLED_SplitViewOverlapWhenLarge
-#else
-#define MAYBE_SplitViewOverlapWhenLarge SplitViewOverlapWhenLarge
-#endif
-
-TEST_F(PanelLayoutManagerTest, MAYBE_SplitViewOverlapWhenLarge) {
- gfx::Rect bounds(0, 0, 600, 201);
- scoped_ptr<aura::Window> w1(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w2(CreatePanelWindow(bounds));
-
- EXPECT_NO_FATAL_FAILURE(PanelInScreen(w1.get()));
- EXPECT_NO_FATAL_FAILURE(PanelInScreen(w2.get()));
-}
-
-TEST_F(PanelLayoutManagerTest, FanWindows) {
- gfx::Rect bounds(0, 0, 201, 201);
- scoped_ptr<aura::Window> w1(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w2(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w3(CreatePanelWindow(bounds));
-
- shelf_view_test()->RunMessageLoopUntilAnimationsDone();
- int window_x1 = w1->GetBoundsInRootWindow().CenterPoint().x();
- int window_x2 = w2->GetBoundsInRootWindow().CenterPoint().x();
- int window_x3 = w3->GetBoundsInRootWindow().CenterPoint().x();
- Launcher* launcher = Launcher::ForPrimaryDisplay();
- int icon_x1 = launcher->GetScreenBoundsOfItemIconForWindow(w1.get()).x();
- int icon_x2 = launcher->GetScreenBoundsOfItemIconForWindow(w2.get()).x();
- EXPECT_EQ(window_x2 - window_x1, window_x3 - window_x2);
- int spacing = window_x2 - window_x1;
- EXPECT_GT(spacing, icon_x2 - icon_x1);
-}
-
-TEST_F(PanelLayoutManagerTest, FanLargeWindow) {
- gfx::Rect small_bounds(0, 0, 201, 201);
- gfx::Rect large_bounds(0, 0, 501, 201);
- scoped_ptr<aura::Window> w1(CreatePanelWindow(small_bounds));
- scoped_ptr<aura::Window> w2(CreatePanelWindow(large_bounds));
- scoped_ptr<aura::Window> w3(CreatePanelWindow(small_bounds));
-
- shelf_view_test()->RunMessageLoopUntilAnimationsDone();
- int window_x1 = w1->GetBoundsInRootWindow().CenterPoint().x();
- int window_x2 = w2->GetBoundsInRootWindow().CenterPoint().x();
- int window_x3 = w3->GetBoundsInRootWindow().CenterPoint().x();
- // The distances may not be equidistant with a large panel but the panels
- // should be in the correct order with respect to their midpoints.
- EXPECT_GT(window_x2, window_x1);
- EXPECT_GT(window_x3, window_x2);
-}
-
-TEST_F(PanelLayoutManagerTest, MinimizeRestorePanel) {
- gfx::Rect bounds(0, 0, 201, 201);
- scoped_ptr<aura::Window> window(CreatePanelWindow(bounds));
- // Activate the window, ensure callout is visible.
- wm::ActivateWindow(window.get());
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsPanelCalloutVisible(window.get()));
- // Minimize the panel, callout should be hidden.
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(IsPanelCalloutVisible(window.get()));
- // Restore the pantel; panel should not be activated by default but callout
- // should be visible.
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsPanelCalloutVisible(window.get()));
- // Activate the window, ensure callout is visible.
- wm::ActivateWindow(window.get());
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(IsPanelCalloutVisible(window.get()));
-}
-
-TEST_F(PanelLayoutManagerTest, PanelMoveBetweenMultipleDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- // Keep the displays wide so that launchers have enough
- // space for launcher buttons.
- UpdateDisplay("600x400,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- scoped_ptr<aura::Window> p1_d1(CreatePanelWindow(gfx::Rect(0, 0, 50, 50)));
- scoped_ptr<aura::Window> p2_d1(CreatePanelWindow(gfx::Rect(0, 0, 50, 50)));
- scoped_ptr<aura::Window> p1_d2(CreatePanelWindow(gfx::Rect(600, 0, 50, 50)));
- scoped_ptr<aura::Window> p2_d2(CreatePanelWindow(gfx::Rect(600, 0, 50, 50)));
-
- ShelfView* shelf_view_1st = GetShelfView(Launcher::ForPrimaryDisplay());
- ShelfView* shelf_view_2nd =
- GetShelfView(Launcher::ForWindow(root_windows[1]));
-
- EXPECT_EQ(root_windows[0], p1_d1->GetRootWindow());
- EXPECT_EQ(root_windows[0], p2_d1->GetRootWindow());
- EXPECT_EQ(root_windows[1], p1_d2->GetRootWindow());
- EXPECT_EQ(root_windows[1], p2_d2->GetRootWindow());
-
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, p1_d1->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, p2_d1->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, p1_d2->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, p2_d2->parent()->id());
-
- // Test a panel on 1st display.
- // Clicking on the same display has no effect.
- ClickLauncherItemForWindow(shelf_view_1st, p1_d1.get());
- EXPECT_EQ(root_windows[0], p1_d1->GetRootWindow());
- EXPECT_EQ(root_windows[0], p2_d1->GetRootWindow());
- EXPECT_EQ(root_windows[1], p1_d2->GetRootWindow());
- EXPECT_EQ(root_windows[1], p1_d2->GetRootWindow());
- EXPECT_FALSE(root_windows[1]->GetBoundsInScreen().Contains(
- p1_d1->GetBoundsInScreen()));
-
- // Test if clicking on another display moves the panel to
- // that display.
- ClickLauncherItemForWindow(shelf_view_2nd, p1_d1.get());
- EXPECT_EQ(root_windows[1], p1_d1->GetRootWindow());
- EXPECT_EQ(root_windows[0], p2_d1->GetRootWindow());
- EXPECT_EQ(root_windows[1], p1_d2->GetRootWindow());
- EXPECT_EQ(root_windows[1], p2_d2->GetRootWindow());
- EXPECT_TRUE(root_windows[1]->GetBoundsInScreen().Contains(
- p1_d1->GetBoundsInScreen()));
-
- // Test a panel on 2nd display.
- // Clicking on the same display has no effect.
- ClickLauncherItemForWindow(shelf_view_2nd, p1_d2.get());
- EXPECT_EQ(root_windows[1], p1_d1->GetRootWindow());
- EXPECT_EQ(root_windows[0], p2_d1->GetRootWindow());
- EXPECT_EQ(root_windows[1], p1_d2->GetRootWindow());
- EXPECT_EQ(root_windows[1], p2_d2->GetRootWindow());
- EXPECT_TRUE(root_windows[1]->GetBoundsInScreen().Contains(
- p1_d2->GetBoundsInScreen()));
-
- // Test if clicking on another display moves the panel to
- // that display.
- ClickLauncherItemForWindow(shelf_view_1st, p1_d2.get());
- EXPECT_EQ(root_windows[1], p1_d1->GetRootWindow());
- EXPECT_EQ(root_windows[0], p2_d1->GetRootWindow());
- EXPECT_EQ(root_windows[0], p1_d2->GetRootWindow());
- EXPECT_EQ(root_windows[1], p2_d2->GetRootWindow());
- EXPECT_TRUE(root_windows[0]->GetBoundsInScreen().Contains(
- p1_d2->GetBoundsInScreen()));
-
- // Test if clicking on a previously moved window moves the
- // panel back to the original display.
- ClickLauncherItemForWindow(shelf_view_1st, p1_d1.get());
- EXPECT_EQ(root_windows[0], p1_d1->GetRootWindow());
- EXPECT_EQ(root_windows[0], p2_d1->GetRootWindow());
- EXPECT_EQ(root_windows[0], p1_d2->GetRootWindow());
- EXPECT_EQ(root_windows[1], p2_d2->GetRootWindow());
- EXPECT_TRUE(root_windows[0]->GetBoundsInScreen().Contains(
- p1_d1->GetBoundsInScreen()));
-}
-
-TEST_F(PanelLayoutManagerTest, PanelAttachPositionMultipleDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- // Keep the displays wide so that launchers have enough space for launcher
- // buttons. Use differently sized displays so the launcher is in a different
- // position on second display.
- UpdateDisplay("600x400,600x600");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- scoped_ptr<aura::Window> p1_d1(CreatePanelWindow(gfx::Rect(0, 0, 50, 50)));
- scoped_ptr<aura::Window> p1_d2(CreatePanelWindow(gfx::Rect(600, 0, 50, 50)));
-
- EXPECT_EQ(root_windows[0], p1_d1->GetRootWindow());
- EXPECT_EQ(root_windows[1], p1_d2->GetRootWindow());
-
- IsPanelAboveLauncherIcon(p1_d1.get());
- IsCalloutAboveLauncherIcon(p1_d1.get());
- IsPanelAboveLauncherIcon(p1_d2.get());
- IsCalloutAboveLauncherIcon(p1_d2.get());
-}
-
-TEST_F(PanelLayoutManagerTest, PanelAlignmentSecondDisplay) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("600x400,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- scoped_ptr<aura::Window> p1_d2(CreatePanelWindow(gfx::Rect(600, 0, 50, 50)));
- EXPECT_EQ(root_windows[1], p1_d2->GetRootWindow());
-
- IsPanelAboveLauncherIcon(p1_d2.get());
- IsCalloutAboveLauncherIcon(p1_d2.get());
-
- SetAlignment(root_windows[1], SHELF_ALIGNMENT_RIGHT);
- IsPanelAboveLauncherIcon(p1_d2.get());
- IsCalloutAboveLauncherIcon(p1_d2.get());
- SetAlignment(root_windows[1], SHELF_ALIGNMENT_LEFT);
- IsPanelAboveLauncherIcon(p1_d2.get());
- IsCalloutAboveLauncherIcon(p1_d2.get());
- SetAlignment(root_windows[1], SHELF_ALIGNMENT_TOP);
- IsPanelAboveLauncherIcon(p1_d2.get());
- IsCalloutAboveLauncherIcon(p1_d2.get());
-}
-
-TEST_F(PanelLayoutManagerTest, AlignmentLeft) {
- gfx::Rect bounds(0, 0, 201, 201);
- scoped_ptr<aura::Window> w(CreatePanelWindow(bounds));
- SetAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_LEFT);
- IsPanelAboveLauncherIcon(w.get());
- IsCalloutAboveLauncherIcon(w.get());
-}
-
-TEST_F(PanelLayoutManagerTest, AlignmentRight) {
- gfx::Rect bounds(0, 0, 201, 201);
- scoped_ptr<aura::Window> w(CreatePanelWindow(bounds));
- SetAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_RIGHT);
- IsPanelAboveLauncherIcon(w.get());
- IsCalloutAboveLauncherIcon(w.get());
-}
-
-TEST_F(PanelLayoutManagerTest, AlignmentTop) {
- gfx::Rect bounds(0, 0, 201, 201);
- scoped_ptr<aura::Window> w(CreatePanelWindow(bounds));
- SetAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_TOP);
- IsPanelAboveLauncherIcon(w.get());
- IsCalloutAboveLauncherIcon(w.get());
-}
-
-// Tests that panels will hide and restore their state with the shelf visibility
-// state. This ensures that entering full-screen mode will hide your panels
-// until you leave it.
-TEST_F(PanelLayoutManagerTest, PanelsHideAndRestoreWithShelf) {
- gfx::Rect bounds(0, 0, 201, 201);
-
- scoped_ptr<aura::Window> w1(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w2(CreatePanelWindow(bounds));
- scoped_ptr<aura::Window> w3;
- // Minimize w2.
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
- RunAllPendingInMessageLoop();
- EXPECT_TRUE(w1->IsVisible());
- EXPECT_FALSE(w2->IsVisible());
-
- SetShelfVisibilityState(Shell::GetPrimaryRootWindow(), SHELF_HIDDEN);
- RunAllPendingInMessageLoop();
-
- // w3 is created while in full-screen mode, should only become visible when
- // we exit fullscreen mode.
- w3.reset(CreatePanelWindow(bounds));
-
- EXPECT_FALSE(w1->IsVisible());
- EXPECT_FALSE(w2->IsVisible());
- EXPECT_FALSE(w3->IsVisible());
-
- // While in full-screen mode, the panel windows should still be in the
- // switchable window list - http://crbug.com/313919.
- MruWindowTracker::WindowList switchable_window_list =
- Shell::GetInstance()->mru_window_tracker()->BuildMruWindowList();
- EXPECT_EQ(3u, switchable_window_list.size());
- EXPECT_NE(switchable_window_list.end(),
- std::find(switchable_window_list.begin(), switchable_window_list.end(),
- w1.get()));
- EXPECT_NE(switchable_window_list.end(),
- std::find(switchable_window_list.begin(), switchable_window_list.end(),
- w2.get()));
- EXPECT_NE(switchable_window_list.end(),
- std::find(switchable_window_list.begin(), switchable_window_list.end(),
- w3.get()));
-
- SetShelfVisibilityState(Shell::GetPrimaryRootWindow(), SHELF_VISIBLE);
- RunAllPendingInMessageLoop();
-
- // Windows should be restored to their prior state.
- EXPECT_TRUE(w1->IsVisible());
- EXPECT_FALSE(w2->IsVisible());
- EXPECT_TRUE(w3->IsVisible());
-}
-
-INSTANTIATE_TEST_CASE_P(LtrRtl, PanelLayoutManagerTextDirectionTest,
- testing::Bool());
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/panels/panel_window_event_handler.cc b/chromium/ash/wm/panels/panel_window_event_handler.cc
deleted file mode 100644
index cb494699195..00000000000
--- a/chromium/ash/wm/panels/panel_window_event_handler.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/panels/panel_window_event_handler.h"
-
-#include "ash/wm/window_state.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/base/hit_test.h"
-#include "ui/events/event.h"
-
-namespace ash {
-namespace internal {
-
-PanelWindowEventHandler::PanelWindowEventHandler(aura::Window* owner)
- : ToplevelWindowEventHandler(owner) {
-}
-
-PanelWindowEventHandler::~PanelWindowEventHandler() {
-}
-
-void PanelWindowEventHandler::OnMouseEvent(ui::MouseEvent* event) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- if (event->type() == ui::ET_MOUSE_PRESSED &&
- event->flags() & ui::EF_IS_DOUBLE_CLICK &&
- event->IsOnlyLeftMouseButton() &&
- target->delegate()->GetNonClientComponent(event->location()) ==
- HTCAPTION) {
- wm::GetWindowState(target)->Minimize();
- return;
- }
- ToplevelWindowEventHandler::OnMouseEvent(event);
-}
-
-void PanelWindowEventHandler::OnGestureEvent(ui::GestureEvent* event) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- if (event->type() == ui::ET_GESTURE_TAP &&
- event->details().tap_count() == 2 &&
- target->delegate()->GetNonClientComponent(event->location()) ==
- HTCAPTION) {
- wm::GetWindowState(target)->Minimize();
- event->StopPropagation();
- return;
- }
- ToplevelWindowEventHandler::OnGestureEvent(event);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/panels/panel_window_event_handler.h b/chromium/ash/wm/panels/panel_window_event_handler.h
deleted file mode 100644
index 2823b885cc7..00000000000
--- a/chromium/ash/wm/panels/panel_window_event_handler.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_PANELS_PANEL_WINDOW_EVENT_HANDLER_H_
-#define ASH_WM_PANELS_PANEL_WINDOW_EVENT_HANDLER_H_
-
-#include "ash/wm/toplevel_window_event_handler.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-namespace internal {
-
-// PanelWindowEventHandler minimizes panels when the user double clicks or
-// double taps on the panel header.
-class PanelWindowEventHandler : public ToplevelWindowEventHandler {
- public:
- explicit PanelWindowEventHandler(aura::Window* owner);
- virtual ~PanelWindowEventHandler();
-
- // TopLevelWindowEventHandler:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PanelWindowEventHandler);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_PANELS_PANEL_WINDOW_EVENT_HANDLER_H_
diff --git a/chromium/ash/wm/panels/panel_window_resizer.cc b/chromium/ash/wm/panels/panel_window_resizer.cc
deleted file mode 100644
index 739544f97d4..00000000000
--- a/chromium/ash/wm/panels/panel_window_resizer.cc
+++ /dev/null
@@ -1,241 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/panels/panel_window_resizer.h"
-
-#include "ash/display/display_controller.h"
-#include "ash/launcher/launcher.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ash/wm/panels/panel_layout_manager.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "base/memory/weak_ptr.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/client/window_tree_client.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-
-namespace {
-const int kPanelSnapToLauncherDistance = 30;
-
-internal::PanelLayoutManager* GetPanelLayoutManager(
- aura::Window* panel_container) {
- DCHECK(panel_container->id() == internal::kShellWindowId_PanelContainer);
- return static_cast<internal::PanelLayoutManager*>(
- panel_container->layout_manager());
-}
-
-} // namespace
-
-PanelWindowResizer::~PanelWindowResizer() {
-}
-
-// static
-PanelWindowResizer*
-PanelWindowResizer::Create(WindowResizer* next_window_resizer,
- aura::Window* window,
- const gfx::Point& location,
- int window_component,
- aura::client::WindowMoveSource source) {
- Details details(window, location, window_component, source);
- return details.is_resizable ?
- new PanelWindowResizer(next_window_resizer, details) : NULL;
-}
-
-void PanelWindowResizer::Drag(const gfx::Point& location, int event_flags) {
- last_location_ = location;
- wm::ConvertPointToScreen(GetTarget()->parent(), &last_location_);
- if (!did_move_or_resize_) {
- did_move_or_resize_ = true;
- StartedDragging();
- }
-
- // Check if the destination has changed displays.
- gfx::Screen* screen = Shell::GetScreen();
- const gfx::Display dst_display =
- screen->GetDisplayNearestPoint(last_location_);
- if (dst_display.id() !=
- screen->GetDisplayNearestWindow(panel_container_->GetRootWindow()).id()) {
- // The panel is being dragged to a new display. If the previous container is
- // the current parent of the panel it will be informed of the end of drag
- // when the panel is reparented, otherwise let the previous container know
- // the drag is complete. If we told the panel's parent that the drag was
- // complete it would begin positioning the panel.
- if (GetTarget()->parent() != panel_container_)
- GetPanelLayoutManager(panel_container_)->FinishDragging();
- aura::Window* dst_root = Shell::GetInstance()->display_controller()->
- GetRootWindowForDisplayId(dst_display.id());
- panel_container_ = Shell::GetContainer(
- dst_root, internal::kShellWindowId_PanelContainer);
-
- // The panel's parent already knows that the drag is in progress for this
- // panel.
- if (panel_container_ && GetTarget()->parent() != panel_container_)
- GetPanelLayoutManager(panel_container_)->StartDragging(GetTarget());
- }
- gfx::Point offset;
- gfx::Rect bounds(CalculateBoundsForDrag(details_, location));
- should_attach_ = AttachToLauncher(bounds, &offset);
- gfx::Point modified_location(location.x() + offset.x(),
- location.y() + offset.y());
-
- base::WeakPtr<PanelWindowResizer> resizer(weak_ptr_factory_.GetWeakPtr());
- next_window_resizer_->Drag(modified_location, event_flags);
- if (!resizer)
- return;
-
- if (should_attach_ &&
- !(details_.bounds_change & WindowResizer::kBoundsChange_Resizes)) {
- UpdateLauncherPosition();
- }
-}
-
-void PanelWindowResizer::CompleteDrag(int event_flags) {
- // The root window can change when dragging into a different screen.
- next_window_resizer_->CompleteDrag(event_flags);
- FinishDragging();
-}
-
-void PanelWindowResizer::RevertDrag() {
- next_window_resizer_->RevertDrag();
- should_attach_ = was_attached_;
- FinishDragging();
-}
-
-aura::Window* PanelWindowResizer::GetTarget() {
- return next_window_resizer_->GetTarget();
-}
-
-const gfx::Point& PanelWindowResizer::GetInitialLocation() const {
- return details_.initial_location_in_parent;
-}
-
-PanelWindowResizer::PanelWindowResizer(WindowResizer* next_window_resizer,
- const Details& details)
- : details_(details),
- next_window_resizer_(next_window_resizer),
- panel_container_(NULL),
- initial_panel_container_(NULL),
- did_move_or_resize_(false),
- was_attached_(wm::GetWindowState(GetTarget())->panel_attached()),
- should_attach_(was_attached_),
- weak_ptr_factory_(this) {
- DCHECK(details_.is_resizable);
- panel_container_ = Shell::GetContainer(
- details.window->GetRootWindow(),
- internal::kShellWindowId_PanelContainer);
- initial_panel_container_ = panel_container_;
-}
-
-bool PanelWindowResizer::AttachToLauncher(const gfx::Rect& bounds,
- gfx::Point* offset) {
- bool should_attach = false;
- if (panel_container_) {
- internal::PanelLayoutManager* panel_layout_manager =
- GetPanelLayoutManager(panel_container_);
- gfx::Rect launcher_bounds = ScreenAsh::ConvertRectFromScreen(
- GetTarget()->parent(),
- panel_layout_manager->launcher()->
- shelf_widget()->GetWindowBoundsInScreen());
- switch (panel_layout_manager->launcher()->alignment()) {
- case SHELF_ALIGNMENT_BOTTOM:
- if (bounds.bottom() >= (launcher_bounds.y() -
- kPanelSnapToLauncherDistance)) {
- should_attach = true;
- offset->set_y(launcher_bounds.y() - bounds.height() - bounds.y());
- }
- break;
- case SHELF_ALIGNMENT_LEFT:
- if (bounds.x() <= (launcher_bounds.right() +
- kPanelSnapToLauncherDistance)) {
- should_attach = true;
- offset->set_x(launcher_bounds.right() - bounds.x());
- }
- break;
- case SHELF_ALIGNMENT_RIGHT:
- if (bounds.right() >= (launcher_bounds.x() -
- kPanelSnapToLauncherDistance)) {
- should_attach = true;
- offset->set_x(launcher_bounds.x() - bounds.width() - bounds.x());
- }
- break;
- case SHELF_ALIGNMENT_TOP:
- if (bounds.y() <= (launcher_bounds.bottom() +
- kPanelSnapToLauncherDistance)) {
- should_attach = true;
- offset->set_y(launcher_bounds.bottom() - bounds.y());
- }
- break;
- }
- }
- return should_attach;
-}
-
-void PanelWindowResizer::StartedDragging() {
- // Tell the panel layout manager that we are dragging this panel before
- // attaching it so that it does not get repositioned.
- if (panel_container_)
- GetPanelLayoutManager(panel_container_)->StartDragging(GetTarget());
- if (!was_attached_) {
- // Attach the panel while dragging placing it in front of other panels.
- wm::GetWindowState(GetTarget())->set_continue_drag_after_reparent(true);
- wm::GetWindowState(GetTarget())->set_panel_attached(true);
- // We use root window coordinates to ensure that during the drag the panel
- // is reparented to a container in the root window that has that window.
- aura::Window* target = GetTarget();
- aura::Window* target_root = target->GetRootWindow();
- aura::Window* old_parent = target->parent();
- aura::client::ParentWindowWithContext(
- target, target_root, target_root->GetBoundsInScreen());
- wm::ReparentTransientChildrenOfChild(target, old_parent, target->parent());
- }
-}
-
-void PanelWindowResizer::FinishDragging() {
- if (!did_move_or_resize_)
- return;
- if (details_.bounds_change & WindowResizer::kBoundsChange_Resizes)
- should_attach_ = was_attached_;
- if (wm::GetWindowState(GetTarget())->panel_attached() != should_attach_) {
- wm::GetWindowState(GetTarget())->set_panel_attached(should_attach_);
- // We use last known location to ensure that after the drag the panel
- // is reparented to a container in the root window that has that location.
- aura::Window* target = GetTarget();
- aura::Window* target_root = target->GetRootWindow();
- aura::Window* old_parent = target->parent();
- aura::client::ParentWindowWithContext(
- target, target_root, gfx::Rect(last_location_, gfx::Size()));
- wm::ReparentTransientChildrenOfChild(target, old_parent, target->parent());
- }
-
- // If we started the drag in one root window and moved into another root
- // but then canceled the drag we may need to inform the original layout
- // manager that the drag is finished.
- if (initial_panel_container_ != panel_container_)
- GetPanelLayoutManager(initial_panel_container_)->FinishDragging();
- if (panel_container_)
- GetPanelLayoutManager(panel_container_)->FinishDragging();
-}
-
-void PanelWindowResizer::UpdateLauncherPosition() {
- if (panel_container_) {
- GetPanelLayoutManager(panel_container_)->launcher()->
- UpdateIconPositionForWindow(GetTarget());
- }
-}
-
-} // namespace aura
diff --git a/chromium/ash/wm/panels/panel_window_resizer.h b/chromium/ash/wm/panels/panel_window_resizer.h
deleted file mode 100644
index df3d8c44513..00000000000
--- a/chromium/ash/wm/panels/panel_window_resizer.h
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_
-#define ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_
-
-#include "ash/wm/window_resizer.h"
-#include "base/compiler_specific.h"
-#include "base/memory/weak_ptr.h"
-
-namespace gfx {
-class Rect;
-class Point;
-}
-
-namespace ash {
-
-// PanelWindowResizer is used by ToplevelWindowEventFilter to handle dragging,
-// moving or resizing panel window. These can be attached and detached from the
-// launcher.
-class ASH_EXPORT PanelWindowResizer : public WindowResizer {
- public:
- virtual ~PanelWindowResizer();
-
- // Creates a new PanelWindowResizer. The caller takes ownership of the
- // returned object. The ownership of |next_window_resizer| is taken by the
- // returned object. Returns NULL if not resizable.
- static PanelWindowResizer* Create(WindowResizer* next_window_resizer,
- aura::Window* window,
- const gfx::Point& location,
- int window_component,
- aura::client::WindowMoveSource source);
-
- // WindowResizer:
- virtual void Drag(const gfx::Point& location, int event_flags) OVERRIDE;
- virtual void CompleteDrag(int event_flags) OVERRIDE;
- virtual void RevertDrag() OVERRIDE;
- virtual aura::Window* GetTarget() OVERRIDE;
- virtual const gfx::Point& GetInitialLocation() const OVERRIDE;
-
- private:
- // Creates PanelWindowResizer that adds the ability to attach / detach panel
- // windows as well as reparenting them to the panel layer while dragging to
- // |next_window_resizer|. This object takes ownership of
- // |next_window_resizer|.
- PanelWindowResizer(WindowResizer* next_window_resizer,
- const Details& details);
-
- // Checks if the provided window bounds should attach to the launcher. If true
- // the offset gives the necessary adjustment to snap to the launcher.
- bool AttachToLauncher(const gfx::Rect& bounds, gfx::Point* offset);
-
- // Tracks the panel's initial position and attachment at the start of a drag
- // and informs the PanelLayoutManager that a drag has started if necessary.
- void StartedDragging();
-
- // Informs the PanelLayoutManager that the drag is complete if it was informed
- // of the drag start.
- void FinishDragging();
-
- // Updates the dragged panel's index in the launcher.
- void UpdateLauncherPosition();
-
- const Details details_;
-
- // Last pointer location in screen coordinates.
- gfx::Point last_location_;
-
- // Wraps a window resizer and adds panel detaching / reattaching and snapping
- // to launcher behavior during drags.
- scoped_ptr<WindowResizer> next_window_resizer_;
-
- // Panel container window.
- aura::Window* panel_container_;
- aura::Window* initial_panel_container_;
-
- // Set to true once Drag() is invoked and the bounds of the window change.
- bool did_move_or_resize_;
-
- // True if the window started attached to the launcher.
- const bool was_attached_;
-
- // True if the window should attach to the launcher after releasing.
- bool should_attach_;
-
- base::WeakPtrFactory<PanelWindowResizer> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(PanelWindowResizer);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_
diff --git a/chromium/ash/wm/panels/panel_window_resizer_unittest.cc b/chromium/ash/wm/panels/panel_window_resizer_unittest.cc
deleted file mode 100644
index f264b2b2b94..00000000000
--- a/chromium/ash/wm/panels/panel_window_resizer_unittest.cc
+++ /dev/null
@@ -1,537 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/panels/panel_window_resizer.h"
-
-#include "ash/launcher/launcher.h"
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_model.h"
-#include "ash/shelf/shelf_types.h"
-#include "ash/shelf/shelf_util.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/cursor_manager_test_api.h"
-#include "ash/test/shell_test_api.h"
-#include "ash/test/test_shelf_delegate.h"
-#include "ash/wm/drag_window_resizer.h"
-#include "ash/wm/panels/panel_layout_manager.h"
-#include "ash/wm/window_state.h"
-#include "base/win/windows_version.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-class PanelWindowResizerTest : public test::AshTestBase {
- public:
- PanelWindowResizerTest() {}
- virtual ~PanelWindowResizerTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- UpdateDisplay("600x400");
- test::ShellTestApi test_api(Shell::GetInstance());
- model_ = test_api.shelf_model();
- shelf_delegate_ = test::TestShelfDelegate::instance();
- }
-
- virtual void TearDown() OVERRIDE {
- AshTestBase::TearDown();
- }
-
- protected:
- gfx::Point CalculateDragPoint(const WindowResizer& resizer,
- int delta_x,
- int delta_y) const {
- gfx::Point location = resizer.GetInitialLocation();
- location.set_x(location.x() + delta_x);
- location.set_y(location.y() + delta_y);
- return location;
- }
-
- aura::Window* CreatePanelWindow(const gfx::Point& origin) {
- gfx::Rect bounds(origin, gfx::Size(101, 101));
- aura::Window* window = CreateTestWindowInShellWithDelegateAndType(
- NULL,
- aura::client::WINDOW_TYPE_PANEL,
- 0,
- bounds);
- shelf_delegate_->AddLauncherItem(window);
- PanelLayoutManager* manager =
- static_cast<PanelLayoutManager*>(
- Shell::GetContainer(window->GetRootWindow(),
- internal::kShellWindowId_PanelContainer)->
- layout_manager());
- manager->Relayout();
- return window;
- }
-
- void DragStart(aura::Window* window) {
- resizer_.reset(CreateWindowResizer(
- window,
- window->bounds().origin(),
- HTCAPTION,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE).release());
- ASSERT_TRUE(resizer_.get());
- }
-
- void DragMove(int dx, int dy) {
- resizer_->Drag(CalculateDragPoint(*resizer_, dx, dy), 0);
- }
-
- void DragEnd() {
- resizer_->CompleteDrag(0);
- resizer_.reset();
- }
-
- void DragRevert() {
- resizer_->RevertDrag();
- resizer_.reset();
- }
-
- // Test dragging the panel slightly, then detaching, and then reattaching
- // dragging out by the vector (dx, dy).
- void DetachReattachTest(aura::Window* window, int dx, int dy) {
- wm::WindowState* window_state = wm::GetWindowState(window);
- EXPECT_TRUE(window_state->panel_attached());
- aura::Window* root_window = window->GetRootWindow();
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
- DragStart(window);
- gfx::Rect initial_bounds = window->GetBoundsInScreen();
-
- // Drag the panel slightly. The window should still be snapped to the
- // launcher.
- DragMove(dx * 5, dy * 5);
- EXPECT_EQ(initial_bounds.x(), window->GetBoundsInScreen().x());
- EXPECT_EQ(initial_bounds.y(), window->GetBoundsInScreen().y());
-
- // Drag further out and the window should now move to the cursor.
- DragMove(dx * 100, dy * 100);
- EXPECT_EQ(initial_bounds.x() + dx * 100, window->GetBoundsInScreen().x());
- EXPECT_EQ(initial_bounds.y() + dy * 100, window->GetBoundsInScreen().y());
-
- // The panel should be detached when the drag completes.
- DragEnd();
-
- EXPECT_FALSE(window_state->panel_attached());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer,
- window->parent()->id());
- EXPECT_EQ(root_window, window->GetRootWindow());
-
- DragStart(window);
- // Drag the panel down.
- DragMove(dx * -95, dy * -95);
- // Release the mouse and the panel should be reattached.
- DragEnd();
-
- // The panel should be reattached and have snapped to the launcher.
- EXPECT_TRUE(window_state->panel_attached());
- EXPECT_EQ(initial_bounds.x(), window->GetBoundsInScreen().x());
- EXPECT_EQ(initial_bounds.y(), window->GetBoundsInScreen().y());
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
- }
-
- void TestWindowOrder(const std::vector<aura::Window*>& window_order) {
- int panel_index = model_->FirstPanelIndex();
- EXPECT_EQ((int)(panel_index + window_order.size()), model_->item_count());
- for (std::vector<aura::Window*>::const_iterator iter =
- window_order.begin(); iter != window_order.end();
- ++iter, ++panel_index) {
- LauncherID id = GetLauncherIDForWindow(*iter);
- EXPECT_EQ(id, model_->items()[panel_index].id);
- }
- }
-
- // Test dragging panel window along the shelf and verify that panel icons
- // are reordered appropriately.
- void DragAlongShelfReorder(int dx, int dy) {
- gfx::Point origin(0, 0);
- scoped_ptr<aura::Window> w1(CreatePanelWindow(origin));
- scoped_ptr<aura::Window> w2(CreatePanelWindow(origin));
- std::vector<aura::Window*> window_order_original;
- std::vector<aura::Window*> window_order_swapped;
- window_order_original.push_back(w1.get());
- window_order_original.push_back(w2.get());
- window_order_swapped.push_back(w2.get());
- window_order_swapped.push_back(w1.get());
- TestWindowOrder(window_order_original);
-
- // Drag window #2 to the beginning of the shelf.
- DragStart(w2.get());
- DragMove(400 * dx, 400 * dy);
- TestWindowOrder(window_order_swapped);
- DragEnd();
-
- // Expect swapped window order.
- TestWindowOrder(window_order_swapped);
-
- // Drag window #2 back to the end.
- DragStart(w2.get());
- DragMove(-400 * dx, -400 * dy);
- TestWindowOrder(window_order_original);
- DragEnd();
-
- // Expect original order.
- TestWindowOrder(window_order_original);
- }
-
- private:
- scoped_ptr<WindowResizer> resizer_;
- internal::PanelLayoutManager* panel_layout_manager_;
- ShelfModel* model_;
- test::TestShelfDelegate* shelf_delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(PanelWindowResizerTest);
-};
-
-class PanelWindowResizerTextDirectionTest
- : public PanelWindowResizerTest,
- public testing::WithParamInterface<bool> {
- public:
- PanelWindowResizerTextDirectionTest() : is_rtl_(GetParam()) {}
- virtual ~PanelWindowResizerTextDirectionTest() {}
-
- virtual void SetUp() OVERRIDE {
- original_locale = l10n_util::GetApplicationLocale(std::string());
- if (is_rtl_)
- base::i18n::SetICUDefaultLocale("he");
- PanelWindowResizerTest::SetUp();
- ASSERT_EQ(is_rtl_, base::i18n::IsRTL());
- }
-
- virtual void TearDown() OVERRIDE {
- if (is_rtl_)
- base::i18n::SetICUDefaultLocale(original_locale);
- PanelWindowResizerTest::TearDown();
- }
-
- private:
- bool is_rtl_;
- std::string original_locale;
-
- DISALLOW_COPY_AND_ASSIGN(PanelWindowResizerTextDirectionTest);
-};
-
-// PanelLayoutManager and PanelWindowResizer should work if panels have
-// transient children of supported types.
-class PanelWindowResizerTransientTest
- : public PanelWindowResizerTest,
- public testing::WithParamInterface<aura::client::WindowType> {
- public:
- PanelWindowResizerTransientTest() : transient_window_type_(GetParam()) {}
- virtual ~PanelWindowResizerTransientTest() {}
-
- protected:
- aura::client::WindowType transient_window_type_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PanelWindowResizerTransientTest);
-};
-
-// Verifies a window can be dragged from the panel and detached and then
-// reattached.
-TEST_F(PanelWindowResizerTest, PanelDetachReattachBottom) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> window(
- CreatePanelWindow(gfx::Point(0, 0)));
- DetachReattachTest(window.get(), 0, -1);
-}
-
-TEST_F(PanelWindowResizerTest, PanelDetachReattachLeft) {
- if (!SupportsHostWindowResize())
- return;
-
- ash::Shell* shell = ash::Shell::GetInstance();
- shell->SetShelfAlignment(SHELF_ALIGNMENT_LEFT, shell->GetPrimaryRootWindow());
- scoped_ptr<aura::Window> window(
- CreatePanelWindow(gfx::Point(0, 0)));
- DetachReattachTest(window.get(), 1, 0);
-}
-
-TEST_F(PanelWindowResizerTest, PanelDetachReattachRight) {
- if (!SupportsHostWindowResize())
- return;
-
- ash::Shell* shell = ash::Shell::GetInstance();
- shell->SetShelfAlignment(SHELF_ALIGNMENT_RIGHT,
- shell->GetPrimaryRootWindow());
- scoped_ptr<aura::Window> window(
- CreatePanelWindow(gfx::Point(0, 0)));
- DetachReattachTest(window.get(), -1, 0);
-}
-
-TEST_F(PanelWindowResizerTest, PanelDetachReattachTop) {
- if (!SupportsHostWindowResize())
- return;
-
- ash::Shell* shell = ash::Shell::GetInstance();
- shell->SetShelfAlignment(SHELF_ALIGNMENT_TOP, shell->GetPrimaryRootWindow());
- scoped_ptr<aura::Window> window(
- CreatePanelWindow(gfx::Point(0, 0)));
- DetachReattachTest(window.get(), 0, 1);
-}
-
-TEST_F(PanelWindowResizerTest, PanelDetachReattachMultipleDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("600x400,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- scoped_ptr<aura::Window> window(
- CreatePanelWindow(gfx::Point(600, 0)));
- EXPECT_EQ(root_windows[1], window->GetRootWindow());
- DetachReattachTest(window.get(), 0, -1);
-}
-
-TEST_F(PanelWindowResizerTest, DetachThenDragAcrossDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("600x400,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- scoped_ptr<aura::Window> window(
- CreatePanelWindow(gfx::Point(0, 0)));
- gfx::Rect initial_bounds = window->GetBoundsInScreen();
- EXPECT_EQ(root_windows[0], window->GetRootWindow());
- DragStart(window.get());
- DragMove(0, -100);
- DragEnd();
- EXPECT_EQ(root_windows[0], window->GetRootWindow());
- EXPECT_EQ(initial_bounds.x(), window->GetBoundsInScreen().x());
- EXPECT_EQ(initial_bounds.y() - 100, window->GetBoundsInScreen().y());
- EXPECT_FALSE(wm::GetWindowState(window.get())->panel_attached());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id());
-
- DragStart(window.get());
- DragMove(500, 0);
- DragEnd();
- EXPECT_EQ(root_windows[1], window->GetRootWindow());
- EXPECT_EQ(initial_bounds.x() + 500, window->GetBoundsInScreen().x());
- EXPECT_EQ(initial_bounds.y() - 100, window->GetBoundsInScreen().y());
- EXPECT_FALSE(wm::GetWindowState(window.get())->panel_attached());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id());
-}
-
-TEST_F(PanelWindowResizerTest, DetachAcrossDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("600x400,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- scoped_ptr<aura::Window> window(
- CreatePanelWindow(gfx::Point(0, 0)));
- gfx::Rect initial_bounds = window->GetBoundsInScreen();
- EXPECT_EQ(root_windows[0], window->GetRootWindow());
- DragStart(window.get());
- DragMove(500, -100);
- DragEnd();
- EXPECT_EQ(root_windows[1], window->GetRootWindow());
- EXPECT_EQ(initial_bounds.x() + 500, window->GetBoundsInScreen().x());
- EXPECT_EQ(initial_bounds.y() - 100, window->GetBoundsInScreen().y());
- EXPECT_FALSE(wm::GetWindowState(window.get())->panel_attached());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id());
-}
-
-TEST_F(PanelWindowResizerTest, DetachThenAttachToSecondDisplay) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("600x400,600x600");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- scoped_ptr<aura::Window> window(
- CreatePanelWindow(gfx::Point(0, 0)));
- gfx::Rect initial_bounds = window->GetBoundsInScreen();
- EXPECT_EQ(root_windows[0], window->GetRootWindow());
-
- // Detach the window.
- DragStart(window.get());
- DragMove(0, -100);
- DragEnd();
- EXPECT_EQ(root_windows[0], window->GetRootWindow());
- EXPECT_FALSE(wm::GetWindowState(window.get())->panel_attached());
-
- // Drag the window just above the other display's launcher.
- DragStart(window.get());
- DragMove(500, 295);
- EXPECT_EQ(initial_bounds.x() + 500, window->GetBoundsInScreen().x());
-
- // Should stick to other launcher.
- EXPECT_EQ(initial_bounds.y() + 200, window->GetBoundsInScreen().y());
- DragEnd();
-
- // When dropped should move to second display's panel container.
- EXPECT_EQ(root_windows[1], window->GetRootWindow());
- EXPECT_TRUE(wm::GetWindowState(window.get())->panel_attached());
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
-}
-
-TEST_F(PanelWindowResizerTest, AttachToSecondDisplay) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("600x400,600x600");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- scoped_ptr<aura::Window> window(
- CreatePanelWindow(gfx::Point(0, 0)));
- gfx::Rect initial_bounds = window->GetBoundsInScreen();
- EXPECT_EQ(root_windows[0], window->GetRootWindow());
-
- // Drag the window just above the other display's launcher.
- DragStart(window.get());
- DragMove(500, 195);
- EXPECT_EQ(initial_bounds.x() + 500, window->GetBoundsInScreen().x());
-
- // Should stick to other launcher.
- EXPECT_EQ(initial_bounds.y() + 200, window->GetBoundsInScreen().y());
- DragEnd();
-
- // When dropped should move to second display's panel container.
- EXPECT_EQ(root_windows[1], window->GetRootWindow());
- EXPECT_TRUE(wm::GetWindowState(window.get())->panel_attached());
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
-}
-
-TEST_F(PanelWindowResizerTest, RevertDragRestoresAttachment) {
- scoped_ptr<aura::Window> window(
- CreatePanelWindow(gfx::Point(0, 0)));
- EXPECT_TRUE(wm::GetWindowState(window.get())->panel_attached());
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
- DragStart(window.get());
- DragMove(0, -100);
- DragRevert();
- EXPECT_TRUE(wm::GetWindowState(window.get())->panel_attached());
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
-
- // Detach panel.
- DragStart(window.get());
- DragMove(0, -100);
- DragEnd();
- EXPECT_FALSE(wm::GetWindowState(window.get())->panel_attached());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id());
-
- // Drag back to launcher.
- DragStart(window.get());
- DragMove(0, 100);
-
- // When the drag is reverted it should remain detached.
- DragRevert();
- EXPECT_FALSE(wm::GetWindowState(window.get())->panel_attached());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id());
-}
-
-TEST_F(PanelWindowResizerTest, DragMovesToPanelLayer) {
- scoped_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0)));
- DragStart(window.get());
- DragMove(0, -100);
- DragEnd();
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id());
-
- // While moving the panel window should be moved to the panel container.
- DragStart(window.get());
- DragMove(20, 0);
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
- DragEnd();
-
- // When dropped it should return to the default container.
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer,
- window->parent()->id());
-}
-
-TEST_P(PanelWindowResizerTextDirectionTest, DragReordersPanelsHorizontal) {
- if (!SupportsHostWindowResize())
- return;
-
- DragAlongShelfReorder(base::i18n::IsRTL() ? 1 : -1, 0);
-}
-
-TEST_F(PanelWindowResizerTest, DragReordersPanelsVertical) {
- if (!SupportsHostWindowResize())
- return;
-
- ash::Shell* shell = ash::Shell::GetInstance();
- shell->SetShelfAlignment(SHELF_ALIGNMENT_LEFT, shell->GetPrimaryRootWindow());
- DragAlongShelfReorder(0, -1);
-}
-
-// Tests that panels can have transient children of different types.
-// The transient children should be reparented in sync with the panel.
-TEST_P(PanelWindowResizerTransientTest, PanelWithTransientChild) {
- if (!SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0)));
- scoped_ptr<aura::Window> child(CreateTestWindowInShellWithDelegateAndType(
- NULL, transient_window_type_, 0, gfx::Rect(20, 20, 150, 40)));
- window->AddTransientChild(child.get());
- if (window->parent() != child->parent())
- window->parent()->AddChild(child.get());
- EXPECT_EQ(window.get(), child->transient_parent());
-
- // Drag the child to the shelf. Its new position should not be overridden.
- const gfx::Rect attached_bounds(window->GetBoundsInScreen());
- const int dy = window->GetBoundsInScreen().bottom() -
- child->GetBoundsInScreen().bottom();
- DragStart(child.get());
- DragMove(50, dy);
- // While moving the transient child window should be in the panel container.
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, child->parent()->id());
- DragEnd();
- // Child should move, |window| should not.
- EXPECT_EQ(gfx::Point(20 + 50, 20 + dy).ToString(),
- child->GetBoundsInScreen().origin().ToString());
- EXPECT_EQ(attached_bounds.ToString(), window->GetBoundsInScreen().ToString());
-
- // Drag the child along the the shelf past the |window|.
- // Its new position should not be overridden.
- DragStart(child.get());
- DragMove(350, 0);
- // While moving the transient child window should be in the panel container.
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, child->parent()->id());
- DragEnd();
- // |child| should move, |window| should not.
- EXPECT_EQ(gfx::Point(20 + 50 + 350, 20 + dy).ToString(),
- child->GetBoundsInScreen().origin().ToString());
- EXPECT_EQ(attached_bounds.ToString(), window->GetBoundsInScreen().ToString());
-
- DragStart(window.get());
- DragMove(0, -100);
- // While moving the windows should be in the panel container.
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, child->parent()->id());
- DragEnd();
- // When dropped they should return to the default container.
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, child->parent()->id());
-
- // While moving the window and child should be moved to the panel container.
- DragStart(window.get());
- DragMove(20, 0);
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_PanelContainer, child->parent()->id());
- DragEnd();
-
- // When dropped they should return to the default container.
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, window->parent()->id());
- EXPECT_EQ(internal::kShellWindowId_DefaultContainer, child->parent()->id());
-}
-
-INSTANTIATE_TEST_CASE_P(LtrRtl, PanelWindowResizerTextDirectionTest,
- testing::Bool());
-INSTANTIATE_TEST_CASE_P(NormalPanelPopup, PanelWindowResizerTransientTest,
- testing::Values(aura::client::WINDOW_TYPE_NORMAL,
- aura::client::WINDOW_TYPE_PANEL,
- aura::client::WINDOW_TYPE_POPUP));
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/partial_screenshot_view.cc b/chromium/ash/wm/partial_screenshot_view.cc
deleted file mode 100644
index b71c7c8a816..00000000000
--- a/chromium/ash/wm/partial_screenshot_view.cc
+++ /dev/null
@@ -1,243 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/partial_screenshot_view.h"
-
-#include <algorithm>
-
-#include "ash/display/mouse_cursor_event_filter.h"
-#include "ash/screenshot_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/overlay_event_filter.h"
-#include "ui/aura/client/capture_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/base/cursor/cursor.h"
-#include "ui/events/event.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/rect.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_observer.h"
-
-namespace ash {
-
-// A self-owned object to handle the cancel and the finish of current partial
-// screenshot session.
-class PartialScreenshotView::OverlayDelegate
- : public internal::OverlayEventFilter::Delegate,
- public views::WidgetObserver {
- public:
- OverlayDelegate() {
- Shell::GetInstance()->overlay_filter()->Activate(this);
- }
-
- void RegisterWidget(views::Widget* widget) {
- widgets_.push_back(widget);
- widget->AddObserver(this);
- }
-
- // Overridden from OverlayEventFilter::Delegate:
- virtual void Cancel() OVERRIDE {
- // Make sure the mouse_warp_mode allows warping. It can be stopped by a
- // partial screenshot view.
- internal::MouseCursorEventFilter* mouse_cursor_filter =
- Shell::GetInstance()->mouse_cursor_filter();
- mouse_cursor_filter->set_mouse_warp_mode(
- internal::MouseCursorEventFilter::WARP_ALWAYS);
- for (size_t i = 0; i < widgets_.size(); ++i)
- widgets_[i]->Close();
- }
-
- virtual bool IsCancelingKeyEvent(ui::KeyEvent* event) OVERRIDE {
- return event->key_code() == ui::VKEY_ESCAPE;
- }
-
- virtual aura::Window* GetWindow() OVERRIDE {
- // Just returns NULL because this class does not handle key events in
- // OverlayEventFilter, except for cancel keys.
- return NULL;
- }
-
- // Overridden from views::WidgetObserver:
- virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE {
- widget->RemoveObserver(this);
- widgets_.erase(std::remove(widgets_.begin(), widgets_.end(), widget));
- if (widgets_.empty())
- delete this;
- }
-
- private:
- virtual ~OverlayDelegate() {
- Shell::GetInstance()->overlay_filter()->Deactivate();
- }
-
- std::vector<views::Widget*> widgets_;
-
- DISALLOW_COPY_AND_ASSIGN(OverlayDelegate);
-};
-
-// static
-std::vector<PartialScreenshotView*>
-PartialScreenshotView::StartPartialScreenshot(
- ScreenshotDelegate* screenshot_delegate) {
- std::vector<PartialScreenshotView*> views;
- OverlayDelegate* overlay_delegate = new OverlayDelegate();
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- for (aura::Window::Windows::iterator it = root_windows.begin();
- it != root_windows.end(); ++it) {
- PartialScreenshotView* new_view = new PartialScreenshotView(
- overlay_delegate, screenshot_delegate);
- new_view->Init(*it);
- views.push_back(new_view);
- }
- return views;
-}
-
-PartialScreenshotView::PartialScreenshotView(
- PartialScreenshotView::OverlayDelegate* overlay_delegate,
- ScreenshotDelegate* screenshot_delegate)
- : is_dragging_(false),
- overlay_delegate_(overlay_delegate),
- screenshot_delegate_(screenshot_delegate) {
-}
-
-PartialScreenshotView::~PartialScreenshotView() {
- overlay_delegate_ = NULL;
- screenshot_delegate_ = NULL;
-}
-
-void PartialScreenshotView::Init(aura::Window* root_window) {
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params(
- views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- params.delegate = this;
- // The partial screenshot rectangle has to be at the real top of
- // the screen.
- params.parent = Shell::GetContainer(
- root_window,
- internal::kShellWindowId_OverlayContainer);
-
- widget->Init(params);
- widget->SetContentsView(this);
- widget->SetBounds(root_window->GetBoundsInScreen());
- widget->GetNativeView()->SetName("PartialScreenshotView");
- widget->StackAtTop();
- widget->Show();
- // Releases the mouse capture to let mouse events come to the view. This
- // will close the context menu.
- aura::client::CaptureClient* capture_client =
- aura::client::GetCaptureClient(root_window);
- if (capture_client->GetCaptureWindow())
- capture_client->ReleaseCapture(capture_client->GetCaptureWindow());
-
- overlay_delegate_->RegisterWidget(widget);
-}
-
-gfx::Rect PartialScreenshotView::GetScreenshotRect() const {
- int left = std::min(start_position_.x(), current_position_.x());
- int top = std::min(start_position_.y(), current_position_.y());
- int width = ::abs(start_position_.x() - current_position_.x());
- int height = ::abs(start_position_.y() - current_position_.y());
- return gfx::Rect(left, top, width, height);
-}
-
-void PartialScreenshotView::OnSelectionStarted(const gfx::Point& position) {
- start_position_ = position;
-}
-
-void PartialScreenshotView::OnSelectionChanged(const gfx::Point& position) {
- if (is_dragging_ && current_position_ == position)
- return;
- current_position_ = position;
- SchedulePaint();
- is_dragging_ = true;
-}
-
-void PartialScreenshotView::OnSelectionFinished() {
- overlay_delegate_->Cancel();
- if (!is_dragging_)
- return;
-
- is_dragging_ = false;
- if (screenshot_delegate_) {
- aura::Window*root_window =
- GetWidget()->GetNativeWindow()->GetRootWindow();
- screenshot_delegate_->HandleTakePartialScreenshot(
- root_window,
- gfx::IntersectRects(root_window->bounds(), GetScreenshotRect()));
- }
-}
-
-gfx::NativeCursor PartialScreenshotView::GetCursor(
- const ui::MouseEvent& event) {
- // Always use "crosshair" cursor.
- return ui::kCursorCross;
-}
-
-void PartialScreenshotView::OnPaint(gfx::Canvas* canvas) {
- if (is_dragging_) {
- // Screenshot area representation: black rectangle with white
- // rectangle inside. To avoid capturing these rectangles when mouse
- // release, they should be outside of the actual capturing area.
- gfx::Rect screenshot_rect = GetScreenshotRect();
- screenshot_rect.Inset(-1, -1, -1, -1);
- canvas->DrawRect(screenshot_rect, SK_ColorWHITE);
- screenshot_rect.Inset(-1, -1, -1, -1);
- canvas->DrawRect(screenshot_rect, SK_ColorBLACK);
- }
-}
-
-bool PartialScreenshotView::OnMousePressed(const ui::MouseEvent& event) {
- // Prevent moving across displays during drag. Capturing a screenshot across
- // the displays is not supported yet.
- // TODO(mukai): remove this restriction.
- internal::MouseCursorEventFilter* mouse_cursor_filter =
- Shell::GetInstance()->mouse_cursor_filter();
- mouse_cursor_filter->set_mouse_warp_mode(
- internal::MouseCursorEventFilter::WARP_NONE);
- OnSelectionStarted(event.location());
- return true;
-}
-
-bool PartialScreenshotView::OnMouseDragged(const ui::MouseEvent& event) {
- OnSelectionChanged(event.location());
- return true;
-}
-
-bool PartialScreenshotView::OnMouseWheel(const ui::MouseWheelEvent& event) {
- // Do nothing but do not propagate events futhermore.
- return true;
-}
-
-void PartialScreenshotView::OnMouseReleased(const ui::MouseEvent& event) {
- OnSelectionFinished();
-}
-
-void PartialScreenshotView::OnMouseCaptureLost() {
- is_dragging_ = false;
- OnSelectionFinished();
-}
-
-void PartialScreenshotView::OnGestureEvent(ui::GestureEvent* event) {
- switch(event->type()) {
- case ui::ET_GESTURE_TAP_DOWN:
- OnSelectionStarted(event->location());
- break;
- case ui::ET_GESTURE_SCROLL_UPDATE:
- OnSelectionChanged(event->location());
- break;
- case ui::ET_GESTURE_SCROLL_END:
- case ui::ET_SCROLL_FLING_START:
- OnSelectionFinished();
- break;
- default:
- break;
- }
-
- event->SetHandled();
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/partial_screenshot_view.h b/chromium/ash/wm/partial_screenshot_view.h
deleted file mode 100644
index 8d799e3132b..00000000000
--- a/chromium/ash/wm/partial_screenshot_view.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_
-#define ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_
-
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "base/compiler_specific.h"
-#include "base/gtest_prod_util.h"
-#include "ui/gfx/point.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-class ScreenshotDelegate;
-
-// The view of taking partial screenshot, i.e.: drawing region
-// rectangles during drag, and changing the mouse cursor to indicate
-// the current mode.
-class ASH_EXPORT PartialScreenshotView : public views::WidgetDelegateView {
- public:
- // Starts the UI for taking partial screenshot; dragging to select a region.
- // PartialScreenshotViews manage their own lifetime so caller must not delete
- // the returned PartialScreenshotViews.
- static std::vector<PartialScreenshotView*>
- StartPartialScreenshot(ScreenshotDelegate* screenshot_delegate);
-
- private:
- FRIEND_TEST_ALL_PREFIXES(PartialScreenshotViewTest, BasicMouse);
- FRIEND_TEST_ALL_PREFIXES(PartialScreenshotViewTest, BasicTouch);
-
- class OverlayDelegate;
-
- PartialScreenshotView(OverlayDelegate* overlay_delegate,
- ScreenshotDelegate* screenshot_delegate);
- virtual ~PartialScreenshotView();
-
- // Initializes partial screenshot UI widget for |root_window|.
- void Init(aura::Window* root_window);
-
- // Returns the currently selected region.
- gfx::Rect GetScreenshotRect() const;
-
- void OnSelectionStarted(const gfx::Point& position);
- void OnSelectionChanged(const gfx::Point& position);
- void OnSelectionFinished();
-
- // Overridden from views::View:
- virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseCaptureLost() OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- bool is_dragging_;
- gfx::Point start_position_;
- gfx::Point current_position_;
-
- // The delegate to receive Cancel. No ownership.
- OverlayDelegate* overlay_delegate_;
-
- // ScreenshotDelegate to take the actual screenshot. No ownership.
- ScreenshotDelegate* screenshot_delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(PartialScreenshotView);
-};
-
-} // namespace ash
-
-#endif // #ifndef ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_
diff --git a/chromium/ash/wm/partial_screenshot_view_unittest.cc b/chromium/ash/wm/partial_screenshot_view_unittest.cc
deleted file mode 100644
index 3605e807f81..00000000000
--- a/chromium/ash/wm/partial_screenshot_view_unittest.cc
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/partial_screenshot_view.h"
-
-#include "ash/screenshot_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/test_screenshot_delegate.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-
-namespace ash {
-
-class PartialScreenshotViewTest : public test::AshTestBase {
- public:
- PartialScreenshotViewTest() : view_(NULL) {}
- virtual ~PartialScreenshotViewTest() {}
-
- virtual void SetUp() OVERRIDE {
- test::AshTestBase::SetUp();
- std::vector<PartialScreenshotView*> views =
- PartialScreenshotView::StartPartialScreenshot(GetScreenshotDelegate());
- ASSERT_EQ(1u, views.size());
- view_ = views[0];
- }
-
- protected:
- PartialScreenshotView* view_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PartialScreenshotViewTest);
-};
-
-TEST_F(PartialScreenshotViewTest, BasicMouse) {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
-
- generator.MoveMouseTo(100, 100);
- generator.PressLeftButton();
- EXPECT_FALSE(view_->is_dragging_);
- EXPECT_EQ("100,100", view_->start_position_.ToString());
-
- generator.MoveMouseTo(200, 200);
- EXPECT_TRUE(view_->is_dragging_);
- EXPECT_EQ("200,200", view_->current_position_.ToString());
-
- generator.ReleaseLeftButton();
- EXPECT_FALSE(view_->is_dragging_);
- EXPECT_EQ("100,100 100x100", GetScreenshotDelegate()->last_rect().ToString());
- EXPECT_EQ(1, GetScreenshotDelegate()->handle_take_partial_screenshot_count());
-}
-
-TEST_F(PartialScreenshotViewTest, BasicTouch) {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
-
- generator.set_current_location(gfx::Point(100,100));
- generator.GestureTapDownAndUp(gfx::Point(100,100));
- EXPECT_FALSE(view_->is_dragging_);
- EXPECT_EQ(0, GetScreenshotDelegate()->handle_take_partial_screenshot_count());
-
- generator.PressTouch();
- EXPECT_FALSE(view_->is_dragging_);
- EXPECT_EQ("100,100", view_->start_position_.ToString());
-
- generator.MoveTouch(gfx::Point(200, 200));
- EXPECT_TRUE(view_->is_dragging_);
- EXPECT_EQ("200,200", view_->current_position_.ToString());
-
- generator.ReleaseTouch();
- EXPECT_FALSE(view_->is_dragging_);
- EXPECT_EQ(1, GetScreenshotDelegate()->handle_take_partial_screenshot_count());
- EXPECT_EQ("100,100 100x100", GetScreenshotDelegate()->last_rect().ToString());
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/power_button_controller.cc b/chromium/ash/wm/power_button_controller.cc
deleted file mode 100644
index c2e3789f1f0..00000000000
--- a/chromium/ash/wm/power_button_controller.cc
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/power_button_controller.h"
-
-#include "ash/ash_switches.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/lock_state_controller.h"
-#include "ash/wm/session_state_animator.h"
-#include "base/command_line.h"
-#include "ui/aura/root_window.h"
-#include "ui/views/corewm/compound_event_filter.h"
-
-namespace ash {
-
-PowerButtonController::PowerButtonController(
- LockStateController* controller)
- : power_button_down_(false),
- lock_button_down_(false),
- screen_is_off_(false),
- has_legacy_power_button_(
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAuraLegacyPowerButton)),
- controller_(controller) {
-}
-
-PowerButtonController::~PowerButtonController() {
-}
-
-void PowerButtonController::OnScreenBrightnessChanged(double percent) {
- screen_is_off_ = percent <= 0.001;
-}
-
-void PowerButtonController::OnPowerButtonEvent(
- bool down, const base::TimeTicks& timestamp) {
- power_button_down_ = down;
-
- if (controller_->ShutdownRequested())
- return;
-
- // Avoid starting the lock/shutdown sequence if the power button is pressed
- // while the screen is off (http://crbug.com/128451).
- if (screen_is_off_)
- return;
-
- const SessionStateDelegate* session_state_delegate =
- Shell::GetInstance()->session_state_delegate();
- if (has_legacy_power_button_) {
- // If power button releases won't get reported correctly because we're not
- // running on official hardware, just lock the screen or shut down
- // immediately.
- if (down) {
- if (session_state_delegate->CanLockScreen() &&
- !session_state_delegate->IsScreenLocked() &&
- !controller_->LockRequested()) {
- controller_->StartLockAnimationAndLockImmediately();
- } else {
- controller_->RequestShutdown();
- }
- }
- } else { // !has_legacy_power_button_
- if (down) {
- // If we already have a pending request to lock the screen, wait.
- if (controller_->LockRequested())
- return;
-
- if (session_state_delegate->CanLockScreen() &&
- !session_state_delegate->IsScreenLocked()) {
- controller_->StartLockAnimation(true);
- } else {
- controller_->StartShutdownAnimation();
- }
- } else { // Button is up.
- if (controller_->CanCancelLockAnimation())
- controller_->CancelLockAnimation();
- else if (controller_->CanCancelShutdownAnimation())
- controller_->CancelShutdownAnimation();
- }
- }
-}
-
-void PowerButtonController::OnLockButtonEvent(
- bool down, const base::TimeTicks& timestamp) {
- lock_button_down_ = down;
-
- const SessionStateDelegate* session_state_delegate =
- Shell::GetInstance()->session_state_delegate();
- if (!session_state_delegate->CanLockScreen() ||
- session_state_delegate->IsScreenLocked() ||
- controller_->LockRequested() ||
- controller_->ShutdownRequested()) {
- return;
- }
-
- // Give the power button precedence over the lock button (we don't expect both
- // buttons to be present, so this is just making sure that we don't do
- // something completely stupid if that assumption changes later).
- if (power_button_down_)
- return;
-
- if (down)
- controller_->StartLockAnimation(false);
- else
- controller_->CancelLockAnimation();
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/power_button_controller.h b/chromium/ash/wm/power_button_controller.h
deleted file mode 100644
index 558bf6d0ae1..00000000000
--- a/chromium/ash/wm/power_button_controller.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_POWER_BUTTON_CONTROLLER_H_
-#define ASH_WM_POWER_BUTTON_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "ash/wm/session_state_animator.h"
-#include "base/basictypes.h"
-
-namespace gfx {
-class Rect;
-class Size;
-}
-
-namespace ui {
-class Layer;
-}
-
-namespace ash {
-
-namespace test {
-class PowerButtonControllerTest;
-}
-
-class LockStateController;
-
-// Displays onscreen animations and locks or suspends the system in response to
-// the power button being pressed or released.
-class ASH_EXPORT PowerButtonController {
- public:
-
- explicit PowerButtonController(LockStateController* controller);
- virtual ~PowerButtonController();
-
- void set_has_legacy_power_button_for_test(bool legacy) {
- has_legacy_power_button_ = legacy;
- }
-
- // Called when the current screen brightness changes.
- void OnScreenBrightnessChanged(double percent);
-
- // Called when the power or lock buttons are pressed or released.
- void OnPowerButtonEvent(bool down, const base::TimeTicks& timestamp);
- void OnLockButtonEvent(bool down, const base::TimeTicks& timestamp);
-
- private:
- friend class test::PowerButtonControllerTest;
-
- // Are the power or lock buttons currently held?
- bool power_button_down_;
- bool lock_button_down_;
-
- // Is the screen currently turned off?
- bool screen_is_off_;
-
- // Was a command-line switch set telling us that we're running on hardware
- // that misreports power button releases?
- bool has_legacy_power_button_;
-
- LockStateController* controller_; // Not owned.
-
- DISALLOW_COPY_AND_ASSIGN(PowerButtonController);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_POWER_BUTTON_CONTROLLER_H_
diff --git a/chromium/ash/wm/resize_shadow.cc b/chromium/ash/wm/resize_shadow.cc
deleted file mode 100644
index cdf573d93b6..00000000000
--- a/chromium/ash/wm/resize_shadow.cc
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/resize_shadow.h"
-
-#include "base/time/time.h"
-#include "grit/ash_resources.h"
-#include "ui/aura/window.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/views/corewm/image_grid.h"
-
-namespace {
-
-// Final opacity for resize effect.
-const float kShadowTargetOpacity = 0.25f;
-// Animation time for resize effect in milliseconds.
-const int kShadowAnimationDurationMs = 100;
-
-// Sets up a layer as invisible and fully transparent, without animating.
-void InitLayer(ui::Layer* layer) {
- layer->SetVisible(false);
- layer->SetOpacity(0.f);
-}
-
-// Triggers an opacity animation that will make |layer| become |visible|.
-void ShowLayer(ui::Layer* layer, bool visible) {
- ui::ScopedLayerAnimationSettings settings(layer->GetAnimator());
- settings.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kShadowAnimationDurationMs));
- layer->SetOpacity(visible ? kShadowTargetOpacity : 0.f);
- // Sets the layer visibility after a delay, which will be identical to the
- // opacity animation duration.
- layer->SetVisible(visible);
-}
-
-} // namespace
-
-namespace ash {
-namespace internal {
-
-ResizeShadow::ResizeShadow() : last_hit_test_(HTNOWHERE) {}
-
-ResizeShadow::~ResizeShadow() {}
-
-void ResizeShadow::Init(aura::Window* window) {
- // Set up our image grid and images.
- ResourceBundle& res = ResourceBundle::GetSharedInstance();
- image_grid_.reset(new views::corewm::ImageGrid);
- image_grid_->SetImages(
- &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_TOP_LEFT),
- &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_TOP),
- &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_TOP_RIGHT),
- &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_LEFT),
- NULL,
- &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_RIGHT),
- &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_BOTTOM_LEFT),
- &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_BOTTOM),
- &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_BOTTOM_RIGHT));
- // Initialize all layers to invisible/transparent.
- InitLayer(image_grid_->top_left_layer());
- InitLayer(image_grid_->top_layer());
- InitLayer(image_grid_->top_right_layer());
- InitLayer(image_grid_->left_layer());
- InitLayer(image_grid_->right_layer());
- InitLayer(image_grid_->bottom_left_layer());
- InitLayer(image_grid_->bottom_layer());
- InitLayer(image_grid_->bottom_right_layer());
- // Add image grid as a child of the window's layer so it follows the window
- // as it moves.
- window->layer()->Add(image_grid_->layer());
-}
-
-void ResizeShadow::ShowForHitTest(int hit) {
- // Don't start animations unless something changed.
- if (hit == last_hit_test_)
- return;
- last_hit_test_ = hit;
-
- // Show affected corners.
- ShowLayer(image_grid_->top_left_layer(), hit == HTTOPLEFT);
- ShowLayer(image_grid_->top_right_layer(), hit == HTTOPRIGHT);
- ShowLayer(image_grid_->bottom_left_layer(), hit == HTBOTTOMLEFT);
- ShowLayer(image_grid_->bottom_right_layer(), hit == HTBOTTOMRIGHT);
-
- // Show affected edges.
- ShowLayer(image_grid_->top_layer(),
- hit == HTTOPLEFT || hit == HTTOP || hit == HTTOPRIGHT);
- ShowLayer(image_grid_->left_layer(),
- hit == HTTOPLEFT || hit == HTLEFT || hit == HTBOTTOMLEFT);
- ShowLayer(image_grid_->right_layer(),
- hit == HTTOPRIGHT || hit == HTRIGHT || hit == HTBOTTOMRIGHT);
- ShowLayer(image_grid_->bottom_layer(),
- hit == HTBOTTOMLEFT || hit == HTBOTTOM || hit == HTBOTTOMRIGHT);
-}
-
-void ResizeShadow::Hide() {
- ShowForHitTest(HTNOWHERE);
-}
-
-void ResizeShadow::Layout(const gfx::Rect& content_bounds) {
- gfx::Rect local_bounds(content_bounds.size());
- image_grid_->SetContentBounds(local_bounds);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/resize_shadow.h b/chromium/ash/wm/resize_shadow.h
deleted file mode 100644
index f61f393b572..00000000000
--- a/chromium/ash/wm/resize_shadow.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_RESIZE_SHADOW_H_
-#define ASH_WM_RESIZE_SHADOW_H_
-
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-
-namespace aura {
-class Window;
-}
-namespace gfx {
-class Rect;
-}
-namespace ui {
-class Layer;
-}
-namespace views {
-namespace corewm {
-class ImageGrid;
-}
-}
-
-namespace ash {
-namespace internal {
-
-// A class to render the resize edge effect when the user moves their mouse
-// over a sizing edge. This is just a visual effect; the actual resize is
-// handled by the EventFilter.
-class ResizeShadow {
- public:
- ResizeShadow();
- ~ResizeShadow();
-
- // Initializes the resize effect layers for a given |window|.
- void Init(aura::Window* window);
-
- // Shows resize effects for one or more edges based on a |hit_test| code, such
- // as HTRIGHT or HTBOTTOMRIGHT.
- void ShowForHitTest(int hit_test);
-
- // Hides all resize effects.
- void Hide();
-
- // Updates the effect positions based on the |bounds| of the window.
- void Layout(const gfx::Rect& bounds);
-
- int GetLastHitTestForTest() const {
- return last_hit_test_;
- }
-
- private:
- // Images for the shadow effect.
- scoped_ptr<views::corewm::ImageGrid> image_grid_;
-
- // Hit test value from last call to ShowForHitTest(). Used to prevent
- // repeatedly triggering the same animations for the same hit.
- int last_hit_test_;
-
- DISALLOW_COPY_AND_ASSIGN(ResizeShadow);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_RESIZE_SHADOW_H_
diff --git a/chromium/ash/wm/resize_shadow_and_cursor_unittest.cc b/chromium/ash/wm/resize_shadow_and_cursor_unittest.cc
deleted file mode 100644
index f60a0308f87..00000000000
--- a/chromium/ash/wm/resize_shadow_and_cursor_unittest.cc
+++ /dev/null
@@ -1,229 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/ash_constants.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/cursor_manager_test_api.h"
-#include "ash/wm/custom_frame_view_ash.h"
-#include "ash/wm/resize_shadow.h"
-#include "ash/wm/resize_shadow_controller.h"
-#include "ash/wm/window_state.h"
-#include "base/bind.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/base/cursor/cursor.h"
-#include "ui/base/hit_test.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-namespace test {
-
-namespace {
-
-// views::WidgetDelegate which uses ash::CustomFrameViewAsh.
-class TestWidgetDelegate : public views::WidgetDelegateView {
- public:
- TestWidgetDelegate() {}
- virtual ~TestWidgetDelegate() {}
-
- // views::WidgetDelegateView overrides:
- virtual bool CanResize() const OVERRIDE {
- return true;
- }
- virtual bool CanMaximize() const OVERRIDE {
- return true;
- }
- virtual views::NonClientFrameView* CreateNonClientFrameView(
- views::Widget* widget) OVERRIDE {
- return new ash::CustomFrameViewAsh(widget);
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate);
-};
-
-} // namespace
-
-// The test tests that the mouse cursor is changed and that the resize shadows
-// are shown when the mouse is hovered over the window edge.
-class ResizeShadowAndCursorTest : public AshTestBase {
- public:
- ResizeShadowAndCursorTest() {}
- virtual ~ResizeShadowAndCursorTest() {}
-
- // AshTestBase override:
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
-
- views::Widget* widget(views::Widget::CreateWindowWithContextAndBounds(
- new TestWidgetDelegate(), CurrentContext(), gfx::Rect(0, 0, 100, 100)));
- widget->Show();
- window_ = widget->GetNativeView();
-
- // Add a child window to |window_| in order to properly test that the resize
- // handles and the resize shadows are shown when the mouse is
- // ash::kResizeInsideBoundsSize inside of |window_|'s edges.
- aura::Window* child = CreateTestWindowInShell(
- SK_ColorWHITE, 0, gfx::Rect(0, 10, 100, 90));
- window_->AddChild(child);
- }
-
- // Returns the hit test code if there is a resize shadow. Returns HTNOWHERE if
- // there is no resize shadow.
- int ResizeShadowHitTest() const {
- ash::internal::ResizeShadow* resize_shadow =
- ash::Shell::GetInstance()->resize_shadow_controller()->
- GetShadowForWindowForTest(window_);
- return resize_shadow ? resize_shadow->GetLastHitTestForTest() : HTNOWHERE;
- }
-
- // Returns true if there is a resize shadow.
- bool HasResizeShadow() const {
- return ResizeShadowHitTest() != HTNOWHERE;
- }
-
- // Returns the current cursor type.
- int GetCurrentCursorType() const {
- CursorManagerTestApi test_api(ash::Shell::GetInstance()->cursor_manager());
- return test_api.GetCurrentCursor().native_type();
- }
-
- // Called for each step of a scroll sequence initiated at the bottom right
- // corner of |window_|. Tests whether the resize shadow is shown.
- void ProcessBottomRightResizeGesture(ui::EventType type,
- const gfx::Vector2dF& delta) {
- if (type == ui::ET_GESTURE_SCROLL_END) {
- // After gesture scroll ends, there should be no resize shadow.
- EXPECT_FALSE(HasResizeShadow());
- } else {
- EXPECT_EQ(HTBOTTOMRIGHT, ResizeShadowHitTest());
- }
- }
-
- aura::Window* window() {
- return window_;
- }
-
- private:
- aura::Window* window_;
-
- DISALLOW_COPY_AND_ASSIGN(ResizeShadowAndCursorTest);
-};
-
-// Test whether the resize shadows are visible and the cursor type based on the
-// mouse's position.
-TEST_F(ResizeShadowAndCursorTest, MouseHover) {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- ASSERT_TRUE(ash::wm::GetWindowState(window())->IsNormalShowState());
-
- generator.MoveMouseTo(50, 50);
- EXPECT_FALSE(HasResizeShadow());
- EXPECT_EQ(ui::kCursorNull, GetCurrentCursorType());
-
- generator.MoveMouseTo(gfx::Point(50, 0));
- EXPECT_EQ(HTTOP, ResizeShadowHitTest());
- EXPECT_EQ(ui::kCursorNorthResize, GetCurrentCursorType());
-
- generator.MoveMouseTo(50, 50);
- EXPECT_FALSE(HasResizeShadow());
- EXPECT_EQ(ui::kCursorNull, GetCurrentCursorType());
-
- generator.MoveMouseTo(100, 100);
- EXPECT_EQ(HTBOTTOMRIGHT, ResizeShadowHitTest());
- EXPECT_EQ(ui::kCursorSouthEastResize, GetCurrentCursorType());
-
- generator.MoveMouseTo(50, 100);
- EXPECT_EQ(HTBOTTOM, ResizeShadowHitTest());
- EXPECT_EQ(ui::kCursorSouthResize, GetCurrentCursorType());
-
- generator.MoveMouseTo(50, 100 + ash::kResizeOutsideBoundsSize - 1);
- EXPECT_EQ(HTBOTTOM, ResizeShadowHitTest());
- EXPECT_EQ(ui::kCursorSouthResize, GetCurrentCursorType());
-
- generator.MoveMouseTo(50, 100 + ash::kResizeOutsideBoundsSize + 10);
- EXPECT_FALSE(HasResizeShadow());
- EXPECT_EQ(ui::kCursorNull, GetCurrentCursorType());
-
- generator.MoveMouseTo(50, 100 - ash::kResizeInsideBoundsSize);
- EXPECT_EQ(HTBOTTOM, ResizeShadowHitTest());
- EXPECT_EQ(ui::kCursorSouthResize, GetCurrentCursorType());
-
- generator.MoveMouseTo(50, 100 - ash::kResizeInsideBoundsSize - 10);
- EXPECT_FALSE(HasResizeShadow());
- EXPECT_EQ(ui::kCursorNull, GetCurrentCursorType());
-}
-
-// Test that the resize shadows stay visible and that the cursor stays the same
-// as long as a user is resizing a window.
-TEST_F(ResizeShadowAndCursorTest, MouseDrag) {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- ASSERT_TRUE(ash::wm::GetWindowState(window())->IsNormalShowState());
- gfx::Size initial_size(window()->bounds().size());
-
- generator.MoveMouseTo(100, 50);
- generator.PressLeftButton();
- EXPECT_EQ(HTRIGHT, ResizeShadowHitTest());
- EXPECT_EQ(ui::kCursorEastResize, GetCurrentCursorType());
-
- generator.MoveMouseTo(110, 50);
- EXPECT_EQ(HTRIGHT, ResizeShadowHitTest());
- EXPECT_EQ(ui::kCursorEastResize, GetCurrentCursorType());
-
- generator.ReleaseLeftButton();
- EXPECT_EQ(HTRIGHT, ResizeShadowHitTest());
- EXPECT_EQ(ui::kCursorEastResize, GetCurrentCursorType());
-
- gfx::Size new_size(window()->bounds().size());
- EXPECT_NE(new_size.ToString(), initial_size.ToString());
-}
-
-// Test that the resize shadows stay visible while resizing a window via touch.
-TEST_F(ResizeShadowAndCursorTest, Touch) {
- ASSERT_TRUE(ash::wm::GetWindowState(window())->IsNormalShowState());
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
-
- int start = 100 + ash::kResizeOutsideBoundsSize - 1;
- generator.GestureScrollSequenceWithCallback(
- gfx::Point(start, start),
- gfx::Point(start + 50, start + 50),
- base::TimeDelta::FromMilliseconds(100),
- 3,
- base::Bind(&ResizeShadowAndCursorTest::ProcessBottomRightResizeGesture,
- base::Unretained(this)));
-}
-
-// Test that the resize shadows are not visible and that the default cursor is
-// used when the window is maximized.
-TEST_F(ResizeShadowAndCursorTest, MaximizeRestore) {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- ASSERT_TRUE(ash::wm::GetWindowState(window())->IsNormalShowState());
-
- generator.MoveMouseTo(100, 50);
- EXPECT_EQ(HTRIGHT, ResizeShadowHitTest());
- EXPECT_EQ(ui::kCursorEastResize, GetCurrentCursorType());
- generator.MoveMouseTo(100 - ash::kResizeInsideBoundsSize, 50);
- EXPECT_EQ(HTRIGHT, ResizeShadowHitTest());
- EXPECT_EQ(ui::kCursorEastResize, GetCurrentCursorType());
-
- ash::wm::GetWindowState(window())->Maximize();
- gfx::Rect bounds(window()->GetBoundsInRootWindow());
- gfx::Point right_center(bounds.right() - 1,
- (bounds.y() + bounds.bottom()) / 2);
- generator.MoveMouseTo(right_center);
- EXPECT_FALSE(HasResizeShadow());
- EXPECT_EQ(ui::kCursorNull, GetCurrentCursorType());
-
- ash::wm::GetWindowState(window())->Restore();
- generator.MoveMouseTo(100, 50);
- EXPECT_EQ(HTRIGHT, ResizeShadowHitTest());
- EXPECT_EQ(ui::kCursorEastResize, GetCurrentCursorType());
- generator.MoveMouseTo(100 - ash::kResizeInsideBoundsSize, 50);
- EXPECT_EQ(HTRIGHT, ResizeShadowHitTest());
- EXPECT_EQ(ui::kCursorEastResize, GetCurrentCursorType());
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/wm/resize_shadow_controller.cc b/chromium/ash/wm/resize_shadow_controller.cc
deleted file mode 100644
index 85778d337a8..00000000000
--- a/chromium/ash/wm/resize_shadow_controller.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/resize_shadow_controller.h"
-
-#include <utility>
-
-#include "ash/wm/resize_shadow.h"
-#include "ui/aura/window.h"
-
-namespace ash {
-namespace internal {
-
-ResizeShadowController::ResizeShadowController() {
-}
-
-ResizeShadowController::~ResizeShadowController() {
- for (WindowShadowMap::const_iterator it = window_shadows_.begin();
- it != window_shadows_.end(); ++it) {
- it->first->RemoveObserver(this);
- }
-}
-
-void ResizeShadowController::ShowShadow(aura::Window* window, int hit_test) {
- ResizeShadow* shadow = GetShadowForWindow(window);
- if (!shadow)
- shadow = CreateShadow(window);
- shadow->ShowForHitTest(hit_test);
-}
-
-void ResizeShadowController::HideShadow(aura::Window* window) {
- ResizeShadow* shadow = GetShadowForWindow(window);
- if (shadow)
- shadow->Hide();
-}
-
-ResizeShadow* ResizeShadowController::GetShadowForWindowForTest(
- aura::Window* window) {
- return GetShadowForWindow(window);
-}
-
-void ResizeShadowController::OnWindowBoundsChanged(
- aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) {
- ResizeShadow* shadow = GetShadowForWindow(window);
- if (shadow)
- shadow->Layout(new_bounds);
-}
-
-void ResizeShadowController::OnWindowDestroyed(aura::Window* window) {
- window_shadows_.erase(window);
-}
-
-ResizeShadow* ResizeShadowController::CreateShadow(aura::Window* window) {
- linked_ptr<ResizeShadow> shadow(new ResizeShadow());
- window_shadows_.insert(std::make_pair(window, shadow));
- // Attach the layers to this window.
- shadow->Init(window);
- // Ensure initial bounds are correct.
- shadow->Layout(window->bounds());
- // Watch for bounds changes.
- window->AddObserver(this);
- return shadow.get();
-}
-
-ResizeShadow* ResizeShadowController::GetShadowForWindow(aura::Window* window) {
- WindowShadowMap::const_iterator it = window_shadows_.find(window);
- return it != window_shadows_.end() ? it->second.get() : NULL;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/resize_shadow_controller.h b/chromium/ash/wm/resize_shadow_controller.h
deleted file mode 100644
index 1eccf4c8364..00000000000
--- a/chromium/ash/wm/resize_shadow_controller.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_RESIZE_SHADOW_CONTROLLER_H_
-#define ASH_WM_RESIZE_SHADOW_CONTROLLER_H_
-
-#include <map>
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/linked_ptr.h"
-#include "ui/aura/window_observer.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-namespace internal {
-
-class ResizeShadow;
-
-// ResizeShadowController observes changes to resizable windows and shows
-// a resize handle visual effect when the cursor is near the edges.
-class ASH_EXPORT ResizeShadowController : public aura::WindowObserver {
- public:
- ResizeShadowController();
- virtual ~ResizeShadowController();
-
- // Shows the appropriate shadow for a given |window| and |hit_test| location.
- void ShowShadow(aura::Window* window, int hit_test);
-
- // Hides the shadow for a |window|, if it has one.
- void HideShadow(aura::Window* window);
-
- ResizeShadow* GetShadowForWindowForTest(aura::Window* window);
-
- // aura::WindowObserver overrides:
- virtual void OnWindowBoundsChanged(
- aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
-
- private:
- typedef std::map<aura::Window*, linked_ptr<ResizeShadow> > WindowShadowMap;
-
- // Creates a shadow for a given window and returns it. |window_shadows_|
- // owns the memory.
- ResizeShadow* CreateShadow(aura::Window* window);
-
- // Returns the resize shadow for |window| or NULL if no shadow exists.
- ResizeShadow* GetShadowForWindow(aura::Window* window);
-
- WindowShadowMap window_shadows_;
-
- DISALLOW_COPY_AND_ASSIGN(ResizeShadowController);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_RESIZE_SHADOW_CONTROLLER_H_
diff --git a/chromium/ash/wm/root_window_layout_manager.cc b/chromium/ash/wm/root_window_layout_manager.cc
deleted file mode 100644
index ef1689e38f6..00000000000
--- a/chromium/ash/wm/root_window_layout_manager.cc
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/root_window_layout_manager.h"
-
-#include "ash/desktop_background/desktop_background_widget_controller.h"
-#include "ash/root_window_controller.h"
-#include "ui/aura/root_window.h"
-#include "ui/compositor/layer.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-////////////////////////////////////////////////////////////////////////////////
-// RootWindowLayoutManager, public:
-
-RootWindowLayoutManager::RootWindowLayoutManager(aura::Window* owner)
- : owner_(owner) {
-}
-
-RootWindowLayoutManager::~RootWindowLayoutManager() {
-}
-
-
-////////////////////////////////////////////////////////////////////////////////
-// RootWindowLayoutManager, aura::LayoutManager implementation:
-
-void RootWindowLayoutManager::OnWindowResized() {
- gfx::Rect fullscreen_bounds =
- gfx::Rect(owner_->bounds().width(), owner_->bounds().height());
-
- // Resize both our immediate children (the containers-of-containers animated
- // by PowerButtonController) and their children (the actual containers).
- aura::Window::Windows::const_iterator i;
- for (i = owner_->children().begin(); i != owner_->children().end(); ++i) {
- (*i)->SetBounds(fullscreen_bounds);
- aura::Window::Windows::const_iterator j;
- for (j = (*i)->children().begin(); j != (*i)->children().end(); ++j)
- (*j)->SetBounds(fullscreen_bounds);
- }
- RootWindowController* root_window_controller =
- GetRootWindowController(owner_);
- DesktopBackgroundWidgetController* background =
- root_window_controller->wallpaper_controller();
-
- if (!background && root_window_controller->animating_wallpaper_controller()) {
- background = root_window_controller->animating_wallpaper_controller()->
- GetController(false);
- }
- if (background)
- background->SetBounds(fullscreen_bounds);
-}
-
-void RootWindowLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
-}
-
-void RootWindowLayoutManager::OnWillRemoveWindowFromLayout(
- aura::Window* child) {
-}
-
-void RootWindowLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
-}
-
-void RootWindowLayoutManager::OnChildWindowVisibilityChanged(
- aura::Window* child,
- bool visible) {
-}
-
-void RootWindowLayoutManager::SetChildBounds(
- aura::Window* child,
- const gfx::Rect& requested_bounds) {
- SetChildBoundsDirect(child, requested_bounds);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/root_window_layout_manager.h b/chromium/ash/wm/root_window_layout_manager.h
deleted file mode 100644
index 708e306b75b..00000000000
--- a/chromium/ash/wm/root_window_layout_manager.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_
-#define ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_
-
-#include "ash/shell_window_ids.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/layout_manager.h"
-
-namespace aura {
-class Window;
-}
-namespace gfx {
-class Rect;
-}
-namespace ui {
-class Layer;
-}
-namespace views {
-class Widget;
-}
-
-namespace ash {
-namespace internal {
-
-// A layout manager for the root window.
-// Resizes all of its immediate children to fill the bounds of the root window.
-class RootWindowLayoutManager : public aura::LayoutManager {
- public:
- explicit RootWindowLayoutManager(aura::Window* owner);
- virtual ~RootWindowLayoutManager();
-
- // Overridden from aura::LayoutManager:
- virtual void OnWindowResized() OVERRIDE;
- virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE;
- virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE;
- virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE;
- virtual void OnChildWindowVisibilityChanged(aura::Window* child,
- bool visible) OVERRIDE;
- virtual void SetChildBounds(aura::Window* child,
- const gfx::Rect& requested_bounds) OVERRIDE;
-
- private:
- aura::Window* owner_;
-
- DISALLOW_COPY_AND_ASSIGN(RootWindowLayoutManager);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_
diff --git a/chromium/ash/wm/screen_dimmer.cc b/chromium/ash/wm/screen_dimmer.cc
deleted file mode 100644
index b12566e7575..00000000000
--- a/chromium/ash/wm/screen_dimmer.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/screen_dimmer.h"
-
-#include "ash/shell.h"
-#include "base/time/time.h"
-#include "ui/aura/root_window.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/size.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-// Opacity for |dimming_layer_| when it's dimming the screen.
-const float kDimmingLayerOpacity = 0.4f;
-
-// Duration for dimming animations, in milliseconds.
-const int kDimmingTransitionMs = 200;
-
-} // namespace
-
-ScreenDimmer::ScreenDimmer(aura::Window* root_window)
- : root_window_(root_window),
- currently_dimming_(false) {
- root_window_->AddObserver(this);
-}
-
-ScreenDimmer::~ScreenDimmer() {
- root_window_->RemoveObserver(this);
-}
-
-void ScreenDimmer::SetDimming(bool should_dim) {
- if (should_dim == currently_dimming_)
- return;
-
- if (!dimming_layer_) {
- dimming_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR));
- dimming_layer_->SetColor(SK_ColorBLACK);
- dimming_layer_->SetOpacity(0.0f);
- ui::Layer* root_layer = root_window_->layer();
- dimming_layer_->SetBounds(root_layer->bounds());
- root_layer->Add(dimming_layer_.get());
- root_layer->StackAtTop(dimming_layer_.get());
- }
-
- currently_dimming_ = should_dim;
-
- ui::ScopedLayerAnimationSettings scoped_settings(
- dimming_layer_->GetAnimator());
- scoped_settings.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kDimmingTransitionMs));
- dimming_layer_->SetOpacity(should_dim ? kDimmingLayerOpacity : 0.0f);
-}
-
-void ScreenDimmer::OnWindowBoundsChanged(aura::Window* root,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) {
- if (dimming_layer_)
- dimming_layer_->SetBounds(gfx::Rect(root->bounds().size()));
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/screen_dimmer.h b/chromium/ash/wm/screen_dimmer.h
deleted file mode 100644
index abbb0a5b1ab..00000000000
--- a/chromium/ash/wm/screen_dimmer.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_SCREEN_DIMMER_H_
-#define ASH_WM_SCREEN_DIMMER_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/window_observer.h"
-
-namespace ui {
-class Layer;
-}
-
-namespace ash {
-namespace internal {
-
-// ScreenDimmer displays a partially-opaque layer above everything
-// else in the root window to darken the display. It shouldn't be used
-// for long-term brightness adjustments due to performance
-// considerations -- it's only intended for cases where we want to
-// briefly dim the screen (e.g. to indicate to the user that we're
-// about to suspend a machine that lacks an internal backlight that
-// can be adjusted).
-class ASH_EXPORT ScreenDimmer : public aura::WindowObserver {
- public:
- class TestApi {
- public:
- explicit TestApi(ScreenDimmer* dimmer) : dimmer_(dimmer) {}
-
- ui::Layer* layer() { return dimmer_->dimming_layer_.get(); }
-
- private:
- ScreenDimmer* dimmer_; // not owned
-
- DISALLOW_COPY_AND_ASSIGN(TestApi);
- };
-
- explicit ScreenDimmer(aura::Window* root_window);
- virtual ~ScreenDimmer();
-
- // Dim or undim the root window.
- void SetDimming(bool should_dim);
-
- // aura::WindowObserver overrides:
- virtual void OnWindowBoundsChanged(aura::Window* root_window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
-
- private:
- friend class TestApi;
-
- aura::Window* root_window_;
-
- // Partially-opaque layer that's stacked above all of the root window's
- // children and used to dim the screen. NULL until the first time we dim.
- scoped_ptr<ui::Layer> dimming_layer_;
-
- // Are we currently dimming the screen?
- bool currently_dimming_;
-
- DISALLOW_COPY_AND_ASSIGN(ScreenDimmer);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_SCREEN_DIMMER_H_
diff --git a/chromium/ash/wm/screen_dimmer_unittest.cc b/chromium/ash/wm/screen_dimmer_unittest.cc
deleted file mode 100644
index a87c71bf088..00000000000
--- a/chromium/ash/wm/screen_dimmer_unittest.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/screen_dimmer.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/root_window.h"
-#include "ui/compositor/layer.h"
-
-namespace ash {
-namespace test {
-
-class ScreenDimmerTest : public AshTestBase {
- public:
- ScreenDimmerTest() : dimmer_(NULL) {}
- virtual ~ScreenDimmerTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- dimmer_ = Shell::GetPrimaryRootWindowController()->screen_dimmer();
- test_api_.reset(new internal::ScreenDimmer::TestApi(dimmer_));
- }
-
- protected:
- internal::ScreenDimmer* dimmer_; // not owned
-
- scoped_ptr<internal::ScreenDimmer::TestApi> test_api_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ScreenDimmerTest);
-};
-
-TEST_F(ScreenDimmerTest, DimAndUndim) {
- // Don't create a layer until we need to.
- EXPECT_TRUE(test_api_->layer() == NULL);
- dimmer_->SetDimming(false);
- EXPECT_TRUE(test_api_->layer() == NULL);
-
- // When we enable dimming, the layer should be created and stacked at the top
- // of the root's children.
- dimmer_->SetDimming(true);
- ASSERT_TRUE(test_api_->layer() != NULL);
- ui::Layer* root_layer = Shell::GetPrimaryRootWindow()->layer();
- ASSERT_TRUE(!root_layer->children().empty());
- EXPECT_EQ(test_api_->layer(), root_layer->children().back());
- EXPECT_TRUE(test_api_->layer()->visible());
- EXPECT_GT(test_api_->layer()->GetTargetOpacity(), 0.0f);
-
- // When we disable dimming, the layer should be animated back to full
- // transparency.
- dimmer_->SetDimming(false);
- ASSERT_TRUE(test_api_->layer() != NULL);
- EXPECT_TRUE(test_api_->layer()->visible());
- EXPECT_FLOAT_EQ(0.0f, test_api_->layer()->GetTargetOpacity());
-}
-
-TEST_F(ScreenDimmerTest, ResizeLayer) {
- // The dimming layer should be initially sized to cover the root window.
- dimmer_->SetDimming(true);
- ui::Layer* dimming_layer = test_api_->layer();
- ASSERT_TRUE(dimming_layer != NULL);
- ui::Layer* root_layer = Shell::GetPrimaryRootWindow()->layer();
- EXPECT_EQ(gfx::Rect(root_layer->bounds().size()).ToString(),
- dimming_layer->bounds().ToString());
-
- // When we resize the root window, the dimming layer should be resized to
- // match.
- gfx::Size kNewSize(400, 300);
- Shell::GetPrimaryRootWindow()->GetDispatcher()->SetHostSize(kNewSize);
- EXPECT_EQ(kNewSize.ToString(), dimming_layer->bounds().size().ToString());
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/wm/session_state_animator.cc b/chromium/ash/wm/session_state_animator.cc
deleted file mode 100644
index de8cd42d4da..00000000000
--- a/chromium/ash/wm/session_state_animator.cc
+++ /dev/null
@@ -1,617 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/session_state_animator.h"
-
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/window_animations.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/compositor/layer_animation_observer.h"
-#include "ui/compositor/layer_animation_sequence.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-// Slightly-smaller size that we scale the screen down to for the pre-lock and
-// pre-shutdown states.
-const float kSlowCloseSizeRatio = 0.95f;
-
-// Maximum opacity of white layer when animating pre-shutdown state.
-const float kPartialFadeRatio = 0.3f;
-
-// Minimum size. Not zero as it causes numeric issues.
-const float kMinimumScale = 1e-4f;
-
-// Returns the transform that should be applied to containers for the slow-close
-// animation.
-gfx::Transform GetSlowCloseTransform() {
- gfx::Size root_size = Shell::GetPrimaryRootWindow()->bounds().size();
- gfx::Transform transform;
- transform.Translate(
- floor(0.5 * (1.0 - kSlowCloseSizeRatio) * root_size.width() + 0.5),
- floor(0.5 * (1.0 - kSlowCloseSizeRatio) * root_size.height() + 0.5));
- transform.Scale(kSlowCloseSizeRatio, kSlowCloseSizeRatio);
- return transform;
-}
-
-// Returns the transform that should be applied to containers for the fast-close
-// animation.
-gfx::Transform GetFastCloseTransform() {
- gfx::Size root_size = Shell::GetPrimaryRootWindow()->bounds().size();
- gfx::Transform transform;
- transform.Translate(floor(0.5 * root_size.width() + 0.5),
- floor(0.5 * root_size.height() + 0.5));
- transform.Scale(kMinimumScale, kMinimumScale);
- return transform;
-}
-
-// Slowly shrinks |window| to a slightly-smaller size.
-void StartSlowCloseAnimationForWindow(aura::Window* window,
- base::TimeDelta duration,
- ui::LayerAnimationObserver* observer) {
- ui::LayerAnimator* animator = window->layer()->GetAnimator();
- animator->set_preemption_strategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- ui::LayerAnimationSequence* sequence = new ui::LayerAnimationSequence(
- ui::LayerAnimationElement::CreateTransformElement(
- GetSlowCloseTransform(),
- duration));
- if (observer)
- sequence->AddObserver(observer);
- animator->StartAnimation(sequence);
-}
-
-// Quickly undoes the effects of the slow-close animation on |window|.
-void StartUndoSlowCloseAnimationForWindow(
- aura::Window* window,
- base::TimeDelta duration,
- ui::LayerAnimationObserver* observer) {
- ui::LayerAnimator* animator = window->layer()->GetAnimator();
- animator->set_preemption_strategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- ui::LayerAnimationSequence* sequence = new ui::LayerAnimationSequence(
- ui::LayerAnimationElement::CreateTransformElement(
- gfx::Transform(),
- duration));
- if (observer)
- sequence->AddObserver(observer);
- animator->StartAnimation(sequence);
-}
-
-// Quickly shrinks |window| down to a point in the center of the screen and
-// fades it out to 0 opacity.
-void StartFastCloseAnimationForWindow(aura::Window* window,
- base::TimeDelta duration,
- ui::LayerAnimationObserver* observer) {
- ui::LayerAnimator* animator = window->layer()->GetAnimator();
- animator->set_preemption_strategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- animator->StartAnimation(
- new ui::LayerAnimationSequence(
- ui::LayerAnimationElement::CreateTransformElement(
- GetFastCloseTransform(), duration)));
- ui::LayerAnimationSequence* sequence = new ui::LayerAnimationSequence(
- ui::LayerAnimationElement::CreateOpacityElement(0.0, duration));
- if (observer)
- sequence->AddObserver(observer);
- animator->StartAnimation(sequence);
-}
-
-// Fades |window| to |target_opacity| over |duration|.
-void StartPartialFadeAnimation(aura::Window* window,
- float target_opacity,
- base::TimeDelta duration,
- ui::LayerAnimationObserver* observer) {
- ui::LayerAnimator* animator = window->layer()->GetAnimator();
- animator->set_preemption_strategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- ui::LayerAnimationSequence* sequence = new ui::LayerAnimationSequence(
- ui::LayerAnimationElement::CreateOpacityElement(
- target_opacity, duration));
- if (observer)
- sequence->AddObserver(observer);
- animator->StartAnimation(sequence);
-}
-
-// Fades |window| to |opacity| over |duration|.
-void StartOpacityAnimationForWindow(aura::Window* window,
- float opacity,
- base::TimeDelta duration,
- ui::LayerAnimationObserver* observer) {
- ui::LayerAnimator* animator = window->layer()->GetAnimator();
- animator->set_preemption_strategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- ui::LayerAnimationSequence* sequence = new ui::LayerAnimationSequence(
- ui::LayerAnimationElement::CreateOpacityElement(opacity, duration));
- if (observer)
- sequence->AddObserver(observer);
- animator->StartAnimation(sequence);
-}
-
-// Makes |window| fully transparent instantaneously.
-void HideWindowImmediately(aura::Window* window,
- ui::LayerAnimationObserver* observer) {
- window->layer()->SetOpacity(0.0);
- if (observer)
- observer->OnLayerAnimationEnded(NULL);
-}
-
-// Restores |window| to its original position and scale and full opacity
-// instantaneously.
-void RestoreWindow(aura::Window* window, ui::LayerAnimationObserver* observer) {
- window->layer()->SetTransform(gfx::Transform());
- window->layer()->SetOpacity(1.0);
- if (observer)
- observer->OnLayerAnimationEnded(NULL);
-}
-
-void HideWindow(aura::Window* window,
- base::TimeDelta duration,
- bool above,
- ui::LayerAnimationObserver* observer) {
- ui::Layer* layer = window->layer();
- ui::ScopedLayerAnimationSettings settings(layer->GetAnimator());
-
- settings.SetPreemptionStrategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- settings.SetTransitionDuration(duration);
-
- settings.SetTweenType(gfx::Tween::EASE_OUT);
- SetTransformForScaleAnimation(layer,
- above ? LAYER_SCALE_ANIMATION_ABOVE : LAYER_SCALE_ANIMATION_BELOW);
-
- settings.SetTweenType(gfx::Tween::EASE_IN_OUT);
- layer->SetOpacity(0.0f);
-
- // After the animation completes snap the transform back to the identity,
- // otherwise any one that asks for screen bounds gets a slightly scaled
- // version.
- settings.SetPreemptionStrategy(ui::LayerAnimator::ENQUEUE_NEW_ANIMATION);
- settings.SetTransitionDuration(base::TimeDelta());
- layer->SetTransform(gfx::Transform());
-
- // A bit of a dirty trick: we need to catch the end of the animation we don't
- // control. So we use two facts we know: which animator will be used and the
- // target opacity to add "Do nothing" animation sequence.
- // Unfortunately, we can not just use empty LayerAnimationSequence, because
- // it does not call NotifyEnded().
- if (observer) {
- ui::LayerAnimationSequence* sequence = new ui::LayerAnimationSequence(
- ui::LayerAnimationElement::CreateOpacityElement(
- 0.0, base::TimeDelta()));
- sequence->AddObserver(observer);
- layer->GetAnimator()->ScheduleAnimation(sequence);
- }
-}
-
-// Animates |window| to identity transform and full opacity over |duration|.
-void TransformWindowToBaseState(aura::Window* window,
- base::TimeDelta duration,
- ui::LayerAnimationObserver* observer) {
- ui::Layer* layer = window->layer();
- ui::ScopedLayerAnimationSettings settings(layer->GetAnimator());
-
- // Animate to target values.
- settings.SetPreemptionStrategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- settings.SetTransitionDuration(duration);
-
- settings.SetTweenType(gfx::Tween::EASE_OUT);
- layer->SetTransform(gfx::Transform());
-
- settings.SetTweenType(gfx::Tween::EASE_IN_OUT);
- layer->SetOpacity(1.0f);
-
- // A bit of a dirty trick: we need to catch the end of the animation we don't
- // control. So we use two facts we know: which animator will be used and the
- // target opacity to add "Do nothing" animation sequence.
- // Unfortunately, we can not just use empty LayerAnimationSequence, because
- // it does not call NotifyEnded().
- if (observer) {
- ui::LayerAnimationSequence* sequence = new ui::LayerAnimationSequence(
- ui::LayerAnimationElement::CreateOpacityElement(
- 1.0, base::TimeDelta()));
- sequence->AddObserver(observer);
- layer->GetAnimator()->ScheduleAnimation(sequence);
- }
-}
-
-void ShowWindow(aura::Window* window,
- base::TimeDelta duration,
- bool above,
- ui::LayerAnimationObserver* observer) {
- ui::Layer* layer = window->layer();
- ui::ScopedLayerAnimationSettings settings(layer->GetAnimator());
-
- // Set initial state of animation
- settings.SetPreemptionStrategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- settings.SetTransitionDuration(base::TimeDelta());
- SetTransformForScaleAnimation(layer,
- above ? LAYER_SCALE_ANIMATION_ABOVE : LAYER_SCALE_ANIMATION_BELOW);
-
- TransformWindowToBaseState(window, duration, observer);
-}
-
-// Starts grayscale/brightness animation for |window| over |duration|. Target
-// value for both grayscale and brightness are specified by |target|.
-void StartGrayscaleBrightnessAnimationForWindow(
- aura::Window* window,
- float target,
- base::TimeDelta duration,
- gfx::Tween::Type tween_type,
- ui::LayerAnimationObserver* observer) {
- ui::LayerAnimator* animator = window->layer()->GetAnimator();
-
- scoped_ptr<ui::LayerAnimationSequence> brightness_sequence(
- new ui::LayerAnimationSequence());
- scoped_ptr<ui::LayerAnimationSequence> grayscale_sequence(
- new ui::LayerAnimationSequence());
-
- scoped_ptr<ui::LayerAnimationElement> brightness_element(
- ui::LayerAnimationElement::CreateBrightnessElement(
- target, duration));
- brightness_element->set_tween_type(tween_type);
- brightness_sequence->AddElement(brightness_element.release());
-
- scoped_ptr<ui::LayerAnimationElement> grayscale_element(
- ui::LayerAnimationElement::CreateGrayscaleElement(
- target, duration));
- grayscale_element->set_tween_type(tween_type);
- grayscale_sequence->AddElement(grayscale_element.release());
-
- std::vector<ui::LayerAnimationSequence*> animations;
- animations.push_back(brightness_sequence.release());
- animations.push_back(grayscale_sequence.release());
-
- if (observer)
- animations[0]->AddObserver(observer);
-
- animator->set_preemption_strategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
-
- animator->StartTogether(animations);
-}
-
-// Animation observer that will drop animated foreground once animation is
-// finished. It is used in when undoing shutdown animation.
-class CallbackAnimationObserver : public ui::LayerAnimationObserver {
- public:
- explicit CallbackAnimationObserver(base::Callback<void(void)> &callback)
- : callback_(callback) {
- }
- virtual ~CallbackAnimationObserver() {
- }
-
- private:
- // Overridden from ui::LayerAnimationObserver:
- virtual void OnLayerAnimationEnded(ui::LayerAnimationSequence* seq)
- OVERRIDE {
- // Drop foreground once animation is over.
- callback_.Run();
- delete this;
- }
-
- virtual void OnLayerAnimationAborted(ui::LayerAnimationSequence* seq)
- OVERRIDE {
- // Drop foreground once animation is over.
- callback_.Run();
- delete this;
- }
-
- virtual void OnLayerAnimationScheduled(ui::LayerAnimationSequence* seq)
- OVERRIDE {}
-
- base::Callback<void(void)> callback_;
-
- DISALLOW_COPY_AND_ASSIGN(CallbackAnimationObserver);
-};
-
-
-bool IsLayerAnimated(ui::Layer* layer,
- SessionStateAnimator::AnimationType type) {
- switch (type) {
- case SessionStateAnimator::ANIMATION_PARTIAL_CLOSE:
- if (layer->GetTargetTransform() != GetSlowCloseTransform())
- return false;
- break;
- case SessionStateAnimator::ANIMATION_UNDO_PARTIAL_CLOSE:
- if (layer->GetTargetTransform() != gfx::Transform())
- return false;
- break;
- case SessionStateAnimator::ANIMATION_FULL_CLOSE:
- if (layer->GetTargetTransform() != GetFastCloseTransform() ||
- layer->GetTargetOpacity() > 0.0001)
- return false;
- break;
- case SessionStateAnimator::ANIMATION_FADE_IN:
- if (layer->GetTargetOpacity() < 0.9999)
- return false;
- break;
- case SessionStateAnimator::ANIMATION_FADE_OUT:
- if (layer->GetTargetOpacity() > 0.0001)
- return false;
- break;
- case SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY:
- if (layer->GetTargetOpacity() > 0.0001)
- return false;
- break;
- case SessionStateAnimator::ANIMATION_RESTORE:
- if (layer->opacity() < 0.9999 || layer->transform() != gfx::Transform())
- return false;
- break;
- case SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS:
- if ((layer->GetTargetBrightness() < 0.9999) ||
- (layer->GetTargetGrayscale() < 0.9999))
- return false;
- break;
- case SessionStateAnimator::ANIMATION_UNDO_GRAYSCALE_BRIGHTNESS:
- if ((layer->GetTargetBrightness() > 0.0001) ||
- (layer->GetTargetGrayscale() > 0.0001))
- return false;
- break;
- case SessionStateAnimator::ANIMATION_DROP:
- case SessionStateAnimator::ANIMATION_UNDO_LIFT:
- //ToDo(antim) : check other effects
- if (layer->GetTargetOpacity() < 0.9999)
- return false;
- break;
- //ToDo(antim) : check other effects
- case SessionStateAnimator::ANIMATION_LIFT:
- if (layer->GetTargetOpacity() > 0.0001)
- return false;
- break;
- case SessionStateAnimator::ANIMATION_RAISE_TO_SCREEN:
- //ToDo(antim) : check other effects
- if (layer->GetTargetOpacity() < 0.9999)
- return false;
- break;
- //ToDo(antim) : check other effects
- case SessionStateAnimator::ANIMATION_LOWER_BELOW_SCREEN:
- if (layer->GetTargetOpacity() > 0.0001)
- return false;
- break;
- default:
- NOTREACHED() << "Unhandled animation type " << type;
- return false;
- }
- return true;
-}
-
-} // namespace
-
-bool SessionStateAnimator::TestApi::ContainersAreAnimated(
- int container_mask, AnimationType type) const {
- aura::Window::Windows containers;
- animator_->GetContainers(container_mask, &containers);
- for (aura::Window::Windows::const_iterator it = containers.begin();
- it != containers.end(); ++it) {
- aura::Window* window = *it;
- ui::Layer* layer = window->layer();
- if (!IsLayerAnimated(layer, type))
- return false;
- }
- return true;
-}
-
-bool SessionStateAnimator::TestApi::RootWindowIsAnimated(AnimationType type)
- const {
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- ui::Layer* layer = root_window->layer();
- return IsLayerAnimated(layer, type);
-}
-
-const int SessionStateAnimator::kAllLockScreenContainersMask =
- SessionStateAnimator::LOCK_SCREEN_BACKGROUND |
- SessionStateAnimator::LOCK_SCREEN_CONTAINERS |
- SessionStateAnimator::LOCK_SCREEN_RELATED_CONTAINERS;
-
-const int SessionStateAnimator::kAllContainersMask =
- SessionStateAnimator::kAllLockScreenContainersMask |
- SessionStateAnimator::DESKTOP_BACKGROUND |
- SessionStateAnimator::LAUNCHER |
- SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS;
-
-SessionStateAnimator::SessionStateAnimator() {
-}
-
-SessionStateAnimator::~SessionStateAnimator() {
-}
-
-base::TimeDelta SessionStateAnimator::GetDuration(AnimationSpeed speed) {
- switch (speed) {
- case ANIMATION_SPEED_IMMEDIATE:
- return base::TimeDelta();
- case ANIMATION_SPEED_UNDOABLE:
- return base::TimeDelta::FromMilliseconds(400);
- case ANIMATION_SPEED_REVERT:
- return base::TimeDelta::FromMilliseconds(150);
- case ANIMATION_SPEED_FAST:
- return base::TimeDelta::FromMilliseconds(150);
- case ANIMATION_SPEED_SHOW_LOCK_SCREEN:
- return base::TimeDelta::FromMilliseconds(200);
- case ANIMATION_SPEED_MOVE_WINDOWS:
- return base::TimeDelta::FromMilliseconds(350);
- case ANIMATION_SPEED_UNDO_MOVE_WINDOWS:
- return base::TimeDelta::FromMilliseconds(350);
- case ANIMATION_SPEED_SHUTDOWN:
- return base::TimeDelta::FromMilliseconds(1000);
- case ANIMATION_SPEED_REVERT_SHUTDOWN:
- return base::TimeDelta::FromMilliseconds(500);
- }
- // Satisfy compilers that do not understand that we will return from switch
- // above anyway.
- DCHECK(false) << "Unhandled animation speed " << speed;
- return base::TimeDelta();
-}
-
-// Fills |containers| with the containers described by |container_mask|.
-void SessionStateAnimator::GetContainers(int container_mask,
- aura::Window::Windows* containers) {
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- containers->clear();
-
- if (container_mask & DESKTOP_BACKGROUND) {
- containers->push_back(Shell::GetContainer(
- root_window,
- internal::kShellWindowId_DesktopBackgroundContainer));
- }
- if (container_mask & LAUNCHER) {
- containers->push_back(Shell::GetContainer(
- root_window,
- internal::kShellWindowId_ShelfContainer));
- }
- if (container_mask & NON_LOCK_SCREEN_CONTAINERS) {
- // TODO(antrim): Figure out a way to eliminate a need to exclude launcher
- // in such way.
- aura::Window* non_lock_screen_containers = Shell::GetContainer(
- root_window,
- internal::kShellWindowId_NonLockScreenContainersContainer);
- aura::Window::Windows children = non_lock_screen_containers->children();
-
- for (aura::Window::Windows::const_iterator it = children.begin();
- it != children.end(); ++it) {
- aura::Window* window = *it;
- if (window->id() == internal::kShellWindowId_ShelfContainer)
- continue;
- containers->push_back(window);
- }
- }
- if (container_mask & LOCK_SCREEN_BACKGROUND) {
- containers->push_back(Shell::GetContainer(
- root_window,
- internal::kShellWindowId_LockScreenBackgroundContainer));
- }
- if (container_mask & LOCK_SCREEN_CONTAINERS) {
- containers->push_back(Shell::GetContainer(
- root_window,
- internal::kShellWindowId_LockScreenContainersContainer));
- }
- if (container_mask & LOCK_SCREEN_RELATED_CONTAINERS) {
- containers->push_back(Shell::GetContainer(
- root_window,
- internal::kShellWindowId_LockScreenRelatedContainersContainer));
- }
-}
-
-void SessionStateAnimator::StartAnimation(int container_mask,
- AnimationType type,
- AnimationSpeed speed) {
- aura::Window::Windows containers;
- GetContainers(container_mask, &containers);
- for (aura::Window::Windows::const_iterator it = containers.begin();
- it != containers.end(); ++it) {
- RunAnimationForWindow(*it, type, speed, NULL);
- }
-}
-
-void SessionStateAnimator::StartAnimationWithCallback(
- int container_mask,
- AnimationType type,
- AnimationSpeed speed,
- base::Callback<void(void)>& callback) {
- aura::Window::Windows containers;
- GetContainers(container_mask, &containers);
- for (aura::Window::Windows::const_iterator it = containers.begin();
- it != containers.end(); ++it) {
- ui::LayerAnimationObserver* observer =
- new CallbackAnimationObserver(callback);
- RunAnimationForWindow(*it, type, speed, observer);
- }
-}
-
-void SessionStateAnimator::StartAnimationWithObserver(
- int container_mask,
- AnimationType type,
- AnimationSpeed speed,
- ui::LayerAnimationObserver* observer) {
- aura::Window::Windows containers;
- GetContainers(container_mask, &containers);
- for (aura::Window::Windows::const_iterator it = containers.begin();
- it != containers.end(); ++it) {
- RunAnimationForWindow(*it, type, speed, observer);
- }
-}
-
-void SessionStateAnimator::StartGlobalAnimation(AnimationType type,
- AnimationSpeed speed) {
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- RunAnimationForWindow(root_window, type, speed, NULL);
-}
-
-void SessionStateAnimator::RunAnimationForWindow(
- aura::Window* window,
- AnimationType type,
- AnimationSpeed speed,
- ui::LayerAnimationObserver* observer) {
- base::TimeDelta duration = GetDuration(speed);
-
- switch (type) {
- case ANIMATION_PARTIAL_CLOSE:
- StartSlowCloseAnimationForWindow(window, duration, observer);
- break;
- case ANIMATION_UNDO_PARTIAL_CLOSE:
- StartUndoSlowCloseAnimationForWindow(window, duration, observer);
- break;
- case ANIMATION_FULL_CLOSE:
- StartFastCloseAnimationForWindow(window, duration, observer);
- break;
- case ANIMATION_FADE_IN:
- StartOpacityAnimationForWindow(window, 1.0, duration, observer);
- break;
- case ANIMATION_FADE_OUT:
- StartOpacityAnimationForWindow(window, 0.0, duration, observer);
- break;
- case ANIMATION_HIDE_IMMEDIATELY:
- DCHECK_EQ(speed, ANIMATION_SPEED_IMMEDIATE);
- HideWindowImmediately(window, observer);
- break;
- case ANIMATION_RESTORE:
- DCHECK_EQ(speed, ANIMATION_SPEED_IMMEDIATE);
- RestoreWindow(window, observer);
- break;
- case ANIMATION_LIFT:
- HideWindow(window, duration, true, observer);
- break;
- case ANIMATION_DROP:
- ShowWindow(window, duration, true, observer);
- break;
- case ANIMATION_UNDO_LIFT:
- TransformWindowToBaseState(window, duration, observer);
- break;
- case ANIMATION_RAISE_TO_SCREEN:
- ShowWindow(window, duration, false, observer);
- break;
- case ANIMATION_LOWER_BELOW_SCREEN:
- HideWindow(window, duration, false, observer);
- break;
- case ANIMATION_PARTIAL_FADE_IN:
- StartPartialFadeAnimation(
- window, kPartialFadeRatio, duration, observer);
- break;
- case ANIMATION_UNDO_PARTIAL_FADE_IN:
- StartPartialFadeAnimation(window, 0.0, duration, observer);
- break;
- case ANIMATION_FULL_FADE_IN:
- StartPartialFadeAnimation(window, 1.0, duration, observer);
- break;
- case ANIMATION_GRAYSCALE_BRIGHTNESS:
- StartGrayscaleBrightnessAnimationForWindow(
- window, 1.0, duration, gfx::Tween::EASE_IN, observer);
- break;
- case ANIMATION_UNDO_GRAYSCALE_BRIGHTNESS:
- StartGrayscaleBrightnessAnimationForWindow(
- window, 0.0, duration, gfx::Tween::EASE_IN_OUT, observer);
- break;
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/session_state_animator.h b/chromium/ash/wm/session_state_animator.h
deleted file mode 100644
index 4cb183e3cea..00000000000
--- a/chromium/ash/wm/session_state_animator.h
+++ /dev/null
@@ -1,180 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_SESSION_STATE_ANIMATOR_H_
-#define ASH_WM_SESSION_STATE_ANIMATOR_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/timer/timer.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer_animation_observer.h"
-
-namespace gfx {
-class Rect;
-class Size;
-}
-
-namespace ui {
-class Layer;
-}
-
-namespace ash {
-namespace internal {
-
-// Displays onscreen animations for session state changes (lock/unlock, sign
-// out, shut down).
-class ASH_EXPORT SessionStateAnimator {
- public:
- // Animations that can be applied to groups of containers.
- enum AnimationType {
- ANIMATION_PARTIAL_CLOSE = 0,
- ANIMATION_UNDO_PARTIAL_CLOSE,
- ANIMATION_FULL_CLOSE,
- ANIMATION_FADE_IN,
- ANIMATION_FADE_OUT,
- ANIMATION_HIDE_IMMEDIATELY,
- ANIMATION_RESTORE,
- // Animations that raise/lower windows to/from area "in front" of the
- // screen.
- ANIMATION_LIFT,
- ANIMATION_UNDO_LIFT,
- ANIMATION_DROP,
- // Animations that raise/lower windows from/to area "behind" of the screen.
- ANIMATION_RAISE_TO_SCREEN,
- ANIMATION_LOWER_BELOW_SCREEN,
- ANIMATION_PARTIAL_FADE_IN,
- ANIMATION_UNDO_PARTIAL_FADE_IN,
- ANIMATION_FULL_FADE_IN,
- ANIMATION_GRAYSCALE_BRIGHTNESS,
- ANIMATION_UNDO_GRAYSCALE_BRIGHTNESS,
- };
-
- // Constants for determining animation speed.
- enum AnimationSpeed {
- // Immediately change state.
- ANIMATION_SPEED_IMMEDIATE = 0,
- // Speed for animations associated with user action that can be undone.
- // Used for pre-lock and pre-shutdown animations.
- ANIMATION_SPEED_UNDOABLE,
- // Speed for animation that reverts undoable action. Used for aborting
- // pre-lock and pre-shutdown animations.
- ANIMATION_SPEED_REVERT,
- // Speed for user action that can not be undone, Used for lock and shutdown
- // animations requested via menus/shortcuts and for animating remaining
- // parts of partial lock/shutdown animations.
- ANIMATION_SPEED_FAST,
- // Speed for lock screen appearance in "old" animation set.
- ANIMATION_SPEED_SHOW_LOCK_SCREEN,
- // Speed for workspace-like animations in "new" animation set.
- ANIMATION_SPEED_MOVE_WINDOWS,
- // Speed for undoing workspace-like animations in "new" animation set.
- ANIMATION_SPEED_UNDO_MOVE_WINDOWS,
- // Speed for shutdown in "new" animation set.
- ANIMATION_SPEED_SHUTDOWN,
- // Speed for reverting shutdown in "new" animation set.
- ANIMATION_SPEED_REVERT_SHUTDOWN,
- };
-
- // Specific containers or groups of containers that can be animated.
- enum Container {
- DESKTOP_BACKGROUND = 1 << 0,
- LAUNCHER = 1 << 1,
-
- // All user session related containers including system background but
- // not including desktop background (wallpaper).
- NON_LOCK_SCREEN_CONTAINERS = 1 << 2,
-
- // Desktop wallpaper is moved to this layer when screen is locked.
- // This layer is excluded from lock animation so that wallpaper stays as is,
- // user session windows are hidden and lock UI is shown on top of it.
- // This layer is included in shutdown animation.
- LOCK_SCREEN_BACKGROUND = 1 << 3,
-
- // Lock screen and lock screen modal containers.
- LOCK_SCREEN_CONTAINERS = 1 << 4,
-
- // Multiple system layers belong here like status, menu, tooltip
- // and overlay layers.
- LOCK_SCREEN_RELATED_CONTAINERS = 1 << 5,
- };
-
- // Helper class used by tests to access internal state.
- class ASH_EXPORT TestApi {
- public:
- explicit TestApi(SessionStateAnimator* animator)
- : animator_(animator) {}
-
- // Returns true if containers of a given |container_mask|
- // were last animated with |type| (probably; the analysis is fairly ad-hoc).
- // |container_mask| is a bitfield of a Container.
- bool ContainersAreAnimated(int container_mask, AnimationType type) const;
-
- // Returns true if root window was last animated with |type| (probably;
- // the analysis is fairly ad-hoc).
- bool RootWindowIsAnimated(AnimationType type) const;
-
- private:
- SessionStateAnimator* animator_; // not owned
-
- DISALLOW_COPY_AND_ASSIGN(TestApi);
- };
-
- // A bitfield mask including LOCK_SCREEN_WALLPAPER,
- // LOCK_SCREEN_CONTAINERS, and LOCK_SCREEN_RELATED_CONTAINERS.
- const static int kAllLockScreenContainersMask;
-
- // A bitfield mask of all containers.
- const static int kAllContainersMask;
-
- SessionStateAnimator();
- virtual ~SessionStateAnimator();
-
- // Reports animation duration for |speed|.
- static base::TimeDelta GetDuration(AnimationSpeed speed);
-
- // Fills |containers| with the containers included in |container_mask|.
- static void GetContainers(int container_mask,
- aura::Window::Windows* containers);
-
- // Apply animation |type| to all containers included in |container_mask| with
- // specified |speed|.
- void StartAnimation(int container_mask,
- AnimationType type,
- AnimationSpeed speed);
-
- // Apply animation |type| to all containers included in |container_mask| with
- // specified |speed| and call a |callback| at the end of the animation, if it
- // is not null.
- void StartAnimationWithCallback(int container_mask,
- AnimationType type,
- AnimationSpeed speed,
- base::Callback<void(void)>& callback);
-
-// Apply animation |type| to all containers included in |container_mask| with
-// specified |speed| and add |observer| to all animations.
- void StartAnimationWithObserver(int container_mask,
- AnimationType type,
- AnimationSpeed speed,
- ui::LayerAnimationObserver* observer);
-
- // Applies animation |type| whith specified |speed| to the root container.
- void StartGlobalAnimation(AnimationType type,
- AnimationSpeed speed);
-
- // Apply animation |type| to window |window| with |speed| and add |observer|
- // if it is not NULL to the last animation sequence.
- void RunAnimationForWindow(aura::Window* window,
- AnimationType type,
- AnimationSpeed speed,
- ui::LayerAnimationObserver* observer);
-
- DISALLOW_COPY_AND_ASSIGN(SessionStateAnimator);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_SESSION_STATE_ANIMATOR_H_
diff --git a/chromium/ash/wm/solo_window_tracker.cc b/chromium/ash/wm/solo_window_tracker.cc
deleted file mode 100644
index 633d3bd450e..00000000000
--- a/chromium/ash/wm/solo_window_tracker.cc
+++ /dev/null
@@ -1,210 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/solo_window_tracker.h"
-
-#include <algorithm>
-
-#include "ash/ash_constants.h"
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_state_observer.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-
-namespace ash {
-
-namespace {
-
-// A flag to enable/disable the solo window header across all root windows.
-bool g_solo_header_enabled = true;
-
-// Returns the containers from which a solo window is chosen.
-std::vector<aura::Window*> GetContainers(aura::RootWindow* root_window) {
- int kContainerIds[] = {
- internal::kShellWindowId_DefaultContainer,
- internal::kShellWindowId_AlwaysOnTopContainer,
- // Docked windows never use the solo header, but regular windows move to the
- // docked container when dragged.
- internal::kShellWindowId_DockedContainer,
- };
- std::vector<aura::Window*> containers;
- for (size_t i = 0; i < arraysize(kContainerIds); ++i) {
- containers.push_back(
- Shell::GetContainer(root_window->window(), kContainerIds[i]));
- }
- return containers;
-}
-
-// Returns true if |child| and all of its ancestors are visible and neither
-// |child| nor any its ancestors is animating hidden.
-bool GetTargetVisibility(aura::Window* child) {
- for (aura::Window* window = child; window; window = window->parent()) {
- if (!window->TargetVisibility())
- return false;
- }
- return true;
-}
-
-// Returns true if |window| can use the solo window header. Returns false for
-// windows that are:
-// * Not drawn (for example, DragDropTracker uses one for mouse capture)
-// * Modal alerts (it looks odd for headers to change when an alert opens)
-// * Constrained windows (ditto)
-bool IsValidCandidate(aura::Window* window) {
- return window->type() == aura::client::WINDOW_TYPE_NORMAL &&
- window->layer() &&
- window->layer()->type() != ui::LAYER_NOT_DRAWN &&
- window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_NONE &&
- !window->GetProperty(aura::client::kConstrainedWindowKey);
-}
-
-// Schedule's a paint of the window's entire bounds.
-void SchedulePaint(aura::Window* window) {
- window->SchedulePaintInRect(gfx::Rect(window->bounds().size()));
-}
-
-} // namespace
-
-
-// Class which triggers a repaint of the window which is passed to the
-// constructor whenever the window's show type changes. The window's non client
-// view is responsible for updating whether it uses the solo header as part of
-// the repaint by querying GetWindowWithSoloHeader().
-class SoloWindowTracker::SoloWindowObserver
- : public ash::wm::WindowStateObserver {
- public:
- explicit SoloWindowObserver(aura::Window* window) : window_(window) {
- wm::GetWindowState(window_)->AddObserver(this);
- }
-
- virtual ~SoloWindowObserver() {
- wm::GetWindowState(window_)->RemoveObserver(this);
- }
-
- private:
- // ash::wm::WindowStateObserver override.
- virtual void OnWindowShowTypeChanged(
- ash::wm::WindowState* window_state,
- ash::wm::WindowShowType old_type) OVERRIDE {
- SchedulePaint(window_);
- }
-
- aura::Window* window_;
-
- DISALLOW_COPY_AND_ASSIGN(SoloWindowObserver);
-};
-
-SoloWindowTracker::SoloWindowTracker(aura::RootWindow* root_window)
- : containers_(GetContainers(root_window)),
- solo_window_(NULL) {
- for (size_t i = 0; i < containers_.size(); ++i)
- containers_[i]->AddObserver(this);
-}
-
-SoloWindowTracker::~SoloWindowTracker() {
- for (size_t i = 0; i < containers_.size(); ++i)
- containers_[i]->RemoveObserver(this);
-}
-
-// static
-void SoloWindowTracker::SetSoloHeaderEnabled(bool enabled) {
- g_solo_header_enabled = enabled;
- std::vector<aura::Window*> root_windows =
- Shell::GetInstance()->GetAllRootWindows();
- for (size_t i = 0; i < root_windows.size(); ++i) {
- SoloWindowTracker* tracker =
- internal::GetRootWindowController(root_windows[i])->
- solo_window_tracker();
- if (tracker)
- tracker->UpdateSoloWindow(NULL);
- }
-}
-
-aura::Window* SoloWindowTracker::GetWindowWithSoloHeader() {
- bool use_solo_header = solo_window_ &&
- !wm::GetWindowState(solo_window_)->IsMaximizedOrFullscreen();
- return use_solo_header ? solo_window_ : NULL;
-}
-
-void SoloWindowTracker::UpdateSoloWindow(aura::Window* ignore_window) {
- std::vector<aura::Window*> candidates;
- // Avoid memory allocations for typical window counts.
- candidates.reserve(16);
- for (size_t i = 0; i < containers_.size(); ++i) {
- candidates.insert(candidates.end(),
- containers_[i]->children().begin(),
- containers_[i]->children().end());
- }
-
- aura::Window* old_solo_window = solo_window_;
- solo_window_ = NULL;
- if (g_solo_header_enabled && !AnyVisibleWindowDocked()) {
- for (size_t i = 0; i < candidates.size(); ++i) {
- aura::Window* candidate = candidates[i];
- // Various sorts of windows "don't count" for this computation.
- if (candidate == ignore_window ||
- !IsValidCandidate(candidate) ||
- !GetTargetVisibility(candidate)) {
- continue;
- }
-
- if (solo_window_) {
- // A window can only use the solo header if it is the only visible valid
- // candidate (and there are no visible docked windows).
- solo_window_ = NULL;
- break;
- } else {
- solo_window_ = candidate;
- }
- }
- }
-
- if (solo_window_ == old_solo_window)
- return;
-
- solo_window_observer_.reset(solo_window_ ?
- new SoloWindowObserver(solo_window_) : NULL);
- if (old_solo_window)
- SchedulePaint(old_solo_window);
- if (solo_window_)
- SchedulePaint(solo_window_);
-}
-
-bool SoloWindowTracker::AnyVisibleWindowDocked() const {
- // For the purpose of SoloWindowTracker, there is a visible docked window if
- // it causes the dock to have non-empty bounds. This is intentionally
- // different from:
- // DockedWindowLayoutManager::IsAnyWindowDocked() and
- // DockedWindowLayoutManager::is_dragged_window_docked().
- return !dock_bounds_.IsEmpty();
-}
-
-void SoloWindowTracker::OnWindowAdded(aura::Window* new_window) {
- UpdateSoloWindow(NULL);
-}
-
-void SoloWindowTracker::OnWillRemoveWindow(aura::Window* window) {
- UpdateSoloWindow(window);
-}
-
-void SoloWindowTracker::OnWindowVisibilityChanged(aura::Window* window,
- bool visible) {
- // |window| may be a grandchild of |containers_|.
- std::vector<aura::Window*>::const_iterator it = std::find(
- containers_.begin(), containers_.end(), window->parent());
- if (it != containers_.end())
- UpdateSoloWindow(NULL);
-}
-
-void SoloWindowTracker::OnDockBoundsChanging(const gfx::Rect& new_bounds,
- Reason reason) {
- dock_bounds_ = new_bounds;
- UpdateSoloWindow(NULL);
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/solo_window_tracker.h b/chromium/ash/wm/solo_window_tracker.h
deleted file mode 100644
index 829af01b402..00000000000
--- a/chromium/ash/wm/solo_window_tracker.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_SOLO_WINDOW_TRACKER_H_
-#define ASH_WM_SOLO_WINDOW_TRACKER_H_
-
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "ash/wm/dock/docked_window_layout_manager_observer.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/window_observer.h"
-#include "ui/gfx/rect.h"
-
-namespace aura {
-class RootWindow;
-class Window;
-}
-
-namespace ash {
-
-// Class which keeps track of the window (if any) which should use the solo
-// window header. The solo window header is very transparent and is used when
-// there is only one visible window and the window is not maximized or
-// fullscreen. The solo window header is not used for either panels or docked
-// windows.
-class ASH_EXPORT SoloWindowTracker
- : public aura::WindowObserver,
- public internal::DockedWindowLayoutManagerObserver {
- public:
- explicit SoloWindowTracker(aura::RootWindow* root_window);
- virtual ~SoloWindowTracker();
-
- // Enable/Disable solo headers.
- static void SetSoloHeaderEnabled(bool enabled);
-
- // Returns the window, if any, which should use the solo window header.
- aura::Window* GetWindowWithSoloHeader();
-
- private:
- // Updates the window which would use the solo header if the window were not
- // maximized or fullscreen. If |ignore_window| is not NULL, it is ignored for
- // counting valid candidates. This is useful when there is a window which is
- // about to be moved to a different root window or about to be closed.
- void UpdateSoloWindow(aura::Window* ignore_window);
-
- // Returns true if there is a visible docked window.
- bool AnyVisibleWindowDocked() const;
-
- // aura::WindowObserver overrides:
- virtual void OnWindowAdded(aura::Window* new_window) OVERRIDE;
- virtual void OnWillRemoveWindow(aura::Window* window) OVERRIDE;
- virtual void OnWindowVisibilityChanged(aura::Window* window,
- bool visible) OVERRIDE;
-
- // ash::internal::DockedWindowLayoutManagerObserver override:
- virtual void OnDockBoundsChanging(const gfx::Rect& new_bounds,
- Reason reason) OVERRIDE;
-
- // The containers whose children can use the solo header.
- std::vector<aura::Window*> containers_;
-
- // The dock's bounds.
- gfx::Rect dock_bounds_;
-
- // The window which would use the solo header if it were not maximized or
- // fullscreen.
- aura::Window* solo_window_;
-
- // Class which observes changes in |solo_window_|'s show type.
- class SoloWindowObserver;
- scoped_ptr<SoloWindowObserver> solo_window_observer_;
-
- DISALLOW_COPY_AND_ASSIGN(SoloWindowTracker);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_SOLO_WINDOW_TRACKER_H_
diff --git a/chromium/ash/wm/solo_window_tracker_unittest.cc b/chromium/ash/wm/solo_window_tracker_unittest.cc
deleted file mode 100644
index 431ae009556..00000000000
--- a/chromium/ash/wm/solo_window_tracker_unittest.cc
+++ /dev/null
@@ -1,429 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/solo_window_tracker.h"
-
-#include "ash/ash_constants.h"
-#include "ash/ash_switches.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/window_resizer.h"
-#include "ash/wm/window_state.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_observer.h"
-#include "ui/base/hit_test.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-
-namespace {
-
-class WindowRepaintChecker : public aura::WindowObserver {
- public:
- explicit WindowRepaintChecker(aura::Window* window)
- : window_(window),
- is_paint_scheduled_(false) {
- window_->AddObserver(this);
- }
-
- virtual ~WindowRepaintChecker() {
- if (window_)
- window_->RemoveObserver(this);
- }
-
- bool IsPaintScheduledAndReset() {
- bool result = is_paint_scheduled_;
- is_paint_scheduled_ = false;
- return result;
- }
-
- private:
- // aura::WindowObserver overrides:
- virtual void OnWindowPaintScheduled(aura::Window* window,
- const gfx::Rect& region) OVERRIDE {
- is_paint_scheduled_ = true;
- }
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE {
- DCHECK_EQ(window_, window);
- window_ = NULL;
- }
-
- aura::Window* window_;
- bool is_paint_scheduled_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowRepaintChecker);
-};
-
-} // namespace
-
-class SoloWindowTrackerTest : public test::AshTestBase {
- public:
- SoloWindowTrackerTest() {
- }
- virtual ~SoloWindowTrackerTest() {
- }
-
- // Helpers methods to create test windows in the primary root window.
- aura::Window* CreateWindowInPrimary() {
- aura::Window* window = new aura::Window(NULL);
- window->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window->Init(ui::LAYER_TEXTURED);
- window->SetBounds(gfx::Rect(100, 100));
- ParentWindowInPrimaryRootWindow(window);
- return window;
- }
- aura::Window* CreateAlwaysOnTopWindowInPrimary() {
- aura::Window* window = new aura::Window(NULL);
- window->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window->Init(ui::LAYER_TEXTURED);
- window->SetBounds(gfx::Rect(100, 100));
- window->SetProperty(aura::client::kAlwaysOnTopKey, true);
- ParentWindowInPrimaryRootWindow(window);
- return window;
- }
- aura::Window* CreatePanelWindowInPrimary() {
- aura::Window* window = new aura::Window(NULL);
- window->SetType(aura::client::WINDOW_TYPE_PANEL);
- window->Init(ui::LAYER_TEXTURED);
- window->SetBounds(gfx::Rect(100, 100));
- ParentWindowInPrimaryRootWindow(window);
- return window;
- }
-
- // Drag |window| to the dock.
- void DockWindow(aura::Window* window) {
- // Because the tests use windows without delegates,
- // aura::test::EventGenerator cannot be used.
- gfx::Point drag_to =
- ash::ScreenAsh::GetDisplayBoundsInParent(window).top_right();
- scoped_ptr<WindowResizer> resizer(CreateWindowResizer(
- window,
- window->bounds().origin(),
- HTCAPTION,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE));
- resizer->Drag(drag_to, 0);
- resizer->CompleteDrag(0);
- EXPECT_EQ(internal::kShellWindowId_DockedContainer,
- window->parent()->id());
- }
-
- // Drag |window| out of the dock.
- void UndockWindow(aura::Window* window) {
- gfx::Point drag_to =
- ash::ScreenAsh::GetDisplayWorkAreaBoundsInParent(window).top_right() -
- gfx::Vector2d(10, 0);
- scoped_ptr<WindowResizer> resizer(CreateWindowResizer(
- window,
- window->bounds().origin(),
- HTCAPTION,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE));
- resizer->Drag(drag_to, 0);
- resizer->CompleteDrag(0);
- EXPECT_NE(internal::kShellWindowId_DockedContainer,
- window->parent()->id());
- }
-
- // Returns the primary display.
- gfx::Display GetPrimaryDisplay() {
- return ash::Shell::GetInstance()->GetScreen()->GetPrimaryDisplay();
- }
-
- // Returns the secondary display.
- gfx::Display GetSecondaryDisplay() {
- return ScreenAsh::GetSecondaryDisplay();
- }
-
- // Returns the window which uses the solo header, if any, on the primary
- // display.
- aura::Window* GetWindowWithSoloHeaderInPrimary() {
- return GetWindowWithSoloHeader(Shell::GetPrimaryRootWindow());
- }
-
- // Returns the window which uses the solo header, if any, in |root|.
- aura::Window* GetWindowWithSoloHeader(aura::Window* root) {
- SoloWindowTracker* solo_window_tracker =
- internal::GetRootWindowController(root)->solo_window_tracker();
- return solo_window_tracker ?
- solo_window_tracker->GetWindowWithSoloHeader() : NULL;
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SoloWindowTrackerTest);
-};
-
-TEST_F(SoloWindowTrackerTest, Basic) {
- scoped_ptr<aura::Window> w1(CreateWindowInPrimary());
- w1->Show();
-
- // We only have one window, so it should use a solo header.
- EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary());
-
- // Create a second window.
- scoped_ptr<aura::Window> w2(CreateWindowInPrimary());
- w2->Show();
-
- // Now there are two windows, so we should not use solo headers.
- EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary());
-
- // Hide one window. Solo should be enabled.
- w2->Hide();
- EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary());
-
- // Show that window. Solo should be disabled.
- w2->Show();
- EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary());
-
- // Minimize the first window. Solo should be enabled.
- wm::GetWindowState(w1.get())->Minimize();
- EXPECT_EQ(w2.get(), GetWindowWithSoloHeaderInPrimary());
-
- // Close the minimized window.
- w1.reset();
- EXPECT_EQ(w2.get(), GetWindowWithSoloHeaderInPrimary());
-
- // Open an always-on-top window (which lives in a different container).
- scoped_ptr<aura::Window> w3(CreateAlwaysOnTopWindowInPrimary());
- w3->Show();
- EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary());
-
- // Close the always-on-top window.
- w3.reset();
- EXPECT_EQ(w2.get(), GetWindowWithSoloHeaderInPrimary());
-}
-
-// Test that docked windows never use the solo header and that the presence of a
-// docked window prevents all other windows from the using the solo window
-// header.
-TEST_F(SoloWindowTrackerTest, DockedWindow) {
- if (!switches::UseDockedWindows() || !SupportsHostWindowResize())
- return;
-
- scoped_ptr<aura::Window> w1(CreateWindowInPrimary());
- w1->Show();
- EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary());
-
- DockWindow(w1.get());
- EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary());
-
- UndockWindow(w1.get());
- EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary());
-
- scoped_ptr<aura::Window> w2(CreateWindowInPrimary());
- w2->Show();
- EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary());
-
- DockWindow(w2.get());
- EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary());
-
- wm::GetWindowState(w2.get())->Minimize();
- EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary());
-}
-
-// Panels should not "count" for computing solo window headers, and the panel
-// itself should never use the solo header.
-TEST_F(SoloWindowTrackerTest, Panel) {
- scoped_ptr<aura::Window> w1(CreateWindowInPrimary());
- w1->Show();
-
- // We only have one window, so it should use a solo header.
- EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary());
-
- // Create a panel window.
- scoped_ptr<aura::Window> w2(CreatePanelWindowInPrimary());
- w2->Show();
-
- // Despite two windows, the first window should still be considered "solo"
- // because panels aren't included in the computation.
- EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary());
-
- // Even after closing the first window, the panel is still not considered
- // solo.
- w1.reset();
- EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary());
-}
-
-// Modal dialogs should not use solo headers.
-TEST_F(SoloWindowTrackerTest, Modal) {
- scoped_ptr<aura::Window> w1(CreateWindowInPrimary());
- w1->Show();
-
- // We only have one window, so it should use a solo header.
- EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary());
-
- // Create a fake modal window.
- scoped_ptr<aura::Window> w2(CreateWindowInPrimary());
- w2->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
- w2->Show();
-
- // Despite two windows, the first window should still be considered "solo"
- // because modal windows aren't included in the computation.
- EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary());
-}
-
-// Constrained windows should not use solo headers.
-TEST_F(SoloWindowTrackerTest, Constrained) {
- scoped_ptr<aura::Window> w1(CreateWindowInPrimary());
- w1->Show();
-
- // We only have one window, so it should use a solo header.
- EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary());
-
- // Create a fake constrained window.
- scoped_ptr<aura::Window> w2(CreateWindowInPrimary());
- w2->SetProperty(aura::client::kConstrainedWindowKey, true);
- w2->Show();
-
- // Despite two windows, the first window should still be considered "solo"
- // because constrained windows aren't included in the computation.
- EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary());
-}
-
-// Non-drawing windows should not affect the solo computation.
-TEST_F(SoloWindowTrackerTest, NotDrawn) {
- aura::Window* w = CreateWindowInPrimary();
- w->Show();
-
- // We only have one window, so it should use a solo header.
- EXPECT_EQ(w, GetWindowWithSoloHeaderInPrimary());
-
- // Create non-drawing window similar to DragDropTracker.
- aura::Window* not_drawn = new aura::Window(NULL);
- not_drawn->SetType(aura::client::WINDOW_TYPE_NORMAL);
- not_drawn->Init(ui::LAYER_NOT_DRAWN);
- ParentWindowInPrimaryRootWindow(not_drawn);
- not_drawn->Show();
-
- // Despite two windows, the first window should still be considered "solo"
- // because non-drawing windows aren't included in the computation.
- EXPECT_EQ(w, GetWindowWithSoloHeaderInPrimary());
-}
-
-TEST_F(SoloWindowTrackerTest, MultiDisplay) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("1000x600,600x400");
-
- scoped_ptr<aura::Window> w1(CreateWindowInPrimary());
- w1->SetBoundsInScreen(gfx::Rect(0, 0, 100, 100), GetPrimaryDisplay());
- w1->Show();
- WindowRepaintChecker checker1(w1.get());
- scoped_ptr<aura::Window> w2(CreateWindowInPrimary());
- w2->SetBoundsInScreen(gfx::Rect(0, 0, 100, 100), GetPrimaryDisplay());
- w2->Show();
- WindowRepaintChecker checker2(w2.get());
-
- // Now there are two windows in the same display, so we should not use solo
- // headers.
- EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary());
- EXPECT_TRUE(checker1.IsPaintScheduledAndReset());
-
- // Moves the second window to the secondary display. Both w1/w2 should be
- // solo.
- w2->SetBoundsInScreen(gfx::Rect(1200, 0, 100, 100),
- ScreenAsh::GetSecondaryDisplay());
- EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary());
- EXPECT_EQ(w2.get(), GetWindowWithSoloHeader(w2->GetRootWindow()));
- EXPECT_TRUE(checker1.IsPaintScheduledAndReset());
- EXPECT_TRUE(checker2.IsPaintScheduledAndReset());
-
- // Open two more windows in the primary display.
- scoped_ptr<aura::Window> w3(CreateWindowInPrimary());
- w3->SetBoundsInScreen(gfx::Rect(0, 0, 100, 100), GetPrimaryDisplay());
- w3->Show();
- scoped_ptr<aura::Window> w4(CreateWindowInPrimary());
- w4->SetBoundsInScreen(gfx::Rect(0, 0, 100, 100), GetPrimaryDisplay());
- w4->Show();
-
- // Because the primary display has three windows w1, w3, and w4, they
- // shouldn't be solo. w2 should be solo.
- EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary());
- EXPECT_EQ(w2.get(), GetWindowWithSoloHeader(w2->GetRootWindow()));
- EXPECT_TRUE(checker1.IsPaintScheduledAndReset());
-
- // Move w4 to the secondary display. Now w2 shouldn't be solo anymore.
- w4->SetBoundsInScreen(gfx::Rect(1200, 0, 100, 100), GetSecondaryDisplay());
- EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary());
- EXPECT_EQ(NULL, GetWindowWithSoloHeader(w2->GetRootWindow()));
- EXPECT_TRUE(checker2.IsPaintScheduledAndReset());
-
- // Moves w3 to the secondary display too. Now w1 should be solo again.
- w3->SetBoundsInScreen(gfx::Rect(1200, 0, 100, 100), GetSecondaryDisplay());
- EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary());
- EXPECT_EQ(NULL, GetWindowWithSoloHeader(w2->GetRootWindow()));
- EXPECT_TRUE(checker1.IsPaintScheduledAndReset());
-
- // Change w3's state to maximize. Doesn't affect w1.
- wm::GetWindowState(w3.get())->Maximize();
- EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary());
- EXPECT_EQ(NULL, GetWindowWithSoloHeader(w2->GetRootWindow()));
-
- // Close w3 and w4.
- w3.reset();
- w4.reset();
- EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary());
- EXPECT_EQ(w2.get(), GetWindowWithSoloHeader(w2->GetRootWindow()));
- EXPECT_TRUE(checker2.IsPaintScheduledAndReset());
-
- // Move w2 back to the primary display.
- w2->SetBoundsInScreen(gfx::Rect(0, 0, 100, 100), GetPrimaryDisplay());
- EXPECT_EQ(w1->GetRootWindow(), w2->GetRootWindow());
- EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary());
- EXPECT_TRUE(checker1.IsPaintScheduledAndReset());
- EXPECT_TRUE(checker2.IsPaintScheduledAndReset());
-
- // Close w2.
- w2.reset();
- EXPECT_EQ(w1.get(), GetWindowWithSoloHeaderInPrimary());
- EXPECT_TRUE(checker1.IsPaintScheduledAndReset());
-}
-
-TEST_F(SoloWindowTrackerTest, ChildWindowVisibility) {
- aura::Window* w = CreateWindowInPrimary();
- w->Show();
-
- // We only have one window, so it should use a solo header.
- EXPECT_EQ(w, GetWindowWithSoloHeaderInPrimary());
-
- // Create a child window. This should not affect the solo-ness of |w1|.
- aura::Window* child = new aura::Window(NULL);
- child->SetType(aura::client::WINDOW_TYPE_CONTROL);
- child->Init(ui::LAYER_TEXTURED);
- child->SetBounds(gfx::Rect(100, 100));
- w->AddChild(child);
- child->Show();
- EXPECT_EQ(w, GetWindowWithSoloHeaderInPrimary());
-
- // Changing the visibility of |child| should not affect the solo-ness of |w1|.
- child->Hide();
- EXPECT_EQ(w, GetWindowWithSoloHeaderInPrimary());
-}
-
-TEST_F(SoloWindowTrackerTest, CreateAndDeleteSingleWindow) {
- // Ensure that creating/deleting a window works well and doesn't cause
- // crashes. See crbug.com/155634
- scoped_ptr<aura::Window> w(CreateWindowInPrimary());
- w->Show();
-
- // We only have one window, so it should use a solo header.
- EXPECT_EQ(w.get(), GetWindowWithSoloHeaderInPrimary());
-
- // Close the window.
- w.reset();
- EXPECT_EQ(NULL, GetWindowWithSoloHeaderInPrimary());
-
- // Recreate another window again.
- w.reset(CreateWindowInPrimary());
- w->Show();
- EXPECT_EQ(w.get(), GetWindowWithSoloHeaderInPrimary());
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/stacking_controller.cc b/chromium/ash/wm/stacking_controller.cc
deleted file mode 100644
index 915eed41d43..00000000000
--- a/chromium/ash/wm/stacking_controller.cc
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/stacking_controller.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/always_on_top_controller.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ash/wm/window_state.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/base/ui_base_types.h"
-
-namespace ash {
-namespace {
-
-// Find a root window that matches the |bounds|. If the virtual screen
-// coordinates is enabled and the bounds is specified, the root window
-// that matches the window's bound will be used. Otherwise, it'll
-// return the active root window.
-aura::Window* FindContainerRoot(const gfx::Rect& bounds) {
- if (bounds.x() == 0 && bounds.y() == 0 && bounds.IsEmpty())
- return Shell::GetTargetRootWindow();
- return wm::GetRootWindowMatching(bounds);
-}
-
-aura::Window* GetContainerById(aura::Window* root, int id) {
- return Shell::GetContainer(root, id);
-}
-
-bool IsSystemModal(aura::Window* window) {
- return window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_SYSTEM;
-}
-
-bool HasTransientParentWindow(aura::Window* window) {
- return window->transient_parent() &&
- window->transient_parent()->type() != aura::client::WINDOW_TYPE_UNKNOWN;
-}
-
-internal::AlwaysOnTopController*
-GetAlwaysOnTopController(aura::Window* root_window) {
- return internal::GetRootWindowController(root_window)->
- always_on_top_controller();
-}
-
-} // namespace
-
-////////////////////////////////////////////////////////////////////////////////
-// StackingController, public:
-
-StackingController::StackingController() {
-}
-
-StackingController::~StackingController() {
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// StackingController, aura::client::WindowTreeClient implementation:
-
-aura::Window* StackingController::GetDefaultParent(aura::Window* context,
- aura::Window* window,
- const gfx::Rect& bounds) {
- aura::Window* target_root = NULL;
- if (window->transient_parent()) {
- // Transient window should use the same root as its transient parent.
- target_root = window->transient_parent()->GetRootWindow();
- } else {
- target_root = FindContainerRoot(bounds);
- }
-
- switch (window->type()) {
- case aura::client::WINDOW_TYPE_NORMAL:
- case aura::client::WINDOW_TYPE_POPUP:
- if (IsSystemModal(window))
- return GetSystemModalContainer(target_root, window);
- else if (HasTransientParentWindow(window))
- return internal::RootWindowController::GetContainerForWindow(
- window->transient_parent());
- return GetAlwaysOnTopController(target_root)->GetContainer(window);
- case aura::client::WINDOW_TYPE_CONTROL:
- return GetContainerById(
- target_root, internal::kShellWindowId_UnparentedControlContainer);
- case aura::client::WINDOW_TYPE_PANEL:
- if (wm::GetWindowState(window)->panel_attached())
- return GetContainerById(target_root,
- internal::kShellWindowId_PanelContainer);
- else
- return GetAlwaysOnTopController(target_root)->GetContainer(window);
- case aura::client::WINDOW_TYPE_MENU:
- return GetContainerById(
- target_root, internal::kShellWindowId_MenuContainer);
- case aura::client::WINDOW_TYPE_TOOLTIP:
- return GetContainerById(
- target_root, internal::kShellWindowId_DragImageAndTooltipContainer);
- default:
- NOTREACHED() << "Window " << window->id()
- << " has unhandled type " << window->type();
- break;
- }
- return NULL;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// StackingController, private:
-
-aura::Window* StackingController::GetSystemModalContainer(
- aura::Window* root,
- aura::Window* window) const {
- DCHECK(IsSystemModal(window));
-
- // If screen lock is not active and user session is active,
- // all modal windows are placed into the normal modal container.
- // In case of missing transient parent (it could happen for alerts from
- // background pages) assume that the window belongs to user session.
- SessionStateDelegate* session_state_delegate =
- Shell::GetInstance()->session_state_delegate();
- if (!session_state_delegate->IsUserSessionBlocked() ||
- !window->transient_parent()) {
- return GetContainerById(root,
- internal::kShellWindowId_SystemModalContainer);
- }
-
- // Otherwise those that originate from LockScreen container and above are
- // placed in the screen lock modal container.
- int window_container_id = window->transient_parent()->parent()->id();
- aura::Window* container = NULL;
- if (window_container_id < internal::kShellWindowId_LockScreenContainer) {
- container = GetContainerById(
- root, internal::kShellWindowId_SystemModalContainer);
- } else {
- container = GetContainerById(
- root, internal::kShellWindowId_LockSystemModalContainer);
- }
-
- return container;
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/stacking_controller.h b/chromium/ash/wm/stacking_controller.h
deleted file mode 100644
index bbe715eba30..00000000000
--- a/chromium/ash/wm/stacking_controller.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_STACKING_CONTROLLER_H_
-#define ASH_WM_STACKING_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/client/window_tree_client.h"
-
-namespace ash {
-namespace internal {
-class AlwaysOnTopController;
-}
-
-class ASH_EXPORT StackingController : public aura::client::WindowTreeClient {
- public:
- StackingController();
- virtual ~StackingController();
-
- // Overridden from aura::client::WindowTreeClient:
- virtual aura::Window* GetDefaultParent(aura::Window* context,
- aura::Window* window,
- const gfx::Rect& bounds) OVERRIDE;
-
- private:
- // Returns corresponding system modal container for a modal window.
- // If screen lock is not active, all system modal windows are placed into the
- // normal modal container.
- // Otherwise those that originate from LockScreen container and above are
- // placed in the screen lock modal container.
- aura::Window* GetSystemModalContainer(aura::Window* root,
- aura::Window* window) const;
-
- DISALLOW_COPY_AND_ASSIGN(StackingController);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_STACKING_CONTROLLER_H_
diff --git a/chromium/ash/wm/stacking_controller_unittest.cc b/chromium/ash/wm/stacking_controller_unittest.cc
deleted file mode 100644
index e0ccaa182be..00000000000
--- a/chromium/ash/wm/stacking_controller_unittest.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/window_properties.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-
-using aura::Window;
-
-namespace ash {
-namespace internal {
-
-class StackingControllerTest : public test::AshTestBase {
- public:
- StackingControllerTest() {}
- virtual ~StackingControllerTest() {}
-
- aura::Window* CreateTestWindow() {
- aura::Window* window = new aura::Window(NULL);
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- window->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window->Init(ui::LAYER_TEXTURED);
- return window;
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(StackingControllerTest);
-};
-
-// Verifies a window with a transient parent is in the same container as its
-// transient parent.
-TEST_F(StackingControllerTest, TransientParent) {
- // Normal window .
- scoped_ptr<Window> w2(CreateTestWindow());
- w2->SetBounds(gfx::Rect(10, 11, 250, 251));
- aura::Window* launcher = Shell::GetContainer(Shell::GetPrimaryRootWindow(),
- kShellWindowId_ShelfContainer);
- launcher->AddChild(w2.get());
- w2->Show();
-
- wm::ActivateWindow(w2.get());
-
- // Window with a transient parent.
- scoped_ptr<Window> w1(CreateTestWindow());
- w2->AddTransientChild(w1.get());
- w1->SetBounds(gfx::Rect(10, 11, 250, 251));
- ParentWindowInPrimaryRootWindow(w1.get());
- w1->Show();
- wm::ActivateWindow(w1.get());
-
- // The window with the transient parent should get added to the same container
- // as its transient parent.
- EXPECT_EQ(launcher, w1->parent());
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/status_area_layout_manager.cc b/chromium/ash/wm/status_area_layout_manager.cc
deleted file mode 100644
index d9e0424d240..00000000000
--- a/chromium/ash/wm/status_area_layout_manager.cc
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/status_area_layout_manager.h"
-
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/system/status_area_widget.h"
-#include "base/auto_reset.h"
-#include "ui/aura/window.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-////////////////////////////////////////////////////////////////////////////////
-// StatusAreaLayoutManager, public:
-
-StatusAreaLayoutManager::StatusAreaLayoutManager(ShelfWidget* shelf)
- : in_layout_(false),
- shelf_(shelf) {
-}
-
-StatusAreaLayoutManager::~StatusAreaLayoutManager() {
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// StatusAreaLayoutManager, aura::LayoutManager implementation:
-
-void StatusAreaLayoutManager::OnWindowResized() {
- LayoutStatusArea();
-}
-
-void StatusAreaLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
-}
-
-void StatusAreaLayoutManager::OnWillRemoveWindowFromLayout(
- aura::Window* child) {
-}
-
-void StatusAreaLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
-}
-
-void StatusAreaLayoutManager::OnChildWindowVisibilityChanged(
- aura::Window* child, bool visible) {
-}
-
-void StatusAreaLayoutManager::SetChildBounds(
- aura::Window* child,
- const gfx::Rect& requested_bounds) {
- // Only need to have the shelf do a layout if the child changing is the status
- // area and the shelf isn't in the process of doing a layout.
- if (child != shelf_->status_area_widget()->GetNativeView() || in_layout_) {
- SetChildBoundsDirect(child, requested_bounds);
- return;
- }
-
- // If the size matches, no need to do anything. We don't check the location as
- // that is managed by the shelf.
- if (requested_bounds == child->bounds())
- return;
-
- SetChildBoundsDirect(child, requested_bounds);
- LayoutStatusArea();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// StatusAreaLayoutManager, private:
-
-void StatusAreaLayoutManager::LayoutStatusArea() {
- // Shelf layout manager may be already doing layout.
- if (shelf_->shelf_layout_manager()->updating_bounds())
- return;
-
- base::AutoReset<bool> auto_reset_in_layout(&in_layout_, true);
- shelf_->shelf_layout_manager()->LayoutShelf();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/status_area_layout_manager.h b/chromium/ash/wm/status_area_layout_manager.h
deleted file mode 100644
index 8e6944dfacd..00000000000
--- a/chromium/ash/wm/status_area_layout_manager.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_STATUS_AREA_LAYOUT_MANAGER_H_
-#define ASH_WM_STATUS_AREA_LAYOUT_MANAGER_H_
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/aura/layout_manager.h"
-
-namespace ash {
-class ShelfWidget;
-namespace internal {
-
-// StatusAreaLayoutManager is a layout manager responsible for the status area.
-// In any case when status area needs relayout it redirects this call to
-// ShelfLayoutManager.
-class StatusAreaLayoutManager : public aura::LayoutManager {
- public:
- explicit StatusAreaLayoutManager(ShelfWidget* shelf);
- virtual ~StatusAreaLayoutManager();
-
- // Overridden from aura::LayoutManager:
- virtual void OnWindowResized() OVERRIDE;
- virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE;
- virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE;
- virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE;
- virtual void OnChildWindowVisibilityChanged(aura::Window* child,
- bool visible) OVERRIDE;
- virtual void SetChildBounds(aura::Window* child,
- const gfx::Rect& requested_bounds) OVERRIDE;
-
- private:
- // Updates layout of the status area. Effectively calls ShelfLayoutManager
- // to update layout of the shelf.
- void LayoutStatusArea();
-
- // True when inside LayoutStatusArea method.
- // Used to prevent calling itself again from SetChildBounds().
- bool in_layout_;
-
- ShelfWidget* shelf_;
-
- DISALLOW_COPY_AND_ASSIGN(StatusAreaLayoutManager);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_STATUS_AREA_LAYOUT_MANAGER_H_
diff --git a/chromium/ash/wm/sticky_keys.cc b/chromium/ash/wm/sticky_keys.cc
deleted file mode 100644
index 9e2cc2a92de..00000000000
--- a/chromium/ash/wm/sticky_keys.cc
+++ /dev/null
@@ -1,445 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/sticky_keys.h"
-
-#if defined(USE_X11)
-#include <X11/extensions/XInput2.h>
-#include <X11/Xlib.h>
-#undef RootWindow
-#endif
-
-#include "base/basictypes.h"
-#include "base/debug/stack_trace.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_tracker.h"
-#include "ui/events/event.h"
-#include "ui/events/keycodes/keyboard_code_conversion.h"
-
-namespace ash {
-
-namespace {
-
-// Returns true if the type of mouse event should be modified by sticky keys.
-bool ShouldModifyMouseEvent(ui::MouseEvent* event) {
- ui::EventType type = event->type();
- return type == ui::ET_MOUSE_PRESSED || type == ui::ET_MOUSE_RELEASED ||
- type == ui::ET_MOUSEWHEEL;
-}
-
-// An implementation of StickyKeysHandler::StickyKeysHandlerDelegate.
-class StickyKeysHandlerDelegateImpl :
- public StickyKeysHandler::StickyKeysHandlerDelegate {
- public:
- StickyKeysHandlerDelegateImpl();
- virtual ~StickyKeysHandlerDelegateImpl();
-
- // StickyKeysHandlerDelegate overrides.
- virtual void DispatchKeyEvent(ui::KeyEvent* event,
- aura::Window* target) OVERRIDE;
-
- virtual void DispatchMouseEvent(ui::MouseEvent* event,
- aura::Window* target) OVERRIDE;
-
- virtual void DispatchScrollEvent(ui::ScrollEvent* event,
- aura::Window* target) OVERRIDE;
- private:
- DISALLOW_COPY_AND_ASSIGN(StickyKeysHandlerDelegateImpl);
-};
-
-StickyKeysHandlerDelegateImpl::StickyKeysHandlerDelegateImpl() {
-}
-
-StickyKeysHandlerDelegateImpl::~StickyKeysHandlerDelegateImpl() {
-}
-
-void StickyKeysHandlerDelegateImpl::DispatchKeyEvent(ui::KeyEvent* event,
- aura::Window* target) {
- DCHECK(target);
- target->GetDispatcher()->AsRootWindowHostDelegate()->OnHostKeyEvent(event);
-}
-
-void StickyKeysHandlerDelegateImpl::DispatchMouseEvent(ui::MouseEvent* event,
- aura::Window* target) {
- DCHECK(target);
- // We need to send a new, untransformed mouse event to the host.
- if (event->IsMouseWheelEvent()) {
- ui::MouseWheelEvent new_event(*static_cast<ui::MouseWheelEvent*>(event));
- target->GetDispatcher()->AsRootWindowHostDelegate()
- ->OnHostMouseEvent(&new_event);
- } else {
- ui::MouseEvent new_event(*event, target, target->GetRootWindow());
- target->GetDispatcher()->AsRootWindowHostDelegate()
- ->OnHostMouseEvent(&new_event);
- }
-}
-
-void StickyKeysHandlerDelegateImpl::DispatchScrollEvent(
- ui::ScrollEvent* event,
- aura::Window* target) {
- DCHECK(target);
- target->GetDispatcher()->AsRootWindowHostDelegate()
- ->OnHostScrollEvent(event);
-}
-
-} // namespace
-
-///////////////////////////////////////////////////////////////////////////////
-// StickyKeys
-StickyKeys::StickyKeys()
- : enabled_(false),
- shift_sticky_key_(
- new StickyKeysHandler(ui::EF_SHIFT_DOWN,
- new StickyKeysHandlerDelegateImpl())),
- alt_sticky_key_(
- new StickyKeysHandler(ui::EF_ALT_DOWN,
- new StickyKeysHandlerDelegateImpl())),
- ctrl_sticky_key_(
- new StickyKeysHandler(ui::EF_CONTROL_DOWN,
- new StickyKeysHandlerDelegateImpl())) {
-}
-
-StickyKeys::~StickyKeys() {
-}
-
-void StickyKeys::Enable(bool enabled) {
- if (enabled_ != enabled) {
- enabled_ = enabled;
-
- // Reset key handlers when activating sticky keys to ensure all
- // the handlers' states are reset.
- if (enabled_) {
- shift_sticky_key_.reset(
- new StickyKeysHandler(ui::EF_SHIFT_DOWN,
- new StickyKeysHandlerDelegateImpl()));
- alt_sticky_key_.reset(
- new StickyKeysHandler(ui::EF_ALT_DOWN,
- new StickyKeysHandlerDelegateImpl()));
- ctrl_sticky_key_.reset(
- new StickyKeysHandler(ui::EF_CONTROL_DOWN,
- new StickyKeysHandlerDelegateImpl()));
- }
- }
-}
-
-bool StickyKeys::HandleKeyEvent(ui::KeyEvent* event) {
- return shift_sticky_key_->HandleKeyEvent(event) ||
- alt_sticky_key_->HandleKeyEvent(event) ||
- ctrl_sticky_key_->HandleKeyEvent(event);
- return ctrl_sticky_key_->HandleKeyEvent(event);
-}
-
-bool StickyKeys::HandleMouseEvent(ui::MouseEvent* event) {
- return shift_sticky_key_->HandleMouseEvent(event) ||
- alt_sticky_key_->HandleMouseEvent(event) ||
- ctrl_sticky_key_->HandleMouseEvent(event);
-}
-
-bool StickyKeys::HandleScrollEvent(ui::ScrollEvent* event) {
- return shift_sticky_key_->HandleScrollEvent(event) ||
- alt_sticky_key_->HandleScrollEvent(event) ||
- ctrl_sticky_key_->HandleScrollEvent(event);
-}
-
-void StickyKeys::OnKeyEvent(ui::KeyEvent* event) {
- // Do not consume a translated key event which is generated by an IME.
- if (event->type() == ui::ET_TRANSLATED_KEY_PRESS ||
- event->type() == ui::ET_TRANSLATED_KEY_RELEASE) {
- return;
- }
-
- if (enabled_ && HandleKeyEvent(event))
- event->StopPropagation();
-}
-
-void StickyKeys::OnMouseEvent(ui::MouseEvent* event) {
- if (enabled_ && HandleMouseEvent(event))
- event->StopPropagation();
-}
-
-void StickyKeys::OnScrollEvent(ui::ScrollEvent* event) {
- if (enabled_ && HandleScrollEvent(event))
- event->StopPropagation();
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// StickyKeysHandler
-StickyKeysHandler::StickyKeysHandler(ui::EventFlags target_modifier_flag,
- StickyKeysHandlerDelegate* delegate)
- : modifier_flag_(target_modifier_flag),
- current_state_(DISABLED),
- event_from_myself_(false),
- preparing_to_enable_(false),
- scroll_delta_(0),
- delegate_(delegate) {
-}
-
-StickyKeysHandler::~StickyKeysHandler() {
-}
-
-StickyKeysHandler::StickyKeysHandlerDelegate::StickyKeysHandlerDelegate() {
-}
-
-StickyKeysHandler::StickyKeysHandlerDelegate::~StickyKeysHandlerDelegate() {
-}
-
-bool StickyKeysHandler::HandleKeyEvent(ui::KeyEvent* event) {
- if (event_from_myself_)
- return false; // Do not handle self-generated key event.
- switch (current_state_) {
- case DISABLED:
- return HandleDisabledState(event);
- case ENABLED:
- return HandleEnabledState(event);
- case LOCKED:
- return HandleLockedState(event);
- }
- NOTREACHED();
- return false;
-}
-
-bool StickyKeysHandler::HandleMouseEvent(ui::MouseEvent* event) {
- preparing_to_enable_ = false;
- if (event_from_myself_ || current_state_ == DISABLED
- || !ShouldModifyMouseEvent(event)) {
- return false;
- }
- DCHECK(current_state_ == ENABLED || current_state_ == LOCKED);
-
- AppendModifier(event);
- // Only disable on the mouse released event in normal, non-locked mode.
- if (current_state_ == ENABLED && event->type() != ui::ET_MOUSE_PRESSED) {
- current_state_ = DISABLED;
- DispatchEventAndReleaseModifier(event);
- return true;
- }
-
- return false;
-}
-
-bool StickyKeysHandler::HandleScrollEvent(ui::ScrollEvent* event) {
- preparing_to_enable_ = false;
- if (event_from_myself_ || current_state_ == DISABLED)
- return false;
- DCHECK(current_state_ == ENABLED || current_state_ == LOCKED);
-
- // We detect a direction change if the current |scroll_delta_| is assigned
- // and the offset of the current scroll event has the opposing sign.
- bool direction_changed = false;
- if (current_state_ == ENABLED && event->type() == ui::ET_SCROLL) {
- int offset = event->y_offset();
- if (scroll_delta_)
- direction_changed = offset * scroll_delta_ <= 0;
- scroll_delta_ = offset;
- }
-
- if (!direction_changed)
- AppendModifier(event);
-
- // We want to modify all the scroll events in the scroll sequence, which ends
- // with a fling start event. We also stop when the scroll sequence changes
- // direction.
- if (current_state_ == ENABLED &&
- (event->type() == ui::ET_SCROLL_FLING_START || direction_changed)) {
- current_state_ = DISABLED;
- scroll_delta_ = 0;
- DispatchEventAndReleaseModifier(event);
- return true;
- }
-
- return false;
-}
-
-StickyKeysHandler::KeyEventType
- StickyKeysHandler::TranslateKeyEvent(ui::KeyEvent* event) {
- bool is_target_key = false;
- if (event->key_code() == ui::VKEY_SHIFT ||
- event->key_code() == ui::VKEY_LSHIFT ||
- event->key_code() == ui::VKEY_RSHIFT) {
- is_target_key = (modifier_flag_ == ui::EF_SHIFT_DOWN);
- } else if (event->key_code() == ui::VKEY_CONTROL ||
- event->key_code() == ui::VKEY_LCONTROL ||
- event->key_code() == ui::VKEY_RCONTROL) {
- is_target_key = (modifier_flag_ == ui::EF_CONTROL_DOWN);
- } else if (event->key_code() == ui::VKEY_MENU ||
- event->key_code() == ui::VKEY_LMENU ||
- event->key_code() == ui::VKEY_RMENU) {
- is_target_key = (modifier_flag_ == ui::EF_ALT_DOWN);
- } else {
- return event->type() == ui::ET_KEY_PRESSED ?
- NORMAL_KEY_DOWN : NORMAL_KEY_UP;
- }
-
- if (is_target_key) {
- return event->type() == ui::ET_KEY_PRESSED ?
- TARGET_MODIFIER_DOWN : TARGET_MODIFIER_UP;
- }
- return event->type() == ui::ET_KEY_PRESSED ?
- OTHER_MODIFIER_DOWN : OTHER_MODIFIER_UP;
-}
-
-bool StickyKeysHandler::HandleDisabledState(ui::KeyEvent* event) {
- switch (TranslateKeyEvent(event)) {
- case TARGET_MODIFIER_UP:
- if (preparing_to_enable_) {
- preparing_to_enable_ = false;
- scroll_delta_ = 0;
- current_state_ = ENABLED;
- modifier_up_event_.reset(new ui::KeyEvent(*event));
- return true;
- }
- return false;
- case TARGET_MODIFIER_DOWN:
- preparing_to_enable_ = true;
- return false;
- case NORMAL_KEY_DOWN:
- preparing_to_enable_ = false;
- return false;
- case NORMAL_KEY_UP:
- case OTHER_MODIFIER_DOWN:
- case OTHER_MODIFIER_UP:
- return false;
- }
- NOTREACHED();
- return false;
-}
-
-bool StickyKeysHandler::HandleEnabledState(ui::KeyEvent* event) {
- switch (TranslateKeyEvent(event)) {
- case NORMAL_KEY_UP:
- case TARGET_MODIFIER_DOWN:
- return true;
- case TARGET_MODIFIER_UP:
- current_state_ = LOCKED;
- modifier_up_event_.reset();
- return true;
- case NORMAL_KEY_DOWN: {
- current_state_ = DISABLED;
- AppendModifier(event);
- DispatchEventAndReleaseModifier(event);
- return true;
- }
- case OTHER_MODIFIER_DOWN:
- case OTHER_MODIFIER_UP:
- return false;
- }
- NOTREACHED();
- return false;
-}
-
-bool StickyKeysHandler::HandleLockedState(ui::KeyEvent* event) {
- switch (TranslateKeyEvent(event)) {
- case TARGET_MODIFIER_DOWN:
- return true;
- case TARGET_MODIFIER_UP:
- current_state_ = DISABLED;
- return false;
- case NORMAL_KEY_DOWN:
- case NORMAL_KEY_UP:
- AppendModifier(event);
- return false;
- case OTHER_MODIFIER_DOWN:
- case OTHER_MODIFIER_UP:
- return false;
- }
- NOTREACHED();
- return false;
-}
-
-void StickyKeysHandler::DispatchEventAndReleaseModifier(ui::Event* event) {
- DCHECK(event->IsKeyEvent() ||
- event->IsMouseEvent() ||
- event->IsScrollEvent());
- DCHECK(modifier_up_event_.get());
- aura::Window* target = static_cast<aura::Window*>(event->target());
- DCHECK(target);
- aura::Window* root_window = target->GetRootWindow();
- DCHECK(root_window);
-
- aura::WindowTracker window_tracker;
- window_tracker.Add(target);
-
- event_from_myself_ = true;
- if (event->IsKeyEvent()) {
- delegate_->DispatchKeyEvent(static_cast<ui::KeyEvent*>(event), target);
- } else if (event->IsMouseEvent()) {
- delegate_->DispatchMouseEvent(static_cast<ui::MouseEvent*>(event), target);
- } else {
- delegate_->DispatchScrollEvent(
- static_cast<ui::ScrollEvent*>(event), target);
- }
-
- // The action triggered above may have destroyed the event target, in which
- // case we will dispatch the modifier up event to the root window instead.
- aura::Window* modifier_up_target =
- window_tracker.Contains(target) ? target : root_window;
- delegate_->DispatchKeyEvent(modifier_up_event_.get(), modifier_up_target);
- event_from_myself_ = false;
-}
-
-void StickyKeysHandler::AppendNativeEventMask(unsigned int* state) {
- unsigned int& state_ref = *state;
- switch (modifier_flag_) {
- case ui::EF_CONTROL_DOWN:
- state_ref |= ControlMask;
- break;
- case ui::EF_ALT_DOWN:
- state_ref |= Mod1Mask;
- break;
- case ui::EF_SHIFT_DOWN:
- state_ref |= ShiftMask;
- break;
- default:
- NOTREACHED();
- }
-}
-
-void StickyKeysHandler::AppendModifier(ui::KeyEvent* event) {
-#if defined(USE_X11)
- XEvent* xev = event->native_event();
- if (xev) {
- XKeyEvent* xkey = &(xev->xkey);
- AppendNativeEventMask(&xkey->state);
- }
-#elif defined(USE_OZONE)
- NOTIMPLEMENTED() << "Modifier key is not handled";
-#endif
- event->set_flags(event->flags() | modifier_flag_);
- event->set_character(ui::GetCharacterFromKeyCode(event->key_code(),
- event->flags()));
- event->NormalizeFlags();
-}
-
-void StickyKeysHandler::AppendModifier(ui::MouseEvent* event) {
-#if defined(USE_X11)
- XEvent* xev = event->native_event();
- if (xev) {
- XButtonEvent* xkey = &(xev->xbutton);
- AppendNativeEventMask(&xkey->state);
- }
-#elif defined(USE_OZONE)
- NOTIMPLEMENTED() << "Modifier key is not handled";
-#endif
- event->set_flags(event->flags() | modifier_flag_);
-}
-
-void StickyKeysHandler::AppendModifier(ui::ScrollEvent* event) {
-#if defined(USE_X11)
- XEvent* xev = event->native_event();
- if (xev) {
- XIDeviceEvent* xievent =
- static_cast<XIDeviceEvent*>(xev->xcookie.data);
- if (xievent) {
- AppendNativeEventMask(reinterpret_cast<unsigned int*>(
- &xievent->mods.effective));
- }
- }
-#elif defined(USE_OZONE)
- NOTIMPLEMENTED() << "Modifier key is not handled";
-#endif
- event->set_flags(event->flags() | modifier_flag_);
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/sticky_keys.h b/chromium/ash/wm/sticky_keys.h
deleted file mode 100644
index 1a2789214bb..00000000000
--- a/chromium/ash/wm/sticky_keys.h
+++ /dev/null
@@ -1,240 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_STICKY_KEYS_H_
-#define ASH_WM_STICKY_KEYS_H_
-
-#include "ash/ash_export.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/events/event_constants.h"
-#include "ui/events/event_handler.h"
-
-namespace ui {
-class Event;
-class KeyEvent;
-class MouseEvent;
-} // namespace ui
-
-namespace aura {
-class Window;
-} // namespace aura
-
-namespace ash {
-
-class StickyKeysHandler;
-
-// StickyKeys is an accessibility feature for users to be able to compose key
-// and mouse event with modifier keys without simultaneous key press event.
-// Instead they can compose events separately pressing each of the modifier
-// keys involved.
-// e.g. Composing Ctrl + T
-// User Action : The KeyEvent widget will receives
-// ----------------------------------------------------------
-// 1. Press Ctrl key : Ctrl Keydown.
-// 2. Release Ctrl key : No event
-// 3. Press T key : T keydown event with ctrl modifier.
-// 4. : Ctrl Keyup
-// 5. Release T key : T keyup without ctrl modifier (Windows behavior)
-//
-// By typing same modifier keys twice, users can generate bunch of modified key
-// events.
-// e.g. To focus tabs consistently by Ctrl + 1, Ctrl + 2 ...
-// User Action : The KeyEvent widget will receives
-// ----------------------------------------------------------
-// 1. Press Ctrl key : Ctrl Keydown
-// 2. Release Ctrl key : No event
-// 3. Press Ctrl key : No event
-// 4. Release Ctrl key : No event
-// 5. Press 1 key : 1 Keydown event with Ctrl modifier.
-// 6. Release 1 key : 1 Keyup event with Ctrl modifier.
-// 7. Press 2 key : 2 Keydown event with Ctrl modifier.
-// 8. Release 2 key : 2 Keyup event with Ctrl modifier.
-// 9. Press Ctrl key : No event
-// 10. Release Ctrl key: Ctrl Keyup
-//
-// In the case of Chrome OS, StickyKeys supports Shift,Alt,Ctrl modifiers. Each
-// handling or state is performed independently.
-//
-// StickyKeys is disabled by default.
-class ASH_EXPORT StickyKeys : public ui::EventHandler {
- public:
- StickyKeys();
- virtual ~StickyKeys();
-
- // Activate sticky keys to intercept and modify incoming events.
- void Enable(bool enabled);
-
- private:
- // Handles keyboard event. Returns true if Sticky key consumes keyboard event.
- bool HandleKeyEvent(ui::KeyEvent* event);
-
- // Handles mouse event. Returns true if sticky key consumes mouse event.
- bool HandleMouseEvent(ui::MouseEvent* event);
-
- // Handles scroll event. Returns true if sticky key consumes scroll event.
- bool HandleScrollEvent(ui::ScrollEvent* event);
-
- // Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
-
- // Whether sticky keys is activated and modifying events.
- bool enabled_;
-
- // Sticky key handlers.
- scoped_ptr<StickyKeysHandler> shift_sticky_key_;
- scoped_ptr<StickyKeysHandler> alt_sticky_key_;
- scoped_ptr<StickyKeysHandler> ctrl_sticky_key_;
-
- DISALLOW_COPY_AND_ASSIGN(StickyKeys);
-};
-
-// StickyKeysHandler handles key event and performs StickyKeys for specific
-// modifier keys. If monitored keyboard events are recieved, StickyKeysHandler
-// changes internal state. If non modifier keyboard events or mouse events are
-// received, StickyKeysHandler will append modifier based on internal state.
-// For other events, StickyKeysHandler does nothing.
-//
-// The DISABLED state is default state and any incoming non modifier keyboard
-// events will not be modified. The ENABLED state is one shot modification
-// state. Only next keyboard event will be modified. After that, internal state
-// will be back to DISABLED state with sending modifier keyup event. In the case
-// of LOCKED state, all incomming keyboard events will be modified. The LOCKED
-// state will be back to DISABLED state by next monitoring modifier key.
-//
-// The detailed state flow as follows:
-// Current state
-// | DISABLED | ENABLED | LOCKED |
-// ----------------------------------------------------------------|
-// Modifier KeyDown | noop | noop(*) | noop(*) |
-// Modifier KeyUp | To ENABLED(*) | To LOCKED(*) | To DISABLED |
-// Normal KeyDown | noop | To DISABLED(#) | noop(#) |
-// Normal KeyUp | noop | noop | noop(#) |
-// Other KeyUp/Down | noop | noop | noop |
-// Mouse Press | noop | noop(#) | noop(#) |
-// Mouse Release | noop | To DISABLED(#) | noop(#) |
-// Mouse Wheel | noop | To DISABLED(#) | noop(#) |
-// Other Mouse Event| noop | noop | noop |
-//
-// Here, (*) means key event will be consumed by StickyKeys, and (#) means event
-// is modified.
-class ASH_EXPORT StickyKeysHandler {
- public:
- class StickyKeysHandlerDelegate {
- public:
- StickyKeysHandlerDelegate();
- virtual ~StickyKeysHandlerDelegate();
-
- // Dispatches keyboard event synchronously.
- virtual void DispatchKeyEvent(ui::KeyEvent* event,
- aura::Window* target) = 0;
-
- // Dispatches mouse event synchronously.
- virtual void DispatchMouseEvent(ui::MouseEvent* event,
- aura::Window* target) = 0;
-
- // Dispatches scroll event synchronously.
- virtual void DispatchScrollEvent(ui::ScrollEvent* event,
- aura::Window* target) = 0;
- };
- // Represents Sticky Key state.
- enum StickyKeyState {
- // The sticky key is disabled. Incomming non modifier key events are not
- // affected.
- DISABLED,
- // The sticky key is enabled. Incomming non modifier key down events are
- // modified with |modifier_flag_|. After that, sticky key state become
- // DISABLED.
- ENABLED,
- // The sticky key is locked. Incomming non modifier key down events are
- // modified with |modifier_flag_|.
- LOCKED,
- };
-
- // This class takes an ownership of |delegate|.
- StickyKeysHandler(ui::EventFlags modifier_flag,
- StickyKeysHandlerDelegate* delegate);
- ~StickyKeysHandler();
-
- // Handles key event. Returns true if key is consumed.
- bool HandleKeyEvent(ui::KeyEvent* event);
-
- // Handles a mouse event. Returns true if mouse event is consumed.
- bool HandleMouseEvent(ui::MouseEvent* event);
-
- // Handles a scroll event. Returns true if scroll event is consumed.
- bool HandleScrollEvent(ui::ScrollEvent* event);
-
- // Returns current internal state.
- StickyKeyState current_state() const { return current_state_; }
-
- private:
- // Represents event type in Sticky Key context.
- enum KeyEventType {
- TARGET_MODIFIER_DOWN, // The monitoring modifier key is down.
- TARGET_MODIFIER_UP, // The monitoring modifier key is up.
- NORMAL_KEY_DOWN, // The non modifier key is down.
- NORMAL_KEY_UP, // The non modifier key is up.
- OTHER_MODIFIER_DOWN, // The modifier key but not monitored key is down.
- OTHER_MODIFIER_UP, // The modifier key but not monitored key is up.
- };
-
- // Translates |event| to sticky keys event type.
- KeyEventType TranslateKeyEvent(ui::KeyEvent* event);
-
- // Handles key event in DISABLED state.
- bool HandleDisabledState(ui::KeyEvent* event);
-
- // Handles key event in ENABLED state.
- bool HandleEnabledState(ui::KeyEvent* event);
-
- // Handles key event in LOCKED state.
- bool HandleLockedState(ui::KeyEvent* event);
-
- // Dispatches |event| to its target and then dispatch a key released event
- // for the modifier key. This function is required to ensure that the events
- // are sent in the correct order when disabling sticky key after a key/mouse
- // button press.
- void DispatchEventAndReleaseModifier(ui::Event* event);
-
- // Adds |modifier_flags_| to a native X11 event state mask.
- void AppendNativeEventMask(unsigned int* state);
-
- // Adds |modifier_flags_| into |event|.
- void AppendModifier(ui::KeyEvent* event);
- void AppendModifier(ui::MouseEvent* event);
- void AppendModifier(ui::ScrollEvent* event);
-
- // The modifier flag to be monitored and appended.
- const ui::EventFlags modifier_flag_;
-
- // The current sticky key status.
- StickyKeyState current_state_;
-
- // True if the received key event is sent by StickyKeyHandler.
- bool event_from_myself_;
-
- // True if we received the TARGET_MODIFIER_DOWN event while in the DISABLED
- // state but before we receive the TARGET_MODIFIER_UP event. Normal
- // shortcuts (eg. ctrl + t) during this time will prevent a transition to
- // the ENABLED state.
- bool preparing_to_enable_;
-
- // Tracks the scroll direction of the current scroll sequence. Sticky keys
- // stops modifying the scroll events of the sequence when the direction
- // changes. If no sequence is tracked, the value is 0.
- int scroll_delta_;
-
- // The modifier up key event to be sent on non modifier key on ENABLED state.
- scoped_ptr<ui::KeyEvent> modifier_up_event_;
-
- scoped_ptr<StickyKeysHandlerDelegate> delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(StickyKeysHandler);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_STICKY_KEYS_H_
diff --git a/chromium/ash/wm/sticky_keys_unittest.cc b/chromium/ash/wm/sticky_keys_unittest.cc
deleted file mode 100644
index d6fc660e54e..00000000000
--- a/chromium/ash/wm/sticky_keys_unittest.cc
+++ /dev/null
@@ -1,876 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/sticky_keys.h"
-
-#include <X11/Xlib.h>
-#undef None
-#undef Bool
-#undef RootWindow
-
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "base/bind.h"
-#include "base/callback.h"
-#include "base/memory/scoped_vector.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_tree_host_delegate.h"
-#include "ui/events/event_handler.h"
-#include "ui/events/test/events_test_utils_x11.h"
-#include "ui/events/x/device_data_manager.h"
-
-namespace ash {
-
-namespace {
-
-// The device id of the test scroll device.
-const unsigned int kScrollDeviceId = 1;
-
-} // namespace
-
-// Keeps a buffer of handled events.
-class EventBuffer : public ui::EventHandler {
- public:
- EventBuffer() {}
- virtual ~EventBuffer() {}
-
- void PopEvents(ScopedVector<ui::Event>* events) {
- events->clear();
- events->swap(events_);
- }
-
- private:
- // ui::EventHandler overrides:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE {
- events_.push_back(new ui::KeyEvent(*event));
- }
-
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
- if (event->IsMouseWheelEvent()) {
- events_.push_back(
- new ui::MouseWheelEvent(*static_cast<ui::MouseWheelEvent*>(event)));
- } else {
- events_.push_back(new ui::MouseEvent(event->native_event()));
- }
- }
-
- ScopedVector<ui::Event> events_;
-
- DISALLOW_COPY_AND_ASSIGN(EventBuffer);
-};
-
-// A testable and StickyKeysHandler.
-class MockStickyKeysHandlerDelegate :
- public StickyKeysHandler::StickyKeysHandlerDelegate {
- public:
- class Delegate {
- public:
- virtual aura::Window* GetExpectedTarget() = 0;
- virtual void OnShortcutPressed() = 0;
-
- protected:
- virtual ~Delegate() {}
- };
-
- MockStickyKeysHandlerDelegate(Delegate* delegate) : delegate_(delegate) {}
-
- virtual ~MockStickyKeysHandlerDelegate() {}
-
- // StickyKeysHandler override.
- virtual void DispatchKeyEvent(ui::KeyEvent* event,
- aura::Window* target) OVERRIDE {
- ASSERT_EQ(delegate_->GetExpectedTarget(), target);
-
- // Detect a special shortcut when it is dispatched. This shortcut will
- // not be hit in the LOCKED state as this case does not involve the
- // delegate.
- if (event->type() == ui::ET_KEY_PRESSED &&
- event->key_code() == ui::VKEY_J &&
- event->flags() | ui::EF_CONTROL_DOWN) {
- delegate_->OnShortcutPressed();
- }
-
- events_.push_back(new ui::KeyEvent(*event));
- }
-
- virtual void DispatchMouseEvent(ui::MouseEvent* event,
- aura::Window* target) OVERRIDE {
- ASSERT_EQ(delegate_->GetExpectedTarget(), target);
- events_.push_back(
- new ui::MouseEvent(*event, target, target->GetRootWindow()));
- }
-
- virtual void DispatchScrollEvent(ui::ScrollEvent* event,
- aura::Window* target) OVERRIDE {
- events_.push_back(new ui::ScrollEvent(event->native_event()));
- }
-
- // Returns the count of dispatched events.
- size_t GetEventCount() const {
- return events_.size();
- }
-
- // Returns the |index|-th dispatched event.
- const ui::Event* GetEvent(size_t index) const {
- return events_[index];
- }
-
- // Clears all previously dispatched events.
- void ClearEvents() {
- events_.clear();
- }
-
- private:
- ScopedVector<ui::Event> events_;
- Delegate* delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(MockStickyKeysHandlerDelegate);
-};
-
-class StickyKeysTest : public test::AshTestBase,
- public MockStickyKeysHandlerDelegate::Delegate {
- protected:
- StickyKeysTest()
- : target_(NULL),
- root_window_(NULL) {}
-
- virtual void SetUp() OVERRIDE {
- test::AshTestBase::SetUp();
-
- // |target_| owned by root window of shell. It is still safe to delete
- // it ourselves.
- target_ = CreateTestWindowInShellWithId(0);
- root_window_ = target_->GetRootWindow();
- }
-
- virtual void TearDown() OVERRIDE {
- test::AshTestBase::TearDown();
- }
-
- // Overridden from MockStickyKeysHandlerDelegate::Delegate:
- virtual aura::Window* GetExpectedTarget() OVERRIDE {
- return target_ ? target_ : root_window_;
- }
-
- virtual void OnShortcutPressed() OVERRIDE {
- if (target_) {
- delete target_;
- target_ = NULL;
- }
- }
-
- ui::KeyEvent* GenerateKey(bool is_key_press, ui::KeyboardCode code) {
- scoped_xevent_.InitKeyEvent(
- is_key_press ? ui::ET_KEY_PRESSED : ui::ET_KEY_RELEASED,
- code,
- 0);
- ui::KeyEvent* event = new ui::KeyEvent(scoped_xevent_, false);
- ui::Event::DispatcherApi dispatcher(event);
- dispatcher.set_target(target_);
- return event;
- }
-
- ui::MouseEvent* GenerateMouseEvent(bool is_button_press) {
- scoped_xevent_.InitButtonEvent(
- is_button_press ? ui::ET_MOUSE_PRESSED : ui::ET_MOUSE_RELEASED, 0);
- ui::MouseEvent* event = new ui::MouseEvent(scoped_xevent_);
- ui::Event::DispatcherApi dispatcher(event);
- dispatcher.set_target(target_);
- return event;
- }
-
- ui::MouseWheelEvent* GenerateMouseWheelEvent(int wheel_delta) {
- EXPECT_NE(0, wheel_delta);
- scoped_xevent_.InitMouseWheelEvent(wheel_delta, 0);
- ui::MouseWheelEvent* event = new ui::MouseWheelEvent(scoped_xevent_);
- ui::Event::DispatcherApi dispatcher(event);
- dispatcher.set_target(target_);
- return event;
- }
-
- ui::ScrollEvent* GenerateScrollEvent(int scroll_delta) {
- scoped_xevent_.InitScrollEvent(kScrollDeviceId, // deviceid
- 0, // x_offset
- scroll_delta, // y_offset
- 0, // x_offset_ordinal
- scroll_delta, // y_offset_ordinal
- 2); // finger_count
- ui::ScrollEvent* event = new ui::ScrollEvent(scoped_xevent_);
- ui::Event::DispatcherApi dispatcher(event);
- dispatcher.set_target(target_);
- return event;
- }
-
- ui::ScrollEvent* GenerateFlingScrollEvent(int fling_delta,
- bool is_cancel) {
- scoped_xevent_.InitFlingScrollEvent(
- kScrollDeviceId, // deviceid
- 0, // x_velocity
- fling_delta, // y_velocity
- 0, // x_velocity_ordinal
- fling_delta, // y_velocity_ordinal
- is_cancel); // is_cancel
- ui::ScrollEvent* event = new ui::ScrollEvent(scoped_xevent_);
- ui::Event::DispatcherApi dispatcher(event);
- dispatcher.set_target(target_);
- return event;
- }
-
- // Creates a synthesized KeyEvent that is not backed by a native event.
- ui::KeyEvent* GenerateSynthesizedKeyEvent(
- bool is_key_press, ui::KeyboardCode code) {
- ui::KeyEvent* event = new ui::KeyEvent(
- is_key_press ? ui::ET_KEY_PRESSED : ui::ET_MOUSE_RELEASED,
- code, 0, true);
- ui::Event::DispatcherApi dispatcher(event);
- dispatcher.set_target(target_);
- return event;
- }
-
- // Creates a synthesized MouseEvent that is not backed by a native event.
- ui::MouseEvent* GenerateSynthesizedMouseEvent(bool is_button_press) {
- ui::MouseEvent* event = new ui::MouseEvent(
- is_button_press ? ui::ET_MOUSE_PRESSED : ui::ET_MOUSE_RELEASED,
- gfx::Point(0, 0),
- gfx::Point(0, 0),
- ui::EF_LEFT_MOUSE_BUTTON);
- ui::Event::DispatcherApi dispatcher(event);
- dispatcher.set_target(target_);
- return event;
- }
-
- void SendActivateStickyKeyPattern(StickyKeysHandler* handler,
- ui::KeyboardCode key_code) {
- scoped_ptr<ui::KeyEvent> ev;
- ev.reset(GenerateKey(true, key_code));
- handler->HandleKeyEvent(ev.get());
- ev.reset(GenerateKey(false, key_code));
- handler->HandleKeyEvent(ev.get());
- }
-
- void SendActivateStickyKeyPattern(aura::RootWindowHostDelegate* delegate,
- ui::KeyboardCode key_code) {
- scoped_ptr<ui::KeyEvent> ev;
- ev.reset(GenerateKey(true, key_code));
- delegate->OnHostKeyEvent(ev.get());
- ev.reset(GenerateKey(false, key_code));
- delegate->OnHostKeyEvent(ev.get());
- }
-
- aura::Window* target() { return target_; }
-
- private:
- // Owned by root window of shell, but we can still delete |target_| safely.
- aura::Window* target_;
- // The root window of |target_|. Not owned.
- aura::Window* root_window_;
-
- // Used to construct the various X events.
- ui::ScopedXI2Event scoped_xevent_;
-
- DISALLOW_COPY_AND_ASSIGN(StickyKeysTest);
-};
-
-TEST_F(StickyKeysTest, BasicOneshotScenarioTest) {
- scoped_ptr<ui::KeyEvent> ev;
- MockStickyKeysHandlerDelegate* mock_delegate =
- new MockStickyKeysHandlerDelegate(this);
- StickyKeysHandler sticky_key(ui::EF_SHIFT_DOWN, mock_delegate);
-
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-
- // By typing Shift key, internal state become ENABLED.
- SendActivateStickyKeyPattern(&sticky_key, ui::VKEY_SHIFT);
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
-
- ev.reset(GenerateKey(true, ui::VKEY_A));
- sticky_key.HandleKeyEvent(ev.get());
-
- // Next keyboard event is shift modified.
- EXPECT_TRUE(ev->flags() & ui::EF_SHIFT_DOWN);
-
- ev.reset(GenerateKey(false, ui::VKEY_A));
- sticky_key.HandleKeyEvent(ev.get());
-
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
- // Making sure Shift up keyboard event is dispatched.
- ASSERT_EQ(2U, mock_delegate->GetEventCount());
- EXPECT_EQ(ui::ET_KEY_PRESSED, mock_delegate->GetEvent(0)->type());
- EXPECT_EQ(ui::VKEY_A,
- static_cast<const ui::KeyEvent*>(mock_delegate->GetEvent(0))
- ->key_code());
- EXPECT_EQ(ui::ET_KEY_RELEASED, mock_delegate->GetEvent(1)->type());
- EXPECT_EQ(ui::VKEY_SHIFT,
- static_cast<const ui::KeyEvent*>(mock_delegate->GetEvent(1))
- ->key_code());
-
- // Enabled state is one shot, so next key event should not be shift modified.
- ev.reset(GenerateKey(true, ui::VKEY_A));
- sticky_key.HandleKeyEvent(ev.get());
- EXPECT_FALSE(ev->flags() & ui::EF_SHIFT_DOWN);
-
- ev.reset(GenerateKey(false, ui::VKEY_A));
- sticky_key.HandleKeyEvent(ev.get());
- EXPECT_FALSE(ev->flags() & ui::EF_SHIFT_DOWN);
-}
-
-TEST_F(StickyKeysTest, BasicLockedScenarioTest) {
- scoped_ptr<ui::KeyEvent> ev;
- MockStickyKeysHandlerDelegate* mock_delegate =
- new MockStickyKeysHandlerDelegate(this);
- StickyKeysHandler sticky_key(ui::EF_SHIFT_DOWN, mock_delegate);
-
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-
- // By typing shift key, internal state become ENABLED.
- SendActivateStickyKeyPattern(&sticky_key, ui::VKEY_SHIFT);
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
-
- // By typing shift key again, internal state become LOCKED.
- SendActivateStickyKeyPattern(&sticky_key, ui::VKEY_SHIFT);
- EXPECT_EQ(StickyKeysHandler::LOCKED, sticky_key.current_state());
-
- // All keyboard events including keyUp become shift modified.
- ev.reset(GenerateKey(true, ui::VKEY_A));
- sticky_key.HandleKeyEvent(ev.get());
- EXPECT_TRUE(ev->flags() & ui::EF_SHIFT_DOWN);
-
- ev.reset(GenerateKey(false, ui::VKEY_A));
- sticky_key.HandleKeyEvent(ev.get());
- EXPECT_TRUE(ev->flags() & ui::EF_SHIFT_DOWN);
-
- // Locked state keeps after normal keyboard event.
- EXPECT_EQ(StickyKeysHandler::LOCKED, sticky_key.current_state());
-
- ev.reset(GenerateKey(true, ui::VKEY_B));
- sticky_key.HandleKeyEvent(ev.get());
- EXPECT_TRUE(ev->flags() & ui::EF_SHIFT_DOWN);
-
- ev.reset(GenerateKey(false, ui::VKEY_B));
- sticky_key.HandleKeyEvent(ev.get());
- EXPECT_TRUE(ev->flags() & ui::EF_SHIFT_DOWN);
-
- EXPECT_EQ(StickyKeysHandler::LOCKED, sticky_key.current_state());
-
- // By typing shift key again, internal state become back to DISABLED.
- SendActivateStickyKeyPattern(&sticky_key, ui::VKEY_SHIFT);
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-}
-
-TEST_F(StickyKeysTest, NonTargetModifierTest) {
- scoped_ptr<ui::KeyEvent> ev;
- MockStickyKeysHandlerDelegate* mock_delegate =
- new MockStickyKeysHandlerDelegate(this);
- StickyKeysHandler sticky_key(ui::EF_SHIFT_DOWN, mock_delegate);
-
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-
- // Non target modifier key does not affect internal state
- ev.reset(GenerateKey(true, ui::VKEY_MENU));
- sticky_key.HandleKeyEvent(ev.get());
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-
- ev.reset(GenerateKey(false, ui::VKEY_MENU));
- sticky_key.HandleKeyEvent(ev.get());
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-
- SendActivateStickyKeyPattern(&sticky_key, ui::VKEY_SHIFT);
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
-
- // Non target modifier key does not affect internal state
- ev.reset(GenerateKey(true, ui::VKEY_MENU));
- sticky_key.HandleKeyEvent(ev.get());
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
-
- ev.reset(GenerateKey(false, ui::VKEY_MENU));
- sticky_key.HandleKeyEvent(ev.get());
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
-
- SendActivateStickyKeyPattern(&sticky_key, ui::VKEY_SHIFT);
- EXPECT_EQ(StickyKeysHandler::LOCKED, sticky_key.current_state());
-
- // Non target modifier key does not affect internal state
- ev.reset(GenerateKey(true, ui::VKEY_MENU));
- sticky_key.HandleKeyEvent(ev.get());
- EXPECT_EQ(StickyKeysHandler::LOCKED, sticky_key.current_state());
-
- ev.reset(GenerateKey(false, ui::VKEY_MENU));
- sticky_key.HandleKeyEvent(ev.get());
- EXPECT_EQ(StickyKeysHandler::LOCKED, sticky_key.current_state());
-}
-
-TEST_F(StickyKeysTest, NormalShortcutTest) {
- // Sticky keys should not be enabled if we perform a normal shortcut.
- scoped_ptr<ui::KeyEvent> ev;
- MockStickyKeysHandlerDelegate* mock_delegate =
- new MockStickyKeysHandlerDelegate(this);
- StickyKeysHandler sticky_key(ui::EF_CONTROL_DOWN, mock_delegate);
-
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-
- // Perform ctrl+n shortcut.
- ev.reset(GenerateKey(true, ui::VKEY_CONTROL));
- sticky_key.HandleKeyEvent(ev.get());
- ev.reset(GenerateKey(true, ui::VKEY_N));
- sticky_key.HandleKeyEvent(ev.get());
- ev.reset(GenerateKey(false, ui::VKEY_N));
- sticky_key.HandleKeyEvent(ev.get());
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-
- // Sticky keys should not be enabled afterwards.
- ev.reset(GenerateKey(false, ui::VKEY_CONTROL));
- sticky_key.HandleKeyEvent(ev.get());
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-}
-
-TEST_F(StickyKeysTest, NormalModifiedClickTest) {
- scoped_ptr<ui::KeyEvent> kev;
- scoped_ptr<ui::MouseEvent> mev;
- MockStickyKeysHandlerDelegate* mock_delegate =
- new MockStickyKeysHandlerDelegate(this);
- StickyKeysHandler sticky_key(ui::EF_CONTROL_DOWN, mock_delegate);
-
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-
- // Perform ctrl+click.
- kev.reset(GenerateKey(true, ui::VKEY_CONTROL));
- sticky_key.HandleKeyEvent(kev.get());
- mev.reset(GenerateMouseEvent(true));
- sticky_key.HandleMouseEvent(mev.get());
- mev.reset(GenerateMouseEvent(false));
- sticky_key.HandleMouseEvent(mev.get());
-
- // Sticky keys should not be enabled afterwards.
- kev.reset(GenerateKey(false, ui::VKEY_CONTROL));
- sticky_key.HandleKeyEvent(kev.get());
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-}
-
-TEST_F(StickyKeysTest, NormalModifiedScrollTest) {
- ui::SetUpScrollDeviceForTest(kScrollDeviceId);
-
- scoped_ptr<ui::KeyEvent> kev;
- scoped_ptr<ui::ScrollEvent> sev;
- MockStickyKeysHandlerDelegate* mock_delegate =
- new MockStickyKeysHandlerDelegate(this);
- StickyKeysHandler sticky_key(ui::EF_CONTROL_DOWN, mock_delegate);
-
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-
- // Perform ctrl+scroll.
- kev.reset(GenerateKey(true, ui::VKEY_CONTROL));
- sev.reset(GenerateFlingScrollEvent(0, true));
- sticky_key.HandleScrollEvent(sev.get());
- sev.reset(GenerateScrollEvent(10));
- sticky_key.HandleScrollEvent(sev.get());
- sev.reset(GenerateFlingScrollEvent(10, false));
- sticky_key.HandleScrollEvent(sev.get());
-
- // Sticky keys should not be enabled afterwards.
- kev.reset(GenerateKey(false, ui::VKEY_CONTROL));
- sticky_key.HandleKeyEvent(kev.get());
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-}
-
-TEST_F(StickyKeysTest, MouseEventOneshot) {
- scoped_ptr<ui::MouseEvent> ev;
- scoped_ptr<ui::KeyEvent> kev;
- MockStickyKeysHandlerDelegate* mock_delegate =
- new MockStickyKeysHandlerDelegate(this);
- StickyKeysHandler sticky_key(ui::EF_CONTROL_DOWN, mock_delegate);
-
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
- SendActivateStickyKeyPattern(&sticky_key, ui::VKEY_CONTROL);
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
-
- // We should still be in the ENABLED state until we get the mouse
- // release event.
- ev.reset(GenerateMouseEvent(true));
- sticky_key.HandleMouseEvent(ev.get());
- EXPECT_TRUE(ev->flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
-
- ev.reset(GenerateMouseEvent(false));
- sticky_key.HandleMouseEvent(ev.get());
- EXPECT_TRUE(ev->flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-
- // Making sure modifier key release event is dispatched in the right order.
- ASSERT_EQ(2u, mock_delegate->GetEventCount());
- EXPECT_EQ(ui::ET_MOUSE_RELEASED, mock_delegate->GetEvent(0)->type());
- EXPECT_EQ(ui::ET_KEY_RELEASED, mock_delegate->GetEvent(1)->type());
- EXPECT_EQ(ui::VKEY_CONTROL,
- static_cast<const ui::KeyEvent*>(mock_delegate->GetEvent(1))
- ->key_code());
-
- // Enabled state is one shot, so next click should not be control modified.
- ev.reset(GenerateMouseEvent(true));
- sticky_key.HandleMouseEvent(ev.get());
- EXPECT_FALSE(ev->flags() & ui::EF_CONTROL_DOWN);
-
- ev.reset(GenerateMouseEvent(false));
- sticky_key.HandleMouseEvent(ev.get());
- EXPECT_FALSE(ev->flags() & ui::EF_CONTROL_DOWN);
-}
-
-TEST_F(StickyKeysTest, MouseEventLocked) {
- scoped_ptr<ui::MouseEvent> ev;
- scoped_ptr<ui::KeyEvent> kev;
- MockStickyKeysHandlerDelegate* mock_delegate =
- new MockStickyKeysHandlerDelegate(this);
- StickyKeysHandler sticky_key(ui::EF_CONTROL_DOWN, mock_delegate);
-
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-
- // Pressing modifier key twice should make us enter lock state.
- SendActivateStickyKeyPattern(&sticky_key, ui::VKEY_CONTROL);
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
- SendActivateStickyKeyPattern(&sticky_key, ui::VKEY_CONTROL);
- EXPECT_EQ(StickyKeysHandler::LOCKED, sticky_key.current_state());
-
- // Mouse events should not disable locked mode.
- for (int i = 0; i < 3; ++i) {
- ev.reset(GenerateMouseEvent(true));
- sticky_key.HandleMouseEvent(ev.get());
- EXPECT_TRUE(ev->flags() & ui::EF_CONTROL_DOWN);
- ev.reset(GenerateMouseEvent(false));
- sticky_key.HandleMouseEvent(ev.get());
- EXPECT_TRUE(ev->flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(StickyKeysHandler::LOCKED, sticky_key.current_state());
- }
-
- // Test with mouse wheel.
- for (int i = 0; i < 3; ++i) {
- ev.reset(GenerateMouseWheelEvent(ui::MouseWheelEvent::kWheelDelta));
- sticky_key.HandleMouseEvent(ev.get());
- ev.reset(GenerateMouseWheelEvent(-ui::MouseWheelEvent::kWheelDelta));
- sticky_key.HandleMouseEvent(ev.get());
- EXPECT_TRUE(ev->flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(StickyKeysHandler::LOCKED, sticky_key.current_state());
- }
-
- // Test mixed case with mouse events and key events.
- ev.reset(GenerateMouseWheelEvent(ui::MouseWheelEvent::kWheelDelta));
- sticky_key.HandleMouseEvent(ev.get());
- EXPECT_TRUE(ev->flags() & ui::EF_CONTROL_DOWN);
- kev.reset(GenerateKey(true, ui::VKEY_N));
- sticky_key.HandleKeyEvent(kev.get());
- EXPECT_TRUE(kev->flags() & ui::EF_CONTROL_DOWN);
- kev.reset(GenerateKey(false, ui::VKEY_N));
- sticky_key.HandleKeyEvent(kev.get());
- EXPECT_TRUE(kev->flags() & ui::EF_CONTROL_DOWN);
-
- EXPECT_EQ(StickyKeysHandler::LOCKED, sticky_key.current_state());
-}
-
-TEST_F(StickyKeysTest, ScrollEventOneshot) {
- ui::SetUpScrollDeviceForTest(kScrollDeviceId);
- // Disable Australlian scrolling.
- ui::DeviceDataManager::GetInstance()->set_natural_scroll_enabled(true);
-
- scoped_ptr<ui::ScrollEvent> ev;
- scoped_ptr<ui::KeyEvent> kev;
- MockStickyKeysHandlerDelegate* mock_delegate =
- new MockStickyKeysHandlerDelegate(this);
- StickyKeysHandler sticky_key(ui::EF_CONTROL_DOWN, mock_delegate);
-
- int scroll_deltas[] = {-10, 10};
- for (int i = 0; i < 2; ++i) {
- mock_delegate->ClearEvents();
-
- // Enable sticky keys.
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
- SendActivateStickyKeyPattern(&sticky_key, ui::VKEY_CONTROL);
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
-
- // Test a scroll sequence. Sticky keys should only be disabled at the end
- // of the scroll sequence. Fling cancel event starts the scroll sequence.
- ev.reset(GenerateFlingScrollEvent(0, true));
- sticky_key.HandleScrollEvent(ev.get());
- EXPECT_TRUE(ev->flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
-
- // Scrolls should all be modified but not disable sticky keys.
- for (int j = 0; j < 3; ++j) {
- ev.reset(GenerateScrollEvent(scroll_deltas[i]));
- sticky_key.HandleScrollEvent(ev.get());
- EXPECT_TRUE(ev->flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
- }
-
- // Fling start event ends scroll sequence.
- ev.reset(GenerateFlingScrollEvent(scroll_deltas[i], false));
- sticky_key.HandleScrollEvent(ev.get());
- EXPECT_TRUE(ev->flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-
- ASSERT_EQ(2U, mock_delegate->GetEventCount());
- EXPECT_EQ(ui::ET_SCROLL_FLING_START, mock_delegate->GetEvent(0)->type());
- EXPECT_FLOAT_EQ(scroll_deltas[i],
- static_cast<const ui::ScrollEvent*>(
- mock_delegate->GetEvent(0))->y_offset());
- EXPECT_EQ(ui::ET_KEY_RELEASED, mock_delegate->GetEvent(1)->type());
- EXPECT_EQ(ui::VKEY_CONTROL,
- static_cast<const ui::KeyEvent*>(mock_delegate->GetEvent(1))
- ->key_code());
- }
-}
-
-TEST_F(StickyKeysTest, ScrollDirectionChanged) {
- ui::SetUpScrollDeviceForTest(kScrollDeviceId);
- // Disable Australlian scrolling.
- ui::DeviceDataManager::GetInstance()->set_natural_scroll_enabled(true);
-
- scoped_ptr<ui::ScrollEvent> ev;
- scoped_ptr<ui::KeyEvent> kev;
- MockStickyKeysHandlerDelegate* mock_delegate =
- new MockStickyKeysHandlerDelegate(this);
- StickyKeysHandler sticky_key(ui::EF_CONTROL_DOWN, mock_delegate);
-
- // Test direction change with both boundary value and negative value.
- const int direction_change_values[2] = {0, -10};
- for (int i = 0; i < 2; ++i) {
- SendActivateStickyKeyPattern(&sticky_key, ui::VKEY_CONTROL);
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
-
- // Fling cancel starts scroll sequence.
- ev.reset(GenerateFlingScrollEvent(0, true));
- sticky_key.HandleScrollEvent(ev.get());
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
-
- // Test that changing directions in a scroll sequence will
- // return sticky keys to DISABLED state.
- for (int j = 0; j < 3; ++j) {
- ev.reset(GenerateScrollEvent(10));
- sticky_key.HandleScrollEvent(ev.get());
- EXPECT_TRUE(ev->flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
- }
-
- ev.reset(GenerateScrollEvent(direction_change_values[i]));
- sticky_key.HandleScrollEvent(ev.get());
- EXPECT_FALSE(ev->flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
- }
-}
-
-TEST_F(StickyKeysTest, ScrollEventLocked) {
- ui::SetUpScrollDeviceForTest(kScrollDeviceId);
- // Disable Australlian scrolling.
- ui::DeviceDataManager::GetInstance()->set_natural_scroll_enabled(true);
-
- scoped_ptr<ui::ScrollEvent> ev;
- scoped_ptr<ui::KeyEvent> kev;
- MockStickyKeysHandlerDelegate* mock_delegate =
- new MockStickyKeysHandlerDelegate(this);
- StickyKeysHandler sticky_key(ui::EF_CONTROL_DOWN, mock_delegate);
-
- // Lock sticky keys.
- SendActivateStickyKeyPattern(&sticky_key, ui::VKEY_CONTROL);
- SendActivateStickyKeyPattern(&sticky_key, ui::VKEY_CONTROL);
- EXPECT_EQ(StickyKeysHandler::LOCKED, sticky_key.current_state());
-
- // Test scroll events are correctly modified in locked state.
- for (int i = 0; i < 5; ++i) {
- // Fling cancel starts scroll sequence.
- ev.reset(GenerateFlingScrollEvent(0, true));
- sticky_key.HandleScrollEvent(ev.get());
-
- ev.reset(GenerateScrollEvent(10));
- sticky_key.HandleScrollEvent(ev.get());
- EXPECT_TRUE(ev->flags() & ui::EF_CONTROL_DOWN);
- ev.reset(GenerateScrollEvent(-10));
- sticky_key.HandleScrollEvent(ev.get());
- EXPECT_TRUE(ev->flags() & ui::EF_CONTROL_DOWN);
-
- // Fling start ends scroll sequence.
- ev.reset(GenerateFlingScrollEvent(-10, false));
- sticky_key.HandleScrollEvent(ev.get());
- }
-
- EXPECT_EQ(StickyKeysHandler::LOCKED, sticky_key.current_state());
-}
-
-TEST_F(StickyKeysTest, EventTargetDestroyed) {
- scoped_ptr<ui::KeyEvent> ev;
- MockStickyKeysHandlerDelegate* mock_delegate =
- new MockStickyKeysHandlerDelegate(this);
- StickyKeysHandler sticky_key(ui::EF_CONTROL_DOWN, mock_delegate);
-
- target()->Focus();
-
- // Go into ENABLED state.
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
- SendActivateStickyKeyPattern(&sticky_key, ui::VKEY_CONTROL);
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
-
- // CTRL+J is a special shortcut that will destroy the event target.
- ev.reset(GenerateKey(true, ui::VKEY_J));
- sticky_key.HandleKeyEvent(ev.get());
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
- EXPECT_FALSE(target());
-}
-
-TEST_F(StickyKeysTest, SynthesizedEvents) {
- // Non-native, internally generated events should be properly handled
- // by sticky keys.
- MockStickyKeysHandlerDelegate* mock_delegate =
- new MockStickyKeysHandlerDelegate(this);
- StickyKeysHandler sticky_key(ui::EF_CONTROL_DOWN, mock_delegate);
-
- // Test non-native key events.
- scoped_ptr<ui::KeyEvent> kev;
- SendActivateStickyKeyPattern(&sticky_key, ui::VKEY_CONTROL);
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
-
- kev.reset(GenerateSynthesizedKeyEvent(true, ui::VKEY_K));
- sticky_key.HandleKeyEvent(kev.get());
- EXPECT_TRUE(kev->flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-
- kev.reset(GenerateSynthesizedKeyEvent(false, ui::VKEY_K));
- sticky_key.HandleKeyEvent(kev.get());
- EXPECT_FALSE(kev->flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-
- // Test non-native mouse events.
- SendActivateStickyKeyPattern(&sticky_key, ui::VKEY_CONTROL);
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
-
- scoped_ptr<ui::MouseEvent> mev;
- mev.reset(GenerateSynthesizedMouseEvent(true));
- sticky_key.HandleMouseEvent(mev.get());
- EXPECT_TRUE(mev->flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(StickyKeysHandler::ENABLED, sticky_key.current_state());
-
- mev.reset(GenerateSynthesizedMouseEvent(false));
- sticky_key.HandleMouseEvent(mev.get());
- EXPECT_TRUE(mev->flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(StickyKeysHandler::DISABLED, sticky_key.current_state());
-}
-
-TEST_F(StickyKeysTest, KeyEventDispatchImpl) {
- // Test the actual key event dispatch implementation.
- EventBuffer buffer;
- ScopedVector<ui::Event> events;
- aura::RootWindowHostDelegate* delegate = Shell::GetPrimaryRootWindow()
- ->GetDispatcher()->AsRootWindowHostDelegate();
- Shell::GetInstance()->AddPreTargetHandler(&buffer);
- Shell::GetInstance()->sticky_keys()->Enable(true);
-
- SendActivateStickyKeyPattern(delegate, ui::VKEY_CONTROL);
- scoped_ptr<ui::KeyEvent> ev;
- buffer.PopEvents(&events);
-
- // Test key press event is correctly modified and modifier release
- // event is sent.
- ev.reset(GenerateKey(true, ui::VKEY_C));
- delegate->OnHostKeyEvent(ev.get());
- buffer.PopEvents(&events);
- EXPECT_EQ(2u, events.size());
- EXPECT_EQ(ui::ET_KEY_PRESSED, events[0]->type());
- EXPECT_EQ(ui::VKEY_C, static_cast<ui::KeyEvent*>(events[0])->key_code());
- EXPECT_TRUE(events[0]->flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(ui::ET_KEY_RELEASED, events[1]->type());
- EXPECT_EQ(ui::VKEY_CONTROL,
- static_cast<ui::KeyEvent*>(events[1])->key_code());
-
- // Test key release event is not modified.
- ev.reset(GenerateKey(false, ui::VKEY_C));
- delegate->OnHostKeyEvent(ev.get());
- buffer.PopEvents(&events);
- EXPECT_EQ(1u, events.size());
- EXPECT_EQ(ui::ET_KEY_RELEASED, events[0]->type());
- EXPECT_EQ(ui::VKEY_C,
- static_cast<ui::KeyEvent*>(events[0])->key_code());
- EXPECT_FALSE(events[0]->flags() & ui::EF_CONTROL_DOWN);
-
- Shell::GetInstance()->RemovePreTargetHandler(&buffer);
-}
-
-TEST_F(StickyKeysTest, MouseEventDispatchImpl) {
- // Test the actual sticky mouse event dispatch implementation.
- EventBuffer buffer;
- ScopedVector<ui::Event> events;
- aura::RootWindowHostDelegate* delegate = Shell::GetPrimaryRootWindow()
- ->GetDispatcher()->AsRootWindowHostDelegate();
- Shell::GetInstance()->AddPreTargetHandler(&buffer);
- Shell::GetInstance()->sticky_keys()->Enable(true);
-
- scoped_ptr<ui::MouseEvent> ev;
- SendActivateStickyKeyPattern(delegate, ui::VKEY_CONTROL);
- buffer.PopEvents(&events);
-
- // Test mouse press event is correctly modified.
- ev.reset(GenerateMouseEvent(true));
- delegate->OnHostMouseEvent(ev.get());
- buffer.PopEvents(&events);
- EXPECT_EQ(1u, events.size());
- EXPECT_EQ(ui::ET_MOUSE_PRESSED, events[0]->type());
- EXPECT_TRUE(events[0]->flags() & ui::EF_CONTROL_DOWN);
-
- // Test mouse release event is correctly modified and modifier release
- // event is sent.
- ev.reset(GenerateMouseEvent(false));
- delegate->OnHostMouseEvent(ev.get());
- buffer.PopEvents(&events);
- EXPECT_EQ(2u, events.size());
- EXPECT_EQ(ui::ET_MOUSE_RELEASED, events[0]->type());
- EXPECT_TRUE(events[0]->flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(ui::ET_KEY_RELEASED, events[1]->type());
- EXPECT_EQ(ui::VKEY_CONTROL,
- static_cast<ui::KeyEvent*>(events[1])->key_code());
-
- Shell::GetInstance()->RemovePreTargetHandler(&buffer);
-}
-
-TEST_F(StickyKeysTest, MouseWheelEventDispatchImpl) {
- // Test the actual mouse wheel event dispatch implementation.
- EventBuffer buffer;
- ScopedVector<ui::Event> events;
- aura::RootWindowHostDelegate* delegate = Shell::GetPrimaryRootWindow()
- ->GetDispatcher()->AsRootWindowHostDelegate();
- Shell::GetInstance()->AddPreTargetHandler(&buffer);
- Shell::GetInstance()->sticky_keys()->Enable(true);
-
- scoped_ptr<ui::MouseWheelEvent> ev;
- SendActivateStickyKeyPattern(delegate, ui::VKEY_CONTROL);
- buffer.PopEvents(&events);
-
- // Test positive mouse wheel event is correctly modified and modifier release
- // event is sent.
- ev.reset(GenerateMouseWheelEvent(ui::MouseWheelEvent::kWheelDelta));
- delegate->OnHostMouseEvent(ev.get());
- buffer.PopEvents(&events);
- EXPECT_EQ(2u, events.size());
- EXPECT_TRUE(events[0]->IsMouseWheelEvent());
- EXPECT_EQ(ui::MouseWheelEvent::kWheelDelta,
- static_cast<ui::MouseWheelEvent*>(events[0])->y_offset());
- EXPECT_TRUE(events[0]->flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(ui::ET_KEY_RELEASED, events[1]->type());
- EXPECT_EQ(ui::VKEY_CONTROL,
- static_cast<ui::KeyEvent*>(events[1])->key_code());
-
- // Test negative mouse wheel event is correctly modified and modifier release
- // event is sent.
- SendActivateStickyKeyPattern(delegate, ui::VKEY_CONTROL);
- buffer.PopEvents(&events);
-
- ev.reset(GenerateMouseWheelEvent(-ui::MouseWheelEvent::kWheelDelta));
- delegate->OnHostMouseEvent(ev.get());
- buffer.PopEvents(&events);
- EXPECT_EQ(2u, events.size());
- EXPECT_TRUE(events[0]->IsMouseWheelEvent());
- EXPECT_EQ(-ui::MouseWheelEvent::kWheelDelta,
- static_cast<ui::MouseWheelEvent*>(events[0])->y_offset());
- EXPECT_TRUE(events[0]->flags() & ui::EF_CONTROL_DOWN);
- EXPECT_EQ(ui::ET_KEY_RELEASED, events[1]->type());
- EXPECT_EQ(ui::VKEY_CONTROL,
- static_cast<ui::KeyEvent*>(events[1])->key_code());
-
- Shell::GetInstance()->RemovePreTargetHandler(&buffer);
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/system_background_controller.cc b/chromium/ash/wm/system_background_controller.cc
deleted file mode 100644
index 7e4054e1378..00000000000
--- a/chromium/ash/wm/system_background_controller.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/system_background_controller.h"
-
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_type.h"
-
-namespace ash {
-namespace internal {
-
-SystemBackgroundController::SystemBackgroundController(
- aura::Window* root_window,
- SkColor color)
- : root_window_(root_window),
- layer_(new ui::Layer(ui::LAYER_SOLID_COLOR)) {
- root_window_->AddObserver(this);
- layer_->SetColor(color);
-
- ui::Layer* root_layer = root_window_->layer();
- layer_->SetBounds(gfx::Rect(root_layer->bounds().size()));
- root_layer->Add(layer_.get());
- root_layer->StackAtBottom(layer_.get());
-}
-
-SystemBackgroundController::~SystemBackgroundController() {
- root_window_->RemoveObserver(this);
-}
-
-void SystemBackgroundController::SetColor(SkColor color) {
- layer_->SetColor(color);
-}
-
-void SystemBackgroundController::OnWindowBoundsChanged(
- aura::Window* root,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) {
- DCHECK_EQ(root_window_, root);
- layer_->SetBounds(gfx::Rect(root_window_->layer()->bounds().size()));
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/system_background_controller.h b/chromium/ash/wm/system_background_controller.h
deleted file mode 100644
index 8d74cdd80a3..00000000000
--- a/chromium/ash/wm/system_background_controller.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_SYSTEM_BACKGROUND_CONTROLLER_H_
-#define ASH_WM_SYSTEM_BACKGROUND_CONTROLLER_H_
-
-#include <string>
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "ui/aura/window_observer.h"
-
-namespace ui {
-class Layer;
-}
-
-namespace ash {
-namespace internal {
-
-// SystemBackgroundController manages a ui::Layer that's stacked at the bottom
-// of an aura::RootWindow's children. It exists solely to obscure portions of
-// the root layer that aren't covered by any other layers (e.g. before the
-// desktop background image is loaded at startup, or when we scale down all of
-// the other layers as part of a power-button or window-management animation).
-// It should never be transformed or restacked.
-class SystemBackgroundController : public aura::WindowObserver {
- public:
- SystemBackgroundController(aura::Window* root_window, SkColor color);
- virtual ~SystemBackgroundController();
-
- void SetColor(SkColor color);
-
- // aura::WindowObserver overrides:
- virtual void OnWindowBoundsChanged(aura::Window* root,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE;
-
- private:
- class HostContentLayerDelegate;
-
- aura::Window* root_window_; // not owned
-
- scoped_ptr<ui::Layer> layer_;
-
- DISALLOW_COPY_AND_ASSIGN(SystemBackgroundController);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_SYSTEM_BACKGROUND_CONTROLLER_H_
diff --git a/chromium/ash/wm/system_gesture_event_filter.cc b/chromium/ash/wm/system_gesture_event_filter.cc
deleted file mode 100644
index eb206b9932a..00000000000
--- a/chromium/ash/wm/system_gesture_event_filter.cc
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/system_gesture_event_filter.h"
-
-#include "ash/accelerators/accelerator_controller.h"
-#include "ash/accelerators/accelerator_table.h"
-#include "ash/ash_switches.h"
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/gestures/long_press_affordance_handler.h"
-#include "ash/wm/gestures/overview_gesture_handler.h"
-#include "ash/wm/gestures/system_pinch_handler.h"
-#include "ash/wm/gestures/two_finger_drag_handler.h"
-#include "ash/wm/window_util.h"
-#include "base/command_line.h"
-#include "ui/aura/root_window.h"
-#include "ui/base/ui_base_switches.h"
-#include "ui/events/event.h"
-
-#if defined(OS_CHROMEOS)
-#include "ui/events/x/touch_factory_x11.h"
-#endif
-
-namespace {
-
-aura::Window* GetTargetForSystemGestureEvent(aura::Window* target) {
- aura::Window* system_target = target;
- if (!system_target || system_target == target->GetRootWindow())
- system_target = ash::wm::GetActiveWindow();
- if (system_target)
- system_target = system_target->GetToplevelWindow();
- return system_target;
-}
-
-} // namespace
-
-namespace ash {
-namespace internal {
-
-SystemGestureEventFilter::SystemGestureEventFilter()
- : system_gestures_enabled_(CommandLine::ForCurrentProcess()->
- HasSwitch(ash::switches::kAshEnableAdvancedGestures)),
- long_press_affordance_(new LongPressAffordanceHandler),
- two_finger_drag_(new TwoFingerDragHandler) {
- if (switches::UseOverviewMode())
- overview_gesture_handler_.reset(new OverviewGestureHandler);
-}
-
-SystemGestureEventFilter::~SystemGestureEventFilter() {
-}
-
-void SystemGestureEventFilter::OnMouseEvent(ui::MouseEvent* event) {
-#if defined(OS_CHROMEOS) && !defined(USE_OZONE)
- if (event->type() == ui::ET_MOUSE_PRESSED && event->native_event() &&
- ui::TouchFactory::GetInstance()->IsTouchDevicePresent() &&
- Shell::GetInstance()->delegate()) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(UMA_MOUSE_DOWN);
- }
-#endif
-}
-
-void SystemGestureEventFilter::OnScrollEvent(ui::ScrollEvent* event) {
- if (overview_gesture_handler_ &&
- overview_gesture_handler_->ProcessScrollEvent(*event)) {
- event->StopPropagation();
- return;
- }
-}
-
-void SystemGestureEventFilter::OnTouchEvent(ui::TouchEvent* event) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- ash::TouchUMA::GetInstance()->RecordTouchEvent(target, *event);
-}
-
-void SystemGestureEventFilter::OnGestureEvent(ui::GestureEvent* event) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- ash::TouchUMA::GetInstance()->RecordGestureEvent(target, *event);
- long_press_affordance_->ProcessEvent(target, event);
-
- if (two_finger_drag_->ProcessGestureEvent(target, *event)) {
- event->StopPropagation();
- return;
- }
-
- if (overview_gesture_handler_ &&
- overview_gesture_handler_->ProcessGestureEvent(*event)) {
- event->StopPropagation();
- return;
- }
-
- if (!system_gestures_enabled_)
- return;
-
- aura::Window* system_target = GetTargetForSystemGestureEvent(target);
- if (!system_target)
- return;
-
- RootWindowController* root_controller =
- GetRootWindowController(system_target->GetRootWindow());
- CHECK(root_controller);
- aura::Window* desktop_container = root_controller->GetContainer(
- ash::internal::kShellWindowId_DesktopBackgroundContainer);
- if (desktop_container->Contains(system_target)) {
- // The gesture was on the desktop window.
- if (event->type() == ui::ET_GESTURE_MULTIFINGER_SWIPE &&
- event->details().swipe_up() &&
- event->details().touch_points() ==
- SystemPinchHandler::kSystemGesturePoints) {
- ash::AcceleratorController* accelerator =
- ash::Shell::GetInstance()->accelerator_controller();
- if (accelerator->PerformAction(CYCLE_FORWARD_MRU, ui::Accelerator()))
- event->StopPropagation();
- }
- return;
- }
-
- WindowPinchHandlerMap::iterator find = pinch_handlers_.find(system_target);
- if (find != pinch_handlers_.end()) {
- SystemGestureStatus status =
- (*find).second->ProcessGestureEvent(*event);
- if (status == SYSTEM_GESTURE_END)
- ClearGestureHandlerForWindow(system_target);
- event->StopPropagation();
- } else {
- if (event->type() == ui::ET_GESTURE_BEGIN &&
- event->details().touch_points() >=
- SystemPinchHandler::kSystemGesturePoints) {
- pinch_handlers_[system_target] = new SystemPinchHandler(system_target);
- system_target->AddObserver(this);
- event->StopPropagation();
- }
- }
-}
-
-void SystemGestureEventFilter::OnWindowVisibilityChanged(aura::Window* window,
- bool visible) {
- if (!visible)
- ClearGestureHandlerForWindow(window);
-}
-
-void SystemGestureEventFilter::OnWindowDestroying(aura::Window* window) {
- ClearGestureHandlerForWindow(window);
-}
-
-void SystemGestureEventFilter::ClearGestureHandlerForWindow(
- aura::Window* window) {
- WindowPinchHandlerMap::iterator find = pinch_handlers_.find(window);
- if (find == pinch_handlers_.end()) {
- // The handler may have already been removed.
- return;
- }
- delete (*find).second;
- pinch_handlers_.erase(find);
- window->RemoveObserver(this);
-}
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/system_gesture_event_filter.h b/chromium/ash/wm/system_gesture_event_filter.h
deleted file mode 100644
index 0609802c1d2..00000000000
--- a/chromium/ash/wm/system_gesture_event_filter.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_SYSTEM_GESTURE_EVENT_FILTER_H_
-#define ASH_WM_SYSTEM_GESTURE_EVENT_FILTER_H_
-
-#include "ash/shell.h"
-#include "ash/touch/touch_uma.h"
-#include "base/timer/timer.h"
-#include "ui/aura/window_observer.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/point.h"
-
-#include <map>
-
-namespace aura {
-class Window;
-}
-
-namespace ui {
-class LocatedEvent;
-}
-
-namespace ash {
-
-namespace test {
-class SystemGestureEventFilterTest;
-}
-
-namespace internal {
-class LongPressAffordanceHandler;
-class OverviewGestureHandler;
-class SystemPinchHandler;
-class TouchUMA;
-class TwoFingerDragHandler;
-
-// An event filter which handles system level gesture events.
-class SystemGestureEventFilter : public ui::EventHandler,
- public aura::WindowObserver {
- public:
- SystemGestureEventFilter();
- virtual ~SystemGestureEventFilter();
-
- // Overridden from ui::EventHandler:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- // Overridden from aura::WindowObserver.
- virtual void OnWindowVisibilityChanged(aura::Window* window,
- bool visible) OVERRIDE;
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
-
- private:
- friend class ash::test::SystemGestureEventFilterTest;
-
- // Removes system-gesture handlers for a window.
- void ClearGestureHandlerForWindow(aura::Window* window);
-
- typedef std::map<aura::Window*, SystemPinchHandler*> WindowPinchHandlerMap;
- // Created on demand when a system-level pinch gesture is initiated. Destroyed
- // when the system-level pinch gesture ends for the window.
- WindowPinchHandlerMap pinch_handlers_;
-
- bool system_gestures_enabled_;
-
- scoped_ptr<LongPressAffordanceHandler> long_press_affordance_;
- scoped_ptr<OverviewGestureHandler> overview_gesture_handler_;
- scoped_ptr<TwoFingerDragHandler> two_finger_drag_;
-
- DISALLOW_COPY_AND_ASSIGN(SystemGestureEventFilter);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_SYSTEM_GESTURE_EVENT_FILTER_H_
diff --git a/chromium/ash/wm/system_gesture_event_filter_unittest.cc b/chromium/ash/wm/system_gesture_event_filter_unittest.cc
deleted file mode 100644
index 7a262771a14..00000000000
--- a/chromium/ash/wm/system_gesture_event_filter_unittest.cc
+++ /dev/null
@@ -1,673 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/system_gesture_event_filter.h"
-
-#include "ash/accelerators/accelerator_controller.h"
-#include "ash/ash_switches.h"
-#include "ash/display/display_manager.h"
-#include "ash/launcher/launcher.h"
-#include "ash/shelf/shelf_model.h"
-#include "ash/shell.h"
-#include "ash/system/brightness_control_delegate.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/display_manager_test_api.h"
-#include "ash/test/shell_test_api.h"
-#include "ash/test/test_shelf_delegate.h"
-#include "ash/volume_control_delegate.h"
-#include "ash/wm/gestures/long_press_affordance_handler.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/snap_sizer.h"
-#include "base/command_line.h"
-#include "base/time/time.h"
-#include "base/timer/timer.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/ui_base_switches.h"
-#include "ui/events/event.h"
-#include "ui/events/event_utils.h"
-#include "ui/events/gestures/gesture_configuration.h"
-#include "ui/gfx/screen.h"
-#include "ui/gfx/size.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-namespace test {
-
-namespace {
-
-class DelegatePercentTracker {
- public:
- explicit DelegatePercentTracker()
- : handle_percent_count_(0),
- handle_percent_(0){
- }
- int handle_percent_count() const {
- return handle_percent_count_;
- }
- double handle_percent() const {
- return handle_percent_;
- }
- void SetPercent(double percent) {
- handle_percent_ = percent;
- handle_percent_count_++;
- }
-
- private:
- int handle_percent_count_;
- int handle_percent_;
-
- DISALLOW_COPY_AND_ASSIGN(DelegatePercentTracker);
-};
-
-class DummyVolumeControlDelegate : public VolumeControlDelegate,
- public DelegatePercentTracker {
- public:
- explicit DummyVolumeControlDelegate() {}
- virtual ~DummyVolumeControlDelegate() {}
-
- virtual bool HandleVolumeMute(const ui::Accelerator& accelerator) OVERRIDE {
- return true;
- }
- virtual bool HandleVolumeDown(const ui::Accelerator& accelerator) OVERRIDE {
- return true;
- }
- virtual bool HandleVolumeUp(const ui::Accelerator& accelerator) OVERRIDE {
- return true;
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DummyVolumeControlDelegate);
-};
-
-class DummyBrightnessControlDelegate : public BrightnessControlDelegate,
- public DelegatePercentTracker {
- public:
- explicit DummyBrightnessControlDelegate() {}
- virtual ~DummyBrightnessControlDelegate() {}
-
- virtual bool HandleBrightnessDown(
- const ui::Accelerator& accelerator) OVERRIDE { return true; }
- virtual bool HandleBrightnessUp(
- const ui::Accelerator& accelerator) OVERRIDE { return true; }
- virtual void SetBrightnessPercent(double percent, bool gradual) OVERRIDE {
- SetPercent(percent);
- }
- virtual void GetBrightnessPercent(
- const base::Callback<void(double)>& callback) OVERRIDE {
- callback.Run(100.0);
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DummyBrightnessControlDelegate);
-};
-
-class ResizableWidgetDelegate : public views::WidgetDelegateView {
- public:
- ResizableWidgetDelegate() {}
- virtual ~ResizableWidgetDelegate() {}
-
- private:
- virtual bool CanResize() const OVERRIDE { return true; }
- virtual bool CanMaximize() const OVERRIDE { return true; }
- virtual void DeleteDelegate() OVERRIDE { delete this; }
-
- DISALLOW_COPY_AND_ASSIGN(ResizableWidgetDelegate);
-};
-
-// Support class for testing windows with a maximum size.
-class MaxSizeNCFV : public views::NonClientFrameView {
- public:
- MaxSizeNCFV() {}
- private:
- virtual gfx::Size GetMaximumSize() OVERRIDE {
- return gfx::Size(200, 200);
- }
- virtual gfx::Rect GetBoundsForClientView() const OVERRIDE {
- return gfx::Rect();
- };
-
- virtual gfx::Rect GetWindowBoundsForClientBounds(
- const gfx::Rect& client_bounds) const OVERRIDE {
- return gfx::Rect();
- };
-
- // This function must ask the ClientView to do a hittest. We don't do this in
- // the parent NonClientView because that makes it more difficult to calculate
- // hittests for regions that are partially obscured by the ClientView, e.g.
- // HTSYSMENU.
- virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE {
- return HTNOWHERE;
- }
- virtual void GetWindowMask(const gfx::Size& size,
- gfx::Path* window_mask) OVERRIDE {}
- virtual void ResetWindowControls() OVERRIDE {}
- virtual void UpdateWindowIcon() OVERRIDE {}
- virtual void UpdateWindowTitle() OVERRIDE {}
-
- DISALLOW_COPY_AND_ASSIGN(MaxSizeNCFV);
-};
-
-class MaxSizeWidgetDelegate : public views::WidgetDelegateView {
- public:
- MaxSizeWidgetDelegate() {}
- virtual ~MaxSizeWidgetDelegate() {}
-
- private:
- virtual bool CanResize() const OVERRIDE { return true; }
- virtual bool CanMaximize() const OVERRIDE { return false; }
- virtual void DeleteDelegate() OVERRIDE { delete this; }
- virtual views::NonClientFrameView* CreateNonClientFrameView(
- views::Widget* widget) OVERRIDE {
- return new MaxSizeNCFV;
- }
-
- DISALLOW_COPY_AND_ASSIGN(MaxSizeWidgetDelegate);
-};
-
-} // namespace
-
-class SystemGestureEventFilterTest
- : public AshTestBase,
- public testing::WithParamInterface<bool> {
- public:
- SystemGestureEventFilterTest() : AshTestBase(), docked_enabled_(GetParam()) {}
- virtual ~SystemGestureEventFilterTest() {}
-
- internal::LongPressAffordanceHandler* GetLongPressAffordance() {
- ShellTestApi shell_test(Shell::GetInstance());
- return shell_test.system_gesture_event_filter()->
- long_press_affordance_.get();
- }
-
- base::OneShotTimer<internal::LongPressAffordanceHandler>*
- GetLongPressAffordanceTimer() {
- return &GetLongPressAffordance()->timer_;
- }
-
- aura::Window* GetLongPressAffordanceTarget() {
- return GetLongPressAffordance()->tap_down_target_;
- }
-
- views::View* GetLongPressAffordanceView() {
- return reinterpret_cast<views::View*>(
- GetLongPressAffordance()->view_.get());
- }
-
- // Overridden from AshTestBase:
- virtual void SetUp() OVERRIDE {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshEnableAdvancedGestures);
- if (docked_enabled_) {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshEnableDockedWindows);
- }
- test::AshTestBase::SetUp();
- // Enable brightness key.
- test::DisplayManagerTestApi(Shell::GetInstance()->display_manager()).
- SetFirstDisplayAsInternalDisplay();
- }
-
- private:
- // true if docked windows are enabled with a flag.
- bool docked_enabled_;
-
- DISALLOW_COPY_AND_ASSIGN(SystemGestureEventFilterTest);
-};
-
-ui::GestureEvent* CreateGesture(ui::EventType type,
- int x,
- int y,
- float delta_x,
- float delta_y,
- int touch_id) {
- return new ui::GestureEvent(type, x, y, 0,
- base::TimeDelta::FromMilliseconds(base::Time::Now().ToDoubleT() * 1000),
- ui::GestureEventDetails(type, delta_x, delta_y), 1 << touch_id);
-}
-
-TEST_P(SystemGestureEventFilterTest, LongPressAffordanceStateOnCaptureLoss) {
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
-
- aura::test::TestWindowDelegate delegate;
- scoped_ptr<aura::Window> window0(
- aura::test::CreateTestWindowWithDelegate(
- &delegate, 9, gfx::Rect(0, 0, 100, 100), root_window));
- scoped_ptr<aura::Window> window1(
- aura::test::CreateTestWindowWithDelegate(
- &delegate, 10, gfx::Rect(0, 0, 100, 50), window0.get()));
- scoped_ptr<aura::Window> window2(
- aura::test::CreateTestWindowWithDelegate(
- &delegate, 11, gfx::Rect(0, 50, 100, 50), window0.get()));
-
- const int kTouchId = 5;
-
- // Capture first window.
- window1->SetCapture();
- EXPECT_TRUE(window1->HasCapture());
-
- // Send touch event to first window.
- ui::TouchEvent press(ui::ET_TOUCH_PRESSED,
- gfx::Point(10, 10),
- kTouchId,
- ui::EventTimeForNow());
- root_window->GetDispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(
- &press);
- EXPECT_TRUE(window1->HasCapture());
-
- base::OneShotTimer<internal::LongPressAffordanceHandler>* timer =
- GetLongPressAffordanceTimer();
- EXPECT_TRUE(timer->IsRunning());
- EXPECT_EQ(window1, GetLongPressAffordanceTarget());
-
- // Force timeout so that the affordance animation can start.
- timer->user_task().Run();
- timer->Stop();
- EXPECT_TRUE(GetLongPressAffordance()->is_animating());
-
- // Change capture.
- window2->SetCapture();
- EXPECT_TRUE(window2->HasCapture());
-
- EXPECT_TRUE(GetLongPressAffordance()->is_animating());
- EXPECT_EQ(window1, GetLongPressAffordanceTarget());
-
- // Animate to completion.
- GetLongPressAffordance()->End(); // end grow animation.
- // Force timeout to start shrink animation.
- EXPECT_TRUE(timer->IsRunning());
- timer->user_task().Run();
- timer->Stop();
- EXPECT_TRUE(GetLongPressAffordance()->is_animating());
- GetLongPressAffordance()->End(); // end shrink animation.
-
- // Check if state has reset.
- EXPECT_EQ(NULL, GetLongPressAffordanceTarget());
- EXPECT_EQ(NULL, GetLongPressAffordanceView());
-}
-
-TEST_P(SystemGestureEventFilterTest, MultiFingerSwipeGestures) {
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- views::Widget* toplevel = views::Widget::CreateWindowWithContextAndBounds(
- new ResizableWidgetDelegate, root_window, gfx::Rect(0, 0, 600, 600));
- toplevel->Show();
-
- const int kSteps = 15;
- const int kTouchPoints = 4;
- gfx::Point points[kTouchPoints] = {
- gfx::Point(250, 250),
- gfx::Point(250, 350),
- gfx::Point(350, 250),
- gfx::Point(350, 350)
- };
-
- aura::test::EventGenerator generator(root_window,
- toplevel->GetNativeWindow());
-
- // Swipe down to minimize.
- generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, 0, 150);
-
- wm::WindowState* toplevel_state =
- wm::GetWindowState(toplevel->GetNativeWindow());
- EXPECT_TRUE(toplevel_state->IsMinimized());
-
- toplevel->Restore();
-
- // Swipe up to maximize.
- generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, 0, -150);
- EXPECT_TRUE(toplevel_state->IsMaximized());
-
- toplevel->Restore();
-
- // Swipe right to snap.
- gfx::Rect normal_bounds = toplevel->GetWindowBoundsInScreen();
- generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, 150, 0);
- gfx::Rect right_tile_bounds = toplevel->GetWindowBoundsInScreen();
- EXPECT_NE(normal_bounds.ToString(), right_tile_bounds.ToString());
-
- // Swipe left to snap.
- gfx::Point left_points[kTouchPoints];
- for (int i = 0; i < kTouchPoints; ++i) {
- left_points[i] = points[i];
- left_points[i].Offset(right_tile_bounds.x(), right_tile_bounds.y());
- }
- generator.GestureMultiFingerScroll(kTouchPoints, left_points, 15, kSteps,
- -150, 0);
- gfx::Rect left_tile_bounds = toplevel->GetWindowBoundsInScreen();
- EXPECT_NE(normal_bounds.ToString(), left_tile_bounds.ToString());
- EXPECT_NE(right_tile_bounds.ToString(), left_tile_bounds.ToString());
-
- // Swipe right again.
- generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, 150, 0);
- gfx::Rect current_bounds = toplevel->GetWindowBoundsInScreen();
- EXPECT_NE(current_bounds.ToString(), left_tile_bounds.ToString());
- EXPECT_EQ(current_bounds.ToString(), right_tile_bounds.ToString());
-}
-
-TEST_P(SystemGestureEventFilterTest, TwoFingerDrag) {
- gfx::Rect bounds(0, 0, 600, 600);
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- views::Widget* toplevel = views::Widget::CreateWindowWithContextAndBounds(
- new ResizableWidgetDelegate, root_window, bounds);
- toplevel->Show();
-
- const int kSteps = 15;
- const int kTouchPoints = 2;
- gfx::Point points[kTouchPoints] = {
- gfx::Point(250, 250),
- gfx::Point(350, 350),
- };
-
- aura::test::EventGenerator generator(root_window,
- toplevel->GetNativeWindow());
-
- wm::WindowState* toplevel_state =
- wm::GetWindowState(toplevel->GetNativeWindow());
- // Swipe down to minimize.
- generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, 0, 150);
- EXPECT_TRUE(toplevel_state->IsMinimized());
-
- toplevel->Restore();
- toplevel->GetNativeWindow()->SetBounds(bounds);
-
- // Swipe up to maximize.
- generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, 0, -150);
- EXPECT_TRUE(toplevel_state->IsMaximized());
-
- toplevel->Restore();
- toplevel->GetNativeWindow()->SetBounds(bounds);
-
- // Swipe right to snap.
- gfx::Rect normal_bounds = toplevel->GetWindowBoundsInScreen();
- generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, 150, 0);
- gfx::Rect right_tile_bounds = toplevel->GetWindowBoundsInScreen();
- EXPECT_NE(normal_bounds.ToString(), right_tile_bounds.ToString());
-
- // Swipe left to snap.
- gfx::Point left_points[kTouchPoints];
- for (int i = 0; i < kTouchPoints; ++i) {
- left_points[i] = points[i];
- left_points[i].Offset(right_tile_bounds.x(), right_tile_bounds.y());
- }
- generator.GestureMultiFingerScroll(kTouchPoints, left_points, 15, kSteps,
- -150, 0);
- gfx::Rect left_tile_bounds = toplevel->GetWindowBoundsInScreen();
- EXPECT_NE(normal_bounds.ToString(), left_tile_bounds.ToString());
- EXPECT_NE(right_tile_bounds.ToString(), left_tile_bounds.ToString());
-
- // Swipe right again.
- generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, 150, 0);
- gfx::Rect current_bounds = toplevel->GetWindowBoundsInScreen();
- EXPECT_NE(current_bounds.ToString(), left_tile_bounds.ToString());
- EXPECT_EQ(current_bounds.ToString(), right_tile_bounds.ToString());
-}
-
-TEST_P(SystemGestureEventFilterTest, TwoFingerDragTwoWindows) {
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- ui::GestureConfiguration::set_max_separation_for_gesture_touches_in_pixels(0);
- views::Widget* first = views::Widget::CreateWindowWithContextAndBounds(
- new ResizableWidgetDelegate, root_window, gfx::Rect(0, 0, 50, 100));
- first->Show();
- views::Widget* second = views::Widget::CreateWindowWithContextAndBounds(
- new ResizableWidgetDelegate, root_window, gfx::Rect(100, 0, 100, 100));
- second->Show();
-
- // Start a two-finger drag on |first|, and then try to use another two-finger
- // drag to move |second|. The attempt to move |second| should fail.
- const gfx::Rect& first_bounds = first->GetWindowBoundsInScreen();
- const gfx::Rect& second_bounds = second->GetWindowBoundsInScreen();
- const int kSteps = 15;
- const int kTouchPoints = 4;
- gfx::Point points[kTouchPoints] = {
- first_bounds.origin() + gfx::Vector2d(5, 5),
- first_bounds.origin() + gfx::Vector2d(30, 10),
- second_bounds.origin() + gfx::Vector2d(5, 5),
- second_bounds.origin() + gfx::Vector2d(40, 20)
- };
-
- aura::test::EventGenerator generator(root_window);
- // Do not drag too fast to avoid fling.
- generator.GestureMultiFingerScroll(kTouchPoints, points,
- 50, kSteps, 0, 150);
-
- EXPECT_NE(first_bounds.ToString(),
- first->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ(second_bounds.ToString(),
- second->GetWindowBoundsInScreen().ToString());
-}
-
-TEST_P(SystemGestureEventFilterTest, WindowsWithMaxSizeDontSnap) {
- gfx::Rect bounds(250, 150, 100, 100);
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- views::Widget* toplevel = views::Widget::CreateWindowWithContextAndBounds(
- new MaxSizeWidgetDelegate, root_window, bounds);
- toplevel->Show();
-
- const int kSteps = 15;
- const int kTouchPoints = 2;
- gfx::Point points[kTouchPoints] = {
- gfx::Point(bounds.x() + 10, bounds.y() + 30),
- gfx::Point(bounds.x() + 30, bounds.y() + 20),
- };
-
- aura::test::EventGenerator generator(root_window,
- toplevel->GetNativeWindow());
-
- // Swipe down to minimize.
- generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, 0, 150);
- wm::WindowState* toplevel_state =
- wm::GetWindowState(toplevel->GetNativeWindow());
- EXPECT_TRUE(toplevel_state->IsMinimized());
-
- toplevel->Restore();
- toplevel->GetNativeWindow()->SetBounds(bounds);
-
- // Check that swiping up doesn't maximize.
- generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, 0, -150);
- EXPECT_FALSE(toplevel_state->IsMaximized());
-
- toplevel->Restore();
- toplevel->GetNativeWindow()->SetBounds(bounds);
-
- // Check that swiping right doesn't snap.
- gfx::Rect normal_bounds = toplevel->GetWindowBoundsInScreen();
- generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, 150, 0);
- normal_bounds.set_x(normal_bounds.x() + 150);
- EXPECT_EQ(normal_bounds.ToString(),
- toplevel->GetWindowBoundsInScreen().ToString());
-
- toplevel->GetNativeWindow()->SetBounds(bounds);
-
- // Check that swiping left doesn't snap.
- normal_bounds = toplevel->GetWindowBoundsInScreen();
- generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, -150, 0);
- normal_bounds.set_x(normal_bounds.x() - 150);
- EXPECT_EQ(normal_bounds.ToString(),
- toplevel->GetWindowBoundsInScreen().ToString());
-
- toplevel->GetNativeWindow()->SetBounds(bounds);
-
- // Swipe right again, make sure the window still doesn't snap.
- normal_bounds = toplevel->GetWindowBoundsInScreen();
- normal_bounds.set_x(normal_bounds.x() + 150);
- generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, 150, 0);
- EXPECT_EQ(normal_bounds.ToString(),
- toplevel->GetWindowBoundsInScreen().ToString());
-}
-
-TEST_P(SystemGestureEventFilterTest, TwoFingerDragEdge) {
- gfx::Rect bounds(0, 0, 100, 100);
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- views::Widget* toplevel = views::Widget::CreateWindowWithContextAndBounds(
- new ResizableWidgetDelegate, root_window, bounds);
- toplevel->Show();
-
- const int kSteps = 15;
- const int kTouchPoints = 2;
- gfx::Point points[kTouchPoints] = {
- gfx::Point(30, 20), // Caption
- gfx::Point(0, 40), // Left edge
- };
-
- EXPECT_EQ(HTLEFT, toplevel->GetNativeWindow()->delegate()->
- GetNonClientComponent(points[1]));
-
- aura::test::EventGenerator generator(root_window,
- toplevel->GetNativeWindow());
-
- bounds = toplevel->GetNativeWindow()->bounds();
- // Swipe down. Nothing should happen.
- generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, 0, 150);
- EXPECT_EQ(bounds.ToString(),
- toplevel->GetNativeWindow()->bounds().ToString());
-}
-
-TEST_P(SystemGestureEventFilterTest, TwoFingerDragDelayed) {
- gfx::Rect bounds(0, 0, 100, 100);
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- views::Widget* toplevel = views::Widget::CreateWindowWithContextAndBounds(
- new ResizableWidgetDelegate, root_window, bounds);
- toplevel->Show();
-
- const int kSteps = 15;
- const int kTouchPoints = 2;
- gfx::Point points[kTouchPoints] = {
- gfx::Point(30, 20), // Caption
- gfx::Point(34, 20), // Caption
- };
- int delays[kTouchPoints] = {0, 120};
-
- EXPECT_EQ(HTCAPTION, toplevel->GetNativeWindow()->delegate()->
- GetNonClientComponent(points[0]));
- EXPECT_EQ(HTCAPTION, toplevel->GetNativeWindow()->delegate()->
- GetNonClientComponent(points[1]));
-
- aura::test::EventGenerator generator(root_window,
- toplevel->GetNativeWindow());
-
- bounds = toplevel->GetNativeWindow()->bounds();
- // Swipe right and down starting with one finger.
- // Add another finger after 120ms and continue dragging.
- // The window should move and the drag should be determined by the center
- // point between the fingers.
- generator.GestureMultiFingerScrollWithDelays(
- kTouchPoints, points, delays, 15, kSteps, 150, 150);
- bounds += gfx::Vector2d(150 + (points[1].x() - points[0].x()) / 2, 150);
- EXPECT_EQ(bounds.ToString(),
- toplevel->GetNativeWindow()->bounds().ToString());
-}
-
-TEST_P(SystemGestureEventFilterTest, ThreeFingerGestureStopsDrag) {
- gfx::Rect bounds(0, 0, 100, 100);
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- views::Widget* toplevel = views::Widget::CreateWindowWithContextAndBounds(
- new ResizableWidgetDelegate, root_window, bounds);
- toplevel->Show();
-
- const int kSteps = 10;
- const int kTouchPoints = 3;
- gfx::Point points[kTouchPoints] = {
- gfx::Point(30, 20), // Caption
- gfx::Point(34, 20), // Caption
- gfx::Point(38, 20), // Caption
- };
- int delays[kTouchPoints] = {0, 0, 120};
-
- EXPECT_EQ(HTCAPTION, toplevel->GetNativeWindow()->delegate()->
- GetNonClientComponent(points[0]));
- EXPECT_EQ(HTCAPTION, toplevel->GetNativeWindow()->delegate()->
- GetNonClientComponent(points[1]));
-
- aura::test::EventGenerator generator(root_window,
- toplevel->GetNativeWindow());
-
- bounds = toplevel->GetNativeWindow()->bounds();
- // Swipe right and down starting with two fingers.
- // Add third finger after 120ms and continue dragging.
- // The window should start moving but stop when the 3rd finger touches down.
- const int kEventSeparation = 15;
- generator.GestureMultiFingerScrollWithDelays(
- kTouchPoints, points, delays, kEventSeparation, kSteps, 150, 150);
- int expected_drag = 150 / kSteps * 120 / kEventSeparation;
- bounds += gfx::Vector2d(expected_drag, expected_drag);
- EXPECT_EQ(bounds.ToString(),
- toplevel->GetNativeWindow()->bounds().ToString());
-}
-
-TEST_P(SystemGestureEventFilterTest, DragLeftNearEdgeSnaps) {
- gfx::Rect bounds(200, 150, 400, 100);
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- views::Widget* toplevel = views::Widget::CreateWindowWithContextAndBounds(
- new ResizableWidgetDelegate, root_window, bounds);
- toplevel->Show();
-
- const int kSteps = 15;
- const int kTouchPoints = 2;
- gfx::Point points[kTouchPoints] = {
- gfx::Point(bounds.x() + bounds.width() / 2, bounds.y() + 5),
- gfx::Point(bounds.x() + bounds.width() / 2, bounds.y() + 5),
- };
- aura::test::EventGenerator generator(root_window,
- toplevel->GetNativeWindow());
-
- // Check that dragging left snaps before reaching the screen edge.
- gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(root_window).work_area();
- int drag_x = work_area.x() + 20 - points[0].x();
- generator.GestureMultiFingerScroll(
- kTouchPoints, points, 120, kSteps, drag_x, 0);
-
- internal::SnapSizer snap_sizer(
- wm::GetWindowState(toplevel->GetNativeWindow()),
- gfx::Point(),
- internal::SnapSizer::LEFT_EDGE,
- internal::SnapSizer::OTHER_INPUT);
- gfx::Rect expected_bounds(snap_sizer.target_bounds());
- EXPECT_EQ(expected_bounds.ToString(),
- toplevel->GetWindowBoundsInScreen().ToString());
-}
-
-TEST_P(SystemGestureEventFilterTest, DragRightNearEdgeSnaps) {
- gfx::Rect bounds(200, 150, 400, 100);
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- views::Widget* toplevel = views::Widget::CreateWindowWithContextAndBounds(
- new ResizableWidgetDelegate, root_window, bounds);
- toplevel->Show();
-
- const int kSteps = 15;
- const int kTouchPoints = 2;
- gfx::Point points[kTouchPoints] = {
- gfx::Point(bounds.x() + bounds.width() / 2, bounds.y() + 5),
- gfx::Point(bounds.x() + bounds.width() / 2, bounds.y() + 5),
- };
- aura::test::EventGenerator generator(root_window,
- toplevel->GetNativeWindow());
-
- // Check that dragging right snaps before reaching the screen edge.
- gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(root_window).work_area();
- int drag_x = work_area.right() - 20 - points[0].x();
- generator.GestureMultiFingerScroll(
- kTouchPoints, points, 120, kSteps, drag_x, 0);
- internal::SnapSizer snap_sizer(
- wm::GetWindowState(toplevel->GetNativeWindow()),
- gfx::Point(),
- internal::SnapSizer::RIGHT_EDGE,
- internal::SnapSizer::OTHER_INPUT);
- gfx::Rect expected_bounds(snap_sizer.target_bounds());
- EXPECT_EQ(expected_bounds.ToString(),
- toplevel->GetWindowBoundsInScreen().ToString());
-}
-
-// Tests run twice - with docked windows disabled or enabled.
-INSTANTIATE_TEST_CASE_P(DockedWindowsDisabledOrEnabled,
- SystemGestureEventFilterTest,
- testing::Bool());
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/wm/system_modal_container_event_filter.cc b/chromium/ash/wm/system_modal_container_event_filter.cc
deleted file mode 100644
index 4412a9c2d45..00000000000
--- a/chromium/ash/wm/system_modal_container_event_filter.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/system_modal_container_event_filter.h"
-
-#include "ash/wm/system_modal_container_event_filter_delegate.h"
-#include "ui/aura/window.h"
-#include "ui/events/event.h"
-
-namespace ash {
-namespace internal {
-
-SystemModalContainerEventFilter::SystemModalContainerEventFilter(
- SystemModalContainerEventFilterDelegate* delegate)
- : delegate_(delegate) {
-}
-
-SystemModalContainerEventFilter::~SystemModalContainerEventFilter() {
-}
-
-void SystemModalContainerEventFilter::OnKeyEvent(ui::KeyEvent* event) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- if (!delegate_->CanWindowReceiveEvents(target))
- event->StopPropagation();
-}
-
-void SystemModalContainerEventFilter::OnMouseEvent(
- ui::MouseEvent* event) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- if (!delegate_->CanWindowReceiveEvents(target))
- event->StopPropagation();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/system_modal_container_event_filter.h b/chromium/ash/wm/system_modal_container_event_filter.h
deleted file mode 100644
index e1f2e8ea429..00000000000
--- a/chromium/ash/wm/system_modal_container_event_filter.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_SYSTEM_MODAL_CONTAINER_EVENT_FILTER_H_
-#define ASH_WM_SYSTEM_MODAL_CONTAINER_EVENT_FILTER_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/events/event_handler.h"
-
-namespace ash {
-namespace internal {
-
-class SystemModalContainerEventFilterDelegate;
-
-class ASH_EXPORT SystemModalContainerEventFilter : public ui::EventHandler {
- public:
- explicit SystemModalContainerEventFilter(
- SystemModalContainerEventFilterDelegate* delegate);
- virtual ~SystemModalContainerEventFilter();
-
- // Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
-
- private:
- SystemModalContainerEventFilterDelegate* delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(SystemModalContainerEventFilter);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_SYSTEM_MODAL_CONTAINER_EVENT_FILTER_H_
diff --git a/chromium/ash/wm/system_modal_container_event_filter_delegate.h b/chromium/ash/wm/system_modal_container_event_filter_delegate.h
deleted file mode 100644
index 4e27d0000c9..00000000000
--- a/chromium/ash/wm/system_modal_container_event_filter_delegate.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_MODALITY_EVENT_FILTER_DELEGATE_H_
-#define ASH_WM_MODALITY_EVENT_FILTER_DELEGATE_H_
-
-#include "ash/ash_export.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-namespace internal {
-
-class ASH_EXPORT SystemModalContainerEventFilterDelegate {
- public:
- // Returns true if |window| can receive the specified event.
- virtual bool CanWindowReceiveEvents(aura::Window* window) = 0;
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_MODALITY_EVENT_FILTER_DELEGATE_H_
diff --git a/chromium/ash/wm/system_modal_container_layout_manager.cc b/chromium/ash/wm/system_modal_container_layout_manager.cc
deleted file mode 100644
index 2c2cdebb57a..00000000000
--- a/chromium/ash/wm/system_modal_container_layout_manager.cc
+++ /dev/null
@@ -1,224 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/system_modal_container_layout_manager.h"
-
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/system_modal_container_event_filter.h"
-#include "ash/wm/window_animations.h"
-#include "ash/wm/window_util.h"
-#include "base/bind.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/client/capture_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/base/ui_base_switches_util.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animator.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/events/event.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/background.h"
-#include "ui/views/corewm/compound_event_filter.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-////////////////////////////////////////////////////////////////////////////////
-// SystemModalContainerLayoutManager, public:
-
-SystemModalContainerLayoutManager::SystemModalContainerLayoutManager(
- aura::Window* container)
- : container_(container),
- modal_background_(NULL) {
-}
-
-SystemModalContainerLayoutManager::~SystemModalContainerLayoutManager() {
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// SystemModalContainerLayoutManager, aura::LayoutManager implementation:
-
-void SystemModalContainerLayoutManager::OnWindowResized() {
- if (modal_background_) {
- // Note: we have to set the entire bounds with the screen offset.
- modal_background_->SetBounds(
- Shell::GetScreen()->GetDisplayNearestWindow(container_).bounds());
- }
- if (!modal_windows_.empty()) {
- aura::Window::Windows::iterator it = modal_windows_.begin();
- for (it = modal_windows_.begin(); it != modal_windows_.end(); ++it) {
- gfx::Rect bounds = (*it)->bounds();
- bounds.AdjustToFit(container_->bounds());
- (*it)->SetBounds(bounds);
- }
- }
-}
-
-void SystemModalContainerLayoutManager::OnWindowAddedToLayout(
- aura::Window* child) {
- DCHECK((modal_background_ && child == modal_background_->GetNativeView()) ||
- child->type() == aura::client::WINDOW_TYPE_NORMAL ||
- child->type() == aura::client::WINDOW_TYPE_POPUP);
- DCHECK(
- container_->id() != internal::kShellWindowId_LockSystemModalContainer ||
- Shell::GetInstance()->session_state_delegate()->IsUserSessionBlocked());
-
- child->AddObserver(this);
- if (child->GetProperty(aura::client::kModalKey) != ui::MODAL_TYPE_NONE)
- AddModalWindow(child);
-}
-
-void SystemModalContainerLayoutManager::OnWillRemoveWindowFromLayout(
- aura::Window* child) {
- child->RemoveObserver(this);
- if (child->GetProperty(aura::client::kModalKey) != ui::MODAL_TYPE_NONE)
- RemoveModalWindow(child);
-}
-
-void SystemModalContainerLayoutManager::OnWindowRemovedFromLayout(
- aura::Window* child) {
-}
-
-void SystemModalContainerLayoutManager::OnChildWindowVisibilityChanged(
- aura::Window* child,
- bool visible) {
-}
-
-void SystemModalContainerLayoutManager::SetChildBounds(
- aura::Window* child,
- const gfx::Rect& requested_bounds) {
- SetChildBoundsDirect(child, requested_bounds);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// SystemModalContainerLayoutManager, aura::WindowObserver implementation:
-
-void SystemModalContainerLayoutManager::OnWindowPropertyChanged(
- aura::Window* window,
- const void* key,
- intptr_t old) {
- if (key != aura::client::kModalKey)
- return;
-
- if (window->GetProperty(aura::client::kModalKey) != ui::MODAL_TYPE_NONE) {
- AddModalWindow(window);
- } else if (static_cast<ui::ModalType>(old) != ui::MODAL_TYPE_NONE) {
- RemoveModalWindow(window);
- Shell::GetInstance()->OnModalWindowRemoved(window);
- }
-}
-
-void SystemModalContainerLayoutManager::OnWindowDestroying(
- aura::Window* window) {
- if (modal_background_ && modal_background_->GetNativeView() == window)
- modal_background_ = NULL;
-}
-
-bool SystemModalContainerLayoutManager::CanWindowReceiveEvents(
- aura::Window* window) {
- // We could get when we're at lock screen and there is modal window at
- // system modal window layer which added event filter.
- // Now this lock modal windows layer layout manager should not block events
- // for windows at lock layer.
- // See SystemModalContainerLayoutManagerTest.EventFocusContainers and
- // http://crbug.com/157469
- if (modal_windows_.empty())
- return true;
- // This container can not handle events if the screen is locked and it is not
- // above the lock screen layer (crbug.com/110920).
- if (Shell::GetInstance()->session_state_delegate()->IsUserSessionBlocked() &&
- container_->id() < ash::internal::kShellWindowId_LockScreenContainer)
- return true;
- return wm::GetActivatableWindow(window) == modal_window();
-}
-
-bool SystemModalContainerLayoutManager::ActivateNextModalWindow() {
- if (modal_windows_.empty())
- return false;
- wm::ActivateWindow(modal_window());
- return true;
-}
-
-void SystemModalContainerLayoutManager::CreateModalBackground() {
- if (!modal_background_) {
- modal_background_ = new views::Widget;
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL);
- params.parent = container_;
- params.bounds = Shell::GetScreen()->GetDisplayNearestWindow(
- container_).bounds();
- modal_background_->Init(params);
- modal_background_->GetNativeView()->SetName(
- "SystemModalContainerLayoutManager.ModalBackground");
- views::View* contents_view = new views::View();
- // TODO(jamescook): This could be SK_ColorWHITE for the new dialog style.
- contents_view->set_background(
- views::Background::CreateSolidBackground(SK_ColorBLACK));
- modal_background_->SetContentsView(contents_view);
- modal_background_->GetNativeView()->layer()->SetOpacity(0.0f);
- }
-
- ui::ScopedLayerAnimationSettings settings(
- modal_background_->GetNativeView()->layer()->GetAnimator());
- modal_background_->Show();
- modal_background_->GetNativeView()->layer()->SetOpacity(0.5f);
- container_->StackChildAtTop(modal_background_->GetNativeView());
-}
-
-void SystemModalContainerLayoutManager::DestroyModalBackground() {
- // modal_background_ can be NULL when a root window is shutting down
- // and OnWindowDestroying is called first.
- if (modal_background_) {
- ui::ScopedLayerAnimationSettings settings(
- modal_background_->GetNativeView()->layer()->GetAnimator());
- modal_background_->Close();
- settings.AddObserver(views::corewm::CreateHidingWindowAnimationObserver(
- modal_background_->GetNativeView()));
- modal_background_->GetNativeView()->layer()->SetOpacity(0.0f);
- modal_background_ = NULL;
- }
-}
-
-// static
-bool SystemModalContainerLayoutManager::IsModalBackground(
- aura::Window* window) {
- int id = window->parent()->id();
- if (id != internal::kShellWindowId_SystemModalContainer &&
- id != internal::kShellWindowId_LockSystemModalContainer)
- return false;
- SystemModalContainerLayoutManager* layout_manager =
- static_cast<SystemModalContainerLayoutManager*>(
- window->parent()->layout_manager());
- return layout_manager->modal_background_ &&
- layout_manager->modal_background_->GetNativeWindow() == window;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// SystemModalContainerLayoutManager, private:
-
-void SystemModalContainerLayoutManager::AddModalWindow(aura::Window* window) {
- if (modal_windows_.empty()) {
- aura::Window* capture_window = aura::client::GetCaptureWindow(container_);
- if (capture_window)
- capture_window->ReleaseCapture();
- }
- modal_windows_.push_back(window);
- Shell::GetInstance()->CreateModalBackground(window);
- window->parent()->StackChildAtTop(window);
-}
-
-void SystemModalContainerLayoutManager::RemoveModalWindow(
- aura::Window* window) {
- aura::Window::Windows::iterator it =
- std::find(modal_windows_.begin(), modal_windows_.end(), window);
- if (it != modal_windows_.end())
- modal_windows_.erase(it);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/system_modal_container_layout_manager.h b/chromium/ash/wm/system_modal_container_layout_manager.h
deleted file mode 100644
index 76618ece071..00000000000
--- a/chromium/ash/wm/system_modal_container_layout_manager.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_
-#define ASH_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_
-
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/layout_manager.h"
-#include "ui/aura/window_observer.h"
-
-namespace aura {
-class Window;
-class EventFilter;
-}
-namespace gfx {
-class Rect;
-}
-namespace views {
-class Widget;
-}
-
-namespace ash {
-namespace internal {
-
-// LayoutManager for the modal window container.
-class ASH_EXPORT SystemModalContainerLayoutManager
- : public aura::LayoutManager,
- public aura::WindowObserver {
- public:
- explicit SystemModalContainerLayoutManager(aura::Window* container);
- virtual ~SystemModalContainerLayoutManager();
-
- bool has_modal_background() const { return modal_background_ != NULL; }
-
- // Overridden from aura::LayoutManager:
- virtual void OnWindowResized() OVERRIDE;
- virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE;
- virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE;
- virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE;
- virtual void OnChildWindowVisibilityChanged(aura::Window* child,
- bool visibile) OVERRIDE;
- virtual void SetChildBounds(aura::Window* child,
- const gfx::Rect& requested_bounds) OVERRIDE;
-
- // Overridden from aura::WindowObserver:
- virtual void OnWindowPropertyChanged(aura::Window* window,
- const void* key,
- intptr_t old) OVERRIDE;
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
-
- // Can a given |window| receive and handle input events?
- bool CanWindowReceiveEvents(aura::Window* window);
-
- // Activates next modal window if any. Returns false if there
- // are no more modal windows in this layout manager.
- bool ActivateNextModalWindow();
-
- // Creates modal background window, which is a partially-opaque
- // fullscreen window. If there is already a modal background window,
- // it will bring it the top.
- void CreateModalBackground();
-
- void DestroyModalBackground();
-
- // Is the |window| modal background?
- static bool IsModalBackground(aura::Window* window);
-
- private:
- void AddModalWindow(aura::Window* window);
- void RemoveModalWindow(aura::Window* window);
-
- aura::Window* modal_window() {
- return !modal_windows_.empty() ? modal_windows_.back() : NULL;
- }
-
- // The container that owns the layout manager.
- aura::Window* container_;
-
- // A widget that dims the windows behind the modal window(s) being
- // shown in |container_|.
- views::Widget* modal_background_;
-
- // A stack of modal windows. Only the topmost can receive events.
- std::vector<aura::Window*> modal_windows_;
-
- DISALLOW_COPY_AND_ASSIGN(SystemModalContainerLayoutManager);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_
diff --git a/chromium/ash/wm/system_modal_container_layout_manager_unittest.cc b/chromium/ash/wm/system_modal_container_layout_manager_unittest.cc
deleted file mode 100644
index 6ae336926c1..00000000000
--- a/chromium/ash/wm/system_modal_container_layout_manager_unittest.cc
+++ /dev/null
@@ -1,495 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/system_modal_container_layout_manager.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/window_util.h"
-#include "base/compiler_specific.h"
-#include "base/run_loop.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/test/capture_tracking_view.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-namespace test {
-
-namespace {
-
-aura::Window* GetModalContainer() {
- return Shell::GetPrimaryRootWindowController()->GetContainer(
- ash::internal::kShellWindowId_SystemModalContainer);
-}
-
-bool AllRootWindowsHaveModalBackgroundsForContainer(int container_id) {
- std::vector<aura::Window*> containers =
- Shell::GetContainersFromAllRootWindows(container_id, NULL);
- bool has_modal_screen = !containers.empty();
- for (std::vector<aura::Window*>::iterator iter = containers.begin();
- iter != containers.end(); ++iter) {
- has_modal_screen &=
- static_cast<internal::SystemModalContainerLayoutManager*>(
- (*iter)->layout_manager())->has_modal_background();
- }
- return has_modal_screen;
-}
-
-bool AllRootWindowsHaveLockedModalBackgrounds() {
- return AllRootWindowsHaveModalBackgroundsForContainer(
- internal::kShellWindowId_LockSystemModalContainer);
-}
-
-bool AllRootWindowsHaveModalBackgrounds() {
- return AllRootWindowsHaveModalBackgroundsForContainer(
- internal::kShellWindowId_SystemModalContainer);
-}
-
-class TestWindow : public views::WidgetDelegateView {
- public:
- explicit TestWindow(bool modal) : modal_(modal) {}
- virtual ~TestWindow() {}
-
- // The window needs be closed from widget in order for
- // aura::client::kModalKey property to be reset.
- static void CloseTestWindow(aura::Window* window) {
- views::Widget::GetWidgetForNativeWindow(window)->Close();
- }
-
- // Overridden from views::View:
- virtual gfx::Size GetPreferredSize() OVERRIDE {
- return gfx::Size(50, 50);
- }
-
- // Overridden from views::WidgetDelegate:
- virtual views::View* GetContentsView() OVERRIDE {
- return this;
- }
- virtual ui::ModalType GetModalType() const OVERRIDE {
- return modal_ ? ui::MODAL_TYPE_SYSTEM : ui::MODAL_TYPE_NONE;
- }
-
- private:
- bool modal_;
-
- DISALLOW_COPY_AND_ASSIGN(TestWindow);
-};
-
-class EventTestWindow : public TestWindow {
- public:
- explicit EventTestWindow(bool modal) : TestWindow(modal),
- mouse_presses_(0) {}
- virtual ~EventTestWindow() {}
-
- aura::Window* OpenTestWindowWithContext(aura::Window* context) {
- views::Widget* widget =
- views::Widget::CreateWindowWithContext(this, context);
- widget->Show();
- return widget->GetNativeView();
- }
-
- aura::Window* OpenTestWindowWithParent(aura::Window* parent) {
- DCHECK(parent);
- views::Widget* widget =
- views::Widget::CreateWindowWithParent(this, parent);
- widget->Show();
- return widget->GetNativeView();
- }
-
- // Overridden from views::View:
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE {
- mouse_presses_++;
- return false;
- }
-
- int mouse_presses() const { return mouse_presses_; }
- private:
- int mouse_presses_;
-
- DISALLOW_COPY_AND_ASSIGN(EventTestWindow);
-};
-
-class TransientWindowObserver : public aura::WindowObserver {
- public:
- TransientWindowObserver() : destroyed_(false) {}
- virtual ~TransientWindowObserver() {}
-
- bool destroyed() const { return destroyed_; }
-
- // Overridden from aura::WindowObserver:
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE {
- destroyed_ = true;
- }
-
- private:
- bool destroyed_;
-
- DISALLOW_COPY_AND_ASSIGN(TransientWindowObserver);
-};
-
-} // namespace
-
-class SystemModalContainerLayoutManagerTest : public AshTestBase {
- public:
- aura::Window* OpenToplevelTestWindow(bool modal) {
- views::Widget* widget = views::Widget::CreateWindowWithContext(
- new TestWindow(modal), CurrentContext());
- widget->Show();
- return widget->GetNativeView();
- }
-
- aura::Window* OpenTestWindowWithParent(aura::Window* parent, bool modal) {
- views::Widget* widget =
- views::Widget::CreateWindowWithParent(new TestWindow(modal), parent);
- widget->Show();
- return widget->GetNativeView();
- }
-};
-
-TEST_F(SystemModalContainerLayoutManagerTest, NonModalTransient) {
- scoped_ptr<aura::Window> parent(OpenToplevelTestWindow(false));
- aura::Window* transient = OpenTestWindowWithParent(parent.get(), false);
- TransientWindowObserver destruction_observer;
- transient->AddObserver(&destruction_observer);
-
- EXPECT_EQ(parent.get(), transient->transient_parent());
- EXPECT_EQ(parent->parent(), transient->parent());
-
- // The transient should be destroyed with its parent.
- parent.reset();
- EXPECT_TRUE(destruction_observer.destroyed());
-}
-
-TEST_F(SystemModalContainerLayoutManagerTest, ModalTransient) {
- scoped_ptr<aura::Window> parent(OpenToplevelTestWindow(false));
- // parent should be active.
- EXPECT_TRUE(wm::IsActiveWindow(parent.get()));
- aura::Window* t1 = OpenTestWindowWithParent(parent.get(), true);
-
- TransientWindowObserver do1;
- t1->AddObserver(&do1);
-
- EXPECT_EQ(parent.get(), t1->transient_parent());
- EXPECT_EQ(GetModalContainer(), t1->parent());
-
- // t1 should now be active.
- EXPECT_TRUE(wm::IsActiveWindow(t1));
-
- // Attempting to click the parent should result in no activation change.
- aura::test::EventGenerator e1(Shell::GetPrimaryRootWindow(), parent.get());
- e1.ClickLeftButton();
- EXPECT_TRUE(wm::IsActiveWindow(t1));
-
- // Now open another modal transient parented to the original modal transient.
- aura::Window* t2 = OpenTestWindowWithParent(t1, true);
- TransientWindowObserver do2;
- t2->AddObserver(&do2);
-
- EXPECT_TRUE(wm::IsActiveWindow(t2));
-
- EXPECT_EQ(t1, t2->transient_parent());
- EXPECT_EQ(GetModalContainer(), t2->parent());
-
- // t2 should still be active, even after clicking on t1.
- aura::test::EventGenerator e2(Shell::GetPrimaryRootWindow(), t1);
- e2.ClickLeftButton();
- EXPECT_TRUE(wm::IsActiveWindow(t2));
-
- // Both transients should be destroyed with parent.
- parent.reset();
- EXPECT_TRUE(do1.destroyed());
- EXPECT_TRUE(do2.destroyed());
-}
-
-TEST_F(SystemModalContainerLayoutManagerTest, ModalNonTransient) {
- scoped_ptr<aura::Window> t1(OpenToplevelTestWindow(true));
- // parent should be active.
- EXPECT_TRUE(wm::IsActiveWindow(t1.get()));
- TransientWindowObserver do1;
- t1->AddObserver(&do1);
-
- EXPECT_EQ(NULL, t1->transient_parent());
- EXPECT_EQ(GetModalContainer(), t1->parent());
-
- // t1 should now be active.
- EXPECT_TRUE(wm::IsActiveWindow(t1.get()));
-
- // Attempting to click the parent should result in no activation change.
- aura::test::EventGenerator e1(Shell::GetPrimaryRootWindow(),
- Shell::GetPrimaryRootWindow());
- e1.ClickLeftButton();
- EXPECT_TRUE(wm::IsActiveWindow(t1.get()));
-
- // Now open another modal transient parented to the original modal transient.
- aura::Window* t2 = OpenTestWindowWithParent(t1.get(), true);
- TransientWindowObserver do2;
- t2->AddObserver(&do2);
-
- EXPECT_TRUE(wm::IsActiveWindow(t2));
-
- EXPECT_EQ(t1, t2->transient_parent());
- EXPECT_EQ(GetModalContainer(), t2->parent());
-
- // t2 should still be active, even after clicking on t1.
- aura::test::EventGenerator e2(Shell::GetPrimaryRootWindow(), t1.get());
- e2.ClickLeftButton();
- EXPECT_TRUE(wm::IsActiveWindow(t2));
-
- // Both transients should be destroyed with parent.
- t1.reset();
- EXPECT_TRUE(do1.destroyed());
- EXPECT_TRUE(do2.destroyed());
-}
-
-// Tests that we can activate an unrelated window after a modal window is closed
-// for a window.
-TEST_F(SystemModalContainerLayoutManagerTest, CanActivateAfterEndModalSession) {
- scoped_ptr<aura::Window> unrelated(OpenToplevelTestWindow(false));
- unrelated->SetBounds(gfx::Rect(100, 100, 50, 50));
- scoped_ptr<aura::Window> parent(OpenToplevelTestWindow(false));
- // parent should be active.
- EXPECT_TRUE(wm::IsActiveWindow(parent.get()));
-
- scoped_ptr<aura::Window> transient(
- OpenTestWindowWithParent(parent.get(), true));
- // t1 should now be active.
- EXPECT_TRUE(wm::IsActiveWindow(transient.get()));
-
- // Attempting to click the parent should result in no activation change.
- aura::test::EventGenerator e1(Shell::GetPrimaryRootWindow(), parent.get());
- e1.ClickLeftButton();
- EXPECT_TRUE(wm::IsActiveWindow(transient.get()));
-
- // Now close the transient.
- transient->Hide();
- TestWindow::CloseTestWindow(transient.release());
-
- base::RunLoop().RunUntilIdle();
-
- // parent should now be active again.
- EXPECT_TRUE(wm::IsActiveWindow(parent.get()));
-
- // Attempting to click unrelated should activate it.
- aura::test::EventGenerator e2(Shell::GetPrimaryRootWindow(), unrelated.get());
- e2.ClickLeftButton();
- EXPECT_TRUE(wm::IsActiveWindow(unrelated.get()));
-}
-
-TEST_F(SystemModalContainerLayoutManagerTest, EventFocusContainers) {
- // Create a normal window and attempt to receive a click event.
- EventTestWindow* main_delegate = new EventTestWindow(false);
- scoped_ptr<aura::Window> main(
- main_delegate->OpenTestWindowWithContext(CurrentContext()));
- EXPECT_TRUE(wm::IsActiveWindow(main.get()));
- aura::test::EventGenerator e1(Shell::GetPrimaryRootWindow(), main.get());
- e1.ClickLeftButton();
- EXPECT_EQ(1, main_delegate->mouse_presses());
-
- // Create a modal window for the main window and verify that the main window
- // no longer receives mouse events.
- EventTestWindow* transient_delegate = new EventTestWindow(true);
- aura::Window* transient =
- transient_delegate->OpenTestWindowWithParent(main.get());
- EXPECT_TRUE(wm::IsActiveWindow(transient));
- e1.ClickLeftButton();
- EXPECT_EQ(1, transient_delegate->mouse_presses());
-
- for (int block_reason = FIRST_BLOCK_REASON;
- block_reason < NUMBER_OF_BLOCK_REASONS;
- ++block_reason) {
- // Create a window in the lock screen container and ensure that it receives
- // the mouse event instead of the modal window (crbug.com/110920).
- BlockUserSession(static_cast<UserSessionBlockReason>(block_reason));
- EventTestWindow* lock_delegate = new EventTestWindow(false);
- scoped_ptr<aura::Window> lock(lock_delegate->OpenTestWindowWithParent(
- Shell::GetPrimaryRootWindowController()->GetContainer(
- ash::internal::kShellWindowId_LockScreenContainer)));
- EXPECT_TRUE(wm::IsActiveWindow(lock.get()));
- e1.ClickLeftButton();
- EXPECT_EQ(1, lock_delegate->mouse_presses());
-
- // Make sure that a modal container created by the lock screen can still
- // receive mouse events.
- EventTestWindow* lock_modal_delegate = new EventTestWindow(true);
- aura::Window* lock_modal =
- lock_modal_delegate->OpenTestWindowWithParent(lock.get());
- EXPECT_TRUE(wm::IsActiveWindow(lock_modal));
- e1.ClickLeftButton();
- // Verify that none of the other containers received any more mouse presses.
- EXPECT_EQ(1, lock_modal_delegate->mouse_presses());
- EXPECT_EQ(1, lock_delegate->mouse_presses());
- EXPECT_EQ(1, main_delegate->mouse_presses());
- EXPECT_EQ(1, transient_delegate->mouse_presses());
- UnblockUserSession();
- }
-}
-
-// Makes sure we don't crash if a modal window is shown while the parent window
-// is hidden.
-TEST_F(SystemModalContainerLayoutManagerTest, ShowModalWhileHidden) {
- // Hide the lock screen.
- Shell::GetPrimaryRootWindowController()->GetContainer(
- internal::kShellWindowId_SystemModalContainer)->layer()->SetOpacity(0);
-
- // Create a modal window.
- scoped_ptr<aura::Window> parent(OpenToplevelTestWindow(false));
- scoped_ptr<aura::Window> modal_window(
- OpenTestWindowWithParent(parent.get(), true));
- parent->Show();
- modal_window->Show();
-}
-
-// Verifies we generate a capture lost when showing a modal window.
-TEST_F(SystemModalContainerLayoutManagerTest, ChangeCapture) {
- views::Widget* widget = views::Widget::CreateWindowWithContext(
- new TestWindow(false), CurrentContext());
- scoped_ptr<aura::Window> widget_window(widget->GetNativeView());
- views::test::CaptureTrackingView* view = new views::test::CaptureTrackingView;
- widget->GetContentsView()->AddChildView(view);
- view->SetBoundsRect(widget->GetContentsView()->bounds());
- widget->Show();
-
- gfx::Point center(view->width() / 2, view->height() / 2);
- views::View::ConvertPointToScreen(view, &center);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), center);
- generator.PressLeftButton();
- EXPECT_TRUE(view->got_press());
- scoped_ptr<aura::Window> modal_window(
- OpenTestWindowWithParent(widget->GetNativeView(), true));
- modal_window->Show();
- EXPECT_TRUE(view->got_capture_lost());
-}
-
-// Verifies that the window gets moved into the visible screen area upon screen
-// resize.
-TEST_F(SystemModalContainerLayoutManagerTest, KeepVisible) {
- GetModalContainer()->SetBounds(gfx::Rect(0, 0, 1024, 768));
- scoped_ptr<aura::Window> main(OpenTestWindowWithParent(GetModalContainer(),
- true));
- main->SetBounds(gfx::Rect(924, 668, 100, 100));
- // We set now the bounds of the root window to something new which will
- // Then trigger the repos operation.
- GetModalContainer()->SetBounds(gfx::Rect(0, 0, 800, 600));
-
- gfx::Rect bounds = main->bounds();
- EXPECT_EQ(bounds, gfx::Rect(700, 500, 100, 100));
-}
-
-TEST_F(SystemModalContainerLayoutManagerTest, ShowNormalBackgroundOrLocked) {
- scoped_ptr<aura::Window> parent(OpenToplevelTestWindow(false));
- scoped_ptr<aura::Window> modal_window(
- OpenTestWindowWithParent(parent.get(), true));
- parent->Show();
- modal_window->Show();
-
- // Normal system modal window. Shows normal system modal background and not
- // locked.
- EXPECT_TRUE(AllRootWindowsHaveModalBackgrounds());
- EXPECT_FALSE(AllRootWindowsHaveLockedModalBackgrounds());
-
- TestWindow::CloseTestWindow(modal_window.release());
- EXPECT_FALSE(AllRootWindowsHaveModalBackgrounds());
- EXPECT_FALSE(AllRootWindowsHaveLockedModalBackgrounds());
-
- for (int block_reason = FIRST_BLOCK_REASON;
- block_reason < NUMBER_OF_BLOCK_REASONS;
- ++block_reason) {
- // Normal system modal window while blocked. Shows blocked system modal
- // background.
- BlockUserSession(static_cast<UserSessionBlockReason>(block_reason));
- scoped_ptr<aura::Window> lock_parent(OpenTestWindowWithParent(
- Shell::GetPrimaryRootWindowController()->GetContainer(
- ash::internal::kShellWindowId_LockScreenContainer),
- false));
- scoped_ptr<aura::Window> lock_modal_window(OpenTestWindowWithParent(
- lock_parent.get(), true));
- lock_parent->Show();
- lock_modal_window->Show();
- EXPECT_FALSE(AllRootWindowsHaveModalBackgrounds());
- EXPECT_TRUE(AllRootWindowsHaveLockedModalBackgrounds());
- TestWindow::CloseTestWindow(lock_modal_window.release());
-
- // Normal system modal window while blocked, but it belongs to the normal
- // window. Shouldn't show blocked system modal background, but normal.
- scoped_ptr<aura::Window> modal_window(
- OpenTestWindowWithParent(parent.get(), true));
- modal_window->Show();
- EXPECT_TRUE(AllRootWindowsHaveModalBackgrounds());
- EXPECT_FALSE(AllRootWindowsHaveLockedModalBackgrounds());
- TestWindow::CloseTestWindow(modal_window.release());
- UnblockUserSession();
- // Here we should check the behavior of the locked system modal dialog when
- // unlocked, but such case isn't handled very well right now.
- // See crbug.com/157660
- // TODO(mukai): add the test case when the bug is fixed.
- }
-}
-
-TEST_F(SystemModalContainerLayoutManagerTest, MultiDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("500x500,500x500");
-
- scoped_ptr<aura::Window> normal(OpenToplevelTestWindow(false));
- normal->SetBounds(gfx::Rect(100, 100, 50, 50));
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- EXPECT_EQ(2U, root_windows.size());
- aura::Window* container1 = Shell::GetContainer(
- root_windows[0], ash::internal::kShellWindowId_SystemModalContainer);
- aura::Window* container2 = Shell::GetContainer(
- root_windows[1], ash::internal::kShellWindowId_SystemModalContainer);
-
- scoped_ptr<aura::Window> modal1(
- OpenTestWindowWithParent(container1, true));
- EXPECT_TRUE(AllRootWindowsHaveModalBackgrounds());
- EXPECT_TRUE(wm::IsActiveWindow(modal1.get()));
-
- scoped_ptr<aura::Window> modal11(
- OpenTestWindowWithParent(container1, true));
- EXPECT_TRUE(wm::IsActiveWindow(modal11.get()));
-
- scoped_ptr<aura::Window> modal2(
- OpenTestWindowWithParent(container2, true));
- EXPECT_TRUE(wm::IsActiveWindow(modal2.get()));
-
- // Sanity check if they're on the correct containers.
- EXPECT_EQ(container1, modal1->parent());
- EXPECT_EQ(container1, modal11->parent());
- EXPECT_EQ(container2, modal2->parent());
-
- TestWindow::CloseTestWindow(modal2.release());
- EXPECT_TRUE(AllRootWindowsHaveModalBackgrounds());
- EXPECT_TRUE(wm::IsActiveWindow(modal11.get()));
-
- TestWindow::CloseTestWindow(modal11.release());
- EXPECT_TRUE(AllRootWindowsHaveModalBackgrounds());
- EXPECT_TRUE(wm::IsActiveWindow(modal1.get()));
-
- UpdateDisplay("500x500");
- EXPECT_TRUE(AllRootWindowsHaveModalBackgrounds());
- EXPECT_TRUE(wm::IsActiveWindow(modal1.get()));
-
- UpdateDisplay("500x500,600x600");
- EXPECT_TRUE(AllRootWindowsHaveModalBackgrounds());
- EXPECT_TRUE(wm::IsActiveWindow(modal1.get()));
-
- // No more modal screen.
- modal1->Hide();
- TestWindow::CloseTestWindow(modal1.release());
- EXPECT_FALSE(AllRootWindowsHaveModalBackgrounds());
- EXPECT_TRUE(wm::IsActiveWindow(normal.get()));
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/wm/toplevel_window_event_handler.cc b/chromium/ash/wm/toplevel_window_event_handler.cc
deleted file mode 100644
index 10b2a886edb..00000000000
--- a/chromium/ash/wm/toplevel_window_event_handler.cc
+++ /dev/null
@@ -1,534 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/toplevel_window_event_handler.h"
-
-#include "ash/shell.h"
-#include "ash/wm/resize_shadow_controller.h"
-#include "ash/wm/window_resizer.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_state_observer.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/snap_sizer.h"
-#include "base/message_loop/message_loop.h"
-#include "base/run_loop.h"
-#include "ui/aura/client/cursor_client.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/aura/window_observer.h"
-#include "ui/base/cursor/cursor.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/events/event.h"
-#include "ui/events/event_utils.h"
-#include "ui/events/gestures/gesture_recognizer.h"
-#include "ui/gfx/screen.h"
-
-namespace {
-const double kMinHorizVelocityForWindowSwipe = 1100;
-const double kMinVertVelocityForWindowMinimize = 1000;
-}
-
-namespace ash {
-
-namespace {
-
-gfx::Point ConvertPointToParent(aura::Window* window,
- const gfx::Point& point) {
- gfx::Point result(point);
- aura::Window::ConvertPointToTarget(window, window->parent(), &result);
- return result;
-}
-
-} // namespace
-
-// ScopedWindowResizer ---------------------------------------------------------
-
-// Wraps a WindowResizer and installs an observer on its target window. When
-// the window is destroyed ResizerWindowDestroyed() is invoked back on the
-// ToplevelWindowEventHandler to clean up.
-class ToplevelWindowEventHandler::ScopedWindowResizer
- : public aura::WindowObserver,
- public wm::WindowStateObserver {
- public:
- ScopedWindowResizer(ToplevelWindowEventHandler* handler,
- WindowResizer* resizer);
- virtual ~ScopedWindowResizer();
-
- WindowResizer* resizer() { return resizer_.get(); }
-
- // WindowObserver overrides:
- virtual void OnWindowHierarchyChanging(
- const HierarchyChangeParams& params) OVERRIDE;
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
-
- // WindowStateObserver overrides:
- virtual void OnWindowShowTypeChanged(wm::WindowState* window_state,
- wm::WindowShowType type) OVERRIDE;
-
- private:
- void AddHandlers(aura::Window* container);
- void RemoveHandlers();
-
- ToplevelWindowEventHandler* handler_;
- scoped_ptr<WindowResizer> resizer_;
-
- // If not NULL, this is an additional container that the dragged window has
- // moved to which ScopedWindowResizer has temporarily added observers on.
- aura::Window* target_container_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedWindowResizer);
-};
-
-ToplevelWindowEventHandler::ScopedWindowResizer::ScopedWindowResizer(
- ToplevelWindowEventHandler* handler,
- WindowResizer* resizer)
- : handler_(handler),
- resizer_(resizer),
- target_container_(NULL) {
- if (resizer_) {
- resizer_->GetTarget()->AddObserver(this);
- wm::GetWindowState(resizer_->GetTarget())->AddObserver(this);
- }
-}
-
-ToplevelWindowEventHandler::ScopedWindowResizer::~ScopedWindowResizer() {
- RemoveHandlers();
- if (resizer_) {
- resizer_->GetTarget()->RemoveObserver(this);
- wm::GetWindowState(resizer_->GetTarget())->RemoveObserver(this);
- }
-}
-
-void ToplevelWindowEventHandler::ScopedWindowResizer::OnWindowHierarchyChanging(
- const HierarchyChangeParams& params) {
- if (params.receiver != resizer_->GetTarget())
- return;
- wm::WindowState* state = wm::GetWindowState(params.receiver);
- if (state->continue_drag_after_reparent()) {
- state->set_continue_drag_after_reparent(false);
- AddHandlers(params.new_parent);
- } else {
- handler_->CompleteDrag(DRAG_COMPLETE, 0);
- }
-}
-
-void ToplevelWindowEventHandler::ScopedWindowResizer::OnWindowShowTypeChanged(
- wm::WindowState* window_state,
- wm::WindowShowType old) {
- if (!window_state->IsNormalShowState())
- handler_->CompleteDrag(DRAG_COMPLETE, 0);
-}
-
-void ToplevelWindowEventHandler::ScopedWindowResizer::OnWindowDestroying(
- aura::Window* window) {
- DCHECK(resizer_.get());
- DCHECK_EQ(resizer_->GetTarget(), window);
- handler_->ResizerWindowDestroyed();
-}
-
-void ToplevelWindowEventHandler::ScopedWindowResizer::AddHandlers(
- aura::Window* container) {
- RemoveHandlers();
- if (!handler_->owner()->Contains(container)) {
- container->AddPreTargetHandler(handler_);
- container->AddPostTargetHandler(handler_);
- target_container_ = container;
- }
-}
-
-void ToplevelWindowEventHandler::ScopedWindowResizer::RemoveHandlers() {
- if (target_container_) {
- target_container_->RemovePreTargetHandler(handler_);
- target_container_->RemovePostTargetHandler(handler_);
- target_container_ = NULL;
- }
-}
-
-
-// ToplevelWindowEventHandler --------------------------------------------------
-
-ToplevelWindowEventHandler::ToplevelWindowEventHandler(aura::Window* owner)
- : owner_(owner),
- in_move_loop_(false),
- move_cancelled_(false),
- in_gesture_drag_(false),
- destroyed_(NULL) {
- aura::client::SetWindowMoveClient(owner, this);
- Shell::GetInstance()->display_controller()->AddObserver(this);
- owner->AddPreTargetHandler(this);
- owner->AddPostTargetHandler(this);
-}
-
-ToplevelWindowEventHandler::~ToplevelWindowEventHandler() {
- Shell::GetInstance()->display_controller()->RemoveObserver(this);
- if (destroyed_)
- *destroyed_ = true;
-}
-
-void ToplevelWindowEventHandler::OnKeyEvent(ui::KeyEvent* event) {
- if (window_resizer_.get() && event->type() == ui::ET_KEY_PRESSED &&
- event->key_code() == ui::VKEY_ESCAPE) {
- CompleteDrag(DRAG_REVERT, event->flags());
- }
-}
-
-void ToplevelWindowEventHandler::OnMouseEvent(
- ui::MouseEvent* event) {
- if ((event->flags() &
- (ui::EF_MIDDLE_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON)) != 0)
- return;
-
- if (in_gesture_drag_)
- return;
-
- aura::Window* target = static_cast<aura::Window*>(event->target());
- switch (event->type()) {
- case ui::ET_MOUSE_PRESSED:
- HandleMousePressed(target, event);
- break;
- case ui::ET_MOUSE_DRAGGED:
- HandleDrag(target, event);
- break;
- case ui::ET_MOUSE_CAPTURE_CHANGED:
- case ui::ET_MOUSE_RELEASED:
- HandleMouseReleased(target, event);
- break;
- case ui::ET_MOUSE_MOVED:
- HandleMouseMoved(target, event);
- break;
- case ui::ET_MOUSE_EXITED:
- HandleMouseExited(target, event);
- break;
- default:
- break;
- }
-}
-
-void ToplevelWindowEventHandler::OnGestureEvent(ui::GestureEvent* event) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- if (!target->delegate())
- return;
-
- if (in_move_loop_ && !in_gesture_drag_)
- return;
-
- switch (event->type()) {
- case ui::ET_GESTURE_TAP_DOWN: {
- int component =
- target->delegate()->GetNonClientComponent(event->location());
- if (!(WindowResizer::GetBoundsChangeForWindowComponent(component) &
- WindowResizer::kBoundsChange_Resizes))
- return;
- internal::ResizeShadowController* controller =
- Shell::GetInstance()->resize_shadow_controller();
- if (controller)
- controller->ShowShadow(target, component);
- return;
- }
- case ui::ET_GESTURE_END: {
- internal::ResizeShadowController* controller =
- Shell::GetInstance()->resize_shadow_controller();
- if (controller)
- controller->HideShadow(target);
- return;
- }
- case ui::ET_GESTURE_SCROLL_BEGIN: {
- if (in_gesture_drag_)
- return;
- int component =
- target->delegate()->GetNonClientComponent(event->location());
- if (WindowResizer::GetBoundsChangeForWindowComponent(component) == 0) {
- window_resizer_.reset();
- return;
- }
- in_gesture_drag_ = true;
- pre_drag_window_bounds_ = target->bounds();
- gfx::Point location_in_parent(
- ConvertPointToParent(target, event->location()));
- CreateScopedWindowResizer(target, location_in_parent, component,
- aura::client::WINDOW_MOVE_SOURCE_TOUCH);
- break;
- }
- case ui::ET_GESTURE_SCROLL_UPDATE: {
- if (!in_gesture_drag_)
- return;
- if (window_resizer_.get() &&
- window_resizer_->resizer()->GetTarget() != target) {
- return;
- }
- HandleDrag(target, event);
- break;
- }
- case ui::ET_GESTURE_SCROLL_END:
- case ui::ET_SCROLL_FLING_START: {
- if (!in_gesture_drag_)
- return;
- if (window_resizer_.get() &&
- window_resizer_->resizer()->GetTarget() != target) {
- return;
- }
-
- CompleteDrag(DRAG_COMPLETE, event->flags());
- if (in_move_loop_) {
- quit_closure_.Run();
- in_move_loop_ = false;
- }
- in_gesture_drag_ = false;
-
- if (event->type() == ui::ET_GESTURE_SCROLL_END) {
- event->StopPropagation();
- return;
- }
-
- int component =
- target->delegate()->GetNonClientComponent(event->location());
- if (WindowResizer::GetBoundsChangeForWindowComponent(component) == 0)
- return;
-
- wm::WindowState* window_state = wm::GetWindowState(target);
- if (!window_state->IsNormalShowState())
- return;
-
- if (fabs(event->details().velocity_y()) >
- kMinVertVelocityForWindowMinimize) {
- // Minimize/maximize.
- if (event->details().velocity_y() > 0 &&
- window_state->CanMinimize()) {
- window_state->Minimize();
- window_state->set_always_restores_to_restore_bounds(true);
- window_state->SetRestoreBoundsInParent(pre_drag_window_bounds_);
- } else if (window_state->CanMaximize()) {
- window_state->SetRestoreBoundsInParent(pre_drag_window_bounds_);
- window_state->Maximize();
- }
- } else if (window_state->CanSnap() &&
- fabs(event->details().velocity_x()) >
- kMinHorizVelocityForWindowSwipe) {
- // Snap left/right.
- ui::ScopedLayerAnimationSettings scoped_setter(
- target->layer()->GetAnimator());
- scoped_setter.SetPreemptionStrategy(
- ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS);
- internal::SnapSizer::SnapWindow(window_state,
- event->details().velocity_x() < 0 ?
- internal::SnapSizer::LEFT_EDGE : internal::SnapSizer::RIGHT_EDGE);
- }
- break;
- }
- default:
- return;
- }
-
- event->StopPropagation();
-}
-
-aura::client::WindowMoveResult ToplevelWindowEventHandler::RunMoveLoop(
- aura::Window* source,
- const gfx::Vector2d& drag_offset,
- aura::client::WindowMoveSource move_source) {
- DCHECK(!in_move_loop_); // Can only handle one nested loop at a time.
- in_move_loop_ = true;
- move_cancelled_ = false;
- aura::Window* root_window = source->GetRootWindow();
- DCHECK(root_window);
- gfx::Point drag_location;
- if (move_source == aura::client::WINDOW_MOVE_SOURCE_TOUCH &&
- aura::Env::GetInstance()->is_touch_down()) {
- in_gesture_drag_ = true;
- bool has_point = ui::GestureRecognizer::Get()->
- GetLastTouchPointForTarget(source, &drag_location);
- DCHECK(has_point);
- } else {
- drag_location = root_window->GetDispatcher()->GetLastMouseLocationInRoot();
- aura::Window::ConvertPointToTarget(
- root_window, source->parent(), &drag_location);
- }
- // Set the cursor before calling CreateScopedWindowResizer(), as that will
- // eventually call LockCursor() and prevent the cursor from changing.
- aura::client::CursorClient* cursor_client =
- aura::client::GetCursorClient(root_window);
- if (cursor_client)
- cursor_client->SetCursor(ui::kCursorPointer);
- CreateScopedWindowResizer(source, drag_location, HTCAPTION, move_source);
- bool destroyed = false;
- destroyed_ = &destroyed;
- base::MessageLoopForUI* loop = base::MessageLoopForUI::current();
- base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop);
- base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher());
- quit_closure_ = run_loop.QuitClosure();
- run_loop.Run();
- if (destroyed)
- return aura::client::MOVE_CANCELED;
- destroyed_ = NULL;
- in_gesture_drag_ = in_move_loop_ = false;
- return move_cancelled_ ? aura::client::MOVE_CANCELED :
- aura::client::MOVE_SUCCESSFUL;
-}
-
-void ToplevelWindowEventHandler::EndMoveLoop() {
- if (!in_move_loop_)
- return;
-
- in_move_loop_ = false;
- CompleteDrag(DRAG_REVERT, 0);
- quit_closure_.Run();
-}
-
-void ToplevelWindowEventHandler::OnDisplayConfigurationChanging() {
- if (in_move_loop_) {
- move_cancelled_ = true;
- EndMoveLoop();
- } else {
- CompleteDrag(DRAG_REVERT, 0);
- }
-}
-
-void ToplevelWindowEventHandler::CreateScopedWindowResizer(
- aura::Window* window,
- const gfx::Point& point_in_parent,
- int window_component,
- aura::client::WindowMoveSource source) {
- window_resizer_.reset();
- WindowResizer* resizer =
- CreateWindowResizer(window, point_in_parent, window_component,
- source).release();
- if (resizer)
- window_resizer_.reset(new ScopedWindowResizer(this, resizer));
-}
-
-void ToplevelWindowEventHandler::CompleteDrag(DragCompletionStatus status,
- int event_flags) {
- scoped_ptr<ScopedWindowResizer> resizer(window_resizer_.release());
- if (resizer) {
- if (status == DRAG_COMPLETE)
- resizer->resizer()->CompleteDrag(event_flags);
- else
- resizer->resizer()->RevertDrag();
- }
-}
-
-void ToplevelWindowEventHandler::HandleMousePressed(
- aura::Window* target,
- ui::MouseEvent* event) {
- // Move/size operations are initiated post-target handling to give the target
- // an opportunity to cancel this default behavior by returning ER_HANDLED.
- if (ui::EventCanceledDefaultHandling(*event))
- return;
-
- // We also update the current window component here because for the
- // mouse-drag-release-press case, where the mouse is released and
- // pressed without mouse move event.
- int component =
- target->delegate()->GetNonClientComponent(event->location());
- if ((event->flags() &
- (ui::EF_IS_DOUBLE_CLICK | ui::EF_IS_TRIPLE_CLICK)) == 0 &&
- WindowResizer::GetBoundsChangeForWindowComponent(component)) {
- gfx::Point location_in_parent(
- ConvertPointToParent(target, event->location()));
- CreateScopedWindowResizer(target, location_in_parent, component,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE);
- } else {
- window_resizer_.reset();
- }
- if (WindowResizer::GetBoundsChangeForWindowComponent(component) != 0)
- event->StopPropagation();
-}
-
-void ToplevelWindowEventHandler::HandleMouseReleased(
- aura::Window* target,
- ui::MouseEvent* event) {
- if (event->phase() != ui::EP_PRETARGET)
- return;
-
- CompleteDrag(event->type() == ui::ET_MOUSE_RELEASED ?
- DRAG_COMPLETE : DRAG_REVERT,
- event->flags());
- if (in_move_loop_) {
- quit_closure_.Run();
- in_move_loop_ = false;
- }
- // Completing the drag may result in hiding the window. If this happens
- // return true so no other handlers/observers see the event. Otherwise
- // they see the event on a hidden window.
- if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED &&
- !target->IsVisible()) {
- event->StopPropagation();
- }
-}
-
-void ToplevelWindowEventHandler::HandleDrag(
- aura::Window* target,
- ui::LocatedEvent* event) {
- // This function only be triggered to move window
- // by mouse drag or touch move event.
- DCHECK(event->type() == ui::ET_MOUSE_DRAGGED ||
- event->type() == ui::ET_TOUCH_MOVED ||
- event->type() == ui::ET_GESTURE_SCROLL_UPDATE);
-
- // Drag actions are performed pre-target handling to prevent spurious mouse
- // moves from the move/size operation from being sent to the target.
- if (event->phase() != ui::EP_PRETARGET)
- return;
-
- if (!window_resizer_)
- return;
- window_resizer_->resizer()->Drag(
- ConvertPointToParent(target, event->location()), event->flags());
- event->StopPropagation();
-}
-
-void ToplevelWindowEventHandler::HandleMouseMoved(
- aura::Window* target,
- ui::LocatedEvent* event) {
- // Shadow effects are applied after target handling. Note that we don't
- // respect ER_HANDLED here right now since we have not had a reason to allow
- // the target to cancel shadow rendering.
- if (event->phase() != ui::EP_POSTTARGET)
- return;
-
- // TODO(jamescook): Move the resize cursor update code into here from
- // CompoundEventFilter?
- internal::ResizeShadowController* controller =
- Shell::GetInstance()->resize_shadow_controller();
- if (controller) {
- if (event->flags() & ui::EF_IS_NON_CLIENT) {
- int component =
- target->delegate()->GetNonClientComponent(event->location());
- controller->ShowShadow(target, component);
- } else {
- controller->HideShadow(target);
- }
- }
-}
-
-void ToplevelWindowEventHandler::HandleMouseExited(
- aura::Window* target,
- ui::LocatedEvent* event) {
- // Shadow effects are applied after target handling. Note that we don't
- // respect ER_HANDLED here right now since we have not had a reason to allow
- // the target to cancel shadow rendering.
- if (event->phase() != ui::EP_POSTTARGET)
- return;
-
- internal::ResizeShadowController* controller =
- Shell::GetInstance()->resize_shadow_controller();
- if (controller)
- controller->HideShadow(target);
-}
-
-void ToplevelWindowEventHandler::ResizerWindowDestroyed() {
- // We explicitly don't invoke RevertDrag() since that may do things to window.
- // Instead we destroy the resizer.
- window_resizer_.reset();
-
- // End the move loop. This does nothing if we're not in a move loop.
- EndMoveLoop();
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/toplevel_window_event_handler.h b/chromium/ash/wm/toplevel_window_event_handler.h
deleted file mode 100644
index 98c9296c947..00000000000
--- a/chromium/ash/wm/toplevel_window_event_handler.h
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_
-#define ASH_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_
-
-#include <set>
-
-#include "ash/ash_export.h"
-#include "ash/display/display_controller.h"
-#include "base/callback.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/client/window_move_client.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/point.h"
-#include "ui/gfx/rect.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ui {
-class LocatedEvent;
-}
-
-namespace ash {
-
-class WindowResizer;
-
-class ASH_EXPORT ToplevelWindowEventHandler
- : public ui::EventHandler,
- public aura::client::WindowMoveClient,
- public DisplayController::Observer {
- public:
- explicit ToplevelWindowEventHandler(aura::Window* owner);
- virtual ~ToplevelWindowEventHandler();
-
- const aura::Window* owner() const { return owner_; }
-
- // Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- // Overridden form aura::client::WindowMoveClient:
- virtual aura::client::WindowMoveResult RunMoveLoop(
- aura::Window* source,
- const gfx::Vector2d& drag_offset,
- aura::client::WindowMoveSource move_source) OVERRIDE;
- virtual void EndMoveLoop() OVERRIDE;
-
- // Overridden form ash::DisplayController::Observer:
- virtual void OnDisplayConfigurationChanging() OVERRIDE;
-
- private:
- class ScopedWindowResizer;
-
- enum DragCompletionStatus {
- DRAG_COMPLETE,
- DRAG_REVERT
- };
-
- void CreateScopedWindowResizer(aura::Window* window,
- const gfx::Point& point_in_parent,
- int window_component,
- aura::client::WindowMoveSource source);
-
- // Finishes the drag.
- void CompleteDrag(DragCompletionStatus status, int event_flags);
-
- void HandleMousePressed(aura::Window* target, ui::MouseEvent* event);
- void HandleMouseReleased(aura::Window* target, ui::MouseEvent* event);
-
- // Called during a drag to resize/position the window.
- // The return value is returned by OnMouseEvent() above.
- void HandleDrag(aura::Window* target, ui::LocatedEvent* event);
-
- // Called during mouse moves to update window resize shadows.
- // Return value is returned by OnMouseEvent() above.
- void HandleMouseMoved(aura::Window* target, ui::LocatedEvent* event);
-
- // Called for mouse exits to hide window resize shadows.
- // Return value is returned by OnMouseEvent() above.
- void HandleMouseExited(aura::Window* target, ui::LocatedEvent* event);
-
- // Invoked from ScopedWindowResizer if the window is destroyed.
- void ResizerWindowDestroyed();
-
- // The container which this event handler is handling events on.
- aura::Window* owner_;
-
- // Are we running a nested message loop from RunMoveLoop().
- bool in_move_loop_;
-
- // Was the move operation cancelled? Used only when the nested loop
- // is used to move a window.
- bool move_cancelled_;
-
- // Is a window move/resize in progress because of gesture events?
- bool in_gesture_drag_;
-
- // The window bounds before it started the drag.
- // When a window is moved using a touch gesture, and it is swiped up/down
- // maximize/minimize, the restore bounds should be set to the bounds of the
- // window when the drag started.
- gfx::Rect pre_drag_window_bounds_;
-
- scoped_ptr<ScopedWindowResizer> window_resizer_;
-
- base::Closure quit_closure_;
-
- // Used to track if this object is deleted while running a nested message
- // loop. If non-null the destructor sets this to true.
- bool* destroyed_;
-
- DISALLOW_COPY_AND_ASSIGN(ToplevelWindowEventHandler);
-};
-
-} // namespace aura
-
-#endif // ASH_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_
diff --git a/chromium/ash/wm/toplevel_window_event_handler_unittest.cc b/chromium/ash/wm/toplevel_window_event_handler_unittest.cc
deleted file mode 100644
index 99e7418bb9d..00000000000
--- a/chromium/ash/wm/toplevel_window_event_handler_unittest.cc
+++ /dev/null
@@ -1,694 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/toplevel_window_event_handler.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/lock_state_controller.h"
-#include "ash/wm/resize_shadow.h"
-#include "ash/wm/resize_shadow_controller.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/snap_sizer.h"
-#include "ash/wm/workspace_controller.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/aura_test_base.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/base/hit_test.h"
-#include "ui/events/event.h"
-#include "ui/gfx/screen.h"
-
-#if defined(OS_WIN)
-// Windows headers define macros for these function names which screw with us.
-#if defined(CreateWindow)
-#undef CreateWindow
-#endif
-#endif
-
-namespace ash {
-namespace test {
-
-namespace {
-
-// A simple window delegate that returns the specified hit-test code when
-// requested and applies a minimum size constraint if there is one.
-class TestWindowDelegate : public aura::test::TestWindowDelegate {
- public:
- explicit TestWindowDelegate(int hittest_code) {
- set_window_component(hittest_code);
- }
- virtual ~TestWindowDelegate() {}
-
- private:
- // Overridden from aura::Test::TestWindowDelegate:
- virtual void OnWindowDestroyed() OVERRIDE {
- delete this;
- }
-
- DISALLOW_COPY_AND_ASSIGN(TestWindowDelegate);
-};
-
-class ToplevelWindowEventHandlerTest : public AshTestBase {
- public:
- ToplevelWindowEventHandlerTest() {}
- virtual ~ToplevelWindowEventHandlerTest() {}
-
- protected:
- aura::Window* CreateWindow(int hittest_code) {
- TestWindowDelegate* d1 = new TestWindowDelegate(hittest_code);
- aura::Window* w1 = new aura::Window(d1);
- w1->SetType(aura::client::WINDOW_TYPE_NORMAL);
- w1->set_id(1);
- w1->Init(ui::LAYER_TEXTURED);
- aura::Window* parent =
- Shell::GetContainer(Shell::GetPrimaryRootWindow(),
- internal::kShellWindowId_AlwaysOnTopContainer);
- parent->AddChild(w1);
- w1->SetBounds(gfx::Rect(0, 0, 100, 100));
- w1->Show();
- return w1;
- }
-
- void DragFromCenterBy(aura::Window* window, int dx, int dy) {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), window);
- generator.DragMouseBy(dx, dy);
- }
-
- void TouchDragFromCenterBy(aura::Window* window, int dx, int dy) {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), window);
- generator.PressMoveAndReleaseTouchBy(dx, dy);
- }
-
- scoped_ptr<ToplevelWindowEventHandler> handler_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ToplevelWindowEventHandlerTest);
-};
-
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, Caption) {
- scoped_ptr<aura::Window> w1(CreateWindow(HTCAPTION));
- gfx::Size size = w1->bounds().size();
- DragFromCenterBy(w1.get(), 100, 100);
- // Position should have been offset by 100,100.
- EXPECT_EQ("100,100", w1->bounds().origin().ToString());
- // Size should not have.
- EXPECT_EQ(size.ToString(), w1->bounds().size().ToString());
-
- TouchDragFromCenterBy(w1.get(), 100, 100);
- // Position should have been offset by 100,100.
- EXPECT_EQ("200,200", w1->bounds().origin().ToString());
- // Size should not have.
- EXPECT_EQ(size.ToString(), w1->bounds().size().ToString());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, BottomRight) {
- scoped_ptr<aura::Window> w1(CreateWindow(HTBOTTOMRIGHT));
- gfx::Point position = w1->bounds().origin();
- DragFromCenterBy(w1.get(), 100, 100);
- // Position should not have changed.
- EXPECT_EQ(position, w1->bounds().origin());
- // Size should have increased by 100,100.
- EXPECT_EQ(gfx::Size(200, 200), w1->bounds().size());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, GrowBox) {
- scoped_ptr<aura::Window> w1(CreateWindow(HTGROWBOX));
- TestWindowDelegate* window_delegate =
- static_cast<TestWindowDelegate*>(w1->delegate());
- window_delegate->set_minimum_size(gfx::Size(40, 40));
-
- gfx::Point position = w1->bounds().origin();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- generator.MoveMouseToCenterOf(w1.get());
- generator.DragMouseBy(100, 100);
- // Position should not have changed.
- EXPECT_EQ(position, w1->bounds().origin());
- // Size should have increased by 100,100.
- EXPECT_EQ(gfx::Size(200, 200), w1->bounds().size());
-
- // Shrink the wnidow by (-100, -100).
- generator.DragMouseBy(-100, -100);
- // Position should not have changed.
- EXPECT_EQ(position, w1->bounds().origin());
- // Size should have decreased by 100,100.
- EXPECT_EQ(gfx::Size(100, 100), w1->bounds().size());
-
- // Enforce minimum size.
- generator.DragMouseBy(-60, -60);
- EXPECT_EQ(position, w1->bounds().origin());
- EXPECT_EQ(gfx::Size(40, 40), w1->bounds().size());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, Right) {
- scoped_ptr<aura::Window> w1(CreateWindow(HTRIGHT));
- gfx::Point position = w1->bounds().origin();
- DragFromCenterBy(w1.get(), 100, 100);
- // Position should not have changed.
- EXPECT_EQ(position, w1->bounds().origin());
- // Size should have increased by 100,0.
- EXPECT_EQ(gfx::Size(200, 100), w1->bounds().size());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, Bottom) {
- scoped_ptr<aura::Window> w1(CreateWindow(HTBOTTOM));
- gfx::Point position = w1->bounds().origin();
- DragFromCenterBy(w1.get(), 100, 100);
- // Position should not have changed.
- EXPECT_EQ(position, w1->bounds().origin());
- // Size should have increased by 0,100.
- EXPECT_EQ(gfx::Size(100, 200), w1->bounds().size());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, TopRight) {
- scoped_ptr<aura::Window> w1(CreateWindow(HTTOPRIGHT));
- DragFromCenterBy(w1.get(), -50, 50);
- // Position should have been offset by 0,50.
- EXPECT_EQ(gfx::Point(0, 50), w1->bounds().origin());
- // Size should have decreased by 50,50.
- EXPECT_EQ(gfx::Size(50, 50), w1->bounds().size());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, Top) {
- scoped_ptr<aura::Window> w1(CreateWindow(HTTOP));
- DragFromCenterBy(w1.get(), 50, 50);
- // Position should have been offset by 0,50.
- EXPECT_EQ(gfx::Point(0, 50), w1->bounds().origin());
- // Size should have decreased by 0,50.
- EXPECT_EQ(gfx::Size(100, 50), w1->bounds().size());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, Left) {
- scoped_ptr<aura::Window> w1(CreateWindow(HTLEFT));
- DragFromCenterBy(w1.get(), 50, 50);
- // Position should have been offset by 50,0.
- EXPECT_EQ(gfx::Point(50, 0), w1->bounds().origin());
- // Size should have decreased by 50,0.
- EXPECT_EQ(gfx::Size(50, 100), w1->bounds().size());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, BottomLeft) {
- scoped_ptr<aura::Window> w1(CreateWindow(HTBOTTOMLEFT));
- DragFromCenterBy(w1.get(), 50, -50);
- // Position should have been offset by 50,0.
- EXPECT_EQ(gfx::Point(50, 0), w1->bounds().origin());
- // Size should have decreased by 50,50.
- EXPECT_EQ(gfx::Size(50, 50), w1->bounds().size());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, TopLeft) {
- scoped_ptr<aura::Window> w1(CreateWindow(HTTOPLEFT));
- DragFromCenterBy(w1.get(), 50, 50);
- // Position should have been offset by 50,50.
- EXPECT_EQ(gfx::Point(50, 50), w1->bounds().origin());
- // Size should have decreased by 50,50.
- EXPECT_EQ(gfx::Size(50, 50), w1->bounds().size());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, Client) {
- scoped_ptr<aura::Window> w1(CreateWindow(HTCLIENT));
- gfx::Rect bounds = w1->bounds();
- DragFromCenterBy(w1.get(), 100, 100);
- // Neither position nor size should have changed.
- EXPECT_EQ(bounds, w1->bounds());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, LeftPastMinimum) {
- scoped_ptr<aura::Window> w1(CreateWindow(HTLEFT));
- TestWindowDelegate* window_delegate =
- static_cast<TestWindowDelegate*>(w1->delegate());
- window_delegate->set_minimum_size(gfx::Size(40, 40));
-
- // Simulate a large left-to-right drag. Window width should be clamped to
- // minimum and position change should be limited as well.
- DragFromCenterBy(w1.get(), 333, 0);
- EXPECT_EQ(gfx::Point(60, 0), w1->bounds().origin());
- EXPECT_EQ(gfx::Size(40, 100), w1->bounds().size());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, RightPastMinimum) {
- scoped_ptr<aura::Window> w1(CreateWindow(HTRIGHT));
- TestWindowDelegate* window_delegate =
- static_cast<TestWindowDelegate*>(w1->delegate());
- window_delegate->set_minimum_size(gfx::Size(40, 40));
- gfx::Point position = w1->bounds().origin();
-
- // Simulate a large right-to-left drag. Window width should be clamped to
- // minimum and position should not change.
- DragFromCenterBy(w1.get(), -333, 0);
- EXPECT_EQ(position, w1->bounds().origin());
- EXPECT_EQ(gfx::Size(40, 100), w1->bounds().size());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, TopLeftPastMinimum) {
- scoped_ptr<aura::Window> w1(CreateWindow(HTTOPLEFT));
- TestWindowDelegate* window_delegate =
- static_cast<TestWindowDelegate*>(w1->delegate());
- window_delegate->set_minimum_size(gfx::Size(40, 40));
-
- // Simulate a large top-left to bottom-right drag. Window width should be
- // clamped to minimum and position should be limited.
- DragFromCenterBy(w1.get(), 333, 444);
- EXPECT_EQ(gfx::Point(60, 60), w1->bounds().origin());
- EXPECT_EQ(gfx::Size(40, 40), w1->bounds().size());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, TopRightPastMinimum) {
- scoped_ptr<aura::Window> w1(CreateWindow(HTTOPRIGHT));
- TestWindowDelegate* window_delegate =
- static_cast<TestWindowDelegate*>(w1->delegate());
- window_delegate->set_minimum_size(gfx::Size(40, 40));
-
- // Simulate a large top-right to bottom-left drag. Window size should be
- // clamped to minimum, x position should not change, and y position should
- // be clamped.
- DragFromCenterBy(w1.get(), -333, 444);
- EXPECT_EQ(gfx::Point(0, 60), w1->bounds().origin());
- EXPECT_EQ(gfx::Size(40, 40), w1->bounds().size());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, BottomLeftPastMinimum) {
- scoped_ptr<aura::Window> w1(CreateWindow(HTBOTTOMLEFT));
- TestWindowDelegate* window_delegate =
- static_cast<TestWindowDelegate*>(w1->delegate());
- window_delegate->set_minimum_size(gfx::Size(40, 40));
-
- // Simulate a large bottom-left to top-right drag. Window size should be
- // clamped to minimum, x position should be clamped, and y position should
- // not change.
- DragFromCenterBy(w1.get(), 333, -444);
- EXPECT_EQ(gfx::Point(60, 0), w1->bounds().origin());
- EXPECT_EQ(gfx::Size(40, 40), w1->bounds().size());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, BottomRightPastMinimum) {
- scoped_ptr<aura::Window> w1(CreateWindow(HTBOTTOMRIGHT));
- TestWindowDelegate* window_delegate =
- static_cast<TestWindowDelegate*>(w1->delegate());
- window_delegate->set_minimum_size(gfx::Size(40, 40));
- gfx::Point position = w1->bounds().origin();
-
- // Simulate a large bottom-right to top-left drag. Window size should be
- // clamped to minimum and position should not change.
- DragFromCenterBy(w1.get(), -333, -444);
- EXPECT_EQ(position, w1->bounds().origin());
- EXPECT_EQ(gfx::Size(40, 40), w1->bounds().size());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, BottomRightWorkArea) {
- scoped_ptr<aura::Window> target(CreateWindow(HTBOTTOMRIGHT));
- gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(
- target.get()).work_area();
- gfx::Point position = target->bounds().origin();
- // Drag further than work_area bottom.
- DragFromCenterBy(target.get(), 100, work_area.height());
- // Position should not have changed.
- EXPECT_EQ(position, target->bounds().origin());
- // Size should have increased by 100, work_area.height() - target->bounds.y()
- EXPECT_EQ(gfx::Size(200, work_area.height() - target->bounds().y()),
- target->bounds().size());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, BottomLeftWorkArea) {
- scoped_ptr<aura::Window> target(CreateWindow(HTBOTTOMLEFT));
- gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(
- target.get()).work_area();
- gfx::Point position = target->bounds().origin();
- // Drag further than work_area bottom.
- DragFromCenterBy(target.get(), -30, work_area.height());
- // origin is now at 70, 100.
- EXPECT_EQ(position.x() - 30, target->bounds().x());
- EXPECT_EQ(position.y(), target->bounds().y());
- // Size should have increased by 30, work_area.height() - target->bounds.y()
- EXPECT_EQ(gfx::Size(130, work_area.height() - target->bounds().y()),
- target->bounds().size());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, BottomWorkArea) {
- scoped_ptr<aura::Window> target(CreateWindow(HTBOTTOM));
- gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(
- target.get()).work_area();
- gfx::Point position = target->bounds().origin();
- // Drag further than work_area bottom.
- DragFromCenterBy(target.get(), 0, work_area.height());
- // Position should not have changed.
- EXPECT_EQ(position, target->bounds().origin());
- // Size should have increased by 0, work_area.height() - target->bounds.y()
- EXPECT_EQ(gfx::Size(100, work_area.height() - target->bounds().y()),
- target->bounds().size());
-}
-
-// Verifies we don't let windows drag to a -y location.
-TEST_F(ToplevelWindowEventHandlerTest, DontDragToNegativeY) {
- scoped_ptr<aura::Window> target(CreateWindow(HTTOP));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
- generator.MoveMouseTo(0, 5);
- generator.DragMouseBy(0, -5);
- // The y location and height should not have changed.
- EXPECT_EQ(0, target->bounds().y());
- EXPECT_EQ(100, target->bounds().height());
-}
-
-// Verifies we don't let windows go bigger than the display width.
-TEST_F(ToplevelWindowEventHandlerTest, DontGotWiderThanScreen) {
- scoped_ptr<aura::Window> target(CreateWindow(HTRIGHT));
- gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(
- target.get()).bounds();
- DragFromCenterBy(target.get(), work_area.width() * 2, 0);
- // The y location and height should not have changed.
- EXPECT_EQ(work_area.width(), target->bounds().width());
-}
-
-// Verifies that touch-gestures drag the window correctly.
-TEST_F(ToplevelWindowEventHandlerTest, GestureDrag) {
- scoped_ptr<aura::Window> target(
- CreateTestWindowInShellWithDelegate(
- new TestWindowDelegate(HTCAPTION),
- 0,
- gfx::Rect(0, 0, 100, 100)));
- wm::WindowState* window_state = wm::GetWindowState(target.get());
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
- gfx::Rect old_bounds = target->bounds();
- gfx::Point location(5, 5);
- target->SetProperty(aura::client::kCanMaximizeKey, true);
-
- gfx::Point end = location;
-
- // Snap right;
- {
- // Get the expected snapped bounds before snapping.
- internal::SnapSizer sizer(window_state, location,
- internal::SnapSizer::RIGHT_EDGE,
- internal::SnapSizer::OTHER_INPUT);
- gfx::Rect snapped_bounds = sizer.GetSnapBounds(target->bounds());
-
- end.Offset(100, 0);
- generator.GestureScrollSequence(location, end,
- base::TimeDelta::FromMilliseconds(5),
- 10);
- RunAllPendingInMessageLoop();
-
- // Verify that the window has moved after the gesture.
- EXPECT_NE(old_bounds.ToString(), target->bounds().ToString());
- EXPECT_EQ(snapped_bounds.ToString(), target->bounds().ToString());
- }
-
- old_bounds = target->bounds();
-
- // Snap left.
- {
- // Get the expected snapped bounds before snapping.
- internal::SnapSizer sizer(window_state, location,
- internal::SnapSizer::LEFT_EDGE,
- internal::SnapSizer::OTHER_INPUT);
- gfx::Rect snapped_bounds = sizer.GetSnapBounds(target->bounds());
- end = location = target->GetBoundsInRootWindow().CenterPoint();
- end.Offset(-100, 0);
- generator.GestureScrollSequence(location, end,
- base::TimeDelta::FromMilliseconds(5),
- 10);
- RunAllPendingInMessageLoop();
-
- EXPECT_NE(old_bounds.ToString(), target->bounds().ToString());
- EXPECT_EQ(snapped_bounds.ToString(), target->bounds().ToString());
- }
-
- gfx::Rect bounds_before_maximization = target->bounds();
- bounds_before_maximization.Offset(0, 100);
- target->SetBounds(bounds_before_maximization);
- old_bounds = target->bounds();
-
- // Maximize.
- end = location = target->GetBoundsInRootWindow().CenterPoint();
- end.Offset(0, -100);
- generator.GestureScrollSequence(location, end,
- base::TimeDelta::FromMilliseconds(5),
- 10);
- RunAllPendingInMessageLoop();
-
- EXPECT_NE(old_bounds.ToString(), target->bounds().ToString());
- EXPECT_TRUE(window_state->IsMaximized());
- EXPECT_EQ(old_bounds.ToString(),
- window_state->GetRestoreBoundsInScreen().ToString());
-
- window_state->Restore();
- target->SetBounds(old_bounds);
-
- // Minimize.
- end = location = target->GetBoundsInRootWindow().CenterPoint();
- end.Offset(0, 100);
- generator.GestureScrollSequence(location, end,
- base::TimeDelta::FromMilliseconds(5),
- 10);
- RunAllPendingInMessageLoop();
- EXPECT_NE(old_bounds.ToString(), target->bounds().ToString());
- EXPECT_TRUE(window_state->IsMinimized());
- EXPECT_TRUE(window_state->always_restores_to_restore_bounds());
- EXPECT_EQ(old_bounds.ToString(),
- window_state->GetRestoreBoundsInScreen().ToString());
-}
-
-// Tests that a gesture cannot minimize a window in login/lock screen.
-TEST_F(ToplevelWindowEventHandlerTest, GestureDragMinimizeLoginScreen) {
- LockStateController* state_controller =
- Shell::GetInstance()->lock_state_controller();
- state_controller->OnLoginStateChanged(user::LOGGED_IN_NONE);
- state_controller->OnLockStateChanged(false);
- SetUserLoggedIn(false);
-
- scoped_ptr<aura::Window> target(CreateWindow(HTCAPTION));
- aura::Window* lock = internal::RootWindowController::ForWindow(target.get())->
- GetContainer(internal::kShellWindowId_LockSystemModalContainer);
- lock->AddChild(target.get());
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
- gfx::Rect old_bounds = target->bounds();
- gfx::Point location(5, 5);
- target->SetProperty(aura::client::kCanMaximizeKey, true);
-
- gfx::Point end = location;
- end.Offset(0, 100);
- generator.GestureScrollSequence(location, end,
- base::TimeDelta::FromMilliseconds(5),
- 10);
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(wm::GetWindowState(target.get())->IsMinimized());
-}
-
-TEST_F(ToplevelWindowEventHandlerTest, GestureDragToRestore) {
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithDelegate(
- new TestWindowDelegate(HTCAPTION),
- 0,
- gfx::Rect(10, 20, 30, 40)));
- window->Show();
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- window_state->Activate();
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
- gfx::Rect old_bounds = window->bounds();
- gfx::Point location, end;
- end = location = window->GetBoundsInRootWindow().CenterPoint();
- end.Offset(0, 100);
- generator.GestureScrollSequence(location, end,
- base::TimeDelta::FromMilliseconds(5),
- 10);
- RunAllPendingInMessageLoop();
- EXPECT_NE(old_bounds.ToString(), window->bounds().ToString());
- EXPECT_TRUE(window_state->IsMinimized());
- EXPECT_TRUE(window_state->always_restores_to_restore_bounds());
- EXPECT_EQ(old_bounds.ToString(),
- window_state->GetRestoreBoundsInScreen().ToString());
-}
-
-// Tests that an unresizable window cannot be dragged or snapped using gestures.
-TEST_F(ToplevelWindowEventHandlerTest, GestureDragForUnresizableWindow) {
- scoped_ptr<aura::Window> target(CreateWindow(HTCAPTION));
- wm::WindowState* window_state = wm::GetWindowState(target.get());
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
- gfx::Rect old_bounds = target->bounds();
- gfx::Point location(5, 5);
-
- target->SetProperty(aura::client::kCanResizeKey, false);
-
- gfx::Point end = location;
-
- // Try to snap right. The window is not resizable. So it should not snap.
- {
- // Get the expected snapped bounds before the gesture.
- internal::SnapSizer sizer(window_state, location,
- internal::SnapSizer::RIGHT_EDGE,
- internal::SnapSizer::OTHER_INPUT);
- gfx::Rect snapped_bounds = sizer.GetSnapBounds(target->bounds());
-
- end.Offset(100, 0);
- generator.GestureScrollSequence(location, end,
- base::TimeDelta::FromMilliseconds(5),
- 10);
- RunAllPendingInMessageLoop();
-
- // Verify that the window has moved after the gesture.
- gfx::Rect expected_bounds(old_bounds);
- expected_bounds.Offset(gfx::Vector2d(100, 0));
- EXPECT_EQ(expected_bounds.ToString(), target->bounds().ToString());
-
- // Verify that the window did not snap left.
- EXPECT_NE(snapped_bounds.ToString(), target->bounds().ToString());
- }
-
- old_bounds = target->bounds();
-
- // Try to snap left. It should not snap.
- {
- // Get the expected snapped bounds before the gesture.
- internal::SnapSizer sizer(window_state, location,
- internal::SnapSizer::LEFT_EDGE,
- internal::SnapSizer::OTHER_INPUT);
- gfx::Rect snapped_bounds = sizer.GetSnapBounds(target->bounds());
- end = location = target->GetBoundsInRootWindow().CenterPoint();
- end.Offset(-100, 0);
- generator.GestureScrollSequence(location, end,
- base::TimeDelta::FromMilliseconds(5),
- 10);
- RunAllPendingInMessageLoop();
-
- // Verify that the window has moved after the gesture.
- gfx::Rect expected_bounds(old_bounds);
- expected_bounds.Offset(gfx::Vector2d(-100, 0));
- EXPECT_EQ(expected_bounds.ToString(), target->bounds().ToString());
-
- // Verify that the window did not snap left.
- EXPECT_NE(snapped_bounds.ToString(), target->bounds().ToString());
- }
-}
-
-// Tests that dragging multiple windows at the same time is not allowed.
-TEST_F(ToplevelWindowEventHandlerTest, GestureDragMultipleWindows) {
- scoped_ptr<aura::Window> target(
- CreateTestWindowInShellWithDelegate(
- new TestWindowDelegate(HTCAPTION),
- 0,
- gfx::Rect(0, 0, 100, 100)));
- scoped_ptr<aura::Window> notmoved(
- CreateTestWindowInShellWithDelegate(
- new TestWindowDelegate(HTCAPTION),
- 1, gfx::Rect(100, 0, 100, 100)));
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
- gfx::Rect old_bounds = target->bounds();
- gfx::Point location(5, 5);
- target->SetProperty(aura::client::kCanMaximizeKey, true);
-
- // Send some touch events to start dragging |target|.
- generator.MoveTouch(location);
- generator.PressTouch();
- location.Offset(40, 5);
- generator.MoveTouch(location);
-
- // Try to drag |notmoved| window. This should not move the window.
- {
- gfx::Rect bounds = notmoved->bounds();
- aura::test::EventGenerator gen(Shell::GetPrimaryRootWindow(),
- notmoved.get());
- gfx::Point start = notmoved->bounds().origin() + gfx::Vector2d(10, 10);
- gfx::Point end = start + gfx::Vector2d(100, 10);
- gen.GestureScrollSequence(start, end,
- base::TimeDelta::FromMilliseconds(10),
- 10);
- EXPECT_EQ(bounds.ToString(), notmoved->bounds().ToString());
- }
-}
-
-// Verifies pressing escape resets the bounds to the original bounds.
-// Disabled crbug.com/166219.
-#if defined(OS_WIN)
-#define MAYBE_EscapeReverts DISABLED_EscapeReverts
-#else
-#define MAYBE_EscapeReverts EscapeReverts
-#endif
-TEST_F(ToplevelWindowEventHandlerTest, MAYBE_EscapeReverts) {
- scoped_ptr<aura::Window> target(CreateWindow(HTBOTTOMRIGHT));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
- generator.PressLeftButton();
- generator.MoveMouseBy(10, 11);
-
- // Execute any scheduled draws so that pending mouse events are processed.
- RunAllPendingInMessageLoop();
-
- EXPECT_EQ("0,0 110x111", target->bounds().ToString());
- generator.PressKey(ui::VKEY_ESCAPE, 0);
- generator.ReleaseKey(ui::VKEY_ESCAPE, 0);
- EXPECT_EQ("0,0 100x100", target->bounds().ToString());
-}
-
-// Verifies window minimization/maximization completes drag.
-// Disabled crbug.com/166219.
-#if defined(OS_WIN)
-#define MAYBE_MinimizeMaximizeCompletes DISABLED_MinimizeMaximizeCompletes
-#else
-#define MAYBE_MinimizeMaximizeCompletes MinimizeMaximizeCompletes
-#endif
-TEST_F(ToplevelWindowEventHandlerTest, MAYBE_MinimizeMaximizeCompletes) {
- // Once window is minimized, window dragging completes.
- {
- scoped_ptr<aura::Window> target(CreateWindow(HTCAPTION));
- target->Focus();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
- generator.PressLeftButton();
- generator.MoveMouseBy(10, 11);
- RunAllPendingInMessageLoop();
- EXPECT_EQ("10,11 100x100", target->bounds().ToString());
- wm::WindowState* window_state = wm::GetWindowState(target.get());
- window_state->Minimize();
- window_state->Restore();
-
- generator.PressLeftButton();
- generator.MoveMouseBy(10, 11);
- RunAllPendingInMessageLoop();
- EXPECT_EQ("10,11 100x100", target->bounds().ToString());
- }
-
- // Once window is maximized, window dragging completes.
- {
- scoped_ptr<aura::Window> target(CreateWindow(HTCAPTION));
- target->Focus();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
- generator.PressLeftButton();
- generator.MoveMouseBy(10, 11);
- RunAllPendingInMessageLoop();
- EXPECT_EQ("10,11 100x100", target->bounds().ToString());
- wm::WindowState* window_state = wm::GetWindowState(target.get());
- window_state->Maximize();
- window_state->Restore();
-
- generator.PressLeftButton();
- generator.MoveMouseBy(10, 11);
- RunAllPendingInMessageLoop();
- EXPECT_EQ("10,11 100x100", target->bounds().ToString());
- }
-}
-
-// Showing the resize shadows when the mouse is over the window edges is tested
-// in resize_shadow_and_cursor_test.cc
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/wm/user_activity_detector.cc b/chromium/ash/wm/user_activity_detector.cc
deleted file mode 100644
index 2809bb5b2a5..00000000000
--- a/chromium/ash/wm/user_activity_detector.cc
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/user_activity_detector.h"
-
-#include "ash/wm/user_activity_observer.h"
-#include "base/format_macros.h"
-#include "base/logging.h"
-#include "base/strings/stringprintf.h"
-#include "ui/events/event.h"
-
-namespace ash {
-
-namespace {
-
-// Returns a string describing |event|.
-std::string GetEventDebugString(const ui::Event* event) {
- std::string details = base::StringPrintf(
- "type=%d name=%s flags=%d time=%" PRId64,
- event->type(), event->name().c_str(), event->flags(),
- event->time_stamp().InMilliseconds());
-
- if (event->IsKeyEvent()) {
- details += base::StringPrintf(" key_code=%d",
- static_cast<const ui::KeyEvent*>(event)->key_code());
- } else if (event->IsMouseEvent() || event->IsTouchEvent() ||
- event->IsGestureEvent()) {
- details += base::StringPrintf(" location=%s",
- static_cast<const ui::LocatedEvent*>(
- event)->location().ToString().c_str());
- }
-
- return details;
-}
-
-} // namespace
-
-const int UserActivityDetector::kNotifyIntervalMs = 200;
-
-// Too low and mouse events generated at the tail end of reconfiguration
-// will be reported as user activity and turn the screen back on; too high
-// and we'll ignore legitimate activity.
-const int UserActivityDetector::kDisplayPowerChangeIgnoreMouseMs = 1000;
-
-UserActivityDetector::UserActivityDetector() {
-}
-
-UserActivityDetector::~UserActivityDetector() {
-}
-
-bool UserActivityDetector::HasObserver(UserActivityObserver* observer) const {
- return observers_.HasObserver(observer);
-}
-
-void UserActivityDetector::AddObserver(UserActivityObserver* observer) {
- observers_.AddObserver(observer);
-}
-
-void UserActivityDetector::RemoveObserver(UserActivityObserver* observer) {
- observers_.RemoveObserver(observer);
-}
-
-void UserActivityDetector::OnDisplayPowerChanging() {
- honor_mouse_events_time_ = GetCurrentTime() +
- base::TimeDelta::FromMilliseconds(kDisplayPowerChangeIgnoreMouseMs);
-}
-
-void UserActivityDetector::OnKeyEvent(ui::KeyEvent* event) {
- HandleActivity(event);
-}
-
-void UserActivityDetector::OnMouseEvent(ui::MouseEvent* event) {
- if (event->flags() & ui::EF_IS_SYNTHESIZED)
- return;
- if (!honor_mouse_events_time_.is_null() &&
- GetCurrentTime() < honor_mouse_events_time_)
- return;
-
- HandleActivity(event);
-}
-
-void UserActivityDetector::OnScrollEvent(ui::ScrollEvent* event) {
- HandleActivity(event);
-}
-
-void UserActivityDetector::OnTouchEvent(ui::TouchEvent* event) {
- HandleActivity(event);
-}
-
-void UserActivityDetector::OnGestureEvent(ui::GestureEvent* event) {
- HandleActivity(event);
-}
-
-base::TimeTicks UserActivityDetector::GetCurrentTime() const {
- return !now_for_test_.is_null() ? now_for_test_ : base::TimeTicks::Now();
-}
-
-void UserActivityDetector::HandleActivity(const ui::Event* event) {
- base::TimeTicks now = GetCurrentTime();
- last_activity_time_ = now;
- if (last_observer_notification_time_.is_null() ||
- (now - last_observer_notification_time_).InMillisecondsF() >=
- kNotifyIntervalMs) {
- if (VLOG_IS_ON(1))
- VLOG(1) << "Reporting user activity: " << GetEventDebugString(event);
- FOR_EACH_OBSERVER(UserActivityObserver, observers_, OnUserActivity(event));
- last_observer_notification_time_ = now;
- }
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/user_activity_detector.h b/chromium/ash/wm/user_activity_detector.h
deleted file mode 100644
index 1140c3d9196..00000000000
--- a/chromium/ash/wm/user_activity_detector.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_USER_ACTIVITY_DETECTOR_H_
-#define ASH_WM_USER_ACTIVITY_DETECTOR_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/observer_list.h"
-#include "base/time/time.h"
-#include "ui/events/event_handler.h"
-
-namespace ash {
-
-class UserActivityObserver;
-
-// Watches for input events and notifies observers that the user is active.
-class ASH_EXPORT UserActivityDetector : public ui::EventHandler {
- public:
- // Minimum amount of time between notifications to observers.
- static const int kNotifyIntervalMs;
-
- // Amount of time that mouse events should be ignored after notification
- // is received that displays' power states are being changed.
- static const int kDisplayPowerChangeIgnoreMouseMs;
-
- UserActivityDetector();
- virtual ~UserActivityDetector();
-
- base::TimeTicks last_activity_time() const { return last_activity_time_; }
-
- void set_now_for_test(base::TimeTicks now) { now_for_test_ = now; }
-
- bool HasObserver(UserActivityObserver* observer) const;
- void AddObserver(UserActivityObserver* observer);
- void RemoveObserver(UserActivityObserver* observer);
-
- // Called when displays are about to be turned on or off.
- void OnDisplayPowerChanging();
-
- // ui::EventHandler implementation.
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- private:
- // Returns |now_for_test_| if set or base::TimeTicks::Now() otherwise.
- base::TimeTicks GetCurrentTime() const;
-
- // Updates |last_activity_time_|. Additionally notifies observers and
- // updates |last_observer_notification_time_| if enough time has passed
- // since the last notification.
- void HandleActivity(const ui::Event* event);
-
- ObserverList<UserActivityObserver> observers_;
-
- // Last time at which user activity was observed.
- base::TimeTicks last_activity_time_;
-
- // Last time at which we notified observers that the user was active.
- base::TimeTicks last_observer_notification_time_;
-
- // If set, used when the current time is needed. This can be set by tests to
- // simulate the passage of time.
- base::TimeTicks now_for_test_;
-
- // If set, mouse events will be ignored until this time is reached. This
- // is to avoid reporting mouse events that occur when displays are turned
- // on or off as user activity.
- base::TimeTicks honor_mouse_events_time_;
-
- DISALLOW_COPY_AND_ASSIGN(UserActivityDetector);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_USER_ACTIVITY_DETECTOR_H_
diff --git a/chromium/ash/wm/user_activity_detector_unittest.cc b/chromium/ash/wm/user_activity_detector_unittest.cc
deleted file mode 100644
index 89f6aee910a..00000000000
--- a/chromium/ash/wm/user_activity_detector_unittest.cc
+++ /dev/null
@@ -1,225 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/user_activity_detector.h"
-
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/user_activity_observer.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/time/time.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/events/event.h"
-#include "ui/events/event_constants.h"
-#include "ui/events/keycodes/keyboard_codes.h"
-#include "ui/gfx/point.h"
-
-namespace {
-
-void SetEventTarget(ui::EventTarget* target, ui::Event* event) {
- ui::Event::DispatcherApi dispatch_helper(event);
- dispatch_helper.set_target(target);
-}
-
-}
-
-namespace ash {
-namespace test {
-
-// Implementation that just counts the number of times we've been told that the
-// user is active.
-class TestUserActivityObserver : public UserActivityObserver {
- public:
- TestUserActivityObserver() : num_invocations_(0) {}
-
- int num_invocations() const { return num_invocations_; }
- void reset_stats() { num_invocations_ = 0; }
-
- // UserActivityObserver implementation.
- virtual void OnUserActivity(const ui::Event* event) OVERRIDE {
- num_invocations_++;
- }
-
- private:
- // Number of times that OnUserActivity() has been called.
- int num_invocations_;
-
- DISALLOW_COPY_AND_ASSIGN(TestUserActivityObserver);
-};
-
-class UserActivityDetectorTest : public AshTestBase {
- public:
- UserActivityDetectorTest() {}
- virtual ~UserActivityDetectorTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- observer_.reset(new TestUserActivityObserver);
- detector_ = Shell::GetInstance()->user_activity_detector();
- detector_->AddObserver(observer_.get());
-
- now_ = base::TimeTicks::Now();
- detector_->set_now_for_test(now_);
- }
-
- virtual void TearDown() OVERRIDE {
- detector_->RemoveObserver(observer_.get());
- AshTestBase::TearDown();
- }
-
- protected:
- // Move |detector_|'s idea of the current time forward by |delta|.
- void AdvanceTime(base::TimeDelta delta) {
- now_ += delta;
- detector_->set_now_for_test(now_);
- }
-
- UserActivityDetector* detector_; // not owned
-
- scoped_ptr<TestUserActivityObserver> observer_;
-
- base::TimeTicks now_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UserActivityDetectorTest);
-};
-
-// Checks that the observer is notified in response to different types of input
-// events.
-TEST_F(UserActivityDetectorTest, Basic) {
- scoped_ptr<aura::Window> window(CreateTestWindowInShellWithId(12345));
-
- ui::KeyEvent key_event(ui::ET_KEY_PRESSED, ui::VKEY_A, ui::EF_NONE, false);
- SetEventTarget(window.get(), &key_event);
- detector_->OnKeyEvent(&key_event);
- EXPECT_FALSE(key_event.handled());
- EXPECT_EQ(now_.ToInternalValue(),
- detector_->last_activity_time().ToInternalValue());
- EXPECT_EQ(1, observer_->num_invocations());
- observer_->reset_stats();
-
- base::TimeDelta advance_delta = base::TimeDelta::FromMilliseconds(
- UserActivityDetector::kNotifyIntervalMs);
- AdvanceTime(advance_delta);
- ui::MouseEvent mouse_event(
- ui::ET_MOUSE_MOVED, gfx::Point(), gfx::Point(), ui::EF_NONE);
- SetEventTarget(window.get(), &mouse_event);
- detector_->OnMouseEvent(&mouse_event);
- EXPECT_FALSE(mouse_event.handled());
- EXPECT_EQ(now_.ToInternalValue(),
- detector_->last_activity_time().ToInternalValue());
- EXPECT_EQ(1, observer_->num_invocations());
- observer_->reset_stats();
-
- base::TimeTicks time_before_ignore = now_;
-
- // Temporarily ignore mouse events when displays are turned on or off.
- detector_->OnDisplayPowerChanging();
- detector_->OnMouseEvent(&mouse_event);
- EXPECT_FALSE(mouse_event.handled());
- EXPECT_EQ(time_before_ignore.ToInternalValue(),
- detector_->last_activity_time().ToInternalValue());
- EXPECT_EQ(0, observer_->num_invocations());
- observer_->reset_stats();
-
- const base::TimeDelta kIgnoreMouseTime =
- base::TimeDelta::FromMilliseconds(
- UserActivityDetector::kDisplayPowerChangeIgnoreMouseMs);
- AdvanceTime(kIgnoreMouseTime / 2);
- detector_->OnMouseEvent(&mouse_event);
- EXPECT_FALSE(mouse_event.handled());
- EXPECT_EQ(time_before_ignore.ToInternalValue(),
- detector_->last_activity_time().ToInternalValue());
- EXPECT_EQ(0, observer_->num_invocations());
- observer_->reset_stats();
-
- // After enough time has passed, mouse events should be reported again.
- AdvanceTime(std::max(kIgnoreMouseTime, advance_delta));
- detector_->OnMouseEvent(&mouse_event);
- EXPECT_FALSE(mouse_event.handled());
- EXPECT_EQ(now_.ToInternalValue(),
- detector_->last_activity_time().ToInternalValue());
- EXPECT_EQ(1, observer_->num_invocations());
- observer_->reset_stats();
-
- AdvanceTime(advance_delta);
- ui::TouchEvent touch_event(
- ui::ET_TOUCH_PRESSED, gfx::Point(), 0, base::TimeDelta());
- SetEventTarget(window.get(), &touch_event);
- detector_->OnTouchEvent(&touch_event);
- EXPECT_FALSE(touch_event.handled());
- EXPECT_EQ(now_.ToInternalValue(),
- detector_->last_activity_time().ToInternalValue());
- EXPECT_EQ(1, observer_->num_invocations());
- observer_->reset_stats();
-
- AdvanceTime(advance_delta);
- ui::GestureEvent gesture_event(
- ui::ET_GESTURE_TAP, 0, 0, ui::EF_NONE,
- base::TimeDelta::FromMilliseconds(base::Time::Now().ToDoubleT() * 1000),
- ui::GestureEventDetails(ui::ET_GESTURE_TAP, 0, 0), 0U);
- SetEventTarget(window.get(), &gesture_event);
- detector_->OnGestureEvent(&gesture_event);
- EXPECT_FALSE(gesture_event.handled());
- EXPECT_EQ(now_.ToInternalValue(),
- detector_->last_activity_time().ToInternalValue());
- EXPECT_EQ(1, observer_->num_invocations());
- observer_->reset_stats();
-}
-
-// Checks that observers aren't notified too frequently.
-TEST_F(UserActivityDetectorTest, RateLimitNotifications) {
- scoped_ptr<aura::Window> window(CreateTestWindowInShellWithId(12345));
-
- // The observer should be notified about a key event.
- ui::KeyEvent event(ui::ET_KEY_PRESSED, ui::VKEY_A, ui::EF_NONE, false);
- SetEventTarget(window.get(), &event);
- detector_->OnKeyEvent(&event);
- EXPECT_FALSE(event.handled());
- EXPECT_EQ(1, observer_->num_invocations());
- observer_->reset_stats();
-
- // It shouldn't be notified if a second event occurs
- // in the same instant in time.
- detector_->OnKeyEvent(&event);
- EXPECT_FALSE(event.handled());
- EXPECT_EQ(0, observer_->num_invocations());
- observer_->reset_stats();
-
- // Advance the time, but not quite enough for another notification to be sent.
- AdvanceTime(
- base::TimeDelta::FromMilliseconds(
- UserActivityDetector::kNotifyIntervalMs - 100));
- detector_->OnKeyEvent(&event);
- EXPECT_FALSE(event.handled());
- EXPECT_EQ(0, observer_->num_invocations());
- observer_->reset_stats();
-
- // Advance time by the notification interval, definitely moving out of the
- // rate limit. This should let us trigger another notification.
- AdvanceTime(base::TimeDelta::FromMilliseconds(
- UserActivityDetector::kNotifyIntervalMs));
-
- detector_->OnKeyEvent(&event);
- EXPECT_FALSE(event.handled());
- EXPECT_EQ(1, observer_->num_invocations());
-}
-
-// Checks that the detector ignores synthetic mouse events.
-TEST_F(UserActivityDetectorTest, IgnoreSyntheticMouseEvents) {
- scoped_ptr<aura::Window> window(CreateTestWindowInShellWithId(12345));
- ui::MouseEvent mouse_event(
- ui::ET_MOUSE_MOVED, gfx::Point(), gfx::Point(), ui::EF_IS_SYNTHESIZED);
- SetEventTarget(window.get(), &mouse_event);
- detector_->OnMouseEvent(&mouse_event);
- EXPECT_FALSE(mouse_event.handled());
- EXPECT_EQ(base::TimeTicks().ToInternalValue(),
- detector_->last_activity_time().ToInternalValue());
- EXPECT_EQ(0, observer_->num_invocations());
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/wm/user_activity_observer.h b/chromium/ash/wm/user_activity_observer.h
deleted file mode 100644
index a65ebfa9667..00000000000
--- a/chromium/ash/wm/user_activity_observer.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_USER_ACTIVITY_OBSERVER_H_
-#define ASH_WM_USER_ACTIVITY_OBSERVER_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-
-namespace ui {
-class Event;
-}
-
-namespace ash {
-
-// Interface for classes that want to be notified about user activity.
-// Implementations should register themselves with UserActivityDetector.
-class ASH_EXPORT UserActivityObserver {
- public:
- // Invoked periodically while the user is active (i.e. generating input
- // events). |event| is the event that triggered the notification; it may
- // be NULL in some cases (e.g. testing or synthetic invocations).
- virtual void OnUserActivity(const ui::Event* event) = 0;
-
- protected:
- UserActivityObserver() {}
- virtual ~UserActivityObserver() {}
-
- DISALLOW_COPY_AND_ASSIGN(UserActivityObserver);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_USER_ACTIVITY_OBSERVER_H_
diff --git a/chromium/ash/wm/video_detector.cc b/chromium/ash/wm/video_detector.cc
deleted file mode 100644
index 33eba33a707..00000000000
--- a/chromium/ash/wm/video_detector.cc
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/video_detector.h"
-
-#include "ash/shell.h"
-#include "ash/wm/window_state.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/rect.h"
-#include "ui/views/corewm/window_util.h"
-
-namespace ash {
-
-const int VideoDetector::kMinUpdateWidth = 333;
-const int VideoDetector::kMinUpdateHeight = 250;
-const int VideoDetector::kMinFramesPerSecond = 15;
-const double VideoDetector::kNotifyIntervalSec = 1.0;
-
-// Stores information about updates to a window and determines whether it's
-// likely that a video is playing in it.
-class VideoDetector::WindowInfo {
- public:
- WindowInfo() : buffer_start_(0), buffer_size_(0) {}
-
- // Handles an update within a window, returning true if it appears that
- // video is currently playing in the window.
- bool RecordUpdateAndCheckForVideo(const gfx::Rect& region,
- base::TimeTicks now) {
- if (region.width() < kMinUpdateWidth || region.height() < kMinUpdateHeight)
- return false;
-
- // If the buffer is full, drop the first timestamp.
- if (buffer_size_ == static_cast<size_t>(kMinFramesPerSecond)) {
- buffer_start_ = (buffer_start_ + 1) % kMinFramesPerSecond;
- buffer_size_--;
- }
-
- update_times_[(buffer_start_ + buffer_size_) % kMinFramesPerSecond] = now;
- buffer_size_++;
-
- return buffer_size_ == static_cast<size_t>(kMinFramesPerSecond) &&
- (now - update_times_[buffer_start_]).InSecondsF() <= 1.0;
- }
-
- private:
- // Circular buffer containing update times of the last (up to
- // |kMinFramesPerSecond|) video-sized updates to this window.
- base::TimeTicks update_times_[kMinFramesPerSecond];
-
- // Index into |update_times_| of the oldest update.
- size_t buffer_start_;
-
- // Number of updates stored in |update_times_|.
- size_t buffer_size_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowInfo);
-};
-
-VideoDetector::VideoDetector()
- : observer_manager_(this),
- is_shutting_down_(false) {
- aura::Env::GetInstance()->AddObserver(this);
- Shell::GetInstance()->AddShellObserver(this);
-}
-
-VideoDetector::~VideoDetector() {
- Shell::GetInstance()->RemoveShellObserver(this);
- aura::Env::GetInstance()->RemoveObserver(this);
-}
-
-void VideoDetector::AddObserver(VideoDetectorObserver* observer) {
- observers_.AddObserver(observer);
-}
-
-void VideoDetector::RemoveObserver(VideoDetectorObserver* observer) {
- observers_.RemoveObserver(observer);
-}
-
-void VideoDetector::OnWindowInitialized(aura::Window* window) {
- observer_manager_.Add(window);
-}
-
-void VideoDetector::OnWindowPaintScheduled(aura::Window* window,
- const gfx::Rect& region) {
- if (is_shutting_down_)
- return;
- linked_ptr<WindowInfo>& info = window_infos_[window];
- if (!info.get())
- info.reset(new WindowInfo);
-
- base::TimeTicks now =
- !now_for_test_.is_null() ? now_for_test_ : base::TimeTicks::Now();
- if (info->RecordUpdateAndCheckForVideo(region, now))
- MaybeNotifyObservers(window, now);
-}
-
-void VideoDetector::OnWindowDestroyed(aura::Window* window) {
- window_infos_.erase(window);
- observer_manager_.Remove(window);
-}
-
-void VideoDetector::OnAppTerminating() {
- // Stop checking video activity once the shutdown
- // process starts. crbug.com/231696.
- is_shutting_down_ = true;
-}
-
-void VideoDetector::MaybeNotifyObservers(aura::Window* window,
- base::TimeTicks now) {
- if (!last_observer_notification_time_.is_null() &&
- (now - last_observer_notification_time_).InSecondsF() <
- kNotifyIntervalSec)
- return;
-
- if (!window->IsVisible())
- return;
-
- gfx::Rect root_bounds = window->GetRootWindow()->bounds();
- if (!window->GetBoundsInRootWindow().Intersects(root_bounds))
- return;
-
- aura::Window* toplevel_window = views::corewm::GetToplevelWindow(window);
- bool is_fullscreen = toplevel_window ?
- wm::GetWindowState(toplevel_window)->IsFullscreen() : false;
-
- FOR_EACH_OBSERVER(VideoDetectorObserver,
- observers_,
- OnVideoDetected(is_fullscreen));
- last_observer_notification_time_ = now;
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/video_detector.h b/chromium/ash/wm/video_detector.h
deleted file mode 100644
index 7a2b112a5a5..00000000000
--- a/chromium/ash/wm/video_detector.h
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_VIDEO_DETECTOR_H_
-#define ASH_WM_VIDEO_DETECTOR_H_
-
-#include <map>
-
-#include "ash/ash_export.h"
-#include "ash/shell_observer.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/linked_ptr.h"
-#include "base/observer_list.h"
-#include "base/scoped_observer.h"
-#include "base/time/time.h"
-#include "ui/aura/env_observer.h"
-#include "ui/aura/window_observer.h"
-
-namespace aura {
-class Window;
-}
-
-namespace gfx {
-class Rect;
-}
-
-namespace ash {
-
-class ASH_EXPORT VideoDetectorObserver {
- public:
- // Invoked periodically while a video is being played onscreen.
- virtual void OnVideoDetected(bool is_fullscreen) = 0;
-
- protected:
- virtual ~VideoDetectorObserver() {}
-};
-
-// Watches for updates to windows and tries to detect when a video is playing.
-// We err on the side of false positives and can be fooled by things like
-// continuous scrolling of a page.
-class ASH_EXPORT VideoDetector : public aura::EnvObserver,
- public aura::WindowObserver,
- public ShellObserver {
- public:
- // Minimum dimensions in pixels that a window update must have to be
- // considered a potential video frame.
- static const int kMinUpdateWidth;
- static const int kMinUpdateHeight;
-
- // Number of video-sized updates that we must see within a second in a window
- // before we assume that a video is playing.
- static const int kMinFramesPerSecond;
-
- // Minimum amount of time between notifications to observers that a video is
- // playing.
- static const double kNotifyIntervalSec;
-
- VideoDetector();
- virtual ~VideoDetector();
-
- void set_now_for_test(base::TimeTicks now) { now_for_test_ = now; }
-
- void AddObserver(VideoDetectorObserver* observer);
- void RemoveObserver(VideoDetectorObserver* observer);
-
- // EnvObserver overrides.
- virtual void OnWindowInitialized(aura::Window* window) OVERRIDE;
-
- // WindowObserver overrides.
- virtual void OnWindowPaintScheduled(aura::Window* window,
- const gfx::Rect& region) OVERRIDE;
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
-
- // ShellObserver overrides.
- virtual void OnAppTerminating() OVERRIDE;
-
- private:
- class WindowInfo;
- typedef std::map<aura::Window*, linked_ptr<WindowInfo> > WindowInfoMap;
-
- // Possibly notifies observers in response to detection of a video in
- // |window|. Notifications are rate-limited and don't get sent if the window
- // is invisible or offscreen.
- void MaybeNotifyObservers(aura::Window* window, base::TimeTicks now);
-
- // Maps from a window that we're tracking to information about it.
- WindowInfoMap window_infos_;
-
- ObserverList<VideoDetectorObserver> observers_;
-
- // Last time at which we notified observers that a video was playing.
- base::TimeTicks last_observer_notification_time_;
-
- // If set, used when the current time is needed. This can be set by tests to
- // simulate the passage of time.
- base::TimeTicks now_for_test_;
-
- ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_;
-
- bool is_shutting_down_;
-
- DISALLOW_COPY_AND_ASSIGN(VideoDetector);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_VIDEO_DETECTOR_H_
diff --git a/chromium/ash/wm/video_detector_unittest.cc b/chromium/ash/wm/video_detector_unittest.cc
deleted file mode 100644
index 01c79cf8797..00000000000
--- a/chromium/ash/wm/video_detector_unittest.cc
+++ /dev/null
@@ -1,295 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/video_detector.h"
-
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/window_util.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/time/time.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/client/window_types.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/rect.h"
-
-namespace ash {
-namespace test {
-
-// Implementation that just counts the number of times we've been told that a
-// video is playing.
-class TestVideoDetectorObserver : public VideoDetectorObserver {
- public:
- TestVideoDetectorObserver() : num_invocations_(0),
- num_fullscreens_(0),
- num_not_fullscreens_(0) {}
-
- int num_invocations() const { return num_invocations_; }
- int num_fullscreens() const { return num_fullscreens_; }
- int num_not_fullscreens() const { return num_not_fullscreens_; }
- void reset_stats() {
- num_invocations_ = 0;
- num_fullscreens_ = 0;
- num_not_fullscreens_ = 0;
- }
-
- // VideoDetectorObserver implementation.
- virtual void OnVideoDetected(bool is_fullscreen) OVERRIDE {
- num_invocations_++;
- if (is_fullscreen)
- num_fullscreens_++;
- else
- num_not_fullscreens_++;
- }
-
- private:
- // Number of times that OnVideoDetected() has been called.
- int num_invocations_;
- // Number of times that OnVideoDetected() has been called with is_fullscreen
- // == true.
- int num_fullscreens_;
- // Number of times that OnVideoDetected() has been called with is_fullscreen
- // == false.
- int num_not_fullscreens_;
-
- DISALLOW_COPY_AND_ASSIGN(TestVideoDetectorObserver);
-};
-
-class VideoDetectorTest : public AshTestBase {
- public:
- VideoDetectorTest() {}
- virtual ~VideoDetectorTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- observer_.reset(new TestVideoDetectorObserver);
- detector_ = Shell::GetInstance()->video_detector();
- detector_->AddObserver(observer_.get());
-
- now_ = base::TimeTicks::Now();
- detector_->set_now_for_test(now_);
- }
-
- virtual void TearDown() OVERRIDE {
- detector_->RemoveObserver(observer_.get());
- AshTestBase::TearDown();
- }
-
- protected:
- // Move |detector_|'s idea of the current time forward by |delta|.
- void AdvanceTime(base::TimeDelta delta) {
- now_ += delta;
- detector_->set_now_for_test(now_);
- }
-
- VideoDetector* detector_; // not owned
-
- scoped_ptr<TestVideoDetectorObserver> observer_;
-
- base::TimeTicks now_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VideoDetectorTest);
-};
-
-TEST_F(VideoDetectorTest, Basic) {
- gfx::Rect window_bounds(gfx::Point(), gfx::Size(1024, 768));
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShell(SK_ColorRED, 12345, window_bounds));
-
- // Send enough updates, but make them be too small to trigger detection.
- gfx::Rect update_region(
- gfx::Point(),
- gfx::Size(VideoDetector::kMinUpdateWidth - 1,
- VideoDetector::kMinUpdateHeight));
- for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i)
- detector_->OnWindowPaintScheduled(window.get(), update_region);
- EXPECT_EQ(0, observer_->num_invocations());
-
- // Send not-quite-enough adaquately-sized updates.
- observer_->reset_stats();
- AdvanceTime(base::TimeDelta::FromSeconds(2));
- update_region.set_size(
- gfx::Size(VideoDetector::kMinUpdateWidth,
- VideoDetector::kMinUpdateHeight));
- for (int i = 0; i < VideoDetector::kMinFramesPerSecond - 1; ++i)
- detector_->OnWindowPaintScheduled(window.get(), update_region);
- EXPECT_EQ(0, observer_->num_invocations());
-
- // We should get notified after the next update, but not in response to
- // additional updates.
- detector_->OnWindowPaintScheduled(window.get(), update_region);
- EXPECT_EQ(1, observer_->num_invocations());
- EXPECT_EQ(0, observer_->num_fullscreens());
- EXPECT_EQ(1, observer_->num_not_fullscreens());
- detector_->OnWindowPaintScheduled(window.get(), update_region);
- EXPECT_EQ(1, observer_->num_invocations());
- EXPECT_EQ(0, observer_->num_fullscreens());
- EXPECT_EQ(1, observer_->num_not_fullscreens());
-
- // Spread out the frames over a longer period of time, but send enough
- // over a one-second window that the observer should be notified.
- observer_->reset_stats();
- AdvanceTime(base::TimeDelta::FromSeconds(2));
- detector_->OnWindowPaintScheduled(window.get(), update_region);
- EXPECT_EQ(0, observer_->num_invocations());
-
- AdvanceTime(base::TimeDelta::FromMilliseconds(500));
- const int kNumFrames = VideoDetector::kMinFramesPerSecond + 1;
- base::TimeDelta kInterval =
- base::TimeDelta::FromMilliseconds(1000 / kNumFrames);
- for (int i = 0; i < kNumFrames; ++i) {
- AdvanceTime(kInterval);
- detector_->OnWindowPaintScheduled(window.get(), update_region);
- }
- EXPECT_EQ(1, observer_->num_invocations());
-
- // Keep going and check that the observer is notified again.
- for (int i = 0; i < kNumFrames; ++i) {
- AdvanceTime(kInterval);
- detector_->OnWindowPaintScheduled(window.get(), update_region);
- }
- EXPECT_EQ(2, observer_->num_invocations());
-
- // Send updates at a slower rate and check that the observer isn't notified.
- base::TimeDelta kSlowInterval = base::TimeDelta::FromMilliseconds(
- 1000 / (VideoDetector::kMinFramesPerSecond - 2));
- for (int i = 0; i < kNumFrames; ++i) {
- AdvanceTime(kSlowInterval);
- detector_->OnWindowPaintScheduled(window.get(), update_region);
- }
- EXPECT_EQ(2, observer_->num_invocations());
-}
-
-TEST_F(VideoDetectorTest, Shutdown) {
- gfx::Rect window_bounds(gfx::Point(), gfx::Size(1024, 768));
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShell(SK_ColorRED, 12345, window_bounds));
- gfx::Rect update_region(
- gfx::Point(),
- gfx::Size(VideoDetector::kMinUpdateWidth,
- VideoDetector::kMinUpdateHeight));
-
- // It should not detect video during the shutdown.
- Shell::GetInstance()->OnAppTerminating();
- for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i)
- detector_->OnWindowPaintScheduled(window.get(), update_region);
- EXPECT_EQ(0, observer_->num_invocations());
-}
-
-TEST_F(VideoDetectorTest, WindowNotVisible) {
- gfx::Rect window_bounds(gfx::Point(), gfx::Size(1024, 768));
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShell(SK_ColorRED, 12345, window_bounds));
-
- // Reparent the window to the root to make sure that visibility changes aren't
- // animated.
- Shell::GetPrimaryRootWindow()->AddChild(window.get());
-
- // We shouldn't report video that's played in a hidden window.
- window->Hide();
- gfx::Rect update_region(
- gfx::Point(),
- gfx::Size(VideoDetector::kMinUpdateWidth,
- VideoDetector::kMinUpdateHeight));
- for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i)
- detector_->OnWindowPaintScheduled(window.get(), update_region);
- EXPECT_EQ(0, observer_->num_invocations());
-
- // Make the window visible and send more updates.
- observer_->reset_stats();
- AdvanceTime(base::TimeDelta::FromSeconds(2));
- window->Show();
- for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i)
- detector_->OnWindowPaintScheduled(window.get(), update_region);
- EXPECT_EQ(1, observer_->num_invocations());
- EXPECT_EQ(0, observer_->num_fullscreens());
- EXPECT_EQ(1, observer_->num_not_fullscreens());
-
- // We also shouldn't report video in a window that's fully offscreen.
- observer_->reset_stats();
- AdvanceTime(base::TimeDelta::FromSeconds(2));
- gfx::Rect offscreen_bounds(
- gfx::Point(Shell::GetPrimaryRootWindow()->bounds().width(), 0),
- window_bounds.size());
- window->SetBounds(offscreen_bounds);
- ASSERT_EQ(offscreen_bounds, window->bounds());
- for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i)
- detector_->OnWindowPaintScheduled(window.get(), update_region);
- EXPECT_EQ(0, observer_->num_invocations());
-}
-
-TEST_F(VideoDetectorTest, MultipleWindows) {
- // Create two windows.
- gfx::Rect window_bounds(gfx::Point(), gfx::Size(1024, 768));
- scoped_ptr<aura::Window> window1(
- CreateTestWindowInShell(SK_ColorRED, 12345, window_bounds));
- scoped_ptr<aura::Window> window2(
- CreateTestWindowInShell(SK_ColorBLUE, 23456, window_bounds));
-
- // Even if there's video playing in both, the observer should only receive a
- // single notification.
- gfx::Rect update_region(
- gfx::Point(),
- gfx::Size(VideoDetector::kMinUpdateWidth,
- VideoDetector::kMinUpdateHeight));
- for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i)
- detector_->OnWindowPaintScheduled(window1.get(), update_region);
- for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i)
- detector_->OnWindowPaintScheduled(window2.get(), update_region);
- EXPECT_EQ(1, observer_->num_invocations());
- EXPECT_EQ(0, observer_->num_fullscreens());
- EXPECT_EQ(1, observer_->num_not_fullscreens());
-}
-
-// Test that the observer receives repeated notifications.
-TEST_F(VideoDetectorTest, RepeatedNotifications) {
- gfx::Rect window_bounds(gfx::Point(), gfx::Size(1024, 768));
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShell(SK_ColorRED, 12345, window_bounds));
-
- gfx::Rect update_region(
- gfx::Point(),
- gfx::Size(VideoDetector::kMinUpdateWidth,
- VideoDetector::kMinUpdateHeight));
- for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i)
- detector_->OnWindowPaintScheduled(window.get(), update_region);
- EXPECT_EQ(1, observer_->num_invocations());
- EXPECT_EQ(0, observer_->num_fullscreens());
- EXPECT_EQ(1, observer_->num_not_fullscreens());
- // Let enough time pass that a second notification should be sent.
- observer_->reset_stats();
- AdvanceTime(base::TimeDelta::FromSeconds(
- static_cast<int64>(VideoDetector::kNotifyIntervalSec + 1)));
- for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i)
- detector_->OnWindowPaintScheduled(window.get(), update_region);
- EXPECT_EQ(1, observer_->num_invocations());
- EXPECT_EQ(0, observer_->num_fullscreens());
- EXPECT_EQ(1, observer_->num_not_fullscreens());
-}
-
-// Test that the observer receives a true value when the window is fullscreen.
-TEST_F(VideoDetectorTest, FullscreenWindow) {
- gfx::Rect window_bounds(gfx::Point(), gfx::Size(1024, 768));
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShell(SK_ColorRED, 12345, window_bounds));
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- window->Focus();
- gfx::Rect update_region(
- gfx::Point(),
- gfx::Size(VideoDetector::kMinUpdateWidth,
- VideoDetector::kMinUpdateHeight));
- for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i)
- detector_->OnWindowPaintScheduled(window.get(), update_region);
- EXPECT_EQ(1, observer_->num_invocations());
- EXPECT_EQ(1, observer_->num_fullscreens());
- EXPECT_EQ(0, observer_->num_not_fullscreens());
-}
-
-} // namespace test
-} // namespace ash
diff --git a/chromium/ash/wm/window_animations.cc b/chromium/ash/wm/window_animations.cc
deleted file mode 100644
index 894e11b0186..00000000000
--- a/chromium/ash/wm/window_animations.cc
+++ /dev/null
@@ -1,551 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/window_animations.h"
-
-#include <math.h>
-
-#include <algorithm>
-#include <vector>
-
-#include "ash/launcher/launcher.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace_controller.h"
-#include "base/command_line.h"
-#include "base/compiler_specific.h"
-#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
-#include "base/stl_util.h"
-#include "base/time/time.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_observer.h"
-#include "ui/aura/window_property.h"
-#include "ui/compositor/compositor_observer.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animation_observer.h"
-#include "ui/compositor/layer_animation_sequence.h"
-#include "ui/compositor/layer_animator.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/gfx/interpolated_transform.h"
-#include "ui/gfx/screen.h"
-#include "ui/gfx/vector3d_f.h"
-#include "ui/views/corewm/window_util.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace {
-const int kLayerAnimationsForMinimizeDurationMS = 200;
-
-// Durations for the cross-fade animation, in milliseconds.
-const float kCrossFadeDurationMinMs = 200.f;
-const float kCrossFadeDurationMaxMs = 400.f;
-
-// Durations for the brightness/grayscale fade animation, in milliseconds.
-const int kBrightnessGrayscaleFadeDurationMs = 1000;
-
-// Brightness/grayscale values for hide/show window animations.
-const float kWindowAnimation_HideBrightnessGrayscale = 1.f;
-const float kWindowAnimation_ShowBrightnessGrayscale = 0.f;
-
-const float kWindowAnimation_HideOpacity = 0.f;
-const float kWindowAnimation_ShowOpacity = 1.f;
-// TODO(sky): if we end up sticking with 0, nuke the code doing the rotation.
-const float kWindowAnimation_MinimizeRotate = 0.f;
-
-// Scales for AshWindow above/below current workspace.
-const float kLayerScaleAboveSize = 1.1f;
-const float kLayerScaleBelowSize = .9f;
-
-int64 Round64(float f) {
- return static_cast<int64>(f + 0.5f);
-}
-
-} // namespace
-
-const int kCrossFadeDurationMS = 200;
-
-void AddLayerAnimationsForMinimize(aura::Window* window, bool show) {
- // Recalculate the transform at restore time since the launcher item may have
- // moved while the window was minimized.
- gfx::Rect bounds = window->bounds();
- gfx::Rect target_bounds = GetMinimizeAnimationTargetBoundsInScreen(window);
- target_bounds =
- ScreenAsh::ConvertRectFromScreen(window->parent(), target_bounds);
-
- float scale_x = static_cast<float>(target_bounds.width()) / bounds.width();
- float scale_y = static_cast<float>(target_bounds.height()) / bounds.height();
-
- scoped_ptr<ui::InterpolatedTransform> scale(
- new ui::InterpolatedScale(gfx::Point3F(1, 1, 1),
- gfx::Point3F(scale_x, scale_y, 1)));
-
- scoped_ptr<ui::InterpolatedTransform> translation(
- new ui::InterpolatedTranslation(
- gfx::Point(),
- gfx::Point(target_bounds.x() - bounds.x(),
- target_bounds.y() - bounds.y())));
-
- scoped_ptr<ui::InterpolatedTransform> rotation(
- new ui::InterpolatedRotation(0, kWindowAnimation_MinimizeRotate));
-
- scoped_ptr<ui::InterpolatedTransform> rotation_about_pivot(
- new ui::InterpolatedTransformAboutPivot(
- gfx::Point(bounds.width() * 0.5, bounds.height() * 0.5),
- rotation.release()));
-
- scale->SetChild(translation.release());
- rotation_about_pivot->SetChild(scale.release());
-
- rotation_about_pivot->SetReversed(show);
-
- base::TimeDelta duration = window->layer()->GetAnimator()->
- GetTransitionDuration();
-
- scoped_ptr<ui::LayerAnimationElement> transition(
- ui::LayerAnimationElement::CreateInterpolatedTransformElement(
- rotation_about_pivot.release(), duration));
-
- transition->set_tween_type(
- show ? gfx::Tween::EASE_IN : gfx::Tween::EASE_IN_OUT);
-
- window->layer()->GetAnimator()->ScheduleAnimation(
- new ui::LayerAnimationSequence(transition.release()));
-
- // When hiding a window, turn off blending until the animation is 3 / 4 done
- // to save bandwidth and reduce jank.
- if (!show) {
- window->layer()->GetAnimator()->SchedulePauseForProperties(
- (duration * 3) / 4, ui::LayerAnimationElement::OPACITY, -1);
- }
-
- // Fade in and out quickly when the window is small to reduce jank.
- float opacity = show ? 1.0f : 0.0f;
- window->layer()->GetAnimator()->ScheduleAnimation(
- new ui::LayerAnimationSequence(
- ui::LayerAnimationElement::CreateOpacityElement(
- opacity, duration / 4)));
-}
-
-void AnimateShowWindow_Minimize(aura::Window* window) {
- window->layer()->set_delegate(window);
- window->layer()->SetOpacity(kWindowAnimation_HideOpacity);
- ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator());
- base::TimeDelta duration = base::TimeDelta::FromMilliseconds(
- kLayerAnimationsForMinimizeDurationMS);
- settings.SetTransitionDuration(duration);
- AddLayerAnimationsForMinimize(window, true);
-
- // Now that the window has been restored, we need to clear its animation style
- // to default so that normal animation applies.
- views::corewm::SetWindowVisibilityAnimationType(
- window, views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_DEFAULT);
-}
-
-void AnimateHideWindow_Minimize(aura::Window* window) {
- window->layer()->set_delegate(NULL);
-
- // Property sets within this scope will be implicitly animated.
- ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator());
- base::TimeDelta duration = base::TimeDelta::FromMilliseconds(
- kLayerAnimationsForMinimizeDurationMS);
- settings.SetTransitionDuration(duration);
- settings.AddObserver(
- views::corewm::CreateHidingWindowAnimationObserver(window));
- window->layer()->SetVisible(false);
-
- AddLayerAnimationsForMinimize(window, false);
-}
-
-void AnimateShowHideWindowCommon_BrightnessGrayscale(aura::Window* window,
- bool show) {
- window->layer()->set_delegate(window);
-
- float start_value, end_value;
- if (show) {
- start_value = kWindowAnimation_HideBrightnessGrayscale;
- end_value = kWindowAnimation_ShowBrightnessGrayscale;
- } else {
- start_value = kWindowAnimation_ShowBrightnessGrayscale;
- end_value = kWindowAnimation_HideBrightnessGrayscale;
- }
-
- window->layer()->SetLayerBrightness(start_value);
- window->layer()->SetLayerGrayscale(start_value);
- if (show) {
- window->layer()->SetOpacity(kWindowAnimation_ShowOpacity);
- window->layer()->SetVisible(true);
- }
-
- base::TimeDelta duration =
- base::TimeDelta::FromMilliseconds(kBrightnessGrayscaleFadeDurationMs);
-
- ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator());
- settings.SetTransitionDuration(duration);
- if (!show) {
- settings.AddObserver(
- views::corewm::CreateHidingWindowAnimationObserver(window));
- }
-
- window->layer()->GetAnimator()->
- ScheduleTogether(
- CreateBrightnessGrayscaleAnimationSequence(end_value, duration));
- if (!show) {
- window->layer()->SetOpacity(kWindowAnimation_HideOpacity);
- window->layer()->SetVisible(false);
- }
-}
-
-void AnimateShowWindow_BrightnessGrayscale(aura::Window* window) {
- AnimateShowHideWindowCommon_BrightnessGrayscale(window, true);
-}
-
-void AnimateHideWindow_BrightnessGrayscale(aura::Window* window) {
- AnimateShowHideWindowCommon_BrightnessGrayscale(window, false);
-}
-
-bool AnimateShowWindow(aura::Window* window) {
- if (!views::corewm::HasWindowVisibilityAnimationTransition(
- window, views::corewm::ANIMATE_SHOW)) {
- return false;
- }
-
- switch (views::corewm::GetWindowVisibilityAnimationType(window)) {
- case WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE:
- AnimateShowWindow_Minimize(window);
- return true;
- case WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE:
- AnimateShowWindow_BrightnessGrayscale(window);
- return true;
- default:
- NOTREACHED();
- return false;
- }
-}
-
-bool AnimateHideWindow(aura::Window* window) {
- if (!views::corewm::HasWindowVisibilityAnimationTransition(
- window, views::corewm::ANIMATE_HIDE)) {
- return false;
- }
-
- switch (views::corewm::GetWindowVisibilityAnimationType(window)) {
- case WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE:
- AnimateHideWindow_Minimize(window);
- return true;
- case WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE:
- AnimateHideWindow_BrightnessGrayscale(window);
- return true;
- default:
- NOTREACHED();
- return false;
- }
-}
-
-// Observer for a window cross-fade animation. If either the window closes or
-// the layer's animation completes or compositing is aborted due to GPU crash,
-// it deletes the layer and removes itself as an observer.
-class CrossFadeObserver : public ui::CompositorObserver,
- public aura::WindowObserver,
- public ui::ImplicitAnimationObserver {
- public:
- // Observes |window| for destruction, but does not take ownership.
- // Takes ownership of |layer| and its child layers.
- CrossFadeObserver(aura::Window* window, ui::Layer* layer)
- : window_(window),
- layer_(layer) {
- window_->AddObserver(this);
- layer_->GetCompositor()->AddObserver(this);
- }
- virtual ~CrossFadeObserver() {
- window_->RemoveObserver(this);
- window_ = NULL;
- layer_->GetCompositor()->RemoveObserver(this);
- views::corewm::DeepDeleteLayers(layer_);
- layer_ = NULL;
- }
-
- // ui::CompositorObserver overrides:
- virtual void OnCompositingDidCommit(ui::Compositor* compositor) OVERRIDE {
- }
- virtual void OnCompositingStarted(ui::Compositor* compositor,
- base::TimeTicks start_time) OVERRIDE {
- }
- virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE {
- }
- virtual void OnCompositingAborted(ui::Compositor* compositor) OVERRIDE {
- // Triggers OnImplicitAnimationsCompleted() to be called and deletes us.
- layer_->GetAnimator()->StopAnimating();
- }
- virtual void OnCompositingLockStateChanged(
- ui::Compositor* compositor) OVERRIDE {
- }
- virtual void OnUpdateVSyncParameters(ui::Compositor* compositor,
- base::TimeTicks timebase,
- base::TimeDelta interval) OVERRIDE {
- }
-
- // aura::WindowObserver overrides:
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE {
- // Triggers OnImplicitAnimationsCompleted() to be called and deletes us.
- layer_->GetAnimator()->StopAnimating();
- }
- virtual void OnWindowRemovingFromRootWindow(aura::Window* window) OVERRIDE {
- layer_->GetAnimator()->StopAnimating();
- }
-
- // ui::ImplicitAnimationObserver overrides:
- virtual void OnImplicitAnimationsCompleted() OVERRIDE {
- delete this;
- }
-
- private:
- aura::Window* window_; // not owned
- ui::Layer* layer_; // owned
-
- DISALLOW_COPY_AND_ASSIGN(CrossFadeObserver);
-};
-
-// Implementation of cross fading. Window is the window being cross faded. It
-// should be at the target bounds. |old_layer| the previous layer from |window|.
-// This takes ownership of |old_layer| and deletes when the animation is done.
-// |pause_duration| is the duration to pause at the current bounds before
-// animating. Returns the duration of the fade.
-base::TimeDelta CrossFadeImpl(aura::Window* window,
- ui::Layer* old_layer,
- gfx::Tween::Type tween_type) {
- const gfx::Rect old_bounds(old_layer->bounds());
- const gfx::Rect new_bounds(window->bounds());
- const bool old_on_top = (old_bounds.width() > new_bounds.width());
-
- // Shorten the animation if there's not much visual movement.
- const base::TimeDelta duration = GetCrossFadeDuration(window,
- old_bounds, new_bounds);
-
- // Scale up the old layer while translating to new position.
- {
- old_layer->GetAnimator()->StopAnimating();
- ui::ScopedLayerAnimationSettings settings(old_layer->GetAnimator());
-
- // Animation observer owns the old layer and deletes itself.
- settings.AddObserver(new CrossFadeObserver(window, old_layer));
- settings.SetTransitionDuration(duration);
- settings.SetTweenType(tween_type);
- gfx::Transform out_transform;
- float scale_x = static_cast<float>(new_bounds.width()) /
- static_cast<float>(old_bounds.width());
- float scale_y = static_cast<float>(new_bounds.height()) /
- static_cast<float>(old_bounds.height());
- out_transform.Translate(new_bounds.x() - old_bounds.x(),
- new_bounds.y() - old_bounds.y());
- out_transform.Scale(scale_x, scale_y);
- old_layer->SetTransform(out_transform);
- if (old_on_top) {
- // The old layer is on top, and should fade out. The new layer below will
- // stay opaque to block the desktop.
- old_layer->SetOpacity(kWindowAnimation_HideOpacity);
- }
- // In tests |old_layer| is deleted here, as animations have zero duration.
- old_layer = NULL;
- }
-
- // Set the new layer's current transform, such that the user sees a scaled
- // version of the window with the original bounds at the original position.
- gfx::Transform in_transform;
- const float scale_x = static_cast<float>(old_bounds.width()) /
- static_cast<float>(new_bounds.width());
- const float scale_y = static_cast<float>(old_bounds.height()) /
- static_cast<float>(new_bounds.height());
- in_transform.Translate(old_bounds.x() - new_bounds.x(),
- old_bounds.y() - new_bounds.y());
- in_transform.Scale(scale_x, scale_y);
- window->layer()->SetTransform(in_transform);
- if (!old_on_top) {
- // The new layer is on top and should fade in. The old layer below will
- // stay opaque and block the desktop.
- window->layer()->SetOpacity(kWindowAnimation_HideOpacity);
- }
- {
- // Animate the new layer to the identity transform, so the window goes to
- // its newly set bounds.
- ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator());
- settings.SetTransitionDuration(duration);
- settings.SetTweenType(tween_type);
- window->layer()->SetTransform(gfx::Transform());
- if (!old_on_top) {
- // New layer is on top, fade it in.
- window->layer()->SetOpacity(kWindowAnimation_ShowOpacity);
- }
- }
- return duration;
-}
-
-void CrossFadeToBounds(aura::Window* window, const gfx::Rect& new_bounds) {
- // Some test results in invoking CrossFadeToBounds when window is not visible.
- // No animation is necessary in that case, thus just change the bounds and
- // quit.
- if (!window->TargetVisibility()) {
- window->SetBounds(new_bounds);
- return;
- }
-
- const gfx::Rect old_bounds = window->bounds();
-
- // Create fresh layers for the window and all its children to paint into.
- // Takes ownership of the old layer and all its children, which will be
- // cleaned up after the animation completes.
- // Specify |set_bounds| to true here to keep the old bounds in the child
- // windows of |window|.
- ui::Layer* old_layer = views::corewm::RecreateWindowLayers(window, true);
- ui::Layer* new_layer = window->layer();
-
- // Resize the window to the new size, which will force a layout and paint.
- window->SetBounds(new_bounds);
-
- // Ensure the higher-resolution layer is on top.
- bool old_on_top = (old_bounds.width() > new_bounds.width());
- if (old_on_top)
- old_layer->parent()->StackBelow(new_layer, old_layer);
- else
- old_layer->parent()->StackAbove(new_layer, old_layer);
-
- CrossFadeImpl(window, old_layer, gfx::Tween::EASE_OUT);
-}
-
-base::TimeDelta GetCrossFadeDuration(aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) {
- if (views::corewm::WindowAnimationsDisabled(window))
- return base::TimeDelta();
-
- int old_area = old_bounds.width() * old_bounds.height();
- int new_area = new_bounds.width() * new_bounds.height();
- int max_area = std::max(old_area, new_area);
- // Avoid divide by zero.
- if (max_area == 0)
- return base::TimeDelta::FromMilliseconds(kCrossFadeDurationMS);
-
- int delta_area = std::abs(old_area - new_area);
- // If the area didn't change, the animation is instantaneous.
- if (delta_area == 0)
- return base::TimeDelta::FromMilliseconds(kCrossFadeDurationMS);
-
- float factor =
- static_cast<float>(delta_area) / static_cast<float>(max_area);
- const float kRange = kCrossFadeDurationMaxMs - kCrossFadeDurationMinMs;
- return base::TimeDelta::FromMilliseconds(
- Round64(kCrossFadeDurationMinMs + (factor * kRange)));
-}
-
-bool AnimateOnChildWindowVisibilityChanged(aura::Window* window, bool visible) {
- if (views::corewm::WindowAnimationsDisabled(window))
- return false;
-
- // Attempt to run CoreWm supplied animation types.
- if (views::corewm::AnimateOnChildWindowVisibilityChanged(window, visible))
- return true;
-
- // Otherwise try to run an Ash-specific animation.
- if (visible)
- return AnimateShowWindow(window);
- // Don't start hiding the window again if it's already being hidden.
- return window->layer()->GetTargetOpacity() != 0.0f &&
- AnimateHideWindow(window);
-}
-
-std::vector<ui::LayerAnimationSequence*>
-CreateBrightnessGrayscaleAnimationSequence(float target_value,
- base::TimeDelta duration) {
- gfx::Tween::Type animation_type = gfx::Tween::EASE_OUT;
- scoped_ptr<ui::LayerAnimationSequence> brightness_sequence(
- new ui::LayerAnimationSequence());
- scoped_ptr<ui::LayerAnimationSequence> grayscale_sequence(
- new ui::LayerAnimationSequence());
-
- scoped_ptr<ui::LayerAnimationElement> brightness_element(
- ui::LayerAnimationElement::CreateBrightnessElement(
- target_value, duration));
- brightness_element->set_tween_type(animation_type);
- brightness_sequence->AddElement(brightness_element.release());
-
- scoped_ptr<ui::LayerAnimationElement> grayscale_element(
- ui::LayerAnimationElement::CreateGrayscaleElement(
- target_value, duration));
- grayscale_element->set_tween_type(animation_type);
- grayscale_sequence->AddElement(grayscale_element.release());
-
- std::vector<ui::LayerAnimationSequence*> animations;
- animations.push_back(brightness_sequence.release());
- animations.push_back(grayscale_sequence.release());
-
- return animations;
-}
-
-// Returns scale related to the specified AshWindowScaleType.
-void SetTransformForScaleAnimation(ui::Layer* layer,
- LayerScaleAnimationDirection type) {
- const float scale =
- type == LAYER_SCALE_ANIMATION_ABOVE ? kLayerScaleAboveSize :
- kLayerScaleBelowSize;
- gfx::Transform transform;
- transform.Translate(-layer->bounds().width() * (scale - 1.0f) / 2,
- -layer->bounds().height() * (scale - 1.0f) / 2);
- transform.Scale(scale, scale);
- layer->SetTransform(transform);
-}
-
-gfx::Rect GetMinimizeAnimationTargetBoundsInScreen(aura::Window* window) {
- Launcher* launcher = Launcher::ForWindow(window);
- // Shelf is created lazily and can be NULL.
- if (!launcher)
- return gfx::Rect();
- gfx::Rect item_rect = launcher->GetScreenBoundsOfItemIconForWindow(window);
-
- // The launcher item is visible and has an icon.
- if (!item_rect.IsEmpty())
- return item_rect;
-
- // If both the icon width and height are 0, then there is no icon in the
- // launcher for |window| or the icon is hidden in the overflow menu. If the
- // launcher is auto hidden, one of the height or width will be 0 but the
- // position in the launcher and the major dimension are still reported
- // correctly and the window can be animated to the launcher item's light
- // bar.
- if (item_rect.width() != 0 || item_rect.height() != 0) {
- internal::ShelfLayoutManager* layout_manager =
- internal::ShelfLayoutManager::ForLauncher(window);
- if (layout_manager->visibility_state() == SHELF_AUTO_HIDE) {
- gfx::Rect shelf_bounds =
- launcher->shelf_widget()->GetWindowBoundsInScreen();
- switch (layout_manager->GetAlignment()) {
- case SHELF_ALIGNMENT_BOTTOM:
- item_rect.set_y(shelf_bounds.y());
- break;
- case SHELF_ALIGNMENT_LEFT:
- item_rect.set_x(shelf_bounds.right());
- break;
- case SHELF_ALIGNMENT_RIGHT:
- item_rect.set_x(shelf_bounds.x());
- break;
- case SHELF_ALIGNMENT_TOP:
- item_rect.set_y(shelf_bounds.bottom());
- break;
- }
- return item_rect;
- }
- }
-
- // Assume the launcher is overflowed, zoom off to the bottom right of the
- // work area.
- gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(window).work_area();
- return gfx::Rect(work_area.right(), work_area.bottom(), 0, 0);
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/window_animations.h b/chromium/ash/wm/window_animations.h
deleted file mode 100644
index f084bcc838f..00000000000
--- a/chromium/ash/wm/window_animations.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WINDOW_ANIMATIONS_H_
-#define ASH_WM_WINDOW_ANIMATIONS_H_
-
-#include "ash/ash_export.h"
-#include "ui/gfx/transform.h"
-#include "ui/views/corewm/window_animations.h"
-
-namespace aura {
-class Window;
-}
-namespace ui {
-class Layer;
-}
-
-// This is only for animations specific to Ash. For window animations shared
-// with desktop Chrome, see ui/views/corewm/window_animations.h.
-namespace ash {
-
-// An extension of the window animations provided by CoreWm. These should be
-// Ash-specific only.
-enum WindowVisibilityAnimationType {
- // Window scale/rotates down to its launcher icon.
- WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE =
- views::corewm::WINDOW_VISIBILITY_ANIMATION_MAX,
- // Fade in/out using brightness and grayscale web filters.
- WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE
-};
-
-// Direction for ash-specific window animations used in workspaces and
-// lock/unlock animations.
-enum LayerScaleAnimationDirection {
- LAYER_SCALE_ANIMATION_ABOVE,
- LAYER_SCALE_ANIMATION_BELOW,
-};
-
-// Amount of time for the cross fade animation.
-extern const int kCrossFadeDurationMS;
-
-// Animate a cross-fade of |window| from its current bounds to |new_bounds|.
-ASH_EXPORT void CrossFadeToBounds(aura::Window* window,
- const gfx::Rect& new_bounds);
-
-// Returns the duration of the cross-fade animation based on the |old_bounds|
-// and |new_bounds| of the |window|.
-ASH_EXPORT base::TimeDelta GetCrossFadeDuration(aura::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds);
-
-ASH_EXPORT bool AnimateOnChildWindowVisibilityChanged(aura::Window* window,
- bool visible);
-
-// Creates vector of animation sequences that lasts for |duration| and changes
-// brightness and grayscale to |target_value|. Caller takes ownership of
-// returned LayerAnimationSequence objects.
-ASH_EXPORT std::vector<ui::LayerAnimationSequence*>
-CreateBrightnessGrayscaleAnimationSequence(float target_value,
- base::TimeDelta duration);
-
-// Applies scale related to the specified AshWindowScaleType.
-ASH_EXPORT void SetTransformForScaleAnimation(
- ui::Layer* layer,
- LayerScaleAnimationDirection type);
-
-// Returns the approximate bounds to which |window| will be animated when it
-// is minimized. The bounds are approximate because the minimize animation
-// involves rotation.
-ASH_EXPORT gfx::Rect GetMinimizeAnimationTargetBoundsInScreen(
- aura::Window* window);
-
-} // namespace ash
-
-#endif // ASH_WM_WINDOW_ANIMATIONS_H_
diff --git a/chromium/ash/wm/window_animations_unittest.cc b/chromium/ash/wm/window_animations_unittest.cc
deleted file mode 100644
index eeeb120b094..00000000000
--- a/chromium/ash/wm/window_animations_unittest.cc
+++ /dev/null
@@ -1,243 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/window_animations.h"
-
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/workspace_controller.h"
-#include "base/time/time.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animation_observer.h"
-#include "ui/compositor/layer_animator.h"
-#include "ui/compositor/scoped_animation_duration_scale_mode.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/gfx/animation/animation_container_element.h"
-
-using aura::Window;
-using ui::Layer;
-
-namespace ash {
-namespace internal {
-
-class WindowAnimationsTest : public ash::test::AshTestBase {
- public:
- WindowAnimationsTest() {}
-
- virtual void TearDown() OVERRIDE {
- AshTestBase::TearDown();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WindowAnimationsTest);
-};
-
-// Listens to animation scheduled notifications. Remembers the transition
-// duration of the first sequence.
-class MinimizeAnimationObserver : public ui::LayerAnimationObserver {
- public:
- explicit MinimizeAnimationObserver(ui::LayerAnimator* animator)
- : animator_(animator) {
- animator_->AddObserver(this);
- // RemoveObserver is called when the first animation is scheduled and so
- // there should be no need for now to remove it in destructor.
- };
- base::TimeDelta duration() { return duration_; }
-
- protected:
- // ui::LayerAnimationObserver:
- virtual void OnLayerAnimationScheduled(
- ui::LayerAnimationSequence* sequence) OVERRIDE {
- duration_ = animator_->GetTransitionDuration();
- animator_->RemoveObserver(this);
- }
- virtual void OnLayerAnimationEnded(
- ui::LayerAnimationSequence* sequence) OVERRIDE {}
- virtual void OnLayerAnimationAborted(
- ui::LayerAnimationSequence* sequence) OVERRIDE {}
-
- private:
- ui::LayerAnimator* animator_;
- base::TimeDelta duration_;
-
- DISALLOW_COPY_AND_ASSIGN(MinimizeAnimationObserver);
-};
-
-TEST_F(WindowAnimationsTest, HideShowBrightnessGrayscaleAnimation) {
- scoped_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
- window->Show();
- EXPECT_TRUE(window->layer()->visible());
-
- // Hiding.
- views::corewm::SetWindowVisibilityAnimationType(
- window.get(),
- WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE);
- AnimateOnChildWindowVisibilityChanged(window.get(), false);
- EXPECT_EQ(0.0f, window->layer()->GetTargetOpacity());
- EXPECT_FALSE(window->layer()->GetTargetVisibility());
- EXPECT_FALSE(window->layer()->visible());
-
- // Showing.
- views::corewm::SetWindowVisibilityAnimationType(
- window.get(),
- WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE);
- AnimateOnChildWindowVisibilityChanged(window.get(), true);
- EXPECT_EQ(0.0f, window->layer()->GetTargetBrightness());
- EXPECT_EQ(0.0f, window->layer()->GetTargetGrayscale());
- EXPECT_TRUE(window->layer()->visible());
-
- // Stays shown.
- gfx::AnimationContainerElement* element =
- static_cast<gfx::AnimationContainerElement*>(
- window->layer()->GetAnimator());
- element->Step(base::TimeTicks::Now() +
- base::TimeDelta::FromSeconds(5));
- EXPECT_EQ(0.0f, window->layer()->GetTargetBrightness());
- EXPECT_EQ(0.0f, window->layer()->GetTargetGrayscale());
- EXPECT_TRUE(window->layer()->visible());
-}
-
-TEST_F(WindowAnimationsTest, LayerTargetVisibility) {
- scoped_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
-
- // Layer target visibility changes according to Show/Hide.
- window->Show();
- EXPECT_TRUE(window->layer()->GetTargetVisibility());
- window->Hide();
- EXPECT_FALSE(window->layer()->GetTargetVisibility());
- window->Show();
- EXPECT_TRUE(window->layer()->GetTargetVisibility());
-}
-
-TEST_F(WindowAnimationsTest, CrossFadeToBounds) {
- ui::ScopedAnimationDurationScaleMode normal_duration_mode(
- ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
-
- scoped_ptr<Window> window(CreateTestWindowInShellWithId(0));
- window->SetBounds(gfx::Rect(5, 10, 320, 240));
- window->Show();
-
- Layer* old_layer = window->layer();
- EXPECT_EQ(1.0f, old_layer->GetTargetOpacity());
-
- // Cross fade to a larger size, as in a maximize animation.
- CrossFadeToBounds(window.get(), gfx::Rect(0, 0, 640, 480));
- // Window's layer has been replaced.
- EXPECT_NE(old_layer, window->layer());
- // Original layer stays opaque and stretches to new size.
- EXPECT_EQ(1.0f, old_layer->GetTargetOpacity());
- EXPECT_EQ("5,10 320x240", old_layer->bounds().ToString());
- gfx::Transform grow_transform;
- grow_transform.Translate(-5.f, -10.f);
- grow_transform.Scale(640.f / 320.f, 480.f / 240.f);
- EXPECT_EQ(grow_transform, old_layer->GetTargetTransform());
- // New layer animates in to the identity transform.
- EXPECT_EQ(1.0f, window->layer()->GetTargetOpacity());
- EXPECT_EQ(gfx::Transform(), window->layer()->GetTargetTransform());
-
- // Run the animations to completion.
- static_cast<gfx::AnimationContainerElement*>(old_layer->GetAnimator())->Step(
- base::TimeTicks::Now() + base::TimeDelta::FromSeconds(1));
- static_cast<gfx::AnimationContainerElement*>(window->layer()->GetAnimator())->
- Step(base::TimeTicks::Now() + base::TimeDelta::FromSeconds(1));
-
- // Cross fade to a smaller size, as in a restore animation.
- old_layer = window->layer();
- CrossFadeToBounds(window.get(), gfx::Rect(5, 10, 320, 240));
- // Again, window layer has been replaced.
- EXPECT_NE(old_layer, window->layer());
- // Original layer fades out and stretches down to new size.
- EXPECT_EQ(0.0f, old_layer->GetTargetOpacity());
- EXPECT_EQ("0,0 640x480", old_layer->bounds().ToString());
- gfx::Transform shrink_transform;
- shrink_transform.Translate(5.f, 10.f);
- shrink_transform.Scale(320.f / 640.f, 240.f / 480.f);
- EXPECT_EQ(shrink_transform, old_layer->GetTargetTransform());
- // New layer animates in to the identity transform.
- EXPECT_EQ(1.0f, window->layer()->GetTargetOpacity());
- EXPECT_EQ(gfx::Transform(), window->layer()->GetTargetTransform());
-
- static_cast<gfx::AnimationContainerElement*>(old_layer->GetAnimator())->Step(
- base::TimeTicks::Now() + base::TimeDelta::FromSeconds(1));
- static_cast<gfx::AnimationContainerElement*>(window->layer()->GetAnimator())->
- Step(base::TimeTicks::Now() + base::TimeDelta::FromSeconds(1));
-}
-
-TEST_F(WindowAnimationsTest, LockAnimationDuration) {
- ui::ScopedAnimationDurationScaleMode normal_duration_mode(
- ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
-
- scoped_ptr<Window> window(CreateTestWindowInShellWithId(0));
- Layer* layer = window->layer();
- window->SetBounds(gfx::Rect(5, 10, 320, 240));
- window->Show();
-
- // Test that it is possible to override transition duration when it is not
- // locked.
- {
- ui::ScopedLayerAnimationSettings settings1(layer->GetAnimator());
- settings1.SetTransitionDuration(base::TimeDelta::FromMilliseconds(1000));
- {
- ui::ScopedLayerAnimationSettings settings2(layer->GetAnimator());
- // Duration is not locked so it gets overridden.
- settings2.SetTransitionDuration(base::TimeDelta::FromMilliseconds(50));
- wm::GetWindowState(window.get())->Minimize();
- EXPECT_TRUE(layer->GetAnimator()->is_animating());
- // Expect duration from the inner scope
- EXPECT_EQ(50,
- layer->GetAnimator()->GetTransitionDuration().InMilliseconds());
- }
- window->Show();
- layer->GetAnimator()->StopAnimating();
- }
-
- // Test that it is possible to lock transition duration
- {
- ui::ScopedLayerAnimationSettings settings1(layer->GetAnimator());
- settings1.SetTransitionDuration(base::TimeDelta::FromMilliseconds(1000));
- // Duration is locked in outer scope.
- settings1.LockTransitionDuration();
- {
- ui::ScopedLayerAnimationSettings settings2(layer->GetAnimator());
- // Transition duration setting is ignored.
- settings2.SetTransitionDuration(base::TimeDelta::FromMilliseconds(50));
- wm::GetWindowState(window.get())->Minimize();
- EXPECT_TRUE(layer->GetAnimator()->is_animating());
- // Expect duration from the outer scope
- EXPECT_EQ(1000,
- layer->GetAnimator()->GetTransitionDuration().InMilliseconds());
- }
- window->Show();
- layer->GetAnimator()->StopAnimating();
- }
-
- // Test that duration respects default.
- {
- // Query default duration.
- MinimizeAnimationObserver observer(layer->GetAnimator());
- wm::GetWindowState(window.get())->Minimize();
- EXPECT_TRUE(layer->GetAnimator()->is_animating());
- base::TimeDelta default_duration(observer.duration());
- window->Show();
- layer->GetAnimator()->StopAnimating();
-
- ui::ScopedLayerAnimationSettings settings(layer->GetAnimator());
- settings.LockTransitionDuration();
- // Setting transition duration is ignored since duration is locked
- settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds(1000));
- wm::GetWindowState(window.get())->Minimize();
- EXPECT_TRUE(layer->GetAnimator()->is_animating());
- // Expect default duration (200ms for stock ash minimizing animation).
- EXPECT_EQ(default_duration.InMilliseconds(),
- layer->GetAnimator()->GetTransitionDuration().InMilliseconds());
- window->Show();
- layer->GetAnimator()->StopAnimating();
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/window_cycle_controller.cc b/chromium/ash/wm/window_cycle_controller.cc
deleted file mode 100644
index 703080ff37b..00000000000
--- a/chromium/ash/wm/window_cycle_controller.cc
+++ /dev/null
@@ -1,139 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/window_cycle_controller.h"
-
-#include <algorithm>
-
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/mru_window_tracker.h"
-#include "ash/wm/window_cycle_list.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace_controller.h"
-#include "ui/aura/root_window.h"
-#include "ui/events/event.h"
-#include "ui/events/event_handler.h"
-
-namespace ash {
-
-namespace {
-
-// Filter to watch for the termination of a keyboard gesture to cycle through
-// multiple windows.
-class WindowCycleEventFilter : public ui::EventHandler {
- public:
- WindowCycleEventFilter();
- virtual ~WindowCycleEventFilter();
-
- // Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
- private:
- DISALLOW_COPY_AND_ASSIGN(WindowCycleEventFilter);
-};
-
-// Watch for all keyboard events by filtering the root window.
-WindowCycleEventFilter::WindowCycleEventFilter() {
-}
-
-WindowCycleEventFilter::~WindowCycleEventFilter() {
-}
-
-void WindowCycleEventFilter::OnKeyEvent(ui::KeyEvent* event) {
- // Views uses VKEY_MENU for both left and right Alt keys.
- if (event->key_code() == ui::VKEY_MENU &&
- event->type() == ui::ET_KEY_RELEASED) {
- Shell::GetInstance()->window_cycle_controller()->AltKeyReleased();
- // Warning: |this| will be deleted from here on.
- }
-}
-
-} // namespace
-
-//////////////////////////////////////////////////////////////////////////////
-// WindowCycleController, public:
-
-WindowCycleController::WindowCycleController() {
-}
-
-WindowCycleController::~WindowCycleController() {
- StopCycling();
-}
-
-// static
-bool WindowCycleController::CanCycle() {
- // Don't allow window cycling if the screen is locked or a modal dialog is
- // open.
- return !Shell::GetInstance()->session_state_delegate()->IsScreenLocked() &&
- !Shell::GetInstance()->IsSystemModalWindowOpen();
-}
-
-void WindowCycleController::HandleCycleWindow(Direction direction,
- bool is_alt_down) {
- if (!CanCycle())
- return;
-
- if (is_alt_down) {
- if (!IsCycling()) {
- // This is the start of an alt-tab cycle through multiple windows, so
- // listen for the alt key being released to stop cycling.
- StartCycling();
- Step(direction);
- InstallEventFilter();
- } else {
- // We're in the middle of an alt-tab cycle, just step forward.
- Step(direction);
- }
- } else {
- // This is a simple, single-step window cycle.
- StartCycling();
- Step(direction);
- StopCycling();
- }
-}
-
-void WindowCycleController::HandleLinearCycleWindow() {
- if (!CanCycle() || IsCycling())
- return;
-
- // Use the reversed list of windows to prevent a 2-cycle of the most recent
- // windows occurring.
- WindowCycleList cycle_list(MruWindowTracker::BuildWindowList(true));
- cycle_list.Step(WindowCycleList::FORWARD);
-}
-
-void WindowCycleController::AltKeyReleased() {
- StopCycling();
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// WindowCycleController, private:
-
-void WindowCycleController::StartCycling() {
- windows_.reset(new WindowCycleList(ash::Shell::GetInstance()->
- mru_window_tracker()->BuildMruWindowList()));
-}
-
-void WindowCycleController::Step(Direction direction) {
- DCHECK(windows_.get());
- windows_->Step(direction == FORWARD ? WindowCycleList::FORWARD :
- WindowCycleList::BACKWARD);
-}
-
-void WindowCycleController::StopCycling() {
- windows_.reset();
- // Remove our key event filter.
- if (event_handler_) {
- Shell::GetInstance()->RemovePreTargetHandler(event_handler_.get());
- event_handler_.reset();
- }
-}
-
-void WindowCycleController::InstallEventFilter() {
- event_handler_.reset(new WindowCycleEventFilter());
- Shell::GetInstance()->AddPreTargetHandler(event_handler_.get());
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/window_cycle_controller.h b/chromium/ash/wm/window_cycle_controller.h
deleted file mode 100644
index 12822c0e0fa..00000000000
--- a/chromium/ash/wm/window_cycle_controller.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WINDOW_CYCLE_CONTROLLER_H_
-#define ASH_WM_WINDOW_CYCLE_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-
-namespace ui {
-class EventHandler;
-}
-
-namespace ash {
-
-class WindowCycleList;
-
-// Controls cycling through windows with the keyboard, for example, via alt-tab.
-// Windows are sorted primarily by most recently used, and then by screen order.
-// We activate windows as you cycle through them, so the order on the screen
-// may change during the gesture, but the most recently used list isn't updated
-// until the cycling ends. Thus we maintain the state of the windows
-// at the beginning of the gesture so you can cycle through in a consistent
-// order.
-class ASH_EXPORT WindowCycleController {
- public:
- enum Direction {
- FORWARD,
- BACKWARD
- };
- WindowCycleController();
- virtual ~WindowCycleController();
-
- // Returns true if cycling through windows is enabled. This is false at
- // certain times, such as when the lock screen is visible.
- static bool CanCycle();
-
- // Cycles between windows in the given |direction|. If |is_alt_down| then
- // interprets this call as the start of a multi-step cycle sequence and
- // installs a key filter to watch for alt being released.
- void HandleCycleWindow(Direction direction, bool is_alt_down);
-
- // Cycles between windows without maintaining a multi-step cycle sequence
- // (see above).
- void HandleLinearCycleWindow();
-
- // Informs the controller that the Alt key has been released and it can
- // terminate the existing multi-step cycle.
- void AltKeyReleased();
-
- // Returns true if we are in the middle of a window cycling gesture.
- bool IsCycling() const { return windows_.get() != NULL; }
-
- // Returns the WindowCycleList. Really only useful for testing.
- const WindowCycleList* windows() const { return windows_.get(); }
-
- private:
- // Call to start cycling windows. You must call StopCycling() when done.
- void StartCycling();
-
- // Cycles to the next or previous window based on |direction|.
- void Step(Direction direction);
-
- // Installs an event filter to watch for release of the alt key.
- void InstallEventFilter();
-
- // Stops the current window cycle and cleans up the event filter.
- void StopCycling();
-
- scoped_ptr<WindowCycleList> windows_;
-
- // Event handler to watch for release of alt key.
- scoped_ptr<ui::EventHandler> event_handler_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowCycleController);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_WINDOW_CYCLE_CONTROLLER_H_
diff --git a/chromium/ash/wm/window_cycle_controller_unittest.cc b/chromium/ash/wm/window_cycle_controller_unittest.cc
deleted file mode 100644
index 67df90ef2f6..00000000000
--- a/chromium/ash/wm/window_cycle_controller_unittest.cc
+++ /dev/null
@@ -1,446 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/window_cycle_controller.h"
-
-#include <algorithm>
-
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/test_shell_delegate.h"
-#include "ash/wm/window_cycle_list.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-
-namespace {
-
-using aura::test::CreateTestWindowWithId;
-using aura::test::TestWindowDelegate;
-using aura::Window;
-
-typedef test::AshTestBase WindowCycleControllerTest;
-
-TEST_F(WindowCycleControllerTest, HandleCycleWindowBaseCases) {
- WindowCycleController* controller =
- Shell::GetInstance()->window_cycle_controller();
-
- // Cycling doesn't crash if there are no windows.
- controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
-
- // Create a single test window.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
- wm::ActivateWindow(window0.get());
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- // Cycling works for a single window, even though nothing changes.
- controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-}
-
-// Verifies if there is only one window and it isn't active that cycling
-// activates it.
-TEST_F(WindowCycleControllerTest, SingleWindowNotActive) {
- WindowCycleController* controller =
- Shell::GetInstance()->window_cycle_controller();
-
- // Create a single test window.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
- wm::ActivateWindow(window0.get());
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- // Rotate focus, this should move focus to another window that isn't part of
- // the default container.
- Shell::GetInstance()->RotateFocus(Shell::FORWARD);
- EXPECT_FALSE(wm::IsActiveWindow(window0.get()));
-
- // Cycling should activate the window.
- controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-}
-
-TEST_F(WindowCycleControllerTest, HandleCycleWindow) {
- WindowCycleController* controller =
- Shell::GetInstance()->window_cycle_controller();
-
- // Set up several windows to use to test cycling. Create them in reverse
- // order so they are stacked 0 over 1 over 2.
- scoped_ptr<Window> window2(CreateTestWindowInShellWithId(2));
- scoped_ptr<Window> window1(CreateTestWindowInShellWithId(1));
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
- wm::ActivateWindow(window0.get());
-
- // Simulate pressing and releasing Alt-tab.
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
-
- // Window lists should return the topmost window in front.
- ASSERT_TRUE(controller->windows());
- ASSERT_EQ(3u, controller->windows()->windows().size());
- ASSERT_EQ(window0.get(), controller->windows()->windows()[0]);
- ASSERT_EQ(window1.get(), controller->windows()->windows()[1]);
- ASSERT_EQ(window2.get(), controller->windows()->windows()[2]);
-
- controller->AltKeyReleased();
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
-
- // Pressing and releasing Alt-tab again should cycle back to the most-
- // recently-used window in the current child order.
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- controller->AltKeyReleased();
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- // Pressing Alt-tab multiple times without releasing Alt should cycle through
- // all the windows and wrap around.
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(controller->IsCycling());
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(controller->IsCycling());
- EXPECT_TRUE(wm::IsActiveWindow(window2.get()));
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(controller->IsCycling());
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- controller->AltKeyReleased();
- EXPECT_FALSE(controller->IsCycling());
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- // Reset our stacking order.
- wm::ActivateWindow(window2.get());
- wm::ActivateWindow(window1.get());
- wm::ActivateWindow(window0.get());
-
- // Likewise we can cycle backwards through all the windows.
- controller->HandleCycleWindow(WindowCycleController::BACKWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window2.get()));
- controller->HandleCycleWindow(WindowCycleController::BACKWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
- controller->HandleCycleWindow(WindowCycleController::BACKWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
- controller->AltKeyReleased();
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- // Passing false for is_alt_down does not start a cycle gesture.
- controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_FALSE(controller->IsCycling());
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_FALSE(controller->IsCycling());
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- // When the screen is locked, cycling window does not take effect.
- Shell::GetInstance()->session_state_delegate()->LockScreen();
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
- controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
- controller->HandleCycleWindow(WindowCycleController::BACKWARD, false);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- Shell::GetInstance()->session_state_delegate()->UnlockScreen();
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
- controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
- controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- // When a modal window is active, cycling window does not take effect.
- aura::Window* modal_container =
- ash::Shell::GetContainer(
- Shell::GetPrimaryRootWindow(),
- internal::kShellWindowId_SystemModalContainer);
- scoped_ptr<Window> modal_window(
- CreateTestWindowWithId(-2, modal_container));
- modal_window->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_SYSTEM);
- wm::ActivateWindow(modal_window.get());
- EXPECT_TRUE(wm::IsActiveWindow(modal_window.get()));
- controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_TRUE(wm::IsActiveWindow(modal_window.get()));
- EXPECT_FALSE(wm::IsActiveWindow(window0.get()));
- EXPECT_FALSE(wm::IsActiveWindow(window1.get()));
- EXPECT_FALSE(wm::IsActiveWindow(window2.get()));
- controller->HandleCycleWindow(WindowCycleController::BACKWARD, false);
- EXPECT_TRUE(wm::IsActiveWindow(modal_window.get()));
- EXPECT_FALSE(wm::IsActiveWindow(window0.get()));
- EXPECT_FALSE(wm::IsActiveWindow(window1.get()));
- EXPECT_FALSE(wm::IsActiveWindow(window2.get()));
-}
-
-// Cycles between a maximized and normal window.
-TEST_F(WindowCycleControllerTest, MaximizedWindow) {
- // Create a couple of test windows.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
- scoped_ptr<Window> window1(CreateTestWindowInShellWithId(1));
- wm::WindowState* window1_state = wm::GetWindowState(window1.get());
- window1_state->Maximize();
- window1_state->Activate();
- EXPECT_TRUE(window1_state->IsActive());
-
- // Rotate focus, this should move focus to window0.
- WindowCycleController* controller =
- Shell::GetInstance()->window_cycle_controller();
- controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_TRUE(wm::GetWindowState(window0.get())->IsActive());
-
- // One more time.
- controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_TRUE(window1_state->IsActive());
-}
-
-// Cycles to a minimized window.
-TEST_F(WindowCycleControllerTest, Minimized) {
- // Create a couple of test windows.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
- scoped_ptr<Window> window1(CreateTestWindowInShellWithId(1));
- wm::WindowState* window0_state = wm::GetWindowState(window0.get());
- wm::WindowState* window1_state = wm::GetWindowState(window1.get());
-
- window1_state->Minimize();
- window0_state->Activate();
- EXPECT_TRUE(window0_state->IsActive());
-
- // Rotate focus, this should move focus to window1 and unminimize it.
- WindowCycleController* controller =
- Shell::GetInstance()->window_cycle_controller();
- controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_FALSE(window1_state->IsMinimized());
- EXPECT_TRUE(window1_state->IsActive());
-
- // One more time back to w0.
- controller->HandleCycleWindow(WindowCycleController::FORWARD, false);
- EXPECT_TRUE(window0_state->IsActive());
-}
-
-TEST_F(WindowCycleControllerTest, AlwaysOnTopWindow) {
- WindowCycleController* controller =
- Shell::GetInstance()->window_cycle_controller();
-
- // Set up several windows to use to test cycling.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
- scoped_ptr<Window> window1(CreateTestWindowInShellWithId(1));
-
- Window* top_container =
- Shell::GetContainer(
- Shell::GetPrimaryRootWindow(),
- internal::kShellWindowId_AlwaysOnTopContainer);
- scoped_ptr<Window> window2(CreateTestWindowWithId(2, top_container));
- wm::ActivateWindow(window0.get());
-
- // Simulate pressing and releasing Alt-tab.
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
-
- // Window lists should return the topmost window in front.
- ASSERT_TRUE(controller->windows());
- ASSERT_EQ(3u, controller->windows()->windows().size());
- EXPECT_EQ(window0.get(), controller->windows()->windows()[0]);
- EXPECT_EQ(window2.get(), controller->windows()->windows()[1]);
- EXPECT_EQ(window1.get(), controller->windows()->windows()[2]);
-
- controller->AltKeyReleased();
- EXPECT_TRUE(wm::IsActiveWindow(window2.get()));
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- controller->AltKeyReleased();
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window2.get()));
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-}
-
-TEST_F(WindowCycleControllerTest, AlwaysOnTopMultiWindow) {
- WindowCycleController* controller =
- Shell::GetInstance()->window_cycle_controller();
-
- // Set up several windows to use to test cycling.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
- scoped_ptr<Window> window1(CreateTestWindowInShellWithId(1));
-
- Window* top_container =
- Shell::GetContainer(
- Shell::GetPrimaryRootWindow(),
- internal::kShellWindowId_AlwaysOnTopContainer);
- scoped_ptr<Window> window2(CreateTestWindowWithId(2, top_container));
- scoped_ptr<Window> window3(CreateTestWindowWithId(3, top_container));
- wm::ActivateWindow(window0.get());
-
- // Simulate pressing and releasing Alt-tab.
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
-
- // Window lists should return the topmost window in front.
- ASSERT_TRUE(controller->windows());
- ASSERT_EQ(4u, controller->windows()->windows().size());
- EXPECT_EQ(window0.get(), controller->windows()->windows()[0]);
- EXPECT_EQ(window3.get(), controller->windows()->windows()[1]);
- EXPECT_EQ(window2.get(), controller->windows()->windows()[2]);
- EXPECT_EQ(window1.get(), controller->windows()->windows()[3]);
-
- controller->AltKeyReleased();
- EXPECT_TRUE(wm::IsActiveWindow(window3.get()));
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- controller->AltKeyReleased();
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window3.get()));
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window2.get()));
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-}
-
-TEST_F(WindowCycleControllerTest, AlwaysOnTopMultipleRootWindows) {
- if (!SupportsMultipleDisplays())
- return;
-
- // Set up a second root window
- UpdateDisplay("1000x600,600x400");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- ASSERT_EQ(2U, root_windows.size());
-
- WindowCycleController* controller =
- Shell::GetInstance()->window_cycle_controller();
-
- Shell::GetInstance()->set_target_root_window(root_windows[0]);
-
- // Create two windows in the primary root.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
- EXPECT_EQ(root_windows[0], window0->GetRootWindow());
- Window* top_container0 =
- Shell::GetContainer(
- root_windows[0],
- internal::kShellWindowId_AlwaysOnTopContainer);
- scoped_ptr<Window> window1(CreateTestWindowWithId(1, top_container0));
- EXPECT_EQ(root_windows[0], window1->GetRootWindow());
-
- // And two on the secondary root.
- Shell::GetInstance()->set_target_root_window(root_windows[1]);
- scoped_ptr<Window> window2(CreateTestWindowInShellWithId(2));
- EXPECT_EQ(root_windows[1], window2->GetRootWindow());
-
- Window* top_container1 =
- Shell::GetContainer(
- root_windows[1],
- internal::kShellWindowId_AlwaysOnTopContainer);
- scoped_ptr<Window> window3(CreateTestWindowWithId(3, top_container1));
- EXPECT_EQ(root_windows[1], window3->GetRootWindow());
-
- // Move the active root window to the secondary.
- Shell::GetInstance()->set_target_root_window(root_windows[1]);
-
- wm::ActivateWindow(window2.get());
-
- EXPECT_EQ(root_windows[0], window0->GetRootWindow());
- EXPECT_EQ(root_windows[0], window1->GetRootWindow());
- EXPECT_EQ(root_windows[1], window2->GetRootWindow());
- EXPECT_EQ(root_windows[1], window3->GetRootWindow());
-
- // Simulate pressing and releasing Alt-tab.
- EXPECT_TRUE(wm::IsActiveWindow(window2.get()));
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
-
- // Window lists should return the topmost window in front.
- ASSERT_TRUE(controller->windows());
- ASSERT_EQ(4u, controller->windows()->windows().size());
- EXPECT_EQ(window2.get(), controller->windows()->windows()[0]);
- EXPECT_EQ(window3.get(), controller->windows()->windows()[1]);
- EXPECT_EQ(window1.get(), controller->windows()->windows()[2]);
- EXPECT_EQ(window0.get(), controller->windows()->windows()[3]);
-
- controller->AltKeyReleased();
- EXPECT_TRUE(wm::IsActiveWindow(window3.get()));
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window2.get()));
-
- controller->AltKeyReleased();
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window3.get()));
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window2.get()));
-}
-
-TEST_F(WindowCycleControllerTest, MostRecentlyUsed) {
- WindowCycleController* controller =
- Shell::GetInstance()->window_cycle_controller();
-
- // Set up several windows to use to test cycling.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
- scoped_ptr<Window> window1(CreateTestWindowInShellWithId(1));
- scoped_ptr<Window> window2(CreateTestWindowInShellWithId(2));
-
- wm::ActivateWindow(window0.get());
-
- // Simulate pressing and releasing Alt-tab.
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
-
- // Window lists should return the topmost window in front.
- ASSERT_TRUE(controller->windows());
- ASSERT_EQ(3u, controller->windows()->windows().size());
- EXPECT_EQ(window0.get(), controller->windows()->windows()[0]);
- EXPECT_EQ(window2.get(), controller->windows()->windows()[1]);
- EXPECT_EQ(window1.get(), controller->windows()->windows()[2]);
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- controller->AltKeyReleased();
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
-
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-
- controller->AltKeyReleased();
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window1.get()));
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window2.get()));
-
- controller->HandleCycleWindow(WindowCycleController::FORWARD, true);
- EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
-}
-
-} // namespace
-
-} // namespace ash
diff --git a/chromium/ash/wm/window_cycle_list.cc b/chromium/ash/wm/window_cycle_list.cc
deleted file mode 100644
index d6bf24a59cc..00000000000
--- a/chromium/ash/wm/window_cycle_list.cc
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/window_cycle_list.h"
-
-#include "ash/shell.h"
-#include "ash/wm/mru_window_tracker.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/window.h"
-#include "ui/views/corewm/window_animations.h"
-
-namespace ash {
-
-WindowCycleList::WindowCycleList(const WindowList& windows)
- : windows_(windows),
- current_index_(-1) {
- ash::Shell::GetInstance()->mru_window_tracker()->SetIgnoreActivations(true);
- // Locate the currently active window in the list to use as our start point.
- aura::Window* active_window = wm::GetActiveWindow();
-
- // The active window may not be in the cycle list, which is expected if there
- // are additional modal windows on the screen.
- current_index_ = GetWindowIndex(active_window);
-
- for (WindowList::const_iterator i = windows_.begin(); i != windows_.end();
- ++i) {
- (*i)->AddObserver(this);
- }
-}
-
-WindowCycleList::~WindowCycleList() {
- ash::Shell::GetInstance()->mru_window_tracker()->SetIgnoreActivations(false);
- for (WindowList::const_iterator i = windows_.begin(); i != windows_.end();
- ++i) {
- (*i)->RemoveObserver(this);
- }
-}
-
-void WindowCycleList::Step(Direction direction) {
- if (windows_.empty())
- return;
-
- if (current_index_ == -1) {
- // We weren't able to find our active window in the shell delegate's
- // provided window list. Just switch to the first (or last) one.
- current_index_ = (direction == FORWARD ? 0 : windows_.size() - 1);
- } else {
- // When there is only one window, we should give a feedback to user.
- if (windows_.size() == 1) {
- AnimateWindow(windows_[0],
- views::corewm::WINDOW_ANIMATION_TYPE_BOUNCE);
- return;
- }
- // We're in a valid cycle, so step forward or backward.
- current_index_ += (direction == FORWARD ? 1 : -1);
- }
- // Wrap to window list size.
- current_index_ = (current_index_ + windows_.size()) % windows_.size();
- DCHECK(windows_[current_index_]);
- // Make sure the next window is visible.
- windows_[current_index_]->Show();
- wm::ActivateWindow(windows_[current_index_]);
-}
-
-int WindowCycleList::GetWindowIndex(aura::Window* window) {
- WindowList::const_iterator it =
- std::find(windows_.begin(), windows_.end(), window);
- if (it == windows_.end())
- return -1; // Not found.
- return it - windows_.begin();
-}
-
-void WindowCycleList::OnWindowDestroyed(aura::Window* window) {
- WindowList::iterator i = std::find(windows_.begin(), windows_.end(), window);
- DCHECK(i != windows_.end());
- int removed_index = static_cast<int>(i - windows_.begin());
- windows_.erase(i);
- if (current_index_ > removed_index)
- current_index_--;
- else if (current_index_ == static_cast<int>(windows_.size()))
- current_index_--;
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/window_cycle_list.h b/chromium/ash/wm/window_cycle_list.h
deleted file mode 100644
index 6e0c75928c2..00000000000
--- a/chromium/ash/wm/window_cycle_list.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WINDOW_CYCLE_LIST_H_
-#define ASH_WM_WINDOW_CYCLE_LIST_H_
-
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/aura/window_observer.h"
-
-namespace ash {
-
-// Tracks a set of Windows that can be stepped through. This class is used by
-// the WindowCycleController.
-class ASH_EXPORT WindowCycleList : public aura::WindowObserver {
- public:
- typedef std::vector<aura::Window*> WindowList;
-
- enum Direction {
- FORWARD,
- BACKWARD
- };
-
- explicit WindowCycleList(const WindowList& windows);
- virtual ~WindowCycleList();
-
- bool empty() const { return windows_.empty(); }
-
- // Cycles to the next or previous window based on |direction|.
- void Step(Direction direction);
-
- const WindowList& windows() const { return windows_; }
-
- private:
- // Returns the index of |window| in |windows_| or -1 if it isn't there.
- int GetWindowIndex(aura::Window* window);
-
- // aura::WindowObserver overrides:
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
-
- // List of weak pointers to windows to use while cycling with the keyboard.
- // List is built when the user initiates the gesture (e.g. hits alt-tab the
- // first time) and is emptied when the gesture is complete (e.g. releases the
- // alt key).
- WindowList windows_;
-
- // Current position in the |windows_| list or -1 if we're not cycling.
- int current_index_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowCycleList);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_WINDOW_CYCLE_LIST_H_
diff --git a/chromium/ash/wm/window_manager_unittest.cc b/chromium/ash/wm/window_manager_unittest.cc
deleted file mode 100644
index 2b97e5259e0..00000000000
--- a/chromium/ash/wm/window_manager_unittest.cc
+++ /dev/null
@@ -1,815 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/shell_test_api.h"
-#include "ash/test/test_activation_delegate.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/client/activation_delegate.h"
-#include "ui/aura/client/cursor_client_observer.h"
-#include "ui/aura/client/focus_client.h"
-#include "ui/aura/env.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/aura_test_base.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/test/test_event_handler.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/base/cursor/cursor.h"
-#include "ui/base/hit_test.h"
-#include "ui/events/event.h"
-#include "ui/events/event_utils.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/corewm/compound_event_filter.h"
-#include "ui/views/corewm/corewm_switches.h"
-#include "ui/views/corewm/input_method_event_filter.h"
-
-namespace {
-
-class TestingCursorClientObserver : public aura::client::CursorClientObserver {
- public:
- TestingCursorClientObserver()
- : cursor_visibility_(false),
- did_visibility_change_(false) {}
- void reset() { cursor_visibility_ = did_visibility_change_ = false; }
- bool is_cursor_visible() const { return cursor_visibility_; }
- bool did_visibility_change() const { return did_visibility_change_; }
-
- // Overridden from aura::client::CursorClientObserver:
- virtual void OnCursorVisibilityChanged(bool is_visible) OVERRIDE {
- cursor_visibility_ = is_visible;
- did_visibility_change_ = true;
- }
-
- private:
- bool cursor_visibility_;
- bool did_visibility_change_;
-
- DISALLOW_COPY_AND_ASSIGN(TestingCursorClientObserver);
-};
-
-base::TimeDelta getTime() {
- return ui::EventTimeForNow();
-}
-
-// A slightly changed TestEventHandler which can be configured to return a
-// specified value for key/mouse event handling.
-class CustomEventHandler : public aura::test::TestEventHandler {
- public:
- CustomEventHandler()
- : key_result_(ui::ER_UNHANDLED),
- mouse_result_(ui::ER_UNHANDLED) {
- }
-
- virtual ~CustomEventHandler() {}
-
- void set_key_event_handling_result(ui::EventResult result) {
- key_result_ = result;
- }
-
- void set_mouse_event_handling_result(ui::EventResult result) {
- mouse_result_ = result;
- }
-
- // Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE {
- aura::test::TestEventHandler::OnKeyEvent(event);
- if (key_result_ & ui::ER_HANDLED)
- event->SetHandled();
- if (key_result_ & ui::ER_CONSUMED)
- event->StopPropagation();
- }
-
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
- aura::test::TestEventHandler::OnMouseEvent(event);
- if (mouse_result_ & ui::ER_HANDLED)
- event->SetHandled();
- if (mouse_result_ & ui::ER_CONSUMED)
- event->StopPropagation();
- }
-
- private:
- ui::EventResult key_result_;
- ui::EventResult mouse_result_;
-
- DISALLOW_COPY_AND_ASSIGN(CustomEventHandler);
-};
-
-} // namespace
-
-namespace ash {
-
-typedef test::AshTestBase WindowManagerTest;
-
-class NonFocusableDelegate : public aura::test::TestWindowDelegate {
- public:
- NonFocusableDelegate() {}
-
- private:
- virtual bool CanFocus() OVERRIDE {
- return false;
- }
-
- DISALLOW_COPY_AND_ASSIGN(NonFocusableDelegate);
-};
-
-class HitTestWindowDelegate : public aura::test::TestWindowDelegate {
- public:
- HitTestWindowDelegate()
- : hittest_code_(HTNOWHERE) {
- }
- virtual ~HitTestWindowDelegate() {}
- void set_hittest_code(int hittest_code) { hittest_code_ = hittest_code; }
-
- private:
- // Overridden from TestWindowDelegate:
- virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE {
- return hittest_code_;
- }
-
- int hittest_code_;
-
- DISALLOW_COPY_AND_ASSIGN(HitTestWindowDelegate);
-};
-
-TEST_F(WindowManagerTest, Focus) {
- // The IME event filter interferes with the basic key event propagation we
- // attempt to do here, so we remove it.
- test::ShellTestApi shell_test(Shell::GetInstance());
- Shell::GetInstance()->RemovePreTargetHandler(
- shell_test.input_method_event_filter());
-
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- root_window->SetBounds(gfx::Rect(0, 0, 510, 510));
-
- // Supplied ids are negative so as not to collide with shell ids.
- // TODO(beng): maybe introduce a MAKE_SHELL_ID() macro that generates a safe
- // id beyond shell id max?
- scoped_ptr<aura::Window> w1(CreateTestWindowInShell(
- SK_ColorWHITE, -1, gfx::Rect(10, 10, 500, 500)));
- scoped_ptr<aura::Window> w11(aura::test::CreateTestWindow(
- SK_ColorGREEN, -11, gfx::Rect(5, 5, 100, 100), w1.get()));
- scoped_ptr<aura::Window> w111(aura::test::CreateTestWindow(
- SK_ColorCYAN, -111, gfx::Rect(5, 5, 75, 75), w11.get()));
- scoped_ptr<aura::Window> w1111(aura::test::CreateTestWindow(
- SK_ColorRED, -1111, gfx::Rect(5, 5, 50, 50), w111.get()));
- scoped_ptr<aura::Window> w12(aura::test::CreateTestWindow(
- SK_ColorMAGENTA, -12, gfx::Rect(10, 420, 25, 25), w1.get()));
- aura::test::ColorTestWindowDelegate* w121delegate =
- new aura::test::ColorTestWindowDelegate(SK_ColorYELLOW);
- scoped_ptr<aura::Window> w121(aura::test::CreateTestWindowWithDelegate(
- w121delegate, -121, gfx::Rect(5, 5, 5, 5), w12.get()));
- aura::test::ColorTestWindowDelegate* w122delegate =
- new aura::test::ColorTestWindowDelegate(SK_ColorRED);
- scoped_ptr<aura::Window> w122(aura::test::CreateTestWindowWithDelegate(
- w122delegate, -122, gfx::Rect(10, 5, 5, 5), w12.get()));
- aura::test::ColorTestWindowDelegate* w123delegate =
- new aura::test::ColorTestWindowDelegate(SK_ColorRED);
- scoped_ptr<aura::Window> w123(aura::test::CreateTestWindowWithDelegate(
- w123delegate, -123, gfx::Rect(15, 5, 5, 5), w12.get()));
- scoped_ptr<aura::Window> w13(aura::test::CreateTestWindow(
- SK_ColorGRAY, -13, gfx::Rect(5, 470, 50, 50), w1.get()));
-
- // Click on a sub-window (w121) to focus it.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- w121.get());
- generator.ClickLeftButton();
-
- aura::client::FocusClient* focus_client =
- aura::client::GetFocusClient(w121.get());
- EXPECT_EQ(w121.get(), focus_client->GetFocusedWindow());
-
- aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher();
-
- // The key press should be sent to the focused sub-window.
- ui::KeyEvent keyev(ui::ET_KEY_PRESSED, ui::VKEY_E, 0, false);
- dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&keyev);
- EXPECT_EQ(ui::VKEY_E, w121delegate->last_key_code());
-
- // Touch on a sub-window (w122) to focus it.
- gfx::Point click_point = w122->bounds().CenterPoint();
- aura::Window::ConvertPointToTarget(w122->parent(), root_window, &click_point);
- ui::TouchEvent touchev(ui::ET_TOUCH_PRESSED, click_point, 0, getTime());
- dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev);
- focus_client = aura::client::GetFocusClient(w122.get());
- EXPECT_EQ(w122.get(), focus_client->GetFocusedWindow());
-
- // The key press should be sent to the focused sub-window.
- dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&keyev);
- EXPECT_EQ(ui::VKEY_E, w122delegate->last_key_code());
-
- // Hiding the focused window will set the focus to its parent if
- // it's focusable.
- w122->Hide();
- EXPECT_EQ(aura::client::GetFocusClient(w12.get()),
- aura::client::GetFocusClient(w122.get()));
- EXPECT_EQ(w12.get(),
- aura::client::GetFocusClient(w12.get())->GetFocusedWindow());
-
- // Sets the focus back to w122.
- w122->Show();
- w122->Focus();
- EXPECT_EQ(w122.get(),
- aura::client::GetFocusClient(w12.get())->GetFocusedWindow());
-
- // Removing the focused window from parent should set the focus to
- // its parent if it's focusable.
- w12->RemoveChild(w122.get());
- EXPECT_EQ(NULL, aura::client::GetFocusClient(w122.get()));
- EXPECT_EQ(w12.get(),
- aura::client::GetFocusClient(w12.get())->GetFocusedWindow());
-
- // Set the focus to w123, but make the w1 not activatable.
- test::TestActivationDelegate activation_delegate(false);
- w123->Focus();
- EXPECT_EQ(w123.get(),
- aura::client::GetFocusClient(w12.get())->GetFocusedWindow());
- aura::client::SetActivationDelegate(w1.get(), &activation_delegate);
-
- // Hiding the focused window will set the focus to NULL because
- // parent window is not focusable.
- w123->Hide();
- EXPECT_EQ(aura::client::GetFocusClient(w12.get()),
- aura::client::GetFocusClient(w123.get()));
- EXPECT_EQ(NULL, aura::client::GetFocusClient(w12.get())->GetFocusedWindow());
- EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&keyev));
-
- // Set the focus back to w123
- aura::client::SetActivationDelegate(w1.get(), NULL);
- w123->Show();
- w123->Focus();
- EXPECT_EQ(w123.get(),
- aura::client::GetFocusClient(w12.get())->GetFocusedWindow());
- aura::client::SetActivationDelegate(w1.get(), &activation_delegate);
-
- // Removing the focused window will set the focus to NULL because
- // parent window is not focusable.
- w12->RemoveChild(w123.get());
- EXPECT_EQ(NULL, aura::client::GetFocusClient(w123.get()));
- EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&keyev));
-}
-
-// Various assertion testing for activating windows.
-TEST_F(WindowManagerTest, ActivateOnMouse) {
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
-
- test::TestActivationDelegate d1;
- aura::test::TestWindowDelegate wd;
- scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithDelegate(
- &wd, -1, gfx::Rect(10, 10, 50, 50)));
- d1.SetWindow(w1.get());
- test::TestActivationDelegate d2;
- scoped_ptr<aura::Window> w2(CreateTestWindowInShellWithDelegate(
- &wd, -2, gfx::Rect(70, 70, 50, 50)));
- d2.SetWindow(w2.get());
-
- aura::client::FocusClient* focus_client =
- aura::client::GetFocusClient(w1.get());
-
- d1.Clear();
- d2.Clear();
-
- // Activate window1.
- wm::ActivateWindow(w1.get());
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
- EXPECT_EQ(w1.get(), focus_client->GetFocusedWindow());
- EXPECT_EQ(1, d1.activated_count());
- EXPECT_EQ(0, d1.lost_active_count());
- d1.Clear();
-
- {
- // Click on window2.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- w2.get());
- generator.ClickLeftButton();
-
- // Window2 should have become active.
- EXPECT_TRUE(wm::IsActiveWindow(w2.get()));
- EXPECT_EQ(w2.get(), focus_client->GetFocusedWindow());
- EXPECT_EQ(0, d1.activated_count());
- EXPECT_EQ(1, d1.lost_active_count());
- EXPECT_EQ(1, d2.activated_count());
- EXPECT_EQ(0, d2.lost_active_count());
- d1.Clear();
- d2.Clear();
- }
-
- {
- // Click back on window1, but set it up so w1 doesn't activate on click.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- w1.get());
- d1.set_activate(false);
- generator.ClickLeftButton();
-
- // Window2 should still be active and focused.
- EXPECT_TRUE(wm::IsActiveWindow(w2.get()));
- EXPECT_EQ(w2.get(), focus_client->GetFocusedWindow());
- EXPECT_EQ(0, d1.activated_count());
- EXPECT_EQ(0, d1.lost_active_count());
- EXPECT_EQ(0, d2.activated_count());
- EXPECT_EQ(0, d2.lost_active_count());
- d1.Clear();
- d2.Clear();
- }
-
- // Destroy window2, this should make window1 active.
- d1.set_activate(true);
- w2.reset();
- EXPECT_EQ(0, d2.activated_count());
- EXPECT_EQ(1, d2.lost_active_count());
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
- EXPECT_EQ(w1.get(), focus_client->GetFocusedWindow());
- EXPECT_EQ(1, d1.activated_count());
- EXPECT_EQ(0, d1.lost_active_count());
-
- // Clicking an active window with a child shouldn't steal the
- // focus from the child.
- {
- scoped_ptr<aura::Window> w11(CreateTestWindowWithDelegate(
- &wd, -11, gfx::Rect(10, 10, 10, 10), w1.get()));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- w11.get());
- // First set the focus to the child |w11|.
- generator.ClickLeftButton();
- EXPECT_EQ(w11.get(), focus_client->GetFocusedWindow());
- EXPECT_EQ(w1.get(), wm::GetActiveWindow());
-
- // Then click the parent active window. The focus shouldn't move.
- gfx::Point left_top = w1->bounds().origin();
- aura::Window::ConvertPointToTarget(w1->parent(), root_window, &left_top);
- left_top.Offset(1, 1);
- generator.MoveMouseTo(left_top);
- generator.ClickLeftButton();
- EXPECT_EQ(w11.get(), focus_client->GetFocusedWindow());
- EXPECT_EQ(w1.get(), wm::GetActiveWindow());
- }
-
- // Clicking on a non-focusable window inside a background window should still
- // give focus to the background window.
- {
- NonFocusableDelegate nfd;
- scoped_ptr<aura::Window> w11(CreateTestWindowWithDelegate(
- &nfd, -1, gfx::Rect(10, 10, 10, 10), w1.get()));
- // Move focus to |w2| first.
- scoped_ptr<aura::Window> w2(CreateTestWindowInShellWithDelegate(
- &wd, -1, gfx::Rect(70, 70, 50, 50)));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- w2.get());
- generator.ClickLeftButton();
- EXPECT_EQ(w2.get(), focus_client->GetFocusedWindow());
- EXPECT_FALSE(w11->CanFocus());
-
- // Click on |w11|. This should focus w1.
- generator.MoveMouseToCenterOf(w11.get());
- generator.ClickLeftButton();
- EXPECT_EQ(w1.get(), focus_client->GetFocusedWindow());
- }
-}
-
-TEST_F(WindowManagerTest, PanelActivation) {
- aura::test::TestWindowDelegate wd;
- scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithDelegate(
- &wd, -1, gfx::Rect(10, 10, 50, 50)));
- aura::test::TestWindowDelegate pd;
- scoped_ptr<aura::Window> p1(CreateTestWindowInShellWithDelegateAndType(
- &pd, aura::client::WINDOW_TYPE_PANEL, -1, gfx::Rect(10, 10, 50, 50)));
- aura::client::FocusClient* focus_client =
- aura::client::GetFocusClient(w1.get());
-
- // Activate w1.
- wm::ActivateWindow(w1.get());
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
-
- // Activate p1.
- wm::ActivateWindow(p1.get());
- EXPECT_TRUE(wm::IsActiveWindow(p1.get()));
- EXPECT_EQ(p1.get(), focus_client->GetFocusedWindow());
-
- // Activate w1.
- wm::ActivateWindow(w1.get());
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
- EXPECT_EQ(w1.get(), focus_client->GetFocusedWindow());
-
- // Clicking on a non-activatable window should not change the active window.
- {
- NonFocusableDelegate nfd;
- scoped_ptr<aura::Window> w3(CreateTestWindowInShellWithDelegate(
- &nfd, -1, gfx::Rect(70, 70, 50, 50)));
- aura::test::EventGenerator generator3(Shell::GetPrimaryRootWindow(),
- w3.get());
- wm::ActivateWindow(p1.get());
- EXPECT_TRUE(wm::IsActiveWindow(p1.get()));
- generator3.ClickLeftButton();
- EXPECT_TRUE(wm::IsActiveWindow(p1.get()));
- }
-}
-
-// Essentially the same as ActivateOnMouse, but for touch events.
-TEST_F(WindowManagerTest, ActivateOnTouch) {
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
-
- test::TestActivationDelegate d1;
- aura::test::TestWindowDelegate wd;
- scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithDelegate(
- &wd, -1, gfx::Rect(10, 10, 50, 50)));
- d1.SetWindow(w1.get());
- test::TestActivationDelegate d2;
- scoped_ptr<aura::Window> w2(CreateTestWindowInShellWithDelegate(
- &wd, -2, gfx::Rect(70, 70, 50, 50)));
- d2.SetWindow(w2.get());
-
- aura::client::FocusClient* focus_client =
- aura::client::GetFocusClient(w1.get());
-
- d1.Clear();
- d2.Clear();
-
- // Activate window1.
- wm::ActivateWindow(w1.get());
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
- EXPECT_EQ(w1.get(), focus_client->GetFocusedWindow());
- EXPECT_EQ(1, d1.activated_count());
- EXPECT_EQ(0, d1.lost_active_count());
- d1.Clear();
-
- // Touch window2.
- gfx::Point press_point = w2->bounds().CenterPoint();
- aura::Window::ConvertPointToTarget(w2->parent(), root_window, &press_point);
- ui::TouchEvent touchev1(ui::ET_TOUCH_PRESSED, press_point, 0, getTime());
-
- aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher();
- dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev1);
-
- // Window2 should have become active.
- EXPECT_TRUE(wm::IsActiveWindow(w2.get()));
- EXPECT_EQ(w2.get(), focus_client->GetFocusedWindow());
- EXPECT_EQ(0, d1.activated_count());
- EXPECT_EQ(1, d1.lost_active_count());
- EXPECT_EQ(1, d2.activated_count());
- EXPECT_EQ(0, d2.lost_active_count());
- d1.Clear();
- d2.Clear();
-
- // Touch window1, but set it up so w1 doesn't activate on touch.
- press_point = w1->bounds().CenterPoint();
- aura::Window::ConvertPointToTarget(w1->parent(), root_window, &press_point);
- d1.set_activate(false);
- ui::TouchEvent touchev2(ui::ET_TOUCH_PRESSED, press_point, 1, getTime());
- dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev2);
-
- // Window2 should still be active and focused.
- EXPECT_TRUE(wm::IsActiveWindow(w2.get()));
- EXPECT_EQ(w2.get(), focus_client->GetFocusedWindow());
- EXPECT_EQ(0, d1.activated_count());
- EXPECT_EQ(0, d1.lost_active_count());
- EXPECT_EQ(0, d2.activated_count());
- EXPECT_EQ(0, d2.lost_active_count());
- d1.Clear();
- d2.Clear();
-
- // Destroy window2, this should make window1 active.
- d1.set_activate(true);
- w2.reset();
- EXPECT_EQ(0, d2.activated_count());
- EXPECT_EQ(1, d2.lost_active_count());
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
- EXPECT_EQ(w1.get(), focus_client->GetFocusedWindow());
- EXPECT_EQ(1, d1.activated_count());
- EXPECT_EQ(0, d1.lost_active_count());
-}
-
-TEST_F(WindowManagerTest, MouseEventCursors) {
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
-
- // Create a window.
- const int kWindowLeft = 123;
- const int kWindowTop = 45;
- HitTestWindowDelegate window_delegate;
- scoped_ptr<aura::Window> window(CreateTestWindowInShellWithDelegate(
- &window_delegate,
- -1,
- gfx::Rect(kWindowLeft, kWindowTop, 640, 480)));
-
- // Create two mouse movement events we can switch between.
- gfx::Point point1(kWindowLeft, kWindowTop);
- aura::Window::ConvertPointToTarget(window->parent(), root_window, &point1);
-
- gfx::Point point2(kWindowLeft + 1, kWindowTop + 1);
- aura::Window::ConvertPointToTarget(window->parent(), root_window, &point2);
-
- aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher();
-
- // Cursor starts as a pointer (set during Shell::Init()).
- EXPECT_EQ(ui::kCursorPointer, dispatcher->last_cursor().native_type());
-
- {
- // Resize edges and corners show proper cursors.
- window_delegate.set_hittest_code(HTBOTTOM);
- ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0x0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1);
- EXPECT_EQ(ui::kCursorSouthResize, dispatcher->last_cursor().native_type());
- }
-
- {
- window_delegate.set_hittest_code(HTBOTTOMLEFT);
- ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0x0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move2);
- EXPECT_EQ(ui::kCursorSouthWestResize,
- dispatcher->last_cursor().native_type());
- }
-
- {
- window_delegate.set_hittest_code(HTBOTTOMRIGHT);
- ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0x0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1);
- EXPECT_EQ(ui::kCursorSouthEastResize,
- dispatcher->last_cursor().native_type());
- }
-
- {
- window_delegate.set_hittest_code(HTLEFT);
- ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0x0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move2);
- EXPECT_EQ(ui::kCursorWestResize, dispatcher->last_cursor().native_type());
- }
-
- {
- window_delegate.set_hittest_code(HTRIGHT);
- ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0x0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1);
- EXPECT_EQ(ui::kCursorEastResize, dispatcher->last_cursor().native_type());
- }
-
- {
- window_delegate.set_hittest_code(HTTOP);
- ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0x0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move2);
- EXPECT_EQ(ui::kCursorNorthResize, dispatcher->last_cursor().native_type());
- }
-
- {
- window_delegate.set_hittest_code(HTTOPLEFT);
- ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0x0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1);
- EXPECT_EQ(ui::kCursorNorthWestResize,
- dispatcher->last_cursor().native_type());
- }
-
- {
- window_delegate.set_hittest_code(HTTOPRIGHT);
- ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0x0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move2);
- EXPECT_EQ(ui::kCursorNorthEastResize,
- dispatcher->last_cursor().native_type());
- }
-
- {
- // Client area uses null cursor.
- window_delegate.set_hittest_code(HTCLIENT);
- ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0x0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1);
- EXPECT_EQ(ui::kCursorNull, dispatcher->last_cursor().native_type());
- }
-}
-
-#if defined(OS_WIN)
-#define MAYBE_TransformActivate DISABLED_TransformActivate
-#else
-#define MAYBE_TransformActivate TransformActivate
-#endif
-TEST_F(WindowManagerTest, MAYBE_TransformActivate) {
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
- gfx::Size size = root_window->bounds().size();
- EXPECT_EQ(gfx::Rect(size).ToString(),
- Shell::GetScreen()->GetDisplayNearestPoint(
- gfx::Point()).bounds().ToString());
-
- // Rotate it clock-wise 90 degrees.
- gfx::Transform transform;
- transform.Translate(size.width(), 0);
- transform.Rotate(90.0f);
- root_window->GetDispatcher()->SetTransform(transform);
-
- test::TestActivationDelegate d1;
- aura::test::TestWindowDelegate wd;
- scoped_ptr<aura::Window> w1(
- CreateTestWindowInShellWithDelegate(&wd, 1, gfx::Rect(0, 10, 50, 50)));
- d1.SetWindow(w1.get());
- w1->Show();
-
- gfx::Point miss_point(5, 5);
- transform.TransformPoint(&miss_point);
- ui::MouseEvent mouseev1(ui::ET_MOUSE_PRESSED,
- miss_point,
- miss_point,
- ui::EF_LEFT_MOUSE_BUTTON);
- aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher();
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouseev1);
- EXPECT_EQ(NULL, aura::client::GetFocusClient(w1.get())->GetFocusedWindow());
- ui::MouseEvent mouseup(ui::ET_MOUSE_RELEASED,
- miss_point,
- miss_point,
- ui::EF_LEFT_MOUSE_BUTTON);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouseup);
-
- gfx::Point hit_point(5, 15);
- transform.TransformPoint(&hit_point);
- ui::MouseEvent mouseev2(ui::ET_MOUSE_PRESSED,
- hit_point,
- hit_point,
- ui::EF_LEFT_MOUSE_BUTTON);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouseev2);
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
- EXPECT_EQ(w1.get(),
- aura::client::GetFocusClient(w1.get())->GetFocusedWindow());
-}
-
-TEST_F(WindowManagerTest, AdditionalFilters) {
- // The IME event filter interferes with the basic key event propagation we
- // attempt to do here, so we remove it.
- test::ShellTestApi shell_test(Shell::GetInstance());
- Shell::GetInstance()->RemovePreTargetHandler(
- shell_test.input_method_event_filter());
-
- aura::Window* root_window = Shell::GetPrimaryRootWindow();
-
- // Creates a window and make it active
- scoped_ptr<aura::Window> w1(CreateTestWindowInShell(
- SK_ColorWHITE, -1, gfx::Rect(0, 0, 100, 100)));
- wm::ActivateWindow(w1.get());
-
- // Creates two addition filters
- scoped_ptr<CustomEventHandler> f1(new CustomEventHandler);
- scoped_ptr<CustomEventHandler> f2(new CustomEventHandler);
-
- // Adds them to root window event filter.
- views::corewm::CompoundEventFilter* env_filter =
- Shell::GetInstance()->env_filter();
- env_filter->AddHandler(f1.get());
- env_filter->AddHandler(f2.get());
-
- // Dispatches mouse and keyboard events.
- ui::KeyEvent key_event(ui::ET_KEY_PRESSED, ui::VKEY_A, 0, false);
- aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher();
- dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&key_event);
- ui::MouseEvent mouse_pressed(
- ui::ET_MOUSE_PRESSED, gfx::Point(0, 0), gfx::Point(0, 0), 0x0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_pressed);
-
- // Both filters should get the events.
- EXPECT_EQ(1, f1->num_key_events());
- EXPECT_EQ(1, f1->num_mouse_events());
- EXPECT_EQ(1, f2->num_key_events());
- EXPECT_EQ(1, f2->num_mouse_events());
-
- f1->Reset();
- f2->Reset();
-
- // Makes f1 consume events.
- f1->set_key_event_handling_result(ui::ER_CONSUMED);
- f1->set_mouse_event_handling_result(ui::ER_CONSUMED);
-
- // Dispatches events.
- dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&key_event);
- ui::MouseEvent mouse_released(
- ui::ET_MOUSE_RELEASED, gfx::Point(0, 0), gfx::Point(0, 0), 0x0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_released);
-
- // f1 should still get the events but f2 no longer gets them.
- EXPECT_EQ(1, f1->num_key_events());
- EXPECT_EQ(1, f1->num_mouse_events());
- EXPECT_EQ(0, f2->num_key_events());
- EXPECT_EQ(0, f2->num_mouse_events());
-
- f1->Reset();
- f2->Reset();
-
- // Remove f1 from additonal filters list.
- env_filter->RemoveHandler(f1.get());
-
- // Dispatches events.
- dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&key_event);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_pressed);
-
- // f1 should get no events since it's out and f2 should get them.
- EXPECT_EQ(0, f1->num_key_events());
- EXPECT_EQ(0, f1->num_mouse_events());
- EXPECT_EQ(1, f2->num_key_events());
- EXPECT_EQ(1, f2->num_mouse_events());
-
- env_filter->RemoveHandler(f2.get());
-}
-
-// A keypress and/or touch only hides the cursor on ChromeOS (crbug.com/304296).
-#if defined(OS_CHROMEOS)
-// We should show and hide the cursor in response to mouse and touch events as
-// requested.
-TEST_F(WindowManagerTest, UpdateCursorVisibility) {
- aura::test::EventGenerator& generator = GetEventGenerator();
- views::corewm::CursorManager* cursor_manager =
- ash::Shell::GetInstance()->cursor_manager();
-
- generator.MoveMouseTo(gfx::Point(0, 0));
- EXPECT_TRUE(cursor_manager->IsCursorVisible());
- EXPECT_TRUE(cursor_manager->IsMouseEventsEnabled());
- generator.PressTouch();
- EXPECT_FALSE(cursor_manager->IsCursorVisible());
- EXPECT_FALSE(cursor_manager->IsMouseEventsEnabled());
- generator.MoveMouseTo(gfx::Point(0, 0));
- EXPECT_TRUE(cursor_manager->IsCursorVisible());
- EXPECT_TRUE(cursor_manager->IsMouseEventsEnabled());
- generator.ReleaseTouch();
- EXPECT_TRUE(cursor_manager->IsCursorVisible());
- EXPECT_TRUE(cursor_manager->IsMouseEventsEnabled());
-}
-
-TEST_F(WindowManagerTest, UpdateCursorVisibilityOnKeyEvent) {
- aura::test::EventGenerator& generator = GetEventGenerator();
- views::corewm::CursorManager* cursor_manager =
- ash::Shell::GetInstance()->cursor_manager();
-
- // Pressing a key hides the cursor but does not disable mouse events.
- generator.PressKey(ui::VKEY_A, ui::EF_NONE);
- EXPECT_FALSE(cursor_manager->IsCursorVisible());
- EXPECT_TRUE(cursor_manager->IsMouseEventsEnabled());
- // Moving mouse shows the cursor.
- generator.MoveMouseTo(gfx::Point(0, 0));
- EXPECT_TRUE(cursor_manager->IsCursorVisible());
- EXPECT_TRUE(cursor_manager->IsMouseEventsEnabled());
- // Releasing a key also hides the cursor but does not disable mouse events.
- generator.ReleaseKey(ui::VKEY_A, ui::EF_NONE);
- EXPECT_FALSE(cursor_manager->IsCursorVisible());
- EXPECT_TRUE(cursor_manager->IsMouseEventsEnabled());
- // Moving mouse shows the cursor again.
- generator.MoveMouseTo(gfx::Point(0, 0));
- EXPECT_TRUE(cursor_manager->IsCursorVisible());
- EXPECT_TRUE(cursor_manager->IsMouseEventsEnabled());
-}
-
-TEST_F(WindowManagerTest, TestCursorClientObserver) {
- aura::test::EventGenerator& generator = GetEventGenerator();
- views::corewm::CursorManager* cursor_manager =
- ash::Shell::GetInstance()->cursor_manager();
-
- scoped_ptr<aura::Window> w1(CreateTestWindowInShell(
- SK_ColorWHITE, -1, gfx::Rect(0, 0, 100, 100)));
- wm::ActivateWindow(w1.get());
-
- // Add two observers. Both should have OnCursorVisibilityChanged()
- // invoked when an event changes the visibility of the cursor.
- TestingCursorClientObserver observer_a;
- TestingCursorClientObserver observer_b;
- cursor_manager->AddObserver(&observer_a);
- cursor_manager->AddObserver(&observer_b);
-
- // Initial state before any events have been sent.
- observer_a.reset();
- observer_b.reset();
- EXPECT_FALSE(observer_a.did_visibility_change());
- EXPECT_FALSE(observer_b.did_visibility_change());
- EXPECT_FALSE(observer_a.is_cursor_visible());
- EXPECT_FALSE(observer_b.is_cursor_visible());
-
- // Keypress should hide the cursor.
- generator.PressKey(ui::VKEY_A, ui::EF_NONE);
- EXPECT_TRUE(observer_a.did_visibility_change());
- EXPECT_TRUE(observer_b.did_visibility_change());
- EXPECT_FALSE(observer_a.is_cursor_visible());
- EXPECT_FALSE(observer_b.is_cursor_visible());
-
- // Mouse move should show the cursor.
- observer_a.reset();
- observer_b.reset();
- generator.MoveMouseTo(50, 50);
- EXPECT_TRUE(observer_a.did_visibility_change());
- EXPECT_TRUE(observer_b.did_visibility_change());
- EXPECT_TRUE(observer_a.is_cursor_visible());
- EXPECT_TRUE(observer_b.is_cursor_visible());
-
- // Remove observer_b. Its OnCursorVisibilityChanged() should
- // not be invoked past this point.
- cursor_manager->RemoveObserver(&observer_b);
-
- // Gesture tap should hide the cursor.
- observer_a.reset();
- observer_b.reset();
- generator.GestureTapAt(gfx::Point(25, 25));
- EXPECT_TRUE(observer_a.did_visibility_change());
- EXPECT_FALSE(observer_b.did_visibility_change());
- EXPECT_FALSE(observer_a.is_cursor_visible());
-
- // Mouse move should show the cursor.
- observer_a.reset();
- observer_b.reset();
- generator.MoveMouseTo(50, 50);
- EXPECT_TRUE(observer_a.did_visibility_change());
- EXPECT_FALSE(observer_b.did_visibility_change());
- EXPECT_TRUE(observer_a.is_cursor_visible());
-}
-#endif
-
-} // namespace ash
diff --git a/chromium/ash/wm/window_modality_controller_unittest.cc b/chromium/ash/wm/window_modality_controller_unittest.cc
deleted file mode 100644
index 7e3666981e0..00000000000
--- a/chromium/ash/wm/window_modality_controller_unittest.cc
+++ /dev/null
@@ -1,563 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/views/corewm/window_modality_controller.h"
-
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/views/test/capture_tracking_view.h"
-#include "ui/views/test/child_modal_window.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-typedef test::AshTestBase WindowModalityControllerTest;
-
-namespace {
-
-bool ValidateStacking(aura::Window* parent, int ids[], int count) {
- for (int i = 0; i < count; ++i) {
- if (parent->children().at(i)->id() != ids[i])
- return false;
- }
- return true;
-}
-
-} // namespace
-
-// Creates three windows, w1, w11, and w12. w11 is a non-modal transient, w12 is
-// a modal transient.
-// Validates:
-// - it should be possible to activate w12 even when w11 is open.
-// - activating w1 activates w12 and updates stacking order appropriately.
-// - closing a window passes focus up the stack.
-TEST_F(WindowModalityControllerTest, BasicActivation) {
- aura::test::TestWindowDelegate d;
- scoped_ptr<aura::Window> w1(
- CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect()));
- scoped_ptr<aura::Window> w11(
- CreateTestWindowInShellWithDelegate(&d, -11, gfx::Rect()));
- scoped_ptr<aura::Window> w12(
- CreateTestWindowInShellWithDelegate(&d, -12, gfx::Rect()));
-
- w1->AddTransientChild(w11.get());
- wm::ActivateWindow(w1.get());
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
- wm::ActivateWindow(w11.get());
- EXPECT_TRUE(wm::IsActiveWindow(w11.get()));
-
- w12->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
- w1->AddTransientChild(w12.get());
- wm::ActivateWindow(w12.get());
- EXPECT_TRUE(wm::IsActiveWindow(w12.get()));
-
- wm::ActivateWindow(w11.get());
- EXPECT_TRUE(wm::IsActiveWindow(w11.get()));
-
- int check1[] = { -1, -12, -11 };
- EXPECT_TRUE(ValidateStacking(w1->parent(), check1, arraysize(check1)));
-
- wm::ActivateWindow(w1.get());
- EXPECT_TRUE(wm::IsActiveWindow(w12.get()));
- // Transient children are always stacked above their transient parent, which
- // is why this order is not -11, -1, -12.
- int check2[] = { -1, -11, -12 };
- EXPECT_TRUE(ValidateStacking(w1->parent(), check2, arraysize(check2)));
-
- w12.reset();
- EXPECT_TRUE(wm::IsActiveWindow(w11.get()));
- w11.reset();
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
-}
-
-// Create two toplevel windows w1 and w2, and nest two modals w11 and w111 below
-// w1.
-// Validates:
-// - activating w1 while w11/w111 is showing always activates most deeply nested
-// descendant.
-// - closing a window passes focus up the stack.
-TEST_F(WindowModalityControllerTest, NestedModals) {
- aura::test::TestWindowDelegate d;
- scoped_ptr<aura::Window> w1(
- CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect()));
- scoped_ptr<aura::Window> w11(
- CreateTestWindowInShellWithDelegate(&d, -11, gfx::Rect()));
- scoped_ptr<aura::Window> w111(
- CreateTestWindowInShellWithDelegate(&d, -111, gfx::Rect()));
- scoped_ptr<aura::Window> w2(
- CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect()));
-
- w1->AddTransientChild(w11.get());
- w11->AddTransientChild(w111.get());
-
- wm::ActivateWindow(w1.get());
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
- wm::ActivateWindow(w2.get());
- EXPECT_TRUE(wm::IsActiveWindow(w2.get()));
-
- // Set up modality.
- w11->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
- w111->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
-
- wm::ActivateWindow(w1.get());
- EXPECT_TRUE(wm::IsActiveWindow(w111.get()));
- int check1[] = { -2, -1, -11, -111 };
- EXPECT_TRUE(ValidateStacking(w1->parent(), check1, arraysize(check1)));
-
- wm::ActivateWindow(w11.get());
- EXPECT_TRUE(wm::IsActiveWindow(w111.get()));
- EXPECT_TRUE(ValidateStacking(w1->parent(), check1, arraysize(check1)));
-
- wm::ActivateWindow(w111.get());
- EXPECT_TRUE(wm::IsActiveWindow(w111.get()));
- EXPECT_TRUE(ValidateStacking(w1->parent(), check1, arraysize(check1)));
-
- wm::ActivateWindow(w2.get());
- EXPECT_TRUE(wm::IsActiveWindow(w2.get()));
- int check2[] = { -1, -11, -111, -2 };
- EXPECT_TRUE(ValidateStacking(w1->parent(), check2, arraysize(check2)));
-
- w2.reset();
- EXPECT_TRUE(wm::IsActiveWindow(w111.get()));
- w111.reset();
- EXPECT_TRUE(wm::IsActiveWindow(w11.get()));
- w11.reset();
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
-}
-
-// Create two toplevel windows w1 and w2, and nest two modals w11 and w111 below
-// w1.
-// Validates:
-// - destroying w11 while w111 is focused activates w1.
-TEST_F(WindowModalityControllerTest, NestedModalsOuterClosed) {
- aura::test::TestWindowDelegate d;
- scoped_ptr<aura::Window> w1(
- CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect()));
- scoped_ptr<aura::Window> w11(
- CreateTestWindowInShellWithDelegate(&d, -11, gfx::Rect()));
- // |w111| will be owned and deleted by |w11|.
- aura::Window* w111 =
- CreateTestWindowInShellWithDelegate(&d, -111, gfx::Rect());
- scoped_ptr<aura::Window> w2(
- CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect()));
-
- w1->AddTransientChild(w11.get());
- w11->AddTransientChild(w111);
-
- wm::ActivateWindow(w1.get());
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
- wm::ActivateWindow(w2.get());
- EXPECT_TRUE(wm::IsActiveWindow(w2.get()));
-
- // Set up modality.
- w11->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
- w111->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
-
- wm::ActivateWindow(w1.get());
- EXPECT_TRUE(wm::IsActiveWindow(w111));
-
- w111->Hide();
- EXPECT_TRUE(wm::IsActiveWindow(w11.get()));
-
- // TODO(oshima): Re-showing doesn't set the focus back to
- // modal window. There is no such use case right now, but it
- // probably should.
-
- w11.reset();
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
-}
-
-// Modality also prevents events from being passed to the transient parent.
-TEST_F(WindowModalityControllerTest, Events) {
- aura::test::TestWindowDelegate d;
- scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithDelegate(&d, -1,
- gfx::Rect(0, 0, 100, 100)));
- scoped_ptr<aura::Window> w11(CreateTestWindowInShellWithDelegate(&d, -11,
- gfx::Rect(20, 20, 50, 50)));
-
- w1->AddTransientChild(w11.get());
-
- {
- // Clicking a point within w1 should activate that window.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point(10, 10));
- generator.ClickLeftButton();
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
- }
-
- w11->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
-
- {
- // Clicking a point within w1 should activate w11.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point(10, 10));
- generator.ClickLeftButton();
- EXPECT_TRUE(wm::IsActiveWindow(w11.get()));
- }
-}
-
-// Creates windows w1 and non activatiable child w11. Creates transient window
-// w2 and adds it as a transeint child of w1. Ensures that w2 is parented to
-// the parent of w1, and that GetModalTransient(w11) returns w2.
-TEST_F(WindowModalityControllerTest, GetModalTransient) {
- aura::test::TestWindowDelegate d;
- scoped_ptr<aura::Window> w1(
- CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect()));
- scoped_ptr<aura::Window> w11(
- aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w1.get()));
- scoped_ptr<aura::Window> w2(
- CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect()));
- w2->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
-
- aura::Window* wt;
- wt = views::corewm::GetModalTransient(w1.get());
- ASSERT_EQ(static_cast<aura::Window*>(NULL), wt);
-
- // Parent w2 to w1. It should get parented to the parent of w1.
- w1->AddTransientChild(w2.get());
- ASSERT_EQ(2U, w1->parent()->children().size());
- EXPECT_EQ(-2, w1->parent()->children().at(1)->id());
-
- // Request the modal transient window for w1, it should be w2.
- wt = views::corewm::GetModalTransient(w1.get());
- ASSERT_NE(static_cast<aura::Window*>(NULL), wt);
- EXPECT_EQ(-2, wt->id());
-
- // Request the modal transient window for w11, it should also be w2.
- wt = views::corewm::GetModalTransient(w11.get());
- ASSERT_NE(static_cast<aura::Window*>(NULL), wt);
- EXPECT_EQ(-2, wt->id());
-}
-
-// Verifies we generate a capture lost when showing a modal window.
-TEST_F(WindowModalityControllerTest, ChangeCapture) {
- views::Widget* widget = views::Widget::CreateWindowWithContext(
- NULL, Shell::GetPrimaryRootWindow());
- scoped_ptr<aura::Window> widget_window(widget->GetNativeView());
- views::test::CaptureTrackingView* view = new views::test::CaptureTrackingView;
- widget->client_view()->AddChildView(view);
- widget->SetBounds(gfx::Rect(0, 0, 200, 200));
- view->SetBoundsRect(widget->client_view()->GetLocalBounds());
- widget->Show();
-
- gfx::Point center(view->width() / 2, view->height() / 2);
- views::View::ConvertPointToScreen(view, &center);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), center);
- generator.PressLeftButton();
- EXPECT_TRUE(view->got_press());
-
- views::Widget* modal_widget =
- views::Widget::CreateWindowWithParent(NULL, widget->GetNativeView());
- scoped_ptr<aura::Window> modal_window(modal_widget->GetNativeView());
- modal_window->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
- views::test::CaptureTrackingView* modal_view =
- new views::test::CaptureTrackingView;
- modal_widget->client_view()->AddChildView(modal_view);
- modal_widget->SetBounds(gfx::Rect(50, 50, 200, 200));
- modal_view->SetBoundsRect(modal_widget->client_view()->GetLocalBounds());
- modal_widget->Show();
-
- EXPECT_TRUE(view->got_capture_lost());
- generator.ReleaseLeftButton();
-
- view->reset();
-
- EXPECT_FALSE(modal_view->got_capture_lost());
- EXPECT_FALSE(modal_view->got_press());
-
- gfx::Point modal_center(modal_view->width() / 2, modal_view->height() / 2);
- views::View::ConvertPointToScreen(modal_view, &modal_center);
- generator.MoveMouseTo(modal_center, 1);
- generator.PressLeftButton();
- EXPECT_TRUE(modal_view->got_press());
- EXPECT_FALSE(modal_view->got_capture_lost());
- EXPECT_FALSE(view->got_capture_lost());
- EXPECT_FALSE(view->got_press());
-}
-
-class TouchTrackerWindowDelegate : public aura::test::TestWindowDelegate {
- public:
- TouchTrackerWindowDelegate()
- : received_touch_(false),
- last_event_type_(ui::ET_UNKNOWN) {
- }
- virtual ~TouchTrackerWindowDelegate() {}
-
- void reset() {
- received_touch_ = false;
- last_event_type_ = ui::ET_UNKNOWN;
- }
-
- bool received_touch() const { return received_touch_; }
- ui::EventType last_event_type() const { return last_event_type_; }
-
- private:
- // Overridden from aura::test::TestWindowDelegate.
- virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
- received_touch_ = true;
- last_event_type_ = event->type();
- aura::test::TestWindowDelegate::OnTouchEvent(event);
- }
-
- bool received_touch_;
- ui::EventType last_event_type_;
-
- DISALLOW_COPY_AND_ASSIGN(TouchTrackerWindowDelegate);
-};
-
-// Modality should prevent events from being passed to the transient parent.
-TEST_F(WindowModalityControllerTest, TouchEvent) {
- TouchTrackerWindowDelegate d1;
- scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithDelegate(&d1,
- -1, gfx::Rect(0, 0, 100, 100)));
- TouchTrackerWindowDelegate d11;
- scoped_ptr<aura::Window> w11(CreateTestWindowInShellWithDelegate(&d11,
- -11, gfx::Rect(20, 20, 50, 50)));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point(10, 10));
-
- w1->AddTransientChild(w11.get());
- d1.reset();
- d11.reset();
-
- {
- // Clicking a point within w1 should activate that window.
- generator.PressMoveAndReleaseTouchTo(gfx::Point(10, 10));
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
- EXPECT_TRUE(d1.received_touch());
- EXPECT_FALSE(d11.received_touch());
- }
-
- {
- // Adding a modal window while a touch is down should fire a touch cancel.
- generator.PressTouch();
- generator.MoveTouch(gfx::Point(10, 10));
- d1.reset();
- d11.reset();
-
- w11->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
- EXPECT_TRUE(d1.received_touch());
- EXPECT_EQ(ui::ET_TOUCH_CANCELLED, d1.last_event_type());
- EXPECT_FALSE(d11.received_touch());
- }
-}
-
-// Child-modal test.
-// Creates:
-// - A |parent| window that hosts a |modal_parent| window within itself. The
-// |parent| and |modal_parent| windows are not the same window. The
-// |modal_parent| window is not activatable, because it's contained within the
-// |parent| window.
-// - A |child| window with parent window |parent|, but is modal to
-// |modal_parent| window.
-// Validates:
-// - Clicking on the |modal_parent| should activate the |child| window.
-// - Clicking on the |parent| window outside of the |modal_parent| bounds should
-// activate the |parent| window.
-// - Clicking on the |child| while |parent| is active should activate the
-// |child| window.
-// - Focus should follow the active window.
-TEST_F(WindowModalityControllerTest, ChildModal) {
- views::test::ChildModalParent* delegate =
- new views::test::ChildModalParent(CurrentContext());
- views::Widget* widget = views::Widget::CreateWindowWithContextAndBounds(
- delegate, CurrentContext(), gfx::Rect(0, 0, 400, 400));
- widget->Show();
-
- aura::Window* parent = widget->GetNativeView();
- EXPECT_TRUE(wm::IsActiveWindow(parent));
-
- aura::Window* modal_parent = delegate->GetModalParent();
- EXPECT_NE(static_cast<aura::Window*>(NULL), modal_parent);
- EXPECT_NE(parent, modal_parent);
- EXPECT_FALSE(wm::IsActiveWindow(modal_parent));
-
- delegate->ShowChild();
- aura::Window* child = delegate->GetChild();
- EXPECT_NE(static_cast<aura::Window*>(NULL), child);
-
- EXPECT_TRUE(wm::IsActiveWindow(child));
- EXPECT_FALSE(wm::IsActiveWindow(modal_parent));
- EXPECT_FALSE(wm::IsActiveWindow(parent));
-
- EXPECT_TRUE(child->HasFocus());
- EXPECT_FALSE(modal_parent->HasFocus());
- EXPECT_FALSE(parent->HasFocus());
-
- wm::ActivateWindow(modal_parent);
-
- EXPECT_TRUE(wm::IsActiveWindow(child));
- EXPECT_FALSE(wm::IsActiveWindow(modal_parent));
- EXPECT_FALSE(wm::IsActiveWindow(parent));
-
- EXPECT_TRUE(child->HasFocus());
- EXPECT_FALSE(modal_parent->HasFocus());
- EXPECT_FALSE(parent->HasFocus());
-
- wm::ActivateWindow(parent);
-
- EXPECT_FALSE(wm::IsActiveWindow(child));
- EXPECT_FALSE(wm::IsActiveWindow(modal_parent));
- EXPECT_TRUE(wm::IsActiveWindow(parent));
-
- EXPECT_FALSE(child->HasFocus());
- EXPECT_FALSE(modal_parent->HasFocus());
- EXPECT_TRUE(parent->HasFocus());
-
- wm::ActivateWindow(child);
-
- EXPECT_TRUE(wm::IsActiveWindow(child));
- EXPECT_FALSE(wm::IsActiveWindow(modal_parent));
- EXPECT_FALSE(wm::IsActiveWindow(parent));
-
- EXPECT_TRUE(child->HasFocus());
- EXPECT_FALSE(modal_parent->HasFocus());
- EXPECT_FALSE(parent->HasFocus());
-}
-
-// Same as |ChildModal| test, but using |EventGenerator| rather than bypassing
-// it by calling |ActivateWindow|.
-TEST_F(WindowModalityControllerTest, ChildModalEventGenerator) {
- views::test::ChildModalParent* delegate =
- new views::test::ChildModalParent(CurrentContext());
- views::Widget* widget = views::Widget::CreateWindowWithContextAndBounds(
- delegate, CurrentContext(), gfx::Rect(0, 0, 400, 400));
- widget->Show();
-
- aura::Window* parent = widget->GetNativeView();
- EXPECT_TRUE(wm::IsActiveWindow(parent));
-
- aura::Window* modal_parent = delegate->GetModalParent();
- EXPECT_NE(static_cast<aura::Window*>(NULL), modal_parent);
- EXPECT_NE(parent, modal_parent);
- EXPECT_FALSE(wm::IsActiveWindow(modal_parent));
-
- delegate->ShowChild();
- aura::Window* child = delegate->GetChild();
- EXPECT_NE(static_cast<aura::Window*>(NULL), child);
-
- EXPECT_TRUE(wm::IsActiveWindow(child));
- EXPECT_FALSE(wm::IsActiveWindow(modal_parent));
- EXPECT_FALSE(wm::IsActiveWindow(parent));
-
- EXPECT_TRUE(child->HasFocus());
- EXPECT_FALSE(modal_parent->HasFocus());
- EXPECT_FALSE(parent->HasFocus());
-
- {
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(),
- parent->bounds().origin() +
- gfx::Vector2d(10, parent->bounds().height() - 10));
- generator.ClickLeftButton();
- generator.ClickLeftButton();
-
- EXPECT_TRUE(wm::IsActiveWindow(child));
- EXPECT_FALSE(wm::IsActiveWindow(modal_parent));
- EXPECT_FALSE(wm::IsActiveWindow(parent));
-
- EXPECT_TRUE(child->HasFocus());
- EXPECT_FALSE(modal_parent->HasFocus());
- EXPECT_FALSE(parent->HasFocus());
- }
-
- {
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(),
- parent->bounds().origin() + gfx::Vector2d(10, 10));
- generator.ClickLeftButton();
-
- EXPECT_FALSE(wm::IsActiveWindow(child));
- EXPECT_FALSE(wm::IsActiveWindow(modal_parent));
- EXPECT_TRUE(wm::IsActiveWindow(parent));
-
- EXPECT_FALSE(child->HasFocus());
- EXPECT_FALSE(modal_parent->HasFocus());
- EXPECT_TRUE(parent->HasFocus());
- }
-
- {
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(),
- child->bounds().origin() + gfx::Vector2d(10, 10));
- generator.ClickLeftButton();
-
- EXPECT_TRUE(wm::IsActiveWindow(child));
- EXPECT_FALSE(wm::IsActiveWindow(modal_parent));
- EXPECT_FALSE(wm::IsActiveWindow(parent));
-
- EXPECT_TRUE(child->HasFocus());
- EXPECT_FALSE(modal_parent->HasFocus());
- EXPECT_FALSE(parent->HasFocus());
- }
-}
-
-// Window-modal test for the case when the originally clicked window is an
-// ancestor of the modal parent.
-TEST_F(WindowModalityControllerTest, WindowModalAncestor) {
- aura::test::TestWindowDelegate d;
- scoped_ptr<aura::Window> w1(
- CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect()));
- scoped_ptr<aura::Window> w2(
- aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w1.get()));
- scoped_ptr<aura::Window> w3(
- aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w2.get()));
- scoped_ptr<aura::Window> w4(
- CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect()));
- w4->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
- w1->AddTransientChild(w4.get());
-
- wm::ActivateWindow(w1.get());
- EXPECT_TRUE(wm::IsActiveWindow(w4.get()));
-
- wm::ActivateWindow(w2.get());
- EXPECT_TRUE(wm::IsActiveWindow(w4.get()));
-
- wm::ActivateWindow(w3.get());
- EXPECT_TRUE(wm::IsActiveWindow(w4.get()));
-
- wm::ActivateWindow(w4.get());
- EXPECT_TRUE(wm::IsActiveWindow(w4.get()));
-}
-
-// Child-modal test for the case when the originally clicked window is an
-// ancestor of the modal parent.
-TEST_F(WindowModalityControllerTest, ChildModalAncestor) {
- aura::test::TestWindowDelegate d;
- scoped_ptr<aura::Window> w1(
- CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect()));
- scoped_ptr<aura::Window> w2(
- aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w1.get()));
- scoped_ptr<aura::Window> w3(
- aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w2.get()));
- scoped_ptr<aura::Window> w4(
- CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect()));
- w4->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_CHILD);
- views::corewm::SetModalParent(w4.get(), w2.get());
- w1->AddTransientChild(w4.get());
-
- wm::ActivateWindow(w1.get());
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
-
- wm::ActivateWindow(w2.get());
- EXPECT_TRUE(wm::IsActiveWindow(w4.get()));
-
- wm::ActivateWindow(w3.get());
- EXPECT_TRUE(wm::IsActiveWindow(w4.get()));
-
- wm::ActivateWindow(w4.get());
- EXPECT_TRUE(wm::IsActiveWindow(w4.get()));
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/window_positioner.cc b/chromium/ash/wm/window_positioner.cc
deleted file mode 100644
index 9b31113f8c4..00000000000
--- a/chromium/ash/wm/window_positioner.cc
+++ /dev/null
@@ -1,547 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/window_positioner.h"
-
-#include "ash/ash_switches.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/mru_window_tracker.h"
-#include "ash/wm/window_resizer.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "base/command_line.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/corewm/window_animations.h"
-
-namespace ash {
-
-const int WindowPositioner::kMinimumWindowOffset = 32;
-
-// The number of pixels which are kept free top, left and right when a window
-// gets positioned to its default location.
-// static
-const int WindowPositioner::kDesktopBorderSize = 16;
-
-// Maximum width of a window even if there is more room on the desktop.
-// static
-const int WindowPositioner::kMaximumWindowWidth = 1100;
-
-namespace {
-
-// When a window gets opened in default mode and the screen is less than or
-// equal to this width, the window will get opened in maximized mode. This value
-// can be reduced to a "tame" number if the feature is disabled.
-const int kForceMaximizeWidthLimit = 1366;
-const int kForceMaximizeWidthLimitDisabled = 640;
-
-// The time in milliseconds which should be used to visually move a window
-// through an automatic "intelligent" window management option.
-const int kWindowAutoMoveDurationMS = 125;
-
-// If set to true all window repositioning actions will be ignored. Set through
-// WindowPositioner::SetIgnoreActivations().
-static bool disable_auto_positioning = false;
-
-// If set to true, by default the first window in ASH will be maxmized.
-static bool maximize_first_window = false;
-
-// Check if any management should be performed (with a given |window|).
-bool UseAutoWindowManager(const aura::Window* window) {
- if (disable_auto_positioning)
- return false;
- const wm::WindowState* window_state = wm::GetWindowState(window);
- return !window_state->is_dragged() && window_state->window_position_managed();
-}
-
-// Check if a given |window| can be managed. This includes that it's state is
-// not minimized/maximized/the user has changed it's size by hand already.
-// It furthermore checks for the WindowIsManaged status.
-bool WindowPositionCanBeManaged(const aura::Window* window) {
- if (disable_auto_positioning)
- return false;
- const wm::WindowState* window_state = wm::GetWindowState(window);
- return window_state->window_position_managed() &&
- !window_state->IsMinimized() &&
- !window_state->IsMaximized() &&
- !window_state->bounds_changed_by_user();
-}
-
-// Get the work area for a given |window| in parent coordinates.
-gfx::Rect GetWorkAreaForWindowInParent(aura::Window* window) {
-#if defined(OS_WIN)
- // On Win 8, the host window can't be resized, so
- // use window's bounds instead.
- // TODO(oshima): Emulate host window resize on win8.
- gfx::Rect work_area = gfx::Rect(window->parent()->bounds().size());
- work_area.Inset(Shell::GetScreen()->GetDisplayMatching(
- window->parent()->GetBoundsInScreen()).GetWorkAreaInsets());
- return work_area;
-#else
- return ScreenAsh::GetDisplayWorkAreaBoundsInParent(window);
-#endif
-}
-
-// Move the given |bounds| on the available |work_area| in the direction
-// indicated by |move_right|. If |move_right| is true, the rectangle gets moved
-// to the right edge, otherwise to the left one.
-bool MoveRectToOneSide(const gfx::Rect& work_area,
- bool move_right,
- gfx::Rect* bounds) {
- if (move_right) {
- if (work_area.right() > bounds->right()) {
- bounds->set_x(work_area.right() - bounds->width());
- return true;
- }
- } else {
- if (work_area.x() < bounds->x()) {
- bounds->set_x(work_area.x());
- return true;
- }
- }
- return false;
-}
-
-// Move a |window| to a new |bound|. Animate if desired by user.
-// Note: The function will do nothing if the bounds did not change.
-void SetBoundsAnimated(aura::Window* window, const gfx::Rect& bounds) {
- if (bounds == window->GetTargetBounds())
- return;
-
- if (views::corewm::WindowAnimationsDisabled(window)) {
- window->SetBounds(bounds);
- return;
- }
-
- ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator());
- settings.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kWindowAutoMoveDurationMS));
- window->SetBounds(bounds);
-}
-
-// Move |window| into the center of the screen - or restore it to the previous
-// position.
-void AutoPlaceSingleWindow(aura::Window* window, bool animated) {
- gfx::Rect work_area = GetWorkAreaForWindowInParent(window);
- gfx::Rect bounds = window->bounds();
- const gfx::Rect* user_defined_area =
- wm::GetWindowState(window)->pre_auto_manage_window_bounds();
- if (user_defined_area) {
- bounds = *user_defined_area;
- ash::wm::AdjustBoundsToEnsureMinimumWindowVisibility(work_area, &bounds);
- } else {
- // Center the window (only in x).
- bounds.set_x(work_area.x() + (work_area.width() - bounds.width()) / 2);
- }
-
- if (animated)
- SetBoundsAnimated(window, bounds);
- else
- window->SetBounds(bounds);
-}
-
-// Get the first open (non minimized) window which is on the screen defined.
-aura::Window* GetReferenceWindow(const aura::Window* root_window,
- const aura::Window* exclude,
- bool *single_window) {
- if (single_window)
- *single_window = true;
- // Get the active window.
- aura::Window* active = ash::wm::GetActiveWindow();
- if (active && active->GetRootWindow() != root_window)
- active = NULL;
-
- // Get a list of all windows.
- const std::vector<aura::Window*> windows =
- ash::MruWindowTracker::BuildWindowList(false);
-
- if (windows.empty())
- return NULL;
-
- aura::Window::Windows::const_iterator iter = windows.begin();
- // Find the index of the current active window.
- if (active)
- iter = std::find(windows.begin(), windows.end(), active);
-
- int index = (iter == windows.end()) ? 0 : (iter - windows.begin());
-
- // Scan the cycle list backwards to see which is the second topmost window
- // (and so on). Note that we might cycle a few indices twice if there is no
- // suitable window. However - since the list is fairly small this should be
- // very fast anyways.
- aura::Window* found = NULL;
- for (int i = index + windows.size(); i >= 0; i--) {
- aura::Window* window = windows[i % windows.size()];
- if (window != exclude &&
- window->type() == aura::client::WINDOW_TYPE_NORMAL &&
- window->GetRootWindow() == root_window &&
- window->TargetVisibility() &&
- wm::GetWindowState(window)->window_position_managed()) {
- if (found && found != window) {
- // no need to check !signle_window because the function must have
- // been already returned in the "if (!single_window)" below.
- *single_window = false;
- return found;
- }
- found = window;
- // If there is no need to check single window, return now.
- if (!single_window)
- return found;
- }
- }
- return found;
-}
-
-} // namespace
-
-// static
-int WindowPositioner::GetForceMaximizedWidthLimit() {
- static int maximum_limit = 0;
- if (!maximum_limit) {
- maximum_limit = CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshDisableAutoMaximizing) ?
- kForceMaximizeWidthLimitDisabled : kForceMaximizeWidthLimit;
- }
- return maximum_limit;
-}
-
-// static
-void WindowPositioner::GetBoundsAndShowStateForNewWindow(
- const gfx::Screen* screen,
- const aura::Window* new_window,
- bool is_saved_bounds,
- ui::WindowShowState show_state_in,
- gfx::Rect* bounds_in_out,
- ui::WindowShowState* show_state_out) {
-
- // Always open new window in the target display.
- aura::Window* target = Shell::GetTargetRootWindow();
-
- aura::Window* top_window = GetReferenceWindow(target, NULL, NULL);
- // Our window should not have any impact if we are already on top.
- if (top_window == new_window)
- top_window = NULL;
-
- // If there is no valid other window we take and adjust the passed coordinates
- // and show state.
- if (!top_window) {
- gfx::Rect work_area = screen->GetDisplayNearestWindow(target).work_area();
-
- bounds_in_out->AdjustToFit(work_area);
- // Use adjusted saved bounds, if there is one.
- if (is_saved_bounds)
- return;
- // When using "small screens" we want to always open in full screen mode.
- if (show_state_in == ui::SHOW_STATE_DEFAULT && (maximize_first_window ||
- (work_area.width() <= GetForceMaximizedWidthLimit() &&
- (!new_window || !wm::GetWindowState(new_window)->IsFullscreen())))) {
- *show_state_out = ui::SHOW_STATE_MAXIMIZED;
- }
- return;
- }
- bool maximized = wm::GetWindowState(top_window)->IsMaximized();
- // We ignore the saved show state, but look instead for the top level
- // window's show state.
- if (show_state_in == ui::SHOW_STATE_DEFAULT) {
- *show_state_out = maximized ? ui::SHOW_STATE_MAXIMIZED :
- ui::SHOW_STATE_DEFAULT;
- }
-
- // Use the size of the other window. The window's bound will be rearranged
- // in ash::WorkspaceLayoutManager using this location.
- *bounds_in_out = top_window->GetBoundsInScreen();
-}
-
-// static
-void WindowPositioner::RearrangeVisibleWindowOnHideOrRemove(
- const aura::Window* removed_window) {
- if (!UseAutoWindowManager(removed_window))
- return;
- // Find a single open browser window.
- bool single_window;
- aura::Window* other_shown_window = GetReferenceWindow(
- removed_window->GetRootWindow(), removed_window, &single_window);
- if (!other_shown_window || !single_window ||
- !WindowPositionCanBeManaged(other_shown_window))
- return;
- AutoPlaceSingleWindow(other_shown_window, true);
-}
-
-// static
-bool WindowPositioner::DisableAutoPositioning(bool ignore) {
- bool old_state = disable_auto_positioning;
- disable_auto_positioning = ignore;
- return old_state;
-}
-
-// static
-void WindowPositioner::RearrangeVisibleWindowOnShow(
- aura::Window* added_window) {
- wm::WindowState* added_window_state = wm::GetWindowState(added_window);
- if (!added_window->TargetVisibility())
- return;
-
- if (!UseAutoWindowManager(added_window) ||
- added_window_state->bounds_changed_by_user()) {
- if (added_window_state->minimum_visibility()) {
- // Guarante minimum visibility within the work area.
- gfx::Rect work_area = GetWorkAreaForWindowInParent(added_window);
- gfx::Rect bounds = added_window->bounds();
- gfx::Rect new_bounds = bounds;
- ash::wm::AdjustBoundsToEnsureMinimumWindowVisibility(work_area,
- &new_bounds);
- if (new_bounds != bounds)
- added_window->SetBounds(new_bounds);
- }
- return;
- }
- // Find a single open managed window.
- bool single_window;
- aura::Window* other_shown_window = GetReferenceWindow(
- added_window->GetRootWindow(), added_window, &single_window);
-
- if (!other_shown_window) {
- // It could be that this window is the first window joining the workspace.
- if (!WindowPositionCanBeManaged(added_window) || other_shown_window)
- return;
- // Since we might be going from 0 to 1 window, we have to arrange the new
- // window to a good default.
- AutoPlaceSingleWindow(added_window, false);
- return;
- }
-
- gfx::Rect other_bounds = other_shown_window->bounds();
- gfx::Rect work_area = GetWorkAreaForWindowInParent(added_window);
- bool move_other_right =
- other_bounds.CenterPoint().x() > work_area.x() + work_area.width() / 2;
-
- // Push the other window to the size only if there are two windows left.
- if (single_window) {
- // When going from one to two windows both windows loose their
- // "positioned by user" flags.
- added_window_state->set_bounds_changed_by_user(false);
- wm::WindowState* other_window_state =
- wm::GetWindowState(other_shown_window);
- other_window_state->set_bounds_changed_by_user(false);
-
- if (WindowPositionCanBeManaged(other_shown_window)) {
- // Don't override pre auto managed bounds as the current bounds
- // may not be original.
- if (!other_window_state->pre_auto_manage_window_bounds())
- other_window_state->SetPreAutoManageWindowBounds(other_bounds);
-
- // Push away the other window after remembering its current position.
- if (MoveRectToOneSide(work_area, move_other_right, &other_bounds))
- SetBoundsAnimated(other_shown_window, other_bounds);
- }
- }
-
- // Remember the current location of the window if it's new and push
- // it also to the opposite location if needed. Since it is just
- // being shown, we do not need to animate it.
- gfx::Rect added_bounds = added_window->bounds();
- if (!added_window_state->pre_auto_manage_window_bounds())
- added_window_state->SetPreAutoManageWindowBounds(added_bounds);
- if (MoveRectToOneSide(work_area, !move_other_right, &added_bounds))
- added_window->SetBounds(added_bounds);
-}
-
-WindowPositioner::WindowPositioner()
- : pop_position_offset_increment_x(0),
- pop_position_offset_increment_y(0),
- popup_position_offset_from_screen_corner_x(0),
- popup_position_offset_from_screen_corner_y(0),
- last_popup_position_x_(0),
- last_popup_position_y_(0) {
-}
-
-WindowPositioner::~WindowPositioner() {
-}
-
-gfx::Rect WindowPositioner::GetDefaultWindowBounds(
- const gfx::Display& display) {
- const gfx::Rect work_area = display.work_area();
- // There should be a 'desktop' border around the window at the left and right
- // side.
- int default_width = work_area.width() - 2 * kDesktopBorderSize;
- // There should also be a 'desktop' border around the window at the top.
- // Since the workspace excludes the tray area we only need one border size.
- int default_height = work_area.height() - kDesktopBorderSize;
- int offset_x = kDesktopBorderSize;
- if (default_width > kMaximumWindowWidth) {
- // The window should get centered on the screen and not follow the grid.
- offset_x = (work_area.width() - kMaximumWindowWidth) / 2;
- default_width = kMaximumWindowWidth;
- }
- return gfx::Rect(work_area.x() + offset_x,
- work_area.y() + kDesktopBorderSize,
- default_width,
- default_height);
-}
-
-gfx::Rect WindowPositioner::GetPopupPosition(const gfx::Rect& old_pos) {
- int grid = kMinimumWindowOffset;
- popup_position_offset_from_screen_corner_x = grid;
- popup_position_offset_from_screen_corner_y = grid;
- if (!pop_position_offset_increment_x) {
- // When the popup position increment is , the last popup position
- // was not yet initialized.
- last_popup_position_x_ = popup_position_offset_from_screen_corner_x;
- last_popup_position_y_ = popup_position_offset_from_screen_corner_y;
- }
- pop_position_offset_increment_x = grid;
- pop_position_offset_increment_y = grid;
- // We handle the Multi monitor support by retrieving the active window's
- // work area.
- aura::Window* window = wm::GetActiveWindow();
- const gfx::Rect work_area = window && window->IsVisible() ?
- Shell::GetScreen()->GetDisplayNearestWindow(window).work_area() :
- Shell::GetScreen()->GetPrimaryDisplay().work_area();
- // Only try to reposition the popup when it is not spanning the entire
- // screen.
- if ((old_pos.width() + popup_position_offset_from_screen_corner_x >=
- work_area.width()) ||
- (old_pos.height() + popup_position_offset_from_screen_corner_y >=
- work_area.height()))
- return AlignPopupPosition(old_pos, work_area, grid);
- const gfx::Rect result = SmartPopupPosition(old_pos, work_area, grid);
- if (!result.IsEmpty())
- return AlignPopupPosition(result, work_area, grid);
- return NormalPopupPosition(old_pos, work_area);
-}
-
-// static
-void WindowPositioner::SetMaximizeFirstWindow(bool maximize) {
- maximize_first_window = maximize;
-}
-
-gfx::Rect WindowPositioner::NormalPopupPosition(
- const gfx::Rect& old_pos,
- const gfx::Rect& work_area) {
- int w = old_pos.width();
- int h = old_pos.height();
- // Note: The 'last_popup_position' is checked and kept relative to the
- // screen size. The offsetting will be done in the last step when the
- // target rectangle gets returned.
- bool reset = false;
- if (last_popup_position_y_ + h > work_area.height() ||
- last_popup_position_x_ + w > work_area.width()) {
- // Popup does not fit on screen. Reset to next diagonal row.
- last_popup_position_x_ -= last_popup_position_y_ -
- popup_position_offset_from_screen_corner_x -
- pop_position_offset_increment_x;
- last_popup_position_y_ = popup_position_offset_from_screen_corner_y;
- reset = true;
- }
- if (last_popup_position_x_ + w > work_area.width()) {
- // Start again over.
- last_popup_position_x_ = popup_position_offset_from_screen_corner_x;
- last_popup_position_y_ = popup_position_offset_from_screen_corner_y;
- reset = true;
- }
- int x = last_popup_position_x_;
- int y = last_popup_position_y_;
- if (!reset) {
- last_popup_position_x_ += pop_position_offset_increment_x;
- last_popup_position_y_ += pop_position_offset_increment_y;
- }
- return gfx::Rect(x + work_area.x(), y + work_area.y(), w, h);
-}
-
-gfx::Rect WindowPositioner::SmartPopupPosition(
- const gfx::Rect& old_pos,
- const gfx::Rect& work_area,
- int grid) {
- const std::vector<aura::Window*> windows =
- MruWindowTracker::BuildWindowList(false);
-
- std::vector<const gfx::Rect*> regions;
- // Process the window list and check if we can bail immediately.
- for (size_t i = 0; i < windows.size(); i++) {
- // We only include opaque and visible windows.
- if (windows[i] && windows[i]->IsVisible() && windows[i]->layer() &&
- (!windows[i]->transparent() ||
- windows[i]->layer()->GetTargetOpacity() == 1.0)) {
- wm::WindowState* window_state = wm::GetWindowState(windows[i]);
- // When any window is maximized we cannot find any free space.
- if (window_state->IsMaximizedOrFullscreen())
- return gfx::Rect(0, 0, 0, 0);
- if (window_state->IsNormalShowState())
- regions.push_back(&windows[i]->bounds());
- }
- }
-
- if (regions.empty())
- return gfx::Rect(0, 0, 0, 0);
-
- int w = old_pos.width();
- int h = old_pos.height();
- int x_end = work_area.width() / 2;
- int x, x_increment;
- // We parse for a proper location on the screen. We do this in two runs:
- // The first run will start from the left, parsing down, skipping any
- // overlapping windows it will encounter until the popup's height can not
- // be served anymore. Then the next grid position to the right will be
- // taken, and the same cycle starts again. This will be repeated until we
- // hit the middle of the screen (or we find a suitable location).
- // In the second run we parse beginning from the right corner downwards and
- // then to the left.
- // When no location was found, an empty rectangle will be returned.
- for (int run = 0; run < 2; run++) {
- if (run == 0) { // First run: Start left, parse right till mid screen.
- x = 0;
- x_increment = pop_position_offset_increment_x;
- } else { // Second run: Start right, parse left till mid screen.
- x = work_area.width() - w;
- x_increment = -pop_position_offset_increment_x;
- }
- // Note: The passing (x,y,w,h) window is always relative to the work area's
- // origin.
- for (; x_increment > 0 ? (x < x_end) : (x > x_end); x += x_increment) {
- int y = 0;
- while (y + h <= work_area.height()) {
- size_t i;
- for (i = 0; i < regions.size(); i++) {
- if (regions[i]->Intersects(gfx::Rect(x + work_area.x(),
- y + work_area.y(), w, h))) {
- y = regions[i]->bottom() - work_area.y();
- break;
- }
- }
- if (i >= regions.size())
- return gfx::Rect(x + work_area.x(), y + work_area.y(), w, h);
- }
- }
- }
- return gfx::Rect(0, 0, 0, 0);
-}
-
-gfx::Rect WindowPositioner::AlignPopupPosition(
- const gfx::Rect& pos,
- const gfx::Rect& work_area,
- int grid) {
- if (grid <= 1)
- return pos;
-
- int x = pos.x() - (pos.x() - work_area.x()) % grid;
- int y = pos.y() - (pos.y() - work_area.y()) % grid;
- int w = pos.width();
- int h = pos.height();
-
- // If the alignment was pushing the window out of the screen, we ignore the
- // alignment for that call.
- if (abs(pos.right() - work_area.right()) < grid)
- x = work_area.right() - w;
- if (abs(pos.bottom() - work_area.bottom()) < grid)
- y = work_area.bottom() - h;
- return gfx::Rect(x, y, w, h);
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/window_positioner.h b/chromium/ash/wm/window_positioner.h
deleted file mode 100644
index 2efbac06f9b..00000000000
--- a/chromium/ash/wm/window_positioner.h
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WINDOW_POSITIONER_H_
-#define ASH_WM_WINDOW_POSITIONER_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/gfx/rect.h"
-
-namespace aura {
-class Window;
-class RootWindow;
-}
-
-namespace gfx {
-class Display;
-class Rect;
-class Screen;
-}
-
-namespace ash {
-
-namespace test {
-class WindowPositionerTest;
-}
-
-// WindowPositioner is used by the browser to move new popups automatically to
-// a usable position on the closest work area (of the active window).
-class ASH_EXPORT WindowPositioner {
- public:
- // When the screen resolution width is smaller then this size, The algorithm
- // will default to maximized.
- static int GetForceMaximizedWidthLimit();
-
- // The number of pixels which are kept free top, left and right when a window
- // gets positioned to its default location.
- static const int kDesktopBorderSize;
-
- // Maximum width of a window even if there is more room on the desktop.
- static const int kMaximumWindowWidth;
-
- // Computes and returns the bounds and show state for new window
- // based on the parameter passed AND existing windows. |window| is
- // the one this function will generate a bounds for and used to
- // exclude the self window in making decision how to position the
- // window. |window| can be (and in most case) NULL.
- // |is_saved_bounds| indicates the |bounds_in_out| is the saved
- // bounds.
- static void GetBoundsAndShowStateForNewWindow(
- const gfx::Screen* screen,
- const aura::Window* new_window,
- bool is_saved_bounds,
- ui::WindowShowState show_state_in,
- gfx::Rect* bounds_in_out,
- ui::WindowShowState* show_state_out);
-
- // Returns the default bounds for a window to be created in the |display|.
- static gfx::Rect GetDefaultWindowBounds(const gfx::Display& display);
-
- // Check if after removal or hide of the given |removed_window| an
- // automated desktop location management can be performed and
- // rearrange accordingly.
- static void RearrangeVisibleWindowOnHideOrRemove(
- const aura::Window* removed_window);
-
- // Turn the automatic positioning logic temporarily off. Returns the previous
- // state.
- static bool DisableAutoPositioning(bool ignore);
-
- // Check if after insertion or showing of the given |added_window|
- // an automated desktop location management can be performed and
- // rearrange accordingly.
- static void RearrangeVisibleWindowOnShow(aura::Window* added_window);
-
- WindowPositioner();
- ~WindowPositioner();
-
- // Find a suitable screen position for a popup window and return it. The
- // passed input position is only used to retrieve the width and height.
- // The position is determined on the left / right / top / bottom first. If
- // no smart space is found, the position will follow the standard what other
- // operating systems do (default cascading style).
- gfx::Rect GetPopupPosition(const gfx::Rect& old_pos);
-
- // Accessor to set a flag indicating whether the first window in ASH should
- // be maximized.
- static void SetMaximizeFirstWindow(bool maximize);
-
- protected:
- friend class test::WindowPositionerTest;
-
- // Find a smart way to position the popup window. If there is no space this
- // function will return an empty rectangle.
- gfx::Rect SmartPopupPosition(const gfx::Rect& old_pos,
- const gfx::Rect& work_area,
- int grid);
-
- // Find the next available cascading popup position (on the given screen).
- gfx::Rect NormalPopupPosition(const gfx::Rect& old_pos,
- const gfx::Rect& work_area);
-
- // Align the location to the grid / snap to the right / bottom corner.
- gfx::Rect AlignPopupPosition(const gfx::Rect &pos,
- const gfx::Rect &work_area,
- int grid);
-
- // Constant exposed for unittest.
- static const int kMinimumWindowOffset;
-
- // The offset in X and Y for the next popup which opens.
- int pop_position_offset_increment_x;
- int pop_position_offset_increment_y;
-
- // The position on the screen for the first popup which gets shown if no
- // empty space can be found.
- int popup_position_offset_from_screen_corner_x;
- int popup_position_offset_from_screen_corner_y;
-
- // The last used position.
- int last_popup_position_x_;
- int last_popup_position_y_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowPositioner);
-};
-
-} // namespace ash
-
-#endif // ASH_WM_WINDOW_POSITIONER_H_
diff --git a/chromium/ash/wm/window_positioner_unittest.cc b/chromium/ash/wm/window_positioner_unittest.cc
deleted file mode 100644
index 72ae6302eb4..00000000000
--- a/chromium/ash/wm/window_positioner_unittest.cc
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/window_positioner.h"
-
-#include "ash/shell.h"
-#include "ash/shell/toplevel_window.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/window_positioner.h"
-#include "ash/wm/window_state.h"
-#include "ui/aura/root_window.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-
-typedef test::AshTestBase WindowPositionerTest;
-
-TEST_F(WindowPositionerTest, OpenMaximizedWindowOnSecondDisplay) {
- if (!SupportsMultipleDisplays())
- return;
- UpdateDisplay("400x400,500x500");
- Shell::GetInstance()->set_target_root_window(
- Shell::GetAllRootWindows()[1]);
- shell::ToplevelWindow::CreateParams params;
- params.can_resize = true;
- params.can_maximize = true;
- views::Widget* widget =
- shell::ToplevelWindow::CreateToplevelWindow(params);
- EXPECT_EQ("400,0 500x453", widget->GetWindowBoundsInScreen().ToString());
-}
-
-TEST_F(WindowPositionerTest, OpenDefaultWindowOnSecondDisplay) {
- if (!SupportsMultipleDisplays())
- return;
-#if defined(OS_WIN)
- ash::WindowPositioner::SetMaximizeFirstWindow(true);
-#endif
- UpdateDisplay("400x400,1400x900");
- aura::Window* second_root_window = Shell::GetAllRootWindows()[1];
- Shell::GetInstance()->set_target_root_window(
- second_root_window);
- shell::ToplevelWindow::CreateParams params;
- params.can_resize = true;
- params.can_maximize = true;
- views::Widget* widget =
- shell::ToplevelWindow::CreateToplevelWindow(params);
- gfx::Rect bounds = widget->GetWindowBoundsInScreen();
-#if defined(OS_WIN)
- EXPECT_TRUE(widget->IsMaximized());
-#else
- // The window should be in the 2nd display with the default size.
- EXPECT_EQ("300x300", bounds.size().ToString());
-#endif
- EXPECT_TRUE(Shell::GetScreen()->GetDisplayNearestWindow(
- second_root_window).bounds().Contains(bounds));
-}
-
-namespace {
-
-// A WidgetDelegate that returns the out of display saved bounds.
-class OutOfDisplayDelegate : public views::WidgetDelegate {
- public:
- explicit OutOfDisplayDelegate(views::Widget* widget) : widget_(widget) {}
- virtual ~OutOfDisplayDelegate() {}
-
- // Overridden from WidgetDelegate:
- virtual void DeleteDelegate() OVERRIDE {
- delete this;
- }
- virtual views::Widget* GetWidget() OVERRIDE {
- return widget_;
- }
- virtual const views::Widget* GetWidget() const OVERRIDE {
- return widget_;
- }
- virtual bool GetSavedWindowPlacement(
- const views::Widget* widget,
- gfx::Rect* bounds,
- ui::WindowShowState* show_state) const OVERRIDE {
- bounds->SetRect(450, 10, 100, 100);
- *show_state = ui::SHOW_STATE_NORMAL;
- return true;
- }
-
- private:
- views::Widget* widget_;
-
- DISALLOW_COPY_AND_ASSIGN(OutOfDisplayDelegate);
-};
-
-} // namespace
-
-TEST_F(WindowPositionerTest, EnsureMinimumVisibility) {
- if (!SupportsHostWindowResize())
- return;
-
- UpdateDisplay("400x400");
- views::Widget* widget = new views::Widget();
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
- params.delegate = new OutOfDisplayDelegate(widget);
- params.context = Shell::GetPrimaryRootWindow();
- widget->Init(params);
- widget->SetBounds(gfx::Rect(450,10, 100, 100));
- wm::GetWindowState(widget->GetNativeView())->set_minimum_visibility(true);
- widget->Show();
- // Make sure the bounds is adjusted to be inside the work area.
- EXPECT_EQ("390,10 100x100", widget->GetWindowBoundsInScreen().ToString());
- widget->CloseNow();
-}
-
-} // namespace
diff --git a/chromium/ash/wm/window_properties.cc b/chromium/ash/wm/window_properties.cc
deleted file mode 100644
index ced25b2a0be..00000000000
--- a/chromium/ash/wm/window_properties.cc
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/window_properties.h"
-
-#include "ash/wm/window_state.h"
-#include "ui/aura/window_property.h"
-
-DECLARE_WINDOW_PROPERTY_TYPE(ash::wm::WindowState*);
-
-namespace ash {
-namespace internal {
-DEFINE_WINDOW_PROPERTY_KEY(bool, kStayInSameRootWindowKey, false);
-DEFINE_WINDOW_PROPERTY_KEY(bool, kUsesScreenCoordinatesKey, false);
-DEFINE_OWNED_WINDOW_PROPERTY_KEY(wm::WindowState,
- kWindowStateKey, NULL);
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/window_properties.h b/chromium/ash/wm/window_properties.h
deleted file mode 100644
index 74ae4952da2..00000000000
--- a/chromium/ash/wm/window_properties.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WINDOW_PROPERTIES_H_
-#define ASH_WM_WINDOW_PROPERTIES_H_
-
-#include "ash/ash_export.h"
-#include "ui/base/ui_base_types.h"
-
-namespace aura {
-class Window;
-
-template<typename T>
-struct WindowProperty;
-}
-
-namespace ash {
-namespace wm {
-class WindowState;
-} // namespace wm
-namespace internal {
-
-// Shell-specific window property keys.
-
-// Alphabetical sort.
-
-// If this is set to true, the window stays in the same root window
-// even if the bounds outside of its root window is set.
-// This is exported as it's used in the tests.
-ASH_EXPORT extern const aura::WindowProperty<bool>* const
- kStayInSameRootWindowKey;
-
-// Property to tell if the container uses the screen coordinates.
-extern const aura::WindowProperty<bool>* const kUsesScreenCoordinatesKey;
-
-// A property key to store WindowState in the window. The window state
-// is owned by the window.
-extern const aura::WindowProperty<wm::WindowState*>* const kWindowStateKey;
-
-// Alphabetical sort.
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_WINDOW_PROPERTIES_H_
diff --git a/chromium/ash/wm/window_resizer.cc b/chromium/ash/wm/window_resizer.cc
deleted file mode 100644
index 372ce4889e0..00000000000
--- a/chromium/ash/wm/window_resizer.cc
+++ /dev/null
@@ -1,432 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/window_resizer.h"
-
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ash/wm/dock/docked_window_layout_manager.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-
-namespace {
-
-int GetPositionChangeDirectionForWindowComponent(int window_component) {
- int pos_change_direction = WindowResizer::kBoundsChangeDirection_None;
- switch (window_component) {
- case HTTOPLEFT:
- case HTBOTTOMRIGHT:
- case HTGROWBOX:
- case HTCAPTION:
- pos_change_direction |=
- WindowResizer::kBoundsChangeDirection_Horizontal |
- WindowResizer::kBoundsChangeDirection_Vertical;
- break;
- case HTTOP:
- case HTTOPRIGHT:
- case HTBOTTOM:
- pos_change_direction |= WindowResizer::kBoundsChangeDirection_Vertical;
- break;
- case HTBOTTOMLEFT:
- case HTRIGHT:
- case HTLEFT:
- pos_change_direction |= WindowResizer::kBoundsChangeDirection_Horizontal;
- break;
- default:
- break;
- }
- return pos_change_direction;
-}
-
-int GetSizeChangeDirectionForWindowComponent(int window_component) {
- int size_change_direction = WindowResizer::kBoundsChangeDirection_None;
- switch (window_component) {
- case HTTOPLEFT:
- case HTTOPRIGHT:
- case HTBOTTOMLEFT:
- case HTBOTTOMRIGHT:
- case HTGROWBOX:
- case HTCAPTION:
- size_change_direction |=
- WindowResizer::kBoundsChangeDirection_Horizontal |
- WindowResizer::kBoundsChangeDirection_Vertical;
- break;
- case HTTOP:
- case HTBOTTOM:
- size_change_direction |= WindowResizer::kBoundsChangeDirection_Vertical;
- break;
- case HTRIGHT:
- case HTLEFT:
- size_change_direction |= WindowResizer::kBoundsChangeDirection_Horizontal;
- break;
- default:
- break;
- }
- return size_change_direction;
-}
-
-// Returns true for resize components along the right edge, where a drag in
-// positive x will make the window larger.
-bool IsRightEdge(int window_component) {
- return window_component == HTTOPRIGHT ||
- window_component == HTRIGHT ||
- window_component == HTBOTTOMRIGHT ||
- window_component == HTGROWBOX;
-}
-
-} // namespace
-
-// static
-const int WindowResizer::kBoundsChange_None = 0;
-// static
-const int WindowResizer::kBoundsChange_Repositions = 1;
-// static
-const int WindowResizer::kBoundsChange_Resizes = 2;
-
-// static
-const int WindowResizer::kBoundsChangeDirection_None = 0;
-// static
-const int WindowResizer::kBoundsChangeDirection_Horizontal = 1;
-// static
-const int WindowResizer::kBoundsChangeDirection_Vertical = 2;
-
-WindowResizer::Details::Details()
- : window(NULL),
- window_state(NULL),
- window_component(HTNOWHERE),
- bounds_change(0),
- position_change_direction(0),
- size_change_direction(0),
- is_resizable(false),
- source(aura::client::WINDOW_MOVE_SOURCE_MOUSE) {
-}
-
-WindowResizer::Details::Details(aura::Window* window,
- const gfx::Point& location,
- int window_component,
- aura::client::WindowMoveSource source)
- : window(window),
- window_state(wm::GetWindowState(window)),
- initial_bounds_in_parent(window->bounds()),
- restore_bounds(gfx::Rect()),
- initial_location_in_parent(location),
- initial_opacity(window->layer()->opacity()),
- window_component(window_component),
- bounds_change(GetBoundsChangeForWindowComponent(window_component)),
- position_change_direction(
- GetPositionChangeDirectionForWindowComponent(window_component)),
- size_change_direction(
- GetSizeChangeDirectionForWindowComponent(window_component)),
- is_resizable(bounds_change != kBoundsChangeDirection_None),
- source(source) {
- if (window_state->IsNormalShowState() &&
- window_state->HasRestoreBounds() &&
- window_component == HTCAPTION)
- restore_bounds = window_state->GetRestoreBoundsInScreen();
-}
-
-WindowResizer::Details::~Details() {
-}
-
-WindowResizer::WindowResizer() {
-}
-
-WindowResizer::~WindowResizer() {
-}
-
-// static
-int WindowResizer::GetBoundsChangeForWindowComponent(int component) {
- int bounds_change = WindowResizer::kBoundsChange_None;
- switch (component) {
- case HTTOPLEFT:
- case HTTOP:
- case HTTOPRIGHT:
- case HTLEFT:
- case HTBOTTOMLEFT:
- bounds_change |= WindowResizer::kBoundsChange_Repositions |
- WindowResizer::kBoundsChange_Resizes;
- break;
- case HTCAPTION:
- bounds_change |= WindowResizer::kBoundsChange_Repositions;
- break;
- case HTRIGHT:
- case HTBOTTOMRIGHT:
- case HTBOTTOM:
- case HTGROWBOX:
- bounds_change |= WindowResizer::kBoundsChange_Resizes;
- break;
- default:
- break;
- }
- return bounds_change;
-}
-
-// static
-gfx::Rect WindowResizer::CalculateBoundsForDrag(
- const Details& details,
- const gfx::Point& passed_location) {
- if (!details.is_resizable)
- return details.initial_bounds_in_parent;
-
- gfx::Point location = passed_location;
- int delta_x = location.x() - details.initial_location_in_parent.x();
- int delta_y = location.y() - details.initial_location_in_parent.y();
-
- AdjustDeltaForTouchResize(details, &delta_x, &delta_y);
-
- // The minimize size constraint may limit how much we change the window
- // position. For example, dragging the left edge to the right should stop
- // repositioning the window when the minimize size is reached.
- gfx::Size size = GetSizeForDrag(details, &delta_x, &delta_y);
- gfx::Point origin = GetOriginForDrag(details, delta_x, delta_y);
- gfx::Rect new_bounds(origin, size);
-
- // Sizing has to keep the result on the screen. Note that this correction
- // has to come first since it might have an impact on the origin as well as
- // on the size.
- if (details.bounds_change & kBoundsChange_Resizes) {
- gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(details.window).work_area();
- aura::Window* dock_container = Shell::GetContainer(
- details.window->GetRootWindow(),
- internal::kShellWindowId_DockedContainer);
- internal::DockedWindowLayoutManager* dock_layout =
- static_cast<internal::DockedWindowLayoutManager*>(
- dock_container->layout_manager());
-
- work_area.Union(dock_layout->docked_bounds());
- work_area = ScreenAsh::ConvertRectFromScreen(details.window->parent(),
- work_area);
- if (details.size_change_direction & kBoundsChangeDirection_Horizontal) {
- if (IsRightEdge(details.window_component) &&
- new_bounds.right() < work_area.x() + kMinimumOnScreenArea) {
- int delta = work_area.x() + kMinimumOnScreenArea - new_bounds.right();
- new_bounds.set_width(new_bounds.width() + delta);
- } else if (new_bounds.x() > work_area.right() - kMinimumOnScreenArea) {
- int width = new_bounds.right() - work_area.right() +
- kMinimumOnScreenArea;
- new_bounds.set_x(work_area.right() - kMinimumOnScreenArea);
- new_bounds.set_width(width);
- }
- }
- if (details.size_change_direction & kBoundsChangeDirection_Vertical) {
- if (!IsBottomEdge(details.window_component) &&
- new_bounds.y() > work_area.bottom() - kMinimumOnScreenArea) {
- int height = new_bounds.bottom() - work_area.bottom() +
- kMinimumOnScreenArea;
- new_bounds.set_y(work_area.bottom() - kMinimumOnScreenArea);
- new_bounds.set_height(height);
- } else if (details.window_component == HTBOTTOM ||
- details.window_component == HTBOTTOMRIGHT ||
- details.window_component == HTBOTTOMLEFT) {
- // Update bottom edge to stay in the work area when we are resizing
- // by dragging the bottom edge or corners.
- if (new_bounds.bottom() > work_area.bottom())
- new_bounds.Inset(0, 0, 0,
- new_bounds.bottom() - work_area.bottom());
- }
- }
- if (details.bounds_change & kBoundsChange_Repositions &&
- new_bounds.y() < 0) {
- int delta = new_bounds.y();
- new_bounds.set_y(0);
- new_bounds.set_height(new_bounds.height() + delta);
- }
- }
-
- if (details.bounds_change & kBoundsChange_Repositions) {
- // When we might want to reposition a window which is also restored to its
- // previous size, to keep the cursor within the dragged window.
- if (!details.restore_bounds.IsEmpty()) {
- // However - it is not desirable to change the origin if the window would
- // be still hit by the cursor.
- if (details.initial_location_in_parent.x() >
- details.initial_bounds_in_parent.x() + details.restore_bounds.width())
- new_bounds.set_x(location.x() - details.restore_bounds.width() / 2);
- }
-
- // Make sure that |new_bounds| doesn't leave any of the displays. Note that
- // the |work_area| above isn't good for this check since it is the work area
- // for the current display but the window can move to a different one.
- aura::Window* parent = details.window->parent();
- gfx::Point passed_location_in_screen(passed_location);
- wm::ConvertPointToScreen(parent, &passed_location_in_screen);
- gfx::Rect near_passed_location(passed_location_in_screen, gfx::Size());
- // Use a pointer location (matching the logic in DragWindowResizer) to
- // calculate the target display after the drag.
- const gfx::Display& display =
- Shell::GetScreen()->GetDisplayMatching(near_passed_location);
- aura::Window* dock_container = Shell::GetContainer(
- wm::GetRootWindowMatching(near_passed_location),
- internal::kShellWindowId_DockedContainer);
- internal::DockedWindowLayoutManager* dock_layout =
- static_cast<internal::DockedWindowLayoutManager*>(
- dock_container->layout_manager());
-
- gfx::Rect screen_work_area = display.work_area();
- screen_work_area.Union(dock_layout->docked_bounds());
- screen_work_area.Inset(kMinimumOnScreenArea, 0);
- gfx::Rect new_bounds_in_screen =
- ScreenAsh::ConvertRectToScreen(parent, new_bounds);
- if (!screen_work_area.Intersects(new_bounds_in_screen)) {
- // Make sure that the x origin does not leave the current display.
- new_bounds_in_screen.set_x(
- std::max(screen_work_area.x() - new_bounds.width(),
- std::min(screen_work_area.right(),
- new_bounds_in_screen.x())));
- new_bounds =
- ScreenAsh::ConvertRectFromScreen(parent, new_bounds_in_screen);
- }
- }
-
- return new_bounds;
-}
-
-// static
-bool WindowResizer::IsBottomEdge(int window_component) {
- return window_component == HTBOTTOMLEFT ||
- window_component == HTBOTTOM ||
- window_component == HTBOTTOMRIGHT ||
- window_component == HTGROWBOX;
-}
-
-// static
-void WindowResizer::AdjustDeltaForTouchResize(const Details& details,
- int* delta_x,
- int* delta_y) {
- if (details.source != aura::client::WINDOW_MOVE_SOURCE_TOUCH ||
- !(details.bounds_change & kBoundsChange_Resizes))
- return;
-
- if (details.size_change_direction & kBoundsChangeDirection_Horizontal) {
- if (IsRightEdge(details.window_component)) {
- *delta_x += details.initial_location_in_parent.x() -
- details.initial_bounds_in_parent.right();
- } else {
- *delta_x += details.initial_location_in_parent.x() -
- details.initial_bounds_in_parent.x();
- }
- }
- if (details.size_change_direction & kBoundsChangeDirection_Vertical) {
- if (IsBottomEdge(details.window_component)) {
- *delta_y += details.initial_location_in_parent.y() -
- details.initial_bounds_in_parent.bottom();
- } else {
- *delta_y += details.initial_location_in_parent.y() -
- details.initial_bounds_in_parent.y();
- }
- }
-}
-
-// static
-gfx::Point WindowResizer::GetOriginForDrag(const Details& details,
- int delta_x,
- int delta_y) {
- gfx::Point origin = details.initial_bounds_in_parent.origin();
- if (details.bounds_change & kBoundsChange_Repositions) {
- int pos_change_direction =
- GetPositionChangeDirectionForWindowComponent(details.window_component);
- if (pos_change_direction & kBoundsChangeDirection_Horizontal)
- origin.Offset(delta_x, 0);
- if (pos_change_direction & kBoundsChangeDirection_Vertical)
- origin.Offset(0, delta_y);
- }
- return origin;
-}
-
-// static
-gfx::Size WindowResizer::GetSizeForDrag(const Details& details,
- int* delta_x,
- int* delta_y) {
- gfx::Size size = details.initial_bounds_in_parent.size();
- if (details.bounds_change & kBoundsChange_Resizes) {
- gfx::Size min_size = details.window->delegate()->GetMinimumSize();
- size.SetSize(GetWidthForDrag(details, min_size.width(), delta_x),
- GetHeightForDrag(details, min_size.height(), delta_y));
- } else if (!details.restore_bounds.IsEmpty()) {
- size = details.restore_bounds.size();
- }
- return size;
-}
-
-// static
-int WindowResizer::GetWidthForDrag(const Details& details,
- int min_width,
- int* delta_x) {
- int width = details.initial_bounds_in_parent.width();
- if (details.size_change_direction & kBoundsChangeDirection_Horizontal) {
- // Along the right edge, positive delta_x increases the window size.
- int x_multiplier = IsRightEdge(details.window_component) ? 1 : -1;
- width += x_multiplier * (*delta_x);
-
- // Ensure we don't shrink past the minimum width and clamp delta_x
- // for the window origin computation.
- if (width < min_width) {
- width = min_width;
- *delta_x = -x_multiplier * (details.initial_bounds_in_parent.width() -
- min_width);
- }
-
- // And don't let the window go bigger than the display.
- int max_width = Shell::GetScreen()->GetDisplayNearestWindow(
- details.window).bounds().width();
- gfx::Size max_size = details.window->delegate()->GetMaximumSize();
- if (max_size.width() != 0)
- max_width = std::min(max_width, max_size.width());
- if (width > max_width) {
- width = max_width;
- *delta_x = -x_multiplier * (details.initial_bounds_in_parent.width() -
- max_width);
- }
- }
- return width;
-}
-
-// static
-int WindowResizer::GetHeightForDrag(const Details& details,
- int min_height,
- int* delta_y) {
- int height = details.initial_bounds_in_parent.height();
- if (details.size_change_direction & kBoundsChangeDirection_Vertical) {
- // Along the bottom edge, positive delta_y increases the window size.
- int y_multiplier = IsBottomEdge(details.window_component) ? 1 : -1;
- height += y_multiplier * (*delta_y);
-
- // Ensure we don't shrink past the minimum height and clamp delta_y
- // for the window origin computation.
- if (height < min_height) {
- height = min_height;
- *delta_y = -y_multiplier * (details.initial_bounds_in_parent.height() -
- min_height);
- }
-
- // And don't let the window go bigger than the display.
- int max_height = Shell::GetScreen()->GetDisplayNearestWindow(
- details.window).bounds().height();
- gfx::Size max_size = details.window->delegate()->GetMaximumSize();
- if (max_size.height() != 0)
- max_height = std::min(max_height, max_size.height());
- if (height > max_height) {
- height = max_height;
- *delta_y = -y_multiplier * (details.initial_bounds_in_parent.height() -
- max_height);
- }
- }
- return height;
-}
-
-} // namespace aura
diff --git a/chromium/ash/wm/window_resizer.h b/chromium/ash/wm/window_resizer.h
deleted file mode 100644
index 29479b3266f..00000000000
--- a/chromium/ash/wm/window_resizer.h
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WINDOW_RESIZER_H_
-#define ASH_WM_WINDOW_RESIZER_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/client/window_move_client.h"
-#include "ui/gfx/rect.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-namespace wm {
-class WindowState;
-}
-
-// WindowResizer is used by ToplevelWindowEventFilter to handle dragging, moving
-// or resizing a window. All coordinates passed to this are in the parent
-// windows coordinates.
-class ASH_EXPORT WindowResizer {
- public:
- // Constants to identify the type of resize.
- static const int kBoundsChange_None;
- static const int kBoundsChange_Repositions;
- static const int kBoundsChange_Resizes;
-
- // Used to indicate which direction the resize occurs in.
- static const int kBoundsChangeDirection_None;
- static const int kBoundsChangeDirection_Horizontal;
- static const int kBoundsChangeDirection_Vertical;
-
- WindowResizer();
- virtual ~WindowResizer();
-
- // Returns a bitmask of the kBoundsChange_ values.
- static int GetBoundsChangeForWindowComponent(int component);
-
- // Invoked to drag/move/resize the window. |location| is in the coordinates
- // of the window supplied to the constructor. |event_flags| is the event
- // flags from the event.
- virtual void Drag(const gfx::Point& location, int event_flags) = 0;
-
- // Invoked to complete the drag.
- virtual void CompleteDrag(int event_flags) = 0;
-
- // Reverts the drag.
- virtual void RevertDrag() = 0;
-
- // Returns the target window the resizer was created for.
- virtual aura::Window* GetTarget() = 0;
-
- // See comment for |Details::initial_location_in_parent|.
- virtual const gfx::Point& GetInitialLocation() const = 0;
-
- protected:
- struct Details {
- Details();
- Details(aura::Window* window,
- const gfx::Point& location,
- int window_component,
- aura::client::WindowMoveSource source);
- ~Details();
-
- // The window we're resizing.
- // TODO(oshima): replace this with accessor method to
- // |window_state->window()|.
- aura::Window* window;
-
- // The ash window state for the |window| above.
- wm::WindowState* window_state;
-
- // Initial bounds of the window in parent coordinates.
- gfx::Rect initial_bounds_in_parent;
-
- // Restore bounds (in screen coordinates) of the window before the drag
- // started. Only set if the window is normal and is being dragged.
- gfx::Rect restore_bounds;
-
- // Location passed to the constructor, in |window->parent()|'s coordinates.
- gfx::Point initial_location_in_parent;
-
- // Initial opacity of the window.
- float initial_opacity;
-
- // The component the user pressed on.
- int window_component;
-
- // Bitmask of the |kBoundsChange_| constants.
- int bounds_change;
-
- // Bitmask of the |kBoundsChangeDirection_| constants.
- int position_change_direction;
-
- // Bitmask of the |kBoundsChangeDirection_| constants.
- int size_change_direction;
-
- // Will the drag actually modify the window?
- bool is_resizable;
-
- // Source of the event initiating the drag.
- aura::client::WindowMoveSource source;
- };
-
- static gfx::Rect CalculateBoundsForDrag(const Details& details,
- const gfx::Point& location);
-
- static gfx::Rect AdjustBoundsToGrid(const gfx::Rect& bounds,
- int grid_size);
-
- static bool IsBottomEdge(int component);
-
- private:
- // In case of touch resizing, adjusts deltas so that the border is positioned
- // just under the touch point.
- static void AdjustDeltaForTouchResize(const Details& details,
- int* delta_x,
- int* delta_y);
-
- // Returns the new origin of the window. The arguments are the difference
- // between the current location and the initial location.
- static gfx::Point GetOriginForDrag(const Details& details,
- int delta_x,
- int delta_y);
-
- // Returns the size of the window for the drag.
- static gfx::Size GetSizeForDrag(const Details& details,
- int* delta_x,
- int* delta_y);
-
- // Returns the width of the window.
- static int GetWidthForDrag(const Details& details,
- int min_width,
- int* delta_x);
-
- // Returns the height of the drag.
- static int GetHeightForDrag(const Details& details,
- int min_height,
- int* delta_y);
-};
-
-// Creates a WindowResizer for |window|. This can return a scoped_ptr
-// initialized with NULL if |window| should not be resized nor dragged.
-ASH_EXPORT scoped_ptr<WindowResizer> CreateWindowResizer(
- aura::Window* window,
- const gfx::Point& point_in_parent,
- int window_component,
- aura::client::WindowMoveSource source);
-
-} // namespace ash
-
-#endif // ASH_WM_WINDOW_RESIZER_H_
diff --git a/chromium/ash/wm/window_state.cc b/chromium/ash/wm/window_state.cc
deleted file mode 100644
index 4bc1484f9b8..00000000000
--- a/chromium/ash/wm/window_state.cc
+++ /dev/null
@@ -1,344 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/window_state.h"
-
-#include "ash/ash_switches.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/window_properties.h"
-#include "ash/wm/window_state_delegate.h"
-#include "ash/wm/window_state_observer.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/wm_types.h"
-#include "base/auto_reset.h"
-#include "base/command_line.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/gfx/display.h"
-#include "ui/views/corewm/window_util.h"
-
-namespace ash {
-namespace wm {
-
-// static
-bool WindowState::IsMaximizedOrFullscreenState(ui::WindowShowState show_state) {
- return show_state == ui::SHOW_STATE_FULLSCREEN ||
- show_state == ui::SHOW_STATE_MAXIMIZED;
-}
-
-WindowState::WindowState(aura::Window* window)
- : window_(window),
- window_position_managed_(false),
- bounds_changed_by_user_(false),
- panel_attached_(true),
- continue_drag_after_reparent_(false),
- ignored_by_shelf_(false),
- can_consume_system_keys_(false),
- top_row_keys_are_function_keys_(false),
- window_resizer_(NULL),
- always_restores_to_restore_bounds_(false),
- hide_shelf_when_fullscreen_(true),
- animate_to_fullscreen_(true),
- minimum_visibility_(false),
- in_set_window_show_type_(false),
- window_show_type_(ToWindowShowType(GetShowState())) {
- window_->AddObserver(this);
-
-#if defined(OS_CHROMEOS)
- // NOTE(pkotwicz): Animating to immersive fullscreen does not look good. When
- // the kAshEnableImmersiveFullscreenForAllWindows flag is set most windows
- // can be put into immersive fullscreen. It is not worth the added complexity
- // to only animate to fullscreen if the window is put into immersive
- // fullscreen.
- animate_to_fullscreen_ = !CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshEnableImmersiveFullscreenForAllWindows);
-#endif
-}
-
-WindowState::~WindowState() {
-}
-
-bool WindowState::HasDelegate() const {
- return delegate_;
-}
-
-void WindowState::SetDelegate(scoped_ptr<WindowStateDelegate> delegate) {
- DCHECK(!delegate_.get());
- delegate_ = delegate.Pass();
-}
-
-ui::WindowShowState WindowState::GetShowState() const {
- return window_->GetProperty(aura::client::kShowStateKey);
-}
-
-bool WindowState::IsMinimized() const {
- return GetShowState() == ui::SHOW_STATE_MINIMIZED;
-}
-
-bool WindowState::IsMaximized() const {
- return GetShowState() == ui::SHOW_STATE_MAXIMIZED;
-}
-
-bool WindowState::IsFullscreen() const {
- return GetShowState() == ui::SHOW_STATE_FULLSCREEN;
-}
-
-bool WindowState::IsMaximizedOrFullscreen() const {
- return IsMaximizedOrFullscreenState(GetShowState());
-}
-
-bool WindowState::IsNormalShowState() const {
- ui::WindowShowState state = window_->GetProperty(aura::client::kShowStateKey);
- return state == ui::SHOW_STATE_NORMAL || state == ui::SHOW_STATE_DEFAULT;
-}
-
-bool WindowState::IsActive() const {
- return IsActiveWindow(window_);
-}
-
-bool WindowState::IsDocked() const {
- return window_->parent() &&
- window_->parent()->id() == internal::kShellWindowId_DockedContainer;
-}
-
-bool WindowState::IsSnapped() const {
- return window_show_type_ == SHOW_TYPE_LEFT_SNAPPED ||
- window_show_type_ == SHOW_TYPE_RIGHT_SNAPPED;
-}
-
-bool WindowState::CanMaximize() const {
- return window_->GetProperty(aura::client::kCanMaximizeKey);
-}
-
-bool WindowState::CanMinimize() const {
- internal::RootWindowController* controller =
- internal::RootWindowController::ForWindow(window_);
- if (!controller)
- return false;
- aura::Window* lockscreen = controller->GetContainer(
- internal::kShellWindowId_LockScreenContainersContainer);
- if (lockscreen->Contains(window_))
- return false;
-
- return true;
-}
-
-bool WindowState::CanResize() const {
- return window_->GetProperty(aura::client::kCanResizeKey);
-}
-
-bool WindowState::CanActivate() const {
- return views::corewm::CanActivateWindow(window_);
-}
-
-bool WindowState::CanSnap() const {
- if (!CanResize() ||
- window_->type() == aura::client::WINDOW_TYPE_PANEL ||
- window_->transient_parent())
- return false;
- // If a window has a maximum size defined, snapping may make it too big.
- return window_->delegate() ? window_->delegate()->GetMaximumSize().IsEmpty() :
- true;
-}
-
-bool WindowState::HasRestoreBounds() const {
- return window_->GetProperty(aura::client::kRestoreBoundsKey) != NULL;
-}
-
-void WindowState::Maximize() {
- window_->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
-}
-
-void WindowState::SnapLeft(const gfx::Rect& bounds) {
- SnapWindow(SHOW_TYPE_LEFT_SNAPPED, bounds);
-}
-
-void WindowState::SnapRight(const gfx::Rect& bounds) {
- SnapWindow(SHOW_TYPE_RIGHT_SNAPPED, bounds);
-}
-
-void WindowState::Minimize() {
- window_->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
-}
-
-void WindowState::Unminimize() {
- window_->SetProperty(
- aura::client::kShowStateKey,
- window_->GetProperty(aura::client::kRestoreShowStateKey));
- window_->ClearProperty(aura::client::kRestoreShowStateKey);
-}
-
-void WindowState::Activate() {
- ActivateWindow(window_);
-}
-
-void WindowState::Deactivate() {
- DeactivateWindow(window_);
-}
-
-void WindowState::Restore() {
- window_->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
-}
-
-void WindowState::ToggleMaximized() {
- if (IsMaximized())
- Restore();
- else if (CanMaximize())
- Maximize();
-}
-
-void WindowState::ToggleFullscreen() {
- // Window which cannot be maximized should not be fullscreened.
- // It can, however, be restored if it was fullscreened.
- bool is_fullscreen = IsFullscreen();
- if (!is_fullscreen && !CanMaximize())
- return;
- if (delegate_ && delegate_->ToggleFullscreen(this))
- return;
- if (is_fullscreen) {
- Restore();
- } else {
- window_->SetProperty(aura::client::kShowStateKey,
- ui::SHOW_STATE_FULLSCREEN);
- }
-}
-
-void WindowState::SetBoundsInScreen(
- const gfx::Rect& bounds_in_screen) {
- gfx::Rect bounds_in_parent =
- ScreenAsh::ConvertRectFromScreen(window_->parent(),
- bounds_in_screen);
- window_->SetBounds(bounds_in_parent);
-}
-
-void WindowState::SaveCurrentBoundsForRestore() {
- gfx::Rect bounds_in_screen =
- ScreenAsh::ConvertRectToScreen(window_->parent(),
- window_->bounds());
- SetRestoreBoundsInScreen(bounds_in_screen);
-}
-
-gfx::Rect WindowState::GetRestoreBoundsInScreen() const {
- return *window_->GetProperty(aura::client::kRestoreBoundsKey);
-}
-
-gfx::Rect WindowState::GetRestoreBoundsInParent() const {
- return ScreenAsh::ConvertRectFromScreen(window_->parent(),
- GetRestoreBoundsInScreen());
-}
-
-void WindowState::SetRestoreBoundsInScreen(const gfx::Rect& bounds) {
- window_->SetProperty(aura::client::kRestoreBoundsKey, new gfx::Rect(bounds));
-}
-
-void WindowState::SetRestoreBoundsInParent(const gfx::Rect& bounds) {
- SetRestoreBoundsInScreen(
- ScreenAsh::ConvertRectToScreen(window_->parent(), bounds));
-}
-
-void WindowState::ClearRestoreBounds() {
- window_->ClearProperty(aura::client::kRestoreBoundsKey);
-}
-
-void WindowState::SetPreAutoManageWindowBounds(
- const gfx::Rect& bounds) {
- pre_auto_manage_window_bounds_.reset(new gfx::Rect(bounds));
-}
-
-void WindowState::AddObserver(WindowStateObserver* observer) {
- observer_list_.AddObserver(observer);
-}
-
-void WindowState::RemoveObserver(WindowStateObserver* observer) {
- observer_list_.RemoveObserver(observer);
-}
-
-void WindowState::OnWindowPropertyChanged(aura::Window* window,
- const void* key,
- intptr_t old) {
- DCHECK_EQ(window, window_);
- if (key == aura::client::kShowStateKey)
- SetWindowShowType(ToWindowShowType(GetShowState()));
-}
-
-void WindowState::SnapWindow(WindowShowType left_or_right,
- const gfx::Rect& bounds) {
- if (window_show_type_ == left_or_right) {
- window_->SetBounds(bounds);
- return;
- }
-
- // Compute the bounds that the window will restore to. If the window does not
- // already have restore bounds, it will be restored (when un-snapped) to the
- // last bounds that it had before getting snapped.
- gfx::Rect restore_bounds_in_screen(HasRestoreBounds() ?
- GetRestoreBoundsInScreen() : window_->GetBoundsInScreen());
- // Set the window's restore bounds so that WorkspaceLayoutManager knows
- // which width to use when the snapped window is moved to the edge.
- SetRestoreBoundsInParent(bounds);
-
- bool was_maximized = IsMaximizedOrFullscreen();
- // Before we can set the bounds we need to restore the window.
- // Restoring the window will set the window to its restored bounds set above.
- // Restore will cause OnWindowPropertyChanged() so it needs to be done
- // before notifying that the WindowShowType has changed to |left_or_right|.
- if (was_maximized)
- Restore();
- DCHECK(left_or_right == SHOW_TYPE_LEFT_SNAPPED ||
- left_or_right == SHOW_TYPE_RIGHT_SNAPPED);
- SetWindowShowType(left_or_right);
- // TODO(varkha): Ideally the bounds should be changed in a LayoutManager upon
- // observing the WindowShowType change.
- // If the window is a child of kShellWindowId_DockedContainer such as during
- // a drag, the window's bounds are not set in
- // WorkspaceLayoutManager::OnWindowShowTypeChanged(). Set them here. Skip
- // setting the bounds otherwise to avoid stopping the slide animation which
- // was started as a result of OnWindowShowTypeChanged().
- if (IsDocked())
- window_->SetBounds(bounds);
- SetRestoreBoundsInScreen(restore_bounds_in_screen);
-}
-
-void WindowState::SetWindowShowType(WindowShowType new_window_show_type) {
- if (in_set_window_show_type_)
- return;
- base::AutoReset<bool> resetter(&in_set_window_show_type_, true);
-
- ui::WindowShowState new_window_state =
- ToWindowShowState(new_window_show_type);
- if (new_window_state != GetShowState())
- window_->SetProperty(aura::client::kShowStateKey, new_window_state);
- WindowShowType old_window_show_type = window_show_type_;
- window_show_type_ = new_window_show_type;
- if (old_window_show_type != window_show_type_) {
- FOR_EACH_OBSERVER(WindowStateObserver, observer_list_,
- OnWindowShowTypeChanged(this, old_window_show_type));
- }
-}
-
-WindowState* GetActiveWindowState() {
- aura::Window* active = GetActiveWindow();
- return active ? GetWindowState(active) : NULL;
-}
-
-WindowState* GetWindowState(aura::Window* window) {
- if (!window)
- return NULL;
- WindowState* settings = window->GetProperty(internal::kWindowStateKey);
- if(!settings) {
- settings = new WindowState(window);
- window->SetProperty(internal::kWindowStateKey, settings);
- }
- return settings;
-}
-
-const WindowState* GetWindowState(const aura::Window* window) {
- return GetWindowState(const_cast<aura::Window*>(window));
-}
-
-} // namespace wm
-} // namespace ash
diff --git a/chromium/ash/wm/window_state.h b/chromium/ash/wm/window_state.h
deleted file mode 100644
index 618349c86d6..00000000000
--- a/chromium/ash/wm/window_state.h
+++ /dev/null
@@ -1,308 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WINDOW_STATE_H_
-#define ASH_WM_WINDOW_STATE_H_
-
-#include "ash/ash_export.h"
-#include "ash/wm/wm_types.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/observer_list.h"
-#include "ui/aura/window_observer.h"
-#include "ui/base/ui_base_types.h"
-
-namespace aura {
-class Window;
-}
-
-namespace gfx {
-class Rect;
-}
-
-namespace ash {
-class WindowResizer;
-
-namespace wm {
-class WindowStateDelegate;
-class WindowStateObserver;
-
-// WindowState manages and defines ash specific window state and
-// behavior. Ash specific per-window state (such as ones that controls
-// window manager behavior) and ash specific window behavior (such as
-// maximize, minimize, snap sizing etc) should be added here instead
-// of defining separate functions (like |MaximizeWindow(aura::Window*
-// window)|) or using aura Window property.
-// The WindowState gets created when first accessed by
-// |wm::GetWindowState|, and deleted when the window is deleted.
-// Prefer using this class instead of passing aura::Window* around in
-// ash code as this is often what you need to interact with, and
-// accessing the window using |window()| is cheap.
-class ASH_EXPORT WindowState : public aura::WindowObserver {
- public:
- static bool IsMaximizedOrFullscreenState(ui::WindowShowState state);
-
- explicit WindowState(aura::Window* window);
- virtual ~WindowState();
-
- aura::Window* window() { return window_; }
- const aura::Window* window() const { return window_; }
-
- bool HasDelegate() const;
- void SetDelegate(scoped_ptr<WindowStateDelegate> delegate);
-
- // Returns the window's current show state.
- ui::WindowShowState GetShowState() const;
-
- // Returns the window's current ash show type.
- // Refer to WindowShowType definition in wm_types.h as for why Ash
- // has its own show type.
- WindowShowType window_show_type() const { return window_show_type_; }
-
- // Predicates to check window state.
- bool IsMinimized() const;
- bool IsMaximized() const;
- bool IsFullscreen() const;
- bool IsMaximizedOrFullscreen() const;
- // True if the window's show state is SHOW_STATE_NORMAL or
- // SHOW_STATE_DEFAULT.
- bool IsNormalShowState() const;
- bool IsActive() const;
- bool IsDocked() const;
- bool IsSnapped() const;
-
- // Checks if the window can change its state accordingly.
- bool CanMaximize() const;
- bool CanMinimize() const;
- bool CanResize() const;
- bool CanSnap() const;
- bool CanActivate() const;
-
- // Returns true if the window has restore bounds.
- bool HasRestoreBounds() const;
-
- void Maximize();
- void Minimize();
- void Unminimize();
- void Activate();
- void Deactivate();
- void Restore();
- void ToggleMaximized();
- void ToggleFullscreen();
- void SnapLeft(const gfx::Rect& bounds);
- void SnapRight(const gfx::Rect& bounds);
-
- // Sets the window's bounds in screen coordinates.
- void SetBoundsInScreen(const gfx::Rect& bounds_in_screen);
-
- // Saves the current bounds to be used as a restore bounds.
- void SaveCurrentBoundsForRestore();
-
- // Same as |GetRestoreBoundsInScreen| except that it returns the
- // bounds in the parent's coordinates.
- gfx::Rect GetRestoreBoundsInParent() const;
-
- // Returns the restore bounds property on the window in the virtual screen
- // coordinates. The bounds can be NULL if the bounds property does not
- // exist for the window. The window owns the bounds object.
- gfx::Rect GetRestoreBoundsInScreen() const;
-
- // Same as |SetRestoreBoundsInScreen| except that the bounds is in the
- // parent's coordinates.
- void SetRestoreBoundsInParent(const gfx::Rect& bounds_in_parent);
-
- // Sets the restore bounds property on the window in the virtual screen
- // coordinates. Deletes existing bounds value if exists.
- void SetRestoreBoundsInScreen(const gfx::Rect& bounds_in_screen);
-
- // Deletes and clears the restore bounds property on the window.
- void ClearRestoreBounds();
-
- // Sets whether the window should always be restored to the restore bounds
- // (sometimes the workspace layout manager restores the window to its original
- // bounds instead of the restore bounds. Setting this key overrides that
- // behaviour). The flag is reset to the default value after the window is
- // restored.
- bool always_restores_to_restore_bounds() const {
- return always_restores_to_restore_bounds_;
- }
- void set_always_restores_to_restore_bounds(bool value) {
- always_restores_to_restore_bounds_ = value;
- }
-
- // Gets/sets whether the shelf should be hidden when this window is
- // fullscreen.
- bool hide_shelf_when_fullscreen() const {
- return hide_shelf_when_fullscreen_;
- }
-
- void set_hide_shelf_when_fullscreen(bool value) {
- hide_shelf_when_fullscreen_ = value;
- }
-
- // Sets/gets the flag to suppress the cross-fade animation for
- // the transition to the fullscreen state.
- bool animate_to_fullscreen() const {
- return animate_to_fullscreen_;
- }
- void set_animate_to_fullscreen(bool value) {
- animate_to_fullscreen_ = value;
- }
-
- // If the minimum visibilty is true, ash will try to keep a
- // minimum amount of the window is always visible on the work area
- // when shown.
- // TODO(oshima): Consolidate this and window_position_managed
- // into single parameter to control the window placement.
- bool minimum_visibility() const {
- return minimum_visibility_;
- }
- void set_minimum_visibility(bool minimum_visibility) {
- minimum_visibility_ = minimum_visibility;
- }
-
- // Gets/Sets the bounds of the window before it was moved by the auto window
- // management. As long as it was not auto-managed, it will return NULL.
- const gfx::Rect* pre_auto_manage_window_bounds() const {
- return pre_auto_manage_window_bounds_.get();
- }
- void SetPreAutoManageWindowBounds(const gfx::Rect& bounds);
-
- // Layout related properties
-
- void AddObserver(WindowStateObserver* observer);
- void RemoveObserver(WindowStateObserver* observer);
-
- // Whether the window is being dragged.
- bool is_dragged() const { return !!window_resizer_; }
-
- // Whether or not the window's position can be managed by the
- // auto management logic.
- bool window_position_managed() const { return window_position_managed_; }
- void set_window_position_managed(bool window_position_managed) {
- window_position_managed_ = window_position_managed;
- }
-
- // Whether or not the window's position or size was changed by a user.
- bool bounds_changed_by_user() const { return bounds_changed_by_user_; }
- void set_bounds_changed_by_user(bool bounds_changed_by_user) {
- bounds_changed_by_user_ = bounds_changed_by_user;
- }
-
- // True if this window is an attached panel.
- bool panel_attached() const {
- return panel_attached_;
- }
- void set_panel_attached(bool panel_attached) {
- panel_attached_ = panel_attached;
- }
-
- // Indicates that an in progress drag should be continued after the
- // window is reparented to another container.
- bool continue_drag_after_reparent() const {
- return continue_drag_after_reparent_;
- }
- void set_continue_drag_after_reparent(bool value) {
- continue_drag_after_reparent_ = value;
- }
-
- // True if the window is ignored by the shelf layout manager for
- // purposes of darkening the shelf.
- bool ignored_by_shelf() const { return ignored_by_shelf_; }
- void set_ignored_by_shelf(bool ignored_by_shelf) {
- ignored_by_shelf_ = ignored_by_shelf;
- }
-
- // True if the window should be offered a chance to consume special system
- // keys such as brightness, volume, etc. that are usually handled by the
- // shell.
- bool can_consume_system_keys() const { return can_consume_system_keys_; }
- void set_can_consume_system_keys(bool can_consume_system_keys) {
- can_consume_system_keys_ = can_consume_system_keys;
- }
-
- // True if this window has requested that the top-row keys (back, forward,
- // brightness, volume) should be treated as function keys.
- bool top_row_keys_are_function_keys() const {
- return top_row_keys_are_function_keys_;
- }
- void set_top_row_keys_are_function_keys(bool value) {
- top_row_keys_are_function_keys_ = value;
- }
-
- // Returns or sets a pointer to WindowResizer when resizing is active.
- // The pointer to a WindowResizer that is returned is set when a resizer gets
- // created and cleared when it gets destroyed. WindowState does not own the
- // |window_resizer_| instance and the resizer's lifetime is controlled
- // externally. It can be used to avoid creating multiple instances of a
- // WindowResizer for the same window.
- WindowResizer* window_resizer() const {
- return window_resizer_;
- }
- void set_window_resizer_(WindowResizer* window_resizer) {
- window_resizer_ = window_resizer;
- }
-
- // aura::WindowObserver overrides:
- virtual void OnWindowPropertyChanged(aura::Window* window,
- const void* key,
- intptr_t old) OVERRIDE;
-
- private:
- // Snaps the window to left or right of the desktop with given bounds.
- void SnapWindow(WindowShowType left_or_right,
- const gfx::Rect& bounds);
-
- // Sets the window show type and updates the show state if necessary.
- void SetWindowShowType(WindowShowType new_window_show_type);
-
- // The owner of this window settings.
- aura::Window* window_;
- scoped_ptr<WindowStateDelegate> delegate_;
-
- bool window_position_managed_;
- bool bounds_changed_by_user_;
- bool panel_attached_;
- bool continue_drag_after_reparent_;
- bool ignored_by_shelf_;
- bool can_consume_system_keys_;
- bool top_row_keys_are_function_keys_;
- WindowResizer* window_resizer_;
-
- bool always_restores_to_restore_bounds_;
- bool hide_shelf_when_fullscreen_;
- bool animate_to_fullscreen_;
- bool minimum_visibility_;
-
- // A property to remember the window position which was set before the
- // auto window position manager changed the window bounds, so that it can get
- // restored when only this one window gets shown.
- scoped_ptr<gfx::Rect> pre_auto_manage_window_bounds_;
-
- ObserverList<WindowStateObserver> observer_list_;
-
- // True when in SetWindowShowType(). This is used to avoid reentrance.
- bool in_set_window_show_type_;
-
- WindowShowType window_show_type_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowState);
-};
-
-// Returns the WindowState for active window. Returns |NULL|
-// if there is no active window.
-ASH_EXPORT WindowState* GetActiveWindowState();
-
-// Returns the WindowState for |window|. Creates WindowState
-// if it didn't exist. The settings object is owned by |window|.
-ASH_EXPORT WindowState* GetWindowState(aura::Window* window);
-
-// const version of GetWindowState.
-ASH_EXPORT const WindowState*
-GetWindowState(const aura::Window* window);
-
-} // namespace wm
-} // namespace ash
-
-#endif // ASH_WM_WINDOW_STATE_H_
diff --git a/chromium/ash/wm/window_state_delegate.cc b/chromium/ash/wm/window_state_delegate.cc
deleted file mode 100644
index 00040735ea4..00000000000
--- a/chromium/ash/wm/window_state_delegate.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/window_state_delegate.h"
-
-namespace ash {
-namespace wm {
-
-WindowStateDelegate::WindowStateDelegate() {
-}
-
-WindowStateDelegate::~WindowStateDelegate() {
-}
-
-bool WindowStateDelegate::ToggleFullscreen(WindowState* window_state) {
- return false;
-}
-
-} // namespace wm
-} // namespace ash
diff --git a/chromium/ash/wm/window_state_delegate.h b/chromium/ash/wm/window_state_delegate.h
deleted file mode 100644
index 53badcf415e..00000000000
--- a/chromium/ash/wm/window_state_delegate.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WINDOW_STATE_DELEGATE_H_
-#define ASH_WM_WINDOW_STATE_DELEGATE_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-
-namespace ash {
-namespace wm {
-class WindowState;
-
-class ASH_EXPORT WindowStateDelegate {
- public:
- WindowStateDelegate();
- virtual ~WindowStateDelegate();
-
- // Invoked when the user uses Shift+F4/F4 to toggle the window fullscreen
- // state. If the window is not fullscreen and the window supports immersive
- // fullscreen ToggleFullscreen() should put the window into immersive
- // fullscreen instead of the default fullscreen type. The caller
- // (ash::wm::WindowState) falls backs to the default implementation if this
- // returns false.
- virtual bool ToggleFullscreen(WindowState* window_state);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WindowStateDelegate);
-};
-
-} // namespace wm
-} // namespace ash
-
-#endif // ASH_WM_WINDOW_STATE_DELEGATE_H_
diff --git a/chromium/ash/wm/window_state_observer.h b/chromium/ash/wm/window_state_observer.h
deleted file mode 100644
index f177d5fbeba..00000000000
--- a/chromium/ash/wm/window_state_observer.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WINDOW_STATE_OBSERVER_H_
-#define ASH_WM_WINDOW_STATE_OBSERVER_H_
-
-#include "ash/ash_export.h"
-#include "ash/wm/wm_types.h"
-
-namespace ash {
-namespace wm {
-class WindowState;
-
-class ASH_EXPORT WindowStateObserver {
- public:
- // Called when the window's show type has changed. This is different from
- // kWindowShowStatekey property change as this will be invoked when the window
- // gets left/right maximized, and auto positioned. |old_type| is the value
- // before the change.
- virtual void OnWindowShowTypeChanged(WindowState* window_state,
- WindowShowType old_type) {}
-};
-
-} // namespace wm
-} // namespace ash
-
-#endif // ASH_WM_WINDOW_STATE_OBSERVER_H_
diff --git a/chromium/ash/wm/window_util.cc b/chromium/ash/wm/window_util.cc
deleted file mode 100644
index def4b6d5bad..00000000000
--- a/chromium/ash/wm/window_util.cc
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/window_util.h"
-
-#include <vector>
-
-#include "ash/ash_constants.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/wm/window_properties.h"
-#include "ash/wm/window_state.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/corewm/window_util.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace wm {
-
-// TODO(beng): replace many of these functions with the corewm versions.
-void ActivateWindow(aura::Window* window) {
- views::corewm::ActivateWindow(window);
-}
-
-void DeactivateWindow(aura::Window* window) {
- views::corewm::DeactivateWindow(window);
-}
-
-bool IsActiveWindow(aura::Window* window) {
- return views::corewm::IsActiveWindow(window);
-}
-
-aura::Window* GetActiveWindow() {
- return aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())->
- GetActiveWindow();
-}
-
-aura::Window* GetActivatableWindow(aura::Window* window) {
- return views::corewm::GetActivatableWindow(window);
-}
-
-bool CanActivateWindow(aura::Window* window) {
- return views::corewm::CanActivateWindow(window);
-}
-
-bool IsWindowMinimized(aura::Window* window) {
- return window->GetProperty(aura::client::kShowStateKey) ==
- ui::SHOW_STATE_MINIMIZED;
-}
-
-void CenterWindow(aura::Window* window) {
- wm::WindowState* window_state = wm::GetWindowState(window);
- if (!window_state->IsNormalShowState())
- return;
- const gfx::Display display =
- Shell::GetScreen()->GetDisplayNearestWindow(window);
- gfx::Rect center = display.work_area();
- gfx::Size size = window->bounds().size();
- if (window_state->IsSnapped()) {
- if (window_state->HasRestoreBounds())
- size = window_state->GetRestoreBoundsInScreen().size();
- center.ClampToCenteredSize(size);
- window_state->SetRestoreBoundsInScreen(center);
- window_state->Restore();
- } else {
- center = ScreenAsh::ConvertRectFromScreen(window->parent(),
- center);
- center.ClampToCenteredSize(size);
- window->SetBounds(center);
- }
-}
-
-void AdjustBoundsToEnsureMinimumWindowVisibility(const gfx::Rect& visible_area,
- gfx::Rect* bounds) {
- AdjustBoundsToEnsureWindowVisibility(
- visible_area, kMinimumOnScreenArea, kMinimumOnScreenArea, bounds);
-}
-
-void AdjustBoundsToEnsureWindowVisibility(const gfx::Rect& visible_area,
- int min_width,
- int min_height,
- gfx::Rect* bounds) {
- bounds->set_width(std::min(bounds->width(), visible_area.width()));
- bounds->set_height(std::min(bounds->height(), visible_area.height()));
-
- min_width = std::min(min_width, visible_area.width());
- min_height = std::min(min_height, visible_area.height());
-
- if (bounds->x() + min_width > visible_area.right()) {
- bounds->set_x(visible_area.right() - min_width);
- } else if (bounds->right() - min_width < 0) {
- bounds->set_x(min_width - bounds->width());
- }
- if (bounds->y() + min_height > visible_area.bottom()) {
- bounds->set_y(visible_area.bottom() - min_height);
- } else if (bounds->bottom() - min_height < 0) {
- bounds->set_y(min_height - bounds->height());
- }
- if (bounds->y() < 0)
- bounds->set_y(0);
-}
-
-bool MoveWindowToEventRoot(aura::Window* window, const ui::Event& event) {
- views::View* target = static_cast<views::View*>(event.target());
- if (!target)
- return false;
- aura::Window* target_root =
- target->GetWidget()->GetNativeView()->GetRootWindow();
- if (!target_root || target_root == window->GetRootWindow())
- return false;
- aura::Window* window_container =
- ash::Shell::GetContainer(target_root, window->parent()->id());
- // Move the window to the target launcher.
- window_container->AddChild(window);
- return true;
-}
-
-void ReparentChildWithTransientChildren(aura::Window* child,
- aura::Window* old_parent,
- aura::Window* new_parent) {
- if (child->parent() == old_parent)
- new_parent->AddChild(child);
- ReparentTransientChildrenOfChild(child, old_parent, new_parent);
-}
-
-void ReparentTransientChildrenOfChild(aura::Window* child,
- aura::Window* old_parent,
- aura::Window* new_parent) {
- for (size_t i = 0; i < child->transient_children().size(); ++i) {
- ReparentChildWithTransientChildren(child->transient_children()[i],
- old_parent,
- new_parent);
- }
-}
-
-} // namespace wm
-} // namespace ash
diff --git a/chromium/ash/wm/window_util.h b/chromium/ash/wm/window_util.h
deleted file mode 100644
index fd77505c400..00000000000
--- a/chromium/ash/wm/window_util.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WINDOW_UTIL_H_
-#define ASH_WM_WINDOW_UTIL_H_
-
-#include "ash/ash_export.h"
-#include "base/compiler_specific.h"
-#include "ui/base/ui_base_types.h"
-
-namespace aura {
-class Window;
-}
-
-namespace gfx {
-class Rect;
-}
-
-namespace ui {
-class Event;
-}
-
-namespace ash {
-// We force at least this many DIPs for any window on the screen.
-const int kMinimumOnScreenArea = 10;
-
-namespace wm {
-
-// Utility functions for window activation.
-ASH_EXPORT void ActivateWindow(aura::Window* window);
-ASH_EXPORT void DeactivateWindow(aura::Window* window);
-ASH_EXPORT bool IsActiveWindow(aura::Window* window);
-ASH_EXPORT aura::Window* GetActiveWindow();
-ASH_EXPORT bool CanActivateWindow(aura::Window* window);
-
-// Retrieves the activatable window for |window|. If |window| is activatable,
-// this will just return it, otherwise it will climb the parent/transient parent
-// chain looking for a window that is activatable, per the ActivationController.
-// If you're looking for a function to get the activatable "top level" window,
-// this is probably what you're looking for.
-ASH_EXPORT aura::Window* GetActivatableWindow(aura::Window* window);
-
-// TODO(oshima): remove this.
-ASH_EXPORT bool IsWindowMinimized(aura::Window* window);
-
-// Moves the window to the center of the display.
-ASH_EXPORT void CenterWindow(aura::Window* window);
-
-// Move the given bounds inside the given |visible_area| in parent coordinates,
-// including a safety margin given by |kMinimumOnScreenArea|.
-// This also ensures that the top of the bounds is visible.
-ASH_EXPORT void AdjustBoundsToEnsureMinimumWindowVisibility(
- const gfx::Rect& visible_area,
- gfx::Rect* bounds);
-
-// Move the given bounds inside the given |visible_area| in parent coordinates,
-// including a safety margin given by |min_width| and |min_height|.
-// This also ensures that the top of the bounds is visible.
-ASH_EXPORT void AdjustBoundsToEnsureWindowVisibility(
- const gfx::Rect& visible_area,
- int min_width,
- int min_height,
- gfx::Rect* bounds);
-
-// Moves |window| to the root window where the |event| occured if it is not
-// already in the same root window. Returns true if |window| was moved.
-ASH_EXPORT bool MoveWindowToEventRoot(aura::Window* window,
- const ui::Event& event);
-
-// Changes the parent of a |child| and all its transient children that are
-// themselves children of |old_parent| to |new_parent|.
-void ReparentChildWithTransientChildren(aura::Window* child,
- aura::Window* old_parent,
- aura::Window* new_parent);
-
-// Changes the parent of all transient children of a |child| to |new_parent|.
-// Does not change parent of the transient children that are not themselves
-// children of |old_parent|.
-void ReparentTransientChildrenOfChild(aura::Window* child,
- aura::Window* old_parent,
- aura::Window* new_parent);
-
-} // namespace wm
-} // namespace ash
-
-#endif // ASH_WM_WINDOW_UTIL_H_
diff --git a/chromium/ash/wm/window_util_unittest.cc b/chromium/ash/wm/window_util_unittest.cc
deleted file mode 100644
index 8073a38cc87..00000000000
--- a/chromium/ash/wm/window_util_unittest.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/window_util.h"
-
-#include "ash/screen_ash.h"
-#include "ash/test/ash_test_base.h"
-#include "ui/aura/window.h"
-
-namespace ash {
-
-typedef test::AshTestBase WindowUtilTest;
-
-TEST_F(WindowUtilTest, CenterWindow) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("500x400, 600x400");
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(12, 20, 100, 100)));
- wm::CenterWindow(window.get());
- EXPECT_EQ("200,126 100x100", window->bounds().ToString());
- EXPECT_EQ("200,126 100x100", window->GetBoundsInScreen().ToString());
- window->SetBoundsInScreen(gfx::Rect(600, 0, 100, 100),
- ScreenAsh::GetSecondaryDisplay());
- wm::CenterWindow(window.get());
- EXPECT_EQ("250,126 100x100", window->bounds().ToString());
- EXPECT_EQ("750,126 100x100", window->GetBoundsInScreen().ToString());
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/wm_types.cc b/chromium/ash/wm/wm_types.cc
deleted file mode 100644
index c7f45ce7cb3..00000000000
--- a/chromium/ash/wm/wm_types.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/wm_types.h"
-
-#include "base/basictypes.h"
-#include "base/logging.h"
-
-namespace ash {
-namespace wm {
-
-// This is to catch the change to WindowShowState.
-COMPILE_ASSERT(
- ui::SHOW_STATE_END == static_cast<ui::WindowShowState>(SHOW_TYPE_END),
- show_enum_mismatch);
-
-WindowShowType ToWindowShowType(ui::WindowShowState state) {
- return static_cast<WindowShowType>(state);
-}
-
-ui::WindowShowState ToWindowShowState(WindowShowType type) {
- switch (type) {
- case SHOW_TYPE_DEFAULT:
- return ui::SHOW_STATE_DEFAULT;
- case SHOW_TYPE_NORMAL:
- case SHOW_TYPE_RIGHT_SNAPPED:
- case SHOW_TYPE_LEFT_SNAPPED:
- case SHOW_TYPE_AUTO_POSITIONED:
- return ui::SHOW_STATE_NORMAL;
- case SHOW_TYPE_MINIMIZED:
- return ui::SHOW_STATE_MINIMIZED;
- case SHOW_TYPE_MAXIMIZED:
- return ui::SHOW_STATE_MAXIMIZED;
- case SHOW_TYPE_INACTIVE:
- return ui::SHOW_STATE_INACTIVE;
- case SHOW_TYPE_FULLSCREEN:
- return ui::SHOW_STATE_FULLSCREEN;
- case SHOW_TYPE_DETACHED:
- return ui::SHOW_STATE_DETACHED;
- case SHOW_TYPE_END:
- NOTREACHED();
- }
- NOTREACHED();
- return ui::SHOW_STATE_DEFAULT;
-}
-
-} // namespace wm
-} // namespace ash
diff --git a/chromium/ash/wm/wm_types.h b/chromium/ash/wm/wm_types.h
deleted file mode 100644
index da3db00bde1..00000000000
--- a/chromium/ash/wm/wm_types.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WM_TYPES_H_
-#define ASH_WM_WM_TYPES_H_
-
-#include "ui/base/ui_base_types.h"
-
-namespace ash {
-namespace wm {
-
-// This enum defines both common show state copied from
-// ui::WindowShowState as well as new states intoruduced in ash.
-// The separate enum is defined here because we don't want to leak
-// these type to ui/base until they're stable and we know for sure
-// that they'll persist over time.
-enum WindowShowType {
- // Common state
- SHOW_TYPE_DEFAULT = 0,
-
- // Normal represents a state where the position/size has been
- // specified by a use.
- SHOW_TYPE_NORMAL,
- SHOW_TYPE_MINIMIZED,
- SHOW_TYPE_MAXIMIZED,
- SHOW_TYPE_INACTIVE,
- SHOW_TYPE_FULLSCREEN,
- SHOW_TYPE_DETACHED,
- SHOW_TYPE_END, // to avoid using SHOW_STATE_END
-
- // Ash specific states:
-
- SHOW_TYPE_LEFT_SNAPPED,
- SHOW_TYPE_RIGHT_SNAPPED,
-
- // A window is in this state when it is automatically placed and
- // sized by the window manager. (it's newly opened, or pushed to the side
- // due to new window, for example).
- SHOW_TYPE_AUTO_POSITIONED,
-};
-
-// Utility functions to convert WindowShowType <-> ui::WindowShowState.
-// Note: LEFT/RIGHT MAXIMIZED, AUTO_POSITIONED type will be lost when
-// converting to ui::WindowShowState.
-WindowShowType ToWindowShowType(ui::WindowShowState state);
-ui::WindowShowState ToWindowShowState(WindowShowType type);
-
-} // namespace
-} // namespace
-
-#endif // ASH_WM_WM_TYPES_H_
diff --git a/chromium/ash/wm/workspace/magnetism_matcher.cc b/chromium/ash/wm/workspace/magnetism_matcher.cc
deleted file mode 100644
index e7d674b850c..00000000000
--- a/chromium/ash/wm/workspace/magnetism_matcher.cc
+++ /dev/null
@@ -1,194 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/workspace/magnetism_matcher.h"
-
-#include <algorithm>
-#include <cmath>
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-// Returns true if |a| is close enough to |b| that the two edges snap.
-bool IsCloseEnough(int a, int b) {
- return abs(a - b) <= MagnetismMatcher::kMagneticDistance;
-}
-
-// Returns true if the specified SecondaryMagnetismEdge can be matched with a
-// primary edge of |primary|. |edges| is a bitmask of the allowed
-// MagnetismEdges.
-bool CanMatchSecondaryEdge(MagnetismEdge primary,
- SecondaryMagnetismEdge secondary,
- uint32 edges) {
- // Convert |secondary| to a MagnetismEdge so we can compare it to |edges|.
- MagnetismEdge secondary_as_magnetism_edge = MAGNETISM_EDGE_TOP;
- switch (primary) {
- case MAGNETISM_EDGE_TOP:
- case MAGNETISM_EDGE_BOTTOM:
- if (secondary == SECONDARY_MAGNETISM_EDGE_LEADING)
- secondary_as_magnetism_edge = MAGNETISM_EDGE_LEFT;
- else if (secondary == SECONDARY_MAGNETISM_EDGE_TRAILING)
- secondary_as_magnetism_edge = MAGNETISM_EDGE_RIGHT;
- else
- NOTREACHED();
- break;
- case MAGNETISM_EDGE_LEFT:
- case MAGNETISM_EDGE_RIGHT:
- if (secondary == SECONDARY_MAGNETISM_EDGE_LEADING)
- secondary_as_magnetism_edge = MAGNETISM_EDGE_TOP;
- else if (secondary == SECONDARY_MAGNETISM_EDGE_TRAILING)
- secondary_as_magnetism_edge = MAGNETISM_EDGE_BOTTOM;
- else
- NOTREACHED();
- break;
- }
- return (edges & secondary_as_magnetism_edge) != 0;
-}
-
-} // namespace
-
-// MagnetismEdgeMatcher --------------------------------------------------------
-
-MagnetismEdgeMatcher::MagnetismEdgeMatcher(const gfx::Rect& bounds,
- MagnetismEdge edge)
- : bounds_(bounds),
- edge_(edge) {
- ranges_.push_back(GetSecondaryRange(bounds_));
-}
-
-MagnetismEdgeMatcher::~MagnetismEdgeMatcher() {
-}
-
-bool MagnetismEdgeMatcher::ShouldAttach(const gfx::Rect& bounds) {
- if (is_edge_obscured())
- return false;
-
- if (IsCloseEnough(GetPrimaryCoordinate(bounds_, edge_),
- GetPrimaryCoordinate(bounds, FlipEdge(edge_)))) {
- const Range range(GetSecondaryRange(bounds));
- Ranges::const_iterator i =
- std::lower_bound(ranges_.begin(), ranges_.end(), range);
- // Close enough, but only attach if some portion of the edge is visible.
- if ((i != ranges_.begin() && RangesIntersect(*(i - 1), range)) ||
- (i != ranges_.end() && RangesIntersect(*i, range))) {
- return true;
- }
- }
- // NOTE: this checks against the current bounds, we may want to allow some
- // flexibility here.
- const Range primary_range(GetPrimaryRange(bounds));
- if (primary_range.first <= GetPrimaryCoordinate(bounds_, edge_) &&
- primary_range.second >= GetPrimaryCoordinate(bounds_, edge_)) {
- UpdateRanges(GetSecondaryRange(bounds));
- }
- return false;
-}
-
-void MagnetismEdgeMatcher::UpdateRanges(const Range& range) {
- Ranges::const_iterator it =
- std::lower_bound(ranges_.begin(), ranges_.end(), range);
- if (it != ranges_.begin() && RangesIntersect(*(it - 1), range))
- --it;
- if (it == ranges_.end())
- return;
-
- for (size_t i = it - ranges_.begin();
- i < ranges_.size() && RangesIntersect(ranges_[i], range); ) {
- if (range.first <= ranges_[i].first &&
- range.second >= ranges_[i].second) {
- ranges_.erase(ranges_.begin() + i);
- } else if (range.first < ranges_[i].first) {
- DCHECK_GT(range.second, ranges_[i].first);
- ranges_[i] = Range(range.second, ranges_[i].second);
- ++i;
- } else {
- Range existing(ranges_[i]);
- ranges_[i].second = range.first;
- ++i;
- if (existing.second > range.second) {
- ranges_.insert(ranges_.begin() + i,
- Range(range.second, existing.second));
- ++i;
- }
- }
- }
-}
-
-// MagnetismMatcher ------------------------------------------------------------
-
-// static
-const int MagnetismMatcher::kMagneticDistance = 8;
-
-MagnetismMatcher::MagnetismMatcher(const gfx::Rect& bounds, uint32 edges)
- : edges_(edges) {
- if (edges & MAGNETISM_EDGE_TOP)
- matchers_.push_back(new MagnetismEdgeMatcher(bounds, MAGNETISM_EDGE_TOP));
- if (edges & MAGNETISM_EDGE_LEFT)
- matchers_.push_back(new MagnetismEdgeMatcher(bounds, MAGNETISM_EDGE_LEFT));
- if (edges & MAGNETISM_EDGE_BOTTOM) {
- matchers_.push_back(new MagnetismEdgeMatcher(bounds,
- MAGNETISM_EDGE_BOTTOM));
- }
- if (edges & MAGNETISM_EDGE_RIGHT)
- matchers_.push_back(new MagnetismEdgeMatcher(bounds, MAGNETISM_EDGE_RIGHT));
-}
-
-MagnetismMatcher::~MagnetismMatcher() {
-}
-
-bool MagnetismMatcher::ShouldAttach(const gfx::Rect& bounds,
- MatchedEdge* edge) {
- for (size_t i = 0; i < matchers_.size(); ++i) {
- if (matchers_[i]->ShouldAttach(bounds)) {
- edge->primary_edge = matchers_[i]->edge();
- AttachToSecondaryEdge(bounds, edge->primary_edge,
- &(edge->secondary_edge));
- return true;
- }
- }
- return false;
-}
-
-bool MagnetismMatcher::AreEdgesObscured() const {
- for (size_t i = 0; i < matchers_.size(); ++i) {
- if (!matchers_[i]->is_edge_obscured())
- return false;
- }
- return true;
-}
-
-void MagnetismMatcher::AttachToSecondaryEdge(
- const gfx::Rect& bounds,
- MagnetismEdge edge,
- SecondaryMagnetismEdge* secondary_edge) const {
- const gfx::Rect& src_bounds(matchers_[0]->bounds());
- if (edge == MAGNETISM_EDGE_LEFT || edge == MAGNETISM_EDGE_RIGHT) {
- if (CanMatchSecondaryEdge(edge, SECONDARY_MAGNETISM_EDGE_LEADING, edges_) &&
- IsCloseEnough(bounds.y(), src_bounds.y())) {
- *secondary_edge = SECONDARY_MAGNETISM_EDGE_LEADING;
- } else if (CanMatchSecondaryEdge(edge, SECONDARY_MAGNETISM_EDGE_TRAILING,
- edges_) &&
- IsCloseEnough(bounds.bottom(), src_bounds.bottom())) {
- *secondary_edge = SECONDARY_MAGNETISM_EDGE_TRAILING;
- } else {
- *secondary_edge = SECONDARY_MAGNETISM_EDGE_NONE;
- }
- } else {
- if (CanMatchSecondaryEdge(edge, SECONDARY_MAGNETISM_EDGE_LEADING, edges_) &&
- IsCloseEnough(bounds.x(), src_bounds.x())) {
- *secondary_edge = SECONDARY_MAGNETISM_EDGE_LEADING;
- } else if (CanMatchSecondaryEdge(edge, SECONDARY_MAGNETISM_EDGE_TRAILING,
- edges_) &&
- IsCloseEnough(bounds.right(), src_bounds.right())) {
- *secondary_edge = SECONDARY_MAGNETISM_EDGE_TRAILING;
- } else {
- *secondary_edge = SECONDARY_MAGNETISM_EDGE_NONE;
- }
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/workspace/magnetism_matcher.h b/chromium/ash/wm/workspace/magnetism_matcher.h
deleted file mode 100644
index ff1f52810e9..00000000000
--- a/chromium/ash/wm/workspace/magnetism_matcher.h
+++ /dev/null
@@ -1,191 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WORKSPACE_MAGNETISM_MATCHER_H_
-#define ASH_WM_WORKSPACE_MAGNETISM_MATCHER_H_
-
-#include <utility>
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "base/compiler_specific.h"
-#include "base/logging.h"
-#include "base/memory/scoped_vector.h"
-#include "ui/gfx/rect.h"
-
-namespace ash {
-namespace internal {
-
-enum MagnetismEdge {
- MAGNETISM_EDGE_TOP = 1 << 0,
- MAGNETISM_EDGE_LEFT = 1 << 1,
- MAGNETISM_EDGE_BOTTOM = 1 << 2,
- MAGNETISM_EDGE_RIGHT = 1 << 3,
-};
-
-const uint32 kAllMagnetismEdges =
- MAGNETISM_EDGE_TOP | MAGNETISM_EDGE_LEFT | MAGNETISM_EDGE_BOTTOM |
- MAGNETISM_EDGE_RIGHT;
-
-// MagnetismEdgeMatcher is used for matching a particular edge of a window. You
-// shouldn't need to use this directly, instead use MagnetismMatcher which takes
-// care of all edges.
-// MagnetismEdgeMatcher maintains a range of the visible portions of the
-// edge. As ShouldAttach() is invoked the visible range is updated.
-class MagnetismEdgeMatcher {
- public:
- MagnetismEdgeMatcher(const gfx::Rect& bounds, MagnetismEdge edge);
- ~MagnetismEdgeMatcher();
-
- MagnetismEdge edge() const { return edge_; }
- const gfx::Rect& bounds() const { return bounds_; }
-
- // Returns true if the edge is completely obscured. If true ShouldAttach()
- // will return false.
- bool is_edge_obscured() const { return ranges_.empty(); }
-
- // Returns true if should attach to the specified bounds.
- bool ShouldAttach(const gfx::Rect& bounds);
-
- private:
- typedef std::pair<int,int> Range;
- typedef std::vector<Range> Ranges;
-
- // Removes |range| from |ranges_|.
- void UpdateRanges(const Range& range);
-
- static int GetPrimaryCoordinate(const gfx::Rect& bounds, MagnetismEdge edge) {
- switch (edge) {
- case MAGNETISM_EDGE_TOP:
- return bounds.y();
- case MAGNETISM_EDGE_LEFT:
- return bounds.x();
- case MAGNETISM_EDGE_BOTTOM:
- return bounds.bottom();
- case MAGNETISM_EDGE_RIGHT:
- return bounds.right();
- }
- NOTREACHED();
- return 0;
- }
-
- static MagnetismEdge FlipEdge(MagnetismEdge edge) {
- switch (edge) {
- case MAGNETISM_EDGE_TOP:
- return MAGNETISM_EDGE_BOTTOM;
- case MAGNETISM_EDGE_BOTTOM:
- return MAGNETISM_EDGE_TOP;
- case MAGNETISM_EDGE_LEFT:
- return MAGNETISM_EDGE_RIGHT;
- case MAGNETISM_EDGE_RIGHT:
- return MAGNETISM_EDGE_LEFT;
- }
- NOTREACHED();
- return MAGNETISM_EDGE_LEFT;
- }
-
- Range GetPrimaryRange(const gfx::Rect& bounds) const {
- switch (edge_) {
- case MAGNETISM_EDGE_TOP:
- case MAGNETISM_EDGE_BOTTOM:
- return Range(bounds.y(), bounds.bottom());
- case MAGNETISM_EDGE_LEFT:
- case MAGNETISM_EDGE_RIGHT:
- return Range(bounds.x(), bounds.right());
- }
- NOTREACHED();
- return Range();
- }
-
- Range GetSecondaryRange(const gfx::Rect& bounds) const {
- switch (edge_) {
- case MAGNETISM_EDGE_TOP:
- case MAGNETISM_EDGE_BOTTOM:
- return Range(bounds.x(), bounds.right());
- case MAGNETISM_EDGE_LEFT:
- case MAGNETISM_EDGE_RIGHT:
- return Range(bounds.y(), bounds.bottom());
- }
- NOTREACHED();
- return Range();
- }
-
- static bool RangesIntersect(const Range& r1, const Range& r2) {
- return r2.first < r1.second && r2.second > r1.first;
- }
-
- // The bounds of window.
- const gfx::Rect bounds_;
-
- // The edge this matcher checks.
- const MagnetismEdge edge_;
-
- // Visible ranges of the edge. Initialized with GetSecondaryRange() and
- // updated as ShouldAttach() is invoked. When empty the edge is completely
- // obscured by other bounds.
- Ranges ranges_;
-
- DISALLOW_COPY_AND_ASSIGN(MagnetismEdgeMatcher);
-};
-
-enum SecondaryMagnetismEdge {
- SECONDARY_MAGNETISM_EDGE_LEADING,
- SECONDARY_MAGNETISM_EDGE_TRAILING,
- SECONDARY_MAGNETISM_EDGE_NONE,
-};
-
-// Used to identify a matched edge. |primary_edge| is relative to the source and
-// indicates the edge the two are to share. For example, if |primary_edge| is
-// MAGNETISM_EDGE_RIGHT then the right edge of the source should snap to to the
-// left edge of the target. |secondary_edge| indicates one of the edges along
-// the opposite axis should should also be aligned. For example, if
-// |primary_edge| is MAGNETISM_EDGE_RIGHT and |secondary_edge| is
-// SECONDARY_MAGNETISM_EDGE_LEADING then the source should snap to the left top
-// corner of the target.
-struct MatchedEdge {
- MagnetismEdge primary_edge;
- SecondaryMagnetismEdge secondary_edge;
-};
-
-// MagnetismMatcher is used to test if a window should snap to another window.
-// To use MagnetismMatcher do the following:
-// . Create it with the bounds of the window being dragged.
-// . Iterate over the child windows checking if the window being dragged should
-// attach to it using ShouldAttach().
-// . Use AreEdgesObscured() to test if no other windows can match (because all
-// edges are completely obscured).
-class ASH_EXPORT MagnetismMatcher {
- public:
- static const int kMagneticDistance;
-
- // |edges| is a bitmask of MagnetismEdges to match against.
- MagnetismMatcher(const gfx::Rect& bounds, uint32 edges);
- ~MagnetismMatcher();
-
- // Returns true if |bounds| is close enough to the initial bounds that the two
- // should be attached. If true is returned |edge| is set to indicates how the
- // two should snap together. See description of MatchedEdge for details.
- bool ShouldAttach(const gfx::Rect& bounds, MatchedEdge* edge);
-
- // Returns true if no other matches are possible.
- bool AreEdgesObscured() const;
-
- private:
- // Sets |secondary_edge| based on whether the secondary edges should snap.
- void AttachToSecondaryEdge(const gfx::Rect& bounds,
- MagnetismEdge edge,
- SecondaryMagnetismEdge* secondary_edge) const;
-
- // The edges to match against.
- const int32 edges_;
-
- ScopedVector<MagnetismEdgeMatcher> matchers_;
-
- DISALLOW_COPY_AND_ASSIGN(MagnetismMatcher);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_WORKSPACE_MAGNETISM_MATCHER_H_
diff --git a/chromium/ash/wm/workspace/magnetism_matcher_unittest.cc b/chromium/ash/wm/workspace/magnetism_matcher_unittest.cc
deleted file mode 100644
index 054622ff572..00000000000
--- a/chromium/ash/wm/workspace/magnetism_matcher_unittest.cc
+++ /dev/null
@@ -1,171 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/workspace/magnetism_matcher.h"
-
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace ash {
-namespace internal {
-
-// Trivial test case verifying assertions on left edge.
-TEST(MagnetismMatcherTest, TrivialLeft) {
- const int distance = MagnetismMatcher::kMagneticDistance;
- const gfx::Rect initial_bounds(20, 10, 50, 60);
- MagnetismMatcher matcher(initial_bounds, kAllMagnetismEdges);
- EXPECT_FALSE(matcher.AreEdgesObscured());
- MatchedEdge edge;
- EXPECT_FALSE(matcher.ShouldAttach(
- gfx::Rect(initial_bounds.x() - distance - 10,
- initial_bounds.y() - distance - 10, 2, 3), &edge));
- EXPECT_FALSE(matcher.AreEdgesObscured());
- EXPECT_TRUE(matcher.ShouldAttach(
- gfx::Rect(initial_bounds.x() - 2, initial_bounds.y(), 1, 1),
- &edge));
- EXPECT_EQ(MAGNETISM_EDGE_LEFT, edge.primary_edge);
- EXPECT_EQ(SECONDARY_MAGNETISM_EDGE_LEADING, edge.secondary_edge);
-
- EXPECT_TRUE(matcher.ShouldAttach(
- gfx::Rect(initial_bounds.x() - 2,
- initial_bounds.y() + distance + 1 , 1, 1),
- &edge));
- EXPECT_EQ(MAGNETISM_EDGE_LEFT, edge.primary_edge);
- EXPECT_EQ(SECONDARY_MAGNETISM_EDGE_NONE, edge.secondary_edge);
-}
-
-// Trivial test case verifying assertions on bottom edge.
-TEST(MagnetismMatcherTest, TrivialBottom) {
- const int distance = MagnetismMatcher::kMagneticDistance;
- const gfx::Rect initial_bounds(20, 10, 50, 60);
- MagnetismMatcher matcher(initial_bounds, kAllMagnetismEdges);
- EXPECT_FALSE(matcher.AreEdgesObscured());
- MatchedEdge edge;
- EXPECT_FALSE(matcher.ShouldAttach(
- gfx::Rect(initial_bounds.x() - distance - 10,
- initial_bounds.y() - distance - 10, 2, 3), &edge));
- EXPECT_FALSE(matcher.AreEdgesObscured());
- EXPECT_TRUE(matcher.ShouldAttach(
- gfx::Rect(initial_bounds.x() - 2,
- initial_bounds.bottom() + 4, 10, 1), &edge));
- EXPECT_EQ(MAGNETISM_EDGE_BOTTOM, edge.primary_edge);
- EXPECT_EQ(SECONDARY_MAGNETISM_EDGE_LEADING, edge.secondary_edge);
-
- EXPECT_TRUE(matcher.ShouldAttach(
- gfx::Rect(initial_bounds.x() + distance + 1,
- initial_bounds.bottom() + 4, 10, 1), &edge));
- EXPECT_EQ(MAGNETISM_EDGE_BOTTOM, edge.primary_edge);
- EXPECT_EQ(SECONDARY_MAGNETISM_EDGE_NONE, edge.secondary_edge);
-
- EXPECT_TRUE(matcher.ShouldAttach(
- gfx::Rect(initial_bounds.right() - 10 - 1,
- initial_bounds.bottom() + 4, 10, 1), &edge));
- EXPECT_EQ(MAGNETISM_EDGE_BOTTOM, edge.primary_edge);
- EXPECT_EQ(SECONDARY_MAGNETISM_EDGE_TRAILING, edge.secondary_edge);
-}
-
-// Verifies we don't match an obscured corner.
-TEST(MagnetismMatcherTest, ObscureLeading) {
- const int distance = MagnetismMatcher::kMagneticDistance;
- const gfx::Rect initial_bounds(20, 10, 150, 160);
- MagnetismMatcher matcher(initial_bounds, kAllMagnetismEdges);
- MatchedEdge edge;
- // Overlap with the upper right corner.
- EXPECT_FALSE(matcher.ShouldAttach(
- gfx::Rect(initial_bounds.right() - distance * 2,
- initial_bounds.y() - distance - 2,
- distance * 3,
- (distance + 2) * 2), &edge));
- EXPECT_FALSE(matcher.AreEdgesObscured());
- // Verify doesn't match the following which is obscured by first.
- EXPECT_FALSE(matcher.ShouldAttach(
- gfx::Rect(initial_bounds.right() + 1,
- initial_bounds.y(),
- distance,
- 5), &edge));
- // Should match the following which extends into non-overlapping region.
- EXPECT_TRUE(matcher.ShouldAttach(
- gfx::Rect(initial_bounds.right() + 1,
- initial_bounds.y() + distance + 1,
- distance,
- 15), &edge));
- EXPECT_EQ(MAGNETISM_EDGE_RIGHT, edge.primary_edge);
- EXPECT_EQ(SECONDARY_MAGNETISM_EDGE_NONE, edge.secondary_edge);
-}
-
-// Verifies obscuring one side doesn't obscure the other.
-TEST(MagnetismMatcherTest, DontObscureOtherSide) {
- const int distance = MagnetismMatcher::kMagneticDistance;
- const gfx::Rect initial_bounds(20, 10, 150, 160);
- MagnetismMatcher matcher(initial_bounds, kAllMagnetismEdges);
- MatchedEdge edge;
- // Overlap with the left side.
- EXPECT_FALSE(matcher.ShouldAttach(
- gfx::Rect(initial_bounds.x() - distance + 1,
- initial_bounds.y() + 2,
- distance * 2 + 2,
- initial_bounds.height() + distance * 4), &edge));
- EXPECT_FALSE(matcher.AreEdgesObscured());
- // Should match the right side since it isn't obscured.
- EXPECT_TRUE(matcher.ShouldAttach(
- gfx::Rect(initial_bounds.right() - 1,
- initial_bounds.y() + distance + 1,
- distance,
- 5), &edge));
- EXPECT_EQ(MAGNETISM_EDGE_RIGHT, edge.primary_edge);
- EXPECT_EQ(SECONDARY_MAGNETISM_EDGE_NONE, edge.secondary_edge);
-}
-
-// Verifies we don't match an obscured center.
-TEST(MagnetismMatcherTest, ObscureCenter) {
- const int distance = MagnetismMatcher::kMagneticDistance;
- const gfx::Rect initial_bounds(20, 10, 150, 160);
- MagnetismMatcher matcher(initial_bounds, kAllMagnetismEdges);
- MatchedEdge edge;
- // Overlap with the center bottom edge.
- EXPECT_FALSE(matcher.ShouldAttach(
- gfx::Rect(100, initial_bounds.bottom() - distance - 2,
- 20,
- (distance + 2) * 2), &edge));
- EXPECT_FALSE(matcher.AreEdgesObscured());
- // Verify doesn't match the following which is obscured by first.
- EXPECT_FALSE(matcher.ShouldAttach(
- gfx::Rect(110, initial_bounds.bottom() + 1,
- 10, 5), &edge));
- // Should match the following which extends into non-overlapping region.
- EXPECT_TRUE(matcher.ShouldAttach(
- gfx::Rect(90,
- initial_bounds.bottom() + 1,
- 10, 5), &edge));
- EXPECT_EQ(MAGNETISM_EDGE_BOTTOM, edge.primary_edge);
- EXPECT_EQ(SECONDARY_MAGNETISM_EDGE_NONE, edge.secondary_edge);
-}
-
-// Verifies we don't match an obscured trailing edge.
-TEST(MagnetismMatcherTest, ObscureTrailing) {
- const int distance = MagnetismMatcher::kMagneticDistance;
- const gfx::Rect initial_bounds(20, 10, 150, 160);
- MagnetismMatcher matcher(initial_bounds, kAllMagnetismEdges);
- MatchedEdge edge;
- // Overlap with the trailing left edge.
- EXPECT_FALSE(matcher.ShouldAttach(
- gfx::Rect(initial_bounds.x() - distance - 2,
- 150,
- (distance + 2) * 2,
- 50), &edge));
- EXPECT_FALSE(matcher.AreEdgesObscured());
- // Verify doesn't match the following which is obscured by first.
- EXPECT_FALSE(matcher.ShouldAttach(
- gfx::Rect(initial_bounds.x() - 4,
- 160, 3, 20), &edge));
- // Should match the following which extends into non-overlapping region.
- EXPECT_TRUE(matcher.ShouldAttach(
- gfx::Rect(initial_bounds.x() - 4,
- 140, 3, 20), &edge));
- EXPECT_EQ(MAGNETISM_EDGE_LEFT, edge.primary_edge);
- EXPECT_EQ(SECONDARY_MAGNETISM_EDGE_NONE, edge.secondary_edge);
-}
-
-} // namespace internal
-} // namespace ash
-
diff --git a/chromium/ash/wm/workspace/multi_window_resize_controller.cc b/chromium/ash/wm/workspace/multi_window_resize_controller.cc
deleted file mode 100644
index 597acbf88ec..00000000000
--- a/chromium/ash/wm/workspace/multi_window_resize_controller.cc
+++ /dev/null
@@ -1,545 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/workspace/multi_window_resize_controller.h"
-
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ash/wm/window_animations.h"
-#include "ash/wm/workspace/workspace_event_handler.h"
-#include "ash/wm/workspace/workspace_window_resizer.h"
-#include "grit/ash_resources.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/image/image.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/corewm/compound_event_filter.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-using aura::Window;
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-// Delay before showing.
-const int kShowDelayMS = 400;
-
-// Delay before hiding.
-const int kHideDelayMS = 500;
-
-// Padding from the bottom/right edge the resize widget is shown at.
-const int kResizeWidgetPadding = 15;
-
-bool ContainsX(Window* window, int x) {
- return window->bounds().x() <= x && window->bounds().right() >= x;
-}
-
-bool ContainsY(Window* window, int y) {
- return window->bounds().y() <= y && window->bounds().bottom() >= y;
-}
-
-bool Intersects(int x1, int max_1, int x2, int max_2) {
- return x2 <= max_1 && max_2 > x1;
-}
-
-} // namespace
-
-// View contained in the widget. Passes along mouse events to the
-// MultiWindowResizeController so that it can start/stop the resize loop.
-class MultiWindowResizeController::ResizeView : public views::View {
- public:
- explicit ResizeView(MultiWindowResizeController* controller,
- Direction direction)
- : controller_(controller),
- direction_(direction),
- image_(NULL) {
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- int image_id =
- direction == TOP_BOTTOM ? IDR_AURA_MULTI_WINDOW_RESIZE_H :
- IDR_AURA_MULTI_WINDOW_RESIZE_V;
- image_ = rb.GetImageNamed(image_id).ToImageSkia();
- }
-
- // views::View overrides:
- virtual gfx::Size GetPreferredSize() OVERRIDE {
- return gfx::Size(image_->width(), image_->height());
- }
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- canvas->DrawImageInt(*image_, 0, 0);
- }
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE {
- gfx::Point location(event.location());
- views::View::ConvertPointToScreen(this, &location);
- controller_->StartResize(location);
- return true;
- }
- virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE {
- gfx::Point location(event.location());
- views::View::ConvertPointToScreen(this, &location);
- controller_->Resize(location, event.flags());
- return true;
- }
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE {
- controller_->CompleteResize(event.flags());
- }
- virtual void OnMouseCaptureLost() OVERRIDE {
- controller_->CancelResize();
- }
- virtual gfx::NativeCursor GetCursor(
- const ui::MouseEvent& event) OVERRIDE {
- int component = (direction_ == LEFT_RIGHT) ? HTRIGHT : HTBOTTOM;
- return views::corewm::CompoundEventFilter::CursorForWindowComponent(
- component);
- }
-
- private:
- MultiWindowResizeController* controller_;
- const Direction direction_;
- const gfx::ImageSkia* image_;
-
- DISALLOW_COPY_AND_ASSIGN(ResizeView);
-};
-
-// MouseWatcherHost implementation for MultiWindowResizeController. Forwards
-// Contains() to MultiWindowResizeController.
-class MultiWindowResizeController::ResizeMouseWatcherHost :
- public views::MouseWatcherHost {
- public:
- ResizeMouseWatcherHost(MultiWindowResizeController* host) : host_(host) {}
-
- // MouseWatcherHost overrides:
- virtual bool Contains(const gfx::Point& point_in_screen,
- MouseEventType type) OVERRIDE {
- return host_->IsOverWindows(point_in_screen);
- }
-
- private:
- MultiWindowResizeController* host_;
-
- DISALLOW_COPY_AND_ASSIGN(ResizeMouseWatcherHost);
-};
-
-MultiWindowResizeController::ResizeWindows::ResizeWindows()
- : window1(NULL),
- window2(NULL),
- direction(TOP_BOTTOM){
-}
-
-MultiWindowResizeController::ResizeWindows::~ResizeWindows() {
-}
-
-bool MultiWindowResizeController::ResizeWindows::Equals(
- const ResizeWindows& other) const {
- return window1 == other.window1 &&
- window2 == other.window2 &&
- direction == other.direction;
-}
-
-MultiWindowResizeController::MultiWindowResizeController() {
-}
-
-MultiWindowResizeController::~MultiWindowResizeController() {
- window_resizer_.reset();
- Hide();
-}
-
-void MultiWindowResizeController::Show(Window* window,
- int component,
- const gfx::Point& point_in_window) {
- // When the resize widget is showing we ignore Show() requests. Instead we
- // only care about mouse movements from MouseWatcher. This is necessary as
- // WorkspaceEventHandler only sees mouse movements over the windows, not all
- // windows or over the desktop.
- if (resize_widget_)
- return;
-
- ResizeWindows windows(DetermineWindows(window, component, point_in_window));
- if (IsShowing()) {
- if (windows_.Equals(windows))
- return; // Over the same windows.
- DelayedHide();
- }
-
- if (!windows.is_valid())
- return;
- Hide();
- windows_ = windows;
- windows_.window1->AddObserver(this);
- windows_.window2->AddObserver(this);
- show_location_in_parent_ = point_in_window;
- Window::ConvertPointToTarget(
- window, window->parent(), &show_location_in_parent_);
- if (show_timer_.IsRunning())
- return;
- show_timer_.Start(
- FROM_HERE, base::TimeDelta::FromMilliseconds(kShowDelayMS),
- this, &MultiWindowResizeController::ShowIfValidMouseLocation);
-}
-
-void MultiWindowResizeController::Hide() {
- hide_timer_.Stop();
- if (window_resizer_)
- return; // Ignore hides while actively resizing.
-
- if (windows_.window1) {
- windows_.window1->RemoveObserver(this);
- windows_.window1 = NULL;
- }
- if (windows_.window2) {
- windows_.window2->RemoveObserver(this);
- windows_.window2 = NULL;
- }
-
- show_timer_.Stop();
-
- if (!resize_widget_)
- return;
-
- for (size_t i = 0; i < windows_.other_windows.size(); ++i)
- windows_.other_windows[i]->RemoveObserver(this);
- mouse_watcher_.reset();
- resize_widget_.reset();
- windows_ = ResizeWindows();
-}
-
-void MultiWindowResizeController::MouseMovedOutOfHost() {
- Hide();
-}
-
-void MultiWindowResizeController::OnWindowDestroying(
- aura::Window* window) {
- // Have to explicitly reset the WindowResizer, otherwise Hide() does nothing.
- window_resizer_.reset();
- Hide();
-}
-
-MultiWindowResizeController::ResizeWindows
-MultiWindowResizeController::DetermineWindowsFromScreenPoint(
- aura::Window* window) const {
- gfx::Point mouse_location(
- gfx::Screen::GetScreenFor(window)->GetCursorScreenPoint());
- wm::ConvertPointFromScreen(window, &mouse_location);
- const int component =
- window->delegate()->GetNonClientComponent(mouse_location);
- return DetermineWindows(window, component, mouse_location);
-}
-
-MultiWindowResizeController::ResizeWindows
-MultiWindowResizeController::DetermineWindows(
- Window* window,
- int window_component,
- const gfx::Point& point) const {
- ResizeWindows result;
- gfx::Point point_in_parent(point);
- Window::ConvertPointToTarget(window, window->parent(), &point_in_parent);
- switch (window_component) {
- case HTRIGHT:
- result.direction = LEFT_RIGHT;
- result.window1 = window;
- result.window2 = FindWindowByEdge(
- window, HTLEFT, window->bounds().right(), point_in_parent.y());
- break;
- case HTLEFT:
- result.direction = LEFT_RIGHT;
- result.window1 = FindWindowByEdge(
- window, HTRIGHT, window->bounds().x(), point_in_parent.y());
- result.window2 = window;
- break;
- case HTTOP:
- result.direction = TOP_BOTTOM;
- result.window1 = FindWindowByEdge(
- window, HTBOTTOM, point_in_parent.x(), window->bounds().y());
- result.window2 = window;
- break;
- case HTBOTTOM:
- result.direction = TOP_BOTTOM;
- result.window1 = window;
- result.window2 = FindWindowByEdge(
- window, HTTOP, point_in_parent.x(), window->bounds().bottom());
- break;
- default:
- break;
- }
- return result;
-}
-
-Window* MultiWindowResizeController::FindWindowByEdge(
- Window* window_to_ignore,
- int edge_want,
- int x,
- int y) const {
- Window* parent = window_to_ignore->parent();
- const Window::Windows& windows(parent->children());
- for (Window::Windows::const_reverse_iterator i = windows.rbegin();
- i != windows.rend(); ++i) {
- Window* window = *i;
- if (window == window_to_ignore || !window->IsVisible())
- continue;
- switch (edge_want) {
- case HTLEFT:
- if (ContainsY(window, y) && window->bounds().x() == x)
- return window;
- break;
- case HTRIGHT:
- if (ContainsY(window, y) && window->bounds().right() == x)
- return window;
- break;
- case HTTOP:
- if (ContainsX(window, x) && window->bounds().y() == y)
- return window;
- break;
- case HTBOTTOM:
- if (ContainsX(window, x) && window->bounds().bottom() == y)
- return window;
- break;
- default:
- NOTREACHED();
- }
- // Window doesn't contain the edge, but if window contains |point|
- // it's obscuring any other window that could be at the location.
- if (window->bounds().Contains(x, y))
- return NULL;
- }
- return NULL;
-}
-
-aura::Window* MultiWindowResizeController::FindWindowTouching(
- aura::Window* window,
- Direction direction) const {
- int right = window->bounds().right();
- int bottom = window->bounds().bottom();
- Window* parent = window->parent();
- const Window::Windows& windows(parent->children());
- for (Window::Windows::const_reverse_iterator i = windows.rbegin();
- i != windows.rend(); ++i) {
- Window* other = *i;
- if (other == window || !other->IsVisible())
- continue;
- switch (direction) {
- case TOP_BOTTOM:
- if (other->bounds().y() == bottom &&
- Intersects(other->bounds().x(), other->bounds().right(),
- window->bounds().x(), window->bounds().right())) {
- return other;
- }
- break;
- case LEFT_RIGHT:
- if (other->bounds().x() == right &&
- Intersects(other->bounds().y(), other->bounds().bottom(),
- window->bounds().y(), window->bounds().bottom())) {
- return other;
- }
- break;
- default:
- NOTREACHED();
- }
- }
- return NULL;
-}
-
-void MultiWindowResizeController::FindWindowsTouching(
- aura::Window* start,
- Direction direction,
- std::vector<aura::Window*>* others) const {
- while (start) {
- start = FindWindowTouching(start, direction);
- if (start)
- others->push_back(start);
- }
-}
-
-void MultiWindowResizeController::DelayedHide() {
- if (hide_timer_.IsRunning())
- return;
-
- hide_timer_.Start(FROM_HERE,
- base::TimeDelta::FromMilliseconds(kHideDelayMS),
- this, &MultiWindowResizeController::Hide);
-}
-
-void MultiWindowResizeController::ShowIfValidMouseLocation() {
- if (DetermineWindowsFromScreenPoint(windows_.window1).Equals(windows_) ||
- DetermineWindowsFromScreenPoint(windows_.window2).Equals(windows_)) {
- ShowNow();
- } else {
- Hide();
- }
-}
-
-void MultiWindowResizeController::ShowNow() {
- DCHECK(!resize_widget_.get());
- DCHECK(windows_.is_valid());
- show_timer_.Stop();
- resize_widget_.reset(new views::Widget);
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.parent = Shell::GetContainer(
- Shell::GetTargetRootWindow(),
- internal::kShellWindowId_AlwaysOnTopContainer);
- params.can_activate = false;
- ResizeView* view = new ResizeView(this, windows_.direction);
- resize_widget_->set_focus_on_creation(false);
- resize_widget_->Init(params);
- views::corewm::SetWindowVisibilityAnimationType(
- resize_widget_->GetNativeWindow(),
- views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE);
- resize_widget_->GetNativeWindow()->SetName("MultiWindowResizeController");
- resize_widget_->SetContentsView(view);
- show_bounds_in_screen_ = ScreenAsh::ConvertRectToScreen(
- windows_.window1->parent(),
- CalculateResizeWidgetBounds(show_location_in_parent_));
- resize_widget_->SetBounds(show_bounds_in_screen_);
- resize_widget_->Show();
- mouse_watcher_.reset(new views::MouseWatcher(
- new ResizeMouseWatcherHost(this),
- this));
- mouse_watcher_->set_notify_on_exit_time(
- base::TimeDelta::FromMilliseconds(kHideDelayMS));
- mouse_watcher_->Start();
-}
-
-bool MultiWindowResizeController::IsShowing() const {
- return resize_widget_.get() || show_timer_.IsRunning();
-}
-
-void MultiWindowResizeController::StartResize(
- const gfx::Point& location_in_screen) {
- DCHECK(!window_resizer_.get());
- DCHECK(windows_.is_valid());
- hide_timer_.Stop();
- gfx::Point location_in_parent(location_in_screen);
- aura::client::GetScreenPositionClient(windows_.window2->GetRootWindow())->
- ConvertPointFromScreen(windows_.window2->parent(), &location_in_parent);
- std::vector<aura::Window*> windows;
- windows.push_back(windows_.window2);
- DCHECK(windows_.other_windows.empty());
- FindWindowsTouching(windows_.window2, windows_.direction,
- &windows_.other_windows);
- for (size_t i = 0; i < windows_.other_windows.size(); ++i) {
- windows_.other_windows[i]->AddObserver(this);
- windows.push_back(windows_.other_windows[i]);
- }
- int component = windows_.direction == LEFT_RIGHT ? HTRIGHT : HTBOTTOM;
- window_resizer_.reset(WorkspaceWindowResizer::Create(
- windows_.window1,
- location_in_parent,
- component,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE,
- windows));
-}
-
-void MultiWindowResizeController::Resize(const gfx::Point& location_in_screen,
- int event_flags) {
- gfx::Point location_in_parent(location_in_screen);
- aura::client::GetScreenPositionClient(windows_.window1->GetRootWindow())->
- ConvertPointFromScreen(windows_.window1->parent(), &location_in_parent);
- window_resizer_->Drag(location_in_parent, event_flags);
- gfx::Rect bounds = ScreenAsh::ConvertRectToScreen(
- windows_.window1->parent(),
- CalculateResizeWidgetBounds(location_in_parent));
-
- if (windows_.direction == LEFT_RIGHT)
- bounds.set_y(show_bounds_in_screen_.y());
- else
- bounds.set_x(show_bounds_in_screen_.x());
- resize_widget_->SetBounds(bounds);
-}
-
-void MultiWindowResizeController::CompleteResize(int event_flags) {
- window_resizer_->CompleteDrag(event_flags);
- window_resizer_.reset();
-
- // Mouse may still be over resizer, if not hide.
- gfx::Point screen_loc = Shell::GetScreen()->GetCursorScreenPoint();
- if (!resize_widget_->GetWindowBoundsInScreen().Contains(screen_loc)) {
- Hide();
- } else {
- // If the mouse is over the resizer we need to remove observers on any of
- // the |other_windows|. If we start another resize we'll recalculate the
- // |other_windows| and invoke AddObserver() as necessary.
- for (size_t i = 0; i < windows_.other_windows.size(); ++i)
- windows_.other_windows[i]->RemoveObserver(this);
- windows_.other_windows.clear();
- }
-}
-
-void MultiWindowResizeController::CancelResize() {
- if (!window_resizer_)
- return; // Happens if window was destroyed and we nuked the WindowResizer.
- window_resizer_->RevertDrag();
- window_resizer_.reset();
- Hide();
-}
-
-gfx::Rect MultiWindowResizeController::CalculateResizeWidgetBounds(
- const gfx::Point& location_in_parent) const {
- gfx::Size pref = resize_widget_->GetContentsView()->GetPreferredSize();
- int x = 0, y = 0;
- if (windows_.direction == LEFT_RIGHT) {
- x = windows_.window1->bounds().right() - pref.width() / 2;
- y = location_in_parent.y() + kResizeWidgetPadding;
- if (y + pref.height() / 2 > windows_.window1->bounds().bottom() &&
- y + pref.height() / 2 > windows_.window2->bounds().bottom()) {
- y = location_in_parent.y() - kResizeWidgetPadding - pref.height();
- }
- } else {
- x = location_in_parent.x() + kResizeWidgetPadding;
- if (x + pref.height() / 2 > windows_.window1->bounds().right() &&
- x + pref.height() / 2 > windows_.window2->bounds().right()) {
- x = location_in_parent.x() - kResizeWidgetPadding - pref.width();
- }
- y = windows_.window1->bounds().bottom() - pref.height() / 2;
- }
- return gfx::Rect(x, y, pref.width(), pref.height());
-}
-
-bool MultiWindowResizeController::IsOverWindows(
- const gfx::Point& location_in_screen) const {
- if (window_resizer_)
- return true; // Ignore hides while actively resizing.
-
- if (resize_widget_->GetWindowBoundsInScreen().Contains(location_in_screen))
- return true;
-
- int hit1, hit2;
- if (windows_.direction == TOP_BOTTOM) {
- hit1 = HTBOTTOM;
- hit2 = HTTOP;
- } else {
- hit1 = HTRIGHT;
- hit2 = HTLEFT;
- }
-
- return IsOverWindow(windows_.window1, location_in_screen, hit1) ||
- IsOverWindow(windows_.window2, location_in_screen, hit2);
-}
-
-bool MultiWindowResizeController::IsOverWindow(
- aura::Window* window,
- const gfx::Point& location_in_screen,
- int component) const {
- if (!window->delegate())
- return false;
-
- gfx::Point window_loc(location_in_screen);
- aura::Window::ConvertPointToTarget(
- window->GetRootWindow(), window, &window_loc);
- return window->HitTest(window_loc) &&
- window->delegate()->GetNonClientComponent(window_loc) == component;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/workspace/multi_window_resize_controller.h b/chromium/ash/wm/workspace/multi_window_resize_controller.h
deleted file mode 100644
index 02eeb2511a4..00000000000
--- a/chromium/ash/wm/workspace/multi_window_resize_controller.h
+++ /dev/null
@@ -1,186 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WORKSPACE_MULTI_WINDOW_RESIZE_CONTROLLER_H_
-#define ASH_WM_WORKSPACE_MULTI_WINDOW_RESIZE_CONTROLLER_H_
-
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/timer/timer.h"
-#include "ui/aura/window_observer.h"
-#include "ui/gfx/rect.h"
-#include "ui/views/mouse_watcher.h"
-
-namespace aura {
-class Window;
-}
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-namespace internal {
-
-class MultiWindowResizeControllerTest;
-class WorkspaceWindowResizer;
-
-// Two directions resizes happen in.
-enum Direction {
- TOP_BOTTOM,
- LEFT_RIGHT,
-};
-
-// MultiWindowResizeController is responsible for determining and showing a
-// widget that allows resizing multiple windows at the same time.
-// MultiWindowResizeController is driven by WorkspaceEventFilter.
-class ASH_EXPORT MultiWindowResizeController :
- public views::MouseWatcherListener, public aura::WindowObserver {
- public:
- MultiWindowResizeController();
- virtual ~MultiWindowResizeController();
-
- // If necessary, shows the resize widget. |window| is the window the mouse
- // is over, |component| the edge and |point| the location of the mouse.
- void Show(aura::Window* window, int component, const gfx::Point& point);
-
- // Hides the resize widget.
- void Hide();
-
- // MouseWatcherListenre overrides:
- virtual void MouseMovedOutOfHost() OVERRIDE;
-
- // WindowObserver overrides:
- virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
-
- private:
- friend class MultiWindowResizeControllerTest;
-
- // Used to track the two resizable windows and direction.
- struct ResizeWindows {
- ResizeWindows();
- ~ResizeWindows();
-
- // Returns true if |other| equals this ResizeWindows. This does *not*
- // consider the windows in |other_windows|.
- bool Equals(const ResizeWindows& other) const;
-
- // Returns true if this ResizeWindows is valid.
- bool is_valid() const { return window1 && window2; }
-
- // The left/top window to resize.
- aura::Window* window1;
-
- // Other window to resize.
- aura::Window* window2;
-
- // Direction
- Direction direction;
-
- // Windows after |window2| that are to be resized. Determined at the time
- // the resize starts.
- std::vector<aura::Window*> other_windows;
- };
-
- class ResizeMouseWatcherHost;
- class ResizeView;
-
- // Returns a ResizeWindows based on the specified arguments. Use is_valid()
- // to test if the return value is a valid multi window resize location.
- ResizeWindows DetermineWindows(aura::Window* window,
- int window_component,
- const gfx::Point& point) const;
-
- // Variant of DetermineWindows() that uses the current location of the mouse
- // to determine the resize windows.
- ResizeWindows DetermineWindowsFromScreenPoint(aura::Window* window) const;
-
- // Finds a window by edge (one of the constants HitTestCompat.
- aura::Window* FindWindowByEdge(aura::Window* window_to_ignore,
- int edge_want,
- int x,
- int y) const;
-
- // Returns the first window touching |window|.
- aura::Window* FindWindowTouching(aura::Window* window,
- Direction direction) const;
-
- // Places any windows touching |start| into |others|.
- void FindWindowsTouching(aura::Window* start,
- Direction direction,
- std::vector<aura::Window*>* others) const;
-
- // Hides the window after a delay.
- void DelayedHide();
-
- // Shows the resizer if the mouse is still at a valid location. This is called
- // from the |show_timer_|.
- void ShowIfValidMouseLocation();
-
- // Shows the widget immediately.
- void ShowNow();
-
- // Returns true if the widget is showing.
- bool IsShowing() const;
-
- // Initiates a resize.
- void StartResize(const gfx::Point& location_in_screen);
-
- // Resizes to the new location.
- void Resize(const gfx::Point& location_in_screen, int event_flags);
-
- // Completes the resize.
- void CompleteResize(int event_flags);
-
- // Cancels the resize.
- void CancelResize();
-
- // Returns the bounds for the resize widget.
- gfx::Rect CalculateResizeWidgetBounds(
- const gfx::Point& location_in_parent) const;
-
- // Returns true if |location_in_screen| is over the resize windows
- // (or the resize widget itself).
- bool IsOverWindows(const gfx::Point& location_in_screen) const;
-
- // Returns true if |location_in_screen| is over |window|.
- bool IsOverWindow(aura::Window* window,
- const gfx::Point& location_in_screen,
- int component) const;
-
- // Windows and direction to resize.
- ResizeWindows windows_;
-
- // Timer before hiding.
- base::OneShotTimer<MultiWindowResizeController> hide_timer_;
-
- // Timer used before showing.
- base::OneShotTimer<MultiWindowResizeController> show_timer_;
-
- scoped_ptr<views::Widget> resize_widget_;
-
- // If non-null we're in a resize loop.
- scoped_ptr<WorkspaceWindowResizer> window_resizer_;
-
- // Mouse coordinate passed to Show() in container's coodinates.
- gfx::Point show_location_in_parent_;
-
- // Bounds the widget was last shown at in screen coordinates.
- gfx::Rect show_bounds_in_screen_;
-
- // Used to detect whether the mouse is over the windows. While
- // |resize_widget_| is non-NULL (ie the widget is showing) we ignore calls
- // to Show().
- scoped_ptr<views::MouseWatcher> mouse_watcher_;
-
- DISALLOW_COPY_AND_ASSIGN(MultiWindowResizeController);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_WORKSPACE_MULTI_WINDOW_RESIZE_CONTROLLER_H_
diff --git a/chromium/ash/wm/workspace/multi_window_resize_controller_unittest.cc b/chromium/ash/wm/workspace/multi_window_resize_controller_unittest.cc
deleted file mode 100644
index a4756aa729d..00000000000
--- a/chromium/ash/wm/workspace/multi_window_resize_controller_unittest.cc
+++ /dev/null
@@ -1,258 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/workspace/multi_window_resize_controller.h"
-
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/shell_test_api.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace_controller.h"
-#include "ash/wm/workspace_controller_test_helper.h"
-#include "ash/wm/workspace/workspace_event_handler_test_helper.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/aura/window.h"
-#include "ui/base/hit_test.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-class MultiWindowResizeControllerTest : public test::AshTestBase {
- public:
- MultiWindowResizeControllerTest() : resize_controller_(NULL) {}
- virtual ~MultiWindowResizeControllerTest() {}
-
- virtual void SetUp() OVERRIDE {
- test::AshTestBase::SetUp();
- WorkspaceController* wc =
- test::ShellTestApi(Shell::GetInstance()).workspace_controller();
- WorkspaceEventHandler* event_handler =
- WorkspaceControllerTestHelper(wc).GetEventHandler();
- resize_controller_ = WorkspaceEventHandlerTestHelper(event_handler).
- resize_controller();
- }
-
- protected:
- aura::Window* CreateTestWindow(aura::WindowDelegate* delegate,
- const gfx::Rect& bounds) {
- aura::Window* window = new aura::Window(delegate);
- window->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window->Init(ui::LAYER_TEXTURED);
- ParentWindowInPrimaryRootWindow(window);
- window->SetBounds(bounds);
- window->Show();
- return window;
- }
-
- void ShowNow() {
- resize_controller_->ShowNow();
- }
-
- bool IsShowing() {
- return resize_controller_->IsShowing();
- }
-
- bool HasPendingShow() {
- return resize_controller_->show_timer_.IsRunning();
- }
-
- bool HasPendingHide() {
- return resize_controller_->hide_timer_.IsRunning();
- }
-
- void Hide() {
- resize_controller_->Hide();
- }
-
- bool HasTarget(aura::Window* window) {
- if (!resize_controller_->windows_.is_valid())
- return false;
- if ((resize_controller_->windows_.window1 == window ||
- resize_controller_->windows_.window2 == window))
- return true;
- for (size_t i = 0;
- i < resize_controller_->windows_.other_windows.size(); ++i) {
- if (resize_controller_->windows_.other_windows[i] == window)
- return true;
- }
- return false;
- }
-
- bool IsOverWindows(const gfx::Point& loc) {
- return resize_controller_->IsOverWindows(loc);
- }
-
- views::Widget* resize_widget() {
- return resize_controller_->resize_widget_.get();
- }
-
- MultiWindowResizeController* resize_controller_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MultiWindowResizeControllerTest);
-};
-
-// Assertions around moving mouse over 2 windows.
-TEST_F(MultiWindowResizeControllerTest, BasicTests) {
- aura::test::TestWindowDelegate delegate1;
- scoped_ptr<aura::Window> w1(
- CreateTestWindow(&delegate1, gfx::Rect(0, 0, 100, 100)));
- delegate1.set_window_component(HTRIGHT);
- aura::test::TestWindowDelegate delegate2;
- scoped_ptr<aura::Window> w2(
- CreateTestWindow(&delegate2, gfx::Rect(100, 0, 100, 100)));
- delegate2.set_window_component(HTRIGHT);
- aura::test::EventGenerator generator(w1->GetRootWindow());
- generator.MoveMouseTo(99, 50);
- EXPECT_TRUE(HasPendingShow());
- EXPECT_TRUE(IsShowing());
- EXPECT_FALSE(HasPendingHide());
-
- // Force a show now.
- ShowNow();
- EXPECT_FALSE(HasPendingShow());
- EXPECT_TRUE(IsShowing());
- EXPECT_FALSE(HasPendingHide());
-
- EXPECT_FALSE(IsOverWindows(gfx::Point(200, 200)));
-
- // Have to explicitly invoke this as MouseWatcher listens for native events.
- resize_controller_->MouseMovedOutOfHost();
- EXPECT_FALSE(HasPendingShow());
- EXPECT_FALSE(IsShowing());
- EXPECT_FALSE(HasPendingHide());
-}
-
-// Makes sure deleting a window hides.
-TEST_F(MultiWindowResizeControllerTest, DeleteWindow) {
- aura::test::TestWindowDelegate delegate1;
- scoped_ptr<aura::Window> w1(
- CreateTestWindow(&delegate1, gfx::Rect(0, 0, 100, 100)));
- delegate1.set_window_component(HTRIGHT);
- aura::test::TestWindowDelegate delegate2;
- scoped_ptr<aura::Window> w2(
- CreateTestWindow(&delegate2, gfx::Rect(100, 0, 100, 100)));
- delegate2.set_window_component(HTRIGHT);
- aura::test::EventGenerator generator(w1->GetRootWindow());
- generator.MoveMouseTo(99, 50);
- EXPECT_TRUE(HasPendingShow());
- EXPECT_TRUE(IsShowing());
- EXPECT_FALSE(HasPendingHide());
-
- // Force a show now.
- ShowNow();
- EXPECT_FALSE(HasPendingShow());
- EXPECT_TRUE(IsShowing());
- EXPECT_FALSE(HasPendingHide());
-
- // Move the mouse over the resize widget.
- ASSERT_TRUE(resize_widget());
- gfx::Rect bounds(resize_widget()->GetWindowBoundsInScreen());
- generator.MoveMouseTo(bounds.x() + 1, bounds.y() + 1);
- EXPECT_FALSE(HasPendingShow());
- EXPECT_TRUE(IsShowing());
- EXPECT_FALSE(HasPendingHide());
-
- // Move the resize widget
- generator.PressLeftButton();
- generator.MoveMouseTo(bounds.x() + 10, bounds.y() + 10);
-
- // Delete w2.
- w2.reset();
- EXPECT_TRUE(resize_widget() == NULL);
- EXPECT_FALSE(HasPendingShow());
- EXPECT_FALSE(IsShowing());
- EXPECT_FALSE(HasPendingHide());
- EXPECT_FALSE(HasTarget(w1.get()));
-}
-
-// Tests resizing.
-TEST_F(MultiWindowResizeControllerTest, Drag) {
- aura::test::TestWindowDelegate delegate1;
- scoped_ptr<aura::Window> w1(
- CreateTestWindow(&delegate1, gfx::Rect(0, 0, 100, 100)));
- delegate1.set_window_component(HTRIGHT);
- aura::test::TestWindowDelegate delegate2;
- scoped_ptr<aura::Window> w2(
- CreateTestWindow(&delegate2, gfx::Rect(100, 0, 100, 100)));
- delegate2.set_window_component(HTRIGHT);
- aura::test::EventGenerator generator(w1->GetRootWindow());
- generator.MoveMouseTo(99, 50);
- EXPECT_TRUE(HasPendingShow());
- EXPECT_TRUE(IsShowing());
- EXPECT_FALSE(HasPendingHide());
-
- // Force a show now.
- ShowNow();
- EXPECT_FALSE(HasPendingShow());
- EXPECT_TRUE(IsShowing());
- EXPECT_FALSE(HasPendingHide());
-
- // Move the mouse over the resize widget.
- ASSERT_TRUE(resize_widget());
- gfx::Rect bounds(resize_widget()->GetWindowBoundsInScreen());
- generator.MoveMouseTo(bounds.x() + 1, bounds.y() + 1);
- EXPECT_FALSE(HasPendingShow());
- EXPECT_TRUE(IsShowing());
- EXPECT_FALSE(HasPendingHide());
-
- // Move the resize widget
- generator.PressLeftButton();
- generator.MoveMouseTo(bounds.x() + 11, bounds.y() + 10);
- generator.ReleaseLeftButton();
-
- EXPECT_TRUE(resize_widget());
- EXPECT_FALSE(HasPendingShow());
- EXPECT_TRUE(IsShowing());
- EXPECT_FALSE(HasPendingHide());
- EXPECT_EQ("0,0 110x100", w1->bounds().ToString());
- EXPECT_EQ("110,0 100x100", w2->bounds().ToString());
-}
-
-// Makes sure three windows are picked up.
-TEST_F(MultiWindowResizeControllerTest, Three) {
- aura::test::TestWindowDelegate delegate1;
- scoped_ptr<aura::Window> w1(
- CreateTestWindow(&delegate1, gfx::Rect(0, 0, 100, 100)));
- delegate1.set_window_component(HTRIGHT);
- aura::test::TestWindowDelegate delegate2;
- scoped_ptr<aura::Window> w2(
- CreateTestWindow(&delegate2, gfx::Rect(100, 0, 100, 100)));
- delegate2.set_window_component(HTRIGHT);
- aura::test::TestWindowDelegate delegate3;
- scoped_ptr<aura::Window> w3(
- CreateTestWindow(&delegate2, gfx::Rect(200, 0, 100, 100)));
- delegate3.set_window_component(HTRIGHT);
-
- aura::test::EventGenerator generator(w1->GetRootWindow());
- generator.MoveMouseTo(99, 50);
- EXPECT_TRUE(HasPendingShow());
- EXPECT_TRUE(IsShowing());
- EXPECT_FALSE(HasPendingHide());
- EXPECT_FALSE(HasTarget(w3.get()));
-
- ShowNow();
- EXPECT_FALSE(HasPendingShow());
- EXPECT_TRUE(IsShowing());
- EXPECT_FALSE(HasPendingHide());
-
- // w3 should be picked up when resize is started.
- gfx::Rect bounds(resize_widget()->GetWindowBoundsInScreen());
- generator.MoveMouseTo(bounds.x() + 1, bounds.y() + 1);
- generator.PressLeftButton();
- generator.MoveMouseTo(bounds.x() + 11, bounds.y() + 10);
-
- EXPECT_TRUE(HasTarget(w3.get()));
-
- // Release the mouse. The resizer should still be visible and a subsequent
- // press should not trigger a DCHECK.
- generator.ReleaseLeftButton();
- EXPECT_TRUE(IsShowing());
- generator.PressLeftButton();
-}
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/workspace/phantom_window_controller.cc b/chromium/ash/wm/workspace/phantom_window_controller.cc
deleted file mode 100644
index 83a0e3fdcb0..00000000000
--- a/chromium/ash/wm/workspace/phantom_window_controller.cc
+++ /dev/null
@@ -1,214 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/workspace/phantom_window_controller.h"
-
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "third_party/skia/include/core/SkCanvas.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/gfx/animation/slide_animation.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/skia_util.h"
-#include "ui/views/background.h"
-#include "ui/views/painter.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace internal {
-
-// EdgePainter ----------------------------------------------------------------
-
-namespace {
-
-// Paints the background of the phantom window for window snapping.
-class EdgePainter : public views::Painter {
- public:
- EdgePainter();
- virtual ~EdgePainter();
-
- // views::Painter:
- virtual gfx::Size GetMinimumSize() const OVERRIDE;
- virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(EdgePainter);
-};
-
-} // namespace
-
-
-EdgePainter::EdgePainter() {
-}
-
-EdgePainter::~EdgePainter() {
-}
-
-gfx::Size EdgePainter::GetMinimumSize() const {
- return gfx::Size();
-}
-
-void EdgePainter::Paint(gfx::Canvas* canvas, const gfx::Size& size) {
- const int kInsetSize = 4;
- int x = kInsetSize;
- int y = kInsetSize;
- int w = size.width() - kInsetSize * 2;
- int h = size.height() - kInsetSize * 2;
- bool inset = (w > 0 && h > 0);
- if (!inset) {
- x = 0;
- y = 0;
- w = size.width();
- h = size.height();
- }
- SkPaint paint;
- paint.setColor(SkColorSetARGB(100, 0, 0, 0));
- paint.setStyle(SkPaint::kFill_Style);
- paint.setAntiAlias(true);
- const int kRoundRectSize = 4;
- canvas->sk_canvas()->drawRoundRect(
- gfx::RectToSkRect(gfx::Rect(x, y, w, h)),
- SkIntToScalar(kRoundRectSize), SkIntToScalar(kRoundRectSize), paint);
- if (!inset)
- return;
-
- paint.setColor(SkColorSetARGB(200, 255, 255, 255));
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(SkIntToScalar(2));
- canvas->sk_canvas()->drawRoundRect(
- gfx::RectToSkRect(gfx::Rect(x, y, w, h)), SkIntToScalar(kRoundRectSize),
- SkIntToScalar(kRoundRectSize), paint);
-}
-
-
-// PhantomWindowController ----------------------------------------------------
-
-PhantomWindowController::PhantomWindowController(aura::Window* window)
- : window_(window),
- phantom_below_window_(NULL),
- phantom_widget_(NULL),
- phantom_widget_start_(NULL) {
-}
-
-PhantomWindowController::~PhantomWindowController() {
- Hide();
-}
-
-void PhantomWindowController::Show(const gfx::Rect& bounds_in_screen) {
- if (bounds_in_screen == bounds_in_screen_)
- return;
- bounds_in_screen_ = bounds_in_screen;
- aura::Window* target_root = wm::GetRootWindowMatching(bounds_in_screen);
- // Show the phantom at the current bounds of the window. We'll animate to the
- // target bounds. If phantom exists, update the start bounds.
- if (!phantom_widget_)
- start_bounds_ = window_->GetBoundsInScreen();
- else
- start_bounds_ = phantom_widget_->GetWindowBoundsInScreen();
- if (phantom_widget_ &&
- phantom_widget_->GetNativeWindow()->GetRootWindow() != target_root) {
- phantom_widget_->Close();
- phantom_widget_ = NULL;
- }
- if (!phantom_widget_)
- phantom_widget_ = CreatePhantomWidget(target_root, start_bounds_);
-
- // Create a secondary widget in a second screen if start_bounds_ lie at least
- // partially in that other screen. This allows animations to start or restart
- // in one root window and progress into another root.
- aura::Window* start_root = wm::GetRootWindowMatching(start_bounds_);
- if (start_root == target_root) {
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- for (size_t i = 0; i < root_windows.size(); ++i) {
- if (root_windows[i] != target_root &&
- root_windows[i]->GetBoundsInScreen().Intersects(start_bounds_)) {
- start_root = root_windows[i];
- break;
- }
- }
- }
- if (phantom_widget_start_ &&
- (phantom_widget_start_->GetNativeWindow()->GetRootWindow() != start_root
- || start_root == target_root)) {
- phantom_widget_start_->Close();
- phantom_widget_start_ = NULL;
- }
- if (!phantom_widget_start_ && start_root != target_root)
- phantom_widget_start_ = CreatePhantomWidget(start_root, start_bounds_);
-
- animation_.reset(new gfx::SlideAnimation(this));
- animation_->SetTweenType(gfx::Tween::EASE_IN);
- const int kAnimationDurationMS = 200;
- animation_->SetSlideDuration(kAnimationDurationMS);
- animation_->Show();
-}
-
-void PhantomWindowController::Hide() {
- if (phantom_widget_)
- phantom_widget_->Close();
- phantom_widget_ = NULL;
- if (phantom_widget_start_)
- phantom_widget_start_->Close();
- phantom_widget_start_ = NULL;
-}
-
-bool PhantomWindowController::IsShowing() const {
- return phantom_widget_ != NULL;
-}
-
-void PhantomWindowController::AnimationProgressed(
- const gfx::Animation* animation) {
- const gfx::Rect current_bounds =
- animation->CurrentValueBetween(start_bounds_, bounds_in_screen_);
- if (phantom_widget_start_)
- phantom_widget_start_->SetBounds(current_bounds);
- phantom_widget_->SetBounds(current_bounds);
-}
-
-views::Widget* PhantomWindowController::CreatePhantomWidget(
- aura::Window* root_window,
- const gfx::Rect& bounds_in_screen) {
- views::Widget* phantom_widget = new views::Widget;
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
- params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- // PhantomWindowController is used by FrameMaximizeButton to highlight the
- // launcher button. Put the phantom in the same window as the launcher so that
- // the phantom is visible.
- params.parent = Shell::GetContainer(root_window,
- kShellWindowId_ShelfContainer);
- params.can_activate = false;
- params.keep_on_top = true;
- phantom_widget->set_focus_on_creation(false);
- phantom_widget->Init(params);
- phantom_widget->SetVisibilityChangedAnimationsEnabled(false);
- phantom_widget->GetNativeWindow()->SetName("PhantomWindow");
- phantom_widget->GetNativeWindow()->set_id(kShellWindowId_PhantomWindow);
- views::View* content_view = new views::View;
- content_view->set_background(
- views::Background::CreateBackgroundPainter(true, new EdgePainter));
- phantom_widget->SetContentsView(content_view);
- phantom_widget->SetBounds(bounds_in_screen);
- if (phantom_below_window_)
- phantom_widget->StackBelow(phantom_below_window_);
- else
- phantom_widget->StackAbove(window_);
-
- // Show the widget after all the setups.
- phantom_widget->Show();
-
- // Fade the window in.
- ui::Layer* widget_layer = phantom_widget->GetNativeWindow()->layer();
- widget_layer->SetOpacity(0);
- ui::ScopedLayerAnimationSettings scoped_setter(widget_layer->GetAnimator());
- widget_layer->SetOpacity(1);
- return phantom_widget;
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/workspace/phantom_window_controller.h b/chromium/ash/wm/workspace/phantom_window_controller.h
deleted file mode 100644
index 77d4a286035..00000000000
--- a/chromium/ash/wm/workspace/phantom_window_controller.h
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WORKSPACE_PHANTOM_WINDOW_CONTROLLER_H_
-#define ASH_WM_WORKSPACE_PHANTOM_WINDOW_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/gtest_prod_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/gfx/animation/animation_delegate.h"
-#include "ui/gfx/rect.h"
-
-namespace aura {
-class Window;
-}
-
-namespace gfx {
-class SlideAnimation;
-}
-
-namespace views {
-class Widget;
-}
-
-namespace ash {
-namespace internal {
-
-// PhantomWindowController is responsible for showing a phantom representation
-// of a window. It's used used during dragging a window to show a snap location.
-class ASH_EXPORT PhantomWindowController : public gfx::AnimationDelegate {
- public:
- explicit PhantomWindowController(aura::Window* window);
- virtual ~PhantomWindowController();
-
- // Bounds last passed to Show().
- const gfx::Rect& bounds_in_screen() const { return bounds_in_screen_; }
-
- // Animates the phantom window towards |bounds_in_screen|.
- // Creates two (if start bounds intersect any root window other than the
- // root window that matches the target bounds) or one (otherwise) phantom
- // widgets to display animated rectangle in each root.
- // This does not immediately show the window.
- void Show(const gfx::Rect& bounds_in_screen);
-
- // Hides the phantom.
- void Hide();
-
- // Returns true if the phantom is showing.
- bool IsShowing() const;
-
- // If set, the phantom window is stacked below this window, otherwise it
- // is stacked above the window passed to the constructor.
- void set_phantom_below_window(aura::Window* phantom_below_window) {
- phantom_below_window_ = phantom_below_window;
- }
-
- // gfx::AnimationDelegate overrides:
- virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
-
- private:
- FRIEND_TEST_ALL_PREFIXES(WorkspaceWindowResizerTest, PhantomWindowShow);
-
- // Creates, shows and returns a phantom widget at |bounds|
- // with kShellWindowId_ShelfContainer in |root_window| as a parent.
- views::Widget* CreatePhantomWidget(aura::Window* root_window,
- const gfx::Rect& bounds_in_screen);
-
- // Window the phantom is placed beneath.
- aura::Window* window_;
-
- // If set, the phantom window should get stacked below this window.
- aura::Window* phantom_below_window_;
-
- // Initially the bounds of |window_| (in screen coordinates).
- // Each time Show() is invoked |start_bounds_| is then reset to the bounds of
- // |phantom_widget_| and |bounds_| is set to the value passed into Show().
- // The animation animates between these two values.
- gfx::Rect start_bounds_;
-
- // Target bounds of the animation in screen coordinates.
- gfx::Rect bounds_in_screen_;
-
- // The primary phantom representation of the window. It is parented by the
- // root window matching the target bounds.
- views::Widget* phantom_widget_;
-
- // If the animation starts on another display, this is the secondary phantom
- // representation of the window used on the initial display, otherwise this is
- // NULL. This allows animation to progress from one display into the other.
- views::Widget* phantom_widget_start_;
-
- // Used to transition the bounds.
- scoped_ptr<gfx::SlideAnimation> animation_;
-
- DISALLOW_COPY_AND_ASSIGN(PhantomWindowController);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_WORKSPACE_PHANTOM_WINDOW_CONTROLLER_H_
diff --git a/chromium/ash/wm/workspace/snap_sizer.cc b/chromium/ash/wm/workspace/snap_sizer.cc
deleted file mode 100644
index ba35f6ac3cc..00000000000
--- a/chromium/ash/wm/workspace/snap_sizer.cc
+++ /dev/null
@@ -1,292 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/workspace/snap_sizer.h"
-
-#include <cmath>
-
-#include "ash/ash_switches.h"
-#include "ash/screen_ash.h"
-#include "ash/wm/window_resizer.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "base/command_line.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-namespace internal {
-
-namespace {
-
-// A list of ideal window widths in DIP which will be used to populate the
-// |usable_width_| list.
-const int kIdealWidth[] = { 1280, 1024, 768, 640 };
-
-// Windows are initially snapped to the size in |usable_width_| at index 0.
-// The index into |usable_width_| is changed if any of the following happen:
-// . The user stops moving the mouse for |kDelayBeforeIncreaseMS| and then
-// moves the mouse again.
-// . The mouse moves |kPixelsBeforeAdjust| horizontal pixels.
-// . The mouse is against the edge of the screen and the mouse is moved
-// |kMovesBeforeAdjust| times.
-const int kDelayBeforeIncreaseMS = 500;
-const int kMovesBeforeAdjust = 25;
-const int kPixelsBeforeAdjust = 100;
-
-// The maximum fraction of the screen width that a snapped window is allowed
-// to take up.
-const int kMaximumScreenPercent = 90;
-
-// The width that a window should be snapped to if resizing is disabled in the
-// SnapSizer for devices with small screen resolutions.
-const int kDefaultWidthSmallScreen = 1024;
-
-// Returns the minimum width that |window| can be snapped to. The returned width
-// may not be in the width list generated by BuildIdealWidthList().
-int GetMinWidth(aura::Window* window) {
- return window->delegate() ? window->delegate()->GetMinimumSize().width() : 0;
-}
-
-// Returns the maximum width that |window| can be snapped to. The returned width
-// may not be in the width list generated by BuildIdealWidthList().
-// The aura::WindowDelegate's max size is ignored because
-// ash::wm::CanSnapWindow() returns false when a max size is specified.
-int GetMaxWidth(aura::Window* window) {
- gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(window));
- return std::max(work_area.width() * kMaximumScreenPercent / 100,
- GetMinWidth(window));
-}
-
-// Returns the width that |window| should be snapped to if resizing is disabled
-// in the SnapSizer.
-int GetDefaultWidth(aura::Window* window) {
- gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(window));
-
- int width = 0;
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshMultipleSnapWindowWidths)) {
- width = work_area.width() / 2;
- } else {
- width = std::max(kDefaultWidthSmallScreen, work_area.width() / 2);
- }
-
- width = std::min(width, GetMaxWidth(window));
- return std::max(width, GetMinWidth(window));
-}
-
-// Creates the list of possible width for the current screen configuration:
-// Returns a list with items from |kIdealWidth| which fit on the screen and
-// supplement it with the 'half of screen' size. Furthermore, add an entry for
-// 90% of the screen size if it is smaller than the biggest value in the
-// |kIdealWidth| list (to get a step between the values).
-std::vector<int> BuildIdealWidthList(aura::Window* window) {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshMultipleSnapWindowWidths)) {
- return std::vector<int>(1u, GetDefaultWidth(window));
- }
-
- int minimum_width = GetMinWidth(window);
- int maximum_width = GetMaxWidth(window);
-
- gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(window));
- int half_width = work_area.width() / 2;
- if (half_width < minimum_width || half_width > maximum_width)
- half_width = 0;
-
- std::vector<int> ideal_width_list;
- for (size_t i = 0; i < arraysize(kIdealWidth); i++) {
- if (kIdealWidth[i] >= minimum_width && kIdealWidth[i] <= maximum_width) {
- if (i && !ideal_width_list.size() && maximum_width != kIdealWidth[i])
- ideal_width_list.push_back(maximum_width);
- if (half_width > kIdealWidth[i])
- ideal_width_list.push_back(half_width);
- if (half_width >= kIdealWidth[i])
- half_width = 0;
- ideal_width_list.push_back(kIdealWidth[i]);
- }
- }
- if (half_width)
- ideal_width_list.push_back(half_width);
- if (ideal_width_list.empty()) {
- if (minimum_width > 0)
- ideal_width_list.push_back(minimum_width);
- else
- ideal_width_list.push_back(maximum_width);
- }
-
- return ideal_width_list;
-}
-
-// Changes |window|'s bounds to |snap_bounds| while preserving the restore
-// bounds.
-void SnapWindowToBounds(wm::WindowState* window_state,
- SnapSizer::Edge edge,
- const gfx::Rect& snap_bounds) {
- if (edge == SnapSizer::LEFT_EDGE) {
- window_state->SnapLeft(snap_bounds);
- } else {
- window_state->SnapRight(snap_bounds);
- }
-}
-
-} // namespace
-
-SnapSizer::SnapSizer(wm::WindowState* window_state,
- const gfx::Point& start,
- Edge edge,
- InputType input_type)
- : window_state_(window_state),
- edge_(edge),
- time_last_update_(base::TimeTicks::Now()),
- size_index_(0),
- end_of_sequence_(false),
- resize_disabled_(false),
- num_moves_since_adjust_(0),
- last_adjust_x_(start.x()),
- last_update_x_(start.x()),
- start_x_(start.x()),
- input_type_(input_type),
- usable_width_(BuildIdealWidthList(window_state->window())) {
- DCHECK(!usable_width_.empty());
- target_bounds_ = GetTargetBounds();
-}
-
-SnapSizer::~SnapSizer() {
-}
-
-void SnapSizer::SnapWindow(wm::WindowState* window_state,
- SnapSizer::Edge edge) {
- if (!window_state->CanSnap())
- return;
- internal::SnapSizer sizer(window_state, gfx::Point(), edge,
- internal::SnapSizer::OTHER_INPUT);
- SnapWindowToBounds(window_state, edge,
- sizer.GetSnapBounds(window_state->window()->bounds()));
-}
-
-void SnapSizer::SnapWindowToTargetBounds() {
- SnapWindowToBounds(window_state_, edge_, target_bounds());
-}
-
-void SnapSizer::Update(const gfx::Point& location) {
- // See description above for details on this behavior.
- num_moves_since_adjust_++;
- if ((base::TimeTicks::Now() - time_last_update_).InMilliseconds() >
- kDelayBeforeIncreaseMS) {
- ChangeBounds(location.x(),
- CalculateIncrement(location.x(), last_update_x_));
- } else {
- bool along_edge = AlongEdge(location.x());
- int pixels_before_adjust = kPixelsBeforeAdjust;
- if (input_type_ == TOUCH_MAXIMIZE_BUTTON_INPUT) {
- const gfx::Rect& workspace_bounds =
- window_state_->window()->parent()->bounds();
- if (start_x_ > location.x()) {
- pixels_before_adjust =
- std::min(pixels_before_adjust, start_x_ / 10);
- } else {
- pixels_before_adjust =
- std::min(pixels_before_adjust,
- (workspace_bounds.width() - start_x_) / 10);
- }
- }
- if (std::abs(location.x() - last_adjust_x_) >= pixels_before_adjust ||
- (along_edge && num_moves_since_adjust_ >= kMovesBeforeAdjust)) {
- ChangeBounds(location.x(),
- CalculateIncrement(location.x(), last_adjust_x_));
- }
- }
- last_update_x_ = location.x();
- time_last_update_ = base::TimeTicks::Now();
-}
-
-gfx::Rect SnapSizer::GetSnapBounds(const gfx::Rect& bounds) {
- int current = 0;
- if (!resize_disabled_) {
- for (current = usable_width_.size() - 1; current >= 0; current--) {
- gfx::Rect target = GetTargetBoundsForSize(current);
- if (target == bounds) {
- ++current;
- break;
- }
- }
- }
- if (current < 0)
- current = 0;
- return GetTargetBoundsForSize(current % usable_width_.size());
-}
-
-void SnapSizer::SelectDefaultSizeAndDisableResize() {
- resize_disabled_ = true;
- size_index_ = 0;
- end_of_sequence_ = false;
- target_bounds_ = GetTargetBounds();
-}
-
-gfx::Rect SnapSizer::GetTargetBoundsForSize(size_t size_index) const {
- gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(
- window_state_->window()));
- int y = work_area.y();
- int max_y = work_area.bottom();
- int width = 0;
- if (resize_disabled_) {
- width = GetDefaultWidth(window_state_->window());
- } else {
- DCHECK(size_index < usable_width_.size());
- width = usable_width_[size_index];
- }
-
- if (edge_ == LEFT_EDGE) {
- int x = work_area.x();
- int mid_x = x + width;
- return gfx::Rect(x, y, mid_x - x, max_y - y);
- }
- int max_x = work_area.right();
- int x = max_x - width;
- return gfx::Rect(x , y, max_x - x, max_y - y);
-}
-
-int SnapSizer::CalculateIncrement(int x, int reference_x) const {
- if (AlongEdge(x))
- return 1;
- if (x == reference_x)
- return 0;
- if (edge_ == LEFT_EDGE) {
- if (x < reference_x)
- return 1;
- return -1;
- }
- // edge_ == RIGHT_EDGE.
- if (x > reference_x)
- return 1;
- return -1;
-}
-
-void SnapSizer::ChangeBounds(int x, int delta) {
- end_of_sequence_ =
- delta > 0 && size_index_ == static_cast<int>(usable_width_.size()) - 1;
- int index = std::min(static_cast<int>(usable_width_.size()) - 1,
- std::max(size_index_ + delta, 0));
- if (index != size_index_) {
- size_index_ = index;
- target_bounds_ = GetTargetBounds();
- }
- num_moves_since_adjust_ = 0;
- last_adjust_x_ = x;
-}
-
-gfx::Rect SnapSizer::GetTargetBounds() const {
- return GetTargetBoundsForSize(size_index_);
-}
-
-bool SnapSizer::AlongEdge(int x) const {
- gfx::Rect area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(
- window_state_->window()));
- return (x <= area.x()) || (x >= area.right() - 1);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/workspace/snap_sizer.h b/chromium/ash/wm/workspace/snap_sizer.h
deleted file mode 100644
index b32c3c8c310..00000000000
--- a/chromium/ash/wm/workspace/snap_sizer.h
+++ /dev/null
@@ -1,140 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WORKSPACE_SNAP_SIZER_H_
-#define ASH_WM_WORKSPACE_SNAP_SIZER_H_
-
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "base/basictypes.h"
-#include "base/time/time.h"
-#include "ui/gfx/rect.h"
-
-namespace ash {
-namespace wm {
-class WindowState;
-}
-
-namespace internal {
-
-// SnapSizer is responsible for determining the resulting bounds of a window
-// that is being snapped to the left or right side of the screen.
-// The bounds used in this class are in the container's coordinates.
-class ASH_EXPORT SnapSizer {
- public:
- enum Edge {
- LEFT_EDGE,
- RIGHT_EDGE
- };
-
- enum InputType {
- TOUCH_MAXIMIZE_BUTTON_INPUT,
- OTHER_INPUT
- };
-
- // Set |input_type| to |TOUCH_MAXIMIZE_BUTTON_INPUT| when called by a touch
- // operation by the maximize button. This will allow the user to snap resize
- // the window beginning close to the border.
- SnapSizer(wm::WindowState* window_state,
- const gfx::Point& start,
- Edge edge,
- InputType input_type);
- virtual ~SnapSizer();
-
- // Snaps a window left or right.
- static void SnapWindow(wm::WindowState* window_state, Edge edge);
-
- // Snaps |window_| to the target bounds.
- void SnapWindowToTargetBounds();
-
- // Updates the target bounds based on a mouse move.
- void Update(const gfx::Point& location);
-
- // Bounds to position the window at.
- const gfx::Rect& target_bounds() const { return target_bounds_; }
-
- // Returns the appropriate snap bounds (e.g. if a window is already snapped,
- // then it returns the next snap-bounds).
- gfx::Rect GetSnapBounds(const gfx::Rect& bounds);
-
- // Set the snap sizer to the button press default size and prevent resizing.
- void SelectDefaultSizeAndDisableResize();
-
- // Returns the target bounds based on the edge and the provided |size_index|.
- // For unit test purposes this function is not private.
- gfx::Rect GetTargetBoundsForSize(size_t size_index) const;
-
- // Returns true when snapping sequence is at its last (docking) step.
- bool end_of_sequence() const { return end_of_sequence_; }
-
- private:
- // Calculates the amount to increment by. This returns one of -1, 0 or 1 and
- // is intended to by applied to |size_index_|. |x| is the current
- // x-coordinate, and |reference_x| is used to determine whether to increase
- // or decrease the position. It's one of |last_adjust_x_| or |last_update_x_|.
- int CalculateIncrement(int x, int reference_x) const;
-
- // Changes the bounds. |x| is the current x-coordinate and |delta| the amount
- // to increase by. |delta| comes from CalculateIncrement() and is applied
- // to |size_index_|.
- void ChangeBounds(int x, int delta);
-
- // Returns the target bounds based on the edge and |size_index_|.
- gfx::Rect GetTargetBounds() const;
-
- // Returns true if the specified point is along the edge of the screen.
- bool AlongEdge(int x) const;
-
- // WindowState of the window being snapped.
- wm::WindowState* window_state_;
-
- const Edge edge_;
-
- // Current target bounds for the snap.
- gfx::Rect target_bounds_;
-
- // Time Update() was last invoked.
- base::TimeTicks time_last_update_;
-
- // Index into |kSizes| that dictates the width of the screen the target
- // bounds should get.
- int size_index_;
-
- // Set to true when an attempt is made to increment |size_index_| past
- // the size of |usable_width_|.
- bool end_of_sequence_;
-
- // If set, |size_index_| will get ignored and the single button default
- // setting will be used instead.
- bool resize_disabled_;
-
- // Number of times Update() has been invoked since last ChangeBounds().
- int num_moves_since_adjust_;
-
- // X-coordinate the last time ChangeBounds() was invoked.
- int last_adjust_x_;
-
- // X-coordinate last supplied to Update().
- int last_update_x_;
-
- // Initial x-coordinate.
- const int start_x_;
-
- // |TOUCH_MAXIMIZE_BUTTON_INPUT| if the snap sizer was created through a
- // touch & drag operation of the maximizer button. It changes the behavior of
- // the drag / resize behavior when the dragging starts close to the border.
- const InputType input_type_;
-
- // A list of usable window widths for size. This gets created when the
- // sizer gets created.
- const std::vector<int> usable_width_;
-
- DISALLOW_COPY_AND_ASSIGN(SnapSizer);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_WORKSPACE_SNAP_SIZER_H_
diff --git a/chromium/ash/wm/workspace/snap_sizer_unittest.cc b/chromium/ash/wm/workspace/snap_sizer_unittest.cc
deleted file mode 100644
index 81a09f93940..00000000000
--- a/chromium/ash/wm/workspace/snap_sizer_unittest.cc
+++ /dev/null
@@ -1,393 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/workspace/snap_sizer.h"
-
-#include "ash/ash_switches.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "base/command_line.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-
-typedef test::AshTestBase SnapSizerTest;
-
-using internal::SnapSizer;
-
-// Test that a window gets properly snapped to the display's edges in a
-// multi monitor environment.
-TEST_F(SnapSizerTest, MultipleDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("0+0-500x400, 0+500-600x400");
- const gfx::Rect kPrimaryDisplayWorkAreaBounds =
- ash::Shell::GetScreen()->GetPrimaryDisplay().work_area();
- const gfx::Rect kSecondaryDisplayWorkAreaBounds =
- ScreenAsh::GetSecondaryDisplay().work_area();
-
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(100, 100, 100, 100)));
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- SnapSizer::SnapWindow(window_state, SnapSizer::LEFT_EDGE);
- gfx::Rect expected = gfx::Rect(
- kPrimaryDisplayWorkAreaBounds.x(),
- kPrimaryDisplayWorkAreaBounds.y(),
- window->bounds().width(), // No expectation for the width.
- kPrimaryDisplayWorkAreaBounds.height());
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- SnapSizer::SnapWindow(window_state, SnapSizer::RIGHT_EDGE);
- // The width should not change when a window switches from being snapped to
- // the left edge to being snapped to the right edge.
- expected.set_x(kPrimaryDisplayWorkAreaBounds.right() - expected.width());
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- // Move the window to the secondary display.
- window->SetBoundsInScreen(gfx::Rect(600, 0, 100, 100),
- ScreenAsh::GetSecondaryDisplay());
-
- SnapSizer::SnapWindow(window_state, SnapSizer::RIGHT_EDGE);
- expected = gfx::Rect(
- kSecondaryDisplayWorkAreaBounds.right() - window->bounds().width(),
- kSecondaryDisplayWorkAreaBounds.y(),
- window->bounds().width(), // No expectation for the width.
- kSecondaryDisplayWorkAreaBounds.height());
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- SnapSizer::SnapWindow(window_state, SnapSizer::LEFT_EDGE);
- // The width should not change when a window switches from being snapped to
- // the right edge to being snapped to the left edge.
- expected.set_x(kSecondaryDisplayWorkAreaBounds.x());
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-}
-
-// Test how the minimum and maximum size specified by the aura::WindowDelegate
-// affect snapping.
-TEST_F(SnapSizerTest, MinimumSize) {
- if (!SupportsHostWindowResize())
- return;
-
- UpdateDisplay("0+0-600x800");
- const gfx::Rect kWorkAreaBounds =
- ash::Shell::GetScreen()->GetPrimaryDisplay().work_area();
-
- aura::test::TestWindowDelegate delegate;
- scoped_ptr<aura::Window> window(CreateTestWindowInShellWithDelegate(
- &delegate, -1, gfx::Rect(0, 100, kWorkAreaBounds.width() - 1, 100)));
-
- // It should be possible to snap a window with a minimum size.
- delegate.set_minimum_size(gfx::Size(kWorkAreaBounds.width() - 1, 0));
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- EXPECT_TRUE(window_state->CanSnap());
- SnapSizer::SnapWindow(window_state, SnapSizer::RIGHT_EDGE);
- gfx::Rect expected = gfx::Rect(kWorkAreaBounds.x() + 1,
- kWorkAreaBounds.y(),
- kWorkAreaBounds.width() - 1,
- kWorkAreaBounds.height());
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- // It should not be possible to snap a window with a maximum size.
- delegate.set_minimum_size(gfx::Size());
- delegate.set_maximum_size(gfx::Size(kWorkAreaBounds.width() - 1, INT_MAX));
- EXPECT_FALSE(window_state->CanSnap());
-}
-
-// Test that repeatedly calling SnapSizer::SnapWindow() when the
-// --ash-multiple-snap-window-widths flag is set steps through the ideal widths
-// in descending order as well as 90% and 50% of the work area's width.
-TEST_F(SnapSizerTest, StepThroughSizes) {
- if (!SupportsHostWindowResize())
- return;
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kAshMultipleSnapWindowWidths);
-
- UpdateDisplay("1024x800");
- const gfx::Rect kWorkAreaBounds =
- ash::Shell::GetScreen()->GetPrimaryDisplay().work_area();
-
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(100, 100, 100, 100)));
- wm::WindowState* window_state = wm::GetWindowState(window.get());
-
- // Make sure that the work area is the size we expect it to be.
- EXPECT_GT(kWorkAreaBounds.width() * 0.9, 768);
-
- // The first width should be 1024 * 0.9 because the larger ideal widths
- // (1280, 1024) > 1024 * 0.9.
- SnapSizer::SnapWindow(window_state, SnapSizer::LEFT_EDGE);
- gfx::Rect expected = gfx::Rect(kWorkAreaBounds.x(),
- kWorkAreaBounds.y(),
- kWorkAreaBounds.width() * 0.9,
- kWorkAreaBounds.height());
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- SnapSizer::SnapWindow(window_state, SnapSizer::LEFT_EDGE);
- expected.set_width(768);
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- SnapSizer::SnapWindow(window_state, SnapSizer::LEFT_EDGE);
- expected.set_width(640);
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- SnapSizer::SnapWindow(window_state, SnapSizer::LEFT_EDGE);
- expected.set_width(kWorkAreaBounds.width() * 0.5);
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- // Wrap around.
- SnapSizer::SnapWindow(window_state, SnapSizer::LEFT_EDGE);
- expected.set_width(kWorkAreaBounds.width() * 0.9);
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- // Repeat the test snapping right.
- SnapSizer::SnapWindow(window_state, SnapSizer::RIGHT_EDGE);
- expected.set_width(kWorkAreaBounds.width() * 0.9);
- expected.set_x(kWorkAreaBounds.right() - expected.width());
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- SnapSizer::SnapWindow(window_state, SnapSizer::RIGHT_EDGE);
- expected.set_width(768);
- expected.set_x(kWorkAreaBounds.right() - expected.width());
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- SnapSizer::SnapWindow(window_state, SnapSizer::RIGHT_EDGE);
- expected.set_width(640);
- expected.set_x(kWorkAreaBounds.right() - expected.width());
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- SnapSizer::SnapWindow(window_state, SnapSizer::RIGHT_EDGE);
- expected.set_width(kWorkAreaBounds.width() * 0.5);
- expected.set_x(kWorkAreaBounds.right() - expected.width());
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- // Wrap around.
- SnapSizer::SnapWindow(window_state, SnapSizer::RIGHT_EDGE);
- expected.set_width(kWorkAreaBounds.width() * 0.9);
- expected.set_x(kWorkAreaBounds.right() - expected.width());
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-}
-
-// Test that a SnapSizer's target bounds always start from the widest possible
-// bounds and that calling Update() steps through the ideal widths in descending
-// order as well as 90% and 50% of the work area's width.
-TEST_F(SnapSizerTest, Update) {
- if (!SupportsHostWindowResize())
- return;
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kAshMultipleSnapWindowWidths);
- UpdateDisplay("1024x800");
- const gfx::Rect kWorkAreaBounds =
- ash::Shell::GetScreen()->GetPrimaryDisplay().work_area();
-
- // Make sure that the work area is the size we expect it to be.
- EXPECT_GT(kWorkAreaBounds.width() * 0.9, 768);
-
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(100, 100, 100, 100)));
- wm::WindowState* window_state = wm::GetWindowState(window.get());
-
- SnapSizer::SnapWindow(window_state, SnapSizer::LEFT_EDGE);
- SnapSizer::SnapWindow(window_state, SnapSizer::LEFT_EDGE);
- gfx::Rect expected = gfx::Rect(kWorkAreaBounds.x(),
- kWorkAreaBounds.y(),
- 768,
- kWorkAreaBounds.height());
-
- // The SnapSizer's target bounds should always start from the widest bounds
- // (instead of the bounds with the next ideal width).
- SnapSizer sizer(window_state, gfx::Point(800, 0), SnapSizer::LEFT_EDGE,
- SnapSizer::OTHER_INPUT);
- sizer.SnapWindowToTargetBounds();
- expected.set_width(kWorkAreaBounds.width() * .9);
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- sizer.Update(gfx::Point(600, 0));
- sizer.SnapWindowToTargetBounds();
- expected.set_width(768);
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- sizer.Update(gfx::Point(400, 0));
- sizer.SnapWindowToTargetBounds();
- expected.set_width(640);
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- sizer.Update(gfx::Point(200, 0));
- sizer.SnapWindowToTargetBounds();
- expected.set_width(kWorkAreaBounds.width() * 0.5);
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- // Do not wrap around.
- sizer.Update(gfx::Point(0, 0));
- sizer.SnapWindowToTargetBounds();
- expected.set_width(kWorkAreaBounds.width() * 0.5);
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-}
-
-// Tests the SnapSizer's target bounds when resizing is disabled and the
-// --ash-multiple-snap-window-widths flag is set.
-TEST_F(SnapSizerTest, Default) {
- if (!SupportsHostWindowResize())
- return;
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kAshMultipleSnapWindowWidths);
-
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(100, 100, 100, 100)));
- SnapSizer sizer(wm::GetWindowState(window.get()), gfx::Point(),
- SnapSizer::LEFT_EDGE, SnapSizer::OTHER_INPUT);
-
- // For small workspace widths, we should snap to 90% of the workspace width
- // because it is the largest width the window can snap to.
- UpdateDisplay("0+0-800x600");
- sizer.SelectDefaultSizeAndDisableResize();
-
- gfx::Rect work_area =
- ash::Shell::GetScreen()->GetPrimaryDisplay().work_area();
- gfx::Rect expected(work_area);
- expected.set_width(work_area.width() * 0.9);
- EXPECT_EQ(expected.ToString(),
- ScreenAsh::ConvertRectToScreen(window->parent(),
- sizer.target_bounds()).ToString());
-
- // If the largest width the window can snap to is between 1024 and 1280, we
- // should snap to 1024.
- UpdateDisplay("0+0-1280x800");
- sizer.SelectDefaultSizeAndDisableResize();
- sizer.SnapWindowToTargetBounds();
- EXPECT_EQ(1024, window->bounds().width());
-
- // We should snap to a width of 50% of the work area if it is the largest
- // width the window can snap to.
- UpdateDisplay("0+0-2560x1080");
- work_area = ash::Shell::GetScreen()->GetPrimaryDisplay().work_area();
- sizer.SelectDefaultSizeAndDisableResize();
- sizer.SnapWindowToTargetBounds();
- EXPECT_EQ(work_area.width() / 2, window->bounds().width());
-}
-
-// Test that the window only snaps to 50% of the work area width when the
-// --ash-multiple-snap-window-widths flag is not set.
-TEST_F(SnapSizerTest, SingleSnapWindowWidth) {
- if (!SupportsHostWindowResize())
- return;
-
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshMultipleSnapWindowWidths)) {
- return;
- }
-
- UpdateDisplay("0+0-800x600");
- const gfx::Rect kWorkAreaBounds =
- ash::Shell::GetScreen()->GetPrimaryDisplay().work_area();
-
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(100, 100, 100, 100)));
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- SnapSizer::SnapWindow(window_state, SnapSizer::LEFT_EDGE);
- gfx::Rect expected = gfx::Rect(kWorkAreaBounds.x(),
- kWorkAreaBounds.y(),
- kWorkAreaBounds.width() / 2,
- kWorkAreaBounds.height());
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- // Because a window can only be snapped to one size when using the alternate
- // caption button style, a second call to SnapSizer::SnapWindow() should have
- // no effect.
- SnapSizer::SnapWindow(window_state, SnapSizer::LEFT_EDGE);
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- // It should still be possible to switch a window from being snapped to the
- // left edge to being snapped to the right edge.
- SnapSizer::SnapWindow(window_state, SnapSizer::RIGHT_EDGE);
- expected.set_x(kWorkAreaBounds.right() - expected.width());
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- // If resizing is disabled, the window should be snapped to 50% too.
- SnapSizer sizer1(window_state, gfx::Point(), SnapSizer::RIGHT_EDGE,
- SnapSizer::OTHER_INPUT);
- sizer1.SelectDefaultSizeAndDisableResize();
- sizer1.SnapWindowToTargetBounds();
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-
- // Snapping to a SnapSizer's initial bounds snaps to 50% too.
- SnapSizer sizer2(window_state, gfx::Point(), SnapSizer::LEFT_EDGE,
- SnapSizer::OTHER_INPUT);
- sizer2.SnapWindowToTargetBounds();
- expected.set_x(kWorkAreaBounds.x());
- EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
-}
-
-// Test that snapping left/right preserves the restore bounds.
-TEST_F(SnapSizerTest, RestoreBounds) {
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(100, 100, 100, 100)));
- wm::WindowState* window_state = wm::GetWindowState(window.get());
-
- EXPECT_TRUE(window_state->IsNormalShowState());
-
- // 1) Start with restored window with restore bounds set.
- gfx::Rect restore_bounds = window->GetBoundsInScreen();
- restore_bounds.set_width(restore_bounds.width() + 1);
- window_state->SetRestoreBoundsInScreen(restore_bounds);
- SnapSizer::SnapWindow(window_state, SnapSizer::LEFT_EDGE);
- SnapSizer::SnapWindow(window_state, SnapSizer::RIGHT_EDGE);
- EXPECT_NE(restore_bounds.ToString(), window->GetBoundsInScreen().ToString());
- EXPECT_EQ(restore_bounds.ToString(),
- window_state->GetRestoreBoundsInScreen().ToString());
- window_state->Restore();
- EXPECT_EQ(restore_bounds.ToString(), window->GetBoundsInScreen().ToString());
-
- // 2) Start with restored bounds set as a result of maximizing the window.
- window_state->Maximize();
- gfx::Rect maximized_bounds = window->GetBoundsInScreen();
- EXPECT_NE(maximized_bounds.ToString(), restore_bounds.ToString());
- EXPECT_EQ(restore_bounds.ToString(),
- window_state->GetRestoreBoundsInScreen().ToString());
-
- SnapSizer::SnapWindow(window_state, SnapSizer::LEFT_EDGE);
- EXPECT_NE(restore_bounds.ToString(), window->GetBoundsInScreen().ToString());
- EXPECT_NE(maximized_bounds.ToString(),
- window->GetBoundsInScreen().ToString());
- EXPECT_EQ(restore_bounds.ToString(),
- window_state->GetRestoreBoundsInScreen().ToString());
-
- window_state->Restore();
- EXPECT_EQ(restore_bounds.ToString(), window->GetBoundsInScreen().ToString());
-}
-
-// Test that maximizing an auto managed window, then snapping it puts the window
-// at the snapped bounds and not at the auto-managed (centered) bounds.
-TEST_F(SnapSizerTest, AutoManaged) {
- scoped_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- window_state->set_window_position_managed(true);
- window->Hide();
- window->SetBounds(gfx::Rect(100, 100, 100, 100));
- window->Show();
-
- window_state->Maximize();
- SnapSizer::SnapWindow(window_state, SnapSizer::RIGHT_EDGE);
-
- const gfx::Rect kWorkAreaBounds =
- ash::Shell::GetScreen()->GetPrimaryDisplay().work_area();
- gfx::Rect expected_snapped_bounds(
- kWorkAreaBounds.right() - window->bounds().width(),
- kWorkAreaBounds.y(),
- window->bounds().width(), // No expectation for the width.
- kWorkAreaBounds.height());
- EXPECT_EQ(expected_snapped_bounds.ToString(),
- window->GetBoundsInScreen().ToString());
-
- // The window should still be auto managed despite being right maximized.
- EXPECT_TRUE(window_state->window_position_managed());
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/workspace/snap_types.h b/chromium/ash/wm/workspace/snap_types.h
deleted file mode 100644
index 482a7dd583b..00000000000
--- a/chromium/ash/wm/workspace/snap_types.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WORKSPACE_SNAP_TYPES_H_
-#define ASH_WM_WORKSPACE_SNAP_TYPES_H_
-
-namespace ash {
-
-// These are the window snap types which can be used for window resizing.
-// Their main use case is the class FrameMaximizeButton.
-enum SnapType {
- SNAP_LEFT,
- SNAP_RIGHT,
- SNAP_MAXIMIZE,
- SNAP_MINIMIZE,
- SNAP_RESTORE,
- SNAP_NONE
-};
-
-} // namespace ash
-
-#endif // ASH_WM_WORKSPACE_SNAP_TYPES_H_
diff --git a/chromium/ash/wm/workspace/workspace_event_handler.cc b/chromium/ash/wm/workspace/workspace_event_handler.cc
deleted file mode 100644
index bcd7e9e1d64..00000000000
--- a/chromium/ash/wm/workspace/workspace_event_handler.cc
+++ /dev/null
@@ -1,180 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/workspace/workspace_event_handler.h"
-
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/touch/touch_uma.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/workspace_window_resizer.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/base/hit_test.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/events/event.h"
-#include "ui/events/event_utils.h"
-#include "ui/gfx/screen.h"
-
-namespace ash {
-namespace {
-
-void SingleAxisMaximize(wm::WindowState* window_state,
- const gfx::Rect& maximize_rect_in_screen) {
- window_state->SaveCurrentBoundsForRestore();
- window_state->SetBoundsInScreen(maximize_rect_in_screen);
-}
-
-void SingleAxisUnmaximize(wm::WindowState* window_state,
- const gfx::Rect& restore_bounds_in_screen) {
- window_state->SetBoundsInScreen(restore_bounds_in_screen);
- window_state->ClearRestoreBounds();
-}
-
-void ToggleMaximizedState(wm::WindowState* window_state) {
- if (window_state->HasRestoreBounds()) {
- if (window_state->GetShowState() == ui::SHOW_STATE_NORMAL) {
- window_state->window()->SetBounds(
- window_state->GetRestoreBoundsInParent());
- window_state->ClearRestoreBounds();
- } else {
- window_state->Restore();
- }
- } else if (window_state->CanMaximize()) {
- window_state->Maximize();
- }
-}
-
-} // namespace
-
-namespace internal {
-
-WorkspaceEventHandler::WorkspaceEventHandler(aura::Window* owner)
- : ToplevelWindowEventHandler(owner) {
-}
-
-WorkspaceEventHandler::~WorkspaceEventHandler() {
-}
-
-void WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- switch (event->type()) {
- case ui::ET_MOUSE_MOVED: {
- int component =
- target->delegate()->GetNonClientComponent(event->location());
- multi_window_resize_controller_.Show(target, component,
- event->location());
- break;
- }
- case ui::ET_MOUSE_ENTERED:
- break;
- case ui::ET_MOUSE_CAPTURE_CHANGED:
- case ui::ET_MOUSE_EXITED:
- break;
- case ui::ET_MOUSE_PRESSED: {
- // Maximize behavior is implemented as post-target handling so the target
- // can cancel it.
- if (ui::EventCanceledDefaultHandling(*event)) {
- ToplevelWindowEventHandler::OnMouseEvent(event);
- return;
- }
- wm::WindowState* target_state = wm::GetWindowState(target);
- if (event->flags() & ui::EF_IS_DOUBLE_CLICK &&
- event->IsOnlyLeftMouseButton() &&
- target->delegate()->GetNonClientComponent(event->location()) ==
- HTCAPTION) {
- ash::Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_TOGGLE_MAXIMIZE_CAPTION_CLICK);
- ToggleMaximizedState(target_state);
- }
- multi_window_resize_controller_.Hide();
- HandleVerticalResizeDoubleClick(target_state, event);
- break;
- }
- default:
- break;
- }
- ToplevelWindowEventHandler::OnMouseEvent(event);
-}
-
-void WorkspaceEventHandler::OnGestureEvent(ui::GestureEvent* event) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- if (event->type() == ui::ET_GESTURE_TAP &&
- target->delegate()->GetNonClientComponent(event->location()) ==
- HTCAPTION) {
- if (event->details().tap_count() == 2) {
- ash::Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_TOGGLE_MAXIMIZE_CAPTION_GESTURE);
- // Note: TouchUMA::GESTURE_FRAMEVIEW_TAP is counted twice each time
- // TouchUMA::GESTURE_MAXIMIZE_DOUBLETAP is counted once.
- TouchUMA::GetInstance()->RecordGestureAction(
- TouchUMA::GESTURE_MAXIMIZE_DOUBLETAP);
- ToggleMaximizedState(wm::GetWindowState(target));
- event->StopPropagation();
- return;
- } else {
- // Note: TouchUMA::GESTURE_FRAMEVIEW_TAP is counted twice for each tap.
- TouchUMA::GetInstance()->RecordGestureAction(
- TouchUMA::GESTURE_FRAMEVIEW_TAP);
- }
- }
- ToplevelWindowEventHandler::OnGestureEvent(event);
-}
-
-void WorkspaceEventHandler::HandleVerticalResizeDoubleClick(
- wm::WindowState* target_state,
- ui::MouseEvent* event) {
- aura::Window* target = target_state->window();
- gfx::Rect max_size(target->delegate()->GetMaximumSize());
- if (event->flags() & ui::EF_IS_DOUBLE_CLICK && !target_state->IsMaximized()) {
- int component =
- target->delegate()->GetNonClientComponent(event->location());
- gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(
- target).work_area();
- if (component == HTBOTTOM || component == HTTOP) {
- // Don't maximize vertically if the window has a max height defined.
- if (max_size.height() != 0)
- return;
- if (target_state->HasRestoreBounds() &&
- (target->bounds().height() == work_area.height() &&
- target->bounds().y() == work_area.y())) {
- SingleAxisUnmaximize(target_state,
- target_state->GetRestoreBoundsInScreen());
- } else {
- gfx::Point origin = target->bounds().origin();
- wm::ConvertPointToScreen(target->parent(), &origin);
- SingleAxisMaximize(target_state,
- gfx::Rect(origin.x(),
- work_area.y(),
- target->bounds().width(),
- work_area.height()));
- }
- } else if (component == HTLEFT || component == HTRIGHT) {
- // Don't maximize horizontally if the window has a max width defined.
- if (max_size.width() != 0)
- return;
- if (target_state->HasRestoreBounds() &&
- (target->bounds().width() == work_area.width() &&
- target->bounds().x() == work_area.x())) {
- SingleAxisUnmaximize(target_state,
- target_state->GetRestoreBoundsInScreen());
- } else {
- gfx::Point origin = target->bounds().origin();
- wm::ConvertPointToScreen(target->parent(), &origin);
- SingleAxisMaximize(target_state,
- gfx::Rect(work_area.x(),
- origin.y(),
- work_area.width(),
- target->bounds().height()));
- }
- }
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/workspace/workspace_event_handler.h b/chromium/ash/wm/workspace/workspace_event_handler.h
deleted file mode 100644
index e8507e167bf..00000000000
--- a/chromium/ash/wm/workspace/workspace_event_handler.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_H_
-#define ASH_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_H_
-
-#include "ash/wm/toplevel_window_event_handler.h"
-#include "ash/wm/workspace/multi_window_resize_controller.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-namespace wm {
-class WindowState;
-}
-
-namespace internal {
-
-class WorkspaceEventHandlerTestHelper;
-
-class WorkspaceEventHandler : public ToplevelWindowEventHandler {
- public:
- explicit WorkspaceEventHandler(aura::Window* owner);
- virtual ~WorkspaceEventHandler();
-
- // Overridden from ToplevelWindowEventHandler:
- virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- private:
- friend class WorkspaceEventHandlerTestHelper;
-
- // Determines if |event| corresponds to a double click on either the top or
- // bottom vertical resize edge, and if so toggles the vertical height of the
- // window between its restored state and the full available height of the
- // workspace.
- void HandleVerticalResizeDoubleClick(wm::WindowState* window_state,
- ui::MouseEvent* event);
-
- MultiWindowResizeController multi_window_resize_controller_;
-
- DISALLOW_COPY_AND_ASSIGN(WorkspaceEventHandler);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_H_
diff --git a/chromium/ash/wm/workspace/workspace_event_handler_test_helper.cc b/chromium/ash/wm/workspace/workspace_event_handler_test_helper.cc
deleted file mode 100644
index 55b707b4402..00000000000
--- a/chromium/ash/wm/workspace/workspace_event_handler_test_helper.cc
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/workspace/workspace_event_handler_test_helper.h"
-
-namespace ash {
-namespace internal {
-
-WorkspaceEventHandlerTestHelper::WorkspaceEventHandlerTestHelper(
- WorkspaceEventHandler* handler)
- : handler_(handler) {
-}
-
-WorkspaceEventHandlerTestHelper::~WorkspaceEventHandlerTestHelper() {
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/workspace/workspace_event_handler_test_helper.h b/chromium/ash/wm/workspace/workspace_event_handler_test_helper.h
deleted file mode 100644
index 21e1adb981b..00000000000
--- a/chromium/ash/wm/workspace/workspace_event_handler_test_helper.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_TEST_HELPER_H_
-#define ASH_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_TEST_HELPER_H_
-
-#include "ash/wm/workspace/workspace_event_handler.h"
-
-namespace ash {
-namespace internal {
-
-class WorkspaceEventHandlerTestHelper {
- public:
- explicit WorkspaceEventHandlerTestHelper(WorkspaceEventHandler* handler);
- ~WorkspaceEventHandlerTestHelper();
-
- MultiWindowResizeController* resize_controller() {
- return &(handler_->multi_window_resize_controller_);
- }
-
- private:
- WorkspaceEventHandler* handler_;
-
- DISALLOW_COPY_AND_ASSIGN(WorkspaceEventHandlerTestHelper);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_TEST_HELPER_H_
diff --git a/chromium/ash/wm/workspace/workspace_event_handler_unittest.cc b/chromium/ash/wm/workspace/workspace_event_handler_unittest.cc
deleted file mode 100644
index feec4bdbc6b..00000000000
--- a/chromium/ash/wm/workspace/workspace_event_handler_unittest.cc
+++ /dev/null
@@ -1,348 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/workspace/workspace_event_handler.h"
-
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace_controller.h"
-#include "ash/wm/workspace_controller_test_helper.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/aura/window.h"
-#include "ui/base/hit_test.h"
-#include "ui/gfx/screen.h"
-
-#if defined(OS_WIN)
-#include "base/win/windows_version.h"
-#endif
-
-namespace ash {
-namespace internal {
-
-class WorkspaceEventHandlerTest : public test::AshTestBase {
- public:
- WorkspaceEventHandlerTest() {}
- virtual ~WorkspaceEventHandlerTest() {}
-
- protected:
- aura::Window* CreateTestWindow(aura::WindowDelegate* delegate,
- const gfx::Rect& bounds) {
- aura::Window* window = new aura::Window(delegate);
- window->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window->Init(ui::LAYER_TEXTURED);
- ParentWindowInPrimaryRootWindow(window);
- window->SetBounds(bounds);
- window->Show();
- return window;
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WorkspaceEventHandlerTest);
-};
-
-// Keeps track of the properties changed of a particular window.
-class WindowPropertyObserver : public aura::WindowObserver {
- public:
- explicit WindowPropertyObserver(aura::Window* window)
- : window_(window) {
- window->AddObserver(this);
- }
-
- virtual ~WindowPropertyObserver() {
- window_->RemoveObserver(this);
- }
-
- bool DidPropertyChange(const void* property) const {
- return std::find(properties_changed_.begin(),
- properties_changed_.end(),
- property) != properties_changed_.end();
- }
-
- private:
- virtual void OnWindowPropertyChanged(aura::Window* window,
- const void* key,
- intptr_t old) OVERRIDE {
- properties_changed_.push_back(key);
- }
-
- aura::Window* window_;
- std::vector<const void*> properties_changed_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowPropertyObserver);
-};
-
-TEST_F(WorkspaceEventHandlerTest, DoubleClickSingleAxisResizeEdge) {
- // Double clicking the vertical resize edge of a window should maximize it
- // vertically.
- gfx::Rect restored_bounds(10, 10, 50, 50);
- aura::test::TestWindowDelegate wd;
- scoped_ptr<aura::Window> window(CreateTestWindow(&wd, restored_bounds));
-
- wm::ActivateWindow(window.get());
-
- gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(
- window.get()).work_area();
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
-
- // Double-click the top resize edge.
- wd.set_window_component(HTTOP);
- // On X a double click actually generates a drag between each press/release.
- // Explicitly trigger this path since we had bugs in dealing with it
- // correctly.
- generator.PressLeftButton();
- generator.ReleaseLeftButton();
- generator.set_flags(ui::EF_IS_DOUBLE_CLICK);
- generator.PressLeftButton();
- generator.MoveMouseTo(generator.current_location(), 1);
- generator.ReleaseLeftButton();
- gfx::Rect bounds_in_screen = window->GetBoundsInScreen();
- EXPECT_EQ(restored_bounds.x(), bounds_in_screen.x());
- EXPECT_EQ(restored_bounds.width(), bounds_in_screen.width());
- EXPECT_EQ(work_area.y(), bounds_in_screen.y());
- EXPECT_EQ(work_area.height(), bounds_in_screen.height());
-
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- // Single-axis maximization is not considered real maximization.
- EXPECT_FALSE(window_state->IsMaximized());
-
- // Restore.
- generator.DoubleClickLeftButton();
- bounds_in_screen = window->GetBoundsInScreen();
- EXPECT_EQ(restored_bounds.ToString(), bounds_in_screen.ToString());
- // Note that it should not even be restored at this point, it should have
- // also cleared the restore rectangle.
- EXPECT_FALSE(window_state->HasRestoreBounds());
-
- // Double-click the top resize edge again to maximize vertically, then double
- // click again to restore.
- generator.DoubleClickLeftButton();
- wd.set_window_component(HTCAPTION);
- generator.DoubleClickLeftButton();
- EXPECT_FALSE(window_state->IsMaximized());
- bounds_in_screen = window->GetBoundsInScreen();
- EXPECT_EQ(restored_bounds.ToString(), bounds_in_screen.ToString());
-
- // Double clicking the left resize edge should maximize horizontally.
- wd.set_window_component(HTLEFT);
- generator.DoubleClickLeftButton();
- bounds_in_screen = window->GetBoundsInScreen();
- EXPECT_EQ(restored_bounds.y(), bounds_in_screen.y());
- EXPECT_EQ(restored_bounds.height(), bounds_in_screen.height());
- EXPECT_EQ(work_area.x(), bounds_in_screen.x());
- EXPECT_EQ(work_area.width(), bounds_in_screen.width());
- // Single-axis maximization is not considered real maximization.
- EXPECT_FALSE(window_state->IsMaximized());
-
- // Restore.
- wd.set_window_component(HTCAPTION);
- generator.DoubleClickLeftButton();
- EXPECT_EQ(restored_bounds.ToString(), window->GetBoundsInScreen().ToString());
-
-#if defined(OS_WIN)
- // Multi display test does not run on Win8 bot. crbug.com/247427.
- if (base::win::GetVersion() >= base::win::VERSION_WIN8)
- return;
-#endif
-
- // Verify the double clicking the resize edge works on 2nd display too.
- UpdateDisplay("200x200,400x300");
- gfx::Rect work_area2 = ScreenAsh::GetSecondaryDisplay().work_area();
- restored_bounds.SetRect(220,20, 50, 50);
- window->SetBoundsInScreen(restored_bounds, ScreenAsh::GetSecondaryDisplay());
- aura::Window* second_root = Shell::GetAllRootWindows()[1];
- EXPECT_EQ(second_root, window->GetRootWindow());
- aura::test::EventGenerator generator2(second_root, window.get());
-
- // Y-axis maximization.
- wd.set_window_component(HTTOP);
- generator2.PressLeftButton();
- generator2.ReleaseLeftButton();
- generator2.set_flags(ui::EF_IS_DOUBLE_CLICK);
- generator2.PressLeftButton();
- generator2.MoveMouseTo(generator.current_location(), 1);
- generator2.ReleaseLeftButton();
- generator.DoubleClickLeftButton();
- bounds_in_screen = window->GetBoundsInScreen();
- EXPECT_EQ(restored_bounds.x(), bounds_in_screen.x());
- EXPECT_EQ(restored_bounds.width(), bounds_in_screen.width());
- EXPECT_EQ(work_area2.y(), bounds_in_screen.y());
- EXPECT_EQ(work_area2.height(), bounds_in_screen.height());
- EXPECT_FALSE(window_state->IsMaximized());
-
- // Restore.
- wd.set_window_component(HTCAPTION);
- generator2.DoubleClickLeftButton();
- EXPECT_EQ(restored_bounds.ToString(), window->GetBoundsInScreen().ToString());
-
- // X-axis maximization.
- wd.set_window_component(HTLEFT);
- generator2.DoubleClickLeftButton();
- bounds_in_screen = window->GetBoundsInScreen();
- EXPECT_EQ(restored_bounds.y(), bounds_in_screen.y());
- EXPECT_EQ(restored_bounds.height(), bounds_in_screen.height());
- EXPECT_EQ(work_area2.x(), bounds_in_screen.x());
- EXPECT_EQ(work_area2.width(), bounds_in_screen.width());
- EXPECT_FALSE(window_state->IsMaximized());
-
- // Restore.
- wd.set_window_component(HTCAPTION);
- generator2.DoubleClickLeftButton();
- EXPECT_EQ(restored_bounds.ToString(), window->GetBoundsInScreen().ToString());
-}
-
-TEST_F(WorkspaceEventHandlerTest,
- DoubleClickSingleAxisDoesntResizeVerticalEdgeIfConstrained) {
- gfx::Rect restored_bounds(10, 10, 50, 50);
- aura::test::TestWindowDelegate wd;
- scoped_ptr<aura::Window> window(CreateTestWindow(&wd, restored_bounds));
-
- wm::ActivateWindow(window.get());
-
- gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(
- window.get()).work_area();
-
- wd.set_maximum_size(gfx::Size(0, 100));
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
- // Double-click the top resize edge.
- wd.set_window_component(HTTOP);
- generator.DoubleClickLeftButton();
-
- // The size of the window should be unchanged.
- EXPECT_EQ(restored_bounds.y(), window->bounds().y());
- EXPECT_EQ(restored_bounds.height(), window->bounds().height());
-}
-
-TEST_F(WorkspaceEventHandlerTest,
- DoubleClickSingleAxisDoesntResizeHorizontalEdgeIfConstrained) {
- gfx::Rect restored_bounds(10, 10, 50, 50);
- aura::test::TestWindowDelegate wd;
- scoped_ptr<aura::Window> window(CreateTestWindow(&wd, restored_bounds));
-
- wm::ActivateWindow(window.get());
-
- gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(
- window.get()).work_area();
-
- wd.set_maximum_size(gfx::Size(100, 0));
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
- // Double-click the top resize edge.
- wd.set_window_component(HTRIGHT);
- generator.DoubleClickLeftButton();
-
- // The size of the window should be unchanged.
- EXPECT_EQ(restored_bounds.x(), window->bounds().x());
- EXPECT_EQ(restored_bounds.width(), window->bounds().width());
-}
-
-TEST_F(WorkspaceEventHandlerTest, DoubleClickCaptionTogglesMaximize) {
- aura::test::TestWindowDelegate wd;
- scoped_ptr<aura::Window> window(
- CreateTestWindow(&wd, gfx::Rect(1, 2, 30, 40)));
- window->SetProperty(aura::client::kCanMaximizeKey, true);
- wd.set_window_component(HTCAPTION);
-
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- EXPECT_FALSE(window_state->IsMaximized());
- aura::Window* root = Shell::GetPrimaryRootWindow();
- aura::test::EventGenerator generator(root, window.get());
- generator.DoubleClickLeftButton();
- EXPECT_NE("1,2 30x40", window->bounds().ToString());
-
- EXPECT_TRUE(window_state->IsMaximized());
- generator.DoubleClickLeftButton();
-
- EXPECT_FALSE(window_state->IsMaximized());
- EXPECT_EQ("1,2 30x40", window->bounds().ToString());
-
- // Double-clicking the middle button shouldn't toggle the maximized state.
- WindowPropertyObserver observer(window.get());
- ui::MouseEvent press(ui::ET_MOUSE_PRESSED, generator.current_location(),
- generator.current_location(),
- ui::EF_MIDDLE_MOUSE_BUTTON | ui::EF_IS_DOUBLE_CLICK);
- aura::WindowEventDispatcher* dispatcher = root->GetDispatcher();
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&press);
- ui::MouseEvent release(ui::ET_MOUSE_RELEASED, generator.current_location(),
- generator.current_location(),
- ui::EF_IS_DOUBLE_CLICK);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&release);
-
- EXPECT_FALSE(window_state->IsMaximized());
- EXPECT_EQ("1,2 30x40", window->bounds().ToString());
- EXPECT_FALSE(observer.DidPropertyChange(aura::client::kShowStateKey));
-}
-
-TEST_F(WorkspaceEventHandlerTest, DoubleTapCaptionTogglesMaximize) {
- aura::test::TestWindowDelegate wd;
- gfx::Rect bounds(10, 20, 30, 40);
- scoped_ptr<aura::Window> window(CreateTestWindow(&wd, bounds));
- window->SetProperty(aura::client::kCanMaximizeKey, true);
- wd.set_window_component(HTCAPTION);
-
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- EXPECT_FALSE(window_state->IsMaximized());
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
- generator.GestureTapAt(gfx::Point(25, 25));
- generator.GestureTapAt(gfx::Point(25, 25));
- RunAllPendingInMessageLoop();
- EXPECT_NE(bounds.ToString(), window->bounds().ToString());
- EXPECT_TRUE(window_state->IsMaximized());
-
- generator.GestureTapAt(gfx::Point(5, 5));
- generator.GestureTapAt(gfx::Point(10, 10));
-
- EXPECT_FALSE(window_state->IsMaximized());
- EXPECT_EQ(bounds.ToString(), window->bounds().ToString());
-}
-
-// Verifies deleting the window while dragging doesn't crash.
-TEST_F(WorkspaceEventHandlerTest, DeleteWhenDragging) {
- // Create a large window in the background. This is necessary so that when we
- // delete |window| WorkspaceEventHandler is still the active event handler.
- aura::test::TestWindowDelegate wd2;
- scoped_ptr<aura::Window> window2(
- CreateTestWindow(&wd2, gfx::Rect(0, 0, 500, 500)));
-
- aura::test::TestWindowDelegate wd;
- const gfx::Rect bounds(10, 20, 30, 40);
- scoped_ptr<aura::Window> window(CreateTestWindow(&wd, bounds));
- wd.set_window_component(HTCAPTION);
- aura::test::EventGenerator generator(window->GetRootWindow());
- generator.MoveMouseToCenterOf(window.get());
- generator.PressLeftButton();
- generator.MoveMouseTo(generator.current_location() + gfx::Vector2d(50, 50));
- DCHECK_NE(bounds.origin().ToString(), window->bounds().origin().ToString());
- window.reset();
- generator.MoveMouseTo(generator.current_location() + gfx::Vector2d(50, 50));
-}
-
-// Verifies deleting the window while in a run loop doesn't crash.
-TEST_F(WorkspaceEventHandlerTest, DeleteWhileInRunLoop) {
- aura::test::TestWindowDelegate wd;
- const gfx::Rect bounds(10, 20, 30, 40);
- scoped_ptr<aura::Window> window(CreateTestWindow(&wd, bounds));
- wd.set_window_component(HTCAPTION);
-
- ASSERT_TRUE(aura::client::GetWindowMoveClient(window->parent()));
- base::MessageLoop::current()->DeleteSoon(FROM_HERE, window.get());
- aura::client::GetWindowMoveClient(window->parent())
- ->RunMoveLoop(window.release(),
- gfx::Vector2d(),
- aura::client::WINDOW_MOVE_SOURCE_MOUSE);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/workspace/workspace_layout_manager.cc b/chromium/ash/wm/workspace/workspace_layout_manager.cc
deleted file mode 100644
index fe7d748d19b..00000000000
--- a/chromium/ash/wm/workspace/workspace_layout_manager.cc
+++ /dev/null
@@ -1,436 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/workspace/workspace_layout_manager.h"
-
-#include "ash/display/display_controller.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shell.h"
-#include "ash/wm/always_on_top_controller.h"
-#include "ash/wm/base_layout_manager.h"
-#include "ash/wm/window_animations.h"
-#include "ash/wm/window_positioner.h"
-#include "ash/wm/window_properties.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_observer.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/events/event.h"
-#include "ui/views/corewm/window_util.h"
-
-using aura::Window;
-
-namespace ash {
-
-namespace internal {
-
-namespace {
-
-// This specifies how much percent 30% of a window rect (width / height)
-// must be visible when the window is added to the workspace.
-const float kMinimumPercentOnScreenArea = 0.3f;
-
-void MoveToDisplayForRestore(wm::WindowState* window_state) {
- if (!window_state->HasRestoreBounds())
- return;
- const gfx::Rect& restore_bounds = window_state->GetRestoreBoundsInScreen();
-
- // Move only if the restore bounds is outside of
- // the display. There is no information about in which
- // display it should be restored, so this is best guess.
- // TODO(oshima): Restore information should contain the
- // work area information like WindowResizer does for the
- // last window location.
- gfx::Rect display_area = Shell::GetScreen()->GetDisplayNearestWindow(
- window_state->window()).bounds();
-
- if (!display_area.Intersects(restore_bounds)) {
- DisplayController* display_controller =
- Shell::GetInstance()->display_controller();
- const gfx::Display& display =
- display_controller->GetDisplayMatching(restore_bounds);
- aura::Window* new_root =
- display_controller->GetRootWindowForDisplayId(display.id());
- if (new_root != window_state->window()->GetRootWindow()) {
- aura::Window* new_container =
- Shell::GetContainer(new_root, window_state->window()->parent()->id());
- new_container->AddChild(window_state->window());
- }
- }
-}
-
-} // namespace
-
-WorkspaceLayoutManager::WorkspaceLayoutManager(aura::Window* window)
- : BaseLayoutManager(window->GetRootWindow()),
- shelf_(NULL),
- window_(window),
- work_area_in_parent_(ScreenAsh::GetDisplayWorkAreaBoundsInParent(
- window->parent())),
- is_fullscreen_(GetRootWindowController(
- window->GetRootWindow())->GetWindowForFullscreenMode() != NULL) {
-}
-
-WorkspaceLayoutManager::~WorkspaceLayoutManager() {
-}
-
-void WorkspaceLayoutManager::SetShelf(internal::ShelfLayoutManager* shelf) {
- shelf_ = shelf;
-}
-
-void WorkspaceLayoutManager::OnWindowAddedToLayout(Window* child) {
- AdjustWindowBoundsWhenAdded(wm::GetWindowState(child));
- BaseLayoutManager::OnWindowAddedToLayout(child);
- UpdateShelfVisibility();
- UpdateFullscreenState();
- WindowPositioner::RearrangeVisibleWindowOnShow(child);
-}
-
-void WorkspaceLayoutManager::OnWillRemoveWindowFromLayout(Window* child) {
- BaseLayoutManager::OnWillRemoveWindowFromLayout(child);
- if (child->TargetVisibility())
- WindowPositioner::RearrangeVisibleWindowOnHideOrRemove(child);
-}
-
-void WorkspaceLayoutManager::OnWindowRemovedFromLayout(Window* child) {
- BaseLayoutManager::OnWindowRemovedFromLayout(child);
- UpdateShelfVisibility();
- UpdateFullscreenState();
-}
-
-void WorkspaceLayoutManager::OnChildWindowVisibilityChanged(Window* child,
- bool visible) {
- BaseLayoutManager::OnChildWindowVisibilityChanged(child, visible);
- if (child->TargetVisibility()) {
- WindowPositioner::RearrangeVisibleWindowOnShow(child);
- } else {
- if (wm::GetWindowState(child)->IsFullscreen())
- UpdateFullscreenState();
- WindowPositioner::RearrangeVisibleWindowOnHideOrRemove(child);
- }
- UpdateShelfVisibility();
-}
-
-void WorkspaceLayoutManager::SetChildBounds(
- Window* child,
- const gfx::Rect& requested_bounds) {
- wm::WindowState* window_state = wm::GetWindowState(child);
- if (window_state->is_dragged()) {
- SetChildBoundsDirect(child, requested_bounds);
- } else if (!SetMaximizedOrFullscreenBounds(window_state)) {
- // Some windows rely on this to set their initial bounds.
- // Non-maximized/full-screen windows have their size constrained to the
- // work-area.
- gfx::Rect child_bounds(requested_bounds);
- child_bounds.set_width(std::min(work_area_in_parent_.width(),
- child_bounds.width()));
- child_bounds.set_height(std::min(work_area_in_parent_.height(),
- child_bounds.height()));
- AdjustSnappedBounds(window_state, &child_bounds);
- SetChildBoundsDirect(child, child_bounds);
- }
- UpdateShelfVisibility();
-}
-
-void WorkspaceLayoutManager::OnDisplayWorkAreaInsetsChanged() {
- const gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(
- window_->parent()));
- if (work_area != work_area_in_parent_) {
- AdjustAllWindowsBoundsForWorkAreaChange(
- ADJUST_WINDOW_WORK_AREA_INSETS_CHANGED);
- }
-}
-
-void WorkspaceLayoutManager::OnWindowPropertyChanged(Window* window,
- const void* key,
- intptr_t old) {
- if (key == aura::client::kAlwaysOnTopKey &&
- window->GetProperty(aura::client::kAlwaysOnTopKey)) {
- GetRootWindowController(window->GetRootWindow())->
- always_on_top_controller()->GetContainer(window)->AddChild(window);
- }
-}
-
-void WorkspaceLayoutManager::OnWindowStackingChanged(aura::Window* window) {
- BaseLayoutManager::OnWindowStackingChanged(window);
- UpdateShelfVisibility();
- UpdateFullscreenState();
-}
-
-void WorkspaceLayoutManager::OnWindowShowTypeChanged(
- wm::WindowState* window_state,
- wm::WindowShowType old_type) {
- ui::WindowShowState old_state = ToWindowShowState(old_type);
- ui::WindowShowState new_state = window_state->GetShowState();
- if (old_state != ui::SHOW_STATE_MINIMIZED &&
- !window_state->HasRestoreBounds() &&
- window_state->IsMaximizedOrFullscreen() &&
- !wm::WindowState::IsMaximizedOrFullscreenState(old_state)) {
- window_state->SaveCurrentBoundsForRestore();
- }
- // When restoring from a minimized state, we want to restore to the
- // previous (maybe L/R maximized) state. Since we do also want to keep the
- // restore rectangle, we set the restore rectangle to the rectangle we want
- // to restore to and restore it after we switched so that it is preserved.
- gfx::Rect restore;
- if (old_state == ui::SHOW_STATE_MINIMIZED &&
- (new_state == ui::SHOW_STATE_NORMAL ||
- new_state == ui::SHOW_STATE_DEFAULT) &&
- window_state->HasRestoreBounds() &&
- !window_state->always_restores_to_restore_bounds()) {
- restore = window_state->GetRestoreBoundsInScreen();
- window_state->SaveCurrentBoundsForRestore();
- }
- // Notify observers that fullscreen state may be changing.
- if (old_state != new_state &&
- (new_state == ui::SHOW_STATE_FULLSCREEN ||
- old_state == ui::SHOW_STATE_FULLSCREEN)) {
- UpdateFullscreenState();
- }
-
- UpdateBoundsFromShowState(window_state, old_state);
- ShowStateChanged(window_state, old_state);
-
- // Set the restore rectangle to the previously set restore rectangle.
- if (!restore.IsEmpty())
- window_state->SetRestoreBoundsInScreen(restore);
-}
-
-void WorkspaceLayoutManager::ShowStateChanged(
- wm::WindowState* state,
- ui::WindowShowState last_show_state) {
- BaseLayoutManager::ShowStateChanged(state, last_show_state);
- UpdateShelfVisibility();
-}
-
-void WorkspaceLayoutManager::AdjustAllWindowsBoundsForWorkAreaChange(
- AdjustWindowReason reason) {
- work_area_in_parent_ =
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(window_->parent());
- BaseLayoutManager::AdjustAllWindowsBoundsForWorkAreaChange(reason);
-}
-
-void WorkspaceLayoutManager::AdjustWindowBoundsForWorkAreaChange(
- wm::WindowState* window_state,
- AdjustWindowReason reason) {
- if (window_state->is_dragged())
- return;
-
- // Do not cross fade here: the window's layer hierarchy may be messed up for
- // the transition between mirroring and extended. See also: crbug.com/267698
- // TODO(oshima): Differentiate display change and shelf visibility change, and
- // bring back CrossFade animation.
- if (window_state->IsMaximized() &&
- reason == ADJUST_WINDOW_WORK_AREA_INSETS_CHANGED) {
- SetChildBoundsDirect(window_state->window(),
- ScreenAsh::GetMaximizedWindowBoundsInParent(
- window_state->window()->parent()->parent()));
- return;
- }
-
- if (SetMaximizedOrFullscreenBounds(window_state))
- return;
-
- gfx::Rect bounds = window_state->window()->bounds();
- switch (reason) {
- case ADJUST_WINDOW_DISPLAY_SIZE_CHANGED:
- // The work area may be smaller than the full screen. Put as much of the
- // window as possible within the display area.
- bounds.AdjustToFit(work_area_in_parent_);
- break;
- case ADJUST_WINDOW_WORK_AREA_INSETS_CHANGED:
- ash::wm::AdjustBoundsToEnsureMinimumWindowVisibility(
- work_area_in_parent_, &bounds);
- break;
- }
- AdjustSnappedBounds(window_state, &bounds);
- if (window_state->window()->bounds() != bounds)
- SetChildBoundsAnimated(window_state->window(), bounds);
-}
-
-void WorkspaceLayoutManager::AdjustWindowBoundsWhenAdded(
- wm::WindowState* window_state) {
- // Don't adjust window bounds if the bounds are empty as this
- // happens when a new views::Widget is created.
- // When a window is dragged and dropped onto a different
- // root window, the bounds will be updated after they are added
- // to the root window.
- if (window_state->window()->bounds().IsEmpty())
- return;
-
- if (window_state->is_dragged())
- return;
-
- if (SetMaximizedOrFullscreenBounds(window_state))
- return;
-
- Window* window = window_state->window();
- gfx::Rect bounds = window->bounds();
- int min_width = bounds.width() * kMinimumPercentOnScreenArea;
- int min_height = bounds.height() * kMinimumPercentOnScreenArea;
- // Use entire display instead of workarea because the workarea can
- // be further shrunk by the docked area. The logic ensures 30%
- // visibility which should be enough to see where the window gets
- // moved.
- gfx::Rect display_area = ScreenAsh::GetDisplayBoundsInParent(window);
-
- ash::wm::AdjustBoundsToEnsureWindowVisibility(
- display_area, min_width, min_height, &bounds);
- AdjustSnappedBounds(window_state, &bounds);
- if (window->bounds() != bounds)
- window->SetBounds(bounds);
-}
-
-void WorkspaceLayoutManager::UpdateShelfVisibility() {
- if (shelf_)
- shelf_->UpdateVisibilityState();
-}
-
-void WorkspaceLayoutManager::UpdateFullscreenState() {
- bool is_fullscreen = GetRootWindowController(
- window_->GetRootWindow())->GetWindowForFullscreenMode() != NULL;
- if (is_fullscreen != is_fullscreen_) {
- ash::Shell::GetInstance()->NotifyFullscreenStateChange(
- is_fullscreen, window_->GetRootWindow());
- is_fullscreen_ = is_fullscreen;
- }
-}
-
-void WorkspaceLayoutManager::UpdateBoundsFromShowState(
- wm::WindowState* window_state,
- ui::WindowShowState last_show_state) {
- aura::Window* window = window_state->window();
- // See comment in SetMaximizedOrFullscreenBounds() as to why we use parent in
- // these calculation.
- // TODO(varkha): Change the switch statement below to use wm::WindowShowType.
- switch (window_state->GetShowState()) {
- case ui::SHOW_STATE_DEFAULT:
- case ui::SHOW_STATE_NORMAL: {
- // Make sure that the part of the window is always visible
- // when restored.
- gfx::Rect bounds_in_parent;
- if (window_state->HasRestoreBounds()) {
- bounds_in_parent = window_state->GetRestoreBoundsInParent();
- ash::wm::AdjustBoundsToEnsureMinimumWindowVisibility(
- work_area_in_parent_, &bounds_in_parent);
- } else {
- // Minimized windows have no restore bounds.
- // Use the current bounds instead.
- bounds_in_parent = window->bounds();
- ash::wm::AdjustBoundsToEnsureMinimumWindowVisibility(
- work_area_in_parent_, &bounds_in_parent);
- // Don't start animation if the bounds didn't change.
- if (bounds_in_parent == window->bounds())
- bounds_in_parent.SetRect(0, 0, 0, 0);
- }
- if (!bounds_in_parent.IsEmpty()) {
- if ((last_show_state == ui::SHOW_STATE_DEFAULT ||
- last_show_state == ui::SHOW_STATE_NORMAL) &&
- window_state->IsSnapped()) {
- AdjustSnappedBounds(window_state, &bounds_in_parent);
- SetChildBoundsAnimated(window, bounds_in_parent);
- } else {
- gfx::Rect new_bounds = BaseLayoutManager::BoundsWithScreenEdgeVisible(
- window->parent()->parent(),
- bounds_in_parent);
- if (last_show_state == ui::SHOW_STATE_MINIMIZED)
- SetChildBoundsDirect(window, new_bounds);
- else
- CrossFadeToBounds(window, new_bounds);
- }
- }
- window_state->ClearRestoreBounds();
- break;
- }
-
- case ui::SHOW_STATE_MAXIMIZED: {
- MoveToDisplayForRestore(window_state);
- gfx::Rect new_bounds = ScreenAsh::GetMaximizedWindowBoundsInParent(
- window->parent()->parent());
- // If the window is restored from minimized state, do not make the cross
- // fade animation and set the child bounds directly. The restoring
- // animation will be done by ash/wm/window_animations.cc.
- if (last_show_state == ui::SHOW_STATE_MINIMIZED)
- SetChildBoundsDirect(window, new_bounds);
- else
- CrossFadeToBounds(window, new_bounds);
- break;
- }
-
- case ui::SHOW_STATE_FULLSCREEN: {
- MoveToDisplayForRestore(window_state);
- gfx::Rect new_bounds = ScreenAsh::GetDisplayBoundsInParent(
- window->parent()->parent());
- if (window_state->animate_to_fullscreen() &&
- last_show_state != ui::SHOW_STATE_MINIMIZED) {
- CrossFadeToBounds(window, new_bounds);
- } else {
- SetChildBoundsDirect(window, new_bounds);
- }
- break;
- }
-
- default:
- break;
- }
-}
-
-bool WorkspaceLayoutManager::SetMaximizedOrFullscreenBounds(
- wm::WindowState* window_state) {
- DCHECK(!window_state->is_dragged());
-
- // During animations there is a transform installed on the workspace
- // windows. For this reason this code uses the parent so that the transform is
- // ignored.
- if (window_state->IsMaximized()) {
- SetChildBoundsDirect(
- window_state->window(), ScreenAsh::GetMaximizedWindowBoundsInParent(
- window_state->window()->parent()->parent()));
- return true;
- }
- if (window_state->IsFullscreen()) {
- SetChildBoundsDirect(
- window_state->window(),
- ScreenAsh::GetDisplayBoundsInParent(
- window_state->window()->parent()->parent()));
- return true;
- }
- return false;
-}
-
-void WorkspaceLayoutManager::AdjustSnappedBounds(wm::WindowState* window_state,
- gfx::Rect* bounds) {
- if (window_state->is_dragged() || !window_state->IsSnapped())
- return;
- gfx::Rect maximized_bounds = ScreenAsh::GetMaximizedWindowBoundsInParent(
- window_state->window()->parent()->parent());
- if (window_state->window_show_type() == wm::SHOW_TYPE_LEFT_SNAPPED)
- bounds->set_x(maximized_bounds.x());
- else if (window_state->window_show_type() == wm::SHOW_TYPE_RIGHT_SNAPPED)
- bounds->set_x(maximized_bounds.right() - bounds->width());
- bounds->set_y(maximized_bounds.y());
- // TODO(varkha): Set width to 50% here for snapped windows.
- bounds->set_height(maximized_bounds.height());
-}
-
-void WorkspaceLayoutManager::SetChildBoundsAnimated(Window* child,
- const gfx::Rect& bounds) {
- const int kBoundsChangeSlideDurationMs = 120;
-
- ui::Layer* layer = child->layer();
- ui::ScopedLayerAnimationSettings slide_settings(layer->GetAnimator());
- slide_settings.SetPreemptionStrategy(
- ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
- slide_settings.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kBoundsChangeSlideDurationMs));
- SetChildBoundsDirect(child, bounds);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/workspace/workspace_layout_manager.h b/chromium/ash/wm/workspace/workspace_layout_manager.h
deleted file mode 100644
index ab4876c5b2e..00000000000
--- a/chromium/ash/wm/workspace/workspace_layout_manager.h
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_
-#define ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_
-
-#include <set>
-
-#include "ash/shell_observer.h"
-#include "ash/wm/base_layout_manager.h"
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/aura/window_observer.h"
-#include "ui/gfx/rect.h"
-
-namespace aura {
-class RootWindow;
-class Window;
-}
-
-namespace ui {
-class Layer;
-}
-
-namespace ash {
-
-namespace internal {
-
-class ShelfLayoutManager;
-
-// LayoutManager used on the window created for a workspace.
-class ASH_EXPORT WorkspaceLayoutManager : public BaseLayoutManager {
- public:
- explicit WorkspaceLayoutManager(aura::Window* window);
- virtual ~WorkspaceLayoutManager();
-
- void SetShelf(internal::ShelfLayoutManager* shelf);
-
- // Overridden from aura::LayoutManager:
- virtual void OnWindowResized() OVERRIDE {}
- virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE;
- virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE;
- virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE;
- virtual void OnChildWindowVisibilityChanged(aura::Window* child,
- bool visibile) OVERRIDE;
- virtual void SetChildBounds(aura::Window* child,
- const gfx::Rect& requested_bounds) OVERRIDE;
-
- // ash::ShellObserver overrides:
- virtual void OnDisplayWorkAreaInsetsChanged() OVERRIDE;
-
- // Overriden from WindowObserver:
- virtual void OnWindowPropertyChanged(aura::Window* window,
- const void* key,
- intptr_t old) OVERRIDE;
- virtual void OnWindowStackingChanged(aura::Window* window) OVERRIDE;
-
- // WindowStateObserver overrides:
- virtual void OnWindowShowTypeChanged(wm::WindowState* window_state,
- wm::WindowShowType old_type) OVERRIDE;
-
- private:
- // Overridden from BaseLayoutManager:
- virtual void ShowStateChanged(wm::WindowState* window_state,
- ui::WindowShowState last_show_state) OVERRIDE;
- virtual void AdjustAllWindowsBoundsForWorkAreaChange(
- AdjustWindowReason reason) OVERRIDE;
- virtual void AdjustWindowBoundsForWorkAreaChange(
- wm::WindowState* window_state,
- AdjustWindowReason reason) OVERRIDE;
-
- void AdjustWindowBoundsWhenAdded(wm::WindowState* window_state);
-
- // Updates the visibility state of the shelf.
- void UpdateShelfVisibility();
-
- // Updates the fullscreen state of the workspace and notifies Shell if it
- // has changed.
- void UpdateFullscreenState();
-
- // Updates the bounds of the window for a show state change from
- // |last_show_state|.
- void UpdateBoundsFromShowState(wm::WindowState* window_state,
- ui::WindowShowState last_show_state);
-
- // If |window_state| is maximized or fullscreen the bounds of the
- // window are set and true is returned. Does nothing otherwise.
- bool SetMaximizedOrFullscreenBounds(wm::WindowState* window_state);
-
- // Adjusts the |bounds| so that they are flush with the edge of the
- // workspace if the window represented by |window_state| is side snapped.
- void AdjustSnappedBounds(wm::WindowState* window_state, gfx::Rect* bounds);
-
- // Animates the window bounds to |bounds|.
- void SetChildBoundsAnimated(aura::Window* child, const gfx::Rect& bounds);
-
- internal::ShelfLayoutManager* shelf_;
- aura::Window* window_;
-
- // The work area. Cached to avoid unnecessarily moving windows during a
- // workspace switch.
- gfx::Rect work_area_in_parent_;
-
- // True if this workspace is currently in fullscreen mode.
- bool is_fullscreen_;
-
- DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_
diff --git a/chromium/ash/wm/workspace/workspace_layout_manager_unittest.cc b/chromium/ash/wm/workspace/workspace_layout_manager_unittest.cc
deleted file mode 100644
index d12fb15bb79..00000000000
--- a/chromium/ash/wm/workspace/workspace_layout_manager_unittest.cc
+++ /dev/null
@@ -1,481 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/workspace/workspace_layout_manager.h"
-
-#include "ash/display/display_layout.h"
-#include "ash/display/display_manager.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_observer.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/gfx/insets.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
-
-namespace ash {
-namespace {
-
-class MaximizeDelegateView : public views::WidgetDelegateView {
- public:
- MaximizeDelegateView(const gfx::Rect& initial_bounds)
- : initial_bounds_(initial_bounds) {
- }
- virtual ~MaximizeDelegateView() {}
-
- virtual bool GetSavedWindowPlacement(
- const views::Widget* widget,
- gfx::Rect* bounds,
- ui::WindowShowState* show_state) const OVERRIDE {
- *bounds = initial_bounds_;
- *show_state = ui::SHOW_STATE_MAXIMIZED;
- return true;
- }
-
- private:
- const gfx::Rect initial_bounds_;
-
- DISALLOW_COPY_AND_ASSIGN(MaximizeDelegateView);
-};
-
-class TestShellObserver : public ShellObserver {
- public:
- TestShellObserver() : call_count_(0),
- is_fullscreen_(false) {
- Shell::GetInstance()->AddShellObserver(this);
- }
-
- virtual ~TestShellObserver() {
- Shell::GetInstance()->RemoveShellObserver(this);
- }
-
- virtual void OnFullscreenStateChanged(bool is_fullscreen,
- aura::Window* root_window) OVERRIDE {
- call_count_++;
- is_fullscreen_ = is_fullscreen;
- }
-
- int call_count() const {
- return call_count_;
- }
-
- bool is_fullscreen() const {
- return is_fullscreen_;
- }
-
- private:
- int call_count_;
- bool is_fullscreen_;
-
- DISALLOW_COPY_AND_ASSIGN(TestShellObserver);
-};
-
-} // namespace
-
-typedef test::AshTestBase WorkspaceLayoutManagerTest;
-
-// Verifies that a window containing a restore coordinate will be restored to
-// to the size prior to minimize, keeping the restore rectangle in tact (if
-// there is one).
-TEST_F(WorkspaceLayoutManagerTest, RestoreFromMinimizeKeepsRestore) {
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(1, 2, 3, 4)));
- gfx::Rect bounds(10, 15, 25, 35);
- window->SetBounds(bounds);
-
- wm::WindowState* window_state = wm::GetWindowState(window.get());
-
- // This will not be used for un-minimizing window.
- window_state->SetRestoreBoundsInScreen(gfx::Rect(0, 0, 100, 100));
- window_state->Minimize();
- window_state->Restore();
- EXPECT_EQ("0,0 100x100", window_state->GetRestoreBoundsInScreen().ToString());
- EXPECT_EQ("10,15 25x35", window.get()->bounds().ToString());
-
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("400x300,500x400");
- window->SetBoundsInScreen(gfx::Rect(600, 0, 100, 100),
- ScreenAsh::GetSecondaryDisplay());
- EXPECT_EQ(Shell::GetAllRootWindows()[1], window->GetRootWindow());
- window_state->Minimize();
- // This will not be used for un-minimizing window.
- window_state->SetRestoreBoundsInScreen(gfx::Rect(0, 0, 100, 100));
- window_state->Restore();
- EXPECT_EQ("600,0 100x100", window->GetBoundsInScreen().ToString());
-
- // Make sure the unminimized window moves inside the display when
- // 2nd display is disconnected.
- window_state->Minimize();
- UpdateDisplay("400x300");
- window_state->Restore();
- EXPECT_EQ(Shell::GetPrimaryRootWindow(), window->GetRootWindow());
- EXPECT_TRUE(
- Shell::GetPrimaryRootWindow()->bounds().Intersects(window->bounds()));
-}
-
-TEST_F(WorkspaceLayoutManagerTest, KeepMinimumVisibilityInDisplays) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("300x400,400x500");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- DisplayLayout layout(DisplayLayout::TOP, 0);
- Shell::GetInstance()->display_manager()->
- SetLayoutForCurrentDisplays(layout);
- EXPECT_EQ("0,-500 400x500", root_windows[1]->GetBoundsInScreen().ToString());
-
- scoped_ptr<aura::Window> window1(
- CreateTestWindowInShellWithBounds(gfx::Rect(10, -400, 200, 200)));
- EXPECT_EQ("10,-400 200x200", window1->GetBoundsInScreen().ToString());
-
- // Make sure the caption is visible.
- scoped_ptr<aura::Window> window2(
- CreateTestWindowInShellWithBounds(gfx::Rect(10, -600, 200, 200)));
- EXPECT_EQ("10,-500 200x200", window2->GetBoundsInScreen().ToString());
-}
-
-TEST_F(WorkspaceLayoutManagerTest, KeepRestoredWindowInDisplay) {
- if (!SupportsHostWindowResize())
- return;
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(1, 2, 30, 40)));
- wm::WindowState* window_state = wm::GetWindowState(window.get());
-
- // Maximized -> Normal transition.
- window_state->Maximize();
- window_state->SetRestoreBoundsInScreen(gfx::Rect(-100, -100, 30, 40));
- window_state->Restore();
- EXPECT_TRUE(
- Shell::GetPrimaryRootWindow()->bounds().Intersects(window->bounds()));
- // Y bounds should not be negative.
- EXPECT_EQ("-20,0 30x40", window->bounds().ToString());
-
- // Minimized -> Normal transition.
- window->SetBounds(gfx::Rect(-100, -100, 30, 40));
- window_state->Minimize();
- EXPECT_FALSE(
- Shell::GetPrimaryRootWindow()->bounds().Intersects(window->bounds()));
- EXPECT_EQ("-100,-100 30x40", window->bounds().ToString());
- window->Show();
- EXPECT_TRUE(
- Shell::GetPrimaryRootWindow()->bounds().Intersects(window->bounds()));
- // Y bounds should not be negative.
- EXPECT_EQ("-20,0 30x40", window->bounds().ToString());
-
- // Fullscreen -> Normal transition.
- window->SetBounds(gfx::Rect(0, 0, 30, 40)); // reset bounds.
- ASSERT_EQ("0,0 30x40", window->bounds().ToString());
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- EXPECT_EQ(window->bounds(), window->GetRootWindow()->bounds());
- window_state->SetRestoreBoundsInScreen(gfx::Rect(-100, -100, 30, 40));
- window_state->Restore();
- EXPECT_TRUE(
- Shell::GetPrimaryRootWindow()->bounds().Intersects(window->bounds()));
- // Y bounds should not be negative.
- EXPECT_EQ("-20,0 30x40", window->bounds().ToString());
-}
-
-TEST_F(WorkspaceLayoutManagerTest, MaximizeInDisplayToBeRestored) {
- if (!SupportsMultipleDisplays())
- return;
- UpdateDisplay("300x400,400x500");
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(1, 2, 30, 40)));
- EXPECT_EQ(root_windows[0], window->GetRootWindow());
-
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- window_state->SetRestoreBoundsInScreen(gfx::Rect(400, 0, 30, 40));
- // Maximize the window in 2nd display as the restore bounds
- // is inside 2nd display.
- window_state->Maximize();
- EXPECT_EQ(root_windows[1], window->GetRootWindow());
- EXPECT_EQ("300,0 400x453", window->GetBoundsInScreen().ToString());
-
- window_state->Restore();
- EXPECT_EQ(root_windows[1], window->GetRootWindow());
- EXPECT_EQ("400,0 30x40", window->GetBoundsInScreen().ToString());
-
- // If the restore bounds intersects with the current display,
- // don't move.
- window_state->SetRestoreBoundsInScreen(gfx::Rect(280, 0, 30, 40));
- window_state->Maximize();
- EXPECT_EQ(root_windows[1], window->GetRootWindow());
- EXPECT_EQ("300,0 400x453", window->GetBoundsInScreen().ToString());
-
- window_state->Restore();
- EXPECT_EQ(root_windows[1], window->GetRootWindow());
- EXPECT_EQ("280,0 30x40", window->GetBoundsInScreen().ToString());
-
- // Restoring widget state.
- scoped_ptr<views::Widget> w1(new views::Widget);
- views::Widget::InitParams params;
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.delegate = new MaximizeDelegateView(gfx::Rect(400, 0, 30, 40));
- params.context = root_windows[0];
- w1->Init(params);
- w1->Show();
- EXPECT_TRUE(w1->IsMaximized());
- EXPECT_EQ(root_windows[1], w1->GetNativeView()->GetRootWindow());
- EXPECT_EQ("300,0 400x453", w1->GetWindowBoundsInScreen().ToString());
- w1->Restore();
- EXPECT_EQ(root_windows[1], w1->GetNativeView()->GetRootWindow());
- EXPECT_EQ("400,0 30x40", w1->GetWindowBoundsInScreen().ToString());
-}
-
-TEST_F(WorkspaceLayoutManagerTest, FullscreenInDisplayToBeRestored) {
- if (!SupportsMultipleDisplays())
- return;
- UpdateDisplay("300x400,400x500");
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(1, 2, 30, 40)));
- EXPECT_EQ(root_windows[0], window->GetRootWindow());
-
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- window_state->SetRestoreBoundsInScreen(gfx::Rect(400, 0, 30, 40));
- // Maximize the window in 2nd display as the restore bounds
- // is inside 2nd display.
- window->SetProperty(aura::client::kShowStateKey,
- ui::SHOW_STATE_FULLSCREEN);
- EXPECT_EQ(root_windows[1], window->GetRootWindow());
- EXPECT_EQ("300,0 400x500", window->GetBoundsInScreen().ToString());
-
- window_state->Restore();
- EXPECT_EQ(root_windows[1], window->GetRootWindow());
- EXPECT_EQ("400,0 30x40", window->GetBoundsInScreen().ToString());
-
- // If the restore bounds intersects with the current display,
- // don't move.
- window_state->SetRestoreBoundsInScreen(gfx::Rect(280, 0, 30, 40));
- window->SetProperty(aura::client::kShowStateKey,
- ui::SHOW_STATE_FULLSCREEN);
- EXPECT_EQ(root_windows[1], window->GetRootWindow());
- EXPECT_EQ("300,0 400x500", window->GetBoundsInScreen().ToString());
-
- window_state->Restore();
- EXPECT_EQ(root_windows[1], window->GetRootWindow());
- EXPECT_EQ("280,0 30x40", window->GetBoundsInScreen().ToString());
-}
-
-// WindowObserver implementation used by DontClobberRestoreBoundsWindowObserver.
-// This code mirrors what BrowserFrameAsh does. In particular when this code
-// sees the window was maximized it changes the bounds of a secondary
-// window. The secondary window mirrors the status window.
-class DontClobberRestoreBoundsWindowObserver : public aura::WindowObserver {
- public:
- DontClobberRestoreBoundsWindowObserver() : window_(NULL) {}
-
- void set_window(aura::Window* window) { window_ = window; }
-
- virtual void OnWindowPropertyChanged(aura::Window* window,
- const void* key,
- intptr_t old) OVERRIDE {
- if (!window_)
- return;
-
- if (wm::GetWindowState(window)->IsMaximized()) {
- aura::Window* w = window_;
- window_ = NULL;
-
- gfx::Rect shelf_bounds(Shell::GetPrimaryRootWindowController()->
- GetShelfLayoutManager()->GetIdealBounds());
- const gfx::Rect& window_bounds(w->bounds());
- w->SetBounds(gfx::Rect(window_bounds.x(), shelf_bounds.y() - 1,
- window_bounds.width(), window_bounds.height()));
- }
- }
-
- private:
- aura::Window* window_;
-
- DISALLOW_COPY_AND_ASSIGN(DontClobberRestoreBoundsWindowObserver);
-};
-
-// Creates a window, maximized the window and from within the maximized
-// notification sets the bounds of a window to overlap the shelf. Verifies this
-// doesn't effect the restore bounds.
-TEST_F(WorkspaceLayoutManagerTest, DontClobberRestoreBounds) {
- DontClobberRestoreBoundsWindowObserver window_observer;
- scoped_ptr<aura::Window> window(new aura::Window(NULL));
- window->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window->Init(ui::LAYER_TEXTURED);
- window->SetBounds(gfx::Rect(10, 20, 30, 40));
- // NOTE: for this test to exercise the failure the observer needs to be added
- // before the parent set. This mimics what BrowserFrameAsh does.
- window->AddObserver(&window_observer);
- ParentWindowInPrimaryRootWindow(window.get());
- window->Show();
-
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- window_state->Activate();
-
- scoped_ptr<aura::Window> window2(
- CreateTestWindowInShellWithBounds(gfx::Rect(12, 20, 30, 40)));
- window->AddTransientChild(window2.get());
- window2->Show();
-
- window_observer.set_window(window2.get());
- window_state->Maximize();
- EXPECT_EQ("10,20 30x40",
- window_state->GetRestoreBoundsInScreen().ToString());
- window->RemoveObserver(&window_observer);
-}
-
-// Verifies when a window is maximized all descendant windows have a size.
-TEST_F(WorkspaceLayoutManagerTest, ChildBoundsResetOnMaximize) {
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(gfx::Rect(10, 20, 30, 40)));
- window->Show();
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- window_state->Activate();
- scoped_ptr<aura::Window> child_window(
- aura::test::CreateTestWindowWithBounds(gfx::Rect(5, 6, 7, 8),
- window.get()));
- child_window->Show();
- window_state->Maximize();
- EXPECT_EQ("5,6 7x8", child_window->bounds().ToString());
-}
-
-TEST_F(WorkspaceLayoutManagerTest, WindowShouldBeOnScreenWhenAdded) {
- // Normal window bounds shouldn't be changed.
- gfx::Rect window_bounds(100, 100, 200, 200);
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(window_bounds));
- EXPECT_EQ(window_bounds, window->bounds());
-
- // If the window is out of the workspace, it would be moved on screen.
- gfx::Rect root_window_bounds =
- Shell::GetInstance()->GetPrimaryRootWindow()->bounds();
- window_bounds.Offset(root_window_bounds.width(), root_window_bounds.height());
- ASSERT_FALSE(window_bounds.Intersects(root_window_bounds));
- scoped_ptr<aura::Window> out_window(
- CreateTestWindowInShellWithBounds(window_bounds));
- EXPECT_EQ(window_bounds.size(), out_window->bounds().size());
- gfx::Rect bounds = out_window->bounds();
- bounds.Intersect(root_window_bounds);
-
- // 30% of the window edge must be visible.
- EXPECT_GT(bounds.width(), out_window->bounds().width() * 0.29);
- EXPECT_GT(bounds.height(), out_window->bounds().height() * 0.29);
-
- aura::Window* parent = out_window->parent();
- parent->RemoveChild(out_window.get());
- out_window->SetBounds(gfx::Rect(-200, -200, 200, 200));
- // UserHasChangedWindowPositionOrSize flag shouldn't turn off this behavior.
- wm::GetWindowState(window.get())->set_bounds_changed_by_user(true);
- parent->AddChild(out_window.get());
- EXPECT_GT(bounds.width(), out_window->bounds().width() * 0.29);
- EXPECT_GT(bounds.height(), out_window->bounds().height() * 0.29);
-
- // Make sure we always make more than 1/3 of the window edge visible even
- // if the initial bounds intersects with display.
- window_bounds.SetRect(-150, -150, 200, 200);
- bounds = window_bounds;
- bounds.Intersect(root_window_bounds);
-
- // Make sure that the initial bounds' visible area is less than 26%
- // so that the auto adjustment logic kicks in.
- ASSERT_LT(bounds.width(), out_window->bounds().width() * 0.26);
- ASSERT_LT(bounds.height(), out_window->bounds().height() * 0.26);
- ASSERT_TRUE(window_bounds.Intersects(root_window_bounds));
-
- scoped_ptr<aura::Window> partially_out_window(
- CreateTestWindowInShellWithBounds(window_bounds));
- EXPECT_EQ(window_bounds.size(), partially_out_window->bounds().size());
- bounds = partially_out_window->bounds();
- bounds.Intersect(root_window_bounds);
- EXPECT_GT(bounds.width(), out_window->bounds().width() * 0.29);
- EXPECT_GT(bounds.height(), out_window->bounds().height() * 0.29);
-
- // Make sure the window whose 30% width/height is bigger than display
- // will be placed correctly.
- window_bounds.SetRect(-1900, -1900, 3000, 3000);
- scoped_ptr<aura::Window> window_bigger_than_display(
- CreateTestWindowInShellWithBounds(window_bounds));
- EXPECT_GE(root_window_bounds.width(),
- window_bigger_than_display->bounds().width());
- EXPECT_GE(root_window_bounds.height(),
- window_bigger_than_display->bounds().height());
-
- bounds = window_bigger_than_display->bounds();
- bounds.Intersect(root_window_bounds);
- EXPECT_GT(bounds.width(), out_window->bounds().width() * 0.29);
- EXPECT_GT(bounds.height(), out_window->bounds().height() * 0.29);
-}
-
-// Verifies the size of a window is enforced to be smaller than the work area.
-TEST_F(WorkspaceLayoutManagerTest, SizeToWorkArea) {
- // Normal window bounds shouldn't be changed.
- gfx::Size work_area(
- Shell::GetScreen()->GetPrimaryDisplay().work_area().size());
- const gfx::Rect window_bounds(
- 100, 101, work_area.width() + 1, work_area.height() + 2);
- scoped_ptr<aura::Window> window(
- CreateTestWindowInShellWithBounds(window_bounds));
- EXPECT_EQ(gfx::Rect(gfx::Point(100, 101), work_area).ToString(),
- window->bounds().ToString());
-
- // Directly setting the bounds triggers a slightly different code path. Verify
- // that too.
- window->SetBounds(window_bounds);
- EXPECT_EQ(gfx::Rect(gfx::Point(100, 101), work_area).ToString(),
- window->bounds().ToString());
-}
-
-TEST_F(WorkspaceLayoutManagerTest, NotifyFullscreenChanges) {
- TestShellObserver observer;
- scoped_ptr<aura::Window> window1(
- CreateTestWindowInShellWithBounds(gfx::Rect(1, 2, 30, 40)));
- scoped_ptr<aura::Window> window2(
- CreateTestWindowInShellWithBounds(gfx::Rect(1, 2, 30, 40)));
- wm::WindowState* window_state1 = wm::GetWindowState(window1.get());
- wm::WindowState* window_state2 = wm::GetWindowState(window2.get());
- window_state2->Activate();
-
- window_state2->ToggleFullscreen();
- EXPECT_EQ(1, observer.call_count());
- EXPECT_TRUE(observer.is_fullscreen());
-
- // When window1 moves to the front the fullscreen state should change.
- window_state1->Activate();
- EXPECT_EQ(2, observer.call_count());
- EXPECT_FALSE(observer.is_fullscreen());
-
- // It should change back if window2 becomes active again.
- window_state2->Activate();
- EXPECT_EQ(3, observer.call_count());
- EXPECT_TRUE(observer.is_fullscreen());
-
- window_state2->ToggleFullscreen();
- EXPECT_EQ(4, observer.call_count());
- EXPECT_FALSE(observer.is_fullscreen());
-
- window_state2->ToggleFullscreen();
- EXPECT_EQ(5, observer.call_count());
- EXPECT_TRUE(observer.is_fullscreen());
-
- // Closing the window should change the fullscreen state.
- window2.reset();
- EXPECT_EQ(6, observer.call_count());
- EXPECT_FALSE(observer.is_fullscreen());
-}
-
-} // namespace ash
diff --git a/chromium/ash/wm/workspace/workspace_types.h b/chromium/ash/wm/workspace/workspace_types.h
deleted file mode 100644
index 9572a328d8b..00000000000
--- a/chromium/ash/wm/workspace/workspace_types.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WORKSPACE_WORKSPACE_TYPES_H_
-#define ASH_WM_WORKSPACE_WORKSPACE_TYPES_H_
-
-namespace ash {
-
-// Enumeration of the possible window states.
-enum WorkspaceWindowState {
- // There's a full screen window.
- WORKSPACE_WINDOW_STATE_FULL_SCREEN,
-
- // There's a maximized window.
- WORKSPACE_WINDOW_STATE_MAXIMIZED,
-
- // At least one window overlaps the shelf.
- WORKSPACE_WINDOW_STATE_WINDOW_OVERLAPS_SHELF,
-
- // None of the windows are fullscreen, maximized or touch the shelf.
- WORKSPACE_WINDOW_STATE_DEFAULT,
-};
-
-} // namespace ash
-
-#endif // ASH_WM_WORKSPACE_WORKSPACE_TYPES_H_
diff --git a/chromium/ash/wm/workspace/workspace_window_resizer.cc b/chromium/ash/wm/workspace/workspace_window_resizer.cc
deleted file mode 100644
index b8cd5049448..00000000000
--- a/chromium/ash/wm/workspace/workspace_window_resizer.cc
+++ /dev/null
@@ -1,1051 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/workspace/workspace_window_resizer.h"
-
-#include <algorithm>
-#include <cmath>
-#include <utility>
-#include <vector>
-
-#include "ash/ash_switches.h"
-#include "ash/display/display_controller.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/coordinate_conversion.h"
-#include "ash/wm/default_window_resizer.h"
-#include "ash/wm/dock/docked_window_layout_manager.h"
-#include "ash/wm/dock/docked_window_resizer.h"
-#include "ash/wm/drag_window_resizer.h"
-#include "ash/wm/panels/panel_window_resizer.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/phantom_window_controller.h"
-#include "ash/wm/workspace/snap_sizer.h"
-#include "base/command_line.h"
-#include "base/memory/weak_ptr.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/client/window_types.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/base/hit_test.h"
-#include "ui/compositor/layer.h"
-#include "ui/gfx/screen.h"
-#include "ui/gfx/transform.h"
-
-namespace ash {
-
-scoped_ptr<WindowResizer> CreateWindowResizer(
- aura::Window* window,
- const gfx::Point& point_in_parent,
- int window_component,
- aura::client::WindowMoveSource source) {
- DCHECK(window);
- wm::WindowState* window_state = wm::GetWindowState(window);
- // No need to return a resizer when the window cannot get resized or when a
- // resizer already exists for this window.
- if ((!window_state->CanResize() && window_component != HTCAPTION) ||
- window_state->window_resizer()) {
- return scoped_ptr<WindowResizer>();
- }
-
- // TODO(varkha): The chaining of window resizers causes some of the logic
- // to be repeated and the logic flow difficult to control. With some windows
- // classes using reparenting during drag operations it becomes challenging to
- // implement proper transition from one resizer to another during or at the
- // end of the drag. This also causes http://crbug.com/247085.
- // It seems the only thing the panel or dock resizer needs to do is notify the
- // layout manager when a docked window is being dragged. We should have a
- // better way of doing this, perhaps by having a way of observing drags or
- // having a generic drag window wrapper which informs a layout manager that a
- // drag has started or stopped.
- // It may be possible to refactor and eliminate chaining.
- WindowResizer* window_resizer = NULL;
- if (window->parent() &&
- (window->parent()->id() == internal::kShellWindowId_DefaultContainer ||
- window->parent()->id() == internal::kShellWindowId_DockedContainer ||
- window->parent()->id() == internal::kShellWindowId_PanelContainer)) {
- // Allow dragging maximized windows if it's not tracked by workspace. This
- // is set by tab dragging code.
- if (!window_state->IsNormalShowState() &&
- (window_component != HTCAPTION ||
- !window_state->is_dragged())) {
- return scoped_ptr<WindowResizer>();
- }
- window_resizer = internal::WorkspaceWindowResizer::Create(
- window,
- point_in_parent,
- window_component,
- source,
- std::vector<aura::Window*>());
- } else if (window_state->IsNormalShowState()) {
- window_resizer = DefaultWindowResizer::Create(
- window, point_in_parent, window_component, source);
- }
- if (window_resizer) {
- window_resizer = internal::DragWindowResizer::Create(
- window_resizer, window, point_in_parent, window_component, source);
- }
- if (window_resizer && window->type() == aura::client::WINDOW_TYPE_PANEL) {
- window_resizer = PanelWindowResizer::Create(
- window_resizer, window, point_in_parent, window_component, source);
- }
- if (switches::UseDockedWindows() &&
- window_resizer && window->parent() &&
- !window->transient_parent() &&
- (window->parent()->id() == internal::kShellWindowId_DefaultContainer ||
- window->parent()->id() == internal::kShellWindowId_DockedContainer ||
- window->parent()->id() == internal::kShellWindowId_PanelContainer)) {
- window_resizer = internal::DockedWindowResizer::Create(
- window_resizer, window, point_in_parent, window_component, source);
- }
- window_state->set_window_resizer_(window_resizer);
- return make_scoped_ptr<WindowResizer>(window_resizer);
-}
-
-namespace internal {
-
-namespace {
-
-// Snapping distance used instead of WorkspaceWindowResizer::kScreenEdgeInset
-// when resizing a window using touchscreen.
-const int kScreenEdgeInsetForTouchResize = 32;
-
-// Returns true if the window should stick to the edge.
-bool ShouldStickToEdge(int distance_from_edge, int sticky_size) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshEnableStickyEdges)) {
- // TODO(varkha): Consider keeping snapping behavior for touch drag.
- return distance_from_edge < 0 &&
- distance_from_edge > -sticky_size;
- }
- return distance_from_edge < sticky_size &&
- distance_from_edge > -sticky_size * 2;
-}
-
-// Returns the coordinate along the secondary axis to snap to.
-int CoordinateAlongSecondaryAxis(SecondaryMagnetismEdge edge,
- int leading,
- int trailing,
- int none) {
- switch (edge) {
- case SECONDARY_MAGNETISM_EDGE_LEADING:
- return leading;
- case SECONDARY_MAGNETISM_EDGE_TRAILING:
- return trailing;
- case SECONDARY_MAGNETISM_EDGE_NONE:
- return none;
- }
- NOTREACHED();
- return none;
-}
-
-// Returns the origin for |src| when magnetically attaching to |attach_to| along
-// the edges |edges|. |edges| is a bitmask of the MagnetismEdges.
-gfx::Point OriginForMagneticAttach(const gfx::Rect& src,
- const gfx::Rect& attach_to,
- const MatchedEdge& edge) {
- int x = 0, y = 0;
- switch (edge.primary_edge) {
- case MAGNETISM_EDGE_TOP:
- y = attach_to.bottom();
- break;
- case MAGNETISM_EDGE_LEFT:
- x = attach_to.right();
- break;
- case MAGNETISM_EDGE_BOTTOM:
- y = attach_to.y() - src.height();
- break;
- case MAGNETISM_EDGE_RIGHT:
- x = attach_to.x() - src.width();
- break;
- }
- switch (edge.primary_edge) {
- case MAGNETISM_EDGE_TOP:
- case MAGNETISM_EDGE_BOTTOM:
- x = CoordinateAlongSecondaryAxis(
- edge.secondary_edge, attach_to.x(), attach_to.right() - src.width(),
- src.x());
- break;
- case MAGNETISM_EDGE_LEFT:
- case MAGNETISM_EDGE_RIGHT:
- y = CoordinateAlongSecondaryAxis(
- edge.secondary_edge, attach_to.y(), attach_to.bottom() - src.height(),
- src.y());
- break;
- }
- return gfx::Point(x, y);
-}
-
-// Returns the bounds for a magnetic attach when resizing. |src| is the bounds
-// of window being resized, |attach_to| the bounds of the window to attach to
-// and |edge| identifies the edge to attach to.
-gfx::Rect BoundsForMagneticResizeAttach(const gfx::Rect& src,
- const gfx::Rect& attach_to,
- const MatchedEdge& edge) {
- int x = src.x();
- int y = src.y();
- int w = src.width();
- int h = src.height();
- gfx::Point attach_origin(OriginForMagneticAttach(src, attach_to, edge));
- switch (edge.primary_edge) {
- case MAGNETISM_EDGE_LEFT:
- x = attach_origin.x();
- w = src.right() - x;
- break;
- case MAGNETISM_EDGE_RIGHT:
- w += attach_origin.x() - src.x();
- break;
- case MAGNETISM_EDGE_TOP:
- y = attach_origin.y();
- h = src.bottom() - y;
- break;
- case MAGNETISM_EDGE_BOTTOM:
- h += attach_origin.y() - src.y();
- break;
- }
- switch (edge.primary_edge) {
- case MAGNETISM_EDGE_LEFT:
- case MAGNETISM_EDGE_RIGHT:
- if (edge.secondary_edge == SECONDARY_MAGNETISM_EDGE_LEADING) {
- y = attach_origin.y();
- h = src.bottom() - y;
- } else if (edge.secondary_edge == SECONDARY_MAGNETISM_EDGE_TRAILING) {
- h += attach_origin.y() - src.y();
- }
- break;
- case MAGNETISM_EDGE_TOP:
- case MAGNETISM_EDGE_BOTTOM:
- if (edge.secondary_edge == SECONDARY_MAGNETISM_EDGE_LEADING) {
- x = attach_origin.x();
- w = src.right() - x;
- } else if (edge.secondary_edge == SECONDARY_MAGNETISM_EDGE_TRAILING) {
- w += attach_origin.x() - src.x();
- }
- break;
- }
- return gfx::Rect(x, y, w, h);
-}
-
-// Converts a window component edge to the magnetic edge to snap to.
-uint32 WindowComponentToMagneticEdge(int window_component) {
- switch (window_component) {
- case HTTOPLEFT:
- return MAGNETISM_EDGE_LEFT | MAGNETISM_EDGE_TOP;
- case HTTOPRIGHT:
- return MAGNETISM_EDGE_TOP | MAGNETISM_EDGE_RIGHT;
- case HTBOTTOMLEFT:
- return MAGNETISM_EDGE_LEFT | MAGNETISM_EDGE_BOTTOM;
- case HTBOTTOMRIGHT:
- return MAGNETISM_EDGE_RIGHT | MAGNETISM_EDGE_BOTTOM;
- case HTTOP:
- return MAGNETISM_EDGE_TOP;
- case HTBOTTOM:
- return MAGNETISM_EDGE_BOTTOM;
- case HTRIGHT:
- return MAGNETISM_EDGE_RIGHT;
- case HTLEFT:
- return MAGNETISM_EDGE_LEFT;
- default:
- break;
- }
- return 0;
-}
-
-} // namespace
-
-// static
-const int WorkspaceWindowResizer::kMinOnscreenSize = 20;
-
-// static
-const int WorkspaceWindowResizer::kMinOnscreenHeight = 32;
-
-// static
-const int WorkspaceWindowResizer::kScreenEdgeInset = 8;
-
-// static
-const int WorkspaceWindowResizer::kStickyDistancePixels = 64;
-
-// static
-WorkspaceWindowResizer* WorkspaceWindowResizer::instance_ = NULL;
-
-// Represents the width or height of a window with constraints on its minimum
-// and maximum size. 0 represents a lack of a constraint.
-class WindowSize {
- public:
- WindowSize(int size, int min, int max)
- : size_(size),
- min_(min),
- max_(max) {
- // Grow the min/max bounds to include the starting size.
- if (is_underflowing())
- min_ = size_;
- if (is_overflowing())
- max_ = size_;
- }
-
- bool is_at_capacity(bool shrinking) {
- return size_ == (shrinking ? min_ : max_);
- }
-
- int size() const {
- return size_;
- }
-
- bool has_min() const {
- return min_ != 0;
- }
-
- bool has_max() const {
- return max_ != 0;
- }
-
- bool is_valid() const {
- return !is_overflowing() && !is_underflowing();
- }
-
- bool is_overflowing() const {
- return has_max() && size_ > max_;
- }
-
- bool is_underflowing() const {
- return has_min() && size_ < min_;
- }
-
- // Add |amount| to this WindowSize not exceeding min or max size constraints.
- // Returns by how much |size_| + |amount| exceeds the min/max constraints.
- int Add(int amount) {
- DCHECK(is_valid());
- int new_value = size_ + amount;
-
- if (has_min() && new_value < min_) {
- size_ = min_;
- return new_value - min_;
- }
-
- if (has_max() && new_value > max_) {
- size_ = max_;
- return new_value - max_;
- }
-
- size_ = new_value;
- return 0;
- }
-
- private:
- int size_;
- int min_;
- int max_;
-};
-
-WorkspaceWindowResizer::~WorkspaceWindowResizer() {
- if (did_lock_cursor_) {
- Shell* shell = Shell::GetInstance();
- shell->cursor_manager()->UnlockCursor();
- }
- if (instance_ == this)
- instance_ = NULL;
-}
-
-// static
-WorkspaceWindowResizer* WorkspaceWindowResizer::Create(
- aura::Window* window,
- const gfx::Point& location_in_parent,
- int window_component,
- aura::client::WindowMoveSource source,
- const std::vector<aura::Window*>& attached_windows) {
- Details details(window, location_in_parent, window_component, source);
- return details.is_resizable ?
- new WorkspaceWindowResizer(details, attached_windows) : NULL;
-}
-
-void WorkspaceWindowResizer::Drag(const gfx::Point& location_in_parent,
- int event_flags) {
- last_mouse_location_ = location_in_parent;
-
- int sticky_size;
- if (event_flags & ui::EF_CONTROL_DOWN) {
- sticky_size = 0;
- } else if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshEnableStickyEdges)) {
- sticky_size = kStickyDistancePixels;
- } else if ((details_.bounds_change & kBoundsChange_Resizes) &&
- details_.source == aura::client::WINDOW_MOVE_SOURCE_TOUCH) {
- sticky_size = kScreenEdgeInsetForTouchResize;
- } else {
- sticky_size = kScreenEdgeInset;
- }
- // |bounds| is in |window()->parent()|'s coordinates.
- gfx::Rect bounds = CalculateBoundsForDrag(details_, location_in_parent);
- if (window_state()->IsNormalShowState())
- AdjustBoundsForMainWindow(sticky_size, &bounds);
-
- if (bounds != window()->bounds()) {
- if (!did_move_or_resize_) {
- if (!details_.restore_bounds.IsEmpty())
- window_state()->ClearRestoreBounds();
- RestackWindows();
- }
- did_move_or_resize_ = true;
- }
-
- gfx::Point location_in_screen = location_in_parent;
- wm::ConvertPointToScreen(window()->parent(), &location_in_screen);
-
- aura::Window* root = NULL;
- gfx::Display display =
- ScreenAsh::FindDisplayContainingPoint(location_in_screen);
- // Track the last screen that the pointer was on to keep the snap phantom
- // window there.
- if (display.is_valid()) {
- root = Shell::GetInstance()->display_controller()->
- GetRootWindowForDisplayId(display.id());
- }
- if (!attached_windows_.empty())
- LayoutAttachedWindows(&bounds);
- if (bounds != window()->bounds()) {
- // SetBounds needs to be called to update the layout which affects where the
- // phantom window is drawn. Keep track if the window was destroyed during
- // the drag and quit early if so.
- base::WeakPtr<WorkspaceWindowResizer> resizer(
- weak_ptr_factory_.GetWeakPtr());
- window()->SetBounds(bounds);
- if (!resizer)
- return;
- }
- const bool in_original_root = !root || root == window()->GetRootWindow();
- // Hide a phantom window for snapping if the cursor is in another root window.
- if (in_original_root) {
- UpdateSnapPhantomWindow(location_in_parent, bounds);
- } else {
- snap_type_ = SNAP_NONE;
- snap_phantom_window_controller_.reset();
- snap_sizer_.reset();
- SetDraggedWindowDocked(false);
- }
-}
-
-void WorkspaceWindowResizer::CompleteDrag(int event_flags) {
- window_state()->set_bounds_changed_by_user(true);
- snap_phantom_window_controller_.reset();
- if (!did_move_or_resize_ || details_.window_component != HTCAPTION)
- return;
-
- bool snapped = false;
- // When the window is not in the normal show state, we do not snap the window.
- // This happens when the user minimizes or maximizes the window by keyboard
- // shortcut while dragging it. If the window is the result of dragging a tab
- // out of a maximized window, it's already in the normal show state when this
- // is called, so it does not matter.
- if (window_state()->IsNormalShowState() &&
- (window()->type() != aura::client::WINDOW_TYPE_PANEL ||
- !window_state()->panel_attached() ||
- dock_layout_->is_dragged_window_docked()) &&
- (snap_type_ == SNAP_LEFT || snap_type_ == SNAP_RIGHT)) {
- if (!window_state()->HasRestoreBounds()) {
- gfx::Rect initial_bounds = ScreenAsh::ConvertRectToScreen(
- window()->parent(), details_.initial_bounds_in_parent);
- window_state()->SetRestoreBoundsInScreen(
- details_.restore_bounds.IsEmpty() ?
- initial_bounds :
- details_.restore_bounds);
- }
- DCHECK(snap_sizer_);
- if (window_state()->CanResize() &&
- !dock_layout_->is_dragged_window_docked()) {
- snap_sizer_->SnapWindowToTargetBounds();
- snapped = true;
- }
- }
- if (window_state()->IsSnapped() && !snapped)
- window_state()->Restore();
-}
-
-void WorkspaceWindowResizer::RevertDrag() {
- window_state()->set_bounds_changed_by_user(initial_bounds_changed_by_user_);
- snap_phantom_window_controller_.reset();
-
- if (!did_move_or_resize_)
- return;
-
- window()->SetBounds(details_.initial_bounds_in_parent);
- if (!details_.restore_bounds.IsEmpty()) {
- window_state()->SetRestoreBoundsInScreen(details_.restore_bounds);
- }
-
- if (details_.window_component == HTRIGHT) {
- int last_x = details_.initial_bounds_in_parent.right();
- for (size_t i = 0; i < attached_windows_.size(); ++i) {
- gfx::Rect bounds(attached_windows_[i]->bounds());
- bounds.set_x(last_x);
- bounds.set_width(initial_size_[i]);
- attached_windows_[i]->SetBounds(bounds);
- last_x = attached_windows_[i]->bounds().right();
- }
- } else {
- int last_y = details_.initial_bounds_in_parent.bottom();
- for (size_t i = 0; i < attached_windows_.size(); ++i) {
- gfx::Rect bounds(attached_windows_[i]->bounds());
- bounds.set_y(last_y);
- bounds.set_height(initial_size_[i]);
- attached_windows_[i]->SetBounds(bounds);
- last_y = attached_windows_[i]->bounds().bottom();
- }
- }
-}
-
-aura::Window* WorkspaceWindowResizer::GetTarget() {
- return details_.window;
-}
-
-const gfx::Point& WorkspaceWindowResizer::GetInitialLocation() const {
- return details_.initial_location_in_parent;
-}
-
-WorkspaceWindowResizer::WorkspaceWindowResizer(
- const Details& details,
- const std::vector<aura::Window*>& attached_windows)
- : details_(details),
- attached_windows_(attached_windows),
- did_lock_cursor_(false),
- did_move_or_resize_(false),
- initial_bounds_changed_by_user_(
- details.window_state->bounds_changed_by_user()),
- total_min_(0),
- total_initial_size_(0),
- snap_type_(SNAP_NONE),
- num_mouse_moves_since_bounds_change_(0),
- magnetism_window_(NULL),
- weak_ptr_factory_(this) {
- DCHECK(details_.is_resizable);
-
- // A mousemove should still show the cursor even if the window is
- // being moved or resized with touch, so do not lock the cursor.
- if (details.source != aura::client::WINDOW_MOVE_SOURCE_TOUCH) {
- Shell* shell = Shell::GetInstance();
- shell->cursor_manager()->LockCursor();
- did_lock_cursor_ = true;
- }
-
- aura::Window* dock_container = Shell::GetContainer(
- window()->GetRootWindow(), kShellWindowId_DockedContainer);
- dock_layout_ = static_cast<DockedWindowLayoutManager*>(
- dock_container->layout_manager());
-
- // Only support attaching to the right/bottom.
- DCHECK(attached_windows_.empty() ||
- (details.window_component == HTRIGHT ||
- details.window_component == HTBOTTOM));
-
- // TODO: figure out how to deal with window going off the edge.
-
- // Calculate sizes so that we can maintain the ratios if we need to resize.
- int total_available = 0;
- for (size_t i = 0; i < attached_windows_.size(); ++i) {
- gfx::Size min(attached_windows_[i]->delegate()->GetMinimumSize());
- int initial_size = PrimaryAxisSize(attached_windows_[i]->bounds().size());
- initial_size_.push_back(initial_size);
- // If current size is smaller than the min, use the current size as the min.
- // This way we don't snap on resize.
- int min_size = std::min(initial_size,
- std::max(PrimaryAxisSize(min), kMinOnscreenSize));
- total_min_ += min_size;
- total_initial_size_ += initial_size;
- total_available += std::max(min_size, initial_size) - min_size;
- }
- instance_ = this;
-}
-
-gfx::Rect WorkspaceWindowResizer::GetFinalBounds(
- const gfx::Rect& bounds) const {
- if (snap_phantom_window_controller_.get() &&
- snap_phantom_window_controller_->IsShowing()) {
- return snap_phantom_window_controller_->bounds_in_screen();
- }
- return bounds;
-}
-
-void WorkspaceWindowResizer::LayoutAttachedWindows(
- gfx::Rect* bounds) {
- gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(window()));
- int initial_size = PrimaryAxisSize(details_.initial_bounds_in_parent.size());
- int current_size = PrimaryAxisSize(bounds->size());
- int start = PrimaryAxisCoordinate(bounds->right(), bounds->bottom());
- int end = PrimaryAxisCoordinate(work_area.right(), work_area.bottom());
-
- int delta = current_size - initial_size;
- int available_size = end - start;
- std::vector<int> sizes;
- int leftovers = CalculateAttachedSizes(delta, available_size, &sizes);
-
- // leftovers > 0 means that the attached windows can't grow to compensate for
- // the shrinkage of the main window. This line causes the attached windows to
- // be moved so they are still flush against the main window, rather than the
- // main window being prevented from shrinking.
- leftovers = std::min(0, leftovers);
- // Reallocate any leftover pixels back into the main window. This is
- // necessary when, for example, the main window shrinks, but none of the
- // attached windows can grow without exceeding their max size constraints.
- // Adding the pixels back to the main window effectively prevents the main
- // window from resizing too far.
- if (details_.window_component == HTRIGHT)
- bounds->set_width(bounds->width() + leftovers);
- else
- bounds->set_height(bounds->height() + leftovers);
-
- DCHECK_EQ(attached_windows_.size(), sizes.size());
- int last = PrimaryAxisCoordinate(bounds->right(), bounds->bottom());
- for (size_t i = 0; i < attached_windows_.size(); ++i) {
- gfx::Rect attached_bounds(attached_windows_[i]->bounds());
- if (details_.window_component == HTRIGHT) {
- attached_bounds.set_x(last);
- attached_bounds.set_width(sizes[i]);
- } else {
- attached_bounds.set_y(last);
- attached_bounds.set_height(sizes[i]);
- }
- attached_windows_[i]->SetBounds(attached_bounds);
- last += sizes[i];
- }
-}
-
-int WorkspaceWindowResizer::CalculateAttachedSizes(
- int delta,
- int available_size,
- std::vector<int>* sizes) const {
- std::vector<WindowSize> window_sizes;
- CreateBucketsForAttached(&window_sizes);
-
- // How much we need to grow the attached by (collectively).
- int grow_attached_by = 0;
- if (delta > 0) {
- // If the attached windows don't fit when at their initial size, we will
- // have to shrink them by how much they overflow.
- if (total_initial_size_ >= available_size)
- grow_attached_by = available_size - total_initial_size_;
- } else {
- // If we're shrinking, we grow the attached so the total size remains
- // constant.
- grow_attached_by = -delta;
- }
-
- int leftover_pixels = 0;
- while (grow_attached_by != 0) {
- int leftovers = GrowFairly(grow_attached_by, window_sizes);
- if (leftovers == grow_attached_by) {
- leftover_pixels = leftovers;
- break;
- }
- grow_attached_by = leftovers;
- }
-
- for (size_t i = 0; i < window_sizes.size(); ++i)
- sizes->push_back(window_sizes[i].size());
-
- return leftover_pixels;
-}
-
-int WorkspaceWindowResizer::GrowFairly(
- int pixels,
- std::vector<WindowSize>& sizes) const {
- bool shrinking = pixels < 0;
- std::vector<WindowSize*> nonfull_windows;
- for (size_t i = 0; i < sizes.size(); ++i) {
- if (!sizes[i].is_at_capacity(shrinking))
- nonfull_windows.push_back(&sizes[i]);
- }
- std::vector<float> ratios;
- CalculateGrowthRatios(nonfull_windows, &ratios);
-
- int remaining_pixels = pixels;
- bool add_leftover_pixels_to_last = true;
- for (size_t i = 0; i < nonfull_windows.size(); ++i) {
- int grow_by = pixels * ratios[i];
- // Put any leftover pixels into the last window.
- if (i == nonfull_windows.size() - 1 && add_leftover_pixels_to_last)
- grow_by = remaining_pixels;
- int remainder = nonfull_windows[i]->Add(grow_by);
- int consumed = grow_by - remainder;
- remaining_pixels -= consumed;
- if (nonfull_windows[i]->is_at_capacity(shrinking) && remainder > 0) {
- // Because this window overflowed, some of the pixels in
- // |remaining_pixels| aren't there due to rounding errors. Rather than
- // unfairly giving all those pixels to the last window, we refrain from
- // allocating them so that this function can be called again to distribute
- // the pixels fairly.
- add_leftover_pixels_to_last = false;
- }
- }
- return remaining_pixels;
-}
-
-void WorkspaceWindowResizer::CalculateGrowthRatios(
- const std::vector<WindowSize*>& sizes,
- std::vector<float>* out_ratios) const {
- DCHECK(out_ratios->empty());
- int total_value = 0;
- for (size_t i = 0; i < sizes.size(); ++i)
- total_value += sizes[i]->size();
-
- for (size_t i = 0; i < sizes.size(); ++i)
- out_ratios->push_back(
- (static_cast<float>(sizes[i]->size())) / total_value);
-}
-
-void WorkspaceWindowResizer::CreateBucketsForAttached(
- std::vector<WindowSize>* sizes) const {
- for (size_t i = 0; i < attached_windows_.size(); i++) {
- int initial_size = initial_size_[i];
- aura::WindowDelegate* delegate = attached_windows_[i]->delegate();
- int min = PrimaryAxisSize(delegate->GetMinimumSize());
- int max = PrimaryAxisSize(delegate->GetMaximumSize());
-
- sizes->push_back(WindowSize(initial_size, min, max));
- }
-}
-
-void WorkspaceWindowResizer::MagneticallySnapToOtherWindows(gfx::Rect* bounds) {
- if (UpdateMagnetismWindow(*bounds, kAllMagnetismEdges)) {
- gfx::Point point = OriginForMagneticAttach(
- ScreenAsh::ConvertRectToScreen(window()->parent(), *bounds),
- magnetism_window_->GetBoundsInScreen(),
- magnetism_edge_);
- aura::client::GetScreenPositionClient(window()->GetRootWindow())->
- ConvertPointFromScreen(window()->parent(), &point);
- bounds->set_origin(point);
- }
-}
-
-void WorkspaceWindowResizer::MagneticallySnapResizeToOtherWindows(
- gfx::Rect* bounds) {
- const uint32 edges = WindowComponentToMagneticEdge(details_.window_component);
- if (UpdateMagnetismWindow(*bounds, edges)) {
- *bounds = ScreenAsh::ConvertRectFromScreen(
- window()->parent(),
- BoundsForMagneticResizeAttach(
- ScreenAsh::ConvertRectToScreen(window()->parent(), *bounds),
- magnetism_window_->GetBoundsInScreen(),
- magnetism_edge_));
- }
-}
-
-bool WorkspaceWindowResizer::UpdateMagnetismWindow(const gfx::Rect& bounds,
- uint32 edges) {
- // |bounds| are in coordinates of original window's parent.
- gfx::Rect bounds_in_screen =
- ScreenAsh::ConvertRectToScreen(window()->parent(), bounds);
- MagnetismMatcher matcher(bounds_in_screen, edges);
-
- // If we snapped to a window then check it first. That way we don't bounce
- // around when close to multiple edges.
- if (magnetism_window_) {
- if (window_tracker_.Contains(magnetism_window_) &&
- matcher.ShouldAttach(magnetism_window_->GetBoundsInScreen(),
- &magnetism_edge_)) {
- return true;
- }
- window_tracker_.Remove(magnetism_window_);
- magnetism_window_ = NULL;
- }
-
- // Avoid magnetically snapping windows that are not resizable.
- // TODO(oshima): change this to window.type() == TYPE_NORMAL.
- if (!window_state()->CanResize())
- return false;
-
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- for (aura::Window::Windows::iterator iter = root_windows.begin();
- iter != root_windows.end(); ++iter) {
- const aura::Window* root_window = *iter;
- // Test all children from the desktop in each root window.
- const aura::Window::Windows& children = Shell::GetContainer(
- root_window, kShellWindowId_DefaultContainer)->children();
- for (aura::Window::Windows::const_reverse_iterator i = children.rbegin();
- i != children.rend() && !matcher.AreEdgesObscured(); ++i) {
- wm::WindowState* other_state = wm::GetWindowState(*i);
- if (other_state->window() == window() ||
- !other_state->window()->IsVisible() ||
- !other_state->IsNormalShowState() ||
- !other_state->CanResize()) {
- continue;
- }
- if (matcher.ShouldAttach(
- other_state->window()->GetBoundsInScreen(), &magnetism_edge_)) {
- magnetism_window_ = other_state->window();
- window_tracker_.Add(magnetism_window_);
- return true;
- }
- }
- }
- return false;
-}
-
-void WorkspaceWindowResizer::AdjustBoundsForMainWindow(
- int sticky_size,
- gfx::Rect* bounds) {
- gfx::Point last_mouse_location_in_screen = last_mouse_location_;
- wm::ConvertPointToScreen(window()->parent(), &last_mouse_location_in_screen);
- gfx::Display display = Shell::GetScreen()->GetDisplayNearestPoint(
- last_mouse_location_in_screen);
- gfx::Rect work_area =
- ScreenAsh::ConvertRectFromScreen(window()->parent(), display.work_area());
- if (details_.window_component == HTCAPTION) {
- // Adjust the bounds to the work area where the mouse cursor is located.
- // Always keep kMinOnscreenHeight or the window height (whichever is less)
- // on the bottom.
- int max_y = work_area.bottom() - std::min(kMinOnscreenHeight,
- bounds->height());
- if (bounds->y() > max_y) {
- bounds->set_y(max_y);
- } else if (bounds->y() <= work_area.y()) {
- // Don't allow dragging above the top of the display until the mouse
- // cursor reaches the work area above if any.
- bounds->set_y(work_area.y());
- }
-
- if (sticky_size > 0) {
- // Possibly stick to edge except when a mouse pointer is outside the
- // work area.
- if (!(display.work_area().Contains(last_mouse_location_in_screen) &&
- StickToWorkAreaOnMove(work_area, sticky_size, bounds))) {
- MagneticallySnapToOtherWindows(bounds);
- }
- }
- } else if (sticky_size > 0) {
- MagneticallySnapResizeToOtherWindows(bounds);
- if (!magnetism_window_ && sticky_size > 0)
- StickToWorkAreaOnResize(work_area, sticky_size, bounds);
- }
-
- if (attached_windows_.empty())
- return;
-
- if (details_.window_component == HTRIGHT) {
- bounds->set_width(std::min(bounds->width(),
- work_area.right() - total_min_ - bounds->x()));
- } else {
- DCHECK_EQ(HTBOTTOM, details_.window_component);
- bounds->set_height(std::min(bounds->height(),
- work_area.bottom() - total_min_ - bounds->y()));
- }
-}
-
-bool WorkspaceWindowResizer::StickToWorkAreaOnMove(
- const gfx::Rect& work_area,
- int sticky_size,
- gfx::Rect* bounds) const {
- const int left_edge = work_area.x();
- const int right_edge = work_area.right();
- const int top_edge = work_area.y();
- const int bottom_edge = work_area.bottom();
- bool updated = false;
- if (ShouldStickToEdge(bounds->x() - left_edge, sticky_size)) {
- bounds->set_x(left_edge);
- updated = true;
- } else if (ShouldStickToEdge(right_edge - bounds->right(), sticky_size)) {
- bounds->set_x(right_edge - bounds->width());
- updated = true;
- }
- if (ShouldStickToEdge(bounds->y() - top_edge, sticky_size)) {
- bounds->set_y(top_edge);
- updated = true;
- } else if (ShouldStickToEdge(bottom_edge - bounds->bottom(), sticky_size) &&
- bounds->height() < (bottom_edge - top_edge)) {
- // Only snap to the bottom if the window is smaller than the work area.
- // Doing otherwise can lead to window snapping in weird ways as it bounces
- // between snapping to top then bottom.
- bounds->set_y(bottom_edge - bounds->height());
- updated = true;
- }
- return updated;
-}
-
-void WorkspaceWindowResizer::StickToWorkAreaOnResize(
- const gfx::Rect& work_area,
- int sticky_size,
- gfx::Rect* bounds) const {
- const uint32 edges = WindowComponentToMagneticEdge(details_.window_component);
- const int left_edge = work_area.x();
- const int right_edge = work_area.right();
- const int top_edge = work_area.y();
- const int bottom_edge = work_area.bottom();
- if (edges & MAGNETISM_EDGE_TOP &&
- ShouldStickToEdge(bounds->y() - top_edge, sticky_size)) {
- bounds->set_height(bounds->bottom() - top_edge);
- bounds->set_y(top_edge);
- }
- if (edges & MAGNETISM_EDGE_LEFT &&
- ShouldStickToEdge(bounds->x() - left_edge, sticky_size)) {
- bounds->set_width(bounds->right() - left_edge);
- bounds->set_x(left_edge);
- }
- if (edges & MAGNETISM_EDGE_BOTTOM &&
- ShouldStickToEdge(bottom_edge - bounds->bottom(), sticky_size)) {
- bounds->set_height(bottom_edge - bounds->y());
- }
- if (edges & MAGNETISM_EDGE_RIGHT &&
- ShouldStickToEdge(right_edge - bounds->right(), sticky_size)) {
- bounds->set_width(right_edge - bounds->x());
- }
-}
-
-int WorkspaceWindowResizer::PrimaryAxisSize(const gfx::Size& size) const {
- return PrimaryAxisCoordinate(size.width(), size.height());
-}
-
-int WorkspaceWindowResizer::PrimaryAxisCoordinate(int x, int y) const {
- switch (details_.window_component) {
- case HTRIGHT:
- return x;
- case HTBOTTOM:
- return y;
- default:
- NOTREACHED();
- }
- return 0;
-}
-
-void WorkspaceWindowResizer::UpdateSnapPhantomWindow(const gfx::Point& location,
- const gfx::Rect& bounds) {
- if (!did_move_or_resize_ || details_.window_component != HTCAPTION)
- return;
-
- SnapType last_type = snap_type_;
- snap_type_ = GetSnapType(location);
- if (snap_type_ == SNAP_NONE || snap_type_ != last_type) {
- snap_phantom_window_controller_.reset();
- snap_sizer_.reset();
- if (snap_type_ == SNAP_NONE) {
- SetDraggedWindowDocked(false);
- return;
- }
- }
- const bool can_dock = dock_layout_->CanDockWindow(window(), snap_type_);
- const bool can_snap = window_state()->CanSnap();
- if (!can_snap && !can_dock) {
- snap_type_ = SNAP_NONE;
- snap_phantom_window_controller_.reset();
- snap_sizer_.reset();
- SetDraggedWindowDocked(false);
- return;
- }
- SnapSizer::Edge edge = (snap_type_ == SNAP_LEFT) ?
- SnapSizer::LEFT_EDGE : SnapSizer::RIGHT_EDGE;
- if (!snap_sizer_) {
- snap_sizer_.reset(new SnapSizer(window_state(),
- location,
- edge,
- internal::SnapSizer::OTHER_INPUT));
- } else {
- snap_sizer_->Update(location);
- }
-
- // Update phantom window with snapped or docked guide bounds.
- // Windows that cannot be snapped or are less wide than kMaxDockWidth can get
- // docked without going through a snapping sequence.
- gfx::Rect phantom_bounds;
- if (can_snap &&
- (!can_dock ||
- window()->bounds().width() > DockedWindowLayoutManager::kMaxDockWidth))
- phantom_bounds = snap_sizer_->target_bounds();
- const bool should_dock = can_dock &&
- (phantom_bounds.IsEmpty() ||
- snap_sizer_->end_of_sequence() ||
- dock_layout_->is_dragged_window_docked());
- SetDraggedWindowDocked(should_dock);
- snap_type_ = GetSnapType(location);
- if (dock_layout_->is_dragged_window_docked()) {
- phantom_bounds = ScreenAsh::ConvertRectFromScreen(
- window()->parent(), dock_layout_->dragged_bounds());
- }
-
- if (phantom_bounds.IsEmpty()) {
- snap_phantom_window_controller_.reset();
- return;
- }
-
- if (!snap_phantom_window_controller_) {
- snap_phantom_window_controller_.reset(
- new PhantomWindowController(window()));
- }
- snap_phantom_window_controller_->Show(ScreenAsh::ConvertRectToScreen(
- window()->parent(), phantom_bounds));
-}
-
-void WorkspaceWindowResizer::RestackWindows() {
- if (attached_windows_.empty())
- return;
- // Build a map from index in children to window, returning if there is a
- // window with a different parent.
- typedef std::map<size_t, aura::Window*> IndexToWindowMap;
- IndexToWindowMap map;
- aura::Window* parent = window()->parent();
- const aura::Window::Windows& windows(parent->children());
- map[std::find(windows.begin(), windows.end(), window()) -
- windows.begin()] = window();
- for (std::vector<aura::Window*>::const_iterator i =
- attached_windows_.begin(); i != attached_windows_.end(); ++i) {
- if ((*i)->parent() != parent)
- return;
- size_t index =
- std::find(windows.begin(), windows.end(), *i) - windows.begin();
- map[index] = *i;
- }
-
- // Reorder the windows starting at the topmost.
- parent->StackChildAtTop(map.rbegin()->second);
- for (IndexToWindowMap::const_reverse_iterator i = map.rbegin();
- i != map.rend(); ) {
- aura::Window* window = i->second;
- ++i;
- if (i != map.rend())
- parent->StackChildBelow(i->second, window);
- }
-}
-
-SnapType WorkspaceWindowResizer::GetSnapType(
- const gfx::Point& location) const {
- // TODO: this likely only wants total display area, not the area of a single
- // display.
- gfx::Rect area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(window()));
- if (details_.source == aura::client::WINDOW_MOVE_SOURCE_TOUCH) {
- // Increase tolerance for touch-snapping near the screen edges. This is only
- // necessary when the work area left or right edge is same as screen edge.
- gfx::Rect display_bounds(ScreenAsh::GetDisplayBoundsInParent(window()));
- int inset_left = 0;
- if (area.x() == display_bounds.x())
- inset_left = kScreenEdgeInsetForTouchResize;
- int inset_right = 0;
- if (area.right() == display_bounds.right())
- inset_right = kScreenEdgeInsetForTouchResize;
- area.Inset(inset_left, 0, inset_right, 0);
- }
- if (location.x() <= area.x())
- return SNAP_LEFT;
- if (location.x() >= area.right() - 1)
- return SNAP_RIGHT;
- return SNAP_NONE;
-}
-
-void WorkspaceWindowResizer::SetDraggedWindowDocked(bool should_dock) {
- if (should_dock &&
- dock_layout_->GetAlignmentOfWindow(window()) != DOCKED_ALIGNMENT_NONE) {
- if (!dock_layout_->is_dragged_window_docked()) {
- window_state()->set_bounds_changed_by_user(false);
- dock_layout_->DockDraggedWindow(window());
- }
- } else {
- if (dock_layout_->is_dragged_window_docked()) {
- dock_layout_->UndockDraggedWindow();
- window_state()->set_bounds_changed_by_user(true);
- }
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/workspace/workspace_window_resizer.h b/chromium/ash/wm/workspace/workspace_window_resizer.h
deleted file mode 100644
index 015e96ddb36..00000000000
--- a/chromium/ash/wm/workspace/workspace_window_resizer.h
+++ /dev/null
@@ -1,236 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WORKSPACE_WINDOW_RESIZER_H_
-#define ASH_WM_WORKSPACE_WINDOW_RESIZER_H_
-
-#include <vector>
-
-#include "ash/wm/window_resizer.h"
-#include "ash/wm/workspace/magnetism_matcher.h"
-#include "ash/wm/workspace/snap_types.h"
-#include "base/compiler_specific.h"
-#include "base/gtest_prod_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "ui/aura/window_tracker.h"
-
-namespace ash {
-namespace wm {
-class WindowState;
-}
-
-namespace internal {
-
-class DockedWindowLayoutManager;
-class PhantomWindowController;
-class SnapSizer;
-class WindowSize;
-
-// WindowResizer implementation for workspaces. This enforces that windows are
-// not allowed to vertically move or resize outside of the work area. As windows
-// are moved outside the work area they are shrunk. We remember the height of
-// the window before it was moved so that if the window is again moved up we
-// attempt to restore the old height.
-class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer {
- public:
- // When dragging an attached window this is the min size we'll make sure is
- // visible. In the vertical direction we take the max of this and that from
- // the delegate.
- static const int kMinOnscreenSize;
-
- // Min height we'll force on screen when dragging the caption.
- // TODO: this should come from a property on the window.
- static const int kMinOnscreenHeight;
-
- // Snap region when dragging close to the edges. That is, as the window gets
- // this close to an edge of the screen it snaps to the edge.
- static const int kScreenEdgeInset;
-
- // Distance in pixels that the cursor must move past an edge for a window
- // to move or resize beyond that edge.
- static const int kStickyDistancePixels;
-
- virtual ~WorkspaceWindowResizer();
-
- static WorkspaceWindowResizer* Create(
- aura::Window* window,
- const gfx::Point& location_in_parent,
- int window_component,
- aura::client::WindowMoveSource source,
- const std::vector<aura::Window*>& attached_windows);
-
- // WindowResizer:
- virtual void Drag(const gfx::Point& location_in_parent,
- int event_flags) OVERRIDE;
- virtual void CompleteDrag(int event_flags) OVERRIDE;
- virtual void RevertDrag() OVERRIDE;
- virtual aura::Window* GetTarget() OVERRIDE;
- virtual const gfx::Point& GetInitialLocation() const OVERRIDE;
-
- private:
- WorkspaceWindowResizer(const Details& details,
- const std::vector<aura::Window*>& attached_windows);
-
- private:
- friend class WorkspaceWindowResizerTest;
-
- // Returns the final bounds to place the window at. This differs from
- // the current when snapping.
- gfx::Rect GetFinalBounds(const gfx::Rect& bounds) const;
-
- // Lays out the attached windows. |bounds| is the bounds of the main window.
- void LayoutAttachedWindows(gfx::Rect* bounds);
-
- // Calculates the new sizes of the attached windows, given that the main
- // window has been resized (along the primary axis) by |delta|.
- // |available_size| is the maximum length of the space that the attached
- // windows are allowed to occupy (ie: the distance between the right/bottom
- // edge of the primary window and the right/bottom of the desktop area).
- // Populates |sizes| with the desired sizes of the attached windows, and
- // returns the number of pixels that couldn't be allocated to the attached
- // windows (due to min/max size constraints).
- // Note the return value can be positive or negative, a negative value
- // indicating that that many pixels couldn't be removed from the attached
- // windows.
- int CalculateAttachedSizes(
- int delta,
- int available_size,
- std::vector<int>* sizes) const;
-
- // Divides |amount| evenly between |sizes|. If |amount| is negative it
- // indicates how many pixels |sizes| should be shrunk by.
- // Returns how many pixels failed to be allocated/removed from |sizes|.
- int GrowFairly(int amount, std::vector<WindowSize>& sizes) const;
-
- // Calculate the ratio of pixels that each WindowSize in |sizes| should
- // receive when growing or shrinking.
- void CalculateGrowthRatios(const std::vector<WindowSize*>& sizes,
- std::vector<float>* out_ratios) const;
-
- // Adds a WindowSize to |sizes| for each attached window.
- void CreateBucketsForAttached(std::vector<WindowSize>* sizes) const;
-
- // If possible snaps the window to a neary window. Updates |bounds| if there
- // was a close enough window.
- void MagneticallySnapToOtherWindows(gfx::Rect* bounds);
-
- // If possible snaps the resize to a neary window. Updates |bounds| if there
- // was a close enough window.
- void MagneticallySnapResizeToOtherWindows(gfx::Rect* bounds);
-
- // Finds the neareset window to magentically snap to. Updates
- // |magnetism_window_| and |magnetism_edge_| appropriately. |edges| is a
- // bitmask of the MagnetismEdges to match again. Returns true if a match is
- // found.
- bool UpdateMagnetismWindow(const gfx::Rect& bounds, uint32 edges);
-
- // Adjusts the bounds of the window: magnetically snapping, ensuring the
- // window has enough on screen... |snap_size| is the distance from an edge of
- // the work area before the window is snapped. A value of 0 results in no
- // snapping.
- void AdjustBoundsForMainWindow(int snap_size, gfx::Rect* bounds);
-
- // Stick the window bounds to the work area during a move.
- bool StickToWorkAreaOnMove(const gfx::Rect& work_area,
- int sticky_size,
- gfx::Rect* bounds) const;
-
- // Stick the window bounds to the work area during a resize.
- void StickToWorkAreaOnResize(const gfx::Rect& work_area,
- int sticky_size,
- gfx::Rect* bounds) const;
-
- // Returns a coordinate along the primary axis. Used to share code for
- // left/right multi window resize and top/bottom resize.
- int PrimaryAxisSize(const gfx::Size& size) const;
- int PrimaryAxisCoordinate(int x, int y) const;
-
- // Updates the bounds of the phantom window for window snapping.
- void UpdateSnapPhantomWindow(const gfx::Point& location,
- const gfx::Rect& bounds);
-
- // Restacks the windows z-order position so that one of the windows is at the
- // top of the z-order, and the rest directly underneath it.
- void RestackWindows();
-
- // Returns the SnapType for the specified point. SNAP_NONE is used if no
- // snapping should be used.
- SnapType GetSnapType(const gfx::Point& location) const;
-
- // Docks the dragged window if |should_dock| and the window can be docked.
- // Undocks the window if |should_dock| is false.
- void SetDraggedWindowDocked(bool should_dock);
-
- aura::Window* window() const { return details_.window; }
-
- wm::WindowState* window_state() { return details_.window_state; }
-
- const Details details_;
-
- const std::vector<aura::Window*> attached_windows_;
-
- bool did_lock_cursor_;
-
- // Set to true once Drag() is invoked and the bounds of the window change.
- bool did_move_or_resize_;
-
- // True if the window initially had |bounds_changed_by_user_| set in state.
- bool initial_bounds_changed_by_user_;
-
- // The initial size of each of the windows in |attached_windows_| along the
- // primary axis.
- std::vector<int> initial_size_;
-
- // Sum of the minimum sizes of the attached windows.
- int total_min_;
-
- // Sum of the sizes in |initial_size_|.
- int total_initial_size_;
-
- // Gives a previews of where the the window will end up. Only used if there
- // is a grid and the caption is being dragged.
- scoped_ptr<PhantomWindowController> snap_phantom_window_controller_;
-
- // Used to determine the target position of a snap.
- scoped_ptr<SnapSizer> snap_sizer_;
-
- // Last SnapType.
- SnapType snap_type_;
-
- // Number of mouse moves since the last bounds change. Only used for phantom
- // placement to track when the mouse is moved while pushed against the edge of
- // the screen.
- int num_mouse_moves_since_bounds_change_;
-
- // The mouse location passed to Drag().
- gfx::Point last_mouse_location_;
-
- // Window the drag has magnetically attached to.
- aura::Window* magnetism_window_;
-
- // Used to verify |magnetism_window_| is still valid.
- aura::WindowTracker window_tracker_;
-
- // If |magnetism_window_| is non-NULL this indicates how the two windows
- // should attach.
- MatchedEdge magnetism_edge_;
-
- // Dock container window layout manager.
- DockedWindowLayoutManager* dock_layout_;
-
- // Used to determine if this has been deleted during a drag such as when a tab
- // gets dragged into another browser window.
- base::WeakPtrFactory<WorkspaceWindowResizer> weak_ptr_factory_;
-
- // Current instance for use by the WorkspaceWindowResizerTest.
- static WorkspaceWindowResizer* instance_;
-
- DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_
diff --git a/chromium/ash/wm/workspace/workspace_window_resizer_unittest.cc b/chromium/ash/wm/workspace/workspace_window_resizer_unittest.cc
deleted file mode 100644
index 599c4ea98e8..00000000000
--- a/chromium/ash/wm/workspace/workspace_window_resizer_unittest.cc
+++ /dev/null
@@ -1,2027 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/workspace/workspace_window_resizer.h"
-
-#include "ash/ash_constants.h"
-#include "ash/ash_switches.h"
-#include "ash/display/display_manager.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/phantom_window_controller.h"
-#include "ash/wm/workspace/snap_sizer.h"
-#include "ash/wm/workspace_controller.h"
-#include "base/command_line.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/stringprintf.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/base/hit_test.h"
-#include "ui/gfx/insets.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/widget/widget.h"
-
-namespace gfx {
-
-// Class to provide access to SlideAnimation internals for testing.
-// TODO: this should be next to SlideAnimation, not here.
-class SlideAnimation::TestApi {
- public:
- explicit TestApi(SlideAnimation* animation) : animation_(animation) {}
-
- void SetStartTime(base::TimeTicks ticks) {
- animation_->SetStartTime(ticks);
- }
-
- void Step(base::TimeTicks ticks) {
- animation_->Step(ticks);
- }
-
- void RunTillComplete() {
- SetStartTime(base::TimeTicks());
- Step(base::TimeTicks() +
- base::TimeDelta::FromMilliseconds(animation_->GetSlideDuration()));
- EXPECT_EQ(1.0, animation_->GetCurrentValue());
- }
-
- private:
- SlideAnimation* animation_;
-
- DISALLOW_COPY_AND_ASSIGN(TestApi);
-};
-
-}
-
-namespace ash {
-namespace internal {
-namespace {
-
-const int kRootHeight = 600;
-
-// A simple window delegate that returns the specified min size.
-class TestWindowDelegate : public aura::test::TestWindowDelegate {
- public:
- TestWindowDelegate() {
- }
- virtual ~TestWindowDelegate() {}
-
- void set_min_size(const gfx::Size& size) {
- min_size_ = size;
- }
-
- void set_max_size(const gfx::Size& size) {
- max_size_ = size;
- }
-
- private:
- // Overridden from aura::Test::TestWindowDelegate:
- virtual gfx::Size GetMinimumSize() const OVERRIDE {
- return min_size_;
- }
-
- virtual gfx::Size GetMaximumSize() const OVERRIDE {
- return max_size_;
- }
-
- gfx::Size min_size_;
- gfx::Size max_size_;
-
- DISALLOW_COPY_AND_ASSIGN(TestWindowDelegate);
-};
-
-} // namespace
-
-class WorkspaceWindowResizerTest : public test::AshTestBase {
- public:
- WorkspaceWindowResizerTest() : workspace_resizer_(NULL) {}
- virtual ~WorkspaceWindowResizerTest() {}
-
- virtual void SetUp() OVERRIDE {
- AshTestBase::SetUp();
- UpdateDisplay(base::StringPrintf("800x%d", kRootHeight));
-
- aura::Window* root = Shell::GetPrimaryRootWindow();
- gfx::Rect root_bounds(root->bounds());
-#if defined(OS_WIN)
- // RootWindow and Display can't resize on Windows Ash.
- // http://crbug.com/165962
- EXPECT_EQ(kRootHeight, root_bounds.height());
-#endif
- EXPECT_EQ(800, root_bounds.width());
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
- window_.reset(new aura::Window(&delegate_));
- window_->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window_->Init(ui::LAYER_NOT_DRAWN);
- ParentWindowInPrimaryRootWindow(window_.get());
- window_->set_id(1);
-
- window2_.reset(new aura::Window(&delegate2_));
- window2_->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window2_->Init(ui::LAYER_NOT_DRAWN);
- ParentWindowInPrimaryRootWindow(window2_.get());
- window2_->set_id(2);
-
- window3_.reset(new aura::Window(&delegate3_));
- window3_->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window3_->Init(ui::LAYER_NOT_DRAWN);
- ParentWindowInPrimaryRootWindow(window3_.get());
- window3_->set_id(3);
-
- window4_.reset(new aura::Window(&delegate4_));
- window4_->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window4_->Init(ui::LAYER_NOT_DRAWN);
- ParentWindowInPrimaryRootWindow(window4_.get());
- window4_->set_id(4);
- }
-
- virtual void TearDown() OVERRIDE {
- window_.reset();
- window2_.reset();
- window3_.reset();
- window4_.reset();
- touch_resize_window_.reset();
- AshTestBase::TearDown();
- }
-
- // Returns a string identifying the z-order of each of the known child windows
- // of |parent|. The returned string constains the id of the known windows and
- // is ordered from topmost to bottomost windows.
- std::string WindowOrderAsString(aura::Window* parent) const {
- std::string result;
- const aura::Window::Windows& windows = parent->children();
- for (aura::Window::Windows::const_reverse_iterator i = windows.rbegin();
- i != windows.rend(); ++i) {
- if (*i == window_ || *i == window2_ || *i == window3_) {
- if (!result.empty())
- result += " ";
- result += base::IntToString((*i)->id());
- }
- }
- return result;
- }
-
- protected:
- WindowResizer* CreateResizerForTest(
- aura::Window* window,
- const gfx::Point& point_in_parent,
- int window_component) {
- WindowResizer* resizer = CreateWindowResizer(
- window,
- point_in_parent,
- window_component,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE).release();
- workspace_resizer_ = WorkspaceWindowResizer::instance_;
- return resizer;
- }
-
- PhantomWindowController* snap_phantom_window_controller() const {
- return workspace_resizer_->snap_phantom_window_controller_.get();
- }
-
- gfx::Point CalculateDragPoint(const WindowResizer& resizer,
- int delta_x,
- int delta_y) const {
- gfx::Point location = resizer.GetInitialLocation();
- location.set_x(location.x() + delta_x);
- location.set_y(location.y() + delta_y);
- return location;
- }
-
- std::vector<aura::Window*> empty_windows() const {
- return std::vector<aura::Window*>();
- }
-
- internal::ShelfLayoutManager* shelf_layout_manager() {
- return Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager();
- }
-
- void InitTouchResizeWindow(const gfx::Rect& bounds, int window_component) {
- touch_resize_delegate_.set_window_component(window_component);
- touch_resize_window_.reset(
- CreateTestWindowInShellWithDelegate(&touch_resize_delegate_, 0,
- bounds));
- gfx::Insets mouse_outer_insets(-ash::kResizeOutsideBoundsSize,
- -ash::kResizeOutsideBoundsSize,
- -ash::kResizeOutsideBoundsSize,
- -ash::kResizeOutsideBoundsSize);
- gfx::Insets touch_outer_insets = mouse_outer_insets.Scale(
- ash::kResizeOutsideBoundsScaleForTouch);
- touch_resize_window_->SetHitTestBoundsOverrideOuter(mouse_outer_insets,
- touch_outer_insets);
- }
-
- // Simulate running the animation.
- void RunAnimationTillComplete(gfx::SlideAnimation* animation) {
- gfx::SlideAnimation::TestApi test_api(animation);
- test_api.RunTillComplete();
- }
-
- TestWindowDelegate delegate_;
- TestWindowDelegate delegate2_;
- TestWindowDelegate delegate3_;
- TestWindowDelegate delegate4_;
- scoped_ptr<aura::Window> window_;
- scoped_ptr<aura::Window> window2_;
- scoped_ptr<aura::Window> window3_;
- scoped_ptr<aura::Window> window4_;
-
- TestWindowDelegate touch_resize_delegate_;
- scoped_ptr<aura::Window> touch_resize_window_;
- WorkspaceWindowResizer* workspace_resizer_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizerTest);
-};
-
-class WorkspaceWindowResizerTestSticky : public WorkspaceWindowResizerTest {
- public:
- WorkspaceWindowResizerTestSticky() {}
- virtual ~WorkspaceWindowResizerTestSticky() {}
-
- virtual void SetUp() OVERRIDE {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshEnableStickyEdges);
- WorkspaceWindowResizerTest::SetUp();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizerTestSticky);
-};
-
-// Assertions around attached window resize dragging from the right with 2
-// windows.
-TEST_F(WorkspaceWindowResizerTest, AttachedResize_RIGHT_2) {
- window_->SetBounds(gfx::Rect(0, 300, 400, 300));
- window2_->SetBounds(gfx::Rect(400, 200, 100, 200));
-
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTRIGHT,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it 100 to the right, which should expand w1 and push w2.
- resizer->Drag(CalculateDragPoint(*resizer, 100, 10), 0);
- EXPECT_EQ("0,300 500x300", window_->bounds().ToString());
- EXPECT_EQ("500,200 100x200", window2_->bounds().ToString());
-
- // Push off the screen, w2 should be resized to its min.
- delegate2_.set_min_size(gfx::Size(20, 20));
- resizer->Drag(CalculateDragPoint(*resizer, 800, 20), 0);
- EXPECT_EQ("0,300 780x300", window_->bounds().ToString());
- EXPECT_EQ("780,200 20x200", window2_->bounds().ToString());
-
- // Move back to 100 and verify w2 gets its original size.
- resizer->Drag(CalculateDragPoint(*resizer, 100, 10), 0);
- EXPECT_EQ("0,300 500x300", window_->bounds().ToString());
- EXPECT_EQ("500,200 100x200", window2_->bounds().ToString());
-
- // Revert and make sure everything moves back.
- resizer->Drag(CalculateDragPoint(*resizer, 800, 20), 0);
- resizer->RevertDrag();
- EXPECT_EQ("0,300 400x300", window_->bounds().ToString());
- EXPECT_EQ("400,200 100x200", window2_->bounds().ToString());
-}
-
-// Assertions around collapsing and expanding.
-TEST_F(WorkspaceWindowResizerTest, AttachedResize_RIGHT_Compress) {
- window_->SetBounds(gfx::Rect( 0, 300, 400, 300));
- window2_->SetBounds(gfx::Rect(400, 200, 100, 200));
-
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTRIGHT,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it 100 to the left, which should expand w2 and collapse w1.
- resizer->Drag(CalculateDragPoint(*resizer, -100, 10), 0);
- EXPECT_EQ("0,300 300x300", window_->bounds().ToString());
- EXPECT_EQ("300,200 200x200", window2_->bounds().ToString());
-
- // Collapse all the way to w1's min.
- delegate_.set_min_size(gfx::Size(20, 20));
- resizer->Drag(CalculateDragPoint(*resizer, -800, 20), 0);
- EXPECT_EQ("0,300 20x300", window_->bounds().ToString());
- EXPECT_EQ("20,200 480x200", window2_->bounds().ToString());
-
- // Move 100 to the left.
- resizer->Drag(CalculateDragPoint(*resizer, 100, 10), 0);
- EXPECT_EQ("0,300 500x300", window_->bounds().ToString());
- EXPECT_EQ("500,200 100x200", window2_->bounds().ToString());
-
- // Back to -100.
- resizer->Drag(CalculateDragPoint(*resizer, -100, 20), 0);
- EXPECT_EQ("0,300 300x300", window_->bounds().ToString());
- EXPECT_EQ("300,200 200x200", window2_->bounds().ToString());
-}
-
-// Assertions around attached window resize dragging from the right with 3
-// windows.
-TEST_F(WorkspaceWindowResizerTest, AttachedResize_RIGHT_3) {
- window_->SetBounds(gfx::Rect( 100, 300, 200, 300));
- window2_->SetBounds(gfx::Rect(300, 300, 150, 200));
- window3_->SetBounds(gfx::Rect(450, 300, 100, 200));
- delegate2_.set_min_size(gfx::Size(52, 50));
- delegate3_.set_min_size(gfx::Size(38, 50));
-
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- windows.push_back(window3_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTRIGHT,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it 100 to the right, which should expand w1 and push w2 and w3.
- resizer->Drag(CalculateDragPoint(*resizer, 100, -10), 0);
- EXPECT_EQ("100,300 300x300", window_->bounds().ToString());
- EXPECT_EQ("400,300 150x200", window2_->bounds().ToString());
- EXPECT_EQ("550,300 100x200", window3_->bounds().ToString());
-
- // Move it 300, things should compress.
- resizer->Drag(CalculateDragPoint(*resizer, 300, -10), 0);
- EXPECT_EQ("100,300 500x300", window_->bounds().ToString());
- EXPECT_EQ("600,300 120x200", window2_->bounds().ToString());
- EXPECT_EQ("720,300 80x200", window3_->bounds().ToString());
-
- // Move it so much the last two end up at their min.
- resizer->Drag(CalculateDragPoint(*resizer, 800, 50), 0);
- EXPECT_EQ("100,300 610x300", window_->bounds().ToString());
- EXPECT_EQ("710,300 52x200", window2_->bounds().ToString());
- EXPECT_EQ("762,300 38x200", window3_->bounds().ToString());
-
- // Revert and make sure everything moves back.
- resizer->RevertDrag();
- EXPECT_EQ("100,300 200x300", window_->bounds().ToString());
- EXPECT_EQ("300,300 150x200", window2_->bounds().ToString());
- EXPECT_EQ("450,300 100x200", window3_->bounds().ToString());
-}
-
-// Assertions around attached window resizing (collapsing and expanding) with
-// 3 windows.
-TEST_F(WorkspaceWindowResizerTest, AttachedResize_RIGHT_3_Compress) {
- window_->SetBounds(gfx::Rect( 100, 300, 200, 300));
- window2_->SetBounds(gfx::Rect(300, 300, 200, 200));
- window3_->SetBounds(gfx::Rect(450, 300, 100, 200));
- delegate2_.set_min_size(gfx::Size(52, 50));
- delegate3_.set_min_size(gfx::Size(38, 50));
-
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- windows.push_back(window3_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTRIGHT,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it -100 to the right, which should collapse w1 and expand w2 and w3.
- resizer->Drag(CalculateDragPoint(*resizer, -100, -10), 0);
- EXPECT_EQ("100,300 100x300", window_->bounds().ToString());
- EXPECT_EQ("200,300 266x200", window2_->bounds().ToString());
- EXPECT_EQ("466,300 134x200", window3_->bounds().ToString());
-
- // Move it 100 to the right.
- resizer->Drag(CalculateDragPoint(*resizer, 100, -10), 0);
- EXPECT_EQ("100,300 300x300", window_->bounds().ToString());
- EXPECT_EQ("400,300 200x200", window2_->bounds().ToString());
- EXPECT_EQ("600,300 100x200", window3_->bounds().ToString());
-
- // 100 to the left again.
- resizer->Drag(CalculateDragPoint(*resizer, -100, -10), 0);
- EXPECT_EQ("100,300 100x300", window_->bounds().ToString());
- EXPECT_EQ("200,300 266x200", window2_->bounds().ToString());
- EXPECT_EQ("466,300 134x200", window3_->bounds().ToString());
-}
-
-// Assertions around collapsing and expanding from the bottom.
-TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_Compress) {
- window_->SetBounds(gfx::Rect( 0, 100, 400, 300));
- window2_->SetBounds(gfx::Rect(400, 400, 100, 200));
-
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTBOTTOM,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it up 100, which should expand w2 and collapse w1.
- resizer->Drag(CalculateDragPoint(*resizer, 10, -100), 0);
- EXPECT_EQ("0,100 400x200", window_->bounds().ToString());
- EXPECT_EQ("400,300 100x300", window2_->bounds().ToString());
-
- // Collapse all the way to w1's min.
- delegate_.set_min_size(gfx::Size(20, 20));
- resizer->Drag(CalculateDragPoint(*resizer, 20, -800), 0);
- EXPECT_EQ("0,100 400x20", window_->bounds().ToString());
- EXPECT_EQ("400,120 100x480", window2_->bounds().ToString());
-
- // Move 100 down.
- resizer->Drag(CalculateDragPoint(*resizer, 10, 100), 0);
- EXPECT_EQ("0,100 400x400", window_->bounds().ToString());
- EXPECT_EQ("400,500 100x100", window2_->bounds().ToString());
-
- // Back to -100.
- resizer->Drag(CalculateDragPoint(*resizer, 20, -100), 0);
- EXPECT_EQ("0,100 400x200", window_->bounds().ToString());
- EXPECT_EQ("400,300 100x300", window2_->bounds().ToString());
-}
-
-// Assertions around attached window resize dragging from the bottom with 2
-// windows.
-TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_2) {
- window_->SetBounds(gfx::Rect( 0, 50, 400, 200));
- window2_->SetBounds(gfx::Rect(0, 250, 200, 100));
-
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTBOTTOM,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it 100 to the bottom, which should expand w1 and push w2.
- resizer->Drag(CalculateDragPoint(*resizer, 10, 100), 0);
- EXPECT_EQ("0,50 400x300", window_->bounds().ToString());
- EXPECT_EQ("0,350 200x100", window2_->bounds().ToString());
-
- // Push off the screen, w2 should be resized to its min.
- delegate2_.set_min_size(gfx::Size(20, 20));
- resizer->Drag(CalculateDragPoint(*resizer, 50, 820), 0);
- EXPECT_EQ("0,50 400x530", window_->bounds().ToString());
- EXPECT_EQ("0,580 200x20", window2_->bounds().ToString());
-
- // Move back to 100 and verify w2 gets its original size.
- resizer->Drag(CalculateDragPoint(*resizer, 10, 100), 0);
- EXPECT_EQ("0,50 400x300", window_->bounds().ToString());
- EXPECT_EQ("0,350 200x100", window2_->bounds().ToString());
-
- // Revert and make sure everything moves back.
- resizer->Drag(CalculateDragPoint(*resizer, 800, 20), 0);
- resizer->RevertDrag();
- EXPECT_EQ("0,50 400x200", window_->bounds().ToString());
- EXPECT_EQ("0,250 200x100", window2_->bounds().ToString());
-}
-
-#if defined(OS_WIN)
-// RootWindow and Display can't resize on Windows Ash. http://crbug.com/165962
-#define MAYBE_AttachedResize_BOTTOM_3 DISABLED_AttachedResize_BOTTOM_3
-#else
-#define MAYBE_AttachedResize_BOTTOM_3 AttachedResize_BOTTOM_3
-#endif
-
-// Assertions around attached window resize dragging from the bottom with 3
-// windows.
-TEST_F(WorkspaceWindowResizerTest, MAYBE_AttachedResize_BOTTOM_3) {
- UpdateDisplay("600x800");
- aura::Window* root = Shell::GetPrimaryRootWindow();
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
-
- window_->SetBounds(gfx::Rect( 300, 100, 300, 200));
- window2_->SetBounds(gfx::Rect(300, 300, 200, 150));
- window3_->SetBounds(gfx::Rect(300, 450, 200, 100));
- delegate2_.set_min_size(gfx::Size(50, 52));
- delegate3_.set_min_size(gfx::Size(50, 38));
-
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- windows.push_back(window3_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTBOTTOM,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it 100 down, which should expand w1 and push w2 and w3.
- resizer->Drag(CalculateDragPoint(*resizer, -10, 100), 0);
- EXPECT_EQ("300,100 300x300", window_->bounds().ToString());
- EXPECT_EQ("300,400 200x150", window2_->bounds().ToString());
- EXPECT_EQ("300,550 200x100", window3_->bounds().ToString());
-
- // Move it 296 things should compress.
- resizer->Drag(CalculateDragPoint(*resizer, -10, 296), 0);
- EXPECT_EQ("300,100 300x496", window_->bounds().ToString());
- EXPECT_EQ("300,596 200x123", window2_->bounds().ToString());
- EXPECT_EQ("300,719 200x81", window3_->bounds().ToString());
-
- // Move it so much everything ends up at its min.
- resizer->Drag(CalculateDragPoint(*resizer, 50, 798), 0);
- EXPECT_EQ("300,100 300x610", window_->bounds().ToString());
- EXPECT_EQ("300,710 200x52", window2_->bounds().ToString());
- EXPECT_EQ("300,762 200x38", window3_->bounds().ToString());
-
- // Revert and make sure everything moves back.
- resizer->RevertDrag();
- EXPECT_EQ("300,100 300x200", window_->bounds().ToString());
- EXPECT_EQ("300,300 200x150", window2_->bounds().ToString());
- EXPECT_EQ("300,450 200x100", window3_->bounds().ToString());
-}
-
-// Assertions around attached window resizing (collapsing and expanding) with
-// 3 windows.
-TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_3_Compress) {
- window_->SetBounds(gfx::Rect( 0, 0, 200, 200));
- window2_->SetBounds(gfx::Rect(10, 200, 200, 200));
- window3_->SetBounds(gfx::Rect(20, 400, 100, 100));
- delegate2_.set_min_size(gfx::Size(52, 50));
- delegate3_.set_min_size(gfx::Size(38, 50));
-
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- windows.push_back(window3_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTBOTTOM,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it 100 up, which should collapse w1 and expand w2 and w3.
- resizer->Drag(CalculateDragPoint(*resizer, -10, -100), 0);
- EXPECT_EQ("0,0 200x100", window_->bounds().ToString());
- EXPECT_EQ("10,100 200x266", window2_->bounds().ToString());
- EXPECT_EQ("20,366 100x134", window3_->bounds().ToString());
-
- // Move it 100 down.
- resizer->Drag(CalculateDragPoint(*resizer, 10, 100), 0);
- EXPECT_EQ("0,0 200x300", window_->bounds().ToString());
- EXPECT_EQ("10,300 200x200", window2_->bounds().ToString());
- EXPECT_EQ("20,500 100x100", window3_->bounds().ToString());
-
- // 100 up again.
- resizer->Drag(CalculateDragPoint(*resizer, -10, -100), 0);
- EXPECT_EQ("0,0 200x100", window_->bounds().ToString());
- EXPECT_EQ("10,100 200x266", window2_->bounds().ToString());
- EXPECT_EQ("20,366 100x134", window3_->bounds().ToString());
-}
-
-// Tests that touch-dragging a window does not lock the mouse cursor
-// and therefore shows the cursor on a mousemove.
-TEST_F(WorkspaceWindowResizerTest, MouseMoveWithTouchDrag) {
- window_->SetBounds(gfx::Rect(0, 300, 400, 300));
- window2_->SetBounds(gfx::Rect(400, 200, 100, 200));
-
- Shell* shell = Shell::GetInstance();
- aura::test::EventGenerator generator(window_->GetRootWindow());
-
- // The cursor should not be locked initially.
- EXPECT_FALSE(shell->cursor_manager()->IsCursorLocked());
-
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTRIGHT,
- aura::client::WINDOW_MOVE_SOURCE_TOUCH, windows));
- ASSERT_TRUE(resizer.get());
-
- // Creating a WorkspaceWindowResizer should not lock the cursor.
- EXPECT_FALSE(shell->cursor_manager()->IsCursorLocked());
-
- // The cursor should be hidden after touching the screen and
- // starting a drag.
- EXPECT_TRUE(shell->cursor_manager()->IsCursorVisible());
- generator.PressTouch();
- resizer->Drag(CalculateDragPoint(*resizer, 100, 10), 0);
- EXPECT_FALSE(shell->cursor_manager()->IsCursorVisible());
- EXPECT_FALSE(shell->cursor_manager()->IsCursorLocked());
-
- // Moving the mouse should show the cursor.
- generator.MoveMouseBy(1, 1);
- EXPECT_TRUE(shell->cursor_manager()->IsCursorVisible());
- EXPECT_FALSE(shell->cursor_manager()->IsCursorLocked());
-
- resizer->RevertDrag();
-}
-
-// Assertions around dragging to the left/right edge of the screen.
-TEST_F(WorkspaceWindowResizerTest, Edge) {
- if (!SupportsHostWindowResize())
- return;
-
- // Resize host window to force insets update.
- UpdateDisplay("800x700");
- // TODO(varkha): Insets are reset after every drag because of
- // http://crbug.com/292238.
- // Window is wide enough not to get docked right away.
- window_->SetBounds(gfx::Rect(20, 30, 400, 60));
- wm::WindowState* window_state = wm::GetWindowState(window_.get());
-
- {
- internal::SnapSizer snap_sizer(window_state, gfx::Point(),
- internal::SnapSizer::LEFT_EDGE, internal::SnapSizer::OTHER_INPUT);
- gfx::Rect expected_bounds(snap_sizer.target_bounds());
-
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 10), 0);
- resizer->CompleteDrag(0);
-
- EXPECT_EQ(expected_bounds.ToString(), window_->bounds().ToString());
- ASSERT_TRUE(window_state->HasRestoreBounds());
- EXPECT_EQ("20,30 400x60",
- window_state->GetRestoreBoundsInScreen().ToString());
- }
- // Try the same with the right side.
- {
- internal::SnapSizer snap_sizer(window_state, gfx::Point(),
- internal::SnapSizer::RIGHT_EDGE, internal::SnapSizer::OTHER_INPUT);
- gfx::Rect expected_bounds(snap_sizer.target_bounds());
-
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 800, 10), 0);
- resizer->CompleteDrag(0);
- EXPECT_EQ(expected_bounds.ToString(), window_->bounds().ToString());
- ASSERT_TRUE(window_state->HasRestoreBounds());
- EXPECT_EQ("20,30 400x60",
- window_state->GetRestoreBoundsInScreen().ToString());
- }
-
- // Test if the restore bounds is correct in multiple displays.
- if (!SupportsMultipleDisplays())
- return;
-
- // Restore the window to clear snapped state.
- window_state->Restore();
-
- UpdateDisplay("800x600,500x600");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- EXPECT_EQ(root_windows[0], window_->GetRootWindow());
- // Window is wide enough not to get docked right away.
- window_->SetBoundsInScreen(gfx::Rect(800, 10, 400, 60),
- ScreenAsh::GetSecondaryDisplay());
- EXPECT_EQ(root_windows[1], window_->GetRootWindow());
- {
- EXPECT_EQ("800,10 400x60", window_->GetBoundsInScreen().ToString());
-
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 499, 0), 0);
- int bottom =
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(window_.get()).bottom();
- resizer->CompleteDrag(0);
- // With the resolution of 500x600 we will hit in this case the 50% screen
- // size setting.
- // TODO(varkha): Insets are updated because of http://crbug.com/292238
- EXPECT_EQ("250,0 250x" + base::IntToString(bottom),
- window_->bounds().ToString());
- EXPECT_EQ("800,10 400x60",
- window_state->GetRestoreBoundsInScreen().ToString());
- }
-}
-
-// Check that non resizable windows will not get resized.
-TEST_F(WorkspaceWindowResizerTest, NonResizableWindows) {
- window_->SetBounds(gfx::Rect(20, 30, 50, 60));
- window_->SetProperty(aura::client::kCanResizeKey, false);
-
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, -20, 0), 0);
- resizer->CompleteDrag(0);
- EXPECT_EQ("0,30 50x60", window_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, CancelSnapPhantom) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("800x600,800x600");
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- ASSERT_EQ(2U, root_windows.size());
-
- window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
- EXPECT_EQ(root_windows[0], window_->GetRootWindow());
- EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
- {
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- EXPECT_FALSE(snap_phantom_window_controller());
-
- // The pointer is on the edge but not shared. The snap phantom window
- // controller should be non-NULL.
- resizer->Drag(CalculateDragPoint(*resizer, 799, 0), 0);
- EXPECT_TRUE(snap_phantom_window_controller());
-
- // Move the cursor across the edge. Now the snap phantom window controller
- // should be canceled.
- resizer->Drag(CalculateDragPoint(*resizer, 800, 0), 0);
- EXPECT_FALSE(snap_phantom_window_controller());
- }
-}
-
-// Verifies windows are correctly restacked when reordering multiple windows.
-TEST_F(WorkspaceWindowResizerTest, RestackAttached) {
- window_->SetBounds(gfx::Rect( 0, 0, 200, 300));
- window2_->SetBounds(gfx::Rect(200, 0, 100, 200));
- window3_->SetBounds(gfx::Rect(300, 0, 100, 100));
-
- {
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTRIGHT,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it 100 to the right, which should expand w1 and push w2 and w3.
- resizer->Drag(CalculateDragPoint(*resizer, 100, -10), 0);
-
- // 2 should be topmost since it's initially the highest in the stack.
- EXPECT_EQ("2 1 3", WindowOrderAsString(window_->parent()));
- }
-
- {
- std::vector<aura::Window*> windows;
- windows.push_back(window3_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window2_.get(), gfx::Point(), HTRIGHT,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it 100 to the right, which should expand w1 and push w2 and w3.
- resizer->Drag(CalculateDragPoint(*resizer, 100, -10), 0);
-
- // 2 should be topmost since it's initially the highest in the stack.
- EXPECT_EQ("2 3 1", WindowOrderAsString(window_->parent()));
- }
-}
-
-// Makes sure we don't allow dragging below the work area.
-TEST_F(WorkspaceWindowResizerTest, DontDragOffBottom) {
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
- Shell::GetPrimaryRootWindow(), gfx::Insets(0, 0, 10, 0));
-
- ASSERT_EQ(1, Shell::GetScreen()->GetNumDisplays());
-
- window_->SetBounds(gfx::Rect(100, 200, 300, 400));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 600), 0);
- int expected_y =
- kRootHeight - WorkspaceWindowResizer::kMinOnscreenHeight - 10;
- EXPECT_EQ("100," + base::IntToString(expected_y) + " 300x400",
- window_->bounds().ToString());
-}
-
-// Makes sure we don't allow dragging on the work area with multidisplay.
-TEST_F(WorkspaceWindowResizerTest, DontDragOffBottomWithMultiDisplay) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("800x600,800x600");
- ASSERT_EQ(2, Shell::GetScreen()->GetNumDisplays());
-
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
- Shell::GetPrimaryRootWindow(), gfx::Insets(0, 0, 10, 0));
-
- // Positions the secondary display at the bottom the primary display.
- Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays(
- ash::DisplayLayout(ash::DisplayLayout::BOTTOM, 0));
-
- {
- window_->SetBounds(gfx::Rect(100, 200, 300, 20));
- DCHECK_LT(window_->bounds().height(),
- WorkspaceWindowResizer::kMinOnscreenHeight);
- // Drag down avoiding dragging along the edge as that would side-snap.
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(10, 0), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 400), 0);
- int expected_y = kRootHeight - window_->bounds().height() - 10;
- // When the mouse cursor is in the primary display, the window cannot move
- // on non-work area but can get all the way towards the bottom,
- // restricted only by the window height.
- EXPECT_EQ("100," + base::IntToString(expected_y) + " 300x20",
- window_->bounds().ToString());
- // Revert the drag in order to not remember the restore bounds.
- resizer->RevertDrag();
- }
-
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
- Shell::GetPrimaryRootWindow(), gfx::Insets(0, 0, 10, 0));
- {
- window_->SetBounds(gfx::Rect(100, 200, 300, 400));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(10, 0), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- // Drag down avoiding dragging along the edge as that would side-snap.
- resizer->Drag(CalculateDragPoint(*resizer, 0, 400), 0);
- int expected_y =
- kRootHeight - WorkspaceWindowResizer::kMinOnscreenHeight - 10;
- // When the mouse cursor is in the primary display, the window cannot move
- // on non-work area with kMinOnscreenHeight margin.
- EXPECT_EQ("100," + base::IntToString(expected_y) + " 300x400",
- window_->bounds().ToString());
- resizer->CompleteDrag(0);
- }
-
- {
- window_->SetBounds(gfx::Rect(100, 200, 300, 400));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), window_->bounds().origin(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- // Drag down avoiding getting stuck against the shelf on the bottom screen.
- resizer->Drag(CalculateDragPoint(*resizer, 0, 500), 0);
- // The window can move to the secondary display beyond non-work area of
- // the primary display.
- EXPECT_EQ("100,700 300x400", window_->bounds().ToString());
- resizer->CompleteDrag(0);
- }
-}
-
-// Makes sure we don't allow dragging off the top of the work area.
-TEST_F(WorkspaceWindowResizerTest, DontDragOffTop) {
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
- Shell::GetPrimaryRootWindow(), gfx::Insets(10, 0, 0, 0));
-
- window_->SetBounds(gfx::Rect(100, 200, 300, 400));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 0, -600), 0);
- EXPECT_EQ("100,10 300x400", window_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, ResizeBottomOutsideWorkArea) {
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
- Shell::GetPrimaryRootWindow(), gfx::Insets(0, 0, 50, 0));
-
- window_->SetBounds(gfx::Rect(100, 200, 300, 380));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTTOP));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 8, 0), 0);
- EXPECT_EQ("100,200 300x380", window_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, ResizeWindowOutsideLeftWorkArea) {
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
- Shell::GetPrimaryRootWindow(), gfx::Insets(0, 0, 50, 0));
- int left = ScreenAsh::GetDisplayWorkAreaBoundsInParent(window_.get()).x();
- int pixels_to_left_border = 50;
- int window_width = 300;
- int window_x = left - window_width + pixels_to_left_border;
- window_->SetBounds(gfx::Rect(window_x, 100, window_width, 380));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(pixels_to_left_border, 0), HTRIGHT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, -window_width, 0), 0);
- EXPECT_EQ(base::IntToString(window_x) + ",100 " +
- base::IntToString(kMinimumOnScreenArea - window_x) +
- "x380", window_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, ResizeWindowOutsideRightWorkArea) {
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
- Shell::GetPrimaryRootWindow(), gfx::Insets(0, 0, 50, 0));
- int right = ScreenAsh::GetDisplayWorkAreaBoundsInParent(
- window_.get()).right();
- int pixels_to_right_border = 50;
- int window_width = 300;
- int window_x = right - pixels_to_right_border;
- window_->SetBounds(gfx::Rect(window_x, 100, window_width, 380));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(window_x, 0), HTLEFT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, window_width, 0), 0);
- EXPECT_EQ(base::IntToString(right - kMinimumOnScreenArea) +
- ",100 " +
- base::IntToString(window_width - pixels_to_right_border +
- kMinimumOnScreenArea) +
- "x380", window_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, ResizeWindowOutsideBottomWorkArea) {
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
- Shell::GetPrimaryRootWindow(), gfx::Insets(0, 0, 50, 0));
- int bottom = ScreenAsh::GetDisplayWorkAreaBoundsInParent(
- window_.get()).bottom();
- int delta_to_bottom = 50;
- int height = 380;
- window_->SetBounds(gfx::Rect(100, bottom - delta_to_bottom, 300, height));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(0, bottom - delta_to_bottom), HTTOP));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 0, bottom), 0);
- EXPECT_EQ("100," +
- base::IntToString(bottom - kMinimumOnScreenArea) +
- " 300x" +
- base::IntToString(height - (delta_to_bottom -
- kMinimumOnScreenArea)),
- window_->bounds().ToString());
-}
-
-// Verifies that 'outside' check of the resizer take into account the extended
-// desktop in case of repositions.
-TEST_F(WorkspaceWindowResizerTest, DragWindowOutsideRightToSecondaryDisplay) {
- // Only primary display. Changes the window position to fit within the
- // display.
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
- Shell::GetPrimaryRootWindow(), gfx::Insets(0, 0, 50, 0));
- int right = ScreenAsh::GetDisplayWorkAreaBoundsInParent(
- window_.get()).right();
- int pixels_to_right_border = 50;
- int window_width = 300;
- int window_x = right - pixels_to_right_border;
- window_->SetBounds(gfx::Rect(window_x, 100, window_width, 380));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(window_x, 0), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, window_width, 0), 0);
- EXPECT_EQ(base::IntToString(right - kMinimumOnScreenArea) +
- ",100 " +
- base::IntToString(window_width) +
- "x380", window_->bounds().ToString());
-
- if (!SupportsMultipleDisplays())
- return;
-
- // With secondary display. Operation itself is same but doesn't change
- // the position because the window is still within the secondary display.
- UpdateDisplay("1000x600,600x400");
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
- Shell::GetPrimaryRootWindow(), gfx::Insets(0, 0, 50, 0));
- window_->SetBounds(gfx::Rect(window_x, 100, window_width, 380));
- resizer->Drag(CalculateDragPoint(*resizer, window_width, 0), 0);
- EXPECT_EQ(base::IntToString(window_x + window_width) +
- ",100 " +
- base::IntToString(window_width) +
- "x380", window_->bounds().ToString());
-}
-
-// Verifies snapping to edges works.
-TEST_F(WorkspaceWindowResizerTest, SnapToEdge) {
- Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager()->
- SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- window_->SetBounds(gfx::Rect(96, 112, 320, 160));
- // Click 50px to the right so that the mouse pointer does not leave the
- // workspace ensuring sticky behavior.
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(),
- window_->bounds().origin() + gfx::Vector2d(50, 0),
- HTCAPTION));
- ASSERT_TRUE(resizer.get());
- // Move to an x-coordinate of 15, which should not snap.
- resizer->Drag(CalculateDragPoint(*resizer, 15 - 96, 0), 0);
- // An x-coordinate of 7 should snap.
- resizer->Drag(CalculateDragPoint(*resizer, 7 - 96, 0), 0);
- EXPECT_EQ("0,112 320x160", window_->bounds().ToString());
- // Move to -15, should still snap to 0.
- resizer->Drag(CalculateDragPoint(*resizer, -15 - 96, 0), 0);
- EXPECT_EQ("0,112 320x160", window_->bounds().ToString());
- // At -32 should move past snap points.
- resizer->Drag(CalculateDragPoint(*resizer, -32 - 96, 0), 0);
- EXPECT_EQ("-32,112 320x160", window_->bounds().ToString());
- resizer->Drag(CalculateDragPoint(*resizer, -33 - 96, 0), 0);
- EXPECT_EQ("-33,112 320x160", window_->bounds().ToString());
-
- // Right side should similarly snap.
- resizer->Drag(CalculateDragPoint(*resizer, 800 - 320 - 96 - 15, 0), 0);
- EXPECT_EQ("465,112 320x160", window_->bounds().ToString());
- resizer->Drag(CalculateDragPoint(*resizer, 800 - 320 - 96 - 7, 0), 0);
- EXPECT_EQ("480,112 320x160", window_->bounds().ToString());
- resizer->Drag(CalculateDragPoint(*resizer, 800 - 320 - 96 + 15, 0), 0);
- EXPECT_EQ("480,112 320x160", window_->bounds().ToString());
- resizer->Drag(CalculateDragPoint(*resizer, 800 - 320 - 96 + 32, 0), 0);
- EXPECT_EQ("512,112 320x160", window_->bounds().ToString());
- resizer->Drag(CalculateDragPoint(*resizer, 800 - 320 - 96 + 33, 0), 0);
- EXPECT_EQ("513,112 320x160", window_->bounds().ToString());
-
- // And the bottom should snap too.
- resizer->Drag(CalculateDragPoint(*resizer, 0, 600 - 160 - 112 - 3 - 7), 0);
- EXPECT_EQ("96,437 320x160", window_->bounds().ToString());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 600 - 160 - 112 - 3 + 15), 0);
- EXPECT_EQ("96,437 320x160", window_->bounds().ToString());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 600 - 160 - 112 - 2 + 32), 0);
- EXPECT_EQ("96,470 320x160", window_->bounds().ToString());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 600 - 160 - 112 - 2 + 33), 0);
- EXPECT_EQ("96,471 320x160", window_->bounds().ToString());
-
- // And the top should snap too.
- resizer->Drag(CalculateDragPoint(*resizer, 0, -112 + 20), 0);
- EXPECT_EQ("96,20 320x160", window_->bounds().ToString());
- resizer->Drag(CalculateDragPoint(*resizer, 0, -112 + 7), 0);
- EXPECT_EQ("96,0 320x160", window_->bounds().ToString());
-
- // And bottom/left should snap too.
- resizer->Drag(
- CalculateDragPoint(*resizer, 7 - 96, 600 - 160 - 112 - 3 - 7), 0);
- EXPECT_EQ("0,437 320x160", window_->bounds().ToString());
- resizer->Drag(
- CalculateDragPoint(*resizer, -15 - 96, 600 - 160 - 112 - 3 + 15), 0);
- EXPECT_EQ("0,437 320x160", window_->bounds().ToString());
- // should move past snap points.
- resizer->Drag(
- CalculateDragPoint(*resizer, -32 - 96, 600 - 160 - 112 - 2 + 32), 0);
- EXPECT_EQ("-32,470 320x160", window_->bounds().ToString());
- resizer->Drag(
- CalculateDragPoint(*resizer, -33 - 96, 600 - 160 - 112 - 2 + 33), 0);
- EXPECT_EQ("-33,471 320x160", window_->bounds().ToString());
-
- // No need to test dragging < 0 as we force that to 0.
-}
-
-// Verifies a resize snap when dragging TOPLEFT.
-TEST_F(WorkspaceWindowResizerTest, SnapToWorkArea_TOPLEFT) {
- window_->SetBounds(gfx::Rect(100, 200, 20, 30));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTTOPLEFT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, -98, -199), 0);
- EXPECT_EQ("0,0 120x230", window_->bounds().ToString());
-}
-
-// Verifies a resize snap when dragging TOPRIGHT.
-TEST_F(WorkspaceWindowResizerTest, SnapToWorkArea_TOPRIGHT) {
- window_->SetBounds(gfx::Rect(100, 200, 20, 30));
- gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(
- window_.get()));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTTOPRIGHT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(
- CalculateDragPoint(*resizer, work_area.right() - 120 - 1, -199), 0);
- EXPECT_EQ(100, window_->bounds().x());
- EXPECT_EQ(work_area.y(), window_->bounds().y());
- EXPECT_EQ(work_area.right() - 100, window_->bounds().width());
- EXPECT_EQ(230, window_->bounds().height());
-}
-
-// Verifies a resize snap when dragging BOTTOMRIGHT.
-TEST_F(WorkspaceWindowResizerTest, SnapToWorkArea_BOTTOMRIGHT) {
- window_->SetBounds(gfx::Rect(100, 200, 20, 30));
- gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(
- window_.get()));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTBOTTOMRIGHT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(
- CalculateDragPoint(*resizer, work_area.right() - 120 - 1,
- work_area.bottom() - 220 - 2), 0);
- EXPECT_EQ(100, window_->bounds().x());
- EXPECT_EQ(200, window_->bounds().y());
- EXPECT_EQ(work_area.right() - 100, window_->bounds().width());
- EXPECT_EQ(work_area.bottom() - 200, window_->bounds().height());
-}
-
-// Verifies a resize snap when dragging BOTTOMLEFT.
-TEST_F(WorkspaceWindowResizerTest, SnapToWorkArea_BOTTOMLEFT) {
- window_->SetBounds(gfx::Rect(100, 200, 20, 30));
- gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(
- window_.get()));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTBOTTOMLEFT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(
- CalculateDragPoint(*resizer, -98, work_area.bottom() - 220 - 2), 0);
- EXPECT_EQ(0, window_->bounds().x());
- EXPECT_EQ(200, window_->bounds().y());
- EXPECT_EQ(120, window_->bounds().width());
- EXPECT_EQ(work_area.bottom() - 200, window_->bounds().height());
-}
-
-// Verifies sticking to edges works.
-TEST_F(WorkspaceWindowResizerTestSticky, StickToEdge) {
- Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager()->
- SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- window_->SetBounds(gfx::Rect(96, 112, 320, 160));
- // Click 50px to the right so that the mouse pointer does not leave the
- // workspace ensuring sticky behavior.
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(),
- window_->bounds().origin() + gfx::Vector2d(50, 0),
- HTCAPTION));
- ASSERT_TRUE(resizer.get());
- // Move to an x-coordinate of 15, which should not stick.
- resizer->Drag(CalculateDragPoint(*resizer, 15 - 96, 0), 0);
- // Move to -15, should still stick to 0.
- resizer->Drag(CalculateDragPoint(*resizer, -15 - 96, 0), 0);
- EXPECT_EQ("0,112 320x160", window_->bounds().ToString());
- // At -100 should move past edge.
- resizer->Drag(CalculateDragPoint(*resizer, -100 - 96, 0), 0);
- EXPECT_EQ("-100,112 320x160", window_->bounds().ToString());
- resizer->Drag(CalculateDragPoint(*resizer, -101 - 96, 0), 0);
- EXPECT_EQ("-101,112 320x160", window_->bounds().ToString());
-
- // Right side should similarly stick.
- resizer->Drag(CalculateDragPoint(*resizer, 800 - 320 - 96 - 15, 0), 0);
- EXPECT_EQ("465,112 320x160", window_->bounds().ToString());
- resizer->Drag(CalculateDragPoint(*resizer, 800 - 320 - 96 + 15, 0), 0);
- EXPECT_EQ("480,112 320x160", window_->bounds().ToString());
- resizer->Drag(CalculateDragPoint(*resizer, 800 - 320 - 96 + 100, 0), 0);
- EXPECT_EQ("580,112 320x160", window_->bounds().ToString());
- resizer->Drag(CalculateDragPoint(*resizer, 800 - 320 - 96 + 101, 0), 0);
- EXPECT_EQ("581,112 320x160", window_->bounds().ToString());
-
- // And the bottom should stick too.
- resizer->Drag(CalculateDragPoint(*resizer, 0, 600 - 160 - 112 - 3 + 15), 0);
- EXPECT_EQ("96,437 320x160", window_->bounds().ToString());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 600 - 160 - 112 - 2 + 100), 0);
- EXPECT_EQ("96,538 320x160", window_->bounds().ToString());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 600 - 160 - 112 - 2 + 101), 0);
- EXPECT_EQ("96,539 320x160", window_->bounds().ToString());
-
- // No need to test dragging < 0 as we force that to 0.
-}
-
-// Verifies not sticking to edges when a mouse pointer is outside of work area.
-TEST_F(WorkspaceWindowResizerTestSticky, NoStickToEdgeWhenOutside) {
- Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager()->
- SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- window_->SetBounds(gfx::Rect(96, 112, 320, 160));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- // Move to an x-coordinate of 15, which should not stick.
- resizer->Drag(CalculateDragPoint(*resizer, 15 - 96, 0), 0);
- // Move to -15, should still stick to 0.
- resizer->Drag(CalculateDragPoint(*resizer, -15 - 96, 0), 0);
- EXPECT_EQ("-15,112 320x160", window_->bounds().ToString());
-}
-
-// Verifies a resize sticks when dragging TOPLEFT.
-TEST_F(WorkspaceWindowResizerTestSticky, StickToWorkArea_TOPLEFT) {
- window_->SetBounds(gfx::Rect(100, 200, 20, 30));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTTOPLEFT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, -15 - 100, -15 -200), 0);
- EXPECT_EQ("0,0 120x230", window_->bounds().ToString());
-}
-
-// Verifies a resize sticks when dragging TOPRIGHT.
-TEST_F(WorkspaceWindowResizerTestSticky, StickToWorkArea_TOPRIGHT) {
- window_->SetBounds(gfx::Rect(100, 200, 20, 30));
- gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(
- window_.get()));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTTOPRIGHT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, work_area.right() - 100 + 20,
- -200 - 15), 0);
- EXPECT_EQ(100, window_->bounds().x());
- EXPECT_EQ(work_area.y(), window_->bounds().y());
- EXPECT_EQ(work_area.right() - 100, window_->bounds().width());
- EXPECT_EQ(230, window_->bounds().height());
-}
-
-// Verifies a resize snap when dragging BOTTOMRIGHT.
-TEST_F(WorkspaceWindowResizerTestSticky, StickToWorkArea_BOTTOMRIGHT) {
- window_->SetBounds(gfx::Rect(100, 200, 20, 30));
- gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(
- window_.get()));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTBOTTOMRIGHT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, work_area.right() - 100 - 20 + 15,
- work_area.bottom() - 200 - 30 + 15), 0);
- EXPECT_EQ(100, window_->bounds().x());
- EXPECT_EQ(200, window_->bounds().y());
- EXPECT_EQ(work_area.right() - 100, window_->bounds().width());
- EXPECT_EQ(work_area.bottom() - 200, window_->bounds().height());
-}
-
-// Verifies a resize snap when dragging BOTTOMLEFT.
-TEST_F(WorkspaceWindowResizerTestSticky, StickToWorkArea_BOTTOMLEFT) {
- window_->SetBounds(gfx::Rect(100, 200, 20, 30));
- gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(
- window_.get()));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTBOTTOMLEFT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, -15 - 100,
- work_area.bottom() - 200 - 30 + 15), 0);
- EXPECT_EQ(0, window_->bounds().x());
- EXPECT_EQ(200, window_->bounds().y());
- EXPECT_EQ(120, window_->bounds().width());
- EXPECT_EQ(work_area.bottom() - 200, window_->bounds().height());
-}
-
-TEST_F(WorkspaceWindowResizerTest, CtrlDragResizeToExactPosition) {
- window_->SetBounds(gfx::Rect(96, 112, 320, 160));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTBOTTOMRIGHT));
- ASSERT_TRUE(resizer.get());
- // Resize the right bottom to add 10 in width, 12 in height.
- resizer->Drag(CalculateDragPoint(*resizer, 10, 12), ui::EF_CONTROL_DOWN);
- // Both bottom and right sides to resize to exact size requested.
- EXPECT_EQ("96,112 330x172", window_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, CtrlCompleteDragMoveToExactPosition) {
- window_->SetBounds(gfx::Rect(96, 112, 320, 160));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- // Ctrl + drag the window to new poistion by adding (10, 12) to its origin,
- // the window should move to the exact position.
- resizer->Drag(CalculateDragPoint(*resizer, 10, 12), 0);
- resizer->CompleteDrag(ui::EF_CONTROL_DOWN);
- EXPECT_EQ("106,124 320x160", window_->bounds().ToString());
-}
-
-// Verifies that a dragged window will restore to its pre-maximized size.
-TEST_F(WorkspaceWindowResizerTest, RestoreToPreMaximizeCoordinates) {
- window_->SetBounds(gfx::Rect(0, 0, 1000, 1000));
- wm::WindowState* window_state = wm::GetWindowState(window_.get());
- window_state->SetRestoreBoundsInScreen(gfx::Rect(96, 112, 320, 160));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- // Drag the window to new position by adding (10, 10) to original point,
- // the window should get restored.
- resizer->Drag(CalculateDragPoint(*resizer, 10, 10), 0);
- resizer->CompleteDrag(0);
- EXPECT_EQ("10,10 320x160", window_->bounds().ToString());
- // The restore rectangle should get cleared as well.
- EXPECT_FALSE(window_state->HasRestoreBounds());
-}
-
-// Verifies that a dragged window will restore to its pre-maximized size.
-TEST_F(WorkspaceWindowResizerTest, RevertResizeOperation) {
- const gfx::Rect initial_bounds(0, 0, 200, 400);
- window_->SetBounds(initial_bounds);
-
- wm::WindowState* window_state = wm::GetWindowState(window_.get());
- window_state->SetRestoreBoundsInScreen(gfx::Rect(96, 112, 320, 160));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- // Drag the window to new poistion by adding (180, 16) to original point,
- // the window should get restored.
- resizer->Drag(CalculateDragPoint(*resizer, 180, 16), 0);
- resizer->RevertDrag();
- EXPECT_EQ(initial_bounds.ToString(), window_->bounds().ToString());
- EXPECT_EQ("96,112 320x160",
- window_state->GetRestoreBoundsInScreen().ToString());
-}
-
-// Check that only usable sizes get returned by the resizer.
-TEST_F(WorkspaceWindowResizerTest, MagneticallyAttach) {
- window_->SetBounds(gfx::Rect(10, 10, 20, 30));
- window2_->SetBounds(gfx::Rect(150, 160, 25, 20));
- window2_->Show();
-
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- // Move |window| one pixel to the left of |window2|. Should snap to right and
- // top.
- resizer->Drag(CalculateDragPoint(*resizer, 119, 145), 0);
- EXPECT_EQ("130,160 20x30", window_->bounds().ToString());
-
- // Move |window| one pixel to the right of |window2|. Should snap to left and
- // top.
- resizer->Drag(CalculateDragPoint(*resizer, 164, 145), 0);
- EXPECT_EQ("175,160 20x30", window_->bounds().ToString());
-
- // Move |window| one pixel above |window2|. Should snap to top and left.
- resizer->Drag(CalculateDragPoint(*resizer, 142, 119), 0);
- EXPECT_EQ("150,130 20x30", window_->bounds().ToString());
-
- // Move |window| one pixel above the bottom of |window2|. Should snap to
- // bottom and left.
- resizer->Drag(CalculateDragPoint(*resizer, 142, 169), 0);
- EXPECT_EQ("150,180 20x30", window_->bounds().ToString());
-}
-
-// The following variants verify magnetic snapping during resize when dragging a
-// particular edge.
-TEST_F(WorkspaceWindowResizerTest, MagneticallyResize_TOP) {
- window_->SetBounds(gfx::Rect(100, 200, 20, 30));
- window2_->SetBounds(gfx::Rect(99, 179, 10, 20));
- window2_->Show();
-
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTTOP));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 0), 0);
- EXPECT_EQ("100,199 20x31", window_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, MagneticallyResize_TOPLEFT) {
- window_->SetBounds(gfx::Rect(100, 200, 20, 30));
- window2_->SetBounds(gfx::Rect(99, 179, 10, 20));
- window2_->Show();
-
- {
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTTOPLEFT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 0), 0);
- EXPECT_EQ("99,199 21x31", window_->bounds().ToString());
- resizer->RevertDrag();
- }
-
- {
- window2_->SetBounds(gfx::Rect(88, 201, 10, 20));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTTOPLEFT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 0), 0);
- EXPECT_EQ("98,201 22x29", window_->bounds().ToString());
- resizer->RevertDrag();
- }
-}
-
-TEST_F(WorkspaceWindowResizerTest, MagneticallyResize_TOPRIGHT) {
- window_->SetBounds(gfx::Rect(100, 200, 20, 30));
- window2_->Show();
-
- {
- window2_->SetBounds(gfx::Rect(111, 179, 10, 20));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTTOPRIGHT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 0), 0);
- EXPECT_EQ("100,199 21x31", window_->bounds().ToString());
- resizer->RevertDrag();
- }
-
- {
- window2_->SetBounds(gfx::Rect(121, 199, 10, 20));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTTOPRIGHT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 0), 0);
- EXPECT_EQ("100,199 21x31", window_->bounds().ToString());
- resizer->RevertDrag();
- }
-}
-
-TEST_F(WorkspaceWindowResizerTest, MagneticallyResize_RIGHT) {
- window_->SetBounds(gfx::Rect(100, 200, 20, 30));
- window2_->SetBounds(gfx::Rect(121, 199, 10, 20));
- window2_->Show();
-
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTRIGHT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 0), 0);
- EXPECT_EQ("100,200 21x30", window_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, MagneticallyResize_BOTTOMRIGHT) {
- window_->SetBounds(gfx::Rect(100, 200, 20, 30));
- window2_->Show();
-
- {
- window2_->SetBounds(gfx::Rect(122, 212, 10, 20));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTBOTTOMRIGHT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 0), 0);
- EXPECT_EQ("100,200 22x32", window_->bounds().ToString());
- resizer->RevertDrag();
- }
-
- {
- window2_->SetBounds(gfx::Rect(111, 233, 10, 20));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTBOTTOMRIGHT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 0), 0);
- EXPECT_EQ("100,200 21x33", window_->bounds().ToString());
- resizer->RevertDrag();
- }
-}
-
-TEST_F(WorkspaceWindowResizerTest, MagneticallyResize_BOTTOM) {
- window_->SetBounds(gfx::Rect(100, 200, 20, 30));
- window2_->SetBounds(gfx::Rect(111, 233, 10, 20));
- window2_->Show();
-
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTBOTTOM));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 0), 0);
- EXPECT_EQ("100,200 20x33", window_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, MagneticallyResize_BOTTOMLEFT) {
- window_->SetBounds(gfx::Rect(100, 200, 20, 30));
- window2_->Show();
-
- {
- window2_->SetBounds(gfx::Rect(99, 231, 10, 20));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTBOTTOMLEFT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 0), 0);
- EXPECT_EQ("99,200 21x31", window_->bounds().ToString());
- resizer->RevertDrag();
- }
-
- {
- window2_->SetBounds(gfx::Rect(89, 209, 10, 20));
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTBOTTOMLEFT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 0), 0);
- EXPECT_EQ("99,200 21x29", window_->bounds().ToString());
- resizer->RevertDrag();
- }
-}
-
-TEST_F(WorkspaceWindowResizerTest, MagneticallyResize_LEFT) {
- window2_->SetBounds(gfx::Rect(89, 209, 10, 20));
- window_->SetBounds(gfx::Rect(100, 200, 20, 30));
- window2_->Show();
-
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTLEFT));
- ASSERT_TRUE(resizer.get());
- resizer->Drag(CalculateDragPoint(*resizer, 0, 0), 0);
- EXPECT_EQ("99,200 21x30", window_->bounds().ToString());
-}
-
-// Test that the user user moved window flag is getting properly set.
-TEST_F(WorkspaceWindowResizerTest, CheckUserWindowManagedFlags) {
- window_->SetBounds(gfx::Rect( 0, 50, 400, 200));
-
- std::vector<aura::Window*> no_attached_windows;
- // Check that an abort doesn't change anything.
- {
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- // Move it 100 to the bottom.
- resizer->Drag(CalculateDragPoint(*resizer, 0, 100), 0);
- EXPECT_EQ("0,150 400x200", window_->bounds().ToString());
- resizer->RevertDrag();
-
- EXPECT_FALSE(wm::GetWindowState(window_.get())->bounds_changed_by_user());
- }
-
- // Check that a completed move / size does change the user coordinates.
- {
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- // Move it 100 to the bottom.
- resizer->Drag(CalculateDragPoint(*resizer, 0, 100), 0);
- EXPECT_EQ("0,150 400x200", window_->bounds().ToString());
- resizer->CompleteDrag(0);
- EXPECT_TRUE(wm::GetWindowState(window_.get())->bounds_changed_by_user());
- }
-}
-
-// Test that a window with a specified max size doesn't exceed it when dragged.
-TEST_F(WorkspaceWindowResizerTest, TestMaxSizeEnforced) {
- window_->SetBounds(gfx::Rect(0, 0, 400, 300));
- delegate_.set_max_size(gfx::Size(401, 301));
-
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTBOTTOMRIGHT));
- resizer->Drag(CalculateDragPoint(*resizer, 2, 2), 0);
- EXPECT_EQ(401, window_->bounds().width());
- EXPECT_EQ(301, window_->bounds().height());
-}
-
-// Test that a window with a specified max width doesn't restrict its height.
-TEST_F(WorkspaceWindowResizerTest, TestPartialMaxSizeEnforced) {
- window_->SetBounds(gfx::Rect(0, 0, 400, 300));
- delegate_.set_max_size(gfx::Size(401, 0));
-
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTBOTTOMRIGHT));
- resizer->Drag(CalculateDragPoint(*resizer, 2, 2), 0);
- EXPECT_EQ(401, window_->bounds().width());
- EXPECT_EQ(302, window_->bounds().height());
-}
-
-// Test that a window with a specified max size can't be snapped.
-TEST_F(WorkspaceWindowResizerTest, PhantomSnapMaxSize) {
- {
- // With max size not set we get a phantom window controller for dragging off
- // the right hand side.
- // Make the window wider than maximum docked width.
- window_->SetBounds(gfx::Rect(0, 0, 400, 200));
-
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- EXPECT_FALSE(snap_phantom_window_controller());
- resizer->Drag(CalculateDragPoint(*resizer, 801, 0), 0);
- EXPECT_TRUE(snap_phantom_window_controller());
- resizer->RevertDrag();
- }
- {
- // With max size defined, we get no phantom window for snapping but we still
- // get a phantom window (docking guide).
- window_->SetBounds(gfx::Rect(0, 0, 400, 200));
- delegate_.set_max_size(gfx::Size(400, 200));
-
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- resizer->Drag(CalculateDragPoint(*resizer, 801, 0), 0);
- if (switches::UseDockedWindows())
- EXPECT_TRUE(snap_phantom_window_controller());
- else
- EXPECT_FALSE(snap_phantom_window_controller());
- resizer->RevertDrag();
- }
- {
- // With max size defined, we get no phantom window for snapping.
- window_->SetBounds(gfx::Rect(0, 0, 400, 200));
- delegate_.set_max_size(gfx::Size(400, 200));
- // With min size defined, we get no phantom window for docking.
- delegate_.set_min_size(gfx::Size(400, 200));
-
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- resizer->Drag(CalculateDragPoint(*resizer, 801, 0), 0);
- EXPECT_FALSE(snap_phantom_window_controller());
- resizer->RevertDrag();
- }
-}
-
-TEST_F(WorkspaceWindowResizerTest, DontRewardRightmostWindowForOverflows) {
- UpdateDisplay("600x800");
- aura::Window* root = Shell::GetPrimaryRootWindow();
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
-
- // Four 100x100 windows flush against eachother, starting at 100,100.
- window_->SetBounds(gfx::Rect( 100, 100, 100, 100));
- window2_->SetBounds(gfx::Rect(200, 100, 100, 100));
- window3_->SetBounds(gfx::Rect(300, 100, 100, 100));
- window4_->SetBounds(gfx::Rect(400, 100, 100, 100));
- delegate2_.set_max_size(gfx::Size(101, 0));
-
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- windows.push_back(window3_.get());
- windows.push_back(window4_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTRIGHT,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it 51 to the left, which should contract w1 and expand w2-4.
- // w2 will hit its max size straight away, and in doing so will leave extra
- // pixels that a naive implementation may award to the rightmost window. A
- // fair implementation will give 25 pixels to each of the other windows.
- resizer->Drag(CalculateDragPoint(*resizer, -51, 0), 0);
- EXPECT_EQ("100,100 49x100", window_->bounds().ToString());
- EXPECT_EQ("149,100 101x100", window2_->bounds().ToString());
- EXPECT_EQ("250,100 125x100", window3_->bounds().ToString());
- EXPECT_EQ("375,100 125x100", window4_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, DontExceedMaxWidth) {
- UpdateDisplay("600x800");
- aura::Window* root = Shell::GetPrimaryRootWindow();
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
-
- // Four 100x100 windows flush against eachother, starting at 100,100.
- window_->SetBounds(gfx::Rect( 100, 100, 100, 100));
- window2_->SetBounds(gfx::Rect(200, 100, 100, 100));
- window3_->SetBounds(gfx::Rect(300, 100, 100, 100));
- window4_->SetBounds(gfx::Rect(400, 100, 100, 100));
- delegate2_.set_max_size(gfx::Size(101, 0));
- delegate3_.set_max_size(gfx::Size(101, 0));
-
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- windows.push_back(window3_.get());
- windows.push_back(window4_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTRIGHT,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it 52 to the left, which should contract w1 and expand w2-4.
- resizer->Drag(CalculateDragPoint(*resizer, -52, 0), 0);
- EXPECT_EQ("100,100 48x100", window_->bounds().ToString());
- EXPECT_EQ("148,100 101x100", window2_->bounds().ToString());
- EXPECT_EQ("249,100 101x100", window3_->bounds().ToString());
- EXPECT_EQ("350,100 150x100", window4_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, DontExceedMaxHeight) {
- UpdateDisplay("600x800");
- aura::Window* root = Shell::GetPrimaryRootWindow();
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
-
- // Four 100x100 windows flush against eachother, starting at 100,100.
- window_->SetBounds(gfx::Rect( 100, 100, 100, 100));
- window2_->SetBounds(gfx::Rect(100, 200, 100, 100));
- window3_->SetBounds(gfx::Rect(100, 300, 100, 100));
- window4_->SetBounds(gfx::Rect(100, 400, 100, 100));
- delegate2_.set_max_size(gfx::Size(0, 101));
- delegate3_.set_max_size(gfx::Size(0, 101));
-
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- windows.push_back(window3_.get());
- windows.push_back(window4_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTBOTTOM,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it 52 up, which should contract w1 and expand w2-4.
- resizer->Drag(CalculateDragPoint(*resizer, 0, -52), 0);
- EXPECT_EQ("100,100 100x48", window_->bounds().ToString());
- EXPECT_EQ("100,148 100x101", window2_->bounds().ToString());
- EXPECT_EQ("100,249 100x101", window3_->bounds().ToString());
- EXPECT_EQ("100,350 100x150", window4_->bounds().ToString());
-}
-
-#if defined(OS_WIN)
-// RootWindow and Display can't resize on Windows Ash. http://crbug.com/165962
-#define MAYBE_DontExceedMinHeight DISABLED_DontExceedMinHeight
-#else
-#define MAYBE_DontExceedMinHeight DontExceedMinHeight
-#endif
-
-TEST_F(WorkspaceWindowResizerTest, MAYBE_DontExceedMinHeight) {
- UpdateDisplay("600x500");
- aura::Window* root = Shell::GetPrimaryRootWindow();
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
-
- // Four 100x100 windows flush against eachother, starting at 100,100.
- window_->SetBounds(gfx::Rect( 100, 100, 100, 100));
- window2_->SetBounds(gfx::Rect(100, 200, 100, 100));
- window3_->SetBounds(gfx::Rect(100, 300, 100, 100));
- window4_->SetBounds(gfx::Rect(100, 400, 100, 100));
- delegate2_.set_min_size(gfx::Size(0, 99));
- delegate3_.set_min_size(gfx::Size(0, 99));
-
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- windows.push_back(window3_.get());
- windows.push_back(window4_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTBOTTOM,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it 52 down, which should expand w1 and contract w2-4.
- resizer->Drag(CalculateDragPoint(*resizer, 0, 52), 0);
- EXPECT_EQ("100,100 100x152", window_->bounds().ToString());
- EXPECT_EQ("100,252 100x99", window2_->bounds().ToString());
- EXPECT_EQ("100,351 100x99", window3_->bounds().ToString());
- EXPECT_EQ("100,450 100x50", window4_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, DontExpandRightmostPastMaxWidth) {
- UpdateDisplay("600x800");
- aura::Window* root = Shell::GetPrimaryRootWindow();
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
-
- // Three 100x100 windows flush against eachother, starting at 100,100.
- window_->SetBounds(gfx::Rect( 100, 100, 100, 100));
- window2_->SetBounds(gfx::Rect(200, 100, 100, 100));
- window3_->SetBounds(gfx::Rect(300, 100, 100, 100));
- delegate3_.set_max_size(gfx::Size(101, 0));
-
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- windows.push_back(window3_.get());
- windows.push_back(window4_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTRIGHT,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it 51 to the left, which should contract w1 and expand w2-3.
- resizer->Drag(CalculateDragPoint(*resizer, -51, 0), 0);
- EXPECT_EQ("100,100 49x100", window_->bounds().ToString());
- EXPECT_EQ("149,100 150x100", window2_->bounds().ToString());
- EXPECT_EQ("299,100 101x100", window3_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, MoveAttachedWhenGrownToMaxSize) {
- UpdateDisplay("600x800");
- aura::Window* root = Shell::GetPrimaryRootWindow();
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
-
- // Three 100x100 windows flush against eachother, starting at 100,100.
- window_->SetBounds(gfx::Rect( 100, 100, 100, 100));
- window2_->SetBounds(gfx::Rect(200, 100, 100, 100));
- window3_->SetBounds(gfx::Rect(300, 100, 100, 100));
- delegate2_.set_max_size(gfx::Size(101, 0));
- delegate3_.set_max_size(gfx::Size(101, 0));
-
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- windows.push_back(window3_.get());
- windows.push_back(window4_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTRIGHT,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it 52 to the left, which should contract w1 and expand and move w2-3.
- resizer->Drag(CalculateDragPoint(*resizer, -52, 0), 0);
- EXPECT_EQ("100,100 48x100", window_->bounds().ToString());
- EXPECT_EQ("148,100 101x100", window2_->bounds().ToString());
- EXPECT_EQ("249,100 101x100", window3_->bounds().ToString());
-}
-
-#if defined(OS_WIN)
-// RootWindow and Display can't resize on Windows Ash. http://crbug.com/165962
-#define MAYBE_MainWindowHonoursMaxWidth DISABLED_MainWindowHonoursMaxWidth
-#else
-#define MAYBE_MainWindowHonoursMaxWidth MainWindowHonoursMaxWidth
-#endif
-
-TEST_F(WorkspaceWindowResizerTest, MAYBE_MainWindowHonoursMaxWidth) {
- UpdateDisplay("400x800");
- aura::Window* root = Shell::GetPrimaryRootWindow();
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
-
- // Three 100x100 windows flush against eachother, starting at 100,100.
- window_->SetBounds(gfx::Rect( 100, 100, 100, 100));
- window2_->SetBounds(gfx::Rect(200, 100, 100, 100));
- window3_->SetBounds(gfx::Rect(300, 100, 100, 100));
- delegate_.set_max_size(gfx::Size(102, 0));
-
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- windows.push_back(window3_.get());
- windows.push_back(window4_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTRIGHT,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it 50 to the right, which should expand w1 and contract w2-3, as they
- // won't fit in the root window in their original sizes.
- resizer->Drag(CalculateDragPoint(*resizer, 50, 0), 0);
- EXPECT_EQ("100,100 102x100", window_->bounds().ToString());
- EXPECT_EQ("202,100 99x100", window2_->bounds().ToString());
- EXPECT_EQ("301,100 99x100", window3_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, MainWindowHonoursMinWidth) {
- UpdateDisplay("400x800");
- aura::Window* root = Shell::GetPrimaryRootWindow();
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
-
- // Three 100x100 windows flush against eachother, starting at 100,100.
- window_->SetBounds(gfx::Rect( 100, 100, 100, 100));
- window2_->SetBounds(gfx::Rect(200, 100, 100, 100));
- window3_->SetBounds(gfx::Rect(300, 100, 100, 100));
- delegate_.set_min_size(gfx::Size(98, 0));
-
- std::vector<aura::Window*> windows;
- windows.push_back(window2_.get());
- windows.push_back(window3_.get());
- scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
- window_.get(), gfx::Point(), HTRIGHT,
- aura::client::WINDOW_MOVE_SOURCE_MOUSE, windows));
- ASSERT_TRUE(resizer.get());
- // Move it 50 to the left, which should contract w1 and expand w2-3.
- resizer->Drag(CalculateDragPoint(*resizer, -50, 0), 0);
- EXPECT_EQ("100,100 98x100", window_->bounds().ToString());
- EXPECT_EQ("198,100 101x100", window2_->bounds().ToString());
- EXPECT_EQ("299,100 101x100", window3_->bounds().ToString());
-}
-
-// The following variants test that windows are resized correctly to the edges
-// of the screen using touch, when touch point is off of the window border.
-TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_RIGHT) {
- shelf_layout_manager()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN);
-
- InitTouchResizeWindow(gfx::Rect(100, 100, 600, kRootHeight - 200), HTRIGHT);
- EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 200).ToString(),
- touch_resize_window_->bounds().ToString());
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- touch_resize_window_.get());
-
- // Drag out of the right border a bit and check if the border is aligned with
- // the touch point.
- generator.GestureScrollSequence(gfx::Point(715, kRootHeight / 2),
- gfx::Point(725, kRootHeight / 2),
- base::TimeDelta::FromMilliseconds(10),
- 5);
- EXPECT_EQ(gfx::Rect(100, 100, 625, kRootHeight - 200).ToString(),
- touch_resize_window_->bounds().ToString());
- // Drag more, but stop before being snapped to the edge.
- generator.GestureScrollSequence(gfx::Point(725, kRootHeight / 2),
- gfx::Point(760, kRootHeight / 2),
- base::TimeDelta::FromMilliseconds(10),
- 5);
- EXPECT_EQ(gfx::Rect(100, 100, 660, kRootHeight - 200).ToString(),
- touch_resize_window_->bounds().ToString());
- // Drag even more to snap to the edge.
- generator.GestureScrollSequence(gfx::Point(760, kRootHeight / 2),
- gfx::Point(775, kRootHeight / 2),
- base::TimeDelta::FromMilliseconds(10),
- 5);
- EXPECT_EQ(gfx::Rect(100, 100, 700, kRootHeight - 200).ToString(),
- touch_resize_window_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_LEFT) {
- shelf_layout_manager()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN);
-
- InitTouchResizeWindow(gfx::Rect(100, 100, 600, kRootHeight - 200), HTLEFT);
- EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 200).ToString(),
- touch_resize_window_->bounds().ToString());
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- touch_resize_window_.get());
-
- // Drag out of the left border a bit and check if the border is aligned with
- // the touch point.
- generator.GestureScrollSequence(gfx::Point(85, kRootHeight / 2),
- gfx::Point(75, kRootHeight / 2),
- base::TimeDelta::FromMilliseconds(10),
- 5);
- EXPECT_EQ(gfx::Rect(75, 100, 625, kRootHeight - 200).ToString(),
- touch_resize_window_->bounds().ToString());
- // Drag more, but stop before being snapped to the edge.
- generator.GestureScrollSequence(gfx::Point(75, kRootHeight / 2),
- gfx::Point(40, kRootHeight / 2),
- base::TimeDelta::FromMilliseconds(10),
- 5);
- EXPECT_EQ(gfx::Rect(40, 100, 660, kRootHeight - 200).ToString(),
- touch_resize_window_->bounds().ToString());
- // Drag even more to snap to the edge.
- generator.GestureScrollSequence(gfx::Point(40, kRootHeight / 2),
- gfx::Point(25, kRootHeight / 2),
- base::TimeDelta::FromMilliseconds(10),
- 5);
- EXPECT_EQ(gfx::Rect(0, 100, 700, kRootHeight - 200).ToString(),
- touch_resize_window_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_TOP) {
- shelf_layout_manager()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN);
-
- InitTouchResizeWindow(gfx::Rect(100, 100, 600, kRootHeight - 200), HTTOP);
- EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 200).ToString(),
- touch_resize_window_->bounds().ToString());
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- touch_resize_window_.get());
-
- // Drag out of the top border a bit and check if the border is aligned with
- // the touch point.
- generator.GestureScrollSequence(gfx::Point(400, 85),
- gfx::Point(400, 75),
- base::TimeDelta::FromMilliseconds(10),
- 5);
- EXPECT_EQ(gfx::Rect(100, 75, 600, kRootHeight - 175).ToString(),
- touch_resize_window_->bounds().ToString());
- // Drag more, but stop before being snapped to the edge.
- generator.GestureScrollSequence(gfx::Point(400, 75),
- gfx::Point(400, 40),
- base::TimeDelta::FromMilliseconds(10),
- 5);
- EXPECT_EQ(gfx::Rect(100, 40, 600, kRootHeight - 140).ToString(),
- touch_resize_window_->bounds().ToString());
- // Drag even more to snap to the edge.
- generator.GestureScrollSequence(gfx::Point(400, 40),
- gfx::Point(400, 25),
- base::TimeDelta::FromMilliseconds(10),
- 5);
- EXPECT_EQ(gfx::Rect(100, 0, 600, kRootHeight - 100).ToString(),
- touch_resize_window_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_BOTTOM) {
- shelf_layout_manager()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN);
-
- InitTouchResizeWindow(gfx::Rect(100, 100, 600, kRootHeight - 200), HTBOTTOM);
- EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 200).ToString(),
- touch_resize_window_->bounds().ToString());
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- touch_resize_window_.get());
-
- // Drag out of the bottom border a bit and check if the border is aligned with
- // the touch point.
- generator.GestureScrollSequence(gfx::Point(400, kRootHeight - 85),
- gfx::Point(400, kRootHeight - 75),
- base::TimeDelta::FromMilliseconds(10),
- 5);
- EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 175).ToString(),
- touch_resize_window_->bounds().ToString());
- // Drag more, but stop before being snapped to the edge.
- generator.GestureScrollSequence(gfx::Point(400, kRootHeight - 75),
- gfx::Point(400, kRootHeight - 40),
- base::TimeDelta::FromMilliseconds(10),
- 5);
- EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 140).ToString(),
- touch_resize_window_->bounds().ToString());
- // Drag even more to snap to the edge.
- generator.GestureScrollSequence(gfx::Point(400, kRootHeight - 40),
- gfx::Point(400, kRootHeight - 25),
- base::TimeDelta::FromMilliseconds(10),
- 5);
- EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 100).ToString(),
- touch_resize_window_->bounds().ToString());
-}
-
-TEST_F(WorkspaceWindowResizerTest, PhantomWindowShow) {
- if (!SupportsMultipleDisplays())
- return;
-
- UpdateDisplay("500x400,500x400");
- window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
- aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- EXPECT_EQ(root_windows[0], window_->GetRootWindow());
-
- scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
- ASSERT_TRUE(resizer.get());
- EXPECT_FALSE(snap_phantom_window_controller());
-
- // The pointer is on the edge but not shared. The snap phantom window
- // controller should be non-NULL.
- resizer->Drag(CalculateDragPoint(*resizer, -1, 0), 0);
- EXPECT_TRUE(snap_phantom_window_controller());
- PhantomWindowController* phantom_controller(snap_phantom_window_controller());
-
- // phantom widget only in the left screen.
- phantom_controller->Show(gfx::Rect(100, 100, 50, 60));
- EXPECT_TRUE(phantom_controller->phantom_widget_);
- EXPECT_FALSE(phantom_controller->phantom_widget_start_);
- EXPECT_EQ(
- root_windows[0],
- phantom_controller->phantom_widget_->GetNativeWindow()->GetRootWindow());
-
- // Move phantom widget into the right screen. Test that 2 widgets got created.
- phantom_controller->Show(gfx::Rect(600, 100, 50, 60));
- EXPECT_TRUE(phantom_controller->phantom_widget_);
- EXPECT_TRUE(phantom_controller->phantom_widget_start_);
- EXPECT_EQ(
- root_windows[1],
- phantom_controller->phantom_widget_->GetNativeWindow()->GetRootWindow());
- EXPECT_EQ(
- root_windows[0],
- phantom_controller->phantom_widget_start_->GetNativeWindow()->
- GetRootWindow());
- RunAnimationTillComplete(phantom_controller->animation_.get());
-
- // Move phantom widget only in the right screen. Start widget should close.
- phantom_controller->Show(gfx::Rect(700, 100, 50, 60));
- EXPECT_TRUE(phantom_controller->phantom_widget_);
- EXPECT_FALSE(phantom_controller->phantom_widget_start_);
- EXPECT_EQ(
- root_windows[1],
- phantom_controller->phantom_widget_->GetNativeWindow()->GetRootWindow());
- RunAnimationTillComplete(phantom_controller->animation_.get());
-
- // Move phantom widget into the left screen. Start widget should open.
- phantom_controller->Show(gfx::Rect(100, 100, 50, 60));
- EXPECT_TRUE(phantom_controller->phantom_widget_);
- EXPECT_TRUE(phantom_controller->phantom_widget_start_);
- EXPECT_EQ(
- root_windows[0],
- phantom_controller->phantom_widget_->GetNativeWindow()->GetRootWindow());
- EXPECT_EQ(
- root_windows[1],
- phantom_controller->phantom_widget_start_->GetNativeWindow()->
- GetRootWindow());
- RunAnimationTillComplete(phantom_controller->animation_.get());
-
- // Move phantom widget while in the left screen. Start widget should close.
- phantom_controller->Show(gfx::Rect(200, 100, 50, 60));
- EXPECT_TRUE(phantom_controller->phantom_widget_);
- EXPECT_FALSE(phantom_controller->phantom_widget_start_);
- EXPECT_EQ(
- root_windows[0],
- phantom_controller->phantom_widget_->GetNativeWindow()->GetRootWindow());
- RunAnimationTillComplete(phantom_controller->animation_.get());
-
- // Move phantom widget spanning both screens with most of the window in the
- // right screen. Two widgets are created.
- phantom_controller->Show(gfx::Rect(495, 100, 50, 60));
- EXPECT_TRUE(phantom_controller->phantom_widget_);
- EXPECT_TRUE(phantom_controller->phantom_widget_start_);
- EXPECT_EQ(
- root_windows[1],
- phantom_controller->phantom_widget_->GetNativeWindow()->GetRootWindow());
- EXPECT_EQ(
- root_windows[0],
- phantom_controller->phantom_widget_start_->GetNativeWindow()->
- GetRootWindow());
- RunAnimationTillComplete(phantom_controller->animation_.get());
-
- // Move phantom widget back into the left screen. Phantom widgets should swap.
- phantom_controller->Show(gfx::Rect(200, 100, 50, 60));
- EXPECT_TRUE(phantom_controller->phantom_widget_);
- EXPECT_TRUE(phantom_controller->phantom_widget_start_);
- EXPECT_EQ(
- root_windows[0],
- phantom_controller->phantom_widget_->GetNativeWindow()->GetRootWindow());
- EXPECT_EQ(
- root_windows[1],
- phantom_controller->phantom_widget_start_->GetNativeWindow()->
- GetRootWindow());
- RunAnimationTillComplete(phantom_controller->animation_.get());
-
- // Hide phantom controller. Both widgets should close.
- phantom_controller->Hide();
- EXPECT_FALSE(phantom_controller->phantom_widget_);
- EXPECT_FALSE(phantom_controller->phantom_widget_start_);
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/workspace_controller.cc b/chromium/ash/wm/workspace_controller.cc
deleted file mode 100644
index 1b9fd854a17..00000000000
--- a/chromium/ash/wm/workspace_controller.cc
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/workspace_controller.h"
-
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/base_layout_manager.h"
-#include "ash/wm/window_animations.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/workspace_event_handler.h"
-#include "ash/wm/workspace/workspace_layout_manager.h"
-#include "ui/aura/client/activation_client.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/views/corewm/visibility_controller.h"
-#include "ui/views/corewm/window_animations.h"
-
-namespace ash {
-namespace internal {
-namespace {
-
-// Amount of time to pause before animating anything. Only used during initial
-// animation (when logging in).
-const int kInitialPauseTimeMS = 750;
-
-// Returns true if there are visible docked windows in the same screen as the
-// |shelf|.
-bool IsDockedAreaVisible(const ShelfLayoutManager* shelf) {
- return shelf->dock_bounds().width() > 0;
-}
-
-} // namespace
-
-WorkspaceController::WorkspaceController(aura::Window* viewport)
- : viewport_(viewport),
- shelf_(NULL),
- event_handler_(new WorkspaceEventHandler(viewport_)) {
- SetWindowVisibilityAnimationTransition(
- viewport_, views::corewm::ANIMATE_NONE);
-
- // The layout-manager cannot be created in the initializer list since it
- // depends on the window to have been initialized.
- layout_manager_ = new WorkspaceLayoutManager(viewport_);
- viewport_->SetLayoutManager(layout_manager_);
-
- viewport_->Show();
-}
-
-WorkspaceController::~WorkspaceController() {
- viewport_->SetLayoutManager(NULL);
- viewport_->SetEventFilter(NULL);
- viewport_->RemovePreTargetHandler(event_handler_.get());
- viewport_->RemovePostTargetHandler(event_handler_.get());
-}
-
-WorkspaceWindowState WorkspaceController::GetWindowState() const {
- if (!shelf_)
- return WORKSPACE_WINDOW_STATE_DEFAULT;
- const aura::Window* topmost_fullscreen_window = GetRootWindowController(
- viewport_->GetRootWindow())->GetWindowForFullscreenMode();
- if (topmost_fullscreen_window &&
- !wm::GetWindowState(topmost_fullscreen_window)->ignored_by_shelf()) {
- return WORKSPACE_WINDOW_STATE_FULL_SCREEN;
- }
-
- // These are the container ids of containers which may contain windows that
- // may overlap the launcher shelf and affect its transparency.
- const int kWindowContainerIds[] = {
- internal::kShellWindowId_DefaultContainer,
- internal::kShellWindowId_DockedContainer,
- };
- const gfx::Rect shelf_bounds(shelf_->GetIdealBounds());
- bool window_overlaps_launcher = false;
- for (size_t idx = 0; idx < arraysize(kWindowContainerIds); idx++) {
- const aura::Window* container = Shell::GetContainer(
- viewport_->GetRootWindow(), kWindowContainerIds[idx]);
- const aura::Window::Windows& windows(container->children());
- for (aura::Window::Windows::const_iterator i = windows.begin();
- i != windows.end(); ++i) {
- wm::WindowState* window_state = wm::GetWindowState(*i);
- if (window_state->ignored_by_shelf())
- continue;
- ui::Layer* layer = (*i)->layer();
- if (!layer->GetTargetVisibility())
- continue;
- if (window_state->IsMaximized())
- return WORKSPACE_WINDOW_STATE_MAXIMIZED;
- if (!window_overlaps_launcher &&
- ((*i)->bounds().Intersects(shelf_bounds))) {
- window_overlaps_launcher = true;
- }
- }
- }
-
- return (window_overlaps_launcher || IsDockedAreaVisible(shelf_)) ?
- WORKSPACE_WINDOW_STATE_WINDOW_OVERLAPS_SHELF :
- WORKSPACE_WINDOW_STATE_DEFAULT;
-}
-
-void WorkspaceController::SetShelf(ShelfLayoutManager* shelf) {
- shelf_ = shelf;
- layout_manager_->SetShelf(shelf);
-}
-
-void WorkspaceController::DoInitialAnimation() {
- viewport_->Show();
-
- viewport_->layer()->SetOpacity(0.0f);
- SetTransformForScaleAnimation(
- viewport_->layer(), LAYER_SCALE_ANIMATION_ABOVE);
-
- // In order for pause to work we need to stop animations.
- viewport_->layer()->GetAnimator()->StopAnimating();
-
- {
- ui::ScopedLayerAnimationSettings settings(
- viewport_->layer()->GetAnimator());
-
- settings.SetPreemptionStrategy(ui::LayerAnimator::ENQUEUE_NEW_ANIMATION);
- viewport_->layer()->GetAnimator()->SchedulePauseForProperties(
- base::TimeDelta::FromMilliseconds(kInitialPauseTimeMS),
- ui::LayerAnimationElement::TRANSFORM,
- ui::LayerAnimationElement::OPACITY,
- ui::LayerAnimationElement::BRIGHTNESS,
- ui::LayerAnimationElement::VISIBILITY,
- -1);
-
- settings.SetTweenType(gfx::Tween::EASE_OUT);
- settings.SetTransitionDuration(
- base::TimeDelta::FromMilliseconds(kCrossFadeDurationMS));
- viewport_->layer()->SetTransform(gfx::Transform());
- viewport_->layer()->SetOpacity(1.0f);
- }
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/workspace_controller.h b/chromium/ash/wm/workspace_controller.h
deleted file mode 100644
index 84df41c91d3..00000000000
--- a/chromium/ash/wm/workspace_controller.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WORKSPACE_CONTROLLER_H_
-#define ASH_WM_WORKSPACE_CONTROLLER_H_
-
-#include "ash/ash_export.h"
-#include "ash/wm/workspace/workspace_types.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-
-namespace aura {
-class Window;
-}
-
-namespace ash {
-namespace internal {
-
-class ShelfLayoutManager;
-class WorkspaceControllerTestHelper;
-class WorkspaceEventHandler;
-class WorkspaceLayoutManager;
-
-// WorkspaceController acts as a central place that ties together all the
-// various workspace pieces.
-class ASH_EXPORT WorkspaceController {
- public:
- explicit WorkspaceController(aura::Window* viewport);
- virtual ~WorkspaceController();
-
- // Returns the current window state.
- WorkspaceWindowState GetWindowState() const;
-
- void SetShelf(ShelfLayoutManager* shelf);
-
- // Starts the animation that occurs on first login.
- void DoInitialAnimation();
-
- private:
- friend class WorkspaceControllerTestHelper;
-
- aura::Window* viewport_;
-
- internal::ShelfLayoutManager* shelf_;
- scoped_ptr<internal::WorkspaceEventHandler> event_handler_;
- internal::WorkspaceLayoutManager* layout_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(WorkspaceController);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_WORKSPACE_CONTROLLER_H_
diff --git a/chromium/ash/wm/workspace_controller_test_helper.cc b/chromium/ash/wm/workspace_controller_test_helper.cc
deleted file mode 100644
index 5ecfa2f5edf..00000000000
--- a/chromium/ash/wm/workspace_controller_test_helper.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/workspace_controller_test_helper.h"
-
-#include "ash/wm/workspace_controller.h"
-#include "ash/wm/workspace/workspace_event_handler_test_helper.h"
-#include "ui/aura/window.h"
-
-namespace ash {
-namespace internal {
-
-WorkspaceControllerTestHelper::WorkspaceControllerTestHelper(
- WorkspaceController* controller)
- : controller_(controller) {
-}
-
-WorkspaceControllerTestHelper::~WorkspaceControllerTestHelper() {
-}
-
-WorkspaceEventHandler* WorkspaceControllerTestHelper::GetEventHandler() {
- return controller_->event_handler_.get();
-}
-
-MultiWindowResizeController*
-WorkspaceControllerTestHelper::GetMultiWindowResizeController() {
- return WorkspaceEventHandlerTestHelper(GetEventHandler()).resize_controller();
-}
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/ash/wm/workspace_controller_test_helper.h b/chromium/ash/wm/workspace_controller_test_helper.h
deleted file mode 100644
index ecdccccca07..00000000000
--- a/chromium/ash/wm/workspace_controller_test_helper.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_WORKSPACE_CONTROLLER_TEST_HELPER_H_
-#define ASH_WM_WORKSPACE_CONTROLLER_TEST_HELPER_H_
-
-#include "ash/wm/workspace_controller.h"
-
-namespace ash {
-namespace internal {
-
-class MultiWindowResizeController;
-class WorkspaceEventHandler;
-
-class WorkspaceControllerTestHelper {
- public:
- explicit WorkspaceControllerTestHelper(WorkspaceController* controller);
- ~WorkspaceControllerTestHelper();
-
- WorkspaceEventHandler* GetEventHandler();
- MultiWindowResizeController* GetMultiWindowResizeController();
-
- private:
- WorkspaceController* controller_;
-
- DISALLOW_COPY_AND_ASSIGN(WorkspaceControllerTestHelper);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_WM_WORKSPACE_CONTROLLER_TEST_HELPER_H_
diff --git a/chromium/ash/wm/workspace_controller_unittest.cc b/chromium/ash/wm/workspace_controller_unittest.cc
deleted file mode 100644
index dbf114e0d0e..00000000000
--- a/chromium/ash/wm/workspace_controller_unittest.cc
+++ /dev/null
@@ -1,1316 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/workspace_controller.h"
-
-#include <map>
-
-#include "ash/ash_switches.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_ash.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/system/status_area_widget.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/shell_test_api.h"
-#include "ash/wm/window_state.h"
-#include "ash/wm/window_util.h"
-#include "base/command_line.h"
-#include "base/strings/string_number_conversions.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/root_window.h"
-#include "ui/aura/test/event_generator.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/scoped_animation_duration_scale_mode.h"
-#include "ui/gfx/screen.h"
-#include "ui/views/corewm/window_animations.h"
-#include "ui/views/widget/widget.h"
-
-using aura::Window;
-
-namespace ash {
-namespace internal {
-
-// Returns a string containing the names of all the children of |window| (in
-// order). Each entry is separated by a space.
-std::string GetWindowNames(const aura::Window* window) {
- std::string result;
- for (size_t i = 0; i < window->children().size(); ++i) {
- if (i != 0)
- result += " ";
- result += window->children()[i]->name();
- }
- return result;
-}
-
-// Returns a string containing the names of windows corresponding to each of the
-// child layers of |window|'s layer. Any layers that don't correspond to a child
-// Window of |window| are ignored. The result is ordered based on the layer
-// ordering.
-std::string GetLayerNames(const aura::Window* window) {
- typedef std::map<const ui::Layer*, std::string> LayerToWindowNameMap;
- LayerToWindowNameMap window_names;
- for (size_t i = 0; i < window->children().size(); ++i) {
- window_names[window->children()[i]->layer()] =
- window->children()[i]->name();
- }
-
- std::string result;
- const std::vector<ui::Layer*>& layers(window->layer()->children());
- for (size_t i = 0; i < layers.size(); ++i) {
- LayerToWindowNameMap::iterator layer_i =
- window_names.find(layers[i]);
- if (layer_i != window_names.end()) {
- if (!result.empty())
- result += " ";
- result += layer_i->second;
- }
- }
- return result;
-}
-
-class WorkspaceControllerTest : public test::AshTestBase {
- public:
- WorkspaceControllerTest() {}
- virtual ~WorkspaceControllerTest() {}
-
- aura::Window* CreateTestWindowUnparented() {
- aura::Window* window = new aura::Window(NULL);
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- window->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window->Init(ui::LAYER_TEXTURED);
- return window;
- }
-
- aura::Window* CreateTestWindow() {
- aura::Window* window = new aura::Window(NULL);
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- window->SetType(aura::client::WINDOW_TYPE_NORMAL);
- window->Init(ui::LAYER_TEXTURED);
- ParentWindowInPrimaryRootWindow(window);
- return window;
- }
-
- aura::Window* CreateBrowserLikeWindow(const gfx::Rect& bounds) {
- aura::Window* window = CreateTestWindow();
- window->SetBounds(bounds);
- wm::WindowState* window_state = wm::GetWindowState(window);
- window_state->set_window_position_managed(true);
- window->Show();
- return window;
- }
-
- aura::Window* CreatePopupLikeWindow(const gfx::Rect& bounds) {
- aura::Window* window = CreateTestWindowInShellWithBounds(bounds);
- window->Show();
- return window;
- }
-
- aura::Window* GetDesktop() {
- return Shell::GetContainer(Shell::GetPrimaryRootWindow(),
- kShellWindowId_DefaultContainer);
- }
-
- gfx::Rect GetFullscreenBounds(aura::Window* window) {
- return Shell::GetScreen()->GetDisplayNearestWindow(window).bounds();
- }
-
- ShelfWidget* shelf_widget() {
- return Shell::GetPrimaryRootWindowController()->shelf();
- }
-
- ShelfLayoutManager* shelf_layout_manager() {
- return Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager();
- }
-
- bool GetWindowOverlapsShelf() {
- return shelf_layout_manager()->window_overlaps_shelf();
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WorkspaceControllerTest);
-};
-
-// Assertions around adding a normal window.
-TEST_F(WorkspaceControllerTest, AddNormalWindowWhenEmpty) {
- scoped_ptr<Window> w1(CreateTestWindow());
- w1->SetBounds(gfx::Rect(0, 0, 250, 251));
-
- wm::WindowState* window_state = wm::GetWindowState(w1.get());
-
- EXPECT_FALSE(window_state->HasRestoreBounds());
-
- w1->Show();
-
- EXPECT_FALSE(window_state->HasRestoreBounds());
-
- ASSERT_TRUE(w1->layer() != NULL);
- EXPECT_TRUE(w1->layer()->visible());
-
- EXPECT_EQ("0,0 250x251", w1->bounds().ToString());
-
- EXPECT_EQ(w1.get(), GetDesktop()->children()[0]);
-}
-
-// Assertions around maximizing/unmaximizing.
-TEST_F(WorkspaceControllerTest, SingleMaximizeWindow) {
- scoped_ptr<Window> w1(CreateTestWindow());
- w1->SetBounds(gfx::Rect(0, 0, 250, 251));
-
- w1->Show();
- wm::ActivateWindow(w1.get());
-
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
-
- ASSERT_TRUE(w1->layer() != NULL);
- EXPECT_TRUE(w1->layer()->visible());
-
- EXPECT_EQ("0,0 250x251", w1->bounds().ToString());
-
- // Maximize the window.
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
-
- EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
-
- EXPECT_EQ(w1.get(), GetDesktop()->children()[0]);
- EXPECT_EQ(ScreenAsh::GetMaximizedWindowBoundsInParent(w1.get()).width(),
- w1->bounds().width());
- EXPECT_EQ(ScreenAsh::GetMaximizedWindowBoundsInParent(w1.get()).height(),
- w1->bounds().height());
-
- // Restore the window.
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
-
- EXPECT_EQ(w1.get(), GetDesktop()->children()[0]);
- EXPECT_EQ("0,0 250x251", w1->bounds().ToString());
-}
-
-// Assertions around two windows and toggling one to be fullscreen.
-TEST_F(WorkspaceControllerTest, FullscreenWithNormalWindow) {
- scoped_ptr<Window> w1(CreateTestWindow());
- scoped_ptr<Window> w2(CreateTestWindow());
- w1->SetBounds(gfx::Rect(0, 0, 250, 251));
- w1->Show();
-
- ASSERT_TRUE(w1->layer() != NULL);
- EXPECT_TRUE(w1->layer()->visible());
-
- w2->SetBounds(gfx::Rect(0, 0, 50, 51));
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- w2->Show();
- wm::ActivateWindow(w2.get());
-
- // Both windows should be in the same workspace.
- EXPECT_EQ(w1.get(), GetDesktop()->children()[0]);
- EXPECT_EQ(w2.get(), GetDesktop()->children()[1]);
-
- gfx::Rect work_area(
- ScreenAsh::GetMaximizedWindowBoundsInParent(w1.get()));
- EXPECT_EQ(work_area.width(), w2->bounds().width());
- EXPECT_EQ(work_area.height(), w2->bounds().height());
-
- // Restore w2, which should then go back to one workspace.
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- EXPECT_EQ(50, w2->bounds().width());
- EXPECT_EQ(51, w2->bounds().height());
- EXPECT_TRUE(wm::IsActiveWindow(w2.get()));
-}
-
-// Makes sure requests to change the bounds of a normal window go through.
-TEST_F(WorkspaceControllerTest, ChangeBoundsOfNormalWindow) {
- scoped_ptr<Window> w1(CreateTestWindow());
- w1->Show();
-
- // Setting the bounds should go through since the window is in the normal
- // workspace.
- w1->SetBounds(gfx::Rect(0, 0, 200, 500));
- EXPECT_EQ(200, w1->bounds().width());
- EXPECT_EQ(500, w1->bounds().height());
-}
-
-// Verifies the bounds is not altered when showing and grid is enabled.
-TEST_F(WorkspaceControllerTest, SnapToGrid) {
- scoped_ptr<Window> w1(CreateTestWindowUnparented());
- w1->SetBounds(gfx::Rect(1, 6, 25, 30));
- ParentWindowInPrimaryRootWindow(w1.get());
- // We are not aligning this anymore this way. When the window gets shown
- // the window is expected to be handled differently, but this cannot be
- // tested with this test. So the result of this test should be that the
- // bounds are exactly as passed in.
- EXPECT_EQ("1,6 25x30", w1->bounds().ToString());
-}
-
-// Assertions around a fullscreen window.
-TEST_F(WorkspaceControllerTest, SingleFullscreenWindow) {
- scoped_ptr<Window> w1(CreateTestWindow());
- w1->SetBounds(gfx::Rect(0, 0, 250, 251));
- // Make the window fullscreen.
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- w1->Show();
- wm::ActivateWindow(w1.get());
-
- EXPECT_EQ(w1.get(), GetDesktop()->children()[0]);
- EXPECT_EQ(GetFullscreenBounds(w1.get()).width(), w1->bounds().width());
- EXPECT_EQ(GetFullscreenBounds(w1.get()).height(), w1->bounds().height());
-
- // Restore the window. Use SHOW_STATE_DEFAULT as that is what we'll end up
- // with when using views::Widget.
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_DEFAULT);
- EXPECT_EQ("0,0 250x251", w1->bounds().ToString());
-
- EXPECT_EQ(w1.get(), GetDesktop()->children()[0]);
- EXPECT_EQ(250, w1->bounds().width());
- EXPECT_EQ(251, w1->bounds().height());
-
- // Back to fullscreen.
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- EXPECT_EQ(w1.get(), GetDesktop()->children()[0]);
- EXPECT_EQ(GetFullscreenBounds(w1.get()).width(), w1->bounds().width());
- EXPECT_EQ(GetFullscreenBounds(w1.get()).height(), w1->bounds().height());
- wm::WindowState* window_state = wm::GetWindowState(w1.get());
-
- ASSERT_TRUE(window_state->HasRestoreBounds());
- EXPECT_EQ("0,0 250x251", window_state->GetRestoreBoundsInScreen().ToString());
-}
-
-// Assertions around minimizing a single window.
-TEST_F(WorkspaceControllerTest, MinimizeSingleWindow) {
- scoped_ptr<Window> w1(CreateTestWindow());
-
- w1->Show();
-
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
- EXPECT_FALSE(w1->layer()->IsDrawn());
-
- // Show the window.
- w1->Show();
- EXPECT_TRUE(wm::GetWindowState(w1.get())->IsNormalShowState());
- EXPECT_TRUE(w1->layer()->IsDrawn());
-}
-
-// Assertions around minimizing a fullscreen window.
-TEST_F(WorkspaceControllerTest, MinimizeFullscreenWindow) {
- // Two windows, w1 normal, w2 fullscreen.
- scoped_ptr<Window> w1(CreateTestWindow());
- scoped_ptr<Window> w2(CreateTestWindow());
- w1->Show();
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- w2->Show();
-
- wm::WindowState* w1_state = wm::GetWindowState(w1.get());
- wm::WindowState* w2_state = wm::GetWindowState(w2.get());
-
- w2_state->Activate();
-
- // Minimize w2.
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
- EXPECT_TRUE(w1->layer()->IsDrawn());
- EXPECT_FALSE(w2->layer()->IsDrawn());
-
- // Show the window, which should trigger unminimizing.
- w2->Show();
- w2_state->Activate();
-
- EXPECT_TRUE(w2_state->IsFullscreen());
- EXPECT_TRUE(w1->layer()->IsDrawn());
- EXPECT_TRUE(w2->layer()->IsDrawn());
-
- // Minimize the window, which should hide the window.
- EXPECT_TRUE(w2_state->IsActive());
- w2_state->Minimize();
- EXPECT_FALSE(w2_state->IsActive());
- EXPECT_FALSE(w2->layer()->IsDrawn());
- EXPECT_TRUE(w1_state->IsActive());
-
- // Make the window normal.
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- EXPECT_EQ(w1.get(), GetDesktop()->children()[0]);
- EXPECT_EQ(w2.get(), GetDesktop()->children()[1]);
- EXPECT_TRUE(w2->layer()->IsDrawn());
-}
-
-// Verifies ShelfLayoutManager's visibility/auto-hide state is correctly
-// updated.
-TEST_F(WorkspaceControllerTest, ShelfStateUpdated) {
- // Since ShelfLayoutManager queries for mouse location, move the mouse so
- // it isn't over the shelf.
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
- generator.MoveMouseTo(0, 0);
-
- scoped_ptr<Window> w1(CreateTestWindow());
- const gfx::Rect w1_bounds(0, 1, 101, 102);
- ShelfLayoutManager* shelf = shelf_layout_manager();
- shelf->SetAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- const gfx::Rect touches_shelf_bounds(
- 0, shelf->GetIdealBounds().y() - 10, 101, 102);
- // Move |w1| to overlap the shelf.
- w1->SetBounds(touches_shelf_bounds);
- EXPECT_FALSE(GetWindowOverlapsShelf());
-
- // A visible ignored window should not trigger the overlap.
- scoped_ptr<Window> w_ignored(CreateTestWindow());
- w_ignored->SetBounds(touches_shelf_bounds);
- wm::GetWindowState(&(*w_ignored))->set_ignored_by_shelf(true);
- w_ignored->Show();
- EXPECT_FALSE(GetWindowOverlapsShelf());
-
- // Make it visible, since visible shelf overlaps should be true.
- w1->Show();
- EXPECT_TRUE(GetWindowOverlapsShelf());
-
- wm::ActivateWindow(w1.get());
- w1->SetBounds(w1_bounds);
- w1->Show();
- wm::ActivateWindow(w1.get());
-
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
-
- // Maximize the window.
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- // Restore.
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ("0,1 101x102", w1->bounds().ToString());
-
- // Fullscreen.
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- EXPECT_EQ(SHELF_HIDDEN, shelf->visibility_state());
-
- // Normal.
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ("0,1 101x102", w1->bounds().ToString());
- EXPECT_FALSE(GetWindowOverlapsShelf());
-
- // Move window so it obscures shelf.
- w1->SetBounds(touches_shelf_bounds);
- EXPECT_TRUE(GetWindowOverlapsShelf());
-
- // Move it back.
- w1->SetBounds(w1_bounds);
- EXPECT_FALSE(GetWindowOverlapsShelf());
-
- // Maximize again.
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- // Minimize.
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
-
- // Since the restore from minimize will restore to the pre-minimize
- // state (tested elsewhere), we abandon the current size and restore
- // rect and set them to the window.
- wm::WindowState* window_state = wm::GetWindowState(w1.get());
-
- gfx::Rect restore = window_state->GetRestoreBoundsInScreen();
- EXPECT_EQ("0,0 800x597", w1->bounds().ToString());
- EXPECT_EQ("0,1 101x102", restore.ToString());
- window_state->ClearRestoreBounds();
- w1->SetBounds(restore);
-
- // Restore.
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ("0,1 101x102", w1->bounds().ToString());
-
- // Create another window, maximized.
- scoped_ptr<Window> w2(CreateTestWindow());
- w2->SetBounds(gfx::Rect(10, 11, 250, 251));
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- w2->Show();
- wm::ActivateWindow(w2.get());
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- EXPECT_EQ("0,1 101x102", w1->bounds().ToString());
-
- // Switch to w1.
- wm::ActivateWindow(w1.get());
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ("0,1 101x102", w1->bounds().ToString());
- EXPECT_EQ(ScreenAsh::GetMaximizedWindowBoundsInParent(
- w2->parent()).ToString(),
- w2->bounds().ToString());
-
- // Switch to w2.
- wm::ActivateWindow(w2.get());
- EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- EXPECT_EQ("0,1 101x102", w1->bounds().ToString());
- EXPECT_EQ(ScreenAsh::GetMaximizedWindowBoundsInParent(w2.get()).ToString(),
- w2->bounds().ToString());
-
- // Turn off auto-hide, switch back to w2 (maximized) and verify overlap.
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
- wm::ActivateWindow(w2.get());
- EXPECT_FALSE(GetWindowOverlapsShelf());
-
- // Move w1 to overlap shelf, it shouldn't change window overlaps shelf since
- // the window isn't in the visible workspace.
- w1->SetBounds(touches_shelf_bounds);
- EXPECT_FALSE(GetWindowOverlapsShelf());
-
- // Activate w1. Although w1 is visible, the overlap state is still false since
- // w2 is maximized.
- wm::ActivateWindow(w1.get());
- EXPECT_FALSE(GetWindowOverlapsShelf());
-
- // Restore w2.
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- EXPECT_TRUE(GetWindowOverlapsShelf());
-}
-
-// Verifies going from maximized to minimized sets the right state for painting
-// the background of the launcher.
-TEST_F(WorkspaceControllerTest, MinimizeResetsVisibility) {
- scoped_ptr<Window> w1(CreateTestWindow());
- w1->Show();
- wm::ActivateWindow(w1.get());
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- EXPECT_EQ(SHELF_BACKGROUND_MAXIMIZED, shelf_widget()->GetBackgroundType());
-
- w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
- EXPECT_EQ(SHELF_VISIBLE,
- shelf_layout_manager()->visibility_state());
- EXPECT_EQ(SHELF_BACKGROUND_DEFAULT, shelf_widget()->GetBackgroundType());
-}
-
-// Verifies window visibility during various workspace changes.
-TEST_F(WorkspaceControllerTest, VisibilityTests) {
- scoped_ptr<Window> w1(CreateTestWindow());
- w1->Show();
- EXPECT_TRUE(w1->IsVisible());
- EXPECT_EQ(1.0f, w1->layer()->GetCombinedOpacity());
-
- // Create another window, activate it and make it fullscreen.
- scoped_ptr<Window> w2(CreateTestWindow());
- w2->Show();
- wm::ActivateWindow(w2.get());
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- EXPECT_TRUE(w2->IsVisible());
- EXPECT_EQ(1.0f, w2->layer()->GetCombinedOpacity());
- EXPECT_TRUE(w1->IsVisible());
-
- // Switch to w1. |w1| should be visible on top of |w2|.
- wm::ActivateWindow(w1.get());
- EXPECT_TRUE(w1->IsVisible());
- EXPECT_EQ(1.0f, w1->layer()->GetCombinedOpacity());
- EXPECT_TRUE(w2->IsVisible());
-
- // Switch back to |w2|.
- wm::ActivateWindow(w2.get());
- EXPECT_TRUE(w2->IsVisible());
- EXPECT_EQ(1.0f, w2->layer()->GetCombinedOpacity());
- EXPECT_TRUE(w1->IsVisible());
-
- // Restore |w2|, both windows should be visible.
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- EXPECT_TRUE(w1->IsVisible());
- EXPECT_EQ(1.0f, w1->layer()->GetCombinedOpacity());
- EXPECT_TRUE(w2->IsVisible());
- EXPECT_EQ(1.0f, w2->layer()->GetCombinedOpacity());
-
- // Make |w2| fullscreen again, then close it.
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- w2->Hide();
- EXPECT_FALSE(w2->IsVisible());
- EXPECT_EQ(1.0f, w1->layer()->GetCombinedOpacity());
- EXPECT_TRUE(w1->IsVisible());
-
- // Create |w2| and maximize it.
- w2.reset(CreateTestWindow());
- w2->Show();
- wm::ActivateWindow(w2.get());
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- EXPECT_TRUE(w2->IsVisible());
- EXPECT_EQ(1.0f, w2->layer()->GetCombinedOpacity());
- EXPECT_TRUE(w1->IsVisible());
-
- // Close |w2|.
- w2.reset();
- EXPECT_EQ(1.0f, w1->layer()->GetCombinedOpacity());
- EXPECT_TRUE(w1->IsVisible());
-}
-
-// Verifies windows that are offscreen don't move when switching workspaces.
-TEST_F(WorkspaceControllerTest, DontMoveOnSwitch) {
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
- generator.MoveMouseTo(0, 0);
-
- scoped_ptr<Window> w1(CreateTestWindow());
- ShelfLayoutManager* shelf = shelf_layout_manager();
- const gfx::Rect touches_shelf_bounds(
- 0, shelf->GetIdealBounds().y() - 10, 101, 102);
- // Move |w1| to overlap the shelf.
- w1->SetBounds(touches_shelf_bounds);
- w1->Show();
- wm::ActivateWindow(w1.get());
-
- // Create another window and maximize it.
- scoped_ptr<Window> w2(CreateTestWindow());
- w2->SetBounds(gfx::Rect(10, 11, 250, 251));
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- w2->Show();
- wm::ActivateWindow(w2.get());
-
- // Switch to w1.
- wm::ActivateWindow(w1.get());
- EXPECT_EQ(touches_shelf_bounds.ToString(), w1->bounds().ToString());
-}
-
-// Verifies that windows that are completely offscreen move when switching
-// workspaces.
-TEST_F(WorkspaceControllerTest, MoveOnSwitch) {
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
- generator.MoveMouseTo(0, 0);
-
- scoped_ptr<Window> w1(CreateTestWindow());
- ShelfLayoutManager* shelf = shelf_layout_manager();
- const gfx::Rect w1_bounds(0, shelf->GetIdealBounds().y(), 100, 200);
- // Move |w1| so that the top edge is the same as the top edge of the shelf.
- w1->SetBounds(w1_bounds);
- w1->Show();
- wm::ActivateWindow(w1.get());
- EXPECT_EQ(w1_bounds.ToString(), w1->bounds().ToString());
-
- // Create another window and maximize it.
- scoped_ptr<Window> w2(CreateTestWindow());
- w2->SetBounds(gfx::Rect(10, 11, 250, 251));
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- w2->Show();
- wm::ActivateWindow(w2.get());
-
- // Increase the size of the WorkAreaInsets. This would make |w1| fall
- // completely out of the display work area.
- gfx::Insets insets =
- Shell::GetScreen()->GetPrimaryDisplay().GetWorkAreaInsets();
- insets.Set(0, 0, insets.bottom() + 30, 0);
- Shell::GetInstance()->SetDisplayWorkAreaInsets(w1.get(), insets);
-
- // Switch to w1. The window should have moved.
- wm::ActivateWindow(w1.get());
- EXPECT_NE(w1_bounds.ToString(), w1->bounds().ToString());
-}
-
-namespace {
-
-// WindowDelegate used by DontCrashOnChangeAndActivate.
-class DontCrashOnChangeAndActivateDelegate
- : public aura::test::TestWindowDelegate {
- public:
- DontCrashOnChangeAndActivateDelegate() : window_(NULL) {}
-
- void set_window(aura::Window* window) { window_ = window; }
-
- // WindowDelegate overrides:
- virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) OVERRIDE {
- if (window_) {
- wm::ActivateWindow(window_);
- window_ = NULL;
- }
- }
-
- private:
- aura::Window* window_;
-
- DISALLOW_COPY_AND_ASSIGN(DontCrashOnChangeAndActivateDelegate);
-};
-
-} // namespace
-
-// Exercises possible crash in W2. Here's the sequence:
-// . minimize a maximized window.
-// . remove the window (which happens when switching displays).
-// . add the window back.
-// . show the window and during the bounds change activate it.
-TEST_F(WorkspaceControllerTest, DontCrashOnChangeAndActivate) {
- // Force the shelf
- ShelfLayoutManager* shelf = shelf_layout_manager();
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
-
- DontCrashOnChangeAndActivateDelegate delegate;
- scoped_ptr<Window> w1(CreateTestWindowInShellWithDelegate(
- &delegate, 1000, gfx::Rect(10, 11, 250, 251)));
-
- w1->Show();
- wm::WindowState* w1_state = wm::GetWindowState(w1.get());
- w1_state->Activate();
- w1_state->Maximize();
- w1_state->Minimize();
-
- w1->parent()->RemoveChild(w1.get());
-
- // Do this so that when we Show() the window a resize occurs and we make the
- // window active.
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
-
- ParentWindowInPrimaryRootWindow(w1.get());
- delegate.set_window(w1.get());
- w1->Show();
-}
-
-// Verifies a window with a transient parent not managed by workspace works.
-TEST_F(WorkspaceControllerTest, TransientParent) {
- // Normal window with no transient parent.
- scoped_ptr<Window> w2(CreateTestWindow());
- w2->SetBounds(gfx::Rect(10, 11, 250, 251));
- w2->Show();
- wm::ActivateWindow(w2.get());
-
- // Window with a transient parent. We set the transient parent to the root,
- // which would never happen but is enough to exercise the bug.
- scoped_ptr<Window> w1(CreateTestWindowUnparented());
- Shell::GetInstance()->GetPrimaryRootWindow()->AddTransientChild(w1.get());
- w1->SetBounds(gfx::Rect(10, 11, 250, 251));
- ParentWindowInPrimaryRootWindow(w1.get());
- w1->Show();
- wm::ActivateWindow(w1.get());
-
- // The window with the transient parent should get added to the same parent as
- // the normal window.
- EXPECT_EQ(w2->parent(), w1->parent());
-}
-
-// Test the placement of newly created windows.
-TEST_F(WorkspaceControllerTest, BasicAutoPlacingOnCreate) {
- if (!SupportsHostWindowResize())
- return;
- UpdateDisplay("1600x1200");
- // Creating a popup handler here to make sure it does not interfere with the
- // existing windows.
- gfx::Rect source_browser_bounds(16, 32, 640, 320);
- scoped_ptr<aura::Window> browser_window(CreateBrowserLikeWindow(
- source_browser_bounds));
-
- // Creating a popup to make sure it does not interfere with the positioning.
- scoped_ptr<aura::Window> browser_popup(CreatePopupLikeWindow(
- gfx::Rect(16, 32, 128, 256)));
-
- browser_window->Show();
- browser_popup->Show();
-
- { // With a shown window it's size should get returned.
- scoped_ptr<aura::Window> new_browser_window(CreateBrowserLikeWindow(
- source_browser_bounds));
- // The position should be right flush.
- EXPECT_EQ("960,32 640x320", new_browser_window->bounds().ToString());
- }
-
- { // With the window shown - but more on the right side then on the left
- // side (and partially out of the screen), it should default to the other
- // side and inside the screen.
- gfx::Rect source_browser_bounds(gfx::Rect(1000, 600, 640, 320));
- browser_window->SetBounds(source_browser_bounds);
-
- scoped_ptr<aura::Window> new_browser_window(CreateBrowserLikeWindow(
- source_browser_bounds));
- // The position should be left & bottom flush.
- EXPECT_EQ("0,600 640x320", new_browser_window->bounds().ToString());
-
- // If the other window was already beyond the point to get right flush
- // it will remain where it is.
- EXPECT_EQ("1000,600 640x320", browser_window->bounds().ToString());
- }
-
- { // Make sure that popups do not get changed.
- scoped_ptr<aura::Window> new_popup_window(CreatePopupLikeWindow(
- gfx::Rect(50, 100, 300, 150)));
- EXPECT_EQ("50,100 300x150", new_popup_window->bounds().ToString());
- }
-
- browser_window->Hide();
- { // If a window is there but not shown the default should be centered.
- scoped_ptr<aura::Window> new_browser_window(CreateBrowserLikeWindow(
- gfx::Rect(50, 100, 300, 150)));
- EXPECT_EQ("650,100 300x150", new_browser_window->bounds().ToString());
- }
-}
-
-// Test the basic auto placement of one and or two windows in a "simulated
-// session" of sequential window operations.
-TEST_F(WorkspaceControllerTest, BasicAutoPlacingOnShowHide) {
- // Test 1: In case there is no manageable window, no window should shift.
-
- scoped_ptr<aura::Window> window1(CreateTestWindowInShellWithId(0));
- window1->SetBounds(gfx::Rect(16, 32, 640, 320));
- gfx::Rect desktop_area = window1->parent()->bounds();
-
- scoped_ptr<aura::Window> window2(CreateTestWindowInShellWithId(1));
- // Trigger the auto window placement function by making it visible.
- // Note that the bounds are getting changed while it is invisible.
- window2->Hide();
- window2->SetBounds(gfx::Rect(32, 48, 256, 512));
- window2->Show();
-
- // Check the initial position of the windows is unchanged.
- EXPECT_EQ("16,32 640x320", window1->bounds().ToString());
- EXPECT_EQ("32,48 256x512", window2->bounds().ToString());
-
- // Remove the second window and make sure that the first window
- // does NOT get centered.
- window2.reset();
- EXPECT_EQ("16,32 640x320", window1->bounds().ToString());
-
- wm::WindowState* window1_state = wm::GetWindowState(window1.get());
- // Test 2: Set up two managed windows and check their auto positioning.
- window1_state->set_window_position_managed(true);
-
- scoped_ptr<aura::Window> window3(CreateTestWindowInShellWithId(2));
- wm::GetWindowState(window3.get())->set_window_position_managed(true);
- // To avoid any auto window manager changes due to SetBounds, the window
- // gets first hidden and then shown again.
- window3->Hide();
- window3->SetBounds(gfx::Rect(32, 48, 256, 512));
- window3->Show();
- // |window1| should be flush left and |window3| flush right.
- EXPECT_EQ("0,32 640x320", window1->bounds().ToString());
- EXPECT_EQ(base::IntToString(
- desktop_area.width() - window3->bounds().width()) +
- ",48 256x512", window3->bounds().ToString());
-
- // After removing |window3|, |window1| should be centered again.
- window3.reset();
- EXPECT_EQ(
- base::IntToString(
- (desktop_area.width() - window1->bounds().width()) / 2) +
- ",32 640x320", window1->bounds().ToString());
-
- // Test 3: Set up a manageable and a non manageable window and check
- // positioning.
- scoped_ptr<aura::Window> window4(CreateTestWindowInShellWithId(3));
- // To avoid any auto window manager changes due to SetBounds, the window
- // gets first hidden and then shown again.
- window1->Hide();
- window1->SetBounds(gfx::Rect(16, 32, 640, 320));
- window4->SetBounds(gfx::Rect(32, 48, 256, 512));
- window1->Show();
- // |window1| should be centered and |window4| untouched.
- EXPECT_EQ(
- base::IntToString(
- (desktop_area.width() - window1->bounds().width()) / 2) +
- ",32 640x320", window1->bounds().ToString());
- EXPECT_EQ("32,48 256x512", window4->bounds().ToString());
-
- // Test4: A single manageable window should get centered.
- window4.reset();
- window1_state->set_bounds_changed_by_user(false);
- // Trigger the auto window placement function by showing (and hiding) it.
- window1->Hide();
- window1->Show();
- // |window1| should be centered.
- EXPECT_EQ(
- base::IntToString(
- (desktop_area.width() - window1->bounds().width()) / 2) +
- ",32 640x320", window1->bounds().ToString());
-}
-
-// Test the proper usage of user window movement interaction.
-TEST_F(WorkspaceControllerTest, TestUserMovedWindowRepositioning) {
- scoped_ptr<aura::Window> window1(CreateTestWindowInShellWithId(0));
- window1->SetBounds(gfx::Rect(16, 32, 640, 320));
- gfx::Rect desktop_area = window1->parent()->bounds();
- scoped_ptr<aura::Window> window2(CreateTestWindowInShellWithId(1));
- window2->SetBounds(gfx::Rect(32, 48, 256, 512));
- window1->Hide();
- window2->Hide();
- wm::WindowState* window1_state = wm::GetWindowState(window1.get());
- wm::WindowState* window2_state = wm::GetWindowState(window2.get());
-
- window1_state->set_window_position_managed(true);
- window2_state->set_window_position_managed(true);
- EXPECT_FALSE(window1_state->bounds_changed_by_user());
- EXPECT_FALSE(window2_state->bounds_changed_by_user());
-
- // Check that the current location gets preserved if the user has
- // positioned it previously.
- window1_state->set_bounds_changed_by_user(true);
- window1->Show();
- EXPECT_EQ("16,32 640x320", window1->bounds().ToString());
- // Flag should be still set.
- EXPECT_TRUE(window1_state->bounds_changed_by_user());
- EXPECT_FALSE(window2_state->bounds_changed_by_user());
-
- // Turn on the second window and make sure that both windows are now
- // positionable again (user movement cleared).
- window2->Show();
-
- // |window1| should be flush left and |window2| flush right.
- EXPECT_EQ("0,32 640x320", window1->bounds().ToString());
- EXPECT_EQ(
- base::IntToString(desktop_area.width() - window2->bounds().width()) +
- ",48 256x512", window2->bounds().ToString());
- // FLag should now be reset.
- EXPECT_FALSE(window1_state->bounds_changed_by_user());
- EXPECT_FALSE(window2_state->bounds_changed_by_user());
-
- // Going back to one shown window should keep the state.
- window1_state->set_bounds_changed_by_user(true);
- window2->Hide();
- EXPECT_EQ("0,32 640x320", window1->bounds().ToString());
- EXPECT_TRUE(window1_state->bounds_changed_by_user());
-}
-
-// Test if the single window will be restored at original position.
-TEST_F(WorkspaceControllerTest, TestSingleWindowsRestoredBounds) {
- scoped_ptr<aura::Window> window1(
- CreateTestWindowInShellWithBounds(gfx::Rect(100, 100, 100, 100)));
- scoped_ptr<aura::Window> window2(
- CreateTestWindowInShellWithBounds(gfx::Rect(110, 110, 100, 100)));
- scoped_ptr<aura::Window> window3(
- CreateTestWindowInShellWithBounds(gfx::Rect(120, 120, 100, 100)));
- window1->Hide();
- window2->Hide();
- window3->Hide();
- wm::GetWindowState(window1.get())->set_window_position_managed(true);
- wm::GetWindowState(window2.get())->set_window_position_managed(true);
- wm::GetWindowState(window3.get())->set_window_position_managed(true);
-
- window1->Show();
- wm::ActivateWindow(window1.get());
- window2->Show();
- wm::ActivateWindow(window2.get());
- window3->Show();
- wm::ActivateWindow(window3.get());
- EXPECT_EQ(0, window1->bounds().x());
- EXPECT_EQ(window2->GetRootWindow()->bounds().right(),
- window2->bounds().right());
- EXPECT_EQ(0, window3->bounds().x());
-
- window1->Hide();
- EXPECT_EQ(window2->GetRootWindow()->bounds().right(),
- window2->bounds().right());
- EXPECT_EQ(0, window3->bounds().x());
-
- // Being a single window will retore the original location.
- window3->Hide();
- wm::ActivateWindow(window2.get());
- EXPECT_EQ("110,110 100x100", window2->bounds().ToString());
-
- // Showing the 3rd will push the 2nd window left.
- window3->Show();
- wm::ActivateWindow(window3.get());
- EXPECT_EQ(0, window2->bounds().x());
- EXPECT_EQ(window3->GetRootWindow()->bounds().right(),
- window3->bounds().right());
-
- // Being a single window will retore the original location.
- window2->Hide();
- EXPECT_EQ("120,120 100x100", window3->bounds().ToString());
-}
-
-// Test that user placed windows go back to their user placement after the user
-// closes all other windows.
-TEST_F(WorkspaceControllerTest, TestUserHandledWindowRestore) {
- scoped_ptr<aura::Window> window1(CreateTestWindowInShellWithId(0));
- gfx::Rect user_pos = gfx::Rect(16, 42, 640, 320);
- window1->SetBounds(user_pos);
- wm::WindowState* window1_state = wm::GetWindowState(window1.get());
-
- window1_state->SetPreAutoManageWindowBounds(user_pos);
- gfx::Rect desktop_area = window1->parent()->bounds();
-
- // Create a second window to let the auto manager kick in.
- scoped_ptr<aura::Window> window2(CreateTestWindowInShellWithId(1));
- window2->SetBounds(gfx::Rect(32, 48, 256, 512));
- window1->Hide();
- window2->Hide();
- wm::GetWindowState(window1.get())->set_window_position_managed(true);
- wm::GetWindowState(window2.get())->set_window_position_managed(true);
- window1->Show();
- EXPECT_EQ(user_pos.ToString(), window1->bounds().ToString());
- window2->Show();
-
- // |window1| should be flush left and |window2| flush right.
- EXPECT_EQ("0," + base::IntToString(user_pos.y()) +
- " 640x320", window1->bounds().ToString());
- EXPECT_EQ(
- base::IntToString(desktop_area.width() - window2->bounds().width()) +
- ",48 256x512", window2->bounds().ToString());
- window2->Hide();
-
- // After the other window get hidden the window has to move back to the
- // previous position and the bounds should still be set and unchanged.
- EXPECT_EQ(user_pos.ToString(), window1->bounds().ToString());
- ASSERT_TRUE(window1_state->pre_auto_manage_window_bounds());
- EXPECT_EQ(user_pos.ToString(),
- window1_state->pre_auto_manage_window_bounds()->ToString());
-}
-
-// Test that a window from normal to minimize will repos the remaining.
-TEST_F(WorkspaceControllerTest, ToMinimizeRepositionsRemaining) {
- scoped_ptr<aura::Window> window1(CreateTestWindowInShellWithId(0));
- wm::WindowState* window1_state = wm::GetWindowState(window1.get());
- window1_state->set_window_position_managed(true);
- window1->SetBounds(gfx::Rect(16, 32, 640, 320));
- gfx::Rect desktop_area = window1->parent()->bounds();
-
- scoped_ptr<aura::Window> window2(CreateTestWindowInShellWithId(1));
- wm::WindowState* window2_state = wm::GetWindowState(window2.get());
- window2_state->set_window_position_managed(true);
- window2->SetBounds(gfx::Rect(32, 48, 256, 512));
-
- window1_state->Minimize();
-
- // |window2| should be centered now.
- EXPECT_TRUE(window2->IsVisible());
- EXPECT_TRUE(window2_state->IsNormalShowState());
- EXPECT_EQ(base::IntToString(
- (desktop_area.width() - window2->bounds().width()) / 2) +
- ",48 256x512", window2->bounds().ToString());
-
- window1_state->Restore();
- // |window1| should be flush right and |window3| flush left.
- EXPECT_EQ(base::IntToString(
- desktop_area.width() - window1->bounds().width()) +
- ",32 640x320", window1->bounds().ToString());
- EXPECT_EQ("0,48 256x512", window2->bounds().ToString());
-}
-
-// Test that minimizing an initially maximized window will repos the remaining.
-TEST_F(WorkspaceControllerTest, MaxToMinRepositionsRemaining) {
- scoped_ptr<aura::Window> window1(CreateTestWindowInShellWithId(0));
- wm::WindowState* window1_state = wm::GetWindowState(window1.get());
- window1_state->set_window_position_managed(true);
- gfx::Rect desktop_area = window1->parent()->bounds();
-
- scoped_ptr<aura::Window> window2(CreateTestWindowInShellWithId(1));
- wm::WindowState* window2_state = wm::GetWindowState(window2.get());
- window2_state->set_window_position_managed(true);
- window2->SetBounds(gfx::Rect(32, 48, 256, 512));
-
- window1_state->Maximize();
- window1_state->Minimize();
-
- // |window2| should be centered now.
- EXPECT_TRUE(window2->IsVisible());
- EXPECT_TRUE(window2_state->IsNormalShowState());
- EXPECT_EQ(base::IntToString(
- (desktop_area.width() - window2->bounds().width()) / 2) +
- ",48 256x512", window2->bounds().ToString());
-}
-
-// Test that nomral, maximize, minimizing will repos the remaining.
-TEST_F(WorkspaceControllerTest, NormToMaxToMinRepositionsRemaining) {
- scoped_ptr<aura::Window> window1(CreateTestWindowInShellWithId(0));
- window1->SetBounds(gfx::Rect(16, 32, 640, 320));
- wm::WindowState* window1_state = wm::GetWindowState(window1.get());
- window1_state->set_window_position_managed(true);
- gfx::Rect desktop_area = window1->parent()->bounds();
-
- scoped_ptr<aura::Window> window2(CreateTestWindowInShellWithId(1));
- wm::WindowState* window2_state = wm::GetWindowState(window2.get());
- window2_state->set_window_position_managed(true);
- window2->SetBounds(gfx::Rect(32, 40, 256, 512));
-
- // Trigger the auto window placement function by showing (and hiding) it.
- window1->Hide();
- window1->Show();
-
- // |window1| should be flush right and |window3| flush left.
- EXPECT_EQ(base::IntToString(
- desktop_area.width() - window1->bounds().width()) +
- ",32 640x320", window1->bounds().ToString());
- EXPECT_EQ("0,40 256x512", window2->bounds().ToString());
-
- window1_state->Maximize();
- window1_state->Minimize();
-
- // |window2| should be centered now.
- EXPECT_TRUE(window2->IsVisible());
- EXPECT_TRUE(window2_state->IsNormalShowState());
- EXPECT_EQ(base::IntToString(
- (desktop_area.width() - window2->bounds().width()) / 2) +
- ",40 256x512", window2->bounds().ToString());
-}
-
-// Test that nomral, maximize, normal will repos the remaining.
-TEST_F(WorkspaceControllerTest, NormToMaxToNormRepositionsRemaining) {
- scoped_ptr<aura::Window> window1(CreateTestWindowInShellWithId(0));
- window1->SetBounds(gfx::Rect(16, 32, 640, 320));
- wm::WindowState* window1_state = wm::GetWindowState(window1.get());
- window1_state->set_window_position_managed(true);
- gfx::Rect desktop_area = window1->parent()->bounds();
-
- scoped_ptr<aura::Window> window2(CreateTestWindowInShellWithId(1));
- wm::GetWindowState(window2.get())->set_window_position_managed(true);
- window2->SetBounds(gfx::Rect(32, 40, 256, 512));
-
- // Trigger the auto window placement function by showing (and hiding) it.
- window1->Hide();
- window1->Show();
-
- // |window1| should be flush right and |window3| flush left.
- EXPECT_EQ(base::IntToString(
- desktop_area.width() - window1->bounds().width()) +
- ",32 640x320", window1->bounds().ToString());
- EXPECT_EQ("0,40 256x512", window2->bounds().ToString());
-
- window1_state->Maximize();
- window1_state->Restore();
-
- // |window1| should be flush right and |window2| flush left.
- EXPECT_EQ(base::IntToString(
- desktop_area.width() - window1->bounds().width()) +
- ",32 640x320", window1->bounds().ToString());
- EXPECT_EQ("0,40 256x512", window2->bounds().ToString());
-}
-
-// Test that animations are triggered.
-TEST_F(WorkspaceControllerTest, AnimatedNormToMaxToNormRepositionsRemaining) {
- ui::ScopedAnimationDurationScaleMode normal_duration_mode(
- ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
- scoped_ptr<aura::Window> window1(CreateTestWindowInShellWithId(0));
- window1->Hide();
- window1->SetBounds(gfx::Rect(16, 32, 640, 320));
- gfx::Rect desktop_area = window1->parent()->bounds();
- scoped_ptr<aura::Window> window2(CreateTestWindowInShellWithId(1));
- window2->Hide();
- window2->SetBounds(gfx::Rect(32, 48, 256, 512));
-
- wm::GetWindowState(window1.get())->set_window_position_managed(true);
- wm::GetWindowState(window2.get())->set_window_position_managed(true);
- // Make sure nothing is animating.
- window1->layer()->GetAnimator()->StopAnimating();
- window2->layer()->GetAnimator()->StopAnimating();
- window2->Show();
-
- // The second window should now animate.
- EXPECT_FALSE(window1->layer()->GetAnimator()->is_animating());
- EXPECT_TRUE(window2->layer()->GetAnimator()->is_animating());
- window2->layer()->GetAnimator()->StopAnimating();
-
- window1->Show();
- EXPECT_TRUE(window1->layer()->GetAnimator()->is_animating());
- EXPECT_TRUE(window2->layer()->GetAnimator()->is_animating());
-
- window1->layer()->GetAnimator()->StopAnimating();
- window2->layer()->GetAnimator()->StopAnimating();
- // |window1| should be flush right and |window2| flush left.
- EXPECT_EQ(base::IntToString(
- desktop_area.width() - window1->bounds().width()) +
- ",32 640x320", window1->bounds().ToString());
- EXPECT_EQ("0,48 256x512", window2->bounds().ToString());
-}
-
-// This tests simulates a browser and an app and verifies the ordering of the
-// windows and layers doesn't get out of sync as various operations occur. Its
-// really testing code in FocusController, but easier to simulate here. Just as
-// with a real browser the browser here has a transient child window
-// (corresponds to the status bubble).
-TEST_F(WorkspaceControllerTest, VerifyLayerOrdering) {
- scoped_ptr<Window> browser(
- aura::test::CreateTestWindowWithDelegate(
- NULL,
- aura::client::WINDOW_TYPE_NORMAL,
- gfx::Rect(5, 6, 7, 8),
- NULL));
- browser->SetName("browser");
- ParentWindowInPrimaryRootWindow(browser.get());
- browser->Show();
- wm::ActivateWindow(browser.get());
-
- // |status_bubble| is made a transient child of |browser| and as a result
- // owned by |browser|.
- aura::test::TestWindowDelegate* status_bubble_delegate =
- aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate();
- status_bubble_delegate->set_can_focus(false);
- Window* status_bubble =
- aura::test::CreateTestWindowWithDelegate(
- status_bubble_delegate,
- aura::client::WINDOW_TYPE_POPUP,
- gfx::Rect(5, 6, 7, 8),
- NULL);
- browser->AddTransientChild(status_bubble);
- ParentWindowInPrimaryRootWindow(status_bubble);
- status_bubble->SetName("status_bubble");
-
- scoped_ptr<Window> app(
- aura::test::CreateTestWindowWithDelegate(
- NULL,
- aura::client::WINDOW_TYPE_NORMAL,
- gfx::Rect(5, 6, 7, 8),
- NULL));
- app->SetName("app");
- ParentWindowInPrimaryRootWindow(app.get());
-
- aura::Window* parent = browser->parent();
-
- app->Show();
- wm::ActivateWindow(app.get());
- EXPECT_EQ(GetWindowNames(parent), GetLayerNames(parent));
-
- // Minimize the app, focus should go the browser.
- app->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
- EXPECT_TRUE(wm::IsActiveWindow(browser.get()));
- EXPECT_EQ(GetWindowNames(parent), GetLayerNames(parent));
-
- // Minimize the browser (neither windows are focused).
- browser->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
- EXPECT_FALSE(wm::IsActiveWindow(browser.get()));
- EXPECT_FALSE(wm::IsActiveWindow(app.get()));
- EXPECT_EQ(GetWindowNames(parent), GetLayerNames(parent));
-
- // Show the browser (which should restore it).
- browser->Show();
- EXPECT_EQ(GetWindowNames(parent), GetLayerNames(parent));
-
- // Activate the browser.
- ash::wm::ActivateWindow(browser.get());
- EXPECT_TRUE(wm::IsActiveWindow(browser.get()));
- EXPECT_EQ(GetWindowNames(parent), GetLayerNames(parent));
-
- // Restore the app. This differs from above code for |browser| as internally
- // the app code does this. Restoring this way or using Show() should not make
- // a difference.
- app->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
- EXPECT_EQ(GetWindowNames(parent), GetLayerNames(parent));
-
- // Activate the app.
- ash::wm::ActivateWindow(app.get());
- EXPECT_TRUE(wm::IsActiveWindow(app.get()));
- EXPECT_EQ(GetWindowNames(parent), GetLayerNames(parent));
-}
-
-namespace {
-
-// Used by DragMaximizedNonTrackedWindow to track how many times the window
-// hierarchy changes affecting the specified window.
-class DragMaximizedNonTrackedWindowObserver
- : public aura::WindowObserver {
- public:
- DragMaximizedNonTrackedWindowObserver(aura::Window* window)
- : change_count_(0),
- window_(window) {
- }
-
- // Number of times OnWindowHierarchyChanged() has been received.
- void clear_change_count() { change_count_ = 0; }
- int change_count() const {
- return change_count_;
- }
-
- // aura::WindowObserver overrides:
- // Counts number of times a window is reparented. Ignores reparenting into and
- // from a docked container which is expected when a tab is dragged.
- virtual void OnWindowHierarchyChanged(
- const HierarchyChangeParams& params) OVERRIDE {
- if (params.target != window_ ||
- (params.old_parent->id() == kShellWindowId_DefaultContainer &&
- params.new_parent->id() == kShellWindowId_DockedContainer) ||
- (params.old_parent->id() == kShellWindowId_DockedContainer &&
- params.new_parent->id() == kShellWindowId_DefaultContainer)) {
- return;
- }
- change_count_++;
- }
-
- private:
- int change_count_;
- aura::Window* window_;
-
- DISALLOW_COPY_AND_ASSIGN(DragMaximizedNonTrackedWindowObserver);
-};
-
-} // namespace
-
-// Verifies that a new maximized window becomes visible after its activation
-// is requested, even though it does not become activated because a system
-// modal window is active.
-TEST_F(WorkspaceControllerTest, SwitchFromModal) {
- scoped_ptr<Window> modal_window(CreateTestWindowUnparented());
- modal_window->SetBounds(gfx::Rect(10, 11, 21, 22));
- modal_window->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_SYSTEM);
- ParentWindowInPrimaryRootWindow(modal_window.get());
- modal_window->Show();
- wm::ActivateWindow(modal_window.get());
-
- scoped_ptr<Window> maximized_window(CreateTestWindow());
- maximized_window->SetProperty(
- aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- maximized_window->Show();
- wm::ActivateWindow(maximized_window.get());
- EXPECT_TRUE(maximized_window->IsVisible());
-}
-
-namespace {
-
-// Subclass of WorkspaceControllerTest that runs tests with docked windows
-// enabled and disabled.
-class WorkspaceControllerTestDragging
- : public WorkspaceControllerTest,
- public testing::WithParamInterface<bool> {
- public:
- WorkspaceControllerTestDragging() {}
- virtual ~WorkspaceControllerTestDragging() {}
-
- // testing::Test:
- virtual void SetUp() OVERRIDE {
- WorkspaceControllerTest::SetUp();
- if (docked_windows_enabled()) {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshEnableDockedWindows);
- }
- }
-
- bool docked_windows_enabled() const { return GetParam(); }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WorkspaceControllerTestDragging);
-};
-
-} // namespace
-
-// Verifies that when dragging a window over the shelf overlap is detected
-// during and after the drag.
-TEST_P(WorkspaceControllerTestDragging, DragWindowOverlapShelf) {
- aura::test::TestWindowDelegate delegate;
- delegate.set_window_component(HTCAPTION);
- scoped_ptr<Window> w1(
- aura::test::CreateTestWindowWithDelegate(&delegate,
- aura::client::WINDOW_TYPE_NORMAL,
- gfx::Rect(5, 5, 100, 50),
- NULL));
- ParentWindowInPrimaryRootWindow(w1.get());
-
- ShelfLayoutManager* shelf = shelf_layout_manager();
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
-
- // Drag near the shelf
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
- generator.MoveMouseTo(10, 10);
- generator.PressLeftButton();
- generator.MoveMouseTo(100, shelf->GetIdealBounds().y() - 70);
-
- // Shelf should not be in overlapped state.
- EXPECT_FALSE(GetWindowOverlapsShelf());
-
- generator.MoveMouseTo(100, shelf->GetIdealBounds().y() - 20);
-
- // Shelf should detect overlap. Overlap state stays after mouse is released.
- EXPECT_TRUE(GetWindowOverlapsShelf());
- generator.ReleaseLeftButton();
- EXPECT_TRUE(GetWindowOverlapsShelf());
-}
-
-INSTANTIATE_TEST_CASE_P(DockedOrNot, WorkspaceControllerTestDragging,
- ::testing::Bool());
-
-} // namespace internal
-} // namespace ash
diff --git a/chromium/athena/athena.gyp b/chromium/athena/athena.gyp
new file mode 100644
index 00000000000..65ed34e8d1d
--- /dev/null
+++ b/chromium/athena/athena.gyp
@@ -0,0 +1,150 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ 'chromium_code': 1,
+ },
+ 'targets': [
+ {
+ 'target_name': 'athena_lib',
+ 'type': '<(component)',
+ 'dependencies': [
+ '../ui/aura/aura.gyp:aura',
+ '../ui/app_list/app_list.gyp:app_list',
+ '../ui/views/views.gyp:views',
+ '../ui/accessibility/accessibility.gyp:ax_gen',
+ '../skia/skia.gyp:skia',
+ ],
+ 'defines': [
+ 'ATHENA_IMPLEMENTATION',
+ ],
+ 'sources': [
+ # All .cc, .h under athena, except unittests
+ 'activity/activity.cc',
+ 'activity/activity_factory.cc',
+ 'activity/activity_manager_impl.cc',
+ 'activity/activity_view_manager_impl.cc',
+ 'activity/public/activity.h',
+ 'activity/public/activity_factory.h',
+ 'activity/public/activity_manager.h',
+ 'activity/public/activity_view_manager.h',
+ 'activity/public/activity_view_model.h',
+ # move athena_export.h to common/
+ 'athena_export.h',
+ 'common/fill_layout_manager.cc',
+ 'common/fill_layout_manager.h',
+ 'common/switches.cc',
+ 'common/switches.h',
+ 'home/app_list_view_delegate.cc',
+ 'home/app_list_view_delegate.h',
+ 'home/home_card_impl.cc',
+ 'home/public/app_model_builder.h',
+ 'home/public/home_card.h',
+ 'input/accelerator_manager_impl.cc',
+ 'input/accelerator_manager_impl.h',
+ 'input/input_manager_impl.cc',
+ 'input/public/input_manager.h',
+ 'input/public/accelerator_manager.h',
+ 'screen/background_controller.cc',
+ 'screen/background_controller.h',
+ 'screen/public/screen_manager.h',
+ 'screen/screen_accelerator_handler.cc',
+ 'screen/screen_accelerator_handler.h',
+ 'screen/screen_manager_impl.cc',
+ 'wm/public/window_manager.h',
+ 'wm/window_manager_impl.cc',
+ 'wm/window_overview_mode.cc',
+ 'wm/window_overview_mode.h',
+ ],
+ },
+ {
+ 'target_name': 'athena_content_lib',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'athena_lib',
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ '../content/content.gyp:content_browser',
+ '../ui/app_list/app_list.gyp:app_list',
+ '../ui/keyboard/keyboard.gyp:keyboard',
+ '../ui/keyboard/keyboard.gyp:keyboard_resources',
+ '../third_party/WebKit/public/blink.gyp:blink',
+ '../ui/views/controls/webview/webview.gyp:webview',
+ '../skia/skia.gyp:skia',
+ ],
+ 'defines': [
+ 'ATHENA_IMPLEMENTATION',
+ ],
+ 'sources': [
+ 'content/public/content_activity_factory.h',
+ 'content/public/content_app_model_builder.h',
+ 'content/content_activity_factory.cc',
+ 'content/content_app_model_builder.cc',
+ 'content/app_activity.h',
+ 'content/app_activity.cc',
+ 'content/web_activity.h',
+ 'content/web_activity.cc',
+ 'virtual_keyboard/public/virtual_keyboard_bindings.h',
+ 'virtual_keyboard/public/virtual_keyboard_manager.h',
+ 'virtual_keyboard/virtual_keyboard_bindings_impl.cc',
+ 'virtual_keyboard/virtual_keyboard_manager_impl.cc',
+ 'virtual_keyboard/vk_message_handler.cc',
+ 'virtual_keyboard/vk_message_handler.h',
+ 'virtual_keyboard/vk_webui_controller.cc',
+ 'virtual_keyboard/vk_webui_controller.h',
+ ],
+ },
+ {
+ 'target_name': 'athena_test_support',
+ 'type': 'static_library',
+ 'dependencies': [
+ '../base/base.gyp:test_support_base',
+ '../skia/skia.gyp:skia',
+ '../testing/gtest.gyp:gtest',
+ '../ui/accessibility/accessibility.gyp:ax_gen',
+ '../ui/app_list/app_list.gyp:app_list',
+ '../ui/aura/aura.gyp:aura_test_support',
+ '../ui/base/ui_base.gyp:ui_base_test_support',
+ '../ui/compositor/compositor.gyp:compositor_test_support',
+ '../ui/views/views.gyp:views',
+ '../ui/wm/wm.gyp:wm',
+ '../url/url.gyp:url_lib',
+ 'athena_lib',
+ ],
+ 'sources': [
+ 'main/athena_launcher.cc',
+ 'main/athena_launcher.h',
+ 'main/placeholder.cc',
+ 'main/placeholder.h',
+ 'test/athena_test_base.cc',
+ 'test/athena_test_base.h',
+ 'test/athena_test_helper.cc',
+ 'test/athena_test_helper.h',
+ 'test/sample_activity.cc',
+ 'test/sample_activity.h',
+ 'test/sample_activity_factory.cc',
+ 'test/sample_activity_factory.h',
+ 'test/test_app_model_builder.cc',
+ 'test/test_app_model_builder.h',
+ ],
+ },
+ {
+ 'target_name': 'athena_unittests',
+ 'type': 'executable',
+ 'dependencies': [
+ '../testing/gtest.gyp:gtest',
+ '../skia/skia.gyp:skia',
+ 'athena_lib',
+ 'athena_test_support',
+ ],
+ 'sources': [
+ 'test/athena_unittests.cc',
+ 'activity/activity_manager_unittest.cc',
+ 'input/accelerator_manager_unittest.cc',
+ 'wm/window_manager_unittest.cc',
+ ],
+ }
+ ],
+}
+
diff --git a/chromium/athena/main/athena_main.gyp b/chromium/athena/main/athena_main.gyp
new file mode 100644
index 00000000000..0b0e718a5d5
--- /dev/null
+++ b/chromium/athena/main/athena_main.gyp
@@ -0,0 +1,59 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ 'chromium_code': 1,
+ },
+ 'targets': [
+ {
+ 'target_name': 'athena_main',
+ 'type': 'executable',
+ 'dependencies': [
+ '../athena.gyp:athena_lib',
+ '../athena.gyp:athena_content_lib',
+ '../../apps/shell/app_shell.gyp:app_shell_lib',
+ '../../skia/skia.gyp:skia',
+ '../../ui/accessibility/accessibility.gyp:ax_gen',
+ '../../ui/app_list/app_list.gyp:app_list',
+ '../../ui/keyboard/keyboard.gyp:keyboard',
+ '../../ui/views/views.gyp:views',
+ '../../url/url.gyp:url_lib',
+ ],
+ 'include_dirs': [
+ '../..',
+ ],
+ 'sources': [
+ 'athena_app_window_controller.cc',
+ 'athena_app_window_controller.h',
+ 'athena_launcher.cc',
+ 'athena_launcher.h',
+ 'url_search_provider.cc',
+ 'url_search_provider.h',
+ 'athena_main.cc',
+ 'placeholder.cc',
+ 'placeholder.h',
+ ],
+ },
+ {
+ 'target_name': 'athena_shell',
+ 'type': 'executable',
+ 'dependencies': [
+ '../../base/base.gyp:base',
+ '../../base/base.gyp:base_i18n',
+ '../../skia/skia.gyp:skia',
+ '../../ui/accessibility/accessibility.gyp:ax_gen',
+ '../../ui/aura/aura.gyp:aura',
+ '../../ui/compositor/compositor.gyp:compositor_test_support',
+ '../../ui/gfx/gfx.gyp:gfx',
+ '../../ui/resources/ui_resources.gyp:ui_test_pak',
+ '../athena.gyp:athena_lib',
+ '../athena.gyp:athena_test_support',
+ ],
+ 'sources': [
+ 'athena_shell.cc',
+ ],
+ }
+ ], # targets
+}
diff --git a/chromium/base/BUILD.gn b/chromium/base/BUILD.gn
new file mode 100644
index 00000000000..53084d5e8f6
--- /dev/null
+++ b/chromium/base/BUILD.gn
@@ -0,0 +1,1373 @@
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/android/rules.gni")
+import("//build/config/ui.gni")
+
+component("base") {
+ sources = [
+ "third_party/dmg_fp/dmg_fp.h",
+ "third_party/dmg_fp/g_fmt.cc",
+ "third_party/dmg_fp/dtoa_wrapper.cc",
+ "third_party/icu/icu_utf.cc",
+ "third_party/icu/icu_utf.h",
+ "third_party/superfasthash/superfasthash.c",
+ "allocator/allocator_extension.cc",
+ "allocator/allocator_extension.h",
+ "allocator/type_profiler_control.cc",
+ "allocator/type_profiler_control.h",
+ "android/application_status_listener.cc",
+ "android/application_status_listener.h",
+ "android/base_jni_registrar.cc",
+ "android/base_jni_registrar.h",
+ "android/build_info.cc",
+ "android/build_info.h",
+ "android/command_line_android.cc",
+ "android/command_line_android.h",
+ "android/content_uri_utils.cc",
+ "android/content_uri_utils.h",
+ "android/cpu_features.cc",
+ "android/event_log.cc",
+ "android/event_log.h",
+ "android/fifo_utils.cc",
+ "android/fifo_utils.h",
+ "android/important_file_writer_android.cc",
+ "android/important_file_writer_android.h",
+ "android/scoped_java_ref.cc",
+ "android/scoped_java_ref.h",
+ "android/jni_android.cc",
+ "android/jni_android.h",
+ "android/jni_array.cc",
+ "android/jni_array.h",
+ "android/jni_registrar.cc",
+ "android/jni_registrar.h",
+ "android/jni_string.cc",
+ "android/jni_string.h",
+ "android/jni_weak_ref.cc",
+ "android/jni_weak_ref.h",
+ "android/library_loader/library_loader_hooks.cc",
+ "android/library_loader/library_loader_hooks.h",
+ "android/memory_pressure_listener_android.cc",
+ "android/memory_pressure_listener_android.h",
+ "android/java_handler_thread.cc",
+ "android/java_handler_thread.h",
+ "android/path_service_android.cc",
+ "android/path_service_android.h",
+ "android/path_utils.cc",
+ "android/path_utils.h",
+ "android/sys_utils.cc",
+ "android/sys_utils.h",
+ "android/thread_utils.h",
+ "android/trace_event_binding.cc",
+ "android/trace_event_binding.h",
+ "async_socket_io_handler.h",
+ "async_socket_io_handler_posix.cc",
+ "async_socket_io_handler_win.cc",
+ "at_exit.cc",
+ "at_exit.h",
+ "atomic_ref_count.h",
+ "atomic_sequence_num.h",
+ "atomicops.h",
+ "atomicops_internals_gcc.h",
+ "atomicops_internals_mac.h",
+ "atomicops_internals_tsan.h",
+ "atomicops_internals_x86_gcc.cc",
+ "atomicops_internals_x86_gcc.h",
+ "atomicops_internals_x86_msvc.h",
+ "barrier_closure.cc",
+ "barrier_closure.h",
+ "base_export.h",
+ "base_paths.cc",
+ "base_paths.h",
+ "base_paths_android.cc",
+ "base_paths_android.h",
+ "base_paths_mac.h",
+ "base_paths_mac.mm",
+ "base_paths_posix.cc",
+ "base_paths_posix.h",
+ "base_paths_win.cc",
+ "base_paths_win.h",
+ "base_switches.h",
+ "base64.cc",
+ "base64.h",
+ "basictypes.h",
+ "big_endian.cc",
+ "big_endian.h",
+ "bind.h",
+ "bind_helpers.cc",
+ "bind_helpers.h",
+ "bind_internal.h",
+ "bind_internal_win.h",
+ "bits.h",
+ "build_time.cc",
+ "build_time.h",
+ "callback.h",
+ "callback_helpers.cc",
+ "callback_helpers.h",
+ "callback_internal.cc",
+ "callback_internal.h",
+ "cancelable_callback.h",
+ "command_line.cc",
+ "command_line.h",
+ "compiler_specific.h",
+ "containers/hash_tables.h",
+ "containers/linked_list.h",
+ "containers/mru_cache.h",
+ "containers/small_map.h",
+ "containers/stack_container.h",
+ "cpu.cc",
+ "cpu.h",
+ "critical_closure.h",
+ "critical_closure_internal_ios.mm",
+ "debug/alias.cc",
+ "debug/alias.h",
+ "debug/crash_logging.cc",
+ "debug/crash_logging.h",
+ "debug/debugger.cc",
+ "debug/debugger.h",
+ "debug/debugger_posix.cc",
+ "debug/debugger_win.cc",
+ # This file depends on files from the "allocator" target,
+ # but this target does not depend on "allocator" (see
+ # allocator.gyp for details).
+ "debug/leak_annotations.h",
+ "debug/leak_tracker.h",
+ "debug/proc_maps_linux.cc",
+ "debug/proc_maps_linux.h",
+ "debug/profiler.cc",
+ "debug/profiler.h",
+ "debug/stack_trace.cc",
+ "debug/stack_trace.h",
+ "debug/stack_trace_android.cc",
+ "debug/stack_trace_posix.cc",
+ "debug/stack_trace_win.cc",
+ "debug/trace_event.h",
+ "debug/trace_event_android.cc",
+ "debug/trace_event_impl.cc",
+ "debug/trace_event_impl.h",
+ "debug/trace_event_impl_constants.cc",
+ "debug/trace_event_memory.cc",
+ "debug/trace_event_memory.h",
+ "debug/trace_event_synthetic_delay.cc",
+ "debug/trace_event_synthetic_delay.h",
+ "debug/trace_event_system_stats_monitor.cc",
+ "debug/trace_event_system_stats_monitor.h",
+ "debug/trace_event_win.cc",
+ "deferred_sequenced_task_runner.cc",
+ "deferred_sequenced_task_runner.h",
+ "environment.cc",
+ "environment.h",
+ "file_descriptor_posix.h",
+ "file_util.cc",
+ "file_util.h",
+ "file_util_android.cc",
+ "file_util_linux.cc",
+ "file_util_mac.mm",
+ "file_util_posix.cc",
+ "file_util_win.cc",
+ "file_version_info.h",
+ "file_version_info_mac.h",
+ "file_version_info_mac.mm",
+ "file_version_info_win.cc",
+ "file_version_info_win.h",
+ "files/dir_reader_fallback.h",
+ "files/dir_reader_linux.h",
+ "files/dir_reader_posix.h",
+ "files/file.cc",
+ "files/file_posix.cc",
+ "files/file_win.cc",
+ "files/file_enumerator.cc",
+ "files/file_enumerator.h",
+ "files/file_enumerator_posix.cc",
+ "files/file_enumerator_win.cc",
+ "files/file_path.cc",
+ "files/file_path.h",
+ "files/file_path_constants.cc",
+ "files/file_path_watcher.cc",
+ "files/file_path_watcher.h",
+ "files/file_path_watcher_fsevents.cc",
+ "files/file_path_watcher_fsevents.h",
+ "files/file_path_watcher_kqueue.cc",
+ "files/file_path_watcher_kqueue.h",
+ "files/file_path_watcher_linux.cc",
+ "files/file_path_watcher_mac.cc",
+ "files/file_path_watcher_win.cc",
+ "files/file_proxy.cc",
+ "files/file_proxy.h",
+ "files/file_util_proxy.cc",
+ "files/file_util_proxy.h",
+ "files/important_file_writer.cc",
+ "files/important_file_writer.h",
+ "files/memory_mapped_file.cc",
+ "files/memory_mapped_file.h",
+ "files/memory_mapped_file_posix.cc",
+ "files/memory_mapped_file_win.cc",
+ "files/scoped_file.cc",
+ "files/scoped_file.h",
+ "files/scoped_temp_dir.cc",
+ "files/scoped_temp_dir.h",
+ "float_util.h",
+ "format_macros.h",
+ "gtest_prod_util.h",
+ "guid.cc",
+ "guid.h",
+ "guid_posix.cc",
+ "guid_win.cc",
+ "hash.cc",
+ "hash.h",
+ "id_map.h",
+ "ini_parser.cc",
+ "ini_parser.h",
+ "ios/device_util.h",
+ "ios/device_util.mm",
+ "ios/ios_util.h",
+ "ios/ios_util.mm",
+ "ios/scoped_critical_action.h",
+ "ios/scoped_critical_action.mm",
+ "json/json_file_value_serializer.cc",
+ "json/json_file_value_serializer.h",
+ "json/json_parser.cc",
+ "json/json_parser.h",
+ "json/json_reader.cc",
+ "json/json_reader.h",
+ "json/json_string_value_serializer.cc",
+ "json/json_string_value_serializer.h",
+ "json/json_value_converter.h",
+ "json/json_writer.cc",
+ "json/json_writer.h",
+ "json/string_escape.cc",
+ "json/string_escape.h",
+ "lazy_instance.cc",
+ "lazy_instance.h",
+ "location.cc",
+ "location.h",
+ "logging.cc",
+ "logging.h",
+ "logging_win.cc",
+ "logging_win.h",
+ "mac/authorization_util.h",
+ "mac/authorization_util.mm",
+ "mac/bind_objc_block.h",
+ "mac/bundle_locations.h",
+ "mac/bundle_locations.mm",
+ "mac/cocoa_protocols.h",
+ "mac/foundation_util.h",
+ "mac/foundation_util.mm",
+ "mac/launch_services_util.cc",
+ "mac/launch_services_util.h",
+ "mac/launchd.cc",
+ "mac/launchd.h",
+ "mac/libdispatch_task_runner.cc",
+ "mac/libdispatch_task_runner.h",
+ "mac/mac_logging.h",
+ "mac/mac_logging.cc",
+ "mac/mac_util.h",
+ "mac/mac_util.mm",
+ "mac/mach_logging.cc",
+ "mac/mach_logging.h",
+ "mac/objc_property_releaser.h",
+ "mac/objc_property_releaser.mm",
+ "mac/os_crash_dumps.cc",
+ "mac/os_crash_dumps.h",
+ "mac/scoped_aedesc.h",
+ "mac/scoped_authorizationref.h",
+ "mac/scoped_block.h",
+ "mac/scoped_cftyperef.h",
+ "mac/scoped_ioobject.h",
+ "mac/scoped_ioplugininterface.h",
+ "mac/scoped_launch_data.h",
+ "mac/scoped_mach_port.cc",
+ "mac/scoped_mach_port.h",
+ "mac/scoped_mach_vm.cc",
+ "mac/scoped_mach_vm.h",
+ "mac/scoped_nsautorelease_pool.h",
+ "mac/scoped_nsautorelease_pool.mm",
+ "mac/scoped_nsexception_enabler.h",
+ "mac/scoped_nsexception_enabler.mm",
+ "mac/scoped_nsobject.h",
+ "mac/scoped_sending_event.h",
+ "mac/scoped_sending_event.mm",
+ "mac/sdk_forward_declarations.h",
+ "macros.h",
+ "md5.cc",
+ "md5.h",
+ "memory/aligned_memory.cc",
+ "memory/aligned_memory.h",
+ "memory/discardable_memory.cc",
+ "memory/discardable_memory.h",
+ "memory/discardable_memory_android.cc",
+ "memory/discardable_memory_emulated.cc",
+ "memory/discardable_memory_emulated.h",
+ "memory/discardable_memory_linux.cc",
+ "memory/discardable_memory_mac.cc",
+ "memory/discardable_memory_malloc.cc",
+ "memory/discardable_memory_malloc.h",
+ "memory/discardable_memory_manager.cc",
+ "memory/discardable_memory_manager.h",
+ "memory/discardable_memory_win.cc",
+ "memory/linked_ptr.h",
+ "memory/manual_constructor.h",
+ "memory/memory_pressure_listener.cc",
+ "memory/memory_pressure_listener.h",
+ "memory/raw_scoped_refptr_mismatch_checker.h",
+ "memory/ref_counted.cc",
+ "memory/ref_counted.h",
+ "memory/ref_counted_delete_on_message_loop.h",
+ "memory/ref_counted_memory.cc",
+ "memory/ref_counted_memory.h",
+ "memory/scoped_handle.h",
+ "memory/scoped_open_process.h",
+ "memory/scoped_policy.h",
+ "memory/scoped_ptr.h",
+ "memory/scoped_vector.h",
+ "memory/shared_memory.h",
+ "memory/shared_memory_android.cc",
+ "memory/shared_memory_nacl.cc",
+ "memory/shared_memory_posix.cc",
+ "memory/shared_memory_win.cc",
+ "memory/singleton.cc",
+ "memory/singleton.h",
+ "memory/weak_ptr.cc",
+ "memory/weak_ptr.h",
+ "message_loop/incoming_task_queue.cc",
+ "message_loop/incoming_task_queue.h",
+ "message_loop/message_loop.cc",
+ "message_loop/message_loop.h",
+ "message_loop/message_loop_proxy.cc",
+ "message_loop/message_loop_proxy.h",
+ "message_loop/message_loop_proxy_impl.cc",
+ "message_loop/message_loop_proxy_impl.h",
+ "message_loop/message_pump.cc",
+ "message_loop/message_pump.h",
+ "message_loop/message_pump_android.cc",
+ "message_loop/message_pump_android.h",
+ "message_loop/message_pump_default.cc",
+ "message_loop/message_pump_default.h",
+ "message_loop/message_pump_glib.cc",
+ "message_loop/message_pump_glib.h",
+ "message_loop/message_pump_io_ios.cc",
+ "message_loop/message_pump_io_ios.h",
+ "message_loop/message_pump_libevent.cc",
+ "message_loop/message_pump_libevent.h",
+ "message_loop/message_pump_mac.h",
+ "message_loop/message_pump_mac.mm",
+ "message_loop/message_pump_observer.h",
+ "message_loop/message_pump_win.cc",
+ "message_loop/message_pump_win.h",
+ "metrics/field_trial.cc",
+ "metrics/field_trial.h",
+ "metrics/sample_map.cc",
+ "metrics/sample_map.h",
+ "metrics/sample_vector.cc",
+ "metrics/sample_vector.h",
+ "metrics/bucket_ranges.cc",
+ "metrics/bucket_ranges.h",
+ "metrics/histogram.cc",
+ "metrics/histogram.h",
+ "metrics/histogram_base.cc",
+ "metrics/histogram_base.h",
+ "metrics/histogram_delta_serialization.cc",
+ "metrics/histogram_delta_serialization.",
+ "metrics/histogram_flattener.h",
+ "metrics/histogram_samples.cc",
+ "metrics/histogram_samples.h",
+ "metrics/histogram_snapshot_manager.cc",
+ "metrics/histogram_snapshot_manager.h",
+ "metrics/sparse_histogram.cc",
+ "metrics/sparse_histogram.h",
+ "metrics/statistics_recorder.cc",
+ "metrics/statistics_recorder.h",
+ "metrics/stats_counters.cc",
+ "metrics/stats_counters.h",
+ "metrics/stats_table.cc",
+ "metrics/stats_table.h",
+ "metrics/user_metrics.cc",
+ "metrics/user_metrics.h",
+ "metrics/user_metrics_action.h",
+ "move.h",
+ "native_library.h",
+ "native_library_mac.mm",
+ "native_library_posix.cc",
+ "native_library_win.cc",
+ "numerics/safe_conversions.h",
+ "numerics/safe_conversions_impl.h",
+ "numerics/safe_math.h",
+ "numerics/safe_math_impl.h",
+ "nix/mime_util_xdg.cc",
+ "nix/mime_util_xdg.h",
+ "nix/xdg_util.cc",
+ "nix/xdg_util.h",
+ "observer_list.h",
+ "observer_list_threadsafe.h",
+ "os_compat_android.cc",
+ "os_compat_android.h",
+ "os_compat_nacl.cc",
+ "os_compat_nacl.h",
+ "path_service.cc",
+ "path_service.h",
+ "pending_task.cc",
+ "pending_task.h",
+ "pickle.cc",
+ "pickle.h",
+ "platform_file.cc",
+ "platform_file.h",
+ "platform_file_posix.cc",
+ "platform_file_win.cc",
+ "port.h",
+ "posix/eintr_wrapper.h",
+ "posix/file_descriptor_shuffle.cc",
+ "posix/global_descriptors.cc",
+ "posix/global_descriptors.h",
+ "posix/unix_domain_socket_linux.cc",
+ "posix/unix_domain_socket_linux.h",
+ "power_monitor/power_monitor.cc",
+ "power_monitor/power_monitor.h",
+ "power_monitor/power_monitor_device_source.cc",
+ "power_monitor/power_monitor_device_source.h",
+ "power_monitor/power_monitor_device_source_android.cc",
+ "power_monitor/power_monitor_device_source_android.h",
+ "power_monitor/power_monitor_device_source_ios.mm",
+ "power_monitor/power_monitor_device_source_mac.mm",
+ "power_monitor/power_monitor_device_source_posix.cc",
+ "power_monitor/power_monitor_device_source_win.cc",
+ "power_monitor/power_monitor_source.cc",
+ "power_monitor/power_monitor_source.h",
+ "power_monitor/power_observer.h",
+ "process/internal_linux.cc",
+ "process/internal_linux.h",
+ "process/kill.cc",
+ "process/kill.h",
+ "process/kill_mac.cc",
+ "process/kill_posix.cc",
+ "process/kill_win.cc",
+ "process/launch.cc",
+ "process/launch.h",
+ "process/launch_ios.cc",
+ "process/launch_mac.cc",
+ "process/launch_posix.cc",
+ "process/launch_win.cc",
+ "process/memory.cc",
+ "process/memory.h",
+ "process/memory_linux.cc",
+ "process/memory_mac.mm",
+ "process/memory_win.cc",
+ "process/process.h",
+ "process/process_handle_freebsd.cc",
+ "process/process_handle_linux.cc",
+ "process/process_handle_mac.cc",
+ "process/process_handle_openbsd.cc",
+ "process/process_handle_posix.cc",
+ "process/process_handle_win.cc",
+ "process/process_info.h",
+ "process/process_info_mac.cc",
+ "process/process_info_win.cc",
+ "process/process_iterator.cc",
+ "process/process_iterator.h",
+ "process/process_iterator_freebsd.cc",
+ "process/process_iterator_linux.cc",
+ "process/process_iterator_mac.cc",
+ "process/process_iterator_openbsd.cc",
+ "process/process_iterator_win.cc",
+ "process/process_linux.cc",
+ "process/process_metrics.cc",
+ "process/process_metrics.h",
+ "process/process_metrics_freebsd.cc",
+ "process/process_metrics_ios.cc",
+ "process/process_metrics_linux.cc",
+ "process/process_metrics_mac.cc",
+ "process/process_metrics_openbsd.cc",
+ "process/process_metrics_posix.cc",
+ "process/process_metrics_win.cc",
+ "process/process_posix.cc",
+ "process/process_win.cc",
+ "profiler/scoped_profile.cc",
+ "profiler/scoped_profile.h",
+ "profiler/alternate_timer.cc",
+ "profiler/alternate_timer.h",
+ "profiler/tracked_time.cc",
+ "profiler/tracked_time.h",
+ "rand_util.cc",
+ "rand_util.h",
+ "rand_util_nacl.cc",
+ "rand_util_posix.cc",
+ "rand_util_win.cc",
+ "run_loop.cc",
+ "run_loop.h",
+ "safe_strerror_posix.cc",
+ "safe_strerror_posix.h",
+ "scoped_generic.h",
+ "scoped_native_library.cc",
+ "scoped_native_library.h",
+ "sequence_checker.h",
+ "sequence_checker_impl.cc",
+ "sequence_checker_impl.h",
+ "sequenced_task_runner.cc",
+ "sequenced_task_runner.h",
+ "sequenced_task_runner_helpers.h",
+ "sha1.h",
+ "sha1_portable.cc",
+ "sha1_win.cc",
+ "single_thread_task_runner.h",
+ "stl_util.h",
+ "strings/latin1_string_conversions.cc",
+ "strings/latin1_string_conversions.h",
+ "strings/nullable_string16.cc",
+ "strings/nullable_string16.h",
+ "strings/safe_sprintf.cc",
+ "strings/safe_sprintf.h",
+ "strings/string16.cc",
+ "strings/string16.h",
+ "strings/string_number_conversions.cc",
+ "strings/string_split.cc",
+ "strings/string_split.h",
+ "strings/string_number_conversions.h",
+ "strings/string_piece.cc",
+ "strings/string_piece.h",
+ "strings/string_tokenizer.h",
+ "strings/string_util.cc",
+ "strings/string_util.h",
+ "strings/string_util_constants.cc",
+ "strings/string_util_posix.h",
+ "strings/string_util_win.h",
+ "strings/stringize_macros.h",
+ "strings/stringprintf.cc",
+ "strings/stringprintf.h",
+ "strings/sys_string_conversions.h",
+ "strings/sys_string_conversions_mac.mm",
+ "strings/sys_string_conversions_posix.cc",
+ "strings/sys_string_conversions_win.cc",
+ "strings/utf_offset_string_conversions.cc",
+ "strings/utf_offset_string_conversions.h",
+ "strings/utf_string_conversion_utils.cc",
+ "strings/utf_string_conversion_utils.h",
+ "strings/utf_string_conversions.cc",
+ "strings/utf_string_conversions.h",
+ "supports_user_data.cc",
+ "supports_user_data.h",
+ "sync_socket.h",
+ "sync_socket_posix.cc",
+ "sync_socket_win.cc",
+ "synchronization/cancellation_flag.cc",
+ "synchronization/cancellation_flag.h",
+ "synchronization/condition_variable.h",
+ "synchronization/condition_variable_posix.cc",
+ "synchronization/condition_variable_win.cc",
+ "synchronization/lock.cc",
+ "synchronization/lock.h",
+ "synchronization/lock_impl.h",
+ "synchronization/lock_impl_posix.cc",
+ "synchronization/lock_impl_win.cc",
+ "synchronization/spin_wait.h",
+ "synchronization/waitable_event.h",
+ "synchronization/waitable_event_posix.cc",
+ "synchronization/waitable_event_watcher.h",
+ "synchronization/waitable_event_watcher_posix.cc",
+ "synchronization/waitable_event_watcher_win.cc",
+ "synchronization/waitable_event_win.cc",
+ "system_monitor/system_monitor.cc",
+ "system_monitor/system_monitor.h",
+ "sys_byteorder.h",
+ "sys_info.cc",
+ "sys_info.h",
+ "sys_info_android.cc",
+ "sys_info_chromeos.cc",
+ "sys_info_freebsd.cc",
+ "sys_info_ios.mm",
+ "sys_info_linux.cc",
+ "sys_info_mac.cc",
+ "sys_info_openbsd.cc",
+ "sys_info_posix.cc",
+ "sys_info_win.cc",
+ "task/cancelable_task_tracker.cc",
+ "task/cancelable_task_tracker.h",
+ "task_runner.cc",
+ "task_runner.h",
+ "task_runner_util.h",
+ "template_util.h",
+ "thread_task_runner_handle.cc",
+ "thread_task_runner_handle.h",
+ "threading/non_thread_safe.h",
+ "threading/non_thread_safe_impl.cc",
+ "threading/non_thread_safe_impl.h",
+ "threading/platform_thread.h",
+ "threading/platform_thread_android.cc",
+ "threading/platform_thread_linux.cc",
+ "threading/platform_thread_mac.mm",
+ "threading/platform_thread_posix.cc",
+ "threading/platform_thread_win.cc",
+ "threading/post_task_and_reply_impl.cc",
+ "threading/post_task_and_reply_impl.h",
+ "threading/sequenced_worker_pool.cc",
+ "threading/sequenced_worker_pool.h",
+ "threading/simple_thread.cc",
+ "threading/simple_thread.h",
+ "threading/thread.cc",
+ "threading/thread.h",
+ "threading/thread_checker.h",
+ "threading/thread_checker_impl.cc",
+ "threading/thread_checker_impl.h",
+ "threading/thread_collision_warner.cc",
+ "threading/thread_collision_warner.h",
+ "threading/thread_id_name_manager.cc",
+ "threading/thread_id_name_manager.h",
+ "threading/thread_local.h",
+ "threading/thread_local_android.cc",
+ "threading/thread_local_posix.cc",
+ "threading/thread_local_storage.cc",
+ "threading/thread_local_storage.h",
+ "threading/thread_local_storage_posix.cc",
+ "threading/thread_local_storage_win.cc",
+ "threading/thread_local_win.cc",
+ "threading/thread_restrictions.h",
+ "threading/thread_restrictions.cc",
+ "threading/watchdog.cc",
+ "threading/watchdog.h",
+ "threading/worker_pool.h",
+ "threading/worker_pool.cc",
+ "threading/worker_pool_posix.cc",
+ "threading/worker_pool_posix.h",
+ "threading/worker_pool_win.cc",
+ "time/clock.cc",
+ "time/clock.h",
+ "time/default_clock.cc",
+ "time/default_clock.h",
+ "time/default_tick_clock.cc",
+ "time/default_tick_clock.h",
+ "time/tick_clock.cc",
+ "time/tick_clock.h",
+ "time/time.cc",
+ "time/time.h",
+ "time/time_mac.cc",
+ "time/time_posix.cc",
+ "time/time_win.cc",
+ "timer/elapsed_timer.cc",
+ "timer/elapsed_timer.h",
+ "timer/hi_res_timer_manager.h",
+ "timer/hi_res_timer_manager_posix.cc",
+ "timer/hi_res_timer_manager_win.cc",
+ "timer/mock_timer.cc",
+ "timer/mock_timer.h",
+ "timer/timer.cc",
+ "timer/timer.h",
+ "tracked_objects.cc",
+ "tracked_objects.h",
+ "tracking_info.cc",
+ "tracking_info.h",
+ "tuple.h",
+ "values.cc",
+ "values.h",
+ "value_conversions.cc",
+ "value_conversions.h",
+ "version.cc",
+ "version.h",
+ "vlog.cc",
+ "vlog.h",
+ "win/enum_variant.cc",
+ "win/enum_variant.h",
+ "win/event_trace_consumer.h",
+ "win/event_trace_controller.cc",
+ "win/event_trace_controller.h",
+ "win/event_trace_provider.cc",
+ "win/event_trace_provider.h",
+ "win/i18n.cc",
+ "win/i18n.h",
+ "win/iat_patch_function.cc",
+ "win/iat_patch_function.h",
+ "win/iunknown_impl.cc",
+ "win/iunknown_impl.h",
+ "win/message_window.cc",
+ "win/message_window.h",
+ "win/metro.cc",
+ "win/metro.h",
+ "win/object_watcher.cc",
+ "win/object_watcher.h",
+ "win/registry.cc",
+ "win/registry.h",
+ "win/resource_util.cc",
+ "win/resource_util.h",
+ "win/scoped_bstr.cc",
+ "win/scoped_bstr.h",
+ "win/scoped_co_mem.h",
+ "win/scoped_com_initializer.h",
+ "win/scoped_comptr.h",
+ "win/scoped_gdi_object.h",
+ "win/scoped_handle.cc",
+ "win/scoped_handle.h",
+ "win/scoped_hdc.h",
+ "win/scoped_hglobal.h",
+ "win/scoped_process_information.cc",
+ "win/scoped_process_information.h",
+ "win/scoped_propvariant.h",
+ "win/scoped_select_object.h",
+ "win/scoped_variant.cc",
+ "win/scoped_variant.h",
+ "win/shortcut.cc",
+ "win/shortcut.h",
+ "win/startup_information.cc",
+ "win/startup_information.h",
+ "win/win_util.cc",
+ "win/win_util.h",
+ "win/windows_version.cc",
+ "win/windows_version.h",
+ "win/wrapped_window_proc.cc",
+ "win/wrapped_window_proc.h",
+ ]
+
+ if (is_nacl) {
+ sources += [ "files/file_path_watcher_stub.cc" ]
+ }
+
+ sources -= [
+ "process/process_handle_freebsd.cc",
+ "process/process_handle_openbsd.cc",
+ "process/process_iterator_freebsd.cc",
+ "process/process_iterator_openbsd.cc",
+ "process/process_metrics_freebsd.cc",
+ "process/process_metrics_openbsd.cc",
+ "sys_info_freebsd.cc",
+ "sys_info_openbsd.cc",
+ ]
+
+ defines = [
+ "BASE_IMPLEMENTATION",
+ ]
+
+ deps = [
+ ":base_static",
+ "//base/allocator:allocator_extension_thunks",
+ "//base/third_party/dynamic_annotations",
+ "//base/third_party/nspr",
+ "//third_party/modp_b64",
+ ]
+
+ if (is_android) {
+ sources += [
+ "memory/discardable_memory_ashmem_allocator.cc",
+ "memory/discardable_memory_ashmem_allocator.h",
+ "memory/discardable_memory_ashmem.cc",
+ "memory/discardable_memory_ashmem.h",
+ ]
+ sources -= [
+ "base_paths_posix.cc",
+ "power_monitor/power_monitor_device_source_posix.cc",
+ ]
+
+ # Android uses some Linux sources, put those back.
+ set_sources_assignment_filter([])
+ sources += [
+ "debug/proc_maps_linux.cc",
+ "files/file_path_watcher_linux.cc",
+ "process/memory_linux.cc",
+ "process/internal_linux.cc",
+ "process/process_handle_linux.cc",
+ "process/process_iterator_linux.cc",
+ "process/process_metrics_linux.cc",
+ "posix/unix_domain_socket_linux.cc",
+ "sys_info_linux.cc",
+ ]
+ set_sources_assignment_filter(sources_assignment_filter)
+
+ deps += [
+ ":base_jni_headers",
+ "//third_party/ashmem",
+ "//third_party/android_tools:cpu_features"
+ ]
+
+ # logging.cc uses the Android logging library.
+ libs = [ "log" ]
+
+ sources -= [
+ "debug/stack_trace_posix.cc",
+ ]
+ }
+
+ if (is_nacl) {
+ # These things would otherwise be built on a Posix build but aren't
+ # supported on NaCl.
+ sources -= [
+ "debug/stack_trace_posix.cc",
+ "files/file_enumerator_posix.cc",
+ "file_util_posix.cc",
+ "message_loop/message_pump_libevent.cc",
+ "process/kill_posix.cc",
+ "process/launch_posix.cc",
+ "process/process_metrics_posix.cc",
+ "process/process_posix.cc",
+ "metrics/field_trial.cc",
+ "native_library_posix.cc",
+ "memory/shared_memory_posix.cc",
+ "sync_socket_posix.cc",
+ "sys_info_posix.cc",
+ ]
+ } else {
+ # Remove nacl stuff.
+ sources -= [
+ "os_compat_nacl.cc",
+ "os_compat_nacl.h",
+ "rand_util_nacl.cc",
+ "memory/shared_memory_nacl.cc",
+ ]
+ }
+
+ # Windows.
+ if (is_win) {
+ sources -= [
+ "message_loop/message_pump_libevent.cc",
+ "strings/string16.cc",
+ # Not using sha1_win.cc because it may have caused a
+ # regression to page cycler moz.
+ "sha1_win.cc",
+ ]
+
+ libs = [
+ "netapi32.lib",
+ "powrprof.lib",
+ ]
+ ldflags = [
+ "/DELAYLOAD:powrprof.dll",
+ ]
+ } else if (!is_nacl) {
+ # Non-Windows.
+ deps += [ "//third_party/libevent" ]
+ }
+
+ # Mac.
+ if (is_mac) {
+ sources -= [
+ "base_paths_posix.cc",
+ "native_library_posix.cc",
+ "strings/sys_string_conversions_posix.cc",
+ ]
+ deps += [ "//third_party/mach_override" ]
+ } else {
+ # Non-Mac.
+ sources -= [
+ "files/file_path_watcher_fsevents.cc",
+ "files/file_path_watcher_fsevents.h",
+ "files/file_path_watcher_kqueue.cc",
+ "files/file_path_watcher_kqueue.h",
+ ]
+ }
+
+ # Linux.
+ if (is_linux) {
+ # TODO(brettw) this will need to be parameterized at some point.
+ linux_configs = [
+ "//build/config/linux:glib",
+ ]
+
+ configs += linux_configs
+ all_dependent_configs = linux_configs
+
+ # These dependencies are not required on Android, and in the case
+ # of xdg_mime must be excluded due to licensing restrictions.
+ deps += [
+ "//base/third_party/symbolize",
+ "//base/third_party/xdg_mime",
+ "//base/third_party/xdg_user_dirs",
+ ]
+ } else {
+ # Non-Linux.
+ sources -= [
+ "nix/mime_util_xdg.cc",
+ "nix/mime_util_xdg.h",
+ "nix/xdg_util.cc",
+ "nix/xdg_util.h",
+ ]
+ }
+
+ if (!use_glib) {
+ sources -= [
+ "message_loop/message_pump_glib.cc",
+ "message_loop/message_pump_glib.h",
+ ]
+ }
+}
+
+# This is the subset of files from base that should not be used with a dynamic
+# library. Note that this library cannot depend on base because base depends on
+# base_static.
+source_set("base_static") {
+ sources = [
+ "base_switches.cc",
+ "base_switches.h",
+ "win/pe_image.cc",
+ "win/pe_image.h",
+ ]
+}
+
+component("i18n") {
+ output_name = "base_i18n"
+ sources = [
+ "i18n/base_i18n_export.h",
+ "i18n/bidi_line_iterator.cc",
+ "i18n/bidi_line_iterator.h",
+ "i18n/break_iterator.cc",
+ "i18n/break_iterator.h",
+ "i18n/case_conversion.cc",
+ "i18n/case_conversion.h",
+ "i18n/char_iterator.cc",
+ "i18n/char_iterator.h",
+ "i18n/file_util_icu.cc",
+ "i18n/file_util_icu.h",
+ "i18n/i18n_constants.cc",
+ "i18n/i18n_constants.h",
+ "i18n/icu_encoding_detection.cc",
+ "i18n/icu_encoding_detection.h",
+ "i18n/icu_string_conversions.cc",
+ "i18n/icu_string_conversions.h",
+ "i18n/icu_util.cc",
+ "i18n/icu_util.h",
+ "i18n/number_formatting.cc",
+ "i18n/number_formatting.h",
+ "i18n/rtl.cc",
+ "i18n/rtl.h",
+ "i18n/streaming_utf8_validator.cc",
+ "i18n/streaming_utf8_validator.h",
+ "i18n/string_compare.cc",
+ "i18n/string_compare.h",
+ "i18n/string_search.cc",
+ "i18n/string_search.h",
+ "i18n/time_formatting.cc",
+ "i18n/time_formatting.h",
+ "i18n/timezone.cc",
+ "i18n/timezone.h",
+ "i18n/utf8_validator_tables.cc",
+ "i18n/utf8_validator_tables.h",
+ ]
+ defines = [ "BASE_I18N_IMPLEMENTATION" ]
+ configs += [ "//build/config/compiler:wexit_time_destructors" ]
+ deps = [
+ ":base",
+ "//base/third_party/dynamic_annotations",
+ "//third_party/icu",
+ ]
+}
+
+source_set("prefs") {
+ sources = [
+ "prefs/base_prefs_export.h",
+ "prefs/default_pref_store.cc",
+ "prefs/default_pref_store.h",
+ "prefs/json_pref_store.cc",
+ "prefs/json_pref_store.h",
+ "prefs/overlay_user_pref_store.cc",
+ "prefs/overlay_user_pref_store.h",
+ "prefs/persistent_pref_store.h",
+ "prefs/pref_change_registrar.cc",
+ "prefs/pref_change_registrar.h",
+ "prefs/pref_filter.h",
+ "prefs/pref_member.cc",
+ "prefs/pref_member.h",
+ "prefs/pref_notifier.h",
+ "prefs/pref_notifier_impl.cc",
+ "prefs/pref_notifier_impl.h",
+ "prefs/pref_observer.h",
+ "prefs/pref_registry.cc",
+ "prefs/pref_registry.h",
+ "prefs/pref_registry_simple.cc",
+ "prefs/pref_registry_simple.h",
+ "prefs/pref_service.cc",
+ "prefs/pref_service.h",
+ "prefs/pref_service_factory.cc",
+ "prefs/pref_service_factory.h",
+ "prefs/pref_store.cc",
+ "prefs/pref_store.h",
+ "prefs/pref_value_map.cc",
+ "prefs/pref_value_map.h",
+ "prefs/pref_value_store.cc",
+ "prefs/pref_value_store.h",
+ "prefs/scoped_user_pref_update.cc",
+ "prefs/scoped_user_pref_update.h",
+ "prefs/value_map_pref_store.cc",
+ "prefs/value_map_pref_store.h",
+ "prefs/writeable_pref_store.h",
+ ]
+
+ defines = [ "BASE_PREFS_IMPLEMENTATION" ]
+
+ deps = [ ":base" ]
+}
+
+source_set("prefs_test_support") {
+ sources = [
+ "prefs/mock_pref_change_callback.cc",
+ "prefs/pref_store_observer_mock.cc",
+ "prefs/pref_store_observer_mock.h",
+ "prefs/testing_pref_service.cc",
+ "prefs/testing_pref_service.h",
+ "prefs/testing_pref_store.cc",
+ "prefs/testing_pref_store.h",
+ ]
+
+ deps = [
+ ":base",
+ ":prefs",
+ "//testing/gmock",
+ ]
+}
+
+source_set("message_loop_tests") {
+ sources = [
+ "message_loop/message_loop_test.cc",
+ "message_loop/message_loop_test.h",
+ ]
+
+ deps = [
+ ":base",
+ "//testing/gtest",
+ ]
+}
+
+test("base_unittests") {
+ sources = [
+ "android/application_status_listener_unittest.cc",
+ "android/jni_android_unittest.cc",
+ "android/jni_array_unittest.cc",
+ "android/jni_string_unittest.cc",
+ "android/path_utils_unittest.cc",
+ "android/scoped_java_ref_unittest.cc",
+ "android/sys_utils_unittest.cc",
+ "async_socket_io_handler_unittest.cc",
+ "at_exit_unittest.cc",
+ "atomicops_unittest.cc",
+ "barrier_closure_unittest.cc",
+ "base64_unittest.cc",
+ "big_endian_unittest.cc",
+ "bind_unittest.cc",
+ "bind_unittest.nc",
+ "bits_unittest.cc",
+ "build_time_unittest.cc",
+ "callback_helpers_unittest.cc",
+ "callback_list_unittest.cc",
+ "callback_list_unittest.nc",
+ "callback_unittest.cc",
+ "callback_unittest.nc",
+ "cancelable_callback_unittest.cc",
+ "command_line_unittest.cc",
+ "containers/hash_tables_unittest.cc",
+ "containers/linked_list_unittest.cc",
+ "containers/mru_cache_unittest.cc",
+ "containers/small_map_unittest.cc",
+ "containers/stack_container_unittest.cc",
+ "cpu_unittest.cc",
+ "debug/crash_logging_unittest.cc",
+ "debug/leak_tracker_unittest.cc",
+ "debug/proc_maps_linux_unittest.cc",
+ "debug/stack_trace_unittest.cc",
+ "debug/trace_event_memory_unittest.cc",
+ "debug/trace_event_synthetic_delay_unittest.cc",
+ "debug/trace_event_system_stats_monitor_unittest.cc",
+ "debug/trace_event_unittest.cc",
+ "debug/trace_event_unittest.h",
+ "debug/trace_event_win_unittest.cc",
+ "deferred_sequenced_task_runner_unittest.cc",
+ "environment_unittest.cc",
+ "file_util_unittest.cc",
+ "file_version_info_unittest.cc",
+ "files/dir_reader_posix_unittest.cc",
+ "files/file_path_unittest.cc",
+ "files/file_proxy_unittest.cc",
+ "files/file_unittest.cc",
+ "files/file_util_proxy_unittest.cc",
+ "files/important_file_writer_unittest.cc",
+ "files/scoped_temp_dir_unittest.cc",
+ "gmock_unittest.cc",
+ "guid_unittest.cc",
+ "hash_unittest.cc",
+ "id_map_unittest.cc",
+ "i18n/break_iterator_unittest.cc",
+ "i18n/char_iterator_unittest.cc",
+ "i18n/case_conversion_unittest.cc",
+ "i18n/file_util_icu_unittest.cc",
+ "i18n/icu_string_conversions_unittest.cc",
+ "i18n/number_formatting_unittest.cc",
+ "i18n/rtl_unittest.cc",
+ "i18n/streaming_utf8_validator_unittest.cc",
+ "i18n/string_search_unittest.cc",
+ "i18n/time_formatting_unittest.cc",
+ "i18n/timezone_unittest.cc",
+ "ini_parser_unittest.cc",
+ "ios/device_util_unittest.mm",
+ "json/json_parser_unittest.cc",
+ "json/json_reader_unittest.cc",
+ "json/json_value_converter_unittest.cc",
+ "json/json_value_serializer_unittest.cc",
+ "json/json_writer_unittest.cc",
+ "json/string_escape_unittest.cc",
+ "lazy_instance_unittest.cc",
+ "logging_unittest.cc",
+ "mac/bind_objc_block_unittest.mm",
+ "mac/foundation_util_unittest.mm",
+ "mac/libdispatch_task_runner_unittest.cc",
+ "mac/mac_util_unittest.mm",
+ "mac/objc_property_releaser_unittest.mm",
+ "mac/scoped_nsobject_unittest.mm",
+ "mac/scoped_sending_event_unittest.mm",
+ "md5_unittest.cc",
+ "memory/aligned_memory_unittest.cc",
+ "memory/discardable_memory_manager_unittest.cc",
+ "memory/discardable_memory_unittest.cc",
+ "memory/linked_ptr_unittest.cc",
+ "memory/ref_counted_memory_unittest.cc",
+ "memory/ref_counted_unittest.cc",
+ "memory/scoped_ptr_unittest.cc",
+ "memory/scoped_ptr_unittest.nc",
+ "memory/scoped_vector_unittest.cc",
+ "memory/shared_memory_unittest.cc",
+ "memory/singleton_unittest.cc",
+ "memory/weak_ptr_unittest.cc",
+ "memory/weak_ptr_unittest.nc",
+ "message_loop/message_loop_proxy_impl_unittest.cc",
+ "message_loop/message_loop_proxy_unittest.cc",
+ "message_loop/message_loop_unittest.cc",
+ "message_loop/message_pump_glib_unittest.cc",
+ "message_loop/message_pump_io_ios_unittest.cc",
+ "metrics/sample_map_unittest.cc",
+ "metrics/sample_vector_unittest.cc",
+ "metrics/bucket_ranges_unittest.cc",
+ "metrics/field_trial_unittest.cc",
+ "metrics/histogram_base_unittest.cc",
+ "metrics/histogram_delta_serialization_unittest.cc",
+ "metrics/histogram_snapshot_manager_unittest.cc",
+ "metrics/histogram_unittest.cc",
+ "metrics/sparse_histogram_unittest.cc",
+ "metrics/stats_table_unittest.cc",
+ "metrics/statistics_recorder_unittest.cc",
+ "observer_list_unittest.cc",
+ "os_compat_android_unittest.cc",
+ "path_service_unittest.cc",
+ "pickle_unittest.cc",
+ "platform_file_unittest.cc",
+ "posix/file_descriptor_shuffle_unittest.cc",
+ "posix/unix_domain_socket_linux_unittest.cc",
+ "power_monitor/power_monitor_unittest.cc",
+ "prefs/default_pref_store_unittest.cc",
+ "prefs/json_pref_store_unittest.cc",
+ "prefs/mock_pref_change_callback.h",
+ "prefs/overlay_user_pref_store_unittest.cc",
+ "prefs/pref_change_registrar_unittest.cc",
+ "prefs/pref_member_unittest.cc",
+ "prefs/pref_notifier_impl_unittest.cc",
+ "prefs/pref_service_unittest.cc",
+ "prefs/pref_value_map_unittest.cc",
+ "prefs/pref_value_store_unittest.cc",
+ "prefs/scoped_user_pref_update_unittest.cc",
+ "process/memory_unittest.cc",
+ "process/memory_unittest_mac.h",
+ "process/memory_unittest_mac.mm",
+ "process/process_metrics_unittest.cc",
+ "process/process_metrics_unittest_ios.cc",
+ "process/process_util_unittest.cc",
+ "process/process_util_unittest_ios.cc",
+ "profiler/tracked_time_unittest.cc",
+ "rand_util_unittest.cc",
+ "numerics/safe_numerics_unittest.cc",
+ "scoped_clear_errno_unittest.cc",
+ "scoped_generic_unittest.cc",
+ "scoped_native_library_unittest.cc",
+ "scoped_observer.h",
+ "security_unittest.cc",
+ "sequence_checker_unittest.cc",
+ "sha1_unittest.cc",
+ "stl_util_unittest.cc",
+ "strings/nullable_string16_unittest.cc",
+ "strings/safe_sprintf_unittest.cc",
+ "strings/string16_unittest.cc",
+ "strings/stringprintf_unittest.cc",
+ "strings/string_number_conversions_unittest.cc",
+ "strings/string_piece_unittest.cc",
+ "strings/string_split_unittest.cc",
+ "strings/string_tokenizer_unittest.cc",
+ "strings/string_util_unittest.cc",
+ "strings/stringize_macros_unittest.cc",
+ "strings/sys_string_conversions_mac_unittest.mm",
+ "strings/sys_string_conversions_unittest.cc",
+ "strings/utf_offset_string_conversions_unittest.cc",
+ "strings/utf_string_conversions_unittest.cc",
+ "supports_user_data_unittest.cc",
+ "sync_socket_unittest.cc",
+ "synchronization/cancellation_flag_unittest.cc",
+ "synchronization/condition_variable_unittest.cc",
+ "synchronization/lock_unittest.cc",
+ "synchronization/waitable_event_unittest.cc",
+ "synchronization/waitable_event_watcher_unittest.cc",
+ "sys_info_unittest.cc",
+ "system_monitor/system_monitor_unittest.cc",
+ "task/cancelable_task_tracker_unittest.cc",
+ "task_runner_util_unittest.cc",
+ "template_util_unittest.cc",
+ "test/expectations/expectation_unittest.cc",
+ "test/expectations/parser_unittest.cc",
+ "test/statistics_delta_reader_unittest.cc",
+ "test/test_reg_util_win_unittest.cc",
+ "test/trace_event_analyzer_unittest.cc",
+ "threading/non_thread_safe_unittest.cc",
+ "threading/platform_thread_unittest.cc",
+ "threading/sequenced_worker_pool_unittest.cc",
+ "threading/simple_thread_unittest.cc",
+ "threading/thread_checker_unittest.cc",
+ "threading/thread_collision_warner_unittest.cc",
+ "threading/thread_id_name_manager_unittest.cc",
+ "threading/thread_local_storage_unittest.cc",
+ "threading/thread_local_unittest.cc",
+ "threading/thread_unittest.cc",
+ "threading/watchdog_unittest.cc",
+ "threading/worker_pool_posix_unittest.cc",
+ "threading/worker_pool_unittest.cc",
+ "time/pr_time_unittest.cc",
+ "time/time_unittest.cc",
+ "time/time_win_unittest.cc",
+ "timer/hi_res_timer_manager_unittest.cc",
+ "timer/mock_timer_unittest.cc",
+ "timer/timer_unittest.cc",
+ "tools_sanity_unittest.cc",
+ "tracked_objects_unittest.cc",
+ "tuple_unittest.cc",
+ "values_unittest.cc",
+ "version_unittest.cc",
+ "vlog_unittest.cc",
+ "win/dllmain.cc",
+ "win/enum_variant_unittest.cc",
+ "win/event_trace_consumer_unittest.cc",
+ "win/event_trace_controller_unittest.cc",
+ "win/event_trace_provider_unittest.cc",
+ "win/i18n_unittest.cc",
+ "win/iunknown_impl_unittest.cc",
+ "win/message_window_unittest.cc",
+ "win/object_watcher_unittest.cc",
+ "win/pe_image_unittest.cc",
+ "win/registry_unittest.cc",
+ "win/scoped_bstr_unittest.cc",
+ "win/scoped_comptr_unittest.cc",
+ "win/scoped_process_information_unittest.cc",
+ "win/scoped_variant_unittest.cc",
+ "win/shortcut_unittest.cc",
+ "win/startup_information_unittest.cc",
+ "win/win_util_unittest.cc",
+ "win/wrapped_window_proc_unittest.cc",
+ ]
+
+ deps = [
+ ":base",
+ ":i18n",
+ ":message_loop_tests",
+ ":prefs",
+ ":prefs_test_support",
+ "//base/allocator",
+ "//base/test:run_all_unittests",
+ "//base/test:test_support",
+ "//base/third_party/dynamic_annotations",
+ "//testing/gmock",
+ "//testing/gtest",
+ "//third_party/icu",
+ ]
+
+ if (is_ios) {
+ sources -= [
+ "metrics/stats_table_uinittest.cc", # Requires spawning a process.
+ "process/memory_unittest.cc",
+ "process/memory_unittest_mac.h",
+ "process/memory_unittest_mac.mm",
+ "process/process_util_unittest.cc",
+ ]
+
+ # Pull in specific Mac files for iOS (which have been filtered out by file
+ # name rules).
+ set_sources_assignment_filter([])
+ sources += [
+ "mac/bind_objc_block_unittest.mm",
+ "mac/foundation_util_unittest.mm",
+ "mac/objc_property_releaser_unittest.mm",
+ "mac/scoped_nsobject_unittest.mm",
+ "sys_string_conversions_mac_unittest.mm",
+ ]
+ set_sources_assignment_filter(sources_assignment_filter)
+
+ # TODO(GYP): dep on copy_test_data_ios action.
+ }
+
+ if (is_linux) {
+ sources -= [ "file_version_info_unittest.cc" ]
+ sources += [ "nix/xdg_util_unittest.cc" ]
+ defines = [ "USE_SYMBOLIZE" ]
+ configs += [ "//build/config/linux:glib" ]
+ }
+
+ if (!is_linux || use_ozone) {
+ sources -= [ "message_loop/message_pump_glib_unittest.cc" ]
+ }
+
+ if (is_posix || is_ios) {
+ sources += [ "message_loop/message_pump_libevent_unittest.cc" ]
+ deps += [ "//third_party/libevent" ]
+ }
+
+ if (is_android) {
+ set_sources_assignment_filter([])
+ sources += [ "debug/proc_maps_linux_unittest.cc" ]
+ set_sources_assignment_filter(sources_assignment_filter)
+ }
+}
+
+if (is_android) {
+ generate_jni("base_jni_headers") {
+ sources = [
+ "android/java/src/org/chromium/base/ApplicationStatus.java",
+ "android/java/src/org/chromium/base/BuildInfo.java",
+ "android/java/src/org/chromium/base/CommandLine.java",
+ "android/java/src/org/chromium/base/ContentUriUtils.java",
+ "android/java/src/org/chromium/base/CpuFeatures.java",
+ "android/java/src/org/chromium/base/EventLog.java",
+ "android/java/src/org/chromium/base/ImportantFileWriterAndroid.java",
+ "android/java/src/org/chromium/base/library_loader/LibraryLoader.java",
+ "android/java/src/org/chromium/base/MemoryPressureListener.java",
+ "android/java/src/org/chromium/base/JavaHandlerThread.java",
+ "android/java/src/org/chromium/base/PathService.java",
+ "android/java/src/org/chromium/base/PathUtils.java",
+ "android/java/src/org/chromium/base/PowerMonitor.java",
+ "android/java/src/org/chromium/base/SystemMessageHandler.java",
+ "android/java/src/org/chromium/base/SysUtils.java",
+ "android/java/src/org/chromium/base/ThreadUtils.java",
+ "android/java/src/org/chromium/base/TraceEvent.java",
+ ]
+ jni_package = "base"
+ }
+
+ java_cpp_template("base_java_application_state") {
+ sources = [
+ "android/java/src/org/chromium/base/ApplicationState.template",
+ ]
+ source_prereqs = [
+ "android/application_state_list.h"
+ ]
+
+ package_name = "org/chromium/base"
+ }
+
+ java_cpp_template("base_java_memory_pressure_level_list") {
+ sources = [
+ "android/java/src/org/chromium/base/MemoryPressureLevelList.template",
+ ]
+ source_prereqs = [
+ "memory/memory_pressure_level_list.h"
+ ]
+
+ package_name = "org/chromium/base"
+ }
+
+ java_cpp_template("base_native_libraries_gen") {
+ sources = [
+ "android/java/templates/NativeLibraries.template",
+ ]
+ source_prereqs = [
+ "android/java/templates/native_libraries_array.h",
+ ]
+
+ package_name = "org/chromium/base/library_loader"
+ include_path = "android/java/templates"
+ }
+
+
+}
diff --git a/chromium/base/DEPS b/chromium/base/DEPS
index e1545aee519..2407baaa53c 100644
--- a/chromium/base/DEPS
+++ b/chromium/base/DEPS
@@ -1,15 +1,18 @@
include_rules = [
"+jni",
- "+native_client/src/untrusted/irt/irt.h",
"+third_party/ashmem",
"+third_party/apple_apsl",
"+third_party/libevent",
"+third_party/dmg_fp",
- "+third_party/GTM",
+ "+third_party/google_toolbox_for_mac/src",
"+third_party/mach_override",
"+third_party/modp_b64",
"+third_party/tcmalloc",
+ # These are implicitly brought in from the root, and we don't want them.
+ "-ipc",
+ "-url",
+
# ICU dependendencies must be separate from the rest of base.
"-i18n",
]
diff --git a/chromium/base/PRESUBMIT.py b/chromium/base/PRESUBMIT.py
index 7137c5a0101..1a1cce75def 100644
--- a/chromium/base/PRESUBMIT.py
+++ b/chromium/base/PRESUBMIT.py
@@ -48,9 +48,11 @@ def CheckChangeOnCommit(input_api, output_api):
return results
-def GetPreferredTrySlaves():
- return [
- 'linux_rel:sync_integration_tests',
- 'mac_rel:sync_integration_tests',
- 'win_rel:sync_integration_tests',
- ]
+def GetPreferredTryMasters(project, change):
+ return {
+ 'tryserver.chromium': {
+ 'linux_chromium_rel': set(['defaulttests']),
+ 'mac_chromium_rel': set(['defaulttests']),
+ 'win_chromium_rel': set(['defaulttests']),
+ }
+ }
diff --git a/chromium/base/allocator/BUILD.gn b/chromium/base/allocator/BUILD.gn
new file mode 100644
index 00000000000..d8e3b275a0f
--- /dev/null
+++ b/chromium/base/allocator/BUILD.gn
@@ -0,0 +1,248 @@
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/allocator.gni")
+
+# Only executables and not libraries should depend on the allocator target;
+# only the application (the final executable) knows what allocator makes sense.
+# This "allocator" meta-target will forward to the default allocator according
+# to the build settings.
+group("allocator") {
+ if (use_allocator == "tcmalloc") {
+ deps = [ ":tcmalloc" ]
+ }
+}
+
+# This config and libc modification are only used on Windows.
+if (is_win) {
+ import("//build/config/win/visual_studio_version.gni")
+
+ config("nocmt") {
+ ldflags = [
+ "/NODEFAULTLIB:libcmt",
+ "/NODEFAULTLIB:libcmtd",
+ ]
+ libs = [ rebase_path("$target_gen_dir/allocator/libcmt.lib") ]
+ }
+
+ action("prep_libc") {
+ script = "prep_libc.py"
+ outputs = [ "$target_gen_dir/allocator/libcmt.lib" ]
+ args = [
+ visual_studio_path + "/vc/lib",
+ rebase_path("$target_gen_dir/allocator"),
+ cpu_arch,
+ ]
+ }
+}
+
+if (!is_android) {
+ # tcmalloc currently won't compile on Android.
+ source_set("tcmalloc") {
+ tcmalloc_dir = "//third_party/tcmalloc/chromium"
+
+ sources = [
+ # Generated for our configuration from tcmalloc"s build
+ # and checked in.
+ "$tcmalloc_dir/src/config.h",
+ "$tcmalloc_dir/src/config_android.h",
+ "$tcmalloc_dir/src/config_linux.h",
+ "$tcmalloc_dir/src/config_win.h",
+
+ # tcmalloc native and forked files.
+ "$tcmalloc_dir/src/base/abort.cc",
+ "$tcmalloc_dir/src/base/abort.h",
+ "$tcmalloc_dir/src/base/arm_instruction_set_select.h",
+ # We don't list dynamic_annotations.c since its copy is already
+ # present in the dynamic_annotations target.
+ "$tcmalloc_dir/src/base/elf_mem_image.cc",
+ "$tcmalloc_dir/src/base/elf_mem_image.h",
+ "$tcmalloc_dir/src/base/linuxthreads.cc",
+ "$tcmalloc_dir/src/base/linuxthreads.h",
+ "$tcmalloc_dir/src/base/logging.cc",
+ "$tcmalloc_dir/src/base/logging.h",
+ "$tcmalloc_dir/src/base/low_level_alloc.cc",
+ "$tcmalloc_dir/src/base/low_level_alloc.h",
+ "$tcmalloc_dir/src/base/spinlock.cc",
+ "$tcmalloc_dir/src/base/spinlock.h",
+ "$tcmalloc_dir/src/base/spinlock_internal.cc",
+ "$tcmalloc_dir/src/base/spinlock_internal.h",
+ "$tcmalloc_dir/src/base/synchronization_profiling.h",
+ "$tcmalloc_dir/src/base/sysinfo.cc",
+ "$tcmalloc_dir/src/base/sysinfo.h",
+ "$tcmalloc_dir/src/base/thread_lister.c",
+ "$tcmalloc_dir/src/base/thread_lister.h",
+ "$tcmalloc_dir/src/base/vdso_support.cc",
+ "$tcmalloc_dir/src/base/vdso_support.h",
+ "$tcmalloc_dir/src/central_freelist.cc",
+ "$tcmalloc_dir/src/central_freelist.h",
+ "$tcmalloc_dir/src/common.cc",
+ "$tcmalloc_dir/src/common.h",
+ # #included by debugallocation_shim.cc
+ #"$tcmalloc_dir/src/debugallocation.cc",
+ "$tcmalloc_dir/src/deep-heap-profile.cc",
+ "$tcmalloc_dir/src/deep-heap-profile.h",
+ "$tcmalloc_dir/src/free_list.cc",
+ "$tcmalloc_dir/src/free_list.h",
+ "$tcmalloc_dir/src/heap-profile-table.cc",
+ "$tcmalloc_dir/src/heap-profile-table.h",
+ "$tcmalloc_dir/src/heap-profiler.cc",
+ "$tcmalloc_dir/src/internal_logging.cc",
+ "$tcmalloc_dir/src/internal_logging.h",
+ "$tcmalloc_dir/src/linked_list.h",
+ "$tcmalloc_dir/src/malloc_extension.cc",
+ "$tcmalloc_dir/src/malloc_hook-inl.h",
+ "$tcmalloc_dir/src/malloc_hook.cc",
+ "$tcmalloc_dir/src/maybe_threads.cc",
+ "$tcmalloc_dir/src/maybe_threads.h",
+ "$tcmalloc_dir/src/memory_region_map.cc",
+ "$tcmalloc_dir/src/memory_region_map.h",
+ "$tcmalloc_dir/src/page_heap.cc",
+ "$tcmalloc_dir/src/page_heap.h",
+ "$tcmalloc_dir/src/profile-handler.cc",
+ "$tcmalloc_dir/src/profile-handler.h",
+ "$tcmalloc_dir/src/profiledata.cc",
+ "$tcmalloc_dir/src/profiledata.h",
+ "$tcmalloc_dir/src/profiler.cc",
+ "$tcmalloc_dir/src/raw_printer.cc",
+ "$tcmalloc_dir/src/raw_printer.h",
+ "$tcmalloc_dir/src/sampler.cc",
+ "$tcmalloc_dir/src/sampler.h",
+ "$tcmalloc_dir/src/span.cc",
+ "$tcmalloc_dir/src/span.h",
+ "$tcmalloc_dir/src/stack_trace_table.cc",
+ "$tcmalloc_dir/src/stack_trace_table.h",
+ "$tcmalloc_dir/src/stacktrace.cc",
+ "$tcmalloc_dir/src/static_vars.cc",
+ "$tcmalloc_dir/src/static_vars.h",
+ "$tcmalloc_dir/src/symbolize.cc",
+ "$tcmalloc_dir/src/symbolize.h",
+ "$tcmalloc_dir/src/system-alloc.cc",
+ "$tcmalloc_dir/src/system-alloc.h",
+ # #included by debugallocation_shim.cc
+ #"$tcmalloc_dir/src/tcmalloc.cc",
+ "$tcmalloc_dir/src/thread_cache.cc",
+ "$tcmalloc_dir/src/thread_cache.h",
+ "$tcmalloc_dir/src/windows/port.cc",
+ "$tcmalloc_dir/src/windows/port.h",
+
+ "allocator_shim.cc",
+ "allocator_shim.h",
+ "debugallocation_shim.cc",
+
+ # These are both #included by allocator_shim for maximal linking.
+ #"generic_allocators.cc",
+ #"win_allocator.cc",
+ ]
+
+ # Disable the heap checker in tcmalloc.
+ defines = [ "NO_HEAP_CHECK" ]
+
+ include_dirs = [
+ ".",
+ "$tcmalloc_dir/src/base",
+ "$tcmalloc_dir/src",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+
+ deps = []
+
+ if (is_win) {
+ sources -= [
+ "$tcmalloc_dir/src/base/elf_mem_image.cc",
+ "$tcmalloc_dir/src/base/elf_mem_image.h",
+ "$tcmalloc_dir/src/base/linuxthreads.cc",
+ "$tcmalloc_dir/src/base/linuxthreads.h",
+ "$tcmalloc_dir/src/base/vdso_support.cc",
+ "$tcmalloc_dir/src/base/vdso_support.h",
+ "$tcmalloc_dir/src/maybe_threads.cc",
+ "$tcmalloc_dir/src/maybe_threads.h",
+ "$tcmalloc_dir/src/symbolize.h",
+ "$tcmalloc_dir/src/system-alloc.cc",
+ "$tcmalloc_dir/src/system-alloc.h",
+
+ # included by allocator_shim.cc
+ "debugallocation_shim.cc",
+
+ # cpuprofiler
+ "$tcmalloc_dir/src/base/thread_lister.c",
+ "$tcmalloc_dir/src/base/thread_lister.h",
+ "$tcmalloc_dir/src/profiledata.cc",
+ "$tcmalloc_dir/src/profiledata.h",
+ "$tcmalloc_dir/src/profile-handler.cc",
+ "$tcmalloc_dir/src/profile-handler.h",
+ "$tcmalloc_dir/src/profiler.cc",
+ ]
+ defines += [ "PERFTOOLS_DLL_DECL=" ]
+
+ configs -= [
+ # Tcmalloc defines this itself, and we don't want duplicate definition
+ # warnings.
+ "//build/config/win:nominmax",
+ ]
+
+ direct_dependent_configs = [ ":nocmt" ]
+
+ deps += [
+ ":prep_libc",
+ ]
+ }
+
+ if (is_linux || is_android) {
+ sources -= [
+ "$tcmalloc_dir/src/system-alloc.h",
+ "$tcmalloc_dir/src/windows/port.cc",
+ "$tcmalloc_dir/src/windows/port.h",
+
+ # TODO(willchan): Support allocator shim later on.
+ "allocator_shim.cc",
+ ]
+
+ # We enable all warnings by default, but upstream disables a few.
+ # Keep "-Wno-*" flags in sync with upstream by comparing against:
+ # http://code.google.com/p/google-perftools/source/browse/trunk/Makefile.am
+ cflags = [
+ "-Wno-sign-compare",
+ "-Wno-unused-result",
+ ]
+
+ configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
+
+ ldflags = [
+ # Don't let linker rip this symbol out, otherwise the heap&cpu
+ # profilers will not initialize properly on startup.
+ "-Wl,-uIsHeapProfilerRunning,-uProfilerStart",
+ # Do the same for heap leak checker.
+ "-Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapPKvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi",
+ "-Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapPKvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl",
+ "-Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakChecker14UnIgnoreObjectEPKv",
+ ]
+ }
+
+ # Make sure the allocation library is optimized as much as possible when
+ # we"re in release mode.
+ if (!is_debug) {
+ configs -= [ "//build/config/compiler:optimize" ]
+ configs += [ "//build/config/compiler:optimize_max" ]
+ }
+
+ deps += [
+ "//base/third_party/dynamic_annotations",
+ ]
+
+ if (is_win) {
+ ldflags = [ "/ignore:4006:4221" ]
+ }
+ }
+} # !is_android
+
+source_set("allocator_extension_thunks") {
+ visibility = "//base/*"
+ sources = [
+ "allocator_extension_thunks.cc",
+ "allocator_extension_thunks.h",
+ ]
+}
diff --git a/chromium/base/allocator/allocator.gyp b/chromium/base/allocator/allocator.gyp
index 4841f58c9a4..2de3aca450f 100644
--- a/chromium/base/allocator/allocator.gyp
+++ b/chromium/base/allocator/allocator.gyp
@@ -4,7 +4,6 @@
{
'variables': {
- 'jemalloc_dir': '../../third_party/jemalloc/chromium',
'tcmalloc_dir': '../../third_party/tcmalloc/chromium',
'use_vtable_verify%': 0,
},
@@ -198,13 +197,6 @@
'<(tcmalloc_dir)/src/windows/preamble_patcher.h',
'<(tcmalloc_dir)/src/windows/preamble_patcher_with_stub.cc',
- # jemalloc files
- '<(jemalloc_dir)/jemalloc.c',
- '<(jemalloc_dir)/jemalloc.h',
- '<(jemalloc_dir)/ql.h',
- '<(jemalloc_dir)/qr.h',
- '<(jemalloc_dir)/rb.h',
-
'allocator_shim.cc',
'allocator_shim.h',
'debugallocation_shim.cc',
@@ -358,7 +350,6 @@
'libcmt',
],
'include_dirs': [
- '<(jemalloc_dir)',
'<(tcmalloc_dir)/src/windows',
],
'sources!': [
@@ -376,7 +367,10 @@
# included by allocator_shim.cc
'debugallocation_shim.cc',
-
+ ],
+ }],
+ ['OS=="win" or profiling!=1', {
+ 'sources!': [
# cpuprofiler
'<(tcmalloc_dir)/src/base/thread_lister.c',
'<(tcmalloc_dir)/src/base/thread_lister.h',
@@ -395,15 +389,6 @@
# TODO(willchan): Support allocator shim later on.
'allocator_shim.cc',
-
- # TODO(willchan): support jemalloc on other platforms
- # jemalloc files
- '<(jemalloc_dir)/jemalloc.c',
- '<(jemalloc_dir)/jemalloc.h',
- '<(jemalloc_dir)/ql.h',
- '<(jemalloc_dir)/qr.h',
- '<(jemalloc_dir)/rb.h',
-
],
# We enable all warnings by default, but upstream disables a few.
# Keep "-Wno-*" flags in sync with upstream by comparing against:
@@ -426,11 +411,6 @@
'-Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakChecker14UnIgnoreObjectEPKv',
]},
}],
- # Need to distinguish a non-SDK build for Android WebView
- # due to differences in C include files.
- ['OS=="android" and android_webview_build==1', {
- 'defines': ['ANDROID_NON_SDK_BUILD'],
- }],
[ 'use_vtable_verify==1', {
'cflags': [
'-fvtable-verify=preinit',
@@ -513,7 +493,7 @@
'../..',
],
'sources': [
- 'allocator_unittests.cc',
+ 'allocator_unittest.cc',
'../profiler/alternate_timer.cc',
'../profiler/alternate_timer.h',
],
@@ -616,7 +596,7 @@
'sources': [
'type_profiler_control.cc',
'type_profiler_control.h',
- 'type_profiler_unittests.cc',
+ 'type_profiler_unittest.cc',
],
},
{
@@ -638,7 +618,7 @@
'../..',
],
'sources': [
- 'type_profiler_map_unittests.cc',
+ 'type_profiler_map_unittest.cc',
'<(tcmalloc_dir)/src/gperftools/type_profiler_map.h',
'<(tcmalloc_dir)/src/type_profiler_map.cc',
],
diff --git a/chromium/base/allocator/allocator_shim.cc b/chromium/base/allocator/allocator_shim.cc
index 9b3b50c4ee4..c0de36e6de2 100644
--- a/chromium/base/allocator/allocator_shim.cc
+++ b/chromium/base/allocator/allocator_shim.cc
@@ -8,7 +8,6 @@
#include "base/allocator/allocator_extension_thunks.h"
#include "base/profiler/alternate_timer.h"
#include "base/sysinfo.h"
-#include "jemalloc.h"
// This shim make it possible to use different allocators via an environment
// variable set before running the program. This may reduce the
@@ -33,8 +32,7 @@ static int new_mode = 0;
typedef enum {
TCMALLOC, // TCMalloc is the default allocator.
- JEMALLOC, // JEMalloc.
- WINHEAP, // Windows Heap (standard Windows allocator).
+ WINHEAP, // Windows Heap (standard Windows allocator).
WINLFH, // Windows LFH Heap.
} Allocator;
@@ -43,8 +41,8 @@ typedef enum {
// See SetupSubprocessAllocator() to specify a default secondary (subprocess)
// allocator.
// TODO(jar): Switch to using TCMALLOC for the renderer as well.
-#if (defined(ADDRESS_SANITIZER) && defined(OS_WIN))
-// The Windows implementation of Asan requires the use of "WINHEAP".
+#if defined(SYZYASAN)
+// SyzyASan requires the use of "WINHEAP".
static Allocator allocator = WINHEAP;
#else
static Allocator allocator = TCMALLOC;
@@ -61,16 +59,6 @@ static const char secondary_name[] = "CHROME_ALLOCATOR_2";
#include "debugallocation_shim.cc"
#include "win_allocator.cc"
-// Forward declarations from jemalloc.
-extern "C" {
-void* je_malloc(size_t s);
-void* je_realloc(void* p, size_t s);
-void je_free(void* s);
-size_t je_msize(void* p);
-bool je_malloc_init_hard();
-void* je_memalign(size_t a, size_t s);
-}
-
// Call the new handler, if one has been set.
// Returns true on successfully calling the handler, false otherwise.
inline bool call_new_handler(bool nothrow) {
@@ -118,9 +106,6 @@ void* malloc(size_t size) __THROW {
void* ptr;
for (;;) {
switch (allocator) {
- case JEMALLOC:
- ptr = je_malloc(size);
- break;
case WINHEAP:
case WINLFH:
ptr = win_heap_malloc(size);
@@ -141,9 +126,6 @@ void* malloc(size_t size) __THROW {
void free(void* p) __THROW {
switch (allocator) {
- case JEMALLOC:
- je_free(p);
- return;
case WINHEAP:
case WINLFH:
win_heap_free(p);
@@ -164,9 +146,6 @@ void* realloc(void* ptr, size_t size) __THROW {
void* new_ptr;
for (;;) {
switch (allocator) {
- case JEMALLOC:
- new_ptr = je_realloc(ptr, size);
- break;
case WINHEAP:
case WINLFH:
new_ptr = win_heap_realloc(ptr, size);
@@ -191,9 +170,6 @@ void* realloc(void* ptr, size_t size) __THROW {
// TODO(mbelshe): Implement this for other allocators.
void malloc_stats(void) __THROW {
switch (allocator) {
- case JEMALLOC:
- // No stats.
- return;
case WINHEAP:
case WINLFH:
// No stats.
@@ -208,8 +184,6 @@ void malloc_stats(void) __THROW {
extern "C" size_t _msize(void* p) {
switch (allocator) {
- case JEMALLOC:
- return je_msize(p);
case WINHEAP:
case WINLFH:
return win_heap_msize(p);
@@ -226,7 +200,6 @@ extern "C" intptr_t _get_heap_handle() {
static bool get_allocator_waste_size_thunk(size_t* size) {
switch (allocator) {
- case JEMALLOC:
case WINHEAP:
case WINLFH:
// TODO(alexeif): Implement for allocators other than tcmalloc.
@@ -255,14 +228,12 @@ static void release_free_memory_thunk() {
// The CRT heap initialization stub.
extern "C" int _heap_init() {
-// Don't use the environment variable if ADDRESS_SANITIZER is defined on
-// Windows, as the implementation requires Winheap to be the allocator.
-#if !(defined(ADDRESS_SANITIZER) && defined(OS_WIN))
+// Don't use the environment variable if SYZYASAN is defined, as the
+// implementation requires Winheap to be the allocator.
+#if !defined(SYZYASAN)
const char* environment_value = GetenvBeforeMain(primary_name);
if (environment_value) {
- if (!stricmp(environment_value, "jemalloc"))
- allocator = JEMALLOC;
- else if (!stricmp(environment_value, "winheap"))
+ if (!stricmp(environment_value, "winheap"))
allocator = WINHEAP;
else if (!stricmp(environment_value, "winlfh"))
allocator = WINLFH;
@@ -272,8 +243,6 @@ extern "C" int _heap_init() {
#endif
switch (allocator) {
- case JEMALLOC:
- return je_malloc_init_hard() ? 0 : 1;
case WINHEAP:
return win_heap_init(false) ? 1 : 0;
case WINLFH:
@@ -331,9 +300,6 @@ void* _aligned_malloc(size_t size, size_t alignment) {
void* ptr;
for (;;) {
switch (allocator) {
- case JEMALLOC:
- ptr = je_memalign(alignment, size);
- break;
case WINHEAP:
case WINLFH:
ptr = win_heap_memalign(alignment, size);
@@ -357,13 +323,10 @@ void* _aligned_malloc(size_t size, size_t alignment) {
}
void _aligned_free(void* p) {
- // Both JEMalloc and TCMalloc return pointers from memalign() that are safe to
- // use with free(). Pointers allocated with win_heap_memalign() MUST be freed
- // via win_heap_memalign_free() since the aligned pointer is not the real one.
+ // TCMalloc returns pointers from memalign() that are safe to use with free().
+ // Pointers allocated with win_heap_memalign() MUST be freed via
+ // win_heap_memalign_free() since the aligned pointer is not the real one.
switch (allocator) {
- case JEMALLOC:
- je_free(p);
- return;
case WINHEAP:
case WINLFH:
win_heap_memalign_free(p);
@@ -393,9 +356,9 @@ void SetupSubprocessAllocator() {
buffer[sizeof(buffer) - 1] = '\0';
if (secondary_length || !primary_length) {
- // Don't use the environment variable if ADDRESS_SANITIZER is defined on
- // Windows, as the implementation require Winheap to be the allocator.
-#if !(defined(ADDRESS_SANITIZER) && defined(OS_WIN))
+// Don't use the environment variable if SYZYASAN is defined, as the
+// implementation require Winheap to be the allocator.
+#if !defined(SYZYASAN)
const char* secondary_value = secondary_length ? buffer : "TCMALLOC";
// Force renderer (or other subprocesses) to use secondary_value.
#else
diff --git a/chromium/base/allocator/allocator_unittest.cc b/chromium/base/allocator/allocator_unittest.cc
new file mode 100644
index 00000000000..eb20b38ab61
--- /dev/null
+++ b/chromium/base/allocator/allocator_unittest.cc
@@ -0,0 +1,520 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <algorithm> // for min()
+
+#include "base/atomicops.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+// Number of bits in a size_t.
+static const int kSizeBits = 8 * sizeof(size_t);
+// The maximum size of a size_t.
+static const size_t kMaxSize = ~static_cast<size_t>(0);
+// Maximum positive size of a size_t if it were signed.
+static const size_t kMaxSignedSize = ((size_t(1) << (kSizeBits-1)) - 1);
+// An allocation size which is not too big to be reasonable.
+static const size_t kNotTooBig = 100000;
+// An allocation size which is just too big.
+static const size_t kTooBig = ~static_cast<size_t>(0);
+
+namespace {
+
+using std::min;
+
+// Fill a buffer of the specified size with a predetermined pattern
+static void Fill(unsigned char* buffer, int n) {
+ for (int i = 0; i < n; i++) {
+ buffer[i] = (i & 0xff);
+ }
+}
+
+// Check that the specified buffer has the predetermined pattern
+// generated by Fill()
+static bool Valid(unsigned char* buffer, int n) {
+ for (int i = 0; i < n; i++) {
+ if (buffer[i] != (i & 0xff)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+// Check that a buffer is completely zeroed.
+static bool IsZeroed(unsigned char* buffer, int n) {
+ for (int i = 0; i < n; i++) {
+ if (buffer[i] != 0) {
+ return false;
+ }
+ }
+ return true;
+}
+
+// Check alignment
+static void CheckAlignment(void* p, int align) {
+ EXPECT_EQ(0, reinterpret_cast<uintptr_t>(p) & (align-1));
+}
+
+// Return the next interesting size/delta to check. Returns -1 if no more.
+static int NextSize(int size) {
+ if (size < 100)
+ return size+1;
+
+ if (size < 100000) {
+ // Find next power of two
+ int power = 1;
+ while (power < size)
+ power <<= 1;
+
+ // Yield (power-1, power, power+1)
+ if (size < power-1)
+ return power-1;
+
+ if (size == power-1)
+ return power;
+
+ assert(size == power);
+ return power+1;
+ } else {
+ return -1;
+ }
+}
+
+template <class AtomicType>
+static void TestAtomicIncrement() {
+ // For now, we just test single threaded execution
+
+ // use a guard value to make sure the NoBarrier_AtomicIncrement doesn't go
+ // outside the expected address bounds. This is in particular to
+ // test that some future change to the asm code doesn't cause the
+ // 32-bit NoBarrier_AtomicIncrement to do the wrong thing on 64-bit machines.
+ struct {
+ AtomicType prev_word;
+ AtomicType count;
+ AtomicType next_word;
+ } s;
+
+ AtomicType prev_word_value, next_word_value;
+ memset(&prev_word_value, 0xFF, sizeof(AtomicType));
+ memset(&next_word_value, 0xEE, sizeof(AtomicType));
+
+ s.prev_word = prev_word_value;
+ s.count = 0;
+ s.next_word = next_word_value;
+
+ EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, 1), 1);
+ EXPECT_EQ(s.count, 1);
+ EXPECT_EQ(s.prev_word, prev_word_value);
+ EXPECT_EQ(s.next_word, next_word_value);
+
+ EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, 2), 3);
+ EXPECT_EQ(s.count, 3);
+ EXPECT_EQ(s.prev_word, prev_word_value);
+ EXPECT_EQ(s.next_word, next_word_value);
+
+ EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, 3), 6);
+ EXPECT_EQ(s.count, 6);
+ EXPECT_EQ(s.prev_word, prev_word_value);
+ EXPECT_EQ(s.next_word, next_word_value);
+
+ EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -3), 3);
+ EXPECT_EQ(s.count, 3);
+ EXPECT_EQ(s.prev_word, prev_word_value);
+ EXPECT_EQ(s.next_word, next_word_value);
+
+ EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -2), 1);
+ EXPECT_EQ(s.count, 1);
+ EXPECT_EQ(s.prev_word, prev_word_value);
+ EXPECT_EQ(s.next_word, next_word_value);
+
+ EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -1), 0);
+ EXPECT_EQ(s.count, 0);
+ EXPECT_EQ(s.prev_word, prev_word_value);
+ EXPECT_EQ(s.next_word, next_word_value);
+
+ EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -1), -1);
+ EXPECT_EQ(s.count, -1);
+ EXPECT_EQ(s.prev_word, prev_word_value);
+ EXPECT_EQ(s.next_word, next_word_value);
+
+ EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -4), -5);
+ EXPECT_EQ(s.count, -5);
+ EXPECT_EQ(s.prev_word, prev_word_value);
+ EXPECT_EQ(s.next_word, next_word_value);
+
+ EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, 5), 0);
+ EXPECT_EQ(s.count, 0);
+ EXPECT_EQ(s.prev_word, prev_word_value);
+ EXPECT_EQ(s.next_word, next_word_value);
+}
+
+
+#define NUM_BITS(T) (sizeof(T) * 8)
+
+
+template <class AtomicType>
+static void TestCompareAndSwap() {
+ AtomicType value = 0;
+ AtomicType prev = base::subtle::NoBarrier_CompareAndSwap(&value, 0, 1);
+ EXPECT_EQ(1, value);
+ EXPECT_EQ(0, prev);
+
+ // Use test value that has non-zero bits in both halves, more for testing
+ // 64-bit implementation on 32-bit platforms.
+ const AtomicType k_test_val = (static_cast<uint64_t>(1) <<
+ (NUM_BITS(AtomicType) - 2)) + 11;
+ value = k_test_val;
+ prev = base::subtle::NoBarrier_CompareAndSwap(&value, 0, 5);
+ EXPECT_EQ(k_test_val, value);
+ EXPECT_EQ(k_test_val, prev);
+
+ value = k_test_val;
+ prev = base::subtle::NoBarrier_CompareAndSwap(&value, k_test_val, 5);
+ EXPECT_EQ(5, value);
+ EXPECT_EQ(k_test_val, prev);
+}
+
+
+template <class AtomicType>
+static void TestAtomicExchange() {
+ AtomicType value = 0;
+ AtomicType new_value = base::subtle::NoBarrier_AtomicExchange(&value, 1);
+ EXPECT_EQ(1, value);
+ EXPECT_EQ(0, new_value);
+
+ // Use test value that has non-zero bits in both halves, more for testing
+ // 64-bit implementation on 32-bit platforms.
+ const AtomicType k_test_val = (static_cast<uint64_t>(1) <<
+ (NUM_BITS(AtomicType) - 2)) + 11;
+ value = k_test_val;
+ new_value = base::subtle::NoBarrier_AtomicExchange(&value, k_test_val);
+ EXPECT_EQ(k_test_val, value);
+ EXPECT_EQ(k_test_val, new_value);
+
+ value = k_test_val;
+ new_value = base::subtle::NoBarrier_AtomicExchange(&value, 5);
+ EXPECT_EQ(5, value);
+ EXPECT_EQ(k_test_val, new_value);
+}
+
+
+template <class AtomicType>
+static void TestAtomicIncrementBounds() {
+ // Test increment at the half-width boundary of the atomic type.
+ // It is primarily for testing at the 32-bit boundary for 64-bit atomic type.
+ AtomicType test_val = static_cast<uint64_t>(1) << (NUM_BITS(AtomicType) / 2);
+ AtomicType value = test_val - 1;
+ AtomicType new_value = base::subtle::NoBarrier_AtomicIncrement(&value, 1);
+ EXPECT_EQ(test_val, value);
+ EXPECT_EQ(value, new_value);
+
+ base::subtle::NoBarrier_AtomicIncrement(&value, -1);
+ EXPECT_EQ(test_val - 1, value);
+}
+
+// This is a simple sanity check that values are correct. Not testing
+// atomicity
+template <class AtomicType>
+static void TestStore() {
+ const AtomicType kVal1 = static_cast<AtomicType>(0xa5a5a5a5a5a5a5a5LL);
+ const AtomicType kVal2 = static_cast<AtomicType>(-1);
+
+ AtomicType value;
+
+ base::subtle::NoBarrier_Store(&value, kVal1);
+ EXPECT_EQ(kVal1, value);
+ base::subtle::NoBarrier_Store(&value, kVal2);
+ EXPECT_EQ(kVal2, value);
+
+ base::subtle::Acquire_Store(&value, kVal1);
+ EXPECT_EQ(kVal1, value);
+ base::subtle::Acquire_Store(&value, kVal2);
+ EXPECT_EQ(kVal2, value);
+
+ base::subtle::Release_Store(&value, kVal1);
+ EXPECT_EQ(kVal1, value);
+ base::subtle::Release_Store(&value, kVal2);
+ EXPECT_EQ(kVal2, value);
+}
+
+// This is a simple sanity check that values are correct. Not testing
+// atomicity
+template <class AtomicType>
+static void TestLoad() {
+ const AtomicType kVal1 = static_cast<AtomicType>(0xa5a5a5a5a5a5a5a5LL);
+ const AtomicType kVal2 = static_cast<AtomicType>(-1);
+
+ AtomicType value;
+
+ value = kVal1;
+ EXPECT_EQ(kVal1, base::subtle::NoBarrier_Load(&value));
+ value = kVal2;
+ EXPECT_EQ(kVal2, base::subtle::NoBarrier_Load(&value));
+
+ value = kVal1;
+ EXPECT_EQ(kVal1, base::subtle::Acquire_Load(&value));
+ value = kVal2;
+ EXPECT_EQ(kVal2, base::subtle::Acquire_Load(&value));
+
+ value = kVal1;
+ EXPECT_EQ(kVal1, base::subtle::Release_Load(&value));
+ value = kVal2;
+ EXPECT_EQ(kVal2, base::subtle::Release_Load(&value));
+}
+
+template <class AtomicType>
+static void TestAtomicOps() {
+ TestCompareAndSwap<AtomicType>();
+ TestAtomicExchange<AtomicType>();
+ TestAtomicIncrementBounds<AtomicType>();
+ TestStore<AtomicType>();
+ TestLoad<AtomicType>();
+}
+
+static void TestCalloc(size_t n, size_t s, bool ok) {
+ char* p = reinterpret_cast<char*>(calloc(n, s));
+ if (!ok) {
+ EXPECT_EQ(NULL, p) << "calloc(n, s) should not succeed";
+ } else {
+ EXPECT_NE(reinterpret_cast<void*>(NULL), p) <<
+ "calloc(n, s) should succeed";
+ for (int i = 0; i < n*s; i++) {
+ EXPECT_EQ('\0', p[i]);
+ }
+ free(p);
+ }
+}
+
+
+// A global test counter for number of times the NewHandler is called.
+static int news_handled = 0;
+static void TestNewHandler() {
+ ++news_handled;
+ throw std::bad_alloc();
+}
+
+// Because we compile without exceptions, we expect these will not throw.
+static void TestOneNewWithoutExceptions(void* (*func)(size_t),
+ bool should_throw) {
+ // success test
+ try {
+ void* ptr = (*func)(kNotTooBig);
+ EXPECT_NE(reinterpret_cast<void*>(NULL), ptr) <<
+ "allocation should not have failed.";
+ } catch(...) {
+ EXPECT_EQ(0, 1) << "allocation threw unexpected exception.";
+ }
+
+ // failure test
+ try {
+ void* rv = (*func)(kTooBig);
+ EXPECT_EQ(NULL, rv);
+ EXPECT_FALSE(should_throw) << "allocation should have thrown.";
+ } catch(...) {
+ EXPECT_TRUE(should_throw) << "allocation threw unexpected exception.";
+ }
+}
+
+static void TestNothrowNew(void* (*func)(size_t)) {
+ news_handled = 0;
+
+ // test without new_handler:
+ std::new_handler saved_handler = std::set_new_handler(0);
+ TestOneNewWithoutExceptions(func, false);
+
+ // test with new_handler:
+ std::set_new_handler(TestNewHandler);
+ TestOneNewWithoutExceptions(func, true);
+ EXPECT_EQ(news_handled, 1) << "nothrow new_handler was not called.";
+ std::set_new_handler(saved_handler);
+}
+
+} // namespace
+
+//-----------------------------------------------------------------------------
+
+TEST(Atomics, AtomicIncrementWord) {
+ TestAtomicIncrement<AtomicWord>();
+}
+
+TEST(Atomics, AtomicIncrement32) {
+ TestAtomicIncrement<Atomic32>();
+}
+
+TEST(Atomics, AtomicOpsWord) {
+ TestAtomicIncrement<AtomicWord>();
+}
+
+TEST(Atomics, AtomicOps32) {
+ TestAtomicIncrement<Atomic32>();
+}
+
+TEST(Allocators, Malloc) {
+ // Try allocating data with a bunch of alignments and sizes
+ for (int size = 1; size < 1048576; size *= 2) {
+ unsigned char* ptr = reinterpret_cast<unsigned char*>(malloc(size));
+ CheckAlignment(ptr, 2); // Should be 2 byte aligned
+ Fill(ptr, size);
+ EXPECT_TRUE(Valid(ptr, size));
+ free(ptr);
+ }
+}
+
+TEST(Allocators, Calloc) {
+ TestCalloc(0, 0, true);
+ TestCalloc(0, 1, true);
+ TestCalloc(1, 1, true);
+ TestCalloc(1<<10, 0, true);
+ TestCalloc(1<<20, 0, true);
+ TestCalloc(0, 1<<10, true);
+ TestCalloc(0, 1<<20, true);
+ TestCalloc(1<<20, 2, true);
+ TestCalloc(2, 1<<20, true);
+ TestCalloc(1000, 1000, true);
+
+ TestCalloc(kMaxSize, 2, false);
+ TestCalloc(2, kMaxSize, false);
+ TestCalloc(kMaxSize, kMaxSize, false);
+
+ TestCalloc(kMaxSignedSize, 3, false);
+ TestCalloc(3, kMaxSignedSize, false);
+ TestCalloc(kMaxSignedSize, kMaxSignedSize, false);
+}
+
+TEST(Allocators, New) {
+ TestNothrowNew(&::operator new);
+ TestNothrowNew(&::operator new[]);
+}
+
+// This makes sure that reallocing a small number of bytes in either
+// direction doesn't cause us to allocate new memory.
+TEST(Allocators, Realloc1) {
+ int start_sizes[] = { 100, 1000, 10000, 100000 };
+ int deltas[] = { 1, -2, 4, -8, 16, -32, 64, -128 };
+
+ for (int s = 0; s < sizeof(start_sizes)/sizeof(*start_sizes); ++s) {
+ void* p = malloc(start_sizes[s]);
+ ASSERT_TRUE(p);
+ // The larger the start-size, the larger the non-reallocing delta.
+ for (int d = 0; d < s*2; ++d) {
+ void* new_p = realloc(p, start_sizes[s] + deltas[d]);
+ ASSERT_EQ(p, new_p); // realloc should not allocate new memory
+ }
+ // Test again, but this time reallocing smaller first.
+ for (int d = 0; d < s*2; ++d) {
+ void* new_p = realloc(p, start_sizes[s] - deltas[d]);
+ ASSERT_EQ(p, new_p); // realloc should not allocate new memory
+ }
+ free(p);
+ }
+}
+
+TEST(Allocators, Realloc2) {
+ for (int src_size = 0; src_size >= 0; src_size = NextSize(src_size)) {
+ for (int dst_size = 0; dst_size >= 0; dst_size = NextSize(dst_size)) {
+ unsigned char* src = reinterpret_cast<unsigned char*>(malloc(src_size));
+ Fill(src, src_size);
+ unsigned char* dst =
+ reinterpret_cast<unsigned char*>(realloc(src, dst_size));
+ EXPECT_TRUE(Valid(dst, min(src_size, dst_size)));
+ Fill(dst, dst_size);
+ EXPECT_TRUE(Valid(dst, dst_size));
+ if (dst != NULL) free(dst);
+ }
+ }
+
+ // Now make sure realloc works correctly even when we overflow the
+ // packed cache, so some entries are evicted from the cache.
+ // The cache has 2^12 entries, keyed by page number.
+ const int kNumEntries = 1 << 14;
+ int** p = reinterpret_cast<int**>(malloc(sizeof(*p) * kNumEntries));
+ int sum = 0;
+ for (int i = 0; i < kNumEntries; i++) {
+ // no page size is likely to be bigger than 8192?
+ p[i] = reinterpret_cast<int*>(malloc(8192));
+ p[i][1000] = i; // use memory deep in the heart of p
+ }
+ for (int i = 0; i < kNumEntries; i++) {
+ p[i] = reinterpret_cast<int*>(realloc(p[i], 9000));
+ }
+ for (int i = 0; i < kNumEntries; i++) {
+ sum += p[i][1000];
+ free(p[i]);
+ }
+ EXPECT_EQ(kNumEntries/2 * (kNumEntries - 1), sum); // assume kNE is even
+ free(p);
+}
+
+TEST(Allocators, ReallocZero) {
+ // Test that realloc to zero does not return NULL.
+ for (int size = 0; size >= 0; size = NextSize(size)) {
+ char* ptr = reinterpret_cast<char*>(malloc(size));
+ EXPECT_NE(static_cast<char*>(NULL), ptr);
+ ptr = reinterpret_cast<char*>(realloc(ptr, 0));
+ EXPECT_NE(static_cast<char*>(NULL), ptr);
+ if (ptr)
+ free(ptr);
+ }
+}
+
+#ifdef WIN32
+// Test recalloc
+TEST(Allocators, Recalloc) {
+ for (int src_size = 0; src_size >= 0; src_size = NextSize(src_size)) {
+ for (int dst_size = 0; dst_size >= 0; dst_size = NextSize(dst_size)) {
+ unsigned char* src =
+ reinterpret_cast<unsigned char*>(_recalloc(NULL, 1, src_size));
+ EXPECT_TRUE(IsZeroed(src, src_size));
+ Fill(src, src_size);
+ unsigned char* dst =
+ reinterpret_cast<unsigned char*>(_recalloc(src, 1, dst_size));
+ EXPECT_TRUE(Valid(dst, min(src_size, dst_size)));
+ Fill(dst, dst_size);
+ EXPECT_TRUE(Valid(dst, dst_size));
+ if (dst != NULL)
+ free(dst);
+ }
+ }
+}
+
+// Test windows specific _aligned_malloc() and _aligned_free() methods.
+TEST(Allocators, AlignedMalloc) {
+ // Try allocating data with a bunch of alignments and sizes
+ static const int kTestAlignments[] = {8, 16, 256, 4096, 8192, 16384};
+ for (int size = 1; size > 0; size = NextSize(size)) {
+ for (int i = 0; i < ARRAYSIZE(kTestAlignments); ++i) {
+ unsigned char* ptr = static_cast<unsigned char*>(
+ _aligned_malloc(size, kTestAlignments[i]));
+ CheckAlignment(ptr, kTestAlignments[i]);
+ Fill(ptr, size);
+ EXPECT_TRUE(Valid(ptr, size));
+
+ // Make a second allocation of the same size and alignment to prevent
+ // allocators from passing this test by accident. Per jar, tcmalloc
+ // provides allocations for new (never before seen) sizes out of a thread
+ // local heap of a given "size class." Each time the test requests a new
+ // size, it will usually get the first element of a span, which is a
+ // 4K aligned allocation.
+ unsigned char* ptr2 = static_cast<unsigned char*>(
+ _aligned_malloc(size, kTestAlignments[i]));
+ CheckAlignment(ptr2, kTestAlignments[i]);
+ Fill(ptr2, size);
+ EXPECT_TRUE(Valid(ptr2, size));
+
+ // Should never happen, but sanity check just in case.
+ ASSERT_NE(ptr, ptr2);
+ _aligned_free(ptr);
+ _aligned_free(ptr2);
+ }
+ }
+}
+
+#endif
+
+
+int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/chromium/base/allocator/allocator_unittests.cc b/chromium/base/allocator/allocator_unittests.cc
deleted file mode 100644
index cf8b74d7f4e..00000000000
--- a/chromium/base/allocator/allocator_unittests.cc
+++ /dev/null
@@ -1,521 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <algorithm> // for min()
-#include "base/atomicops.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-// Number of bits in a size_t.
-static const int kSizeBits = 8 * sizeof(size_t);
-// The maximum size of a size_t.
-static const size_t kMaxSize = ~static_cast<size_t>(0);
-// Maximum positive size of a size_t if it were signed.
-static const size_t kMaxSignedSize = ((size_t(1) << (kSizeBits-1)) - 1);
-// An allocation size which is not too big to be reasonable.
-static const size_t kNotTooBig = 100000;
-// An allocation size which is just too big.
-static const size_t kTooBig = ~static_cast<size_t>(0);
-
-namespace {
-
-using std::min;
-
-// Fill a buffer of the specified size with a predetermined pattern
-static void Fill(unsigned char* buffer, int n) {
- for (int i = 0; i < n; i++) {
- buffer[i] = (i & 0xff);
- }
-}
-
-// Check that the specified buffer has the predetermined pattern
-// generated by Fill()
-static bool Valid(unsigned char* buffer, int n) {
- for (int i = 0; i < n; i++) {
- if (buffer[i] != (i & 0xff)) {
- return false;
- }
- }
- return true;
-}
-
-// Check that a buffer is completely zeroed.
-static bool IsZeroed(unsigned char* buffer, int n) {
- for (int i = 0; i < n; i++) {
- if (buffer[i] != 0) {
- return false;
- }
- }
- return true;
-}
-
-// Check alignment
-static void CheckAlignment(void* p, int align) {
- EXPECT_EQ(0, reinterpret_cast<uintptr_t>(p) & (align-1));
-}
-
-// Return the next interesting size/delta to check. Returns -1 if no more.
-static int NextSize(int size) {
- if (size < 100)
- return size+1;
-
- if (size < 100000) {
- // Find next power of two
- int power = 1;
- while (power < size)
- power <<= 1;
-
- // Yield (power-1, power, power+1)
- if (size < power-1)
- return power-1;
-
- if (size == power-1)
- return power;
-
- assert(size == power);
- return power+1;
- } else {
- return -1;
- }
-}
-
-#define GG_ULONGLONG(x) static_cast<uint64>(x)
-
-template <class AtomicType>
-static void TestAtomicIncrement() {
- // For now, we just test single threaded execution
-
- // use a guard value to make sure the NoBarrier_AtomicIncrement doesn't go
- // outside the expected address bounds. This is in particular to
- // test that some future change to the asm code doesn't cause the
- // 32-bit NoBarrier_AtomicIncrement to do the wrong thing on 64-bit machines.
- struct {
- AtomicType prev_word;
- AtomicType count;
- AtomicType next_word;
- } s;
-
- AtomicType prev_word_value, next_word_value;
- memset(&prev_word_value, 0xFF, sizeof(AtomicType));
- memset(&next_word_value, 0xEE, sizeof(AtomicType));
-
- s.prev_word = prev_word_value;
- s.count = 0;
- s.next_word = next_word_value;
-
- EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, 1), 1);
- EXPECT_EQ(s.count, 1);
- EXPECT_EQ(s.prev_word, prev_word_value);
- EXPECT_EQ(s.next_word, next_word_value);
-
- EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, 2), 3);
- EXPECT_EQ(s.count, 3);
- EXPECT_EQ(s.prev_word, prev_word_value);
- EXPECT_EQ(s.next_word, next_word_value);
-
- EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, 3), 6);
- EXPECT_EQ(s.count, 6);
- EXPECT_EQ(s.prev_word, prev_word_value);
- EXPECT_EQ(s.next_word, next_word_value);
-
- EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -3), 3);
- EXPECT_EQ(s.count, 3);
- EXPECT_EQ(s.prev_word, prev_word_value);
- EXPECT_EQ(s.next_word, next_word_value);
-
- EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -2), 1);
- EXPECT_EQ(s.count, 1);
- EXPECT_EQ(s.prev_word, prev_word_value);
- EXPECT_EQ(s.next_word, next_word_value);
-
- EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -1), 0);
- EXPECT_EQ(s.count, 0);
- EXPECT_EQ(s.prev_word, prev_word_value);
- EXPECT_EQ(s.next_word, next_word_value);
-
- EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -1), -1);
- EXPECT_EQ(s.count, -1);
- EXPECT_EQ(s.prev_word, prev_word_value);
- EXPECT_EQ(s.next_word, next_word_value);
-
- EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -4), -5);
- EXPECT_EQ(s.count, -5);
- EXPECT_EQ(s.prev_word, prev_word_value);
- EXPECT_EQ(s.next_word, next_word_value);
-
- EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, 5), 0);
- EXPECT_EQ(s.count, 0);
- EXPECT_EQ(s.prev_word, prev_word_value);
- EXPECT_EQ(s.next_word, next_word_value);
-}
-
-
-#define NUM_BITS(T) (sizeof(T) * 8)
-
-
-template <class AtomicType>
-static void TestCompareAndSwap() {
- AtomicType value = 0;
- AtomicType prev = base::subtle::NoBarrier_CompareAndSwap(&value, 0, 1);
- EXPECT_EQ(1, value);
- EXPECT_EQ(0, prev);
-
- // Use test value that has non-zero bits in both halves, more for testing
- // 64-bit implementation on 32-bit platforms.
- const AtomicType k_test_val = (GG_ULONGLONG(1) <<
- (NUM_BITS(AtomicType) - 2)) + 11;
- value = k_test_val;
- prev = base::subtle::NoBarrier_CompareAndSwap(&value, 0, 5);
- EXPECT_EQ(k_test_val, value);
- EXPECT_EQ(k_test_val, prev);
-
- value = k_test_val;
- prev = base::subtle::NoBarrier_CompareAndSwap(&value, k_test_val, 5);
- EXPECT_EQ(5, value);
- EXPECT_EQ(k_test_val, prev);
-}
-
-
-template <class AtomicType>
-static void TestAtomicExchange() {
- AtomicType value = 0;
- AtomicType new_value = base::subtle::NoBarrier_AtomicExchange(&value, 1);
- EXPECT_EQ(1, value);
- EXPECT_EQ(0, new_value);
-
- // Use test value that has non-zero bits in both halves, more for testing
- // 64-bit implementation on 32-bit platforms.
- const AtomicType k_test_val = (GG_ULONGLONG(1) <<
- (NUM_BITS(AtomicType) - 2)) + 11;
- value = k_test_val;
- new_value = base::subtle::NoBarrier_AtomicExchange(&value, k_test_val);
- EXPECT_EQ(k_test_val, value);
- EXPECT_EQ(k_test_val, new_value);
-
- value = k_test_val;
- new_value = base::subtle::NoBarrier_AtomicExchange(&value, 5);
- EXPECT_EQ(5, value);
- EXPECT_EQ(k_test_val, new_value);
-}
-
-
-template <class AtomicType>
-static void TestAtomicIncrementBounds() {
- // Test increment at the half-width boundary of the atomic type.
- // It is primarily for testing at the 32-bit boundary for 64-bit atomic type.
- AtomicType test_val = GG_ULONGLONG(1) << (NUM_BITS(AtomicType) / 2);
- AtomicType value = test_val - 1;
- AtomicType new_value = base::subtle::NoBarrier_AtomicIncrement(&value, 1);
- EXPECT_EQ(test_val, value);
- EXPECT_EQ(value, new_value);
-
- base::subtle::NoBarrier_AtomicIncrement(&value, -1);
- EXPECT_EQ(test_val - 1, value);
-}
-
-// This is a simple sanity check that values are correct. Not testing
-// atomicity
-template <class AtomicType>
-static void TestStore() {
- const AtomicType kVal1 = static_cast<AtomicType>(0xa5a5a5a5a5a5a5a5LL);
- const AtomicType kVal2 = static_cast<AtomicType>(-1);
-
- AtomicType value;
-
- base::subtle::NoBarrier_Store(&value, kVal1);
- EXPECT_EQ(kVal1, value);
- base::subtle::NoBarrier_Store(&value, kVal2);
- EXPECT_EQ(kVal2, value);
-
- base::subtle::Acquire_Store(&value, kVal1);
- EXPECT_EQ(kVal1, value);
- base::subtle::Acquire_Store(&value, kVal2);
- EXPECT_EQ(kVal2, value);
-
- base::subtle::Release_Store(&value, kVal1);
- EXPECT_EQ(kVal1, value);
- base::subtle::Release_Store(&value, kVal2);
- EXPECT_EQ(kVal2, value);
-}
-
-// This is a simple sanity check that values are correct. Not testing
-// atomicity
-template <class AtomicType>
-static void TestLoad() {
- const AtomicType kVal1 = static_cast<AtomicType>(0xa5a5a5a5a5a5a5a5LL);
- const AtomicType kVal2 = static_cast<AtomicType>(-1);
-
- AtomicType value;
-
- value = kVal1;
- EXPECT_EQ(kVal1, base::subtle::NoBarrier_Load(&value));
- value = kVal2;
- EXPECT_EQ(kVal2, base::subtle::NoBarrier_Load(&value));
-
- value = kVal1;
- EXPECT_EQ(kVal1, base::subtle::Acquire_Load(&value));
- value = kVal2;
- EXPECT_EQ(kVal2, base::subtle::Acquire_Load(&value));
-
- value = kVal1;
- EXPECT_EQ(kVal1, base::subtle::Release_Load(&value));
- value = kVal2;
- EXPECT_EQ(kVal2, base::subtle::Release_Load(&value));
-}
-
-template <class AtomicType>
-static void TestAtomicOps() {
- TestCompareAndSwap<AtomicType>();
- TestAtomicExchange<AtomicType>();
- TestAtomicIncrementBounds<AtomicType>();
- TestStore<AtomicType>();
- TestLoad<AtomicType>();
-}
-
-static void TestCalloc(size_t n, size_t s, bool ok) {
- char* p = reinterpret_cast<char*>(calloc(n, s));
- if (!ok) {
- EXPECT_EQ(NULL, p) << "calloc(n, s) should not succeed";
- } else {
- EXPECT_NE(reinterpret_cast<void*>(NULL), p) <<
- "calloc(n, s) should succeed";
- for (int i = 0; i < n*s; i++) {
- EXPECT_EQ('\0', p[i]);
- }
- free(p);
- }
-}
-
-
-// A global test counter for number of times the NewHandler is called.
-static int news_handled = 0;
-static void TestNewHandler() {
- ++news_handled;
- throw std::bad_alloc();
-}
-
-// Because we compile without exceptions, we expect these will not throw.
-static void TestOneNewWithoutExceptions(void* (*func)(size_t),
- bool should_throw) {
- // success test
- try {
- void* ptr = (*func)(kNotTooBig);
- EXPECT_NE(reinterpret_cast<void*>(NULL), ptr) <<
- "allocation should not have failed.";
- } catch(...) {
- EXPECT_EQ(0, 1) << "allocation threw unexpected exception.";
- }
-
- // failure test
- try {
- void* rv = (*func)(kTooBig);
- EXPECT_EQ(NULL, rv);
- EXPECT_FALSE(should_throw) << "allocation should have thrown.";
- } catch(...) {
- EXPECT_TRUE(should_throw) << "allocation threw unexpected exception.";
- }
-}
-
-static void TestNothrowNew(void* (*func)(size_t)) {
- news_handled = 0;
-
- // test without new_handler:
- std::new_handler saved_handler = std::set_new_handler(0);
- TestOneNewWithoutExceptions(func, false);
-
- // test with new_handler:
- std::set_new_handler(TestNewHandler);
- TestOneNewWithoutExceptions(func, true);
- EXPECT_EQ(news_handled, 1) << "nothrow new_handler was not called.";
- std::set_new_handler(saved_handler);
-}
-
-} // namespace
-
-//-----------------------------------------------------------------------------
-
-TEST(Atomics, AtomicIncrementWord) {
- TestAtomicIncrement<AtomicWord>();
-}
-
-TEST(Atomics, AtomicIncrement32) {
- TestAtomicIncrement<Atomic32>();
-}
-
-TEST(Atomics, AtomicOpsWord) {
- TestAtomicIncrement<AtomicWord>();
-}
-
-TEST(Atomics, AtomicOps32) {
- TestAtomicIncrement<Atomic32>();
-}
-
-TEST(Allocators, Malloc) {
- // Try allocating data with a bunch of alignments and sizes
- for (int size = 1; size < 1048576; size *= 2) {
- unsigned char* ptr = reinterpret_cast<unsigned char*>(malloc(size));
- CheckAlignment(ptr, 2); // Should be 2 byte aligned
- Fill(ptr, size);
- EXPECT_TRUE(Valid(ptr, size));
- free(ptr);
- }
-}
-
-TEST(Allocators, Calloc) {
- TestCalloc(0, 0, true);
- TestCalloc(0, 1, true);
- TestCalloc(1, 1, true);
- TestCalloc(1<<10, 0, true);
- TestCalloc(1<<20, 0, true);
- TestCalloc(0, 1<<10, true);
- TestCalloc(0, 1<<20, true);
- TestCalloc(1<<20, 2, true);
- TestCalloc(2, 1<<20, true);
- TestCalloc(1000, 1000, true);
-
- TestCalloc(kMaxSize, 2, false);
- TestCalloc(2, kMaxSize, false);
- TestCalloc(kMaxSize, kMaxSize, false);
-
- TestCalloc(kMaxSignedSize, 3, false);
- TestCalloc(3, kMaxSignedSize, false);
- TestCalloc(kMaxSignedSize, kMaxSignedSize, false);
-}
-
-TEST(Allocators, New) {
- TestNothrowNew(&::operator new);
- TestNothrowNew(&::operator new[]);
-}
-
-// This makes sure that reallocing a small number of bytes in either
-// direction doesn't cause us to allocate new memory.
-TEST(Allocators, Realloc1) {
- int start_sizes[] = { 100, 1000, 10000, 100000 };
- int deltas[] = { 1, -2, 4, -8, 16, -32, 64, -128 };
-
- for (int s = 0; s < sizeof(start_sizes)/sizeof(*start_sizes); ++s) {
- void* p = malloc(start_sizes[s]);
- ASSERT_TRUE(p);
- // The larger the start-size, the larger the non-reallocing delta.
- for (int d = 0; d < s*2; ++d) {
- void* new_p = realloc(p, start_sizes[s] + deltas[d]);
- ASSERT_EQ(p, new_p); // realloc should not allocate new memory
- }
- // Test again, but this time reallocing smaller first.
- for (int d = 0; d < s*2; ++d) {
- void* new_p = realloc(p, start_sizes[s] - deltas[d]);
- ASSERT_EQ(p, new_p); // realloc should not allocate new memory
- }
- free(p);
- }
-}
-
-TEST(Allocators, Realloc2) {
- for (int src_size = 0; src_size >= 0; src_size = NextSize(src_size)) {
- for (int dst_size = 0; dst_size >= 0; dst_size = NextSize(dst_size)) {
- unsigned char* src = reinterpret_cast<unsigned char*>(malloc(src_size));
- Fill(src, src_size);
- unsigned char* dst =
- reinterpret_cast<unsigned char*>(realloc(src, dst_size));
- EXPECT_TRUE(Valid(dst, min(src_size, dst_size)));
- Fill(dst, dst_size);
- EXPECT_TRUE(Valid(dst, dst_size));
- if (dst != NULL) free(dst);
- }
- }
-
- // Now make sure realloc works correctly even when we overflow the
- // packed cache, so some entries are evicted from the cache.
- // The cache has 2^12 entries, keyed by page number.
- const int kNumEntries = 1 << 14;
- int** p = reinterpret_cast<int**>(malloc(sizeof(*p) * kNumEntries));
- int sum = 0;
- for (int i = 0; i < kNumEntries; i++) {
- // no page size is likely to be bigger than 8192?
- p[i] = reinterpret_cast<int*>(malloc(8192));
- p[i][1000] = i; // use memory deep in the heart of p
- }
- for (int i = 0; i < kNumEntries; i++) {
- p[i] = reinterpret_cast<int*>(realloc(p[i], 9000));
- }
- for (int i = 0; i < kNumEntries; i++) {
- sum += p[i][1000];
- free(p[i]);
- }
- EXPECT_EQ(kNumEntries/2 * (kNumEntries - 1), sum); // assume kNE is even
- free(p);
-}
-
-TEST(Allocators, ReallocZero) {
- // Test that realloc to zero does not return NULL.
- for (int size = 0; size >= 0; size = NextSize(size)) {
- char* ptr = reinterpret_cast<char*>(malloc(size));
- EXPECT_NE(static_cast<char*>(NULL), ptr);
- ptr = reinterpret_cast<char*>(realloc(ptr, 0));
- EXPECT_NE(static_cast<char*>(NULL), ptr);
- if (ptr)
- free(ptr);
- }
-}
-
-#ifdef WIN32
-// Test recalloc
-TEST(Allocators, Recalloc) {
- for (int src_size = 0; src_size >= 0; src_size = NextSize(src_size)) {
- for (int dst_size = 0; dst_size >= 0; dst_size = NextSize(dst_size)) {
- unsigned char* src =
- reinterpret_cast<unsigned char*>(_recalloc(NULL, 1, src_size));
- EXPECT_TRUE(IsZeroed(src, src_size));
- Fill(src, src_size);
- unsigned char* dst =
- reinterpret_cast<unsigned char*>(_recalloc(src, 1, dst_size));
- EXPECT_TRUE(Valid(dst, min(src_size, dst_size)));
- Fill(dst, dst_size);
- EXPECT_TRUE(Valid(dst, dst_size));
- if (dst != NULL)
- free(dst);
- }
- }
-}
-
-// Test windows specific _aligned_malloc() and _aligned_free() methods.
-TEST(Allocators, AlignedMalloc) {
- // Try allocating data with a bunch of alignments and sizes
- static const int kTestAlignments[] = {8, 16, 256, 4096, 8192, 16384};
- for (int size = 1; size > 0; size = NextSize(size)) {
- for (int i = 0; i < ARRAYSIZE(kTestAlignments); ++i) {
- unsigned char* ptr = static_cast<unsigned char*>(
- _aligned_malloc(size, kTestAlignments[i]));
- CheckAlignment(ptr, kTestAlignments[i]);
- Fill(ptr, size);
- EXPECT_TRUE(Valid(ptr, size));
-
- // Make a second allocation of the same size and alignment to prevent
- // allocators from passing this test by accident. Per jar, tcmalloc
- // provides allocations for new (never before seen) sizes out of a thread
- // local heap of a given "size class." Each time the test requests a new
- // size, it will usually get the first element of a span, which is a
- // 4K aligned allocation.
- unsigned char* ptr2 = static_cast<unsigned char*>(
- _aligned_malloc(size, kTestAlignments[i]));
- CheckAlignment(ptr2, kTestAlignments[i]);
- Fill(ptr2, size);
- EXPECT_TRUE(Valid(ptr2, size));
-
- // Should never happen, but sanity check just in case.
- ASSERT_NE(ptr, ptr2);
- _aligned_free(ptr);
- _aligned_free(ptr2);
- }
- }
-}
-
-#endif
-
-
-int main(int argc, char** argv) {
- testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
-}
diff --git a/chromium/base/allocator/prep_libc.py b/chromium/base/allocator/prep_libc.py
index ba25cea092f..471140cb548 100755
--- a/chromium/base/allocator/prep_libc.py
+++ b/chromium/base/allocator/prep_libc.py
@@ -12,7 +12,7 @@
# VCLibDir is the path where VC is installed, something like:
# C:\Program Files\Microsoft Visual Studio 8\VC\lib
# OutputDir is the directory where the modified libcmt file should be stored.
-# arch is either 'ia32' or 'x64'
+# arch is one of: 'ia32', 'x86' or 'x64'. ia32 and x86 are synonyms.
import os
import shutil
diff --git a/chromium/base/allocator/type_profiler_map_unittest.cc b/chromium/base/allocator/type_profiler_map_unittest.cc
new file mode 100644
index 00000000000..514ec164e81
--- /dev/null
+++ b/chromium/base/allocator/type_profiler_map_unittest.cc
@@ -0,0 +1,99 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This is a unittest set for type_profiler_map in third_party/tcmalloc. It is
+// independent from other tests and executed manually like allocator_unittests
+// since type_profiler_map is a singleton (like TCMalloc's heap-profiler), and
+// it requires RTTI and different compiling/linking options from others.
+
+#if defined(TYPE_PROFILING)
+
+#include "base/memory/scoped_ptr.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/tcmalloc/chromium/src/gperftools/type_profiler_map.h"
+
+namespace base {
+namespace type_profiler {
+
+static const void* const g_const_null = static_cast<const void*>(NULL);
+
+TEST(TypeProfilerMapTest, NormalOperation) {
+ // Allocate an object just to get a valid address.
+ // This 'new' is not profiled by type_profiler.
+ scoped_ptr<int> dummy(new int(48));
+ const std::type_info* type;
+
+ type = LookupType(dummy.get());
+ EXPECT_EQ(g_const_null, type);
+
+ InsertType(dummy.get(), 12, typeid(int));
+ type = LookupType(dummy.get());
+ ASSERT_NE(g_const_null, type);
+ EXPECT_STREQ(typeid(int).name(), type->name());
+
+ EraseType(dummy.get());
+ type = LookupType(dummy.get());
+ EXPECT_EQ(g_const_null, type);
+}
+
+TEST(TypeProfilerMapTest, EraseWithoutInsert) {
+ scoped_ptr<int> dummy(new int(48));
+ const std::type_info* type;
+
+ for (int i = 0; i < 10; ++i) {
+ EraseType(dummy.get());
+ type = LookupType(dummy.get());
+ EXPECT_EQ(g_const_null, type);
+ }
+}
+
+TEST(TypeProfilerMapTest, InsertThenMultipleErase) {
+ scoped_ptr<int> dummy(new int(48));
+ const std::type_info* type;
+
+ InsertType(dummy.get(), 12, typeid(int));
+ type = LookupType(dummy.get());
+ ASSERT_NE(g_const_null, type);
+ EXPECT_STREQ(typeid(int).name(), type->name());
+
+ for (int i = 0; i < 10; ++i) {
+ EraseType(dummy.get());
+ type = LookupType(dummy.get());
+ EXPECT_EQ(g_const_null, type);
+ }
+}
+
+TEST(TypeProfilerMapTest, MultipleInsertWithoutErase) {
+ scoped_ptr<int> dummy(new int(48));
+ const std::type_info* type;
+
+ InsertType(dummy.get(), 12, typeid(int));
+ type = LookupType(dummy.get());
+ ASSERT_NE(g_const_null, type);
+ EXPECT_STREQ(typeid(int).name(), type->name());
+
+ InsertType(dummy.get(), 5, typeid(char));
+ type = LookupType(dummy.get());
+ ASSERT_NE(g_const_null, type);
+ EXPECT_STREQ(typeid(char).name(), type->name());
+
+ InsertType(dummy.get(), 129, typeid(long));
+ type = LookupType(dummy.get());
+ ASSERT_NE(g_const_null, type);
+ EXPECT_STREQ(typeid(long).name(), type->name());
+
+ EraseType(dummy.get());
+ type = LookupType(dummy.get());
+ EXPECT_EQ(g_const_null, type);
+}
+
+} // namespace type_profiler
+} // namespace base
+
+#endif // defined(TYPE_PROFILING)
+
+int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/chromium/base/allocator/type_profiler_map_unittests.cc b/chromium/base/allocator/type_profiler_map_unittests.cc
deleted file mode 100644
index 5ac5dd0c26f..00000000000
--- a/chromium/base/allocator/type_profiler_map_unittests.cc
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This is a unittest set for type_profiler_map in third_party/tcmalloc. It is
-// independent from other tests and executed manually like allocator_unittests
-// since type_profiler_map is a singleton (like TCMalloc's heap-profiler), and
-// it requires RTTI and different compiling/linking options from others.
-
-#if defined(TYPE_PROFILING)
-
-#include "base/memory/scoped_ptr.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/tcmalloc/chromium/src/gperftools/type_profiler_map.h"
-
-namespace base {
-namespace type_profiler {
-
-static const void* const g_const_null = static_cast<const void*>(NULL);
-
-TEST(TypeProfilerMapTest, NormalOperation) {
- // Allocate an object just to get a valid address.
- // This 'new' is not profiled by type_profiler.
- scoped_ptr<int> dummy(new int(48));
- const std::type_info* type;
-
- type = LookupType(dummy.get());
- EXPECT_EQ(g_const_null, type);
-
- InsertType(dummy.get(), 12, typeid(int));
- type = LookupType(dummy.get());
- ASSERT_NE(g_const_null, type);
- EXPECT_STREQ(typeid(int).name(), type->name());
-
- EraseType(dummy.get());
- type = LookupType(dummy.get());
- EXPECT_EQ(g_const_null, type);
-}
-
-TEST(TypeProfilerMapTest, EraseWithoutInsert) {
- scoped_ptr<int> dummy(new int(48));
- const std::type_info* type;
-
- for (int i = 0; i < 10; ++i) {
- EraseType(dummy.get());
- type = LookupType(dummy.get());
- EXPECT_EQ(g_const_null, type);
- }
-}
-
-TEST(TypeProfilerMapTest, InsertThenMultipleErase) {
- scoped_ptr<int> dummy(new int(48));
- const std::type_info* type;
-
- InsertType(dummy.get(), 12, typeid(int));
- type = LookupType(dummy.get());
- ASSERT_NE(g_const_null, type);
- EXPECT_STREQ(typeid(int).name(), type->name());
-
- for (int i = 0; i < 10; ++i) {
- EraseType(dummy.get());
- type = LookupType(dummy.get());
- EXPECT_EQ(g_const_null, type);
- }
-}
-
-TEST(TypeProfilerMapTest, MultipleInsertWithoutErase) {
- scoped_ptr<int> dummy(new int(48));
- const std::type_info* type;
-
- InsertType(dummy.get(), 12, typeid(int));
- type = LookupType(dummy.get());
- ASSERT_NE(g_const_null, type);
- EXPECT_STREQ(typeid(int).name(), type->name());
-
- InsertType(dummy.get(), 5, typeid(char));
- type = LookupType(dummy.get());
- ASSERT_NE(g_const_null, type);
- EXPECT_STREQ(typeid(char).name(), type->name());
-
- InsertType(dummy.get(), 129, typeid(long));
- type = LookupType(dummy.get());
- ASSERT_NE(g_const_null, type);
- EXPECT_STREQ(typeid(long).name(), type->name());
-
- EraseType(dummy.get());
- type = LookupType(dummy.get());
- EXPECT_EQ(g_const_null, type);
-}
-
-} // namespace type_profiler
-} // namespace base
-
-#endif // defined(TYPE_PROFILING)
-
-int main(int argc, char** argv) {
- testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
-}
diff --git a/chromium/base/allocator/type_profiler_unittest.cc b/chromium/base/allocator/type_profiler_unittest.cc
new file mode 100644
index 00000000000..3d7369c3802
--- /dev/null
+++ b/chromium/base/allocator/type_profiler_unittest.cc
@@ -0,0 +1,189 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This is a unittest set for type_profiler. It is independent from other
+// tests and executed manually like allocator_unittests since type_profiler_map
+// used in type_profiler is a singleton (like TCMalloc's heap-profiler), and
+// it requires RTTI and different compiling/linking options from others
+//
+// It tests that the profiler doesn't fail in suspicous cases. For example,
+// 'new' is not profiled, but 'delete' for the created object is profiled.
+
+#if defined(TYPE_PROFILING)
+
+#include "base/allocator/type_profiler.h"
+#include "base/allocator/type_profiler_control.h"
+#include "base/allocator/type_profiler_tcmalloc.h"
+#include "base/basictypes.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/tcmalloc/chromium/src/gperftools/type_profiler_map.h"
+
+namespace base {
+namespace type_profiler {
+
+class TypeProfilerTest : public testing::Test {
+ public:
+ TypeProfilerTest() {}
+
+ void SetInterceptFunctions() {
+ InterceptFunctions::SetFunctions(NewInterceptForTCMalloc,
+ DeleteInterceptForTCMalloc);
+ }
+
+ void ResetInterceptFunctions() {
+ InterceptFunctions::ResetFunctions();
+ }
+
+ void SetUp() {
+ SetInterceptFunctions();
+ }
+
+ void TearDown() {
+ ResetInterceptFunctions();
+ }
+
+ protected:
+ static const size_t kDummyArraySize;
+ static const void* const kConstNull;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TypeProfilerTest);
+};
+
+const size_t TypeProfilerTest::kDummyArraySize = 10;
+const void* const TypeProfilerTest::kConstNull = static_cast<const void*>(NULL);
+
+TEST_F(TypeProfilerTest, TestNormalProfiling) {
+ int* dummy = new int(48);
+ const std::type_info* type;
+
+ type = LookupType(dummy);
+ ASSERT_NE(kConstNull, type);
+ EXPECT_STREQ(typeid(int).name(), type->name());
+ delete dummy;
+
+ type = LookupType(dummy);
+ EXPECT_EQ(kConstNull, type);
+}
+
+TEST_F(TypeProfilerTest, TestNormalArrayProfiling) {
+ int* dummy = new int[kDummyArraySize];
+ const std::type_info* type;
+
+ type = LookupType(dummy);
+ ASSERT_NE(kConstNull, type);
+ // For an array, the profiler remembers its base type.
+ EXPECT_STREQ(typeid(int).name(), type->name());
+ delete[] dummy;
+
+ type = LookupType(dummy);
+ EXPECT_EQ(kConstNull, type);
+}
+
+TEST_F(TypeProfilerTest, TestRepeatedNewAndDelete) {
+ int *dummy[kDummyArraySize];
+ const std::type_info* type;
+ for (int i = 0; i < kDummyArraySize; ++i)
+ dummy[i] = new int(i);
+
+ for (int i = 0; i < kDummyArraySize; ++i) {
+ type = LookupType(dummy[i]);
+ ASSERT_NE(kConstNull, type);
+ EXPECT_STREQ(typeid(int).name(), type->name());
+ }
+
+ for (int i = 0; i < kDummyArraySize; ++i) {
+ delete dummy[i];
+ type = LookupType(dummy[i]);
+ ASSERT_EQ(kConstNull, type);
+ }
+}
+
+TEST_F(TypeProfilerTest, TestMultipleNewWithDroppingDelete) {
+ static const size_t large_size = 256 * 1024;
+
+ char* dummy_char = new char[large_size / sizeof(*dummy_char)];
+ const std::type_info* type;
+
+ type = LookupType(dummy_char);
+ ASSERT_NE(kConstNull, type);
+ EXPECT_STREQ(typeid(char).name(), type->name());
+
+ // Call "::operator delete" directly to drop __op_delete_intercept__.
+ ::operator delete[](dummy_char);
+
+ type = LookupType(dummy_char);
+ ASSERT_NE(kConstNull, type);
+ EXPECT_STREQ(typeid(char).name(), type->name());
+
+ // Allocates a little different size.
+ int* dummy_int = new int[large_size / sizeof(*dummy_int) - 1];
+
+ // We expect that tcmalloc returns the same address for these large (over 32k)
+ // allocation calls. It usually happens, but maybe probablistic.
+ ASSERT_EQ(static_cast<void*>(dummy_char), static_cast<void*>(dummy_int)) <<
+ "two new (malloc) calls didn't return the same address; retry it.";
+
+ type = LookupType(dummy_int);
+ ASSERT_NE(kConstNull, type);
+ EXPECT_STREQ(typeid(int).name(), type->name());
+
+ delete[] dummy_int;
+
+ type = LookupType(dummy_int);
+ EXPECT_EQ(kConstNull, type);
+}
+
+TEST_F(TypeProfilerTest, TestProfileDeleteWithoutProfiledNew) {
+ // 'dummy' should be new'ed in this test before intercept functions are set.
+ ResetInterceptFunctions();
+
+ int* dummy = new int(48);
+ const std::type_info* type;
+
+ // Set intercept functions again after 'dummy' is new'ed.
+ SetInterceptFunctions();
+
+ delete dummy;
+
+ type = LookupType(dummy);
+ EXPECT_EQ(kConstNull, type);
+
+ ResetInterceptFunctions();
+}
+
+TEST_F(TypeProfilerTest, TestProfileNewWithoutProfiledDelete) {
+ int* dummy = new int(48);
+ const std::type_info* type;
+
+ EXPECT_TRUE(Controller::IsProfiling());
+
+ // Stop profiling before deleting 'dummy'.
+ Controller::Stop();
+ EXPECT_FALSE(Controller::IsProfiling());
+
+ delete dummy;
+
+ // NOTE: We accept that a profile entry remains when a profiled object is
+ // deleted after Controller::Stop().
+ type = LookupType(dummy);
+ ASSERT_NE(kConstNull, type);
+ EXPECT_STREQ(typeid(int).name(), type->name());
+
+ Controller::Restart();
+ EXPECT_TRUE(Controller::IsProfiling());
+
+ // Remove manually since 'dummy' is not removed from type_profiler_map.
+ EraseType(dummy);
+}
+
+} // namespace type_profiler
+} // namespace base
+
+#endif // defined(TYPE_PROFILING)
+
+int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/chromium/base/allocator/type_profiler_unittests.cc b/chromium/base/allocator/type_profiler_unittests.cc
deleted file mode 100644
index e8f06eddd61..00000000000
--- a/chromium/base/allocator/type_profiler_unittests.cc
+++ /dev/null
@@ -1,189 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This is a unittest set for type_profiler. It is independent from other
-// tests and executed manually like allocator_unittests since type_profiler_map
-// used in type_profiler is a singleton (like TCMalloc's heap-profiler), and
-// it requires RTTI and different compiling/linking options from others
-//
-// It tests that the profiler doesn't fail in suspicous cases. For example,
-// 'new' is not profiled, but 'delete' for the created object is profiled.
-
-#if defined(TYPE_PROFILING)
-
-#include "base/allocator/type_profiler.h"
-#include "base/allocator/type_profiler_control.h"
-#include "base/allocator/type_profiler_tcmalloc.h"
-#include "base/basictypes.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/tcmalloc/chromium/src/gperftools/type_profiler_map.h"
-
-namespace base {
-namespace type_profiler {
-
-class TypeProfilerTest : public testing::Test {
- public:
- TypeProfilerTest() {}
-
- void SetInterceptFunctions() {
- InterceptFunctions::SetFunctions(NewInterceptForTCMalloc,
- DeleteInterceptForTCMalloc);
- }
-
- void ResetInterceptFunctions() {
- InterceptFunctions::ResetFunctions();
- }
-
- void SetUp() {
- SetInterceptFunctions();
- }
-
- void TearDown() {
- ResetInterceptFunctions();
- }
-
- protected:
- static const size_t kDummyArraySize;
- static const void* const kConstNull;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TypeProfilerTest);
-};
-
-const size_t TypeProfilerTest::kDummyArraySize = 10;
-const void* const TypeProfilerTest::kConstNull = static_cast<const void*>(NULL);
-
-TEST_F(TypeProfilerTest, TestNormalProfiling) {
- int* dummy = new int(48);
- const std::type_info* type;
-
- type = LookupType(dummy);
- ASSERT_NE(kConstNull, type);
- EXPECT_STREQ(typeid(int).name(), type->name());
- delete dummy;
-
- type = LookupType(dummy);
- EXPECT_EQ(kConstNull, type);
-}
-
-TEST_F(TypeProfilerTest, TestNormalArrayProfiling) {
- int* dummy = new int[kDummyArraySize];
- const std::type_info* type;
-
- type = LookupType(dummy);
- ASSERT_NE(kConstNull, type);
- // For an array, the profiler remembers its base type.
- EXPECT_STREQ(typeid(int).name(), type->name());
- delete[] dummy;
-
- type = LookupType(dummy);
- EXPECT_EQ(kConstNull, type);
-}
-
-TEST_F(TypeProfilerTest, TestRepeatedNewAndDelete) {
- int *dummy[kDummyArraySize];
- const std::type_info* type;
- for (int i = 0; i < kDummyArraySize; ++i)
- dummy[i] = new int(i);
-
- for (int i = 0; i < kDummyArraySize; ++i) {
- type = LookupType(dummy[i]);
- ASSERT_NE(kConstNull, type);
- EXPECT_STREQ(typeid(int).name(), type->name());
- }
-
- for (int i = 0; i < kDummyArraySize; ++i) {
- delete dummy[i];
- type = LookupType(dummy[i]);
- ASSERT_EQ(kConstNull, type);
- }
-}
-
-TEST_F(TypeProfilerTest, TestMultipleNewWithDroppingDelete) {
- static const size_t large_size = 256 * 1024;
-
- char* dummy_char = new char[large_size / sizeof(*dummy_char)];
- const std::type_info* type;
-
- type = LookupType(dummy_char);
- ASSERT_NE(kConstNull, type);
- EXPECT_STREQ(typeid(char).name(), type->name());
-
- // Call "::operator delete" directly to drop __op_delete_intercept__.
- ::operator delete[](dummy_char);
-
- type = LookupType(dummy_char);
- ASSERT_NE(kConstNull, type);
- EXPECT_STREQ(typeid(char).name(), type->name());
-
- // Allocates a little different size.
- int* dummy_int = new int[large_size / sizeof(*dummy_int) - 1];
-
- // We expect that tcmalloc returns the same address for these large (over 32k)
- // allocation calls. It usually happens, but maybe probablistic.
- ASSERT_EQ(static_cast<void*>(dummy_char), static_cast<void*>(dummy_int)) <<
- "two new (malloc) calls didn't return the same address; retry it.";
-
- type = LookupType(dummy_int);
- ASSERT_NE(kConstNull, type);
- EXPECT_STREQ(typeid(int).name(), type->name());
-
- delete[] dummy_int;
-
- type = LookupType(dummy_int);
- EXPECT_EQ(kConstNull, type);
-}
-
-TEST_F(TypeProfilerTest, TestProfileDeleteWithoutProfiledNew) {
- // 'dummy' should be new'ed in this test before intercept functions are set.
- ResetInterceptFunctions();
-
- int* dummy = new int(48);
- const std::type_info* type;
-
- // Set intercept functions again after 'dummy' is new'ed.
- SetInterceptFunctions();
-
- delete dummy;
-
- type = LookupType(dummy);
- EXPECT_EQ(kConstNull, type);
-
- ResetInterceptFunctions();
-}
-
-TEST_F(TypeProfilerTest, TestProfileNewWithoutProfiledDelete) {
- int* dummy = new int(48);
- const std::type_info* type;
-
- EXPECT_TRUE(Controller::IsProfiling());
-
- // Stop profiling before deleting 'dummy'.
- Controller::Stop();
- EXPECT_FALSE(Controller::IsProfiling());
-
- delete dummy;
-
- // NOTE: We accept that a profile entry remains when a profiled object is
- // deleted after Controller::Stop().
- type = LookupType(dummy);
- ASSERT_NE(kConstNull, type);
- EXPECT_STREQ(typeid(int).name(), type->name());
-
- Controller::Restart();
- EXPECT_TRUE(Controller::IsProfiling());
-
- // Remove manually since 'dummy' is not removed from type_profiler_map.
- EraseType(dummy);
-}
-
-} // namespace type_profiler
-} // namespace base
-
-#endif // defined(TYPE_PROFILING)
-
-int main(int argc, char** argv) {
- testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
-}
diff --git a/chromium/base/android/OWNERS b/chromium/base/android/OWNERS
index 87d5d224978..8e73f048ced 100644
--- a/chromium/base/android/OWNERS
+++ b/chromium/base/android/OWNERS
@@ -1,2 +1,4 @@
bulach@chromium.org
+nyquist@chromium.org
+rmcilroy@chromium.org
yfriedman@chromium.org
diff --git a/chromium/base/android/activity_state_list.h b/chromium/base/android/activity_state_list.h
deleted file mode 100644
index 43c0f803da3..00000000000
--- a/chromium/base/android/activity_state_list.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file intentionally does not have header guards, it's included
-// inside a macro to generate enum values.
-
-#ifndef DEFINE_ACTIVITY_STATE
-#error "DEFINE_ACTIVITY_STATE should be defined before including this file"
-#endif
-DEFINE_ACTIVITY_STATE(CREATED, 1)
-DEFINE_ACTIVITY_STATE(STARTED, 2)
-DEFINE_ACTIVITY_STATE(RESUMED, 3)
-DEFINE_ACTIVITY_STATE(PAUSED, 4)
-DEFINE_ACTIVITY_STATE(STOPPED, 5)
-DEFINE_ACTIVITY_STATE(DESTROYED, 6)
diff --git a/chromium/base/android/activity_status.cc b/chromium/base/android/activity_status.cc
deleted file mode 100644
index 4d0be32ef93..00000000000
--- a/chromium/base/android/activity_status.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/android/activity_status.h"
-
-#include <jni.h>
-
-#include "base/memory/singleton.h"
-#include "jni/ActivityStatus_jni.h"
-
-namespace base {
-namespace android {
-
-ActivityStatus::Listener::Listener(
- const ActivityStatus::StateChangeCallback& callback)
- : callback_(callback) {
- ActivityStatus::GetInstance()->RegisterListener(this);
-}
-
-ActivityStatus::Listener::~Listener() {
- ActivityStatus::GetInstance()->UnregisterListener(this);
-}
-
-void ActivityStatus::Listener::Notify(ActivityState state) {
- callback_.Run(state);
-}
-
-// static
-ActivityStatus* ActivityStatus::GetInstance() {
- return Singleton<ActivityStatus,
- LeakySingletonTraits<ActivityStatus> >::get();
-}
-
-static void OnActivityStateChange(JNIEnv* env, jclass clazz, int new_state) {
- ActivityStatus* activity_status = ActivityStatus::GetInstance();
- ActivityState activity_state = static_cast<ActivityState>(new_state);
- activity_status->OnActivityStateChange(activity_state);
-}
-
-bool ActivityStatus::RegisterBindings(JNIEnv* env) {
- return RegisterNativesImpl(env);
-}
-
-ActivityStatus::ActivityStatus()
- : observers_(new ObserverListThreadSafe<Listener>()) {
- Java_ActivityStatus_registerThreadSafeNativeStateListener(
- base::android::AttachCurrentThread());
-}
-
-ActivityStatus::~ActivityStatus() {}
-
-void ActivityStatus::RegisterListener(Listener* listener) {
- observers_->AddObserver(listener);
-}
-
-void ActivityStatus::UnregisterListener(Listener* listener) {
- observers_->RemoveObserver(listener);
-}
-
-void ActivityStatus::OnActivityStateChange(ActivityState new_state) {
- observers_->Notify(&ActivityStatus::Listener::Notify, new_state);
-}
-
-} // namespace android
-} // namespace base
diff --git a/chromium/base/android/activity_status.h b/chromium/base/android/activity_status.h
deleted file mode 100644
index 7975a789cd0..00000000000
--- a/chromium/base/android/activity_status.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BASE_ANDROID_ACTIVITY_STATUS_H_
-#define BASE_ANDROID_ACTIVITY_STATUS_H_
-
-#include <jni.h>
-
-#include "base/android/jni_android.h"
-#include "base/base_export.h"
-#include "base/basictypes.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/singleton.h"
-#include "base/observer_list_threadsafe.h"
-
-namespace base {
-namespace android {
-
-// Define activity state values like ACTIVITY_STATE_CREATED in a
-// way that ensures they're always the same than their Java counterpart.
-enum ActivityState {
-#define DEFINE_ACTIVITY_STATE(x, y) ACTIVITY_STATE_##x = y,
-#include "base/android/activity_state_list.h"
-#undef DEFINE_ACTIVITY_STATE
-};
-
-// A native helper class to listen to state changes of the current
-// Android Activity. This mirrors org.chromium.base.ActivityStatus.
-// any thread.
-//
-// To start listening, create a new instance, passing a callback to a
-// function that takes an ActivityState parameter. To stop listening,
-// simply delete the listener object. The implementation guarantees
-// that the callback will always be called on the thread that created
-// the listener.
-//
-// Example:
-//
-// void OnActivityStateChange(ActivityState state) {
-// ...
-// }
-//
-// // Start listening.
-// ActivityStatus::Listener* my_listener =
-// new ActivityStatus::Listener(base::Bind(&OnActivityStateChange));
-//
-// ...
-//
-// // Stop listening.
-// delete my_listener
-//
-class BASE_EXPORT ActivityStatus {
- public:
- typedef base::Callback<void(ActivityState)> StateChangeCallback;
-
- class Listener {
- public:
- explicit Listener(const StateChangeCallback& callback);
- ~Listener();
-
- private:
- friend class ActivityStatus;
-
- void Notify(ActivityState state);
-
- StateChangeCallback callback_;
-
- DISALLOW_COPY_AND_ASSIGN(Listener);
- };
-
- // NOTE: The Java ActivityStatus is a singleton too.
- static ActivityStatus* GetInstance();
-
- // Internal use: must be public to be called from base_jni_registrar.cc
- static bool RegisterBindings(JNIEnv* env);
-
- // Internal use only: must be public to be called from JNI and unit tests.
- void OnActivityStateChange(ActivityState new_state);
-
- private:
- friend struct DefaultSingletonTraits<ActivityStatus>;
-
- ActivityStatus();
- ~ActivityStatus();
-
- void RegisterListener(Listener* listener);
- void UnregisterListener(Listener* listener);
-
- scoped_refptr<ObserverListThreadSafe<Listener> > observers_;
-
- DISALLOW_COPY_AND_ASSIGN(ActivityStatus);
-};
-
-} // namespace android
-} // namespace base
-
-#endif // BASE_ANDROID_ACTIVITY_STATUS_H_
diff --git a/chromium/base/android/activity_status_unittest.cc b/chromium/base/android/activity_status_unittest.cc
deleted file mode 100644
index 3eb0d10f736..00000000000
--- a/chromium/base/android/activity_status_unittest.cc
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/android/activity_status.h"
-#include "base/bind.h"
-#include "base/callback_forward.h"
-#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop_proxy.h"
-#include "base/run_loop.h"
-#include "base/synchronization/waitable_event.h"
-#include "base/threading/thread.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace base {
-namespace android {
-
-namespace {
-
-using base::android::ScopedJavaLocalRef;
-
-// An invalid ActivityState value.
-const ActivityState kInvalidActivityState = static_cast<ActivityState>(100);
-
-// Used to generate a callback that stores the new state at a given location.
-void StoreStateTo(ActivityState* target, ActivityState state) {
- *target = state;
-}
-
-void RunTasksUntilIdle() {
- RunLoop run_loop;
- run_loop.RunUntilIdle();
-}
-
-// Shared state for the multi-threaded test.
-// This uses a thread to register for events and listen to them, while state
-// changes are forced on the main thread.
-class MultiThreadedTest {
- public:
- MultiThreadedTest()
- : activity_status_(ActivityStatus::GetInstance()),
- state_(kInvalidActivityState),
- event_(false, false),
- thread_("ActivityStatusTest thread"),
- main_() {
- }
-
- void Run() {
- // Start the thread and tell it to register for events.
- thread_.Start();
- thread_.message_loop()
- ->PostTask(FROM_HERE,
- base::Bind(&MultiThreadedTest::RegisterThreadForEvents,
- base::Unretained(this)));
-
- // Wait for its completion.
- event_.Wait();
-
- // Change state, then wait for the thread to modify state.
- activity_status_->OnActivityStateChange(ACTIVITY_STATE_CREATED);
- event_.Wait();
- EXPECT_EQ(ACTIVITY_STATE_CREATED, state_);
-
- // Again
- activity_status_->OnActivityStateChange(ACTIVITY_STATE_DESTROYED);
- event_.Wait();
- EXPECT_EQ(ACTIVITY_STATE_DESTROYED, state_);
- }
-
- private:
- void ExpectOnThread() {
- EXPECT_EQ(thread_.message_loop(), base::MessageLoop::current());
- }
-
- void RegisterThreadForEvents() {
- ExpectOnThread();
- listener_.reset(new ActivityStatus::Listener(base::Bind(
- &MultiThreadedTest::StoreStateAndSignal, base::Unretained(this))));
- EXPECT_TRUE(listener_.get());
- event_.Signal();
- }
-
- void StoreStateAndSignal(ActivityState state) {
- ExpectOnThread();
- state_ = state;
- event_.Signal();
- }
-
- ActivityStatus* const activity_status_;
- ActivityState state_;
- base::WaitableEvent event_;
- base::Thread thread_;
- base::MessageLoop main_;
- scoped_ptr<ActivityStatus::Listener> listener_;
-};
-
-} // namespace
-
-TEST(ActivityStatusTest, SingleThread) {
- MessageLoop message_loop;
-
- ActivityState result = kInvalidActivityState;
-
- // Create a new listener that stores the new state into |result| on every
- // state change.
- ActivityStatus::Listener listener(
- base::Bind(&StoreStateTo, base::Unretained(&result)));
-
- EXPECT_EQ(kInvalidActivityState, result);
-
- ActivityStatus* const activity_status = ActivityStatus::GetInstance();
- activity_status->OnActivityStateChange(ACTIVITY_STATE_CREATED);
- RunTasksUntilIdle();
- EXPECT_EQ(ACTIVITY_STATE_CREATED, result);
-
- activity_status->OnActivityStateChange(ACTIVITY_STATE_DESTROYED);
- RunTasksUntilIdle();
- EXPECT_EQ(ACTIVITY_STATE_DESTROYED, result);
-}
-
-TEST(ActivityStatusTest, TwoThreads) {
- MultiThreadedTest test;
- test.Run();
-}
-
-} // namespace android
-} // namespace base
diff --git a/chromium/base/android/application_state_list.h b/chromium/base/android/application_state_list.h
new file mode 100644
index 00000000000..cbc833e54e5
--- /dev/null
+++ b/chromium/base/android/application_state_list.h
@@ -0,0 +1,17 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file intentionally does not have header guards, it's included
+// inside a macro to generate enum values.
+
+// Note that these states represent the most visible Activity state.
+// If there are activities with states paused and stopped, only
+// HAS_PAUSED_ACTIVITIES should be returned.
+#ifndef DEFINE_APPLICATION_STATE
+#error "DEFINE_APPLICATION_STATE should be defined before including this file"
+#endif
+DEFINE_APPLICATION_STATE(HAS_RUNNING_ACTIVITIES, 1)
+DEFINE_APPLICATION_STATE(HAS_PAUSED_ACTIVITIES, 2)
+DEFINE_APPLICATION_STATE(HAS_STOPPED_ACTIVITIES, 3)
+DEFINE_APPLICATION_STATE(HAS_DESTROYED_ACTIVITIES, 4)
diff --git a/chromium/base/android/application_status_listener.cc b/chromium/base/android/application_status_listener.cc
new file mode 100644
index 00000000000..f48707282f5
--- /dev/null
+++ b/chromium/base/android/application_status_listener.cc
@@ -0,0 +1,74 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/android/application_status_listener.h"
+
+#include <jni.h>
+
+#include "base/lazy_instance.h"
+#include "base/observer_list_threadsafe.h"
+#include "jni/ApplicationStatus_jni.h"
+
+namespace {
+struct LeakyLazyObserverListTraits :
+ base::internal::LeakyLazyInstanceTraits<
+ ObserverListThreadSafe<base::android::ApplicationStatusListener> > {
+ static ObserverListThreadSafe<base::android::ApplicationStatusListener>*
+ New(void* instance) {
+ ObserverListThreadSafe<base::android::ApplicationStatusListener>* ret =
+ base::internal::LeakyLazyInstanceTraits<ObserverListThreadSafe<
+ base::android::ApplicationStatusListener> >::New(instance);
+ // Leaky.
+ ret->AddRef();
+ return ret;
+ }
+};
+
+base::LazyInstance<ObserverListThreadSafe<
+ base::android::ApplicationStatusListener>,
+ LeakyLazyObserverListTraits> g_observers = LAZY_INSTANCE_INITIALIZER;
+
+} // namespace
+
+namespace base {
+namespace android {
+
+ApplicationStatusListener::ApplicationStatusListener(
+ const ApplicationStatusListener::ApplicationStateChangeCallback& callback)
+ : callback_(callback) {
+ DCHECK(!callback_.is_null());
+ g_observers.Get().AddObserver(this);
+
+ Java_ApplicationStatus_registerThreadSafeNativeApplicationStateListener(
+ base::android::AttachCurrentThread());
+}
+
+ApplicationStatusListener::~ApplicationStatusListener() {
+ g_observers.Get().RemoveObserver(this);
+}
+
+void ApplicationStatusListener::Notify(ApplicationState state) {
+ callback_.Run(state);
+}
+
+// static
+bool ApplicationStatusListener::RegisterBindings(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}
+
+// static
+void ApplicationStatusListener::NotifyApplicationStateChange(
+ ApplicationState state) {
+ g_observers.Get().Notify(&ApplicationStatusListener::Notify, state);
+}
+
+static void OnApplicationStateChange(JNIEnv* env,
+ jclass clazz,
+ jint new_state) {
+ ApplicationState application_state = static_cast<ApplicationState>(new_state);
+ ApplicationStatusListener::NotifyApplicationStateChange(application_state);
+}
+
+} // namespace android
+} // namespace base
diff --git a/chromium/base/android/application_status_listener.h b/chromium/base/android/application_status_listener.h
new file mode 100644
index 00000000000..ef98985f6bc
--- /dev/null
+++ b/chromium/base/android/application_status_listener.h
@@ -0,0 +1,79 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_ANDROID_APPLICATION_STATUS_LISTENER_H_
+#define BASE_ANDROID_APPLICATION_STATUS_LISTENER_H_
+
+#include <jni.h>
+
+#include "base/android/jni_android.h"
+#include "base/base_export.h"
+#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/singleton.h"
+#include "base/observer_list_threadsafe.h"
+
+namespace base {
+namespace android {
+
+// Define application state values like APPLICATION_STATE_VISIBLE in a
+// way that ensures they're always the same than their Java counterpart.
+enum ApplicationState {
+#define DEFINE_APPLICATION_STATE(x, y) APPLICATION_STATE_##x = y,
+#include "base/android/application_state_list.h"
+#undef DEFINE_APPLICATION_STATE
+};
+
+// A native helper class to listen to state changes of the Android
+// Application. This mirrors org.chromium.base.ApplicationStatus.
+// any thread.
+//
+// To start listening, create a new instance, passing a callback to a
+// function that takes an ApplicationState parameter. To stop listening,
+// simply delete the listener object. The implementation guarantees
+// that the callback will always be called on the thread that created
+// the listener.
+//
+// Example:
+//
+// void OnApplicationStateChange(ApplicationState state) {
+// ...
+// }
+//
+// // Start listening.
+// ApplicationStatusListener* my_listener =
+// new ApplicationStatusListener(
+// base::Bind(&OnApplicationStateChange));
+//
+// ...
+//
+// // Stop listening.
+// delete my_listener
+//
+class BASE_EXPORT ApplicationStatusListener {
+ public:
+ typedef base::Callback<void(ApplicationState)> ApplicationStateChangeCallback;
+
+ explicit ApplicationStatusListener(
+ const ApplicationStateChangeCallback& callback);
+ ~ApplicationStatusListener();
+
+ // Internal use: must be public to be called from base_jni_registrar.cc
+ static bool RegisterBindings(JNIEnv* env);
+
+ // Internal use only: must be public to be called from JNI and unit tests.
+ static void NotifyApplicationStateChange(ApplicationState state);
+
+ private:
+ void Notify(ApplicationState state);
+
+ ApplicationStateChangeCallback callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(ApplicationStatusListener);
+};
+
+} // namespace android
+} // namespace base
+
+#endif // BASE_ANDROID_APPLICATION_STATUS_LISTENER_H_
diff --git a/chromium/base/android/application_status_listener_unittest.cc b/chromium/base/android/application_status_listener_unittest.cc
new file mode 100644
index 00000000000..1049628f5a3
--- /dev/null
+++ b/chromium/base/android/application_status_listener_unittest.cc
@@ -0,0 +1,130 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/android/application_status_listener.h"
+#include "base/bind.h"
+#include "base/callback_forward.h"
+#include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/message_loop/message_loop_proxy.h"
+#include "base/run_loop.h"
+#include "base/synchronization/waitable_event.h"
+#include "base/threading/thread.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace base {
+namespace android {
+
+namespace {
+
+using base::android::ScopedJavaLocalRef;
+
+// An invalid ApplicationState value.
+const ApplicationState kInvalidApplicationState =
+ static_cast<ApplicationState>(100);
+
+// Used to generate a callback that stores the new state at a given location.
+void StoreStateTo(ApplicationState* target, ApplicationState state) {
+ *target = state;
+}
+
+void RunTasksUntilIdle() {
+ RunLoop run_loop;
+ run_loop.RunUntilIdle();
+}
+
+// Shared state for the multi-threaded test.
+// This uses a thread to register for events and listen to them, while state
+// changes are forced on the main thread.
+class MultiThreadedTest {
+ public:
+ MultiThreadedTest()
+ : state_(kInvalidApplicationState),
+ event_(false, false),
+ thread_("ApplicationStatusTest thread"),
+ main_() {
+ }
+
+ void Run() {
+ // Start the thread and tell it to register for events.
+ thread_.Start();
+ thread_.message_loop()
+ ->PostTask(FROM_HERE,
+ base::Bind(&MultiThreadedTest::RegisterThreadForEvents,
+ base::Unretained(this)));
+
+ // Wait for its completion.
+ event_.Wait();
+
+ // Change state, then wait for the thread to modify state.
+ ApplicationStatusListener::NotifyApplicationStateChange(
+ APPLICATION_STATE_HAS_RUNNING_ACTIVITIES);
+ event_.Wait();
+ EXPECT_EQ(APPLICATION_STATE_HAS_RUNNING_ACTIVITIES, state_);
+
+ // Again
+ ApplicationStatusListener::NotifyApplicationStateChange(
+ APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES);
+ event_.Wait();
+ EXPECT_EQ(APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES, state_);
+ }
+
+ private:
+ void ExpectOnThread() {
+ EXPECT_EQ(thread_.message_loop(), base::MessageLoop::current());
+ }
+
+ void RegisterThreadForEvents() {
+ ExpectOnThread();
+ listener_.reset(new ApplicationStatusListener(base::Bind(
+ &MultiThreadedTest::StoreStateAndSignal, base::Unretained(this))));
+ EXPECT_TRUE(listener_.get());
+ event_.Signal();
+ }
+
+ void StoreStateAndSignal(ApplicationState state) {
+ ExpectOnThread();
+ state_ = state;
+ event_.Signal();
+ }
+
+ ApplicationState state_;
+ base::WaitableEvent event_;
+ base::Thread thread_;
+ base::MessageLoop main_;
+ scoped_ptr<ApplicationStatusListener> listener_;
+};
+
+} // namespace
+
+TEST(ApplicationStatusListenerTest, SingleThread) {
+ MessageLoop message_loop;
+
+ ApplicationState result = kInvalidApplicationState;
+
+ // Create a new listener that stores the new state into |result| on every
+ // state change.
+ ApplicationStatusListener listener(
+ base::Bind(&StoreStateTo, base::Unretained(&result)));
+
+ EXPECT_EQ(kInvalidApplicationState, result);
+
+ ApplicationStatusListener::NotifyApplicationStateChange(
+ APPLICATION_STATE_HAS_RUNNING_ACTIVITIES);
+ RunTasksUntilIdle();
+ EXPECT_EQ(APPLICATION_STATE_HAS_RUNNING_ACTIVITIES, result);
+
+ ApplicationStatusListener::NotifyApplicationStateChange(
+ APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES);
+ RunTasksUntilIdle();
+ EXPECT_EQ(APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES, result);
+}
+
+TEST(ApplicationStatusListenerTest, TwoThreads) {
+ MultiThreadedTest test;
+ test.Run();
+}
+
+} // namespace android
+} // namespace base
diff --git a/chromium/base/android/build_info.cc b/chromium/base/android/build_info.cc
index cdde6a90052..a1755afe981 100644
--- a/chromium/base/android/build_info.cc
+++ b/chromium/base/android/build_info.cc
@@ -37,7 +37,9 @@ struct BuildInfoSingletonTraits {
}
static const bool kRegisterAtExit = false;
+#ifndef NDEBUG
static const bool kAllowedToAccessOnNonjoinableThread = true;
+#endif
};
BuildInfo::BuildInfo(JNIEnv* env)
@@ -55,6 +57,7 @@ BuildInfo::BuildInfo(JNIEnv* env)
env, GetApplicationContext()))),
package_name_(StrDupJString(Java_BuildInfo_getPackageName(
env, GetApplicationContext()))),
+ build_type_(StrDupJString(Java_BuildInfo_getBuildType(env))),
sdk_int_(Java_BuildInfo_getSdkInt(env)),
java_exception_info_(NULL) {
}
diff --git a/chromium/base/android/build_info.h b/chromium/base/android/build_info.h
index a5f44c2e0ac..03dadd99df1 100644
--- a/chromium/base/android/build_info.h
+++ b/chromium/base/android/build_info.h
@@ -72,6 +72,10 @@ class BASE_EXPORT BuildInfo {
return package_name_;
}
+ const char* build_type() const {
+ return build_type_;
+ }
+
int sdk_int() const {
return sdk_int_;
}
@@ -102,6 +106,7 @@ class BASE_EXPORT BuildInfo {
const char* const package_version_name_;
const char* const package_label_;
const char* const package_name_;
+ const char* const build_type_;
const int sdk_int_;
// This is set via set_java_exception_info, not at constructor time.
const char* java_exception_info_;
diff --git a/chromium/base/android/content_uri_utils.cc b/chromium/base/android/content_uri_utils.cc
index 64d6ad24226..0e0c0ea6bb1 100644
--- a/chromium/base/android/content_uri_utils.cc
+++ b/chromium/base/android/content_uri_utils.cc
@@ -6,7 +6,6 @@
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
-#include "base/platform_file.h"
#include "jni/ContentUriUtils_jni.h"
using base::android::ConvertUTF8ToJavaString;
@@ -25,15 +24,15 @@ bool ContentUriExists(const FilePath& content_uri) {
env, base::android::GetApplicationContext(), j_uri.obj());
}
-int OpenContentUriForRead(const FilePath& content_uri) {
+File OpenContentUriForRead(const FilePath& content_uri) {
JNIEnv* env = base::android::AttachCurrentThread();
ScopedJavaLocalRef<jstring> j_uri =
ConvertUTF8ToJavaString(env, content_uri.value());
jint fd = Java_ContentUriUtils_openContentUriForRead(
env, base::android::GetApplicationContext(), j_uri.obj());
if (fd < 0)
- return base::kInvalidPlatformFileValue;
- return fd;
+ return File();
+ return File(fd);
}
} // namespace base
diff --git a/chromium/base/android/content_uri_utils.h b/chromium/base/android/content_uri_utils.h
index ec820efbd26..827ec92fa39 100644
--- a/chromium/base/android/content_uri_utils.h
+++ b/chromium/base/android/content_uri_utils.h
@@ -9,6 +9,7 @@
#include "base/base_export.h"
#include "base/basictypes.h"
+#include "base/files/file.h"
#include "base/files/file_path.h"
namespace base {
@@ -17,7 +18,7 @@ bool RegisterContentUriUtils(JNIEnv* env);
// Opens a content uri for read and returns the file descriptor to the caller.
// Returns -1 if the uri is invalid.
-BASE_EXPORT int OpenContentUriForRead(const FilePath& content_uri);
+BASE_EXPORT File OpenContentUriForRead(const FilePath& content_uri);
// Check whether a content uri exists.
BASE_EXPORT bool ContentUriExists(const FilePath& content_uri);
diff --git a/chromium/base/android/context_types.cc b/chromium/base/android/context_types.cc
deleted file mode 100644
index 084b1365ce2..00000000000
--- a/chromium/base/android/context_types.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/android/context_types.h"
-
-#include "base/android/jni_android.h"
-#include "base/android/scoped_java_ref.h"
-#include "base/files/file_path.h"
-#include "jni/ContextTypes_jni.h"
-
-namespace base {
-namespace android {
-
-bool IsRunningInWebapp() {
- JNIEnv* env = AttachCurrentThread();
- return static_cast<bool>(
- Java_ContextTypes_isRunningInWebapp(env, GetApplicationContext()));
-}
-
-bool RegisterContextTypes(JNIEnv* env) {
- return RegisterNativesImpl(env);
-}
-
-} // namespace android
-} // namespace base
diff --git a/chromium/base/android/context_types.h b/chromium/base/android/context_types.h
deleted file mode 100644
index a132167199e..00000000000
--- a/chromium/base/android/context_types.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BASE_ANDROID_CONTEXT_TYPES_H_
-#define BASE_ANDROID_CONTEXT_TYPES_H_
-
-#include <jni.h>
-
-#include "base/base_export.h"
-
-namespace base {
-namespace android {
-
-BASE_EXPORT bool IsRunningInWebapp();
-
-bool RegisterContextTypes(JNIEnv* env);
-
-} // namespace android
-} // namespace base
-
-#endif // BASE_ANDROID_CONTEXT_TYPES_H_
diff --git a/chromium/base/android/event_log.cc b/chromium/base/android/event_log.cc
new file mode 100644
index 00000000000..a4b1dd139f2
--- /dev/null
+++ b/chromium/base/android/event_log.cc
@@ -0,0 +1,20 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/android/event_log.h"
+#include "jni/EventLog_jni.h"
+
+namespace base {
+namespace android {
+
+void EventLogWriteInt(int tag, int value) {
+ Java_EventLog_writeEvent(AttachCurrentThread(), tag, value);
+}
+
+bool RegisterEventLog(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}
+
+} // namespace android
+} // namespace base
diff --git a/chromium/base/android/event_log.h b/chromium/base/android/event_log.h
new file mode 100644
index 00000000000..dad4e4cfbc9
--- /dev/null
+++ b/chromium/base/android/event_log.h
@@ -0,0 +1,22 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_ANDROID_EVENT_LOG_H_
+#define BASE_ANDROID_EVENT_LOG_H_
+
+#include <jni.h>
+
+#include "base/base_export.h"
+
+namespace base {
+namespace android {
+
+void BASE_EXPORT EventLogWriteInt(int tag, int value);
+
+bool RegisterEventLog(JNIEnv* env);
+
+} // namespace android
+} // namespace base
+
+#endif // BASE_ANDROID_EVENT_LOG_H_
diff --git a/chromium/base/android/jni_generator/jni_generator.gyp b/chromium/base/android/jni_generator/jni_generator.gyp
index 4bad0dc4832..2ea36b0b389 100644
--- a/chromium/base/android/jni_generator/jni_generator.gyp
+++ b/chromium/base/android/jni_generator/jni_generator.gyp
@@ -56,9 +56,6 @@
'jni_sample_header',
'jni_sample_java',
],
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)/example',
- ],
'sources': [
'sample_for_tests.cc',
],
diff --git a/chromium/base/android/library_loader/library_loader_hooks.cc b/chromium/base/android/library_loader/library_loader_hooks.cc
new file mode 100644
index 00000000000..79470108eb3
--- /dev/null
+++ b/chromium/base/android/library_loader/library_loader_hooks.cc
@@ -0,0 +1,73 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/android/library_loader/library_loader_hooks.h"
+
+#include "base/android/jni_string.h"
+#include "base/at_exit.h"
+#include "base/metrics/histogram.h"
+#include "jni/LibraryLoader_jni.h"
+
+namespace base {
+namespace android {
+
+namespace {
+
+base::AtExitManager* g_at_exit_manager = NULL;
+const char* g_library_version_number = "";
+LibraryLoadedHook* g_registration_callback = NULL;
+
+} // namespace
+
+void SetLibraryLoadedHook(LibraryLoadedHook* func) {
+ g_registration_callback = func;
+}
+
+static jboolean LibraryLoaded(JNIEnv* env, jclass clazz,
+ jobjectArray init_command_line) {
+ if(g_registration_callback == NULL) {
+ return true;
+ }
+ return g_registration_callback(env, clazz, init_command_line);
+}
+
+static void RecordChromiumAndroidLinkerHistogram(
+ JNIEnv* env,
+ jclass clazz,
+ jboolean loaded_at_fixed_address_failed,
+ jboolean is_low_memory_device) {
+ UMA_HISTOGRAM_BOOLEAN("ChromiumAndroidLinker.LoadedAtFixedAddressFailed",
+ loaded_at_fixed_address_failed);
+ UMA_HISTOGRAM_BOOLEAN("ChromiumAndroidLinker.IsLowMemoryDevice",
+ is_low_memory_device);
+}
+
+void LibraryLoaderExitHook() {
+ if (g_at_exit_manager) {
+ delete g_at_exit_manager;
+ g_at_exit_manager = NULL;
+ }
+}
+
+bool RegisterLibraryLoaderEntryHook(JNIEnv* env) {
+ // We need the AtExitManager to be created at the very beginning.
+ g_at_exit_manager = new base::AtExitManager();
+
+ return RegisterNativesImpl(env);
+}
+
+void SetVersionNumber(const char* version_number) {
+ g_library_version_number = strdup(version_number);
+}
+
+jstring GetVersionNumber(JNIEnv* env, jclass clazz) {
+ return ConvertUTF8ToJavaString(env, g_library_version_number).Release();
+}
+
+static void RecordNativeLibraryHack(JNIEnv*, jclass, jboolean usedHack) {
+ UMA_HISTOGRAM_BOOLEAN("LibraryLoader.NativeLibraryHack", usedHack);
+}
+
+} // namespace android
+} // namespace base
diff --git a/chromium/base/android/library_loader/library_loader_hooks.h b/chromium/base/android/library_loader/library_loader_hooks.h
new file mode 100644
index 00000000000..06709f6ba9e
--- /dev/null
+++ b/chromium/base/android/library_loader/library_loader_hooks.h
@@ -0,0 +1,51 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_ANDROID_LIBRARY_LOADER_HOOKS_H_
+#define BASE_ANDROID_LIBRARY_LOADER_HOOKS_H_
+
+#include <jni.h>
+
+#include "base/base_export.h"
+
+namespace base {
+namespace android {
+
+// Registers the callbacks that allows the entry point of the library to be
+// exposed to the calling java code. This handles only registering the
+// the callbacks needed by the loader. Any application specific JNI bindings
+// should happen once the native library has fully loaded, either in the library
+// loaded hook function or later.
+BASE_EXPORT bool RegisterLibraryLoaderEntryHook(JNIEnv* env);
+
+// Typedef for hook function to be called (indirectly from Java) once the
+// libraries are loaded. The hook function should register the JNI bindings
+// required to start the application. It should return true for success and
+// false for failure.
+// Note: this can't use base::Callback because there is no way of initializing
+// the default callback without using static objects, which we forbid.
+typedef bool LibraryLoadedHook(JNIEnv* env,
+ jclass clazz,
+ jobjectArray init_command_line);
+
+// Set the hook function to be called (from Java) once the libraries are loaded.
+// SetLibraryLoadedHook may only be called from JNI_OnLoad. The hook function
+// should register the JNI bindings required to start the application.
+
+BASE_EXPORT void SetLibraryLoadedHook(LibraryLoadedHook* func);
+
+// Pass the version name to the loader. This used to check that the library
+// version matches the version expected by Java before completing JNI
+// registration.
+// Note: argument must remain valid at least until library loading is complete.
+BASE_EXPORT void SetVersionNumber(const char* version_number);
+
+// Call on exit to delete the AtExitManager which OnLibraryLoadedOnUIThread
+// created.
+BASE_EXPORT void LibraryLoaderExitHook();
+
+} // namespace android
+} // namespace base
+
+#endif // BASE_ANDROID_LIBRARY_LOADER_HOOKS_H_
diff --git a/chromium/base/android/linker/DEPS b/chromium/base/android/linker/DEPS
new file mode 100644
index 00000000000..15c3afb8668
--- /dev/null
+++ b/chromium/base/android/linker/DEPS
@@ -0,0 +1,4 @@
+include_rules = [
+ # This code cannot depend on anything from base/
+ "-base",
+]
diff --git a/chromium/base/android/path_utils_unittest.cc b/chromium/base/android/path_utils_unittest.cc
index c4c12fea133..b6410754eed 100644
--- a/chromium/base/android/path_utils_unittest.cc
+++ b/chromium/base/android/path_utils_unittest.cc
@@ -39,7 +39,8 @@ TEST_F(PathUtilsTest, TestGetNativeLibraryDirectory) {
// the base tests shared object.
FilePath path;
GetNativeLibraryDirectory(&path);
- EXPECT_TRUE(base::PathExists(path.Append(("libbase_unittests.so"))));
+ EXPECT_TRUE(base::PathExists(path.Append(("libbase_unittests.so"))) ||
+ base::PathExists(path.Append(("libbase_unittests.cr.so"))));
}
} // namespace android
diff --git a/chromium/base/android/scoped_java_ref.cc b/chromium/base/android/scoped_java_ref.cc
index 21b466e9584..bb6f5032fe3 100644
--- a/chromium/base/android/scoped_java_ref.cc
+++ b/chromium/base/android/scoped_java_ref.cc
@@ -9,6 +9,24 @@
namespace base {
namespace android {
+namespace {
+
+const int kDefaultLocalFrameCapacity = 16;
+
+} // namespace
+
+ScopedJavaLocalFrame::ScopedJavaLocalFrame(JNIEnv* env) : env_(env) {
+ int failed = env_->PushLocalFrame(kDefaultLocalFrameCapacity);
+ DCHECK(!failed);
+}
+
+ScopedJavaLocalFrame::ScopedJavaLocalFrame(JNIEnv* env, int capacity)
+ : env_(env) {
+ int failed = env_->PushLocalFrame(capacity);
+ DCHECK(!failed);
+}
+
+ScopedJavaLocalFrame::~ScopedJavaLocalFrame() { env_->PopLocalFrame(NULL); }
JavaRef<jobject>::JavaRef() : obj_(NULL) {}
diff --git a/chromium/base/android/scoped_java_ref.h b/chromium/base/android/scoped_java_ref.h
index a5d71e2d23b..7863c0bef3a 100644
--- a/chromium/base/android/scoped_java_ref.h
+++ b/chromium/base/android/scoped_java_ref.h
@@ -14,6 +14,23 @@
namespace base {
namespace android {
+// Creates a new local reference frame, in which at least a given number of
+// local references can be created. Note that local references already created
+// in previous local frames are still valid in the current local frame.
+class BASE_EXPORT ScopedJavaLocalFrame {
+ public:
+ explicit ScopedJavaLocalFrame(JNIEnv* env);
+ ScopedJavaLocalFrame(JNIEnv* env, int capacity);
+ ~ScopedJavaLocalFrame();
+
+ private:
+ // This class is only good for use on the thread it was created on so
+ // it's safe to cache the non-threadsafe JNIEnv* inside this object.
+ JNIEnv* env_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedJavaLocalFrame);
+};
+
// Forward declare the generic java reference template class.
template<typename T> class JavaRef;
diff --git a/chromium/base/android/sys_utils.h b/chromium/base/android/sys_utils.h
index 9b3152b466c..0841d0a7888 100644
--- a/chromium/base/android/sys_utils.h
+++ b/chromium/base/android/sys_utils.h
@@ -17,7 +17,7 @@ class BASE_EXPORT SysUtils {
// Returns true iff this is a low-end device.
static bool IsLowEndDevice();
- // Return the device's RAM size in kilo-bytes. Used for testing.
+ // Return the device's RAM size in kilo-bytes.
static size_t AmountOfPhysicalMemoryKB();
private:
diff --git a/chromium/base/android/trace_event_binding.cc b/chromium/base/android/trace_event_binding.cc
new file mode 100644
index 00000000000..e261411f08b
--- /dev/null
+++ b/chromium/base/android/trace_event_binding.cc
@@ -0,0 +1,169 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/android/trace_event_binding.h"
+
+#include <jni.h>
+
+#include <set>
+
+#include "base/debug/trace_event.h"
+#include "base/debug/trace_event_impl.h"
+#include "base/lazy_instance.h"
+#include "jni/TraceEvent_jni.h"
+
+namespace base {
+namespace android {
+
+namespace {
+
+const char kJavaCategory[] = "Java";
+const char kToplevelCategory[] = "toplevel";
+const char kLooperDispatchMessage[] = "Looper.dispatchMessage";
+
+// Boilerplate for safely converting Java data to TRACE_EVENT data.
+class TraceEventDataConverter {
+ public:
+ TraceEventDataConverter(JNIEnv* env,
+ jstring jname,
+ jstring jarg)
+ : env_(env),
+ jname_(jname),
+ jarg_(jarg),
+ name_(env->GetStringUTFChars(jname, NULL)),
+ arg_(jarg ? env->GetStringUTFChars(jarg, NULL) : NULL) {
+ }
+ ~TraceEventDataConverter() {
+ env_->ReleaseStringUTFChars(jname_, name_);
+ if (jarg_)
+ env_->ReleaseStringUTFChars(jarg_, arg_);
+ }
+
+ // Return saves values to pass to TRACE_EVENT macros.
+ const char* name() { return name_; }
+ const char* arg_name() { return arg_ ? "arg" : NULL; }
+ const char* arg() { return arg_; }
+
+ private:
+ JNIEnv* env_;
+ jstring jname_;
+ jstring jarg_;
+ const char* name_;
+ const char* arg_;
+
+ DISALLOW_COPY_AND_ASSIGN(TraceEventDataConverter);
+};
+
+class TraceEnabledObserver : public debug::TraceLog::EnabledStateObserver {
+ public:
+ virtual void OnTraceLogEnabled() OVERRIDE {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ base::android::Java_TraceEvent_setEnabled(env, true);
+ }
+ virtual void OnTraceLogDisabled() OVERRIDE {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ base::android::Java_TraceEvent_setEnabled(env, false);
+ }
+};
+
+base::LazyInstance<TraceEnabledObserver>::Leaky g_trace_enabled_state_observer_;
+
+} // namespace
+
+static void RegisterEnabledObserver(JNIEnv* env, jclass clazz) {
+ bool enabled = debug::TraceLog::GetInstance()->IsEnabled();
+ base::android::Java_TraceEvent_setEnabled(env, enabled);
+ debug::TraceLog::GetInstance()->AddEnabledStateObserver(
+ g_trace_enabled_state_observer_.Pointer());
+}
+
+static void StartATrace(JNIEnv* env, jclass clazz) {
+ base::debug::TraceLog::GetInstance()->StartATrace();
+}
+
+static void StopATrace(JNIEnv* env, jclass clazz) {
+ base::debug::TraceLog::GetInstance()->StopATrace();
+}
+
+static void Instant(JNIEnv* env, jclass clazz,
+ jstring jname, jstring jarg) {
+ TraceEventDataConverter converter(env, jname, jarg);
+ if (converter.arg()) {
+ TRACE_EVENT_COPY_INSTANT1(kJavaCategory, converter.name(),
+ TRACE_EVENT_SCOPE_THREAD,
+ converter.arg_name(), converter.arg());
+ } else {
+ TRACE_EVENT_COPY_INSTANT0(kJavaCategory, converter.name(),
+ TRACE_EVENT_SCOPE_THREAD);
+ }
+}
+
+static void Begin(JNIEnv* env, jclass clazz,
+ jstring jname, jstring jarg) {
+ TraceEventDataConverter converter(env, jname, jarg);
+ if (converter.arg()) {
+ TRACE_EVENT_COPY_BEGIN1(kJavaCategory, converter.name(),
+ converter.arg_name(), converter.arg());
+ } else {
+ TRACE_EVENT_COPY_BEGIN0(kJavaCategory, converter.name());
+ }
+}
+
+static void End(JNIEnv* env, jclass clazz,
+ jstring jname, jstring jarg) {
+ TraceEventDataConverter converter(env, jname, jarg);
+ if (converter.arg()) {
+ TRACE_EVENT_COPY_END1(kJavaCategory, converter.name(),
+ converter.arg_name(), converter.arg());
+ } else {
+ TRACE_EVENT_COPY_END0(kJavaCategory, converter.name());
+ }
+}
+
+static void BeginToplevel(JNIEnv* env, jclass clazz) {
+ TRACE_EVENT_BEGIN0(kToplevelCategory, kLooperDispatchMessage);
+}
+
+static void EndToplevel(JNIEnv* env, jclass clazz) {
+ TRACE_EVENT_END0(kToplevelCategory, kLooperDispatchMessage);
+}
+
+static void StartAsync(JNIEnv* env, jclass clazz,
+ jstring jname, jlong jid, jstring jarg) {
+ TraceEventDataConverter converter(env, jname, jarg);
+ if (converter.arg()) {
+ TRACE_EVENT_COPY_ASYNC_BEGIN1(kJavaCategory,
+ converter.name(),
+ jid,
+ converter.arg_name(),
+ converter.arg());
+ } else {
+ TRACE_EVENT_COPY_ASYNC_BEGIN0(kJavaCategory,
+ converter.name(),
+ jid);
+ }
+}
+
+static void FinishAsync(JNIEnv* env, jclass clazz,
+ jstring jname, jlong jid, jstring jarg) {
+ TraceEventDataConverter converter(env, jname, jarg);
+ if (converter.arg()) {
+ TRACE_EVENT_COPY_ASYNC_END1(kJavaCategory,
+ converter.name(),
+ jid,
+ converter.arg_name(),
+ converter.arg());
+ } else {
+ TRACE_EVENT_COPY_ASYNC_END0(kJavaCategory,
+ converter.name(),
+ jid);
+ }
+}
+
+bool RegisterTraceEvent(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}
+
+} // namespace android
+} // namespace base
diff --git a/chromium/base/android/trace_event_binding.h b/chromium/base/android/trace_event_binding.h
new file mode 100644
index 00000000000..ed0626620aa
--- /dev/null
+++ b/chromium/base/android/trace_event_binding.h
@@ -0,0 +1,18 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_ANDROID_TRACE_EVENT_H_
+#define BASE_ANDROID_TRACE_EVENT_H_
+
+#include <jni.h>
+
+namespace base {
+namespace android {
+
+extern bool RegisterTraceEvent(JNIEnv* env);
+
+} // namespace android
+} // namespace base
+
+#endif // CONTENT_COMMON_ANDROID_TRACE_EVENT_H_
diff --git a/chromium/base/atomicops.h b/chromium/base/atomicops.h
index 7f03492e849..cb737cd3704 100644
--- a/chromium/base/atomicops.h
+++ b/chromium/base/atomicops.h
@@ -28,7 +28,8 @@
#ifndef BASE_ATOMICOPS_H_
#define BASE_ATOMICOPS_H_
-#include "base/basictypes.h"
+#include <stdint.h>
+
#include "build/build_config.h"
#if defined(OS_WIN) && defined(ARCH_CPU_64_BITS)
@@ -43,7 +44,7 @@
namespace base {
namespace subtle {
-typedef int32 Atomic32;
+typedef int32_t Atomic32;
#ifdef ARCH_CPU_64_BITS
// We need to be able to go between Atomic64 and AtomicWord implicitly. This
// means Atomic64 and AtomicWord should be the same type on 64-bit.
@@ -133,7 +134,7 @@ Atomic64 Acquire_Load(volatile const Atomic64* ptr);
Atomic64 Release_Load(volatile const Atomic64* ptr);
#endif // ARCH_CPU_64_BITS
-} // namespace base::subtle
+} // namespace subtle
} // namespace base
// Include our platform specific implementation.
@@ -145,8 +146,10 @@ Atomic64 Release_Load(volatile const Atomic64* ptr);
#include "base/atomicops_internals_mac.h"
#elif defined(OS_NACL)
#include "base/atomicops_internals_gcc.h"
-#elif defined(COMPILER_GCC) && defined(ARCH_CPU_ARM_FAMILY)
+#elif defined(COMPILER_GCC) && defined(ARCH_CPU_ARMEL)
#include "base/atomicops_internals_arm_gcc.h"
+#elif defined(COMPILER_GCC) && defined(ARCH_CPU_ARM64)
+#include "base/atomicops_internals_arm64_gcc.h"
#elif defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY)
#include "base/atomicops_internals_x86_gcc.h"
#elif defined(COMPILER_GCC) && defined(ARCH_CPU_MIPS_FAMILY)
diff --git a/chromium/base/atomicops_internals_arm64_gcc.h b/chromium/base/atomicops_internals_arm64_gcc.h
new file mode 100644
index 00000000000..bb6a346eccb
--- /dev/null
+++ b/chromium/base/atomicops_internals_arm64_gcc.h
@@ -0,0 +1,307 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file is an internal atomic implementation, use base/atomicops.h instead.
+
+// TODO(rmcilroy): Investigate whether we can use __sync__ intrinsics instead of
+// the hand coded assembly without introducing perf regressions.
+// TODO(rmcilroy): Investigate whether we can use acquire / release versions of
+// exclusive load / store assembly instructions and do away with
+// the barriers.
+
+#ifndef BASE_ATOMICOPS_INTERNALS_ARM64_GCC_H_
+#define BASE_ATOMICOPS_INTERNALS_ARM64_GCC_H_
+
+#if defined(OS_QNX)
+#include <sys/cpuinline.h>
+#endif
+
+namespace base {
+namespace subtle {
+
+inline void MemoryBarrier() {
+ __asm__ __volatile__ ("dmb ish" ::: "memory"); // NOLINT
+}
+
+// NoBarrier versions of the operation include "memory" in the clobber list.
+// This is not required for direct usage of the NoBarrier versions of the
+// operations. However this is required for correctness when they are used as
+// part of the Acquire or Release versions, to ensure that nothing from outside
+// the call is reordered between the operation and the memory barrier. This does
+// not change the code generated, so has no or minimal impact on the
+// NoBarrier operations.
+
+inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
+ Atomic32 prev;
+ int32_t temp;
+
+ __asm__ __volatile__ ( // NOLINT
+ "0: \n\t"
+ "ldxr %w[prev], %[ptr] \n\t" // Load the previous value.
+ "cmp %w[prev], %w[old_value] \n\t"
+ "bne 1f \n\t"
+ "stxr %w[temp], %w[new_value], %[ptr] \n\t" // Try to store the new value.
+ "cbnz %w[temp], 0b \n\t" // Retry if it did not work.
+ "1: \n\t"
+ : [prev]"=&r" (prev),
+ [temp]"=&r" (temp),
+ [ptr]"+Q" (*ptr)
+ : [old_value]"IJr" (old_value),
+ [new_value]"r" (new_value)
+ : "cc", "memory"
+ ); // NOLINT
+
+ return prev;
+}
+
+inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
+ Atomic32 new_value) {
+ Atomic32 result;
+ int32_t temp;
+
+ __asm__ __volatile__ ( // NOLINT
+ "0: \n\t"
+ "ldxr %w[result], %[ptr] \n\t" // Load the previous value.
+ "stxr %w[temp], %w[new_value], %[ptr] \n\t" // Try to store the new value.
+ "cbnz %w[temp], 0b \n\t" // Retry if it did not work.
+ : [result]"=&r" (result),
+ [temp]"=&r" (temp),
+ [ptr]"+Q" (*ptr)
+ : [new_value]"r" (new_value)
+ : "memory"
+ ); // NOLINT
+
+ return result;
+}
+
+inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
+ Atomic32 increment) {
+ Atomic32 result;
+ int32_t temp;
+
+ __asm__ __volatile__ ( // NOLINT
+ "0: \n\t"
+ "ldxr %w[result], %[ptr] \n\t" // Load the previous value.
+ "add %w[result], %w[result], %w[increment]\n\t"
+ "stxr %w[temp], %w[result], %[ptr] \n\t" // Try to store the result.
+ "cbnz %w[temp], 0b \n\t" // Retry on failure.
+ : [result]"=&r" (result),
+ [temp]"=&r" (temp),
+ [ptr]"+Q" (*ptr)
+ : [increment]"IJr" (increment)
+ : "memory"
+ ); // NOLINT
+
+ return result;
+}
+
+inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
+ Atomic32 increment) {
+ MemoryBarrier();
+ Atomic32 result = NoBarrier_AtomicIncrement(ptr, increment);
+ MemoryBarrier();
+
+ return result;
+}
+
+inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
+ Atomic32 prev = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
+ MemoryBarrier();
+
+ return prev;
+}
+
+inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
+ MemoryBarrier();
+ Atomic32 prev = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
+
+ return prev;
+}
+
+inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
+ *ptr = value;
+}
+
+inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
+ *ptr = value;
+ MemoryBarrier();
+}
+
+inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
+ __asm__ __volatile__ ( // NOLINT
+ "stlr %w[value], %[ptr] \n\t"
+ : [ptr]"=Q" (*ptr)
+ : [value]"r" (value)
+ : "memory"
+ ); // NOLINT
+}
+
+inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
+ return *ptr;
+}
+
+inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
+ Atomic32 value;
+
+ __asm__ __volatile__ ( // NOLINT
+ "ldar %w[value], %[ptr] \n\t"
+ : [value]"=r" (value)
+ : [ptr]"Q" (*ptr)
+ : "memory"
+ ); // NOLINT
+
+ return value;
+}
+
+inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
+ MemoryBarrier();
+ return *ptr;
+}
+
+// 64-bit versions of the operations.
+// See the 32-bit versions for comments.
+
+inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
+ Atomic64 old_value,
+ Atomic64 new_value) {
+ Atomic64 prev;
+ int32_t temp;
+
+ __asm__ __volatile__ ( // NOLINT
+ "0: \n\t"
+ "ldxr %[prev], %[ptr] \n\t"
+ "cmp %[prev], %[old_value] \n\t"
+ "bne 1f \n\t"
+ "stxr %w[temp], %[new_value], %[ptr] \n\t"
+ "cbnz %w[temp], 0b \n\t"
+ "1: \n\t"
+ : [prev]"=&r" (prev),
+ [temp]"=&r" (temp),
+ [ptr]"+Q" (*ptr)
+ : [old_value]"IJr" (old_value),
+ [new_value]"r" (new_value)
+ : "cc", "memory"
+ ); // NOLINT
+
+ return prev;
+}
+
+inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr,
+ Atomic64 new_value) {
+ Atomic64 result;
+ int32_t temp;
+
+ __asm__ __volatile__ ( // NOLINT
+ "0: \n\t"
+ "ldxr %[result], %[ptr] \n\t"
+ "stxr %w[temp], %[new_value], %[ptr] \n\t"
+ "cbnz %w[temp], 0b \n\t"
+ : [result]"=&r" (result),
+ [temp]"=&r" (temp),
+ [ptr]"+Q" (*ptr)
+ : [new_value]"r" (new_value)
+ : "memory"
+ ); // NOLINT
+
+ return result;
+}
+
+inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
+ Atomic64 increment) {
+ Atomic64 result;
+ int32_t temp;
+
+ __asm__ __volatile__ ( // NOLINT
+ "0: \n\t"
+ "ldxr %[result], %[ptr] \n\t"
+ "add %[result], %[result], %[increment] \n\t"
+ "stxr %w[temp], %[result], %[ptr] \n\t"
+ "cbnz %w[temp], 0b \n\t"
+ : [result]"=&r" (result),
+ [temp]"=&r" (temp),
+ [ptr]"+Q" (*ptr)
+ : [increment]"IJr" (increment)
+ : "memory"
+ ); // NOLINT
+
+ return result;
+}
+
+inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
+ Atomic64 increment) {
+ MemoryBarrier();
+ Atomic64 result = NoBarrier_AtomicIncrement(ptr, increment);
+ MemoryBarrier();
+
+ return result;
+}
+
+inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
+ Atomic64 old_value,
+ Atomic64 new_value) {
+ Atomic64 prev = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
+ MemoryBarrier();
+
+ return prev;
+}
+
+inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
+ Atomic64 old_value,
+ Atomic64 new_value) {
+ MemoryBarrier();
+ Atomic64 prev = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
+
+ return prev;
+}
+
+inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
+ *ptr = value;
+}
+
+inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
+ *ptr = value;
+ MemoryBarrier();
+}
+
+inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
+ __asm__ __volatile__ ( // NOLINT
+ "stlr %x[value], %[ptr] \n\t"
+ : [ptr]"=Q" (*ptr)
+ : [value]"r" (value)
+ : "memory"
+ ); // NOLINT
+}
+
+inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
+ return *ptr;
+}
+
+inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
+ Atomic64 value;
+
+ __asm__ __volatile__ ( // NOLINT
+ "ldar %x[value], %[ptr] \n\t"
+ : [value]"=r" (value)
+ : [ptr]"Q" (*ptr)
+ : "memory"
+ ); // NOLINT
+
+ return value;
+}
+
+inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
+ MemoryBarrier();
+ return *ptr;
+}
+
+} // namespace base::subtle
+} // namespace base
+
+#endif // BASE_ATOMICOPS_INTERNALS_ARM64_GCC_H_
diff --git a/chromium/base/atomicops_internals_arm_gcc.h b/chromium/base/atomicops_internals_arm_gcc.h
index 9f4fe2e586e..e654afa7d27 100644
--- a/chromium/base/atomicops_internals_arm_gcc.h
+++ b/chromium/base/atomicops_internals_arm_gcc.h
@@ -9,6 +9,10 @@
#ifndef BASE_ATOMICOPS_INTERNALS_ARM_GCC_H_
#define BASE_ATOMICOPS_INTERNALS_ARM_GCC_H_
+#if defined(OS_QNX)
+#include <sys/cpuinline.h>
+#endif
+
namespace base {
namespace subtle {
@@ -40,10 +44,15 @@ namespace subtle {
//
inline void MemoryBarrier() {
- // Note: This is a function call, which is also an implicit compiler
- // barrier.
+#if defined(OS_LINUX) || defined(OS_ANDROID)
+ // Note: This is a function call, which is also an implicit compiler barrier.
typedef void (*KernelMemoryBarrierFunc)();
((KernelMemoryBarrierFunc)0xffff0fa0)();
+#elif defined(OS_QNX)
+ __cpu_membarrier();
+#else
+#error MemoryBarrier() is not implemented on this platform.
+#endif
}
// An ARM toolchain would only define one of these depending on which
@@ -54,7 +63,7 @@ inline void MemoryBarrier() {
defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || \
defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \
defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \
- defined(__ARM_ARCH_6KZ__) || defined(__ARM_ARCH_6T2__)
+ defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__)
inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
diff --git a/chromium/base/atomicops_internals_mac.h b/chromium/base/atomicops_internals_mac.h
index 658ed54879f..ccbb896e4cb 100644
--- a/chromium/base/atomicops_internals_mac.h
+++ b/chromium/base/atomicops_internals_mac.h
@@ -12,7 +12,7 @@
namespace base {
namespace subtle {
-inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32 *ptr,
+inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
Atomic32 prev_value;
@@ -26,7 +26,7 @@ inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32 *ptr,
return prev_value;
}
-inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32 *ptr,
+inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
Atomic32 new_value) {
Atomic32 old_value;
do {
@@ -36,13 +36,13 @@ inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32 *ptr,
return old_value;
}
-inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32 *ptr,
+inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
Atomic32 increment) {
return OSAtomicAdd32(increment, const_cast<Atomic32*>(ptr));
}
-inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32 *ptr,
- Atomic32 increment) {
+inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
+ Atomic32 increment) {
return OSAtomicAdd32Barrier(increment, const_cast<Atomic32*>(ptr));
}
@@ -50,7 +50,7 @@ inline void MemoryBarrier() {
OSMemoryBarrier();
}
-inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32 *ptr,
+inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
Atomic32 prev_value;
@@ -64,7 +64,7 @@ inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32 *ptr,
return prev_value;
}
-inline Atomic32 Release_CompareAndSwap(volatile Atomic32 *ptr,
+inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
return Acquire_CompareAndSwap(ptr, old_value, new_value);
@@ -74,12 +74,12 @@ inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
*ptr = value;
}
-inline void Acquire_Store(volatile Atomic32 *ptr, Atomic32 value) {
+inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
*ptr = value;
MemoryBarrier();
}
-inline void Release_Store(volatile Atomic32 *ptr, Atomic32 value) {
+inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
MemoryBarrier();
*ptr = value;
}
@@ -88,13 +88,13 @@ inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
return *ptr;
}
-inline Atomic32 Acquire_Load(volatile const Atomic32 *ptr) {
+inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
Atomic32 value = *ptr;
MemoryBarrier();
return value;
}
-inline Atomic32 Release_Load(volatile const Atomic32 *ptr) {
+inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
MemoryBarrier();
return *ptr;
}
@@ -103,7 +103,7 @@ inline Atomic32 Release_Load(volatile const Atomic32 *ptr) {
// 64-bit implementation on 64-bit platform
-inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64 *ptr,
+inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
Atomic64 old_value,
Atomic64 new_value) {
Atomic64 prev_value;
@@ -117,7 +117,7 @@ inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64 *ptr,
return prev_value;
}
-inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64 *ptr,
+inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr,
Atomic64 new_value) {
Atomic64 old_value;
do {
@@ -127,18 +127,18 @@ inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64 *ptr,
return old_value;
}
-inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64 *ptr,
+inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
Atomic64 increment) {
return OSAtomicAdd64(increment, reinterpret_cast<volatile int64_t*>(ptr));
}
-inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64 *ptr,
+inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
Atomic64 increment) {
return OSAtomicAdd64Barrier(increment,
reinterpret_cast<volatile int64_t*>(ptr));
}
-inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64 *ptr,
+inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
Atomic64 old_value,
Atomic64 new_value) {
Atomic64 prev_value;
@@ -152,7 +152,7 @@ inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64 *ptr,
return prev_value;
}
-inline Atomic64 Release_CompareAndSwap(volatile Atomic64 *ptr,
+inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
Atomic64 old_value,
Atomic64 new_value) {
// The lib kern interface does not distinguish between
@@ -164,12 +164,12 @@ inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
*ptr = value;
}
-inline void Acquire_Store(volatile Atomic64 *ptr, Atomic64 value) {
+inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
*ptr = value;
MemoryBarrier();
}
-inline void Release_Store(volatile Atomic64 *ptr, Atomic64 value) {
+inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
MemoryBarrier();
*ptr = value;
}
@@ -178,13 +178,13 @@ inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
return *ptr;
}
-inline Atomic64 Acquire_Load(volatile const Atomic64 *ptr) {
+inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
Atomic64 value = *ptr;
MemoryBarrier();
return value;
}
-inline Atomic64 Release_Load(volatile const Atomic64 *ptr) {
+inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
MemoryBarrier();
return *ptr;
}
diff --git a/chromium/base/atomicops_internals_tsan.h b/chromium/base/atomicops_internals_tsan.h
index 44d64009c70..24382fd9c01 100644
--- a/chromium/base/atomicops_internals_tsan.h
+++ b/chromium/base/atomicops_internals_tsan.h
@@ -8,358 +8,168 @@
#ifndef BASE_ATOMICOPS_INTERNALS_TSAN_H_
#define BASE_ATOMICOPS_INTERNALS_TSAN_H_
-#include "base/base_export.h"
-
-// This struct is not part of the public API of this module; clients may not
-// use it. (However, it's exported via BASE_EXPORT because clients implicitly
-// do use it at link time by inlining these functions.)
-// Features of this x86. Values may not be correct before main() is run,
-// but are set conservatively.
-struct AtomicOps_x86CPUFeatureStruct {
- bool has_amd_lock_mb_bug; // Processor has AMD memory-barrier bug; do lfence
- // after acquire compare-and-swap.
- bool has_sse2; // Processor has SSE2.
-};
-BASE_EXPORT extern struct AtomicOps_x86CPUFeatureStruct
- AtomicOps_Internalx86CPUFeatures;
-
-#define ATOMICOPS_COMPILER_BARRIER() __asm__ __volatile__("" : : : "memory")
+#include <sanitizer/tsan_interface_atomic.h>
namespace base {
namespace subtle {
-#ifndef TSAN_INTERFACE_ATOMIC_H
-#define TSAN_INTERFACE_ATOMIC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef char __tsan_atomic8;
-typedef short __tsan_atomic16; // NOLINT
-typedef int __tsan_atomic32;
-typedef long __tsan_atomic64; // NOLINT
-
-#if defined(__SIZEOF_INT128__) \
- || (__clang_major__ * 100 + __clang_minor__ >= 302)
-typedef __int128 __tsan_atomic128;
-#define __TSAN_HAS_INT128 1
-#else
-typedef char __tsan_atomic128;
-#define __TSAN_HAS_INT128 0
-#endif
-
-typedef enum {
- __tsan_memory_order_relaxed,
- __tsan_memory_order_consume,
- __tsan_memory_order_acquire,
- __tsan_memory_order_release,
- __tsan_memory_order_acq_rel,
- __tsan_memory_order_seq_cst,
-} __tsan_memory_order;
-
-__tsan_atomic8 __tsan_atomic8_load(const volatile __tsan_atomic8 *a,
- __tsan_memory_order mo);
-__tsan_atomic16 __tsan_atomic16_load(const volatile __tsan_atomic16 *a,
- __tsan_memory_order mo);
-__tsan_atomic32 __tsan_atomic32_load(const volatile __tsan_atomic32 *a,
- __tsan_memory_order mo);
-__tsan_atomic64 __tsan_atomic64_load(const volatile __tsan_atomic64 *a,
- __tsan_memory_order mo);
-__tsan_atomic128 __tsan_atomic128_load(const volatile __tsan_atomic128 *a,
- __tsan_memory_order mo);
-
-void __tsan_atomic8_store(volatile __tsan_atomic8 *a, __tsan_atomic8 v,
- __tsan_memory_order mo);
-void __tsan_atomic16_store(volatile __tsan_atomic16 *a, __tsan_atomic16 v,
- __tsan_memory_order mo);
-void __tsan_atomic32_store(volatile __tsan_atomic32 *a, __tsan_atomic32 v,
- __tsan_memory_order mo);
-void __tsan_atomic64_store(volatile __tsan_atomic64 *a, __tsan_atomic64 v,
- __tsan_memory_order mo);
-void __tsan_atomic128_store(volatile __tsan_atomic128 *a, __tsan_atomic128 v,
- __tsan_memory_order mo);
-
-__tsan_atomic8 __tsan_atomic8_exchange(volatile __tsan_atomic8 *a,
- __tsan_atomic8 v, __tsan_memory_order mo);
-__tsan_atomic16 __tsan_atomic16_exchange(volatile __tsan_atomic16 *a,
- __tsan_atomic16 v, __tsan_memory_order mo);
-__tsan_atomic32 __tsan_atomic32_exchange(volatile __tsan_atomic32 *a,
- __tsan_atomic32 v, __tsan_memory_order mo);
-__tsan_atomic64 __tsan_atomic64_exchange(volatile __tsan_atomic64 *a,
- __tsan_atomic64 v, __tsan_memory_order mo);
-__tsan_atomic128 __tsan_atomic128_exchange(volatile __tsan_atomic128 *a,
- __tsan_atomic128 v, __tsan_memory_order mo);
-
-__tsan_atomic8 __tsan_atomic8_fetch_add(volatile __tsan_atomic8 *a,
- __tsan_atomic8 v, __tsan_memory_order mo);
-__tsan_atomic16 __tsan_atomic16_fetch_add(volatile __tsan_atomic16 *a,
- __tsan_atomic16 v, __tsan_memory_order mo);
-__tsan_atomic32 __tsan_atomic32_fetch_add(volatile __tsan_atomic32 *a,
- __tsan_atomic32 v, __tsan_memory_order mo);
-__tsan_atomic64 __tsan_atomic64_fetch_add(volatile __tsan_atomic64 *a,
- __tsan_atomic64 v, __tsan_memory_order mo);
-__tsan_atomic128 __tsan_atomic128_fetch_add(volatile __tsan_atomic128 *a,
- __tsan_atomic128 v, __tsan_memory_order mo);
-
-__tsan_atomic8 __tsan_atomic8_fetch_and(volatile __tsan_atomic8 *a,
- __tsan_atomic8 v, __tsan_memory_order mo);
-__tsan_atomic16 __tsan_atomic16_fetch_and(volatile __tsan_atomic16 *a,
- __tsan_atomic16 v, __tsan_memory_order mo);
-__tsan_atomic32 __tsan_atomic32_fetch_and(volatile __tsan_atomic32 *a,
- __tsan_atomic32 v, __tsan_memory_order mo);
-__tsan_atomic64 __tsan_atomic64_fetch_and(volatile __tsan_atomic64 *a,
- __tsan_atomic64 v, __tsan_memory_order mo);
-__tsan_atomic128 __tsan_atomic128_fetch_and(volatile __tsan_atomic128 *a,
- __tsan_atomic128 v, __tsan_memory_order mo);
-
-__tsan_atomic8 __tsan_atomic8_fetch_or(volatile __tsan_atomic8 *a,
- __tsan_atomic8 v, __tsan_memory_order mo);
-__tsan_atomic16 __tsan_atomic16_fetch_or(volatile __tsan_atomic16 *a,
- __tsan_atomic16 v, __tsan_memory_order mo);
-__tsan_atomic32 __tsan_atomic32_fetch_or(volatile __tsan_atomic32 *a,
- __tsan_atomic32 v, __tsan_memory_order mo);
-__tsan_atomic64 __tsan_atomic64_fetch_or(volatile __tsan_atomic64 *a,
- __tsan_atomic64 v, __tsan_memory_order mo);
-__tsan_atomic128 __tsan_atomic128_fetch_or(volatile __tsan_atomic128 *a,
- __tsan_atomic128 v, __tsan_memory_order mo);
-
-__tsan_atomic8 __tsan_atomic8_fetch_xor(volatile __tsan_atomic8 *a,
- __tsan_atomic8 v, __tsan_memory_order mo);
-__tsan_atomic16 __tsan_atomic16_fetch_xor(volatile __tsan_atomic16 *a,
- __tsan_atomic16 v, __tsan_memory_order mo);
-__tsan_atomic32 __tsan_atomic32_fetch_xor(volatile __tsan_atomic32 *a,
- __tsan_atomic32 v, __tsan_memory_order mo);
-__tsan_atomic64 __tsan_atomic64_fetch_xor(volatile __tsan_atomic64 *a,
- __tsan_atomic64 v, __tsan_memory_order mo);
-__tsan_atomic128 __tsan_atomic128_fetch_xor(volatile __tsan_atomic128 *a,
- __tsan_atomic128 v, __tsan_memory_order mo);
-
-__tsan_atomic8 __tsan_atomic8_fetch_nand(volatile __tsan_atomic8 *a,
- __tsan_atomic8 v, __tsan_memory_order mo);
-__tsan_atomic16 __tsan_atomic16_fetch_nand(volatile __tsan_atomic16 *a,
- __tsan_atomic16 v, __tsan_memory_order mo);
-__tsan_atomic32 __tsan_atomic32_fetch_nand(volatile __tsan_atomic32 *a,
- __tsan_atomic32 v, __tsan_memory_order mo);
-__tsan_atomic64 __tsan_atomic64_fetch_nand(volatile __tsan_atomic64 *a,
- __tsan_atomic64 v, __tsan_memory_order mo);
-__tsan_atomic128 __tsan_atomic128_fetch_nand(volatile __tsan_atomic128 *a,
- __tsan_atomic128 v, __tsan_memory_order mo);
-
-int __tsan_atomic8_compare_exchange_weak(volatile __tsan_atomic8 *a,
- __tsan_atomic8 *c, __tsan_atomic8 v, __tsan_memory_order mo,
- __tsan_memory_order fail_mo);
-int __tsan_atomic16_compare_exchange_weak(volatile __tsan_atomic16 *a,
- __tsan_atomic16 *c, __tsan_atomic16 v, __tsan_memory_order mo,
- __tsan_memory_order fail_mo);
-int __tsan_atomic32_compare_exchange_weak(volatile __tsan_atomic32 *a,
- __tsan_atomic32 *c, __tsan_atomic32 v, __tsan_memory_order mo,
- __tsan_memory_order fail_mo);
-int __tsan_atomic64_compare_exchange_weak(volatile __tsan_atomic64 *a,
- __tsan_atomic64 *c, __tsan_atomic64 v, __tsan_memory_order mo,
- __tsan_memory_order fail_mo);
-int __tsan_atomic128_compare_exchange_weak(volatile __tsan_atomic128 *a,
- __tsan_atomic128 *c, __tsan_atomic128 v, __tsan_memory_order mo,
- __tsan_memory_order fail_mo);
-
-int __tsan_atomic8_compare_exchange_strong(volatile __tsan_atomic8 *a,
- __tsan_atomic8 *c, __tsan_atomic8 v, __tsan_memory_order mo,
- __tsan_memory_order fail_mo);
-int __tsan_atomic16_compare_exchange_strong(volatile __tsan_atomic16 *a,
- __tsan_atomic16 *c, __tsan_atomic16 v, __tsan_memory_order mo,
- __tsan_memory_order fail_mo);
-int __tsan_atomic32_compare_exchange_strong(volatile __tsan_atomic32 *a,
- __tsan_atomic32 *c, __tsan_atomic32 v, __tsan_memory_order mo,
- __tsan_memory_order fail_mo);
-int __tsan_atomic64_compare_exchange_strong(volatile __tsan_atomic64 *a,
- __tsan_atomic64 *c, __tsan_atomic64 v, __tsan_memory_order mo,
- __tsan_memory_order fail_mo);
-int __tsan_atomic128_compare_exchange_strong(volatile __tsan_atomic128 *a,
- __tsan_atomic128 *c, __tsan_atomic128 v, __tsan_memory_order mo,
- __tsan_memory_order fail_mo);
-
-__tsan_atomic8 __tsan_atomic8_compare_exchange_val(
- volatile __tsan_atomic8 *a, __tsan_atomic8 c, __tsan_atomic8 v,
- __tsan_memory_order mo, __tsan_memory_order fail_mo);
-__tsan_atomic16 __tsan_atomic16_compare_exchange_val(
- volatile __tsan_atomic16 *a, __tsan_atomic16 c, __tsan_atomic16 v,
- __tsan_memory_order mo, __tsan_memory_order fail_mo);
-__tsan_atomic32 __tsan_atomic32_compare_exchange_val(
- volatile __tsan_atomic32 *a, __tsan_atomic32 c, __tsan_atomic32 v,
- __tsan_memory_order mo, __tsan_memory_order fail_mo);
-__tsan_atomic64 __tsan_atomic64_compare_exchange_val(
- volatile __tsan_atomic64 *a, __tsan_atomic64 c, __tsan_atomic64 v,
- __tsan_memory_order mo, __tsan_memory_order fail_mo);
-__tsan_atomic128 __tsan_atomic128_compare_exchange_val(
- volatile __tsan_atomic128 *a, __tsan_atomic128 c, __tsan_atomic128 v,
- __tsan_memory_order mo, __tsan_memory_order fail_mo);
-
-void __tsan_atomic_thread_fence(__tsan_memory_order mo);
-void __tsan_atomic_signal_fence(__tsan_memory_order mo);
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // #ifndef TSAN_INTERFACE_ATOMIC_H
-
-inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32 *ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
+inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
Atomic32 cmp = old_value;
__tsan_atomic32_compare_exchange_strong(ptr, &cmp, new_value,
__tsan_memory_order_relaxed, __tsan_memory_order_relaxed);
return cmp;
}
-inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32 *ptr,
- Atomic32 new_value) {
+inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
+ Atomic32 new_value) {
return __tsan_atomic32_exchange(ptr, new_value,
__tsan_memory_order_relaxed);
}
-inline Atomic32 Acquire_AtomicExchange(volatile Atomic32 *ptr,
- Atomic32 new_value) {
+inline Atomic32 Acquire_AtomicExchange(volatile Atomic32* ptr,
+ Atomic32 new_value) {
return __tsan_atomic32_exchange(ptr, new_value,
__tsan_memory_order_acquire);
}
-inline Atomic32 Release_AtomicExchange(volatile Atomic32 *ptr,
- Atomic32 new_value) {
+inline Atomic32 Release_AtomicExchange(volatile Atomic32* ptr,
+ Atomic32 new_value) {
return __tsan_atomic32_exchange(ptr, new_value,
__tsan_memory_order_release);
}
-inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32 *ptr,
- Atomic32 increment) {
+inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
+ Atomic32 increment) {
return increment + __tsan_atomic32_fetch_add(ptr, increment,
__tsan_memory_order_relaxed);
}
-inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32 *ptr,
- Atomic32 increment) {
+inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
+ Atomic32 increment) {
return increment + __tsan_atomic32_fetch_add(ptr, increment,
__tsan_memory_order_acq_rel);
}
-inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32 *ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
+inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
Atomic32 cmp = old_value;
__tsan_atomic32_compare_exchange_strong(ptr, &cmp, new_value,
__tsan_memory_order_acquire, __tsan_memory_order_acquire);
return cmp;
}
-inline Atomic32 Release_CompareAndSwap(volatile Atomic32 *ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
+inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
+ Atomic32 old_value,
+ Atomic32 new_value) {
Atomic32 cmp = old_value;
__tsan_atomic32_compare_exchange_strong(ptr, &cmp, new_value,
__tsan_memory_order_release, __tsan_memory_order_relaxed);
return cmp;
}
-inline void NoBarrier_Store(volatile Atomic32 *ptr, Atomic32 value) {
+inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
__tsan_atomic32_store(ptr, value, __tsan_memory_order_relaxed);
}
-inline void Acquire_Store(volatile Atomic32 *ptr, Atomic32 value) {
+inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
__tsan_atomic32_store(ptr, value, __tsan_memory_order_relaxed);
__tsan_atomic_thread_fence(__tsan_memory_order_seq_cst);
}
-inline void Release_Store(volatile Atomic32 *ptr, Atomic32 value) {
+inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
__tsan_atomic32_store(ptr, value, __tsan_memory_order_release);
}
-inline Atomic32 NoBarrier_Load(volatile const Atomic32 *ptr) {
+inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
return __tsan_atomic32_load(ptr, __tsan_memory_order_relaxed);
}
-inline Atomic32 Acquire_Load(volatile const Atomic32 *ptr) {
+inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
return __tsan_atomic32_load(ptr, __tsan_memory_order_acquire);
}
-inline Atomic32 Release_Load(volatile const Atomic32 *ptr) {
+inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
__tsan_atomic_thread_fence(__tsan_memory_order_seq_cst);
return __tsan_atomic32_load(ptr, __tsan_memory_order_relaxed);
}
-inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64 *ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
+inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
+ Atomic64 old_value,
+ Atomic64 new_value) {
Atomic64 cmp = old_value;
__tsan_atomic64_compare_exchange_strong(ptr, &cmp, new_value,
__tsan_memory_order_relaxed, __tsan_memory_order_relaxed);
return cmp;
}
-inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64 *ptr,
- Atomic64 new_value) {
+inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr,
+ Atomic64 new_value) {
return __tsan_atomic64_exchange(ptr, new_value, __tsan_memory_order_relaxed);
}
-inline Atomic64 Acquire_AtomicExchange(volatile Atomic64 *ptr,
- Atomic64 new_value) {
+inline Atomic64 Acquire_AtomicExchange(volatile Atomic64* ptr,
+ Atomic64 new_value) {
return __tsan_atomic64_exchange(ptr, new_value, __tsan_memory_order_acquire);
}
-inline Atomic64 Release_AtomicExchange(volatile Atomic64 *ptr,
- Atomic64 new_value) {
+inline Atomic64 Release_AtomicExchange(volatile Atomic64* ptr,
+ Atomic64 new_value) {
return __tsan_atomic64_exchange(ptr, new_value, __tsan_memory_order_release);
}
-inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64 *ptr,
- Atomic64 increment) {
+inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
+ Atomic64 increment) {
return increment + __tsan_atomic64_fetch_add(ptr, increment,
__tsan_memory_order_relaxed);
}
-inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64 *ptr,
- Atomic64 increment) {
+inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
+ Atomic64 increment) {
return increment + __tsan_atomic64_fetch_add(ptr, increment,
__tsan_memory_order_acq_rel);
}
-inline void NoBarrier_Store(volatile Atomic64 *ptr, Atomic64 value) {
+inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
__tsan_atomic64_store(ptr, value, __tsan_memory_order_relaxed);
}
-inline void Acquire_Store(volatile Atomic64 *ptr, Atomic64 value) {
+inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
__tsan_atomic64_store(ptr, value, __tsan_memory_order_relaxed);
__tsan_atomic_thread_fence(__tsan_memory_order_seq_cst);
}
-inline void Release_Store(volatile Atomic64 *ptr, Atomic64 value) {
+inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
__tsan_atomic64_store(ptr, value, __tsan_memory_order_release);
}
-inline Atomic64 NoBarrier_Load(volatile const Atomic64 *ptr) {
+inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
return __tsan_atomic64_load(ptr, __tsan_memory_order_relaxed);
}
-inline Atomic64 Acquire_Load(volatile const Atomic64 *ptr) {
+inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
return __tsan_atomic64_load(ptr, __tsan_memory_order_acquire);
}
-inline Atomic64 Release_Load(volatile const Atomic64 *ptr) {
+inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
__tsan_atomic_thread_fence(__tsan_memory_order_seq_cst);
return __tsan_atomic64_load(ptr, __tsan_memory_order_relaxed);
}
-inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64 *ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
+inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
+ Atomic64 old_value,
+ Atomic64 new_value) {
Atomic64 cmp = old_value;
__tsan_atomic64_compare_exchange_strong(ptr, &cmp, new_value,
__tsan_memory_order_acquire, __tsan_memory_order_acquire);
return cmp;
}
-inline Atomic64 Release_CompareAndSwap(volatile Atomic64 *ptr,
- Atomic64 old_value,
- Atomic64 new_value) {
+inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
+ Atomic64 old_value,
+ Atomic64 new_value) {
Atomic64 cmp = old_value;
__tsan_atomic64_compare_exchange_strong(ptr, &cmp, new_value,
__tsan_memory_order_release, __tsan_memory_order_relaxed);
@@ -373,6 +183,4 @@ inline void MemoryBarrier() {
} // namespace base::subtle
} // namespace base
-#undef ATOMICOPS_COMPILER_BARRIER
-
#endif // BASE_ATOMICOPS_INTERNALS_TSAN_H_
diff --git a/chromium/base/atomicops_internals_x86_gcc.cc b/chromium/base/atomicops_internals_x86_gcc.cc
index 933ca51896d..3f47458ad19 100644
--- a/chromium/base/atomicops_internals_x86_gcc.cc
+++ b/chromium/base/atomicops_internals_x86_gcc.cc
@@ -5,10 +5,10 @@
// This module gets enough CPU information to optimize the
// atomicops module on x86.
+#include <stdint.h>
#include <string.h>
#include "base/atomicops.h"
-#include "base/basictypes.h"
// This file only makes sense with atomicops_internals_x86_gcc.h -- it
// depends on structs that are defined in that file. If atomicops.h
@@ -21,16 +21,16 @@
// must preserve that register's value across cpuid instructions.
#if defined(__i386__)
#define cpuid(a, b, c, d, inp) \
- asm ("mov %%ebx, %%edi\n" \
- "cpuid\n" \
- "xchg %%edi, %%ebx\n" \
- : "=a" (a), "=D" (b), "=c" (c), "=d" (d) : "a" (inp))
-#elif defined (__x86_64__)
+ asm("mov %%ebx, %%edi\n" \
+ "cpuid\n" \
+ "xchg %%edi, %%ebx\n" \
+ : "=a" (a), "=D" (b), "=c" (c), "=d" (d) : "a" (inp))
+#elif defined(__x86_64__)
#define cpuid(a, b, c, d, inp) \
- asm ("mov %%rbx, %%rdi\n" \
- "cpuid\n" \
- "xchg %%rdi, %%rbx\n" \
- : "=a" (a), "=D" (b), "=c" (c), "=d" (d) : "a" (inp))
+ asm("mov %%rbx, %%rdi\n" \
+ "cpuid\n" \
+ "xchg %%rdi, %%rbx\n" \
+ : "=a" (a), "=D" (b), "=c" (c), "=d" (d) : "a" (inp))
#endif
#if defined(cpuid) // initialize the struct only on x86
@@ -40,15 +40,16 @@
// default values should hopefully be pretty safe.
struct AtomicOps_x86CPUFeatureStruct AtomicOps_Internalx86CPUFeatures = {
false, // bug can't exist before process spawns multiple threads
- false, // no SSE2
};
+namespace {
+
// Initialize the AtomicOps_Internalx86CPUFeatures struct.
-static void AtomicOps_Internalx86CPUFeaturesInit() {
- uint32 eax;
- uint32 ebx;
- uint32 ecx;
- uint32 edx;
+void AtomicOps_Internalx86CPUFeaturesInit() {
+ uint32_t eax;
+ uint32_t ebx;
+ uint32_t ecx;
+ uint32_t edx;
// Get vendor string (issue CPUID with eax = 0)
cpuid(eax, ebx, ecx, edx, 0);
@@ -80,13 +81,8 @@ static void AtomicOps_Internalx86CPUFeaturesInit() {
} else {
AtomicOps_Internalx86CPUFeatures.has_amd_lock_mb_bug = false;
}
-
- // edx bit 26 is SSE2 which we use to tell use whether we can use mfence
- AtomicOps_Internalx86CPUFeatures.has_sse2 = ((edx >> 26) & 1);
}
-namespace {
-
class AtomicOpsx86Initializer {
public:
AtomicOpsx86Initializer() {
diff --git a/chromium/base/atomicops_internals_x86_gcc.h b/chromium/base/atomicops_internals_x86_gcc.h
index ac02b17f5db..7386fabea9c 100644
--- a/chromium/base/atomicops_internals_x86_gcc.h
+++ b/chromium/base/atomicops_internals_x86_gcc.h
@@ -17,7 +17,6 @@
struct AtomicOps_x86CPUFeatureStruct {
bool has_amd_lock_mb_bug; // Processor has AMD memory-barrier bug; do lfence
// after acquire compare-and-swap.
- bool has_sse2; // Processor has SSE2.
};
BASE_EXPORT extern struct AtomicOps_x86CPUFeatureStruct
AtomicOps_Internalx86CPUFeatures;
@@ -92,10 +91,6 @@ inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
*ptr = value;
}
-#if defined(__x86_64__)
-
-// 64-bit implementations of memory barrier can be simpler, because it
-// "mfence" is guaranteed to exist.
inline void MemoryBarrier() {
__asm__ __volatile__("mfence" : : : "memory");
}
@@ -105,28 +100,6 @@ inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
MemoryBarrier();
}
-#else
-
-inline void MemoryBarrier() {
- if (AtomicOps_Internalx86CPUFeatures.has_sse2) {
- __asm__ __volatile__("mfence" : : : "memory");
- } else { // mfence is faster but not present on PIII
- Atomic32 x = 0;
- NoBarrier_AtomicExchange(&x, 0); // acts as a barrier on PIII
- }
-}
-
-inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
- if (AtomicOps_Internalx86CPUFeatures.has_sse2) {
- *ptr = value;
- __asm__ __volatile__("mfence" : : : "memory");
- } else {
- NoBarrier_AtomicExchange(ptr, value);
- // acts as a barrier on PIII
- }
-}
-#endif
-
inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
ATOMICOPS_COMPILER_BARRIER();
*ptr = value; // An x86 store acts as a release barrier.
diff --git a/chromium/base/atomicops_internals_x86_msvc.h b/chromium/base/atomicops_internals_x86_msvc.h
index 3a2c72ddb47..0269d894a1f 100644
--- a/chromium/base/atomicops_internals_x86_msvc.h
+++ b/chromium/base/atomicops_internals_x86_msvc.h
@@ -9,6 +9,10 @@
#include <windows.h>
+#include <intrin.h>
+
+#include "base/macros.h"
+
#if defined(ARCH_CPU_64_BITS)
// windows.h #defines this (only on x64). This causes problems because the
// public API also uses MemoryBarrier at the public name for this fence. So, on
@@ -24,7 +28,7 @@ namespace subtle {
inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
- LONG result = InterlockedCompareExchange(
+ LONG result = _InterlockedCompareExchange(
reinterpret_cast<volatile LONG*>(ptr),
static_cast<LONG>(new_value),
static_cast<LONG>(old_value));
@@ -33,7 +37,7 @@ inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
Atomic32 new_value) {
- LONG result = InterlockedExchange(
+ LONG result = _InterlockedExchange(
reinterpret_cast<volatile LONG*>(ptr),
static_cast<LONG>(new_value));
return static_cast<Atomic32>(result);
@@ -41,7 +45,7 @@ inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
Atomic32 increment) {
- return InterlockedExchangeAdd(
+ return _InterlockedExchangeAdd(
reinterpret_cast<volatile LONG*>(ptr),
static_cast<LONG>(increment)) + increment;
}
diff --git a/chromium/base/atomicops_unittest.cc b/chromium/base/atomicops_unittest.cc
index d73a098c488..3fd55974722 100644
--- a/chromium/base/atomicops_unittest.cc
+++ b/chromium/base/atomicops_unittest.cc
@@ -4,9 +4,9 @@
#include "base/atomicops.h"
+#include <stdint.h>
#include <string.h>
-#include "base/port.h"
#include "testing/gtest/include/gtest/gtest.h"
template <class AtomicType>
@@ -91,7 +91,7 @@ static void TestCompareAndSwap() {
// Use test value that has non-zero bits in both halves, more for testing
// 64-bit implementation on 32-bit platforms.
- const AtomicType k_test_val = (GG_ULONGLONG(1) <<
+ const AtomicType k_test_val = (static_cast<uint64_t>(1) <<
(NUM_BITS(AtomicType) - 2)) + 11;
value = k_test_val;
prev = base::subtle::NoBarrier_CompareAndSwap(&value, 0, 5);
@@ -114,7 +114,7 @@ static void TestAtomicExchange() {
// Use test value that has non-zero bits in both halves, more for testing
// 64-bit implementation on 32-bit platforms.
- const AtomicType k_test_val = (GG_ULONGLONG(1) <<
+ const AtomicType k_test_val = (static_cast<uint64_t>(1) <<
(NUM_BITS(AtomicType) - 2)) + 11;
value = k_test_val;
new_value = base::subtle::NoBarrier_AtomicExchange(&value, k_test_val);
@@ -131,7 +131,7 @@ static void TestAtomicExchange() {
template <class AtomicType>
static void TestAtomicIncrementBounds() {
// Test at rollover boundary between int_max and int_min
- AtomicType test_val = (GG_ULONGLONG(1) <<
+ AtomicType test_val = (static_cast<uint64_t>(1) <<
(NUM_BITS(AtomicType) - 1));
AtomicType value = -1 ^ test_val;
AtomicType new_value = base::subtle::NoBarrier_AtomicIncrement(&value, 1);
@@ -142,7 +142,7 @@ static void TestAtomicIncrementBounds() {
EXPECT_EQ(-1 ^ test_val, value);
// Test at 32-bit boundary for 64-bit atomic type.
- test_val = GG_ULONGLONG(1) << (NUM_BITS(AtomicType) / 2);
+ test_val = static_cast<uint64_t>(1) << (NUM_BITS(AtomicType) / 2);
value = test_val - 1;
new_value = base::subtle::NoBarrier_AtomicIncrement(&value, 1);
EXPECT_EQ(test_val, value);
diff --git a/chromium/base/base.gyp b/chromium/base/base.gyp
index 407d49d0582..5544a4b5a27 100644
--- a/chromium/base/base.gyp
+++ b/chromium/base/base.gyp
@@ -40,14 +40,6 @@
['chromeos==1', {
'sources/': [ ['include', '_chromeos\\.cc$'] ]
}],
- ['toolkit_uses_gtk==1', {
- 'dependencies': [
- '../build/linux/system.gyp:gtk',
- ],
- 'export_dependent_settings': [
- '../build/linux/system.gyp:gtk',
- ],
- }],
],
'dependencies': [
'symbolize',
@@ -56,9 +48,6 @@
'defines': [
'USE_SYMBOLIZE',
],
- 'cflags': [
- '-Wno-write-strings',
- ],
}, { # desktop_linux == 0 and chromeos == 0
'sources/': [
['exclude', '/xdg_user_dirs/'],
@@ -73,22 +62,6 @@
'../build/linux/system.gyp:glib',
],
}],
- ['use_x11==1', {
- 'dependencies': [
- '../build/linux/system.gyp:x11',
- ],
- 'export_dependent_settings': [
- '../build/linux/system.gyp:x11',
- ],
- }],
- ['use_aura==1 and use_x11==1', {
- 'dependencies': [
- '../build/linux/system.gyp:xrandr',
- ],
- 'export_dependent_settings': [
- '../build/linux/system.gyp:xrandr',
- ],
- }],
['OS == "android" and _toolset == "host"', {
# Always build base as a static_library for host toolset, even if
# we're doing a component build. Specifically, we only care about the
@@ -105,19 +78,6 @@
# hence the *_android.cc files are included but the actual code
# doesn't have OS_ANDROID / ANDROID defined.
'conditions': [
- # Host build on linux depends on system.gyp::gtk as
- # default linux build has TOOLKIT_GTK defined.
- ['host_os == "linux"', {
- 'sources/': [
- ['include', '^atomicops_internals_x86_gcc\\.cc$'],
- ],
- 'dependencies': [
- '../build/linux/system.gyp:gtk',
- ],
- 'export_dependent_settings': [
- '../build/linux/system.gyp:gtk',
- ],
- }],
['host_os == "mac"', {
'sources/': [
['exclude', '^native_library_linux\\.cc$'],
@@ -131,7 +91,7 @@
}],
['OS == "android" and _toolset == "target"', {
'conditions': [
- ['target_arch == "ia32"', {
+ ['target_arch == "ia32" or target_arch == "x64"', {
'sources/': [
['include', '^atomicops_internals_x86_gcc\\.cc$'],
],
@@ -146,9 +106,6 @@
'base_jni_headers',
'../third_party/ashmem/ashmem.gyp:ashmem',
],
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)/base',
- ],
'link_settings': {
'libraries': [
'-llog',
@@ -186,7 +143,7 @@
],
},
'conditions': [
- ['linux_use_tcmalloc==0', {
+ ['use_allocator!="tcmalloc"', {
'defines': [
'NO_TCMALLOC',
],
@@ -198,6 +155,32 @@
}],
],
}],
+ ['OS == "win"', {
+ # Specify delayload for base.dll.
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'DelayLoadDLLs': [
+ 'powrprof.dll',
+ ],
+ 'AdditionalDependencies': [
+ 'powrprof.lib',
+ ],
+ },
+ },
+ # Specify delayload for components that link with base.lib.
+ 'all_dependent_settings': {
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'DelayLoadDLLs': [
+ 'powrprof.dll',
+ ],
+ 'AdditionalDependencies': [
+ 'powrprof.lib',
+ ],
+ },
+ },
+ },
+ }],
['OS == "mac" or (OS == "ios" and _toolset == "host")', {
'link_settings': {
'libraries': [
@@ -237,16 +220,8 @@
}],
],
}],
- ['use_system_nspr==1', {
- 'dependencies': [
- 'third_party/nspr/nspr.gyp:nspr',
- ],
- }],
],
'sources': [
- 'third_party/nspr/prcpucfg.h',
- 'third_party/nspr/prcpucfg_win.h',
- 'third_party/nspr/prtypes.h',
'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
'async_socket_io_handler.h',
@@ -258,14 +233,10 @@
'event_recorder_win.cc',
'linux_util.cc',
'linux_util.h',
- 'md5.cc',
- 'md5.h',
'message_loop/message_pump_android.cc',
'message_loop/message_pump_android.h',
'message_loop/message_pump_glib.cc',
'message_loop/message_pump_glib.h',
- 'message_loop/message_pump_gtk.cc',
- 'message_loop/message_pump_gtk.h',
'message_loop/message_pump_io_ios.cc',
'message_loop/message_pump_io_ios.h',
'message_loop/message_pump_observer.h',
@@ -273,8 +244,6 @@
'message_loop/message_pump_libevent.h',
'message_loop/message_pump_mac.h',
'message_loop/message_pump_mac.mm',
- 'message_loop/message_pump_x11.cc',
- 'message_loop/message_pump_x11.h',
'metrics/field_trial.cc',
'metrics/field_trial.h',
'posix/file_descriptor_shuffle.cc',
@@ -290,6 +259,7 @@
'variables': {
'enable_wexit_time_destructors': 1,
'optimize': 'max',
+ 'base_i18n_target': 1,
},
'dependencies': [
'base',
@@ -298,58 +268,29 @@
'../third_party/icu/icu.gyp:icuuc',
],
'conditions': [
- ['toolkit_uses_gtk==1', {
- 'dependencies': [
- # i18n/rtl.cc uses gtk
- '../build/linux/system.gyp:gtk',
- ],
- }],
['OS == "win"', {
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [
4267,
],
}],
+ ['icu_use_data_file_flag==1', {
+ 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'],
+ }, { # else icu_use_data_file_flag !=1
+ 'conditions': [
+ ['OS=="win"', {
+ 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED'],
+ }, {
+ 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC'],
+ }],
+ ],
+ }],
],
'export_dependent_settings': [
'base',
],
- 'defines': [
- 'BASE_I18N_IMPLEMENTATION',
- ],
- 'sources': [
- 'i18n/base_i18n_export.h',
- 'i18n/bidi_line_iterator.cc',
- 'i18n/bidi_line_iterator.h',
- 'i18n/break_iterator.cc',
- 'i18n/break_iterator.h',
- 'i18n/char_iterator.cc',
- 'i18n/char_iterator.h',
- 'i18n/case_conversion.cc',
- 'i18n/case_conversion.h',
- 'i18n/file_util_icu.cc',
- 'i18n/file_util_icu.h',
- 'i18n/i18n_constants.cc',
- 'i18n/i18n_constants.h',
- 'i18n/icu_encoding_detection.cc',
- 'i18n/icu_encoding_detection.h',
- 'i18n/icu_string_conversions.cc',
- 'i18n/icu_string_conversions.h',
- 'i18n/icu_util.cc',
- 'i18n/icu_util.h',
- 'i18n/number_formatting.cc',
- 'i18n/number_formatting.h',
- 'i18n/rtl.cc',
- 'i18n/rtl.h',
- 'i18n/string_compare.cc',
- 'i18n/string_compare.h',
- 'i18n/string_search.cc',
- 'i18n/string_search.h',
- 'i18n/time_formatting.cc',
- 'i18n/time_formatting.h',
- 'i18n/timezone.cc',
- 'i18n/timezone.h',
- ],
+
+
},
{
'target_name': 'base_message_loop_tests',
@@ -390,6 +331,7 @@
'prefs/persistent_pref_store.h',
'prefs/pref_change_registrar.cc',
'prefs/pref_change_registrar.h',
+ 'prefs/pref_filter.h',
'prefs/pref_member.cc',
'prefs/pref_member.h',
'prefs/pref_notifier.h',
@@ -414,6 +356,7 @@
'prefs/scoped_user_pref_update.h',
'prefs/value_map_pref_store.cc',
'prefs/value_map_pref_store.h',
+ 'prefs/writeable_pref_store.h',
],
},
{
@@ -471,8 +414,7 @@
'target_name': 'base_unittests',
'type': '<(gtest_target_type)',
'sources': [
- # Tests.
- 'android/activity_status_unittest.cc',
+ 'android/application_status_listener_unittest.cc',
'android/jni_android_unittest.cc',
'android/jni_array_unittest.cc',
'android/jni_string_unittest.cc',
@@ -484,6 +426,7 @@
'atomicops_unittest.cc',
'barrier_closure_unittest.cc',
'base64_unittest.cc',
+ 'big_endian_unittest.cc',
'bind_unittest.cc',
'bind_unittest.nc',
'bits_unittest.cc',
@@ -506,6 +449,7 @@
'debug/proc_maps_linux_unittest.cc',
'debug/stack_trace_unittest.cc',
'debug/trace_event_memory_unittest.cc',
+ 'debug/trace_event_synthetic_delay_unittest.cc',
'debug/trace_event_system_stats_monitor_unittest.cc',
'debug/trace_event_unittest.cc',
'debug/trace_event_unittest.h',
@@ -516,12 +460,14 @@
'file_version_info_unittest.cc',
'files/dir_reader_posix_unittest.cc',
'files/file_path_unittest.cc',
+ 'files/file_proxy_unittest.cc',
'files/file_unittest.cc',
'files/file_util_proxy_unittest.cc',
'files/important_file_writer_unittest.cc',
'files/scoped_temp_dir_unittest.cc',
'gmock_unittest.cc',
'guid_unittest.cc',
+ 'hash_unittest.cc',
'id_map_unittest.cc',
'i18n/break_iterator_unittest.cc',
'i18n/char_iterator_unittest.cc',
@@ -530,6 +476,7 @@
'i18n/icu_string_conversions_unittest.cc',
'i18n/number_formatting_unittest.cc',
'i18n/rtl_unittest.cc',
+ 'i18n/streaming_utf8_validator_unittest.cc',
'i18n/string_search_unittest.cc',
'i18n/time_formatting_unittest.cc',
'i18n/timezone_unittest.cc',
@@ -552,9 +499,8 @@
'mac/scoped_sending_event_unittest.mm',
'md5_unittest.cc',
'memory/aligned_memory_unittest.cc',
- 'memory/discardable_memory_allocator_android_unittest.cc',
+ 'memory/discardable_memory_manager_unittest.cc',
'memory/discardable_memory_unittest.cc',
- 'memory/discardable_memory_provider_unittest.cc',
'memory/linked_ptr_unittest.cc',
'memory/ref_counted_memory_unittest.cc',
'memory/ref_counted_unittest.cc',
@@ -577,6 +523,7 @@
'metrics/field_trial_unittest.cc',
'metrics/histogram_base_unittest.cc',
'metrics/histogram_delta_serialization_unittest.cc',
+ 'metrics/histogram_snapshot_manager_unittest.cc',
'metrics/histogram_unittest.cc',
'metrics/sparse_histogram_unittest.cc',
'metrics/stats_table_unittest.cc',
@@ -608,9 +555,9 @@
'process/process_util_unittest.cc',
'profiler/tracked_time_unittest.cc',
'rand_util_unittest.cc',
- 'safe_numerics_unittest.cc',
- 'safe_numerics_unittest.nc',
+ 'numerics/safe_numerics_unittest.cc',
'scoped_clear_errno_unittest.cc',
+ 'scoped_generic_unittest.cc',
'scoped_native_library_unittest.cc',
'scoped_observer.h',
'security_unittest.cc',
@@ -631,6 +578,7 @@
'strings/sys_string_conversions_unittest.cc',
'strings/utf_offset_string_conversions_unittest.cc',
'strings/utf_string_conversions_unittest.cc',
+ 'supports_user_data_unittest.cc',
'sync_socket_unittest.cc',
'synchronization/cancellation_flag_unittest.cc',
'synchronization/condition_variable_unittest.cc',
@@ -639,10 +587,12 @@
'synchronization/waitable_event_watcher_unittest.cc',
'sys_info_unittest.cc',
'system_monitor/system_monitor_unittest.cc',
+ 'task/cancelable_task_tracker_unittest.cc',
'task_runner_util_unittest.cc',
'template_util_unittest.cc',
'test/expectations/expectation_unittest.cc',
'test/expectations/parser_unittest.cc',
+ 'test/statistics_delta_reader_unittest.cc',
'test/test_reg_util_win_unittest.cc',
'test/trace_event_analyzer_unittest.cc',
'threading/non_thread_safe_unittest.cc',
@@ -662,6 +612,7 @@
'time/time_unittest.cc',
'time/time_win_unittest.cc',
'timer/hi_res_timer_manager_unittest.cc',
+ 'timer/mock_timer_unittest.cc',
'timer/timer_unittest.cc',
'tools_sanity_unittest.cc',
'tracked_objects_unittest.cc',
@@ -710,21 +661,10 @@
'module_dir': 'base'
},
'conditions': [
- ['desktop_linux == 1 or chromeos == 1', {
- 'defines': [
- 'USE_SYMBOLIZE',
- ],
- }],
['OS == "android"', {
'dependencies': [
'android/jni_generator/jni_generator.gyp:jni_generator_tests',
- ],
- 'conditions': [
- ['gtest_target_type == "shared_library"', {
- 'dependencies': [
- '../testing/android/native_test.gyp:native_test_native_code',
- ],
- }],
+ '../testing/android/native_test.gyp:native_test_native_code',
],
}],
['OS == "ios" and _toolset != "host"', {
@@ -752,27 +692,19 @@
],
}],
['desktop_linux == 1 or chromeos == 1', {
+ 'defines': [
+ 'USE_SYMBOLIZE',
+ ],
'sources!': [
'file_version_info_unittest.cc',
],
'conditions': [
- [ 'toolkit_uses_gtk==1', {
+ [ 'desktop_linux==1', {
'sources': [
'nix/xdg_util_unittest.cc',
],
- 'dependencies': [
- '../build/linux/system.gyp:gtk',
- ]
}],
],
- 'dependencies': [
- '../build/linux/system.gyp:ssl',
- ],
- }],
- ['use_x11 == 1', {
- 'dependencies': [
- '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
- ],
}],
['use_glib == 1', {
'dependencies': [
@@ -788,18 +720,13 @@
'message_loop/message_pump_glib_unittest.cc',
]
}],
- ['OS == "linux" and linux_use_tcmalloc==1', {
+ ['OS == "linux" and use_allocator!="none"', {
'dependencies': [
'allocator/allocator.gyp:allocator',
],
},
],
['OS == "win"', {
- # This is needed to trigger the dll copy step on windows.
- # TODO(mark): This should not be necessary.
- 'dependencies': [
- '../third_party/icu/icu.gyp:icudata',
- ],
'sources!': [
'file_descriptor_shuffle_unittest.cc',
'files/dir_reader_posix_unittest.cc',
@@ -810,38 +737,29 @@
'msvs_disabled_warnings': [
4267,
],
- # This is needed so base_unittests uses the allocator shim, as
- # SecurityTest.MemoryAllocationRestriction* tests are dependent
- # on tcmalloc.
- # TODO(wfh): crbug.com/246278 Move tcmalloc specific tests into
- # their own test suite.
'conditions': [
+ # This is needed so base_unittests uses the allocator shim, as
+ # SecurityTest.MemoryAllocationRestriction* tests are dependent
+ # on tcmalloc.
+ # TODO(wfh): crbug.com/246278 Move tcmalloc specific tests into
+ # their own test suite.
['win_use_allocator_shim==1', {
'dependencies': [
'allocator/allocator.gyp:allocator',
],
}],
+ ['icu_use_data_file_flag==0', {
+ # This is needed to trigger the dll copy step on windows.
+ # TODO(mark): This should not be necessary.
+ 'dependencies': [
+ '../third_party/icu/icu.gyp:icudata',
+ ],
+ }],
],
}, { # OS != "win"
'dependencies': [
'../third_party/libevent/libevent.gyp:libevent'
],
- 'sources/': [
- ['exclude', '^win/'],
- ],
- 'sources!': [
- 'win/win_util_unittest.cc',
- ],
- }],
- ['use_aura==1 and use_x11==1', {
- 'sources': [
- 'x11/edid_parser_x11_unittest.cc',
- ],
- }],
- ['use_system_nspr==1', {
- 'dependencies': [
- 'third_party/nspr/nspr.gyp:nspr',
- ],
}],
], # conditions
'target_conditions': [
@@ -849,12 +767,18 @@
'sources/': [
# Pull in specific Mac files for iOS (which have been filtered out
# by file name rules).
- ['include', '^mac/objc_property_releaser_unittest\\.mm$'],
['include', '^mac/bind_objc_block_unittest\\.mm$'],
+ ['include', '^mac/foundation_util_unittest\\.mm$',],
+ ['include', '^mac/objc_property_releaser_unittest\\.mm$'],
['include', '^mac/scoped_nsobject_unittest\\.mm$'],
['include', '^sys_string_conversions_mac_unittest\\.mm$'],
],
}],
+ ['OS == "android" and _toolset == "target"', {
+ 'sources': [
+ 'memory/discardable_memory_ashmem_allocator_unittest.cc',
+ ],
+ }],
['OS == "android"', {
'sources/': [
['include', '^debug/proc_maps_linux_unittest\\.cc$'],
@@ -863,6 +787,41 @@
], # target_conditions
},
{
+ 'target_name': 'base_perftests',
+ 'type': '<(gtest_target_type)',
+ 'dependencies': [
+ 'base',
+ 'test_support_base',
+ '../testing/gtest.gyp:gtest',
+ ],
+ 'sources': [
+ 'threading/thread_perftest.cc',
+ 'test/run_all_unittests.cc',
+ '../testing/perf/perf_test.cc'
+ ],
+ 'conditions': [
+ ['OS == "android"', {
+ 'dependencies': [
+ '../testing/android/native_test.gyp:native_test_native_code',
+ ],
+ }],
+ ],
+ },
+ {
+ 'target_name': 'base_i18n_perftests',
+ 'type': '<(gtest_target_type)',
+ 'dependencies': [
+ 'test_support_base',
+ 'test_support_perf',
+ '../testing/gtest.gyp:gtest',
+ 'base_i18n',
+ 'base',
+ ],
+ 'sources': [
+ 'i18n/streaming_utf8_validator_perftest.cc',
+ ],
+ },
+ {
'target_name': 'test_support_base',
'type': 'static_library',
'dependencies': [
@@ -878,12 +837,6 @@
'base',
],
'conditions': [
- ['toolkit_uses_gtk==1', {
- 'dependencies': [
- # test_suite initializes GTK.
- '../build/linux/system.gyp:gtk',
- ],
- }],
['os_posix==0', {
'sources!': [
'test/scoped_locale.cc',
@@ -900,9 +853,6 @@
'base_unittests_jni_headers',
'base_java_unittest_support',
],
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)/base',
- ],
}],
],
'sources': [
@@ -952,6 +902,8 @@
'test/simple_test_clock.h',
'test/simple_test_tick_clock.cc',
'test/simple_test_tick_clock.h',
+ 'test/statistics_delta_reader.cc',
+ 'test/statistics_delta_reader.h',
'test/task_runner_test_template.cc',
'test/task_runner_test_template.h',
'test/test_file_util.cc',
@@ -1020,17 +972,51 @@
'PERF_TEST',
],
},
+ },
+ {
+ 'target_name': 'sanitizer_options',
+ 'type': 'static_library',
+ 'toolsets': ['host', 'target'],
+ 'variables': {
+ # Every target is going to depend on sanitizer_options, so allow
+ # this one to depend on itself.
+ 'prune_self_dependency': 1,
+ # Do not let 'none' targets depend on this one, they don't need to.
+ 'link_dependency': 1,
+ },
+ 'sources': [
+ 'debug/sanitizer_options.cc',
+ ],
+ 'include_dirs': [
+ '..',
+ ],
+ # Some targets may want to opt-out from ASan, TSan and MSan and link
+ # without the corresponding runtime libraries. We drop the libc++
+ # dependency and omit the compiler flags to avoid bringing instrumented
+ # code to those targets.
'conditions': [
- ['toolkit_uses_gtk==1', {
- 'dependencies': [
- # Needed to handle the #include chain:
- # base/test/perf_test_suite.h
- # base/test/test_suite.h
- # gtk/gtk.h
- '../build/linux/system.gyp:gtk',
+ ['use_custom_libcxx==1', {
+ 'dependencies!': [
+ '../third_party/libc++/libc++.gyp:libcxx_proxy',
+ ],
+ }],
+ ['tsan==1', {
+ 'sources': [
+ 'debug/tsan_suppressions.cc',
],
}],
],
+ 'cflags!': [
+ '-fsanitize=address',
+ '-fsanitize=thread',
+ '-fsanitize=memory',
+ '-fsanitize-memory-track-origins',
+ ],
+ 'direct_dependent_settings': {
+ 'ldflags': [
+ '-Wl,-u_sanitizer_options_link_helper',
+ ],
+ },
},
],
'conditions': [
@@ -1046,12 +1032,26 @@
'base',
],
},
+ {
+ 'target_name': 'build_utf8_validator_tables',
+ 'type': 'executable',
+ 'toolsets': ['host'],
+ 'dependencies': [
+ 'base',
+ '../third_party/icu/icu.gyp:icuuc',
+ ],
+ 'sources': [
+ 'i18n/build_utf8_validator_tables.cc'
+ ],
+ },
],
}],
['OS == "win" and target_arch=="ia32"', {
'targets': [
+ # The base_win64 target here allows us to use base for Win64 targets
+ # (the normal build is 32 bits).
{
- 'target_name': 'base_nacl_win64',
+ 'target_name': 'base_win64',
'type': '<(component)',
'variables': {
'base_target': 1,
@@ -1059,6 +1059,7 @@
'dependencies': [
'base_static_win64',
'allocator/allocator.gyp:allocator_extension_thunks_win64',
+ '../third_party/modp_b64/modp_b64.gyp:modp_b64_win64',
'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
],
# TODO(gregoryd): direct_dependent_settings should be shared with the
@@ -1069,12 +1070,9 @@
],
},
'defines': [
+ 'BASE_WIN64',
'<@(nacl_win64_defines)',
],
- 'sources!': [
- # base64.cc depends on modp_b64.
- 'base64.cc',
- ],
'configurations': {
'Common_Base': {
'msvs_target_platform': 'x64',
@@ -1087,6 +1085,61 @@
],
}],
],
+ # Specify delayload for base_win64.dll.
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'DelayLoadDLLs': [
+ 'powrprof.dll',
+ ],
+ 'AdditionalDependencies': [
+ 'powrprof.lib',
+ ],
+ },
+ },
+ # Specify delayload for components that link with base_win64.lib.
+ 'all_dependent_settings': {
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'DelayLoadDLLs': [
+ 'powrprof.dll',
+ ],
+ 'AdditionalDependencies': [
+ 'powrprof.lib',
+ ],
+ },
+ },
+ },
+ # TODO(rvargas): Bug 78117. Remove this.
+ 'msvs_disabled_warnings': [
+ 4244,
+ 4996,
+ 4267,
+ ],
+ 'sources': [
+ 'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
+ 'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
+ 'async_socket_io_handler.h',
+ 'async_socket_io_handler_posix.cc',
+ 'async_socket_io_handler_win.cc',
+ 'auto_reset.h',
+ 'event_recorder.h',
+ 'event_recorder_stubs.cc',
+ 'event_recorder_win.cc',
+ 'linux_util.cc',
+ 'linux_util.h',
+ 'md5.cc',
+ 'md5.h',
+ 'message_loop/message_pump_observer.h',
+ 'message_loop/message_pump_libevent.cc',
+ 'message_loop/message_pump_libevent.h',
+ 'metrics/field_trial.cc',
+ 'metrics/field_trial.h',
+ 'posix/file_descriptor_shuffle.cc',
+ 'posix/file_descriptor_shuffle.h',
+ 'sync_socket.h',
+ 'sync_socket_win.cc',
+ 'sync_socket_posix.cc',
+ ],
},
{
'target_name': 'base_i18n_nacl_win64',
@@ -1138,7 +1191,7 @@
},
},
'defines': [
- 'NACL_WIN64',
+ '<@(nacl_win64_defines)',
],
# TODO(rvargas): Bug 78117. Remove this.
'msvs_disabled_warnings': [
@@ -1170,6 +1223,9 @@
'cflags!': [
'-Wextra',
],
+ 'defines': [
+ 'GLOG_BUILD_CONFIG_INCLUDE="build/build_config.h"',
+ ],
'sources': [
'third_party/symbolize/config.h',
'third_party/symbolize/demangle.cc',
@@ -1221,12 +1277,14 @@
'target_name': 'base_jni_headers',
'type': 'none',
'sources': [
- 'android/java/src/org/chromium/base/ActivityStatus.java',
+ 'android/java/src/org/chromium/base/ApplicationStatus.java',
'android/java/src/org/chromium/base/BuildInfo.java',
'android/java/src/org/chromium/base/CommandLine.java',
'android/java/src/org/chromium/base/ContentUriUtils.java',
'android/java/src/org/chromium/base/CpuFeatures.java',
+ 'android/java/src/org/chromium/base/EventLog.java',
'android/java/src/org/chromium/base/ImportantFileWriterAndroid.java',
+ 'android/java/src/org/chromium/base/library_loader/LibraryLoader.java',
'android/java/src/org/chromium/base/MemoryPressureListener.java',
'android/java/src/org/chromium/base/JavaHandlerThread.java',
'android/java/src/org/chromium/base/PathService.java',
@@ -1235,17 +1293,10 @@
'android/java/src/org/chromium/base/SystemMessageHandler.java',
'android/java/src/org/chromium/base/SysUtils.java',
'android/java/src/org/chromium/base/ThreadUtils.java',
- ],
- 'conditions': [
- ['google_tv==1', {
- 'sources': [
- 'android/java/src/org/chromium/base/ContextTypes.java',
- ],
- }],
+ 'android/java/src/org/chromium/base/TraceEvent.java',
],
'variables': {
'jni_gen_package': 'base',
- 'jni_generator_ptr_type': 'long',
},
'includes': [ '../build/jni_generator.gypi' ],
},
@@ -1261,14 +1312,31 @@
'includes': [ '../build/jni_generator.gypi' ],
},
{
+ 'target_name': 'base_native_libraries_gen',
+ 'type': 'none',
+ 'sources': [
+ 'android/java/templates/NativeLibraries.template',
+ ],
+ 'variables': {
+ 'package_name': 'org/chromium/base/library_loader',
+ 'include_path': 'android/java/templates',
+ 'template_deps': [
+ 'android/java/templates/native_libraries_array.h'
+ ],
+ },
+ 'includes': [ '../build/android/java_cpp_template.gypi' ],
+ },
+ {
'target_name': 'base_java',
'type': 'none',
'variables': {
'java_in_dir': '../base/android/java',
+ 'jar_excluded_classes': [ '*/NativeLibraries.class' ],
},
'dependencies': [
- 'base_java_activity_state',
+ 'base_java_application_state',
'base_java_memory_pressure_level_list',
+ 'base_native_libraries_gen',
],
'includes': [ '../build/java.gypi' ],
'conditions': [
@@ -1291,18 +1359,18 @@
'includes': [ '../build/java.gypi' ],
},
{
- 'target_name': 'base_java_activity_state',
+ 'target_name': 'base_java_application_state',
'type': 'none',
- # This target is used to auto-generate ActivityState.java
+ # This target is used to auto-generate ApplicationState.java
# from a template file. The source file contains a list of
# Java constant declarations matching the ones in
- # android/activity_state_list.h.
+ # android/application_state_list.h.
'sources': [
- 'android/java/src/org/chromium/base/ActivityState.template',
+ 'android/java/src/org/chromium/base/ApplicationState.template',
],
'variables': {
'package_name': 'org/chromium/base',
- 'template_deps': ['android/activity_state_list.h'],
+ 'template_deps': ['android/application_state_list.h'],
},
'includes': [ '../build/android/java_cpp_template.gypi' ],
},
@@ -1341,6 +1409,48 @@
},
'includes': [ '../build/java.gypi' ],
},
+ {
+ 'target_name': 'chromium_android_linker',
+ 'type': 'shared_library',
+ 'conditions': [
+ ['android_webview_build == 0 and target_arch != "x64" and \
+ target_arch != "arm64"', {
+ # Avoid breaking the webview/64-bit build because they
+ # don't have <(android_ndk_root)/crazy_linker.gyp.
+ # Note that webview never uses the linker anyway.
+ # Note there is no 64-bit support in the linker.
+ 'sources': [
+ 'android/linker/linker_jni.cc',
+ ],
+ # The crazy linker is never instrumented.
+ 'cflags!': [
+ '-finstrument-functions',
+ ],
+ 'dependencies': [
+ # The NDK contains the crazy_linker here:
+ # '<(android_ndk_root)/crazy_linker.gyp:crazy_linker'
+ # However, we use our own fork. See bug 384700.
+ '../third_party/android_crazy_linker/crazy_linker.gyp:crazy_linker',
+ ],
+ }],
+ ],
+ },
+
+ ],
+ }],
+ ['OS == "android"', {
+ 'targets': [
+ {
+ 'target_name': 'base_perftests_apk',
+ 'type': 'none',
+ 'dependencies': [
+ 'base_perftests',
+ ],
+ 'variables': {
+ 'test_suite_name': 'base_perftests',
+ },
+ 'includes': [ '../build/apk_test.gypi' ],
+ },
],
}],
['OS == "win"', {
@@ -1359,13 +1469,7 @@
},
],
}],
- # Special target to wrap a gtest_target_type == shared_library
- # base_unittests into an android apk for execution.
- # TODO(jrg): lib.target comes from _InstallableTargetInstallPath()
- # in the gyp make generator. What is the correct way to extract
- # this path from gyp and into 'raw' for input to antfiles?
- # Hard-coding in the gypfile seems a poor choice.
- ['OS == "android" and gtest_target_type == "shared_library"', {
+ ['OS == "android"', {
'targets': [
{
'target_name': 'base_unittests_apk',
@@ -1376,7 +1480,6 @@
],
'variables': {
'test_suite_name': 'base_unittests',
- 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)base_unittests<(SHARED_LIB_SUFFIX)',
},
'includes': [ '../build/apk_test.gypi' ],
},
diff --git a/chromium/base/base.gypi b/chromium/base/base.gypi
index 11edab00968..c033dcbce1b 100644
--- a/chromium/base/base.gypi
+++ b/chromium/base/base.gypi
@@ -6,6 +6,7 @@
'target_defaults': {
'variables': {
'base_target': 0,
+ 'base_i18n_target': 0,
},
'target_conditions': [
# This part is shared between the targets defined below.
@@ -17,24 +18,16 @@
'third_party/dmg_fp/dtoa_wrapper.cc',
'third_party/icu/icu_utf.cc',
'third_party/icu/icu_utf.h',
- 'third_party/nspr/prcpucfg.h',
- 'third_party/nspr/prcpucfg_freebsd.h',
- 'third_party/nspr/prcpucfg_linux.h',
- 'third_party/nspr/prcpucfg_mac.h',
- 'third_party/nspr/prcpucfg_nacl.h',
- 'third_party/nspr/prcpucfg_openbsd.h',
- 'third_party/nspr/prcpucfg_solaris.h',
- 'third_party/nspr/prcpucfg_win.h',
'third_party/nspr/prtime.cc',
'third_party/nspr/prtime.h',
- 'third_party/nspr/prtypes.h',
+ 'third_party/superfasthash/superfasthash.c',
'third_party/xdg_mime/xdgmime.h',
'allocator/allocator_extension.cc',
'allocator/allocator_extension.h',
'allocator/type_profiler_control.cc',
'allocator/type_profiler_control.h',
- 'android/activity_status.cc',
- 'android/activity_status.h',
+ 'android/application_status_listener.cc',
+ 'android/application_status_listener.h',
'android/base_jni_registrar.cc',
'android/base_jni_registrar.h',
'android/build_info.cc',
@@ -44,6 +37,8 @@
'android/content_uri_utils.cc',
'android/content_uri_utils.h',
'android/cpu_features.cc',
+ 'android/event_log.cc',
+ 'android/event_log.h',
'android/fifo_utils.cc',
'android/fifo_utils.h',
'android/important_file_writer_android.cc',
@@ -54,12 +49,14 @@
'android/jni_android.h',
'android/jni_array.cc',
'android/jni_array.h',
- 'android/jni_helper.cc',
- 'android/jni_helper.h',
'android/jni_registrar.cc',
'android/jni_registrar.h',
'android/jni_string.cc',
'android/jni_string.h',
+ 'android/jni_weak_ref.cc',
+ 'android/jni_weak_ref.h',
+ 'android/library_loader/library_loader_hooks.cc',
+ 'android/library_loader/library_loader_hooks.h',
'android/memory_pressure_listener_android.cc',
'android/memory_pressure_listener_android.h',
'android/java_handler_thread.cc',
@@ -71,6 +68,8 @@
'android/sys_utils.cc',
'android/sys_utils.h',
'android/thread_utils.h',
+ 'android/trace_event_binding.cc',
+ 'android/trace_event_binding.h',
'at_exit.cc',
'at_exit.h',
'atomic_ref_count.h',
@@ -84,6 +83,8 @@
'atomicops_internals_x86_msvc.h',
'barrier_closure.cc',
'barrier_closure.h',
+ 'base64.cc',
+ 'base64.h',
'base_export.h',
'base_paths.cc',
'base_paths.h',
@@ -96,9 +97,9 @@
'base_paths_win.cc',
'base_paths_win.h',
'base_switches.h',
- 'base64.cc',
- 'base64.h',
'basictypes.h',
+ 'big_endian.cc',
+ 'big_endian.h',
'bind.h',
'bind_helpers.cc',
'bind_helpers.h',
@@ -126,17 +127,21 @@
'cpu.cc',
'cpu.h',
'critical_closure.h',
- 'critical_closure_ios.mm',
+ 'critical_closure_internal_ios.mm',
'debug/alias.cc',
'debug/alias.h',
+ 'debug/asan_invalid_access.cc',
+ 'debug/asan_invalid_access.h',
'debug/crash_logging.cc',
'debug/crash_logging.h',
- 'debug/debug_on_start_win.cc',
- 'debug/debug_on_start_win.h',
'debug/debugger.cc',
'debug/debugger.h',
'debug/debugger_posix.cc',
'debug/debugger_win.cc',
+ 'debug/dump_without_crashing.cc',
+ 'debug/dump_without_crashing.h',
+ 'debug/gdi_debug_util_win.cc',
+ 'debug/gdi_debug_util_win.h',
# This file depends on files from the 'allocator' target,
# but this target does not depend on 'allocator' (see
# allocator.gyp for details).
@@ -149,7 +154,6 @@
'debug/stack_trace.cc',
'debug/stack_trace.h',
'debug/stack_trace_android.cc',
- 'debug/stack_trace_ios.mm',
'debug/stack_trace_posix.cc',
'debug/stack_trace_win.cc',
'debug/trace_event.h',
@@ -157,6 +161,8 @@
'debug/trace_event_impl.cc',
'debug/trace_event_impl.h',
'debug/trace_event_impl_constants.cc',
+ 'debug/trace_event_synthetic_delay.cc',
+ 'debug/trace_event_synthetic_delay.h',
'debug/trace_event_system_stats_monitor.cc',
'debug/trace_event_memory.cc',
'debug/trace_event_memory.h',
@@ -192,11 +198,17 @@
'files/file_path_constants.cc',
'files/file_path_watcher.cc',
'files/file_path_watcher.h',
+ 'files/file_path_watcher_fsevents.cc',
+ 'files/file_path_watcher_fsevents.h',
'files/file_path_watcher_kqueue.cc',
+ 'files/file_path_watcher_kqueue.h',
'files/file_path_watcher_linux.cc',
+ 'files/file_path_watcher_mac.cc',
'files/file_path_watcher_stub.cc',
'files/file_path_watcher_win.cc',
'files/file_posix.cc',
+ 'files/file_proxy.cc',
+ 'files/file_proxy.h',
'files/file_util_proxy.cc',
'files/file_util_proxy.h',
'files/file_win.cc',
@@ -206,6 +218,8 @@
'files/memory_mapped_file.h',
'files/memory_mapped_file_posix.cc',
'files/memory_mapped_file_win.cc',
+ 'files/scoped_file.cc',
+ 'files/scoped_file.h',
'files/scoped_platform_file_closer.cc',
'files/scoped_platform_file_closer.h',
'files/scoped_temp_dir.cc',
@@ -268,6 +282,8 @@
'mac/mac_logging.cc',
'mac/mac_util.h',
'mac/mac_util.mm',
+ 'mac/mach_logging.cc',
+ 'mac/mach_logging.h',
'mac/objc_property_releaser.h',
'mac/objc_property_releaser.mm',
'mac/os_crash_dumps.cc',
@@ -281,6 +297,8 @@
'mac/scoped_launch_data.h',
'mac/scoped_mach_port.cc',
'mac/scoped_mach_port.h',
+ 'mac/scoped_mach_vm.cc',
+ 'mac/scoped_mach_vm.h',
'mac/scoped_nsautorelease_pool.h',
'mac/scoped_nsautorelease_pool.mm',
'mac/scoped_nsexception_enabler.h',
@@ -288,20 +306,25 @@
'mac/scoped_nsobject.h',
'mac/scoped_sending_event.h',
'mac/scoped_sending_event.mm',
+ 'mac/scoped_typeref.h',
'mac/sdk_forward_declarations.h',
+ 'mac/sdk_forward_declarations.mm',
+ 'macros.h',
+ 'md5.cc',
+ 'md5.h',
'memory/aligned_memory.cc',
'memory/aligned_memory.h',
+ 'memory/discardable_memory.cc',
'memory/discardable_memory.h',
- 'memory/discardable_memory_allocator_android.cc',
- 'memory/discardable_memory_allocator_android.h',
'memory/discardable_memory_android.cc',
- 'memory/discardable_memory_android.h',
'memory/discardable_memory_emulated.cc',
'memory/discardable_memory_emulated.h',
'memory/discardable_memory_linux.cc',
'memory/discardable_memory_mac.cc',
- 'memory/discardable_memory_provider.cc',
- 'memory/discardable_memory_provider.h',
+ 'memory/discardable_memory_malloc.cc',
+ 'memory/discardable_memory_malloc.h',
+ 'memory/discardable_memory_manager.cc',
+ 'memory/discardable_memory_manager.h',
'memory/discardable_memory_win.cc',
'memory/linked_ptr.h',
'memory/manual_constructor.h',
@@ -313,7 +336,6 @@
'memory/ref_counted_delete_on_message_loop.h',
'memory/ref_counted_memory.cc',
'memory/ref_counted_memory.h',
- 'memory/scoped_handle.h',
'memory/scoped_open_process.h',
'memory/scoped_policy.h',
'memory/scoped_ptr.h',
@@ -341,10 +363,9 @@
'message_loop/message_pump_android.h',
'message_loop/message_pump_default.cc',
'message_loop/message_pump_default.h',
- 'message_loop/message_pump_ozone.cc',
- 'message_loop/message_pump_ozone.h',
'message_loop/message_pump_win.cc',
'message_loop/message_pump_win.h',
+ 'message_loop/timer_slack.h',
'metrics/sample_map.cc',
'metrics/sample_map.h',
'metrics/sample_vector.cc',
@@ -370,6 +391,9 @@
'metrics/stats_counters.h',
'metrics/stats_table.cc',
'metrics/stats_table.h',
+ 'metrics/user_metrics.cc',
+ 'metrics/user_metrics.h',
+ 'metrics/user_metrics_action.h',
'move.h',
'native_library.h',
'native_library_mac.mm',
@@ -428,6 +452,7 @@
'process/launch_posix.cc',
'process/launch_win.cc',
'process/memory.h',
+ 'process/memory.cc',
'process/memory_linux.cc',
'process/memory_mac.mm',
'process/memory_win.cc',
@@ -474,9 +499,13 @@
'rand_util_win.cc',
'run_loop.cc',
'run_loop.h',
- 'safe_numerics.h',
+ 'numerics/safe_conversions.h',
+ 'numerics/safe_conversions_impl.h',
+ 'numerics/safe_math.h',
+ 'numerics/safe_math_impl.h',
'safe_strerror_posix.cc',
'safe_strerror_posix.h',
+ 'scoped_generic.h',
'scoped_native_library.cc',
'scoped_native_library.h',
'sequence_checker.h',
@@ -557,6 +586,8 @@
'sys_info_openbsd.cc',
'sys_info_posix.cc',
'sys_info_win.cc',
+ 'task/cancelable_task_tracker.cc',
+ 'task/cancelable_task_tracker.h',
'task_runner.cc',
'task_runner.h',
'task_runner_util.h',
@@ -588,7 +619,9 @@
'threading/thread_id_name_manager.cc',
'threading/thread_id_name_manager.h',
'threading/thread_local.h',
+ 'threading/thread_local_android.cc',
'threading/thread_local_posix.cc',
+ 'threading/thread_local_storage.cc',
'threading/thread_local_storage.h',
'threading/thread_local_storage_posix.cc',
'threading/thread_local_storage_win.cc',
@@ -620,6 +653,8 @@
'timer/hi_res_timer_manager.h',
'timer/hi_res_timer_manager_posix.cc',
'timer/hi_res_timer_manager_win.cc',
+ 'timer/mock_timer.cc',
+ 'timer/mock_timer.h',
'timer/timer.cc',
'timer/timer.h',
'tracked_objects.cc',
@@ -678,31 +713,12 @@
'win/shortcut.h',
'win/startup_information.cc',
'win/startup_information.h',
- 'win/text_services_message_filter.cc',
- 'win/text_services_message_filter.h',
'win/win_util.cc',
'win/win_util.h',
'win/windows_version.cc',
'win/windows_version.h',
'win/wrapped_window_proc.cc',
'win/wrapped_window_proc.h',
- 'x11/x11_error_tracker.cc',
- 'x11/x11_error_tracker.h',
- 'x11/x11_error_tracker_gtk.cc',
- ],
- 'conditions': [
- ['use_aura==1 and use_x11==1', {
- 'sources': [
- 'x11/edid_parser_x11.cc',
- 'x11/edid_parser_x11.h',
- ],
- }],
- ['google_tv==1', {
- 'sources': [
- 'android/context_types.cc',
- 'android/context_types.h',
- ],
- }],
],
'defines': [
'BASE_IMPLEMENTATION',
@@ -727,14 +743,6 @@
'message_loop/message_pump_glib.cc',
],
}],
- ['<(use_x11)==0 or >(nacl_untrusted_build)==1', {
- 'sources!': [
- 'message_loop/message_pump_x11.cc',
- ],
- }],
- ['<(toolkit_uses_gtk)==0 or >(nacl_untrusted_build)==1', {
- 'sources!': ['message_loop/message_pump_gtk.cc'],
- }],
['(OS != "linux" and <(os_bsd) != 1 and OS != "android") or >(nacl_untrusted_build)==1', {
'sources!': [
# Not automatically excluded by the *linux.cc rules.
@@ -752,7 +760,11 @@
'file_util.cc',
'file_util_posix.cc',
'files/file_enumerator_posix.cc',
+ 'files/file_path_watcher_fsevents.cc',
+ 'files/file_path_watcher_fsevents.h',
'files/file_path_watcher_kqueue.cc',
+ 'files/file_path_watcher_kqueue.h',
+ 'files/file_proxy.cc',
'files/file_util_proxy.cc',
'memory/shared_memory_posix.cc',
'native_library_posix.cc',
@@ -769,15 +781,24 @@
'third_party/dynamic_annotations/dynamic_annotations.c',
],
'sources/': [
- # Metrics won't work in the NaCl sandbox.
- ['exclude', '^metrics/'],
['include', '^threading/platform_thread_linux\\.cc$'],
],
}],
+ ['OS == "android" and _toolset == "target" and >(nacl_untrusted_build)==0', {
+ 'sources': [
+ 'memory/discardable_memory_ashmem_allocator.cc',
+ 'memory/discardable_memory_ashmem_allocator.h',
+ 'memory/discardable_memory_ashmem.cc',
+ 'memory/discardable_memory_ashmem.h',
+ ],
+ }],
['OS == "android" and >(nacl_untrusted_build)==0', {
'sources!': [
'base_paths_posix.cc',
+ 'files/file_path_watcher_fsevents.cc',
+ 'files/file_path_watcher_fsevents.h',
'files/file_path_watcher_kqueue.cc',
+ 'files/file_path_watcher_kqueue.h',
'files/file_path_watcher_stub.cc',
'power_monitor/power_monitor_device_source_posix.cc',
],
@@ -797,8 +818,12 @@
],
}],
['OS == "android" and _toolset == "host" and host_os == "linux"', {
+ 'defines': [
+ 'OS_ANDROID_HOST=Linux',
+ ],
'sources/': [
# Pull in specific files for host builds.
+ ['include', '^atomicops_internals_x86_gcc\\.cc$'],
['include', '^threading/platform_thread_linux\\.cc$'],
],
}],
@@ -820,8 +845,10 @@
['include', '^mac/bundle_locations\\.'],
['include', '^mac/foundation_util\\.'],
['include', '^mac/mac_logging\\.'],
+ ['include', '^mac/mach_logging\\.'],
['include', '^mac/objc_property_releaser\\.'],
['include', '^mac/scoped_mach_port\\.'],
+ ['include', '^mac/scoped_mach_vm\\.'],
['include', '^mac/scoped_nsautorelease_pool\\.'],
['include', '^mac/scoped_nsobject\\.'],
['include', '^memory/discardable_memory_mac\\.'],
@@ -836,6 +863,9 @@
['include', '^process/.*_ios\.(cc|mm)$'],
['include', '^process/memory_stubs\.cc$'],
['include', '^process/process_handle_posix\.cc$'],
+ ['exclude', 'files/file_path_watcher_fsevents.cc'],
+ ['exclude', 'files/file_path_watcher_fsevents.h'],
+ ['include', 'files/file_path_watcher_mac.cc'],
],
'sources': [
'process/memory_stubs.cc',
@@ -851,13 +881,11 @@
['include', '(^|/)(cocoa|mac)/'],
['exclude', '_ios(_unittest)?\\.(h|cc|mm?)$'],
['exclude', '(^|/)ios/'],
+ ['exclude', 'files/file_path_watcher_fsevents.cc'],
+ ['exclude', 'files/file_path_watcher_fsevents.h'],
+ ['include', 'files/file_path_watcher_mac.cc'],
]
}],
- ['OS != "mac" or >(nacl_untrusted_build)==1', {
- 'sources!': [
- 'mac/scoped_aedesc.h'
- ],
- }],
# For now, just test the *BSD platforms enough to exclude them.
# Subsequent changes will include them further.
['OS != "freebsd" or >(nacl_untrusted_build)==1', {
@@ -868,21 +896,16 @@
'sources/': [ ['exclude', '_openbsd\\.cc$'] ],
},
],
- ['OS != "win" or >(nacl_untrusted_build)==1', {
- 'sources/': [ ['exclude', '^win/'] ],
- },
- ],
- ['OS != "android" or >(nacl_untrusted_build)==1', {
- 'sources/': [ ['exclude', '^android/'] ],
- },
- ],
['OS == "win" and >(nacl_untrusted_build)==0', {
'include_dirs': [
'<(DEPTH)/third_party/wtl/include',
],
'sources!': [
'event_recorder_stubs.cc',
+ 'files/file_path_watcher_fsevents.cc',
+ 'files/file_path_watcher_fsevents.h',
'files/file_path_watcher_kqueue.cc',
+ 'files/file_path_watcher_kqueue.h',
'files/file_path_watcher_stub.cc',
'message_loop/message_pump_libevent.cc',
'posix/file_descriptor_shuffle.cc',
@@ -895,12 +918,14 @@
['<(use_ozone) == 1', {
'sources!': [
'message_loop/message_pump_glib.cc',
- 'message_loop/message_pump_x11.cc',
]
}],
['OS == "linux" and >(nacl_untrusted_build)==0', {
'sources!': [
+ 'files/file_path_watcher_fsevents.cc',
+ 'files/file_path_watcher_fsevents.h',
'files/file_path_watcher_kqueue.cc',
+ 'files/file_path_watcher_kqueue.h',
'files/file_path_watcher_stub.cc',
],
}],
@@ -924,28 +949,55 @@
['exclude', '^sys_info_linux\\.cc$'],
],
}],
- ['<(chromeos)!=1 or >(nacl_untrusted_build)==1', {
- 'sources/': [
- ['exclude', '^chromeos/'],
- ],
- }],
# Remove all unnecessary files for build_nexe.py to avoid exceeding
# command-line-string limitation when building NaCl on Windows.
['OS == "win" and >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '\\.h$'] ],
}],
- ['<(use_system_nspr)==1 and >(nacl_untrusted_build)==0', {
- 'sources/': [
- ['exclude', '^third_party/nspr/'],
- ],
- }],
- ['<(toolkit_uses_gtk) == 1', {
- 'sources!': [
- 'x11/x11_error_tracker.cc',
- ],
- }],
],
}],
+ ['base_i18n_target==1', {
+ 'defines': [
+ 'BASE_I18N_IMPLEMENTATION',
+ ],
+ 'sources': [
+ 'i18n/base_i18n_export.h',
+ 'i18n/bidi_line_iterator.cc',
+ 'i18n/bidi_line_iterator.h',
+ 'i18n/break_iterator.cc',
+ 'i18n/break_iterator.h',
+ 'i18n/case_conversion.cc',
+ 'i18n/case_conversion.h',
+ 'i18n/char_iterator.cc',
+ 'i18n/char_iterator.h',
+ 'i18n/file_util_icu.cc',
+ 'i18n/file_util_icu.h',
+ 'i18n/i18n_constants.cc',
+ 'i18n/i18n_constants.h',
+ 'i18n/icu_encoding_detection.cc',
+ 'i18n/icu_encoding_detection.h',
+ 'i18n/icu_string_conversions.cc',
+ 'i18n/icu_string_conversions.h',
+ 'i18n/icu_util.cc',
+ 'i18n/icu_util.h',
+ 'i18n/number_formatting.cc',
+ 'i18n/number_formatting.h',
+ 'i18n/rtl.cc',
+ 'i18n/rtl.h',
+ 'i18n/streaming_utf8_validator.cc',
+ 'i18n/streaming_utf8_validator.h',
+ 'i18n/string_compare.cc',
+ 'i18n/string_compare.h',
+ 'i18n/string_search.cc',
+ 'i18n/string_search.h',
+ 'i18n/time_formatting.cc',
+ 'i18n/time_formatting.h',
+ 'i18n/timezone.cc',
+ 'i18n/timezone.h',
+ 'i18n/utf8_validator_tables.cc',
+ 'i18n/utf8_validator_tables.h',
+ ],
+ }]
],
},
}
diff --git a/chromium/base/base.isolate b/chromium/base/base.isolate
new file mode 100644
index 00000000000..aeab5ef3c2e
--- /dev/null
+++ b/chromium/base/base.isolate
@@ -0,0 +1,29 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+{
+ 'includes': [
+ # While the target 'base' doesn't depend on ../third_party/icu/icu.gyp
+ # itself, virtually all targets using it has to include icu. The only
+ # exception is the Windows sandbox (?).
+ '../third_party/icu/icu.isolate',
+ ],
+ 'conditions': [
+ ['OS=="win" and component=="shared_library"', {
+ 'variables': {
+ 'isolate_dependency_tracked': [
+ # Copy the VS runtime DLLs into the isolate so that they
+ # don't have to be preinstalled on the target machine. Note
+ # that depending on whether the build is Debug or Release,
+ # half of these dependencies will be broken, so these
+ # dependencies require --ignore-broken-items to be passed to
+ # the isolate driver.
+ '<(PRODUCT_DIR)/msvcp120d.dll',
+ '<(PRODUCT_DIR)/msvcp120.dll',
+ '<(PRODUCT_DIR)/msvcr120d.dll',
+ '<(PRODUCT_DIR)/msvcr120.dll',
+ ],
+ },
+ }],
+ ],
+}
diff --git a/chromium/base/base_nacl.gyp b/chromium/base/base_nacl.gyp
new file mode 100644
index 00000000000..5ef664ce5be
--- /dev/null
+++ b/chromium/base/base_nacl.gyp
@@ -0,0 +1,71 @@
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ 'chromium_code': 1,
+ },
+ 'includes': [
+ '../build/common_untrusted.gypi',
+ 'base.gypi',
+ ],
+ 'conditions': [
+ ['disable_nacl==0 and disable_nacl_untrusted==0', {
+ 'targets': [
+ {
+ 'target_name': 'base_nacl',
+ 'type': 'none',
+ 'variables': {
+ 'base_target': 1,
+ 'nacl_untrusted_build': 1,
+ 'nlib_target': 'libbase_nacl.a',
+ 'build_glibc': 1,
+ 'build_newlib': 1,
+ 'build_irt': 1,
+ 'build_pnacl_newlib': 1,
+ 'sources': [
+ 'base_switches.cc',
+ 'base_switches.h',
+ 'strings/string16.cc',
+ 'sync_socket_nacl.cc',
+ 'time/time_posix.cc',
+ ],
+ 'gcc_compile_flags': [
+ '-fno-strict-aliasing',
+ ],
+ },
+ 'dependencies': [
+ '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
+ ],
+ },
+ {
+ 'target_name': 'base_i18n_nacl',
+ 'type': 'none',
+ 'variables': {
+ 'base_i18n_target': 1,
+ 'nacl_untrusted_build': 1,
+ 'nlib_target': 'libbase_i18n_nacl.a',
+ 'build_glibc': 0,
+ 'build_newlib': 1,
+ 'build_irt': 0,
+ 'build_pnacl_newlib': 1,
+ 'sources': [
+ 'base_switches.cc',
+ 'base_switches.h',
+ 'strings/string16.cc',
+ 'sync_socket_nacl.cc',
+ 'time/time_posix.cc',
+ ],
+ },
+ 'dependencies': [
+ '<(DEPTH)/third_party/icu/icu_nacl.gyp:icudata_nacl',
+ '<(DEPTH)/third_party/icu/icu_nacl.gyp:icui18n_nacl',
+ '<(DEPTH)/third_party/icu/icu_nacl.gyp:icuuc_nacl',
+ '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
+ ],
+ },
+ ],
+ }],
+ ],
+}
diff --git a/chromium/base/base_paths.cc b/chromium/base/base_paths.cc
index b4fc28b6c75..1b99e850758 100644
--- a/chromium/base/base_paths.cc
+++ b/chromium/base/base_paths.cc
@@ -13,35 +13,34 @@ namespace base {
bool PathProvider(int key, FilePath* result) {
// NOTE: DIR_CURRENT is a special case in PathService::Get
- FilePath cur;
switch (key) {
case DIR_EXE:
- PathService::Get(FILE_EXE, &cur);
- cur = cur.DirName();
- break;
+ PathService::Get(FILE_EXE, result);
+ *result = result->DirName();
+ return true;
case DIR_MODULE:
- PathService::Get(FILE_MODULE, &cur);
- cur = cur.DirName();
- break;
+ PathService::Get(FILE_MODULE, result);
+ *result = result->DirName();
+ return true;
case DIR_TEMP:
- if (!base::GetTempDir(&cur))
+ if (!GetTempDir(result))
return false;
- break;
+ return true;
+ case base::DIR_HOME:
+ *result = GetHomeDir();
+ return true;
case DIR_TEST_DATA:
- if (!PathService::Get(DIR_SOURCE_ROOT, &cur))
+ if (!PathService::Get(DIR_SOURCE_ROOT, result))
return false;
- cur = cur.Append(FILE_PATH_LITERAL("base"));
- cur = cur.Append(FILE_PATH_LITERAL("test"));
- cur = cur.Append(FILE_PATH_LITERAL("data"));
- if (!base::PathExists(cur)) // We don't want to create this.
+ *result = result->Append(FILE_PATH_LITERAL("base"));
+ *result = result->Append(FILE_PATH_LITERAL("test"));
+ *result = result->Append(FILE_PATH_LITERAL("data"));
+ if (!PathExists(*result)) // We don't want to create this.
return false;
- break;
+ return true;
default:
return false;
}
-
- *result = cur;
- return true;
}
} // namespace base
diff --git a/chromium/base/base_paths.h b/chromium/base/base_paths.h
index f9601a290ae..26b2fd4c9a1 100644
--- a/chromium/base/base_paths.h
+++ b/chromium/base/base_paths.h
@@ -31,6 +31,10 @@ enum BasePathKey {
DIR_EXE, // Directory containing FILE_EXE.
DIR_MODULE, // Directory containing FILE_MODULE.
DIR_TEMP, // Temporary directory.
+ DIR_HOME, // User's root home directory. On Windows this will look
+ // like "C:\Users\you" (or on XP
+ // "C:\Document and Settings\you") which isn't necessarily
+ // a great place to put files.
FILE_EXE, // Path and filename of the current executable.
FILE_MODULE, // Path and filename of the module containing the code for
// the PathService (which could differ from FILE_EXE if the
diff --git a/chromium/base/base_paths_android.cc b/chromium/base/base_paths_android.cc
index 68cc5a72cef..27be24ea982 100644
--- a/chromium/base/base_paths_android.cc
+++ b/chromium/base/base_paths_android.cc
@@ -47,9 +47,6 @@ bool PathProviderAndroid(int key, FilePath* result) {
return base::android::GetCacheDirectory(result);
case base::DIR_ANDROID_APP_DATA:
return base::android::GetDataDirectory(result);
- case base::DIR_HOME:
- *result = GetHomeDir();
- return true;
case base::DIR_ANDROID_EXTERNAL_STORAGE:
return base::android::GetExternalStorageDirectory(result);
default:
diff --git a/chromium/base/base_paths_mac.mm b/chromium/base/base_paths_mac.mm
index 86d6a80e9ad..3930c44c3b7 100644
--- a/chromium/base/base_paths_mac.mm
+++ b/chromium/base/base_paths_mac.mm
@@ -106,9 +106,6 @@ bool PathProviderMac(int key, base::FilePath* result) {
#endif
case base::DIR_CACHE:
return base::mac::GetUserDirectory(NSCachesDirectory, result);
- case base::DIR_HOME:
- *result = base::mac::NSStringToFilePath(NSHomeDirectory());
- return true;
default:
return false;
}
diff --git a/chromium/base/base_paths_posix.cc b/chromium/base/base_paths_posix.cc
index b4147e99327..cf136d47fa3 100644
--- a/chromium/base/base_paths_posix.cc
+++ b/chromium/base/base_paths_posix.cc
@@ -109,9 +109,6 @@ bool PathProviderPosix(int key, FilePath* result) {
*result = cache_dir;
return true;
}
- case base::DIR_HOME:
- *result = GetHomeDir();
- return true;
}
return false;
}
diff --git a/chromium/base/base_paths_posix.h b/chromium/base/base_paths_posix.h
index 811c8cb8948..ef002aeb0bc 100644
--- a/chromium/base/base_paths_posix.h
+++ b/chromium/base/base_paths_posix.h
@@ -19,8 +19,6 @@ enum {
// browser cache can be a subdirectory.
// This is $XDG_CACHE_HOME on Linux and
// ~/Library/Caches on Mac.
- DIR_HOME, // $HOME on POSIX-like systems.
-
PATH_POSIX_END
};
diff --git a/chromium/base/base_paths_win.cc b/chromium/base/base_paths_win.cc
index bc883358add..509d5fd7ef1 100644
--- a/chromium/base/base_paths_win.cc
+++ b/chromium/base/base_paths_win.cc
@@ -127,12 +127,6 @@ bool PathProviderWin(int key, FilePath* result) {
return false;
cur = FilePath(system_buffer);
break;
- case base::DIR_PROFILE:
- if (FAILED(SHGetFolderPath(NULL, CSIDL_PROFILE, NULL, SHGFP_TYPE_CURRENT,
- system_buffer)))
- return false;
- cur = FilePath(system_buffer);
- break;
case base::DIR_LOCAL_APP_DATA_LOW:
if (win::GetVersion() < win::VERSION_VISTA)
return false;
@@ -197,6 +191,13 @@ bool PathProviderWin(int key, FilePath* result) {
cur = cur.AppendASCII("User Pinned");
cur = cur.AppendASCII("TaskBar");
break;
+ case base::DIR_WINDOWS_FONTS:
+ if (FAILED(SHGetFolderPath(
+ NULL, CSIDL_FONTS, NULL, SHGFP_TYPE_CURRENT, system_buffer))) {
+ return false;
+ }
+ cur = FilePath(system_buffer);
+ break;
default:
return false;
}
diff --git a/chromium/base/base_paths_win.h b/chromium/base/base_paths_win.h
index 11bc111d66c..b042d087379 100644
--- a/chromium/base/base_paths_win.h
+++ b/chromium/base/base_paths_win.h
@@ -25,7 +25,6 @@ enum {
DIR_START_MENU, // Usually "C:\Documents and Settings\<user>\
// Start Menu\Programs"
DIR_APP_DATA, // Application Data directory under the user profile.
- DIR_PROFILE, // Usually "C:\Documents and settings\<user>.
DIR_LOCAL_APP_DATA_LOW, // Local AppData directory for low integrity level.
DIR_LOCAL_APP_DATA, // "Local Settings\Application Data" directory under
// the user profile.
@@ -42,6 +41,7 @@ enum {
// of the Default user.
DIR_TASKBAR_PINS, // Directory for the shortcuts pinned to taskbar via
// base::win::TaskbarPinShortcutLink().
+ DIR_WINDOWS_FONTS, // Usually C:\Windows\Fonts.
PATH_WIN_END
};
diff --git a/chromium/base/base_switches.cc b/chromium/base/base_switches.cc
index 91e401ca497..81698cdfc13 100644
--- a/chromium/base/base_switches.cc
+++ b/chromium/base/base_switches.cc
@@ -6,12 +6,6 @@
namespace switches {
-// If the program includes base/debug/debug_on_start_win.h, the process will
-// (on Windows only) start the JIT system-registered debugger on itself and
-// will wait for 60 seconds for the debugger to attach to itself. Then a break
-// point will be hit.
-const char kDebugOnStart[] = "debug-on-start";
-
// Disables the crash reporting.
const char kDisableBreakpad[] = "disable-breakpad";
@@ -20,9 +14,6 @@ const char kDisableBreakpad[] = "disable-breakpad";
// generated internally.
const char kEnableCrashReporter[] = "enable-crash-reporter";
-// Enable DCHECKs in release mode.
-const char kEnableDCHECK[] = "enable-dcheck";
-
// Generates full memory crash dump.
const char kFullMemoryCrashReport[] = "full-memory-crash-report";
diff --git a/chromium/base/base_switches.h b/chromium/base/base_switches.h
index b679e6d9ebf..6e391a45fcf 100644
--- a/chromium/base/base_switches.h
+++ b/chromium/base/base_switches.h
@@ -11,10 +11,8 @@
namespace switches {
-extern const char kDebugOnStart[];
extern const char kDisableBreakpad[];
extern const char kEnableCrashReporter[];
-extern const char kEnableDCHECK[];
extern const char kFullMemoryCrashReport[];
extern const char kNoErrorDialogs[];
extern const char kProfilerTiming[];
diff --git a/chromium/base/base_unittests.isolate b/chromium/base/base_unittests.isolate
index 166cf801eca..b5464be8e37 100644
--- a/chromium/base/base_unittests.isolate
+++ b/chromium/base/base_unittests.isolate
@@ -32,9 +32,7 @@
'../testing/test_env.py',
'<(PRODUCT_DIR)/base_unittests<(EXECUTABLE_SUFFIX)',
],
- 'isolate_dependency_untracked': [
- '../tools/swarming_client/',
- ],
+ 'read_only': 1,
},
}],
['OS=="mac" or OS=="win"', {
@@ -50,9 +48,11 @@
['OS=="win"', {
'variables': {
'isolate_dependency_tracked': [
- '<(PRODUCT_DIR)/icudt.dll',
],
},
}],
],
+ 'includes': [
+ 'base.isolate',
+ ],
}
diff --git a/chromium/base/base_untrusted.gyp b/chromium/base/base_untrusted.gyp
deleted file mode 100644
index e4b005bc291..00000000000
--- a/chromium/base/base_untrusted.gyp
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'variables': {
- 'chromium_code': 1,
- },
- 'includes': [
- '../build/common_untrusted.gypi',
- 'base.gypi',
- ],
- 'conditions': [
- ['disable_nacl==0 and disable_nacl_untrusted==0', {
- 'targets': [
- {
- 'target_name': 'base_untrusted',
- 'type': 'none',
- 'variables': {
- 'base_target': 1,
- 'nacl_untrusted_build': 1,
- 'nlib_target': 'libbase_untrusted.a',
- 'build_glibc': 1,
- 'build_newlib': 1,
- 'build_irt': 1,
- 'sources': [
- 'base_switches.cc',
- 'base_switches.h',
- 'strings/string16.cc',
- 'sync_socket_nacl.cc',
- 'time/time_posix.cc',
- ],
- },
- 'dependencies': [
- '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
- ],
- },
- ],
- }],
- ],
-}
diff --git a/chromium/base/basictypes.h b/chromium/base/basictypes.h
index e77d7b10f24..b0019f2a193 100644
--- a/chromium/base/basictypes.h
+++ b/chromium/base/basictypes.h
@@ -1,377 +1,58 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// This file contains definitions of our old basic integral types
+// ((u)int{8,16,32,64}) and further includes. I recommend that you use the C99
+// standard types instead, and include <stdint.h>/<stddef.h>/etc. as needed.
+// Note that the macros and macro-like constructs that were formerly defined in
+// this file are now available separately in base/macros.h.
+
#ifndef BASE_BASICTYPES_H_
#define BASE_BASICTYPES_H_
-#include <limits.h> // So we can set the bounds of our types
-#include <stddef.h> // For size_t
-#include <string.h> // for memcpy
-
-#include "base/compiler_specific.h"
-#include "base/port.h" // Types that only need exist on certain systems
+#include <limits.h> // So we can set the bounds of our types.
+#include <stddef.h> // For size_t.
+#include <stdint.h> // For intptr_t.
-#ifndef COMPILER_MSVC
-// stdint.h is part of C99 but MSVC doesn't have it.
-#include <stdint.h> // For intptr_t.
-#endif
+#include "base/macros.h"
+#include "base/port.h" // Types that only need exist on certain systems.
-typedef signed char schar;
-typedef signed char int8;
-typedef short int16;
-typedef int int32;
+// DEPRECATED: Please use (u)int{8,16,32,64}_t instead (and include <stdint.h>).
+typedef int8_t int8;
+typedef uint8_t uint8;
+typedef int16_t int16;
+typedef int32_t int32;
+typedef uint16_t uint16;
+typedef uint32_t uint32;
+// TODO(vtl): Figure what's up with the 64-bit types. Can we just define them as
+// |int64_t|/|uint64_t|?
// The NSPR system headers define 64-bit as |long| when possible, except on
// Mac OS X. In order to not have typedef mismatches, we do the same on LP64.
//
// On Mac OS X, |long long| is used for 64-bit types for compatibility with
// <inttypes.h> format macros even in the LP64 model.
#if defined(__LP64__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
-typedef long int64;
-#else
-typedef long long int64;
-#endif
-
-// NOTE: It is DANGEROUS to compare signed with unsigned types in loop
-// conditions and other conditional expressions, and it is DANGEROUS to
-// compute object/allocation sizes, indices, and offsets with signed types.
-// Integer overflow behavior for signed types is UNDEFINED in the C/C++
-// standards, but is defined for unsigned types.
-//
-// Use the unsigned types if your variable represents a bit pattern (e.g. a
-// hash value), object or allocation size, object count, offset,
-// array/vector index, etc.
-//
-// Do NOT use 'unsigned' to express "this value should always be positive";
-// use assertions for this.
-//
-// See the Chromium style guide for more information.
-// https://sites.google.com/a/chromium.org/dev/developers/coding-style
-
-typedef unsigned char uint8;
-typedef unsigned short uint16;
-typedef unsigned int uint32;
-
-// See the comment above about NSPR and 64-bit.
-#if defined(__LP64__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
+typedef long int64;
typedef unsigned long uint64;
#else
+typedef long long int64;
typedef unsigned long long uint64;
#endif
-// A type to represent a Unicode code-point value. As of Unicode 4.0,
-// such values require up to 21 bits.
-// (For type-checking on pointers, make this explicitly signed,
-// and it should always be the signed version of whatever int32 is.)
-typedef signed int char32;
-
+// DEPRECATED: Please use std::numeric_limits (from <limits>) instead.
const uint8 kuint8max = (( uint8) 0xFF);
const uint16 kuint16max = ((uint16) 0xFFFF);
const uint32 kuint32max = ((uint32) 0xFFFFFFFF);
-const uint64 kuint64max = ((uint64) GG_LONGLONG(0xFFFFFFFFFFFFFFFF));
+const uint64 kuint64max = ((uint64) 0xFFFFFFFFFFFFFFFFULL);
const int8 kint8min = (( int8) 0x80);
const int8 kint8max = (( int8) 0x7F);
const int16 kint16min = (( int16) 0x8000);
const int16 kint16max = (( int16) 0x7FFF);
const int32 kint32min = (( int32) 0x80000000);
const int32 kint32max = (( int32) 0x7FFFFFFF);
-const int64 kint64min = (( int64) GG_LONGLONG(0x8000000000000000));
-const int64 kint64max = (( int64) GG_LONGLONG(0x7FFFFFFFFFFFFFFF));
-
-// Put this in the private: declarations for a class to be uncopyable.
-#define DISALLOW_COPY(TypeName) \
- TypeName(const TypeName&)
-
-// Put this in the private: declarations for a class to be unassignable.
-#define DISALLOW_ASSIGN(TypeName) \
- void operator=(const TypeName&)
-
-// A macro to disallow the copy constructor and operator= functions
-// This should be used in the private: declarations for a class
-#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
- TypeName(const TypeName&); \
- void operator=(const TypeName&)
-
-// An older, deprecated, politically incorrect name for the above.
-// NOTE: The usage of this macro was banned from our code base, but some
-// third_party libraries are yet using it.
-// TODO(tfarina): Figure out how to fix the usage of this macro in the
-// third_party libraries and get rid of it.
-#define DISALLOW_EVIL_CONSTRUCTORS(TypeName) DISALLOW_COPY_AND_ASSIGN(TypeName)
-
-// A macro to disallow all the implicit constructors, namely the
-// default constructor, copy constructor and operator= functions.
-//
-// This should be used in the private: declarations for a class
-// that wants to prevent anyone from instantiating it. This is
-// especially useful for classes containing only static methods.
-#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
- TypeName(); \
- DISALLOW_COPY_AND_ASSIGN(TypeName)
-
-// The arraysize(arr) macro returns the # of elements in an array arr.
-// The expression is a compile-time constant, and therefore can be
-// used in defining new arrays, for example. If you use arraysize on
-// a pointer by mistake, you will get a compile-time error.
-//
-// One caveat is that arraysize() doesn't accept any array of an
-// anonymous type or a type defined inside a function. In these rare
-// cases, you have to use the unsafe ARRAYSIZE_UNSAFE() macro below. This is
-// due to a limitation in C++'s template system. The limitation might
-// eventually be removed, but it hasn't happened yet.
-
-// This template function declaration is used in defining arraysize.
-// Note that the function doesn't need an implementation, as we only
-// use its type.
-template <typename T, size_t N>
-char (&ArraySizeHelper(T (&array)[N]))[N];
-
-// That gcc wants both of these prototypes seems mysterious. VC, for
-// its part, can't decide which to use (another mystery). Matching of
-// template overloads: the final frontier.
-#ifndef _MSC_VER
-template <typename T, size_t N>
-char (&ArraySizeHelper(const T (&array)[N]))[N];
-#endif
-
-#define arraysize(array) (sizeof(ArraySizeHelper(array)))
-
-// ARRAYSIZE_UNSAFE performs essentially the same calculation as arraysize,
-// but can be used on anonymous types or types defined inside
-// functions. It's less safe than arraysize as it accepts some
-// (although not all) pointers. Therefore, you should use arraysize
-// whenever possible.
-//
-// The expression ARRAYSIZE_UNSAFE(a) is a compile-time constant of type
-// size_t.
-//
-// ARRAYSIZE_UNSAFE catches a few type errors. If you see a compiler error
-//
-// "warning: division by zero in ..."
-//
-// when using ARRAYSIZE_UNSAFE, you are (wrongfully) giving it a pointer.
-// You should only use ARRAYSIZE_UNSAFE on statically allocated arrays.
-//
-// The following comments are on the implementation details, and can
-// be ignored by the users.
-//
-// ARRAYSIZE_UNSAFE(arr) works by inspecting sizeof(arr) (the # of bytes in
-// the array) and sizeof(*(arr)) (the # of bytes in one array
-// element). If the former is divisible by the latter, perhaps arr is
-// indeed an array, in which case the division result is the # of
-// elements in the array. Otherwise, arr cannot possibly be an array,
-// and we generate a compiler error to prevent the code from
-// compiling.
-//
-// Since the size of bool is implementation-defined, we need to cast
-// !(sizeof(a) & sizeof(*(a))) to size_t in order to ensure the final
-// result has type size_t.
-//
-// This macro is not perfect as it wrongfully accepts certain
-// pointers, namely where the pointer size is divisible by the pointee
-// size. Since all our code has to go through a 32-bit compiler,
-// where a pointer is 4 bytes, this means all pointers to a type whose
-// size is 3 or greater than 4 will be (righteously) rejected.
-
-#define ARRAYSIZE_UNSAFE(a) \
- ((sizeof(a) / sizeof(*(a))) / \
- static_cast<size_t>(!(sizeof(a) % sizeof(*(a)))))
-
-
-// Use implicit_cast as a safe version of static_cast or const_cast
-// for upcasting in the type hierarchy (i.e. casting a pointer to Foo
-// to a pointer to SuperclassOfFoo or casting a pointer to Foo to
-// a const pointer to Foo).
-// When you use implicit_cast, the compiler checks that the cast is safe.
-// Such explicit implicit_casts are necessary in surprisingly many
-// situations where C++ demands an exact type match instead of an
-// argument type convertible to a target type.
-//
-// The From type can be inferred, so the preferred syntax for using
-// implicit_cast is the same as for static_cast etc.:
-//
-// implicit_cast<ToType>(expr)
-//
-// implicit_cast would have been part of the C++ standard library,
-// but the proposal was submitted too late. It will probably make
-// its way into the language in the future.
-template<typename To, typename From>
-inline To implicit_cast(From const &f) {
- return f;
-}
-
-// The COMPILE_ASSERT macro can be used to verify that a compile time
-// expression is true. For example, you could use it to verify the
-// size of a static array:
-//
-// COMPILE_ASSERT(ARRAYSIZE_UNSAFE(content_type_names) == CONTENT_NUM_TYPES,
-// content_type_names_incorrect_size);
-//
-// or to make sure a struct is smaller than a certain size:
-//
-// COMPILE_ASSERT(sizeof(foo) < 128, foo_too_large);
-//
-// The second argument to the macro is the name of the variable. If
-// the expression is false, most compilers will issue a warning/error
-// containing the name of the variable.
-
-#undef COMPILE_ASSERT
-
-#if __cplusplus >= 201103L
-
-// Under C++11, just use static_assert.
-#define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg)
-
-#else
-
-template <bool>
-struct CompileAssert {
-};
-
-#define COMPILE_ASSERT(expr, msg) \
- typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] ALLOW_UNUSED
-
-// Implementation details of COMPILE_ASSERT:
-//
-// - COMPILE_ASSERT works by defining an array type that has -1
-// elements (and thus is invalid) when the expression is false.
-//
-// - The simpler definition
-//
-// #define COMPILE_ASSERT(expr, msg) typedef char msg[(expr) ? 1 : -1]
-//
-// does not work, as gcc supports variable-length arrays whose sizes
-// are determined at run-time (this is gcc's extension and not part
-// of the C++ standard). As a result, gcc fails to reject the
-// following code with the simple definition:
-//
-// int foo;
-// COMPILE_ASSERT(foo, msg); // not supposed to compile as foo is
-// // not a compile-time constant.
-//
-// - By using the type CompileAssert<(bool(expr))>, we ensures that
-// expr is a compile-time constant. (Template arguments must be
-// determined at compile-time.)
-//
-// - The outer parentheses in CompileAssert<(bool(expr))> are necessary
-// to work around a bug in gcc 3.4.4 and 4.0.1. If we had written
-//
-// CompileAssert<bool(expr)>
-//
-// instead, these compilers will refuse to compile
-//
-// COMPILE_ASSERT(5 > 0, some_message);
-//
-// (They seem to think the ">" in "5 > 0" marks the end of the
-// template argument list.)
-//
-// - The array size is (bool(expr) ? 1 : -1), instead of simply
-//
-// ((expr) ? 1 : -1).
-//
-// This is to avoid running into a bug in MS VC 7.1, which
-// causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1.
-
-#endif
-
-// bit_cast<Dest,Source> is a template function that implements the
-// equivalent of "*reinterpret_cast<Dest*>(&source)". We need this in
-// very low-level functions like the protobuf library and fast math
-// support.
-//
-// float f = 3.14159265358979;
-// int i = bit_cast<int32>(f);
-// // i = 0x40490fdb
-//
-// The classical address-casting method is:
-//
-// // WRONG
-// float f = 3.14159265358979; // WRONG
-// int i = * reinterpret_cast<int*>(&f); // WRONG
-//
-// The address-casting method actually produces undefined behavior
-// according to ISO C++ specification section 3.10 -15 -. Roughly, this
-// section says: if an object in memory has one type, and a program
-// accesses it with a different type, then the result is undefined
-// behavior for most values of "different type".
-//
-// This is true for any cast syntax, either *(int*)&f or
-// *reinterpret_cast<int*>(&f). And it is particularly true for
-// conversions between integral lvalues and floating-point lvalues.
-//
-// The purpose of 3.10 -15- is to allow optimizing compilers to assume
-// that expressions with different types refer to different memory. gcc
-// 4.0.1 has an optimizer that takes advantage of this. So a
-// non-conforming program quietly produces wildly incorrect output.
-//
-// The problem is not the use of reinterpret_cast. The problem is type
-// punning: holding an object in memory of one type and reading its bits
-// back using a different type.
-//
-// The C++ standard is more subtle and complex than this, but that
-// is the basic idea.
-//
-// Anyways ...
-//
-// bit_cast<> calls memcpy() which is blessed by the standard,
-// especially by the example in section 3.9 . Also, of course,
-// bit_cast<> wraps up the nasty logic in one place.
-//
-// Fortunately memcpy() is very fast. In optimized mode, with a
-// constant size, gcc 2.95.3, gcc 4.0.1, and msvc 7.1 produce inline
-// code with the minimal amount of data movement. On a 32-bit system,
-// memcpy(d,s,4) compiles to one load and one store, and memcpy(d,s,8)
-// compiles to two loads and two stores.
-//
-// I tested this code with gcc 2.95.3, gcc 4.0.1, icc 8.1, and msvc 7.1.
-//
-// WARNING: if Dest or Source is a non-POD type, the result of the memcpy
-// is likely to surprise you.
-
-template <class Dest, class Source>
-inline Dest bit_cast(const Source& source) {
- COMPILE_ASSERT(sizeof(Dest) == sizeof(Source), VerifySizesAreEqual);
-
- Dest dest;
- memcpy(&dest, &source, sizeof(dest));
- return dest;
-}
-
-// Used to explicitly mark the return value of a function as unused. If you are
-// really sure you don't want to do anything with the return value of a function
-// that has been marked WARN_UNUSED_RESULT, wrap it with this. Example:
-//
-// scoped_ptr<MyType> my_var = ...;
-// if (TakeOwnership(my_var.get()) == SUCCESS)
-// ignore_result(my_var.release());
-//
-template<typename T>
-inline void ignore_result(const T&) {
-}
-
-// The following enum should be used only as a constructor argument to indicate
-// that the variable has static storage class, and that the constructor should
-// do nothing to its state. It indicates to the reader that it is legal to
-// declare a static instance of the class, provided the constructor is given
-// the base::LINKER_INITIALIZED argument. Normally, it is unsafe to declare a
-// static variable that has a constructor or a destructor because invocation
-// order is undefined. However, IF the type can be initialized by filling with
-// zeroes (which the loader does for static variables), AND the destructor also
-// does nothing to the storage, AND there are no virtual methods, then a
-// constructor declared as
-// explicit MyClass(base::LinkerInitialized x) {}
-// and invoked as
-// static MyClass my_variable_name(base::LINKER_INITIALIZED);
-namespace base {
-enum LinkerInitialized { LINKER_INITIALIZED };
-
-// Use these to declare and define a static local variable (static T;) so that
-// it is leaked so that its destructors are not called at exit. If you need
-// thread-safe initialization, use base/lazy_instance.h instead.
-#define CR_DEFINE_STATIC_LOCAL(type, name, arguments) \
- static type& name = *new type arguments
-
-} // base
+const int64 kint64min = (( int64) 0x8000000000000000LL);
+const int64 kint64max = (( int64) 0x7FFFFFFFFFFFFFFFLL);
#endif // BASE_BASICTYPES_H_
diff --git a/chromium/base/big_endian.cc b/chromium/base/big_endian.cc
new file mode 100644
index 00000000000..fd9e7600ac1
--- /dev/null
+++ b/chromium/base/big_endian.cc
@@ -0,0 +1,97 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/big_endian.h"
+
+#include "base/strings/string_piece.h"
+
+namespace base {
+
+BigEndianReader::BigEndianReader(const char* buf, size_t len)
+ : ptr_(buf), end_(ptr_ + len) {}
+
+bool BigEndianReader::Skip(size_t len) {
+ if (ptr_ + len > end_)
+ return false;
+ ptr_ += len;
+ return true;
+}
+
+bool BigEndianReader::ReadBytes(void* out, size_t len) {
+ if (ptr_ + len > end_)
+ return false;
+ memcpy(out, ptr_, len);
+ ptr_ += len;
+ return true;
+}
+
+bool BigEndianReader::ReadPiece(base::StringPiece* out, size_t len) {
+ if (ptr_ + len > end_)
+ return false;
+ *out = base::StringPiece(ptr_, len);
+ ptr_ += len;
+ return true;
+}
+
+template<typename T>
+bool BigEndianReader::Read(T* value) {
+ if (ptr_ + sizeof(T) > end_)
+ return false;
+ ReadBigEndian<T>(ptr_, value);
+ ptr_ += sizeof(T);
+ return true;
+}
+
+bool BigEndianReader::ReadU8(uint8* value) {
+ return Read(value);
+}
+
+bool BigEndianReader::ReadU16(uint16* value) {
+ return Read(value);
+}
+
+bool BigEndianReader::ReadU32(uint32* value) {
+ return Read(value);
+}
+
+BigEndianWriter::BigEndianWriter(char* buf, size_t len)
+ : ptr_(buf), end_(ptr_ + len) {}
+
+bool BigEndianWriter::Skip(size_t len) {
+ if (ptr_ + len > end_)
+ return false;
+ ptr_ += len;
+ return true;
+}
+
+bool BigEndianWriter::WriteBytes(const void* buf, size_t len) {
+ if (ptr_ + len > end_)
+ return false;
+ memcpy(ptr_, buf, len);
+ ptr_ += len;
+ return true;
+}
+
+template<typename T>
+bool BigEndianWriter::Write(T value) {
+ if (ptr_ + sizeof(T) > end_)
+ return false;
+ WriteBigEndian<T>(ptr_, value);
+ ptr_ += sizeof(T);
+ return true;
+}
+
+bool BigEndianWriter::WriteU8(uint8 value) {
+ return Write(value);
+}
+
+bool BigEndianWriter::WriteU16(uint16 value) {
+ return Write(value);
+}
+
+bool BigEndianWriter::WriteU32(uint32 value) {
+ return Write(value);
+}
+
+} // namespace base
diff --git a/chromium/base/big_endian.h b/chromium/base/big_endian.h
new file mode 100644
index 00000000000..35df5e79776
--- /dev/null
+++ b/chromium/base/big_endian.h
@@ -0,0 +1,102 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_BIG_ENDIAN_H_
+#define BASE_BIG_ENDIAN_H_
+
+#include "base/base_export.h"
+#include "base/basictypes.h"
+#include "base/strings/string_piece.h"
+
+namespace base {
+
+// Read an integer (signed or unsigned) from |buf| in Big Endian order.
+// Note: this loop is unrolled with -O1 and above.
+// NOTE(szym): glibc dns-canon.c and SpdyFrameBuilder use
+// ntohs(*(uint16_t*)ptr) which is potentially unaligned.
+// This would cause SIGBUS on ARMv5 or earlier and ARMv6-M.
+template<typename T>
+inline void ReadBigEndian(const char buf[], T* out) {
+ *out = buf[0];
+ for (size_t i = 1; i < sizeof(T); ++i) {
+ *out <<= 8;
+ // Must cast to uint8 to avoid clobbering by sign extension.
+ *out |= static_cast<uint8>(buf[i]);
+ }
+}
+
+// Write an integer (signed or unsigned) |val| to |buf| in Big Endian order.
+// Note: this loop is unrolled with -O1 and above.
+template<typename T>
+inline void WriteBigEndian(char buf[], T val) {
+ for (size_t i = 0; i < sizeof(T); ++i) {
+ buf[sizeof(T)-i-1] = static_cast<char>(val & 0xFF);
+ val >>= 8;
+ }
+}
+
+// Specializations to make clang happy about the (dead code) shifts above.
+template<>
+inline void ReadBigEndian<uint8>(const char buf[], uint8* out) {
+ *out = buf[0];
+}
+
+template<>
+inline void WriteBigEndian<uint8>(char buf[], uint8 val) {
+ buf[0] = static_cast<char>(val);
+}
+
+// Allows reading integers in network order (big endian) while iterating over
+// an underlying buffer. All the reading functions advance the internal pointer.
+class BASE_EXPORT BigEndianReader {
+ public:
+ BigEndianReader(const char* buf, size_t len);
+
+ const char* ptr() const { return ptr_; }
+ int remaining() const { return end_ - ptr_; }
+
+ bool Skip(size_t len);
+ bool ReadBytes(void* out, size_t len);
+ // Creates a StringPiece in |out| that points to the underlying buffer.
+ bool ReadPiece(base::StringPiece* out, size_t len);
+ bool ReadU8(uint8* value);
+ bool ReadU16(uint16* value);
+ bool ReadU32(uint32* value);
+
+ private:
+ // Hidden to promote type safety.
+ template<typename T>
+ bool Read(T* v);
+
+ const char* ptr_;
+ const char* end_;
+};
+
+// Allows writing integers in network order (big endian) while iterating over
+// an underlying buffer. All the writing functions advance the internal pointer.
+class BASE_EXPORT BigEndianWriter {
+ public:
+ BigEndianWriter(char* buf, size_t len);
+
+ char* ptr() const { return ptr_; }
+ int remaining() const { return end_ - ptr_; }
+
+ bool Skip(size_t len);
+ bool WriteBytes(const void* buf, size_t len);
+ bool WriteU8(uint8 value);
+ bool WriteU16(uint16 value);
+ bool WriteU32(uint32 value);
+
+ private:
+ // Hidden to promote type safety.
+ template<typename T>
+ bool Write(T v);
+
+ char* ptr_;
+ char* end_;
+};
+
+} // namespace base
+
+#endif // BASE_BIG_ENDIAN_H_
diff --git a/chromium/base/big_endian_unittest.cc b/chromium/base/big_endian_unittest.cc
new file mode 100644
index 00000000000..b57aeb29ac9
--- /dev/null
+++ b/chromium/base/big_endian_unittest.cc
@@ -0,0 +1,100 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/big_endian.h"
+
+#include "base/strings/string_piece.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace base {
+
+TEST(BigEndianReaderTest, ReadsValues) {
+ char data[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xA, 0xB, 0xC };
+ char buf[2];
+ uint8 u8;
+ uint16 u16;
+ uint32 u32;
+ base::StringPiece piece;
+ BigEndianReader reader(data, sizeof(data));
+
+ EXPECT_TRUE(reader.Skip(2));
+ EXPECT_EQ(data + 2, reader.ptr());
+ EXPECT_EQ(reader.remaining(), static_cast<int>(sizeof(data)) - 2);
+ EXPECT_TRUE(reader.ReadBytes(buf, sizeof(buf)));
+ EXPECT_EQ(0x2, buf[0]);
+ EXPECT_EQ(0x3, buf[1]);
+ EXPECT_TRUE(reader.ReadU8(&u8));
+ EXPECT_EQ(0x4, u8);
+ EXPECT_TRUE(reader.ReadU16(&u16));
+ EXPECT_EQ(0x0506, u16);
+ EXPECT_TRUE(reader.ReadU32(&u32));
+ EXPECT_EQ(0x0708090Au, u32);
+ base::StringPiece expected(reader.ptr(), 2);
+ EXPECT_TRUE(reader.ReadPiece(&piece, 2));
+ EXPECT_EQ(2u, piece.size());
+ EXPECT_EQ(expected.data(), piece.data());
+}
+
+TEST(BigEndianReaderTest, RespectsLength) {
+ char data[4];
+ char buf[2];
+ uint8 u8;
+ uint16 u16;
+ uint32 u32;
+ base::StringPiece piece;
+ BigEndianReader reader(data, sizeof(data));
+ // 4 left
+ EXPECT_FALSE(reader.Skip(6));
+ EXPECT_TRUE(reader.Skip(1));
+ // 3 left
+ EXPECT_FALSE(reader.ReadU32(&u32));
+ EXPECT_FALSE(reader.ReadPiece(&piece, 4));
+ EXPECT_TRUE(reader.Skip(2));
+ // 1 left
+ EXPECT_FALSE(reader.ReadU16(&u16));
+ EXPECT_FALSE(reader.ReadBytes(buf, 2));
+ EXPECT_TRUE(reader.Skip(1));
+ // 0 left
+ EXPECT_FALSE(reader.ReadU8(&u8));
+ EXPECT_EQ(0, reader.remaining());
+}
+
+TEST(BigEndianWriterTest, WritesValues) {
+ char expected[] = { 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 0xA };
+ char data[sizeof(expected)];
+ char buf[] = { 0x2, 0x3 };
+ memset(data, 0, sizeof(data));
+ BigEndianWriter writer(data, sizeof(data));
+
+ EXPECT_TRUE(writer.Skip(2));
+ EXPECT_TRUE(writer.WriteBytes(buf, sizeof(buf)));
+ EXPECT_TRUE(writer.WriteU8(0x4));
+ EXPECT_TRUE(writer.WriteU16(0x0506));
+ EXPECT_TRUE(writer.WriteU32(0x0708090A));
+ EXPECT_EQ(0, memcmp(expected, data, sizeof(expected)));
+}
+
+TEST(BigEndianWriterTest, RespectsLength) {
+ char data[4];
+ char buf[2];
+ uint8 u8 = 0;
+ uint16 u16 = 0;
+ uint32 u32 = 0;
+ BigEndianWriter writer(data, sizeof(data));
+ // 4 left
+ EXPECT_FALSE(writer.Skip(6));
+ EXPECT_TRUE(writer.Skip(1));
+ // 3 left
+ EXPECT_FALSE(writer.WriteU32(u32));
+ EXPECT_TRUE(writer.Skip(2));
+ // 1 left
+ EXPECT_FALSE(writer.WriteU16(u16));
+ EXPECT_FALSE(writer.WriteBytes(buf, 2));
+ EXPECT_TRUE(writer.Skip(1));
+ // 0 left
+ EXPECT_FALSE(writer.WriteU8(u8));
+ EXPECT_EQ(0, writer.remaining());
+}
+
+} // namespace base
diff --git a/chromium/base/bind.h b/chromium/base/bind.h
index 5cf124df32f..b14f70c109f 100644
--- a/chromium/base/bind.h
+++ b/chromium/base/bind.h
@@ -65,12 +65,6 @@ Bind(Functor functor) {
typedef typename internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename internal::FunctorTraits<Functor>::RunType RunType;
- // Use RunnableType::RunType instead of RunType above because our
- // checks should below for bound references need to know what the actual
- // functor is going to interpret the argument as.
- typedef internal::FunctionTraits<typename RunnableType::RunType>
- BoundFunctorTraits;
-
typedef internal::BindState<RunnableType, RunType, void()> BindState;
diff --git a/chromium/base/bind.h.pump b/chromium/base/bind.h.pump
index b321649aea6..2cdd7d5e498 100644
--- a/chromium/base/bind.h.pump
+++ b/chromium/base/bind.h.pump
@@ -93,14 +93,14 @@ $if ARITY > 0 [[, ]] $for ARG , [[const P$(ARG)& p$(ARG)]]) {
typedef typename internal::FunctorTraits<Functor>::RunnableType RunnableType;
typedef typename internal::FunctorTraits<Functor>::RunType RunType;
+$if ARITY > 0 [[
+
// Use RunnableType::RunType instead of RunType above because our
// checks should below for bound references need to know what the actual
// functor is going to interpret the argument as.
typedef internal::FunctionTraits<typename RunnableType::RunType>
BoundFunctorTraits;
-$if ARITY > 0 [[
-
// Do not allow binding a non-const reference parameter. Non-const reference
// parameters are disallowed by the Google style guide. Also, binding a
// non-const reference parameter can make for subtle bugs because the
diff --git a/chromium/base/bind_helpers.h b/chromium/base/bind_helpers.h
index d717892c8f5..e31ef05ff1a 100644
--- a/chromium/base/bind_helpers.h
+++ b/chromium/base/bind_helpers.h
@@ -12,7 +12,7 @@
//
// ARGUMENT BINDING WRAPPERS
//
-// The wrapper functions are base::Unretained(), base::Owned(), bass::Passed(),
+// The wrapper functions are base::Unretained(), base::Owned(), base::Passed(),
// base::ConstRef(), and base::IgnoreResult().
//
// Unretained() allows Bind() to bind a non-refcounted class, and to disable
diff --git a/chromium/base/bind_unittest.cc b/chromium/base/bind_unittest.cc
index 2c93d53ee4b..e1f15cb2011 100644
--- a/chromium/base/bind_unittest.cc
+++ b/chromium/base/bind_unittest.cc
@@ -127,10 +127,6 @@ class CopyCounter {
return *copies_;
}
- int assigns() const {
- return *assigns_;
- }
-
private:
int* copies_;
int* assigns_;
diff --git a/chromium/base/bind_unittest.nc b/chromium/base/bind_unittest.nc
index 033acfaa057..de81646fbff 100644
--- a/chromium/base/bind_unittest.nc
+++ b/chromium/base/bind_unittest.nc
@@ -9,8 +9,7 @@
namespace base {
// Do not put everything inside an anonymous namespace. If you do, many of the
-// helper function declarations will generate unused definition warnings unless
-// unused definition warnings.
+// helper function declarations will generate unused definition warnings.
static const int kParentValue = 1;
static const int kChildValue = 2;
diff --git a/chromium/base/callback_list.h b/chromium/base/callback_list.h
index d12a1e95baa..5b911fd4867 100644
--- a/chromium/base/callback_list.h
+++ b/chromium/base/callback_list.h
@@ -89,10 +89,13 @@ class CallbackListBase {
}
~Subscription() {
- if (list_->active_iterator_count_)
+ if (list_->active_iterator_count_) {
iter_->Reset();
- else
+ } else {
list_->callbacks_.erase(iter_);
+ if (!list_->removal_callback_.is_null())
+ list_->removal_callback_.Run();
+ }
}
private:
@@ -111,6 +114,18 @@ class CallbackListBase {
new Subscription(this, callbacks_.insert(callbacks_.end(), cb)));
}
+ // Sets a callback which will be run when a subscription list is changed.
+ void set_removal_callback(const Closure& callback) {
+ removal_callback_ = callback;
+ }
+
+ // Returns true if there are no subscriptions. This is only valid to call when
+ // not looping through the list.
+ bool empty() {
+ DCHECK_EQ(0, active_iterator_count_);
+ return callbacks_.empty();
+ }
+
protected:
// An iterator class that can be used to access the list of callbacks.
class Iterator {
@@ -167,17 +182,24 @@ class CallbackListBase {
// iteration.
void Compact() {
typename std::list<CallbackType>::iterator it = callbacks_.begin();
+ bool updated = false;
while (it != callbacks_.end()) {
- if ((*it).is_null())
+ if ((*it).is_null()) {
+ updated = true;
it = callbacks_.erase(it);
- else
+ } else {
++it;
+ }
+
+ if (updated && !removal_callback_.is_null())
+ removal_callback_.Run();
}
}
private:
std::list<CallbackType> callbacks_;
int active_iterator_count_;
+ Closure removal_callback_;
DISALLOW_COPY_AND_ASSIGN(CallbackListBase);
};
diff --git a/chromium/base/callback_list.h.pump b/chromium/base/callback_list.h.pump
index ea2103ebeef..d7f84736c15 100644
--- a/chromium/base/callback_list.h.pump
+++ b/chromium/base/callback_list.h.pump
@@ -94,10 +94,13 @@ class CallbackListBase {
}
~Subscription() {
- if (list_->active_iterator_count_)
+ if (list_->active_iterator_count_) {
iter_->Reset();
- else
+ } else {
list_->callbacks_.erase(iter_);
+ if (!list_->removal_callback_.is_null())
+ list_->removal_callback_.Run();
+ }
}
private:
@@ -116,6 +119,18 @@ class CallbackListBase {
new Subscription(this, callbacks_.insert(callbacks_.end(), cb)));
}
+ // Sets a callback which will be run when a subscription list is changed.
+ void set_removal_callback(const Closure& callback) {
+ removal_callback_ = callback;
+ }
+
+ // Returns true if there are no subscriptions. This is only valid to call when
+ // not looping through the list.
+ bool empty() {
+ DCHECK_EQ(0, active_iterator_count_);
+ return callbacks_.empty();
+ }
+
protected:
// An iterator class that can be used to access the list of callbacks.
class Iterator {
@@ -172,17 +187,24 @@ class CallbackListBase {
// iteration.
void Compact() {
typename std::list<CallbackType>::iterator it = callbacks_.begin();
+ bool updated = false;
while (it != callbacks_.end()) {
- if ((*it).is_null())
+ if ((*it).is_null()) {
+ updated = true;
it = callbacks_.erase(it);
- else
+ } else {
++it;
+ }
+
+ if (updated && !removal_callback_.is_null())
+ removal_callback_.Run();
}
}
private:
std::list<CallbackType> callbacks_;
int active_iterator_count_;
+ Closure removal_callback_;
DISALLOW_COPY_AND_ASSIGN(CallbackListBase);
};
diff --git a/chromium/base/cancelable_callback_unittest.cc b/chromium/base/cancelable_callback_unittest.cc
index 89c603c9537..fcbe23c1de3 100644
--- a/chromium/base/cancelable_callback_unittest.cc
+++ b/chromium/base/cancelable_callback_unittest.cc
@@ -159,7 +159,7 @@ TEST(CancelableCallbackTest, IsNull) {
// CancelableCallback posted to a MessageLoop with PostTask.
// - Callbacks posted to a MessageLoop can be cancelled.
TEST(CancelableCallbackTest, PostTask) {
- MessageLoop loop(MessageLoop::TYPE_DEFAULT);
+ MessageLoop loop;
int count = 0;
CancelableClosure cancelable(base::Bind(&Increment,
diff --git a/chromium/base/command_line.cc b/chromium/base/command_line.cc
index e00eee6bd89..6e37d6bf72b 100644
--- a/chromium/base/command_line.cc
+++ b/chromium/base/command_line.cc
@@ -20,11 +20,12 @@
#include <shellapi.h>
#endif
-using base::FilePath;
+namespace base {
CommandLine* CommandLine::current_process_commandline_ = NULL;
namespace {
+
const CommandLine::CharType kSwitchTerminator[] = FILE_PATH_LITERAL("--");
const CommandLine::CharType kSwitchValueSeparator[] = FILE_PATH_LITERAL("=");
@@ -81,7 +82,8 @@ void AppendSwitchesAndArguments(CommandLine& command_line,
parse_switches &= (arg != kSwitchTerminator);
if (parse_switches && IsSwitch(arg, &switch_string, &switch_value)) {
#if defined(OS_WIN)
- command_line.AppendSwitchNative(WideToASCII(switch_string), switch_value);
+ command_line.AppendSwitchNative(UTF16ToASCII(switch_string),
+ switch_value);
#elif defined(OS_POSIX)
command_line.AppendSwitchNative(switch_string, switch_value);
#endif
@@ -308,7 +310,7 @@ std::string CommandLine::GetSwitchValueASCII(
return std::string();
}
#if defined(OS_WIN)
- return WideToASCII(value);
+ return UTF16ToASCII(value);
#else
return value;
#endif
@@ -413,7 +415,7 @@ void CommandLine::PrependWrapper(const CommandLine::StringType& wrapper) {
// The wrapper may have embedded arguments (like "gdb --args"). In this case,
// we don't pretend to do anything fancy, we just split on spaces.
StringVector wrapper_argv;
- base::SplitString(wrapper, FILE_PATH_LITERAL(' '), &wrapper_argv);
+ SplitString(wrapper, FILE_PATH_LITERAL(' '), &wrapper_argv);
// Prepend the wrapper and update the switches/arguments |begin_args_|.
argv_.insert(argv_.begin(), wrapper_argv.begin(), wrapper_argv.end());
begin_args_ += wrapper_argv.size();
@@ -431,8 +433,10 @@ void CommandLine::ParseFromString(const std::wstring& command_line) {
args = ::CommandLineToArgvW(command_line_string.c_str(), &num_args);
DPLOG_IF(FATAL, !args) << "CommandLineToArgvW failed on command line: "
- << command_line;
+ << UTF16ToUTF8(command_line);
InitFromArgv(num_args, args);
LocalFree(args);
}
#endif
+
+} // namespace base
diff --git a/chromium/base/command_line.h b/chromium/base/command_line.h
index 81bd4b73761..fd06e61c774 100644
--- a/chromium/base/command_line.h
+++ b/chromium/base/command_line.h
@@ -24,8 +24,8 @@
#include "build/build_config.h"
namespace base {
+
class FilePath;
-}
class BASE_EXPORT CommandLine {
public:
@@ -45,7 +45,7 @@ class BASE_EXPORT CommandLine {
explicit CommandLine(NoProgram no_program);
// Construct a new command line with |program| as argv[0].
- explicit CommandLine(const base::FilePath& program);
+ explicit CommandLine(const FilePath& program);
// Construct a new command line from an argument list.
CommandLine(int argc, const CharType* const* argv);
@@ -108,8 +108,8 @@ class BASE_EXPORT CommandLine {
const StringVector& argv() const { return argv_; }
// Get and Set the program part of the command line string (the first item).
- base::FilePath GetProgram() const;
- void SetProgram(const base::FilePath& program);
+ FilePath GetProgram() const;
+ void SetProgram(const FilePath& program);
// Returns true if this command line contains the given switch.
// (Switch names are case-insensitive).
@@ -118,7 +118,7 @@ class BASE_EXPORT CommandLine {
// Returns the value associated with the given switch. If the switch has no
// value or isn't present, this method returns the empty string.
std::string GetSwitchValueASCII(const std::string& switch_string) const;
- base::FilePath GetSwitchValuePath(const std::string& switch_string) const;
+ FilePath GetSwitchValuePath(const std::string& switch_string) const;
StringType GetSwitchValueNative(const std::string& switch_string) const;
// Get a copy of all switches, along with their values.
@@ -128,7 +128,7 @@ class BASE_EXPORT CommandLine {
// Note: Switches will precede arguments regardless of appending order.
void AppendSwitch(const std::string& switch_string);
void AppendSwitchPath(const std::string& switch_string,
- const base::FilePath& path);
+ const FilePath& path);
void AppendSwitchNative(const std::string& switch_string,
const StringType& value);
void AppendSwitchASCII(const std::string& switch_string,
@@ -148,7 +148,7 @@ class BASE_EXPORT CommandLine {
// AppendArg is primarily for ASCII; non-ASCII input is interpreted as UTF-8.
// Note: Switches will precede arguments regardless of appending order.
void AppendArg(const std::string& value);
- void AppendArgPath(const base::FilePath& value);
+ void AppendArgPath(const FilePath& value);
void AppendArgNative(const StringType& value);
// Append the switches and arguments from another command line to this one.
@@ -186,4 +186,9 @@ class BASE_EXPORT CommandLine {
size_t begin_args_;
};
+} // namespace base
+
+// TODO(brettw) remove once all callers specify the namespace properly.
+using base::CommandLine;
+
#endif // BASE_COMMAND_LINE_H_
diff --git a/chromium/base/command_line_unittest.cc b/chromium/base/command_line_unittest.cc
index 2c947fc39ad..06c5006505a 100644
--- a/chromium/base/command_line_unittest.cc
+++ b/chromium/base/command_line_unittest.cc
@@ -198,10 +198,14 @@ TEST(CommandLineTest, GetArgumentsString) {
cl.AppendArg(kFourthArgName);
#if defined(OS_WIN)
- CommandLine::StringType expected_first_arg(UTF8ToUTF16(kFirstArgName));
- CommandLine::StringType expected_second_arg(UTF8ToUTF16(kSecondArgName));
- CommandLine::StringType expected_third_arg(UTF8ToUTF16(kThirdArgName));
- CommandLine::StringType expected_fourth_arg(UTF8ToUTF16(kFourthArgName));
+ CommandLine::StringType expected_first_arg(
+ base::UTF8ToUTF16(kFirstArgName));
+ CommandLine::StringType expected_second_arg(
+ base::UTF8ToUTF16(kSecondArgName));
+ CommandLine::StringType expected_third_arg(
+ base::UTF8ToUTF16(kThirdArgName));
+ CommandLine::StringType expected_fourth_arg(
+ base::UTF8ToUTF16(kFourthArgName));
#elif defined(OS_POSIX)
CommandLine::StringType expected_first_arg(kFirstArgName);
CommandLine::StringType expected_second_arg(kSecondArgName);
diff --git a/chromium/base/compiler_specific.h b/chromium/base/compiler_specific.h
index dc4b2334987..9e2111db6b6 100644
--- a/chromium/base/compiler_specific.h
+++ b/chromium/base/compiler_specific.h
@@ -137,9 +137,7 @@
// method in the parent class.
// Use like:
// virtual void foo() OVERRIDE;
-#if defined(COMPILER_MSVC)
-#define OVERRIDE override
-#elif defined(__clang__)
+#if defined(__clang__) || defined(COMPILER_MSVC)
#define OVERRIDE override
#elif defined(COMPILER_GCC) && __cplusplus >= 201103 && \
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40700
@@ -154,10 +152,7 @@
// Use like:
// virtual void foo() FINAL;
// class B FINAL : public A {};
-#if defined(COMPILER_MSVC)
-// TODO(jered): Change this to "final" when chromium no longer uses MSVC 2010.
-#define FINAL sealed
-#elif defined(__clang__)
+#if defined(__clang__) || defined(COMPILER_MSVC)
#define FINAL final
#elif defined(COMPILER_GCC) && __cplusplus >= 201103 && \
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40700
@@ -196,12 +191,9 @@
// If available, it would look like:
// __attribute__((format(wprintf, format_param, dots_param)))
-
// MemorySanitizer annotations.
-#ifdef MEMORY_SANITIZER
-extern "C" {
-void __msan_unpoison(const void *p, unsigned long s);
-} // extern "C"
+#if defined(MEMORY_SANITIZER) && !defined(OS_NACL)
+#include <sanitizer/msan_interface.h>
// Mark a memory region fully initialized.
// Use this to annotate code that deliberately reads uninitialized data, for
@@ -211,4 +203,22 @@ void __msan_unpoison(const void *p, unsigned long s);
#define MSAN_UNPOISON(p, s)
#endif // MEMORY_SANITIZER
+// Macro useful for writing cross-platform function pointers.
+#if !defined(CDECL)
+#if defined(OS_WIN)
+#define CDECL __cdecl
+#else // defined(OS_WIN)
+#define CDECL
+#endif // defined(OS_WIN)
+#endif // !defined(CDECL)
+
+// Macro for hinting that an expression is likely to be false.
+#if !defined(UNLIKELY)
+#if defined(COMPILER_GCC)
+#define UNLIKELY(x) __builtin_expect(!!(x), 0)
+#else
+#define UNLIKELY(x) (x)
+#endif // defined(COMPILER_GCC)
+#endif // !defined(UNLIKELY)
+
#endif // BASE_COMPILER_SPECIFIC_H_
diff --git a/chromium/base/containers/hash_tables.h b/chromium/base/containers/hash_tables.h
index 365b586ba93..6f37c49c3e4 100644
--- a/chromium/base/containers/hash_tables.h
+++ b/chromium/base/containers/hash_tables.h
@@ -140,7 +140,7 @@ inline std::size_t HashInts32(uint32 value1, uint32 value2) {
hash64 = hash64 * odd_random + shift_random;
std::size_t high_bits = static_cast<std::size_t>(
- hash64 >> (sizeof(uint64) - sizeof(std::size_t)));
+ hash64 >> (8 * (sizeof(uint64) - sizeof(std::size_t))));
return high_bits;
}
@@ -175,7 +175,7 @@ inline std::size_t HashInts64(uint64 value1, uint64 value2) {
hash64 = hash64 * odd_random + shift_random;
std::size_t high_bits = static_cast<std::size_t>(
- hash64 >> (sizeof(uint64) - sizeof(std::size_t)));
+ hash64 >> (8 * (sizeof(uint64) - sizeof(std::size_t))));
return high_bits;
}
diff --git a/chromium/base/containers/scoped_ptr_hash_map.h b/chromium/base/containers/scoped_ptr_hash_map.h
index b636e604a5a..dedf21365be 100644
--- a/chromium/base/containers/scoped_ptr_hash_map.h
+++ b/chromium/base/containers/scoped_ptr_hash_map.h
@@ -24,6 +24,9 @@ class ScopedPtrHashMap {
typedef base::hash_map<Key, Value*> Container;
public:
+ typedef typename Container::key_type key_type;
+ typedef typename Container::mapped_type mapped_type;
+ typedef typename Container::value_type value_type;
typedef typename Container::iterator iterator;
typedef typename Container::const_iterator const_iterator;
@@ -35,30 +38,29 @@ class ScopedPtrHashMap {
data_.swap(other.data_);
}
- std::pair<iterator, bool> insert(
- std::pair<Key, const scoped_ptr<Value> > pair) {
- return data_.insert(
- std::pair<Key, Value*>(pair.first, pair.second.release()));
- }
-
// Replaces value but not key if key is already present.
- std::pair<iterator, bool> set(Key key, scoped_ptr<Value> data) {
+ iterator set(const Key& key, scoped_ptr<Value> data) {
iterator it = find(key);
- if (it != end())
- erase(it);
- Value* raw_ptr = data.release();
- return data_.insert(std::pair<Key, Value*>(key, raw_ptr));
+ if (it != end()) {
+ delete it->second;
+ it->second = data.release();
+ return it;
+ }
+
+ return data_.insert(std::make_pair(key, data.release())).first;
}
// Does nothing if key is already present
- std::pair<iterator, bool> add(Key key, scoped_ptr<Value> data) {
- Value* raw_ptr = data.release();
- return data_.insert(std::pair<Key, Value*>(key, raw_ptr));
+ std::pair<iterator, bool> add(const Key& key, scoped_ptr<Value> data) {
+ std::pair<iterator, bool> result =
+ data_.insert(std::make_pair(key, data.get()));
+ if (result.second)
+ ignore_result(data.release());
+ return result;
}
void erase(iterator it) {
- if (it->second)
- delete it->second;
+ delete it->second;
data_.erase(it);
}
@@ -75,10 +77,8 @@ class ScopedPtrHashMap {
if (it == data_.end())
return scoped_ptr<Value>();
- Key key = it->first;
scoped_ptr<Value> ret(it->second);
- data_.erase(it);
- data_.insert(std::pair<Key, Value*>(key, static_cast<Value*>(NULL)));
+ it->second = NULL;
return ret.Pass();
}
@@ -108,12 +108,12 @@ class ScopedPtrHashMap {
return take_and_erase(it);
}
- // Returns the first element in the hash_map that matches the given key.
+ // Returns the element in the hash_map that matches the given key.
// If no such element exists it returns NULL.
Value* get(const Key& k) const {
const_iterator it = find(k);
if (it == end())
- return 0;
+ return NULL;
return it->second;
}
diff --git a/chromium/base/containers/small_map_unittest.cc b/chromium/base/containers/small_map_unittest.cc
index b911bee655d..bc76e370397 100644
--- a/chromium/base/containers/small_map_unittest.cc
+++ b/chromium/base/containers/small_map_unittest.cc
@@ -138,30 +138,21 @@ TEST(SmallMap, CopyConstructor) {
}
template<class inner>
-static void SmallMapToMap(SmallMap<inner> const& src, inner* dest) {
+static bool SmallMapIsSubset(SmallMap<inner> const& a,
+ SmallMap<inner> const& b) {
typename SmallMap<inner>::const_iterator it;
- for (it = src.begin(); it != src.end(); ++it) {
- dest->insert(std::make_pair(it->first, it->second));
+ for (it = a.begin(); it != a.end(); ++it) {
+ typename SmallMap<inner>::const_iterator it_in_b = b.find(it->first);
+ if (it_in_b == b.end() || it_in_b->second != it->second)
+ return false;
}
+ return true;
}
template<class inner>
static bool SmallMapEqual(SmallMap<inner> const& a,
SmallMap<inner> const& b) {
- inner ia, ib;
- SmallMapToMap(a, &ia);
- SmallMapToMap(b, &ib);
-
- // On most systems we can use operator== here, but under some lesser STL
- // implementations it doesn't seem to work. So we manually compare.
- if (ia.size() != ib.size())
- return false;
- for (typename inner::iterator ia_it = ia.begin(), ib_it = ib.begin();
- ia_it != ia.end(); ++ia_it, ++ib_it) {
- if (*ia_it != *ib_it)
- return false;
- }
- return true;
+ return SmallMapIsSubset(a, b) && SmallMapIsSubset(b, a);
}
TEST(SmallMap, AssignmentOperator) {
diff --git a/chromium/base/containers/stack_container.h b/chromium/base/containers/stack_container.h
index f0106d73f21..87fa0369b6a 100644
--- a/chromium/base/containers/stack_container.h
+++ b/chromium/base/containers/stack_container.h
@@ -90,6 +90,13 @@ class StackAllocator : public std::allocator<T> {
: source_(NULL) {
}
+ // This constructor must exist. It creates a default allocator that doesn't
+ // actually have a stack buffer. glibc's std::string() will compare the
+ // current allocator against the default-constructed allocator, so this
+ // should be fast.
+ StackAllocator() : source_(NULL) {
+ }
+
explicit StackAllocator(Source* source) : source_(source) {
}
diff --git a/chromium/base/cpu.cc b/chromium/base/cpu.cc
index 66207a1e0b8..dcba3b6e73e 100644
--- a/chromium/base/cpu.cc
+++ b/chromium/base/cpu.cc
@@ -11,6 +11,11 @@
#include "base/basictypes.h"
#include "build/build_config.h"
+#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX))
+#include "base/file_util.h"
+#include "base/lazy_instance.h"
+#endif
+
#if defined(ARCH_CPU_X86_FAMILY)
#if defined(_MSC_VER)
#include <intrin.h>
@@ -84,6 +89,56 @@ uint64 _xgetbv(uint32 xcr) {
#endif // !_MSC_VER
#endif // ARCH_CPU_X86_FAMILY
+#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX))
+
+// Returns the string found in /proc/cpuinfo under the key "model name" or
+// "Processor". "model name" is used in Linux 3.8 and later (3.7 and later for
+// arm64) and is shown once per CPU. "Processor" is used in earler versions and
+// is shown only once at the top of /proc/cpuinfo regardless of the number CPUs.
+std::string ParseCpuInfo() {
+ const char kModelNamePrefix[] = "model name\t: ";
+ const char kProcessorPrefix[] = "Processor\t: ";
+ std::string contents;
+ ReadFileToString(FilePath("/proc/cpuinfo"), &contents);
+ DCHECK(!contents.empty());
+ std::string cpu_brand;
+ if (!contents.empty()) {
+ std::istringstream iss(contents);
+ std::string line;
+ while (std::getline(iss, line)) {
+ if (line.compare(0, strlen(kModelNamePrefix), kModelNamePrefix) == 0) {
+ cpu_brand.assign(line.substr(strlen(kModelNamePrefix)));
+ break;
+ }
+ if (line.compare(0, strlen(kProcessorPrefix), kProcessorPrefix) == 0) {
+ cpu_brand.assign(line.substr(strlen(kProcessorPrefix)));
+ break;
+ }
+ }
+ }
+ return cpu_brand;
+}
+
+class LazyCpuInfoValue {
+ public:
+ LazyCpuInfoValue() : value_(ParseCpuInfo()) {}
+ const std::string& value() { return value_; }
+
+ private:
+ const std::string value_;
+ DISALLOW_COPY_AND_ASSIGN(LazyCpuInfoValue);
+};
+
+base::LazyInstance<LazyCpuInfoValue> g_lazy_cpu_brand =
+ LAZY_INSTANCE_INITIALIZER;
+
+const std::string& CpuBrandInfo() {
+ return g_lazy_cpu_brand.Get().value();
+}
+
+#endif // defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) ||
+ // defined(OS_LINUX))
+
} // anonymous namespace
void CPU::Initialize() {
@@ -128,8 +183,14 @@ void CPU::Initialize() {
// b) XSAVE is supported by the CPU and
// c) XSAVE is enabled by the kernel.
// See http://software.intel.com/en-us/blogs/2011/04/14/is-avx-enabled
+ //
+ // In addition, we have observed some crashes with the xgetbv instruction
+ // even after following Intel's example code. (See crbug.com/375968.)
+ // Because of that, we also test the XSAVE bit because its description in
+ // the CPUID documentation suggests that it signals xgetbv support.
has_avx_ =
has_avx_hardware_ &&
+ (cpu_info[2] & 0x04000000) != 0 /* XSAVE */ &&
(cpu_info[2] & 0x08000000) != 0 /* OSXSAVE */ &&
(_xgetbv(0) & 6) == 6 /* XSAVE enabled by kernel */;
has_aesni_ = (cpu_info[2] & 0x02000000) != 0;
@@ -157,13 +218,8 @@ void CPU::Initialize() {
__cpuid(cpu_info, parameter_containing_non_stop_time_stamp_counter);
has_non_stop_time_stamp_counter_ = (cpu_info[3] & (1 << 8)) != 0;
}
-#elif defined(ARCH_CPU_ARM_FAMILY)
- // TODO(piman): Expand this. ARM has a CPUID register, but it's not available
- // in user mode. /proc/cpuinfo has some information, but it's non standard,
- // platform-specific, and not accessible from the sandbox.
- // For some purposes, this first approximation is enough.
- // crbug.com/313454
- cpu_brand_.assign("ARM");
+#elif defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX))
+ cpu_brand_.assign(CpuBrandInfo());
#endif
}
diff --git a/chromium/base/critical_closure.h b/chromium/base/critical_closure.h
index ca51ed5cef2..ac07911089d 100644
--- a/chromium/base/critical_closure.h
+++ b/chromium/base/critical_closure.h
@@ -7,9 +7,46 @@
#include "base/callback.h"
+#if defined(OS_IOS)
+#include "base/bind.h"
+#include "base/ios/scoped_critical_action.h"
+#endif
+
namespace base {
-// Returns a closure that will continue to run for a period of time when the
+namespace internal {
+
+#if defined(OS_IOS)
+// Returns true if multi-tasking is supported on this iOS device.
+bool IsMultiTaskingSupported();
+
+// This class wraps a closure so it can continue to run for a period of time
+// when the application goes to the background by using
+// |ios::ScopedCriticalAction|.
+template <typename R>
+class CriticalClosure {
+ public:
+ explicit CriticalClosure(const Callback<R(void)>& closure)
+ : closure_(closure) {}
+
+ ~CriticalClosure() {}
+
+ R Run() {
+ return closure_.Run();
+ }
+
+ private:
+ ios::ScopedCriticalAction critical_action_;
+ Callback<R(void)> closure_;
+
+ DISALLOW_COPY_AND_ASSIGN(CriticalClosure);
+};
+#endif // defined(OS_IOS)
+
+} // namespace internal
+
+// Returns a closure (which may return a result, but must not require any extra
+// arguments) that will continue to run for a period of time when the
// application goes to the background if possible on platforms where
// applications don't execute while backgrounded, otherwise the original task is
// returned.
@@ -23,14 +60,20 @@ namespace base {
// background running time, |MakeCriticalClosure| should be applied on them
// before posting.
#if defined(OS_IOS)
-base::Closure MakeCriticalClosure(const base::Closure& closure);
-#else
-inline base::Closure MakeCriticalClosure(const base::Closure& closure) {
+template <typename R>
+Callback<R(void)> MakeCriticalClosure(const Callback<R(void)>& closure) {
+ DCHECK(internal::IsMultiTaskingSupported());
+ return base::Bind(&internal::CriticalClosure<R>::Run,
+ Owned(new internal::CriticalClosure<R>(closure)));
+}
+#else // defined(OS_IOS)
+template <typename R>
+inline Callback<R(void)> MakeCriticalClosure(const Callback<R(void)>& closure) {
// No-op for platforms where the application does not need to acquire
// background time for closures to finish when it goes into the background.
return closure;
}
-#endif // !defined(OS_IOS)
+#endif // defined(OS_IOS)
} // namespace base
diff --git a/chromium/base/critical_closure_internal_ios.mm b/chromium/base/critical_closure_internal_ios.mm
new file mode 100644
index 00000000000..b8fec141b21
--- /dev/null
+++ b/chromium/base/critical_closure_internal_ios.mm
@@ -0,0 +1,17 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/critical_closure.h"
+
+#import <UIKit/UIKit.h>
+
+namespace base {
+namespace internal {
+
+bool IsMultiTaskingSupported() {
+ return [[UIDevice currentDevice] isMultitaskingSupported];
+}
+
+} // namespace internal
+} // namespace base
diff --git a/chromium/base/critical_closure_ios.mm b/chromium/base/critical_closure_ios.mm
deleted file mode 100644
index d605cad0a20..00000000000
--- a/chromium/base/critical_closure_ios.mm
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/critical_closure.h"
-
-#import <UIKit/UIKit.h>
-
-#include "base/bind.h"
-#include "base/ios/scoped_critical_action.h"
-#include "base/memory/ref_counted.h"
-
-namespace {
-
-// This class wraps a closure so it can continue to run for a period of time
-// when the application goes to the background by using
-// |base::ios::ScopedCriticalAction|.
-class CriticalClosure : public base::RefCountedThreadSafe<CriticalClosure> {
- public:
- explicit CriticalClosure(base::Closure* closure) : closure_(closure) {
- }
-
- void Run() {
- closure_->Run();
- }
-
- private:
- friend class base::RefCountedThreadSafe<CriticalClosure>;
-
- virtual ~CriticalClosure() {}
-
- base::ios::ScopedCriticalAction criticial_action_;
- scoped_ptr<base::Closure> closure_;
-
- DISALLOW_COPY_AND_ASSIGN(CriticalClosure);
-};
-
-} // namespace
-
-namespace base {
-
-base::Closure MakeCriticalClosure(const base::Closure& closure) {
- DCHECK([[UIDevice currentDevice] isMultitaskingSupported]);
- scoped_refptr<CriticalClosure> critical_closure(
- new CriticalClosure(new base::Closure(closure)));
- return base::Bind(&CriticalClosure::Run, critical_closure.get());
-}
-
-} // namespace base
diff --git a/chromium/base/debug/OWNERS b/chromium/base/debug/OWNERS
index 4976ab1e773..5dcc3e9d737 100644
--- a/chromium/base/debug/OWNERS
+++ b/chromium/base/debug/OWNERS
@@ -1,3 +1,5 @@
+per-file sanitizer_options.cc=glider@chromium.org
per-file trace_event*=nduca@chromium.org
per-file trace_event*=dsinclair@chromium.org
per-file trace_event_android.cc=wangxianzhu@chromium.org
+per-file tsan_suppressions.cc=*
diff --git a/chromium/base/debug/asan_invalid_access.cc b/chromium/base/debug/asan_invalid_access.cc
new file mode 100644
index 00000000000..ff7788a39cc
--- /dev/null
+++ b/chromium/base/debug/asan_invalid_access.cc
@@ -0,0 +1,94 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#if defined(OS_WIN)
+#include <windows.h>
+#endif
+
+#include "base/debug/alias.h"
+#include "base/debug/asan_invalid_access.h"
+#include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
+
+namespace base {
+namespace debug {
+
+namespace {
+
+#if defined(SYZYASAN)
+// Corrupt a memory block and make sure that the corruption gets detected either
+// when we free it or when another crash happens (if |induce_crash| is set to
+// true).
+NOINLINE void CorruptMemoryBlock(bool induce_crash) {
+ // NOTE(sebmarchand): We intentionally corrupt a memory block here in order to
+ // trigger an Address Sanitizer (ASAN) error report.
+ static const int kArraySize = 5;
+ int* array = new int[kArraySize];
+ // Encapsulate the invalid memory access into a try-catch statement to prevent
+ // this function from being instrumented. This way the underflow won't be
+ // detected but the corruption will (as the allocator will still be hooked).
+ try {
+ // Declares the dummy value as volatile to make sure it doesn't get
+ // optimized away.
+ int volatile dummy = array[-1]--;
+ base::debug::Alias(const_cast<int*>(&dummy));
+ } catch (...) {
+ }
+ if (induce_crash)
+ CHECK(false);
+ delete[] array;
+}
+#endif
+
+} // namespace
+
+#if defined(ADDRESS_SANITIZER) || defined(SYZYASAN)
+// NOTE(sebmarchand): We intentionally perform some invalid heap access here in
+// order to trigger an AddressSanitizer (ASan) error report.
+
+static const int kArraySize = 5;
+
+void AsanHeapOverflow() {
+ scoped_ptr<int[]> array(new int[kArraySize]);
+ // Declares the dummy value as volatile to make sure it doesn't get optimized
+ // away.
+ int volatile dummy = 0;
+ dummy = array[kArraySize];
+ base::debug::Alias(const_cast<int*>(&dummy));
+}
+
+void AsanHeapUnderflow() {
+ scoped_ptr<int[]> array(new int[kArraySize]);
+ // Declares the dummy value as volatile to make sure it doesn't get optimized
+ // away.
+ int volatile dummy = 0;
+ dummy = array[-1];
+ base::debug::Alias(const_cast<int*>(&dummy));
+}
+
+void AsanHeapUseAfterFree() {
+ scoped_ptr<int[]> array(new int[kArraySize]);
+ // Declares the dummy value as volatile to make sure it doesn't get optimized
+ // away.
+ int volatile dummy = 0;
+ int* dangling = array.get();
+ array.reset();
+ dummy = dangling[kArraySize / 2];
+ base::debug::Alias(const_cast<int*>(&dummy));
+}
+
+#endif // ADDRESS_SANITIZER || SYZYASAN
+
+#if defined(SYZYASAN)
+void AsanCorruptHeapBlock() {
+ CorruptMemoryBlock(false);
+}
+
+void AsanCorruptHeap() {
+ CorruptMemoryBlock(true);
+}
+#endif // SYZYASAN
+
+} // namespace debug
+} // namespace base
diff --git a/chromium/base/debug/asan_invalid_access.h b/chromium/base/debug/asan_invalid_access.h
new file mode 100644
index 00000000000..65519878f12
--- /dev/null
+++ b/chromium/base/debug/asan_invalid_access.h
@@ -0,0 +1,47 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Defines some functions that intentionally do an invalid memory access in
+// order to trigger an AddressSanitizer (ASan) error report.
+
+#ifndef BASE_DEBUG_ASAN_INVALID_ACCESS_H_
+#define BASE_DEBUG_ASAN_INVALID_ACCESS_H_
+
+#include "base/base_export.h"
+#include "base/compiler_specific.h"
+
+namespace base {
+namespace debug {
+
+#if defined(ADDRESS_SANITIZER) || defined(SYZYASAN)
+
+// Generates an heap buffer overflow.
+BASE_EXPORT NOINLINE void AsanHeapOverflow();
+
+// Generates an heap buffer underflow.
+BASE_EXPORT NOINLINE void AsanHeapUnderflow();
+
+// Generates an use after free.
+BASE_EXPORT NOINLINE void AsanHeapUseAfterFree();
+
+#endif // ADDRESS_SANITIZER || SYZYASAN
+
+// The "corrupt-block" and "corrupt-heap" classes of bugs is specific to
+// SyzyASan.
+#if defined(SYZYASAN)
+
+// Corrupts a memory block and makes sure that the corruption gets detected when
+// we try to free this block.
+BASE_EXPORT NOINLINE void AsanCorruptHeapBlock();
+
+// Corrupts the heap and makes sure that the corruption gets detected when a
+// crash occur.
+BASE_EXPORT NOINLINE void AsanCorruptHeap();
+
+#endif // SYZYASAN
+
+} // namespace debug
+} // namespace base
+
+#endif // BASE_DEBUG_ASAN_INVALID_ACCESS_H_
diff --git a/chromium/base/debug/debug_on_start_win.cc b/chromium/base/debug/debug_on_start_win.cc
deleted file mode 100644
index 6ca88dde20c..00000000000
--- a/chromium/base/debug/debug_on_start_win.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/debug/debug_on_start_win.h"
-
-#include <windows.h>
-
-#include "base/base_switches.h"
-#include "base/basictypes.h"
-#include "base/debug/debugger.h"
-
-namespace base {
-namespace debug {
-
-// Minimalist implementation to try to find a command line argument. We can use
-// kernel32 exported functions but not the CRT functions because we're too early
-// in the process startup.
-// The code is not that bright and will find things like ---argument or
-// /-/argument.
-// Note: command_line is non-destructively modified.
-bool DebugOnStart::FindArgument(wchar_t* command_line, const char* argument_c) {
- wchar_t argument[50] = {};
- for (int i = 0; argument_c[i]; ++i)
- argument[i] = argument_c[i];
-
- int argument_len = lstrlen(argument);
- int command_line_len = lstrlen(command_line);
- while (command_line_len > argument_len) {
- wchar_t first_char = command_line[0];
- wchar_t last_char = command_line[argument_len+1];
- // Try to find an argument.
- if ((first_char == L'-' || first_char == L'/') &&
- (last_char == L' ' || last_char == 0 || last_char == L'=')) {
- command_line[argument_len+1] = 0;
- // Skip the - or /
- if (lstrcmpi(command_line+1, argument) == 0) {
- // Found it.
- command_line[argument_len+1] = last_char;
- return true;
- }
- // Fix back.
- command_line[argument_len+1] = last_char;
- }
- // Continue searching.
- ++command_line;
- --command_line_len;
- }
- return false;
-}
-
-// static
-int __cdecl DebugOnStart::Init() {
- // Try to find the argument.
- if (FindArgument(GetCommandLine(), switches::kDebugOnStart)) {
- // We can do 2 things here:
- // - Ask for a debugger to attach to us. This involve reading the registry
- // key and creating the process.
- // - Do a int3.
-
- // It will fails if we run in a sandbox. That is expected.
- base::debug::SpawnDebuggerOnProcess(GetCurrentProcessId());
-
- // Wait for a debugger to come take us.
- base::debug::WaitForDebugger(60, false);
- } else if (FindArgument(GetCommandLine(), switches::kWaitForDebugger)) {
- // Wait for a debugger to come take us.
- base::debug::WaitForDebugger(60, true);
- }
- return 0;
-}
-
-} // namespace debug
-} // namespace base
diff --git a/chromium/base/debug/debug_on_start_win.h b/chromium/base/debug/debug_on_start_win.h
deleted file mode 100644
index edcaa0aa953..00000000000
--- a/chromium/base/debug/debug_on_start_win.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Define the necessary code and global data to look for kDebugOnStart command
-// line argument. When the command line argument is detected, it invokes the
-// debugger, if no system-wide debugger is registered, a debug break is done.
-
-#ifndef BASE_DEBUG_DEBUG_ON_START_WIN_H_
-#define BASE_DEBUG_DEBUG_ON_START_WIN_H_
-
-#include "base/basictypes.h"
-#include "build/build_config.h"
-
-// This only works on Windows. It's legal to include on other platforms, but
-// will be a NOP.
-#if defined(OS_WIN)
-
-#ifndef DECLSPEC_SELECTANY
-#define DECLSPEC_SELECTANY __declspec(selectany)
-#endif
-
-namespace base {
-namespace debug {
-
-// There is no way for this code, as currently implemented, to work across DLLs.
-// TODO(rvargas): It looks like we really don't use this code, at least not for
-// Chrome. Figure out if it's really worth implementing something simpler.
-#if !defined(COMPONENT_BUILD)
-
-// Debug on start functions and data.
-class DebugOnStart {
- public:
- // Expected function type in the .CRT$XI* section.
- // Note: See VC\crt\src\internal.h for reference.
- typedef int (__cdecl *PIFV)(void);
-
- // Looks at the command line for kDebugOnStart argument. If found, it invokes
- // the debugger, if this fails, it crashes.
- static int __cdecl Init();
-
- // Returns true if the 'argument' is present in the 'command_line'. It does
- // not use the CRT, only Kernel32 functions.
- static bool FindArgument(wchar_t* command_line, const char* argument);
-};
-
-// Set the function pointer to our function to look for a crash on start. The
-// XIB section is started pretty early in the program initialization so in
-// theory it should be called before any user created global variable
-// initialization code and CRT initialization code.
-// Note: See VC\crt\src\defsects.inc and VC\crt\src\crt0.c for reference.
-#ifdef _WIN64
-
-// "Fix" the segment. On x64, the .CRT segment is merged into the .rdata segment
-// so it contains const data only.
-#pragma const_seg(push, ".CRT$XIB")
-// Declare the pointer so the CRT will find it.
-extern const DebugOnStart::PIFV debug_on_start;
-DECLSPEC_SELECTANY const DebugOnStart::PIFV debug_on_start =
- &DebugOnStart::Init;
-// Fix back the segment.
-#pragma const_seg(pop)
-
-#else // _WIN64
-
-// "Fix" the segment. On x86, the .CRT segment is merged into the .data segment
-// so it contains non-const data only.
-#pragma data_seg(push, ".CRT$XIB")
-// Declare the pointer so the CRT will find it.
-DECLSPEC_SELECTANY DebugOnStart::PIFV debug_on_start = &DebugOnStart::Init;
-// Fix back the segment.
-#pragma data_seg(pop)
-
-#endif // _WIN64
-
-#endif // defined(COMPONENT_BUILD)
-
-} // namespace debug
-} // namespace base
-
-#endif // defined(OS_WIN)
-
-#endif // BASE_DEBUG_DEBUG_ON_START_WIN_H_
diff --git a/chromium/base/debug/debugger.h b/chromium/base/debug/debugger.h
index 4f368d986d4..d62ea3f7e17 100644
--- a/chromium/base/debug/debugger.h
+++ b/chromium/base/debug/debugger.h
@@ -14,10 +14,6 @@
namespace base {
namespace debug {
-// Starts the registered system-wide JIT debugger to attach it to specified
-// process.
-BASE_EXPORT bool SpawnDebuggerOnProcess(unsigned process_id);
-
// Waits wait_seconds seconds for a debugger to attach to the current process.
// When silent is false, an exception is thrown when a debugger is detected.
BASE_EXPORT bool WaitForDebugger(int wait_seconds, bool silent);
diff --git a/chromium/base/debug/debugger_posix.cc b/chromium/base/debug/debugger_posix.cc
index 60ad5218308..48393f4f415 100644
--- a/chromium/base/debug/debugger_posix.cc
+++ b/chromium/base/debug/debugger_posix.cc
@@ -14,7 +14,6 @@
#include <sys/types.h>
#include <unistd.h>
-#include <string>
#include <vector>
#if defined(__GLIBCXX__)
@@ -41,7 +40,6 @@
#include "base/posix/eintr_wrapper.h"
#include "base/safe_strerror_posix.h"
#include "base/strings/string_piece.h"
-#include "base/strings/stringprintf.h"
#if defined(USE_SYMBOLIZE)
#include "base/third_party/symbolize/symbolize.h"
@@ -54,22 +52,6 @@
namespace base {
namespace debug {
-bool SpawnDebuggerOnProcess(unsigned process_id) {
-#if OS_ANDROID || OS_NACL
- NOTIMPLEMENTED();
- return false;
-#else
- const std::string debug_cmd =
- StringPrintf("xterm -e 'gdb --pid=%u' &", process_id);
- LOG(WARNING) << "Starting debugger on pid " << process_id
- << " with command `" << debug_cmd << "`";
- int ret = system(debug_cmd.c_str());
- if (ret == -1)
- return false;
- return true;
-#endif
-}
-
#if defined(OS_MACOSX) || defined(OS_BSD)
// Based on Apple's recommended method as described in
@@ -199,8 +181,10 @@ bool BeingDebugged() {
// SIGABRT
// Mac: Always send SIGTRAP.
-#if defined(ARCH_CPU_ARM_FAMILY)
+#if defined(ARCH_CPU_ARMEL)
#define DEBUG_BREAK_ASM() asm("bkpt 0")
+#elif defined(ARCH_CPU_ARM64)
+#define DEBUG_BREAK_ASM() asm("brk 0")
#elif defined(ARCH_CPU_MIPS_FAMILY)
#define DEBUG_BREAK_ASM() asm("break 2")
#elif defined(ARCH_CPU_X86_FAMILY)
diff --git a/chromium/base/debug/debugger_win.cc b/chromium/base/debug/debugger_win.cc
index b13dbfd1483..ccc9c1604bc 100644
--- a/chromium/base/debug/debugger_win.cc
+++ b/chromium/base/debug/debugger_win.cc
@@ -4,99 +4,12 @@
#include "base/debug/debugger.h"
+#include <stdlib.h>
#include <windows.h>
-#include <dbghelp.h>
-
-#include "base/basictypes.h"
-#include "base/logging.h"
namespace base {
namespace debug {
-namespace {
-
-// Minimalist key reader.
-// Note: Does not use the CRT.
-bool RegReadString(HKEY root, const wchar_t* subkey,
- const wchar_t* value_name, wchar_t* buffer, int* len) {
- HKEY key = NULL;
- DWORD res = RegOpenKeyEx(root, subkey, 0, KEY_READ, &key);
- if (ERROR_SUCCESS != res || key == NULL)
- return false;
-
- DWORD type = 0;
- DWORD buffer_size = *len * sizeof(wchar_t);
- // We don't support REG_EXPAND_SZ.
- res = RegQueryValueEx(key, value_name, NULL, &type,
- reinterpret_cast<BYTE*>(buffer), &buffer_size);
- if (ERROR_SUCCESS == res && buffer_size != 0 && type == REG_SZ) {
- // Make sure the buffer is NULL terminated.
- buffer[*len - 1] = 0;
- *len = lstrlen(buffer);
- RegCloseKey(key);
- return true;
- }
- RegCloseKey(key);
- return false;
-}
-
-// Replaces each "%ld" in input per a value. Not efficient but it works.
-// Note: Does not use the CRT.
-bool StringReplace(const wchar_t* input, int value, wchar_t* output,
- int output_len) {
- memset(output, 0, output_len*sizeof(wchar_t));
- int input_len = lstrlen(input);
-
- for (int i = 0; i < input_len; ++i) {
- int current_output_len = lstrlen(output);
-
- if (input[i] == L'%' && input[i + 1] == L'l' && input[i + 2] == L'd') {
- // Make sure we have enough place left.
- if ((current_output_len + 12) >= output_len)
- return false;
-
- // Cheap _itow().
- wsprintf(output+current_output_len, L"%d", value);
- i += 2;
- } else {
- if (current_output_len >= output_len)
- return false;
- output[current_output_len] = input[i];
- }
- }
- return true;
-}
-
-} // namespace
-
-// Note: Does not use the CRT.
-bool SpawnDebuggerOnProcess(unsigned process_id) {
- wchar_t reg_value[1026];
- int len = arraysize(reg_value);
- if (RegReadString(HKEY_LOCAL_MACHINE,
- L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug",
- L"Debugger", reg_value, &len)) {
- wchar_t command_line[1026];
- if (StringReplace(reg_value, process_id, command_line,
- arraysize(command_line))) {
- // We don't mind if the debugger is present because it will simply fail
- // to attach to this process.
- STARTUPINFO startup_info = {0};
- startup_info.cb = sizeof(startup_info);
- PROCESS_INFORMATION process_info = {0};
-
- if (CreateProcess(NULL, command_line, NULL, NULL, FALSE, 0, NULL, NULL,
- &startup_info, &process_info)) {
- CloseHandle(process_info.hThread);
- WaitForInputIdle(process_info.hProcess, 10000);
- CloseHandle(process_info.hProcess);
- return true;
- }
- }
- }
- return false;
-}
-
bool BeingDebugged() {
return ::IsDebuggerPresent() != 0;
}
diff --git a/chromium/base/debug/dump_without_crashing.cc b/chromium/base/debug/dump_without_crashing.cc
new file mode 100644
index 00000000000..47fd873c19f
--- /dev/null
+++ b/chromium/base/debug/dump_without_crashing.cc
@@ -0,0 +1,32 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/debug/dump_without_crashing.h"
+
+#include "base/logging.h"
+
+namespace {
+
+// Pointer to the function that's called by DumpWithoutCrashing() to dump the
+// process's memory.
+void (CDECL *dump_without_crashing_function_)() = NULL;
+
+} // namespace
+
+namespace base {
+
+namespace debug {
+
+void DumpWithoutCrashing() {
+ if (dump_without_crashing_function_)
+ (*dump_without_crashing_function_)();
+}
+
+void SetDumpWithoutCrashingFunction(void (CDECL *function)()) {
+ dump_without_crashing_function_ = function;
+}
+
+} // namespace debug
+
+} // namespace base
diff --git a/chromium/base/debug/dump_without_crashing.h b/chromium/base/debug/dump_without_crashing.h
new file mode 100644
index 00000000000..b8ed17414ac
--- /dev/null
+++ b/chromium/base/debug/dump_without_crashing.h
@@ -0,0 +1,30 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_DEBUG_DUMP_WITHOUT_CRASHING_H_
+#define BASE_DEBUG_DUMP_WITHOUT_CRASHING_H_
+
+#include "base/base_export.h"
+#include "base/compiler_specific.h"
+#include "build/build_config.h"
+
+namespace base {
+
+namespace debug {
+
+// Handler to silently dump the current process without crashing.
+// Before calling this function, call SetDumpWithoutCrashingFunction to pass a
+// function pointer, typically chrome!DumpProcessWithoutCrash. See example code
+// in chrome_main.cc that does this for chrome.dll.
+BASE_EXPORT void DumpWithoutCrashing();
+
+// Sets a function that'll be invoked to dump the current process when
+// DumpWithoutCrashing() is called.
+BASE_EXPORT void SetDumpWithoutCrashingFunction(void (CDECL *function)());
+
+} // namespace debug
+
+} // namespace base
+
+#endif // BASE_DEBUG_DUMP_WITHOUT_CRASHING_H_
diff --git a/chromium/base/debug/gdi_debug_util_win.cc b/chromium/base/debug/gdi_debug_util_win.cc
new file mode 100644
index 00000000000..4bac759d8c7
--- /dev/null
+++ b/chromium/base/debug/gdi_debug_util_win.cc
@@ -0,0 +1,129 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+#include "base/debug/gdi_debug_util_win.h"
+
+#include <cmath>
+
+#include <psapi.h>
+#include <TlHelp32.h>
+
+#include "base/debug/alias.h"
+#include "base/logging.h"
+#include "base/win/scoped_handle.h"
+
+namespace {
+
+void CollectChildGDIUsageAndDie(DWORD parent_pid) {
+ HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0) ;
+ if(snapshot == INVALID_HANDLE_VALUE)
+ CHECK(false);
+
+ int child_count = 0;
+ base::debug::Alias(&child_count);
+ int peak_gdi_count = 0;
+ base::debug::Alias(&peak_gdi_count);
+ int sum_gdi_count = 0;
+ base::debug::Alias(&sum_gdi_count);
+ int sum_user_count = 0;
+ base::debug::Alias(&sum_user_count);
+
+ PROCESSENTRY32 proc_entry = {0};
+ proc_entry.dwSize = sizeof(PROCESSENTRY32) ;
+ if(!Process32First(snapshot, &proc_entry))
+ CHECK(false);
+
+ do {
+ if (parent_pid != proc_entry.th32ParentProcessID)
+ continue;
+ // Got a child process. Compute GDI usage.
+ base::win::ScopedHandle process(
+ ::OpenProcess(PROCESS_QUERY_INFORMATION,
+ FALSE,
+ proc_entry.th32ParentProcessID));
+ if (!process)
+ continue;
+
+ int num_gdi_handles = ::GetGuiResources(process.Get(), GR_GDIOBJECTS);
+ int num_user_handles = ::GetGuiResources(process.Get(), GR_USEROBJECTS);
+
+ // Compute sum and peak counts.
+ ++child_count;
+ sum_user_count += num_user_handles;
+ sum_gdi_count += num_gdi_handles;
+ if (peak_gdi_count < num_gdi_handles)
+ peak_gdi_count = num_gdi_handles;
+
+ } while(Process32Next(snapshot, &proc_entry));
+
+ ::CloseHandle(snapshot) ;
+ CHECK(false);
+}
+
+} // namespace
+
+namespace base {
+namespace debug {
+
+void GDIBitmapAllocFailure(BITMAPINFOHEADER* header, HANDLE shared_section) {
+ // Make sure parameters are saved in the minidump.
+ DWORD last_error = ::GetLastError();
+
+ LONG width = header->biWidth;
+ LONG heigth = header->biHeight;
+
+ base::debug::Alias(&last_error);
+ base::debug::Alias(&width);
+ base::debug::Alias(&heigth);
+ base::debug::Alias(&shared_section);
+
+ int num_user_handles = GetGuiResources(GetCurrentProcess(),
+ GR_USEROBJECTS);
+
+ int num_gdi_handles = GetGuiResources(GetCurrentProcess(),
+ GR_GDIOBJECTS);
+ if (num_gdi_handles == 0) {
+ DWORD get_gui_resources_error = GetLastError();
+ base::debug::Alias(&get_gui_resources_error);
+ CHECK(false);
+ }
+
+ base::debug::Alias(&num_gdi_handles);
+ base::debug::Alias(&num_user_handles);
+
+ const DWORD kLotsOfHandles = 9990;
+ if (num_gdi_handles > kLotsOfHandles)
+ CHECK(false);
+
+ PROCESS_MEMORY_COUNTERS_EX pmc;
+ pmc.cb = sizeof(pmc);
+ if (!GetProcessMemoryInfo(GetCurrentProcess(),
+ reinterpret_cast<PROCESS_MEMORY_COUNTERS*>(&pmc),
+ sizeof(pmc))) {
+ CHECK(false);
+ }
+ const size_t kLotsOfMemory = 1500 * 1024 * 1024; // 1.5GB
+ if (pmc.PagefileUsage > kLotsOfMemory)
+ CHECK(false);
+ if (pmc.PrivateUsage > kLotsOfMemory)
+ CHECK(false);
+
+ void* small_data = NULL;
+ base::debug::Alias(&small_data);
+
+ if (std::abs(heigth) * width > 100) {
+ // Huh, that's weird. We don't have crazy handle count, we don't have
+ // ridiculous memory usage. Try to allocate a small bitmap and see if that
+ // fails too.
+ header->biWidth = 5;
+ header->biHeight = -5;
+ HBITMAP small_bitmap = CreateDIBSection(
+ NULL, reinterpret_cast<BITMAPINFO*>(&header),
+ 0, &small_data, shared_section, 0);
+ }
+ // Maybe the child processes are the ones leaking GDI or USER resouces.
+ CollectChildGDIUsageAndDie(::GetCurrentProcessId());
+}
+
+} // namespace debug
+} // namespace base
diff --git a/chromium/base/debug/gdi_debug_util_win.h b/chromium/base/debug/gdi_debug_util_win.h
new file mode 100644
index 00000000000..5887ecb8464
--- /dev/null
+++ b/chromium/base/debug/gdi_debug_util_win.h
@@ -0,0 +1,23 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_DEBUG_GDI_DEBUG_UTIL_WIN_H_
+#define BASE_DEBUG_GDI_DEBUG_UTIL_WIN_H_
+
+#include <windows.h>
+
+#include "base/base_export.h"
+
+namespace base {
+namespace debug {
+
+// Crashes the process leaving valuable information on the dump via
+// debug::alias so we can find what is causing the allocation failures.
+void BASE_EXPORT GDIBitmapAllocFailure(BITMAPINFOHEADER* header,
+ HANDLE shared_section);
+
+} // namespace debug
+} // namespace base
+
+#endif // BASE_DEBUG_GDI_DEBUG_UTIL_WIN_H_
diff --git a/chromium/base/debug/leak_tracker.h b/chromium/base/debug/leak_tracker.h
index e5f0cb1778b..8c5aaf31c2f 100644
--- a/chromium/base/debug/leak_tracker.h
+++ b/chromium/base/debug/leak_tracker.h
@@ -5,8 +5,10 @@
#ifndef BASE_DEBUG_LEAK_TRACKER_H_
#define BASE_DEBUG_LEAK_TRACKER_H_
-// Only enable leak tracking in debug builds.
-#ifndef NDEBUG
+#include "build/build_config.h"
+
+// Only enable leak tracking in non-uClibc debug builds.
+#if !defined(NDEBUG) && !defined(__UCLIBC__)
#define ENABLE_LEAK_TRACKER
#endif
diff --git a/chromium/base/debug/proc_maps_linux.cc b/chromium/base/debug/proc_maps_linux.cc
index b7a5862f747..1e0209e9bf7 100644
--- a/chromium/base/debug/proc_maps_linux.cc
+++ b/chromium/base/debug/proc_maps_linux.cc
@@ -6,16 +6,18 @@
#include <fcntl.h>
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_ANDROID)
#include <inttypes.h>
#endif
#include "base/file_util.h"
+#include "base/files/scoped_file.h"
#include "base/strings/string_split.h"
-#if defined(OS_ANDROID)
-// Bionic's inttypes.h defines PRI/SCNxPTR as an unsigned long int, which
-// is incompatible with Bionic's stdint.h defining uintptr_t as a unsigned int:
+#if defined(OS_ANDROID) && !defined(__LP64__)
+// In 32-bit mode, Bionic's inttypes.h defines PRI/SCNxPTR as an
+// unsigned long int, which is incompatible with Bionic's stdint.h
+// defining uintptr_t as an unsigned int:
// https://code.google.com/p/android/issues/detail?id=57218
#undef SCNxPTR
#define SCNxPTR "x"
@@ -45,12 +47,11 @@ bool ReadProcMaps(std::string* proc_maps) {
// file for details.
const long kReadSize = sysconf(_SC_PAGESIZE);
- int fd = HANDLE_EINTR(open("/proc/self/maps", O_RDONLY));
- if (fd == -1) {
+ base::ScopedFD fd(HANDLE_EINTR(open("/proc/self/maps", O_RDONLY)));
+ if (!fd.is_valid()) {
DPLOG(ERROR) << "Couldn't open /proc/self/maps";
return false;
}
- file_util::ScopedFD fd_closer(&fd);
proc_maps->clear();
while (true) {
@@ -60,7 +61,7 @@ bool ReadProcMaps(std::string* proc_maps) {
proc_maps->resize(pos + kReadSize);
void* buffer = &(*proc_maps)[pos];
- ssize_t bytes_read = HANDLE_EINTR(read(fd, buffer, kReadSize));
+ ssize_t bytes_read = HANDLE_EINTR(read(fd.get(), buffer, kReadSize));
if (bytes_read < 0) {
DPLOG(ERROR) << "Couldn't read /proc/self/maps";
proc_maps->clear();
@@ -90,6 +91,7 @@ bool ReadProcMaps(std::string* proc_maps) {
bool ParseProcMaps(const std::string& input,
std::vector<MappedMemoryRegion>* regions_out) {
+ CHECK(regions_out);
std::vector<MappedMemoryRegion> regions;
// This isn't async safe nor terribly efficient, but it doesn't need to be at
@@ -100,8 +102,10 @@ bool ParseProcMaps(const std::string& input,
for (size_t i = 0; i < lines.size(); ++i) {
// Due to splitting on '\n' the last line should be empty.
if (i == lines.size() - 1) {
- if (!lines[i].empty())
+ if (!lines[i].empty()) {
+ DLOG(WARNING) << "Last line not empty";
return false;
+ }
break;
}
@@ -124,6 +128,7 @@ bool ParseProcMaps(const std::string& input,
if (sscanf(line, "%" SCNxPTR "-%" SCNxPTR " %4c %llx %hhx:%hhx %ld %n",
&region.start, &region.end, permissions, &region.offset,
&dev_major, &dev_minor, &inode, &path_index) < 7) {
+ DPLOG(WARNING) << "sscanf failed for line: " << line;
return false;
}
diff --git a/chromium/base/debug/proc_maps_linux_unittest.cc b/chromium/base/debug/proc_maps_linux_unittest.cc
index 7c2929f212a..fc8ced6aa05 100644
--- a/chromium/base/debug/proc_maps_linux_unittest.cc
+++ b/chromium/base/debug/proc_maps_linux_unittest.cc
@@ -277,5 +277,37 @@ TEST(ProcMapsTest, InvalidInput) {
}
}
+TEST(ProcMapsTest, ParseProcMapsEmptyString) {
+ std::vector<MappedMemoryRegion> regions;
+ EXPECT_TRUE(ParseProcMaps("", &regions));
+ EXPECT_EQ(0ULL, regions.size());
+}
+
+// Testing a couple of remotely possible weird things in the input:
+// - Line ending with \r\n or \n\r.
+// - File name contains quotes.
+// - File name has whitespaces.
+TEST(ProcMapsTest, ParseProcMapsWeirdCorrectInput) {
+ std::vector<MappedMemoryRegion> regions;
+ const std::string kContents =
+ "00400000-0040b000 r-xp 00000000 fc:00 2106562 "
+ " /bin/cat\r\n"
+ "7f53b7dad000-7f53b7f62000 r-xp 00000000 fc:00 263011 "
+ " /lib/x86_64-linux-gnu/libc-2.15.so\n\r"
+ "7f53b816d000-7f53b818f000 r-xp 00000000 fc:00 264284 "
+ " /lib/x86_64-linux-gnu/ld-2.15.so\n"
+ "7fff9c7ff000-7fff9c800000 r-xp 00000000 00:00 0 "
+ " \"vd so\"\n"
+ "ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 "
+ " [vsys call]\n";
+ EXPECT_TRUE(ParseProcMaps(kContents, &regions));
+ EXPECT_EQ(5ULL, regions.size());
+ EXPECT_EQ("/bin/cat", regions[0].path);
+ EXPECT_EQ("/lib/x86_64-linux-gnu/libc-2.15.so", regions[1].path);
+ EXPECT_EQ("/lib/x86_64-linux-gnu/ld-2.15.so", regions[2].path);
+ EXPECT_EQ("\"vd so\"", regions[3].path);
+ EXPECT_EQ("[vsys call]", regions[4].path);
+}
+
} // namespace debug
} // namespace base
diff --git a/chromium/base/debug/sanitizer_options.cc b/chromium/base/debug/sanitizer_options.cc
new file mode 100644
index 00000000000..7b26876ea85
--- /dev/null
+++ b/chromium/base/debug/sanitizer_options.cc
@@ -0,0 +1,117 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// This file contains the default options for various compiler-based dynamic
+// tools.
+
+#include "build/build_config.h"
+
+// Functions returning default options are declared weak in the tools' runtime
+// libraries. To make the linker pick the strong replacements for those
+// functions from this module, we explicitly force its inclusion by passing
+// -Wl,-u_sanitizer_options_link_helper
+extern "C"
+void _sanitizer_options_link_helper() { }
+
+#if defined(ADDRESS_SANITIZER)
+// Default options for AddressSanitizer in various configurations:
+// strict_memcmp=1 - disable the strict memcmp() checking
+// (http://crbug.com/178677 and http://crbug.com/178404).
+// malloc_context_size=5 - limit the size of stack traces collected by ASan
+// for each malloc/free by 5 frames. These stack traces tend to accumulate
+// very fast in applications using JIT (v8 in Chrome's case), see
+// https://code.google.com/p/address-sanitizer/issues/detail?id=177
+// symbolize=false - disable the in-process symbolization, which isn't 100%
+// compatible with the existing sandboxes and doesn't make much sense for
+// stripped official binaries.
+// legacy_pthread_cond=1 - run in the libpthread 2.2.5 compatibility mode to
+// work around libGL.so using the obsolete API, see
+// http://crbug.com/341805. This may break if pthread_cond_t objects are
+// accessed by both instrumented and non-instrumented binaries (e.g. if
+// they reside in shared memory). This option is going to be deprecated in
+// upstream AddressSanitizer and must not be used anywhere except the
+// official builds.
+// replace_intrin=0 - do not intercept memcpy(), memmove() and memset() to
+// work around http://crbug.com/162461 (ASan report in OpenCL on Mac).
+// check_printf=1 - check the memory accesses to printf (and other formatted
+// output routines) arguments.
+// use_sigaltstack=1 - handle signals on an alternate signal stack. Useful
+// for stack overflow detection.
+// strip_path_prefix=Release/../../ - prefixes up to and including this
+// substring will be stripped from source file paths in symbolized reports
+// (if symbolize=true, which is set when running with LeakSanitizer).
+#if defined(OS_LINUX)
+#if defined(GOOGLE_CHROME_BUILD)
+// Default AddressSanitizer options for the official build. These do not affect
+// tests on buildbots (which don't set GOOGLE_CHROME_BUILD) or non-official
+// Chromium builds.
+const char kAsanDefaultOptions[] =
+ "legacy_pthread_cond=1 malloc_context_size=5 strict_memcmp=0 "
+ "symbolize=false check_printf=1 use_sigaltstack=1 detect_leaks=0 "
+ "strip_path_prefix=Release/../../ ";
+#else
+// Default AddressSanitizer options for buildbots and non-official builds.
+const char *kAsanDefaultOptions =
+ "strict_memcmp=0 symbolize=false check_printf=1 use_sigaltstack=1 "
+ "detect_leaks=0 strip_path_prefix=Release/../../ ";
+#endif // GOOGLE_CHROME_BUILD
+
+#elif defined(OS_MACOSX)
+const char *kAsanDefaultOptions =
+ "strict_memcmp=0 replace_intrin=0 check_printf=1 use_sigaltstack=1 "
+ "strip_path_prefix=Release/../../ ";
+#endif // OS_LINUX
+
+#if defined(OS_LINUX) || defined(OS_MACOSX)
+extern "C"
+__attribute__((no_sanitize_address))
+__attribute__((visibility("default")))
+// The function isn't referenced from the executable itself. Make sure it isn't
+// stripped by the linker.
+__attribute__((used))
+const char *__asan_default_options() {
+ return kAsanDefaultOptions;
+}
+#endif // OS_LINUX || OS_MACOSX
+#endif // ADDRESS_SANITIZER
+
+#if defined(THREAD_SANITIZER) && defined(OS_LINUX)
+// Default options for ThreadSanitizer in various configurations:
+// detect_deadlocks=1 - enable deadlock (lock inversion) detection.
+// second_deadlock_stack=1 - more verbose deadlock reports.
+// report_signal_unsafe=0 - do not report async-signal-unsafe functions
+// called from signal handlers.
+// report_thread_leaks=0 - do not report unjoined threads at the end of
+// the program execution.
+// print_suppressions=1 - print the list of matched suppressions.
+// strip_path_prefix=Release/../../ - prefixes up to and including this
+// substring will be stripped from source file paths in symbolized reports.
+const char kTsanDefaultOptions[] =
+ "detect_deadlocks=1 second_deadlock_stack=1 report_signal_unsafe=0 "
+ "report_thread_leaks=0 print_suppressions=1 "
+ "strip_path_prefix=Release/../../ ";
+
+extern "C"
+__attribute__((no_sanitize_thread))
+__attribute__((visibility("default")))
+// The function isn't referenced from the executable itself. Make sure it isn't
+// stripped by the linker.
+__attribute__((used))
+const char *__tsan_default_options() {
+ return kTsanDefaultOptions;
+}
+
+extern "C" char kTSanDefaultSuppressions[];
+
+extern "C"
+__attribute__((no_sanitize_thread))
+__attribute__((visibility("default")))
+// The function isn't referenced from the executable itself. Make sure it isn't
+// stripped by the linker.
+__attribute__((used))
+const char *__tsan_default_suppressions() {
+ return kTSanDefaultSuppressions;
+}
+
+#endif // THREAD_SANITIZER && OS_LINUX
diff --git a/chromium/base/debug/stack_trace.cc b/chromium/base/debug/stack_trace.cc
index 6fab1835034..ce9e9ad5500 100644
--- a/chromium/base/debug/stack_trace.cc
+++ b/chromium/base/debug/stack_trace.cc
@@ -33,7 +33,9 @@ const void *const *StackTrace::Addresses(size_t* count) const {
std::string StackTrace::ToString() const {
std::stringstream stream;
+#if !defined(__UCLIBC__)
OutputToStream(&stream);
+#endif
return stream.str();
}
diff --git a/chromium/base/debug/stack_trace.h b/chromium/base/debug/stack_trace.h
index b0883c1fc92..7c2ac3cb87c 100644
--- a/chromium/base/debug/stack_trace.h
+++ b/chromium/base/debug/stack_trace.h
@@ -27,6 +27,15 @@ namespace debug {
// unit_tests only! This is not thread-safe: only call from main thread.
BASE_EXPORT bool EnableInProcessStackDumping();
+// A different version of EnableInProcessStackDumping that also works for
+// sandboxed processes. For more details take a look at the description
+// of EnableInProcessStackDumping.
+// Calling this function on Linux opens /proc/self/maps and caches its
+// contents. In DEBUG builds, this function also opens the object files that
+// are loaded in memory and caches their file descriptors (this cannot be
+// done in official builds because it has security implications).
+BASE_EXPORT bool EnableInProcessStackDumpingForSandbox();
+
// A stacktrace can be helpful in debugging. For example, you can include a
// stacktrace member in a object (probably around #ifndef NDEBUG) so that you
// can later see where the given object was created from.
@@ -44,7 +53,7 @@ class BASE_EXPORT StackTrace {
// Creates a stacktrace for an exception.
// Note: this function will throw an import not found (StackWalk64) exception
// on system without dbghelp 5.1.
- StackTrace(_EXCEPTION_POINTERS* exception_pointers);
+ StackTrace(const _EXCEPTION_POINTERS* exception_pointers);
#endif
// Copying and assignment are allowed with the default functions.
@@ -55,11 +64,13 @@ class BASE_EXPORT StackTrace {
// number of elements in the returned array.
const void* const* Addresses(size_t* count) const;
+#if !defined(__UCLIBC__)
// Prints the stack trace to stderr.
void Print() const;
// Resolves backtrace to symbols and write to stream.
void OutputToStream(std::ostream* os) const;
+#endif
// Resolves backtrace to symbols and returns as string.
std::string ToString() const;
diff --git a/chromium/base/debug/stack_trace_android.cc b/chromium/base/debug/stack_trace_android.cc
index 257e82309e7..c07f34a9957 100644
--- a/chromium/base/debug/stack_trace_android.cc
+++ b/chromium/base/debug/stack_trace_android.cc
@@ -11,6 +11,12 @@
#include "base/strings/stringprintf.h"
#include "base/threading/thread_restrictions.h"
+#ifdef __LP64__
+#define FMT_ADDR "0x%016lx"
+#else
+#define FMT_ADDR "0x%08x"
+#endif
+
namespace {
struct StackCrawlState {
@@ -104,12 +110,12 @@ void StackTrace::OutputToStream(std::ostream* os) const {
++iter;
}
- *os << base::StringPrintf("#%02d 0x%08x ", i, address);
+ *os << base::StringPrintf("#%02zd " FMT_ADDR " ", i, address);
if (iter != regions.end()) {
uintptr_t rel_pc = address - iter->start + iter->offset;
const char* path = iter->path.c_str();
- *os << base::StringPrintf("%s+0x%08x", path, rel_pc);
+ *os << base::StringPrintf("%s+" FMT_ADDR, path, rel_pc);
} else {
*os << "<unknown>";
}
diff --git a/chromium/base/debug/stack_trace_ios.mm b/chromium/base/debug/stack_trace_ios.mm
deleted file mode 100644
index 998dd0dfc69..00000000000
--- a/chromium/base/debug/stack_trace_ios.mm
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import <Foundation/Foundation.h>
-#include <mach/task.h>
-#include <stdio.h>
-
-#include "base/logging.h"
-
-// This is just enough of a shim to let the support needed by test_support
-// link.
-
-namespace base {
-namespace debug {
-
-namespace {
-
-void StackDumpSignalHandler(int signal) {
- // TODO(phajdan.jr): Fix async-signal unsafety.
- LOG(ERROR) << "Received signal " << signal;
- NSArray *stack_symbols = [NSThread callStackSymbols];
- for (NSString* stack_symbol in stack_symbols) {
- fprintf(stderr, "\t%s\n", [stack_symbol UTF8String]);
- }
- _exit(1);
-}
-
-} // namespace
-
-// TODO(phajdan.jr): Deduplicate, see copy in stack_trace_posix.cc.
-bool EnableInProcessStackDumping() {
- // When running in an application, our code typically expects SIGPIPE
- // to be ignored. Therefore, when testing that same code, it should run
- // with SIGPIPE ignored as well.
- struct sigaction action;
- action.sa_handler = SIG_IGN;
- action.sa_flags = 0;
- sigemptyset(&action.sa_mask);
- bool success = (sigaction(SIGPIPE, &action, NULL) == 0);
-
- success &= (signal(SIGILL, &StackDumpSignalHandler) != SIG_ERR);
- success &= (signal(SIGABRT, &StackDumpSignalHandler) != SIG_ERR);
- success &= (signal(SIGFPE, &StackDumpSignalHandler) != SIG_ERR);
- success &= (signal(SIGBUS, &StackDumpSignalHandler) != SIG_ERR);
- success &= (signal(SIGSEGV, &StackDumpSignalHandler) != SIG_ERR);
- success &= (signal(SIGSYS, &StackDumpSignalHandler) != SIG_ERR);
-
- return success;
-}
-
-} // namespace debug
-} // namespace base
diff --git a/chromium/base/debug/stack_trace_posix.cc b/chromium/base/debug/stack_trace_posix.cc
index ed1a91889b1..261ce9587d3 100644
--- a/chromium/base/debug/stack_trace_posix.cc
+++ b/chromium/base/debug/stack_trace_posix.cc
@@ -5,7 +5,6 @@
#include "base/debug/stack_trace.h"
#include <errno.h>
-#include <execinfo.h>
#include <fcntl.h>
#include <signal.h>
#include <stdio.h>
@@ -15,11 +14,17 @@
#include <sys/types.h>
#include <unistd.h>
+#include <map>
#include <ostream>
+#include <string>
+#include <vector>
#if defined(__GLIBCXX__)
#include <cxxabi.h>
#endif
+#if !defined(__UCLIBC__)
+#include <execinfo.h>
+#endif
#if defined(OS_MACOSX)
#include <AvailabilityMacros.h>
@@ -27,10 +32,14 @@
#include "base/basictypes.h"
#include "base/debug/debugger.h"
+#include "base/debug/proc_maps_linux.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/singleton.h"
+#include "base/numerics/safe_conversions.h"
#include "base/posix/eintr_wrapper.h"
#include "base/strings/string_number_conversions.h"
+#include "build/build_config.h"
#if defined(USE_SYMBOLIZE)
#include "base/third_party/symbolize/symbolize.h"
@@ -64,7 +73,7 @@ void DemangleSymbols(std::string* text) {
// Note: code in this function is NOT async-signal safe (std::string uses
// malloc internally).
-#if defined(__GLIBCXX__)
+#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
std::string::size_type search_from = 0;
while (search_from < text->size()) {
@@ -86,7 +95,7 @@ void DemangleSymbols(std::string* text) {
// Try to demangle the mangled symbol candidate.
int status = 0;
- scoped_ptr_malloc<char> demangled_symbol(
+ scoped_ptr<char, base::FreeDeleter> demangled_symbol(
abi::__cxa_demangle(mangled_symbol.c_str(), NULL, 0, &status));
if (status == 0) { // Demangling is successful.
// Remove the mangled symbol.
@@ -101,7 +110,7 @@ void DemangleSymbols(std::string* text) {
}
}
-#endif // defined(__GLIBCXX__)
+#endif // defined(__GLIBCXX__) && !defined(__UCLIBC__)
}
#endif // !defined(USE_SYMBOLIZE)
@@ -114,22 +123,37 @@ class BacktraceOutputHandler {
};
void OutputPointer(void* pointer, BacktraceOutputHandler* handler) {
- char buf[1024] = { '\0' };
- handler->HandleOutput(" [0x");
+ // This should be more than enough to store a 64-bit number in hex:
+ // 16 hex digits + 1 for null-terminator.
+ char buf[17] = { '\0' };
+ handler->HandleOutput("0x");
internal::itoa_r(reinterpret_cast<intptr_t>(pointer),
buf, sizeof(buf), 16, 12);
handler->HandleOutput(buf);
- handler->HandleOutput("]");
}
+#if defined(USE_SYMBOLIZE)
+void OutputFrameId(intptr_t frame_id, BacktraceOutputHandler* handler) {
+ // Max unsigned 64-bit number in decimal has 20 digits (18446744073709551615).
+ // Hence, 30 digits should be more than enough to represent it in decimal
+ // (including the null-terminator).
+ char buf[30] = { '\0' };
+ handler->HandleOutput("#");
+ internal::itoa_r(frame_id, buf, sizeof(buf), 10, 1);
+ handler->HandleOutput(buf);
+}
+#endif // defined(USE_SYMBOLIZE)
+
void ProcessBacktrace(void *const *trace,
- int size,
+ size_t size,
BacktraceOutputHandler* handler) {
// NOTE: This code MUST be async-signal safe (it's used by in-process
// stack dumping signal handler). NO malloc or stdio is allowed here.
#if defined(USE_SYMBOLIZE)
- for (int i = 0; i < size; ++i) {
+ for (size_t i = 0; i < size; ++i) {
+ OutputFrameId(i, handler);
+ handler->HandleOutput(" ");
OutputPointer(trace[i], handler);
handler->HandleOutput(" ");
@@ -145,15 +169,16 @@ void ProcessBacktrace(void *const *trace,
handler->HandleOutput("\n");
}
-#else
+#elif !defined(__UCLIBC__)
bool printed = false;
// Below part is async-signal unsafe (uses malloc), so execute it only
// when we are not executing the signal handler.
if (in_signal_handler == 0) {
- scoped_ptr_malloc<char*> trace_symbols(backtrace_symbols(trace, size));
+ scoped_ptr<char*, FreeDeleter>
+ trace_symbols(backtrace_symbols(trace, size));
if (trace_symbols.get()) {
- for (int i = 0; i < size; ++i) {
+ for (size_t i = 0; i < size; ++i) {
std::string trace_symbol = trace_symbols.get()[i];
DemangleSymbols(&trace_symbol);
handler->HandleOutput(trace_symbol.c_str());
@@ -165,9 +190,10 @@ void ProcessBacktrace(void *const *trace,
}
if (!printed) {
- for (int i = 0; i < size; ++i) {
+ for (size_t i = 0; i < size; ++i) {
+ handler->HandleOutput(" [");
OutputPointer(trace[i], handler);
- handler->HandleOutput("\n");
+ handler->HandleOutput("]\n");
}
}
#endif // defined(USE_SYMBOLIZE)
@@ -179,7 +205,6 @@ void PrintToStderr(const char* output) {
ignore_result(HANDLE_EINTR(write(STDERR_FILENO, output, strlen(output))));
}
-#if !defined(OS_IOS)
void StackDumpSignalHandler(int signal, siginfo_t* info, void* void_context) {
// NOTE: This code MUST be async-signal safe.
// NO malloc or stdio is allowed here.
@@ -256,7 +281,9 @@ void StackDumpSignalHandler(int signal, siginfo_t* info, void* void_context) {
}
PrintToStderr("\n");
+#if !defined(__UCLIBC__)
debug::StackTrace().Print();
+#endif
#if defined(OS_LINUX)
#if ARCH_CPU_X86_FAMILY
@@ -330,7 +357,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* info, void* void_context) {
PrintToStderr("\n");
#endif
#elif defined(OS_MACOSX)
- // TODO(shess): Port to 64-bit.
+ // TODO(shess): Port to 64-bit, and ARM architecture (32 and 64-bit).
#if ARCH_CPU_X86_FAMILY && ARCH_CPU_32_BITS
ucontext_t* context = reinterpret_cast<ucontext_t*>(void_context);
size_t len;
@@ -372,7 +399,6 @@ void StackDumpSignalHandler(int signal, siginfo_t* info, void* void_context) {
#endif // defined(OS_MACOSX)
_exit(1);
}
-#endif // !defined(OS_IOS)
class PrintBacktraceOutputHandler : public BacktraceOutputHandler {
public:
@@ -403,7 +429,6 @@ class StreamBacktraceOutputHandler : public BacktraceOutputHandler {
DISALLOW_COPY_AND_ASSIGN(StreamBacktraceOutputHandler);
};
-#if !defined(OS_IOS)
void WarmUpBacktrace() {
// Warm up stack trace infrastructure. It turns out that on the first
// call glibc initializes some internal data structures using pthread_once,
@@ -436,11 +461,251 @@ void WarmUpBacktrace() {
// #22 <signal handler called>
StackTrace stack_trace;
}
-#endif // !defined(OS_IOS)
} // namespace
-#if !defined(OS_IOS)
+#if defined(USE_SYMBOLIZE)
+
+// class SandboxSymbolizeHelper.
+//
+// The purpose of this class is to prepare and install a "file open" callback
+// needed by the stack trace symbolization code
+// (base/third_party/symbolize/symbolize.h) so that it can function properly
+// in a sandboxed process. The caveat is that this class must be instantiated
+// before the sandboxing is enabled so that it can get the chance to open all
+// the object files that are loaded in the virtual address space of the current
+// process.
+class SandboxSymbolizeHelper {
+ public:
+ // Returns the singleton instance.
+ static SandboxSymbolizeHelper* GetInstance() {
+ return Singleton<SandboxSymbolizeHelper>::get();
+ }
+
+ private:
+ friend struct DefaultSingletonTraits<SandboxSymbolizeHelper>;
+
+ SandboxSymbolizeHelper()
+ : is_initialized_(false) {
+ Init();
+ }
+
+ ~SandboxSymbolizeHelper() {
+ UnregisterCallback();
+ CloseObjectFiles();
+ }
+
+ // Returns a O_RDONLY file descriptor for |file_path| if it was opened
+ // sucessfully during the initialization. The file is repositioned at
+ // offset 0.
+ // IMPORTANT: This function must be async-signal-safe because it can be
+ // called from a signal handler (symbolizing stack frames for a crash).
+ int GetFileDescriptor(const char* file_path) {
+ int fd = -1;
+
+#if !defined(NDEBUG)
+ if (file_path) {
+ // The assumption here is that iterating over std::map<std::string, int>
+ // using a const_iterator does not allocate dynamic memory, hense it is
+ // async-signal-safe.
+ std::map<std::string, int>::const_iterator it;
+ for (it = modules_.begin(); it != modules_.end(); ++it) {
+ if (strcmp((it->first).c_str(), file_path) == 0) {
+ // POSIX.1-2004 requires an implementation to guarantee that dup()
+ // is async-signal-safe.
+ fd = dup(it->second);
+ break;
+ }
+ }
+ // POSIX.1-2004 requires an implementation to guarantee that lseek()
+ // is async-signal-safe.
+ if (fd >= 0 && lseek(fd, 0, SEEK_SET) < 0) {
+ // Failed to seek.
+ fd = -1;
+ }
+ }
+#endif // !defined(NDEBUG)
+
+ return fd;
+ }
+
+ // Searches for the object file (from /proc/self/maps) that contains
+ // the specified pc. If found, sets |start_address| to the start address
+ // of where this object file is mapped in memory, sets the module base
+ // address into |base_address|, copies the object file name into
+ // |out_file_name|, and attempts to open the object file. If the object
+ // file is opened successfully, returns the file descriptor. Otherwise,
+ // returns -1. |out_file_name_size| is the size of the file name buffer
+ // (including the null terminator).
+ // IMPORTANT: This function must be async-signal-safe because it can be
+ // called from a signal handler (symbolizing stack frames for a crash).
+ static int OpenObjectFileContainingPc(uint64_t pc, uint64_t& start_address,
+ uint64_t& base_address, char* file_path,
+ int file_path_size) {
+ // This method can only be called after the singleton is instantiated.
+ // This is ensured by the following facts:
+ // * This is the only static method in this class, it is private, and
+ // the class has no friends (except for the DefaultSingletonTraits).
+ // The compiler guarantees that it can only be called after the
+ // singleton is instantiated.
+ // * This method is used as a callback for the stack tracing code and
+ // the callback registration is done in the constructor, so logically
+ // it cannot be called before the singleton is created.
+ SandboxSymbolizeHelper* instance = GetInstance();
+
+ // The assumption here is that iterating over
+ // std::vector<MappedMemoryRegion> using a const_iterator does not allocate
+ // dynamic memory, hence it is async-signal-safe.
+ std::vector<MappedMemoryRegion>::const_iterator it;
+ bool is_first = true;
+ for (it = instance->regions_.begin(); it != instance->regions_.end();
+ ++it, is_first = false) {
+ const MappedMemoryRegion& region = *it;
+ if (region.start <= pc && pc < region.end) {
+ start_address = region.start;
+ // Don't subtract 'start_address' from the first entry:
+ // * If a binary is compiled w/o -pie, then the first entry in
+ // process maps is likely the binary itself (all dynamic libs
+ // are mapped higher in address space). For such a binary,
+ // instruction offset in binary coincides with the actual
+ // instruction address in virtual memory (as code section
+ // is mapped to a fixed memory range).
+ // * If a binary is compiled with -pie, all the modules are
+ // mapped high at address space (in particular, higher than
+ // shadow memory of the tool), so the module can't be the
+ // first entry.
+ base_address = (is_first ? 0U : start_address) - region.offset;
+ if (file_path && file_path_size > 0) {
+ strncpy(file_path, region.path.c_str(), file_path_size);
+ // Ensure null termination.
+ file_path[file_path_size - 1] = '\0';
+ }
+ return instance->GetFileDescriptor(region.path.c_str());
+ }
+ }
+ return -1;
+ }
+
+ // Parses /proc/self/maps in order to compile a list of all object file names
+ // for the modules that are loaded in the current process.
+ // Returns true on success.
+ bool CacheMemoryRegions() {
+ // Reads /proc/self/maps.
+ std::string contents;
+ if (!ReadProcMaps(&contents)) {
+ LOG(ERROR) << "Failed to read /proc/self/maps";
+ return false;
+ }
+
+ // Parses /proc/self/maps.
+ if (!ParseProcMaps(contents, &regions_)) {
+ LOG(ERROR) << "Failed to parse the contents of /proc/self/maps";
+ return false;
+ }
+
+ is_initialized_ = true;
+ return true;
+ }
+
+ // Opens all object files and caches their file descriptors.
+ void OpenSymbolFiles() {
+ // Pre-opening and caching the file descriptors of all loaded modules is
+ // not considered safe for retail builds. Hence it is only done in debug
+ // builds. For more details, take a look at: http://crbug.com/341966
+ // Enabling this to release mode would require approval from the security
+ // team.
+#if !defined(NDEBUG)
+ // Open the object files for all read-only executable regions and cache
+ // their file descriptors.
+ std::vector<MappedMemoryRegion>::const_iterator it;
+ for (it = regions_.begin(); it != regions_.end(); ++it) {
+ const MappedMemoryRegion& region = *it;
+ // Only interesed in read-only executable regions.
+ if ((region.permissions & MappedMemoryRegion::READ) ==
+ MappedMemoryRegion::READ &&
+ (region.permissions & MappedMemoryRegion::WRITE) == 0 &&
+ (region.permissions & MappedMemoryRegion::EXECUTE) ==
+ MappedMemoryRegion::EXECUTE) {
+ if (region.path.empty()) {
+ // Skip regions with empty file names.
+ continue;
+ }
+ if (region.path[0] == '[') {
+ // Skip pseudo-paths, like [stack], [vdso], [heap], etc ...
+ continue;
+ }
+ // Avoid duplicates.
+ if (modules_.find(region.path) == modules_.end()) {
+ int fd = open(region.path.c_str(), O_RDONLY | O_CLOEXEC);
+ if (fd >= 0) {
+ modules_.insert(std::make_pair(region.path, fd));
+ } else {
+ LOG(WARNING) << "Failed to open file: " << region.path
+ << "\n Error: " << strerror(errno);
+ }
+ }
+ }
+ }
+#endif // !defined(NDEBUG)
+ }
+
+ // Initializes and installs the symbolization callback.
+ void Init() {
+ if (CacheMemoryRegions()) {
+ OpenSymbolFiles();
+ google::InstallSymbolizeOpenObjectFileCallback(
+ &OpenObjectFileContainingPc);
+ }
+ }
+
+ // Unregister symbolization callback.
+ void UnregisterCallback() {
+ if (is_initialized_) {
+ google::InstallSymbolizeOpenObjectFileCallback(NULL);
+ is_initialized_ = false;
+ }
+ }
+
+ // Closes all file descriptors owned by this instance.
+ void CloseObjectFiles() {
+#if !defined(NDEBUG)
+ std::map<std::string, int>::iterator it;
+ for (it = modules_.begin(); it != modules_.end(); ++it) {
+ int ret = IGNORE_EINTR(close(it->second));
+ DCHECK(!ret);
+ it->second = -1;
+ }
+ modules_.clear();
+#endif // !defined(NDEBUG)
+ }
+
+ // Set to true upon successful initialization.
+ bool is_initialized_;
+
+#if !defined(NDEBUG)
+ // Mapping from file name to file descriptor. Includes file descriptors
+ // for all successfully opened object files and the file descriptor for
+ // /proc/self/maps. This code is not safe for release builds so
+ // this is only done for DEBUG builds.
+ std::map<std::string, int> modules_;
+#endif // !defined(NDEBUG)
+
+ // Cache for the process memory regions. Produced by parsing the contents
+ // of /proc/self/maps cache.
+ std::vector<MappedMemoryRegion> regions_;
+
+ DISALLOW_COPY_AND_ASSIGN(SandboxSymbolizeHelper);
+};
+#endif // USE_SYMBOLIZE
+
+bool EnableInProcessStackDumpingForSandbox() {
+#if defined(USE_SYMBOLIZE)
+ SandboxSymbolizeHelper::GetInstance();
+#endif // USE_SYMBOLIZE
+
+ return EnableInProcessStackDumping();
+}
+
bool EnableInProcessStackDumping() {
// When running in an application, our code typically expects SIGPIPE
// to be ignored. Therefore, when testing that same code, it should run
@@ -465,21 +730,28 @@ bool EnableInProcessStackDumping() {
success &= (sigaction(SIGFPE, &action, NULL) == 0);
success &= (sigaction(SIGBUS, &action, NULL) == 0);
success &= (sigaction(SIGSEGV, &action, NULL) == 0);
+// On Linux, SIGSYS is reserved by the kernel for seccomp-bpf sandboxing.
+#if !defined(OS_LINUX)
success &= (sigaction(SIGSYS, &action, NULL) == 0);
+#endif // !defined(OS_LINUX)
return success;
}
-#endif // !defined(OS_IOS)
StackTrace::StackTrace() {
// NOTE: This code MUST be async-signal safe (it's used by in-process
// stack dumping signal handler). NO malloc or stdio is allowed here.
+#if !defined(__UCLIBC__)
// Though the backtrace API man page does not list any possible negative
// return values, we take no chance.
- count_ = std::max(backtrace(trace_, arraysize(trace_)), 0);
+ count_ = base::saturated_cast<size_t>(backtrace(trace_, arraysize(trace_)));
+#else
+ count_ = 0;
+#endif
}
+#if !defined(__UCLIBC__)
void StackTrace::Print() const {
// NOTE: This code MUST be async-signal safe (it's used by in-process
// stack dumping signal handler). NO malloc or stdio is allowed here.
@@ -492,6 +764,7 @@ void StackTrace::OutputToStream(std::ostream* os) const {
StreamBacktraceOutputHandler handler(os);
ProcessBacktrace(trace_, count_, &handler);
}
+#endif
namespace internal {
diff --git a/chromium/base/debug/stack_trace_unittest.cc b/chromium/base/debug/stack_trace_unittest.cc
index 701ebc47a1f..eb0bd9ad7f3 100644
--- a/chromium/base/debug/stack_trace_unittest.cc
+++ b/chromium/base/debug/stack_trace_unittest.cc
@@ -35,6 +35,7 @@ typedef testing::Test StackTraceTest;
#else
#define MAYBE_OutputToStream OutputToStream
#endif
+#if !defined(__UCLIBC__)
TEST_F(StackTraceTest, MAYBE_OutputToStream) {
StackTrace trace;
@@ -130,6 +131,7 @@ TEST_F(StackTraceTest, DebugOutputToStream) {
TEST_F(StackTraceTest, DebugPrintBacktrace) {
StackTrace().Print();
}
+#endif // !defined(__UCLIBC__)
#if defined(OS_POSIX) && !defined(OS_ANDROID)
#if !defined(OS_IOS)
@@ -144,7 +146,7 @@ MULTIPROCESS_TEST_MAIN(MismatchedMallocChildProcess) {
// and e.g. mismatched new[]/delete would cause a hang because
// of re-entering malloc.
TEST_F(StackTraceTest, AsyncSignalUnsafeSignalHandlerHang) {
- ProcessHandle child = this->SpawnChild("MismatchedMallocChildProcess", false);
+ ProcessHandle child = SpawnChild("MismatchedMallocChildProcess");
ASSERT_NE(kNullProcessHandle, child);
ASSERT_TRUE(WaitForSingleProcess(child, TestTimeouts::action_timeout()));
}
diff --git a/chromium/base/debug/stack_trace_win.cc b/chromium/base/debug/stack_trace_win.cc
index eb35b6ab91b..a3327afcea8 100644
--- a/chromium/base/debug/stack_trace_win.cc
+++ b/chromium/base/debug/stack_trace_win.cc
@@ -211,22 +211,25 @@ StackTrace::StackTrace() {
#pragma optimize("", on)
#endif
-StackTrace::StackTrace(EXCEPTION_POINTERS* exception_pointers) {
+StackTrace::StackTrace(const EXCEPTION_POINTERS* exception_pointers) {
// When walking an exception stack, we need to use StackWalk64().
count_ = 0;
+ // StackWalk64() may modify context record passed to it, so we will
+ // use a copy.
+ CONTEXT context_record = *exception_pointers->ContextRecord;
// Initialize stack walking.
STACKFRAME64 stack_frame;
memset(&stack_frame, 0, sizeof(stack_frame));
#if defined(_WIN64)
int machine_type = IMAGE_FILE_MACHINE_AMD64;
- stack_frame.AddrPC.Offset = exception_pointers->ContextRecord->Rip;
- stack_frame.AddrFrame.Offset = exception_pointers->ContextRecord->Rbp;
- stack_frame.AddrStack.Offset = exception_pointers->ContextRecord->Rsp;
+ stack_frame.AddrPC.Offset = context_record.Rip;
+ stack_frame.AddrFrame.Offset = context_record.Rbp;
+ stack_frame.AddrStack.Offset = context_record.Rsp;
#else
int machine_type = IMAGE_FILE_MACHINE_I386;
- stack_frame.AddrPC.Offset = exception_pointers->ContextRecord->Eip;
- stack_frame.AddrFrame.Offset = exception_pointers->ContextRecord->Ebp;
- stack_frame.AddrStack.Offset = exception_pointers->ContextRecord->Esp;
+ stack_frame.AddrPC.Offset = context_record.Eip;
+ stack_frame.AddrFrame.Offset = context_record.Ebp;
+ stack_frame.AddrStack.Offset = context_record.Esp;
#endif
stack_frame.AddrPC.Mode = AddrModeFlat;
stack_frame.AddrFrame.Mode = AddrModeFlat;
@@ -235,7 +238,7 @@ StackTrace::StackTrace(EXCEPTION_POINTERS* exception_pointers) {
GetCurrentProcess(),
GetCurrentThread(),
&stack_frame,
- exception_pointers->ContextRecord,
+ &context_record,
NULL,
&SymFunctionTableAccess64,
&SymGetModuleBase64,
diff --git a/chromium/base/debug/trace_event.h b/chromium/base/debug/trace_event.h
index 18feb33f3d0..686bd38790c 100644
--- a/chromium/base/debug/trace_event.h
+++ b/chromium/base/debug/trace_event.h
@@ -195,6 +195,7 @@
#include "base/debug/trace_event_impl.h"
#include "base/debug/trace_event_memory.h"
#include "base/debug/trace_event_system_stats_monitor.h"
+#include "base/time/time.h"
#include "build/build_config.h"
// By default, const char* argument values are assumed to have long-lived scope
@@ -725,12 +726,16 @@
INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_DELETE_OBJECT, \
category_group, name, TRACE_ID_DONT_MANGLE(id), TRACE_EVENT_FLAG_NONE)
+#define INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE() \
+ UNLIKELY(*INTERNAL_TRACE_EVENT_UID(category_group_enabled) & \
+ (base::debug::TraceLog::ENABLED_FOR_RECORDING | \
+ base::debug::TraceLog::ENABLED_FOR_EVENT_CALLBACK))
// Macro to efficiently determine if a given category group is enabled.
#define TRACE_EVENT_CATEGORY_GROUP_ENABLED(category_group, ret) \
do { \
INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \
- if (*INTERNAL_TRACE_EVENT_UID(category_group_enabled)) { \
+ if (INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()) { \
*ret = true; \
} else { \
*ret = false; \
@@ -850,7 +855,7 @@ TRACE_EVENT_API_CLASS_EXPORT extern \
category_group_enabled = \
reinterpret_cast<const unsigned char*>(TRACE_EVENT_API_ATOMIC_LOAD( \
atomic)); \
- if (!category_group_enabled) { \
+ if (UNLIKELY(!category_group_enabled)) { \
category_group_enabled = \
TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(category_group); \
TRACE_EVENT_API_ATOMIC_STORE(atomic, \
@@ -870,7 +875,7 @@ TRACE_EVENT_API_CLASS_EXPORT extern \
#define INTERNAL_TRACE_EVENT_ADD(phase, category_group, name, flags, ...) \
do { \
INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \
- if (*INTERNAL_TRACE_EVENT_UID(category_group_enabled)) { \
+ if (INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()) { \
trace_event_internal::AddTraceEvent( \
phase, INTERNAL_TRACE_EVENT_UID(category_group_enabled), name, \
trace_event_internal::kNoEventId, flags, ##__VA_ARGS__); \
@@ -883,7 +888,7 @@ TRACE_EVENT_API_CLASS_EXPORT extern \
#define INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, ...) \
INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \
trace_event_internal::ScopedTracer INTERNAL_TRACE_EVENT_UID(tracer); \
- if (*INTERNAL_TRACE_EVENT_UID(category_group_enabled)) { \
+ if (INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()) { \
base::debug::TraceEventHandle h = trace_event_internal::AddTraceEvent( \
TRACE_EVENT_PHASE_COMPLETE, \
INTERNAL_TRACE_EVENT_UID(category_group_enabled), \
@@ -899,7 +904,7 @@ TRACE_EVENT_API_CLASS_EXPORT extern \
flags, ...) \
do { \
INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \
- if (*INTERNAL_TRACE_EVENT_UID(category_group_enabled)) { \
+ if (INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()) { \
unsigned char trace_event_flags = flags | TRACE_EVENT_FLAG_HAS_ID; \
trace_event_internal::TraceID trace_event_trace_id( \
id, &trace_event_flags); \
@@ -916,7 +921,7 @@ TRACE_EVENT_API_CLASS_EXPORT extern \
category_group, name, id, thread_id, timestamp, flags, ...) \
do { \
INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \
- if (*INTERNAL_TRACE_EVENT_UID(category_group_enabled)) { \
+ if (INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()) { \
unsigned char trace_event_flags = flags | TRACE_EVENT_FLAG_HAS_ID; \
trace_event_internal::TraceID trace_event_trace_id( \
id, &trace_event_flags); \
@@ -1092,7 +1097,7 @@ union TraceValueUnion {
class TraceStringWithCopy {
public:
explicit TraceStringWithCopy(const char* str) : str_(str) {}
- operator const char* () const { return str_; }
+ const char* str() const { return str_; }
private:
const char* str_;
};
@@ -1101,6 +1106,7 @@ class TraceStringWithCopy {
// value in the return arguments. This allows this API to avoid declaring any
// structures so that it is portable to third_party libraries.
#define INTERNAL_DECLARE_SET_TRACE_VALUE(actual_type, \
+ arg_expression, \
union_member, \
value_type_id) \
static inline void SetTraceValue( \
@@ -1108,7 +1114,7 @@ class TraceStringWithCopy {
unsigned char* type, \
unsigned long long* value) { \
TraceValueUnion type_value; \
- type_value.union_member = arg; \
+ type_value.union_member = arg_expression; \
*type = value_type_id; \
*value = type_value.as_uint; \
}
@@ -1133,14 +1139,15 @@ INTERNAL_DECLARE_SET_TRACE_VALUE_INT(long, TRACE_VALUE_TYPE_INT)
INTERNAL_DECLARE_SET_TRACE_VALUE_INT(int, TRACE_VALUE_TYPE_INT)
INTERNAL_DECLARE_SET_TRACE_VALUE_INT(short, TRACE_VALUE_TYPE_INT)
INTERNAL_DECLARE_SET_TRACE_VALUE_INT(signed char, TRACE_VALUE_TYPE_INT)
-INTERNAL_DECLARE_SET_TRACE_VALUE(bool, as_bool, TRACE_VALUE_TYPE_BOOL)
-INTERNAL_DECLARE_SET_TRACE_VALUE(double, as_double, TRACE_VALUE_TYPE_DOUBLE)
-INTERNAL_DECLARE_SET_TRACE_VALUE(const void*, as_pointer,
+INTERNAL_DECLARE_SET_TRACE_VALUE(bool, arg, as_bool, TRACE_VALUE_TYPE_BOOL)
+INTERNAL_DECLARE_SET_TRACE_VALUE(double, arg, as_double,
+ TRACE_VALUE_TYPE_DOUBLE)
+INTERNAL_DECLARE_SET_TRACE_VALUE(const void*, arg, as_pointer,
TRACE_VALUE_TYPE_POINTER)
-INTERNAL_DECLARE_SET_TRACE_VALUE(const char*, as_string,
+INTERNAL_DECLARE_SET_TRACE_VALUE(const char*, arg, as_string,
TRACE_VALUE_TYPE_STRING)
-INTERNAL_DECLARE_SET_TRACE_VALUE(const TraceStringWithCopy&, as_string,
- TRACE_VALUE_TYPE_COPY_STRING)
+INTERNAL_DECLARE_SET_TRACE_VALUE(const TraceStringWithCopy&, arg.str(),
+ as_string, TRACE_VALUE_TYPE_COPY_STRING)
#undef INTERNAL_DECLARE_SET_TRACE_VALUE
#undef INTERNAL_DECLARE_SET_TRACE_VALUE_INT
@@ -1155,6 +1162,22 @@ static inline void SetTraceValue(const std::string& arg,
*value = type_value.as_uint;
}
+// base::Time and base::TimeTicks version of SetTraceValue to make it easier to
+// trace these types.
+static inline void SetTraceValue(const base::Time arg,
+ unsigned char* type,
+ unsigned long long* value) {
+ *type = TRACE_VALUE_TYPE_INT;
+ *value = arg.ToInternalValue();
+}
+
+static inline void SetTraceValue(const base::TimeTicks arg,
+ unsigned char* type,
+ unsigned long long* value) {
+ *type = TRACE_VALUE_TYPE_INT;
+ *value = arg.ToInternalValue();
+}
+
// These AddTraceEvent and AddTraceEventWithThreadIdAndTimestamp template
// functions are defined here instead of in the macro, because the arg_values
// could be temporary objects, such as std::string. In order to store
diff --git a/chromium/base/debug/trace_event_android.cc b/chromium/base/debug/trace_event_android.cc
index 567c48eb293..ed6b20d0bf7 100644
--- a/chromium/base/debug/trace_event_android.cc
+++ b/chromium/base/debug/trace_event_android.cc
@@ -97,6 +97,7 @@ void TraceLog::StartATrace() {
return;
}
SetEnabled(CategoryFilter(CategoryFilter::kDefaultCategoryFilterString),
+ base::debug::TraceLog::RECORDING_MODE,
RECORD_CONTINUOUSLY);
}
diff --git a/chromium/base/debug/trace_event_impl.cc b/chromium/base/debug/trace_event_impl.cc
index e774f621e04..8bcbe0e45ef 100644
--- a/chromium/base/debug/trace_event_impl.cc
+++ b/chromium/base/debug/trace_event_impl.cc
@@ -11,6 +11,8 @@
#include "base/command_line.h"
#include "base/debug/leak_annotations.h"
#include "base/debug/trace_event.h"
+#include "base/debug/trace_event_synthetic_delay.h"
+#include "base/float_util.h"
#include "base/format_macros.h"
#include "base/json/string_escape.h"
#include "base/lazy_instance.h"
@@ -69,8 +71,12 @@ const size_t kEchoToConsoleTraceEventBufferChunks = 256;
const int kThreadFlushTimeoutMs = 3000;
+#if !defined(OS_NACL)
// These categories will cause deadlock when ECHO_TO_CONSOLE. crbug.com/325575.
const char kEchoToConsoleCategoryFilter[] = "-ipc,-task";
+#endif
+
+const char kSyntheticDelayCategoryFilterPrefix[] = "DELAY(";
#define MAX_CATEGORY_GROUPS 100
@@ -81,6 +87,7 @@ const char kEchoToConsoleCategoryFilter[] = "-ipc,-task";
// convert internally to determine the category name from the char enabled
// pointer.
const char* g_category_groups[MAX_CATEGORY_GROUPS] = {
+ "toplevel",
"tracing already shutdown",
"tracing categories exhausted; must increase MAX_CATEGORY_GROUPS",
"__metadata",
@@ -89,12 +96,14 @@ const char* g_category_groups[MAX_CATEGORY_GROUPS] = {
// The enabled flag is char instead of bool so that the API can be used from C.
unsigned char g_category_group_enabled[MAX_CATEGORY_GROUPS] = { 0 };
-const int g_category_already_shutdown = 0;
-const int g_category_categories_exhausted = 1;
-const int g_category_metadata = 2;
-const int g_category_trace_event_overhead = 3;
-const int g_num_builtin_categories = 4;
-int g_category_index = g_num_builtin_categories; // Skip default categories.
+// Indexes here have to match the g_category_groups array indexes above.
+const int g_category_already_shutdown = 1;
+const int g_category_categories_exhausted = 2;
+const int g_category_metadata = 3;
+const int g_category_trace_event_overhead = 4;
+const int g_num_builtin_categories = 5;
+// Skip default categories.
+base::subtle::AtomicWord g_category_index = g_num_builtin_categories;
// The name of the current thread. This is used to decide if the current
// thread name has changed. We combine all the seen thread names into the
@@ -632,24 +641,35 @@ void TraceEvent::AppendValueAsJSON(unsigned char type,
case TRACE_VALUE_TYPE_DOUBLE: {
// FIXME: base/json/json_writer.cc is using the same code,
// should be made into a common method.
- std::string real = DoubleToString(value.as_double);
- // Ensure that the number has a .0 if there's no decimal or 'e'. This
- // makes sure that when we read the JSON back, it's interpreted as a
- // real rather than an int.
- if (real.find('.') == std::string::npos &&
- real.find('e') == std::string::npos &&
- real.find('E') == std::string::npos) {
- real.append(".0");
- }
- // The JSON spec requires that non-integer values in the range (-1,1)
- // have a zero before the decimal point - ".52" is not valid, "0.52" is.
- if (real[0] == '.') {
- real.insert(0, "0");
- } else if (real.length() > 1 && real[0] == '-' && real[1] == '.') {
- // "-.1" bad "-0.1" good
- real.insert(1, "0");
+ std::string real;
+ double val = value.as_double;
+ if (IsFinite(val)) {
+ real = DoubleToString(val);
+ // Ensure that the number has a .0 if there's no decimal or 'e'. This
+ // makes sure that when we read the JSON back, it's interpreted as a
+ // real rather than an int.
+ if (real.find('.') == std::string::npos &&
+ real.find('e') == std::string::npos &&
+ real.find('E') == std::string::npos) {
+ real.append(".0");
+ }
+ // The JSON spec requires that non-integer values in the range (-1,1)
+ // have a zero before the decimal point - ".52" is not valid, "0.52" is.
+ if (real[0] == '.') {
+ real.insert(0, "0");
+ } else if (real.length() > 1 && real[0] == '-' && real[1] == '.') {
+ // "-.1" bad "-0.1" good
+ real.insert(1, "0");
+ }
+ } else if (IsNaN(val)){
+ // The JSON spec doesn't allow NaN and Infinity (since these are
+ // objects in EcmaScript). Use strings instead.
+ real = "\"NaN\"";
+ } else if (val < 0) {
+ real = "\"-Infinity\"";
+ } else {
+ real = "\"Infinity\"";
}
-
StringAppendF(out, "%s", real.c_str());
break;
}
@@ -1094,7 +1114,7 @@ void TraceLog::ThreadLocalEventBuffer::FlushWhileLocked() {
trace_log_->lock_.AssertAcquired();
if (trace_log_->CheckGeneration(generation_)) {
- // Return the chunk to the buffer only if the generation matches,
+ // Return the chunk to the buffer only if the generation matches.
trace_log_->logged_events_->ReturnChunk(chunk_index_, chunk_.Pass());
}
// Otherwise this method may be called from the destructor, or TraceLog will
@@ -1107,7 +1127,7 @@ TraceLog* TraceLog::GetInstance() {
}
TraceLog::TraceLog()
- : enabled_(false),
+ : mode_(DISABLED),
num_traces_recorded_(0),
event_callback_(0),
dispatching_to_observer_list_(false),
@@ -1153,7 +1173,7 @@ TraceLog::TraceLog()
LOG(ERROR) << "Start " << switches::kTraceToConsole
<< " with CategoryFilter '" << filter << "'.";
- SetEnabled(CategoryFilter(filter), ECHO_TO_CONSOLE);
+ SetEnabled(CategoryFilter(filter), RECORDING_MODE, ECHO_TO_CONSOLE);
}
#endif
@@ -1192,8 +1212,12 @@ const char* TraceLog::GetCategoryGroupName(
void TraceLog::UpdateCategoryGroupEnabledFlag(int category_index) {
unsigned char enabled_flag = 0;
const char* category_group = g_category_groups[category_index];
- if (enabled_ && category_filter_.IsCategoryGroupEnabled(category_group))
+ if (mode_ == RECORDING_MODE &&
+ category_filter_.IsCategoryGroupEnabled(category_group))
enabled_flag |= ENABLED_FOR_RECORDING;
+ else if (mode_ == MONITORING_MODE &&
+ category_filter_.IsCategoryGroupEnabled(category_group))
+ enabled_flag |= ENABLED_FOR_MONITORING;
if (event_callback_ &&
event_callback_category_filter_.IsCategoryGroupEnabled(category_group))
enabled_flag |= ENABLED_FOR_EVENT_CALLBACK;
@@ -1201,48 +1225,89 @@ void TraceLog::UpdateCategoryGroupEnabledFlag(int category_index) {
}
void TraceLog::UpdateCategoryGroupEnabledFlags() {
- for (int i = 0; i < g_category_index; i++)
+ int category_index = base::subtle::NoBarrier_Load(&g_category_index);
+ for (int i = 0; i < category_index; i++)
UpdateCategoryGroupEnabledFlag(i);
}
+void TraceLog::UpdateSyntheticDelaysFromCategoryFilter() {
+ ResetTraceEventSyntheticDelays();
+ const CategoryFilter::StringList& delays =
+ category_filter_.GetSyntheticDelayValues();
+ CategoryFilter::StringList::const_iterator ci;
+ for (ci = delays.begin(); ci != delays.end(); ++ci) {
+ StringTokenizer tokens(*ci, ";");
+ if (!tokens.GetNext())
+ continue;
+ TraceEventSyntheticDelay* delay =
+ TraceEventSyntheticDelay::Lookup(tokens.token());
+ while (tokens.GetNext()) {
+ std::string token = tokens.token();
+ char* duration_end;
+ double target_duration = strtod(token.c_str(), &duration_end);
+ if (duration_end != token.c_str()) {
+ delay->SetTargetDuration(
+ TimeDelta::FromMicroseconds(target_duration * 1e6));
+ } else if (token == "static") {
+ delay->SetMode(TraceEventSyntheticDelay::STATIC);
+ } else if (token == "oneshot") {
+ delay->SetMode(TraceEventSyntheticDelay::ONE_SHOT);
+ } else if (token == "alternating") {
+ delay->SetMode(TraceEventSyntheticDelay::ALTERNATING);
+ }
+ }
+ }
+}
+
const unsigned char* TraceLog::GetCategoryGroupEnabledInternal(
const char* category_group) {
DCHECK(!strchr(category_group, '"')) <<
"Category groups may not contain double quote";
- AutoLock lock(lock_);
+ // The g_category_groups is append only, avoid using a lock for the fast path.
+ int current_category_index = base::subtle::Acquire_Load(&g_category_index);
- unsigned char* category_group_enabled = NULL;
// Search for pre-existing category group.
- for (int i = 0; i < g_category_index; i++) {
+ for (int i = 0; i < current_category_index; ++i) {
if (strcmp(g_category_groups[i], category_group) == 0) {
- category_group_enabled = &g_category_group_enabled[i];
- break;
+ return &g_category_group_enabled[i];
}
}
- if (!category_group_enabled) {
- // Create a new category group
- DCHECK(g_category_index < MAX_CATEGORY_GROUPS) <<
- "must increase MAX_CATEGORY_GROUPS";
- if (g_category_index < MAX_CATEGORY_GROUPS) {
- int new_index = g_category_index++;
- // Don't hold on to the category_group pointer, so that we can create
- // category groups with strings not known at compile time (this is
- // required by SetWatchEvent).
- const char* new_group = strdup(category_group);
- ANNOTATE_LEAKING_OBJECT_PTR(new_group);
- g_category_groups[new_index] = new_group;
- DCHECK(!g_category_group_enabled[new_index]);
- // Note that if both included and excluded patterns in the
- // CategoryFilter are empty, we exclude nothing,
- // thereby enabling this category group.
- UpdateCategoryGroupEnabledFlag(new_index);
- category_group_enabled = &g_category_group_enabled[new_index];
- } else {
- category_group_enabled =
- &g_category_group_enabled[g_category_categories_exhausted];
+ unsigned char* category_group_enabled = NULL;
+ // This is the slow path: the lock is not held in the case above, so more
+ // than one thread could have reached here trying to add the same category.
+ // Only hold to lock when actually appending a new category, and
+ // check the categories groups again.
+ AutoLock lock(lock_);
+ int category_index = base::subtle::Acquire_Load(&g_category_index);
+ for (int i = 0; i < category_index; ++i) {
+ if (strcmp(g_category_groups[i], category_group) == 0) {
+ return &g_category_group_enabled[i];
}
}
+
+ // Create a new category group.
+ DCHECK(category_index < MAX_CATEGORY_GROUPS) <<
+ "must increase MAX_CATEGORY_GROUPS";
+ if (category_index < MAX_CATEGORY_GROUPS) {
+ // Don't hold on to the category_group pointer, so that we can create
+ // category groups with strings not known at compile time (this is
+ // required by SetWatchEvent).
+ const char* new_group = strdup(category_group);
+ ANNOTATE_LEAKING_OBJECT_PTR(new_group);
+ g_category_groups[category_index] = new_group;
+ DCHECK(!g_category_group_enabled[category_index]);
+ // Note that if both included and excluded patterns in the
+ // CategoryFilter are empty, we exclude nothing,
+ // thereby enabling this category group.
+ UpdateCategoryGroupEnabledFlag(category_index);
+ category_group_enabled = &g_category_group_enabled[category_index];
+ // Update the max index now.
+ base::subtle::Release_Store(&g_category_index, category_index + 1);
+ } else {
+ category_group_enabled =
+ &g_category_group_enabled[g_category_categories_exhausted];
+ }
return category_group_enabled;
}
@@ -1251,11 +1316,13 @@ void TraceLog::GetKnownCategoryGroups(
AutoLock lock(lock_);
category_groups->push_back(
g_category_groups[g_category_trace_event_overhead]);
- for (int i = g_num_builtin_categories; i < g_category_index; i++)
+ int category_index = base::subtle::NoBarrier_Load(&g_category_index);
+ for (int i = g_num_builtin_categories; i < category_index; i++)
category_groups->push_back(g_category_groups[i]);
}
void TraceLog::SetEnabled(const CategoryFilter& category_filter,
+ Mode mode,
Options options) {
std::vector<EnabledStateObserver*> observer_list;
{
@@ -1266,12 +1333,16 @@ void TraceLog::SetEnabled(const CategoryFilter& category_filter,
Options old_options = trace_options();
- if (enabled_) {
+ if (IsEnabled()) {
if (options != old_options) {
- DLOG(ERROR) << "Attemting to re-enable tracing with a different "
+ DLOG(ERROR) << "Attempting to re-enable tracing with a different "
<< "set of options.";
}
+ if (mode != mode_) {
+ DLOG(ERROR) << "Attempting to re-enable tracing with a different mode.";
+ }
+
category_filter_.Merge(category_filter);
UpdateCategoryGroupEnabledFlags();
return;
@@ -1283,7 +1354,7 @@ void TraceLog::SetEnabled(const CategoryFilter& category_filter,
return;
}
- enabled_ = true;
+ mode_ = mode;
if (options != old_options) {
subtle::NoBarrier_Store(&trace_options_, options);
@@ -1294,8 +1365,9 @@ void TraceLog::SetEnabled(const CategoryFilter& category_filter,
category_filter_ = CategoryFilter(category_filter);
UpdateCategoryGroupEnabledFlags();
+ UpdateSyntheticDelaysFromCategoryFilter();
- if ((options & ENABLE_SAMPLING) || (options & MONITOR_SAMPLING)) {
+ if (options & ENABLE_SAMPLING) {
sampling_thread_.reset(new TraceSamplingThread);
sampling_thread_->RegisterSampleBucket(
&g_trace_state[0],
@@ -1341,7 +1413,7 @@ void TraceLog::SetDisabled() {
void TraceLog::SetDisabledWhileLocked() {
lock_.AssertAcquired();
- if (!enabled_)
+ if (!IsEnabled())
return;
if (dispatching_to_observer_list_) {
@@ -1350,7 +1422,7 @@ void TraceLog::SetDisabledWhileLocked() {
return;
}
- enabled_ = false;
+ mode_ = DISABLED;
if (sampling_thread_.get()) {
// Stop the sampling thread.
@@ -1384,7 +1456,7 @@ void TraceLog::SetDisabledWhileLocked() {
int TraceLog::GetNumTracesRecorded() {
AutoLock lock(lock_);
- if (!enabled_)
+ if (!IsEnabled())
return -1;
return num_traces_recorded_;
}
@@ -1425,7 +1497,7 @@ TraceBuffer* TraceLog::CreateTraceBuffer() {
Options options = trace_options();
if (options & RECORD_CONTINUOUSLY)
return new TraceBufferRingBuffer(kTraceEventRingBufferChunks);
- else if (options & MONITOR_SAMPLING)
+ else if ((options & ENABLE_SAMPLING) && mode_ == MONITORING_MODE)
return new TraceBufferRingBuffer(kMonitorTraceEventBufferChunks);
else if (options & ECHO_TO_CONSOLE)
return new TraceBufferRingBuffer(kEchoToConsoleTraceEventBufferChunks);
@@ -1769,7 +1841,8 @@ TraceEventHandle TraceLog::AddTraceEventWithThreadIdAndTimestamp(
}
std::string console_message;
- if ((*category_group_enabled & ENABLED_FOR_RECORDING)) {
+ if (*category_group_enabled &
+ (ENABLED_FOR_RECORDING | ENABLED_FOR_MONITORING)) {
OptionalAutoLock lock(lock_);
TraceEvent* trace_event = NULL;
@@ -1898,8 +1971,7 @@ void TraceLog::AddTraceEventEtw(char phase,
void TraceLog::AddTraceEventEtw(char phase,
const char* name,
const void* id,
- const std::string& extra)
-{
+ const std::string& extra) {
#if defined(OS_WIN)
TraceEventETWProvider::Trace(name, phase, id, extra);
#endif
@@ -1977,6 +2049,14 @@ void TraceLog::CancelWatchEvent() {
void TraceLog::AddMetadataEventsWhileLocked() {
lock_.AssertAcquired();
+#if !defined(OS_NACL) // NaCl shouldn't expose the process id.
+ InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false),
+ 0,
+ "num_cpus", "number",
+ base::SysInfo::NumberOfProcessors());
+#endif
+
+
int current_thread_id = static_cast<int>(base::PlatformThread::CurrentId());
if (process_sort_index_ != 0) {
InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false),
@@ -2166,7 +2246,8 @@ CategoryFilter::CategoryFilter(const std::string& filter_string) {
CategoryFilter::CategoryFilter(const CategoryFilter& cf)
: included_(cf.included_),
disabled_(cf.disabled_),
- excluded_(cf.excluded_) {
+ excluded_(cf.excluded_),
+ delays_(cf.delays_) {
}
CategoryFilter::~CategoryFilter() {
@@ -2179,6 +2260,7 @@ CategoryFilter& CategoryFilter::operator=(const CategoryFilter& rhs) {
included_ = rhs.included_;
disabled_ = rhs.disabled_;
excluded_ = rhs.excluded_;
+ delays_ = rhs.delays_;
return *this;
}
@@ -2191,8 +2273,19 @@ void CategoryFilter::Initialize(const std::string& filter_string) {
// Ignore empty categories.
if (category.empty())
continue;
- // Excluded categories start with '-'.
- if (category.at(0) == '-') {
+ // Synthetic delays are of the form 'DELAY(delay;option;option;...)'.
+ if (category.find(kSyntheticDelayCategoryFilterPrefix) == 0 &&
+ category.at(category.size() - 1) == ')') {
+ category = category.substr(
+ strlen(kSyntheticDelayCategoryFilterPrefix),
+ category.size() - strlen(kSyntheticDelayCategoryFilterPrefix) - 1);
+ size_t name_length = category.find(';');
+ if (name_length != std::string::npos && name_length > 0 &&
+ name_length != category.size() - 1) {
+ delays_.push_back(category);
+ }
+ } else if (category.at(0) == '-') {
+ // Excluded categories start with '-'.
// Remove '-' from category string.
category = category.substr(1);
excluded_.push_back(category);
@@ -2219,11 +2312,26 @@ void CategoryFilter::WriteString(const StringList& values,
}
}
+void CategoryFilter::WriteString(const StringList& delays,
+ std::string* out) const {
+ bool prepend_comma = !out->empty();
+ int token_cnt = 0;
+ for (StringList::const_iterator ci = delays.begin();
+ ci != delays.end(); ++ci) {
+ if (token_cnt > 0 || prepend_comma)
+ StringAppendF(out, ",");
+ StringAppendF(out, "%s%s)", kSyntheticDelayCategoryFilterPrefix,
+ ci->c_str());
+ ++token_cnt;
+ }
+}
+
std::string CategoryFilter::ToString() const {
std::string filter_string;
WriteString(included_, &filter_string, true);
WriteString(disabled_, &filter_string, true);
WriteString(excluded_, &filter_string, false);
+ WriteString(delays_, &filter_string);
return filter_string;
}
@@ -2279,6 +2387,9 @@ void CategoryFilter::Merge(const CategoryFilter& nested_filter) {
excluded_.insert(excluded_.end(),
nested_filter.excluded_.begin(),
nested_filter.excluded_.end());
+ delays_.insert(delays_.end(),
+ nested_filter.delays_.begin(),
+ nested_filter.delays_.end());
}
void CategoryFilter::Clear() {
@@ -2287,6 +2398,11 @@ void CategoryFilter::Clear() {
excluded_.clear();
}
+const CategoryFilter::StringList&
+ CategoryFilter::GetSyntheticDelayValues() const {
+ return delays_;
+}
+
} // namespace debug
} // namespace base
diff --git a/chromium/base/debug/trace_event_impl.h b/chromium/base/debug/trace_event_impl.h
index 61794807a41..e5a6dbd71f9 100644
--- a/chromium/base/debug/trace_event_impl.h
+++ b/chromium/base/debug/trace_event_impl.h
@@ -125,10 +125,6 @@ class BASE_EXPORT TraceEvent {
void UpdateDuration(const TimeTicks& now, const TimeTicks& thread_now);
// Serialize event data to JSON
- static void AppendEventsAsJSON(const std::vector<TraceEvent>& events,
- size_t start,
- size_t count,
- std::string* out);
void AppendAsJSON(std::string* out) const;
void AppendPrettyPrinted(std::ostringstream* out) const;
@@ -283,6 +279,8 @@ class BASE_EXPORT TraceResultBuffer {
class BASE_EXPORT CategoryFilter {
public:
+ typedef std::vector<std::string> StringList;
+
// The default category filter, used when none is provided.
// Allows all categories through, except if they end in the suffix 'Debug' or
// 'Test'.
@@ -298,6 +296,17 @@ class BASE_EXPORT CategoryFilter {
// Example: CategoryFilter("-excluded_category1,-excluded_category2");
// Example: CategoryFilter("-*,webkit"); would disable everything but webkit.
// Example: CategoryFilter("-webkit"); would enable everything but webkit.
+ //
+ // Category filters can also be used to configure synthetic delays.
+ //
+ // Example: CategoryFilter("DELAY(gpu.PresentingFrame;16)"); would make swap
+ // buffers always take at least 16 ms.
+ // Example: CategoryFilter("DELAY(gpu.PresentingFrame;16;oneshot)"); would
+ // make swap buffers take at least 16 ms the first time it is
+ // called.
+ // Example: CategoryFilter("DELAY(gpu.PresentingFrame;16;alternating)");
+ // would make swap buffers take at least 16 ms every other time it
+ // is called.
explicit CategoryFilter(const std::string& filter_string);
CategoryFilter(const CategoryFilter& cf);
@@ -317,6 +326,9 @@ class BASE_EXPORT CategoryFilter {
// disabled by this category filter.
bool IsCategoryGroupEnabled(const char* category_group) const;
+ // Return a list of the synthetic delays specified in this category filter.
+ const StringList& GetSyntheticDelayValues() const;
+
// Merges nested_filter with the current CategoryFilter
void Merge(const CategoryFilter& nested_filter);
@@ -334,12 +346,11 @@ class BASE_EXPORT CategoryFilter {
static bool IsEmptyOrContainsLeadingOrTrailingWhitespace(
const std::string& str);
- typedef std::vector<std::string> StringList;
-
void Initialize(const std::string& filter_string);
void WriteString(const StringList& values,
std::string* out,
bool included) const;
+ void WriteString(const StringList& delays, std::string* out) const;
bool HasIncludedPatterns() const;
bool DoesCategoryGroupContainCategory(const char* category_group,
@@ -348,12 +359,19 @@ class BASE_EXPORT CategoryFilter {
StringList included_;
StringList disabled_;
StringList excluded_;
+ StringList delays_;
};
class TraceSamplingThread;
class BASE_EXPORT TraceLog {
public:
+ enum Mode {
+ DISABLED = 0,
+ RECORDING_MODE,
+ MONITORING_MODE,
+ };
+
// Options determines how the trace buffer stores data.
enum Options {
// Record until the trace buffer is full.
@@ -366,21 +384,21 @@ class BASE_EXPORT TraceLog {
// Enable the sampling profiler in the recording mode.
ENABLE_SAMPLING = 1 << 2,
- // Enable the sampling profiler in the monitoring mode.
- MONITOR_SAMPLING = 1 << 3,
-
// Echo to console. Events are discarded.
- ECHO_TO_CONSOLE = 1 << 4,
+ ECHO_TO_CONSOLE = 1 << 3,
};
// The pointer returned from GetCategoryGroupEnabledInternal() points to a
// value with zero or more of the following bits. Used in this class only.
// The TRACE_EVENT macros should only use the value as a bool.
+ // These values must be in sync with macro values in TraceEvent.h in Blink.
enum CategoryGroupEnabledFlags {
- // Normal enabled flag for category groups enabled by SetEnabled().
+ // Category group enabled for the recording mode.
ENABLED_FOR_RECORDING = 1 << 0,
+ // Category group enabled for the monitoring mode.
+ ENABLED_FOR_MONITORING = 1 << 1,
// Category group enabled by SetEventCallbackEnabled().
- ENABLED_FOR_EVENT_CALLBACK = 1 << 1,
+ ENABLED_FOR_EVENT_CALLBACK = 1 << 2,
};
static TraceLog* GetInstance();
@@ -400,12 +418,13 @@ class BASE_EXPORT TraceLog {
// See CategoryFilter comments for details on how to control what categories
// will be traced. If tracing has already been enabled, |category_filter| will
// be merged into the current category filter.
- void SetEnabled(const CategoryFilter& category_filter, Options options);
+ void SetEnabled(const CategoryFilter& category_filter,
+ Mode mode, Options options);
// Disables normal tracing for all categories.
void SetDisabled();
- bool IsEnabled() { return enabled_; }
+ bool IsEnabled() { return mode_ != DISABLED; }
// The number of times we have begun recording traces. If tracing is off,
// returns -1. If tracing is on, then it returns the number of times we have
@@ -426,7 +445,7 @@ class BASE_EXPORT TraceLog {
class EnabledStateObserver {
public:
// Called just after the tracing system becomes enabled, outside of the
- // |lock_|. TraceLog::IsEnabled() is true at this point.
+ // |lock_|. TraceLog::IsEnabled() is true at this point.
virtual void OnTraceLogEnabled() = 0;
// Called just after the tracing system disables, outside of the |lock_|.
@@ -591,14 +610,18 @@ class BASE_EXPORT TraceLog {
// by the Singleton class.
friend struct DefaultSingletonTraits<TraceLog>;
- // Enable/disable each category group based on the current enabled_,
+ // Enable/disable each category group based on the current mode_,
// category_filter_, event_callback_ and event_callback_category_filter_.
- // Enable the category group if enabled_ is true and category_filter_ matches
+ // Enable the category group in the enabled mode if category_filter_ matches
// the category group, or event_callback_ is not null and
// event_callback_category_filter_ matches the category group.
void UpdateCategoryGroupEnabledFlags();
void UpdateCategoryGroupEnabledFlag(int category_index);
+ // Configure synthetic delays based on the values set in the current
+ // category filter.
+ void UpdateSyntheticDelaysFromCategoryFilter();
+
class ThreadLocalEventBuffer;
class OptionalAutoLock;
@@ -652,7 +675,7 @@ class BASE_EXPORT TraceLog {
// and thread_colors_.
Lock thread_info_lock_;
int locked_line_;
- bool enabled_;
+ Mode mode_;
int num_traces_recorded_;
scoped_ptr<TraceBuffer> logged_events_;
subtle::AtomicWord /* EventCallback */ event_callback_;
diff --git a/chromium/base/debug/trace_event_memory.cc b/chromium/base/debug/trace_event_memory.cc
index 4b2b050df8e..3c468278a15 100644
--- a/chromium/base/debug/trace_event_memory.cc
+++ b/chromium/base/debug/trace_event_memory.cc
@@ -409,9 +409,9 @@ bool AppendHeapProfileLineAsTraceFormat(const std::string& line,
// TODO(jamescook): Report the trace category and name separately to the
// trace viewer and allow it to decide what decorations to apply. For now
- // just hard-code a decoration for posted tasks.
+ // just hard-code a decoration for posted tasks (toplevel).
std::string trace_string(trace_name);
- if (!strcmp(trace_category, "task"))
+ if (!strcmp(trace_category, "toplevel"))
trace_string.append("->PostTask");
// Some trace name strings have double quotes, convert them to single.
diff --git a/chromium/base/debug/trace_event_memory_unittest.cc b/chromium/base/debug/trace_event_memory_unittest.cc
index c0a1568e357..3f5cad3ede2 100644
--- a/chromium/base/debug/trace_event_memory_unittest.cc
+++ b/chromium/base/debug/trace_event_memory_unittest.cc
@@ -164,10 +164,10 @@ TEST_F(TraceMemoryTest, AppendHeapProfileLineAsTraceFormat) {
AppendHeapProfileLineAsTraceFormat(input.str().c_str(), &output));
EXPECT_EQ(kExpectedOutput, output);
- // Input with with the category "task".
+ // Input with with the category "toplevel".
// TODO(jamescook): Eliminate this special case and move the logic to the
// trace viewer code.
- const char kTaskCategory[] = "task";
+ const char kTaskCategory[] = "toplevel";
const char kTaskName[] = "TaskName";
std::ostringstream input2;
input2 << " 68: 4195 [ 1087: 98009] @ " << &kTaskCategory << " "
diff --git a/chromium/base/debug/trace_event_synthetic_delay.cc b/chromium/base/debug/trace_event_synthetic_delay.cc
new file mode 100644
index 00000000000..ab1880941ba
--- /dev/null
+++ b/chromium/base/debug/trace_event_synthetic_delay.cc
@@ -0,0 +1,233 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/debug/trace_event_synthetic_delay.h"
+#include "base/memory/singleton.h"
+
+namespace {
+const int kMaxSyntheticDelays = 32;
+} // namespace
+
+namespace base {
+namespace debug {
+
+TraceEventSyntheticDelayClock::TraceEventSyntheticDelayClock() {}
+TraceEventSyntheticDelayClock::~TraceEventSyntheticDelayClock() {}
+
+class TraceEventSyntheticDelayRegistry : public TraceEventSyntheticDelayClock {
+ public:
+ static TraceEventSyntheticDelayRegistry* GetInstance();
+
+ TraceEventSyntheticDelay* GetOrCreateDelay(const char* name);
+ void ResetAllDelays();
+
+ // TraceEventSyntheticDelayClock implementation.
+ virtual base::TimeTicks Now() OVERRIDE;
+
+ private:
+ TraceEventSyntheticDelayRegistry();
+
+ friend struct DefaultSingletonTraits<TraceEventSyntheticDelayRegistry>;
+
+ Lock lock_;
+ TraceEventSyntheticDelay delays_[kMaxSyntheticDelays];
+ TraceEventSyntheticDelay dummy_delay_;
+ base::subtle::Atomic32 delay_count_;
+
+ DISALLOW_COPY_AND_ASSIGN(TraceEventSyntheticDelayRegistry);
+};
+
+TraceEventSyntheticDelay::TraceEventSyntheticDelay()
+ : mode_(STATIC), begin_count_(0), trigger_count_(0), clock_(NULL) {}
+
+TraceEventSyntheticDelay::~TraceEventSyntheticDelay() {}
+
+TraceEventSyntheticDelay* TraceEventSyntheticDelay::Lookup(
+ const std::string& name) {
+ return TraceEventSyntheticDelayRegistry::GetInstance()->GetOrCreateDelay(
+ name.c_str());
+}
+
+void TraceEventSyntheticDelay::Initialize(
+ const std::string& name,
+ TraceEventSyntheticDelayClock* clock) {
+ name_ = name;
+ clock_ = clock;
+}
+
+void TraceEventSyntheticDelay::SetTargetDuration(
+ base::TimeDelta target_duration) {
+ AutoLock lock(lock_);
+ target_duration_ = target_duration;
+ trigger_count_ = 0;
+ begin_count_ = 0;
+}
+
+void TraceEventSyntheticDelay::SetMode(Mode mode) {
+ AutoLock lock(lock_);
+ mode_ = mode;
+}
+
+void TraceEventSyntheticDelay::SetClock(TraceEventSyntheticDelayClock* clock) {
+ AutoLock lock(lock_);
+ clock_ = clock;
+}
+
+void TraceEventSyntheticDelay::Begin() {
+ // Note that we check for a non-zero target duration without locking to keep
+ // things quick for the common case when delays are disabled. Since the delay
+ // calculation is done with a lock held, it will always be correct. The only
+ // downside of this is that we may fail to apply some delays when the target
+ // duration changes.
+ ANNOTATE_BENIGN_RACE(&target_duration_, "Synthetic delay duration");
+ if (!target_duration_.ToInternalValue())
+ return;
+
+ base::TimeTicks start_time = clock_->Now();
+ {
+ AutoLock lock(lock_);
+ if (++begin_count_ != 1)
+ return;
+ end_time_ = CalculateEndTimeLocked(start_time);
+ }
+}
+
+void TraceEventSyntheticDelay::BeginParallel(base::TimeTicks* out_end_time) {
+ // See note in Begin().
+ ANNOTATE_BENIGN_RACE(&target_duration_, "Synthetic delay duration");
+ if (!target_duration_.ToInternalValue()) {
+ *out_end_time = base::TimeTicks();
+ return;
+ }
+
+ base::TimeTicks start_time = clock_->Now();
+ {
+ AutoLock lock(lock_);
+ *out_end_time = CalculateEndTimeLocked(start_time);
+ }
+}
+
+void TraceEventSyntheticDelay::End() {
+ // See note in Begin().
+ ANNOTATE_BENIGN_RACE(&target_duration_, "Synthetic delay duration");
+ if (!target_duration_.ToInternalValue())
+ return;
+
+ base::TimeTicks end_time;
+ {
+ AutoLock lock(lock_);
+ if (!begin_count_ || --begin_count_ != 0)
+ return;
+ end_time = end_time_;
+ }
+ if (!end_time.is_null())
+ ApplyDelay(end_time);
+}
+
+void TraceEventSyntheticDelay::EndParallel(base::TimeTicks end_time) {
+ if (!end_time.is_null())
+ ApplyDelay(end_time);
+}
+
+base::TimeTicks TraceEventSyntheticDelay::CalculateEndTimeLocked(
+ base::TimeTicks start_time) {
+ if (mode_ == ONE_SHOT && trigger_count_++)
+ return base::TimeTicks();
+ else if (mode_ == ALTERNATING && trigger_count_++ % 2)
+ return base::TimeTicks();
+ return start_time + target_duration_;
+}
+
+void TraceEventSyntheticDelay::ApplyDelay(base::TimeTicks end_time) {
+ TRACE_EVENT0("synthetic_delay", name_.c_str());
+ while (clock_->Now() < end_time) {
+ // Busy loop.
+ }
+}
+
+TraceEventSyntheticDelayRegistry*
+TraceEventSyntheticDelayRegistry::GetInstance() {
+ return Singleton<
+ TraceEventSyntheticDelayRegistry,
+ LeakySingletonTraits<TraceEventSyntheticDelayRegistry> >::get();
+}
+
+TraceEventSyntheticDelayRegistry::TraceEventSyntheticDelayRegistry()
+ : delay_count_(0) {}
+
+TraceEventSyntheticDelay* TraceEventSyntheticDelayRegistry::GetOrCreateDelay(
+ const char* name) {
+ // Try to find an existing delay first without locking to make the common case
+ // fast.
+ int delay_count = base::subtle::Acquire_Load(&delay_count_);
+ for (int i = 0; i < delay_count; ++i) {
+ if (!strcmp(name, delays_[i].name_.c_str()))
+ return &delays_[i];
+ }
+
+ AutoLock lock(lock_);
+ delay_count = base::subtle::Acquire_Load(&delay_count_);
+ for (int i = 0; i < delay_count; ++i) {
+ if (!strcmp(name, delays_[i].name_.c_str()))
+ return &delays_[i];
+ }
+
+ DCHECK(delay_count < kMaxSyntheticDelays)
+ << "must increase kMaxSyntheticDelays";
+ if (delay_count >= kMaxSyntheticDelays)
+ return &dummy_delay_;
+
+ delays_[delay_count].Initialize(std::string(name), this);
+ base::subtle::Release_Store(&delay_count_, delay_count + 1);
+ return &delays_[delay_count];
+}
+
+base::TimeTicks TraceEventSyntheticDelayRegistry::Now() {
+ return base::TimeTicks::HighResNow();
+}
+
+void TraceEventSyntheticDelayRegistry::ResetAllDelays() {
+ AutoLock lock(lock_);
+ int delay_count = base::subtle::Acquire_Load(&delay_count_);
+ for (int i = 0; i < delay_count; ++i) {
+ delays_[i].SetTargetDuration(base::TimeDelta());
+ delays_[i].SetClock(this);
+ }
+}
+
+void ResetTraceEventSyntheticDelays() {
+ TraceEventSyntheticDelayRegistry::GetInstance()->ResetAllDelays();
+}
+
+} // namespace debug
+} // namespace base
+
+namespace trace_event_internal {
+
+ScopedSyntheticDelay::ScopedSyntheticDelay(const char* name,
+ base::subtle::AtomicWord* impl_ptr)
+ : delay_impl_(GetOrCreateDelay(name, impl_ptr)) {
+ delay_impl_->BeginParallel(&end_time_);
+}
+
+ScopedSyntheticDelay::~ScopedSyntheticDelay() {
+ delay_impl_->EndParallel(end_time_);
+}
+
+base::debug::TraceEventSyntheticDelay* GetOrCreateDelay(
+ const char* name,
+ base::subtle::AtomicWord* impl_ptr) {
+ base::debug::TraceEventSyntheticDelay* delay_impl =
+ reinterpret_cast<base::debug::TraceEventSyntheticDelay*>(
+ base::subtle::NoBarrier_Load(impl_ptr));
+ if (!delay_impl) {
+ delay_impl = base::debug::TraceEventSyntheticDelayRegistry::GetInstance()
+ ->GetOrCreateDelay(name);
+ base::subtle::NoBarrier_Store(
+ impl_ptr, reinterpret_cast<base::subtle::AtomicWord>(delay_impl));
+ }
+ return delay_impl;
+}
+
+} // namespace trace_event_internal
diff --git a/chromium/base/debug/trace_event_synthetic_delay.h b/chromium/base/debug/trace_event_synthetic_delay.h
new file mode 100644
index 00000000000..06d6cdea1f9
--- /dev/null
+++ b/chromium/base/debug/trace_event_synthetic_delay.h
@@ -0,0 +1,166 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// The synthetic delay framework makes it possible to dynamically inject
+// arbitrary delays into into different parts of the codebase. This can be used,
+// for instance, for testing various task scheduling algorithms.
+//
+// The delays are specified in terms of a target duration for a given block of
+// code. If the code executes faster than the duration, the thread is made to
+// sleep until the deadline is met.
+//
+// Code can be instrumented for delays with two sets of macros. First, for
+// delays that should apply within a scope, use the following macro:
+//
+// TRACE_EVENT_SYNTHETIC_DELAY("cc.LayerTreeHost.DrawAndSwap");
+//
+// For delaying operations that span multiple scopes, use:
+//
+// TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("cc.Scheduler.BeginMainFrame");
+// ...
+// TRACE_EVENT_SYNTHETIC_DELAY_END("cc.Scheduler.BeginMainFrame");
+//
+// Here BEGIN establishes the start time for the delay and END executes the
+// delay based on the remaining time. If BEGIN is called multiple times in a
+// row, END should be called a corresponding number of times. Only the last
+// call to END will have an effect.
+//
+// Note that a single delay may begin on one thread and end on another. This
+// implies that a single delay cannot not be applied in several threads at once.
+
+#ifndef BASE_DEBUG_TRACE_EVENT_SYNTHETIC_DELAY_H_
+#define BASE_DEBUG_TRACE_EVENT_SYNTHETIC_DELAY_H_
+
+#include "base/atomicops.h"
+#include "base/debug/trace_event.h"
+#include "base/synchronization/lock.h"
+#include "base/time/time.h"
+
+// Apply a named delay in the current scope.
+#define TRACE_EVENT_SYNTHETIC_DELAY(name) \
+ static base::subtle::AtomicWord INTERNAL_TRACE_EVENT_UID(impl_ptr) = 0; \
+ trace_event_internal::ScopedSyntheticDelay INTERNAL_TRACE_EVENT_UID(delay)( \
+ name, &INTERNAL_TRACE_EVENT_UID(impl_ptr));
+
+// Begin a named delay, establishing its timing start point. May be called
+// multiple times as long as the calls to TRACE_EVENT_SYNTHETIC_DELAY_END are
+// balanced. Only the first call records the timing start point.
+#define TRACE_EVENT_SYNTHETIC_DELAY_BEGIN(name) \
+ do { \
+ static base::subtle::AtomicWord impl_ptr = 0; \
+ trace_event_internal::GetOrCreateDelay(name, &impl_ptr)->Begin(); \
+ } while (false)
+
+// End a named delay. The delay is applied only if this call matches the
+// first corresponding call to TRACE_EVENT_SYNTHETIC_DELAY_BEGIN with the
+// same delay.
+#define TRACE_EVENT_SYNTHETIC_DELAY_END(name) \
+ do { \
+ static base::subtle::AtomicWord impl_ptr = 0; \
+ trace_event_internal::GetOrCreateDelay(name, &impl_ptr)->End(); \
+ } while (false)
+
+template <typename Type>
+struct DefaultSingletonTraits;
+
+namespace base {
+namespace debug {
+
+// Time source for computing delay durations. Used for testing.
+class TRACE_EVENT_API_CLASS_EXPORT TraceEventSyntheticDelayClock {
+ public:
+ TraceEventSyntheticDelayClock();
+ virtual ~TraceEventSyntheticDelayClock();
+ virtual base::TimeTicks Now() = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TraceEventSyntheticDelayClock);
+};
+
+// Single delay point instance.
+class TRACE_EVENT_API_CLASS_EXPORT TraceEventSyntheticDelay {
+ public:
+ enum Mode {
+ STATIC, // Apply the configured delay every time.
+ ONE_SHOT, // Apply the configured delay just once.
+ ALTERNATING // Apply the configured delay every other time.
+ };
+
+ // Returns an existing named delay instance or creates a new one with |name|.
+ static TraceEventSyntheticDelay* Lookup(const std::string& name);
+
+ void SetTargetDuration(TimeDelta target_duration);
+ void SetMode(Mode mode);
+ void SetClock(TraceEventSyntheticDelayClock* clock);
+
+ // Begin the delay, establishing its timing start point. May be called
+ // multiple times as long as the calls to End() are balanced. Only the first
+ // call records the timing start point.
+ void Begin();
+
+ // End the delay. The delay is applied only if this call matches the first
+ // corresponding call to Begin() with the same delay.
+ void End();
+
+ // Begin a parallel instance of the delay. Several parallel instances may be
+ // active simultaneously and will complete independently. The computed end
+ // time for the delay is stored in |out_end_time|, which should later be
+ // passed to EndParallel().
+ void BeginParallel(base::TimeTicks* out_end_time);
+
+ // End a previously started parallel delay. |end_time| is the delay end point
+ // computed by BeginParallel().
+ void EndParallel(base::TimeTicks end_time);
+
+ private:
+ TraceEventSyntheticDelay();
+ ~TraceEventSyntheticDelay();
+ friend class TraceEventSyntheticDelayRegistry;
+
+ void Initialize(const std::string& name,
+ TraceEventSyntheticDelayClock* clock);
+ base::TimeTicks CalculateEndTimeLocked(base::TimeTicks start_time);
+ void ApplyDelay(base::TimeTicks end_time);
+
+ Lock lock_;
+ Mode mode_;
+ std::string name_;
+ int begin_count_;
+ int trigger_count_;
+ base::TimeTicks end_time_;
+ base::TimeDelta target_duration_;
+ TraceEventSyntheticDelayClock* clock_;
+
+ DISALLOW_COPY_AND_ASSIGN(TraceEventSyntheticDelay);
+};
+
+// Set the target durations of all registered synthetic delay points to zero.
+TRACE_EVENT_API_CLASS_EXPORT void ResetTraceEventSyntheticDelays();
+
+} // namespace debug
+} // namespace base
+
+namespace trace_event_internal {
+
+// Helper class for scoped delays. Do not use directly.
+class TRACE_EVENT_API_CLASS_EXPORT ScopedSyntheticDelay {
+ public:
+ explicit ScopedSyntheticDelay(const char* name,
+ base::subtle::AtomicWord* impl_ptr);
+ ~ScopedSyntheticDelay();
+
+ private:
+ base::debug::TraceEventSyntheticDelay* delay_impl_;
+ base::TimeTicks end_time_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedSyntheticDelay);
+};
+
+// Helper for registering delays. Do not use directly.
+TRACE_EVENT_API_CLASS_EXPORT base::debug::TraceEventSyntheticDelay*
+ GetOrCreateDelay(const char* name, base::subtle::AtomicWord* impl_ptr);
+
+} // namespace trace_event_internal
+
+#endif /* BASE_DEBUG_TRACE_EVENT_SYNTHETIC_DELAY_H_ */
diff --git a/chromium/base/debug/trace_event_synthetic_delay_unittest.cc b/chromium/base/debug/trace_event_synthetic_delay_unittest.cc
new file mode 100644
index 00000000000..7833e7bbcde
--- /dev/null
+++ b/chromium/base/debug/trace_event_synthetic_delay_unittest.cc
@@ -0,0 +1,156 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/debug/trace_event_synthetic_delay.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace base {
+namespace debug {
+namespace {
+
+const int kTargetDurationMs = 100;
+// Allow some leeway in timings to make it possible to run these tests with a
+// wall clock time source too.
+const int kShortDurationMs = 10;
+
+} // namespace
+
+class TraceEventSyntheticDelayTest : public testing::Test,
+ public TraceEventSyntheticDelayClock {
+ public:
+ TraceEventSyntheticDelayTest() {}
+ virtual ~TraceEventSyntheticDelayTest() {
+ ResetTraceEventSyntheticDelays();
+ }
+
+ // TraceEventSyntheticDelayClock implementation.
+ virtual base::TimeTicks Now() OVERRIDE {
+ AdvanceTime(base::TimeDelta::FromMilliseconds(kShortDurationMs / 10));
+ return now_;
+ }
+
+ TraceEventSyntheticDelay* ConfigureDelay(const char* name) {
+ TraceEventSyntheticDelay* delay = TraceEventSyntheticDelay::Lookup(name);
+ delay->SetClock(this);
+ delay->SetTargetDuration(
+ base::TimeDelta::FromMilliseconds(kTargetDurationMs));
+ return delay;
+ }
+
+ void AdvanceTime(base::TimeDelta delta) { now_ += delta; }
+
+ int TestFunction() {
+ base::TimeTicks start = Now();
+ { TRACE_EVENT_SYNTHETIC_DELAY("test.Delay"); }
+ return (Now() - start).InMilliseconds();
+ }
+
+ int AsyncTestFunctionBegin() {
+ base::TimeTicks start = Now();
+ { TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("test.AsyncDelay"); }
+ return (Now() - start).InMilliseconds();
+ }
+
+ int AsyncTestFunctionEnd() {
+ base::TimeTicks start = Now();
+ { TRACE_EVENT_SYNTHETIC_DELAY_END("test.AsyncDelay"); }
+ return (Now() - start).InMilliseconds();
+ }
+
+ private:
+ base::TimeTicks now_;
+
+ DISALLOW_COPY_AND_ASSIGN(TraceEventSyntheticDelayTest);
+};
+
+TEST_F(TraceEventSyntheticDelayTest, StaticDelay) {
+ TraceEventSyntheticDelay* delay = ConfigureDelay("test.Delay");
+ delay->SetMode(TraceEventSyntheticDelay::STATIC);
+ EXPECT_GE(TestFunction(), kTargetDurationMs);
+}
+
+TEST_F(TraceEventSyntheticDelayTest, OneShotDelay) {
+ TraceEventSyntheticDelay* delay = ConfigureDelay("test.Delay");
+ delay->SetMode(TraceEventSyntheticDelay::ONE_SHOT);
+ EXPECT_GE(TestFunction(), kTargetDurationMs);
+ EXPECT_LT(TestFunction(), kShortDurationMs);
+
+ delay->SetTargetDuration(
+ base::TimeDelta::FromMilliseconds(kTargetDurationMs));
+ EXPECT_GE(TestFunction(), kTargetDurationMs);
+}
+
+TEST_F(TraceEventSyntheticDelayTest, AlternatingDelay) {
+ TraceEventSyntheticDelay* delay = ConfigureDelay("test.Delay");
+ delay->SetMode(TraceEventSyntheticDelay::ALTERNATING);
+ EXPECT_GE(TestFunction(), kTargetDurationMs);
+ EXPECT_LT(TestFunction(), kShortDurationMs);
+ EXPECT_GE(TestFunction(), kTargetDurationMs);
+ EXPECT_LT(TestFunction(), kShortDurationMs);
+}
+
+TEST_F(TraceEventSyntheticDelayTest, AsyncDelay) {
+ ConfigureDelay("test.AsyncDelay");
+ EXPECT_LT(AsyncTestFunctionBegin(), kShortDurationMs);
+ EXPECT_GE(AsyncTestFunctionEnd(), kTargetDurationMs / 2);
+}
+
+TEST_F(TraceEventSyntheticDelayTest, AsyncDelayExceeded) {
+ ConfigureDelay("test.AsyncDelay");
+ EXPECT_LT(AsyncTestFunctionBegin(), kShortDurationMs);
+ AdvanceTime(base::TimeDelta::FromMilliseconds(kTargetDurationMs));
+ EXPECT_LT(AsyncTestFunctionEnd(), kShortDurationMs);
+}
+
+TEST_F(TraceEventSyntheticDelayTest, AsyncDelayNoActivation) {
+ ConfigureDelay("test.AsyncDelay");
+ EXPECT_LT(AsyncTestFunctionEnd(), kShortDurationMs);
+}
+
+TEST_F(TraceEventSyntheticDelayTest, AsyncDelayNested) {
+ ConfigureDelay("test.AsyncDelay");
+ EXPECT_LT(AsyncTestFunctionBegin(), kShortDurationMs);
+ EXPECT_LT(AsyncTestFunctionBegin(), kShortDurationMs);
+ EXPECT_LT(AsyncTestFunctionEnd(), kShortDurationMs);
+ EXPECT_GE(AsyncTestFunctionEnd(), kTargetDurationMs / 2);
+}
+
+TEST_F(TraceEventSyntheticDelayTest, AsyncDelayUnbalanced) {
+ ConfigureDelay("test.AsyncDelay");
+ EXPECT_LT(AsyncTestFunctionBegin(), kShortDurationMs);
+ EXPECT_GE(AsyncTestFunctionEnd(), kTargetDurationMs / 2);
+ EXPECT_LT(AsyncTestFunctionEnd(), kShortDurationMs);
+
+ EXPECT_LT(AsyncTestFunctionBegin(), kShortDurationMs);
+ EXPECT_GE(AsyncTestFunctionEnd(), kTargetDurationMs / 2);
+}
+
+TEST_F(TraceEventSyntheticDelayTest, ResetDelays) {
+ ConfigureDelay("test.Delay");
+ ResetTraceEventSyntheticDelays();
+ EXPECT_LT(TestFunction(), kShortDurationMs);
+}
+
+TEST_F(TraceEventSyntheticDelayTest, BeginParallel) {
+ TraceEventSyntheticDelay* delay = ConfigureDelay("test.AsyncDelay");
+ base::TimeTicks end_times[2];
+ base::TimeTicks start_time = Now();
+
+ delay->BeginParallel(&end_times[0]);
+ EXPECT_FALSE(end_times[0].is_null());
+
+ delay->BeginParallel(&end_times[1]);
+ EXPECT_FALSE(end_times[1].is_null());
+
+ delay->EndParallel(end_times[0]);
+ EXPECT_GE((Now() - start_time).InMilliseconds(), kTargetDurationMs);
+
+ start_time = Now();
+ delay->EndParallel(end_times[1]);
+ EXPECT_LT((Now() - start_time).InMilliseconds(), kShortDurationMs);
+}
+
+} // namespace debug
+} // namespace base
diff --git a/chromium/base/debug/trace_event_unittest.cc b/chromium/base/debug/trace_event_unittest.cc
index aef2c43b6fa..c843c25f540 100644
--- a/chromium/base/debug/trace_event_unittest.cc
+++ b/chromium/base/debug/trace_event_unittest.cc
@@ -4,11 +4,13 @@
#include "base/debug/trace_event_unittest.h"
+#include <math.h>
#include <cstdlib>
#include "base/bind.h"
#include "base/command_line.h"
#include "base/debug/trace_event.h"
+#include "base/debug/trace_event_synthetic_delay.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/memory/ref_counted_memory.h"
@@ -19,6 +21,7 @@
#include "base/synchronization/waitable_event.h"
#include "base/threading/platform_thread.h"
#include "base/threading/thread.h"
+#include "base/time/time.h"
#include "base/values.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -62,6 +65,7 @@ class TraceEventTestFixture : public testing::Test {
const char* phase,
const char* key,
const char* value);
+ void DropTracedMetadataRecords();
bool FindMatchingValue(const char* key,
const char* value);
bool FindNonMatchingValue(const char* key,
@@ -78,6 +82,7 @@ class TraceEventTestFixture : public testing::Test {
void BeginSpecificTrace(const std::string& filter) {
event_watch_notification_ = 0;
TraceLog::GetInstance()->SetEnabled(CategoryFilter(filter),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
}
@@ -247,6 +252,28 @@ DictionaryValue* TraceEventTestFixture::FindMatchingTraceEntry(
return NULL;
}
+void TraceEventTestFixture::DropTracedMetadataRecords() {
+
+ scoped_ptr<ListValue> old_trace_parsed(trace_parsed_.DeepCopy());
+ size_t old_trace_parsed_size = old_trace_parsed->GetSize();
+ trace_parsed_.Clear();
+
+ for (size_t i = 0; i < old_trace_parsed_size; i++) {
+ Value* value = NULL;
+ old_trace_parsed->Get(i, &value);
+ if (!value || value->GetType() != Value::TYPE_DICTIONARY) {
+ trace_parsed_.Append(value->DeepCopy());
+ continue;
+ }
+ DictionaryValue* dict = static_cast<DictionaryValue*>(value);
+ std::string tmp;
+ if(dict->GetString("ph", &tmp) && tmp == "M")
+ continue;
+
+ trace_parsed_.Append(value->DeepCopy());
+ }
+}
+
DictionaryValue* TraceEventTestFixture::FindNamePhase(const char* name,
const char* phase) {
JsonKeyValue key_values[] = {
@@ -853,6 +880,7 @@ void HighResSleepForTraceTest(base::TimeDelta elapsed) {
// Simple Test for emitting data and validating it was received.
TEST_F(TraceEventTestFixture, DataCaptured) {
TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
TraceWithAllMacroVariants(NULL);
@@ -876,6 +904,7 @@ TEST_F(TraceEventTestFixture, EnabledObserverFiresOnEnable) {
EXPECT_CALL(observer, OnTraceLogEnabled())
.Times(1);
TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
testing::Mock::VerifyAndClear(&observer);
EXPECT_TRUE(TraceLog::GetInstance()->IsEnabled());
@@ -887,6 +916,7 @@ TEST_F(TraceEventTestFixture, EnabledObserverFiresOnEnable) {
TEST_F(TraceEventTestFixture, EnabledObserverDoesntFireOnSecondEnable) {
TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
testing::StrictMock<MockEnabledStateChangedObserver> observer;
@@ -897,6 +927,7 @@ TEST_F(TraceEventTestFixture, EnabledObserverDoesntFireOnSecondEnable) {
EXPECT_CALL(observer, OnTraceLogDisabled())
.Times(0);
TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
testing::Mock::VerifyAndClear(&observer);
EXPECT_TRUE(TraceLog::GetInstance()->IsEnabled());
@@ -909,8 +940,12 @@ TEST_F(TraceEventTestFixture, EnabledObserverDoesntFireOnSecondEnable) {
TEST_F(TraceEventTestFixture, EnabledObserverFiresOnFirstDisable) {
CategoryFilter cf_inc_all("*");
- TraceLog::GetInstance()->SetEnabled(cf_inc_all, TraceLog::RECORD_UNTIL_FULL);
- TraceLog::GetInstance()->SetEnabled(cf_inc_all, TraceLog::RECORD_UNTIL_FULL);
+ TraceLog::GetInstance()->SetEnabled(cf_inc_all,
+ base::debug::TraceLog::RECORDING_MODE,
+ TraceLog::RECORD_UNTIL_FULL);
+ TraceLog::GetInstance()->SetEnabled(cf_inc_all,
+ base::debug::TraceLog::RECORDING_MODE,
+ TraceLog::RECORD_UNTIL_FULL);
testing::StrictMock<MockEnabledStateChangedObserver> observer;
TraceLog::GetInstance()->AddEnabledStateObserver(&observer);
@@ -929,6 +964,7 @@ TEST_F(TraceEventTestFixture, EnabledObserverFiresOnFirstDisable) {
TEST_F(TraceEventTestFixture, EnabledObserverFiresOnDisable) {
TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
MockEnabledStateChangedObserver observer;
@@ -965,6 +1001,7 @@ TEST_F(TraceEventTestFixture, ObserversFireAfterStateChange) {
TraceLog::GetInstance()->AddEnabledStateObserver(&observer);
TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
EXPECT_TRUE(TraceLog::GetInstance()->IsEnabled());
@@ -997,6 +1034,7 @@ TEST_F(TraceEventTestFixture, SelfRemovingObserver) {
EXPECT_EQ(1u, TraceLog::GetInstance()->GetObserverCountForTest());
TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
TraceLog::GetInstance()->SetDisabled();
// The observer removed itself on disable.
@@ -1012,6 +1050,7 @@ bool IsNewTrace() {
TEST_F(TraceEventTestFixture, NewTraceRecording) {
ASSERT_FALSE(IsNewTrace());
TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
// First call to IsNewTrace() should succeed. But, the second shouldn't.
ASSERT_TRUE(IsNewTrace());
@@ -1024,6 +1063,7 @@ TEST_F(TraceEventTestFixture, NewTraceRecording) {
// Start another trace. IsNewTrace() should become true again, briefly, as
// before.
TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
ASSERT_TRUE(IsNewTrace());
ASSERT_FALSE(IsNewTrace());
@@ -1080,20 +1120,24 @@ TEST_F(TraceEventTestFixture, Categories) {
Clear();
included_categories.clear();
TraceLog::GetInstance()->SetEnabled(CategoryFilter("not_found823564786"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
TRACE_EVENT_INSTANT0("cat1", "name", TRACE_EVENT_SCOPE_THREAD);
TRACE_EVENT_INSTANT0("cat2", "name", TRACE_EVENT_SCOPE_THREAD);
EndTraceAndFlush();
+ DropTracedMetadataRecords();
EXPECT_TRUE(trace_parsed_.empty());
// Include existent category -> only events of that category
Clear();
included_categories.clear();
TraceLog::GetInstance()->SetEnabled(CategoryFilter("inc"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
TRACE_EVENT_INSTANT0("inc", "name", TRACE_EVENT_SCOPE_THREAD);
TRACE_EVENT_INSTANT0("inc2", "name", TRACE_EVENT_SCOPE_THREAD);
EndTraceAndFlush();
+ DropTracedMetadataRecords();
EXPECT_TRUE(FindMatchingValue("cat", "inc"));
EXPECT_FALSE(FindNonMatchingValue("cat", "inc"));
@@ -1102,6 +1146,7 @@ TEST_F(TraceEventTestFixture, Categories) {
included_categories.clear();
TraceLog::GetInstance()->SetEnabled(
CategoryFilter("inc_wildcard_*,inc_wildchar_?_end"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
TRACE_EVENT_INSTANT0("inc_wildcard_abc", "included",
TRACE_EVENT_SCOPE_THREAD);
@@ -1131,6 +1176,7 @@ TEST_F(TraceEventTestFixture, Categories) {
// Exclude nonexistent category -> all events
Clear();
TraceLog::GetInstance()->SetEnabled(CategoryFilter("-not_found823564786"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
TRACE_EVENT_INSTANT0("cat1", "name", TRACE_EVENT_SCOPE_THREAD);
TRACE_EVENT_INSTANT0("cat2", "name", TRACE_EVENT_SCOPE_THREAD);
@@ -1143,6 +1189,7 @@ TEST_F(TraceEventTestFixture, Categories) {
// Exclude existent category -> only events of other categories
Clear();
TraceLog::GetInstance()->SetEnabled(CategoryFilter("-inc"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
TRACE_EVENT_INSTANT0("inc", "name", TRACE_EVENT_SCOPE_THREAD);
TRACE_EVENT_INSTANT0("inc2", "name", TRACE_EVENT_SCOPE_THREAD);
@@ -1158,6 +1205,7 @@ TEST_F(TraceEventTestFixture, Categories) {
Clear();
TraceLog::GetInstance()->SetEnabled(
CategoryFilter("-inc_wildcard_*,-inc_wildchar_?_end"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
TRACE_EVENT_INSTANT0("inc_wildcard_abc", "not_inc",
TRACE_EVENT_SCOPE_THREAD);
@@ -1390,7 +1438,7 @@ TEST_F(TraceEventTestFixture, DataCapturedManyThreads) {
Thread* threads[num_threads];
WaitableEvent* task_complete_events[num_threads];
for (int i = 0; i < num_threads; i++) {
- threads[i] = new Thread(StringPrintf("Thread %d", i).c_str());
+ threads[i] = new Thread(StringPrintf("Thread %d", i));
task_complete_events[i] = new WaitableEvent(false, false);
threads[i]->Start();
threads[i]->message_loop()->PostTask(
@@ -1430,7 +1478,7 @@ TEST_F(TraceEventTestFixture, ThreadNames) {
Thread* threads[num_threads];
PlatformThreadId thread_ids[num_threads];
for (int i = 0; i < num_threads; i++)
- threads[i] = new Thread(StringPrintf("Thread %d", i).c_str());
+ threads[i] = new Thread(StringPrintf("Thread %d", i));
// Enable tracing.
BeginTrace();
@@ -1665,15 +1713,21 @@ TEST_F(TraceEventTestFixture, TracingIsLazy) {
TEST_F(TraceEventTestFixture, TraceEnableDisable) {
TraceLog* trace_log = TraceLog::GetInstance();
CategoryFilter cf_inc_all("*");
- trace_log->SetEnabled(cf_inc_all, TraceLog::RECORD_UNTIL_FULL);
+ trace_log->SetEnabled(cf_inc_all,
+ base::debug::TraceLog::RECORDING_MODE,
+ TraceLog::RECORD_UNTIL_FULL);
EXPECT_TRUE(trace_log->IsEnabled());
trace_log->SetDisabled();
EXPECT_FALSE(trace_log->IsEnabled());
- trace_log->SetEnabled(cf_inc_all, TraceLog::RECORD_UNTIL_FULL);
+ trace_log->SetEnabled(cf_inc_all,
+ base::debug::TraceLog::RECORDING_MODE,
+ TraceLog::RECORD_UNTIL_FULL);
EXPECT_TRUE(trace_log->IsEnabled());
const std::vector<std::string> empty;
- trace_log->SetEnabled(CategoryFilter(""), TraceLog::RECORD_UNTIL_FULL);
+ trace_log->SetEnabled(CategoryFilter(""),
+ base::debug::TraceLog::RECORDING_MODE,
+ TraceLog::RECORD_UNTIL_FULL);
EXPECT_TRUE(trace_log->IsEnabled());
trace_log->SetDisabled();
EXPECT_FALSE(trace_log->IsEnabled());
@@ -1683,15 +1737,21 @@ TEST_F(TraceEventTestFixture, TraceEnableDisable) {
TEST_F(TraceEventTestFixture, TraceCategoriesAfterNestedEnable) {
TraceLog* trace_log = TraceLog::GetInstance();
- trace_log->SetEnabled(CategoryFilter("foo,bar"), TraceLog::RECORD_UNTIL_FULL);
+ trace_log->SetEnabled(CategoryFilter("foo,bar"),
+ base::debug::TraceLog::RECORDING_MODE,
+ TraceLog::RECORD_UNTIL_FULL);
EXPECT_TRUE(*trace_log->GetCategoryGroupEnabled("foo"));
EXPECT_TRUE(*trace_log->GetCategoryGroupEnabled("bar"));
EXPECT_FALSE(*trace_log->GetCategoryGroupEnabled("baz"));
- trace_log->SetEnabled(CategoryFilter("foo2"), TraceLog::RECORD_UNTIL_FULL);
+ trace_log->SetEnabled(CategoryFilter("foo2"),
+ base::debug::TraceLog::RECORDING_MODE,
+ TraceLog::RECORD_UNTIL_FULL);
EXPECT_TRUE(*trace_log->GetCategoryGroupEnabled("foo2"));
EXPECT_FALSE(*trace_log->GetCategoryGroupEnabled("baz"));
// The "" becomes the default catergory set when applied.
- trace_log->SetEnabled(CategoryFilter(""), TraceLog::RECORD_UNTIL_FULL);
+ trace_log->SetEnabled(CategoryFilter(""),
+ base::debug::TraceLog::RECORDING_MODE,
+ TraceLog::RECORD_UNTIL_FULL);
EXPECT_TRUE(*trace_log->GetCategoryGroupEnabled("foo"));
EXPECT_TRUE(*trace_log->GetCategoryGroupEnabled("baz"));
EXPECT_STREQ("-*Debug,-*Test",
@@ -1703,10 +1763,13 @@ TEST_F(TraceEventTestFixture, TraceCategoriesAfterNestedEnable) {
EXPECT_FALSE(*trace_log->GetCategoryGroupEnabled("baz"));
trace_log->SetEnabled(CategoryFilter("-foo,-bar"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
EXPECT_FALSE(*trace_log->GetCategoryGroupEnabled("foo"));
EXPECT_TRUE(*trace_log->GetCategoryGroupEnabled("baz"));
- trace_log->SetEnabled(CategoryFilter("moo"), TraceLog::RECORD_UNTIL_FULL);
+ trace_log->SetEnabled(CategoryFilter("moo"),
+ base::debug::TraceLog::RECORDING_MODE,
+ TraceLog::RECORD_UNTIL_FULL);
EXPECT_TRUE(*trace_log->GetCategoryGroupEnabled("baz"));
EXPECT_TRUE(*trace_log->GetCategoryGroupEnabled("moo"));
EXPECT_FALSE(*trace_log->GetCategoryGroupEnabled("foo"));
@@ -1717,9 +1780,11 @@ TEST_F(TraceEventTestFixture, TraceCategoriesAfterNestedEnable) {
// Make sure disabled categories aren't cleared if we set in the second.
trace_log->SetEnabled(CategoryFilter("disabled-by-default-cc,foo"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
EXPECT_FALSE(*trace_log->GetCategoryGroupEnabled("bar"));
trace_log->SetEnabled(CategoryFilter("disabled-by-default-gpu"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
EXPECT_TRUE(*trace_log->GetCategoryGroupEnabled("disabled-by-default-cc"));
EXPECT_TRUE(*trace_log->GetCategoryGroupEnabled("disabled-by-default-gpu"));
@@ -1733,6 +1798,7 @@ TEST_F(TraceEventTestFixture, TraceCategoriesAfterNestedEnable) {
TEST_F(TraceEventTestFixture, TraceSampling) {
TraceLog::GetInstance()->SetEnabled(
CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::Options(TraceLog::RECORD_UNTIL_FULL |
TraceLog::ENABLE_SAMPLING));
@@ -1751,6 +1817,7 @@ TEST_F(TraceEventTestFixture, TraceSampling) {
TEST_F(TraceEventTestFixture, TraceSamplingScope) {
TraceLog::GetInstance()->SetEnabled(
CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::Options(TraceLog::RECORD_UNTIL_FULL |
TraceLog::ENABLE_SAMPLING));
@@ -1785,7 +1852,8 @@ TEST_F(TraceEventTestFixture, TraceSamplingScope) {
TEST_F(TraceEventTestFixture, TraceContinuousSampling) {
TraceLog::GetInstance()->SetEnabled(
CategoryFilter("*"),
- TraceLog::Options(TraceLog::MONITOR_SAMPLING));
+ base::debug::TraceLog::MONITORING_MODE,
+ TraceLog::Options(TraceLog::ENABLE_SAMPLING));
TRACE_EVENT_SET_SAMPLING_STATE_FOR_BUCKET(1, "category", "AAA");
TraceLog::GetInstance()->WaitSamplingEventForTesting();
@@ -1843,6 +1911,7 @@ class MyData : public base::debug::ConvertableToTraceFormat {
TEST_F(TraceEventTestFixture, ConvertableTypes) {
TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
scoped_refptr<ConvertableToTraceFormat> data(new MyData());
@@ -1946,6 +2015,171 @@ TEST_F(TraceEventTestFixture, ConvertableTypes) {
EXPECT_EQ(1, foo_val);
}
+TEST_F(TraceEventTestFixture, PrimitiveArgs) {
+ TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
+ TraceLog::RECORD_UNTIL_FULL);
+
+ TRACE_EVENT1("foo", "event1", "int_one", 1);
+ TRACE_EVENT1("foo", "event2", "int_neg_ten", -10);
+ TRACE_EVENT1("foo", "event3", "float_one", 1.0f);
+ TRACE_EVENT1("foo", "event4", "float_half", .5f);
+ TRACE_EVENT1("foo", "event5", "float_neghalf", -.5f);
+ TRACE_EVENT1("foo", "event6", "float_infinity",
+ std::numeric_limits<float>::infinity());
+ TRACE_EVENT1("foo", "event6b", "float_neg_infinity",
+ -std::numeric_limits<float>::infinity());
+ TRACE_EVENT1("foo", "event7", "double_nan",
+ std::numeric_limits<double>::quiet_NaN());
+ void* p = 0;
+ TRACE_EVENT1("foo", "event8", "pointer_null", p);
+ p = reinterpret_cast<void*>(0xbadf00d);
+ TRACE_EVENT1("foo", "event9", "pointer_badf00d", p);
+ TRACE_EVENT1("foo", "event10", "bool_true", true);
+ TRACE_EVENT1("foo", "event11", "bool_false", false);
+ TRACE_EVENT1("foo", "event12", "time_null",
+ base::Time());
+ TRACE_EVENT1("foo", "event13", "time_one",
+ base::Time::FromInternalValue(1));
+ TRACE_EVENT1("foo", "event14", "timeticks_null",
+ base::TimeTicks());
+ TRACE_EVENT1("foo", "event15", "timeticks_one",
+ base::TimeTicks::FromInternalValue(1));
+ EndTraceAndFlush();
+
+ const DictionaryValue* args_dict = NULL;
+ DictionaryValue* dict = NULL;
+ const Value* value = NULL;
+ std::string str_value;
+ int int_value;
+ double double_value;
+ bool bool_value;
+
+ dict = FindNamePhase("event1", "X");
+ ASSERT_TRUE(dict);
+ dict->GetDictionary("args", &args_dict);
+ ASSERT_TRUE(args_dict);
+ EXPECT_TRUE(args_dict->GetInteger("int_one", &int_value));
+ EXPECT_EQ(1, int_value);
+
+ dict = FindNamePhase("event2", "X");
+ ASSERT_TRUE(dict);
+ dict->GetDictionary("args", &args_dict);
+ ASSERT_TRUE(args_dict);
+ EXPECT_TRUE(args_dict->GetInteger("int_neg_ten", &int_value));
+ EXPECT_EQ(-10, int_value);
+
+ // 1f must be serlized to JSON as "1.0" in order to be a double, not an int.
+ dict = FindNamePhase("event3", "X");
+ ASSERT_TRUE(dict);
+ dict->GetDictionary("args", &args_dict);
+ ASSERT_TRUE(args_dict);
+ EXPECT_TRUE(args_dict->Get("float_one", &value));
+ EXPECT_TRUE(value->IsType(Value::TYPE_DOUBLE));
+ EXPECT_TRUE(value->GetAsDouble(&double_value));
+ EXPECT_EQ(1, double_value);
+
+ // .5f must be serlized to JSON as "0.5".
+ dict = FindNamePhase("event4", "X");
+ ASSERT_TRUE(dict);
+ dict->GetDictionary("args", &args_dict);
+ ASSERT_TRUE(args_dict);
+ EXPECT_TRUE(args_dict->Get("float_half", &value));
+ EXPECT_TRUE(value->IsType(Value::TYPE_DOUBLE));
+ EXPECT_TRUE(value->GetAsDouble(&double_value));
+ EXPECT_EQ(0.5, double_value);
+
+ // -.5f must be serlized to JSON as "-0.5".
+ dict = FindNamePhase("event5", "X");
+ ASSERT_TRUE(dict);
+ dict->GetDictionary("args", &args_dict);
+ ASSERT_TRUE(args_dict);
+ EXPECT_TRUE(args_dict->Get("float_neghalf", &value));
+ EXPECT_TRUE(value->IsType(Value::TYPE_DOUBLE));
+ EXPECT_TRUE(value->GetAsDouble(&double_value));
+ EXPECT_EQ(-0.5, double_value);
+
+ // Infinity is serialized to JSON as a string.
+ dict = FindNamePhase("event6", "X");
+ ASSERT_TRUE(dict);
+ dict->GetDictionary("args", &args_dict);
+ ASSERT_TRUE(args_dict);
+ EXPECT_TRUE(args_dict->GetString("float_infinity", &str_value));
+ EXPECT_STREQ("Infinity", str_value.c_str());
+ dict = FindNamePhase("event6b", "X");
+ ASSERT_TRUE(dict);
+ dict->GetDictionary("args", &args_dict);
+ ASSERT_TRUE(args_dict);
+ EXPECT_TRUE(args_dict->GetString("float_neg_infinity", &str_value));
+ EXPECT_STREQ("-Infinity", str_value.c_str());
+
+ // NaN is serialized to JSON as a string.
+ dict = FindNamePhase("event7", "X");
+ ASSERT_TRUE(dict);
+ dict->GetDictionary("args", &args_dict);
+ ASSERT_TRUE(args_dict);
+ EXPECT_TRUE(args_dict->GetString("double_nan", &str_value));
+ EXPECT_STREQ("NaN", str_value.c_str());
+
+ // NULL pointers should be serialized as "0x0".
+ dict = FindNamePhase("event8", "X");
+ ASSERT_TRUE(dict);
+ dict->GetDictionary("args", &args_dict);
+ ASSERT_TRUE(args_dict);
+ EXPECT_TRUE(args_dict->GetString("pointer_null", &str_value));
+ EXPECT_STREQ("0x0", str_value.c_str());
+
+ // Other pointers should be serlized as a hex string.
+ dict = FindNamePhase("event9", "X");
+ ASSERT_TRUE(dict);
+ dict->GetDictionary("args", &args_dict);
+ ASSERT_TRUE(args_dict);
+ EXPECT_TRUE(args_dict->GetString("pointer_badf00d", &str_value));
+ EXPECT_STREQ("0xbadf00d", str_value.c_str());
+
+ dict = FindNamePhase("event10", "X");
+ ASSERT_TRUE(dict);
+ dict->GetDictionary("args", &args_dict);
+ ASSERT_TRUE(args_dict);
+ EXPECT_TRUE(args_dict->GetBoolean("bool_true", &bool_value));
+ EXPECT_TRUE(bool_value);
+
+ dict = FindNamePhase("event11", "X");
+ ASSERT_TRUE(dict);
+ dict->GetDictionary("args", &args_dict);
+ ASSERT_TRUE(args_dict);
+ EXPECT_TRUE(args_dict->GetBoolean("bool_false", &bool_value));
+ EXPECT_FALSE(bool_value);
+
+ dict = FindNamePhase("event12", "X");
+ ASSERT_TRUE(dict);
+ dict->GetDictionary("args", &args_dict);
+ ASSERT_TRUE(args_dict);
+ EXPECT_TRUE(args_dict->GetInteger("time_null", &int_value));
+ EXPECT_EQ(0, int_value);
+
+ dict = FindNamePhase("event13", "X");
+ ASSERT_TRUE(dict);
+ dict->GetDictionary("args", &args_dict);
+ ASSERT_TRUE(args_dict);
+ EXPECT_TRUE(args_dict->GetInteger("time_one", &int_value));
+ EXPECT_EQ(1, int_value);
+
+ dict = FindNamePhase("event14", "X");
+ ASSERT_TRUE(dict);
+ dict->GetDictionary("args", &args_dict);
+ ASSERT_TRUE(args_dict);
+ EXPECT_TRUE(args_dict->GetInteger("timeticks_null", &int_value));
+ EXPECT_EQ(0, int_value);
+
+ dict = FindNamePhase("event15", "X");
+ ASSERT_TRUE(dict);
+ dict->GetDictionary("args", &args_dict);
+ ASSERT_TRUE(args_dict);
+ EXPECT_TRUE(args_dict->GetInteger("timeticks_one", &int_value));
+ EXPECT_EQ(1, int_value);
+}
+
class TraceEventCallbackTest : public TraceEventTestFixture {
public:
virtual void SetUp() OVERRIDE {
@@ -2046,6 +2280,7 @@ TEST_F(TraceEventCallbackTest, TraceEventCallback) {
TEST_F(TraceEventCallbackTest, TraceEventCallbackWhileFull) {
TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_UNTIL_FULL);
do {
TRACE_EVENT_INSTANT0("all", "badger badger", TRACE_EVENT_SCOPE_GLOBAL);
@@ -2066,8 +2301,9 @@ TEST_F(TraceEventCallbackTest, TraceEventCallbackAndRecording1) {
Callback);
TRACE_EVENT_INSTANT0("recording", "no", TRACE_EVENT_SCOPE_GLOBAL);
TRACE_EVENT_INSTANT0("callback", "yes", TRACE_EVENT_SCOPE_GLOBAL);
- TraceLog::GetInstance()->SetEnabled(
- CategoryFilter("recording"), TraceLog::RECORD_UNTIL_FULL);
+ TraceLog::GetInstance()->SetEnabled(CategoryFilter("recording"),
+ base::debug::TraceLog::RECORDING_MODE,
+ TraceLog::RECORD_UNTIL_FULL);
TRACE_EVENT_INSTANT0("recording", "yes", TRACE_EVENT_SCOPE_GLOBAL);
TRACE_EVENT_INSTANT0("callback", "yes", TRACE_EVENT_SCOPE_GLOBAL);
TraceLog::GetInstance()->SetEventCallbackDisabled();
@@ -2077,6 +2313,7 @@ TEST_F(TraceEventCallbackTest, TraceEventCallbackAndRecording1) {
TRACE_EVENT_INSTANT0("recording", "no", TRACE_EVENT_SCOPE_GLOBAL);
TRACE_EVENT_INSTANT0("callback", "no", TRACE_EVENT_SCOPE_GLOBAL);
+ DropTracedMetadataRecords();
VerifyCallbackAndRecordedEvents(2, 2);
}
@@ -2088,8 +2325,9 @@ TEST_F(TraceEventCallbackTest, TraceEventCallbackAndRecording2) {
Callback);
TRACE_EVENT_INSTANT0("recording", "no", TRACE_EVENT_SCOPE_GLOBAL);
TRACE_EVENT_INSTANT0("callback", "yes", TRACE_EVENT_SCOPE_GLOBAL);
- TraceLog::GetInstance()->SetEnabled(
- CategoryFilter("recording"), TraceLog::RECORD_UNTIL_FULL);
+ TraceLog::GetInstance()->SetEnabled(CategoryFilter("recording"),
+ base::debug::TraceLog::RECORDING_MODE,
+ TraceLog::RECORD_UNTIL_FULL);
TRACE_EVENT_INSTANT0("recording", "yes", TRACE_EVENT_SCOPE_GLOBAL);
TRACE_EVENT_INSTANT0("callback", "yes", TRACE_EVENT_SCOPE_GLOBAL);
EndTraceAndFlush();
@@ -2099,6 +2337,7 @@ TEST_F(TraceEventCallbackTest, TraceEventCallbackAndRecording2) {
TRACE_EVENT_INSTANT0("recording", "no", TRACE_EVENT_SCOPE_GLOBAL);
TRACE_EVENT_INSTANT0("callback", "no", TRACE_EVENT_SCOPE_GLOBAL);
+ DropTracedMetadataRecords();
VerifyCallbackAndRecordedEvents(3, 1);
}
@@ -2106,8 +2345,9 @@ TEST_F(TraceEventCallbackTest, TraceEventCallbackAndRecording2) {
TEST_F(TraceEventCallbackTest, TraceEventCallbackAndRecording3) {
TRACE_EVENT_INSTANT0("recording", "no", TRACE_EVENT_SCOPE_GLOBAL);
TRACE_EVENT_INSTANT0("callback", "no", TRACE_EVENT_SCOPE_GLOBAL);
- TraceLog::GetInstance()->SetEnabled(
- CategoryFilter("recording"), TraceLog::RECORD_UNTIL_FULL);
+ TraceLog::GetInstance()->SetEnabled(CategoryFilter("recording"),
+ base::debug::TraceLog::RECORDING_MODE,
+ TraceLog::RECORD_UNTIL_FULL);
TRACE_EVENT_INSTANT0("recording", "yes", TRACE_EVENT_SCOPE_GLOBAL);
TRACE_EVENT_INSTANT0("callback", "no", TRACE_EVENT_SCOPE_GLOBAL);
TraceLog::GetInstance()->SetEventCallbackEnabled(CategoryFilter("callback"),
@@ -2121,6 +2361,7 @@ TEST_F(TraceEventCallbackTest, TraceEventCallbackAndRecording3) {
TRACE_EVENT_INSTANT0("recording", "no", TRACE_EVENT_SCOPE_GLOBAL);
TRACE_EVENT_INSTANT0("callback", "no", TRACE_EVENT_SCOPE_GLOBAL);
+ DropTracedMetadataRecords();
VerifyCallbackAndRecordedEvents(1, 3);
}
@@ -2128,8 +2369,9 @@ TEST_F(TraceEventCallbackTest, TraceEventCallbackAndRecording3) {
TEST_F(TraceEventCallbackTest, TraceEventCallbackAndRecording4) {
TRACE_EVENT_INSTANT0("recording", "no", TRACE_EVENT_SCOPE_GLOBAL);
TRACE_EVENT_INSTANT0("callback", "no", TRACE_EVENT_SCOPE_GLOBAL);
- TraceLog::GetInstance()->SetEnabled(
- CategoryFilter("recording"), TraceLog::RECORD_UNTIL_FULL);
+ TraceLog::GetInstance()->SetEnabled(CategoryFilter("recording"),
+ base::debug::TraceLog::RECORDING_MODE,
+ TraceLog::RECORD_UNTIL_FULL);
TRACE_EVENT_INSTANT0("recording", "yes", TRACE_EVENT_SCOPE_GLOBAL);
TRACE_EVENT_INSTANT0("callback", "no", TRACE_EVENT_SCOPE_GLOBAL);
TraceLog::GetInstance()->SetEventCallbackEnabled(CategoryFilter("callback"),
@@ -2143,6 +2385,7 @@ TEST_F(TraceEventCallbackTest, TraceEventCallbackAndRecording4) {
TRACE_EVENT_INSTANT0("recording", "no", TRACE_EVENT_SCOPE_GLOBAL);
TRACE_EVENT_INSTANT0("callback", "no", TRACE_EVENT_SCOPE_GLOBAL);
+ DropTracedMetadataRecords();
VerifyCallbackAndRecordedEvents(2, 2);
}
@@ -2151,8 +2394,9 @@ TEST_F(TraceEventCallbackTest, TraceEventCallbackAndRecordingDuration) {
Callback);
{
TRACE_EVENT0("callback", "duration1");
- TraceLog::GetInstance()->SetEnabled(
- CategoryFilter("*"), TraceLog::RECORD_UNTIL_FULL);
+ TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
+ TraceLog::RECORD_UNTIL_FULL);
TRACE_EVENT0("callback", "duration2");
EndTraceAndFlush();
TRACE_EVENT0("callback", "duration3");
@@ -2170,6 +2414,7 @@ TEST_F(TraceEventCallbackTest, TraceEventCallbackAndRecordingDuration) {
TEST_F(TraceEventTestFixture, TraceBufferRingBufferGetReturnChunk) {
TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_CONTINUOUSLY);
TraceBuffer* buffer = TraceLog::GetInstance()->trace_buffer();
size_t capacity = buffer->Capacity();
@@ -2229,6 +2474,7 @@ TEST_F(TraceEventTestFixture, TraceBufferRingBufferGetReturnChunk) {
TEST_F(TraceEventTestFixture, TraceBufferRingBufferHalfIteration) {
TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_CONTINUOUSLY);
TraceBuffer* buffer = TraceLog::GetInstance()->trace_buffer();
size_t capacity = buffer->Capacity();
@@ -2256,6 +2502,7 @@ TEST_F(TraceEventTestFixture, TraceBufferRingBufferHalfIteration) {
TEST_F(TraceEventTestFixture, TraceBufferRingBufferFullIteration) {
TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::RECORD_CONTINUOUSLY);
TraceBuffer* buffer = TraceLog::GetInstance()->trace_buffer();
size_t capacity = buffer->Capacity();
@@ -2504,6 +2751,7 @@ TEST_F(TraceEventTestFixture, EchoToConsole) {
logging::SetLogMessageHandler(MockLogMessageHandler);
TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::ECHO_TO_CONSOLE);
TRACE_EVENT_BEGIN0("a", "begin_end");
{
@@ -2539,6 +2787,7 @@ TEST_F(TraceEventTestFixture, EchoToConsoleTraceEventRecursion) {
logging::SetLogMessageHandler(LogMessageHandlerWithTraceEvent);
TraceLog::GetInstance()->SetEnabled(CategoryFilter("*"),
+ base::debug::TraceLog::RECORDING_MODE,
TraceLog::ECHO_TO_CONSOLE);
{
// This should not cause deadlock or infinite recursion.
@@ -2567,6 +2816,7 @@ TEST_F(TraceEventTestFixture, TimeOffset) {
TimeTicks::NowFromSystemTraceTime().ToInternalValue());
EndTraceAndFlush();
+ DropTracedMetadataRecords();
double end_time = static_cast<double>(
(TimeTicks::NowFromSystemTraceTime() - time_offset).ToInternalValue());
@@ -2582,5 +2832,48 @@ TEST_F(TraceEventTestFixture, TimeOffset) {
}
}
+TEST_F(TraceEventTestFixture, ConfigureSyntheticDelays) {
+ BeginSpecificTrace("DELAY(test.Delay;0.05)");
+
+ base::TimeTicks start = base::TimeTicks::Now();
+ {
+ TRACE_EVENT_SYNTHETIC_DELAY("test.Delay");
+ }
+ base::TimeDelta duration = base::TimeTicks::Now() - start;
+ EXPECT_GE(duration.InMilliseconds(), 50);
+
+ EndTraceAndFlush();
+}
+
+TEST_F(TraceEventTestFixture, BadSyntheticDelayConfigurations) {
+ const char* configs[] = {
+ "",
+ "DELAY(",
+ "DELAY(;",
+ "DELAY(;)",
+ "DELAY(test.Delay)",
+ "DELAY(test.Delay;)"
+ };
+ for (size_t i = 0; i < arraysize(configs); i++) {
+ BeginSpecificTrace(configs[i]);
+ EndTraceAndFlush();
+ CategoryFilter filter = TraceLog::GetInstance()->GetCurrentCategoryFilter();
+ EXPECT_EQ(0u, filter.GetSyntheticDelayValues().size());
+ }
+}
+
+TEST_F(TraceEventTestFixture, SyntheticDelayConfigurationMerging) {
+ CategoryFilter filter1("DELAY(test.Delay1;16)");
+ CategoryFilter filter2("DELAY(test.Delay2;32)");
+ filter1.Merge(filter2);
+ EXPECT_EQ(2u, filter1.GetSyntheticDelayValues().size());
+}
+
+TEST_F(TraceEventTestFixture, SyntheticDelayConfigurationToString) {
+ const char config[] = "DELAY(test.Delay;16;oneshot)";
+ CategoryFilter filter(config);
+ EXPECT_EQ(config, filter.ToString());
+}
+
} // namespace debug
} // namespace base
diff --git a/chromium/base/debug/tsan_suppressions.cc b/chromium/base/debug/tsan_suppressions.cc
new file mode 100644
index 00000000000..70ce21ee563
--- /dev/null
+++ b/chromium/base/debug/tsan_suppressions.cc
@@ -0,0 +1,297 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file contains the default suppressions for ThreadSanitizer.
+// You can also pass additional suppressions via TSAN_OPTIONS:
+// TSAN_OPTIONS=suppressions=/path/to/suppressions. Please refer to
+// http://dev.chromium.org/developers/testing/threadsanitizer-tsan-v2
+// for more info.
+
+#if defined(THREAD_SANITIZER)
+
+// Please make sure the code below declares a single string variable
+// kTSanDefaultSuppressions contains TSan suppressions delimited by newlines.
+// See http://dev.chromium.org/developers/testing/threadsanitizer-tsan-v2
+// for the instructions on writing suppressions.
+char kTSanDefaultSuppressions[] =
+// False positives in libflashplayer.so and libglib.so. Since we don't
+// instrument them, we cannot reason about the synchronization in them.
+"race:libflashplayer.so\n"
+"race:libglib*.so\n"
+
+// Intentional race in ToolsSanityTest.DataRace in base_unittests.
+"race:base/tools_sanity_unittest.cc\n"
+
+// Data race on WatchdogCounter [test-only].
+"race:base/threading/watchdog_unittest.cc\n"
+
+// Races in libevent, http://crbug.com/23244.
+"race:libevent/event.c\n"
+
+// http://crbug.com/46840.
+"race:base::HistogramSamples::IncreaseSum\n"
+"race:base::Histogram::Add\n"
+"race:base::HistogramSamples::Add\n"
+
+// http://crbug.com/84094.
+"race:sqlite3StatusSet\n"
+"race:pcache1EnforceMaxPage\n"
+"race:pcache1AllocPage\n"
+
+// http://crbug.com/102327.
+// Test-only race, won't fix.
+"race:tracked_objects::ThreadData::ShutdownSingleThreadedCleanup\n"
+
+// http://crbug.com/115540
+"race:*GetCurrentThreadIdentifier\n"
+
+// http://crbug.com/120808
+"race:base/threading/watchdog.cc\n"
+
+// http://crbug.com/157586
+"race:third_party/libvpx/source/libvpx/vp8/decoder/threading.c\n"
+
+// http://crbug.com/158718
+"race:third_party/ffmpeg/libavcodec/pthread.c\n"
+"race:third_party/ffmpeg/libavcodec/pthread_frame.c\n"
+"race:third_party/ffmpeg/libavcodec/vp8.c\n"
+"race:third_party/ffmpeg/libavutil/mem.c\n"
+"race:*HashFrameForTesting\n"
+"race:third_party/ffmpeg/libavcodec/h264pred.c\n"
+"race:media::ReleaseData\n"
+
+// http://crbug.com/158922
+"race:third_party/libvpx/source/libvpx/vp8/encoder/*\n"
+
+// http://crbug.com/189177
+"race:thread_manager\n"
+"race:v8::Locker::Initialize\n"
+
+// http://crbug.com/223352
+"race:uprv_malloc_46\n"
+"race:uprv_realloc_46\n"
+
+// http://crbug.com/239359
+"race:media::TestInputCallback::OnData\n"
+
+// http://crbug.com/244368
+"race:skia::BeginPlatformPaint\n"
+
+// http://crbug.com/244385
+"race:unixTempFileDir\n"
+
+// http://crbug.com/244755
+"race:v8::internal::Zone::NewExpand\n"
+"race:TooLateToEnableNow\n"
+"race:adjust_segment_bytes_allocated\n"
+
+// http://crbug.com/244774
+"race:webrtc::RTPReceiver::ProcessBitrate\n"
+"race:webrtc::RTPSender::ProcessBitrate\n"
+"race:webrtc::VideoCodingModuleImpl::Decode\n"
+"race:webrtc::RTPSender::SendOutgoingData\n"
+"race:webrtc::VP8EncoderImpl::GetEncodedPartitions\n"
+"race:webrtc::VP8EncoderImpl::Encode\n"
+"race:webrtc::ViEEncoder::DeliverFrame\n"
+"race:webrtc::vcm::VideoReceiver::Decode\n"
+"race:webrtc::VCMReceiver::FrameForDecoding\n"
+"race:*trace_event_unique_catstatic*\n"
+
+// http://crbug.com/244856
+"race:AutoPulseLock\n"
+
+// http://crbug.com/246968
+"race:webrtc::VideoCodingModuleImpl::RegisterPacketRequestCallback\n"
+
+// http://crbug.com/246970
+"race:webrtc::EventPosix::StartTimer\n"
+
+// http://crbug.com/246974
+"race:content::GpuWatchdogThread::CheckArmed\n"
+
+// http://crbug.com/257396
+"race:base::debug::TraceEventTestFixture_TraceSamplingScope_Test::TestBody\n"
+
+// http://crbug.com/258479
+"race:SamplingStateScope\n"
+"race:g_trace_state\n"
+
+// http://crbug.com/258499
+"race:third_party/skia/include/core/SkRefCnt.h\n"
+
+// http://crbug.com/268924
+"race:base::g_power_monitor\n"
+"race:base::PowerMonitor::PowerMonitor\n"
+"race:base::PowerMonitor::AddObserver\n"
+
+// http://crbug.com/268941
+"race:tracked_objects::ThreadData::tls_index_\n"
+
+// http://crbug.com/270037
+"race:gLibCleanupFunctions\n"
+
+// http://crbug.com/272095
+"race:base::g_top_manager\n"
+
+// http://crbug.com/272987
+"race:webrtc::MediaStreamTrack<webrtc::AudioTrackInterface>::set_enabled\n"
+
+// http://crbug.com/273047
+"race:base::*::g_lazy_tls_ptr\n"
+"race:IPC::SyncChannel::ReceivedSyncMsgQueue::lazy_tls_ptr_\n"
+
+// http://crbug.com/280466
+"race:content::WebRtcAudioCapturer::SetCapturerSource\n"
+
+// http://crbug.com/285242
+"race:media::PulseAudioOutputStream::SetVolume\n"
+
+// http://crbug.com/290964
+"race:PostponeInterruptsScope\n"
+"race:v8::internal::StackGuard::RequestInstallCode\n"
+
+// http://crbug.com/296883
+"race:net::URLFetcherCore::Stop\n"
+
+// http://crbug.com/308590
+"race:CustomThreadWatcher::~CustomThreadWatcher\n"
+
+// http://crbug.com/310851
+"race:net::ProxyResolverV8Tracing::Job::~Job\n"
+
+// http://crbug.com/313726
+"race:CallbackWasCalled\n"
+
+// http://crbug.com/327330
+"race:PrepareTextureMailbox\n"
+"race:cc::LayerTreeHost::PaintLayerContents\n"
+
+// http://crbug.com/328804
+"race:v8::internal::Heap::SetStackLimits\n"
+"race:ScavengePointer\n"
+
+// http://crbug.com/328826
+"race:gLCDOrder\n"
+"race:gLCDOrientation\n"
+
+// http://crbug.com/328868
+"race:PR_Lock\n"
+
+// http://crbug.com/329225
+"race:blink::currentTimeFunction\n"
+
+// http://crbug.com/329460
+"race:extensions::InfoMap::AddExtension\n"
+
+// http://crbug.com/330528
+"race:v8::internal::MarkCompactCollector::SweepInParallel\n"
+
+// http://crbug.com/333244
+"race:content::"
+ "VideoCaptureImplTest::MockVideoCaptureImpl::~MockVideoCaptureImpl\n"
+
+// http://crbug.com/333871
+"race:v8::internal::Interface::NewValue()::value_interface\n"
+"race:v8::internal::IsMinusZero(double)::minus_zero\n"
+"race:v8::internal::FastCloneShallowObjectStub::InitializeInterfaceDescriptor\n"
+"race:v8::internal::KeyedLoadStubCompiler::registers\n"
+"race:v8::internal::KeyedStoreStubCompiler::registers()::registers\n"
+"race:v8::internal::KeyedLoadFastElementStub::InitializeInterfaceDescriptor\n"
+"race:v8::internal::KeyedStoreFastElementStub::InitializeInterfaceDescriptor\n"
+"race:v8::internal::LoadStubCompiler::registers\n"
+"race:v8::internal::StoreStubCompiler::registers\n"
+"race:v8::internal::HValue::LoopWeight\n"
+
+// http://crbug.com/334140
+"race:CommandLine::HasSwitch\n"
+"race:CommandLine::current_process_commandline_\n"
+"race:CommandLine::GetSwitchValueASCII\n"
+
+// http://crbug.com/338675
+"race:blink::s_platform\n"
+"race:content::"
+ "RendererWebKitPlatformSupportImpl::~RendererWebKitPlatformSupportImpl\n"
+
+// http://crbug.com/345240
+"race:WTF::s_shutdown\n"
+
+// http://crbug.com/345245
+"race:jingle_glue::JingleThreadWrapper::~JingleThreadWrapper\n"
+"race:webrtc::voe::Channel::UpdatePacketDelay\n"
+"race:webrtc::voe::Channel::GetDelayEstimate\n"
+"race:webrtc::VCMCodecDataBase::DeregisterReceiveCodec\n"
+"race:webrtc::GainControlImpl::set_stream_analog_level\n"
+
+// http://crbug.com/345618
+"race:WebCore::AudioDestinationNode::render\n"
+
+// http://crbug.com/345624
+"race:media::DataSource::set_host\n"
+
+// http://crbug.com/347534
+"race:v8::internal::V8::TearDown\n"
+
+// http://crbug.com/347538
+"race:sctp_timer_start\n"
+
+// http://crbug.com/347548
+"race:cricket::WebRtcVideoMediaChannel::MaybeResetVieSendCodec\n"
+"race:cricket::WebRtcVideoMediaChannel::SetSendCodec\n"
+
+// http://crbug.com/347553
+"race:blink::WebString::reset\n"
+
+// http://crbug.com/348511
+"race:webrtc::acm1::AudioCodingModuleImpl::PlayoutData10Ms\n"
+
+// http://crbug.com/348982
+"race:cricket::P2PTransportChannel::OnConnectionDestroyed\n"
+"race:cricket::P2PTransportChannel::AddConnection\n"
+
+// http://crbug.com/348984
+"race:sctp_express_handle_sack\n"
+
+// http://crbug.com/350982
+"race:libvpx/vp9/decoder/vp9_thread.c\n"
+
+// http://crbug.com/363999
+"race:v8::internal::EnterDebugger::*EnterDebugger\n"
+
+// http://crbug.com/364006
+"race:gfx::ImageFamily::~ImageFamily\n"
+
+// http://crbug.com/364014
+"race:WTF::Latin1Encoding()::globalLatin1Encoding\n"
+
+// https://code.google.com/p/v8/issues/detail?id=3143
+"race:v8::internal::FLAG_track_double_fields\n"
+
+// https://crbug.com/369257
+// TODO(mtklein): annotate properly and remove suppressions.
+"race:SandboxIPCHandler::HandleFontMatchRequest\n"
+"race:SkFontConfigInterfaceDirect::matchFamilyName\n"
+"race:SkFontConfigInterface::GetSingletonDirectInterface\n"
+"race:FcStrStaticName\n"
+
+// http://crbug.com/372807
+"deadlock:net::X509Certificate::CreateCertificateListFromBytes\n"
+"deadlock:net::X509Certificate::CreateFromBytes\n"
+"deadlock:net::SSLClientSocketNSS::Core::DoHandshakeLoop\n"
+
+// http://crbug.com/374135
+"race:media::AlsaWrapper::PcmWritei\n"
+
+// False positive in libc's tzset_internal, http://crbug.com/379738.
+"race:tzset_internal\n"
+
+// http://crbug.com/380554
+"deadlock:g_type_add_interface_static\n"
+
+// http:://crbug.com/386385
+"race:appcache::AppCacheStorageImpl::DatabaseTask::CallRunCompleted\n"
+
+// End of suppressions.
+; // Please keep this semicolon.
+
+#endif // THREAD_SANITIZER
diff --git a/chromium/base/file_descriptor_posix.h b/chromium/base/file_descriptor_posix.h
index abc07893faf..c730be65f74 100644
--- a/chromium/base/file_descriptor_posix.h
+++ b/chromium/base/file_descriptor_posix.h
@@ -5,6 +5,8 @@
#ifndef BASE_FILE_DESCRIPTOR_POSIX_H_
#define BASE_FILE_DESCRIPTOR_POSIX_H_
+#include "base/files/file.h"
+
namespace base {
// -----------------------------------------------------------------------------
@@ -16,18 +18,21 @@ namespace base {
// above the template specialisation for this structure.
// -----------------------------------------------------------------------------
struct FileDescriptor {
- FileDescriptor()
- : fd(-1),
- auto_close(false) { }
+ FileDescriptor() : fd(-1), auto_close(false) {}
+
+ FileDescriptor(int ifd, bool iauto_close) : fd(ifd), auto_close(iauto_close) {
+ }
- FileDescriptor(int ifd, bool iauto_close)
- : fd(ifd),
- auto_close(iauto_close) { }
+ FileDescriptor(File file) : fd(file.TakePlatformFile()), auto_close(true) {}
bool operator==(const FileDescriptor& other) const {
return (fd == other.fd && auto_close == other.auto_close);
}
+ bool operator!=(const FileDescriptor& other) const {
+ return !operator==(other);
+ }
+
// A comparison operator so that we can use these as keys in a std::map.
bool operator<(const FileDescriptor& other) const {
return other.fd < fd;
diff --git a/chromium/base/file_util.cc b/chromium/base/file_util.cc
index 1575a079d6b..d11cd15a2e0 100644
--- a/chromium/base/file_util.cc
+++ b/chromium/base/file_util.cc
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <fstream>
+#include <limits>
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
@@ -126,7 +127,11 @@ bool TextContentsEqual(const FilePath& filename1, const FilePath& filename2) {
return true;
}
-bool ReadFileToString(const FilePath& path, std::string* contents) {
+bool ReadFileToString(const FilePath& path,
+ std::string* contents,
+ size_t max_size) {
+ if (contents)
+ contents->clear();
if (path.ReferencesParent())
return false;
FILE* file = OpenFile(path, "rb");
@@ -136,13 +141,30 @@ bool ReadFileToString(const FilePath& path, std::string* contents) {
char buf[1 << 16];
size_t len;
+ size_t size = 0;
+ bool read_status = true;
+
+ // Many files supplied in |path| have incorrect size (proc files etc).
+ // Hence, the file is read sequentially as opposed to a one-shot read.
while ((len = fread(buf, 1, sizeof(buf), file)) > 0) {
if (contents)
- contents->append(buf, len);
+ contents->append(buf, std::min(len, max_size - size));
+
+ if ((max_size - size) < len) {
+ read_status = false;
+ break;
+ }
+
+ size += len;
}
+ read_status = read_status && !ferror(file);
CloseFile(file);
- return true;
+ return read_status;
+}
+
+bool ReadFileToString(const FilePath& path, std::string* contents) {
+ return ReadFileToString(path, contents, std::numeric_limits<size_t>::max());
}
bool IsDirectoryEmpty(const FilePath& dir_path) {
@@ -166,7 +188,7 @@ bool CreateDirectory(const FilePath& full_path) {
}
bool GetFileSize(const FilePath& file_path, int64* file_size) {
- PlatformFileInfo info;
+ File::Info info;
if (!GetFileInfo(file_path, &info))
return false;
*file_size = info.size;
@@ -176,22 +198,19 @@ bool GetFileSize(const FilePath& file_path, int64* file_size) {
bool TouchFile(const FilePath& path,
const Time& last_accessed,
const Time& last_modified) {
- int flags = PLATFORM_FILE_OPEN | PLATFORM_FILE_WRITE_ATTRIBUTES;
+ int flags = File::FLAG_OPEN | File::FLAG_WRITE_ATTRIBUTES;
#if defined(OS_WIN)
// On Windows, FILE_FLAG_BACKUP_SEMANTICS is needed to open a directory.
if (DirectoryExists(path))
- flags |= PLATFORM_FILE_BACKUP_SEMANTICS;
+ flags |= File::FLAG_BACKUP_SEMANTICS;
#endif // OS_WIN
- const PlatformFile file = CreatePlatformFile(path, flags, NULL, NULL);
- if (file != kInvalidPlatformFileValue) {
- bool result = TouchPlatformFile(file, last_accessed, last_modified);
- ClosePlatformFile(file);
- return result;
- }
+ File file(path, flags);
+ if (!file.IsValid())
+ return false;
- return false;
+ return file.SetTimes(last_accessed, last_modified);
}
bool CloseFile(FILE* file) {
@@ -218,18 +237,8 @@ bool TruncateFile(FILE* file) {
return true;
}
-} // namespace base
-
-// -----------------------------------------------------------------------------
-
-namespace file_util {
-
-using base::FilePath;
-using base::kMaxUniqueFiles;
-
-int GetUniquePathNumber(
- const FilePath& path,
- const FilePath::StringType& suffix) {
+int GetUniquePathNumber(const FilePath& path,
+ const FilePath::StringType& suffix) {
bool have_suffix = !suffix.empty();
if (!PathExists(path) &&
(!have_suffix || !PathExists(FilePath(path.value() + suffix)))) {
@@ -238,8 +247,7 @@ int GetUniquePathNumber(
FilePath new_path;
for (int count = 1; count <= kMaxUniqueFiles; ++count) {
- new_path =
- path.InsertBeforeExtensionASCII(base::StringPrintf(" (%d)", count));
+ new_path = path.InsertBeforeExtensionASCII(StringPrintf(" (%d)", count));
if (!PathExists(new_path) &&
(!have_suffix || !PathExists(FilePath(new_path.value() + suffix)))) {
return count;
@@ -249,4 +257,4 @@ int GetUniquePathNumber(
return -1;
}
-} // namespace file_util
+} // namespace base
diff --git a/chromium/base/file_util.h b/chromium/base/file_util.h
index 3f892e3ad14..bb04e629771 100644
--- a/chromium/base/file_util.h
+++ b/chromium/base/file_util.h
@@ -25,9 +25,9 @@
#include "base/base_export.h"
#include "base/basictypes.h"
+#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
-#include "base/platform_file.h"
#include "base/strings/string16.h"
#if defined(OS_POSIX)
@@ -93,10 +93,13 @@ BASE_EXPORT bool Move(const FilePath& from_path, const FilePath& to_path);
// Returns false on failure and sets *error appropriately, if it is non-NULL.
BASE_EXPORT bool ReplaceFile(const FilePath& from_path,
const FilePath& to_path,
- PlatformFileError* error);
+ File::Error* error);
// Copies a single file. Use CopyDirectory to copy directories.
// This function fails if either path contains traversal components ('..').
+//
+// This function keeps the metadata on Windows. The read only bit on Windows is
+// not kept.
BASE_EXPORT bool CopyFile(const FilePath& from_path, const FilePath& to_path);
// Copies the given path, and optionally all subdirectories and their contents
@@ -105,6 +108,9 @@ BASE_EXPORT bool CopyFile(const FilePath& from_path, const FilePath& to_path);
// If there are files existing under to_path, always overwrite. Returns true
// if successful, false otherwise. Wildcards on the names are not supported.
//
+// This function calls into CopyFile() so the same behavior w.r.t. metadata
+// applies.
+//
// If you only need to copy a file use CopyFile, it's faster.
BASE_EXPORT bool CopyDirectory(const FilePath& from_path,
const FilePath& to_path,
@@ -130,13 +136,28 @@ BASE_EXPORT bool ContentsEqual(const FilePath& filename1,
BASE_EXPORT bool TextContentsEqual(const FilePath& filename1,
const FilePath& filename2);
-// Read the file at |path| into |contents|, returning true on success.
-// This function fails if the |path| contains path traversal components ('..').
-// |contents| may be NULL, in which case this function is useful for its
-// side effect of priming the disk cache.
-// Useful for unit tests.
+// Reads the file at |path| into |contents| and returns true on success and
+// false on error. For security reasons, a |path| containing path traversal
+// components ('..') is treated as a read error and |contents| is set to empty.
+// In case of I/O error, |contents| holds the data that could be read from the
+// file before the error occurred.
+// |contents| may be NULL, in which case this function is useful for its side
+// effect of priming the disk cache (could be used for unit tests).
BASE_EXPORT bool ReadFileToString(const FilePath& path, std::string* contents);
+// Reads the file at |path| into |contents| and returns true on success and
+// false on error. For security reasons, a |path| containing path traversal
+// components ('..') is treated as a read error and |contents| is set to empty.
+// In case of I/O error, |contents| holds the data that could be read from the
+// file before the error occurred. When the file size exceeds |max_size|, the
+// function returns false with |contents| holding the file truncated to
+// |max_size|.
+// |contents| may be NULL, in which case this function is useful for its side
+// effect of priming the disk cache (could be used for unit tests).
+BASE_EXPORT bool ReadFileToString(const FilePath& path,
+ std::string* contents,
+ size_t max_size);
+
#if defined(OS_POSIX)
// Read exactly |bytes| bytes from file descriptor |fd|, storing the result
@@ -153,7 +174,7 @@ BASE_EXPORT bool CreateSymbolicLink(const FilePath& target,
// Returns false upon failure.
BASE_EXPORT bool ReadSymbolicLink(const FilePath& symlink, FilePath* target);
-// Bits ans masks of the file permission.
+// Bits and masks of the file permission.
enum FilePermissionBits {
FILE_PERMISSION_MASK = S_IRWXU | S_IRWXG | S_IRWXO,
FILE_PERMISSION_USER_MASK = S_IRWXU,
@@ -192,25 +213,13 @@ BASE_EXPORT bool IsDirectoryEmpty(const FilePath& dir_path);
// they're open (which can lead to security issues).
BASE_EXPORT bool GetTempDir(FilePath* path);
-// Get a temporary directory for shared memory files. The directory may depend
-// on whether the destination is intended for executable files, which in turn
-// depends on how /dev/shmem was mounted. As a result, you must supply whether
-// you intend to create executable shmem segments so this function can find
-// an appropriate location.
-//
-// Only useful on POSIX; redirects to GetTempDir() on Windows.
-BASE_EXPORT bool GetShmemTempDir(bool executable, FilePath* path);
-
-#if defined(OS_POSIX)
-// Get the home directory. This is more complicated than just getenv("HOME")
+// Get the home directory. This is more complicated than just getenv("HOME")
// as it knows to fall back on getpwent() etc.
//
-// This function is not currently implemented on Windows or Mac because we
-// don't use it. Generally you would use one of PathService's APP_DATA
-// directories on those platforms. If we need it, this could be implemented
-// there to return the appropriate directory.
+// You should not generally call this directly. Instead use DIR_HOME with the
+// path service which will use this function but cache the value.
+// Path service may also override DIR_HOME.
BASE_EXPORT FilePath GetHomeDir();
-#endif // OS_POSIX
// Creates a temporary file. The full path is placed in |path|, and the
// function returns true if was successful in creating the file. The file will
@@ -226,12 +235,6 @@ BASE_EXPORT bool CreateTemporaryFileInDir(const FilePath& dir,
// Returns a handle to the opened file or NULL if an error occurred.
BASE_EXPORT FILE* CreateAndOpenTemporaryFile(FilePath* path);
-// Like above but for shmem files. Only useful for POSIX.
-// The executable flag says the file needs to support using
-// mprotect with PROT_EXEC after mapping.
-BASE_EXPORT FILE* CreateAndOpenTemporaryShmemFile(FilePath* path,
- bool executable);
-
// Similar to CreateAndOpenTemporaryFile, but the file is created in |dir|.
BASE_EXPORT FILE* CreateAndOpenTemporaryFileInDir(const FilePath& dir,
FilePath* path);
@@ -256,7 +259,7 @@ BASE_EXPORT bool CreateTemporaryDirInDir(const FilePath& base_dir,
// Returns true on success, leaving *error unchanged.
// Returns false on failure and sets *error appropriately, if it is non-NULL.
BASE_EXPORT bool CreateDirectoryAndGetError(const FilePath& full_path,
- PlatformFileError* error);
+ File::Error* error);
// Backward-compatible convenience method for the above.
BASE_EXPORT bool CreateDirectory(const FilePath& full_path);
@@ -292,7 +295,7 @@ BASE_EXPORT bool NormalizeToNativeFilePath(const FilePath& path,
BASE_EXPORT bool IsLink(const FilePath& file_path);
// Returns information about the given file path.
-BASE_EXPORT bool GetFileInfo(const FilePath& file_path, PlatformFileInfo* info);
+BASE_EXPORT bool GetFileInfo(const FilePath& file_path, File::Info* info);
// Sets the time of the last access and the time of the last modification.
BASE_EXPORT bool TouchFile(const FilePath& path,
@@ -305,52 +308,45 @@ BASE_EXPORT FILE* OpenFile(const FilePath& filename, const char* mode);
// Closes file opened by OpenFile. Returns true on success.
BASE_EXPORT bool CloseFile(FILE* file);
+// Associates a standard FILE stream with an existing File. Note that this
+// functions take ownership of the existing File.
+BASE_EXPORT FILE* FileToFILE(File file, const char* mode);
+
// Truncates an open file to end at the location of the current file pointer.
// This is a cross-platform analog to Windows' SetEndOfFile() function.
BASE_EXPORT bool TruncateFile(FILE* file);
-// Reads the given number of bytes from the file into the buffer. Returns
-// the number of read bytes, or -1 on error.
-BASE_EXPORT int ReadFile(const base::FilePath& filename, char* data, int size);
-
-} // namespace base
-
-// -----------------------------------------------------------------------------
-
-namespace file_util {
+// Reads at most the given number of bytes from the file into the buffer.
+// Returns the number of read bytes, or -1 on error.
+BASE_EXPORT int ReadFile(const FilePath& filename, char* data, int max_size);
// Writes the given buffer into the file, overwriting any data that was
// previously there. Returns the number of bytes written, or -1 on error.
-BASE_EXPORT int WriteFile(const base::FilePath& filename, const char* data,
+BASE_EXPORT int WriteFile(const FilePath& filename, const char* data,
int size);
+
#if defined(OS_POSIX)
// Append the data to |fd|. Does not close |fd| when done.
BASE_EXPORT int WriteFileDescriptor(const int fd, const char* data, int size);
#endif
+
// Append the given buffer into the file. Returns the number of bytes written,
// or -1 on error.
-BASE_EXPORT int AppendToFile(const base::FilePath& filename,
+BASE_EXPORT int AppendToFile(const FilePath& filename,
const char* data, int size);
// Gets the current working directory for the process.
-BASE_EXPORT bool GetCurrentDirectory(base::FilePath* path);
+BASE_EXPORT bool GetCurrentDirectory(FilePath* path);
// Sets the current working directory for the process.
-BASE_EXPORT bool SetCurrentDirectory(const base::FilePath& path);
+BASE_EXPORT bool SetCurrentDirectory(const FilePath& path);
// Attempts to find a number that can be appended to the |path| to make it
// unique. If |path| does not exist, 0 is returned. If it fails to find such
// a number, -1 is returned. If |suffix| is not empty, also checks the
// existence of it with the given suffix.
-BASE_EXPORT int GetUniquePathNumber(const base::FilePath& path,
- const base::FilePath::StringType& suffix);
-
-#if defined(OS_POSIX)
-// Creates a directory with a guaranteed unique name based on |path|, returning
-// the pathname if successful, or an empty path if there was an error creating
-// the directory. Does not create parent directories.
-BASE_EXPORT base::FilePath MakeUniqueDirectory(const base::FilePath& path);
-#endif
+BASE_EXPORT int GetUniquePathNumber(const FilePath& path,
+ const FilePath::StringType& suffix);
#if defined(OS_POSIX)
// Test that |path| can only be changed by a given user and members of
@@ -385,33 +381,6 @@ BASE_EXPORT bool VerifyPathControlledByAdmin(const base::FilePath& path);
// the directory |path|, in the number of FilePath::CharType, or -1 on failure.
BASE_EXPORT int GetMaximumPathComponentLength(const base::FilePath& path);
-// A class to handle auto-closing of FILE*'s.
-class ScopedFILEClose {
- public:
- inline void operator()(FILE* x) const {
- if (x) {
- fclose(x);
- }
- }
-};
-
-typedef scoped_ptr_malloc<FILE, ScopedFILEClose> ScopedFILE;
-
-#if defined(OS_POSIX)
-// A class to handle auto-closing of FDs.
-class ScopedFDClose {
- public:
- inline void operator()(int* x) const {
- if (x && *x >= 0) {
- if (IGNORE_EINTR(close(*x)) < 0)
- DPLOG(ERROR) << "close";
- }
- }
-};
-
-typedef scoped_ptr_malloc<int, ScopedFDClose> ScopedFD;
-#endif // OS_POSIX
-
#if defined(OS_LINUX)
// Broad categories of file systems as returned by statfs() on Linux.
enum FileSystemType {
@@ -429,10 +398,35 @@ enum FileSystemType {
// Attempts determine the FileSystemType for |path|.
// Returns false if |path| doesn't exist.
-BASE_EXPORT bool GetFileSystemType(const base::FilePath& path,
- FileSystemType* type);
+BASE_EXPORT bool GetFileSystemType(const FilePath& path, FileSystemType* type);
#endif
+#if defined(OS_POSIX)
+// Get a temporary directory for shared memory files. The directory may depend
+// on whether the destination is intended for executable files, which in turn
+// depends on how /dev/shmem was mounted. As a result, you must supply whether
+// you intend to create executable shmem segments so this function can find
+// an appropriate location.
+BASE_EXPORT bool GetShmemTempDir(bool executable, FilePath* path);
+#endif
+
+} // namespace base
+
+// -----------------------------------------------------------------------------
+
+namespace file_util {
+
+// Functor for |ScopedFILE| (below).
+struct ScopedFILEClose {
+ inline void operator()(FILE* x) const {
+ if (x)
+ fclose(x);
+ }
+};
+
+// Automatically closes |FILE*|s.
+typedef scoped_ptr<FILE, ScopedFILEClose> ScopedFILE;
+
} // namespace file_util
// Internal --------------------------------------------------------------------
diff --git a/chromium/base/file_util_linux.cc b/chromium/base/file_util_linux.cc
index e4f0e28b129..2910c9cb4ec 100644
--- a/chromium/base/file_util_linux.cc
+++ b/chromium/base/file_util_linux.cc
@@ -4,14 +4,30 @@
#include "base/file_util.h"
-#include "base/files/file_path.h"
-
#include <errno.h>
+#include <linux/magic.h>
#include <sys/vfs.h>
-namespace file_util {
+#include "base/files/file_path.h"
+
+// Make sure some of the newer macros from magic.h are defined.
+// TODO(mostynb@opera.com): remove this after 2014.
+#ifndef BTRFS_SUPER_MAGIC
+#define BTRFS_SUPER_MAGIC 0x9123683E
+#endif
+#ifndef HUGETLBFS_MAGIC
+#define HUGETLBFS_MAGIC 0x958458f6
+#endif
+#ifndef RAMFS_MAGIC
+#define RAMFS_MAGIC 0x858458f6
+#endif
+#ifndef TMPFS_MAGIC
+#define TMPFS_MAGIC 0x01021994
+#endif
+
+namespace base {
-bool GetFileSystemType(const base::FilePath& path, FileSystemType* type) {
+bool GetFileSystemType(const FilePath& path, FileSystemType* type) {
struct statfs statfs_buf;
if (statfs(path.value().c_str(), &statfs_buf) < 0) {
if (errno == ENOENT)
@@ -20,37 +36,37 @@ bool GetFileSystemType(const base::FilePath& path, FileSystemType* type) {
return true;
}
- // While you would think the possible values of f_type would be available
- // in a header somewhere, it appears that is not the case. These values
- // are copied from the statfs man page.
+ // Not all possible |statfs_buf.f_type| values are in linux/magic.h.
+ // Missing values are copied from the statfs man page.
switch (statfs_buf.f_type) {
case 0:
*type = FILE_SYSTEM_0;
break;
- case 0xEF53: // ext2, ext3.
- case 0x4D44: // dos
- case 0x5346544E: // NFTS
- case 0x52654973: // reiser
+ case EXT2_SUPER_MAGIC: // Also ext3 and ext4
+ case MSDOS_SUPER_MAGIC:
+ case REISERFS_SUPER_MAGIC:
+ case BTRFS_SUPER_MAGIC:
+ case 0x5346544E: // NTFS
case 0x58465342: // XFS
- case 0x9123683E: // btrfs
case 0x3153464A: // JFS
*type = FILE_SYSTEM_ORDINARY;
break;
- case 0x6969: // NFS
+ case NFS_SUPER_MAGIC:
*type = FILE_SYSTEM_NFS;
break;
+ case SMB_SUPER_MAGIC:
case 0xFF534D42: // CIFS
- case 0x517B: // SMB
*type = FILE_SYSTEM_SMB;
break;
- case 0x73757245: // Coda
+ case CODA_SUPER_MAGIC:
*type = FILE_SYSTEM_CODA;
break;
- case 0x858458f6: // ramfs
- case 0x01021994: // tmpfs
+ case HUGETLBFS_MAGIC:
+ case RAMFS_MAGIC:
+ case TMPFS_MAGIC:
*type = FILE_SYSTEM_MEMORY;
break;
- case 0x27e0eb: // CGROUP
+ case CGROUP_SUPER_MAGIC:
*type = FILE_SYSTEM_CGROUP;
break;
default:
@@ -59,4 +75,4 @@ bool GetFileSystemType(const base::FilePath& path, FileSystemType* type) {
return true;
}
-} // namespace
+} // namespace base
diff --git a/chromium/base/file_util_mac.mm b/chromium/base/file_util_mac.mm
index f8a6b6301f5..4aa6d552a76 100644
--- a/chromium/base/file_util_mac.mm
+++ b/chromium/base/file_util_mac.mm
@@ -19,7 +19,7 @@ namespace internal {
bool CopyFileUnsafe(const FilePath& from_path, const FilePath& to_path) {
ThreadRestrictions::AssertIOAllowed();
return (copyfile(from_path.value().c_str(),
- to_path.value().c_str(), NULL, COPYFILE_ALL) == 0);
+ to_path.value().c_str(), NULL, COPYFILE_DATA) == 0);
}
} // namespace internal
@@ -32,8 +32,21 @@ bool GetTempDir(base::FilePath* path) {
return true;
}
-bool GetShmemTempDir(bool executable, base::FilePath* path) {
- return GetTempDir(path);
+FilePath GetHomeDir() {
+ NSString* tmp = NSHomeDirectory();
+ if (tmp != nil) {
+ FilePath mac_home_dir = base::mac::NSStringToFilePath(tmp);
+ if (!mac_home_dir.empty())
+ return mac_home_dir;
+ }
+
+ // Fall back on temp dir if no home directory is defined.
+ FilePath rv;
+ if (GetTempDir(&rv))
+ return rv;
+
+ // Last resort.
+ return FilePath("/tmp");
}
} // namespace base
diff --git a/chromium/base/file_util_posix.cc b/chromium/base/file_util_posix.cc
index ddcd5ddb912..92e8cad1605 100644
--- a/chromium/base/file_util_posix.cc
+++ b/chromium/base/file_util_posix.cc
@@ -33,6 +33,7 @@
#include "base/basictypes.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
+#include "base/files/scoped_file.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
@@ -60,8 +61,7 @@ namespace base {
namespace {
-#if defined(OS_BSD) || defined(OS_MACOSX)
-typedef struct stat stat_wrapper_t;
+#if defined(OS_BSD) || defined(OS_MACOSX) || defined(OS_NACL)
static int CallStat(const char *path, stat_wrapper_t *sb) {
ThreadRestrictions::AssertIOAllowed();
return stat(path, sb);
@@ -70,8 +70,7 @@ static int CallLstat(const char *path, stat_wrapper_t *sb) {
ThreadRestrictions::AssertIOAllowed();
return lstat(path, sb);
}
-#else
-typedef struct stat64 stat_wrapper_t;
+#else // defined(OS_BSD) || defined(OS_MACOSX) || defined(OS_NACL)
static int CallStat(const char *path, stat_wrapper_t *sb) {
ThreadRestrictions::AssertIOAllowed();
return stat64(path, sb);
@@ -80,13 +79,7 @@ static int CallLstat(const char *path, stat_wrapper_t *sb) {
ThreadRestrictions::AssertIOAllowed();
return lstat64(path, sb);
}
-#if defined(OS_ANDROID)
-static int CallFstat(int fd, stat_wrapper_t *sb) {
- ThreadRestrictions::AssertIOAllowed();
- return fstat64(fd, sb);
-}
-#endif
-#endif
+#endif // !(defined(OS_BSD) || defined(OS_MACOSX) || defined(OS_NACL))
// Helper for NormalizeFilePath(), defined below.
bool RealPath(const FilePath& path, FilePath* real_path) {
@@ -172,15 +165,15 @@ int CreateAndOpenFdForTemporaryFile(FilePath directory, FilePath* path) {
bool DetermineDevShmExecutable() {
bool result = false;
FilePath path;
- int fd = CreateAndOpenFdForTemporaryFile(FilePath("/dev/shm"), &path);
- if (fd >= 0) {
- file_util::ScopedFD shm_fd_closer(&fd);
+
+ ScopedFD fd(CreateAndOpenFdForTemporaryFile(FilePath("/dev/shm"), &path));
+ if (fd.is_valid()) {
DeleteFile(path, false);
long sysconf_result = sysconf(_SC_PAGESIZE);
CHECK_GE(sysconf_result, 0);
size_t pagesize = static_cast<size_t>(sysconf_result);
CHECK_GE(sizeof(pagesize), sizeof(sysconf_result));
- void *mapping = mmap(NULL, pagesize, PROT_READ, MAP_SHARED, fd, 0);
+ void* mapping = mmap(NULL, pagesize, PROT_READ, MAP_SHARED, fd.get(), 0);
if (mapping != MAP_FAILED) {
if (mprotect(mapping, pagesize, PROT_READ | PROT_EXEC) == 0)
result = true;
@@ -244,12 +237,12 @@ bool DeleteFile(const FilePath& path, bool recursive) {
bool ReplaceFile(const FilePath& from_path,
const FilePath& to_path,
- PlatformFileError* error) {
+ File::Error* error) {
ThreadRestrictions::AssertIOAllowed();
if (rename(from_path.value().c_str(), to_path.value().c_str()) == 0)
return true;
if (error)
- *error = ErrnoToPlatformFileError(errno);
+ *error = File::OSErrorToFileError(errno);
return false;
}
@@ -260,13 +253,10 @@ bool CopyDirectory(const FilePath& from_path,
// Some old callers of CopyDirectory want it to support wildcards.
// After some discussion, we decided to fix those callers.
// Break loudly here if anyone tries to do this.
- // TODO(evanm): remove this once we're sure it's ok.
DCHECK(to_path.value().find('*') == std::string::npos);
DCHECK(from_path.value().find('*') == std::string::npos);
- char top_dir[PATH_MAX];
- if (strlcpy(top_dir, from_path.value().c_str(),
- arraysize(top_dir)) >= arraysize(top_dir)) {
+ if (from_path.value().size() >= PATH_MAX) {
return false;
}
@@ -286,10 +276,10 @@ bool CopyDirectory(const FilePath& from_path,
return false;
if (real_to_path.value().size() >= real_from_path.value().size() &&
real_to_path.value().compare(0, real_from_path.value().size(),
- real_from_path.value()) == 0)
+ real_from_path.value()) == 0) {
return false;
+ }
- bool success = true;
int traverse_type = FileEnumerator::FILES | FileEnumerator::SHOW_SYM_LINKS;
if (recursive)
traverse_type |= FileEnumerator::DIRECTORIES;
@@ -302,7 +292,7 @@ bool CopyDirectory(const FilePath& from_path,
if (stat(from_path.value().c_str(), &from_stat) < 0) {
DLOG(ERROR) << "CopyDirectory() couldn't stat source directory: "
<< from_path.value() << " errno = " << errno;
- success = false;
+ return false;
}
struct stat to_path_stat;
FilePath from_path_base = from_path;
@@ -315,8 +305,10 @@ bool CopyDirectory(const FilePath& from_path,
// The Windows version of this function assumes that non-recursive calls
// will always have a directory for from_path.
+ // TODO(maruel): This is not necessary anymore.
DCHECK(recursive || S_ISDIR(from_stat.st_mode));
+ bool success = true;
while (success && !current.empty()) {
// current is the source path, including from_path, so append
// the suffix after from_path to to_path to create the target_path.
@@ -463,30 +455,14 @@ bool GetTempDir(FilePath* path) {
}
#endif // !defined(OS_MACOSX)
-#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
-// This is implemented in file_util_mac.mm and file_util_android.cc for those
-// platforms.
-bool GetShmemTempDir(bool executable, FilePath* path) {
-#if defined(OS_LINUX)
- bool use_dev_shm = true;
- if (executable) {
- static const bool s_dev_shm_executable = DetermineDevShmExecutable();
- use_dev_shm = s_dev_shm_executable;
- }
- if (use_dev_shm) {
- *path = FilePath("/dev/shm");
- return true;
- }
-#endif
- return GetTempDir(path);
-}
-#endif // !defined(OS_MACOSX) && !defined(OS_ANDROID)
-
-#if !defined(OS_MACOSX)
+#if !defined(OS_MACOSX) // Mac implementation is in file_util_mac.mm.
FilePath GetHomeDir() {
#if defined(OS_CHROMEOS)
- if (SysInfo::IsRunningOnChromeOS())
- return FilePath("/home/chronos/user");
+ if (SysInfo::IsRunningOnChromeOS()) {
+ // On Chrome OS chrome::DIR_USER_DATA is overridden with a primary user
+ // homedir once it becomes available. Return / as the safe option.
+ return FilePath("/");
+ }
#endif
const char* home_dir = getenv("HOME");
@@ -496,9 +472,12 @@ FilePath GetHomeDir() {
#if defined(OS_ANDROID)
DLOG(WARNING) << "OS_ANDROID: Home directory lookup not yet implemented.";
#elif defined(USE_GLIB) && !defined(OS_CHROMEOS)
- // g_get_home_dir calls getpwent, which can fall through to LDAP calls.
- ThreadRestrictions::AssertIOAllowed();
-
+ // g_get_home_dir calls getpwent, which can fall through to LDAP calls so
+ // this may do I/O. However, it should be rare that $HOME is not defined and
+ // this is typically called from the path service which has no threading
+ // restrictions. The path service will cache the result which limits the
+ // badness of blocking on I/O. As a result, we don't have a thread
+ // restriction here.
home_dir = g_get_home_dir();
if (home_dir && home_dir[0])
return FilePath(home_dir);
@@ -525,14 +504,6 @@ bool CreateTemporaryFile(FilePath* path) {
return true;
}
-FILE* CreateAndOpenTemporaryShmemFile(FilePath* path, bool executable) {
- FilePath directory;
- if (!GetShmemTempDir(executable, &directory))
- return NULL;
-
- return CreateAndOpenTemporaryFileInDir(directory, path);
-}
-
FILE* CreateAndOpenTemporaryFileInDir(const FilePath& dir, FilePath* path) {
int fd = CreateAndOpenFdForTemporaryFile(dir, path);
if (fd < 0)
@@ -589,7 +560,7 @@ bool CreateNewTempDirectory(const FilePath::StringType& prefix,
}
bool CreateDirectoryAndGetError(const FilePath& full_path,
- PlatformFileError* error) {
+ File::Error* error) {
ThreadRestrictions::AssertIOAllowed(); // For call to mkdir().
std::vector<FilePath> subpaths;
@@ -616,7 +587,7 @@ bool CreateDirectoryAndGetError(const FilePath& full_path,
int saved_errno = errno;
if (!DirectoryExists(*i)) {
if (error)
- *error = ErrnoToPlatformFileError(saved_errno);
+ *error = File::OSErrorToFileError(saved_errno);
return false;
}
}
@@ -654,16 +625,14 @@ bool IsLink(const FilePath& file_path) {
return false;
}
-bool GetFileInfo(const FilePath& file_path, PlatformFileInfo* results) {
+bool GetFileInfo(const FilePath& file_path, File::Info* results) {
stat_wrapper_t file_info;
#if defined(OS_ANDROID)
if (file_path.IsContentUri()) {
- int fd = OpenContentUriForRead(file_path);
- if (fd < 0)
- return false;
- file_util::ScopedFD scoped_fd(&fd);
- if (CallFstat(fd, &file_info) != 0)
+ File file = OpenContentUriForRead(file_path);
+ if (!file.IsValid())
return false;
+ return file.GetInfo(results);
} else {
#endif // defined(OS_ANDROID)
if (CallStat(file_path.value().c_str(), &file_info) != 0)
@@ -671,21 +640,8 @@ bool GetFileInfo(const FilePath& file_path, PlatformFileInfo* results) {
#if defined(OS_ANDROID)
}
#endif // defined(OS_ANDROID)
- results->is_directory = S_ISDIR(file_info.st_mode);
- results->size = file_info.st_size;
-#if defined(OS_MACOSX)
- results->last_modified = Time::FromTimeSpec(file_info.st_mtimespec);
- results->last_accessed = Time::FromTimeSpec(file_info.st_atimespec);
- results->creation_time = Time::FromTimeSpec(file_info.st_ctimespec);
-#elif defined(OS_ANDROID)
- results->last_modified = Time::FromTimeT(file_info.st_mtime);
- results->last_accessed = Time::FromTimeT(file_info.st_atime);
- results->creation_time = Time::FromTimeT(file_info.st_ctime);
-#else
- results->last_modified = Time::FromTimeSpec(file_info.st_mtim);
- results->last_accessed = Time::FromTimeSpec(file_info.st_atim);
- results->creation_time = Time::FromTimeSpec(file_info.st_ctim);
-#endif
+
+ results->FromStat(file_info);
return true;
}
@@ -698,65 +654,37 @@ FILE* OpenFile(const FilePath& filename, const char* mode) {
return result;
}
-int ReadFile(const FilePath& filename, char* data, int size) {
+// NaCl doesn't implement system calls to open files directly.
+#if !defined(OS_NACL)
+FILE* FileToFILE(File file, const char* mode) {
+ FILE* stream = fdopen(file.GetPlatformFile(), mode);
+ if (stream)
+ file.TakePlatformFile();
+ return stream;
+}
+#endif // !defined(OS_NACL)
+
+int ReadFile(const FilePath& filename, char* data, int max_size) {
ThreadRestrictions::AssertIOAllowed();
int fd = HANDLE_EINTR(open(filename.value().c_str(), O_RDONLY));
if (fd < 0)
return -1;
- ssize_t bytes_read = HANDLE_EINTR(read(fd, data, size));
- if (int ret = IGNORE_EINTR(close(fd)) < 0)
- return ret;
+ ssize_t bytes_read = HANDLE_EINTR(read(fd, data, max_size));
+ if (IGNORE_EINTR(close(fd)) < 0)
+ return -1;
return bytes_read;
}
-} // namespace base
-
-// -----------------------------------------------------------------------------
-
-namespace file_util {
-
-using base::stat_wrapper_t;
-using base::CallStat;
-using base::CallLstat;
-using base::CreateAndOpenFdForTemporaryFile;
-using base::DirectoryExists;
-using base::FileEnumerator;
-using base::FilePath;
-using base::MakeAbsoluteFilePath;
-using base::VerifySpecificPathControlledByUser;
-
-base::FilePath MakeUniqueDirectory(const base::FilePath& path) {
- const int kMaxAttempts = 20;
- for (int attempts = 0; attempts < kMaxAttempts; attempts++) {
- int uniquifier =
- GetUniquePathNumber(path, base::FilePath::StringType());
- if (uniquifier < 0)
- break;
- base::FilePath test_path = (uniquifier == 0) ? path :
- path.InsertBeforeExtensionASCII(
- base::StringPrintf(" (%d)", uniquifier));
- if (mkdir(test_path.value().c_str(), 0777) == 0)
- return test_path;
- else if (errno != EEXIST)
- break;
- }
- return base::FilePath();
-}
-
-FILE* OpenFile(const std::string& filename, const char* mode) {
- return OpenFile(FilePath(filename), mode);
-}
-
int WriteFile(const FilePath& filename, const char* data, int size) {
- base::ThreadRestrictions::AssertIOAllowed();
- int fd = HANDLE_EINTR(creat(filename.value().c_str(), 0666));
+ ThreadRestrictions::AssertIOAllowed();
+ int fd = HANDLE_EINTR(creat(filename.value().c_str(), 0640));
if (fd < 0)
return -1;
int bytes_written = WriteFileDescriptor(fd, data, size);
- if (int ret = IGNORE_EINTR(close(fd)) < 0)
- return ret;
+ if (IGNORE_EINTR(close(fd)) < 0)
+ return -1;
return bytes_written;
}
@@ -776,21 +704,21 @@ int WriteFileDescriptor(const int fd, const char* data, int size) {
}
int AppendToFile(const FilePath& filename, const char* data, int size) {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
int fd = HANDLE_EINTR(open(filename.value().c_str(), O_WRONLY | O_APPEND));
if (fd < 0)
return -1;
int bytes_written = WriteFileDescriptor(fd, data, size);
- if (int ret = IGNORE_EINTR(close(fd)) < 0)
- return ret;
+ if (IGNORE_EINTR(close(fd)) < 0)
+ return -1;
return bytes_written;
}
// Gets the current working directory for the process.
bool GetCurrentDirectory(FilePath* dir) {
// getcwd can return ENOENT, which implies it checks against the disk.
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
char system_buffer[PATH_MAX] = "";
if (!getcwd(system_buffer, sizeof(system_buffer))) {
@@ -803,7 +731,7 @@ bool GetCurrentDirectory(FilePath* dir) {
// Sets the current working directory for the process.
bool SetCurrentDirectory(const FilePath& path) {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
int ret = chdir(path.value().c_str());
return !ret;
}
@@ -859,7 +787,7 @@ bool VerifyPathControlledByAdmin(const FilePath& path) {
};
// Reading the groups database may touch the file system.
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
std::set<gid_t> allowed_group_ids;
for (int i = 0, ie = arraysize(kAdminGroupNames); i < ie; ++i) {
@@ -879,13 +807,30 @@ bool VerifyPathControlledByAdmin(const FilePath& path) {
#endif // defined(OS_MACOSX) && !defined(OS_IOS)
int GetMaximumPathComponentLength(const FilePath& path) {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
return pathconf(path.value().c_str(), _PC_NAME_MAX);
}
-} // namespace file_util
+#if !defined(OS_ANDROID)
+// This is implemented in file_util_android.cc for that platform.
+bool GetShmemTempDir(bool executable, FilePath* path) {
+#if defined(OS_LINUX)
+ bool use_dev_shm = true;
+ if (executable) {
+ static const bool s_dev_shm_executable = DetermineDevShmExecutable();
+ use_dev_shm = s_dev_shm_executable;
+ }
+ if (use_dev_shm) {
+ *path = FilePath("/dev/shm");
+ return true;
+ }
+#endif
+ return GetTempDir(path);
+}
+#endif // !defined(OS_ANDROID)
+
+// -----------------------------------------------------------------------------
-namespace base {
namespace internal {
bool MoveUnsafe(const FilePath& from_path, const FilePath& to_path) {
diff --git a/chromium/base/file_util_unittest.cc b/chromium/base/file_util_unittest.cc
index b65e171719f..239563d304e 100644
--- a/chromium/base/file_util_unittest.cc
+++ b/chromium/base/file_util_unittest.cc
@@ -12,14 +12,22 @@
#include <winioctl.h>
#endif
+#if defined(OS_POSIX)
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#endif
+
#include <algorithm>
#include <fstream>
#include <set>
+#include <vector>
#include "base/base_paths.h"
#include "base/file_util.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
+#include "base/files/scoped_file.h"
#include "base/files/scoped_temp_dir.h"
#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
@@ -485,25 +493,6 @@ TEST_F(FileUtilTest, DevicePathToDriveLetter) {
&win32_path));
}
-TEST_F(FileUtilTest, GetPlatformFileInfoForDirectory) {
- FilePath empty_dir = temp_dir_.path().Append(FPL("gpfi_test"));
- ASSERT_TRUE(CreateDirectory(empty_dir));
- win::ScopedHandle dir(
- ::CreateFile(empty_dir.value().c_str(),
- FILE_ALL_ACCESS,
- FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
- NULL,
- OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS, // Needed to open a directory.
- NULL));
- ASSERT_TRUE(dir.IsValid());
- PlatformFileInfo info;
- EXPECT_TRUE(GetPlatformFileInfo(dir.Get(), &info));
- EXPECT_TRUE(info.is_directory);
- EXPECT_FALSE(info.is_symbolic_link);
- EXPECT_EQ(0, info.size);
-}
-
TEST_F(FileUtilTest, CreateTemporaryFileInDirLongPathTest) {
// Test that CreateTemporaryFileInDir() creates a path and returns a long path
// if it is available. This test requires that:
@@ -643,6 +632,17 @@ TEST_F(FileUtilTest, DeleteNonExistent) {
ASSERT_FALSE(PathExists(non_existent));
}
+TEST_F(FileUtilTest, DeleteNonExistentWithNonExistentParent) {
+ FilePath non_existent = temp_dir_.path().AppendASCII("bogus_topdir");
+ non_existent = non_existent.AppendASCII("bogus_subdir");
+ ASSERT_FALSE(PathExists(non_existent));
+
+ EXPECT_TRUE(DeleteFile(non_existent, false));
+ ASSERT_FALSE(PathExists(non_existent));
+ EXPECT_TRUE(DeleteFile(non_existent, true));
+ ASSERT_FALSE(PathExists(non_existent));
+}
+
TEST_F(FileUtilTest, DeleteFile) {
// Create a file
FilePath file_name = temp_dir_.path().Append(FPL("Test DeleteFile 1.txt"));
@@ -716,7 +716,7 @@ TEST_F(FileUtilTest, ChangeFilePermissionsAndRead) {
// Write file.
EXPECT_EQ(static_cast<int>(kData.length()),
- file_util::WriteFile(file_name, kData.data(), kData.length()));
+ WriteFile(file_name, kData.data(), kData.length()));
EXPECT_TRUE(PathExists(file_name));
// Make sure the file is readable.
@@ -755,7 +755,7 @@ TEST_F(FileUtilTest, ChangeFilePermissionsAndWrite) {
// Write file.
EXPECT_EQ(static_cast<int>(kData.length()),
- file_util::WriteFile(file_name, kData.data(), kData.length()));
+ WriteFile(file_name, kData.data(), kData.length()));
EXPECT_TRUE(PathExists(file_name));
// Make sure the file is writable.
@@ -769,8 +769,7 @@ TEST_F(FileUtilTest, ChangeFilePermissionsAndWrite) {
EXPECT_TRUE(GetPosixFilePermissions(file_name, &mode));
EXPECT_FALSE(mode & FILE_PERMISSION_WRITE_BY_USER);
// Make sure the file can't be write.
- EXPECT_EQ(-1,
- file_util::WriteFile(file_name, kData.data(), kData.length()));
+ EXPECT_EQ(-1, WriteFile(file_name, kData.data(), kData.length()));
EXPECT_FALSE(PathIsWritable(file_name));
// Give read permission.
@@ -780,7 +779,7 @@ TEST_F(FileUtilTest, ChangeFilePermissionsAndWrite) {
EXPECT_TRUE(mode & FILE_PERMISSION_WRITE_BY_USER);
// Make sure the file can be write.
EXPECT_EQ(static_cast<int>(kData.length()),
- file_util::WriteFile(file_name, kData.data(), kData.length()));
+ WriteFile(file_name, kData.data(), kData.length()));
EXPECT_TRUE(PathIsWritable(file_name));
// Delete the file.
@@ -800,7 +799,7 @@ TEST_F(FileUtilTest, ChangeDirectoryPermissionsAndEnumerate) {
EXPECT_FALSE(PathExists(file_name));
const std::string kData("hello");
EXPECT_EQ(static_cast<int>(kData.length()),
- file_util::WriteFile(file_name, kData.data(), kData.length()));
+ WriteFile(file_name, kData.data(), kData.length()));
EXPECT_TRUE(PathExists(file_name));
// Make sure the directory has the all permissions.
@@ -817,7 +816,7 @@ TEST_F(FileUtilTest, ChangeDirectoryPermissionsAndEnumerate) {
FileEnumerator f1(subdir_path, true, FileEnumerator::FILES);
EXPECT_TRUE(PathExists(subdir_path));
FindResultCollector c1(f1);
- EXPECT_EQ(c1.size(), 0);
+ EXPECT_EQ(0, c1.size());
EXPECT_FALSE(GetPosixFilePermissions(file_name, &mode));
// Give the permissions to the directory.
@@ -829,7 +828,7 @@ TEST_F(FileUtilTest, ChangeDirectoryPermissionsAndEnumerate) {
FileEnumerator f2(subdir_path, true, FileEnumerator::FILES);
FindResultCollector c2(f2);
EXPECT_TRUE(c2.HasFile(file_name));
- EXPECT_EQ(c2.size(), 1);
+ EXPECT_EQ(1, c2.size());
// Delete the file.
EXPECT_TRUE(DeleteFile(subdir_path, true));
@@ -1379,6 +1378,60 @@ TEST_F(FileUtilTest, CopyDirectoryWithTrailingSeparators) {
EXPECT_TRUE(PathExists(file_name_to));
}
+// Sets the source file to read-only.
+void SetReadOnly(const FilePath& path) {
+#if defined(OS_WIN)
+ // On Windows, it involves setting a bit.
+ DWORD attrs = GetFileAttributes(path.value().c_str());
+ ASSERT_NE(INVALID_FILE_ATTRIBUTES, attrs);
+ ASSERT_TRUE(SetFileAttributes(
+ path.value().c_str(), attrs | FILE_ATTRIBUTE_READONLY));
+ attrs = GetFileAttributes(path.value().c_str());
+ // Files in the temporary directory should not be indexed ever. If this
+ // assumption change, fix this unit test accordingly.
+ // FILE_ATTRIBUTE_NOT_CONTENT_INDEXED doesn't exist on XP.
+ DWORD expected = FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_READONLY;
+ if (win::GetVersion() >= win::VERSION_VISTA)
+ expected |= FILE_ATTRIBUTE_NOT_CONTENT_INDEXED;
+ ASSERT_EQ(expected, attrs);
+#else
+ // On all other platforms, it involves removing the write bit.
+ EXPECT_TRUE(SetPosixFilePermissions(path, S_IRUSR));
+#endif
+}
+
+bool IsReadOnly(const FilePath& path) {
+#if defined(OS_WIN)
+ DWORD attrs = GetFileAttributes(path.value().c_str());
+ EXPECT_NE(INVALID_FILE_ATTRIBUTES, attrs);
+ return attrs & FILE_ATTRIBUTE_READONLY;
+#else
+ int mode = 0;
+ EXPECT_TRUE(GetPosixFilePermissions(path, &mode));
+ return !(mode & S_IWUSR);
+#endif
+}
+
+TEST_F(FileUtilTest, CopyDirectoryACL) {
+ // Create a directory.
+ FilePath src = temp_dir_.path().Append(FILE_PATH_LITERAL("src"));
+ CreateDirectory(src);
+ ASSERT_TRUE(PathExists(src));
+
+ // Create a file under the directory.
+ FilePath src_file = src.Append(FILE_PATH_LITERAL("src.txt"));
+ CreateTextFile(src_file, L"Gooooooooooooooooooooogle");
+ SetReadOnly(src_file);
+ ASSERT_TRUE(IsReadOnly(src_file));
+
+ // Copy the directory recursively.
+ FilePath dst = temp_dir_.path().Append(FILE_PATH_LITERAL("dst"));
+ FilePath dst_file = dst.Append(FILE_PATH_LITERAL("src.txt"));
+ EXPECT_TRUE(CopyDirectory(src, dst, true));
+
+ ASSERT_FALSE(IsReadOnly(dst_file));
+}
+
TEST_F(FileUtilTest, CopyFile) {
// Create a directory
FilePath dir_name_from =
@@ -1417,6 +1470,27 @@ TEST_F(FileUtilTest, CopyFile) {
EXPECT_TRUE(PathExists(dest_file2));
}
+TEST_F(FileUtilTest, CopyFileACL) {
+ // While FileUtilTest.CopyFile asserts the content is correctly copied over,
+ // this test case asserts the access control bits are meeting expectations in
+ // CopyFileUnsafe().
+ FilePath src = temp_dir_.path().Append(FILE_PATH_LITERAL("src.txt"));
+ const std::wstring file_contents(L"Gooooooooooooooooooooogle");
+ CreateTextFile(src, file_contents);
+
+ // Set the source file to read-only.
+ ASSERT_FALSE(IsReadOnly(src));
+ SetReadOnly(src);
+ ASSERT_TRUE(IsReadOnly(src));
+
+ // Copy the file.
+ FilePath dst = temp_dir_.path().Append(FILE_PATH_LITERAL("dst.txt"));
+ ASSERT_TRUE(CopyFile(src, dst));
+ EXPECT_EQ(file_contents, ReadTextFile(dst));
+
+ ASSERT_FALSE(IsReadOnly(dst));
+}
+
// file_util winds up using autoreleased objects on the Mac, so this needs
// to be a PlatformTest.
typedef PlatformTest ReadOnlyFileUtilTest;
@@ -1611,6 +1685,21 @@ TEST_F(FileUtilTest, CreateAndOpenTemporaryFileTest) {
}
}
+TEST_F(FileUtilTest, FileToFILE) {
+ File file;
+ FILE* stream = FileToFILE(file.Pass(), "w");
+ EXPECT_FALSE(stream);
+
+ FilePath file_name = temp_dir_.path().Append(FPL("The file.txt"));
+ file = File(file_name, File::FLAG_CREATE | File::FLAG_WRITE);
+ EXPECT_TRUE(file.IsValid());
+
+ stream = FileToFILE(file.Pass(), "w");
+ EXPECT_TRUE(stream);
+ EXPECT_FALSE(file.IsValid());
+ EXPECT_TRUE(CloseFile(stream));
+}
+
TEST_F(FileUtilTest, CreateNewTempDirectoryTest) {
FilePath temp_dir;
ASSERT_TRUE(CreateNewTempDirectory(FilePath::StringType(), &temp_dir));
@@ -1629,11 +1718,24 @@ TEST_F(FileUtilTest, CreateNewTemporaryDirInDirTest) {
EXPECT_TRUE(DeleteFile(new_dir, false));
}
+#if defined(OS_POSIX)
TEST_F(FileUtilTest, GetShmemTempDirTest) {
FilePath dir;
EXPECT_TRUE(GetShmemTempDir(false, &dir));
EXPECT_TRUE(DirectoryExists(dir));
}
+#endif
+
+TEST_F(FileUtilTest, GetHomeDirTest) {
+#if !defined(OS_ANDROID) // Not implemented on Android.
+ // We don't actually know what the home directory is supposed to be without
+ // calling some OS functions which would just duplicate the implementation.
+ // So here we just test that it returns something "reasonable".
+ FilePath home = GetHomeDir();
+ ASSERT_FALSE(home.empty());
+ ASSERT_TRUE(home.IsAbsolute());
+#endif
+}
TEST_F(FileUtilTest, CreateDirectoryTest) {
FilePath test_root =
@@ -1712,8 +1814,8 @@ TEST_F(FileUtilTest, DetectDirectoryTest) {
TEST_F(FileUtilTest, FileEnumeratorTest) {
// Test an empty directory.
FileEnumerator f0(temp_dir_.path(), true, FILES_AND_DIRECTORIES);
- EXPECT_EQ(f0.Next().value(), FPL(""));
- EXPECT_EQ(f0.Next().value(), FPL(""));
+ EXPECT_EQ(FPL(""), f0.Next().value());
+ EXPECT_EQ(FPL(""), f0.Next().value());
// Test an empty directory, non-recursively, including "..".
FileEnumerator f0_dotdot(temp_dir_.path(), false,
@@ -1749,7 +1851,7 @@ TEST_F(FileUtilTest, FileEnumeratorTest) {
EXPECT_TRUE(c1.HasFile(file2_abs));
EXPECT_TRUE(c1.HasFile(dir2file));
EXPECT_TRUE(c1.HasFile(dir2innerfile));
- EXPECT_EQ(c1.size(), 4);
+ EXPECT_EQ(4, c1.size());
// Only enumerate directories.
FileEnumerator f2(temp_dir_.path(), true, FileEnumerator::DIRECTORIES);
@@ -1757,7 +1859,7 @@ TEST_F(FileUtilTest, FileEnumeratorTest) {
EXPECT_TRUE(c2.HasFile(dir1));
EXPECT_TRUE(c2.HasFile(dir2));
EXPECT_TRUE(c2.HasFile(dir2inner));
- EXPECT_EQ(c2.size(), 3);
+ EXPECT_EQ(3, c2.size());
// Only enumerate directories non-recursively.
FileEnumerator f2_non_recursive(
@@ -1765,7 +1867,7 @@ TEST_F(FileUtilTest, FileEnumeratorTest) {
FindResultCollector c2_non_recursive(f2_non_recursive);
EXPECT_TRUE(c2_non_recursive.HasFile(dir1));
EXPECT_TRUE(c2_non_recursive.HasFile(dir2));
- EXPECT_EQ(c2_non_recursive.size(), 2);
+ EXPECT_EQ(2, c2_non_recursive.size());
// Only enumerate directories, non-recursively, including "..".
FileEnumerator f2_dotdot(temp_dir_.path(), false,
@@ -1775,7 +1877,7 @@ TEST_F(FileUtilTest, FileEnumeratorTest) {
EXPECT_TRUE(c2_dotdot.HasFile(dir1));
EXPECT_TRUE(c2_dotdot.HasFile(dir2));
EXPECT_TRUE(c2_dotdot.HasFile(temp_dir_.path().Append(FPL(".."))));
- EXPECT_EQ(c2_dotdot.size(), 3);
+ EXPECT_EQ(3, c2_dotdot.size());
// Enumerate files and directories.
FileEnumerator f3(temp_dir_.path(), true, FILES_AND_DIRECTORIES);
@@ -1787,7 +1889,7 @@ TEST_F(FileUtilTest, FileEnumeratorTest) {
EXPECT_TRUE(c3.HasFile(dir2file));
EXPECT_TRUE(c3.HasFile(dir2inner));
EXPECT_TRUE(c3.HasFile(dir2innerfile));
- EXPECT_EQ(c3.size(), 7);
+ EXPECT_EQ(7, c3.size());
// Non-recursive operation.
FileEnumerator f4(temp_dir_.path(), false, FILES_AND_DIRECTORIES);
@@ -1796,7 +1898,7 @@ TEST_F(FileUtilTest, FileEnumeratorTest) {
EXPECT_TRUE(c4.HasFile(dir2));
EXPECT_TRUE(c4.HasFile(file1));
EXPECT_TRUE(c4.HasFile(file2_abs));
- EXPECT_EQ(c4.size(), 4);
+ EXPECT_EQ(4, c4.size());
// Enumerate with a pattern.
FileEnumerator f5(temp_dir_.path(), true, FILES_AND_DIRECTORIES, FPL("dir*"));
@@ -1806,7 +1908,7 @@ TEST_F(FileUtilTest, FileEnumeratorTest) {
EXPECT_TRUE(c5.HasFile(dir2file));
EXPECT_TRUE(c5.HasFile(dir2inner));
EXPECT_TRUE(c5.HasFile(dir2innerfile));
- EXPECT_EQ(c5.size(), 5);
+ EXPECT_EQ(5, c5.size());
#if defined(OS_WIN)
{
@@ -1824,7 +1926,7 @@ TEST_F(FileUtilTest, FileEnumeratorTest) {
EXPECT_TRUE(c6.HasFile(inner2));
EXPECT_TRUE(c6.HasFile(inner2.Append(FPL("innerfile.txt"))));
EXPECT_TRUE(c6.HasFile(dir1.Append(FPL("dir2file.txt"))));
- EXPECT_EQ(c6.size(), 3);
+ EXPECT_EQ(3, c6.size());
}
// No changes for non recursive operation.
@@ -1834,7 +1936,7 @@ TEST_F(FileUtilTest, FileEnumeratorTest) {
EXPECT_TRUE(c7.HasFile(dir2));
EXPECT_TRUE(c7.HasFile(file1));
EXPECT_TRUE(c7.HasFile(file2_abs));
- EXPECT_EQ(c7.size(), 4);
+ EXPECT_EQ(4, c7.size());
// Should not enumerate inside dir1 when using recursion.
FileEnumerator f8(temp_dir_.path(), true, FILES_AND_DIRECTORIES);
@@ -1846,7 +1948,7 @@ TEST_F(FileUtilTest, FileEnumeratorTest) {
EXPECT_TRUE(c8.HasFile(dir2file));
EXPECT_TRUE(c8.HasFile(dir2inner));
EXPECT_TRUE(c8.HasFile(dir2innerfile));
- EXPECT_EQ(c8.size(), 7);
+ EXPECT_EQ(7, c8.size());
}
#endif
@@ -1875,16 +1977,117 @@ TEST_F(FileUtilTest, AppendToFile) {
FilePath foobar(data_dir.Append(FILE_PATH_LITERAL("foobar.txt")));
std::string data("hello");
- EXPECT_EQ(-1, file_util::AppendToFile(foobar, data.c_str(), data.length()));
+ EXPECT_EQ(-1, AppendToFile(foobar, data.c_str(), data.length()));
EXPECT_EQ(static_cast<int>(data.length()),
- file_util::WriteFile(foobar, data.c_str(), data.length()));
+ WriteFile(foobar, data.c_str(), data.length()));
EXPECT_EQ(static_cast<int>(data.length()),
- file_util::AppendToFile(foobar, data.c_str(), data.length()));
+ AppendToFile(foobar, data.c_str(), data.length()));
const std::wstring read_content = ReadTextFile(foobar);
EXPECT_EQ(L"hellohello", read_content);
}
+TEST_F(FileUtilTest, ReadFile) {
+ // Create a test file to be read.
+ const std::string kTestData("The quick brown fox jumps over the lazy dog.");
+ FilePath file_path =
+ temp_dir_.path().Append(FILE_PATH_LITERAL("ReadFileTest"));
+
+ ASSERT_EQ(static_cast<int>(kTestData.size()),
+ WriteFile(file_path, kTestData.data(), kTestData.size()));
+
+ // Make buffers with various size.
+ std::vector<char> small_buffer(kTestData.size() / 2);
+ std::vector<char> exact_buffer(kTestData.size());
+ std::vector<char> large_buffer(kTestData.size() * 2);
+
+ // Read the file with smaller buffer.
+ int bytes_read_small = ReadFile(
+ file_path, &small_buffer[0], static_cast<int>(small_buffer.size()));
+ EXPECT_EQ(static_cast<int>(small_buffer.size()), bytes_read_small);
+ EXPECT_EQ(
+ std::string(kTestData.begin(), kTestData.begin() + small_buffer.size()),
+ std::string(small_buffer.begin(), small_buffer.end()));
+
+ // Read the file with buffer which have exactly same size.
+ int bytes_read_exact = ReadFile(
+ file_path, &exact_buffer[0], static_cast<int>(exact_buffer.size()));
+ EXPECT_EQ(static_cast<int>(kTestData.size()), bytes_read_exact);
+ EXPECT_EQ(kTestData, std::string(exact_buffer.begin(), exact_buffer.end()));
+
+ // Read the file with larger buffer.
+ int bytes_read_large = ReadFile(
+ file_path, &large_buffer[0], static_cast<int>(large_buffer.size()));
+ EXPECT_EQ(static_cast<int>(kTestData.size()), bytes_read_large);
+ EXPECT_EQ(kTestData, std::string(large_buffer.begin(),
+ large_buffer.begin() + kTestData.size()));
+
+ // Make sure the return value is -1 if the file doesn't exist.
+ FilePath file_path_not_exist =
+ temp_dir_.path().Append(FILE_PATH_LITERAL("ReadFileNotExistTest"));
+ EXPECT_EQ(-1,
+ ReadFile(file_path_not_exist,
+ &exact_buffer[0],
+ static_cast<int>(exact_buffer.size())));
+}
+
+TEST_F(FileUtilTest, ReadFileToString) {
+ const char kTestData[] = "0123";
+ std::string data;
+
+ FilePath file_path =
+ temp_dir_.path().Append(FILE_PATH_LITERAL("ReadFileToStringTest"));
+ FilePath file_path_dangerous =
+ temp_dir_.path().Append(FILE_PATH_LITERAL("..")).
+ Append(temp_dir_.path().BaseName()).
+ Append(FILE_PATH_LITERAL("ReadFileToStringTest"));
+
+ // Create test file.
+ ASSERT_EQ(4, WriteFile(file_path, kTestData, 4));
+
+ EXPECT_TRUE(ReadFileToString(file_path, &data));
+ EXPECT_EQ(kTestData, data);
+
+ data = "temp";
+ EXPECT_FALSE(ReadFileToString(file_path, &data, 0));
+ EXPECT_EQ(0u, data.length());
+
+ data = "temp";
+ EXPECT_FALSE(ReadFileToString(file_path, &data, 2));
+ EXPECT_EQ("01", data);
+
+ data.clear();
+ EXPECT_FALSE(ReadFileToString(file_path, &data, 3));
+ EXPECT_EQ("012", data);
+
+ data.clear();
+ EXPECT_TRUE(ReadFileToString(file_path, &data, 4));
+ EXPECT_EQ("0123", data);
+
+ data.clear();
+ EXPECT_TRUE(ReadFileToString(file_path, &data, 6));
+ EXPECT_EQ("0123", data);
+
+ EXPECT_TRUE(ReadFileToString(file_path, NULL, 6));
+
+ EXPECT_TRUE(ReadFileToString(file_path, NULL));
+
+ data = "temp";
+ EXPECT_FALSE(ReadFileToString(file_path_dangerous, &data));
+ EXPECT_EQ(0u, data.length());
+
+ // Delete test file.
+ EXPECT_TRUE(base::DeleteFile(file_path, false));
+
+ data = "temp";
+ EXPECT_FALSE(ReadFileToString(file_path, &data));
+ EXPECT_EQ(0u, data.length());
+
+ data = "temp";
+ EXPECT_FALSE(ReadFileToString(file_path, &data, 6));
+ EXPECT_EQ(0u, data.length());
+}
+
TEST_F(FileUtilTest, TouchFile) {
FilePath data_dir =
temp_dir_.path().Append(FILE_PATH_LITERAL("FilePathTest"));
@@ -1897,13 +2100,13 @@ TEST_F(FileUtilTest, TouchFile) {
FilePath foobar(data_dir.Append(FILE_PATH_LITERAL("foobar.txt")));
std::string data("hello");
- ASSERT_TRUE(file_util::WriteFile(foobar, data.c_str(), data.length()));
+ ASSERT_TRUE(WriteFile(foobar, data.c_str(), data.length()));
Time access_time;
// This timestamp is divisible by one day (in local timezone),
// to make it work on FAT too.
ASSERT_TRUE(Time::FromString("Wed, 16 Nov 1994, 00:00:00",
- &access_time));
+ &access_time));
Time modification_time;
// Note that this timestamp is divisible by two (seconds) - FAT stores
@@ -1912,12 +2115,12 @@ TEST_F(FileUtilTest, TouchFile) {
&modification_time));
ASSERT_TRUE(TouchFile(foobar, access_time, modification_time));
- PlatformFileInfo file_info;
+ File::Info file_info;
ASSERT_TRUE(GetFileInfo(foobar, &file_info));
- EXPECT_EQ(file_info.last_accessed.ToInternalValue(),
- access_time.ToInternalValue());
- EXPECT_EQ(file_info.last_modified.ToInternalValue(),
- modification_time.ToInternalValue());
+ EXPECT_EQ(access_time.ToInternalValue(),
+ file_info.last_accessed.ToInternalValue());
+ EXPECT_EQ(modification_time.ToInternalValue(),
+ file_info.last_modified.ToInternalValue());
}
TEST_F(FileUtilTest, IsDirectoryEmpty) {
@@ -1931,7 +2134,7 @@ TEST_F(FileUtilTest, IsDirectoryEmpty) {
FilePath foo(empty_dir.Append(FILE_PATH_LITERAL("foo.txt")));
std::string bar("baz");
- ASSERT_TRUE(file_util::WriteFile(foo, bar.c_str(), bar.length()));
+ ASSERT_TRUE(WriteFile(foo, bar.c_str(), bar.length()));
EXPECT_FALSE(IsDirectoryEmpty(empty_dir));
}
@@ -2008,23 +2211,23 @@ TEST_F(VerifyPathControlledByUserTest, BadPaths) {
.AppendASCII("not")
.AppendASCII("exist");
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, does_not_exist, uid_, ok_gids_));
// |base| not a subpath of |path|.
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
sub_dir_, base_dir_, uid_, ok_gids_));
// An empty base path will fail to be a prefix for any path.
FilePath empty;
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
empty, base_dir_, uid_, ok_gids_));
// Finding that a bad call fails proves nothing unless a good call succeeds.
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, sub_dir_, uid_, ok_gids_));
}
@@ -2037,10 +2240,10 @@ TEST_F(VerifyPathControlledByUserTest, Symlinks) {
<< "Failed to create symlink.";
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, file_link, uid_, ok_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
file_link, file_link, uid_, ok_gids_));
// Symlink from one directory to another within the path.
@@ -2052,16 +2255,16 @@ TEST_F(VerifyPathControlledByUserTest, Symlinks) {
ASSERT_TRUE(PathExists(file_path_with_link));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, file_path_with_link, uid_, ok_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
link_to_sub_dir, file_path_with_link, uid_, ok_gids_));
// Symlinks in parents of base path are allowed.
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
file_path_with_link, file_path_with_link, uid_, ok_gids_));
}
@@ -2079,35 +2282,35 @@ TEST_F(VerifyPathControlledByUserTest, OwnershipChecks) {
// We control these paths.
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, sub_dir_, uid_, ok_gids_));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, text_file_, uid_, ok_gids_));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
sub_dir_, text_file_, uid_, ok_gids_));
// Another user does not control these paths.
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, sub_dir_, bad_uid, ok_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, text_file_, bad_uid, ok_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
sub_dir_, text_file_, bad_uid, ok_gids_));
// Another group does not control the paths.
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, sub_dir_, uid_, bad_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, text_file_, uid_, bad_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
sub_dir_, text_file_, uid_, bad_gids_));
}
@@ -2122,36 +2325,36 @@ TEST_F(VerifyPathControlledByUserTest, GroupWriteTest) {
// Any group is okay because the path is not group-writable.
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, sub_dir_, uid_, ok_gids_));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, text_file_, uid_, ok_gids_));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
sub_dir_, text_file_, uid_, ok_gids_));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, sub_dir_, uid_, bad_gids_));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, text_file_, uid_, bad_gids_));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
sub_dir_, text_file_, uid_, bad_gids_));
// No group is okay, because we don't check the group
// if no group can write.
std::set<gid_t> no_gids; // Empty set of gids.
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, sub_dir_, uid_, no_gids));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, text_file_, uid_, no_gids));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
sub_dir_, text_file_, uid_, no_gids));
@@ -2165,23 +2368,23 @@ TEST_F(VerifyPathControlledByUserTest, GroupWriteTest) {
// Now |ok_gids_| works, but |bad_gids_| fails.
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, sub_dir_, uid_, ok_gids_));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, text_file_, uid_, ok_gids_));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
sub_dir_, text_file_, uid_, ok_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, sub_dir_, uid_, bad_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, text_file_, uid_, bad_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
sub_dir_, text_file_, uid_, bad_gids_));
// Because any group in the group set is allowed,
@@ -2194,13 +2397,13 @@ TEST_F(VerifyPathControlledByUserTest, GroupWriteTest) {
std::inserter(multiple_gids, multiple_gids.begin()));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, sub_dir_, uid_, multiple_gids));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, text_file_, uid_, multiple_gids));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
sub_dir_, text_file_, uid_, multiple_gids));
}
@@ -2215,78 +2418,78 @@ TEST_F(VerifyPathControlledByUserTest, WriteBitChecks) {
// Initialy, we control all parts of the path.
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, sub_dir_, uid_, ok_gids_));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, text_file_, uid_, ok_gids_));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
sub_dir_, text_file_, uid_, ok_gids_));
// Make base_dir_ world-writable.
ASSERT_NO_FATAL_FAILURE(
ChangePosixFilePermissions(base_dir_, S_IWOTH, 0u));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, sub_dir_, uid_, ok_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, text_file_, uid_, ok_gids_));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
sub_dir_, text_file_, uid_, ok_gids_));
// Make sub_dir_ world writable.
ASSERT_NO_FATAL_FAILURE(
ChangePosixFilePermissions(sub_dir_, S_IWOTH, 0u));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, sub_dir_, uid_, ok_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, text_file_, uid_, ok_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
sub_dir_, text_file_, uid_, ok_gids_));
// Make text_file_ world writable.
ASSERT_NO_FATAL_FAILURE(
ChangePosixFilePermissions(text_file_, S_IWOTH, 0u));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, sub_dir_, uid_, ok_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, text_file_, uid_, ok_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
sub_dir_, text_file_, uid_, ok_gids_));
// Make sub_dir_ non-world writable.
ASSERT_NO_FATAL_FAILURE(
ChangePosixFilePermissions(sub_dir_, 0u, S_IWOTH));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, sub_dir_, uid_, ok_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, text_file_, uid_, ok_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
sub_dir_, text_file_, uid_, ok_gids_));
// Make base_dir_ non-world-writable.
ASSERT_NO_FATAL_FAILURE(
ChangePosixFilePermissions(base_dir_, 0u, S_IWOTH));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, sub_dir_, uid_, ok_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, text_file_, uid_, ok_gids_));
EXPECT_FALSE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
sub_dir_, text_file_, uid_, ok_gids_));
// Back to the initial state: Nothing is writable, so every path
@@ -2294,13 +2497,13 @@ TEST_F(VerifyPathControlledByUserTest, WriteBitChecks) {
ASSERT_NO_FATAL_FAILURE(
ChangePosixFilePermissions(text_file_, 0u, S_IWOTH));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, sub_dir_, uid_, ok_gids_));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
base_dir_, text_file_, uid_, ok_gids_));
EXPECT_TRUE(
- file_util::VerifyPathControlledByUser(
+ base::VerifyPathControlledByUser(
sub_dir_, text_file_, uid_, ok_gids_));
}
@@ -2329,9 +2532,9 @@ TEST_F(FileUtilTest, ValidContentUriTest) {
// We should be able to read the file.
char* buffer = new char[image_size];
- int fd = OpenContentUriForRead(path);
- EXPECT_LT(0, fd);
- EXPECT_TRUE(ReadFromFD(fd, buffer, image_size));
+ File file = OpenContentUriForRead(path);
+ EXPECT_TRUE(file.IsValid());
+ EXPECT_TRUE(file.ReadAtCurrentPos(buffer, image_size));
delete[] buffer;
}
@@ -2344,11 +2547,48 @@ TEST_F(FileUtilTest, NonExistentContentUriTest) {
EXPECT_FALSE(GetFileSize(path, &size));
// We should not be able to read the file.
- int fd = OpenContentUriForRead(path);
- EXPECT_EQ(-1, fd);
+ File file = OpenContentUriForRead(path);
+ EXPECT_FALSE(file.IsValid());
}
#endif
+TEST(ScopedFD, ScopedFDDoesClose) {
+ int fds[2];
+ char c = 0;
+ ASSERT_EQ(0, pipe(fds));
+ const int write_end = fds[1];
+ base::ScopedFD read_end_closer(fds[0]);
+ {
+ base::ScopedFD write_end_closer(fds[1]);
+ }
+ // This is the only thread. This file descriptor should no longer be valid.
+ int ret = close(write_end);
+ EXPECT_EQ(-1, ret);
+ EXPECT_EQ(EBADF, errno);
+ // Make sure read(2) won't block.
+ ASSERT_EQ(0, fcntl(fds[0], F_SETFL, O_NONBLOCK));
+ // Reading the pipe should EOF.
+ EXPECT_EQ(0, read(fds[0], &c, 1));
+}
+
+#if defined(GTEST_HAS_DEATH_TEST)
+void CloseWithScopedFD(int fd) {
+ base::ScopedFD fd_closer(fd);
+}
+#endif
+
+TEST(ScopedFD, ScopedFDCrashesOnCloseFailure) {
+ int fds[2];
+ ASSERT_EQ(0, pipe(fds));
+ base::ScopedFD read_end_closer(fds[0]);
+ EXPECT_EQ(0, IGNORE_EINTR(close(fds[1])));
+#if defined(GTEST_HAS_DEATH_TEST)
+ // This is the only thread. This file descriptor should no longer be valid.
+ // Trying to close it should crash. This is important for security.
+ EXPECT_DEATH(CloseWithScopedFD(fds[1]), "");
+#endif
+}
+
#endif // defined(OS_POSIX)
} // namespace
diff --git a/chromium/base/file_util_win.cc b/chromium/base/file_util_win.cc
index 44c1205aa65..e3cd1f83ac2 100644
--- a/chromium/base/file_util_win.cc
+++ b/chromium/base/file_util_win.cc
@@ -5,6 +5,7 @@
#include "base/file_util.h"
#include <windows.h>
+#include <io.h>
#include <psapi.h>
#include <shellapi.h>
#include <shlobj.h>
@@ -14,6 +15,7 @@
#include <limits>
#include <string>
+#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
@@ -34,44 +36,6 @@ namespace {
const DWORD kFileShareAll =
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE;
-bool ShellCopy(const FilePath& from_path,
- const FilePath& to_path,
- bool recursive) {
- // WinXP SHFileOperation doesn't like trailing separators.
- FilePath stripped_from = from_path.StripTrailingSeparators();
- FilePath stripped_to = to_path.StripTrailingSeparators();
-
- ThreadRestrictions::AssertIOAllowed();
-
- // NOTE: I suspect we could support longer paths, but that would involve
- // analyzing all our usage of files.
- if (stripped_from.value().length() >= MAX_PATH ||
- stripped_to.value().length() >= MAX_PATH) {
- return false;
- }
-
- // SHFILEOPSTRUCT wants the path to be terminated with two NULLs,
- // so we have to use wcscpy because wcscpy_s writes non-NULLs
- // into the rest of the buffer.
- wchar_t double_terminated_path_from[MAX_PATH + 1] = {0};
- wchar_t double_terminated_path_to[MAX_PATH + 1] = {0};
-#pragma warning(suppress:4996) // don't complain about wcscpy deprecation
- wcscpy(double_terminated_path_from, stripped_from.value().c_str());
-#pragma warning(suppress:4996) // don't complain about wcscpy deprecation
- wcscpy(double_terminated_path_to, stripped_to.value().c_str());
-
- SHFILEOPSTRUCT file_operation = {0};
- file_operation.wFunc = FO_COPY;
- file_operation.pFrom = double_terminated_path_from;
- file_operation.pTo = double_terminated_path_to;
- file_operation.fFlags = FOF_NOERRORUI | FOF_SILENT | FOF_NOCONFIRMATION |
- FOF_NOCONFIRMMKDIR;
- if (!recursive)
- file_operation.fFlags |= FOF_NORECURSION | FOF_FILESONLY;
-
- return (SHFileOperation(&file_operation) == 0);
-}
-
} // namespace
FilePath MakeAbsoluteFilePath(const FilePath& input) {
@@ -88,10 +52,15 @@ bool DeleteFile(const FilePath& path, bool recursive) {
if (path.value().length() >= MAX_PATH)
return false;
+ // On XP SHFileOperation will return ERROR_ACCESS_DENIED instead of
+ // ERROR_FILE_NOT_FOUND, so just shortcut this here.
+ if (path.empty())
+ return true;
+
if (!recursive) {
// If not recursing, then first check to see if |path| is a directory.
// If it is, then remove it with RemoveDirectory.
- PlatformFileInfo file_info;
+ File::Info file_info;
if (GetFileInfo(path, &file_info) && file_info.is_directory)
return RemoveDirectory(path.value().c_str()) != 0;
@@ -126,8 +95,10 @@ bool DeleteFile(const FilePath& path, bool recursive) {
// Some versions of Windows return ERROR_FILE_NOT_FOUND (0x2) when deleting
// an empty directory and some return 0x402 when they should be returning
- // ERROR_FILE_NOT_FOUND. MSDN says Vista and up won't return 0x402.
- return (err == 0 || err == ERROR_FILE_NOT_FOUND || err == 0x402);
+ // ERROR_FILE_NOT_FOUND. MSDN says Vista and up won't return 0x402. Windows 7
+ // can return DE_INVALIDFILES (0x7C) for nonexistent directories.
+ return (err == 0 || err == ERROR_FILE_NOT_FOUND || err == 0x402 ||
+ err == 0x7C);
}
bool DeleteFileAfterReboot(const FilePath& path) {
@@ -143,7 +114,7 @@ bool DeleteFileAfterReboot(const FilePath& path) {
bool ReplaceFile(const FilePath& from_path,
const FilePath& to_path,
- PlatformFileError* error) {
+ File::Error* error) {
ThreadRestrictions::AssertIOAllowed();
// Try a simple move first. It will only succeed when |to_path| doesn't
// already exist.
@@ -158,33 +129,99 @@ bool ReplaceFile(const FilePath& from_path,
return true;
}
if (error)
- *error = LastErrorToPlatformFileError(GetLastError());
+ *error = File::OSErrorToFileError(GetLastError());
return false;
}
bool CopyDirectory(const FilePath& from_path, const FilePath& to_path,
bool recursive) {
+ // NOTE(maruel): Previous version of this function used to call
+ // SHFileOperation(). This used to copy the file attributes and extended
+ // attributes, OLE structured storage, NTFS file system alternate data
+ // streams, SECURITY_DESCRIPTOR. In practice, this is not what we want, we
+ // want the containing directory to propagate its SECURITY_DESCRIPTOR.
ThreadRestrictions::AssertIOAllowed();
+ // NOTE: I suspect we could support longer paths, but that would involve
+ // analyzing all our usage of files.
+ if (from_path.value().length() >= MAX_PATH ||
+ to_path.value().length() >= MAX_PATH) {
+ return false;
+ }
+
+ // This function does not properly handle destinations within the source.
+ FilePath real_to_path = to_path;
+ if (PathExists(real_to_path)) {
+ real_to_path = MakeAbsoluteFilePath(real_to_path);
+ if (real_to_path.empty())
+ return false;
+ } else {
+ real_to_path = MakeAbsoluteFilePath(real_to_path.DirName());
+ if (real_to_path.empty())
+ return false;
+ }
+ FilePath real_from_path = MakeAbsoluteFilePath(from_path);
+ if (real_from_path.empty())
+ return false;
+ if (real_to_path.value().size() >= real_from_path.value().size() &&
+ real_to_path.value().compare(0, real_from_path.value().size(),
+ real_from_path.value()) == 0) {
+ return false;
+ }
+
+ int traverse_type = FileEnumerator::FILES;
if (recursive)
- return ShellCopy(from_path, to_path, true);
+ traverse_type |= FileEnumerator::DIRECTORIES;
+ FileEnumerator traversal(from_path, recursive, traverse_type);
+
+ if (!PathExists(from_path)) {
+ DLOG(ERROR) << "CopyDirectory() couldn't stat source directory: "
+ << from_path.value().c_str();
+ return false;
+ }
+ // TODO(maruel): This is not necessary anymore.
+ DCHECK(recursive || DirectoryExists(from_path));
+
+ FilePath current = from_path;
+ bool from_is_dir = DirectoryExists(from_path);
+ bool success = true;
+ FilePath from_path_base = from_path;
+ if (recursive && DirectoryExists(to_path)) {
+ // If the destination already exists and is a directory, then the
+ // top level of source needs to be copied.
+ from_path_base = from_path.DirName();
+ }
- // The following code assumes that from path is a directory.
- DCHECK(DirectoryExists(from_path));
+ while (success && !current.empty()) {
+ // current is the source path, including from_path, so append
+ // the suffix after from_path to to_path to create the target_path.
+ FilePath target_path(to_path);
+ if (from_path_base != current) {
+ if (!from_path_base.AppendRelativePath(current, &target_path)) {
+ success = false;
+ break;
+ }
+ }
+
+ if (from_is_dir) {
+ if (!DirectoryExists(target_path) &&
+ !::CreateDirectory(target_path.value().c_str(), NULL)) {
+ DLOG(ERROR) << "CopyDirectory() couldn't create directory: "
+ << target_path.value().c_str();
+ success = false;
+ }
+ } else if (!internal::CopyFileUnsafe(current, target_path)) {
+ DLOG(ERROR) << "CopyDirectory() couldn't create file: "
+ << target_path.value().c_str();
+ success = false;
+ }
- // Instead of creating a new directory, we copy the old one to include the
- // security information of the folder as part of the copy.
- if (!PathExists(to_path)) {
- // Except that Vista fails to do that, and instead do a recursive copy if
- // the target directory doesn't exist.
- if (base::win::GetVersion() >= base::win::VERSION_VISTA)
- CreateDirectory(to_path);
- else
- ShellCopy(from_path, to_path, false);
+ current = traversal.Next();
+ if (!current.empty())
+ from_is_dir = traversal.GetInfo().IsDirectory();
}
- FilePath directory = from_path.Append(L"*.*");
- return ShellCopy(directory, to_path, false);
+ return success;
}
bool PathExists(const FilePath& path) {
@@ -225,8 +262,21 @@ bool GetTempDir(FilePath* path) {
return true;
}
-bool GetShmemTempDir(bool executable, FilePath* path) {
- return GetTempDir(path);
+FilePath GetHomeDir() {
+ char16 result[MAX_PATH];
+ if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PROFILE, NULL, SHGFP_TYPE_CURRENT,
+ result)) &&
+ result[0]) {
+ return FilePath(result);
+ }
+
+ // Fall back to the temporary directory on failure.
+ FilePath temp;
+ if (GetTempDir(&temp))
+ return temp;
+
+ // Last resort.
+ return FilePath(L"C:\\");
}
bool CreateTemporaryFile(FilePath* path) {
@@ -245,11 +295,6 @@ bool CreateTemporaryFile(FilePath* path) {
return false;
}
-FILE* CreateAndOpenTemporaryShmemFile(FilePath* path, bool executable) {
- ThreadRestrictions::AssertIOAllowed();
- return CreateAndOpenTemporaryFile(path);
-}
-
// On POSIX we have semantics to create and open a temporary file
// atomically.
// TODO(jrg): is there equivalent call to use on Windows instead of
@@ -328,7 +373,7 @@ bool CreateNewTempDirectory(const FilePath::StringType& prefix,
}
bool CreateDirectoryAndGetError(const FilePath& full_path,
- PlatformFileError* error) {
+ File::Error* error) {
ThreadRestrictions::AssertIOAllowed();
// If the path exists, we've succeeded if it's a directory, failed otherwise.
@@ -343,7 +388,7 @@ bool CreateDirectoryAndGetError(const FilePath& full_path,
DLOG(WARNING) << "CreateDirectory(" << full_path_str << "), "
<< "conflicts with existing file.";
if (error) {
- *error = PLATFORM_FILE_ERROR_NOT_A_DIRECTORY;
+ *error = File::FILE_ERROR_NOT_A_DIRECTORY;
}
return false;
}
@@ -356,14 +401,14 @@ bool CreateDirectoryAndGetError(const FilePath& full_path,
FilePath parent_path(full_path.DirName());
if (parent_path.value() == full_path.value()) {
if (error) {
- *error = PLATFORM_FILE_ERROR_NOT_FOUND;
+ *error = File::FILE_ERROR_NOT_FOUND;
}
return false;
}
if (!CreateDirectoryAndGetError(parent_path, error)) {
DLOG(WARNING) << "Failed to create one of the parent directories.";
if (error) {
- DCHECK(*error != PLATFORM_FILE_OK);
+ DCHECK(*error != File::FILE_OK);
}
return false;
}
@@ -378,7 +423,7 @@ bool CreateDirectoryAndGetError(const FilePath& full_path,
return true;
} else {
if (error)
- *error = LastErrorToPlatformFileError(error_code);
+ *error = File::OSErrorToFileError(error_code);
DLOG(WARNING) << "Failed to create directory " << full_path_str
<< ", last error is " << error_code << ".";
return false;
@@ -505,7 +550,7 @@ bool IsLink(const FilePath& file_path) {
return false;
}
-bool GetFileInfo(const FilePath& file_path, PlatformFileInfo* results) {
+bool GetFileInfo(const FilePath& file_path, File::Info* results) {
ThreadRestrictions::AssertIOAllowed();
WIN32_FILE_ATTRIBUTE_DATA attr;
@@ -534,7 +579,21 @@ FILE* OpenFile(const FilePath& filename, const char* mode) {
return _wfsopen(filename.value().c_str(), w_mode.c_str(), _SH_DENYNO);
}
-int ReadFile(const FilePath& filename, char* data, int size) {
+FILE* FileToFILE(File file, const char* mode) {
+ if (!file.IsValid())
+ return NULL;
+ int fd =
+ _open_osfhandle(reinterpret_cast<intptr_t>(file.GetPlatformFile()), 0);
+ if (fd < 0)
+ return NULL;
+ file.TakePlatformFile();
+ FILE* stream = _fdopen(fd, mode);
+ if (!stream)
+ _close(fd);
+ return stream;
+}
+
+int ReadFile(const FilePath& filename, char* data, int max_size) {
ThreadRestrictions::AssertIOAllowed();
base::win::ScopedHandle file(CreateFile(filename.value().c_str(),
GENERIC_READ,
@@ -547,29 +606,14 @@ int ReadFile(const FilePath& filename, char* data, int size) {
return -1;
DWORD read;
- if (::ReadFile(file, data, size, &read, NULL) &&
- static_cast<int>(read) == size)
+ if (::ReadFile(file, data, max_size, &read, NULL))
return read;
- return -1;
-}
-
-} // namespace base
-
-// -----------------------------------------------------------------------------
-
-namespace file_util {
-
-using base::DirectoryExists;
-using base::FilePath;
-using base::kFileShareAll;
-FILE* OpenFile(const std::string& filename, const char* mode) {
- base::ThreadRestrictions::AssertIOAllowed();
- return _fsopen(filename.c_str(), mode, _SH_DENYNO);
+ return -1;
}
int WriteFile(const FilePath& filename, const char* data, int size) {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
base::win::ScopedHandle file(CreateFile(filename.value().c_str(),
GENERIC_WRITE,
0,
@@ -578,8 +622,8 @@ int WriteFile(const FilePath& filename, const char* data, int size) {
0,
NULL));
if (!file) {
- DLOG_GETLASTERROR(WARNING) << "CreateFile failed for path "
- << filename.value();
+ DPLOG(WARNING) << "CreateFile failed for path "
+ << UTF16ToUTF8(filename.value());
return -1;
}
@@ -590,18 +634,18 @@ int WriteFile(const FilePath& filename, const char* data, int size) {
if (!result) {
// WriteFile failed.
- DLOG_GETLASTERROR(WARNING) << "writing file " << filename.value()
- << " failed";
+ DPLOG(WARNING) << "writing file " << UTF16ToUTF8(filename.value())
+ << " failed";
} else {
// Didn't write all the bytes.
DLOG(WARNING) << "wrote" << written << " bytes to "
- << filename.value() << " expected " << size;
+ << UTF16ToUTF8(filename.value()) << " expected " << size;
}
return -1;
}
int AppendToFile(const FilePath& filename, const char* data, int size) {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
base::win::ScopedHandle file(CreateFile(filename.value().c_str(),
FILE_APPEND_DATA,
0,
@@ -610,8 +654,8 @@ int AppendToFile(const FilePath& filename, const char* data, int size) {
0,
NULL));
if (!file) {
- DLOG_GETLASTERROR(WARNING) << "CreateFile failed for path "
- << filename.value();
+ DPLOG(WARNING) << "CreateFile failed for path "
+ << UTF16ToUTF8(filename.value());
return -1;
}
@@ -622,19 +666,19 @@ int AppendToFile(const FilePath& filename, const char* data, int size) {
if (!result) {
// WriteFile failed.
- DLOG_GETLASTERROR(WARNING) << "writing file " << filename.value()
- << " failed";
+ DPLOG(WARNING) << "writing file " << UTF16ToUTF8(filename.value())
+ << " failed";
} else {
// Didn't write all the bytes.
DLOG(WARNING) << "wrote" << written << " bytes to "
- << filename.value() << " expected " << size;
+ << UTF16ToUTF8(filename.value()) << " expected " << size;
}
return -1;
}
// Gets the current working directory for the process.
bool GetCurrentDirectory(FilePath* dir) {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
wchar_t system_buffer[MAX_PATH];
system_buffer[0] = 0;
@@ -651,13 +695,13 @@ bool GetCurrentDirectory(FilePath* dir) {
// Sets the current working directory for the process.
bool SetCurrentDirectory(const FilePath& directory) {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
BOOL ret = ::SetCurrentDirectory(directory.value().c_str());
return ret != 0;
}
int GetMaximumPathComponentLength(const FilePath& path) {
- base::ThreadRestrictions::AssertIOAllowed();
+ ThreadRestrictions::AssertIOAllowed();
wchar_t volume_path[MAX_PATH];
if (!GetVolumePathNameW(path.NormalizePathSeparators().value().c_str(),
@@ -680,9 +724,8 @@ int GetMaximumPathComponentLength(const FilePath& path) {
return std::min(whole_path_limit, static_cast<int>(max_length));
}
-} // namespace file_util
+// -----------------------------------------------------------------------------
-namespace base {
namespace internal {
bool MoveUnsafe(const FilePath& from_path, const FilePath& to_path) {
@@ -728,8 +771,24 @@ bool CopyFileUnsafe(const FilePath& from_path, const FilePath& to_path) {
to_path.value().length() >= MAX_PATH) {
return false;
}
- return (::CopyFile(from_path.value().c_str(), to_path.value().c_str(),
- false) != 0);
+
+ // Unlike the posix implementation that copies the file manually and discards
+ // the ACL bits, CopyFile() copies the complete SECURITY_DESCRIPTOR and access
+ // bits, which is usually not what we want. We can't do much about the
+ // SECURITY_DESCRIPTOR but at least remove the read only bit.
+ const wchar_t* dest = to_path.value().c_str();
+ if (!::CopyFile(from_path.value().c_str(), dest, false)) {
+ // Copy failed.
+ return false;
+ }
+ DWORD attrs = GetFileAttributes(dest);
+ if (attrs == INVALID_FILE_ATTRIBUTES) {
+ return false;
+ }
+ if (attrs & FILE_ATTRIBUTE_READONLY) {
+ SetFileAttributes(dest, attrs & ~FILE_ATTRIBUTE_READONLY);
+ }
+ return true;
}
bool CopyAndDeleteDirectory(const FilePath& from_path,
diff --git a/chromium/base/file_version_info_mac.h b/chromium/base/file_version_info_mac.h
index f488cce4e58..f0edb3aea9f 100644
--- a/chromium/base/file_version_info_mac.h
+++ b/chromium/base/file_version_info_mac.h
@@ -23,27 +23,27 @@ class FileVersionInfoMac : public FileVersionInfo {
// Accessors to the different version properties.
// Returns an empty string if the property is not found.
- virtual string16 company_name() OVERRIDE;
- virtual string16 company_short_name() OVERRIDE;
- virtual string16 product_name() OVERRIDE;
- virtual string16 product_short_name() OVERRIDE;
- virtual string16 internal_name() OVERRIDE;
- virtual string16 product_version() OVERRIDE;
- virtual string16 private_build() OVERRIDE;
- virtual string16 special_build() OVERRIDE;
- virtual string16 comments() OVERRIDE;
- virtual string16 original_filename() OVERRIDE;
- virtual string16 file_description() OVERRIDE;
- virtual string16 file_version() OVERRIDE;
- virtual string16 legal_copyright() OVERRIDE;
- virtual string16 legal_trademarks() OVERRIDE;
- virtual string16 last_change() OVERRIDE;
+ virtual base::string16 company_name() OVERRIDE;
+ virtual base::string16 company_short_name() OVERRIDE;
+ virtual base::string16 product_name() OVERRIDE;
+ virtual base::string16 product_short_name() OVERRIDE;
+ virtual base::string16 internal_name() OVERRIDE;
+ virtual base::string16 product_version() OVERRIDE;
+ virtual base::string16 private_build() OVERRIDE;
+ virtual base::string16 special_build() OVERRIDE;
+ virtual base::string16 comments() OVERRIDE;
+ virtual base::string16 original_filename() OVERRIDE;
+ virtual base::string16 file_description() OVERRIDE;
+ virtual base::string16 file_version() OVERRIDE;
+ virtual base::string16 legal_copyright() OVERRIDE;
+ virtual base::string16 legal_trademarks() OVERRIDE;
+ virtual base::string16 last_change() OVERRIDE;
virtual bool is_official_build() OVERRIDE;
private:
- // Returns a string16 value for a property name.
+ // Returns a base::string16 value for a property name.
// Returns the empty string if the property does not exist.
- string16 GetString16Value(CFStringRef name);
+ base::string16 GetString16Value(CFStringRef name);
base::scoped_nsobject<NSBundle> bundle_;
diff --git a/chromium/base/file_version_info_mac.mm b/chromium/base/file_version_info_mac.mm
index 0c6f8d4d3ca..3b5a8ba9bf8 100644
--- a/chromium/base/file_version_info_mac.mm
+++ b/chromium/base/file_version_info_mac.mm
@@ -31,35 +31,35 @@ FileVersionInfo* FileVersionInfo::CreateFileVersionInfo(
return new FileVersionInfoMac(bundle);
}
-string16 FileVersionInfoMac::company_name() {
- return string16();
+base::string16 FileVersionInfoMac::company_name() {
+ return base::string16();
}
-string16 FileVersionInfoMac::company_short_name() {
- return string16();
+base::string16 FileVersionInfoMac::company_short_name() {
+ return base::string16();
}
-string16 FileVersionInfoMac::internal_name() {
- return string16();
+base::string16 FileVersionInfoMac::internal_name() {
+ return base::string16();
}
-string16 FileVersionInfoMac::product_name() {
+base::string16 FileVersionInfoMac::product_name() {
return GetString16Value(kCFBundleNameKey);
}
-string16 FileVersionInfoMac::product_short_name() {
+base::string16 FileVersionInfoMac::product_short_name() {
return GetString16Value(kCFBundleNameKey);
}
-string16 FileVersionInfoMac::comments() {
- return string16();
+base::string16 FileVersionInfoMac::comments() {
+ return base::string16();
}
-string16 FileVersionInfoMac::legal_copyright() {
+base::string16 FileVersionInfoMac::legal_copyright() {
return GetString16Value(CFSTR("CFBundleGetInfoString"));
}
-string16 FileVersionInfoMac::product_version() {
+base::string16 FileVersionInfoMac::product_version() {
// On OS X, CFBundleVersion is used by LaunchServices, and must follow
// specific formatting rules, so the four-part Chrome version is in
// CFBundleShortVersionString. On iOS, however, CFBundleVersion can be the
@@ -72,31 +72,31 @@ string16 FileVersionInfoMac::product_version() {
#endif // defined(OS_IOS)
}
-string16 FileVersionInfoMac::file_description() {
- return string16();
+base::string16 FileVersionInfoMac::file_description() {
+ return base::string16();
}
-string16 FileVersionInfoMac::legal_trademarks() {
- return string16();
+base::string16 FileVersionInfoMac::legal_trademarks() {
+ return base::string16();
}
-string16 FileVersionInfoMac::private_build() {
- return string16();
+base::string16 FileVersionInfoMac::private_build() {
+ return base::string16();
}
-string16 FileVersionInfoMac::file_version() {
+base::string16 FileVersionInfoMac::file_version() {
return product_version();
}
-string16 FileVersionInfoMac::original_filename() {
+base::string16 FileVersionInfoMac::original_filename() {
return GetString16Value(kCFBundleNameKey);
}
-string16 FileVersionInfoMac::special_build() {
- return string16();
+base::string16 FileVersionInfoMac::special_build() {
+ return base::string16();
}
-string16 FileVersionInfoMac::last_change() {
+base::string16 FileVersionInfoMac::last_change() {
return GetString16Value(CFSTR("SCMRevision"));
}
@@ -108,7 +108,7 @@ bool FileVersionInfoMac::is_official_build() {
#endif
}
-string16 FileVersionInfoMac::GetString16Value(CFStringRef name) {
+base::string16 FileVersionInfoMac::GetString16Value(CFStringRef name) {
if (bundle_) {
NSString *ns_name = base::mac::CFToNSCast(name);
NSString* value = [bundle_ objectForInfoDictionaryKey:ns_name];
@@ -116,5 +116,5 @@ string16 FileVersionInfoMac::GetString16Value(CFStringRef name) {
return base::SysNSStringToUTF16(value);
}
}
- return string16();
+ return base::string16();
}
diff --git a/chromium/base/file_version_info_win.cc b/chromium/base/file_version_info_win.cc
index 80dbaeaadbf..5f33d1470f1 100644
--- a/chromium/base/file_version_info_win.cc
+++ b/chromium/base/file_version_info_win.cc
@@ -81,63 +81,63 @@ FileVersionInfo* FileVersionInfo::CreateFileVersionInfo(
}
}
-string16 FileVersionInfoWin::company_name() {
+base::string16 FileVersionInfoWin::company_name() {
return GetStringValue(L"CompanyName");
}
-string16 FileVersionInfoWin::company_short_name() {
+base::string16 FileVersionInfoWin::company_short_name() {
return GetStringValue(L"CompanyShortName");
}
-string16 FileVersionInfoWin::internal_name() {
+base::string16 FileVersionInfoWin::internal_name() {
return GetStringValue(L"InternalName");
}
-string16 FileVersionInfoWin::product_name() {
+base::string16 FileVersionInfoWin::product_name() {
return GetStringValue(L"ProductName");
}
-string16 FileVersionInfoWin::product_short_name() {
+base::string16 FileVersionInfoWin::product_short_name() {
return GetStringValue(L"ProductShortName");
}
-string16 FileVersionInfoWin::comments() {
+base::string16 FileVersionInfoWin::comments() {
return GetStringValue(L"Comments");
}
-string16 FileVersionInfoWin::legal_copyright() {
+base::string16 FileVersionInfoWin::legal_copyright() {
return GetStringValue(L"LegalCopyright");
}
-string16 FileVersionInfoWin::product_version() {
+base::string16 FileVersionInfoWin::product_version() {
return GetStringValue(L"ProductVersion");
}
-string16 FileVersionInfoWin::file_description() {
+base::string16 FileVersionInfoWin::file_description() {
return GetStringValue(L"FileDescription");
}
-string16 FileVersionInfoWin::legal_trademarks() {
+base::string16 FileVersionInfoWin::legal_trademarks() {
return GetStringValue(L"LegalTrademarks");
}
-string16 FileVersionInfoWin::private_build() {
+base::string16 FileVersionInfoWin::private_build() {
return GetStringValue(L"PrivateBuild");
}
-string16 FileVersionInfoWin::file_version() {
+base::string16 FileVersionInfoWin::file_version() {
return GetStringValue(L"FileVersion");
}
-string16 FileVersionInfoWin::original_filename() {
+base::string16 FileVersionInfoWin::original_filename() {
return GetStringValue(L"OriginalFilename");
}
-string16 FileVersionInfoWin::special_build() {
+base::string16 FileVersionInfoWin::special_build() {
return GetStringValue(L"SpecialBuild");
}
-string16 FileVersionInfoWin::last_change() {
+base::string16 FileVersionInfoWin::last_change() {
return GetStringValue(L"LastChange");
}
diff --git a/chromium/base/file_version_info_win.h b/chromium/base/file_version_info_win.h
index a37857783a9..d623c454261 100644
--- a/chromium/base/file_version_info_win.h
+++ b/chromium/base/file_version_info_win.h
@@ -22,21 +22,21 @@ class FileVersionInfoWin : public FileVersionInfo {
// Accessors to the different version properties.
// Returns an empty string if the property is not found.
- virtual string16 company_name() OVERRIDE;
- virtual string16 company_short_name() OVERRIDE;
- virtual string16 product_name() OVERRIDE;
- virtual string16 product_short_name() OVERRIDE;
- virtual string16 internal_name() OVERRIDE;
- virtual string16 product_version() OVERRIDE;
- virtual string16 private_build() OVERRIDE;
- virtual string16 special_build() OVERRIDE;
- virtual string16 comments() OVERRIDE;
- virtual string16 original_filename() OVERRIDE;
- virtual string16 file_description() OVERRIDE;
- virtual string16 file_version() OVERRIDE;
- virtual string16 legal_copyright() OVERRIDE;
- virtual string16 legal_trademarks() OVERRIDE;
- virtual string16 last_change() OVERRIDE;
+ virtual base::string16 company_name() OVERRIDE;
+ virtual base::string16 company_short_name() OVERRIDE;
+ virtual base::string16 product_name() OVERRIDE;
+ virtual base::string16 product_short_name() OVERRIDE;
+ virtual base::string16 internal_name() OVERRIDE;
+ virtual base::string16 product_version() OVERRIDE;
+ virtual base::string16 private_build() OVERRIDE;
+ virtual base::string16 special_build() OVERRIDE;
+ virtual base::string16 comments() OVERRIDE;
+ virtual base::string16 original_filename() OVERRIDE;
+ virtual base::string16 file_description() OVERRIDE;
+ virtual base::string16 file_version() OVERRIDE;
+ virtual base::string16 legal_copyright() OVERRIDE;
+ virtual base::string16 legal_trademarks() OVERRIDE;
+ virtual base::string16 last_change() OVERRIDE;
virtual bool is_official_build() OVERRIDE;
// Lets you access other properties not covered above.
@@ -50,7 +50,7 @@ class FileVersionInfoWin : public FileVersionInfo {
VS_FIXEDFILEINFO* fixed_file_info() { return fixed_file_info_; }
private:
- scoped_ptr_malloc<char> data_;
+ scoped_ptr<char, base::FreeDeleter> data_;
int language_;
int code_page_;
// This is a pointer into the data_ if it exists. Otherwise NULL.
diff --git a/chromium/base/files/OWNERS b/chromium/base/files/OWNERS
index 7260260bb41..b99e8a2fc7a 100644
--- a/chromium/base/files/OWNERS
+++ b/chromium/base/files/OWNERS
@@ -1,2 +1,3 @@
-# for file_path_watcher*
-mnissler@chromium.org
+rvargas@chromium.org
+
+per-file file_path_watcher*=mnissler@chromium.org
diff --git a/chromium/base/files/file.cc b/chromium/base/files/file.cc
index 4902f15a2ff..bfe87bdcc4d 100644
--- a/chromium/base/files/file.cc
+++ b/chromium/base/files/file.cc
@@ -20,7 +20,7 @@ File::Info::~Info() {
File::File()
: file_(kInvalidPlatformFileValue),
- error_(FILE_OK),
+ error_details_(FILE_ERROR_FAILED),
created_(false),
async_(false) {
}
@@ -28,25 +28,39 @@ File::File()
#if !defined(OS_NACL)
File::File(const FilePath& name, uint32 flags)
: file_(kInvalidPlatformFileValue),
- error_(FILE_OK),
+ error_details_(FILE_OK),
created_(false),
async_(false) {
- if (name.ReferencesParent()) {
- error_ = FILE_ERROR_ACCESS_DENIED;
- return;
- }
- CreateBaseFileUnsafe(name, flags);
+ Initialize(name, flags);
}
#endif
+File::File(PlatformFile platform_file)
+ : file_(platform_file),
+ error_details_(FILE_OK),
+ created_(false),
+ async_(false) {
+#if defined(OS_POSIX)
+ DCHECK_GE(platform_file, -1);
+#endif
+}
+
+File::File(Error error_details)
+ : file_(kInvalidPlatformFileValue),
+ error_details_(error_details),
+ created_(false),
+ async_(false) {
+}
+
File::File(RValue other)
: file_(other.object->TakePlatformFile()),
- error_(other.object->error()),
+ error_details_(other.object->error_details()),
created_(other.object->created()),
async_(other.object->async_) {
}
File::~File() {
+ // Go through the AssertIOAllowed logic.
Close();
}
@@ -54,11 +68,65 @@ File& File::operator=(RValue other) {
if (this != other.object) {
Close();
SetPlatformFile(other.object->TakePlatformFile());
- error_ = other.object->error();
+ error_details_ = other.object->error_details();
created_ = other.object->created();
async_ = other.object->async_;
}
return *this;
}
+#if !defined(OS_NACL)
+void File::Initialize(const FilePath& name, uint32 flags) {
+ if (name.ReferencesParent()) {
+ error_details_ = FILE_ERROR_ACCESS_DENIED;
+ return;
+ }
+ InitializeUnsafe(name, flags);
+}
+#endif
+
+std::string File::ErrorToString(Error error) {
+ switch (error) {
+ case FILE_OK:
+ return "FILE_OK";
+ case FILE_ERROR_FAILED:
+ return "FILE_ERROR_FAILED";
+ case FILE_ERROR_IN_USE:
+ return "FILE_ERROR_IN_USE";
+ case FILE_ERROR_EXISTS:
+ return "FILE_ERROR_EXISTS";
+ case FILE_ERROR_NOT_FOUND:
+ return "FILE_ERROR_NOT_FOUND";
+ case FILE_ERROR_ACCESS_DENIED:
+ return "FILE_ERROR_ACCESS_DENIED";
+ case FILE_ERROR_TOO_MANY_OPENED:
+ return "FILE_ERROR_TOO_MANY_OPENED";
+ case FILE_ERROR_NO_MEMORY:
+ return "FILE_ERROR_NO_MEMORY";
+ case FILE_ERROR_NO_SPACE:
+ return "FILE_ERROR_NO_SPACE";
+ case FILE_ERROR_NOT_A_DIRECTORY:
+ return "FILE_ERROR_NOT_A_DIRECTORY";
+ case FILE_ERROR_INVALID_OPERATION:
+ return "FILE_ERROR_INVALID_OPERATION";
+ case FILE_ERROR_SECURITY:
+ return "FILE_ERROR_SECURITY";
+ case FILE_ERROR_ABORT:
+ return "FILE_ERROR_ABORT";
+ case FILE_ERROR_NOT_A_FILE:
+ return "FILE_ERROR_NOT_A_FILE";
+ case FILE_ERROR_NOT_EMPTY:
+ return "FILE_ERROR_NOT_EMPTY";
+ case FILE_ERROR_INVALID_URL:
+ return "FILE_ERROR_INVALID_URL";
+ case FILE_ERROR_IO:
+ return "FILE_ERROR_IO";
+ case FILE_ERROR_MAX:
+ break;
+ }
+
+ NOTREACHED();
+ return "";
+}
+
} // namespace base
diff --git a/chromium/base/files/file.h b/chromium/base/files/file.h
index d1e0e8ca587..1913bc7f6c4 100644
--- a/chromium/base/files/file.h
+++ b/chromium/base/files/file.h
@@ -10,11 +10,15 @@
#include <windows.h>
#endif
+#if defined(OS_POSIX)
+#include <sys/stat.h>
+#endif
+
#include <string>
#include "base/base_export.h"
#include "base/basictypes.h"
-#include "base/files/file_path.h"
+#include "base/files/scoped_file.h"
#include "base/move.h"
#include "base/time/time.h"
@@ -24,12 +28,19 @@
namespace base {
+class FilePath;
+
#if defined(OS_WIN)
typedef HANDLE PlatformFile;
#elif defined(OS_POSIX)
typedef int PlatformFile;
-#endif
+#if defined(OS_BSD) || defined(OS_MACOSX) || defined(OS_NACL)
+typedef struct stat stat_wrapper_t;
+#else
+typedef struct stat64 stat_wrapper_t;
+#endif
+#endif // defined(OS_POSIX)
// Thin wrapper around an OS-level file.
// Note that this class does not provide any support for asynchronous IO, other
@@ -120,6 +131,10 @@ class BASE_EXPORT File {
struct BASE_EXPORT Info {
Info();
~Info();
+#if defined(OS_POSIX)
+ // Fills this struct with values from |stat_info|.
+ void FromStat(const stat_wrapper_t& stat_info);
+#endif
// The size of the file in bytes. Undefined when is_directory is true.
int64 size;
@@ -149,6 +164,9 @@ class BASE_EXPORT File {
// Takes ownership of |platform_file|.
explicit File(PlatformFile platform_file);
+ // Creates an object with a specific error_details code.
+ explicit File(Error error_details);
+
// Move constructor for C++03 move emulation of this type.
File(RValue other);
@@ -157,9 +175,12 @@ class BASE_EXPORT File {
// Move operator= for C++03 move emulation of this type.
File& operator=(RValue other);
+ // Creates or opens the given file.
+ void Initialize(const FilePath& name, uint32 flags);
+
// Creates or opens the given file, allowing paths with traversal ('..')
// components. Use only with extreme care.
- void CreateBaseFileUnsafe(const FilePath& name, uint32 flags);
+ void InitializeUnsafe(const FilePath& name, uint32 flags);
bool IsValid() const;
@@ -168,10 +189,14 @@ class BASE_EXPORT File {
// FLAG_CREATE_ALWAYS), and false otherwise.
bool created() const { return created_; }
- // Returns the OS result of opening this file.
- Error error() const { return error_; }
+ // Returns the OS result of opening this file. Note that the way to verify
+ // the success of the operation is to use IsValid(), not this method:
+ // File file(name, flags);
+ // if (!file.IsValid())
+ // return;
+ Error error_details() const { return error_details_; }
- PlatformFile GetPlatformFile() const { return file_; }
+ PlatformFile GetPlatformFile() const;
PlatformFile TakePlatformFile();
// Destroying this object closes the file automatically.
@@ -216,10 +241,13 @@ class BASE_EXPORT File {
// platforms. Returns the number of bytes written, or -1 on error.
int WriteAtCurrentPosNoBestEffort(const char* data, int size);
+ // Returns the current size of this file, or a negative number on failure.
+ int64 GetLength();
+
// Truncates the file to the given length. If |length| is greater than the
// current size of the file, the file is extended with zeros. If the file
// doesn't exist, |false| is returned.
- bool Truncate(int64 length);
+ bool SetLength(int64 length);
// Flushes the buffers.
bool Flush();
@@ -255,22 +283,27 @@ class BASE_EXPORT File {
// Unlock a file previously locked.
Error Unlock();
+ bool async() const { return async_; }
+
#if defined(OS_WIN)
static Error OSErrorToFileError(DWORD last_error);
#elif defined(OS_POSIX)
static Error OSErrorToFileError(int saved_errno);
#endif
+ // Converts an error value to a human-readable form. Used for logging.
+ static std::string ErrorToString(Error error);
+
private:
void SetPlatformFile(PlatformFile file);
#if defined(OS_WIN)
win::ScopedHandle file_;
#elif defined(OS_POSIX)
- PlatformFile file_;
+ ScopedFD file_;
#endif
- Error error_;
+ Error error_details_;
bool created_;
bool async_;
};
diff --git a/chromium/base/files/file_path.cc b/chromium/base/files/file_path.cc
index 3ea5856a0d5..a8b27139988 100644
--- a/chromium/base/files/file_path.cc
+++ b/chromium/base/files/file_path.cc
@@ -521,7 +521,7 @@ FilePath FilePath::Append(const FilePath& component) const {
}
FilePath FilePath::AppendASCII(const StringPiece& component) const {
- DCHECK(IsStringASCII(component));
+ DCHECK(base::IsStringASCII(component));
#if defined(OS_WIN)
return Append(ASCIIToUTF16(component.as_string()));
#elif defined(OS_POSIX)
@@ -587,7 +587,7 @@ string16 FilePath::LossyDisplayName() const {
}
std::string FilePath::MaybeAsASCII() const {
- if (IsStringASCII(path_))
+ if (base::IsStringASCII(path_))
return path_;
return std::string();
}
@@ -632,9 +632,9 @@ string16 FilePath::LossyDisplayName() const {
}
std::string FilePath::MaybeAsASCII() const {
- if (IsStringASCII(path_))
- return WideToASCII(path_);
- return "";
+ if (base::IsStringASCII(path_))
+ return UTF16ToASCII(path_);
+ return std::string();
}
std::string FilePath::AsUTF8Unsafe() const {
@@ -1292,10 +1292,16 @@ void FilePath::StripTrailingSeparatorsInternal() {
}
FilePath FilePath::NormalizePathSeparators() const {
+ return NormalizePathSeparatorsTo(kSeparators[0]);
+}
+
+FilePath FilePath::NormalizePathSeparatorsTo(CharType separator) const {
#if defined(FILE_PATH_USES_WIN_SEPARATORS)
+ DCHECK_NE(kSeparators + kSeparatorsLength,
+ std::find(kSeparators, kSeparators + kSeparatorsLength, separator));
StringType copy = path_;
- for (size_t i = 1; i < kSeparatorsLength; ++i) {
- std::replace(copy.begin(), copy.end(), kSeparators[i], kSeparators[0]);
+ for (size_t i = 0; i < kSeparatorsLength; ++i) {
+ std::replace(copy.begin(), copy.end(), kSeparators[i], separator);
}
return FilePath(copy);
#else
diff --git a/chromium/base/files/file_path.h b/chromium/base/files/file_path.h
index f4b8ff8ade8..008b9f5afc6 100644
--- a/chromium/base/files/file_path.h
+++ b/chromium/base/files/file_path.h
@@ -189,6 +189,13 @@ class BASE_EXPORT FilePath {
// Returns a vector of all of the components of the provided path. It is
// equivalent to calling DirName().value() on the path's root component,
// and BaseName().value() on each child component.
+ //
+ // To make sure this is lossless so we can differentiate absolute and
+ // relative paths, the root slash will be included even though no other
+ // slashes will be. The precise behavior is:
+ //
+ // Posix: "/foo/bar" -> [ "/", "foo", "bar" ]
+ // Windows: "C:\foo\bar" -> [ "C:", "\\", "foo", "bar" ]
void GetComponents(std::vector<FilePath::StringType>* components) const;
// Returns true if this FilePath is a strict parent of the |child|. Absolute
@@ -239,7 +246,7 @@ class BASE_EXPORT FilePath {
// TODO(davidben): Check all our extension-sensitive code to see if
// we can rename this to Extension() and the other to something like
// LongExtension(), defaulting to short extensions and leaving the
- // long "extensions" to logic like file_util::GetUniquePathNumber().
+ // long "extensions" to logic like base::GetUniquePathNumber().
StringType FinalExtension() const;
// Returns "C:\pics\jojo" for path "C:\pics\jojo.jpg"
@@ -314,8 +321,8 @@ class BASE_EXPORT FilePath {
// separator.
FilePath StripTrailingSeparators() const WARN_UNUSED_RESULT;
- // Returns true if this FilePath contains any attempt to reference a parent
- // directory (i.e. has a path component that is ".."
+ // Returns true if this FilePath contains an attempt to reference a parent
+ // directory (e.g. has a path component that is "..").
bool ReferencesParent() const;
// Return a Unicode human-readable version of this path.
@@ -367,6 +374,10 @@ class BASE_EXPORT FilePath {
// (if FILE_PATH_USES_WIN_SEPARATORS is true), or do nothing on POSIX systems.
FilePath NormalizePathSeparators() const;
+ // Normalize all path separattors to given type on Windows
+ // (if FILE_PATH_USES_WIN_SEPARATORS is true), or do nothing on POSIX systems.
+ FilePath NormalizePathSeparatorsTo(CharType separator) const;
+
// Compare two strings in the same way the file system does.
// Note that these always ignore case, even on file systems that are case-
// sensitive. If case-sensitive comparison is ever needed, add corresponding
diff --git a/chromium/base/files/file_path_watcher.cc b/chromium/base/files/file_path_watcher.cc
index 49e0a237f69..b17354197d4 100644
--- a/chromium/base/files/file_path_watcher.cc
+++ b/chromium/base/files/file_path_watcher.cc
@@ -10,6 +10,10 @@
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+#include "base/mac/mac_util.h"
+#endif
+
namespace base {
FilePathWatcher::~FilePathWatcher() {
@@ -22,6 +26,19 @@ void FilePathWatcher::CancelWatch(
delegate->CancelOnMessageLoopThread();
}
+// static
+bool FilePathWatcher::RecursiveWatchAvailable() {
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+ // FSEvents isn't available on iOS and is broken on OSX 10.6 and earlier.
+ // See http://crbug.com/54822#c31
+ return mac::IsOSLionOrLater();
+#elif defined(OS_WIN) || defined(OS_LINUX)
+ return true;
+#else
+ return false;
+#endif
+}
+
FilePathWatcher::PlatformDelegate::PlatformDelegate(): cancelled_(false) {
}
diff --git a/chromium/base/files/file_path_watcher.h b/chromium/base/files/file_path_watcher.h
index 3c1941f012b..b90efa1800f 100644
--- a/chromium/base/files/file_path_watcher.h
+++ b/chromium/base/files/file_path_watcher.h
@@ -88,12 +88,15 @@ class BASE_EXPORT FilePathWatcher {
// shutdown.
static void CancelWatch(const scoped_refptr<PlatformDelegate>& delegate);
+ // Returns true if the platform and OS version support recursive watches.
+ static bool RecursiveWatchAvailable();
+
// Invokes |callback| whenever updates to |path| are detected. This should be
// called at most once, and from a MessageLoop of TYPE_IO. Set |recursive| to
// true, to watch |path| and its children. The callback will be invoked on
// the same loop. Returns true on success.
//
- // NOTE: Recursive watch is not supported on all platforms and file systems.
+ // Recursive watch is not supported on all platforms and file systems.
// Watch() will return false in the case of failure.
bool Watch(const FilePath& path, bool recursive, const Callback& callback);
diff --git a/chromium/base/files/file_path_watcher_browsertest.cc b/chromium/base/files/file_path_watcher_browsertest.cc
index aed409c7871..8f57cadda90 100644
--- a/chromium/base/files/file_path_watcher_browsertest.cc
+++ b/chromium/base/files/file_path_watcher_browsertest.cc
@@ -172,8 +172,7 @@ class FilePathWatcherTest : public testing::Test {
// Write |content| to |file|. Returns true on success.
bool WriteFile(const FilePath& file, const std::string& content) {
- int write_size = file_util::WriteFile(file, content.c_str(),
- content.length());
+ int write_size = ::base::WriteFile(file, content.c_str(), content.length());
return write_size == static_cast<int>(content.length());
}
@@ -206,9 +205,8 @@ bool FilePathWatcherTest::SetupWatch(const FilePath& target,
bool result;
file_thread_.message_loop_proxy()->PostTask(
FROM_HERE,
- base::Bind(SetupWatchCallback,
- target, watcher, delegate, recursive_watch, &result,
- &completion));
+ base::Bind(SetupWatchCallback, target, watcher, delegate, recursive_watch,
+ &result, &completion));
completion.Wait();
return result;
}
@@ -484,12 +482,17 @@ TEST_F(FilePathWatcherTest, MoveParent) {
DeleteDelegateOnFileThread(subdir_delegate.release());
}
-#if defined(OS_WIN)
TEST_F(FilePathWatcherTest, RecursiveWatch) {
FilePathWatcher watcher;
FilePath dir(temp_dir_.path().AppendASCII("dir"));
scoped_ptr<TestDelegate> delegate(new TestDelegate(collector()));
- ASSERT_TRUE(SetupWatch(dir, &watcher, delegate.get(), true));
+ bool setup_result = SetupWatch(dir, &watcher, delegate.get(), true);
+ if (!FilePathWatcher::RecursiveWatchAvailable()) {
+ ASSERT_FALSE(setup_result);
+ DeleteDelegateOnFileThread(delegate.release());
+ return;
+ }
+ ASSERT_TRUE(setup_result);
// Main directory("dir") creation.
ASSERT_TRUE(base::CreateDirectory(dir));
@@ -537,16 +540,48 @@ TEST_F(FilePathWatcherTest, RecursiveWatch) {
ASSERT_TRUE(WaitForEvents());
DeleteDelegateOnFileThread(delegate.release());
}
-#else
-TEST_F(FilePathWatcherTest, RecursiveWatch) {
+
+#if defined(OS_POSIX)
+TEST_F(FilePathWatcherTest, RecursiveWithSymLink) {
+ if (!FilePathWatcher::RecursiveWatchAvailable())
+ return;
+
FilePathWatcher watcher;
- FilePath dir(temp_dir_.path().AppendASCII("dir"));
+ FilePath test_dir(temp_dir_.path().AppendASCII("test_dir"));
+ ASSERT_TRUE(base::CreateDirectory(test_dir));
+ FilePath symlink(test_dir.AppendASCII("symlink"));
scoped_ptr<TestDelegate> delegate(new TestDelegate(collector()));
- // Non-Windows implementaion does not support recursive watching.
- ASSERT_FALSE(SetupWatch(dir, &watcher, delegate.get(), true));
+ ASSERT_TRUE(SetupWatch(symlink, &watcher, delegate.get(), true));
+
+ // Link creation.
+ FilePath target1(temp_dir_.path().AppendASCII("target1"));
+ ASSERT_TRUE(base::CreateSymbolicLink(target1, symlink));
+ ASSERT_TRUE(WaitForEvents());
+
+ // Target1 creation.
+ ASSERT_TRUE(base::CreateDirectory(target1));
+ ASSERT_TRUE(WaitForEvents());
+
+ // Create a file in target1.
+ FilePath target1_file(target1.AppendASCII("file"));
+ ASSERT_TRUE(WriteFile(target1_file, "content"));
+ ASSERT_TRUE(WaitForEvents());
+
+ // Link change.
+ FilePath target2(temp_dir_.path().AppendASCII("target2"));
+ ASSERT_TRUE(base::CreateDirectory(target2));
+ ASSERT_TRUE(base::DeleteFile(symlink, false));
+ ASSERT_TRUE(base::CreateSymbolicLink(target2, symlink));
+ ASSERT_TRUE(WaitForEvents());
+
+ // Create a file in target2.
+ FilePath target2_file(target2.AppendASCII("file"));
+ ASSERT_TRUE(WriteFile(target2_file, "content"));
+ ASSERT_TRUE(WaitForEvents());
+
DeleteDelegateOnFileThread(delegate.release());
}
-#endif
+#endif // OS_POSIX
TEST_F(FilePathWatcherTest, MoveChild) {
FilePathWatcher file_watcher;
@@ -575,10 +610,6 @@ TEST_F(FilePathWatcherTest, MoveChild) {
DeleteDelegateOnFileThread(subdir_delegate.release());
}
-#if !defined(OS_LINUX)
-// Linux implementation of FilePathWatcher doesn't catch attribute changes.
-// http://crbug.com/78043
-
// Verify that changing attributes on a file is caught
TEST_F(FilePathWatcherTest, FileAttributesChanged) {
ASSERT_TRUE(WriteFile(test_file(), "content"));
@@ -592,8 +623,6 @@ TEST_F(FilePathWatcherTest, FileAttributesChanged) {
DeleteDelegateOnFileThread(delegate.release());
}
-#endif // !OS_LINUX
-
#if defined(OS_LINUX)
// Verify that creating a symlink is caught.
diff --git a/chromium/base/files/file_path_watcher_fsevents.cc b/chromium/base/files/file_path_watcher_fsevents.cc
new file mode 100644
index 00000000000..edf4d239465
--- /dev/null
+++ b/chromium/base/files/file_path_watcher_fsevents.cc
@@ -0,0 +1,263 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/files/file_path_watcher_fsevents.h"
+
+#include <list>
+
+#include "base/bind.h"
+#include "base/file_util.h"
+#include "base/lazy_instance.h"
+#include "base/logging.h"
+#include "base/mac/libdispatch_task_runner.h"
+#include "base/mac/scoped_cftyperef.h"
+#include "base/message_loop/message_loop.h"
+
+namespace base {
+
+namespace {
+
+// The latency parameter passed to FSEventsStreamCreate().
+const CFAbsoluteTime kEventLatencySeconds = 0.3;
+
+class FSEventsTaskRunner : public mac::LibDispatchTaskRunner {
+ public:
+ FSEventsTaskRunner()
+ : mac::LibDispatchTaskRunner("org.chromium.FilePathWatcherFSEvents") {
+ }
+
+ protected:
+ virtual ~FSEventsTaskRunner() {}
+};
+
+static LazyInstance<FSEventsTaskRunner>::Leaky g_task_runner =
+ LAZY_INSTANCE_INITIALIZER;
+
+// Resolve any symlinks in the path.
+FilePath ResolvePath(const FilePath& path) {
+ const unsigned kMaxLinksToResolve = 255;
+
+ std::vector<FilePath::StringType> component_vector;
+ path.GetComponents(&component_vector);
+ std::list<FilePath::StringType>
+ components(component_vector.begin(), component_vector.end());
+
+ FilePath result;
+ unsigned resolve_count = 0;
+ while (resolve_count < kMaxLinksToResolve && !components.empty()) {
+ FilePath component(*components.begin());
+ components.pop_front();
+
+ FilePath current;
+ if (component.IsAbsolute()) {
+ current = component;
+ } else {
+ current = result.Append(component);
+ }
+
+ FilePath target;
+ if (ReadSymbolicLink(current, &target)) {
+ if (target.IsAbsolute())
+ result.clear();
+ std::vector<FilePath::StringType> target_components;
+ target.GetComponents(&target_components);
+ components.insert(components.begin(), target_components.begin(),
+ target_components.end());
+ resolve_count++;
+ } else {
+ result = current;
+ }
+ }
+
+ if (resolve_count >= kMaxLinksToResolve)
+ result.clear();
+ return result;
+}
+
+// The callback passed to FSEventStreamCreate().
+void FSEventsCallback(ConstFSEventStreamRef stream,
+ void* event_watcher, size_t num_events,
+ void* event_paths, const FSEventStreamEventFlags flags[],
+ const FSEventStreamEventId event_ids[]) {
+ FilePathWatcherFSEvents* watcher =
+ reinterpret_cast<FilePathWatcherFSEvents*>(event_watcher);
+ DCHECK(g_task_runner.Get().RunsTasksOnCurrentThread());
+
+ bool root_changed = watcher->ResolveTargetPath();
+ std::vector<FilePath> paths;
+ FSEventStreamEventId root_change_at = FSEventStreamGetLatestEventId(stream);
+ for (size_t i = 0; i < num_events; i++) {
+ if (flags[i] & kFSEventStreamEventFlagRootChanged)
+ root_changed = true;
+ if (event_ids[i])
+ root_change_at = std::min(root_change_at, event_ids[i]);
+ paths.push_back(FilePath(
+ reinterpret_cast<char**>(event_paths)[i]).StripTrailingSeparators());
+ }
+
+ // Reinitialize the event stream if we find changes to the root. This is
+ // necessary since FSEvents doesn't report any events for the subtree after
+ // the directory to be watched gets created.
+ if (root_changed) {
+ // Resetting the event stream from within the callback fails (FSEvents spews
+ // bad file descriptor errors), so post a task to do the reset.
+ g_task_runner.Get().PostTask(
+ FROM_HERE,
+ Bind(&FilePathWatcherFSEvents::UpdateEventStream, watcher,
+ root_change_at));
+ }
+
+ watcher->OnFilePathsChanged(paths);
+}
+
+} // namespace
+
+FilePathWatcherFSEvents::FilePathWatcherFSEvents() : fsevent_stream_(NULL) {
+}
+
+void FilePathWatcherFSEvents::OnFilePathsChanged(
+ const std::vector<FilePath>& paths) {
+ if (!message_loop()->BelongsToCurrentThread()) {
+ message_loop()->PostTask(
+ FROM_HERE,
+ Bind(&FilePathWatcherFSEvents::OnFilePathsChanged, this, paths));
+ return;
+ }
+
+ DCHECK(message_loop()->BelongsToCurrentThread());
+ if (resolved_target_.empty())
+ return;
+
+ for (size_t i = 0; i < paths.size(); i++) {
+ if (resolved_target_.IsParent(paths[i]) || resolved_target_ == paths[i]) {
+ callback_.Run(target_, false);
+ return;
+ }
+ }
+}
+
+bool FilePathWatcherFSEvents::Watch(const FilePath& path,
+ bool recursive,
+ const FilePathWatcher::Callback& callback) {
+ DCHECK(resolved_target_.empty());
+ DCHECK(MessageLoopForIO::current());
+ DCHECK(!callback.is_null());
+
+ // This class could support non-recursive watches, but that is currently
+ // left to FilePathWatcherKQueue.
+ if (!recursive)
+ return false;
+
+ set_message_loop(MessageLoopProxy::current());
+ callback_ = callback;
+ target_ = path;
+
+ FSEventStreamEventId start_event = FSEventsGetCurrentEventId();
+ g_task_runner.Get().PostTask(
+ FROM_HERE,
+ Bind(&FilePathWatcherFSEvents::StartEventStream, this, start_event));
+ return true;
+}
+
+void FilePathWatcherFSEvents::Cancel() {
+ if (callback_.is_null()) {
+ // Watch was never called, so exit.
+ set_cancelled();
+ return;
+ }
+
+ // Switch to the dispatch queue thread if necessary, so we can tear down
+ // the event stream.
+ if (!g_task_runner.Get().RunsTasksOnCurrentThread()) {
+ g_task_runner.Get().PostTask(
+ FROM_HERE,
+ Bind(&FilePathWatcherFSEvents::CancelOnMessageLoopThread, this));
+ } else {
+ CancelOnMessageLoopThread();
+ }
+}
+
+void FilePathWatcherFSEvents::CancelOnMessageLoopThread() {
+ // For all other implementations, the "message loop thread" is the IO thread,
+ // as returned by message_loop(). This implementation, however, needs to
+ // cancel pending work on the Dipatch Queue thread.
+ DCHECK(g_task_runner.Get().RunsTasksOnCurrentThread());
+
+ set_cancelled();
+ if (fsevent_stream_) {
+ DestroyEventStream();
+ callback_.Reset();
+ target_.clear();
+ resolved_target_.clear();
+ }
+}
+
+void FilePathWatcherFSEvents::UpdateEventStream(
+ FSEventStreamEventId start_event) {
+ DCHECK(g_task_runner.Get().RunsTasksOnCurrentThread());
+
+ // It can happen that the watcher gets canceled while tasks that call this
+ // function are still in flight, so abort if this situation is detected.
+ if (is_cancelled() || resolved_target_.empty())
+ return;
+
+ if (fsevent_stream_)
+ DestroyEventStream();
+
+ ScopedCFTypeRef<CFStringRef> cf_path(CFStringCreateWithCString(
+ NULL, resolved_target_.value().c_str(), kCFStringEncodingMacHFS));
+ ScopedCFTypeRef<CFStringRef> cf_dir_path(CFStringCreateWithCString(
+ NULL, resolved_target_.DirName().value().c_str(),
+ kCFStringEncodingMacHFS));
+ CFStringRef paths_array[] = { cf_path.get(), cf_dir_path.get() };
+ ScopedCFTypeRef<CFArrayRef> watched_paths(CFArrayCreate(
+ NULL, reinterpret_cast<const void**>(paths_array), arraysize(paths_array),
+ &kCFTypeArrayCallBacks));
+
+ FSEventStreamContext context;
+ context.version = 0;
+ context.info = this;
+ context.retain = NULL;
+ context.release = NULL;
+ context.copyDescription = NULL;
+
+ fsevent_stream_ = FSEventStreamCreate(NULL, &FSEventsCallback, &context,
+ watched_paths,
+ start_event,
+ kEventLatencySeconds,
+ kFSEventStreamCreateFlagWatchRoot);
+ FSEventStreamSetDispatchQueue(fsevent_stream_,
+ g_task_runner.Get().GetDispatchQueue());
+
+ if (!FSEventStreamStart(fsevent_stream_))
+ message_loop()->PostTask(FROM_HERE, Bind(callback_, target_, true));
+}
+
+bool FilePathWatcherFSEvents::ResolveTargetPath() {
+ DCHECK(g_task_runner.Get().RunsTasksOnCurrentThread());
+ FilePath resolved = ResolvePath(target_).StripTrailingSeparators();
+ bool changed = resolved != resolved_target_;
+ resolved_target_ = resolved;
+ if (resolved_target_.empty())
+ message_loop()->PostTask(FROM_HERE, Bind(callback_, target_, true));
+ return changed;
+}
+
+void FilePathWatcherFSEvents::DestroyEventStream() {
+ FSEventStreamStop(fsevent_stream_);
+ FSEventStreamInvalidate(fsevent_stream_);
+ FSEventStreamRelease(fsevent_stream_);
+ fsevent_stream_ = NULL;
+}
+
+void FilePathWatcherFSEvents::StartEventStream(
+ FSEventStreamEventId start_event) {
+ DCHECK(g_task_runner.Get().RunsTasksOnCurrentThread());
+ ResolveTargetPath();
+ UpdateEventStream(start_event);
+}
+
+FilePathWatcherFSEvents::~FilePathWatcherFSEvents() {}
+
+} // namespace base
diff --git a/chromium/base/files/file_path_watcher_fsevents.h b/chromium/base/files/file_path_watcher_fsevents.h
new file mode 100644
index 00000000000..5640b4d5497
--- /dev/null
+++ b/chromium/base/files/file_path_watcher_fsevents.h
@@ -0,0 +1,73 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_FILES_FILE_PATH_WATCHER_FSEVENTS_H_
+#define BASE_FILES_FILE_PATH_WATCHER_FSEVENTS_H_
+
+#include <CoreServices/CoreServices.h>
+
+#include <vector>
+
+#include "base/files/file_path.h"
+#include "base/files/file_path_watcher.h"
+
+namespace base {
+
+// Mac-specific file watcher implementation based on FSEvents.
+// There are trade-offs between the FSEvents implementation and a kqueue
+// implementation. The biggest issues are that FSEvents on 10.6 sometimes drops
+// events and kqueue does not trigger for modifications to a file in a watched
+// directory. See file_path_watcher_mac.cc for the code that decides when to
+// use which one.
+class FilePathWatcherFSEvents : public FilePathWatcher::PlatformDelegate {
+ public:
+ FilePathWatcherFSEvents();
+
+ // Called from the FSEvents callback whenever there is a change to the paths.
+ void OnFilePathsChanged(const std::vector<FilePath>& paths);
+
+ // (Re-)Initialize the event stream to start reporting events from
+ // |start_event|.
+ void UpdateEventStream(FSEventStreamEventId start_event);
+
+ // Returns true if resolving the target path got a different result than
+ // last time it was done.
+ bool ResolveTargetPath();
+
+ // FilePathWatcher::PlatformDelegate overrides.
+ virtual bool Watch(const FilePath& path,
+ bool recursive,
+ const FilePathWatcher::Callback& callback) OVERRIDE;
+ virtual void Cancel() OVERRIDE;
+
+ private:
+ virtual ~FilePathWatcherFSEvents();
+
+ // Destroy the event stream.
+ void DestroyEventStream();
+
+ // Start watching the FSEventStream.
+ void StartEventStream(FSEventStreamEventId start_event);
+
+ // Cleans up and stops the event stream.
+ virtual void CancelOnMessageLoopThread() OVERRIDE;
+
+ // Callback to notify upon changes.
+ FilePathWatcher::Callback callback_;
+
+ // Target path to watch (passed to callback).
+ FilePath target_;
+
+ // Target path with all symbolic links resolved.
+ FilePath resolved_target_;
+
+ // Backend stream we receive event callbacks from (strong reference).
+ FSEventStreamRef fsevent_stream_;
+
+ DISALLOW_COPY_AND_ASSIGN(FilePathWatcherFSEvents);
+};
+
+} // namespace base
+
+#endif // BASE_FILES_FILE_PATH_WATCHER_FSEVENTS_H_
diff --git a/chromium/base/files/file_path_watcher_kqueue.cc b/chromium/base/files/file_path_watcher_kqueue.cc
index e035f22caa5..c38e3448e73 100644
--- a/chromium/base/files/file_path_watcher_kqueue.cc
+++ b/chromium/base/files/file_path_watcher_kqueue.cc
@@ -2,19 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/files/file_path_watcher.h"
+#include "base/files/file_path_watcher_kqueue.h"
#include <fcntl.h>
-#include <sys/event.h>
#include <sys/param.h>
-#include <vector>
-
#include "base/bind.h"
#include "base/file_util.h"
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
-#include "base/message_loop/message_loop_proxy.h"
#include "base/strings/stringprintf.h"
// On some platforms these are not defined.
@@ -27,136 +22,18 @@
namespace base {
-namespace {
-
-// Mac-specific file watcher implementation based on kqueue.
-// Originally it was based on FSEvents so that the semantics were equivalent
-// on Linux, OSX and Windows where it was able to detect:
-// - file creation/deletion/modification in a watched directory
-// - file creation/deletion/modification for a watched file
-// - modifications to the paths to a watched object that would affect the
-// object such as renaming/attibute changes etc.
-// The FSEvents version did all of the above except handling attribute changes
-// to path components. Unfortunately FSEvents appears to have an issue where the
-// current implementation (Mac OS X 10.6.7) sometimes drops events and doesn't
-// send notifications. See
-// http://code.google.com/p/chromium/issues/detail?id=54822#c31 for source that
-// will reproduce the problem. FSEvents also required having a CFRunLoop
-// backing the thread that it was running on, that caused added complexity
-// in the interfaces.
-// The kqueue implementation will handle all of the items in the list above
-// except for detecting modifications to files in a watched directory. It will
-// detect the creation and deletion of files, just not the modification of
-// files. It does however detect the attribute changes that the FSEvents impl
-// would miss.
-class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate,
- public MessageLoopForIO::Watcher,
- public MessageLoop::DestructionObserver {
- public:
- FilePathWatcherImpl() : kqueue_(-1) {}
-
- // MessageLoopForIO::Watcher overrides.
- virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE;
- virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE;
-
- // MessageLoop::DestructionObserver overrides.
- virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
-
- // FilePathWatcher::PlatformDelegate overrides.
- virtual bool Watch(const FilePath& path,
- bool recursive,
- const FilePathWatcher::Callback& callback) OVERRIDE;
- virtual void Cancel() OVERRIDE;
-
- protected:
- virtual ~FilePathWatcherImpl() {}
-
- private:
- class EventData {
- public:
- EventData(const FilePath& path, const FilePath::StringType& subdir)
- : path_(path), subdir_(subdir) { }
- FilePath path_; // Full path to this item.
- FilePath::StringType subdir_; // Path to any sub item.
- };
- typedef std::vector<struct kevent> EventVector;
-
- // Can only be called on |io_message_loop_|'s thread.
- virtual void CancelOnMessageLoopThread() OVERRIDE;
-
- // Returns true if the kevent values are error free.
- bool AreKeventValuesValid(struct kevent* kevents, int count);
-
- // Respond to a change of attributes of the path component represented by
- // |event|. Sets |target_file_affected| to true if |target_| is affected.
- // Sets |update_watches| to true if |events_| need to be updated.
- void HandleAttributesChange(const EventVector::iterator& event,
- bool* target_file_affected,
- bool* update_watches);
-
- // Respond to a move or deletion of the path component represented by
- // |event|. Sets |target_file_affected| to true if |target_| is affected.
- // Sets |update_watches| to true if |events_| need to be updated.
- void HandleDeleteOrMoveChange(const EventVector::iterator& event,
- bool* target_file_affected,
- bool* update_watches);
-
- // Respond to a creation of an item in the path component represented by
- // |event|. Sets |target_file_affected| to true if |target_| is affected.
- // Sets |update_watches| to true if |events_| need to be updated.
- void HandleCreateItemChange(const EventVector::iterator& event,
- bool* target_file_affected,
- bool* update_watches);
-
- // Update |events_| with the current status of the system.
- // Sets |target_file_affected| to true if |target_| is affected.
- // Returns false if an error occurs.
- bool UpdateWatches(bool* target_file_affected);
-
- // Fills |events| with one kevent per component in |path|.
- // Returns the number of valid events created where a valid event is
- // defined as one that has a ident (file descriptor) field != -1.
- static int EventsForPath(FilePath path, EventVector *events);
-
- // Release a kevent generated by EventsForPath.
- static void ReleaseEvent(struct kevent& event);
-
- // Returns a file descriptor that will not block the system from deleting
- // the file it references.
- static uintptr_t FileDescriptorForPath(const FilePath& path);
-
- static const uintptr_t kNoFileDescriptor = static_cast<uintptr_t>(-1);
-
- // Closes |*fd| and sets |*fd| to -1.
- static void CloseFileDescriptor(uintptr_t* fd);
-
- // Returns true if kevent has open file descriptor.
- static bool IsKeventFileDescriptorOpen(const struct kevent& event) {
- return event.ident != kNoFileDescriptor;
- }
-
- static EventData* EventDataForKevent(const struct kevent& event) {
- return reinterpret_cast<EventData*>(event.udata);
- }
-
- EventVector events_;
- scoped_refptr<base::MessageLoopProxy> io_message_loop_;
- MessageLoopForIO::FileDescriptorWatcher kqueue_watcher_;
- FilePathWatcher::Callback callback_;
- FilePath target_;
- int kqueue_;
+FilePathWatcherKQueue::FilePathWatcherKQueue() : kqueue_(-1) {}
- DISALLOW_COPY_AND_ASSIGN(FilePathWatcherImpl);
-};
+FilePathWatcherKQueue::~FilePathWatcherKQueue() {}
-void FilePathWatcherImpl::ReleaseEvent(struct kevent& event) {
+void FilePathWatcherKQueue::ReleaseEvent(struct kevent& event) {
CloseFileDescriptor(&event.ident);
EventData* entry = EventDataForKevent(event);
delete entry;
event.udata = NULL;
}
-int FilePathWatcherImpl::EventsForPath(FilePath path, EventVector* events) {
+int FilePathWatcherKQueue::EventsForPath(FilePath path, EventVector* events) {
DCHECK(MessageLoopForIO::current());
// Make sure that we are working with a clean slate.
DCHECK(events->empty());
@@ -198,14 +75,14 @@ int FilePathWatcherImpl::EventsForPath(FilePath path, EventVector* events) {
return last_existing_entry;
}
-uintptr_t FilePathWatcherImpl::FileDescriptorForPath(const FilePath& path) {
+uintptr_t FilePathWatcherKQueue::FileDescriptorForPath(const FilePath& path) {
int fd = HANDLE_EINTR(open(path.value().c_str(), O_EVTONLY));
if (fd == -1)
return kNoFileDescriptor;
return fd;
}
-void FilePathWatcherImpl::CloseFileDescriptor(uintptr_t* fd) {
+void FilePathWatcherKQueue::CloseFileDescriptor(uintptr_t* fd) {
if (*fd == kNoFileDescriptor) {
return;
}
@@ -216,7 +93,7 @@ void FilePathWatcherImpl::CloseFileDescriptor(uintptr_t* fd) {
*fd = kNoFileDescriptor;
}
-bool FilePathWatcherImpl::AreKeventValuesValid(struct kevent* kevents,
+bool FilePathWatcherKQueue::AreKeventValuesValid(struct kevent* kevents,
int count) {
if (count < 0) {
DPLOG(ERROR) << "kevent";
@@ -250,7 +127,7 @@ bool FilePathWatcherImpl::AreKeventValuesValid(struct kevent* kevents,
return valid;
}
-void FilePathWatcherImpl::HandleAttributesChange(
+void FilePathWatcherKQueue::HandleAttributesChange(
const EventVector::iterator& event,
bool* target_file_affected,
bool* update_watches) {
@@ -274,7 +151,7 @@ void FilePathWatcherImpl::HandleAttributesChange(
}
}
-void FilePathWatcherImpl::HandleDeleteOrMoveChange(
+void FilePathWatcherKQueue::HandleDeleteOrMoveChange(
const EventVector::iterator& event,
bool* target_file_affected,
bool* update_watches) {
@@ -290,7 +167,7 @@ void FilePathWatcherImpl::HandleDeleteOrMoveChange(
}
}
-void FilePathWatcherImpl::HandleCreateItemChange(
+void FilePathWatcherKQueue::HandleCreateItemChange(
const EventVector::iterator& event,
bool* target_file_affected,
bool* update_watches) {
@@ -310,7 +187,7 @@ void FilePathWatcherImpl::HandleCreateItemChange(
}
}
-bool FilePathWatcherImpl::UpdateWatches(bool* target_file_affected) {
+bool FilePathWatcherKQueue::UpdateWatches(bool* target_file_affected) {
// Iterate over events adding kevents for items that exist to the kqueue.
// Then check to see if new components in the path have been created.
// Repeat until no new components in the path are detected.
@@ -351,7 +228,7 @@ bool FilePathWatcherImpl::UpdateWatches(bool* target_file_affected) {
return true;
}
-void FilePathWatcherImpl::OnFileCanReadWithoutBlocking(int fd) {
+void FilePathWatcherKQueue::OnFileCanReadWithoutBlocking(int fd) {
DCHECK(MessageLoopForIO::current());
DCHECK_EQ(fd, kqueue_);
DCHECK(events_.size());
@@ -424,24 +301,24 @@ void FilePathWatcherImpl::OnFileCanReadWithoutBlocking(int fd) {
}
}
-void FilePathWatcherImpl::OnFileCanWriteWithoutBlocking(int fd) {
+void FilePathWatcherKQueue::OnFileCanWriteWithoutBlocking(int fd) {
NOTREACHED();
}
-void FilePathWatcherImpl::WillDestroyCurrentMessageLoop() {
+void FilePathWatcherKQueue::WillDestroyCurrentMessageLoop() {
CancelOnMessageLoopThread();
}
-bool FilePathWatcherImpl::Watch(const FilePath& path,
- bool recursive,
- const FilePathWatcher::Callback& callback) {
+bool FilePathWatcherKQueue::Watch(const FilePath& path,
+ bool recursive,
+ const FilePathWatcher::Callback& callback) {
DCHECK(MessageLoopForIO::current());
DCHECK(target_.value().empty()); // Can only watch one path.
DCHECK(!callback.is_null());
DCHECK_EQ(kqueue_, -1);
if (recursive) {
- // Recursive watch is not supported on this platform.
+ // Recursive watch is not supported using kqueue.
NOTIMPLEMENTED();
return false;
}
@@ -478,7 +355,7 @@ bool FilePathWatcherImpl::Watch(const FilePath& path,
kqueue_, true, MessageLoopForIO::WATCH_READ, &kqueue_watcher_, this);
}
-void FilePathWatcherImpl::Cancel() {
+void FilePathWatcherKQueue::Cancel() {
base::MessageLoopProxy* proxy = io_message_loop_.get();
if (!proxy) {
set_cancelled();
@@ -486,13 +363,13 @@ void FilePathWatcherImpl::Cancel() {
}
if (!proxy->BelongsToCurrentThread()) {
proxy->PostTask(FROM_HERE,
- base::Bind(&FilePathWatcherImpl::Cancel, this));
+ base::Bind(&FilePathWatcherKQueue::Cancel, this));
return;
}
CancelOnMessageLoopThread();
}
-void FilePathWatcherImpl::CancelOnMessageLoopThread() {
+void FilePathWatcherKQueue::CancelOnMessageLoopThread() {
DCHECK(MessageLoopForIO::current());
if (!is_cancelled()) {
set_cancelled();
@@ -509,10 +386,4 @@ void FilePathWatcherImpl::CancelOnMessageLoopThread() {
}
}
-} // namespace
-
-FilePathWatcher::FilePathWatcher() {
- impl_ = new FilePathWatcherImpl();
-}
-
} // namespace base
diff --git a/chromium/base/files/file_path_watcher_kqueue.h b/chromium/base/files/file_path_watcher_kqueue.h
new file mode 100644
index 00000000000..703fda67c4b
--- /dev/null
+++ b/chromium/base/files/file_path_watcher_kqueue.h
@@ -0,0 +1,132 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
+#define BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
+
+#include <sys/event.h>
+#include <vector>
+
+#include "base/files/file_path.h"
+#include "base/files/file_path_watcher.h"
+#include "base/message_loop/message_loop.h"
+#include "base/message_loop/message_loop_proxy.h"
+
+namespace base {
+
+// Mac-specific file watcher implementation based on kqueue.
+// The Linux and Windows versions are able to detect:
+// - file creation/deletion/modification in a watched directory
+// - file creation/deletion/modification for a watched file
+// - modifications to the paths to a watched object that would affect the
+// object such as renaming/attibute changes etc.
+// The kqueue implementation will handle all of the items in the list above
+// except for detecting modifications to files in a watched directory. It will
+// detect the creation and deletion of files, just not the modification of
+// files. It does however detect the attribute changes that the FSEvents impl
+// would miss.
+class FilePathWatcherKQueue : public FilePathWatcher::PlatformDelegate,
+ public MessageLoopForIO::Watcher,
+ public MessageLoop::DestructionObserver {
+ public:
+ FilePathWatcherKQueue();
+
+ // MessageLoopForIO::Watcher overrides.
+ virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE;
+ virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE;
+
+ // MessageLoop::DestructionObserver overrides.
+ virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
+
+ // FilePathWatcher::PlatformDelegate overrides.
+ virtual bool Watch(const FilePath& path,
+ bool recursive,
+ const FilePathWatcher::Callback& callback) OVERRIDE;
+ virtual void Cancel() OVERRIDE;
+
+ protected:
+ virtual ~FilePathWatcherKQueue();
+
+ private:
+ class EventData {
+ public:
+ EventData(const FilePath& path, const FilePath::StringType& subdir)
+ : path_(path), subdir_(subdir) { }
+ FilePath path_; // Full path to this item.
+ FilePath::StringType subdir_; // Path to any sub item.
+ };
+
+ typedef std::vector<struct kevent> EventVector;
+
+ // Can only be called on |io_message_loop_|'s thread.
+ virtual void CancelOnMessageLoopThread() OVERRIDE;
+
+ // Returns true if the kevent values are error free.
+ bool AreKeventValuesValid(struct kevent* kevents, int count);
+
+ // Respond to a change of attributes of the path component represented by
+ // |event|. Sets |target_file_affected| to true if |target_| is affected.
+ // Sets |update_watches| to true if |events_| need to be updated.
+ void HandleAttributesChange(const EventVector::iterator& event,
+ bool* target_file_affected,
+ bool* update_watches);
+
+ // Respond to a move or deletion of the path component represented by
+ // |event|. Sets |target_file_affected| to true if |target_| is affected.
+ // Sets |update_watches| to true if |events_| need to be updated.
+ void HandleDeleteOrMoveChange(const EventVector::iterator& event,
+ bool* target_file_affected,
+ bool* update_watches);
+
+ // Respond to a creation of an item in the path component represented by
+ // |event|. Sets |target_file_affected| to true if |target_| is affected.
+ // Sets |update_watches| to true if |events_| need to be updated.
+ void HandleCreateItemChange(const EventVector::iterator& event,
+ bool* target_file_affected,
+ bool* update_watches);
+
+ // Update |events_| with the current status of the system.
+ // Sets |target_file_affected| to true if |target_| is affected.
+ // Returns false if an error occurs.
+ bool UpdateWatches(bool* target_file_affected);
+
+ // Fills |events| with one kevent per component in |path|.
+ // Returns the number of valid events created where a valid event is
+ // defined as one that has a ident (file descriptor) field != -1.
+ static int EventsForPath(FilePath path, EventVector *events);
+
+ // Release a kevent generated by EventsForPath.
+ static void ReleaseEvent(struct kevent& event);
+
+ // Returns a file descriptor that will not block the system from deleting
+ // the file it references.
+ static uintptr_t FileDescriptorForPath(const FilePath& path);
+
+ static const uintptr_t kNoFileDescriptor = static_cast<uintptr_t>(-1);
+
+ // Closes |*fd| and sets |*fd| to -1.
+ static void CloseFileDescriptor(uintptr_t* fd);
+
+ // Returns true if kevent has open file descriptor.
+ static bool IsKeventFileDescriptorOpen(const struct kevent& event) {
+ return event.ident != kNoFileDescriptor;
+ }
+
+ static EventData* EventDataForKevent(const struct kevent& event) {
+ return reinterpret_cast<EventData*>(event.udata);
+ }
+
+ EventVector events_;
+ scoped_refptr<base::MessageLoopProxy> io_message_loop_;
+ MessageLoopForIO::FileDescriptorWatcher kqueue_watcher_;
+ FilePathWatcher::Callback callback_;
+ FilePath target_;
+ int kqueue_;
+
+ DISALLOW_COPY_AND_ASSIGN(FilePathWatcherKQueue);
+};
+
+} // namespace base
+
+#endif // BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
diff --git a/chromium/base/files/file_path_watcher_linux.cc b/chromium/base/files/file_path_watcher_linux.cc
index d5052e2e512..915ad50abb2 100644
--- a/chromium/base/files/file_path_watcher_linux.cc
+++ b/chromium/base/files/file_path_watcher_linux.cc
@@ -12,6 +12,7 @@
#include <unistd.h>
#include <algorithm>
+#include <map>
#include <set>
#include <utility>
#include <vector>
@@ -20,6 +21,7 @@
#include "base/containers/hash_tables.h"
#include "base/debug/trace_event.h"
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/lazy_instance.h"
#include "base/location.h"
@@ -49,8 +51,8 @@ class InotifyReader {
// change. Returns kInvalidWatch on failure.
Watch AddWatch(const FilePath& path, FilePathWatcherImpl* watcher);
- // Remove |watch|. Returns true on success.
- bool RemoveWatch(Watch watch, FilePathWatcherImpl* watcher);
+ // Remove |watch| if it's valid.
+ void RemoveWatch(Watch watch, FilePathWatcherImpl* watcher);
// Callback for InotifyReaderTask.
void OnInotifyEvent(const inotify_event* event);
@@ -91,12 +93,21 @@ class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate,
// Called for each event coming from the watch. |fired_watch| identifies the
// watch that fired, |child| indicates what has changed, and is relative to
- // the currently watched path for |fired_watch|. The flag |created| is true if
- // the object appears.
+ // the currently watched path for |fired_watch|.
+ //
+ // |created| is true if the object appears.
+ // |deleted| is true if the object disappears.
+ // |is_dir| is true if the object is a directory.
void OnFilePathChanged(InotifyReader::Watch fired_watch,
const FilePath::StringType& child,
- bool created);
+ bool created,
+ bool deleted,
+ bool is_dir);
+ protected:
+ virtual ~FilePathWatcherImpl() {}
+
+ private:
// Start watching |path| for changes and notify |delegate| on each change.
// Returns true if watch for |path| has been added successfully.
virtual bool Watch(const FilePath& path,
@@ -106,36 +117,58 @@ class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate,
// Cancel the watch. This unregisters the instance with InotifyReader.
virtual void Cancel() OVERRIDE;
+ // Cleans up and stops observing the message_loop() thread.
+ virtual void CancelOnMessageLoopThread() OVERRIDE;
+
// Deletion of the FilePathWatcher will call Cancel() to dispose of this
// object in the right thread. This also observes destruction of the required
// cleanup thread, in case it quits before Cancel() is called.
virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
- protected:
- virtual ~FilePathWatcherImpl() {}
-
- private:
- // Cleans up and stops observing the |message_loop_| thread.
- virtual void CancelOnMessageLoopThread() OVERRIDE;
-
// Inotify watches are installed for all directory components of |target_|. A
// WatchEntry instance holds the watch descriptor for a component and the
// subdirectory for that identifies the next component. If a symbolic link
// is being watched, the target of the link is also kept.
struct WatchEntry {
- WatchEntry(InotifyReader::Watch watch, const FilePath::StringType& subdir)
- : watch_(watch),
- subdir_(subdir) {}
+ explicit WatchEntry(const FilePath::StringType& dirname)
+ : watch(InotifyReader::kInvalidWatch),
+ subdir(dirname) {}
- InotifyReader::Watch watch_;
- FilePath::StringType subdir_;
- FilePath::StringType linkname_;
+ InotifyReader::Watch watch;
+ FilePath::StringType subdir;
+ FilePath::StringType linkname;
};
typedef std::vector<WatchEntry> WatchVector;
// Reconfigure to watch for the most specific parent directory of |target_|
- // that exists. Updates |watched_path_|. Returns true on success.
- bool UpdateWatches() WARN_UNUSED_RESULT;
+ // that exists. Also calls UpdateRecursiveWatches() below.
+ void UpdateWatches();
+
+ // Reconfigure to recursively watch |target_| and all its sub-directories.
+ // - This is a no-op if the watch is not recursive.
+ // - If |target_| does not exist, then clear all the recursive watches.
+ // - Assuming |target_| exists, passing kInvalidWatch as |fired_watch| forces
+ // addition of recursive watches for |target_|.
+ // - Otherwise, only the directory associated with |fired_watch| and its
+ // sub-directories will be reconfigured.
+ void UpdateRecursiveWatches(InotifyReader::Watch fired_watch, bool is_dir);
+
+ // Enumerate recursively through |path| and add / update watches.
+ void UpdateRecursiveWatchesForPath(const FilePath& path);
+
+ // Do internal bookkeeping to update mappings between |watch| and its
+ // associated full path |path|.
+ void TrackWatchForRecursion(InotifyReader::Watch watch, const FilePath& path);
+
+ // Remove all the recursive watches.
+ void RemoveRecursiveWatches();
+
+ // |path| is a symlink to a non-existent target. Attempt to add a watch to
+ // the link target's parent directory. Returns true and update |watch_entry|
+ // on success.
+ bool AddWatchForBrokenSymlink(const FilePath& path, WatchEntry* watch_entry);
+
+ bool HasValidWatchVector() const;
// Callback to notify upon changes.
FilePathWatcher::Callback callback_;
@@ -143,11 +176,16 @@ class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate,
// The file or directory we're supposed to watch.
FilePath target_;
+ bool recursive_;
+
// The vector of watches and next component names for all path components,
// starting at the root directory. The last entry corresponds to the watch for
- // |target_| and always stores an empty next component name in |subdir_|.
+ // |target_| and always stores an empty next component name in |subdir|.
WatchVector watches_;
+ hash_map<InotifyReader::Watch, FilePath> recursive_paths_by_watch_;
+ std::map<FilePath, InotifyReader::Watch> recursive_watches_by_path_;
+
DISALLOW_COPY_AND_ASSIGN(FilePathWatcherImpl);
};
@@ -224,8 +262,8 @@ InotifyReader::InotifyReader()
shutdown_pipe_[1] = -1;
if (inotify_fd_ >= 0 && pipe(shutdown_pipe_) == 0 && thread_.Start()) {
thread_.message_loop()->PostTask(
- FROM_HERE, Bind(&InotifyReaderCallback, this, inotify_fd_,
- shutdown_pipe_[0]));
+ FROM_HERE,
+ Bind(&InotifyReaderCallback, this, inotify_fd_, shutdown_pipe_[0]));
valid_ = true;
}
}
@@ -255,7 +293,7 @@ InotifyReader::Watch InotifyReader::AddWatch(
AutoLock auto_lock(lock_);
Watch watch = inotify_add_watch(inotify_fd_, path.value().c_str(),
- IN_CREATE | IN_DELETE |
+ IN_ATTRIB | IN_CREATE | IN_DELETE |
IN_CLOSE_WRITE | IN_MOVE |
IN_ONLYDIR);
@@ -267,10 +305,9 @@ InotifyReader::Watch InotifyReader::AddWatch(
return watch;
}
-bool InotifyReader::RemoveWatch(Watch watch,
- FilePathWatcherImpl* watcher) {
- if (!valid_)
- return false;
+void InotifyReader::RemoveWatch(Watch watch, FilePathWatcherImpl* watcher) {
+ if (!valid_ || (watch == kInvalidWatch))
+ return;
AutoLock auto_lock(lock_);
@@ -278,10 +315,8 @@ bool InotifyReader::RemoveWatch(Watch watch,
if (watchers_[watch].empty()) {
watchers_.erase(watch);
- return (inotify_rm_watch(inotify_fd_, watch) == 0);
+ inotify_rm_watch(inotify_fd_, watch);
}
-
- return true;
}
void InotifyReader::OnInotifyEvent(const inotify_event* event) {
@@ -296,73 +331,96 @@ void InotifyReader::OnInotifyEvent(const inotify_event* event) {
++watcher) {
(*watcher)->OnFilePathChanged(event->wd,
child,
- event->mask & (IN_CREATE | IN_MOVED_TO));
+ event->mask & (IN_CREATE | IN_MOVED_TO),
+ event->mask & (IN_DELETE | IN_MOVED_FROM),
+ event->mask & IN_ISDIR);
}
}
-FilePathWatcherImpl::FilePathWatcherImpl() {
+FilePathWatcherImpl::FilePathWatcherImpl()
+ : recursive_(false) {
}
void FilePathWatcherImpl::OnFilePathChanged(InotifyReader::Watch fired_watch,
const FilePath::StringType& child,
- bool created) {
+ bool created,
+ bool deleted,
+ bool is_dir) {
if (!message_loop()->BelongsToCurrentThread()) {
- // Switch to message_loop_ to access watches_ safely.
- message_loop()->PostTask(FROM_HERE,
- Bind(&FilePathWatcherImpl::OnFilePathChanged,
- this,
- fired_watch,
- child,
- created));
+ // Switch to message_loop() to access |watches_| safely.
+ message_loop()->PostTask(
+ FROM_HERE,
+ Bind(&FilePathWatcherImpl::OnFilePathChanged, this,
+ fired_watch, child, created, deleted, is_dir));
+ return;
+ }
+
+ // Check to see if CancelOnMessageLoopThread() has already been called.
+ // May happen when code flow reaches here from the PostTask() above.
+ if (watches_.empty()) {
+ DCHECK(target_.empty());
return;
}
DCHECK(MessageLoopForIO::current());
+ DCHECK(HasValidWatchVector());
+
+ // Used below to avoid multiple recursive updates.
+ bool did_update = false;
// Find the entry in |watches_| that corresponds to |fired_watch|.
- WatchVector::const_iterator watch_entry(watches_.begin());
- for ( ; watch_entry != watches_.end(); ++watch_entry) {
- if (fired_watch == watch_entry->watch_) {
- // Check whether a path component of |target_| changed.
- bool change_on_target_path = child.empty() ||
- ((child == watch_entry->subdir_) && watch_entry->linkname_.empty()) ||
- (child == watch_entry->linkname_);
-
- // Check whether the change references |target_| or a direct child.
- DCHECK(watch_entry->subdir_.empty() ||
- (watch_entry + 1) != watches_.end());
- bool target_changed =
- (watch_entry->subdir_.empty() && (child == watch_entry->linkname_)) ||
- (watch_entry->subdir_.empty() && watch_entry->linkname_.empty()) ||
- (watch_entry->subdir_ == child && (watch_entry + 1)->subdir_.empty());
-
- // Update watches if a directory component of the |target_| path
- // (dis)appears. Note that we don't add the additional restriction
- // of checking the event mask to see if it is for a directory here
- // as changes to symlinks on the target path will not have
- // IN_ISDIR set in the event masks. As a result we may sometimes
- // call UpdateWatches() unnecessarily.
- if (change_on_target_path && !UpdateWatches()) {
- callback_.Run(target_, true /* error */);
- return;
- }
+ for (size_t i = 0; i < watches_.size(); ++i) {
+ const WatchEntry& watch_entry = watches_[i];
+ if (fired_watch != watch_entry.watch)
+ continue;
+
+ // Check whether a path component of |target_| changed.
+ bool change_on_target_path =
+ child.empty() ||
+ (child == watch_entry.linkname) ||
+ (child == watch_entry.subdir);
+
+ // Check if the change references |target_| or a direct child of |target_|.
+ bool is_watch_for_target = watch_entry.subdir.empty();
+ bool target_changed =
+ (is_watch_for_target && (child == watch_entry.linkname)) ||
+ (is_watch_for_target && watch_entry.linkname.empty()) ||
+ (watch_entry.subdir == child && watches_[i + 1].subdir.empty());
+
+ // Update watches if a directory component of the |target_| path
+ // (dis)appears. Note that we don't add the additional restriction of
+ // checking the event mask to see if it is for a directory here as changes
+ // to symlinks on the target path will not have IN_ISDIR set in the event
+ // masks. As a result we may sometimes call UpdateWatches() unnecessarily.
+ if (change_on_target_path && (created || deleted) && !did_update) {
+ UpdateWatches();
+ did_update = true;
+ }
- // Report the following events:
- // - The target or a direct child of the target got changed (in case the
- // watched path refers to a directory).
- // - One of the parent directories got moved or deleted, since the target
- // disappears in this case.
- // - One of the parent directories appears. The event corresponding to
- // the target appearing might have been missed in this case, so
- // recheck.
- if (target_changed ||
- (change_on_target_path && !created) ||
- (change_on_target_path && PathExists(target_))) {
- callback_.Run(target_, false);
- return;
+ // Report the following events:
+ // - The target or a direct child of the target got changed (in case the
+ // watched path refers to a directory).
+ // - One of the parent directories got moved or deleted, since the target
+ // disappears in this case.
+ // - One of the parent directories appears. The event corresponding to
+ // the target appearing might have been missed in this case, so recheck.
+ if (target_changed ||
+ (change_on_target_path && deleted) ||
+ (change_on_target_path && created && PathExists(target_))) {
+ if (!did_update) {
+ UpdateRecursiveWatches(fired_watch, is_dir);
+ did_update = true;
}
+ callback_.Run(target_, false /* error */);
+ return;
}
}
+
+ if (ContainsKey(recursive_paths_by_watch_, fired_watch)) {
+ if (!did_update)
+ UpdateRecursiveWatches(fired_watch, is_dir);
+ callback_.Run(target_, false /* error */);
+ }
}
bool FilePathWatcherImpl::Watch(const FilePath& path,
@@ -370,120 +428,238 @@ bool FilePathWatcherImpl::Watch(const FilePath& path,
const FilePathWatcher::Callback& callback) {
DCHECK(target_.empty());
DCHECK(MessageLoopForIO::current());
- if (recursive) {
- // Recursive watch is not supported on this platform.
- NOTIMPLEMENTED();
- return false;
- }
set_message_loop(MessageLoopProxy::current().get());
callback_ = callback;
target_ = path;
+ recursive_ = recursive;
MessageLoop::current()->AddDestructionObserver(this);
std::vector<FilePath::StringType> comps;
target_.GetComponents(&comps);
DCHECK(!comps.empty());
- std::vector<FilePath::StringType>::const_iterator comp = comps.begin();
- for (++comp; comp != comps.end(); ++comp)
- watches_.push_back(WatchEntry(InotifyReader::kInvalidWatch, *comp));
-
- watches_.push_back(WatchEntry(InotifyReader::kInvalidWatch,
- FilePath::StringType()));
- return UpdateWatches();
+ for (size_t i = 1; i < comps.size(); ++i)
+ watches_.push_back(WatchEntry(comps[i]));
+ watches_.push_back(WatchEntry(FilePath::StringType()));
+ UpdateWatches();
+ return true;
}
void FilePathWatcherImpl::Cancel() {
if (callback_.is_null()) {
- // Watch was never called, or the |message_loop_| thread is already gone.
+ // Watch was never called, or the message_loop() thread is already gone.
set_cancelled();
return;
}
- // Switch to the message_loop_ if necessary so we can access |watches_|.
+ // Switch to the message_loop() if necessary so we can access |watches_|.
if (!message_loop()->BelongsToCurrentThread()) {
message_loop()->PostTask(FROM_HERE,
Bind(&FilePathWatcher::CancelWatch,
- make_scoped_refptr(this)));
+ make_scoped_refptr(this)));
} else {
CancelOnMessageLoopThread();
}
}
void FilePathWatcherImpl::CancelOnMessageLoopThread() {
- if (!is_cancelled())
- set_cancelled();
+ DCHECK(message_loop()->BelongsToCurrentThread());
+ set_cancelled();
if (!callback_.is_null()) {
MessageLoop::current()->RemoveDestructionObserver(this);
callback_.Reset();
}
- for (WatchVector::iterator watch_entry(watches_.begin());
- watch_entry != watches_.end(); ++watch_entry) {
- if (watch_entry->watch_ != InotifyReader::kInvalidWatch)
- g_inotify_reader.Get().RemoveWatch(watch_entry->watch_, this);
- }
+ for (size_t i = 0; i < watches_.size(); ++i)
+ g_inotify_reader.Get().RemoveWatch(watches_[i].watch, this);
watches_.clear();
target_.clear();
+
+ if (recursive_)
+ RemoveRecursiveWatches();
}
void FilePathWatcherImpl::WillDestroyCurrentMessageLoop() {
CancelOnMessageLoopThread();
}
-bool FilePathWatcherImpl::UpdateWatches() {
- // Ensure this runs on the |message_loop_| exclusively in order to avoid
+void FilePathWatcherImpl::UpdateWatches() {
+ // Ensure this runs on the message_loop() exclusively in order to avoid
// concurrency issues.
DCHECK(message_loop()->BelongsToCurrentThread());
+ DCHECK(HasValidWatchVector());
// Walk the list of watches and update them as we go.
FilePath path(FILE_PATH_LITERAL("/"));
bool path_valid = true;
- for (WatchVector::iterator watch_entry(watches_.begin());
- watch_entry != watches_.end(); ++watch_entry) {
- InotifyReader::Watch old_watch = watch_entry->watch_;
+ for (size_t i = 0; i < watches_.size(); ++i) {
+ WatchEntry& watch_entry = watches_[i];
+ InotifyReader::Watch old_watch = watch_entry.watch;
+ watch_entry.watch = InotifyReader::kInvalidWatch;
+ watch_entry.linkname.clear();
if (path_valid) {
- watch_entry->watch_ = g_inotify_reader.Get().AddWatch(path, this);
- if ((watch_entry->watch_ == InotifyReader::kInvalidWatch) &&
- base::IsLink(path)) {
- FilePath link;
- if (ReadSymbolicLink(path, &link)) {
- if (!link.IsAbsolute())
- link = path.DirName().Append(link);
- // Try watching symlink target directory. If the link target is "/",
- // then we shouldn't get here in normal situations and if we do, we'd
- // watch "/" for changes to a component "/" which is harmless so no
- // special treatment of this case is required.
- watch_entry->watch_ =
- g_inotify_reader.Get().AddWatch(link.DirName(), this);
- if (watch_entry->watch_ != InotifyReader::kInvalidWatch) {
- watch_entry->linkname_ = link.BaseName().value();
- } else {
- DPLOG(WARNING) << "Watch failed for " << link.DirName().value();
- // TODO(craig) Symlinks only work if the parent directory
- // for the target exist. Ideally we should make sure we've
- // watched all the components of the symlink path for
- // changes. See crbug.com/91561 for details.
- }
+ watch_entry.watch = g_inotify_reader.Get().AddWatch(path, this);
+ if (watch_entry.watch == InotifyReader::kInvalidWatch) {
+ if (IsLink(path)) {
+ path_valid = AddWatchForBrokenSymlink(path, &watch_entry);
+ } else {
+ path_valid = false;
}
}
- if (watch_entry->watch_ == InotifyReader::kInvalidWatch) {
- path_valid = false;
- }
- } else {
- watch_entry->watch_ = InotifyReader::kInvalidWatch;
}
- if (old_watch != InotifyReader::kInvalidWatch &&
- old_watch != watch_entry->watch_) {
+ if (old_watch != watch_entry.watch)
g_inotify_reader.Get().RemoveWatch(old_watch, this);
+ path = path.Append(watch_entry.subdir);
+ }
+
+ UpdateRecursiveWatches(InotifyReader::kInvalidWatch,
+ false /* is directory? */);
+}
+
+void FilePathWatcherImpl::UpdateRecursiveWatches(
+ InotifyReader::Watch fired_watch,
+ bool is_dir) {
+ if (!recursive_)
+ return;
+
+ if (!DirectoryExists(target_)) {
+ RemoveRecursiveWatches();
+ return;
+ }
+
+ // Check to see if this is a forced update or if some component of |target_|
+ // has changed. For these cases, redo the watches for |target_| and below.
+ if (!ContainsKey(recursive_paths_by_watch_, fired_watch)) {
+ UpdateRecursiveWatchesForPath(target_);
+ return;
+ }
+
+ // Underneath |target_|, only directory changes trigger watch updates.
+ if (!is_dir)
+ return;
+
+ const FilePath& changed_dir = recursive_paths_by_watch_[fired_watch];
+
+ std::map<FilePath, InotifyReader::Watch>::iterator start_it =
+ recursive_watches_by_path_.lower_bound(changed_dir);
+ std::map<FilePath, InotifyReader::Watch>::iterator end_it = start_it;
+ for (; end_it != recursive_watches_by_path_.end(); ++end_it) {
+ const FilePath& cur_path = end_it->first;
+ if (!changed_dir.IsParent(cur_path))
+ break;
+ if (!DirectoryExists(cur_path))
+ g_inotify_reader.Get().RemoveWatch(end_it->second, this);
+ }
+ recursive_watches_by_path_.erase(start_it, end_it);
+ UpdateRecursiveWatchesForPath(changed_dir);
+}
+
+void FilePathWatcherImpl::UpdateRecursiveWatchesForPath(const FilePath& path) {
+ DCHECK(recursive_);
+ DCHECK(!path.empty());
+ DCHECK(DirectoryExists(path));
+
+ // Note: SHOW_SYM_LINKS exposes symlinks as symlinks, so they are ignored
+ // rather than followed. Following symlinks can easily lead to the undesirable
+ // situation where the entire file system is being watched.
+ FileEnumerator enumerator(
+ path,
+ true /* recursive enumeration */,
+ FileEnumerator::DIRECTORIES | FileEnumerator::SHOW_SYM_LINKS);
+ for (FilePath current = enumerator.Next();
+ !current.empty();
+ current = enumerator.Next()) {
+ DCHECK(enumerator.GetInfo().IsDirectory());
+
+ if (!ContainsKey(recursive_watches_by_path_, current)) {
+ // Add new watches.
+ InotifyReader::Watch watch =
+ g_inotify_reader.Get().AddWatch(current, this);
+ TrackWatchForRecursion(watch, current);
+ } else {
+ // Update existing watches.
+ InotifyReader::Watch old_watch = recursive_watches_by_path_[current];
+ DCHECK_NE(InotifyReader::kInvalidWatch, old_watch);
+ InotifyReader::Watch watch =
+ g_inotify_reader.Get().AddWatch(current, this);
+ if (watch != old_watch) {
+ g_inotify_reader.Get().RemoveWatch(old_watch, this);
+ recursive_paths_by_watch_.erase(old_watch);
+ recursive_watches_by_path_.erase(current);
+ TrackWatchForRecursion(watch, current);
+ }
}
- path = path.Append(watch_entry->subdir_);
}
+}
+
+void FilePathWatcherImpl::TrackWatchForRecursion(InotifyReader::Watch watch,
+ const FilePath& path) {
+ DCHECK(recursive_);
+ DCHECK(!path.empty());
+ DCHECK(target_.IsParent(path));
+
+ if (watch == InotifyReader::kInvalidWatch)
+ return;
+
+ DCHECK(!ContainsKey(recursive_paths_by_watch_, watch));
+ DCHECK(!ContainsKey(recursive_watches_by_path_, path));
+ recursive_paths_by_watch_[watch] = path;
+ recursive_watches_by_path_[path] = watch;
+}
+
+void FilePathWatcherImpl::RemoveRecursiveWatches() {
+ if (!recursive_)
+ return;
+
+ for (hash_map<InotifyReader::Watch, FilePath>::const_iterator it =
+ recursive_paths_by_watch_.begin();
+ it != recursive_paths_by_watch_.end();
+ ++it) {
+ g_inotify_reader.Get().RemoveWatch(it->first, this);
+ }
+ recursive_paths_by_watch_.clear();
+ recursive_watches_by_path_.clear();
+}
+bool FilePathWatcherImpl::AddWatchForBrokenSymlink(const FilePath& path,
+ WatchEntry* watch_entry) {
+ DCHECK_EQ(InotifyReader::kInvalidWatch, watch_entry->watch);
+ FilePath link;
+ if (!ReadSymbolicLink(path, &link))
+ return false;
+
+ if (!link.IsAbsolute())
+ link = path.DirName().Append(link);
+
+ // Try watching symlink target directory. If the link target is "/", then we
+ // shouldn't get here in normal situations and if we do, we'd watch "/" for
+ // changes to a component "/" which is harmless so no special treatment of
+ // this case is required.
+ InotifyReader::Watch watch =
+ g_inotify_reader.Get().AddWatch(link.DirName(), this);
+ if (watch == InotifyReader::kInvalidWatch) {
+ // TODO(craig) Symlinks only work if the parent directory for the target
+ // exist. Ideally we should make sure we've watched all the components of
+ // the symlink path for changes. See crbug.com/91561 for details.
+ DPLOG(WARNING) << "Watch failed for " << link.DirName().value();
+ return false;
+ }
+ watch_entry->watch = watch;
+ watch_entry->linkname = link.BaseName().value();
return true;
}
+bool FilePathWatcherImpl::HasValidWatchVector() const {
+ if (watches_.empty())
+ return false;
+ for (size_t i = 0; i < watches_.size() - 1; ++i) {
+ if (watches_[i].subdir.empty())
+ return false;
+ }
+ return watches_[watches_.size() - 1].subdir.empty();
+}
+
} // namespace
FilePathWatcher::FilePathWatcher() {
diff --git a/chromium/base/files/file_path_watcher_mac.cc b/chromium/base/files/file_path_watcher_mac.cc
new file mode 100644
index 00000000000..54ca46d12bb
--- /dev/null
+++ b/chromium/base/files/file_path_watcher_mac.cc
@@ -0,0 +1,60 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/files/file_path_watcher.h"
+#include "base/files/file_path_watcher_kqueue.h"
+
+#if !defined(OS_IOS)
+#include "base/files/file_path_watcher_fsevents.h"
+#endif
+
+namespace base {
+
+namespace {
+
+class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate {
+ public:
+ virtual bool Watch(const FilePath& path,
+ bool recursive,
+ const FilePathWatcher::Callback& callback) OVERRIDE {
+ // Use kqueue for non-recursive watches and FSEvents for recursive ones.
+ DCHECK(!impl_.get());
+ if (recursive) {
+ if (!FilePathWatcher::RecursiveWatchAvailable())
+ return false;
+#if !defined(OS_IOS)
+ impl_ = new FilePathWatcherFSEvents();
+#endif // OS_IOS
+ } else {
+ impl_ = new FilePathWatcherKQueue();
+ }
+ DCHECK(impl_.get());
+ return impl_->Watch(path, recursive, callback);
+ }
+
+ virtual void Cancel() OVERRIDE {
+ if (impl_)
+ impl_->Cancel();
+ set_cancelled();
+ }
+
+ virtual void CancelOnMessageLoopThread() OVERRIDE {
+ if (impl_)
+ impl_->Cancel();
+ set_cancelled();
+ }
+
+ protected:
+ virtual ~FilePathWatcherImpl() {}
+
+ scoped_refptr<PlatformDelegate> impl_;
+};
+
+} // namespace
+
+FilePathWatcher::FilePathWatcher() {
+ impl_ = new FilePathWatcherImpl();
+}
+
+} // namespace base
diff --git a/chromium/base/files/file_path_watcher_win.cc b/chromium/base/files/file_path_watcher_win.cc
index 2abbceacd29..6c10c12d313 100644
--- a/chromium/base/files/file_path_watcher_win.cc
+++ b/chromium/base/files/file_path_watcher_win.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/file_util.h"
+#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
@@ -96,6 +97,12 @@ bool FilePathWatcherImpl::Watch(const FilePath& path,
recursive_watch_ = recursive;
MessageLoop::current()->AddDestructionObserver(this);
+ File::Info file_info;
+ if (GetFileInfo(target_, &file_info)) {
+ last_modified_ = file_info.last_modified;
+ first_notification_ = Time::Now();
+ }
+
if (!UpdateWatch())
return false;
@@ -122,6 +129,7 @@ void FilePathWatcherImpl::Cancel() {
}
void FilePathWatcherImpl::CancelOnMessageLoopThread() {
+ DCHECK(message_loop()->BelongsToCurrentThread());
set_cancelled();
if (handle_ != INVALID_HANDLE_VALUE)
@@ -148,14 +156,23 @@ void FilePathWatcherImpl::OnObjectSignaled(HANDLE object) {
}
// Check whether the event applies to |target_| and notify the callback.
- PlatformFileInfo file_info;
+ File::Info file_info;
bool file_exists = GetFileInfo(target_, &file_info);
- if (file_exists && (last_modified_.is_null() ||
- last_modified_ != file_info.last_modified)) {
+ if (recursive_watch_) {
+ // Only the mtime of |target_| is tracked but in a recursive watch,
+ // some other file or directory may have changed so all notifications
+ // are passed through. It is possible to figure out which file changed
+ // using ReadDirectoryChangesW() instead of FindFirstChangeNotification(),
+ // but that function is quite complicated:
+ // http://qualapps.blogspot.com/2010/05/understanding-readdirectorychangesw.html
+ callback_.Run(target_, false);
+ } else if (file_exists && (last_modified_.is_null() ||
+ last_modified_ != file_info.last_modified)) {
last_modified_ = file_info.last_modified;
first_notification_ = Time::Now();
callback_.Run(target_, false);
- } else if (file_exists && !first_notification_.is_null()) {
+ } else if (file_exists && last_modified_ == file_info.last_modified &&
+ !first_notification_.is_null()) {
// The target's last modification time is equal to what's on record. This
// means that either an unrelated event occurred, or the target changed
// again (file modification times only have a resolution of 1s). Comparing
@@ -229,12 +246,6 @@ bool FilePathWatcherImpl::UpdateWatch() {
if (handle_ != INVALID_HANDLE_VALUE)
DestroyWatch();
- PlatformFileInfo file_info;
- if (GetFileInfo(target_, &file_info)) {
- last_modified_ = file_info.last_modified;
- first_notification_ = Time::Now();
- }
-
// Start at the target and walk up the directory chain until we succesfully
// create a watch handle in |handle_|. |child_dirs| keeps a stack of child
// directories stripped from target, in reverse order.
diff --git a/chromium/base/files/file_posix.cc b/chromium/base/files/file_posix.cc
index 9d97c336aa6..0764ee98660 100644
--- a/chromium/base/files/file_posix.cc
+++ b/chromium/base/files/file_posix.cc
@@ -32,13 +32,11 @@ COMPILE_ASSERT(File::FROM_BEGIN == SEEK_SET &&
namespace {
#if defined(OS_BSD) || defined(OS_MACOSX) || defined(OS_NACL)
-typedef struct stat stat_wrapper_t;
static int CallFstat(int fd, stat_wrapper_t *sb) {
base::ThreadRestrictions::AssertIOAllowed();
return fstat(fd, sb);
}
#else
-typedef struct stat64 stat_wrapper_t;
static int CallFstat(int fd, stat_wrapper_t *sb) {
base::ThreadRestrictions::AssertIOAllowed();
return fstat64(fd, sb);
@@ -119,13 +117,63 @@ static File::Error CallFctnlFlock(PlatformFile file, bool do_lock) {
} // namespace
+void File::Info::FromStat(const stat_wrapper_t& stat_info) {
+ is_directory = S_ISDIR(stat_info.st_mode);
+ is_symbolic_link = S_ISLNK(stat_info.st_mode);
+ size = stat_info.st_size;
+
+#if defined(OS_LINUX)
+ time_t last_modified_sec = stat_info.st_mtim.tv_sec;
+ int64 last_modified_nsec = stat_info.st_mtim.tv_nsec;
+ time_t last_accessed_sec = stat_info.st_atim.tv_sec;
+ int64 last_accessed_nsec = stat_info.st_atim.tv_nsec;
+ time_t creation_time_sec = stat_info.st_ctim.tv_sec;
+ int64 creation_time_nsec = stat_info.st_ctim.tv_nsec;
+#elif defined(OS_ANDROID)
+ time_t last_modified_sec = stat_info.st_mtime;
+ int64 last_modified_nsec = stat_info.st_mtime_nsec;
+ time_t last_accessed_sec = stat_info.st_atime;
+ int64 last_accessed_nsec = stat_info.st_atime_nsec;
+ time_t creation_time_sec = stat_info.st_ctime;
+ int64 creation_time_nsec = stat_info.st_ctime_nsec;
+#elif defined(OS_MACOSX) || defined(OS_IOS) || defined(OS_BSD)
+ time_t last_modified_sec = stat_info.st_mtimespec.tv_sec;
+ int64 last_modified_nsec = stat_info.st_mtimespec.tv_nsec;
+ time_t last_accessed_sec = stat_info.st_atimespec.tv_sec;
+ int64 last_accessed_nsec = stat_info.st_atimespec.tv_nsec;
+ time_t creation_time_sec = stat_info.st_ctimespec.tv_sec;
+ int64 creation_time_nsec = stat_info.st_ctimespec.tv_nsec;
+#else
+ time_t last_modified_sec = stat_info.st_mtime;
+ int64 last_modified_nsec = 0;
+ time_t last_accessed_sec = stat_info.st_atime;
+ int64 last_accessed_nsec = 0;
+ time_t creation_time_sec = stat_info.st_ctime;
+ int64 creation_time_nsec = 0;
+#endif
+
+ last_modified =
+ Time::FromTimeT(last_modified_sec) +
+ TimeDelta::FromMicroseconds(last_modified_nsec /
+ Time::kNanosecondsPerMicrosecond);
+
+ last_accessed =
+ Time::FromTimeT(last_accessed_sec) +
+ TimeDelta::FromMicroseconds(last_accessed_nsec /
+ Time::kNanosecondsPerMicrosecond);
+
+ creation_time =
+ Time::FromTimeT(creation_time_sec) +
+ TimeDelta::FromMicroseconds(creation_time_nsec /
+ Time::kNanosecondsPerMicrosecond);
+}
+
// NaCl doesn't implement system calls to open files directly.
#if !defined(OS_NACL)
// TODO(erikkay): does it make sense to support FLAG_EXCLUSIVE_* here?
-void File::CreateBaseFileUnsafe(const FilePath& name, uint32 flags) {
+void File::InitializeUnsafe(const FilePath& name, uint32 flags) {
base::ThreadRestrictions::AssertIOAllowed();
DCHECK(!IsValid());
- DCHECK(!(flags & FLAG_ASYNC));
int open_flags = 0;
if (flags & FLAG_CREATE)
@@ -135,6 +183,7 @@ void File::CreateBaseFileUnsafe(const FilePath& name, uint32 flags) {
if (flags & FLAG_CREATE_ALWAYS) {
DCHECK(!open_flags);
+ DCHECK(flags & FLAG_WRITE);
open_flags = O_CREAT | O_TRUNC;
}
@@ -147,7 +196,7 @@ void File::CreateBaseFileUnsafe(const FilePath& name, uint32 flags) {
if (!open_flags && !(flags & FLAG_OPEN) && !(flags & FLAG_OPEN_ALWAYS)) {
NOTREACHED();
errno = EOPNOTSUPP;
- error_ = FILE_ERROR_FAILED;
+ error_details_ = FILE_ERROR_FAILED;
return;
}
@@ -191,47 +240,51 @@ void File::CreateBaseFileUnsafe(const FilePath& name, uint32 flags) {
}
}
- if (descriptor >= 0 && (flags & (FLAG_CREATE_ALWAYS | FLAG_CREATE)))
+ if (descriptor < 0) {
+ error_details_ = File::OSErrorToFileError(errno);
+ return;
+ }
+
+ if (flags & (FLAG_CREATE_ALWAYS | FLAG_CREATE))
created_ = true;
- if ((descriptor >= 0) && (flags & FLAG_DELETE_ON_CLOSE))
+ if (flags & FLAG_DELETE_ON_CLOSE)
unlink(name.value().c_str());
- if (descriptor >= 0)
- error_ = FILE_OK;
- else
- error_ = File::OSErrorToFileError(errno);
-
- file_ = descriptor;
+ async_ = ((flags & FLAG_ASYNC) == FLAG_ASYNC);
+ error_details_ = FILE_OK;
+ file_.reset(descriptor);
}
#endif // !defined(OS_NACL)
bool File::IsValid() const {
- return file_ >= 0;
+ return file_.is_valid();
+}
+
+PlatformFile File::GetPlatformFile() const {
+ return file_.get();
}
PlatformFile File::TakePlatformFile() {
- PlatformFile file = file_;
- file_ = kInvalidPlatformFileValue;
- return file;
+ return file_.release();
}
void File::Close() {
- base::ThreadRestrictions::AssertIOAllowed();
if (!IsValid())
return;
- if (!IGNORE_EINTR(close(file_)))
- file_ = kInvalidPlatformFileValue;
+ base::ThreadRestrictions::AssertIOAllowed();
+ file_.reset();
}
int64 File::Seek(Whence whence, int64 offset) {
base::ThreadRestrictions::AssertIOAllowed();
DCHECK(IsValid());
- if (file_ < 0 || offset < 0)
+ if (offset < 0)
return -1;
- return lseek(file_, static_cast<off_t>(offset), static_cast<int>(whence));
+ return lseek(file_.get(), static_cast<off_t>(offset),
+ static_cast<int>(whence));
}
int File::Read(int64 offset, char* data, int size) {
@@ -243,7 +296,7 @@ int File::Read(int64 offset, char* data, int size) {
int bytes_read = 0;
int rv;
do {
- rv = HANDLE_EINTR(pread(file_, data + bytes_read,
+ rv = HANDLE_EINTR(pread(file_.get(), data + bytes_read,
size - bytes_read, offset + bytes_read));
if (rv <= 0)
break;
@@ -263,7 +316,7 @@ int File::ReadAtCurrentPos(char* data, int size) {
int bytes_read = 0;
int rv;
do {
- rv = HANDLE_EINTR(read(file_, data, size));
+ rv = HANDLE_EINTR(read(file_.get(), data + bytes_read, size - bytes_read));
if (rv <= 0)
break;
@@ -277,7 +330,7 @@ int File::ReadNoBestEffort(int64 offset, char* data, int size) {
base::ThreadRestrictions::AssertIOAllowed();
DCHECK(IsValid());
- return HANDLE_EINTR(pread(file_, data, size, offset));
+ return HANDLE_EINTR(pread(file_.get(), data, size, offset));
}
int File::ReadAtCurrentPosNoBestEffort(char* data, int size) {
@@ -286,13 +339,13 @@ int File::ReadAtCurrentPosNoBestEffort(char* data, int size) {
if (size < 0)
return -1;
- return HANDLE_EINTR(read(file_, data, size));
+ return HANDLE_EINTR(read(file_.get(), data, size));
}
int File::Write(int64 offset, const char* data, int size) {
base::ThreadRestrictions::AssertIOAllowed();
- if (IsOpenAppend(file_))
+ if (IsOpenAppend(file_.get()))
return WriteAtCurrentPos(data, size);
DCHECK(IsValid());
@@ -302,7 +355,7 @@ int File::Write(int64 offset, const char* data, int size) {
int bytes_written = 0;
int rv;
do {
- rv = HANDLE_EINTR(pwrite(file_, data + bytes_written,
+ rv = HANDLE_EINTR(pwrite(file_.get(), data + bytes_written,
size - bytes_written, offset + bytes_written));
if (rv <= 0)
break;
@@ -322,7 +375,8 @@ int File::WriteAtCurrentPos(const char* data, int size) {
int bytes_written = 0;
int rv;
do {
- rv = HANDLE_EINTR(write(file_, data, size));
+ rv = HANDLE_EINTR(write(file_.get(), data + bytes_written,
+ size - bytes_written));
if (rv <= 0)
break;
@@ -338,19 +392,29 @@ int File::WriteAtCurrentPosNoBestEffort(const char* data, int size) {
if (size < 0)
return -1;
- return HANDLE_EINTR(write(file_, data, size));
+ return HANDLE_EINTR(write(file_.get(), data, size));
}
-bool File::Truncate(int64 length) {
+int64 File::GetLength() {
+ DCHECK(IsValid());
+
+ stat_wrapper_t file_info;
+ if (CallFstat(file_.get(), &file_info))
+ return false;
+
+ return file_info.st_size;
+}
+
+bool File::SetLength(int64 length) {
base::ThreadRestrictions::AssertIOAllowed();
DCHECK(IsValid());
- return !CallFtruncate(file_, length);
+ return !CallFtruncate(file_.get(), length);
}
bool File::Flush() {
base::ThreadRestrictions::AssertIOAllowed();
DCHECK(IsValid());
- return !CallFsync(file_);
+ return !CallFsync(file_.get());
}
bool File::SetTimes(Time last_access_time, Time last_modified_time) {
@@ -361,72 +425,26 @@ bool File::SetTimes(Time last_access_time, Time last_modified_time) {
times[0] = last_access_time.ToTimeVal();
times[1] = last_modified_time.ToTimeVal();
- return !CallFutimes(file_, times);
+ return !CallFutimes(file_.get(), times);
}
bool File::GetInfo(Info* info) {
DCHECK(IsValid());
stat_wrapper_t file_info;
- if (CallFstat(file_, &file_info))
+ if (CallFstat(file_.get(), &file_info))
return false;
- info->is_directory = S_ISDIR(file_info.st_mode);
- info->is_symbolic_link = S_ISLNK(file_info.st_mode);
- info->size = file_info.st_size;
-
-#if defined(OS_LINUX)
- const time_t last_modified_sec = file_info.st_mtim.tv_sec;
- const int64 last_modified_nsec = file_info.st_mtim.tv_nsec;
- const time_t last_accessed_sec = file_info.st_atim.tv_sec;
- const int64 last_accessed_nsec = file_info.st_atim.tv_nsec;
- const time_t creation_time_sec = file_info.st_ctim.tv_sec;
- const int64 creation_time_nsec = file_info.st_ctim.tv_nsec;
-#elif defined(OS_ANDROID)
- const time_t last_modified_sec = file_info.st_mtime;
- const int64 last_modified_nsec = file_info.st_mtime_nsec;
- const time_t last_accessed_sec = file_info.st_atime;
- const int64 last_accessed_nsec = file_info.st_atime_nsec;
- const time_t creation_time_sec = file_info.st_ctime;
- const int64 creation_time_nsec = file_info.st_ctime_nsec;
-#elif defined(OS_MACOSX) || defined(OS_IOS) || defined(OS_BSD)
- const time_t last_modified_sec = file_info.st_mtimespec.tv_sec;
- const int64 last_modified_nsec = file_info.st_mtimespec.tv_nsec;
- const time_t last_accessed_sec = file_info.st_atimespec.tv_sec;
- const int64 last_accessed_nsec = file_info.st_atimespec.tv_nsec;
- const time_t creation_time_sec = file_info.st_ctimespec.tv_sec;
- const int64 creation_time_nsec = file_info.st_ctimespec.tv_nsec;
-#else
- // TODO(gavinp): Investigate a good high resolution option for OS_NACL.
- const time_t last_modified_sec = file_info.st_mtime;
- const int64 last_modified_nsec = 0;
- const time_t last_accessed_sec = file_info.st_atime;
- const int64 last_accessed_nsec = 0;
- const time_t creation_time_sec = file_info.st_ctime;
- const int64 creation_time_nsec = 0;
-#endif
-
- info->last_modified =
- base::Time::FromTimeT(last_modified_sec) +
- base::TimeDelta::FromMicroseconds(last_modified_nsec /
- base::Time::kNanosecondsPerMicrosecond);
- info->last_accessed =
- base::Time::FromTimeT(last_accessed_sec) +
- base::TimeDelta::FromMicroseconds(last_accessed_nsec /
- base::Time::kNanosecondsPerMicrosecond);
- info->creation_time =
- base::Time::FromTimeT(creation_time_sec) +
- base::TimeDelta::FromMicroseconds(creation_time_nsec /
- base::Time::kNanosecondsPerMicrosecond);
+ info->FromStat(file_info);
return true;
}
File::Error File::Lock() {
- return CallFctnlFlock(file_, true);
+ return CallFctnlFlock(file_.get(), true);
}
File::Error File::Unlock() {
- return CallFctnlFlock(file_, false);
+ return CallFctnlFlock(file_.get(), false);
}
// Static.
@@ -463,8 +481,8 @@ File::Error File::OSErrorToFileError(int saved_errno) {
}
void File::SetPlatformFile(PlatformFile file) {
- DCHECK_EQ(file_, kInvalidPlatformFileValue);
- file_ = file;
+ DCHECK(!file_.is_valid());
+ file_.reset(file);
}
} // namespace base
diff --git a/chromium/base/files/file_proxy.cc b/chromium/base/files/file_proxy.cc
new file mode 100644
index 00000000000..291b98d1117
--- /dev/null
+++ b/chromium/base/files/file_proxy.cc
@@ -0,0 +1,359 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/files/file_proxy.h"
+
+#include "base/bind.h"
+#include "base/bind_helpers.h"
+#include "base/file_util.h"
+#include "base/files/file.h"
+#include "base/location.h"
+#include "base/message_loop/message_loop_proxy.h"
+#include "base/task_runner.h"
+#include "base/task_runner_util.h"
+
+namespace {
+
+void FileDeleter(base::File file) {
+}
+
+} // namespace
+
+namespace base {
+
+class FileHelper {
+ public:
+ FileHelper(FileProxy* proxy, File file)
+ : file_(file.Pass()),
+ error_(File::FILE_ERROR_FAILED),
+ task_runner_(proxy->task_runner()),
+ proxy_(AsWeakPtr(proxy)) {
+ }
+
+ void PassFile() {
+ if (proxy_)
+ proxy_->SetFile(file_.Pass());
+ else if (file_.IsValid())
+ task_runner_->PostTask(FROM_HERE, Bind(&FileDeleter, Passed(&file_)));
+ }
+
+ protected:
+ File file_;
+ File::Error error_;
+
+ private:
+ scoped_refptr<TaskRunner> task_runner_;
+ WeakPtr<FileProxy> proxy_;
+ DISALLOW_COPY_AND_ASSIGN(FileHelper);
+};
+
+namespace {
+
+class GenericFileHelper : public FileHelper {
+ public:
+ GenericFileHelper(FileProxy* proxy, File file)
+ : FileHelper(proxy, file.Pass()) {
+ }
+
+ void Close() {
+ file_.Close();
+ error_ = File::FILE_OK;
+ }
+
+ void SetTimes(Time last_access_time, Time last_modified_time) {
+ bool rv = file_.SetTimes(last_access_time, last_modified_time);
+ error_ = rv ? File::FILE_OK : File::FILE_ERROR_FAILED;
+ }
+
+ void SetLength(int64 length) {
+ if (file_.SetLength(length))
+ error_ = File::FILE_OK;
+ }
+
+ void Flush() {
+ if (file_.Flush())
+ error_ = File::FILE_OK;
+ }
+
+ void Reply(const FileProxy::StatusCallback& callback) {
+ PassFile();
+ if (!callback.is_null())
+ callback.Run(error_);
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GenericFileHelper);
+};
+
+class CreateOrOpenHelper : public FileHelper {
+ public:
+ CreateOrOpenHelper(FileProxy* proxy, File file)
+ : FileHelper(proxy, file.Pass()) {
+ }
+
+ void RunWork(const FilePath& file_path, int file_flags) {
+ file_.Initialize(file_path, file_flags);
+ error_ = file_.IsValid() ? File::FILE_OK : file_.error_details();
+ }
+
+ void Reply(const FileProxy::StatusCallback& callback) {
+ DCHECK(!callback.is_null());
+ PassFile();
+ callback.Run(error_);
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CreateOrOpenHelper);
+};
+
+class CreateTemporaryHelper : public FileHelper {
+ public:
+ CreateTemporaryHelper(FileProxy* proxy, File file)
+ : FileHelper(proxy, file.Pass()) {
+ }
+
+ void RunWork(uint32 additional_file_flags) {
+ // TODO(darin): file_util should have a variant of CreateTemporaryFile
+ // that returns a FilePath and a File.
+ if (!CreateTemporaryFile(&file_path_)) {
+ // TODO(davidben): base::CreateTemporaryFile should preserve the error
+ // code.
+ error_ = File::FILE_ERROR_FAILED;
+ return;
+ }
+
+ uint32 file_flags = File::FLAG_WRITE |
+ File::FLAG_TEMPORARY |
+ File::FLAG_CREATE_ALWAYS |
+ additional_file_flags;
+
+ file_.Initialize(file_path_, file_flags);
+ if (file_.IsValid()) {
+ error_ = File::FILE_OK;
+ } else {
+ error_ = file_.error_details();
+ DeleteFile(file_path_, false);
+ file_path_.clear();
+ }
+ }
+
+ void Reply(const FileProxy::CreateTemporaryCallback& callback) {
+ DCHECK(!callback.is_null());
+ PassFile();
+ callback.Run(error_, file_path_);
+ }
+
+ private:
+ FilePath file_path_;
+ DISALLOW_COPY_AND_ASSIGN(CreateTemporaryHelper);
+};
+
+class GetInfoHelper : public FileHelper {
+ public:
+ GetInfoHelper(FileProxy* proxy, File file)
+ : FileHelper(proxy, file.Pass()) {
+ }
+
+ void RunWork() {
+ if (file_.GetInfo(&file_info_))
+ error_ = File::FILE_OK;
+ }
+
+ void Reply(const FileProxy::GetFileInfoCallback& callback) {
+ PassFile();
+ DCHECK(!callback.is_null());
+ callback.Run(error_, file_info_);
+ }
+
+ private:
+ File::Info file_info_;
+ DISALLOW_COPY_AND_ASSIGN(GetInfoHelper);
+};
+
+class ReadHelper : public FileHelper {
+ public:
+ ReadHelper(FileProxy* proxy, File file, int bytes_to_read)
+ : FileHelper(proxy, file.Pass()),
+ buffer_(new char[bytes_to_read]),
+ bytes_to_read_(bytes_to_read),
+ bytes_read_(0) {
+ }
+
+ void RunWork(int64 offset) {
+ bytes_read_ = file_.Read(offset, buffer_.get(), bytes_to_read_);
+ error_ = (bytes_read_ < 0) ? File::FILE_ERROR_FAILED : File::FILE_OK;
+ }
+
+ void Reply(const FileProxy::ReadCallback& callback) {
+ PassFile();
+ DCHECK(!callback.is_null());
+ callback.Run(error_, buffer_.get(), bytes_read_);
+ }
+
+ private:
+ scoped_ptr<char[]> buffer_;
+ int bytes_to_read_;
+ int bytes_read_;
+ DISALLOW_COPY_AND_ASSIGN(ReadHelper);
+};
+
+class WriteHelper : public FileHelper {
+ public:
+ WriteHelper(FileProxy* proxy,
+ File file,
+ const char* buffer, int bytes_to_write)
+ : FileHelper(proxy, file.Pass()),
+ buffer_(new char[bytes_to_write]),
+ bytes_to_write_(bytes_to_write),
+ bytes_written_(0) {
+ memcpy(buffer_.get(), buffer, bytes_to_write);
+ }
+
+ void RunWork(int64 offset) {
+ bytes_written_ = file_.Write(offset, buffer_.get(), bytes_to_write_);
+ error_ = (bytes_written_ < 0) ? File::FILE_ERROR_FAILED : File::FILE_OK;
+ }
+
+ void Reply(const FileProxy::WriteCallback& callback) {
+ PassFile();
+ if (!callback.is_null())
+ callback.Run(error_, bytes_written_);
+ }
+
+ private:
+ scoped_ptr<char[]> buffer_;
+ int bytes_to_write_;
+ int bytes_written_;
+ DISALLOW_COPY_AND_ASSIGN(WriteHelper);
+};
+
+} // namespace
+
+FileProxy::FileProxy(TaskRunner* task_runner) : task_runner_(task_runner) {
+}
+
+FileProxy::~FileProxy() {
+ if (file_.IsValid())
+ task_runner_->PostTask(FROM_HERE, Bind(&FileDeleter, Passed(&file_)));
+}
+
+bool FileProxy::CreateOrOpen(const FilePath& file_path,
+ uint32 file_flags,
+ const StatusCallback& callback) {
+ DCHECK(!file_.IsValid());
+ CreateOrOpenHelper* helper = new CreateOrOpenHelper(this, File());
+ return task_runner_->PostTaskAndReply(
+ FROM_HERE,
+ Bind(&CreateOrOpenHelper::RunWork, Unretained(helper), file_path,
+ file_flags),
+ Bind(&CreateOrOpenHelper::Reply, Owned(helper), callback));
+}
+
+bool FileProxy::CreateTemporary(uint32 additional_file_flags,
+ const CreateTemporaryCallback& callback) {
+ DCHECK(!file_.IsValid());
+ CreateTemporaryHelper* helper = new CreateTemporaryHelper(this, File());
+ return task_runner_->PostTaskAndReply(
+ FROM_HERE,
+ Bind(&CreateTemporaryHelper::RunWork, Unretained(helper),
+ additional_file_flags),
+ Bind(&CreateTemporaryHelper::Reply, Owned(helper), callback));
+}
+
+bool FileProxy::IsValid() const {
+ return file_.IsValid();
+}
+
+void FileProxy::SetFile(File file) {
+ DCHECK(!file_.IsValid());
+ file_ = file.Pass();
+}
+
+File FileProxy::TakeFile() {
+ return file_.Pass();
+}
+
+PlatformFile FileProxy::GetPlatformFile() const {
+ return file_.GetPlatformFile();
+}
+
+bool FileProxy::Close(const StatusCallback& callback) {
+ DCHECK(file_.IsValid());
+ GenericFileHelper* helper = new GenericFileHelper(this, file_.Pass());
+ return task_runner_->PostTaskAndReply(
+ FROM_HERE,
+ Bind(&GenericFileHelper::Close, Unretained(helper)),
+ Bind(&GenericFileHelper::Reply, Owned(helper), callback));
+}
+
+bool FileProxy::GetInfo(const GetFileInfoCallback& callback) {
+ DCHECK(file_.IsValid());
+ GetInfoHelper* helper = new GetInfoHelper(this, file_.Pass());
+ return task_runner_->PostTaskAndReply(
+ FROM_HERE,
+ Bind(&GetInfoHelper::RunWork, Unretained(helper)),
+ Bind(&GetInfoHelper::Reply, Owned(helper), callback));
+}
+
+bool FileProxy::Read(int64 offset,
+ int bytes_to_read,
+ const ReadCallback& callback) {
+ DCHECK(file_.IsValid());
+ if (bytes_to_read < 0)
+ return false;
+
+ ReadHelper* helper = new ReadHelper(this, file_.Pass(), bytes_to_read);
+ return task_runner_->PostTaskAndReply(
+ FROM_HERE,
+ Bind(&ReadHelper::RunWork, Unretained(helper), offset),
+ Bind(&ReadHelper::Reply, Owned(helper), callback));
+}
+
+bool FileProxy::Write(int64 offset,
+ const char* buffer,
+ int bytes_to_write,
+ const WriteCallback& callback) {
+ DCHECK(file_.IsValid());
+ if (bytes_to_write <= 0 || buffer == NULL)
+ return false;
+
+ WriteHelper* helper =
+ new WriteHelper(this, file_.Pass(), buffer, bytes_to_write);
+ return task_runner_->PostTaskAndReply(
+ FROM_HERE,
+ Bind(&WriteHelper::RunWork, Unretained(helper), offset),
+ Bind(&WriteHelper::Reply, Owned(helper), callback));
+}
+
+bool FileProxy::SetTimes(Time last_access_time,
+ Time last_modified_time,
+ const StatusCallback& callback) {
+ DCHECK(file_.IsValid());
+ GenericFileHelper* helper = new GenericFileHelper(this, file_.Pass());
+ return task_runner_->PostTaskAndReply(
+ FROM_HERE,
+ Bind(&GenericFileHelper::SetTimes, Unretained(helper), last_access_time,
+ last_modified_time),
+ Bind(&GenericFileHelper::Reply, Owned(helper), callback));
+}
+
+bool FileProxy::SetLength(int64 length, const StatusCallback& callback) {
+ DCHECK(file_.IsValid());
+ GenericFileHelper* helper = new GenericFileHelper(this, file_.Pass());
+ return task_runner_->PostTaskAndReply(
+ FROM_HERE,
+ Bind(&GenericFileHelper::SetLength, Unretained(helper), length),
+ Bind(&GenericFileHelper::Reply, Owned(helper), callback));
+}
+
+bool FileProxy::Flush(const StatusCallback& callback) {
+ DCHECK(file_.IsValid());
+ GenericFileHelper* helper = new GenericFileHelper(this, file_.Pass());
+ return task_runner_->PostTaskAndReply(
+ FROM_HERE,
+ Bind(&GenericFileHelper::Flush, Unretained(helper)),
+ Bind(&GenericFileHelper::Reply, Owned(helper), callback));
+}
+
+} // namespace base
diff --git a/chromium/base/files/file_proxy.h b/chromium/base/files/file_proxy.h
new file mode 100644
index 00000000000..f990d044d37
--- /dev/null
+++ b/chromium/base/files/file_proxy.h
@@ -0,0 +1,142 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_FILES_FILE_PROXY_H_
+#define BASE_FILES_FILE_PROXY_H_
+
+#include "base/base_export.h"
+#include "base/callback_forward.h"
+#include "base/files/file.h"
+#include "base/files/file_path.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
+
+namespace tracked_objects {
+class Location;
+};
+
+namespace base {
+
+class TaskRunner;
+class Time;
+
+// This class provides asynchronous access to a File. All methods follow the
+// same rules of the equivalent File method, as they are implemented by bouncing
+// the operation to File using a TaskRunner.
+//
+// This class performs automatic proxying to close the underlying file at
+// destruction.
+//
+// The TaskRunner is in charge of any sequencing of the operations, but a single
+// operation can be proxied at a time, regardless of the use of a callback.
+// In other words, having a sequence like
+//
+// proxy.Write(...);
+// proxy.Write(...);
+//
+// means the second Write will always fail.
+class BASE_EXPORT FileProxy : public SupportsWeakPtr<FileProxy> {
+ public:
+ // This callback is used by methods that report only an error code. It is
+ // valid to pass a null callback to some functions that takes a
+ // StatusCallback, in which case the operation will complete silently.
+ typedef Callback<void(File::Error)> StatusCallback;
+
+ typedef Callback<void(File::Error,
+ const FilePath&)> CreateTemporaryCallback;
+ typedef Callback<void(File::Error,
+ const File::Info&)> GetFileInfoCallback;
+ typedef Callback<void(File::Error,
+ const char* data,
+ int bytes_read)> ReadCallback;
+ typedef Callback<void(File::Error,
+ int bytes_written)> WriteCallback;
+
+ FileProxy();
+ explicit FileProxy(TaskRunner* task_runner);
+ ~FileProxy();
+
+ // Creates or opens a file with the given flags. It is invalid to pass a null
+ // callback. If File::FLAG_CREATE is set in |file_flags| it always tries to
+ // create a new file at the given |file_path| and fails if the file already
+ // exists.
+ //
+ // This returns false if task posting to |task_runner| has failed.
+ bool CreateOrOpen(const FilePath& file_path,
+ uint32 file_flags,
+ const StatusCallback& callback);
+
+ // Creates a temporary file for writing. The path and an open file are
+ // returned. It is invalid to pass a null callback. The additional file flags
+ // will be added on top of the default file flags which are:
+ // File::FLAG_CREATE_ALWAYS
+ // File::FLAG_WRITE
+ // File::FLAG_TEMPORARY.
+ //
+ // This returns false if task posting to |task_runner| has failed.
+ bool CreateTemporary(uint32 additional_file_flags,
+ const CreateTemporaryCallback& callback);
+
+ // Returns true if the underlying |file_| is valid.
+ bool IsValid() const;
+
+ // Returns true if a new file was created (or an old one truncated to zero
+ // length to simulate a new file), and false otherwise.
+ bool created() const { return file_.created(); }
+
+ // Claims ownership of |file|. It is an error to call this method when
+ // IsValid() returns true.
+ void SetFile(File file);
+
+ File TakeFile();
+
+ PlatformFile GetPlatformFile() const;
+
+ // Proxies File::Close. The callback can be null.
+ // This returns false if task posting to |task_runner| has failed.
+ bool Close(const StatusCallback& callback);
+
+ // Proxies File::GetInfo. The callback can't be null.
+ // This returns false if task posting to |task_runner| has failed.
+ bool GetInfo(const GetFileInfoCallback& callback);
+
+ // Proxies File::Read. The callback can't be null.
+ // This returns false if |bytes_to_read| is less than zero, or
+ // if task posting to |task_runner| has failed.
+ bool Read(int64 offset, int bytes_to_read, const ReadCallback& callback);
+
+ // Proxies File::Write. The callback can be null.
+ // This returns false if |bytes_to_write| is less than or equal to zero,
+ // if |buffer| is NULL, or if task posting to |task_runner| has failed.
+ bool Write(int64 offset,
+ const char* buffer,
+ int bytes_to_write,
+ const WriteCallback& callback);
+
+ // Proxies File::SetTimes. The callback can be null.
+ // This returns false if task posting to |task_runner| has failed.
+ bool SetTimes(Time last_access_time,
+ Time last_modified_time,
+ const StatusCallback& callback);
+
+ // Proxies File::SetLength. The callback can be null.
+ // This returns false if task posting to |task_runner| has failed.
+ bool SetLength(int64 length, const StatusCallback& callback);
+
+ // Proxies File::Flush. The callback can be null.
+ // This returns false if task posting to |task_runner| has failed.
+ bool Flush(const StatusCallback& callback);
+
+ private:
+ friend class FileHelper;
+ TaskRunner* task_runner() { return task_runner_.get(); }
+
+ scoped_refptr<TaskRunner> task_runner_;
+ File file_;
+ DISALLOW_COPY_AND_ASSIGN(FileProxy);
+};
+
+} // namespace base
+
+#endif // BASE_FILES_FILE_PROXY_H_
diff --git a/chromium/base/files/file_proxy_unittest.cc b/chromium/base/files/file_proxy_unittest.cc
new file mode 100644
index 00000000000..9be8abf67d2
--- /dev/null
+++ b/chromium/base/files/file_proxy_unittest.cc
@@ -0,0 +1,370 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/files/file_proxy.h"
+
+#include "base/bind.h"
+#include "base/file_util.h"
+#include "base/files/file.h"
+#include "base/files/scoped_temp_dir.h"
+#include "base/memory/weak_ptr.h"
+#include "base/message_loop/message_loop.h"
+#include "base/threading/thread.h"
+#include "base/threading/thread_restrictions.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace base {
+
+class FileProxyTest : public testing::Test {
+ public:
+ FileProxyTest()
+ : file_thread_("FileProxyTestFileThread"),
+ error_(File::FILE_OK),
+ bytes_written_(-1),
+ weak_factory_(this) {}
+
+ virtual void SetUp() OVERRIDE {
+ ASSERT_TRUE(dir_.CreateUniqueTempDir());
+ ASSERT_TRUE(file_thread_.Start());
+ }
+
+ void DidFinish(File::Error error) {
+ error_ = error;
+ MessageLoop::current()->QuitWhenIdle();
+ }
+
+ void DidCreateOrOpen(File::Error error) {
+ error_ = error;
+ MessageLoop::current()->QuitWhenIdle();
+ }
+
+ void DidCreateTemporary(File::Error error,
+ const FilePath& path) {
+ error_ = error;
+ path_ = path;
+ MessageLoop::current()->QuitWhenIdle();
+ }
+
+ void DidGetFileInfo(File::Error error,
+ const File::Info& file_info) {
+ error_ = error;
+ file_info_ = file_info;
+ MessageLoop::current()->QuitWhenIdle();
+ }
+
+ void DidRead(File::Error error,
+ const char* data,
+ int bytes_read) {
+ error_ = error;
+ buffer_.resize(bytes_read);
+ memcpy(&buffer_[0], data, bytes_read);
+ MessageLoop::current()->QuitWhenIdle();
+ }
+
+ void DidWrite(File::Error error,
+ int bytes_written) {
+ error_ = error;
+ bytes_written_ = bytes_written;
+ MessageLoop::current()->QuitWhenIdle();
+ }
+
+ protected:
+ void CreateProxy(uint32 flags, FileProxy* proxy) {
+ proxy->CreateOrOpen(
+ test_path(), flags,
+ Bind(&FileProxyTest::DidCreateOrOpen, weak_factory_.GetWeakPtr()));
+ MessageLoop::current()->Run();
+ EXPECT_TRUE(proxy->IsValid());
+ }
+
+ TaskRunner* file_task_runner() const {
+ return file_thread_.message_loop_proxy().get();
+ }
+ const FilePath& test_dir_path() const { return dir_.path(); }
+ const FilePath test_path() const { return dir_.path().AppendASCII("test"); }
+
+ MessageLoopForIO message_loop_;
+ Thread file_thread_;
+
+ ScopedTempDir dir_;
+ File::Error error_;
+ FilePath path_;
+ File::Info file_info_;
+ std::vector<char> buffer_;
+ int bytes_written_;
+ WeakPtrFactory<FileProxyTest> weak_factory_;
+};
+
+TEST_F(FileProxyTest, CreateOrOpen_Create) {
+ FileProxy proxy(file_task_runner());
+ proxy.CreateOrOpen(
+ test_path(),
+ File::FLAG_CREATE | File::FLAG_READ,
+ Bind(&FileProxyTest::DidCreateOrOpen, weak_factory_.GetWeakPtr()));
+ MessageLoop::current()->Run();
+
+ EXPECT_EQ(File::FILE_OK, error_);
+ EXPECT_TRUE(proxy.IsValid());
+ EXPECT_TRUE(proxy.created());
+ EXPECT_TRUE(PathExists(test_path()));
+}
+
+TEST_F(FileProxyTest, CreateOrOpen_Open) {
+ // Creates a file.
+ base::WriteFile(test_path(), NULL, 0);
+ ASSERT_TRUE(PathExists(test_path()));
+
+ // Opens the created file.
+ FileProxy proxy(file_task_runner());
+ proxy.CreateOrOpen(
+ test_path(),
+ File::FLAG_OPEN | File::FLAG_READ,
+ Bind(&FileProxyTest::DidCreateOrOpen, weak_factory_.GetWeakPtr()));
+ MessageLoop::current()->Run();
+
+ EXPECT_EQ(File::FILE_OK, error_);
+ EXPECT_TRUE(proxy.IsValid());
+ EXPECT_FALSE(proxy.created());
+}
+
+TEST_F(FileProxyTest, CreateOrOpen_OpenNonExistent) {
+ FileProxy proxy(file_task_runner());
+ proxy.CreateOrOpen(
+ test_path(),
+ File::FLAG_OPEN | File::FLAG_READ,
+ Bind(&FileProxyTest::DidCreateOrOpen, weak_factory_.GetWeakPtr()));
+ MessageLoop::current()->Run();
+ EXPECT_EQ(File::FILE_ERROR_NOT_FOUND, error_);
+ EXPECT_FALSE(proxy.IsValid());
+ EXPECT_FALSE(proxy.created());
+ EXPECT_FALSE(PathExists(test_path()));
+}
+
+TEST_F(FileProxyTest, CreateOrOpen_AbandonedCreate) {
+ bool prev = ThreadRestrictions::SetIOAllowed(false);
+ {
+ FileProxy proxy(file_task_runner());
+ proxy.CreateOrOpen(
+ test_path(),
+ File::FLAG_CREATE | File::FLAG_READ,
+ Bind(&FileProxyTest::DidCreateOrOpen, weak_factory_.GetWeakPtr()));
+ }
+ MessageLoop::current()->Run();
+ ThreadRestrictions::SetIOAllowed(prev);
+
+ EXPECT_TRUE(PathExists(test_path()));
+}
+
+TEST_F(FileProxyTest, Close) {
+ // Creates a file.
+ FileProxy proxy(file_task_runner());
+ CreateProxy(File::FLAG_CREATE | File::FLAG_WRITE, &proxy);
+
+#if defined(OS_WIN)
+ // This fails on Windows if the file is not closed.
+ EXPECT_FALSE(base::Move(test_path(), test_dir_path().AppendASCII("new")));
+#endif
+
+ proxy.Close(Bind(&FileProxyTest::DidFinish, weak_factory_.GetWeakPtr()));
+ MessageLoop::current()->Run();
+ EXPECT_EQ(File::FILE_OK, error_);
+ EXPECT_FALSE(proxy.IsValid());
+
+ // Now it should pass on all platforms.
+ EXPECT_TRUE(base::Move(test_path(), test_dir_path().AppendASCII("new")));
+}
+
+TEST_F(FileProxyTest, CreateTemporary) {
+ {
+ FileProxy proxy(file_task_runner());
+ proxy.CreateTemporary(
+ 0 /* additional_file_flags */,
+ Bind(&FileProxyTest::DidCreateTemporary, weak_factory_.GetWeakPtr()));
+ MessageLoop::current()->Run();
+
+ EXPECT_TRUE(proxy.IsValid());
+ EXPECT_EQ(File::FILE_OK, error_);
+ EXPECT_TRUE(PathExists(path_));
+
+ // The file should be writable.
+ proxy.Write(0, "test", 4,
+ Bind(&FileProxyTest::DidWrite, weak_factory_.GetWeakPtr()));
+ MessageLoop::current()->Run();
+ EXPECT_EQ(File::FILE_OK, error_);
+ EXPECT_EQ(4, bytes_written_);
+ }
+
+ // Make sure the written data can be read from the returned path.
+ std::string data;
+ EXPECT_TRUE(ReadFileToString(path_, &data));
+ EXPECT_EQ("test", data);
+
+ // Make sure we can & do delete the created file to prevent leaks on the bots.
+ EXPECT_TRUE(base::DeleteFile(path_, false));
+}
+
+TEST_F(FileProxyTest, SetAndTake) {
+ File file(test_path(), File::FLAG_CREATE | File::FLAG_READ);
+ ASSERT_TRUE(file.IsValid());
+ FileProxy proxy(file_task_runner());
+ EXPECT_FALSE(proxy.IsValid());
+ proxy.SetFile(file.Pass());
+ EXPECT_TRUE(proxy.IsValid());
+ EXPECT_FALSE(file.IsValid());
+
+ file = proxy.TakeFile();
+ EXPECT_FALSE(proxy.IsValid());
+ EXPECT_TRUE(file.IsValid());
+}
+
+TEST_F(FileProxyTest, GetInfo) {
+ // Setup.
+ ASSERT_EQ(4, base::WriteFile(test_path(), "test", 4));
+ File::Info expected_info;
+ GetFileInfo(test_path(), &expected_info);
+
+ // Run.
+ FileProxy proxy(file_task_runner());
+ CreateProxy(File::FLAG_OPEN | File::FLAG_READ, &proxy);
+ proxy.GetInfo(
+ Bind(&FileProxyTest::DidGetFileInfo, weak_factory_.GetWeakPtr()));
+ MessageLoop::current()->Run();
+
+ // Verify.
+ EXPECT_EQ(File::FILE_OK, error_);
+ EXPECT_EQ(expected_info.size, file_info_.size);
+ EXPECT_EQ(expected_info.is_directory, file_info_.is_directory);
+ EXPECT_EQ(expected_info.is_symbolic_link, file_info_.is_symbolic_link);
+ EXPECT_EQ(expected_info.last_modified, file_info_.last_modified);
+ EXPECT_EQ(expected_info.creation_time, file_info_.creation_time);
+}
+
+TEST_F(FileProxyTest, Read) {
+ // Setup.
+ const char expected_data[] = "bleh";
+ int expected_bytes = arraysize(expected_data);
+ ASSERT_EQ(expected_bytes,
+ base::WriteFile(test_path(), expected_data, expected_bytes));
+
+ // Run.
+ FileProxy proxy(file_task_runner());
+ CreateProxy(File::FLAG_OPEN | File::FLAG_READ, &proxy);
+
+ proxy.Read(0, 128, Bind(&FileProxyTest::DidRead, weak_factory_.GetWeakPtr()));
+ MessageLoop::current()->Run();
+
+ // Verify.
+ EXPECT_EQ(File::FILE_OK, error_);
+ EXPECT_EQ(expected_bytes, static_cast<int>(buffer_.size()));
+ for (size_t i = 0; i < buffer_.size(); ++i) {
+ EXPECT_EQ(expected_data[i], buffer_[i]);
+ }
+}
+
+TEST_F(FileProxyTest, WriteAndFlush) {
+ FileProxy proxy(file_task_runner());
+ CreateProxy(File::FLAG_CREATE | File::FLAG_WRITE, &proxy);
+
+ const char data[] = "foo!";
+ int data_bytes = ARRAYSIZE_UNSAFE(data);
+ proxy.Write(0, data, data_bytes,
+ Bind(&FileProxyTest::DidWrite, weak_factory_.GetWeakPtr()));
+ MessageLoop::current()->Run();
+ EXPECT_EQ(File::FILE_OK, error_);
+ EXPECT_EQ(data_bytes, bytes_written_);
+
+ // Flush the written data. (So that the following read should always
+ // succeed. On some platforms it may work with or without this flush.)
+ proxy.Flush(Bind(&FileProxyTest::DidFinish, weak_factory_.GetWeakPtr()));
+ MessageLoop::current()->Run();
+ EXPECT_EQ(File::FILE_OK, error_);
+
+ // Verify the written data.
+ char buffer[10];
+ EXPECT_EQ(data_bytes, base::ReadFile(test_path(), buffer, data_bytes));
+ for (int i = 0; i < data_bytes; ++i) {
+ EXPECT_EQ(data[i], buffer[i]);
+ }
+}
+
+TEST_F(FileProxyTest, SetTimes) {
+ FileProxy proxy(file_task_runner());
+ CreateProxy(
+ File::FLAG_CREATE | File::FLAG_WRITE | File::FLAG_WRITE_ATTRIBUTES,
+ &proxy);
+
+ Time last_accessed_time = Time::Now() - TimeDelta::FromDays(12345);
+ Time last_modified_time = Time::Now() - TimeDelta::FromHours(98765);
+
+ proxy.SetTimes(last_accessed_time, last_modified_time,
+ Bind(&FileProxyTest::DidFinish, weak_factory_.GetWeakPtr()));
+ MessageLoop::current()->Run();
+ EXPECT_EQ(File::FILE_OK, error_);
+
+ File::Info info;
+ GetFileInfo(test_path(), &info);
+
+ // The returned values may only have the seconds precision, so we cast
+ // the double values to int here.
+ EXPECT_EQ(static_cast<int>(last_modified_time.ToDoubleT()),
+ static_cast<int>(info.last_modified.ToDoubleT()));
+ EXPECT_EQ(static_cast<int>(last_accessed_time.ToDoubleT()),
+ static_cast<int>(info.last_accessed.ToDoubleT()));
+}
+
+TEST_F(FileProxyTest, SetLength_Shrink) {
+ // Setup.
+ const char kTestData[] = "0123456789";
+ ASSERT_EQ(10, base::WriteFile(test_path(), kTestData, 10));
+ File::Info info;
+ GetFileInfo(test_path(), &info);
+ ASSERT_EQ(10, info.size);
+
+ // Run.
+ FileProxy proxy(file_task_runner());
+ CreateProxy(File::FLAG_OPEN | File::FLAG_WRITE, &proxy);
+ proxy.SetLength(7,
+ Bind(&FileProxyTest::DidFinish, weak_factory_.GetWeakPtr()));
+ MessageLoop::current()->Run();
+
+ // Verify.
+ GetFileInfo(test_path(), &info);
+ ASSERT_EQ(7, info.size);
+
+ char buffer[7];
+ EXPECT_EQ(7, base::ReadFile(test_path(), buffer, 7));
+ int i = 0;
+ for (; i < 7; ++i)
+ EXPECT_EQ(kTestData[i], buffer[i]);
+}
+
+TEST_F(FileProxyTest, SetLength_Expand) {
+ // Setup.
+ const char kTestData[] = "9876543210";
+ ASSERT_EQ(10, base::WriteFile(test_path(), kTestData, 10));
+ File::Info info;
+ GetFileInfo(test_path(), &info);
+ ASSERT_EQ(10, info.size);
+
+ // Run.
+ FileProxy proxy(file_task_runner());
+ CreateProxy(File::FLAG_OPEN | File::FLAG_WRITE, &proxy);
+ proxy.SetLength(53,
+ Bind(&FileProxyTest::DidFinish, weak_factory_.GetWeakPtr()));
+ MessageLoop::current()->Run();
+
+ // Verify.
+ GetFileInfo(test_path(), &info);
+ ASSERT_EQ(53, info.size);
+
+ char buffer[53];
+ EXPECT_EQ(53, base::ReadFile(test_path(), buffer, 53));
+ int i = 0;
+ for (; i < 10; ++i)
+ EXPECT_EQ(kTestData[i], buffer[i]);
+ for (; i < 53; ++i)
+ EXPECT_EQ(0, buffer[i]);
+}
+
+} // namespace base
diff --git a/chromium/base/files/file_unittest.cc b/chromium/base/files/file_unittest.cc
index b2e855da1a0..cba043c332f 100644
--- a/chromium/base/files/file_unittest.cc
+++ b/chromium/base/files/file_unittest.cc
@@ -11,16 +11,27 @@
using base::File;
using base::FilePath;
-TEST(File, Create) {
+TEST(FileTest, Create) {
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
FilePath file_path = temp_dir.path().AppendASCII("create_file_1");
{
+ // Don't create a File at all.
+ File file;
+ EXPECT_FALSE(file.IsValid());
+ EXPECT_EQ(base::File::FILE_ERROR_FAILED, file.error_details());
+
+ File file2(base::File::FILE_ERROR_TOO_MANY_OPENED);
+ EXPECT_FALSE(file2.IsValid());
+ EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, file2.error_details());
+ }
+
+ {
// Open a file that doesn't exist.
File file(file_path, base::File::FLAG_OPEN | base::File::FLAG_READ);
EXPECT_FALSE(file.IsValid());
- EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND, file.error());
+ EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND, file.error_details());
}
{
@@ -28,7 +39,7 @@ TEST(File, Create) {
File file(file_path, base::File::FLAG_OPEN_ALWAYS | base::File::FLAG_READ);
EXPECT_TRUE(file.IsValid());
EXPECT_TRUE(file.created());
- EXPECT_EQ(base::File::FILE_OK, file.error());
+ EXPECT_EQ(base::File::FILE_OK, file.error_details());
}
{
@@ -36,7 +47,20 @@ TEST(File, Create) {
File file(file_path, base::File::FLAG_OPEN | base::File::FLAG_READ);
EXPECT_TRUE(file.IsValid());
EXPECT_FALSE(file.created());
- EXPECT_EQ(base::File::FILE_OK, file.error());
+ EXPECT_EQ(base::File::FILE_OK, file.error_details());
+
+ // This time verify closing the file.
+ file.Close();
+ EXPECT_FALSE(file.IsValid());
+ }
+
+ {
+ // Open an existing file through Initialize
+ File file;
+ file.Initialize(file_path, base::File::FLAG_OPEN | base::File::FLAG_READ);
+ EXPECT_TRUE(file.IsValid());
+ EXPECT_FALSE(file.created());
+ EXPECT_EQ(base::File::FILE_OK, file.error_details());
// This time verify closing the file.
file.Close();
@@ -48,16 +72,16 @@ TEST(File, Create) {
File file(file_path, base::File::FLAG_CREATE | base::File::FLAG_READ);
EXPECT_FALSE(file.IsValid());
EXPECT_FALSE(file.created());
- EXPECT_EQ(base::File::FILE_ERROR_EXISTS, file.error());
+ EXPECT_EQ(base::File::FILE_ERROR_EXISTS, file.error_details());
}
{
// Create or overwrite a file.
File file(file_path,
- base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_READ);
+ base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE);
EXPECT_TRUE(file.IsValid());
EXPECT_TRUE(file.created());
- EXPECT_EQ(base::File::FILE_OK, file.error());
+ EXPECT_EQ(base::File::FILE_OK, file.error_details());
}
{
@@ -68,13 +92,31 @@ TEST(File, Create) {
base::File::FLAG_DELETE_ON_CLOSE);
EXPECT_TRUE(file.IsValid());
EXPECT_TRUE(file.created());
- EXPECT_EQ(base::File::FILE_OK, file.error());
+ EXPECT_EQ(base::File::FILE_OK, file.error_details());
}
EXPECT_FALSE(base::PathExists(file_path));
}
-TEST(File, DeleteOpenFile) {
+TEST(FileTest, Async) {
+ base::ScopedTempDir temp_dir;
+ ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
+ FilePath file_path = temp_dir.path().AppendASCII("create_file");
+
+ {
+ File file(file_path, base::File::FLAG_OPEN_ALWAYS | base::File::FLAG_ASYNC);
+ EXPECT_TRUE(file.IsValid());
+ EXPECT_TRUE(file.async());
+ }
+
+ {
+ File file(file_path, base::File::FLAG_OPEN_ALWAYS);
+ EXPECT_TRUE(file.IsValid());
+ EXPECT_FALSE(file.async());
+ }
+}
+
+TEST(FileTest, DeleteOpenFile) {
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
FilePath file_path = temp_dir.path().AppendASCII("create_file_1");
@@ -85,7 +127,7 @@ TEST(File, DeleteOpenFile) {
base::File::FLAG_SHARE_DELETE);
EXPECT_TRUE(file.IsValid());
EXPECT_TRUE(file.created());
- EXPECT_EQ(base::File::FILE_OK, file.error());
+ EXPECT_EQ(base::File::FILE_OK, file.error_details());
// Open an existing file and mark it as delete on close.
File same_file(file_path,
@@ -93,7 +135,7 @@ TEST(File, DeleteOpenFile) {
base::File::FLAG_READ);
EXPECT_TRUE(file.IsValid());
EXPECT_FALSE(same_file.created());
- EXPECT_EQ(base::File::FILE_OK, same_file.error());
+ EXPECT_EQ(base::File::FILE_OK, same_file.error_details());
// Close both handles and check that the file is gone.
file.Close();
@@ -101,7 +143,7 @@ TEST(File, DeleteOpenFile) {
EXPECT_FALSE(base::PathExists(file_path));
}
-TEST(File, ReadWrite) {
+TEST(FileTest, ReadWrite) {
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
FilePath file_path = temp_dir.path().AppendASCII("read_write_file");
@@ -173,7 +215,7 @@ TEST(File, ReadWrite) {
EXPECT_EQ(data_to_write[i - kOffsetBeyondEndOfFile], data_read_2[i]);
}
-TEST(File, Append) {
+TEST(FileTest, Append) {
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
FilePath file_path = temp_dir.path().AppendASCII("append_file");
@@ -221,7 +263,7 @@ TEST(File, Append) {
}
-TEST(File, Truncate) {
+TEST(FileTest, Length) {
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
FilePath file_path = temp_dir.path().AppendASCII("truncate_file");
@@ -229,6 +271,7 @@ TEST(File, Truncate) {
base::File::FLAG_CREATE | base::File::FLAG_READ |
base::File::FLAG_WRITE);
ASSERT_TRUE(file.IsValid());
+ EXPECT_EQ(0, file.GetLength());
// Write "test" to the file.
char data_to_write[] = "test";
@@ -239,7 +282,8 @@ TEST(File, Truncate) {
// Extend the file.
const int kExtendedFileLength = 10;
int64 file_size = 0;
- EXPECT_TRUE(file.Truncate(kExtendedFileLength));
+ EXPECT_TRUE(file.SetLength(kExtendedFileLength));
+ EXPECT_EQ(kExtendedFileLength, file.GetLength());
EXPECT_TRUE(GetFileSize(file_path, &file_size));
EXPECT_EQ(kExtendedFileLength, file_size);
@@ -254,7 +298,8 @@ TEST(File, Truncate) {
// Truncate the file.
const int kTruncatedFileLength = 2;
- EXPECT_TRUE(file.Truncate(kTruncatedFileLength));
+ EXPECT_TRUE(file.SetLength(kTruncatedFileLength));
+ EXPECT_EQ(kTruncatedFileLength, file.GetLength());
EXPECT_TRUE(GetFileSize(file_path, &file_size));
EXPECT_EQ(kTruncatedFileLength, file_size);
@@ -267,9 +312,9 @@ TEST(File, Truncate) {
// Flakily fails: http://crbug.com/86494
#if defined(OS_ANDROID)
-TEST(File, TouchGetInfo) {
+TEST(FileTest, TouchGetInfo) {
#else
-TEST(File, DISABLED_TouchGetInfo) {
+TEST(FileTest, DISABLED_TouchGetInfo) {
#endif
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
@@ -333,18 +378,17 @@ TEST(File, DISABLED_TouchGetInfo) {
creation_time.ToInternalValue());
}
-TEST(File, ReadFileAtCurrentPosition) {
+TEST(FileTest, ReadAtCurrentPosition) {
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- FilePath file_path =
- temp_dir.path().AppendASCII("read_file_at_current_position");
+ FilePath file_path = temp_dir.path().AppendASCII("read_at_current_position");
File file(file_path,
base::File::FLAG_CREATE | base::File::FLAG_READ |
base::File::FLAG_WRITE);
EXPECT_TRUE(file.IsValid());
const char kData[] = "test";
- const int kDataSize = arraysize(kData) - 1;
+ const int kDataSize = sizeof(kData) - 1;
EXPECT_EQ(kDataSize, file.Write(0, kData, kDataSize));
EXPECT_EQ(0, file.Seek(base::File::FROM_BEGIN, 0));
@@ -355,6 +399,53 @@ TEST(File, ReadFileAtCurrentPosition) {
EXPECT_EQ(kDataSize - first_chunk_size,
file.ReadAtCurrentPos(buffer + first_chunk_size,
kDataSize - first_chunk_size));
- EXPECT_EQ(std::string(buffer, buffer + kDataSize),
- std::string(kData));
+ EXPECT_EQ(std::string(buffer, buffer + kDataSize), std::string(kData));
+}
+
+TEST(FileTest, WriteAtCurrentPosition) {
+ base::ScopedTempDir temp_dir;
+ ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
+ FilePath file_path = temp_dir.path().AppendASCII("write_at_current_position");
+ File file(file_path,
+ base::File::FLAG_CREATE | base::File::FLAG_READ |
+ base::File::FLAG_WRITE);
+ EXPECT_TRUE(file.IsValid());
+
+ const char kData[] = "test";
+ const int kDataSize = sizeof(kData) - 1;
+
+ int first_chunk_size = kDataSize / 2;
+ EXPECT_EQ(first_chunk_size, file.WriteAtCurrentPos(kData, first_chunk_size));
+ EXPECT_EQ(kDataSize - first_chunk_size,
+ file.WriteAtCurrentPos(kData + first_chunk_size,
+ kDataSize - first_chunk_size));
+
+ char buffer[kDataSize];
+ EXPECT_EQ(kDataSize, file.Read(0, buffer, kDataSize));
+ EXPECT_EQ(std::string(buffer, buffer + kDataSize), std::string(kData));
+}
+
+#if defined(OS_WIN)
+TEST(FileTest, GetInfoForDirectory) {
+ base::ScopedTempDir temp_dir;
+ ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
+ FilePath empty_dir = temp_dir.path().Append(FILE_PATH_LITERAL("gpfi_test"));
+ ASSERT_TRUE(CreateDirectory(empty_dir));
+
+ base::File dir(
+ ::CreateFile(empty_dir.value().c_str(),
+ FILE_ALL_ACCESS,
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
+ NULL,
+ OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS, // Needed to open a directory.
+ NULL));
+ ASSERT_TRUE(dir.IsValid());
+
+ base::File::Info info;
+ EXPECT_TRUE(dir.GetInfo(&info));
+ EXPECT_TRUE(info.is_directory);
+ EXPECT_FALSE(info.is_symbolic_link);
+ EXPECT_EQ(0, info.size);
}
+#endif // defined(OS_WIN)
diff --git a/chromium/base/files/file_util_proxy.cc b/chromium/base/files/file_util_proxy.cc
index 40cac112820..72d9436fa1f 100644
--- a/chromium/base/files/file_util_proxy.cc
+++ b/chromium/base/files/file_util_proxy.cc
@@ -8,7 +8,6 @@
#include "base/bind_helpers.h"
#include "base/file_util.h"
#include "base/location.h"
-#include "base/message_loop/message_loop_proxy.h"
#include "base/task_runner.h"
#include "base/task_runner_util.h"
@@ -19,105 +18,21 @@ namespace {
void CallWithTranslatedParameter(const FileUtilProxy::StatusCallback& callback,
bool value) {
DCHECK(!callback.is_null());
- callback.Run(value ? PLATFORM_FILE_OK : PLATFORM_FILE_ERROR_FAILED);
+ callback.Run(value ? File::FILE_OK : File::FILE_ERROR_FAILED);
}
-// Helper classes or routines for individual methods.
-class CreateOrOpenHelper {
- public:
- CreateOrOpenHelper(TaskRunner* task_runner,
- const FileUtilProxy::CloseTask& close_task)
- : task_runner_(task_runner),
- close_task_(close_task),
- file_handle_(kInvalidPlatformFileValue),
- created_(false),
- error_(PLATFORM_FILE_OK) {}
-
- ~CreateOrOpenHelper() {
- if (file_handle_ != kInvalidPlatformFileValue) {
- task_runner_->PostTask(
- FROM_HERE,
- base::Bind(base::IgnoreResult(close_task_), file_handle_));
- }
- }
-
- void RunWork(const FileUtilProxy::CreateOrOpenTask& task) {
- error_ = task.Run(&file_handle_, &created_);
- }
-
- void Reply(const FileUtilProxy::CreateOrOpenCallback& callback) {
- DCHECK(!callback.is_null());
- callback.Run(error_, PassPlatformFile(&file_handle_), created_);
- }
-
- private:
- scoped_refptr<TaskRunner> task_runner_;
- FileUtilProxy::CloseTask close_task_;
- PlatformFile file_handle_;
- bool created_;
- PlatformFileError error_;
- DISALLOW_COPY_AND_ASSIGN(CreateOrOpenHelper);
-};
-
-class CreateTemporaryHelper {
- public:
- explicit CreateTemporaryHelper(TaskRunner* task_runner)
- : task_runner_(task_runner),
- file_handle_(kInvalidPlatformFileValue),
- error_(PLATFORM_FILE_OK) {}
-
- ~CreateTemporaryHelper() {
- if (file_handle_ != kInvalidPlatformFileValue) {
- FileUtilProxy::Close(
- task_runner_.get(), file_handle_, FileUtilProxy::StatusCallback());
- }
- }
-
- void RunWork(int additional_file_flags) {
- // TODO(darin): file_util should have a variant of CreateTemporaryFile
- // that returns a FilePath and a PlatformFile.
- base::CreateTemporaryFile(&file_path_);
-
- int file_flags =
- PLATFORM_FILE_WRITE |
- PLATFORM_FILE_TEMPORARY |
- PLATFORM_FILE_CREATE_ALWAYS |
- additional_file_flags;
-
- error_ = PLATFORM_FILE_OK;
- file_handle_ = CreatePlatformFile(file_path_, file_flags, NULL, &error_);
- }
-
- void Reply(const FileUtilProxy::CreateTemporaryCallback& callback) {
- DCHECK(!callback.is_null());
- callback.Run(error_, PassPlatformFile(&file_handle_), file_path_);
- }
-
- private:
- scoped_refptr<TaskRunner> task_runner_;
- PlatformFile file_handle_;
- FilePath file_path_;
- PlatformFileError error_;
- DISALLOW_COPY_AND_ASSIGN(CreateTemporaryHelper);
-};
-
class GetFileInfoHelper {
public:
GetFileInfoHelper()
- : error_(PLATFORM_FILE_OK) {}
+ : error_(File::FILE_OK) {}
void RunWorkForFilePath(const FilePath& file_path) {
if (!PathExists(file_path)) {
- error_ = PLATFORM_FILE_ERROR_NOT_FOUND;
+ error_ = File::FILE_ERROR_NOT_FOUND;
return;
}
if (!GetFileInfo(file_path, &file_info_))
- error_ = PLATFORM_FILE_ERROR_FAILED;
- }
-
- void RunWorkForPlatformFile(PlatformFile file) {
- if (!GetPlatformFileInfo(file, &file_info_))
- error_ = PLATFORM_FILE_ERROR_FAILED;
+ error_ = File::FILE_ERROR_FAILED;
}
void Reply(const FileUtilProxy::GetFileInfoCallback& callback) {
@@ -127,138 +42,26 @@ class GetFileInfoHelper {
}
private:
- PlatformFileError error_;
- PlatformFileInfo file_info_;
+ File::Error error_;
+ File::Info file_info_;
DISALLOW_COPY_AND_ASSIGN(GetFileInfoHelper);
};
-class ReadHelper {
- public:
- explicit ReadHelper(int bytes_to_read)
- : buffer_(new char[bytes_to_read]),
- bytes_to_read_(bytes_to_read),
- bytes_read_(0) {}
-
- void RunWork(PlatformFile file, int64 offset) {
- bytes_read_ = ReadPlatformFile(file, offset, buffer_.get(), bytes_to_read_);
- }
-
- void Reply(const FileUtilProxy::ReadCallback& callback) {
- if (!callback.is_null()) {
- PlatformFileError error =
- (bytes_read_ < 0) ? PLATFORM_FILE_ERROR_FAILED : PLATFORM_FILE_OK;
- callback.Run(error, buffer_.get(), bytes_read_);
- }
- }
-
- private:
- scoped_ptr<char[]> buffer_;
- int bytes_to_read_;
- int bytes_read_;
- DISALLOW_COPY_AND_ASSIGN(ReadHelper);
-};
-
-class WriteHelper {
- public:
- WriteHelper(const char* buffer, int bytes_to_write)
- : buffer_(new char[bytes_to_write]),
- bytes_to_write_(bytes_to_write),
- bytes_written_(0) {
- memcpy(buffer_.get(), buffer, bytes_to_write);
- }
-
- void RunWork(PlatformFile file, int64 offset) {
- bytes_written_ = WritePlatformFile(file, offset, buffer_.get(),
- bytes_to_write_);
- }
-
- void Reply(const FileUtilProxy::WriteCallback& callback) {
- if (!callback.is_null()) {
- PlatformFileError error =
- (bytes_written_ < 0) ? PLATFORM_FILE_ERROR_FAILED : PLATFORM_FILE_OK;
- callback.Run(error, bytes_written_);
- }
- }
-
- private:
- scoped_ptr<char[]> buffer_;
- int bytes_to_write_;
- int bytes_written_;
- DISALLOW_COPY_AND_ASSIGN(WriteHelper);
-};
-
-PlatformFileError CreateOrOpenAdapter(
- const FilePath& file_path, int file_flags,
- PlatformFile* file_handle, bool* created) {
- DCHECK(file_handle);
- DCHECK(created);
- if (!DirectoryExists(file_path.DirName())) {
- // If its parent does not exist, should return NOT_FOUND error.
- return PLATFORM_FILE_ERROR_NOT_FOUND;
- }
- PlatformFileError error = PLATFORM_FILE_OK;
- *file_handle = CreatePlatformFile(file_path, file_flags, created, &error);
- return error;
-}
-
-PlatformFileError CloseAdapter(PlatformFile file_handle) {
- if (!ClosePlatformFile(file_handle)) {
- return PLATFORM_FILE_ERROR_FAILED;
- }
- return PLATFORM_FILE_OK;
-}
-
-PlatformFileError DeleteAdapter(const FilePath& file_path, bool recursive) {
+File::Error DeleteAdapter(const FilePath& file_path, bool recursive) {
if (!PathExists(file_path)) {
- return PLATFORM_FILE_ERROR_NOT_FOUND;
+ return File::FILE_ERROR_NOT_FOUND;
}
if (!base::DeleteFile(file_path, recursive)) {
if (!recursive && !base::IsDirectoryEmpty(file_path)) {
- return PLATFORM_FILE_ERROR_NOT_EMPTY;
+ return File::FILE_ERROR_NOT_EMPTY;
}
- return PLATFORM_FILE_ERROR_FAILED;
+ return File::FILE_ERROR_FAILED;
}
- return PLATFORM_FILE_OK;
+ return File::FILE_OK;
}
} // namespace
-// static
-bool FileUtilProxy::CreateOrOpen(
- TaskRunner* task_runner,
- const FilePath& file_path, int file_flags,
- const CreateOrOpenCallback& callback) {
- return RelayCreateOrOpen(
- task_runner,
- base::Bind(&CreateOrOpenAdapter, file_path, file_flags),
- base::Bind(&CloseAdapter),
- callback);
-}
-
-// static
-bool FileUtilProxy::CreateTemporary(
- TaskRunner* task_runner,
- int additional_file_flags,
- const CreateTemporaryCallback& callback) {
- CreateTemporaryHelper* helper = new CreateTemporaryHelper(task_runner);
- return task_runner->PostTaskAndReply(
- FROM_HERE,
- Bind(&CreateTemporaryHelper::RunWork, Unretained(helper),
- additional_file_flags),
- Bind(&CreateTemporaryHelper::Reply, Owned(helper), callback));
-}
-
-// static
-bool FileUtilProxy::Close(
- TaskRunner* task_runner,
- base::PlatformFile file_handle,
- const StatusCallback& callback) {
- return RelayClose(
- task_runner,
- base::Bind(&CloseAdapter),
- file_handle, callback);
-}
-
// Retrieves the information about a file. It is invalid to pass NULL for the
// callback.
bool FileUtilProxy::GetFileInfo(
@@ -274,19 +77,6 @@ bool FileUtilProxy::GetFileInfo(
}
// static
-bool FileUtilProxy::GetFileInfoFromPlatformFile(
- TaskRunner* task_runner,
- PlatformFile file,
- const GetFileInfoCallback& callback) {
- GetFileInfoHelper* helper = new GetFileInfoHelper;
- return task_runner->PostTaskAndReply(
- FROM_HERE,
- Bind(&GetFileInfoHelper::RunWorkForPlatformFile,
- Unretained(helper), file),
- Bind(&GetFileInfoHelper::Reply, Owned(helper), callback));
-}
-
-// static
bool FileUtilProxy::DeleteFile(TaskRunner* task_runner,
const FilePath& file_path,
bool recursive,
@@ -298,56 +88,6 @@ bool FileUtilProxy::DeleteFile(TaskRunner* task_runner,
}
// static
-bool FileUtilProxy::Read(
- TaskRunner* task_runner,
- PlatformFile file,
- int64 offset,
- int bytes_to_read,
- const ReadCallback& callback) {
- if (bytes_to_read < 0) {
- return false;
- }
- ReadHelper* helper = new ReadHelper(bytes_to_read);
- return task_runner->PostTaskAndReply(
- FROM_HERE,
- Bind(&ReadHelper::RunWork, Unretained(helper), file, offset),
- Bind(&ReadHelper::Reply, Owned(helper), callback));
-}
-
-// static
-bool FileUtilProxy::Write(
- TaskRunner* task_runner,
- PlatformFile file,
- int64 offset,
- const char* buffer,
- int bytes_to_write,
- const WriteCallback& callback) {
- if (bytes_to_write <= 0 || buffer == NULL) {
- return false;
- }
- WriteHelper* helper = new WriteHelper(buffer, bytes_to_write);
- return task_runner->PostTaskAndReply(
- FROM_HERE,
- Bind(&WriteHelper::RunWork, Unretained(helper), file, offset),
- Bind(&WriteHelper::Reply, Owned(helper), callback));
-}
-
-// static
-bool FileUtilProxy::Touch(
- TaskRunner* task_runner,
- PlatformFile file,
- const Time& last_access_time,
- const Time& last_modified_time,
- const StatusCallback& callback) {
- return base::PostTaskAndReplyWithResult(
- task_runner,
- FROM_HERE,
- Bind(&TouchPlatformFile, file,
- last_access_time, last_modified_time),
- Bind(&CallWithTranslatedParameter, callback));
-}
-
-// static
bool FileUtilProxy::Touch(
TaskRunner* task_runner,
const FilePath& file_path,
@@ -361,53 +101,4 @@ bool FileUtilProxy::Touch(
Bind(&CallWithTranslatedParameter, callback));
}
-// static
-bool FileUtilProxy::Truncate(
- TaskRunner* task_runner,
- PlatformFile file,
- int64 length,
- const StatusCallback& callback) {
- return base::PostTaskAndReplyWithResult(
- task_runner,
- FROM_HERE,
- Bind(&TruncatePlatformFile, file, length),
- Bind(&CallWithTranslatedParameter, callback));
-}
-
-// static
-bool FileUtilProxy::Flush(
- TaskRunner* task_runner,
- PlatformFile file,
- const StatusCallback& callback) {
- return base::PostTaskAndReplyWithResult(
- task_runner,
- FROM_HERE,
- Bind(&FlushPlatformFile, file),
- Bind(&CallWithTranslatedParameter, callback));
-}
-
-// static
-bool FileUtilProxy::RelayCreateOrOpen(
- TaskRunner* task_runner,
- const CreateOrOpenTask& open_task,
- const CloseTask& close_task,
- const CreateOrOpenCallback& callback) {
- CreateOrOpenHelper* helper = new CreateOrOpenHelper(
- task_runner, close_task);
- return task_runner->PostTaskAndReply(
- FROM_HERE,
- Bind(&CreateOrOpenHelper::RunWork, Unretained(helper), open_task),
- Bind(&CreateOrOpenHelper::Reply, Owned(helper), callback));
-}
-
-// static
-bool FileUtilProxy::RelayClose(
- TaskRunner* task_runner,
- const CloseTask& close_task,
- PlatformFile file_handle,
- const StatusCallback& callback) {
- return base::PostTaskAndReplyWithResult(
- task_runner, FROM_HERE, Bind(close_task, file_handle), callback);
-}
-
} // namespace base
diff --git a/chromium/base/files/file_util_proxy.h b/chromium/base/files/file_util_proxy.h
index bded1612005..80688cfbb48 100644
--- a/chromium/base/files/file_util_proxy.h
+++ b/chromium/base/files/file_util_proxy.h
@@ -7,13 +7,8 @@
#include "base/base_export.h"
#include "base/callback_forward.h"
+#include "base/files/file.h"
#include "base/files/file_path.h"
-#include "base/memory/ref_counted.h"
-#include "base/platform_file.h"
-
-namespace tracked_objects {
-class Location;
-};
namespace base {
@@ -26,57 +21,10 @@ class BASE_EXPORT FileUtilProxy {
// This callback is used by methods that report only an error code. It is
// valid to pass a null callback to any function that takes a StatusCallback,
// in which case the operation will complete silently.
- typedef Callback<void(PlatformFileError)> StatusCallback;
-
- typedef Callback<void(PlatformFileError,
- PassPlatformFile,
- bool /* created */)> CreateOrOpenCallback;
- typedef Callback<void(PlatformFileError,
- PassPlatformFile,
- const FilePath&)> CreateTemporaryCallback;
- typedef Callback<void(PlatformFileError,
- const PlatformFileInfo&)> GetFileInfoCallback;
- typedef Callback<void(PlatformFileError,
- const char* /* data */,
- int /* bytes read */)> ReadCallback;
- typedef Callback<void(PlatformFileError,
- int /* bytes written */)> WriteCallback;
+ typedef Callback<void(File::Error)> StatusCallback;
- typedef Callback<PlatformFileError(PlatformFile*, bool*)> CreateOrOpenTask;
- typedef Callback<PlatformFileError(PlatformFile)> CloseTask;
- typedef Callback<PlatformFileError(void)> FileTask;
-
- // Creates or opens a file with the given flags. It is invalid to pass a null
- // callback. If PLATFORM_FILE_CREATE is set in |file_flags| it always tries to
- // create a new file at the given |file_path| and calls back with
- // PLATFORM_FILE_ERROR_FILE_EXISTS if the |file_path| already exists.
- //
- // This returns false if task posting to |task_runner| has failed.
- static bool CreateOrOpen(TaskRunner* task_runner,
- const FilePath& file_path,
- int file_flags,
- const CreateOrOpenCallback& callback);
-
- // Creates a temporary file for writing. The path and an open file handle are
- // returned. It is invalid to pass a null callback. The additional file flags
- // will be added on top of the default file flags which are:
- // base::PLATFORM_FILE_CREATE_ALWAYS
- // base::PLATFORM_FILE_WRITE
- // base::PLATFORM_FILE_TEMPORARY.
- // Set |additional_file_flags| to 0 for synchronous writes and set to
- // base::PLATFORM_FILE_ASYNC to support asynchronous file operations.
- //
- // This returns false if task posting to |task_runner| has failed.
- static bool CreateTemporary(
- TaskRunner* task_runner,
- int additional_file_flags,
- const CreateTemporaryCallback& callback);
-
- // Close the given file handle.
- // This returns false if task posting to |task_runner| has failed.
- static bool Close(TaskRunner* task_runner,
- PlatformFile,
- const StatusCallback& callback);
+ typedef Callback<void(File::Error,
+ const File::Info&)> GetFileInfoCallback;
// Retrieves the information about a file. It is invalid to pass a null
// callback.
@@ -86,13 +34,6 @@ class BASE_EXPORT FileUtilProxy {
const FilePath& file_path,
const GetFileInfoCallback& callback);
- // Does the same as GetFileInfo but takes PlatformFile instead of FilePath.
- // This returns false if task posting to |task_runner| has failed.
- static bool GetFileInfoFromPlatformFile(
- TaskRunner* task_runner,
- PlatformFile file,
- const GetFileInfoCallback& callback);
-
// Deletes a file or a directory.
// It is an error to delete a non-empty directory with recursive=false.
// This returns false if task posting to |task_runner| has failed.
@@ -101,42 +42,6 @@ class BASE_EXPORT FileUtilProxy {
bool recursive,
const StatusCallback& callback);
- // Reads from a file. On success, the file pointer is moved to position
- // |offset + bytes_to_read| in the file. The callback can be null.
- //
- // This returns false if |bytes_to_read| is less than zero, or
- // if task posting to |task_runner| has failed.
- static bool Read(
- TaskRunner* task_runner,
- PlatformFile file,
- int64 offset,
- int bytes_to_read,
- const ReadCallback& callback);
-
- // Writes to a file. If |offset| is greater than the length of the file,
- // |false| is returned. On success, the file pointer is moved to position
- // |offset + bytes_to_write| in the file. The callback can be null.
- // |bytes_to_write| must be greater than zero.
- //
- // This returns false if |bytes_to_write| is less than or equal to zero,
- // if |buffer| is NULL, or if task posting to |task_runner| has failed.
- static bool Write(
- TaskRunner* task_runner,
- PlatformFile file,
- int64 offset,
- const char* buffer,
- int bytes_to_write,
- const WriteCallback& callback);
-
- // Touches a file. The callback can be null.
- // This returns false if task posting to |task_runner| has failed.
- static bool Touch(
- TaskRunner* task_runner,
- PlatformFile file,
- const Time& last_access_time,
- const Time& last_modified_time,
- const StatusCallback& callback);
-
// Touches a file. The callback can be null.
// This returns false if task posting to |task_runner| has failed.
static bool Touch(
@@ -146,46 +51,6 @@ class BASE_EXPORT FileUtilProxy {
const Time& last_modified_time,
const StatusCallback& callback);
- // Truncates a file to the given length. If |length| is greater than the
- // current length of the file, the file will be extended with zeroes.
- // The callback can be null.
- // This returns false if task posting to |task_runner| has failed.
- static bool Truncate(
- TaskRunner* task_runner,
- PlatformFile file,
- int64 length,
- const StatusCallback& callback);
-
- // Truncates a file to the given length. If |length| is greater than the
- // current length of the file, the file will be extended with zeroes.
- // The callback can be null.
- // This returns false if task posting to |task_runner| has failed.
- static bool Truncate(
- TaskRunner* task_runner,
- const FilePath& path,
- int64 length,
- const StatusCallback& callback);
-
- // Flushes a file. The callback can be null.
- // This returns false if task posting to |task_runner| has failed.
- static bool Flush(
- TaskRunner* task_runner,
- PlatformFile file,
- const StatusCallback& callback);
-
- // Relay helpers.
- // They return false if posting a given task to |task_runner| has failed.
- static bool RelayCreateOrOpen(
- TaskRunner* task_runner,
- const CreateOrOpenTask& open_task,
- const CloseTask& close_task,
- const CreateOrOpenCallback& callback);
- static bool RelayClose(
- TaskRunner* task_runner,
- const CloseTask& close_task,
- PlatformFile,
- const StatusCallback& callback);
-
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(FileUtilProxy);
};
diff --git a/chromium/base/files/file_util_proxy_unittest.cc b/chromium/base/files/file_util_proxy_unittest.cc
index 17c7a3f7cf5..52073ae3b50 100644
--- a/chromium/base/files/file_util_proxy_unittest.cc
+++ b/chromium/base/files/file_util_proxy_unittest.cc
@@ -4,15 +4,11 @@
#include "base/files/file_util_proxy.h"
-#include <map>
-
#include "base/bind.h"
#include "base/file_util.h"
#include "base/files/scoped_temp_dir.h"
-#include "base/logging.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
-#include "base/platform_file.h"
#include "base/threading/thread.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -21,11 +17,9 @@ namespace base {
class FileUtilProxyTest : public testing::Test {
public:
FileUtilProxyTest()
- : message_loop_(MessageLoop::TYPE_IO),
- file_thread_("FileUtilProxyTestFileThread"),
- error_(PLATFORM_FILE_OK),
+ : file_thread_("FileUtilProxyTestFileThread"),
+ error_(File::FILE_OK),
created_(false),
- file_(kInvalidPlatformFileValue),
bytes_written_(-1),
weak_factory_(this) {}
@@ -34,198 +28,43 @@ class FileUtilProxyTest : public testing::Test {
ASSERT_TRUE(file_thread_.Start());
}
- virtual void TearDown() OVERRIDE {
- if (file_ != kInvalidPlatformFileValue)
- ClosePlatformFile(file_);
- }
-
- void DidFinish(PlatformFileError error) {
- error_ = error;
- MessageLoop::current()->QuitWhenIdle();
- }
-
- void DidCreateOrOpen(PlatformFileError error,
- PassPlatformFile file,
- bool created) {
+ void DidFinish(File::Error error) {
error_ = error;
- file_ = file.ReleaseValue();
- created_ = created;
MessageLoop::current()->QuitWhenIdle();
}
- void DidCreateTemporary(PlatformFileError error,
- PassPlatformFile file,
- const FilePath& path) {
- error_ = error;
- file_ = file.ReleaseValue();
- path_ = path;
- MessageLoop::current()->QuitWhenIdle();
- }
-
- void DidGetFileInfo(PlatformFileError error,
- const PlatformFileInfo& file_info) {
+ void DidGetFileInfo(File::Error error,
+ const File::Info& file_info) {
error_ = error;
file_info_ = file_info;
MessageLoop::current()->QuitWhenIdle();
}
- void DidRead(PlatformFileError error,
- const char* data,
- int bytes_read) {
- error_ = error;
- buffer_.resize(bytes_read);
- memcpy(&buffer_[0], data, bytes_read);
- MessageLoop::current()->QuitWhenIdle();
- }
-
- void DidWrite(PlatformFileError error,
- int bytes_written) {
- error_ = error;
- bytes_written_ = bytes_written;
- MessageLoop::current()->QuitWhenIdle();
- }
-
protected:
- PlatformFile GetTestPlatformFile(int flags) {
- if (file_ != kInvalidPlatformFileValue)
- return file_;
- bool created;
- PlatformFileError error;
- file_ = CreatePlatformFile(test_path(), flags, &created, &error);
- EXPECT_EQ(PLATFORM_FILE_OK, error);
- EXPECT_NE(kInvalidPlatformFileValue, file_);
- return file_;
- }
-
TaskRunner* file_task_runner() const {
return file_thread_.message_loop_proxy().get();
}
const FilePath& test_dir_path() const { return dir_.path(); }
const FilePath test_path() const { return dir_.path().AppendASCII("test"); }
- MessageLoop message_loop_;
+ MessageLoopForIO message_loop_;
Thread file_thread_;
ScopedTempDir dir_;
- PlatformFileError error_;
+ File::Error error_;
bool created_;
- PlatformFile file_;
FilePath path_;
- PlatformFileInfo file_info_;
+ File::Info file_info_;
std::vector<char> buffer_;
int bytes_written_;
WeakPtrFactory<FileUtilProxyTest> weak_factory_;
};
-TEST_F(FileUtilProxyTest, CreateOrOpen_Create) {
- FileUtilProxy::CreateOrOpen(
- file_task_runner(),
- test_path(),
- PLATFORM_FILE_CREATE | PLATFORM_FILE_READ,
- Bind(&FileUtilProxyTest::DidCreateOrOpen, weak_factory_.GetWeakPtr()));
- MessageLoop::current()->Run();
-
- EXPECT_EQ(PLATFORM_FILE_OK, error_);
- EXPECT_TRUE(created_);
- EXPECT_NE(kInvalidPlatformFileValue, file_);
- EXPECT_TRUE(PathExists(test_path()));
-}
-
-TEST_F(FileUtilProxyTest, CreateOrOpen_Open) {
- // Creates a file.
- file_util::WriteFile(test_path(), NULL, 0);
- ASSERT_TRUE(PathExists(test_path()));
-
- // Opens the created file.
- FileUtilProxy::CreateOrOpen(
- file_task_runner(),
- test_path(),
- PLATFORM_FILE_OPEN | PLATFORM_FILE_READ,
- Bind(&FileUtilProxyTest::DidCreateOrOpen, weak_factory_.GetWeakPtr()));
- MessageLoop::current()->Run();
-
- EXPECT_EQ(PLATFORM_FILE_OK, error_);
- EXPECT_FALSE(created_);
- EXPECT_NE(kInvalidPlatformFileValue, file_);
-}
-
-TEST_F(FileUtilProxyTest, CreateOrOpen_OpenNonExistent) {
- FileUtilProxy::CreateOrOpen(
- file_task_runner(),
- test_path(),
- PLATFORM_FILE_OPEN | PLATFORM_FILE_READ,
- Bind(&FileUtilProxyTest::DidCreateOrOpen, weak_factory_.GetWeakPtr()));
- MessageLoop::current()->Run();
- EXPECT_EQ(PLATFORM_FILE_ERROR_NOT_FOUND, error_);
- EXPECT_FALSE(created_);
- EXPECT_EQ(kInvalidPlatformFileValue, file_);
- EXPECT_FALSE(PathExists(test_path()));
-}
-
-TEST_F(FileUtilProxyTest, Close) {
- // Creates a file.
- PlatformFile file = GetTestPlatformFile(
- PLATFORM_FILE_CREATE | PLATFORM_FILE_WRITE);
-
-#if defined(OS_WIN)
- // This fails on Windows if the file is not closed.
- EXPECT_FALSE(base::Move(test_path(),
- test_dir_path().AppendASCII("new")));
-#endif
-
- FileUtilProxy::Close(
- file_task_runner(),
- file,
- Bind(&FileUtilProxyTest::DidFinish, weak_factory_.GetWeakPtr()));
- MessageLoop::current()->Run();
- EXPECT_EQ(PLATFORM_FILE_OK, error_);
-
- // Now it should pass on all platforms.
- EXPECT_TRUE(base::Move(test_path(), test_dir_path().AppendASCII("new")));
-}
-
-TEST_F(FileUtilProxyTest, CreateTemporary) {
- FileUtilProxy::CreateTemporary(
- file_task_runner(), 0 /* additional_file_flags */,
- Bind(&FileUtilProxyTest::DidCreateTemporary, weak_factory_.GetWeakPtr()));
- MessageLoop::current()->Run();
- EXPECT_EQ(PLATFORM_FILE_OK, error_);
- EXPECT_TRUE(PathExists(path_));
- EXPECT_NE(kInvalidPlatformFileValue, file_);
-
- // The file should be writable.
-#if defined(OS_WIN)
- HANDLE hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
- OVERLAPPED overlapped = {0};
- overlapped.hEvent = hEvent;
- DWORD bytes_written;
- if (!::WriteFile(file_, "test", 4, &bytes_written, &overlapped)) {
- // Temporary file is created with ASYNC flag, so WriteFile may return 0
- // with ERROR_IO_PENDING.
- EXPECT_EQ(ERROR_IO_PENDING, GetLastError());
- GetOverlappedResult(file_, &overlapped, &bytes_written, TRUE);
- }
- EXPECT_EQ(4, bytes_written);
-#else
- // On POSIX ASYNC flag does not affect synchronous read/write behavior.
- EXPECT_EQ(4, WritePlatformFile(file_, 0, "test", 4));
-#endif
- EXPECT_TRUE(ClosePlatformFile(file_));
- file_ = kInvalidPlatformFileValue;
-
- // Make sure the written data can be read from the returned path.
- std::string data;
- EXPECT_TRUE(ReadFileToString(path_, &data));
- EXPECT_EQ("test", data);
-
- // Make sure we can & do delete the created file to prevent leaks on the bots.
- EXPECT_TRUE(base::DeleteFile(path_, false));
-}
TEST_F(FileUtilProxyTest, GetFileInfo_File) {
// Setup.
- ASSERT_EQ(4, file_util::WriteFile(test_path(), "test", 4));
- PlatformFileInfo expected_info;
+ ASSERT_EQ(4, WriteFile(test_path(), "test", 4));
+ File::Info expected_info;
GetFileInfo(test_path(), &expected_info);
// Run.
@@ -236,7 +75,7 @@ TEST_F(FileUtilProxyTest, GetFileInfo_File) {
MessageLoop::current()->Run();
// Verify.
- EXPECT_EQ(PLATFORM_FILE_OK, error_);
+ EXPECT_EQ(File::FILE_OK, error_);
EXPECT_EQ(expected_info.size, file_info_.size);
EXPECT_EQ(expected_info.is_directory, file_info_.is_directory);
EXPECT_EQ(expected_info.is_symbolic_link, file_info_.is_symbolic_link);
@@ -248,7 +87,7 @@ TEST_F(FileUtilProxyTest, GetFileInfo_File) {
TEST_F(FileUtilProxyTest, GetFileInfo_Directory) {
// Setup.
ASSERT_TRUE(base::CreateDirectory(test_path()));
- PlatformFileInfo expected_info;
+ File::Info expected_info;
GetFileInfo(test_path(), &expected_info);
// Run.
@@ -259,7 +98,7 @@ TEST_F(FileUtilProxyTest, GetFileInfo_Directory) {
MessageLoop::current()->Run();
// Verify.
- EXPECT_EQ(PLATFORM_FILE_OK, error_);
+ EXPECT_EQ(File::FILE_OK, error_);
EXPECT_EQ(expected_info.size, file_info_.size);
EXPECT_EQ(expected_info.is_directory, file_info_.is_directory);
EXPECT_EQ(expected_info.is_symbolic_link, file_info_.is_symbolic_link);
@@ -268,80 +107,21 @@ TEST_F(FileUtilProxyTest, GetFileInfo_Directory) {
EXPECT_EQ(expected_info.creation_time, file_info_.creation_time);
}
-TEST_F(FileUtilProxyTest, Read) {
- // Setup.
- const char expected_data[] = "bleh";
- int expected_bytes = arraysize(expected_data);
- ASSERT_EQ(expected_bytes,
- file_util::WriteFile(test_path(), expected_data, expected_bytes));
-
- // Run.
- FileUtilProxy::Read(
- file_task_runner(),
- GetTestPlatformFile(PLATFORM_FILE_OPEN | PLATFORM_FILE_READ),
- 0, // offset
- 128,
- Bind(&FileUtilProxyTest::DidRead, weak_factory_.GetWeakPtr()));
- MessageLoop::current()->Run();
-
- // Verify.
- EXPECT_EQ(PLATFORM_FILE_OK, error_);
- EXPECT_EQ(expected_bytes, static_cast<int>(buffer_.size()));
- for (size_t i = 0; i < buffer_.size(); ++i) {
- EXPECT_EQ(expected_data[i], buffer_[i]);
- }
-}
-
-TEST_F(FileUtilProxyTest, WriteAndFlush) {
- const char data[] = "foo!";
- int data_bytes = ARRAYSIZE_UNSAFE(data);
- PlatformFile file = GetTestPlatformFile(
- PLATFORM_FILE_CREATE | PLATFORM_FILE_WRITE);
-
- FileUtilProxy::Write(
- file_task_runner(),
- file,
- 0, // offset
- data,
- data_bytes,
- Bind(&FileUtilProxyTest::DidWrite, weak_factory_.GetWeakPtr()));
- MessageLoop::current()->Run();
- EXPECT_EQ(PLATFORM_FILE_OK, error_);
- EXPECT_EQ(data_bytes, bytes_written_);
-
- // Flush the written data. (So that the following read should always
- // succeed. On some platforms it may work with or without this flush.)
- FileUtilProxy::Flush(
- file_task_runner(),
- file,
- Bind(&FileUtilProxyTest::DidFinish, weak_factory_.GetWeakPtr()));
- MessageLoop::current()->Run();
- EXPECT_EQ(PLATFORM_FILE_OK, error_);
-
- // Verify the written data.
- char buffer[10];
- EXPECT_EQ(data_bytes, base::ReadFile(test_path(), buffer, data_bytes));
- for (int i = 0; i < data_bytes; ++i) {
- EXPECT_EQ(data[i], buffer[i]);
- }
-}
-
TEST_F(FileUtilProxyTest, Touch) {
+ ASSERT_EQ(4, WriteFile(test_path(), "test", 4));
Time last_accessed_time = Time::Now() - TimeDelta::FromDays(12345);
Time last_modified_time = Time::Now() - TimeDelta::FromHours(98765);
FileUtilProxy::Touch(
file_task_runner(),
- GetTestPlatformFile(PLATFORM_FILE_CREATE |
- PLATFORM_FILE_WRITE |
- PLATFORM_FILE_WRITE_ATTRIBUTES),
+ test_path(),
last_accessed_time,
last_modified_time,
Bind(&FileUtilProxyTest::DidFinish, weak_factory_.GetWeakPtr()));
MessageLoop::current()->Run();
- EXPECT_EQ(PLATFORM_FILE_OK, error_);
+ EXPECT_EQ(File::FILE_OK, error_);
- PlatformFileInfo info;
+ File::Info info;
GetFileInfo(test_path(), &info);
// The returned values may only have the seconds precision, so we cast
@@ -352,60 +132,4 @@ TEST_F(FileUtilProxyTest, Touch) {
static_cast<int>(info.last_accessed.ToDoubleT()));
}
-TEST_F(FileUtilProxyTest, Truncate_Shrink) {
- // Setup.
- const char kTestData[] = "0123456789";
- ASSERT_EQ(10, file_util::WriteFile(test_path(), kTestData, 10));
- PlatformFileInfo info;
- GetFileInfo(test_path(), &info);
- ASSERT_EQ(10, info.size);
-
- // Run.
- FileUtilProxy::Truncate(
- file_task_runner(),
- GetTestPlatformFile(PLATFORM_FILE_OPEN | PLATFORM_FILE_WRITE),
- 7,
- Bind(&FileUtilProxyTest::DidFinish, weak_factory_.GetWeakPtr()));
- MessageLoop::current()->Run();
-
- // Verify.
- GetFileInfo(test_path(), &info);
- ASSERT_EQ(7, info.size);
-
- char buffer[7];
- EXPECT_EQ(7, base::ReadFile(test_path(), buffer, 7));
- int i = 0;
- for (; i < 7; ++i)
- EXPECT_EQ(kTestData[i], buffer[i]);
-}
-
-TEST_F(FileUtilProxyTest, Truncate_Expand) {
- // Setup.
- const char kTestData[] = "9876543210";
- ASSERT_EQ(10, file_util::WriteFile(test_path(), kTestData, 10));
- PlatformFileInfo info;
- GetFileInfo(test_path(), &info);
- ASSERT_EQ(10, info.size);
-
- // Run.
- FileUtilProxy::Truncate(
- file_task_runner(),
- GetTestPlatformFile(PLATFORM_FILE_OPEN | PLATFORM_FILE_WRITE),
- 53,
- Bind(&FileUtilProxyTest::DidFinish, weak_factory_.GetWeakPtr()));
- MessageLoop::current()->Run();
-
- // Verify.
- GetFileInfo(test_path(), &info);
- ASSERT_EQ(53, info.size);
-
- char buffer[53];
- EXPECT_EQ(53, base::ReadFile(test_path(), buffer, 53));
- int i = 0;
- for (; i < 10; ++i)
- EXPECT_EQ(kTestData[i], buffer[i]);
- for (; i < 53; ++i)
- EXPECT_EQ(0, buffer[i]);
-}
-
} // namespace base
diff --git a/chromium/base/files/file_win.cc b/chromium/base/files/file_win.cc
index 94f4d7f59c9..9e18bda70b1 100644
--- a/chromium/base/files/file_win.cc
+++ b/chromium/base/files/file_win.cc
@@ -13,7 +13,7 @@
namespace base {
-void File::CreateBaseFileUnsafe(const FilePath& name, uint32 flags) {
+void File::InitializeUnsafe(const FilePath& name, uint32 flags) {
base::ThreadRestrictions::AssertIOAllowed();
DCHECK(!IsValid());
@@ -34,6 +34,7 @@ void File::CreateBaseFileUnsafe(const FilePath& name, uint32 flags) {
if (flags & FLAG_CREATE_ALWAYS) {
DCHECK(!disposition);
+ DCHECK(flags & FLAG_WRITE);
disposition = CREATE_ALWAYS;
}
@@ -84,7 +85,7 @@ void File::CreateBaseFileUnsafe(const FilePath& name, uint32 flags) {
disposition, create_flags, NULL));
if (file_.IsValid()) {
- error_ = FILE_OK;
+ error_details_ = FILE_OK;
async_ = ((flags & FLAG_ASYNC) == FLAG_ASYNC);
if (flags & (FLAG_OPEN_ALWAYS))
@@ -92,20 +93,27 @@ void File::CreateBaseFileUnsafe(const FilePath& name, uint32 flags) {
else if (flags & (FLAG_CREATE_ALWAYS | FLAG_CREATE))
created_ = true;
} else {
- error_ = OSErrorToFileError(GetLastError());
+ error_details_ = OSErrorToFileError(GetLastError());
}
}
bool File::IsValid() const {
return file_.IsValid();
}
+
+PlatformFile File::GetPlatformFile() const {
+ return file_;
+}
+
PlatformFile File::TakePlatformFile() {
return file_.Take();
}
void File::Close() {
- base::ThreadRestrictions::AssertIOAllowed();
- file_.Close();
+ if (file_.IsValid()) {
+ base::ThreadRestrictions::AssertIOAllowed();
+ file_.Close();
+ }
}
int64 File::Seek(Whence whence, int64 offset) {
@@ -137,7 +145,7 @@ int File::Read(int64 offset, char* data, int size) {
overlapped.OffsetHigh = offset_li.HighPart;
DWORD bytes_read;
- if (::ReadFile(file_, data, size, &bytes_read, &overlapped) != 0)
+ if (::ReadFile(file_, data, size, &bytes_read, &overlapped))
return bytes_read;
if (ERROR_HANDLE_EOF == GetLastError())
return 0;
@@ -153,7 +161,7 @@ int File::ReadAtCurrentPos(char* data, int size) {
return -1;
DWORD bytes_read;
- if (::ReadFile(file_, data, size, &bytes_read, NULL) != 0)
+ if (::ReadFile(file_, data, size, &bytes_read, NULL))
return bytes_read;
if (ERROR_HANDLE_EOF == GetLastError())
return 0;
@@ -182,14 +190,23 @@ int File::Write(int64 offset, const char* data, int size) {
overlapped.OffsetHigh = offset_li.HighPart;
DWORD bytes_written;
- if (::WriteFile(file_, data, size, &bytes_written, &overlapped) != 0)
+ if (::WriteFile(file_, data, size, &bytes_written, &overlapped))
return bytes_written;
return -1;
}
int File::WriteAtCurrentPos(const char* data, int size) {
- NOTREACHED();
+ base::ThreadRestrictions::AssertIOAllowed();
+ DCHECK(IsValid());
+ DCHECK(!async_);
+ if (size < 0)
+ return -1;
+
+ DWORD bytes_written;
+ if (::WriteFile(file_, data, size, &bytes_written, NULL))
+ return bytes_written;
+
return -1;
}
@@ -197,7 +214,17 @@ int File::WriteAtCurrentPosNoBestEffort(const char* data, int size) {
return WriteAtCurrentPos(data, size);
}
-bool File::Truncate(int64 length) {
+int64 File::GetLength() {
+ base::ThreadRestrictions::AssertIOAllowed();
+ DCHECK(IsValid());
+ LARGE_INTEGER size;
+ if (!::GetFileSizeEx(file_.Get(), &size))
+ return -1;
+
+ return static_cast<int64>(size.QuadPart);
+}
+
+bool File::SetLength(int64 length) {
base::ThreadRestrictions::AssertIOAllowed();
DCHECK(IsValid());
@@ -205,7 +232,7 @@ bool File::Truncate(int64 length) {
LARGE_INTEGER file_pointer;
LARGE_INTEGER zero;
zero.QuadPart = 0;
- if (::SetFilePointerEx(file_, zero, &file_pointer, FILE_CURRENT) == 0)
+ if (!::SetFilePointerEx(file_, zero, &file_pointer, FILE_CURRENT))
return false;
LARGE_INTEGER length_li;
@@ -218,8 +245,11 @@ bool File::Truncate(int64 length) {
// Set the new file length and move the file pointer to its old position.
// This is consistent with ftruncate()'s behavior, even when the file
// pointer points to a location beyond the end of the file.
- return ((::SetEndOfFile(file_) != 0) &&
- (::SetFilePointerEx(file_, file_pointer, NULL, FILE_BEGIN) != 0));
+ // TODO(rvargas): Emulating ftruncate details seem suspicious and it is not
+ // promised by the interface (nor was promised by PlatformFile). See if this
+ // implementation detail can be removed.
+ return ((::SetEndOfFile(file_) != FALSE) &&
+ (::SetFilePointerEx(file_, file_pointer, NULL, FILE_BEGIN) != FALSE));
}
bool File::Flush() {
@@ -235,7 +265,7 @@ bool File::SetTimes(Time last_access_time, Time last_modified_time) {
FILETIME last_access_filetime = last_access_time.ToFileTime();
FILETIME last_modified_filetime = last_modified_time.ToFileTime();
return (::SetFileTime(file_, NULL, &last_access_filetime,
- &last_modified_filetime) != 0);
+ &last_modified_filetime) != FALSE);
}
bool File::GetInfo(Info* info) {
@@ -243,7 +273,7 @@ bool File::GetInfo(Info* info) {
DCHECK(IsValid());
BY_HANDLE_FILE_INFORMATION file_info;
- if (GetFileInformationByHandle(file_, &file_info) == 0)
+ if (!GetFileInformationByHandle(file_, &file_info))
return false;
LARGE_INTEGER size;
diff --git a/chromium/base/files/important_file_writer.cc b/chromium/base/files/important_file_writer.cc
index 261c98772e5..bf4e0033e3a 100644
--- a/chromium/base/files/important_file_writer.cc
+++ b/chromium/base/files/important_file_writer.cc
@@ -2,12 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#if defined _MSC_VER && _MSC_VER == 1800
-// TODO(scottmg): Internal errors on VS2013 RC in LTCG. This should be removed
-// after RTM. http://crbug.com/288948
-#pragma optimize("", off)
-#endif
-
#include "base/files/important_file_writer.h"
#include <stdio.h>
@@ -17,11 +11,13 @@
#include "base/bind.h"
#include "base/critical_closure.h"
#include "base/file_util.h"
+#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_number_conversions.h"
#include "base/task_runner.h"
+#include "base/task_runner_util.h"
#include "base/threading/thread.h"
#include "base/time/time.h"
@@ -63,25 +59,18 @@ bool ImportantFileWriter::WriteFileAtomically(const FilePath& path,
return false;
}
- int flags = PLATFORM_FILE_OPEN | PLATFORM_FILE_WRITE;
- PlatformFile tmp_file =
- CreatePlatformFile(tmp_file_path, flags, NULL, NULL);
- if (tmp_file == kInvalidPlatformFileValue) {
+ File tmp_file(tmp_file_path, File::FLAG_OPEN | File::FLAG_WRITE);
+ if (!tmp_file.IsValid()) {
LogFailure(path, FAILED_OPENING, "could not open temporary file");
return false;
}
// If this happens in the wild something really bad is going on.
CHECK_LE(data.length(), static_cast<size_t>(kint32max));
- int bytes_written = WritePlatformFile(
- tmp_file, 0, data.data(), static_cast<int>(data.length()));
- FlushPlatformFile(tmp_file); // Ignore return value.
-
- if (!ClosePlatformFile(tmp_file)) {
- LogFailure(path, FAILED_CLOSING, "failed to close temporary file");
- base::DeleteFile(tmp_file_path, false);
- return false;
- }
+ int bytes_written = tmp_file.Write(0, data.data(),
+ static_cast<int>(data.length()));
+ tmp_file.Flush(); // Ignore return value.
+ tmp_file.Close();
if (bytes_written < static_cast<int>(data.length())) {
LogFailure(path, FAILED_WRITING, "error writing, bytes_written=" +
@@ -99,13 +88,13 @@ bool ImportantFileWriter::WriteFileAtomically(const FilePath& path,
return true;
}
-ImportantFileWriter::ImportantFileWriter(
- const FilePath& path, base::SequencedTaskRunner* task_runner)
- : path_(path),
- task_runner_(task_runner),
- serializer_(NULL),
- commit_interval_(TimeDelta::FromMilliseconds(
- kDefaultCommitIntervalMs)) {
+ImportantFileWriter::ImportantFileWriter(const FilePath& path,
+ base::SequencedTaskRunner* task_runner)
+ : path_(path),
+ task_runner_(task_runner),
+ serializer_(NULL),
+ commit_interval_(TimeDelta::FromMilliseconds(kDefaultCommitIntervalMs)),
+ weak_factory_(this) {
DCHECK(CalledOnValidThread());
DCHECK(task_runner_.get());
}
@@ -132,11 +121,7 @@ void ImportantFileWriter::WriteNow(const std::string& data) {
if (HasPendingWrite())
timer_.Stop();
- if (!task_runner_->PostTask(
- FROM_HERE,
- MakeCriticalClosure(
- Bind(IgnoreResult(&ImportantFileWriter::WriteFileAtomically),
- path_, data)))) {
+ if (!PostWriteTask(data)) {
// Posting the task to background message loop is not expected
// to fail, but if it does, avoid losing data and just hit the disk
// on the current thread.
@@ -170,4 +155,40 @@ void ImportantFileWriter::DoScheduledWrite() {
serializer_ = NULL;
}
+void ImportantFileWriter::RegisterOnNextSuccessfulWriteCallback(
+ const base::Closure& on_next_successful_write) {
+ DCHECK(on_next_successful_write_.is_null());
+ on_next_successful_write_ = on_next_successful_write;
+}
+
+bool ImportantFileWriter::PostWriteTask(const std::string& data) {
+ // TODO(gab): This code could always use PostTaskAndReplyWithResult and let
+ // ForwardSuccessfulWrite() no-op if |on_next_successful_write_| is null, but
+ // PostTaskAndReply causes memory leaks in tests (crbug.com/371974) and
+ // suppressing all of those is unrealistic hence we avoid most of them by
+ // using PostTask() in the typical scenario below.
+ if (!on_next_successful_write_.is_null()) {
+ return base::PostTaskAndReplyWithResult(
+ task_runner_,
+ FROM_HERE,
+ MakeCriticalClosure(
+ Bind(&ImportantFileWriter::WriteFileAtomically, path_, data)),
+ Bind(&ImportantFileWriter::ForwardSuccessfulWrite,
+ weak_factory_.GetWeakPtr()));
+ }
+ return task_runner_->PostTask(
+ FROM_HERE,
+ MakeCriticalClosure(
+ Bind(IgnoreResult(&ImportantFileWriter::WriteFileAtomically),
+ path_, data)));
+}
+
+void ImportantFileWriter::ForwardSuccessfulWrite(bool result) {
+ DCHECK(CalledOnValidThread());
+ if (result && !on_next_successful_write_.is_null()) {
+ on_next_successful_write_.Run();
+ on_next_successful_write_.Reset();
+ }
+}
+
} // namespace base
diff --git a/chromium/base/files/important_file_writer.h b/chromium/base/files/important_file_writer.h
index ba1c745a4ef..61a53b16503 100644
--- a/chromium/base/files/important_file_writer.h
+++ b/chromium/base/files/important_file_writer.h
@@ -9,6 +9,7 @@
#include "base/base_export.h"
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/threading/non_thread_safe.h"
@@ -89,6 +90,11 @@ class BASE_EXPORT ImportantFileWriter : public NonThreadSafe {
// Serialize data pending to be saved and execute write on backend thread.
void DoScheduledWrite();
+ // Registers |on_next_successful_write| to be called once, on the next
+ // successful write event. Only one callback can be set at once.
+ void RegisterOnNextSuccessfulWriteCallback(
+ const base::Closure& on_next_successful_write);
+
TimeDelta commit_interval() const {
return commit_interval_;
}
@@ -98,6 +104,16 @@ class BASE_EXPORT ImportantFileWriter : public NonThreadSafe {
}
private:
+ // Helper method for WriteNow().
+ bool PostWriteTask(const std::string& data);
+
+ // If |result| is true and |on_next_successful_write_| is set, invokes
+ // |on_successful_write_| and then resets it; no-ops otherwise.
+ void ForwardSuccessfulWrite(bool result);
+
+ // Invoked once and then reset on the next successful write event.
+ base::Closure on_next_successful_write_;
+
// Path being written to.
const FilePath path_;
@@ -113,6 +129,8 @@ class BASE_EXPORT ImportantFileWriter : public NonThreadSafe {
// Time delta after which scheduled data will be written to disk.
TimeDelta commit_interval_;
+ WeakPtrFactory<ImportantFileWriter> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(ImportantFileWriter);
};
diff --git a/chromium/base/files/important_file_writer_unittest.cc b/chromium/base/files/important_file_writer_unittest.cc
index 02a5f76b2b6..3f62fe4953b 100644
--- a/chromium/base/files/important_file_writer_unittest.cc
+++ b/chromium/base/files/important_file_writer_unittest.cc
@@ -4,6 +4,7 @@
#include "base/files/important_file_writer.h"
+#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
@@ -41,6 +42,41 @@ class DataSerializer : public ImportantFileWriter::DataSerializer {
const std::string data_;
};
+class SuccessfulWriteObserver {
+ public:
+ SuccessfulWriteObserver() : successful_write_observed_(false) {}
+
+ // Register on_successful_write() to be called on the next successful write
+ // of |writer|.
+ void ObserveNextSuccessfulWrite(ImportantFileWriter* writer);
+
+ // Returns true if a successful write was observed via on_successful_write()
+ // and resets the observation state to false regardless.
+ bool GetAndResetObservationState();
+
+ private:
+ void on_successful_write() {
+ EXPECT_FALSE(successful_write_observed_);
+ successful_write_observed_ = true;
+ }
+
+ bool successful_write_observed_;
+
+ DISALLOW_COPY_AND_ASSIGN(SuccessfulWriteObserver);
+};
+
+void SuccessfulWriteObserver::ObserveNextSuccessfulWrite(
+ ImportantFileWriter* writer) {
+ writer->RegisterOnNextSuccessfulWriteCallback(base::Bind(
+ &SuccessfulWriteObserver::on_successful_write, base::Unretained(this)));
+}
+
+bool SuccessfulWriteObserver::GetAndResetObservationState() {
+ bool was_successful_write_observed = successful_write_observed_;
+ successful_write_observed_ = false;
+ return was_successful_write_observed;
+}
+
} // namespace
class ImportantFileWriterTest : public testing::Test {
@@ -52,6 +88,7 @@ class ImportantFileWriterTest : public testing::Test {
}
protected:
+ SuccessfulWriteObserver successful_write_observer_;
FilePath file_;
MessageLoop loop_;
@@ -62,11 +99,47 @@ class ImportantFileWriterTest : public testing::Test {
TEST_F(ImportantFileWriterTest, Basic) {
ImportantFileWriter writer(file_, MessageLoopProxy::current().get());
EXPECT_FALSE(PathExists(writer.path()));
+ EXPECT_FALSE(successful_write_observer_.GetAndResetObservationState());
+ writer.WriteNow("foo");
+ RunLoop().RunUntilIdle();
+
+ EXPECT_FALSE(successful_write_observer_.GetAndResetObservationState());
+ ASSERT_TRUE(PathExists(writer.path()));
+ EXPECT_EQ("foo", GetFileContent(writer.path()));
+}
+
+TEST_F(ImportantFileWriterTest, BasicWithSuccessfulWriteObserver) {
+ ImportantFileWriter writer(file_, MessageLoopProxy::current().get());
+ EXPECT_FALSE(PathExists(writer.path()));
+ EXPECT_FALSE(successful_write_observer_.GetAndResetObservationState());
+ successful_write_observer_.ObserveNextSuccessfulWrite(&writer);
writer.WriteNow("foo");
RunLoop().RunUntilIdle();
+ // Confirm that the observer is invoked.
+ EXPECT_TRUE(successful_write_observer_.GetAndResetObservationState());
ASSERT_TRUE(PathExists(writer.path()));
EXPECT_EQ("foo", GetFileContent(writer.path()));
+
+ // Confirm that re-installing the observer works for another write.
+ EXPECT_FALSE(successful_write_observer_.GetAndResetObservationState());
+ successful_write_observer_.ObserveNextSuccessfulWrite(&writer);
+ writer.WriteNow("bar");
+ RunLoop().RunUntilIdle();
+
+ EXPECT_TRUE(successful_write_observer_.GetAndResetObservationState());
+ ASSERT_TRUE(PathExists(writer.path()));
+ EXPECT_EQ("bar", GetFileContent(writer.path()));
+
+ // Confirm that writing again without re-installing the observer doesn't
+ // result in a notification.
+ EXPECT_FALSE(successful_write_observer_.GetAndResetObservationState());
+ writer.WriteNow("baz");
+ RunLoop().RunUntilIdle();
+
+ EXPECT_FALSE(successful_write_observer_.GetAndResetObservationState());
+ ASSERT_TRUE(PathExists(writer.path()));
+ EXPECT_EQ("baz", GetFileContent(writer.path()));
}
TEST_F(ImportantFileWriterTest, ScheduleWrite) {
diff --git a/chromium/base/files/memory_mapped_file.cc b/chromium/base/files/memory_mapped_file.cc
index a48ec0ceb2a..ace4e112628 100644
--- a/chromium/base/files/memory_mapped_file.cc
+++ b/chromium/base/files/memory_mapped_file.cc
@@ -17,7 +17,14 @@ bool MemoryMappedFile::Initialize(const FilePath& file_name) {
if (IsValid())
return false;
- if (!MapFileToMemory(file_name)) {
+ file_.Initialize(file_name, File::FLAG_OPEN | File::FLAG_READ);
+
+ if (!file_.IsValid()) {
+ DLOG(ERROR) << "Couldn't open " << file_name.AsUTF8Unsafe();
+ return false;
+ }
+
+ if (!MapFileToMemory()) {
CloseHandles();
return false;
}
@@ -25,13 +32,13 @@ bool MemoryMappedFile::Initialize(const FilePath& file_name) {
return true;
}
-bool MemoryMappedFile::Initialize(PlatformFile file) {
+bool MemoryMappedFile::Initialize(File file) {
if (IsValid())
return false;
- file_ = file;
+ file_ = file.Pass();
- if (!MapFileToMemoryInternal()) {
+ if (!MapFileToMemory()) {
CloseHandles();
return false;
}
@@ -43,16 +50,4 @@ bool MemoryMappedFile::IsValid() const {
return data_ != NULL;
}
-bool MemoryMappedFile::MapFileToMemory(const FilePath& file_name) {
- file_ = CreatePlatformFile(file_name, PLATFORM_FILE_OPEN | PLATFORM_FILE_READ,
- NULL, NULL);
-
- if (file_ == kInvalidPlatformFileValue) {
- DLOG(ERROR) << "Couldn't open " << file_name.AsUTF8Unsafe();
- return false;
- }
-
- return MapFileToMemoryInternal();
-}
-
} // namespace base
diff --git a/chromium/base/files/memory_mapped_file.h b/chromium/base/files/memory_mapped_file.h
index 6df1bad6359..b02d8cfbdae 100644
--- a/chromium/base/files/memory_mapped_file.h
+++ b/chromium/base/files/memory_mapped_file.h
@@ -7,7 +7,7 @@
#include "base/base_export.h"
#include "base/basictypes.h"
-#include "base/platform_file.h"
+#include "base/files/file.h"
#include "build/build_config.h"
#if defined(OS_WIN)
@@ -30,9 +30,10 @@ class BASE_EXPORT MemoryMappedFile {
// the file does not exist, or the memory mapping fails, it will return false.
// Later we may want to allow the user to specify access.
bool Initialize(const FilePath& file_name);
- // As above, but works with an already-opened file. MemoryMappedFile will take
- // ownership of |file| and close it when done.
- bool Initialize(PlatformFile file);
+
+ // As above, but works with an already-opened file. MemoryMappedFile takes
+ // ownership of |file| and closes it when done.
+ bool Initialize(File file);
#if defined(OS_WIN)
// Opens an existing file and maps it as an image section. Please refer to
@@ -47,27 +48,22 @@ class BASE_EXPORT MemoryMappedFile {
bool IsValid() const;
private:
- // Open the given file and pass it to MapFileToMemoryInternal().
- bool MapFileToMemory(const FilePath& file_name);
-
// Map the file to memory, set data_ to that memory address. Return true on
// success, false on any kind of failure. This is a helper for Initialize().
- bool MapFileToMemoryInternal();
+ bool MapFileToMemory();
- // Closes all open handles. Later we may want to make this public.
+ // Closes all open handles.
void CloseHandles();
-#if defined(OS_WIN)
- // MapFileToMemoryInternal calls this function. It provides the ability to
- // pass in flags which control the mapped section.
- bool MapFileToMemoryInternalEx(int flags);
-
- HANDLE file_mapping_;
-#endif
- PlatformFile file_;
+ File file_;
uint8* data_;
size_t length_;
+#if defined(OS_WIN)
+ win::ScopedHandle file_mapping_;
+ bool image_; // Map as an image.
+#endif
+
DISALLOW_COPY_AND_ASSIGN(MemoryMappedFile);
};
diff --git a/chromium/base/files/memory_mapped_file_posix.cc b/chromium/base/files/memory_mapped_file_posix.cc
index c4c477a3fe7..5d7e0079992 100644
--- a/chromium/base/files/memory_mapped_file_posix.cc
+++ b/chromium/base/files/memory_mapped_file_posix.cc
@@ -13,26 +13,23 @@
namespace base {
-MemoryMappedFile::MemoryMappedFile()
- : file_(kInvalidPlatformFileValue),
- data_(NULL),
- length_(0) {
+MemoryMappedFile::MemoryMappedFile() : data_(NULL), length_(0) {
}
-bool MemoryMappedFile::MapFileToMemoryInternal() {
+bool MemoryMappedFile::MapFileToMemory() {
ThreadRestrictions::AssertIOAllowed();
struct stat file_stat;
- if (fstat(file_, &file_stat) == kInvalidPlatformFileValue) {
- DPLOG(ERROR) << "fstat " << file_;
+ if (fstat(file_.GetPlatformFile(), &file_stat) == -1 ) {
+ DPLOG(ERROR) << "fstat " << file_.GetPlatformFile();
return false;
}
length_ = file_stat.st_size;
data_ = static_cast<uint8*>(
- mmap(NULL, length_, PROT_READ, MAP_SHARED, file_, 0));
+ mmap(NULL, length_, PROT_READ, MAP_SHARED, file_.GetPlatformFile(), 0));
if (data_ == MAP_FAILED)
- DPLOG(ERROR) << "mmap " << file_;
+ DPLOG(ERROR) << "mmap " << file_.GetPlatformFile();
return data_ != MAP_FAILED;
}
@@ -42,12 +39,10 @@ void MemoryMappedFile::CloseHandles() {
if (data_ != NULL)
munmap(data_, length_);
- if (file_ != kInvalidPlatformFileValue)
- close(file_);
+ file_.Close();
data_ = NULL;
length_ = 0;
- file_ = kInvalidPlatformFileValue;
}
} // namespace base
diff --git a/chromium/base/files/memory_mapped_file_win.cc b/chromium/base/files/memory_mapped_file_win.cc
index 694212950de..f3822873bfd 100644
--- a/chromium/base/files/memory_mapped_file_win.cc
+++ b/chromium/base/files/memory_mapped_file_win.cc
@@ -5,83 +5,52 @@
#include "base/files/memory_mapped_file.h"
#include "base/files/file_path.h"
-#include "base/logging.h"
-#include "base/metrics/histogram.h"
#include "base/strings/string16.h"
#include "base/threading/thread_restrictions.h"
namespace base {
-MemoryMappedFile::MemoryMappedFile()
- : file_(INVALID_HANDLE_VALUE),
- file_mapping_(INVALID_HANDLE_VALUE),
- data_(NULL),
- length_(INVALID_FILE_SIZE) {
+MemoryMappedFile::MemoryMappedFile() : data_(NULL), length_(0), image_(false) {
}
bool MemoryMappedFile::InitializeAsImageSection(const FilePath& file_name) {
- if (IsValid())
- return false;
- file_ = CreatePlatformFile(file_name, PLATFORM_FILE_OPEN | PLATFORM_FILE_READ,
- NULL, NULL);
-
- if (file_ == kInvalidPlatformFileValue) {
- DLOG(ERROR) << "Couldn't open " << file_name.AsUTF8Unsafe();
- return false;
- }
-
- if (!MapFileToMemoryInternalEx(SEC_IMAGE)) {
- CloseHandles();
- return false;
- }
-
- return true;
-}
-
-bool MemoryMappedFile::MapFileToMemoryInternal() {
- return MapFileToMemoryInternalEx(0);
+ image_ = true;
+ return Initialize(file_name);
}
-bool MemoryMappedFile::MapFileToMemoryInternalEx(int flags) {
+bool MemoryMappedFile::MapFileToMemory() {
ThreadRestrictions::AssertIOAllowed();
- if (file_ == INVALID_HANDLE_VALUE)
+ if (!file_.IsValid())
return false;
- length_ = ::GetFileSize(file_, NULL);
- if (length_ == INVALID_FILE_SIZE)
+ int64 len = file_.GetLength();
+ if (len <= 0 || len > kint32max)
return false;
+ length_ = static_cast<size_t>(len);
+
+ int flags = image_ ? SEC_IMAGE | PAGE_READONLY : PAGE_READONLY;
- file_mapping_ = ::CreateFileMapping(file_, NULL, PAGE_READONLY | flags,
- 0, 0, NULL);
- if (!file_mapping_) {
- // According to msdn, system error codes are only reserved up to 15999.
- // http://msdn.microsoft.com/en-us/library/ms681381(v=VS.85).aspx.
- UMA_HISTOGRAM_ENUMERATION("MemoryMappedFile.CreateFileMapping",
- logging::GetLastSystemErrorCode(), 16000);
+ file_mapping_.Set(::CreateFileMapping(file_.GetPlatformFile(), NULL,
+ flags, 0, 0, NULL));
+ if (!file_mapping_.IsValid())
return false;
- }
- data_ = static_cast<uint8*>(
- ::MapViewOfFile(file_mapping_, FILE_MAP_READ, 0, 0, 0));
- if (!data_) {
- UMA_HISTOGRAM_ENUMERATION("MemoryMappedFile.MapViewOfFile",
- logging::GetLastSystemErrorCode(), 16000);
- }
+ data_ = static_cast<uint8*>(::MapViewOfFile(file_mapping_.Get(),
+ FILE_MAP_READ, 0, 0, 0));
return data_ != NULL;
}
void MemoryMappedFile::CloseHandles() {
if (data_)
::UnmapViewOfFile(data_);
- if (file_mapping_ != INVALID_HANDLE_VALUE)
- ::CloseHandle(file_mapping_);
- if (file_ != INVALID_HANDLE_VALUE)
- ::CloseHandle(file_);
+ if (file_mapping_.IsValid())
+ file_mapping_.Close();
+ if (file_.IsValid())
+ file_.Close();
data_ = NULL;
- file_mapping_ = file_ = INVALID_HANDLE_VALUE;
- length_ = INVALID_FILE_SIZE;
+ length_ = 0;
}
} // namespace base
diff --git a/chromium/base/files/scoped_file.cc b/chromium/base/files/scoped_file.cc
new file mode 100644
index 00000000000..39f064de1c4
--- /dev/null
+++ b/chromium/base/files/scoped_file.cc
@@ -0,0 +1,35 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/files/scoped_file.h"
+
+#include "base/logging.h"
+
+#if defined(OS_POSIX)
+#include <unistd.h>
+
+#include "base/posix/eintr_wrapper.h"
+#endif
+
+namespace base {
+namespace internal {
+
+#if defined(OS_POSIX)
+
+// static
+void ScopedFDCloseTraits::Free(int fd) {
+ // It's important to crash here.
+ // There are security implications to not closing a file descriptor
+ // properly. As file descriptors are "capabilities", keeping them open
+ // would make the current process keep access to a resource. Much of
+ // Chrome relies on being able to "drop" such access.
+ // It's especially problematic on Linux with the setuid sandbox, where
+ // a single open directory would bypass the entire security model.
+ PCHECK(0 == IGNORE_EINTR(close(fd)));
+}
+
+#endif // OS_POSIX
+
+} // namespace internal
+} // namespace base
diff --git a/chromium/base/files/scoped_file.h b/chromium/base/files/scoped_file.h
new file mode 100644
index 00000000000..106f6ad94bf
--- /dev/null
+++ b/chromium/base/files/scoped_file.h
@@ -0,0 +1,61 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_FILES_SCOPED_FILE_H_
+#define BASE_FILES_SCOPED_FILE_H_
+
+#include <stdio.h>
+
+#include "base/base_export.h"
+#include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/scoped_generic.h"
+#include "build/build_config.h"
+
+namespace base {
+
+namespace internal {
+
+#if defined(OS_POSIX)
+struct BASE_EXPORT ScopedFDCloseTraits {
+ static int InvalidValue() {
+ return -1;
+ }
+ static void Free(int fd);
+};
+#endif
+
+// Functor for |ScopedFILE| (below).
+struct ScopedFILECloser {
+ inline void operator()(FILE* x) const {
+ if (x)
+ fclose(x);
+ }
+};
+
+} // namespace internal
+
+// -----------------------------------------------------------------------------
+
+#if defined(OS_POSIX)
+// A low-level Posix file descriptor closer class. Use this when writing
+// platform-specific code, especially that does non-file-like things with the
+// FD (like sockets).
+//
+// If you're writing low-level Windows code, see base/win/scoped_handle.h
+// which provides some additional functionality.
+//
+// If you're writing cross-platform code that deals with actual files, you
+// should generally use base::File instead which can be constructed with a
+// handle, and in addition to handling ownership, has convenient cross-platform
+// file manipulation functions on it.
+typedef ScopedGeneric<int, internal::ScopedFDCloseTraits> ScopedFD;
+#endif
+
+// Automatically closes |FILE*|s.
+typedef scoped_ptr<FILE, internal::ScopedFILECloser> ScopedFILE;
+
+} // namespace base
+
+#endif // BASE_FILES_SCOPED_FILE_H_
diff --git a/chromium/base/files/scoped_temp_dir_unittest.cc b/chromium/base/files/scoped_temp_dir_unittest.cc
index fe243ce2ee5..da222304a09 100644
--- a/chromium/base/files/scoped_temp_dir_unittest.cc
+++ b/chromium/base/files/scoped_temp_dir_unittest.cc
@@ -5,8 +5,8 @@
#include <string>
#include "base/file_util.h"
+#include "base/files/file.h"
#include "base/files/scoped_temp_dir.h"
-#include "base/platform_file.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
@@ -98,17 +98,13 @@ TEST(ScopedTempDir, MultipleInvocations) {
TEST(ScopedTempDir, LockedTempDir) {
ScopedTempDir dir;
EXPECT_TRUE(dir.CreateUniqueTempDir());
- int file_flags = base::PLATFORM_FILE_CREATE_ALWAYS |
- base::PLATFORM_FILE_WRITE;
- base::PlatformFileError error_code = base::PLATFORM_FILE_OK;
- FilePath file_path(dir.path().Append(FILE_PATH_LITERAL("temp")));
- base::PlatformFile file = base::CreatePlatformFile(file_path, file_flags,
- NULL, &error_code);
- EXPECT_NE(base::kInvalidPlatformFileValue, file);
- EXPECT_EQ(base::PLATFORM_FILE_OK, error_code);
+ base::File file(dir.path().Append(FILE_PATH_LITERAL("temp")),
+ base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE);
+ EXPECT_TRUE(file.IsValid());
+ EXPECT_EQ(base::File::FILE_OK, file.error_details());
EXPECT_FALSE(dir.Delete()); // We should not be able to delete.
EXPECT_FALSE(dir.path().empty()); // We should still have a valid path.
- EXPECT_TRUE(base::ClosePlatformFile(file));
+ file.Close();
// Now, we should be able to delete.
EXPECT_TRUE(dir.Delete());
}
diff --git a/chromium/base/format_macros.h b/chromium/base/format_macros.h
index 466d79be731..4d90c593a61 100644
--- a/chromium/base/format_macros.h
+++ b/chromium/base/format_macros.h
@@ -46,6 +46,34 @@
#define PRIuS "zu"
#endif
+// The size of NSInteger and NSUInteger varies between 32-bit and 64-bit
+// architectures and Apple does not provides standard format macros and
+// recommends casting. This has many drawbacks, so instead define macros
+// for formatting those types.
+#if defined(OS_MACOSX)
+#if defined(ARCH_CPU_64_BITS)
+#if !defined(PRIdNS)
+#define PRIdNS "ld"
+#endif
+#if !defined(PRIuNS)
+#define PRIuNS "lu"
+#endif
+#if !defined(PRIxNS)
+#define PRIxNS "lx"
+#endif
+#else // defined(ARCH_CPU_64_BITS)
+#if !defined(PRIdNS)
+#define PRIdNS "d"
+#endif
+#if !defined(PRIuNS)
+#define PRIuNS "u"
+#endif
+#if !defined(PRIxNS)
+#define PRIxNS "x"
+#endif
+#endif
+#endif // defined(OS_MACOSX)
+
#else // OS_WIN
#if !defined(PRId64)
diff --git a/chromium/base/hash.cc b/chromium/base/hash.cc
index 2c87065045b..a7db64a919c 100644
--- a/chromium/base/hash.cc
+++ b/chromium/base/hash.cc
@@ -1,73 +1,18 @@
-// From http://www.azillionmonkeys.com/qed/hash.html
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
#include "base/hash.h"
-typedef uint32 uint32_t;
-typedef uint16 uint16_t;
+// Definition in base/third_party/superfasthash/superfasthash.c. (Third-party
+// code did not come with its own header file, so declaring the function here.)
+// Note: This algorithm is also in Blink under Source/wtf/StringHasher.h.
+extern "C" uint32_t SuperFastHash(const char* data, int len);
namespace base {
-#undef get16bits
-#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \
- || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__)
-#define get16bits(d) (*((const uint16_t *) (d)))
-#endif
-
-#if !defined (get16bits)
-#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8)\
- +(uint32_t)(((const uint8_t *)(d))[0]) )
-#endif
-
-uint32 SuperFastHash(const char * data, int len) {
- uint32_t hash = len, tmp;
- int rem;
-
- if (len <= 0 || data == NULL)
- return 0;
-
- rem = len & 3;
- len >>= 2;
-
- /* Main loop */
- for (; len > 0; len--) {
- hash += get16bits(data);
- tmp = (get16bits(data + 2) << 11) ^ hash;
- hash = (hash << 16) ^ tmp;
- data += 2 * sizeof(uint16_t);
- hash += hash >> 11;
- }
-
- /* Handle end cases */
- switch (rem) {
- case 3:
- hash += get16bits(data);
- hash ^= hash << 16;
-
- // Treat the final character as signed. This ensures all platforms behave
- // consistently with the original x86 code.
- hash ^= static_cast<signed char>(data[sizeof(uint16_t)]) << 18;
- hash += hash >> 11;
- break;
- case 2:
- hash += get16bits(data);
- hash ^= hash << 11;
- hash += hash >> 17;
- break;
- case 1:
- hash += static_cast<signed char>(*data);
- hash ^= hash << 10;
- hash += hash >> 1;
- }
-
- /* Force "avalanching" of final 127 bits */
- hash ^= hash << 3;
- hash += hash >> 5;
- hash ^= hash << 4;
- hash += hash >> 17;
- hash ^= hash << 25;
- hash += hash >> 6;
-
- return hash;
+uint32 SuperFastHash(const char* data, int len) {
+ return ::SuperFastHash(data, len);
}
} // namespace base
diff --git a/chromium/base/hash.h b/chromium/base/hash.h
index cf8ea3a26e4..e46f6ac2484 100644
--- a/chromium/base/hash.h
+++ b/chromium/base/hash.h
@@ -5,25 +5,32 @@
#ifndef BASE_HASH_H_
#define BASE_HASH_H_
+#include <limits>
#include <string>
#include "base/base_export.h"
#include "base/basictypes.h"
+#include "base/logging.h"
namespace base {
-// From http://www.azillionmonkeys.com/qed/hash.html
-// This is the hash used on WebCore/platform/stringhash
-BASE_EXPORT uint32 SuperFastHash(const char * data, int len);
+// WARNING: This hash function should not be used for any cryptographic purpose.
+BASE_EXPORT uint32 SuperFastHash(const char* data, int len);
-inline uint32 Hash(const char* key, size_t length) {
- return SuperFastHash(key, static_cast<int>(length));
+// Computes a hash of a memory buffer |data| of a given |length|.
+// WARNING: This hash function should not be used for any cryptographic purpose.
+inline uint32 Hash(const char* data, size_t length) {
+ if (length > static_cast<size_t>(std::numeric_limits<int>::max())) {
+ NOTREACHED();
+ return 0;
+ }
+ return SuperFastHash(data, static_cast<int>(length));
}
-inline uint32 Hash(const std::string& key) {
- if (key.empty())
- return 0;
- return SuperFastHash(key.data(), static_cast<int>(key.size()));
+// Computes a hash of a string |str|.
+// WARNING: This hash function should not be used for any cryptographic purpose.
+inline uint32 Hash(const std::string& str) {
+ return Hash(str.data(), str.size());
}
} // namespace base
diff --git a/chromium/base/hash_unittest.cc b/chromium/base/hash_unittest.cc
new file mode 100644
index 00000000000..fc8a7519ee9
--- /dev/null
+++ b/chromium/base/hash_unittest.cc
@@ -0,0 +1,82 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/hash.h"
+
+#include <string>
+#include <vector>
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace base {
+
+TEST(HashTest, String) {
+ std::string str;
+ // Empty string (should hash to 0).
+ str = "";
+ EXPECT_EQ(0u, Hash(str));
+
+ // Simple test.
+ str = "hello world";
+ EXPECT_EQ(2794219650u, Hash(str));
+
+ // Change one bit.
+ str = "helmo world";
+ EXPECT_EQ(1006697176u, Hash(str));
+
+ // Insert a null byte.
+ str = "hello world";
+ str[5] = '\0';
+ EXPECT_EQ(2319902537u, Hash(str));
+
+ // Test that the bytes after the null contribute to the hash.
+ str = "hello worle";
+ str[5] = '\0';
+ EXPECT_EQ(553904462u, Hash(str));
+
+ // Extremely long string.
+ // Also tests strings with high bit set, and null byte.
+ std::vector<char> long_string_buffer;
+ for (int i = 0; i < 4096; ++i)
+ long_string_buffer.push_back((i % 256) - 128);
+ str.assign(&long_string_buffer.front(), long_string_buffer.size());
+ EXPECT_EQ(2797962408u, Hash(str));
+
+ // All possible lengths (mod 4). Tests separate code paths. Also test with
+ // final byte high bit set (regression test for http://crbug.com/90659).
+ // Note that the 1 and 3 cases have a weird bug where the final byte is
+ // treated as a signed char. It was decided on the above bug discussion to
+ // enshrine that behaviour as "correct" to avoid invalidating existing hashes.
+
+ // Length mod 4 == 0.
+ str = "hello w\xab";
+ EXPECT_EQ(615571198u, Hash(str));
+ // Length mod 4 == 1.
+ str = "hello wo\xab";
+ EXPECT_EQ(623474296u, Hash(str));
+ // Length mod 4 == 2.
+ str = "hello wor\xab";
+ EXPECT_EQ(4278562408u, Hash(str));
+ // Length mod 4 == 3.
+ str = "hello worl\xab";
+ EXPECT_EQ(3224633008u, Hash(str));
+}
+
+TEST(HashTest, CString) {
+ const char* str;
+ // Empty string (should hash to 0).
+ str = "";
+ EXPECT_EQ(0u, Hash(str, strlen(str)));
+
+ // Simple test.
+ str = "hello world";
+ EXPECT_EQ(2794219650u, Hash(str, strlen(str)));
+
+ // Ensure that it stops reading after the given length, and does not expect a
+ // null byte.
+ str = "hello world; don't read this part";
+ EXPECT_EQ(2794219650u, Hash(str, strlen("hello world")));
+}
+
+} // namespace base
diff --git a/chromium/base/i18n/break_iterator.cc b/chromium/base/i18n/break_iterator.cc
index 2c4d4669732..fe26a03a0b8 100644
--- a/chromium/base/i18n/break_iterator.cc
+++ b/chromium/base/i18n/break_iterator.cc
@@ -22,6 +22,15 @@ BreakIterator::BreakIterator(const string16& str, BreakType break_type)
pos_(0) {
}
+BreakIterator::BreakIterator(const string16& str, const string16& rules)
+ : iter_(NULL),
+ string_(str),
+ rules_(rules),
+ break_type_(RULE_BASED),
+ prev_(npos),
+ pos_(0) {
+}
+
BreakIterator::~BreakIterator() {
if (iter_)
ubrk_close(static_cast<UBreakIterator*>(iter_));
@@ -29,6 +38,7 @@ BreakIterator::~BreakIterator() {
bool BreakIterator::Init() {
UErrorCode status = U_ZERO_ERROR;
+ UParseError parse_error;
UBreakIteratorType break_type;
switch (break_type_) {
case BREAK_CHARACTER:
@@ -39,19 +49,39 @@ bool BreakIterator::Init() {
break;
case BREAK_LINE:
case BREAK_NEWLINE:
+ case RULE_BASED: // (Keep compiler happy, break_type not used in this case)
break_type = UBRK_LINE;
break;
default:
NOTREACHED() << "invalid break_type_";
return false;
}
- iter_ = ubrk_open(break_type, NULL,
- string_.data(), static_cast<int32_t>(string_.size()),
- &status);
+ if (break_type_ == RULE_BASED) {
+ iter_ = ubrk_openRules(rules_.c_str(),
+ static_cast<int32_t>(rules_.length()),
+ string_.data(),
+ static_cast<int32_t>(string_.size()),
+ &parse_error,
+ &status);
+ if (U_FAILURE(status)) {
+ NOTREACHED() << "ubrk_openRules failed to parse rule string at line "
+ << parse_error.line << ", offset " << parse_error.offset;
+ }
+ } else {
+ iter_ = ubrk_open(break_type,
+ NULL,
+ string_.data(),
+ static_cast<int32_t>(string_.size()),
+ &status);
+ if (U_FAILURE(status)) {
+ NOTREACHED() << "ubrk_open failed";
+ }
+ }
+
if (U_FAILURE(status)) {
- NOTREACHED() << "ubrk_open failed";
return false;
}
+
// Move the iterator to the beginning of the string.
ubrk_first(static_cast<UBreakIterator*>(iter_));
return true;
@@ -65,6 +95,7 @@ bool BreakIterator::Advance() {
case BREAK_CHARACTER:
case BREAK_WORD:
case BREAK_LINE:
+ case RULE_BASED:
pos = ubrk_next(static_cast<UBreakIterator*>(iter_));
if (pos == UBRK_DONE) {
pos_ = npos;
@@ -91,14 +122,29 @@ bool BreakIterator::Advance() {
}
}
+bool BreakIterator::SetText(const base::char16* text, const size_t length) {
+ UErrorCode status = U_ZERO_ERROR;
+ ubrk_setText(static_cast<UBreakIterator*>(iter_),
+ text, length, &status);
+ pos_ = 0; // implicit when ubrk_setText is done
+ prev_ = npos;
+ if (U_FAILURE(status)) {
+ NOTREACHED() << "ubrk_setText failed";
+ return false;
+ }
+ return true;
+}
+
bool BreakIterator::IsWord() const {
int32_t status = ubrk_getRuleStatus(static_cast<UBreakIterator*>(iter_));
- return (break_type_ == BREAK_WORD && status != UBRK_WORD_NONE);
+ if (break_type_ != BREAK_WORD && break_type_ != RULE_BASED)
+ return false;
+ return status != UBRK_WORD_NONE;
}
bool BreakIterator::IsEndOfWord(size_t position) const {
- if (break_type_ != BREAK_WORD)
- return false;
+ if (break_type_ != BREAK_WORD && break_type_ != RULE_BASED)
+ return false;
UBreakIterator* iter = static_cast<UBreakIterator*>(iter_);
UBool boundary = ubrk_isBoundary(iter, static_cast<int32_t>(position));
@@ -107,8 +153,8 @@ bool BreakIterator::IsEndOfWord(size_t position) const {
}
bool BreakIterator::IsStartOfWord(size_t position) const {
- if (break_type_ != BREAK_WORD)
- return false;
+ if (break_type_ != BREAK_WORD && break_type_ != RULE_BASED)
+ return false;
UBreakIterator* iter = static_cast<UBreakIterator*>(iter_);
UBool boundary = ubrk_isBoundary(iter, static_cast<int32_t>(position));
diff --git a/chromium/base/i18n/break_iterator.h b/chromium/base/i18n/break_iterator.h
index 618a320924e..b34c6770d10 100644
--- a/chromium/base/i18n/break_iterator.h
+++ b/chromium/base/i18n/break_iterator.h
@@ -66,10 +66,17 @@ class BASE_I18N_EXPORT BreakIterator {
BREAK_SPACE = BREAK_LINE,
BREAK_NEWLINE,
BREAK_CHARACTER,
+ // But don't remove this one!
+ RULE_BASED,
};
// Requires |str| to live as long as the BreakIterator does.
BreakIterator(const string16& str, BreakType break_type);
+ // Make a rule-based iterator. BreakType == RULE_BASED is implied.
+ // TODO(andrewhayden): This signature could easily be misinterpreted as
+ // "(const string16& str, const string16& locale)". We should do something
+ // better.
+ BreakIterator(const string16& str, const string16& rules);
~BreakIterator();
// Init() must be called before any of the iterators are valid.
@@ -82,6 +89,11 @@ class BASE_I18N_EXPORT BreakIterator {
// last time Advance() returns true.)
bool Advance();
+ // Updates the text used by the iterator, resetting the iterator as if
+ // if Init() had been called again. Any old state is lost. Returns true
+ // unless there is an error setting the text.
+ bool SetText(const base::char16* text, const size_t length);
+
// Under BREAK_WORD mode, returns true if the break we just hit is the
// end of a word. (Otherwise, the break iterator just skipped over e.g.
// whitespace or punctuation.) Under BREAK_LINE and BREAK_NEWLINE modes,
@@ -113,10 +125,13 @@ class BASE_I18N_EXPORT BreakIterator {
// callers from needing access to the ICU public headers directory.
void* iter_;
- // The string we're iterating over.
+ // The string we're iterating over. Can be changed with SetText(...)
const string16& string_;
- // The breaking style (word/space/newline).
+ // Rules for our iterator. Mutually exclusive with break_type_.
+ const string16 rules_;
+
+ // The breaking style (word/space/newline). Mutually exclusive with rules_
BreakType break_type_;
// Previous and current iterator positions.
diff --git a/chromium/base/i18n/build_utf8_validator_tables.cc b/chromium/base/i18n/build_utf8_validator_tables.cc
new file mode 100644
index 00000000000..d37a75172a7
--- /dev/null
+++ b/chromium/base/i18n/build_utf8_validator_tables.cc
@@ -0,0 +1,466 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Create a state machine for validating UTF-8. The algorithm in brief:
+// 1. Convert the complete unicode range of code points, except for the
+// surrogate code points, to an ordered array of sequences of bytes in
+// UTF-8.
+// 2. Convert individual bytes to ranges, starting from the right of each byte
+// sequence. For each range, ensure the bytes on the left and the ranges
+// on the right are the identical.
+// 3. Convert the resulting list of ranges into a state machine, collapsing
+// identical states.
+// 4. Convert the state machine to an array of bytes.
+// 5. Output as a C++ file.
+//
+// To use:
+// $ ninja -C out/Release build_utf8_validator_tables
+// $ out/Release/build_utf8_validator_tables
+// --output=base/i18n/utf8_validator_tables.cc
+// $ git add base/i18n/utf8_validator_tables.cc
+//
+// Because the table is not expected to ever change, it is checked into the
+// repository rather than being regenerated at build time.
+//
+// This code uses type uint8 throughout to represent bytes, to avoid
+// signed/unsigned char confusion.
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <algorithm>
+#include <map>
+#include <string>
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/command_line.h"
+#include "base/file_util.h"
+#include "base/files/file_path.h"
+#include "base/logging.h"
+#include "base/numerics/safe_conversions.h"
+#include "base/strings/stringprintf.h"
+#include "third_party/icu/source/common/unicode/utf8.h"
+
+namespace {
+
+const char kHelpText[] =
+ "Usage: build_utf8_validator_tables [ --help ] [ --output=<file> ]\n";
+
+const char kProlog[] =
+ "// Copyright 2013 The Chromium Authors. All rights reserved.\n"
+ "// Use of this source code is governed by a BSD-style license that can "
+ "be\n"
+ "// found in the LICENSE file.\n"
+ "\n"
+ "// This file is auto-generated by build_utf8_validator_tables.\n"
+ "// DO NOT EDIT.\n"
+ "\n"
+ "#include \"base/i18n/utf8_validator_tables.h\"\n"
+ "\n"
+ "namespace base {\n"
+ "namespace internal {\n"
+ "\n"
+ "const uint8 kUtf8ValidatorTables[] = {\n";
+
+const char kEpilog[] =
+ "};\n"
+ "\n"
+ "const size_t kUtf8ValidatorTablesSize = arraysize(kUtf8ValidatorTables);\n"
+ "\n"
+ "} // namespace internal\n"
+ "} // namespace base\n";
+
+// Ranges are inclusive at both ends--they represent [from, to]
+class Range {
+ public:
+ // Ranges always start with just one byte.
+ explicit Range(uint8 value) : from_(value), to_(value) {}
+
+ // Range objects are copyable and assignable to be used in STL
+ // containers. Since they only contain non-pointer POD types, the default copy
+ // constructor, assignment operator and destructor will work.
+
+ // Add a byte to the range. We intentionally only support adding a byte at the
+ // end, since that is the only operation the code needs.
+ void AddByte(uint8 to) {
+ CHECK(to == to_ + 1);
+ to_ = to;
+ }
+
+ uint8 from() const { return from_; }
+ uint8 to() const { return to_; }
+
+ bool operator<(const Range& rhs) const {
+ return (from() < rhs.from() || (from() == rhs.from() && to() < rhs.to()));
+ }
+
+ bool operator==(const Range& rhs) const {
+ return from() == rhs.from() && to() == rhs.to();
+ }
+
+ private:
+ uint8 from_;
+ uint8 to_;
+};
+
+// A vector of Ranges is like a simple regular expression--it corresponds to
+// a set of strings of the same length that have bytes in each position in
+// the appropriate range.
+typedef std::vector<Range> StringSet;
+
+// A UTF-8 "character" is represented by a sequence of bytes.
+typedef std::vector<uint8> Character;
+
+// In the second stage of the algorithm, we want to convert a large list of
+// Characters into a small list of StringSets.
+struct Pair {
+ Character character;
+ StringSet set;
+};
+
+typedef std::vector<Pair> PairVector;
+
+// A class to print a table of numbers in the same style as clang-format.
+class TablePrinter {
+ public:
+ explicit TablePrinter(FILE* stream)
+ : stream_(stream), values_on_this_line_(0), current_offset_(0) {}
+
+ void PrintValue(uint8 value) {
+ if (values_on_this_line_ == 0) {
+ fputs(" ", stream_);
+ } else if (values_on_this_line_ == kMaxValuesPerLine) {
+ fprintf(stream_, " // 0x%02x\n ", current_offset_);
+ values_on_this_line_ = 0;
+ }
+ fprintf(stream_, " 0x%02x,", static_cast<int>(value));
+ ++values_on_this_line_;
+ ++current_offset_;
+ }
+
+ void NewLine() {
+ while (values_on_this_line_ < kMaxValuesPerLine) {
+ fputs(" ", stream_);
+ ++values_on_this_line_;
+ }
+ fprintf(stream_, " // 0x%02x\n", current_offset_);
+ values_on_this_line_ = 0;
+ }
+
+ private:
+ // stdio stream. Not owned.
+ FILE* stream_;
+
+ // Number of values so far printed on this line.
+ int values_on_this_line_;
+
+ // Total values printed so far.
+ int current_offset_;
+
+ static const int kMaxValuesPerLine = 8;
+
+ DISALLOW_COPY_AND_ASSIGN(TablePrinter);
+};
+
+// Start by filling a PairVector with characters. The resulting vector goes from
+// "\x00" to "\xf4\x8f\xbf\xbf".
+PairVector InitializeCharacters() {
+ PairVector vector;
+ for (int i = 0; i <= 0x10FFFF; ++i) {
+ if (i >= 0xD800 && i < 0xE000) {
+ // Surrogate codepoints are not permitted. Non-character code points are
+ // explicitly permitted.
+ continue;
+ }
+ uint8 bytes[4];
+ unsigned int offset = 0;
+ UBool is_error = false;
+ U8_APPEND(bytes, offset, arraysize(bytes), i, is_error);
+ DCHECK(!is_error);
+ DCHECK_GT(offset, 0u);
+ DCHECK_LE(offset, arraysize(bytes));
+ Pair pair = {Character(bytes, bytes + offset), StringSet()};
+ vector.push_back(pair);
+ }
+ return vector;
+}
+
+// Construct a new Pair from |character| and the concatenation of |new_range|
+// and |existing_set|, and append it to |pairs|.
+void ConstructPairAndAppend(const Character& character,
+ const Range& new_range,
+ const StringSet& existing_set,
+ PairVector* pairs) {
+ Pair new_pair = {character, StringSet(1, new_range)};
+ new_pair.set.insert(
+ new_pair.set.end(), existing_set.begin(), existing_set.end());
+ pairs->push_back(new_pair);
+}
+
+// Each pass over the PairVector strips one byte off the right-hand-side of the
+// characters and adds a range to the set on the right. For example, the first
+// pass converts the range from "\xe0\xa0\x80" to "\xe0\xa0\xbf" to ("\xe0\xa0",
+// [\x80-\xbf]), then the second pass converts the range from ("\xe0\xa0",
+// [\x80-\xbf]) to ("\xe0\xbf", [\x80-\xbf]) to ("\xe0",
+// [\xa0-\xbf][\x80-\xbf]).
+void MoveRightMostCharToSet(PairVector* pairs) {
+ PairVector new_pairs;
+ PairVector::const_iterator it = pairs->begin();
+ while (it != pairs->end() && it->character.empty()) {
+ new_pairs.push_back(*it);
+ ++it;
+ }
+ CHECK(it != pairs->end());
+ Character unconverted_bytes(it->character.begin(), it->character.end() - 1);
+ Range new_range(it->character.back());
+ StringSet converted = it->set;
+ ++it;
+ while (it != pairs->end()) {
+ const Pair& current_pair = *it++;
+ if (current_pair.character.size() == unconverted_bytes.size() + 1 &&
+ std::equal(unconverted_bytes.begin(),
+ unconverted_bytes.end(),
+ current_pair.character.begin()) &&
+ converted == current_pair.set) {
+ // The particular set of UTF-8 codepoints we are validating guarantees
+ // that each byte range will be contiguous. This would not necessarily be
+ // true for an arbitrary set of UTF-8 codepoints.
+ DCHECK_EQ(new_range.to() + 1, current_pair.character.back());
+ new_range.AddByte(current_pair.character.back());
+ continue;
+ }
+ ConstructPairAndAppend(unconverted_bytes, new_range, converted, &new_pairs);
+ unconverted_bytes = Character(current_pair.character.begin(),
+ current_pair.character.end() - 1);
+ new_range = Range(current_pair.character.back());
+ converted = current_pair.set;
+ }
+ ConstructPairAndAppend(unconverted_bytes, new_range, converted, &new_pairs);
+ new_pairs.swap(*pairs);
+}
+
+void MoveAllCharsToSets(PairVector* pairs) {
+ // Since each pass of the function moves one character, and UTF-8 sequences
+ // are at most 4 characters long, this simply runs the algorithm four times.
+ for (int i = 0; i < 4; ++i) {
+ MoveRightMostCharToSet(pairs);
+ }
+#if DCHECK_IS_ON
+ for (PairVector::const_iterator it = pairs->begin(); it != pairs->end();
+ ++it) {
+ DCHECK(it->character.empty());
+ }
+#endif
+}
+
+// Logs the generated string sets in regular-expression style, ie. [\x00-\x7f],
+// [\xc2-\xdf][\x80-\xbf], etc. This can be a useful sanity-check that the
+// algorithm is working. Use the command-line option
+// --vmodule=build_utf8_validator_tables=1 to see this output.
+void LogStringSets(const PairVector& pairs) {
+ for (PairVector::const_iterator pair_it = pairs.begin();
+ pair_it != pairs.end();
+ ++pair_it) {
+ std::string set_as_string;
+ for (StringSet::const_iterator set_it = pair_it->set.begin();
+ set_it != pair_it->set.end();
+ ++set_it) {
+ set_as_string += base::StringPrintf("[\\x%02x-\\x%02x]",
+ static_cast<int>(set_it->from()),
+ static_cast<int>(set_it->to()));
+ }
+ VLOG(1) << set_as_string;
+ }
+}
+
+// A single state in the state machine is represented by a sorted vector of
+// start bytes and target states. All input bytes in the range between the start
+// byte and the next entry in the vector (or 0xFF) result in a transition to the
+// target state.
+struct StateRange {
+ uint8 from;
+ uint8 target_state;
+};
+
+typedef std::vector<StateRange> State;
+
+// Generates a state where all bytes go to state 1 (invalid). This is also used
+// as an initialiser for other states (since bytes from outside the desired
+// range are invalid).
+State GenerateInvalidState() {
+ const StateRange range = {0, 1};
+ return State(1, range);
+}
+
+// A map from a state (ie. a set of strings which will match from this state) to
+// a number (which is an index into the array of states).
+typedef std::map<StringSet, uint8> StateMap;
+
+// Create a new state corresponding to |set|, add it |states| and |state_map|
+// and return the index it was given in |states|.
+uint8 MakeState(const StringSet& set,
+ std::vector<State>* states,
+ StateMap* state_map) {
+ DCHECK(!set.empty());
+ const Range& range = set.front();
+ const StringSet rest(set.begin() + 1, set.end());
+ const StateMap::const_iterator where = state_map->find(rest);
+ const uint8 target_state = where == state_map->end()
+ ? MakeState(rest, states, state_map)
+ : where->second;
+ DCHECK_LT(0, range.from());
+ DCHECK_LT(range.to(), 0xFF);
+ const StateRange new_state_initializer[] = {
+ {0, 1}, {range.from(), target_state},
+ {static_cast<uint8>(range.to() + 1), 1}};
+ states->push_back(
+ State(new_state_initializer,
+ new_state_initializer + arraysize(new_state_initializer)));
+ const uint8 new_state_number =
+ base::checked_cast<uint8>(states->size() - 1);
+ CHECK(state_map->insert(std::make_pair(set, new_state_number)).second);
+ return new_state_number;
+}
+
+std::vector<State> GenerateStates(const PairVector& pairs) {
+ // States 0 and 1 are the initial/valid state and invalid state, respectively.
+ std::vector<State> states(2, GenerateInvalidState());
+ StateMap state_map;
+ state_map.insert(std::make_pair(StringSet(), 0));
+ for (PairVector::const_iterator it = pairs.begin(); it != pairs.end(); ++it) {
+ DCHECK(it->character.empty());
+ DCHECK(!it->set.empty());
+ const Range& range = it->set.front();
+ const StringSet rest(it->set.begin() + 1, it->set.end());
+ const StateMap::const_iterator where = state_map.find(rest);
+ const uint8 target_state = where == state_map.end()
+ ? MakeState(rest, &states, &state_map)
+ : where->second;
+ if (states[0].back().from == range.from()) {
+ DCHECK_EQ(1, states[0].back().target_state);
+ states[0].back().target_state = target_state;
+ DCHECK_LT(range.to(), 0xFF);
+ const StateRange new_range = {static_cast<uint8>(range.to() + 1), 1};
+ states[0].push_back(new_range);
+ } else {
+ DCHECK_LT(range.to(), 0xFF);
+ const StateRange new_range_initializer[] = {{range.from(), target_state},
+ {static_cast<uint8>(range.to() + 1), 1}};
+ states[0]
+ .insert(states[0].end(),
+ new_range_initializer,
+ new_range_initializer + arraysize(new_range_initializer));
+ }
+ }
+ return states;
+}
+
+// Output the generated states as a C++ table. Two tricks are used to compact
+// the table: each state in the table starts with a shift value which indicates
+// how many bits we can discard from the right-hand-side of the byte before
+// doing the table lookup. Secondly, only the state-transitions for bytes
+// with the top-bit set are included in the table; bytes without the top-bit set
+// are just ASCII and are handled directly by the code.
+void PrintStates(const std::vector<State>& states, FILE* stream) {
+ // First calculate the start-offset of each state. This allows the state
+ // machine to jump directly to the correct offset, avoiding an extra
+ // indirection. State 0 starts at offset 0.
+ std::vector<uint8> state_offset(1, 0);
+ std::vector<uint8> shifts;
+ uint8 pos = 0;
+
+ for (std::vector<State>::const_iterator state_it = states.begin();
+ state_it != states.end();
+ ++state_it) {
+ // We want to set |shift| to the (0-based) index of the least-significant
+ // set bit in any of the ranges for this state, since this tells us how many
+ // bits we can discard and still determine what range a byte lies in. Sadly
+ // it appears that ffs() is not portable, so we do it clumsily.
+ uint8 shift = 7;
+ for (State::const_iterator range_it = state_it->begin();
+ range_it != state_it->end();
+ ++range_it) {
+ while (shift > 0 && range_it->from % (1 << shift) != 0) {
+ --shift;
+ }
+ }
+ shifts.push_back(shift);
+ pos += 1 + (1 << (7 - shift));
+ state_offset.push_back(pos);
+ }
+
+ DCHECK_EQ(129, state_offset[1]);
+
+ fputs(kProlog, stream);
+ TablePrinter table_printer(stream);
+
+ for (uint8 state_index = 0; state_index < states.size(); ++state_index) {
+ const uint8 shift = shifts[state_index];
+ uint8 next_range = 0;
+ uint8 target_state = 1;
+ fprintf(stream,
+ " // State %d, offset 0x%02x\n",
+ static_cast<int>(state_index),
+ static_cast<int>(state_offset[state_index]));
+ table_printer.PrintValue(shift);
+ for (int i = 0; i < 0x100; i += (1 << shift)) {
+ if (next_range < states[state_index].size() &&
+ states[state_index][next_range].from == i) {
+ target_state = states[state_index][next_range].target_state;
+ ++next_range;
+ }
+ if (i >= 0x80) {
+ table_printer.PrintValue(state_offset[target_state]);
+ }
+ }
+ table_printer.NewLine();
+ }
+
+ fputs(kEpilog, stream);
+}
+
+} // namespace
+
+int main(int argc, char* argv[]) {
+ CommandLine::Init(argc, argv);
+ logging::LoggingSettings settings;
+ settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
+ logging::InitLogging(settings);
+ if (CommandLine::ForCurrentProcess()->HasSwitch("help")) {
+ fwrite(kHelpText, 1, arraysize(kHelpText), stdout);
+ exit(EXIT_SUCCESS);
+ }
+ base::FilePath filename =
+ CommandLine::ForCurrentProcess()->GetSwitchValuePath("output");
+
+ FILE* output = stdout;
+ if (!filename.empty()) {
+ output = base::OpenFile(filename, "wb");
+ if (!output)
+ PLOG(FATAL) << "Couldn't open '" << filename.AsUTF8Unsafe()
+ << "' for writing";
+ }
+
+ // Step 1: Enumerate the characters
+ PairVector pairs = InitializeCharacters();
+ // Step 2: Convert to sets.
+ MoveAllCharsToSets(&pairs);
+ if (VLOG_IS_ON(1)) {
+ LogStringSets(pairs);
+ }
+ // Step 3: Generate states.
+ std::vector<State> states = GenerateStates(pairs);
+ // Step 4/5: Print output
+ PrintStates(states, output);
+
+ if (!filename.empty()) {
+ if (!base::CloseFile(output))
+ PLOG(FATAL) << "Couldn't finish writing '" << filename.AsUTF8Unsafe()
+ << "'";
+ }
+
+ return EXIT_SUCCESS;
+}
diff --git a/chromium/base/i18n/file_util_icu.cc b/chromium/base/i18n/file_util_icu.cc
index 9b0525086d0..e250c29a5f7 100644
--- a/chromium/base/i18n/file_util_icu.cc
+++ b/chromium/base/i18n/file_util_icu.cc
@@ -97,7 +97,7 @@ void ReplaceIllegalCharactersInPath(base::FilePath::StringType* file_name,
DCHECK(!(IllegalCharacters::GetInstance()->contains(replace_char)));
// Remove leading and trailing whitespace.
- TrimWhitespace(*file_name, TRIM_ALL, file_name);
+ base::TrimWhitespace(*file_name, base::TRIM_ALL, file_name);
IllegalCharacters* illegal = IllegalCharacters::GetInstance();
int cursor = 0; // The ICU macros expect an int.
@@ -145,14 +145,16 @@ bool LocaleAwareCompareFilenames(const base::FilePath& a,
#if defined(OS_WIN)
return base::i18n::CompareString16WithCollator(collator.get(),
- WideToUTF16(a.value()), WideToUTF16(b.value())) == UCOL_LESS;
+ base::WideToUTF16(a.value()), base::WideToUTF16(b.value())) == UCOL_LESS;
#elif defined(OS_POSIX)
// On linux, the file system encoding is not defined. We assume
// SysNativeMBToWide takes care of it.
- return base::i18n::CompareString16WithCollator(collator.get(),
- WideToUTF16(base::SysNativeMBToWide(a.value().c_str())),
- WideToUTF16(base::SysNativeMBToWide(b.value().c_str()))) == UCOL_LESS;
+ return base::i18n::CompareString16WithCollator(
+ collator.get(),
+ base::WideToUTF16(base::SysNativeMBToWide(a.value().c_str())),
+ base::WideToUTF16(base::SysNativeMBToWide(b.value().c_str()))
+ ) == UCOL_LESS;
#else
#error Not implemented on your system
#endif
diff --git a/chromium/base/i18n/file_util_icu_unittest.cc b/chromium/base/i18n/file_util_icu_unittest.cc
index e3af9adf946..dd8122632e8 100644
--- a/chromium/base/i18n/file_util_icu_unittest.cc
+++ b/chromium/base/i18n/file_util_icu_unittest.cc
@@ -73,9 +73,9 @@ TEST_F(FileUtilICUTest, ReplaceIllegalCharactersInPathTest) {
file_util::ReplaceIllegalCharactersInPath(&bad_name, '-');
EXPECT_EQ(kIllegalCharacterCases[i].good_name, bad_name);
#elif defined(OS_MACOSX)
- std::string bad_name(WideToUTF8(kIllegalCharacterCases[i].bad_name));
+ std::string bad_name(base::WideToUTF8(kIllegalCharacterCases[i].bad_name));
file_util::ReplaceIllegalCharactersInPath(&bad_name, '-');
- EXPECT_EQ(WideToUTF8(kIllegalCharacterCases[i].good_name), bad_name);
+ EXPECT_EQ(base::WideToUTF8(kIllegalCharacterCases[i].good_name), bad_name);
#endif
}
}
diff --git a/chromium/base/i18n/icu_util.cc b/chromium/base/i18n/icu_util.cc
index e5c698475e4..e0bd62cc50b 100644
--- a/chromium/base/i18n/icu_util.cc
+++ b/chromium/base/i18n/icu_util.cc
@@ -4,8 +4,6 @@
#include "base/i18n/icu_util.h"
-#include "build/build_config.h"
-
#if defined(OS_WIN)
#include <windows.h>
#endif
@@ -30,7 +28,10 @@
#define ICU_UTIL_DATA_STATIC 2
#if ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE
-#define ICU_UTIL_DATA_FILE_NAME "icudt" U_ICU_VERSION_SHORT "l.dat"
+// Use an unversioned file name to simplify a icu version update down the road.
+// No need to change the filename in multiple places (gyp files, windows
+// build pkg configurations, etc). 'l' stands for Little Endian.
+#define ICU_UTIL_DATA_FILE_NAME "icudtl.dat"
#elif ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_SHARED
#define ICU_UTIL_DATA_SYMBOL "icudt" U_ICU_VERSION_SHORT "_dat"
#if defined(OS_WIN)
@@ -41,14 +42,48 @@
namespace base {
namespace i18n {
+namespace {
+
+#if !defined(NDEBUG)
+// Assert that we are not called more than once. Even though calling this
+// function isn't harmful (ICU can handle it), being called twice probably
+// indicates a programming error.
+bool g_called_once = false;
+bool g_check_called_once = true;
+#endif
+}
+
+
+#if defined(OS_ANDROID)
+bool InitializeICUWithFileDescriptor(int data_fd) {
+#if !defined(NDEBUG)
+ DCHECK(!g_check_called_once || !g_called_once);
+ g_called_once = true;
+#endif
+
+#if (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_STATIC)
+ // The ICU data is statically linked.
+ return true;
+#elif (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)
+ CR_DEFINE_STATIC_LOCAL(base::MemoryMappedFile, mapped_file, ());
+ if (!mapped_file.IsValid()) {
+ if (!mapped_file.Initialize(base::File(data_fd))) {
+ LOG(ERROR) << "Couldn't mmap icu data file";
+ return false;
+ }
+ }
+ UErrorCode err = U_ZERO_ERROR;
+ udata_setCommonData(const_cast<uint8*>(mapped_file.data()), &err);
+ return err == U_ZERO_ERROR;
+#endif // ICU_UTIL_DATA_FILE
+}
+#endif
+
+
bool InitializeICU() {
-#ifndef NDEBUG
- // Assert that we are not called more than once. Even though calling this
- // function isn't harmful (ICU can handle it), being called twice probably
- // indicates a programming error.
- static bool called_once = false;
- DCHECK(!called_once);
- called_once = true;
+#if !defined(NDEBUG)
+ DCHECK(!g_check_called_once || !g_called_once);
+ g_called_once = true;
#endif
#if (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_SHARED)
@@ -59,13 +94,13 @@ bool InitializeICU() {
HMODULE module = LoadLibrary(data_path.value().c_str());
if (!module) {
- DLOG(ERROR) << "Failed to load " << ICU_UTIL_DATA_SHARED_MODULE_NAME;
+ LOG(ERROR) << "Failed to load " << ICU_UTIL_DATA_SHARED_MODULE_NAME;
return false;
}
FARPROC addr = GetProcAddress(module, ICU_UTIL_DATA_SYMBOL);
if (!addr) {
- DLOG(ERROR) << ICU_UTIL_DATA_SYMBOL << ": not found in "
+ LOG(ERROR) << ICU_UTIL_DATA_SYMBOL << ": not found in "
<< ICU_UTIL_DATA_SHARED_MODULE_NAME;
return false;
}
@@ -86,25 +121,32 @@ bool InitializeICU() {
// be released.
CR_DEFINE_STATIC_LOCAL(base::MemoryMappedFile, mapped_file, ());
if (!mapped_file.IsValid()) {
- // Assume it is in the framework bundle's Resources directory.
#if !defined(OS_MACOSX)
+ FilePath data_path;
+#if defined(OS_WIN)
+ // The data file will be in the same directory as the current module.
+ bool path_ok = PathService::Get(base::DIR_MODULE, &data_path);
+#elif defined(OS_ANDROID)
+ bool path_ok = PathService::Get(base::DIR_ANDROID_APP_DATA, &data_path);
+#else
// For now, expect the data file to be alongside the executable.
// This is sufficient while we work on unit tests, but will eventually
// likely live in a data directory.
- FilePath data_path;
bool path_ok = PathService::Get(base::DIR_EXE, &data_path);
+#endif
DCHECK(path_ok);
data_path = data_path.AppendASCII(ICU_UTIL_DATA_FILE_NAME);
#else
+ // Assume it is in the framework bundle's Resources directory.
FilePath data_path =
base::mac::PathForFrameworkBundleResource(CFSTR(ICU_UTIL_DATA_FILE_NAME));
if (data_path.empty()) {
- DLOG(ERROR) << ICU_UTIL_DATA_FILE_NAME << " not found in bundle";
+ LOG(ERROR) << ICU_UTIL_DATA_FILE_NAME << " not found in bundle";
return false;
}
#endif // OS check
if (!mapped_file.Initialize(data_path)) {
- DLOG(ERROR) << "Couldn't mmap " << data_path.value();
+ LOG(ERROR) << "Couldn't mmap " << data_path.AsUTF8Unsafe();
return false;
}
}
@@ -114,5 +156,11 @@ bool InitializeICU() {
#endif
}
+void AllowMultipleInitializeCallsForTesting() {
+#if !defined(NDEBUG)
+ g_check_called_once = false;
+#endif
+}
+
} // namespace i18n
} // namespace base
diff --git a/chromium/base/i18n/icu_util.h b/chromium/base/i18n/icu_util.h
index ef5dede235d..b0a5dbcce6d 100644
--- a/chromium/base/i18n/icu_util.h
+++ b/chromium/base/i18n/icu_util.h
@@ -5,6 +5,7 @@
#ifndef BASE_I18N_ICU_UTIL_H_
#define BASE_I18N_ICU_UTIL_H_
+#include "build/build_config.h"
#include "base/i18n/base_i18n_export.h"
namespace base {
@@ -14,6 +15,15 @@ namespace i18n {
// function should be called before ICU is used.
BASE_I18N_EXPORT bool InitializeICU();
+#if defined(OS_ANDROID)
+// Android uses a file descriptor passed by browser process to initialize ICU
+// in render processes.
+BASE_I18N_EXPORT bool InitializeICUWithFileDescriptor(int data_fd);
+#endif
+
+// In a test binary, the call above might occur twice.
+BASE_I18N_EXPORT void AllowMultipleInitializeCallsForTesting();
+
} // namespace i18n
} // namespace base
diff --git a/chromium/base/i18n/rtl.cc b/chromium/base/i18n/rtl.cc
index d9818e800e2..d878c40da02 100644
--- a/chromium/base/i18n/rtl.cc
+++ b/chromium/base/i18n/rtl.cc
@@ -14,10 +14,6 @@
#include "third_party/icu/source/common/unicode/uscript.h"
#include "third_party/icu/source/i18n/unicode/coll.h"
-#if defined(TOOLKIT_GTK)
-#include <gtk/gtk.h>
-#endif
-
namespace {
// Extract language, country and variant, but ignore keywords. For example,
@@ -123,12 +119,7 @@ void SetICUDefaultLocale(const std::string& locale_string) {
}
bool IsRTL() {
-#if defined(TOOLKIT_GTK)
- GtkTextDirection gtk_dir = gtk_widget_get_default_direction();
- return gtk_dir == GTK_TEXT_DIR_RTL;
-#else
return ICUIsRTL();
-#endif
}
bool ICUIsRTL() {
@@ -163,6 +154,21 @@ TextDirection GetFirstStrongCharacterDirection(const string16& text) {
return LEFT_TO_RIGHT;
}
+TextDirection GetLastStrongCharacterDirection(const string16& text) {
+ const UChar* string = text.c_str();
+ size_t position = text.length();
+ while (position > 0) {
+ UChar32 character;
+ size_t prev_position = position;
+ U16_PREV(string, 0, prev_position, character);
+ TextDirection direction = GetCharacterDirection(character);
+ if (direction != UNKNOWN_DIRECTION)
+ return direction;
+ position = prev_position;
+ }
+ return LEFT_TO_RIGHT;
+}
+
TextDirection GetStringDirection(const string16& text) {
const UChar* string = text.c_str();
size_t length = text.length();
@@ -248,15 +254,18 @@ bool AdjustStringForLocaleDirection(string16* text) {
bool has_rtl_chars = StringContainsStrongRTLChars(*text);
if (!ui_direction_is_rtl && has_rtl_chars) {
WrapStringWithRTLFormatting(text);
- text->insert(0U, 1U, kLeftToRightMark);
+ text->insert(static_cast<size_t>(0), static_cast<size_t>(1),
+ kLeftToRightMark);
text->push_back(kLeftToRightMark);
} else if (ui_direction_is_rtl && has_rtl_chars) {
WrapStringWithRTLFormatting(text);
- text->insert(0U, 1U, kRightToLeftMark);
+ text->insert(static_cast<size_t>(0), static_cast<size_t>(1),
+ kRightToLeftMark);
text->push_back(kRightToLeftMark);
} else if (ui_direction_is_rtl) {
WrapStringWithLTRFormatting(text);
- text->insert(0U, 1U, kRightToLeftMark);
+ text->insert(static_cast<size_t>(0), static_cast<size_t>(1),
+ kRightToLeftMark);
text->push_back(kRightToLeftMark);
} else {
return false;
@@ -317,7 +326,8 @@ void WrapStringWithLTRFormatting(string16* text) {
return;
// Inserting an LRE (Left-To-Right Embedding) mark as the first character.
- text->insert(0U, 1U, kLeftToRightEmbeddingMark);
+ text->insert(static_cast<size_t>(0), static_cast<size_t>(1),
+ kLeftToRightEmbeddingMark);
// Inserting a PDF (Pop Directional Formatting) mark as the last character.
text->push_back(kPopDirectionalFormatting);
@@ -328,7 +338,8 @@ void WrapStringWithRTLFormatting(string16* text) {
return;
// Inserting an RLE (Right-To-Left Embedding) mark as the first character.
- text->insert(0U, 1U, kRightToLeftEmbeddingMark);
+ text->insert(static_cast<size_t>(0), static_cast<size_t>(1),
+ kRightToLeftEmbeddingMark);
// Inserting a PDF (Pop Directional Formatting) mark as the last character.
text->push_back(kPopDirectionalFormatting);
diff --git a/chromium/base/i18n/rtl.h b/chromium/base/i18n/rtl.h
index c80d2f85777..aa5f6810a9b 100644
--- a/chromium/base/i18n/rtl.h
+++ b/chromium/base/i18n/rtl.h
@@ -64,7 +64,7 @@ BASE_I18N_EXPORT bool ICUIsRTL();
BASE_I18N_EXPORT TextDirection GetTextDirectionForLocale(
const char* locale_name);
-// Given the string in |text|, returns the directionality of the first
+// Given the string in |text|, returns the directionality of the first or last
// character with strong directionality in the string. If no character in the
// text has strong directionality, LEFT_TO_RIGHT is returned. The Bidi
// character types L, LRE, LRO, R, AL, RLE, and RLO are considered as strong
@@ -72,6 +72,8 @@ BASE_I18N_EXPORT TextDirection GetTextDirectionForLocale(
// for more information.
BASE_I18N_EXPORT TextDirection GetFirstStrongCharacterDirection(
const string16& text);
+BASE_I18N_EXPORT TextDirection GetLastStrongCharacterDirection(
+ const string16& text);
// Given the string in |text|, returns LEFT_TO_RIGHT or RIGHT_TO_LEFT if all the
// strong directionality characters in the string are of the same
diff --git a/chromium/base/i18n/rtl_unittest.cc b/chromium/base/i18n/rtl_unittest.cc
index 58772b05839..2d923acf0ba 100644
--- a/chromium/base/i18n/rtl_unittest.cc
+++ b/chromium/base/i18n/rtl_unittest.cc
@@ -14,10 +14,6 @@
#include "testing/platform_test.h"
#include "third_party/icu/source/i18n/unicode/usearch.h"
-#if defined(TOOLKIT_GTK)
-#include <gtk/gtk.h>
-#endif
-
namespace base {
namespace i18n {
@@ -27,10 +23,6 @@ namespace {
void SetRTL(bool rtl) {
// Override the current locale/direction.
SetICUDefaultLocale(rtl ? "he" : "en");
-#if defined(TOOLKIT_GTK)
- // Do the same for GTK, which does not rely on the ICU default locale.
- gtk_widget_set_default_direction(rtl ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
-#endif
EXPECT_EQ(rtl, IsRTL());
}
@@ -46,6 +38,8 @@ TEST_F(RTLTest, GetFirstStrongCharacterDirection) {
} cases[] = {
// Test pure LTR string.
{ L"foo bar", LEFT_TO_RIGHT },
+ // Test pure RTL string.
+ { L"\x05d0\x05d1\x05d2 \x05d3\x0d4\x05d5", RIGHT_TO_LEFT},
// Test bidi string in which the first character with strong directionality
// is a character with type L.
{ L"foo \x05d0 bar", LEFT_TO_RIGHT },
@@ -107,6 +101,68 @@ TEST_F(RTLTest, GetFirstStrongCharacterDirection) {
GetFirstStrongCharacterDirection(WideToUTF16(cases[i].text)));
}
+
+// Note that the cases with LRE, LRO, RLE and RLO are invalid for
+// GetLastStrongCharacterDirection because they should be followed by PDF
+// character.
+TEST_F(RTLTest, GetLastStrongCharacterDirection) {
+ struct {
+ const wchar_t* text;
+ TextDirection direction;
+ } cases[] = {
+ // Test pure LTR string.
+ { L"foo bar", LEFT_TO_RIGHT },
+ // Test pure RTL string.
+ { L"\x05d0\x05d1\x05d2 \x05d3\x0d4\x05d5", RIGHT_TO_LEFT},
+ // Test bidi string in which the last character with strong directionality
+ // is a character with type L.
+ { L"foo \x05d0 bar", LEFT_TO_RIGHT },
+ // Test bidi string in which the last character with strong directionality
+ // is a character with type R.
+ { L"\x05d0 foo bar \x05d3", RIGHT_TO_LEFT },
+ // Test bidi string which ends with a character with weak directionality
+ // and in which the last character with strong directionality is a
+ // character with type L.
+ { L"!foo \x05d0 bar!", LEFT_TO_RIGHT },
+ // Test bidi string which ends with a character with weak directionality
+ // and in which the last character with strong directionality is a
+ // character with type R.
+ { L",\x05d0 foo bar \x05d1,", RIGHT_TO_LEFT },
+ // Test bidi string in which the last character with strong directionality
+ // is a character with type AL.
+ { L"\x0622 foo \x05d0 bar \x0622", RIGHT_TO_LEFT },
+ // Test a string without strong directionality characters.
+ { L",!.{}", LEFT_TO_RIGHT },
+ // Test empty string.
+ { L"", LEFT_TO_RIGHT },
+ // Test characters in non-BMP (e.g. Phoenician letters. Please refer to
+ // http://demo.icu-project.org/icu-bin/ubrowse?scr=151&b=10910 for more
+ // information).
+ {
+#if defined(WCHAR_T_IS_UTF32)
+ L"abc 123" L" ! \x10910 !",
+#elif defined(WCHAR_T_IS_UTF16)
+ L"abc 123" L" ! \xd802\xdd10 !",
+#else
+#error wchar_t should be either UTF-16 or UTF-32
+#endif
+ RIGHT_TO_LEFT },
+ {
+#if defined(WCHAR_T_IS_UTF32)
+ L"abc 123" L" ! \x10401 !",
+#elif defined(WCHAR_T_IS_UTF16)
+ L"abc 123" L" ! \xd801\xdc01 !",
+#else
+#error wchar_t should be either UTF-16 or UTF-32
+#endif
+ LEFT_TO_RIGHT },
+ };
+
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i)
+ EXPECT_EQ(cases[i].direction,
+ GetLastStrongCharacterDirection(WideToUTF16(cases[i].text)));
+}
+
TEST_F(RTLTest, GetStringDirection) {
struct {
const wchar_t* text;
diff --git a/chromium/base/i18n/streaming_utf8_validator.cc b/chromium/base/i18n/streaming_utf8_validator.cc
new file mode 100644
index 00000000000..c809985e168
--- /dev/null
+++ b/chromium/base/i18n/streaming_utf8_validator.cc
@@ -0,0 +1,59 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This implementation doesn't use ICU. The ICU macros are oriented towards
+// character-at-a-time processing, whereas byte-at-a-time processing is easier
+// with streaming input.
+
+#include "base/i18n/streaming_utf8_validator.h"
+
+#include "base/i18n/utf8_validator_tables.h"
+#include "base/logging.h"
+
+namespace base {
+namespace {
+
+uint8 StateTableLookup(uint8 offset) {
+ DCHECK_LT(offset, internal::kUtf8ValidatorTablesSize);
+ return internal::kUtf8ValidatorTables[offset];
+}
+
+} // namespace
+
+StreamingUtf8Validator::State StreamingUtf8Validator::AddBytes(const char* data,
+ size_t size) {
+ // Copy |state_| into a local variable so that the compiler doesn't have to be
+ // careful of aliasing.
+ uint8 state = state_;
+ for (const char* p = data; p != data + size; ++p) {
+ if ((*p & 0x80) == 0) {
+ if (state == 0)
+ continue;
+ state = internal::I18N_UTF8_VALIDATOR_INVALID_INDEX;
+ break;
+ }
+ const uint8 shift_amount = StateTableLookup(state);
+ const uint8 shifted_char = (*p & 0x7F) >> shift_amount;
+ state = StateTableLookup(state + shifted_char + 1);
+ // State may be INVALID here, but this code is optimised for the case of
+ // valid UTF-8 and it is more efficient (by about 2%) to not attempt an
+ // early loop exit unless we hit an ASCII character.
+ }
+ state_ = state;
+ return state == 0 ? VALID_ENDPOINT
+ : state == internal::I18N_UTF8_VALIDATOR_INVALID_INDEX
+ ? INVALID
+ : VALID_MIDPOINT;
+}
+
+void StreamingUtf8Validator::Reset() {
+ state_ = 0u;
+}
+
+bool StreamingUtf8Validator::Validate(const std::string& string) {
+ return StreamingUtf8Validator().AddBytes(string.data(), string.size()) ==
+ VALID_ENDPOINT;
+}
+
+} // namespace base
diff --git a/chromium/base/i18n/streaming_utf8_validator.h b/chromium/base/i18n/streaming_utf8_validator.h
new file mode 100644
index 00000000000..f10ac721c54
--- /dev/null
+++ b/chromium/base/i18n/streaming_utf8_validator.h
@@ -0,0 +1,63 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// A streaming validator for UTF-8. Validation is based on the definition in
+// RFC-3629. In particular, it does not reject the invalid characters rejected
+// by base::IsStringUTF8().
+//
+// The implementation detects errors on the first possible byte.
+
+#ifndef BASE_I18N_STREAMING_UTF8_VALIDATOR_H_
+#define BASE_I18N_STREAMING_UTF8_VALIDATOR_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/i18n/base_i18n_export.h"
+
+namespace base {
+
+class BASE_I18N_EXPORT StreamingUtf8Validator {
+ public:
+ // The validator exposes 3 states. It starts in state VALID_ENDPOINT. As it
+ // processes characters it alternates between VALID_ENDPOINT and
+ // VALID_MIDPOINT. If it encounters an invalid byte or UTF-8 sequence the
+ // state changes permanently to INVALID.
+ enum State {
+ VALID_ENDPOINT,
+ VALID_MIDPOINT,
+ INVALID
+ };
+
+ StreamingUtf8Validator() : state_(0u) {}
+ // Trivial destructor intentionally omitted.
+
+ // Validate |size| bytes starting at |data|. If the concatenation of all calls
+ // to AddBytes() since this object was constructed or reset is a valid UTF-8
+ // string, returns VALID_ENDPOINT. If it could be the prefix of a valid UTF-8
+ // string, returns VALID_MIDPOINT. If an invalid byte or UTF-8 sequence was
+ // present, returns INVALID.
+ State AddBytes(const char* data, size_t size);
+
+ // Return the object to a freshly-constructed state so that it can be re-used.
+ void Reset();
+
+ // Validate a complete string using the same criteria. Returns true if the
+ // string only contains complete, valid UTF-8 codepoints.
+ static bool Validate(const std::string& string);
+
+ private:
+ // The current state of the validator. Value 0 is the initial/valid state.
+ // The state is stored as an offset into |kUtf8ValidatorTables|. The special
+ // state |kUtf8InvalidState| is invalid.
+ uint8 state_;
+
+ // This type could be made copyable but there is currently no use-case for
+ // it.
+ DISALLOW_COPY_AND_ASSIGN(StreamingUtf8Validator);
+};
+
+} // namespace base
+
+#endif // BASE_I18N_STREAMING_UTF8_VALIDATOR_H_
diff --git a/chromium/base/i18n/streaming_utf8_validator_perftest.cc b/chromium/base/i18n/streaming_utf8_validator_perftest.cc
new file mode 100644
index 00000000000..ac2eb0820ba
--- /dev/null
+++ b/chromium/base/i18n/streaming_utf8_validator_perftest.cc
@@ -0,0 +1,234 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// All data that is passed through a WebSocket with type "Text" needs to be
+// validated as UTF8. Since this is done on the IO thread, it needs to be
+// reasonably fast.
+
+// We are only interested in the performance on valid UTF8. Invalid UTF8 will
+// result in a connection failure, so is unlikely to become a source of
+// performance issues.
+
+#include "base/i18n/streaming_utf8_validator.h"
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/bind.h"
+#include "base/callback.h"
+#include "base/strings/string_util.h"
+#include "base/strings/stringprintf.h"
+#include "base/test/perf_time_logger.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace base {
+namespace {
+
+// We want to test ranges of valid UTF-8 sequences. These ranges are inclusive.
+// They are intended to be large enough that the validator needs to do
+// meaningful work while being in some sense "realistic" (eg. control characters
+// are not included).
+const char kOneByteSeqRangeStart[] = " "; // U+0020
+const char kOneByteSeqRangeEnd[] = "~"; // U+007E
+
+const char kTwoByteSeqRangeStart[] = "\xc2\xa0"; // U+00A0 non-breaking space
+const char kTwoByteSeqRangeEnd[] = "\xc9\x8f"; // U+024F small y with stroke
+
+const char kThreeByteSeqRangeStart[] = "\xe3\x81\x82"; // U+3042 Hiragana "a"
+const char kThreeByteSeqRangeEnd[] = "\xe9\xbf\x83"; // U+9FC3 "to blink"
+
+const char kFourByteSeqRangeStart[] = "\xf0\xa0\x80\x8b"; // U+2000B
+const char kFourByteSeqRangeEnd[] = "\xf0\xaa\x9a\xb2"; // U+2A6B2
+
+// The different lengths of strings to test.
+const size_t kTestLengths[] = {1, 32, 256, 32768, 1 << 20};
+
+// Simplest possible byte-at-a-time validator, to provide a baseline
+// for comparison. This is only tried on 1-byte UTF-8 sequences, as
+// the results will not be meaningful with sequences containing
+// top-bit-set bytes.
+bool IsString7Bit(const std::string& s) {
+ for (std::string::const_iterator it = s.begin(); it != s.end(); ++it) {
+ if (*it & 0x80)
+ return false;
+ }
+ return true;
+}
+
+// Assumes that |previous| is a valid UTF-8 sequence, and attempts to return
+// the next one. Is just barely smart enough to iterate through the ranges
+// defined about.
+std::string NextUtf8Sequence(const std::string& previous) {
+ DCHECK(StreamingUtf8Validator::Validate(previous));
+ std::string next = previous;
+ for (int i = static_cast<int>(previous.length() - 1); i >= 0; --i) {
+ // All bytes in a UTF-8 sequence except the first one are
+ // constrained to the range 0x80 to 0xbf, inclusive. When we
+ // increment past 0xbf, we carry into the previous byte.
+ if (i > 0 && next[i] == '\xbf') {
+ next[i] = '\x80';
+ continue; // carry
+ }
+ ++next[i];
+ break; // no carry
+ }
+ DCHECK(StreamingUtf8Validator::Validate(next))
+ << "Result \"" << next << "\" failed validation";
+ return next;
+}
+
+typedef bool (*TestTargetType)(const std::string&);
+
+// Run fuction |target| over |test_string| |times| times, and report the results
+// using |description|.
+bool RunTest(const std::string& description,
+ TestTargetType target,
+ const std::string& test_string,
+ int times) {
+ base::PerfTimeLogger timer(description.c_str());
+ bool result = true;
+ for (int i = 0; i < times; ++i) {
+ result = target(test_string) && result;
+ }
+ timer.Done();
+ return result;
+}
+
+// Construct a string by repeating |input| enough times to equal or exceed
+// |length|.
+std::string ConstructRepeatedTestString(const std::string& input,
+ size_t length) {
+ std::string output = input;
+ while (output.length() * 2 < length) {
+ output += output;
+ }
+ if (output.length() < length) {
+ output += ConstructRepeatedTestString(input, length - output.length());
+ }
+ return output;
+}
+
+// Construct a string by expanding the range of UTF-8 sequences
+// between |input_start| and |input_end|, inclusive, and then
+// repeating the resulting string until it equals or exceeds |length|
+// bytes. |input_start| and |input_end| must be valid UTF-8
+// sequences.
+std::string ConstructRangedTestString(const std::string& input_start,
+ const std::string& input_end,
+ size_t length) {
+ std::string output = input_start;
+ std::string input = input_start;
+ while (output.length() < length && input != input_end) {
+ input = NextUtf8Sequence(input);
+ output += input;
+ }
+ if (output.length() < length) {
+ output = ConstructRepeatedTestString(output, length);
+ }
+ return output;
+}
+
+struct TestFunctionDescription {
+ TestTargetType function;
+ const char* function_name;
+};
+
+// IsString7Bit is intentionally placed last so it can be excluded easily.
+const TestFunctionDescription kTestFunctions[] = {
+ {&StreamingUtf8Validator::Validate, "StreamingUtf8Validator"},
+ {&IsStringUTF8, "IsStringUTF8"}, {&IsString7Bit, "IsString7Bit"}};
+
+// Construct a test string from |construct_test_string| for each of the lengths
+// in |kTestLengths| in turn. For each string, run each test in |test_functions|
+// for a number of iterations such that the total number of bytes validated
+// is around 16MB.
+void RunSomeTests(
+ const char format[],
+ base::Callback<std::string(size_t length)> construct_test_string,
+ const TestFunctionDescription* test_functions,
+ size_t test_count) {
+ for (size_t i = 0; i < arraysize(kTestLengths); ++i) {
+ const size_t length = kTestLengths[i];
+ const std::string test_string = construct_test_string.Run(length);
+ const int real_length = static_cast<int>(test_string.length());
+ const int times = (1 << 24) / real_length;
+ for (size_t test_index = 0; test_index < test_count; ++test_index) {
+ EXPECT_TRUE(RunTest(StringPrintf(format,
+ test_functions[test_index].function_name,
+ real_length,
+ times),
+ test_functions[test_index].function,
+ test_string,
+ times));
+ }
+ }
+}
+
+TEST(StreamingUtf8ValidatorPerfTest, OneByteRepeated) {
+ RunSomeTests("%s: bytes=1 repeated length=%d repeat=%d",
+ base::Bind(ConstructRepeatedTestString, kOneByteSeqRangeStart),
+ kTestFunctions,
+ 3);
+}
+
+TEST(StreamingUtf8ValidatorPerfTest, OneByteRange) {
+ RunSomeTests("%s: bytes=1 ranged length=%d repeat=%d",
+ base::Bind(ConstructRangedTestString,
+ kOneByteSeqRangeStart,
+ kOneByteSeqRangeEnd),
+ kTestFunctions,
+ 3);
+}
+
+TEST(StreamingUtf8ValidatorPerfTest, TwoByteRepeated) {
+ RunSomeTests("%s: bytes=2 repeated length=%d repeat=%d",
+ base::Bind(ConstructRepeatedTestString, kTwoByteSeqRangeStart),
+ kTestFunctions,
+ 2);
+}
+
+TEST(StreamingUtf8ValidatorPerfTest, TwoByteRange) {
+ RunSomeTests("%s: bytes=2 ranged length=%d repeat=%d",
+ base::Bind(ConstructRangedTestString,
+ kTwoByteSeqRangeStart,
+ kTwoByteSeqRangeEnd),
+ kTestFunctions,
+ 2);
+}
+
+TEST(StreamingUtf8ValidatorPerfTest, ThreeByteRepeated) {
+ RunSomeTests(
+ "%s: bytes=3 repeated length=%d repeat=%d",
+ base::Bind(ConstructRepeatedTestString, kThreeByteSeqRangeStart),
+ kTestFunctions,
+ 2);
+}
+
+TEST(StreamingUtf8ValidatorPerfTest, ThreeByteRange) {
+ RunSomeTests("%s: bytes=3 ranged length=%d repeat=%d",
+ base::Bind(ConstructRangedTestString,
+ kThreeByteSeqRangeStart,
+ kThreeByteSeqRangeEnd),
+ kTestFunctions,
+ 2);
+}
+
+TEST(StreamingUtf8ValidatorPerfTest, FourByteRepeated) {
+ RunSomeTests("%s: bytes=4 repeated length=%d repeat=%d",
+ base::Bind(ConstructRepeatedTestString, kFourByteSeqRangeStart),
+ kTestFunctions,
+ 2);
+}
+
+TEST(StreamingUtf8ValidatorPerfTest, FourByteRange) {
+ RunSomeTests("%s: bytes=4 ranged length=%d repeat=%d",
+ base::Bind(ConstructRangedTestString,
+ kFourByteSeqRangeStart,
+ kFourByteSeqRangeEnd),
+ kTestFunctions,
+ 2);
+}
+
+} // namespace
+} // namespace base
diff --git a/chromium/base/i18n/streaming_utf8_validator_unittest.cc b/chromium/base/i18n/streaming_utf8_validator_unittest.cc
new file mode 100644
index 00000000000..20ea564c032
--- /dev/null
+++ b/chromium/base/i18n/streaming_utf8_validator_unittest.cc
@@ -0,0 +1,412 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/i18n/streaming_utf8_validator.h"
+
+#include <stdio.h>
+#include <string.h>
+
+#include <string>
+
+#include "base/strings/string_piece.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+// Define BASE_I18N_UTF8_VALIDATOR_THOROUGH_TEST to verify that this class
+// accepts exactly the same set of 4-byte strings as ICU-based validation. This
+// tests every possible 4-byte string, so it is too slow to run routinely on
+// low-powered machines.
+//
+// #define BASE_I18N_UTF8_VALIDATOR_THOROUGH_TEST
+
+#ifdef BASE_I18N_UTF8_VALIDATOR_THOROUGH_TEST
+
+#include "base/basictypes.h"
+#include "base/bind.h"
+#include "base/location.h"
+#include "base/logging.h"
+#include "base/memory/ref_counted.h"
+#include "base/strings/string_util.h"
+#include "base/strings/stringprintf.h"
+#include "base/strings/utf_string_conversion_utils.h"
+#include "base/synchronization/condition_variable.h"
+#include "base/synchronization/lock.h"
+#include "base/threading/sequenced_worker_pool.h"
+#include "third_party/icu/source/common/unicode/utf8.h"
+
+#endif // BASE_I18N_UTF8_VALIDATOR_THOROUGH_TEST
+
+namespace base {
+namespace {
+
+// Avoid having to qualify the enum values in the tests.
+const StreamingUtf8Validator::State VALID_ENDPOINT =
+ StreamingUtf8Validator::VALID_ENDPOINT;
+const StreamingUtf8Validator::State VALID_MIDPOINT =
+ StreamingUtf8Validator::VALID_MIDPOINT;
+const StreamingUtf8Validator::State INVALID = StreamingUtf8Validator::INVALID;
+
+#ifdef BASE_I18N_UTF8_VALIDATOR_THOROUGH_TEST
+
+const uint32 kThoroughTestChunkSize = 1 << 24;
+
+class StreamingUtf8ValidatorThoroughTest : public ::testing::Test {
+ protected:
+ StreamingUtf8ValidatorThoroughTest()
+ : all_done_(&lock_), tasks_dispatched_(0), tasks_finished_(0) {}
+
+ // This uses the same logic as base::IsStringUTF8 except it considers
+ // non-characters valid (and doesn't require a string as input).
+ static bool IsStringUtf8(const char* src, int32 src_len) {
+ int32 char_index = 0;
+
+ while (char_index < src_len) {
+ int32 code_point;
+ U8_NEXT(src, char_index, src_len, code_point);
+ if (!base::IsValidCodepoint(code_point))
+ return false;
+ }
+ return true;
+ }
+
+ // Converts the passed-in integer to a 4 byte string and then
+ // verifies that IsStringUtf8 and StreamingUtf8Validator agree on
+ // whether it is valid UTF-8 or not.
+ void TestNumber(uint32 n) const {
+ char test[sizeof n];
+ memcpy(test, &n, sizeof n);
+ StreamingUtf8Validator validator;
+ EXPECT_EQ(IsStringUtf8(test, sizeof n),
+ validator.AddBytes(test, sizeof n) == VALID_ENDPOINT)
+ << "Difference of opinion for \""
+ << base::StringPrintf("\\x%02X\\x%02X\\x%02X\\x%02X",
+ test[0] & 0xFF,
+ test[1] & 0xFF,
+ test[2] & 0xFF,
+ test[3] & 0xFF) << "\"";
+ }
+
+ public:
+ // Tests the 4-byte sequences corresponding to the |size| integers
+ // starting at |begin|. This is intended to be run from a worker
+ // pool. Signals |all_done_| at the end if it thinks all tasks are
+ // finished.
+ void TestRange(uint32 begin, uint32 size) {
+ for (uint32 i = 0; i < size; ++i) {
+ TestNumber(begin + i);
+ }
+ base::AutoLock al(lock_);
+ ++tasks_finished_;
+ LOG(INFO) << tasks_finished_ << " / " << tasks_dispatched_
+ << " tasks done\n";
+ if (tasks_finished_ >= tasks_dispatched_) {
+ all_done_.Signal();
+ }
+ }
+
+ protected:
+ base::Lock lock_;
+ base::ConditionVariable all_done_;
+ int tasks_dispatched_;
+ int tasks_finished_;
+};
+
+TEST_F(StreamingUtf8ValidatorThoroughTest, TestEverything) {
+ scoped_refptr<base::SequencedWorkerPool> pool =
+ new base::SequencedWorkerPool(32, "TestEverything");
+ base::AutoLock al(lock_);
+ uint32 begin = 0;
+ do {
+ pool->PostWorkerTask(
+ FROM_HERE,
+ base::Bind(&StreamingUtf8ValidatorThoroughTest::TestRange,
+ base::Unretained(this),
+ begin,
+ kThoroughTestChunkSize));
+ ++tasks_dispatched_;
+ begin += kThoroughTestChunkSize;
+ } while (begin != 0);
+ while (tasks_finished_ < tasks_dispatched_)
+ all_done_.Wait();
+}
+
+#endif // BASE_I18N_UTF8_VALIDATOR_THOROUGH_TEST
+
+// These valid and invalid UTF-8 sequences are based on the tests from
+// base/strings/string_util_unittest.cc
+
+// All of the strings in |valid| must represent a single codepoint, because
+// partial sequences are constructed by taking non-empty prefixes of these
+// strings.
+const char* const valid[] = {"\r", "\n", "a",
+ "\xc2\x81", "\xe1\x80\xbf", "\xf1\x80\xa0\xbf",
+ "\xef\xbb\xbf", // UTF-8 BOM
+};
+
+const char* const* const valid_end = valid + arraysize(valid);
+
+const char* const invalid[] = {
+ // always invalid bytes
+ "\xc0", "\xc1",
+ "\xf5", "\xf6", "\xf7",
+ "\xf8", "\xf9", "\xfa", "\xfb", "\xfc", "\xfd", "\xfe", "\xff",
+ // surrogate code points
+ "\xed\xa0\x80", "\xed\x0a\x8f", "\xed\xbf\xbf",
+ //
+ // overlong sequences
+ "\xc0\x80" // U+0000
+ "\xc1\x80", // "A"
+ "\xc1\x81", // "B"
+ "\xe0\x80\x80", // U+0000
+ "\xe0\x82\x80", // U+0080
+ "\xe0\x9f\xbf", // U+07ff
+ "\xf0\x80\x80\x8D", // U+000D
+ "\xf0\x80\x82\x91", // U+0091
+ "\xf0\x80\xa0\x80", // U+0800
+ "\xf0\x8f\xbb\xbf", // U+FEFF (BOM)
+ "\xf8\x80\x80\x80\xbf", // U+003F
+ "\xfc\x80\x80\x80\xa0\xa5",
+ //
+ // Beyond U+10FFFF
+ "\xf4\x90\x80\x80", // U+110000
+ "\xf8\xa0\xbf\x80\xbf", // 5 bytes
+ "\xfc\x9c\xbf\x80\xbf\x80", // 6 bytes
+ //
+ // BOMs in UTF-16(BE|LE)
+ "\xfe\xff", "\xff\xfe",
+};
+
+const char* const* const invalid_end = invalid + arraysize(invalid);
+
+// A ForwardIterator which returns all the non-empty prefixes of the elements of
+// "valid".
+class PartialIterator {
+ public:
+ // The constructor returns the first iterator, ie. it is equivalent to
+ // begin().
+ PartialIterator() : index_(0), prefix_length_(0) { Advance(); }
+ // The trivial destructor left intentionally undefined.
+ // This is a value type; the default copy constructor and assignment operator
+ // generated by the compiler are used.
+
+ static PartialIterator end() { return PartialIterator(arraysize(valid), 1); }
+
+ PartialIterator& operator++() {
+ Advance();
+ return *this;
+ }
+
+ base::StringPiece operator*() const {
+ return base::StringPiece(valid[index_], prefix_length_);
+ }
+
+ bool operator==(const PartialIterator& rhs) const {
+ return index_ == rhs.index_ && prefix_length_ == rhs.prefix_length_;
+ }
+
+ bool operator!=(const PartialIterator& rhs) const { return !(rhs == *this); }
+
+ private:
+ // This constructor is used by the end() method.
+ PartialIterator(size_t index, size_t prefix_length)
+ : index_(index), prefix_length_(prefix_length) {}
+
+ void Advance() {
+ if (index_ < arraysize(valid) && prefix_length_ < strlen(valid[index_]))
+ ++prefix_length_;
+ while (index_ < arraysize(valid) &&
+ prefix_length_ == strlen(valid[index_])) {
+ ++index_;
+ prefix_length_ = 1;
+ }
+ }
+
+ // The UTF-8 sequence, as an offset into the |valid| array.
+ size_t index_;
+ size_t prefix_length_;
+};
+
+// A test fixture for tests which test one UTF-8 sequence (or invalid
+// byte sequence) at a time.
+class StreamingUtf8ValidatorSingleSequenceTest : public ::testing::Test {
+ protected:
+ // Iterator must be convertible when de-referenced to StringPiece.
+ template <typename Iterator>
+ void CheckRange(Iterator begin,
+ Iterator end,
+ StreamingUtf8Validator::State expected) {
+ for (Iterator it = begin; it != end; ++it) {
+ StreamingUtf8Validator validator;
+ base::StringPiece sequence = *it;
+ EXPECT_EQ(expected,
+ validator.AddBytes(sequence.data(), sequence.size()))
+ << "Failed for \"" << sequence << "\"";
+ }
+ }
+
+ // Adding input a byte at a time should make absolutely no difference.
+ template <typename Iterator>
+ void CheckRangeByteAtATime(Iterator begin,
+ Iterator end,
+ StreamingUtf8Validator::State expected) {
+ for (Iterator it = begin; it != end; ++it) {
+ StreamingUtf8Validator validator;
+ base::StringPiece sequence = *it;
+ StreamingUtf8Validator::State state = VALID_ENDPOINT;
+ for (base::StringPiece::const_iterator cit = sequence.begin();
+ cit != sequence.end();
+ ++cit) {
+ state = validator.AddBytes(&*cit, 1);
+ }
+ EXPECT_EQ(expected, state) << "Failed for \"" << sequence << "\"";
+ }
+ }
+};
+
+// A test fixture for tests which test the concatenation of byte sequences.
+class StreamingUtf8ValidatorDoubleSequenceTest : public ::testing::Test {
+ protected:
+ // Check every possible concatenation of byte sequences from two
+ // ranges, and verify that the combination matches the expected
+ // state.
+ template <typename Iterator1, typename Iterator2>
+ void CheckCombinations(Iterator1 begin1,
+ Iterator1 end1,
+ Iterator2 begin2,
+ Iterator2 end2,
+ StreamingUtf8Validator::State expected) {
+ StreamingUtf8Validator validator;
+ for (Iterator1 it1 = begin1; it1 != end1; ++it1) {
+ base::StringPiece c1 = *it1;
+ for (Iterator2 it2 = begin2; it2 != end2; ++it2) {
+ base::StringPiece c2 = *it2;
+ validator.AddBytes(c1.data(), c1.size());
+ EXPECT_EQ(expected, validator.AddBytes(c2.data(), c2.size()))
+ << "Failed for \"" << c1 << c2 << "\"";
+ validator.Reset();
+ }
+ }
+ }
+};
+
+TEST(StreamingUtf8ValidatorTest, NothingIsValid) {
+ static const char kNothing[] = "";
+ EXPECT_EQ(VALID_ENDPOINT, StreamingUtf8Validator().AddBytes(kNothing, 0));
+}
+
+// Because the members of the |valid| array need to be non-zero length
+// sequences and are measured with strlen(), |valid| cannot be used it
+// to test the NUL character '\0', so the NUL character gets its own
+// test.
+TEST(StreamingUtf8ValidatorTest, NulIsValid) {
+ static const char kNul[] = "\x00";
+ EXPECT_EQ(VALID_ENDPOINT, StreamingUtf8Validator().AddBytes(kNul, 1));
+}
+
+// Just a basic sanity test before we start getting fancy.
+TEST(StreamingUtf8ValidatorTest, HelloWorld) {
+ static const char kHelloWorld[] = "Hello, World!";
+ EXPECT_EQ(
+ VALID_ENDPOINT,
+ StreamingUtf8Validator().AddBytes(kHelloWorld, strlen(kHelloWorld)));
+}
+
+// Check that the Reset() method works.
+TEST(StreamingUtf8ValidatorTest, ResetWorks) {
+ StreamingUtf8Validator validator;
+ EXPECT_EQ(INVALID, validator.AddBytes("\xC0", 1));
+ EXPECT_EQ(INVALID, validator.AddBytes("a", 1));
+ validator.Reset();
+ EXPECT_EQ(VALID_ENDPOINT, validator.AddBytes("a", 1));
+}
+
+TEST_F(StreamingUtf8ValidatorSingleSequenceTest, Valid) {
+ CheckRange(valid, valid_end, VALID_ENDPOINT);
+}
+
+TEST_F(StreamingUtf8ValidatorSingleSequenceTest, Partial) {
+ CheckRange(PartialIterator(), PartialIterator::end(), VALID_MIDPOINT);
+}
+
+TEST_F(StreamingUtf8ValidatorSingleSequenceTest, Invalid) {
+ CheckRange(invalid, invalid_end, INVALID);
+}
+
+TEST_F(StreamingUtf8ValidatorSingleSequenceTest, ValidByByte) {
+ CheckRangeByteAtATime(valid, valid_end, VALID_ENDPOINT);
+}
+
+TEST_F(StreamingUtf8ValidatorSingleSequenceTest, PartialByByte) {
+ CheckRangeByteAtATime(
+ PartialIterator(), PartialIterator::end(), VALID_MIDPOINT);
+}
+
+TEST_F(StreamingUtf8ValidatorSingleSequenceTest, InvalidByByte) {
+ CheckRangeByteAtATime(invalid, invalid_end, INVALID);
+}
+
+TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, ValidPlusValidIsValid) {
+ CheckCombinations(valid, valid_end, valid, valid_end, VALID_ENDPOINT);
+}
+
+TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, ValidPlusPartialIsPartial) {
+ CheckCombinations(valid,
+ valid_end,
+ PartialIterator(),
+ PartialIterator::end(),
+ VALID_MIDPOINT);
+}
+
+TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, PartialPlusValidIsInvalid) {
+ CheckCombinations(
+ PartialIterator(), PartialIterator::end(), valid, valid_end, INVALID);
+}
+
+TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, PartialPlusPartialIsInvalid) {
+ CheckCombinations(PartialIterator(),
+ PartialIterator::end(),
+ PartialIterator(),
+ PartialIterator::end(),
+ INVALID);
+}
+
+TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, ValidPlusInvalidIsInvalid) {
+ CheckCombinations(valid, valid_end, invalid, invalid_end, INVALID);
+}
+
+TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, InvalidPlusValidIsInvalid) {
+ CheckCombinations(invalid, invalid_end, valid, valid_end, INVALID);
+}
+
+TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, InvalidPlusInvalidIsInvalid) {
+ CheckCombinations(invalid, invalid_end, invalid, invalid_end, INVALID);
+}
+
+TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, InvalidPlusPartialIsInvalid) {
+ CheckCombinations(
+ invalid, invalid_end, PartialIterator(), PartialIterator::end(), INVALID);
+}
+
+TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, PartialPlusInvalidIsInvalid) {
+ CheckCombinations(
+ PartialIterator(), PartialIterator::end(), invalid, invalid_end, INVALID);
+}
+
+TEST(StreamingUtf8ValidatorValidateTest, EmptyIsValid) {
+ EXPECT_TRUE(StreamingUtf8Validator::Validate(std::string()));
+}
+
+TEST(StreamingUtf8ValidatorValidateTest, SimpleValidCase) {
+ EXPECT_TRUE(StreamingUtf8Validator::Validate("\xc2\x81"));
+}
+
+TEST(StreamingUtf8ValidatorValidateTest, SimpleInvalidCase) {
+ EXPECT_FALSE(StreamingUtf8Validator::Validate("\xc0\x80"));
+}
+
+TEST(StreamingUtf8ValidatorValidateTest, TruncatedIsInvalid) {
+ EXPECT_FALSE(StreamingUtf8Validator::Validate("\xc2"));
+}
+
+} // namespace
+} // namespace base
diff --git a/chromium/base/i18n/utf8_validator_tables.cc b/chromium/base/i18n/utf8_validator_tables.cc
new file mode 100644
index 00000000000..8dfa10caf79
--- /dev/null
+++ b/chromium/base/i18n/utf8_validator_tables.cc
@@ -0,0 +1,55 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file is auto-generated by build_utf8_validator_tables.
+// DO NOT EDIT.
+
+#include "base/i18n/utf8_validator_tables.h"
+
+namespace base {
+namespace internal {
+
+const uint8 kUtf8ValidatorTables[] = {
+ // State 0, offset 0x00
+ 0x00, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, // 0x08
+ 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, // 0x10
+ 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, // 0x18
+ 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, // 0x20
+ 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, // 0x28
+ 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, // 0x30
+ 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, // 0x38
+ 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, // 0x40
+ 0x81, 0x81, 0x81, 0x83, 0x83, 0x83, 0x83, 0x83, // 0x48
+ 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, // 0x50
+ 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, // 0x58
+ 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, // 0x60
+ 0x83, 0x86, 0x8b, 0x8b, 0x8b, 0x8b, 0x8b, 0x8b, // 0x68
+ 0x8b, 0x8b, 0x8b, 0x8b, 0x8b, 0x8b, 0x8e, 0x8b, // 0x70
+ 0x8b, 0x93, 0x9c, 0x9c, 0x9c, 0x9f, 0x81, 0x81, // 0x78
+ 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, // 0x80
+ 0x81, // 0x81
+ // State 1, offset 0x81
+ 0x07, 0x81, // 0x83
+ // State 2, offset 0x83
+ 0x06, 0x00, 0x81, // 0x86
+ // State 3, offset 0x86
+ 0x05, 0x81, 0x83, 0x81, 0x81, // 0x8b
+ // State 4, offset 0x8b
+ 0x06, 0x83, 0x81, // 0x8e
+ // State 5, offset 0x8e
+ 0x05, 0x83, 0x81, 0x81, 0x81, // 0x93
+ // State 6, offset 0x93
+ 0x04, 0x81, 0x8b, 0x8b, 0x8b, 0x81, 0x81, 0x81, // 0x9b
+ 0x81, // 0x9c
+ // State 7, offset 0x9c
+ 0x06, 0x8b, 0x81, // 0x9f
+ // State 8, offset 0x9f
+ 0x04, 0x8b, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, // 0xa7
+ 0x81, // 0xa8
+};
+
+const size_t kUtf8ValidatorTablesSize = arraysize(kUtf8ValidatorTables);
+
+} // namespace internal
+} // namespace base
diff --git a/chromium/base/i18n/utf8_validator_tables.h b/chromium/base/i18n/utf8_validator_tables.h
new file mode 100644
index 00000000000..b7db56e43e4
--- /dev/null
+++ b/chromium/base/i18n/utf8_validator_tables.h
@@ -0,0 +1,29 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_I18N_UTF8_VALIDATOR_TABLES_H_
+#define BASE_I18N_UTF8_VALIDATOR_TABLES_H_
+
+#include "base/basictypes.h"
+
+namespace base {
+namespace internal {
+
+// The tables for all states; a list of entries of the form (right_shift,
+// next_state, next_state, ....). The right_shifts are used to reduce the
+// overall size of the table. The table only covers bytes in the range
+// [0x80, 0xFF] to save space.
+extern const uint8 kUtf8ValidatorTables[];
+
+extern const size_t kUtf8ValidatorTablesSize;
+
+// The offset of the INVALID state in kUtf8ValidatorTables.
+enum {
+ I18N_UTF8_VALIDATOR_INVALID_INDEX = 129
+};
+
+} // namespace internal
+} // namespace base
+
+#endif // BASE_I18N_UTF8_VALIDATOR_TABLES_H_
diff --git a/chromium/base/id_map.h b/chromium/base/id_map.h
index 27098d29768..9cbc1f8978f 100644
--- a/chromium/base/id_map.h
+++ b/chromium/base/id_map.h
@@ -32,8 +32,10 @@ enum IDMapOwnershipSemantics {
// ownership semantics are set to own because pointers will leak.
template<typename T, IDMapOwnershipSemantics OS = IDMapExternalPointer>
class IDMap : public base::NonThreadSafe {
- private:
+ public:
typedef int32 KeyType;
+
+ private:
typedef base::hash_map<KeyType, T*> HashTable;
public:
diff --git a/chromium/base/id_map_unittest.cc b/chromium/base/id_map_unittest.cc
index 76d7c3ed4e9..c005a690578 100644
--- a/chromium/base/id_map_unittest.cc
+++ b/chromium/base/id_map_unittest.cc
@@ -94,31 +94,41 @@ TEST(IDMapTest, IteratorRemainsValidWhenRemovingOtherElements) {
const int kCount = 5;
TestObject obj[kCount];
- int32 ids[kCount];
for (int i = 0; i < kCount; i++)
- ids[i] = map.Add(&obj[i]);
+ map.Add(&obj[i]);
+ // IDMap uses a hash_map, which has no predictable iteration order.
+ int32 ids_in_iteration_order[kCount];
+ const TestObject* objs_in_iteration_order[kCount];
int counter = 0;
for (IDMap<TestObject>::const_iterator iter(&map);
!iter.IsAtEnd(); iter.Advance()) {
+ ids_in_iteration_order[counter] = iter.GetCurrentKey();
+ objs_in_iteration_order[counter] = iter.GetCurrentValue();
+ counter++;
+ }
+
+ counter = 0;
+ for (IDMap<TestObject>::const_iterator iter(&map);
+ !iter.IsAtEnd(); iter.Advance()) {
EXPECT_EQ(1, map.iteration_depth());
switch (counter) {
case 0:
- EXPECT_EQ(ids[0], iter.GetCurrentKey());
- EXPECT_EQ(&obj[0], iter.GetCurrentValue());
- map.Remove(ids[1]);
+ EXPECT_EQ(ids_in_iteration_order[0], iter.GetCurrentKey());
+ EXPECT_EQ(objs_in_iteration_order[0], iter.GetCurrentValue());
+ map.Remove(ids_in_iteration_order[1]);
break;
case 1:
- EXPECT_EQ(ids[2], iter.GetCurrentKey());
- EXPECT_EQ(&obj[2], iter.GetCurrentValue());
- map.Remove(ids[3]);
+ EXPECT_EQ(ids_in_iteration_order[2], iter.GetCurrentKey());
+ EXPECT_EQ(objs_in_iteration_order[2], iter.GetCurrentValue());
+ map.Remove(ids_in_iteration_order[3]);
break;
case 2:
- EXPECT_EQ(ids[4], iter.GetCurrentKey());
- EXPECT_EQ(&obj[4], iter.GetCurrentValue());
- map.Remove(ids[0]);
+ EXPECT_EQ(ids_in_iteration_order[4], iter.GetCurrentKey());
+ EXPECT_EQ(objs_in_iteration_order[4], iter.GetCurrentValue());
+ map.Remove(ids_in_iteration_order[0]);
break;
default:
FAIL() << "should not have that many elements";
@@ -194,22 +204,32 @@ TEST(IDMapTest, IteratorRemainsValidWhenClearing) {
const int kCount = 5;
TestObject obj[kCount];
- int32 ids[kCount];
for (int i = 0; i < kCount; i++)
- ids[i] = map.Add(&obj[i]);
+ map.Add(&obj[i]);
+ // IDMap uses a hash_map, which has no predictable iteration order.
+ int32 ids_in_iteration_order[kCount];
+ const TestObject* objs_in_iteration_order[kCount];
int counter = 0;
for (IDMap<TestObject>::const_iterator iter(&map);
!iter.IsAtEnd(); iter.Advance()) {
+ ids_in_iteration_order[counter] = iter.GetCurrentKey();
+ objs_in_iteration_order[counter] = iter.GetCurrentValue();
+ counter++;
+ }
+
+ counter = 0;
+ for (IDMap<TestObject>::const_iterator iter(&map);
+ !iter.IsAtEnd(); iter.Advance()) {
switch (counter) {
case 0:
- EXPECT_EQ(ids[0], iter.GetCurrentKey());
- EXPECT_EQ(&obj[0], iter.GetCurrentValue());
+ EXPECT_EQ(ids_in_iteration_order[0], iter.GetCurrentKey());
+ EXPECT_EQ(objs_in_iteration_order[0], iter.GetCurrentValue());
break;
case 1:
- EXPECT_EQ(ids[1], iter.GetCurrentKey());
- EXPECT_EQ(&obj[1], iter.GetCurrentValue());
+ EXPECT_EQ(ids_in_iteration_order[1], iter.GetCurrentKey());
+ EXPECT_EQ(objs_in_iteration_order[1], iter.GetCurrentValue());
map.Clear();
EXPECT_TRUE(map.IsEmpty());
EXPECT_EQ(0U, map.size());
diff --git a/chromium/base/ios/device_util.h b/chromium/base/ios/device_util.h
index a4fa4887d35..1cd9a043bc9 100644
--- a/chromium/base/ios/device_util.h
+++ b/chromium/base/ios/device_util.h
@@ -40,8 +40,21 @@ namespace device_util {
// x86_64 -> Simulator
std::string GetPlatform();
-// Returns true if the application is running on a high-ram device. (>=500M).
-bool IsRunningOnHighRamDevice();
+// Returns true if the application is running on a device with 512MB or more
+// RAM.
+bool RamIsAtLeast512Mb();
+
+// Returns true if the application is running on a device with 1024MB or more
+// RAM.
+bool RamIsAtLeast1024Mb();
+
+// Returns true if the application is running on a device with |ram_in_mb| MB or
+// more RAM.
+// Use with caution! Actual RAM reported by devices is less than the commonly
+// used powers-of-two values. For example, a 512MB device may report only 502MB
+// RAM. The convenience methods above should be used in most cases because they
+// correctly handle this issue.
+bool RamIsAtLeast(uint64_t ram_in_mb);
// Returns true if the device has only one core.
bool IsSingleCoreDevice();
@@ -59,6 +72,12 @@ std::string GetRandomId();
// something that should be anonymous, you should probably pass NULL.
std::string GetDeviceIdentifier(const char* salt);
+// Returns a hashed version of |in_string| using |salt| (which must not be
+// zero-length). Different salt values should result in differently hashed
+// strings.
+std::string GetSaltedString(const std::string& in_string,
+ const std::string& salt);
+
} // namespace device_util
} // namespace ios
diff --git a/chromium/base/ios/device_util.mm b/chromium/base/ios/device_util.mm
index 0d516f9a2b4..ff7be36875c 100644
--- a/chromium/base/ios/device_util.mm
+++ b/chromium/base/ios/device_util.mm
@@ -44,13 +44,9 @@ NSString* GenerateClientId() {
// http://openradar.appspot.com/12377282. If this is the case, revert to
// generating a new one.
if (!client_id || [client_id isEqualToString:kZeroUUID]) {
- if (base::ios::IsRunningOnIOS6OrLater()) {
- client_id = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
- if ([client_id isEqualToString:kZeroUUID])
- client_id = base::SysUTF8ToNSString(ios::device_util::GetRandomId());
- } else {
+ client_id = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
+ if ([client_id isEqualToString:kZeroUUID])
client_id = base::SysUTF8ToNSString(ios::device_util::GetRandomId());
- }
}
return client_id;
}
@@ -68,12 +64,22 @@ std::string GetPlatform() {
return platform;
}
-bool IsRunningOnHighRamDevice() {
+bool RamIsAtLeast512Mb() {
+ // 512MB devices report anywhere from 502-504 MB, use 450 MB just to be safe.
+ return RamIsAtLeast(450);
+}
+
+bool RamIsAtLeast1024Mb() {
+ // 1GB devices report anywhere from 975-999 MB, use 900 MB just to be safe.
+ return RamIsAtLeast(900);
+}
+
+bool RamIsAtLeast(uint64_t ram_in_mb) {
uint64_t memory_size = 0;
size_t size = sizeof(memory_size);
if (sysctlbyname("hw.memsize", &memory_size, &size, NULL, 0) == 0) {
// Anything >= 500M, call high ram.
- return memory_size >= 500 * 1024 * 1024;
+ return memory_size >= ram_in_mb * 1024 * 1024;
}
return false;
}
@@ -147,8 +153,15 @@ std::string GetDeviceIdentifier(const char* salt) {
[defaults synchronize];
}
- NSData* hash_data = [[NSString stringWithFormat:@"%@%s", client_id,
- salt ? salt : kDefaultSalt] dataUsingEncoding:NSUTF8StringEncoding];
+ return GetSaltedString(base::SysNSStringToUTF8(client_id),
+ salt ? salt : kDefaultSalt);
+}
+
+std::string GetSaltedString(const std::string& in_string,
+ const std::string& salt) {
+ DCHECK(salt.length());
+ NSData* hash_data = [base::SysUTF8ToNSString(in_string + salt)
+ dataUsingEncoding:NSUTF8StringEncoding];
unsigned char hash[CC_SHA256_DIGEST_LENGTH];
CC_SHA256([hash_data bytes], [hash_data length], hash);
diff --git a/chromium/base/ios/device_util_unittest.mm b/chromium/base/ios/device_util_unittest.mm
index c2aefe0f737..3494e00a73e 100644
--- a/chromium/base/ios/device_util_unittest.mm
+++ b/chromium/base/ios/device_util_unittest.mm
@@ -30,10 +30,6 @@ TEST_F(DeviceUtilTest, GetPlatform) {
GTEST_ASSERT_GT(ios::device_util::GetPlatform().length(), 0U);
}
-TEST_F(DeviceUtilTest, IsRunningOnHighRamDevice) {
- ios::device_util::IsRunningOnHighRamDevice();
-}
-
TEST_F(DeviceUtilTest, IsSingleCoreDevice) {
ios::device_util::IsSingleCoreDevice();
}
@@ -56,8 +52,7 @@ TEST_F(DeviceUtilTest, GetDeviceIdentifier) {
CleanNSUserDefaultsForDeviceId();
std::string new_default_id = ios::device_util::GetDeviceIdentifier(NULL);
- if (base::ios::IsRunningOnIOS6OrLater() &&
- ![[[[UIDevice currentDevice] identifierForVendor] UUIDString]
+ if (![[[[UIDevice currentDevice] identifierForVendor] UUIDString]
isEqualToString:@"00000000-0000-0000-0000-000000000000"]) {
EXPECT_EQ(default_id, new_default_id);
} else {
@@ -103,6 +98,33 @@ TEST_F(DeviceUtilTest, CheckMigrationFromZero) {
CleanNSUserDefaultsForDeviceId();
}
+TEST_F(DeviceUtilTest, GetSaltedStringEquals) {
+ std::string string1("The quick brown fox jumps over the lazy dog");
+ std::string string2("The quick brown fox jumps over the lazy dog");
+ std::string salt("salt");
+ // Same string and same salt should result in the same salted string.
+ EXPECT_EQ(ios::device_util::GetSaltedString(string1, salt),
+ ios::device_util::GetSaltedString(string2, salt));
+}
+
+TEST_F(DeviceUtilTest, GetSaltedStringNotEquals) {
+ std::string string1("The quick brown fox jumps over the lazy dog");
+ std::string string2("The lazy brown fox jumps over the quick dog");
+ std::string salt("salt");
+ // Different string and same salt should result in different salted strings.
+ EXPECT_NE(ios::device_util::GetSaltedString(string1, salt),
+ ios::device_util::GetSaltedString(string2, salt));
+}
+
+TEST_F(DeviceUtilTest, GetSaltedStringDifferentSalt) {
+ std::string string1("The quick brown fox jumps over the lazy dog");
+ std::string salt1("salt");
+ std::string salt2("pepper");
+ // Same string with different salt should result in different salted strings.
+ EXPECT_NE(ios::device_util::GetSaltedString(string1, salt1),
+ ios::device_util::GetSaltedString(string1, salt2));
+}
+
TEST_F(DeviceUtilTest, CheckDeviceMigration) {
CleanNSUserDefaultsForDeviceId();
diff --git a/chromium/base/ios/ios_util.h b/chromium/base/ios/ios_util.h
index 7e2e621dfdb..f9ddb262592 100644
--- a/chromium/base/ios/ios_util.h
+++ b/chromium/base/ios/ios_util.h
@@ -11,9 +11,6 @@
namespace base {
namespace ios {
-// Returns whether the operating system is iOS 6 or later.
-BASE_EXPORT bool IsRunningOnIOS6OrLater();
-
// Returns whether the operating system is iOS 7 or later.
BASE_EXPORT bool IsRunningOnIOS7OrLater();
diff --git a/chromium/base/ios/ios_util.mm b/chromium/base/ios/ios_util.mm
index a76911017f9..0f106de566d 100644
--- a/chromium/base/ios/ios_util.mm
+++ b/chromium/base/ios/ios_util.mm
@@ -20,10 +20,6 @@ const int32* OSVersionAsArray() {
namespace base {
namespace ios {
-bool IsRunningOnIOS6OrLater() {
- return IsRunningOnOrLater(6, 0, 0);
-}
-
bool IsRunningOnIOS7OrLater() {
return IsRunningOnOrLater(7, 0, 0);
}
diff --git a/chromium/base/json/json_file_value_serializer.cc b/chromium/base/json/json_file_value_serializer.cc
index 70d0c88f3cc..e33080ccd6b 100644
--- a/chromium/base/json/json_file_value_serializer.cc
+++ b/chromium/base/json/json_file_value_serializer.cc
@@ -36,9 +36,8 @@ bool JSONFileValueSerializer::SerializeInternal(const base::Value& root,
return false;
int data_size = static_cast<int>(json_string.size());
- if (file_util::WriteFile(json_file_path_,
- json_string.data(),
- data_size) != data_size)
+ if (base::WriteFile(json_file_path_, json_string.data(), data_size) !=
+ data_size)
return false;
return true;
diff --git a/chromium/base/json/json_string_value_serializer.cc b/chromium/base/json/json_string_value_serializer.cc
index 7611fbeed65..59f030dff2f 100644
--- a/chromium/base/json/json_string_value_serializer.cc
+++ b/chromium/base/json/json_string_value_serializer.cc
@@ -32,8 +32,7 @@ bool JSONStringValueSerializer::SerializeInternal(const Value& root,
if (pretty_print_)
options |= base::JSONWriter::OPTIONS_PRETTY_PRINT;
- base::JSONWriter::WriteWithOptions(&root, options, json_string_);
- return true;
+ return base::JSONWriter::WriteWithOptions(&root, options, json_string_);
}
Value* JSONStringValueSerializer::Deserialize(int* error_code,
diff --git a/chromium/base/json/json_value_serializer_unittest.cc b/chromium/base/json/json_value_serializer_unittest.cc
index 44c0a57cd27..f8d3a20109a 100644
--- a/chromium/base/json/json_value_serializer_unittest.cc
+++ b/chromium/base/json/json_value_serializer_unittest.cc
@@ -118,7 +118,7 @@ TEST(JSONValueSerializerTest, ReadProperJSONFromFile) {
// Write it down in the file.
FilePath temp_file(tempdir.path().AppendASCII("test.json"));
ASSERT_EQ(static_cast<int>(strlen(kProperJSON)),
- file_util::WriteFile(temp_file, kProperJSON, strlen(kProperJSON)));
+ WriteFile(temp_file, kProperJSON, strlen(kProperJSON)));
// Try to deserialize it through the serializer.
JSONFileValueSerializer file_deserializer(temp_file);
@@ -142,9 +142,8 @@ TEST(JSONValueSerializerTest, ReadJSONWithCommasFromFile) {
// Write it down in the file.
FilePath temp_file(tempdir.path().AppendASCII("test.json"));
ASSERT_EQ(static_cast<int>(strlen(kProperJSONWithCommas)),
- file_util::WriteFile(temp_file,
- kProperJSONWithCommas,
- strlen(kProperJSONWithCommas)));
+ WriteFile(temp_file, kProperJSONWithCommas,
+ strlen(kProperJSONWithCommas)));
// Try to deserialize it through the serializer.
JSONFileValueSerializer file_deserializer(temp_file);
diff --git a/chromium/base/json/json_writer.cc b/chromium/base/json/json_writer.cc
index d6006638219..d14c92c06e5 100644
--- a/chromium/base/json/json_writer.cc
+++ b/chromium/base/json/json_writer.cc
@@ -9,211 +9,199 @@
#include "base/json/string_escape.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
-#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
namespace base {
#if defined(OS_WIN)
-static const char kPrettyPrintLineEnding[] = "\r\n";
+const char kPrettyPrintLineEnding[] = "\r\n";
#else
-static const char kPrettyPrintLineEnding[] = "\n";
+const char kPrettyPrintLineEnding[] = "\n";
#endif
// static
-void JSONWriter::Write(const Value* const node, std::string* json) {
- WriteWithOptions(node, 0, json);
+bool JSONWriter::Write(const Value* const node, std::string* json) {
+ return WriteWithOptions(node, 0, json);
}
// static
-void JSONWriter::WriteWithOptions(const Value* const node, int options,
+bool JSONWriter::WriteWithOptions(const Value* const node, int options,
std::string* json) {
json->clear();
// Is there a better way to estimate the size of the output?
json->reserve(1024);
- bool omit_binary_values = !!(options & OPTIONS_OMIT_BINARY_VALUES);
- bool omit_double_type_preservation =
- !!(options & OPTIONS_OMIT_DOUBLE_TYPE_PRESERVATION);
- bool pretty_print = !!(options & OPTIONS_PRETTY_PRINT);
+ JSONWriter writer(options, json);
+ bool result = writer.BuildJSONString(node, 0U);
- JSONWriter writer(omit_binary_values, omit_double_type_preservation,
- pretty_print, json);
- writer.BuildJSONString(node, 0);
-
- if (pretty_print)
+ if (options & OPTIONS_PRETTY_PRINT)
json->append(kPrettyPrintLineEnding);
+
+ return result;
}
-JSONWriter::JSONWriter(bool omit_binary_values,
- bool omit_double_type_preservation, bool pretty_print,
- std::string* json)
- : omit_binary_values_(omit_binary_values),
- omit_double_type_preservation_(omit_double_type_preservation),
- pretty_print_(pretty_print),
+JSONWriter::JSONWriter(int options, std::string* json)
+ : omit_binary_values_((options & OPTIONS_OMIT_BINARY_VALUES) != 0),
+ omit_double_type_preservation_(
+ (options & OPTIONS_OMIT_DOUBLE_TYPE_PRESERVATION) != 0),
+ pretty_print_((options & OPTIONS_PRETTY_PRINT) != 0),
json_string_(json) {
DCHECK(json);
}
-void JSONWriter::BuildJSONString(const Value* const node, int depth) {
+bool JSONWriter::BuildJSONString(const Value* const node, size_t depth) {
switch (node->GetType()) {
- case Value::TYPE_NULL:
+ case Value::TYPE_NULL: {
json_string_->append("null");
- break;
-
- case Value::TYPE_BOOLEAN:
- {
- bool value;
- bool result = node->GetAsBoolean(&value);
- DCHECK(result);
- json_string_->append(value ? "true" : "false");
- break;
- }
-
- case Value::TYPE_INTEGER:
- {
- int value;
- bool result = node->GetAsInteger(&value);
- DCHECK(result);
- base::StringAppendF(json_string_, "%d", value);
- break;
+ return true;
+ }
+
+ case Value::TYPE_BOOLEAN: {
+ bool value;
+ bool result = node->GetAsBoolean(&value);
+ DCHECK(result);
+ json_string_->append(value ? "true" : "false");
+ return result;
+ }
+
+ case Value::TYPE_INTEGER: {
+ int value;
+ bool result = node->GetAsInteger(&value);
+ DCHECK(result);
+ json_string_->append(IntToString(value));
+ return result;
+ }
+
+ case Value::TYPE_DOUBLE: {
+ double value;
+ bool result = node->GetAsDouble(&value);
+ DCHECK(result);
+ if (omit_double_type_preservation_ &&
+ value <= kint64max &&
+ value >= kint64min &&
+ std::floor(value) == value) {
+ json_string_->append(Int64ToString(static_cast<int64>(value)));
+ return result;
}
-
- case Value::TYPE_DOUBLE:
- {
- double value;
- bool result = node->GetAsDouble(&value);
- DCHECK(result);
- if (omit_double_type_preservation_ &&
- value <= kint64max &&
- value >= kint64min &&
- std::floor(value) == value) {
- json_string_->append(Int64ToString(static_cast<int64>(value)));
- break;
- }
- std::string real = DoubleToString(value);
- // Ensure that the number has a .0 if there's no decimal or 'e'. This
- // makes sure that when we read the JSON back, it's interpreted as a
- // real rather than an int.
- if (real.find('.') == std::string::npos &&
- real.find('e') == std::string::npos &&
- real.find('E') == std::string::npos) {
- real.append(".0");
- }
- // The JSON spec requires that non-integer values in the range (-1,1)
- // have a zero before the decimal point - ".52" is not valid, "0.52" is.
- if (real[0] == '.') {
- real.insert(0, "0");
- } else if (real.length() > 1 && real[0] == '-' && real[1] == '.') {
- // "-.1" bad "-0.1" good
- real.insert(1, "0");
- }
- json_string_->append(real);
- break;
+ std::string real = DoubleToString(value);
+ // Ensure that the number has a .0 if there's no decimal or 'e'. This
+ // makes sure that when we read the JSON back, it's interpreted as a
+ // real rather than an int.
+ if (real.find('.') == std::string::npos &&
+ real.find('e') == std::string::npos &&
+ real.find('E') == std::string::npos) {
+ real.append(".0");
}
-
- case Value::TYPE_STRING:
- {
- std::string value;
- bool result = node->GetAsString(&value);
- DCHECK(result);
- EscapeJSONString(value, true, json_string_);
- break;
+ // The JSON spec requires that non-integer values in the range (-1,1)
+ // have a zero before the decimal point - ".52" is not valid, "0.52" is.
+ if (real[0] == '.') {
+ real.insert(static_cast<size_t>(0), static_cast<size_t>(1), '0');
+ } else if (real.length() > 1 && real[0] == '-' && real[1] == '.') {
+ // "-.1" bad "-0.1" good
+ real.insert(static_cast<size_t>(1), static_cast<size_t>(1), '0');
}
+ json_string_->append(real);
+ return result;
+ }
+
+ case Value::TYPE_STRING: {
+ std::string value;
+ bool result = node->GetAsString(&value);
+ DCHECK(result);
+ EscapeJSONString(value, true, json_string_);
+ return result;
+ }
+
+ case Value::TYPE_LIST: {
+ json_string_->push_back('[');
+ if (pretty_print_)
+ json_string_->push_back(' ');
+
+ const ListValue* list = NULL;
+ bool first_value_has_been_output = false;
+ bool result = node->GetAsList(&list);
+ DCHECK(result);
+ for (ListValue::const_iterator it = list->begin(); it != list->end();
+ ++it) {
+ const Value* value = *it;
+ if (omit_binary_values_ && value->GetType() == Value::TYPE_BINARY)
+ continue;
+
+ if (first_value_has_been_output) {
+ json_string_->push_back(',');
+ if (pretty_print_)
+ json_string_->push_back(' ');
+ }
- case Value::TYPE_LIST:
- {
- json_string_->append("[");
- if (pretty_print_)
- json_string_->append(" ");
-
- const ListValue* list = static_cast<const ListValue*>(node);
- for (size_t i = 0; i < list->GetSize(); ++i) {
- const Value* value = NULL;
- bool result = list->Get(i, &value);
- DCHECK(result);
+ if (!BuildJSONString(value, depth))
+ result = false;
- if (omit_binary_values_ && value->GetType() == Value::TYPE_BINARY) {
- continue;
- }
+ first_value_has_been_output = true;
+ }
- if (i != 0) {
- json_string_->append(",");
- if (pretty_print_)
- json_string_->append(" ");
- }
+ if (pretty_print_)
+ json_string_->push_back(' ');
+ json_string_->push_back(']');
+ return result;
+ }
+
+ case Value::TYPE_DICTIONARY: {
+ json_string_->push_back('{');
+ if (pretty_print_)
+ json_string_->append(kPrettyPrintLineEnding);
+
+ const DictionaryValue* dict = NULL;
+ bool first_value_has_been_output = false;
+ bool result = node->GetAsDictionary(&dict);
+ DCHECK(result);
+ for (DictionaryValue::Iterator itr(*dict); !itr.IsAtEnd();
+ itr.Advance()) {
+ if (omit_binary_values_ &&
+ itr.value().GetType() == Value::TYPE_BINARY) {
+ continue;
+ }
- BuildJSONString(value, depth);
+ if (first_value_has_been_output) {
+ json_string_->push_back(',');
+ if (pretty_print_)
+ json_string_->append(kPrettyPrintLineEnding);
}
if (pretty_print_)
- json_string_->append(" ");
- json_string_->append("]");
- break;
- }
+ IndentLine(depth + 1U);
- case Value::TYPE_DICTIONARY:
- {
- json_string_->append("{");
+ EscapeJSONString(itr.key(), true, json_string_);
+ json_string_->push_back(':');
if (pretty_print_)
- json_string_->append(kPrettyPrintLineEnding);
-
- const DictionaryValue* dict =
- static_cast<const DictionaryValue*>(node);
- bool first_entry = true;
- for (DictionaryValue::Iterator itr(*dict); !itr.IsAtEnd();
- itr.Advance(), first_entry = false) {
- if (omit_binary_values_ &&
- itr.value().GetType() == Value::TYPE_BINARY) {
- continue;
- }
-
- if (!first_entry) {
- json_string_->append(",");
- if (pretty_print_)
- json_string_->append(kPrettyPrintLineEnding);
- }
+ json_string_->push_back(' ');
- if (pretty_print_)
- IndentLine(depth + 1);
-
- EscapeJSONString(itr.key(), true, json_string_);
- if (pretty_print_) {
- json_string_->append(": ");
- } else {
- json_string_->append(":");
- }
- BuildJSONString(&itr.value(), depth + 1);
- }
+ if (!BuildJSONString(&itr.value(), depth + 1U))
+ result = false;
- if (pretty_print_) {
- json_string_->append(kPrettyPrintLineEnding);
- IndentLine(depth);
- json_string_->append("}");
- } else {
- json_string_->append("}");
- }
- break;
+ first_value_has_been_output = true;
}
- case Value::TYPE_BINARY:
- {
- if (!omit_binary_values_) {
- NOTREACHED() << "Cannot serialize binary value.";
- }
- break;
+ if (pretty_print_) {
+ json_string_->append(kPrettyPrintLineEnding);
+ IndentLine(depth);
}
- default:
- NOTREACHED() << "unknown json type";
+ json_string_->push_back('}');
+ return result;
+ }
+
+ case Value::TYPE_BINARY:
+ // Successful only if we're allowed to omit it.
+ DLOG_IF(ERROR, !omit_binary_values_) << "Cannot serialize binary value.";
+ return omit_binary_values_;
}
+ NOTREACHED();
+ return false;
}
-void JSONWriter::IndentLine(int depth) {
- // It may be faster to keep an indent string so we don't have to keep
- // reallocating.
- json_string_->append(std::string(depth * 3, ' '));
+void JSONWriter::IndentLine(size_t depth) {
+ json_string_->append(depth * 3U, ' ');
}
} // namespace base
diff --git a/chromium/base/json/json_writer.h b/chromium/base/json/json_writer.h
index e4a143c7780..9709c7e723f 100644
--- a/chromium/base/json/json_writer.h
+++ b/chromium/base/json/json_writer.h
@@ -17,8 +17,10 @@ class Value;
class BASE_EXPORT JSONWriter {
public:
enum Options {
- // For values of binary type, the value (and key if within a dictionary)
- // will be omitted from the output.
+ // This option instructs the writer that if a Binary value is encountered,
+ // the value (and key if within a dictionary) will be omitted from the
+ // output, and success will be returned. Otherwise, if a binary value is
+ // encountered, failure will be returned.
OPTIONS_OMIT_BINARY_VALUES = 1 << 0,
// This option instructs the writer to write doubles that have no fractional
@@ -35,25 +37,23 @@ class BASE_EXPORT JSONWriter {
// Given a root node, generates a JSON string and puts it into |json|.
// TODO(tc): Should we generate json if it would be invalid json (e.g.,
// |node| is not a DictionaryValue/ListValue or if there are inf/-inf float
- // values)?
- static void Write(const Value* const node, std::string* json);
+ // values)? Return true on success and false on failure.
+ static bool Write(const Value* const node, std::string* json);
// Same as above but with |options| which is a bunch of JSONWriter::Options
- // bitwise ORed together.
- static void WriteWithOptions(const Value* const node, int options,
+ // bitwise ORed together. Return true on success and false on failure.
+ static bool WriteWithOptions(const Value* const node, int options,
std::string* json);
private:
- JSONWriter(bool omit_binary_values,
- bool omit_double_type_preservation, bool pretty_print,
- std::string* json);
+ JSONWriter(int options, std::string* json);
- // Called recursively to build the JSON string. Whe completed, value is
- // json_string_ will contain the JSON.
- void BuildJSONString(const Value* const node, int depth);
+ // Called recursively to build the JSON string. When completed,
+ // |json_string_| will contain the JSON.
+ bool BuildJSONString(const Value* const node, size_t depth);
// Adds space to json_string_ for the indent level.
- void IndentLine(int depth);
+ void IndentLine(size_t depth);
bool omit_binary_values_;
bool omit_double_type_preservation_;
diff --git a/chromium/base/json/json_writer_unittest.cc b/chromium/base/json/json_writer_unittest.cc
index 7ddd7b462d6..ae46800dde6 100644
--- a/chromium/base/json/json_writer_unittest.cc
+++ b/chromium/base/json/json_writer_unittest.cc
@@ -8,44 +8,68 @@
namespace base {
-TEST(JSONWriterTest, Writing) {
- // Test null
- Value* root = Value::CreateNullValue();
+TEST(JSONWriterTest, BasicTypes) {
std::string output_js;
- JSONWriter::Write(root, &output_js);
- ASSERT_EQ("null", output_js);
+
+ // Test null.
+ Value* root = Value::CreateNullValue();
+ EXPECT_TRUE(JSONWriter::Write(root, &output_js));
+ EXPECT_EQ("null", output_js);
delete root;
- // Test empty dict
+ // Test empty dict.
root = new DictionaryValue;
- JSONWriter::Write(root, &output_js);
- ASSERT_EQ("{}", output_js);
+ EXPECT_TRUE(JSONWriter::Write(root, &output_js));
+ EXPECT_EQ("{}", output_js);
delete root;
- // Test empty list
+ // Test empty list.
root = new ListValue;
- JSONWriter::Write(root, &output_js);
- ASSERT_EQ("[]", output_js);
+ EXPECT_TRUE(JSONWriter::Write(root, &output_js));
+ EXPECT_EQ("[]", output_js);
+ delete root;
+
+ // Test integer values.
+ root = new FundamentalValue(42);
+ EXPECT_TRUE(JSONWriter::Write(root, &output_js));
+ EXPECT_EQ("42", output_js);
+ delete root;
+
+ // Test boolean values.
+ root = new FundamentalValue(true);
+ EXPECT_TRUE(JSONWriter::Write(root, &output_js));
+ EXPECT_EQ("true", output_js);
delete root;
// Test Real values should always have a decimal or an 'e'.
root = new FundamentalValue(1.0);
- JSONWriter::Write(root, &output_js);
- ASSERT_EQ("1.0", output_js);
+ EXPECT_TRUE(JSONWriter::Write(root, &output_js));
+ EXPECT_EQ("1.0", output_js);
delete root;
// Test Real values in the the range (-1, 1) must have leading zeros
root = new FundamentalValue(0.2);
- JSONWriter::Write(root, &output_js);
- ASSERT_EQ("0.2", output_js);
+ EXPECT_TRUE(JSONWriter::Write(root, &output_js));
+ EXPECT_EQ("0.2", output_js);
delete root;
// Test Real values in the the range (-1, 1) must have leading zeros
root = new FundamentalValue(-0.8);
- JSONWriter::Write(root, &output_js);
- ASSERT_EQ("-0.8", output_js);
+ EXPECT_TRUE(JSONWriter::Write(root, &output_js));
+ EXPECT_EQ("-0.8", output_js);
delete root;
+ // Test String values.
+ root = new StringValue("foo");
+ EXPECT_TRUE(JSONWriter::Write(root, &output_js));
+ EXPECT_EQ("\"foo\"", output_js);
+ delete root;
+}
+
+
+TEST(JSONWriterTest, NestedTypes) {
+ std::string output_js;
+
// Writer unittests like empty list/dict nesting,
// list list nesting, etc.
DictionaryValue root_dict;
@@ -59,10 +83,12 @@ TEST(JSONWriterTest, Writing) {
list->Append(new FundamentalValue(true));
// Test the pretty-printer.
- JSONWriter::Write(&root_dict, &output_js);
- ASSERT_EQ("{\"list\":[{\"inner int\":10},[],true]}", output_js);
- JSONWriter::WriteWithOptions(&root_dict, JSONWriter::OPTIONS_PRETTY_PRINT,
- &output_js);
+ EXPECT_TRUE(JSONWriter::Write(&root_dict, &output_js));
+ EXPECT_EQ("{\"list\":[{\"inner int\":10},[],true]}", output_js);
+ EXPECT_TRUE(JSONWriter::WriteWithOptions(&root_dict,
+ JSONWriter::OPTIONS_PRETTY_PRINT,
+ &output_js));
+
// The pretty-printer uses a different newline style on Windows than on
// other platforms.
#if defined(OS_WIN)
@@ -70,62 +96,79 @@ TEST(JSONWriterTest, Writing) {
#else
#define JSON_NEWLINE "\n"
#endif
- ASSERT_EQ("{" JSON_NEWLINE
+ EXPECT_EQ("{" JSON_NEWLINE
" \"list\": [ {" JSON_NEWLINE
" \"inner int\": 10" JSON_NEWLINE
" }, [ ], true ]" JSON_NEWLINE
"}" JSON_NEWLINE,
output_js);
#undef JSON_NEWLINE
+}
+
+TEST(JSONWriterTest, KeysWithPeriods) {
+ std::string output_js;
- // Test keys with periods
DictionaryValue period_dict;
period_dict.SetWithoutPathExpansion("a.b", new FundamentalValue(3));
period_dict.SetWithoutPathExpansion("c", new FundamentalValue(2));
DictionaryValue* period_dict2 = new DictionaryValue;
period_dict2->SetWithoutPathExpansion("g.h.i.j", new FundamentalValue(1));
period_dict.SetWithoutPathExpansion("d.e.f", period_dict2);
- JSONWriter::Write(&period_dict, &output_js);
- ASSERT_EQ("{\"a.b\":3,\"c\":2,\"d.e.f\":{\"g.h.i.j\":1}}", output_js);
+ EXPECT_TRUE(JSONWriter::Write(&period_dict, &output_js));
+ EXPECT_EQ("{\"a.b\":3,\"c\":2,\"d.e.f\":{\"g.h.i.j\":1}}", output_js);
DictionaryValue period_dict3;
period_dict3.Set("a.b", new FundamentalValue(2));
period_dict3.SetWithoutPathExpansion("a.b", new FundamentalValue(1));
- JSONWriter::Write(&period_dict3, &output_js);
- ASSERT_EQ("{\"a\":{\"b\":2},\"a.b\":1}", output_js);
-
- // Test omitting binary values.
- root = BinaryValue::CreateWithCopiedBuffer("asdf", 4);
- JSONWriter::WriteWithOptions(root, JSONWriter::OPTIONS_OMIT_BINARY_VALUES,
- &output_js);
- ASSERT_TRUE(output_js.empty());
+ EXPECT_TRUE(JSONWriter::Write(&period_dict3, &output_js));
+ EXPECT_EQ("{\"a\":{\"b\":2},\"a.b\":1}", output_js);
+}
+
+TEST(JSONWriterTest, BinaryValues) {
+ std::string output_js;
+
+ // Binary values should return errors unless suppressed via the
+ // OPTIONS_OMIT_BINARY_VALUES flag.
+ Value* root = BinaryValue::CreateWithCopiedBuffer("asdf", 4);
+ EXPECT_FALSE(JSONWriter::Write(root, &output_js));
+ EXPECT_TRUE(JSONWriter::WriteWithOptions(
+ root, JSONWriter::OPTIONS_OMIT_BINARY_VALUES, &output_js));
+ EXPECT_TRUE(output_js.empty());
delete root;
ListValue binary_list;
+ binary_list.Append(BinaryValue::CreateWithCopiedBuffer("asdf", 4));
binary_list.Append(new FundamentalValue(5));
binary_list.Append(BinaryValue::CreateWithCopiedBuffer("asdf", 4));
binary_list.Append(new FundamentalValue(2));
- JSONWriter::WriteWithOptions(&binary_list,
- JSONWriter::OPTIONS_OMIT_BINARY_VALUES,
- &output_js);
- ASSERT_EQ("[5,2]", output_js);
+ binary_list.Append(BinaryValue::CreateWithCopiedBuffer("asdf", 4));
+ EXPECT_FALSE(JSONWriter::Write(&binary_list, &output_js));
+ EXPECT_TRUE(JSONWriter::WriteWithOptions(
+ &binary_list, JSONWriter::OPTIONS_OMIT_BINARY_VALUES, &output_js));
+ EXPECT_EQ("[5,2]", output_js);
DictionaryValue binary_dict;
- binary_dict.Set("a", new FundamentalValue(5));
- binary_dict.Set("b", BinaryValue::CreateWithCopiedBuffer("asdf", 4));
- binary_dict.Set("c", new FundamentalValue(2));
- JSONWriter::WriteWithOptions(&binary_dict,
- JSONWriter::OPTIONS_OMIT_BINARY_VALUES,
- &output_js);
- ASSERT_EQ("{\"a\":5,\"c\":2}", output_js);
+ binary_dict.Set("a", BinaryValue::CreateWithCopiedBuffer("asdf", 4));
+ binary_dict.Set("b", new FundamentalValue(5));
+ binary_dict.Set("c", BinaryValue::CreateWithCopiedBuffer("asdf", 4));
+ binary_dict.Set("d", new FundamentalValue(2));
+ binary_dict.Set("e", BinaryValue::CreateWithCopiedBuffer("asdf", 4));
+ EXPECT_FALSE(JSONWriter::Write(&binary_dict, &output_js));
+ EXPECT_TRUE(JSONWriter::WriteWithOptions(
+ &binary_dict, JSONWriter::OPTIONS_OMIT_BINARY_VALUES, &output_js));
+ EXPECT_EQ("{\"b\":5,\"d\":2}", output_js);
+}
+
+TEST(JSONWriterTest, DoublesAsInts) {
+ std::string output_js;
// Test allowing a double with no fractional part to be written as an integer.
FundamentalValue double_value(1e10);
- JSONWriter::WriteWithOptions(
+ EXPECT_TRUE(JSONWriter::WriteWithOptions(
&double_value,
JSONWriter::OPTIONS_OMIT_DOUBLE_TYPE_PRESERVATION,
- &output_js);
- ASSERT_EQ("10000000000", output_js);
+ &output_js));
+ EXPECT_EQ("10000000000", output_js);
}
} // namespace base
diff --git a/chromium/base/lazy_instance.h b/chromium/base/lazy_instance.h
index 3935780a55b..05a7c5d81ec 100644
--- a/chromium/base/lazy_instance.h
+++ b/chromium/base/lazy_instance.h
@@ -57,7 +57,9 @@ namespace base {
template <typename Type>
struct DefaultLazyInstanceTraits {
static const bool kRegisterOnExit = true;
+#ifndef NDEBUG
static const bool kAllowedToAccessOnNonjoinableThread = false;
+#endif
static Type* New(void* instance) {
DCHECK_EQ(reinterpret_cast<uintptr_t>(instance) & (ALIGNOF(Type) - 1), 0u)
@@ -89,7 +91,9 @@ namespace internal {
template <typename Type>
struct LeakyLazyInstanceTraits {
static const bool kRegisterOnExit = false;
+#ifndef NDEBUG
static const bool kAllowedToAccessOnNonjoinableThread = true;
+#endif
static Type* New(void* instance) {
ANNOTATE_SCOPED_MEMORY_LEAK;
diff --git a/chromium/base/linux_util.cc b/chromium/base/linux_util.cc
index f8dd2d0088b..36710f28137 100644
--- a/chromium/base/linux_util.cc
+++ b/chromium/base/linux_util.cc
@@ -71,61 +71,10 @@ class LinuxDistroHelper {
};
#endif // if defined(OS_LINUX)
-// expected prefix of the target of the /proc/self/fd/%d link for a socket
-const char kSocketLinkPrefix[] = "socket:[";
-
-// Parse a symlink in /proc/pid/fd/$x and return the inode number of the
-// socket.
-// inode_out: (output) set to the inode number on success
-// path: e.g. /proc/1234/fd/5 (must be a UNIX domain socket descriptor)
-// log: if true, log messages about failure details
-bool ProcPathGetInode(ino_t* inode_out, const char* path, bool log = false) {
- DCHECK(inode_out);
- DCHECK(path);
-
- char buf[256];
- const ssize_t n = readlink(path, buf, sizeof(buf) - 1);
- if (n == -1) {
- if (log) {
- DLOG(WARNING) << "Failed to read the inode number for a socket from /proc"
- "(" << errno << ")";
- }
- return false;
- }
- buf[n] = 0;
-
- if (memcmp(kSocketLinkPrefix, buf, sizeof(kSocketLinkPrefix) - 1)) {
- if (log) {
- DLOG(WARNING) << "The descriptor passed from the crashing process wasn't "
- " a UNIX domain socket.";
- }
- return false;
- }
-
- char* endptr;
- const unsigned long long int inode_ul =
- strtoull(buf + sizeof(kSocketLinkPrefix) - 1, &endptr, 10);
- if (*endptr != ']')
- return false;
-
- if (inode_ul == ULLONG_MAX) {
- if (log) {
- DLOG(WARNING) << "Failed to parse a socket's inode number: the number "
- "was too large. Please report this bug: " << buf;
- }
- return false;
- }
-
- *inode_out = inode_ul;
- return true;
-}
-
} // namespace
namespace base {
-const char kFindInodeSwitch[] = "--find-inode";
-
// Account for the terminating null character.
static const int kDistroSize = 128 + 1;
@@ -176,82 +125,10 @@ std::string GetLinuxDistro() {
void SetLinuxDistro(const std::string& distro) {
std::string trimmed_distro;
- TrimWhitespaceASCII(distro, TRIM_ALL, &trimmed_distro);
+ base::TrimWhitespaceASCII(distro, base::TRIM_ALL, &trimmed_distro);
base::strlcpy(g_linux_distro, trimmed_distro.c_str(), kDistroSize);
}
-bool FileDescriptorGetInode(ino_t* inode_out, int fd) {
- DCHECK(inode_out);
-
- struct stat buf;
- if (fstat(fd, &buf) < 0)
- return false;
-
- if (!S_ISSOCK(buf.st_mode))
- return false;
-
- *inode_out = buf.st_ino;
- return true;
-}
-
-bool FindProcessHoldingSocket(pid_t* pid_out, ino_t socket_inode) {
- DCHECK(pid_out);
- bool already_found = false;
-
- DIR* proc = opendir("/proc");
- if (!proc) {
- DLOG(WARNING) << "Cannot open /proc";
- return false;
- }
-
- std::vector<pid_t> pids;
-
- struct dirent* dent;
- while ((dent = readdir(proc))) {
- char* endptr;
- const unsigned long int pid_ul = strtoul(dent->d_name, &endptr, 10);
- if (pid_ul == ULONG_MAX || *endptr)
- continue;
- pids.push_back(pid_ul);
- }
- closedir(proc);
-
- for (std::vector<pid_t>::const_iterator
- i = pids.begin(); i != pids.end(); ++i) {
- const pid_t current_pid = *i;
- char buf[256];
- snprintf(buf, sizeof(buf), "/proc/%d/fd", current_pid);
- DIR* fd = opendir(buf);
- if (!fd)
- continue;
-
- while ((dent = readdir(fd))) {
- if (snprintf(buf, sizeof(buf), "/proc/%d/fd/%s", current_pid,
- dent->d_name) >= static_cast<int>(sizeof(buf))) {
- continue;
- }
-
- ino_t fd_inode = static_cast<ino_t>(-1);
- if (ProcPathGetInode(&fd_inode, buf)) {
- if (fd_inode == socket_inode) {
- if (already_found) {
- closedir(fd);
- return false;
- }
-
- already_found = true;
- *pid_out = current_pid;
- break;
- }
- }
- }
-
- closedir(fd);
- }
-
- return already_found;
-}
-
pid_t FindThreadIDWithSyscall(pid_t pid, const std::string& expected_data,
bool* syscall_supported) {
char buf[256];
diff --git a/chromium/base/linux_util.h b/chromium/base/linux_util.h
index b9ba56dfc97..83523df831d 100644
--- a/chromium/base/linux_util.h
+++ b/chromium/base/linux_util.h
@@ -14,8 +14,6 @@
namespace base {
-BASE_EXPORT extern const char kFindInodeSwitch[];
-
// This is declared here so the crash reporter can access the memory directly
// in compromised context without going through the standard library.
BASE_EXPORT extern char g_linux_distro[];
@@ -26,13 +24,6 @@ BASE_EXPORT std::string GetLinuxDistro();
// Set the Linux Distro string.
BASE_EXPORT void SetLinuxDistro(const std::string& distro);
-// Return the inode number for the UNIX domain socket |fd|.
-BASE_EXPORT bool FileDescriptorGetInode(ino_t* inode_out, int fd);
-
-// Find the process which holds the given socket, named by inode number. If
-// multiple processes hold the socket, this function returns false.
-BASE_EXPORT bool FindProcessHoldingSocket(pid_t* pid_out, ino_t socket_inode);
-
// For a given process |pid|, look through all its threads and find the first
// thread with /proc/[pid]/task/[thread_id]/syscall whose first N bytes matches
// |expected_data|, where N is the length of |expected_data|.
diff --git a/chromium/base/location.cc b/chromium/base/location.cc
index b5da027ee82..08263cebaad 100644
--- a/chromium/base/location.cc
+++ b/chromium/base/location.cc
@@ -92,11 +92,11 @@ __declspec(noinline)
BASE_EXPORT const void* GetProgramCounter() {
#if defined(COMPILER_MSVC)
return _ReturnAddress();
-#elif defined(COMPILER_GCC)
+#elif defined(COMPILER_GCC) && !defined(OS_NACL)
return __builtin_extract_return_addr(__builtin_return_address(0));
-#endif // COMPILER_GCC
-
+#else
return NULL;
+#endif
}
} // namespace tracked_objects
diff --git a/chromium/base/logging.cc b/chromium/base/logging.cc
index e836092e766..b2938f31144 100644
--- a/chromium/base/logging.cc
+++ b/chromium/base/logging.cc
@@ -43,6 +43,7 @@ typedef pthread_mutex_t* MutexHandle;
#include <ctime>
#include <iomanip>
#include <ostream>
+#include <string>
#include "base/base_switches.h"
#include "base/command_line.h"
@@ -51,6 +52,8 @@ typedef pthread_mutex_t* MutexHandle;
#include "base/debug/stack_trace.h"
#include "base/posix/eintr_wrapper.h"
#include "base/strings/string_piece.h"
+#include "base/strings/string_util.h"
+#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/synchronization/lock_impl.h"
#include "base/threading/platform_thread.h"
@@ -65,23 +68,20 @@ typedef pthread_mutex_t* MutexHandle;
namespace logging {
-DcheckState g_dcheck_state = DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS;
-
-DcheckState get_dcheck_state() {
- return g_dcheck_state;
-}
-
-void set_dcheck_state(DcheckState state) {
- g_dcheck_state = state;
-}
-
namespace {
VlogInfo* g_vlog_info = NULL;
VlogInfo* g_vlog_info_prev = NULL;
const char* const log_severity_names[LOG_NUM_SEVERITIES] = {
- "INFO", "WARNING", "ERROR", "ERROR_REPORT", "FATAL" };
+ "INFO", "WARNING", "ERROR", "FATAL" };
+
+const char* log_severity_name(int severity)
+{
+ if (severity >= 0 && severity < LOG_NUM_SEVERITIES)
+ return log_severity_names[severity];
+ return "UNKNOWN";
+}
int min_log_level = 0;
@@ -115,9 +115,6 @@ bool show_error_dialogs = false;
// An assert handler override specified by the client to be called instead of
// the debug message dialog and process termination.
LogAssertHandlerFunction log_assert_handler = NULL;
-// An report handler override specified by the client to be called instead of
-// the debug message dialog.
-LogReportHandlerFunction log_report_handler = NULL;
// A log message handler that gets notified of every log message we process.
LogMessageHandlerFunction log_message_handler = NULL;
@@ -355,15 +352,13 @@ LoggingSettings::LoggingSettings()
: logging_dest(LOG_DEFAULT),
log_file(NULL),
lock_log(LOCK_LOG_FILE),
- delete_old(APPEND_TO_OLD_LOG_FILE),
- dcheck_state(DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS) {}
+ delete_old(APPEND_TO_OLD_LOG_FILE) {}
bool BaseInitLoggingImpl(const LoggingSettings& settings) {
#if defined(OS_NACL)
// Can log only to the system debug log.
CHECK_EQ(settings.logging_dest & ~LOG_TO_SYSTEM_DEBUG_LOG, 0);
#endif
- g_dcheck_state = settings.dcheck_state;
CommandLine* command_line = CommandLine::ForCurrentProcess();
// Don't bother initializing g_vlog_info unless we use one of the
// vlog switches.
@@ -404,7 +399,7 @@ bool BaseInitLoggingImpl(const LoggingSettings& settings) {
}
void SetMinLogLevel(int level) {
- min_log_level = std::min(LOG_ERROR_REPORT, level);
+ min_log_level = std::min(LOG_FATAL, level);
}
int GetMinLogLevel() {
@@ -441,10 +436,6 @@ void SetLogAssertHandler(LogAssertHandlerFunction handler) {
log_assert_handler = handler;
}
-void SetLogReportHandler(LogReportHandlerFunction handler) {
- log_report_handler = handler;
-}
-
void SetLogMessageHandler(LogMessageHandlerFunction handler) {
log_message_handler = handler;
}
@@ -468,6 +459,7 @@ template std::string* MakeCheckOpString<std::string, std::string>(
const std::string&, const std::string&, const char* name);
#endif
+#if !defined(NDEBUG)
// Displays a message box to the user with the error message in it.
// Used for fatal messages, where we close the app simultaneously.
// This is for developers only; we don't use this in circumstances
@@ -494,7 +486,7 @@ void DisplayDebugMessageInDialog(const std::string& str) {
backslash[1] = 0;
wcscat_s(prog_name, MAX_PATH, L"debug_message.exe");
- std::wstring cmdline = UTF8ToWide(str);
+ std::wstring cmdline = base::UTF8ToWide(str);
if (cmdline.empty())
return;
@@ -518,6 +510,7 @@ void DisplayDebugMessageInDialog(const std::string& str) {
// You can just look at stderr.
#endif
}
+#endif // !defined(NDEBUG)
#if defined(OS_WIN)
LogMessage::SaveLastError::SaveLastError() : last_error_(::GetLastError()) {
@@ -528,17 +521,6 @@ LogMessage::SaveLastError::~SaveLastError() {
}
#endif // defined(OS_WIN)
-LogMessage::LogMessage(const char* file, int line, LogSeverity severity,
- int ctr)
- : severity_(severity), file_(file), line_(line) {
- Init(file, line);
-}
-
-LogMessage::LogMessage(const char* file, int line)
- : severity_(LOG_INFO), file_(file), line_(line) {
- Init(file, line);
-}
-
LogMessage::LogMessage(const char* file, int line, LogSeverity severity)
: severity_(severity), file_(file), line_(line) {
Init(file, line);
@@ -560,7 +542,7 @@ LogMessage::LogMessage(const char* file, int line, LogSeverity severity,
}
LogMessage::~LogMessage() {
-#if !defined(NDEBUG) && !defined(OS_NACL)
+#if !defined(NDEBUG) && !defined(OS_NACL) && !defined(__UCLIBC__)
if (severity_ == LOG_FATAL) {
// Include a stack trace on a fatal.
base::debug::StackTrace trace;
@@ -593,7 +575,6 @@ LogMessage::~LogMessage() {
priority = ANDROID_LOG_WARN;
break;
case LOG_ERROR:
- case LOG_ERROR_REPORT:
priority = ANDROID_LOG_ERROR;
break;
case LOG_FATAL:
@@ -602,13 +583,13 @@ LogMessage::~LogMessage() {
}
__android_log_write(priority, "chromium", str_newline.c_str());
#endif
- fprintf(stderr, "%s", str_newline.c_str());
+ ignore_result(fwrite(str_newline.data(), str_newline.size(), 1, stderr));
fflush(stderr);
} else if (severity_ >= kAlwaysPrintErrorLevel) {
// When we're only outputting to a log file, above a certain log level, we
// should still output to stderr so that we can better detect and diagnose
// problems with unit tests, especially on the buildbots.
- fprintf(stderr, "%s", str_newline.c_str());
+ ignore_result(fwrite(str_newline.data(), str_newline.size(), 1, stderr));
fflush(stderr);
}
@@ -633,7 +614,8 @@ LogMessage::~LogMessage() {
&num_written,
NULL);
#else
- fprintf(log_file, "%s", str_newline.c_str());
+ ignore_result(fwrite(
+ str_newline.data(), str_newline.size(), 1, log_file));
fflush(log_file);
#endif
}
@@ -646,32 +628,20 @@ LogMessage::~LogMessage() {
str_newline.copy(str_stack, arraysize(str_stack));
base::debug::Alias(str_stack);
- // display a message or break into the debugger on a fatal error
- if (base::debug::BeingDebugged()) {
- base::debug::BreakDebugger();
+ if (log_assert_handler) {
+ // Make a copy of the string for the handler out of paranoia.
+ log_assert_handler(std::string(stream_.str()));
} else {
- if (log_assert_handler) {
- // make a copy of the string for the handler out of paranoia
- log_assert_handler(std::string(stream_.str()));
- } else {
- // Don't use the string with the newline, get a fresh version to send to
- // the debug message process. We also don't display assertions to the
- // user in release mode. The enduser can't do anything with this
- // information, and displaying message boxes when the application is
- // hosed can cause additional problems.
+ // Don't use the string with the newline, get a fresh version to send to
+ // the debug message process. We also don't display assertions to the
+ // user in release mode. The enduser can't do anything with this
+ // information, and displaying message boxes when the application is
+ // hosed can cause additional problems.
#ifndef NDEBUG
- DisplayDebugMessageInDialog(stream_.str());
-#endif
- // Crash the process to generate a dump.
- base::debug::BreakDebugger();
- }
- }
- } else if (severity_ == LOG_ERROR_REPORT) {
- // We are here only if the user runs with --enable-dcheck in release mode.
- if (log_report_handler) {
- log_report_handler(std::string(stream_.str()));
- } else {
DisplayDebugMessageInDialog(stream_.str());
+#endif
+ // Crash the process to generate a dump.
+ base::debug::BreakDebugger();
}
}
}
@@ -711,7 +681,7 @@ void LogMessage::Init(const char* file, int line) {
if (log_tickcount)
stream_ << TickCount() << ':';
if (severity_ >= 0)
- stream_ << log_severity_names[severity_];
+ stream_ << log_severity_name(severity_);
else
stream_ << "VERBOSE" << -severity_;
@@ -738,61 +708,40 @@ SystemErrorCode GetLastSystemErrorCode() {
}
#if defined(OS_WIN)
-Win32ErrorLogMessage::Win32ErrorLogMessage(const char* file,
- int line,
- LogSeverity severity,
- SystemErrorCode err,
- const char* module)
- : err_(err),
- module_(module),
- log_message_(file, line, severity) {
+BASE_EXPORT std::string SystemErrorCodeToString(SystemErrorCode error_code) {
+ const int error_message_buffer_size = 256;
+ char msgbuf[error_message_buffer_size];
+ DWORD flags = FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS;
+ DWORD len = FormatMessageA(flags, NULL, error_code, 0, msgbuf,
+ arraysize(msgbuf), NULL);
+ if (len) {
+ // Messages returned by system end with line breaks.
+ return base::CollapseWhitespaceASCII(msgbuf, true) +
+ base::StringPrintf(" (0x%X)", error_code);
+ }
+ return base::StringPrintf("Error (0x%X) while retrieving error. (0x%X)",
+ GetLastError(), error_code);
+}
+#elif defined(OS_POSIX)
+BASE_EXPORT std::string SystemErrorCodeToString(SystemErrorCode error_code) {
+ return safe_strerror(error_code);
}
+#else
+#error Not implemented
+#endif
+
+#if defined(OS_WIN)
Win32ErrorLogMessage::Win32ErrorLogMessage(const char* file,
int line,
LogSeverity severity,
SystemErrorCode err)
: err_(err),
- module_(NULL),
log_message_(file, line, severity) {
}
Win32ErrorLogMessage::~Win32ErrorLogMessage() {
- const int error_message_buffer_size = 256;
- char msgbuf[error_message_buffer_size];
- DWORD flags = FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS;
- HMODULE hmod;
- if (module_) {
- hmod = GetModuleHandleA(module_);
- if (hmod) {
- flags |= FORMAT_MESSAGE_FROM_HMODULE;
- } else {
- // This makes a nested Win32ErrorLogMessage. It will have module_ of NULL
- // so it will not call GetModuleHandle, so recursive errors are
- // impossible.
- DPLOG(WARNING) << "Couldn't open module " << module_
- << " for error message query";
- }
- } else {
- hmod = NULL;
- }
- DWORD len = FormatMessageA(flags,
- hmod,
- err_,
- 0,
- msgbuf,
- sizeof(msgbuf) / sizeof(msgbuf[0]),
- NULL);
- if (len) {
- while ((len > 0) &&
- isspace(static_cast<unsigned char>(msgbuf[len - 1]))) {
- msgbuf[--len] = 0;
- }
- stream() << ": " << msgbuf;
- } else {
- stream() << ": Error " << GetLastError() << " while retrieving error "
- << err_;
- }
+ stream() << ": " << SystemErrorCodeToString(err_);
// We're about to crash (CHECK). Put |err_| on the stack (by placing it in a
// field) and use Alias in hopes that it makes it into crash dumps.
DWORD last_error = err_;
@@ -808,7 +757,7 @@ ErrnoLogMessage::ErrnoLogMessage(const char* file,
}
ErrnoLogMessage::~ErrnoLogMessage() {
- stream() << ": " << safe_strerror(err_);
+ stream() << ": " << SystemErrorCodeToString(err_);
}
#endif // OS_WIN
@@ -862,5 +811,5 @@ std::wstring GetLogFileFullPath() {
} // namespace logging
std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) {
- return out << WideToUTF8(std::wstring(wstr));
+ return out << base::WideToUTF8(std::wstring(wstr));
}
diff --git a/chromium/base/logging.h b/chromium/base/logging.h
index 71f391f8aff..1a110a565e9 100644
--- a/chromium/base/logging.h
+++ b/chromium/base/logging.h
@@ -52,10 +52,6 @@
//
// LOG_IF(INFO, num_cookies > 10) << "Got lots of cookies";
//
-// The above will cause log messages to be output on the 1st, 11th, 21st, ...
-// times it is executed. Note that the special COUNTER value is used to
-// identify which repetition is happening.
-//
// The CHECK(condition) macro is active in both debug and release builds and
// effectively performs a LOG(FATAL) which terminates the process and
// generates a crashdump unless a debugger is attached.
@@ -131,18 +127,13 @@
// GetLastError() on Windows and errno on POSIX).
//
// The supported severity levels for macros that allow you to specify one
-// are (in increasing order of severity) INFO, WARNING, ERROR, ERROR_REPORT,
-// and FATAL.
+// are (in increasing order of severity) INFO, WARNING, ERROR, and FATAL.
//
// Very important: logging a message at the FATAL severity level causes
// the program to terminate (after the message is logged).
//
-// Note the special severity of ERROR_REPORT only available/relevant in normal
-// mode, which displays error dialog without terminating the program. There is
-// no error dialog for severity ERROR or below in normal mode.
-//
-// There is also the special severity of DFATAL, which logs FATAL in
-// debug mode, ERROR in normal mode.
+// There is the special severity of DFATAL, which logs FATAL in debug mode,
+// ERROR in normal mode.
namespace logging {
@@ -175,7 +166,7 @@ enum LoggingDestination {
// Indicates that the log file should be locked when being written to.
// Unless there is only one single-threaded process that is logging to
// the log file, the file should be locked during writes to make each
-// log outut atomic. Other writers will block.
+// log output atomic. Other writers will block.
//
// All processes writing to the log file must have their locking set for it to
// work properly. Defaults to LOCK_LOG_FILE.
@@ -185,11 +176,6 @@ enum LogLockingState { LOCK_LOG_FILE, DONT_LOCK_LOG_FILE };
// Defaults to APPEND_TO_OLD_LOG_FILE.
enum OldFileDeletionState { DELETE_OLD_LOG_FILE, APPEND_TO_OLD_LOG_FILE };
-enum DcheckState {
- DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS,
- ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS
-};
-
struct BASE_EXPORT LoggingSettings {
// The defaults values are:
//
@@ -197,7 +183,6 @@ struct BASE_EXPORT LoggingSettings {
// log_file: NULL
// lock_log: LOCK_LOG_FILE
// delete_old: APPEND_TO_OLD_LOG_FILE
- // dcheck_state: DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS
LoggingSettings();
LoggingDestination logging_dest;
@@ -207,8 +192,6 @@ struct BASE_EXPORT LoggingSettings {
const PathChar* log_file;
LogLockingState lock_log;
OldFileDeletionState delete_old;
-
- DcheckState dcheck_state;
};
// Define different names for the BaseInitLoggingImpl() function depending on
@@ -288,13 +271,6 @@ BASE_EXPORT void SetShowErrorDialogs(bool enable_dialogs);
typedef void (*LogAssertHandlerFunction)(const std::string& str);
BASE_EXPORT void SetLogAssertHandler(LogAssertHandlerFunction handler);
-// Sets the Log Report Handler that will be used to notify of check failures
-// in non-debug mode. The default handler shows a dialog box and continues
-// the execution, however clients can use this function to override with their
-// own handling.
-typedef void (*LogReportHandlerFunction)(const std::string& str);
-BASE_EXPORT void SetLogReportHandler(LogReportHandlerFunction handler);
-
// Sets the Log Message Handler that gets passed every log message before
// it's sent to other log destinations (if any).
// Returns true to signal that it handled the message and the message
@@ -311,9 +287,8 @@ const LogSeverity LOG_VERBOSE = -1; // This is level 1 verbosity
const LogSeverity LOG_INFO = 0;
const LogSeverity LOG_WARNING = 1;
const LogSeverity LOG_ERROR = 2;
-const LogSeverity LOG_ERROR_REPORT = 3;
-const LogSeverity LOG_FATAL = 4;
-const LogSeverity LOG_NUM_SEVERITIES = 5;
+const LogSeverity LOG_FATAL = 3;
+const LogSeverity LOG_NUM_SEVERITIES = 4;
// LOG_DFATAL is LOG_FATAL in debug mode, ERROR in normal mode
#ifdef NDEBUG
@@ -331,9 +306,6 @@ const LogSeverity LOG_DFATAL = LOG_FATAL;
logging::ClassName(__FILE__, __LINE__, logging::LOG_WARNING , ##__VA_ARGS__)
#define COMPACT_GOOGLE_LOG_EX_ERROR(ClassName, ...) \
logging::ClassName(__FILE__, __LINE__, logging::LOG_ERROR , ##__VA_ARGS__)
-#define COMPACT_GOOGLE_LOG_EX_ERROR_REPORT(ClassName, ...) \
- logging::ClassName(__FILE__, __LINE__, \
- logging::LOG_ERROR_REPORT , ##__VA_ARGS__)
#define COMPACT_GOOGLE_LOG_EX_FATAL(ClassName, ...) \
logging::ClassName(__FILE__, __LINE__, logging::LOG_FATAL , ##__VA_ARGS__)
#define COMPACT_GOOGLE_LOG_EX_DFATAL(ClassName, ...) \
@@ -345,8 +317,6 @@ const LogSeverity LOG_DFATAL = LOG_FATAL;
COMPACT_GOOGLE_LOG_EX_WARNING(LogMessage)
#define COMPACT_GOOGLE_LOG_ERROR \
COMPACT_GOOGLE_LOG_EX_ERROR(LogMessage)
-#define COMPACT_GOOGLE_LOG_ERROR_REPORT \
- COMPACT_GOOGLE_LOG_EX_ERROR_REPORT(LogMessage)
#define COMPACT_GOOGLE_LOG_FATAL \
COMPACT_GOOGLE_LOG_EX_FATAL(LogMessage)
#define COMPACT_GOOGLE_LOG_DFATAL \
@@ -366,10 +336,9 @@ const LogSeverity LOG_DFATAL = LOG_FATAL;
const LogSeverity LOG_0 = LOG_ERROR;
#endif
-// As special cases, we can assume that LOG_IS_ON(ERROR_REPORT) and
-// LOG_IS_ON(FATAL) always hold. Also, LOG_IS_ON(DFATAL) always holds
-// in debug mode. In particular, CHECK()s will always fire if they
-// fail.
+// As special cases, we can assume that LOG_IS_ON(FATAL) always holds. Also,
+// LOG_IS_ON(DFATAL) always holds in debug mode. In particular, CHECK()s will
+// always fire if they fail.
#define LOG_IS_ON(severity) \
((::logging::LOG_ ## severity) >= ::logging::GetMinLogLevel())
@@ -438,29 +407,13 @@ const LogSeverity LOG_0 = LOG_ERROR;
SYSLOG_IF(FATAL, !(condition)) << "Assert failed: " #condition ". "
#if defined(OS_WIN)
-#define LOG_GETLASTERROR_STREAM(severity) \
+#define PLOG_STREAM(severity) \
COMPACT_GOOGLE_LOG_EX_ ## severity(Win32ErrorLogMessage, \
::logging::GetLastSystemErrorCode()).stream()
-#define LOG_GETLASTERROR(severity) \
- LAZY_STREAM(LOG_GETLASTERROR_STREAM(severity), LOG_IS_ON(severity))
-#define LOG_GETLASTERROR_MODULE_STREAM(severity, module) \
- COMPACT_GOOGLE_LOG_EX_ ## severity(Win32ErrorLogMessage, \
- ::logging::GetLastSystemErrorCode(), module).stream()
-#define LOG_GETLASTERROR_MODULE(severity, module) \
- LAZY_STREAM(LOG_GETLASTERROR_STREAM(severity, module), \
- LOG_IS_ON(severity))
-// PLOG_STREAM is used by PLOG, which is the usual error logging macro
-// for each platform.
-#define PLOG_STREAM(severity) LOG_GETLASTERROR_STREAM(severity)
#elif defined(OS_POSIX)
-#define LOG_ERRNO_STREAM(severity) \
+#define PLOG_STREAM(severity) \
COMPACT_GOOGLE_LOG_EX_ ## severity(ErrnoLogMessage, \
::logging::GetLastSystemErrorCode()).stream()
-#define LOG_ERRNO(severity) \
- LAZY_STREAM(LOG_ERRNO_STREAM(severity), LOG_IS_ON(severity))
-// PLOG_STREAM is used by PLOG, which is the usual error logging macro
-// for each platform.
-#define PLOG_STREAM(severity) LOG_ERRNO_STREAM(severity)
#endif
#define PLOG(severity) \
@@ -469,20 +422,6 @@ const LogSeverity LOG_0 = LOG_ERROR;
#define PLOG_IF(severity, condition) \
LAZY_STREAM(PLOG_STREAM(severity), LOG_IS_ON(severity) && (condition))
-#if !defined(NDEBUG)
-// Debug builds always include DCHECK and DLOG.
-#undef LOGGING_IS_OFFICIAL_BUILD
-#define LOGGING_IS_OFFICIAL_BUILD 0
-#elif defined(OFFICIAL_BUILD)
-// Official release builds always disable and remove DCHECK and DLOG.
-#undef LOGGING_IS_OFFICIAL_BUILD
-#define LOGGING_IS_OFFICIAL_BUILD 1
-#elif !defined(LOGGING_IS_OFFICIAL_BUILD)
-// Unless otherwise specified, unofficial release builds include
-// DCHECK and DLOG.
-#define LOGGING_IS_OFFICIAL_BUILD 0
-#endif
-
// The actual stream used isn't important.
#define EAT_STREAM_PARAMETERS \
true ? (void) 0 : ::logging::LogMessageVoidify() & LOG_STREAM(FATAL)
@@ -494,10 +433,10 @@ const LogSeverity LOG_0 = LOG_ERROR;
// We make sure CHECK et al. always evaluates their arguments, as
// doing CHECK(FunctionWithSideEffect()) is a common idiom.
-#if LOGGING_IS_OFFICIAL_BUILD
+#if defined(OFFICIAL_BUILD) && defined(NDEBUG) && !defined(OS_ANDROID)
// Make all CHECK functions discard their log strings to reduce code
-// bloat for official builds.
+// bloat for official release builds.
// TODO(akalin): This would be more valuable if there were some way to
// remove BreakDebugger() from the backtrace, perhaps by turning it
@@ -594,22 +533,16 @@ DEFINE_CHECK_OP_IMPL(GT, > )
#define CHECK_GE(val1, val2) CHECK_OP(GE, >=, val1, val2)
#define CHECK_GT(val1, val2) CHECK_OP(GT, > , val1, val2)
-#if LOGGING_IS_OFFICIAL_BUILD
-// In order to have optimized code for official builds, remove DLOGs and
-// DCHECKs.
-#define ENABLE_DLOG 0
-#define ENABLE_DCHECK 0
-
-#elif defined(NDEBUG)
-// Otherwise, if we're a release build, remove DLOGs but not DCHECKs
-// (since those can still be turned on via a command-line flag).
+#if defined(NDEBUG)
#define ENABLE_DLOG 0
-#define ENABLE_DCHECK 1
-
#else
-// Otherwise, we're a debug build so enable DLOGs and DCHECKs.
#define ENABLE_DLOG 1
-#define ENABLE_DCHECK 1
+#endif
+
+#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
+#define DCHECK_IS_ON 0
+#else
+#define DCHECK_IS_ON 1
#endif
// Definitions for DLOG et al.
@@ -654,17 +587,6 @@ enum { DEBUG_MODE = ENABLE_DLOG };
#define DLOG(severity) \
LAZY_STREAM(LOG_STREAM(severity), DLOG_IS_ON(severity))
-#if defined(OS_WIN)
-#define DLOG_GETLASTERROR(severity) \
- LAZY_STREAM(LOG_GETLASTERROR_STREAM(severity), DLOG_IS_ON(severity))
-#define DLOG_GETLASTERROR_MODULE(severity, module) \
- LAZY_STREAM(LOG_GETLASTERROR_STREAM(severity, module), \
- DLOG_IS_ON(severity))
-#elif defined(OS_POSIX)
-#define DLOG_ERRNO(severity) \
- LAZY_STREAM(LOG_ERRNO_STREAM(severity), DLOG_IS_ON(severity))
-#endif
-
#define DPLOG(severity) \
LAZY_STREAM(PLOG_STREAM(severity), DLOG_IS_ON(severity))
@@ -674,75 +596,40 @@ enum { DEBUG_MODE = ENABLE_DLOG };
// Definitions for DCHECK et al.
-#if ENABLE_DCHECK
-
-#if defined(NDEBUG)
-
-BASE_EXPORT DcheckState get_dcheck_state();
-BASE_EXPORT void set_dcheck_state(DcheckState state);
+#if DCHECK_IS_ON
-#if defined(DCHECK_ALWAYS_ON)
-
-#define DCHECK_IS_ON() true
-#define COMPACT_GOOGLE_LOG_EX_DCHECK(ClassName, ...) \
- COMPACT_GOOGLE_LOG_EX_FATAL(ClassName , ##__VA_ARGS__)
-#define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_FATAL
-const LogSeverity LOG_DCHECK = LOG_FATAL;
-
-#else
-
-#define COMPACT_GOOGLE_LOG_EX_DCHECK(ClassName, ...) \
- COMPACT_GOOGLE_LOG_EX_ERROR_REPORT(ClassName , ##__VA_ARGS__)
-#define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_ERROR_REPORT
-const LogSeverity LOG_DCHECK = LOG_ERROR_REPORT;
-#define DCHECK_IS_ON() \
- ((::logging::get_dcheck_state() == \
- ::logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS) && \
- LOG_IS_ON(DCHECK))
-
-#endif // defined(DCHECK_ALWAYS_ON)
-
-#else // defined(NDEBUG)
-
-// On a regular debug build, we want to have DCHECKs enabled.
#define COMPACT_GOOGLE_LOG_EX_DCHECK(ClassName, ...) \
COMPACT_GOOGLE_LOG_EX_FATAL(ClassName , ##__VA_ARGS__)
#define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_FATAL
const LogSeverity LOG_DCHECK = LOG_FATAL;
-#define DCHECK_IS_ON() true
-
-#endif // defined(NDEBUG)
-#else // ENABLE_DCHECK
+#else // DCHECK_IS_ON
-// These are just dummy values since DCHECK_IS_ON() is always false in
-// this case.
+// These are just dummy values.
#define COMPACT_GOOGLE_LOG_EX_DCHECK(ClassName, ...) \
COMPACT_GOOGLE_LOG_EX_INFO(ClassName , ##__VA_ARGS__)
#define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_INFO
const LogSeverity LOG_DCHECK = LOG_INFO;
-#define DCHECK_IS_ON() false
-#endif // ENABLE_DCHECK
-#undef ENABLE_DCHECK
+#endif // DCHECK_IS_ON
// DCHECK et al. make sure to reference |condition| regardless of
// whether DCHECKs are enabled; this is so that we don't get unused
// variable warnings if the only use of a variable is in a DCHECK.
// This behavior is different from DLOG_IF et al.
-#define DCHECK(condition) \
- LAZY_STREAM(LOG_STREAM(DCHECK), DCHECK_IS_ON() && !(condition)) \
+#define DCHECK(condition) \
+ LAZY_STREAM(LOG_STREAM(DCHECK), DCHECK_IS_ON && !(condition)) \
<< "Check failed: " #condition ". "
-#define DPCHECK(condition) \
- LAZY_STREAM(PLOG_STREAM(DCHECK), DCHECK_IS_ON() && !(condition)) \
+#define DPCHECK(condition) \
+ LAZY_STREAM(PLOG_STREAM(DCHECK), DCHECK_IS_ON && !(condition)) \
<< "Check failed: " #condition ". "
// Helper macro for binary operators.
// Don't use this macro directly in your code, use DCHECK_EQ et al below.
#define DCHECK_OP(name, op, val1, val2) \
- if (DCHECK_IS_ON()) \
+ if (DCHECK_IS_ON) \
if (std::string* _result = \
logging::Check##name##Impl((val1), (val2), \
#val1 " " #op " " #val2)) \
@@ -797,32 +684,14 @@ const LogSeverity LOG_DCHECK = LOG_INFO;
// above.
class BASE_EXPORT LogMessage {
public:
- LogMessage(const char* file, int line, LogSeverity severity, int ctr);
-
- // Two special constructors that generate reduced amounts of code at
- // LOG call sites for common cases.
- //
- // Used for LOG(INFO): Implied are:
- // severity = LOG_INFO, ctr = 0
- //
- // Using this constructor instead of the more complex constructor above
- // saves a couple of bytes per call site.
- LogMessage(const char* file, int line);
-
- // Used for LOG(severity) where severity != INFO. Implied
- // are: ctr = 0
- //
- // Using this constructor instead of the more complex constructor above
- // saves a couple of bytes per call site.
+ // Used for LOG(severity).
LogMessage(const char* file, int line, LogSeverity severity);
- // A special constructor used for check failures. Takes ownership
- // of the given string.
- // Implied severity = LOG_FATAL
+ // Used for CHECK_EQ(), etc. Takes ownership of the given string.
+ // Implied severity = LOG_FATAL.
LogMessage(const char* file, int line, std::string* result);
- // A special constructor used for check failures, with the option to
- // specify severity. Takes ownership of the given string.
+ // Used for DCHECK_EQ(), etc. Takes ownership of the given string.
LogMessage(const char* file, int line, LogSeverity severity,
std::string* result);
@@ -890,6 +759,7 @@ typedef int SystemErrorCode;
// Alias for ::GetLastError() on Windows and errno on POSIX. Avoids having to
// pull in windows.h just for GetLastError() and DWORD.
BASE_EXPORT SystemErrorCode GetLastSystemErrorCode();
+BASE_EXPORT std::string SystemErrorCodeToString(SystemErrorCode error_code);
#if defined(OS_WIN)
// Appends a formatted system message of the GetLastError() type.
@@ -898,12 +768,6 @@ class BASE_EXPORT Win32ErrorLogMessage {
Win32ErrorLogMessage(const char* file,
int line,
LogSeverity severity,
- SystemErrorCode err,
- const char* module);
-
- Win32ErrorLogMessage(const char* file,
- int line,
- LogSeverity severity,
SystemErrorCode err);
// Appends the error message before destructing the encapsulated class.
@@ -913,8 +777,6 @@ class BASE_EXPORT Win32ErrorLogMessage {
private:
SystemErrorCode err_;
- // Optional name of the module defining the error.
- const char* module_;
LogMessage log_message_;
DISALLOW_COPY_AND_ASSIGN(Win32ErrorLogMessage);
diff --git a/chromium/base/logging_unittest.cc b/chromium/base/logging_unittest.cc
index 4996abc2240..f823d6ee2d7 100644
--- a/chromium/base/logging_unittest.cc
+++ b/chromium/base/logging_unittest.cc
@@ -17,11 +17,11 @@ using ::testing::Return;
// Needs to be global since log assert handlers can't maintain state.
int log_sink_call_count = 0;
-#if !LOGGING_IS_OFFICIAL_BUILD
+#if !defined(OFFICIAL_BUILD) || defined(DCHECK_ALWAYS_ON) || !defined(NDEBUG)
void LogSink(const std::string& str) {
++log_sink_call_count;
}
-#endif // !LOGGING_IS_OFFICIAL_BUILD
+#endif
// Class to make sure any manipulations we do to the min log level are
// contained (i.e., do not affect other unit tests).
@@ -32,7 +32,6 @@ class LogStateSaver {
~LogStateSaver() {
SetMinLogLevel(old_min_log_level_);
SetLogAssertHandler(NULL);
- SetLogReportHandler(NULL);
log_sink_call_count = 0;
}
@@ -54,11 +53,7 @@ class MockLogSource {
TEST_F(LoggingTest, BasicLogging) {
MockLogSource mock_log_source;
- const int kExpectedDebugOrReleaseCalls = 6;
- const int kExpectedDebugCalls = 6;
- const int kExpectedCalls =
- kExpectedDebugOrReleaseCalls + (DEBUG_MODE ? kExpectedDebugCalls : 0);
- EXPECT_CALL(mock_log_source, Log()).Times(kExpectedCalls).
+ EXPECT_CALL(mock_log_source, Log()).Times(DEBUG_MODE ? 16 : 8).
WillRepeatedly(Return("log message"));
SetMinLogLevel(LOG_INFO);
@@ -76,6 +71,8 @@ TEST_F(LoggingTest, BasicLogging) {
PLOG_IF(INFO, true) << mock_log_source.Log();
VLOG(0) << mock_log_source.Log();
VLOG_IF(0, true) << mock_log_source.Log();
+ VPLOG(0) << mock_log_source.Log();
+ VPLOG_IF(0, true) << mock_log_source.Log();
DLOG(INFO) << mock_log_source.Log();
DLOG_IF(INFO, true) << mock_log_source.Log();
@@ -83,6 +80,8 @@ TEST_F(LoggingTest, BasicLogging) {
DPLOG_IF(INFO, true) << mock_log_source.Log();
DVLOG(0) << mock_log_source.Log();
DVLOG_IF(0, true) << mock_log_source.Log();
+ DVPLOG(0) << mock_log_source.Log();
+ DVPLOG_IF(0, true) << mock_log_source.Log();
}
TEST_F(LoggingTest, LogIsOn) {
@@ -96,7 +95,6 @@ TEST_F(LoggingTest, LogIsOn) {
EXPECT_TRUE(LOG_IS_ON(INFO));
EXPECT_TRUE(LOG_IS_ON(WARNING));
EXPECT_TRUE(LOG_IS_ON(ERROR));
- EXPECT_TRUE(LOG_IS_ON(ERROR_REPORT));
EXPECT_TRUE(LOG_IS_ON(FATAL));
EXPECT_TRUE(LOG_IS_ON(DFATAL));
@@ -104,7 +102,6 @@ TEST_F(LoggingTest, LogIsOn) {
EXPECT_FALSE(LOG_IS_ON(INFO));
EXPECT_TRUE(LOG_IS_ON(WARNING));
EXPECT_TRUE(LOG_IS_ON(ERROR));
- EXPECT_TRUE(LOG_IS_ON(ERROR_REPORT));
EXPECT_TRUE(LOG_IS_ON(FATAL));
EXPECT_TRUE(LOG_IS_ON(DFATAL));
@@ -112,33 +109,14 @@ TEST_F(LoggingTest, LogIsOn) {
EXPECT_FALSE(LOG_IS_ON(INFO));
EXPECT_FALSE(LOG_IS_ON(WARNING));
EXPECT_TRUE(LOG_IS_ON(ERROR));
- EXPECT_TRUE(LOG_IS_ON(ERROR_REPORT));
EXPECT_TRUE(LOG_IS_ON(FATAL));
EXPECT_TRUE(LOG_IS_ON(DFATAL));
- SetMinLogLevel(LOG_ERROR_REPORT);
- EXPECT_FALSE(LOG_IS_ON(INFO));
- EXPECT_FALSE(LOG_IS_ON(WARNING));
- EXPECT_FALSE(LOG_IS_ON(ERROR));
- EXPECT_TRUE(LOG_IS_ON(ERROR_REPORT));
- EXPECT_TRUE(LOG_IS_ON(FATAL));
- EXPECT_TRUE(kDfatalIsFatal == LOG_IS_ON(DFATAL));
-
- // LOG_IS_ON(ERROR_REPORT) should always be true.
- SetMinLogLevel(LOG_FATAL);
- EXPECT_FALSE(LOG_IS_ON(INFO));
- EXPECT_FALSE(LOG_IS_ON(WARNING));
- EXPECT_FALSE(LOG_IS_ON(ERROR));
- EXPECT_TRUE(LOG_IS_ON(ERROR_REPORT));
- EXPECT_TRUE(LOG_IS_ON(FATAL));
- EXPECT_TRUE(kDfatalIsFatal == LOG_IS_ON(DFATAL));
-
- // So should LOG_IS_ON(FATAL).
+ // LOG_IS_ON(FATAL) should always be true.
SetMinLogLevel(LOG_FATAL + 1);
EXPECT_FALSE(LOG_IS_ON(INFO));
EXPECT_FALSE(LOG_IS_ON(WARNING));
EXPECT_FALSE(LOG_IS_ON(ERROR));
- EXPECT_TRUE(LOG_IS_ON(ERROR_REPORT));
EXPECT_TRUE(LOG_IS_ON(FATAL));
EXPECT_TRUE(kDfatalIsFatal == LOG_IS_ON(DFATAL));
}
@@ -159,6 +137,8 @@ TEST_F(LoggingTest, LoggingIsLazy) {
PLOG_IF(INFO, false) << mock_log_source.Log();
VLOG(1) << mock_log_source.Log();
VLOG_IF(1, true) << mock_log_source.Log();
+ VPLOG(1) << mock_log_source.Log();
+ VPLOG_IF(1, true) << mock_log_source.Log();
DLOG(INFO) << mock_log_source.Log();
DLOG_IF(INFO, true) << mock_log_source.Log();
@@ -166,10 +146,12 @@ TEST_F(LoggingTest, LoggingIsLazy) {
DPLOG_IF(INFO, true) << mock_log_source.Log();
DVLOG(1) << mock_log_source.Log();
DVLOG_IF(1, true) << mock_log_source.Log();
+ DVPLOG(1) << mock_log_source.Log();
+ DVPLOG_IF(1, true) << mock_log_source.Log();
}
// Official builds have CHECKs directly call BreakDebugger.
-#if !LOGGING_IS_OFFICIAL_BUILD
+#if !defined(OFFICIAL_BUILD)
TEST_F(LoggingTest, CheckStreamsAreLazy) {
MockLogSource mock_log_source, uncalled_mock_log_source;
@@ -204,9 +186,10 @@ TEST_F(LoggingTest, DebugLoggingReleaseBehavior) {
TEST_F(LoggingTest, DcheckStreamsAreLazy) {
MockLogSource mock_log_source;
EXPECT_CALL(mock_log_source, Log()).Times(0);
-#if !LOGGING_IS_OFFICIAL_BUILD && defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
- // Unofficial release build without dcheck enabled.
- set_dcheck_state(DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
+#if DCHECK_IS_ON
+ DCHECK(true) << mock_log_source.Log();
+ DCHECK_EQ(0, 0) << mock_log_source.Log();
+#else
DCHECK(mock_log_source.Log()) << mock_log_source.Log();
DPCHECK(mock_log_source.Log()) << mock_log_source.Log();
DCHECK_EQ(0, 0) << mock_log_source.Log();
@@ -216,36 +199,29 @@ TEST_F(LoggingTest, DcheckStreamsAreLazy) {
}
TEST_F(LoggingTest, Dcheck) {
-#if LOGGING_IS_OFFICIAL_BUILD
- // Official build.
- EXPECT_FALSE(DCHECK_IS_ON());
- EXPECT_FALSE(DLOG_IS_ON(DCHECK));
-#elif defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
- // Unofficial release build.
- set_dcheck_state(ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
- SetLogReportHandler(&LogSink);
- EXPECT_TRUE(DCHECK_IS_ON());
+#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
+ // Release build.
+ EXPECT_FALSE(DCHECK_IS_ON);
EXPECT_FALSE(DLOG_IS_ON(DCHECK));
#elif defined(NDEBUG) && defined(DCHECK_ALWAYS_ON)
- // Unofficial release build with real DCHECKS.
- set_dcheck_state(ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
+ // Release build with real DCHECKS.
SetLogAssertHandler(&LogSink);
- EXPECT_TRUE(DCHECK_IS_ON());
+ EXPECT_TRUE(DCHECK_IS_ON);
EXPECT_FALSE(DLOG_IS_ON(DCHECK));
#else
- // Unofficial debug build.
+ // Debug build.
SetLogAssertHandler(&LogSink);
- EXPECT_TRUE(DCHECK_IS_ON());
+ EXPECT_TRUE(DCHECK_IS_ON);
EXPECT_TRUE(DLOG_IS_ON(DCHECK));
-#endif // defined(LOGGING_IS_OFFICIAL_BUILD)
+#endif
EXPECT_EQ(0, log_sink_call_count);
DCHECK(false);
- EXPECT_EQ(DCHECK_IS_ON() ? 1 : 0, log_sink_call_count);
+ EXPECT_EQ(DCHECK_IS_ON ? 1 : 0, log_sink_call_count);
DPCHECK(false);
- EXPECT_EQ(DCHECK_IS_ON() ? 2 : 0, log_sink_call_count);
+ EXPECT_EQ(DCHECK_IS_ON ? 2 : 0, log_sink_call_count);
DCHECK_EQ(0, 1);
- EXPECT_EQ(DCHECK_IS_ON() ? 3 : 0, log_sink_call_count);
+ EXPECT_EQ(DCHECK_IS_ON ? 3 : 0, log_sink_call_count);
}
TEST_F(LoggingTest, DcheckReleaseBehavior) {
diff --git a/chromium/base/logging_win.cc b/chromium/base/logging_win.cc
index a7146657884..a3c3a5befe0 100644
--- a/chromium/base/logging_win.cc
+++ b/chromium/base/logging_win.cc
@@ -37,7 +37,6 @@ bool LogEventProvider::LogMessage(logging::LogSeverity severity,
level = TRACE_LEVEL_WARNING;
break;
case LOG_ERROR:
- case LOG_ERROR_REPORT:
level = TRACE_LEVEL_ERROR;
break;
case LOG_FATAL:
diff --git a/chromium/base/mac/bind_objc_block.h b/chromium/base/mac/bind_objc_block.h
index 75da437b5c5..9deb2d22e75 100644
--- a/chromium/base/mac/bind_objc_block.h
+++ b/chromium/base/mac/bind_objc_block.h
@@ -14,7 +14,13 @@
// BindBlock builds a callback from an Objective-C block. Example usages:
//
// Closure closure = BindBlock(^{DoSomething();});
+//
// Callback<int(void)> callback = BindBlock(^{return 42;});
+//
+// Callback<void(const std::string&, const std::string&)> callback =
+// BindBlock(^(const std::string& arg0, const std::string& arg1) {
+// ...
+// });
namespace base {
@@ -33,6 +39,12 @@ R RunBlock(base::mac::ScopedBlock<R(^)(A1)> block, A1 a) {
return extracted_block(a);
}
+template<typename R, typename A1, typename A2>
+R RunBlock(base::mac::ScopedBlock<R(^)(A1, A2)> block, A1 a, A2 b) {
+ R(^extracted_block)(A1, A2) = block.get();
+ return extracted_block(a, b);
+}
+
} // namespace internal
// Construct a callback with no argument from an objective-C block.
@@ -49,6 +61,13 @@ base::Callback<R(A1)> BindBlock(R(^block)(A1)) {
base::mac::ScopedBlock<R(^)(A1)>(Block_copy(block)));
}
+// Construct a callback with two arguments from an objective-C block.
+template<typename R, typename A1, typename A2>
+base::Callback<R(A1, A2)> BindBlock(R(^block)(A1, A2)) {
+ return base::Bind(&base::internal::RunBlock<R, A1, A2>,
+ base::mac::ScopedBlock<R(^)(A1, A2)>(Block_copy(block)));
+}
+
} // namespace base
#endif // BASE_MAC_BIND_OBJC_BLOCK_H_
diff --git a/chromium/base/mac/bind_objc_block_unittest.mm b/chromium/base/mac/bind_objc_block_unittest.mm
index a4bcd76dbb8..c72fd4a8c20 100644
--- a/chromium/base/mac/bind_objc_block_unittest.mm
+++ b/chromium/base/mac/bind_objc_block_unittest.mm
@@ -4,6 +4,8 @@
#import "base/mac/bind_objc_block.h"
+#include <string>
+
#include "base/callback.h"
#include "base/bind.h"
#include "base/callback_helpers.h"
@@ -51,4 +53,15 @@ TEST(BindObjcBlockTest, TestArgument) {
EXPECT_EQ(kArgument + 1, c.Run(kArgument));
}
+TEST(BindObjcBlockTest, TestTwoArguments) {
+ std::string result;
+ std::string* ptr = &result;
+ base::Callback<void(const std::string&, const std::string&)> c =
+ base::BindBlock(^(const std::string& a, const std::string& b) {
+ *ptr = a + b;
+ });
+ c.Run("forty", "two");
+ EXPECT_EQ(result, "fortytwo");
+}
+
} // namespace
diff --git a/chromium/base/mac/cocoa_protocols.h b/chromium/base/mac/cocoa_protocols.h
index e83fcbb2996..e10001f6be0 100644
--- a/chromium/base/mac/cocoa_protocols.h
+++ b/chromium/base/mac/cocoa_protocols.h
@@ -7,9 +7,9 @@
#import <Cocoa/Cocoa.h>
-// GTM also maintinas a list of empty protocols, but only the ones the library
+// GTM also maintains a list of empty protocols, but only the ones the library
// requires. Augment that below.
-#import "third_party/GTM/GTMDefines.h"
+#import "third_party/google_toolbox_for_mac/src/GTMDefines.h"
// New Mac OS X SDKs introduce new protocols used for delegates. These
// protocol defintions aren't not present in earlier releases of the Mac OS X
@@ -30,13 +30,6 @@ DEFINE_EMPTY_PROTOCOL(ICCameraDeviceDownloadDelegate)
#endif // MAC_OS_X_VERSION_10_7
-#if !defined(MAC_OS_X_VERSION_10_8) || \
- MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8
-
-DEFINE_EMPTY_PROTOCOL(NSUserNotificationCenterDelegate)
-
-#endif // MAC_OS_X_VERSION_10_8
-
#undef DEFINE_EMPTY_PROTOCOL
#endif // BASE_COCOA_PROTOCOLS_MAC_H_
diff --git a/chromium/base/mac/foundation_util_unittest.mm b/chromium/base/mac/foundation_util_unittest.mm
index 3b72b1225a8..916a13bd7fa 100644
--- a/chromium/base/mac/foundation_util_unittest.mm
+++ b/chromium/base/mac/foundation_util_unittest.mm
@@ -5,9 +5,12 @@
#include "base/mac/foundation_util.h"
#include "base/basictypes.h"
+#include "base/compiler_specific.h"
#include "base/files/file_path.h"
+#include "base/format_macros.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/mac/scoped_nsautorelease_pool.h"
+#include "base/strings/stringprintf.h"
#include "testing/gtest/include/gtest/gtest.h"
#import "testing/gtest_mac.h"
@@ -314,5 +317,75 @@ TEST(FoundationUtilTest, NSStringToFilePath) {
EXPECT_EQ(FilePath("/a/b"), NSStringToFilePath(@"/a/b"));
}
+TEST(StringNumberConversionsTest, FormatNSInteger) {
+ // The PRI[dxu]NS macro assumes that NSInteger is a typedef to "int" on
+ // 32-bit architecture and a typedef to "long" on 64-bit architecture
+ // (respectively "unsigned int" and "unsigned long" for NSUInteger). Use
+ // pointer incompatibility to validate this at compilation.
+#if defined(ARCH_CPU_64_BITS)
+ typedef long FormatNSIntegerAsType;
+ typedef unsigned long FormatNSUIntegerAsType;
+#else
+ typedef int FormatNSIntegerAsType;
+ typedef unsigned int FormatNSUIntegerAsType;
+#endif // defined(ARCH_CPU_64_BITS)
+
+ NSInteger some_nsinteger;
+ FormatNSIntegerAsType* pointer_to_some_nsinteger ALLOW_UNUSED =
+ &some_nsinteger;
+
+ NSUInteger some_nsuinteger;
+ FormatNSUIntegerAsType* pointer_to_some_nsuinteger ALLOW_UNUSED =
+ &some_nsuinteger;
+
+ // Check that format specifier works correctly for NSInteger.
+ const struct {
+ NSInteger value;
+ const char* expected;
+ const char* expected_hex;
+ } nsinteger_cases[] = {
+#if !defined(ARCH_CPU_64_BITS)
+ {12345678, "12345678", "bc614e"},
+ {-12345678, "-12345678", "ff439eb2"},
+#else
+ {12345678, "12345678", "bc614e"},
+ {-12345678, "-12345678", "ffffffffff439eb2"},
+ {137451299150l, "137451299150", "2000bc614e"},
+ {-137451299150l, "-137451299150", "ffffffdfff439eb2"},
+#endif // !defined(ARCH_CPU_64_BITS)
+ };
+
+ for (size_t i = 0; i < arraysize(nsinteger_cases); ++i) {
+ EXPECT_EQ(nsinteger_cases[i].expected,
+ StringPrintf("%" PRIdNS, nsinteger_cases[i].value));
+ EXPECT_EQ(nsinteger_cases[i].expected_hex,
+ StringPrintf("%" PRIxNS, nsinteger_cases[i].value));
+ }
+
+ // Check that format specifier works correctly for NSUInteger.
+ const struct {
+ NSUInteger value;
+ const char* expected;
+ const char* expected_hex;
+ } nsuinteger_cases[] = {
+#if !defined(ARCH_CPU_64_BITS)
+ {12345678u, "12345678", "bc614e"},
+ {4282621618u, "4282621618", "ff439eb2"},
+#else
+ {12345678u, "12345678", "bc614e"},
+ {4282621618u, "4282621618", "ff439eb2"},
+ {137451299150ul, "137451299150", "2000bc614e"},
+ {18446743936258252466ul, "18446743936258252466", "ffffffdfff439eb2"},
+#endif // !defined(ARCH_CPU_64_BITS)
+ };
+
+ for (size_t i = 0; i < arraysize(nsuinteger_cases); ++i) {
+ EXPECT_EQ(nsuinteger_cases[i].expected,
+ StringPrintf("%" PRIuNS, nsuinteger_cases[i].value));
+ EXPECT_EQ(nsuinteger_cases[i].expected_hex,
+ StringPrintf("%" PRIxNS, nsuinteger_cases[i].value));
+ }
+}
+
} // namespace mac
} // namespace base
diff --git a/chromium/base/mac/launch_services_util.h b/chromium/base/mac/launch_services_util.h
index d4aa9ffcbeb..0c52ca94c52 100644
--- a/chromium/base/mac/launch_services_util.h
+++ b/chromium/base/mac/launch_services_util.h
@@ -22,7 +22,7 @@ namespace mac {
// |out_psn|, if not NULL, will be set to the process serial number of the
// application's main process if the app was successfully launched.
// Returns true if the app was successfully launched.
-BASE_EXPORT bool OpenApplicationWithPath(const base::FilePath& bundle_path,
+BASE_EXPORT bool OpenApplicationWithPath(const FilePath& bundle_path,
const CommandLine& command_line,
LSLaunchFlags launch_flags,
ProcessSerialNumber* out_psn);
diff --git a/chromium/base/mac/mac_logging.h b/chromium/base/mac/mac_logging.h
index 9a0003e9ad8..1081490ec4a 100644
--- a/chromium/base/mac/mac_logging.h
+++ b/chromium/base/mac/mac_logging.h
@@ -5,6 +5,8 @@
#ifndef BASE_MAC_MAC_LOGGING_H_
#define BASE_MAC_MAC_LOGGING_H_
+#include "base/base_export.h"
+#include "base/basictypes.h"
#include "base/logging.h"
#include "build/build_config.h"
@@ -43,6 +45,12 @@ class BASE_EXPORT OSStatusLogMessage : public logging::LogMessage {
} // namespace logging
+#if defined(NDEBUG)
+#define MAC_DVLOG_IS_ON(verbose_level) 0
+#else
+#define MAC_DVLOG_IS_ON(verbose_level) VLOG_IS_ON(verbose_level)
+#endif
+
#define OSSTATUS_LOG_STREAM(severity, status) \
COMPACT_GOOGLE_LOG_EX_ ## severity(OSStatusLogMessage, status).stream()
#define OSSTATUS_VLOG_STREAM(verbose_level, status) \
@@ -73,15 +81,15 @@ class BASE_EXPORT OSStatusLogMessage : public logging::LogMessage {
DLOG_IS_ON(severity) && (condition))
#define OSSTATUS_DVLOG(verbose_level, status) \
- LAZY_STREAM(OSSTATUS_VPLOG_STREAM(verbose_level, status), \
- DVLOG_IS_ON(verbose_level))
+ LAZY_STREAM(OSSTATUS_VLOG_STREAM(verbose_level, status), \
+ MAC_DVLOG_IS_ON(verbose_level))
#define OSSTATUS_DVLOG_IF(verbose_level, condition, status) \
- LAZY_STREAM(OSSTATUS_VPLOG_STREAM(verbose_level, status) \
- DVLOG_IS_ON(verbose_level) && (condition))
+ LAZY_STREAM(OSSTATUS_VLOG_STREAM(verbose_level, status), \
+ MAC_DVLOG_IS_ON(verbose_level) && (condition))
#define OSSTATUS_DCHECK(condition, status) \
LAZY_STREAM(OSSTATUS_LOG_STREAM(FATAL, status), \
- DCHECK_IS_ON() && !(condition)) \
+ DCHECK_IS_ON && !(condition)) \
<< "Check failed: " # condition << ". "
#endif // BASE_MAC_MAC_LOGGING_H_
diff --git a/chromium/base/mac/mac_util.h b/chromium/base/mac/mac_util.h
index e827f37c9fb..db399a8ca06 100644
--- a/chromium/base/mac/mac_util.h
+++ b/chromium/base/mac/mac_util.h
@@ -113,6 +113,12 @@ BASE_EXPORT void RemoveFromLoginItems();
BASE_EXPORT bool WasLaunchedAsLoginOrResumeItem();
// Returns true if the current process was automatically launched as a
+// 'Login Item' or via Resume, and the 'Reopen windows when logging back in'
+// checkbox was selected by the user. This indicates that the previous
+// session should be restored.
+BASE_EXPORT bool WasLaunchedAsLoginItemRestoreState();
+
+// Returns true if the current process was automatically launched as a
// 'Login Item' with 'hide on startup' flag. Used to suppress opening windows.
BASE_EXPORT bool WasLaunchedAsHiddenLoginItem();
@@ -140,17 +146,23 @@ BASE_EXPORT bool IsOSMountainLionOrLater();
// Mavericks is Mac OS X 10.9, Darwin 13.
BASE_EXPORT bool IsOSMavericks();
+BASE_EXPORT bool IsOSMavericksOrEarlier();
BASE_EXPORT bool IsOSMavericksOrLater();
+// Yosemite is Mac OS X 10.10, Darwin 14.
+BASE_EXPORT bool IsOSYosemite();
+BASE_EXPORT bool IsOSYosemiteOrLater();
+
// This should be infrequently used. It only makes sense to use this to avoid
// codepaths that are very likely to break on future (unreleased, untested,
// unborn) OS releases, or to log when the OS is newer than any known version.
-BASE_EXPORT bool IsOSLaterThanMavericks_DontCallThis();
+BASE_EXPORT bool IsOSLaterThanYosemite_DontCallThis();
// Inline functions that are redundant due to version ranges being mutually-
// exclusive.
inline bool IsOSLionOrEarlier() { return !IsOSMountainLionOrLater(); }
inline bool IsOSMountainLionOrEarlier() { return !IsOSMavericksOrLater(); }
+inline bool IsOSMavericksOrEarlier() { return !IsOSYosemiteOrLater(); }
// When the deployment target is set, the code produced cannot run on earlier
// OS releases. That enables some of the IsOS* family to be implemented as
@@ -192,7 +204,19 @@ inline bool IsOSMavericksOrLater() { return true; }
MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_9
#define BASE_MAC_MAC_UTIL_H_INLINED_GT_10_9
inline bool IsOSMavericks() { return false; }
-inline bool IsOSLaterThanMavericks_DontCallThis() { return true; }
+#endif
+
+#if defined(MAC_OS_X_VERSION_10_10) && \
+ MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
+#define BASE_MAC_MAC_UTIL_H_INLINED_GE_10_10
+inline bool IsOSYosemiteOrLater() { return true; }
+#endif
+
+#if defined(MAC_OS_X_VERSION_10_10) && \
+ MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_10
+#define BASE_MAC_MAC_UTIL_H_INLINED_GT_10_10
+inline bool IsOSYosemite() { return false; }
+inline bool IsOSLaterThanYosemite_DontCallThis() { return true; }
#endif
// Retrieve the system's model identifier string from the IOKit registry:
diff --git a/chromium/base/mac/mac_util.mm b/chromium/base/mac/mac_util.mm
index c2565991abb..4ff1c879237 100644
--- a/chromium/base/mac/mac_util.mm
+++ b/chromium/base/mac/mac_util.mm
@@ -20,6 +20,7 @@
#include "base/mac/scoped_cftyperef.h"
#include "base/mac/scoped_ioobject.h"
#include "base/mac/scoped_nsobject.h"
+#include "base/mac/sdk_forward_declarations.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
#include "base/strings/sys_string_conversions.h"
@@ -27,16 +28,6 @@
namespace base {
namespace mac {
-// Replicate specific 10.7 SDK declarations for building with prior SDKs.
-#if !defined(MAC_OS_X_VERSION_10_7) || \
- MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
-
-enum {
- NSApplicationPresentationFullScreen = 1 << 10
-};
-
-#endif // MAC_OS_X_VERSION_10_7
-
namespace {
// The current count of outstanding requests for full screen mode from browser
@@ -385,6 +376,30 @@ bool WasLaunchedAsLoginOrResumeItem() {
return result == YES;
}
+bool WasLaunchedAsLoginItemRestoreState() {
+ // "Reopen windows..." option was added for Lion. Prior OS versions should
+ // not have this behavior.
+ if (IsOSSnowLeopard() || !WasLaunchedAsLoginOrResumeItem())
+ return false;
+
+ CFStringRef app = CFSTR("com.apple.loginwindow");
+ CFStringRef save_state = CFSTR("TALLogoutSavesState");
+ ScopedCFTypeRef<CFPropertyListRef> plist(
+ CFPreferencesCopyAppValue(save_state, app));
+ // According to documentation, com.apple.loginwindow.plist does not exist on a
+ // fresh installation until the user changes a login window setting. The
+ // "reopen windows" option is checked by default, so the plist would exist had
+ // the user unchecked it.
+ // https://developer.apple.com/library/mac/documentation/macosx/conceptual/bpsystemstartup/chapters/CustomLogin.html
+ if (!plist)
+ return true;
+
+ if (CFBooleanRef restore_state = base::mac::CFCast<CFBooleanRef>(plist))
+ return CFBooleanGetValue(restore_state);
+
+ return false;
+}
+
bool WasLaunchedAsHiddenLoginItem() {
if (!WasLaunchedAsLoginOrResumeItem())
return false;
@@ -469,7 +484,7 @@ int MacOSXMinorVersionInternal() {
// immediate death.
CHECK(darwin_major_version >= 6);
int mac_os_x_minor_version = darwin_major_version - 4;
- DLOG_IF(WARNING, darwin_major_version > 13) << "Assuming Darwin "
+ DLOG_IF(WARNING, darwin_major_version > 14) << "Assuming Darwin "
<< base::IntToString(darwin_major_version) << " is Mac OS X 10."
<< base::IntToString(mac_os_x_minor_version);
@@ -488,6 +503,7 @@ enum {
LION_MINOR_VERSION = 7,
MOUNTAIN_LION_MINOR_VERSION = 8,
MAVERICKS_MINOR_VERSION = 9,
+ YOSEMITE_MINOR_VERSION = 10,
};
} // namespace
@@ -534,9 +550,21 @@ bool IsOSMavericksOrLater() {
}
#endif
-#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_9)
-bool IsOSLaterThanMavericks_DontCallThis() {
- return MacOSXMinorVersion() > MAVERICKS_MINOR_VERSION;
+#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_10)
+bool IsOSYosemite() {
+ return MacOSXMinorVersion() == YOSEMITE_MINOR_VERSION;
+}
+#endif
+
+#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_10)
+bool IsOSYosemiteOrLater() {
+ return MacOSXMinorVersion() >= YOSEMITE_MINOR_VERSION;
+}
+#endif
+
+#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_10)
+bool IsOSLaterThanYosemite_DontCallThis() {
+ return MacOSXMinorVersion() > YOSEMITE_MINOR_VERSION;
}
#endif
diff --git a/chromium/base/mac/mac_util_unittest.mm b/chromium/base/mac/mac_util_unittest.mm
index 1b56814abec..956036eaf1b 100644
--- a/chromium/base/mac/mac_util_unittest.mm
+++ b/chromium/base/mac/mac_util_unittest.mm
@@ -108,7 +108,7 @@ TEST_F(MacUtilTest, TestExcludeFileFromBackups) {
const char dummy_data[] = "All your base are belong to us!";
// Dump something real into the file.
ASSERT_EQ(static_cast<int>(arraysize(dummy_data)),
- file_util::WriteFile(dummy_file_path, dummy_data, arraysize(dummy_data)));
+ WriteFile(dummy_file_path, dummy_data, arraysize(dummy_data)));
NSString* fileURLString =
[NSString stringWithUTF8String:dummy_file_path.value().c_str()];
NSURL* fileURL = [NSURL URLWithString:fileURLString];
@@ -150,8 +150,11 @@ TEST_F(MacUtilTest, IsOSEllipsis) {
EXPECT_TRUE(IsOSMountainLionOrEarlier());
EXPECT_FALSE(IsOSMountainLionOrLater());
EXPECT_FALSE(IsOSMavericks());
+ EXPECT_TRUE(IsOSMavericksOrEarlier());
EXPECT_FALSE(IsOSMavericksOrLater());
- EXPECT_FALSE(IsOSLaterThanMavericks_DontCallThis());
+ EXPECT_FALSE(IsOSYosemite());
+ EXPECT_FALSE(IsOSYosemiteOrLater());
+ EXPECT_FALSE(IsOSLaterThanYosemite_DontCallThis());
} else if (minor == 7) {
EXPECT_FALSE(IsOSSnowLeopard());
EXPECT_TRUE(IsOSLion());
@@ -161,8 +164,11 @@ TEST_F(MacUtilTest, IsOSEllipsis) {
EXPECT_TRUE(IsOSMountainLionOrEarlier());
EXPECT_FALSE(IsOSMountainLionOrLater());
EXPECT_FALSE(IsOSMavericks());
+ EXPECT_TRUE(IsOSMavericksOrEarlier());
EXPECT_FALSE(IsOSMavericksOrLater());
- EXPECT_FALSE(IsOSLaterThanMavericks_DontCallThis());
+ EXPECT_FALSE(IsOSYosemite());
+ EXPECT_FALSE(IsOSYosemiteOrLater());
+ EXPECT_FALSE(IsOSLaterThanYosemite_DontCallThis());
} else if (minor == 8) {
EXPECT_FALSE(IsOSSnowLeopard());
EXPECT_FALSE(IsOSLion());
@@ -172,8 +178,11 @@ TEST_F(MacUtilTest, IsOSEllipsis) {
EXPECT_TRUE(IsOSMountainLionOrEarlier());
EXPECT_TRUE(IsOSMountainLionOrLater());
EXPECT_FALSE(IsOSMavericks());
+ EXPECT_TRUE(IsOSMavericksOrEarlier());
EXPECT_FALSE(IsOSMavericksOrLater());
- EXPECT_FALSE(IsOSLaterThanMavericks_DontCallThis());
+ EXPECT_FALSE(IsOSYosemite());
+ EXPECT_FALSE(IsOSYosemiteOrLater());
+ EXPECT_FALSE(IsOSLaterThanYosemite_DontCallThis());
} else if (minor == 9) {
EXPECT_FALSE(IsOSSnowLeopard());
EXPECT_FALSE(IsOSLion());
@@ -183,10 +192,27 @@ TEST_F(MacUtilTest, IsOSEllipsis) {
EXPECT_FALSE(IsOSMountainLionOrEarlier());
EXPECT_TRUE(IsOSMountainLionOrLater());
EXPECT_TRUE(IsOSMavericks());
+ EXPECT_TRUE(IsOSMavericksOrEarlier());
EXPECT_TRUE(IsOSMavericksOrLater());
- EXPECT_FALSE(IsOSLaterThanMavericks_DontCallThis());
+ EXPECT_FALSE(IsOSYosemite());
+ EXPECT_FALSE(IsOSYosemiteOrLater());
+ EXPECT_FALSE(IsOSLaterThanYosemite_DontCallThis());
+ } else if (minor == 10) {
+ EXPECT_FALSE(IsOSSnowLeopard());
+ EXPECT_FALSE(IsOSLion());
+ EXPECT_FALSE(IsOSLionOrEarlier());
+ EXPECT_TRUE(IsOSLionOrLater());
+ EXPECT_FALSE(IsOSMountainLion());
+ EXPECT_FALSE(IsOSMountainLionOrEarlier());
+ EXPECT_TRUE(IsOSMountainLionOrLater());
+ EXPECT_FALSE(IsOSMavericks());
+ EXPECT_FALSE(IsOSMavericksOrEarlier());
+ EXPECT_TRUE(IsOSMavericksOrLater());
+ EXPECT_TRUE(IsOSYosemite());
+ EXPECT_TRUE(IsOSYosemiteOrLater());
+ EXPECT_FALSE(IsOSLaterThanYosemite_DontCallThis());
} else {
- // Not five, six, seven, eight, or nine. Ah, ah, ah.
+ // Not six, seven, eight, nine, or ten. Ah, ah, ah.
EXPECT_TRUE(false);
}
} else {
diff --git a/chromium/base/mac/mach_logging.cc b/chromium/base/mac/mach_logging.cc
new file mode 100644
index 00000000000..c5ff85e662f
--- /dev/null
+++ b/chromium/base/mac/mach_logging.cc
@@ -0,0 +1,87 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/mac/mach_logging.h"
+
+#include <iomanip>
+#include <string>
+
+#include "base/strings/stringprintf.h"
+
+#if !defined(OS_IOS)
+#include <servers/bootstrap.h>
+#endif // !OS_IOS
+
+namespace {
+
+std::string FormatMachErrorNumber(mach_error_t mach_err) {
+ // For the os/kern subsystem, give the error number in decimal as in
+ // <mach/kern_return.h>. Otherwise, give it in hexadecimal to make it easier
+ // to visualize the various bits. See <mach/error.h>.
+ if (mach_err >= 0 && mach_err < KERN_RETURN_MAX) {
+ return base::StringPrintf(" (%d)", mach_err);
+ }
+ return base::StringPrintf(" (0x%08x)", mach_err);
+}
+
+} // namespace
+
+namespace logging {
+
+MachLogMessage::MachLogMessage(const char* file_path,
+ int line,
+ LogSeverity severity,
+ mach_error_t mach_err)
+ : LogMessage(file_path, line, severity),
+ mach_err_(mach_err) {
+}
+
+MachLogMessage::~MachLogMessage() {
+ stream() << ": "
+ << mach_error_string(mach_err_)
+ << FormatMachErrorNumber(mach_err_);
+}
+
+#if !defined(OS_IOS)
+
+BootstrapLogMessage::BootstrapLogMessage(const char* file_path,
+ int line,
+ LogSeverity severity,
+ kern_return_t bootstrap_err)
+ : LogMessage(file_path, line, severity),
+ bootstrap_err_(bootstrap_err) {
+}
+
+BootstrapLogMessage::~BootstrapLogMessage() {
+ stream() << ": "
+ << bootstrap_strerror(bootstrap_err_);
+
+ switch (bootstrap_err_) {
+ case BOOTSTRAP_SUCCESS:
+ case BOOTSTRAP_NOT_PRIVILEGED:
+ case BOOTSTRAP_NAME_IN_USE:
+ case BOOTSTRAP_UNKNOWN_SERVICE:
+ case BOOTSTRAP_SERVICE_ACTIVE:
+ case BOOTSTRAP_BAD_COUNT:
+ case BOOTSTRAP_NO_MEMORY:
+ case BOOTSTRAP_NO_CHILDREN: {
+ // Show known bootstrap errors in decimal because that's how they're
+ // defined in <servers/bootstrap.h>.
+ stream() << " (" << bootstrap_err_ << ")";
+ break;
+ }
+
+ default: {
+ // bootstrap_strerror passes unknown errors to mach_error_string, so
+ // format them as they would be if they were handled by
+ // MachErrorMessage.
+ stream() << FormatMachErrorNumber(bootstrap_err_);
+ break;
+ }
+ }
+}
+
+#endif // !OS_IOS
+
+} // namespace logging
diff --git a/chromium/base/mac/mach_logging.h b/chromium/base/mac/mach_logging.h
new file mode 100644
index 00000000000..a9b3b65d648
--- /dev/null
+++ b/chromium/base/mac/mach_logging.h
@@ -0,0 +1,167 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_MAC_MACH_LOGGING_H_
+#define BASE_MAC_MACH_LOGGING_H_
+
+#include <mach/mach.h>
+
+#include "base/base_export.h"
+#include "base/basictypes.h"
+#include "base/logging.h"
+#include "build/build_config.h"
+
+// Use the MACH_LOG family of macros along with a mach_error_t (kern_return_t)
+// containing a Mach error. The error value will be decoded so that logged
+// messages explain the error.
+//
+// Use the BOOTSTRAP_LOG family of macros specifically for errors that occur
+// while interoperating with the bootstrap subsystem. These errors will first
+// be looked up as bootstrap error messages. If no match is found, they will
+// be treated as generic Mach errors, as in MACH_LOG.
+//
+// Examples:
+//
+// kern_return_t kr = mach_timebase_info(&info);
+// if (kr != KERN_SUCCESS) {
+// MACH_LOG(ERROR, kr) << "mach_timebase_info";
+// }
+//
+// kr = vm_deallocate(task, address, size);
+// MACH_DCHECK(kr == KERN_SUCCESS, kr) << "vm_deallocate";
+
+namespace logging {
+
+class BASE_EXPORT MachLogMessage : public logging::LogMessage {
+ public:
+ MachLogMessage(const char* file_path,
+ int line,
+ LogSeverity severity,
+ mach_error_t mach_err);
+ ~MachLogMessage();
+
+ private:
+ mach_error_t mach_err_;
+
+ DISALLOW_COPY_AND_ASSIGN(MachLogMessage);
+};
+
+} // namespace logging
+
+#if defined(NDEBUG)
+#define MACH_DVLOG_IS_ON(verbose_level) 0
+#else
+#define MACH_DVLOG_IS_ON(verbose_level) VLOG_IS_ON(verbose_level)
+#endif
+
+#define MACH_LOG_STREAM(severity, mach_err) \
+ COMPACT_GOOGLE_LOG_EX_ ## severity(MachLogMessage, mach_err).stream()
+#define MACH_VLOG_STREAM(verbose_level, mach_err) \
+ logging::MachLogMessage(__FILE__, __LINE__, \
+ -verbose_level, mach_err).stream()
+
+#define MACH_LOG(severity, mach_err) \
+ LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), LOG_IS_ON(severity))
+#define MACH_LOG_IF(severity, condition, mach_err) \
+ LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), \
+ LOG_IS_ON(severity) && (condition))
+
+#define MACH_VLOG(verbose_level, mach_err) \
+ LAZY_STREAM(MACH_VLOG_STREAM(verbose_level, mach_err), \
+ VLOG_IS_ON(verbose_level))
+#define MACH_VLOG_IF(verbose_level, condition, mach_err) \
+ LAZY_STREAM(MACH_VLOG_STREAM(verbose_level, mach_err), \
+ VLOG_IS_ON(verbose_level) && (condition))
+
+#define MACH_CHECK(condition, mach_err) \
+ LAZY_STREAM(MACH_LOG_STREAM(FATAL, mach_err), !(condition)) \
+ << "Check failed: " # condition << ". "
+
+#define MACH_DLOG(severity, mach_err) \
+ LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), DLOG_IS_ON(severity))
+#define MACH_DLOG_IF(severity, condition, mach_err) \
+ LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), \
+ DLOG_IS_ON(severity) && (condition))
+
+#define MACH_DVLOG(verbose_level, mach_err) \
+ LAZY_STREAM(MACH_VLOG_STREAM(verbose_level, mach_err), \
+ MACH_DVLOG_IS_ON(verbose_level))
+#define MACH_DVLOG_IF(verbose_level, condition, mach_err) \
+ LAZY_STREAM(MACH_VLOG_STREAM(verbose_level, mach_err), \
+ MACH_DVLOG_IS_ON(verbose_level) && (condition))
+
+#define MACH_DCHECK(condition, mach_err) \
+ LAZY_STREAM(MACH_LOG_STREAM(FATAL, mach_err), \
+ DCHECK_IS_ON && !(condition)) \
+ << "Check failed: " # condition << ". "
+
+#if !defined(OS_IOS)
+
+namespace logging {
+
+class BASE_EXPORT BootstrapLogMessage : public logging::LogMessage {
+ public:
+ BootstrapLogMessage(const char* file_path,
+ int line,
+ LogSeverity severity,
+ kern_return_t bootstrap_err);
+ ~BootstrapLogMessage();
+
+ private:
+ kern_return_t bootstrap_err_;
+
+ DISALLOW_COPY_AND_ASSIGN(BootstrapLogMessage);
+};
+
+} // namespace logging
+
+#define BOOTSTRAP_DVLOG_IS_ON MACH_DVLOG_IS_ON
+
+#define BOOTSTRAP_LOG_STREAM(severity, bootstrap_err) \
+ COMPACT_GOOGLE_LOG_EX_ ## severity(BootstrapLogMessage, \
+ bootstrap_err).stream()
+#define BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err) \
+ logging::BootstrapLogMessage(__FILE__, __LINE__, \
+ -verbose_level, bootstrap_err).stream()
+
+#define BOOTSTRAP_LOG(severity, bootstrap_err) \
+ LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, \
+ bootstrap_err), LOG_IS_ON(severity))
+#define BOOTSTRAP_LOG_IF(severity, condition, bootstrap_err) \
+ LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err), \
+ LOG_IS_ON(severity) && (condition))
+
+#define BOOTSTRAP_VLOG(verbose_level, bootstrap_err) \
+ LAZY_STREAM(BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err), \
+ VLOG_IS_ON(verbose_level))
+#define BOOTSTRAP_VLOG_IF(verbose_level, condition, bootstrap_err) \
+ LAZY_STREAM(BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err), \
+ VLOG_IS_ON(verbose_level) && (condition))
+
+#define BOOTSTRAP_CHECK(condition, bootstrap_err) \
+ LAZY_STREAM(BOOTSTRAP_LOG_STREAM(FATAL, bootstrap_err), !(condition)) \
+ << "Check failed: " # condition << ". "
+
+#define BOOTSTRAP_DLOG(severity, bootstrap_err) \
+ LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err), \
+ DLOG_IS_ON(severity))
+#define BOOTSTRAP_DLOG_IF(severity, condition, bootstrap_err) \
+ LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err), \
+ DLOG_IS_ON(severity) && (condition))
+
+#define BOOTSTRAP_DVLOG(verbose_level, bootstrap_err) \
+ LAZY_STREAM(BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err), \
+ BOOTSTRAP_DVLOG_IS_ON(verbose_level))
+#define BOOTSTRAP_DVLOG_IF(verbose_level, condition, bootstrap_err) \
+ LAZY_STREAM(BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err), \
+ BOOTSTRAP_DVLOG_IS_ON(verbose_level) && (condition))
+
+#define BOOTSTRAP_DCHECK(condition, bootstrap_err) \
+ LAZY_STREAM(BOOTSTRAP_LOG_STREAM(FATAL, bootstrap_err), \
+ DCHECK_IS_ON && !(condition)) \
+ << "Check failed: " # condition << ". "
+
+#endif // !OS_IOS
+
+#endif // BASE_MAC_MACH_LOGGING_H_
diff --git a/chromium/base/mac/os_crash_dumps.cc b/chromium/base/mac/os_crash_dumps.cc
index e6b0996ac6d..5d65b469ddd 100644
--- a/chromium/base/mac/os_crash_dumps.cc
+++ b/chromium/base/mac/os_crash_dumps.cc
@@ -30,11 +30,14 @@ void DisableOSCrashDumps() {
// bsd/uxkern/ux_exception.c and machine_exception() in xnu's
// bsd/dev/*/unix_signal.c.
const int signals_to_intercept[] = {
+ // Hardware faults
SIGILL, // EXC_BAD_INSTRUCTION
SIGTRAP, // EXC_BREAKPOINT
SIGFPE, // EXC_ARITHMETIC
SIGBUS, // EXC_BAD_ACCESS
- SIGSEGV // EXC_BAD_ACCESS
+ SIGSEGV, // EXC_BAD_ACCESS
+ // Not a hardware fault
+ SIGABRT
};
// For all these signals, just wire things up so we exit immediately.
@@ -47,9 +50,9 @@ void DisableOSCrashDumps() {
act.sa_flags = SA_ONSTACK;
if (sigemptyset(&act.sa_mask) != 0)
- DLOG_ERRNO(FATAL) << "sigemptyset() failed";
+ DPLOG(FATAL) << "sigemptyset() failed";
if (sigaction(signals_to_intercept[i], &act, NULL) != 0)
- DLOG_ERRNO(FATAL) << "sigaction() failed";
+ DPLOG(FATAL) << "sigaction() failed";
}
}
diff --git a/chromium/base/mac/scoped_cftyperef.h b/chromium/base/mac/scoped_cftyperef.h
index c41de80d805..8567f85ffcd 100644
--- a/chromium/base/mac/scoped_cftyperef.h
+++ b/chromium/base/mac/scoped_cftyperef.h
@@ -7,9 +7,7 @@
#include <CoreFoundation/CoreFoundation.h>
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_policy.h"
+#include "base/mac/scoped_typeref.h"
namespace base {
@@ -27,78 +25,33 @@ namespace base {
// then ScopedCFTypeRef<> will call CFRetain() on the object, and the initial
// ownership is not changed.
+namespace internal {
+
+struct ScopedCFTypeRefTraits {
+ static void Retain(CFTypeRef object) {
+ CFRetain(object);
+ }
+ static void Release(CFTypeRef object) {
+ CFRelease(object);
+ }
+};
+
+} // namespace internal
+
template<typename CFT>
-class ScopedCFTypeRef {
+class ScopedCFTypeRef
+ : public ScopedTypeRef<CFT, internal::ScopedCFTypeRefTraits> {
public:
typedef CFT element_type;
explicit ScopedCFTypeRef(
CFT object = NULL,
base::scoped_policy::OwnershipPolicy policy = base::scoped_policy::ASSUME)
- : object_(object) {
- if (object_ && policy == base::scoped_policy::RETAIN)
- CFRetain(object_);
- }
+ : ScopedTypeRef<CFT,
+ internal::ScopedCFTypeRefTraits>(object, policy) {}
ScopedCFTypeRef(const ScopedCFTypeRef<CFT>& that)
- : object_(that.object_) {
- if (object_)
- CFRetain(object_);
- }
-
- ~ScopedCFTypeRef() {
- if (object_)
- CFRelease(object_);
- }
-
- ScopedCFTypeRef& operator=(const ScopedCFTypeRef<CFT>& that) {
- reset(that.get(), base::scoped_policy::RETAIN);
- return *this;
- }
-
- void reset(CFT object = NULL,
- base::scoped_policy::OwnershipPolicy policy =
- base::scoped_policy::ASSUME) {
- if (object && policy == base::scoped_policy::RETAIN)
- CFRetain(object);
- if (object_)
- CFRelease(object_);
- object_ = object;
- }
-
- bool operator==(CFT that) const {
- return object_ == that;
- }
-
- bool operator!=(CFT that) const {
- return object_ != that;
- }
-
- operator CFT() const {
- return object_;
- }
-
- CFT get() const {
- return object_;
- }
-
- void swap(ScopedCFTypeRef& that) {
- CFT temp = that.object_;
- that.object_ = object_;
- object_ = temp;
- }
-
- // ScopedCFTypeRef<>::release() is like scoped_ptr<>::release. It is NOT
- // a wrapper for CFRelease(). To force a ScopedCFTypeRef<> object to call
- // CFRelease(), use ScopedCFTypeRef<>::reset().
- CFT release() WARN_UNUSED_RESULT {
- CFT temp = object_;
- object_ = NULL;
- return temp;
- }
-
- private:
- CFT object_;
+ : ScopedTypeRef<CFT, internal::ScopedCFTypeRefTraits>(that) {}
};
} // namespace base
diff --git a/chromium/base/mac/scoped_mach_port.cc b/chromium/base/mac/scoped_mach_port.cc
index 9e45a856a8c..de94602e36e 100644
--- a/chromium/base/mac/scoped_mach_port.cc
+++ b/chromium/base/mac/scoped_mach_port.cc
@@ -4,22 +4,27 @@
#include "base/mac/scoped_mach_port.h"
+#include "base/mac/mach_logging.h"
+
namespace base {
namespace mac {
+namespace internal {
-ScopedMachPort::ScopedMachPort(mach_port_t port) : port_(port) {
-}
-
-ScopedMachPort::~ScopedMachPort() {
- reset();
+// static
+void SendRightTraits::Free(mach_port_t port) {
+ kern_return_t kr = mach_port_deallocate(mach_task_self(), port);
+ MACH_LOG_IF(ERROR, kr != KERN_SUCCESS, kr)
+ << "ScopedMachSendRight mach_port_deallocate";
}
-void ScopedMachPort::reset(mach_port_t port) {
- if (port_ != MACH_PORT_NULL) {
- mach_port_deallocate(mach_task_self(), port_);
- }
- port_ = port;
+// static
+void ReceiveRightTraits::Free(mach_port_t port) {
+ kern_return_t kr =
+ mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_RECEIVE, -1);
+ MACH_LOG_IF(ERROR, kr != KERN_SUCCESS, kr)
+ << "ScopedMachReceiveRight mach_port_mod_refs";
}
+} // namespace internal
} // namespace mac
} // namespace base
diff --git a/chromium/base/mac/scoped_mach_port.h b/chromium/base/mac/scoped_mach_port.h
index cc2ef20fe76..36087c9bdec 100644
--- a/chromium/base/mac/scoped_mach_port.h
+++ b/chromium/base/mac/scoped_mach_port.h
@@ -7,35 +7,56 @@
#include <mach/mach.h>
-#include "base/basictypes.h"
#include "base/base_export.h"
+#include "base/scoped_generic.h"
namespace base {
namespace mac {
-// A class for managing the life of a Mach port, releasing via
-// mach_port_deallocate either its send and/or receive rights.
-class BASE_EXPORT ScopedMachPort {
- public:
- // Creates a scoper by taking ownership of the port.
- explicit ScopedMachPort(mach_port_t port);
+namespace internal {
- ~ScopedMachPort();
+struct BASE_EXPORT SendRightTraits {
+ static mach_port_t InvalidValue() {
+ return MACH_PORT_NULL;
+ }
- void reset(mach_port_t port = MACH_PORT_NULL);
+ static void Free(mach_port_t port);
+};
- operator mach_port_t() const {
- return port_;
+struct BASE_EXPORT ReceiveRightTraits {
+ static mach_port_t InvalidValue() {
+ return MACH_PORT_NULL;
}
- mach_port_t get() const {
- return port_;
- }
+ static void Free(mach_port_t port);
+};
+
+} // namespace internal
- private:
- mach_port_t port_;
+// A scoper for handling a Mach port that names a send right. Send rights are
+// reference counted, and this takes ownership of the right on construction
+// and then removes a reference to the right on destruction. If the reference
+// is the last one on the right, the right is deallocated.
+class BASE_EXPORT ScopedMachSendRight :
+ public base::ScopedGeneric<mach_port_t, internal::SendRightTraits> {
+ public:
+ explicit ScopedMachSendRight(mach_port_t port = traits_type::InvalidValue())
+ : ScopedGeneric(port) {}
+
+ operator mach_port_t() const { return get(); }
+};
+
+// A scoper for handling a Mach port's receive right. There is only one
+// receive right per port. This takes ownership of the receive right on
+// construction and then destroys the right on destruction, turning all
+// outstanding send rights into dead names.
+class BASE_EXPORT ScopedMachReceiveRight :
+ public base::ScopedGeneric<mach_port_t, internal::ReceiveRightTraits> {
+ public:
+ explicit ScopedMachReceiveRight(
+ mach_port_t port = traits_type::InvalidValue()) : ScopedGeneric(port) {}
- DISALLOW_COPY_AND_ASSIGN(ScopedMachPort);
+ operator mach_port_t() const { return get(); }
};
} // namespace mac
diff --git a/chromium/base/mac/scoped_mach_vm.cc b/chromium/base/mac/scoped_mach_vm.cc
new file mode 100644
index 00000000000..1c28d9c7c42
--- /dev/null
+++ b/chromium/base/mac/scoped_mach_vm.cc
@@ -0,0 +1,33 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/mac/scoped_mach_vm.h"
+
+namespace base {
+namespace mac {
+
+void ScopedMachVM::reset(vm_address_t address, vm_size_t size) {
+ DCHECK(address % PAGE_SIZE == 0);
+ DCHECK(size % PAGE_SIZE == 0);
+
+ if (size_) {
+ if (address_ < address) {
+ vm_deallocate(mach_task_self(),
+ address_,
+ std::min(size_, address - address_));
+ }
+ if (address_ + size_ > address + size) {
+ vm_address_t deallocate_start = std::max(address_, address + size);
+ vm_deallocate(mach_task_self(),
+ deallocate_start,
+ address_ + size_ - deallocate_start);
+ }
+ }
+
+ address_ = address;
+ size_ = size;
+}
+
+} // namespace mac
+} // namespace base
diff --git a/chromium/base/mac/scoped_mach_vm.h b/chromium/base/mac/scoped_mach_vm.h
new file mode 100644
index 00000000000..b130a79fb63
--- /dev/null
+++ b/chromium/base/mac/scoped_mach_vm.h
@@ -0,0 +1,93 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_MAC_SCOPED_MACH_VM_H_
+#define BASE_MAC_SCOPED_MACH_VM_H_
+
+#include <mach/mach.h>
+
+#include <algorithm>
+
+#include "base/base_export.h"
+#include "base/basictypes.h"
+#include "base/logging.h"
+
+// Use ScopedMachVM to supervise ownership of pages in the current process
+// through the Mach VM subsystem. Pages allocated with vm_allocate can be
+// released when exiting a scope with ScopedMachVM.
+//
+// The Mach VM subsystem operates on a page-by-page basis, and a single VM
+// allocation managed by a ScopedMachVM object may span multiple pages. As far
+// as Mach is concerned, allocated pages may be deallocated individually. This
+// is in contrast to higher-level allocators such as malloc, where the base
+// address of an allocation implies the size of an allocated block.
+// Consequently, it is not sufficient to just pass the base address of an
+// allocation to ScopedMachVM, it also needs to know the size of the
+// allocation. To avoid any confusion, both the base address and size must
+// be page-aligned.
+//
+// When dealing with Mach VM, base addresses will naturally be page-aligned,
+// but user-specified sizes may not be. If there's a concern that a size is
+// not page-aligned, use the mach_vm_round_page macro to correct it.
+//
+// Example:
+//
+// vm_address_t address = 0;
+// vm_size_t size = 12345; // This requested size is not page-aligned.
+// kern_return_t kr =
+// vm_allocate(mach_task_self(), &address, size, VM_FLAGS_ANYWHERE);
+// if (kr != KERN_SUCCESS) {
+// return false;
+// }
+// ScopedMachVM vm_owner(address, mach_vm_round_page(size));
+
+namespace base {
+namespace mac {
+
+class BASE_EXPORT ScopedMachVM {
+ public:
+ explicit ScopedMachVM(vm_address_t address = 0, vm_size_t size = 0)
+ : address_(address),
+ size_(size) {
+ DCHECK(address % PAGE_SIZE == 0);
+ DCHECK(size % PAGE_SIZE == 0);
+ }
+
+ ~ScopedMachVM() {
+ if (size_) {
+ vm_deallocate(mach_task_self(), address_, size_);
+ }
+ }
+
+ void reset(vm_address_t address = 0, vm_size_t size = 0);
+
+ vm_address_t address() const {
+ return address_;
+ }
+
+ vm_size_t size() const {
+ return size_;
+ }
+
+ void swap(ScopedMachVM& that) {
+ std::swap(address_, that.address_);
+ std::swap(size_, that.size_);
+ }
+
+ void release() {
+ address_ = 0;
+ size_ = 0;
+ }
+
+ private:
+ vm_address_t address_;
+ vm_size_t size_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedMachVM);
+};
+
+} // namespace mac
+} // namespace base
+
+#endif // BASE_MAC_SCOPED_MACH_VM_H_
diff --git a/chromium/base/mac/scoped_typeref.h b/chromium/base/mac/scoped_typeref.h
new file mode 100644
index 00000000000..61ee3119817
--- /dev/null
+++ b/chromium/base/mac/scoped_typeref.h
@@ -0,0 +1,132 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_MAC_SCOPED_TYPEREF_H_
+#define BASE_MAC_SCOPED_TYPEREF_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "base/logging.h"
+#include "base/memory/scoped_policy.h"
+
+namespace base {
+
+// ScopedTypeRef<> is patterned after scoped_ptr<>, but maintains a ownership
+// of a reference to any type that is maintained by Retain and Release methods.
+//
+// The Traits structure must provide the Retain and Release methods for type T.
+// A default ScopedTypeRefTraits is used but not defined, and should be defined
+// for each type to use this interface. For example, an appropriate definition
+// of ScopedTypeRefTraits for CGLContextObj would be:
+//
+// template<>
+// struct ScopedTypeRefTraits<CGLContextObj> {
+// void Retain(CGLContextObj object) { CGLContextRetain(object); }
+// void Release(CGLContextObj object) { CGLContextRelease(object); }
+// };
+//
+// For the many types that have pass-by-pointer create functions, the function
+// InitializeInto() is provided to allow direct initialization and assumption
+// of ownership of the object. For example, continuing to use the above
+// CGLContextObj specialization:
+//
+// base::ScopedTypeRef<CGLContextObj> context;
+// CGLCreateContext(pixel_format, share_group, context.InitializeInto());
+//
+// For initialization with an existing object, the caller may specify whether
+// the ScopedTypeRef<> being initialized is assuming the caller's existing
+// ownership of the object (and should not call Retain in initialization) or if
+// it should not assume this ownership and must create its own (by calling
+// Retain in initialization). This behavior is based on the |policy| parameter,
+// with |ASSUME| for the former and |RETAIN| for the latter. The default policy
+// is to |ASSUME|.
+
+template<typename T>
+struct ScopedTypeRefTraits;
+
+template<typename T, typename Traits = ScopedTypeRefTraits<T>>
+class ScopedTypeRef {
+ public:
+ typedef T element_type;
+
+ ScopedTypeRef(
+ T object = NULL,
+ base::scoped_policy::OwnershipPolicy policy = base::scoped_policy::ASSUME)
+ : object_(object) {
+ if (object_ && policy == base::scoped_policy::RETAIN)
+ Traits::Retain(object_);
+ }
+
+ ScopedTypeRef(const ScopedTypeRef<T, Traits>& that)
+ : object_(that.object_) {
+ if (object_)
+ Traits::Retain(object_);
+ }
+
+ ~ScopedTypeRef() {
+ if (object_)
+ Traits::Release(object_);
+ }
+
+ ScopedTypeRef& operator=(const ScopedTypeRef<T, Traits>& that) {
+ reset(that.get(), base::scoped_policy::RETAIN);
+ return *this;
+ }
+
+ // This is to be used only to take ownership of objects that are created
+ // by pass-by-pointer create functions. To enforce this, require that the
+ // object be reset to NULL before this may be used.
+ T* InitializeInto() WARN_UNUSED_RESULT {
+ DCHECK(!object_);
+ return &object_;
+ }
+
+ void reset(T object = NULL,
+ base::scoped_policy::OwnershipPolicy policy =
+ base::scoped_policy::ASSUME) {
+ if (object && policy == base::scoped_policy::RETAIN)
+ Traits::Retain(object);
+ if (object_)
+ Traits::Release(object_);
+ object_ = object;
+ }
+
+ bool operator==(T that) const {
+ return object_ == that;
+ }
+
+ bool operator!=(T that) const {
+ return object_ != that;
+ }
+
+ operator T() const {
+ return object_;
+ }
+
+ T get() const {
+ return object_;
+ }
+
+ void swap(ScopedTypeRef& that) {
+ T temp = that.object_;
+ that.object_ = object_;
+ object_ = temp;
+ }
+
+ // ScopedTypeRef<>::release() is like scoped_ptr<>::release. It is NOT
+ // a wrapper for Release(). To force a ScopedTypeRef<> object to call
+ // Release(), use ScopedTypeRef<>::reset().
+ T release() WARN_UNUSED_RESULT {
+ T temp = object_;
+ object_ = NULL;
+ return temp;
+ }
+
+ private:
+ T object_;
+};
+
+} // namespace base
+
+#endif // BASE_MAC_SCOPED_TYPEREF_H_
diff --git a/chromium/base/mac/sdk_forward_declarations.h b/chromium/base/mac/sdk_forward_declarations.h
index bbaf962b639..3a0878daef6 100644
--- a/chromium/base/mac/sdk_forward_declarations.h
+++ b/chromium/base/mac/sdk_forward_declarations.h
@@ -12,21 +12,39 @@
#define BASE_MAC_SDK_FORWARD_DECLARATIONS_H_
#import <AppKit/AppKit.h>
+#import <CoreWLAN/CoreWLAN.h>
+#import <ImageCaptureCore/ImageCaptureCore.h>
+#import <IOBluetooth/IOBluetooth.h>
+
+#include "base/base_export.h"
#if !defined(MAC_OS_X_VERSION_10_7) || \
MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
+
enum {
NSEventPhaseNone = 0, // event not associated with a phase.
NSEventPhaseBegan = 0x1 << 0,
NSEventPhaseStationary = 0x1 << 1,
NSEventPhaseChanged = 0x1 << 2,
NSEventPhaseEnded = 0x1 << 3,
- NSEventPhaseCancelled = 0x1 << 4,
- NSEventPhaseMayBegin = 0x1 << 5
+ NSEventPhaseCancelled = 0x1 << 4
};
typedef NSUInteger NSEventPhase;
enum {
+ NSFullScreenWindowMask = 1 << 14,
+};
+
+enum {
+ NSApplicationPresentationFullScreen = 1 << 10,
+};
+
+enum {
+ NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7,
+ NSWindowCollectionBehaviorFullScreenAuxiliary = 1 << 8,
+};
+
+enum {
NSEventSwipeTrackingLockDirection = 0x1 << 0,
NSEventSwipeTrackingClampGestureAmount = 0x1 << 1,
};
@@ -41,6 +59,12 @@ enum {
};
typedef NSInteger NSWindowAnimationBehavior;
+enum {
+ NSWindowDocumentVersionsButton = 6,
+ NSWindowFullScreenButton,
+};
+typedef NSUInteger NSWindowButton;
+
@interface NSEvent (LionSDK)
+ (BOOL)isSwipeTrackingFromScrollEventsEnabled;
@@ -60,7 +84,11 @@ typedef NSInteger NSWindowAnimationBehavior;
@end
-@interface CALayer (LionAPI)
+@interface NSApplication (LionSDK)
+- (void)disableRelaunchOnLogin;
+@end
+
+@interface CALayer (LionSDK)
- (CGFloat)contentsScale;
- (void)setContentsScale:(CGFloat)contentsScale;
@end
@@ -74,7 +102,167 @@ typedef NSInteger NSWindowAnimationBehavior;
- (CGFloat)backingScaleFactor;
- (NSWindowAnimationBehavior)animationBehavior;
- (void)setAnimationBehavior:(NSWindowAnimationBehavior)newAnimationBehavior;
+- (void)toggleFullScreen:(id)sender;
+- (void)setRestorable:(BOOL)flag;
+@end
+
+@interface NSCursor (LionSDKDeclarations)
++ (NSCursor*)IBeamCursorForVerticalLayout;
+@end
+
+@interface NSAnimationContext (LionSDK)
++ (void)runAnimationGroup:(void (^)(NSAnimationContext *context))changes
+ completionHandler:(void (^)(void))completionHandler;
+@property(copy) void(^completionHandler)(void);
+@end
+
+@interface NSView (LionSDK)
+- (NSSize)convertSizeFromBacking:(NSSize)size;
+- (void)setWantsBestResolutionOpenGLSurface:(BOOL)flag;
+@end
+
+@interface NSObject (ICCameraDeviceDelegateLionSDK)
+- (void)deviceDidBecomeReadyWithCompleteContentCatalog:(ICDevice*)device;
+- (void)didDownloadFile:(ICCameraFile*)file
+ error:(NSError*)error
+ options:(NSDictionary*)options
+ contextInfo:(void*)contextInfo;
+@end
+
+@interface NSScroller (LionSDK)
++ (NSInteger)preferredScrollerStyle;
+@end
+
+@interface CWInterface (LionSDK)
+- (BOOL)associateToNetwork:(CWNetwork*)network
+ password:(NSString*)password
+ error:(NSError**)error;
+- (NSSet*)scanForNetworksWithName:(NSString*)networkName
+ error:(NSError**)error;
+@end
+
+enum CWChannelBand {
+ kCWChannelBandUnknown = 0,
+ kCWChannelBand2GHz = 1,
+ kCWChannelBand5GHz = 2,
+};
+
+@interface CWChannel : NSObject
+@property(readonly) CWChannelBand channelBand;
+@end
+
+@interface CWNetwork (LionSDK)
+@property(readonly) CWChannel* wlanChannel;
+@end
+
+@interface IOBluetoothHostController (LionSDK)
+- (NSString*)nameAsString;
+- (BluetoothHCIPowerState)powerState;
+@end
+
+@protocol IOBluetoothDeviceInquiryDelegate
+- (void)deviceInquiryStarted:(IOBluetoothDeviceInquiry*)sender;
+- (void)deviceInquiryDeviceFound:(IOBluetoothDeviceInquiry*)sender
+ device:(IOBluetoothDevice*)device;
+- (void)deviceInquiryComplete:(IOBluetoothDeviceInquiry*)sender
+ error:(IOReturn)error
+ aborted:(BOOL)aborted;
+@end
+
+@interface IOBluetoothL2CAPChannel (LionSDK)
+@property(readonly) BluetoothL2CAPMTU outgoingMTU;
@end
+
+@interface IOBluetoothDevice (LionSDK)
+- (NSString*)addressString;
+- (unsigned int)classOfDevice;
+- (BluetoothConnectionHandle)connectionHandle;
+- (BluetoothHCIRSSIValue)rawRSSI;
+- (NSArray*)services;
+- (IOReturn)performSDPQuery:(id)target uuids:(NSArray*)uuids;
+@end
+
+BASE_EXPORT extern "C" NSString* const NSWindowWillEnterFullScreenNotification;
+
#endif // MAC_OS_X_VERSION_10_7
+#if !defined(MAC_OS_X_VERSION_10_8) || \
+ MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8
+
+enum {
+ NSEventPhaseMayBegin = 0x1 << 5
+};
+
+#endif // MAC_OS_X_VERSION_10_8
+
+
+#if !defined(MAC_OS_X_VERSION_10_9) || \
+ MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_9
+
+// NSProgress is public API in 10.9, but a version of it exists and is usable
+// in 10.8.
+
+@interface NSProgress : NSObject
+
+- (instancetype)initWithParent:(NSProgress*)parentProgressOrNil
+ userInfo:(NSDictionary*)userInfoOrNil;
+@property (copy) NSString* kind;
+
+@property int64_t totalUnitCount;
+@property int64_t completedUnitCount;
+
+@property (getter=isCancellable) BOOL cancellable;
+@property (getter=isPausable) BOOL pausable;
+@property (readonly, getter=isCancelled) BOOL cancelled;
+@property (readonly, getter=isPaused) BOOL paused;
+@property (copy) void (^cancellationHandler)(void);
+@property (copy) void (^pausingHandler)(void);
+- (void)cancel;
+- (void)pause;
+
+- (void)setUserInfoObject:(id)objectOrNil forKey:(NSString*)key;
+- (NSDictionary*)userInfo;
+
+@property (readonly, getter=isIndeterminate) BOOL indeterminate;
+@property (readonly) double fractionCompleted;
+
+- (void)publish;
+- (void)unpublish;
+
+@end
+
+@interface NSView (MavericksSDK)
+- (void)setCanDrawSubviewsIntoLayer:(BOOL)flag;
+@end
+
+enum {
+ NSWindowOcclusionStateVisible = 1UL << 1,
+};
+typedef NSUInteger NSWindowOcclusionState;
+
+@interface NSWindow (MavericksSDK)
+- (NSWindowOcclusionState)occlusionState;
+@end
+
+#endif // MAC_OS_X_VERSION_10_9
+
+
+#if !defined(MAC_OS_X_VERSION_10_10) || \
+ MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10
+
+enum {
+ NSWindowTitleVisible = 0,
+ NSWindowTitleHidden = 1,
+ NSWindowTitleHiddenWhenActive = 2,
+};
+typedef NSInteger NSWindowTitleVisibility;
+
+@interface NSWindow (YosemiteSDK)
+
+@property NSWindowTitleVisibility titleVisibility;
+
+@end
+
+#endif // MAC_OS_X_VERSION_10_10
+
#endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_
diff --git a/chromium/base/mac/sdk_forward_declarations.mm b/chromium/base/mac/sdk_forward_declarations.mm
new file mode 100644
index 00000000000..a402a417d85
--- /dev/null
+++ b/chromium/base/mac/sdk_forward_declarations.mm
@@ -0,0 +1,14 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/mac/sdk_forward_declarations.h"
+
+// Replicate specific 10.7 SDK declarations for building with prior SDKs.
+#if !defined(MAC_OS_X_VERSION_10_7) || \
+ MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
+
+NSString* const NSWindowWillEnterFullScreenNotification =
+ @"NSWindowWillEnterFullScreenNotification";
+
+#endif // MAC_OS_X_VERSION_10_7
diff --git a/chromium/base/macros.h b/chromium/base/macros.h
new file mode 100644
index 00000000000..781751569d7
--- /dev/null
+++ b/chromium/base/macros.h
@@ -0,0 +1,313 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file contains macros and macro-like constructs (e.g., templates) that
+// are commonly used throughout Chromium source. (It may also contain things
+// that are closely related to things that are commonly used that belong in this
+// file.)
+
+#ifndef BASE_MACROS_H_
+#define BASE_MACROS_H_
+
+#include <stddef.h> // For size_t.
+#include <string.h> // For memcpy.
+
+#include "base/compiler_specific.h" // For ALLOW_UNUSED.
+
+// Put this in the private: declarations for a class to be uncopyable.
+#define DISALLOW_COPY(TypeName) \
+ TypeName(const TypeName&)
+
+// Put this in the private: declarations for a class to be unassignable.
+#define DISALLOW_ASSIGN(TypeName) \
+ void operator=(const TypeName&)
+
+// A macro to disallow the copy constructor and operator= functions
+// This should be used in the private: declarations for a class
+#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
+ TypeName(const TypeName&); \
+ void operator=(const TypeName&)
+
+// An older, deprecated, politically incorrect name for the above.
+// NOTE: The usage of this macro was banned from our code base, but some
+// third_party libraries are yet using it.
+// TODO(tfarina): Figure out how to fix the usage of this macro in the
+// third_party libraries and get rid of it.
+#define DISALLOW_EVIL_CONSTRUCTORS(TypeName) DISALLOW_COPY_AND_ASSIGN(TypeName)
+
+// A macro to disallow all the implicit constructors, namely the
+// default constructor, copy constructor and operator= functions.
+//
+// This should be used in the private: declarations for a class
+// that wants to prevent anyone from instantiating it. This is
+// especially useful for classes containing only static methods.
+#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
+ TypeName(); \
+ DISALLOW_COPY_AND_ASSIGN(TypeName)
+
+// The arraysize(arr) macro returns the # of elements in an array arr.
+// The expression is a compile-time constant, and therefore can be
+// used in defining new arrays, for example. If you use arraysize on
+// a pointer by mistake, you will get a compile-time error.
+//
+// One caveat is that arraysize() doesn't accept any array of an
+// anonymous type or a type defined inside a function. In these rare
+// cases, you have to use the unsafe ARRAYSIZE_UNSAFE() macro below. This is
+// due to a limitation in C++'s template system. The limitation might
+// eventually be removed, but it hasn't happened yet.
+
+// This template function declaration is used in defining arraysize.
+// Note that the function doesn't need an implementation, as we only
+// use its type.
+template <typename T, size_t N>
+char (&ArraySizeHelper(T (&array)[N]))[N];
+
+// That gcc wants both of these prototypes seems mysterious. VC, for
+// its part, can't decide which to use (another mystery). Matching of
+// template overloads: the final frontier.
+#ifndef _MSC_VER
+template <typename T, size_t N>
+char (&ArraySizeHelper(const T (&array)[N]))[N];
+#endif
+
+#define arraysize(array) (sizeof(ArraySizeHelper(array)))
+
+// ARRAYSIZE_UNSAFE performs essentially the same calculation as arraysize,
+// but can be used on anonymous types or types defined inside
+// functions. It's less safe than arraysize as it accepts some
+// (although not all) pointers. Therefore, you should use arraysize
+// whenever possible.
+//
+// The expression ARRAYSIZE_UNSAFE(a) is a compile-time constant of type
+// size_t.
+//
+// ARRAYSIZE_UNSAFE catches a few type errors. If you see a compiler error
+//
+// "warning: division by zero in ..."
+//
+// when using ARRAYSIZE_UNSAFE, you are (wrongfully) giving it a pointer.
+// You should only use ARRAYSIZE_UNSAFE on statically allocated arrays.
+//
+// The following comments are on the implementation details, and can
+// be ignored by the users.
+//
+// ARRAYSIZE_UNSAFE(arr) works by inspecting sizeof(arr) (the # of bytes in
+// the array) and sizeof(*(arr)) (the # of bytes in one array
+// element). If the former is divisible by the latter, perhaps arr is
+// indeed an array, in which case the division result is the # of
+// elements in the array. Otherwise, arr cannot possibly be an array,
+// and we generate a compiler error to prevent the code from
+// compiling.
+//
+// Since the size of bool is implementation-defined, we need to cast
+// !(sizeof(a) & sizeof(*(a))) to size_t in order to ensure the final
+// result has type size_t.
+//
+// This macro is not perfect as it wrongfully accepts certain
+// pointers, namely where the pointer size is divisible by the pointee
+// size. Since all our code has to go through a 32-bit compiler,
+// where a pointer is 4 bytes, this means all pointers to a type whose
+// size is 3 or greater than 4 will be (righteously) rejected.
+
+#define ARRAYSIZE_UNSAFE(a) \
+ ((sizeof(a) / sizeof(*(a))) / \
+ static_cast<size_t>(!(sizeof(a) % sizeof(*(a)))))
+
+
+// Use implicit_cast as a safe version of static_cast or const_cast
+// for upcasting in the type hierarchy (i.e. casting a pointer to Foo
+// to a pointer to SuperclassOfFoo or casting a pointer to Foo to
+// a const pointer to Foo).
+// When you use implicit_cast, the compiler checks that the cast is safe.
+// Such explicit implicit_casts are necessary in surprisingly many
+// situations where C++ demands an exact type match instead of an
+// argument type convertible to a target type.
+//
+// The From type can be inferred, so the preferred syntax for using
+// implicit_cast is the same as for static_cast etc.:
+//
+// implicit_cast<ToType>(expr)
+//
+// implicit_cast would have been part of the C++ standard library,
+// but the proposal was submitted too late. It will probably make
+// its way into the language in the future.
+template<typename To, typename From>
+inline To implicit_cast(From const &f) {
+ return f;
+}
+
+// The COMPILE_ASSERT macro can be used to verify that a compile time
+// expression is true. For example, you could use it to verify the
+// size of a static array:
+//
+// COMPILE_ASSERT(ARRAYSIZE_UNSAFE(content_type_names) == CONTENT_NUM_TYPES,
+// content_type_names_incorrect_size);
+//
+// or to make sure a struct is smaller than a certain size:
+//
+// COMPILE_ASSERT(sizeof(foo) < 128, foo_too_large);
+//
+// The second argument to the macro is the name of the variable. If
+// the expression is false, most compilers will issue a warning/error
+// containing the name of the variable.
+
+#undef COMPILE_ASSERT
+
+#if __cplusplus >= 201103L
+
+// Under C++11, just use static_assert.
+#define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg)
+
+#else
+
+template <bool>
+struct CompileAssert {
+};
+
+#define COMPILE_ASSERT(expr, msg) \
+ typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] ALLOW_UNUSED
+
+// Implementation details of COMPILE_ASSERT:
+//
+// - COMPILE_ASSERT works by defining an array type that has -1
+// elements (and thus is invalid) when the expression is false.
+//
+// - The simpler definition
+//
+// #define COMPILE_ASSERT(expr, msg) typedef char msg[(expr) ? 1 : -1]
+//
+// does not work, as gcc supports variable-length arrays whose sizes
+// are determined at run-time (this is gcc's extension and not part
+// of the C++ standard). As a result, gcc fails to reject the
+// following code with the simple definition:
+//
+// int foo;
+// COMPILE_ASSERT(foo, msg); // not supposed to compile as foo is
+// // not a compile-time constant.
+//
+// - By using the type CompileAssert<(bool(expr))>, we ensures that
+// expr is a compile-time constant. (Template arguments must be
+// determined at compile-time.)
+//
+// - The outer parentheses in CompileAssert<(bool(expr))> are necessary
+// to work around a bug in gcc 3.4.4 and 4.0.1. If we had written
+//
+// CompileAssert<bool(expr)>
+//
+// instead, these compilers will refuse to compile
+//
+// COMPILE_ASSERT(5 > 0, some_message);
+//
+// (They seem to think the ">" in "5 > 0" marks the end of the
+// template argument list.)
+//
+// - The array size is (bool(expr) ? 1 : -1), instead of simply
+//
+// ((expr) ? 1 : -1).
+//
+// This is to avoid running into a bug in MS VC 7.1, which
+// causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1.
+
+#endif
+
+// bit_cast<Dest,Source> is a template function that implements the
+// equivalent of "*reinterpret_cast<Dest*>(&source)". We need this in
+// very low-level functions like the protobuf library and fast math
+// support.
+//
+// float f = 3.14159265358979;
+// int i = bit_cast<int32>(f);
+// // i = 0x40490fdb
+//
+// The classical address-casting method is:
+//
+// // WRONG
+// float f = 3.14159265358979; // WRONG
+// int i = * reinterpret_cast<int*>(&f); // WRONG
+//
+// The address-casting method actually produces undefined behavior
+// according to ISO C++ specification section 3.10 -15 -. Roughly, this
+// section says: if an object in memory has one type, and a program
+// accesses it with a different type, then the result is undefined
+// behavior for most values of "different type".
+//
+// This is true for any cast syntax, either *(int*)&f or
+// *reinterpret_cast<int*>(&f). And it is particularly true for
+// conversions between integral lvalues and floating-point lvalues.
+//
+// The purpose of 3.10 -15- is to allow optimizing compilers to assume
+// that expressions with different types refer to different memory. gcc
+// 4.0.1 has an optimizer that takes advantage of this. So a
+// non-conforming program quietly produces wildly incorrect output.
+//
+// The problem is not the use of reinterpret_cast. The problem is type
+// punning: holding an object in memory of one type and reading its bits
+// back using a different type.
+//
+// The C++ standard is more subtle and complex than this, but that
+// is the basic idea.
+//
+// Anyways ...
+//
+// bit_cast<> calls memcpy() which is blessed by the standard,
+// especially by the example in section 3.9 . Also, of course,
+// bit_cast<> wraps up the nasty logic in one place.
+//
+// Fortunately memcpy() is very fast. In optimized mode, with a
+// constant size, gcc 2.95.3, gcc 4.0.1, and msvc 7.1 produce inline
+// code with the minimal amount of data movement. On a 32-bit system,
+// memcpy(d,s,4) compiles to one load and one store, and memcpy(d,s,8)
+// compiles to two loads and two stores.
+//
+// I tested this code with gcc 2.95.3, gcc 4.0.1, icc 8.1, and msvc 7.1.
+//
+// WARNING: if Dest or Source is a non-POD type, the result of the memcpy
+// is likely to surprise you.
+
+template <class Dest, class Source>
+inline Dest bit_cast(const Source& source) {
+ COMPILE_ASSERT(sizeof(Dest) == sizeof(Source), VerifySizesAreEqual);
+
+ Dest dest;
+ memcpy(&dest, &source, sizeof(dest));
+ return dest;
+}
+
+// Used to explicitly mark the return value of a function as unused. If you are
+// really sure you don't want to do anything with the return value of a function
+// that has been marked WARN_UNUSED_RESULT, wrap it with this. Example:
+//
+// scoped_ptr<MyType> my_var = ...;
+// if (TakeOwnership(my_var.get()) == SUCCESS)
+// ignore_result(my_var.release());
+//
+template<typename T>
+inline void ignore_result(const T&) {
+}
+
+// The following enum should be used only as a constructor argument to indicate
+// that the variable has static storage class, and that the constructor should
+// do nothing to its state. It indicates to the reader that it is legal to
+// declare a static instance of the class, provided the constructor is given
+// the base::LINKER_INITIALIZED argument. Normally, it is unsafe to declare a
+// static variable that has a constructor or a destructor because invocation
+// order is undefined. However, IF the type can be initialized by filling with
+// zeroes (which the loader does for static variables), AND the destructor also
+// does nothing to the storage, AND there are no virtual methods, then a
+// constructor declared as
+// explicit MyClass(base::LinkerInitialized x) {}
+// and invoked as
+// static MyClass my_variable_name(base::LINKER_INITIALIZED);
+namespace base {
+enum LinkerInitialized { LINKER_INITIALIZED };
+
+// Use these to declare and define a static local variable (static T;) so that
+// it is leaked so that its destructors are not called at exit. If you need
+// thread-safe initialization, use base/lazy_instance.h instead.
+#define CR_DEFINE_STATIC_LOCAL(type, name, arguments) \
+ static type& name = *new type arguments
+
+} // base
+
+#endif // BASE_MACROS_H_
diff --git a/chromium/base/md5.cc b/chromium/base/md5.cc
index 754994c0e56..6227ee66042 100644
--- a/chromium/base/md5.cc
+++ b/chromium/base/md5.cc
@@ -251,8 +251,12 @@ void MD5Final(MD5Digest* digest, MD5Context* context) {
byteReverse(ctx->in, 14);
/* Append length in bits and transform */
- ((uint32 *)ctx->in)[ 14 ] = ctx->bits[0];
- ((uint32 *)ctx->in)[ 15 ] = ctx->bits[1];
+ memcpy(&ctx->in[14 * sizeof(ctx->bits[0])],
+ &ctx->bits[0],
+ sizeof(ctx->bits[0]));
+ memcpy(&ctx->in[15 * sizeof(ctx->bits[1])],
+ &ctx->bits[1],
+ sizeof(ctx->bits[1]));
MD5Transform(ctx->buf, (uint32 *)ctx->in);
byteReverse((unsigned char *)ctx->buf, 4);
@@ -260,6 +264,14 @@ void MD5Final(MD5Digest* digest, MD5Context* context) {
memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
}
+void MD5IntermediateFinal(MD5Digest* digest, const MD5Context* context) {
+ /* MD5Final mutates the MD5Context*. Make a copy for generating the
+ intermediate value. */
+ MD5Context context_copy;
+ memcpy(&context_copy, context, sizeof(context_copy));
+ MD5Final(digest, &context_copy);
+}
+
std::string MD5DigestToBase16(const MD5Digest& digest) {
static char const zEncode[] = "0123456789abcdef";
diff --git a/chromium/base/md5.h b/chromium/base/md5.h
index fba02bd1163..0a87fcf7c4a 100644
--- a/chromium/base/md5.h
+++ b/chromium/base/md5.h
@@ -58,6 +58,12 @@ BASE_EXPORT void MD5Update(MD5Context* context, const StringPiece& data);
// Finalizes the MD5 operation and fills the buffer with the digest.
BASE_EXPORT void MD5Final(MD5Digest* digest, MD5Context* context);
+// MD5IntermediateFinal() generates a digest without finalizing the MD5
+// operation. Can be used to generate digests for the input seen thus far,
+// without affecting the digest generated for the entire input.
+BASE_EXPORT void MD5IntermediateFinal(MD5Digest* digest,
+ const MD5Context* context);
+
// Converts a digest into human-readable hexadecimal.
BASE_EXPORT std::string MD5DigestToBase16(const MD5Digest& digest);
diff --git a/chromium/base/md5_unittest.cc b/chromium/base/md5_unittest.cc
index 1112c4b4258..3e7f2ad587d 100644
--- a/chromium/base/md5_unittest.cc
+++ b/chromium/base/md5_unittest.cc
@@ -204,4 +204,49 @@ TEST(MD5, ContextWithStringData) {
EXPECT_EQ(expected, actual);
}
+// Test that a digest generated by MD5IntermediateFinal() gives the same results
+// as an independently-calculated digest, and also does not modify the context.
+TEST(MD5, IntermediateFinal) {
+ // Independent context over the header.
+ MD5Context check_header_context;
+ MD5Init(&check_header_context);
+
+ // Independent context over entire input.
+ MD5Context check_full_context;
+ MD5Init(&check_full_context);
+
+ // Context intermediate digest will be calculated from.
+ MD5Context context;
+ MD5Init(&context);
+
+ static const char kHeader[] = "header data";
+ static const char kBody[] = "payload data";
+
+ MD5Update(&context, kHeader);
+ MD5Update(&check_header_context, kHeader);
+ MD5Update(&check_full_context, kHeader);
+
+ MD5Digest check_header_digest;
+ MD5Final(&check_header_digest, &check_header_context);
+
+ MD5Digest header_digest;
+ MD5IntermediateFinal(&header_digest, &context);
+
+ MD5Update(&context, kBody);
+ MD5Update(&check_full_context, kBody);
+
+ MD5Digest check_full_digest;
+ MD5Final(&check_full_digest, &check_full_context);
+
+ MD5Digest digest;
+ MD5Final(&digest, &context);
+
+ // The header and full digest pairs are the same, and they aren't the same as
+ // each other.
+ EXPECT_TRUE(!memcmp(&header_digest, &check_header_digest,
+ sizeof(header_digest)));
+ EXPECT_TRUE(!memcmp(&digest, &check_full_digest, sizeof(digest)));
+ EXPECT_FALSE(!memcmp(&digest, &header_digest, sizeof(digest)));
+}
+
} // namespace base
diff --git a/chromium/base/memory/aligned_memory.h b/chromium/base/memory/aligned_memory.h
index 6719599dc54..1a4cba9ad84 100644
--- a/chromium/base/memory/aligned_memory.h
+++ b/chromium/base/memory/aligned_memory.h
@@ -26,9 +26,9 @@
// // ... later, to release the memory:
// AlignedFree(my_array);
//
-// Or using scoped_ptr_malloc:
+// Or using scoped_ptr:
//
-// scoped_ptr_malloc<float, ScopedPtrAlignedFree> my_array(
+// scoped_ptr<float, AlignedFreeDeleter> my_array(
// static_cast<float*>(AlignedAlloc(size, alignment)));
#ifndef BASE_MEMORY_ALIGNED_MEMORY_H_
@@ -101,9 +101,9 @@ inline void AlignedFree(void* ptr) {
#endif
}
-// Helper class for use with scoped_ptr_malloc.
-class BASE_EXPORT ScopedPtrAlignedFree {
- public:
+// Deleter for use with scoped_ptr. E.g., use as
+// scoped_ptr<Foo, base::AlignedFreeDeleter> foo;
+struct AlignedFreeDeleter {
inline void operator()(void* ptr) const {
AlignedFree(ptr);
}
diff --git a/chromium/base/memory/aligned_memory_unittest.cc b/chromium/base/memory/aligned_memory_unittest.cc
index 6942249f5a4..5d681f9a388 100644
--- a/chromium/base/memory/aligned_memory_unittest.cc
+++ b/chromium/base/memory/aligned_memory_unittest.cc
@@ -41,6 +41,10 @@ TEST(AlignedMemoryTest, StackAlignment) {
EXPECT_ALIGNED(raw8.void_data(), 8);
EXPECT_ALIGNED(raw16.void_data(), 16);
+
+ // TODO(ios): __attribute__((aligned(X))) with X >= 128 does not works on
+ // the stack when building for arm64 on iOS, http://crbug.com/349003
+#if !(defined(OS_IOS) && defined(ARCH_CPU_ARM64))
EXPECT_ALIGNED(raw128.void_data(), 128);
// NaCl x86-64 compiler emits non-validating instructions for >128
@@ -60,7 +64,8 @@ TEST(AlignedMemoryTest, StackAlignment) {
EXPECT_EQ(4096u, ALIGNOF(raw4096));
EXPECT_ALIGNED(raw4096.void_data(), 4096);
#endif // !(defined(OS_IOS) && defined(ARCH_CPU_ARM_FAMILY))
-#endif
+#endif // !(defined(OS_NACL) && defined(ARCH_CPU_X86_64))
+#endif // !(defined(OS_IOS) && defined(ARCH_CPU_ARM64))
}
TEST(AlignedMemoryTest, DynamicAllocation) {
@@ -86,7 +91,7 @@ TEST(AlignedMemoryTest, DynamicAllocation) {
}
TEST(AlignedMemoryTest, ScopedDynamicAllocation) {
- scoped_ptr_malloc<float, base::ScopedPtrAlignedFree> p(
+ scoped_ptr<float, base::AlignedFreeDeleter> p(
static_cast<float*>(base::AlignedAlloc(8, 8)));
EXPECT_TRUE(p.get());
EXPECT_ALIGNED(p.get(), 8);
diff --git a/chromium/base/memory/discardable_memory.cc b/chromium/base/memory/discardable_memory.cc
new file mode 100644
index 00000000000..9ba47aa6bfb
--- /dev/null
+++ b/chromium/base/memory/discardable_memory.cc
@@ -0,0 +1,86 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/memory/discardable_memory.h"
+
+#include "base/lazy_instance.h"
+#include "base/logging.h"
+
+namespace base {
+namespace {
+
+const struct TypeNamePair {
+ DiscardableMemoryType type;
+ const char* name;
+} kTypeNamePairs[] = {
+ { DISCARDABLE_MEMORY_TYPE_ASHMEM, "ashmem" },
+ { DISCARDABLE_MEMORY_TYPE_MAC, "mac" },
+ { DISCARDABLE_MEMORY_TYPE_EMULATED, "emulated" },
+ { DISCARDABLE_MEMORY_TYPE_MALLOC, "malloc" }
+};
+
+DiscardableMemoryType g_preferred_type = DISCARDABLE_MEMORY_TYPE_NONE;
+
+struct DefaultPreferredType {
+ DefaultPreferredType() : value(DISCARDABLE_MEMORY_TYPE_NONE) {
+ std::vector<DiscardableMemoryType> supported_types;
+ DiscardableMemory::GetSupportedTypes(&supported_types);
+ DCHECK(!supported_types.empty());
+ value = supported_types[0];
+ }
+ DiscardableMemoryType value;
+};
+LazyInstance<DefaultPreferredType>::Leaky g_default_preferred_type =
+ LAZY_INSTANCE_INITIALIZER;
+
+} // namespace
+
+// static
+DiscardableMemoryType DiscardableMemory::GetNamedType(
+ const std::string& name) {
+ for (size_t i = 0; i < arraysize(kTypeNamePairs); ++i) {
+ if (name == kTypeNamePairs[i].name)
+ return kTypeNamePairs[i].type;
+ }
+
+ return DISCARDABLE_MEMORY_TYPE_NONE;
+}
+
+// static
+const char* DiscardableMemory::GetTypeName(DiscardableMemoryType type) {
+ for (size_t i = 0; i < arraysize(kTypeNamePairs); ++i) {
+ if (type == kTypeNamePairs[i].type)
+ return kTypeNamePairs[i].name;
+ }
+
+ return "unknown";
+}
+
+// static
+void DiscardableMemory::SetPreferredType(DiscardableMemoryType type) {
+ // NONE is a reserved value and not a valid default type.
+ DCHECK_NE(DISCARDABLE_MEMORY_TYPE_NONE, type);
+
+ // Make sure this function is only called once before the first call
+ // to GetPreferredType().
+ DCHECK_EQ(DISCARDABLE_MEMORY_TYPE_NONE, g_preferred_type);
+
+ g_preferred_type = type;
+}
+
+// static
+DiscardableMemoryType DiscardableMemory::GetPreferredType() {
+ if (g_preferred_type == DISCARDABLE_MEMORY_TYPE_NONE)
+ g_preferred_type = g_default_preferred_type.Get().value;
+
+ return g_preferred_type;
+}
+
+// static
+scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemory(
+ size_t size) {
+ return CreateLockedMemoryWithType(GetPreferredType(), size);
+}
+
+} // namespace base
diff --git a/chromium/base/memory/discardable_memory.h b/chromium/base/memory/discardable_memory.h
index cbc2db630a8..d16ed3e8480 100644
--- a/chromium/base/memory/discardable_memory.h
+++ b/chromium/base/memory/discardable_memory.h
@@ -5,6 +5,9 @@
#ifndef BASE_MEMORY_DISCARDABLE_MEMORY_H_
#define BASE_MEMORY_DISCARDABLE_MEMORY_H_
+#include <string>
+#include <vector>
+
#include "base/base_export.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
@@ -12,10 +15,18 @@
namespace base {
-enum LockDiscardableMemoryStatus {
- DISCARDABLE_MEMORY_FAILED = -1,
- DISCARDABLE_MEMORY_PURGED = 0,
- DISCARDABLE_MEMORY_SUCCESS = 1
+enum DiscardableMemoryType {
+ DISCARDABLE_MEMORY_TYPE_NONE,
+ DISCARDABLE_MEMORY_TYPE_ASHMEM,
+ DISCARDABLE_MEMORY_TYPE_MAC,
+ DISCARDABLE_MEMORY_TYPE_EMULATED,
+ DISCARDABLE_MEMORY_TYPE_MALLOC
+};
+
+enum DiscardableMemoryLockStatus {
+ DISCARDABLE_MEMORY_LOCK_STATUS_FAILED,
+ DISCARDABLE_MEMORY_LOCK_STATUS_PURGED,
+ DISCARDABLE_MEMORY_LOCK_STATUS_SUCCESS
};
// Platform abstraction for discardable memory. DiscardableMemory is used to
@@ -53,19 +64,56 @@ class BASE_EXPORT DiscardableMemory {
public:
virtual ~DiscardableMemory() {}
- // Check whether the system supports discardable memory natively. Returns
- // false if the support is emulated.
- static bool SupportedNatively();
+ // Call this on a thread with a MessageLoop current to allow discardable
+ // memory implementations to respond to memory pressure signals.
+ static void RegisterMemoryPressureListeners();
+
+ // Call this to prevent discardable memory implementations from responding
+ // to memory pressure signals.
+ static void UnregisterMemoryPressureListeners();
+
+ // Gets the discardable memory type with a given name.
+ static DiscardableMemoryType GetNamedType(const std::string& name);
+
+ // Gets the name of a discardable memory type.
+ static const char* GetTypeName(DiscardableMemoryType type);
+ // Gets system supported discardable memory types. Default preferred type
+ // at the front of vector.
+ static void GetSupportedTypes(std::vector<DiscardableMemoryType>* types);
+
+ // Sets the preferred discardable memory type. This overrides the default
+ // preferred type. Can only be called once prior to GetPreferredType()
+ // or CreateLockedMemory(). Caller is responsible for correct ordering.
+ static void SetPreferredType(DiscardableMemoryType type);
+
+ // Gets the preferred discardable memory type.
+ static DiscardableMemoryType GetPreferredType();
+
+ // Create a DiscardableMemory instance with specified |type| and |size|.
+ static scoped_ptr<DiscardableMemory> CreateLockedMemoryWithType(
+ DiscardableMemoryType type, size_t size);
+
+ // Create a DiscardableMemory instance with preferred type and |size|.
static scoped_ptr<DiscardableMemory> CreateLockedMemory(size_t size);
+ // Discardable memory implementations might allow an elevated usage level
+ // while in frequent use. Call this to have the usage reduced to the base
+ // level. Returns true if there's no need to call this again until
+ // memory instances have been used. This indicates that all discardable
+ // memory implementations have reduced usage to the base level or below.
+ // Note: calling this too often or while discardable memory is in frequent
+ // use can hurt performance, whereas calling it too infrequently can result
+ // in memory bloat.
+ static bool ReduceMemoryUsage();
+
// Locks the memory so that it will not be purged by the system. Returns
- // DISCARDABLE_MEMORY_SUCCESS on success. If the return value is
- // DISCARDABLE_MEMORY_FAILED then this object should be discarded and
- // a new one should be created. If the return value is
- // DISCARDABLE_MEMORY_PURGED then the memory is present but any data that
- // was in it is gone.
- virtual LockDiscardableMemoryStatus Lock() WARN_UNUSED_RESULT = 0;
+ // DISCARDABLE_MEMORY_LOCK_STATUS_SUCCESS on success. If the return value is
+ // DISCARDABLE_MEMORY_LOCK_STATUS_FAILED then this object should be
+ // discarded and a new one should be created. If the return value is
+ // DISCARDABLE_MEMORY_LOCK_STATUS_PURGED then the memory is present but any
+ // data that was in it is gone.
+ virtual DiscardableMemoryLockStatus Lock() WARN_UNUSED_RESULT = 0;
// Unlocks the memory so that it can be purged by the system. Must be called
// after every successful lock call.
@@ -77,10 +125,6 @@ class BASE_EXPORT DiscardableMemory {
// Testing utility calls.
- // Check whether a purge of all discardable memory in the system is supported.
- // Use only for testing!
- static bool PurgeForTestingSupported();
-
// Purge all discardable memory in the system. This call has global effects
// across all running processes, so it should only be used for testing!
static void PurgeForTesting();
diff --git a/chromium/base/memory/discardable_memory_allocator_android.cc b/chromium/base/memory/discardable_memory_allocator_android.cc
deleted file mode 100644
index 5e108176fe0..00000000000
--- a/chromium/base/memory/discardable_memory_allocator_android.cc
+++ /dev/null
@@ -1,418 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/memory/discardable_memory_allocator_android.h"
-
-#include <algorithm>
-#include <cmath>
-#include <set>
-#include <utility>
-
-#include "base/basictypes.h"
-#include "base/containers/hash_tables.h"
-#include "base/logging.h"
-#include "base/memory/discardable_memory.h"
-#include "base/memory/discardable_memory_android.h"
-#include "base/memory/scoped_vector.h"
-#include "base/synchronization/lock.h"
-#include "base/threading/thread_checker.h"
-
-// The allocator consists of three parts (classes):
-// - DiscardableMemoryAllocator: entry point of all allocations (through its
-// Allocate() method) that are dispatched to the AshmemRegion instances (which
-// it owns).
-// - AshmemRegion: manages allocations and destructions inside a single large
-// (e.g. 32 MBytes) ashmem region.
-// - DiscardableAshmemChunk: class implementing the DiscardableMemory interface
-// whose instances are returned to the client. DiscardableAshmemChunk lets the
-// client seamlessly operate on a subrange of the ashmem region managed by
-// AshmemRegion.
-
-namespace base {
-namespace {
-
-// Only tolerate fragmentation in used chunks *caused by the client* (as opposed
-// to the allocator when a free chunk is reused). The client can cause such
-// fragmentation by e.g. requesting 4097 bytes. This size would be rounded up to
-// 8192 by the allocator which would cause 4095 bytes of fragmentation (which is
-// currently the maximum allowed). If the client requests 4096 bytes and a free
-// chunk of 8192 bytes is available then the free chunk gets splitted into two
-// pieces to minimize fragmentation (since 8192 - 4096 = 4096 which is greater
-// than 4095).
-// TODO(pliard): tune this if splitting chunks too often leads to performance
-// issues.
-const size_t kMaxChunkFragmentationBytes = 4096 - 1;
-
-} // namespace
-
-namespace internal {
-
-class DiscardableMemoryAllocator::DiscardableAshmemChunk
- : public DiscardableMemory {
- public:
- // Note that |ashmem_region| must outlive |this|.
- DiscardableAshmemChunk(AshmemRegion* ashmem_region,
- int fd,
- void* address,
- size_t offset,
- size_t size)
- : ashmem_region_(ashmem_region),
- fd_(fd),
- address_(address),
- offset_(offset),
- size_(size),
- locked_(true) {
- }
-
- // Implemented below AshmemRegion since this requires the full definition of
- // AshmemRegion.
- virtual ~DiscardableAshmemChunk();
-
- // DiscardableMemory:
- virtual LockDiscardableMemoryStatus Lock() OVERRIDE {
- DCHECK(!locked_);
- locked_ = true;
- return internal::LockAshmemRegion(fd_, offset_, size_, address_);
- }
-
- virtual void Unlock() OVERRIDE {
- DCHECK(locked_);
- locked_ = false;
- internal::UnlockAshmemRegion(fd_, offset_, size_, address_);
- }
-
- virtual void* Memory() const OVERRIDE {
- return address_;
- }
-
- private:
- AshmemRegion* const ashmem_region_;
- const int fd_;
- void* const address_;
- const size_t offset_;
- const size_t size_;
- bool locked_;
-
- DISALLOW_COPY_AND_ASSIGN(DiscardableAshmemChunk);
-};
-
-class DiscardableMemoryAllocator::AshmemRegion {
- public:
- // Note that |allocator| must outlive |this|.
- static scoped_ptr<AshmemRegion> Create(
- size_t size,
- const std::string& name,
- DiscardableMemoryAllocator* allocator) {
- int fd;
- void* base;
- if (!internal::CreateAshmemRegion(name.c_str(), size, &fd, &base))
- return scoped_ptr<AshmemRegion>();
- return make_scoped_ptr(new AshmemRegion(fd, size, base, allocator));
- }
-
- virtual ~AshmemRegion() {
- const bool result = internal::CloseAshmemRegion(fd_, size_, base_);
- DCHECK(result);
- }
-
- // Returns a new instance of DiscardableMemory whose size is greater or equal
- // than |actual_size| (which is expected to be greater or equal than
- // |client_requested_size|).
- // Allocation works as follows:
- // 1) Reuse a previously freed chunk and return it if it succeeded. See
- // ReuseFreeChunk_Locked() below for more information.
- // 2) If no free chunk could be reused and the region is not big enough for
- // the requested size then NULL is returned.
- // 3) If there is enough room in the ashmem region then a new chunk is
- // returned. This new chunk starts at |offset_| which is the end of the
- // previously highest chunk in the region.
- scoped_ptr<DiscardableMemory> Allocate_Locked(size_t client_requested_size,
- size_t actual_size) {
- DCHECK_LE(client_requested_size, actual_size);
- allocator_->lock_.AssertAcquired();
- scoped_ptr<DiscardableMemory> memory = ReuseFreeChunk_Locked(
- client_requested_size, actual_size);
- if (memory)
- return memory.Pass();
- if (size_ - offset_ < actual_size) {
- // This region does not have enough space left to hold the requested size.
- return scoped_ptr<DiscardableMemory>();
- }
- void* const address = static_cast<char*>(base_) + offset_;
- memory.reset(
- new DiscardableAshmemChunk(this, fd_, address, offset_, actual_size));
- used_to_previous_chunk_map_.insert(
- std::make_pair(address, highest_allocated_chunk_));
- highest_allocated_chunk_ = address;
- offset_ += actual_size;
- DCHECK_LE(offset_, size_);
- return memory.Pass();
- }
-
- void OnChunkDeletion(void* chunk, size_t size) {
- AutoLock auto_lock(allocator_->lock_);
- MergeAndAddFreeChunk_Locked(chunk, size);
- // Note that |this| might be deleted beyond this point.
- }
-
- private:
- struct FreeChunk {
- FreeChunk(void* previous_chunk, void* start, size_t size)
- : previous_chunk(previous_chunk),
- start(start),
- size(size) {
- }
-
- void* const previous_chunk;
- void* const start;
- const size_t size;
-
- bool is_null() const { return !start; }
-
- bool operator<(const FreeChunk& other) const {
- return size < other.size;
- }
- };
-
- // Note that |allocator| must outlive |this|.
- AshmemRegion(int fd,
- size_t size,
- void* base,
- DiscardableMemoryAllocator* allocator)
- : fd_(fd),
- size_(size),
- base_(base),
- allocator_(allocator),
- highest_allocated_chunk_(NULL),
- offset_(0) {
- DCHECK_GE(fd_, 0);
- DCHECK_GE(size, kMinAshmemRegionSize);
- DCHECK(base);
- DCHECK(allocator);
- }
-
- // Tries to reuse a previously freed chunk by doing a closest size match.
- scoped_ptr<DiscardableMemory> ReuseFreeChunk_Locked(
- size_t client_requested_size,
- size_t actual_size) {
- allocator_->lock_.AssertAcquired();
- const FreeChunk reused_chunk = RemoveFreeChunkFromIterator_Locked(
- free_chunks_.lower_bound(FreeChunk(NULL, NULL, actual_size)));
- if (reused_chunk.is_null())
- return scoped_ptr<DiscardableMemory>();
-
- used_to_previous_chunk_map_.insert(
- std::make_pair(reused_chunk.start, reused_chunk.previous_chunk));
- size_t reused_chunk_size = reused_chunk.size;
- // |client_requested_size| is used below rather than |actual_size| to
- // reflect the amount of bytes that would not be usable by the client (i.e.
- // wasted). Using |actual_size| instead would not allow us to detect
- // fragmentation caused by the client if he did misaligned allocations.
- DCHECK_GE(reused_chunk.size, client_requested_size);
- const size_t fragmentation_bytes =
- reused_chunk.size - client_requested_size;
- if (fragmentation_bytes > kMaxChunkFragmentationBytes) {
- // Split the free chunk being recycled so that its unused tail doesn't get
- // reused (i.e. locked) which would prevent it from being evicted under
- // memory pressure.
- reused_chunk_size = actual_size;
- void* const new_chunk_start =
- static_cast<char*>(reused_chunk.start) + actual_size;
- DCHECK_GT(reused_chunk.size, actual_size);
- const size_t new_chunk_size = reused_chunk.size - actual_size;
- // Note that merging is not needed here since there can't be contiguous
- // free chunks at this point.
- AddFreeChunk_Locked(
- FreeChunk(reused_chunk.start, new_chunk_start, new_chunk_size));
- }
- const size_t offset =
- static_cast<char*>(reused_chunk.start) - static_cast<char*>(base_);
- internal::LockAshmemRegion(
- fd_, offset, reused_chunk_size, reused_chunk.start);
- scoped_ptr<DiscardableMemory> memory(
- new DiscardableAshmemChunk(this, fd_, reused_chunk.start, offset,
- reused_chunk_size));
- return memory.Pass();
- }
-
- // Makes the chunk identified with the provided arguments free and possibly
- // merges this chunk with the previous and next contiguous ones.
- // If the provided chunk is the only one used (and going to be freed) in the
- // region then the internal ashmem region is closed so that the underlying
- // physical pages are immediately released.
- // Note that free chunks are unlocked therefore they can be reclaimed by the
- // kernel if needed (under memory pressure) but they are not immediately
- // released unfortunately since madvise(MADV_REMOVE) and
- // fallocate(FALLOC_FL_PUNCH_HOLE) don't seem to work on ashmem. This might
- // change in versions of kernel >=3.5 though. The fact that free chunks are
- // not immediately released is the reason why we are trying to minimize
- // fragmentation in order not to cause "artificial" memory pressure.
- void MergeAndAddFreeChunk_Locked(void* chunk, size_t size) {
- allocator_->lock_.AssertAcquired();
- size_t new_free_chunk_size = size;
- // Merge with the previous chunk.
- void* first_free_chunk = chunk;
- DCHECK(!used_to_previous_chunk_map_.empty());
- const hash_map<void*, void*>::iterator previous_chunk_it =
- used_to_previous_chunk_map_.find(chunk);
- DCHECK(previous_chunk_it != used_to_previous_chunk_map_.end());
- void* previous_chunk = previous_chunk_it->second;
- used_to_previous_chunk_map_.erase(previous_chunk_it);
- if (previous_chunk) {
- const FreeChunk free_chunk = RemoveFreeChunk_Locked(previous_chunk);
- if (!free_chunk.is_null()) {
- new_free_chunk_size += free_chunk.size;
- first_free_chunk = previous_chunk;
- // There should not be more contiguous previous free chunks.
- DCHECK(!address_to_free_chunk_map_.count(free_chunk.previous_chunk));
- }
- }
- // Merge with the next chunk if free and present.
- void* next_chunk = static_cast<char*>(chunk) + size;
- const FreeChunk next_free_chunk = RemoveFreeChunk_Locked(next_chunk);
- if (!next_free_chunk.is_null()) {
- new_free_chunk_size += next_free_chunk.size;
- // Same as above.
- DCHECK(!address_to_free_chunk_map_.count(static_cast<char*>(next_chunk) +
- next_free_chunk.size));
- }
- const bool whole_ashmem_region_is_free =
- used_to_previous_chunk_map_.empty();
- if (!whole_ashmem_region_is_free) {
- AddFreeChunk_Locked(
- FreeChunk(previous_chunk, first_free_chunk, new_free_chunk_size));
- return;
- }
- // The whole ashmem region is free thus it can be deleted.
- DCHECK_EQ(base_, first_free_chunk);
- DCHECK(free_chunks_.empty());
- DCHECK(address_to_free_chunk_map_.empty());
- DCHECK(used_to_previous_chunk_map_.empty());
- allocator_->DeleteAshmemRegion_Locked(this); // Deletes |this|.
- }
-
- void AddFreeChunk_Locked(const FreeChunk& free_chunk) {
- allocator_->lock_.AssertAcquired();
- const std::multiset<FreeChunk>::iterator it = free_chunks_.insert(
- free_chunk);
- address_to_free_chunk_map_.insert(std::make_pair(free_chunk.start, it));
- // Update the next used contiguous chunk, if any, since its previous chunk
- // may have changed due to free chunks merging/splitting.
- void* const next_used_contiguous_chunk =
- static_cast<char*>(free_chunk.start) + free_chunk.size;
- hash_map<void*, void*>::iterator previous_it =
- used_to_previous_chunk_map_.find(next_used_contiguous_chunk);
- if (previous_it != used_to_previous_chunk_map_.end())
- previous_it->second = free_chunk.start;
- }
-
- // Finds and removes the free chunk, if any, whose start address is
- // |chunk_start|. Returns a copy of the unlinked free chunk or a free chunk
- // whose content is null if it was not found.
- FreeChunk RemoveFreeChunk_Locked(void* chunk_start) {
- allocator_->lock_.AssertAcquired();
- const hash_map<
- void*, std::multiset<FreeChunk>::iterator>::iterator it =
- address_to_free_chunk_map_.find(chunk_start);
- if (it == address_to_free_chunk_map_.end())
- return FreeChunk(NULL, NULL, 0U);
- return RemoveFreeChunkFromIterator_Locked(it->second);
- }
-
- // Same as above but takes an iterator in.
- FreeChunk RemoveFreeChunkFromIterator_Locked(
- std::multiset<FreeChunk>::iterator free_chunk_it) {
- allocator_->lock_.AssertAcquired();
- if (free_chunk_it == free_chunks_.end())
- return FreeChunk(NULL, NULL, 0U);
- DCHECK(free_chunk_it != free_chunks_.end());
- const FreeChunk free_chunk(*free_chunk_it);
- address_to_free_chunk_map_.erase(free_chunk_it->start);
- free_chunks_.erase(free_chunk_it);
- return free_chunk;
- }
-
- const int fd_;
- const size_t size_;
- void* const base_;
- DiscardableMemoryAllocator* const allocator_;
- void* highest_allocated_chunk_;
- // Points to the end of |highest_allocated_chunk_|.
- size_t offset_;
- // Allows free chunks recycling (lookup, insertion and removal) in O(log N).
- // Note that FreeChunk values are indexed by their size and also note that
- // multiple free chunks can have the same size (which is why multiset<> is
- // used instead of e.g. set<>).
- std::multiset<FreeChunk> free_chunks_;
- // Used while merging free contiguous chunks to erase free chunks (from their
- // start address) in constant time. Note that multiset<>::{insert,erase}()
- // don't invalidate iterators (except the one for the element being removed
- // obviously).
- hash_map<
- void*, std::multiset<FreeChunk>::iterator> address_to_free_chunk_map_;
- // Maps the address of *used* chunks to the address of their previous
- // contiguous chunk.
- hash_map<void*, void*> used_to_previous_chunk_map_;
-
- DISALLOW_COPY_AND_ASSIGN(AshmemRegion);
-};
-
-DiscardableMemoryAllocator::DiscardableAshmemChunk::~DiscardableAshmemChunk() {
- if (locked_)
- internal::UnlockAshmemRegion(fd_, offset_, size_, address_);
- ashmem_region_->OnChunkDeletion(address_, size_);
-}
-
-DiscardableMemoryAllocator::DiscardableMemoryAllocator(const std::string& name)
- : name_(name) {
-}
-
-DiscardableMemoryAllocator::~DiscardableMemoryAllocator() {
- DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(ashmem_regions_.empty());
-}
-
-scoped_ptr<DiscardableMemory> DiscardableMemoryAllocator::Allocate(
- size_t size) {
- const size_t aligned_size = internal::AlignToNextPage(size);
- // TODO(pliard): make this function less naive by e.g. moving the free chunks
- // multiset to the allocator itself in order to decrease even more
- // fragmentation/speedup allocation. Note that there should not be more than a
- // couple (=5) of AshmemRegion instances in practice though.
- AutoLock auto_lock(lock_);
- DCHECK_LE(ashmem_regions_.size(), 5U);
- for (ScopedVector<AshmemRegion>::iterator it = ashmem_regions_.begin();
- it != ashmem_regions_.end(); ++it) {
- scoped_ptr<DiscardableMemory> memory(
- (*it)->Allocate_Locked(size, aligned_size));
- if (memory)
- return memory.Pass();
- }
- scoped_ptr<AshmemRegion> new_region(
- AshmemRegion::Create(
- std::max(static_cast<size_t>(kMinAshmemRegionSize), aligned_size),
- name_.c_str(), this));
- if (!new_region) {
- // TODO(pliard): consider adding an histogram to see how often this happens.
- return scoped_ptr<DiscardableMemory>();
- }
- ashmem_regions_.push_back(new_region.release());
- return ashmem_regions_.back()->Allocate_Locked(size, aligned_size);
-}
-
-void DiscardableMemoryAllocator::DeleteAshmemRegion_Locked(
- AshmemRegion* region) {
- lock_.AssertAcquired();
- // Note that there should not be more than a couple of ashmem region instances
- // in |ashmem_regions_|.
- DCHECK_LE(ashmem_regions_.size(), 5U);
- const ScopedVector<AshmemRegion>::iterator it = std::find(
- ashmem_regions_.begin(), ashmem_regions_.end(), region);
- DCHECK_NE(ashmem_regions_.end(), it);
- std::swap(*it, ashmem_regions_.back());
- ashmem_regions_.pop_back();
-}
-
-} // namespace internal
-} // namespace base
diff --git a/chromium/base/memory/discardable_memory_allocator_android.h b/chromium/base/memory/discardable_memory_allocator_android.h
deleted file mode 100644
index 7991656cff6..00000000000
--- a/chromium/base/memory/discardable_memory_allocator_android.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BASE_MEMORY_DISCARDABLE_MEMORY_ALLOCATOR_H_
-#define BASE_MEMORY_DISCARDABLE_MEMORY_ALLOCATOR_H_
-
-#include <string>
-
-#include "base/base_export.h"
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/scoped_vector.h"
-#include "base/synchronization/lock.h"
-#include "base/threading/thread_checker.h"
-
-namespace base {
-
-class DiscardableMemory;
-
-namespace internal {
-
-// On Android ashmem is used to implement discardable memory. It is backed by a
-// file (descriptor) thus is a limited resource. This allocator minimizes the
-// problem by allocating large ashmem regions internally and returning smaller
-// chunks to the client.
-// Allocated chunks are systematically aligned on a page boundary therefore this
-// allocator should not be used for small allocations.
-//
-// Threading: The allocator must be deleted on the thread it was constructed on
-// although its Allocate() method can be invoked on any thread. See
-// discardable_memory.h for DiscardableMemory's threading guarantees.
-class BASE_EXPORT_PRIVATE DiscardableMemoryAllocator {
- public:
- // Exposed for testing.
- enum {
- kMinAshmemRegionSize = 32 * 1024 * 1024,
- };
-
- // Note that |name| is only used for debugging/measurement purposes.
- explicit DiscardableMemoryAllocator(const std::string& name);
- ~DiscardableMemoryAllocator();
-
- // Note that the allocator must outlive the returned DiscardableMemory
- // instance.
- scoped_ptr<DiscardableMemory> Allocate(size_t size);
-
- private:
- class AshmemRegion;
- class DiscardableAshmemChunk;
-
- void DeleteAshmemRegion_Locked(AshmemRegion* region);
-
- base::ThreadChecker thread_checker_;
- const std::string name_;
- base::Lock lock_;
- ScopedVector<AshmemRegion> ashmem_regions_;
-
- DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryAllocator);
-};
-
-} // namespace internal
-} // namespace base
-
-#endif // BASE_MEMORY_DISCARDABLE_MEMORY_ALLOCATOR_H_
diff --git a/chromium/base/memory/discardable_memory_allocator_android_unittest.cc b/chromium/base/memory/discardable_memory_allocator_android_unittest.cc
deleted file mode 100644
index 97cf5d45f72..00000000000
--- a/chromium/base/memory/discardable_memory_allocator_android_unittest.cc
+++ /dev/null
@@ -1,232 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/memory/discardable_memory_allocator_android.h"
-
-#include <sys/types.h>
-#include <unistd.h>
-
-#include "base/memory/discardable_memory.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/string_split.h"
-#include "base/strings/stringprintf.h"
-#include "build/build_config.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace base {
-namespace internal {
-
-const char kAllocatorName[] = "allocator-for-testing";
-
-const size_t kPageSize = 4096;
-const size_t kMinAshmemRegionSize =
- DiscardableMemoryAllocator::kMinAshmemRegionSize;
-
-class DiscardableMemoryAllocatorTest : public testing::Test {
- protected:
- DiscardableMemoryAllocatorTest() : allocator_(kAllocatorName) {}
-
- DiscardableMemoryAllocator allocator_;
-};
-
-void WriteToDiscardableMemory(DiscardableMemory* memory, size_t size) {
- // Write to the first and the last pages only to avoid paging in up to 64
- // MBytes.
- static_cast<char*>(memory->Memory())[0] = 'a';
- static_cast<char*>(memory->Memory())[size - 1] = 'a';
-}
-
-TEST_F(DiscardableMemoryAllocatorTest, Basic) {
- const size_t size = 128;
- scoped_ptr<DiscardableMemory> memory(allocator_.Allocate(size));
- ASSERT_TRUE(memory);
- WriteToDiscardableMemory(memory.get(), size);
-}
-
-TEST_F(DiscardableMemoryAllocatorTest, LargeAllocation) {
- // Note that large allocations should just use DiscardableMemoryAndroidSimple
- // instead.
- const size_t size = 64 * 1024 * 1024;
- scoped_ptr<DiscardableMemory> memory(allocator_.Allocate(size));
- ASSERT_TRUE(memory);
- WriteToDiscardableMemory(memory.get(), size);
-}
-
-TEST_F(DiscardableMemoryAllocatorTest, ChunksArePageAligned) {
- scoped_ptr<DiscardableMemory> memory(allocator_.Allocate(kPageSize));
- ASSERT_TRUE(memory);
- EXPECT_EQ(0U, reinterpret_cast<uint64_t>(memory->Memory()) % kPageSize);
- WriteToDiscardableMemory(memory.get(), kPageSize);
-}
-
-TEST_F(DiscardableMemoryAllocatorTest, AllocateFreeAllocate) {
- scoped_ptr<DiscardableMemory> memory(allocator_.Allocate(kPageSize));
- // Extra allocation that prevents the region from being deleted when |memory|
- // gets deleted.
- scoped_ptr<DiscardableMemory> memory_lock(allocator_.Allocate(kPageSize));
- ASSERT_TRUE(memory);
- void* const address = memory->Memory();
- memory->Unlock(); // Tests that the reused chunk is being locked correctly.
- memory.reset();
- memory = allocator_.Allocate(kPageSize);
- ASSERT_TRUE(memory);
- // The previously freed chunk should be reused.
- EXPECT_EQ(address, memory->Memory());
- WriteToDiscardableMemory(memory.get(), kPageSize);
-}
-
-TEST_F(DiscardableMemoryAllocatorTest, FreeingWholeAshmemRegionClosesAshmem) {
- scoped_ptr<DiscardableMemory> memory(allocator_.Allocate(kPageSize));
- ASSERT_TRUE(memory);
- const int kMagic = 0xdeadbeef;
- *static_cast<int*>(memory->Memory()) = kMagic;
- memory.reset();
- // The previous ashmem region should have been closed thus it should not be
- // reused.
- memory = allocator_.Allocate(kPageSize);
- ASSERT_TRUE(memory);
- EXPECT_NE(kMagic, *static_cast<const int*>(memory->Memory()));
-}
-
-TEST_F(DiscardableMemoryAllocatorTest, AllocateUsesBestFitAlgorithm) {
- scoped_ptr<DiscardableMemory> memory1(allocator_.Allocate(3 * kPageSize));
- ASSERT_TRUE(memory1);
- scoped_ptr<DiscardableMemory> memory2(allocator_.Allocate(2 * kPageSize));
- ASSERT_TRUE(memory2);
- scoped_ptr<DiscardableMemory> memory3(allocator_.Allocate(1 * kPageSize));
- ASSERT_TRUE(memory3);
- void* const address_3 = memory3->Memory();
- memory1.reset();
- // Don't free |memory2| to avoid merging the 3 blocks together.
- memory3.reset();
- memory1 = allocator_.Allocate(1 * kPageSize);
- ASSERT_TRUE(memory1);
- // The chunk whose size is closest to the requested size should be reused.
- EXPECT_EQ(address_3, memory1->Memory());
- WriteToDiscardableMemory(memory1.get(), kPageSize);
-}
-
-TEST_F(DiscardableMemoryAllocatorTest, MergeFreeChunks) {
- scoped_ptr<DiscardableMemory> memory1(allocator_.Allocate(kPageSize));
- ASSERT_TRUE(memory1);
- scoped_ptr<DiscardableMemory> memory2(allocator_.Allocate(kPageSize));
- ASSERT_TRUE(memory2);
- scoped_ptr<DiscardableMemory> memory3(allocator_.Allocate(kPageSize));
- ASSERT_TRUE(memory3);
- scoped_ptr<DiscardableMemory> memory4(allocator_.Allocate(kPageSize));
- ASSERT_TRUE(memory4);
- void* const memory1_address = memory1->Memory();
- memory1.reset();
- memory3.reset();
- // Freeing |memory2| (located between memory1 and memory3) should merge the
- // three free blocks together.
- memory2.reset();
- memory1 = allocator_.Allocate(3 * kPageSize);
- EXPECT_EQ(memory1_address, memory1->Memory());
-}
-
-TEST_F(DiscardableMemoryAllocatorTest, MergeFreeChunksAdvanced) {
- scoped_ptr<DiscardableMemory> memory1(allocator_.Allocate(4 * kPageSize));
- ASSERT_TRUE(memory1);
- scoped_ptr<DiscardableMemory> memory2(allocator_.Allocate(4 * kPageSize));
- ASSERT_TRUE(memory2);
- void* const memory1_address = memory1->Memory();
- memory1.reset();
- memory1 = allocator_.Allocate(2 * kPageSize);
- memory2.reset();
- // At this point, the region should be in this state:
- // 8 KBytes (used), 24 KBytes (free).
- memory2 = allocator_.Allocate(6 * kPageSize);
- EXPECT_EQ(
- static_cast<const char*>(memory2->Memory()),
- static_cast<const char*>(memory1_address) + 2 * kPageSize);
-}
-
-TEST_F(DiscardableMemoryAllocatorTest, MergeFreeChunksAdvanced2) {
- scoped_ptr<DiscardableMemory> memory1(allocator_.Allocate(4 * kPageSize));
- ASSERT_TRUE(memory1);
- scoped_ptr<DiscardableMemory> memory2(allocator_.Allocate(4 * kPageSize));
- ASSERT_TRUE(memory2);
- void* const memory1_address = memory1->Memory();
- memory1.reset();
- memory1 = allocator_.Allocate(2 * kPageSize);
- scoped_ptr<DiscardableMemory> memory3(allocator_.Allocate(2 * kPageSize));
- // At this point, the region should be in this state:
- // 8 KBytes (used), 8 KBytes (used), 16 KBytes (used).
- memory3.reset();
- memory2.reset();
- // At this point, the region should be in this state:
- // 8 KBytes (used), 24 KBytes (free).
- memory2 = allocator_.Allocate(6 * kPageSize);
- EXPECT_EQ(
- static_cast<const char*>(memory2->Memory()),
- static_cast<const char*>(memory1_address) + 2 * kPageSize);
-}
-
-TEST_F(DiscardableMemoryAllocatorTest, MergeFreeChunksAndDeleteAshmemRegion) {
- scoped_ptr<DiscardableMemory> memory1(allocator_.Allocate(4 * kPageSize));
- ASSERT_TRUE(memory1);
- scoped_ptr<DiscardableMemory> memory2(allocator_.Allocate(4 * kPageSize));
- ASSERT_TRUE(memory2);
- memory1.reset();
- memory1 = allocator_.Allocate(2 * kPageSize);
- scoped_ptr<DiscardableMemory> memory3(allocator_.Allocate(2 * kPageSize));
- // At this point, the region should be in this state:
- // 8 KBytes (used), 8 KBytes (used), 16 KBytes (used).
- memory1.reset();
- memory3.reset();
- // At this point, the region should be in this state:
- // 8 KBytes (free), 8 KBytes (used), 8 KBytes (free).
- const int kMagic = 0xdeadbeef;
- *static_cast<int*>(memory2->Memory()) = kMagic;
- memory2.reset();
- // The whole region should have been deleted.
- memory2 = allocator_.Allocate(2 * kPageSize);
- EXPECT_NE(kMagic, *static_cast<int*>(memory2->Memory()));
-}
-
-TEST_F(DiscardableMemoryAllocatorTest,
- TooLargeFreeChunksDontCauseTooMuchFragmentationWhenRecycled) {
- // Keep |memory_1| below allocated so that the ashmem region doesn't get
- // closed when |memory_2| is deleted.
- scoped_ptr<DiscardableMemory> memory_1(allocator_.Allocate(64 * 1024));
- ASSERT_TRUE(memory_1);
- scoped_ptr<DiscardableMemory> memory_2(allocator_.Allocate(32 * 1024));
- ASSERT_TRUE(memory_2);
- void* const address = memory_2->Memory();
- memory_2.reset();
- const size_t size = 16 * 1024;
- memory_2 = allocator_.Allocate(size);
- ASSERT_TRUE(memory_2);
- EXPECT_EQ(address, memory_2->Memory());
- WriteToDiscardableMemory(memory_2.get(), size);
- scoped_ptr<DiscardableMemory> memory_3(allocator_.Allocate(size));
- // The unused tail (16 KBytes large) of the previously freed chunk should be
- // reused.
- EXPECT_EQ(static_cast<char*>(address) + size, memory_3->Memory());
- WriteToDiscardableMemory(memory_3.get(), size);
-}
-
-TEST_F(DiscardableMemoryAllocatorTest, UseMultipleAshmemRegions) {
- // Leave one page untouched at the end of the ashmem region.
- const size_t size = kMinAshmemRegionSize - kPageSize;
- scoped_ptr<DiscardableMemory> memory1(allocator_.Allocate(size));
- ASSERT_TRUE(memory1);
- WriteToDiscardableMemory(memory1.get(), size);
-
- scoped_ptr<DiscardableMemory> memory2(
- allocator_.Allocate(kMinAshmemRegionSize));
- ASSERT_TRUE(memory2);
- WriteToDiscardableMemory(memory2.get(), kMinAshmemRegionSize);
- // The last page of the first ashmem region should be used for this
- // allocation.
- scoped_ptr<DiscardableMemory> memory3(allocator_.Allocate(kPageSize));
- ASSERT_TRUE(memory3);
- WriteToDiscardableMemory(memory3.get(), kPageSize);
- EXPECT_EQ(memory3->Memory(), static_cast<char*>(memory1->Memory()) + size);
-}
-
-} // namespace internal
-} // namespace base
diff --git a/chromium/base/memory/discardable_memory_android.cc b/chromium/base/memory/discardable_memory_android.cc
index 7e84967055f..33d38085716 100644
--- a/chromium/base/memory/discardable_memory_android.cc
+++ b/chromium/base/memory/discardable_memory_android.cc
@@ -2,258 +2,119 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/discardable_memory_android.h"
-
-#include <sys/mman.h>
-#include <sys/resource.h>
-#include <sys/time.h>
-#include <unistd.h>
-
-#include <limits>
+#include "base/memory/discardable_memory.h"
+#include "base/android/sys_utils.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "base/file_util.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
-#include "base/memory/discardable_memory.h"
-#include "base/memory/discardable_memory_allocator_android.h"
-#include "base/synchronization/lock.h"
-#include "third_party/ashmem/ashmem.h"
+#include "base/memory/discardable_memory_ashmem.h"
+#include "base/memory/discardable_memory_ashmem_allocator.h"
+#include "base/memory/discardable_memory_emulated.h"
+#include "base/memory/discardable_memory_malloc.h"
namespace base {
namespace {
-const size_t kPageSize = 4096;
-
-const char kAshmemAllocatorName[] = "DiscardableMemoryAllocator";
-
-struct GlobalContext {
- GlobalContext()
- : ashmem_fd_limit(GetSoftFDLimit()),
- allocator(kAshmemAllocatorName),
- ashmem_fd_count_(0) {
- }
-
- const int ashmem_fd_limit;
- internal::DiscardableMemoryAllocator allocator;
- Lock lock;
-
- int ashmem_fd_count() const {
- lock.AssertAcquired();
- return ashmem_fd_count_;
- }
-
- void decrement_ashmem_fd_count() {
- lock.AssertAcquired();
- --ashmem_fd_count_;
- }
-
- void increment_ashmem_fd_count() {
- lock.AssertAcquired();
- ++ashmem_fd_count_;
- }
-
- private:
- static int GetSoftFDLimit() {
- struct rlimit limit_info;
- if (getrlimit(RLIMIT_NOFILE, &limit_info) != 0)
- return 128;
- // Allow 25% of file descriptor capacity for ashmem.
- return limit_info.rlim_cur / 4;
- }
-
- int ashmem_fd_count_;
-};
-
-LazyInstance<GlobalContext>::Leaky g_context = LAZY_INSTANCE_INITIALIZER;
-
-// This is the default implementation of DiscardableMemory on Android which is
-// used when file descriptor usage is under the soft limit. When file descriptor
-// usage gets too high the discardable memory allocator is used instead. See
-// ShouldUseAllocator() below for more details.
-class DiscardableMemoryAndroidSimple : public DiscardableMemory {
- public:
- DiscardableMemoryAndroidSimple(int fd, void* address, size_t size)
- : fd_(fd),
- memory_(address),
- size_(size) {
- DCHECK_GE(fd_, 0);
- DCHECK(memory_);
- }
-
- virtual ~DiscardableMemoryAndroidSimple() {
- internal::CloseAshmemRegion(fd_, size_, memory_);
- }
-
- // DiscardableMemory:
- virtual LockDiscardableMemoryStatus Lock() OVERRIDE {
- return internal::LockAshmemRegion(fd_, 0, size_, memory_);
- }
+const char kAshmemAllocatorName[] = "DiscardableMemoryAshmemAllocator";
- virtual void Unlock() OVERRIDE {
- internal::UnlockAshmemRegion(fd_, 0, size_, memory_);
- }
-
- virtual void* Memory() const OVERRIDE {
- return memory_;
- }
+// For Ashmem, have the DiscardableMemoryManager trigger userspace eviction
+// when address space usage gets too high (e.g. 512 MBytes).
+const size_t kAshmemMemoryLimit = 512 * 1024 * 1024;
- private:
- const int fd_;
- void* const memory_;
- const size_t size_;
-
- DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryAndroidSimple);
-};
-
-int GetCurrentNumberOfAshmemFDs() {
- AutoLock lock(g_context.Get().lock);
- return g_context.Get().ashmem_fd_count();
+size_t GetOptimalAshmemRegionSizeForAllocator() {
+ // Note that this may do some I/O (without hitting the disk though) so it
+ // should not be called on the critical path.
+ return base::android::SysUtils::AmountOfPhysicalMemoryKB() * 1024 / 8;
}
-// Returns whether the provided size can be safely page-aligned (without causing
-// an overflow).
-bool CheckSizeCanBeAlignedToNextPage(size_t size) {
- return size <= std::numeric_limits<size_t>::max() - kPageSize + 1;
-}
+// Holds the shared state used for allocations.
+struct SharedState {
+ SharedState()
+ : manager(kAshmemMemoryLimit,
+ kAshmemMemoryLimit,
+ kAshmemMemoryLimit,
+ TimeDelta::Max()),
+ allocator(kAshmemAllocatorName,
+ GetOptimalAshmemRegionSizeForAllocator()) {}
+
+ internal::DiscardableMemoryManager manager;
+ internal::DiscardableMemoryAshmemAllocator allocator;
+};
+LazyInstance<SharedState>::Leaky g_shared_state = LAZY_INSTANCE_INITIALIZER;
} // namespace
-namespace internal {
-
-size_t AlignToNextPage(size_t size) {
- DCHECK_EQ(static_cast<int>(kPageSize), getpagesize());
- DCHECK(CheckSizeCanBeAlignedToNextPage(size));
- const size_t mask = ~(kPageSize - 1);
- return (size + kPageSize - 1) & mask;
-}
-
-bool CreateAshmemRegion(const char* name,
- size_t size,
- int* out_fd,
- void** out_address) {
- AutoLock lock(g_context.Get().lock);
- if (g_context.Get().ashmem_fd_count() + 1 > g_context.Get().ashmem_fd_limit)
- return false;
- int fd = ashmem_create_region(name, size);
- if (fd < 0) {
- DLOG(ERROR) << "ashmem_create_region() failed";
- return false;
- }
- file_util::ScopedFD fd_closer(&fd);
-
- const int err = ashmem_set_prot_region(fd, PROT_READ | PROT_WRITE);
- if (err < 0) {
- DLOG(ERROR) << "Error " << err << " when setting protection of ashmem";
- return false;
- }
-
- // There is a problem using MAP_PRIVATE here. As we are constantly calling
- // Lock() and Unlock(), data could get lost if they are not written to the
- // underlying file when Unlock() gets called.
- void* const address = mmap(
- NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
- if (address == MAP_FAILED) {
- DPLOG(ERROR) << "Failed to map memory.";
- return false;
- }
-
- ignore_result(fd_closer.release());
- g_context.Get().increment_ashmem_fd_count();
- *out_fd = fd;
- *out_address = address;
- return true;
-}
-
-bool CloseAshmemRegion(int fd, size_t size, void* address) {
- AutoLock lock(g_context.Get().lock);
- g_context.Get().decrement_ashmem_fd_count();
- if (munmap(address, size) == -1) {
- DPLOG(ERROR) << "Failed to unmap memory.";
- close(fd);
- return false;
- }
- return close(fd) == 0;
+// static
+void DiscardableMemory::RegisterMemoryPressureListeners() {
+ internal::DiscardableMemoryEmulated::RegisterMemoryPressureListeners();
}
-LockDiscardableMemoryStatus LockAshmemRegion(int fd,
- size_t off,
- size_t size,
- const void* address) {
- const int result = ashmem_pin_region(fd, off, size);
- DCHECK_EQ(0, mprotect(address, size, PROT_READ | PROT_WRITE));
- return result == ASHMEM_WAS_PURGED ?
- DISCARDABLE_MEMORY_PURGED : DISCARDABLE_MEMORY_SUCCESS;
+// static
+void DiscardableMemory::UnregisterMemoryPressureListeners() {
+ internal::DiscardableMemoryEmulated::UnregisterMemoryPressureListeners();
}
-bool UnlockAshmemRegion(int fd, size_t off, size_t size, const void* address) {
- const int failed = ashmem_unpin_region(fd, off, size);
- if (failed)
- DLOG(ERROR) << "Failed to unpin memory.";
- // This allows us to catch accesses to unlocked memory.
- DCHECK_EQ(0, mprotect(address, size, PROT_NONE));
- return !failed;
+// static
+bool DiscardableMemory::ReduceMemoryUsage() {
+ return internal::DiscardableMemoryEmulated::ReduceMemoryUsage();
}
-} // namespace internal
-
// static
-bool DiscardableMemory::SupportedNatively() {
- return true;
+void DiscardableMemory::GetSupportedTypes(
+ std::vector<DiscardableMemoryType>* types) {
+ const DiscardableMemoryType supported_types[] = {
+ DISCARDABLE_MEMORY_TYPE_ASHMEM,
+ DISCARDABLE_MEMORY_TYPE_EMULATED,
+ DISCARDABLE_MEMORY_TYPE_MALLOC
+ };
+ types->assign(supported_types, supported_types + arraysize(supported_types));
}
-// Allocation can happen in two ways:
-// - Each client-requested allocation is backed by an individual ashmem region.
-// This allows deleting ashmem regions individually by closing the ashmem file
-// descriptor. This is the default path that is taken when file descriptor usage
-// allows us to do so or when the allocation size would require and entire
-// ashmem region.
-// - Allocations are performed by the global allocator when file descriptor
-// usage gets too high. This still allows unpinning but does not allow deleting
-// (i.e. releasing the physical pages backing) individual regions.
-//
-// TODO(pliard): consider tuning the size threshold used below. For instance we
-// might want to make it a fraction of kMinAshmemRegionSize and also
-// systematically have small allocations go through the allocator to let big
-// allocations systematically go through individual ashmem regions.
-//
// static
-scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemory(
- size_t size) {
- if (!CheckSizeCanBeAlignedToNextPage(size))
- return scoped_ptr<DiscardableMemory>();
- // Pinning & unpinning works with page granularity therefore align the size
- // upfront.
- const size_t aligned_size = internal::AlignToNextPage(size);
- // Note that the following code is slightly racy. The worst that can happen in
- // practice though is taking the wrong decision (e.g. using the allocator
- // rather than DiscardableMemoryAndroidSimple). Moreover keeping the lock
- // acquired for the whole allocation would cause a deadlock when the allocator
- // tries to create an ashmem region.
- const size_t kAllocatorRegionSize =
- internal::DiscardableMemoryAllocator::kMinAshmemRegionSize;
- GlobalContext* const global_context = g_context.Pointer();
- if (aligned_size >= kAllocatorRegionSize ||
- GetCurrentNumberOfAshmemFDs() < 0.9 * global_context->ashmem_fd_limit) {
- int fd;
- void* address;
- if (internal::CreateAshmemRegion("", aligned_size, &fd, &address)) {
- return scoped_ptr<DiscardableMemory>(
- new DiscardableMemoryAndroidSimple(fd, address, aligned_size));
+scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemoryWithType(
+ DiscardableMemoryType type, size_t size) {
+ switch (type) {
+ case DISCARDABLE_MEMORY_TYPE_NONE:
+ case DISCARDABLE_MEMORY_TYPE_MAC:
+ return scoped_ptr<DiscardableMemory>();
+ case DISCARDABLE_MEMORY_TYPE_ASHMEM: {
+ SharedState* const shared_state = g_shared_state.Pointer();
+ scoped_ptr<internal::DiscardableMemoryAshmem> memory(
+ new internal::DiscardableMemoryAshmem(
+ size, &shared_state->allocator, &shared_state->manager));
+ if (!memory->Initialize())
+ return scoped_ptr<DiscardableMemory>();
+
+ return memory.PassAs<DiscardableMemory>();
+ }
+ case DISCARDABLE_MEMORY_TYPE_EMULATED: {
+ scoped_ptr<internal::DiscardableMemoryEmulated> memory(
+ new internal::DiscardableMemoryEmulated(size));
+ if (!memory->Initialize())
+ return scoped_ptr<DiscardableMemory>();
+
+ return memory.PassAs<DiscardableMemory>();
+ }
+ case DISCARDABLE_MEMORY_TYPE_MALLOC: {
+ scoped_ptr<internal::DiscardableMemoryMalloc> memory(
+ new internal::DiscardableMemoryMalloc(size));
+ if (!memory->Initialize())
+ return scoped_ptr<DiscardableMemory>();
+
+ return memory.PassAs<DiscardableMemory>();
}
}
- return global_context->allocator.Allocate(size);
-}
-// static
-bool DiscardableMemory::PurgeForTestingSupported() {
- return false;
+ NOTREACHED();
+ return scoped_ptr<DiscardableMemory>();
}
// static
void DiscardableMemory::PurgeForTesting() {
- NOTIMPLEMENTED();
+ g_shared_state.Pointer()->manager.PurgeAll();
+ internal::DiscardableMemoryEmulated::PurgeForTesting();
}
} // namespace base
diff --git a/chromium/base/memory/discardable_memory_android.h b/chromium/base/memory/discardable_memory_android.h
deleted file mode 100644
index 9db78b33853..00000000000
--- a/chromium/base/memory/discardable_memory_android.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Please use discardable_memory.h since this is just an internal file providing
-// utility functions used both by discardable_memory_android.cc and
-// discardable_memory_allocator_android.cc.
-
-#ifndef BASE_MEMORY_DISCARDABLE_MEMORY_ANDROID_H_
-#define BASE_MEMORY_DISCARDABLE_MEMORY_ANDROID_H_
-
-#include "base/basictypes.h"
-#include "base/memory/discardable_memory.h"
-
-namespace base {
-namespace internal {
-
-size_t AlignToNextPage(size_t size);
-
-bool CreateAshmemRegion(const char* name, size_t size, int* fd, void** address);
-
-bool CloseAshmemRegion(int fd, size_t size, void* address);
-
-LockDiscardableMemoryStatus LockAshmemRegion(int fd,
- size_t offset,
- size_t size,
- const void* address);
-
-bool UnlockAshmemRegion(int fd,
- size_t offset,
- size_t size,
- const void* address);
-
-} // namespace internal
-} // namespace base
-
-#endif // BASE_MEMORY_DISCARDABLE_MEMORY_ANDROID_H_
diff --git a/chromium/base/memory/discardable_memory_ashmem.cc b/chromium/base/memory/discardable_memory_ashmem.cc
new file mode 100644
index 00000000000..a590e531b7a
--- /dev/null
+++ b/chromium/base/memory/discardable_memory_ashmem.cc
@@ -0,0 +1,75 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/memory/discardable_memory_ashmem.h"
+
+#include "base/memory/discardable_memory_ashmem_allocator.h"
+
+namespace base {
+namespace internal {
+
+DiscardableMemoryAshmem::DiscardableMemoryAshmem(
+ size_t bytes,
+ DiscardableMemoryAshmemAllocator* allocator,
+ DiscardableMemoryManager* manager)
+ : bytes_(bytes),
+ allocator_(allocator),
+ manager_(manager),
+ is_locked_(false) {
+ manager_->Register(this, bytes_);
+}
+
+DiscardableMemoryAshmem::~DiscardableMemoryAshmem() {
+ if (is_locked_)
+ Unlock();
+
+ manager_->Unregister(this);
+}
+
+bool DiscardableMemoryAshmem::Initialize() {
+ return Lock() != DISCARDABLE_MEMORY_LOCK_STATUS_FAILED;
+}
+
+DiscardableMemoryLockStatus DiscardableMemoryAshmem::Lock() {
+ DCHECK(!is_locked_);
+
+ bool purged = false;
+ if (!manager_->AcquireLock(this, &purged))
+ return DISCARDABLE_MEMORY_LOCK_STATUS_FAILED;
+
+ is_locked_ = true;
+ return purged ? DISCARDABLE_MEMORY_LOCK_STATUS_PURGED
+ : DISCARDABLE_MEMORY_LOCK_STATUS_SUCCESS;
+}
+
+void DiscardableMemoryAshmem::Unlock() {
+ DCHECK(is_locked_);
+ manager_->ReleaseLock(this);
+ is_locked_ = false;
+}
+
+void* DiscardableMemoryAshmem::Memory() const {
+ DCHECK(is_locked_);
+ DCHECK(ashmem_chunk_);
+ return ashmem_chunk_->Memory();
+}
+
+bool DiscardableMemoryAshmem::AllocateAndAcquireLock() {
+ if (ashmem_chunk_)
+ return ashmem_chunk_->Lock();
+
+ ashmem_chunk_ = allocator_->Allocate(bytes_);
+ return false;
+}
+
+void DiscardableMemoryAshmem::ReleaseLock() {
+ ashmem_chunk_->Unlock();
+}
+
+void DiscardableMemoryAshmem::Purge() {
+ ashmem_chunk_.reset();
+}
+
+} // namespace internal
+} // namespace base
diff --git a/chromium/base/memory/discardable_memory_ashmem.h b/chromium/base/memory/discardable_memory_ashmem.h
new file mode 100644
index 00000000000..8436f5d8ece
--- /dev/null
+++ b/chromium/base/memory/discardable_memory_ashmem.h
@@ -0,0 +1,55 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_MEMORY_DISCARDABLE_MEMORY_ASHMEM_H_
+#define BASE_MEMORY_DISCARDABLE_MEMORY_ASHMEM_H_
+
+#include "base/memory/discardable_memory.h"
+
+#include "base/macros.h"
+#include "base/memory/discardable_memory_manager.h"
+
+namespace base {
+namespace internal {
+
+class DiscardableAshmemChunk;
+class DiscardableMemoryAshmemAllocator;
+class DiscardableMemoryManager;
+
+class DiscardableMemoryAshmem
+ : public DiscardableMemory,
+ public internal::DiscardableMemoryManagerAllocation {
+ public:
+ explicit DiscardableMemoryAshmem(size_t bytes,
+ DiscardableMemoryAshmemAllocator* allocator,
+ DiscardableMemoryManager* manager);
+
+ virtual ~DiscardableMemoryAshmem();
+
+ bool Initialize();
+
+ // Overridden from DiscardableMemory:
+ virtual DiscardableMemoryLockStatus Lock() OVERRIDE;
+ virtual void Unlock() OVERRIDE;
+ virtual void* Memory() const OVERRIDE;
+
+ // Overridden from internal::DiscardableMemoryManagerAllocation:
+ virtual bool AllocateAndAcquireLock() OVERRIDE;
+ virtual void ReleaseLock() OVERRIDE;
+ virtual void Purge() OVERRIDE;
+
+ private:
+ const size_t bytes_;
+ DiscardableMemoryAshmemAllocator* const allocator_;
+ DiscardableMemoryManager* const manager_;
+ bool is_locked_;
+ scoped_ptr<DiscardableAshmemChunk> ashmem_chunk_;
+
+ DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryAshmem);
+};
+
+} // namespace internal
+} // namespace base
+
+#endif // BASE_MEMORY_DISCARDABLE_MEMORY_ASHMEM_H_
diff --git a/chromium/base/memory/discardable_memory_ashmem_allocator.cc b/chromium/base/memory/discardable_memory_ashmem_allocator.cc
new file mode 100644
index 00000000000..bc8c9b90617
--- /dev/null
+++ b/chromium/base/memory/discardable_memory_ashmem_allocator.cc
@@ -0,0 +1,527 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/memory/discardable_memory_ashmem_allocator.h"
+
+#include <sys/mman.h>
+#include <unistd.h>
+
+#include <algorithm>
+#include <cmath>
+#include <limits>
+#include <set>
+#include <utility>
+
+#include "base/basictypes.h"
+#include "base/containers/hash_tables.h"
+#include "base/file_util.h"
+#include "base/files/scoped_file.h"
+#include "base/logging.h"
+#include "base/memory/scoped_vector.h"
+#include "third_party/ashmem/ashmem.h"
+
+// The allocator consists of three parts (classes):
+// - DiscardableMemoryAshmemAllocator: entry point of all allocations (through
+// its Allocate() method) that are dispatched to the AshmemRegion instances
+// (which it owns).
+// - AshmemRegion: manages allocations and destructions inside a single large
+// (e.g. 32 MBytes) ashmem region.
+// - DiscardableAshmemChunk: class mimicking the DiscardableMemory interface
+// whose instances are returned to the client.
+
+namespace base {
+namespace {
+
+// Only tolerate fragmentation in used chunks *caused by the client* (as opposed
+// to the allocator when a free chunk is reused). The client can cause such
+// fragmentation by e.g. requesting 4097 bytes. This size would be rounded up to
+// 8192 by the allocator which would cause 4095 bytes of fragmentation (which is
+// currently the maximum allowed). If the client requests 4096 bytes and a free
+// chunk of 8192 bytes is available then the free chunk gets splitted into two
+// pieces to minimize fragmentation (since 8192 - 4096 = 4096 which is greater
+// than 4095).
+// TODO(pliard): tune this if splitting chunks too often leads to performance
+// issues.
+const size_t kMaxChunkFragmentationBytes = 4096 - 1;
+
+const size_t kMinAshmemRegionSize = 32 * 1024 * 1024;
+
+// Returns 0 if the provided size is too high to be aligned.
+size_t AlignToNextPage(size_t size) {
+ const size_t kPageSize = 4096;
+ DCHECK_EQ(static_cast<int>(kPageSize), getpagesize());
+ if (size > std::numeric_limits<size_t>::max() - kPageSize + 1)
+ return 0;
+ const size_t mask = ~(kPageSize - 1);
+ return (size + kPageSize - 1) & mask;
+}
+
+bool CreateAshmemRegion(const char* name,
+ size_t size,
+ int* out_fd,
+ void** out_address) {
+ base::ScopedFD fd(ashmem_create_region(name, size));
+ if (!fd.is_valid()) {
+ DLOG(ERROR) << "ashmem_create_region() failed";
+ return false;
+ }
+
+ const int err = ashmem_set_prot_region(fd.get(), PROT_READ | PROT_WRITE);
+ if (err < 0) {
+ DLOG(ERROR) << "Error " << err << " when setting protection of ashmem";
+ return false;
+ }
+
+ // There is a problem using MAP_PRIVATE here. As we are constantly calling
+ // Lock() and Unlock(), data could get lost if they are not written to the
+ // underlying file when Unlock() gets called.
+ void* const address = mmap(
+ NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd.get(), 0);
+ if (address == MAP_FAILED) {
+ DPLOG(ERROR) << "Failed to map memory.";
+ return false;
+ }
+
+ *out_fd = fd.release();
+ *out_address = address;
+ return true;
+}
+
+bool CloseAshmemRegion(int fd, size_t size, void* address) {
+ if (munmap(address, size) == -1) {
+ DPLOG(ERROR) << "Failed to unmap memory.";
+ close(fd);
+ return false;
+ }
+ return close(fd) == 0;
+}
+
+bool LockAshmemRegion(int fd, size_t off, size_t size) {
+ return ashmem_pin_region(fd, off, size) != ASHMEM_WAS_PURGED;
+}
+
+bool UnlockAshmemRegion(int fd, size_t off, size_t size) {
+ const int failed = ashmem_unpin_region(fd, off, size);
+ if (failed)
+ DLOG(ERROR) << "Failed to unpin memory.";
+ return !failed;
+}
+
+} // namespace
+
+namespace internal {
+
+class AshmemRegion {
+ public:
+ // Note that |allocator| must outlive |this|.
+ static scoped_ptr<AshmemRegion> Create(
+ size_t size,
+ const std::string& name,
+ DiscardableMemoryAshmemAllocator* allocator) {
+ DCHECK_EQ(size, AlignToNextPage(size));
+ int fd;
+ void* base;
+ if (!CreateAshmemRegion(name.c_str(), size, &fd, &base))
+ return scoped_ptr<AshmemRegion>();
+ return make_scoped_ptr(new AshmemRegion(fd, size, base, allocator));
+ }
+
+ ~AshmemRegion() {
+ const bool result = CloseAshmemRegion(fd_, size_, base_);
+ DCHECK(result);
+ DCHECK(!highest_allocated_chunk_);
+ }
+
+ // Returns a new instance of DiscardableAshmemChunk whose size is greater or
+ // equal than |actual_size| (which is expected to be greater or equal than
+ // |client_requested_size|).
+ // Allocation works as follows:
+ // 1) Reuse a previously freed chunk and return it if it succeeded. See
+ // ReuseFreeChunk_Locked() below for more information.
+ // 2) If no free chunk could be reused and the region is not big enough for
+ // the requested size then NULL is returned.
+ // 3) If there is enough room in the ashmem region then a new chunk is
+ // returned. This new chunk starts at |offset_| which is the end of the
+ // previously highest chunk in the region.
+ scoped_ptr<DiscardableAshmemChunk> Allocate_Locked(
+ size_t client_requested_size,
+ size_t actual_size) {
+ DCHECK_LE(client_requested_size, actual_size);
+ allocator_->lock_.AssertAcquired();
+
+ // Check that the |highest_allocated_chunk_| field doesn't contain a stale
+ // pointer. It should point to either a free chunk or a used chunk.
+ DCHECK(!highest_allocated_chunk_ ||
+ address_to_free_chunk_map_.find(highest_allocated_chunk_) !=
+ address_to_free_chunk_map_.end() ||
+ used_to_previous_chunk_map_.find(highest_allocated_chunk_) !=
+ used_to_previous_chunk_map_.end());
+
+ scoped_ptr<DiscardableAshmemChunk> memory = ReuseFreeChunk_Locked(
+ client_requested_size, actual_size);
+ if (memory)
+ return memory.Pass();
+
+ if (size_ - offset_ < actual_size) {
+ // This region does not have enough space left to hold the requested size.
+ return scoped_ptr<DiscardableAshmemChunk>();
+ }
+
+ void* const address = static_cast<char*>(base_) + offset_;
+ memory.reset(
+ new DiscardableAshmemChunk(this, fd_, address, offset_, actual_size));
+
+ used_to_previous_chunk_map_.insert(
+ std::make_pair(address, highest_allocated_chunk_));
+ highest_allocated_chunk_ = address;
+ offset_ += actual_size;
+ DCHECK_LE(offset_, size_);
+ return memory.Pass();
+ }
+
+ void OnChunkDeletion(void* chunk, size_t size) {
+ AutoLock auto_lock(allocator_->lock_);
+ MergeAndAddFreeChunk_Locked(chunk, size);
+ // Note that |this| might be deleted beyond this point.
+ }
+
+ private:
+ struct FreeChunk {
+ FreeChunk() : previous_chunk(NULL), start(NULL), size(0) {}
+
+ explicit FreeChunk(size_t size)
+ : previous_chunk(NULL),
+ start(NULL),
+ size(size) {
+ }
+
+ FreeChunk(void* previous_chunk, void* start, size_t size)
+ : previous_chunk(previous_chunk),
+ start(start),
+ size(size) {
+ DCHECK_LT(previous_chunk, start);
+ }
+
+ void* const previous_chunk;
+ void* const start;
+ const size_t size;
+
+ bool is_null() const { return !start; }
+
+ bool operator<(const FreeChunk& other) const {
+ return size < other.size;
+ }
+ };
+
+ // Note that |allocator| must outlive |this|.
+ AshmemRegion(int fd,
+ size_t size,
+ void* base,
+ DiscardableMemoryAshmemAllocator* allocator)
+ : fd_(fd),
+ size_(size),
+ base_(base),
+ allocator_(allocator),
+ highest_allocated_chunk_(NULL),
+ offset_(0) {
+ DCHECK_GE(fd_, 0);
+ DCHECK_GE(size, kMinAshmemRegionSize);
+ DCHECK(base);
+ DCHECK(allocator);
+ }
+
+ // Tries to reuse a previously freed chunk by doing a closest size match.
+ scoped_ptr<DiscardableAshmemChunk> ReuseFreeChunk_Locked(
+ size_t client_requested_size,
+ size_t actual_size) {
+ allocator_->lock_.AssertAcquired();
+ const FreeChunk reused_chunk = RemoveFreeChunkFromIterator_Locked(
+ free_chunks_.lower_bound(FreeChunk(actual_size)));
+ if (reused_chunk.is_null())
+ return scoped_ptr<DiscardableAshmemChunk>();
+
+ used_to_previous_chunk_map_.insert(
+ std::make_pair(reused_chunk.start, reused_chunk.previous_chunk));
+ size_t reused_chunk_size = reused_chunk.size;
+ // |client_requested_size| is used below rather than |actual_size| to
+ // reflect the amount of bytes that would not be usable by the client (i.e.
+ // wasted). Using |actual_size| instead would not allow us to detect
+ // fragmentation caused by the client if he did misaligned allocations.
+ DCHECK_GE(reused_chunk.size, client_requested_size);
+ const size_t fragmentation_bytes =
+ reused_chunk.size - client_requested_size;
+
+ if (fragmentation_bytes > kMaxChunkFragmentationBytes) {
+ // Split the free chunk being recycled so that its unused tail doesn't get
+ // reused (i.e. locked) which would prevent it from being evicted under
+ // memory pressure.
+ reused_chunk_size = actual_size;
+ void* const new_chunk_start =
+ static_cast<char*>(reused_chunk.start) + actual_size;
+ if (reused_chunk.start == highest_allocated_chunk_) {
+ // We also need to update the pointer to the highest allocated chunk in
+ // case we are splitting the highest chunk.
+ highest_allocated_chunk_ = new_chunk_start;
+ }
+ DCHECK_GT(reused_chunk.size, actual_size);
+ const size_t new_chunk_size = reused_chunk.size - actual_size;
+ // Note that merging is not needed here since there can't be contiguous
+ // free chunks at this point.
+ AddFreeChunk_Locked(
+ FreeChunk(reused_chunk.start, new_chunk_start, new_chunk_size));
+ }
+
+ const size_t offset =
+ static_cast<char*>(reused_chunk.start) - static_cast<char*>(base_);
+ LockAshmemRegion(fd_, offset, reused_chunk_size);
+ scoped_ptr<DiscardableAshmemChunk> memory(
+ new DiscardableAshmemChunk(
+ this, fd_, reused_chunk.start, offset, reused_chunk_size));
+ return memory.Pass();
+ }
+
+ // Makes the chunk identified with the provided arguments free and possibly
+ // merges this chunk with the previous and next contiguous ones.
+ // If the provided chunk is the only one used (and going to be freed) in the
+ // region then the internal ashmem region is closed so that the underlying
+ // physical pages are immediately released.
+ // Note that free chunks are unlocked therefore they can be reclaimed by the
+ // kernel if needed (under memory pressure) but they are not immediately
+ // released unfortunately since madvise(MADV_REMOVE) and
+ // fallocate(FALLOC_FL_PUNCH_HOLE) don't seem to work on ashmem. This might
+ // change in versions of kernel >=3.5 though. The fact that free chunks are
+ // not immediately released is the reason why we are trying to minimize
+ // fragmentation in order not to cause "artificial" memory pressure.
+ void MergeAndAddFreeChunk_Locked(void* chunk, size_t size) {
+ allocator_->lock_.AssertAcquired();
+ size_t new_free_chunk_size = size;
+ // Merge with the previous chunk.
+ void* first_free_chunk = chunk;
+ DCHECK(!used_to_previous_chunk_map_.empty());
+ const hash_map<void*, void*>::iterator previous_chunk_it =
+ used_to_previous_chunk_map_.find(chunk);
+ DCHECK(previous_chunk_it != used_to_previous_chunk_map_.end());
+ void* previous_chunk = previous_chunk_it->second;
+ used_to_previous_chunk_map_.erase(previous_chunk_it);
+
+ if (previous_chunk) {
+ const FreeChunk free_chunk = RemoveFreeChunk_Locked(previous_chunk);
+ if (!free_chunk.is_null()) {
+ new_free_chunk_size += free_chunk.size;
+ first_free_chunk = previous_chunk;
+ if (chunk == highest_allocated_chunk_)
+ highest_allocated_chunk_ = previous_chunk;
+
+ // There should not be more contiguous previous free chunks.
+ previous_chunk = free_chunk.previous_chunk;
+ DCHECK(!address_to_free_chunk_map_.count(previous_chunk));
+ }
+ }
+
+ // Merge with the next chunk if free and present.
+ void* next_chunk = static_cast<char*>(chunk) + size;
+ const FreeChunk next_free_chunk = RemoveFreeChunk_Locked(next_chunk);
+ if (!next_free_chunk.is_null()) {
+ new_free_chunk_size += next_free_chunk.size;
+ if (next_free_chunk.start == highest_allocated_chunk_)
+ highest_allocated_chunk_ = first_free_chunk;
+
+ // Same as above.
+ DCHECK(!address_to_free_chunk_map_.count(static_cast<char*>(next_chunk) +
+ next_free_chunk.size));
+ }
+
+ const bool whole_ashmem_region_is_free =
+ used_to_previous_chunk_map_.empty();
+ if (!whole_ashmem_region_is_free) {
+ AddFreeChunk_Locked(
+ FreeChunk(previous_chunk, first_free_chunk, new_free_chunk_size));
+ return;
+ }
+
+ // The whole ashmem region is free thus it can be deleted.
+ DCHECK_EQ(base_, first_free_chunk);
+ DCHECK_EQ(base_, highest_allocated_chunk_);
+ DCHECK(free_chunks_.empty());
+ DCHECK(address_to_free_chunk_map_.empty());
+ DCHECK(used_to_previous_chunk_map_.empty());
+ highest_allocated_chunk_ = NULL;
+ allocator_->DeleteAshmemRegion_Locked(this); // Deletes |this|.
+ }
+
+ void AddFreeChunk_Locked(const FreeChunk& free_chunk) {
+ allocator_->lock_.AssertAcquired();
+ const std::multiset<FreeChunk>::iterator it = free_chunks_.insert(
+ free_chunk);
+ address_to_free_chunk_map_.insert(std::make_pair(free_chunk.start, it));
+ // Update the next used contiguous chunk, if any, since its previous chunk
+ // may have changed due to free chunks merging/splitting.
+ void* const next_used_contiguous_chunk =
+ static_cast<char*>(free_chunk.start) + free_chunk.size;
+ hash_map<void*, void*>::iterator previous_it =
+ used_to_previous_chunk_map_.find(next_used_contiguous_chunk);
+ if (previous_it != used_to_previous_chunk_map_.end())
+ previous_it->second = free_chunk.start;
+ }
+
+ // Finds and removes the free chunk, if any, whose start address is
+ // |chunk_start|. Returns a copy of the unlinked free chunk or a free chunk
+ // whose content is null if it was not found.
+ FreeChunk RemoveFreeChunk_Locked(void* chunk_start) {
+ allocator_->lock_.AssertAcquired();
+ const hash_map<
+ void*, std::multiset<FreeChunk>::iterator>::iterator it =
+ address_to_free_chunk_map_.find(chunk_start);
+ if (it == address_to_free_chunk_map_.end())
+ return FreeChunk();
+ return RemoveFreeChunkFromIterator_Locked(it->second);
+ }
+
+ // Same as above but takes an iterator in.
+ FreeChunk RemoveFreeChunkFromIterator_Locked(
+ std::multiset<FreeChunk>::iterator free_chunk_it) {
+ allocator_->lock_.AssertAcquired();
+ if (free_chunk_it == free_chunks_.end())
+ return FreeChunk();
+ DCHECK(free_chunk_it != free_chunks_.end());
+ const FreeChunk free_chunk(*free_chunk_it);
+ address_to_free_chunk_map_.erase(free_chunk_it->start);
+ free_chunks_.erase(free_chunk_it);
+ return free_chunk;
+ }
+
+ const int fd_;
+ const size_t size_;
+ void* const base_;
+ DiscardableMemoryAshmemAllocator* const allocator_;
+ // Points to the chunk with the highest address in the region. This pointer
+ // needs to be carefully updated when chunks are merged/split.
+ void* highest_allocated_chunk_;
+ // Points to the end of |highest_allocated_chunk_|.
+ size_t offset_;
+ // Allows free chunks recycling (lookup, insertion and removal) in O(log N).
+ // Note that FreeChunk values are indexed by their size and also note that
+ // multiple free chunks can have the same size (which is why multiset<> is
+ // used instead of e.g. set<>).
+ std::multiset<FreeChunk> free_chunks_;
+ // Used while merging free contiguous chunks to erase free chunks (from their
+ // start address) in constant time. Note that multiset<>::{insert,erase}()
+ // don't invalidate iterators (except the one for the element being removed
+ // obviously).
+ hash_map<
+ void*, std::multiset<FreeChunk>::iterator> address_to_free_chunk_map_;
+ // Maps the address of *used* chunks to the address of their previous
+ // contiguous chunk.
+ hash_map<void*, void*> used_to_previous_chunk_map_;
+
+ DISALLOW_COPY_AND_ASSIGN(AshmemRegion);
+};
+
+DiscardableAshmemChunk::~DiscardableAshmemChunk() {
+ if (locked_)
+ UnlockAshmemRegion(fd_, offset_, size_);
+ ashmem_region_->OnChunkDeletion(address_, size_);
+}
+
+bool DiscardableAshmemChunk::Lock() {
+ DCHECK(!locked_);
+ locked_ = true;
+ return LockAshmemRegion(fd_, offset_, size_);
+}
+
+void DiscardableAshmemChunk::Unlock() {
+ DCHECK(locked_);
+ locked_ = false;
+ UnlockAshmemRegion(fd_, offset_, size_);
+}
+
+void* DiscardableAshmemChunk::Memory() const {
+ return address_;
+}
+
+// Note that |ashmem_region| must outlive |this|.
+DiscardableAshmemChunk::DiscardableAshmemChunk(AshmemRegion* ashmem_region,
+ int fd,
+ void* address,
+ size_t offset,
+ size_t size)
+ : ashmem_region_(ashmem_region),
+ fd_(fd),
+ address_(address),
+ offset_(offset),
+ size_(size),
+ locked_(true) {
+}
+
+DiscardableMemoryAshmemAllocator::DiscardableMemoryAshmemAllocator(
+ const std::string& name,
+ size_t ashmem_region_size)
+ : name_(name),
+ ashmem_region_size_(
+ std::max(kMinAshmemRegionSize, AlignToNextPage(ashmem_region_size))),
+ last_ashmem_region_size_(0) {
+ DCHECK_GE(ashmem_region_size_, kMinAshmemRegionSize);
+}
+
+DiscardableMemoryAshmemAllocator::~DiscardableMemoryAshmemAllocator() {
+ DCHECK(ashmem_regions_.empty());
+}
+
+scoped_ptr<DiscardableAshmemChunk> DiscardableMemoryAshmemAllocator::Allocate(
+ size_t size) {
+ const size_t aligned_size = AlignToNextPage(size);
+ if (!aligned_size)
+ return scoped_ptr<DiscardableAshmemChunk>();
+ // TODO(pliard): make this function less naive by e.g. moving the free chunks
+ // multiset to the allocator itself in order to decrease even more
+ // fragmentation/speedup allocation. Note that there should not be more than a
+ // couple (=5) of AshmemRegion instances in practice though.
+ AutoLock auto_lock(lock_);
+ DCHECK_LE(ashmem_regions_.size(), 5U);
+ for (ScopedVector<AshmemRegion>::iterator it = ashmem_regions_.begin();
+ it != ashmem_regions_.end(); ++it) {
+ scoped_ptr<DiscardableAshmemChunk> memory(
+ (*it)->Allocate_Locked(size, aligned_size));
+ if (memory)
+ return memory.Pass();
+ }
+ // The creation of the (large) ashmem region might fail if the address space
+ // is too fragmented. In case creation fails the allocator retries by
+ // repetitively dividing the size by 2.
+ const size_t min_region_size = std::max(kMinAshmemRegionSize, aligned_size);
+ for (size_t region_size = std::max(ashmem_region_size_, aligned_size);
+ region_size >= min_region_size;
+ region_size = AlignToNextPage(region_size / 2)) {
+ scoped_ptr<AshmemRegion> new_region(
+ AshmemRegion::Create(region_size, name_.c_str(), this));
+ if (!new_region)
+ continue;
+ last_ashmem_region_size_ = region_size;
+ ashmem_regions_.push_back(new_region.release());
+ return ashmem_regions_.back()->Allocate_Locked(size, aligned_size);
+ }
+ // TODO(pliard): consider adding an histogram to see how often this happens.
+ return scoped_ptr<DiscardableAshmemChunk>();
+}
+
+size_t DiscardableMemoryAshmemAllocator::last_ashmem_region_size() const {
+ AutoLock auto_lock(lock_);
+ return last_ashmem_region_size_;
+}
+
+void DiscardableMemoryAshmemAllocator::DeleteAshmemRegion_Locked(
+ AshmemRegion* region) {
+ lock_.AssertAcquired();
+ // Note that there should not be more than a couple of ashmem region instances
+ // in |ashmem_regions_|.
+ DCHECK_LE(ashmem_regions_.size(), 5U);
+ const ScopedVector<AshmemRegion>::iterator it = std::find(
+ ashmem_regions_.begin(), ashmem_regions_.end(), region);
+ DCHECK_NE(ashmem_regions_.end(), it);
+ std::swap(*it, ashmem_regions_.back());
+ ashmem_regions_.pop_back();
+}
+
+} // namespace internal
+} // namespace base
diff --git a/chromium/base/memory/discardable_memory_ashmem_allocator.h b/chromium/base/memory/discardable_memory_ashmem_allocator.h
new file mode 100644
index 00000000000..996dde92496
--- /dev/null
+++ b/chromium/base/memory/discardable_memory_ashmem_allocator.h
@@ -0,0 +1,93 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_MEMORY_DISCARDABLE_MEMORY_ASHMEM_ALLOCATOR_H_
+#define BASE_MEMORY_DISCARDABLE_MEMORY_ASHMEM_ALLOCATOR_H_
+
+#include <string>
+
+#include "base/base_export.h"
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
+#include "base/synchronization/lock.h"
+
+namespace base {
+namespace internal {
+
+class AshmemRegion;
+
+// Internal class, whose instances are returned to the client of the allocator
+// (e.g. DiscardableMemoryAshmem), that mimicks the DiscardableMemory interface.
+class BASE_EXPORT_PRIVATE DiscardableAshmemChunk {
+ public:
+ ~DiscardableAshmemChunk();
+
+ // Returns whether the memory is still resident.
+ bool Lock();
+
+ void Unlock();
+
+ void* Memory() const;
+
+ private:
+ friend class AshmemRegion;
+
+ DiscardableAshmemChunk(AshmemRegion* ashmem_region,
+ int fd,
+ void* address,
+ size_t offset,
+ size_t size);
+
+ AshmemRegion* const ashmem_region_;
+ const int fd_;
+ void* const address_;
+ const size_t offset_;
+ const size_t size_;
+ bool locked_;
+
+ DISALLOW_COPY_AND_ASSIGN(DiscardableAshmemChunk);
+};
+
+// Ashmem regions are backed by a file (descriptor) therefore they are a limited
+// resource. This allocator minimizes the problem by allocating large ashmem
+// regions internally and returning smaller chunks to the client.
+// Allocated chunks are systematically aligned on a page boundary therefore this
+// allocator should not be used for small allocations.
+class BASE_EXPORT_PRIVATE DiscardableMemoryAshmemAllocator {
+ public:
+ // Note that |name| is only used for debugging/measurement purposes.
+ // |ashmem_region_size| is the size that will be used to create the underlying
+ // ashmem regions and is expected to be greater or equal than 32 MBytes.
+ DiscardableMemoryAshmemAllocator(const std::string& name,
+ size_t ashmem_region_size);
+
+ ~DiscardableMemoryAshmemAllocator();
+
+ // Note that the allocator must outlive the returned DiscardableAshmemChunk
+ // instance.
+ scoped_ptr<DiscardableAshmemChunk> Allocate(size_t size);
+
+ // Returns the size of the last ashmem region which was created. This is used
+ // for testing only.
+ size_t last_ashmem_region_size() const;
+
+ private:
+ friend class AshmemRegion;
+
+ void DeleteAshmemRegion_Locked(AshmemRegion* region);
+
+ const std::string name_;
+ const size_t ashmem_region_size_;
+ mutable Lock lock_;
+ size_t last_ashmem_region_size_;
+ ScopedVector<AshmemRegion> ashmem_regions_;
+
+ DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryAshmemAllocator);
+};
+
+} // namespace internal
+} // namespace base
+
+#endif // BASE_MEMORY_DISCARDABLE_MEMORY_ASHMEM_ALLOCATOR_H_
diff --git a/chromium/base/memory/discardable_memory_ashmem_allocator_unittest.cc b/chromium/base/memory/discardable_memory_ashmem_allocator_unittest.cc
new file mode 100644
index 00000000000..e9f63ba3439
--- /dev/null
+++ b/chromium/base/memory/discardable_memory_ashmem_allocator_unittest.cc
@@ -0,0 +1,319 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/memory/discardable_memory_ashmem_allocator.h"
+
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "base/memory/discardable_memory.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_split.h"
+#include "base/strings/stringprintf.h"
+#include "build/build_config.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace base {
+namespace internal {
+
+const char kAllocatorName[] = "allocator-for-testing";
+
+const size_t kAshmemRegionSizeForTesting = 32 * 1024 * 1024;
+const size_t kPageSize = 4096;
+
+const size_t kMaxAllowedAllocationSize =
+ std::numeric_limits<size_t>::max() - kPageSize + 1;
+
+class DiscardableMemoryAshmemAllocatorTest : public testing::Test {
+ protected:
+ DiscardableMemoryAshmemAllocatorTest()
+ : allocator_(kAllocatorName, kAshmemRegionSizeForTesting) {
+ }
+
+ DiscardableMemoryAshmemAllocator allocator_;
+};
+
+void WriteToDiscardableAshmemChunk(DiscardableAshmemChunk* memory,
+ size_t size) {
+ // Write to the first and the last pages only to avoid paging in up to 64
+ // MBytes.
+ static_cast<char*>(memory->Memory())[0] = 'a';
+ static_cast<char*>(memory->Memory())[size - 1] = 'a';
+}
+
+TEST_F(DiscardableMemoryAshmemAllocatorTest, Basic) {
+ const size_t size = 128;
+ scoped_ptr<DiscardableAshmemChunk> memory(allocator_.Allocate(size));
+ ASSERT_TRUE(memory);
+ WriteToDiscardableAshmemChunk(memory.get(), size);
+}
+
+TEST_F(DiscardableMemoryAshmemAllocatorTest, ZeroAllocationIsNotSupported) {
+ scoped_ptr<DiscardableAshmemChunk> memory(allocator_.Allocate(0));
+ ASSERT_FALSE(memory);
+}
+
+TEST_F(DiscardableMemoryAshmemAllocatorTest, TooLargeAllocationFails) {
+ scoped_ptr<DiscardableAshmemChunk> memory(
+ allocator_.Allocate(kMaxAllowedAllocationSize + 1));
+ // Page-alignment would have caused an overflow resulting in a small
+ // allocation if the input size wasn't checked correctly.
+ ASSERT_FALSE(memory);
+}
+
+TEST_F(DiscardableMemoryAshmemAllocatorTest,
+ AshmemRegionsAreNotSmallerThanRequestedSize) {
+ // The creation of the underlying ashmem region is expected to fail since
+ // there should not be enough room in the address space. When ashmem creation
+ // fails, the allocator repetitively retries by dividing the size by 2. This
+ // size should not be smaller than the size the user requested so the
+ // allocation here should just fail (and not succeed with the minimum ashmem
+ // region size).
+ scoped_ptr<DiscardableAshmemChunk> memory(
+ allocator_.Allocate(kMaxAllowedAllocationSize));
+ ASSERT_FALSE(memory);
+}
+
+TEST_F(DiscardableMemoryAshmemAllocatorTest,
+ AshmemRegionsAreAlwaysPageAligned) {
+ // Use a separate allocator here so that we can override the ashmem region
+ // size.
+ DiscardableMemoryAshmemAllocator allocator(
+ kAllocatorName, kMaxAllowedAllocationSize);
+ scoped_ptr<DiscardableAshmemChunk> memory(allocator.Allocate(kPageSize));
+ ASSERT_TRUE(memory);
+ EXPECT_GT(kMaxAllowedAllocationSize, allocator.last_ashmem_region_size());
+ ASSERT_TRUE(allocator.last_ashmem_region_size() % kPageSize == 0);
+}
+
+TEST_F(DiscardableMemoryAshmemAllocatorTest, LargeAllocation) {
+ const size_t size = 64 * 1024 * 1024;
+ scoped_ptr<DiscardableAshmemChunk> memory(allocator_.Allocate(size));
+ ASSERT_TRUE(memory);
+ WriteToDiscardableAshmemChunk(memory.get(), size);
+}
+
+TEST_F(DiscardableMemoryAshmemAllocatorTest, ChunksArePageAligned) {
+ scoped_ptr<DiscardableAshmemChunk> memory(allocator_.Allocate(kPageSize));
+ ASSERT_TRUE(memory);
+ EXPECT_EQ(0U, reinterpret_cast<uint64_t>(memory->Memory()) % kPageSize);
+ WriteToDiscardableAshmemChunk(memory.get(), kPageSize);
+}
+
+TEST_F(DiscardableMemoryAshmemAllocatorTest, AllocateFreeAllocate) {
+ scoped_ptr<DiscardableAshmemChunk> memory(allocator_.Allocate(kPageSize));
+ // Extra allocation that prevents the region from being deleted when |memory|
+ // gets deleted.
+ scoped_ptr<DiscardableAshmemChunk> memory_lock(
+ allocator_.Allocate(kPageSize));
+ ASSERT_TRUE(memory);
+ void* const address = memory->Memory();
+ memory->Unlock(); // Tests that the reused chunk is being locked correctly.
+ memory.reset();
+ memory = allocator_.Allocate(kPageSize);
+ ASSERT_TRUE(memory);
+ // The previously freed chunk should be reused.
+ EXPECT_EQ(address, memory->Memory());
+ WriteToDiscardableAshmemChunk(memory.get(), kPageSize);
+}
+
+TEST_F(DiscardableMemoryAshmemAllocatorTest,
+ FreeingWholeAshmemRegionClosesAshmem) {
+ scoped_ptr<DiscardableAshmemChunk> memory(allocator_.Allocate(kPageSize));
+ ASSERT_TRUE(memory);
+ const int kMagic = 0xdeadbeef;
+ *static_cast<int*>(memory->Memory()) = kMagic;
+ memory.reset();
+ // The previous ashmem region should have been closed thus it should not be
+ // reused.
+ memory = allocator_.Allocate(kPageSize);
+ ASSERT_TRUE(memory);
+ EXPECT_NE(kMagic, *static_cast<const int*>(memory->Memory()));
+}
+
+TEST_F(DiscardableMemoryAshmemAllocatorTest, AllocateUsesBestFitAlgorithm) {
+ scoped_ptr<DiscardableAshmemChunk> memory1(
+ allocator_.Allocate(3 * kPageSize));
+ ASSERT_TRUE(memory1);
+ scoped_ptr<DiscardableAshmemChunk> memory2(
+ allocator_.Allocate(2 * kPageSize));
+ ASSERT_TRUE(memory2);
+ scoped_ptr<DiscardableAshmemChunk> memory3(
+ allocator_.Allocate(1 * kPageSize));
+ ASSERT_TRUE(memory3);
+ void* const address_3 = memory3->Memory();
+ memory1.reset();
+ // Don't free |memory2| to avoid merging the 3 blocks together.
+ memory3.reset();
+ memory1 = allocator_.Allocate(1 * kPageSize);
+ ASSERT_TRUE(memory1);
+ // The chunk whose size is closest to the requested size should be reused.
+ EXPECT_EQ(address_3, memory1->Memory());
+ WriteToDiscardableAshmemChunk(memory1.get(), kPageSize);
+}
+
+TEST_F(DiscardableMemoryAshmemAllocatorTest, MergeFreeChunks) {
+ scoped_ptr<DiscardableAshmemChunk> memory1(allocator_.Allocate(kPageSize));
+ ASSERT_TRUE(memory1);
+ scoped_ptr<DiscardableAshmemChunk> memory2(allocator_.Allocate(kPageSize));
+ ASSERT_TRUE(memory2);
+ scoped_ptr<DiscardableAshmemChunk> memory3(allocator_.Allocate(kPageSize));
+ ASSERT_TRUE(memory3);
+ scoped_ptr<DiscardableAshmemChunk> memory4(allocator_.Allocate(kPageSize));
+ ASSERT_TRUE(memory4);
+ void* const memory1_address = memory1->Memory();
+ memory1.reset();
+ memory3.reset();
+ // Freeing |memory2| (located between memory1 and memory3) should merge the
+ // three free blocks together.
+ memory2.reset();
+ memory1 = allocator_.Allocate(3 * kPageSize);
+ EXPECT_EQ(memory1_address, memory1->Memory());
+}
+
+TEST_F(DiscardableMemoryAshmemAllocatorTest, MergeFreeChunksAdvanced) {
+ scoped_ptr<DiscardableAshmemChunk> memory1(
+ allocator_.Allocate(4 * kPageSize));
+ ASSERT_TRUE(memory1);
+ scoped_ptr<DiscardableAshmemChunk> memory2(
+ allocator_.Allocate(4 * kPageSize));
+ ASSERT_TRUE(memory2);
+ void* const memory1_address = memory1->Memory();
+ memory1.reset();
+ memory1 = allocator_.Allocate(2 * kPageSize);
+ memory2.reset();
+ // At this point, the region should be in this state:
+ // 8 KBytes (used), 24 KBytes (free).
+ memory2 = allocator_.Allocate(6 * kPageSize);
+ EXPECT_EQ(
+ static_cast<const char*>(memory2->Memory()),
+ static_cast<const char*>(memory1_address) + 2 * kPageSize);
+}
+
+TEST_F(DiscardableMemoryAshmemAllocatorTest, MergeFreeChunksAdvanced2) {
+ scoped_ptr<DiscardableAshmemChunk> memory1(
+ allocator_.Allocate(4 * kPageSize));
+ ASSERT_TRUE(memory1);
+ scoped_ptr<DiscardableAshmemChunk> memory2(
+ allocator_.Allocate(4 * kPageSize));
+ ASSERT_TRUE(memory2);
+ void* const memory1_address = memory1->Memory();
+ memory1.reset();
+ memory1 = allocator_.Allocate(2 * kPageSize);
+ scoped_ptr<DiscardableAshmemChunk> memory3(
+ allocator_.Allocate(2 * kPageSize));
+ // At this point, the region should be in this state:
+ // 8 KBytes (used), 8 KBytes (used), 16 KBytes (used).
+ memory3.reset();
+ memory2.reset();
+ // At this point, the region should be in this state:
+ // 8 KBytes (used), 24 KBytes (free).
+ memory2 = allocator_.Allocate(6 * kPageSize);
+ EXPECT_EQ(
+ static_cast<const char*>(memory2->Memory()),
+ static_cast<const char*>(memory1_address) + 2 * kPageSize);
+}
+
+TEST_F(DiscardableMemoryAshmemAllocatorTest,
+ MergeFreeChunksAndDeleteAshmemRegion) {
+ scoped_ptr<DiscardableAshmemChunk> memory1(
+ allocator_.Allocate(4 * kPageSize));
+ ASSERT_TRUE(memory1);
+ scoped_ptr<DiscardableAshmemChunk> memory2(
+ allocator_.Allocate(4 * kPageSize));
+ ASSERT_TRUE(memory2);
+ memory1.reset();
+ memory1 = allocator_.Allocate(2 * kPageSize);
+ scoped_ptr<DiscardableAshmemChunk> memory3(
+ allocator_.Allocate(2 * kPageSize));
+ // At this point, the region should be in this state:
+ // 8 KBytes (used), 8 KBytes (used), 16 KBytes (used).
+ memory1.reset();
+ memory3.reset();
+ // At this point, the region should be in this state:
+ // 8 KBytes (free), 8 KBytes (used), 8 KBytes (free).
+ const int kMagic = 0xdeadbeef;
+ *static_cast<int*>(memory2->Memory()) = kMagic;
+ memory2.reset();
+ // The whole region should have been deleted.
+ memory2 = allocator_.Allocate(2 * kPageSize);
+ EXPECT_NE(kMagic, *static_cast<int*>(memory2->Memory()));
+}
+
+TEST_F(DiscardableMemoryAshmemAllocatorTest,
+ TooLargeFreeChunksDontCauseTooMuchFragmentationWhenRecycled) {
+ // Keep |memory_1| below allocated so that the ashmem region doesn't get
+ // closed when |memory_2| is deleted.
+ scoped_ptr<DiscardableAshmemChunk> memory_1(allocator_.Allocate(64 * 1024));
+ ASSERT_TRUE(memory_1);
+ scoped_ptr<DiscardableAshmemChunk> memory_2(allocator_.Allocate(32 * 1024));
+ ASSERT_TRUE(memory_2);
+ void* const address = memory_2->Memory();
+ memory_2.reset();
+ const size_t size = 16 * 1024;
+ memory_2 = allocator_.Allocate(size);
+ ASSERT_TRUE(memory_2);
+ EXPECT_EQ(address, memory_2->Memory());
+ WriteToDiscardableAshmemChunk(memory_2.get(), size);
+ scoped_ptr<DiscardableAshmemChunk> memory_3(allocator_.Allocate(size));
+ // The unused tail (16 KBytes large) of the previously freed chunk should be
+ // reused.
+ EXPECT_EQ(static_cast<char*>(address) + size, memory_3->Memory());
+ WriteToDiscardableAshmemChunk(memory_3.get(), size);
+}
+
+TEST_F(DiscardableMemoryAshmemAllocatorTest, UseMultipleAshmemRegions) {
+ // Leave one page untouched at the end of the ashmem region.
+ const size_t size = kAshmemRegionSizeForTesting - kPageSize;
+ scoped_ptr<DiscardableAshmemChunk> memory1(allocator_.Allocate(size));
+ ASSERT_TRUE(memory1);
+ WriteToDiscardableAshmemChunk(memory1.get(), size);
+
+ scoped_ptr<DiscardableAshmemChunk> memory2(
+ allocator_.Allocate(kAshmemRegionSizeForTesting));
+ ASSERT_TRUE(memory2);
+ WriteToDiscardableAshmemChunk(memory2.get(), kAshmemRegionSizeForTesting);
+ // The last page of the first ashmem region should be used for this
+ // allocation.
+ scoped_ptr<DiscardableAshmemChunk> memory3(allocator_.Allocate(kPageSize));
+ ASSERT_TRUE(memory3);
+ WriteToDiscardableAshmemChunk(memory3.get(), kPageSize);
+ EXPECT_EQ(memory3->Memory(), static_cast<char*>(memory1->Memory()) + size);
+}
+
+TEST_F(DiscardableMemoryAshmemAllocatorTest,
+ HighestAllocatedChunkPointerIsUpdatedWhenHighestChunkGetsSplit) {
+ // Prevents the ashmem region from getting closed when |memory2| gets freed.
+ scoped_ptr<DiscardableAshmemChunk> memory1(allocator_.Allocate(kPageSize));
+ ASSERT_TRUE(memory1);
+
+ scoped_ptr<DiscardableAshmemChunk> memory2(
+ allocator_.Allocate(4 * kPageSize));
+ ASSERT_TRUE(memory2);
+
+ memory2.reset();
+ memory2 = allocator_.Allocate(kPageSize);
+ // There should now be a free chunk of size 3 * |kPageSize| starting at offset
+ // 2 * |kPageSize| and the pointer to the highest allocated chunk should have
+ // also been updated to |base_| + 2 * |kPageSize|. This pointer is used to
+ // maintain the container mapping a chunk address to its previous chunk and
+ // this map is in turn used while merging previous contiguous chunks.
+
+ // Allocate more than 3 * |kPageSize| so that the free chunk of size 3 *
+ // |kPageSize| is not reused and |highest_allocated_chunk_| gets used instead.
+ scoped_ptr<DiscardableAshmemChunk> memory3(
+ allocator_.Allocate(4 * kPageSize));
+ ASSERT_TRUE(memory3);
+
+ // Deleting |memory3| (whose size is 4 * |kPageSize|) should result in a merge
+ // with its previous chunk which is the free chunk of size |3 * kPageSize|.
+ memory3.reset();
+ memory3 = allocator_.Allocate((3 + 4) * kPageSize);
+ EXPECT_EQ(memory3->Memory(),
+ static_cast<const char*>(memory2->Memory()) + kPageSize);
+}
+
+} // namespace internal
+} // namespace base
diff --git a/chromium/base/memory/discardable_memory_emulated.cc b/chromium/base/memory/discardable_memory_emulated.cc
index ed7c42c750f..340a181834a 100644
--- a/chromium/base/memory/discardable_memory_emulated.cc
+++ b/chromium/base/memory/discardable_memory_emulated.cc
@@ -5,60 +5,103 @@
#include "base/memory/discardable_memory_emulated.h"
#include "base/lazy_instance.h"
-#include "base/memory/discardable_memory_provider.h"
+#include "base/memory/discardable_memory_manager.h"
namespace base {
-
namespace {
-base::LazyInstance<internal::DiscardableMemoryProvider>::Leaky g_provider =
- LAZY_INSTANCE_INITIALIZER;
+// This is admittedly pretty magical.
+const size_t kEmulatedMemoryLimit = 512 * 1024 * 1024;
+const size_t kEmulatedSoftMemoryLimit = 32 * 1024 * 1024;
+const size_t kEmulatedBytesToKeepUnderModeratePressure = 4 * 1024 * 1024;
+const size_t kEmulatedHardMemoryLimitExpirationTimeMs = 1000;
+
+struct SharedState {
+ SharedState()
+ : manager(kEmulatedMemoryLimit,
+ kEmulatedSoftMemoryLimit,
+ kEmulatedBytesToKeepUnderModeratePressure,
+ TimeDelta::FromMilliseconds(
+ kEmulatedHardMemoryLimitExpirationTimeMs)) {}
+
+ internal::DiscardableMemoryManager manager;
+};
+LazyInstance<SharedState>::Leaky g_shared_state = LAZY_INSTANCE_INITIALIZER;
} // namespace
namespace internal {
-DiscardableMemoryEmulated::DiscardableMemoryEmulated(size_t size)
- : is_locked_(false) {
- g_provider.Pointer()->Register(this, size);
+DiscardableMemoryEmulated::DiscardableMemoryEmulated(size_t bytes)
+ : bytes_(bytes),
+ is_locked_(false) {
+ g_shared_state.Pointer()->manager.Register(this, bytes);
}
DiscardableMemoryEmulated::~DiscardableMemoryEmulated() {
if (is_locked_)
Unlock();
- g_provider.Pointer()->Unregister(this);
+ g_shared_state.Pointer()->manager.Unregister(this);
+}
+
+// static
+void DiscardableMemoryEmulated::RegisterMemoryPressureListeners() {
+ g_shared_state.Pointer()->manager.RegisterMemoryPressureListener();
+}
+
+// static
+void DiscardableMemoryEmulated::UnregisterMemoryPressureListeners() {
+ g_shared_state.Pointer()->manager.UnregisterMemoryPressureListener();
+}
+
+// static
+bool DiscardableMemoryEmulated::ReduceMemoryUsage() {
+ return g_shared_state.Pointer()->manager.ReduceMemoryUsage();
+}
+
+// static
+void DiscardableMemoryEmulated::PurgeForTesting() {
+ g_shared_state.Pointer()->manager.PurgeAll();
}
bool DiscardableMemoryEmulated::Initialize() {
- return Lock() == DISCARDABLE_MEMORY_PURGED;
+ return Lock() != DISCARDABLE_MEMORY_LOCK_STATUS_FAILED;
}
-LockDiscardableMemoryStatus DiscardableMemoryEmulated::Lock() {
+DiscardableMemoryLockStatus DiscardableMemoryEmulated::Lock() {
DCHECK(!is_locked_);
bool purged = false;
- memory_ = g_provider.Pointer()->Acquire(this, &purged);
- if (!memory_)
- return DISCARDABLE_MEMORY_FAILED;
+ if (!g_shared_state.Pointer()->manager.AcquireLock(this, &purged))
+ return DISCARDABLE_MEMORY_LOCK_STATUS_FAILED;
is_locked_ = true;
- return purged ? DISCARDABLE_MEMORY_PURGED : DISCARDABLE_MEMORY_SUCCESS;
+ return purged ? DISCARDABLE_MEMORY_LOCK_STATUS_PURGED
+ : DISCARDABLE_MEMORY_LOCK_STATUS_SUCCESS;
}
void DiscardableMemoryEmulated::Unlock() {
DCHECK(is_locked_);
- g_provider.Pointer()->Release(this, memory_.Pass());
+ g_shared_state.Pointer()->manager.ReleaseLock(this);
is_locked_ = false;
}
void* DiscardableMemoryEmulated::Memory() const {
+ DCHECK(is_locked_);
DCHECK(memory_);
return memory_.get();
}
-// static
-void DiscardableMemoryEmulated::PurgeForTesting() {
- g_provider.Pointer()->PurgeAll();
+bool DiscardableMemoryEmulated::AllocateAndAcquireLock() {
+ if (memory_)
+ return true;
+
+ memory_.reset(new uint8[bytes_]);
+ return false;
+}
+
+void DiscardableMemoryEmulated::Purge() {
+ memory_.reset();
}
} // namespace internal
diff --git a/chromium/base/memory/discardable_memory_emulated.h b/chromium/base/memory/discardable_memory_emulated.h
index bd0e834ed06..64e99511b7c 100644
--- a/chromium/base/memory/discardable_memory_emulated.h
+++ b/chromium/base/memory/discardable_memory_emulated.h
@@ -7,25 +7,39 @@
#include "base/memory/discardable_memory.h"
+#include "base/memory/discardable_memory_manager.h"
+
namespace base {
namespace internal {
-class DiscardableMemoryEmulated : public DiscardableMemory {
+class DiscardableMemoryEmulated
+ : public DiscardableMemory,
+ public internal::DiscardableMemoryManagerAllocation {
public:
- explicit DiscardableMemoryEmulated(size_t size);
+ explicit DiscardableMemoryEmulated(size_t bytes);
virtual ~DiscardableMemoryEmulated();
+ static void RegisterMemoryPressureListeners();
+ static void UnregisterMemoryPressureListeners();
+ static bool ReduceMemoryUsage();
+
static void PurgeForTesting();
bool Initialize();
// Overridden from DiscardableMemory:
- virtual LockDiscardableMemoryStatus Lock() OVERRIDE;
+ virtual DiscardableMemoryLockStatus Lock() OVERRIDE;
virtual void Unlock() OVERRIDE;
virtual void* Memory() const OVERRIDE;
+ // Overridden from internal::DiscardableMemoryManagerAllocation:
+ virtual bool AllocateAndAcquireLock() OVERRIDE;
+ virtual void ReleaseLock() OVERRIDE {}
+ virtual void Purge() OVERRIDE;
+
private:
- scoped_ptr<uint8, FreeDeleter> memory_;
+ const size_t bytes_;
+ scoped_ptr<uint8[]> memory_;
bool is_locked_;
DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryEmulated);
diff --git a/chromium/base/memory/discardable_memory_linux.cc b/chromium/base/memory/discardable_memory_linux.cc
index 92e39e5e7d4..b9342e92043 100644
--- a/chromium/base/memory/discardable_memory_linux.cc
+++ b/chromium/base/memory/discardable_memory_linux.cc
@@ -2,29 +2,67 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/memory/discardable_memory.h"
+
+#include "base/logging.h"
#include "base/memory/discardable_memory_emulated.h"
+#include "base/memory/discardable_memory_malloc.h"
namespace base {
// static
-bool DiscardableMemory::SupportedNatively() {
- return false;
+void DiscardableMemory::RegisterMemoryPressureListeners() {
+ internal::DiscardableMemoryEmulated::RegisterMemoryPressureListeners();
+}
+
+// static
+void DiscardableMemory::UnregisterMemoryPressureListeners() {
+ internal::DiscardableMemoryEmulated::UnregisterMemoryPressureListeners();
+}
+
+// static
+bool DiscardableMemory::ReduceMemoryUsage() {
+ return internal::DiscardableMemoryEmulated::ReduceMemoryUsage();
}
// static
-scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemory(
- size_t size) {
- scoped_ptr<internal::DiscardableMemoryEmulated> memory(
- new internal::DiscardableMemoryEmulated(size));
- if (!memory->Initialize())
- return scoped_ptr<DiscardableMemory>();
-
- return memory.PassAs<DiscardableMemory>();
+void DiscardableMemory::GetSupportedTypes(
+ std::vector<DiscardableMemoryType>* types) {
+ const DiscardableMemoryType supported_types[] = {
+ DISCARDABLE_MEMORY_TYPE_EMULATED,
+ DISCARDABLE_MEMORY_TYPE_MALLOC
+ };
+ types->assign(supported_types, supported_types + arraysize(supported_types));
}
// static
-bool DiscardableMemory::PurgeForTestingSupported() {
- return true;
+scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemoryWithType(
+ DiscardableMemoryType type, size_t size) {
+ switch (type) {
+ case DISCARDABLE_MEMORY_TYPE_NONE:
+ case DISCARDABLE_MEMORY_TYPE_ASHMEM:
+ case DISCARDABLE_MEMORY_TYPE_MAC:
+ return scoped_ptr<DiscardableMemory>();
+ case DISCARDABLE_MEMORY_TYPE_EMULATED: {
+ scoped_ptr<internal::DiscardableMemoryEmulated> memory(
+ new internal::DiscardableMemoryEmulated(size));
+ if (!memory->Initialize())
+ return scoped_ptr<DiscardableMemory>();
+
+ return memory.PassAs<DiscardableMemory>();
+ }
+ case DISCARDABLE_MEMORY_TYPE_MALLOC: {
+ scoped_ptr<internal::DiscardableMemoryMalloc> memory(
+ new internal::DiscardableMemoryMalloc(size));
+ if (!memory->Initialize())
+ return scoped_ptr<DiscardableMemory>();
+
+ return memory.PassAs<DiscardableMemory>();
+ }
+ }
+
+ NOTREACHED();
+ return scoped_ptr<DiscardableMemory>();
}
// static
diff --git a/chromium/base/memory/discardable_memory_mac.cc b/chromium/base/memory/discardable_memory_mac.cc
index aa6823509d5..b2184e7d589 100644
--- a/chromium/base/memory/discardable_memory_mac.cc
+++ b/chromium/base/memory/discardable_memory_mac.cc
@@ -5,69 +5,154 @@
#include "base/memory/discardable_memory.h"
#include <mach/mach.h>
-#include <sys/mman.h>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/lazy_instance.h"
#include "base/logging.h"
+#include "base/mac/mach_logging.h"
+#include "base/mac/scoped_mach_vm.h"
+#include "base/memory/discardable_memory_emulated.h"
+#include "base/memory/discardable_memory_malloc.h"
+#include "base/memory/discardable_memory_manager.h"
#include "base/memory/scoped_ptr.h"
namespace base {
namespace {
+// For Mac, have the DiscardableMemoryManager trigger userspace eviction when
+// address space usage gets too high (e.g. 512 MBytes).
+const size_t kMacMemoryLimit = 512 * 1024 * 1024;
+
+struct SharedState {
+ SharedState()
+ : manager(kMacMemoryLimit,
+ kMacMemoryLimit,
+ kMacMemoryLimit,
+ TimeDelta::Max()) {}
+
+ internal::DiscardableMemoryManager manager;
+};
+LazyInstance<SharedState>::Leaky g_shared_state = LAZY_INSTANCE_INITIALIZER;
+
// The VM subsystem allows tagging of memory and 240-255 is reserved for
// application use (see mach/vm_statistics.h). Pick 252 (after chromium's atomic
// weight of ~52).
const int kDiscardableMemoryTag = VM_MAKE_TAG(252);
-class DiscardableMemoryMac : public DiscardableMemory {
+class DiscardableMemoryMac
+ : public DiscardableMemory,
+ public internal::DiscardableMemoryManagerAllocation {
public:
- DiscardableMemoryMac(void* memory, size_t size)
- : memory_(memory),
- size_(size) {
- DCHECK(memory_);
+ explicit DiscardableMemoryMac(size_t bytes)
+ : memory_(0, 0),
+ bytes_(mach_vm_round_page(bytes)),
+ is_locked_(false) {
+ g_shared_state.Pointer()->manager.Register(this, bytes);
}
+ bool Initialize() { return Lock() != DISCARDABLE_MEMORY_LOCK_STATUS_FAILED; }
+
virtual ~DiscardableMemoryMac() {
- vm_deallocate(mach_task_self(),
- reinterpret_cast<vm_address_t>(memory_),
- size_);
+ if (is_locked_)
+ Unlock();
+ g_shared_state.Pointer()->manager.Unregister(this);
}
- virtual LockDiscardableMemoryStatus Lock() OVERRIDE {
- DCHECK_EQ(0, mprotect(memory_, size_, PROT_READ | PROT_WRITE));
- int state = VM_PURGABLE_NONVOLATILE;
- kern_return_t ret = vm_purgable_control(
- mach_task_self(),
- reinterpret_cast<vm_address_t>(memory_),
- VM_PURGABLE_SET_STATE,
- &state);
- if (ret != KERN_SUCCESS)
- return DISCARDABLE_MEMORY_FAILED;
-
- return state & VM_PURGABLE_EMPTY ? DISCARDABLE_MEMORY_PURGED
- : DISCARDABLE_MEMORY_SUCCESS;
+ // Overridden from DiscardableMemory:
+ virtual DiscardableMemoryLockStatus Lock() OVERRIDE {
+ DCHECK(!is_locked_);
+
+ bool purged = false;
+ if (!g_shared_state.Pointer()->manager.AcquireLock(this, &purged))
+ return DISCARDABLE_MEMORY_LOCK_STATUS_FAILED;
+
+ is_locked_ = true;
+ return purged ? DISCARDABLE_MEMORY_LOCK_STATUS_PURGED
+ : DISCARDABLE_MEMORY_LOCK_STATUS_SUCCESS;
}
virtual void Unlock() OVERRIDE {
- int state = VM_PURGABLE_VOLATILE | VM_VOLATILE_GROUP_DEFAULT;
- kern_return_t ret = vm_purgable_control(
- mach_task_self(),
- reinterpret_cast<vm_address_t>(memory_),
- VM_PURGABLE_SET_STATE,
- &state);
- DCHECK_EQ(0, mprotect(memory_, size_, PROT_NONE));
- if (ret != KERN_SUCCESS)
- DLOG(ERROR) << "Failed to unlock memory.";
+ DCHECK(is_locked_);
+ g_shared_state.Pointer()->manager.ReleaseLock(this);
+ is_locked_ = false;
}
virtual void* Memory() const OVERRIDE {
- return memory_;
+ DCHECK(is_locked_);
+ return reinterpret_cast<void*>(memory_.address());
+ }
+
+ // Overridden from internal::DiscardableMemoryManagerAllocation:
+ virtual bool AllocateAndAcquireLock() OVERRIDE {
+ kern_return_t ret;
+ bool persistent;
+ if (!memory_.size()) {
+ vm_address_t address = 0;
+ ret = vm_allocate(
+ mach_task_self(),
+ &address,
+ bytes_,
+ VM_FLAGS_ANYWHERE | VM_FLAGS_PURGABLE | kDiscardableMemoryTag);
+ MACH_CHECK(ret == KERN_SUCCESS, ret) << "vm_allocate";
+ memory_.reset(address, bytes_);
+
+ // When making a fresh allocation, it's impossible for |persistent| to
+ // be true.
+ persistent = false;
+ } else {
+ // |persistent| will be reset to false below if appropriate, but when
+ // reusing an existing allocation, it's possible for it to be true.
+ persistent = true;
+
+#if !defined(NDEBUG)
+ ret = vm_protect(mach_task_self(),
+ memory_.address(),
+ memory_.size(),
+ FALSE,
+ VM_PROT_DEFAULT);
+ MACH_DCHECK(ret == KERN_SUCCESS, ret) << "vm_protect";
+#endif
+ }
+
+ int state = VM_PURGABLE_NONVOLATILE;
+ ret = vm_purgable_control(mach_task_self(),
+ memory_.address(),
+ VM_PURGABLE_SET_STATE,
+ &state);
+ MACH_CHECK(ret == KERN_SUCCESS, ret) << "vm_purgable_control";
+ if (state & VM_PURGABLE_EMPTY)
+ persistent = false;
+
+ return persistent;
+ }
+
+ virtual void ReleaseLock() OVERRIDE {
+ int state = VM_PURGABLE_VOLATILE | VM_VOLATILE_GROUP_DEFAULT;
+ kern_return_t ret = vm_purgable_control(mach_task_self(),
+ memory_.address(),
+ VM_PURGABLE_SET_STATE,
+ &state);
+ MACH_CHECK(ret == KERN_SUCCESS, ret) << "vm_purgable_control";
+
+#if !defined(NDEBUG)
+ ret = vm_protect(mach_task_self(),
+ memory_.address(),
+ memory_.size(),
+ FALSE,
+ VM_PROT_NONE);
+ MACH_DCHECK(ret == KERN_SUCCESS, ret) << "vm_protect";
+#endif
+ }
+
+ virtual void Purge() OVERRIDE {
+ memory_.reset();
}
private:
- void* const memory_;
- const size_t size_;
+ mac::ScopedMachVM memory_;
+ const size_t bytes_;
+ bool is_locked_;
DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryMac);
};
@@ -75,37 +160,72 @@ class DiscardableMemoryMac : public DiscardableMemory {
} // namespace
// static
-bool DiscardableMemory::SupportedNatively() {
- return true;
+void DiscardableMemory::RegisterMemoryPressureListeners() {
+ internal::DiscardableMemoryEmulated::RegisterMemoryPressureListeners();
}
// static
-scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemory(
- size_t size) {
- vm_address_t buffer = 0;
- kern_return_t ret = vm_allocate(mach_task_self(),
- &buffer,
- size,
- VM_FLAGS_PURGABLE |
- VM_FLAGS_ANYWHERE |
- kDiscardableMemoryTag);
- if (ret != KERN_SUCCESS) {
- DLOG(ERROR) << "vm_allocate() failed";
- return scoped_ptr<DiscardableMemory>();
- }
- return scoped_ptr<DiscardableMemory>(
- new DiscardableMemoryMac(reinterpret_cast<void*>(buffer), size));
+void DiscardableMemory::UnregisterMemoryPressureListeners() {
+ internal::DiscardableMemoryEmulated::UnregisterMemoryPressureListeners();
}
// static
-bool DiscardableMemory::PurgeForTestingSupported() {
- return true;
+bool DiscardableMemory::ReduceMemoryUsage() {
+ return internal::DiscardableMemoryEmulated::ReduceMemoryUsage();
+}
+
+// static
+void DiscardableMemory::GetSupportedTypes(
+ std::vector<DiscardableMemoryType>* types) {
+ const DiscardableMemoryType supported_types[] = {
+ DISCARDABLE_MEMORY_TYPE_MAC,
+ DISCARDABLE_MEMORY_TYPE_EMULATED,
+ DISCARDABLE_MEMORY_TYPE_MALLOC
+ };
+ types->assign(supported_types, supported_types + arraysize(supported_types));
+}
+
+// static
+scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemoryWithType(
+ DiscardableMemoryType type, size_t size) {
+ switch (type) {
+ case DISCARDABLE_MEMORY_TYPE_NONE:
+ case DISCARDABLE_MEMORY_TYPE_ASHMEM:
+ return scoped_ptr<DiscardableMemory>();
+ case DISCARDABLE_MEMORY_TYPE_MAC: {
+ scoped_ptr<DiscardableMemoryMac> memory(new DiscardableMemoryMac(size));
+ if (!memory->Initialize())
+ return scoped_ptr<DiscardableMemory>();
+
+ return memory.PassAs<DiscardableMemory>();
+ }
+ case DISCARDABLE_MEMORY_TYPE_EMULATED: {
+ scoped_ptr<internal::DiscardableMemoryEmulated> memory(
+ new internal::DiscardableMemoryEmulated(size));
+ if (!memory->Initialize())
+ return scoped_ptr<DiscardableMemory>();
+
+ return memory.PassAs<DiscardableMemory>();
+ }
+ case DISCARDABLE_MEMORY_TYPE_MALLOC: {
+ scoped_ptr<internal::DiscardableMemoryMalloc> memory(
+ new internal::DiscardableMemoryMalloc(size));
+ if (!memory->Initialize())
+ return scoped_ptr<DiscardableMemory>();
+
+ return memory.PassAs<DiscardableMemory>();
+ }
+ }
+
+ NOTREACHED();
+ return scoped_ptr<DiscardableMemory>();
}
// static
void DiscardableMemory::PurgeForTesting() {
int state = 0;
vm_purgable_control(mach_task_self(), 0, VM_PURGABLE_PURGE_ALL, &state);
+ internal::DiscardableMemoryEmulated::PurgeForTesting();
}
} // namespace base
diff --git a/chromium/base/memory/discardable_memory_malloc.cc b/chromium/base/memory/discardable_memory_malloc.cc
new file mode 100644
index 00000000000..a72f9112d39
--- /dev/null
+++ b/chromium/base/memory/discardable_memory_malloc.cc
@@ -0,0 +1,43 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/memory/discardable_memory_malloc.h"
+
+#include "base/logging.h"
+
+namespace base {
+namespace internal {
+
+DiscardableMemoryMalloc::DiscardableMemoryMalloc(size_t size) : size_(size) {
+}
+
+DiscardableMemoryMalloc::~DiscardableMemoryMalloc() {
+}
+
+bool DiscardableMemoryMalloc::Initialize() {
+ return Lock() != DISCARDABLE_MEMORY_LOCK_STATUS_FAILED;
+}
+
+DiscardableMemoryLockStatus DiscardableMemoryMalloc::Lock() {
+ DCHECK(!memory_);
+
+ memory_.reset(static_cast<uint8*>(malloc(size_)));
+ if (!memory_)
+ return DISCARDABLE_MEMORY_LOCK_STATUS_FAILED;
+
+ return DISCARDABLE_MEMORY_LOCK_STATUS_PURGED;
+}
+
+void DiscardableMemoryMalloc::Unlock() {
+ DCHECK(memory_);
+ memory_.reset();
+}
+
+void* DiscardableMemoryMalloc::Memory() const {
+ DCHECK(memory_);
+ return memory_.get();
+}
+
+} // namespace internal
+} // namespace base
diff --git a/chromium/base/memory/discardable_memory_malloc.h b/chromium/base/memory/discardable_memory_malloc.h
new file mode 100644
index 00000000000..7729ce5c49b
--- /dev/null
+++ b/chromium/base/memory/discardable_memory_malloc.h
@@ -0,0 +1,35 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_MEMORY_DISCARDABLE_MEMORY_MALLOC_H_
+#define BASE_MEMORY_DISCARDABLE_MEMORY_MALLOC_H_
+
+#include "base/memory/discardable_memory.h"
+
+namespace base {
+namespace internal {
+
+class DiscardableMemoryMalloc : public DiscardableMemory {
+ public:
+ explicit DiscardableMemoryMalloc(size_t size);
+ virtual ~DiscardableMemoryMalloc();
+
+ bool Initialize();
+
+ // Overridden from DiscardableMemory:
+ virtual DiscardableMemoryLockStatus Lock() OVERRIDE;
+ virtual void Unlock() OVERRIDE;
+ virtual void* Memory() const OVERRIDE;
+
+ private:
+ scoped_ptr<uint8, FreeDeleter> memory_;
+ const size_t size_;
+
+ DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryMalloc);
+};
+
+} // namespace internal
+} // namespace base
+
+#endif // BASE_MEMORY_DISCARDABLE_MEMORY_MALLOC_H_
diff --git a/chromium/base/memory/discardable_memory_manager.cc b/chromium/base/memory/discardable_memory_manager.cc
new file mode 100644
index 00000000000..d976da203c4
--- /dev/null
+++ b/chromium/base/memory/discardable_memory_manager.cc
@@ -0,0 +1,263 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/memory/discardable_memory_manager.h"
+
+#include "base/bind.h"
+#include "base/containers/hash_tables.h"
+#include "base/containers/mru_cache.h"
+#include "base/debug/crash_logging.h"
+#include "base/debug/trace_event.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/synchronization/lock.h"
+
+namespace base {
+namespace internal {
+
+DiscardableMemoryManager::DiscardableMemoryManager(
+ size_t memory_limit,
+ size_t soft_memory_limit,
+ size_t bytes_to_keep_under_moderate_pressure,
+ TimeDelta hard_memory_limit_expiration_time)
+ : allocations_(AllocationMap::NO_AUTO_EVICT),
+ bytes_allocated_(0u),
+ memory_limit_(memory_limit),
+ soft_memory_limit_(soft_memory_limit),
+ bytes_to_keep_under_moderate_pressure_(
+ bytes_to_keep_under_moderate_pressure),
+ hard_memory_limit_expiration_time_(hard_memory_limit_expiration_time) {
+ BytesAllocatedChanged(bytes_allocated_);
+}
+
+DiscardableMemoryManager::~DiscardableMemoryManager() {
+ DCHECK(allocations_.empty());
+ DCHECK_EQ(0u, bytes_allocated_);
+}
+
+void DiscardableMemoryManager::RegisterMemoryPressureListener() {
+ AutoLock lock(lock_);
+ DCHECK(base::MessageLoop::current());
+ DCHECK(!memory_pressure_listener_);
+ memory_pressure_listener_.reset(new MemoryPressureListener(base::Bind(
+ &DiscardableMemoryManager::OnMemoryPressure, Unretained(this))));
+}
+
+void DiscardableMemoryManager::UnregisterMemoryPressureListener() {
+ AutoLock lock(lock_);
+ DCHECK(memory_pressure_listener_);
+ memory_pressure_listener_.reset();
+}
+
+void DiscardableMemoryManager::SetMemoryLimit(size_t bytes) {
+ AutoLock lock(lock_);
+ memory_limit_ = bytes;
+ PurgeIfNotUsedSinceTimestampUntilUsageIsWithinLimitWithLockAcquired(
+ Now(), memory_limit_);
+}
+
+void DiscardableMemoryManager::SetSoftMemoryLimit(size_t bytes) {
+ AutoLock lock(lock_);
+ soft_memory_limit_ = bytes;
+}
+
+void DiscardableMemoryManager::SetBytesToKeepUnderModeratePressure(
+ size_t bytes) {
+ AutoLock lock(lock_);
+ bytes_to_keep_under_moderate_pressure_ = bytes;
+}
+
+void DiscardableMemoryManager::SetHardMemoryLimitExpirationTime(
+ TimeDelta hard_memory_limit_expiration_time) {
+ AutoLock lock(lock_);
+ hard_memory_limit_expiration_time_ = hard_memory_limit_expiration_time;
+}
+
+bool DiscardableMemoryManager::ReduceMemoryUsage() {
+ return PurgeIfNotUsedSinceHardLimitCutoffUntilWithinSoftMemoryLimit();
+}
+
+void DiscardableMemoryManager::Register(Allocation* allocation, size_t bytes) {
+ AutoLock lock(lock_);
+ // A registered memory listener is currently required. This DCHECK can be
+ // moved or removed if we decide that it's useful to relax this condition.
+ // TODO(reveman): Enable this DCHECK when skia and blink are able to
+ // register memory pressure listeners. crbug.com/333907
+ // DCHECK(memory_pressure_listener_);
+ DCHECK(allocations_.Peek(allocation) == allocations_.end());
+ allocations_.Put(allocation, AllocationInfo(bytes));
+}
+
+void DiscardableMemoryManager::Unregister(Allocation* allocation) {
+ AutoLock lock(lock_);
+ AllocationMap::iterator it = allocations_.Peek(allocation);
+ DCHECK(it != allocations_.end());
+ const AllocationInfo& info = it->second;
+
+ if (info.purgable) {
+ size_t bytes_purgable = info.bytes;
+ DCHECK_LE(bytes_purgable, bytes_allocated_);
+ bytes_allocated_ -= bytes_purgable;
+ BytesAllocatedChanged(bytes_allocated_);
+ }
+ allocations_.Erase(it);
+}
+
+bool DiscardableMemoryManager::AcquireLock(Allocation* allocation,
+ bool* purged) {
+ AutoLock lock(lock_);
+ // Note: |allocations_| is an MRU cache, and use of |Get| here updates that
+ // cache.
+ AllocationMap::iterator it = allocations_.Get(allocation);
+ DCHECK(it != allocations_.end());
+ AllocationInfo* info = &it->second;
+
+ if (!info->bytes)
+ return false;
+
+ TimeTicks now = Now();
+ size_t bytes_required = info->purgable ? 0u : info->bytes;
+
+ if (memory_limit_) {
+ size_t limit = 0;
+ if (bytes_required < memory_limit_)
+ limit = memory_limit_ - bytes_required;
+
+ PurgeIfNotUsedSinceTimestampUntilUsageIsWithinLimitWithLockAcquired(now,
+ limit);
+ }
+
+ // Check for overflow.
+ if (std::numeric_limits<size_t>::max() - bytes_required < bytes_allocated_)
+ return false;
+
+ *purged = !allocation->AllocateAndAcquireLock();
+ info->purgable = false;
+ info->last_usage = now;
+ if (bytes_required) {
+ bytes_allocated_ += bytes_required;
+ BytesAllocatedChanged(bytes_allocated_);
+ }
+ return true;
+}
+
+void DiscardableMemoryManager::ReleaseLock(Allocation* allocation) {
+ AutoLock lock(lock_);
+ // Note: |allocations_| is an MRU cache, and use of |Get| here updates that
+ // cache.
+ AllocationMap::iterator it = allocations_.Get(allocation);
+ DCHECK(it != allocations_.end());
+ AllocationInfo* info = &it->second;
+
+ TimeTicks now = Now();
+ allocation->ReleaseLock();
+ info->purgable = true;
+ info->last_usage = now;
+
+ PurgeIfNotUsedSinceTimestampUntilUsageIsWithinLimitWithLockAcquired(
+ now, memory_limit_);
+}
+
+void DiscardableMemoryManager::PurgeAll() {
+ AutoLock lock(lock_);
+ PurgeIfNotUsedSinceTimestampUntilUsageIsWithinLimitWithLockAcquired(Now(), 0);
+}
+
+bool DiscardableMemoryManager::IsRegisteredForTest(
+ Allocation* allocation) const {
+ AutoLock lock(lock_);
+ AllocationMap::const_iterator it = allocations_.Peek(allocation);
+ return it != allocations_.end();
+}
+
+bool DiscardableMemoryManager::CanBePurgedForTest(
+ Allocation* allocation) const {
+ AutoLock lock(lock_);
+ AllocationMap::const_iterator it = allocations_.Peek(allocation);
+ return it != allocations_.end() && it->second.purgable;
+}
+
+size_t DiscardableMemoryManager::GetBytesAllocatedForTest() const {
+ AutoLock lock(lock_);
+ return bytes_allocated_;
+}
+
+void DiscardableMemoryManager::OnMemoryPressure(
+ MemoryPressureListener::MemoryPressureLevel pressure_level) {
+ switch (pressure_level) {
+ case MemoryPressureListener::MEMORY_PRESSURE_MODERATE:
+ PurgeUntilWithinBytesToKeepUnderModeratePressure();
+ return;
+ case MemoryPressureListener::MEMORY_PRESSURE_CRITICAL:
+ PurgeAll();
+ return;
+ }
+
+ NOTREACHED();
+}
+
+void
+DiscardableMemoryManager::PurgeUntilWithinBytesToKeepUnderModeratePressure() {
+ AutoLock lock(lock_);
+
+ PurgeIfNotUsedSinceTimestampUntilUsageIsWithinLimitWithLockAcquired(
+ Now(), bytes_to_keep_under_moderate_pressure_);
+}
+
+bool DiscardableMemoryManager::
+ PurgeIfNotUsedSinceHardLimitCutoffUntilWithinSoftMemoryLimit() {
+ AutoLock lock(lock_);
+
+ PurgeIfNotUsedSinceTimestampUntilUsageIsWithinLimitWithLockAcquired(
+ Now() - hard_memory_limit_expiration_time_, soft_memory_limit_);
+
+ return bytes_allocated_ <= soft_memory_limit_;
+}
+
+void DiscardableMemoryManager::
+ PurgeIfNotUsedSinceTimestampUntilUsageIsWithinLimitWithLockAcquired(
+ TimeTicks timestamp,
+ size_t limit) {
+ lock_.AssertAcquired();
+
+ size_t bytes_allocated_before_purging = bytes_allocated_;
+ for (AllocationMap::reverse_iterator it = allocations_.rbegin();
+ it != allocations_.rend();
+ ++it) {
+ Allocation* allocation = it->first;
+ AllocationInfo* info = &it->second;
+
+ if (bytes_allocated_ <= limit)
+ break;
+
+ bool purgable = info->purgable && info->last_usage <= timestamp;
+ if (!purgable)
+ continue;
+
+ size_t bytes_purgable = info->bytes;
+ DCHECK_LE(bytes_purgable, bytes_allocated_);
+ bytes_allocated_ -= bytes_purgable;
+ info->purgable = false;
+ allocation->Purge();
+ }
+
+ if (bytes_allocated_ != bytes_allocated_before_purging)
+ BytesAllocatedChanged(bytes_allocated_);
+}
+
+void DiscardableMemoryManager::BytesAllocatedChanged(
+ size_t new_bytes_allocated) const {
+ TRACE_COUNTER_ID1(
+ "base", "DiscardableMemoryUsage", this, new_bytes_allocated);
+
+ static const char kDiscardableMemoryUsageKey[] = "dm-usage";
+ base::debug::SetCrashKeyValue(kDiscardableMemoryUsageKey,
+ Uint64ToString(new_bytes_allocated));
+}
+
+TimeTicks DiscardableMemoryManager::Now() const {
+ return TimeTicks::Now();
+}
+
+} // namespace internal
+} // namespace base
diff --git a/chromium/base/memory/discardable_memory_manager.h b/chromium/base/memory/discardable_memory_manager.h
new file mode 100644
index 00000000000..a61f141c430
--- /dev/null
+++ b/chromium/base/memory/discardable_memory_manager.h
@@ -0,0 +1,206 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_MEMORY_DISCARDABLE_MEMORY_MANAGER_H_
+#define BASE_MEMORY_DISCARDABLE_MEMORY_MANAGER_H_
+
+#include "base/base_export.h"
+#include "base/containers/hash_tables.h"
+#include "base/containers/mru_cache.h"
+#include "base/memory/memory_pressure_listener.h"
+#include "base/synchronization/lock.h"
+#include "base/time/time.h"
+
+namespace base {
+namespace internal {
+
+// This interface is used by the DiscardableMemoryManager class to provide some
+// level of userspace control over discardable memory allocations.
+class DiscardableMemoryManagerAllocation {
+ public:
+ // Allocate and acquire a lock that prevents the allocation from being purged
+ // by the system. Returns true if memory was previously allocated and is still
+ // resident.
+ virtual bool AllocateAndAcquireLock() = 0;
+
+ // Release a previously acquired lock on the allocation so that it can be
+ // purged by the system.
+ virtual void ReleaseLock() = 0;
+
+ // Explicitly purge this allocation. It is illegal to call this while a lock
+ // is acquired on the allocation.
+ virtual void Purge() = 0;
+
+ protected:
+ virtual ~DiscardableMemoryManagerAllocation() {}
+};
+
+} // namespace internal
+} // namespace base
+
+#if defined(COMPILER_GCC)
+namespace BASE_HASH_NAMESPACE {
+template <>
+struct hash<base::internal::DiscardableMemoryManagerAllocation*> {
+ size_t operator()(
+ base::internal::DiscardableMemoryManagerAllocation* ptr) const {
+ return hash<size_t>()(reinterpret_cast<size_t>(ptr));
+ }
+};
+} // namespace BASE_HASH_NAMESPACE
+#endif // COMPILER
+
+namespace base {
+namespace internal {
+
+// The DiscardableMemoryManager manages a collection of
+// DiscardableMemoryManagerAllocation instances. It is used on platforms that
+// need some level of userspace control over discardable memory. It keeps track
+// of all allocation instances (in case they need to be purged), and the total
+// amount of allocated memory (in case this forces a purge). When memory usage
+// reaches the limit, the manager purges the LRU memory.
+//
+// When notified of memory pressure, the manager either purges the LRU memory --
+// if the pressure is moderate -- or all discardable memory if the pressure is
+// critical.
+class BASE_EXPORT_PRIVATE DiscardableMemoryManager {
+ public:
+ typedef DiscardableMemoryManagerAllocation Allocation;
+
+ DiscardableMemoryManager(size_t memory_limit,
+ size_t soft_memory_limit,
+ size_t bytes_to_keep_under_moderate_pressure,
+ TimeDelta hard_memory_limit_expiration_time);
+ virtual ~DiscardableMemoryManager();
+
+ // Call this to register memory pressure listener. Must be called on a thread
+ // with a MessageLoop current.
+ void RegisterMemoryPressureListener();
+
+ // Call this to unregister memory pressure listener.
+ void UnregisterMemoryPressureListener();
+
+ // The maximum number of bytes of memory that may be allocated before we force
+ // a purge.
+ void SetMemoryLimit(size_t bytes);
+
+ // The number of bytes of memory that may be allocated but unused for the hard
+ // limit expiration time without getting purged.
+ void SetSoftMemoryLimit(size_t bytes);
+
+ // Sets the amount of memory to keep when we're under moderate pressure.
+ void SetBytesToKeepUnderModeratePressure(size_t bytes);
+
+ // Sets the memory usage cutoff time for hard memory limit.
+ void SetHardMemoryLimitExpirationTime(
+ TimeDelta hard_memory_limit_expiration_time);
+
+ // This will attempt to reduce memory footprint until within soft memory
+ // limit. Returns true if there's no need to call this again until allocations
+ // have been used.
+ bool ReduceMemoryUsage();
+
+ // Adds the given allocation to the manager's collection.
+ void Register(Allocation* allocation, size_t bytes);
+
+ // Removes the given allocation from the manager's collection.
+ void Unregister(Allocation* allocation);
+
+ // Returns false if an error occurred. Otherwise, returns true and sets
+ // |purged| to indicate whether or not allocation has been purged since last
+ // use.
+ bool AcquireLock(Allocation* allocation, bool* purged);
+
+ // Release a previously acquired lock on allocation. This allows the manager
+ // to purge it if necessary.
+ void ReleaseLock(Allocation* allocation);
+
+ // Purges all discardable memory.
+ void PurgeAll();
+
+ // Returns true if allocation has been added to the manager's collection. This
+ // should only be used by tests.
+ bool IsRegisteredForTest(Allocation* allocation) const;
+
+ // Returns true if allocation can be purged. This should only be used by
+ // tests.
+ bool CanBePurgedForTest(Allocation* allocation) const;
+
+ // Returns total amount of allocated discardable memory. This should only be
+ // used by tests.
+ size_t GetBytesAllocatedForTest() const;
+
+ private:
+ struct AllocationInfo {
+ explicit AllocationInfo(size_t bytes) : bytes(bytes), purgable(false) {}
+
+ const size_t bytes;
+ bool purgable;
+ TimeTicks last_usage;
+ };
+ typedef HashingMRUCache<Allocation*, AllocationInfo> AllocationMap;
+
+ // This can be called as a hint that the system is under memory pressure.
+ void OnMemoryPressure(
+ MemoryPressureListener::MemoryPressureLevel pressure_level);
+
+ // Purges memory until usage is less or equal to
+ // |bytes_to_keep_under_moderate_pressure_|.
+ void PurgeUntilWithinBytesToKeepUnderModeratePressure();
+
+ // Purges memory not used since |hard_memory_limit_expiration_time_| before
+ // "right now" until usage is less or equal to |soft_memory_limit_|.
+ // Returns true if total amount of memory is less or equal to soft memory
+ // limit.
+ bool PurgeIfNotUsedSinceHardLimitCutoffUntilWithinSoftMemoryLimit();
+
+ // Purges memory that has not been used since |timestamp| until usage is less
+ // or equal to |limit|.
+ // Caller must acquire |lock_| prior to calling this function.
+ void PurgeIfNotUsedSinceTimestampUntilUsageIsWithinLimitWithLockAcquired(
+ TimeTicks timestamp,
+ size_t limit);
+
+ // Called when a change to |bytes_allocated_| has been made.
+ void BytesAllocatedChanged(size_t new_bytes_allocated) const;
+
+ // Virtual for tests.
+ virtual TimeTicks Now() const;
+
+ // Needs to be held when accessing members.
+ mutable Lock lock_;
+
+ // A MRU cache of all allocated bits of memory. Used for purging.
+ AllocationMap allocations_;
+
+ // The total amount of allocated memory.
+ size_t bytes_allocated_;
+
+ // The maximum number of bytes of memory that may be allocated.
+ size_t memory_limit_;
+
+ // The number of bytes of memory that may be allocated but not used for
+ // |hard_memory_limit_expiration_time_| amount of time when receiving an idle
+ // notification.
+ size_t soft_memory_limit_;
+
+ // Under moderate memory pressure, we will purge memory until usage is within
+ // this limit.
+ size_t bytes_to_keep_under_moderate_pressure_;
+
+ // Allows us to be respond when the system reports that it is under memory
+ // pressure.
+ scoped_ptr<MemoryPressureListener> memory_pressure_listener_;
+
+ // Amount of time it takes for an allocation to become affected by
+ // |soft_memory_limit_|.
+ TimeDelta hard_memory_limit_expiration_time_;
+
+ DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryManager);
+};
+
+} // namespace internal
+} // namespace base
+
+#endif // BASE_MEMORY_DISCARDABLE_MEMORY_MANAGER_H_
diff --git a/chromium/base/memory/discardable_memory_manager_unittest.cc b/chromium/base/memory/discardable_memory_manager_unittest.cc
new file mode 100644
index 00000000000..ef5739a6526
--- /dev/null
+++ b/chromium/base/memory/discardable_memory_manager_unittest.cc
@@ -0,0 +1,505 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/memory/discardable_memory_manager.h"
+
+#include "base/bind.h"
+#include "base/run_loop.h"
+#include "base/synchronization/waitable_event.h"
+#include "base/threading/thread.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace base {
+namespace {
+
+class TestAllocationImpl : public internal::DiscardableMemoryManagerAllocation {
+ public:
+ TestAllocationImpl() : is_allocated_(false), is_locked_(false) {}
+ virtual ~TestAllocationImpl() { DCHECK(!is_locked_); }
+
+ // Overridden from internal::DiscardableMemoryManagerAllocation:
+ virtual bool AllocateAndAcquireLock() OVERRIDE {
+ bool was_allocated = is_allocated_;
+ is_allocated_ = true;
+ DCHECK(!is_locked_);
+ is_locked_ = true;
+ return was_allocated;
+ }
+ virtual void ReleaseLock() OVERRIDE {
+ DCHECK(is_locked_);
+ is_locked_ = false;
+ }
+ virtual void Purge() OVERRIDE {
+ DCHECK(is_allocated_);
+ is_allocated_ = false;
+ }
+
+ bool is_locked() const { return is_locked_; }
+
+ private:
+ bool is_allocated_;
+ bool is_locked_;
+};
+
+// Tests can assume that the default limit is at least 1024. Tests that rely on
+// something else needs to explicit set the limit.
+const size_t kDefaultMemoryLimit = 1024;
+const size_t kDefaultSoftMemoryLimit = kDefaultMemoryLimit;
+const size_t kDefaultBytesToKeepUnderModeratePressure = kDefaultMemoryLimit;
+
+class TestDiscardableMemoryManagerImpl
+ : public internal::DiscardableMemoryManager {
+ public:
+ TestDiscardableMemoryManagerImpl()
+ : DiscardableMemoryManager(kDefaultMemoryLimit,
+ kDefaultSoftMemoryLimit,
+ kDefaultBytesToKeepUnderModeratePressure,
+ TimeDelta::Max()) {}
+
+ void SetNow(TimeTicks now) { now_ = now; }
+
+ private:
+ // Overriden from internal::DiscardableMemoryManager:
+ virtual TimeTicks Now() const OVERRIDE { return now_; }
+
+ TimeTicks now_;
+};
+
+class DiscardableMemoryManagerTestBase {
+ public:
+ DiscardableMemoryManagerTestBase() {
+ manager_.RegisterMemoryPressureListener();
+ }
+
+ protected:
+ enum LockStatus {
+ LOCK_STATUS_FAILED,
+ LOCK_STATUS_PURGED,
+ LOCK_STATUS_SUCCESS
+ };
+
+ size_t BytesAllocated() const { return manager_.GetBytesAllocatedForTest(); }
+
+ void SetMemoryLimit(size_t bytes) { manager_.SetMemoryLimit(bytes); }
+
+ void SetSoftMemoryLimit(size_t bytes) { manager_.SetSoftMemoryLimit(bytes); }
+
+ void SetBytesToKeepUnderModeratePressure(size_t bytes) {
+ manager_.SetBytesToKeepUnderModeratePressure(bytes);
+ }
+
+ void SetHardMemoryLimitExpirationTime(TimeDelta time) {
+ manager_.SetHardMemoryLimitExpirationTime(time);
+ }
+
+ void Register(TestAllocationImpl* allocation, size_t bytes) {
+ manager_.Register(allocation, bytes);
+ }
+
+ void Unregister(TestAllocationImpl* allocation) {
+ manager_.Unregister(allocation);
+ }
+
+ bool IsRegistered(TestAllocationImpl* allocation) const {
+ return manager_.IsRegisteredForTest(allocation);
+ }
+
+ LockStatus Lock(TestAllocationImpl* allocation) {
+ bool purged;
+ if (!manager_.AcquireLock(allocation, &purged))
+ return LOCK_STATUS_FAILED;
+ return purged ? LOCK_STATUS_PURGED : LOCK_STATUS_SUCCESS;
+ }
+
+ void Unlock(TestAllocationImpl* allocation) {
+ manager_.ReleaseLock(allocation);
+ }
+
+ LockStatus RegisterAndLock(TestAllocationImpl* allocation, size_t bytes) {
+ manager_.Register(allocation, bytes);
+ return Lock(allocation);
+ }
+
+ bool CanBePurged(TestAllocationImpl* allocation) const {
+ return manager_.CanBePurgedForTest(allocation);
+ }
+
+ void SetNow(TimeTicks now) { manager_.SetNow(now); }
+
+ bool ReduceMemoryUsage() { return manager_.ReduceMemoryUsage(); }
+
+ private:
+ MessageLoopForIO message_loop_;
+ TestDiscardableMemoryManagerImpl manager_;
+};
+
+class DiscardableMemoryManagerTest : public DiscardableMemoryManagerTestBase,
+ public testing::Test {
+ public:
+ DiscardableMemoryManagerTest() {}
+};
+
+TEST_F(DiscardableMemoryManagerTest, CreateAndLock) {
+ size_t size = 1024;
+ TestAllocationImpl allocation;
+ Register(&allocation, size);
+ EXPECT_TRUE(IsRegistered(&allocation));
+ EXPECT_EQ(LOCK_STATUS_PURGED, Lock(&allocation));
+ EXPECT_TRUE(allocation.is_locked());
+ EXPECT_EQ(1024u, BytesAllocated());
+ EXPECT_FALSE(CanBePurged(&allocation));
+ Unlock(&allocation);
+ Unregister(&allocation);
+}
+
+TEST_F(DiscardableMemoryManagerTest, CreateZeroSize) {
+ size_t size = 0;
+ TestAllocationImpl allocation;
+ Register(&allocation, size);
+ EXPECT_TRUE(IsRegistered(&allocation));
+ EXPECT_EQ(LOCK_STATUS_FAILED, Lock(&allocation));
+ EXPECT_EQ(0u, BytesAllocated());
+ Unregister(&allocation);
+}
+
+TEST_F(DiscardableMemoryManagerTest, LockAfterUnlock) {
+ size_t size = 1024;
+ TestAllocationImpl allocation;
+ RegisterAndLock(&allocation, size);
+ EXPECT_EQ(1024u, BytesAllocated());
+ EXPECT_FALSE(CanBePurged(&allocation));
+
+ // Now unlock so we can lock later.
+ Unlock(&allocation);
+ EXPECT_TRUE(CanBePurged(&allocation));
+
+ EXPECT_EQ(LOCK_STATUS_SUCCESS, Lock(&allocation));
+ EXPECT_FALSE(CanBePurged(&allocation));
+ Unlock(&allocation);
+ Unregister(&allocation);
+}
+
+TEST_F(DiscardableMemoryManagerTest, LockAfterPurge) {
+ size_t size = 1024;
+ TestAllocationImpl allocation;
+ RegisterAndLock(&allocation, size);
+ EXPECT_EQ(1024u, BytesAllocated());
+ EXPECT_FALSE(CanBePurged(&allocation));
+
+ // Now unlock so we can lock later.
+ Unlock(&allocation);
+ EXPECT_TRUE(CanBePurged(&allocation));
+
+ // Force the system to purge.
+ MemoryPressureListener::NotifyMemoryPressure(
+ MemoryPressureListener::MEMORY_PRESSURE_CRITICAL);
+
+ // Required because ObserverListThreadSafe notifies via PostTask.
+ RunLoop().RunUntilIdle();
+
+ EXPECT_EQ(LOCK_STATUS_PURGED, Lock(&allocation));
+ EXPECT_FALSE(CanBePurged(&allocation));
+
+ Unlock(&allocation);
+ Unregister(&allocation);
+}
+
+TEST_F(DiscardableMemoryManagerTest, LockAfterPurgeAndCannotReallocate) {
+ size_t size = 1024;
+ TestAllocationImpl allocation;
+ RegisterAndLock(&allocation, size);
+ EXPECT_EQ(1024u, BytesAllocated());
+ EXPECT_FALSE(CanBePurged(&allocation));
+
+ // Now unlock so we can lock later.
+ Unlock(&allocation);
+ EXPECT_TRUE(CanBePurged(&allocation));
+
+ // Set max allowed allocation to 1 byte. This will cause the memory to be
+ // purged.
+ SetMemoryLimit(1);
+
+ EXPECT_EQ(LOCK_STATUS_PURGED, Lock(&allocation));
+ EXPECT_FALSE(CanBePurged(&allocation));
+
+ Unlock(&allocation);
+ Unregister(&allocation);
+}
+
+TEST_F(DiscardableMemoryManagerTest, Overflow) {
+ size_t size = 1024;
+ {
+ TestAllocationImpl allocation;
+ RegisterAndLock(&allocation, size);
+ EXPECT_EQ(1024u, BytesAllocated());
+
+ size_t massive_size = std::numeric_limits<size_t>::max();
+ TestAllocationImpl massive_allocation;
+ Register(&massive_allocation, massive_size);
+ EXPECT_EQ(LOCK_STATUS_FAILED, Lock(&massive_allocation));
+ EXPECT_EQ(1024u, BytesAllocated());
+
+ Unlock(&allocation);
+ EXPECT_EQ(LOCK_STATUS_PURGED, Lock(&massive_allocation));
+ Unlock(&massive_allocation);
+ Unregister(&massive_allocation);
+ Unregister(&allocation);
+ }
+ EXPECT_EQ(0u, BytesAllocated());
+}
+
+class PermutationTestData {
+ public:
+ PermutationTestData(unsigned d0, unsigned d1, unsigned d2) {
+ ordering_[0] = d0;
+ ordering_[1] = d1;
+ ordering_[2] = d2;
+ }
+
+ const unsigned* ordering() const { return ordering_; }
+
+ private:
+ unsigned ordering_[3];
+};
+
+class DiscardableMemoryManagerPermutationTest
+ : public DiscardableMemoryManagerTestBase,
+ public testing::TestWithParam<PermutationTestData> {
+ public:
+ DiscardableMemoryManagerPermutationTest() {}
+
+ protected:
+ // Use memory in order specified by ordering parameter.
+ void RegisterAndUseAllocations() {
+ for (int i = 0; i < 3; ++i) {
+ RegisterAndLock(&allocation_[i], 1024);
+ Unlock(&allocation_[i]);
+ }
+ for (int i = 0; i < 3; ++i) {
+ int index = GetParam().ordering()[i];
+ EXPECT_NE(LOCK_STATUS_FAILED, Lock(&allocation_[index]));
+ // Leave i == 0 locked.
+ if (i > 0)
+ Unlock(&allocation_[index]);
+ }
+ }
+
+ TestAllocationImpl* allocation(unsigned position) {
+ return &allocation_[GetParam().ordering()[position]];
+ }
+
+ void UnlockAndUnregisterAllocations() {
+ for (int i = 0; i < 3; ++i) {
+ if (allocation_[i].is_locked())
+ Unlock(&allocation_[i]);
+ Unregister(&allocation_[i]);
+ }
+ }
+
+ private:
+ TestAllocationImpl allocation_[3];
+};
+
+// Verify that memory was discarded in the correct order after applying
+// memory pressure.
+TEST_P(DiscardableMemoryManagerPermutationTest, LRUDiscardedModeratePressure) {
+ RegisterAndUseAllocations();
+
+ SetBytesToKeepUnderModeratePressure(1024);
+ SetMemoryLimit(2048);
+
+ MemoryPressureListener::NotifyMemoryPressure(
+ MemoryPressureListener::MEMORY_PRESSURE_MODERATE);
+ RunLoop().RunUntilIdle();
+
+ EXPECT_NE(LOCK_STATUS_FAILED, Lock(allocation(2)));
+ EXPECT_EQ(LOCK_STATUS_PURGED, Lock(allocation(1)));
+ // 0 should still be locked.
+ EXPECT_TRUE(allocation(0)->is_locked());
+
+ UnlockAndUnregisterAllocations();
+}
+
+// Verify that memory was discarded in the correct order after changing
+// memory limit.
+TEST_P(DiscardableMemoryManagerPermutationTest, LRUDiscardedExceedLimit) {
+ RegisterAndUseAllocations();
+
+ SetBytesToKeepUnderModeratePressure(1024);
+ SetMemoryLimit(2048);
+
+ EXPECT_NE(LOCK_STATUS_FAILED, Lock(allocation(2)));
+ EXPECT_EQ(LOCK_STATUS_PURGED, Lock(allocation(1)));
+ // 0 should still be locked.
+ EXPECT_TRUE(allocation(0)->is_locked());
+
+ UnlockAndUnregisterAllocations();
+}
+
+// Verify that no more memory than necessary was discarded after changing
+// memory limit.
+TEST_P(DiscardableMemoryManagerPermutationTest, LRUDiscardedAmount) {
+ SetBytesToKeepUnderModeratePressure(2048);
+ SetMemoryLimit(4096);
+
+ RegisterAndUseAllocations();
+
+ SetMemoryLimit(2048);
+
+ EXPECT_EQ(LOCK_STATUS_SUCCESS, Lock(allocation(2)));
+ EXPECT_EQ(LOCK_STATUS_PURGED, Lock(allocation(1)));
+ // 0 should still be locked.
+ EXPECT_TRUE(allocation(0)->is_locked());
+
+ UnlockAndUnregisterAllocations();
+}
+
+TEST_P(DiscardableMemoryManagerPermutationTest, PurgeFreesAllUnlocked) {
+ RegisterAndUseAllocations();
+
+ MemoryPressureListener::NotifyMemoryPressure(
+ MemoryPressureListener::MEMORY_PRESSURE_CRITICAL);
+ RunLoop().RunUntilIdle();
+
+ for (int i = 0; i < 3; ++i) {
+ if (i == 0)
+ EXPECT_TRUE(allocation(i)->is_locked());
+ else
+ EXPECT_EQ(LOCK_STATUS_PURGED, Lock(allocation(i)));
+ }
+
+ UnlockAndUnregisterAllocations();
+}
+
+INSTANTIATE_TEST_CASE_P(DiscardableMemoryManagerPermutationTests,
+ DiscardableMemoryManagerPermutationTest,
+ ::testing::Values(PermutationTestData(0, 1, 2),
+ PermutationTestData(0, 2, 1),
+ PermutationTestData(1, 0, 2),
+ PermutationTestData(1, 2, 0),
+ PermutationTestData(2, 0, 1),
+ PermutationTestData(2, 1, 0)));
+
+TEST_F(DiscardableMemoryManagerTest, NormalDestruction) {
+ {
+ size_t size = 1024;
+ TestAllocationImpl allocation;
+ Register(&allocation, size);
+ Unregister(&allocation);
+ }
+ EXPECT_EQ(0u, BytesAllocated());
+}
+
+TEST_F(DiscardableMemoryManagerTest, DestructionAfterLocked) {
+ {
+ size_t size = 1024;
+ TestAllocationImpl allocation;
+ RegisterAndLock(&allocation, size);
+ EXPECT_EQ(1024u, BytesAllocated());
+ EXPECT_FALSE(CanBePurged(&allocation));
+ Unlock(&allocation);
+ Unregister(&allocation);
+ }
+ EXPECT_EQ(0u, BytesAllocated());
+}
+
+TEST_F(DiscardableMemoryManagerTest, DestructionAfterPurged) {
+ {
+ size_t size = 1024;
+ TestAllocationImpl allocation;
+ RegisterAndLock(&allocation, size);
+ EXPECT_EQ(1024u, BytesAllocated());
+ Unlock(&allocation);
+ EXPECT_TRUE(CanBePurged(&allocation));
+ SetMemoryLimit(0);
+ EXPECT_EQ(0u, BytesAllocated());
+ Unregister(&allocation);
+ }
+ EXPECT_EQ(0u, BytesAllocated());
+}
+
+TEST_F(DiscardableMemoryManagerTest, ReduceMemoryUsage) {
+ SetMemoryLimit(3072);
+ SetSoftMemoryLimit(1024);
+ SetHardMemoryLimitExpirationTime(TimeDelta::FromInternalValue(1));
+
+ size_t size = 1024;
+ TestAllocationImpl allocation[3];
+ RegisterAndLock(&allocation[0], size);
+ RegisterAndLock(&allocation[1], size);
+ RegisterAndLock(&allocation[2], size);
+ EXPECT_EQ(3072u, BytesAllocated());
+
+ // Above soft limit but nothing that can be purged.
+ EXPECT_FALSE(ReduceMemoryUsage());
+
+ SetNow(TimeTicks::FromInternalValue(0));
+ Unlock(&allocation[0]);
+
+ // Above soft limit but still nothing that can be purged as all unlocked
+ // allocations are within the hard limit cutoff time.
+ EXPECT_FALSE(ReduceMemoryUsage());
+
+ SetNow(TimeTicks::FromInternalValue(1));
+ Unlock(&allocation[1]);
+
+ // One unlocked allocation is no longer within the hard limit cutoff time. It
+ // should be purged and ReduceMemoryUsage() should return false as we're not
+ // yet within the soft memory limit.
+ EXPECT_FALSE(ReduceMemoryUsage());
+ EXPECT_EQ(2048u, BytesAllocated());
+
+ // One more unlocked allocation is no longer within the hard limit cutoff
+ // time. It should be purged and ReduceMemoryUsage() should return true as
+ // we're now within the soft memory limit.
+ SetNow(TimeTicks::FromInternalValue(2));
+ EXPECT_TRUE(ReduceMemoryUsage());
+ EXPECT_EQ(1024u, BytesAllocated());
+
+ Unlock(&allocation[2]);
+
+ Unregister(&allocation[0]);
+ Unregister(&allocation[1]);
+ Unregister(&allocation[2]);
+}
+
+class ThreadedDiscardableMemoryManagerTest
+ : public DiscardableMemoryManagerTest {
+ public:
+ ThreadedDiscardableMemoryManagerTest()
+ : memory_usage_thread_("memory_usage_thread"),
+ thread_sync_(true, false) {}
+
+ virtual void SetUp() OVERRIDE { memory_usage_thread_.Start(); }
+
+ virtual void TearDown() OVERRIDE { memory_usage_thread_.Stop(); }
+
+ void UseMemoryHelper() {
+ size_t size = 1024;
+ TestAllocationImpl allocation;
+ RegisterAndLock(&allocation, size);
+ Unlock(&allocation);
+ Unregister(&allocation);
+ }
+
+ void SignalHelper() { thread_sync_.Signal(); }
+
+ Thread memory_usage_thread_;
+ WaitableEvent thread_sync_;
+};
+
+TEST_F(ThreadedDiscardableMemoryManagerTest, UseMemoryOnThread) {
+ memory_usage_thread_.message_loop()->PostTask(
+ FROM_HERE,
+ Bind(&ThreadedDiscardableMemoryManagerTest::UseMemoryHelper,
+ Unretained(this)));
+ memory_usage_thread_.message_loop()->PostTask(
+ FROM_HERE,
+ Bind(&ThreadedDiscardableMemoryManagerTest::SignalHelper,
+ Unretained(this)));
+ thread_sync_.Wait();
+}
+
+} // namespace
+} // namespace base
diff --git a/chromium/base/memory/discardable_memory_provider.cc b/chromium/base/memory/discardable_memory_provider.cc
deleted file mode 100644
index 1c84339eba7..00000000000
--- a/chromium/base/memory/discardable_memory_provider.cc
+++ /dev/null
@@ -1,215 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/memory/discardable_memory_provider.h"
-
-#include "base/bind.h"
-#include "base/containers/hash_tables.h"
-#include "base/containers/mru_cache.h"
-#include "base/debug/trace_event.h"
-#include "base/synchronization/lock.h"
-#include "base/sys_info.h"
-
-namespace base {
-namespace internal {
-
-namespace {
-
-// This is admittedly pretty magical. It's approximately enough memory for two
-// 2560x1600 images.
-static const size_t kDefaultDiscardableMemoryLimit = 32 * 1024 * 1024;
-static const size_t kDefaultBytesToReclaimUnderModeratePressure =
- kDefaultDiscardableMemoryLimit / 2;
-
-} // namespace
-
-DiscardableMemoryProvider::DiscardableMemoryProvider()
- : allocations_(AllocationMap::NO_AUTO_EVICT),
- bytes_allocated_(0),
- discardable_memory_limit_(kDefaultDiscardableMemoryLimit),
- bytes_to_reclaim_under_moderate_pressure_(
- kDefaultBytesToReclaimUnderModeratePressure),
- memory_pressure_listener_(
- base::Bind(&DiscardableMemoryProvider::NotifyMemoryPressure,
- Unretained(this))) {
-}
-
-DiscardableMemoryProvider::~DiscardableMemoryProvider() {
- DCHECK(allocations_.empty());
- DCHECK_EQ(0u, bytes_allocated_);
-}
-
-void DiscardableMemoryProvider::NotifyMemoryPressure(
- MemoryPressureListener::MemoryPressureLevel pressure_level) {
- switch (pressure_level) {
- case MemoryPressureListener::MEMORY_PRESSURE_MODERATE:
- Purge();
- return;
- case MemoryPressureListener::MEMORY_PRESSURE_CRITICAL:
- PurgeAll();
- return;
- }
-
- NOTREACHED();
-}
-
-void DiscardableMemoryProvider::SetDiscardableMemoryLimit(size_t bytes) {
- AutoLock lock(lock_);
- discardable_memory_limit_ = bytes;
- EnforcePolicyWithLockAcquired();
-}
-
-void DiscardableMemoryProvider::SetBytesToReclaimUnderModeratePressure(
- size_t bytes) {
- AutoLock lock(lock_);
- bytes_to_reclaim_under_moderate_pressure_ = bytes;
-}
-
-void DiscardableMemoryProvider::Register(
- const DiscardableMemory* discardable, size_t bytes) {
- AutoLock lock(lock_);
- DCHECK(allocations_.Peek(discardable) == allocations_.end());
- allocations_.Put(discardable, Allocation(bytes));
-}
-
-void DiscardableMemoryProvider::Unregister(
- const DiscardableMemory* discardable) {
- AutoLock lock(lock_);
- AllocationMap::iterator it = allocations_.Peek(discardable);
- if (it == allocations_.end())
- return;
-
- if (it->second.memory) {
- size_t bytes = it->second.bytes;
- DCHECK_LE(bytes, bytes_allocated_);
- bytes_allocated_ -= bytes;
- free(it->second.memory);
- }
- allocations_.Erase(it);
-}
-
-scoped_ptr<uint8, FreeDeleter> DiscardableMemoryProvider::Acquire(
- const DiscardableMemory* discardable,
- bool* purged) {
- AutoLock lock(lock_);
- // NB: |allocations_| is an MRU cache, and use of |Get| here updates that
- // cache.
- AllocationMap::iterator it = allocations_.Get(discardable);
- CHECK(it != allocations_.end());
-
- if (it->second.memory) {
- scoped_ptr<uint8, FreeDeleter> memory(it->second.memory);
- it->second.memory = NULL;
- *purged = false;
- return memory.Pass();
- }
-
- size_t bytes = it->second.bytes;
- if (!bytes)
- return scoped_ptr<uint8, FreeDeleter>();
-
- if (discardable_memory_limit_) {
- size_t limit = 0;
- if (bytes < discardable_memory_limit_)
- limit = discardable_memory_limit_ - bytes;
-
- PurgeLRUWithLockAcquiredUntilUsageIsWithin(limit);
- }
-
- // Check for overflow.
- if (std::numeric_limits<size_t>::max() - bytes < bytes_allocated_)
- return scoped_ptr<uint8, FreeDeleter>();
-
- scoped_ptr<uint8, FreeDeleter> memory(static_cast<uint8*>(malloc(bytes)));
- if (!memory)
- return scoped_ptr<uint8, FreeDeleter>();
-
- bytes_allocated_ += bytes;
- *purged = true;
- return memory.Pass();
-}
-
-void DiscardableMemoryProvider::Release(
- const DiscardableMemory* discardable,
- scoped_ptr<uint8, FreeDeleter> memory) {
- AutoLock lock(lock_);
- // NB: |allocations_| is an MRU cache, and use of |Get| here updates that
- // cache.
- AllocationMap::iterator it = allocations_.Get(discardable);
- CHECK(it != allocations_.end());
-
- DCHECK(!it->second.memory);
- it->second.memory = memory.release();
-
- EnforcePolicyWithLockAcquired();
-}
-
-void DiscardableMemoryProvider::PurgeAll() {
- AutoLock lock(lock_);
- PurgeLRUWithLockAcquiredUntilUsageIsWithin(0);
-}
-
-bool DiscardableMemoryProvider::IsRegisteredForTest(
- const DiscardableMemory* discardable) const {
- AutoLock lock(lock_);
- AllocationMap::const_iterator it = allocations_.Peek(discardable);
- return it != allocations_.end();
-}
-
-bool DiscardableMemoryProvider::CanBePurgedForTest(
- const DiscardableMemory* discardable) const {
- AutoLock lock(lock_);
- AllocationMap::const_iterator it = allocations_.Peek(discardable);
- return it != allocations_.end() && it->second.memory;
-}
-
-size_t DiscardableMemoryProvider::GetBytesAllocatedForTest() const {
- AutoLock lock(lock_);
- return bytes_allocated_;
-}
-
-void DiscardableMemoryProvider::Purge() {
- AutoLock lock(lock_);
-
- if (bytes_to_reclaim_under_moderate_pressure_ == 0)
- return;
-
- size_t limit = 0;
- if (bytes_to_reclaim_under_moderate_pressure_ < bytes_allocated_)
- limit = bytes_allocated_ - bytes_to_reclaim_under_moderate_pressure_;
-
- PurgeLRUWithLockAcquiredUntilUsageIsWithin(limit);
-}
-
-void DiscardableMemoryProvider::PurgeLRUWithLockAcquiredUntilUsageIsWithin(
- size_t limit) {
- TRACE_EVENT1(
- "base",
- "DiscardableMemoryProvider::PurgeLRUWithLockAcquiredUntilUsageIsWithin",
- "limit", limit);
-
- lock_.AssertAcquired();
-
- for (AllocationMap::reverse_iterator it = allocations_.rbegin();
- it != allocations_.rend();
- ++it) {
- if (bytes_allocated_ <= limit)
- break;
- if (!it->second.memory)
- continue;
-
- size_t bytes = it->second.bytes;
- DCHECK_LE(bytes, bytes_allocated_);
- bytes_allocated_ -= bytes;
- free(it->second.memory);
- it->second.memory = NULL;
- }
-}
-
-void DiscardableMemoryProvider::EnforcePolicyWithLockAcquired() {
- PurgeLRUWithLockAcquiredUntilUsageIsWithin(discardable_memory_limit_);
-}
-
-} // namespace internal
-} // namespace base
diff --git a/chromium/base/memory/discardable_memory_provider.h b/chromium/base/memory/discardable_memory_provider.h
deleted file mode 100644
index 6c343c0d929..00000000000
--- a/chromium/base/memory/discardable_memory_provider.h
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BASE_MEMORY_DISCARDABLE_MEMORY_PROVIDER_H_
-#define BASE_MEMORY_DISCARDABLE_MEMORY_PROVIDER_H_
-
-#include "base/base_export.h"
-#include "base/containers/hash_tables.h"
-#include "base/containers/mru_cache.h"
-#include "base/memory/memory_pressure_listener.h"
-#include "base/synchronization/lock.h"
-
-namespace base {
-class DiscardableMemory;
-} // namespace base
-
-#if defined(COMPILER_GCC)
-namespace BASE_HASH_NAMESPACE {
-template <>
-struct hash<const base::DiscardableMemory*> {
- size_t operator()(const base::DiscardableMemory* ptr) const {
- return hash<size_t>()(reinterpret_cast<size_t>(ptr));
- }
-};
-} // namespace BASE_HASH_NAMESPACE
-#endif // COMPILER
-
-namespace base {
-namespace internal {
-
-// The DiscardableMemoryProvider manages a collection of emulated
-// DiscardableMemory instances. It is used on platforms that do not support
-// discardable memory natively. It keeps track of all DiscardableMemory
-// instances (in case they need to be purged), and the total amount of
-// allocated memory (in case this forces a purge).
-//
-// When notified of memory pressure, the provider either purges the LRU
-// memory -- if the pressure is moderate -- or all discardable memory
-// if the pressure is critical.
-//
-// NB - this class is an implementation detail. It has been exposed for testing
-// purposes. You should not need to use this class directly.
-class BASE_EXPORT_PRIVATE DiscardableMemoryProvider {
- public:
- DiscardableMemoryProvider();
- ~DiscardableMemoryProvider();
-
- // The maximum number of bytes of discardable memory that may be allocated
- // before we force a purge. If this amount is zero, it is interpreted as
- // having no limit at all.
- void SetDiscardableMemoryLimit(size_t bytes);
-
- // Sets the amount of memory to reclaim when we're under moderate pressure.
- void SetBytesToReclaimUnderModeratePressure(size_t bytes);
-
- // Adds the given discardable memory to the provider's collection.
- void Register(const DiscardableMemory* discardable, size_t bytes);
-
- // Removes the given discardable memory from the provider's collection.
- void Unregister(const DiscardableMemory* discardable);
-
- // Returns NULL if an error occurred. Otherwise, returns the backing buffer
- // and sets |purged| to indicate whether or not the backing buffer has been
- // purged since last use.
- scoped_ptr<uint8, FreeDeleter> Acquire(
- const DiscardableMemory* discardable, bool* purged);
-
- // Release a previously acquired backing buffer. This gives the buffer back
- // to the provider where it can be purged if necessary.
- void Release(const DiscardableMemory* discardable,
- scoped_ptr<uint8, FreeDeleter> memory);
-
- // Purges all discardable memory.
- void PurgeAll();
-
- // Returns true if discardable memory has been added to the provider's
- // collection. This should only be used by tests.
- bool IsRegisteredForTest(const DiscardableMemory* discardable) const;
-
- // Returns true if discardable memory can be purged. This should only
- // be used by tests.
- bool CanBePurgedForTest(const DiscardableMemory* discardable) const;
-
- // Returns total amount of allocated discardable memory. This should only
- // be used by tests.
- size_t GetBytesAllocatedForTest() const;
-
- private:
- struct Allocation {
- explicit Allocation(size_t bytes)
- : bytes(bytes),
- memory(NULL) {
- }
-
- size_t bytes;
- uint8* memory;
- };
- typedef HashingMRUCache<const DiscardableMemory*, Allocation> AllocationMap;
-
- // This can be called as a hint that the system is under memory pressure.
- void NotifyMemoryPressure(
- MemoryPressureListener::MemoryPressureLevel pressure_level);
-
- // Purges |bytes_to_reclaim_under_moderate_pressure_| bytes of
- // discardable memory.
- void Purge();
-
- // Purges least recently used memory until usage is less or equal to |limit|.
- // Caller must acquire |lock_| prior to calling this function.
- void PurgeLRUWithLockAcquiredUntilUsageIsWithin(size_t limit);
-
- // Ensures that we don't allocate beyond our memory limit.
- // Caller must acquire |lock_| prior to calling this function.
- void EnforcePolicyWithLockAcquired();
-
- // Needs to be held when accessing members.
- mutable Lock lock_;
-
- // A MRU cache of all allocated bits of discardable memory. Used for purging.
- AllocationMap allocations_;
-
- // The total amount of allocated discardable memory.
- size_t bytes_allocated_;
-
- // The maximum number of bytes of discardable memory that may be allocated
- // before we assume moderate memory pressure.
- size_t discardable_memory_limit_;
-
- // Under moderate memory pressure, we will purge this amount of memory.
- size_t bytes_to_reclaim_under_moderate_pressure_;
-
- // Allows us to be respond when the system reports that it is under memory
- // pressure.
- MemoryPressureListener memory_pressure_listener_;
-
- DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryProvider);
-};
-
-} // namespace internal
-} // namespace base
-
-#endif // BASE_MEMORY_DISCARDABLE_MEMORY_PROVIDER_H_
diff --git a/chromium/base/memory/discardable_memory_provider_unittest.cc b/chromium/base/memory/discardable_memory_provider_unittest.cc
deleted file mode 100644
index 1559654c789..00000000000
--- a/chromium/base/memory/discardable_memory_provider_unittest.cc
+++ /dev/null
@@ -1,406 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/memory/discardable_memory_provider.h"
-
-#include "base/bind.h"
-#include "base/memory/discardable_memory.h"
-#include "base/run_loop.h"
-#include "base/synchronization/waitable_event.h"
-#include "base/threading/thread.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace base {
-
-class DiscardableMemoryProviderTestBase {
- public:
- class TestDiscardableMemory : public DiscardableMemory {
- public:
- TestDiscardableMemory(
- internal::DiscardableMemoryProvider* provider, size_t size)
- : provider_(provider),
- is_locked_(false) {
- provider_->Register(this, size);
- }
-
- virtual ~TestDiscardableMemory() {
- if (is_locked_)
- Unlock();
- provider_->Unregister(this);
- }
-
- // Overridden from DiscardableMemory:
- virtual LockDiscardableMemoryStatus Lock() OVERRIDE {
- DCHECK(!is_locked_);
-
- bool purged = false;
- memory_ = provider_->Acquire(this, &purged);
- if (!memory_)
- return DISCARDABLE_MEMORY_FAILED;
-
- is_locked_ = true;
- return purged ? DISCARDABLE_MEMORY_PURGED : DISCARDABLE_MEMORY_SUCCESS;
- }
- virtual void Unlock() OVERRIDE {
- DCHECK(is_locked_);
- provider_->Release(this, memory_.Pass());
- is_locked_ = false;
- }
- virtual void* Memory() const OVERRIDE {
- DCHECK(memory_);
- return memory_.get();
- }
-
- private:
- internal::DiscardableMemoryProvider* provider_;
- scoped_ptr<uint8, FreeDeleter> memory_;
- bool is_locked_;
-
- DISALLOW_COPY_AND_ASSIGN(TestDiscardableMemory);
- };
-
- DiscardableMemoryProviderTestBase()
- : message_loop_(MessageLoop::TYPE_IO),
- provider_(new internal::DiscardableMemoryProvider) {
- }
-
- protected:
- bool IsRegistered(const DiscardableMemory* discardable) {
- return provider_->IsRegisteredForTest(discardable);
- }
-
- bool CanBePurged(const DiscardableMemory* discardable) {
- return provider_->CanBePurgedForTest(discardable);
- }
-
- size_t BytesAllocated() const {
- return provider_->GetBytesAllocatedForTest();
- }
-
- void* Memory(const DiscardableMemory* discardable) const {
- return discardable->Memory();
- }
-
- void SetDiscardableMemoryLimit(size_t bytes) {
- provider_->SetDiscardableMemoryLimit(bytes);
- }
-
- void SetBytesToReclaimUnderModeratePressure(size_t bytes) {
- provider_->SetBytesToReclaimUnderModeratePressure(bytes);
- }
-
- scoped_ptr<DiscardableMemory> CreateLockedMemory(size_t size) {
- scoped_ptr<TestDiscardableMemory> memory(
- new TestDiscardableMemory(provider_.get(), size));
- if (memory->Lock() != DISCARDABLE_MEMORY_PURGED)
- return scoped_ptr<DiscardableMemory>();
- return memory.PassAs<DiscardableMemory>();
- }
-
- private:
- MessageLoop message_loop_;
- scoped_ptr<internal::DiscardableMemoryProvider> provider_;
-};
-
-class DiscardableMemoryProviderTest
- : public DiscardableMemoryProviderTestBase,
- public testing::Test {
- public:
- DiscardableMemoryProviderTest() {}
-};
-
-TEST_F(DiscardableMemoryProviderTest, CreateLockedMemory) {
- size_t size = 1024;
- const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
- EXPECT_TRUE(IsRegistered(discardable.get()));
- EXPECT_NE(static_cast<void*>(NULL), Memory(discardable.get()));
- EXPECT_EQ(1024u, BytesAllocated());
- EXPECT_FALSE(CanBePurged(discardable.get()));
-}
-
-TEST_F(DiscardableMemoryProviderTest, CreateLockedMemoryZeroSize) {
- size_t size = 0;
- const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
- EXPECT_FALSE(discardable);
- EXPECT_FALSE(IsRegistered(discardable.get()));
- EXPECT_EQ(0u, BytesAllocated());
-}
-
-TEST_F(DiscardableMemoryProviderTest, LockAfterUnlock) {
- size_t size = 1024;
- const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
- EXPECT_TRUE(IsRegistered(discardable.get()));
- EXPECT_NE(static_cast<void*>(NULL), Memory(discardable.get()));
- EXPECT_EQ(1024u, BytesAllocated());
- EXPECT_FALSE(CanBePurged(discardable.get()));
-
- // Now unlock so we can lock later.
- discardable->Unlock();
- EXPECT_TRUE(CanBePurged(discardable.get()));
-
- EXPECT_EQ(DISCARDABLE_MEMORY_SUCCESS, discardable->Lock());
- EXPECT_FALSE(CanBePurged(discardable.get()));
-}
-
-TEST_F(DiscardableMemoryProviderTest, LockAfterPurge) {
- size_t size = 1024;
- const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
- EXPECT_TRUE(IsRegistered(discardable.get()));
- EXPECT_NE(static_cast<void*>(NULL), Memory(discardable.get()));
- EXPECT_EQ(1024u, BytesAllocated());
- EXPECT_FALSE(CanBePurged(discardable.get()));
-
- // Now unlock so we can lock later.
- discardable->Unlock();
- EXPECT_TRUE(CanBePurged(discardable.get()));
-
- // Force the system to purge.
- MemoryPressureListener::NotifyMemoryPressure(
- MemoryPressureListener::MEMORY_PRESSURE_CRITICAL);
-
- // Required because ObserverListThreadSafe notifies via PostTask.
- RunLoop().RunUntilIdle();
-
- EXPECT_EQ(DISCARDABLE_MEMORY_PURGED, discardable->Lock());
- EXPECT_FALSE(CanBePurged(discardable.get()));
-}
-
-TEST_F(DiscardableMemoryProviderTest, LockAfterPurgeAndCannotReallocate) {
- size_t size = 1024;
- const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
- EXPECT_TRUE(IsRegistered(discardable.get()));
- EXPECT_NE(static_cast<void*>(NULL), Memory(discardable.get()));
- EXPECT_EQ(1024u, BytesAllocated());
- EXPECT_FALSE(CanBePurged(discardable.get()));
-
- // Now unlock so we can lock later.
- discardable->Unlock();
- EXPECT_TRUE(CanBePurged(discardable.get()));
-
- // Set max allowed allocation to 1 byte. This will make cause the memory
- // to be purged.
- SetDiscardableMemoryLimit(1);
-
- EXPECT_EQ(DISCARDABLE_MEMORY_PURGED, discardable->Lock());
- EXPECT_FALSE(CanBePurged(discardable.get()));
-}
-
-TEST_F(DiscardableMemoryProviderTest, Overflow) {
- {
- size_t size = 1024;
- const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
- EXPECT_TRUE(IsRegistered(discardable.get()));
- EXPECT_NE(static_cast<void*>(NULL), Memory(discardable.get()));
- EXPECT_EQ(1024u, BytesAllocated());
-
- size_t massive_size = std::numeric_limits<size_t>::max();
- const scoped_ptr<DiscardableMemory> massive_discardable(
- CreateLockedMemory(massive_size));
- EXPECT_FALSE(massive_discardable);
- EXPECT_EQ(1024u, BytesAllocated());
- }
- EXPECT_EQ(0u, BytesAllocated());
-}
-
-class PermutationTestData {
- public:
- PermutationTestData(unsigned d0, unsigned d1, unsigned d2) {
- ordering_[0] = d0;
- ordering_[1] = d1;
- ordering_[2] = d2;
- }
-
- const unsigned* ordering() const { return ordering_; }
-
- private:
- unsigned ordering_[3];
-};
-
-class DiscardableMemoryProviderPermutationTest
- : public DiscardableMemoryProviderTestBase,
- public testing::TestWithParam<PermutationTestData> {
- public:
- DiscardableMemoryProviderPermutationTest() {}
-
- protected:
- // Use discardable memory in order specified by ordering parameter.
- void CreateAndUseDiscardableMemory() {
- for (int i = 0; i < 3; ++i) {
- discardables_[i] = CreateLockedMemory(1024);
- EXPECT_TRUE(discardables_[i]);
- EXPECT_NE(static_cast<void*>(NULL), Memory(discardables_[i].get()));
- discardables_[i]->Unlock();
- }
- for (int i = 0; i < 3; ++i) {
- int index = GetParam().ordering()[i];
- EXPECT_NE(DISCARDABLE_MEMORY_FAILED, discardables_[index]->Lock());
- // Leave i == 0 locked.
- if (i > 0)
- discardables_[index]->Unlock();
- }
- }
-
- DiscardableMemory* discardable(unsigned position) {
- return discardables_[GetParam().ordering()[position]].get();
- }
-
- private:
- scoped_ptr<DiscardableMemory> discardables_[3];
-};
-
-// Verify that memory was discarded in the correct order after applying
-// memory pressure.
-TEST_P(DiscardableMemoryProviderPermutationTest, LRUDiscardedModeratePressure) {
- CreateAndUseDiscardableMemory();
-
- SetBytesToReclaimUnderModeratePressure(1024);
- MemoryPressureListener::NotifyMemoryPressure(
- MemoryPressureListener::MEMORY_PRESSURE_MODERATE);
- RunLoop().RunUntilIdle();
-
- EXPECT_NE(DISCARDABLE_MEMORY_FAILED, discardable(2)->Lock());
- EXPECT_NE(DISCARDABLE_MEMORY_SUCCESS, discardable(1)->Lock());
- // 0 should still be locked.
- EXPECT_NE(static_cast<void*>(NULL), Memory(discardable(0)));
-}
-
-// Verify that memory was discarded in the correct order after changing
-// memory limit.
-TEST_P(DiscardableMemoryProviderPermutationTest, LRUDiscardedExceedLimit) {
- CreateAndUseDiscardableMemory();
-
- SetBytesToReclaimUnderModeratePressure(1024);
- SetDiscardableMemoryLimit(2048);
-
- EXPECT_NE(DISCARDABLE_MEMORY_FAILED, discardable(2)->Lock());
- EXPECT_NE(DISCARDABLE_MEMORY_SUCCESS, discardable(1)->Lock());
- // 0 should still be locked.
- EXPECT_NE(static_cast<void*>(NULL), Memory(discardable(0)));
-}
-
-// Verify that no more memory than necessary was discarded after changing
-// memory limit.
-TEST_P(DiscardableMemoryProviderPermutationTest, LRUDiscardedAmount) {
- SetBytesToReclaimUnderModeratePressure(2048);
- SetDiscardableMemoryLimit(4096);
-
- CreateAndUseDiscardableMemory();
-
- SetDiscardableMemoryLimit(2048);
-
- EXPECT_EQ(DISCARDABLE_MEMORY_SUCCESS, discardable(2)->Lock());
- EXPECT_EQ(DISCARDABLE_MEMORY_PURGED, discardable(1)->Lock());
- // 0 should still be locked.
- EXPECT_NE(static_cast<void*>(NULL), Memory(discardable(0)));
-}
-
-TEST_P(DiscardableMemoryProviderPermutationTest,
- CriticalPressureFreesAllUnlocked) {
- CreateAndUseDiscardableMemory();
-
- MemoryPressureListener::NotifyMemoryPressure(
- MemoryPressureListener::MEMORY_PRESSURE_CRITICAL);
- RunLoop().RunUntilIdle();
-
- for (int i = 0; i < 3; ++i) {
- if (i == 0)
- EXPECT_NE(static_cast<void*>(NULL), Memory(discardable(i)));
- else
- EXPECT_EQ(DISCARDABLE_MEMORY_PURGED, discardable(i)->Lock());
- }
-}
-
-INSTANTIATE_TEST_CASE_P(DiscardableMemoryProviderPermutationTests,
- DiscardableMemoryProviderPermutationTest,
- ::testing::Values(PermutationTestData(0, 1, 2),
- PermutationTestData(0, 2, 1),
- PermutationTestData(1, 0, 2),
- PermutationTestData(1, 2, 0),
- PermutationTestData(2, 0, 1),
- PermutationTestData(2, 1, 0)));
-
-TEST_F(DiscardableMemoryProviderTest, NormalDestruction) {
- {
- size_t size = 1024;
- const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
- EXPECT_TRUE(IsRegistered(discardable.get()));
- EXPECT_EQ(1024u, BytesAllocated());
- }
- EXPECT_EQ(0u, BytesAllocated());
-}
-
-TEST_F(DiscardableMemoryProviderTest, DestructionWhileLocked) {
- {
- size_t size = 1024;
- const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
- EXPECT_TRUE(IsRegistered(discardable.get()));
- EXPECT_NE(static_cast<void*>(NULL), Memory(discardable.get()));
- EXPECT_EQ(1024u, BytesAllocated());
- EXPECT_FALSE(CanBePurged(discardable.get()));
- }
- // Should have ignored the "locked" status and freed the discardable memory.
- EXPECT_EQ(0u, BytesAllocated());
-}
-
-#if !defined(NDEBUG) && !defined(OS_ANDROID) && !defined(OS_IOS)
-// Death tests are not supported with Android APKs.
-TEST_F(DiscardableMemoryProviderTest, UnlockedMemoryAccessCrashesInDebugMode) {
- size_t size = 1024;
- const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
- EXPECT_TRUE(IsRegistered(discardable.get()));
- EXPECT_NE(static_cast<void*>(NULL), Memory(discardable.get()));
- EXPECT_EQ(1024u, BytesAllocated());
- EXPECT_FALSE(CanBePurged(discardable.get()));
- discardable->Unlock();
- EXPECT_TRUE(CanBePurged(discardable.get()));
- // We *must* die if we are asked to vend a pointer to unlocked memory.
- EXPECT_DEATH(discardable->Memory(), ".*Check failed.*");
-}
-#endif
-
-class ThreadedDiscardableMemoryProviderTest
- : public DiscardableMemoryProviderTest {
- public:
- ThreadedDiscardableMemoryProviderTest()
- : memory_usage_thread_("memory_usage_thread"),
- thread_sync_(true, false) {
- }
-
- virtual void SetUp() OVERRIDE {
- memory_usage_thread_.Start();
- }
-
- virtual void TearDown() OVERRIDE {
- memory_usage_thread_.Stop();
- }
-
- void UseMemoryHelper() {
- size_t size = 1024;
- const scoped_ptr<DiscardableMemory> discardable(CreateLockedMemory(size));
- EXPECT_TRUE(IsRegistered(discardable.get()));
- EXPECT_NE(static_cast<void*>(NULL), Memory(discardable.get()));
- discardable->Unlock();
- }
-
- void SignalHelper() {
- thread_sync_.Signal();
- }
-
- Thread memory_usage_thread_;
- WaitableEvent thread_sync_;
-};
-
-TEST_F(ThreadedDiscardableMemoryProviderTest, UseMemoryOnThread) {
- memory_usage_thread_.message_loop()->PostTask(
- FROM_HERE,
- Bind(&ThreadedDiscardableMemoryProviderTest::UseMemoryHelper,
- Unretained(this)));
- memory_usage_thread_.message_loop()->PostTask(
- FROM_HERE,
- Bind(&ThreadedDiscardableMemoryProviderTest::SignalHelper,
- Unretained(this)));
- thread_sync_.Wait();
-}
-
-} // namespace base
diff --git a/chromium/base/memory/discardable_memory_unittest.cc b/chromium/base/memory/discardable_memory_unittest.cc
index c9f67b2556f..dc0e2cd2126 100644
--- a/chromium/base/memory/discardable_memory_unittest.cc
+++ b/chromium/base/memory/discardable_memory_unittest.cc
@@ -4,52 +4,81 @@
#include "base/memory/discardable_memory.h"
-#include <limits>
+#include <algorithm>
+#include "base/run_loop.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if defined(OS_ANDROID)
+#include <limits>
+#endif
+
namespace base {
+namespace {
+
+class DiscardableMemoryTest
+ : public testing::TestWithParam<DiscardableMemoryType> {
+ public:
+ DiscardableMemoryTest() : message_loop_(MessageLoop::TYPE_IO) {
+ // Register memory pressure listeners now that we have a message loop.
+ DiscardableMemory::RegisterMemoryPressureListeners();
+ }
+ virtual ~DiscardableMemoryTest() {
+ DiscardableMemory::UnregisterMemoryPressureListeners();
+ }
+
+ protected:
+ scoped_ptr<DiscardableMemory> CreateLockedMemory(size_t size) {
+ return DiscardableMemory::CreateLockedMemoryWithType(
+ GetParam(), size).Pass();
+ }
+
+ private:
+ MessageLoop message_loop_;
+};
const size_t kSize = 1024;
-#if defined(OS_ANDROID)
-TEST(DiscardableMemoryTest, TooLargeAllocationFails) {
- const size_t kPageSize = 4096;
- const size_t max_allowed_allocation_size =
- std::numeric_limits<size_t>::max() - kPageSize + 1;
- scoped_ptr<DiscardableMemory> memory(
- DiscardableMemory::CreateLockedMemory(max_allowed_allocation_size + 1));
- // On certain platforms (e.g. Android), page-alignment would have caused an
- // overflow resulting in a small allocation if the input size wasn't checked
- // correctly.
- ASSERT_FALSE(memory);
+TEST_P(DiscardableMemoryTest, IsNamed) {
+ std::string type_name(DiscardableMemory::GetTypeName(GetParam()));
+ EXPECT_NE("unknown", type_name);
+ EXPECT_EQ(GetParam(), DiscardableMemory::GetNamedType(type_name));
}
-#endif
-TEST(DiscardableMemoryTest, SupportedNatively) {
+bool IsNativeType(DiscardableMemoryType type) {
+ return
+ type == DISCARDABLE_MEMORY_TYPE_ASHMEM ||
+ type == DISCARDABLE_MEMORY_TYPE_MAC;
+}
+
+TEST_P(DiscardableMemoryTest, SupportedNatively) {
+ std::vector<DiscardableMemoryType> supported_types;
+ DiscardableMemory::GetSupportedTypes(&supported_types);
#if defined(DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY)
- ASSERT_TRUE(DiscardableMemory::SupportedNatively());
+ EXPECT_NE(0, std::count_if(supported_types.begin(),
+ supported_types.end(),
+ IsNativeType));
#else
// If we ever have a platform that decides at runtime if it can support
// discardable memory natively, then we'll have to add a 'never supported
// natively' define for this case. At present, if it's not always supported
// natively, it's never supported.
- ASSERT_FALSE(DiscardableMemory::SupportedNatively());
+ EXPECT_EQ(0, std::count_if(supported_types.begin(),
+ supported_types.end(),
+ IsNativeType));
#endif
}
// Test Lock() and Unlock() functionalities.
-TEST(DiscardableMemoryTest, LockAndUnLock) {
- const scoped_ptr<DiscardableMemory> memory(
- DiscardableMemory::CreateLockedMemory(kSize));
+TEST_P(DiscardableMemoryTest, LockAndUnLock) {
+ const scoped_ptr<DiscardableMemory> memory(CreateLockedMemory(kSize));
ASSERT_TRUE(memory);
void* addr = memory->Memory();
ASSERT_NE(static_cast<void*>(NULL), addr);
memory->Unlock();
- // The system should have no reason to purge discardable blocks in this brief
- // interval, though technically speaking this might flake.
- EXPECT_EQ(DISCARDABLE_MEMORY_SUCCESS, memory->Lock());
+
+ EXPECT_NE(DISCARDABLE_MEMORY_LOCK_STATUS_FAILED, memory->Lock());
addr = memory->Memory();
ASSERT_NE(static_cast<void*>(NULL), addr);
@@ -57,32 +86,25 @@ TEST(DiscardableMemoryTest, LockAndUnLock) {
}
// Test delete a discardable memory while it is locked.
-TEST(DiscardableMemoryTest, DeleteWhileLocked) {
- const scoped_ptr<DiscardableMemory> memory(
- DiscardableMemory::CreateLockedMemory(kSize));
+TEST_P(DiscardableMemoryTest, DeleteWhileLocked) {
+ const scoped_ptr<DiscardableMemory> memory(CreateLockedMemory(kSize));
ASSERT_TRUE(memory);
}
-#if !defined(OS_ANDROID)
// Test forced purging.
-TEST(DiscardableMemoryTest, Purge) {
- ASSERT_TRUE(DiscardableMemory::PurgeForTestingSupported());
-
- const scoped_ptr<DiscardableMemory> memory(
- DiscardableMemory::CreateLockedMemory(kSize));
+TEST_P(DiscardableMemoryTest, Purge) {
+ const scoped_ptr<DiscardableMemory> memory(CreateLockedMemory(kSize));
ASSERT_TRUE(memory);
memory->Unlock();
DiscardableMemory::PurgeForTesting();
- EXPECT_EQ(DISCARDABLE_MEMORY_PURGED, memory->Lock());
+ EXPECT_EQ(DISCARDABLE_MEMORY_LOCK_STATUS_PURGED, memory->Lock());
}
-#endif // !OS_ANDROID
#if !defined(NDEBUG) && !defined(OS_ANDROID)
// Death tests are not supported with Android APKs.
-TEST(DiscardableMemoryTest, UnlockedMemoryAccessCrashesInDebugMode) {
- const scoped_ptr<DiscardableMemory> memory(
- DiscardableMemory::CreateLockedMemory(kSize));
+TEST_P(DiscardableMemoryTest, UnlockedMemoryAccessCrashesInDebugMode) {
+ const scoped_ptr<DiscardableMemory> memory(CreateLockedMemory(kSize));
ASSERT_TRUE(memory);
memory->Unlock();
ASSERT_DEATH_IF_SUPPORTED(
@@ -90,4 +112,16 @@ TEST(DiscardableMemoryTest, UnlockedMemoryAccessCrashesInDebugMode) {
}
#endif
+std::vector<DiscardableMemoryType> GetSupportedDiscardableMemoryTypes() {
+ std::vector<DiscardableMemoryType> supported_types;
+ DiscardableMemory::GetSupportedTypes(&supported_types);
+ return supported_types;
}
+
+INSTANTIATE_TEST_CASE_P(
+ DiscardableMemoryTests,
+ DiscardableMemoryTest,
+ ::testing::ValuesIn(GetSupportedDiscardableMemoryTypes()));
+
+} // namespace
+} // namespace base
diff --git a/chromium/base/memory/discardable_memory_win.cc b/chromium/base/memory/discardable_memory_win.cc
index 92e39e5e7d4..b9342e92043 100644
--- a/chromium/base/memory/discardable_memory_win.cc
+++ b/chromium/base/memory/discardable_memory_win.cc
@@ -2,29 +2,67 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/memory/discardable_memory.h"
+
+#include "base/logging.h"
#include "base/memory/discardable_memory_emulated.h"
+#include "base/memory/discardable_memory_malloc.h"
namespace base {
// static
-bool DiscardableMemory::SupportedNatively() {
- return false;
+void DiscardableMemory::RegisterMemoryPressureListeners() {
+ internal::DiscardableMemoryEmulated::RegisterMemoryPressureListeners();
+}
+
+// static
+void DiscardableMemory::UnregisterMemoryPressureListeners() {
+ internal::DiscardableMemoryEmulated::UnregisterMemoryPressureListeners();
+}
+
+// static
+bool DiscardableMemory::ReduceMemoryUsage() {
+ return internal::DiscardableMemoryEmulated::ReduceMemoryUsage();
}
// static
-scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemory(
- size_t size) {
- scoped_ptr<internal::DiscardableMemoryEmulated> memory(
- new internal::DiscardableMemoryEmulated(size));
- if (!memory->Initialize())
- return scoped_ptr<DiscardableMemory>();
-
- return memory.PassAs<DiscardableMemory>();
+void DiscardableMemory::GetSupportedTypes(
+ std::vector<DiscardableMemoryType>* types) {
+ const DiscardableMemoryType supported_types[] = {
+ DISCARDABLE_MEMORY_TYPE_EMULATED,
+ DISCARDABLE_MEMORY_TYPE_MALLOC
+ };
+ types->assign(supported_types, supported_types + arraysize(supported_types));
}
// static
-bool DiscardableMemory::PurgeForTestingSupported() {
- return true;
+scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemoryWithType(
+ DiscardableMemoryType type, size_t size) {
+ switch (type) {
+ case DISCARDABLE_MEMORY_TYPE_NONE:
+ case DISCARDABLE_MEMORY_TYPE_ASHMEM:
+ case DISCARDABLE_MEMORY_TYPE_MAC:
+ return scoped_ptr<DiscardableMemory>();
+ case DISCARDABLE_MEMORY_TYPE_EMULATED: {
+ scoped_ptr<internal::DiscardableMemoryEmulated> memory(
+ new internal::DiscardableMemoryEmulated(size));
+ if (!memory->Initialize())
+ return scoped_ptr<DiscardableMemory>();
+
+ return memory.PassAs<DiscardableMemory>();
+ }
+ case DISCARDABLE_MEMORY_TYPE_MALLOC: {
+ scoped_ptr<internal::DiscardableMemoryMalloc> memory(
+ new internal::DiscardableMemoryMalloc(size));
+ if (!memory->Initialize())
+ return scoped_ptr<DiscardableMemory>();
+
+ return memory.PassAs<DiscardableMemory>();
+ }
+ }
+
+ NOTREACHED();
+ return scoped_ptr<DiscardableMemory>();
}
// static
diff --git a/chromium/base/memory/ref_counted.cc b/chromium/base/memory/ref_counted.cc
index 31ad5098cd0..f5924d0fe76 100644
--- a/chromium/base/memory/ref_counted.cc
+++ b/chromium/base/memory/ref_counted.cc
@@ -3,54 +3,12 @@
// found in the LICENSE file.
#include "base/memory/ref_counted.h"
-
-#include "base/logging.h"
#include "base/threading/thread_collision_warner.h"
namespace base {
namespace subtle {
-RefCountedBase::RefCountedBase()
- : ref_count_(0)
-#ifndef NDEBUG
- , in_dtor_(false)
-#endif
- {
-}
-
-RefCountedBase::~RefCountedBase() {
-#ifndef NDEBUG
- DCHECK(in_dtor_) << "RefCounted object deleted without calling Release()";
-#endif
-}
-
-void RefCountedBase::AddRef() const {
- // TODO(maruel): Add back once it doesn't assert 500 times/sec.
- // Current thread books the critical section "AddRelease" without release it.
- // DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_);
-#ifndef NDEBUG
- DCHECK(!in_dtor_);
-#endif
- ++ref_count_;
-}
-
-bool RefCountedBase::Release() const {
- // TODO(maruel): Add back once it doesn't assert 500 times/sec.
- // Current thread books the critical section "AddRelease" without release it.
- // DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_);
-#ifndef NDEBUG
- DCHECK(!in_dtor_);
-#endif
- if (--ref_count_ == 0) {
-#ifndef NDEBUG
- in_dtor_ = true;
-#endif
- return true;
- }
- return false;
-}
-
bool RefCountedThreadSafeBase::HasOneRef() const {
return AtomicRefCountIsOne(
&const_cast<RefCountedThreadSafeBase*>(this)->ref_count_);
diff --git a/chromium/base/memory/ref_counted.h b/chromium/base/memory/ref_counted.h
index aae36b17c2f..be5eda8e083 100644
--- a/chromium/base/memory/ref_counted.h
+++ b/chromium/base/memory/ref_counted.h
@@ -10,6 +10,9 @@
#include "base/atomic_ref_count.h"
#include "base/base_export.h"
#include "base/compiler_specific.h"
+#ifndef NDEBUG
+#include "base/logging.h"
+#endif
#include "base/threading/thread_collision_warner.h"
namespace base {
@@ -21,13 +24,49 @@ class BASE_EXPORT RefCountedBase {
bool HasOneRef() const { return ref_count_ == 1; }
protected:
- RefCountedBase();
- ~RefCountedBase();
+ RefCountedBase()
+ : ref_count_(0)
+ #ifndef NDEBUG
+ , in_dtor_(false)
+ #endif
+ {
+ }
+
+ ~RefCountedBase() {
+ #ifndef NDEBUG
+ DCHECK(in_dtor_) << "RefCounted object deleted without calling Release()";
+ #endif
+ }
- void AddRef() const;
+
+ void AddRef() const {
+ // TODO(maruel): Add back once it doesn't assert 500 times/sec.
+ // Current thread books the critical section "AddRelease"
+ // without release it.
+ // DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_);
+ #ifndef NDEBUG
+ DCHECK(!in_dtor_);
+ #endif
+ ++ref_count_;
+ }
// Returns true if the object should self-delete.
- bool Release() const;
+ bool Release() const {
+ // TODO(maruel): Add back once it doesn't assert 500 times/sec.
+ // Current thread books the critical section "AddRelease"
+ // without release it.
+ // DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_);
+ #ifndef NDEBUG
+ DCHECK(!in_dtor_);
+ #endif
+ if (--ref_count_ == 0) {
+ #ifndef NDEBUG
+ in_dtor_ = true;
+ #endif
+ return true;
+ }
+ return false;
+ }
private:
mutable int ref_count_;
diff --git a/chromium/base/memory/ref_counted_memory.cc b/chromium/base/memory/ref_counted_memory.cc
index b1deee11201..477c941355c 100644
--- a/chromium/base/memory/ref_counted_memory.cc
+++ b/chromium/base/memory/ref_counted_memory.cc
@@ -37,6 +37,9 @@ RefCountedBytes::RefCountedBytes(const std::vector<unsigned char>& initializer)
: data_(initializer) {
}
+RefCountedBytes::RefCountedBytes(const unsigned char* p, size_t size)
+ : data_(p, p + size) {}
+
RefCountedBytes* RefCountedBytes::TakeVector(
std::vector<unsigned char>* to_destroy) {
RefCountedBytes* bytes = new RefCountedBytes;
diff --git a/chromium/base/memory/ref_counted_memory.h b/chromium/base/memory/ref_counted_memory.h
index d2987c5d21b..a238c3a30fe 100644
--- a/chromium/base/memory/ref_counted_memory.h
+++ b/chromium/base/memory/ref_counted_memory.h
@@ -30,6 +30,11 @@ class BASE_EXPORT RefCountedMemory
// Returns true if |other| is byte for byte equal.
bool Equals(const scoped_refptr<RefCountedMemory>& other) const;
+ // Handy method to simplify calling front() with a reinterpret_cast.
+ template<typename T> const T* front_as() const {
+ return reinterpret_cast<const T*>(front());
+ }
+
protected:
friend class base::RefCountedThreadSafe<RefCountedMemory>;
RefCountedMemory();
@@ -42,8 +47,9 @@ class BASE_EXPORT RefCountedStaticMemory : public RefCountedMemory {
public:
RefCountedStaticMemory()
: data_(NULL), length_(0) {}
- RefCountedStaticMemory(const unsigned char* data, size_t length)
- : data_(length ? data : NULL), length_(length) {}
+ RefCountedStaticMemory(const void* data, size_t length)
+ : data_(static_cast<const unsigned char*>(length ? data : NULL)),
+ length_(length) {}
// Overridden from RefCountedMemory:
virtual const unsigned char* front() const OVERRIDE;
@@ -58,8 +64,7 @@ class BASE_EXPORT RefCountedStaticMemory : public RefCountedMemory {
DISALLOW_COPY_AND_ASSIGN(RefCountedStaticMemory);
};
-// An implementation of RefCountedMemory, where we own our the data in a
-// vector.
+// An implementation of RefCountedMemory, where we own the data in a vector.
class BASE_EXPORT RefCountedBytes : public RefCountedMemory {
public:
RefCountedBytes();
@@ -67,6 +72,9 @@ class BASE_EXPORT RefCountedBytes : public RefCountedMemory {
// Constructs a RefCountedBytes object by _copying_ from |initializer|.
explicit RefCountedBytes(const std::vector<unsigned char>& initializer);
+ // Constructs a RefCountedBytes object by copying |size| bytes from |p|.
+ RefCountedBytes(const unsigned char* p, size_t size);
+
// Constructs a RefCountedBytes object by performing a swap. (To non
// destructively build a RefCountedBytes, use the constructor that takes a
// vector.)
diff --git a/chromium/base/memory/ref_counted_memory_unittest.cc b/chromium/base/memory/ref_counted_memory_unittest.cc
index 88c5b534851..5bfc1c79a69 100644
--- a/chromium/base/memory/ref_counted_memory_unittest.cc
+++ b/chromium/base/memory/ref_counted_memory_unittest.cc
@@ -10,12 +10,10 @@ namespace base {
TEST(RefCountedMemoryUnitTest, RefCountedStaticMemory) {
scoped_refptr<RefCountedMemory> mem = new RefCountedStaticMemory(
- reinterpret_cast<const uint8*>("static mem00"), 10);
+ "static mem00", 10);
EXPECT_EQ(10U, mem->size());
- EXPECT_EQ("static mem",
- std::string(reinterpret_cast<const char*>(mem->front()),
- mem->size()));
+ EXPECT_EQ("static mem", std::string(mem->front_as<char>(), mem->size()));
}
TEST(RefCountedMemoryUnitTest, RefCountedBytes) {
@@ -29,6 +27,16 @@ TEST(RefCountedMemoryUnitTest, RefCountedBytes) {
EXPECT_EQ(2U, mem->size());
EXPECT_EQ(45U, mem->front()[0]);
EXPECT_EQ(99U, mem->front()[1]);
+
+ scoped_refptr<RefCountedMemory> mem2;
+ {
+ unsigned char data2[] = { 12, 11, 99 };
+ mem2 = new RefCountedBytes(data2, 3);
+ }
+ EXPECT_EQ(3U, mem2->size());
+ EXPECT_EQ(12U, mem2->front()[0]);
+ EXPECT_EQ(11U, mem2->front()[1]);
+ EXPECT_EQ(99U, mem2->front()[2]);
}
TEST(RefCountedMemoryUnitTest, RefCountedString) {
diff --git a/chromium/base/memory/scoped_handle.h b/chromium/base/memory/scoped_handle.h
deleted file mode 100644
index b95559dcd83..00000000000
--- a/chromium/base/memory/scoped_handle.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BASE_MEMORY_SCOPED_HANDLE_H_
-#define BASE_MEMORY_SCOPED_HANDLE_H_
-
-#include <stdio.h>
-
-#include "base/basictypes.h"
-
-class ScopedStdioHandle {
- public:
- ScopedStdioHandle()
- : handle_(NULL) { }
-
- explicit ScopedStdioHandle(FILE* handle)
- : handle_(handle) { }
-
- ~ScopedStdioHandle() {
- Close();
- }
-
- void Close() {
- if (handle_) {
- fclose(handle_);
- handle_ = NULL;
- }
- }
-
- FILE* get() const { return handle_; }
-
- FILE* Take() {
- FILE* temp = handle_;
- handle_ = NULL;
- return temp;
- }
-
- void Set(FILE* newhandle) {
- Close();
- handle_ = newhandle;
- }
-
- private:
- FILE* handle_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedStdioHandle);
-};
-
-#endif // BASE_MEMORY_SCOPED_HANDLE_H_
diff --git a/chromium/base/memory/scoped_ptr.h b/chromium/base/memory/scoped_ptr.h
index 790fecce71e..bf2e0b6f068 100644
--- a/chromium/base/memory/scoped_ptr.h
+++ b/chromium/base/memory/scoped_ptr.h
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Scopers help you manage ownership of a pointer, helping you easily manage the
-// a pointer within a scope, and automatically destroying the pointer at the
-// end of a scope. There are two main classes you will use, which correspond
-// to the operators new/delete and new[]/delete[].
+// Scopers help you manage ownership of a pointer, helping you easily manage a
+// pointer within a scope, and automatically destroying the pointer at the end
+// of a scope. There are two main classes you will use, which correspond to the
+// operators new/delete and new[]/delete[].
//
// Example usage (scoped_ptr<T>):
// {
@@ -88,7 +88,7 @@
#define BASE_MEMORY_SCOPED_PTR_H_
// This is an implementation designed to match the anticipated future TR2
-// implementation of the scoped_ptr class and scoped_ptr_malloc (deprecated).
+// implementation of the scoped_ptr class.
#include <assert.h>
#include <stddef.h>
@@ -227,7 +227,7 @@ class scoped_ptr_impl {
abort();
// Note that running data_.ptr = p can lead to undefined behavior if
- // get_deleter()(get()) deletes this. In order to pevent this, reset()
+ // get_deleter()(get()) deletes this. In order to prevent this, reset()
// should update the stored pointer before deleting its old value.
//
// However, changing reset() to use that behavior may cause current code to
@@ -570,134 +570,6 @@ bool operator!=(T* p1, const scoped_ptr<T, D>& p2) {
return p1 != p2.get();
}
-// DEPRECATED: Use scoped_ptr<C, base::FreeDeleter> instead.
-//
-// scoped_ptr_malloc<> is similar to scoped_ptr<>, but it accepts a
-// second template argument, the functor used to free the object.
-
-template<class C, class FreeProc = base::FreeDeleter>
-class scoped_ptr_malloc {
- MOVE_ONLY_TYPE_FOR_CPP_03(scoped_ptr_malloc, RValue)
-
- public:
-
- // The element type
- typedef C element_type;
-
- // Constructor. Defaults to initializing with NULL.
- // There is no way to create an uninitialized scoped_ptr.
- // The input parameter must be allocated with an allocator that matches the
- // Free functor. For the default Free functor, this is malloc, calloc, or
- // realloc.
- explicit scoped_ptr_malloc(C* p = NULL): ptr_(p) {}
-
- // Constructor. Move constructor for C++03 move emulation of this type.
- scoped_ptr_malloc(RValue rvalue)
- : ptr_(rvalue.object->release()) {
- }
-
- // Destructor. If there is a C object, call the Free functor.
- ~scoped_ptr_malloc() {
- reset();
- }
-
- // operator=. Move operator= for C++03 move emulation of this type.
- scoped_ptr_malloc& operator=(RValue rhs) {
- reset(rhs.object->release());
- return *this;
- }
-
- // Reset. Calls the Free functor on the current owned object, if any.
- // Then takes ownership of a new object, if given.
- // this->reset(this->get()) works.
- void reset(C* p = NULL) {
- if (ptr_ != p) {
- if (ptr_ != NULL) {
- FreeProc free_proc;
- free_proc(ptr_);
- }
- ptr_ = p;
- }
- }
-
- // Get the current object.
- // operator* and operator-> will cause an assert() failure if there is
- // no current object.
- C& operator*() const {
- assert(ptr_ != NULL);
- return *ptr_;
- }
-
- C* operator->() const {
- assert(ptr_ != NULL);
- return ptr_;
- }
-
- C* get() const {
- return ptr_;
- }
-
- // Allow scoped_ptr_malloc<C> to be used in boolean expressions, but not
- // implicitly convertible to a real bool (which is dangerous).
- typedef C* scoped_ptr_malloc::*Testable;
- operator Testable() const { return ptr_ ? &scoped_ptr_malloc::ptr_ : NULL; }
-
- // Comparison operators.
- // These return whether a scoped_ptr_malloc and a plain pointer refer
- // to the same object, not just to two different but equal objects.
- // For compatibility with the boost-derived implementation, these
- // take non-const arguments.
- bool operator==(C* p) const {
- return ptr_ == p;
- }
-
- bool operator!=(C* p) const {
- return ptr_ != p;
- }
-
- // Swap two scoped pointers.
- void swap(scoped_ptr_malloc & b) {
- C* tmp = b.ptr_;
- b.ptr_ = ptr_;
- ptr_ = tmp;
- }
-
- // Release a pointer.
- // The return value is the current pointer held by this object.
- // If this object holds a NULL pointer, the return value is NULL.
- // After this operation, this object will hold a NULL pointer,
- // and will not own the object any more.
- C* release() WARN_UNUSED_RESULT {
- C* tmp = ptr_;
- ptr_ = NULL;
- return tmp;
- }
-
- private:
- C* ptr_;
-
- // no reason to use these: each scoped_ptr_malloc should have its own object
- template <class C2, class GP>
- bool operator==(scoped_ptr_malloc<C2, GP> const& p) const;
- template <class C2, class GP>
- bool operator!=(scoped_ptr_malloc<C2, GP> const& p) const;
-};
-
-template<class C, class FP> inline
-void swap(scoped_ptr_malloc<C, FP>& a, scoped_ptr_malloc<C, FP>& b) {
- a.swap(b);
-}
-
-template<class C, class FP> inline
-bool operator==(C* p, const scoped_ptr_malloc<C, FP>& b) {
- return p == b.get();
-}
-
-template<class C, class FP> inline
-bool operator!=(C* p, const scoped_ptr_malloc<C, FP>& b) {
- return p != b.get();
-}
-
// A function to convert T* into scoped_ptr<T>
// Doing e.g. make_scoped_ptr(new FooBarBaz<type>(arg)) is a shorter notation
// for scoped_ptr<FooBarBaz<type> >(new FooBarBaz<type>(arg))
diff --git a/chromium/base/memory/scoped_ptr_unittest.cc b/chromium/base/memory/scoped_ptr_unittest.cc
index 22da53d3511..e0c15484e08 100644
--- a/chromium/base/memory/scoped_ptr_unittest.cc
+++ b/chromium/base/memory/scoped_ptr_unittest.cc
@@ -602,5 +602,3 @@ TEST(ScopedPtrTest, OverloadedNewAndDelete) {
EXPECT_EQ(1, OverloadedNewAndDelete::delete_count());
EXPECT_EQ(1, OverloadedNewAndDelete::new_count());
}
-
-// TODO scoped_ptr_malloc
diff --git a/chromium/base/memory/shared_memory.h b/chromium/base/memory/shared_memory.h
index 9007aede109..d48071e2f73 100644
--- a/chromium/base/memory/shared_memory.h
+++ b/chromium/base/memory/shared_memory.h
@@ -22,6 +22,7 @@
#if defined(OS_POSIX)
#include "base/file_descriptor_posix.h"
#include "base/file_util.h"
+#include "base/files/scoped_file.h"
#endif
namespace base {
@@ -32,38 +33,43 @@ class FilePath;
// the underlying OS handle to a shared memory segment.
#if defined(OS_WIN)
typedef HANDLE SharedMemoryHandle;
-typedef HANDLE SharedMemoryLock;
#elif defined(OS_POSIX)
// A SharedMemoryId is sufficient to identify a given shared memory segment on a
// system, but insufficient to map it.
typedef FileDescriptor SharedMemoryHandle;
typedef ino_t SharedMemoryId;
-// On POSIX, the lock is implemented as a lockf() on the mapped file,
-// so no additional member (or definition of SharedMemoryLock) is
-// needed.
#endif
// Options for creating a shared memory object.
struct SharedMemoryCreateOptions {
- SharedMemoryCreateOptions() : name(NULL), size(0), open_existing(false),
- executable(false) {}
-
+ SharedMemoryCreateOptions()
+ : name_deprecated(NULL),
+ size(0),
+ open_existing_deprecated(false),
+ executable(false),
+ share_read_only(false) {}
+
+ // DEPRECATED (crbug.com/345734):
// If NULL, the object is anonymous. This pointer is owned by the caller
// and must live through the call to Create().
- const std::string* name;
+ const std::string* name_deprecated;
// Size of the shared memory object to be created.
// When opening an existing object, this has no effect.
size_t size;
+ // DEPRECATED (crbug.com/345734):
// If true, and the shared memory already exists, Create() will open the
// existing shared memory and ignore the size parameter. If false,
- // shared memory must not exist. This flag is meaningless unless name is
- // non-NULL.
- bool open_existing;
+ // shared memory must not exist. This flag is meaningless unless
+ // name_deprecated is non-NULL.
+ bool open_existing_deprecated;
// If true, mappings might need to be made executable later.
bool executable;
+
+ // If true, the file can be shared read-only to a process.
+ bool share_read_only;
};
// Platform abstraction for shared memory. Provides a C++ wrapper
@@ -74,8 +80,8 @@ class BASE_EXPORT SharedMemory {
#if defined(OS_WIN)
// Similar to the default constructor, except that this allows for
- // calling Lock() to acquire the named mutex before either Create or Open
- // are called on Windows.
+ // calling LockDeprecated() to acquire the named mutex before either Create or
+ // Open are called on Windows.
explicit SharedMemory(const std::wstring& name);
#endif
@@ -126,16 +132,18 @@ class BASE_EXPORT SharedMemory {
return Create(options);
}
+ // DEPRECATED (crbug.com/345734):
// Creates or opens a shared memory segment based on a name.
// If open_existing is true, and the shared memory already exists,
// opens the existing shared memory and ignores the size parameter.
// If open_existing is false, shared memory must not exist.
// size is the size of the block to be created.
// Returns true on success, false on failure.
- bool CreateNamed(const std::string& name, bool open_existing, size_t size) {
+ bool CreateNamedDeprecated(
+ const std::string& name, bool open_existing, size_t size) {
SharedMemoryCreateOptions options;
- options.name = &name;
- options.open_existing = open_existing;
+ options.name_deprecated = &name;
+ options.open_existing_deprecated = open_existing;
options.size = size;
return Create(options);
}
@@ -152,7 +160,8 @@ class BASE_EXPORT SharedMemory {
// Maps the shared memory into the caller's address space.
// Returns true on success, false otherwise. The memory address
// is accessed via the memory() accessor. The mapped address is guaranteed to
- // have an alignment of at least MAP_MINIMUM_ALIGNMENT.
+ // have an alignment of at least MAP_MINIMUM_ALIGNMENT. This method will fail
+ // if this object is currently mapped.
bool Map(size_t bytes) {
return MapAt(0, bytes);
}
@@ -201,8 +210,8 @@ class BASE_EXPORT SharedMemory {
// handle for use in the remote process.
//
// |*this| must have been initialized using one of the Create*() or Open()
- // methods. If it was constructed from a SharedMemoryHandle, this call will
- // CHECK-fail.
+ // methods with share_read_only=true. If it was constructed from a
+ // SharedMemoryHandle, this call will CHECK-fail.
//
// Returns true on success, false otherwise.
bool ShareReadOnlyToProcess(ProcessHandle process,
@@ -243,31 +252,27 @@ class BASE_EXPORT SharedMemory {
return ShareToProcessCommon(process, new_handle, true, SHARE_CURRENT_MODE);
}
+ // DEPRECATED (crbug.com/345734):
// Locks the shared memory.
//
// WARNING: on POSIX the memory locking primitive only works across
- // processes, not across threads. The Lock method is not currently
+ // processes, not across threads. The LockDeprecated method is not currently
// used in inner loops, so we protect against multiple threads in a
// critical section using a class global lock.
- void Lock();
-
-#if defined(OS_WIN)
- // A Lock() implementation with a timeout that also allows setting
- // security attributes on the mutex. sec_attr may be NULL.
- // Returns true if the Lock() has been acquired, false if the timeout was
- // reached.
- bool Lock(uint32 timeout_ms, SECURITY_ATTRIBUTES* sec_attr);
-#endif
+ void LockDeprecated();
+ // DEPRECATED (crbug.com/345734):
// Releases the shared memory lock.
- void Unlock();
+ void UnlockDeprecated();
private:
#if defined(OS_POSIX) && !defined(OS_NACL)
- bool PrepareMapFile(file_util::ScopedFILE fp, file_util::ScopedFD readonly);
+#if !defined(OS_ANDROID)
+ bool PrepareMapFile(ScopedFILE fp, ScopedFD readonly);
bool FilePathForMemoryName(const std::string& mem_name, FilePath* path);
- void LockOrUnlockCommon(int function);
#endif
+ void LockOrUnlockCommon(int function);
+#endif // defined(OS_POSIX) && !defined(OS_NACL)
enum ShareMode {
SHARE_READONLY,
SHARE_CURRENT_MODE,
@@ -290,28 +295,29 @@ class BASE_EXPORT SharedMemory {
bool read_only_;
size_t requested_size_;
#if !defined(OS_POSIX)
- SharedMemoryLock lock_;
+ HANDLE lock_;
#endif
DISALLOW_COPY_AND_ASSIGN(SharedMemory);
};
+// DEPRECATED (crbug.com/345734):
// A helper class that acquires the shared memory lock while
-// the SharedMemoryAutoLock is in scope.
-class SharedMemoryAutoLock {
+// the SharedMemoryAutoLockDeprecated is in scope.
+class SharedMemoryAutoLockDeprecated {
public:
- explicit SharedMemoryAutoLock(SharedMemory* shared_memory)
+ explicit SharedMemoryAutoLockDeprecated(SharedMemory* shared_memory)
: shared_memory_(shared_memory) {
- shared_memory_->Lock();
+ shared_memory_->LockDeprecated();
}
- ~SharedMemoryAutoLock() {
- shared_memory_->Unlock();
+ ~SharedMemoryAutoLockDeprecated() {
+ shared_memory_->UnlockDeprecated();
}
private:
SharedMemory* shared_memory_;
- DISALLOW_COPY_AND_ASSIGN(SharedMemoryAutoLock);
+ DISALLOW_COPY_AND_ASSIGN(SharedMemoryAutoLockDeprecated);
};
} // namespace base
diff --git a/chromium/base/memory/shared_memory_android.cc b/chromium/base/memory/shared_memory_android.cc
index 25a65730cb7..5ba1bd6a101 100644
--- a/chromium/base/memory/shared_memory_android.cc
+++ b/chromium/base/memory/shared_memory_android.cc
@@ -24,7 +24,7 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
// "name" is just a label in ashmem. It is visible in /proc/pid/maps.
mapped_file_ = ashmem_create_region(
- options.name == NULL ? "" : options.name->c_str(),
+ options.name_deprecated == NULL ? "" : options.name_deprecated->c_str(),
options.size);
if (-1 == mapped_file_) {
DLOG(ERROR) << "Shared memory creation failed";
diff --git a/chromium/base/memory/shared_memory_nacl.cc b/chromium/base/memory/shared_memory_nacl.cc
index 93c10026191..39625ee65b5 100644
--- a/chromium/base/memory/shared_memory_nacl.cc
+++ b/chromium/base/memory/shared_memory_nacl.cc
@@ -91,6 +91,9 @@ bool SharedMemory::MapAt(off_t offset, size_t bytes) {
if (bytes > static_cast<size_t>(std::numeric_limits<int>::max()))
return false;
+ if (memory_)
+ return false;
+
memory_ = mmap(NULL, bytes, PROT_READ | (read_only_ ? 0 : PROT_WRITE),
MAP_SHARED, mapped_file_, offset);
@@ -130,11 +133,11 @@ void SharedMemory::Close() {
}
}
-void SharedMemory::Lock() {
+void SharedMemory::LockDeprecated() {
NOTIMPLEMENTED();
}
-void SharedMemory::Unlock() {
+void SharedMemory::UnlockDeprecated() {
NOTIMPLEMENTED();
}
diff --git a/chromium/base/memory/shared_memory_posix.cc b/chromium/base/memory/shared_memory_posix.cc
index 35d8c7d35df..f0a28ba0625 100644
--- a/chromium/base/memory/shared_memory_posix.cc
+++ b/chromium/base/memory/shared_memory_posix.cc
@@ -12,6 +12,7 @@
#include <unistd.h>
#include "base/file_util.h"
+#include "base/files/scoped_file.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/process/process_metrics.h"
@@ -30,9 +31,6 @@
#include "third_party/ashmem/ashmem.h"
#endif
-using file_util::ScopedFD;
-using file_util::ScopedFILE;
-
namespace base {
namespace {
@@ -132,23 +130,27 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
ScopedFILE fp;
bool fix_size = true;
- int readonly_fd_storage = -1;
- ScopedFD readonly_fd(&readonly_fd_storage);
+ ScopedFD readonly_fd;
FilePath path;
- if (options.name == NULL || options.name->empty()) {
+ if (options.name_deprecated == NULL || options.name_deprecated->empty()) {
// It doesn't make sense to have a open-existing private piece of shmem
- DCHECK(!options.open_existing);
+ DCHECK(!options.open_existing_deprecated);
// Q: Why not use the shm_open() etc. APIs?
// A: Because they're limited to 4mb on OS X. FFFFFFFUUUUUUUUUUU
- fp.reset(base::CreateAndOpenTemporaryShmemFile(&path, options.executable));
+ FilePath directory;
+ if (GetShmemTempDir(options.executable, &directory))
+ fp.reset(CreateAndOpenTemporaryFileInDir(directory, &path));
if (fp) {
- // Also open as readonly so that we can ShareReadOnlyToProcess.
- *readonly_fd = HANDLE_EINTR(open(path.value().c_str(), O_RDONLY));
- if (*readonly_fd < 0) {
- DPLOG(ERROR) << "open(\"" << path.value() << "\", O_RDONLY) failed";
- fp.reset();
+ if (options.share_read_only) {
+ // Also open as readonly so that we can ShareReadOnlyToProcess.
+ readonly_fd.reset(HANDLE_EINTR(open(path.value().c_str(), O_RDONLY)));
+ if (!readonly_fd.is_valid()) {
+ DPLOG(ERROR) << "open(\"" << path.value() << "\", O_RDONLY) failed";
+ fp.reset();
+ return false;
+ }
}
// Deleting the file prevents anyone else from mapping it in (making it
// private), and prevents the need for cleanup (once the last fd is
@@ -157,7 +159,7 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
PLOG(WARNING) << "unlink";
}
} else {
- if (!FilePathForMemoryName(*options.name, &path))
+ if (!FilePathForMemoryName(*options.name_deprecated, &path))
return false;
// Make sure that the file is opened without any permission
@@ -167,7 +169,7 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
// First, try to create the file.
int fd = HANDLE_EINTR(
open(path.value().c_str(), O_RDWR | O_CREAT | O_EXCL, kOwnerOnly));
- if (fd == -1 && options.open_existing) {
+ if (fd == -1 && options.open_existing_deprecated) {
// If this doesn't work, try and open an existing file in append mode.
// Opening an existing file in a world writable directory has two main
// security implications:
@@ -197,12 +199,15 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
fix_size = false;
}
- // Also open as readonly so that we can ShareReadOnlyToProcess.
- *readonly_fd = HANDLE_EINTR(open(path.value().c_str(), O_RDONLY));
- if (*readonly_fd < 0) {
- DPLOG(ERROR) << "open(\"" << path.value() << "\", O_RDONLY) failed";
- close(fd);
- fd = -1;
+ if (options.share_read_only) {
+ // Also open as readonly so that we can ShareReadOnlyToProcess.
+ readonly_fd.reset(HANDLE_EINTR(open(path.value().c_str(), O_RDONLY)));
+ if (!readonly_fd.is_valid()) {
+ DPLOG(ERROR) << "open(\"" << path.value() << "\", O_RDONLY) failed";
+ close(fd);
+ fd = -1;
+ return false;
+ }
}
if (fd >= 0) {
// "a+" is always appropriate: if it's a new file, a+ is similar to w+.
@@ -265,15 +270,13 @@ bool SharedMemory::Open(const std::string& name, bool read_only) {
const char *mode = read_only ? "r" : "r+";
ScopedFILE fp(base::OpenFile(path, mode));
- int readonly_fd_storage = -1;
- ScopedFD readonly_fd(&readonly_fd_storage);
- *readonly_fd = HANDLE_EINTR(open(path.value().c_str(), O_RDONLY));
- if (*readonly_fd < 0) {
+ ScopedFD readonly_fd(HANDLE_EINTR(open(path.value().c_str(), O_RDONLY)));
+ if (!readonly_fd.is_valid()) {
DPLOG(ERROR) << "open(\"" << path.value() << "\", O_RDONLY) failed";
+ return false;
}
return PrepareMapFile(fp.Pass(), readonly_fd.Pass());
}
-
#endif // !defined(OS_ANDROID)
bool SharedMemory::MapAt(off_t offset, size_t bytes) {
@@ -283,6 +286,9 @@ bool SharedMemory::MapAt(off_t offset, size_t bytes) {
if (bytes > static_cast<size_t>(std::numeric_limits<int>::max()))
return false;
+ if (memory_)
+ return false;
+
#if defined(OS_ANDROID)
// On Android, Map can be called with a size and offset of zero to use the
// ashmem-determined size.
@@ -339,12 +345,12 @@ void SharedMemory::Close() {
}
}
-void SharedMemory::Lock() {
+void SharedMemory::LockDeprecated() {
g_thread_lock_.Get().Acquire();
LockOrUnlockCommon(F_LOCK);
}
-void SharedMemory::Unlock() {
+void SharedMemory::UnlockDeprecated() {
LockOrUnlockCommon(F_ULOCK);
g_thread_lock_.Get().Release();
}
@@ -353,7 +359,8 @@ void SharedMemory::Unlock() {
bool SharedMemory::PrepareMapFile(ScopedFILE fp, ScopedFD readonly_fd) {
DCHECK_EQ(-1, mapped_file_);
DCHECK_EQ(-1, readonly_mapped_file_);
- if (fp == NULL || *readonly_fd < 0) return false;
+ if (fp == NULL)
+ return false;
// This function theoretically can block on the disk, but realistically
// the temporary files we create will just go into the buffer cache
@@ -361,14 +368,16 @@ bool SharedMemory::PrepareMapFile(ScopedFILE fp, ScopedFD readonly_fd) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
struct stat st = {};
- struct stat readonly_st = {};
if (fstat(fileno(fp.get()), &st))
NOTREACHED();
- if (fstat(*readonly_fd, &readonly_st))
- NOTREACHED();
- if (st.st_dev != readonly_st.st_dev || st.st_ino != readonly_st.st_ino) {
- LOG(ERROR) << "writable and read-only inodes don't match; bailing";
- return false;
+ if (readonly_fd.is_valid()) {
+ struct stat readonly_st = {};
+ if (fstat(readonly_fd.get(), &readonly_st))
+ NOTREACHED();
+ if (st.st_dev != readonly_st.st_dev || st.st_ino != readonly_st.st_ino) {
+ LOG(ERROR) << "writable and read-only inodes don't match; bailing";
+ return false;
+ }
}
mapped_file_ = dup(fileno(fp.get()));
@@ -381,11 +390,10 @@ bool SharedMemory::PrepareMapFile(ScopedFILE fp, ScopedFD readonly_fd) {
}
}
inode_ = st.st_ino;
- readonly_mapped_file_ = *readonly_fd.release();
+ readonly_mapped_file_ = readonly_fd.release();
return true;
}
-#endif
// For the given shmem named |mem_name|, return a filename to mmap()
// (and possibly create). Modifies |filename|. Return false on
@@ -413,6 +421,7 @@ bool SharedMemory::FilePathForMemoryName(const std::string& mem_name,
*path = temp_dir.AppendASCII(name_base + ".shmem." + mem_name);
return true;
}
+#endif // !defined(OS_ANDROID)
void SharedMemory::LockOrUnlockCommon(int function) {
DCHECK_GE(mapped_file_, 0);
diff --git a/chromium/base/memory/shared_memory_unittest.cc b/chromium/base/memory/shared_memory_unittest.cc
index f3c612f803d..4d49c36f136 100644
--- a/chromium/base/memory/shared_memory_unittest.cc
+++ b/chromium/base/memory/shared_memory_unittest.cc
@@ -61,7 +61,7 @@ class MultipleThreadMain : public PlatformThread::Delegate {
#endif
const uint32 kDataSize = 1024;
SharedMemory memory;
- bool rv = memory.CreateNamed(s_test_name_, true, kDataSize);
+ bool rv = memory.CreateNamedDeprecated(s_test_name_, true, kDataSize);
EXPECT_TRUE(rv);
rv = memory.Map(kDataSize);
EXPECT_TRUE(rv);
@@ -109,8 +109,8 @@ class MultipleLockThread : public PlatformThread::Delegate {
SharedMemoryHandle handle = NULL;
{
SharedMemory memory1;
- EXPECT_TRUE(memory1.CreateNamed("SharedMemoryMultipleLockThreadTest",
- true, kDataSize));
+ EXPECT_TRUE(memory1.CreateNamedDeprecated(
+ "SharedMemoryMultipleLockThreadTest", true, kDataSize));
EXPECT_TRUE(memory1.ShareToProcess(GetCurrentProcess(), &handle));
// TODO(paulg): Implement this once we have a posix version of
// SharedMemory::ShareToProcess.
@@ -122,12 +122,12 @@ class MultipleLockThread : public PlatformThread::Delegate {
volatile int* const ptr = static_cast<int*>(memory2.memory());
for (int idx = 0; idx < 20; idx++) {
- memory2.Lock();
+ memory2.LockDeprecated();
int i = (id_ << 16) + idx;
*ptr = i;
PlatformThread::Sleep(TimeDelta::FromMilliseconds(1));
EXPECT_EQ(*ptr, i);
- memory2.Unlock();
+ memory2.UnlockDeprecated();
}
memory2.Close();
@@ -143,7 +143,7 @@ class MultipleLockThread : public PlatformThread::Delegate {
} // namespace
// Android doesn't support SharedMemory::Open/Delete/
-// CreateNamed(openExisting=true)
+// CreateNamedDeprecated(openExisting=true)
#if !defined(OS_ANDROID)
TEST(SharedMemoryTest, OpenClose) {
const uint32 kDataSize = 1024;
@@ -158,7 +158,7 @@ TEST(SharedMemoryTest, OpenClose) {
EXPECT_TRUE(rv);
rv = memory1.Open(test_name, false);
EXPECT_FALSE(rv);
- rv = memory1.CreateNamed(test_name, false, kDataSize);
+ rv = memory1.CreateNamedDeprecated(test_name, false, kDataSize);
EXPECT_TRUE(rv);
rv = memory1.Map(kDataSize);
EXPECT_TRUE(rv);
@@ -201,10 +201,10 @@ TEST(SharedMemoryTest, OpenExclusive) {
<< Time::Now().ToDoubleT();
std::string test_name = test_name_stream.str();
- // Open two handles to a memory segment and check that open_existing works
- // as expected.
+ // Open two handles to a memory segment and check that
+ // open_existing_deprecated works as expected.
SharedMemory memory1;
- bool rv = memory1.CreateNamed(test_name, false, kDataSize);
+ bool rv = memory1.CreateNamedDeprecated(test_name, false, kDataSize);
EXPECT_TRUE(rv);
// Memory1 knows it's size because it created it.
@@ -224,11 +224,11 @@ TEST(SharedMemoryTest, OpenExclusive) {
SharedMemory memory2;
// Should not be able to create if openExisting is false.
- rv = memory2.CreateNamed(test_name, false, kDataSize2);
+ rv = memory2.CreateNamedDeprecated(test_name, false, kDataSize2);
EXPECT_FALSE(rv);
// Should be able to create with openExisting true.
- rv = memory2.CreateNamed(test_name, true, kDataSize2);
+ rv = memory2.CreateNamedDeprecated(test_name, true, kDataSize2);
EXPECT_TRUE(rv);
// Memory2 shouldn't know the size because we didn't create it.
@@ -373,7 +373,11 @@ TEST(SharedMemoryTest, ShareReadOnly) {
StringPiece contents = "Hello World";
SharedMemory writable_shmem;
- ASSERT_TRUE(writable_shmem.CreateAndMapAnonymous(contents.size()));
+ SharedMemoryCreateOptions options;
+ options.size = contents.size();
+ options.share_read_only = true;
+ ASSERT_TRUE(writable_shmem.Create(options));
+ ASSERT_TRUE(writable_shmem.Map(options.size));
memcpy(writable_shmem.memory(), contents.data(), contents.size());
EXPECT_TRUE(writable_shmem.Unmap());
@@ -477,7 +481,6 @@ TEST(SharedMemoryTest, MapAt) {
SharedMemory memory;
ASSERT_TRUE(memory.CreateAndMapAnonymous(kDataSize));
- ASSERT_TRUE(memory.Map(kDataSize));
uint32* ptr = static_cast<uint32*>(memory.memory());
ASSERT_NE(ptr, static_cast<void*>(NULL));
@@ -497,6 +500,19 @@ TEST(SharedMemoryTest, MapAt) {
}
}
+TEST(SharedMemoryTest, MapTwice) {
+ const uint32 kDataSize = 1024;
+ SharedMemory memory;
+ bool rv = memory.CreateAndMapAnonymous(kDataSize);
+ EXPECT_TRUE(rv);
+
+ void* old_address = memory.memory();
+
+ rv = memory.Map(kDataSize);
+ EXPECT_FALSE(rv);
+ EXPECT_EQ(old_address, memory.memory());
+}
+
#if defined(OS_POSIX)
// Create a shared memory object, mmap it, and mprotect it to PROT_EXEC.
TEST(SharedMemoryTest, AnonymousExecutable) {
@@ -561,7 +577,7 @@ TEST(SharedMemoryTest, FilePermissionsNamed) {
options.size = kTestSize;
std::string shared_mem_name = "shared_perm_test-" + IntToString(getpid()) +
"-" + Uint64ToString(RandUint64());
- options.name = &shared_mem_name;
+ options.name_deprecated = &shared_mem_name;
// Set a file mode creation mask that gives all permissions.
ScopedUmaskSetter permissive_mask(S_IWGRP | S_IWOTH);
@@ -613,7 +629,7 @@ class SharedMemoryProcessTest : public MultiProcessTest {
#endif
const uint32 kDataSize = 1024;
SharedMemory memory;
- bool rv = memory.CreateNamed(s_test_name_, true, kDataSize);
+ bool rv = memory.CreateNamedDeprecated(s_test_name_, true, kDataSize);
EXPECT_TRUE(rv);
if (rv != true)
errors++;
@@ -624,13 +640,13 @@ class SharedMemoryProcessTest : public MultiProcessTest {
int *ptr = static_cast<int*>(memory.memory());
for (int idx = 0; idx < 20; idx++) {
- memory.Lock();
+ memory.LockDeprecated();
int i = (1 << 16) + idx;
*ptr = i;
PlatformThread::Sleep(TimeDelta::FromMilliseconds(10));
if (*ptr != i)
errors++;
- memory.Unlock();
+ memory.UnlockDeprecated();
}
memory.Close();
@@ -648,7 +664,7 @@ TEST_F(SharedMemoryProcessTest, Tasks) {
ProcessHandle handles[kNumTasks];
for (int index = 0; index < kNumTasks; ++index) {
- handles[index] = SpawnChild("SharedMemoryTestMain", false);
+ handles[index] = SpawnChild("SharedMemoryTestMain");
ASSERT_TRUE(handles[index]);
}
diff --git a/chromium/base/memory/shared_memory_win.cc b/chromium/base/memory/shared_memory_win.cc
index 77741bc0d9d..cc177ab3f21 100644
--- a/chromium/base/memory/shared_memory_win.cc
+++ b/chromium/base/memory/shared_memory_win.cc
@@ -113,7 +113,8 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
return false;
size_t rounded_size = (options.size + kSectionMask) & ~kSectionMask;
- name_ = ASCIIToWide(options.name == NULL ? "" : *options.name);
+ name_ = ASCIIToWide(options.name_deprecated == NULL ? "" :
+ *options.name_deprecated);
mapped_file_ = CreateFileMapping(INVALID_HANDLE_VALUE, NULL,
PAGE_READWRITE, 0, static_cast<DWORD>(rounded_size),
name_.empty() ? NULL : name_.c_str());
@@ -127,7 +128,7 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
// If the file already existed, set requested_size_ to 0 to show that
// we don't know the size.
requested_size_ = 0;
- if (!options.open_existing) {
+ if (!options.open_existing_deprecated) {
Close();
return false;
}
@@ -163,6 +164,9 @@ bool SharedMemory::MapAt(off_t offset, size_t bytes) {
if (bytes > static_cast<size_t>(std::numeric_limits<int>::max()))
return false;
+ if (memory_)
+ return false;
+
memory_ = MapViewOfFile(mapped_file_,
read_only_ ? FILE_MAP_READ : FILE_MAP_READ |
FILE_MAP_WRITE,
@@ -230,27 +234,22 @@ void SharedMemory::Close() {
}
}
-void SharedMemory::Lock() {
- Lock(INFINITE, NULL);
-}
-
-bool SharedMemory::Lock(uint32 timeout_ms, SECURITY_ATTRIBUTES* sec_attr) {
+void SharedMemory::LockDeprecated() {
if (lock_ == NULL) {
std::wstring name = name_;
name.append(L"lock");
- lock_ = CreateMutex(sec_attr, FALSE, name.c_str());
+ lock_ = CreateMutex(NULL, FALSE, name.c_str());
if (lock_ == NULL) {
DPLOG(ERROR) << "Could not create mutex.";
- return false; // there is nothing good we can do here.
+ NOTREACHED();
+ return; // There is nothing good we can do here.
}
}
- DWORD result = WaitForSingleObject(lock_, timeout_ms);
-
- // Return false for WAIT_ABANDONED, WAIT_TIMEOUT or WAIT_FAILED.
- return (result == WAIT_OBJECT_0);
+ DWORD result = WaitForSingleObject(lock_, INFINITE);
+ DCHECK_EQ(result, WAIT_OBJECT_0);
}
-void SharedMemory::Unlock() {
+void SharedMemory::UnlockDeprecated() {
DCHECK(lock_ != NULL);
ReleaseMutex(lock_);
}
diff --git a/chromium/base/memory/singleton.cc b/chromium/base/memory/singleton.cc
index ee5e58d0057..f68ecaa8da9 100644
--- a/chromium/base/memory/singleton.cc
+++ b/chromium/base/memory/singleton.cc
@@ -18,7 +18,10 @@ subtle::AtomicWord WaitForInstance(subtle::AtomicWord* instance) {
// the object has been created.
subtle::AtomicWord value;
while (true) {
- value = subtle::NoBarrier_Load(instance);
+ // The load has acquire memory ordering as the thread which reads the
+ // instance pointer must acquire visibility over the associated data.
+ // The pairing Release_Store operation is in Singleton::get().
+ value = subtle::Acquire_Load(instance);
if (value != kBeingCreatedMarker)
break;
PlatformThread::YieldCurrentThread();
diff --git a/chromium/base/memory/singleton.h b/chromium/base/memory/singleton.h
index 0d4fc8990c4..e5e2e3efed0 100644
--- a/chromium/base/memory/singleton.h
+++ b/chromium/base/memory/singleton.h
@@ -63,10 +63,12 @@ struct DefaultSingletonTraits {
// exit. See below for the required call that makes this happen.
static const bool kRegisterAtExit = true;
+#ifndef NDEBUG
// Set to false to disallow access on a non-joinable thread. This is
// different from kRegisterAtExit because StaticMemorySingletonTraits allows
// access on non-joinable threads, and gracefully handles this.
static const bool kAllowedToAccessOnNonjoinableThread = false;
+#endif
};
@@ -76,7 +78,9 @@ struct DefaultSingletonTraits {
template<typename Type>
struct LeakySingletonTraits : public DefaultSingletonTraits<Type> {
static const bool kRegisterAtExit = false;
+#ifndef NDEBUG
static const bool kAllowedToAccessOnNonjoinableThread = true;
+#endif
};
@@ -229,7 +233,9 @@ class Singleton {
base::ThreadRestrictions::AssertSingletonAllowed();
#endif
- base::subtle::AtomicWord value = base::subtle::NoBarrier_Load(&instance_);
+ // The load has acquire memory ordering as the thread which reads the
+ // instance_ pointer must acquire visibility over the singleton data.
+ base::subtle::AtomicWord value = base::subtle::Acquire_Load(&instance_);
if (value != 0 && value != base::internal::kBeingCreatedMarker) {
// See the corresponding HAPPENS_BEFORE below.
ANNOTATE_HAPPENS_AFTER(&instance_);
@@ -248,6 +254,7 @@ class Singleton {
// synchronization between different threads calling get().
// See the corresponding HAPPENS_AFTER below and above.
ANNOTATE_HAPPENS_BEFORE(&instance_);
+ // Releases the visibility over instance_ to the readers.
base::subtle::Release_Store(
&instance_, reinterpret_cast<base::subtle::AtomicWord>(newval));
diff --git a/chromium/base/memory/weak_ptr.h b/chromium/base/memory/weak_ptr.h
index 1675889e229..f6001e2a169 100644
--- a/chromium/base/memory/weak_ptr.h
+++ b/chromium/base/memory/weak_ptr.h
@@ -83,7 +83,7 @@ class BASE_EXPORT WeakReference {
public:
// Although Flag is bound to a specific thread, it may be deleted from another
// via base::WeakPtr::~WeakPtr().
- class Flag : public RefCountedThreadSafe<Flag> {
+ class BASE_EXPORT Flag : public RefCountedThreadSafe<Flag> {
public:
Flag();
diff --git a/chromium/base/memory/weak_ptr_unittest.cc b/chromium/base/memory/weak_ptr_unittest.cc
index e7e12a272d3..dde408b756a 100644
--- a/chromium/base/memory/weak_ptr_unittest.cc
+++ b/chromium/base/memory/weak_ptr_unittest.cc
@@ -44,7 +44,9 @@ struct Base {
struct Derived : public Base {};
struct TargetBase {};
-struct Target : public TargetBase, public SupportsWeakPtr<Target> {};
+struct Target : public TargetBase, public SupportsWeakPtr<Target> {
+ virtual ~Target() {}
+};
struct DerivedTarget : public Target {};
struct Arrow {
WeakPtr<Target> target;
diff --git a/chromium/base/message_loop/incoming_task_queue.cc b/chromium/base/message_loop/incoming_task_queue.cc
index db99d8750c6..bcc712b4a5d 100644
--- a/chromium/base/message_loop/incoming_task_queue.cc
+++ b/chromium/base/message_loop/incoming_task_queue.cc
@@ -28,21 +28,6 @@ bool IncomingTaskQueue::AddToIncomingQueue(
return PostPendingTask(&pending_task);
}
-bool IncomingTaskQueue::TryAddToIncomingQueue(
- const tracked_objects::Location& from_here,
- const Closure& task) {
- if (!incoming_queue_lock_.Try()) {
- // Reset |task|.
- Closure local_task = task;
- return false;
- }
-
- AutoLock locked(incoming_queue_lock_, AutoLock::AlreadyAcquired());
- PendingTask pending_task(
- from_here, task, CalculateDelayedRuntime(TimeDelta()), true);
- return PostPendingTask(&pending_task);
-}
-
bool IncomingTaskQueue::IsHighResolutionTimerEnabledForTesting() {
#if defined(OS_WIN)
return !high_resolution_timer_expiration_.is_null();
@@ -56,13 +41,6 @@ bool IncomingTaskQueue::IsIdleForTesting() {
return incoming_queue_.empty();
}
-void IncomingTaskQueue::LockWaitUnLockForTesting(WaitableEvent* caller_wait,
- WaitableEvent* caller_signal) {
- AutoLock lock(incoming_queue_lock_);
- caller_wait->Signal();
- caller_signal->Wait();
-}
-
void IncomingTaskQueue::ReloadWorkQueue(TaskQueue* work_queue) {
// Make sure no tasks are lost.
DCHECK(work_queue->empty());
@@ -152,7 +130,8 @@ bool IncomingTaskQueue::PostPendingTask(PendingTask* pending_task) {
// delayed_run_time value) and for identifying the task in about:tracing.
pending_task->sequence_num = next_sequence_num_++;
- TRACE_EVENT_FLOW_BEGIN0("task", "MessageLoop::PostTask",
+ TRACE_EVENT_FLOW_BEGIN0(TRACE_DISABLED_BY_DEFAULT("toplevel.flow"),
+ "MessageLoop::PostTask",
TRACE_ID_MANGLE(message_loop_->GetTaskTraceID(*pending_task)));
bool was_empty = incoming_queue_.empty();
diff --git a/chromium/base/message_loop/incoming_task_queue.h b/chromium/base/message_loop/incoming_task_queue.h
index d831a71a3f7..56c5638295b 100644
--- a/chromium/base/message_loop/incoming_task_queue.h
+++ b/chromium/base/message_loop/incoming_task_queue.h
@@ -38,12 +38,6 @@ class BASE_EXPORT IncomingTaskQueue
TimeDelta delay,
bool nestable);
- // Same as AddToIncomingQueue() except that it will avoid blocking if the lock
- // is already held, and will in that case (when the lock is contended) fail to
- // add the task, and will return false.
- bool TryAddToIncomingQueue(const tracked_objects::Location& from_here,
- const Closure& task);
-
// Returns true if the message loop has high resolution timers enabled.
// Provided for testing.
bool IsHighResolutionTimerEnabledForTesting();
@@ -51,11 +45,6 @@ class BASE_EXPORT IncomingTaskQueue
// Returns true if the message loop is "idle". Provided for testing.
bool IsIdleForTesting();
- // Takes the incoming queue lock, signals |caller_wait| and waits until
- // |caller_signal| is signalled.
- void LockWaitUnLockForTesting(WaitableEvent* caller_wait,
- WaitableEvent* caller_signal);
-
// Loads tasks from the |incoming_queue_| into |*work_queue|. Must be called
// from the thread that is running the loop.
void ReloadWorkQueue(TaskQueue* work_queue);
diff --git a/chromium/base/message_loop/message_loop.cc b/chromium/base/message_loop/message_loop.cc
index 3f9d01c8620..dd1a393ab08 100644
--- a/chromium/base/message_loop/message_loop.cc
+++ b/chromium/base/message_loop/message_loop.cc
@@ -32,10 +32,8 @@
#if defined(OS_ANDROID)
#include "base/message_loop/message_pump_android.h"
#endif
-
-#if defined(TOOLKIT_GTK)
-#include <gdk/gdk.h>
-#include <gdk/gdkx.h>
+#if defined(USE_GLIB)
+#include "base/message_loop/message_pump_glib.h"
#endif
namespace base {
@@ -50,6 +48,7 @@ LazyInstance<base::ThreadLocalPointer<MessageLoop> >::Leaky lazy_tls_ptr =
// Logical events for Histogram profiling. Run with -message-loop-histogrammer
// to get an accounting of messages and actions taken on each thread.
const int kTaskRunEvent = 0x1;
+#if !defined(OS_NACL)
const int kTimerEvent = 0x2;
// Provide range of message IDs for use in histogramming and debug display.
@@ -83,6 +82,7 @@ const LinearHistogram::DescriptionPair event_descriptions_[] = {
{-1, NULL} // The list must be null terminated, per API to histogram.
};
+#endif // !defined(OS_NACL)
bool enable_histogrammer_ = false;
@@ -98,29 +98,19 @@ bool AlwaysNotifyPump(MessageLoop::Type type) {
#endif
}
-} // namespace
-
-//------------------------------------------------------------------------------
-
-#if defined(OS_WIN)
-
-// Upon a SEH exception in this thread, it restores the original unhandled
-// exception filter.
-static int SEHFilter(LPTOP_LEVEL_EXCEPTION_FILTER old_filter) {
- ::SetUnhandledExceptionFilter(old_filter);
- return EXCEPTION_CONTINUE_SEARCH;
-}
+#if defined(OS_IOS)
+typedef MessagePumpIOSForIO MessagePumpForIO;
+#elif defined(OS_NACL)
+typedef MessagePumpDefault MessagePumpForIO;
+#elif defined(OS_POSIX)
+typedef MessagePumpLibevent MessagePumpForIO;
+#endif
-// Retrieves a pointer to the current unhandled exception filter. There
-// is no standalone getter method.
-static LPTOP_LEVEL_EXCEPTION_FILTER GetTopSEHFilter() {
- LPTOP_LEVEL_EXCEPTION_FILTER top_filter = NULL;
- top_filter = ::SetUnhandledExceptionFilter(0);
- ::SetUnhandledExceptionFilter(top_filter);
- return top_filter;
+MessagePumpForIO* ToPumpIO(MessagePump* pump) {
+ return static_cast<MessagePumpForIO*>(pump);
}
-#endif // defined(OS_WIN)
+} // namespace
//------------------------------------------------------------------------------
@@ -137,7 +127,6 @@ MessageLoop::DestructionObserver::~DestructionObserver() {
MessageLoop::MessageLoop(Type type)
: type_(type),
- exception_restoration_(false),
nestable_tasks_allowed_(true),
#if defined(OS_WIN)
os_modal_loop_(false),
@@ -146,13 +135,12 @@ MessageLoop::MessageLoop(Type type)
run_loop_(NULL) {
Init();
- pump_.reset(CreateMessagePumpForType(type));
+ pump_ = CreateMessagePumpForType(type).Pass();
}
MessageLoop::MessageLoop(scoped_ptr<MessagePump> pump)
: pump_(pump.Pass()),
type_(TYPE_CUSTOM),
- exception_restoration_(false),
nestable_tasks_allowed_(true),
#if defined(OS_WIN)
os_modal_loop_(false),
@@ -223,29 +211,22 @@ bool MessageLoop::InitMessagePumpForUIFactory(MessagePumpFactory* factory) {
}
// static
-MessagePump* MessageLoop::CreateMessagePumpForType(Type type) {
+scoped_ptr<MessagePump> MessageLoop::CreateMessagePumpForType(Type type) {
// TODO(rvargas): Get rid of the OS guards.
-#if defined(OS_WIN)
-#define MESSAGE_PUMP_UI new MessagePumpForUI()
-#define MESSAGE_PUMP_IO new MessagePumpForIO()
-#elif defined(OS_IOS)
-#define MESSAGE_PUMP_UI MessagePumpMac::Create()
-#define MESSAGE_PUMP_IO new MessagePumpIOSForIO()
-#elif defined(OS_MACOSX)
-#define MESSAGE_PUMP_UI MessagePumpMac::Create()
-#define MESSAGE_PUMP_IO new MessagePumpLibevent()
+#if defined(USE_GLIB) && !defined(OS_NACL)
+ typedef MessagePumpGlib MessagePumpForUI;
+#elif defined(OS_LINUX) && !defined(OS_NACL)
+ typedef MessagePumpLibevent MessagePumpForUI;
+#endif
+
+#if defined(OS_IOS) || defined(OS_MACOSX)
+#define MESSAGE_PUMP_UI scoped_ptr<MessagePump>(MessagePumpMac::Create())
#elif defined(OS_NACL)
// Currently NaCl doesn't have a UI MessageLoop.
// TODO(abarth): Figure out if we need this.
-#define MESSAGE_PUMP_UI NULL
-// ipc_channel_nacl.cc uses a worker thread to do socket reads currently, and
-// doesn't require extra support for watching file descriptors.
-#define MESSAGE_PUMP_IO new MessagePumpDefault()
-#elif defined(OS_POSIX) // POSIX but not MACOSX.
-#define MESSAGE_PUMP_UI new MessagePumpForUI()
-#define MESSAGE_PUMP_IO new MessagePumpLibevent()
+#define MESSAGE_PUMP_UI scoped_ptr<MessagePump>()
#else
-#error Not implemented
+#define MESSAGE_PUMP_UI scoped_ptr<MessagePump>(new MessagePumpForUI())
#endif
if (type == MessageLoop::TYPE_UI) {
@@ -254,17 +235,15 @@ MessagePump* MessageLoop::CreateMessagePumpForType(Type type) {
return MESSAGE_PUMP_UI;
}
if (type == MessageLoop::TYPE_IO)
- return MESSAGE_PUMP_IO;
-#if defined(TOOLKIT_GTK)
- if (type == MessageLoop::TYPE_GPU)
- return new MessagePumpX11();
-#endif
+ return scoped_ptr<MessagePump>(new MessagePumpForIO());
+
#if defined(OS_ANDROID)
if (type == MessageLoop::TYPE_JAVA)
- return MESSAGE_PUMP_UI;
+ return scoped_ptr<MessagePump>(new MessagePumpForUI());
#endif
+
DCHECK_EQ(MessageLoop::TYPE_DEFAULT, type);
- return new MessagePumpDefault();
+ return scoped_ptr<MessagePump>(new MessagePumpDefault());
}
void MessageLoop::AddDestructionObserver(
@@ -286,13 +265,6 @@ void MessageLoop::PostTask(
incoming_task_queue_->AddToIncomingQueue(from_here, task, TimeDelta(), true);
}
-bool MessageLoop::TryPostTask(
- const tracked_objects::Location& from_here,
- const Closure& task) {
- DCHECK(!task.is_null()) << from_here.ToString();
- return incoming_task_queue_->TryAddToIncomingQueue(from_here, task);
-}
-
void MessageLoop::PostDelayedTask(
const tracked_objects::Location& from_here,
const Closure& task,
@@ -399,11 +371,6 @@ bool MessageLoop::IsIdleForTesting() {
return incoming_task_queue_->IsIdleForTesting();
}
-void MessageLoop::LockWaitUnLockForTesting(WaitableEvent* caller_wait,
- WaitableEvent* caller_signal) {
- incoming_task_queue_->LockWaitUnLockForTesting(caller_wait, caller_signal);
-}
-
//------------------------------------------------------------------------------
void MessageLoop::Init() {
@@ -417,40 +384,12 @@ void MessageLoop::Init() {
new ThreadTaskRunnerHandle(message_loop_proxy_));
}
-// Runs the loop in two different SEH modes:
-// enable_SEH_restoration_ = false : any unhandled exception goes to the last
-// one that calls SetUnhandledExceptionFilter().
-// enable_SEH_restoration_ = true : any unhandled exception goes to the filter
-// that was existed before the loop was run.
void MessageLoop::RunHandler() {
-#if defined(OS_WIN)
- if (exception_restoration_) {
- RunInternalInSEHFrame();
- return;
- }
-#endif
-
- RunInternal();
-}
-
-#if defined(OS_WIN)
-__declspec(noinline) void MessageLoop::RunInternalInSEHFrame() {
- LPTOP_LEVEL_EXCEPTION_FILTER current_filter = GetTopSEHFilter();
- __try {
- RunInternal();
- } __except(SEHFilter(current_filter)) {
- }
- return;
-}
-#endif
-
-void MessageLoop::RunInternal() {
DCHECK_EQ(this, current());
StartHistogrammer();
-#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && \
- !defined(USE_GTK_MESSAGE_PUMP)
+#if defined(OS_WIN)
if (run_loop_->dispatcher_ && type() == TYPE_UI) {
static_cast<MessagePumpForUI*>(pump_.get())->
RunWithDispatcher(this, run_loop_->dispatcher_);
@@ -479,14 +418,14 @@ void MessageLoop::RunTask(const PendingTask& pending_task) {
tracked_objects::TrackedTime start_time =
tracked_objects::ThreadData::NowForStartOfRun(pending_task.birth_tally);
- TRACE_EVENT_FLOW_END1("task", "MessageLoop::PostTask",
- TRACE_ID_MANGLE(GetTaskTraceID(pending_task)),
+ TRACE_EVENT_FLOW_END1(TRACE_DISABLED_BY_DEFAULT("toplevel.flow"),
+ "MessageLoop::PostTask", TRACE_ID_MANGLE(GetTaskTraceID(pending_task)),
"queue_duration",
(start_time - pending_task.EffectiveTimePosted()).InMilliseconds());
// When tracing memory for posted tasks it's more valuable to attribute the
// memory allocations to the source function than generically to "RunTask".
TRACE_EVENT_WITH_MEMORY_TAG2(
- "task", "MessageLoop::RunTask",
+ "toplevel", "MessageLoop::RunTask",
pending_task.posted_from.function_name(), // Name for memory tracking.
"src_file", pending_task.posted_from.file_name(),
"src_func", pending_task.posted_from.function_name());
@@ -712,6 +651,7 @@ void MessageLoop::ReleaseSoonInternal(
PostNonNestableTask(from_here, Bind(releaser, object));
}
+#if !defined(OS_NACL)
//------------------------------------------------------------------------------
// MessageLoopForUI
@@ -728,64 +668,75 @@ void MessageLoopForUI::Attach() {
}
#endif
-#if !defined(OS_MACOSX) && !defined(OS_NACL) && !defined(OS_ANDROID)
+#if defined(OS_WIN)
void MessageLoopForUI::AddObserver(Observer* observer) {
- pump_ui()->AddObserver(observer);
+ static_cast<MessagePumpWin*>(pump_.get())->AddObserver(observer);
}
void MessageLoopForUI::RemoveObserver(Observer* observer) {
- pump_ui()->RemoveObserver(observer);
+ static_cast<MessagePumpWin*>(pump_.get())->RemoveObserver(observer);
}
+#endif // defined(OS_WIN)
-#endif // !defined(OS_MACOSX) && !defined(OS_NACL) && !defined(OS_ANDROID)
+#if defined(USE_OZONE) || (defined(OS_CHROMEOS) && !defined(USE_GLIB))
+bool MessageLoopForUI::WatchFileDescriptor(
+ int fd,
+ bool persistent,
+ MessagePumpLibevent::Mode mode,
+ MessagePumpLibevent::FileDescriptorWatcher *controller,
+ MessagePumpLibevent::Watcher *delegate) {
+ return static_cast<MessagePumpLibevent*>(pump_.get())->WatchFileDescriptor(
+ fd,
+ persistent,
+ mode,
+ controller,
+ delegate);
+}
+#endif
+
+#endif // !defined(OS_NACL)
//------------------------------------------------------------------------------
// MessageLoopForIO
-#if defined(OS_WIN)
+#if !defined(OS_NACL)
+void MessageLoopForIO::AddIOObserver(
+ MessageLoopForIO::IOObserver* io_observer) {
+ ToPumpIO(pump_.get())->AddIOObserver(io_observer);
+}
+
+void MessageLoopForIO::RemoveIOObserver(
+ MessageLoopForIO::IOObserver* io_observer) {
+ ToPumpIO(pump_.get())->RemoveIOObserver(io_observer);
+}
+#if defined(OS_WIN)
void MessageLoopForIO::RegisterIOHandler(HANDLE file, IOHandler* handler) {
- pump_io()->RegisterIOHandler(file, handler);
+ ToPumpIO(pump_.get())->RegisterIOHandler(file, handler);
}
bool MessageLoopForIO::RegisterJobObject(HANDLE job, IOHandler* handler) {
- return pump_io()->RegisterJobObject(job, handler);
+ return ToPumpIO(pump_.get())->RegisterJobObject(job, handler);
}
bool MessageLoopForIO::WaitForIOCompletion(DWORD timeout, IOHandler* filter) {
- return pump_io()->WaitForIOCompletion(timeout, filter);
-}
-
-#elif defined(OS_IOS)
-
-bool MessageLoopForIO::WatchFileDescriptor(int fd,
- bool persistent,
- Mode mode,
- FileDescriptorWatcher *controller,
- Watcher *delegate) {
- return pump_io()->WatchFileDescriptor(
- fd,
- persistent,
- mode,
- controller,
- delegate);
+ return ToPumpIO(pump_.get())->WaitForIOCompletion(timeout, filter);
}
-
-#elif defined(OS_POSIX) && !defined(OS_NACL)
-
+#elif defined(OS_POSIX)
bool MessageLoopForIO::WatchFileDescriptor(int fd,
bool persistent,
Mode mode,
FileDescriptorWatcher *controller,
Watcher *delegate) {
- return pump_libevent()->WatchFileDescriptor(
+ return ToPumpIO(pump_.get())->WatchFileDescriptor(
fd,
persistent,
mode,
controller,
delegate);
}
-
#endif
+#endif // !defined(OS_NACL)
+
} // namespace base
diff --git a/chromium/base/message_loop/message_loop.h b/chromium/base/message_loop/message_loop.h
index e307d365a00..22d4f7395e4 100644
--- a/chromium/base/message_loop/message_loop.h
+++ b/chromium/base/message_loop/message_loop.h
@@ -18,6 +18,7 @@
#include "base/message_loop/message_loop_proxy.h"
#include "base/message_loop/message_loop_proxy_impl.h"
#include "base/message_loop/message_pump.h"
+#include "base/message_loop/timer_slack.h"
#include "base/observer_list.h"
#include "base/pending_task.h"
#include "base/sequenced_task_runner_helpers.h"
@@ -25,41 +26,21 @@
#include "base/time/time.h"
#include "base/tracking_info.h"
+// TODO(sky): these includes should not be necessary. Nuke them.
#if defined(OS_WIN)
-// We need this to declare base::MessagePumpWin::Dispatcher, which we should
-// really just eliminate.
#include "base/message_loop/message_pump_win.h"
#elif defined(OS_IOS)
#include "base/message_loop/message_pump_io_ios.h"
#elif defined(OS_POSIX)
#include "base/message_loop/message_pump_libevent.h"
-#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
-
-#if defined(USE_AURA) && defined(USE_X11) && !defined(OS_NACL)
-#include "base/message_loop/message_pump_x11.h"
-#elif defined(USE_OZONE) && !defined(OS_NACL)
-#include "base/message_loop/message_pump_ozone.h"
-#else
-#define USE_GTK_MESSAGE_PUMP
-#include "base/message_loop/message_pump_gtk.h"
-#if defined(TOOLKIT_GTK)
-#include "base/message_loop/message_pump_x11.h"
-#endif
-#endif
-
-#endif
#endif
namespace base {
class HistogramBase;
-class MessagePumpDispatcher;
class MessagePumpObserver;
class RunLoop;
class ThreadTaskRunnerHandle;
-#if defined(OS_ANDROID)
-class MessagePumpForUI;
-#endif
class WaitableEvent;
// A MessageLoop is used to process events for a particular thread. There is
@@ -95,14 +76,6 @@ class WaitableEvent;
//
class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
public:
-
-#if defined(USE_GTK_MESSAGE_PUMP)
- typedef MessagePumpGdkObserver Observer;
-#elif !defined(OS_MACOSX) && !defined(OS_ANDROID)
- typedef MessagePumpDispatcher Dispatcher;
- typedef MessagePumpObserver Observer;
-#endif
-
// A MessageLoop has a particular type, which indicates the set of
// asynchronous events it may process in addition to tasks and timers.
//
@@ -113,11 +86,6 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// This type of ML also supports native UI events (e.g., Windows messages).
// See also MessageLoopForUI.
//
- // TYPE_GPU
- // This type of ML also supports native UI events for use in the GPU
- // process. On Linux this will always be an X11 ML (as compared with the
- // sometimes-GTK ML in the browser process).
- //
// TYPE_IO
// This type of ML also supports asynchronous IO. See also
// MessageLoopForIO.
@@ -135,9 +103,6 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
TYPE_DEFAULT,
TYPE_UI,
TYPE_CUSTOM,
-#if defined(TOOLKIT_GTK)
- TYPE_GPU,
-#endif
TYPE_IO,
#if defined(OS_ANDROID)
TYPE_JAVA,
@@ -157,7 +122,7 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
static void EnableHistogrammer(bool enable_histogrammer);
- typedef MessagePump* (MessagePumpFactory)();
+ typedef scoped_ptr<MessagePump> (MessagePumpFactory)();
// Uses the given base::MessagePumpForUIFactory to override the default
// MessagePump implementation for 'TYPE_UI'. Returns true if the factory
// was successfully registered.
@@ -165,10 +130,7 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// Creates the default MessagePump based on |type|. Caller owns return
// value.
- // TODO(sky): convert this and InitMessagePumpForUIFactory() to return a
- // scoped_ptr.
- static MessagePump* CreateMessagePumpForType(Type type);
-
+ static scoped_ptr<MessagePump> CreateMessagePumpForType(Type type);
// A DestructionObserver is notified when the current MessageLoop is being
// destroyed. These observers are notified prior to MessageLoop::current()
// being changed to return NULL. This gives interested parties the chance to
@@ -210,18 +172,11 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// PostTask(from_here, task) is equivalent to
// PostDelayedTask(from_here, task, 0).
//
- // The TryPostTask is meant for the cases where the calling thread cannot
- // block. If posting the task will block, the call returns false, the task
- // is not posted but the task is consumed anyways.
- //
// NOTE: These methods may be called on any thread. The Task will be invoked
// on the thread that executes MessageLoop::Run().
void PostTask(const tracked_objects::Location& from_here,
const Closure& task);
- bool TryPostTask(const tracked_objects::Location& from_here,
- const Closure& task);
-
void PostDelayedTask(const tracked_objects::Location& from_here,
const Closure& task,
TimeDelta delay);
@@ -253,6 +208,18 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// live until the next run of the MessageLoop, or if the object needs to be
// released on a particular thread.
//
+ // A common pattern is to manually increment the object's reference count
+ // (AddRef), clear the pointer, then issue a ReleaseSoon. The reference count
+ // is incremented manually to ensure clearing the pointer does not trigger a
+ // delete and to account for the upcoming decrement (ReleaseSoon). For
+ // example:
+ //
+ // scoped_refptr<Foo> foo = ...
+ // foo->AddRef();
+ // Foo* raw_foo = foo.get();
+ // foo = NULL;
+ // message_loop->ReleaseSoon(raw_foo);
+ //
// NOTE: This method may be called on any thread. The object will be
// released (and thus possibly deleted) on the thread that executes
// MessageLoop::Run(). If this is not the same as the thread that calls
@@ -308,6 +275,11 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// arbitrary MessageLoop to QuitWhenIdle.
static Closure QuitWhenIdleClosure();
+ // Set the timer slack for this message loop.
+ void SetTimerSlack(TimerSlack timer_slack) {
+ pump_->SetTimerSlack(timer_slack);
+ }
+
// Returns true if this loop is |type|. This allows subclasses (especially
// those in tests) to specialize how they are identified.
virtual bool IsType(Type type) const;
@@ -366,14 +338,6 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
bool old_state_;
};
- // Enables or disables the restoration during an exception of the unhandled
- // exception filter that was active when Run() was called. This can happen
- // if some third party code call SetUnhandledExceptionFilter() and never
- // restores the previous filter.
- void set_exception_restoration(bool restore) {
- exception_restoration_ = restore;
- }
-
// Returns true if we are currently running a nested message loop.
bool IsNested();
@@ -424,31 +388,8 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// Returns true if the message loop is "idle". Provided for testing.
bool IsIdleForTesting();
- // Takes the incoming queue lock, signals |caller_wait| and waits until
- // |caller_signal| is signalled.
- void LockWaitUnLockForTesting(WaitableEvent* caller_wait,
- WaitableEvent* caller_signal);
-
//----------------------------------------------------------------------------
protected:
-
-#if defined(OS_WIN)
- MessagePumpWin* pump_win() {
- return static_cast<MessagePumpWin*>(pump_.get());
- }
-#elif defined(OS_POSIX) && !defined(OS_IOS)
- MessagePumpLibevent* pump_libevent() {
- return static_cast<MessagePumpLibevent*>(pump_.get());
- }
-#if defined(TOOLKIT_GTK)
- friend class MessagePumpX11;
- MessagePumpX11* pump_gpu() {
- DCHECK_EQ(TYPE_GPU, type());
- return static_cast<MessagePumpX11*>(pump_.get());
- }
-#endif
-#endif
-
scoped_ptr<MessagePump> pump_;
private:
@@ -458,21 +399,9 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// Configures various members for the two constructors.
void Init();
- // A function to encapsulate all the exception handling capability in the
- // stacks around the running of a main message loop. It will run the message
- // loop in a SEH try block or not depending on the set_SEH_restoration()
- // flag invoking respectively RunInternalInSEHFrame() or RunInternal().
+ // Invokes the actual run loop using the message pump.
void RunHandler();
-#if defined(OS_WIN)
- __declspec(noinline) void RunInternalInSEHFrame();
-#endif
-
- // A surrounding stack frame around the running of the message loop that
- // supports all saving and restoring of state, as is needed for any/all (ugly)
- // recursive calls.
- void RunInternal();
-
// Called to process any delayed non-nestable tasks.
bool ProcessNextDelayedNonNestableTask();
@@ -539,8 +468,6 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
ObserverList<DestructionObserver> destruction_observers_;
- bool exception_restoration_;
-
// A recursion block that prevents accidentally running additional tasks when
// insider a (accidentally induced?) nested message pump.
bool nestable_tasks_allowed_;
@@ -578,6 +505,8 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
DISALLOW_COPY_AND_ASSIGN(MessageLoop);
};
+#if !defined(OS_NACL)
+
//-----------------------------------------------------------------------------
// MessageLoopForUI extends MessageLoop with methods that are particular to a
// MessageLoop instantiated with TYPE_UI.
@@ -587,10 +516,6 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
//
class BASE_EXPORT MessageLoopForUI : public MessageLoop {
public:
-#if defined(OS_WIN)
- typedef MessagePumpForUI::MessageFilter MessageFilter;
-#endif
-
MessageLoopForUI() : MessageLoop(TYPE_UI) {
}
@@ -602,6 +527,11 @@ class BASE_EXPORT MessageLoopForUI : public MessageLoop {
return static_cast<MessageLoopForUI*>(loop);
}
+ static bool IsCurrent() {
+ MessageLoop* loop = MessageLoop::current();
+ return loop && loop->type() == MessageLoop::TYPE_UI;
+ }
+
#if defined(OS_IOS)
// On iOS, the main message loop cannot be Run(). Instead call Attach(),
// which connects this MessageLoop to the UI thread's CFRunLoop and allows
@@ -614,33 +544,25 @@ class BASE_EXPORT MessageLoopForUI : public MessageLoop {
// never be called. Instead use Start(), which will forward all the native UI
// events to the Java message loop.
void Start();
-#elif !defined(OS_MACOSX)
+#endif
+
+#if defined(OS_WIN)
+ typedef MessagePumpObserver Observer;
- // Please see message_pump_win/message_pump_glib for definitions of these
- // methods.
+ // Please see message_pump_win for definitions of these methods.
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
-
-#if defined(OS_WIN)
- // Plese see MessagePumpForUI for definitions of this method.
- void SetMessageFilter(scoped_ptr<MessageFilter> message_filter) {
- pump_ui()->SetMessageFilter(message_filter.Pass());
- }
#endif
- protected:
-#if defined(USE_X11)
- friend class MessagePumpX11;
-#endif
-#if defined(USE_OZONE) && !defined(OS_NACL)
- friend class MessagePumpOzone;
+#if defined(USE_OZONE) || (defined(OS_CHROMEOS) && !defined(USE_GLIB))
+ // Please see MessagePumpLibevent for definition.
+ bool WatchFileDescriptor(
+ int fd,
+ bool persistent,
+ MessagePumpLibevent::Mode mode,
+ MessagePumpLibevent::FileDescriptorWatcher* controller,
+ MessagePumpLibevent::Watcher* delegate);
#endif
-
- // TODO(rvargas): Make this platform independent.
- MessagePumpForUI* pump_ui() {
- return static_cast<MessagePumpForUI*>(pump_.get());
- }
-#endif // !defined(OS_MACOSX)
};
// Do not add any member variables to MessageLoopForUI! This is important b/c
@@ -649,6 +571,8 @@ class BASE_EXPORT MessageLoopForUI : public MessageLoop {
COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForUI),
MessageLoopForUI_should_not_have_extra_member_variables);
+#endif // !defined(OS_NACL)
+
//-----------------------------------------------------------------------------
// MessageLoopForIO extends MessageLoop with methods that are particular to a
// MessageLoop instantiated with TYPE_IO.
@@ -658,6 +582,23 @@ COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForUI),
//
class BASE_EXPORT MessageLoopForIO : public MessageLoop {
public:
+ MessageLoopForIO() : MessageLoop(TYPE_IO) {
+ }
+
+ // Returns the MessageLoopForIO of the current thread.
+ static MessageLoopForIO* current() {
+ MessageLoop* loop = MessageLoop::current();
+ DCHECK_EQ(MessageLoop::TYPE_IO, loop->type());
+ return static_cast<MessageLoopForIO*>(loop);
+ }
+
+ static bool IsCurrent() {
+ MessageLoop* loop = MessageLoop::current();
+ return loop && loop->type() == MessageLoop::TYPE_IO;
+ }
+
+#if !defined(OS_NACL)
+
#if defined(OS_WIN)
typedef MessagePumpForIO::IOHandler IOHandler;
typedef MessagePumpForIO::IOContext IOContext;
@@ -684,65 +625,25 @@ class BASE_EXPORT MessageLoopForIO : public MessageLoop {
WATCH_WRITE = MessagePumpLibevent::WATCH_WRITE,
WATCH_READ_WRITE = MessagePumpLibevent::WATCH_READ_WRITE
};
-
#endif
- MessageLoopForIO() : MessageLoop(TYPE_IO) {
- }
-
- // Returns the MessageLoopForIO of the current thread.
- static MessageLoopForIO* current() {
- MessageLoop* loop = MessageLoop::current();
- DCHECK_EQ(MessageLoop::TYPE_IO, loop->type());
- return static_cast<MessageLoopForIO*>(loop);
- }
-
- void AddIOObserver(IOObserver* io_observer) {
- pump_io()->AddIOObserver(io_observer);
- }
-
- void RemoveIOObserver(IOObserver* io_observer) {
- pump_io()->RemoveIOObserver(io_observer);
- }
+ void AddIOObserver(IOObserver* io_observer);
+ void RemoveIOObserver(IOObserver* io_observer);
#if defined(OS_WIN)
// Please see MessagePumpWin for definitions of these methods.
void RegisterIOHandler(HANDLE file, IOHandler* handler);
bool RegisterJobObject(HANDLE job, IOHandler* handler);
bool WaitForIOCompletion(DWORD timeout, IOHandler* filter);
-
- protected:
- // TODO(rvargas): Make this platform independent.
- MessagePumpForIO* pump_io() {
- return static_cast<MessagePumpForIO*>(pump_.get());
- }
-
-#elif defined(OS_IOS)
- // Please see MessagePumpIOSForIO for definition.
+#elif defined(OS_POSIX)
+ // Please see MessagePumpIOSForIO/MessagePumpLibevent for definition.
bool WatchFileDescriptor(int fd,
bool persistent,
Mode mode,
FileDescriptorWatcher *controller,
Watcher *delegate);
-
- private:
- MessagePumpIOSForIO* pump_io() {
- return static_cast<MessagePumpIOSForIO*>(pump_.get());
- }
-
-#elif defined(OS_POSIX)
- // Please see MessagePumpLibevent for definition.
- bool WatchFileDescriptor(int fd,
- bool persistent,
- Mode mode,
- FileDescriptorWatcher* controller,
- Watcher* delegate);
-
- private:
- MessagePumpLibevent* pump_io() {
- return static_cast<MessagePumpLibevent*>(pump_.get());
- }
-#endif // defined(OS_POSIX)
+#endif // defined(OS_IOS) || defined(OS_POSIX)
+#endif // !defined(OS_NACL)
};
// Do not add any member variables to MessageLoopForIO! This is important b/c
diff --git a/chromium/base/message_loop/message_loop_test.cc b/chromium/base/message_loop/message_loop_test.cc
index 9ac5b72d374..eca6c8f2452 100644
--- a/chromium/base/message_loop/message_loop_test.cc
+++ b/chromium/base/message_loop/message_loop_test.cc
@@ -101,69 +101,14 @@ void RunTest_PostTask(MessagePumpFactory factory) {
&Foo::Test1Int, foo.get(), 100));
MessageLoop::current()->PostTask(FROM_HERE, Bind(
&Foo::Test2Ptr, foo.get(), &a, &c));
-
- // TryPost with no contention. It must succeed.
- EXPECT_TRUE(MessageLoop::current()->TryPostTask(FROM_HERE, Bind(
- &Foo::Test2Mixed, foo.get(), a, &d)));
-
- // TryPost with simulated contention. It must fail. We wait for a helper
- // thread to lock the queue, we TryPost on this thread and finally we
- // signal the helper to unlock and exit.
- WaitableEvent wait(true, false);
- WaitableEvent signal(true, false);
- Thread thread("RunTest_PostTask_helper");
- thread.Start();
- thread.message_loop()->PostTask(
- FROM_HERE,
- Bind(&MessageLoop::LockWaitUnLockForTesting,
- base::Unretained(MessageLoop::current()),
- &wait,
- &signal));
-
- wait.Wait();
- EXPECT_FALSE(MessageLoop::current()->TryPostTask(FROM_HERE, Bind(
- &Foo::Test2Mixed, foo.get(), a, &d)));
- signal.Signal();
-
- // After all tests, post a message that will shut down the message loop
- MessageLoop::current()->PostTask(FROM_HERE, Bind(
- &MessageLoop::Quit, Unretained(MessageLoop::current())));
-
- // Now kick things off
- MessageLoop::current()->Run();
-
- EXPECT_EQ(foo->test_count(), 105);
- EXPECT_EQ(foo->result(), "abacad");
-}
-
-void RunTest_PostTask_SEH(MessagePumpFactory factory) {
- scoped_ptr<MessagePump> pump(factory());
- MessageLoop loop(pump.Pass());
-
- // Add tests to message loop
- scoped_refptr<Foo> foo(new Foo());
- std::string a("a"), b("b"), c("c"), d("d");
- MessageLoop::current()->PostTask(FROM_HERE, Bind(
- &Foo::Test0, foo.get()));
- MessageLoop::current()->PostTask(FROM_HERE, Bind(
- &Foo::Test1ConstRef, foo.get(), a));
- MessageLoop::current()->PostTask(FROM_HERE, Bind(
- &Foo::Test1Ptr, foo.get(), &b));
- MessageLoop::current()->PostTask(FROM_HERE, Bind(
- &Foo::Test1Int, foo.get(), 100));
- MessageLoop::current()->PostTask(FROM_HERE, Bind(
- &Foo::Test2Ptr, foo.get(), &a, &c));
MessageLoop::current()->PostTask(FROM_HERE, Bind(
&Foo::Test2Mixed, foo.get(), a, &d));
-
// After all tests, post a message that will shut down the message loop
MessageLoop::current()->PostTask(FROM_HERE, Bind(
&MessageLoop::Quit, Unretained(MessageLoop::current())));
- // Now kick things off with the SEH block active.
- MessageLoop::current()->set_exception_restoration(true);
+ // Now kick things off
MessageLoop::current()->Run();
- MessageLoop::current()->set_exception_restoration(false);
EXPECT_EQ(foo->test_count(), 105);
EXPECT_EQ(foo->result(), "abacad");
diff --git a/chromium/base/message_loop/message_loop_test.h b/chromium/base/message_loop/message_loop_test.h
index 5d1a4f5ac27..3d9889cd58d 100644
--- a/chromium/base/message_loop/message_loop_test.h
+++ b/chromium/base/message_loop/message_loop_test.h
@@ -19,7 +19,6 @@ namespace test {
typedef MessageLoop::MessagePumpFactory MessagePumpFactory;
void RunTest_PostTask(MessagePumpFactory factory);
-void RunTest_PostTask_SEH(MessagePumpFactory factory);
void RunTest_PostDelayedTask_Basic(MessagePumpFactory factory);
void RunTest_PostDelayedTask_InDelayOrder(MessagePumpFactory factory);
void RunTest_PostDelayedTask_InPostOrder(MessagePumpFactory factory);
@@ -52,9 +51,6 @@ void RunTest_RecursivePosts(MessagePumpFactory factory);
TEST(MessageLoopTestType##id, PostTask) { \
base::test::RunTest_PostTask(factory); \
} \
- TEST(MessageLoopTestType##id, PostTask_SEH) { \
- base::test::RunTest_PostTask_SEH(factory); \
- } \
TEST(MessageLoopTestType##id, PostDelayedTask_Basic) { \
base::test::RunTest_PostDelayedTask_Basic(factory); \
} \
diff --git a/chromium/base/message_loop/message_loop_unittest.cc b/chromium/base/message_loop/message_loop_unittest.cc
index e6d25ecef82..1b09eb070fa 100644
--- a/chromium/base/message_loop/message_loop_unittest.cc
+++ b/chromium/base/message_loop/message_loop_unittest.cc
@@ -22,6 +22,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#if defined(OS_WIN)
+#include "base/message_loop/message_pump_dispatcher.h"
#include "base/message_loop/message_pump_win.h"
#include "base/process/memory.h"
#include "base/strings/string16.h"
@@ -35,15 +36,15 @@ namespace base {
namespace {
-MessagePump* TypeDefaultMessagePumpFactory() {
+scoped_ptr<MessagePump> TypeDefaultMessagePumpFactory() {
return MessageLoop::CreateMessagePumpForType(MessageLoop::TYPE_DEFAULT);
}
-MessagePump* TypeIOMessagePumpFactory() {
+scoped_ptr<MessagePump> TypeIOMessagePumpFactory() {
return MessageLoop::CreateMessagePumpForType(MessageLoop::TYPE_IO);
}
-MessagePump* TypeUIMessagePumpFactory() {
+scoped_ptr<MessagePump> TypeUIMessagePumpFactory() {
return MessageLoop::CreateMessagePumpForType(MessageLoop::TYPE_UI);
}
@@ -52,36 +53,11 @@ class Foo : public RefCounted<Foo> {
Foo() : test_count_(0) {
}
- void Test0() {
- ++test_count_;
- }
-
void Test1ConstRef(const std::string& a) {
++test_count_;
result_.append(a);
}
- void Test1Ptr(std::string* a) {
- ++test_count_;
- result_.append(*a);
- }
-
- void Test1Int(int a) {
- test_count_ += a;
- }
-
- void Test2Ptr(std::string* a, std::string* b) {
- ++test_count_;
- result_.append(*a);
- result_.append(*b);
- }
-
- void Test2Mixed(const std::string& a, std::string* b) {
- ++test_count_;
- result_.append(a);
- result_.append(*b);
- }
-
int test_count() const { return test_count_; }
const std::string& result() const { return result_; }
@@ -167,120 +143,6 @@ void RunTest_PostDelayedTask_SharedTimer_SubPump() {
EXPECT_TRUE(run_time.is_null());
}
-LONG WINAPI BadExceptionHandler(EXCEPTION_POINTERS *ex_info) {
- ADD_FAILURE() << "bad exception handler";
- ::ExitProcess(ex_info->ExceptionRecord->ExceptionCode);
- return EXCEPTION_EXECUTE_HANDLER;
-}
-
-// This task throws an SEH exception: initially write to an invalid address.
-// If the right SEH filter is installed, it will fix the error.
-class Crasher : public RefCounted<Crasher> {
- public:
- // Ctor. If trash_SEH_handler is true, the task will override the unhandled
- // exception handler with one sure to crash this test.
- explicit Crasher(bool trash_SEH_handler)
- : trash_SEH_handler_(trash_SEH_handler) {
- }
-
- void Run() {
- PlatformThread::Sleep(TimeDelta::FromMilliseconds(1));
- if (trash_SEH_handler_)
- ::SetUnhandledExceptionFilter(&BadExceptionHandler);
- // Generate a SEH fault. We do it in asm to make sure we know how to undo
- // the damage.
-
-#if defined(_M_IX86)
-
- __asm {
- mov eax, dword ptr [Crasher::bad_array_]
- mov byte ptr [eax], 66
- }
-
-#elif defined(_M_X64)
-
- bad_array_[0] = 66;
-
-#else
-#error "needs architecture support"
-#endif
-
- MessageLoop::current()->QuitWhenIdle();
- }
- // Points the bad array to a valid memory location.
- static void FixError() {
- bad_array_ = &valid_store_;
- }
-
- private:
- bool trash_SEH_handler_;
- static volatile char* bad_array_;
- static char valid_store_;
-};
-
-volatile char* Crasher::bad_array_ = 0;
-char Crasher::valid_store_ = 0;
-
-// This SEH filter fixes the problem and retries execution. Fixing requires
-// that the last instruction: mov eax, [Crasher::bad_array_] to be retried
-// so we move the instruction pointer 5 bytes back.
-LONG WINAPI HandleCrasherException(EXCEPTION_POINTERS *ex_info) {
- if (ex_info->ExceptionRecord->ExceptionCode != EXCEPTION_ACCESS_VIOLATION)
- return EXCEPTION_EXECUTE_HANDLER;
-
- Crasher::FixError();
-
-#if defined(_M_IX86)
-
- ex_info->ContextRecord->Eip -= 5;
-
-#elif defined(_M_X64)
-
- ex_info->ContextRecord->Rip -= 5;
-
-#endif
-
- return EXCEPTION_CONTINUE_EXECUTION;
-}
-
-void RunTest_Crasher(MessageLoop::Type message_loop_type) {
- MessageLoop loop(message_loop_type);
-
- if (::IsDebuggerPresent())
- return;
-
- LPTOP_LEVEL_EXCEPTION_FILTER old_SEH_filter =
- ::SetUnhandledExceptionFilter(&HandleCrasherException);
-
- MessageLoop::current()->PostTask(
- FROM_HERE,
- Bind(&Crasher::Run, new Crasher(false)));
- MessageLoop::current()->set_exception_restoration(true);
- MessageLoop::current()->Run();
- MessageLoop::current()->set_exception_restoration(false);
-
- ::SetUnhandledExceptionFilter(old_SEH_filter);
-}
-
-void RunTest_CrasherNasty(MessageLoop::Type message_loop_type) {
- MessageLoop loop(message_loop_type);
-
- if (::IsDebuggerPresent())
- return;
-
- LPTOP_LEVEL_EXCEPTION_FILTER old_SEH_filter =
- ::SetUnhandledExceptionFilter(&HandleCrasherException);
-
- MessageLoop::current()->PostTask(
- FROM_HERE,
- Bind(&Crasher::Run, new Crasher(true)));
- MessageLoop::current()->set_exception_restoration(true);
- MessageLoop::current()->Run();
- MessageLoop::current()->set_exception_restoration(false);
-
- ::SetUnhandledExceptionFilter(old_SEH_filter);
-}
-
const wchar_t kMessageBoxTitle[] = L"MessageLoop Unit Test";
enum TaskType {
@@ -559,11 +421,11 @@ void PostNTasksThenQuit(int posts_remaining) {
#if defined(OS_WIN)
-class DispatcherImpl : public MessageLoopForUI::Dispatcher {
+class DispatcherImpl : public MessagePumpDispatcher {
public:
DispatcherImpl() : dispatch_count_(0) {}
- virtual bool Dispatch(const NativeEvent& msg) OVERRIDE {
+ virtual uint32_t Dispatch(const NativeEvent& msg) OVERRIDE {
::TranslateMessage(&msg);
::DispatchMessage(&msg);
// Do not count WM_TIMER since it is not what we post and it will cause
@@ -571,7 +433,8 @@ class DispatcherImpl : public MessageLoopForUI::Dispatcher {
if (msg.message != WM_TIMER)
++dispatch_count_;
// We treat WM_LBUTTONUP as the last message.
- return msg.message != WM_LBUTTONUP;
+ return msg.message == WM_LBUTTONUP ? POST_DISPATCH_QUIT_LOOP
+ : POST_DISPATCH_NONE;
}
int dispatch_count_;
@@ -781,18 +644,6 @@ TEST(MessageLoopTest, PostDelayedTask_SharedTimer_SubPump) {
RunTest_PostDelayedTask_SharedTimer_SubPump();
}
-TEST(MessageLoopTest, Crasher) {
- RunTest_Crasher(MessageLoop::TYPE_DEFAULT);
- RunTest_Crasher(MessageLoop::TYPE_UI);
- RunTest_Crasher(MessageLoop::TYPE_IO);
-}
-
-TEST(MessageLoopTest, CrasherNasty) {
- RunTest_CrasherNasty(MessageLoop::TYPE_DEFAULT);
- RunTest_CrasherNasty(MessageLoop::TYPE_UI);
- RunTest_CrasherNasty(MessageLoop::TYPE_IO);
-}
-
// This test occasionally hangs http://crbug.com/44567
TEST(MessageLoopTest, DISABLED_RecursiveDenial2) {
RunTest_RecursiveDenial2(MessageLoop::TYPE_DEFAULT);
diff --git a/chromium/base/message_loop/message_pump.cc b/chromium/base/message_loop/message_pump.cc
index 7ffc2b170de..3d85b9b5643 100644
--- a/chromium/base/message_loop/message_pump.cc
+++ b/chromium/base/message_loop/message_pump.cc
@@ -12,4 +12,7 @@ MessagePump::MessagePump() {
MessagePump::~MessagePump() {
}
+void MessagePump::SetTimerSlack(TimerSlack) {
+}
+
} // namespace base
diff --git a/chromium/base/message_loop/message_pump.h b/chromium/base/message_loop/message_pump.h
index 816bb3c3d39..a795f31b67c 100644
--- a/chromium/base/message_loop/message_pump.h
+++ b/chromium/base/message_loop/message_pump.h
@@ -7,6 +7,7 @@
#include "base/base_export.h"
#include "base/basictypes.h"
+#include "base/message_loop/timer_slack.h"
#include "base/threading/non_thread_safe.h"
namespace base {
@@ -134,6 +135,9 @@ class BASE_EXPORT MessagePump : public NonThreadSafe {
// cancelling any pending DoDelayedWork callback. This method may only be
// used on the thread that called Run.
virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) = 0;
+
+ // Sets the timer slack to the specified value.
+ virtual void SetTimerSlack(TimerSlack timer_slack);
};
} // namespace base
diff --git a/chromium/base/message_loop/message_pump_android.cc b/chromium/base/message_loop/message_pump_android.cc
index e756fdd3f52..babd17b577e 100644
--- a/chromium/base/message_loop/message_pump_android.cc
+++ b/chromium/base/message_loop/message_pump_android.cc
@@ -21,7 +21,8 @@ using base::android::ScopedJavaLocalRef;
// ----------------------------------------------------------------------------
// This method can not move to anonymous namespace as it has been declared as
// 'static' in system_message_handler_jni.h.
-static void DoRunLoopOnce(JNIEnv* env, jobject obj, jlong native_delegate) {
+static void DoRunLoopOnce(JNIEnv* env, jobject obj, jlong native_delegate,
+ jlong delayed_scheduled_time_ticks) {
base::MessagePump::Delegate* delegate =
reinterpret_cast<base::MessagePump::Delegate*>(native_delegate);
DCHECK(delegate);
@@ -33,16 +34,42 @@ static void DoRunLoopOnce(JNIEnv* env, jobject obj, jlong native_delegate) {
// that will be processed before calling here again.
bool did_work = delegate->DoWork();
- // This is the time when we need to do delayed work.
- base::TimeTicks delayed_work_time;
- did_work |= delegate->DoDelayedWork(&delayed_work_time);
-
- // Always call this if there is a delayed message waiting in the queue
- // since is at most one delayed message in the Java message handler, and this
- // function call may be the result of that message being handled.
- if (!delayed_work_time.is_null()) {
- Java_SystemMessageHandler_setDelayedTimer(env, obj,
- (delayed_work_time - base::TimeTicks::Now()).InMillisecondsRoundedUp());
+ // In the java side, |SystemMessageHandler| keeps a single "delayed" message.
+ // It's an expensive operation to |removeMessage| there, so this is optimized
+ // to avoid those calls.
+ //
+ // At this stage, |next_delayed_work_time| can be:
+ // 1) The same as previously scheduled: nothing to be done, move along. This
+ // is the typical case, since this method is called for every single message.
+ //
+ // 2) Not previously scheduled: just post a new message in java.
+ //
+ // 3) Shorter than previously scheduled: far less common. In this case,
+ // |removeMessage| and post a new one.
+ //
+ // 4) Longer than previously scheduled (or null): nothing to be done, move
+ // along.
+ //
+ // Side note: base::TimeTicks is a C++ representation and can't be
+ // compared in java. When calling |scheduleDelayedWork|, pass the
+ // |InternalValue()| to java and then back to C++ so the comparisons can be
+ // done here.
+ // This roundtrip allows comparing TimeTicks directly (cheap) and
+ // avoid comparisons with TimeDelta / Now() (expensive).
+ base::TimeTicks next_delayed_work_time;
+ did_work |= delegate->DoDelayedWork(&next_delayed_work_time);
+
+ if (!next_delayed_work_time.is_null()) {
+ // Schedule a new message if there's nothing already scheduled or there's a
+ // shorter delay than previously scheduled (see (2) and (3) above).
+ if (delayed_scheduled_time_ticks == 0 ||
+ next_delayed_work_time < base::TimeTicks::FromInternalValue(
+ delayed_scheduled_time_ticks)) {
+ Java_SystemMessageHandler_scheduleDelayedWork(env, obj,
+ next_delayed_work_time.ToInternalValue(),
+ (next_delayed_work_time -
+ base::TimeTicks::Now()).InMillisecondsRoundedUp());
+ }
}
// This is a major difference between android and other platforms: since we
@@ -90,7 +117,7 @@ void MessagePumpForUI::Quit() {
JNIEnv* env = base::android::AttachCurrentThread();
DCHECK(env);
- Java_SystemMessageHandler_removeTimer(env,
+ Java_SystemMessageHandler_removeAllPendingMessages(env,
system_message_handler_obj_.obj());
system_message_handler_obj_.Reset();
}
@@ -108,7 +135,7 @@ void MessagePumpForUI::ScheduleWork() {
JNIEnv* env = base::android::AttachCurrentThread();
DCHECK(env);
- Java_SystemMessageHandler_setTimer(env,
+ Java_SystemMessageHandler_scheduleWork(env,
system_message_handler_obj_.obj());
}
@@ -122,8 +149,9 @@ void MessagePumpForUI::ScheduleDelayedWork(const TimeTicks& delayed_work_time) {
(delayed_work_time - TimeTicks::Now()).InMillisecondsRoundedUp();
// Note that we're truncating to milliseconds as required by the java side,
// even though delayed_work_time is microseconds resolution.
- Java_SystemMessageHandler_setDelayedTimer(env,
- system_message_handler_obj_.obj(), millis);
+ Java_SystemMessageHandler_scheduleDelayedWork(env,
+ system_message_handler_obj_.obj(),
+ delayed_work_time.ToInternalValue(), millis);
}
// static
diff --git a/chromium/base/message_loop/message_pump_dispatcher.h b/chromium/base/message_loop/message_pump_dispatcher.h
index e49fa4f15df..0dea22662f9 100644
--- a/chromium/base/message_loop/message_pump_dispatcher.h
+++ b/chromium/base/message_loop/message_pump_dispatcher.h
@@ -5,6 +5,8 @@
#ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_DISPATCHER_H
#define BASE_MESSAGE_LOOP_MESSAGE_PUMP_DISPATCHER_H
+#include <stdint.h>
+
#include "base/base_export.h"
#include "base/event_types.h"
@@ -16,15 +18,24 @@ namespace base {
// every message is passed to Dispatcher's Dispatch method for dispatch. It is
// up to the Dispatcher whether or not to dispatch the event.
//
-// The nested loop is exited by either posting a quit, or returning false
-// from Dispatch.
+// The nested loop is exited by either posting a quit, or setting the
+// POST_DISPATCH_QUIT_LOOP flag on the return value from Dispatch.
class BASE_EXPORT MessagePumpDispatcher {
public:
+ enum PostDispatchAction {
+ POST_DISPATCH_NONE = 0x0,
+ POST_DISPATCH_QUIT_LOOP = 0x1,
+ POST_DISPATCH_PERFORM_DEFAULT = 0x2,
+ };
+
virtual ~MessagePumpDispatcher() {}
- // Dispatches the event. If true is returned processing continues as
- // normal. If false is returned, the nested loop exits immediately.
- virtual bool Dispatch(const NativeEvent& event) = 0;
+ // Dispatches the event. The return value can have more than one
+ // PostDispatchAction flags OR'ed together. If POST_DISPATCH_PERFORM_DEFAULT
+ // is set in the returned value, then the message-pump performs the default
+ // action. If POST_DISPATCH_QUIT_LOOP is set, in the return value, then the
+ // nested loop exits immediately.
+ virtual uint32_t Dispatch(const NativeEvent& event) = 0;
};
} // namespace base
diff --git a/chromium/base/message_loop/message_pump_glib.cc b/chromium/base/message_loop/message_pump_glib.cc
index 13d8b2b9914..f06f60d8cf5 100644
--- a/chromium/base/message_loop/message_pump_glib.cc
+++ b/chromium/base/message_loop/message_pump_glib.cc
@@ -9,8 +9,10 @@
#include <glib.h>
+#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/posix/eintr_wrapper.h"
+#include "base/synchronization/lock.h"
#include "base/threading/platform_thread.h"
namespace base {
@@ -117,11 +119,53 @@ GSourceFuncs WorkSourceFuncs = {
NULL
};
+// The following is used to make sure we only run the MessagePumpGlib on one
+// thread. X only has one message pump so we can only have one UI loop per
+// process.
+#ifndef NDEBUG
+
+// Tracks the pump the most recent pump that has been run.
+struct ThreadInfo {
+ // The pump.
+ MessagePumpGlib* pump;
+
+ // ID of the thread the pump was run on.
+ PlatformThreadId thread_id;
+};
+
+// Used for accesing |thread_info|.
+static LazyInstance<Lock>::Leaky thread_info_lock = LAZY_INSTANCE_INITIALIZER;
+
+// If non-NULL it means a MessagePumpGlib exists and has been Run. This is
+// destroyed when the MessagePump is destroyed.
+ThreadInfo* thread_info = NULL;
+
+void CheckThread(MessagePumpGlib* pump) {
+ AutoLock auto_lock(thread_info_lock.Get());
+ if (!thread_info) {
+ thread_info = new ThreadInfo;
+ thread_info->pump = pump;
+ thread_info->thread_id = PlatformThread::CurrentId();
+ }
+ DCHECK(thread_info->thread_id == PlatformThread::CurrentId()) <<
+ "Running MessagePumpGlib on two different threads; "
+ "this is unsupported by GLib!";
+}
+
+void PumpDestroyed(MessagePumpGlib* pump) {
+ AutoLock auto_lock(thread_info_lock.Get());
+ if (thread_info && thread_info->pump == pump) {
+ delete thread_info;
+ thread_info = NULL;
+ }
+}
+
+#endif
+
} // namespace
struct MessagePumpGlib::RunState {
Delegate* delegate;
- MessagePumpDispatcher* dispatcher;
// Used to flag that the current Run() invocation should return ASAP.
bool should_quit;
@@ -161,71 +205,15 @@ MessagePumpGlib::MessagePumpGlib()
}
MessagePumpGlib::~MessagePumpGlib() {
+#ifndef NDEBUG
+ PumpDestroyed(this);
+#endif
g_source_destroy(work_source_);
g_source_unref(work_source_);
close(wakeup_pipe_read_);
close(wakeup_pipe_write_);
}
-void MessagePumpGlib::RunWithDispatcher(Delegate* delegate,
- MessagePumpDispatcher* dispatcher) {
-#ifndef NDEBUG
- // Make sure we only run this on one thread. X/GTK only has one message pump
- // so we can only have one UI loop per process.
- static PlatformThreadId thread_id = PlatformThread::CurrentId();
- DCHECK(thread_id == PlatformThread::CurrentId()) <<
- "Running MessagePumpGlib on two different threads; "
- "this is unsupported by GLib!";
-#endif
-
- RunState state;
- state.delegate = delegate;
- state.dispatcher = dispatcher;
- state.should_quit = false;
- state.run_depth = state_ ? state_->run_depth + 1 : 1;
- state.has_work = false;
-
- RunState* previous_state = state_;
- state_ = &state;
-
- // We really only do a single task for each iteration of the loop. If we
- // have done something, assume there is likely something more to do. This
- // will mean that we don't block on the message pump until there was nothing
- // more to do. We also set this to true to make sure not to block on the
- // first iteration of the loop, so RunUntilIdle() works correctly.
- bool more_work_is_plausible = true;
-
- // We run our own loop instead of using g_main_loop_quit in one of the
- // callbacks. This is so we only quit our own loops, and we don't quit
- // nested loops run by others. TODO(deanm): Is this what we want?
- for (;;) {
- // Don't block if we think we have more work to do.
- bool block = !more_work_is_plausible;
-
- more_work_is_plausible = g_main_context_iteration(context_, block);
- if (state_->should_quit)
- break;
-
- more_work_is_plausible |= state_->delegate->DoWork();
- if (state_->should_quit)
- break;
-
- more_work_is_plausible |=
- state_->delegate->DoDelayedWork(&delayed_work_time_);
- if (state_->should_quit)
- break;
-
- if (more_work_is_plausible)
- continue;
-
- more_work_is_plausible = state_->delegate->DoIdleWork();
- if (state_->should_quit)
- break;
- }
-
- state_ = previous_state;
-}
-
// Return the timeout we want passed to poll.
int MessagePumpGlib::HandlePrepare() {
// We know we have work, but we haven't called HandleDispatch yet. Don't let
@@ -291,7 +279,55 @@ void MessagePumpGlib::HandleDispatch() {
}
void MessagePumpGlib::Run(Delegate* delegate) {
- RunWithDispatcher(delegate, NULL);
+#ifndef NDEBUG
+ CheckThread(this);
+#endif
+
+ RunState state;
+ state.delegate = delegate;
+ state.should_quit = false;
+ state.run_depth = state_ ? state_->run_depth + 1 : 1;
+ state.has_work = false;
+
+ RunState* previous_state = state_;
+ state_ = &state;
+
+ // We really only do a single task for each iteration of the loop. If we
+ // have done something, assume there is likely something more to do. This
+ // will mean that we don't block on the message pump until there was nothing
+ // more to do. We also set this to true to make sure not to block on the
+ // first iteration of the loop, so RunUntilIdle() works correctly.
+ bool more_work_is_plausible = true;
+
+ // We run our own loop instead of using g_main_loop_quit in one of the
+ // callbacks. This is so we only quit our own loops, and we don't quit
+ // nested loops run by others. TODO(deanm): Is this what we want?
+ for (;;) {
+ // Don't block if we think we have more work to do.
+ bool block = !more_work_is_plausible;
+
+ more_work_is_plausible = g_main_context_iteration(context_, block);
+ if (state_->should_quit)
+ break;
+
+ more_work_is_plausible |= state_->delegate->DoWork();
+ if (state_->should_quit)
+ break;
+
+ more_work_is_plausible |=
+ state_->delegate->DoDelayedWork(&delayed_work_time_);
+ if (state_->should_quit)
+ break;
+
+ if (more_work_is_plausible)
+ continue;
+
+ more_work_is_plausible = state_->delegate->DoIdleWork();
+ if (state_->should_quit)
+ break;
+ }
+
+ state_ = previous_state;
}
void MessagePumpGlib::Quit() {
@@ -319,8 +355,9 @@ void MessagePumpGlib::ScheduleDelayedWork(const TimeTicks& delayed_work_time) {
ScheduleWork();
}
-MessagePumpDispatcher* MessagePumpGlib::GetDispatcher() {
- return state_ ? state_->dispatcher : NULL;
+bool MessagePumpGlib::ShouldQuit() const {
+ CHECK(state_);
+ return state_->should_quit;
}
} // namespace base
diff --git a/chromium/base/message_loop/message_pump_glib.h b/chromium/base/message_loop/message_pump_glib.h
index 174bd051f57..a13493a739c 100644
--- a/chromium/base/message_loop/message_pump_glib.h
+++ b/chromium/base/message_loop/message_pump_glib.h
@@ -17,19 +17,6 @@ typedef struct _GSource GSource;
namespace base {
-// MessagePumpObserver is notified prior to an event being dispatched. As
-// Observers are notified of every change, they have to be FAST! The platform
-// specific implementation of the class is in message_pump_gtk/message_pump_x.
-class MessagePumpObserver;
-
-// MessagePumpDispatcher is used during a nested invocation of Run to dispatch
-// events. If Run is invoked with a non-NULL MessagePumpDispatcher, MessageLoop
-// does not dispatch events (or invoke gtk_main_do_event), rather every event is
-// passed to Dispatcher's Dispatch method for dispatch. It is up to the
-// Dispatcher to dispatch, or not, the event. The platform specific
-// implementation of the class is in message_pump_gtk/message_pump_x.
-class MessagePumpDispatcher;
-
// This class implements a base MessagePump needed for TYPE_UI MessageLoops on
// platforms using GLib.
class BASE_EXPORT MessagePumpGlib : public MessagePump {
@@ -37,10 +24,6 @@ class BASE_EXPORT MessagePumpGlib : public MessagePump {
MessagePumpGlib();
virtual ~MessagePumpGlib();
- // Like MessagePump::Run, but events are routed through dispatcher.
- virtual void RunWithDispatcher(Delegate* delegate,
- MessagePumpDispatcher* dispatcher);
-
// Internal methods used for processing the pump callbacks. They are
// public for simplicity but should not be used directly. HandlePrepare
// is called during the prepare step of glib, and returns a timeout that
@@ -57,11 +40,9 @@ class BASE_EXPORT MessagePumpGlib : public MessagePump {
virtual void ScheduleWork() OVERRIDE;
virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE;
- protected:
- // Returns the dispatcher for the current run state (|state_->dispatcher|).
- MessagePumpDispatcher* GetDispatcher();
-
private:
+ bool ShouldQuit() const;
+
// We may make recursive calls to Run, so we save state that needs to be
// separate between them in this structure type.
struct RunState;
diff --git a/chromium/base/message_loop/message_pump_glib_unittest.cc b/chromium/base/message_loop/message_pump_glib_unittest.cc
index 033e6cde92d..aaf6b4d5d06 100644
--- a/chromium/base/message_loop/message_pump_glib_unittest.cc
+++ b/chromium/base/message_loop/message_pump_glib_unittest.cc
@@ -19,10 +19,6 @@
#include "base/threading/thread.h"
#include "testing/gtest/include/gtest/gtest.h"
-#if defined(TOOLKIT_GTK)
-#include <gtk/gtk.h>
-#endif
-
namespace base {
namespace {
@@ -406,42 +402,6 @@ TEST_F(MessagePumpGLibTest, TestDrainingGLib) {
EXPECT_EQ(3, injector()->processed_events());
}
-
-namespace {
-
-#if defined(TOOLKIT_GTK)
-void AddEventsAndDrainGtk(EventInjector* injector) {
- // Add a couple of dummy events
- injector->AddDummyEvent(0);
- injector->AddDummyEvent(0);
- // Then add an event that will quit the main loop.
- injector->AddEvent(0, MessageLoop::QuitWhenIdleClosure());
-
- // Post a couple of dummy tasks
- MessageLoop::current()->PostTask(FROM_HERE, Bind(&DoNothing));
- MessageLoop::current()->PostTask(FROM_HERE, Bind(&DoNothing));
-
- // Drain the events
- while (gtk_events_pending()) {
- gtk_main_iteration();
- }
-}
-#endif
-
-} // namespace
-
-#if defined(TOOLKIT_GTK)
-TEST_F(MessagePumpGLibTest, TestDrainingGtk) {
- // Tests that draining events using Gtk works.
- loop()->PostTask(
- FROM_HERE,
- Bind(&AddEventsAndDrainGtk, Unretained(injector())));
- loop()->Run();
-
- EXPECT_EQ(3, injector()->processed_events());
-}
-#endif
-
namespace {
// Helper class that lets us run the GLib message loop.
@@ -456,15 +416,9 @@ class GLibLoopRunner : public RefCounted<GLibLoopRunner> {
}
void RunLoop() {
-#if defined(TOOLKIT_GTK)
- while (!quit_) {
- gtk_main_iteration();
- }
-#else
while (!quit_) {
g_main_context_iteration(NULL, TRUE);
}
-#endif
}
void Quit() {
diff --git a/chromium/base/message_loop/message_pump_gtk.cc b/chromium/base/message_loop/message_pump_gtk.cc
deleted file mode 100644
index 86d2415a412..00000000000
--- a/chromium/base/message_loop/message_pump_gtk.cc
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/message_loop/message_pump_gtk.h"
-
-#include <gtk/gtk.h>
-#include <gdk/gdkx.h>
-
-#include "base/debug/trace_event.h"
-#include "base/profiler/scoped_profile.h"
-
-namespace base {
-
-namespace {
-
-const char* EventToTypeString(const GdkEvent* event) {
- switch (event->type) {
- case GDK_NOTHING: return "GDK_NOTHING";
- case GDK_DELETE: return "GDK_DELETE";
- case GDK_DESTROY: return "GDK_DESTROY";
- case GDK_EXPOSE: return "GDK_EXPOSE";
- case GDK_MOTION_NOTIFY: return "GDK_MOTION_NOTIFY";
- case GDK_BUTTON_PRESS: return "GDK_BUTTON_PRESS";
- case GDK_2BUTTON_PRESS: return "GDK_2BUTTON_PRESS";
- case GDK_3BUTTON_PRESS: return "GDK_3BUTTON_PRESS";
- case GDK_BUTTON_RELEASE: return "GDK_BUTTON_RELEASE";
- case GDK_KEY_PRESS: return "GDK_KEY_PRESS";
- case GDK_KEY_RELEASE: return "GDK_KEY_RELEASE";
- case GDK_ENTER_NOTIFY: return "GDK_ENTER_NOTIFY";
- case GDK_LEAVE_NOTIFY: return "GDK_LEAVE_NOTIFY";
- case GDK_FOCUS_CHANGE: return "GDK_FOCUS_CHANGE";
- case GDK_CONFIGURE: return "GDK_CONFIGURE";
- case GDK_MAP: return "GDK_MAP";
- case GDK_UNMAP: return "GDK_UNMAP";
- case GDK_PROPERTY_NOTIFY: return "GDK_PROPERTY_NOTIFY";
- case GDK_SELECTION_CLEAR: return "GDK_SELECTION_CLEAR";
- case GDK_SELECTION_REQUEST: return "GDK_SELECTION_REQUEST";
- case GDK_SELECTION_NOTIFY: return "GDK_SELECTION_NOTIFY";
- case GDK_PROXIMITY_IN: return "GDK_PROXIMITY_IN";
- case GDK_PROXIMITY_OUT: return "GDK_PROXIMITY_OUT";
- case GDK_DRAG_ENTER: return "GDK_DRAG_ENTER";
- case GDK_DRAG_LEAVE: return "GDK_DRAG_LEAVE";
- case GDK_DRAG_MOTION: return "GDK_DRAG_MOTION";
- case GDK_DRAG_STATUS: return "GDK_DRAG_STATUS";
- case GDK_DROP_START: return "GDK_DROP_START";
- case GDK_DROP_FINISHED: return "GDK_DROP_FINISHED";
- case GDK_CLIENT_EVENT: return "GDK_CLIENT_EVENT";
- case GDK_VISIBILITY_NOTIFY: return "GDK_VISIBILITY_NOTIFY";
- case GDK_NO_EXPOSE: return "GDK_NO_EXPOSE";
- case GDK_SCROLL: return "GDK_SCROLL";
- case GDK_WINDOW_STATE: return "GDK_WINDOW_STATE";
- case GDK_SETTING: return "GDK_SETTING";
- case GDK_OWNER_CHANGE: return "GDK_OWNER_CHANGE";
- case GDK_GRAB_BROKEN: return "GDK_GRAB_BROKEN";
- case GDK_DAMAGE: return "GDK_DAMAGE";
- default:
- return "Unknown Gdk Event";
- }
-}
-
-} // namespace
-
-MessagePumpGtk::MessagePumpGtk() : MessagePumpGlib() {
- gdk_event_handler_set(&EventDispatcher, this, NULL);
-}
-
-MessagePumpGtk::~MessagePumpGtk() {
- gdk_event_handler_set(reinterpret_cast<GdkEventFunc>(gtk_main_do_event),
- this, NULL);
-}
-
-void MessagePumpGtk::DispatchEvents(GdkEvent* event) {
- UNSHIPPED_TRACE_EVENT1("task", "MessagePumpGtk::DispatchEvents",
- "type", EventToTypeString(event));
-
- WillProcessEvent(event);
- gtk_main_do_event(event);
- DidProcessEvent(event);
-}
-
-// static
-Display* MessagePumpGtk::GetDefaultXDisplay() {
- static GdkDisplay* display = gdk_display_get_default();
- if (!display) {
- // GTK / GDK has not been initialized, which is a decision we wish to
- // support, for example for the GPU process.
- static Display* xdisplay = XOpenDisplay(NULL);
- return xdisplay;
- }
- return GDK_DISPLAY_XDISPLAY(display);
-}
-
-void MessagePumpGtk::AddObserver(MessagePumpGdkObserver* observer) {
- observers_.AddObserver(observer);
-}
-
-void MessagePumpGtk::RemoveObserver(MessagePumpGdkObserver* observer) {
- observers_.RemoveObserver(observer);
-}
-
-void MessagePumpGtk::WillProcessEvent(GdkEvent* event) {
- FOR_EACH_OBSERVER(MessagePumpGdkObserver,
- observers_,
- WillProcessEvent(event));
-}
-
-void MessagePumpGtk::DidProcessEvent(GdkEvent* event) {
- FOR_EACH_OBSERVER(MessagePumpGdkObserver,
- observers_,
- DidProcessEvent(event));
-}
-
-// static
-void MessagePumpGtk::EventDispatcher(GdkEvent* event, gpointer data) {
- MessagePumpGtk* message_pump = reinterpret_cast<MessagePumpGtk*>(data);
- message_pump->DispatchEvents(event);
-}
-
-} // namespace base
diff --git a/chromium/base/message_loop/message_pump_gtk.h b/chromium/base/message_loop/message_pump_gtk.h
deleted file mode 100644
index b3c3b8c7415..00000000000
--- a/chromium/base/message_loop/message_pump_gtk.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_GTK_H_
-#define BASE_MESSAGE_LOOP_MESSAGE_PUMP_GTK_H_
-
-#include "base/message_loop/message_pump_glib.h"
-
-typedef union _GdkEvent GdkEvent;
-typedef struct _XDisplay Display;
-
-namespace base {
-
-// The documentation for this class is in message_pump_glib.h
-class MessagePumpGdkObserver {
- public:
- // This method is called before processing a message.
- virtual void WillProcessEvent(GdkEvent* event) = 0;
-
- // This method is called after processing a message.
- virtual void DidProcessEvent(GdkEvent* event) = 0;
-
- protected:
- virtual ~MessagePumpGdkObserver() {}
-};
-
-// This class implements a message-pump for dispatching GTK events.
-class BASE_EXPORT MessagePumpGtk : public MessagePumpGlib {
- public:
- MessagePumpGtk();
- virtual ~MessagePumpGtk();
-
- // Dispatch an available GdkEvent. Essentially this allows a subclass to do
- // some task before/after calling the default handler (EventDispatcher).
- void DispatchEvents(GdkEvent* event);
-
- // Returns default X Display.
- static Display* GetDefaultXDisplay();
-
- // Adds an Observer, which will start receiving notifications immediately.
- void AddObserver(MessagePumpGdkObserver* observer);
-
- // Removes an Observer. It is safe to call this method while an Observer is
- // receiving a notification callback.
- void RemoveObserver(MessagePumpGdkObserver* observer);
-
- private:
- // Invoked from EventDispatcher. Notifies all observers we're about to
- // process an event.
- void WillProcessEvent(GdkEvent* event);
-
- // Invoked from EventDispatcher. Notifies all observers we processed an
- // event.
- void DidProcessEvent(GdkEvent* event);
-
- // Callback prior to gdk dispatching an event.
- static void EventDispatcher(GdkEvent* event, void* data);
-
- // List of observers.
- ObserverList<MessagePumpGdkObserver> observers_;
-
- DISALLOW_COPY_AND_ASSIGN(MessagePumpGtk);
-};
-
-typedef MessagePumpGtk MessagePumpForUI;
-
-} // namespace base
-
-#endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_GTK_H_
diff --git a/chromium/base/message_loop/message_pump_io_ios_unittest.cc b/chromium/base/message_loop/message_pump_io_ios_unittest.cc
index f3b598c6ba6..e6dcc33a4bf 100644
--- a/chromium/base/message_loop/message_pump_io_ios_unittest.cc
+++ b/chromium/base/message_loop/message_pump_io_ios_unittest.cc
@@ -82,7 +82,7 @@ TEST_F(MessagePumpIOSForIOTest, TestWatchingFromBadThread) {
ASSERT_DEBUG_DEATH(io_loop()->WatchFileDescriptor(
STDOUT_FILENO, false, MessageLoopForIO::WATCH_READ, &watcher, &delegate),
"Check failed: "
- "watch_file_descriptor_caller_checker_.CalledOnValidThread()");
+ "watch_file_descriptor_caller_checker_.CalledOnValidThread\\(\\)");
}
#endif // GTEST_HAS_DEATH_TEST && !defined(NDEBUG)
diff --git a/chromium/base/message_loop/message_pump_libevent.cc b/chromium/base/message_loop/message_pump_libevent.cc
index 26be687c6dd..d52025a1990 100644
--- a/chromium/base/message_loop/message_pump_libevent.cc
+++ b/chromium/base/message_loop/message_pump_libevent.cc
@@ -217,7 +217,7 @@ static void timer_callback(int fd, short events, void *context)
// Reentrant!
void MessagePumpLibevent::Run(Delegate* delegate) {
- DCHECK(keep_running_) << "Quit must have been called outside of Run!";
+ AutoReset<bool> auto_reset_keep_running(&keep_running_, true);
AutoReset<bool> auto_reset_in_run(&in_run_, true);
// event_base_loopexit() + EVLOOP_ONCE is leaky, see http://crbug.com/25641.
@@ -275,12 +275,10 @@ void MessagePumpLibevent::Run(Delegate* delegate) {
}
}
}
-
- keep_running_ = true;
}
void MessagePumpLibevent::Quit() {
- DCHECK(in_run_);
+ DCHECK(in_run_) << "Quit was called outside of Run!";
// Tell both libevent and Run that they should break out of their loops.
keep_running_ = false;
ScheduleWork();
diff --git a/chromium/base/message_loop/message_pump_libevent_unittest.cc b/chromium/base/message_loop/message_pump_libevent_unittest.cc
index bf6d21c3280..9298d687609 100644
--- a/chromium/base/message_loop/message_pump_libevent_unittest.cc
+++ b/chromium/base/message_loop/message_pump_libevent_unittest.cc
@@ -6,8 +6,10 @@
#include <unistd.h>
+#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/posix/eintr_wrapper.h"
+#include "base/run_loop.h"
#include "base/threading/thread.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/libevent/event.h"
@@ -78,7 +80,13 @@ TEST_F(MessagePumpLibeventTest, TestWatchingFromBadThread) {
ASSERT_DEATH(io_loop()->WatchFileDescriptor(
STDOUT_FILENO, false, MessageLoopForIO::WATCH_READ, &watcher, &delegate),
"Check failed: "
- "watch_file_descriptor_caller_checker_.CalledOnValidThread()");
+ "watch_file_descriptor_caller_checker_.CalledOnValidThread\\(\\)");
+}
+
+TEST_F(MessagePumpLibeventTest, QuitOutsideOfRun) {
+ scoped_ptr<MessagePumpLibevent> pump(new MessagePumpLibevent);
+ ASSERT_DEATH(pump->Quit(), "Check failed: in_run_. "
+ "Quit was called outside of Run!");
}
#endif // GTEST_HAS_DEATH_TEST && !defined(NDEBUG)
@@ -157,6 +165,41 @@ TEST_F(MessagePumpLibeventTest, StopWatcher) {
OnLibeventNotification(pump.get(), &watcher);
}
+void QuitMessageLoopAndStart(const Closure& quit_closure) {
+ quit_closure.Run();
+
+ MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
+ RunLoop runloop;
+ MessageLoop::current()->PostTask(FROM_HERE, runloop.QuitClosure());
+ runloop.Run();
+}
+
+class NestedPumpWatcher : public MessagePumpLibevent::Watcher {
+ public:
+ NestedPumpWatcher() {}
+ virtual ~NestedPumpWatcher() {}
+
+ virtual void OnFileCanReadWithoutBlocking(int /* fd */) OVERRIDE {
+ RunLoop runloop;
+ MessageLoop::current()->PostTask(FROM_HERE, Bind(&QuitMessageLoopAndStart,
+ runloop.QuitClosure()));
+ runloop.Run();
+ }
+
+ virtual void OnFileCanWriteWithoutBlocking(int /* fd */) OVERRIDE {}
+};
+
+TEST_F(MessagePumpLibeventTest, NestedPumpWatcher) {
+ scoped_ptr<MessagePumpLibevent> pump(new MessagePumpLibevent);
+ MessagePumpLibevent::FileDescriptorWatcher watcher;
+ NestedPumpWatcher delegate;
+ pump->WatchFileDescriptor(pipefds_[1],
+ false, MessagePumpLibevent::WATCH_READ, &watcher, &delegate);
+
+ // Spoof a libevent notification.
+ OnLibeventNotification(pump.get(), &watcher);
+}
+
} // namespace
} // namespace base
diff --git a/chromium/base/message_loop/message_pump_mac.h b/chromium/base/message_loop/message_pump_mac.h
index 424cb70938d..6e63d2b5516 100644
--- a/chromium/base/message_loop/message_pump_mac.h
+++ b/chromium/base/message_loop/message_pump_mac.h
@@ -37,10 +37,9 @@
#include <CoreFoundation/CoreFoundation.h>
#include "base/memory/weak_ptr.h"
+#include "base/message_loop/timer_slack.h"
-#if !defined(__OBJC__)
-class NSAutoreleasePool;
-#else // !defined(__OBJC__)
+#if defined(__OBJC__)
#if defined(OS_IOS)
#import <Foundation/Foundation.h>
#else
@@ -55,7 +54,7 @@ class NSAutoreleasePool;
- (BOOL)isHandlingSendEvent;
@end
#endif // !defined(OS_IOS)
-#endif // !defined(__OBJC__)
+#endif // defined(__OBJC__)
namespace base {
@@ -63,6 +62,22 @@ class MessagePumpInstrumentation;
class RunLoop;
class TimeTicks;
+// AutoreleasePoolType is a proxy type for autorelease pools. Its definition
+// depends on the translation unit (TU) in which this header appears. In pure
+// C++ TUs, it is defined as a forward C++ class declaration (that is never
+// defined), because autorelease pools are an Objective-C concept. In Automatic
+// Reference Counting (ARC) Objective-C TUs, it is similarly defined as a
+// forward C++ class declaration, because clang will not allow the type
+// "NSAutoreleasePool" in such TUs. Finally, in Manual Retain Release (MRR)
+// Objective-C TUs, it is a type alias for NSAutoreleasePool. In all cases, a
+// method that takes or returns an NSAutoreleasePool* can use
+// AutoreleasePoolType* instead.
+#if !defined(__OBJC__) || __has_feature(objc_arc)
+class AutoreleasePoolType;
+#else // !defined(__OBJC__) || __has_feature(objc_arc)
+typedef NSAutoreleasePool AutoreleasePoolType;
+#endif // !defined(__OBJC__) || __has_feature(objc_arc)
+
class MessagePumpCFRunLoopBase : public MessagePump {
// Needs access to CreateAutoreleasePool.
friend class MessagePumpScopedAutoreleasePool;
@@ -79,6 +94,7 @@ class MessagePumpCFRunLoopBase : public MessagePump {
virtual void ScheduleWork() OVERRIDE;
virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE;
+ virtual void SetTimerSlack(TimerSlack timer_slack) OVERRIDE;
protected:
// Accessors for private data members to be used by subclasses.
@@ -94,7 +110,7 @@ class MessagePumpCFRunLoopBase : public MessagePump {
// In some cases, CreateAutoreleasePool may return nil intentionally to
// preventing an autorelease pool from being created, allowing any
// objects autoreleased by work to fall into the current autorelease pool.
- virtual NSAutoreleasePool* CreateAutoreleasePool();
+ virtual AutoreleasePoolType* CreateAutoreleasePool();
// Enables instrumentation of the MessagePump. See MessagePumpInstrumentation
// in the implementation for details.
@@ -181,6 +197,8 @@ class MessagePumpCFRunLoopBase : public MessagePump {
// See PowerStateNotification.
CFAbsoluteTime delayed_work_fire_time_;
+ base::TimerSlack timer_slack_;
+
// The recursion depth of the currently-executing CFRunLoopRun loop on the
// run loop's thread. 0 if no run loops are running inside of whatever scope
// the object was created in.
@@ -205,7 +223,7 @@ class MessagePumpCFRunLoopBase : public MessagePump {
DISALLOW_COPY_AND_ASSIGN(MessagePumpCFRunLoopBase);
};
-class MessagePumpCFRunLoop : public MessagePumpCFRunLoopBase {
+class BASE_EXPORT MessagePumpCFRunLoop : public MessagePumpCFRunLoopBase {
public:
MessagePumpCFRunLoop();
virtual ~MessagePumpCFRunLoop();
@@ -224,9 +242,9 @@ class MessagePumpCFRunLoop : public MessagePumpCFRunLoopBase {
DISALLOW_COPY_AND_ASSIGN(MessagePumpCFRunLoop);
};
-class MessagePumpNSRunLoop : public MessagePumpCFRunLoopBase {
+class BASE_EXPORT MessagePumpNSRunLoop : public MessagePumpCFRunLoopBase {
public:
- BASE_EXPORT MessagePumpNSRunLoop();
+ MessagePumpNSRunLoop();
virtual ~MessagePumpNSRunLoop();
virtual void DoRun(Delegate* delegate) OVERRIDE;
@@ -296,14 +314,14 @@ class MessagePumpCrApplication : public MessagePumpNSApplication {
protected:
// Returns nil if NSApp is currently in the middle of calling
// -sendEvent. Requires NSApp implementing CrAppProtocol.
- virtual NSAutoreleasePool* CreateAutoreleasePool() OVERRIDE;
+ virtual AutoreleasePoolType* CreateAutoreleasePool() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(MessagePumpCrApplication);
};
#endif // !defined(OS_IOS)
-class MessagePumpMac {
+class BASE_EXPORT MessagePumpMac {
public:
// If not on the main thread, returns a new instance of
// MessagePumpNSRunLoop.
@@ -321,17 +339,21 @@ class MessagePumpMac {
// UsingCrApp() returns false if the message pump was created before
// NSApp was initialized, or if NSApp does not implement
// CrAppProtocol. NSApp must be initialized before calling.
- BASE_EXPORT static bool UsingCrApp();
+ static bool UsingCrApp();
// Wrapper to query -[NSApp isHandlingSendEvent] from C++ code.
// Requires NSApp to implement CrAppProtocol.
- BASE_EXPORT static bool IsHandlingSendEvent();
+ static bool IsHandlingSendEvent();
#endif // !defined(OS_IOS)
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePumpMac);
};
+// Tasks posted to the message loop are posted under this mode, as well
+// as kCFRunLoopCommonModes.
+extern const CFStringRef BASE_EXPORT kMessageLoopExclusiveRunLoopMode;
+
} // namespace base
#endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_MAC_H_
diff --git a/chromium/base/message_loop/message_pump_mac.mm b/chromium/base/message_loop/message_pump_mac.mm
index 9a8e95a6e19..0ab9ab7c467 100644
--- a/chromium/base/message_loop/message_pump_mac.mm
+++ b/chromium/base/message_loop/message_pump_mac.mm
@@ -4,6 +4,7 @@
#import "base/message_loop/message_pump_mac.h"
+#include <dlfcn.h>
#import <Foundation/Foundation.h>
#include <limits>
@@ -12,6 +13,7 @@
#include "base/format_macros.h"
#include "base/logging.h"
#include "base/mac/scoped_cftyperef.h"
+#include "base/message_loop/timer_slack.h"
#include "base/metrics/histogram.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
@@ -21,8 +23,44 @@
#import <AppKit/AppKit.h>
#endif // !defined(OS_IOS)
+namespace base {
+
namespace {
+void CFRunLoopAddSourceToAllModes(CFRunLoopRef rl, CFRunLoopSourceRef source) {
+ CFRunLoopAddSource(rl, source, kCFRunLoopCommonModes);
+ CFRunLoopAddSource(rl, source, kMessageLoopExclusiveRunLoopMode);
+}
+
+void CFRunLoopRemoveSourceFromAllModes(CFRunLoopRef rl,
+ CFRunLoopSourceRef source) {
+ CFRunLoopRemoveSource(rl, source, kCFRunLoopCommonModes);
+ CFRunLoopRemoveSource(rl, source, kMessageLoopExclusiveRunLoopMode);
+}
+
+void CFRunLoopAddTimerToAllModes(CFRunLoopRef rl, CFRunLoopTimerRef timer) {
+ CFRunLoopAddTimer(rl, timer, kCFRunLoopCommonModes);
+ CFRunLoopAddTimer(rl, timer, kMessageLoopExclusiveRunLoopMode);
+}
+
+void CFRunLoopRemoveTimerFromAllModes(CFRunLoopRef rl,
+ CFRunLoopTimerRef timer) {
+ CFRunLoopRemoveTimer(rl, timer, kCFRunLoopCommonModes);
+ CFRunLoopRemoveTimer(rl, timer, kMessageLoopExclusiveRunLoopMode);
+}
+
+void CFRunLoopAddObserverToAllModes(CFRunLoopRef rl,
+ CFRunLoopObserverRef observer) {
+ CFRunLoopAddObserver(rl, observer, kCFRunLoopCommonModes);
+ CFRunLoopAddObserver(rl, observer, kMessageLoopExclusiveRunLoopMode);
+}
+
+void CFRunLoopRemoveObserverFromAllModes(CFRunLoopRef rl,
+ CFRunLoopObserverRef observer) {
+ CFRunLoopRemoveObserver(rl, observer, kCFRunLoopCommonModes);
+ CFRunLoopRemoveObserver(rl, observer, kMessageLoopExclusiveRunLoopMode);
+}
+
void NoOp(void* info) {
}
@@ -35,9 +73,38 @@ const CFTimeInterval kCFTimeIntervalMax =
bool g_not_using_cr_app = false;
#endif
+// Call through to CFRunLoopTimerSetTolerance(), which is only available on
+// OS X 10.9.
+void SetTimerTolerance(CFRunLoopTimerRef timer, CFTimeInterval tolerance) {
+ typedef void (*CFRunLoopTimerSetTolerancePtr)(CFRunLoopTimerRef timer,
+ CFTimeInterval tolerance);
+
+ static CFRunLoopTimerSetTolerancePtr settimertolerance_function_ptr;
+
+ static dispatch_once_t get_timer_tolerance_function_ptr_once;
+ dispatch_once(&get_timer_tolerance_function_ptr_once, ^{
+ NSBundle* bundle =[NSBundle
+ bundleWithPath:@"/System/Library/Frameworks/CoreFoundation.framework"];
+ const char* path = [[bundle executablePath] fileSystemRepresentation];
+ CHECK(path);
+ void* library_handle = dlopen(path, RTLD_LAZY | RTLD_LOCAL);
+ CHECK(library_handle) << dlerror();
+ settimertolerance_function_ptr =
+ reinterpret_cast<CFRunLoopTimerSetTolerancePtr>(
+ dlsym(library_handle, "CFRunLoopTimerSetTolerance"));
+
+ dlclose(library_handle);
+ });
+
+ if (settimertolerance_function_ptr)
+ settimertolerance_function_ptr(timer, tolerance);
+}
+
} // namespace
-namespace base {
+// static
+const CFStringRef kMessageLoopExclusiveRunLoopMode =
+ CFSTR("kMessageLoopExclusiveRunLoopMode");
// A scoper for autorelease pools created from message pump run loops.
// Avoids dirtying up the ScopedNSAutoreleasePool interface for the rare
@@ -95,9 +162,7 @@ class MessagePumpInstrumentation {
0, // order
&MessagePumpInstrumentation::TimerFired,
&timer_context));
- CFRunLoopAddTimer(CFRunLoopGetCurrent(),
- timer_,
- kCFRunLoopCommonModes);
+ CFRunLoopAddTimerToAllModes(CFRunLoopGetCurrent(), timer_);
}
// Used to track kCFRunLoopEntry.
@@ -282,6 +347,7 @@ class MessagePumpInstrumentation {
MessagePumpCFRunLoopBase::MessagePumpCFRunLoopBase()
: delegate_(NULL),
delayed_work_fire_time_(kCFTimeIntervalMax),
+ timer_slack_(base::TIMER_SLACK_NONE),
nesting_level_(0),
run_nesting_level_(0),
deepest_nesting_level_(0),
@@ -302,7 +368,7 @@ MessagePumpCFRunLoopBase::MessagePumpCFRunLoopBase()
0, // priority
RunDelayedWorkTimer,
&timer_context);
- CFRunLoopAddTimer(run_loop_, delayed_work_timer_, kCFRunLoopCommonModes);
+ CFRunLoopAddTimerToAllModes(run_loop_, delayed_work_timer_);
CFRunLoopSourceContext source_context = CFRunLoopSourceContext();
source_context.info = this;
@@ -310,20 +376,19 @@ MessagePumpCFRunLoopBase::MessagePumpCFRunLoopBase()
work_source_ = CFRunLoopSourceCreate(NULL, // allocator
1, // priority
&source_context);
- CFRunLoopAddSource(run_loop_, work_source_, kCFRunLoopCommonModes);
+ CFRunLoopAddSourceToAllModes(run_loop_, work_source_);
source_context.perform = RunIdleWorkSource;
idle_work_source_ = CFRunLoopSourceCreate(NULL, // allocator
2, // priority
&source_context);
- CFRunLoopAddSource(run_loop_, idle_work_source_, kCFRunLoopCommonModes);
+ CFRunLoopAddSourceToAllModes(run_loop_, idle_work_source_);
source_context.perform = RunNestingDeferredWorkSource;
nesting_deferred_work_source_ = CFRunLoopSourceCreate(NULL, // allocator
0, // priority
&source_context);
- CFRunLoopAddSource(run_loop_, nesting_deferred_work_source_,
- kCFRunLoopCommonModes);
+ CFRunLoopAddSourceToAllModes(run_loop_, nesting_deferred_work_source_);
CFRunLoopObserverContext observer_context = CFRunLoopObserverContext();
observer_context.info = this;
@@ -334,7 +399,7 @@ MessagePumpCFRunLoopBase::MessagePumpCFRunLoopBase()
0, // priority
StartOrEndWaitObserver,
&observer_context);
- CFRunLoopAddObserver(run_loop_, pre_wait_observer_, kCFRunLoopCommonModes);
+ CFRunLoopAddObserverToAllModes(run_loop_, pre_wait_observer_);
pre_source_observer_ = CFRunLoopObserverCreate(NULL, // allocator
kCFRunLoopBeforeSources,
@@ -342,7 +407,7 @@ MessagePumpCFRunLoopBase::MessagePumpCFRunLoopBase()
0, // priority
PreSourceObserver,
&observer_context);
- CFRunLoopAddObserver(run_loop_, pre_source_observer_, kCFRunLoopCommonModes);
+ CFRunLoopAddObserverToAllModes(run_loop_, pre_source_observer_);
enter_exit_observer_ = CFRunLoopObserverCreate(NULL, // allocator
kCFRunLoopEntry |
@@ -351,36 +416,32 @@ MessagePumpCFRunLoopBase::MessagePumpCFRunLoopBase()
0, // priority
EnterExitObserver,
&observer_context);
- CFRunLoopAddObserver(run_loop_, enter_exit_observer_, kCFRunLoopCommonModes);
+ CFRunLoopAddObserverToAllModes(run_loop_, enter_exit_observer_);
}
// Ideally called on the run loop thread. If other run loops were running
// lower on the run loop thread's stack when this object was created, the
// same number of run loops must be running when this object is destroyed.
MessagePumpCFRunLoopBase::~MessagePumpCFRunLoopBase() {
- CFRunLoopRemoveObserver(run_loop_, enter_exit_observer_,
- kCFRunLoopCommonModes);
+ CFRunLoopRemoveObserverFromAllModes(run_loop_, enter_exit_observer_);
CFRelease(enter_exit_observer_);
- CFRunLoopRemoveObserver(run_loop_, pre_source_observer_,
- kCFRunLoopCommonModes);
+ CFRunLoopRemoveObserverFromAllModes(run_loop_, pre_source_observer_);
CFRelease(pre_source_observer_);
- CFRunLoopRemoveObserver(run_loop_, pre_wait_observer_,
- kCFRunLoopCommonModes);
+ CFRunLoopRemoveObserverFromAllModes(run_loop_, pre_wait_observer_);
CFRelease(pre_wait_observer_);
- CFRunLoopRemoveSource(run_loop_, nesting_deferred_work_source_,
- kCFRunLoopCommonModes);
+ CFRunLoopRemoveSourceFromAllModes(run_loop_, nesting_deferred_work_source_);
CFRelease(nesting_deferred_work_source_);
- CFRunLoopRemoveSource(run_loop_, idle_work_source_, kCFRunLoopCommonModes);
+ CFRunLoopRemoveSourceFromAllModes(run_loop_, idle_work_source_);
CFRelease(idle_work_source_);
- CFRunLoopRemoveSource(run_loop_, work_source_, kCFRunLoopCommonModes);
+ CFRunLoopRemoveSourceFromAllModes(run_loop_, work_source_);
CFRelease(work_source_);
- CFRunLoopRemoveTimer(run_loop_, delayed_work_timer_, kCFRunLoopCommonModes);
+ CFRunLoopRemoveTimerFromAllModes(run_loop_, delayed_work_timer_);
CFRelease(delayed_work_timer_);
CFRelease(run_loop_);
@@ -438,6 +499,15 @@ void MessagePumpCFRunLoopBase::ScheduleDelayedWork(
TimeDelta delta = delayed_work_time - TimeTicks::Now();
delayed_work_fire_time_ = CFAbsoluteTimeGetCurrent() + delta.InSecondsF();
CFRunLoopTimerSetNextFireDate(delayed_work_timer_, delayed_work_fire_time_);
+ if (timer_slack_ == TIMER_SLACK_MAXIMUM) {
+ SetTimerTolerance(delayed_work_timer_, delta.InSecondsF() * 0.5);
+ } else {
+ SetTimerTolerance(delayed_work_timer_, 0);
+ }
+}
+
+void MessagePumpCFRunLoopBase::SetTimerSlack(TimerSlack timer_slack) {
+ timer_slack_ = timer_slack;
}
// Called from the run loop.
@@ -697,7 +767,7 @@ void MessagePumpCFRunLoopBase::EnterExitRunLoop(CFRunLoopActivity activity) {
}
// Base version returns a standard NSAutoreleasePool.
-NSAutoreleasePool* MessagePumpCFRunLoopBase::CreateAutoreleasePool() {
+AutoreleasePoolType* MessagePumpCFRunLoopBase::CreateAutoreleasePool() {
return [[NSAutoreleasePool alloc] init];
}
@@ -760,11 +830,11 @@ MessagePumpNSRunLoop::MessagePumpNSRunLoop()
quit_source_ = CFRunLoopSourceCreate(NULL, // allocator
0, // priority
&source_context);
- CFRunLoopAddSource(run_loop(), quit_source_, kCFRunLoopCommonModes);
+ CFRunLoopAddSourceToAllModes(run_loop(), quit_source_);
}
MessagePumpNSRunLoop::~MessagePumpNSRunLoop() {
- CFRunLoopRemoveSource(run_loop(), quit_source_, kCFRunLoopCommonModes);
+ CFRunLoopRemoveSourceFromAllModes(run_loop(), quit_source_);
CFRelease(quit_source_);
}
@@ -909,7 +979,7 @@ MessagePumpCrApplication::~MessagePumpCrApplication() {
// CrApplication is responsible for setting handlingSendEvent to true just
// before it sends the event through the event handling mechanism, and
// returning it to its previous value once the event has been sent.
-NSAutoreleasePool* MessagePumpCrApplication::CreateAutoreleasePool() {
+AutoreleasePoolType* MessagePumpCrApplication::CreateAutoreleasePool() {
if (MessagePumpMac::IsHandlingSendEvent())
return nil;
return MessagePumpNSApplication::CreateAutoreleasePool();
diff --git a/chromium/base/message_loop/message_pump_observer.h b/chromium/base/message_loop/message_pump_observer.h
index 333a75f1cbb..d6e7abf786a 100644
--- a/chromium/base/message_loop/message_pump_observer.h
+++ b/chromium/base/message_loop/message_pump_observer.h
@@ -8,34 +8,22 @@
#include "base/base_export.h"
#include "base/event_types.h"
-namespace base {
-
-enum EventStatus {
- EVENT_CONTINUE, // The event should be dispatched as normal.
-#if defined(USE_X11)
- EVENT_HANDLED // The event should not be processed any farther.
+#if !defined(OS_WIN)
+#error Should not be here.
#endif
-};
+
+namespace base {
// A MessagePumpObserver is an object that receives global
-// notifications from the UI MessageLoop with MessagePumpWin or
-// MessagePumpX11.
+// notifications from the UI MessageLoop with MessagePumpWin.
//
// NOTE: An Observer implementation should be extremely fast!
-//
-// For use with MessagePumpX11, please see message_pump_glib.h for more
-// info about how this is invoked in this environment.
class BASE_EXPORT MessagePumpObserver {
public:
- // This method is called before processing a NativeEvent. If the
- // method returns EVENT_HANDLED, it indicates the event has already
- // been handled, so the event is not processed any farther. If the
- // method returns EVENT_CONTINUE, the event dispatching proceeds as
- // normal.
- virtual EventStatus WillProcessEvent(const NativeEvent& event) = 0;
-
- // This method is called after processing a message. This method
- // will not be called if WillProcessEvent returns EVENT_HANDLED.
+ // This method is called before processing a NativeEvent.
+ virtual void WillProcessEvent(const NativeEvent& event) = 0;
+
+ // This method is called after processing a message.
virtual void DidProcessEvent(const NativeEvent& event) = 0;
protected:
diff --git a/chromium/base/message_loop/message_pump_ozone.cc b/chromium/base/message_loop/message_pump_ozone.cc
deleted file mode 100644
index f7bff6d3ace..00000000000
--- a/chromium/base/message_loop/message_pump_ozone.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/message_loop/message_pump_ozone.h"
-
-#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
-
-namespace base {
-
-MessagePumpOzone::MessagePumpOzone()
- : MessagePumpLibevent() {
-}
-
-MessagePumpOzone::~MessagePumpOzone() {
-}
-
-void MessagePumpOzone::AddObserver(MessagePumpObserver* /* observer */) {
- NOTIMPLEMENTED();
-}
-
-void MessagePumpOzone::RemoveObserver(MessagePumpObserver* /* observer */) {
- NOTIMPLEMENTED();
-}
-
-// static
-MessagePumpOzone* MessagePumpOzone::Current() {
- MessageLoopForUI* loop = MessageLoopForUI::current();
- return static_cast<MessagePumpOzone*>(loop->pump_ui());
-}
-
-void MessagePumpOzone::AddDispatcherForRootWindow(
- MessagePumpDispatcher* dispatcher) {
- // Only one root window is supported.
- DCHECK(dispatcher_.size() == 0);
- dispatcher_.insert(dispatcher_.begin(),dispatcher);
-}
-
-void MessagePumpOzone::RemoveDispatcherForRootWindow(
- MessagePumpDispatcher* dispatcher) {
- DCHECK(dispatcher_.size() == 1);
- dispatcher_.pop_back();
-}
-
-bool MessagePumpOzone::Dispatch(const NativeEvent& dev) {
- if (dispatcher_.size() > 0)
- return dispatcher_[0]->Dispatch(dev);
- else
- return true;
-}
-
-// This code assumes that the caller tracks the lifetime of the |dispatcher|.
-void MessagePumpOzone::RunWithDispatcher(
- Delegate* delegate, MessagePumpDispatcher* dispatcher) {
- dispatcher_.push_back(dispatcher);
- Run(delegate);
- dispatcher_.pop_back();
-}
-
-} // namespace base
diff --git a/chromium/base/message_loop/message_pump_ozone.h b/chromium/base/message_loop/message_pump_ozone.h
deleted file mode 100644
index edcdf2e3a85..00000000000
--- a/chromium/base/message_loop/message_pump_ozone.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_OZONE_H_
-#define BASE_MESSAGE_LOOP_MESSAGE_PUMP_OZONE_H_
-
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/scoped_vector.h"
-#include "base/message_loop/message_pump_dispatcher.h"
-#include "base/message_loop/message_pump_libevent.h"
-#include "base/message_loop/message_pump_observer.h"
-#include "base/observer_list.h"
-
-namespace base {
-
-// This class implements a message-pump for processing events from input devices
-// Refer to MessagePump for further documentation.
-class BASE_EXPORT MessagePumpOzone : public MessagePumpLibevent,
- public MessagePumpDispatcher {
- public:
- MessagePumpOzone();
- virtual ~MessagePumpOzone();
-
- // Returns the UI message pump.
- static MessagePumpOzone* Current();
-
- // Add/Remove the root window dispatcher.
- void AddDispatcherForRootWindow(MessagePumpDispatcher* dispatcher);
- void RemoveDispatcherForRootWindow(MessagePumpDispatcher* dispatcher);
-
- void RunWithDispatcher(Delegate* delegate, MessagePumpDispatcher* dispatcher);
-
- // Add / remove an Observer, which will start receiving notifications
- // immediately.
- void AddObserver(MessagePumpObserver* observer);
- void RemoveObserver(MessagePumpObserver* observer);
-
- // Overridden from MessagePumpDispatcher.
- virtual bool Dispatch(const NativeEvent& event) OVERRIDE;
-
- private:
- std::vector<MessagePumpDispatcher*> dispatcher_;
-
- DISALLOW_COPY_AND_ASSIGN(MessagePumpOzone);
-};
-
-typedef MessagePumpOzone MessagePumpForUI;
-
-} // namespace base
-
-#endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_OZONE_H_
diff --git a/chromium/base/message_loop/message_pump_win.cc b/chromium/base/message_loop/message_pump_win.cc
index 1927473b1eb..ae022bf0957 100644
--- a/chromium/base/message_loop/message_pump_win.cc
+++ b/chromium/base/message_loop/message_pump_win.cc
@@ -97,8 +97,7 @@ int MessagePumpWin::GetCurrentDelay() const {
// MessagePumpForUI public:
MessagePumpForUI::MessagePumpForUI()
- : atom_(0),
- message_filter_(new MessageFilter) {
+ : atom_(0) {
InitMessageWnd();
}
@@ -346,7 +345,7 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() {
sent_messages_in_queue = true;
MSG msg;
- if (message_filter_->DoPeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
+ if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) != FALSE)
return ProcessMessageHelper(msg);
return sent_messages_in_queue;
@@ -372,14 +371,14 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) {
WillProcessMessage(msg);
- if (!message_filter_->ProcessMessage(msg)) {
- if (state_->dispatcher) {
- if (!state_->dispatcher->Dispatch(msg))
- state_->should_quit = true;
- } else {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
+ uint32_t action = MessagePumpDispatcher::POST_DISPATCH_PERFORM_DEFAULT;
+ if (state_->dispatcher)
+ action = state_->dispatcher->Dispatch(msg);
+ if (action & MessagePumpDispatcher::POST_DISPATCH_QUIT_LOOP)
+ state_->should_quit = true;
+ if (action & MessagePumpDispatcher::POST_DISPATCH_PERFORM_DEFAULT) {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
}
DidProcessMessage(msg);
@@ -406,8 +405,7 @@ bool MessagePumpForUI::ProcessPumpReplacementMessage() {
have_message = PeekMessage(&msg, NULL, WM_PAINT, WM_PAINT, PM_REMOVE) ||
PeekMessage(&msg, NULL, WM_TIMER, WM_TIMER, PM_REMOVE);
} else {
- have_message = !!message_filter_->DoPeekMessage(&msg, NULL, 0, 0,
- PM_REMOVE);
+ have_message = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) != FALSE;
}
DCHECK(!have_message || kMsgHaveWork != msg.message ||
@@ -429,11 +427,6 @@ bool MessagePumpForUI::ProcessPumpReplacementMessage() {
return ProcessMessageHelper(msg);
}
-void MessagePumpForUI::SetMessageFilter(
- scoped_ptr<MessageFilter> message_filter) {
- message_filter_ = message_filter.Pass();
-}
-
//-----------------------------------------------------------------------------
// MessagePumpForIO public:
diff --git a/chromium/base/message_loop/message_pump_win.h b/chromium/base/message_loop/message_pump_win.h
index 9184058a6c0..535a21320e0 100644
--- a/chromium/base/message_loop/message_pump_win.h
+++ b/chromium/base/message_loop/message_pump_win.h
@@ -11,7 +11,6 @@
#include "base/base_export.h"
#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_pump.h"
#include "base/message_loop/message_pump_dispatcher.h"
#include "base/message_loop/message_pump_observer.h"
@@ -127,44 +126,12 @@ class BASE_EXPORT MessagePumpWin : public MessagePump {
//
class BASE_EXPORT MessagePumpForUI : public MessagePumpWin {
public:
- // A MessageFilter implements the common Peek/Translate/Dispatch code to deal
- // with windows messages.
- // This abstraction is used to inject TSF message peeking. See
- // TextServicesMessageFilter.
- class BASE_EXPORT MessageFilter {
- public:
- virtual ~MessageFilter() {}
- // Implements the functionality exposed by the OS through PeekMessage.
- virtual BOOL DoPeekMessage(MSG* msg,
- HWND window_handle,
- UINT msg_filter_min,
- UINT msg_filter_max,
- UINT remove_msg) {
- return PeekMessage(msg, window_handle, msg_filter_min, msg_filter_max,
- remove_msg);
- }
- // Returns true if |message| was consumed by the filter and no extra
- // processing is required. If this method returns false, it is the
- // responsibility of the caller to ensure that normal processing takes
- // place.
- // The priority to consume messages is the following:
- // - Native Windows' message filter (CallMsgFilter).
- // - MessageFilter::ProcessMessage.
- // - MessagePumpDispatcher.
- // - TranslateMessage / DispatchMessage.
- virtual bool ProcessMessage(const MSG& msg) { return false;}
- };
// The application-defined code passed to the hook procedure.
static const int kMessageFilterCode = 0x5001;
MessagePumpForUI();
virtual ~MessagePumpForUI();
- // Sets a new MessageFilter. MessagePumpForUI takes ownership of
- // |message_filter|. When SetMessageFilter is called, old MessageFilter is
- // deleted.
- void SetMessageFilter(scoped_ptr<MessageFilter> message_filter);
-
// MessagePump methods:
virtual void ScheduleWork();
virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time);
@@ -188,8 +155,6 @@ class BASE_EXPORT MessagePumpForUI : public MessagePumpWin {
// A hidden message-only window.
HWND message_hwnd_;
-
- scoped_ptr<MessageFilter> message_filter_;
};
//-----------------------------------------------------------------------------
diff --git a/chromium/base/message_loop/message_pump_x11.cc b/chromium/base/message_loop/message_pump_x11.cc
deleted file mode 100644
index 35dcc040348..00000000000
--- a/chromium/base/message_loop/message_pump_x11.cc
+++ /dev/null
@@ -1,313 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/message_loop/message_pump_x11.h"
-
-#include <glib.h>
-#include <X11/X.h>
-#include <X11/extensions/XInput2.h>
-#include <X11/XKBlib.h>
-
-#include "base/basictypes.h"
-#include "base/message_loop/message_loop.h"
-
-namespace base {
-
-namespace {
-
-gboolean XSourcePrepare(GSource* source, gint* timeout_ms) {
- if (XPending(MessagePumpX11::GetDefaultXDisplay()))
- *timeout_ms = 0;
- else
- *timeout_ms = -1;
- return FALSE;
-}
-
-gboolean XSourceCheck(GSource* source) {
- return XPending(MessagePumpX11::GetDefaultXDisplay());
-}
-
-gboolean XSourceDispatch(GSource* source,
- GSourceFunc unused_func,
- gpointer data) {
- MessagePumpX11* pump = static_cast<MessagePumpX11*>(data);
- return pump->DispatchXEvents();
-}
-
-GSourceFuncs XSourceFuncs = {
- XSourcePrepare,
- XSourceCheck,
- XSourceDispatch,
- NULL
-};
-
-// The connection is essentially a global that's accessed through a static
-// method and destroyed whenever ~MessagePumpX11() is called. We do this
-// for historical reasons so user code can call
-// MessagePumpForUI::GetDefaultXDisplay() where MessagePumpForUI is a typedef
-// to whatever type in the current build.
-//
-// TODO(erg): This can be changed to something more sane like
-// MessagePumpX11::Current()->display() once MessagePumpGtk goes away.
-Display* g_xdisplay = NULL;
-int g_xinput_opcode = -1;
-
-bool InitializeXInput2() {
- Display* display = MessagePumpX11::GetDefaultXDisplay();
- if (!display)
- return false;
-
- int event, err;
-
- int xiopcode;
- if (!XQueryExtension(display, "XInputExtension", &xiopcode, &event, &err)) {
- DVLOG(1) << "X Input extension not available.";
- return false;
- }
- g_xinput_opcode = xiopcode;
-
-#if defined(USE_XI2_MT)
- // USE_XI2_MT also defines the required XI2 minor minimum version.
- int major = 2, minor = USE_XI2_MT;
-#else
- int major = 2, minor = 0;
-#endif
- if (XIQueryVersion(display, &major, &minor) == BadRequest) {
- DVLOG(1) << "XInput2 not supported in the server.";
- return false;
- }
-#if defined(USE_XI2_MT)
- if (major < 2 || (major == 2 && minor < USE_XI2_MT)) {
- DVLOG(1) << "XI version on server is " << major << "." << minor << ". "
- << "But 2." << USE_XI2_MT << " is required.";
- return false;
- }
-#endif
-
- return true;
-}
-
-Window FindEventTarget(const NativeEvent& xev) {
- Window target = xev->xany.window;
- if (xev->type == GenericEvent &&
- static_cast<XIEvent*>(xev->xcookie.data)->extension == g_xinput_opcode) {
- target = static_cast<XIDeviceEvent*>(xev->xcookie.data)->event;
- }
- return target;
-}
-
-bool InitializeXkb() {
- Display* display = MessagePumpX11::GetDefaultXDisplay();
- if (!display)
- return false;
-
- int opcode, event, error;
- int major = XkbMajorVersion;
- int minor = XkbMinorVersion;
- if (!XkbQueryExtension(display, &opcode, &event, &error, &major, &minor)) {
- DVLOG(1) << "Xkb extension not available.";
- return false;
- }
-
- // Ask the server not to send KeyRelease event when the user holds down a key.
- // crbug.com/138092
- Bool supported_return;
- if (!XkbSetDetectableAutoRepeat(display, True, &supported_return)) {
- DVLOG(1) << "XKB not supported in the server.";
- return false;
- }
-
- return true;
-}
-
-} // namespace
-
-MessagePumpX11::MessagePumpX11() : MessagePumpGlib(),
- x_source_(NULL) {
- InitializeXInput2();
- InitializeXkb();
- InitXSource();
-
- // Can't put this in the initializer list because g_xdisplay may not exist
- // until after InitXSource().
- x_root_window_ = DefaultRootWindow(g_xdisplay);
-}
-
-MessagePumpX11::~MessagePumpX11() {
- g_source_destroy(x_source_);
- g_source_unref(x_source_);
- XCloseDisplay(g_xdisplay);
- g_xdisplay = NULL;
-}
-
-// static
-Display* MessagePumpX11::GetDefaultXDisplay() {
- if (!g_xdisplay)
- g_xdisplay = XOpenDisplay(NULL);
- return g_xdisplay;
-}
-
-#if defined(TOOLKIT_GTK)
-// static
-MessagePumpX11* MessagePumpX11::Current() {
- MessageLoop* loop = MessageLoop::current();
- return static_cast<MessagePumpX11*>(loop->pump_gpu());
-}
-#else
-// static
-MessagePumpX11* MessagePumpX11::Current() {
- MessageLoopForUI* loop = MessageLoopForUI::current();
- return static_cast<MessagePumpX11*>(loop->pump_ui());
-}
-#endif
-
-void MessagePumpX11::AddDispatcherForWindow(
- MessagePumpDispatcher* dispatcher,
- unsigned long xid) {
- dispatchers_.insert(std::make_pair(xid, dispatcher));
-}
-
-void MessagePumpX11::RemoveDispatcherForWindow(unsigned long xid) {
- dispatchers_.erase(xid);
-}
-
-void MessagePumpX11::AddDispatcherForRootWindow(
- MessagePumpDispatcher* dispatcher) {
- root_window_dispatchers_.AddObserver(dispatcher);
-}
-
-void MessagePumpX11::RemoveDispatcherForRootWindow(
- MessagePumpDispatcher* dispatcher) {
- root_window_dispatchers_.RemoveObserver(dispatcher);
-}
-
-void MessagePumpX11::AddObserver(MessagePumpObserver* observer) {
- observers_.AddObserver(observer);
-}
-
-void MessagePumpX11::RemoveObserver(MessagePumpObserver* observer) {
- observers_.RemoveObserver(observer);
-}
-
-bool MessagePumpX11::DispatchXEvents() {
- Display* display = GetDefaultXDisplay();
- DCHECK(display);
- MessagePumpDispatcher* dispatcher =
- GetDispatcher() ? GetDispatcher() : this;
-
- // In the general case, we want to handle all pending events before running
- // the tasks. This is what happens in the message_pump_glib case.
- while (XPending(display)) {
- XEvent xev;
- XNextEvent(display, &xev);
- if (dispatcher && ProcessXEvent(dispatcher, &xev))
- return TRUE;
- }
- return TRUE;
-}
-
-void MessagePumpX11::BlockUntilWindowMapped(unsigned long xid) {
- XEvent event;
-
- Display* display = GetDefaultXDisplay();
- DCHECK(display);
-
- MessagePumpDispatcher* dispatcher =
- GetDispatcher() ? GetDispatcher() : this;
-
- do {
- // Block until there's a message of |event_mask| type on |w|. Then remove
- // it from the queue and stuff it in |event|.
- XWindowEvent(display, xid, StructureNotifyMask, &event);
- ProcessXEvent(dispatcher, &event);
- } while (event.type != MapNotify);
-}
-
-void MessagePumpX11::InitXSource() {
- // CHECKs are to help track down crbug.com/113106.
- CHECK(!x_source_);
- Display* display = GetDefaultXDisplay();
- CHECK(display) << "Unable to get connection to X server";
- x_poll_.reset(new GPollFD());
- CHECK(x_poll_.get());
- x_poll_->fd = ConnectionNumber(display);
- x_poll_->events = G_IO_IN;
-
- x_source_ = g_source_new(&XSourceFuncs, sizeof(GSource));
- g_source_add_poll(x_source_, x_poll_.get());
- g_source_set_can_recurse(x_source_, TRUE);
- g_source_set_callback(x_source_, NULL, this, NULL);
- g_source_attach(x_source_, g_main_context_default());
-}
-
-bool MessagePumpX11::ProcessXEvent(MessagePumpDispatcher* dispatcher,
- XEvent* xev) {
- bool should_quit = false;
-
- bool have_cookie = false;
- if (xev->type == GenericEvent &&
- XGetEventData(xev->xgeneric.display, &xev->xcookie)) {
- have_cookie = true;
- }
-
- if (!WillProcessXEvent(xev)) {
- if (!dispatcher->Dispatch(xev)) {
- should_quit = true;
- Quit();
- }
- DidProcessXEvent(xev);
- }
-
- if (have_cookie) {
- XFreeEventData(xev->xgeneric.display, &xev->xcookie);
- }
-
- return should_quit;
-}
-
-bool MessagePumpX11::WillProcessXEvent(XEvent* xevent) {
- if (!observers().might_have_observers())
- return false;
- ObserverListBase<MessagePumpObserver>::Iterator it(observers());
- MessagePumpObserver* obs;
- while ((obs = it.GetNext()) != NULL) {
- if (obs->WillProcessEvent(xevent))
- return true;
- }
- return false;
-}
-
-void MessagePumpX11::DidProcessXEvent(XEvent* xevent) {
- FOR_EACH_OBSERVER(MessagePumpObserver, observers(), DidProcessEvent(xevent));
-}
-
-MessagePumpDispatcher* MessagePumpX11::GetDispatcherForXEvent(
- const NativeEvent& xev) const {
- ::Window x_window = FindEventTarget(xev);
- DispatchersMap::const_iterator it = dispatchers_.find(x_window);
- return it != dispatchers_.end() ? it->second : NULL;
-}
-
-bool MessagePumpX11::Dispatch(const NativeEvent& xev) {
- // MappingNotify events (meaning that the keyboard or pointer buttons have
- // been remapped) aren't associated with a window; send them to all
- // dispatchers.
- if (xev->type == MappingNotify) {
- for (DispatchersMap::const_iterator it = dispatchers_.begin();
- it != dispatchers_.end(); ++it) {
- it->second->Dispatch(xev);
- }
- return true;
- }
-
- if (FindEventTarget(xev) == x_root_window_) {
- FOR_EACH_OBSERVER(MessagePumpDispatcher, root_window_dispatchers_,
- Dispatch(xev));
- return true;
- }
- MessagePumpDispatcher* dispatcher = GetDispatcherForXEvent(xev);
- return dispatcher ? dispatcher->Dispatch(xev) : true;
-}
-
-} // namespace base
diff --git a/chromium/base/message_loop/message_pump_x11.h b/chromium/base/message_loop/message_pump_x11.h
deleted file mode 100644
index 015c230a700..00000000000
--- a/chromium/base/message_loop/message_pump_x11.h
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_X11_H
-#define BASE_MESSAGE_LOOP_MESSAGE_PUMP_X11_H
-
-#include <bitset>
-#include <map>
-
-#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_pump.h"
-#include "base/message_loop/message_pump_dispatcher.h"
-#include "base/message_loop/message_pump_glib.h"
-#include "base/message_loop/message_pump_observer.h"
-#include "base/observer_list.h"
-
-// It would be nice to include the X11 headers here so that we use Window
-// instead of its typedef of unsigned long, but we can't because everything in
-// chrome includes us through base/message_loop/message_loop.h, and X11's crappy
-// #define heavy headers muck up half of chrome.
-
-typedef struct _GPollFD GPollFD;
-typedef struct _GSource GSource;
-typedef struct _XDisplay Display;
-
-namespace base {
-
-// This class implements a message-pump for dispatching X events.
-//
-// If there's a current dispatcher given through RunWithDispatcher(), that
-// dispatcher receives events. Otherwise, we route to messages to dispatchers
-// who have subscribed to messages from a specific X11 window.
-class BASE_EXPORT MessagePumpX11 : public MessagePumpGlib,
- public MessagePumpDispatcher {
- public:
- MessagePumpX11();
- virtual ~MessagePumpX11();
-
- // Returns default X Display.
- static Display* GetDefaultXDisplay();
-
- // Returns the UI or GPU message pump.
- static MessagePumpX11* Current();
-
- // Adds/Removes |dispatcher| for the |xid|. This will route all messages from
- // the window |xid| to |dispatcher.
- void AddDispatcherForWindow(MessagePumpDispatcher* dispatcher,
- unsigned long xid);
- void RemoveDispatcherForWindow(unsigned long xid);
-
- // Adds/Removes |dispatcher| to receive all events sent to the X root
- // window. A root window can have multiple dispatchers, and events on root
- // windows will be dispatched to all.
- void AddDispatcherForRootWindow(MessagePumpDispatcher* dispatcher);
- void RemoveDispatcherForRootWindow(MessagePumpDispatcher* dispatcher);
-
- // Adds an Observer, which will start receiving notifications immediately.
- void AddObserver(MessagePumpObserver* observer);
-
- // Removes an Observer. It is safe to call this method while an Observer is
- // receiving a notification callback.
- void RemoveObserver(MessagePumpObserver* observer);
-
- // Internal function. Called by the glib source dispatch function. Processes
- // all available X events.
- bool DispatchXEvents();
-
- // Blocks on the X11 event queue until we receive notification from the
- // xserver that |w| has been mapped; StructureNotifyMask events on |w| are
- // pulled out from the queue and dispatched out of order.
- //
- // For those that know X11, this is really a wrapper around XWindowEvent
- // which still makes sure the preempted event is dispatched instead of
- // dropped on the floor. This method exists because mapping a window is
- // asynchronous (and we receive an XEvent when mapped), while there are also
- // functions which require a mapped window.
- void BlockUntilWindowMapped(unsigned long xid);
-
- private:
- typedef std::map<unsigned long, MessagePumpDispatcher*> DispatchersMap;
-
- // Initializes the glib event source for X.
- void InitXSource();
-
- // Dispatches the XEvent and returns true if we should exit the current loop
- // of message processing.
- bool ProcessXEvent(MessagePumpDispatcher* dispatcher, XEvent* event);
-
- // Sends the event to the observers. If an observer returns true, then it does
- // not send the event to any other observers and returns true. Returns false
- // if no observer returns true.
- bool WillProcessXEvent(XEvent* xevent);
- void DidProcessXEvent(XEvent* xevent);
-
- // Returns the Dispatcher based on the event's target window.
- MessagePumpDispatcher* GetDispatcherForXEvent(const NativeEvent& xev) const;
-
- ObserverList<MessagePumpObserver>& observers() { return observers_; }
-
- // Overridden from MessagePumpDispatcher:
- virtual bool Dispatch(const NativeEvent& event) OVERRIDE;
-
- // The event source for X events.
- GSource* x_source_;
-
- // The poll attached to |x_source_|.
- scoped_ptr<GPollFD> x_poll_;
-
- DispatchersMap dispatchers_;
-
- // Dispatch calls can cause addition of new dispatchers as we iterate
- // through them. Use ObserverList to ensure the iterator remains valid across
- // additions.
- ObserverList<MessagePumpDispatcher> root_window_dispatchers_;
-
- // List of observers.
- ObserverList<MessagePumpObserver> observers_;
-
- unsigned long x_root_window_;
-
- DISALLOW_COPY_AND_ASSIGN(MessagePumpX11);
-};
-
-#if !defined(TOOLKIT_GTK)
-typedef MessagePumpX11 MessagePumpForUI;
-#endif
-
-} // namespace base
-
-#endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_X11_H
diff --git a/chromium/base/message_loop/timer_slack.h b/chromium/base/message_loop/timer_slack.h
new file mode 100644
index 00000000000..1ad6ca94a1b
--- /dev/null
+++ b/chromium/base/message_loop/timer_slack.h
@@ -0,0 +1,22 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_MESSAGE_LOOP_TIMER_SLACK_H_
+#define BASE_MESSAGE_LOOP_TIMER_SLACK_H_
+
+namespace base {
+
+// Amount of timer slack to use for delayed timers. Increasing timer slack
+// allows the OS to coalesce timers more effectively.
+enum TimerSlack {
+ // Lowest value for timer slack allowed by OS.
+ TIMER_SLACK_NONE,
+
+ // Maximal value for timer slack allowed by OS.
+ TIMER_SLACK_MAXIMUM
+};
+
+} // namespace base
+
+#endif // BASE_MESSAGE_LOOP_TIMER_SLACK_H_
diff --git a/chromium/base/metrics/OWNERS b/chromium/base/metrics/OWNERS
index 17a19451a29..3fd7c0dbc2b 100644
--- a/chromium/base/metrics/OWNERS
+++ b/chromium/base/metrics/OWNERS
@@ -1,8 +1,3 @@
-# Primary OWNER
-jar@chromium.org
-
-# Secondary OWNER; can review simpler changes
+asvitkine@chromium.org
isherman@chromium.org
-
-# Note that all members of the parent file base/OWNERS can also stamp trivial
-# changes, but will probably defer to Jim for meatier changes.
+jar@chromium.org
diff --git a/chromium/base/metrics/field_trial.cc b/chromium/base/metrics/field_trial.cc
index b99f3148f96..54b95211470 100644
--- a/chromium/base/metrics/field_trial.cc
+++ b/chromium/base/metrics/field_trial.cc
@@ -252,7 +252,7 @@ FieldTrialList::FieldTrialList(
FieldTrialList::~FieldTrialList() {
AutoLock auto_lock(lock_);
while (!registered_.empty()) {
- RegistrationList::iterator it = registered_.begin();
+ RegistrationMap::iterator it = registered_.begin();
it->second->Release();
registered_.erase(it->first);
}
@@ -390,7 +390,7 @@ void FieldTrialList::GetActiveFieldTrialGroups(
return;
AutoLock auto_lock(global_->lock_);
- for (RegistrationList::iterator it = global_->registered_.begin();
+ for (RegistrationMap::iterator it = global_->registered_.begin();
it != global_->registered_.end(); ++it) {
FieldTrial::ActiveGroup active_group;
if (it->second->GetActiveGroup(&active_group))
@@ -399,8 +399,10 @@ void FieldTrialList::GetActiveFieldTrialGroups(
}
// static
-bool FieldTrialList::CreateTrialsFromString(const std::string& trials_string,
- FieldTrialActivationMode mode) {
+bool FieldTrialList::CreateTrialsFromString(
+ const std::string& trials_string,
+ FieldTrialActivationMode mode,
+ const std::set<std::string>& ignored_trial_names) {
DCHECK(global_);
if (trials_string.empty() || !global_)
return true;
@@ -419,6 +421,9 @@ bool FieldTrialList::CreateTrialsFromString(const std::string& trials_string,
group_name_end - name_end - 1);
next_item = group_name_end + 1;
+ if (ignored_trial_names.find(name) != ignored_trial_names.end())
+ continue;
+
FieldTrial* trial = CreateFieldTrial(name, group_name);
if (!trial)
return false;
@@ -513,7 +518,7 @@ const FieldTrial::EntropyProvider*
}
FieldTrial* FieldTrialList::PreLockedFind(const std::string& name) {
- RegistrationList::iterator it = registered_.find(name);
+ RegistrationMap::iterator it = registered_.find(name);
if (registered_.end() == it)
return NULL;
return it->second;
diff --git a/chromium/base/metrics/field_trial.h b/chromium/base/metrics/field_trial.h
index 70ce2f9c45d..51177eb93f7 100644
--- a/chromium/base/metrics/field_trial.h
+++ b/chromium/base/metrics/field_trial.h
@@ -55,6 +55,7 @@
#define BASE_METRICS_FIELD_TRIAL_H_
#include <map>
+#include <set>
#include <string>
#include <vector>
@@ -412,9 +413,12 @@ class BASE_EXPORT FieldTrialList {
// browser process into this non-browser process, but could also be invoked
// through a command line argument to the browser process. The created field
// trials are marked as "used" for the purposes of active trial reporting if
- // |mode| is ACTIVATE_TRIALS.
- static bool CreateTrialsFromString(const std::string& prior_trials,
- FieldTrialActivationMode mode);
+ // |mode| is ACTIVATE_TRIALS. Trial names in |ignored_trial_names| are ignored
+ // when parsing |prior_trials|.
+ static bool CreateTrialsFromString(
+ const std::string& prior_trials,
+ FieldTrialActivationMode mode,
+ const std::set<std::string>& ignored_trial_names);
// Create a FieldTrial with the given |name| and using 100% probability for
// the FieldTrial, force FieldTrial to have the same group string as
@@ -441,7 +445,7 @@ class BASE_EXPORT FieldTrialList {
private:
// A map from FieldTrial names to the actual instances.
- typedef std::map<std::string, FieldTrial*> RegistrationList;
+ typedef std::map<std::string, FieldTrial*> RegistrationMap;
// If one-time randomization is enabled, returns a weak pointer to the
// corresponding EntropyProvider. Otherwise, returns NULL.
@@ -466,7 +470,7 @@ class BASE_EXPORT FieldTrialList {
// Lock for access to registered_.
base::Lock lock_;
- RegistrationList registered_;
+ RegistrationMap registered_;
// Entropy provider to be used for one-time randomized field trials. If NULL,
// one-time randomization is not supported.
diff --git a/chromium/base/metrics/field_trial_unittest.cc b/chromium/base/metrics/field_trial_unittest.cc
index a77633e8f09..866095ca66e 100644
--- a/chromium/base/metrics/field_trial_unittest.cc
+++ b/chromium/base/metrics/field_trial_unittest.cc
@@ -385,7 +385,8 @@ TEST_F(FieldTrialTest, Restore) {
ASSERT_FALSE(FieldTrialList::TrialExists("xxx"));
FieldTrialList::CreateTrialsFromString("Some_name/Winner/xxx/yyyy/",
- FieldTrialList::DONT_ACTIVATE_TRIALS);
+ FieldTrialList::DONT_ACTIVATE_TRIALS,
+ std::set<std::string>());
FieldTrial* trial = FieldTrialList::Find("Some_name");
ASSERT_NE(static_cast<FieldTrial*>(NULL), trial);
@@ -400,13 +401,17 @@ TEST_F(FieldTrialTest, Restore) {
TEST_F(FieldTrialTest, BogusRestore) {
EXPECT_FALSE(FieldTrialList::CreateTrialsFromString(
- "MissingSlash", FieldTrialList::DONT_ACTIVATE_TRIALS));
+ "MissingSlash", FieldTrialList::DONT_ACTIVATE_TRIALS,
+ std::set<std::string>()));
EXPECT_FALSE(FieldTrialList::CreateTrialsFromString(
- "MissingGroupName/", FieldTrialList::DONT_ACTIVATE_TRIALS));
+ "MissingGroupName/", FieldTrialList::DONT_ACTIVATE_TRIALS,
+ std::set<std::string>()));
EXPECT_FALSE(FieldTrialList::CreateTrialsFromString(
- "MissingFinalSlash/gname", FieldTrialList::DONT_ACTIVATE_TRIALS));
+ "MissingFinalSlash/gname", FieldTrialList::DONT_ACTIVATE_TRIALS,
+ std::set<std::string>()));
EXPECT_FALSE(FieldTrialList::CreateTrialsFromString(
- "noname, only group/", FieldTrialList::DONT_ACTIVATE_TRIALS));
+ "noname, only group/", FieldTrialList::DONT_ACTIVATE_TRIALS,
+ std::set<std::string>()));
}
TEST_F(FieldTrialTest, DuplicateRestore) {
@@ -420,18 +425,21 @@ TEST_F(FieldTrialTest, DuplicateRestore) {
// It is OK if we redundantly specify a winner.
EXPECT_TRUE(FieldTrialList::CreateTrialsFromString(
- save_string, FieldTrialList::DONT_ACTIVATE_TRIALS));
+ save_string, FieldTrialList::DONT_ACTIVATE_TRIALS,
+ std::set<std::string>()));
// But it is an error to try to change to a different winner.
EXPECT_FALSE(FieldTrialList::CreateTrialsFromString(
- "Some name/Loser/", FieldTrialList::DONT_ACTIVATE_TRIALS));
+ "Some name/Loser/", FieldTrialList::DONT_ACTIVATE_TRIALS,
+ std::set<std::string>()));
}
TEST_F(FieldTrialTest, CreateTrialsFromStringActive) {
ASSERT_FALSE(FieldTrialList::TrialExists("Abc"));
ASSERT_FALSE(FieldTrialList::TrialExists("Xyz"));
ASSERT_TRUE(FieldTrialList::CreateTrialsFromString(
- "Abc/def/Xyz/zyx/", FieldTrialList::ACTIVATE_TRIALS));
+ "Abc/def/Xyz/zyx/", FieldTrialList::ACTIVATE_TRIALS,
+ std::set<std::string>()));
FieldTrial::ActiveGroups active_groups;
FieldTrialList::GetActiveFieldTrialGroups(&active_groups);
@@ -446,7 +454,8 @@ TEST_F(FieldTrialTest, CreateTrialsFromStringNotActive) {
ASSERT_FALSE(FieldTrialList::TrialExists("Abc"));
ASSERT_FALSE(FieldTrialList::TrialExists("Xyz"));
ASSERT_TRUE(FieldTrialList::CreateTrialsFromString(
- "Abc/def/Xyz/zyx/", FieldTrialList::DONT_ACTIVATE_TRIALS));
+ "Abc/def/Xyz/zyx/", FieldTrialList::DONT_ACTIVATE_TRIALS,
+ std::set<std::string>()));
FieldTrial::ActiveGroups active_groups;
FieldTrialList::GetActiveFieldTrialGroups(&active_groups);
@@ -469,7 +478,7 @@ TEST_F(FieldTrialTest, CreateTrialsFromStringActiveObserver) {
TestFieldTrialObserver observer;
ASSERT_TRUE(FieldTrialList::CreateTrialsFromString(
- "Abc/def/", FieldTrialList::ACTIVATE_TRIALS));
+ "Abc/def/", FieldTrialList::ACTIVATE_TRIALS, std::set<std::string>()));
RunLoop().RunUntilIdle();
EXPECT_EQ("Abc", observer.trial_name());
@@ -481,7 +490,8 @@ TEST_F(FieldTrialTest, CreateTrialsFromStringNotActiveObserver) {
TestFieldTrialObserver observer;
ASSERT_TRUE(FieldTrialList::CreateTrialsFromString(
- "Abc/def/", FieldTrialList::DONT_ACTIVATE_TRIALS));
+ "Abc/def/", FieldTrialList::DONT_ACTIVATE_TRIALS,
+ std::set<std::string>()));
RunLoop().RunUntilIdle();
// Observer shouldn't be notified.
EXPECT_TRUE(observer.trial_name().empty());
@@ -494,6 +504,48 @@ TEST_F(FieldTrialTest, CreateTrialsFromStringNotActiveObserver) {
EXPECT_EQ("def", observer.group_name());
}
+TEST_F(FieldTrialTest, CreateTrialsFromStringWithIgnoredFieldTrials) {
+ ASSERT_FALSE(FieldTrialList::TrialExists("Unaccepted1"));
+ ASSERT_FALSE(FieldTrialList::TrialExists("Foo"));
+ ASSERT_FALSE(FieldTrialList::TrialExists("Unaccepted2"));
+ ASSERT_FALSE(FieldTrialList::TrialExists("Bar"));
+ ASSERT_FALSE(FieldTrialList::TrialExists("Unaccepted3"));
+
+ std::set<std::string> ignored_trial_names;
+ ignored_trial_names.insert("Unaccepted1");
+ ignored_trial_names.insert("Unaccepted2");
+ ignored_trial_names.insert("Unaccepted3");
+
+ FieldTrialList::CreateTrialsFromString(
+ "Unaccepted1/Unaccepted1_name/"
+ "Foo/Foo_name/"
+ "Unaccepted2/Unaccepted2_name/"
+ "Bar/Bar_name/"
+ "Unaccepted3/Unaccepted3_name/",
+ FieldTrialList::DONT_ACTIVATE_TRIALS,
+ ignored_trial_names);
+
+ EXPECT_FALSE(FieldTrialList::TrialExists("Unaccepted1"));
+ EXPECT_TRUE(FieldTrialList::TrialExists("Foo"));
+ EXPECT_FALSE(FieldTrialList::TrialExists("Unaccepted2"));
+ EXPECT_TRUE(FieldTrialList::TrialExists("Bar"));
+ EXPECT_FALSE(FieldTrialList::TrialExists("Unaccepted3"));
+
+ FieldTrial::ActiveGroups active_groups;
+ FieldTrialList::GetActiveFieldTrialGroups(&active_groups);
+ EXPECT_TRUE(active_groups.empty());
+
+ FieldTrial* trial = FieldTrialList::Find("Foo");
+ ASSERT_NE(static_cast<FieldTrial*>(NULL), trial);
+ EXPECT_EQ("Foo", trial->trial_name());
+ EXPECT_EQ("Foo_name", trial->group_name());
+
+ trial = FieldTrialList::Find("Bar");
+ ASSERT_NE(static_cast<FieldTrial*>(NULL), trial);
+ EXPECT_EQ("Bar", trial->trial_name());
+ EXPECT_EQ("Bar_name", trial->group_name());
+}
+
TEST_F(FieldTrialTest, CreateFieldTrial) {
ASSERT_FALSE(FieldTrialList::TrialExists("Some_name"));
diff --git a/chromium/base/metrics/histogram.cc b/chromium/base/metrics/histogram.cc
index fbe66d05d29..beb9b9e8898 100644
--- a/chromium/base/metrics/histogram.cc
+++ b/chromium/base/metrics/histogram.cc
@@ -110,7 +110,16 @@ HistogramBase* Histogram::FactoryGet(const string& name,
}
DCHECK_EQ(HISTOGRAM, histogram->GetHistogramType());
- CHECK(histogram->HasConstructionArguments(minimum, maximum, bucket_count));
+ if (!histogram->HasConstructionArguments(minimum, maximum, bucket_count)) {
+ // The construction arguments do not match the existing histogram. This can
+ // come about if an extension updates in the middle of a chrome run and has
+ // changed one of them, or simply by bad code within Chrome itself. We
+ // return NULL here with the expectation that bad code in Chrome will crash
+ // on dereference, but extension/Pepper APIs will guard against NULL and not
+ // crash.
+ DLOG(ERROR) << "Histogram " << name << " has bad construction arguments";
+ return NULL;
+ }
return histogram;
}
@@ -567,7 +576,16 @@ HistogramBase* LinearHistogram::FactoryGetWithRangeDescription(
}
DCHECK_EQ(LINEAR_HISTOGRAM, histogram->GetHistogramType());
- CHECK(histogram->HasConstructionArguments(minimum, maximum, bucket_count));
+ if (!histogram->HasConstructionArguments(minimum, maximum, bucket_count)) {
+ // The construction arguments do not match the existing histogram. This can
+ // come about if an extension updates in the middle of a chrome run and has
+ // changed one of them, or simply by bad code within Chrome itself. We
+ // return NULL here with the expectation that bad code in Chrome will crash
+ // on dereference, but extension/Pepper APIs will guard against NULL and not
+ // crash.
+ DLOG(ERROR) << "Histogram " << name << " has bad construction arguments";
+ return NULL;
+ }
return histogram;
}
diff --git a/chromium/base/metrics/histogram.h b/chromium/base/metrics/histogram.h
index 9845362d98a..b795a12dbd1 100644
--- a/chromium/base/metrics/histogram.h
+++ b/chromium/base/metrics/histogram.h
@@ -155,8 +155,8 @@ class Lock;
base::subtle::Release_Store(&atomic_histogram_pointer, \
reinterpret_cast<base::subtle::AtomicWord>(histogram_pointer)); \
} \
- DCHECK_EQ(histogram_pointer->histogram_name(), \
- std::string(constant_histogram_name)); \
+ if (DCHECK_IS_ON) \
+ histogram_pointer->CheckName(constant_histogram_name); \
histogram_pointer->histogram_add_method_invocation; \
} while (0)
@@ -190,6 +190,12 @@ class Lock;
base::Histogram::FactoryGet(name, min, max, bucket_count, \
base::HistogramBase::kNoFlags))
+// This is a helper macro used by other macros and shouldn't be used directly.
+#define HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary, flag) \
+ STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \
+ base::LinearHistogram::FactoryGet(name, 1, boundary, boundary + 1, \
+ flag))
+
#define HISTOGRAM_PERCENTAGE(name, under_one_hundred) \
HISTOGRAM_ENUMERATION(name, under_one_hundred, 101)
@@ -349,9 +355,15 @@ class Lock;
// The samples should always be strictly less than |boundary_value|. For more
// details, see the comment for the |HISTOGRAM_ENUMERATION| macro, above.
#define UMA_HISTOGRAM_ENUMERATION(name, sample, boundary_value) \
- STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \
- base::LinearHistogram::FactoryGet(name, 1, boundary_value, \
- boundary_value + 1, base::HistogramBase::kUmaTargetedHistogramFlag))
+ HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary_value, \
+ base::HistogramBase::kUmaTargetedHistogramFlag)
+
+// Similar to UMA_HISTOGRAM_ENUMERATION, but used for recording stability
+// histograms. Use this if recording a histogram that should be part of the
+// initial stability log.
+#define UMA_STABILITY_HISTOGRAM_ENUMERATION(name, sample, boundary_value) \
+ HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary_value, \
+ base::HistogramBase::kUmaStabilityHistogramFlag)
#define UMA_HISTOGRAM_CUSTOM_ENUMERATION(name, sample, custom_ranges) \
STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \
diff --git a/chromium/base/metrics/histogram_base.cc b/chromium/base/metrics/histogram_base.cc
index 5c6e2d271bb..6e7e69e061c 100644
--- a/chromium/base/metrics/histogram_base.cc
+++ b/chromium/base/metrics/histogram_base.cc
@@ -20,7 +20,7 @@
namespace base {
std::string HistogramTypeToString(HistogramType type) {
- switch(type) {
+ switch (type) {
case HISTOGRAM:
return "HISTOGRAM";
case LINEAR_HISTOGRAM:
@@ -66,6 +66,10 @@ HistogramBase::HistogramBase(const std::string& name)
HistogramBase::~HistogramBase() {}
+void HistogramBase::CheckName(const StringPiece& name) const {
+ DCHECK_EQ(histogram_name(), name);
+}
+
void HistogramBase::SetFlags(int32 flags) {
flags_ |= flags;
}
diff --git a/chromium/base/metrics/histogram_base.h b/chromium/base/metrics/histogram_base.h
index 4248bd84a4c..be07fc6d419 100644
--- a/chromium/base/metrics/histogram_base.h
+++ b/chromium/base/metrics/histogram_base.h
@@ -12,6 +12,7 @@
#include "base/base_export.h"
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
+#include "base/strings/string_piece.h"
#include "base/time/time.h"
class Pickle;
@@ -48,20 +49,28 @@ BASE_EXPORT_PRIVATE HistogramBase* DeserializeHistogramInfo(
class BASE_EXPORT HistogramBase {
public:
- typedef int Sample; // Used for samples.
- typedef subtle::Atomic32 Count; // Used to count samples.
+ typedef int Sample; // Used for samples.
+ typedef subtle::Atomic32 AtomicCount; // Used to count samples.
+ typedef int32 Count; // Used to manipulate counts in temporaries.
static const Sample kSampleType_MAX; // INT_MAX
enum Flags {
kNoFlags = 0,
- kUmaTargetedHistogramFlag = 0x1, // Histogram should be UMA uploaded.
- // Indicate that the histogram was pickled to be sent across an IPC Channel.
- // If we observe this flag on a histogram being aggregated into after IPC,
- // then we are running in a single process mode, and the aggregation should
- // not take place (as we would be aggregating back into the source
- // histogram!).
+ // Histogram should be UMA uploaded.
+ kUmaTargetedHistogramFlag = 0x1,
+
+ // Indicates that this is a stability histogram. This flag exists to specify
+ // which histograms should be included in the initial stability log. Please
+ // refer to |MetricsService::PrepareInitialStabilityLog|.
+ kUmaStabilityHistogramFlag = kUmaTargetedHistogramFlag | 0x2,
+
+ // Indicates that the histogram was pickled to be sent across an IPC
+ // Channel. If we observe this flag on a histogram being aggregated into
+ // after IPC, then we are running in a single process mode, and the
+ // aggregation should not take place (as we would be aggregating back into
+ // the source histogram!).
kIPCSerializationSourceFlag = 0x10,
// Only for Histogram and its sub classes: fancy bucket-naming support.
@@ -84,6 +93,11 @@ class BASE_EXPORT HistogramBase {
std::string histogram_name() const { return histogram_name_; }
+ // Comapres |name| to the histogram name and triggers a DCHECK if they do not
+ // match. This is a helper function used by histogram macros, which results in
+ // in more compact machine code being generated by the macros.
+ void CheckName(const StringPiece& name) const;
+
// Operations with Flags enum.
int32 flags() const { return flags_; }
void SetFlags(int32 flags);
@@ -129,7 +143,7 @@ class BASE_EXPORT HistogramBase {
// customize the output.
void WriteJSON(std::string* output) const;
-protected:
+ protected:
// Subclasses should implement this function to make SerializeInfo work.
virtual bool SerializeInfoImpl(Pickle* pickle) const = 0;
diff --git a/chromium/base/metrics/histogram_delta_serialization.cc b/chromium/base/metrics/histogram_delta_serialization.cc
index 924916db76e..e4aad13ac22 100644
--- a/chromium/base/metrics/histogram_delta_serialization.cc
+++ b/chromium/base/metrics/histogram_delta_serialization.cc
@@ -7,8 +7,8 @@
#include "base/logging.h"
#include "base/metrics/histogram_base.h"
#include "base/metrics/histogram_snapshot_manager.h"
+#include "base/numerics/safe_conversions.h"
#include "base/pickle.h"
-#include "base/safe_numerics.h"
#include "base/values.h"
namespace base {
@@ -66,7 +66,7 @@ void HistogramDeltaSerialization::PrepareAndSerializeDeltas(
// the histograms, so that the receiving process can distinguish them from the
// local histograms.
histogram_snapshot_manager_.PrepareDeltas(
- Histogram::kIPCSerializationSourceFlag, false);
+ Histogram::kIPCSerializationSourceFlag, Histogram::kNoFlags);
serialized_deltas_ = NULL;
}
@@ -75,7 +75,7 @@ void HistogramDeltaSerialization::DeserializeAndAddSamples(
const std::vector<std::string>& serialized_deltas) {
for (std::vector<std::string>::const_iterator it = serialized_deltas.begin();
it != serialized_deltas.end(); ++it) {
- Pickle pickle(it->data(), checked_numeric_cast<int>(it->size()));
+ Pickle pickle(it->data(), checked_cast<int>(it->size()));
PickleIterator iter(pickle);
DeserializeHistogramAndAddSamples(&iter);
}
diff --git a/chromium/base/metrics/histogram_samples.cc b/chromium/base/metrics/histogram_samples.cc
index 9f3dd6a40e0..2319ed1572f 100644
--- a/chromium/base/metrics/histogram_samples.cc
+++ b/chromium/base/metrics/histogram_samples.cc